summaryrefslogtreecommitdiffstats
path: root/6
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2012-08-10 10:09:11 -0700
committerYing Wang <wangying@google.com>2012-08-10 10:09:11 -0700
commit435483c91cf16117fc2b864cb6994435ad669bc6 (patch)
treeecae3b1abaa57c09220319de58927782557558f3 /6
parentdacf4827686b486347ba5a099697570f4b233409 (diff)
downloadprebuilts_ndk-435483c91cf16117fc2b864cb6994435ad669bc6.zip
prebuilts_ndk-435483c91cf16117fc2b864cb6994435ad669bc6.tar.gz
prebuilts_ndk-435483c91cf16117fc2b864cb6994435ad669bc6.tar.bz2
Create symlink current
and simplify the directory names. With this we will unify all LOCAL_NDK_VERSIONs in the platform to the latest stable NDK. Bug: 6932421 Change-Id: I1842caaced8c621a49e92326bbbd85b284561c0f
Diffstat (limited to '6')
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/alloca.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/android/log.h128
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/arpa/inet.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/arpa/nameser.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/4level-fixup.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/audit_dir_write.h11
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/__ffs.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/atomic.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/find.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls64.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/le.h53
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/non-atomic.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/bug.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/cputime.h60
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/emergency-restart.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h119
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h148
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/futex.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/ioctl.h58
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/ipc.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/local.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/memory_model.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/mman.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/mutex-xchg.h16
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/percpu.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable-nopud.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/poll.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/sections.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h213
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/tlb.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/topology.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm-generic/xor.h14
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/a.out.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/board-perseus2.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/board.h163
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/cpu.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/dma.h318
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/fpga.h160
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio-switch.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/hardware.h157
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/io.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/irqs.h242
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/mcbsp.h185
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/memory.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/mtd-xip.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/mux.h391
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/omap24xx.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/serial.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/timex.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/arch/vmalloc.h13
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/atomic.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/auxvec.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/bitops.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/byteorder.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/cache.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/cacheflush.h107
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/cputime.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/delay.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/div64.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/dma-mapping.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/dma.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/domain.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/dyntick.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/elf.h63
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/errno.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/fcntl.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/fpstate.h68
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/glue.h11
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/hardirq.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/hardware.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/hw_irq.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/ide.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/io.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/ioctl.h12
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/ioctls.h88
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/ipcbuf.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/irq.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/linkage.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/local.h12
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/locks.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/mc146818rtc.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/memory.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/mman.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/module.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/msgbuf.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/mtd-xip.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/page.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/param.h25
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/percpu.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/pgalloc.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/pgtable-hwdef.h70
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/pgtable.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/poll.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/posix_types.h70
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/proc-fns.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/processor.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/procinfo.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/ptrace.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/resource.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/scatterlist.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/semaphore.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/sembuf.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/shmbuf.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/shmparam.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/siginfo.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/signal.h103
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/sizes.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/smp.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/socket.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/sockios.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/spinlock.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/spinlock_types.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/stat.h93
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/statfs.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/suspend.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/system.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/termbits.h174
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/termios.h67
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/thread_info.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/timex.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/tlbflush.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/topology.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/types.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/uaccess.h77
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/unaligned.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/unistd.h359
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/user.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/asm/vga.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/assert.h65
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/byteswap.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/ctype.h207
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/dirent.h79
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/dlfcn.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/elf.h58
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/endian.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/err.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/errno.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/fcntl.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/features.h58
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/fenv.h217
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/fnmatch.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/getopt.h90
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/grp.h85
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/inttypes.h261
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/jni.h1140
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/lastlog.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/libgen.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/limits.h96
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/a.out.h220
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/aio_abi.h64
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/akm8976.h89
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/android_alarm.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/android_pmem.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/android_power.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/apm_bios.h94
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ashmem.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ata.h265
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atm.h161
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atmapi.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atmdev.h161
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atmioc.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atmppp.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/atmsap.h117
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/attribute_container.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/auto_fs.h56
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/autoconf.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/auxvec.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/backing-dev.h53
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/binder.h186
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/binfmts.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/bio.h171
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/bitmap.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/bitops.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/blkdev.h461
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/blkpg.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/blockgroup_lock.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/byteorder/big_endian.h67
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/byteorder/generic.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/byteorder/little_endian.h67
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swab.h72
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swabb.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/cache.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/calc64.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/capability.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/capi.h88
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/cdev.h14
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/cdrom.h718
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/circ_buf.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/clk.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/coda.h594
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/coda_fs_i.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/compat.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/compiler-gcc.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/compiler.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/completion.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/config.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/console_struct.h121
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/cpu.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/cpumask.h87
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ctype.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/dccp.h135
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/debug_locks.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/delay.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/device.h222
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/dirent.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/dm-ioctl.h146
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/dma-mapping.h48
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/dmaengine.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/efs_dir.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_i.h63
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_sb.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/elevator.h109
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/elf-em.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/elf.h361
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/err.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/errno.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/errqueue.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/etherdevice.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ext2_fs.h378
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ext3_fs.h448
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/fadvise.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/fb.h347
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/fcntl.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/fd.h258
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/file.h64
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/filter.h104
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/fs.h162
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ftape.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/futex.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/genhd.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/gfp.h76
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/hardirq.h73
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/hdlc/ioctl.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/hdreg.h432
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/hdsmart.h114
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/highmem.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/hil.h256
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/i2c.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/icmp.h81
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if.h176
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_arcnet.h94
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_arp.h119
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_bridge.h100
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_ether.h81
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_fc.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_fddi.h83
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_hippi.h99
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_packet.h96
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_ppp.h116
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_tr.h76
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_tun.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/if_vlan.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/in.h211
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/in6.h158
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/init.h137
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/inotify.h53
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/input.h715
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/interrupt.h121
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ioctl.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ioport.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ioprio.h44
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ip.h118
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ipc.h48
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ipmi_msgdefs.h69
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ipmi_smi.h79
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ipx.h78
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/irq.h100
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/irq_cpustat.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/irqflags.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/irqreturn.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/jbd.h118
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/jiffies.h115
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kd.h176
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kdev_t.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kernel.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kernel_stat.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kernelcapi.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kexec.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/key.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/keyboard.h446
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/keychord.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/klist.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kmod.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kobject.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/kref.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ktime.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/limits.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/linkage.h66
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/list.h16
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/lockd/nlm.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/lockd/xdr.h73
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/lockdep.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/loop.h77
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/magic.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/major.h175
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mc146818rtc.h79
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mca.h74
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mempolicy.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mempool.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/miscdevice.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mm.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mmc/card.h100
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mmc/host.h120
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mmc/mmc.h99
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mmzone.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mod_devicetable.h209
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/module.h114
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/moduleparam.h101
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mount.h14
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/msdos_fs.h180
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/msg.h68
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/msm_adsp.h57
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/msm_audio.h85
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/msm_mdp.h83
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mt9t013.h111
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/bbm.h75
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/blktrans.h63
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi.h187
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi_endian.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/compatmac.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/flashchip.h68
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/map.h102
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/mtd.h153
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand.h319
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand_ecc.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/nftl.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/onenand_regs.h143
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtd/partitions.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mtio.h259
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mutex-debug.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/mutex.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ncp.h193
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ncp_mount.h69
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ncp_no.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/net.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netdevice.h69
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h114
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink.h84
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h146
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/x_tables.h125
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_comment.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_connbytes.h36
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_conntrack.h66
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_dccp.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_esp.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_helper.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_length.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_limit.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_mac.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_multiport.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_physdev.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_pkttype.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_quota.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_realm.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_sctp.h68
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_state.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_statistic.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_string.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h159
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_bridge.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4.h73
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h81
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h65
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h180
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h48
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h66
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6.h67
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h178
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/netlink.h119
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfs.h124
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfs2.h75
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfs3.h108
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfs4.h99
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfs_xdr.h556
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsacl.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/auth.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/const.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/debug.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/export.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/interface.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/nfsfh.h62
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/stats.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nfsd/xdr.h141
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/node.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nodemask.h89
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/notifier.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/numa.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/nvram.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/omap_csmi.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pagemap.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/param.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/patchkey.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pci.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pci_ids.h2270
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pci_regs.h422
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/percpu.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/percpu_counter.h25
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/personality.h83
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pfkeyv2.h306
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pkt_cls.h372
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pkt_sched.h405
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/platform_device.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/plist.h44
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pm.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/pnp.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/poll.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/posix_acl.h47
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/posix_types.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ppdev.h71
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ppp_defs.h121
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/prctl.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/preempt.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/proc_fs.h77
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ptrace.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/qic117.h123
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/qnxtypes.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/quota.h87
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/raid/md.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/raid/md_k.h184
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/raid/md_p.h135
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/raid/md_u.h104
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/raid/xor.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/random.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/rbtree.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/rcupdate.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/reboot.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/relay.h91
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/resource.h60
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/route.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/rtc.h72
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/rtnetlink.h723
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/rwsem.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sched.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sem.h82
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/seq_file.h14
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/seqlock.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/serial_core.h95
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/serial_reg.h249
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/serio.h60
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/shm.h74
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/signal.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/skbuff.h164
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/slab.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/smb.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/smp.h26
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/smp_lock.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/socket.h227
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sockios.h107
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/soundcard.h831
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock.h112
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_smp.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_up.h69
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types_up.h29
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/spinlock_up.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/stacktrace.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/stat.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/statfs.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/stddef.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/string.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/stringify.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth_gss.h16
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/clnt.h103
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/debug.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_api.h16
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_asn1.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_err.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/msg_prot.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/sched.h182
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/stats.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svc.h82
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svcauth.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/timer.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/types.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xdr.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xprt.h172
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/swap.h39
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sysctl.h824
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sysdev.h60
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/sysfs.h76
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/taskstats.h72
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/taskstats_kern.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/tcp.h147
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/telephony.h172
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/termios.h18
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/textsearch.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/thread_info.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/threads.h23
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/time.h69
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/timer.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/times.h24
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/timex.h108
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/tiocl.h47
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/transport_class.h48
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/tty.h15
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/types.h37
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/udp.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_i.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_sb.h35
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/uio.h27
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/un.h22
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/unistd.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/usb.h21
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/usb_ch9.h388
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/usbdevice_fs.h123
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/user.h12
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/utime.h20
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/utsname.h44
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/version.h13
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/vfs.h17
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/videodev.h327
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/videodev2.h963
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/vmalloc.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/vt.h68
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/vt_buffer.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/wait.h30
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/wanrouter.h356
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/wireless.h542
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/workqueue.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/xattr.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/zconf.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/zlib.h80
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/linux/zorro_ids.h549
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/locale.h61
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/_types.h127
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/asm.h130
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/cdefs.h19
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/cpu-features.h164
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/exec.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/ieee.h191
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/internal_types.h10
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/kernel.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/limits.h63
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/machine/setjmp.h87
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/malloc.h104
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/math.h486
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/memory.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/mntent.h53
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/mtd/mtd-abi.h133
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/mtd/mtd-user.h25
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/ethertypes.h313
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_arp.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_dl.h87
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_ether.h217
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_ieee1394.h127
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_packet.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/if_types.h267
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/net/route.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netdb.h256
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/ether.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/if_ether.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/in.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/in6.h106
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/in_systm.h59
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/ip.h275
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/ip_icmp.h214
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/tcp.h34
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netinet/udp.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/netpacket/packet.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/nsswitch.h237
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/pathconf.h64
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/paths.h74
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/poll.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/pthread.h243
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/pwd.h127
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/resolv.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sched.h56
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/semaphore.h58
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/setjmp.h63
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sgtty.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sha1.h31
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/signal.h125
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/stdint.h276
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/stdio.h442
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/stdlib.h185
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/string.h90
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/strings.h58
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/_errdefs.h172
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/_sigdefs.h65
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/_system_properties.h108
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/_types.h77
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/atomics.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/cdefs.h507
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h152
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/dirent.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/endian.h273
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/epoll.h72
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/errno.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/exec_elf.h625
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/file.h38
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/fsuid.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/inotify.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ioctl.h43
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ioctl_compat.h168
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ipc.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/klog.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/limits.h179
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/linux-syscalls.h223
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/linux-unistd.h204
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/mman.h66
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/mount.h102
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/param.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/poll.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/prctl.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ptrace.h45
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/queue.h557
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/reboot.h49
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/resource.h55
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/select.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/sendfile.h40
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/socket.h87
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/socketcalls.h51
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/stat.h108
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/statfs.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/syscall.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/sysconf.h135
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/sysinfo.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/syslimits.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h52
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/system_properties.h85
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/time.h78
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/timeb.h46
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/times.h41
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ttychars.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/ttydev.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/types.h127
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/uio.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/un.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/utime.h33
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/utsname.h50
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/vfs.h102
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/vt.h28
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/sys/wait.h54
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/syslog.h116
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/termio.h32
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/termios.h113
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/thread_db.h143
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/time.h117
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/time64.h59
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/unistd.h207
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/util.h0
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/utime.h42
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/utmp.h90
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/wchar.h155
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/wctype.h1
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/zconf.h332
-rw-r--r--6/platforms/android-3/arch-arm/usr/include/zlib.h1357
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.obin0 -> 1324 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/crtbegin_so.obin0 -> 1068 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/crtbegin_static.obin0 -> 1324 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/crtend_android.obin0 -> 892 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/crtend_so.obin0 -> 716 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libc.abin0 -> 3093736 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libc.sobin0 -> 1139428 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libdl.sobin0 -> 31532 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/liblog.sobin0 -> 42136 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libm.abin0 -> 996072 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libm.sobin0 -> 449756 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libstdc++.abin0 -> 28564 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libstdc++.sobin0 -> 15860 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libthread_db.abin0 -> 14968 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libthread_db.sobin0 -> 40720 bytes
-rw-r--r--6/platforms/android-3/arch-arm/usr/lib/libz.sobin0 -> 174756 bytes
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/alloca.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/android/log.h128
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/arpa/inet.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/arpa/nameser.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/4level-fixup.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/audit_dir_write.h11
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/__ffs.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/atomic.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/ffz.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/find.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls64.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/le.h53
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/non-atomic.h20
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/bug.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/cputime.h60
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/emergency-restart.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/errno-base.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/errno.h119
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/fcntl.h148
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/futex.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/ioctl.h58
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/ipc.h37
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/local.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/memory_model.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/mman.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/mutex-xchg.h16
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/percpu.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable-nopud.h39
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable.h95
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/poll.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/resource.h57
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/sections.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/siginfo.h213
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/signal.h39
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/tlb.h37
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/topology.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/asm-generic/xor.h14
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/assert.h65
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/byteswap.h37
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/ctype.h207
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/dirent.h79
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/dlfcn.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/elf.h58
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/endian.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/err.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/errno.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/fcntl.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/features.h58
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/fnmatch.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/getopt.h90
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/grp.h85
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/inttypes.h261
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/jni.h1140
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/lastlog.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/libgen.h57
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/limits.h96
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/a.out.h220
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/aio_abi.h64
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/akm8976.h89
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/android_alarm.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/android_pmem.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/android_power.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/apm_bios.h94
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ashmem.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ata.h265
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atm.h161
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atmapi.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atmdev.h161
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atmioc.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atmppp.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/atmsap.h117
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/attribute_container.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/auto_fs.h56
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/autoconf.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/auxvec.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/backing-dev.h53
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/binder.h186
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/binfmts.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/bio.h171
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/bitmap.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/bitops.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/blkdev.h461
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/blkpg.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/blockgroup_lock.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/byteorder/big_endian.h67
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/byteorder/generic.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/byteorder/little_endian.h67
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swab.h72
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swabb.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/cache.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/calc64.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/capability.h95
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/capi.h88
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/cdev.h14
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/cdrom.h718
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/circ_buf.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/clk.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/coda.h594
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/coda_fs_i.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/compat.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/compiler-gcc.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/compiler.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/completion.h32
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/config.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/console_struct.h121
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/cpu.h36
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/cpumask.h87
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ctype.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/dccp.h135
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/debug_locks.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/delay.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/device.h222
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/dirent.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/dm-ioctl.h146
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/dma-mapping.h48
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/dmaengine.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/efs_dir.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_i.h63
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_sb.h61
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/elevator.h109
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/elf-em.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/elf.h361
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/err.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/errno.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/errqueue.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/etherdevice.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ext2_fs.h378
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ext3_fs.h448
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/fadvise.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/fb.h347
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/fcntl.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/fd.h258
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/file.h64
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/filter.h104
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/fs.h162
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ftape.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/futex.h61
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/genhd.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/gfp.h76
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/hardirq.h73
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/hdlc/ioctl.h57
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/hdreg.h432
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/hdsmart.h114
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/highmem.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/hil.h256
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/i2c.h95
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/icmp.h81
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if.h176
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_arcnet.h94
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_arp.h119
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_bridge.h100
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_ether.h81
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_fc.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_fddi.h83
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_hippi.h99
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_packet.h96
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_ppp.h116
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_tr.h76
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_tun.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/if_vlan.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/in.h211
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/in6.h158
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/init.h137
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/inotify.h53
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/input.h715
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/interrupt.h121
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ioctl.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ioport.h95
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ioprio.h44
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ip.h118
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ipc.h48
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ipmi_msgdefs.h69
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ipmi_smi.h79
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ipx.h78
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/irq.h100
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/irq_cpustat.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/irqflags.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/irqreturn.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/jbd.h118
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/jiffies.h115
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kd.h176
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kdev_t.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kernel.h39
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kernel_stat.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kernelcapi.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kexec.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/key.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/keyboard.h446
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/keychord.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/klist.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kmod.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kobject.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/kref.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ktime.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/limits.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/linkage.h66
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/list.h16
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/lockd/nlm.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/lockd/xdr.h73
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/lockdep.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/loop.h77
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/magic.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/major.h175
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mc146818rtc.h79
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mca.h74
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mempolicy.h32
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mempool.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/miscdevice.h57
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mm.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mmc/card.h100
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mmc/host.h120
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mmc/mmc.h99
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mmzone.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mod_devicetable.h209
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/module.h114
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/moduleparam.h101
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mount.h14
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/msdos_fs.h180
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/msg.h68
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/msm_adsp.h57
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/msm_audio.h85
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/msm_mdp.h83
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mt9t013.h111
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/bbm.h75
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/blktrans.h63
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi.h187
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi_endian.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/compatmac.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/flashchip.h68
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/map.h102
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/mtd.h153
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand.h319
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand_ecc.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/nftl.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/onenand_regs.h143
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtd/partitions.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mtio.h259
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mutex-debug.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/mutex.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ncp.h193
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ncp_mount.h69
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ncp_no.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/net.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netdevice.h69
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter.h36
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h114
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h27
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h37
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h36
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink.h84
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h146
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/x_tables.h125
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_comment.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_connbytes.h36
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_conntrack.h66
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_dccp.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_esp.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_helper.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_length.h20
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_limit.h27
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_mac.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_multiport.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_physdev.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_pkttype.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_quota.h27
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_realm.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_sctp.h68
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_state.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_statistic.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_string.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h20
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h159
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_bridge.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4.h73
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h81
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h65
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h180
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h20
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h48
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h66
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6.h67
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h178
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/netlink.h119
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfs.h124
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfs2.h75
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfs3.h108
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfs4.h99
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfs_xdr.h556
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsacl.h32
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/auth.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/const.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/debug.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/export.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/interface.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/nfsfh.h62
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/stats.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nfsd/xdr.h141
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/node.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nodemask.h89
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/notifier.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/numa.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/nvram.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/omap_csmi.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pagemap.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/param.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/patchkey.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pci.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pci_ids.h2270
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pci_regs.h422
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/percpu.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/percpu_counter.h25
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/personality.h83
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pfkeyv2.h306
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pkt_cls.h372
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pkt_sched.h405
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/platform_device.h39
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/plist.h44
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pm.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/pnp.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/poll.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/posix_acl.h47
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/posix_types.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ppdev.h71
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ppp_defs.h121
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/prctl.h61
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/preempt.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/proc_fs.h77
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ptrace.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/qic117.h123
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/qnxtypes.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/quota.h87
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/raid/md.h49
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/raid/md_k.h184
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/raid/md_p.h135
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/raid/md_u.h104
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/raid/xor.h32
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/random.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/rbtree.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/rcupdate.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/reboot.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/relay.h91
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/resource.h60
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/route.h49
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/rtc.h72
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/rtnetlink.h723
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/rwsem.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sched.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sem.h82
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/seq_file.h14
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/seqlock.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/serial_core.h95
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/serial_reg.h249
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/serio.h60
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/shm.h74
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/signal.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/skbuff.h164
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/slab.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/smb.h61
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/smp.h26
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/smp_lock.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/socket.h227
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sockios.h107
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/soundcard.h831
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock.h112
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_smp.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_up.h69
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types_up.h29
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/spinlock_up.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/stacktrace.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/stat.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/statfs.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/stddef.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/string.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/stringify.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth_gss.h16
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/clnt.h103
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/debug.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_api.h16
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_asn1.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_err.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/msg_prot.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/sched.h182
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/stats.h49
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svc.h82
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svcauth.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/timer.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/types.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xdr.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xprt.h172
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/swap.h39
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sysctl.h824
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sysdev.h60
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/sysfs.h76
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/taskstats.h72
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/taskstats_kern.h19
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/tcp.h147
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/telephony.h172
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/termios.h18
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/textsearch.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/thread_info.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/threads.h23
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/time.h69
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/timer.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/times.h24
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/timex.h108
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/tiocl.h47
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/transport_class.h48
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/tty.h15
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/types.h37
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/udp.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_i.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_sb.h35
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/uio.h27
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/un.h22
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/unistd.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/usb.h21
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/usb_ch9.h388
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/usbdevice_fs.h123
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/user.h12
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/utime.h20
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/utsname.h44
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/version.h13
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/vfs.h17
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/videodev.h327
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/videodev2.h963
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/vmalloc.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/vt.h68
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/vt_buffer.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/wait.h30
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/wanrouter.h356
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/wireless.h542
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/workqueue.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/xattr.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/zconf.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/zlib.h80
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/linux/zorro_ids.h549
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/locale.h61
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/malloc.h104
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/math.h486
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/memory.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/mntent.h53
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/mtd/mtd-abi.h133
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/mtd/mtd-user.h25
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/ethertypes.h313
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_arp.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_dl.h87
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_ether.h217
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_ieee1394.h127
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_packet.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/if_types.h267
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/net/route.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netdb.h256
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/ether.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/if_ether.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/in.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/in6.h106
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/in_systm.h59
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/ip.h275
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/ip_icmp.h214
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/tcp.h34
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netinet/udp.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/netpacket/packet.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/nsswitch.h237
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/pathconf.h64
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/paths.h74
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/poll.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/pthread.h243
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/pwd.h127
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/resolv.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sched.h56
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/semaphore.h58
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/setjmp.h63
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sgtty.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sha1.h31
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/signal.h125
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/stdint.h276
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/stdio.h442
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/stdlib.h185
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/string.h90
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/strings.h58
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/_errdefs.h172
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/_sigdefs.h65
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/_system_properties.h108
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/_types.h77
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/atomics.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/cdefs.h507
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/cdefs_elf.h152
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/dirent.h49
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/endian.h273
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/epoll.h72
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/errno.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/exec_elf.h625
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/file.h38
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/fsuid.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/inotify.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ioctl.h43
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ioctl_compat.h168
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ipc.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/klog.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/limits.h179
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/linux-syscalls.h223
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/linux-unistd.h204
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/mman.h66
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/mount.h102
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/param.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/poll.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/prctl.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ptrace.h45
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/queue.h557
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/reboot.h49
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/resource.h55
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/select.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/sendfile.h40
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/socket.h87
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/socketcalls.h51
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/stat.h108
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/statfs.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/syscall.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/sysconf.h135
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/sysinfo.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/syslimits.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/sysmacros.h52
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/system_properties.h85
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/time.h78
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/timeb.h46
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/times.h41
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ttychars.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/ttydev.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/types.h127
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/uio.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/un.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/utime.h33
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/utsname.h50
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/vfs.h102
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/vt.h28
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/sys/wait.h54
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/syslog.h116
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/termio.h32
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/termios.h113
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/thread_db.h143
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/time.h117
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/time64.h59
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/unistd.h207
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/util.h0
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/utime.h42
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/utmp.h90
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/wchar.h155
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/wctype.h1
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/zconf.h332
-rw-r--r--6/platforms/android-3/arch-x86/usr/include/zlib.h1357
-rw-r--r--6/platforms/android-4/arch-arm/usr/include/GLES/gl.h769
-rw-r--r--6/platforms/android-4/arch-arm/usr/include/GLES/glext.h607
-rw-r--r--6/platforms/android-4/arch-arm/usr/include/GLES/glplatform.h39
-rw-r--r--6/platforms/android-4/arch-arm/usr/include/KHR/khrplatform.h243
l---------6/platforms/android-4/arch-arm/usr/include/alloca.h1
-rw-r--r--6/platforms/android-4/arch-arm/usr/include/android/api-level.h33
l---------6/platforms/android-4/arch-arm/usr/include/android/log.h1
l---------6/platforms/android-4/arch-arm/usr/include/arpa/inet.h1
l---------6/platforms/android-4/arch-arm/usr/include/arpa/nameser.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/bug.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/errno.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/futex.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/local.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/mman.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/poll.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/resource.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/sections.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/signal.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/topology.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm-generic/xor.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/a.out.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/board-perseus2.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/board.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/cpu.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/dma.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/fpga.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio-switch.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/hardware.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/io.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/irqs.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/mcbsp.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/memory.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/mtd-xip.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/mux.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/omap24xx.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/serial.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/timex.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/arch/vmalloc.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/atomic.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/auxvec.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/bitops.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/byteorder.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/cache.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/cacheflush.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/cputime.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/delay.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/div64.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/dma-mapping.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/dma.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/domain.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/dyntick.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/elf.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/errno.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/fcntl.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/fpstate.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/glue.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/hardirq.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/hardware.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/hw_irq.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/ide.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/io.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/ioctls.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/ipcbuf.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/irq.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/linkage.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/local.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/locks.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/mc146818rtc.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/memory.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/mman.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/module.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/msgbuf.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/mtd-xip.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/page.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/param.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/percpu.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/pgalloc.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/pgtable-hwdef.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/pgtable.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/poll.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/posix_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/proc-fns.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/processor.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/procinfo.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/ptrace.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/resource.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/scatterlist.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/semaphore.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/sembuf.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/shmbuf.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/shmparam.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/sigcontext.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/siginfo.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/signal.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/sizes.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/smp.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/socket.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/sockios.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/spinlock.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/spinlock_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/stat.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/statfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/suspend.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/system.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/termbits.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/termios.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/thread_info.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/timex.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/tlbflush.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/topology.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/types.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/uaccess.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/unaligned.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/unistd.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/user.h1
l---------6/platforms/android-4/arch-arm/usr/include/asm/vga.h1
l---------6/platforms/android-4/arch-arm/usr/include/assert.h1
l---------6/platforms/android-4/arch-arm/usr/include/byteswap.h1
l---------6/platforms/android-4/arch-arm/usr/include/ctype.h1
l---------6/platforms/android-4/arch-arm/usr/include/dirent.h1
l---------6/platforms/android-4/arch-arm/usr/include/dlfcn.h1
l---------6/platforms/android-4/arch-arm/usr/include/elf.h1
l---------6/platforms/android-4/arch-arm/usr/include/endian.h1
l---------6/platforms/android-4/arch-arm/usr/include/err.h1
l---------6/platforms/android-4/arch-arm/usr/include/errno.h1
l---------6/platforms/android-4/arch-arm/usr/include/fcntl.h1
l---------6/platforms/android-4/arch-arm/usr/include/features.h1
l---------6/platforms/android-4/arch-arm/usr/include/fenv.h1
l---------6/platforms/android-4/arch-arm/usr/include/fnmatch.h1
l---------6/platforms/android-4/arch-arm/usr/include/getopt.h1
l---------6/platforms/android-4/arch-arm/usr/include/grp.h1
l---------6/platforms/android-4/arch-arm/usr/include/inttypes.h1
l---------6/platforms/android-4/arch-arm/usr/include/jni.h1
l---------6/platforms/android-4/arch-arm/usr/include/lastlog.h1
l---------6/platforms/android-4/arch-arm/usr/include/libgen.h1
l---------6/platforms/android-4/arch-arm/usr/include/limits.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/a.out.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/aio_abi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/akm8976.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/android_alarm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/android_pmem.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/android_power.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/apm_bios.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ashmem.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ata.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atmapi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atmdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atmioc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atmppp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/atmsap.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/attribute_container.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/auto_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/autoconf.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/auxvec.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/backing-dev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/binder.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/binfmts.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/bio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/bitmap.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/bitops.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/blkdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/blkpg.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/cache.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/calc64.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/capability.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/capi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/cdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/cdrom.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/circ_buf.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/clk.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/coda.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/compat.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/compiler.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/completion.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/config.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/console_struct.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/cpu.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/cpumask.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ctype.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/dccp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/debug_locks.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/delay.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/device.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/dirent.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/dmaengine.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/efs_dir.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/elevator.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/elf-em.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/elf.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/err.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/errno.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/errqueue.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/etherdevice.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/fadvise.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/fb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/fcntl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/fd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/file.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/filter.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ftape.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/futex.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/genhd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/gfp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/hardirq.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/hdreg.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/hdsmart.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/highmem.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/hil.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/i2c.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/icmp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_arp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_bridge.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_ether.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_fc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_fddi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_hippi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_packet.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_ppp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_tr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_tun.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/if_vlan.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/in.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/in6.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/init.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/inotify.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/input.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/interrupt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ioport.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ioprio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ip.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ipc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ipx.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/irq.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/irqflags.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/irqreturn.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/jbd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/jiffies.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kdev_t.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kernel.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kexec.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/key.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/keyboard.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/keychord.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/klist.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kmod.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kobject.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/kref.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ktime.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/limits.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/linkage.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/list.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/lockdep.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/loop.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/magic.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/major.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mca.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mempolicy.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mempool.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/miscdevice.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mmc/card.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mmc/host.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mmzone.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/module.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/moduleparam.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mount.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/msg.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/msm_audio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mt9t013.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/map.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mtio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/mutex.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ncp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ncp_no.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/net.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netdevice.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/netlink.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfs2.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfs3.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfs4.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsacl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/node.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nodemask.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/notifier.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/numa.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/nvram.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pagemap.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/param.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/patchkey.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pci.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pci_ids.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pci_regs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/percpu.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/personality.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/platform_device.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/plist.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/pnp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/poll.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/posix_acl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/posix_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ppdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/prctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/preempt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/proc_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ptrace.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/qic117.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/quota.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/raid/md.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/raid/xor.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/random.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/rbtree.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/rcupdate.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/reboot.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/relay.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/resource.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/route.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/rtc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/rwsem.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sched.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sem.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/seq_file.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/seqlock.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/serial_core.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/serial_reg.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/serio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/shm.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/signal.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/skbuff.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/slab.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/smb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/smp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/smp_lock.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/socket.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sockios.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/soundcard.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/stacktrace.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/stat.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/statfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/stddef.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/string.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/stringify.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/swap.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sysctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sysdev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/sysfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/taskstats.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/tcp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/telephony.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/termios.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/textsearch.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/thread_info.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/threads.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/time.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/timer.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/times.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/timex.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/tiocl.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/transport_class.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/tty.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/types.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/udp.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/uio.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/un.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/unistd.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/usb.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/user.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/utime.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/utsname.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/version.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/vfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/videodev.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/videodev2.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/vmalloc.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/vt.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/wait.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/wanrouter.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/wireless.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/workqueue.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/xattr.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/zconf.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/zlib.h1
l---------6/platforms/android-4/arch-arm/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-4/arch-arm/usr/include/locale.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/asm.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/cdefs.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/cpu-features.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/exec.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/ieee.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/internal_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/kernel.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/limits.h1
l---------6/platforms/android-4/arch-arm/usr/include/machine/setjmp.h1
l---------6/platforms/android-4/arch-arm/usr/include/malloc.h1
l---------6/platforms/android-4/arch-arm/usr/include/math.h1
l---------6/platforms/android-4/arch-arm/usr/include/memory.h1
l---------6/platforms/android-4/arch-arm/usr/include/mntent.h1
l---------6/platforms/android-4/arch-arm/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-4/arch-arm/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/ethertypes.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_arp.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_dl.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_ether.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_packet.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/if_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/net/route.h1
l---------6/platforms/android-4/arch-arm/usr/include/netdb.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/ether.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/if_ether.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/in.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/in6.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/in_systm.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/ip.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/tcp.h1
l---------6/platforms/android-4/arch-arm/usr/include/netinet/udp.h1
l---------6/platforms/android-4/arch-arm/usr/include/netpacket/packet.h1
l---------6/platforms/android-4/arch-arm/usr/include/nsswitch.h1
l---------6/platforms/android-4/arch-arm/usr/include/pathconf.h1
l---------6/platforms/android-4/arch-arm/usr/include/paths.h1
l---------6/platforms/android-4/arch-arm/usr/include/poll.h1
l---------6/platforms/android-4/arch-arm/usr/include/pthread.h1
l---------6/platforms/android-4/arch-arm/usr/include/pwd.h1
l---------6/platforms/android-4/arch-arm/usr/include/resolv.h1
l---------6/platforms/android-4/arch-arm/usr/include/sched.h1
l---------6/platforms/android-4/arch-arm/usr/include/semaphore.h1
l---------6/platforms/android-4/arch-arm/usr/include/setjmp.h1
l---------6/platforms/android-4/arch-arm/usr/include/sgtty.h1
l---------6/platforms/android-4/arch-arm/usr/include/sha1.h1
l---------6/platforms/android-4/arch-arm/usr/include/signal.h1
l---------6/platforms/android-4/arch-arm/usr/include/stdint.h1
l---------6/platforms/android-4/arch-arm/usr/include/stdio.h1
l---------6/platforms/android-4/arch-arm/usr/include/stdlib.h1
l---------6/platforms/android-4/arch-arm/usr/include/string.h1
l---------6/platforms/android-4/arch-arm/usr/include/strings.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/_errdefs.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/_system_properties.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/_types.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/atomics.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/cdefs.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/dirent.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/endian.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/epoll.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/errno.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/exec_elf.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/file.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/fsuid.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/inotify.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ioctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ipc.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/klog.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/limits.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/mman.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/mount.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/param.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/poll.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/prctl.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ptrace.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/queue.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/reboot.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/resource.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/select.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/sendfile.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/socket.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/socketcalls.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/stat.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/statfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/syscall.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/sysconf.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/sysinfo.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/syslimits.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/sysmacros.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/system_properties.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/time.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/timeb.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/times.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ttychars.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/ttydev.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/types.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/uio.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/un.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/utime.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/utsname.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/vfs.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/vt.h1
l---------6/platforms/android-4/arch-arm/usr/include/sys/wait.h1
l---------6/platforms/android-4/arch-arm/usr/include/syslog.h1
l---------6/platforms/android-4/arch-arm/usr/include/termio.h1
l---------6/platforms/android-4/arch-arm/usr/include/termios.h1
l---------6/platforms/android-4/arch-arm/usr/include/thread_db.h1
l---------6/platforms/android-4/arch-arm/usr/include/time.h1
l---------6/platforms/android-4/arch-arm/usr/include/time64.h1
l---------6/platforms/android-4/arch-arm/usr/include/unistd.h1
l---------6/platforms/android-4/arch-arm/usr/include/util.h1
l---------6/platforms/android-4/arch-arm/usr/include/utime.h1
l---------6/platforms/android-4/arch-arm/usr/include/utmp.h1
l---------6/platforms/android-4/arch-arm/usr/include/wchar.h1
l---------6/platforms/android-4/arch-arm/usr/include/wctype.h1
l---------6/platforms/android-4/arch-arm/usr/include/zconf.h1
l---------6/platforms/android-4/arch-arm/usr/include/zlib.h1
l---------6/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o1
l---------6/platforms/android-4/arch-arm/usr/lib/crtbegin_so.o1
l---------6/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o1
l---------6/platforms/android-4/arch-arm/usr/lib/crtend_android.o1
l---------6/platforms/android-4/arch-arm/usr/lib/crtend_so.o1
-rw-r--r--6/platforms/android-4/arch-arm/usr/lib/libGLESv1_CM.sobin0 -> 79588 bytes
l---------6/platforms/android-4/arch-arm/usr/lib/libc.a1
l---------6/platforms/android-4/arch-arm/usr/lib/libc.so1
l---------6/platforms/android-4/arch-arm/usr/lib/libdl.so1
l---------6/platforms/android-4/arch-arm/usr/lib/liblog.so1
l---------6/platforms/android-4/arch-arm/usr/lib/libm.a1
l---------6/platforms/android-4/arch-arm/usr/lib/libm.so1
l---------6/platforms/android-4/arch-arm/usr/lib/libstdc++.a1
l---------6/platforms/android-4/arch-arm/usr/lib/libstdc++.so1
l---------6/platforms/android-4/arch-arm/usr/lib/libthread_db.a1
l---------6/platforms/android-4/arch-arm/usr/lib/libthread_db.so1
l---------6/platforms/android-4/arch-arm/usr/lib/libz.so1
-rw-r--r--6/platforms/android-4/arch-x86/usr/include/GLES/gl.h769
-rw-r--r--6/platforms/android-4/arch-x86/usr/include/GLES/glext.h607
-rw-r--r--6/platforms/android-4/arch-x86/usr/include/GLES/glplatform.h39
-rw-r--r--6/platforms/android-4/arch-x86/usr/include/KHR/khrplatform.h243
l---------6/platforms/android-4/arch-x86/usr/include/alloca.h1
-rw-r--r--6/platforms/android-4/arch-x86/usr/include/android/api-level.h33
l---------6/platforms/android-4/arch-x86/usr/include/android/log.h1
l---------6/platforms/android-4/arch-x86/usr/include/arpa/inet.h1
l---------6/platforms/android-4/arch-x86/usr/include/arpa/nameser.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/bug.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/errno.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/futex.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/local.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/mman.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/poll.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/resource.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/sections.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/signal.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/topology.h1
l---------6/platforms/android-4/arch-x86/usr/include/asm-generic/xor.h1
l---------6/platforms/android-4/arch-x86/usr/include/assert.h1
l---------6/platforms/android-4/arch-x86/usr/include/byteswap.h1
l---------6/platforms/android-4/arch-x86/usr/include/ctype.h1
l---------6/platforms/android-4/arch-x86/usr/include/dirent.h1
l---------6/platforms/android-4/arch-x86/usr/include/dlfcn.h1
l---------6/platforms/android-4/arch-x86/usr/include/elf.h1
l---------6/platforms/android-4/arch-x86/usr/include/endian.h1
l---------6/platforms/android-4/arch-x86/usr/include/err.h1
l---------6/platforms/android-4/arch-x86/usr/include/errno.h1
l---------6/platforms/android-4/arch-x86/usr/include/fcntl.h1
l---------6/platforms/android-4/arch-x86/usr/include/features.h1
l---------6/platforms/android-4/arch-x86/usr/include/fnmatch.h1
l---------6/platforms/android-4/arch-x86/usr/include/getopt.h1
l---------6/platforms/android-4/arch-x86/usr/include/grp.h1
l---------6/platforms/android-4/arch-x86/usr/include/inttypes.h1
l---------6/platforms/android-4/arch-x86/usr/include/jni.h1
l---------6/platforms/android-4/arch-x86/usr/include/lastlog.h1
l---------6/platforms/android-4/arch-x86/usr/include/libgen.h1
l---------6/platforms/android-4/arch-x86/usr/include/limits.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/a.out.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/aio_abi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/akm8976.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/android_alarm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/android_pmem.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/android_power.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/apm_bios.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ashmem.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ata.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atmapi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atmdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atmioc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atmppp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/atmsap.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/attribute_container.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/auto_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/autoconf.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/auxvec.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/backing-dev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/binder.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/binfmts.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/bio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/bitmap.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/bitops.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/blkdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/blkpg.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/cache.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/calc64.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/capability.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/capi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/cdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/cdrom.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/circ_buf.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/clk.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/coda.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/compat.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/compiler.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/completion.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/config.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/console_struct.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/cpu.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/cpumask.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ctype.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/dccp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/debug_locks.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/delay.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/device.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/dirent.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/dmaengine.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/efs_dir.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/elevator.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/elf-em.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/elf.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/err.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/errno.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/errqueue.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/etherdevice.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/fadvise.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/fb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/fcntl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/fd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/file.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/filter.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ftape.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/futex.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/genhd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/gfp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/hardirq.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/hdreg.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/hdsmart.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/highmem.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/hil.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/i2c.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/icmp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_arp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_bridge.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_ether.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_fc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_fddi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_hippi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_packet.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_ppp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_tr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_tun.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/if_vlan.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/in.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/in6.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/init.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/inotify.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/input.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/interrupt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ioctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ioport.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ioprio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ip.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ipc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ipx.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/irq.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/irqflags.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/irqreturn.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/jbd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/jiffies.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kdev_t.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kernel.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kexec.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/key.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/keyboard.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/keychord.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/klist.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kmod.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kobject.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/kref.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ktime.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/limits.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/linkage.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/list.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/lockdep.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/loop.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/magic.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/major.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mca.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mempolicy.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mempool.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/miscdevice.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mmc/card.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mmc/host.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mmzone.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/module.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/moduleparam.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mount.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/msg.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/msm_audio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mt9t013.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/map.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mtio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/mutex.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ncp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ncp_no.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/net.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netdevice.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/netlink.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfs2.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfs3.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfs4.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsacl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/node.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nodemask.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/notifier.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/numa.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/nvram.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pagemap.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/param.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/patchkey.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pci.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pci_ids.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pci_regs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/percpu.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/personality.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/platform_device.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/plist.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/pnp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/poll.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/posix_acl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/posix_types.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ppdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/prctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/preempt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/proc_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ptrace.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/qic117.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/quota.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/raid/md.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/raid/xor.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/random.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/rbtree.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/rcupdate.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/reboot.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/relay.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/resource.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/route.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/rtc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/rwsem.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sched.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sem.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/seq_file.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/seqlock.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/serial_core.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/serial_reg.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/serio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/shm.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/signal.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/skbuff.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/slab.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/smb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/smp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/smp_lock.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/socket.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sockios.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/soundcard.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/stacktrace.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/stat.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/statfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/stddef.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/string.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/stringify.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/swap.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sysctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sysdev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/sysfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/taskstats.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/tcp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/telephony.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/termios.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/textsearch.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/thread_info.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/threads.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/time.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/timer.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/times.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/timex.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/tiocl.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/transport_class.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/tty.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/types.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/udp.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/uio.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/un.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/unistd.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/usb.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/user.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/utime.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/utsname.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/version.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/vfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/videodev.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/videodev2.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/vmalloc.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/vt.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/wait.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/wanrouter.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/wireless.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/workqueue.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/xattr.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/zconf.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/zlib.h1
l---------6/platforms/android-4/arch-x86/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-4/arch-x86/usr/include/locale.h1
l---------6/platforms/android-4/arch-x86/usr/include/malloc.h1
l---------6/platforms/android-4/arch-x86/usr/include/math.h1
l---------6/platforms/android-4/arch-x86/usr/include/memory.h1
l---------6/platforms/android-4/arch-x86/usr/include/mntent.h1
l---------6/platforms/android-4/arch-x86/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-4/arch-x86/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/ethertypes.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_arp.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_dl.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_ether.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_packet.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/if_types.h1
l---------6/platforms/android-4/arch-x86/usr/include/net/route.h1
l---------6/platforms/android-4/arch-x86/usr/include/netdb.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/ether.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/if_ether.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/in.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/in6.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/in_systm.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/ip.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/tcp.h1
l---------6/platforms/android-4/arch-x86/usr/include/netinet/udp.h1
l---------6/platforms/android-4/arch-x86/usr/include/netpacket/packet.h1
l---------6/platforms/android-4/arch-x86/usr/include/nsswitch.h1
l---------6/platforms/android-4/arch-x86/usr/include/pathconf.h1
l---------6/platforms/android-4/arch-x86/usr/include/paths.h1
l---------6/platforms/android-4/arch-x86/usr/include/poll.h1
l---------6/platforms/android-4/arch-x86/usr/include/pthread.h1
l---------6/platforms/android-4/arch-x86/usr/include/pwd.h1
l---------6/platforms/android-4/arch-x86/usr/include/resolv.h1
l---------6/platforms/android-4/arch-x86/usr/include/sched.h1
l---------6/platforms/android-4/arch-x86/usr/include/semaphore.h1
l---------6/platforms/android-4/arch-x86/usr/include/setjmp.h1
l---------6/platforms/android-4/arch-x86/usr/include/sgtty.h1
l---------6/platforms/android-4/arch-x86/usr/include/sha1.h1
l---------6/platforms/android-4/arch-x86/usr/include/signal.h1
l---------6/platforms/android-4/arch-x86/usr/include/stdint.h1
l---------6/platforms/android-4/arch-x86/usr/include/stdio.h1
l---------6/platforms/android-4/arch-x86/usr/include/stdlib.h1
l---------6/platforms/android-4/arch-x86/usr/include/string.h1
l---------6/platforms/android-4/arch-x86/usr/include/strings.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/_errdefs.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/_system_properties.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/_types.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/atomics.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/cdefs.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/dirent.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/endian.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/epoll.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/errno.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/exec_elf.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/file.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/fsuid.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/inotify.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ioctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ipc.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/klog.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/limits.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/mman.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/mount.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/param.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/poll.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/prctl.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ptrace.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/queue.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/reboot.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/resource.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/select.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/sendfile.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/socket.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/socketcalls.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/stat.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/statfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/syscall.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/sysconf.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/sysinfo.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/syslimits.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/sysmacros.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/system_properties.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/time.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/timeb.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/times.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ttychars.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/ttydev.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/types.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/uio.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/un.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/utime.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/utsname.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/vfs.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/vt.h1
l---------6/platforms/android-4/arch-x86/usr/include/sys/wait.h1
l---------6/platforms/android-4/arch-x86/usr/include/syslog.h1
l---------6/platforms/android-4/arch-x86/usr/include/termio.h1
l---------6/platforms/android-4/arch-x86/usr/include/termios.h1
l---------6/platforms/android-4/arch-x86/usr/include/thread_db.h1
l---------6/platforms/android-4/arch-x86/usr/include/time.h1
l---------6/platforms/android-4/arch-x86/usr/include/time64.h1
l---------6/platforms/android-4/arch-x86/usr/include/unistd.h1
l---------6/platforms/android-4/arch-x86/usr/include/util.h1
l---------6/platforms/android-4/arch-x86/usr/include/utime.h1
l---------6/platforms/android-4/arch-x86/usr/include/utmp.h1
l---------6/platforms/android-4/arch-x86/usr/include/wchar.h1
l---------6/platforms/android-4/arch-x86/usr/include/wctype.h1
l---------6/platforms/android-4/arch-x86/usr/include/zconf.h1
l---------6/platforms/android-4/arch-x86/usr/include/zlib.h1
l---------6/platforms/android-5/arch-arm/usr/include/GLES/gl.h1
l---------6/platforms/android-5/arch-arm/usr/include/GLES/glext.h1
l---------6/platforms/android-5/arch-arm/usr/include/GLES/glplatform.h1
-rw-r--r--6/platforms/android-5/arch-arm/usr/include/GLES2/gl2.h620
-rw-r--r--6/platforms/android-5/arch-arm/usr/include/GLES2/gl2ext.h518
-rw-r--r--6/platforms/android-5/arch-arm/usr/include/GLES2/gl2platform.h29
l---------6/platforms/android-5/arch-arm/usr/include/KHR/khrplatform.h1
l---------6/platforms/android-5/arch-arm/usr/include/alloca.h1
-rw-r--r--6/platforms/android-5/arch-arm/usr/include/android/api-level.h33
l---------6/platforms/android-5/arch-arm/usr/include/android/log.h1
l---------6/platforms/android-5/arch-arm/usr/include/arpa/inet.h1
l---------6/platforms/android-5/arch-arm/usr/include/arpa/nameser.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/bug.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/errno.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/futex.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/local.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/mman.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/poll.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/resource.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/sections.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/signal.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/topology.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm-generic/xor.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/a.out.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/board-perseus2.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/board.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/cpu.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/dma.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/fpga.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio-switch.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/hardware.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/io.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/irqs.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/mcbsp.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/memory.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/mtd-xip.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/mux.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/omap24xx.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/serial.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/timex.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/arch/vmalloc.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/atomic.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/auxvec.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/bitops.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/byteorder.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/cache.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/cacheflush.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/cputime.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/delay.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/div64.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/dma-mapping.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/dma.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/domain.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/dyntick.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/elf.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/errno.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/fcntl.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/fpstate.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/glue.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/hardirq.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/hardware.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/hw_irq.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/ide.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/io.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/ioctls.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/ipcbuf.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/irq.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/linkage.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/local.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/locks.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/mc146818rtc.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/memory.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/mman.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/module.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/msgbuf.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/mtd-xip.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/page.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/param.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/percpu.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/pgalloc.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/pgtable-hwdef.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/pgtable.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/poll.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/posix_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/proc-fns.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/processor.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/procinfo.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/ptrace.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/resource.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/scatterlist.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/semaphore.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/sembuf.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/shmbuf.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/shmparam.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/sigcontext.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/siginfo.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/signal.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/sizes.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/smp.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/socket.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/sockios.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/spinlock.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/spinlock_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/stat.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/statfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/suspend.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/system.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/termbits.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/termios.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/thread_info.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/timex.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/tlbflush.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/topology.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/types.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/uaccess.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/unaligned.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/unistd.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/user.h1
l---------6/platforms/android-5/arch-arm/usr/include/asm/vga.h1
l---------6/platforms/android-5/arch-arm/usr/include/assert.h1
l---------6/platforms/android-5/arch-arm/usr/include/byteswap.h1
l---------6/platforms/android-5/arch-arm/usr/include/ctype.h1
l---------6/platforms/android-5/arch-arm/usr/include/dirent.h1
l---------6/platforms/android-5/arch-arm/usr/include/dlfcn.h1
l---------6/platforms/android-5/arch-arm/usr/include/elf.h1
l---------6/platforms/android-5/arch-arm/usr/include/endian.h1
l---------6/platforms/android-5/arch-arm/usr/include/err.h1
l---------6/platforms/android-5/arch-arm/usr/include/errno.h1
l---------6/platforms/android-5/arch-arm/usr/include/fcntl.h1
l---------6/platforms/android-5/arch-arm/usr/include/features.h1
l---------6/platforms/android-5/arch-arm/usr/include/fenv.h1
l---------6/platforms/android-5/arch-arm/usr/include/fnmatch.h1
l---------6/platforms/android-5/arch-arm/usr/include/getopt.h1
l---------6/platforms/android-5/arch-arm/usr/include/grp.h1
l---------6/platforms/android-5/arch-arm/usr/include/inttypes.h1
l---------6/platforms/android-5/arch-arm/usr/include/jni.h1
l---------6/platforms/android-5/arch-arm/usr/include/lastlog.h1
l---------6/platforms/android-5/arch-arm/usr/include/libgen.h1
l---------6/platforms/android-5/arch-arm/usr/include/limits.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/a.out.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/aio_abi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/akm8976.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/android_alarm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/android_pmem.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/android_power.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/apm_bios.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ashmem.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ata.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atmapi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atmdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atmioc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atmppp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/atmsap.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/attribute_container.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/auto_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/autoconf.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/auxvec.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/backing-dev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/binder.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/binfmts.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/bio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/bitmap.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/bitops.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/blkdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/blkpg.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/cache.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/calc64.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/capability.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/capi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/cdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/cdrom.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/circ_buf.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/clk.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/coda.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/compat.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/compiler.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/completion.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/config.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/console_struct.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/cpu.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/cpumask.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ctype.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/dccp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/debug_locks.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/delay.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/device.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/dirent.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/dmaengine.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/efs_dir.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/elevator.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/elf-em.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/elf.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/err.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/errno.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/errqueue.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/etherdevice.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/fadvise.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/fb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/fcntl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/fd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/file.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/filter.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ftape.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/futex.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/genhd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/gfp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/hardirq.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/hdreg.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/hdsmart.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/highmem.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/hil.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/i2c.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/icmp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_arp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_bridge.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_ether.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_fc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_fddi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_hippi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_packet.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_ppp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_tr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_tun.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/if_vlan.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/in.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/in6.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/init.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/inotify.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/input.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/interrupt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ioport.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ioprio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ip.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ipc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ipx.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/irq.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/irqflags.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/irqreturn.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/jbd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/jiffies.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kdev_t.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kernel.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kexec.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/key.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/keyboard.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/keychord.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/klist.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kmod.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kobject.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/kref.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ktime.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/limits.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/linkage.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/list.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/lockdep.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/loop.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/magic.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/major.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mca.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mempolicy.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mempool.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/miscdevice.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mmc/card.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mmc/host.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mmzone.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/module.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/moduleparam.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mount.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/msg.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/msm_audio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mt9t013.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/map.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mtio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/mutex.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ncp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ncp_no.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/net.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netdevice.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/netlink.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfs2.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfs3.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfs4.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsacl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/node.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nodemask.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/notifier.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/numa.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/nvram.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pagemap.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/param.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/patchkey.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pci.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pci_ids.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pci_regs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/percpu.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/personality.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/platform_device.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/plist.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/pnp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/poll.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/posix_acl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/posix_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ppdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/prctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/preempt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/proc_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ptrace.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/qic117.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/quota.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/raid/md.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/raid/xor.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/random.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/rbtree.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/rcupdate.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/reboot.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/relay.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/resource.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/route.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/rtc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/rwsem.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sched.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sem.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/seq_file.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/seqlock.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/serial_core.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/serial_reg.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/serio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/shm.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/signal.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/skbuff.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/slab.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/smb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/smp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/smp_lock.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/socket.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sockios.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/soundcard.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/stacktrace.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/stat.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/statfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/stddef.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/string.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/stringify.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/swap.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sysctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sysdev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/sysfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/taskstats.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/tcp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/telephony.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/termios.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/textsearch.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/thread_info.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/threads.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/time.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/timer.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/times.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/timex.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/tiocl.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/transport_class.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/tty.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/types.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/udp.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/uio.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/un.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/unistd.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/usb.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/user.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/utime.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/utsname.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/version.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/vfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/videodev.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/videodev2.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/vmalloc.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/vt.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/wait.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/wanrouter.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/wireless.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/workqueue.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/xattr.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/zconf.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/zlib.h1
l---------6/platforms/android-5/arch-arm/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-5/arch-arm/usr/include/locale.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/asm.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/cdefs.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/cpu-features.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/exec.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/ieee.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/internal_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/kernel.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/limits.h1
l---------6/platforms/android-5/arch-arm/usr/include/machine/setjmp.h1
l---------6/platforms/android-5/arch-arm/usr/include/malloc.h1
l---------6/platforms/android-5/arch-arm/usr/include/math.h1
l---------6/platforms/android-5/arch-arm/usr/include/memory.h1
l---------6/platforms/android-5/arch-arm/usr/include/mntent.h1
l---------6/platforms/android-5/arch-arm/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-5/arch-arm/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/ethertypes.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_arp.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_dl.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_ether.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_packet.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/if_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/net/route.h1
l---------6/platforms/android-5/arch-arm/usr/include/netdb.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/ether.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/if_ether.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/in.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/in6.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/in_systm.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/ip.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/tcp.h1
l---------6/platforms/android-5/arch-arm/usr/include/netinet/udp.h1
l---------6/platforms/android-5/arch-arm/usr/include/netpacket/packet.h1
l---------6/platforms/android-5/arch-arm/usr/include/nsswitch.h1
l---------6/platforms/android-5/arch-arm/usr/include/pathconf.h1
l---------6/platforms/android-5/arch-arm/usr/include/paths.h1
l---------6/platforms/android-5/arch-arm/usr/include/poll.h1
-rw-r--r--6/platforms/android-5/arch-arm/usr/include/pthread.h270
l---------6/platforms/android-5/arch-arm/usr/include/pwd.h1
l---------6/platforms/android-5/arch-arm/usr/include/resolv.h1
l---------6/platforms/android-5/arch-arm/usr/include/sched.h1
l---------6/platforms/android-5/arch-arm/usr/include/semaphore.h1
l---------6/platforms/android-5/arch-arm/usr/include/setjmp.h1
l---------6/platforms/android-5/arch-arm/usr/include/sgtty.h1
l---------6/platforms/android-5/arch-arm/usr/include/sha1.h1
l---------6/platforms/android-5/arch-arm/usr/include/signal.h1
l---------6/platforms/android-5/arch-arm/usr/include/stdint.h1
l---------6/platforms/android-5/arch-arm/usr/include/stdio.h1
l---------6/platforms/android-5/arch-arm/usr/include/stdlib.h1
l---------6/platforms/android-5/arch-arm/usr/include/string.h1
l---------6/platforms/android-5/arch-arm/usr/include/strings.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/_errdefs.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/_system_properties.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/_types.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/atomics.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/cdefs.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/dirent.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/endian.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/epoll.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/errno.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/exec_elf.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/file.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/fsuid.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/inotify.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ioctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ipc.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/klog.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/limits.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/mman.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/mount.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/param.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/poll.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/prctl.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ptrace.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/queue.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/reboot.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/resource.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/select.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/sendfile.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/socket.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/socketcalls.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/stat.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/statfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/syscall.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/sysconf.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/sysinfo.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/syslimits.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/sysmacros.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/system_properties.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/time.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/timeb.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/times.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ttychars.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/ttydev.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/types.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/uio.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/un.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/utime.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/utsname.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/vfs.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/vt.h1
l---------6/platforms/android-5/arch-arm/usr/include/sys/wait.h1
l---------6/platforms/android-5/arch-arm/usr/include/syslog.h1
l---------6/platforms/android-5/arch-arm/usr/include/termio.h1
l---------6/platforms/android-5/arch-arm/usr/include/termios.h1
l---------6/platforms/android-5/arch-arm/usr/include/thread_db.h1
l---------6/platforms/android-5/arch-arm/usr/include/time.h1
l---------6/platforms/android-5/arch-arm/usr/include/time64.h1
l---------6/platforms/android-5/arch-arm/usr/include/unistd.h1
l---------6/platforms/android-5/arch-arm/usr/include/util.h1
l---------6/platforms/android-5/arch-arm/usr/include/utime.h1
l---------6/platforms/android-5/arch-arm/usr/include/utmp.h1
l---------6/platforms/android-5/arch-arm/usr/include/wchar.h1
l---------6/platforms/android-5/arch-arm/usr/include/wctype.h1
l---------6/platforms/android-5/arch-arm/usr/include/zconf.h1
l---------6/platforms/android-5/arch-arm/usr/include/zlib.h1
l---------6/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o1
l---------6/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o1
l---------6/platforms/android-5/arch-arm/usr/lib/crtbegin_static.o1
l---------6/platforms/android-5/arch-arm/usr/lib/crtend_android.o1
l---------6/platforms/android-5/arch-arm/usr/lib/crtend_so.o1
l---------6/platforms/android-5/arch-arm/usr/lib/libGLESv1_CM.so1
-rw-r--r--6/platforms/android-5/arch-arm/usr/lib/libGLESv2.sobin0 -> 74372 bytes
l---------6/platforms/android-5/arch-arm/usr/lib/libc.a1
-rw-r--r--6/platforms/android-5/arch-arm/usr/lib/libc.sobin0 -> 1273496 bytes
l---------6/platforms/android-5/arch-arm/usr/lib/libdl.so1
l---------6/platforms/android-5/arch-arm/usr/lib/liblog.so1
l---------6/platforms/android-5/arch-arm/usr/lib/libm.a1
l---------6/platforms/android-5/arch-arm/usr/lib/libm.so1
l---------6/platforms/android-5/arch-arm/usr/lib/libstdc++.a1
l---------6/platforms/android-5/arch-arm/usr/lib/libstdc++.so1
l---------6/platforms/android-5/arch-arm/usr/lib/libthread_db.a1
l---------6/platforms/android-5/arch-arm/usr/lib/libthread_db.so1
l---------6/platforms/android-5/arch-arm/usr/lib/libz.so1
l---------6/platforms/android-5/arch-x86/usr/include/GLES/gl.h1
l---------6/platforms/android-5/arch-x86/usr/include/GLES/glext.h1
l---------6/platforms/android-5/arch-x86/usr/include/GLES/glplatform.h1
-rw-r--r--6/platforms/android-5/arch-x86/usr/include/GLES2/gl2.h620
-rw-r--r--6/platforms/android-5/arch-x86/usr/include/GLES2/gl2ext.h518
-rw-r--r--6/platforms/android-5/arch-x86/usr/include/GLES2/gl2platform.h29
l---------6/platforms/android-5/arch-x86/usr/include/KHR/khrplatform.h1
l---------6/platforms/android-5/arch-x86/usr/include/alloca.h1
-rw-r--r--6/platforms/android-5/arch-x86/usr/include/android/api-level.h33
l---------6/platforms/android-5/arch-x86/usr/include/android/log.h1
l---------6/platforms/android-5/arch-x86/usr/include/arpa/inet.h1
l---------6/platforms/android-5/arch-x86/usr/include/arpa/nameser.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/bug.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/errno.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/futex.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/local.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/mman.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/poll.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/resource.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/sections.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/signal.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/topology.h1
l---------6/platforms/android-5/arch-x86/usr/include/asm-generic/xor.h1
l---------6/platforms/android-5/arch-x86/usr/include/assert.h1
l---------6/platforms/android-5/arch-x86/usr/include/byteswap.h1
l---------6/platforms/android-5/arch-x86/usr/include/ctype.h1
l---------6/platforms/android-5/arch-x86/usr/include/dirent.h1
l---------6/platforms/android-5/arch-x86/usr/include/dlfcn.h1
l---------6/platforms/android-5/arch-x86/usr/include/elf.h1
l---------6/platforms/android-5/arch-x86/usr/include/endian.h1
l---------6/platforms/android-5/arch-x86/usr/include/err.h1
l---------6/platforms/android-5/arch-x86/usr/include/errno.h1
l---------6/platforms/android-5/arch-x86/usr/include/fcntl.h1
l---------6/platforms/android-5/arch-x86/usr/include/features.h1
l---------6/platforms/android-5/arch-x86/usr/include/fnmatch.h1
l---------6/platforms/android-5/arch-x86/usr/include/getopt.h1
l---------6/platforms/android-5/arch-x86/usr/include/grp.h1
l---------6/platforms/android-5/arch-x86/usr/include/inttypes.h1
l---------6/platforms/android-5/arch-x86/usr/include/jni.h1
l---------6/platforms/android-5/arch-x86/usr/include/lastlog.h1
l---------6/platforms/android-5/arch-x86/usr/include/libgen.h1
l---------6/platforms/android-5/arch-x86/usr/include/limits.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/a.out.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/aio_abi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/akm8976.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/android_alarm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/android_pmem.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/android_power.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/apm_bios.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ashmem.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ata.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atmapi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atmdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atmioc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atmppp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/atmsap.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/attribute_container.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/auto_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/autoconf.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/auxvec.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/backing-dev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/binder.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/binfmts.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/bio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/bitmap.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/bitops.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/blkdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/blkpg.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/cache.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/calc64.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/capability.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/capi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/cdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/cdrom.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/circ_buf.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/clk.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/coda.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/compat.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/compiler.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/completion.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/config.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/console_struct.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/cpu.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/cpumask.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ctype.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/dccp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/debug_locks.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/delay.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/device.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/dirent.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/dmaengine.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/efs_dir.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/elevator.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/elf-em.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/elf.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/err.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/errno.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/errqueue.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/etherdevice.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/fadvise.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/fb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/fcntl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/fd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/file.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/filter.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ftape.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/futex.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/genhd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/gfp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/hardirq.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/hdreg.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/hdsmart.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/highmem.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/hil.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/i2c.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/icmp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_arp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_bridge.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_ether.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_fc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_fddi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_hippi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_packet.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_ppp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_tr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_tun.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/if_vlan.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/in.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/in6.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/init.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/inotify.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/input.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/interrupt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ioctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ioport.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ioprio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ip.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ipc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ipx.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/irq.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/irqflags.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/irqreturn.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/jbd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/jiffies.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kdev_t.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kernel.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kexec.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/key.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/keyboard.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/keychord.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/klist.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kmod.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kobject.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/kref.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ktime.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/limits.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/linkage.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/list.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/lockdep.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/loop.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/magic.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/major.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mca.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mempolicy.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mempool.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/miscdevice.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mmc/card.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mmc/host.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mmzone.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/module.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/moduleparam.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mount.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/msg.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/msm_audio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mt9t013.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/map.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mtio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/mutex.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ncp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ncp_no.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/net.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netdevice.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/netlink.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfs2.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfs3.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfs4.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsacl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/node.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nodemask.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/notifier.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/numa.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/nvram.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pagemap.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/param.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/patchkey.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pci.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pci_ids.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pci_regs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/percpu.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/personality.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/platform_device.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/plist.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/pnp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/poll.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/posix_acl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/posix_types.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ppdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/prctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/preempt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/proc_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ptrace.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/qic117.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/quota.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/raid/md.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/raid/xor.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/random.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/rbtree.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/rcupdate.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/reboot.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/relay.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/resource.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/route.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/rtc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/rwsem.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sched.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sem.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/seq_file.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/seqlock.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/serial_core.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/serial_reg.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/serio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/shm.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/signal.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/skbuff.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/slab.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/smb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/smp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/smp_lock.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/socket.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sockios.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/soundcard.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/stacktrace.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/stat.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/statfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/stddef.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/string.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/stringify.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/swap.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sysctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sysdev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/sysfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/taskstats.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/tcp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/telephony.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/termios.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/textsearch.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/thread_info.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/threads.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/time.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/timer.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/times.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/timex.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/tiocl.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/transport_class.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/tty.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/types.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/udp.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/uio.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/un.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/unistd.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/usb.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/user.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/utime.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/utsname.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/version.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/vfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/videodev.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/videodev2.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/vmalloc.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/vt.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/wait.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/wanrouter.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/wireless.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/workqueue.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/xattr.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/zconf.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/zlib.h1
l---------6/platforms/android-5/arch-x86/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-5/arch-x86/usr/include/locale.h1
l---------6/platforms/android-5/arch-x86/usr/include/malloc.h1
l---------6/platforms/android-5/arch-x86/usr/include/math.h1
l---------6/platforms/android-5/arch-x86/usr/include/memory.h1
l---------6/platforms/android-5/arch-x86/usr/include/mntent.h1
l---------6/platforms/android-5/arch-x86/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-5/arch-x86/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/ethertypes.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_arp.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_dl.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_ether.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_packet.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/if_types.h1
l---------6/platforms/android-5/arch-x86/usr/include/net/route.h1
l---------6/platforms/android-5/arch-x86/usr/include/netdb.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/ether.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/if_ether.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/in.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/in6.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/in_systm.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/ip.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/tcp.h1
l---------6/platforms/android-5/arch-x86/usr/include/netinet/udp.h1
l---------6/platforms/android-5/arch-x86/usr/include/netpacket/packet.h1
l---------6/platforms/android-5/arch-x86/usr/include/nsswitch.h1
l---------6/platforms/android-5/arch-x86/usr/include/pathconf.h1
l---------6/platforms/android-5/arch-x86/usr/include/paths.h1
l---------6/platforms/android-5/arch-x86/usr/include/poll.h1
-rw-r--r--6/platforms/android-5/arch-x86/usr/include/pthread.h270
l---------6/platforms/android-5/arch-x86/usr/include/pwd.h1
l---------6/platforms/android-5/arch-x86/usr/include/resolv.h1
l---------6/platforms/android-5/arch-x86/usr/include/sched.h1
l---------6/platforms/android-5/arch-x86/usr/include/semaphore.h1
l---------6/platforms/android-5/arch-x86/usr/include/setjmp.h1
l---------6/platforms/android-5/arch-x86/usr/include/sgtty.h1
l---------6/platforms/android-5/arch-x86/usr/include/sha1.h1
l---------6/platforms/android-5/arch-x86/usr/include/signal.h1
l---------6/platforms/android-5/arch-x86/usr/include/stdint.h1
l---------6/platforms/android-5/arch-x86/usr/include/stdio.h1
l---------6/platforms/android-5/arch-x86/usr/include/stdlib.h1
l---------6/platforms/android-5/arch-x86/usr/include/string.h1
l---------6/platforms/android-5/arch-x86/usr/include/strings.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/_errdefs.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/_system_properties.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/_types.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/atomics.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/cdefs.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/dirent.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/endian.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/epoll.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/errno.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/exec_elf.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/file.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/fsuid.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/inotify.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ioctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ipc.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/klog.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/limits.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/mman.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/mount.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/param.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/poll.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/prctl.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ptrace.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/queue.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/reboot.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/resource.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/select.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/sendfile.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/socket.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/socketcalls.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/stat.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/statfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/syscall.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/sysconf.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/sysinfo.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/syslimits.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/sysmacros.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/system_properties.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/time.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/timeb.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/times.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ttychars.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/ttydev.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/types.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/uio.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/un.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/utime.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/utsname.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/vfs.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/vt.h1
l---------6/platforms/android-5/arch-x86/usr/include/sys/wait.h1
l---------6/platforms/android-5/arch-x86/usr/include/syslog.h1
l---------6/platforms/android-5/arch-x86/usr/include/termio.h1
l---------6/platforms/android-5/arch-x86/usr/include/termios.h1
l---------6/platforms/android-5/arch-x86/usr/include/thread_db.h1
l---------6/platforms/android-5/arch-x86/usr/include/time.h1
l---------6/platforms/android-5/arch-x86/usr/include/time64.h1
l---------6/platforms/android-5/arch-x86/usr/include/unistd.h1
l---------6/platforms/android-5/arch-x86/usr/include/util.h1
l---------6/platforms/android-5/arch-x86/usr/include/utime.h1
l---------6/platforms/android-5/arch-x86/usr/include/utmp.h1
l---------6/platforms/android-5/arch-x86/usr/include/wchar.h1
l---------6/platforms/android-5/arch-x86/usr/include/wctype.h1
l---------6/platforms/android-5/arch-x86/usr/include/zconf.h1
l---------6/platforms/android-5/arch-x86/usr/include/zlib.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES/gl.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES/glext.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES/glplatform.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES2/gl2.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES2/gl2ext.h1
l---------6/platforms/android-8/arch-arm/usr/include/GLES2/gl2platform.h1
l---------6/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h1
l---------6/platforms/android-8/arch-arm/usr/include/alloca.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/android/bitmap.h79
l---------6/platforms/android-8/arch-arm/usr/include/android/log.h1
l---------6/platforms/android-8/arch-arm/usr/include/arpa/inet.h1
l---------6/platforms/android-8/arch-arm/usr/include/arpa/nameser.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/bug.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/errno.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/futex.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/local.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/mman.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/poll.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/resource.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/sections.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/signal.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/topology.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm-generic/xor.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/a.out.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/board-perseus2.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/board.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/cpu.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/dma.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/fpga.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio-switch.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/hardware.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/io.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/irqs.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/mcbsp.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/memory.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/mtd-xip.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/mux.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/omap24xx.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/serial.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/timex.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/arch/vmalloc.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/atomic.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/auxvec.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/bitops.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/byteorder.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/cache.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/cacheflush.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/cputime.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/delay.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/div64.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/dma-mapping.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/dma.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/domain.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/dyntick.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/elf.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/errno.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/fcntl.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/fpstate.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/glue.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/hardirq.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/hardware.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/hw_irq.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/ide.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/io.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/ioctls.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/ipcbuf.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/irq.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/linkage.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/local.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/locks.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/mc146818rtc.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/memory.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/mman.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/module.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/msgbuf.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/mtd-xip.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/page.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/param.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/percpu.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/pgalloc.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/pgtable-hwdef.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/pgtable.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/poll.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/posix_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/proc-fns.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/processor.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/procinfo.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/ptrace.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/resource.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/scatterlist.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/semaphore.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/sembuf.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/shmbuf.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/shmparam.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/sigcontext.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/siginfo.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/signal.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/sizes.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/smp.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/socket.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/sockios.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/spinlock.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/spinlock_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/stat.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/statfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/suspend.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/system.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/termbits.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/termios.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/thread_info.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/timex.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/tlbflush.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/topology.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/types.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/uaccess.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/unaligned.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/unistd.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/user.h1
l---------6/platforms/android-8/arch-arm/usr/include/asm/vga.h1
l---------6/platforms/android-8/arch-arm/usr/include/assert.h1
l---------6/platforms/android-8/arch-arm/usr/include/byteswap.h1
l---------6/platforms/android-8/arch-arm/usr/include/ctype.h1
l---------6/platforms/android-8/arch-arm/usr/include/dirent.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/dlfcn.h67
l---------6/platforms/android-8/arch-arm/usr/include/elf.h1
l---------6/platforms/android-8/arch-arm/usr/include/endian.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/err.h90
l---------6/platforms/android-8/arch-arm/usr/include/errno.h1
l---------6/platforms/android-8/arch-arm/usr/include/fcntl.h1
l---------6/platforms/android-8/arch-arm/usr/include/features.h1
l---------6/platforms/android-8/arch-arm/usr/include/fenv.h1
l---------6/platforms/android-8/arch-arm/usr/include/fnmatch.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/fts.h125
l---------6/platforms/android-8/arch-arm/usr/include/getopt.h1
l---------6/platforms/android-8/arch-arm/usr/include/grp.h1
l---------6/platforms/android-8/arch-arm/usr/include/inttypes.h1
l---------6/platforms/android-8/arch-arm/usr/include/jni.h1
l---------6/platforms/android-8/arch-arm/usr/include/lastlog.h1
l---------6/platforms/android-8/arch-arm/usr/include/libgen.h1
l---------6/platforms/android-8/arch-arm/usr/include/limits.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/a.out.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/aio_abi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/akm8976.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/android_alarm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/android_pmem.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/android_power.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/apm_bios.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ashmem.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ata.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atmapi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atmdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atmioc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atmppp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/atmsap.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/attribute_container.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/auto_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/autoconf.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/auxvec.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/backing-dev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/binder.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/binfmts.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/bio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/bitmap.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/bitops.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/blkdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/blkpg.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/cache.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/calc64.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/capability.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/capi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/cdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/cdrom.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/circ_buf.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/clk.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/coda.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/compat.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/compiler.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/completion.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/config.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/console_struct.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/cpu.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/cpumask.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ctype.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/dccp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/debug_locks.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/delay.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/device.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/dirent.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/dmaengine.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/efs_dir.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/elevator.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/elf-em.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/elf.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/err.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/errno.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/errqueue.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/etherdevice.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/fadvise.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/fb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/fcntl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/fd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/file.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/filter.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ftape.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/futex.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/genhd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/gfp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/hardirq.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/hdreg.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/hdsmart.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/highmem.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/hil.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/i2c.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/icmp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_arp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_bridge.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_ether.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_fc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_fddi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_hippi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_packet.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_ppp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_tr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_tun.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/if_vlan.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/in.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/in6.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/init.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/inotify.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/input.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/interrupt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ioport.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ioprio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ip.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ipc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ipx.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/irq.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/irqflags.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/irqreturn.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/jbd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/jiffies.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kdev_t.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kernel.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kexec.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/key.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/keyboard.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/keychord.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/klist.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kmod.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kobject.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/kref.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ktime.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/limits.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/linkage.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/list.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/lockdep.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/loop.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/magic.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/major.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mca.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mempolicy.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mempool.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/miscdevice.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mmc/card.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mmc/host.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mmzone.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/module.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/moduleparam.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mount.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/msg.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/msm_audio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mt9t013.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/map.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mtio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/mutex.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ncp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ncp_no.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/net.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netdevice.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/netlink.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfs2.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfs3.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfs4.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsacl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/node.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nodemask.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/notifier.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/numa.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/nvram.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pagemap.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/param.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/patchkey.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pci.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pci_ids.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pci_regs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/percpu.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/personality.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/platform_device.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/plist.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/pnp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/poll.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/posix_acl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/posix_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ppdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/prctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/preempt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/proc_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ptrace.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/qic117.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/quota.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/raid/md.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/raid/xor.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/random.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/rbtree.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/rcupdate.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/reboot.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/relay.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/resource.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/route.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/rtc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/rwsem.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sched.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sem.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/seq_file.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/seqlock.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/serial_core.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/serial_reg.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/serio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/shm.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/signal.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/skbuff.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/slab.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/smb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/smp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/smp_lock.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/socket.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sockios.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/soundcard.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/stacktrace.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/stat.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/statfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/stddef.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/string.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/stringify.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/swap.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sysctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sysdev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/sysfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/taskstats.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/tcp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/telephony.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/termios.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/textsearch.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/thread_info.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/threads.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/time.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/timer.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/times.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/timex.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/tiocl.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/transport_class.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/tty.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/types.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/udp.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/uio.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/un.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/unistd.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/usb.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/user.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/utime.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/utsname.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/version.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/vfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/videodev.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/videodev2.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/vmalloc.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/vt.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/wait.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/wanrouter.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/wireless.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/workqueue.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/xattr.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/zconf.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/zlib.h1
l---------6/platforms/android-8/arch-arm/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-8/arch-arm/usr/include/locale.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/asm.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/cdefs.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/cpu-features.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/exec.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/ieee.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/internal_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/kernel.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/limits.h1
l---------6/platforms/android-8/arch-arm/usr/include/machine/setjmp.h1
l---------6/platforms/android-8/arch-arm/usr/include/malloc.h1
l---------6/platforms/android-8/arch-arm/usr/include/math.h1
l---------6/platforms/android-8/arch-arm/usr/include/memory.h1
l---------6/platforms/android-8/arch-arm/usr/include/mntent.h1
l---------6/platforms/android-8/arch-arm/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-8/arch-arm/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/ethertypes.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_arp.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_dl.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_ether.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_packet.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/if_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/net/route.h1
l---------6/platforms/android-8/arch-arm/usr/include/netdb.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/ether.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/if_ether.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/in.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/in6.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/in_systm.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/ip.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/tcp.h1
l---------6/platforms/android-8/arch-arm/usr/include/netinet/udp.h1
l---------6/platforms/android-8/arch-arm/usr/include/netpacket/packet.h1
l---------6/platforms/android-8/arch-arm/usr/include/nsswitch.h1
l---------6/platforms/android-8/arch-arm/usr/include/pathconf.h1
l---------6/platforms/android-8/arch-arm/usr/include/paths.h1
l---------6/platforms/android-8/arch-arm/usr/include/poll.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/pthread.h275
l---------6/platforms/android-8/arch-arm/usr/include/pwd.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/regex.h105
l---------6/platforms/android-8/arch-arm/usr/include/resolv.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/sched.h78
l---------6/platforms/android-8/arch-arm/usr/include/semaphore.h1
l---------6/platforms/android-8/arch-arm/usr/include/setjmp.h1
l---------6/platforms/android-8/arch-arm/usr/include/sgtty.h1
l---------6/platforms/android-8/arch-arm/usr/include/sha1.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/signal.h128
l---------6/platforms/android-8/arch-arm/usr/include/stdint.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/stdio.h453
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/stdlib.h185
l---------6/platforms/android-8/arch-arm/usr/include/string.h1
l---------6/platforms/android-8/arch-arm/usr/include/strings.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/_errdefs.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/_system_properties.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/_types.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/atomics.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/cdefs.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/dirent.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/endian.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/epoll.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/errno.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/exec_elf.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/file.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/fsuid.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/inotify.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ioctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ipc.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/klog.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/limits.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/mman.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/mount.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/param.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/poll.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/prctl.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ptrace.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/queue.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/reboot.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/resource.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/select.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/sendfile.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/socket.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/socketcalls.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/stat.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/statfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/syscall.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/sysconf.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/sysinfo.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/syslimits.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/sysmacros.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/system_properties.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/time.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/timeb.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/times.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ttychars.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/ttydev.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/types.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/uio.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/un.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/utime.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/utsname.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/vfs.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/vt.h1
l---------6/platforms/android-8/arch-arm/usr/include/sys/wait.h1
l---------6/platforms/android-8/arch-arm/usr/include/syslog.h1
l---------6/platforms/android-8/arch-arm/usr/include/termio.h1
l---------6/platforms/android-8/arch-arm/usr/include/termios.h1
l---------6/platforms/android-8/arch-arm/usr/include/thread_db.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/time.h115
l---------6/platforms/android-8/arch-arm/usr/include/time64.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/unistd.h208
l---------6/platforms/android-8/arch-arm/usr/include/util.h1
l---------6/platforms/android-8/arch-arm/usr/include/utime.h1
l---------6/platforms/android-8/arch-arm/usr/include/utmp.h1
-rw-r--r--6/platforms/android-8/arch-arm/usr/include/wchar.h157
l---------6/platforms/android-8/arch-arm/usr/include/wctype.h1
l---------6/platforms/android-8/arch-arm/usr/include/zconf.h1
l---------6/platforms/android-8/arch-arm/usr/include/zlib.h1
l---------6/platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o1
l---------6/platforms/android-8/arch-arm/usr/lib/crtbegin_so.o1
l---------6/platforms/android-8/arch-arm/usr/lib/crtbegin_static.o1
l---------6/platforms/android-8/arch-arm/usr/lib/crtend_android.o1
l---------6/platforms/android-8/arch-arm/usr/lib/crtend_so.o1
l---------6/platforms/android-8/arch-arm/usr/lib/libGLESv1_CM.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libGLESv2.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libc.a1
-rw-r--r--6/platforms/android-8/arch-arm/usr/lib/libc.sobin0 -> 1416900 bytes
-rw-r--r--6/platforms/android-8/arch-arm/usr/lib/libdl.sobin0 -> 38456 bytes
-rwxr-xr-x6/platforms/android-8/arch-arm/usr/lib/libjnigraphics.sobin0 -> 59996 bytes
l---------6/platforms/android-8/arch-arm/usr/lib/liblog.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libm.a1
l---------6/platforms/android-8/arch-arm/usr/lib/libm.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libstdc++.a1
l---------6/platforms/android-8/arch-arm/usr/lib/libstdc++.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libthread_db.a1
l---------6/platforms/android-8/arch-arm/usr/lib/libthread_db.so1
l---------6/platforms/android-8/arch-arm/usr/lib/libz.so1
l---------6/platforms/android-8/arch-x86/usr/include/GLES/gl.h1
l---------6/platforms/android-8/arch-x86/usr/include/GLES/glext.h1
l---------6/platforms/android-8/arch-x86/usr/include/GLES/glplatform.h1
l---------6/platforms/android-8/arch-x86/usr/include/GLES2/gl2.h1
l---------6/platforms/android-8/arch-x86/usr/include/GLES2/gl2ext.h1
l---------6/platforms/android-8/arch-x86/usr/include/GLES2/gl2platform.h1
l---------6/platforms/android-8/arch-x86/usr/include/KHR/khrplatform.h1
l---------6/platforms/android-8/arch-x86/usr/include/alloca.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/android/bitmap.h79
l---------6/platforms/android-8/arch-x86/usr/include/android/log.h1
l---------6/platforms/android-8/arch-x86/usr/include/arpa/inet.h1
l---------6/platforms/android-8/arch-x86/usr/include/arpa/nameser.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/bug.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/errno.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/futex.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/local.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/mman.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/poll.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/resource.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/sections.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/signal.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/topology.h1
l---------6/platforms/android-8/arch-x86/usr/include/asm-generic/xor.h1
l---------6/platforms/android-8/arch-x86/usr/include/assert.h1
l---------6/platforms/android-8/arch-x86/usr/include/byteswap.h1
l---------6/platforms/android-8/arch-x86/usr/include/ctype.h1
l---------6/platforms/android-8/arch-x86/usr/include/dirent.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/dlfcn.h67
l---------6/platforms/android-8/arch-x86/usr/include/elf.h1
l---------6/platforms/android-8/arch-x86/usr/include/endian.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/err.h90
l---------6/platforms/android-8/arch-x86/usr/include/errno.h1
l---------6/platforms/android-8/arch-x86/usr/include/fcntl.h1
l---------6/platforms/android-8/arch-x86/usr/include/features.h1
l---------6/platforms/android-8/arch-x86/usr/include/fnmatch.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/fts.h125
l---------6/platforms/android-8/arch-x86/usr/include/getopt.h1
l---------6/platforms/android-8/arch-x86/usr/include/grp.h1
l---------6/platforms/android-8/arch-x86/usr/include/inttypes.h1
l---------6/platforms/android-8/arch-x86/usr/include/jni.h1
l---------6/platforms/android-8/arch-x86/usr/include/lastlog.h1
l---------6/platforms/android-8/arch-x86/usr/include/libgen.h1
l---------6/platforms/android-8/arch-x86/usr/include/limits.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/a.out.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/aio_abi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/akm8976.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/android_alarm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/android_pmem.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/android_power.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/apm_bios.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ashmem.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ata.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atmapi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atmdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atmioc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atmppp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/atmsap.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/attribute_container.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/auto_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/autoconf.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/auxvec.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/backing-dev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/binder.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/binfmts.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/bio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/bitmap.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/bitops.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/blkdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/blkpg.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/cache.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/calc64.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/capability.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/capi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/cdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/cdrom.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/circ_buf.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/clk.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/coda.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/compat.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/compiler.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/completion.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/config.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/console_struct.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/cpu.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/cpumask.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ctype.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/dccp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/debug_locks.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/delay.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/device.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/dirent.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/dmaengine.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/efs_dir.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/elevator.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/elf-em.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/elf.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/err.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/errno.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/errqueue.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/etherdevice.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/fadvise.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/fb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/fcntl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/fd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/file.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/filter.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ftape.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/futex.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/genhd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/gfp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/hardirq.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/hdreg.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/hdsmart.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/highmem.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/hil.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/i2c.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/icmp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_arp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_bridge.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_ether.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_fc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_fddi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_hippi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_packet.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_ppp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_tr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_tun.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/if_vlan.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/in.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/in6.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/init.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/inotify.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/input.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/interrupt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ioctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ioport.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ioprio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ip.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ipc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ipx.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/irq.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/irqflags.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/irqreturn.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/jbd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/jiffies.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kdev_t.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kernel.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kexec.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/key.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/keyboard.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/keychord.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/klist.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kmod.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kobject.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/kref.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ktime.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/limits.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/linkage.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/list.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/lockdep.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/loop.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/magic.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/major.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mca.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mempolicy.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mempool.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/miscdevice.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mmc/card.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mmc/host.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mmzone.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/module.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/moduleparam.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mount.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/msg.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/msm_audio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mt9t013.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/map.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mtio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/mutex.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ncp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ncp_no.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/net.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netdevice.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/netlink.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfs2.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfs3.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfs4.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsacl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/node.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nodemask.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/notifier.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/numa.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/nvram.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pagemap.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/param.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/patchkey.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pci.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pci_ids.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pci_regs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/percpu.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/personality.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/platform_device.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/plist.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/pnp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/poll.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/posix_acl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/posix_types.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ppdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/prctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/preempt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/proc_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ptrace.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/qic117.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/quota.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/raid/md.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/raid/xor.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/random.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/rbtree.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/rcupdate.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/reboot.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/relay.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/resource.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/route.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/rtc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/rwsem.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sched.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sem.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/seq_file.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/seqlock.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/serial_core.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/serial_reg.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/serio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/shm.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/signal.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/skbuff.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/slab.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/smb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/smp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/smp_lock.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/socket.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sockios.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/soundcard.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/stacktrace.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/stat.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/statfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/stddef.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/string.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/stringify.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/swap.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sysctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sysdev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/sysfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/taskstats.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/tcp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/telephony.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/termios.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/textsearch.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/thread_info.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/threads.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/time.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/timer.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/times.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/timex.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/tiocl.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/transport_class.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/tty.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/types.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/udp.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/uio.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/un.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/unistd.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/usb.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/user.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/utime.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/utsname.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/version.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/vfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/videodev.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/videodev2.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/vmalloc.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/vt.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/wait.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/wanrouter.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/wireless.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/workqueue.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/xattr.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/zconf.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/zlib.h1
l---------6/platforms/android-8/arch-x86/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-8/arch-x86/usr/include/locale.h1
l---------6/platforms/android-8/arch-x86/usr/include/malloc.h1
l---------6/platforms/android-8/arch-x86/usr/include/math.h1
l---------6/platforms/android-8/arch-x86/usr/include/memory.h1
l---------6/platforms/android-8/arch-x86/usr/include/mntent.h1
l---------6/platforms/android-8/arch-x86/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-8/arch-x86/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/ethertypes.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_arp.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_dl.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_ether.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_packet.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/if_types.h1
l---------6/platforms/android-8/arch-x86/usr/include/net/route.h1
l---------6/platforms/android-8/arch-x86/usr/include/netdb.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/ether.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/if_ether.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/in.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/in6.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/in_systm.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/ip.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/tcp.h1
l---------6/platforms/android-8/arch-x86/usr/include/netinet/udp.h1
l---------6/platforms/android-8/arch-x86/usr/include/netpacket/packet.h1
l---------6/platforms/android-8/arch-x86/usr/include/nsswitch.h1
l---------6/platforms/android-8/arch-x86/usr/include/pathconf.h1
l---------6/platforms/android-8/arch-x86/usr/include/paths.h1
l---------6/platforms/android-8/arch-x86/usr/include/poll.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/pthread.h275
l---------6/platforms/android-8/arch-x86/usr/include/pwd.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/regex.h105
l---------6/platforms/android-8/arch-x86/usr/include/resolv.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/sched.h78
l---------6/platforms/android-8/arch-x86/usr/include/semaphore.h1
l---------6/platforms/android-8/arch-x86/usr/include/setjmp.h1
l---------6/platforms/android-8/arch-x86/usr/include/sgtty.h1
l---------6/platforms/android-8/arch-x86/usr/include/sha1.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/signal.h128
l---------6/platforms/android-8/arch-x86/usr/include/stdint.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/stdio.h453
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/stdlib.h185
l---------6/platforms/android-8/arch-x86/usr/include/string.h1
l---------6/platforms/android-8/arch-x86/usr/include/strings.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/_errdefs.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/_sigdefs.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/_system_properties.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/_types.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/atomics.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/cdefs.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/dirent.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/endian.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/epoll.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/errno.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/exec_elf.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/file.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/fsuid.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/inotify.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ioctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ipc.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/klog.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/limits.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/linux-syscalls.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/linux-unistd.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/mman.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/mount.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/param.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/poll.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/prctl.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ptrace.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/queue.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/reboot.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/resource.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/select.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/sendfile.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/socket.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/socketcalls.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/stat.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/statfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/syscall.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/sysconf.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/sysinfo.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/syslimits.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/sysmacros.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/system_properties.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/time.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/timeb.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/times.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ttychars.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/ttydev.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/types.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/uio.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/un.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/utime.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/utsname.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/vfs.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/vt.h1
l---------6/platforms/android-8/arch-x86/usr/include/sys/wait.h1
l---------6/platforms/android-8/arch-x86/usr/include/syslog.h1
l---------6/platforms/android-8/arch-x86/usr/include/termio.h1
l---------6/platforms/android-8/arch-x86/usr/include/termios.h1
l---------6/platforms/android-8/arch-x86/usr/include/thread_db.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/time.h115
l---------6/platforms/android-8/arch-x86/usr/include/time64.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/unistd.h208
l---------6/platforms/android-8/arch-x86/usr/include/util.h1
l---------6/platforms/android-8/arch-x86/usr/include/utime.h1
l---------6/platforms/android-8/arch-x86/usr/include/utmp.h1
-rw-r--r--6/platforms/android-8/arch-x86/usr/include/wchar.h157
l---------6/platforms/android-8/arch-x86/usr/include/wctype.h1
l---------6/platforms/android-8/arch-x86/usr/include/zconf.h1
l---------6/platforms/android-8/arch-x86/usr/include/zlib.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/EGL/egl.h329
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/EGL/eglext.h244
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/EGL/eglplatform.h120
l---------6/platforms/android-9/arch-arm/usr/include/GLES/gl.h1
l---------6/platforms/android-9/arch-arm/usr/include/GLES/glext.h1
l---------6/platforms/android-9/arch-arm/usr/include/GLES/glplatform.h1
l---------6/platforms/android-9/arch-arm/usr/include/GLES2/gl2.h1
l---------6/platforms/android-9/arch-arm/usr/include/GLES2/gl2ext.h1
l---------6/platforms/android-9/arch-arm/usr/include/GLES2/gl2platform.h1
l---------6/platforms/android-9/arch-arm/usr/include/KHR/khrplatform.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES.h2774
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Android.h242
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_AndroidConfiguration.h69
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Platform.h52
l---------6/platforms/android-9/arch-arm/usr/include/alloca.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/asset_manager.h138
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/asset_manager_jni.h40
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/bitmap.h76
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/configuration.h319
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/input.h688
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/keycodes.h166
l---------6/platforms/android-9/arch-arm/usr/include/android/log.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/looper.h255
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/native_activity.h296
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/native_window.h117
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/native_window_jni.h40
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/obb.h63
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/rect.h36
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/sensor.h256
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/storage_manager.h127
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/android/window.h58
l---------6/platforms/android-9/arch-arm/usr/include/arpa/inet.h1
l---------6/platforms/android-9/arch-arm/usr/include/arpa/nameser.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/arpa/telnet.h316
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/bug.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/errno.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/futex.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/local.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/mman.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/poll.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/resource.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/sections.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/signal.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/topology.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm-generic/xor.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/a.out.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/board-perseus2.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/board.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/cpu.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/dma.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/fpga.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio-switch.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/hardware.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/io.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/irqs.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/mcbsp.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/memory.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/mtd-xip.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/mux.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/omap24xx.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/serial.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/timex.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/arch/vmalloc.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/atomic.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/auxvec.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/bitops.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/byteorder.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/cache.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/cacheflush.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/cputime.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/delay.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/div64.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/dma-mapping.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/dma.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/domain.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/dyntick.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/elf.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/errno.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/fcntl.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/fpstate.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/glue.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/hardirq.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/hardware.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/hw_irq.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/ide.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/io.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/ioctls.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/ipcbuf.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/irq.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/linkage.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/local.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/locks.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/mc146818rtc.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/memory.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/mman.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/module.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/msgbuf.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/mtd-xip.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/page.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/param.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/percpu.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/pgalloc.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/pgtable-hwdef.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/pgtable.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/poll.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/posix_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/proc-fns.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/processor.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/procinfo.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/ptrace.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/resource.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/scatterlist.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/semaphore.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/sembuf.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/shmbuf.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/shmparam.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/sigcontext.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/siginfo.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/signal.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/sizes.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/smp.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/socket.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/sockios.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/spinlock.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/spinlock_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/stat.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/statfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/suspend.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/system.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/termbits.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/termios.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/thread_info.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/timex.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/tlbflush.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/topology.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/types.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/uaccess.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/unaligned.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/unistd.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/user.h1
l---------6/platforms/android-9/arch-arm/usr/include/asm/vga.h1
l---------6/platforms/android-9/arch-arm/usr/include/assert.h1
l---------6/platforms/android-9/arch-arm/usr/include/byteswap.h1
l---------6/platforms/android-9/arch-arm/usr/include/ctype.h1
l---------6/platforms/android-9/arch-arm/usr/include/dirent.h1
l---------6/platforms/android-9/arch-arm/usr/include/dlfcn.h1
l---------6/platforms/android-9/arch-arm/usr/include/elf.h1
l---------6/platforms/android-9/arch-arm/usr/include/endian.h1
l---------6/platforms/android-9/arch-arm/usr/include/err.h1
l---------6/platforms/android-9/arch-arm/usr/include/errno.h1
l---------6/platforms/android-9/arch-arm/usr/include/fcntl.h1
l---------6/platforms/android-9/arch-arm/usr/include/features.h1
l---------6/platforms/android-9/arch-arm/usr/include/fenv.h1
l---------6/platforms/android-9/arch-arm/usr/include/fnmatch.h1
l---------6/platforms/android-9/arch-arm/usr/include/fts.h1
l---------6/platforms/android-9/arch-arm/usr/include/getopt.h1
l---------6/platforms/android-9/arch-arm/usr/include/grp.h1
l---------6/platforms/android-9/arch-arm/usr/include/inttypes.h1
l---------6/platforms/android-9/arch-arm/usr/include/jni.h1
l---------6/platforms/android-9/arch-arm/usr/include/lastlog.h1
l---------6/platforms/android-9/arch-arm/usr/include/libgen.h1
l---------6/platforms/android-9/arch-arm/usr/include/limits.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/a.out.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/aio_abi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/akm8976.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/android_alarm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/android_pmem.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/android_power.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/apm_bios.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ashmem.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ata.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atmapi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atmdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atmioc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atmppp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/atmsap.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/attribute_container.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/auto_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/autoconf.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/auxvec.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/backing-dev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/binder.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/binfmts.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/bio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/bitmap.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/bitops.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/blkdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/blkpg.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/cache.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/calc64.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/capability.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/capi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/cdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/cdrom.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/circ_buf.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/clk.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/coda.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/compat.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/compiler.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/completion.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/config.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/console_struct.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/cpu.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/cpumask.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ctype.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/dccp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/debug_locks.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/delay.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/device.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/dirent.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/dmaengine.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/efs_dir.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/elevator.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/elf-em.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/elf.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/err.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/errno.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/errqueue.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/etherdevice.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/fadvise.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/fb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/fcntl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/fd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/file.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/filter.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ftape.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/futex.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/genhd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/gfp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/hardirq.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/hdreg.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/hdsmart.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/highmem.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/hil.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/i2c.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/icmp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_arp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_bridge.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_ether.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_fc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_fddi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_hippi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_packet.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_ppp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_tr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_tun.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/if_vlan.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/in.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/in6.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/init.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/inotify.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/input.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/interrupt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ioport.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ioprio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ip.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ipc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ipx.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/irq.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/irqflags.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/irqreturn.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/jbd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/jiffies.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kdev_t.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kernel.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kexec.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/key.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/keyboard.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/keychord.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/klist.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kmod.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kobject.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/kref.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ktime.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/limits.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/linkage.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/list.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/lockdep.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/loop.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/magic.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/major.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mca.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mempolicy.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mempool.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/miscdevice.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mmc/card.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mmc/host.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mmzone.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/module.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/moduleparam.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mount.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/msg.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/msm_audio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mt9t013.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/map.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mtio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/mutex.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ncp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ncp_no.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/net.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netdevice.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/netlink.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfs2.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfs3.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfs4.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsacl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/node.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nodemask.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/notifier.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/numa.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/nvram.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pagemap.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/param.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/patchkey.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pci.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pci_ids.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pci_regs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/percpu.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/personality.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/platform_device.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/plist.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/pnp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/poll.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/posix_acl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/posix_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ppdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/prctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/preempt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/proc_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ptrace.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/qic117.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/quota.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/raid/md.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/raid/xor.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/random.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/rbtree.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/rcupdate.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/reboot.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/relay.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/resource.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/route.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/rtc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/rwsem.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sched.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sem.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/seq_file.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/seqlock.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/serial_core.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/serial_reg.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/serio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/shm.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/signal.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/skbuff.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/slab.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/smb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/smp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/smp_lock.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/socket.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sockios.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/soundcard.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/stacktrace.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/stat.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/statfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/stddef.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/string.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/stringify.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/swap.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sysctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sysdev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/sysfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/taskstats.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/tcp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/telephony.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/termios.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/textsearch.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/thread_info.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/threads.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/time.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/timer.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/times.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/timex.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/tiocl.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/transport_class.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/tty.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/types.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/udp.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/uio.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/un.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/unistd.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/usb.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/user.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/utime.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/utsname.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/version.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/vfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/videodev.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/videodev2.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/vmalloc.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/vt.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/wait.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/wanrouter.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/wireless.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/workqueue.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/xattr.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/zconf.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/zlib.h1
l---------6/platforms/android-9/arch-arm/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-9/arch-arm/usr/include/locale.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/asm.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/cdefs.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/cpu-features.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/exec.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/ieee.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/internal_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/kernel.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/limits.h1
l---------6/platforms/android-9/arch-arm/usr/include/machine/setjmp.h1
l---------6/platforms/android-9/arch-arm/usr/include/malloc.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/math.h493
l---------6/platforms/android-9/arch-arm/usr/include/memory.h1
l---------6/platforms/android-9/arch-arm/usr/include/mntent.h1
l---------6/platforms/android-9/arch-arm/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-9/arch-arm/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/ethertypes.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_arp.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_dl.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_ether.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_packet.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/if_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/net/route.h1
l---------6/platforms/android-9/arch-arm/usr/include/netdb.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/ether.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/if_ether.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/in.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/in6.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/in_systm.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/ip.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/tcp.h1
l---------6/platforms/android-9/arch-arm/usr/include/netinet/udp.h1
l---------6/platforms/android-9/arch-arm/usr/include/netpacket/packet.h1
l---------6/platforms/android-9/arch-arm/usr/include/nsswitch.h1
l---------6/platforms/android-9/arch-arm/usr/include/pathconf.h1
l---------6/platforms/android-9/arch-arm/usr/include/paths.h1
l---------6/platforms/android-9/arch-arm/usr/include/poll.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/pthread.h314
l---------6/platforms/android-9/arch-arm/usr/include/pwd.h1
l---------6/platforms/android-9/arch-arm/usr/include/regex.h1
l---------6/platforms/android-9/arch-arm/usr/include/resolv.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sched.h78
l---------6/platforms/android-9/arch-arm/usr/include/semaphore.h1
l---------6/platforms/android-9/arch-arm/usr/include/setjmp.h1
l---------6/platforms/android-9/arch-arm/usr/include/sgtty.h1
l---------6/platforms/android-9/arch-arm/usr/include/sha1.h1
l---------6/platforms/android-9/arch-arm/usr/include/signal.h1
l---------6/platforms/android-9/arch-arm/usr/include/stdint.h1
l---------6/platforms/android-9/arch-arm/usr/include/stdio.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/stdlib.h185
l---------6/platforms/android-9/arch-arm/usr/include/string.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/strings.h56
l---------6/platforms/android-9/arch-arm/usr/include/sys/_errdefs.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/_sigdefs.h70
l---------6/platforms/android-9/arch-arm/usr/include/sys/_system_properties.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/_types.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/atomics.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/cdefs.h501
l---------6/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/dirent.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/endian.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/epoll.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/errno.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/exec_elf.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/file.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/fsuid.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/inotify.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ioctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ipc.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/klog.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/limits.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/linux-syscalls.h292
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/linux-unistd.h212
l---------6/platforms/android-9/arch-arm/usr/include/sys/mman.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/mount.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/param.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/poll.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/prctl.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ptrace.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/queue.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/reboot.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/resource.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/select.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/sendfile.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/socket.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/socketcalls.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/stat.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/statfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/syscall.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/sysconf.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/sysinfo.h40
l---------6/platforms/android-9/arch-arm/usr/include/sys/syslimits.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/system_properties.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/time.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/timeb.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/times.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ttychars.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/ttydev.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/types.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/uio.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/un.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/utime.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/utsname.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/vfs.h1
l---------6/platforms/android-9/arch-arm/usr/include/sys/vt.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/sys/wait.h63
l---------6/platforms/android-9/arch-arm/usr/include/syslog.h1
l---------6/platforms/android-9/arch-arm/usr/include/termio.h1
l---------6/platforms/android-9/arch-arm/usr/include/termios.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/thread_db.h164
l---------6/platforms/android-9/arch-arm/usr/include/time.h1
l---------6/platforms/android-9/arch-arm/usr/include/time64.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/unistd.h211
l---------6/platforms/android-9/arch-arm/usr/include/util.h1
l---------6/platforms/android-9/arch-arm/usr/include/utime.h1
l---------6/platforms/android-9/arch-arm/usr/include/utmp.h1
-rw-r--r--6/platforms/android-9/arch-arm/usr/include/wchar.h157
l---------6/platforms/android-9/arch-arm/usr/include/wctype.h1
l---------6/platforms/android-9/arch-arm/usr/include/zconf.h1
l---------6/platforms/android-9/arch-arm/usr/include/zlib.h1
l---------6/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o1
-rw-r--r--6/platforms/android-9/arch-arm/usr/lib/crtbegin_so.obin0 -> 1068 bytes
l---------6/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o1
l---------6/platforms/android-9/arch-arm/usr/lib/crtend_android.o1
-rw-r--r--6/platforms/android-9/arch-arm/usr/lib/crtend_so.obin0 -> 716 bytes
-rw-r--r--6/platforms/android-9/arch-arm/usr/lib/libEGL.sobin0 -> 5487 bytes
l---------6/platforms/android-9/arch-arm/usr/lib/libGLESv1_CM.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libGLESv2.so1
-rwxr-xr-x6/platforms/android-9/arch-arm/usr/lib/libOpenSLES.sobin0 -> 6091 bytes
-rw-r--r--6/platforms/android-9/arch-arm/usr/lib/libandroid.sobin0 -> 17831 bytes
l---------6/platforms/android-9/arch-arm/usr/lib/libc.a1
-rw-r--r--6/platforms/android-9/arch-arm/usr/lib/libc.sobin0 -> 273868 bytes
l---------6/platforms/android-9/arch-arm/usr/lib/libdl.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libjnigraphics.so1
l---------6/platforms/android-9/arch-arm/usr/lib/liblog.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libm.a1
l---------6/platforms/android-9/arch-arm/usr/lib/libm.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libstdc++.a1
l---------6/platforms/android-9/arch-arm/usr/lib/libstdc++.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libthread_db.a1
l---------6/platforms/android-9/arch-arm/usr/lib/libthread_db.so1
l---------6/platforms/android-9/arch-arm/usr/lib/libz.so1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/EGL/egl.h329
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/EGL/eglext.h244
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/EGL/eglplatform.h120
l---------6/platforms/android-9/arch-x86/usr/include/GLES/gl.h1
l---------6/platforms/android-9/arch-x86/usr/include/GLES/glext.h1
l---------6/platforms/android-9/arch-x86/usr/include/GLES/glplatform.h1
l---------6/platforms/android-9/arch-x86/usr/include/GLES2/gl2.h1
l---------6/platforms/android-9/arch-x86/usr/include/GLES2/gl2ext.h1
l---------6/platforms/android-9/arch-x86/usr/include/GLES2/gl2platform.h1
l---------6/platforms/android-9/arch-x86/usr/include/KHR/khrplatform.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES.h2774
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Android.h242
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_AndroidConfiguration.h69
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Platform.h52
l---------6/platforms/android-9/arch-x86/usr/include/alloca.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/api-level.h33
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/asset_manager.h138
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/asset_manager_jni.h40
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/bitmap.h76
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/configuration.h319
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/input.h688
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/keycodes.h166
l---------6/platforms/android-9/arch-x86/usr/include/android/log.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/looper.h255
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/native_activity.h296
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/native_window.h117
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/native_window_jni.h40
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/obb.h63
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/rect.h36
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/sensor.h256
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/storage_manager.h127
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/android/window.h58
l---------6/platforms/android-9/arch-x86/usr/include/arpa/inet.h1
l---------6/platforms/android-9/arch-x86/usr/include/arpa/nameser.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/arpa/telnet.h316
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/4level-fixup.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/audit_dir_write.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/__ffs.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/atomic.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/ffz.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/find.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls64.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/le.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/non-atomic.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/bug.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/cputime.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/emergency-restart.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/futex.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/ioctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/ipc.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/local.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/memory_model.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/mman.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/mutex-xchg.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/percpu.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable-nopud.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/poll.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/sections.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/tlb.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/topology.h1
l---------6/platforms/android-9/arch-x86/usr/include/asm-generic/xor.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/a.out.h31
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/acpi.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/acpi_32.h15
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/alternative.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/alternative_32.h38
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/apic.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/apic_32.h31
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/apicdef.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/apicdef_32.h372
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/atomic.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/atomic_32.h39
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/auxvec.h20
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/bitops.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/bitops_32.h30
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/bug.h16
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/byteorder.h70
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cache.h20
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cacheflush.h34
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg_32.h31
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cpufeature.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cpufeature_32.h151
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/cputime.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/current.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/current_32.h21
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/delay.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/desc.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/desc_32.h65
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/desc_defs.h70
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/div64.h17
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping_32.h28
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dma.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dma_32.h90
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dwarf2.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/dwarf2_32.h33
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/e820.h36
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/elf.h74
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/errno.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/fcntl.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/fixmap.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/fixmap_32.h55
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/genapic.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/genapic_32.h73
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/hardirq.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/hardirq_32.h36
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/highmem.h15
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/hw_irq.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/hw_irq_32.h24
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/i387.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/i387_32.h33
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/i8253.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/i8259.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ia32_unistd.h22
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/io.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/io_32.h27
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/io_apic.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/io_apic_32.h96
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ioctl.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ioctls.h95
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ipcbuf.h30
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/irq.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/irq_32.h23
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/irqflags.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/irqflags_32.h33
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ist.h24
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/kmap_types.h36
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ldt.h41
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/linkage.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/linkage_32.h21
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/local.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/local_32.h51
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/math_emu.h40
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc_32.h44
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mman.h30
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mmsegment.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mmu.h25
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/module.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/module_32.h29
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mpspec.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mpspec_32.h52
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/mpspec_def.h171
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/msgbuf.h38
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/msr-index.h283
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/msr.h54
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/page.h16
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/page_32.h22
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/param.h26
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/paravirt.h15
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pda.h65
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/percpu.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/percpu_32.h36
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgalloc.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgalloc_32.h30
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level-defs.h22
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level.h39
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgtable.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/pgtable_32.h175
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/poll.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/posix_types.h16
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h70
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/prctl.h20
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/processor-flags.h79
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/processor.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/processor_32.h324
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h88
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/ptrace.h74
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/required-features.h44
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/resource.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/rwlock.h18
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/scatterlist.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/scatterlist_32.h31
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/sections.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/segment.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/segment_32.h89
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/semaphore.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/semaphore_32.h17
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/sembuf.h26
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/setup.h17
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/shmbuf.h49
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/shmparam.h17
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h132
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/siginfo.h21
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/signal.h127
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/smp.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/smp_32.h34
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/socket.h63
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/sockios.h23
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/spinlock.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/spinlock_32.h29
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/spinlock_types.h31
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/stat.h120
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/statfs.h62
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/string.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/string_32.h15
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/swiotlb.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/system.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/system_32.h33
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/termbits.h201
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/termios.h67
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/thread_info.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/thread_info_32.h15
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/tlbflush.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/tlbflush_32.h43
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/tsc.h22
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/types.h40
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/uaccess.h12
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/uaccess_32.h83
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/unaligned.h19
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/unistd.h16
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/unistd_32.h341
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/user.h16
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/user32.h73
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/user_32.h81
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/vm86.h113
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/voyager.h437
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/vsyscall.h27
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/asm/xen/hypercall.h34
l---------6/platforms/android-9/arch-x86/usr/include/assert.h1
l---------6/platforms/android-9/arch-x86/usr/include/byteswap.h1
l---------6/platforms/android-9/arch-x86/usr/include/ctype.h1
l---------6/platforms/android-9/arch-x86/usr/include/dirent.h1
l---------6/platforms/android-9/arch-x86/usr/include/dlfcn.h1
l---------6/platforms/android-9/arch-x86/usr/include/elf.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/endian.h70
l---------6/platforms/android-9/arch-x86/usr/include/err.h1
l---------6/platforms/android-9/arch-x86/usr/include/errno.h1
l---------6/platforms/android-9/arch-x86/usr/include/fcntl.h1
l---------6/platforms/android-9/arch-x86/usr/include/features.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/fenv.h242
l---------6/platforms/android-9/arch-x86/usr/include/fnmatch.h1
l---------6/platforms/android-9/arch-x86/usr/include/fts.h1
l---------6/platforms/android-9/arch-x86/usr/include/getopt.h1
l---------6/platforms/android-9/arch-x86/usr/include/grp.h1
l---------6/platforms/android-9/arch-x86/usr/include/inttypes.h1
l---------6/platforms/android-9/arch-x86/usr/include/jni.h1
l---------6/platforms/android-9/arch-x86/usr/include/lastlog.h1
l---------6/platforms/android-9/arch-x86/usr/include/libgen.h1
l---------6/platforms/android-9/arch-x86/usr/include/limits.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/a.out.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/aio_abi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/akm8976.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/android_alarm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/android_pmem.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/android_power.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/apm_bios.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ashmem.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ata.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atmapi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atmdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atmioc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atmppp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/atmsap.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/attribute_container.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/auto_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/autoconf.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/auxvec.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/backing-dev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/binder.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/binfmts.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/bio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/bitmap.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/bitops.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/blkdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/blkpg.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/blockgroup_lock.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/byteorder/big_endian.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/byteorder/generic.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/byteorder/little_endian.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swab.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swabb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/cache.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/calc64.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/capability.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/capi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/cdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/cdrom.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/circ_buf.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/clk.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/coda.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/coda_fs_i.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/compat.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/compiler-gcc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/compiler.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/completion.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/config.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/console_struct.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/cpu.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/cpumask.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ctype.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/dccp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/debug_locks.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/delay.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/device.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/dirent.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/dm-ioctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/dma-mapping.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/dmaengine.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/efs_dir.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_i.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_sb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/elevator.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/elf-em.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/elf.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/err.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/errno.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/errqueue.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/etherdevice.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ext2_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ext3_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/fadvise.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/fb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/fcntl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/fd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/file.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/filter.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ftape.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/futex.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/genhd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/gfp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/hardirq.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/hdlc/ioctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/hdreg.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/hdsmart.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/highmem.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/hil.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/i2c.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/icmp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_arcnet.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_arp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_bridge.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_ether.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_fc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_fddi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_hippi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_packet.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_ppp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_tr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_tun.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/if_vlan.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/in.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/in6.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/init.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/inotify.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/input.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/interrupt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ioctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ioport.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ioprio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ip.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ipc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ipmi_msgdefs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ipmi_smi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ipx.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/irq.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/irq_cpustat.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/irqflags.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/irqreturn.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/jbd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/jiffies.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kdev_t.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kernel.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kernel_stat.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kernelcapi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kexec.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/key.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/keyboard.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/keychord.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/klist.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kmod.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kobject.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/kref.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ktime.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/limits.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/linkage.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/list.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/lockd/nlm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/lockd/xdr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/lockdep.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/loop.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/magic.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/major.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mc146818rtc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mca.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mempolicy.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mempool.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/miscdevice.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mmc/card.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mmc/host.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mmc/mmc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mmzone.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mod_devicetable.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/module.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/moduleparam.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mount.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/msdos_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/msg.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/msm_adsp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/msm_audio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/msm_mdp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mt9t013.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/bbm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/blktrans.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi_endian.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/compatmac.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/flashchip.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/map.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/mtd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand_ecc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/nftl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/onenand_regs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtd/partitions.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mtio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mutex-debug.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/mutex.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ncp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ncp_mount.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ncp_no.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/net.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netdevice.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/x_tables.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_comment.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_connbytes.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_conntrack.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_dccp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_esp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_helper.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_length.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_limit.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_mac.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_multiport.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_physdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_pkttype.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_quota.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_realm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_sctp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_state.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_statistic.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_string.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_bridge.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/netlink.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfs2.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfs3.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfs4.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfs_xdr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsacl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/auth.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/const.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/debug.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/export.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/interface.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/nfsfh.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/stats.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nfsd/xdr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/node.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nodemask.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/notifier.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/numa.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/nvram.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/omap_csmi.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pagemap.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/param.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/patchkey.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pci.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pci_ids.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pci_regs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/percpu.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/percpu_counter.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/personality.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pfkeyv2.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pkt_cls.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pkt_sched.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/platform_device.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/plist.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/pnp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/poll.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/posix_acl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/posix_types.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ppdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ppp_defs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/prctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/preempt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/proc_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ptrace.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/qic117.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/qnxtypes.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/quota.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/raid/md.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/raid/md_k.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/raid/md_p.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/raid/md_u.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/raid/xor.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/random.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/rbtree.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/rcupdate.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/reboot.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/relay.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/resource.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/route.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/rtc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/rtnetlink.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/rwsem.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sched.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sem.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/seq_file.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/seqlock.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/serial_core.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/serial_reg.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/serio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/shm.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/signal.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/skbuff.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/slab.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/smb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/smp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/smp_lock.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/socket.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sockios.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/soundcard.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_smp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_up.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types_up.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/spinlock_up.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/stacktrace.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/stat.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/statfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/stddef.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/string.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/stringify.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth_gss.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/clnt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/debug.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_api.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_asn1.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_err.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/msg_prot.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/sched.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/stats.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svcauth.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/timer.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/types.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xdr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xprt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/swap.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sysctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sysdev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/sysfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/taskstats.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/taskstats_kern.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/tcp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/telephony.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/termios.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/textsearch.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/thread_info.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/threads.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/time.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/timer.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/times.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/timex.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/tiocl.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/transport_class.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/tty.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/types.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/udp.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_i.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_sb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/uio.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/un.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/unistd.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/usb.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/usb_ch9.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/usbdevice_fs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/user.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/utime.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/utsname.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/version.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/vfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/videodev.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/videodev2.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/vmalloc.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/vt.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/vt_buffer.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/wait.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/wanrouter.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/wireless.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/workqueue.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/xattr.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/zconf.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/zlib.h1
l---------6/platforms/android-9/arch-x86/usr/include/linux/zorro_ids.h1
l---------6/platforms/android-9/arch-x86/usr/include/locale.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/_types.h137
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/asm.h124
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/cdefs.h24
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/exec.h51
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/ieee.h133
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/internal_types.h6
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/kernel.h41
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/limits.h63
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/machine/setjmp.h8
l---------6/platforms/android-9/arch-x86/usr/include/malloc.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/math.h493
l---------6/platforms/android-9/arch-x86/usr/include/memory.h1
l---------6/platforms/android-9/arch-x86/usr/include/mntent.h1
l---------6/platforms/android-9/arch-x86/usr/include/mtd/mtd-abi.h1
l---------6/platforms/android-9/arch-x86/usr/include/mtd/mtd-user.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/ethertypes.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_arp.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_dl.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_ether.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_ieee1394.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_packet.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/if_types.h1
l---------6/platforms/android-9/arch-x86/usr/include/net/route.h1
l---------6/platforms/android-9/arch-x86/usr/include/netdb.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/ether.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/if_ether.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/in.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/in6.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/in_systm.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/ip.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/ip_icmp.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/tcp.h1
l---------6/platforms/android-9/arch-x86/usr/include/netinet/udp.h1
l---------6/platforms/android-9/arch-x86/usr/include/netpacket/packet.h1
l---------6/platforms/android-9/arch-x86/usr/include/nsswitch.h1
l---------6/platforms/android-9/arch-x86/usr/include/pathconf.h1
l---------6/platforms/android-9/arch-x86/usr/include/paths.h1
l---------6/platforms/android-9/arch-x86/usr/include/poll.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/pthread.h314
l---------6/platforms/android-9/arch-x86/usr/include/pwd.h1
l---------6/platforms/android-9/arch-x86/usr/include/regex.h1
l---------6/platforms/android-9/arch-x86/usr/include/resolv.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sched.h78
l---------6/platforms/android-9/arch-x86/usr/include/semaphore.h1
l---------6/platforms/android-9/arch-x86/usr/include/setjmp.h1
l---------6/platforms/android-9/arch-x86/usr/include/sgtty.h1
l---------6/platforms/android-9/arch-x86/usr/include/sha1.h1
l---------6/platforms/android-9/arch-x86/usr/include/signal.h1
l---------6/platforms/android-9/arch-x86/usr/include/stdint.h1
l---------6/platforms/android-9/arch-x86/usr/include/stdio.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/stdlib.h185
l---------6/platforms/android-9/arch-x86/usr/include/string.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/strings.h56
l---------6/platforms/android-9/arch-x86/usr/include/sys/_errdefs.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/_sigdefs.h70
l---------6/platforms/android-9/arch-x86/usr/include/sys/_system_properties.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/_types.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/atomics.h65
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/cdefs.h501
l---------6/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/dirent.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/endian.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/epoll.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/errno.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/exec_elf.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/file.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/fsuid.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/inotify.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ioctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ioctl_compat.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ipc.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/klog.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/limits.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/linux-syscalls.h292
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/linux-unistd.h212
l---------6/platforms/android-9/arch-x86/usr/include/sys/mman.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/mount.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/param.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/poll.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/prctl.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ptrace.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/queue.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/reboot.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/resource.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/select.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/sendfile.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/socket.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/socketcalls.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/stat.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/statfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/syscall.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/sysconf.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/sysinfo.h40
l---------6/platforms/android-9/arch-x86/usr/include/sys/syslimits.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/system_properties.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/time.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/timeb.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/times.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ttychars.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/ttydev.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/types.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/uio.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/un.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/utime.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/utsname.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/vfs.h1
l---------6/platforms/android-9/arch-x86/usr/include/sys/vt.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/sys/wait.h63
l---------6/platforms/android-9/arch-x86/usr/include/syslog.h1
l---------6/platforms/android-9/arch-x86/usr/include/termio.h1
l---------6/platforms/android-9/arch-x86/usr/include/termios.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/thread_db.h164
l---------6/platforms/android-9/arch-x86/usr/include/time.h1
l---------6/platforms/android-9/arch-x86/usr/include/time64.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/unistd.h211
l---------6/platforms/android-9/arch-x86/usr/include/util.h1
l---------6/platforms/android-9/arch-x86/usr/include/utime.h1
l---------6/platforms/android-9/arch-x86/usr/include/utmp.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/include/wchar.h157
l---------6/platforms/android-9/arch-x86/usr/include/wctype.h1
l---------6/platforms/android-9/arch-x86/usr/include/zconf.h1
l---------6/platforms/android-9/arch-x86/usr/include/zlib.h1
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/crtbegin_dynamic.obin0 -> 2100 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/crtbegin_so.obin0 -> 2032 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/crtbegin_static.obin0 -> 2100 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/crtend_android.obin0 -> 763 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/crtend_so.obin0 -> 687 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libEGL.sobin0 -> 4537 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libGLESv1_CM.sobin0 -> 23129 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libGLESv2.sobin0 -> 17950 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libOpenSLES.sobin0 -> 5467 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libandroid.sobin0 -> 15245 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/libc.abin0 -> 3257844 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libc.sobin0 -> 65417 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libdl.sobin0 -> 1794 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libjnigraphics.sobin0 -> 1716 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/liblog.sobin0 -> 2021 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/libm.abin0 -> 957154 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libm.sobin0 -> 12315 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/libstdc++.abin0 -> 28678 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libstdc++.sobin0 -> 3325 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/libthread_db.abin0 -> 17486 bytes
-rw-r--r--6/platforms/android-9/arch-x86/usr/lib/libz.abin0 -> 345640 bytes
-rwxr-xr-x6/platforms/android-9/arch-x86/usr/lib/libz.sobin0 -> 6415 bytes
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/README10
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/algorithm68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/array60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/auto_ptr.h292
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/backward_warning.h56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/binders.h168
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_fun.h167
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_map593
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_set561
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/hashtable.h1147
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/backward/strstream176
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/algorithmfwd.h805
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/allocator.h181
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_0.h464
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_2.h454
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_c.h174
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_cxx.h109
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.h474
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.tcc187
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.h2692
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.tcc1144
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/boost_concept_check.h787
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/char_traits.h575
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/cmath.tcc55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/codecvt.h497
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/concept_check.h80
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/cpp_type_traits.h419
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc863
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.h1306
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.tcc478
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/fstream.tcc926
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/functexcept.h93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/functional_hash.h68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice.h182
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice_array.h216
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/hashtable.h58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/indirect_array.h210
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/ios_base.h982
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/istream.tcc1022
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/list.tcc416
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.h812
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.tcc271
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.h2602
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.tcc1345
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.h1914
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.tcc1330
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/localefwd.h183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/mask_array.h206
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/move.h98
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream.tcc407
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream_insert.h127
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/postypes.h241
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/shared_ptr.h1591
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/slice_array.h272
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/sstream.tcc273
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algo.h6138
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algobase.h1153
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_bvector.h1024
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_construct.h148
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h1819
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_function.h715
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_heap.h578
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator.h1041
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_funcs.h197
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_types.h168
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_list.h1533
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_map.h871
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multimap.h800
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multiset.h697
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_numeric.h373
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_pair.h261
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_queue.h586
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_raw_storage_iter.h106
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_relops.h131
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_set.h708
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_stack.h299
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tempbuf.h206
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tree.h1535
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_uninitialized.h478
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_vector.h1249
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stream_iterator.h211
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf.tcc174
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf_iterator.h392
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/stringfwd.h77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/unique_ptr.h450
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_after.h549
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.h699
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.tcc241
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_before.h730
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bits/vector.tcc681
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/bitset1396
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/c++0x_warning.h36
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cassert45
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ccomplex44
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cctype101
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cerrno53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cfenv61
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cfloat60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/chrono672
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cinttypes71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ciso64633
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/climits60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/clocale61
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cmath631
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/complex1587
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/complex.h42
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/condition_variable225
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/csetjmp64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/csignal60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdarg60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdatomic848
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdbool44
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstddef56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdint79
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdio205
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstdlib242
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cstring123
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ctgmath41
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ctime78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cwchar291
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cwctype126
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cxxabi-forced.h51
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/cxxabi.h608
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/bitset369
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/debug.h130
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/deque515
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/formatter.h392
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/functions.h383
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/list653
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/macros.h246
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/map37
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/map.h412
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/multimap.h400
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/multiset.h396
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_base.h220
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.h643
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.tcc143
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_sequence.h183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/set37
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/set.h401
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/string1074
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_map608
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_set601
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/debug/vector551
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/deque75
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/exception151
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/exception_defines.h49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/exception_ptr.h171
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/algorithm524
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/array_allocator.h154
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/atomicity.h113
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/bitmap_allocator.h1145
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/cast.h113
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/codecvt_specializations.h507
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/concurrence.h322
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/debug_allocator.h124
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/enc_filebuf.h62
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/extptr_allocator.h176
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/functional425
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_map593
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_set561
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/iterator113
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/malloc_allocator.h134
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/memory195
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/mt_allocator.h751
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h130
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric146
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric_traits.h135
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/assoc_container.hpp683
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp173
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp67
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp85
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_types.hpp211
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp497
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp81
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp218
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp272
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp120
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp182
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp211
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp136
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp237
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp381
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp120
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp156
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp146
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp250
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp357
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp152
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp144
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp159
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp246
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp253
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp172
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp116
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp61
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp234
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp97
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp98
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp192
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp73
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp216
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp232
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp636
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp83
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp117
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp191
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp103
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp101
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp95
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp41
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp100
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp43
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp83
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp88
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp133
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp59
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp46
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cond_dealtor.hpp125
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp103
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/container_base_dispatch.hpp332
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/debug_map_base.hpp360
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp179
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp223
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp100
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp85
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp86
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp46
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp40
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp677
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp43
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp111
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp118
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp83
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp100
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp137
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp107
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp108
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp59
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp359
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp327
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp73
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp162
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp154
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp152
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp141
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp150
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp175
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp88
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp349
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp123
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp52
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp95
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp141
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp57
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp135
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp57
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp106
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp80
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp359
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp59
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp86
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp51
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp273
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp84
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp193
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp60
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp63
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp103
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp292
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp522
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp51
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp137
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp236
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp50
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp101
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp216
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp140
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/child_iterator.hpp93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp79
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp111
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp214
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp117
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp319
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp269
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/head.hpp124
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp465
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp599
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp120
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/leaf.hpp171
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_base.hpp128
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp338
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp86
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp515
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp484
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp63
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp103
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp150
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp254
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp229
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp113
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/traits.hpp350
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp100
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp289
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp39
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp46
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp115
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/node.hpp138
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp280
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp313
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp124
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp88
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp121
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp107
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp154
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp262
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp198
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp81
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp211
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp289
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp94
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp161
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp249
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp125
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp137
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp73
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp102
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp157
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp99
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp39
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/node.hpp125
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp283
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp298
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp112
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/traits.hpp113
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/standard_policies.hpp136
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp106
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp112
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp296
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp51
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp326
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp126
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp351
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp55
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp116
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp50
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp141
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_trace_base.hpp209
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp116
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp50
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp151
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_e_access_traits.hpp89
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp99
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp249
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/type_utils.hpp167
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/types_traits.hpp82
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp129
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp151
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/iterator.hpp150
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp143
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/exception.hpp103
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/hash_policy.hpp604
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/list_update_policy.hpp136
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/priority_queue.hpp125
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tag_and_trait.hpp363
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tree_policy.hpp162
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/trie_policy.hpp355
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pod_char_traits.h182
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pointer.h551
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/pool_allocator.h263
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/rb_tree93
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/rc_string_base.h718
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/rope2958
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/ropeimpl.h1701
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/slist1077
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/sso_string_base.h592
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_filebuf.h157
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_sync_filebuf.h279
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/string_conversions.h94
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/throw_allocator.h448
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/type_traits.h204
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/typelist.h544
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.h2598
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.tcc696
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_fwd.h87
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_util.h180
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/fenv.h58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/forward_list46
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/fstream918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/functional78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/initializer_list72
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/iomanip296
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ios47
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/iosfwd160
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/iostream76
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/istream833
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/iterator70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/limits1256
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/list74
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/locale45
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/map68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/memory100
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/mutex774
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/new112
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/numeric78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ostream568
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/queue67
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/random70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/ratio303
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/regex68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/set68
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/sstream576
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/stack64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/stdatomic.h221
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/stdexcept150
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/streambuf799
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/string59
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/system_error353
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tgmath.h42
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/thread284
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/array54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/bessel_function.tcc627
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/beta_function.tcc197
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/ccomplex34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cctype49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfenv53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfloat42
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cinttypes63
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/climits46
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cmath507
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdarg34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdbool40
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdint76
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdio54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdlib54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctgmath34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctime34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctype.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwchar54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwctype54
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/ell_integral.tcc750
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/exp_integral.tcc524
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/fenv.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/float.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional63
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional_hash.h53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/gamma.tcc471
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/hashtable.h53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/hypergeometric.tcc774
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/inttypes.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/legendre_function.tcc305
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/limits.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/math.h186
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/memory67
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/modified_bessel_func.tcc436
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_hermite.tcc124
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_laguerre.tcc329
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/random66
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/regex64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/riemann_zeta.tcc435
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/shared_ptr.h1020
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/special_function_util.h144
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdarg.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdbool.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdint.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdio.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdlib.h52
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/tgmath.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/tuple422
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/type_traits249
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_map61
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_set61
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/utility56
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/wchar.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1/wctype.h34
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/array287
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/boost_sp_counted_base.h239
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cctype43
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cfenv70
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cinttypes64
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cmath902
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/complex370
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdint75
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdio44
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdlib65
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwchar58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwctype43
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional2130
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional_hash.h183
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable1266
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable_policy.h865
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random2407
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random.tcc1577
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/regex2708
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/type_traits501
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_map370
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_set360
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/utility120
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/tuple697
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/type_traits605
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/typeinfo196
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/unordered_map78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/unordered_set78
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/utility94
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/valarray1087
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/include/vector77
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/atomic_word.h47
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/basic_file.h108
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++allocator.h37
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++config.h1431
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++io.h49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++locale.h91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cpu_defines.h33
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_base.h57
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_inline.h71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_noninline.h98
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cxxabi_tweaks.h81
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/error_constants.h175
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/extc++.h69
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-default.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-posix.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-single.h292
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-tpf.h229
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr.h173
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/messages_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/os_defines.h36
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdc++.h111
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdtr1c++.h53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/time_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.abin0 -> 5145720 bytes
-rwxr-xr-x6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.la41
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/atomic_word.h47
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/basic_file.h108
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++allocator.h37
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++config.h1431
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++io.h49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++locale.h91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cpu_defines.h33
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_base.h57
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_inline.h71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_noninline.h98
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cxxabi_tweaks.h81
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/error_constants.h175
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/extc++.h69
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-default.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-posix.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-single.h292
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-tpf.h229
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr.h173
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/messages_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/os_defines.h36
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdc++.h111
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdtr1c++.h53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/time_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.abin0 -> 5089792 bytes
-rwxr-xr-x6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.la41
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/atomic_word.h47
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/basic_file.h108
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++allocator.h37
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++config.h1431
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++io.h49
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++locale.h91
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cpu_defines.h33
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_base.h57
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_inline.h71
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_noninline.h98
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cxxabi_tweaks.h58
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/error_constants.h175
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/extc++.h69
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-default.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-posix.h918
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-single.h292
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-tpf.h229
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr.h173
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/messages_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/os_defines.h36
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdc++.h111
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdtr1c++.h53
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/time_members.h90
-rw-r--r--6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.abin0 -> 4825024 bytes
-rwxr-xr-x6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.la41
-rw-r--r--6/sources/cxx-stl/stlport/LICENSE27
-rw-r--r--6/sources/cxx-stl/stlport/MODULE_LICENSE_BSD_LIKE0
-rw-r--r--6/sources/cxx-stl/stlport/README69
-rw-r--r--6/sources/cxx-stl/stlport/README.android9
-rw-r--r--6/sources/cxx-stl/stlport/README.original64
-rwxr-xr-x6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_shared.sobin0 -> 501010 bytes
-rw-r--r--6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.abin0 -> 623546 bytes
-rwxr-xr-x6/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.sobin0 -> 444635 bytes
-rw-r--r--6/sources/cxx-stl/stlport/libs/armeabi/libstlport_static.abin0 -> 561926 bytes
-rwxr-xr-x6/sources/cxx-stl/stlport/libs/x86/libstlport_shared.sobin0 -> 475388 bytes
-rw-r--r--6/sources/cxx-stl/stlport/libs/x86/libstlport_static.abin0 -> 656336 bytes
-rw-r--r--6/sources/cxx-stl/stlport/stlport/algorithm62
-rw-r--r--6/sources/cxx-stl/stlport/stlport/assert.h50
-rw-r--r--6/sources/cxx-stl/stlport/stlport/bitset70
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cassert46
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cctype47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cerrno55
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cfloat45
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ciso64645
-rw-r--r--6/sources/cxx-stl/stlport/stlport/climits53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/clocale47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cmath53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/complex57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/csetjmp47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/csignal47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cstdarg47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cstddef47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cstdio53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cstdlib54
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cstring47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ctime53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ctype.h114
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cwchar48
-rw-r--r--6/sources/cxx-stl/stlport/stlport/cwctype47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/deque57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/errno.h70
-rw-r--r--6/sources/cxx-stl/stlport/stlport/exception68
-rw-r--r--6/sources/cxx-stl/stlport/stlport/exception.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/float.h52
-rw-r--r--6/sources/cxx-stl/stlport/stlport/fstream66
-rw-r--r--6/sources/cxx-stl/stlport/stlport/fstream.h42
-rw-r--r--6/sources/cxx-stl/stlport/stlport/functional148
-rw-r--r--6/sources/cxx-stl/stlport/stlport/hash_map49
-rw-r--r--6/sources/cxx-stl/stlport/stlport/hash_set49
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iomanip53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iomanip.h53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ios53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ios.h39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iosfwd53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iostream104
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iostream.h106
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iso646.h39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/istream53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/istream.h50
-rw-r--r--6/sources/cxx-stl/stlport/stlport/iterator61
-rw-r--r--6/sources/cxx-stl/stlport/stlport/limits50
-rw-r--r--6/sources/cxx-stl/stlport/stlport/limits.h39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/list57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/locale156
-rw-r--r--6/sources/cxx-stl/stlport/stlport/locale.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/map57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/math.h53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/mem.h58
-rw-r--r--6/sources/cxx-stl/stlport/stlport/memory130
-rw-r--r--6/sources/cxx-stl/stlport/stlport/new47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/new.h50
-rw-r--r--6/sources/cxx-stl/stlport/stlport/numeric54
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ostream52
-rw-r--r--6/sources/cxx-stl/stlport/stlport/ostream.h37
-rw-r--r--6/sources/cxx-stl/stlport/stlport/pthread.h46
-rw-r--r--6/sources/cxx-stl/stlport/stlport/pthread_alloc49
-rw-r--r--6/sources/cxx-stl/stlport/stlport/queue57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/rlocks.h11
-rw-r--r--6/sources/cxx-stl/stlport/stlport/rope44
-rw-r--r--6/sources/cxx-stl/stlport/stlport/set57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/setjmp.h52
-rw-r--r--6/sources/cxx-stl/stlport/stlport/signal.h39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/slist54
-rw-r--r--6/sources/cxx-stl/stlport/stlport/sstream57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stack57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stdarg.h47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stddef.h44
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stdexcept56
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stdio.h57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stdiostream.h10
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stdlib.h67
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_abbrevs.h77
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_algo.c2028
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_algo.h745
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_algobase.c483
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_algobase.h728
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_alloc.c87
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_alloc.h580
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_auto_ptr.h133
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_bitset.c235
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_bitset.h880
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_bvector.h841
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_carray.h61
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cctype.h49
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_clocale.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cmath.h605
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_codecvt.h442
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_collate.h176
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_complex.c145
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_complex.h935
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_config_compat_post.h51
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_construct.h289
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cprolog.h25
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_csetjmp.h68
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_csignal.h41
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cstdarg.h34
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cstddef.h44
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cstdio.h127
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cstdlib.h180
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cstring.h35
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ctime.h56
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ctraits_fns.h91
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ctype.h280
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cwchar.h342
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_cwctype.h89
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_deque.c823
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_deque.h1115
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_epilog.h42
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_exception.h193
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_facets_fwd.h53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_fstream.c766
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_fstream.h714
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_function.h433
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_function_adaptors.h783
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_function_base.h217
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_hash_fun.h146
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_hash_map.h500
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_hash_set.h495
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_hashtable.c553
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_hashtable.h658
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_heap.c246
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_heap.h125
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iomanip.h165
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ios.c127
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ios.h187
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ios_base.h345
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ioserr.h12
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iosfwd.h159
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iostream_string.h140
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_istream.c1429
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_istream.h359
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_istreambuf_iterator.h161
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iterator.h265
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h525
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_iterator_old.h334
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_limits.c405
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_limits.h519
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_list.c250
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_list.h742
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_locale.h364
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_map.h435
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_mbstate_t.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_messages_facets.h185
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_monetary.c527
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_monetary.h435
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_move_construct_fwk.h159
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_new.h145
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_num_get.c623
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_num_get.h237
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_num_put.c522
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_num_put.h187
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_numeric.c106
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_numeric.h191
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_numpunct.h176
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ostream.c455
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ostream.h387
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ostreambuf_iterator.h102
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_pair.h186
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_prolog.h18
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_pthread_alloc.h461
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_ptrs_specialize.h83
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_queue.h268
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_range_errors.c84
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_range_errors.h60
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_raw_storage_iter.h80
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_relops_cont.h29
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_relops_hash_cont.h13
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_rope.c1407
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_rope.h2389
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_set.h412
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_slist.c231
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_slist.h914
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_slist_base.c104
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_slist_base.h90
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_sparc_atomic.h61
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_sstream.c465
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_sstream.h266
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stack.h133
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stdexcept.h110
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.c95
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.h98
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stlport_version.h30
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_stream_iterator.h253
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_streambuf.c208
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_streambuf.h287
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string.c673
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string.h1182
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_base.h231
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_fwd.h60
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_hash.h71
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_io.c172
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_io.h77
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_npos.h27
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_operators.h602
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_sum.h414
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_sum_methods.h155
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_string_workaround.h599
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_strstream.h165
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.c57
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.h167
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_threads.c167
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_threads.h687
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_time_facets.c441
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_time_facets.h329
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_tree.c730
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_tree.h684
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_typeinfo.h79
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_uninitialized.h443
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_unordered_map.h443
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_unordered_set.h418
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_valarray.c191
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_valarray.h1684
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_vector.c242
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/_vector.h773
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/boost_type_traits.h150
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/c_locale.h131
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/char_traits.h278
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/concept_checks.h810
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_aix.h3
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_android.h76
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_apcc.h30
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_apple.h118
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_as400.h55
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_auto_link.h61
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_bc.h138
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_como.h207
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_cray.h65
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_cygwin.h9
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_dec.h113
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_dec_vms.h89
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_detect_dll_or_lib.h74
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_dm.h121
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_epilog.h29
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_evc.h333
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_feedback.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_freebsd.h3
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_fujitsu.h7
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_gcc.h198
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_hpacc.h129
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_hpux.h17
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_ibm.h144
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_icc.h44
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_intel.h72
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_kai.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_linux.h125
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_mac.h6
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_macosx.h9
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_mlc.h7
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_msvc.h265
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_mwerks.h159
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_native_headers.h50
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_openbsd.h12
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_prolog.h43
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_sgi.h94
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_solaris.h77
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_sunprocc.h166
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_system.h174
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_warnings_off.h51
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_watcom.h151
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/_windows.h291
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/compat.h80
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/features.h1079
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/host.h342
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/stl_confix.h97
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/stl_mycomp.h282
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/config/user_config.h326
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.c628
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.h473
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_deque.h414
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_hashtable.h340
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_iterator.h457
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_list.h495
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_slist.h613
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_string.h828
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_string_sum_methods.h111
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_tree.h317
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/debug/_vector.h425
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/msl_string.h47
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_deque.h390
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_list.h345
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_set.h564
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_slist.h427
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_tools.h471
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/pointers/_vector.h243
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/type_manips.h321
-rw-r--r--6/sources/cxx-stl/stlport/stlport/stl/type_traits.h626
-rw-r--r--6/sources/cxx-stl/stlport/stlport/streambuf52
-rw-r--r--6/sources/cxx-stl/stlport/stlport/streambuf.h53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/string59
-rw-r--r--6/sources/cxx-stl/stlport/stlport/string.h66
-rw-r--r--6/sources/cxx-stl/stlport/stlport/strstream61
-rw-r--r--6/sources/cxx-stl/stlport/stlport/strstream.h55
-rw-r--r--6/sources/cxx-stl/stlport/stlport/time.h44
-rw-r--r--6/sources/cxx-stl/stlport/stlport/type_traits798
-rw-r--r--6/sources/cxx-stl/stlport/stlport/typeinfo53
-rw-r--r--6/sources/cxx-stl/stlport/stlport/typeinfo.h87
-rw-r--r--6/sources/cxx-stl/stlport/stlport/unordered_map39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/unordered_set39
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/cstring60
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/export12
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/fstream19
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/fstream.h4
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/iomanip.h6
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/iostream.h24
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/ostream.h6
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/streambuf.h1
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/h/strstream.h4
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/iomanip6
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/ios41
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/iosfwd54
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/iostream14
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/istream16
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/locale65
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/ostream10
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/sstream16
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/streambuf5
-rw-r--r--6/sources/cxx-stl/stlport/stlport/using/strstream4
-rw-r--r--6/sources/cxx-stl/stlport/stlport/utility60
-rw-r--r--6/sources/cxx-stl/stlport/stlport/valarray51
-rw-r--r--6/sources/cxx-stl/stlport/stlport/vector59
-rw-r--r--6/sources/cxx-stl/stlport/stlport/wchar.h64
-rw-r--r--6/sources/cxx-stl/stlport/stlport/wctype.h47
-rw-r--r--6/sources/cxx-stl/system/MODULE_LICENSE_BSD0
-rw-r--r--6/sources/cxx-stl/system/NOTICE79
-rw-r--r--6/sources/cxx-stl/system/include/cassert39
-rw-r--r--6/sources/cxx-stl/system/include/cctype60
-rw-r--r--6/sources/cxx-stl/system/include/cerrno40
-rw-r--r--6/sources/cxx-stl/system/include/cfloat39
-rw-r--r--6/sources/cxx-stl/system/include/climits39
-rw-r--r--6/sources/cxx-stl/system/include/cmath75
-rw-r--r--6/sources/cxx-stl/system/include/csetjmp53
-rw-r--r--6/sources/cxx-stl/system/include/csignal50
-rw-r--r--6/sources/cxx-stl/system/include/cstddef50
-rw-r--r--6/sources/cxx-stl/system/include/cstdint40
-rw-r--r--6/sources/cxx-stl/system/include/cstdio96
-rw-r--r--6/sources/cxx-stl/system/include/cstdlib119
-rw-r--r--6/sources/cxx-stl/system/include/cstring70
-rw-r--r--6/sources/cxx-stl/system/include/ctime63
-rw-r--r--6/sources/cxx-stl/system/include/cwchar31
-rw-r--r--6/sources/cxx-stl/system/include/cwctype_is_not_supported31
-rw-r--r--6/sources/cxx-stl/system/include/new32
-rw-r--r--6/sources/cxx-stl/system/include/stl_pair.h122
-rw-r--r--6/sources/cxx-stl/system/include/typeinfo31
-rw-r--r--6/sources/cxx-stl/system/include/utility38
7992 files changed, 424500 insertions, 0 deletions
diff --git a/6/platforms/android-3/arch-arm/usr/include/alloca.h b/6/platforms/android-3/arch-arm/usr/include/alloca.h
new file mode 100644
index 0000000..0c50fc3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/alloca.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ALLOCA_H
+#define _ALLOCA_H
+
+#define alloca(size) __builtin_alloca(size)
+
+#endif /* _ALLOCA_H */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/android/api-level.h b/6/platforms/android-3/arch-arm/usr/include/android/api-level.h
new file mode 100644
index 0000000..2ff8ed4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 3
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/android/log.h b/6/platforms/android-3/arch-arm/usr/include/android/log.h
new file mode 100644
index 0000000..0ea4c29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/android/log.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_LOG_H
+#define _ANDROID_LOG_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit) since
+ * platform release 1.5
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Support routines to send messages to the Android in-kernel log buffer,
+ * which can later be accessed through the 'logcat' utility.
+ *
+ * Each log message must have
+ * - a priority
+ * - a log tag
+ * - some text
+ *
+ * The tag normally corresponds to the component that emits the log message,
+ * and should be reasonably small.
+ *
+ * Log message text may be truncated to less than an implementation-specific
+ * limit (e.g. 1023 characters max).
+ *
+ * Note that a newline character ("\n") will be appended automatically to your
+ * log message, if not already there. It is not possible to send several messages
+ * and have them appear on a single line in logcat.
+ *
+ * PLEASE USE LOGS WITH MODERATION:
+ *
+ * - Sending log messages eats CPU and slow down your application and the
+ * system.
+ *
+ * - The circular log buffer is pretty small (<64KB), sending many messages
+ * might push off other important log messages from the rest of the system.
+ *
+ * - In release builds, only send log messages to account for exceptional
+ * conditions.
+ *
+ * NOTE: These functions MUST be implemented by /system/lib/liblog.so
+ */
+
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Android log priority values, in ascending priority order.
+ */
+typedef enum android_LogPriority {
+ ANDROID_LOG_UNKNOWN = 0,
+ ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */
+ ANDROID_LOG_VERBOSE,
+ ANDROID_LOG_DEBUG,
+ ANDROID_LOG_INFO,
+ ANDROID_LOG_WARN,
+ ANDROID_LOG_ERROR,
+ ANDROID_LOG_FATAL,
+ ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
+} android_LogPriority;
+
+/*
+ * Send a simple string to the log.
+ */
+int __android_log_write(int prio, const char *tag, const char *text);
+
+/*
+ * Send a formatted string to the log, used like printf(fmt,...)
+ */
+int __android_log_print(int prio, const char *tag, const char *fmt, ...)
+#if defined(__GNUC__)
+ __attribute__ ((format(printf, 3, 4)))
+#endif
+ ;
+
+/*
+ * A variant of __android_log_print() that takes a va_list to list
+ * additional parameters.
+ */
+int __android_log_vprint(int prio, const char *tag,
+ const char *fmt, va_list ap);
+
+/*
+ * Log an assertion failure and SIGTRAP the process to have a chance
+ * to inspect it, if a debugger is attached. This uses the FATAL priority.
+ */
+void __android_log_assert(const char *cond, const char *tag,
+ const char *fmt, ...)
+#if defined(__GNUC__)
+ __attribute__ ((noreturn))
+ __attribute__ ((format(printf, 3, 4)))
+#endif
+ ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ANDROID_LOG_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/arpa/inet.h b/6/platforms/android-3/arch-arm/usr/include/arpa/inet.h
new file mode 100644
index 0000000..e78e7c5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/arpa/inet.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ARPA_INET_H_
+#define _ARPA_INET_H_
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+__BEGIN_DECLS
+
+typedef uint32_t in_addr_t;
+
+extern uint32_t inet_addr(const char *);
+
+extern int inet_aton(const char *, struct in_addr *);
+extern char* inet_ntoa(struct in_addr);
+
+extern int inet_pton(int, const char *, void *);
+extern const char* inet_ntop(int, const void *, char *, size_t);
+
+extern unsigned int inet_nsap_addr(const char *, unsigned char *, int);
+extern char* inet_nsap_ntoa(int, const unsigned char *, char *);
+
+__END_DECLS
+
+#endif /* _ARPA_INET_H_ */
+
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/arpa/nameser.h b/6/platforms/android-3/arch-arm/usr/include/arpa/nameser.h
new file mode 100644
index 0000000..028eadc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/arpa/nameser.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _arpa_nameser_h
+#define _arpa_nameser_h
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+/* this header intentionally blank
+ *
+ * the definitions normally found in <arpa/nameser.h> are
+ * really a bunch of resolver's internal declarations that
+ * should not be exposed to client code in any way
+ */
+
+#endif /* _arpa_nameser_h */
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/4level-fixup.h
new file mode 100644
index 0000000..91ae7f4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _4LEVEL_FIXUP_H
+#define _4LEVEL_FIXUP_H
+
+#define __ARCH_HAS_4LEVEL_HACK
+#define __PAGETABLE_PUD_FOLDED
+
+#define PUD_SIZE PGDIR_SIZE
+#define PUD_MASK PGDIR_MASK
+#define PTRS_PER_PUD 1
+
+#define pud_t pgd_t
+
+#define pmd_alloc(mm, pud, address) ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? NULL: pmd_offset(pud, address))
+
+#define pud_alloc(mm, pgd, address) (pgd)
+#define pud_offset(pgd, start) (pgd)
+#define pud_none(pud) 0
+#define pud_bad(pud) 0
+#define pud_present(pud) 1
+#define pud_ERROR(pud) do { } while (0)
+#define pud_clear(pud) pgd_clear(pud)
+
+#undef pud_free_tlb
+#define pud_free_tlb(tlb, x) do { } while (0)
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/audit_dir_write.h
new file mode 100644
index 0000000..1327b59
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1,11 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/__ffs.h
new file mode 100644
index 0000000..3d135bd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS___FFS_H_
+#define _ASM_GENERIC_BITOPS___FFS_H_
+
+#include <asm/types.h>
+
+#if BITS_PER_LONG == 64
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/atomic.h
new file mode 100644
index 0000000..5f53ba9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
+#define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h
new file mode 100644
index 0000000..18da271
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FFZ_H_
+#define _ASM_GENERIC_BITOPS_FFZ_H_
+
+#define ffz(x) __ffs(~(x))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/find.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/find.h
new file mode 100644
index 0000000..8361cfe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FIND_H_
+#define _ASM_GENERIC_BITOPS_FIND_H_
+
+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
+#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls.h
new file mode 100644
index 0000000..8adbf31
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS_H_
+#define _ASM_GENERIC_BITOPS_FLS_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls64.h
new file mode 100644
index 0000000..af77098
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
+#define _ASM_GENERIC_BITOPS_FLS64_H_
+
+#include <asm/types.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/le.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/le.h
new file mode 100644
index 0000000..97ca973
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_LE_H_
+#define _ASM_GENERIC_BITOPS_LE_H_
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
+
+#ifdef __LITTLE_ENDIAN
+
+#define generic_test_le_bit(nr, addr) test_bit(nr, addr)
+#define generic___set_le_bit(nr, addr) __set_bit(nr, addr)
+#define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr)
+
+#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit(nr, addr)
+#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit(nr, addr)
+
+#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit(nr, addr)
+#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr)
+
+#define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset)
+
+#elif defined(__BIG_ENDIAN)
+
+#define generic_test_le_bit(nr, addr) test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___set_le_bit(nr, addr) __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___clear_le_bit(nr, addr) __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+
+#define generic_find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
new file mode 100644
index 0000000..727f736
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/bug.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bug.h
new file mode 100644
index 0000000..d91a135
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/bug.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BUG_H
+#define _ASM_GENERIC_BUG_H
+
+#include <linux/compiler.h>
+
+#ifndef HAVE_ARCH_BUG
+#define BUG()
+#endif
+
+#ifndef HAVE_ARCH_BUG_ON
+#define BUG_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#ifndef HAVE_ARCH_WARN_ON
+#define WARN_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#define WARN_ON_ONCE(condition) ({ static int __warn_once = 1; int __ret = 0; if (unlikely((condition) && __warn_once)) { __warn_once = 0; WARN_ON(1); __ret = 1; } __ret; })
+
+#define WARN_ON_SMP(x) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/cputime.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/cputime.h
new file mode 100644
index 0000000..0486b87
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/cputime.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_CPUTIME_H
+#define _ASM_GENERIC_CPUTIME_H
+
+#include <linux/time.h>
+#include <linux/jiffies.h>
+
+typedef unsigned long cputime_t;
+
+#define cputime_zero (0UL)
+#define cputime_max ((~0UL >> 1) - 1)
+#define cputime_add(__a, __b) ((__a) + (__b))
+#define cputime_sub(__a, __b) ((__a) - (__b))
+#define cputime_div(__a, __n) ((__a) / (__n))
+#define cputime_halve(__a) ((__a) >> 1)
+#define cputime_eq(__a, __b) ((__a) == (__b))
+#define cputime_gt(__a, __b) ((__a) > (__b))
+#define cputime_ge(__a, __b) ((__a) >= (__b))
+#define cputime_lt(__a, __b) ((__a) < (__b))
+#define cputime_le(__a, __b) ((__a) <= (__b))
+#define cputime_to_jiffies(__ct) (__ct)
+#define jiffies_to_cputime(__hz) (__hz)
+
+typedef u64 cputime64_t;
+
+#define cputime64_zero (0ULL)
+#define cputime64_add(__a, __b) ((__a) + (__b))
+#define cputime64_sub(__a, __b) ((__a) - (__b))
+#define cputime64_to_jiffies64(__ct) (__ct)
+#define jiffies64_to_cputime64(__jif) (__jif)
+#define cputime_to_cputime64(__ct) ((u64) __ct)
+
+#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
+#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
+
+#define cputime_to_secs(jif) ((jif) / HZ)
+#define secs_to_cputime(sec) ((sec) * HZ)
+
+#define timespec_to_cputime(__val) timespec_to_jiffies(__val)
+#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
+
+#define timeval_to_cputime(__val) timeval_to_jiffies(__val)
+#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
+
+#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
+#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
+
+#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/emergency-restart.h
new file mode 100644
index 0000000..619c682
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
+#define _ASM_GENERIC_EMERGENCY_RESTART_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h
new file mode 100644
index 0000000..2fb4a33
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_BASE_H
+#define _ASM_GENERIC_ERRNO_BASE_H
+
+#define EPERM 1
+#define ENOENT 2
+#define ESRCH 3
+#define EINTR 4
+#define EIO 5
+#define ENXIO 6
+#define E2BIG 7
+#define ENOEXEC 8
+#define EBADF 9
+#define ECHILD 10
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EFAULT 14
+#define ENOTBLK 15
+#define EBUSY 16
+#define EEXIST 17
+#define EXDEV 18
+#define ENODEV 19
+#define ENOTDIR 20
+#define EISDIR 21
+#define EINVAL 22
+#define ENFILE 23
+#define EMFILE 24
+#define ENOTTY 25
+#define ETXTBSY 26
+#define EFBIG 27
+#define ENOSPC 28
+#define ESPIPE 29
+#define EROFS 30
+#define EMLINK 31
+#define EPIPE 32
+#define EDOM 33
+#define ERANGE 34
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h
new file mode 100644
index 0000000..11dd00f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_H
+#define _ASM_GENERIC_ERRNO_H
+
+#include <asm-generic/errno-base.h>
+
+#define EDEADLK 35
+#define ENAMETOOLONG 36
+#define ENOLCK 37
+#define ENOSYS 38
+#define ENOTEMPTY 39
+#define ELOOP 40
+#define EWOULDBLOCK EAGAIN
+#define ENOMSG 42
+#define EIDRM 43
+#define ECHRNG 44
+#define EL2NSYNC 45
+#define EL3HLT 46
+#define EL3RST 47
+#define ELNRNG 48
+#define EUNATCH 49
+#define ENOCSI 50
+#define EL2HLT 51
+#define EBADE 52
+#define EBADR 53
+#define EXFULL 54
+#define ENOANO 55
+#define EBADRQC 56
+#define EBADSLT 57
+
+#define EDEADLOCK EDEADLK
+
+#define EBFONT 59
+#define ENOSTR 60
+#define ENODATA 61
+#define ETIME 62
+#define ENOSR 63
+#define ENONET 64
+#define ENOPKG 65
+#define EREMOTE 66
+#define ENOLINK 67
+#define EADV 68
+#define ESRMNT 69
+#define ECOMM 70
+#define EPROTO 71
+#define EMULTIHOP 72
+#define EDOTDOT 73
+#define EBADMSG 74
+#define EOVERFLOW 75
+#define ENOTUNIQ 76
+#define EBADFD 77
+#define EREMCHG 78
+#define ELIBACC 79
+#define ELIBBAD 80
+#define ELIBSCN 81
+#define ELIBMAX 82
+#define ELIBEXEC 83
+#define EILSEQ 84
+#define ERESTART 85
+#define ESTRPIPE 86
+#define EUSERS 87
+#define ENOTSOCK 88
+#define EDESTADDRREQ 89
+#define EMSGSIZE 90
+#define EPROTOTYPE 91
+#define ENOPROTOOPT 92
+#define EPROTONOSUPPORT 93
+#define ESOCKTNOSUPPORT 94
+#define EOPNOTSUPP 95
+#define EPFNOSUPPORT 96
+#define EAFNOSUPPORT 97
+#define EADDRINUSE 98
+#define EADDRNOTAVAIL 99
+#define ENETDOWN 100
+#define ENETUNREACH 101
+#define ENETRESET 102
+#define ECONNABORTED 103
+#define ECONNRESET 104
+#define ENOBUFS 105
+#define EISCONN 106
+#define ENOTCONN 107
+#define ESHUTDOWN 108
+#define ETOOMANYREFS 109
+#define ETIMEDOUT 110
+#define ECONNREFUSED 111
+#define EHOSTDOWN 112
+#define EHOSTUNREACH 113
+#define EALREADY 114
+#define EINPROGRESS 115
+#define ESTALE 116
+#define EUCLEAN 117
+#define ENOTNAM 118
+#define ENAVAIL 119
+#define EISNAM 120
+#define EREMOTEIO 121
+#define EDQUOT 122
+
+#define ENOMEDIUM 123
+#define EMEDIUMTYPE 124
+#define ECANCELED 125
+#define ENOKEY 126
+#define EKEYEXPIRED 127
+#define EKEYREVOKED 128
+#define EKEYREJECTED 129
+
+#define EOWNERDEAD 130
+#define ENOTRECOVERABLE 131
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h
new file mode 100644
index 0000000..a53b536
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h
@@ -0,0 +1,148 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FCNTL_H
+#define _ASM_GENERIC_FCNTL_H
+
+#include <linux/types.h>
+
+#define O_ACCMODE 00000003
+#define O_RDONLY 00000000
+#define O_WRONLY 00000001
+#define O_RDWR 00000002
+#ifndef O_CREAT
+#define O_CREAT 00000100
+#endif
+#ifndef O_EXCL
+#define O_EXCL 00000200
+#endif
+#ifndef O_NOCTTY
+#define O_NOCTTY 00000400
+#endif
+#ifndef O_TRUNC
+#define O_TRUNC 00001000
+#endif
+#ifndef O_APPEND
+#define O_APPEND 00002000
+#endif
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 00004000
+#endif
+#ifndef O_SYNC
+#define O_SYNC 00010000
+#endif
+#ifndef FASYNC
+#define FASYNC 00020000
+#endif
+#ifndef O_DIRECT
+#define O_DIRECT 00040000
+#endif
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 00100000
+#endif
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 00200000
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 00400000
+#endif
+#ifndef O_NOATIME
+#define O_NOATIME 01000000
+#endif
+#ifndef O_NDELAY
+#define O_NDELAY O_NONBLOCK
+#endif
+
+#define F_DUPFD 0
+#define F_GETFD 1
+#define F_SETFD 2
+#define F_GETFL 3
+#define F_SETFL 4
+#ifndef F_GETLK
+#define F_GETLK 5
+#define F_SETLK 6
+#define F_SETLKW 7
+#endif
+#ifndef F_SETOWN
+#define F_SETOWN 8
+#define F_GETOWN 9
+#endif
+#ifndef F_SETSIG
+#define F_SETSIG 10
+#define F_GETSIG 11
+#endif
+
+#define FD_CLOEXEC 1
+
+#ifndef F_RDLCK
+#define F_RDLCK 0
+#define F_WRLCK 1
+#define F_UNLCK 2
+#endif
+
+#ifndef F_EXLCK
+#define F_EXLCK 4
+#define F_SHLCK 8
+#endif
+
+#ifndef F_INPROGRESS
+#define F_INPROGRESS 16
+#endif
+
+#define LOCK_SH 1
+#define LOCK_EX 2
+#define LOCK_NB 4
+#define LOCK_UN 8
+
+#define LOCK_MAND 32
+#define LOCK_READ 64
+#define LOCK_WRITE 128
+#define LOCK_RW 192
+
+#define F_LINUX_SPECIFIC_BASE 1024
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK
+#ifndef __ARCH_FLOCK_PAD
+#define __ARCH_FLOCK_PAD
+#endif
+
+struct flock {
+ short l_type;
+ short l_whence;
+ off_t l_start;
+ off_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK_PAD
+};
+#endif
+
+#ifndef F_GETLK64
+#define F_GETLK64 12
+#define F_SETLK64 13
+#define F_SETLKW64 14
+#endif
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK64
+#ifndef __ARCH_FLOCK64_PAD
+#define __ARCH_FLOCK64_PAD
+#endif
+
+struct flock64 {
+ short l_type;
+ short l_whence;
+ loff_t l_start;
+ loff_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK64_PAD
+};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/futex.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/futex.h
new file mode 100644
index 0000000..05d3afe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/futex.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FUTEX_H
+#define _ASM_GENERIC_FUTEX_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/ioctl.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/ioctl.h
new file mode 100644
index 0000000..cba2b8e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/ioctl.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IOCTL_H
+#define _ASM_GENERIC_IOCTL_H
+
+#define _IOC_NRBITS 8
+#define _IOC_TYPEBITS 8
+#define _IOC_SIZEBITS 14
+#define _IOC_DIRBITS 2
+
+#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
+
+#define _IOC_NRSHIFT 0
+#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
+
+#define _IOC_NONE 0U
+#define _IOC_WRITE 1U
+#define _IOC_READ 2U
+
+#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
+
+extern unsigned int __invalid_size_argument_for_IOC;
+#define _IOC_TYPECHECK(t) ((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC)
+
+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
+#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
+#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
+#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
+#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
+
+#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
+#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
+#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
+#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
+#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/ipc.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/ipc.h
new file mode 100644
index 0000000..57657a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/ipc.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IPC_H
+#define _ASM_GENERIC_IPC_H
+
+struct ipc_kludge {
+ struct msgbuf __user *msgp;
+ long msgtyp;
+};
+
+#define SEMOP 1
+#define SEMGET 2
+#define SEMCTL 3
+#define SEMTIMEDOP 4
+#define MSGSND 11
+#define MSGRCV 12
+#define MSGGET 13
+#define MSGCTL 14
+#define SHMAT 21
+#define SHMDT 22
+#define SHMGET 23
+#define SHMCTL 24
+
+#define DIPC 25
+
+#define IPCCALL(version,op) ((version)<<16 | (op))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/local.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/local.h
new file mode 100644
index 0000000..cae0d54
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/local.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_LOCAL_H
+#define _ASM_GENERIC_LOCAL_H
+
+#include <linux/percpu.h>
+#include <linux/hardirq.h>
+#include <asm/atomic.h>
+#include <asm/types.h>
+
+typedef struct
+{
+ atomic_long_t a;
+} local_t;
+
+#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
+
+#define local_read(l) atomic_long_read(&(l)->a)
+#define local_set(l,i) atomic_long_set((&(l)->a),(i))
+#define local_inc(l) atomic_long_inc(&(l)->a)
+#define local_dec(l) atomic_long_dec(&(l)->a)
+#define local_add(i,l) atomic_long_add((i),(&(l)->a))
+#define local_sub(i,l) atomic_long_sub((i),(&(l)->a))
+
+#define __local_inc(l) local_set((l), local_read(l) + 1)
+#define __local_dec(l) local_set((l), local_read(l) - 1)
+#define __local_add(i,l) local_set((l), local_read(l) + (i))
+#define __local_sub(i,l) local_set((l), local_read(l) - (i))
+
+#define cpu_local_read(v) local_read(&__get_cpu_var(v))
+#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i))
+#define cpu_local_inc(v) local_inc(&__get_cpu_var(v))
+#define cpu_local_dec(v) local_dec(&__get_cpu_var(v))
+#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v))
+#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v))
+
+#define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v))
+#define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v))
+#define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v))
+#define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/memory_model.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/memory_model.h
new file mode 100644
index 0000000..fa7602e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/memory_model.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MEMORY_MODEL_H
+#define __ASM_MEMORY_MODEL_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/mman.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/mman.h
new file mode 100644
index 0000000..98d2783
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/mman.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MMAN_H
+#define _ASM_GENERIC_MMAN_H
+
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define PROT_EXEC 0x4
+#define PROT_SEM 0x8
+#define PROT_NONE 0x0
+#define PROT_GROWSDOWN 0x01000000
+#define PROT_GROWSUP 0x02000000
+
+#define MAP_SHARED 0x01
+#define MAP_PRIVATE 0x02
+#define MAP_TYPE 0x0f
+#define MAP_FIXED 0x10
+#define MAP_ANONYMOUS 0x20
+
+#define MS_ASYNC 1
+#define MS_INVALIDATE 2
+#define MS_SYNC 4
+
+#define MADV_NORMAL 0
+#define MADV_RANDOM 1
+#define MADV_SEQUENTIAL 2
+#define MADV_WILLNEED 3
+#define MADV_DONTNEED 4
+
+#define MADV_REMOVE 9
+#define MADV_DONTFORK 10
+#define MADV_DOFORK 11
+
+#define MAP_ANON MAP_ANONYMOUS
+#define MAP_FILE 0
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/mutex-xchg.h
new file mode 100644
index 0000000..63a557e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MUTEX_XCHG_H
+#define _ASM_GENERIC_MUTEX_XCHG_H
+
+#define __mutex_slowpath_needs_to_unlock() 0
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/percpu.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/percpu.h
new file mode 100644
index 0000000..e498300
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/percpu.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PERCPU_H_
+#define _ASM_GENERIC_PERCPU_H_
+#include <linux/compiler.h>
+
+#define __GENERIC_PER_CPU
+
+#define DEFINE_PER_CPU(type, name) __typeof__(type) per_cpu__##name
+
+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var) per_cpu__##var
+#define __raw_get_cpu_var(var) per_cpu__##var
+
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable-nopud.h
new file mode 100644
index 0000000..585f816
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PGTABLE_NOPUD_H
+#define _PGTABLE_NOPUD_H
+
+#ifndef __ASSEMBLY__
+
+#define __PAGETABLE_PUD_FOLDED
+
+typedef struct { pgd_t pgd; } pud_t;
+
+#define PUD_SHIFT PGDIR_SHIFT
+#define PTRS_PER_PUD 1
+#define PUD_SIZE (1UL << PUD_SHIFT)
+#define PUD_MASK (~(PUD_SIZE-1))
+
+#define pud_ERROR(pud) (pgd_ERROR((pud).pgd))
+#define pgd_populate(mm, pgd, pud) do { } while (0)
+#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
+#define pud_val(x) (pgd_val((x).pgd))
+#define __pud(x) ((pud_t) { __pgd(x) } )
+#define pgd_page(pgd) (pud_page((pud_t){ pgd }))
+#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd }))
+#define pud_alloc_one(mm, address) NULL
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable.h
new file mode 100644
index 0000000..a21cdba
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/pgtable.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PGTABLE_H
+#define _ASM_GENERIC_PGTABLE_H
+
+#ifndef __HAVE_ARCH_PTEP_ESTABLISH
+
+#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
+#define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#else
+#define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_atomic(__ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#endif
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
+
+#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define ptep_test_and_clear_young(__vma, __address, __ptep) ({ pte_t __pte = *(__ptep); int r = 1; if (!pte_young(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkold(__pte)); r; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
+#define ptep_clear_flush_young(__vma, __address, __ptep) ({ int __young; __young = ptep_test_and_clear_young(__vma, __address, __ptep); if (__young) flush_tlb_page(__vma, __address); __young; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#define ptep_test_and_clear_dirty(__vma, __address, __ptep) ({ pte_t __pte = *__ptep; int r = 1; if (!pte_dirty(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkclean(__pte)); r; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
+#define ptep_clear_flush_dirty(__vma, __address, __ptep) ({ int __dirty; __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); if (__dirty) flush_tlb_page(__vma, __address); __dirty; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define ptep_get_and_clear(__mm, __address, __ptep) ({ pte_t __pte = *(__ptep); pte_clear((__mm), (__address), (__ptep)); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
+#define ptep_get_and_clear_full(__mm, __address, __ptep, __full) ({ pte_t __pte; __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
+#define pte_clear_full(__mm, __address, __ptep, __full) do { pte_clear((__mm), (__address), (__ptep)); } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
+#define ptep_clear_flush(__vma, __address, __ptep) ({ pte_t __pte; __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); flush_tlb_page(__vma, __address); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
+struct mm_struct;
+#endif
+#ifndef __HAVE_ARCH_PTE_SAME
+#define pte_same(A,B) (pte_val(A) == pte_val(B))
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
+#define page_test_and_clear_dirty(page) (0)
+#define pte_maybe_dirty(pte) pte_dirty(pte)
+#else
+#define pte_maybe_dirty(pte) (1)
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG
+#define page_test_and_clear_young(page) (0)
+#endif
+#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
+#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
+#endif
+#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
+#define lazy_mmu_prot_update(pte) do { } while (0)
+#endif
+#ifndef __HAVE_ARCH_MOVE_PTE
+#define move_pte(pte, prot, old_addr, new_addr) (pte)
+#endif
+#define pgd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#ifndef pud_addr_end
+#define pud_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#endif
+#ifndef pmd_addr_end
+#define pmd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#endif
+#ifndef __ASSEMBLY__
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/poll.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/poll.h
new file mode 100644
index 0000000..b8cd3da
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/poll.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_GENERIC_POLL_H
+#define __ASM_GENERIC_POLL_H
+
+#define POLLIN 0x0001
+#define POLLPRI 0x0002
+#define POLLOUT 0x0004
+#define POLLERR 0x0008
+#define POLLHUP 0x0010
+#define POLLNVAL 0x0020
+
+#define POLLRDNORM 0x0040
+#define POLLRDBAND 0x0080
+#ifndef POLLWRNORM
+#define POLLWRNORM 0x0100
+#endif
+#ifndef POLLWRBAND
+#define POLLWRBAND 0x0200
+#endif
+#ifndef POLLMSG
+#define POLLMSG 0x0400
+#endif
+#ifndef POLLREMOVE
+#define POLLREMOVE 0x1000
+#endif
+#ifndef POLLRDHUP
+#define POLLRDHUP 0x2000
+#endif
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h
new file mode 100644
index 0000000..a7f7dec
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/resource.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_RESOURCE_H
+#define _ASM_GENERIC_RESOURCE_H
+
+#define RLIMIT_CPU 0
+#define RLIMIT_FSIZE 1
+#define RLIMIT_DATA 2
+#define RLIMIT_STACK 3
+#define RLIMIT_CORE 4
+
+#ifndef RLIMIT_RSS
+#define RLIMIT_RSS 5
+#endif
+
+#ifndef RLIMIT_NPROC
+#define RLIMIT_NPROC 6
+#endif
+
+#ifndef RLIMIT_NOFILE
+#define RLIMIT_NOFILE 7
+#endif
+
+#ifndef RLIMIT_MEMLOCK
+#define RLIMIT_MEMLOCK 8
+#endif
+
+#ifndef RLIMIT_AS
+#define RLIMIT_AS 9
+#endif
+
+#define RLIMIT_LOCKS 10
+#define RLIMIT_SIGPENDING 11
+#define RLIMIT_MSGQUEUE 12
+#define RLIMIT_NICE 13
+#define RLIMIT_RTPRIO 14
+
+#define RLIM_NLIMITS 15
+
+#ifndef RLIM_INFINITY
+#define RLIM_INFINITY (~0UL)
+#endif
+
+#ifndef _STK_LIM_MAX
+#define _STK_LIM_MAX RLIM_INFINITY
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/sections.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/sections.h
new file mode 100644
index 0000000..e9eaa46
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/sections.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SECTIONS_H_
+#define _ASM_GENERIC_SECTIONS_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h
new file mode 100644
index 0000000..d6743a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h
@@ -0,0 +1,213 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SIGINFO_H
+#define _ASM_GENERIC_SIGINFO_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+typedef union sigval {
+ int sival_int;
+ void __user *sival_ptr;
+} sigval_t;
+
+#ifndef __ARCH_SI_PREAMBLE_SIZE
+#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#endif
+
+#define SI_MAX_SIZE 128
+#ifndef SI_PAD_SIZE
+#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+#endif
+
+#ifndef __ARCH_SI_UID_T
+#define __ARCH_SI_UID_T uid_t
+#endif
+
+#ifndef __ARCH_SI_BAND_T
+#define __ARCH_SI_BAND_T long
+#endif
+
+#ifndef HAVE_ARCH_SIGINFO_T
+
+typedef struct siginfo {
+ int si_signo;
+ int si_errno;
+ int si_code;
+
+ union {
+ int _pad[SI_PAD_SIZE];
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ } _kill;
+
+ struct {
+ timer_t _tid;
+ int _overrun;
+ char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+ sigval_t _sigval;
+ int _sys_private;
+ } _timer;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ sigval_t _sigval;
+ } _rt;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ int _status;
+ clock_t _utime;
+ clock_t _stime;
+ } _sigchld;
+
+ struct {
+ void __user *_addr;
+#ifdef __ARCH_SI_TRAPNO
+ int _trapno;
+#endif
+ } _sigfault;
+
+ struct {
+ __ARCH_SI_BAND_T _band;
+ int _fd;
+ } _sigpoll;
+ } _sifields;
+} siginfo_t;
+
+#endif
+
+#define si_pid _sifields._kill._pid
+#define si_uid _sifields._kill._uid
+#define si_tid _sifields._timer._tid
+#define si_overrun _sifields._timer._overrun
+#define si_sys_private _sifields._timer._sys_private
+#define si_status _sifields._sigchld._status
+#define si_utime _sifields._sigchld._utime
+#define si_stime _sifields._sigchld._stime
+#define si_value _sifields._rt._sigval
+#define si_int _sifields._rt._sigval.sival_int
+#define si_ptr _sifields._rt._sigval.sival_ptr
+#define si_addr _sifields._sigfault._addr
+#ifdef __ARCH_SI_TRAPNO
+#define si_trapno _sifields._sigfault._trapno
+#endif
+#define si_band _sifields._sigpoll._band
+#define si_fd _sifields._sigpoll._fd
+
+#define __SI_KILL 0
+#define __SI_TIMER 0
+#define __SI_POLL 0
+#define __SI_FAULT 0
+#define __SI_CHLD 0
+#define __SI_RT 0
+#define __SI_MESGQ 0
+#define __SI_CODE(T,N) (N)
+
+#define SI_USER 0
+#define SI_KERNEL 0x80
+#define SI_QUEUE -1
+#define SI_TIMER __SI_CODE(__SI_TIMER,-2)
+#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3)
+#define SI_ASYNCIO -4
+#define SI_SIGIO -5
+#define SI_TKILL -6
+#define SI_DETHREAD -7
+
+#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
+#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
+
+#define ILL_ILLOPC (__SI_FAULT|1)
+#define ILL_ILLOPN (__SI_FAULT|2)
+#define ILL_ILLADR (__SI_FAULT|3)
+#define ILL_ILLTRP (__SI_FAULT|4)
+#define ILL_PRVOPC (__SI_FAULT|5)
+#define ILL_PRVREG (__SI_FAULT|6)
+#define ILL_COPROC (__SI_FAULT|7)
+#define ILL_BADSTK (__SI_FAULT|8)
+#define NSIGILL 8
+
+#define FPE_INTDIV (__SI_FAULT|1)
+#define FPE_INTOVF (__SI_FAULT|2)
+#define FPE_FLTDIV (__SI_FAULT|3)
+#define FPE_FLTOVF (__SI_FAULT|4)
+#define FPE_FLTUND (__SI_FAULT|5)
+#define FPE_FLTRES (__SI_FAULT|6)
+#define FPE_FLTINV (__SI_FAULT|7)
+#define FPE_FLTSUB (__SI_FAULT|8)
+#define NSIGFPE 8
+
+#define SEGV_MAPERR (__SI_FAULT|1)
+#define SEGV_ACCERR (__SI_FAULT|2)
+#define NSIGSEGV 2
+
+#define BUS_ADRALN (__SI_FAULT|1)
+#define BUS_ADRERR (__SI_FAULT|2)
+#define BUS_OBJERR (__SI_FAULT|3)
+#define NSIGBUS 3
+
+#define TRAP_BRKPT (__SI_FAULT|1)
+#define TRAP_TRACE (__SI_FAULT|2)
+#define NSIGTRAP 2
+
+#define CLD_EXITED (__SI_CHLD|1)
+#define CLD_KILLED (__SI_CHLD|2)
+#define CLD_DUMPED (__SI_CHLD|3)
+#define CLD_TRAPPED (__SI_CHLD|4)
+#define CLD_STOPPED (__SI_CHLD|5)
+#define CLD_CONTINUED (__SI_CHLD|6)
+#define NSIGCHLD 6
+
+#define POLL_IN (__SI_POLL|1)
+#define POLL_OUT (__SI_POLL|2)
+#define POLL_MSG (__SI_POLL|3)
+#define POLL_ERR (__SI_POLL|4)
+#define POLL_PRI (__SI_POLL|5)
+#define POLL_HUP (__SI_POLL|6)
+#define NSIGPOLL 6
+
+#define SIGEV_SIGNAL 0
+#define SIGEV_NONE 1
+#define SIGEV_THREAD 2
+#define SIGEV_THREAD_ID 4
+
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
+#endif
+
+#define SIGEV_MAX_SIZE 64
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
+
+typedef struct sigevent {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+ union {
+ int _pad[SIGEV_PAD_SIZE];
+ int _tid;
+
+ struct {
+ void (*_function)(sigval_t);
+ void *_attribute;
+ } _sigev_thread;
+ } _sigev_un;
+} sigevent_t;
+
+#define sigev_notify_function _sigev_un._sigev_thread._function
+#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+#define sigev_notify_thread_id _sigev_un._tid
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h
new file mode 100644
index 0000000..226d99c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_GENERIC_SIGNAL_H
+#define __ASM_GENERIC_SIGNAL_H
+
+#include <linux/compiler.h>
+
+#ifndef SIG_BLOCK
+#define SIG_BLOCK 0
+#endif
+#ifndef SIG_UNBLOCK
+#define SIG_UNBLOCK 1
+#endif
+#ifndef SIG_SETMASK
+#define SIG_SETMASK 2
+#endif
+
+#ifndef __ASSEMBLY__
+typedef void __signalfn_t(int);
+typedef __signalfn_t __user *__sighandler_t;
+
+typedef void __restorefn_t(void);
+typedef __restorefn_t __user *__sigrestore_t;
+
+#define SIG_DFL ((__force __sighandler_t)0)
+#define SIG_IGN ((__force __sighandler_t)1)
+#define SIG_ERR ((__force __sighandler_t)-1)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/tlb.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/tlb.h
new file mode 100644
index 0000000..dc1e79f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/tlb.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC__TLB_H
+#define _ASM_GENERIC__TLB_H
+
+#include <linux/swap.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+
+#define FREE_PTE_NR 1
+#define tlb_fast_mode(tlb) 1
+
+struct mmu_gather {
+ struct mm_struct *mm;
+ unsigned int nr;
+ unsigned int need_flush;
+ unsigned int fullmm;
+ struct page * pages[FREE_PTE_NR];
+};
+
+#define tlb_remove_tlb_entry(tlb, ptep, address) do { tlb->need_flush = 1; __tlb_remove_tlb_entry(tlb, ptep, address); } while (0)
+#define pte_free_tlb(tlb, ptep) do { tlb->need_flush = 1; __pte_free_tlb(tlb, ptep); } while (0)
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#define pud_free_tlb(tlb, pudp) do { tlb->need_flush = 1; __pud_free_tlb(tlb, pudp); } while (0)
+#endif
+#define pmd_free_tlb(tlb, pmdp) do { tlb->need_flush = 1; __pmd_free_tlb(tlb, pmdp); } while (0)
+#define tlb_migrate_finish(mm) do {} while (0)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/topology.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/topology.h
new file mode 100644
index 0000000..089b1f2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/topology.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_TOPOLOGY_H
+#define _ASM_GENERIC_TOPOLOGY_H
+
+#ifndef cpu_to_node
+#define cpu_to_node(cpu) (0)
+#endif
+#ifndef parent_node
+#define parent_node(node) (0)
+#endif
+#ifndef node_to_cpumask
+#define node_to_cpumask(node) (cpu_online_map)
+#endif
+#ifndef node_to_first_cpu
+#define node_to_first_cpu(node) (0)
+#endif
+#ifndef pcibus_to_node
+#define pcibus_to_node(node) (-1)
+#endif
+
+#ifndef pcibus_to_cpumask
+#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? CPU_MASK_ALL : node_to_cpumask(pcibus_to_node(bus)) )
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm-generic/xor.h b/6/platforms/android-3/arch-arm/usr/include/asm-generic/xor.h
new file mode 100644
index 0000000..6b1e4e8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm-generic/xor.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/processor.h>
+
+#define XOR_TRY_TEMPLATES do { xor_speed(&xor_block_8regs); xor_speed(&xor_block_8regs_p); xor_speed(&xor_block_32regs); xor_speed(&xor_block_32regs_p); } while (0)
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/a.out.h b/6/platforms/android-3/arch-arm/usr/include/asm/a.out.h
new file mode 100644
index 0000000..e8f17dc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/a.out.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARM_A_OUT_H__
+#define __ARM_A_OUT_H__
+
+#include <linux/personality.h>
+#include <asm/types.h>
+
+struct exec
+{
+ __u32 a_info;
+ __u32 a_text;
+ __u32 a_data;
+ __u32 a_bss;
+ __u32 a_syms;
+ __u32 a_entry;
+ __u32 a_trsize;
+ __u32 a_drsize;
+};
+
+#define N_TXTADDR(a) (0x00008000)
+
+#define N_TRSIZE(a) ((a).a_trsize)
+#define N_DRSIZE(a) ((a).a_drsize)
+#define N_SYMSIZE(a) ((a).a_syms)
+
+#define M_ARM 103
+
+#ifndef LIBRARY_START_TEXT
+#define LIBRARY_START_TEXT (0x00c00000)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/board-perseus2.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/board-perseus2.h
new file mode 100644
index 0000000..c6c5413
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/board-perseus2.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_PERSEUS2_H
+#define __ASM_ARCH_OMAP_PERSEUS2_H
+
+#include <asm/arch/fpga.h>
+
+#ifndef OMAP_SDRAM_DEVICE
+#define OMAP_SDRAM_DEVICE D256M_1X16_4B
+#endif
+
+#define MAXIRQNUM IH_BOARD_BASE
+#define MAXFIQNUM MAXIRQNUM
+#define MAXSWINUM MAXIRQNUM
+
+#define NR_IRQS (MAXIRQNUM + 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/board.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/board.h
new file mode 100644
index 0000000..a7a4c66
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/board.h
@@ -0,0 +1,163 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _OMAP_BOARD_H
+#define _OMAP_BOARD_H
+
+#include <linux/types.h>
+
+#include <asm/arch/gpio-switch.h>
+
+#define OMAP_TAG_CLOCK 0x4f01
+#define OMAP_TAG_MMC 0x4f02
+#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
+#define OMAP_TAG_USB 0x4f04
+#define OMAP_TAG_LCD 0x4f05
+#define OMAP_TAG_GPIO_SWITCH 0x4f06
+#define OMAP_TAG_UART 0x4f07
+#define OMAP_TAG_FBMEM 0x4f08
+#define OMAP_TAG_STI_CONSOLE 0x4f09
+#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
+#define OMAP_TAG_BT 0x4f0b
+
+#define OMAP_TAG_BOOT_REASON 0x4f80
+#define OMAP_TAG_FLASH_PART 0x4f81
+#define OMAP_TAG_VERSION_STR 0x4f82
+
+struct omap_clock_config {
+
+ u8 system_clock_type;
+};
+
+struct omap_mmc_conf {
+ unsigned enabled:1;
+
+ unsigned nomux:1;
+
+ unsigned cover:1;
+
+ unsigned wire4:1;
+ s16 power_pin;
+ s16 switch_pin;
+ s16 wp_pin;
+};
+
+struct omap_mmc_config {
+ struct omap_mmc_conf mmc[2];
+};
+
+struct omap_serial_console_config {
+ u8 console_uart;
+ u32 console_speed;
+};
+
+struct omap_sti_console_config {
+ unsigned enable:1;
+ u8 channel;
+};
+
+struct omap_camera_sensor_config {
+ u16 reset_gpio;
+ int (*power_on)(void * data);
+ int (*power_off)(void * data);
+};
+
+struct omap_usb_config {
+
+ unsigned register_host:1;
+ unsigned register_dev:1;
+ u8 otg;
+
+ u8 hmc_mode;
+
+ u8 rwc;
+
+ u8 pins[3];
+};
+
+struct omap_lcd_config {
+ char panel_name[16];
+ char ctrl_name[16];
+ s16 nreset_gpio;
+ u8 data_lines;
+};
+
+struct device;
+struct fb_info;
+struct omap_backlight_config {
+ int default_intensity;
+ int (*set_power)(struct device *dev, int state);
+ int (*check_fb)(struct fb_info *fb);
+};
+
+struct omap_fbmem_config {
+ u32 start;
+ u32 size;
+};
+
+struct omap_pwm_led_platform_data {
+ const char *name;
+ int intensity_timer;
+ int blink_timer;
+ void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
+};
+
+struct omap_gpio_switch_config {
+ char name[12];
+ u16 gpio;
+ int flags:4;
+ int type:4;
+ int key_code:24;
+};
+
+struct omap_uart_config {
+
+ unsigned int enabled_uarts;
+};
+
+struct omap_flash_part_config {
+ char part_table[0];
+};
+
+struct omap_boot_reason_config {
+ char reason_str[12];
+};
+
+struct omap_version_config {
+ char component[12];
+ char version[12];
+};
+
+struct omap_board_config_entry {
+ u16 tag;
+ u16 len;
+ u8 data[0];
+};
+
+struct omap_board_config_kernel {
+ u16 tag;
+ const void *data;
+};
+
+struct omap_bluetooth_config {
+ u8 chip_type;
+ u8 bt_uart;
+ u8 bd_addr[6];
+ u8 bt_sysclk;
+ int bt_wakeup_gpio;
+ int host_wakeup_gpio;
+ int reset_gpio;
+};
+
+#define omap_get_config(tag, type) ((const type *) __omap_get_config((tag), sizeof(type), 0))
+#define omap_get_nr_config(tag, type, nr) ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/cpu.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/cpu.h
new file mode 100644
index 0000000..fa7a408
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/cpu.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_CPU_H
+#define __ASM_ARCH_OMAP_CPU_H
+
+#define omap2_cpu_rev() ((system_rev >> 8) & 0x0f)
+
+#undef MULTI_OMAP1
+#undef MULTI_OMAP2
+#undef OMAP_NAME
+
+#define GET_OMAP_CLASS (system_rev & 0xff)
+
+#define IS_OMAP_CLASS(class, id) static inline int is_omap ##class (void) { return (GET_OMAP_CLASS == (id)) ? 1 : 0; }
+
+#define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff)
+
+#define IS_OMAP_SUBCLASS(subclass, id) static inline int is_omap ##subclass (void) { return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; }
+
+#define cpu_is_omap7xx() 0
+#define cpu_is_omap15xx() 0
+#define cpu_is_omap16xx() 0
+#define cpu_is_omap24xx() 0
+#define cpu_is_omap242x() 0
+#define cpu_is_omap243x() 0
+#ifdef MULTI_OMAP1
+#else
+#endif
+#define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff)
+#define IS_OMAP_TYPE(type, id) static inline int is_omap ##type (void) { return (GET_OMAP_TYPE == (id)) ? 1 : 0; }
+#define cpu_is_omap310() 0
+#define cpu_is_omap730() 0
+#define cpu_is_omap1510() 0
+#define cpu_is_omap1610() 0
+#define cpu_is_omap5912() 0
+#define cpu_is_omap1611() 0
+#define cpu_is_omap1621() 0
+#define cpu_is_omap1710() 0
+#define cpu_is_omap2420() 0
+#define cpu_is_omap2422() 0
+#define cpu_is_omap2423() 0
+#define cpu_is_omap2430() 0
+#ifdef MULTI_OMAP1
+#else
+#endif
+#define cpu_class_is_omap1() (cpu_is_omap730() || cpu_is_omap15xx() || cpu_is_omap16xx())
+#define cpu_class_is_omap2() cpu_is_omap24xx()
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/dma.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/dma.h
new file mode 100644
index 0000000..5e5be76
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/dma.h
@@ -0,0 +1,318 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_DMA_H
+#define __ASM_ARCH_DMA_H
+
+#define OMAP_DMA_BASE (0xfffed800)
+#define OMAP_DMA_GCR (OMAP_DMA_BASE + 0x400)
+#define OMAP_DMA_GSCR (OMAP_DMA_BASE + 0x404)
+#define OMAP_DMA_GRST (OMAP_DMA_BASE + 0x408)
+#define OMAP_DMA_HW_ID (OMAP_DMA_BASE + 0x442)
+#define OMAP_DMA_PCH2_ID (OMAP_DMA_BASE + 0x444)
+#define OMAP_DMA_PCH0_ID (OMAP_DMA_BASE + 0x446)
+#define OMAP_DMA_PCH1_ID (OMAP_DMA_BASE + 0x448)
+#define OMAP_DMA_PCHG_ID (OMAP_DMA_BASE + 0x44a)
+#define OMAP_DMA_PCHD_ID (OMAP_DMA_BASE + 0x44c)
+#define OMAP_DMA_CAPS_0_U (OMAP_DMA_BASE + 0x44e)
+#define OMAP_DMA_CAPS_0_L (OMAP_DMA_BASE + 0x450)
+#define OMAP_DMA_CAPS_1_U (OMAP_DMA_BASE + 0x452)
+#define OMAP_DMA_CAPS_1_L (OMAP_DMA_BASE + 0x454)
+#define OMAP_DMA_CAPS_2 (OMAP_DMA_BASE + 0x456)
+#define OMAP_DMA_CAPS_3 (OMAP_DMA_BASE + 0x458)
+#define OMAP_DMA_CAPS_4 (OMAP_DMA_BASE + 0x45a)
+#define OMAP_DMA_PCH2_SR (OMAP_DMA_BASE + 0x460)
+#define OMAP_DMA_PCH0_SR (OMAP_DMA_BASE + 0x480)
+#define OMAP_DMA_PCH1_SR (OMAP_DMA_BASE + 0x482)
+#define OMAP_DMA_PCHD_SR (OMAP_DMA_BASE + 0x4c0)
+
+#define OMAP24XX_DMA_BASE (L4_24XX_BASE + 0x56000)
+#define OMAP_DMA4_REVISION (OMAP24XX_DMA_BASE + 0x00)
+#define OMAP_DMA4_GCR_REG (OMAP24XX_DMA_BASE + 0x78)
+#define OMAP_DMA4_IRQSTATUS_L0 (OMAP24XX_DMA_BASE + 0x08)
+#define OMAP_DMA4_IRQSTATUS_L1 (OMAP24XX_DMA_BASE + 0x0c)
+#define OMAP_DMA4_IRQSTATUS_L2 (OMAP24XX_DMA_BASE + 0x10)
+#define OMAP_DMA4_IRQSTATUS_L3 (OMAP24XX_DMA_BASE + 0x14)
+#define OMAP_DMA4_IRQENABLE_L0 (OMAP24XX_DMA_BASE + 0x18)
+#define OMAP_DMA4_IRQENABLE_L1 (OMAP24XX_DMA_BASE + 0x1c)
+#define OMAP_DMA4_IRQENABLE_L2 (OMAP24XX_DMA_BASE + 0x20)
+#define OMAP_DMA4_IRQENABLE_L3 (OMAP24XX_DMA_BASE + 0x24)
+#define OMAP_DMA4_SYSSTATUS (OMAP24XX_DMA_BASE + 0x28)
+#define OMAP_DMA4_CAPS_0 (OMAP24XX_DMA_BASE + 0x64)
+#define OMAP_DMA4_CAPS_2 (OMAP24XX_DMA_BASE + 0x6c)
+#define OMAP_DMA4_CAPS_3 (OMAP24XX_DMA_BASE + 0x70)
+#define OMAP_DMA4_CAPS_4 (OMAP24XX_DMA_BASE + 0x74)
+
+#define OMAP_LOGICAL_DMA_CH_COUNT 32
+
+#define OMAP_DMA_CCR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x80)
+#define OMAP_DMA_CLNK_CTRL_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x84)
+#define OMAP_DMA_CICR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x88)
+#define OMAP_DMA_CSR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x8c)
+#define OMAP_DMA_CSDP_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x90)
+#define OMAP_DMA_CEN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x94)
+#define OMAP_DMA_CFN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x98)
+#define OMAP_DMA_CSEI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa4)
+#define OMAP_DMA_CSFI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa8)
+#define OMAP_DMA_CDEI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xac)
+#define OMAP_DMA_CDFI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb0)
+#define OMAP_DMA_CSAC_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb4)
+#define OMAP_DMA_CDAC_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb8)
+
+#define OMAP1_DMA_CSSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x08)
+#define OMAP1_DMA_CSSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0a)
+#define OMAP1_DMA_CDSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0c)
+#define OMAP1_DMA_CDSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0e)
+#define OMAP1_DMA_COLOR_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x20)
+#define OMAP1_DMA_CCR2_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x24)
+#define OMAP1_DMA_COLOR_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x22)
+#define OMAP1_DMA_LCH_CTRL_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x2a)
+
+#define OMAP2_DMA_CSSA_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x9c)
+#define OMAP2_DMA_CDSA_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa0)
+#define OMAP2_DMA_CCEN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xbc)
+#define OMAP2_DMA_CCFN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xc0)
+#define OMAP2_DMA_COLOR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xc4)
+
+#define OMAP_DMA_NO_DEVICE 0
+#define OMAP_DMA_MCSI1_TX 1
+#define OMAP_DMA_MCSI1_RX 2
+#define OMAP_DMA_I2C_RX 3
+#define OMAP_DMA_I2C_TX 4
+#define OMAP_DMA_EXT_NDMA_REQ 5
+#define OMAP_DMA_EXT_NDMA_REQ2 6
+#define OMAP_DMA_UWIRE_TX 7
+#define OMAP_DMA_MCBSP1_TX 8
+#define OMAP_DMA_MCBSP1_RX 9
+#define OMAP_DMA_MCBSP3_TX 10
+#define OMAP_DMA_MCBSP3_RX 11
+#define OMAP_DMA_UART1_TX 12
+#define OMAP_DMA_UART1_RX 13
+#define OMAP_DMA_UART2_TX 14
+#define OMAP_DMA_UART2_RX 15
+#define OMAP_DMA_MCBSP2_TX 16
+#define OMAP_DMA_MCBSP2_RX 17
+#define OMAP_DMA_UART3_TX 18
+#define OMAP_DMA_UART3_RX 19
+#define OMAP_DMA_CAMERA_IF_RX 20
+#define OMAP_DMA_MMC_TX 21
+#define OMAP_DMA_MMC_RX 22
+#define OMAP_DMA_NAND 23
+#define OMAP_DMA_IRQ_LCD_LINE 24
+#define OMAP_DMA_MEMORY_STICK 25
+#define OMAP_DMA_USB_W2FC_RX0 26
+#define OMAP_DMA_USB_W2FC_RX1 27
+#define OMAP_DMA_USB_W2FC_RX2 28
+#define OMAP_DMA_USB_W2FC_TX0 29
+#define OMAP_DMA_USB_W2FC_TX1 30
+#define OMAP_DMA_USB_W2FC_TX2 31
+
+#define OMAP_DMA_CRYPTO_DES_IN 32
+#define OMAP_DMA_SPI_TX 33
+#define OMAP_DMA_SPI_RX 34
+#define OMAP_DMA_CRYPTO_HASH 35
+#define OMAP_DMA_CCP_ATTN 36
+#define OMAP_DMA_CCP_FIFO_NOT_EMPTY 37
+#define OMAP_DMA_CMT_APE_TX_CHAN_0 38
+#define OMAP_DMA_CMT_APE_RV_CHAN_0 39
+#define OMAP_DMA_CMT_APE_TX_CHAN_1 40
+#define OMAP_DMA_CMT_APE_RV_CHAN_1 41
+#define OMAP_DMA_CMT_APE_TX_CHAN_2 42
+#define OMAP_DMA_CMT_APE_RV_CHAN_2 43
+#define OMAP_DMA_CMT_APE_TX_CHAN_3 44
+#define OMAP_DMA_CMT_APE_RV_CHAN_3 45
+#define OMAP_DMA_CMT_APE_TX_CHAN_4 46
+#define OMAP_DMA_CMT_APE_RV_CHAN_4 47
+#define OMAP_DMA_CMT_APE_TX_CHAN_5 48
+#define OMAP_DMA_CMT_APE_RV_CHAN_5 49
+#define OMAP_DMA_CMT_APE_TX_CHAN_6 50
+#define OMAP_DMA_CMT_APE_RV_CHAN_6 51
+#define OMAP_DMA_CMT_APE_TX_CHAN_7 52
+#define OMAP_DMA_CMT_APE_RV_CHAN_7 53
+#define OMAP_DMA_MMC2_TX 54
+#define OMAP_DMA_MMC2_RX 55
+#define OMAP_DMA_CRYPTO_DES_OUT 56
+
+#define OMAP24XX_DMA_NO_DEVICE 0
+#define OMAP24XX_DMA_XTI_DMA 1
+#define OMAP24XX_DMA_EXT_DMAREQ0 2
+#define OMAP24XX_DMA_EXT_DMAREQ1 3
+#define OMAP24XX_DMA_GPMC 4
+#define OMAP24XX_DMA_GFX 5
+#define OMAP24XX_DMA_DSS 6
+#define OMAP24XX_DMA_VLYNQ_TX 7
+#define OMAP24XX_DMA_CWT 8
+#define OMAP24XX_DMA_AES_TX 9
+#define OMAP24XX_DMA_AES_RX 10
+#define OMAP24XX_DMA_DES_TX 11
+#define OMAP24XX_DMA_DES_RX 12
+#define OMAP24XX_DMA_SHA1MD5_RX 13
+#define OMAP24XX_DMA_EXT_DMAREQ2 14
+#define OMAP24XX_DMA_EXT_DMAREQ3 15
+#define OMAP24XX_DMA_EXT_DMAREQ4 16
+#define OMAP24XX_DMA_EAC_AC_RD 17
+#define OMAP24XX_DMA_EAC_AC_WR 18
+#define OMAP24XX_DMA_EAC_MD_UL_RD 19
+#define OMAP24XX_DMA_EAC_MD_UL_WR 20
+#define OMAP24XX_DMA_EAC_MD_DL_RD 21
+#define OMAP24XX_DMA_EAC_MD_DL_WR 22
+#define OMAP24XX_DMA_EAC_BT_UL_RD 23
+#define OMAP24XX_DMA_EAC_BT_UL_WR 24
+#define OMAP24XX_DMA_EAC_BT_DL_RD 25
+#define OMAP24XX_DMA_EAC_BT_DL_WR 26
+#define OMAP24XX_DMA_I2C1_TX 27
+#define OMAP24XX_DMA_I2C1_RX 28
+#define OMAP24XX_DMA_I2C2_TX 29
+#define OMAP24XX_DMA_I2C2_RX 30
+#define OMAP24XX_DMA_MCBSP1_TX 31
+#define OMAP24XX_DMA_MCBSP1_RX 32
+#define OMAP24XX_DMA_MCBSP2_TX 33
+#define OMAP24XX_DMA_MCBSP2_RX 34
+#define OMAP24XX_DMA_SPI1_TX0 35
+#define OMAP24XX_DMA_SPI1_RX0 36
+#define OMAP24XX_DMA_SPI1_TX1 37
+#define OMAP24XX_DMA_SPI1_RX1 38
+#define OMAP24XX_DMA_SPI1_TX2 39
+#define OMAP24XX_DMA_SPI1_RX2 40
+#define OMAP24XX_DMA_SPI1_TX3 41
+#define OMAP24XX_DMA_SPI1_RX3 42
+#define OMAP24XX_DMA_SPI2_TX0 43
+#define OMAP24XX_DMA_SPI2_RX0 44
+#define OMAP24XX_DMA_SPI2_TX1 45
+#define OMAP24XX_DMA_SPI2_RX1 46
+
+#define OMAP24XX_DMA_UART1_TX 49
+#define OMAP24XX_DMA_UART1_RX 50
+#define OMAP24XX_DMA_UART2_TX 51
+#define OMAP24XX_DMA_UART2_RX 52
+#define OMAP24XX_DMA_UART3_TX 53
+#define OMAP24XX_DMA_UART3_RX 54
+#define OMAP24XX_DMA_USB_W2FC_TX0 55
+#define OMAP24XX_DMA_USB_W2FC_RX0 56
+#define OMAP24XX_DMA_USB_W2FC_TX1 57
+#define OMAP24XX_DMA_USB_W2FC_RX1 58
+#define OMAP24XX_DMA_USB_W2FC_TX2 59
+#define OMAP24XX_DMA_USB_W2FC_RX2 60
+#define OMAP24XX_DMA_MMC1_TX 61
+#define OMAP24XX_DMA_MMC1_RX 62
+#define OMAP24XX_DMA_MS 63
+#define OMAP24XX_DMA_EXT_DMAREQ5 64
+
+#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
+#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
+#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
+#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
+#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
+#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
+
+#define OMAP1610_DMA_LCD_BASE (0xfffee300)
+#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
+#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
+#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
+#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
+#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
+#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
+#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
+#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
+#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
+#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
+#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
+#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
+#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
+#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
+#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
+#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
+#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
+
+#define OMAP1_DMA_TOUT_IRQ (1 << 0)
+#define OMAP_DMA_DROP_IRQ (1 << 1)
+#define OMAP_DMA_HALF_IRQ (1 << 2)
+#define OMAP_DMA_FRAME_IRQ (1 << 3)
+#define OMAP_DMA_LAST_IRQ (1 << 4)
+#define OMAP_DMA_BLOCK_IRQ (1 << 5)
+#define OMAP1_DMA_SYNC_IRQ (1 << 6)
+#define OMAP2_DMA_PKT_IRQ (1 << 7)
+#define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
+#define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
+#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
+#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
+
+#define OMAP_DMA_DATA_TYPE_S8 0x00
+#define OMAP_DMA_DATA_TYPE_S16 0x01
+#define OMAP_DMA_DATA_TYPE_S32 0x02
+
+#define OMAP_DMA_SYNC_ELEMENT 0x00
+#define OMAP_DMA_SYNC_FRAME 0x01
+#define OMAP_DMA_SYNC_BLOCK 0x02
+
+#define OMAP_DMA_PORT_EMIFF 0x00
+#define OMAP_DMA_PORT_EMIFS 0x01
+#define OMAP_DMA_PORT_OCP_T1 0x02
+#define OMAP_DMA_PORT_TIPB 0x03
+#define OMAP_DMA_PORT_OCP_T2 0x04
+#define OMAP_DMA_PORT_MPUI 0x05
+
+#define OMAP_DMA_AMODE_CONSTANT 0x00
+#define OMAP_DMA_AMODE_POST_INC 0x01
+#define OMAP_DMA_AMODE_SINGLE_IDX 0x02
+#define OMAP_DMA_AMODE_DOUBLE_IDX 0x03
+
+enum {
+ OMAP_LCD_DMA_B1_TOP,
+ OMAP_LCD_DMA_B1_BOTTOM,
+ OMAP_LCD_DMA_B2_TOP,
+ OMAP_LCD_DMA_B2_BOTTOM
+};
+
+enum omap_dma_burst_mode {
+ OMAP_DMA_DATA_BURST_DIS = 0,
+ OMAP_DMA_DATA_BURST_4,
+ OMAP_DMA_DATA_BURST_8,
+ OMAP_DMA_DATA_BURST_16,
+};
+
+enum omap_dma_color_mode {
+ OMAP_DMA_COLOR_DIS = 0,
+ OMAP_DMA_CONSTANT_FILL,
+ OMAP_DMA_TRANSPARENT_COPY
+};
+
+enum omap_dma_write_mode {
+ OMAP_DMA_WRITE_NON_POSTED = 0,
+ OMAP_DMA_WRITE_POSTED,
+ OMAP_DMA_WRITE_LAST_NON_POSTED
+};
+
+struct omap_dma_channel_params {
+ int data_type;
+ int elem_count;
+ int frame_count;
+
+ int src_port;
+ int src_amode;
+ unsigned long src_start;
+ int src_ei;
+ int src_fi;
+
+ int dst_port;
+ int dst_amode;
+ unsigned long dst_start;
+ int dst_ei;
+ int dst_fi;
+
+ int trigger;
+ int sync_mode;
+ int src_or_dst_synch;
+
+ int ie;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/fpga.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/fpga.h
new file mode 100644
index 0000000..a1b210d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/fpga.h
@@ -0,0 +1,160 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_FPGA_H
+#define __ASM_ARCH_OMAP_FPGA_H
+
+#define omap1510_fpga_init_irq() (0)
+
+#define fpga_read(reg) __raw_readb(reg)
+#define fpga_write(val, reg) __raw_writeb(val, reg)
+
+#define H2P2_DBG_FPGA_BASE 0xE8000000
+#define H2P2_DBG_FPGA_SIZE SZ_4K
+#define H2P2_DBG_FPGA_START 0x04000000
+
+#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
+#define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10)
+#define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12)
+#define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14)
+#define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16)
+#define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18)
+#define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A)
+#define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C)
+
+struct h2p2_dbg_fpga {
+
+ u16 smc91x[8];
+
+ u16 fpga_rev;
+ u16 board_rev;
+ u16 gpio_outputs;
+ u16 leds;
+
+ u16 misc_inputs;
+ u16 lan_status;
+ u16 lan_reset;
+ u16 reserved0;
+
+ u16 ps2_data;
+ u16 ps2_ctrl;
+
+};
+
+#define H2P2_DBG_FPGA_LED_GREEN (1 << 15)
+#define H2P2_DBG_FPGA_LED_AMBER (1 << 14)
+#define H2P2_DBG_FPGA_LED_RED (1 << 13)
+#define H2P2_DBG_FPGA_LED_BLUE (1 << 12)
+
+#define H2P2_DBG_FPGA_LOAD_METER (1 << 0)
+#define H2P2_DBG_FPGA_LOAD_METER_SIZE 11
+#define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1)
+
+#define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0)
+#define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1)
+
+#define OMAP1510_FPGA_BASE 0xE8000000
+#define OMAP1510_FPGA_SIZE SZ_4K
+#define OMAP1510_FPGA_START 0x08000000
+
+#define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0)
+#define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1)
+
+#define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2)
+#define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3)
+#define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4)
+#define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5)
+
+#define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6)
+#define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7)
+
+#define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8)
+#define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9)
+
+#define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa)
+#define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb)
+
+#define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc)
+#define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe)
+#define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf)
+#define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14)
+#define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15)
+#define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16)
+#define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18)
+#define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100)
+#define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101)
+#define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102)
+
+#define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204)
+
+#define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205)
+#define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206)
+#define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207)
+#define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208)
+#define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209)
+#define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a)
+#define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b)
+#define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c)
+#define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d)
+#define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e)
+#define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210)
+
+#define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300)
+
+#define OMAP1510_FPGA_RESET_VALUE 0x42
+
+#define OMAP1510_FPGA_PCR_IF_PD0 (1 << 7)
+#define OMAP1510_FPGA_PCR_COM2_EN (1 << 6)
+#define OMAP1510_FPGA_PCR_COM1_EN (1 << 5)
+#define OMAP1510_FPGA_PCR_EXP_PD0 (1 << 4)
+#define OMAP1510_FPGA_PCR_EXP_PD1 (1 << 3)
+#define OMAP1510_FPGA_PCR_48MHZ_CLK (1 << 2)
+#define OMAP1510_FPGA_PCR_4MHZ_CLK (1 << 1)
+#define OMAP1510_FPGA_PCR_RSRVD_BIT0 (1 << 0)
+
+#define OMAP1510_FPGA_HID_SCLK (1<<0)
+#define OMAP1510_FPGA_HID_MOSI (1<<1)
+#define OMAP1510_FPGA_HID_nSS (1<<2)
+#define OMAP1510_FPGA_HID_nHSUS (1<<3)
+#define OMAP1510_FPGA_HID_MISO (1<<4)
+#define OMAP1510_FPGA_HID_ATN (1<<5)
+#define OMAP1510_FPGA_HID_rsrvd (1<<6)
+#define OMAP1510_FPGA_HID_RESETn (1<<7)
+
+#define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13)
+
+#define OMAP1510_IH_FPGA_BASE IH_BOARD_BASE
+#define OMAP1510_INT_FPGA_ATN (OMAP1510_IH_FPGA_BASE + 0)
+#define OMAP1510_INT_FPGA_ACK (OMAP1510_IH_FPGA_BASE + 1)
+#define OMAP1510_INT_FPGA2 (OMAP1510_IH_FPGA_BASE + 2)
+#define OMAP1510_INT_FPGA3 (OMAP1510_IH_FPGA_BASE + 3)
+#define OMAP1510_INT_FPGA4 (OMAP1510_IH_FPGA_BASE + 4)
+#define OMAP1510_INT_FPGA5 (OMAP1510_IH_FPGA_BASE + 5)
+#define OMAP1510_INT_FPGA6 (OMAP1510_IH_FPGA_BASE + 6)
+#define OMAP1510_INT_FPGA7 (OMAP1510_IH_FPGA_BASE + 7)
+#define OMAP1510_INT_FPGA8 (OMAP1510_IH_FPGA_BASE + 8)
+#define OMAP1510_INT_FPGA9 (OMAP1510_IH_FPGA_BASE + 9)
+#define OMAP1510_INT_FPGA10 (OMAP1510_IH_FPGA_BASE + 10)
+#define OMAP1510_INT_FPGA11 (OMAP1510_IH_FPGA_BASE + 11)
+#define OMAP1510_INT_FPGA12 (OMAP1510_IH_FPGA_BASE + 12)
+#define OMAP1510_INT_ETHER (OMAP1510_IH_FPGA_BASE + 13)
+#define OMAP1510_INT_FPGAUART1 (OMAP1510_IH_FPGA_BASE + 14)
+#define OMAP1510_INT_FPGAUART2 (OMAP1510_IH_FPGA_BASE + 15)
+#define OMAP1510_INT_FPGA_TS (OMAP1510_IH_FPGA_BASE + 16)
+#define OMAP1510_INT_FPGA17 (OMAP1510_IH_FPGA_BASE + 17)
+#define OMAP1510_INT_FPGA_CAM (OMAP1510_IH_FPGA_BASE + 18)
+#define OMAP1510_INT_FPGA_RTC_A (OMAP1510_IH_FPGA_BASE + 19)
+#define OMAP1510_INT_FPGA_RTC_B (OMAP1510_IH_FPGA_BASE + 20)
+#define OMAP1510_INT_FPGA_CD (OMAP1510_IH_FPGA_BASE + 21)
+#define OMAP1510_INT_FPGA22 (OMAP1510_IH_FPGA_BASE + 22)
+#define OMAP1510_INT_FPGA23 (OMAP1510_IH_FPGA_BASE + 23)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio-switch.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio-switch.h
new file mode 100644
index 0000000..20ea3f2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio-switch.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
+#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
+
+#include <linux/types.h>
+
+#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
+#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
+#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
+#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
+#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
+
+struct omap_gpio_switch {
+ const char *name;
+ s16 gpio;
+ unsigned flags:4;
+ unsigned type:4;
+
+ u16 debounce_rising;
+
+ u16 debounce_falling;
+
+ void (* notify)(void *data, int state);
+ void *notify_data;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio.h
new file mode 100644
index 0000000..332246d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/gpio.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_GPIO_H
+#define __ASM_ARCH_OMAP_GPIO_H
+
+#include <asm/hardware.h>
+#include <asm/arch/irqs.h>
+#include <asm/io.h>
+
+#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
+
+#define OMAP_MPUIO_INPUT_LATCH 0x00
+#define OMAP_MPUIO_OUTPUT 0x04
+#define OMAP_MPUIO_IO_CNTL 0x08
+#define OMAP_MPUIO_KBR_LATCH 0x10
+#define OMAP_MPUIO_KBC 0x14
+#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
+#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
+#define OMAP_MPUIO_KBD_INT 0x20
+#define OMAP_MPUIO_GPIO_INT 0x24
+#define OMAP_MPUIO_KBD_MASKIT 0x28
+#define OMAP_MPUIO_GPIO_MASKIT 0x2c
+#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
+#define OMAP_MPUIO_LATCH 0x34
+
+#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
+#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
+
+#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? IH_MPUIO_BASE + ((nr) & 0x0f) : IH_GPIO_BASE + (nr))
+
+struct omap_machine_gpio_bank {
+ int start;
+ int end;
+
+ void (*set_gpio_direction)(int gpio, int is_input);
+ void (*set_gpio_dataout)(int gpio, int enable);
+ int (*get_gpio_datain)(int gpio);
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/hardware.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/hardware.h
new file mode 100644
index 0000000..e515ee8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/hardware.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_HARDWARE_H
+#define __ASM_ARCH_OMAP_HARDWARE_H
+
+#include <asm/sizes.h>
+#ifndef __ASSEMBLER__
+#include <asm/types.h>
+#include <asm/arch/cpu.h>
+#endif
+#include <asm/arch/io.h>
+#include <asm/arch/serial.h>
+
+#define OMAP_MPU_TIMER1_BASE (0xfffec500)
+#define OMAP_MPU_TIMER2_BASE (0xfffec600)
+#define OMAP_MPU_TIMER3_BASE (0xfffec700)
+#define MPU_TIMER_FREE (1 << 6)
+#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
+#define MPU_TIMER_AR (1 << 1)
+#define MPU_TIMER_ST (1 << 0)
+
+#define CLKGEN_REG_BASE (0xfffece00)
+#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
+#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
+#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
+#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
+#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
+#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
+#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
+#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
+
+#define CK_RATEF 1
+#define CK_IDLEF 2
+#define CK_ENABLEF 4
+#define CK_SELECTF 8
+#define SETARM_IDLE_SHIFT
+
+#define DPLL_CTL (0xfffecf00)
+
+#define DSP_CONFIG_REG_BASE (0xe1008000)
+#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
+#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
+#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
+#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
+
+#define ULPD_REG_BASE (0xfffe0800)
+#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
+#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
+#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
+#define DIS_USB_PVCI_CLK (1 << 5)
+#define USB_MCLK_EN (1 << 4)
+#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
+#define SOFT_UDC_REQ (1 << 4)
+#define SOFT_USB_CLK_REQ (1 << 3)
+#define SOFT_DPLL_REQ (1 << 0)
+#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
+#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
+#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
+#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
+#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
+#define DIS_MMC2_DPLL_REQ (1 << 11)
+#define DIS_MMC1_DPLL_REQ (1 << 10)
+#define DIS_UART3_DPLL_REQ (1 << 9)
+#define DIS_UART2_DPLL_REQ (1 << 8)
+#define DIS_UART1_DPLL_REQ (1 << 7)
+#define DIS_USB_HOST_DPLL_REQ (1 << 6)
+#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
+#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
+
+#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
+#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
+#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
+#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
+
+#define MOD_CONF_CTRL_0 0xfffe1080
+#define MOD_CONF_CTRL_1 0xfffe1110
+
+#define FUNC_MUX_CTRL_0 0xfffe1000
+#define FUNC_MUX_CTRL_1 0xfffe1004
+#define FUNC_MUX_CTRL_2 0xfffe1008
+#define COMP_MODE_CTRL_0 0xfffe100c
+#define FUNC_MUX_CTRL_3 0xfffe1010
+#define FUNC_MUX_CTRL_4 0xfffe1014
+#define FUNC_MUX_CTRL_5 0xfffe1018
+#define FUNC_MUX_CTRL_6 0xfffe101C
+#define FUNC_MUX_CTRL_7 0xfffe1020
+#define FUNC_MUX_CTRL_8 0xfffe1024
+#define FUNC_MUX_CTRL_9 0xfffe1028
+#define FUNC_MUX_CTRL_A 0xfffe102C
+#define FUNC_MUX_CTRL_B 0xfffe1030
+#define FUNC_MUX_CTRL_C 0xfffe1034
+#define FUNC_MUX_CTRL_D 0xfffe1038
+#define PULL_DWN_CTRL_0 0xfffe1040
+#define PULL_DWN_CTRL_1 0xfffe1044
+#define PULL_DWN_CTRL_2 0xfffe1048
+#define PULL_DWN_CTRL_3 0xfffe104c
+#define PULL_DWN_CTRL_4 0xfffe10ac
+
+#define FUNC_MUX_CTRL_E 0xfffe1090
+#define FUNC_MUX_CTRL_F 0xfffe1094
+#define FUNC_MUX_CTRL_10 0xfffe1098
+#define FUNC_MUX_CTRL_11 0xfffe109c
+#define FUNC_MUX_CTRL_12 0xfffe10a0
+#define PU_PD_SEL_0 0xfffe10b4
+#define PU_PD_SEL_1 0xfffe10b8
+#define PU_PD_SEL_2 0xfffe10bc
+#define PU_PD_SEL_3 0xfffe10c0
+#define PU_PD_SEL_4 0xfffe10c4
+
+#define OMAP_TIMER32K_BASE 0xFFFBC400
+
+#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
+#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
+#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
+#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
+
+#define MPUI_BASE (0xfffec900)
+#define MPUI_CTRL (MPUI_BASE + 0x0)
+#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
+#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
+#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
+#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
+#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
+#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
+#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
+
+#define OMAP_LPG1_BASE 0xfffbd000
+#define OMAP_LPG2_BASE 0xfffbd800
+#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
+#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
+#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
+#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
+
+#define OMAP_PWL_BASE 0xfffb5800
+#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
+#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
+
+#include "omap730.h"
+#include "omap1510.h"
+#include "omap24xx.h"
+#include "omap16xx.h"
+
+#ifndef __ASSEMBLER__
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/io.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/io.h
new file mode 100644
index 0000000..12ac3d4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/io.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#include <asm/hardware.h>
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
+#define __mem_pci(a) (a)
+
+#define PCIO_BASE 0
+
+#ifndef __ASSEMBLER__
+
+#define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
+#define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
+#define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
+
+#define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
+#define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
+#define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
+
+typedef struct { volatile u16 offset[256]; } __regbase16;
+#define __REGV16(vaddr) ((__regbase16 *)((vaddr)&~0xff)) ->offset[((vaddr)&0xff)>>1]
+#define __REG16(paddr) __REGV16(io_p2v(paddr))
+
+typedef struct { volatile u8 offset[4096]; } __regbase8;
+#define __REGV8(vaddr) ((__regbase8 *)((vaddr)&~4095)) ->offset[((vaddr)&4095)>>0]
+#define __REG8(paddr) __REGV8(io_p2v(paddr))
+
+typedef struct { volatile u32 offset[4096]; } __regbase32;
+#define __REGV32(vaddr) ((__regbase32 *)((vaddr)&~4095)) ->offset[((vaddr)&4095)>>2]
+#define __REG32(paddr) __REGV32(io_p2v(paddr))
+
+#else
+
+#define __REG8(paddr) io_p2v(paddr)
+#define __REG16(paddr) io_p2v(paddr)
+#define __REG32(paddr) io_p2v(paddr)
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/irqs.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/irqs.h
new file mode 100644
index 0000000..3e94487
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/irqs.h
@@ -0,0 +1,242 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
+#define __ASM_ARCH_OMAP15XX_IRQS_H
+
+#define INT_CAMERA 1
+#define INT_FIQ 3
+#define INT_RTDX 6
+#define INT_DSP_MMU_ABORT 7
+#define INT_HOST 8
+#define INT_ABORT 9
+#define INT_DSP_MAILBOX1 10
+#define INT_DSP_MAILBOX2 11
+#define INT_BRIDGE_PRIV 13
+#define INT_GPIO_BANK1 14
+#define INT_UART3 15
+#define INT_TIMER3 16
+#define INT_DMA_CH0_6 19
+#define INT_DMA_CH1_7 20
+#define INT_DMA_CH2_8 21
+#define INT_DMA_CH3 22
+#define INT_DMA_CH4 23
+#define INT_DMA_CH5 24
+#define INT_DMA_LCD 25
+#define INT_TIMER1 26
+#define INT_WD_TIMER 27
+#define INT_BRIDGE_PUB 28
+#define INT_TIMER2 30
+#define INT_LCD_CTRL 31
+
+#define INT_1510_IH2_IRQ 0
+#define INT_1510_RES2 2
+#define INT_1510_SPI_TX 4
+#define INT_1510_SPI_RX 5
+#define INT_1510_RES12 12
+#define INT_1510_LB_MMU 17
+#define INT_1510_RES18 18
+#define INT_1510_LOCAL_BUS 29
+
+#define INT_1610_IH2_IRQ 0
+#define INT_1610_IH2_FIQ 2
+#define INT_1610_McBSP2_TX 4
+#define INT_1610_McBSP2_RX 5
+#define INT_1610_LCD_LINE 12
+#define INT_1610_GPTIMER1 17
+#define INT_1610_GPTIMER2 18
+#define INT_1610_SSR_FIFO_0 29
+
+#define INT_730_IH2_FIQ 0
+#define INT_730_IH2_IRQ 1
+#define INT_730_USB_NON_ISO 2
+#define INT_730_USB_ISO 3
+#define INT_730_ICR 4
+#define INT_730_EAC 5
+#define INT_730_GPIO_BANK1 6
+#define INT_730_GPIO_BANK2 7
+#define INT_730_GPIO_BANK3 8
+#define INT_730_McBSP2TX 10
+#define INT_730_McBSP2RX 11
+#define INT_730_McBSP2RX_OVF 12
+#define INT_730_LCD_LINE 14
+#define INT_730_GSM_PROTECT 15
+#define INT_730_TIMER3 16
+#define INT_730_GPIO_BANK5 17
+#define INT_730_GPIO_BANK6 18
+#define INT_730_SPGIO_WR 29
+
+#define IH2_BASE 32
+
+#define INT_KEYBOARD (1 + IH2_BASE)
+#define INT_uWireTX (2 + IH2_BASE)
+#define INT_uWireRX (3 + IH2_BASE)
+#define INT_I2C (4 + IH2_BASE)
+#define INT_MPUIO (5 + IH2_BASE)
+#define INT_USB_HHC_1 (6 + IH2_BASE)
+#define INT_McBSP3TX (10 + IH2_BASE)
+#define INT_McBSP3RX (11 + IH2_BASE)
+#define INT_McBSP1TX (12 + IH2_BASE)
+#define INT_McBSP1RX (13 + IH2_BASE)
+#define INT_UART2 (14 + IH2_BASE)
+#define INT_UART1 (15 + IH2_BASE)
+#define INT_BT_MCSI1TX (16 + IH2_BASE)
+#define INT_BT_MCSI1RX (17 + IH2_BASE)
+#define INT_USB_W2FC (20 + IH2_BASE)
+#define INT_1WIRE (21 + IH2_BASE)
+#define INT_OS_TIMER (22 + IH2_BASE)
+#define INT_MMC (23 + IH2_BASE)
+#define INT_GAUGE_32K (24 + IH2_BASE)
+#define INT_RTC_TIMER (25 + IH2_BASE)
+#define INT_RTC_ALARM (26 + IH2_BASE)
+#define INT_MEM_STICK (27 + IH2_BASE)
+#define INT_DSP_MMU (28 + IH2_BASE)
+
+#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
+
+#define INT_1610_FAC (0 + IH2_BASE)
+#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
+#define INT_1610_USB_OTG (8 + IH2_BASE)
+#define INT_1610_SoSSI (9 + IH2_BASE)
+#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
+#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
+#define INT_1610_STI (32 + IH2_BASE)
+#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
+#define INT_1610_GPTIMER3 (34 + IH2_BASE)
+#define INT_1610_GPTIMER4 (35 + IH2_BASE)
+#define INT_1610_GPTIMER5 (36 + IH2_BASE)
+#define INT_1610_GPTIMER6 (37 + IH2_BASE)
+#define INT_1610_GPTIMER7 (38 + IH2_BASE)
+#define INT_1610_GPTIMER8 (39 + IH2_BASE)
+#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
+#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
+#define INT_1610_MMC2 (42 + IH2_BASE)
+#define INT_1610_CF (43 + IH2_BASE)
+#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
+#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
+#define INT_1610_SPI (49 + IH2_BASE)
+#define INT_1610_DMA_CH6 (53 + IH2_BASE)
+#define INT_1610_DMA_CH7 (54 + IH2_BASE)
+#define INT_1610_DMA_CH8 (55 + IH2_BASE)
+#define INT_1610_DMA_CH9 (56 + IH2_BASE)
+#define INT_1610_DMA_CH10 (57 + IH2_BASE)
+#define INT_1610_DMA_CH11 (58 + IH2_BASE)
+#define INT_1610_DMA_CH12 (59 + IH2_BASE)
+#define INT_1610_DMA_CH13 (60 + IH2_BASE)
+#define INT_1610_DMA_CH14 (61 + IH2_BASE)
+#define INT_1610_DMA_CH15 (62 + IH2_BASE)
+#define INT_1610_NAND (63 + IH2_BASE)
+
+#define INT_730_HW_ERRORS (0 + IH2_BASE)
+#define INT_730_NFIQ_PWR_FAIL (1 + IH2_BASE)
+#define INT_730_CFCD (2 + IH2_BASE)
+#define INT_730_CFIREQ (3 + IH2_BASE)
+#define INT_730_I2C (4 + IH2_BASE)
+#define INT_730_PCC (5 + IH2_BASE)
+#define INT_730_MPU_EXT_NIRQ (6 + IH2_BASE)
+#define INT_730_SPI_100K_1 (7 + IH2_BASE)
+#define INT_730_SYREN_SPI (8 + IH2_BASE)
+#define INT_730_VLYNQ (9 + IH2_BASE)
+#define INT_730_GPIO_BANK4 (10 + IH2_BASE)
+#define INT_730_McBSP1TX (11 + IH2_BASE)
+#define INT_730_McBSP1RX (12 + IH2_BASE)
+#define INT_730_McBSP1RX_OF (13 + IH2_BASE)
+#define INT_730_UART_MODEM_IRDA_2 (14 + IH2_BASE)
+#define INT_730_UART_MODEM_1 (15 + IH2_BASE)
+#define INT_730_MCSI (16 + IH2_BASE)
+#define INT_730_uWireTX (17 + IH2_BASE)
+#define INT_730_uWireRX (18 + IH2_BASE)
+#define INT_730_SMC_CD (19 + IH2_BASE)
+#define INT_730_SMC_IREQ (20 + IH2_BASE)
+#define INT_730_HDQ_1WIRE (21 + IH2_BASE)
+#define INT_730_TIMER32K (22 + IH2_BASE)
+#define INT_730_MMC_SDIO (23 + IH2_BASE)
+#define INT_730_UPLD (24 + IH2_BASE)
+#define INT_730_USB_HHC_1 (27 + IH2_BASE)
+#define INT_730_USB_HHC_2 (28 + IH2_BASE)
+#define INT_730_USB_GENI (29 + IH2_BASE)
+#define INT_730_USB_OTG (30 + IH2_BASE)
+#define INT_730_CAMERA_IF (31 + IH2_BASE)
+#define INT_730_RNG (32 + IH2_BASE)
+#define INT_730_DUAL_MODE_TIMER (33 + IH2_BASE)
+#define INT_730_DBB_RF_EN (34 + IH2_BASE)
+#define INT_730_MPUIO_KEYPAD (35 + IH2_BASE)
+#define INT_730_SHA1_MD5 (36 + IH2_BASE)
+#define INT_730_SPI_100K_2 (37 + IH2_BASE)
+#define INT_730_RNG_IDLE (38 + IH2_BASE)
+#define INT_730_MPUIO (39 + IH2_BASE)
+#define INT_730_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
+#define INT_730_LLPC_OE_FALLING (41 + IH2_BASE)
+#define INT_730_LLPC_OE_RISING (42 + IH2_BASE)
+#define INT_730_LLPC_VSYNC (43 + IH2_BASE)
+#define INT_730_WAKE_UP_REQ (46 + IH2_BASE)
+#define INT_730_DMA_CH6 (53 + IH2_BASE)
+#define INT_730_DMA_CH7 (54 + IH2_BASE)
+#define INT_730_DMA_CH8 (55 + IH2_BASE)
+#define INT_730_DMA_CH9 (56 + IH2_BASE)
+#define INT_730_DMA_CH10 (57 + IH2_BASE)
+#define INT_730_DMA_CH11 (58 + IH2_BASE)
+#define INT_730_DMA_CH12 (59 + IH2_BASE)
+#define INT_730_DMA_CH13 (60 + IH2_BASE)
+#define INT_730_DMA_CH14 (61 + IH2_BASE)
+#define INT_730_DMA_CH15 (62 + IH2_BASE)
+#define INT_730_NAND (63 + IH2_BASE)
+
+#define INT_24XX_SYS_NIRQ 7
+#define INT_24XX_SDMA_IRQ0 12
+#define INT_24XX_SDMA_IRQ1 13
+#define INT_24XX_SDMA_IRQ2 14
+#define INT_24XX_SDMA_IRQ3 15
+#define INT_24XX_CAM_IRQ 24
+#define INT_24XX_DSS_IRQ 25
+#define INT_24XX_GPIO_BANK1 29
+#define INT_24XX_GPIO_BANK2 30
+#define INT_24XX_GPIO_BANK3 31
+#define INT_24XX_GPIO_BANK4 32
+#define INT_24XX_GPTIMER1 37
+#define INT_24XX_GPTIMER2 38
+#define INT_24XX_GPTIMER3 39
+#define INT_24XX_GPTIMER4 40
+#define INT_24XX_GPTIMER5 41
+#define INT_24XX_GPTIMER6 42
+#define INT_24XX_GPTIMER7 43
+#define INT_24XX_GPTIMER8 44
+#define INT_24XX_GPTIMER9 45
+#define INT_24XX_GPTIMER10 46
+#define INT_24XX_GPTIMER11 47
+#define INT_24XX_GPTIMER12 48
+#define INT_24XX_MCBSP1_IRQ_TX 59
+#define INT_24XX_MCBSP1_IRQ_RX 60
+#define INT_24XX_MCBSP2_IRQ_TX 62
+#define INT_24XX_MCBSP2_IRQ_RX 63
+#define INT_24XX_UART1_IRQ 72
+#define INT_24XX_UART2_IRQ 73
+#define INT_24XX_UART3_IRQ 74
+#define INT_24XX_MMC_IRQ 83
+
+#define OMAP_MAX_GPIO_LINES 192
+#define IH_GPIO_BASE (128 + IH2_BASE)
+#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
+#define IH_BOARD_BASE (16 + IH_MPUIO_BASE)
+
+#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
+
+#ifndef __ASSEMBLY__
+
+#endif
+
+#include <asm/hardware.h>
+
+#ifndef NR_IRQS
+#define NR_IRQS IH_BOARD_BASE
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/mcbsp.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mcbsp.h
new file mode 100644
index 0000000..cae5e3b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mcbsp.h
@@ -0,0 +1,185 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_MCBSP_H
+#define __ASM_ARCH_OMAP_MCBSP_H
+
+#include <asm/hardware.h>
+
+#define OMAP730_MCBSP1_BASE 0xfffb1000
+#define OMAP730_MCBSP2_BASE 0xfffb1800
+
+#define OMAP1510_MCBSP1_BASE 0xe1011800
+#define OMAP1510_MCBSP2_BASE 0xfffb1000
+#define OMAP1510_MCBSP3_BASE 0xe1017000
+
+#define OMAP1610_MCBSP1_BASE 0xe1011800
+#define OMAP1610_MCBSP2_BASE 0xfffb1000
+#define OMAP1610_MCBSP3_BASE 0xe1017000
+
+#define OMAP24XX_MCBSP1_BASE 0x48074000
+#define OMAP24XX_MCBSP2_BASE 0x48076000
+
+#define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg)
+#define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg)
+
+#define RRST 0x0001
+#define RRDY 0x0002
+#define RFULL 0x0004
+#define RSYNC_ERR 0x0008
+#define RINTM(value) ((value)<<4)
+#define ABIS 0x0040
+#define DXENA 0x0080
+#define CLKSTP(value) ((value)<<11)
+#define RJUST(value) ((value)<<13)
+#define DLB 0x8000
+
+#define XRST 0x0001
+#define XRDY 0x0002
+#define XEMPTY 0x0004
+#define XSYNC_ERR 0x0008
+#define XINTM(value) ((value)<<4)
+#define GRST 0x0040
+#define FRST 0x0080
+#define SOFT 0x0100
+#define FREE 0x0200
+
+#define CLKRP 0x0001
+#define CLKXP 0x0002
+#define FSRP 0x0004
+#define FSXP 0x0008
+#define DR_STAT 0x0010
+#define DX_STAT 0x0020
+#define CLKS_STAT 0x0040
+#define SCLKME 0x0080
+#define CLKRM 0x0100
+#define CLKXM 0x0200
+#define FSRM 0x0400
+#define FSXM 0x0800
+#define RIOEN 0x1000
+#define XIOEN 0x2000
+#define IDLE_EN 0x4000
+
+#define RWDLEN1(value) ((value)<<5)
+#define RFRLEN1(value) ((value)<<8)
+
+#define XWDLEN1(value) ((value)<<5)
+#define XFRLEN1(value) ((value)<<8)
+
+#define RDATDLY(value) (value)
+#define RFIG 0x0004
+#define RCOMPAND(value) ((value)<<3)
+#define RWDLEN2(value) ((value)<<5)
+#define RFRLEN2(value) ((value)<<8)
+#define RPHASE 0x8000
+
+#define XDATDLY(value) (value)
+#define XFIG 0x0004
+#define XCOMPAND(value) ((value)<<3)
+#define XWDLEN2(value) ((value)<<5)
+#define XFRLEN2(value) ((value)<<8)
+#define XPHASE 0x8000
+
+#define CLKGDV(value) (value)
+#define FWID(value) ((value)<<8)
+
+#define FPER(value) (value)
+#define FSGM 0x1000
+#define CLKSM 0x2000
+#define CLKSP 0x4000
+#define GSYNC 0x8000
+
+#define RMCM 0x0001
+#define RCBLK(value) ((value)<<2)
+#define RPABLK(value) ((value)<<5)
+#define RPBBLK(value) ((value)<<7)
+
+#define XMCM(value) (value)
+#define XCBLK(value) ((value)<<2)
+#define XPABLK(value) ((value)<<5)
+#define XPBBLK(value) ((value)<<7)
+
+struct omap_mcbsp_reg_cfg {
+ u16 spcr2;
+ u16 spcr1;
+ u16 rcr2;
+ u16 rcr1;
+ u16 xcr2;
+ u16 xcr1;
+ u16 srgr2;
+ u16 srgr1;
+ u16 mcr2;
+ u16 mcr1;
+ u16 pcr0;
+ u16 rcerc;
+ u16 rcerd;
+ u16 xcerc;
+ u16 xcerd;
+ u16 rcere;
+ u16 rcerf;
+ u16 xcere;
+ u16 xcerf;
+ u16 rcerg;
+ u16 rcerh;
+ u16 xcerg;
+ u16 xcerh;
+};
+
+typedef enum {
+ OMAP_MCBSP1 = 0,
+ OMAP_MCBSP2,
+ OMAP_MCBSP3,
+} omap_mcbsp_id;
+
+typedef int __bitwise omap_mcbsp_io_type_t;
+#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
+#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
+
+typedef enum {
+ OMAP_MCBSP_WORD_8 = 0,
+ OMAP_MCBSP_WORD_12,
+ OMAP_MCBSP_WORD_16,
+ OMAP_MCBSP_WORD_20,
+ OMAP_MCBSP_WORD_24,
+ OMAP_MCBSP_WORD_32,
+} omap_mcbsp_word_length;
+
+typedef enum {
+ OMAP_MCBSP_CLK_RISING = 0,
+ OMAP_MCBSP_CLK_FALLING,
+} omap_mcbsp_clk_polarity;
+
+typedef enum {
+ OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
+ OMAP_MCBSP_FS_ACTIVE_LOW,
+} omap_mcbsp_fs_polarity;
+
+typedef enum {
+ OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
+ OMAP_MCBSP_CLK_STP_MODE_DELAY,
+} omap_mcbsp_clk_stp_mode;
+
+typedef enum {
+ OMAP_MCBSP_SPI_MASTER = 0,
+ OMAP_MCBSP_SPI_SLAVE,
+} omap_mcbsp_spi_mode;
+
+struct omap_mcbsp_spi_cfg {
+ omap_mcbsp_spi_mode spi_mode;
+ omap_mcbsp_clk_polarity rx_clock_polarity;
+ omap_mcbsp_clk_polarity tx_clock_polarity;
+ omap_mcbsp_fs_polarity fsx_polarity;
+ u8 clk_div;
+ omap_mcbsp_clk_stp_mode clk_stp_mode;
+ omap_mcbsp_word_length word_length;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/memory.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/memory.h
new file mode 100644
index 0000000..8b064b8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/memory.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
+
+#define __virt_to_bus(x) __virt_to_phys(x)
+#define __bus_to_virt(x) __phys_to_virt(x)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/mtd-xip.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mtd-xip.h
new file mode 100644
index 0000000..9b60aef
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mtd-xip.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_OMAP_MTD_XIP_H__
+#define __ARCH_OMAP_MTD_XIP_H__
+
+#include <asm/hardware.h>
+#define OMAP_MPU_TIMER_BASE (0xfffec500)
+#define OMAP_MPU_TIMER_OFFSET 0x100
+
+typedef struct {
+ u32 cntl;
+ u32 load_tim;
+ u32 read_tim;
+} xip_omap_mpu_timer_regs_t;
+
+#define xip_omap_mpu_timer_base(n) ((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + (n)*OMAP_MPU_TIMER_OFFSET))
+
+#define xip_irqpending() (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
+#define xip_currtime() (~xip_omap_mpu_timer_read(0))
+#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
+#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/mux.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mux.h
new file mode 100644
index 0000000..72da54e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/mux.h
@@ -0,0 +1,391 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_MUX_H
+#define __ASM_ARCH_MUX_H
+
+#define PU_PD_SEL_NA 0
+#define PULL_DWN_CTRL_NA 0
+
+#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, .mask_offset = mode_offset, .mask = mode,
+
+#define PULL_REG(reg, bit, status) .pull_reg = PULL_DWN_CTRL_##reg, .pull_bit = bit, .pull_val = status,
+
+#define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, .pu_pd_val = status,
+
+#define MUX_REG_730(reg, mode_offset, mode) .mux_reg = OMAP730_IO_CONF_##reg, .mask_offset = mode_offset, .mask = mode,
+
+#define PULL_REG_730(reg, bit, status) .pull_reg = OMAP730_IO_CONF_##reg, .pull_bit = bit, .pull_val = status,
+
+#define MUX_CFG(desc, mux_reg, mode_offset, mode, pull_reg, pull_bit, pull_status, pu_pd_reg, pu_pd_status, debug_status) { .name = desc, .debug = debug_status, MUX_REG(mux_reg, mode_offset, mode) PULL_REG(pull_reg, pull_bit, !pull_status) PU_PD_REG(pu_pd_reg, pu_pd_status) },
+
+#define MUX_CFG_730(desc, mux_reg, mode_offset, mode, pull_bit, pull_status, debug_status) { .name = desc, .debug = debug_status, MUX_REG_730(mux_reg, mode_offset, mode) PULL_REG_730(mux_reg, pull_bit, pull_status) PU_PD_REG(NA, 0) },
+
+#define MUX_CFG_24XX(desc, reg_offset, mode, pull_en, pull_mode, dbg) { .name = desc, .debug = dbg, .mux_reg = reg_offset, .mask = mode, .pull_val = pull_en, .pu_pd_val = pull_mode, },
+
+#define PULL_DISABLED 0
+#define PULL_ENABLED 1
+
+#define PULL_DOWN 0
+#define PULL_UP 1
+
+struct pin_config {
+ char *name;
+ unsigned char busy;
+ unsigned char debug;
+
+ const char *mux_reg_name;
+ const unsigned int mux_reg;
+ const unsigned char mask_offset;
+ const unsigned char mask;
+
+ const char *pull_name;
+ const unsigned int pull_reg;
+ const unsigned char pull_val;
+ const unsigned char pull_bit;
+
+ const char *pu_pd_name;
+ const unsigned int pu_pd_reg;
+ const unsigned char pu_pd_val;
+};
+
+enum omap730_index {
+
+ E2_730_KBR0,
+ J7_730_KBR1,
+ E1_730_KBR2,
+ F3_730_KBR3,
+ D2_730_KBR4,
+ AA20_730_KBR5,
+ V17_730_KBR6,
+ C2_730_KBC0,
+ D3_730_KBC1,
+ E4_730_KBC2,
+ F4_730_KBC3,
+ E3_730_KBC4,
+
+ AA17_730_USB_DM,
+ W16_730_USB_PU_EN,
+ W17_730_USB_VBUSI,
+
+ V19_730_GPIO_15,
+ M19_730_GPIO_77,
+ C21_730_GPIO_121_122,
+ K19_730_GPIO_126,
+ K15_730_GPIO_127,
+
+ P15_730_GPIO_16_17,
+
+ M15_730_GPIO_83,
+ N20_730_GPIO_82,
+ N18_730_GPIO_81,
+ N19_730_GPIO_80,
+ L15_730_GPIO_76,
+
+ UART1_CTS_RTS,
+ OMAP_730_GPIOS_42_43,
+ UART1_TX_RX,
+ OMAP_730_GPIOS_40_41,
+ UART1_USB_RX_TX,
+ UART1_USB_RTS,
+ UART1_USB_CTS
+};
+
+enum omap1xxx_index {
+
+ UART1_TX = 0,
+ UART1_RTS,
+
+ UART2_TX,
+ UART2_RX,
+ UART2_CTS,
+ UART2_RTS,
+
+ UART3_TX,
+ UART3_RX,
+ UART3_CTS,
+ UART3_RTS,
+ UART3_CLKREQ,
+ UART3_BCLK,
+ Y15_1610_UART3_RTS,
+
+ PWT,
+ PWL,
+
+ R18_USB_VBUS,
+ R18_1510_USB_GPIO0,
+ W4_USB_PUEN,
+ W4_USB_CLKO,
+ W4_USB_HIGHZ,
+ W4_GPIO58,
+
+ USB1_SUSP,
+ USB1_SEO,
+ W13_1610_USB1_SE0,
+ USB1_TXEN,
+ USB1_TXD,
+ USB1_VP,
+ USB1_VM,
+ USB1_RCV,
+ USB1_SPEED,
+ R13_1610_USB1_SPEED,
+ R13_1710_USB1_SE0,
+
+ USB2_SUSP,
+ USB2_VP,
+ USB2_TXEN,
+ USB2_VM,
+ USB2_RCV,
+ USB2_SEO,
+ USB2_TXD,
+
+ R18_1510_GPIO0,
+ R19_1510_GPIO1,
+ M14_1510_GPIO2,
+
+ P18_1610_GPIO3,
+ Y15_1610_GPIO17,
+
+ R18_1710_GPIO0,
+ V2_1710_GPIO10,
+ N21_1710_GPIO14,
+ W15_1710_GPIO40,
+
+ MPUIO2,
+ N15_1610_MPUIO2,
+ MPUIO4,
+ MPUIO5,
+ T20_1610_MPUIO5,
+ W11_1610_MPUIO6,
+ V10_1610_MPUIO7,
+ W11_1610_MPUIO9,
+ V10_1610_MPUIO10,
+ W10_1610_MPUIO11,
+ E20_1610_MPUIO13,
+ U20_1610_MPUIO14,
+ E19_1610_MPUIO15,
+
+ MCBSP2_CLKR,
+ MCBSP2_CLKX,
+ MCBSP2_DR,
+ MCBSP2_DX,
+ MCBSP2_FSR,
+ MCBSP2_FSX,
+
+ MCBSP3_CLKX,
+
+ BALLOUT_V8_ARMIO3,
+ N20_HDQ,
+
+ W8_1610_MMC2_DAT0,
+ V8_1610_MMC2_DAT1,
+ W15_1610_MMC2_DAT2,
+ R10_1610_MMC2_DAT3,
+ Y10_1610_MMC2_CLK,
+ Y8_1610_MMC2_CMD,
+ V9_1610_MMC2_CMDDIR,
+ V5_1610_MMC2_DATDIR0,
+ W19_1610_MMC2_DATDIR1,
+ R18_1610_MMC2_CLKIN,
+
+ M19_1610_ETM_PSTAT0,
+ L15_1610_ETM_PSTAT1,
+ L18_1610_ETM_PSTAT2,
+ L19_1610_ETM_D0,
+ J19_1610_ETM_D6,
+ J18_1610_ETM_D7,
+
+ P20_1610_GPIO4,
+ V9_1610_GPIO7,
+ W8_1610_GPIO9,
+ N20_1610_GPIO11,
+ N19_1610_GPIO13,
+ P10_1610_GPIO22,
+ V5_1610_GPIO24,
+ AA20_1610_GPIO_41,
+ W19_1610_GPIO48,
+ M7_1610_GPIO62,
+ V14_16XX_GPIO37,
+ R9_16XX_GPIO18,
+ L14_16XX_GPIO49,
+
+ V19_1610_UWIRE_SCLK,
+ U18_1610_UWIRE_SDI,
+ W21_1610_UWIRE_SDO,
+ N14_1610_UWIRE_CS0,
+ P15_1610_UWIRE_CS3,
+ N15_1610_UWIRE_CS1,
+
+ U19_1610_SPIF_SCK,
+ U18_1610_SPIF_DIN,
+ P20_1610_SPIF_DIN,
+ W21_1610_SPIF_DOUT,
+ R18_1610_SPIF_DOUT,
+ N14_1610_SPIF_CS0,
+ N15_1610_SPIF_CS1,
+ T19_1610_SPIF_CS2,
+ P15_1610_SPIF_CS3,
+
+ L3_1610_FLASH_CS2B_OE,
+ M8_1610_FLASH_CS2B_WE,
+
+ MMC_CMD,
+ MMC_DAT1,
+ MMC_DAT2,
+ MMC_DAT0,
+ MMC_CLK,
+ MMC_DAT3,
+
+ M15_1710_MMC_CLKI,
+ P19_1710_MMC_CMDDIR,
+ P20_1710_MMC_DATDIR0,
+
+ W9_USB0_TXEN,
+ AA9_USB0_VP,
+ Y5_USB0_RCV,
+ R9_USB0_VM,
+ V6_USB0_TXD,
+ W5_USB0_SE0,
+ V9_USB0_SPEED,
+ V9_USB0_SUSP,
+
+ W9_USB2_TXEN,
+ AA9_USB2_VP,
+ Y5_USB2_RCV,
+ R9_USB2_VM,
+ V6_USB2_TXD,
+ W5_USB2_SE0,
+
+ R13_1610_UART1_TX,
+ V14_16XX_UART1_RX,
+ R14_1610_UART1_CTS,
+ AA15_1610_UART1_RTS,
+ R9_16XX_UART2_RX,
+ L14_16XX_UART3_RX,
+
+ I2C_SCL,
+ I2C_SDA,
+
+ F18_1610_KBC0,
+ D20_1610_KBC1,
+ D19_1610_KBC2,
+ E18_1610_KBC3,
+ C21_1610_KBC4,
+ G18_1610_KBR0,
+ F19_1610_KBR1,
+ H14_1610_KBR2,
+ E20_1610_KBR3,
+ E19_1610_KBR4,
+ N19_1610_KBR5,
+
+ T20_1610_LOW_PWR,
+
+ V5_1710_MCLK_ON,
+ V5_1710_MCLK_OFF,
+ R10_1610_MCLK_ON,
+ R10_1610_MCLK_OFF,
+
+ P11_1610_CF_CD2,
+ R11_1610_CF_IOIS16,
+ V10_1610_CF_IREQ,
+ W10_1610_CF_RESET,
+ W11_1610_CF_CD1,
+};
+
+enum omap24xx_index {
+
+ M19_24XX_I2C1_SCL,
+ L15_24XX_I2C1_SDA,
+ J15_24XX_I2C2_SCL,
+ H19_24XX_I2C2_SDA,
+
+ W19_24XX_SYS_NIRQ,
+
+ W14_24XX_SYS_CLKOUT,
+
+ L3_GPMC_WAIT0,
+ N7_GPMC_WAIT1,
+ M1_GPMC_WAIT2,
+ P1_GPMC_WAIT3,
+
+ Y15_24XX_MCBSP2_CLKX,
+ R14_24XX_MCBSP2_FSX,
+ W15_24XX_MCBSP2_DR,
+ V15_24XX_MCBSP2_DX,
+
+ M21_242X_GPIO11,
+ AA10_242X_GPIO13,
+ AA6_242X_GPIO14,
+ AA4_242X_GPIO15,
+ Y11_242X_GPIO16,
+ AA12_242X_GPIO17,
+ AA8_242X_GPIO58,
+ Y20_24XX_GPIO60,
+ W4__24XX_GPIO74,
+ M15_24XX_GPIO92,
+ V14_24XX_GPIO117,
+
+ V4_242X_GPIO49,
+ W2_242X_GPIO50,
+ U4_242X_GPIO51,
+ V3_242X_GPIO52,
+ V2_242X_GPIO53,
+ V6_242X_GPIO53,
+ T4_242X_GPIO54,
+ Y4_242X_GPIO54,
+ T3_242X_GPIO55,
+ U2_242X_GPIO56,
+
+ AA10_242X_DMAREQ0,
+ AA6_242X_DMAREQ1,
+ E4_242X_DMAREQ2,
+ G4_242X_DMAREQ3,
+ D3_242X_DMAREQ4,
+ E3_242X_DMAREQ5,
+
+ P20_24XX_TSC_IRQ,
+
+ K15_24XX_UART3_TX,
+ K14_24XX_UART3_RX,
+
+ G19_24XX_MMC_CLKO,
+ H18_24XX_MMC_CMD,
+ F20_24XX_MMC_DAT0,
+ H14_24XX_MMC_DAT1,
+ E19_24XX_MMC_DAT2,
+ D19_24XX_MMC_DAT3,
+ F19_24XX_MMC_DAT_DIR0,
+ E20_24XX_MMC_DAT_DIR1,
+ F18_24XX_MMC_DAT_DIR2,
+ E18_24XX_MMC_DAT_DIR3,
+ G18_24XX_MMC_CMD_DIR,
+ H15_24XX_MMC_CLKI,
+
+ T19_24XX_KBR0,
+ R19_24XX_KBR1,
+ V18_24XX_KBR2,
+ M21_24XX_KBR3,
+ E5__24XX_KBR4,
+ M18_24XX_KBR5,
+ R20_24XX_KBC0,
+ M14_24XX_KBC1,
+ H19_24XX_KBC2,
+ V17_24XX_KBC3,
+ P21_24XX_KBC4,
+ L14_24XX_KBC5,
+ N19_24XX_KBC6,
+
+ B3__24XX_KBR5,
+ AA4_24XX_KBC2,
+ B13_24XX_KBC6,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/omap24xx.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/omap24xx.h
new file mode 100644
index 0000000..37def2f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/omap24xx.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP24XX_H
+#define __ASM_ARCH_OMAP24XX_H
+
+#define L4_24XX_BASE 0x48000000
+#define L3_24XX_BASE 0x68000000
+
+#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
+#define VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
+#define OMAP24XX_IVA_INTC_BASE 0x40000000
+#define IRQ_SIR_IRQ 0x0040
+
+#define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
+#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
+#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
+
+#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/serial.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/serial.h
new file mode 100644
index 0000000..6ab8613
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/serial.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+#define OMAP_MAX_NR_PORTS 3
+#define OMAP1510_BASE_BAUD (12000000/16)
+#define OMAP16XX_BASE_BAUD (48000000/16)
+
+#define is_omap_port(p) ({int __ret = 0; if (p == IO_ADDRESS(OMAP_UART1_BASE) || p == IO_ADDRESS(OMAP_UART2_BASE) || p == IO_ADDRESS(OMAP_UART3_BASE)) __ret = 1; __ret; })
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/timex.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/timex.h
new file mode 100644
index 0000000..2c9234c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/timex.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARCH_OMAP_TIMEX_H
+#define __ASM_ARCH_OMAP_TIMEX_H
+
+#define CLOCK_TICK_RATE (HZ * 100000UL)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/arch/vmalloc.h b/6/platforms/android-3/arch-arm/usr/include/asm/arch/vmalloc.h
new file mode 100644
index 0000000..f2b5b44
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/arch/vmalloc.h
@@ -0,0 +1,13 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/atomic.h b/6/platforms/android-3/arch-arm/usr/include/asm/atomic.h
new file mode 100644
index 0000000..6f1921a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/atomic.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_ATOMIC_H
+#define __ASM_ARM_ATOMIC_H
+
+#include <linux/compiler.h>
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/auxvec.h b/6/platforms/android-3/arch-arm/usr/include/asm/auxvec.h
new file mode 100644
index 0000000..c7e839c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/auxvec.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_AUXVEC_H
+#define __ASMARM_AUXVEC_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/bitops.h b/6/platforms/android-3/arch-arm/usr/include/asm/bitops.h
new file mode 100644
index 0000000..ff76a68
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/bitops.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_BITOPS_H
+#define __ASM_ARM_BITOPS_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/byteorder.h b/6/platforms/android-3/arch-arm/usr/include/asm/byteorder.h
new file mode 100644
index 0000000..b869695
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/byteorder.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_BYTEORDER_H
+#define __ASM_ARM_BYTEORDER_H
+
+#include <linux/compiler.h>
+#include <asm/types.h>
+
+static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
+{
+ __u32 t;
+
+#ifndef __thumb__
+ if (!__builtin_constant_p(x)) {
+
+ __asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
+ } else
+#endif
+ t = x ^ ((x << 16) | (x >> 16));
+
+ x = (x << 24) | (x >> 8);
+ t &= ~0x00FF0000;
+ x ^= (t >> 8);
+
+ return x;
+}
+
+#define __arch__swab32(x) ___arch__swab32(x)
+
+#ifndef __STRICT_ANSI__
+#define __BYTEORDER_HAS_U64__
+#define __SWAB_64_THRU_32__
+#endif
+
+#ifdef __ARMEB__
+#include <linux/byteorder/big_endian.h>
+#else
+#include <linux/byteorder/little_endian.h>
+#endif
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/cache.h b/6/platforms/android-3/arch-arm/usr/include/asm/cache.h
new file mode 100644
index 0000000..be26423
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/cache.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_CACHE_H
+#define __ASMARM_CACHE_H
+
+#define L1_CACHE_SHIFT 5
+#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/cacheflush.h b/6/platforms/android-3/arch-arm/usr/include/asm/cacheflush.h
new file mode 100644
index 0000000..3ffa87a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/cacheflush.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_CACHEFLUSH_H
+#define _ASMARM_CACHEFLUSH_H
+
+#include <linux/sched.h>
+#include <linux/mm.h>
+
+#include <asm/glue.h>
+#include <asm/shmparam.h>
+
+#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
+
+#undef _CACHE
+#undef MULTI_CACHE
+
+#if !defined(_CACHE) && !defined(MULTI_CACHE)
+#error Unknown cache maintainence model
+#endif
+
+#define PG_dcache_dirty PG_arch_1
+
+struct cpu_cache_fns {
+ void (*flush_kern_all)(void);
+ void (*flush_user_all)(void);
+ void (*flush_user_range)(unsigned long, unsigned long, unsigned int);
+
+ void (*coherent_kern_range)(unsigned long, unsigned long);
+ void (*coherent_user_range)(unsigned long, unsigned long);
+ void (*flush_kern_dcache_page)(void *);
+
+ void (*dma_inv_range)(unsigned long, unsigned long);
+ void (*dma_clean_range)(unsigned long, unsigned long);
+ void (*dma_flush_range)(unsigned long, unsigned long);
+};
+
+#ifdef MULTI_CACHE
+
+#define __cpuc_flush_kern_all cpu_cache.flush_kern_all
+#define __cpuc_flush_user_all cpu_cache.flush_user_all
+#define __cpuc_flush_user_range cpu_cache.flush_user_range
+#define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range
+#define __cpuc_coherent_user_range cpu_cache.coherent_user_range
+#define __cpuc_flush_dcache_page cpu_cache.flush_kern_dcache_page
+
+#define dmac_inv_range cpu_cache.dma_inv_range
+#define dmac_clean_range cpu_cache.dma_clean_range
+#define dmac_flush_range cpu_cache.dma_flush_range
+
+#else
+
+#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all)
+#define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all)
+#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
+#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
+#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
+#define __cpuc_flush_dcache_page __glue(_CACHE,_flush_kern_dcache_page)
+
+#define dmac_inv_range __glue(_CACHE,_dma_inv_range)
+#define dmac_clean_range __glue(_CACHE,_dma_clean_range)
+#define dmac_flush_range __glue(_CACHE,_dma_flush_range)
+
+#endif
+
+#define flush_cache_vmap(start, end) flush_cache_all()
+#define flush_cache_vunmap(start, end) flush_cache_all()
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) do { memcpy(dst, src, len); flush_ptrace_access(vma, page, vaddr, dst, len, 1); } while (0)
+
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) do { memcpy(dst, src, len); } while (0)
+
+#define flush_cache_all() __cpuc_flush_kern_all()
+#define flush_cache_user_range(vma,start,end) __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end))
+#define flush_icache_range(s,e) __cpuc_coherent_kern_range(s,e)
+#define clean_dcache_area(start,size) cpu_dcache_clean_area(start, size)
+
+#define flush_dcache_mmap_lock(mapping) write_lock_irq(&(mapping)->tree_lock)
+#define flush_dcache_mmap_unlock(mapping) write_unlock_irq(&(mapping)->tree_lock)
+
+#define flush_icache_user_range(vma,page,addr,len) flush_dcache_page(page)
+
+#define flush_icache_page(vma,page) do { } while (0)
+
+#define __cacheid_present(val) (val != read_cpuid(CPUID_ID))
+#define __cacheid_vivt(val) ((val & (15 << 25)) != (14 << 25))
+#define __cacheid_vipt(val) ((val & (15 << 25)) == (14 << 25))
+#define __cacheid_vipt_nonaliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25))
+#define __cacheid_vipt_aliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23))
+
+#define cache_is_vivt() ({ unsigned int __val = read_cpuid(CPUID_CACHETYPE); (!__cacheid_present(__val)) || __cacheid_vivt(__val); })
+
+#define cache_is_vipt() ({ unsigned int __val = read_cpuid(CPUID_CACHETYPE); __cacheid_present(__val) && __cacheid_vipt(__val); })
+
+#define cache_is_vipt_nonaliasing() ({ unsigned int __val = read_cpuid(CPUID_CACHETYPE); __cacheid_present(__val) && __cacheid_vipt_nonaliasing(__val); })
+
+#define cache_is_vipt_aliasing() ({ unsigned int __val = read_cpuid(CPUID_CACHETYPE); __cacheid_present(__val) && __cacheid_vipt_aliasing(__val); })
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/cputime.h b/6/platforms/android-3/arch-arm/usr/include/asm/cputime.h
new file mode 100644
index 0000000..4a4097f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/cputime.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARM_CPUTIME_H
+#define __ARM_CPUTIME_H
+
+#include <asm-generic/cputime.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/delay.h b/6/platforms/android-3/arch-arm/usr/include/asm/delay.h
new file mode 100644
index 0000000..631fd9b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/delay.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_DELAY_H
+#define __ASM_ARM_DELAY_H
+
+#include <asm/param.h>
+
+#define MAX_UDELAY_MS 2
+
+#define udelay(n) (__builtin_constant_p(n) ? ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : __const_udelay((n) * ((2199023U*HZ)>>11))) : __udelay(n))
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/div64.h b/6/platforms/android-3/arch-arm/usr/include/asm/div64.h
new file mode 100644
index 0000000..c03a0e4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/div64.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_DIV64
+#define __ASM_ARM_DIV64
+
+#include <asm/system.h>
+
+#ifdef __ARMEB__
+#define __xh "r0"
+#define __xl "r1"
+#else
+#define __xl "r0"
+#define __xh "r1"
+#endif
+
+#define do_div(n,base) ({ register unsigned int __base asm("r4") = base; register unsigned long long __n asm("r0") = n; register unsigned long long __res asm("r2"); register unsigned int __rem asm(__xh); asm( __asmeq("%0", __xh) __asmeq("%1", "r2") __asmeq("%2", "r0") __asmeq("%3", "r4") "bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); n = __res; __rem; })
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/dma-mapping.h b/6/platforms/android-3/arch-arm/usr/include/asm/dma-mapping.h
new file mode 100644
index 0000000..7e65009
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/dma-mapping.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef ASMARM_DMA_MAPPING_H
+#define ASMARM_DMA_MAPPING_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/dma.h b/6/platforms/android-3/arch-arm/usr/include/asm/dma.h
new file mode 100644
index 0000000..7eeeb78
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/dma.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_DMA_H
+#define __ASM_ARM_DMA_H
+
+typedef unsigned int dmach_t;
+
+#include <linux/spinlock.h>
+#include <asm/system.h>
+#include <asm/scatterlist.h>
+#include <asm/arch/dma.h>
+
+#ifndef MAX_DMA_ADDRESS
+#define MAX_DMA_ADDRESS 0xffffffff
+#endif
+
+typedef unsigned int dmamode_t;
+
+#define DMA_MODE_MASK 3
+
+#define DMA_MODE_READ 0
+#define DMA_MODE_WRITE 1
+#define DMA_MODE_CASCADE 2
+#define DMA_AUTOINIT 4
+
+#define clear_dma_ff(channel)
+
+#define set_dma_addr(channel, addr) __set_dma_addr(channel, bus_to_virt(addr))
+
+#ifndef NO_DMA
+#define NO_DMA 255
+#endif
+
+#define isa_dma_bridge_buggy (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/domain.h b/6/platforms/android-3/arch-arm/usr/include/asm/domain.h
new file mode 100644
index 0000000..973109e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/domain.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PROC_DOMAIN_H
+#define __ASM_PROC_DOMAIN_H
+
+#define DOMAIN_KERNEL 0
+#define DOMAIN_TABLE 0
+#define DOMAIN_USER 1
+#define DOMAIN_IO 2
+
+#define DOMAIN_NOACCESS 0
+#define DOMAIN_CLIENT 1
+#define DOMAIN_MANAGER 3
+
+#define domain_val(dom,type) ((type) << (2*(dom)))
+
+#ifndef __ASSEMBLY__
+
+#define set_domain(x) do { } while (0)
+#define modify_domain(dom,type) do { } while (0)
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/dyntick.h b/6/platforms/android-3/arch-arm/usr/include/asm/dyntick.h
new file mode 100644
index 0000000..1f323f2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/dyntick.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_DYNTICK_H
+#define _ASMARM_DYNTICK_H
+
+#include <asm/mach/time.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/elf.h b/6/platforms/android-3/arch-arm/usr/include/asm/elf.h
new file mode 100644
index 0000000..e9d095e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/elf.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_ELF_H
+#define __ASMARM_ELF_H
+
+#include <asm/ptrace.h>
+#include <asm/user.h>
+#ifdef __KERNEL
+#include <asm/procinfo.h>
+#endif
+
+typedef unsigned long elf_greg_t;
+typedef unsigned long elf_freg_t[3];
+
+#define EM_ARM 40
+#define EF_ARM_APCS26 0x08
+#define EF_ARM_SOFT_FLOAT 0x200
+#define EF_ARM_EABI_MASK 0xFF000000
+
+#define R_ARM_NONE 0
+#define R_ARM_PC24 1
+#define R_ARM_ABS32 2
+#define R_ARM_CALL 28
+#define R_ARM_JUMP24 29
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_fp elf_fpregset_t;
+
+#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && (ELF_PROC_OK((x))) )
+
+#define ELF_CLASS ELFCLASS32
+#ifdef __ARMEB__
+#define ELF_DATA ELFDATA2MSB
+#else
+#define ELF_DATA ELFDATA2LSB
+#endif
+#define ELF_ARCH EM_ARM
+
+#define USE_ELF_CORE_DUMP
+#define ELF_EXEC_PAGESIZE 4096
+
+#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
+
+#define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0
+
+#define ELF_HWCAP (elf_hwcap)
+
+#define ELF_PLATFORM_SIZE 8
+
+#define ELF_PLATFORM (elf_platform)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/errno.h b/6/platforms/android-3/arch-arm/usr/include/asm/errno.h
new file mode 100644
index 0000000..6be7048
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/errno.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARM_ERRNO_H
+#define _ARM_ERRNO_H
+
+#include <asm-generic/errno.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/fcntl.h b/6/platforms/android-3/arch-arm/usr/include/asm/fcntl.h
new file mode 100644
index 0000000..42351ea
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/fcntl.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARM_FCNTL_H
+#define _ARM_FCNTL_H
+
+#define O_DIRECTORY 040000
+#define O_NOFOLLOW 0100000
+#define O_DIRECT 0200000
+#define O_LARGEFILE 0400000
+
+#include <asm-generic/fcntl.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/fpstate.h b/6/platforms/android-3/arch-arm/usr/include/asm/fpstate.h
new file mode 100644
index 0000000..b362b14
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/fpstate.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_FPSTATE_H
+#define __ASM_ARM_FPSTATE_H
+
+#ifndef __ASSEMBLY__
+
+struct vfp_hard_struct {
+ __u64 fpregs[16];
+#if __LINUX_ARM_ARCH__ < 6
+ __u32 fpmx_state;
+#endif
+ __u32 fpexc;
+ __u32 fpscr;
+
+ __u32 fpinst;
+ __u32 fpinst2;
+};
+
+union vfp_state {
+ struct vfp_hard_struct hard;
+};
+
+#define FP_HARD_SIZE 35
+
+struct fp_hard_struct {
+ unsigned int save[FP_HARD_SIZE];
+};
+
+#define FP_SOFT_SIZE 35
+
+struct fp_soft_struct {
+ unsigned int save[FP_SOFT_SIZE];
+};
+
+#define IWMMXT_SIZE 0x98
+
+struct iwmmxt_struct {
+ unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
+};
+
+union fp_state {
+ struct fp_hard_struct hard;
+ struct fp_soft_struct soft;
+};
+
+#define FP_SIZE (sizeof(union fp_state) / sizeof(int))
+
+struct crunch_state {
+ unsigned int mvdx[16][2];
+ unsigned int mvax[4][3];
+ unsigned int dspsc[2];
+};
+
+#define CRUNCH_SIZE sizeof(struct crunch_state)
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/glue.h b/6/platforms/android-3/arch-arm/usr/include/asm/glue.h
new file mode 100644
index 0000000..1327b59
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/glue.h
@@ -0,0 +1,11 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/hardirq.h b/6/platforms/android-3/arch-arm/usr/include/asm/hardirq.h
new file mode 100644
index 0000000..54207e3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/hardirq.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_HARDIRQ_H
+#define __ASM_HARDIRQ_H
+
+#include <linux/cache.h>
+#include <linux/threads.h>
+#include <asm/irq.h>
+
+typedef struct {
+ unsigned int __softirq_pending;
+ unsigned int local_timer_irqs;
+} ____cacheline_aligned irq_cpustat_t;
+
+#include <linux/irq_cpustat.h>
+
+#if NR_IRQS > 256
+#define HARDIRQ_BITS 9
+#else
+#define HARDIRQ_BITS 8
+#endif
+
+#if 1 << HARDIRQ_BITS < NR_IRQS
+#error HARDIRQ_BITS is too low!
+#endif
+
+#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/hardware.h b/6/platforms/android-3/arch-arm/usr/include/asm/hardware.h
new file mode 100644
index 0000000..0b381d1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/hardware.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_HARDWARE_H
+#define __ASM_HARDWARE_H
+
+#include <asm/arch/hardware.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/hw_irq.h b/6/platforms/android-3/arch-arm/usr/include/asm/hw_irq.h
new file mode 100644
index 0000000..a34b390
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/hw_irq.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARCH_ARM_HW_IRQ_H
+#define _ARCH_ARM_HW_IRQ_H
+
+#include <asm/mach/irq.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/ide.h b/6/platforms/android-3/arch-arm/usr/include/asm/ide.h
new file mode 100644
index 0000000..f52d5ca
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/ide.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_IDE_H
+#define __ASMARM_IDE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/io.h b/6/platforms/android-3/arch-arm/usr/include/asm/io.h
new file mode 100644
index 0000000..6794022
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/io.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_IO_H
+#define __ASM_ARM_IO_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/ioctl.h b/6/platforms/android-3/arch-arm/usr/include/asm/ioctl.h
new file mode 100644
index 0000000..6e446b6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/ioctl.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/ioctl.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/ioctls.h b/6/platforms/android-3/arch-arm/usr/include/asm/ioctls.h
new file mode 100644
index 0000000..9df82bc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/ioctls.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_IOCTLS_H
+#define __ASM_ARM_IOCTLS_H
+
+#include <asm/ioctl.h>
+
+#define TCGETS 0x5401
+#define TCSETS 0x5402
+#define TCSETSW 0x5403
+#define TCSETSF 0x5404
+#define TCGETA 0x5405
+#define TCSETA 0x5406
+#define TCSETAW 0x5407
+#define TCSETAF 0x5408
+#define TCSBRK 0x5409
+#define TCXONC 0x540A
+#define TCFLSH 0x540B
+#define TIOCEXCL 0x540C
+#define TIOCNXCL 0x540D
+#define TIOCSCTTY 0x540E
+#define TIOCGPGRP 0x540F
+#define TIOCSPGRP 0x5410
+#define TIOCOUTQ 0x5411
+#define TIOCSTI 0x5412
+#define TIOCGWINSZ 0x5413
+#define TIOCSWINSZ 0x5414
+#define TIOCMGET 0x5415
+#define TIOCMBIS 0x5416
+#define TIOCMBIC 0x5417
+#define TIOCMSET 0x5418
+#define TIOCGSOFTCAR 0x5419
+#define TIOCSSOFTCAR 0x541A
+#define FIONREAD 0x541B
+#define TIOCINQ FIONREAD
+#define TIOCLINUX 0x541C
+#define TIOCCONS 0x541D
+#define TIOCGSERIAL 0x541E
+#define TIOCSSERIAL 0x541F
+#define TIOCPKT 0x5420
+#define FIONBIO 0x5421
+#define TIOCNOTTY 0x5422
+#define TIOCSETD 0x5423
+#define TIOCGETD 0x5424
+#define TCSBRKP 0x5425
+#define TIOCSBRK 0x5427
+#define TIOCCBRK 0x5428
+#define TIOCGSID 0x5429
+#define TIOCGPTN _IOR('T',0x30, unsigned int)
+#define TIOCSPTLCK _IOW('T',0x31, int)
+
+#define FIONCLEX 0x5450
+#define FIOCLEX 0x5451
+#define FIOASYNC 0x5452
+#define TIOCSERCONFIG 0x5453
+#define TIOCSERGWILD 0x5454
+#define TIOCSERSWILD 0x5455
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458
+#define TIOCSERGETLSR 0x5459
+#define TIOCSERGETMULTI 0x545A
+#define TIOCSERSETMULTI 0x545B
+
+#define TIOCMIWAIT 0x545C
+#define TIOCGICOUNT 0x545D
+#define FIOQSIZE 0x545E
+
+#define TIOCPKT_DATA 0
+#define TIOCPKT_FLUSHREAD 1
+#define TIOCPKT_FLUSHWRITE 2
+#define TIOCPKT_STOP 4
+#define TIOCPKT_START 8
+#define TIOCPKT_NOSTOP 16
+#define TIOCPKT_DOSTOP 32
+
+#define TIOCSER_TEMT 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/ipcbuf.h b/6/platforms/android-3/arch-arm/usr/include/asm/ipcbuf.h
new file mode 100644
index 0000000..0e47507
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/ipcbuf.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_IPCBUF_H
+#define __ASMARM_IPCBUF_H
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/irq.h b/6/platforms/android-3/arch-arm/usr/include/asm/irq.h
new file mode 100644
index 0000000..2085a21
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/irq.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_IRQ_H
+#define __ASM_ARM_IRQ_H
+
+#include <asm/arch/irqs.h>
+
+#ifndef irq_canonicalize
+#define irq_canonicalize(i) (i)
+#endif
+
+#ifndef NR_IRQS
+#define NR_IRQS 128
+#endif
+
+#ifndef NO_IRQ
+#define NO_IRQ ((unsigned int)(-1))
+#endif
+
+struct irqaction;
+
+#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
+#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
+#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW
+#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
+
+#define IRQT_NOEDGE (0)
+#define IRQT_RISING (__IRQT_RISEDGE)
+#define IRQT_FALLING (__IRQT_FALEDGE)
+#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
+#define IRQT_LOW (__IRQT_LOWLVL)
+#define IRQT_HIGH (__IRQT_HIGHLVL)
+#define IRQT_PROBE IRQ_TYPE_PROBE
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/linkage.h b/6/platforms/android-3/arch-arm/usr/include/asm/linkage.h
new file mode 100644
index 0000000..1fb628e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/linkage.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
+
+#define __ALIGN .align 0
+#define __ALIGN_STR ".align 0"
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/local.h b/6/platforms/android-3/arch-arm/usr/include/asm/local.h
new file mode 100644
index 0000000..10d6a60
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/local.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/local.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/locks.h b/6/platforms/android-3/arch-arm/usr/include/asm/locks.h
new file mode 100644
index 0000000..f48485c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/locks.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PROC_LOCKS_H
+#define __ASM_PROC_LOCKS_H
+
+#if __LINUX_ARM_ARCH__ >= 6
+
+#define __down_op(ptr,fail) ({ __asm__ __volatile__( "@ down_op\n" "1: ldrex lr, [%0]\n" " sub lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %0\n" " blmi " #fail : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); })
+
+#define __down_op_ret(ptr,fail) ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" "1: ldrex lr, [%1]\n" " sub lr, lr, %2\n" " strex ip, lr, [%1]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " #fail "\n" " mov %0, ip" : "=&r" (ret) : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); ret; })
+
+#define __up_op(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op\n" "1: ldrex lr, [%0]\n" " add lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " cmp lr, #0\n" " movle ip, %0\n" " blle " #wake : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); })
+
+#define RW_LOCK_BIAS 0x01000000
+#define RW_LOCK_BIAS_STR "0x01000000"
+
+#define __down_op_write(ptr,fail) ({ __asm__ __volatile__( "@ down_op_write\n" "1: ldrex lr, [%0]\n" " sub lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movne ip, %0\n" " blne " #fail : : "r" (ptr), "I" (RW_LOCK_BIAS) : "ip", "lr", "cc"); smp_mb(); })
+
+#define __up_op_write(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op_write\n" "1: ldrex lr, [%0]\n" " adds lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " movcs ip, %0\n" " blcs " #wake : : "r" (ptr), "I" (RW_LOCK_BIAS) : "ip", "lr", "cc"); })
+
+#define __down_op_read(ptr,fail) __down_op(ptr, fail)
+
+#define __up_op_read(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op_read\n" "1: ldrex lr, [%0]\n" " add lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " moveq ip, %0\n" " bleq " #wake : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); })
+
+#else
+
+#define __down_op(ptr,fail) ({ __asm__ __volatile__( "@ down_op\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " subs lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movmi ip, %0\n" " blmi " #fail : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); })
+
+#define __down_op_ret(ptr,fail) ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%1]\n" " subs lr, lr, %2\n" " str lr, [%1]\n" " msr cpsr_c, ip\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " #fail "\n" " mov %0, ip" : "=&r" (ret) : "r" (ptr), "I" (1) : "ip", "lr", "cc"); smp_mb(); ret; })
+
+#define __up_op(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " adds lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movle ip, %0\n" " blle " #wake : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); })
+
+#define RW_LOCK_BIAS 0x01000000
+#define RW_LOCK_BIAS_STR "0x01000000"
+
+#define __down_op_write(ptr,fail) ({ __asm__ __volatile__( "@ down_op_write\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " subs lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movne ip, %0\n" " blne " #fail : : "r" (ptr), "I" (RW_LOCK_BIAS) : "ip", "lr", "cc"); smp_mb(); })
+
+#define __up_op_write(ptr,wake) ({ __asm__ __volatile__( "@ up_op_write\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " adds lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " movcs ip, %0\n" " blcs " #wake : : "r" (ptr), "I" (RW_LOCK_BIAS) : "ip", "lr", "cc"); smp_mb(); })
+
+#define __down_op_read(ptr,fail) __down_op(ptr, fail)
+
+#define __up_op_read(ptr,wake) ({ smp_mb(); __asm__ __volatile__( "@ up_op_read\n" " mrs ip, cpsr\n" " orr lr, ip, #128\n" " msr cpsr_c, lr\n" " ldr lr, [%0]\n" " adds lr, lr, %1\n" " str lr, [%0]\n" " msr cpsr_c, ip\n" " moveq ip, %0\n" " bleq " #wake : : "r" (ptr), "I" (1) : "ip", "lr", "cc"); })
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/mc146818rtc.h b/6/platforms/android-3/arch-arm/usr/include/asm/mc146818rtc.h
new file mode 100644
index 0000000..5a86724
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/mc146818rtc.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_MC146818RTC_H
+#define _ASM_MC146818RTC_H
+
+#include <asm/arch/irqs.h>
+#include <asm/io.h>
+
+#ifndef RTC_PORT
+#define RTC_PORT(x) (0x70 + (x))
+#define RTC_ALWAYS_BCD 1
+#endif
+
+#define CMOS_READ(addr) ({ outb_p((addr),RTC_PORT(0)); inb_p(RTC_PORT(1)); })
+#define CMOS_WRITE(val, addr) ({ outb_p((addr),RTC_PORT(0)); outb_p((val),RTC_PORT(1)); })
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/memory.h b/6/platforms/android-3/arch-arm/usr/include/asm/memory.h
new file mode 100644
index 0000000..c1137a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/memory.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_MEMORY_H
+#define __ASM_ARM_MEMORY_H
+
+#ifndef __ASSEMBLY__
+#define UL(x) (x##UL)
+#else
+#define UL(x) (x)
+#endif
+
+#include <linux/compiler.h>
+#include <asm/arch/memory.h>
+#include <asm/sizes.h>
+
+#ifndef TASK_SIZE
+#define TASK_SIZE (CONFIG_DRAM_SIZE)
+#endif
+
+#ifndef TASK_UNMAPPED_BASE
+#define TASK_UNMAPPED_BASE UL(0x00000000)
+#endif
+
+#ifndef PHYS_OFFSET
+#define PHYS_OFFSET (CONFIG_DRAM_BASE)
+#endif
+
+#ifndef END_MEM
+#define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE)
+#endif
+
+#ifndef PAGE_OFFSET
+#define PAGE_OFFSET (PHYS_OFFSET)
+#endif
+
+#define MODULE_END (END_MEM)
+#define MODULE_START (PHYS_OFFSET)
+
+#ifndef CONSISTENT_DMA_SIZE
+#define CONSISTENT_DMA_SIZE SZ_2M
+#endif
+
+#ifndef __virt_to_phys
+#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
+#endif
+
+#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
+#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
+
+#ifndef __ASSEMBLY__
+
+#ifndef ISA_DMA_THRESHOLD
+#define ISA_DMA_THRESHOLD (0xffffffffULL)
+#endif
+
+#ifndef arch_adjust_zones
+#define arch_adjust_zones(node,size,holes) do { } while (0)
+#endif
+
+#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
+
+#define __pa(x) __virt_to_phys((unsigned long)(x))
+#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
+#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
+#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
+#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
+#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
+#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
+#define PHYS_TO_NID(addr) (0)
+#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
+#ifndef __arch_page_to_dma
+#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page)))
+#define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr))
+#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr)))
+#else
+#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page))
+#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr))
+#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr))
+#endif
+#ifndef arch_is_coherent
+#define arch_is_coherent() 0
+#endif
+#endif
+#include <asm-generic/memory_model.h>
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/mman.h b/6/platforms/android-3/arch-arm/usr/include/asm/mman.h
new file mode 100644
index 0000000..8f71d1b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/mman.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARM_MMAN_H__
+#define __ARM_MMAN_H__
+
+#include <asm-generic/mman.h>
+
+#define MAP_GROWSDOWN 0x0100
+#define MAP_DENYWRITE 0x0800
+#define MAP_EXECUTABLE 0x1000
+#define MAP_LOCKED 0x2000
+#define MAP_NORESERVE 0x4000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+
+#define MCL_CURRENT 1
+#define MCL_FUTURE 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/module.h b/6/platforms/android-3/arch-arm/usr/include/asm/module.h
new file mode 100644
index 0000000..68b806a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/module.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_ARM_MODULE_H
+#define _ASM_ARM_MODULE_H
+
+struct mod_arch_specific
+{
+ int foo;
+};
+
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+
+#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/msgbuf.h b/6/platforms/android-3/arch-arm/usr/include/asm/msgbuf.h
new file mode 100644
index 0000000..84d614c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/msgbuf.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_MSGBUF_H
+#define _ASMARM_MSGBUF_H
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime;
+ unsigned long __unused1;
+ __kernel_time_t msg_rtime;
+ unsigned long __unused2;
+ __kernel_time_t msg_ctime;
+ unsigned long __unused3;
+ unsigned long msg_cbytes;
+ unsigned long msg_qnum;
+ unsigned long msg_qbytes;
+ __kernel_pid_t msg_lspid;
+ __kernel_pid_t msg_lrpid;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/mtd-xip.h b/6/platforms/android-3/arch-arm/usr/include/asm/mtd-xip.h
new file mode 100644
index 0000000..6c53f6f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/mtd-xip.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARM_MTD_XIP_H__
+#define __ARM_MTD_XIP_H__
+
+#include <asm/hardware.h>
+#include <asm/arch/mtd-xip.h>
+
+#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/page.h b/6/platforms/android-3/arch-arm/usr/include/asm/page.h
new file mode 100644
index 0000000..f980343
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/page.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_PAGE_H
+#define _ASMARM_PAGE_H
+
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/param.h b/6/platforms/android-3/arch-arm/usr/include/asm/param.h
new file mode 100644
index 0000000..6814fe3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/param.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PARAM_H
+#define __ASM_PARAM_H
+
+#define HZ 100
+
+#define EXEC_PAGESIZE 4096
+
+#ifndef NOGROUP
+#define NOGROUP (-1)
+#endif
+
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/percpu.h b/6/platforms/android-3/arch-arm/usr/include/asm/percpu.h
new file mode 100644
index 0000000..2500345
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/percpu.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARM_PERCPU
+#define __ARM_PERCPU
+
+#include <asm-generic/percpu.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/pgalloc.h b/6/platforms/android-3/arch-arm/usr/include/asm/pgalloc.h
new file mode 100644
index 0000000..5d45e65
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/pgalloc.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_PGALLOC_H
+#define _ASMARM_PGALLOC_H
+
+#include <asm/domain.h>
+#include <asm/pgtable-hwdef.h>
+#include <asm/processor.h>
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
+
+#define check_pgt_cache() do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/pgtable-hwdef.h b/6/platforms/android-3/arch-arm/usr/include/asm/pgtable-hwdef.h
new file mode 100644
index 0000000..47e8675
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/pgtable-hwdef.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_PGTABLE_HWDEF_H
+#define _ASMARM_PGTABLE_HWDEF_H
+
+#define PMD_TYPE_MASK (3 << 0)
+#define PMD_TYPE_FAULT (0 << 0)
+#define PMD_TYPE_TABLE (1 << 0)
+#define PMD_TYPE_SECT (2 << 0)
+#define PMD_BIT4 (1 << 4)
+#define PMD_DOMAIN(x) ((x) << 5)
+#define PMD_PROTECTION (1 << 9)
+
+#define PMD_SECT_BUFFERABLE (1 << 2)
+#define PMD_SECT_CACHEABLE (1 << 3)
+#define PMD_SECT_XN (1 << 4)
+#define PMD_SECT_AP_WRITE (1 << 10)
+#define PMD_SECT_AP_READ (1 << 11)
+#define PMD_SECT_TEX(x) ((x) << 12)
+#define PMD_SECT_APX (1 << 15)
+#define PMD_SECT_S (1 << 16)
+#define PMD_SECT_nG (1 << 17)
+#define PMD_SECT_SUPER (1 << 18)
+
+#define PMD_SECT_UNCACHED (0)
+#define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE)
+#define PMD_SECT_WT (PMD_SECT_CACHEABLE)
+#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
+#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
+#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
+#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
+
+#define PTE_TYPE_MASK (3 << 0)
+#define PTE_TYPE_FAULT (0 << 0)
+#define PTE_TYPE_LARGE (1 << 0)
+#define PTE_TYPE_SMALL (2 << 0)
+#define PTE_TYPE_EXT (3 << 0)
+#define PTE_BUFFERABLE (1 << 2)
+#define PTE_CACHEABLE (1 << 3)
+
+#define PTE_EXT_XN (1 << 0)
+#define PTE_EXT_AP_MASK (3 << 4)
+#define PTE_EXT_AP0 (1 << 4)
+#define PTE_EXT_AP1 (2 << 4)
+#define PTE_EXT_AP_UNO_SRO (0 << 4)
+#define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0)
+#define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1)
+#define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0)
+#define PTE_EXT_TEX(x) ((x) << 6)
+#define PTE_EXT_APX (1 << 9)
+#define PTE_EXT_COHERENT (1 << 9)
+#define PTE_EXT_SHARED (1 << 10)
+#define PTE_EXT_NG (1 << 11)
+
+#define PTE_SMALL_AP_MASK (0xff << 4)
+#define PTE_SMALL_AP_UNO_SRO (0x00 << 4)
+#define PTE_SMALL_AP_UNO_SRW (0x55 << 4)
+#define PTE_SMALL_AP_URO_SRW (0xaa << 4)
+#define PTE_SMALL_AP_URW_SRW (0xff << 4)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/pgtable.h b/6/platforms/android-3/arch-arm/usr/include/asm/pgtable.h
new file mode 100644
index 0000000..cbac611
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/pgtable.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_PGTABLE_H
+#define _ASMARM_PGTABLE_H
+
+#include <asm-generic/4level-fixup.h>
+#include <asm/proc-fns.h>
+
+#include "pgtable-nommu.h"
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/poll.h b/6/platforms/android-3/arch-arm/usr/include/asm/poll.h
new file mode 100644
index 0000000..c5b80a5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/poll.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASMARM_POLL_H
+#define __ASMARM_POLL_H
+
+#define POLLIN 0x0001
+#define POLLPRI 0x0002
+#define POLLOUT 0x0004
+#define POLLERR 0x0008
+#define POLLHUP 0x0010
+#define POLLNVAL 0x0020
+
+#define POLLRDNORM 0x0040
+#define POLLRDBAND 0x0080
+#define POLLWRNORM 0x0100
+#define POLLWRBAND 0x0200
+#define POLLMSG 0x0400
+#define POLLREMOVE 0x1000
+#define POLLRDHUP 0x2000
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/posix_types.h b/6/platforms/android-3/arch-arm/usr/include/asm/posix_types.h
new file mode 100644
index 0000000..bc85217
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/posix_types.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_ARM_POSIX_TYPES_H
+#define __ARCH_ARM_POSIX_TYPES_H
+
+typedef unsigned long __kernel_ino_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned short __kernel_nlink_t;
+typedef long __kernel_off_t;
+typedef int __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned short __kernel_uid_t;
+typedef unsigned short __kernel_gid_t;
+typedef unsigned int __kernel_size_t;
+typedef int __kernel_ssize_t;
+typedef int __kernel_ptrdiff_t;
+typedef long __kernel_time_t;
+typedef long __kernel_suseconds_t;
+typedef long __kernel_clock_t;
+typedef int __kernel_timer_t;
+typedef int __kernel_clockid_t;
+typedef int __kernel_daddr_t;
+typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef unsigned short __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long __kernel_loff_t;
+#endif
+
+typedef struct {
+#ifdef __USE_ALL
+ int val[2];
+#else
+ int __val[2];
+#endif
+} __kernel_fsid_t;
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#undef __FD_SET
+#define __FD_SET(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
+
+#undef __FD_CLR
+#define __FD_CLR(fd, fdsetp) (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
+
+#undef __FD_ISSET
+#define __FD_ISSET(fd, fdsetp) ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
+
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp))))
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/proc-fns.h b/6/platforms/android-3/arch-arm/usr/include/asm/proc-fns.h
new file mode 100644
index 0000000..4a560d0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/proc-fns.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PROCFNS_H
+#define __ASM_PROCFNS_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/processor.h b/6/platforms/android-3/arch-arm/usr/include/asm/processor.h
new file mode 100644
index 0000000..f93cbc1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/processor.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_PROCESSOR_H
+#define __ASM_ARM_PROCESSOR_H
+
+#define current_text_addr() ({ __label__ _l; _l: &&_l;})
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/procinfo.h b/6/platforms/android-3/arch-arm/usr/include/asm/procinfo.h
new file mode 100644
index 0000000..d774e0b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/procinfo.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PROCINFO_H
+#define __ASM_PROCINFO_H
+
+#ifndef __ASSEMBLY__
+
+struct cpu_tlb_fns;
+struct cpu_user_fns;
+struct cpu_cache_fns;
+struct processor;
+
+struct proc_info_list {
+ unsigned int cpu_val;
+ unsigned int cpu_mask;
+ unsigned long __cpu_mm_mmu_flags;
+ unsigned long __cpu_io_mmu_flags;
+ unsigned long __cpu_flush;
+ const char *arch_name;
+ const char *elf_name;
+ unsigned int elf_hwcap;
+ const char *cpu_name;
+ struct processor *proc;
+ struct cpu_tlb_fns *tlb;
+ struct cpu_user_fns *user;
+ struct cpu_cache_fns *cache;
+};
+
+#endif
+
+#define HWCAP_SWP 1
+#define HWCAP_HALF 2
+#define HWCAP_THUMB 4
+#define HWCAP_26BIT 8
+#define HWCAP_FAST_MULT 16
+#define HWCAP_FPA 32
+#define HWCAP_VFP 64
+#define HWCAP_EDSP 128
+#define HWCAP_JAVA 256
+#define HWCAP_IWMMXT 512
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/ptrace.h b/6/platforms/android-3/arch-arm/usr/include/asm/ptrace.h
new file mode 100644
index 0000000..c6dfea1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/ptrace.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_PTRACE_H
+#define __ASM_ARM_PTRACE_H
+
+#define PTRACE_GETREGS 12
+#define PTRACE_SETREGS 13
+#define PTRACE_GETFPREGS 14
+#define PTRACE_SETFPREGS 15
+
+#define PTRACE_GETWMMXREGS 18
+#define PTRACE_SETWMMXREGS 19
+
+#define PTRACE_OLDSETOPTIONS 21
+
+#define PTRACE_GET_THREAD_AREA 22
+
+#define PTRACE_SET_SYSCALL 23
+
+#define PTRACE_GETCRUNCHREGS 25
+#define PTRACE_SETCRUNCHREGS 26
+
+#define USR26_MODE 0x00000000
+#define FIQ26_MODE 0x00000001
+#define IRQ26_MODE 0x00000002
+#define SVC26_MODE 0x00000003
+#define USR_MODE 0x00000010
+#define FIQ_MODE 0x00000011
+#define IRQ_MODE 0x00000012
+#define SVC_MODE 0x00000013
+#define ABT_MODE 0x00000017
+#define UND_MODE 0x0000001b
+#define SYSTEM_MODE 0x0000001f
+#define MODE32_BIT 0x00000010
+#define MODE_MASK 0x0000001f
+#define PSR_T_BIT 0x00000020
+#define PSR_F_BIT 0x00000040
+#define PSR_I_BIT 0x00000080
+#define PSR_J_BIT 0x01000000
+#define PSR_Q_BIT 0x08000000
+#define PSR_V_BIT 0x10000000
+#define PSR_C_BIT 0x20000000
+#define PSR_Z_BIT 0x40000000
+#define PSR_N_BIT 0x80000000
+#define PCMASK 0
+
+#define PSR_f 0xff000000
+#define PSR_s 0x00ff0000
+#define PSR_x 0x0000ff00
+#define PSR_c 0x000000ff
+
+#ifndef __ASSEMBLY__
+
+struct pt_regs {
+ long uregs[18];
+};
+
+#define ARM_cpsr uregs[16]
+#define ARM_pc uregs[15]
+#define ARM_lr uregs[14]
+#define ARM_sp uregs[13]
+#define ARM_ip uregs[12]
+#define ARM_fp uregs[11]
+#define ARM_r10 uregs[10]
+#define ARM_r9 uregs[9]
+#define ARM_r8 uregs[8]
+#define ARM_r7 uregs[7]
+#define ARM_r6 uregs[6]
+#define ARM_r5 uregs[5]
+#define ARM_r4 uregs[4]
+#define ARM_r3 uregs[3]
+#define ARM_r2 uregs[2]
+#define ARM_r1 uregs[1]
+#define ARM_r0 uregs[0]
+#define ARM_ORIG_r0 uregs[17]
+
+#define pc_pointer(v) ((v) & ~PCMASK)
+
+#define instruction_pointer(regs) (pc_pointer((regs)->ARM_pc))
+
+#define profile_pc(regs) instruction_pointer(regs)
+
+#endif
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/resource.h b/6/platforms/android-3/arch-arm/usr/include/asm/resource.h
new file mode 100644
index 0000000..7546dd4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/resource.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARM_RESOURCE_H
+#define _ARM_RESOURCE_H
+
+#include <asm-generic/resource.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/scatterlist.h b/6/platforms/android-3/arch-arm/usr/include/asm/scatterlist.h
new file mode 100644
index 0000000..a2c06ca
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/scatterlist.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SCATTERLIST_H
+#define _ASMARM_SCATTERLIST_H
+
+#include <asm/memory.h>
+#include <asm/types.h>
+
+struct scatterlist {
+ struct page *page;
+ unsigned int offset;
+ dma_addr_t dma_address;
+ unsigned int length;
+};
+
+#define sg_dma_address(sg) ((sg)->dma_address)
+#define sg_dma_len(sg) ((sg)->length)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/semaphore.h b/6/platforms/android-3/arch-arm/usr/include/asm/semaphore.h
new file mode 100644
index 0000000..7c5618a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/semaphore.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_SEMAPHORE_H
+#define __ASM_ARM_SEMAPHORE_H
+
+#include <linux/linkage.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/rwsem.h>
+
+#include <asm/atomic.h>
+#include <asm/locks.h>
+
+struct semaphore {
+ atomic_t count;
+ int sleepers;
+ wait_queue_head_t wait;
+};
+
+#define __SEMAPHORE_INIT(name, cnt) { .count = ATOMIC_INIT(cnt), .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), }
+
+#define __DECLARE_SEMAPHORE_GENERIC(name,count) struct semaphore name = __SEMAPHORE_INIT(name,count)
+
+#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
+#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/sembuf.h b/6/platforms/android-3/arch-arm/usr/include/asm/sembuf.h
new file mode 100644
index 0000000..a2f5dd0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/sembuf.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SEMBUF_H
+#define _ASMARM_SEMBUF_H
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm;
+ __kernel_time_t sem_otime;
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime;
+ unsigned long __unused2;
+ unsigned long sem_nsems;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/shmbuf.h b/6/platforms/android-3/arch-arm/usr/include/asm/shmbuf.h
new file mode 100644
index 0000000..1d4d78c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/shmbuf.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SHMBUF_H
+#define _ASMARM_SHMBUF_H
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm;
+ size_t shm_segsz;
+ __kernel_time_t shm_atime;
+ unsigned long __unused1;
+ __kernel_time_t shm_dtime;
+ unsigned long __unused2;
+ __kernel_time_t shm_ctime;
+ unsigned long __unused3;
+ __kernel_pid_t shm_cpid;
+ __kernel_pid_t shm_lpid;
+ unsigned long shm_nattch;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/shmparam.h b/6/platforms/android-3/arch-arm/usr/include/asm/shmparam.h
new file mode 100644
index 0000000..ea53a8d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/shmparam.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SHMPARAM_H
+#define _ASMARM_SHMPARAM_H
+
+#define SHMLBA (4 * PAGE_SIZE)
+
+#define __ARCH_FORCE_SHMLBA
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h b/6/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h
new file mode 100644
index 0000000..3c4fcf3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SIGCONTEXT_H
+#define _ASMARM_SIGCONTEXT_H
+
+struct sigcontext {
+ unsigned long trap_no;
+ unsigned long error_code;
+ unsigned long oldmask;
+ unsigned long arm_r0;
+ unsigned long arm_r1;
+ unsigned long arm_r2;
+ unsigned long arm_r3;
+ unsigned long arm_r4;
+ unsigned long arm_r5;
+ unsigned long arm_r6;
+ unsigned long arm_r7;
+ unsigned long arm_r8;
+ unsigned long arm_r9;
+ unsigned long arm_r10;
+ unsigned long arm_fp;
+ unsigned long arm_ip;
+ unsigned long arm_sp;
+ unsigned long arm_lr;
+ unsigned long arm_pc;
+ unsigned long arm_cpsr;
+ unsigned long fault_address;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/siginfo.h b/6/platforms/android-3/arch-arm/usr/include/asm/siginfo.h
new file mode 100644
index 0000000..225685e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/siginfo.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SIGINFO_H
+#define _ASMARM_SIGINFO_H
+
+#include <asm-generic/siginfo.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/signal.h b/6/platforms/android-3/arch-arm/usr/include/asm/signal.h
new file mode 100644
index 0000000..212d9f1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/signal.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SIGNAL_H
+#define _ASMARM_SIGNAL_H
+
+#include <linux/types.h>
+
+struct siginfo;
+
+#define NSIG 32
+typedef unsigned long sigset_t;
+
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGIOT 6
+#define SIGBUS 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGUSR1 10
+#define SIGSEGV 11
+#define SIGUSR2 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGSTKFLT 16
+#define SIGCHLD 17
+#define SIGCONT 18
+#define SIGSTOP 19
+#define SIGTSTP 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGURG 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGIO 29
+#define SIGPOLL SIGIO
+
+#define SIGPWR 30
+#define SIGSYS 31
+#define SIGUNUSED 31
+
+#define SIGRTMIN 32
+#define SIGRTMAX _NSIG
+
+#define SIGSWI 32
+
+#define SA_NOCLDSTOP 0x00000001
+#define SA_NOCLDWAIT 0x00000002
+#define SA_SIGINFO 0x00000004
+#define SA_THIRTYTWO 0x02000000
+#define SA_RESTORER 0x04000000
+#define SA_ONSTACK 0x08000000
+#define SA_RESTART 0x10000000
+#define SA_NODEFER 0x40000000
+#define SA_RESETHAND 0x80000000
+
+#define SA_NOMASK SA_NODEFER
+#define SA_ONESHOT SA_RESETHAND
+
+#define SS_ONSTACK 1
+#define SS_DISABLE 2
+
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
+
+#include <asm-generic/signal.h>
+
+struct sigaction {
+ union {
+ __sighandler_t _sa_handler;
+ void (*_sa_sigaction)(int, struct siginfo *, void *);
+ } _u;
+ sigset_t sa_mask;
+ unsigned long sa_flags;
+ void (*sa_restorer)(void);
+};
+
+#define sa_handler _u._sa_handler
+#define sa_sigaction _u._sa_sigaction
+
+typedef struct sigaltstack {
+ void __user *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+} stack_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/sizes.h b/6/platforms/android-3/arch-arm/usr/include/asm/sizes.h
new file mode 100644
index 0000000..90c1c71
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/sizes.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __sizes_h
+#define __sizes_h 1
+
+#define SZ_1K 0x00000400
+#define SZ_4K 0x00001000
+#define SZ_8K 0x00002000
+#define SZ_16K 0x00004000
+#define SZ_64K 0x00010000
+#define SZ_128K 0x00020000
+#define SZ_256K 0x00040000
+#define SZ_512K 0x00080000
+
+#define SZ_1M 0x00100000
+#define SZ_2M 0x00200000
+#define SZ_4M 0x00400000
+#define SZ_8M 0x00800000
+#define SZ_16M 0x01000000
+#define SZ_32M 0x02000000
+#define SZ_64M 0x04000000
+#define SZ_128M 0x08000000
+#define SZ_256M 0x10000000
+#define SZ_512M 0x20000000
+
+#define SZ_1G 0x40000000
+#define SZ_2G 0x80000000
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/smp.h b/6/platforms/android-3/arch-arm/usr/include/asm/smp.h
new file mode 100644
index 0000000..e6c1e41
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/smp.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_SMP_H
+#define __ASM_ARM_SMP_H
+
+#include <linux/threads.h>
+#include <linux/cpumask.h>
+#include <linux/thread_info.h>
+
+#include <asm/arch/smp.h>
+
+#error "<asm-arm/smp.h> included in non-SMP build"
+
+#define raw_smp_processor_id() (current_thread_info()->cpu)
+
+#define PROC_CHANGE_PENALTY 15
+
+struct seq_file;
+
+struct secondary_data {
+ unsigned long pgdir;
+ void *stack;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/socket.h b/6/platforms/android-3/arch-arm/usr/include/asm/socket.h
new file mode 100644
index 0000000..1f0050a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/socket.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SOCKET_H
+#define _ASMARM_SOCKET_H
+
+#include <asm/sockios.h>
+
+#define SOL_SOCKET 1
+
+#define SO_DEBUG 1
+#define SO_REUSEADDR 2
+#define SO_TYPE 3
+#define SO_ERROR 4
+#define SO_DONTROUTE 5
+#define SO_BROADCAST 6
+#define SO_SNDBUF 7
+#define SO_RCVBUF 8
+#define SO_SNDBUFFORCE 32
+#define SO_RCVBUFFORCE 33
+#define SO_KEEPALIVE 9
+#define SO_OOBINLINE 10
+#define SO_NO_CHECK 11
+#define SO_PRIORITY 12
+#define SO_LINGER 13
+#define SO_BSDCOMPAT 14
+
+#define SO_PASSCRED 16
+#define SO_PEERCRED 17
+#define SO_RCVLOWAT 18
+#define SO_SNDLOWAT 19
+#define SO_RCVTIMEO 20
+#define SO_SNDTIMEO 21
+
+#define SO_SECURITY_AUTHENTICATION 22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
+#define SO_SECURITY_ENCRYPTION_NETWORK 24
+
+#define SO_BINDTODEVICE 25
+
+#define SO_ATTACH_FILTER 26
+#define SO_DETACH_FILTER 27
+
+#define SO_PEERNAME 28
+#define SO_TIMESTAMP 29
+#define SCM_TIMESTAMP SO_TIMESTAMP
+
+#define SO_ACCEPTCONN 30
+
+#define SO_PEERSEC 31
+#define SO_PASSSEC 34
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/sockios.h b/6/platforms/android-3/arch-arm/usr/include/asm/sockios.h
new file mode 100644
index 0000000..cab86b8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/sockios.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_ARM_SOCKIOS_H
+#define __ARCH_ARM_SOCKIOS_H
+
+#define FIOSETOWN 0x8901
+#define SIOCSPGRP 0x8902
+#define FIOGETOWN 0x8903
+#define SIOCGPGRP 0x8904
+#define SIOCATMARK 0x8905
+#define SIOCGSTAMP 0x8906
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/spinlock.h b/6/platforms/android-3/arch-arm/usr/include/asm/spinlock.h
new file mode 100644
index 0000000..3ae2173
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/spinlock.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
+
+#if __LINUX_ARM_ARCH__ < 6
+#error SMP not supported on pre-ARMv6 CPUs
+#endif
+
+#define __raw_spin_is_locked(x) ((x)->lock != 0)
+#define __raw_spin_unlock_wait(lock) do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
+
+#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
+
+#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0)
+#define __raw_write_can_lock(x) ((x)->lock == 0x80000000)
+#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/spinlock_types.h b/6/platforms/android-3/arch-arm/usr/include/asm/spinlock_types.h
new file mode 100644
index 0000000..ee77f20
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/spinlock_types.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SPINLOCK_TYPES_H
+#define __ASM_SPINLOCK_TYPES_H
+
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#error "please don't include this file directly"
+#endif
+
+typedef struct {
+ volatile unsigned int lock;
+} raw_spinlock_t;
+
+#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
+
+typedef struct {
+ volatile unsigned int lock;
+} raw_rwlock_t;
+
+#define __RAW_RW_LOCK_UNLOCKED { 0 }
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/stat.h b/6/platforms/android-3/arch-arm/usr/include/asm/stat.h
new file mode 100644
index 0000000..49b85f9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/stat.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_STAT_H
+#define _ASMARM_STAT_H
+
+struct __old_kernel_stat {
+ unsigned short st_dev;
+ unsigned short st_ino;
+ unsigned short st_mode;
+ unsigned short st_nlink;
+ unsigned short st_uid;
+ unsigned short st_gid;
+ unsigned short st_rdev;
+ unsigned long st_size;
+ unsigned long st_atime;
+ unsigned long st_mtime;
+ unsigned long st_ctime;
+};
+
+#define STAT_HAVE_NSEC
+
+struct stat {
+#ifdef __ARMEB__
+ unsigned short st_dev;
+ unsigned short __pad1;
+#else
+ unsigned long st_dev;
+#endif
+ unsigned long st_ino;
+ unsigned short st_mode;
+ unsigned short st_nlink;
+ unsigned short st_uid;
+ unsigned short st_gid;
+#ifdef __ARMEB__
+ unsigned short st_rdev;
+ unsigned short __pad2;
+#else
+ unsigned long st_rdev;
+#endif
+ unsigned long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct stat64 {
+ unsigned long long st_dev;
+ unsigned char __pad0[4];
+
+#define STAT64_HAS_BROKEN_ST_INO 1
+ unsigned long __st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned long long st_rdev;
+ unsigned char __pad3[4];
+
+ long long st_size;
+ unsigned long st_blksize;
+ unsigned long long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+
+ unsigned long long st_ino;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/statfs.h b/6/platforms/android-3/arch-arm/usr/include/asm/statfs.h
new file mode 100644
index 0000000..7963eab
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/statfs.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_STATFS_H
+#define _ASMARM_STATFS_H
+
+struct statfs {
+ __u32 f_type;
+ __u32 f_bsize;
+ __u32 f_blocks;
+ __u32 f_bfree;
+ __u32 f_bavail;
+ __u32 f_files;
+ __u32 f_ffree;
+ __kernel_fsid_t f_fsid;
+ __u32 f_namelen;
+ __u32 f_frsize;
+ __u32 f_spare[5];
+};
+
+struct statfs64 {
+ __u32 f_type;
+ __u32 f_bsize;
+ __u64 f_blocks;
+ __u64 f_bfree;
+ __u64 f_bavail;
+ __u64 f_files;
+ __u64 f_ffree;
+ __kernel_fsid_t f_fsid;
+ __u32 f_namelen;
+ __u32 f_frsize;
+ __u32 f_spare[5];
+} __attribute__ ((packed,aligned(4)));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/suspend.h b/6/platforms/android-3/arch-arm/usr/include/asm/suspend.h
new file mode 100644
index 0000000..156c171
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/suspend.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_SUSPEND_H
+#define _ASMARM_SUSPEND_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/system.h b/6/platforms/android-3/arch-arm/usr/include/asm/system.h
new file mode 100644
index 0000000..8e85039
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/system.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_SYSTEM_H
+#define __ASM_ARM_SYSTEM_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/termbits.h b/6/platforms/android-3/arch-arm/usr/include/asm/termbits.h
new file mode 100644
index 0000000..640bd27
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/termbits.h
@@ -0,0 +1,174 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_TERMBITS_H
+#define __ASM_ARM_TERMBITS_H
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 19
+struct termios {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ cc_t c_line;
+ cc_t c_cc[NCCS];
+};
+
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IUCLC 0001000
+#define IXON 0002000
+#define IXANY 0004000
+#define IXOFF 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000
+
+#define OPOST 0000001
+#define OLCUC 0000002
+#define ONLCR 0000004
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+#define NLDLY 0000400
+#define NL0 0000000
+#define NL1 0000400
+#define CRDLY 0003000
+#define CR0 0000000
+#define CR1 0001000
+#define CR2 0002000
+#define CR3 0003000
+#define TABDLY 0014000
+#define TAB0 0000000
+#define TAB1 0004000
+#define TAB2 0010000
+#define TAB3 0014000
+#define XTABS 0014000
+#define BSDLY 0020000
+#define BS0 0000000
+#define BS1 0020000
+#define VTDLY 0040000
+#define VT0 0000000
+#define VT1 0040000
+#define FFDLY 0100000
+#define FF0 0000000
+#define FF1 0100000
+
+#define CBAUD 0010017
+#define B0 0000000
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE 0000060
+#define CS5 0000000
+#define CS6 0000020
+#define CS7 0000040
+#define CS8 0000060
+#define CSTOPB 0000100
+#define CREAD 0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL 0002000
+#define CLOCAL 0004000
+#define CBAUDEX 0010000
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+#define B500000 0010005
+#define B576000 0010006
+#define B921600 0010007
+#define B1000000 0010010
+#define B1152000 0010011
+#define B1500000 0010012
+#define B2000000 0010013
+#define B2500000 0010014
+#define B3000000 0010015
+#define B3500000 0010016
+#define B4000000 0010017
+#define CIBAUD 002003600000
+#define CMSPAR 010000000000
+#define CRTSCTS 020000000000
+
+#define ISIG 0000001
+#define ICANON 0000002
+#define XCASE 0000004
+#define ECHO 0000010
+#define ECHOE 0000020
+#define ECHOK 0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL 0001000
+#define ECHOPRT 0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/termios.h b/6/platforms/android-3/arch-arm/usr/include/asm/termios.h
new file mode 100644
index 0000000..ba43ac2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/termios.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_TERMIOS_H
+#define __ASM_ARM_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+ unsigned short ws_row;
+ unsigned short ws_col;
+ unsigned short ws_xpixel;
+ unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+ unsigned short c_iflag;
+ unsigned short c_oflag;
+ unsigned short c_cflag;
+ unsigned short c_lflag;
+ unsigned char c_line;
+ unsigned char c_cc[NCC];
+};
+
+#define TIOCM_LE 0x001
+#define TIOCM_DTR 0x002
+#define TIOCM_RTS 0x004
+#define TIOCM_ST 0x008
+#define TIOCM_SR 0x010
+#define TIOCM_CTS 0x020
+#define TIOCM_CAR 0x040
+#define TIOCM_RNG 0x080
+#define TIOCM_DSR 0x100
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_OUT1 0x2000
+#define TIOCM_OUT2 0x4000
+#define TIOCM_LOOP 0x8000
+
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6
+#define N_6PACK 7
+#define N_MASC 8
+#define N_R3964 9
+#define N_PROFIBUS_FDL 10
+#define N_IRDA 11
+#define N_SMSBLOCK 12
+#define N_HDLC 13
+#define N_SYNC_PPP 14
+#define N_HCI 15
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/thread_info.h b/6/platforms/android-3/arch-arm/usr/include/asm/thread_info.h
new file mode 100644
index 0000000..a30d2dc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/thread_info.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_THREAD_INFO_H
+#define __ASM_ARM_THREAD_INFO_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/timex.h b/6/platforms/android-3/arch-arm/usr/include/asm/timex.h
new file mode 100644
index 0000000..110c471
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/timex.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_TIMEX_H
+#define _ASMARM_TIMEX_H
+
+#include <asm/arch/timex.h>
+
+typedef unsigned long cycles_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/tlbflush.h b/6/platforms/android-3/arch-arm/usr/include/asm/tlbflush.h
new file mode 100644
index 0000000..70a23dc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/tlbflush.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_TLBFLUSH_H
+#define _ASMARM_TLBFLUSH_H
+
+#define tlb_flush(tlb) ((void) tlb)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/topology.h b/6/platforms/android-3/arch-arm/usr/include/asm/topology.h
new file mode 100644
index 0000000..9eccfd4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/topology.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_ARM_TOPOLOGY_H
+#define _ASM_ARM_TOPOLOGY_H
+
+#include <asm-generic/topology.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/types.h b/6/platforms/android-3/arch-arm/usr/include/asm/types.h
new file mode 100644
index 0000000..ec60f10
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/types.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_TYPES_H
+#define __ASM_ARM_TYPES_H
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
+
+#endif
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/uaccess.h b/6/platforms/android-3/arch-arm/usr/include/asm/uaccess.h
new file mode 100644
index 0000000..21fc3f2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/uaccess.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASMARM_UACCESS_H
+#define _ASMARM_UACCESS_H
+
+#include <linux/sched.h>
+#include <asm/errno.h>
+#include <asm/memory.h>
+#include <asm/domain.h>
+#include <asm/system.h>
+
+#define VERIFY_READ 0
+#define VERIFY_WRITE 1
+
+struct exception_table_entry
+{
+ unsigned long insn, fixup;
+};
+
+#define KERNEL_DS 0x00000000
+#define get_ds() (KERNEL_DS)
+
+#define USER_DS KERNEL_DS
+
+#define segment_eq(a,b) (1)
+#define __addr_ok(addr) (1)
+#define __range_ok(addr,size) (0)
+#define get_fs() (KERNEL_DS)
+
+#define get_user(x,p) __get_user(x,p)
+#define put_user(x,p) __put_user(x,p)
+#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
+#define __get_user(x,ptr) ({ long __gu_err = 0; __get_user_err((x),(ptr),__gu_err); __gu_err; })
+#define __get_user_error(x,ptr,err) ({ __get_user_err((x),(ptr),err); (void) 0; })
+#define __get_user_err(x,ptr,err) do { unsigned long __gu_addr = (unsigned long)(ptr); unsigned long __gu_val; __chk_user_ptr(ptr); switch (sizeof(*(ptr))) { case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; default: (__gu_val) = __get_user_bad(); } (x) = (__typeof__(*(ptr)))__gu_val; } while (0)
+#define __get_user_asm_byte(x,addr,err) __asm__ __volatile__( "1: ldrbt %1,[%2],#0\n" "2:\n" " .section .fixup,\"ax\"\n" " .align 2\n" "3: mov %0, %3\n" " mov %1, #0\n" " b 2b\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 3\n" " .long 1b, 3b\n" " .previous" : "+r" (err), "=&r" (x) : "r" (addr), "i" (-EFAULT) : "cc")
+#ifndef __ARMEB__
+#define __get_user_asm_half(x,__gu_addr,err) ({ unsigned long __b1, __b2; __get_user_asm_byte(__b1, __gu_addr, err); __get_user_asm_byte(__b2, __gu_addr + 1, err); (x) = __b1 | (__b2 << 8); })
+#else
+#define __get_user_asm_half(x,__gu_addr,err) ({ unsigned long __b1, __b2; __get_user_asm_byte(__b1, __gu_addr, err); __get_user_asm_byte(__b2, __gu_addr + 1, err); (x) = (__b1 << 8) | __b2; })
+#endif
+#define __get_user_asm_word(x,addr,err) __asm__ __volatile__( "1: ldrt %1,[%2],#0\n" "2:\n" " .section .fixup,\"ax\"\n" " .align 2\n" "3: mov %0, %3\n" " mov %1, #0\n" " b 2b\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 3\n" " .long 1b, 3b\n" " .previous" : "+r" (err), "=&r" (x) : "r" (addr), "i" (-EFAULT) : "cc")
+#define __put_user(x,ptr) ({ long __pu_err = 0; __put_user_err((x),(ptr),__pu_err); __pu_err; })
+#define __put_user_error(x,ptr,err) ({ __put_user_err((x),(ptr),err); (void) 0; })
+#define __put_user_err(x,ptr,err) do { unsigned long __pu_addr = (unsigned long)(ptr); __typeof__(*(ptr)) __pu_val = (x); __chk_user_ptr(ptr); switch (sizeof(*(ptr))) { case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; default: __put_user_bad(); } } while (0)
+#define __put_user_asm_byte(x,__pu_addr,err) __asm__ __volatile__( "1: strbt %1,[%2],#0\n" "2:\n" " .section .fixup,\"ax\"\n" " .align 2\n" "3: mov %0, %3\n" " b 2b\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 3\n" " .long 1b, 3b\n" " .previous" : "+r" (err) : "r" (x), "r" (__pu_addr), "i" (-EFAULT) : "cc")
+#ifndef __ARMEB__
+#define __put_user_asm_half(x,__pu_addr,err) ({ unsigned long __temp = (unsigned long)(x); __put_user_asm_byte(__temp, __pu_addr, err); __put_user_asm_byte(__temp >> 8, __pu_addr + 1, err); })
+#else
+#define __put_user_asm_half(x,__pu_addr,err) ({ unsigned long __temp = (unsigned long)(x); __put_user_asm_byte(__temp >> 8, __pu_addr, err); __put_user_asm_byte(__temp, __pu_addr + 1, err); })
+#endif
+#define __put_user_asm_word(x,__pu_addr,err) __asm__ __volatile__( "1: strt %1,[%2],#0\n" "2:\n" " .section .fixup,\"ax\"\n" " .align 2\n" "3: mov %0, %3\n" " b 2b\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 3\n" " .long 1b, 3b\n" " .previous" : "+r" (err) : "r" (x), "r" (__pu_addr), "i" (-EFAULT) : "cc")
+#ifndef __ARMEB__
+#define __reg_oper0 "%R2"
+#define __reg_oper1 "%Q2"
+#else
+#define __reg_oper0 "%Q2"
+#define __reg_oper1 "%R2"
+#endif
+#define __put_user_asm_dword(x,__pu_addr,err) __asm__ __volatile__( "1: strt " __reg_oper1 ", [%1], #4\n" "2: strt " __reg_oper0 ", [%1], #0\n" "3:\n" " .section .fixup,\"ax\"\n" " .align 2\n" "4: mov %0, %3\n" " b 3b\n" " .previous\n" " .section __ex_table,\"a\"\n" " .align 3\n" " .long 1b, 4b\n" " .long 2b, 4b\n" " .previous" : "+r" (err), "+r" (__pu_addr) : "r" (x), "i" (-EFAULT) : "cc")
+#define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0)
+#define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0)
+#define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0)
+
+#define __copy_to_user_inatomic __copy_to_user
+#define __copy_from_user_inatomic __copy_from_user
+#define strlen_user(s) strnlen_user(s, ~0UL >> 1)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/unaligned.h b/6/platforms/android-3/arch-arm/usr/include/asm/unaligned.h
new file mode 100644
index 0000000..8b9b096
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/unaligned.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_UNALIGNED_H
+#define __ASM_ARM_UNALIGNED_H
+
+#include <asm/types.h>
+
+#define __get_unaligned_2_le(__p) (__p[0] | __p[1] << 8)
+
+#define __get_unaligned_2_be(__p) (__p[0] << 8 | __p[1])
+
+#define __get_unaligned_4_le(__p) (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24)
+
+#define __get_unaligned_4_be(__p) (__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3])
+
+#define __get_unaligned_le(ptr) ({ __typeof__(*(ptr)) __v; __u8 *__p = (__u8 *)(ptr); switch (sizeof(*(ptr))) { case 1: __v = *(ptr); break; case 2: __v = __get_unaligned_2_le(__p); break; case 4: __v = __get_unaligned_4_le(__p); break; case 8: { unsigned int __v1, __v2; __v2 = __get_unaligned_4_le((__p+4)); __v1 = __get_unaligned_4_le(__p); __v = ((unsigned long long)__v2 << 32 | __v1); } break; default: __v = __bug_unaligned_x(__p); break; } __v; })
+
+#define __get_unaligned_be(ptr) ({ __typeof__(*(ptr)) __v; __u8 *__p = (__u8 *)(ptr); switch (sizeof(*(ptr))) { case 1: __v = *(ptr); break; case 2: __v = __get_unaligned_2_be(__p); break; case 4: __v = __get_unaligned_4_be(__p); break; case 8: { unsigned int __v1, __v2; __v2 = __get_unaligned_4_be(__p); __v1 = __get_unaligned_4_be((__p+4)); __v = ((unsigned long long)__v2 << 32 | __v1); } break; default: __v = __bug_unaligned_x(__p); break; } __v; })
+
+#define __put_unaligned_le(val,ptr) ({ switch (sizeof(*(ptr))) { case 1: *(ptr) = (val); break; case 2: __put_unaligned_2_le((val),(__u8 *)(ptr)); break; case 4: __put_unaligned_4_le((val),(__u8 *)(ptr)); break; case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); break; default: __bug_unaligned_x(ptr); break; } (void) 0; })
+#define __put_unaligned_be(val,ptr) ({ switch (sizeof(*(ptr))) { case 1: *(ptr) = (val); break; case 2: __put_unaligned_2_be((val),(__u8 *)(ptr)); break; case 4: __put_unaligned_4_be((val),(__u8 *)(ptr)); break; case 8: __put_unaligned_8_be((val),(__u8 *)(ptr)); break; default: __bug_unaligned_x(ptr); break; } (void) 0; })
+#ifndef __ARMEB__
+#define get_unaligned __get_unaligned_le
+#define put_unaligned __put_unaligned_le
+#else
+#define get_unaligned __get_unaligned_be
+#define put_unaligned __put_unaligned_be
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/unistd.h b/6/platforms/android-3/arch-arm/usr/include/asm/unistd.h
new file mode 100644
index 0000000..9a30ddc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/unistd.h
@@ -0,0 +1,359 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_UNISTD_H
+#define __ASM_ARM_UNISTD_H
+
+#define __NR_OABI_SYSCALL_BASE 0x900000
+
+#if defined(__thumb__) || defined(__ARM_EABI__)
+#define __NR_SYSCALL_BASE 0
+#else
+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
+#endif
+
+#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
+#define __NR_exit (__NR_SYSCALL_BASE+ 1)
+#define __NR_fork (__NR_SYSCALL_BASE+ 2)
+#define __NR_read (__NR_SYSCALL_BASE+ 3)
+#define __NR_write (__NR_SYSCALL_BASE+ 4)
+#define __NR_open (__NR_SYSCALL_BASE+ 5)
+#define __NR_close (__NR_SYSCALL_BASE+ 6)
+
+#define __NR_creat (__NR_SYSCALL_BASE+ 8)
+#define __NR_link (__NR_SYSCALL_BASE+ 9)
+#define __NR_unlink (__NR_SYSCALL_BASE+ 10)
+#define __NR_execve (__NR_SYSCALL_BASE+ 11)
+#define __NR_chdir (__NR_SYSCALL_BASE+ 12)
+#define __NR_time (__NR_SYSCALL_BASE+ 13)
+#define __NR_mknod (__NR_SYSCALL_BASE+ 14)
+#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
+#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
+
+#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
+#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
+#define __NR_mount (__NR_SYSCALL_BASE+ 21)
+#define __NR_umount (__NR_SYSCALL_BASE+ 22)
+#define __NR_setuid (__NR_SYSCALL_BASE+ 23)
+#define __NR_getuid (__NR_SYSCALL_BASE+ 24)
+#define __NR_stime (__NR_SYSCALL_BASE+ 25)
+#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
+#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
+
+#define __NR_pause (__NR_SYSCALL_BASE+ 29)
+#define __NR_utime (__NR_SYSCALL_BASE+ 30)
+
+#define __NR_access (__NR_SYSCALL_BASE+ 33)
+#define __NR_nice (__NR_SYSCALL_BASE+ 34)
+
+#define __NR_sync (__NR_SYSCALL_BASE+ 36)
+#define __NR_kill (__NR_SYSCALL_BASE+ 37)
+#define __NR_rename (__NR_SYSCALL_BASE+ 38)
+#define __NR_mkdir (__NR_SYSCALL_BASE+ 39)
+#define __NR_rmdir (__NR_SYSCALL_BASE+ 40)
+#define __NR_dup (__NR_SYSCALL_BASE+ 41)
+#define __NR_pipe (__NR_SYSCALL_BASE+ 42)
+#define __NR_times (__NR_SYSCALL_BASE+ 43)
+
+#define __NR_brk (__NR_SYSCALL_BASE+ 45)
+#define __NR_setgid (__NR_SYSCALL_BASE+ 46)
+#define __NR_getgid (__NR_SYSCALL_BASE+ 47)
+
+#define __NR_geteuid (__NR_SYSCALL_BASE+ 49)
+#define __NR_getegid (__NR_SYSCALL_BASE+ 50)
+#define __NR_acct (__NR_SYSCALL_BASE+ 51)
+#define __NR_umount2 (__NR_SYSCALL_BASE+ 52)
+
+#define __NR_ioctl (__NR_SYSCALL_BASE+ 54)
+#define __NR_fcntl (__NR_SYSCALL_BASE+ 55)
+
+#define __NR_setpgid (__NR_SYSCALL_BASE+ 57)
+
+#define __NR_umask (__NR_SYSCALL_BASE+ 60)
+#define __NR_chroot (__NR_SYSCALL_BASE+ 61)
+#define __NR_ustat (__NR_SYSCALL_BASE+ 62)
+#define __NR_dup2 (__NR_SYSCALL_BASE+ 63)
+#define __NR_getppid (__NR_SYSCALL_BASE+ 64)
+#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65)
+#define __NR_setsid (__NR_SYSCALL_BASE+ 66)
+#define __NR_sigaction (__NR_SYSCALL_BASE+ 67)
+
+#define __NR_setreuid (__NR_SYSCALL_BASE+ 70)
+#define __NR_setregid (__NR_SYSCALL_BASE+ 71)
+#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72)
+#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
+#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
+#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
+#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76)
+#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
+#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
+#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
+#define __NR_getgroups (__NR_SYSCALL_BASE+ 80)
+#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
+#define __NR_select (__NR_SYSCALL_BASE+ 82)
+#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
+
+#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
+#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
+#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
+#define __NR_reboot (__NR_SYSCALL_BASE+ 88)
+#define __NR_readdir (__NR_SYSCALL_BASE+ 89)
+#define __NR_mmap (__NR_SYSCALL_BASE+ 90)
+#define __NR_munmap (__NR_SYSCALL_BASE+ 91)
+#define __NR_truncate (__NR_SYSCALL_BASE+ 92)
+#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93)
+#define __NR_fchmod (__NR_SYSCALL_BASE+ 94)
+#define __NR_fchown (__NR_SYSCALL_BASE+ 95)
+#define __NR_getpriority (__NR_SYSCALL_BASE+ 96)
+#define __NR_setpriority (__NR_SYSCALL_BASE+ 97)
+
+#define __NR_statfs (__NR_SYSCALL_BASE+ 99)
+#define __NR_fstatfs (__NR_SYSCALL_BASE+100)
+
+#define __NR_socketcall (__NR_SYSCALL_BASE+102)
+#define __NR_syslog (__NR_SYSCALL_BASE+103)
+#define __NR_setitimer (__NR_SYSCALL_BASE+104)
+#define __NR_getitimer (__NR_SYSCALL_BASE+105)
+#define __NR_stat (__NR_SYSCALL_BASE+106)
+#define __NR_lstat (__NR_SYSCALL_BASE+107)
+#define __NR_fstat (__NR_SYSCALL_BASE+108)
+
+#define __NR_vhangup (__NR_SYSCALL_BASE+111)
+
+#define __NR_syscall (__NR_SYSCALL_BASE+113)
+#define __NR_wait4 (__NR_SYSCALL_BASE+114)
+#define __NR_swapoff (__NR_SYSCALL_BASE+115)
+#define __NR_sysinfo (__NR_SYSCALL_BASE+116)
+#define __NR_ipc (__NR_SYSCALL_BASE+117)
+#define __NR_fsync (__NR_SYSCALL_BASE+118)
+#define __NR_sigreturn (__NR_SYSCALL_BASE+119)
+#define __NR_clone (__NR_SYSCALL_BASE+120)
+#define __NR_setdomainname (__NR_SYSCALL_BASE+121)
+#define __NR_uname (__NR_SYSCALL_BASE+122)
+
+#define __NR_adjtimex (__NR_SYSCALL_BASE+124)
+#define __NR_mprotect (__NR_SYSCALL_BASE+125)
+#define __NR_sigprocmask (__NR_SYSCALL_BASE+126)
+
+#define __NR_init_module (__NR_SYSCALL_BASE+128)
+#define __NR_delete_module (__NR_SYSCALL_BASE+129)
+
+#define __NR_quotactl (__NR_SYSCALL_BASE+131)
+#define __NR_getpgid (__NR_SYSCALL_BASE+132)
+#define __NR_fchdir (__NR_SYSCALL_BASE+133)
+#define __NR_bdflush (__NR_SYSCALL_BASE+134)
+#define __NR_sysfs (__NR_SYSCALL_BASE+135)
+#define __NR_personality (__NR_SYSCALL_BASE+136)
+
+#define __NR_setfsuid (__NR_SYSCALL_BASE+138)
+#define __NR_setfsgid (__NR_SYSCALL_BASE+139)
+#define __NR__llseek (__NR_SYSCALL_BASE+140)
+#define __NR_getdents (__NR_SYSCALL_BASE+141)
+#define __NR__newselect (__NR_SYSCALL_BASE+142)
+#define __NR_flock (__NR_SYSCALL_BASE+143)
+#define __NR_msync (__NR_SYSCALL_BASE+144)
+#define __NR_readv (__NR_SYSCALL_BASE+145)
+#define __NR_writev (__NR_SYSCALL_BASE+146)
+#define __NR_getsid (__NR_SYSCALL_BASE+147)
+#define __NR_fdatasync (__NR_SYSCALL_BASE+148)
+#define __NR__sysctl (__NR_SYSCALL_BASE+149)
+#define __NR_mlock (__NR_SYSCALL_BASE+150)
+#define __NR_munlock (__NR_SYSCALL_BASE+151)
+#define __NR_mlockall (__NR_SYSCALL_BASE+152)
+#define __NR_munlockall (__NR_SYSCALL_BASE+153)
+#define __NR_sched_setparam (__NR_SYSCALL_BASE+154)
+#define __NR_sched_getparam (__NR_SYSCALL_BASE+155)
+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156)
+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157)
+#define __NR_sched_yield (__NR_SYSCALL_BASE+158)
+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159)
+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160)
+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161)
+#define __NR_nanosleep (__NR_SYSCALL_BASE+162)
+#define __NR_mremap (__NR_SYSCALL_BASE+163)
+#define __NR_setresuid (__NR_SYSCALL_BASE+164)
+#define __NR_getresuid (__NR_SYSCALL_BASE+165)
+
+#define __NR_poll (__NR_SYSCALL_BASE+168)
+#define __NR_nfsservctl (__NR_SYSCALL_BASE+169)
+#define __NR_setresgid (__NR_SYSCALL_BASE+170)
+#define __NR_getresgid (__NR_SYSCALL_BASE+171)
+#define __NR_prctl (__NR_SYSCALL_BASE+172)
+#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173)
+#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174)
+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175)
+#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176)
+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177)
+#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178)
+#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179)
+#define __NR_pread64 (__NR_SYSCALL_BASE+180)
+#define __NR_pwrite64 (__NR_SYSCALL_BASE+181)
+#define __NR_chown (__NR_SYSCALL_BASE+182)
+#define __NR_getcwd (__NR_SYSCALL_BASE+183)
+#define __NR_capget (__NR_SYSCALL_BASE+184)
+#define __NR_capset (__NR_SYSCALL_BASE+185)
+#define __NR_sigaltstack (__NR_SYSCALL_BASE+186)
+#define __NR_sendfile (__NR_SYSCALL_BASE+187)
+
+#define __NR_vfork (__NR_SYSCALL_BASE+190)
+#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191)
+#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
+#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
+#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
+#define __NR_stat64 (__NR_SYSCALL_BASE+195)
+#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
+#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
+#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
+#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
+#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
+#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
+#define __NR_chown32 (__NR_SYSCALL_BASE+212)
+#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
+#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
+#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
+#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
+#define __NR_getdents64 (__NR_SYSCALL_BASE+217)
+#define __NR_pivot_root (__NR_SYSCALL_BASE+218)
+#define __NR_mincore (__NR_SYSCALL_BASE+219)
+#define __NR_madvise (__NR_SYSCALL_BASE+220)
+#define __NR_fcntl64 (__NR_SYSCALL_BASE+221)
+
+#define __NR_gettid (__NR_SYSCALL_BASE+224)
+#define __NR_readahead (__NR_SYSCALL_BASE+225)
+#define __NR_setxattr (__NR_SYSCALL_BASE+226)
+#define __NR_lsetxattr (__NR_SYSCALL_BASE+227)
+#define __NR_fsetxattr (__NR_SYSCALL_BASE+228)
+#define __NR_getxattr (__NR_SYSCALL_BASE+229)
+#define __NR_lgetxattr (__NR_SYSCALL_BASE+230)
+#define __NR_fgetxattr (__NR_SYSCALL_BASE+231)
+#define __NR_listxattr (__NR_SYSCALL_BASE+232)
+#define __NR_llistxattr (__NR_SYSCALL_BASE+233)
+#define __NR_flistxattr (__NR_SYSCALL_BASE+234)
+#define __NR_removexattr (__NR_SYSCALL_BASE+235)
+#define __NR_lremovexattr (__NR_SYSCALL_BASE+236)
+#define __NR_fremovexattr (__NR_SYSCALL_BASE+237)
+#define __NR_tkill (__NR_SYSCALL_BASE+238)
+#define __NR_sendfile64 (__NR_SYSCALL_BASE+239)
+#define __NR_futex (__NR_SYSCALL_BASE+240)
+#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241)
+#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242)
+#define __NR_io_setup (__NR_SYSCALL_BASE+243)
+#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
+#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
+#define __NR_io_submit (__NR_SYSCALL_BASE+246)
+#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
+#define __NR_exit_group (__NR_SYSCALL_BASE+248)
+#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249)
+#define __NR_epoll_create (__NR_SYSCALL_BASE+250)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE+252)
+#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253)
+
+#define __NR_set_tid_address (__NR_SYSCALL_BASE+256)
+#define __NR_timer_create (__NR_SYSCALL_BASE+257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE+258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE+259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE+261)
+#define __NR_clock_settime (__NR_SYSCALL_BASE+262)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE+263)
+#define __NR_clock_getres (__NR_SYSCALL_BASE+264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265)
+#define __NR_statfs64 (__NR_SYSCALL_BASE+266)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267)
+#define __NR_tgkill (__NR_SYSCALL_BASE+268)
+#define __NR_utimes (__NR_SYSCALL_BASE+269)
+#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270)
+#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271)
+#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272)
+#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273)
+#define __NR_mq_open (__NR_SYSCALL_BASE+274)
+#define __NR_mq_unlink (__NR_SYSCALL_BASE+275)
+#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276)
+#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277)
+#define __NR_mq_notify (__NR_SYSCALL_BASE+278)
+#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
+#define __NR_waitid (__NR_SYSCALL_BASE+280)
+#define __NR_socket (__NR_SYSCALL_BASE+281)
+#define __NR_bind (__NR_SYSCALL_BASE+282)
+#define __NR_connect (__NR_SYSCALL_BASE+283)
+#define __NR_listen (__NR_SYSCALL_BASE+284)
+#define __NR_accept (__NR_SYSCALL_BASE+285)
+#define __NR_getsockname (__NR_SYSCALL_BASE+286)
+#define __NR_getpeername (__NR_SYSCALL_BASE+287)
+#define __NR_socketpair (__NR_SYSCALL_BASE+288)
+#define __NR_send (__NR_SYSCALL_BASE+289)
+#define __NR_sendto (__NR_SYSCALL_BASE+290)
+#define __NR_recv (__NR_SYSCALL_BASE+291)
+#define __NR_recvfrom (__NR_SYSCALL_BASE+292)
+#define __NR_shutdown (__NR_SYSCALL_BASE+293)
+#define __NR_setsockopt (__NR_SYSCALL_BASE+294)
+#define __NR_getsockopt (__NR_SYSCALL_BASE+295)
+#define __NR_sendmsg (__NR_SYSCALL_BASE+296)
+#define __NR_recvmsg (__NR_SYSCALL_BASE+297)
+#define __NR_semop (__NR_SYSCALL_BASE+298)
+#define __NR_semget (__NR_SYSCALL_BASE+299)
+#define __NR_semctl (__NR_SYSCALL_BASE+300)
+#define __NR_msgsnd (__NR_SYSCALL_BASE+301)
+#define __NR_msgrcv (__NR_SYSCALL_BASE+302)
+#define __NR_msgget (__NR_SYSCALL_BASE+303)
+#define __NR_msgctl (__NR_SYSCALL_BASE+304)
+#define __NR_shmat (__NR_SYSCALL_BASE+305)
+#define __NR_shmdt (__NR_SYSCALL_BASE+306)
+#define __NR_shmget (__NR_SYSCALL_BASE+307)
+#define __NR_shmctl (__NR_SYSCALL_BASE+308)
+#define __NR_add_key (__NR_SYSCALL_BASE+309)
+#define __NR_request_key (__NR_SYSCALL_BASE+310)
+#define __NR_keyctl (__NR_SYSCALL_BASE+311)
+#define __NR_semtimedop (__NR_SYSCALL_BASE+312)
+#define __NR_vserver (__NR_SYSCALL_BASE+313)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE+314)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE+315)
+#define __NR_inotify_init (__NR_SYSCALL_BASE+316)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318)
+#define __NR_mbind (__NR_SYSCALL_BASE+319)
+#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
+#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
+
+#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
+#define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
+#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
+#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
+#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
+#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
+
+#if defined(__ARM_EABI__) && !defined(__KERNEL__)
+#undef __NR_time
+#undef __NR_umount
+#undef __NR_stime
+#undef __NR_alarm
+#undef __NR_utime
+#undef __NR_getrlimit
+#undef __NR_select
+#undef __NR_readdir
+#undef __NR_mmap
+#undef __NR_socketcall
+#undef __NR_syscall
+#undef __NR_ipc
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/user.h b/6/platforms/android-3/arch-arm/usr/include/asm/user.h
new file mode 100644
index 0000000..5f25850
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/user.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARM_USER_H
+#define _ARM_USER_H
+
+#include <asm/page.h>
+#include <asm/ptrace.h>
+
+struct user_fp {
+ struct fp_reg {
+ unsigned int sign1:1;
+ unsigned int unused:15;
+ unsigned int sign2:1;
+ unsigned int exponent:14;
+ unsigned int j:1;
+ unsigned int mantissa1:31;
+ unsigned int mantissa0:32;
+ } fpregs[8];
+ unsigned int fpsr:32;
+ unsigned int fpcr:32;
+ unsigned char ftype[8];
+ unsigned int init_flag;
+};
+
+struct user{
+
+ struct pt_regs regs;
+
+ int u_fpvalid;
+
+ unsigned long int u_tsize;
+ unsigned long int u_dsize;
+ unsigned long int u_ssize;
+ unsigned long start_code;
+ unsigned long start_stack;
+ long int signal;
+ int reserved;
+ struct pt_regs * u_ar0;
+
+ unsigned long magic;
+ char u_comm[32];
+ int u_debugreg[8];
+ struct user_fp u_fp;
+ struct user_fp_struct * u_fp0;
+
+};
+#define NBPG PAGE_SIZE
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/asm/vga.h b/6/platforms/android-3/arch-arm/usr/include/asm/vga.h
new file mode 100644
index 0000000..7875dbf
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/asm/vga.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef ASMARM_VGA_H
+#define ASMARM_VGA_H
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+
+#define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x))
+
+#define vga_readb(x) (*((volatile unsigned char *)x))
+#define vga_writeb(x,y) (*((volatile unsigned char *)y) = (x))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/assert.h b/6/platforms/android-3/arch-arm/usr/include/assert.h
new file mode 100644
index 0000000..62470f5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/assert.h
@@ -0,0 +1,65 @@
+/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */
+/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)assert.h 8.2 (Berkeley) 1/21/94
+ */
+
+/*
+ * Unlike other ANSI header files, <assert.h> may usefully be included
+ * multiple times, with and without NDEBUG defined.
+ */
+
+#include <sys/cdefs.h>
+
+#undef assert
+#undef _assert
+
+#ifdef NDEBUG
+# define assert(e) ((void)0)
+# define _assert(e) ((void)0)
+#else
+# define _assert(e) assert(e)
+# if __ISO_C_VISIBLE >= 1999
+# define assert(e) ((e) ? (void)0 : __assert2(__FILE__, __LINE__, __func__, #e))
+# else
+# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
+# endif
+#endif
+
+__BEGIN_DECLS
+__dead void __assert(const char *, int, const char *);
+__dead void __assert2(const char *, int, const char *, const char *);
+__END_DECLS
diff --git a/6/platforms/android-3/arch-arm/usr/include/byteswap.h b/6/platforms/android-3/arch-arm/usr/include/byteswap.h
new file mode 100644
index 0000000..16d2ad4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/byteswap.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _BYTESWAP_H_
+#define _BYTESWAP_H_
+
+#include <sys/endian.h>
+
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+
+#endif /* _BYTESWAP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/ctype.h b/6/platforms/android-3/arch-arm/usr/include/ctype.h
new file mode 100644
index 0000000..58b76ea
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/ctype.h
@@ -0,0 +1,207 @@
+/* $OpenBSD: ctype.h,v 1.19 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */
+
+/*
+ * Copyright (c) 1989 The Regents of the University of California.
+ * All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ctype.h 5.3 (Berkeley) 4/3/91
+ */
+
+#ifndef _CTYPE_H_
+#define _CTYPE_H_
+
+#include <sys/cdefs.h>
+
+#define _U 0x01
+#define _L 0x02
+#define _N 0x04
+#define _S 0x08
+#define _P 0x10
+#define _C 0x20
+#define _X 0x40
+#define _B 0x80
+
+__BEGIN_DECLS
+
+extern const char *_ctype_;
+extern const short *_tolower_tab_;
+extern const short *_toupper_tab_;
+
+/* extern __inline is a GNU C extension */
+#ifdef __GNUC__
+# if defined(__GNUC_STDC_INLINE__)
+#define __CTYPE_INLINE extern __inline __attribute__((__gnu_inline__))
+# else
+#define __CTYPE_INLINE extern __inline
+# endif
+#else
+#define __CTYPE_INLINE static __inline
+#endif
+
+#if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint)
+int isalnum(int);
+int isalpha(int);
+int iscntrl(int);
+int isdigit(int);
+int isgraph(int);
+int islower(int);
+int isprint(int);
+int ispunct(int);
+int isspace(int);
+int isupper(int);
+int isxdigit(int);
+int tolower(int);
+int toupper(int);
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 200112 \
+ || __XPG_VISIBLE > 600
+int isblank(int);
+#endif
+
+#if __BSD_VISIBLE || __XPG_VISIBLE
+int isascii(int);
+int toascii(int);
+int _tolower(int);
+int _toupper(int);
+#endif /* __BSD_VISIBLE || __XPG_VISIBLE */
+
+#endif /* __GNUC__ || _ANSI_LIBRARY || lint */
+
+#if defined(NDEBUG)
+
+__CTYPE_INLINE int isalnum(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L|_N)));
+}
+
+__CTYPE_INLINE int isalpha(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L)));
+}
+
+__CTYPE_INLINE int iscntrl(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _C));
+}
+
+__CTYPE_INLINE int isdigit(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _N));
+}
+
+__CTYPE_INLINE int isgraph(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N)));
+}
+
+__CTYPE_INLINE int islower(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _L));
+}
+
+__CTYPE_INLINE int isprint(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N|_B)));
+}
+
+__CTYPE_INLINE int ispunct(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _P));
+}
+
+__CTYPE_INLINE int isspace(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _S));
+}
+
+__CTYPE_INLINE int isupper(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _U));
+}
+
+__CTYPE_INLINE int isxdigit(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_N|_X)));
+}
+
+__CTYPE_INLINE int tolower(int c)
+{
+ if ((unsigned int)c > 255)
+ return (c);
+ return ((_tolower_tab_ + 1)[c]);
+}
+
+__CTYPE_INLINE int toupper(int c)
+{
+ if ((unsigned int)c > 255)
+ return (c);
+ return ((_toupper_tab_ + 1)[c]);
+}
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 200112 \
+ || __XPG_VISIBLE > 600
+__CTYPE_INLINE int isblank(int c)
+{
+ return (c == ' ' || c == '\t');
+}
+#endif
+
+#if __BSD_VISIBLE || __XPG_VISIBLE
+__CTYPE_INLINE int isascii(int c)
+{
+ return ((unsigned int)c <= 0177);
+}
+
+__CTYPE_INLINE int toascii(int c)
+{
+ return (c & 0177);
+}
+
+__CTYPE_INLINE int _tolower(int c)
+{
+ return (c - 'A' + 'a');
+}
+
+__CTYPE_INLINE int _toupper(int c)
+{
+ return (c - 'a' + 'A');
+}
+#endif /* __BSD_VISIBLE || __XPG_VISIBLE */
+
+#endif /* NDEBUG */
+
+__END_DECLS
+
+#undef __CTYPE_INLINE
+
+#endif /* !_CTYPE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/dirent.h b/6/platforms/android-3/arch-arm/usr/include/dirent.h
new file mode 100644
index 0000000..55eef7b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/dirent.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#ifndef DT_UNKNOWN
+#define DT_UNKNOWN 0
+#define DT_FIFO 1
+#define DT_CHR 2
+#define DT_DIR 4
+#define DT_BLK 6
+#define DT_REG 8
+#define DT_LNK 10
+#define DT_SOCK 12
+#define DT_WHT 14
+#endif
+
+/* the following structure is really called dirent64 by the kernel
+ * headers. They also define a struct dirent, but the latter lack
+ * the d_type field which is required by some libraries (e.g. hotplug)
+ * who assume to be able to access it directly. sad...
+ */
+struct dirent {
+ uint64_t d_ino;
+ int64_t d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+typedef struct DIR DIR;
+
+extern int getdents(unsigned int, struct dirent*, unsigned int);
+extern DIR* opendir(const char* dirpath);
+extern DIR* fdopendir(int fd);
+extern struct dirent* readdir(DIR* dirp);
+extern int readdir_r(DIR* dirp, struct dirent *entry, struct dirent **result);
+extern int closedir(DIR* dirp);
+extern void rewinddir(DIR *dirp);
+extern int dirfd(DIR* dirp);
+extern int alphasort(const void *a, const void *b);
+extern int scandir(const char *dir, struct dirent ***namelist,
+ int(*filter)(const struct dirent *),
+ int(*compar)(const struct dirent **,
+ const struct dirent **));
+
+__END_DECLS
+
+#endif /* _DIRENT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/dlfcn.h b/6/platforms/android-3/arch-arm/usr/include/dlfcn.h
new file mode 100644
index 0000000..9582796
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/dlfcn.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef __DLFCN_H__
+#define __DLFCN_H__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+extern void* dlopen(const char* filename, int flag);
+extern int dlclose(void* handle);
+extern const char* dlerror(void);
+extern void* dlsym(void* handle, const char* symbol);
+
+enum {
+ RTLD_NOW = 0,
+ RTLD_LAZY = 1,
+
+ RTLD_LOCAL = 0,
+ RTLD_GLOBAL = 2,
+};
+
+#define RTLD_DEFAULT ((void*) 0xffffffff)
+#define RTLD_NEXT ((void*) 0xfffffffe)
+
+__END_DECLS
+
+#endif /* __DLFCN_H */
+
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/elf.h b/6/platforms/android-3/arch-arm/usr/include/elf.h
new file mode 100644
index 0000000..8a86a63
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/elf.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ELF_H
+#define _ELF_H
+
+/* these definitions are missing from the BSD sources */
+enum {
+ AT_NULL = 0,
+ AT_IGNORE,
+ AT_EXECFD,
+ AT_PHDR,
+ AT_PHENT,
+ AT_PHNUM,
+ AT_PAGESZ,
+ AT_BASE,
+ AT_FLAGS,
+ AT_ENTRY,
+ AT_NOTELF,
+ AT_UID,
+ AT_EUID,
+ AT_GID,
+ AT_EGID,
+ AT_PLATFORM,
+ AT_HWCAP,
+ AT_CLKTCK,
+
+ AT_SECURE = 23
+};
+
+#include <sys/exec_elf.h>
+
+#endif /* _ELF_H */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/endian.h b/6/platforms/android-3/arch-arm/usr/include/endian.h
new file mode 100644
index 0000000..475b48c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/endian.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ENDIAN_H_
+#define _ENDIAN_H_
+
+#include <sys/endian.h>
+
+#endif /* _ENDIAN_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/err.h b/6/platforms/android-3/arch-arm/usr/include/err.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/err.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/errno.h b/6/platforms/android-3/arch-arm/usr/include/errno.h
new file mode 100644
index 0000000..2b2685a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/errno.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ERRNO_H
+#define _ERRNO_H
+
+#include <sys/cdefs.h>
+#include <linux/errno.h>
+
+__BEGIN_DECLS
+
+/* on Linux, ENOTSUP and EOPNOTSUPP are defined as the same error code
+ * even if 1000.3 states that they should be different
+ */
+#ifndef ENOTUP
+#define ENOTSUP EOPNOTSUPP
+#endif
+
+/* internal function that should *only* be called from system calls */
+/* use errno = xxxx instead in C code */
+extern int __set_errno(int error);
+
+/* internal function returning the address of the thread-specific errno */
+extern volatile int* __errno(void);
+
+/* a macro expanding to the errno l-value */
+#define errno (*__errno())
+
+__END_DECLS
+
+#endif /* _ERRNO_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/fcntl.h b/6/platforms/android-3/arch-arm/usr/include/fcntl.h
new file mode 100644
index 0000000..7219dd7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/fcntl.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FCNTL_H
+#define _FCNTL_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/fcntl.h>
+#include <unistd.h> /* this is not required, but makes client code much happier */
+
+__BEGIN_DECLS
+
+#ifndef O_ASYNC
+#define O_ASYNC FASYNC
+#endif
+
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 02000000
+#endif
+
+extern int open(const char* path, int mode, ...);
+extern int openat(int fd, const char* path, int mode, ...);
+extern int unlinkat(int dirfd, const char *pathname, int flags);
+extern int fcntl(int fd, int command, ...);
+extern int creat(const char* path, mode_t mode);
+
+__END_DECLS
+
+#endif /* _FCNTL_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/features.h b/6/platforms/android-3/arch-arm/usr/include/features.h
new file mode 100644
index 0000000..343c84d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/features.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FEATURES_H_
+#define _FEATURES_H_
+
+/* certain Linux-specific programs expect a <features.h> header file
+ * that defines various features macros
+ */
+
+/* we do include a number of BSD extensions */
+#define _BSD_SOURCE 1
+
+/* we do include a number of GNU extensions */
+#define _GNU_SOURCE 1
+
+/* C95 support */
+#undef __USE_ISOC95
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L
+# define __USE_ISOC95 1
+#endif
+
+/* C99 support */
+#undef __USE_ISOC99
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __USE_ISOC99 1
+#endif
+
+/* Posix support */
+#define __USE_POSIX 1
+#define __USE_POSIX2 1
+#define __USE_XPG 1
+
+#endif /* _FEATURES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/fenv.h b/6/platforms/android-3/arch-arm/usr/include/fenv.h
new file mode 100644
index 0000000..e7a8860
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/fenv.h
@@ -0,0 +1,217 @@
+/*-
+ * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/msun/arm/fenv.h,v 1.5 2005/03/16 19:03:45 das Exp $
+ */
+
+#ifndef _FENV_H_
+#define _FENV_H_
+
+#include <sys/_types.h>
+
+typedef __uint32_t fenv_t;
+typedef __uint32_t fexcept_t;
+
+/* Exception flags */
+#define FE_INVALID 0x0001
+#define FE_DIVBYZERO 0x0002
+#define FE_OVERFLOW 0x0004
+#define FE_UNDERFLOW 0x0008
+#define FE_INEXACT 0x0010
+#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_INEXACT | \
+ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+
+/* Rounding modes */
+#define FE_TONEAREST 0x0000
+#define FE_TOWARDZERO 0x0001
+#define FE_UPWARD 0x0002
+#define FE_DOWNWARD 0x0003
+#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
+ FE_UPWARD | FE_TOWARDZERO)
+__BEGIN_DECLS
+
+/* Default floating-point environment */
+extern const fenv_t __fe_dfl_env;
+#define FE_DFL_ENV (&__fe_dfl_env)
+
+/* We need to be able to map status flag positions to mask flag positions */
+#define _FPUSW_SHIFT 16
+#define _ENABLE_MASK (FE_ALL_EXCEPT << _FPUSW_SHIFT)
+
+#ifdef ARM_HARD_FLOAT
+#define __rfs(__fpsr) __asm __volatile("rfs %0" : "=r" (*(__fpsr)))
+#define __wfs(__fpsr) __asm __volatile("wfs %0" : : "r" (__fpsr))
+#else
+#define __rfs(__fpsr)
+#define __wfs(__fpsr)
+#endif
+
+static __inline int
+feclearexcept(int __excepts)
+{
+ fexcept_t __fpsr;
+
+ __rfs(&__fpsr);
+ __fpsr &= ~__excepts;
+ __wfs(__fpsr);
+ return (0);
+}
+
+static __inline int
+fegetexceptflag(fexcept_t *__flagp, int __excepts)
+{
+ fexcept_t __fpsr;
+
+ __rfs(&__fpsr);
+ *__flagp = __fpsr & __excepts;
+ return (0);
+}
+
+static __inline int
+fesetexceptflag(const fexcept_t *__flagp, int __excepts)
+{
+ fexcept_t __fpsr;
+
+ __rfs(&__fpsr);
+ __fpsr &= ~__excepts;
+ __fpsr |= *__flagp & __excepts;
+ __wfs(__fpsr);
+ return (0);
+}
+
+static __inline int
+feraiseexcept(int __excepts)
+{
+ fexcept_t __ex = __excepts;
+
+ fesetexceptflag(&__ex, __excepts); /* XXX */
+ return (0);
+}
+
+static __inline int
+fetestexcept(int __excepts)
+{
+ fexcept_t __fpsr;
+
+ __rfs(&__fpsr);
+ return (__fpsr & __excepts);
+}
+
+static __inline int
+fegetround(void)
+{
+
+ /*
+ * Apparently, the rounding mode is specified as part of the
+ * instruction format on ARM, so the dynamic rounding mode is
+ * indeterminate. Some FPUs may differ.
+ */
+ return (-1);
+}
+
+static __inline int
+fesetround(int __round)
+{
+
+ return (-1);
+}
+
+static __inline int
+fegetenv(fenv_t *__envp)
+{
+
+ __rfs(__envp);
+ return (0);
+}
+
+static __inline int
+feholdexcept(fenv_t *__envp)
+{
+ fenv_t __env;
+
+ __rfs(&__env);
+ *__envp = __env;
+ __env &= ~(FE_ALL_EXCEPT | _ENABLE_MASK);
+ __wfs(__env);
+ return (0);
+}
+
+static __inline int
+fesetenv(const fenv_t *__envp)
+{
+
+ __wfs(*__envp);
+ return (0);
+}
+
+static __inline int
+feupdateenv(const fenv_t *__envp)
+{
+ fexcept_t __fpsr;
+
+ __rfs(&__fpsr);
+ __wfs(*__envp);
+ feraiseexcept(__fpsr & FE_ALL_EXCEPT);
+ return (0);
+}
+
+#if __BSD_VISIBLE
+
+static __inline int
+feenableexcept(int __mask)
+{
+ fenv_t __old_fpsr, __new_fpsr;
+
+ __rfs(&__old_fpsr);
+ __new_fpsr = __old_fpsr | (__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT;
+ __wfs(__new_fpsr);
+ return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
+}
+
+static __inline int
+fedisableexcept(int __mask)
+{
+ fenv_t __old_fpsr, __new_fpsr;
+
+ __rfs(&__old_fpsr);
+ __new_fpsr = __old_fpsr & ~((__mask & FE_ALL_EXCEPT) << _FPUSW_SHIFT);
+ __wfs(__new_fpsr);
+ return ((__old_fpsr >> _FPUSW_SHIFT) & FE_ALL_EXCEPT);
+}
+
+static __inline int
+fegetexcept(void)
+{
+ fenv_t __fpsr;
+
+ __rfs(&__fpsr);
+ return ((__fpsr & _ENABLE_MASK) >> _FPUSW_SHIFT);
+}
+
+#endif /* __BSD_VISIBLE */
+
+__END_DECLS
+
+#endif /* !_FENV_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/fnmatch.h b/6/platforms/android-3/arch-arm/usr/include/fnmatch.h
new file mode 100644
index 0000000..772b4ef
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/fnmatch.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FNMATCH_H
+#define _FNMATCH_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define FNM_NOMATCH 1 /* Match failed. */
+#define FNM_NOSYS 2 /* Function not supported (unused). */
+
+#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
+#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
+#define FNM_PERIOD 0x04 /* Period must be matched by period. */
+#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
+#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
+
+#define FNM_IGNORECASE FNM_CASEFOLD
+#define FNM_FILE_NAME FNM_PATHNAME
+
+extern int fnmatch(const char *pattern, const char *string, int flags);
+
+__END_DECLS
+
+#endif /* _FNMATCH_H */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/getopt.h b/6/platforms/android-3/arch-arm/usr/include/getopt.h
new file mode 100644
index 0000000..ba3c4c9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/getopt.h
@@ -0,0 +1,90 @@
+/* $OpenBSD: getopt.h,v 1.1 2002/12/03 20:24:29 millert Exp $ */
+/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
+ */
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+struct option {
+ /* name of long option */
+ const char *name;
+ /*
+ * one of no_argument, required_argument, and optional_argument:
+ * whether option takes an argument
+ */
+ int has_arg;
+ /* if not NULL, set *flag to val when option found */
+ int *flag;
+ /* if flag not NULL, value to set *flag to; else return value */
+ int val;
+};
+
+__BEGIN_DECLS
+int getopt_long(int, char * const *, const char *,
+ const struct option *, int *);
+int getopt_long_only(int, char * const *, const char *,
+ const struct option *, int *);
+#ifndef _GETOPT_DEFINED_
+#define _GETOPT_DEFINED_
+int getopt(int, char * const *, const char *);
+
+
+extern char *optarg; /* getopt(3) external variables */
+extern int opterr;
+extern int optind;
+extern int optopt;
+extern int optreset;
+
+#if 0 /* MISSING FROM BIONIC */
+int getsubopt(char **, char * const *, char **);
+extern char *suboptarg; /* getsubopt(3) external variable */
+#endif /* MISSING */
+
+#endif
+__END_DECLS
+
+#endif /* !_GETOPT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/grp.h b/6/platforms/android-3/arch-arm/usr/include/grp.h
new file mode 100644
index 0000000..7ddb791
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/grp.h
@@ -0,0 +1,85 @@
+/* $OpenBSD: grp.h,v 1.8 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)grp.h 8.2 (Berkeley) 1/21/94
+ */
+
+#ifndef _GRP_H_
+#define _GRP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#if __BSD_VISIBLE
+#define _PATH_GROUP "/etc/group"
+#endif
+
+struct group {
+ char *gr_name; /* group name */
+ char *gr_passwd; /* group password */
+ gid_t gr_gid; /* group id */
+ char **gr_mem; /* group members */
+};
+
+__BEGIN_DECLS
+struct group *getgrgid(gid_t);
+struct group *getgrnam(const char *);
+
+#if 0 /* MISSING FROM BIONIC */
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XPG_VISIBLE
+struct group *getgrent(void);
+void setgrent(void);
+void endgrent(void);
+int getgrgid_r(gid_t, struct group *, char *,
+ size_t, struct group **);
+int getgrnam_r(const char *, struct group *, char *,
+ size_t, struct group **);
+#endif
+#if __BSD_VISIBLE
+void setgrfile(const char *);
+int setgroupent(int);
+char *group_from_gid(gid_t, int);
+#endif
+#endif /* MISSING */
+
+int getgrouplist (const char *user, gid_t group,
+ gid_t *groups, int *ngroups);
+
+int initgroups (const char *user, gid_t group);
+
+__END_DECLS
+
+#endif /* !_GRP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/inttypes.h b/6/platforms/android-3/arch-arm/usr/include/inttypes.h
new file mode 100644
index 0000000..81d2315
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/inttypes.h
@@ -0,0 +1,261 @@
+/* $OpenBSD: inttypes.h,v 1.9 2006/01/15 00:47:51 millert Exp $ */
+
+/*
+ * Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _INTTYPES_H_
+#define _INTTYPES_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
+/*
+ * 7.8.1 Macros for format specifiers
+ *
+ * Each of the following object-like macros expands to a string
+ * literal containing a conversion specifier, possibly modified by
+ * a prefix such as hh, h, l, or ll, suitable for use within the
+ * format argument of a formatted input/output function when
+ * converting the corresponding integer type. These macro names
+ * have the general form of PRI (character string literals for the
+ * fprintf family) or SCN (character string literals for the fscanf
+ * family), followed by the conversion specifier, followed by a
+ * name corresponding to a similar typedef name. For example,
+ * PRIdFAST32 can be used in a format string to print the value of
+ * an integer of type int_fast32_t.
+ */
+
+/* fprintf macros for signed integers */
+#define PRId8 "d" /* int8_t */
+#define PRId16 "d" /* int16_t */
+#define PRId32 "d" /* int32_t */
+#define PRId64 "lld" /* int64_t */
+
+#define PRIdLEAST8 "d" /* int_least8_t */
+#define PRIdLEAST16 "d" /* int_least16_t */
+#define PRIdLEAST32 "d" /* int_least32_t */
+#define PRIdLEAST64 "lld" /* int_least64_t */
+
+#define PRIdFAST8 "d" /* int_fast8_t */
+#define PRIdFAST16 "d" /* int_fast16_t */
+#define PRIdFAST32 "d" /* int_fast32_t */
+#define PRIdFAST64 "lld" /* int_fast64_t */
+
+#define PRIdMAX "jd" /* intmax_t */
+#define PRIdPTR "ld" /* intptr_t */
+
+#define PRIi8 "i" /* int8_t */
+#define PRIi16 "i" /* int16_t */
+#define PRIi32 "i" /* int32_t */
+#define PRIi64 "lli" /* int64_t */
+
+#define PRIiLEAST8 "i" /* int_least8_t */
+#define PRIiLEAST16 "i" /* int_least16_t */
+#define PRIiLEAST32 "i" /* int_least32_t */
+#define PRIiLEAST64 "lli" /* int_least64_t */
+
+#define PRIiFAST8 "i" /* int_fast8_t */
+#define PRIiFAST16 "i" /* int_fast16_t */
+#define PRIiFAST32 "i" /* int_fast32_t */
+#define PRIiFAST64 "lli" /* int_fast64_t */
+
+#define PRIiMAX "ji" /* intmax_t */
+#define PRIiPTR "li" /* intptr_t */
+
+/* fprintf macros for unsigned integers */
+#define PRIo8 "o" /* int8_t */
+#define PRIo16 "o" /* int16_t */
+#define PRIo32 "o" /* int32_t */
+#define PRIo64 "llo" /* int64_t */
+
+#define PRIoLEAST8 "o" /* int_least8_t */
+#define PRIoLEAST16 "o" /* int_least16_t */
+#define PRIoLEAST32 "o" /* int_least32_t */
+#define PRIoLEAST64 "llo" /* int_least64_t */
+
+#define PRIoFAST8 "o" /* int_fast8_t */
+#define PRIoFAST16 "o" /* int_fast16_t */
+#define PRIoFAST32 "o" /* int_fast32_t */
+#define PRIoFAST64 "llo" /* int_fast64_t */
+
+#define PRIoMAX "jo" /* intmax_t */
+#define PRIoPTR "lo" /* intptr_t */
+
+#define PRIu8 "u" /* uint8_t */
+#define PRIu16 "u" /* uint16_t */
+#define PRIu32 "u" /* uint32_t */
+#define PRIu64 "llu" /* uint64_t */
+
+#define PRIuLEAST8 "u" /* uint_least8_t */
+#define PRIuLEAST16 "u" /* uint_least16_t */
+#define PRIuLEAST32 "u" /* uint_least32_t */
+#define PRIuLEAST64 "llu" /* uint_least64_t */
+
+#define PRIuFAST8 "u" /* uint_fast8_t */
+#define PRIuFAST16 "u" /* uint_fast16_t */
+#define PRIuFAST32 "u" /* uint_fast32_t */
+#define PRIuFAST64 "llu" /* uint_fast64_t */
+
+#define PRIuMAX "ju" /* uintmax_t */
+#define PRIuPTR "lu" /* uintptr_t */
+
+#define PRIx8 "x" /* uint8_t */
+#define PRIx16 "x" /* uint16_t */
+#define PRIx32 "x" /* uint32_t */
+#define PRIx64 "llx" /* uint64_t */
+
+#define PRIxLEAST8 "x" /* uint_least8_t */
+#define PRIxLEAST16 "x" /* uint_least16_t */
+#define PRIxLEAST32 "x" /* uint_least32_t */
+#define PRIxLEAST64 "llx" /* uint_least64_t */
+
+#define PRIxFAST8 "x" /* uint_fast8_t */
+#define PRIxFAST16 "x" /* uint_fast16_t */
+#define PRIxFAST32 "x" /* uint_fast32_t */
+#define PRIxFAST64 "llx" /* uint_fast64_t */
+
+#define PRIxMAX "jx" /* uintmax_t */
+#define PRIxPTR "lx" /* uintptr_t */
+
+#define PRIX8 "X" /* uint8_t */
+#define PRIX16 "X" /* uint16_t */
+#define PRIX32 "X" /* uint32_t */
+#define PRIX64 "llX" /* uint64_t */
+
+#define PRIXLEAST8 "X" /* uint_least8_t */
+#define PRIXLEAST16 "X" /* uint_least16_t */
+#define PRIXLEAST32 "X" /* uint_least32_t */
+#define PRIXLEAST64 "llX" /* uint_least64_t */
+
+#define PRIXFAST8 "X" /* uint_fast8_t */
+#define PRIXFAST16 "X" /* uint_fast16_t */
+#define PRIXFAST32 "X" /* uint_fast32_t */
+#define PRIXFAST64 "llX" /* uint_fast64_t */
+
+#define PRIXMAX "jX" /* uintmax_t */
+#define PRIXPTR "lX" /* uintptr_t */
+
+/* fscanf macros for signed integers */
+#define SCNd8 "hhd" /* int8_t */
+#define SCNd16 "hd" /* int16_t */
+#define SCNd32 "d" /* int32_t */
+#define SCNd64 "lld" /* int64_t */
+
+#define SCNdLEAST8 "hhd" /* int_least8_t */
+#define SCNdLEAST16 "hd" /* int_least16_t */
+#define SCNdLEAST32 "d" /* int_least32_t */
+#define SCNdLEAST64 "lld" /* int_least64_t */
+
+#define SCNdFAST8 "hhd" /* int_fast8_t */
+#define SCNdFAST16 "hd" /* int_fast16_t */
+#define SCNdFAST32 "d" /* int_fast32_t */
+#define SCNdFAST64 "lld" /* int_fast64_t */
+
+#define SCNdMAX "jd" /* intmax_t */
+#define SCNdPTR "ld" /* intptr_t */
+
+#define SCNi8 "hhi" /* int8_t */
+#define SCNi16 "hi" /* int16_t */
+#define SCNi32 "i" /* int32_t */
+#define SCNi64 "lli" /* int64_t */
+
+#define SCNiLEAST8 "hhi" /* int_least8_t */
+#define SCNiLEAST16 "hi" /* int_least16_t */
+#define SCNiLEAST32 "i" /* int_least32_t */
+#define SCNiLEAST64 "lli" /* int_least64_t */
+
+#define SCNiFAST8 "hhi" /* int_fast8_t */
+#define SCNiFAST16 "hi" /* int_fast16_t */
+#define SCNiFAST32 "i" /* int_fast32_t */
+#define SCNiFAST64 "lli" /* int_fast64_t */
+
+#define SCNiMAX "ji" /* intmax_t */
+#define SCNiPTR "li" /* intptr_t */
+
+/* fscanf macros for unsigned integers */
+#define SCNo8 "hho" /* uint8_t */
+#define SCNo16 "ho" /* uint16_t */
+#define SCNo32 "o" /* uint32_t */
+#define SCNo64 "llo" /* uint64_t */
+
+#define SCNoLEAST8 "hho" /* uint_least8_t */
+#define SCNoLEAST16 "ho" /* uint_least16_t */
+#define SCNoLEAST32 "o" /* uint_least32_t */
+#define SCNoLEAST64 "llo" /* uint_least64_t */
+
+#define SCNoFAST8 "hho" /* uint_fast8_t */
+#define SCNoFAST16 "ho" /* uint_fast16_t */
+#define SCNoFAST32 "o" /* uint_fast32_t */
+#define SCNoFAST64 "llo" /* uint_fast64_t */
+
+#define SCNoMAX "jo" /* uintmax_t */
+#define SCNoPTR "lo" /* uintptr_t */
+
+#define SCNu8 "hhu" /* uint8_t */
+#define SCNu16 "hu" /* uint16_t */
+#define SCNu32 "u" /* uint32_t */
+#define SCNu64 "llu" /* uint64_t */
+
+#define SCNuLEAST8 "hhu" /* uint_least8_t */
+#define SCNuLEAST16 "hu" /* uint_least16_t */
+#define SCNuLEAST32 "u" /* uint_least32_t */
+#define SCNuLEAST64 "llu" /* uint_least64_t */
+
+#define SCNuFAST8 "hhu" /* uint_fast8_t */
+#define SCNuFAST16 "hu" /* uint_fast16_t */
+#define SCNuFAST32 "u" /* uint_fast32_t */
+#define SCNuFAST64 "llu" /* uint_fast64_t */
+
+#define SCNuMAX "ju" /* uintmax_t */
+#define SCNuPTR "lu" /* uintptr_t */
+
+#define SCNx8 "hhx" /* uint8_t */
+#define SCNx16 "hx" /* uint16_t */
+#define SCNx32 "x" /* uint32_t */
+#define SCNx64 "llx" /* uint64_t */
+
+#define SCNxLEAST8 "hhx" /* uint_least8_t */
+#define SCNxLEAST16 "hx" /* uint_least16_t */
+#define SCNxLEAST32 "x" /* uint_least32_t */
+#define SCNxLEAST64 "llx" /* uint_least64_t */
+
+#define SCNxFAST8 "hhx" /* uint_fast8_t */
+#define SCNxFAST16 "hx" /* uint_fast16_t */
+#define SCNxFAST32 "x" /* uint_fast32_t */
+#define SCNxFAST64 "llx" /* uint_fast64_t */
+
+#define SCNxMAX "jx" /* uintmax_t */
+#define SCNxPTR "lx" /* uintptr_t */
+
+#endif /* __cplusplus || __STDC_FORMAT_MACROS */
+
+typedef struct {
+ intmax_t quot; /* quotient */
+ intmax_t rem; /* remainder */
+} imaxdiv_t;
+
+__BEGIN_DECLS
+intmax_t imaxabs(intmax_t);
+imaxdiv_t imaxdiv(intmax_t, intmax_t);
+intmax_t strtoimax(const char *, char **, int);
+uintmax_t strtoumax(const char *, char **, int);
+
+intmax_t strntoimax(const char *nptr, char **endptr, int base, size_t n);
+uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n);
+__END_DECLS
+
+#endif /* _INTTYPES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/jni.h b/6/platforms/android-3/arch-arm/usr/include/jni.h
new file mode 100644
index 0000000..ad954c8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/jni.h
@@ -0,0 +1,1140 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ *
+ * JNI specification, as defined by Sun:
+ * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html
+ *
+ * Everything here is expected to be VM-neutral.
+ */
+#ifndef _JNI_H
+#define _JNI_H
+
+#include <stdarg.h>
+
+/*
+ * Primitive types that match up with Java equivalents.
+ */
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h> /* C99 */
+typedef uint8_t jboolean; /* unsigned 8 bits */
+typedef int8_t jbyte; /* signed 8 bits */
+typedef uint16_t jchar; /* unsigned 16 bits */
+typedef int16_t jshort; /* signed 16 bits */
+typedef int32_t jint; /* signed 32 bits */
+typedef int64_t jlong; /* signed 64 bits */
+typedef float jfloat; /* 32-bit IEEE 754 */
+typedef double jdouble; /* 64-bit IEEE 754 */
+#else
+typedef unsigned char jboolean; /* unsigned 8 bits */
+typedef signed char jbyte; /* signed 8 bits */
+typedef unsigned short jchar; /* unsigned 16 bits */
+typedef short jshort; /* signed 16 bits */
+typedef int jint; /* signed 32 bits */
+typedef long long jlong; /* signed 64 bits */
+typedef float jfloat; /* 32-bit IEEE 754 */
+typedef double jdouble; /* 64-bit IEEE 754 */
+#endif
+
+/* "cardinal indices and sizes" */
+typedef jint jsize;
+
+#ifdef __cplusplus
+/*
+ * Reference types, in C++
+ */
+class _jobject {};
+class _jclass : public _jobject {};
+class _jstring : public _jobject {};
+class _jarray : public _jobject {};
+class _jobjectArray : public _jarray {};
+class _jbooleanArray : public _jarray {};
+class _jbyteArray : public _jarray {};
+class _jcharArray : public _jarray {};
+class _jshortArray : public _jarray {};
+class _jintArray : public _jarray {};
+class _jlongArray : public _jarray {};
+class _jfloatArray : public _jarray {};
+class _jdoubleArray : public _jarray {};
+class _jthrowable : public _jobject {};
+
+typedef _jobject* jobject;
+typedef _jclass* jclass;
+typedef _jstring* jstring;
+typedef _jarray* jarray;
+typedef _jobjectArray* jobjectArray;
+typedef _jbooleanArray* jbooleanArray;
+typedef _jbyteArray* jbyteArray;
+typedef _jcharArray* jcharArray;
+typedef _jshortArray* jshortArray;
+typedef _jintArray* jintArray;
+typedef _jlongArray* jlongArray;
+typedef _jfloatArray* jfloatArray;
+typedef _jdoubleArray* jdoubleArray;
+typedef _jthrowable* jthrowable;
+typedef _jobject* jweak;
+
+
+#else /* not __cplusplus */
+
+/*
+ * Reference types, in C.
+ */
+typedef void* jobject;
+typedef jobject jclass;
+typedef jobject jstring;
+typedef jobject 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;
+typedef jobject jthrowable;
+typedef jobject jweak;
+
+#endif /* not __cplusplus */
+
+struct _jfieldID; /* opaque structure */
+typedef struct _jfieldID* jfieldID; /* field IDs */
+
+struct _jmethodID; /* opaque structure */
+typedef struct _jmethodID* jmethodID; /* method IDs */
+
+struct JNIInvokeInterface;
+
+typedef union jvalue {
+ jboolean z;
+ jbyte b;
+ jchar c;
+ jshort s;
+ jint i;
+ jlong j;
+ jfloat f;
+ jdouble d;
+ jobject l;
+} jvalue;
+
+typedef enum jobjectRefType {
+ JNIInvalidRefType = 0,
+ JNILocalRefType = 1,
+ JNIGlobalRefType = 2,
+ JNIWeakGlobalRefType = 3
+} jobjectRefType;
+
+typedef struct {
+ const char* name;
+ const char* signature;
+ void* fnPtr;
+} JNINativeMethod;
+
+struct _JNIEnv;
+struct _JavaVM;
+typedef const struct JNINativeInterface* C_JNIEnv;
+
+#if defined(__cplusplus)
+typedef _JNIEnv JNIEnv;
+typedef _JavaVM JavaVM;
+#else
+typedef const struct JNINativeInterface* JNIEnv;
+typedef const struct JNIInvokeInterface* JavaVM;
+#endif
+
+/*
+ * Table of interface function pointers.
+ */
+struct JNINativeInterface {
+ void* reserved0;
+ void* reserved1;
+ void* reserved2;
+ void* reserved3;
+
+ jint (*GetVersion)(JNIEnv *);
+
+ jclass (*DefineClass)(JNIEnv*, const char*, jobject, const jbyte*,
+ jsize);
+ jclass (*FindClass)(JNIEnv*, const char*);
+
+ jmethodID (*FromReflectedMethod)(JNIEnv*, jobject);
+ jfieldID (*FromReflectedField)(JNIEnv*, jobject);
+ /* spec doesn't show jboolean parameter */
+ jobject (*ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean);
+
+ jclass (*GetSuperclass)(JNIEnv*, jclass);
+ jboolean (*IsAssignableFrom)(JNIEnv*, jclass, jclass);
+
+ /* spec doesn't show jboolean parameter */
+ jobject (*ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean);
+
+ jint (*Throw)(JNIEnv*, jthrowable);
+ jint (*ThrowNew)(JNIEnv *, jclass, const char *);
+ jthrowable (*ExceptionOccurred)(JNIEnv*);
+ void (*ExceptionDescribe)(JNIEnv*);
+ void (*ExceptionClear)(JNIEnv*);
+ void (*FatalError)(JNIEnv*, const char*);
+
+ jint (*PushLocalFrame)(JNIEnv*, jint);
+ jobject (*PopLocalFrame)(JNIEnv*, jobject);
+
+ jobject (*NewGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteLocalRef)(JNIEnv*, jobject);
+ jboolean (*IsSameObject)(JNIEnv*, jobject, jobject);
+
+ jobject (*NewLocalRef)(JNIEnv*, jobject);
+ jint (*EnsureLocalCapacity)(JNIEnv*, jint);
+
+ jobject (*AllocObject)(JNIEnv*, jclass);
+ jobject (*NewObject)(JNIEnv*, jclass, jmethodID, ...);
+ jobject (*NewObjectV)(JNIEnv*, jclass, jmethodID, va_list);
+ jobject (*NewObjectA)(JNIEnv*, jclass, jmethodID, jvalue*);
+
+ jclass (*GetObjectClass)(JNIEnv*, jobject);
+ jboolean (*IsInstanceOf)(JNIEnv*, jobject, jclass);
+ jmethodID (*GetMethodID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jobject (*CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jobject (*CallObjectMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jboolean (*CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jboolean (*CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jboolean (*CallBooleanMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jbyte (*CallByteMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jbyte (*CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jbyte (*CallByteMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jchar (*CallCharMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jchar (*CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jchar (*CallCharMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jshort (*CallShortMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jshort (*CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jshort (*CallShortMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jint (*CallIntMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jint (*CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jint (*CallIntMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...);
+ void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+
+ jobject (*CallNonvirtualObjectMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jobject (*CallNonvirtualObjectMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jobject (*CallNonvirtualObjectMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jboolean (*CallNonvirtualBooleanMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jboolean (*CallNonvirtualBooleanMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jboolean (*CallNonvirtualBooleanMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jbyte (*CallNonvirtualByteMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jbyte (*CallNonvirtualByteMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jbyte (*CallNonvirtualByteMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jchar (*CallNonvirtualCharMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jchar (*CallNonvirtualCharMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jchar (*CallNonvirtualCharMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jshort (*CallNonvirtualShortMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jshort (*CallNonvirtualShortMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jshort (*CallNonvirtualShortMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jint (*CallNonvirtualIntMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jint (*CallNonvirtualIntMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jint (*CallNonvirtualIntMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jlong (*CallNonvirtualLongMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jlong (*CallNonvirtualLongMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ void (*CallNonvirtualVoidMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+
+ jfieldID (*GetFieldID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*GetObjectField)(JNIEnv*, jobject, jfieldID);
+ jboolean (*GetBooleanField)(JNIEnv*, jobject, jfieldID);
+ jbyte (*GetByteField)(JNIEnv*, jobject, jfieldID);
+ jchar (*GetCharField)(JNIEnv*, jobject, jfieldID);
+ jshort (*GetShortField)(JNIEnv*, jobject, jfieldID);
+ jint (*GetIntField)(JNIEnv*, jobject, jfieldID);
+ jlong (*GetLongField)(JNIEnv*, jobject, jfieldID);
+ jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID);
+ jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID);
+
+ void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject);
+ void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean);
+ void (*SetByteField)(JNIEnv*, jobject, jfieldID, jbyte);
+ void (*SetCharField)(JNIEnv*, jobject, jfieldID, jchar);
+ void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort);
+ void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint);
+ void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong);
+ void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat);
+ void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble);
+
+ jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jobject (*CallStaticObjectMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jobject (*CallStaticObjectMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jboolean (*CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jboolean (*CallStaticBooleanMethodV)(JNIEnv*, jclass, jmethodID,
+ va_list);
+ jboolean (*CallStaticBooleanMethodA)(JNIEnv*, jclass, jmethodID,
+ jvalue*);
+ jbyte (*CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jbyte (*CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jbyte (*CallStaticByteMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jchar (*CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jchar (*CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jchar (*CallStaticCharMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jshort (*CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jshort (*CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jshort (*CallStaticShortMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jint (*CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jint (*CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jint (*CallStaticIntMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...);
+ void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+
+ jfieldID (*GetStaticFieldID)(JNIEnv*, jclass, const char*,
+ const char*);
+
+ jobject (*GetStaticObjectField)(JNIEnv*, jclass, jfieldID);
+ jboolean (*GetStaticBooleanField)(JNIEnv*, jclass, jfieldID);
+ jbyte (*GetStaticByteField)(JNIEnv*, jclass, jfieldID);
+ jchar (*GetStaticCharField)(JNIEnv*, jclass, jfieldID);
+ jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID);
+ jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID);
+ jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID);
+ jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID);
+ jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID);
+
+ void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject);
+ void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean);
+ void (*SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte);
+ void (*SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar);
+ void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort);
+ void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint);
+ void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong);
+ void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat);
+ void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble);
+
+ jstring (*NewString)(JNIEnv*, const jchar*, jsize);
+ jsize (*GetStringLength)(JNIEnv*, jstring);
+ const jchar* (*GetStringChars)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringChars)(JNIEnv*, jstring, const jchar*);
+ jstring (*NewStringUTF)(JNIEnv*, const char*);
+ jsize (*GetStringUTFLength)(JNIEnv*, jstring);
+ /* JNI spec says this returns const jbyte*, but that's inconsistent */
+ const char* (*GetStringUTFChars)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringUTFChars)(JNIEnv*, jstring, const char*);
+ jsize (*GetArrayLength)(JNIEnv*, jarray);
+ jobjectArray (*NewObjectArray)(JNIEnv*, jsize, jclass, jobject);
+ jobject (*GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize);
+ void (*SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject);
+
+ jbooleanArray (*NewBooleanArray)(JNIEnv*, jsize);
+ jbyteArray (*NewByteArray)(JNIEnv*, jsize);
+ jcharArray (*NewCharArray)(JNIEnv*, jsize);
+ jshortArray (*NewShortArray)(JNIEnv*, jsize);
+ jintArray (*NewIntArray)(JNIEnv*, jsize);
+ jlongArray (*NewLongArray)(JNIEnv*, jsize);
+ jfloatArray (*NewFloatArray)(JNIEnv*, jsize);
+ jdoubleArray (*NewDoubleArray)(JNIEnv*, jsize);
+
+ jboolean* (*GetBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*);
+ jbyte* (*GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*);
+ jchar* (*GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*);
+ jshort* (*GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*);
+ jint* (*GetIntArrayElements)(JNIEnv*, jintArray, jboolean*);
+ jlong* (*GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*);
+ jfloat* (*GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*);
+ jdouble* (*GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*);
+
+ void (*ReleaseBooleanArrayElements)(JNIEnv*, jbooleanArray,
+ jboolean*, jint);
+ void (*ReleaseByteArrayElements)(JNIEnv*, jbyteArray,
+ jbyte*, jint);
+ void (*ReleaseCharArrayElements)(JNIEnv*, jcharArray,
+ jchar*, jint);
+ void (*ReleaseShortArrayElements)(JNIEnv*, jshortArray,
+ jshort*, jint);
+ void (*ReleaseIntArrayElements)(JNIEnv*, jintArray,
+ jint*, jint);
+ void (*ReleaseLongArrayElements)(JNIEnv*, jlongArray,
+ jlong*, jint);
+ void (*ReleaseFloatArrayElements)(JNIEnv*, jfloatArray,
+ jfloat*, jint);
+ void (*ReleaseDoubleArrayElements)(JNIEnv*, jdoubleArray,
+ jdouble*, jint);
+
+ void (*GetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
+ jsize, jsize, jboolean*);
+ void (*GetByteArrayRegion)(JNIEnv*, jbyteArray,
+ jsize, jsize, jbyte*);
+ void (*GetCharArrayRegion)(JNIEnv*, jcharArray,
+ jsize, jsize, jchar*);
+ void (*GetShortArrayRegion)(JNIEnv*, jshortArray,
+ jsize, jsize, jshort*);
+ void (*GetIntArrayRegion)(JNIEnv*, jintArray,
+ jsize, jsize, jint*);
+ void (*GetLongArrayRegion)(JNIEnv*, jlongArray,
+ jsize, jsize, jlong*);
+ void (*GetFloatArrayRegion)(JNIEnv*, jfloatArray,
+ jsize, jsize, jfloat*);
+ void (*GetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
+ jsize, jsize, jdouble*);
+
+ /* spec shows these without const; some jni.h do, some don't */
+ void (*SetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
+ jsize, jsize, const jboolean*);
+ void (*SetByteArrayRegion)(JNIEnv*, jbyteArray,
+ jsize, jsize, const jbyte*);
+ void (*SetCharArrayRegion)(JNIEnv*, jcharArray,
+ jsize, jsize, const jchar*);
+ void (*SetShortArrayRegion)(JNIEnv*, jshortArray,
+ jsize, jsize, const jshort*);
+ void (*SetIntArrayRegion)(JNIEnv*, jintArray,
+ jsize, jsize, const jint*);
+ void (*SetLongArrayRegion)(JNIEnv*, jlongArray,
+ jsize, jsize, const jlong*);
+ void (*SetFloatArrayRegion)(JNIEnv*, jfloatArray,
+ jsize, jsize, const jfloat*);
+ void (*SetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
+ jsize, jsize, const jdouble*);
+
+ jint (*RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*,
+ jint);
+ jint (*UnregisterNatives)(JNIEnv*, jclass);
+ jint (*MonitorEnter)(JNIEnv*, jobject);
+ jint (*MonitorExit)(JNIEnv*, jobject);
+ jint (*GetJavaVM)(JNIEnv*, JavaVM**);
+
+ void (*GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*);
+ void (*GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*);
+
+ void* (*GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*);
+ void (*ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint);
+
+ const jchar* (*GetStringCritical)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringCritical)(JNIEnv*, jstring, const jchar*);
+
+ jweak (*NewWeakGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteWeakGlobalRef)(JNIEnv*, jweak);
+
+ jboolean (*ExceptionCheck)(JNIEnv*);
+
+ jobject (*NewDirectByteBuffer)(JNIEnv*, void*, jlong);
+ void* (*GetDirectBufferAddress)(JNIEnv*, jobject);
+ jlong (*GetDirectBufferCapacity)(JNIEnv*, jobject);
+
+ /* added in JNI 1.6 */
+ jobjectRefType (*GetObjectRefType)(JNIEnv*, jobject);
+};
+
+/*
+ * C++ object wrapper.
+ *
+ * This is usually overlaid on a C struct whose first element is a
+ * JNINativeInterface*. We rely somewhat on compiler behavior.
+ */
+struct _JNIEnv {
+ /* do not rename this; it does not seem to be entirely opaque */
+ const struct JNINativeInterface* functions;
+
+#if defined(__cplusplus)
+
+ jint GetVersion()
+ { return functions->GetVersion(this); }
+
+ jclass DefineClass(const char *name, jobject loader, const jbyte* buf,
+ jsize bufLen)
+ { return functions->DefineClass(this, name, loader, buf, bufLen); }
+
+ jclass FindClass(const char* name)
+ { return functions->FindClass(this, name); }
+
+ jmethodID FromReflectedMethod(jobject method)
+ { return functions->FromReflectedMethod(this, method); }
+
+ jfieldID FromReflectedField(jobject field)
+ { return functions->FromReflectedField(this, field); }
+
+ jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic)
+ { return functions->ToReflectedMethod(this, cls, methodID, isStatic); }
+
+ jclass GetSuperclass(jclass clazz)
+ { return functions->GetSuperclass(this, clazz); }
+
+ jboolean IsAssignableFrom(jclass clazz1, jclass clazz2)
+ { return functions->IsAssignableFrom(this, clazz1, clazz2); }
+
+ jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic)
+ { return functions->ToReflectedField(this, cls, fieldID, isStatic); }
+
+ jint Throw(jthrowable obj)
+ { return functions->Throw(this, obj); }
+
+ jint ThrowNew(jclass clazz, const char* message)
+ { return functions->ThrowNew(this, clazz, message); }
+
+ jthrowable ExceptionOccurred()
+ { return functions->ExceptionOccurred(this); }
+
+ void ExceptionDescribe()
+ { functions->ExceptionDescribe(this); }
+
+ void ExceptionClear()
+ { functions->ExceptionClear(this); }
+
+ void FatalError(const char* msg)
+ { functions->FatalError(this, msg); }
+
+ jint PushLocalFrame(jint capacity)
+ { return functions->PushLocalFrame(this, capacity); }
+
+ jobject PopLocalFrame(jobject result)
+ { return functions->PopLocalFrame(this, result); }
+
+ jobject NewGlobalRef(jobject obj)
+ { return functions->NewGlobalRef(this, obj); }
+
+ void DeleteGlobalRef(jobject globalRef)
+ { functions->DeleteGlobalRef(this, globalRef); }
+
+ void DeleteLocalRef(jobject localRef)
+ { functions->DeleteLocalRef(this, localRef); }
+
+ jboolean IsSameObject(jobject ref1, jobject ref2)
+ { return functions->IsSameObject(this, ref1, ref2); }
+
+ jobject NewLocalRef(jobject ref)
+ { return functions->NewLocalRef(this, ref); }
+
+ jint EnsureLocalCapacity(jint capacity)
+ { return functions->EnsureLocalCapacity(this, capacity); }
+
+ jobject AllocObject(jclass clazz)
+ { return functions->AllocObject(this, clazz); }
+
+ jobject NewObject(jclass clazz, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ jobject result = functions->NewObjectV(this, clazz, methodID, args);
+ va_end(args);
+ return result;
+ }
+
+ jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args)
+ { return functions->NewObjectV(this, clazz, methodID, args); }
+
+ jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue* args)
+ { return functions->NewObjectA(this, clazz, methodID, args); }
+
+ jclass GetObjectClass(jobject obj)
+ { return functions->GetObjectClass(this, obj); }
+
+ jboolean IsInstanceOf(jobject obj, jclass clazz)
+ { return functions->IsInstanceOf(this, obj, clazz); }
+
+ jmethodID GetMethodID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetMethodID(this, clazz, name, sig); }
+
+#define CALL_TYPE_METHOD(_jtype, _jname) \
+ _jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->Call##_jname##MethodV(this, obj, methodID, \
+ args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_TYPE_METHODV(_jtype, _jname) \
+ _jtype Call##_jname##MethodV(jobject obj, jmethodID methodID, \
+ va_list args) \
+ { return functions->Call##_jname##MethodV(this, obj, methodID, args); }
+#define CALL_TYPE_METHODA(_jtype, _jname) \
+ _jtype Call##_jname##MethodA(jobject obj, jmethodID methodID, \
+ jvalue* args) \
+ { return functions->Call##_jname##MethodA(this, obj, methodID, args); }
+
+#define CALL_TYPE(_jtype, _jname) \
+ CALL_TYPE_METHOD(_jtype, _jname) \
+ CALL_TYPE_METHODV(_jtype, _jname) \
+ CALL_TYPE_METHODA(_jtype, _jname)
+
+ CALL_TYPE(jobject, Object)
+ CALL_TYPE(jboolean, Boolean)
+ CALL_TYPE(jbyte, Byte)
+ CALL_TYPE(jchar, Char)
+ CALL_TYPE(jshort, Short)
+ CALL_TYPE(jint, Int)
+ CALL_TYPE(jlong, Long)
+ CALL_TYPE(jfloat, Float)
+ CALL_TYPE(jdouble, Double)
+
+ void CallVoidMethod(jobject obj, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallVoidMethodV(this, obj, methodID, args);
+ va_end(args);
+ }
+ void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args)
+ { functions->CallVoidMethodV(this, obj, methodID, args); }
+ void CallVoidMethodA(jobject obj, jmethodID methodID, jvalue* args)
+ { functions->CallVoidMethodA(this, obj, methodID, args); }
+
+#define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz, \
+ jmethodID methodID, ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->CallNonvirtual##_jname##MethodV(this, obj, \
+ clazz, methodID, args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz, \
+ jmethodID methodID, va_list args) \
+ { return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz, \
+ methodID, args); }
+#define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz, \
+ jmethodID methodID, jvalue* args) \
+ { return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz, \
+ methodID, args); }
+
+#define CALL_NONVIRT_TYPE(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHODA(_jtype, _jname)
+
+ CALL_NONVIRT_TYPE(jobject, Object)
+ CALL_NONVIRT_TYPE(jboolean, Boolean)
+ CALL_NONVIRT_TYPE(jbyte, Byte)
+ CALL_NONVIRT_TYPE(jchar, Char)
+ CALL_NONVIRT_TYPE(jshort, Short)
+ CALL_NONVIRT_TYPE(jint, Int)
+ CALL_NONVIRT_TYPE(jlong, Long)
+ CALL_NONVIRT_TYPE(jfloat, Float)
+ CALL_NONVIRT_TYPE(jdouble, Double)
+
+ void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args);
+ va_end(args);
+ }
+ void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args)
+ { functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); }
+ void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, jvalue* args)
+ { functions->CallNonvirtualVoidMethodA(this, obj, clazz, methodID, args); }
+
+ jfieldID GetFieldID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetFieldID(this, clazz, name, sig); }
+
+ jobject GetObjectField(jobject obj, jfieldID fieldID)
+ { return functions->GetObjectField(this, obj, fieldID); }
+ jboolean GetBooleanField(jobject obj, jfieldID fieldID)
+ { return functions->GetBooleanField(this, obj, fieldID); }
+ jbyte GetByteField(jobject obj, jfieldID fieldID)
+ { return functions->GetByteField(this, obj, fieldID); }
+ jchar GetCharField(jobject obj, jfieldID fieldID)
+ { return functions->GetCharField(this, obj, fieldID); }
+ jshort GetShortField(jobject obj, jfieldID fieldID)
+ { return functions->GetShortField(this, obj, fieldID); }
+ jint GetIntField(jobject obj, jfieldID fieldID)
+ { return functions->GetIntField(this, obj, fieldID); }
+ jlong GetLongField(jobject obj, jfieldID fieldID)
+ { return functions->GetLongField(this, obj, fieldID); }
+ jfloat GetFloatField(jobject obj, jfieldID fieldID)
+ { return functions->GetFloatField(this, obj, fieldID); }
+ jdouble GetDoubleField(jobject obj, jfieldID fieldID)
+ { return functions->GetDoubleField(this, obj, fieldID); }
+
+ void SetObjectField(jobject obj, jfieldID fieldID, jobject value)
+ { functions->SetObjectField(this, obj, fieldID, value); }
+ void SetBooleanField(jobject obj, jfieldID fieldID, jboolean value)
+ { functions->SetBooleanField(this, obj, fieldID, value); }
+ void SetByteField(jobject obj, jfieldID fieldID, jbyte value)
+ { functions->SetByteField(this, obj, fieldID, value); }
+ void SetCharField(jobject obj, jfieldID fieldID, jchar value)
+ { functions->SetCharField(this, obj, fieldID, value); }
+ void SetShortField(jobject obj, jfieldID fieldID, jshort value)
+ { functions->SetShortField(this, obj, fieldID, value); }
+ void SetIntField(jobject obj, jfieldID fieldID, jint value)
+ { functions->SetIntField(this, obj, fieldID, value); }
+ void SetLongField(jobject obj, jfieldID fieldID, jlong value)
+ { functions->SetLongField(this, obj, fieldID, value); }
+ void SetFloatField(jobject obj, jfieldID fieldID, jfloat value)
+ { functions->SetFloatField(this, obj, fieldID, value); }
+ void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value)
+ { functions->SetDoubleField(this, obj, fieldID, value); }
+
+ jmethodID GetStaticMethodID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetStaticMethodID(this, clazz, name, sig); }
+
+#define CALL_STATIC_TYPE_METHOD(_jtype, _jname) \
+ _jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID, \
+ ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->CallStatic##_jname##MethodV(this, clazz, \
+ methodID, args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_STATIC_TYPE_METHODV(_jtype, _jname) \
+ _jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID, \
+ va_list args) \
+ { return functions->CallStatic##_jname##MethodV(this, clazz, methodID, \
+ args); }
+#define CALL_STATIC_TYPE_METHODA(_jtype, _jname) \
+ _jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID, \
+ jvalue* args) \
+ { return functions->CallStatic##_jname##MethodA(this, clazz, methodID, \
+ args); }
+
+#define CALL_STATIC_TYPE(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHOD(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHODV(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHODA(_jtype, _jname)
+
+ CALL_STATIC_TYPE(jobject, Object)
+ CALL_STATIC_TYPE(jboolean, Boolean)
+ CALL_STATIC_TYPE(jbyte, Byte)
+ CALL_STATIC_TYPE(jchar, Char)
+ CALL_STATIC_TYPE(jshort, Short)
+ CALL_STATIC_TYPE(jint, Int)
+ CALL_STATIC_TYPE(jlong, Long)
+ CALL_STATIC_TYPE(jfloat, Float)
+ CALL_STATIC_TYPE(jdouble, Double)
+
+ void CallStaticVoidMethod(jclass clazz, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallStaticVoidMethodV(this, clazz, methodID, args);
+ va_end(args);
+ }
+ void CallStaticVoidMethodV(jclass clazz, jmethodID methodID, va_list args)
+ { functions->CallStaticVoidMethodV(this, clazz, methodID, args); }
+ void CallStaticVoidMethodA(jclass clazz, jmethodID methodID, jvalue* args)
+ { functions->CallStaticVoidMethodA(this, clazz, methodID, args); }
+
+ jfieldID GetStaticFieldID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetStaticFieldID(this, clazz, name, sig); }
+
+ jobject GetStaticObjectField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticObjectField(this, clazz, fieldID); }
+ jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticBooleanField(this, clazz, fieldID); }
+ jbyte GetStaticByteField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticByteField(this, clazz, fieldID); }
+ jchar GetStaticCharField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticCharField(this, clazz, fieldID); }
+ jshort GetStaticShortField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticShortField(this, clazz, fieldID); }
+ jint GetStaticIntField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticIntField(this, clazz, fieldID); }
+ jlong GetStaticLongField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticLongField(this, clazz, fieldID); }
+ jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticFloatField(this, clazz, fieldID); }
+ jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticDoubleField(this, clazz, fieldID); }
+
+ void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value)
+ { functions->SetStaticObjectField(this, clazz, fieldID, value); }
+ void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value)
+ { functions->SetStaticBooleanField(this, clazz, fieldID, value); }
+ void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value)
+ { functions->SetStaticByteField(this, clazz, fieldID, value); }
+ void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value)
+ { functions->SetStaticCharField(this, clazz, fieldID, value); }
+ void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value)
+ { functions->SetStaticShortField(this, clazz, fieldID, value); }
+ void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value)
+ { functions->SetStaticIntField(this, clazz, fieldID, value); }
+ void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value)
+ { functions->SetStaticLongField(this, clazz, fieldID, value); }
+ void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value)
+ { functions->SetStaticFloatField(this, clazz, fieldID, value); }
+ void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value)
+ { functions->SetStaticDoubleField(this, clazz, fieldID, value); }
+
+ jstring NewString(const jchar* unicodeChars, jsize len)
+ { return functions->NewString(this, unicodeChars, len); }
+
+ jsize GetStringLength(jstring string)
+ { return functions->GetStringLength(this, string); }
+
+ const jchar* GetStringChars(jstring string, jboolean* isCopy)
+ { return functions->GetStringChars(this, string, isCopy); }
+
+ void ReleaseStringChars(jstring string, const jchar* chars)
+ { functions->ReleaseStringChars(this, string, chars); }
+
+ jstring NewStringUTF(const char* bytes)
+ { return functions->NewStringUTF(this, bytes); }
+
+ jsize GetStringUTFLength(jstring string)
+ { return functions->GetStringUTFLength(this, string); }
+
+ const char* GetStringUTFChars(jstring string, jboolean* isCopy)
+ { return functions->GetStringUTFChars(this, string, isCopy); }
+
+ void ReleaseStringUTFChars(jstring string, const char* utf)
+ { functions->ReleaseStringUTFChars(this, string, utf); }
+
+ jsize GetArrayLength(jarray array)
+ { return functions->GetArrayLength(this, array); }
+
+ jobjectArray NewObjectArray(jsize length, jclass elementClass,
+ jobject initialElement)
+ { return functions->NewObjectArray(this, length, elementClass,
+ initialElement); }
+
+ jobject GetObjectArrayElement(jobjectArray array, jsize index)
+ { return functions->GetObjectArrayElement(this, array, index); }
+
+ void SetObjectArrayElement(jobjectArray array, jsize index, jobject value)
+ { functions->SetObjectArrayElement(this, array, index, value); }
+
+ jbooleanArray NewBooleanArray(jsize length)
+ { return functions->NewBooleanArray(this, length); }
+ jbyteArray NewByteArray(jsize length)
+ { return functions->NewByteArray(this, length); }
+ jcharArray NewCharArray(jsize length)
+ { return functions->NewCharArray(this, length); }
+ jshortArray NewShortArray(jsize length)
+ { return functions->NewShortArray(this, length); }
+ jintArray NewIntArray(jsize length)
+ { return functions->NewIntArray(this, length); }
+ jlongArray NewLongArray(jsize length)
+ { return functions->NewLongArray(this, length); }
+ jfloatArray NewFloatArray(jsize length)
+ { return functions->NewFloatArray(this, length); }
+ jdoubleArray NewDoubleArray(jsize length)
+ { return functions->NewDoubleArray(this, length); }
+
+ jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy)
+ { return functions->GetBooleanArrayElements(this, array, isCopy); }
+ jbyte* GetByteArrayElements(jbyteArray array, jboolean* isCopy)
+ { return functions->GetByteArrayElements(this, array, isCopy); }
+ jchar* GetCharArrayElements(jcharArray array, jboolean* isCopy)
+ { return functions->GetCharArrayElements(this, array, isCopy); }
+ jshort* GetShortArrayElements(jshortArray array, jboolean* isCopy)
+ { return functions->GetShortArrayElements(this, array, isCopy); }
+ jint* GetIntArrayElements(jintArray array, jboolean* isCopy)
+ { return functions->GetIntArrayElements(this, array, isCopy); }
+ jlong* GetLongArrayElements(jlongArray array, jboolean* isCopy)
+ { return functions->GetLongArrayElements(this, array, isCopy); }
+ jfloat* GetFloatArrayElements(jfloatArray array, jboolean* isCopy)
+ { return functions->GetFloatArrayElements(this, array, isCopy); }
+ jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean* isCopy)
+ { return functions->GetDoubleArrayElements(this, array, isCopy); }
+
+ void ReleaseBooleanArrayElements(jbooleanArray array, jboolean* elems,
+ jint mode)
+ { functions->ReleaseBooleanArrayElements(this, array, elems, mode); }
+ void ReleaseByteArrayElements(jbyteArray array, jbyte* elems,
+ jint mode)
+ { functions->ReleaseByteArrayElements(this, array, elems, mode); }
+ void ReleaseCharArrayElements(jcharArray array, jchar* elems,
+ jint mode)
+ { functions->ReleaseCharArrayElements(this, array, elems, mode); }
+ void ReleaseShortArrayElements(jshortArray array, jshort* elems,
+ jint mode)
+ { functions->ReleaseShortArrayElements(this, array, elems, mode); }
+ void ReleaseIntArrayElements(jintArray array, jint* elems,
+ jint mode)
+ { functions->ReleaseIntArrayElements(this, array, elems, mode); }
+ void ReleaseLongArrayElements(jlongArray array, jlong* elems,
+ jint mode)
+ { functions->ReleaseLongArrayElements(this, array, elems, mode); }
+ void ReleaseFloatArrayElements(jfloatArray array, jfloat* elems,
+ jint mode)
+ { functions->ReleaseFloatArrayElements(this, array, elems, mode); }
+ void ReleaseDoubleArrayElements(jdoubleArray array, jdouble* elems,
+ jint mode)
+ { functions->ReleaseDoubleArrayElements(this, array, elems, mode); }
+
+ void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
+ jboolean* buf)
+ { functions->GetBooleanArrayRegion(this, array, start, len, buf); }
+ void GetByteArrayRegion(jbyteArray array, jsize start, jsize len,
+ jbyte* buf)
+ { functions->GetByteArrayRegion(this, array, start, len, buf); }
+ void GetCharArrayRegion(jcharArray array, jsize start, jsize len,
+ jchar* buf)
+ { functions->GetCharArrayRegion(this, array, start, len, buf); }
+ void GetShortArrayRegion(jshortArray array, jsize start, jsize len,
+ jshort* buf)
+ { functions->GetShortArrayRegion(this, array, start, len, buf); }
+ void GetIntArrayRegion(jintArray array, jsize start, jsize len,
+ jint* buf)
+ { functions->GetIntArrayRegion(this, array, start, len, buf); }
+ void GetLongArrayRegion(jlongArray array, jsize start, jsize len,
+ jlong* buf)
+ { functions->GetLongArrayRegion(this, array, start, len, buf); }
+ void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
+ jfloat* buf)
+ { functions->GetFloatArrayRegion(this, array, start, len, buf); }
+ void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
+ jdouble* buf)
+ { functions->GetDoubleArrayRegion(this, array, start, len, buf); }
+
+ void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
+ const jboolean* buf)
+ { functions->SetBooleanArrayRegion(this, array, start, len, buf); }
+ void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
+ const jbyte* buf)
+ { functions->SetByteArrayRegion(this, array, start, len, buf); }
+ void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
+ const jchar* buf)
+ { functions->SetCharArrayRegion(this, array, start, len, buf); }
+ void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
+ const jshort* buf)
+ { functions->SetShortArrayRegion(this, array, start, len, buf); }
+ void SetIntArrayRegion(jintArray array, jsize start, jsize len,
+ const jint* buf)
+ { functions->SetIntArrayRegion(this, array, start, len, buf); }
+ void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
+ const jlong* buf)
+ { functions->SetLongArrayRegion(this, array, start, len, buf); }
+ void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
+ const jfloat* buf)
+ { functions->SetFloatArrayRegion(this, array, start, len, buf); }
+ void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
+ const jdouble* buf)
+ { functions->SetDoubleArrayRegion(this, array, start, len, buf); }
+
+ jint RegisterNatives(jclass clazz, const JNINativeMethod* methods,
+ jint nMethods)
+ { return functions->RegisterNatives(this, clazz, methods, nMethods); }
+
+ jint UnregisterNatives(jclass clazz)
+ { return functions->UnregisterNatives(this, clazz); }
+
+ jint MonitorEnter(jobject obj)
+ { return functions->MonitorEnter(this, obj); }
+
+ jint MonitorExit(jobject obj)
+ { return functions->MonitorExit(this, obj); }
+
+ jint GetJavaVM(JavaVM** vm)
+ { return functions->GetJavaVM(this, vm); }
+
+ void GetStringRegion(jstring str, jsize start, jsize len, jchar* buf)
+ { functions->GetStringRegion(this, str, start, len, buf); }
+
+ void GetStringUTFRegion(jstring str, jsize start, jsize len, char* buf)
+ { return functions->GetStringUTFRegion(this, str, start, len, buf); }
+
+ void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy)
+ { return functions->GetPrimitiveArrayCritical(this, array, isCopy); }
+
+ void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode)
+ { functions->ReleasePrimitiveArrayCritical(this, array, carray, mode); }
+
+ const jchar* GetStringCritical(jstring string, jboolean* isCopy)
+ { return functions->GetStringCritical(this, string, isCopy); }
+
+ void ReleaseStringCritical(jstring string, const jchar* carray)
+ { functions->ReleaseStringCritical(this, string, carray); }
+
+ jweak NewWeakGlobalRef(jobject obj)
+ { return functions->NewWeakGlobalRef(this, obj); }
+
+ void DeleteWeakGlobalRef(jweak obj)
+ { functions->DeleteWeakGlobalRef(this, obj); }
+
+ jboolean ExceptionCheck()
+ { return functions->ExceptionCheck(this); }
+
+ jobject NewDirectByteBuffer(void* address, jlong capacity)
+ { return functions->NewDirectByteBuffer(this, address, capacity); }
+
+ void* GetDirectBufferAddress(jobject buf)
+ { return functions->GetDirectBufferAddress(this, buf); }
+
+ jlong GetDirectBufferCapacity(jobject buf)
+ { return functions->GetDirectBufferCapacity(this, buf); }
+
+ /* added in JNI 1.6 */
+ jobjectRefType GetObjectRefType(jobject obj)
+ { return functions->GetObjectRefType(this, obj); }
+#endif /*__cplusplus*/
+};
+
+
+/*
+ * JNI invocation interface.
+ */
+struct JNIInvokeInterface {
+ void* reserved0;
+ void* reserved1;
+ void* reserved2;
+
+ jint (*DestroyJavaVM)(JavaVM*);
+ jint (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*);
+ jint (*DetachCurrentThread)(JavaVM*);
+ jint (*GetEnv)(JavaVM*, void**, jint);
+ jint (*AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*);
+};
+
+/*
+ * C++ version.
+ */
+struct _JavaVM {
+ const struct JNIInvokeInterface* functions;
+
+#if defined(__cplusplus)
+ jint DestroyJavaVM()
+ { return functions->DestroyJavaVM(this); }
+ jint AttachCurrentThread(JNIEnv** p_env, void* thr_args)
+ { return functions->AttachCurrentThread(this, p_env, thr_args); }
+ jint DetachCurrentThread()
+ { return functions->DetachCurrentThread(this); }
+ jint GetEnv(void** env, jint version)
+ { return functions->GetEnv(this, env, version); }
+ jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args)
+ { return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); }
+#endif /*__cplusplus*/
+};
+
+struct JavaVMAttachArgs {
+ jint version; /* must be >= JNI_VERSION_1_2 */
+ const char* name; /* NULL or name of thread as modified UTF-8 str */
+ jobject group; /* global ref of a ThreadGroup object, or NULL */
+};
+typedef struct JavaVMAttachArgs JavaVMAttachArgs;
+
+/*
+ * JNI 1.2+ initialization. (As of 1.6, the pre-1.2 structures are no
+ * longer supported.)
+ */
+typedef struct JavaVMOption {
+ const char* optionString;
+ void* extraInfo;
+} JavaVMOption;
+
+typedef struct JavaVMInitArgs {
+ jint version; /* use JNI_VERSION_1_2 or later */
+
+ jint nOptions;
+ JavaVMOption* options;
+ jboolean ignoreUnrecognized;
+} JavaVMInitArgs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * VM initialization functions.
+ *
+ * Note these are the only symbols exported for JNI by the VM.
+ */
+jint JNI_GetDefaultJavaVMInitArgs(void*);
+jint JNI_CreateJavaVM(JavaVM**, JNIEnv**, void*);
+jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize*);
+
+/*
+ * Prototypes for functions exported by loadable shared libs. These are
+ * called by JNI, not provided by JNI.
+ */
+jint JNI_OnLoad(JavaVM* vm, void* reserved);
+void JNI_OnUnload(JavaVM* vm, void* reserved);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/*
+ * Manifest constants.
+ */
+#define JNI_FALSE 0
+#define JNI_TRUE 1
+
+#define JNI_VERSION_1_1 0x00010001
+#define JNI_VERSION_1_2 0x00010002
+#define JNI_VERSION_1_4 0x00010004
+#define JNI_VERSION_1_6 0x00010006
+
+#define JNI_OK (0) /* no error */
+#define JNI_ERR (-1) /* generic error */
+#define JNI_EDETACHED (-2) /* thread detached from the VM */
+#define JNI_EVERSION (-3) /* JNI version error */
+
+#define JNI_COMMIT 1 /* copy content, do not free buffer */
+#define JNI_ABORT 2 /* free buffer w/o copying back */
+
+/* need these for Windows-aware headers */
+#define JNIIMPORT
+#define JNIEXPORT
+#define JNICALL
+
+#endif /*_JNI_H*/
diff --git a/6/platforms/android-3/arch-arm/usr/include/lastlog.h b/6/platforms/android-3/arch-arm/usr/include/lastlog.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/lastlog.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/libgen.h b/6/platforms/android-3/arch-arm/usr/include/libgen.h
new file mode 100644
index 0000000..c5fc76a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/libgen.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _LIBGEN_H
+#define _LIBGEN_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/* our version of dirname/basename don't modify the input path */
+extern char* dirname (const char* path);
+extern char* basename(const char* path);
+
+/* special thread-safe Bionic versions
+ *
+ * if 'buffer' is NULL, 'bufflen' is ignored and the length of the result is returned
+ * otherwise, place result in 'buffer'
+ *
+ * at most bufflen-1 characters written, plus a terminating zero
+ *
+ * return length of result, or -1 in case of error, with errno set to:
+ *
+ * ERANGE: buffer is too short
+ * ENAMETOOLONG: the result is too long for a valid path
+ */
+extern int dirname_r(const char* path, char* buffer, size_t bufflen);
+extern int basename_r(const char* path, char* buffer, size_t bufflen);
+
+__END_DECLS
+
+#endif /* _LIBGEN_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/limits.h b/6/platforms/android-3/arch-arm/usr/include/limits.h
new file mode 100644
index 0000000..1de8ea6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/limits.h
@@ -0,0 +1,96 @@
+/* $OpenBSD: limits.h,v 1.13 2005/12/31 19:29:38 millert Exp $ */
+/* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */
+
+/*
+ * Copyright (c) 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)limits.h 5.9 (Berkeley) 4/3/91
+ */
+
+#ifndef _LIMITS_H_
+#define _LIMITS_H_
+
+#include <sys/cdefs.h>
+
+#if __POSIX_VISIBLE
+#define _POSIX_ARG_MAX 4096
+#define _POSIX_CHILD_MAX 25
+#define _POSIX_LINK_MAX 8
+#define _POSIX_MAX_CANON 255
+#define _POSIX_MAX_INPUT 255
+#define _POSIX_NAME_MAX 14
+#define _POSIX_NGROUPS_MAX 0
+#define _POSIX_OPEN_MAX 16
+#define _POSIX_PATH_MAX 256
+#define _POSIX_PIPE_BUF 512
+#define _POSIX_RE_DUP_MAX 255
+#define _POSIX_SSIZE_MAX 32767
+#define _POSIX_STREAM_MAX 8
+#define _POSIX_SYMLINK_MAX 255
+#define _POSIX_SYMLOOP_MAX 8
+#define _POSIX_TZNAME_MAX 3
+
+#define _POSIX2_BC_BASE_MAX 99
+#define _POSIX2_BC_DIM_MAX 2048
+#define _POSIX2_BC_SCALE_MAX 99
+#define _POSIX2_BC_STRING_MAX 1000
+#define _POSIX2_COLL_WEIGHTS_MAX 2
+#define _POSIX2_EXPR_NEST_MAX 32
+#define _POSIX2_LINE_MAX 2048
+#define _POSIX2_RE_DUP_MAX _POSIX_RE_DUP_MAX
+
+#if __POSIX_VISIBLE >= 200112
+#define _POSIX_TTY_NAME_MAX 9 /* includes trailing NUL */
+#define _POSIX_LOGIN_NAME_MAX 9 /* includes trailing NUL */
+#endif /* __POSIX_VISIBLE >= 200112 */
+#endif /* __POSIX_VISIBLE */
+
+#if __XPG_VISIBLE
+#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */
+
+#define NL_ARGMAX 9
+#define NL_LANGMAX 14
+#define NL_MSGMAX 32767
+#define NL_NMAX 1
+#define NL_SETMAX 255
+#define NL_TEXTMAX 255
+
+#define TMP_MAX 308915776
+#endif /* __XPG_VISIBLE */
+
+#include <sys/limits.h>
+
+#if __POSIX_VISIBLE
+#include <sys/syslimits.h>
+#endif
+
+#ifndef PAGESIZE
+#define PAGESIZE PAGE_SIZE
+#endif
+
+#endif /* !_LIMITS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/a.out.h b/6/platforms/android-3/arch-arm/usr/include/linux/a.out.h
new file mode 100644
index 0000000..7325304
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/a.out.h
@@ -0,0 +1,220 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __A_OUT_GNU_H__
+#define __A_OUT_GNU_H__
+
+#define __GNU_EXEC_MACROS__
+
+#ifndef __STRUCT_EXEC_OVERRIDE__
+
+#include <asm/a.out.h>
+
+#endif
+
+enum machine_type {
+#ifdef M_OLDSUN2
+ M__OLDSUN2 = M_OLDSUN2,
+#else
+ M_OLDSUN2 = 0,
+#endif
+#ifdef M_68010
+ M__68010 = M_68010,
+#else
+ M_68010 = 1,
+#endif
+#ifdef M_68020
+ M__68020 = M_68020,
+#else
+ M_68020 = 2,
+#endif
+#ifdef M_SPARC
+ M__SPARC = M_SPARC,
+#else
+ M_SPARC = 3,
+#endif
+
+ M_386 = 100,
+ M_MIPS1 = 151,
+ M_MIPS2 = 152
+};
+
+#ifndef N_MAGIC
+#define N_MAGIC(exec) ((exec).a_info & 0xffff)
+#endif
+#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+#define N_SET_INFO(exec, magic, type, flags) ((exec).a_info = ((magic) & 0xffff) | (((int)(type) & 0xff) << 16) | (((flags) & 0xff) << 24))
+#define N_SET_MAGIC(exec, magic) ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+
+#define N_SET_MACHTYPE(exec, machtype) ((exec).a_info = ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+
+#define N_SET_FLAGS(exec, flags) ((exec).a_info = ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+
+#define OMAGIC 0407
+
+#define NMAGIC 0410
+
+#define ZMAGIC 0413
+
+#define QMAGIC 0314
+
+#define CMAGIC 0421
+
+#ifndef N_BADMAG
+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
+#endif
+
+#define _N_HDROFF(x) (1024 - sizeof (struct exec))
+
+#ifndef N_TXTOFF
+#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
+#endif
+
+#ifndef N_DATOFF
+#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
+#endif
+
+#ifndef N_TRELOFF
+#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
+#endif
+
+#ifndef N_DRELOFF
+#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
+#endif
+
+#ifndef N_SYMOFF
+#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
+#endif
+
+#ifndef N_STROFF
+#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
+#endif
+
+#ifndef N_TXTADDR
+#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
+#endif
+
+#if defined(vax) || defined(hp300) || defined(pyr)
+#define SEGMENT_SIZE page_size
+#endif
+#ifdef sony
+#define SEGMENT_SIZE 0x2000
+#endif
+#ifdef is68k
+#define SEGMENT_SIZE 0x20000
+#endif
+#if defined(m68k) && defined(PORTAR)
+#define PAGE_SIZE 0x400
+#define SEGMENT_SIZE PAGE_SIZE
+#endif
+
+#ifdef linux
+#include <asm/page.h>
+#if defined(__i386__) || defined(__mc68000__)
+#define SEGMENT_SIZE 1024
+#else
+#ifndef SEGMENT_SIZE
+#define SEGMENT_SIZE PAGE_SIZE
+#endif
+#endif
+#endif
+
+#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
+
+#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
+
+#ifndef N_DATADDR
+#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
+#endif
+
+#ifndef N_BSSADDR
+#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#endif
+
+#ifndef N_NLIST_DECLARED
+struct nlist {
+ union {
+ char *n_name;
+ struct nlist *n_next;
+ long n_strx;
+ } n_un;
+ unsigned char n_type;
+ char n_other;
+ short n_desc;
+ unsigned long n_value;
+};
+#endif
+
+#ifndef N_UNDF
+#define N_UNDF 0
+#endif
+#ifndef N_ABS
+#define N_ABS 2
+#endif
+#ifndef N_TEXT
+#define N_TEXT 4
+#endif
+#ifndef N_DATA
+#define N_DATA 6
+#endif
+#ifndef N_BSS
+#define N_BSS 8
+#endif
+#ifndef N_FN
+#define N_FN 15
+#endif
+
+#ifndef N_EXT
+#define N_EXT 1
+#endif
+#ifndef N_TYPE
+#define N_TYPE 036
+#endif
+#ifndef N_STAB
+#define N_STAB 0340
+#endif
+
+#define N_INDR 0xa
+
+#define N_SETA 0x14
+#define N_SETT 0x16
+#define N_SETD 0x18
+#define N_SETB 0x1A
+
+#define N_SETV 0x1C
+
+#ifndef N_RELOCATION_INFO_DECLARED
+
+struct relocation_info
+{
+
+ int r_address;
+
+ unsigned int r_symbolnum:24;
+
+ unsigned int r_pcrel:1;
+
+ unsigned int r_length:2;
+
+ unsigned int r_extern:1;
+
+#ifdef NS32K
+ unsigned r_bsr:1;
+ unsigned r_disp:1;
+ unsigned r_pad:2;
+#else
+ unsigned int r_pad:4;
+#endif
+};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/aio_abi.h b/6/platforms/android-3/arch-arm/usr/include/linux/aio_abi.h
new file mode 100644
index 0000000..c92bc8f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/aio_abi.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX__AIO_ABI_H
+#define __LINUX__AIO_ABI_H
+
+#include <asm/byteorder.h>
+
+typedef unsigned long aio_context_t;
+
+enum {
+ IOCB_CMD_PREAD = 0,
+ IOCB_CMD_PWRITE = 1,
+ IOCB_CMD_FSYNC = 2,
+ IOCB_CMD_FDSYNC = 3,
+
+ IOCB_CMD_NOOP = 6,
+};
+
+struct io_event {
+ __u64 data;
+ __u64 obj;
+ __s64 res;
+ __s64 res2;
+};
+
+#ifdef __LITTLE_ENDIAN
+#define PADDED(x,y) x, y
+#elif defined(__BIG_ENDIAN)
+#define PADDED(x,y) y, x
+#else
+#error edit for your odd byteorder.
+#endif
+
+struct iocb {
+
+ __u64 aio_data;
+ __u32 PADDED(aio_key, aio_reserved1);
+
+ __u16 aio_lio_opcode;
+ __s16 aio_reqprio;
+ __u32 aio_fildes;
+
+ __u64 aio_buf;
+ __u64 aio_nbytes;
+ __s64 aio_offset;
+
+ __u64 aio_reserved2;
+ __u64 aio_reserved3;
+};
+
+#undef IFBIG
+#undef IFLITTLE
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/akm8976.h b/6/platforms/android-3/arch-arm/usr/include/linux/akm8976.h
new file mode 100644
index 0000000..a5aa68e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/akm8976.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef AKM8976_H
+#define AKM8976_H
+
+#include <linux/ioctl.h>
+
+#define AKECS_MODE_MEASURE 0x00
+
+#define AKECS_MODE_PFFD 0x01
+#define AKECS_MODE_E2P_READ 0x02
+#define AKECS_MODE_POWERDOWN 0x03
+
+#define AKECS_MODE_MEASURE_SNG 0x10
+#define AKECS_MODE_MEASURE_SEQ 0x11
+
+#define CSPEC_AINT 0x01
+#define CSPEC_SNG_NUM 0x01
+#define CSPEC_SEQ_NUM 0x02
+#define CSPEC_SFRQ_32 0x00
+#define CSPEC_SFRQ_64 0x01
+#define CSPEC_MCS 0x07
+#define CSPEC_MKS 0x01
+#define CSPEC_INTEN 0x01
+
+#define RBUFF_SIZE 31
+#define MAX_CALI_SIZE 0x1000U
+
+#define AKECS_REG_ST 0xC0
+#define AKECS_REG_TMPS 0xC1
+#define AKECS_REG_MS1 0xE0
+#define AKECS_REG_MS2 0xE1
+#define AKECS_REG_MS3 0xE2
+
+#define AKMIO 0xA1
+
+#define ECS_IOCTL_INIT _IO(AKMIO, 0x01)
+#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5])
+#define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5])
+#define ECS_IOCTL_RESET _IO(AKMIO, 0x04)
+#define ECS_IOCTL_INT_STATUS _IO(AKMIO, 0x05)
+#define ECS_IOCTL_FFD_STATUS _IO(AKMIO, 0x06)
+#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x07, short)
+#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE+1])
+#define ECS_IOCTL_GET_NUMFRQ _IOR(AKMIO, 0x09, char[2])
+#define ECS_IOCTL_SET_PERST _IO(AKMIO, 0x0A)
+#define ECS_IOCTL_SET_G0RST _IO(AKMIO, 0x0B)
+#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12])
+#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int)
+#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int)
+#define ECS_IOCTL_GET_CALI_DATA _IOR(AKMIO, 0x0F, char[MAX_CALI_SIZE])
+#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short)
+
+#define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short)
+#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short)
+#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short)
+#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short)
+#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short)
+#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short)
+#define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short)
+#define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17)
+#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short)
+#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY
+#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short)
+#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short)
+
+#define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short)
+
+#define ECS_RST 146
+#define ECS_CLK_ON 155
+#define ECS_INTR 161
+
+struct akm8976_platform_data {
+ int reset;
+ int clk_on;
+ int intr;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/android_alarm.h b/6/platforms/android-3/arch-arm/usr/include/linux/android_alarm.h
new file mode 100644
index 0000000..80828ea
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/android_alarm.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ANDROID_ALARM_H
+#define _LINUX_ANDROID_ALARM_H
+
+#include <asm/ioctl.h>
+#include <linux/time.h>
+
+typedef enum {
+
+ ANDROID_ALARM_RTC_WAKEUP,
+ ANDROID_ALARM_RTC,
+ ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
+ ANDROID_ALARM_ELAPSED_REALTIME,
+ ANDROID_ALARM_SYSTEMTIME,
+
+ ANDROID_ALARM_TYPE_COUNT,
+
+} android_alarm_type_t;
+
+typedef enum {
+ ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP,
+ ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC,
+ ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
+ ANDROID_ALARM_ELAPSED_REALTIME_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME,
+ ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME,
+ ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16
+} android_alarm_return_flags_t;
+
+#define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4))
+#define ANDROID_ALARM_WAIT _IO('a', 1)
+#define ANDROID_ALARM_SET(type) _IOW('a', 2 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_SET_AND_WAIT(type) _IOW('a', 3 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_GET_TIME(type) _IOW('a', 4 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec)
+#define ANDROID_ALARM_SET_TIMEZONE _IOW('a', 6, struct timezone)
+
+#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0)))
+#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/android_pmem.h b/6/platforms/android-3/arch-arm/usr/include/linux/android_pmem.h
new file mode 100644
index 0000000..858857e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/android_pmem.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ANDROID_PMEM_H_
+#define _ANDROID_PMEM_H_
+
+#include <stdint.h>
+
+#ifndef __user
+#define __user
+#endif
+
+struct pmem_region {
+ unsigned long offset;
+ unsigned long len;
+};
+
+#define PMEM_IOCTL_MAGIC 'p'
+#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, struct pmem_region *)
+#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, struct pmem_region *)
+#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, struct pmem_region *)
+#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, struct pmem_region *)
+
+#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
+
+#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
+
+#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, struct pmem_region *)
+
+#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
+#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
+#define HW3D_WAIT_IRQ _IOW(PMEM_IOCTL_MAGIC,10, unsigned int)
+
+struct android_pmem_platform_data;
+struct pmem_file_operations {
+ int (*mmap) (struct file *, struct vm_area_struct *);
+ int (*open) (struct inode *, struct file *);
+ ssize_t (*read) (struct file *, char __user *, size_t, long long *);
+ int (*release) (struct inode *, struct file *);
+ long (*ioctl) (struct file *, unsigned int, unsigned long);
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/android_power.h b/6/platforms/android-3/arch-arm/usr/include/linux/android_power.h
new file mode 100644
index 0000000..2e90321
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/android_power.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ANDROID_POWER_H
+#define _LINUX_ANDROID_POWER_H
+
+#include <linux/list.h>
+
+typedef struct
+{
+ struct list_head link;
+ int lock_count;
+ int flags;
+ const char *name;
+ int expires;
+} android_suspend_lock_t;
+
+#define ANDROID_SUSPEND_LOCK_FLAG_COUNTED (1U << 0)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_READABLE (1U << 1)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_SET (1U << 2)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_CLEAR (1U << 3)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_INC (1U << 4)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_DEC (1U << 5)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_VISIBLE_MASK (0x1fU << 1)
+#define ANDROID_SUSPEND_LOCK_AUTO_EXPIRE (1U << 6)
+
+typedef struct android_early_suspend android_early_suspend_t;
+struct android_early_suspend
+{
+ struct list_head link;
+ int level;
+ void (*suspend)(android_early_suspend_t *h);
+ void (*resume)(android_early_suspend_t *h);
+};
+
+typedef enum {
+ ANDROID_CHARGING_STATE_UNKNOWN,
+ ANDROID_CHARGING_STATE_DISCHARGE,
+ ANDROID_CHARGING_STATE_MAINTAIN,
+ ANDROID_CHARGING_STATE_SLOW,
+ ANDROID_CHARGING_STATE_NORMAL,
+ ANDROID_CHARGING_STATE_FAST,
+ ANDROID_CHARGING_STATE_OVERHEAT
+} android_charging_state_t;
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/apm_bios.h b/6/platforms/android-3/arch-arm/usr/include/linux/apm_bios.h
new file mode 100644
index 0000000..d32b4aa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/apm_bios.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_APM_H
+#define _LINUX_APM_H
+
+typedef unsigned short apm_event_t;
+typedef unsigned short apm_eventinfo_t;
+
+#define APM_STATE_READY 0x0000
+#define APM_STATE_STANDBY 0x0001
+#define APM_STATE_SUSPEND 0x0002
+#define APM_STATE_OFF 0x0003
+#define APM_STATE_BUSY 0x0004
+#define APM_STATE_REJECT 0x0005
+#define APM_STATE_OEM_SYS 0x0020
+#define APM_STATE_OEM_DEV 0x0040
+
+#define APM_STATE_DISABLE 0x0000
+#define APM_STATE_ENABLE 0x0001
+
+#define APM_STATE_DISENGAGE 0x0000
+#define APM_STATE_ENGAGE 0x0001
+
+#define APM_SYS_STANDBY 0x0001
+#define APM_SYS_SUSPEND 0x0002
+#define APM_NORMAL_RESUME 0x0003
+#define APM_CRITICAL_RESUME 0x0004
+#define APM_LOW_BATTERY 0x0005
+#define APM_POWER_STATUS_CHANGE 0x0006
+#define APM_UPDATE_TIME 0x0007
+#define APM_CRITICAL_SUSPEND 0x0008
+#define APM_USER_STANDBY 0x0009
+#define APM_USER_SUSPEND 0x000a
+#define APM_STANDBY_RESUME 0x000b
+#define APM_CAPABILITY_CHANGE 0x000c
+
+#define APM_SUCCESS 0x00
+#define APM_DISABLED 0x01
+#define APM_CONNECTED 0x02
+#define APM_NOT_CONNECTED 0x03
+#define APM_16_CONNECTED 0x05
+#define APM_16_UNSUPPORTED 0x06
+#define APM_32_CONNECTED 0x07
+#define APM_32_UNSUPPORTED 0x08
+#define APM_BAD_DEVICE 0x09
+#define APM_BAD_PARAM 0x0a
+#define APM_NOT_ENGAGED 0x0b
+#define APM_BAD_FUNCTION 0x0c
+#define APM_RESUME_DISABLED 0x0d
+#define APM_NO_ERROR 0x53
+#define APM_BAD_STATE 0x60
+#define APM_NO_EVENTS 0x80
+#define APM_NOT_PRESENT 0x86
+
+#define APM_DEVICE_BIOS 0x0000
+#define APM_DEVICE_ALL 0x0001
+#define APM_DEVICE_DISPLAY 0x0100
+#define APM_DEVICE_STORAGE 0x0200
+#define APM_DEVICE_PARALLEL 0x0300
+#define APM_DEVICE_SERIAL 0x0400
+#define APM_DEVICE_NETWORK 0x0500
+#define APM_DEVICE_PCMCIA 0x0600
+#define APM_DEVICE_BATTERY 0x8000
+#define APM_DEVICE_OEM 0xe000
+#define APM_DEVICE_OLD_ALL 0xffff
+#define APM_DEVICE_CLASS 0x00ff
+#define APM_DEVICE_MASK 0xff00
+
+#define APM_MAX_BATTERIES 2
+
+#define APM_CAP_GLOBAL_STANDBY 0x0001
+#define APM_CAP_GLOBAL_SUSPEND 0x0002
+#define APM_CAP_RESUME_STANDBY_TIMER 0x0004
+#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008
+#define APM_CAP_RESUME_STANDBY_RING 0x0010
+#define APM_CAP_RESUME_SUSPEND_RING 0x0020
+#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040
+#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080
+
+#include <linux/ioctl.h>
+
+#define APM_IOC_STANDBY _IO('A', 1)
+#define APM_IOC_SUSPEND _IO('A', 2)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ashmem.h b/6/platforms/android-3/arch-arm/usr/include/linux/ashmem.h
new file mode 100644
index 0000000..a57d1de
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ashmem.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ASHMEM_H
+#define _LINUX_ASHMEM_H
+
+#include <linux/limits.h>
+#include <linux/ioctl.h>
+
+#define ASHMEM_NAME_LEN 256
+
+#define ASHMEM_NAME_DEF "dev/ashmem"
+
+#define ASHMEM_NOT_PURGED 0
+#define ASHMEM_WAS_PURGED 1
+
+#define ASHMEM_IS_UNPINNED 0
+#define ASHMEM_IS_PINNED 1
+
+struct ashmem_pin {
+ __u32 offset;
+ __u32 len;
+};
+
+#define __ASHMEMIOC 0x77
+
+#define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN])
+#define ASHMEM_GET_NAME _IOR(__ASHMEMIOC, 2, char[ASHMEM_NAME_LEN])
+#define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t)
+#define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4)
+#define ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned long)
+#define ASHMEM_GET_PROT_MASK _IO(__ASHMEMIOC, 6)
+#define ASHMEM_PIN _IOW(__ASHMEMIOC, 7, struct ashmem_pin)
+#define ASHMEM_UNPIN _IOW(__ASHMEMIOC, 8, struct ashmem_pin)
+#define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9)
+#define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ata.h b/6/platforms/android-3/arch-arm/usr/include/linux/ata.h
new file mode 100644
index 0000000..76af576
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ata.h
@@ -0,0 +1,265 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_ATA_H__
+#define __LINUX_ATA_H__
+
+#include <linux/types.h>
+
+#define ATA_DMA_BOUNDARY 0xffffUL
+#define ATA_DMA_MASK 0xffffffffULL
+
+enum {
+
+ ATA_MAX_DEVICES = 2,
+ ATA_MAX_PRD = 256,
+ ATA_SECT_SIZE = 512,
+
+ ATA_ID_WORDS = 256,
+ ATA_ID_SERNO_OFS = 10,
+ ATA_ID_FW_REV_OFS = 23,
+ ATA_ID_PROD_OFS = 27,
+ ATA_ID_OLD_PIO_MODES = 51,
+ ATA_ID_FIELD_VALID = 53,
+ ATA_ID_MWDMA_MODES = 63,
+ ATA_ID_PIO_MODES = 64,
+ ATA_ID_EIDE_DMA_MIN = 65,
+ ATA_ID_EIDE_PIO = 67,
+ ATA_ID_EIDE_PIO_IORDY = 68,
+ ATA_ID_UDMA_MODES = 88,
+ ATA_ID_MAJOR_VER = 80,
+ ATA_ID_PIO4 = (1 << 1),
+
+ ATA_PCI_CTL_OFS = 2,
+ ATA_SERNO_LEN = 20,
+ ATA_UDMA0 = (1 << 0),
+ ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
+ ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
+ ATA_UDMA3 = ATA_UDMA2 | (1 << 3),
+ ATA_UDMA4 = ATA_UDMA3 | (1 << 4),
+ ATA_UDMA5 = ATA_UDMA4 | (1 << 5),
+ ATA_UDMA6 = ATA_UDMA5 | (1 << 6),
+ ATA_UDMA7 = ATA_UDMA6 | (1 << 7),
+
+ ATA_UDMA_MASK_40C = ATA_UDMA2,
+
+ ATA_PRD_SZ = 8,
+ ATA_PRD_TBL_SZ = (ATA_MAX_PRD * ATA_PRD_SZ),
+ ATA_PRD_EOT = (1 << 31),
+
+ ATA_DMA_TABLE_OFS = 4,
+ ATA_DMA_STATUS = 2,
+ ATA_DMA_CMD = 0,
+ ATA_DMA_WR = (1 << 3),
+ ATA_DMA_START = (1 << 0),
+ ATA_DMA_INTR = (1 << 2),
+ ATA_DMA_ERR = (1 << 1),
+ ATA_DMA_ACTIVE = (1 << 0),
+
+ ATA_HOB = (1 << 7),
+ ATA_NIEN = (1 << 1),
+ ATA_LBA = (1 << 6),
+ ATA_DEV1 = (1 << 4),
+ ATA_DEVICE_OBS = (1 << 7) | (1 << 5),
+ ATA_DEVCTL_OBS = (1 << 3),
+ ATA_BUSY = (1 << 7),
+ ATA_DRDY = (1 << 6),
+ ATA_DF = (1 << 5),
+ ATA_DRQ = (1 << 3),
+ ATA_ERR = (1 << 0),
+ ATA_SRST = (1 << 2),
+ ATA_ICRC = (1 << 7),
+ ATA_UNC = (1 << 6),
+ ATA_IDNF = (1 << 4),
+ ATA_ABORTED = (1 << 2),
+
+ ATA_REG_DATA = 0x00,
+ ATA_REG_ERR = 0x01,
+ ATA_REG_NSECT = 0x02,
+ ATA_REG_LBAL = 0x03,
+ ATA_REG_LBAM = 0x04,
+ ATA_REG_LBAH = 0x05,
+ ATA_REG_DEVICE = 0x06,
+ ATA_REG_STATUS = 0x07,
+
+ ATA_REG_FEATURE = ATA_REG_ERR,
+ ATA_REG_CMD = ATA_REG_STATUS,
+ ATA_REG_BYTEL = ATA_REG_LBAM,
+ ATA_REG_BYTEH = ATA_REG_LBAH,
+ ATA_REG_DEVSEL = ATA_REG_DEVICE,
+ ATA_REG_IRQ = ATA_REG_NSECT,
+
+ ATA_CMD_CHK_POWER = 0xE5,
+ ATA_CMD_STANDBY = 0xE2,
+ ATA_CMD_IDLE = 0xE3,
+ ATA_CMD_EDD = 0x90,
+ ATA_CMD_FLUSH = 0xE7,
+ ATA_CMD_FLUSH_EXT = 0xEA,
+ ATA_CMD_ID_ATA = 0xEC,
+ ATA_CMD_ID_ATAPI = 0xA1,
+ ATA_CMD_READ = 0xC8,
+ ATA_CMD_READ_EXT = 0x25,
+ ATA_CMD_WRITE = 0xCA,
+ ATA_CMD_WRITE_EXT = 0x35,
+ ATA_CMD_WRITE_FUA_EXT = 0x3D,
+ ATA_CMD_FPDMA_READ = 0x60,
+ ATA_CMD_FPDMA_WRITE = 0x61,
+ ATA_CMD_PIO_READ = 0x20,
+ ATA_CMD_PIO_READ_EXT = 0x24,
+ ATA_CMD_PIO_WRITE = 0x30,
+ ATA_CMD_PIO_WRITE_EXT = 0x34,
+ ATA_CMD_READ_MULTI = 0xC4,
+ ATA_CMD_READ_MULTI_EXT = 0x29,
+ ATA_CMD_WRITE_MULTI = 0xC5,
+ ATA_CMD_WRITE_MULTI_EXT = 0x39,
+ ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE,
+ ATA_CMD_SET_FEATURES = 0xEF,
+ ATA_CMD_PACKET = 0xA0,
+ ATA_CMD_VERIFY = 0x40,
+ ATA_CMD_VERIFY_EXT = 0x42,
+ ATA_CMD_STANDBYNOW1 = 0xE0,
+ ATA_CMD_IDLEIMMEDIATE = 0xE1,
+ ATA_CMD_INIT_DEV_PARAMS = 0x91,
+ ATA_CMD_READ_NATIVE_MAX = 0xF8,
+ ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
+ ATA_CMD_READ_LOG_EXT = 0x2f,
+
+ ATA_LOG_SATA_NCQ = 0x10,
+
+ SETFEATURES_XFER = 0x03,
+ XFER_UDMA_7 = 0x47,
+ XFER_UDMA_6 = 0x46,
+ XFER_UDMA_5 = 0x45,
+ XFER_UDMA_4 = 0x44,
+ XFER_UDMA_3 = 0x43,
+ XFER_UDMA_2 = 0x42,
+ XFER_UDMA_1 = 0x41,
+ XFER_UDMA_0 = 0x40,
+ XFER_MW_DMA_2 = 0x22,
+ XFER_MW_DMA_1 = 0x21,
+ XFER_MW_DMA_0 = 0x20,
+ XFER_SW_DMA_2 = 0x12,
+ XFER_SW_DMA_1 = 0x11,
+ XFER_SW_DMA_0 = 0x10,
+ XFER_PIO_4 = 0x0C,
+ XFER_PIO_3 = 0x0B,
+ XFER_PIO_2 = 0x0A,
+ XFER_PIO_1 = 0x09,
+ XFER_PIO_0 = 0x08,
+ XFER_PIO_SLOW = 0x00,
+
+ SETFEATURES_WC_ON = 0x02,
+ SETFEATURES_WC_OFF = 0x82,
+
+ ATAPI_PKT_DMA = (1 << 0),
+ ATAPI_DMADIR = (1 << 2),
+ ATAPI_CDB_LEN = 16,
+
+ ATA_CBL_NONE = 0,
+ ATA_CBL_PATA40 = 1,
+ ATA_CBL_PATA80 = 2,
+ ATA_CBL_PATA_UNK = 3,
+ ATA_CBL_SATA = 4,
+
+ SCR_STATUS = 0,
+ SCR_ERROR = 1,
+ SCR_CONTROL = 2,
+ SCR_ACTIVE = 3,
+ SCR_NOTIFICATION = 4,
+
+ SERR_DATA_RECOVERED = (1 << 0),
+ SERR_COMM_RECOVERED = (1 << 1),
+ SERR_DATA = (1 << 8),
+ SERR_PERSISTENT = (1 << 9),
+ SERR_PROTOCOL = (1 << 10),
+ SERR_INTERNAL = (1 << 11),
+ SERR_PHYRDY_CHG = (1 << 16),
+ SERR_DEV_XCHG = (1 << 26),
+
+ ATA_TFLAG_LBA48 = (1 << 0),
+ ATA_TFLAG_ISADDR = (1 << 1),
+ ATA_TFLAG_DEVICE = (1 << 2),
+ ATA_TFLAG_WRITE = (1 << 3),
+ ATA_TFLAG_LBA = (1 << 4),
+ ATA_TFLAG_FUA = (1 << 5),
+ ATA_TFLAG_POLLING = (1 << 6),
+};
+
+enum ata_tf_protocols {
+
+ ATA_PROT_UNKNOWN,
+ ATA_PROT_NODATA,
+ ATA_PROT_PIO,
+ ATA_PROT_DMA,
+ ATA_PROT_NCQ,
+ ATA_PROT_ATAPI,
+ ATA_PROT_ATAPI_NODATA,
+ ATA_PROT_ATAPI_DMA,
+};
+
+enum ata_ioctls {
+ ATA_IOC_GET_IO32 = 0x309,
+ ATA_IOC_SET_IO32 = 0x324,
+};
+
+struct ata_prd {
+ u32 addr;
+ u32 flags_len;
+};
+
+struct ata_taskfile {
+ unsigned long flags;
+ u8 protocol;
+
+ u8 ctl;
+
+ u8 hob_feature;
+ u8 hob_nsect;
+ u8 hob_lbal;
+ u8 hob_lbam;
+ u8 hob_lbah;
+
+ u8 feature;
+ u8 nsect;
+ u8 lbal;
+ u8 lbam;
+ u8 lbah;
+
+ u8 device;
+
+ u8 command;
+};
+
+#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
+#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
+#define ata_id_is_sata(id) ((id)[93] == 0)
+#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
+#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
+#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
+#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
+#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
+#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
+#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
+#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
+#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
+#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
+#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
+#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
+#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
+#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1)
+#define ata_id_removeable(id) ((id)[0] & (1 << 7))
+#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
+#define ata_id_u32(id,n) (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
+#define ata_id_u64(id,n) ( ((u64) (id)[(n) + 3] << 48) | ((u64) (id)[(n) + 2] << 32) | ((u64) (id)[(n) + 1] << 16) | ((u64) (id)[(n) + 0]) )
+
+#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atm.h b/6/platforms/android-3/arch-arm/usr/include/linux/atm.h
new file mode 100644
index 0000000..c9bcd70
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atm.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATM_H
+#define _LINUX_ATM_H
+
+#include <linux/compiler.h>
+#include <linux/atmapi.h>
+#include <linux/atmsap.h>
+#include <linux/atmioc.h>
+
+#define ATM_CELL_SIZE 53
+#define ATM_CELL_PAYLOAD 48
+#define ATM_AAL0_SDU 52
+#define ATM_MAX_AAL34_PDU 65535
+#define ATM_AAL5_TRAILER 8
+#define ATM_MAX_AAL5_PDU 65535
+#define ATM_MAX_CDV 9999
+#define ATM_NOT_RSV_VCI 32
+
+#define ATM_MAX_VPI 255
+#define ATM_MAX_VPI_NNI 4096
+#define ATM_MAX_VCI 65535
+
+#define ATM_NO_AAL 0
+#define ATM_AAL0 13
+#define ATM_AAL1 1
+#define ATM_AAL2 2
+#define ATM_AAL34 3
+#define ATM_AAL5 5
+
+#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | sizeof(t))
+#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
+#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
+#define __SO_SIZE(c) ((c) & 0x3fff)
+
+#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
+
+#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
+
+#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
+
+#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
+
+#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
+
+#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
+
+#define ATM_HDR_GFC_MASK 0xf0000000
+#define ATM_HDR_GFC_SHIFT 28
+#define ATM_HDR_VPI_MASK 0x0ff00000
+#define ATM_HDR_VPI_SHIFT 20
+#define ATM_HDR_VCI_MASK 0x000ffff0
+#define ATM_HDR_VCI_SHIFT 4
+#define ATM_HDR_PTI_MASK 0x0000000e
+#define ATM_HDR_PTI_SHIFT 1
+#define ATM_HDR_CLP 0x00000001
+
+#define ATM_PTI_US0 0
+#define ATM_PTI_US1 1
+#define ATM_PTI_UCES0 2
+#define ATM_PTI_UCES1 3
+#define ATM_PTI_SEGF5 4
+#define ATM_PTI_E2EF5 5
+#define ATM_PTI_RSV_RM 6
+#define ATM_PTI_RSV 7
+
+#define ATM_NONE 0
+#define ATM_UBR 1
+#define ATM_CBR 2
+#define ATM_VBR 3
+#define ATM_ABR 4
+#define ATM_ANYCLASS 5
+
+#define ATM_MAX_PCR -1
+
+struct atm_trafprm {
+ unsigned char traffic_class;
+ int max_pcr;
+ int pcr;
+ int min_pcr;
+ int max_cdv;
+ int max_sdu;
+
+ unsigned int icr;
+ unsigned int tbe;
+ unsigned int frtt : 24;
+ unsigned int rif : 4;
+ unsigned int rdf : 4;
+ unsigned int nrm_pres :1;
+ unsigned int trm_pres :1;
+ unsigned int adtf_pres :1;
+ unsigned int cdf_pres :1;
+ unsigned int nrm :3;
+ unsigned int trm :3;
+ unsigned int adtf :10;
+ unsigned int cdf :3;
+ unsigned int spare :9;
+};
+
+struct atm_qos {
+ struct atm_trafprm txtp;
+ struct atm_trafprm rxtp __ATM_API_ALIGN;
+
+ unsigned char aal __ATM_API_ALIGN;
+};
+
+#define ATM_ITF_ANY -1
+#define ATM_VPI_ANY -1
+#define ATM_VCI_ANY -1
+#define ATM_VPI_UNSPEC -2
+#define ATM_VCI_UNSPEC -2
+
+struct sockaddr_atmpvc {
+ unsigned short sap_family;
+ struct {
+ short itf;
+ short vpi;
+ int vci;
+ } sap_addr __ATM_API_ALIGN;
+};
+
+#define ATM_ESA_LEN 20
+#define ATM_E164_LEN 12
+
+#define ATM_AFI_DCC 0x39
+#define ATM_AFI_ICD 0x47
+#define ATM_AFI_E164 0x45
+#define ATM_AFI_LOCAL 0x49
+
+#define ATM_AFI_DCC_GROUP 0xBD
+#define ATM_AFI_ICD_GROUP 0xC5
+#define ATM_AFI_E164_GROUP 0xC3
+#define ATM_AFI_LOCAL_GROUP 0xC7
+
+#define ATM_LIJ_NONE 0
+#define ATM_LIJ 1
+#define ATM_LIJ_RPJ 2
+#define ATM_LIJ_NJ 3
+
+struct sockaddr_atmsvc {
+ unsigned short sas_family;
+ struct {
+ unsigned char prv[ATM_ESA_LEN];
+ char pub[ATM_E164_LEN+1];
+
+ char lij_type;
+ uint32_t lij_id;
+ } sas_addr __ATM_API_ALIGN;
+};
+
+typedef unsigned short atm_backend_t;
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atmapi.h b/6/platforms/android-3/arch-arm/usr/include/linux/atmapi.h
new file mode 100644
index 0000000..bee5cae
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atmapi.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMAPI_H
+#define _LINUX_ATMAPI_H
+
+#if defined(__sparc__) || defined(__ia64__)
+
+#define __ATM_API_ALIGN __attribute__((aligned(8)))
+#else
+#define __ATM_API_ALIGN
+#endif
+
+typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atmdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/atmdev.h
new file mode 100644
index 0000000..27baeb0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atmdev.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_ATMDEV_H
+#define LINUX_ATMDEV_H
+
+#include <linux/atmapi.h>
+#include <linux/atm.h>
+#include <linux/atmioc.h>
+
+#define ESI_LEN 6
+
+#define ATM_OC3_PCR (155520000/270*260/8/53)
+
+#define ATM_25_PCR ((25600000/8-8000)/54)
+
+#define ATM_OC12_PCR (622080000/1080*1040/8/53)
+
+#define ATM_DS3_PCR (8000*12)
+
+#define __AAL_STAT_ITEMS __HANDLE_ITEM(tx); __HANDLE_ITEM(tx_err); __HANDLE_ITEM(rx); __HANDLE_ITEM(rx_err); __HANDLE_ITEM(rx_drop);
+
+struct atm_aal_stats {
+#define __HANDLE_ITEM(i) int i
+ __AAL_STAT_ITEMS
+#undef __HANDLE_ITEM
+};
+
+struct atm_dev_stats {
+ struct atm_aal_stats aal0;
+ struct atm_aal_stats aal34;
+ struct atm_aal_stats aal5;
+} __ATM_API_ALIGN;
+
+#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc)
+
+#define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf)
+
+#define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc)
+
+#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
+
+#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
+
+#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
+
+#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
+
+#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
+
+#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
+
+#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
+
+#define ATM_SETESI _IOW('a',ATMIOC_ITF+12,struct atmif_sioc)
+
+#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
+
+#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
+
+#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
+
+#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
+
+#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
+
+#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
+
+#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc)
+
+#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc)
+
+#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc)
+
+#define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int)
+
+#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
+
+#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
+
+#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
+
+#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
+
+#define ATM_BACKEND_RAW 0
+#define ATM_BACKEND_PPP 1
+#define ATM_BACKEND_BR2684 2
+
+#define ATM_ITFTYP_LEN 8
+
+#define __ATM_LM_NONE 0
+#define __ATM_LM_AAL 1
+#define __ATM_LM_ATM 2
+
+#define __ATM_LM_PHY 8
+#define __ATM_LM_ANALOG 16
+
+#define __ATM_LM_MKLOC(n) ((n))
+#define __ATM_LM_MKRMT(n) ((n) << 8)
+
+#define __ATM_LM_XTLOC(n) ((n) & 0xff)
+#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff)
+
+#define ATM_LM_NONE 0
+
+#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL)
+#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM)
+#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY)
+#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG)
+
+#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL)
+#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM)
+#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY)
+#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG)
+
+struct atm_iobuf {
+ int length;
+ void __user *buffer;
+};
+
+#define ATM_CI_MAX -1
+
+struct atm_cirange {
+ signed char vpi_bits;
+ signed char vci_bits;
+};
+
+#define ATM_SC_RX 1024
+#define ATM_SC_TX 2048
+
+#define ATM_BACKLOG_DEFAULT 32
+
+#define ATM_MF_IMMED 1
+#define ATM_MF_INC_RSV 2
+#define ATM_MF_INC_SHP 4
+#define ATM_MF_DEC_RSV 8
+#define ATM_MF_DEC_SHP 16
+#define ATM_MF_BWD 32
+
+#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | ATM_MF_DEC_SHP | ATM_MF_BWD)
+
+#define ATM_VS_IDLE 0
+#define ATM_VS_CONNECTED 1
+#define ATM_VS_CLOSING 2
+#define ATM_VS_LISTEN 3
+#define ATM_VS_INUSE 4
+#define ATM_VS_BOUND 5
+
+#define ATM_VS2TXT_MAP "IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND"
+
+#define ATM_VF2TXT_MAP "ADDR", "READY", "PARTIAL", "REGIS", "RELEASED", "HASQOS", "LISTEN", "META", "256", "512", "1024", "2048", "SESSION", "HASSAP", "BOUND", "CLOSE"
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atmioc.h b/6/platforms/android-3/arch-arm/usr/include/linux/atmioc.h
new file mode 100644
index 0000000..d004339
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atmioc.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMIOC_H
+#define _LINUX_ATMIOC_H
+
+#include <asm/ioctl.h>
+
+#define ATMIOC_PHYCOM 0x00
+#define ATMIOC_PHYCOM_END 0x0f
+#define ATMIOC_PHYTYP 0x10
+#define ATMIOC_PHYTYP_END 0x2f
+#define ATMIOC_PHYPRV 0x30
+#define ATMIOC_PHYPRV_END 0x4f
+#define ATMIOC_SARCOM 0x50
+#define ATMIOC_SARCOM_END 0x50
+#define ATMIOC_SARPRV 0x60
+#define ATMIOC_SARPRV_END 0x7f
+#define ATMIOC_ITF 0x80
+#define ATMIOC_ITF_END 0x8f
+#define ATMIOC_BACKEND 0x90
+#define ATMIOC_BACKEND_END 0xaf
+
+#define ATMIOC_AREQUIPA 0xc0
+#define ATMIOC_LANE 0xd0
+#define ATMIOC_MPOA 0xd8
+#define ATMIOC_CLIP 0xe0
+#define ATMIOC_CLIP_END 0xef
+#define ATMIOC_SPECIAL 0xf0
+#define ATMIOC_SPECIAL_END 0xff
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atmppp.h b/6/platforms/android-3/arch-arm/usr/include/linux/atmppp.h
new file mode 100644
index 0000000..3330c32
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atmppp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMPPP_H
+#define _LINUX_ATMPPP_H
+
+#include <linux/atm.h>
+
+#define PPPOATM_ENCAPS_AUTODETECT (0)
+#define PPPOATM_ENCAPS_VC (1)
+#define PPPOATM_ENCAPS_LLC (2)
+
+struct atm_backend_ppp {
+ atm_backend_t backend_num;
+ int encaps;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/atmsap.h b/6/platforms/android-3/arch-arm/usr/include/linux/atmsap.h
new file mode 100644
index 0000000..456f75f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/atmsap.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMSAP_H
+#define _LINUX_ATMSAP_H
+
+#include <linux/atmapi.h>
+
+#define ATM_L2_NONE 0
+#define ATM_L2_ISO1745 0x01
+#define ATM_L2_Q291 0x02
+#define ATM_L2_X25_LL 0x06
+#define ATM_L2_X25_ML 0x07
+#define ATM_L2_LAPB 0x08
+#define ATM_L2_HDLC_ARM 0x09
+#define ATM_L2_HDLC_NRM 0x0a
+#define ATM_L2_HDLC_ABM 0x0b
+#define ATM_L2_ISO8802 0x0c
+#define ATM_L2_X75 0x0d
+#define ATM_L2_Q922 0x0e
+#define ATM_L2_USER 0x10
+#define ATM_L2_ISO7776 0x11
+
+#define ATM_L3_NONE 0
+#define ATM_L3_X25 0x06
+#define ATM_L3_ISO8208 0x07
+#define ATM_L3_X223 0x08
+#define ATM_L3_ISO8473 0x09
+#define ATM_L3_T70 0x0a
+#define ATM_L3_TR9577 0x0b
+#define ATM_L3_H310 0x0c
+#define ATM_L3_H321 0x0d
+#define ATM_L3_USER 0x10
+
+#define ATM_HL_NONE 0
+#define ATM_HL_ISO 0x01
+#define ATM_HL_USER 0x02
+#define ATM_HL_HLP 0x03
+#define ATM_HL_VENDOR 0x04
+
+#define ATM_IMD_NONE 0
+#define ATM_IMD_NORMAL 1
+#define ATM_IMD_EXTENDED 2
+
+#define ATM_TT_NONE 0
+#define ATM_TT_RX 1
+#define ATM_TT_TX 2
+#define ATM_TT_RXTX 3
+
+#define ATM_MC_NONE 0
+#define ATM_MC_TS 1
+#define ATM_MC_TS_FEC 2
+#define ATM_MC_PS 3
+#define ATM_MC_PS_FEC 4
+#define ATM_MC_H221 5
+
+#define ATM_MAX_HLI 8
+
+struct atm_blli {
+ unsigned char l2_proto;
+ union {
+ struct {
+ unsigned char mode;
+
+ unsigned char window;
+ } itu;
+ unsigned char user;
+ } l2;
+ unsigned char l3_proto;
+ union {
+ struct {
+ unsigned char mode;
+
+ unsigned char def_size;
+
+ unsigned char window;
+ } itu;
+ unsigned char user;
+ struct {
+ unsigned char term_type;
+ unsigned char fw_mpx_cap;
+
+ unsigned char bw_mpx_cap;
+
+ } h310;
+ struct {
+ unsigned char ipi;
+ unsigned char snap[5];
+
+ } tr9577;
+ } l3;
+} __ATM_API_ALIGN;
+
+struct atm_bhli {
+ unsigned char hl_type;
+ unsigned char hl_length;
+
+ unsigned char hl_info[ATM_MAX_HLI];
+};
+
+#define ATM_MAX_BLLI 3
+
+struct atm_sap {
+ struct atm_bhli bhli;
+ struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN;
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/attribute_container.h b/6/platforms/android-3/arch-arm/usr/include/linux/attribute_container.h
new file mode 100644
index 0000000..1a9bfb0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/attribute_container.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ATTRIBUTE_CONTAINER_H_
+#define _ATTRIBUTE_CONTAINER_H_
+
+#include <linux/device.h>
+#include <linux/list.h>
+#include <linux/klist.h>
+#include <linux/spinlock.h>
+
+struct attribute_container {
+ struct list_head node;
+ struct klist containers;
+ struct class *class;
+ struct class_device_attribute **attrs;
+ int (*match)(struct attribute_container *, struct device *);
+#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01
+ unsigned long flags;
+};
+
+struct attribute_container *attribute_container_classdev_to_container(struct class_device *);
+struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *);
+struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/auto_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/auto_fs.h
new file mode 100644
index 0000000..3711cc4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/auto_fs.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_AUTO_FS_H
+#define _LINUX_AUTO_FS_H
+
+#include <linux/ioctl.h>
+
+#define AUTOFS_PROTO_VERSION 3
+
+#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
+#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
+
+#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) || defined(__powerpc__) || defined(__s390__)
+typedef unsigned int autofs_wqt_t;
+#else
+typedef unsigned long autofs_wqt_t;
+#endif
+
+#define autofs_ptype_missing 0
+#define autofs_ptype_expire 1
+
+struct autofs_packet_hdr {
+ int proto_version;
+ int type;
+};
+
+struct autofs_packet_missing {
+ struct autofs_packet_hdr hdr;
+ autofs_wqt_t wait_queue_token;
+ int len;
+ char name[NAME_MAX+1];
+};
+
+struct autofs_packet_expire {
+ struct autofs_packet_hdr hdr;
+ int len;
+ char name[NAME_MAX+1];
+};
+
+#define AUTOFS_IOC_READY _IO(0x93,0x60)
+#define AUTOFS_IOC_FAIL _IO(0x93,0x61)
+#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
+#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
+#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
+#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/autoconf.h b/6/platforms/android-3/arch-arm/usr/include/linux/autoconf.h
new file mode 100644
index 0000000..306bf12
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/autoconf.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_AUTOCONF_CRAP_GOES_HERE
+#define LINUX_AUTOCONF_CRAP_GOES_HERE
+
+#define AUTOCONF_INCLUDED
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/auxvec.h b/6/platforms/android-3/arch-arm/usr/include/linux/auxvec.h
new file mode 100644
index 0000000..f8a0701
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/auxvec.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_AUXVEC_H
+#define _LINUX_AUXVEC_H
+
+#include <asm/auxvec.h>
+
+#define AT_NULL 0
+#define AT_IGNORE 1
+#define AT_EXECFD 2
+#define AT_PHDR 3
+#define AT_PHENT 4
+#define AT_PHNUM 5
+#define AT_PAGESZ 6
+#define AT_BASE 7
+#define AT_FLAGS 8
+#define AT_ENTRY 9
+#define AT_NOTELF 10
+#define AT_UID 11
+#define AT_EUID 12
+#define AT_GID 13
+#define AT_EGID 14
+#define AT_PLATFORM 15
+#define AT_HWCAP 16
+#define AT_CLKTCK 17
+
+#define AT_SECURE 23
+
+#define AT_VECTOR_SIZE 44
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/backing-dev.h b/6/platforms/android-3/arch-arm/usr/include/linux/backing-dev.h
new file mode 100644
index 0000000..4996d2c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/backing-dev.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BACKING_DEV_H
+#define _LINUX_BACKING_DEV_H
+
+#include <asm/atomic.h>
+
+enum bdi_state {
+ BDI_pdflush,
+ BDI_write_congested,
+ BDI_read_congested,
+ BDI_unused,
+};
+
+typedef int (congested_fn)(void *, int);
+
+struct backing_dev_info {
+ unsigned long ra_pages;
+ unsigned long state;
+ unsigned int capabilities;
+ congested_fn *congested_fn;
+ void *congested_data;
+ void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
+ void *unplug_io_data;
+};
+
+#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
+#define BDI_CAP_NO_WRITEBACK 0x00000002
+#define BDI_CAP_MAP_COPY 0x00000004
+#define BDI_CAP_MAP_DIRECT 0x00000008
+#define BDI_CAP_READ_MAP 0x00000010
+#define BDI_CAP_WRITE_MAP 0x00000020
+#define BDI_CAP_EXEC_MAP 0x00000040
+#define BDI_CAP_VMFLAGS (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
+
+#if defined(VM_MAYREAD) && BDI_CAP_READ_MAP != (VM_MAYREAD || BDI_CAP_WRITE_MAP != (VM_MAYWRITE || BDI_CAP_EXEC_MAP != VM_MAYEXEC))
+#error please change backing_dev_info::capabilities flags
+#endif
+
+#define bdi_cap_writeback_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
+#define bdi_cap_account_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
+#define mapping_cap_writeback_dirty(mapping) bdi_cap_writeback_dirty((mapping)->backing_dev_info)
+#define mapping_cap_account_dirty(mapping) bdi_cap_account_dirty((mapping)->backing_dev_info)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/binder.h b/6/platforms/android-3/arch-arm/usr/include/linux/binder.h
new file mode 100644
index 0000000..b97eafb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/binder.h
@@ -0,0 +1,186 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BINDER_H
+#define _LINUX_BINDER_H
+
+#include <linux/ioctl.h>
+
+#define B_PACK_CHARS(c1, c2, c3, c4) ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4))
+#define B_TYPE_LARGE 0x85
+
+enum {
+ BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE),
+ BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE),
+ BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE),
+ BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE),
+ BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE),
+};
+
+enum {
+ FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
+ FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
+};
+
+struct flat_binder_object {
+
+ unsigned long type;
+ unsigned long flags;
+
+ union {
+ void *binder;
+ signed long handle;
+ };
+
+ void *cookie;
+};
+
+struct binder_write_read {
+ signed long write_size;
+ signed long write_consumed;
+ unsigned long write_buffer;
+ signed long read_size;
+ signed long read_consumed;
+ unsigned long read_buffer;
+};
+
+struct binder_version {
+
+ signed long protocol_version;
+};
+
+#define BINDER_CURRENT_PROTOCOL_VERSION 7
+
+#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
+#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, int64_t)
+#define BINDER_SET_MAX_THREADS _IOW('b', 5, size_t)
+#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, int)
+#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, int)
+#define BINDER_THREAD_EXIT _IOW('b', 8, int)
+#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
+
+enum transaction_flags {
+ TF_ONE_WAY = 0x01,
+ TF_ROOT_OBJECT = 0x04,
+ TF_STATUS_CODE = 0x08,
+ TF_ACCEPT_FDS = 0x10,
+};
+
+struct binder_transaction_data {
+
+ union {
+ size_t handle;
+ void *ptr;
+ } target;
+ void *cookie;
+ unsigned int code;
+
+ unsigned int flags;
+ pid_t sender_pid;
+ uid_t sender_euid;
+ size_t data_size;
+ size_t offsets_size;
+
+ union {
+ struct {
+
+ const void *buffer;
+
+ const void *offsets;
+ } ptr;
+ uint8_t buf[8];
+ } data;
+};
+
+struct binder_ptr_cookie {
+ void *ptr;
+ void *cookie;
+};
+
+struct binder_pri_desc {
+ int priority;
+ int desc;
+};
+
+struct binder_pri_ptr_cookie {
+ int priority;
+ void *ptr;
+ void *cookie;
+};
+
+enum BinderDriverReturnProtocol {
+ BR_ERROR = _IOR_BAD('r', 0, int),
+
+ BR_OK = _IO('r', 1),
+
+ BR_TRANSACTION = _IOR_BAD('r', 2, struct binder_transaction_data),
+ BR_REPLY = _IOR_BAD('r', 3, struct binder_transaction_data),
+
+ BR_ACQUIRE_RESULT = _IOR_BAD('r', 4, int),
+
+ BR_DEAD_REPLY = _IO('r', 5),
+
+ BR_TRANSACTION_COMPLETE = _IO('r', 6),
+
+ BR_INCREFS = _IOR_BAD('r', 7, struct binder_ptr_cookie),
+ BR_ACQUIRE = _IOR_BAD('r', 8, struct binder_ptr_cookie),
+ BR_RELEASE = _IOR_BAD('r', 9, struct binder_ptr_cookie),
+ BR_DECREFS = _IOR_BAD('r', 10, struct binder_ptr_cookie),
+
+ BR_ATTEMPT_ACQUIRE = _IOR_BAD('r', 11, struct binder_pri_ptr_cookie),
+
+ BR_NOOP = _IO('r', 12),
+
+ BR_SPAWN_LOOPER = _IO('r', 13),
+
+ BR_FINISHED = _IO('r', 14),
+
+ BR_DEAD_BINDER = _IOR_BAD('r', 15, void *),
+
+ BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR_BAD('r', 16, void *),
+
+ BR_FAILED_REPLY = _IO('r', 17),
+
+};
+
+enum BinderDriverCommandProtocol {
+ BC_TRANSACTION = _IOW_BAD('c', 0, struct binder_transaction_data),
+ BC_REPLY = _IOW_BAD('c', 1, struct binder_transaction_data),
+
+ BC_ACQUIRE_RESULT = _IOW_BAD('c', 2, int),
+
+ BC_FREE_BUFFER = _IOW_BAD('c', 3, int),
+
+ BC_INCREFS = _IOW_BAD('c', 4, int),
+ BC_ACQUIRE = _IOW_BAD('c', 5, int),
+ BC_RELEASE = _IOW_BAD('c', 6, int),
+ BC_DECREFS = _IOW_BAD('c', 7, int),
+
+ BC_INCREFS_DONE = _IOW_BAD('c', 8, struct binder_ptr_cookie),
+ BC_ACQUIRE_DONE = _IOW_BAD('c', 9, struct binder_ptr_cookie),
+
+ BC_ATTEMPT_ACQUIRE = _IOW_BAD('c', 10, struct binder_pri_desc),
+
+ BC_REGISTER_LOOPER = _IO('c', 11),
+
+ BC_ENTER_LOOPER = _IO('c', 12),
+ BC_EXIT_LOOPER = _IO('c', 13),
+
+ BC_REQUEST_DEATH_NOTIFICATION = _IOW_BAD('c', 14, struct binder_ptr_cookie),
+
+ BC_CLEAR_DEATH_NOTIFICATION = _IOW_BAD('c', 15, struct binder_ptr_cookie),
+
+ BC_DEAD_BINDER_DONE = _IOW_BAD('c', 16, void *),
+
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/binfmts.h b/6/platforms/android-3/arch-arm/usr/include/linux/binfmts.h
new file mode 100644
index 0000000..3335985
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/binfmts.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BINFMTS_H
+#define _LINUX_BINFMTS_H
+
+#include <linux/capability.h>
+
+struct pt_regs;
+
+#define MAX_ARG_PAGES 32
+
+#define BINPRM_BUF_SIZE 128
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/bio.h b/6/platforms/android-3/arch-arm/usr/include/linux/bio.h
new file mode 100644
index 0000000..4e91314
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/bio.h
@@ -0,0 +1,171 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BIO_H
+#define __LINUX_BIO_H
+
+#include <linux/highmem.h>
+#include <linux/mempool.h>
+#include <linux/ioprio.h>
+
+#include <asm/io.h>
+
+#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
+#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
+#define BIOVEC_VIRT_OVERSIZE(x) ((x) > BIO_VMERGE_MAX_SIZE)
+#else
+#define BIOVEC_VIRT_START_SIZE(x) 0
+#define BIOVEC_VIRT_OVERSIZE(x) 0
+#endif
+
+#ifndef BIO_VMERGE_BOUNDARY
+#define BIO_VMERGE_BOUNDARY 0
+#endif
+
+#define BIO_DEBUG
+
+#ifdef BIO_DEBUG
+#define BIO_BUG_ON BUG_ON
+#else
+#define BIO_BUG_ON
+#endif
+
+#define BIO_MAX_PAGES 256
+#define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT)
+#define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
+
+struct bio_vec {
+ struct page *bv_page;
+ unsigned int bv_len;
+ unsigned int bv_offset;
+};
+
+struct bio_set;
+struct bio;
+typedef int (bio_end_io_t) (struct bio *, unsigned int, int);
+typedef void (bio_destructor_t) (struct bio *);
+
+struct bio {
+ sector_t bi_sector;
+ struct bio *bi_next;
+ struct block_device *bi_bdev;
+ unsigned long bi_flags;
+ unsigned long bi_rw;
+
+ unsigned short bi_vcnt;
+ unsigned short bi_idx;
+
+ unsigned short bi_phys_segments;
+
+ unsigned short bi_hw_segments;
+
+ unsigned int bi_size;
+
+ unsigned int bi_hw_front_size;
+ unsigned int bi_hw_back_size;
+
+ unsigned int bi_max_vecs;
+
+ struct bio_vec *bi_io_vec;
+
+ bio_end_io_t *bi_end_io;
+ atomic_t bi_cnt;
+
+ void *bi_private;
+
+ bio_destructor_t *bi_destructor;
+};
+
+#define BIO_UPTODATE 0
+#define BIO_RW_BLOCK 1
+#define BIO_EOF 2
+#define BIO_SEG_VALID 3
+#define BIO_CLONED 4
+#define BIO_BOUNCED 5
+#define BIO_USER_MAPPED 6
+#define BIO_EOPNOTSUPP 7
+#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
+
+#define BIO_POOL_BITS (4)
+#define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
+#define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
+#define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
+
+#define BIO_RW 0
+#define BIO_RW_AHEAD 1
+#define BIO_RW_BARRIER 2
+#define BIO_RW_FAILFAST 3
+#define BIO_RW_SYNC 4
+
+#define BIO_PRIO_SHIFT (8 * sizeof(unsigned long) - IOPRIO_BITS)
+#define bio_prio(bio) ((bio)->bi_rw >> BIO_PRIO_SHIFT)
+#define bio_prio_valid(bio) ioprio_valid(bio_prio(bio))
+
+#define bio_set_prio(bio, prio) do { WARN_ON(prio >= (1 << IOPRIO_BITS)); (bio)->bi_rw &= ((1UL << BIO_PRIO_SHIFT) - 1); (bio)->bi_rw |= ((unsigned long) (prio) << BIO_PRIO_SHIFT); } while (0)
+
+#define bio_iovec_idx(bio, idx) (&((bio)->bi_io_vec[(idx)]))
+#define bio_iovec(bio) bio_iovec_idx((bio), (bio)->bi_idx)
+#define bio_page(bio) bio_iovec((bio))->bv_page
+#define bio_offset(bio) bio_iovec((bio))->bv_offset
+#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
+#define bio_sectors(bio) ((bio)->bi_size >> 9)
+#define bio_cur_sectors(bio) (bio_iovec(bio)->bv_len >> 9)
+#define bio_data(bio) (page_address(bio_page((bio))) + bio_offset((bio)))
+#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
+#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
+#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
+#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
+
+#define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
+#define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
+
+#define __bio_kmap_atomic(bio, idx, kmtype) (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page, kmtype) + bio_iovec_idx((bio), (idx))->bv_offset)
+
+#define __bio_kunmap_atomic(addr, kmtype) kunmap_atomic(addr, kmtype)
+
+#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
+#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
+
+#ifndef BIOVEC_PHYS_MERGEABLE
+#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
+#endif
+
+#define BIOVEC_VIRT_MERGEABLE(vec1, vec2) ((((bvec_to_phys((vec1)) + (vec1)->bv_len) | bvec_to_phys((vec2))) & (BIO_VMERGE_BOUNDARY - 1)) == 0)
+#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
+#define BIOVEC_SEG_BOUNDARY(q, b1, b2) __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, (q)->seg_boundary_mask)
+#define BIO_SEG_BOUNDARY(q, b1, b2) BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2)))
+
+#define bio_io_error(bio, bytes) bio_endio((bio), (bytes), -EIO)
+
+#define __bio_for_each_segment(bvl, bio, i, start_idx) for (bvl = bio_iovec_idx((bio), (start_idx)), i = (start_idx); i < (bio)->bi_vcnt; bvl++, i++)
+
+#define bio_for_each_segment(bvl, bio, i) __bio_for_each_segment(bvl, bio, i, (bio)->bi_idx)
+
+#define bio_get(bio) atomic_inc(&(bio)->bi_cnt)
+
+struct bio_pair {
+ struct bio bio1, bio2;
+ struct bio_vec bv1, bv2;
+ atomic_t cnt;
+ int error;
+};
+
+struct request_queue;
+
+struct sg_iovec;
+
+#define bvec_kmap_irq(bvec, flags) (page_address((bvec)->bv_page) + (bvec)->bv_offset)
+#define bvec_kunmap_irq(buf, flags) do { *(flags) = 0; } while (0)
+
+#define __bio_kunmap_irq(buf, flags) bvec_kunmap_irq(buf, flags)
+#define bio_kmap_irq(bio, flags) __bio_kmap_irq((bio), (bio)->bi_idx, (flags))
+#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/bitmap.h b/6/platforms/android-3/arch-arm/usr/include/linux/bitmap.h
new file mode 100644
index 0000000..246d158
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/bitmap.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BITMAP_H
+#define __LINUX_BITMAP_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <linux/bitops.h>
+#include <linux/string.h>
+
+#define BITMAP_LAST_WORD_MASK(nbits) ( ((nbits) % BITS_PER_LONG) ? (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL )
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/bitops.h b/6/platforms/android-3/arch-arm/usr/include/linux/bitops.h
new file mode 100644
index 0000000..f8df614
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/bitops.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BITOPS_H
+#define _LINUX_BITOPS_H
+#include <asm/types.h>
+
+#include <asm/bitops.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/blkdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/blkdev.h
new file mode 100644
index 0000000..3004524
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/blkdev.h
@@ -0,0 +1,461 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLKDEV_H
+#define _LINUX_BLKDEV_H
+
+#include <linux/major.h>
+#include <linux/genhd.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+#include <linux/pagemap.h>
+#include <linux/backing-dev.h>
+#include <linux/wait.h>
+#include <linux/mempool.h>
+#include <linux/bio.h>
+#include <linux/module.h>
+#include <linux/stringify.h>
+
+#include <asm/scatterlist.h>
+
+struct scsi_ioctl_command;
+
+struct request_queue;
+typedef struct request_queue request_queue_t;
+struct elevator_queue;
+typedef struct elevator_queue elevator_t;
+struct request_pm_state;
+struct blk_trace;
+
+#define BLKDEV_MIN_RQ 4
+#define BLKDEV_MAX_RQ 128
+
+struct as_io_context {
+ spinlock_t lock;
+
+ void (*dtor)(struct as_io_context *aic);
+ void (*exit)(struct as_io_context *aic);
+
+ unsigned long state;
+ atomic_t nr_queued;
+ atomic_t nr_dispatched;
+
+ unsigned long last_end_request;
+ unsigned long ttime_total;
+ unsigned long ttime_samples;
+ unsigned long ttime_mean;
+
+ unsigned int seek_samples;
+ sector_t last_request_pos;
+ u64 seek_total;
+ sector_t seek_mean;
+};
+
+struct cfq_queue;
+struct cfq_io_context {
+ struct rb_node rb_node;
+ void *key;
+
+ struct cfq_queue *cfqq[2];
+
+ struct io_context *ioc;
+
+ unsigned long last_end_request;
+ sector_t last_request_pos;
+ unsigned long last_queue;
+
+ unsigned long ttime_total;
+ unsigned long ttime_samples;
+ unsigned long ttime_mean;
+
+ unsigned int seek_samples;
+ u64 seek_total;
+ sector_t seek_mean;
+
+ struct list_head queue_list;
+
+ void (*dtor)(struct io_context *);
+ void (*exit)(struct io_context *);
+};
+
+struct io_context {
+ atomic_t refcount;
+ struct task_struct *task;
+
+ int (*set_ioprio)(struct io_context *, unsigned int);
+
+ unsigned long last_waited;
+ int nr_batch_requests;
+
+ struct as_io_context *aic;
+ struct rb_root cic_root;
+};
+
+struct io_context *current_io_context(gfp_t gfp_flags);
+struct io_context *get_io_context(gfp_t gfp_flags);
+
+struct request;
+typedef void (rq_end_io_fn)(struct request *, int);
+
+struct request_list {
+ int count[2];
+ int starved[2];
+ int elvpriv;
+ mempool_t *rq_pool;
+ wait_queue_head_t wait[2];
+};
+
+#define BLK_MAX_CDB 16
+
+struct request {
+ struct list_head queuelist;
+ struct list_head donelist;
+
+ unsigned long flags;
+
+ sector_t sector;
+ unsigned long nr_sectors;
+
+ unsigned int current_nr_sectors;
+
+ sector_t hard_sector;
+ unsigned long hard_nr_sectors;
+
+ unsigned int hard_cur_sectors;
+
+ struct bio *bio;
+ struct bio *biotail;
+
+ void *elevator_private;
+ void *completion_data;
+
+ int rq_status;
+ int errors;
+ struct gendisk *rq_disk;
+ unsigned long start_time;
+
+ unsigned short nr_phys_segments;
+
+ unsigned short nr_hw_segments;
+
+ unsigned short ioprio;
+
+ int tag;
+
+ int ref_count;
+ request_queue_t *q;
+ struct request_list *rl;
+
+ struct completion *waiting;
+ void *special;
+ char *buffer;
+
+ unsigned int cmd_len;
+ unsigned char cmd[BLK_MAX_CDB];
+
+ unsigned int data_len;
+ unsigned int sense_len;
+ void *data;
+ void *sense;
+
+ unsigned int timeout;
+ int retries;
+
+ rq_end_io_fn *end_io;
+ void *end_io_data;
+};
+
+enum rq_flag_bits {
+ __REQ_RW,
+ __REQ_FAILFAST,
+ __REQ_SORTED,
+ __REQ_SOFTBARRIER,
+ __REQ_HARDBARRIER,
+ __REQ_FUA,
+ __REQ_CMD,
+ __REQ_NOMERGE,
+ __REQ_STARTED,
+ __REQ_DONTPREP,
+ __REQ_QUEUED,
+ __REQ_ELVPRIV,
+
+ __REQ_PC,
+ __REQ_BLOCK_PC,
+ __REQ_SENSE,
+
+ __REQ_FAILED,
+ __REQ_QUIET,
+ __REQ_SPECIAL,
+ __REQ_DRIVE_CMD,
+ __REQ_DRIVE_TASK,
+ __REQ_DRIVE_TASKFILE,
+ __REQ_PREEMPT,
+ __REQ_PM_SUSPEND,
+ __REQ_PM_RESUME,
+ __REQ_PM_SHUTDOWN,
+ __REQ_ORDERED_COLOR,
+ __REQ_RW_SYNC,
+ __REQ_NR_BITS,
+};
+
+#define REQ_RW (1 << __REQ_RW)
+#define REQ_FAILFAST (1 << __REQ_FAILFAST)
+#define REQ_SORTED (1 << __REQ_SORTED)
+#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
+#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
+#define REQ_FUA (1 << __REQ_FUA)
+#define REQ_CMD (1 << __REQ_CMD)
+#define REQ_NOMERGE (1 << __REQ_NOMERGE)
+#define REQ_STARTED (1 << __REQ_STARTED)
+#define REQ_DONTPREP (1 << __REQ_DONTPREP)
+#define REQ_QUEUED (1 << __REQ_QUEUED)
+#define REQ_ELVPRIV (1 << __REQ_ELVPRIV)
+#define REQ_PC (1 << __REQ_PC)
+#define REQ_BLOCK_PC (1 << __REQ_BLOCK_PC)
+#define REQ_SENSE (1 << __REQ_SENSE)
+#define REQ_FAILED (1 << __REQ_FAILED)
+#define REQ_QUIET (1 << __REQ_QUIET)
+#define REQ_SPECIAL (1 << __REQ_SPECIAL)
+#define REQ_DRIVE_CMD (1 << __REQ_DRIVE_CMD)
+#define REQ_DRIVE_TASK (1 << __REQ_DRIVE_TASK)
+#define REQ_DRIVE_TASKFILE (1 << __REQ_DRIVE_TASKFILE)
+#define REQ_PREEMPT (1 << __REQ_PREEMPT)
+#define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
+#define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
+#define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
+#define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR)
+#define REQ_RW_SYNC (1 << __REQ_RW_SYNC)
+
+struct request_pm_state
+{
+
+ int pm_step;
+
+ u32 pm_state;
+ void* data;
+};
+
+#include <linux/elevator.h>
+
+typedef int (merge_request_fn) (request_queue_t *, struct request *,
+ struct bio *);
+typedef int (merge_requests_fn) (request_queue_t *, struct request *,
+ struct request *);
+typedef void (request_fn_proc) (request_queue_t *q);
+typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
+typedef int (prep_rq_fn) (request_queue_t *, struct request *);
+typedef void (unplug_fn) (request_queue_t *);
+
+struct bio_vec;
+typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
+typedef void (activity_fn) (void *data, int rw);
+typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
+typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
+typedef void (softirq_done_fn)(struct request *);
+
+enum blk_queue_state {
+ Queue_down,
+ Queue_up,
+};
+
+struct blk_queue_tag {
+ struct request **tag_index;
+ unsigned long *tag_map;
+ struct list_head busy_list;
+ int busy;
+ int max_depth;
+ int real_max_depth;
+ atomic_t refcnt;
+};
+
+struct request_queue
+{
+
+ struct list_head queue_head;
+ struct request *last_merge;
+ elevator_t *elevator;
+
+ struct request_list rq;
+
+ request_fn_proc *request_fn;
+ merge_request_fn *back_merge_fn;
+ merge_request_fn *front_merge_fn;
+ merge_requests_fn *merge_requests_fn;
+ make_request_fn *make_request_fn;
+ prep_rq_fn *prep_rq_fn;
+ unplug_fn *unplug_fn;
+ merge_bvec_fn *merge_bvec_fn;
+ activity_fn *activity_fn;
+ issue_flush_fn *issue_flush_fn;
+ prepare_flush_fn *prepare_flush_fn;
+ softirq_done_fn *softirq_done_fn;
+
+ sector_t end_sector;
+ struct request *boundary_rq;
+
+ struct timer_list unplug_timer;
+ int unplug_thresh;
+ unsigned long unplug_delay;
+ struct work_struct unplug_work;
+
+ struct backing_dev_info backing_dev_info;
+
+ void *queuedata;
+
+ void *activity_data;
+
+ unsigned long bounce_pfn;
+ gfp_t bounce_gfp;
+
+ unsigned long queue_flags;
+
+ spinlock_t __queue_lock;
+ spinlock_t *queue_lock;
+
+ struct kobject kobj;
+
+ unsigned long nr_requests;
+ unsigned int nr_congestion_on;
+ unsigned int nr_congestion_off;
+ unsigned int nr_batching;
+
+ unsigned int max_sectors;
+ unsigned int max_hw_sectors;
+ unsigned short max_phys_segments;
+ unsigned short max_hw_segments;
+ unsigned short hardsect_size;
+ unsigned int max_segment_size;
+
+ unsigned long seg_boundary_mask;
+ unsigned int dma_alignment;
+
+ struct blk_queue_tag *queue_tags;
+
+ unsigned int nr_sorted;
+ unsigned int in_flight;
+
+ unsigned int sg_timeout;
+ unsigned int sg_reserved_size;
+ int node;
+
+ struct blk_trace *blk_trace;
+
+ unsigned int ordered, next_ordered, ordseq;
+ int orderr, ordcolor;
+ struct request pre_flush_rq, bar_rq, post_flush_rq;
+ struct request *orig_bar_rq;
+ unsigned int bi_size;
+
+ struct mutex sysfs_lock;
+};
+
+#define RQ_INACTIVE (-1)
+#define RQ_ACTIVE 1
+
+#define QUEUE_FLAG_CLUSTER 0
+#define QUEUE_FLAG_QUEUED 1
+#define QUEUE_FLAG_STOPPED 2
+#define QUEUE_FLAG_READFULL 3
+#define QUEUE_FLAG_WRITEFULL 4
+#define QUEUE_FLAG_DEAD 5
+#define QUEUE_FLAG_REENTER 6
+#define QUEUE_FLAG_PLUGGED 7
+#define QUEUE_FLAG_ELVSWITCH 8
+
+enum {
+
+ QUEUE_ORDERED_NONE = 0x00,
+ QUEUE_ORDERED_DRAIN = 0x01,
+ QUEUE_ORDERED_TAG = 0x02,
+
+ QUEUE_ORDERED_PREFLUSH = 0x10,
+ QUEUE_ORDERED_POSTFLUSH = 0x20,
+ QUEUE_ORDERED_FUA = 0x40,
+
+ QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
+ QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
+ QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
+ QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
+
+ QUEUE_ORDSEQ_STARTED = 0x01,
+ QUEUE_ORDSEQ_DRAIN = 0x02,
+ QUEUE_ORDSEQ_PREFLUSH = 0x04,
+ QUEUE_ORDSEQ_BAR = 0x08,
+ QUEUE_ORDSEQ_POSTFLUSH = 0x10,
+ QUEUE_ORDSEQ_DONE = 0x20,
+};
+
+#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
+#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
+#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
+#define blk_queue_flushing(q) ((q)->ordseq)
+
+#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
+#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
+#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
+#define blk_rq_started(rq) ((rq)->flags & REQ_STARTED)
+
+#define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq))
+
+#define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
+#define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
+#define blk_pm_request(rq) ((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME))
+
+#define blk_sorted_rq(rq) ((rq)->flags & REQ_SORTED)
+#define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER)
+#define blk_fua_rq(rq) ((rq)->flags & REQ_FUA)
+
+#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
+
+#define rq_data_dir(rq) ((rq)->flags & 1)
+
+#define RQ_NOMERGE_FLAGS (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
+#define rq_mergeable(rq) (!((rq)->flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq)))
+#define blk_queue_headactive(q, head_active)
+#define BLKPREP_OK 0
+#define BLKPREP_KILL 1
+#define BLKPREP_DEFER 2
+
+#define BLK_BOUNCE_HIGH ((u64)blk_max_low_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
+
+#define rq_for_each_bio(_bio, rq) if ((rq->bio)) for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)
+
+#define end_io_error(uptodate) (unlikely((uptodate) <= 0))
+
+#define blk_queue_tag_depth(q) ((q)->queue_tags->busy)
+#define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth)
+#define blk_rq_tagged(rq) ((rq)->flags & REQ_QUEUED)
+
+#define MAX_PHYS_SEGMENTS 128
+#define MAX_HW_SEGMENTS 128
+#define SAFE_MAX_SECTORS 255
+#define BLK_DEF_MAX_SECTORS 1024
+
+#define MAX_SEGMENT_SIZE 65536
+
+#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
+
+#define blk_finished_io(nsects) do { } while (0)
+#define blk_started_io(nsects) do { } while (0)
+
+#define sector_div(n, b)( { int _res; _res = (n) % (b); (n) /= (b); _res; } )
+
+#define MODULE_ALIAS_BLOCKDEV(major,minor) MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
+#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) MODULE_ALIAS("block-major-" __stringify(major) "-*")
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/blkpg.h b/6/platforms/android-3/arch-arm/usr/include/linux/blkpg.h
new file mode 100644
index 0000000..45a4a47
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/blkpg.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLKPG_H
+#define _LINUX_BLKPG_H
+
+#include <linux/compiler.h>
+#include <linux/ioctl.h>
+
+#define BLKPG _IO(0x12,105)
+
+struct blkpg_ioctl_arg {
+ int op;
+ int flags;
+ int datalen;
+ void __user *data;
+};
+
+#define BLKPG_ADD_PARTITION 1
+#define BLKPG_DEL_PARTITION 2
+
+#define BLKPG_DEVNAMELTH 64
+#define BLKPG_VOLNAMELTH 64
+
+struct blkpg_partition {
+ long long start;
+ long long length;
+ int pno;
+ char devname[BLKPG_DEVNAMELTH];
+ char volname[BLKPG_VOLNAMELTH];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/blockgroup_lock.h b/6/platforms/android-3/arch-arm/usr/include/linux/blockgroup_lock.h
new file mode 100644
index 0000000..c814020
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLOCKGROUP_LOCK_H
+#define _LINUX_BLOCKGROUP_LOCK_H
+
+#include <linux/spinlock.h>
+#include <linux/cache.h>
+
+#define NR_BG_LOCKS 1
+
+struct bgl_lock {
+ spinlock_t lock;
+} ____cacheline_aligned_in_smp;
+
+struct blockgroup_lock {
+ struct bgl_lock locks[NR_BG_LOCKS];
+};
+
+#define sb_bgl_lock(sb, block_group) (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/big_endian.h
new file mode 100644
index 0000000..ee0d880
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H
+#define _LINUX_BYTEORDER_BIG_ENDIAN_H
+
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BIG_ENDIAN_BITFIELD
+#define __BIG_ENDIAN_BITFIELD
+#endif
+
+#include <linux/types.h>
+#include <linux/byteorder/swab.h>
+
+#define __constant_htonl(x) ((__force __be32)(__u32)(x))
+#define __constant_ntohl(x) ((__force __u32)(__be32)(x))
+#define __constant_htons(x) ((__force __be16)(__u16)(x))
+#define __constant_ntohs(x) ((__force __u16)(__be16)(x))
+#define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x)))
+#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x)))
+#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x)))
+#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x))
+#define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x))
+#define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x))
+#define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
+#define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
+#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
+#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
+#define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
+#define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
+#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
+
+#define __cpu_to_le64s(x) __swab64s((x))
+#define __le64_to_cpus(x) __swab64s((x))
+#define __cpu_to_le32s(x) __swab32s((x))
+#define __le32_to_cpus(x) __swab32s((x))
+#define __cpu_to_le16s(x) __swab16s((x))
+#define __le16_to_cpus(x) __swab16s((x))
+#define __cpu_to_be64s(x) do {} while (0)
+#define __be64_to_cpus(x) do {} while (0)
+#define __cpu_to_be32s(x) do {} while (0)
+#define __be32_to_cpus(x) do {} while (0)
+#define __cpu_to_be16s(x) do {} while (0)
+#define __be16_to_cpus(x) do {} while (0)
+#include <linux/byteorder/generic.h>
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/generic.h b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/generic.h
new file mode 100644
index 0000000..ac469ff
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/generic.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_GENERIC_H
+#define _LINUX_BYTEORDER_GENERIC_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/little_endian.h
new file mode 100644
index 0000000..2c26e9c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __LITTLE_ENDIAN_BITFIELD
+#define __LITTLE_ENDIAN_BITFIELD
+#endif
+
+#include <linux/types.h>
+#include <linux/byteorder/swab.h>
+
+#define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
+#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
+#define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
+#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
+#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
+#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
+#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
+#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
+#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
+#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
+#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
+#define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
+#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
+#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
+#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
+#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
+#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
+
+#define __cpu_to_le64s(x) do {} while (0)
+#define __le64_to_cpus(x) do {} while (0)
+#define __cpu_to_le32s(x) do {} while (0)
+#define __le32_to_cpus(x) do {} while (0)
+#define __cpu_to_le16s(x) do {} while (0)
+#define __le16_to_cpus(x) do {} while (0)
+#define __cpu_to_be64s(x) __swab64s((x))
+#define __be64_to_cpus(x) __swab64s((x))
+#define __cpu_to_be32s(x) __swab32s((x))
+#define __be32_to_cpus(x) __swab32s((x))
+#define __cpu_to_be16s(x) __swab16s((x))
+#define __be16_to_cpus(x) __swab16s((x))
+#include <linux/byteorder/generic.h>
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swab.h b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swab.h
new file mode 100644
index 0000000..37336b5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swab.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_SWAB_H
+#define _LINUX_BYTEORDER_SWAB_H
+
+#include <linux/compiler.h>
+
+#define ___swab16(x) ({ __u16 __x = (x); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); })
+
+#define ___swab32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); })
+
+#define ___swab64(x) ({ __u64 __x = (x); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); })
+
+#define ___constant_swab16(x) ((__u16)( (((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8) ))
+#define ___constant_swab32(x) ((__u32)( (((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
+#define ___constant_swab64(x) ((__u64)( (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
+
+#ifndef __arch__swab16
+#define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
+#endif
+#ifndef __arch__swab32
+#define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
+#endif
+#ifndef __arch__swab64
+#define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
+#endif
+
+#ifndef __arch__swab16p
+#define __arch__swab16p(x) __arch__swab16(*(x))
+#endif
+#ifndef __arch__swab32p
+#define __arch__swab32p(x) __arch__swab32(*(x))
+#endif
+#ifndef __arch__swab64p
+#define __arch__swab64p(x) __arch__swab64(*(x))
+#endif
+
+#ifndef __arch__swab16s
+#define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0)
+#endif
+#ifndef __arch__swab32s
+#define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0)
+#endif
+#ifndef __arch__swab64s
+#define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0)
+#endif
+
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
+#define __swab16(x) (__builtin_constant_p((__u16)(x)) ? ___swab16((x)) : __fswab16((x)))
+#define __swab32(x) (__builtin_constant_p((__u32)(x)) ? ___swab32((x)) : __fswab32((x)))
+#define __swab64(x) (__builtin_constant_p((__u64)(x)) ? ___swab64((x)) : __fswab64((x)))
+#else
+#define __swab16(x) __fswab16(x)
+#define __swab32(x) __fswab32(x)
+#define __swab64(x) __fswab64(x)
+#endif
+
+#ifdef __BYTEORDER_HAS_U64__
+#ifdef __SWAB_64_THRU_32__
+#else
+#endif
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swabb.h b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swabb.h
new file mode 100644
index 0000000..c5b6a3e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_SWABB_H
+#define _LINUX_BYTEORDER_SWABB_H
+
+#define ___swahw32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(__x) & (__u32)0xffff0000UL) >> 16) )); })
+#define ___swahb32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )); })
+
+#define ___constant_swahw32(x) ((__u32)( (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(x) & (__u32)0xffff0000UL) >> 16) ))
+#define ___constant_swahb32(x) ((__u32)( (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) ))
+
+#ifndef __arch__swahw32
+#define __arch__swahw32(x) ___swahw32(x)
+#endif
+#ifndef __arch__swahb32
+#define __arch__swahb32(x) ___swahb32(x)
+#endif
+
+#ifndef __arch__swahw32p
+#define __arch__swahw32p(x) __swahw32(*(x))
+#endif
+#ifndef __arch__swahb32p
+#define __arch__swahb32p(x) __swahb32(*(x))
+#endif
+
+#ifndef __arch__swahw32s
+#define __arch__swahw32s(x) do { *(x) = __swahw32p((x)); } while (0)
+#endif
+#ifndef __arch__swahb32s
+#define __arch__swahb32s(x) do { *(x) = __swahb32p((x)); } while (0)
+#endif
+
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
+#define __swahw32(x) (__builtin_constant_p((__u32)(x)) ? ___swahw32((x)) : __fswahw32((x)))
+#define __swahb32(x) (__builtin_constant_p((__u32)(x)) ? ___swahb32((x)) : __fswahb32((x)))
+#else
+#define __swahw32(x) __fswahw32(x)
+#define __swahb32(x) __fswahb32(x)
+#endif
+
+#ifdef __BYTEORDER_HAS_U64__
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/cache.h b/6/platforms/android-3/arch-arm/usr/include/linux/cache.h
new file mode 100644
index 0000000..d281855
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/cache.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CACHE_H
+#define __LINUX_CACHE_H
+
+#include <linux/kernel.h>
+#include <asm/cache.h>
+
+#ifndef L1_CACHE_ALIGN
+#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
+#endif
+
+#ifndef SMP_CACHE_BYTES
+#define SMP_CACHE_BYTES L1_CACHE_BYTES
+#endif
+
+#ifndef __read_mostly
+#define __read_mostly
+#endif
+
+#ifndef ____cacheline_aligned
+#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
+#endif
+
+#ifndef ____cacheline_aligned_in_smp
+#define ____cacheline_aligned_in_smp
+#endif
+
+#ifndef __cacheline_aligned
+#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES), __section__(".data.cacheline_aligned")))
+#endif
+
+#ifndef __cacheline_aligned_in_smp
+#define __cacheline_aligned_in_smp
+#endif
+
+#ifndef INTERNODE_CACHE_SHIFT
+#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT
+#endif
+
+#ifndef ____cacheline_internodealigned_in_smp
+#define ____cacheline_internodealigned_in_smp
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/calc64.h b/6/platforms/android-3/arch-arm/usr/include/linux/calc64.h
new file mode 100644
index 0000000..9f726aa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/calc64.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CALC64_H
+#define _LINUX_CALC64_H
+
+#include <linux/types.h>
+#include <asm/div64.h>
+
+#ifndef div_long_long_rem
+#define div_long_long_rem(dividend, divisor, remainder) do_div_llr((dividend), divisor, remainder)
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/capability.h b/6/platforms/android-3/arch-arm/usr/include/linux/capability.h
new file mode 100644
index 0000000..605bc27
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/capability.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CAPABILITY_H
+#define _LINUX_CAPABILITY_H
+
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+#define _LINUX_CAPABILITY_VERSION 0x19980330
+
+typedef struct __user_cap_header_struct {
+ __u32 version;
+ int pid;
+} __user *cap_user_header_t;
+
+typedef struct __user_cap_data_struct {
+ __u32 effective;
+ __u32 permitted;
+ __u32 inheritable;
+} __user *cap_user_data_t;
+
+#define CAP_CHOWN 0
+
+#define CAP_DAC_OVERRIDE 1
+
+#define CAP_DAC_READ_SEARCH 2
+
+#define CAP_FOWNER 3
+
+#define CAP_FSETID 4
+
+#define CAP_FS_MASK 0x1f
+
+#define CAP_KILL 5
+
+#define CAP_SETGID 6
+
+#define CAP_SETUID 7
+
+#define CAP_SETPCAP 8
+
+#define CAP_LINUX_IMMUTABLE 9
+
+#define CAP_NET_BIND_SERVICE 10
+
+#define CAP_NET_BROADCAST 11
+
+#define CAP_NET_ADMIN 12
+
+#define CAP_NET_RAW 13
+
+#define CAP_IPC_LOCK 14
+
+#define CAP_IPC_OWNER 15
+
+#define CAP_SYS_MODULE 16
+
+#define CAP_SYS_RAWIO 17
+
+#define CAP_SYS_CHROOT 18
+
+#define CAP_SYS_PTRACE 19
+
+#define CAP_SYS_PACCT 20
+
+#define CAP_SYS_ADMIN 21
+
+#define CAP_SYS_BOOT 22
+
+#define CAP_SYS_NICE 23
+
+#define CAP_SYS_RESOURCE 24
+
+#define CAP_SYS_TIME 25
+
+#define CAP_SYS_TTY_CONFIG 26
+
+#define CAP_MKNOD 27
+
+#define CAP_LEASE 28
+
+#define CAP_AUDIT_WRITE 29
+
+#define CAP_AUDIT_CONTROL 30
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/capi.h b/6/platforms/android-3/arch-arm/usr/include/linux/capi.h
new file mode 100644
index 0000000..5591cf6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/capi.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CAPI_H__
+#define __LINUX_CAPI_H__
+
+#include <asm/types.h>
+#include <linux/ioctl.h>
+#include <linux/kernelcapi.h>
+
+typedef struct capi_register_params {
+ __u32 level3cnt;
+ __u32 datablkcnt;
+ __u32 datablklen;
+} capi_register_params;
+
+#define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params)
+
+#define CAPI_MANUFACTURER_LEN 64
+
+#define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int)
+
+typedef struct capi_version {
+ __u32 majorversion;
+ __u32 minorversion;
+ __u32 majormanuversion;
+ __u32 minormanuversion;
+} capi_version;
+
+#define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version)
+
+#define CAPI_SERIAL_LEN 8
+#define CAPI_GET_SERIAL _IOWR('C',0x08,int)
+
+typedef struct capi_profile {
+ __u16 ncontroller;
+ __u16 nbchannel;
+ __u32 goptions;
+ __u32 support1;
+ __u32 support2;
+ __u32 support3;
+ __u32 reserved[6];
+ __u32 manu[5];
+} capi_profile;
+
+#define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile)
+
+typedef struct capi_manufacturer_cmd {
+ unsigned long cmd;
+ void __user *data;
+} capi_manufacturer_cmd;
+
+#define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd)
+
+#define CAPI_GET_ERRCODE _IOR('C',0x21, __u16)
+
+#define CAPI_INSTALLED _IOR('C',0x22, __u16)
+
+typedef union capi_ioctl_struct {
+ __u32 contr;
+ capi_register_params rparams;
+ __u8 manufacturer[CAPI_MANUFACTURER_LEN];
+ capi_version version;
+ __u8 serial[CAPI_SERIAL_LEN];
+ capi_profile profile;
+ capi_manufacturer_cmd cmd;
+ __u16 errcode;
+} capi_ioctl_struct;
+
+#define CAPIFLAG_HIGHJACKING 0x0001
+
+#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
+#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
+#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
+
+#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
+
+#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/cdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/cdev.h
new file mode 100644
index 0000000..7a71c7e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/cdev.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CDEV_H
+#define _LINUX_CDEV_H
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/cdrom.h b/6/platforms/android-3/arch-arm/usr/include/linux/cdrom.h
new file mode 100644
index 0000000..cc70c9f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/cdrom.h
@@ -0,0 +1,718 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CDROM_H
+#define _LINUX_CDROM_H
+
+#include <asm/byteorder.h>
+
+#define EDRIVE_CANT_DO_THIS EOPNOTSUPP
+
+#define CDROMPAUSE 0x5301
+#define CDROMRESUME 0x5302
+#define CDROMPLAYMSF 0x5303
+#define CDROMPLAYTRKIND 0x5304
+#define CDROMREADTOCHDR 0x5305
+#define CDROMREADTOCENTRY 0x5306
+#define CDROMSTOP 0x5307
+#define CDROMSTART 0x5308
+#define CDROMEJECT 0x5309
+#define CDROMVOLCTRL 0x530a
+#define CDROMSUBCHNL 0x530b
+#define CDROMREADMODE2 0x530c
+#define CDROMREADMODE1 0x530d
+#define CDROMREADAUDIO 0x530e
+#define CDROMEJECT_SW 0x530f
+#define CDROMMULTISESSION 0x5310
+#define CDROM_GET_MCN 0x5311
+#define CDROM_GET_UPC CDROM_GET_MCN
+#define CDROMRESET 0x5312
+#define CDROMVOLREAD 0x5313
+#define CDROMREADRAW 0x5314
+
+#define CDROMREADCOOKED 0x5315
+#define CDROMSEEK 0x5316
+
+#define CDROMPLAYBLK 0x5317
+
+#define CDROMREADALL 0x5318
+
+#define CDROMGETSPINDOWN 0x531d
+#define CDROMSETSPINDOWN 0x531e
+
+#define CDROMCLOSETRAY 0x5319
+#define CDROM_SET_OPTIONS 0x5320
+#define CDROM_CLEAR_OPTIONS 0x5321
+#define CDROM_SELECT_SPEED 0x5322
+#define CDROM_SELECT_DISC 0x5323
+#define CDROM_MEDIA_CHANGED 0x5325
+#define CDROM_DRIVE_STATUS 0x5326
+#define CDROM_DISC_STATUS 0x5327
+#define CDROM_CHANGER_NSLOTS 0x5328
+#define CDROM_LOCKDOOR 0x5329
+#define CDROM_DEBUG 0x5330
+#define CDROM_GET_CAPABILITY 0x5331
+
+#define CDROMAUDIOBUFSIZ 0x5382
+
+#define DVD_READ_STRUCT 0x5390
+#define DVD_WRITE_STRUCT 0x5391
+#define DVD_AUTH 0x5392
+
+#define CDROM_SEND_PACKET 0x5393
+#define CDROM_NEXT_WRITABLE 0x5394
+#define CDROM_LAST_WRITTEN 0x5395
+
+struct cdrom_msf0
+{
+ __u8 minute;
+ __u8 second;
+ __u8 frame;
+};
+
+union cdrom_addr
+{
+ struct cdrom_msf0 msf;
+ int lba;
+};
+
+struct cdrom_msf
+{
+ __u8 cdmsf_min0;
+ __u8 cdmsf_sec0;
+ __u8 cdmsf_frame0;
+ __u8 cdmsf_min1;
+ __u8 cdmsf_sec1;
+ __u8 cdmsf_frame1;
+};
+
+struct cdrom_ti
+{
+ __u8 cdti_trk0;
+ __u8 cdti_ind0;
+ __u8 cdti_trk1;
+ __u8 cdti_ind1;
+};
+
+struct cdrom_tochdr
+{
+ __u8 cdth_trk0;
+ __u8 cdth_trk1;
+};
+
+struct cdrom_volctrl
+{
+ __u8 channel0;
+ __u8 channel1;
+ __u8 channel2;
+ __u8 channel3;
+};
+
+struct cdrom_subchnl
+{
+ __u8 cdsc_format;
+ __u8 cdsc_audiostatus;
+ __u8 cdsc_adr: 4;
+ __u8 cdsc_ctrl: 4;
+ __u8 cdsc_trk;
+ __u8 cdsc_ind;
+ union cdrom_addr cdsc_absaddr;
+ union cdrom_addr cdsc_reladdr;
+};
+
+struct cdrom_tocentry
+{
+ __u8 cdte_track;
+ __u8 cdte_adr :4;
+ __u8 cdte_ctrl :4;
+ __u8 cdte_format;
+ union cdrom_addr cdte_addr;
+ __u8 cdte_datamode;
+};
+
+struct cdrom_read
+{
+ int cdread_lba;
+ char *cdread_bufaddr;
+ int cdread_buflen;
+};
+
+struct cdrom_read_audio
+{
+ union cdrom_addr addr;
+ __u8 addr_format;
+ int nframes;
+ __u8 __user *buf;
+};
+
+struct cdrom_multisession
+{
+ union cdrom_addr addr;
+ __u8 xa_flag;
+ __u8 addr_format;
+};
+
+struct cdrom_mcn
+{
+ __u8 medium_catalog_number[14];
+};
+
+struct cdrom_blk
+{
+ unsigned from;
+ unsigned short len;
+};
+
+#define CDROM_PACKET_SIZE 12
+
+#define CGC_DATA_UNKNOWN 0
+#define CGC_DATA_WRITE 1
+#define CGC_DATA_READ 2
+#define CGC_DATA_NONE 3
+
+struct cdrom_generic_command
+{
+ unsigned char cmd[CDROM_PACKET_SIZE];
+ unsigned char __user *buffer;
+ unsigned int buflen;
+ int stat;
+ struct request_sense __user *sense;
+ unsigned char data_direction;
+ int quiet;
+ int timeout;
+ void __user *reserved[1];
+};
+
+#define CD_MINS 74
+#define CD_SECS 60
+#define CD_FRAMES 75
+#define CD_SYNC_SIZE 12
+#define CD_MSF_OFFSET 150
+#define CD_CHUNK_SIZE 24
+#define CD_NUM_OF_CHUNKS 98
+#define CD_FRAMESIZE_SUB 96
+#define CD_HEAD_SIZE 4
+#define CD_SUBHEAD_SIZE 8
+#define CD_EDC_SIZE 4
+#define CD_ZERO_SIZE 8
+#define CD_ECC_SIZE 276
+#define CD_FRAMESIZE 2048
+#define CD_FRAMESIZE_RAW 2352
+#define CD_FRAMESIZE_RAWER 2646
+
+#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
+#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
+
+#define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
+#define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE)
+#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD)
+
+#define CDROM_LBA 0x01
+#define CDROM_MSF 0x02
+
+#define CDROM_DATA_TRACK 0x04
+
+#define CDROM_LEADOUT 0xAA
+
+#define CDROM_AUDIO_INVALID 0x00
+#define CDROM_AUDIO_PLAY 0x11
+#define CDROM_AUDIO_PAUSED 0x12
+#define CDROM_AUDIO_COMPLETED 0x13
+#define CDROM_AUDIO_ERROR 0x14
+#define CDROM_AUDIO_NO_STATUS 0x15
+
+#define CDC_CLOSE_TRAY 0x1
+#define CDC_OPEN_TRAY 0x2
+#define CDC_LOCK 0x4
+#define CDC_SELECT_SPEED 0x8
+#define CDC_SELECT_DISC 0x10
+#define CDC_MULTI_SESSION 0x20
+#define CDC_MCN 0x40
+#define CDC_MEDIA_CHANGED 0x80
+#define CDC_PLAY_AUDIO 0x100
+#define CDC_RESET 0x200
+#define CDC_DRIVE_STATUS 0x800
+#define CDC_GENERIC_PACKET 0x1000
+#define CDC_CD_R 0x2000
+#define CDC_CD_RW 0x4000
+#define CDC_DVD 0x8000
+#define CDC_DVD_R 0x10000
+#define CDC_DVD_RAM 0x20000
+#define CDC_MO_DRIVE 0x40000
+#define CDC_MRW 0x80000
+#define CDC_MRW_W 0x100000
+#define CDC_RAM 0x200000
+
+#define CDS_NO_INFO 0
+#define CDS_NO_DISC 1
+#define CDS_TRAY_OPEN 2
+#define CDS_DRIVE_NOT_READY 3
+#define CDS_DISC_OK 4
+
+#define CDS_AUDIO 100
+#define CDS_DATA_1 101
+#define CDS_DATA_2 102
+#define CDS_XA_2_1 103
+#define CDS_XA_2_2 104
+#define CDS_MIXED 105
+
+#define CDO_AUTO_CLOSE 0x1
+#define CDO_AUTO_EJECT 0x2
+#define CDO_USE_FFLAGS 0x4
+#define CDO_LOCK 0x8
+#define CDO_CHECK_TYPE 0x10
+
+#define CDSL_NONE ((int) (~0U>>1)-1)
+#define CDSL_CURRENT ((int) (~0U>>1))
+
+#define CD_PART_MAX 64
+#define CD_PART_MASK (CD_PART_MAX - 1)
+
+#define GPCMD_BLANK 0xa1
+#define GPCMD_CLOSE_TRACK 0x5b
+#define GPCMD_FLUSH_CACHE 0x35
+#define GPCMD_FORMAT_UNIT 0x04
+#define GPCMD_GET_CONFIGURATION 0x46
+#define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
+#define GPCMD_GET_PERFORMANCE 0xac
+#define GPCMD_INQUIRY 0x12
+#define GPCMD_LOAD_UNLOAD 0xa6
+#define GPCMD_MECHANISM_STATUS 0xbd
+#define GPCMD_MODE_SELECT_10 0x55
+#define GPCMD_MODE_SENSE_10 0x5a
+#define GPCMD_PAUSE_RESUME 0x4b
+#define GPCMD_PLAY_AUDIO_10 0x45
+#define GPCMD_PLAY_AUDIO_MSF 0x47
+#define GPCMD_PLAY_AUDIO_TI 0x48
+#define GPCMD_PLAY_CD 0xbc
+#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
+#define GPCMD_READ_10 0x28
+#define GPCMD_READ_12 0xa8
+#define GPCMD_READ_BUFFER_CAPACITY 0x5c
+#define GPCMD_READ_CDVD_CAPACITY 0x25
+#define GPCMD_READ_CD 0xbe
+#define GPCMD_READ_CD_MSF 0xb9
+#define GPCMD_READ_DISC_INFO 0x51
+#define GPCMD_READ_DVD_STRUCTURE 0xad
+#define GPCMD_READ_FORMAT_CAPACITIES 0x23
+#define GPCMD_READ_HEADER 0x44
+#define GPCMD_READ_TRACK_RZONE_INFO 0x52
+#define GPCMD_READ_SUBCHANNEL 0x42
+#define GPCMD_READ_TOC_PMA_ATIP 0x43
+#define GPCMD_REPAIR_RZONE_TRACK 0x58
+#define GPCMD_REPORT_KEY 0xa4
+#define GPCMD_REQUEST_SENSE 0x03
+#define GPCMD_RESERVE_RZONE_TRACK 0x53
+#define GPCMD_SEND_CUE_SHEET 0x5d
+#define GPCMD_SCAN 0xba
+#define GPCMD_SEEK 0x2b
+#define GPCMD_SEND_DVD_STRUCTURE 0xbf
+#define GPCMD_SEND_EVENT 0xa2
+#define GPCMD_SEND_KEY 0xa3
+#define GPCMD_SEND_OPC 0x54
+#define GPCMD_SET_READ_AHEAD 0xa7
+#define GPCMD_SET_STREAMING 0xb6
+#define GPCMD_START_STOP_UNIT 0x1b
+#define GPCMD_STOP_PLAY_SCAN 0x4e
+#define GPCMD_TEST_UNIT_READY 0x00
+#define GPCMD_VERIFY_10 0x2f
+#define GPCMD_WRITE_10 0x2a
+#define GPCMD_WRITE_AND_VERIFY_10 0x2e
+
+#define GPCMD_SET_SPEED 0xbb
+
+#define GPCMD_PLAYAUDIO_TI 0x48
+
+#define GPCMD_GET_MEDIA_STATUS 0xda
+
+#define GPMODE_VENDOR_PAGE 0x00
+#define GPMODE_R_W_ERROR_PAGE 0x01
+#define GPMODE_WRITE_PARMS_PAGE 0x05
+#define GPMODE_WCACHING_PAGE 0x08
+#define GPMODE_AUDIO_CTL_PAGE 0x0e
+#define GPMODE_POWER_PAGE 0x1a
+#define GPMODE_FAULT_FAIL_PAGE 0x1c
+#define GPMODE_TO_PROTECT_PAGE 0x1d
+#define GPMODE_CAPABILITIES_PAGE 0x2a
+#define GPMODE_ALL_PAGES 0x3f
+
+#define GPMODE_CDROM_PAGE 0x0d
+
+#define DVD_STRUCT_PHYSICAL 0x00
+#define DVD_STRUCT_COPYRIGHT 0x01
+#define DVD_STRUCT_DISCKEY 0x02
+#define DVD_STRUCT_BCA 0x03
+#define DVD_STRUCT_MANUFACT 0x04
+
+struct dvd_layer {
+ __u8 book_version : 4;
+ __u8 book_type : 4;
+ __u8 min_rate : 4;
+ __u8 disc_size : 4;
+ __u8 layer_type : 4;
+ __u8 track_path : 1;
+ __u8 nlayers : 2;
+ __u8 track_density : 4;
+ __u8 linear_density : 4;
+ __u8 bca : 1;
+ __u32 start_sector;
+ __u32 end_sector;
+ __u32 end_sector_l0;
+};
+
+#define DVD_LAYERS 4
+
+struct dvd_physical {
+ __u8 type;
+ __u8 layer_num;
+ struct dvd_layer layer[DVD_LAYERS];
+};
+
+struct dvd_copyright {
+ __u8 type;
+
+ __u8 layer_num;
+ __u8 cpst;
+ __u8 rmi;
+};
+
+struct dvd_disckey {
+ __u8 type;
+
+ unsigned agid : 2;
+ __u8 value[2048];
+};
+
+struct dvd_bca {
+ __u8 type;
+
+ int len;
+ __u8 value[188];
+};
+
+struct dvd_manufact {
+ __u8 type;
+
+ __u8 layer_num;
+ int len;
+ __u8 value[2048];
+};
+
+typedef union {
+ __u8 type;
+
+ struct dvd_physical physical;
+ struct dvd_copyright copyright;
+ struct dvd_disckey disckey;
+ struct dvd_bca bca;
+ struct dvd_manufact manufact;
+} dvd_struct;
+
+#define DVD_LU_SEND_AGID 0
+#define DVD_HOST_SEND_CHALLENGE 1
+#define DVD_LU_SEND_KEY1 2
+#define DVD_LU_SEND_CHALLENGE 3
+#define DVD_HOST_SEND_KEY2 4
+
+#define DVD_AUTH_ESTABLISHED 5
+#define DVD_AUTH_FAILURE 6
+
+#define DVD_LU_SEND_TITLE_KEY 7
+#define DVD_LU_SEND_ASF 8
+#define DVD_INVALIDATE_AGID 9
+#define DVD_LU_SEND_RPC_STATE 10
+#define DVD_HOST_SEND_RPC_STATE 11
+
+typedef __u8 dvd_key[5];
+typedef __u8 dvd_challenge[10];
+
+struct dvd_lu_send_agid {
+ __u8 type;
+ unsigned agid : 2;
+};
+
+struct dvd_host_send_challenge {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_challenge chal;
+};
+
+struct dvd_send_key {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_key key;
+};
+
+struct dvd_lu_send_challenge {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_challenge chal;
+};
+
+#define DVD_CPM_NO_COPYRIGHT 0
+#define DVD_CPM_COPYRIGHTED 1
+
+#define DVD_CP_SEC_NONE 0
+#define DVD_CP_SEC_EXIST 1
+
+#define DVD_CGMS_UNRESTRICTED 0
+#define DVD_CGMS_SINGLE 2
+#define DVD_CGMS_RESTRICTED 3
+
+struct dvd_lu_send_title_key {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_key title_key;
+ int lba;
+ unsigned cpm : 1;
+ unsigned cp_sec : 1;
+ unsigned cgms : 2;
+};
+
+struct dvd_lu_send_asf {
+ __u8 type;
+ unsigned agid : 2;
+
+ unsigned asf : 1;
+};
+
+struct dvd_host_send_rpcstate {
+ __u8 type;
+ __u8 pdrc;
+};
+
+struct dvd_lu_send_rpcstate {
+ __u8 type : 2;
+ __u8 vra : 3;
+ __u8 ucca : 3;
+ __u8 region_mask;
+ __u8 rpc_scheme;
+};
+
+typedef union {
+ __u8 type;
+
+ struct dvd_lu_send_agid lsa;
+ struct dvd_host_send_challenge hsc;
+ struct dvd_send_key lsk;
+ struct dvd_lu_send_challenge lsc;
+ struct dvd_send_key hsk;
+ struct dvd_lu_send_title_key lstk;
+ struct dvd_lu_send_asf lsasf;
+ struct dvd_host_send_rpcstate hrpcs;
+ struct dvd_lu_send_rpcstate lrpcs;
+} dvd_authinfo;
+
+struct request_sense {
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 valid : 1;
+ __u8 error_code : 7;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 error_code : 7;
+ __u8 valid : 1;
+#endif
+ __u8 segment_number;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 ili : 1;
+ __u8 reserved2 : 1;
+ __u8 sense_key : 4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 sense_key : 4;
+ __u8 reserved2 : 1;
+ __u8 ili : 1;
+ __u8 reserved1 : 2;
+#endif
+ __u8 information[4];
+ __u8 add_sense_len;
+ __u8 command_info[4];
+ __u8 asc;
+ __u8 ascq;
+ __u8 fruc;
+ __u8 sks[3];
+ __u8 asb[46];
+};
+
+#define CDF_RWRT 0x0020
+#define CDF_HWDM 0x0024
+#define CDF_MRW 0x0028
+
+#define CDM_MRW_NOTMRW 0
+#define CDM_MRW_BGFORMAT_INACTIVE 1
+#define CDM_MRW_BGFORMAT_ACTIVE 2
+#define CDM_MRW_BGFORMAT_COMPLETE 3
+
+#define MRW_LBA_DMA 0
+#define MRW_LBA_GAA 1
+
+#define MRW_MODE_PC_PRE1 0x2c
+#define MRW_MODE_PC 0x03
+
+struct mrw_feature_desc {
+ __u16 feature_code;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 feature_version : 4;
+ __u8 persistent : 1;
+ __u8 curr : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 curr : 1;
+ __u8 persistent : 1;
+ __u8 feature_version : 4;
+ __u8 reserved1 : 2;
+#endif
+ __u8 add_len;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 7;
+ __u8 write : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 write : 1;
+ __u8 reserved2 : 7;
+#endif
+ __u8 reserved3;
+ __u8 reserved4;
+ __u8 reserved5;
+};
+
+struct rwrt_feature_desc {
+ __u16 feature_code;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 feature_version : 4;
+ __u8 persistent : 1;
+ __u8 curr : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 curr : 1;
+ __u8 persistent : 1;
+ __u8 feature_version : 4;
+ __u8 reserved1 : 2;
+#endif
+ __u8 add_len;
+ __u32 last_lba;
+ __u32 block_size;
+ __u16 blocking;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 7;
+ __u8 page_present : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 page_present : 1;
+ __u8 reserved2 : 7;
+#endif
+ __u8 reserved3;
+};
+
+typedef struct {
+ __u16 disc_information_length;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 3;
+ __u8 erasable : 1;
+ __u8 border_status : 2;
+ __u8 disc_status : 2;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 disc_status : 2;
+ __u8 border_status : 2;
+ __u8 erasable : 1;
+ __u8 reserved1 : 3;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 n_first_track;
+ __u8 n_sessions_lsb;
+ __u8 first_track_lsb;
+ __u8 last_track_lsb;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 did_v : 1;
+ __u8 dbc_v : 1;
+ __u8 uru : 1;
+ __u8 reserved2 : 2;
+ __u8 dbit : 1;
+ __u8 mrw_status : 2;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 mrw_status : 2;
+ __u8 dbit : 1;
+ __u8 reserved2 : 2;
+ __u8 uru : 1;
+ __u8 dbc_v : 1;
+ __u8 did_v : 1;
+#endif
+ __u8 disc_type;
+ __u8 n_sessions_msb;
+ __u8 first_track_msb;
+ __u8 last_track_msb;
+ __u32 disc_id;
+ __u32 lead_in;
+ __u32 lead_out;
+ __u8 disc_bar_code[8];
+ __u8 reserved3;
+ __u8 n_opc;
+} disc_information;
+
+typedef struct {
+ __u16 track_information_length;
+ __u8 track_lsb;
+ __u8 session_lsb;
+ __u8 reserved1;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 2;
+ __u8 damage : 1;
+ __u8 copy : 1;
+ __u8 track_mode : 4;
+ __u8 rt : 1;
+ __u8 blank : 1;
+ __u8 packet : 1;
+ __u8 fp : 1;
+ __u8 data_mode : 4;
+ __u8 reserved3 : 6;
+ __u8 lra_v : 1;
+ __u8 nwa_v : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 track_mode : 4;
+ __u8 copy : 1;
+ __u8 damage : 1;
+ __u8 reserved2 : 2;
+ __u8 data_mode : 4;
+ __u8 fp : 1;
+ __u8 packet : 1;
+ __u8 blank : 1;
+ __u8 rt : 1;
+ __u8 nwa_v : 1;
+ __u8 lra_v : 1;
+ __u8 reserved3 : 6;
+#endif
+ __u32 track_start;
+ __u32 next_writable;
+ __u32 free_blocks;
+ __u32 fixed_packet_size;
+ __u32 track_size;
+ __u32 last_rec_address;
+} track_information;
+
+struct feature_header {
+ __u32 data_len;
+ __u8 reserved1;
+ __u8 reserved2;
+ __u16 curr_profile;
+};
+
+struct mode_page_header {
+ __u16 mode_data_length;
+ __u8 medium_type;
+ __u8 reserved1;
+ __u8 reserved2;
+ __u8 reserved3;
+ __u16 desc_length;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/circ_buf.h b/6/platforms/android-3/arch-arm/usr/include/linux/circ_buf.h
new file mode 100644
index 0000000..438250c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/circ_buf.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CIRC_BUF_H
+#define _LINUX_CIRC_BUF_H 1
+
+struct circ_buf {
+ char *buf;
+ int head;
+ int tail;
+};
+
+#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))
+
+#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
+
+#define CIRC_CNT_TO_END(head,tail,size) ({int end = (size) - (tail); int n = ((head) + end) & ((size)-1); n < end ? n : end;})
+
+#define CIRC_SPACE_TO_END(head,tail,size) ({int end = (size) - 1 - (head); int n = (end + (tail)) & ((size)-1); n <= end ? n : end+1;})
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/clk.h b/6/platforms/android-3/arch-arm/usr/include/linux/clk.h
new file mode 100644
index 0000000..2b8f436
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/clk.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CLK_H
+#define __LINUX_CLK_H
+
+struct device;
+
+struct clk;
+
+struct clk *clk_get(struct device *dev, const char *id);
+
+struct clk *clk_get_parent(struct clk *clk);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/coda.h b/6/platforms/android-3/arch-arm/usr/include/linux/coda.h
new file mode 100644
index 0000000..e7e89f9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/coda.h
@@ -0,0 +1,594 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _CODA_HEADER_
+#define _CODA_HEADER_
+
+#if defined(__NetBSD__) || (defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)
+#include <sys/types.h>
+#endif
+
+#ifndef CODA_MAXSYMLINKS
+#define CODA_MAXSYMLINKS 10
+#endif
+
+#if defined(DJGPP) || defined(__CYGWIN32__)
+#ifdef KERNEL
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef u_long ino_t;
+typedef u_long dev_t;
+typedef void * caddr_t;
+#ifdef DOS
+typedef unsigned __int64 u_quad_t;
+#else
+typedef unsigned long long u_quad_t;
+#endif
+
+#define inline
+
+struct timespec {
+ long ts_sec;
+ long ts_nsec;
+};
+#else
+#include <sys/time.h>
+typedef unsigned long long u_quad_t;
+#endif
+#endif
+
+#ifdef __linux__
+#include <linux/time.h>
+#define cdev_t u_quad_t
+#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
+#define _UQUAD_T_ 1
+typedef unsigned long long u_quad_t;
+#endif
+#else
+#define cdev_t dev_t
+#endif
+
+#ifdef __CYGWIN32__
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+#ifndef __BIT_TYPES_DEFINED__
+#define __BIT_TYPES_DEFINED__
+typedef signed char int8_t;
+typedef unsigned char u_int8_t;
+typedef short int16_t;
+typedef unsigned short u_int16_t;
+typedef int int32_t;
+typedef unsigned int u_int32_t;
+#endif
+
+#define CODA_MAXNAMLEN 255
+#define CODA_MAXPATHLEN 1024
+#define CODA_MAXSYMLINK 10
+
+#define C_O_READ 0x001
+#define C_O_WRITE 0x002
+#define C_O_TRUNC 0x010
+#define C_O_EXCL 0x100
+#define C_O_CREAT 0x200
+
+#define C_M_READ 00400
+#define C_M_WRITE 00200
+
+#define C_A_C_OK 8
+#define C_A_R_OK 4
+#define C_A_W_OK 2
+#define C_A_X_OK 1
+#define C_A_F_OK 0
+
+#ifndef _VENUS_DIRENT_T_
+#define _VENUS_DIRENT_T_ 1
+struct venus_dirent {
+ u_int32_t d_fileno;
+ u_int16_t d_reclen;
+ u_int8_t d_type;
+ u_int8_t d_namlen;
+ char d_name[CODA_MAXNAMLEN + 1];
+};
+#undef DIRSIZ
+#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
+
+#define CDT_UNKNOWN 0
+#define CDT_FIFO 1
+#define CDT_CHR 2
+#define CDT_DIR 4
+#define CDT_BLK 6
+#define CDT_REG 8
+#define CDT_LNK 10
+#define CDT_SOCK 12
+#define CDT_WHT 14
+
+#define IFTOCDT(mode) (((mode) & 0170000) >> 12)
+#define CDTTOIF(dirtype) ((dirtype) << 12)
+
+#endif
+
+#ifndef _VUID_T_
+#define _VUID_T_
+typedef u_int32_t vuid_t;
+typedef u_int32_t vgid_t;
+#endif
+
+struct CodaFid {
+ u_int32_t opaque[4];
+};
+
+#define coda_f2i(fid) (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
+
+#ifndef _VENUS_VATTR_T_
+#define _VENUS_VATTR_T_
+
+enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
+
+struct coda_vattr {
+ long va_type;
+ u_short va_mode;
+ short va_nlink;
+ vuid_t va_uid;
+ vgid_t va_gid;
+ long va_fileid;
+ u_quad_t va_size;
+ long va_blocksize;
+ struct timespec va_atime;
+ struct timespec va_mtime;
+ struct timespec va_ctime;
+ u_long va_gen;
+ u_long va_flags;
+ cdev_t va_rdev;
+ u_quad_t va_bytes;
+ u_quad_t va_filerev;
+};
+
+#endif
+
+struct coda_statfs {
+ int32_t f_blocks;
+ int32_t f_bfree;
+ int32_t f_bavail;
+ int32_t f_files;
+ int32_t f_ffree;
+};
+
+#define CODA_ROOT 2
+#define CODA_OPEN_BY_FD 3
+#define CODA_OPEN 4
+#define CODA_CLOSE 5
+#define CODA_IOCTL 6
+#define CODA_GETATTR 7
+#define CODA_SETATTR 8
+#define CODA_ACCESS 9
+#define CODA_LOOKUP 10
+#define CODA_CREATE 11
+#define CODA_REMOVE 12
+#define CODA_LINK 13
+#define CODA_RENAME 14
+#define CODA_MKDIR 15
+#define CODA_RMDIR 16
+#define CODA_SYMLINK 18
+#define CODA_READLINK 19
+#define CODA_FSYNC 20
+#define CODA_VGET 22
+#define CODA_SIGNAL 23
+#define CODA_REPLACE 24
+#define CODA_FLUSH 25
+#define CODA_PURGEUSER 26
+#define CODA_ZAPFILE 27
+#define CODA_ZAPDIR 28
+#define CODA_PURGEFID 30
+#define CODA_OPEN_BY_PATH 31
+#define CODA_RESOLVE 32
+#define CODA_REINTEGRATE 33
+#define CODA_STATFS 34
+#define CODA_STORE 35
+#define CODA_RELEASE 36
+#define CODA_NCALLS 37
+
+#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
+
+#define VC_MAXDATASIZE 8192
+#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) + VC_MAXDATASIZE
+
+#define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
+
+#define CODA_KERNEL_VERSION 3
+
+struct coda_in_hdr {
+ u_int32_t opcode;
+ u_int32_t unique;
+ pid_t pid;
+ pid_t pgid;
+ vuid_t uid;
+};
+
+struct coda_out_hdr {
+ u_int32_t opcode;
+ u_int32_t unique;
+ u_int32_t result;
+};
+
+struct coda_root_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+};
+
+struct coda_root_in {
+ struct coda_in_hdr in;
+};
+
+struct coda_open_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_out {
+ struct coda_out_hdr oh;
+ cdev_t dev;
+ ino_t inode;
+};
+
+struct coda_store_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_store_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_release_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_release_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_close_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_close_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_ioctl_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int cmd;
+ int len;
+ int rwflag;
+ char *data;
+};
+
+struct coda_ioctl_out {
+ struct coda_out_hdr oh;
+ int len;
+ caddr_t data;
+};
+
+struct coda_getattr_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_getattr_out {
+ struct coda_out_hdr oh;
+ struct coda_vattr attr;
+};
+
+struct coda_setattr_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_setattr_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_access_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_access_out {
+ struct coda_out_hdr out;
+};
+
+#define CLU_CASE_SENSITIVE 0x01
+#define CLU_CASE_INSENSITIVE 0x02
+
+struct coda_lookup_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+ int flags;
+};
+
+struct coda_lookup_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ int vtype;
+};
+
+struct coda_create_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+ int excl;
+ int mode;
+ int name;
+};
+
+struct coda_create_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_remove_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+};
+
+struct coda_remove_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_link_in {
+ struct coda_in_hdr ih;
+ struct CodaFid sourceFid;
+ struct CodaFid destFid;
+ int tname;
+};
+
+struct coda_link_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_rename_in {
+ struct coda_in_hdr ih;
+ struct CodaFid sourceFid;
+ int srcname;
+ struct CodaFid destFid;
+ int destname;
+};
+
+struct coda_rename_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_mkdir_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+ int name;
+};
+
+struct coda_mkdir_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_rmdir_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+};
+
+struct coda_rmdir_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_symlink_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int srcname;
+ struct coda_vattr attr;
+ int tname;
+};
+
+struct coda_symlink_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_readlink_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_readlink_out {
+ struct coda_out_hdr oh;
+ int count;
+ caddr_t data;
+};
+
+struct coda_fsync_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_fsync_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_vget_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_vget_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ int vtype;
+};
+
+struct coda_purgeuser_out {
+ struct coda_out_hdr oh;
+ vuid_t uid;
+};
+
+struct coda_zapfile_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_zapdir_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_purgefid_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_replace_out {
+ struct coda_out_hdr oh;
+ struct CodaFid NewFid;
+ struct CodaFid OldFid;
+};
+
+struct coda_open_by_fd_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_by_fd_out {
+ struct coda_out_hdr oh;
+ int fd;
+
+};
+
+struct coda_open_by_path_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_by_path_out {
+ struct coda_out_hdr oh;
+ int path;
+};
+
+struct coda_statfs_in {
+ struct coda_in_hdr in;
+};
+
+struct coda_statfs_out {
+ struct coda_out_hdr oh;
+ struct coda_statfs stat;
+};
+
+#define CODA_NOCACHE 0x80000000
+
+union inputArgs {
+ struct coda_in_hdr ih;
+ struct coda_open_in coda_open;
+ struct coda_store_in coda_store;
+ struct coda_release_in coda_release;
+ struct coda_close_in coda_close;
+ struct coda_ioctl_in coda_ioctl;
+ struct coda_getattr_in coda_getattr;
+ struct coda_setattr_in coda_setattr;
+ struct coda_access_in coda_access;
+ struct coda_lookup_in coda_lookup;
+ struct coda_create_in coda_create;
+ struct coda_remove_in coda_remove;
+ struct coda_link_in coda_link;
+ struct coda_rename_in coda_rename;
+ struct coda_mkdir_in coda_mkdir;
+ struct coda_rmdir_in coda_rmdir;
+ struct coda_symlink_in coda_symlink;
+ struct coda_readlink_in coda_readlink;
+ struct coda_fsync_in coda_fsync;
+ struct coda_vget_in coda_vget;
+ struct coda_open_by_fd_in coda_open_by_fd;
+ struct coda_open_by_path_in coda_open_by_path;
+ struct coda_statfs_in coda_statfs;
+};
+
+union outputArgs {
+ struct coda_out_hdr oh;
+ struct coda_root_out coda_root;
+ struct coda_open_out coda_open;
+ struct coda_ioctl_out coda_ioctl;
+ struct coda_getattr_out coda_getattr;
+ struct coda_lookup_out coda_lookup;
+ struct coda_create_out coda_create;
+ struct coda_mkdir_out coda_mkdir;
+ struct coda_readlink_out coda_readlink;
+ struct coda_vget_out coda_vget;
+ struct coda_purgeuser_out coda_purgeuser;
+ struct coda_zapfile_out coda_zapfile;
+ struct coda_zapdir_out coda_zapdir;
+ struct coda_purgefid_out coda_purgefid;
+ struct coda_replace_out coda_replace;
+ struct coda_open_by_fd_out coda_open_by_fd;
+ struct coda_open_by_path_out coda_open_by_path;
+ struct coda_statfs_out coda_statfs;
+};
+
+union coda_downcalls {
+
+ struct coda_purgeuser_out purgeuser;
+ struct coda_zapfile_out zapfile;
+ struct coda_zapdir_out zapdir;
+ struct coda_purgefid_out purgefid;
+ struct coda_replace_out replace;
+};
+
+#define PIOCPARM_MASK 0x0000ffff
+struct ViceIoctl {
+ void __user *in;
+ void __user *out;
+ u_short in_size;
+ u_short out_size;
+};
+
+struct PioctlData {
+ const char __user *path;
+ int follow;
+ struct ViceIoctl vi;
+};
+
+#define CODA_CONTROL ".CONTROL"
+#define CODA_CONTROLLEN 8
+#define CTL_INO -1
+
+#define CODA_MOUNT_VERSION 1
+
+struct coda_mount_data {
+ int version;
+ int fd;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/coda_fs_i.h b/6/platforms/android-3/arch-arm/usr/include/linux/coda_fs_i.h
new file mode 100644
index 0000000..28b0e59
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/coda_fs_i.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CODA_FS_I
+#define _LINUX_CODA_FS_I
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/compat.h b/6/platforms/android-3/arch-arm/usr/include/linux/compat.h
new file mode 100644
index 0000000..d30b550
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/compat.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_COMPAT_H
+#define _LINUX_COMPAT_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/compiler-gcc.h b/6/platforms/android-3/arch-arm/usr/include/linux/compiler-gcc.h
new file mode 100644
index 0000000..0dd4a62
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/compiler-gcc.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define barrier() __asm__ __volatile__("": : :"memory")
+
+#define RELOC_HIDE(ptr, off) ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(ptr)); (typeof(ptr)) (__ptr + (off)); })
+
+#define inline inline __attribute__((always_inline))
+#define __inline__ __inline__ __attribute__((always_inline))
+#define __inline __inline __attribute__((always_inline))
+#define __deprecated __attribute__((deprecated))
+#define noinline __attribute__((noinline))
+#define __attribute_pure__ __attribute__((pure))
+#define __attribute_const__ __attribute__((__const__))
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/compiler.h b/6/platforms/android-3/arch-arm/usr/include/linux/compiler.h
new file mode 100644
index 0000000..4055e33
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/compiler.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+#ifndef __ASSEMBLY__
+
+#define __user
+#define __kernel
+#define __safe
+#define __force
+#define __nocast
+#define __iomem
+#define __chk_user_ptr(x) (void)0
+#define __chk_io_ptr(x) (void)0
+#define __builtin_warning(x, y...) (1)
+#define __acquires(x)
+#define __releases(x)
+#define __acquire(x) (void)0
+#define __release(x) (void)0
+#define __cond_lock(x) (x)
+
+#endif
+
+#ifndef __attribute_const__
+#define __attribute_const__
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/completion.h b/6/platforms/android-3/arch-arm/usr/include/linux/completion.h
new file mode 100644
index 0000000..ee18211
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/completion.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_COMPLETION_H
+#define __LINUX_COMPLETION_H
+
+#include <linux/wait.h>
+
+struct completion {
+ unsigned int done;
+ wait_queue_head_t wait;
+};
+
+#define COMPLETION_INITIALIZER(work) { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
+
+#define COMPLETION_INITIALIZER_ONSTACK(work) ({ init_completion(&work); work; })
+
+#define DECLARE_COMPLETION(work) struct completion work = COMPLETION_INITIALIZER(work)
+
+#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
+
+#define INIT_COMPLETION(x) ((x).done = 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/config.h b/6/platforms/android-3/arch-arm/usr/include/linux/config.h
new file mode 100644
index 0000000..7aa1056
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/config.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CONFIG_H
+#define _LINUX_CONFIG_H
+
+#include <linux/autoconf.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/console_struct.h b/6/platforms/android-3/arch-arm/usr/include/linux/console_struct.h
new file mode 100644
index 0000000..50e4cbe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/console_struct.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/wait.h>
+#include <linux/vt.h>
+
+struct vt_struct;
+
+#define NPAR 16
+
+struct vc_data {
+ unsigned short vc_num;
+ unsigned int vc_cols;
+ unsigned int vc_rows;
+ unsigned int vc_size_row;
+ unsigned int vc_scan_lines;
+ unsigned long vc_origin;
+ unsigned long vc_scr_end;
+ unsigned long vc_visible_origin;
+ unsigned int vc_top, vc_bottom;
+ const struct consw *vc_sw;
+ unsigned short *vc_screenbuf;
+ unsigned int vc_screenbuf_size;
+ unsigned char vc_mode;
+
+ unsigned char vc_attr;
+ unsigned char vc_def_color;
+ unsigned char vc_color;
+ unsigned char vc_s_color;
+ unsigned char vc_ulcolor;
+ unsigned char vc_halfcolor;
+
+ unsigned int vc_cursor_type;
+ unsigned short vc_complement_mask;
+ unsigned short vc_s_complement_mask;
+ unsigned int vc_x, vc_y;
+ unsigned int vc_saved_x, vc_saved_y;
+ unsigned long vc_pos;
+
+ unsigned short vc_hi_font_mask;
+ struct console_font vc_font;
+ unsigned short vc_video_erase_char;
+
+ unsigned int vc_state;
+ unsigned int vc_npar,vc_par[NPAR];
+ struct tty_struct *vc_tty;
+
+ struct vt_mode vt_mode;
+ int vt_pid;
+ int vt_newvt;
+ wait_queue_head_t paste_wait;
+
+ unsigned int vc_charset : 1;
+ unsigned int vc_s_charset : 1;
+ unsigned int vc_disp_ctrl : 1;
+ unsigned int vc_toggle_meta : 1;
+ unsigned int vc_decscnm : 1;
+ unsigned int vc_decom : 1;
+ unsigned int vc_decawm : 1;
+ unsigned int vc_deccm : 1;
+ unsigned int vc_decim : 1;
+ unsigned int vc_deccolm : 1;
+
+ unsigned int vc_intensity : 2;
+ unsigned int vc_underline : 1;
+ unsigned int vc_blink : 1;
+ unsigned int vc_reverse : 1;
+ unsigned int vc_s_intensity : 2;
+ unsigned int vc_s_underline : 1;
+ unsigned int vc_s_blink : 1;
+ unsigned int vc_s_reverse : 1;
+
+ unsigned int vc_ques : 1;
+ unsigned int vc_need_wrap : 1;
+ unsigned int vc_can_do_color : 1;
+ unsigned int vc_report_mouse : 2;
+ unsigned int vc_kmalloced : 1;
+ unsigned char vc_utf : 1;
+ unsigned char vc_utf_count;
+ int vc_utf_char;
+ unsigned int vc_tab_stop[8];
+ unsigned char vc_palette[16*3];
+ unsigned short * vc_translate;
+ unsigned char vc_G0_charset;
+ unsigned char vc_G1_charset;
+ unsigned char vc_saved_G0;
+ unsigned char vc_saved_G1;
+ unsigned int vc_bell_pitch;
+ unsigned int vc_bell_duration;
+ struct vc_data **vc_display_fg;
+ unsigned long vc_uni_pagedir;
+ unsigned long *vc_uni_pagedir_loc;
+
+};
+
+struct vc {
+ struct vc_data *d;
+
+};
+
+#define CUR_DEF 0
+#define CUR_NONE 1
+#define CUR_UNDERLINE 2
+#define CUR_LOWER_THIRD 3
+#define CUR_LOWER_HALF 4
+#define CUR_TWO_THIRDS 5
+#define CUR_BLOCK 6
+#define CUR_HWMASK 0x0f
+#define CUR_SWMASK 0xfff0
+
+#define CUR_DEFAULT CUR_UNDERLINE
+
+#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/cpu.h b/6/platforms/android-3/arch-arm/usr/include/linux/cpu.h
new file mode 100644
index 0000000..f7e3889
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/cpu.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CPU_H_
+#define _LINUX_CPU_H_
+
+#include <linux/sysdev.h>
+#include <linux/node.h>
+#include <linux/compiler.h>
+#include <linux/cpumask.h>
+#include <asm/semaphore.h>
+
+struct cpu {
+ int node_id;
+ int no_control;
+ struct sys_device sysdev;
+};
+
+struct notifier_block;
+
+#define lock_cpu_hotplug() do { } while (0)
+#define unlock_cpu_hotplug() do { } while (0)
+#define lock_cpu_hotplug_interruptible() 0
+#define hotcpu_notifier(fn, pri) do { } while (0)
+#define register_hotcpu_notifier(nb) do { } while (0)
+#define unregister_hotcpu_notifier(nb) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/cpumask.h b/6/platforms/android-3/arch-arm/usr/include/linux/cpumask.h
new file mode 100644
index 0000000..541940a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/cpumask.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CPUMASK_H
+#define __LINUX_CPUMASK_H
+
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/bitmap.h>
+
+typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
+#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
+#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
+#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
+#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
+#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
+#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
+#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_andnot(dst, src1, src2) __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
+#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
+#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
+#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
+#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
+#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
+#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
+#define cpus_shift_right(dst, src, n) __cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
+#define cpus_shift_left(dst, src, n) __cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
+#define first_cpu(src) 0
+#define next_cpu(n, src) 1
+#define cpumask_of_cpu(cpu) ({ typeof(_unused_cpumask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(cpu); } else { cpus_clear(m); cpu_set((cpu), m); } m; })
+#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
+#if NR_CPUS <= BITS_PER_LONG
+#define CPU_MASK_ALL (cpumask_t) { { [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD } }
+#else
+#define CPU_MASK_ALL (cpumask_t) { { [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD } }
+#endif
+#define CPU_MASK_NONE (cpumask_t) { { [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL } }
+#define CPU_MASK_CPU0 (cpumask_t) { { [0] = 1UL } }
+#define cpus_addr(src) ((src).bits)
+#define cpumask_scnprintf(buf, len, src) __cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
+#define cpumask_parse(ubuf, ulen, dst) __cpumask_parse((ubuf), (ulen), &(dst), NR_CPUS)
+#define cpulist_scnprintf(buf, len, src) __cpulist_scnprintf((buf), (len), &(src), NR_CPUS)
+#define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS)
+#define cpu_remap(oldbit, old, new) __cpu_remap((oldbit), &(old), &(new), NR_CPUS)
+#define cpus_remap(dst, src, old, new) __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS)
+#if NR_CPUS > 1
+#define for_each_cpu_mask(cpu, mask) for ((cpu) = first_cpu(mask); (cpu) < NR_CPUS; (cpu) = next_cpu((cpu), (mask)))
+#else
+#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
+#endif
+
+#if NR_CPUS > 1
+#define num_online_cpus() cpus_weight(cpu_online_map)
+#define num_possible_cpus() cpus_weight(cpu_possible_map)
+#define num_present_cpus() cpus_weight(cpu_present_map)
+#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map)
+#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map)
+#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map)
+#else
+#define num_online_cpus() 1
+#define num_possible_cpus() 1
+#define num_present_cpus() 1
+#define cpu_online(cpu) ((cpu) == 0)
+#define cpu_possible(cpu) ((cpu) == 0)
+#define cpu_present(cpu) ((cpu) == 0)
+#endif
+
+#define highest_possible_processor_id() 0
+#define any_online_cpu(mask) 0
+
+#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
+#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
+#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ctype.h b/6/platforms/android-3/arch-arm/usr/include/linux/ctype.h
new file mode 100644
index 0000000..4644d12
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ctype.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CTYPE_H
+#define _LINUX_CTYPE_H
+
+#define _U 0x01
+#define _L 0x02
+#define _D 0x04
+#define _C 0x08
+#define _P 0x10
+#define _S 0x20
+#define _X 0x40
+#define _SP 0x80
+
+#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
+
+#define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0)
+#define isalpha(c) ((__ismask(c)&(_U|_L)) != 0)
+#define iscntrl(c) ((__ismask(c)&(_C)) != 0)
+#define isdigit(c) ((__ismask(c)&(_D)) != 0)
+#define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0)
+#define islower(c) ((__ismask(c)&(_L)) != 0)
+#define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
+#define ispunct(c) ((__ismask(c)&(_P)) != 0)
+#define isspace(c) ((__ismask(c)&(_S)) != 0)
+#define isupper(c) ((__ismask(c)&(_U)) != 0)
+#define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0)
+
+#define isascii(c) (((unsigned char)(c))<=0x7f)
+#define toascii(c) (((unsigned char)(c))&0x7f)
+
+#define tolower(c) __tolower(c)
+#define toupper(c) __toupper(c)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/dccp.h b/6/platforms/android-3/arch-arm/usr/include/linux/dccp.h
new file mode 100644
index 0000000..5e33777
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/dccp.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DCCP_H
+#define _LINUX_DCCP_H
+
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+struct dccp_hdr {
+ __be16 dccph_sport,
+ dccph_dport;
+ __u8 dccph_doff;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 dccph_cscov:4,
+ dccph_ccval:4;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 dccph_ccval:4,
+ dccph_cscov:4;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u16 dccph_checksum;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 dccph_x:1,
+ dccph_type:4,
+ dccph_reserved:3;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 dccph_reserved:3,
+ dccph_type:4,
+ dccph_x:1;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u8 dccph_seq2;
+ __be16 dccph_seq;
+};
+
+struct dccp_hdr_ext {
+ __be32 dccph_seq_low;
+};
+
+struct dccp_hdr_request {
+ __be32 dccph_req_service;
+};
+
+struct dccp_hdr_ack_bits {
+ __be16 dccph_reserved1;
+ __be16 dccph_ack_nr_high;
+ __be32 dccph_ack_nr_low;
+};
+
+struct dccp_hdr_response {
+ struct dccp_hdr_ack_bits dccph_resp_ack;
+ __be32 dccph_resp_service;
+};
+
+struct dccp_hdr_reset {
+ struct dccp_hdr_ack_bits dccph_reset_ack;
+ __u8 dccph_reset_code,
+ dccph_reset_data[3];
+};
+
+enum dccp_pkt_type {
+ DCCP_PKT_REQUEST = 0,
+ DCCP_PKT_RESPONSE,
+ DCCP_PKT_DATA,
+ DCCP_PKT_ACK,
+ DCCP_PKT_DATAACK,
+ DCCP_PKT_CLOSEREQ,
+ DCCP_PKT_CLOSE,
+ DCCP_PKT_RESET,
+ DCCP_PKT_SYNC,
+ DCCP_PKT_SYNCACK,
+ DCCP_PKT_INVALID,
+};
+
+#define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID
+
+enum {
+ DCCPO_PADDING = 0,
+ DCCPO_MANDATORY = 1,
+ DCCPO_MIN_RESERVED = 3,
+ DCCPO_MAX_RESERVED = 31,
+ DCCPO_CHANGE_L = 32,
+ DCCPO_CONFIRM_L = 33,
+ DCCPO_CHANGE_R = 34,
+ DCCPO_CONFIRM_R = 35,
+ DCCPO_NDP_COUNT = 37,
+ DCCPO_ACK_VECTOR_0 = 38,
+ DCCPO_ACK_VECTOR_1 = 39,
+ DCCPO_TIMESTAMP = 41,
+ DCCPO_TIMESTAMP_ECHO = 42,
+ DCCPO_ELAPSED_TIME = 43,
+ DCCPO_MAX = 45,
+ DCCPO_MIN_CCID_SPECIFIC = 128,
+ DCCPO_MAX_CCID_SPECIFIC = 255,
+};
+
+enum {
+ DCCPF_RESERVED = 0,
+ DCCPF_CCID = 1,
+ DCCPF_SEQUENCE_WINDOW = 3,
+ DCCPF_ACK_RATIO = 5,
+ DCCPF_SEND_ACK_VECTOR = 6,
+ DCCPF_SEND_NDP_COUNT = 7,
+
+ DCCPF_MIN_CCID_SPECIFIC = 128,
+ DCCPF_MAX_CCID_SPECIFIC = 255,
+};
+
+struct dccp_so_feat {
+ __u8 dccpsf_feat;
+ __u8 *dccpsf_val;
+ __u8 dccpsf_len;
+};
+
+#define DCCP_SOCKOPT_PACKET_SIZE 1
+#define DCCP_SOCKOPT_SERVICE 2
+#define DCCP_SOCKOPT_CHANGE_L 3
+#define DCCP_SOCKOPT_CHANGE_R 4
+#define DCCP_SOCKOPT_CCID_RX_INFO 128
+#define DCCP_SOCKOPT_CCID_TX_INFO 192
+
+#define DCCP_SERVICE_LIST_MAX_LEN 32
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/debug_locks.h b/6/platforms/android-3/arch-arm/usr/include/linux/debug_locks.h
new file mode 100644
index 0000000..2d55fcd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/debug_locks.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_DEBUG_LOCKING_H
+#define __LINUX_DEBUG_LOCKING_H
+
+struct task_struct;
+
+#define _RET_IP_ (unsigned long)__builtin_return_address(0)
+#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
+
+#define DEBUG_LOCKS_WARN_ON(c) ({ int __ret = 0; if (unlikely(c)) { if (debug_locks_off()) WARN_ON(1); __ret = 1; } __ret; })
+
+#define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0)
+
+#define locking_selftest() do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/delay.h b/6/platforms/android-3/arch-arm/usr/include/linux/delay.h
new file mode 100644
index 0000000..e032b6f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/delay.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DELAY_H
+#define _LINUX_DELAY_H
+
+#include <asm/delay.h>
+
+#ifndef MAX_UDELAY_MS
+#define MAX_UDELAY_MS 5
+#endif
+
+#ifndef mdelay
+#define mdelay(n) ( (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : ({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
+#endif
+
+#ifndef ndelay
+#define ndelay(x) udelay(((x)+999)/1000)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/device.h b/6/platforms/android-3/arch-arm/usr/include/linux/device.h
new file mode 100644
index 0000000..6419322
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/device.h
@@ -0,0 +1,222 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _DEVICE_H_
+#define _DEVICE_H_
+
+#include <linux/ioport.h>
+#include <linux/kobject.h>
+#include <linux/klist.h>
+#include <linux/list.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <asm/semaphore.h>
+#include <asm/atomic.h>
+
+#define DEVICE_NAME_SIZE 50
+#define DEVICE_NAME_HALF __stringify(20)
+#define DEVICE_ID_SIZE 32
+#define BUS_ID_SIZE KOBJ_NAME_LEN
+
+struct device;
+struct device_driver;
+struct class;
+struct class_device;
+
+struct bus_type {
+ const char * name;
+
+ struct subsystem subsys;
+ struct kset drivers;
+ struct kset devices;
+ struct klist klist_devices;
+ struct klist klist_drivers;
+
+ struct bus_attribute * bus_attrs;
+ struct device_attribute * dev_attrs;
+ struct driver_attribute * drv_attrs;
+
+ int (*match)(struct device * dev, struct device_driver * drv);
+ int (*uevent)(struct device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+ int (*probe)(struct device * dev);
+ int (*remove)(struct device * dev);
+ void (*shutdown)(struct device * dev);
+ int (*suspend)(struct device * dev, pm_message_t state);
+ int (*resume)(struct device * dev);
+};
+
+struct device * bus_find_device(struct bus_type *bus, struct device *start,
+ void *data, int (*match)(struct device *, void *));
+
+struct bus_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct bus_type *, char * buf);
+ ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
+};
+
+#define BUS_ATTR(_name,_mode,_show,_store) struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device_driver {
+ const char * name;
+ struct bus_type * bus;
+
+ struct completion unloaded;
+ struct kobject kobj;
+ struct klist klist_devices;
+ struct klist_node knode_bus;
+
+ struct module * owner;
+
+ int (*probe) (struct device * dev);
+ int (*remove) (struct device * dev);
+ void (*shutdown) (struct device * dev);
+ int (*suspend) (struct device * dev, pm_message_t state);
+ int (*resume) (struct device * dev);
+};
+
+struct driver_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct device_driver *, char * buf);
+ ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
+};
+
+#define DRIVER_ATTR(_name,_mode,_show,_store) struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device * driver_find_device(struct device_driver *drv,
+ struct device *start, void *data,
+ int (*match)(struct device *, void *));
+
+struct class {
+ const char * name;
+ struct module * owner;
+
+ struct subsystem subsys;
+ struct list_head children;
+ struct list_head devices;
+ struct list_head interfaces;
+ struct semaphore sem;
+
+ struct class_attribute * class_attrs;
+ struct class_device_attribute * class_dev_attrs;
+
+ int (*uevent)(struct class_device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+
+ void (*release)(struct class_device *dev);
+ void (*class_release)(struct class *class);
+};
+
+struct class_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct class *, char * buf);
+ ssize_t (*store)(struct class *, const char * buf, size_t count);
+};
+
+#define CLASS_ATTR(_name,_mode,_show,_store) struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct class_device_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct class_device *, char * buf);
+ ssize_t (*store)(struct class_device *, const char * buf, size_t count);
+};
+
+#define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) struct class_device_attribute class_device_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct class_device {
+ struct list_head node;
+
+ struct kobject kobj;
+ struct class * class;
+ dev_t devt;
+ struct class_device_attribute *devt_attr;
+ struct class_device_attribute uevent_attr;
+ struct device * dev;
+ void * class_data;
+ struct class_device *parent;
+ struct attribute_group ** groups;
+
+ void (*release)(struct class_device *dev);
+ int (*uevent)(struct class_device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+ char class_id[BUS_ID_SIZE];
+};
+
+struct class_interface {
+ struct list_head node;
+ struct class *class;
+
+ int (*add) (struct class_device *, struct class_interface *);
+ void (*remove) (struct class_device *, struct class_interface *);
+};
+
+struct device_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct device *dev, struct device_attribute *attr,
+ char *buf);
+ ssize_t (*store)(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count);
+};
+
+#define DEVICE_ATTR(_name,_mode,_show,_store) struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device {
+ struct klist klist_children;
+ struct klist_node knode_parent;
+ struct klist_node knode_driver;
+ struct klist_node knode_bus;
+ struct device * parent;
+
+ struct kobject kobj;
+ char bus_id[BUS_ID_SIZE];
+ struct device_attribute uevent_attr;
+ struct device_attribute *devt_attr;
+
+ struct semaphore sem;
+
+ struct bus_type * bus;
+ struct device_driver *driver;
+ void *driver_data;
+ void *platform_data;
+ void *firmware_data;
+ struct dev_pm_info power;
+
+ u64 *dma_mask;
+ u64 coherent_dma_mask;
+
+ struct list_head dma_pools;
+
+ struct dma_coherent_mem *dma_mem;
+
+ struct list_head node;
+ struct class *class;
+ dev_t devt;
+
+ void (*release)(struct device * dev);
+};
+
+#define dev_printk(level, dev, format, arg...) printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
+
+#ifdef DEBUG
+#define dev_dbg(dev, format, arg...) dev_printk(KERN_DEBUG , dev , format , ## arg)
+#else
+#define dev_dbg(dev, format, arg...) do { (void)(dev); } while (0)
+#endif
+
+#define dev_err(dev, format, arg...) dev_printk(KERN_ERR , dev , format , ## arg)
+#define dev_info(dev, format, arg...) dev_printk(KERN_INFO , dev , format , ## arg)
+#define dev_warn(dev, format, arg...) dev_printk(KERN_WARNING , dev , format , ## arg)
+#define dev_notice(dev, format, arg...) dev_printk(KERN_NOTICE , dev , format , ## arg)
+
+#define MODULE_ALIAS_CHARDEV(major,minor) MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
+#define MODULE_ALIAS_CHARDEV_MAJOR(major) MODULE_ALIAS("char-major-" __stringify(major) "-*")
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/dirent.h b/6/platforms/android-3/arch-arm/usr/include/linux/dirent.h
new file mode 100644
index 0000000..2dace18
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/dirent.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DIRENT_H
+#define _LINUX_DIRENT_H
+
+struct dirent {
+ long d_ino;
+ __kernel_off_t d_off;
+ unsigned short d_reclen;
+ char d_name[256];
+};
+
+struct dirent64 {
+ __u64 d_ino;
+ __s64 d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/dm-ioctl.h b/6/platforms/android-3/arch-arm/usr/include/linux/dm-ioctl.h
new file mode 100644
index 0000000..ead7744
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/dm-ioctl.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DM_IOCTL_V4_H
+#define _LINUX_DM_IOCTL_V4_H
+
+#include <linux/types.h>
+
+#define DM_DIR "mapper"
+#define DM_MAX_TYPE_NAME 16
+#define DM_NAME_LEN 128
+#define DM_UUID_LEN 129
+
+struct dm_ioctl {
+
+ uint32_t version[3];
+ uint32_t data_size;
+
+ uint32_t data_start;
+
+ uint32_t target_count;
+ int32_t open_count;
+ uint32_t flags;
+ uint32_t event_nr;
+ uint32_t padding;
+
+ uint64_t dev;
+
+ char name[DM_NAME_LEN];
+ char uuid[DM_UUID_LEN];
+ char data[7];
+};
+
+struct dm_target_spec {
+ uint64_t sector_start;
+ uint64_t length;
+ int32_t status;
+
+ uint32_t next;
+
+ char target_type[DM_MAX_TYPE_NAME];
+
+};
+
+struct dm_target_deps {
+ uint32_t count;
+ uint32_t padding;
+ uint64_t dev[0];
+};
+
+struct dm_name_list {
+ uint64_t dev;
+ uint32_t next;
+ char name[0];
+};
+
+struct dm_target_versions {
+ uint32_t next;
+ uint32_t version[3];
+
+ char name[0];
+};
+
+struct dm_target_msg {
+ uint64_t sector;
+
+ char message[0];
+};
+
+enum {
+
+ DM_VERSION_CMD = 0,
+ DM_REMOVE_ALL_CMD,
+ DM_LIST_DEVICES_CMD,
+
+ DM_DEV_CREATE_CMD,
+ DM_DEV_REMOVE_CMD,
+ DM_DEV_RENAME_CMD,
+ DM_DEV_SUSPEND_CMD,
+ DM_DEV_STATUS_CMD,
+ DM_DEV_WAIT_CMD,
+
+ DM_TABLE_LOAD_CMD,
+ DM_TABLE_CLEAR_CMD,
+ DM_TABLE_DEPS_CMD,
+ DM_TABLE_STATUS_CMD,
+
+ DM_LIST_VERSIONS_CMD,
+ DM_TARGET_MSG_CMD,
+ DM_DEV_SET_GEOMETRY_CMD
+};
+
+#define DM_IOCTL 0xfd
+
+#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
+#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
+
+#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
+#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
+#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
+#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
+#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
+#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
+
+#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
+#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
+#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
+#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
+
+#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
+
+#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
+#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 14
+#define DM_VERSION_PATCHLEVEL 0
+#define DM_VERSION_EXTRA "-ioctl (2008-04-23)"
+
+#define DM_READONLY_FLAG (1 << 0)
+#define DM_SUSPEND_FLAG (1 << 1)
+#define DM_PERSISTENT_DEV_FLAG (1 << 3)
+
+#define DM_STATUS_TABLE_FLAG (1 << 4)
+
+#define DM_ACTIVE_PRESENT_FLAG (1 << 5)
+#define DM_INACTIVE_PRESENT_FLAG (1 << 6)
+
+#define DM_BUFFER_FULL_FLAG (1 << 8)
+
+#define DM_SKIP_BDGET_FLAG (1 << 9)
+
+#define DM_SKIP_LOCKFS_FLAG (1 << 10)
+
+#define DM_NOFLUSH_FLAG (1 << 11)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/dma-mapping.h b/6/platforms/android-3/arch-arm/usr/include/linux/dma-mapping.h
new file mode 100644
index 0000000..6432259
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/dma-mapping.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_LINUX_DMA_MAPPING_H
+#define _ASM_LINUX_DMA_MAPPING_H
+
+#include <linux/device.h>
+#include <linux/err.h>
+
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
+
+#define DMA_64BIT_MASK 0xffffffffffffffffULL
+#define DMA_48BIT_MASK 0x0000ffffffffffffULL
+#define DMA_40BIT_MASK 0x000000ffffffffffULL
+#define DMA_39BIT_MASK 0x0000007fffffffffULL
+#define DMA_32BIT_MASK 0x00000000ffffffffULL
+#define DMA_31BIT_MASK 0x000000007fffffffULL
+#define DMA_30BIT_MASK 0x000000003fffffffULL
+#define DMA_29BIT_MASK 0x000000001fffffffULL
+#define DMA_28BIT_MASK 0x000000000fffffffULL
+#define DMA_24BIT_MASK 0x0000000000ffffffULL
+
+#include <asm/dma-mapping.h>
+
+#define dma_sync_single dma_sync_single_for_cpu
+#define dma_sync_sg dma_sync_sg_for_cpu
+
+#define DMA_MEMORY_MAP 0x01
+#define DMA_MEMORY_IO 0x02
+#define DMA_MEMORY_INCLUDES_CHILDREN 0x04
+#define DMA_MEMORY_EXCLUSIVE 0x08
+
+#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/dmaengine.h b/6/platforms/android-3/arch-arm/usr/include/linux/dmaengine.h
new file mode 100644
index 0000000..549fea9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/dmaengine.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef DMAENGINE_H
+#define DMAENGINE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/efs_dir.h b/6/platforms/android-3/arch-arm/usr/include/linux/efs_dir.h
new file mode 100644
index 0000000..5be2762
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/efs_dir.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_DIR_H__
+#define __EFS_DIR_H__
+
+#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
+#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
+
+struct efs_dentry {
+ __be32 inode;
+ unsigned char namelen;
+ char name[3];
+};
+
+#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1)
+#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1)
+
+#define EFS_DIRBLK_HEADERSIZE 4
+#define EFS_DIRBLK_MAGIC 0xbeef
+
+struct efs_dir {
+ __be16 magic;
+ unsigned char firstused;
+ unsigned char slots;
+
+ unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE];
+};
+
+#define EFS_MAXENTS ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / (EFS_DENTSIZE + sizeof(char)))
+
+#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot])
+
+#define EFS_REALOFF(offset) ((offset << 1))
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_i.h b/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_i.h
new file mode 100644
index 0000000..6d88d28
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_i.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_FS_I_H__
+#define __EFS_FS_I_H__
+
+typedef int32_t efs_block_t;
+typedef uint32_t efs_ino_t;
+
+#define EFS_DIRECTEXTENTS 12
+
+typedef union extent_u {
+ unsigned char raw[8];
+ struct extent_s {
+ unsigned int ex_magic:8;
+ unsigned int ex_bn:24;
+ unsigned int ex_length:8;
+ unsigned int ex_offset:24;
+ } cooked;
+} efs_extent;
+
+typedef struct edevs {
+ __be16 odev;
+ __be32 ndev;
+} efs_devs;
+
+struct efs_dinode {
+ __be16 di_mode;
+ __be16 di_nlink;
+ __be16 di_uid;
+ __be16 di_gid;
+ __be32 di_size;
+ __be32 di_atime;
+ __be32 di_mtime;
+ __be32 di_ctime;
+ __be32 di_gen;
+ __be16 di_numextents;
+ u_char di_version;
+ u_char di_spare;
+ union di_addr {
+ efs_extent di_extents[EFS_DIRECTEXTENTS];
+ efs_devs di_dev;
+ } di_u;
+};
+
+struct efs_inode_info {
+ int numextents;
+ int lastextent;
+
+ efs_extent extents[EFS_DIRECTEXTENTS];
+ struct inode vfs_inode;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_sb.h b/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_sb.h
new file mode 100644
index 0000000..f7960c0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_FS_SB_H__
+#define __EFS_FS_SB_H__
+
+#define EFS_SUPER_MAGIC 0x414A53
+
+#define EFS_MAGIC 0x072959
+#define EFS_NEWMAGIC 0x07295a
+
+#define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
+
+#define EFS_SUPER 1
+#define EFS_ROOTINODE 2
+
+struct efs_super {
+ __be32 fs_size;
+ __be32 fs_firstcg;
+ __be32 fs_cgfsize;
+ __be16 fs_cgisize;
+ __be16 fs_sectors;
+ __be16 fs_heads;
+ __be16 fs_ncg;
+ __be16 fs_dirty;
+ __be32 fs_time;
+ __be32 fs_magic;
+ char fs_fname[6];
+ char fs_fpack[6];
+ __be32 fs_bmsize;
+ __be32 fs_tfree;
+ __be32 fs_tinode;
+ __be32 fs_bmblock;
+ __be32 fs_replsb;
+ __be32 fs_lastialloc;
+ char fs_spare[20];
+ __be32 fs_checksum;
+};
+
+struct efs_sb_info {
+ __u32 fs_magic;
+ __u32 fs_start;
+ __u32 first_block;
+ __u32 total_blocks;
+ __u32 group_size;
+ __u32 data_free;
+ __u32 inode_free;
+ __u16 inode_blocks;
+ __u16 total_groups;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/elevator.h b/6/platforms/android-3/arch-arm/usr/include/linux/elevator.h
new file mode 100644
index 0000000..2e79ce9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/elevator.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELEVATOR_H
+#define _LINUX_ELEVATOR_H
+
+typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
+ struct bio *);
+
+typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *);
+
+typedef void (elevator_merged_fn) (request_queue_t *, struct request *);
+
+typedef int (elevator_dispatch_fn) (request_queue_t *, int);
+
+typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_queue_empty_fn) (request_queue_t *);
+typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
+typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *);
+
+typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t);
+typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
+typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
+typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
+
+typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
+typedef void (elevator_exit_fn) (elevator_t *);
+
+struct elevator_ops
+{
+ elevator_merge_fn *elevator_merge_fn;
+ elevator_merged_fn *elevator_merged_fn;
+ elevator_merge_req_fn *elevator_merge_req_fn;
+
+ elevator_dispatch_fn *elevator_dispatch_fn;
+ elevator_add_req_fn *elevator_add_req_fn;
+ elevator_activate_req_fn *elevator_activate_req_fn;
+ elevator_deactivate_req_fn *elevator_deactivate_req_fn;
+
+ elevator_queue_empty_fn *elevator_queue_empty_fn;
+ elevator_completed_req_fn *elevator_completed_req_fn;
+
+ elevator_request_list_fn *elevator_former_req_fn;
+ elevator_request_list_fn *elevator_latter_req_fn;
+
+ elevator_set_req_fn *elevator_set_req_fn;
+ elevator_put_req_fn *elevator_put_req_fn;
+
+ elevator_may_queue_fn *elevator_may_queue_fn;
+
+ elevator_init_fn *elevator_init_fn;
+ elevator_exit_fn *elevator_exit_fn;
+ void (*trim)(struct io_context *);
+};
+
+#define ELV_NAME_MAX (16)
+
+struct elv_fs_entry {
+ struct attribute attr;
+ ssize_t (*show)(elevator_t *, char *);
+ ssize_t (*store)(elevator_t *, const char *, size_t);
+};
+
+struct elevator_type
+{
+ struct list_head list;
+ struct elevator_ops ops;
+ struct elevator_type *elevator_type;
+ struct elv_fs_entry *elevator_attrs;
+ char elevator_name[ELV_NAME_MAX];
+ struct module *elevator_owner;
+};
+
+struct elevator_queue
+{
+ struct elevator_ops *ops;
+ void *elevator_data;
+ struct kobject kobj;
+ struct elevator_type *elevator_type;
+ struct mutex sysfs_lock;
+};
+
+#define ELEVATOR_NO_MERGE 0
+#define ELEVATOR_FRONT_MERGE 1
+#define ELEVATOR_BACK_MERGE 2
+
+#define ELEVATOR_INSERT_FRONT 1
+#define ELEVATOR_INSERT_BACK 2
+#define ELEVATOR_INSERT_SORT 3
+#define ELEVATOR_INSERT_REQUEUE 4
+
+enum {
+ ELV_MQUEUE_MAY,
+ ELV_MQUEUE_NO,
+ ELV_MQUEUE_MUST,
+};
+
+#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/elf-em.h b/6/platforms/android-3/arch-arm/usr/include/linux/elf-em.h
new file mode 100644
index 0000000..e151fdf
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/elf-em.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELF_EM_H
+#define _LINUX_ELF_EM_H
+
+#define EM_NONE 0
+#define EM_M32 1
+#define EM_SPARC 2
+#define EM_386 3
+#define EM_68K 4
+#define EM_88K 5
+#define EM_486 6
+#define EM_860 7
+#define EM_MIPS 8
+
+#define EM_MIPS_RS3_LE 10
+#define EM_MIPS_RS4_BE 10
+
+#define EM_PARISC 15
+#define EM_SPARC32PLUS 18
+#define EM_PPC 20
+#define EM_PPC64 21
+#define EM_SH 42
+#define EM_SPARCV9 43
+#define EM_IA_64 50
+#define EM_X86_64 62
+#define EM_S390 22
+#define EM_CRIS 76
+#define EM_V850 87
+#define EM_M32R 88
+#define EM_H8_300 46
+#define EM_FRV 0x5441
+
+#define EM_ALPHA 0x9026
+
+#define EM_CYGNUS_V850 0x9080
+
+#define EM_CYGNUS_M32R 0x9041
+
+#define EM_S390_OLD 0xA390
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/elf.h b/6/platforms/android-3/arch-arm/usr/include/linux/elf.h
new file mode 100644
index 0000000..f16b439
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/elf.h
@@ -0,0 +1,361 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELF_H
+#define _LINUX_ELF_H
+
+#include <linux/types.h>
+#include <linux/auxvec.h>
+#include <linux/elf-em.h>
+#include <asm/elf.h>
+
+#ifndef elf_read_implies_exec
+
+#define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
+#endif
+
+typedef __u32 Elf32_Addr;
+typedef __u16 Elf32_Half;
+typedef __u32 Elf32_Off;
+typedef __s32 Elf32_Sword;
+typedef __u32 Elf32_Word;
+
+typedef __u64 Elf64_Addr;
+typedef __u16 Elf64_Half;
+typedef __s16 Elf64_SHalf;
+typedef __u64 Elf64_Off;
+typedef __s32 Elf64_Sword;
+typedef __u32 Elf64_Word;
+typedef __u64 Elf64_Xword;
+typedef __s64 Elf64_Sxword;
+
+#define PT_NULL 0
+#define PT_LOAD 1
+#define PT_DYNAMIC 2
+#define PT_INTERP 3
+#define PT_NOTE 4
+#define PT_SHLIB 5
+#define PT_PHDR 6
+#define PT_TLS 7
+#define PT_LOOS 0x60000000
+#define PT_HIOS 0x6fffffff
+#define PT_LOPROC 0x70000000
+#define PT_HIPROC 0x7fffffff
+#define PT_GNU_EH_FRAME 0x6474e550
+
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+
+#define ET_NONE 0
+#define ET_REL 1
+#define ET_EXEC 2
+#define ET_DYN 3
+#define ET_CORE 4
+#define ET_LOPROC 0xff00
+#define ET_HIPROC 0xffff
+
+#define DT_NULL 0
+#define DT_NEEDED 1
+#define DT_PLTRELSZ 2
+#define DT_PLTGOT 3
+#define DT_HASH 4
+#define DT_STRTAB 5
+#define DT_SYMTAB 6
+#define DT_RELA 7
+#define DT_RELASZ 8
+#define DT_RELAENT 9
+#define DT_STRSZ 10
+#define DT_SYMENT 11
+#define DT_INIT 12
+#define DT_FINI 13
+#define DT_SONAME 14
+#define DT_RPATH 15
+#define DT_SYMBOLIC 16
+#define DT_REL 17
+#define DT_RELSZ 18
+#define DT_RELENT 19
+#define DT_PLTREL 20
+#define DT_DEBUG 21
+#define DT_TEXTREL 22
+#define DT_JMPREL 23
+#define DT_LOPROC 0x70000000
+#define DT_HIPROC 0x7fffffff
+
+#define STB_LOCAL 0
+#define STB_GLOBAL 1
+#define STB_WEAK 2
+
+#define STT_NOTYPE 0
+#define STT_OBJECT 1
+#define STT_FUNC 2
+#define STT_SECTION 3
+#define STT_FILE 4
+#define STT_COMMON 5
+#define STT_TLS 6
+
+#define ELF_ST_BIND(x) ((x) >> 4)
+#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF32_ST_BIND(x) ELF_ST_BIND(x)
+#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
+#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
+#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
+
+typedef struct dynamic{
+ Elf32_Sword d_tag;
+ union{
+ Elf32_Sword d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+ Elf64_Sxword d_tag;
+ union {
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
+ } d_un;
+} Elf64_Dyn;
+
+#define ELF32_R_SYM(x) ((x) >> 8)
+#define ELF32_R_TYPE(x) ((x) & 0xff)
+
+#define ELF64_R_SYM(i) ((i) >> 32)
+#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
+
+typedef struct elf32_rel {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+} Elf32_Rel;
+
+typedef struct elf64_rel {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+} Elf64_Rel;
+
+typedef struct elf32_rela{
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+typedef struct elf64_rela {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+ Elf64_Sxword r_addend;
+} Elf64_Rela;
+
+typedef struct elf32_sym{
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf32_Half st_shndx;
+} Elf32_Sym;
+
+typedef struct elf64_sym {
+ Elf64_Word st_name;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf64_Half st_shndx;
+ Elf64_Addr st_value;
+ Elf64_Xword st_size;
+} Elf64_Sym;
+
+#define EI_NIDENT 16
+
+typedef struct elf32_hdr{
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry;
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shstrndx;
+} Elf32_Ehdr;
+
+typedef struct elf64_hdr {
+ unsigned char e_ident[16];
+ Elf64_Half e_type;
+ Elf64_Half e_machine;
+ Elf64_Word e_version;
+ Elf64_Addr e_entry;
+ Elf64_Off e_phoff;
+ Elf64_Off e_shoff;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shstrndx;
+} Elf64_Ehdr;
+
+#define PF_R 0x4
+#define PF_W 0x2
+#define PF_X 0x1
+
+typedef struct elf32_phdr{
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
+} Elf32_Phdr;
+
+typedef struct elf64_phdr {
+ Elf64_Word p_type;
+ Elf64_Word p_flags;
+ Elf64_Off p_offset;
+ Elf64_Addr p_vaddr;
+ Elf64_Addr p_paddr;
+ Elf64_Xword p_filesz;
+ Elf64_Xword p_memsz;
+ Elf64_Xword p_align;
+} Elf64_Phdr;
+
+#define SHT_NULL 0
+#define SHT_PROGBITS 1
+#define SHT_SYMTAB 2
+#define SHT_STRTAB 3
+#define SHT_RELA 4
+#define SHT_HASH 5
+#define SHT_DYNAMIC 6
+#define SHT_NOTE 7
+#define SHT_NOBITS 8
+#define SHT_REL 9
+#define SHT_SHLIB 10
+#define SHT_DYNSYM 11
+#define SHT_NUM 12
+#define SHT_LOPROC 0x70000000
+#define SHT_HIPROC 0x7fffffff
+#define SHT_LOUSER 0x80000000
+#define SHT_HIUSER 0xffffffff
+
+#define SHF_WRITE 0x1
+#define SHF_ALLOC 0x2
+#define SHF_EXECINSTR 0x4
+#define SHF_MASKPROC 0xf0000000
+
+#define SHN_UNDEF 0
+#define SHN_LORESERVE 0xff00
+#define SHN_LOPROC 0xff00
+#define SHN_HIPROC 0xff1f
+#define SHN_ABS 0xfff1
+#define SHN_COMMON 0xfff2
+#define SHN_HIRESERVE 0xffff
+
+typedef struct {
+ Elf32_Word sh_name;
+ Elf32_Word sh_type;
+ Elf32_Word sh_flags;
+ Elf32_Addr sh_addr;
+ Elf32_Off sh_offset;
+ Elf32_Word sh_size;
+ Elf32_Word sh_link;
+ Elf32_Word sh_info;
+ Elf32_Word sh_addralign;
+ Elf32_Word sh_entsize;
+} Elf32_Shdr;
+
+typedef struct elf64_shdr {
+ Elf64_Word sh_name;
+ Elf64_Word sh_type;
+ Elf64_Xword sh_flags;
+ Elf64_Addr sh_addr;
+ Elf64_Off sh_offset;
+ Elf64_Xword sh_size;
+ Elf64_Word sh_link;
+ Elf64_Word sh_info;
+ Elf64_Xword sh_addralign;
+ Elf64_Xword sh_entsize;
+} Elf64_Shdr;
+
+#define EI_MAG0 0
+#define EI_MAG1 1
+#define EI_MAG2 2
+#define EI_MAG3 3
+#define EI_CLASS 4
+#define EI_DATA 5
+#define EI_VERSION 6
+#define EI_OSABI 7
+#define EI_PAD 8
+
+#define ELFMAG0 0x7f
+#define ELFMAG1 'E'
+#define ELFMAG2 'L'
+#define ELFMAG3 'F'
+#define ELFMAG "\177ELF"
+#define SELFMAG 4
+
+#define ELFCLASSNONE 0
+#define ELFCLASS32 1
+#define ELFCLASS64 2
+#define ELFCLASSNUM 3
+
+#define ELFDATANONE 0
+#define ELFDATA2LSB 1
+#define ELFDATA2MSB 2
+
+#define EV_NONE 0
+#define EV_CURRENT 1
+#define EV_NUM 2
+
+#define ELFOSABI_NONE 0
+#define ELFOSABI_LINUX 3
+
+#ifndef ELF_OSABI
+#define ELF_OSABI ELFOSABI_NONE
+#endif
+
+#define NT_PRSTATUS 1
+#define NT_PRFPREG 2
+#define NT_PRPSINFO 3
+#define NT_TASKSTRUCT 4
+#define NT_AUXV 6
+#define NT_PRXFPREG 0x46e62b7f
+
+typedef struct elf32_note {
+ Elf32_Word n_namesz;
+ Elf32_Word n_descsz;
+ Elf32_Word n_type;
+} Elf32_Nhdr;
+
+typedef struct elf64_note {
+ Elf64_Word n_namesz;
+ Elf64_Word n_descsz;
+ Elf64_Word n_type;
+} Elf64_Nhdr;
+
+#if ELF_CLASS == ELFCLASS32
+
+#define elfhdr elf32_hdr
+#define elf_phdr elf32_phdr
+#define elf_note elf32_note
+
+#else
+
+#define elfhdr elf64_hdr
+#define elf_phdr elf64_phdr
+#define elf_note elf64_note
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/err.h b/6/platforms/android-3/arch-arm/usr/include/linux/err.h
new file mode 100644
index 0000000..1aa4f9b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/err.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERR_H
+#define _LINUX_ERR_H
+
+#include <linux/compiler.h>
+
+#include <asm/errno.h>
+
+#define MAX_ERRNO 4095
+
+#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/errno.h b/6/platforms/android-3/arch-arm/usr/include/linux/errno.h
new file mode 100644
index 0000000..72ee642
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/errno.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERRNO_H
+#define _LINUX_ERRNO_H
+
+#include <asm/errno.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/errqueue.h b/6/platforms/android-3/arch-arm/usr/include/linux/errqueue.h
new file mode 100644
index 0000000..03b2e42
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/errqueue.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERRQUEUE_H
+#define _LINUX_ERRQUEUE_H 1
+
+struct sock_extended_err
+{
+ __u32 ee_errno;
+ __u8 ee_origin;
+ __u8 ee_type;
+ __u8 ee_code;
+ __u8 ee_pad;
+ __u32 ee_info;
+ __u32 ee_data;
+};
+
+#define SO_EE_ORIGIN_NONE 0
+#define SO_EE_ORIGIN_LOCAL 1
+#define SO_EE_ORIGIN_ICMP 2
+#define SO_EE_ORIGIN_ICMP6 3
+
+#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/etherdevice.h b/6/platforms/android-3/arch-arm/usr/include/linux/etherdevice.h
new file mode 100644
index 0000000..d087e8f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/etherdevice.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ETHERDEVICE_H
+#define _LINUX_ETHERDEVICE_H
+
+#include <linux/if_ether.h>
+#include <linux/netdevice.h>
+#include <linux/random.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ext2_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/ext2_fs.h
new file mode 100644
index 0000000..c21b09a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ext2_fs.h
@@ -0,0 +1,378 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_EXT2_FS_H
+#define _LINUX_EXT2_FS_H
+
+#include <linux/types.h>
+
+#undef EXT2FS_DEBUG
+
+#define EXT2_PREALLOCATE
+#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
+
+#define EXT2FS_DATE "95/08/09"
+#define EXT2FS_VERSION "0.5b"
+
+#ifdef EXT2FS_DEBUG
+#define ext2_debug(f, a...) { printk ("EXT2-fs DEBUG (%s, %d): %s:", __FILE__, __LINE__, __FUNCTION__); printk (f, ## a); }
+#else
+#define ext2_debug(f, a...)
+#endif
+
+#define EXT2_BAD_INO 1
+#define EXT2_ROOT_INO 2
+#define EXT2_BOOT_LOADER_INO 5
+#define EXT2_UNDEL_DIR_INO 6
+
+#define EXT2_GOOD_OLD_FIRST_INO 11
+
+#define EXT2_SUPER_MAGIC 0xEF53
+
+#define EXT2_SB(sb) (sb)
+
+#define EXT2_LINK_MAX 32000
+
+#define EXT2_MIN_BLOCK_SIZE 1024
+#define EXT2_MAX_BLOCK_SIZE 4096
+#define EXT2_MIN_BLOCK_LOG_SIZE 10
+#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
+#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
+#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
+
+#define EXT2_MIN_FRAG_SIZE 1024
+#define EXT2_MAX_FRAG_SIZE 4096
+#define EXT2_MIN_FRAG_LOG_SIZE 10
+#define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+#define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
+
+struct ext2_group_desc
+{
+ __le32 bg_block_bitmap;
+ __le32 bg_inode_bitmap;
+ __le32 bg_inode_table;
+ __le16 bg_free_blocks_count;
+ __le16 bg_free_inodes_count;
+ __le16 bg_used_dirs_count;
+ __le16 bg_pad;
+ __le32 bg_reserved[3];
+};
+
+#define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
+#define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+
+#define EXT2_NDIR_BLOCKS 12
+#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
+#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
+#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
+#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
+
+#define EXT2_SECRM_FL 0x00000001
+#define EXT2_UNRM_FL 0x00000002
+#define EXT2_COMPR_FL 0x00000004
+#define EXT2_SYNC_FL 0x00000008
+#define EXT2_IMMUTABLE_FL 0x00000010
+#define EXT2_APPEND_FL 0x00000020
+#define EXT2_NODUMP_FL 0x00000040
+#define EXT2_NOATIME_FL 0x00000080
+
+#define EXT2_DIRTY_FL 0x00000100
+#define EXT2_COMPRBLK_FL 0x00000200
+#define EXT2_NOCOMP_FL 0x00000400
+#define EXT2_ECOMPR_FL 0x00000800
+
+#define EXT2_BTREE_FL 0x00001000
+#define EXT2_INDEX_FL 0x00001000
+#define EXT2_IMAGIC_FL 0x00002000
+#define EXT2_JOURNAL_DATA_FL 0x00004000
+#define EXT2_NOTAIL_FL 0x00008000
+#define EXT2_DIRSYNC_FL 0x00010000
+#define EXT2_TOPDIR_FL 0x00020000
+#define EXT2_RESERVED_FL 0x80000000
+
+#define EXT2_FL_USER_VISIBLE 0x0003DFFF
+#define EXT2_FL_USER_MODIFIABLE 0x000380FF
+
+#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
+#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
+#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
+#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
+
+struct ext2_inode {
+ __le16 i_mode;
+ __le16 i_uid;
+ __le32 i_size;
+ __le32 i_atime;
+ __le32 i_ctime;
+ __le32 i_mtime;
+ __le32 i_dtime;
+ __le16 i_gid;
+ __le16 i_links_count;
+ __le32 i_blocks;
+ __le32 i_flags;
+ union {
+ struct {
+ __le32 l_i_reserved1;
+ } linux1;
+ struct {
+ __le32 h_i_translator;
+ } hurd1;
+ struct {
+ __le32 m_i_reserved1;
+ } masix1;
+ } osd1;
+ __le32 i_block[EXT2_N_BLOCKS];
+ __le32 i_generation;
+ __le32 i_file_acl;
+ __le32 i_dir_acl;
+ __le32 i_faddr;
+ union {
+ struct {
+ __u8 l_i_frag;
+ __u8 l_i_fsize;
+ __u16 i_pad1;
+ __le16 l_i_uid_high;
+ __le16 l_i_gid_high;
+ __u32 l_i_reserved2;
+ } linux2;
+ struct {
+ __u8 h_i_frag;
+ __u8 h_i_fsize;
+ __le16 h_i_mode_high;
+ __le16 h_i_uid_high;
+ __le16 h_i_gid_high;
+ __le32 h_i_author;
+ } hurd2;
+ struct {
+ __u8 m_i_frag;
+ __u8 m_i_fsize;
+ __u16 m_pad1;
+ __u32 m_i_reserved2[2];
+ } masix2;
+ } osd2;
+};
+
+#define i_size_high i_dir_acl
+
+#ifdef __linux__
+#define i_reserved1 osd1.linux1.l_i_reserved1
+#define i_frag osd2.linux2.l_i_frag
+#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
+#define i_reserved2 osd2.linux2.l_i_reserved2
+#endif
+
+#ifdef __hurd__
+#define i_translator osd1.hurd1.h_i_translator
+#define i_frag osd2.hurd2.h_i_frag;
+#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_uid_high osd2.hurd2.h_i_uid_high
+#define i_gid_high osd2.hurd2.h_i_gid_high
+#define i_author osd2.hurd2.h_i_author
+#endif
+
+#ifdef __masix__
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+#endif
+
+#define EXT2_VALID_FS 0x0001
+#define EXT2_ERROR_FS 0x0002
+
+#define EXT2_MOUNT_CHECK 0x000001
+#define EXT2_MOUNT_OLDALLOC 0x000002
+#define EXT2_MOUNT_GRPID 0x000004
+#define EXT2_MOUNT_DEBUG 0x000008
+#define EXT2_MOUNT_ERRORS_CONT 0x000010
+#define EXT2_MOUNT_ERRORS_RO 0x000020
+#define EXT2_MOUNT_ERRORS_PANIC 0x000040
+#define EXT2_MOUNT_MINIX_DF 0x000080
+#define EXT2_MOUNT_NOBH 0x000100
+#define EXT2_MOUNT_NO_UID32 0x000200
+#define EXT2_MOUNT_XATTR_USER 0x004000
+#define EXT2_MOUNT_POSIX_ACL 0x008000
+#define EXT2_MOUNT_XIP 0x010000
+#define EXT2_MOUNT_USRQUOTA 0x020000
+#define EXT2_MOUNT_GRPQUOTA 0x040000
+
+#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
+#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_##opt)
+
+#define EXT2_DFL_MAX_MNT_COUNT 20
+#define EXT2_DFL_CHECKINTERVAL 0
+
+#define EXT2_ERRORS_CONTINUE 1
+#define EXT2_ERRORS_RO 2
+#define EXT2_ERRORS_PANIC 3
+#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
+
+struct ext2_super_block {
+ __le32 s_inodes_count;
+ __le32 s_blocks_count;
+ __le32 s_r_blocks_count;
+ __le32 s_free_blocks_count;
+ __le32 s_free_inodes_count;
+ __le32 s_first_data_block;
+ __le32 s_log_block_size;
+ __le32 s_log_frag_size;
+ __le32 s_blocks_per_group;
+ __le32 s_frags_per_group;
+ __le32 s_inodes_per_group;
+ __le32 s_mtime;
+ __le32 s_wtime;
+ __le16 s_mnt_count;
+ __le16 s_max_mnt_count;
+ __le16 s_magic;
+ __le16 s_state;
+ __le16 s_errors;
+ __le16 s_minor_rev_level;
+ __le32 s_lastcheck;
+ __le32 s_checkinterval;
+ __le32 s_creator_os;
+ __le32 s_rev_level;
+ __le16 s_def_resuid;
+ __le16 s_def_resgid;
+
+ __le32 s_first_ino;
+ __le16 s_inode_size;
+ __le16 s_block_group_nr;
+ __le32 s_feature_compat;
+ __le32 s_feature_incompat;
+ __le32 s_feature_ro_compat;
+ __u8 s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ __le32 s_algorithm_usage_bitmap;
+
+ __u8 s_prealloc_blocks;
+ __u8 s_prealloc_dir_blocks;
+ __u16 s_padding1;
+
+ __u8 s_journal_uuid[16];
+ __u32 s_journal_inum;
+ __u32 s_journal_dev;
+ __u32 s_last_orphan;
+ __u32 s_hash_seed[4];
+ __u8 s_def_hash_version;
+ __u8 s_reserved_char_pad;
+ __u16 s_reserved_word_pad;
+ __le32 s_default_mount_opts;
+ __le32 s_first_meta_bg;
+ __u32 s_reserved[190];
+};
+
+#define EXT2_OS_LINUX 0
+#define EXT2_OS_HURD 1
+#define EXT2_OS_MASIX 2
+#define EXT2_OS_FREEBSD 3
+#define EXT2_OS_LITES 4
+
+#define EXT2_GOOD_OLD_REV 0
+#define EXT2_DYNAMIC_REV 1
+
+#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
+#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
+
+#define EXT2_GOOD_OLD_INODE_SIZE 128
+
+#define EXT2_HAS_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
+#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
+#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
+#define EXT2_SET_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
+#define EXT2_SET_RO_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
+#define EXT2_SET_INCOMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
+#define EXT2_CLEAR_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
+#define EXT2_CLEAR_RO_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
+#define EXT2_CLEAR_INCOMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
+
+#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
+#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
+#define EXT2_FEATURE_COMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+#define EXT2_FEATURE_RO_COMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
+#define EXT2_FEATURE_INCOMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
+#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| EXT2_FEATURE_INCOMPAT_META_BG)
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT2_FEATURE_RO_COMPAT_LARGE_FILE| EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
+#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT2_FEATURE_RO_COMPAT_SUPP
+#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED ~EXT2_FEATURE_INCOMPAT_SUPP
+
+#define EXT2_DEF_RESUID 0
+#define EXT2_DEF_RESGID 0
+
+#define EXT2_DEFM_DEBUG 0x0001
+#define EXT2_DEFM_BSDGROUPS 0x0002
+#define EXT2_DEFM_XATTR_USER 0x0004
+#define EXT2_DEFM_ACL 0x0008
+#define EXT2_DEFM_UID16 0x0010
+
+#define EXT3_DEFM_JMODE 0x0060
+#define EXT3_DEFM_JMODE_DATA 0x0020
+#define EXT3_DEFM_JMODE_ORDERED 0x0040
+#define EXT3_DEFM_JMODE_WBACK 0x0060
+
+#define EXT2_NAME_LEN 255
+
+struct ext2_dir_entry {
+ __le32 inode;
+ __le16 rec_len;
+ __le16 name_len;
+ char name[EXT2_NAME_LEN];
+};
+
+struct ext2_dir_entry_2 {
+ __le32 inode;
+ __le16 rec_len;
+ __u8 name_len;
+ __u8 file_type;
+ char name[EXT2_NAME_LEN];
+};
+
+enum {
+ EXT2_FT_UNKNOWN,
+ EXT2_FT_REG_FILE,
+ EXT2_FT_DIR,
+ EXT2_FT_CHRDEV,
+ EXT2_FT_BLKDEV,
+ EXT2_FT_FIFO,
+ EXT2_FT_SOCK,
+ EXT2_FT_SYMLINK,
+ EXT2_FT_MAX
+};
+
+#define EXT2_DIR_PAD 4
+#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
+#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & ~EXT2_DIR_ROUND)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ext3_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/ext3_fs.h
new file mode 100644
index 0000000..8016fd1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ext3_fs.h
@@ -0,0 +1,448 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_EXT3_FS_H
+#define _LINUX_EXT3_FS_H
+
+#include <linux/types.h>
+
+#undef EXT3FS_DEBUG
+
+#define EXT3_DEFAULT_RESERVE_BLOCKS 8
+
+#define EXT3_MAX_RESERVE_BLOCKS 1027
+#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED 0
+
+#define CONFIG_EXT3_INDEX
+
+#ifdef EXT3FS_DEBUG
+#define ext3_debug(f, a...) do { printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", __FILE__, __LINE__, __FUNCTION__); printk (KERN_DEBUG f, ## a); } while (0)
+#else
+#define ext3_debug(f, a...) do {} while (0)
+#endif
+
+#define EXT3_BAD_INO 1
+#define EXT3_ROOT_INO 2
+#define EXT3_BOOT_LOADER_INO 5
+#define EXT3_UNDEL_DIR_INO 6
+#define EXT3_RESIZE_INO 7
+#define EXT3_JOURNAL_INO 8
+
+#define EXT3_GOOD_OLD_FIRST_INO 11
+
+#define EXT3_SUPER_MAGIC 0xEF53
+
+#define EXT3_LINK_MAX 32000
+
+#define EXT3_MIN_BLOCK_SIZE 1024
+#define EXT3_MAX_BLOCK_SIZE 4096
+#define EXT3_MIN_BLOCK_LOG_SIZE 10
+#define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
+#define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? EXT3_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
+#define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? EXT3_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
+
+#define EXT3_MIN_FRAG_SIZE 1024
+#define EXT3_MAX_FRAG_SIZE 4096
+#define EXT3_MIN_FRAG_LOG_SIZE 10
+#define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+#define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s))
+
+struct ext3_group_desc
+{
+ __le32 bg_block_bitmap;
+ __le32 bg_inode_bitmap;
+ __le32 bg_inode_table;
+ __le16 bg_free_blocks_count;
+ __le16 bg_free_inodes_count;
+ __le16 bg_used_dirs_count;
+ __u16 bg_pad;
+ __le32 bg_reserved[3];
+};
+
+#define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+#define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc))
+#define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+
+#define EXT3_NDIR_BLOCKS 12
+#define EXT3_IND_BLOCK EXT3_NDIR_BLOCKS
+#define EXT3_DIND_BLOCK (EXT3_IND_BLOCK + 1)
+#define EXT3_TIND_BLOCK (EXT3_DIND_BLOCK + 1)
+#define EXT3_N_BLOCKS (EXT3_TIND_BLOCK + 1)
+
+#define EXT3_SECRM_FL 0x00000001
+#define EXT3_UNRM_FL 0x00000002
+#define EXT3_COMPR_FL 0x00000004
+#define EXT3_SYNC_FL 0x00000008
+#define EXT3_IMMUTABLE_FL 0x00000010
+#define EXT3_APPEND_FL 0x00000020
+#define EXT3_NODUMP_FL 0x00000040
+#define EXT3_NOATIME_FL 0x00000080
+
+#define EXT3_DIRTY_FL 0x00000100
+#define EXT3_COMPRBLK_FL 0x00000200
+#define EXT3_NOCOMPR_FL 0x00000400
+#define EXT3_ECOMPR_FL 0x00000800
+
+#define EXT3_INDEX_FL 0x00001000
+#define EXT3_IMAGIC_FL 0x00002000
+#define EXT3_JOURNAL_DATA_FL 0x00004000
+#define EXT3_NOTAIL_FL 0x00008000
+#define EXT3_DIRSYNC_FL 0x00010000
+#define EXT3_TOPDIR_FL 0x00020000
+#define EXT3_RESERVED_FL 0x80000000
+
+#define EXT3_FL_USER_VISIBLE 0x0003DFFF
+#define EXT3_FL_USER_MODIFIABLE 0x000380FF
+
+#define EXT3_STATE_JDATA 0x00000001
+#define EXT3_STATE_NEW 0x00000002
+#define EXT3_STATE_XATTR 0x00000004
+
+struct ext3_new_group_input {
+ __u32 group;
+ __u32 block_bitmap;
+ __u32 inode_bitmap;
+ __u32 inode_table;
+ __u32 blocks_count;
+ __u16 reserved_blocks;
+ __u16 unused;
+};
+
+struct ext3_new_group_data {
+ __u32 group;
+ __u32 block_bitmap;
+ __u32 inode_bitmap;
+ __u32 inode_table;
+ __u32 blocks_count;
+ __u16 reserved_blocks;
+ __u16 unused;
+ __u32 free_blocks_count;
+};
+
+#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
+#define EXT3_IOC_SETFLAGS _IOW('f', 2, long)
+#define EXT3_IOC_GETVERSION _IOR('f', 3, long)
+#define EXT3_IOC_SETVERSION _IOW('f', 4, long)
+#define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
+#define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input)
+#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long)
+#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long)
+#define EXT3_IOC_GETRSVSZ _IOR('f', 5, long)
+#define EXT3_IOC_SETRSVSZ _IOW('f', 6, long)
+
+struct ext3_mount_options {
+ unsigned long s_mount_opt;
+ uid_t s_resuid;
+ gid_t s_resgid;
+ unsigned long s_commit_interval;
+};
+
+struct ext3_inode {
+ __le16 i_mode;
+ __le16 i_uid;
+ __le32 i_size;
+ __le32 i_atime;
+ __le32 i_ctime;
+ __le32 i_mtime;
+ __le32 i_dtime;
+ __le16 i_gid;
+ __le16 i_links_count;
+ __le32 i_blocks;
+ __le32 i_flags;
+ union {
+ struct {
+ __u32 l_i_reserved1;
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ struct {
+ __u32 m_i_reserved1;
+ } masix1;
+ } osd1;
+ __le32 i_block[EXT3_N_BLOCKS];
+ __le32 i_generation;
+ __le32 i_file_acl;
+ __le32 i_dir_acl;
+ __le32 i_faddr;
+ union {
+ struct {
+ __u8 l_i_frag;
+ __u8 l_i_fsize;
+ __u16 i_pad1;
+ __le16 l_i_uid_high;
+ __le16 l_i_gid_high;
+ __u32 l_i_reserved2;
+ } linux2;
+ struct {
+ __u8 h_i_frag;
+ __u8 h_i_fsize;
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ struct {
+ __u8 m_i_frag;
+ __u8 m_i_fsize;
+ __u16 m_pad1;
+ __u32 m_i_reserved2[2];
+ } masix2;
+ } osd2;
+ __le16 i_extra_isize;
+ __le16 i_pad1;
+};
+
+#define i_size_high i_dir_acl
+
+#ifdef __linux__
+#define i_reserved1 osd1.linux1.l_i_reserved1
+#define i_frag osd2.linux2.l_i_frag
+#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
+#define i_reserved2 osd2.linux2.l_i_reserved2
+
+#elif defined(__GNU__)
+
+#define i_translator osd1.hurd1.h_i_translator
+#define i_frag osd2.hurd2.h_i_frag;
+#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_uid_high osd2.hurd2.h_i_uid_high
+#define i_gid_high osd2.hurd2.h_i_gid_high
+#define i_author osd2.hurd2.h_i_author
+
+#elif defined(__masix__)
+
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+
+#endif
+
+#define EXT3_VALID_FS 0x0001
+#define EXT3_ERROR_FS 0x0002
+#define EXT3_ORPHAN_FS 0x0004
+
+#define EXT3_MOUNT_CHECK 0x00001
+#define EXT3_MOUNT_OLDALLOC 0x00002
+#define EXT3_MOUNT_GRPID 0x00004
+#define EXT3_MOUNT_DEBUG 0x00008
+#define EXT3_MOUNT_ERRORS_CONT 0x00010
+#define EXT3_MOUNT_ERRORS_RO 0x00020
+#define EXT3_MOUNT_ERRORS_PANIC 0x00040
+#define EXT3_MOUNT_MINIX_DF 0x00080
+#define EXT3_MOUNT_NOLOAD 0x00100
+#define EXT3_MOUNT_ABORT 0x00200
+#define EXT3_MOUNT_DATA_FLAGS 0x00C00
+#define EXT3_MOUNT_JOURNAL_DATA 0x00400
+#define EXT3_MOUNT_ORDERED_DATA 0x00800
+#define EXT3_MOUNT_WRITEBACK_DATA 0x00C00
+#define EXT3_MOUNT_UPDATE_JOURNAL 0x01000
+#define EXT3_MOUNT_NO_UID32 0x02000
+#define EXT3_MOUNT_XATTR_USER 0x04000
+#define EXT3_MOUNT_POSIX_ACL 0x08000
+#define EXT3_MOUNT_RESERVATION 0x10000
+#define EXT3_MOUNT_BARRIER 0x20000
+#define EXT3_MOUNT_NOBH 0x40000
+#define EXT3_MOUNT_QUOTA 0x80000
+#define EXT3_MOUNT_USRQUOTA 0x100000
+#define EXT3_MOUNT_GRPQUOTA 0x200000
+
+#ifndef _LINUX_EXT2_FS_H
+#define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT3_MOUNT_##opt
+#define test_opt(sb, opt) (EXT3_SB(sb)->s_mount_opt & EXT3_MOUNT_##opt)
+#else
+#define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD
+#define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT
+#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS
+#endif
+
+#define ext3_set_bit ext2_set_bit
+#define ext3_set_bit_atomic ext2_set_bit_atomic
+#define ext3_clear_bit ext2_clear_bit
+#define ext3_clear_bit_atomic ext2_clear_bit_atomic
+#define ext3_test_bit ext2_test_bit
+#define ext3_find_first_zero_bit ext2_find_first_zero_bit
+#define ext3_find_next_zero_bit ext2_find_next_zero_bit
+
+#define EXT3_DFL_MAX_MNT_COUNT 20
+#define EXT3_DFL_CHECKINTERVAL 0
+
+#define EXT3_ERRORS_CONTINUE 1
+#define EXT3_ERRORS_RO 2
+#define EXT3_ERRORS_PANIC 3
+#define EXT3_ERRORS_DEFAULT EXT3_ERRORS_CONTINUE
+
+struct ext3_super_block {
+ __le32 s_inodes_count;
+ __le32 s_blocks_count;
+ __le32 s_r_blocks_count;
+ __le32 s_free_blocks_count;
+ __le32 s_free_inodes_count;
+ __le32 s_first_data_block;
+ __le32 s_log_block_size;
+ __le32 s_log_frag_size;
+ __le32 s_blocks_per_group;
+ __le32 s_frags_per_group;
+ __le32 s_inodes_per_group;
+ __le32 s_mtime;
+ __le32 s_wtime;
+ __le16 s_mnt_count;
+ __le16 s_max_mnt_count;
+ __le16 s_magic;
+ __le16 s_state;
+ __le16 s_errors;
+ __le16 s_minor_rev_level;
+ __le32 s_lastcheck;
+ __le32 s_checkinterval;
+ __le32 s_creator_os;
+ __le32 s_rev_level;
+ __le16 s_def_resuid;
+ __le16 s_def_resgid;
+
+ __le32 s_first_ino;
+ __le16 s_inode_size;
+ __le16 s_block_group_nr;
+ __le32 s_feature_compat;
+ __le32 s_feature_incompat;
+ __le32 s_feature_ro_compat;
+ __u8 s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ __le32 s_algorithm_usage_bitmap;
+
+ __u8 s_prealloc_blocks;
+ __u8 s_prealloc_dir_blocks;
+ __u16 s_reserved_gdt_blocks;
+
+ __u8 s_journal_uuid[16];
+ __le32 s_journal_inum;
+ __le32 s_journal_dev;
+ __le32 s_last_orphan;
+ __le32 s_hash_seed[4];
+ __u8 s_def_hash_version;
+ __u8 s_reserved_char_pad;
+ __u16 s_reserved_word_pad;
+ __le32 s_default_mount_opts;
+ __le32 s_first_meta_bg;
+ __u32 s_reserved[190];
+};
+
+#define EXT3_SB(sb) (sb)
+
+#define NEXT_ORPHAN(inode) EXT3_I(inode)->i_dtime
+
+#define EXT3_OS_LINUX 0
+#define EXT3_OS_HURD 1
+#define EXT3_OS_MASIX 2
+#define EXT3_OS_FREEBSD 3
+#define EXT3_OS_LITES 4
+
+#define EXT3_GOOD_OLD_REV 0
+#define EXT3_DYNAMIC_REV 1
+
+#define EXT3_CURRENT_REV EXT3_GOOD_OLD_REV
+#define EXT3_MAX_SUPP_REV EXT3_DYNAMIC_REV
+
+#define EXT3_GOOD_OLD_INODE_SIZE 128
+
+#define EXT3_HAS_COMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
+#define EXT3_HAS_RO_COMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
+#define EXT3_HAS_INCOMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
+#define EXT3_SET_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
+#define EXT3_SET_RO_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
+#define EXT3_SET_INCOMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
+#define EXT3_CLEAR_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
+#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
+#define EXT3_CLEAR_INCOMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
+
+#define EXT3_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT3_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT3_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT3_FEATURE_COMPAT_RESIZE_INODE 0x0010
+#define EXT3_FEATURE_COMPAT_DIR_INDEX 0x0020
+
+#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+
+#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
+#define EXT3_FEATURE_INCOMPAT_META_BG 0x0010
+
+#define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
+#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| EXT3_FEATURE_INCOMPAT_RECOVER| EXT3_FEATURE_INCOMPAT_META_BG)
+#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT3_FEATURE_RO_COMPAT_LARGE_FILE| EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
+
+#define EXT3_DEF_RESUID 0
+#define EXT3_DEF_RESGID 0
+
+#define EXT3_DEFM_DEBUG 0x0001
+#define EXT3_DEFM_BSDGROUPS 0x0002
+#define EXT3_DEFM_XATTR_USER 0x0004
+#define EXT3_DEFM_ACL 0x0008
+#define EXT3_DEFM_UID16 0x0010
+#define EXT3_DEFM_JMODE 0x0060
+#define EXT3_DEFM_JMODE_DATA 0x0020
+#define EXT3_DEFM_JMODE_ORDERED 0x0040
+#define EXT3_DEFM_JMODE_WBACK 0x0060
+
+#define EXT3_NAME_LEN 255
+
+struct ext3_dir_entry {
+ __le32 inode;
+ __le16 rec_len;
+ __le16 name_len;
+ char name[EXT3_NAME_LEN];
+};
+
+struct ext3_dir_entry_2 {
+ __le32 inode;
+ __le16 rec_len;
+ __u8 name_len;
+ __u8 file_type;
+ char name[EXT3_NAME_LEN];
+};
+
+#define EXT3_FT_UNKNOWN 0
+#define EXT3_FT_REG_FILE 1
+#define EXT3_FT_DIR 2
+#define EXT3_FT_CHRDEV 3
+#define EXT3_FT_BLKDEV 4
+#define EXT3_FT_FIFO 5
+#define EXT3_FT_SOCK 6
+#define EXT3_FT_SYMLINK 7
+
+#define EXT3_FT_MAX 8
+
+#define EXT3_DIR_PAD 4
+#define EXT3_DIR_ROUND (EXT3_DIR_PAD - 1)
+#define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & ~EXT3_DIR_ROUND)
+
+#define is_dx(dir) 0
+#define EXT3_DIR_LINK_MAX(dir) ((dir)->i_nlink >= EXT3_LINK_MAX)
+#define EXT3_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2)
+
+#define DX_HASH_LEGACY 0
+#define DX_HASH_HALF_MD4 1
+#define DX_HASH_TEA 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/fadvise.h b/6/platforms/android-3/arch-arm/usr/include/linux/fadvise.h
new file mode 100644
index 0000000..25a0a4c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/fadvise.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef FADVISE_H_INCLUDED
+#define FADVISE_H_INCLUDED
+
+#define POSIX_FADV_NORMAL 0
+#define POSIX_FADV_RANDOM 1
+#define POSIX_FADV_SEQUENTIAL 2
+#define POSIX_FADV_WILLNEED 3
+
+#ifdef __s390x__
+#define POSIX_FADV_DONTNEED 6
+#define POSIX_FADV_NOREUSE 7
+#else
+#define POSIX_FADV_DONTNEED 4
+#define POSIX_FADV_NOREUSE 5
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/fb.h b/6/platforms/android-3/arch-arm/usr/include/linux/fb.h
new file mode 100644
index 0000000..336c439
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/fb.h
@@ -0,0 +1,347 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FB_H
+#define _LINUX_FB_H
+
+#include <asm/types.h>
+
+#define FB_MAJOR 29
+#define FB_MAX 32
+
+#define FBIOGET_VSCREENINFO 0x4600
+#define FBIOPUT_VSCREENINFO 0x4601
+#define FBIOGET_FSCREENINFO 0x4602
+#define FBIOGETCMAP 0x4604
+#define FBIOPUTCMAP 0x4605
+#define FBIOPAN_DISPLAY 0x4606
+#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor)
+
+#define FBIOGET_CON2FBMAP 0x460F
+#define FBIOPUT_CON2FBMAP 0x4610
+#define FBIOBLANK 0x4611
+#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
+#define FBIO_ALLOC 0x4613
+#define FBIO_FREE 0x4614
+#define FBIOGET_GLYPH 0x4615
+#define FBIOGET_HWCINFO 0x4616
+#define FBIOPUT_MODEINFO 0x4617
+#define FBIOGET_DISPINFO 0x4618
+
+#define FB_TYPE_PACKED_PIXELS 0
+#define FB_TYPE_PLANES 1
+#define FB_TYPE_INTERLEAVED_PLANES 2
+#define FB_TYPE_TEXT 3
+#define FB_TYPE_VGA_PLANES 4
+
+#define FB_AUX_TEXT_MDA 0
+#define FB_AUX_TEXT_CGA 1
+#define FB_AUX_TEXT_S3_MMIO 2
+#define FB_AUX_TEXT_MGA_STEP16 3
+#define FB_AUX_TEXT_MGA_STEP8 4
+
+#define FB_AUX_VGA_PLANES_VGA4 0
+#define FB_AUX_VGA_PLANES_CFB4 1
+#define FB_AUX_VGA_PLANES_CFB8 2
+
+#define FB_VISUAL_MONO01 0
+#define FB_VISUAL_MONO10 1
+#define FB_VISUAL_TRUECOLOR 2
+#define FB_VISUAL_PSEUDOCOLOR 3
+#define FB_VISUAL_DIRECTCOLOR 4
+#define FB_VISUAL_STATIC_PSEUDOCOLOR 5
+
+#define FB_ACCEL_NONE 0
+#define FB_ACCEL_ATARIBLITT 1
+#define FB_ACCEL_AMIGABLITT 2
+#define FB_ACCEL_S3_TRIO64 3
+#define FB_ACCEL_NCR_77C32BLT 4
+#define FB_ACCEL_S3_VIRGE 5
+#define FB_ACCEL_ATI_MACH64GX 6
+#define FB_ACCEL_DEC_TGA 7
+#define FB_ACCEL_ATI_MACH64CT 8
+#define FB_ACCEL_ATI_MACH64VT 9
+#define FB_ACCEL_ATI_MACH64GT 10
+#define FB_ACCEL_SUN_CREATOR 11
+#define FB_ACCEL_SUN_CGSIX 12
+#define FB_ACCEL_SUN_LEO 13
+#define FB_ACCEL_IMS_TWINTURBO 14
+#define FB_ACCEL_3DLABS_PERMEDIA2 15
+#define FB_ACCEL_MATROX_MGA2064W 16
+#define FB_ACCEL_MATROX_MGA1064SG 17
+#define FB_ACCEL_MATROX_MGA2164W 18
+#define FB_ACCEL_MATROX_MGA2164W_AGP 19
+#define FB_ACCEL_MATROX_MGAG100 20
+#define FB_ACCEL_MATROX_MGAG200 21
+#define FB_ACCEL_SUN_CG14 22
+#define FB_ACCEL_SUN_BWTWO 23
+#define FB_ACCEL_SUN_CGTHREE 24
+#define FB_ACCEL_SUN_TCX 25
+#define FB_ACCEL_MATROX_MGAG400 26
+#define FB_ACCEL_NV3 27
+#define FB_ACCEL_NV4 28
+#define FB_ACCEL_NV5 29
+#define FB_ACCEL_CT_6555x 30
+#define FB_ACCEL_3DFX_BANSHEE 31
+#define FB_ACCEL_ATI_RAGE128 32
+#define FB_ACCEL_IGS_CYBER2000 33
+#define FB_ACCEL_IGS_CYBER2010 34
+#define FB_ACCEL_IGS_CYBER5000 35
+#define FB_ACCEL_SIS_GLAMOUR 36
+#define FB_ACCEL_3DLABS_PERMEDIA3 37
+#define FB_ACCEL_ATI_RADEON 38
+#define FB_ACCEL_I810 39
+#define FB_ACCEL_SIS_GLAMOUR_2 40
+#define FB_ACCEL_SIS_XABRE 41
+#define FB_ACCEL_I830 42
+#define FB_ACCEL_NV_10 43
+#define FB_ACCEL_NV_20 44
+#define FB_ACCEL_NV_30 45
+#define FB_ACCEL_NV_40 46
+#define FB_ACCEL_XGI_VOLARI_V 47
+#define FB_ACCEL_XGI_VOLARI_Z 48
+#define FB_ACCEL_OMAP1610 49
+#define FB_ACCEL_NEOMAGIC_NM2070 90
+#define FB_ACCEL_NEOMAGIC_NM2090 91
+#define FB_ACCEL_NEOMAGIC_NM2093 92
+#define FB_ACCEL_NEOMAGIC_NM2097 93
+#define FB_ACCEL_NEOMAGIC_NM2160 94
+#define FB_ACCEL_NEOMAGIC_NM2200 95
+#define FB_ACCEL_NEOMAGIC_NM2230 96
+#define FB_ACCEL_NEOMAGIC_NM2360 97
+#define FB_ACCEL_NEOMAGIC_NM2380 98
+
+#define FB_ACCEL_SAVAGE4 0x80
+#define FB_ACCEL_SAVAGE3D 0x81
+#define FB_ACCEL_SAVAGE3D_MV 0x82
+#define FB_ACCEL_SAVAGE2000 0x83
+#define FB_ACCEL_SAVAGE_MX_MV 0x84
+#define FB_ACCEL_SAVAGE_MX 0x85
+#define FB_ACCEL_SAVAGE_IX_MV 0x86
+#define FB_ACCEL_SAVAGE_IX 0x87
+#define FB_ACCEL_PROSAVAGE_PM 0x88
+#define FB_ACCEL_PROSAVAGE_KM 0x89
+#define FB_ACCEL_S3TWISTER_P 0x8a
+#define FB_ACCEL_S3TWISTER_K 0x8b
+#define FB_ACCEL_SUPERSAVAGE 0x8c
+#define FB_ACCEL_PROSAVAGE_DDR 0x8d
+#define FB_ACCEL_PROSAVAGE_DDRK 0x8e
+
+struct fb_fix_screeninfo {
+ char id[16];
+ unsigned long smem_start;
+
+ __u32 smem_len;
+ __u32 type;
+ __u32 type_aux;
+ __u32 visual;
+ __u16 xpanstep;
+ __u16 ypanstep;
+ __u16 ywrapstep;
+ __u32 line_length;
+ unsigned long mmio_start;
+
+ __u32 mmio_len;
+ __u32 accel;
+
+ __u16 reserved[3];
+};
+
+struct fb_bitfield {
+ __u32 offset;
+ __u32 length;
+ __u32 msb_right;
+
+};
+
+#define FB_NONSTD_HAM 1
+
+#define FB_ACTIVATE_NOW 0
+#define FB_ACTIVATE_NXTOPEN 1
+#define FB_ACTIVATE_TEST 2
+#define FB_ACTIVATE_MASK 15
+
+#define FB_ACTIVATE_VBL 16
+#define FB_CHANGE_CMAP_VBL 32
+#define FB_ACTIVATE_ALL 64
+#define FB_ACTIVATE_FORCE 128
+#define FB_ACTIVATE_INV_MODE 256
+
+#define FB_ACCELF_TEXT 1
+
+#define FB_SYNC_HOR_HIGH_ACT 1
+#define FB_SYNC_VERT_HIGH_ACT 2
+#define FB_SYNC_EXT 4
+#define FB_SYNC_COMP_HIGH_ACT 8
+#define FB_SYNC_BROADCAST 16
+
+#define FB_SYNC_ON_GREEN 32
+
+#define FB_VMODE_NONINTERLACED 0
+#define FB_VMODE_INTERLACED 1
+#define FB_VMODE_DOUBLE 2
+#define FB_VMODE_MASK 255
+
+#define FB_VMODE_YWRAP 256
+#define FB_VMODE_SMOOTH_XPAN 512
+#define FB_VMODE_CONUPDATE 512
+
+#define FB_ROTATE_UR 0
+#define FB_ROTATE_CW 1
+#define FB_ROTATE_UD 2
+#define FB_ROTATE_CCW 3
+
+#define PICOS2KHZ(a) (1000000000UL/(a))
+#define KHZ2PICOS(a) (1000000000UL/(a))
+
+struct fb_var_screeninfo {
+ __u32 xres;
+ __u32 yres;
+ __u32 xres_virtual;
+ __u32 yres_virtual;
+ __u32 xoffset;
+ __u32 yoffset;
+
+ __u32 bits_per_pixel;
+ __u32 grayscale;
+
+ struct fb_bitfield red;
+ struct fb_bitfield green;
+ struct fb_bitfield blue;
+ struct fb_bitfield transp;
+
+ __u32 nonstd;
+
+ __u32 activate;
+
+ __u32 height;
+ __u32 width;
+
+ __u32 accel_flags;
+
+ __u32 pixclock;
+ __u32 left_margin;
+ __u32 right_margin;
+ __u32 upper_margin;
+ __u32 lower_margin;
+ __u32 hsync_len;
+ __u32 vsync_len;
+ __u32 sync;
+ __u32 vmode;
+ __u32 rotate;
+ __u32 reserved[5];
+};
+
+struct fb_cmap {
+ __u32 start;
+ __u32 len;
+ __u16 *red;
+ __u16 *green;
+ __u16 *blue;
+ __u16 *transp;
+};
+
+struct fb_con2fbmap {
+ __u32 console;
+ __u32 framebuffer;
+};
+
+#define VESA_NO_BLANKING 0
+#define VESA_VSYNC_SUSPEND 1
+#define VESA_HSYNC_SUSPEND 2
+#define VESA_POWERDOWN 3
+
+enum {
+
+ FB_BLANK_UNBLANK = VESA_NO_BLANKING,
+
+ FB_BLANK_NORMAL = VESA_NO_BLANKING + 1,
+
+ FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,
+
+ FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,
+
+ FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1
+};
+
+#define FB_VBLANK_VBLANKING 0x001
+#define FB_VBLANK_HBLANKING 0x002
+#define FB_VBLANK_HAVE_VBLANK 0x004
+#define FB_VBLANK_HAVE_HBLANK 0x008
+#define FB_VBLANK_HAVE_COUNT 0x010
+#define FB_VBLANK_HAVE_VCOUNT 0x020
+#define FB_VBLANK_HAVE_HCOUNT 0x040
+#define FB_VBLANK_VSYNCING 0x080
+#define FB_VBLANK_HAVE_VSYNC 0x100
+
+struct fb_vblank {
+ __u32 flags;
+ __u32 count;
+ __u32 vcount;
+ __u32 hcount;
+ __u32 reserved[4];
+};
+
+#define ROP_COPY 0
+#define ROP_XOR 1
+
+struct fb_copyarea {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 sx;
+ __u32 sy;
+};
+
+struct fb_fillrect {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 color;
+ __u32 rop;
+};
+
+struct fb_image {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 fg_color;
+ __u32 bg_color;
+ __u8 depth;
+ const char *data;
+ struct fb_cmap cmap;
+};
+
+#define FB_CUR_SETIMAGE 0x01
+#define FB_CUR_SETPOS 0x02
+#define FB_CUR_SETHOT 0x04
+#define FB_CUR_SETCMAP 0x08
+#define FB_CUR_SETSHAPE 0x10
+#define FB_CUR_SETSIZE 0x20
+#define FB_CUR_SETALL 0xFF
+
+struct fbcurpos {
+ __u16 x, y;
+};
+
+struct fb_cursor {
+ __u16 set;
+ __u16 enable;
+ __u16 rop;
+ const char *mask;
+ struct fbcurpos hot;
+ struct fb_image image;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/fcntl.h b/6/platforms/android-3/arch-arm/usr/include/linux/fcntl.h
new file mode 100644
index 0000000..323e87a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/fcntl.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FCNTL_H
+#define _LINUX_FCNTL_H
+
+#include <asm/fcntl.h>
+
+#define F_SETLEASE (F_LINUX_SPECIFIC_BASE+0)
+#define F_GETLEASE (F_LINUX_SPECIFIC_BASE+1)
+
+#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
+
+#define DN_ACCESS 0x00000001
+#define DN_MODIFY 0x00000002
+#define DN_CREATE 0x00000004
+#define DN_DELETE 0x00000008
+#define DN_RENAME 0x00000010
+#define DN_ATTRIB 0x00000020
+#define DN_MULTISHOT 0x80000000
+
+#define AT_FDCWD -100
+#define AT_SYMLINK_NOFOLLOW 0x100
+#define AT_REMOVEDIR 0x200
+#define AT_SYMLINK_FOLLOW 0x400
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/fd.h b/6/platforms/android-3/arch-arm/usr/include/linux/fd.h
new file mode 100644
index 0000000..f3bedd1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/fd.h
@@ -0,0 +1,258 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FD_H
+#define _LINUX_FD_H
+
+#include <linux/ioctl.h>
+#include <linux/compiler.h>
+
+struct floppy_struct {
+ unsigned int size,
+ sect,
+ head,
+ track,
+ stretch;
+#define FD_STRETCH 1
+#define FD_SWAPSIDES 2
+#define FD_ZEROBASED 4
+
+ unsigned char gap,
+
+ rate,
+#define FD_2M 0x4
+#define FD_SIZECODEMASK 0x38
+#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
+#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? 512 : 128 << FD_SIZECODE(floppy) )
+#define FD_PERP 0x40
+
+ spec1,
+ fmt_gap;
+ const char * name;
+};
+
+#define FDCLRPRM _IO(2, 0x41)
+
+#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
+#define FDSETMEDIAPRM FDSETPRM
+
+#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
+#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
+#define FDDEFMEDIAPRM FDDEFPRM
+#define FDGETMEDIAPRM FDGETPRM
+
+#define FDMSGON _IO(2,0x45)
+#define FDMSGOFF _IO(2,0x46)
+
+#define FD_FILL_BYTE 0xF6
+
+struct format_descr {
+ unsigned int device,head,track;
+};
+
+#define FDFMTBEG _IO(2,0x47)
+
+#define FDFMTTRK _IOW(2,0x48, struct format_descr)
+
+#define FDFMTEND _IO(2,0x49)
+
+struct floppy_max_errors {
+ unsigned int
+ abort,
+ read_track,
+ reset,
+ recal,
+
+ reporting;
+
+};
+
+#define FDSETEMSGTRESH _IO(2,0x4a)
+
+#define FDFLUSH _IO(2,0x4b)
+
+#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
+#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
+
+typedef char floppy_drive_name[16];
+#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
+
+struct floppy_drive_params {
+ signed char cmos;
+
+ unsigned long max_dtr;
+ unsigned long hlt;
+ unsigned long hut;
+ unsigned long srt;
+
+ unsigned long spinup;
+ unsigned long spindown;
+ unsigned char spindown_offset;
+ unsigned char select_delay;
+ unsigned char rps;
+ unsigned char tracks;
+ unsigned long timeout;
+
+ unsigned char interleave_sect;
+
+ struct floppy_max_errors max_errors;
+
+ char flags;
+
+#define FTD_MSG 0x10
+#define FD_BROKEN_DCL 0x20
+#define FD_DEBUG 0x02
+#define FD_SILENT_DCL_CLEAR 0x4
+#define FD_INVERTED_DCL 0x80
+
+ char read_track;
+
+ short autodetect[8];
+
+ int checkfreq;
+ int native_format;
+};
+
+enum {
+ FD_NEED_TWADDLE_BIT,
+ FD_VERIFY_BIT,
+ FD_DISK_NEWCHANGE_BIT,
+ FD_UNUSED_BIT,
+ FD_DISK_CHANGED_BIT,
+ FD_DISK_WRITABLE_BIT
+};
+
+#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
+#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
+
+struct floppy_drive_struct {
+ unsigned long flags;
+
+#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
+#define FD_VERIFY (1 << FD_VERIFY_BIT)
+#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
+#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
+#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
+
+ unsigned long spinup_date;
+ unsigned long select_date;
+ unsigned long first_read_date;
+ short probed_format;
+ short track;
+ short maxblock;
+ short maxtrack;
+ int generation;
+
+ int keep_data;
+
+ int fd_ref;
+ int fd_device;
+ unsigned long last_checked;
+
+ char *dmabuf;
+ int bufblocks;
+};
+
+#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
+#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
+
+enum reset_mode {
+ FD_RESET_IF_NEEDED,
+ FD_RESET_IF_RAWCMD,
+ FD_RESET_ALWAYS
+};
+#define FDRESET _IO(2, 0x54)
+
+struct floppy_fdc_state {
+ int spec1;
+ int spec2;
+ int dtr;
+ unsigned char version;
+ unsigned char dor;
+ unsigned long address;
+ unsigned int rawcmd:2;
+ unsigned int reset:1;
+ unsigned int need_configure:1;
+ unsigned int perp_mode:2;
+ unsigned int has_fifo:1;
+ unsigned int driver_version;
+#define FD_DRIVER_VERSION 0x100
+
+ unsigned char track[4];
+
+};
+
+#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
+
+struct floppy_write_errors {
+
+ unsigned int write_errors;
+
+ unsigned long first_error_sector;
+ int first_error_generation;
+ unsigned long last_error_sector;
+ int last_error_generation;
+
+ unsigned int badness;
+};
+
+#define FDWERRORCLR _IO(2, 0x56)
+
+#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors)
+
+#define FDHAVEBATCHEDRAWCMD
+
+struct floppy_raw_cmd {
+ unsigned int flags;
+#define FD_RAW_READ 1
+#define FD_RAW_WRITE 2
+#define FD_RAW_NO_MOTOR 4
+#define FD_RAW_DISK_CHANGE 4
+#define FD_RAW_INTR 8
+#define FD_RAW_SPIN 0x10
+#define FD_RAW_NO_MOTOR_AFTER 0x20
+#define FD_RAW_NEED_DISK 0x40
+#define FD_RAW_NEED_SEEK 0x80
+
+#define FD_RAW_MORE 0x100
+#define FD_RAW_STOP_IF_FAILURE 0x200
+#define FD_RAW_STOP_IF_SUCCESS 0x400
+#define FD_RAW_SOFTFAILURE 0x800
+
+#define FD_RAW_FAILURE 0x10000
+#define FD_RAW_HARDFAILURE 0x20000
+
+ void __user *data;
+ char *kernel_data;
+ struct floppy_raw_cmd *next;
+ long length;
+ long phys_length;
+ int buffer_length;
+
+ unsigned char rate;
+ unsigned char cmd_count;
+ unsigned char cmd[16];
+ unsigned char reply_count;
+ unsigned char reply[16];
+ int track;
+ int resultcode;
+
+ int reserved1;
+ int reserved2;
+};
+
+#define FDRAWCMD _IO(2, 0x58)
+
+#define FDTWADDLE _IO(2, 0x59)
+
+#define FDEJECT _IO(2, 0x5a)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/file.h b/6/platforms/android-3/arch-arm/usr/include/linux/file.h
new file mode 100644
index 0000000..87e570b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/file.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_FILE_H
+#define __LINUX_FILE_H
+
+#include <asm/atomic.h>
+#include <linux/posix_types.h>
+#include <linux/compiler.h>
+#include <linux/spinlock.h>
+#include <linux/rcupdate.h>
+#include <linux/types.h>
+
+#define NR_OPEN_DEFAULT BITS_PER_LONG
+
+struct embedded_fd_set {
+ unsigned long fds_bits[1];
+};
+
+#define EMBEDDED_FD_SET_SIZE (BITS_PER_BYTE * sizeof(struct embedded_fd_set))
+
+struct fdtable {
+ unsigned int max_fds;
+ int max_fdset;
+ struct file ** fd;
+ fd_set *close_on_exec;
+ fd_set *open_fds;
+ struct rcu_head rcu;
+ struct files_struct *free_files;
+ struct fdtable *next;
+};
+
+struct files_struct {
+
+ atomic_t count;
+ struct fdtable *fdt;
+ struct fdtable fdtab;
+
+ spinlock_t file_lock ____cacheline_aligned_in_smp;
+ int next_fd;
+ struct embedded_fd_set close_on_exec_init;
+ struct embedded_fd_set open_fds_init;
+ struct file * fd_array[NR_OPEN_DEFAULT];
+};
+
+#define files_fdtable(files) (rcu_dereference((files)->fdt))
+
+struct kmem_cache;
+
+#define fcheck(fd) fcheck_files(current->files, fd)
+
+struct task_struct;
+
+struct files_struct *get_files_struct(struct task_struct *);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/filter.h b/6/platforms/android-3/arch-arm/usr/include/linux/filter.h
new file mode 100644
index 0000000..e858a0f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/filter.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_FILTER_H__
+#define __LINUX_FILTER_H__
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+#define BPF_MAJOR_VERSION 1
+#define BPF_MINOR_VERSION 1
+
+struct sock_filter
+{
+ __u16 code;
+ __u8 jt;
+ __u8 jf;
+ __u32 k;
+};
+
+struct sock_fprog
+{
+ unsigned short len;
+ struct sock_filter __user *filter;
+};
+
+#define BPF_CLASS(code) ((code) & 0x07)
+#define BPF_LD 0x00
+#define BPF_LDX 0x01
+#define BPF_ST 0x02
+#define BPF_STX 0x03
+#define BPF_ALU 0x04
+#define BPF_JMP 0x05
+#define BPF_RET 0x06
+#define BPF_MISC 0x07
+
+#define BPF_SIZE(code) ((code) & 0x18)
+#define BPF_W 0x00
+#define BPF_H 0x08
+#define BPF_B 0x10
+#define BPF_MODE(code) ((code) & 0xe0)
+#define BPF_IMM 0x00
+#define BPF_ABS 0x20
+#define BPF_IND 0x40
+#define BPF_MEM 0x60
+#define BPF_LEN 0x80
+#define BPF_MSH 0xa0
+
+#define BPF_OP(code) ((code) & 0xf0)
+#define BPF_ADD 0x00
+#define BPF_SUB 0x10
+#define BPF_MUL 0x20
+#define BPF_DIV 0x30
+#define BPF_OR 0x40
+#define BPF_AND 0x50
+#define BPF_LSH 0x60
+#define BPF_RSH 0x70
+#define BPF_NEG 0x80
+#define BPF_JA 0x00
+#define BPF_JEQ 0x10
+#define BPF_JGT 0x20
+#define BPF_JGE 0x30
+#define BPF_JSET 0x40
+#define BPF_SRC(code) ((code) & 0x08)
+#define BPF_K 0x00
+#define BPF_X 0x08
+
+#define BPF_RVAL(code) ((code) & 0x18)
+#define BPF_A 0x10
+
+#define BPF_MISCOP(code) ((code) & 0xf8)
+#define BPF_TAX 0x00
+#define BPF_TXA 0x80
+
+#ifndef BPF_MAXINSNS
+#define BPF_MAXINSNS 4096
+#endif
+
+#ifndef BPF_STMT
+#define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k }
+#endif
+#ifndef BPF_JUMP
+#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
+#endif
+
+#define BPF_MEMWORDS 16
+
+#define SKF_AD_OFF (-0x1000)
+#define SKF_AD_PROTOCOL 0
+#define SKF_AD_PKTTYPE 4
+#define SKF_AD_IFINDEX 8
+#define SKF_AD_MAX 12
+#define SKF_NET_OFF (-0x100000)
+#define SKF_LL_OFF (-0x200000)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/fs.h
new file mode 100644
index 0000000..8d375b5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/fs.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FS_H
+#define _LINUX_FS_H
+
+#include <linux/limits.h>
+#include <linux/ioctl.h>
+
+#undef NR_OPEN
+#define NR_OPEN (1024*1024)
+#define INR_OPEN 1024
+
+#define BLOCK_SIZE_BITS 10
+#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+struct files_stat_struct {
+ int nr_files;
+ int nr_free_files;
+ int max_files;
+};
+
+struct inodes_stat_t {
+ int nr_inodes;
+ int nr_unused;
+ int dummy[5];
+};
+
+#define NR_FILE 8192
+
+#define MAY_EXEC 1
+#define MAY_WRITE 2
+#define MAY_READ 4
+#define MAY_APPEND 8
+
+#define FMODE_READ 1
+#define FMODE_WRITE 2
+
+#define FMODE_LSEEK 4
+#define FMODE_PREAD 8
+#define FMODE_PWRITE FMODE_PREAD
+
+#define FMODE_EXEC 16
+
+#define RW_MASK 1
+#define RWA_MASK 2
+#define READ 0
+#define WRITE 1
+#define READA 2
+#define SWRITE 3
+#define SPECIAL 4
+#define READ_SYNC (READ | (1 << BIO_RW_SYNC))
+#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))
+#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
+
+#define SEL_IN 1
+#define SEL_OUT 2
+#define SEL_EX 4
+
+#define FS_REQUIRES_DEV 1
+#define FS_BINARY_MOUNTDATA 2
+#define FS_REVAL_DOT 16384
+#define FS_ODD_RENAME 32768
+
+#define MS_RDONLY 1
+#define MS_NOSUID 2
+#define MS_NODEV 4
+#define MS_NOEXEC 8
+#define MS_SYNCHRONOUS 16
+#define MS_REMOUNT 32
+#define MS_MANDLOCK 64
+#define MS_DIRSYNC 128
+#define MS_NOATIME 1024
+#define MS_NODIRATIME 2048
+#define MS_BIND 4096
+#define MS_MOVE 8192
+#define MS_REC 16384
+#define MS_VERBOSE 32768
+#define MS_SILENT 32768
+#define MS_POSIXACL (1<<16)
+#define MS_UNBINDABLE (1<<17)
+#define MS_PRIVATE (1<<18)
+#define MS_SLAVE (1<<19)
+#define MS_SHARED (1<<20)
+#define MS_ACTIVE (1<<30)
+#define MS_NOUSER (1<<31)
+
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK)
+
+#define MS_MGC_VAL 0xC0ED0000
+#define MS_MGC_MSK 0xffff0000
+
+#define S_SYNC 1
+#define S_NOATIME 2
+#define S_APPEND 4
+#define S_IMMUTABLE 8
+#define S_DEAD 16
+#define S_NOQUOTA 32
+#define S_DIRSYNC 64
+#define S_NOCMTIME 128
+#define S_SWAPFILE 256
+#define S_PRIVATE 512
+
+#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
+
+#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
+#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC))
+#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
+#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
+
+#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
+#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
+#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
+#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL)
+
+#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
+#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
+#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
+#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
+
+#define BLKROSET _IO(0x12,93)
+#define BLKROGET _IO(0x12,94)
+#define BLKRRPART _IO(0x12,95)
+#define BLKGETSIZE _IO(0x12,96)
+#define BLKFLSBUF _IO(0x12,97)
+#define BLKRASET _IO(0x12,98)
+#define BLKRAGET _IO(0x12,99)
+#define BLKFRASET _IO(0x12,100)
+#define BLKFRAGET _IO(0x12,101)
+#define BLKSECTSET _IO(0x12,102)
+#define BLKSECTGET _IO(0x12,103)
+#define BLKSSZGET _IO(0x12,104)
+
+#define BLKBSZGET _IOR(0x12,112,size_t)
+#define BLKBSZSET _IOW(0x12,113,size_t)
+#define BLKGETSIZE64 _IOR(0x12,114,size_t)
+#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
+#define BLKTRACESTART _IO(0x12,116)
+#define BLKTRACESTOP _IO(0x12,117)
+#define BLKTRACETEARDOWN _IO(0x12,118)
+
+#define BMAP_IOCTL 1
+#define FIBMAP _IO(0x00,1)
+#define FIGETBSZ _IO(0x00,2)
+
+#define SYNC_FILE_RANGE_WAIT_BEFORE 1
+#define SYNC_FILE_RANGE_WRITE 2
+#define SYNC_FILE_RANGE_WAIT_AFTER 4
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ftape.h b/6/platforms/android-3/arch-arm/usr/include/linux/ftape.h
new file mode 100644
index 0000000..bb1527c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ftape.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _FTAPE_H
+#define _FTAPE_H
+
+#define FTAPE_VERSION "ftape v3.04d 25/11/97"
+
+#include <linux/types.h>
+#include <linux/mtio.h>
+
+#define FT_SECTOR(x) (x+1)
+#define FT_SECTOR_SIZE 1024
+#define FT_SECTORS_PER_SEGMENT 32
+#define FT_ECC_SECTORS 3
+#define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE)
+#define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE)
+
+#define FTAPE_SEL_A 0
+#define FTAPE_SEL_B 1
+#define FTAPE_SEL_C 2
+#define FTAPE_SEL_D 3
+#define FTAPE_SEL_MASK 3
+#define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK)
+#define FTAPE_NO_REWIND 4
+
+typedef union {
+ struct {
+ __u8 error;
+ __u8 command;
+ } error;
+ long space;
+} ft_drive_error;
+typedef union {
+ struct {
+ __u8 drive_status;
+ __u8 drive_config;
+ __u8 tape_status;
+ } status;
+ long space;
+} ft_drive_status;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/futex.h b/6/platforms/android-3/arch-arm/usr/include/linux/futex.h
new file mode 100644
index 0000000..30f9e59
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/futex.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FUTEX_H
+#define _LINUX_FUTEX_H
+
+#include <linux/sched.h>
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_FD 2
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
+
+struct robust_list {
+ struct robust_list __user *next;
+};
+
+struct robust_list_head {
+
+ struct robust_list list;
+
+ long futex_offset;
+
+ struct robust_list __user *list_op_pending;
+};
+
+#define FUTEX_WAITERS 0x80000000
+
+#define FUTEX_OWNER_DIED 0x40000000
+
+#define FUTEX_TID_MASK 0x3fffffff
+
+#define ROBUST_LIST_LIMIT 2048
+
+#define FUTEX_OP_SET 0
+#define FUTEX_OP_ADD 1
+#define FUTEX_OP_OR 2
+#define FUTEX_OP_ANDN 3
+#define FUTEX_OP_XOR 4
+#define FUTEX_OP_OPARG_SHIFT 8
+#define FUTEX_OP_CMP_EQ 0
+#define FUTEX_OP_CMP_NE 1
+#define FUTEX_OP_CMP_LT 2
+#define FUTEX_OP_CMP_LE 3
+#define FUTEX_OP_CMP_GT 4
+#define FUTEX_OP_CMP_GE 5
+#define FUTEX_OP(op, oparg, cmp, cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/genhd.h b/6/platforms/android-3/arch-arm/usr/include/linux/genhd.h
new file mode 100644
index 0000000..a3a3924
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/genhd.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_GENHD_H
+#define _LINUX_GENHD_H
+
+#include <linux/types.h>
+
+enum {
+
+ DOS_EXTENDED_PARTITION = 5,
+ LINUX_EXTENDED_PARTITION = 0x85,
+ WIN98_EXTENDED_PARTITION = 0x0f,
+
+ LINUX_SWAP_PARTITION = 0x82,
+ LINUX_RAID_PARTITION = 0xfd,
+
+ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
+ NEW_SOLARIS_X86_PARTITION = 0xbf,
+
+ DM6_AUX1PARTITION = 0x51,
+ DM6_AUX3PARTITION = 0x53,
+ DM6_PARTITION = 0x54,
+ EZD_PARTITION = 0x55,
+
+ FREEBSD_PARTITION = 0xa5,
+ OPENBSD_PARTITION = 0xa6,
+ NETBSD_PARTITION = 0xa9,
+ BSDI_PARTITION = 0xb7,
+ MINIX_PARTITION = 0x81,
+ UNIXWARE_PARTITION = 0x63,
+};
+
+struct partition {
+ unsigned char boot_ind;
+ unsigned char head;
+ unsigned char sector;
+ unsigned char cyl;
+ unsigned char sys_ind;
+ unsigned char end_head;
+ unsigned char end_sector;
+ unsigned char end_cyl;
+ unsigned int start_sect;
+ unsigned int nr_sects;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/gfp.h b/6/platforms/android-3/arch-arm/usr/include/linux/gfp.h
new file mode 100644
index 0000000..0a59fe9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/gfp.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_GFP_H
+#define __LINUX_GFP_H
+
+#include <linux/mmzone.h>
+#include <linux/stddef.h>
+#include <linux/linkage.h>
+
+struct vm_area_struct;
+
+#define __GFP_DMA ((__force gfp_t)0x01u)
+#define __GFP_HIGHMEM ((__force gfp_t)0x02u)
+#if BITS_PER_LONG < 64
+#define __GFP_DMA32 ((__force gfp_t)0x00)
+#else
+#define __GFP_DMA32 ((__force gfp_t)0x04)
+#endif
+
+#define __GFP_WAIT ((__force gfp_t)0x10u)
+#define __GFP_HIGH ((__force gfp_t)0x20u)
+#define __GFP_IO ((__force gfp_t)0x40u)
+#define __GFP_FS ((__force gfp_t)0x80u)
+#define __GFP_COLD ((__force gfp_t)0x100u)
+#define __GFP_NOWARN ((__force gfp_t)0x200u)
+#define __GFP_REPEAT ((__force gfp_t)0x400u)
+#define __GFP_NOFAIL ((__force gfp_t)0x800u)
+#define __GFP_NORETRY ((__force gfp_t)0x1000u)
+#define __GFP_NO_GROW ((__force gfp_t)0x2000u)
+#define __GFP_COMP ((__force gfp_t)0x4000u)
+#define __GFP_ZERO ((__force gfp_t)0x8000u)
+#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u)
+#define __GFP_HARDWALL ((__force gfp_t)0x20000u)
+
+#define __GFP_BITS_SHIFT 20
+#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
+
+#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| __GFP_NOMEMALLOC|__GFP_HARDWALL)
+
+#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
+
+#define GFP_ATOMIC (__GFP_HIGH)
+#define GFP_NOIO (__GFP_WAIT)
+#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
+#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
+#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
+#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM)
+
+#define GFP_DMA __GFP_DMA
+
+#define GFP_DMA32 __GFP_DMA32
+
+#ifndef HAVE_ARCH_FREE_PAGE
+#endif
+
+#define alloc_pages(gfp_mask, order) alloc_pages_node(numa_node_id(), gfp_mask, order)
+#define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
+#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
+
+#define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0)
+
+#define __get_dma_pages(gfp_mask, order) __get_free_pages((gfp_mask) | GFP_DMA,(order))
+
+#define __free_page(page) __free_pages((page), 0)
+#define free_page(addr) free_pages((addr),0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/hardirq.h b/6/platforms/android-3/arch-arm/usr/include/linux/hardirq.h
new file mode 100644
index 0000000..c0566b0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/hardirq.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_HARDIRQ_H
+#define LINUX_HARDIRQ_H
+
+#include <linux/preempt.h>
+#include <linux/smp_lock.h>
+#include <linux/lockdep.h>
+#include <asm/hardirq.h>
+#include <asm/system.h>
+
+#define PREEMPT_BITS 8
+#define SOFTIRQ_BITS 8
+
+#ifndef HARDIRQ_BITS
+#define HARDIRQ_BITS 12
+
+#if 1 << HARDIRQ_BITS < NR_IRQS
+#error HARDIRQ_BITS is too low!
+#endif
+#endif
+
+#define PREEMPT_SHIFT 0
+#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
+#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
+
+#define __IRQ_MASK(x) ((1UL << (x))-1)
+
+#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
+#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
+#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
+
+#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
+#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
+#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
+
+#if PREEMPT_ACTIVE < 1 << HARDIRQ_SHIFT + HARDIRQ_BITS
+#error PREEMPT_ACTIVE is too low!
+#endif
+
+#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
+#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
+#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
+
+#define in_irq() (hardirq_count())
+#define in_softirq() (softirq_count())
+#define in_interrupt() (irq_count())
+
+#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)
+
+#define preemptible() 0
+#define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
+
+#define synchronize_irq(irq) barrier()
+
+struct task_struct;
+
+#define irq_enter() do { account_system_vtime(current); add_preempt_count(HARDIRQ_OFFSET); trace_hardirq_enter(); } while (0)
+#define __irq_exit() do { trace_hardirq_exit(); account_system_vtime(current); sub_preempt_count(HARDIRQ_OFFSET); } while (0)
+
+#define nmi_enter() do { lockdep_off(); irq_enter(); } while (0)
+#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-3/arch-arm/usr/include/linux/hdlc/ioctl.h
new file mode 100644
index 0000000..c15a67f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __HDLC_IOCTL_H__
+#define __HDLC_IOCTL_H__
+
+typedef struct {
+ unsigned int clock_rate;
+ unsigned int clock_type;
+ unsigned short loopback;
+} sync_serial_settings;
+
+typedef struct {
+ unsigned int clock_rate;
+ unsigned int clock_type;
+ unsigned short loopback;
+ unsigned int slot_map;
+} te1_settings;
+
+typedef struct {
+ unsigned short encoding;
+ unsigned short parity;
+} raw_hdlc_proto;
+
+typedef struct {
+ unsigned int t391;
+ unsigned int t392;
+ unsigned int n391;
+ unsigned int n392;
+ unsigned int n393;
+ unsigned short lmi;
+ unsigned short dce;
+} fr_proto;
+
+typedef struct {
+ unsigned int dlci;
+} fr_proto_pvc;
+
+typedef struct {
+ unsigned int dlci;
+ char master[IFNAMSIZ];
+}fr_proto_pvc_info;
+
+typedef struct {
+ unsigned int interval;
+ unsigned int timeout;
+} cisco_proto;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/hdreg.h b/6/platforms/android-3/arch-arm/usr/include/linux/hdreg.h
new file mode 100644
index 0000000..a684ee9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/hdreg.h
@@ -0,0 +1,432 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HDREG_H
+#define _LINUX_HDREG_H
+
+#define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8))
+#define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8))
+#define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8))
+
+#define IDE_DRIVE_TASK_INVALID -1
+#define IDE_DRIVE_TASK_NO_DATA 0
+#define IDE_DRIVE_TASK_SET_XFER 1
+
+#define IDE_DRIVE_TASK_IN 2
+
+#define IDE_DRIVE_TASK_OUT 3
+#define IDE_DRIVE_TASK_RAW_WRITE 4
+
+#define IDE_TASKFILE_STD_IN_FLAGS 0xFE
+#define IDE_HOB_STD_IN_FLAGS 0x3C
+#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
+#define IDE_HOB_STD_OUT_FLAGS 0x3C
+
+typedef unsigned char task_ioreg_t;
+typedef unsigned long sata_ioreg_t;
+
+typedef union ide_reg_valid_s {
+ unsigned all : 16;
+ struct {
+ unsigned data : 1;
+ unsigned error_feature : 1;
+ unsigned sector : 1;
+ unsigned nsector : 1;
+ unsigned lcyl : 1;
+ unsigned hcyl : 1;
+ unsigned select : 1;
+ unsigned status_command : 1;
+
+ unsigned data_hob : 1;
+ unsigned error_feature_hob : 1;
+ unsigned sector_hob : 1;
+ unsigned nsector_hob : 1;
+ unsigned lcyl_hob : 1;
+ unsigned hcyl_hob : 1;
+ unsigned select_hob : 1;
+ unsigned control_hob : 1;
+ } b;
+} ide_reg_valid_t;
+
+typedef struct ide_task_request_s {
+ task_ioreg_t io_ports[8];
+ task_ioreg_t hob_ports[8];
+ ide_reg_valid_t out_flags;
+ ide_reg_valid_t in_flags;
+ int data_phase;
+ int req_cmd;
+ unsigned long out_size;
+ unsigned long in_size;
+} ide_task_request_t;
+
+typedef struct ide_ioctl_request_s {
+ ide_task_request_t *task_request;
+ unsigned char *out_buffer;
+ unsigned char *in_buffer;
+} ide_ioctl_request_t;
+
+struct hd_drive_cmd_hdr {
+ task_ioreg_t command;
+ task_ioreg_t sector_number;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+};
+
+typedef struct hd_drive_task_hdr {
+ task_ioreg_t data;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+ task_ioreg_t sector_number;
+ task_ioreg_t low_cylinder;
+ task_ioreg_t high_cylinder;
+ task_ioreg_t device_head;
+ task_ioreg_t command;
+} task_struct_t;
+
+typedef struct hd_drive_hob_hdr {
+ task_ioreg_t data;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+ task_ioreg_t sector_number;
+ task_ioreg_t low_cylinder;
+ task_ioreg_t high_cylinder;
+ task_ioreg_t device_head;
+ task_ioreg_t control;
+} hob_struct_t;
+
+#define TASKFILE_INVALID 0x7fff
+#define TASKFILE_48 0x8000
+
+#define TASKFILE_NO_DATA 0x0000
+
+#define TASKFILE_IN 0x0001
+#define TASKFILE_MULTI_IN 0x0002
+
+#define TASKFILE_OUT 0x0004
+#define TASKFILE_MULTI_OUT 0x0008
+#define TASKFILE_IN_OUT 0x0010
+
+#define TASKFILE_IN_DMA 0x0020
+#define TASKFILE_OUT_DMA 0x0040
+#define TASKFILE_IN_DMAQ 0x0080
+#define TASKFILE_OUT_DMAQ 0x0100
+
+#define TASKFILE_P_IN 0x0200
+#define TASKFILE_P_OUT 0x0400
+#define TASKFILE_P_IN_DMA 0x0800
+#define TASKFILE_P_OUT_DMA 0x1000
+#define TASKFILE_P_IN_DMAQ 0x2000
+#define TASKFILE_P_OUT_DMAQ 0x4000
+
+#define WIN_NOP 0x00
+
+#define CFA_REQ_EXT_ERROR_CODE 0x03
+
+#define WIN_SRST 0x08
+#define WIN_DEVICE_RESET 0x08
+
+#define WIN_RECAL 0x10
+#define WIN_RESTORE WIN_RECAL
+
+#define WIN_READ 0x20
+#define WIN_READ_ONCE 0x21
+#define WIN_READ_LONG 0x22
+#define WIN_READ_LONG_ONCE 0x23
+#define WIN_READ_EXT 0x24
+#define WIN_READDMA_EXT 0x25
+#define WIN_READDMA_QUEUED_EXT 0x26
+#define WIN_READ_NATIVE_MAX_EXT 0x27
+
+#define WIN_MULTREAD_EXT 0x29
+
+#define WIN_WRITE 0x30
+#define WIN_WRITE_ONCE 0x31
+#define WIN_WRITE_LONG 0x32
+#define WIN_WRITE_LONG_ONCE 0x33
+#define WIN_WRITE_EXT 0x34
+#define WIN_WRITEDMA_EXT 0x35
+#define WIN_WRITEDMA_QUEUED_EXT 0x36
+#define WIN_SET_MAX_EXT 0x37
+#define CFA_WRITE_SECT_WO_ERASE 0x38
+#define WIN_MULTWRITE_EXT 0x39
+
+#define WIN_WRITE_VERIFY 0x3C
+
+#define WIN_VERIFY 0x40
+#define WIN_VERIFY_ONCE 0x41
+#define WIN_VERIFY_EXT 0x42
+
+#define WIN_FORMAT 0x50
+
+#define WIN_INIT 0x60
+
+#define WIN_SEEK 0x70
+
+#define CFA_TRANSLATE_SECTOR 0x87
+#define WIN_DIAGNOSE 0x90
+#define WIN_SPECIFY 0x91
+#define WIN_DOWNLOAD_MICROCODE 0x92
+#define WIN_STANDBYNOW2 0x94
+#define WIN_STANDBY2 0x96
+#define WIN_SETIDLE2 0x97
+#define WIN_CHECKPOWERMODE2 0x98
+#define WIN_SLEEPNOW2 0x99
+
+#define WIN_PACKETCMD 0xA0
+#define WIN_PIDENTIFY 0xA1
+#define WIN_QUEUED_SERVICE 0xA2
+#define WIN_SMART 0xB0
+#define CFA_ERASE_SECTORS 0xC0
+#define WIN_MULTREAD 0xC4
+#define WIN_MULTWRITE 0xC5
+#define WIN_SETMULT 0xC6
+#define WIN_READDMA_QUEUED 0xC7
+#define WIN_READDMA 0xC8
+#define WIN_READDMA_ONCE 0xC9
+#define WIN_WRITEDMA 0xCA
+#define WIN_WRITEDMA_ONCE 0xCB
+#define WIN_WRITEDMA_QUEUED 0xCC
+#define CFA_WRITE_MULTI_WO_ERASE 0xCD
+#define WIN_GETMEDIASTATUS 0xDA
+#define WIN_ACKMEDIACHANGE 0xDB
+#define WIN_POSTBOOT 0xDC
+#define WIN_PREBOOT 0xDD
+#define WIN_DOORLOCK 0xDE
+#define WIN_DOORUNLOCK 0xDF
+#define WIN_STANDBYNOW1 0xE0
+#define WIN_IDLEIMMEDIATE 0xE1
+#define WIN_STANDBY 0xE2
+#define WIN_SETIDLE1 0xE3
+#define WIN_READ_BUFFER 0xE4
+#define WIN_CHECKPOWERMODE1 0xE5
+#define WIN_SLEEPNOW1 0xE6
+#define WIN_FLUSH_CACHE 0xE7
+#define WIN_WRITE_BUFFER 0xE8
+#define WIN_WRITE_SAME 0xE9
+
+#define WIN_FLUSH_CACHE_EXT 0xEA
+#define WIN_IDENTIFY 0xEC
+#define WIN_MEDIAEJECT 0xED
+#define WIN_IDENTIFY_DMA 0xEE
+#define WIN_SETFEATURES 0xEF
+#define EXABYTE_ENABLE_NEST 0xF0
+#define WIN_SECURITY_SET_PASS 0xF1
+#define WIN_SECURITY_UNLOCK 0xF2
+#define WIN_SECURITY_ERASE_PREPARE 0xF3
+#define WIN_SECURITY_ERASE_UNIT 0xF4
+#define WIN_SECURITY_FREEZE_LOCK 0xF5
+#define WIN_SECURITY_DISABLE 0xF6
+#define WIN_READ_NATIVE_MAX 0xF8
+#define WIN_SET_MAX 0xF9
+#define DISABLE_SEAGATE 0xFB
+
+#define SMART_READ_VALUES 0xD0
+#define SMART_READ_THRESHOLDS 0xD1
+#define SMART_AUTOSAVE 0xD2
+#define SMART_SAVE 0xD3
+#define SMART_IMMEDIATE_OFFLINE 0xD4
+#define SMART_READ_LOG_SECTOR 0xD5
+#define SMART_WRITE_LOG_SECTOR 0xD6
+#define SMART_WRITE_THRESHOLDS 0xD7
+#define SMART_ENABLE 0xD8
+#define SMART_DISABLE 0xD9
+#define SMART_STATUS 0xDA
+#define SMART_AUTO_OFFLINE 0xDB
+
+#define SMART_LCYL_PASS 0x4F
+#define SMART_HCYL_PASS 0xC2
+
+#define SETFEATURES_EN_8BIT 0x01
+#define SETFEATURES_EN_WCACHE 0x02
+#define SETFEATURES_DIS_DEFECT 0x04
+#define SETFEATURES_EN_APM 0x05
+#define SETFEATURES_EN_SAME_R 0x22
+#define SETFEATURES_DIS_MSN 0x31
+#define SETFEATURES_DIS_RETRY 0x33
+#define SETFEATURES_EN_AAM 0x42
+#define SETFEATURES_RW_LONG 0x44
+#define SETFEATURES_SET_CACHE 0x54
+#define SETFEATURES_DIS_RLA 0x55
+#define SETFEATURES_EN_RI 0x5D
+#define SETFEATURES_EN_SI 0x5E
+#define SETFEATURES_DIS_RPOD 0x66
+#define SETFEATURES_DIS_ECC 0x77
+#define SETFEATURES_DIS_8BIT 0x81
+#define SETFEATURES_DIS_WCACHE 0x82
+#define SETFEATURES_EN_DEFECT 0x84
+#define SETFEATURES_DIS_APM 0x85
+#define SETFEATURES_EN_ECC 0x88
+#define SETFEATURES_EN_MSN 0x95
+#define SETFEATURES_EN_RETRY 0x99
+#define SETFEATURES_EN_RLA 0xAA
+#define SETFEATURES_PREFETCH 0xAB
+#define SETFEATURES_EN_REST 0xAC
+#define SETFEATURES_4B_RW_LONG 0xBB
+#define SETFEATURES_DIS_AAM 0xC2
+#define SETFEATURES_EN_RPOD 0xCC
+#define SETFEATURES_DIS_RI 0xDD
+#define SETFEATURES_EN_SAME_M 0xDD
+#define SETFEATURES_DIS_SI 0xDE
+
+#define SECURITY_SET_PASSWORD 0xBA
+#define SECURITY_UNLOCK 0xBB
+#define SECURITY_ERASE_PREPARE 0xBC
+#define SECURITY_ERASE_UNIT 0xBD
+#define SECURITY_FREEZE_LOCK 0xBE
+#define SECURITY_DISABLE_PASSWORD 0xBF
+
+struct hd_geometry {
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ unsigned long start;
+};
+
+#define HDIO_GETGEO 0x0301
+#define HDIO_GET_UNMASKINTR 0x0302
+#define HDIO_GET_MULTCOUNT 0x0304
+#define HDIO_GET_QDMA 0x0305
+
+#define HDIO_SET_XFER 0x0306
+
+#define HDIO_OBSOLETE_IDENTITY 0x0307
+#define HDIO_GET_KEEPSETTINGS 0x0308
+#define HDIO_GET_32BIT 0x0309
+#define HDIO_GET_NOWERR 0x030a
+#define HDIO_GET_DMA 0x030b
+#define HDIO_GET_NICE 0x030c
+#define HDIO_GET_IDENTITY 0x030d
+#define HDIO_GET_WCACHE 0x030e
+#define HDIO_GET_ACOUSTIC 0x030f
+#define HDIO_GET_ADDRESS 0x0310
+
+#define HDIO_GET_BUSSTATE 0x031a
+#define HDIO_TRISTATE_HWIF 0x031b
+#define HDIO_DRIVE_RESET 0x031c
+#define HDIO_DRIVE_TASKFILE 0x031d
+#define HDIO_DRIVE_TASK 0x031e
+#define HDIO_DRIVE_CMD 0x031f
+#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK
+
+#define HDIO_SET_MULTCOUNT 0x0321
+#define HDIO_SET_UNMASKINTR 0x0322
+#define HDIO_SET_KEEPSETTINGS 0x0323
+#define HDIO_SET_32BIT 0x0324
+#define HDIO_SET_NOWERR 0x0325
+#define HDIO_SET_DMA 0x0326
+#define HDIO_SET_PIO_MODE 0x0327
+#define HDIO_SCAN_HWIF 0x0328
+#define HDIO_SET_NICE 0x0329
+#define HDIO_UNREGISTER_HWIF 0x032a
+#define HDIO_SET_WCACHE 0x032b
+#define HDIO_SET_ACOUSTIC 0x032c
+#define HDIO_SET_BUSSTATE 0x032d
+#define HDIO_SET_QDMA 0x032e
+#define HDIO_SET_ADDRESS 0x032f
+
+enum {
+ BUSSTATE_OFF = 0,
+ BUSSTATE_ON,
+ BUSSTATE_TRISTATE
+};
+
+#define __NEW_HD_DRIVE_ID
+
+struct hd_driveid {
+ unsigned short config;
+ unsigned short cyls;
+ unsigned short reserved2;
+ unsigned short heads;
+ unsigned short track_bytes;
+ unsigned short sector_bytes;
+ unsigned short sectors;
+ unsigned short vendor0;
+ unsigned short vendor1;
+ unsigned short vendor2;
+ unsigned char serial_no[20];
+ unsigned short buf_type;
+ unsigned short buf_size;
+ unsigned short ecc_bytes;
+ unsigned char fw_rev[8];
+ unsigned char model[40];
+ unsigned char max_multsect;
+ unsigned char vendor3;
+ unsigned short dword_io;
+ unsigned char vendor4;
+ unsigned char capability;
+ unsigned short reserved50;
+ unsigned char vendor5;
+ unsigned char tPIO;
+ unsigned char vendor6;
+ unsigned char tDMA;
+ unsigned short field_valid;
+ unsigned short cur_cyls;
+ unsigned short cur_heads;
+ unsigned short cur_sectors;
+ unsigned short cur_capacity0;
+ unsigned short cur_capacity1;
+ unsigned char multsect;
+ unsigned char multsect_valid;
+ unsigned int lba_capacity;
+ unsigned short dma_1word;
+ unsigned short dma_mword;
+ unsigned short eide_pio_modes;
+ unsigned short eide_dma_min;
+ unsigned short eide_dma_time;
+ unsigned short eide_pio;
+ unsigned short eide_pio_iordy;
+ unsigned short words69_70[2];
+
+ unsigned short words71_74[4];
+ unsigned short queue_depth;
+ unsigned short words76_79[4];
+ unsigned short major_rev_num;
+ unsigned short minor_rev_num;
+ unsigned short command_set_1;
+ unsigned short command_set_2;
+ unsigned short cfsse;
+ unsigned short cfs_enable_1;
+ unsigned short cfs_enable_2;
+ unsigned short csf_default;
+ unsigned short dma_ultra;
+ unsigned short trseuc;
+ unsigned short trsEuc;
+ unsigned short CurAPMvalues;
+ unsigned short mprc;
+ unsigned short hw_config;
+ unsigned short acoustic;
+ unsigned short msrqs;
+ unsigned short sxfert;
+ unsigned short sal;
+ unsigned int spg;
+ unsigned long long lba_capacity_2;
+ unsigned short words104_125[22];
+ unsigned short last_lun;
+ unsigned short word127;
+ unsigned short dlf;
+ unsigned short csfo;
+ unsigned short words130_155[26];
+ unsigned short word156;
+ unsigned short words157_159[3];
+ unsigned short cfa_power;
+ unsigned short words161_175[15];
+ unsigned short words176_205[30];
+ unsigned short words206_254[49];
+ unsigned short integrity_word;
+};
+
+#define IDE_NICE_DSC_OVERLAP (0)
+#define IDE_NICE_ATAPI_OVERLAP (1)
+#define IDE_NICE_0 (2)
+#define IDE_NICE_1 (3)
+#define IDE_NICE_2 (4)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/hdsmart.h b/6/platforms/android-3/arch-arm/usr/include/linux/hdsmart.h
new file mode 100644
index 0000000..6cbc653
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/hdsmart.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HDSMART_H
+#define _LINUX_HDSMART_H
+
+#define OFFLINE_FULL_SCAN 0
+#define SHORT_SELF_TEST 1
+#define EXTEND_SELF_TEST 2
+#define SHORT_CAPTIVE_SELF_TEST 129
+#define EXTEND_CAPTIVE_SELF_TEST 130
+
+typedef struct ata_smart_attribute_s {
+ unsigned char id;
+ unsigned short status_flag;
+ unsigned char normalized;
+ unsigned char worse_normal;
+ unsigned char raw[6];
+ unsigned char reserv;
+} __attribute__ ((packed)) ata_smart_attribute_t;
+
+typedef struct ata_smart_values_s {
+ unsigned short revnumber;
+ ata_smart_attribute_t vendor_attributes [30];
+ unsigned char offline_data_collection_status;
+ unsigned char self_test_exec_status;
+ unsigned short total_time_to_complete_off_line;
+ unsigned char vendor_specific_366;
+ unsigned char offline_data_collection_capability;
+ unsigned short smart_capability;
+ unsigned char errorlog_capability;
+ unsigned char vendor_specific_371;
+ unsigned char short_test_completion_time;
+ unsigned char extend_test_completion_time;
+ unsigned char reserved_374_385 [12];
+ unsigned char vendor_specific_386_509 [125];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_values_t;
+
+typedef struct ata_smart_threshold_entry_s {
+ unsigned char id;
+ unsigned char normalized_threshold;
+ unsigned char reserved[10];
+} __attribute__ ((packed)) ata_smart_threshold_entry_t;
+
+typedef struct ata_smart_thresholds_s {
+ unsigned short revnumber;
+ ata_smart_threshold_entry_t thres_entries[30];
+ unsigned char reserved[149];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_thresholds_t;
+
+typedef struct ata_smart_errorlog_command_struct_s {
+ unsigned char devicecontrolreg;
+ unsigned char featuresreg;
+ unsigned char sector_count;
+ unsigned char sector_number;
+ unsigned char cylinder_low;
+ unsigned char cylinder_high;
+ unsigned char drive_head;
+ unsigned char commandreg;
+ unsigned int timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
+
+typedef struct ata_smart_errorlog_error_struct_s {
+ unsigned char error_condition;
+ unsigned char extended_error[14];
+ unsigned char state;
+ unsigned short timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
+
+typedef struct ata_smart_errorlog_struct_s {
+ ata_smart_errorlog_command_struct_t commands[6];
+ ata_smart_errorlog_error_struct_t error_struct;
+} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
+
+typedef struct ata_smart_errorlog_s {
+ unsigned char revnumber;
+ unsigned char error_log_pointer;
+ ata_smart_errorlog_struct_t errorlog_struct[5];
+ unsigned short ata_error_count;
+ unsigned short non_fatal_count;
+ unsigned short drive_timeout_count;
+ unsigned char reserved[53];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_errorlog_t;
+
+typedef struct ata_smart_selftestlog_struct_s {
+ unsigned char selftestnumber;
+ unsigned char selfteststatus;
+ unsigned short timestamp;
+ unsigned char selftestfailurecheckpoint;
+ unsigned int lbafirstfailure;
+ unsigned char vendorspecific[15];
+} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
+
+typedef struct ata_smart_selftestlog_s {
+ unsigned short revnumber;
+ ata_smart_selftestlog_struct_t selftest_struct[21];
+ unsigned char vendorspecific[2];
+ unsigned char mostrecenttest;
+ unsigned char resevered[2];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_selftestlog_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/highmem.h b/6/platforms/android-3/arch-arm/usr/include/linux/highmem.h
new file mode 100644
index 0000000..d4a34ca
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/highmem.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HIGHMEM_H
+#define _LINUX_HIGHMEM_H
+
+#include <linux/fs.h>
+#include <linux/mm.h>
+
+#include <asm/cacheflush.h>
+
+#ifndef ARCH_HAS_FLUSH_ANON_PAGE
+#endif
+#ifndef ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
+#endif
+#define kunmap(page) do { (void) (page); } while (0)
+#define kmap_atomic(page, idx) page_address(page)
+#define kunmap_atomic(addr, idx) do { } while (0)
+#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
+#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
+#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/hil.h b/6/platforms/android-3/arch-arm/usr/include/linux/hil.h
new file mode 100644
index 0000000..a0b3b97
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/hil.h
@@ -0,0 +1,256 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _HIL_H_
+#define _HIL_H_
+
+#include <asm/types.h>
+
+#define HIL_CLOCK 8MHZ
+#define HIL_EK1_CLOCK 30HZ
+#define HIL_EK2_CLOCK 60HZ
+
+#define HIL_TIMEOUT_DEV 5
+#define HIL_TIMEOUT_DEVS 10
+#define HIL_TIMEOUT_NORESP 10
+#define HIL_TIMEOUT_DEVS_DATA 16
+#define HIL_TIMEOUT_SELFTEST 200
+
+#define HIL_WIRE_PACKET_LEN 15
+enum hil_wire_bitpos {
+ HIL_WIRE_START = 0,
+ HIL_WIRE_ADDR2,
+ HIL_WIRE_ADDR1,
+ HIL_WIRE_ADDR0,
+ HIL_WIRE_COMMAND,
+ HIL_WIRE_DATA7,
+ HIL_WIRE_DATA6,
+ HIL_WIRE_DATA5,
+ HIL_WIRE_DATA4,
+ HIL_WIRE_DATA3,
+ HIL_WIRE_DATA2,
+ HIL_WIRE_DATA1,
+ HIL_WIRE_DATA0,
+ HIL_WIRE_PARITY,
+ HIL_WIRE_STOP
+};
+
+enum hil_pkt_bitpos {
+ HIL_PKT_CMD = 0x00000800,
+ HIL_PKT_ADDR2 = 0x00000400,
+ HIL_PKT_ADDR1 = 0x00000200,
+ HIL_PKT_ADDR0 = 0x00000100,
+ HIL_PKT_ADDR_MASK = 0x00000700,
+ HIL_PKT_ADDR_SHIFT = 8,
+ HIL_PKT_DATA7 = 0x00000080,
+ HIL_PKT_DATA6 = 0x00000040,
+ HIL_PKT_DATA5 = 0x00000020,
+ HIL_PKT_DATA4 = 0x00000010,
+ HIL_PKT_DATA3 = 0x00000008,
+ HIL_PKT_DATA2 = 0x00000004,
+ HIL_PKT_DATA1 = 0x00000002,
+ HIL_PKT_DATA0 = 0x00000001,
+ HIL_PKT_DATA_MASK = 0x000000FF,
+ HIL_PKT_DATA_SHIFT = 0
+};
+
+enum hil_error_bitpos {
+ HIL_ERR_OB = 0x00000800,
+ HIL_ERR_INT = 0x00010000,
+ HIL_ERR_NMI = 0x00020000,
+ HIL_ERR_LERR = 0x00040000,
+ HIL_ERR_PERR = 0x01000000,
+ HIL_ERR_FERR = 0x02000000,
+ HIL_ERR_FOF = 0x04000000
+};
+
+enum hil_control_bitpos {
+ HIL_CTRL_TEST = 0x00010000,
+ HIL_CTRL_IPF = 0x00040000,
+ HIL_CTRL_APE = 0x02000000
+};
+
+#define HIL_DO_ALTER_CTRL 0x40000000
+#define HIL_CTRL_ONLY 0xc0000000
+
+typedef u32 hil_packet;
+
+enum hil_command {
+ HIL_CMD_IFC = 0x00,
+ HIL_CMD_EPT = 0x01,
+ HIL_CMD_ELB = 0x02,
+ HIL_CMD_IDD = 0x03,
+ HIL_CMD_DSR = 0x04,
+ HIL_CMD_PST = 0x05,
+ HIL_CMD_RRG = 0x06,
+ HIL_CMD_WRG = 0x07,
+ HIL_CMD_ACF = 0x08,
+ HIL_CMDID_ACF = 0x07,
+ HIL_CMD_POL = 0x10,
+ HIL_CMDCT_POL = 0x0f,
+ HIL_CMD_RPL = 0x20,
+ HIL_CMDCT_RPL = 0x0f,
+ HIL_CMD_RNM = 0x30,
+ HIL_CMD_RST = 0x31,
+ HIL_CMD_EXD = 0x32,
+ HIL_CMD_RSC = 0x33,
+
+ HIL_CMD_DKA = 0x3d,
+ HIL_CMD_EK1 = 0x3e,
+ HIL_CMD_EK2 = 0x3f,
+ HIL_CMD_PR1 = 0x40,
+ HIL_CMD_PR2 = 0x41,
+ HIL_CMD_PR3 = 0x42,
+ HIL_CMD_PR4 = 0x43,
+ HIL_CMD_PR5 = 0x44,
+ HIL_CMD_PR6 = 0x45,
+ HIL_CMD_PR7 = 0x46,
+ HIL_CMD_PRM = 0x47,
+ HIL_CMD_AK1 = 0x48,
+ HIL_CMD_AK2 = 0x49,
+ HIL_CMD_AK3 = 0x4a,
+ HIL_CMD_AK4 = 0x4b,
+ HIL_CMD_AK5 = 0x4c,
+ HIL_CMD_AK6 = 0x4d,
+ HIL_CMD_AK7 = 0x4e,
+ HIL_CMD_ACK = 0x4f,
+
+ HIL_CMD_RIO = 0xfa,
+ HIL_CMD_SHR = 0xfb,
+ HIL_CMD_TER = 0xfc,
+ HIL_CMD_CAE = 0xfd,
+ HIL_CMD_DHR = 0xfe,
+
+};
+
+#define HIL_IDD_DID_TYPE_MASK 0xe0
+#define HIL_IDD_DID_TYPE_KB_INTEGRAL 0xa0
+#define HIL_IDD_DID_TYPE_KB_ITF 0xc0
+#define HIL_IDD_DID_TYPE_KB_RSVD 0xe0
+#define HIL_IDD_DID_TYPE_KB_LANG_MASK 0x1f
+#define HIL_IDD_DID_KBLANG_USE_ESD 0x00
+#define HIL_IDD_DID_TYPE_ABS 0x80
+#define HIL_IDD_DID_ABS_RSVD1_MASK 0xf8
+#define HIL_IDD_DID_ABS_RSVD1 0x98
+#define HIL_IDD_DID_ABS_TABLET_MASK 0xf8
+#define HIL_IDD_DID_ABS_TABLET 0x90
+#define HIL_IDD_DID_ABS_TSCREEN_MASK 0xfc
+#define HIL_IDD_DID_ABS_TSCREEN 0x8c
+#define HIL_IDD_DID_ABS_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_ABS_RSVD2 0x88
+#define HIL_IDD_DID_ABS_RSVD3_MASK 0xfc
+#define HIL_IDD_DID_ABS_RSVD3 0x80
+#define HIL_IDD_DID_TYPE_REL 0x60
+#define HIL_IDD_DID_REL_RSVD1_MASK 0xf0
+#define HIL_IDD_DID_REL_RSVD1 0x70
+#define HIL_IDD_DID_REL_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_REL_RSVD2 0x6c
+#define HIL_IDD_DID_REL_MOUSE_MASK 0xfc
+#define HIL_IDD_DID_REL_MOUSE 0x68
+#define HIL_IDD_DID_REL_QUAD_MASK 0xf8
+#define HIL_IDD_DID_REL_QUAD 0x60
+#define HIL_IDD_DID_TYPE_CHAR 0x40
+#define HIL_IDD_DID_CHAR_BARCODE_MASK 0xfc
+#define HIL_IDD_DID_CHAR_BARCODE 0x5c
+#define HIL_IDD_DID_CHAR_RSVD1_MASK 0xfc
+#define HIL_IDD_DID_CHAR_RSVD1 0x58
+#define HIL_IDD_DID_CHAR_RSVD2_MASK 0xf8
+#define HIL_IDD_DID_CHAR_RSVD2 0x50
+#define HIL_IDD_DID_CHAR_RSVD3_MASK 0xf0
+#define HIL_IDD_DID_CHAR_RSVD3 0x40
+#define HIL_IDD_DID_TYPE_OTHER 0x20
+#define HIL_IDD_DID_OTHER_RSVD1_MASK 0xf0
+#define HIL_IDD_DID_OTHER_RSVD1 0x30
+#define HIL_IDD_DID_OTHER_BARCODE_MASK 0xfc
+#define HIL_IDD_DID_OTHER_BARCODE 0x2c
+#define HIL_IDD_DID_OTHER_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_OTHER_RSVD2 0x28
+#define HIL_IDD_DID_OTHER_RSVD3_MASK 0xf8
+#define HIL_IDD_DID_OTHER_RSVD3 0x20
+#define HIL_IDD_DID_TYPE_KEYPAD 0x00
+
+#define HIL_IDD_HEADER_AXSET_MASK 0x03
+#define HIL_IDD_HEADER_RSC 0x04
+#define HIL_IDD_HEADER_EXD 0x08
+#define HIL_IDD_HEADER_IOD 0x10
+#define HIL_IDD_HEADER_16BIT 0x20
+#define HIL_IDD_HEADER_ABS 0x40
+#define HIL_IDD_HEADER_2X_AXIS 0x80
+
+#define HIL_IDD_IOD_NBUTTON_MASK 0x07
+#define HIL_IDD_IOD_PROXIMITY 0x08
+#define HIL_IDD_IOD_PROMPT_MASK 0x70
+#define HIL_IDD_IOD_PROMPT_SHIFT 4
+#define HIL_IDD_IOD_PROMPT 0x80
+
+#define HIL_IDD_NUM_AXES_PER_SET(header_packet) ((header_packet) & HIL_IDD_HEADER_AXSET_MASK)
+
+#define HIL_IDD_NUM_AXSETS(header_packet) (2 - !((header_packet) & HIL_IDD_HEADER_2X_AXIS))
+
+#define HIL_IDD_LEN(header_packet) ((4 - !(header_packet & HIL_IDD_HEADER_IOD) - 2 * !(HIL_IDD_NUM_AXES_PER_SET(header_packet))) + 2 * HIL_IDD_NUM_AXES_PER_SET(header_packet) * !!((header_packet) & HIL_IDD_HEADER_ABS))
+
+#define HIL_IDD_AXIS_COUNTS_PER_M(header_ptr) (!(HIL_IDD_NUM_AXSETS(*(header_ptr))) ? -1 : (((*(header_ptr + 1) & HIL_PKT_DATA_MASK) + ((*(header_ptr + 2) & HIL_PKT_DATA_MASK)) << 8) * ((*(header_ptr) & HIL_IDD_HEADER_16BIT) ? 100 : 1)))
+
+#define HIL_IDD_AXIS_MAX(header_ptr, __axnum) ((!(*(header_ptr) & HIL_IDD_HEADER_ABS) || (HIL_IDD_NUM_AXES_PER_SET(*(header_ptr)) <= __axnum)) ? 0 : ((HIL_PKT_DATA_MASK & *((header_ptr) + 3 + 2 * __axnum)) + ((HIL_PKT_DATA_MASK & *((header_ptr) + 4 + 2 * __axnum)) << 8)))
+
+#define HIL_IDD_IOD(header_ptr) (*(header_ptr + HIL_IDD_LEN((*header_ptr)) - 1))
+
+#define HIL_IDD_HAS_GEN_PROMPT(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) && (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROMPT))
+
+#define HIL_IDD_HAS_GEN_PROXIMITY(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) && (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROXIMITY))
+
+#define HIL_IDD_NUM_BUTTONS(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) ? (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NBUTTON_MASK) : 0)
+
+#define HIL_IDD_NUM_PROMPTS(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) ? ((HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NPROMPT_MASK) >> HIL_IDD_IOD_PROMPT_SHIFT) : 0)
+
+#define HIL_EXD_HEADER_WRG 0x03
+#define HIL_EXD_HEADER_WRG_TYPE1 0x01
+#define HIL_EXD_HEADER_WRG_TYPE2 0x02
+#define HIL_EXD_HEADER_RRG 0x04
+#define HIL_EXD_HEADER_RNM 0x10
+#define HIL_EXD_HEADER_RST 0x20
+#define HIL_EXD_HEADER_LOCALE 0x40
+
+#define HIL_EXD_NUM_RRG(header_ptr) ((*header_ptr & HIL_EXD_HEADER_RRG) ? (*(header_ptr + 1) & HIL_PKT_DATA_MASK) : 0)
+
+#define HIL_EXD_NUM_WWG(header_ptr) ((*header_ptr & HIL_EXD_HEADER_WRG) ? (*(header_ptr + 2 - !(*header_ptr & HIL_EXD_HEADER_RRG)) & HIL_PKT_DATA_MASK) : 0)
+
+#define HIL_EXD_LEN(header_ptr) (!!(*header_ptr & HIL_EXD_HEADER_RRG) + !!(*header_ptr & HIL_EXD_HEADER_WRG) + !!(*header_ptr & HIL_EXD_HEADER_LOCALE) + 2 * !!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) + 1)
+
+#define HIL_EXD_LOCALE(header_ptr) (!(*header_ptr & HIL_EXD_HEADER_LOCALE) ? -1 : (*(header_ptr + HIL_EXD_LEN(header_ptr) - 1) & HIL_PKT_DATA_MASK))
+
+#define HIL_EXD_WRG_TYPE2_LEN(header_ptr) (!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) ? -1 : (*(header_ptr + HIL_EXD_LEN(header_ptr) - 2 - !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) + ((*(header_ptr + HIL_EXD_LEN(header_ptr) - 1 - !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) << 8))
+
+#define HIL_LOCALE_MAX 0x1f
+
+#define HIL_LOCALE_MAP "", "", "", "swiss.french", "portuguese", "arabic", "hebrew", "english.canadian", "turkish", "greek", "thai", "italian", "korean", "dutch", "swedish", "german", "chinese", "chinese", "swiss.french", "spanish", "swiss.german", "flemish", "finnish", "english.uk", "french.canadian", "swiss.german", "norwegian", "french", "danish", "japanese", "spanish", "english.us"
+
+#define HIL_KEYCODES_SET1_TBLSIZE 128
+#define HIL_KEYCODES_SET1 KEY_5, KEY_RESERVED, KEY_RIGHTALT, KEY_LEFTALT, KEY_RIGHTSHIFT, KEY_LEFTSHIFT, KEY_LEFTCTRL, KEY_SYSRQ, KEY_KP4, KEY_KP8, KEY_KP5, KEY_KP9, KEY_KP6, KEY_KP7, KEY_KPCOMMA, KEY_KPENTER, KEY_KP1, KEY_KPSLASH, KEY_KP2, KEY_KPPLUS, KEY_KP3, KEY_KPASTERISK, KEY_KP0, KEY_KPMINUS, KEY_B, KEY_V, KEY_C, KEY_X, KEY_Z, KEY_RESERVED, KEY_RESERVED, KEY_ESC, KEY_6, KEY_F10, KEY_3, KEY_F11, KEY_KPDOT, KEY_F9, KEY_TAB , KEY_F12, KEY_H, KEY_G, KEY_F, KEY_D, KEY_S, KEY_A, KEY_RESERVED, KEY_CAPSLOCK, KEY_U, KEY_Y, KEY_T, KEY_R, KEY_E, KEY_W, KEY_Q, KEY_TAB, KEY_7, KEY_6, KEY_5, KEY_4, KEY_3, KEY_2, KEY_1, KEY_GRAVE, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, KEY_F18, KEY_F19, KEY_F20, KEY_MENU, KEY_F4, KEY_F3, KEY_F2, KEY_F1, KEY_VOLUMEUP, KEY_STOP, KEY_SENDFILE, KEY_SYSRQ, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_VOLUMEDOWN, KEY_DEL_EOL, KEY_DEL_EOS, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUAL, KEY_BACKSPACE, KEY_INS_LINE, KEY_DEL_LINE, KEY_I, KEY_O, KEY_P, KEY_LEFTBRACE, KEY_RIGHTBRACE, KEY_BACKSLASH, KEY_INSERT, KEY_DELETE, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, KEY_APOSTROPHE, KEY_ENTER, KEY_HOME, KEY_PAGEUP, KEY_M, KEY_COMMA, KEY_DOT, KEY_SLASH, KEY_BACKSLASH, KEY_SELECT, KEY_102ND, KEY_PAGEDOWN, KEY_N, KEY_SPACE, KEY_NEXT, KEY_RESERVED, KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT
+
+#define HIL_KEYCODES_SET3_TBLSIZE 128
+#define HIL_KEYCODES_SET3 KEY_RESERVED, KEY_ESC, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUAL, KEY_BACKSPACE, KEY_TAB, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_LEFTBRACE, KEY_RIGHTBRACE, KEY_ENTER, KEY_LEFTCTRL, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, KEY_APOSTROPHE,KEY_GRAVE, KEY_LEFTSHIFT, KEY_BACKSLASH, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, KEY_COMMA, KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, KEY_KPASTERISK, KEY_LEFTALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KPMINUS, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KPPLUS, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT, KEY_SYSRQ, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_UP, KEY_LEFT, KEY_DOWN, KEY_RIGHT, KEY_HOME, KEY_PAGEUP, KEY_END, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, KEY_102ND, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED
+
+#define HIL_POL_NUM_AXES_MASK 0x03
+#define HIL_POL_CTS 0x04
+#define HIL_POL_STATUS_PENDING 0x08
+#define HIL_POL_CHARTYPE_MASK 0x70
+#define HIL_POL_CHARTYPE_NONE 0x00
+#define HIL_POL_CHARTYPE_RSVD1 0x10
+#define HIL_POL_CHARTYPE_ASCII 0x20
+#define HIL_POL_CHARTYPE_BINARY 0x30
+#define HIL_POL_CHARTYPE_SET1 0x40
+#define HIL_POL_CHARTYPE_RSVD2 0x50
+#define HIL_POL_CHARTYPE_SET2 0x60
+#define HIL_POL_CHARTYPE_SET3 0x70
+#define HIL_POL_AXIS_ALT 0x80
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/i2c.h b/6/platforms/android-3/arch-arm/usr/include/linux/i2c.h
new file mode 100644
index 0000000..9513fc6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/i2c.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_I2C_H
+#define _LINUX_I2C_H
+
+#include <linux/types.h>
+
+struct i2c_msg {
+ __u16 addr;
+ __u16 flags;
+#define I2C_M_TEN 0x10
+#define I2C_M_RD 0x01
+#define I2C_M_NOSTART 0x4000
+#define I2C_M_REV_DIR_ADDR 0x2000
+#define I2C_M_IGNORE_NAK 0x1000
+#define I2C_M_NO_RD_ACK 0x0800
+ __u16 len;
+ __u8 *buf;
+};
+
+#define I2C_FUNC_I2C 0x00000001
+#define I2C_FUNC_10BIT_ADDR 0x00000002
+#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004
+#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008
+#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000
+#define I2C_FUNC_SMBUS_QUICK 0x00010000
+#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
+#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
+#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
+#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
+#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
+#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
+#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
+#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
+#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000
+
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
+
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | I2C_FUNC_SMBUS_I2C_BLOCK)
+
+#define I2C_SMBUS_BLOCK_MAX 32
+union i2c_smbus_data {
+ __u8 byte;
+ __u16 word;
+ __u8 block[I2C_SMBUS_BLOCK_MAX + 2];
+
+};
+
+#define I2C_SMBUS_READ 1
+#define I2C_SMBUS_WRITE 0
+
+#define I2C_SMBUS_QUICK 0
+#define I2C_SMBUS_BYTE 1
+#define I2C_SMBUS_BYTE_DATA 2
+#define I2C_SMBUS_WORD_DATA 3
+#define I2C_SMBUS_PROC_CALL 4
+#define I2C_SMBUS_BLOCK_DATA 5
+#define I2C_SMBUS_I2C_BLOCK_DATA 6
+#define I2C_SMBUS_BLOCK_PROC_CALL 7
+
+#define I2C_RETRIES 0x0701
+
+#define I2C_TIMEOUT 0x0702
+
+#define I2C_SLAVE 0x0703
+
+#define I2C_SLAVE_FORCE 0x0706
+
+#define I2C_TENBIT 0x0704
+
+#define I2C_FUNCS 0x0705
+#define I2C_RDWR 0x0707
+#define I2C_PEC 0x0708
+
+#define I2C_SMBUS 0x0720
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/icmp.h b/6/platforms/android-3/arch-arm/usr/include/linux/icmp.h
new file mode 100644
index 0000000..c5b58bb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/icmp.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ICMP_H
+#define _LINUX_ICMP_H
+
+#include <linux/types.h>
+
+#define ICMP_ECHOREPLY 0
+#define ICMP_DEST_UNREACH 3
+#define ICMP_SOURCE_QUENCH 4
+#define ICMP_REDIRECT 5
+#define ICMP_ECHO 8
+#define ICMP_TIME_EXCEEDED 11
+#define ICMP_PARAMETERPROB 12
+#define ICMP_TIMESTAMP 13
+#define ICMP_TIMESTAMPREPLY 14
+#define ICMP_INFO_REQUEST 15
+#define ICMP_INFO_REPLY 16
+#define ICMP_ADDRESS 17
+#define ICMP_ADDRESSREPLY 18
+#define NR_ICMP_TYPES 18
+
+#define ICMP_NET_UNREACH 0
+#define ICMP_HOST_UNREACH 1
+#define ICMP_PROT_UNREACH 2
+#define ICMP_PORT_UNREACH 3
+#define ICMP_FRAG_NEEDED 4
+#define ICMP_SR_FAILED 5
+#define ICMP_NET_UNKNOWN 6
+#define ICMP_HOST_UNKNOWN 7
+#define ICMP_HOST_ISOLATED 8
+#define ICMP_NET_ANO 9
+#define ICMP_HOST_ANO 10
+#define ICMP_NET_UNR_TOS 11
+#define ICMP_HOST_UNR_TOS 12
+#define ICMP_PKT_FILTERED 13
+#define ICMP_PREC_VIOLATION 14
+#define ICMP_PREC_CUTOFF 15
+#define NR_ICMP_UNREACH 15
+
+#define ICMP_REDIR_NET 0
+#define ICMP_REDIR_HOST 1
+#define ICMP_REDIR_NETTOS 2
+#define ICMP_REDIR_HOSTTOS 3
+
+#define ICMP_EXC_TTL 0
+#define ICMP_EXC_FRAGTIME 1
+
+struct icmphdr {
+ __u8 type;
+ __u8 code;
+ __u16 checksum;
+ union {
+ struct {
+ __u16 id;
+ __u16 sequence;
+ } echo;
+ __u32 gateway;
+ struct {
+ __u16 __unused_field;
+ __u16 mtu;
+ } frag;
+ } un;
+};
+
+#define ICMP_FILTER 1
+
+struct icmp_filter {
+ __u32 data;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if.h b/6/platforms/android-3/arch-arm/usr/include/linux/if.h
new file mode 100644
index 0000000..47c29d9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_H
+#define _LINUX_IF_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/compiler.h>
+
+#define IFNAMSIZ 16
+#include <linux/hdlc/ioctl.h>
+
+#define IFF_UP 0x1
+#define IFF_BROADCAST 0x2
+#define IFF_DEBUG 0x4
+#define IFF_LOOPBACK 0x8
+#define IFF_POINTOPOINT 0x10
+#define IFF_NOTRAILERS 0x20
+#define IFF_RUNNING 0x40
+#define IFF_NOARP 0x80
+#define IFF_PROMISC 0x100
+#define IFF_ALLMULTI 0x200
+
+#define IFF_MASTER 0x400
+#define IFF_SLAVE 0x800
+
+#define IFF_MULTICAST 0x1000
+
+#define IFF_PORTSEL 0x2000
+#define IFF_AUTOMEDIA 0x4000
+#define IFF_DYNAMIC 0x8000
+
+#define IFF_LOWER_UP 0x10000
+#define IFF_DORMANT 0x20000
+
+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
+
+#define IFF_802_1Q_VLAN 0x1
+#define IFF_EBRIDGE 0x2
+#define IFF_SLAVE_INACTIVE 0x4
+#define IFF_MASTER_8023AD 0x8
+#define IFF_MASTER_ALB 0x10
+
+#define IF_GET_IFACE 0x0001
+#define IF_GET_PROTO 0x0002
+
+#define IF_IFACE_V35 0x1000
+#define IF_IFACE_V24 0x1001
+#define IF_IFACE_X21 0x1002
+#define IF_IFACE_T1 0x1003
+#define IF_IFACE_E1 0x1004
+#define IF_IFACE_SYNC_SERIAL 0x1005
+#define IF_IFACE_X21D 0x1006
+
+#define IF_PROTO_HDLC 0x2000
+#define IF_PROTO_PPP 0x2001
+#define IF_PROTO_CISCO 0x2002
+#define IF_PROTO_FR 0x2003
+#define IF_PROTO_FR_ADD_PVC 0x2004
+#define IF_PROTO_FR_DEL_PVC 0x2005
+#define IF_PROTO_X25 0x2006
+#define IF_PROTO_HDLC_ETH 0x2007
+#define IF_PROTO_FR_ADD_ETH_PVC 0x2008
+#define IF_PROTO_FR_DEL_ETH_PVC 0x2009
+#define IF_PROTO_FR_PVC 0x200A
+#define IF_PROTO_FR_ETH_PVC 0x200B
+#define IF_PROTO_RAW 0x200C
+
+enum {
+ IF_OPER_UNKNOWN,
+ IF_OPER_NOTPRESENT,
+ IF_OPER_DOWN,
+ IF_OPER_LOWERLAYERDOWN,
+ IF_OPER_TESTING,
+ IF_OPER_DORMANT,
+ IF_OPER_UP,
+};
+
+enum {
+ IF_LINK_MODE_DEFAULT,
+ IF_LINK_MODE_DORMANT,
+};
+
+struct ifmap
+{
+ unsigned long mem_start;
+ unsigned long mem_end;
+ unsigned short base_addr;
+ unsigned char irq;
+ unsigned char dma;
+ unsigned char port;
+
+};
+
+struct if_settings
+{
+ unsigned int type;
+ unsigned int size;
+ union {
+
+ raw_hdlc_proto __user *raw_hdlc;
+ cisco_proto __user *cisco;
+ fr_proto __user *fr;
+ fr_proto_pvc __user *fr_pvc;
+ fr_proto_pvc_info __user *fr_pvc_info;
+
+ sync_serial_settings __user *sync;
+ te1_settings __user *te1;
+ } ifs_ifsu;
+};
+
+struct ifreq
+{
+#define IFHWADDRLEN 6
+ union
+ {
+ char ifrn_name[IFNAMSIZ];
+ } ifr_ifrn;
+
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ struct sockaddr ifru_netmask;
+ struct sockaddr ifru_hwaddr;
+ short ifru_flags;
+ int ifru_ivalue;
+ int ifru_mtu;
+ struct ifmap ifru_map;
+ char ifru_slave[IFNAMSIZ];
+ char ifru_newname[IFNAMSIZ];
+ void __user * ifru_data;
+ struct if_settings ifru_settings;
+ } ifr_ifru;
+};
+
+#define ifr_name ifr_ifrn.ifrn_name
+#define ifr_hwaddr ifr_ifru.ifru_hwaddr
+#define ifr_addr ifr_ifru.ifru_addr
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr
+#define ifr_netmask ifr_ifru.ifru_netmask
+#define ifr_flags ifr_ifru.ifru_flags
+#define ifr_metric ifr_ifru.ifru_ivalue
+#define ifr_mtu ifr_ifru.ifru_mtu
+#define ifr_map ifr_ifru.ifru_map
+#define ifr_slave ifr_ifru.ifru_slave
+#define ifr_data ifr_ifru.ifru_data
+#define ifr_ifindex ifr_ifru.ifru_ivalue
+#define ifr_bandwidth ifr_ifru.ifru_ivalue
+#define ifr_qlen ifr_ifru.ifru_ivalue
+#define ifr_newname ifr_ifru.ifru_newname
+#define ifr_settings ifr_ifru.ifru_settings
+
+struct ifconf
+{
+ int ifc_len;
+ union
+ {
+ char __user *ifcu_buf;
+ struct ifreq __user *ifcu_req;
+ } ifc_ifcu;
+};
+#define ifc_buf ifc_ifcu.ifcu_buf
+#define ifc_req ifc_ifcu.ifcu_req
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_arcnet.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_arcnet.h
new file mode 100644
index 0000000..a1ad877
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_arcnet.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ARCNET_H
+#define _LINUX_IF_ARCNET_H
+
+#include <linux/if_ether.h>
+
+#define ARC_P_IP 212
+#define ARC_P_IPV6 196
+#define ARC_P_ARP 213
+#define ARC_P_RARP 214
+#define ARC_P_IPX 250
+#define ARC_P_NOVELL_EC 236
+
+#define ARC_P_IP_RFC1051 240
+#define ARC_P_ARP_RFC1051 241
+
+#define ARC_P_ETHER 232
+
+#define ARC_P_DATAPOINT_BOOT 0
+#define ARC_P_DATAPOINT_MOUNT 1
+#define ARC_P_POWERLAN_BEACON 8
+#define ARC_P_POWERLAN_BEACON2 243
+#define ARC_P_LANSOFT 251
+#define ARC_P_ATALK 0xDD
+
+#define ARCNET_ALEN 1
+
+struct arc_rfc1201
+{
+ uint8_t proto;
+ uint8_t split_flag;
+ uint16_t sequence;
+ uint8_t payload[0];
+};
+#define RFC1201_HDR_SIZE 4
+
+struct arc_rfc1051
+{
+ uint8_t proto;
+ uint8_t payload[0];
+};
+#define RFC1051_HDR_SIZE 1
+
+struct arc_eth_encap
+{
+ uint8_t proto;
+ struct ethhdr eth;
+ uint8_t payload[0];
+};
+#define ETH_ENCAP_HDR_SIZE 14
+
+struct arc_cap
+{
+ uint8_t proto;
+ uint8_t cookie[sizeof(int)];
+ union {
+ uint8_t ack;
+ uint8_t raw[0];
+ } mes;
+};
+
+struct arc_hardware
+{
+ uint8_t source,
+ dest,
+ offset[2];
+};
+#define ARC_HDR_SIZE 4
+
+struct archdr
+{
+
+ struct arc_hardware hard;
+
+ union {
+ struct arc_rfc1201 rfc1201;
+ struct arc_rfc1051 rfc1051;
+ struct arc_eth_encap eth_encap;
+ struct arc_cap cap;
+ uint8_t raw[0];
+ } soft;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_arp.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_arp.h
new file mode 100644
index 0000000..1da50f5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_arp.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ARP_H
+#define _LINUX_IF_ARP_H
+
+#include <linux/netdevice.h>
+
+#define ARPHRD_NETROM 0
+#define ARPHRD_ETHER 1
+#define ARPHRD_EETHER 2
+#define ARPHRD_AX25 3
+#define ARPHRD_PRONET 4
+#define ARPHRD_CHAOS 5
+#define ARPHRD_IEEE802 6
+#define ARPHRD_ARCNET 7
+#define ARPHRD_APPLETLK 8
+#define ARPHRD_DLCI 15
+#define ARPHRD_ATM 19
+#define ARPHRD_METRICOM 23
+#define ARPHRD_IEEE1394 24
+#define ARPHRD_EUI64 27
+#define ARPHRD_INFINIBAND 32
+
+#define ARPHRD_SLIP 256
+#define ARPHRD_CSLIP 257
+#define ARPHRD_SLIP6 258
+#define ARPHRD_CSLIP6 259
+#define ARPHRD_RSRVD 260
+#define ARPHRD_ADAPT 264
+#define ARPHRD_ROSE 270
+#define ARPHRD_X25 271
+#define ARPHRD_HWX25 272
+#define ARPHRD_PPP 512
+#define ARPHRD_CISCO 513
+#define ARPHRD_HDLC ARPHRD_CISCO
+#define ARPHRD_LAPB 516
+#define ARPHRD_DDCMP 517
+#define ARPHRD_RAWHDLC 518
+
+#define ARPHRD_TUNNEL 768
+#define ARPHRD_TUNNEL6 769
+#define ARPHRD_FRAD 770
+#define ARPHRD_SKIP 771
+#define ARPHRD_LOOPBACK 772
+#define ARPHRD_LOCALTLK 773
+#define ARPHRD_FDDI 774
+#define ARPHRD_BIF 775
+#define ARPHRD_SIT 776
+#define ARPHRD_IPDDP 777
+#define ARPHRD_IPGRE 778
+#define ARPHRD_PIMREG 779
+#define ARPHRD_HIPPI 780
+#define ARPHRD_ASH 781
+#define ARPHRD_ECONET 782
+#define ARPHRD_IRDA 783
+
+#define ARPHRD_FCPP 784
+#define ARPHRD_FCAL 785
+#define ARPHRD_FCPL 786
+#define ARPHRD_FCFABRIC 787
+
+#define ARPHRD_IEEE802_TR 800
+#define ARPHRD_IEEE80211 801
+#define ARPHRD_IEEE80211_PRISM 802
+#define ARPHRD_IEEE80211_RADIOTAP 803
+
+#define ARPHRD_VOID 0xFFFF
+#define ARPHRD_NONE 0xFFFE
+
+#define ARPOP_REQUEST 1
+#define ARPOP_REPLY 2
+#define ARPOP_RREQUEST 3
+#define ARPOP_RREPLY 4
+#define ARPOP_InREQUEST 8
+#define ARPOP_InREPLY 9
+#define ARPOP_NAK 10
+
+struct arpreq {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+ char arp_dev[16];
+};
+
+struct arpreq_old {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+};
+
+#define ATF_COM 0x02
+#define ATF_PERM 0x04
+#define ATF_PUBL 0x08
+#define ATF_USETRAILERS 0x10
+#define ATF_NETMASK 0x20
+#define ATF_DONTPUB 0x40
+
+struct arphdr
+{
+ unsigned short ar_hrd;
+ unsigned short ar_pro;
+ unsigned char ar_hln;
+ unsigned char ar_pln;
+ unsigned short ar_op;
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_bridge.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_bridge.h
new file mode 100644
index 0000000..93f9494
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_bridge.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_BRIDGE_H
+#define _LINUX_IF_BRIDGE_H
+
+#include <linux/types.h>
+
+#define SYSFS_BRIDGE_ATTR "bridge"
+#define SYSFS_BRIDGE_FDB "brforward"
+#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
+#define SYSFS_BRIDGE_PORT_ATTR "brport"
+#define SYSFS_BRIDGE_PORT_LINK "bridge"
+
+#define BRCTL_VERSION 1
+
+#define BRCTL_GET_VERSION 0
+#define BRCTL_GET_BRIDGES 1
+#define BRCTL_ADD_BRIDGE 2
+#define BRCTL_DEL_BRIDGE 3
+#define BRCTL_ADD_IF 4
+#define BRCTL_DEL_IF 5
+#define BRCTL_GET_BRIDGE_INFO 6
+#define BRCTL_GET_PORT_LIST 7
+#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
+#define BRCTL_SET_BRIDGE_HELLO_TIME 9
+#define BRCTL_SET_BRIDGE_MAX_AGE 10
+#define BRCTL_SET_AGEING_TIME 11
+#define BRCTL_SET_GC_INTERVAL 12
+#define BRCTL_GET_PORT_INFO 13
+#define BRCTL_SET_BRIDGE_STP_STATE 14
+#define BRCTL_SET_BRIDGE_PRIORITY 15
+#define BRCTL_SET_PORT_PRIORITY 16
+#define BRCTL_SET_PATH_COST 17
+#define BRCTL_GET_FDB_ENTRIES 18
+
+#define BR_STATE_DISABLED 0
+#define BR_STATE_LISTENING 1
+#define BR_STATE_LEARNING 2
+#define BR_STATE_FORWARDING 3
+#define BR_STATE_BLOCKING 4
+
+struct __bridge_info
+{
+ __u64 designated_root;
+ __u64 bridge_id;
+ __u32 root_path_cost;
+ __u32 max_age;
+ __u32 hello_time;
+ __u32 forward_delay;
+ __u32 bridge_max_age;
+ __u32 bridge_hello_time;
+ __u32 bridge_forward_delay;
+ __u8 topology_change;
+ __u8 topology_change_detected;
+ __u8 root_port;
+ __u8 stp_enabled;
+ __u32 ageing_time;
+ __u32 gc_interval;
+ __u32 hello_timer_value;
+ __u32 tcn_timer_value;
+ __u32 topology_change_timer_value;
+ __u32 gc_timer_value;
+};
+
+struct __port_info
+{
+ __u64 designated_root;
+ __u64 designated_bridge;
+ __u16 port_id;
+ __u16 designated_port;
+ __u32 path_cost;
+ __u32 designated_cost;
+ __u8 state;
+ __u8 top_change_ack;
+ __u8 config_pending;
+ __u8 unused0;
+ __u32 message_age_timer_value;
+ __u32 forward_delay_timer_value;
+ __u32 hold_timer_value;
+};
+
+struct __fdb_entry
+{
+ __u8 mac_addr[6];
+ __u8 port_no;
+ __u8 is_local;
+ __u32 ageing_timer_value;
+ __u32 unused;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_ether.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_ether.h
new file mode 100644
index 0000000..ff89c3d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_ether.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ETHER_H
+#define _LINUX_IF_ETHER_H
+
+#include <linux/types.h>
+
+#define ETH_ALEN 6
+#define ETH_HLEN 14
+#define ETH_ZLEN 60
+#define ETH_DATA_LEN 1500
+#define ETH_FRAME_LEN 1514
+
+#define ETH_P_LOOP 0x0060
+#define ETH_P_PUP 0x0200
+#define ETH_P_PUPAT 0x0201
+#define ETH_P_IP 0x0800
+#define ETH_P_X25 0x0805
+#define ETH_P_ARP 0x0806
+#define ETH_P_BPQ 0x08FF
+#define ETH_P_IEEEPUP 0x0a00
+#define ETH_P_IEEEPUPAT 0x0a01
+#define ETH_P_DEC 0x6000
+#define ETH_P_DNA_DL 0x6001
+#define ETH_P_DNA_RC 0x6002
+#define ETH_P_DNA_RT 0x6003
+#define ETH_P_LAT 0x6004
+#define ETH_P_DIAG 0x6005
+#define ETH_P_CUST 0x6006
+#define ETH_P_SCA 0x6007
+#define ETH_P_RARP 0x8035
+#define ETH_P_ATALK 0x809B
+#define ETH_P_AARP 0x80F3
+#define ETH_P_8021Q 0x8100
+#define ETH_P_IPX 0x8137
+#define ETH_P_IPV6 0x86DD
+#define ETH_P_SLOW 0x8809
+#define ETH_P_WCCP 0x883E
+#define ETH_P_PPP_DISC 0x8863
+#define ETH_P_PPP_SES 0x8864
+#define ETH_P_MPLS_UC 0x8847
+#define ETH_P_MPLS_MC 0x8848
+#define ETH_P_ATMMPOA 0x884c
+#define ETH_P_ATMFATE 0x8884
+#define ETH_P_AOE 0x88A2
+#define ETH_P_TIPC 0x88CA
+
+#define ETH_P_802_3 0x0001
+#define ETH_P_AX25 0x0002
+#define ETH_P_ALL 0x0003
+#define ETH_P_802_2 0x0004
+#define ETH_P_SNAP 0x0005
+#define ETH_P_DDCMP 0x0006
+#define ETH_P_WAN_PPP 0x0007
+#define ETH_P_PPP_MP 0x0008
+#define ETH_P_LOCALTALK 0x0009
+#define ETH_P_PPPTALK 0x0010
+#define ETH_P_TR_802_2 0x0011
+#define ETH_P_MOBITEX 0x0015
+#define ETH_P_CONTROL 0x0016
+#define ETH_P_IRDA 0x0017
+#define ETH_P_ECONET 0x0018
+#define ETH_P_HDLC 0x0019
+#define ETH_P_ARCNET 0x001A
+
+struct ethhdr {
+ unsigned char h_dest[ETH_ALEN];
+ unsigned char h_source[ETH_ALEN];
+ __be16 h_proto;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_fc.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_fc.h
new file mode 100644
index 0000000..a6a47b4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_fc.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_FC_H
+#define _LINUX_IF_FC_H
+
+#define FC_ALEN 6
+#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
+#define FC_ID_LEN 3
+
+#define EXTENDED_SAP 0xAA
+#define UI_CMD 0x03
+
+struct fch_hdr {
+ __u8 daddr[FC_ALEN];
+ __u8 saddr[FC_ALEN];
+};
+
+struct fcllc {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 llc;
+ __u8 protid[3];
+ __be16 ethertype;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_fddi.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_fddi.h
new file mode 100644
index 0000000..f59492f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_fddi.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_FDDI_H
+#define _LINUX_IF_FDDI_H
+
+#define FDDI_K_ALEN 6
+#define FDDI_K_8022_HLEN 16
+#define FDDI_K_SNAP_HLEN 21
+#define FDDI_K_8022_ZLEN 16
+#define FDDI_K_SNAP_ZLEN 21
+#define FDDI_K_8022_DLEN 4475
+#define FDDI_K_SNAP_DLEN 4470
+#define FDDI_K_LLC_ZLEN 13
+#define FDDI_K_LLC_LEN 4491
+
+#define FDDI_FC_K_VOID 0x00
+#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80
+#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0
+#define FDDI_FC_K_SMT_MIN 0x41
+#define FDDI_FC_K_SMT_MAX 0x4F
+#define FDDI_FC_K_MAC_MIN 0xC1
+#define FDDI_FC_K_MAC_MAX 0xCF
+#define FDDI_FC_K_ASYNC_LLC_MIN 0x50
+#define FDDI_FC_K_ASYNC_LLC_DEF 0x54
+#define FDDI_FC_K_ASYNC_LLC_MAX 0x5F
+#define FDDI_FC_K_SYNC_LLC_MIN 0xD0
+#define FDDI_FC_K_SYNC_LLC_MAX 0xD7
+#define FDDI_FC_K_IMPLEMENTOR_MIN 0x60
+#define FDDI_FC_K_IMPLEMENTOR_MAX 0x6F
+#define FDDI_FC_K_RESERVED_MIN 0x70
+#define FDDI_FC_K_RESERVED_MAX 0x7F
+
+#define FDDI_EXTENDED_SAP 0xAA
+#define FDDI_UI_CMD 0x03
+
+struct fddi_8022_1_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ } __attribute__ ((packed));
+
+struct fddi_8022_2_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl_1;
+ __u8 ctrl_2;
+ } __attribute__ ((packed));
+
+#define FDDI_K_OUI_LEN 3
+struct fddi_snap_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ __u8 oui[FDDI_K_OUI_LEN];
+ __be16 ethertype;
+ } __attribute__ ((packed));
+
+struct fddihdr
+ {
+ __u8 fc;
+ __u8 daddr[FDDI_K_ALEN];
+ __u8 saddr[FDDI_K_ALEN];
+ union
+ {
+ struct fddi_8022_1_hdr llc_8022_1;
+ struct fddi_8022_2_hdr llc_8022_2;
+ struct fddi_snap_hdr llc_snap;
+ } hdr;
+ } __attribute__ ((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_hippi.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_hippi.h
new file mode 100644
index 0000000..52d36f6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_hippi.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_HIPPI_H
+#define _LINUX_IF_HIPPI_H
+
+#include <asm/byteorder.h>
+
+#define HIPPI_ALEN 6
+#define HIPPI_HLEN sizeof(struct hippi_hdr)
+#define HIPPI_ZLEN 0
+#define HIPPI_DATA_LEN 65280
+#define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN)
+
+#define HIPPI_EXTENDED_SAP 0xAA
+#define HIPPI_UI_CMD 0x03
+
+struct hipnet_statistics
+{
+ int rx_packets;
+ int tx_packets;
+ int rx_errors;
+ int tx_errors;
+ int rx_dropped;
+ int tx_dropped;
+
+ int rx_length_errors;
+ int rx_over_errors;
+ int rx_crc_errors;
+ int rx_frame_errors;
+ int rx_fifo_errors;
+ int rx_missed_errors;
+
+ int tx_aborted_errors;
+ int tx_carrier_errors;
+ int tx_fifo_errors;
+ int tx_heartbeat_errors;
+ int tx_window_errors;
+};
+
+struct hippi_fp_hdr
+{
+ __be32 fixed;
+ __be32 d2_size;
+} __attribute__ ((packed));
+
+struct hippi_le_hdr
+{
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 fc:3;
+ __u8 double_wide:1;
+ __u8 message_type:4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 message_type:4;
+ __u8 double_wide:1;
+ __u8 fc:3;
+#endif
+ __u8 dest_switch_addr[3];
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 dest_addr_type:4,
+ src_addr_type:4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 src_addr_type:4,
+ dest_addr_type:4;
+#endif
+ __u8 src_switch_addr[3];
+ __u16 reserved;
+ __u8 daddr[HIPPI_ALEN];
+ __u16 locally_administered;
+ __u8 saddr[HIPPI_ALEN];
+} __attribute__ ((packed));
+
+#define HIPPI_OUI_LEN 3
+
+struct hippi_snap_hdr
+{
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ __u8 oui[HIPPI_OUI_LEN];
+ __be16 ethertype;
+} __attribute__ ((packed));
+
+struct hippi_hdr
+{
+ struct hippi_fp_hdr fp;
+ struct hippi_le_hdr le;
+ struct hippi_snap_hdr snap;
+} __attribute__ ((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_packet.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_packet.h
new file mode 100644
index 0000000..1aa3bea
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_packet.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IF_PACKET_H
+#define __LINUX_IF_PACKET_H
+
+struct sockaddr_pkt
+{
+ unsigned short spkt_family;
+ unsigned char spkt_device[14];
+ unsigned short spkt_protocol;
+};
+
+struct sockaddr_ll
+{
+ unsigned short sll_family;
+ unsigned short sll_protocol;
+ int sll_ifindex;
+ unsigned short sll_hatype;
+ unsigned char sll_pkttype;
+ unsigned char sll_halen;
+ unsigned char sll_addr[8];
+};
+
+#define PACKET_HOST 0
+#define PACKET_BROADCAST 1
+#define PACKET_MULTICAST 2
+#define PACKET_OTHERHOST 3
+#define PACKET_OUTGOING 4
+
+#define PACKET_LOOPBACK 5
+#define PACKET_FASTROUTE 6
+
+#define PACKET_ADD_MEMBERSHIP 1
+#define PACKET_DROP_MEMBERSHIP 2
+#define PACKET_RECV_OUTPUT 3
+
+#define PACKET_RX_RING 5
+#define PACKET_STATISTICS 6
+#define PACKET_COPY_THRESH 7
+
+struct tpacket_stats
+{
+ unsigned int tp_packets;
+ unsigned int tp_drops;
+};
+
+struct tpacket_hdr
+{
+ unsigned long tp_status;
+#define TP_STATUS_KERNEL 0
+#define TP_STATUS_USER 1
+#define TP_STATUS_COPY 2
+#define TP_STATUS_LOSING 4
+#define TP_STATUS_CSUMNOTREADY 8
+ unsigned int tp_len;
+ unsigned int tp_snaplen;
+ unsigned short tp_mac;
+ unsigned short tp_net;
+ unsigned int tp_sec;
+ unsigned int tp_usec;
+};
+
+#define TPACKET_ALIGNMENT 16
+#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
+#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
+
+struct tpacket_req
+{
+ unsigned int tp_block_size;
+ unsigned int tp_block_nr;
+ unsigned int tp_frame_size;
+ unsigned int tp_frame_nr;
+};
+
+struct packet_mreq
+{
+ int mr_ifindex;
+ unsigned short mr_type;
+ unsigned short mr_alen;
+ unsigned char mr_address[8];
+};
+
+#define PACKET_MR_MULTICAST 0
+#define PACKET_MR_PROMISC 1
+#define PACKET_MR_ALLMULTI 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_ppp.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_ppp.h
new file mode 100644
index 0000000..9f35c97
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_ppp.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IF_PPP_H_
+#define _IF_PPP_H_
+
+#include <linux/compiler.h>
+
+#define PPP_MTU 1500
+#define PPP_MAXMRU 65000
+#define PROTO_IPX 0x002b
+#define PROTO_DNA_RT 0x0027
+
+#define SC_COMP_PROT 0x00000001
+#define SC_COMP_AC 0x00000002
+#define SC_COMP_TCP 0x00000004
+#define SC_NO_TCP_CCID 0x00000008
+#define SC_REJ_COMP_AC 0x00000010
+#define SC_REJ_COMP_TCP 0x00000020
+#define SC_CCP_OPEN 0x00000040
+#define SC_CCP_UP 0x00000080
+#define SC_ENABLE_IP 0x00000100
+#define SC_LOOP_TRAFFIC 0x00000200
+#define SC_MULTILINK 0x00000400
+#define SC_MP_SHORTSEQ 0x00000800
+#define SC_COMP_RUN 0x00001000
+#define SC_DECOMP_RUN 0x00002000
+#define SC_MP_XSHORTSEQ 0x00004000
+#define SC_DEBUG 0x00010000
+#define SC_LOG_INPKT 0x00020000
+#define SC_LOG_OUTPKT 0x00040000
+#define SC_LOG_RAWIN 0x00080000
+#define SC_LOG_FLUSH 0x00100000
+#define SC_SYNC 0x00200000
+#define SC_MUST_COMP 0x00400000
+#define SC_MASK 0x0f600fff
+
+#define SC_XMIT_BUSY 0x10000000
+#define SC_RCV_ODDP 0x08000000
+#define SC_RCV_EVNP 0x04000000
+#define SC_RCV_B7_1 0x02000000
+#define SC_RCV_B7_0 0x01000000
+#define SC_DC_FERROR 0x00800000
+#define SC_DC_ERROR 0x00400000
+
+struct npioctl {
+ int protocol;
+ enum NPmode mode;
+};
+
+struct ppp_option_data {
+ __u8 __user *ptr;
+ __u32 length;
+ int transmit;
+};
+
+struct ifpppstatsreq {
+ struct ifreq b;
+ struct ppp_stats stats;
+};
+
+struct ifpppcstatsreq {
+ struct ifreq b;
+ struct ppp_comp_stats stats;
+};
+
+#define ifr__name b.ifr_ifrn.ifrn_name
+#define stats_ptr b.ifr_ifru.ifru_data
+
+#define PPPIOCGFLAGS _IOR('t', 90, int)
+#define PPPIOCSFLAGS _IOW('t', 89, int)
+#define PPPIOCGASYNCMAP _IOR('t', 88, int)
+#define PPPIOCSASYNCMAP _IOW('t', 87, int)
+#define PPPIOCGUNIT _IOR('t', 86, int)
+#define PPPIOCGRASYNCMAP _IOR('t', 85, int)
+#define PPPIOCSRASYNCMAP _IOW('t', 84, int)
+#define PPPIOCGMRU _IOR('t', 83, int)
+#define PPPIOCSMRU _IOW('t', 82, int)
+#define PPPIOCSMAXCID _IOW('t', 81, int)
+#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm)
+#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm)
+#define PPPIOCXFERUNIT _IO('t', 78)
+#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
+#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl)
+#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl)
+#define PPPIOCSPASS _IOW('t', 71, struct sock_fprog)
+#define PPPIOCSACTIVE _IOW('t', 70, struct sock_fprog)
+#define PPPIOCGDEBUG _IOR('t', 65, int)
+#define PPPIOCSDEBUG _IOW('t', 64, int)
+#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle)
+#define PPPIOCNEWUNIT _IOWR('t', 62, int)
+#define PPPIOCATTACH _IOW('t', 61, int)
+#define PPPIOCDETACH _IOW('t', 60, int)
+#define PPPIOCSMRRU _IOW('t', 59, int)
+#define PPPIOCCONNECT _IOW('t', 58, int)
+#define PPPIOCDISCONN _IO('t', 57)
+#define PPPIOCATTCHAN _IOW('t', 56, int)
+#define PPPIOCGCHAN _IOR('t', 55, int)
+
+#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
+#define SIOCGPPPVER (SIOCDEVPRIVATE + 1)
+#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
+
+#ifndef ifr_mtu
+#define ifr_mtu ifr_ifru.ifru_metric
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_tr.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_tr.h
new file mode 100644
index 0000000..7d6319a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_tr.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_TR_H
+#define _LINUX_IF_TR_H
+
+#include <asm/byteorder.h>
+
+#define TR_ALEN 6
+#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc))
+#define AC 0x10
+#define LLC_FRAME 0x40
+
+#define EXTENDED_SAP 0xAA
+#define UI_CMD 0x03
+
+struct trh_hdr {
+ __u8 ac;
+ __u8 fc;
+ __u8 daddr[TR_ALEN];
+ __u8 saddr[TR_ALEN];
+ __be16 rcf;
+ __be16 rseg[8];
+};
+
+struct trllc {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 llc;
+ __u8 protid[3];
+ __be16 ethertype;
+};
+
+struct tr_statistics {
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors;
+ unsigned long tx_errors;
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long multicast;
+ unsigned long transmit_collision;
+
+ unsigned long line_errors;
+ unsigned long internal_errors;
+ unsigned long burst_errors;
+ unsigned long A_C_errors;
+ unsigned long abort_delimiters;
+ unsigned long lost_frames;
+ unsigned long recv_congest_count;
+ unsigned long frame_copied_errors;
+ unsigned long frequency_errors;
+ unsigned long token_errors;
+ unsigned long dummy1;
+};
+
+#define TR_RII 0x80
+#define TR_RCF_DIR_BIT 0x80
+#define TR_RCF_LEN_MASK 0x1f00
+#define TR_RCF_BROADCAST 0x8000
+#define TR_RCF_LIMITED_BROADCAST 0xC000
+#define TR_RCF_FRAME2K 0x20
+#define TR_RCF_BROADCAST_MASK 0xC000
+#define TR_MAXRIFLEN 18
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_tun.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_tun.h
new file mode 100644
index 0000000..c5db4e0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_tun.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __IF_TUN_H
+#define __IF_TUN_H
+
+#define TUN_READQ_SIZE 500
+
+#define TUN_TUN_DEV 0x0001
+#define TUN_TAP_DEV 0x0002
+#define TUN_TYPE_MASK 0x000f
+
+#define TUN_FASYNC 0x0010
+#define TUN_NOCHECKSUM 0x0020
+#define TUN_NO_PI 0x0040
+#define TUN_ONE_QUEUE 0x0080
+#define TUN_PERSIST 0x0100
+
+#define TUNSETNOCSUM _IOW('T', 200, int)
+#define TUNSETDEBUG _IOW('T', 201, int)
+#define TUNSETIFF _IOW('T', 202, int)
+#define TUNSETPERSIST _IOW('T', 203, int)
+#define TUNSETOWNER _IOW('T', 204, int)
+#define TUNSETLINK _IOW('T', 205, int)
+
+#define IFF_TUN 0x0001
+#define IFF_TAP 0x0002
+#define IFF_NO_PI 0x1000
+#define IFF_ONE_QUEUE 0x2000
+
+struct tun_pi {
+ unsigned short flags;
+ unsigned short proto;
+};
+#define TUN_PKT_STRIP 0x0001
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/if_vlan.h b/6/platforms/android-3/arch-arm/usr/include/linux/if_vlan.h
new file mode 100644
index 0000000..d3d2df2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/if_vlan.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_VLAN_H_
+#define _LINUX_IF_VLAN_H_
+
+enum vlan_ioctl_cmds {
+ ADD_VLAN_CMD,
+ DEL_VLAN_CMD,
+ SET_VLAN_INGRESS_PRIORITY_CMD,
+ SET_VLAN_EGRESS_PRIORITY_CMD,
+ GET_VLAN_INGRESS_PRIORITY_CMD,
+ GET_VLAN_EGRESS_PRIORITY_CMD,
+ SET_VLAN_NAME_TYPE_CMD,
+ SET_VLAN_FLAG_CMD,
+ GET_VLAN_REALDEV_NAME_CMD,
+ GET_VLAN_VID_CMD
+};
+
+enum vlan_name_types {
+ VLAN_NAME_TYPE_PLUS_VID,
+ VLAN_NAME_TYPE_RAW_PLUS_VID,
+ VLAN_NAME_TYPE_PLUS_VID_NO_PAD,
+ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD,
+ VLAN_NAME_TYPE_HIGHEST
+};
+
+struct vlan_ioctl_args {
+ int cmd;
+ char device1[24];
+
+ union {
+ char device2[24];
+ int VID;
+ unsigned int skb_priority;
+ unsigned int name_type;
+ unsigned int bind_type;
+ unsigned int flag;
+ } u;
+
+ short vlan_qos;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/in.h b/6/platforms/android-3/arch-arm/usr/include/linux/in.h
new file mode 100644
index 0000000..894e2da
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/in.h
@@ -0,0 +1,211 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IN_H
+#define _LINUX_IN_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+
+enum {
+ IPPROTO_IP = 0,
+ IPPROTO_ICMP = 1,
+ IPPROTO_IGMP = 2,
+ IPPROTO_IPIP = 4,
+ IPPROTO_TCP = 6,
+ IPPROTO_EGP = 8,
+ IPPROTO_PUP = 12,
+ IPPROTO_UDP = 17,
+ IPPROTO_IDP = 22,
+ IPPROTO_DCCP = 33,
+ IPPROTO_RSVP = 46,
+ IPPROTO_GRE = 47,
+
+ IPPROTO_IPV6 = 41,
+
+ IPPROTO_ESP = 50,
+ IPPROTO_AH = 51,
+ IPPROTO_PIM = 103,
+
+ IPPROTO_COMP = 108,
+ IPPROTO_SCTP = 132,
+
+ IPPROTO_RAW = 255,
+ IPPROTO_MAX
+};
+
+struct in_addr {
+ __u32 s_addr;
+};
+
+#define IP_TOS 1
+#define IP_TTL 2
+#define IP_HDRINCL 3
+#define IP_OPTIONS 4
+#define IP_ROUTER_ALERT 5
+#define IP_RECVOPTS 6
+#define IP_RETOPTS 7
+#define IP_PKTINFO 8
+#define IP_PKTOPTIONS 9
+#define IP_MTU_DISCOVER 10
+#define IP_RECVERR 11
+#define IP_RECVTTL 12
+#define IP_RECVTOS 13
+#define IP_MTU 14
+#define IP_FREEBIND 15
+#define IP_IPSEC_POLICY 16
+#define IP_XFRM_POLICY 17
+#define IP_PASSSEC 18
+
+#define IP_RECVRETOPTS IP_RETOPTS
+
+#define IP_PMTUDISC_DONT 0
+#define IP_PMTUDISC_WANT 1
+#define IP_PMTUDISC_DO 2
+
+#define IP_MULTICAST_IF 32
+#define IP_MULTICAST_TTL 33
+#define IP_MULTICAST_LOOP 34
+#define IP_ADD_MEMBERSHIP 35
+#define IP_DROP_MEMBERSHIP 36
+#define IP_UNBLOCK_SOURCE 37
+#define IP_BLOCK_SOURCE 38
+#define IP_ADD_SOURCE_MEMBERSHIP 39
+#define IP_DROP_SOURCE_MEMBERSHIP 40
+#define IP_MSFILTER 41
+#define MCAST_JOIN_GROUP 42
+#define MCAST_BLOCK_SOURCE 43
+#define MCAST_UNBLOCK_SOURCE 44
+#define MCAST_LEAVE_GROUP 45
+#define MCAST_JOIN_SOURCE_GROUP 46
+#define MCAST_LEAVE_SOURCE_GROUP 47
+#define MCAST_MSFILTER 48
+
+#define MCAST_EXCLUDE 0
+#define MCAST_INCLUDE 1
+
+#define IP_DEFAULT_MULTICAST_TTL 1
+#define IP_DEFAULT_MULTICAST_LOOP 1
+
+struct ip_mreq
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+
+struct ip_mreqn
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_address;
+ int imr_ifindex;
+};
+
+struct ip_mreq_source {
+ __u32 imr_multiaddr;
+ __u32 imr_interface;
+ __u32 imr_sourceaddr;
+};
+
+struct ip_msfilter {
+ __u32 imsf_multiaddr;
+ __u32 imsf_interface;
+ __u32 imsf_fmode;
+ __u32 imsf_numsrc;
+ __u32 imsf_slist[1];
+};
+
+#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32))
+
+struct group_req
+{
+ __u32 gr_interface;
+ struct __kernel_sockaddr_storage gr_group;
+};
+
+struct group_source_req
+{
+ __u32 gsr_interface;
+ struct __kernel_sockaddr_storage gsr_group;
+ struct __kernel_sockaddr_storage gsr_source;
+};
+
+struct group_filter
+{
+ __u32 gf_interface;
+ struct __kernel_sockaddr_storage gf_group;
+ __u32 gf_fmode;
+ __u32 gf_numsrc;
+ struct __kernel_sockaddr_storage gf_slist[1];
+};
+
+#define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + (numsrc) * sizeof(struct __kernel_sockaddr_storage))
+
+struct in_pktinfo
+{
+ int ipi_ifindex;
+ struct in_addr ipi_spec_dst;
+ struct in_addr ipi_addr;
+};
+
+#define __SOCK_SIZE__ 16
+struct sockaddr_in {
+ sa_family_t sin_family;
+ unsigned short int sin_port;
+ struct in_addr sin_addr;
+
+ unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
+ sizeof(unsigned short int) - sizeof(struct in_addr)];
+};
+#define sin_zero __pad
+
+#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
+#define IN_CLASSA_NET 0xff000000
+#define IN_CLASSA_NSHIFT 24
+#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
+#define IN_CLASSA_MAX 128
+
+#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
+#define IN_CLASSB_NET 0xffff0000
+#define IN_CLASSB_NSHIFT 16
+#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
+#define IN_CLASSB_MAX 65536
+
+#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000)
+#define IN_CLASSC_NET 0xffffff00
+#define IN_CLASSC_NSHIFT 8
+#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
+
+#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
+#define IN_MULTICAST(a) IN_CLASSD(a)
+#define IN_MULTICAST_NET 0xF0000000
+
+#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
+#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
+
+#define INADDR_ANY ((unsigned long int) 0x00000000)
+
+#define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
+
+#define INADDR_NONE ((unsigned long int) 0xffffffff)
+
+#define IN_LOOPBACKNET 127
+
+#define INADDR_LOOPBACK 0x7f000001
+#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
+
+#define INADDR_UNSPEC_GROUP 0xe0000000U
+#define INADDR_ALLHOSTS_GROUP 0xe0000001U
+#define INADDR_ALLRTRS_GROUP 0xe0000002U
+#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU
+
+#include <asm/byteorder.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/in6.h b/6/platforms/android-3/arch-arm/usr/include/linux/in6.h
new file mode 100644
index 0000000..ceaeb7d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/in6.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IN6_H
+#define _LINUX_IN6_H
+
+#include <linux/types.h>
+
+struct in6_addr
+{
+ union
+ {
+ __u8 u6_addr8[16];
+ __u16 u6_addr16[8];
+ __u32 u6_addr32[4];
+ } in6_u;
+#define s6_addr in6_u.u6_addr8
+#define s6_addr16 in6_u.u6_addr16
+#define s6_addr32 in6_u.u6_addr32
+};
+
+#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
+
+struct sockaddr_in6 {
+ unsigned short int sin6_family;
+ __u16 sin6_port;
+ __u32 sin6_flowinfo;
+ struct in6_addr sin6_addr;
+ __u32 sin6_scope_id;
+};
+
+struct ipv6_mreq {
+
+ struct in6_addr ipv6mr_multiaddr;
+
+ int ipv6mr_ifindex;
+};
+
+#define ipv6mr_acaddr ipv6mr_multiaddr
+
+struct in6_flowlabel_req
+{
+ struct in6_addr flr_dst;
+ __u32 flr_label;
+ __u8 flr_action;
+ __u8 flr_share;
+ __u16 flr_flags;
+ __u16 flr_expires;
+ __u16 flr_linger;
+ __u32 __flr_pad;
+
+};
+
+#define IPV6_FL_A_GET 0
+#define IPV6_FL_A_PUT 1
+#define IPV6_FL_A_RENEW 2
+
+#define IPV6_FL_F_CREATE 1
+#define IPV6_FL_F_EXCL 2
+
+#define IPV6_FL_S_NONE 0
+#define IPV6_FL_S_EXCL 1
+#define IPV6_FL_S_PROCESS 2
+#define IPV6_FL_S_USER 3
+#define IPV6_FL_S_ANY 255
+
+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
+
+#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
+#define IPV6_PRIORITY_FILLER 0x0100
+#define IPV6_PRIORITY_UNATTENDED 0x0200
+#define IPV6_PRIORITY_RESERVED1 0x0300
+#define IPV6_PRIORITY_BULK 0x0400
+#define IPV6_PRIORITY_RESERVED2 0x0500
+#define IPV6_PRIORITY_INTERACTIVE 0x0600
+#define IPV6_PRIORITY_CONTROL 0x0700
+#define IPV6_PRIORITY_8 0x0800
+#define IPV6_PRIORITY_9 0x0900
+#define IPV6_PRIORITY_10 0x0a00
+#define IPV6_PRIORITY_11 0x0b00
+#define IPV6_PRIORITY_12 0x0c00
+#define IPV6_PRIORITY_13 0x0d00
+#define IPV6_PRIORITY_14 0x0e00
+#define IPV6_PRIORITY_15 0x0f00
+
+#define IPPROTO_HOPOPTS 0
+#define IPPROTO_ROUTING 43
+#define IPPROTO_FRAGMENT 44
+#define IPPROTO_ICMPV6 58
+#define IPPROTO_NONE 59
+#define IPPROTO_DSTOPTS 60
+
+#define IPV6_TLV_PAD0 0
+#define IPV6_TLV_PADN 1
+#define IPV6_TLV_ROUTERALERT 5
+#define IPV6_TLV_JUMBO 194
+
+#define IPV6_ADDRFORM 1
+#define IPV6_2292PKTINFO 2
+#define IPV6_2292HOPOPTS 3
+#define IPV6_2292DSTOPTS 4
+#define IPV6_2292RTHDR 5
+#define IPV6_2292PKTOPTIONS 6
+#define IPV6_CHECKSUM 7
+#define IPV6_2292HOPLIMIT 8
+#define IPV6_NEXTHOP 9
+#define IPV6_AUTHHDR 10
+#define IPV6_FLOWINFO 11
+
+#define IPV6_UNICAST_HOPS 16
+#define IPV6_MULTICAST_IF 17
+#define IPV6_MULTICAST_HOPS 18
+#define IPV6_MULTICAST_LOOP 19
+#define IPV6_ADD_MEMBERSHIP 20
+#define IPV6_DROP_MEMBERSHIP 21
+#define IPV6_ROUTER_ALERT 22
+#define IPV6_MTU_DISCOVER 23
+#define IPV6_MTU 24
+#define IPV6_RECVERR 25
+#define IPV6_V6ONLY 26
+#define IPV6_JOIN_ANYCAST 27
+#define IPV6_LEAVE_ANYCAST 28
+
+#define IPV6_PMTUDISC_DONT 0
+#define IPV6_PMTUDISC_WANT 1
+#define IPV6_PMTUDISC_DO 2
+
+#define IPV6_FLOWLABEL_MGR 32
+#define IPV6_FLOWINFO_SEND 33
+
+#define IPV6_IPSEC_POLICY 34
+#define IPV6_XFRM_POLICY 35
+
+#define IPV6_RECVPKTINFO 49
+#define IPV6_PKTINFO 50
+#define IPV6_RECVHOPLIMIT 51
+#define IPV6_HOPLIMIT 52
+#define IPV6_RECVHOPOPTS 53
+#define IPV6_HOPOPTS 54
+#define IPV6_RTHDRDSTOPTS 55
+#define IPV6_RECVRTHDR 56
+#define IPV6_RTHDR 57
+#define IPV6_RECVDSTOPTS 58
+#define IPV6_DSTOPTS 59
+
+#define IPV6_RECVTCLASS 66
+#define IPV6_TCLASS 67
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/init.h b/6/platforms/android-3/arch-arm/usr/include/linux/init.h
new file mode 100644
index 0000000..846c4eb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/init.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INIT_H
+#define _LINUX_INIT_H
+
+#include <linux/compiler.h>
+
+#define __init __attribute__ ((__section__ (".init.text")))
+#define __initdata __attribute__ ((__section__ (".init.data")))
+#define __exitdata __attribute__ ((__section__(".exit.data")))
+#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
+
+#ifdef MODULE
+#define __exit __attribute__ ((__section__(".exit.text")))
+#else
+#define __exit __attribute_used__ __attribute__ ((__section__(".exit.text")))
+#endif
+
+#define __INIT .section ".init.text","ax"
+#define __FINIT .previous
+#define __INITDATA .section ".init.data","aw"
+
+#ifndef __ASSEMBLY__
+
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+#endif
+
+#ifndef MODULE
+
+#ifndef __ASSEMBLY__
+
+#define __define_initcall(level,fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".initcall" level ".init"))) = fn
+
+#define core_initcall(fn) __define_initcall("1",fn)
+#define postcore_initcall(fn) __define_initcall("2",fn)
+#define arch_initcall(fn) __define_initcall("3",fn)
+#define subsys_initcall(fn) __define_initcall("4",fn)
+#define fs_initcall(fn) __define_initcall("5",fn)
+#define device_initcall(fn) __define_initcall("6",fn)
+#define late_initcall(fn) __define_initcall("7",fn)
+
+#define __initcall(fn) device_initcall(fn)
+
+#define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn
+
+#define console_initcall(fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".con_initcall.init")))=fn
+
+#define security_initcall(fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".security_initcall.init"))) = fn
+
+struct obs_kernel_param {
+ const char *str;
+ int (*setup_func)(char *);
+ int early;
+};
+
+#define __setup_param(str, unique_id, fn, early) static char __setup_str_##unique_id[] __initdata = str; static struct obs_kernel_param __setup_##unique_id __attribute_used__ __attribute__((__section__(".init.setup"))) __attribute__((aligned((sizeof(long))))) = { __setup_str_##unique_id, fn, early }
+
+#define __setup_null_param(str, unique_id) __setup_param(str, unique_id, NULL, 0)
+
+#define __setup(str, fn) __setup_param(str, fn, fn, 0)
+
+#define __obsolete_setup(str) __setup_null_param(str, __LINE__)
+
+#define early_param(str, fn) __setup_param(str, fn, fn, 1)
+
+#endif
+
+#define module_init(x) __initcall(x);
+
+#define module_exit(x) __exitcall(x);
+
+#else
+
+#define core_initcall(fn) module_init(fn)
+#define postcore_initcall(fn) module_init(fn)
+#define arch_initcall(fn) module_init(fn)
+#define subsys_initcall(fn) module_init(fn)
+#define fs_initcall(fn) module_init(fn)
+#define device_initcall(fn) module_init(fn)
+#define late_initcall(fn) module_init(fn)
+
+#define security_initcall(fn) module_init(fn)
+
+#define module_init(initfn) static inline initcall_t __inittest(void) { return initfn; } int init_module(void) __attribute__((alias(#initfn)));
+
+#define module_exit(exitfn) static inline exitcall_t __exittest(void) { return exitfn; } void cleanup_module(void) __attribute__((alias(#exitfn)));
+
+#define __setup_param(str, unique_id, fn)
+#define __setup_null_param(str, unique_id)
+#define __setup(str, func)
+#define __obsolete_setup(str)
+#endif
+
+#define __nosavedata __attribute__ ((__section__ (".data.nosave")))
+
+#define __init_or_module __init
+#define __initdata_or_module __initdata
+
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit __exit
+#define __devexitdata __exitdata
+
+#define __cpuinit __init
+#define __cpuinitdata __initdata
+#define __cpuexit __exit
+#define __cpuexitdata __exitdata
+
+#define __meminit __init
+#define __meminitdata __initdata
+#define __memexit __exit
+#define __memexitdata __exitdata
+
+#ifdef MODULE
+#define __devexit_p(x) x
+#else
+#define __devexit_p(x) NULL
+#endif
+
+#ifdef MODULE
+#define __exit_p(x) x
+#else
+#define __exit_p(x) NULL
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/inotify.h b/6/platforms/android-3/arch-arm/usr/include/linux/inotify.h
new file mode 100644
index 0000000..db53417
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/inotify.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INOTIFY_H
+#define _LINUX_INOTIFY_H
+
+#include <linux/types.h>
+
+struct inotify_event {
+ __s32 wd;
+ __u32 mask;
+ __u32 cookie;
+ __u32 len;
+ char name[0];
+};
+
+#define IN_ACCESS 0x00000001
+#define IN_MODIFY 0x00000002
+#define IN_ATTRIB 0x00000004
+#define IN_CLOSE_WRITE 0x00000008
+#define IN_CLOSE_NOWRITE 0x00000010
+#define IN_OPEN 0x00000020
+#define IN_MOVED_FROM 0x00000040
+#define IN_MOVED_TO 0x00000080
+#define IN_CREATE 0x00000100
+#define IN_DELETE 0x00000200
+#define IN_DELETE_SELF 0x00000400
+#define IN_MOVE_SELF 0x00000800
+
+#define IN_UNMOUNT 0x00002000
+#define IN_Q_OVERFLOW 0x00004000
+#define IN_IGNORED 0x00008000
+
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO)
+
+#define IN_ONLYDIR 0x01000000
+#define IN_DONT_FOLLOW 0x02000000
+#define IN_MASK_ADD 0x20000000
+#define IN_ISDIR 0x40000000
+#define IN_ONESHOT 0x80000000
+
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | IN_MOVE_SELF)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/input.h b/6/platforms/android-3/arch-arm/usr/include/linux/input.h
new file mode 100644
index 0000000..96dae14
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/input.h
@@ -0,0 +1,715 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _INPUT_H
+#define _INPUT_H
+
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <asm/types.h>
+
+struct input_event {
+ struct timeval time;
+ __u16 type;
+ __u16 code;
+ __s32 value;
+};
+
+#define EV_VERSION 0x010000
+
+struct input_id {
+ __u16 bustype;
+ __u16 vendor;
+ __u16 product;
+ __u16 version;
+};
+
+struct input_absinfo {
+ __s32 value;
+ __s32 minimum;
+ __s32 maximum;
+ __s32 fuzz;
+ __s32 flat;
+};
+
+#define EVIOCGVERSION _IOR('E', 0x01, int)
+#define EVIOCGID _IOR('E', 0x02, struct input_id)
+#define EVIOCGREP _IOR('E', 0x03, int[2])
+#define EVIOCSREP _IOW('E', 0x03, int[2])
+#define EVIOCGKEYCODE _IOR('E', 0x04, int[2])
+#define EVIOCSKEYCODE _IOW('E', 0x04, int[2])
+
+#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len)
+#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len)
+#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len)
+
+#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len)
+#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len)
+#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len)
+#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len)
+
+#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len)
+#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo)
+#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo)
+
+#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect))
+#define EVIOCRMFF _IOW('E', 0x81, int)
+#define EVIOCGEFFECTS _IOR('E', 0x84, int)
+
+#define EVIOCGRAB _IOW('E', 0x90, int)
+
+#define EV_SYN 0x00
+#define EV_KEY 0x01
+#define EV_REL 0x02
+#define EV_ABS 0x03
+#define EV_MSC 0x04
+#define EV_SW 0x05
+#define EV_LED 0x11
+#define EV_SND 0x12
+#define EV_REP 0x14
+#define EV_FF 0x15
+#define EV_PWR 0x16
+#define EV_FF_STATUS 0x17
+#define EV_MAX 0x1f
+
+#define SYN_REPORT 0
+#define SYN_CONFIG 1
+
+#define KEY_RESERVED 0
+#define KEY_ESC 1
+#define KEY_1 2
+#define KEY_2 3
+#define KEY_3 4
+#define KEY_4 5
+#define KEY_5 6
+#define KEY_6 7
+#define KEY_7 8
+#define KEY_8 9
+#define KEY_9 10
+#define KEY_0 11
+#define KEY_MINUS 12
+#define KEY_EQUAL 13
+#define KEY_BACKSPACE 14
+#define KEY_TAB 15
+#define KEY_Q 16
+#define KEY_W 17
+#define KEY_E 18
+#define KEY_R 19
+#define KEY_T 20
+#define KEY_Y 21
+#define KEY_U 22
+#define KEY_I 23
+#define KEY_O 24
+#define KEY_P 25
+#define KEY_LEFTBRACE 26
+#define KEY_RIGHTBRACE 27
+#define KEY_ENTER 28
+#define KEY_LEFTCTRL 29
+#define KEY_A 30
+#define KEY_S 31
+#define KEY_D 32
+#define KEY_F 33
+#define KEY_G 34
+#define KEY_H 35
+#define KEY_J 36
+#define KEY_K 37
+#define KEY_L 38
+#define KEY_SEMICOLON 39
+#define KEY_APOSTROPHE 40
+#define KEY_GRAVE 41
+#define KEY_LEFTSHIFT 42
+#define KEY_BACKSLASH 43
+#define KEY_Z 44
+#define KEY_X 45
+#define KEY_C 46
+#define KEY_V 47
+#define KEY_B 48
+#define KEY_N 49
+#define KEY_M 50
+#define KEY_COMMA 51
+#define KEY_DOT 52
+#define KEY_SLASH 53
+#define KEY_RIGHTSHIFT 54
+#define KEY_KPASTERISK 55
+#define KEY_LEFTALT 56
+#define KEY_SPACE 57
+#define KEY_CAPSLOCK 58
+#define KEY_F1 59
+#define KEY_F2 60
+#define KEY_F3 61
+#define KEY_F4 62
+#define KEY_F5 63
+#define KEY_F6 64
+#define KEY_F7 65
+#define KEY_F8 66
+#define KEY_F9 67
+#define KEY_F10 68
+#define KEY_NUMLOCK 69
+#define KEY_SCROLLLOCK 70
+#define KEY_KP7 71
+#define KEY_KP8 72
+#define KEY_KP9 73
+#define KEY_KPMINUS 74
+#define KEY_KP4 75
+#define KEY_KP5 76
+#define KEY_KP6 77
+#define KEY_KPPLUS 78
+#define KEY_KP1 79
+#define KEY_KP2 80
+#define KEY_KP3 81
+#define KEY_KP0 82
+#define KEY_KPDOT 83
+
+#define KEY_ZENKAKUHANKAKU 85
+#define KEY_102ND 86
+#define KEY_F11 87
+#define KEY_F12 88
+#define KEY_RO 89
+#define KEY_KATAKANA 90
+#define KEY_HIRAGANA 91
+#define KEY_HENKAN 92
+#define KEY_KATAKANAHIRAGANA 93
+#define KEY_MUHENKAN 94
+#define KEY_KPJPCOMMA 95
+#define KEY_KPENTER 96
+#define KEY_RIGHTCTRL 97
+#define KEY_KPSLASH 98
+#define KEY_SYSRQ 99
+#define KEY_RIGHTALT 100
+#define KEY_LINEFEED 101
+#define KEY_HOME 102
+#define KEY_UP 103
+#define KEY_PAGEUP 104
+#define KEY_LEFT 105
+#define KEY_RIGHT 106
+#define KEY_END 107
+#define KEY_DOWN 108
+#define KEY_PAGEDOWN 109
+#define KEY_INSERT 110
+#define KEY_DELETE 111
+#define KEY_MACRO 112
+#define KEY_MUTE 113
+#define KEY_VOLUMEDOWN 114
+#define KEY_VOLUMEUP 115
+#define KEY_POWER 116
+#define KEY_KPEQUAL 117
+#define KEY_KPPLUSMINUS 118
+#define KEY_PAUSE 119
+
+#define KEY_KPCOMMA 121
+#define KEY_HANGEUL 122
+#define KEY_HANGUEL KEY_HANGEUL
+#define KEY_HANJA 123
+#define KEY_YEN 124
+#define KEY_LEFTMETA 125
+#define KEY_RIGHTMETA 126
+#define KEY_COMPOSE 127
+
+#define KEY_STOP 128
+#define KEY_AGAIN 129
+#define KEY_PROPS 130
+#define KEY_UNDO 131
+#define KEY_FRONT 132
+#define KEY_COPY 133
+#define KEY_OPEN 134
+#define KEY_PASTE 135
+#define KEY_FIND 136
+#define KEY_CUT 137
+#define KEY_HELP 138
+#define KEY_MENU 139
+#define KEY_CALC 140
+#define KEY_SETUP 141
+#define KEY_SLEEP 142
+#define KEY_WAKEUP 143
+#define KEY_FILE 144
+#define KEY_SENDFILE 145
+#define KEY_DELETEFILE 146
+#define KEY_XFER 147
+#define KEY_PROG1 148
+#define KEY_PROG2 149
+#define KEY_WWW 150
+#define KEY_MSDOS 151
+#define KEY_COFFEE 152
+#define KEY_DIRECTION 153
+#define KEY_CYCLEWINDOWS 154
+#define KEY_MAIL 155
+#define KEY_BOOKMARKS 156
+#define KEY_COMPUTER 157
+#define KEY_BACK 158
+#define KEY_FORWARD 159
+#define KEY_CLOSECD 160
+#define KEY_EJECTCD 161
+#define KEY_EJECTCLOSECD 162
+#define KEY_NEXTSONG 163
+#define KEY_PLAYPAUSE 164
+#define KEY_PREVIOUSSONG 165
+#define KEY_STOPCD 166
+#define KEY_RECORD 167
+#define KEY_REWIND 168
+#define KEY_PHONE 169
+#define KEY_ISO 170
+#define KEY_CONFIG 171
+#define KEY_HOMEPAGE 172
+#define KEY_REFRESH 173
+#define KEY_EXIT 174
+#define KEY_MOVE 175
+#define KEY_EDIT 176
+#define KEY_SCROLLUP 177
+#define KEY_SCROLLDOWN 178
+#define KEY_KPLEFTPAREN 179
+#define KEY_KPRIGHTPAREN 180
+#define KEY_NEW 181
+#define KEY_REDO 182
+
+#define KEY_F13 183
+#define KEY_F14 184
+#define KEY_F15 185
+#define KEY_F16 186
+#define KEY_F17 187
+#define KEY_F18 188
+#define KEY_F19 189
+#define KEY_F20 190
+#define KEY_F21 191
+#define KEY_F22 192
+#define KEY_F23 193
+#define KEY_F24 194
+
+#define KEY_PLAYCD 200
+#define KEY_PAUSECD 201
+#define KEY_PROG3 202
+#define KEY_PROG4 203
+#define KEY_SUSPEND 205
+#define KEY_CLOSE 206
+#define KEY_PLAY 207
+#define KEY_FASTFORWARD 208
+#define KEY_BASSBOOST 209
+#define KEY_PRINT 210
+#define KEY_HP 211
+#define KEY_CAMERA 212
+#define KEY_SOUND 213
+#define KEY_QUESTION 214
+#define KEY_EMAIL 215
+#define KEY_CHAT 216
+#define KEY_SEARCH 217
+#define KEY_CONNECT 218
+#define KEY_FINANCE 219
+#define KEY_SPORT 220
+#define KEY_SHOP 221
+#define KEY_ALTERASE 222
+#define KEY_CANCEL 223
+#define KEY_BRIGHTNESSDOWN 224
+#define KEY_BRIGHTNESSUP 225
+#define KEY_MEDIA 226
+
+#define KEY_STAR 227
+#define KEY_SHARP 228
+#define KEY_SOFT1 229
+#define KEY_SOFT2 230
+#define KEY_SEND 231
+#define KEY_CENTER 232
+#define KEY_HEADSETHOOK 233
+#define KEY_0_5 234
+#define KEY_2_5 235
+
+#define KEY_SWITCHVIDEOMODE 236
+#define KEY_KBDILLUMTOGGLE 237
+#define KEY_KBDILLUMDOWN 238
+#define KEY_KBDILLUMUP 239
+
+#define KEY_SEND 231
+#define KEY_REPLY 232
+#define KEY_FORWARDMAIL 233
+#define KEY_SAVE 234
+#define KEY_DOCUMENTS 235
+
+#define KEY_BATTERY 236
+
+#define KEY_UNKNOWN 240
+
+#define BTN_MISC 0x100
+#define BTN_0 0x100
+#define BTN_1 0x101
+#define BTN_2 0x102
+#define BTN_3 0x103
+#define BTN_4 0x104
+#define BTN_5 0x105
+#define BTN_6 0x106
+#define BTN_7 0x107
+#define BTN_8 0x108
+#define BTN_9 0x109
+
+#define BTN_MOUSE 0x110
+#define BTN_LEFT 0x110
+#define BTN_RIGHT 0x111
+#define BTN_MIDDLE 0x112
+#define BTN_SIDE 0x113
+#define BTN_EXTRA 0x114
+#define BTN_FORWARD 0x115
+#define BTN_BACK 0x116
+#define BTN_TASK 0x117
+
+#define BTN_JOYSTICK 0x120
+#define BTN_TRIGGER 0x120
+#define BTN_THUMB 0x121
+#define BTN_THUMB2 0x122
+#define BTN_TOP 0x123
+#define BTN_TOP2 0x124
+#define BTN_PINKIE 0x125
+#define BTN_BASE 0x126
+#define BTN_BASE2 0x127
+#define BTN_BASE3 0x128
+#define BTN_BASE4 0x129
+#define BTN_BASE5 0x12a
+#define BTN_BASE6 0x12b
+#define BTN_DEAD 0x12f
+
+#define BTN_GAMEPAD 0x130
+#define BTN_A 0x130
+#define BTN_B 0x131
+#define BTN_C 0x132
+#define BTN_X 0x133
+#define BTN_Y 0x134
+#define BTN_Z 0x135
+#define BTN_TL 0x136
+#define BTN_TR 0x137
+#define BTN_TL2 0x138
+#define BTN_TR2 0x139
+#define BTN_SELECT 0x13a
+#define BTN_START 0x13b
+#define BTN_MODE 0x13c
+#define BTN_THUMBL 0x13d
+#define BTN_THUMBR 0x13e
+
+#define BTN_DIGI 0x140
+#define BTN_TOOL_PEN 0x140
+#define BTN_TOOL_RUBBER 0x141
+#define BTN_TOOL_BRUSH 0x142
+#define BTN_TOOL_PENCIL 0x143
+#define BTN_TOOL_AIRBRUSH 0x144
+#define BTN_TOOL_FINGER 0x145
+#define BTN_TOOL_MOUSE 0x146
+#define BTN_TOOL_LENS 0x147
+#define BTN_TOUCH 0x14a
+#define BTN_STYLUS 0x14b
+#define BTN_STYLUS2 0x14c
+#define BTN_TOOL_DOUBLETAP 0x14d
+#define BTN_TOOL_TRIPLETAP 0x14e
+
+#define BTN_WHEEL 0x150
+#define BTN_GEAR_DOWN 0x150
+#define BTN_GEAR_UP 0x151
+
+#define KEY_OK 0x160
+#define KEY_SELECT 0x161
+#define KEY_GOTO 0x162
+#define KEY_CLEAR 0x163
+#define KEY_POWER2 0x164
+#define KEY_OPTION 0x165
+#define KEY_INFO 0x166
+#define KEY_TIME 0x167
+#define KEY_VENDOR 0x168
+#define KEY_ARCHIVE 0x169
+#define KEY_PROGRAM 0x16a
+#define KEY_CHANNEL 0x16b
+#define KEY_FAVORITES 0x16c
+#define KEY_EPG 0x16d
+#define KEY_PVR 0x16e
+#define KEY_MHP 0x16f
+#define KEY_LANGUAGE 0x170
+#define KEY_TITLE 0x171
+#define KEY_SUBTITLE 0x172
+#define KEY_ANGLE 0x173
+#define KEY_ZOOM 0x174
+#define KEY_MODE 0x175
+#define KEY_KEYBOARD 0x176
+#define KEY_SCREEN 0x177
+#define KEY_PC 0x178
+#define KEY_TV 0x179
+#define KEY_TV2 0x17a
+#define KEY_VCR 0x17b
+#define KEY_VCR2 0x17c
+#define KEY_SAT 0x17d
+#define KEY_SAT2 0x17e
+#define KEY_CD 0x17f
+#define KEY_TAPE 0x180
+#define KEY_RADIO 0x181
+#define KEY_TUNER 0x182
+#define KEY_PLAYER 0x183
+#define KEY_TEXT 0x184
+#define KEY_DVD 0x185
+#define KEY_AUX 0x186
+#define KEY_MP3 0x187
+#define KEY_AUDIO 0x188
+#define KEY_VIDEO 0x189
+#define KEY_DIRECTORY 0x18a
+#define KEY_LIST 0x18b
+#define KEY_MEMO 0x18c
+#define KEY_CALENDAR 0x18d
+#define KEY_RED 0x18e
+#define KEY_GREEN 0x18f
+#define KEY_YELLOW 0x190
+#define KEY_BLUE 0x191
+#define KEY_CHANNELUP 0x192
+#define KEY_CHANNELDOWN 0x193
+#define KEY_FIRST 0x194
+#define KEY_LAST 0x195
+#define KEY_AB 0x196
+#define KEY_NEXT 0x197
+#define KEY_RESTART 0x198
+#define KEY_SLOW 0x199
+#define KEY_SHUFFLE 0x19a
+#define KEY_BREAK 0x19b
+#define KEY_PREVIOUS 0x19c
+#define KEY_DIGITS 0x19d
+#define KEY_TEEN 0x19e
+#define KEY_TWEN 0x19f
+
+#define KEY_DEL_EOL 0x1c0
+#define KEY_DEL_EOS 0x1c1
+#define KEY_INS_LINE 0x1c2
+#define KEY_DEL_LINE 0x1c3
+
+#define KEY_FN 0x1d0
+#define KEY_FN_ESC 0x1d1
+#define KEY_FN_F1 0x1d2
+#define KEY_FN_F2 0x1d3
+#define KEY_FN_F3 0x1d4
+#define KEY_FN_F4 0x1d5
+#define KEY_FN_F5 0x1d6
+#define KEY_FN_F6 0x1d7
+#define KEY_FN_F7 0x1d8
+#define KEY_FN_F8 0x1d9
+#define KEY_FN_F9 0x1da
+#define KEY_FN_F10 0x1db
+#define KEY_FN_F11 0x1dc
+#define KEY_FN_F12 0x1dd
+#define KEY_FN_1 0x1de
+#define KEY_FN_2 0x1df
+#define KEY_FN_D 0x1e0
+#define KEY_FN_E 0x1e1
+#define KEY_FN_F 0x1e2
+#define KEY_FN_S 0x1e3
+#define KEY_FN_B 0x1e4
+
+#define KEY_BRL_DOT1 0x1f1
+#define KEY_BRL_DOT2 0x1f2
+#define KEY_BRL_DOT3 0x1f3
+#define KEY_BRL_DOT4 0x1f4
+#define KEY_BRL_DOT5 0x1f5
+#define KEY_BRL_DOT6 0x1f6
+#define KEY_BRL_DOT7 0x1f7
+#define KEY_BRL_DOT8 0x1f8
+
+#define KEY_MIN_INTERESTING KEY_MUTE
+#define KEY_MAX 0x1ff
+
+#define REL_X 0x00
+#define REL_Y 0x01
+#define REL_Z 0x02
+#define REL_RX 0x03
+#define REL_RY 0x04
+#define REL_RZ 0x05
+#define REL_HWHEEL 0x06
+#define REL_DIAL 0x07
+#define REL_WHEEL 0x08
+#define REL_MISC 0x09
+#define REL_MAX 0x0f
+
+#define ABS_X 0x00
+#define ABS_Y 0x01
+#define ABS_Z 0x02
+#define ABS_RX 0x03
+#define ABS_RY 0x04
+#define ABS_RZ 0x05
+#define ABS_THROTTLE 0x06
+#define ABS_RUDDER 0x07
+#define ABS_WHEEL 0x08
+#define ABS_GAS 0x09
+#define ABS_BRAKE 0x0a
+#define ABS_HAT0X 0x10
+#define ABS_HAT0Y 0x11
+#define ABS_HAT1X 0x12
+#define ABS_HAT1Y 0x13
+#define ABS_HAT2X 0x14
+#define ABS_HAT2Y 0x15
+#define ABS_HAT3X 0x16
+#define ABS_HAT3Y 0x17
+#define ABS_PRESSURE 0x18
+#define ABS_DISTANCE 0x19
+#define ABS_TILT_X 0x1a
+#define ABS_TILT_Y 0x1b
+#define ABS_TOOL_WIDTH 0x1c
+#define ABS_VOLUME 0x20
+#define ABS_MISC 0x28
+#define ABS_MAX 0x3f
+
+#define SW_LID 0x00
+#define SW_TABLET_MODE 0x01
+#define SW_HEADPHONE_INSERT 0x02
+#define SW_MAX 0x0f
+
+#define MSC_SERIAL 0x00
+#define MSC_PULSELED 0x01
+#define MSC_GESTURE 0x02
+#define MSC_RAW 0x03
+#define MSC_SCAN 0x04
+#define MSC_MAX 0x07
+
+#define LED_NUML 0x00
+#define LED_CAPSL 0x01
+#define LED_SCROLLL 0x02
+#define LED_COMPOSE 0x03
+#define LED_KANA 0x04
+#define LED_SLEEP 0x05
+#define LED_SUSPEND 0x06
+#define LED_MUTE 0x07
+#define LED_MISC 0x08
+#define LED_MAIL 0x09
+#define LED_CHARGING 0x0a
+#define LED_MAX 0x0f
+
+#define REP_DELAY 0x00
+#define REP_PERIOD 0x01
+#define REP_MAX 0x01
+
+#define SND_CLICK 0x00
+#define SND_BELL 0x01
+#define SND_TONE 0x02
+#define SND_MAX 0x07
+
+#define ID_BUS 0
+#define ID_VENDOR 1
+#define ID_PRODUCT 2
+#define ID_VERSION 3
+
+#define BUS_PCI 0x01
+#define BUS_ISAPNP 0x02
+#define BUS_USB 0x03
+#define BUS_HIL 0x04
+#define BUS_BLUETOOTH 0x05
+
+#define BUS_ISA 0x10
+#define BUS_I8042 0x11
+#define BUS_XTKBD 0x12
+#define BUS_RS232 0x13
+#define BUS_GAMEPORT 0x14
+#define BUS_PARPORT 0x15
+#define BUS_AMIGA 0x16
+#define BUS_ADB 0x17
+#define BUS_I2C 0x18
+#define BUS_HOST 0x19
+#define BUS_GSC 0x1A
+
+#define FF_STATUS_STOPPED 0x00
+#define FF_STATUS_PLAYING 0x01
+#define FF_STATUS_MAX 0x01
+
+struct ff_replay {
+ __u16 length;
+ __u16 delay;
+};
+
+struct ff_trigger {
+ __u16 button;
+ __u16 interval;
+};
+
+struct ff_envelope {
+ __u16 attack_length;
+ __u16 attack_level;
+ __u16 fade_length;
+ __u16 fade_level;
+};
+
+struct ff_constant_effect {
+ __s16 level;
+ struct ff_envelope envelope;
+};
+
+struct ff_ramp_effect {
+ __s16 start_level;
+ __s16 end_level;
+ struct ff_envelope envelope;
+};
+
+struct ff_condition_effect {
+ __u16 right_saturation;
+ __u16 left_saturation;
+
+ __s16 right_coeff;
+ __s16 left_coeff;
+
+ __u16 deadband;
+ __s16 center;
+
+};
+
+struct ff_periodic_effect {
+ __u16 waveform;
+ __u16 period;
+ __s16 magnitude;
+ __s16 offset;
+ __u16 phase;
+
+ struct ff_envelope envelope;
+
+ __u32 custom_len;
+ __s16 *custom_data;
+
+};
+
+struct ff_rumble_effect {
+ __u16 strong_magnitude;
+ __u16 weak_magnitude;
+};
+
+struct ff_effect {
+ __u16 type;
+
+ __s16 id;
+
+ __u16 direction;
+
+ struct ff_trigger trigger;
+ struct ff_replay replay;
+
+ union {
+ struct ff_constant_effect constant;
+ struct ff_ramp_effect ramp;
+ struct ff_periodic_effect periodic;
+ struct ff_condition_effect condition[2];
+ struct ff_rumble_effect rumble;
+ } u;
+};
+
+#define FF_RUMBLE 0x50
+#define FF_PERIODIC 0x51
+#define FF_CONSTANT 0x52
+#define FF_SPRING 0x53
+#define FF_FRICTION 0x54
+#define FF_DAMPER 0x55
+#define FF_INERTIA 0x56
+#define FF_RAMP 0x57
+
+#define FF_SQUARE 0x58
+#define FF_TRIANGLE 0x59
+#define FF_SINE 0x5a
+#define FF_SAW_UP 0x5b
+#define FF_SAW_DOWN 0x5c
+#define FF_CUSTOM 0x5d
+
+#define FF_GAIN 0x60
+#define FF_AUTOCENTER 0x61
+
+#define FF_MAX 0x7f
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/interrupt.h b/6/platforms/android-3/arch-arm/usr/include/linux/interrupt.h
new file mode 100644
index 0000000..f48592f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/interrupt.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INTERRUPT_H
+#define _LINUX_INTERRUPT_H
+
+#include <linux/kernel.h>
+#include <linux/linkage.h>
+#include <linux/bitops.h>
+#include <linux/preempt.h>
+#include <linux/cpumask.h>
+#include <linux/irqreturn.h>
+#include <linux/hardirq.h>
+#include <linux/sched.h>
+#include <linux/irqflags.h>
+#include <asm/atomic.h>
+#include <asm/ptrace.h>
+#include <asm/system.h>
+
+#define IRQF_TRIGGER_NONE 0x00000000
+#define IRQF_TRIGGER_RISING 0x00000001
+#define IRQF_TRIGGER_FALLING 0x00000002
+#define IRQF_TRIGGER_HIGH 0x00000004
+#define IRQF_TRIGGER_LOW 0x00000008
+#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
+#define IRQF_TRIGGER_PROBE 0x00000010
+
+#define IRQF_DISABLED 0x00000020
+#define IRQF_SAMPLE_RANDOM 0x00000040
+#define IRQF_SHARED 0x00000080
+#define IRQF_PROBE_SHARED 0x00000100
+#define IRQF_TIMER 0x00000200
+#define IRQF_PERCPU 0x00000400
+
+#define SA_INTERRUPT IRQF_DISABLED
+#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
+#define SA_SHIRQ IRQF_SHARED
+#define SA_PROBEIRQ IRQF_PROBE_SHARED
+#define SA_PERCPU IRQF_PERCPU
+
+#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
+#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
+#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
+#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
+#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
+
+struct irqaction {
+ irqreturn_t (*handler)(int, void *, struct pt_regs *);
+ unsigned long flags;
+ cpumask_t mask;
+ const char *name;
+ void *dev_id;
+ struct irqaction *next;
+ int irq;
+ struct proc_dir_entry *dir;
+};
+
+#define local_irq_enable_in_hardirq() local_irq_enable()
+
+#define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq)
+#define disable_irq_lockdep(irq) disable_irq(irq)
+#define enable_irq_lockdep(irq) enable_irq(irq)
+
+#ifndef __ARCH_SET_SOFTIRQ_PENDING
+#define set_softirq_pending(x) (local_softirq_pending() = (x))
+#define or_softirq_pending(x) (local_softirq_pending() |= (x))
+#endif
+
+#define save_flags(x) save_flags(&x)
+#define save_and_cli(x) save_and_cli(&x)
+
+enum
+{
+ HI_SOFTIRQ=0,
+ TIMER_SOFTIRQ,
+ NET_TX_SOFTIRQ,
+ NET_RX_SOFTIRQ,
+ BLOCK_SOFTIRQ,
+ TASKLET_SOFTIRQ
+};
+
+struct softirq_action
+{
+ void (*action)(struct softirq_action *);
+ void *data;
+};
+
+#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
+
+struct tasklet_struct
+{
+ struct tasklet_struct *next;
+ unsigned long state;
+ atomic_t count;
+ void (*func)(unsigned long);
+ unsigned long data;
+};
+
+#define DECLARE_TASKLET(name, func, data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
+
+#define DECLARE_TASKLET_DISABLED(name, func, data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
+
+enum
+{
+ TASKLET_STATE_SCHED,
+ TASKLET_STATE_RUN
+};
+
+#define tasklet_trylock(t) 1
+#define tasklet_unlock_wait(t) do { } while (0)
+#define tasklet_unlock(t) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ioctl.h b/6/platforms/android-3/arch-arm/usr/include/linux/ioctl.h
new file mode 100644
index 0000000..9efbeab
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ioctl.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IOCTL_H
+#define _LINUX_IOCTL_H
+
+#include <asm/ioctl.h>
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ioport.h b/6/platforms/android-3/arch-arm/usr/include/linux/ioport.h
new file mode 100644
index 0000000..b2081fc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ioport.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IOPORT_H
+#define _LINUX_IOPORT_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+struct resource {
+ resource_size_t start;
+ resource_size_t end;
+ const char *name;
+ unsigned long flags;
+ struct resource *parent, *sibling, *child;
+};
+
+struct resource_list {
+ struct resource_list *next;
+ struct resource *res;
+ struct pci_dev *dev;
+};
+
+#define IORESOURCE_BITS 0x000000ff
+
+#define IORESOURCE_IO 0x00000100
+#define IORESOURCE_MEM 0x00000200
+#define IORESOURCE_IRQ 0x00000400
+#define IORESOURCE_DMA 0x00000800
+
+#define IORESOURCE_PREFETCH 0x00001000
+#define IORESOURCE_READONLY 0x00002000
+#define IORESOURCE_CACHEABLE 0x00004000
+#define IORESOURCE_RANGELENGTH 0x00008000
+#define IORESOURCE_SHADOWABLE 0x00010000
+#define IORESOURCE_BUS_HAS_VGA 0x00080000
+
+#define IORESOURCE_DISABLED 0x10000000
+#define IORESOURCE_UNSET 0x20000000
+#define IORESOURCE_AUTO 0x40000000
+#define IORESOURCE_BUSY 0x80000000
+
+#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
+#define IORESOURCE_IRQ_LOWEDGE (1<<1)
+#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+#define IORESOURCE_IRQ_SHAREABLE (1<<4)
+
+#define IORESOURCE_DMA_TYPE_MASK (3<<0)
+#define IORESOURCE_DMA_8BIT (0<<0)
+#define IORESOURCE_DMA_8AND16BIT (1<<0)
+#define IORESOURCE_DMA_16BIT (2<<0)
+
+#define IORESOURCE_DMA_MASTER (1<<2)
+#define IORESOURCE_DMA_BYTE (1<<3)
+#define IORESOURCE_DMA_WORD (1<<4)
+
+#define IORESOURCE_DMA_SPEED_MASK (3<<6)
+#define IORESOURCE_DMA_COMPATIBLE (0<<6)
+#define IORESOURCE_DMA_TYPEA (1<<6)
+#define IORESOURCE_DMA_TYPEB (2<<6)
+#define IORESOURCE_DMA_TYPEF (3<<6)
+
+#define IORESOURCE_MEM_WRITEABLE (1<<0)
+#define IORESOURCE_MEM_CACHEABLE (1<<1)
+#define IORESOURCE_MEM_RANGELENGTH (1<<2)
+#define IORESOURCE_MEM_TYPE_MASK (3<<3)
+#define IORESOURCE_MEM_8BIT (0<<3)
+#define IORESOURCE_MEM_16BIT (1<<3)
+#define IORESOURCE_MEM_8AND16BIT (2<<3)
+#define IORESOURCE_MEM_32BIT (3<<3)
+#define IORESOURCE_MEM_SHADOWABLE (1<<5)
+#define IORESOURCE_MEM_EXPANSIONROM (1<<6)
+
+#define IORESOURCE_ROM_ENABLE (1<<0)
+#define IORESOURCE_ROM_SHADOW (1<<1)
+#define IORESOURCE_ROM_COPY (1<<2)
+
+#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
+#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
+#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
+
+#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
+#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
+#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ioprio.h b/6/platforms/android-3/arch-arm/usr/include/linux/ioprio.h
new file mode 100644
index 0000000..a0a5d48
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ioprio.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef IOPRIO_H
+#define IOPRIO_H
+
+#include <linux/sched.h>
+
+#define IOPRIO_BITS (16)
+#define IOPRIO_CLASS_SHIFT (13)
+#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
+
+#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
+#define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK)
+#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
+
+#define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
+
+enum {
+ IOPRIO_CLASS_NONE,
+ IOPRIO_CLASS_RT,
+ IOPRIO_CLASS_BE,
+ IOPRIO_CLASS_IDLE,
+};
+
+#define IOPRIO_BE_NR (8)
+
+enum {
+ IOPRIO_WHO_PROCESS = 1,
+ IOPRIO_WHO_PGRP,
+ IOPRIO_WHO_USER,
+};
+
+#define IOPRIO_NORM (4)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ip.h b/6/platforms/android-3/arch-arm/usr/include/linux/ip.h
new file mode 100644
index 0000000..040789d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ip.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IP_H
+#define _LINUX_IP_H
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+#define IPTOS_TOS_MASK 0x1E
+#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+#define IPTOS_MINCOST 0x02
+
+#define IPTOS_PREC_MASK 0xE0
+#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+#define IPOPT_COPY 0x80
+#define IPOPT_CLASS_MASK 0x60
+#define IPOPT_NUMBER_MASK 0x1f
+
+#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
+#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
+#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_MEASUREMENT 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_END (0 |IPOPT_CONTROL)
+#define IPOPT_NOOP (1 |IPOPT_CONTROL)
+#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
+#define IPOPT_RR (7 |IPOPT_CONTROL)
+#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
+
+#define IPVERSION 4
+#define MAXTTL 255
+#define IPDEFTTL 64
+
+#define IPOPT_OPTVAL 0
+#define IPOPT_OLEN 1
+#define IPOPT_OFFSET 2
+#define IPOPT_MINOFF 4
+#define MAX_IPOPTLEN 40
+#define IPOPT_NOP IPOPT_NOOP
+#define IPOPT_EOL IPOPT_END
+#define IPOPT_TS IPOPT_TIMESTAMP
+
+#define IPOPT_TS_TSONLY 0
+#define IPOPT_TS_TSANDADDR 1
+#define IPOPT_TS_PRESPEC 3
+
+struct iphdr {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 ihl:4,
+ version:4;
+#elif defined (__BIG_ENDIAN_BITFIELD)
+ __u8 version:4,
+ ihl:4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 tos;
+ __be16 tot_len;
+ __be16 id;
+ __be16 frag_off;
+ __u8 ttl;
+ __u8 protocol;
+ __u16 check;
+ __be32 saddr;
+ __be32 daddr;
+
+};
+
+struct ip_auth_hdr {
+ __u8 nexthdr;
+ __u8 hdrlen;
+ __u16 reserved;
+ __u32 spi;
+ __u32 seq_no;
+ __u8 auth_data[0];
+};
+
+struct ip_esp_hdr {
+ __u32 spi;
+ __u32 seq_no;
+ __u8 enc_data[0];
+};
+
+struct ip_comp_hdr {
+ __u8 nexthdr;
+ __u8 flags;
+ __u16 cpi;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ipc.h b/6/platforms/android-3/arch-arm/usr/include/linux/ipc.h
new file mode 100644
index 0000000..54766d5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ipc.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IPC_H
+#define _LINUX_IPC_H
+
+#include <linux/types.h>
+
+#define IPC_PRIVATE ((__kernel_key_t) 0)
+
+struct ipc_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+};
+
+#include <asm/ipcbuf.h>
+
+#define IPC_CREAT 00001000
+#define IPC_EXCL 00002000
+#define IPC_NOWAIT 00004000
+
+#define IPC_DIPC 00010000
+#define IPC_OWN 00020000
+
+#define IPC_RMID 0
+#define IPC_SET 1
+#define IPC_STAT 2
+#define IPC_INFO 3
+
+#define IPC_OLD 0
+#define IPC_64 0x0100
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_msgdefs.h
new file mode 100644
index 0000000..247d563
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IPMI_MSGDEFS_H
+#define __LINUX_IPMI_MSGDEFS_H
+
+#define IPMI_NETFN_SENSOR_EVENT_REQUEST 0x04
+#define IPMI_NETFN_SENSOR_EVENT_RESPONSE 0x05
+#define IPMI_GET_EVENT_RECEIVER_CMD 0x01
+
+#define IPMI_NETFN_APP_REQUEST 0x06
+#define IPMI_NETFN_APP_RESPONSE 0x07
+#define IPMI_GET_DEVICE_ID_CMD 0x01
+#define IPMI_CLEAR_MSG_FLAGS_CMD 0x30
+#define IPMI_GET_DEVICE_GUID_CMD 0x08
+#define IPMI_GET_MSG_FLAGS_CMD 0x31
+#define IPMI_SEND_MSG_CMD 0x34
+#define IPMI_GET_MSG_CMD 0x33
+#define IPMI_SET_BMC_GLOBAL_ENABLES_CMD 0x2e
+#define IPMI_GET_BMC_GLOBAL_ENABLES_CMD 0x2f
+#define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35
+#define IPMI_GET_CHANNEL_INFO_CMD 0x42
+
+#define IPMI_NETFN_STORAGE_REQUEST 0x0a
+#define IPMI_NETFN_STORAGE_RESPONSE 0x0b
+#define IPMI_ADD_SEL_ENTRY_CMD 0x44
+
+#define IPMI_BMC_SLAVE_ADDR 0x20
+
+#define IPMI_MAX_MSG_LENGTH 272
+
+#define IPMI_CC_NO_ERROR 0x00
+#define IPMI_NODE_BUSY_ERR 0xc0
+#define IPMI_INVALID_COMMAND_ERR 0xc1
+#define IPMI_ERR_MSG_TRUNCATED 0xc6
+#define IPMI_LOST_ARBITRATION_ERR 0x81
+#define IPMI_ERR_UNSPECIFIED 0xff
+
+#define IPMI_CHANNEL_PROTOCOL_IPMB 1
+#define IPMI_CHANNEL_PROTOCOL_ICMB 2
+#define IPMI_CHANNEL_PROTOCOL_SMBUS 4
+#define IPMI_CHANNEL_PROTOCOL_KCS 5
+#define IPMI_CHANNEL_PROTOCOL_SMIC 6
+#define IPMI_CHANNEL_PROTOCOL_BT10 7
+#define IPMI_CHANNEL_PROTOCOL_BT15 8
+#define IPMI_CHANNEL_PROTOCOL_TMODE 9
+
+#define IPMI_CHANNEL_MEDIUM_IPMB 1
+#define IPMI_CHANNEL_MEDIUM_ICMB10 2
+#define IPMI_CHANNEL_MEDIUM_ICMB09 3
+#define IPMI_CHANNEL_MEDIUM_8023LAN 4
+#define IPMI_CHANNEL_MEDIUM_ASYNC 5
+#define IPMI_CHANNEL_MEDIUM_OTHER_LAN 6
+#define IPMI_CHANNEL_MEDIUM_PCI_SMBUS 7
+#define IPMI_CHANNEL_MEDIUM_SMBUS1 8
+#define IPMI_CHANNEL_MEDIUM_SMBUS2 9
+#define IPMI_CHANNEL_MEDIUM_USB1 10
+#define IPMI_CHANNEL_MEDIUM_USB2 11
+#define IPMI_CHANNEL_MEDIUM_SYSINTF 12
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_smi.h b/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_smi.h
new file mode 100644
index 0000000..56cc210
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ipmi_smi.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IPMI_SMI_H
+#define __LINUX_IPMI_SMI_H
+
+#include <linux/ipmi_msgdefs.h>
+#include <linux/proc_fs.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/ipmi_smi.h>
+
+typedef struct ipmi_smi *ipmi_smi_t;
+
+struct ipmi_smi_msg
+{
+ struct list_head link;
+
+ long msgid;
+ void *user_data;
+
+ int data_size;
+ unsigned char data[IPMI_MAX_MSG_LENGTH];
+
+ int rsp_size;
+ unsigned char rsp[IPMI_MAX_MSG_LENGTH];
+
+ void (*done)(struct ipmi_smi_msg *msg);
+};
+
+struct ipmi_smi_handlers
+{
+ struct module *owner;
+
+ int (*start_processing)(void *send_info,
+ ipmi_smi_t new_intf);
+
+ void (*sender)(void *send_info,
+ struct ipmi_smi_msg *msg,
+ int priority);
+
+ void (*request_events)(void *send_info);
+
+ void (*set_run_to_completion)(void *send_info, int run_to_completion);
+
+ void (*poll)(void *send_info);
+
+ int (*inc_usecount)(void *send_info);
+ void (*dec_usecount)(void *send_info);
+};
+
+struct ipmi_device_id {
+ unsigned char device_id;
+ unsigned char device_revision;
+ unsigned char firmware_revision_1;
+ unsigned char firmware_revision_2;
+ unsigned char ipmi_version;
+ unsigned char additional_device_support;
+ unsigned int manufacturer_id;
+ unsigned int product_id;
+ unsigned char aux_firmware_revision[4];
+ unsigned int aux_firmware_revision_set : 1;
+};
+
+#define ipmi_version_major(v) ((v)->ipmi_version & 0xf)
+#define ipmi_version_minor(v) ((v)->ipmi_version >> 4)
+
+struct ipmi_smi_msg *ipmi_alloc_smi_msg(void);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ipx.h b/6/platforms/android-3/arch-arm/usr/include/linux/ipx.h
new file mode 100644
index 0000000..ff675e9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ipx.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPX_H_
+#define _IPX_H_
+#include <linux/sockios.h>
+#include <linux/socket.h>
+#define IPX_NODE_LEN 6
+#define IPX_MTU 576
+
+struct sockaddr_ipx {
+ sa_family_t sipx_family;
+ __u16 sipx_port;
+ __u32 sipx_network;
+ unsigned char sipx_node[IPX_NODE_LEN];
+ __u8 sipx_type;
+ unsigned char sipx_zero;
+};
+
+#define sipx_special sipx_port
+#define sipx_action sipx_zero
+#define IPX_DLTITF 0
+#define IPX_CRTITF 1
+
+struct ipx_route_definition {
+ __u32 ipx_network;
+ __u32 ipx_router_network;
+ unsigned char ipx_router_node[IPX_NODE_LEN];
+};
+
+struct ipx_interface_definition {
+ __u32 ipx_network;
+ unsigned char ipx_device[16];
+ unsigned char ipx_dlink_type;
+#define IPX_FRAME_NONE 0
+#define IPX_FRAME_SNAP 1
+#define IPX_FRAME_8022 2
+#define IPX_FRAME_ETHERII 3
+#define IPX_FRAME_8023 4
+#define IPX_FRAME_TR_8022 5
+ unsigned char ipx_special;
+#define IPX_SPECIAL_NONE 0
+#define IPX_PRIMARY 1
+#define IPX_INTERNAL 2
+ unsigned char ipx_node[IPX_NODE_LEN];
+};
+
+struct ipx_config_data {
+ unsigned char ipxcfg_auto_select_primary;
+ unsigned char ipxcfg_auto_create_interfaces;
+};
+
+struct ipx_route_def {
+ __u32 ipx_network;
+ __u32 ipx_router_network;
+#define IPX_ROUTE_NO_ROUTER 0
+ unsigned char ipx_router_node[IPX_NODE_LEN];
+ unsigned char ipx_device[16];
+ unsigned short ipx_flags;
+#define IPX_RT_SNAP 8
+#define IPX_RT_8022 4
+#define IPX_RT_BLUEBOOK 2
+#define IPX_RT_ROUTED 1
+};
+
+#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
+#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
+#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2)
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/irq.h b/6/platforms/android-3/arch-arm/usr/include/linux/irq.h
new file mode 100644
index 0000000..38f5db7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/irq.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IRQ_H
+#define _LINUX_IRQ_H
+
+#include <linux/smp.h>
+
+#include <linux/linkage.h>
+#include <linux/cache.h>
+#include <linux/spinlock.h>
+#include <linux/cpumask.h>
+#include <linux/irqreturn.h>
+
+#include <asm/irq.h>
+#include <asm/ptrace.h>
+
+#define IRQ_TYPE_NONE 0x00000000
+#define IRQ_TYPE_EDGE_RISING 0x00000001
+#define IRQ_TYPE_EDGE_FALLING 0x00000002
+#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
+#define IRQ_TYPE_LEVEL_HIGH 0x00000004
+#define IRQ_TYPE_LEVEL_LOW 0x00000008
+#define IRQ_TYPE_SENSE_MASK 0x0000000f
+#define IRQ_TYPE_PROBE 0x00000010
+
+#define IRQ_INPROGRESS 0x00010000
+#define IRQ_DISABLED 0x00020000
+#define IRQ_PENDING 0x00040000
+#define IRQ_REPLAY 0x00080000
+#define IRQ_AUTODETECT 0x00100000
+#define IRQ_WAITING 0x00200000
+#define IRQ_LEVEL 0x00400000
+#define IRQ_MASKED 0x00800000
+#define IRQ_PER_CPU 0x01000000
+#define CHECK_IRQ_PER_CPU(var) 0
+
+#define IRQ_NOPROBE 0x02000000
+#define IRQ_NOREQUEST 0x04000000
+#define IRQ_NOAUTOEN 0x08000000
+#define IRQ_DELAYED_DISABLE 0x10000000
+#define IRQ_WAKEUP 0x20000000
+
+struct proc_dir_entry;
+
+struct irq_chip {
+ const char *name;
+ unsigned int (*startup)(unsigned int irq);
+ void (*shutdown)(unsigned int irq);
+ void (*enable)(unsigned int irq);
+ void (*disable)(unsigned int irq);
+
+ void (*ack)(unsigned int irq);
+ void (*mask)(unsigned int irq);
+ void (*mask_ack)(unsigned int irq);
+ void (*unmask)(unsigned int irq);
+ void (*eoi)(unsigned int irq);
+
+ void (*end)(unsigned int irq);
+ void (*set_affinity)(unsigned int irq, cpumask_t dest);
+ int (*retrigger)(unsigned int irq);
+ int (*set_type)(unsigned int irq, unsigned int flow_type);
+ int (*set_wake)(unsigned int irq, unsigned int on);
+
+ const char *typename;
+};
+
+struct irq_desc {
+ void fastcall (*handle_irq)(unsigned int irq,
+ struct irq_desc *desc,
+ struct pt_regs *regs);
+ struct irq_chip *chip;
+ void *handler_data;
+ void *chip_data;
+ struct irqaction *action;
+ unsigned int status;
+
+ unsigned int depth;
+ unsigned int wake_depth;
+ unsigned int irq_count;
+ unsigned int irqs_unhandled;
+ spinlock_t lock;
+} ____cacheline_aligned;
+
+#define hw_interrupt_type irq_chip
+typedef struct irq_chip hw_irq_controller;
+#define no_irq_type no_irq_chip
+typedef struct irq_desc irq_desc_t;
+
+#include <asm/hw_irq.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/irq_cpustat.h b/6/platforms/android-3/arch-arm/usr/include/linux/irq_cpustat.h
new file mode 100644
index 0000000..3540a4a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/irq_cpustat.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __irq_cpustat_h
+#define __irq_cpustat_h
+
+#ifndef __ARCH_IRQ_STAT
+
+#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
+#endif
+
+#define local_softirq_pending() __IRQ_STAT(smp_processor_id(), __softirq_pending)
+
+#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/irqflags.h b/6/platforms/android-3/arch-arm/usr/include/linux/irqflags.h
new file mode 100644
index 0000000..1bf3f90
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/irqflags.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TRACE_IRQFLAGS_H
+#define _LINUX_TRACE_IRQFLAGS_H
+
+#define trace_hardirqs_on() do { } while (0)
+#define trace_hardirqs_off() do { } while (0)
+#define trace_softirqs_on(ip) do { } while (0)
+#define trace_softirqs_off(ip) do { } while (0)
+#define trace_hardirq_context(p) 0
+#define trace_softirq_context(p) 0
+#define trace_hardirqs_enabled(p) 0
+#define trace_softirqs_enabled(p) 0
+#define trace_hardirq_enter() do { } while (0)
+#define trace_hardirq_exit() do { } while (0)
+#define trace_softirq_enter() do { } while (0)
+#define trace_softirq_exit() do { } while (0)
+#define INIT_TRACE_IRQFLAGS
+
+#define raw_local_irq_disable() local_irq_disable()
+#define raw_local_irq_enable() local_irq_enable()
+#define raw_local_irq_save(flags) local_irq_save(flags)
+#define raw_local_irq_restore(flags) local_irq_restore(flags)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/irqreturn.h b/6/platforms/android-3/arch-arm/usr/include/linux/irqreturn.h
new file mode 100644
index 0000000..e37f430
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/irqreturn.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IRQRETURN_H
+#define _LINUX_IRQRETURN_H
+
+typedef int irqreturn_t;
+
+#define IRQ_NONE (0)
+#define IRQ_HANDLED (1)
+#define IRQ_RETVAL(x) ((x) != 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/jbd.h b/6/platforms/android-3/arch-arm/usr/include/linux/jbd.h
new file mode 100644
index 0000000..7ba766c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/jbd.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_JBD_H
+#define _LINUX_JBD_H
+
+#include "jfs_compat.h"
+#define JFS_DEBUG
+#define jfs_debug jbd_debug
+
+#define journal_oom_retry 1
+
+#undef JBD_PARANOID_IOFAIL
+
+#define JBD_DEFAULT_MAX_COMMIT_AGE 5
+
+#define jbd_debug(f, a...)
+
+#define jbd_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
+#define jbd_rep_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), 1)
+
+#define JFS_MIN_JOURNAL_BLOCKS 1024
+
+#define JFS_MAGIC_NUMBER 0xc03b3998U
+
+#define JFS_DESCRIPTOR_BLOCK 1
+#define JFS_COMMIT_BLOCK 2
+#define JFS_SUPERBLOCK_V1 3
+#define JFS_SUPERBLOCK_V2 4
+#define JFS_REVOKE_BLOCK 5
+
+typedef struct journal_header_s
+{
+ __be32 h_magic;
+ __be32 h_blocktype;
+ __be32 h_sequence;
+} journal_header_t;
+
+typedef struct journal_block_tag_s
+{
+ __be32 t_blocknr;
+ __be32 t_flags;
+} journal_block_tag_t;
+
+typedef struct journal_revoke_header_s
+{
+ journal_header_t r_header;
+ __be32 r_count;
+} journal_revoke_header_t;
+
+#define JFS_FLAG_ESCAPE 1
+#define JFS_FLAG_SAME_UUID 2
+#define JFS_FLAG_DELETED 4
+#define JFS_FLAG_LAST_TAG 8
+
+typedef struct journal_superblock_s
+{
+
+ journal_header_t s_header;
+
+ __be32 s_blocksize;
+ __be32 s_maxlen;
+ __be32 s_first;
+
+ __be32 s_sequence;
+ __be32 s_start;
+
+ __be32 s_errno;
+
+ __be32 s_feature_compat;
+ __be32 s_feature_incompat;
+ __be32 s_feature_ro_compat;
+
+ __u8 s_uuid[16];
+
+ __be32 s_nr_users;
+
+ __be32 s_dynsuper;
+
+ __be32 s_max_transaction;
+ __be32 s_max_trans_data;
+
+ __u32 s_padding[44];
+
+ __u8 s_users[16*48];
+
+} journal_superblock_t;
+
+#define JFS_HAS_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
+#define JFS_HAS_RO_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
+#define JFS_HAS_INCOMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
+
+#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001
+
+#define JFS_KNOWN_COMPAT_FEATURES 0
+#define JFS_KNOWN_ROCOMPAT_FEATURES 0
+#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE
+
+#define BJ_None 0
+#define BJ_SyncData 1
+#define BJ_Metadata 2
+#define BJ_Forget 3
+#define BJ_IO 4
+#define BJ_Shadow 5
+#define BJ_LogCtl 6
+#define BJ_Reserved 7
+#define BJ_Locked 8
+#define BJ_Types 9
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/jiffies.h b/6/platforms/android-3/arch-arm/usr/include/linux/jiffies.h
new file mode 100644
index 0000000..86b705b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/jiffies.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_JIFFIES_H
+#define _LINUX_JIFFIES_H
+
+#include <linux/calc64.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/time.h>
+#include <linux/timex.h>
+#include <asm/param.h>
+
+#if HZ >= (12 && HZ < 24)
+#define SHIFT_HZ 4
+#elif HZ >= 24 && HZ < 48
+#define SHIFT_HZ 5
+#elif HZ >= 48 && HZ < 96
+#define SHIFT_HZ 6
+#elif HZ >= 96 && HZ < 192
+#define SHIFT_HZ 7
+#elif HZ >= 192 && HZ < 384
+#define SHIFT_HZ 8
+#elif HZ >= 384 && HZ < 768
+#define SHIFT_HZ 9
+#elif HZ >= 768 && HZ < 1536
+#define SHIFT_HZ 10
+#else
+#error You lose.
+#endif
+
+#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ)
+
+#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ)
+
+#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
+
+#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
+
+#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8))
+
+#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
+
+#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8))
+
+#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
+
+#define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8))
+
+#define __jiffy_data __attribute__((section(".data")))
+
+#if BITS_PER_LONG < 64
+
+#else
+#endif
+#define time_after(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(b) - (long)(a) < 0))
+#define time_before(a,b) time_after(b,a)
+#define time_after_eq(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(a) - (long)(b) >= 0))
+#define time_before_eq(a,b) time_after_eq(b,a)
+#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
+#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1)
+#define SEC_JIFFIE_SC (31 - SHIFT_HZ)
+#if !((NSEC_PER_SEC << 2) / TICK_NSEC << SEC_JIFFIE_SC - 2 & 0x80000000)
+#undef SEC_JIFFIE_SC
+#define SEC_JIFFIE_SC (32 - SHIFT_HZ)
+#endif
+#define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29)
+#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19)
+#define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define USEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_USEC << USEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1)
+#if BITS_PER_LONG < 64
+#define MAX_SEC_IN_JIFFIES (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC)
+#else
+#define MAX_SEC_IN_JIFFIES (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)
+#endif
+#if HZ <= (MSEC_PER_SEC && !(MSEC_PER_SEC % HZ))
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+#else
+#endif
+#if HZ <= (USEC_PER_SEC && !(USEC_PER_SEC % HZ))
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+#else
+#endif
+#if HZ <= (MSEC_PER_SEC && !(MSEC_PER_SEC % HZ))
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+#else
+#endif
+#if HZ <= (USEC_PER_SEC && !(USEC_PER_SEC % HZ))
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+#else
+#endif
+#if TICK_NSEC % NSEC_PER_SEC / USER_HZ == 0
+#else
+#endif
+#if HZ % USER_HZ == 0
+#else
+#endif
+#if TICK_NSEC % NSEC_PER_SEC / USER_HZ == 0
+#else
+#endif
+#if NSEC_PER_SEC % USER_HZ == 0
+#elif (USER_HZ % 512) == 0
+#else
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kd.h b/6/platforms/android-3/arch-arm/usr/include/linux/kd.h
new file mode 100644
index 0000000..1541ddf
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kd.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KD_H
+#define _LINUX_KD_H
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+#define GIO_FONT 0x4B60
+#define PIO_FONT 0x4B61
+
+#define GIO_FONTX 0x4B6B
+#define PIO_FONTX 0x4B6C
+struct consolefontdesc {
+ unsigned short charcount;
+ unsigned short charheight;
+ char __user *chardata;
+};
+
+#define PIO_FONTRESET 0x4B6D
+
+#define GIO_CMAP 0x4B70
+#define PIO_CMAP 0x4B71
+
+#define KIOCSOUND 0x4B2F
+#define KDMKTONE 0x4B30
+
+#define KDGETLED 0x4B31
+#define KDSETLED 0x4B32
+#define LED_SCR 0x01
+#define LED_NUM 0x02
+#define LED_CAP 0x04
+
+#define KDGKBTYPE 0x4B33
+#define KB_84 0x01
+#define KB_101 0x02
+#define KB_OTHER 0x03
+
+#define KDADDIO 0x4B34
+#define KDDELIO 0x4B35
+#define KDENABIO 0x4B36
+#define KDDISABIO 0x4B37
+
+#define KDSETMODE 0x4B3A
+#define KD_TEXT 0x00
+#define KD_GRAPHICS 0x01
+#define KD_TEXT0 0x02
+#define KD_TEXT1 0x03
+#define KDGETMODE 0x4B3B
+
+#define KDMAPDISP 0x4B3C
+#define KDUNMAPDISP 0x4B3D
+
+typedef char scrnmap_t;
+#define E_TABSZ 256
+#define GIO_SCRNMAP 0x4B40
+#define PIO_SCRNMAP 0x4B41
+#define GIO_UNISCRNMAP 0x4B69
+#define PIO_UNISCRNMAP 0x4B6A
+
+#define GIO_UNIMAP 0x4B66
+struct unipair {
+ unsigned short unicode;
+ unsigned short fontpos;
+};
+struct unimapdesc {
+ unsigned short entry_ct;
+ struct unipair __user *entries;
+};
+#define PIO_UNIMAP 0x4B67
+#define PIO_UNIMAPCLR 0x4B68
+struct unimapinit {
+ unsigned short advised_hashsize;
+ unsigned short advised_hashstep;
+ unsigned short advised_hashlevel;
+};
+
+#define UNI_DIRECT_BASE 0xF000
+#define UNI_DIRECT_MASK 0x01FF
+
+#define K_RAW 0x00
+#define K_XLATE 0x01
+#define K_MEDIUMRAW 0x02
+#define K_UNICODE 0x03
+#define KDGKBMODE 0x4B44
+#define KDSKBMODE 0x4B45
+
+#define K_METABIT 0x03
+#define K_ESCPREFIX 0x04
+#define KDGKBMETA 0x4B62
+#define KDSKBMETA 0x4B63
+
+#define K_SCROLLLOCK 0x01
+#define K_NUMLOCK 0x02
+#define K_CAPSLOCK 0x04
+#define KDGKBLED 0x4B64
+#define KDSKBLED 0x4B65
+
+struct kbentry {
+ unsigned char kb_table;
+ unsigned char kb_index;
+ unsigned short kb_value;
+};
+#define K_NORMTAB 0x00
+#define K_SHIFTTAB 0x01
+#define K_ALTTAB 0x02
+#define K_ALTSHIFTTAB 0x03
+
+#define KDGKBENT 0x4B46
+#define KDSKBENT 0x4B47
+
+struct kbsentry {
+ unsigned char kb_func;
+ unsigned char kb_string[512];
+};
+#define KDGKBSENT 0x4B48
+#define KDSKBSENT 0x4B49
+
+struct kbdiacr {
+ unsigned char diacr, base, result;
+};
+struct kbdiacrs {
+ unsigned int kb_cnt;
+ struct kbdiacr kbdiacr[256];
+};
+#define KDGKBDIACR 0x4B4A
+#define KDSKBDIACR 0x4B4B
+
+struct kbkeycode {
+ unsigned int scancode, keycode;
+};
+#define KDGETKEYCODE 0x4B4C
+#define KDSETKEYCODE 0x4B4D
+
+#define KDSIGACCEPT 0x4B4E
+
+struct kbd_repeat {
+ int delay;
+ int period;
+
+};
+
+#define KDKBDREP 0x4B52
+
+#define KDFONTOP 0x4B72
+
+struct console_font_op {
+ unsigned int op;
+ unsigned int flags;
+ unsigned int width, height;
+ unsigned int charcount;
+ unsigned char __user *data;
+};
+
+struct console_font {
+ unsigned int width, height;
+ unsigned int charcount;
+ unsigned char *data;
+};
+
+#define KD_FONT_OP_SET 0
+#define KD_FONT_OP_GET 1
+#define KD_FONT_OP_SET_DEFAULT 2
+#define KD_FONT_OP_COPY 3
+
+#define KD_FONT_FLAG_DONT_RECALC 1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kdev_t.h b/6/platforms/android-3/arch-arm/usr/include/linux/kdev_t.h
new file mode 100644
index 0000000..517f9c3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kdev_t.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KDEV_T_H
+#define _LINUX_KDEV_T_H
+
+#define MAJOR(dev) ((dev)>>8)
+#define MINOR(dev) ((dev) & 0xff)
+#define MKDEV(ma,mi) ((ma)<<8 | (mi))
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kernel.h b/6/platforms/android-3/arch-arm/usr/include/linux/kernel.h
new file mode 100644
index 0000000..9682e47
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kernel.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KERNEL_H
+#define _LINUX_KERNEL_H
+
+#define SI_LOAD_SHIFT 16
+struct sysinfo {
+ long uptime;
+ unsigned long loads[3];
+ unsigned long totalram;
+ unsigned long freeram;
+ unsigned long sharedram;
+ unsigned long bufferram;
+ unsigned long totalswap;
+ unsigned long freeswap;
+ unsigned short procs;
+ unsigned short pad;
+ unsigned long totalhigh;
+ unsigned long freehigh;
+ unsigned int mem_unit;
+ char _f[20-2*sizeof(long)-sizeof(int)];
+};
+
+#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
+
+#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
+
+#define __FUNCTION__ (__func__)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kernel_stat.h b/6/platforms/android-3/arch-arm/usr/include/linux/kernel_stat.h
new file mode 100644
index 0000000..f333736
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kernel_stat.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KERNEL_STAT_H
+#define _LINUX_KERNEL_STAT_H
+
+#include <asm/irq.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/percpu.h>
+#include <linux/cpumask.h>
+#include <asm/cputime.h>
+
+struct cpu_usage_stat {
+ cputime64_t user;
+ cputime64_t nice;
+ cputime64_t system;
+ cputime64_t softirq;
+ cputime64_t irq;
+ cputime64_t idle;
+ cputime64_t iowait;
+ cputime64_t steal;
+};
+
+struct kernel_stat {
+ struct cpu_usage_stat cpustat;
+ unsigned int irqs[NR_IRQS];
+};
+
+#define kstat_cpu(cpu) per_cpu(kstat, cpu)
+
+#define kstat_this_cpu __get_cpu_var(kstat)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kernelcapi.h b/6/platforms/android-3/arch-arm/usr/include/linux/kernelcapi.h
new file mode 100644
index 0000000..4638b0a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kernelcapi.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __KERNELCAPI_H__
+#define __KERNELCAPI_H__
+
+#define CAPI_MAXAPPL 240
+#define CAPI_MAXCONTR 32
+#define CAPI_MAXDATAWINDOW 8
+
+typedef struct kcapi_flagdef {
+ int contr;
+ int flag;
+} kcapi_flagdef;
+
+typedef struct kcapi_carddef {
+ char driver[32];
+ unsigned int port;
+ unsigned irq;
+ unsigned int membase;
+ int cardnr;
+} kcapi_carddef;
+
+#define KCAPI_CMD_TRACE 10
+#define KCAPI_CMD_ADDCARD 11
+
+#define KCAPI_TRACE_OFF 0
+#define KCAPI_TRACE_SHORT_NO_DATA 1
+#define KCAPI_TRACE_FULL_NO_DATA 2
+#define KCAPI_TRACE_SHORT 3
+#define KCAPI_TRACE_FULL 4
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kexec.h b/6/platforms/android-3/arch-arm/usr/include/linux/kexec.h
new file mode 100644
index 0000000..4004646
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kexec.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_KEXEC_H
+#define LINUX_KEXEC_H
+
+struct pt_regs;
+struct task_struct;
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/key.h b/6/platforms/android-3/arch-arm/usr/include/linux/key.h
new file mode 100644
index 0000000..5c485d7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/key.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KEY_H
+#define _LINUX_KEY_H
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/rbtree.h>
+#include <linux/rcupdate.h>
+#include <asm/atomic.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/keyboard.h b/6/platforms/android-3/arch-arm/usr/include/linux/keyboard.h
new file mode 100644
index 0000000..25e0945
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/keyboard.h
@@ -0,0 +1,446 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KEYBOARD_H
+#define __LINUX_KEYBOARD_H
+
+#include <linux/wait.h>
+
+#define KG_SHIFT 0
+#define KG_CTRL 2
+#define KG_ALT 3
+#define KG_ALTGR 1
+#define KG_SHIFTL 4
+#define KG_KANASHIFT 4
+#define KG_SHIFTR 5
+#define KG_CTRLL 6
+#define KG_CTRLR 7
+#define KG_CAPSSHIFT 8
+
+#define NR_SHIFT 9
+
+#define NR_KEYS 256
+#define MAX_NR_KEYMAPS 256
+
+#define MAX_NR_OF_USER_KEYMAPS 256
+
+#define MAX_NR_FUNC 256
+
+#define KT_LATIN 0
+#define KT_LETTER 11
+#define KT_FN 1
+#define KT_SPEC 2
+#define KT_PAD 3
+#define KT_DEAD 4
+#define KT_CONS 5
+#define KT_CUR 6
+#define KT_SHIFT 7
+#define KT_META 8
+#define KT_ASCII 9
+#define KT_LOCK 10
+#define KT_SLOCK 12
+#define KT_BRL 14
+
+#define K(t,v) (((t)<<8)|(v))
+#define KTYP(x) ((x) >> 8)
+#define KVAL(x) ((x) & 0xff)
+
+#define K_F1 K(KT_FN,0)
+#define K_F2 K(KT_FN,1)
+#define K_F3 K(KT_FN,2)
+#define K_F4 K(KT_FN,3)
+#define K_F5 K(KT_FN,4)
+#define K_F6 K(KT_FN,5)
+#define K_F7 K(KT_FN,6)
+#define K_F8 K(KT_FN,7)
+#define K_F9 K(KT_FN,8)
+#define K_F10 K(KT_FN,9)
+#define K_F11 K(KT_FN,10)
+#define K_F12 K(KT_FN,11)
+#define K_F13 K(KT_FN,12)
+#define K_F14 K(KT_FN,13)
+#define K_F15 K(KT_FN,14)
+#define K_F16 K(KT_FN,15)
+#define K_F17 K(KT_FN,16)
+#define K_F18 K(KT_FN,17)
+#define K_F19 K(KT_FN,18)
+#define K_F20 K(KT_FN,19)
+#define K_FIND K(KT_FN,20)
+#define K_INSERT K(KT_FN,21)
+#define K_REMOVE K(KT_FN,22)
+#define K_SELECT K(KT_FN,23)
+#define K_PGUP K(KT_FN,24)
+#define K_PGDN K(KT_FN,25)
+#define K_MACRO K(KT_FN,26)
+#define K_HELP K(KT_FN,27)
+#define K_DO K(KT_FN,28)
+#define K_PAUSE K(KT_FN,29)
+#define K_F21 K(KT_FN,30)
+#define K_F22 K(KT_FN,31)
+#define K_F23 K(KT_FN,32)
+#define K_F24 K(KT_FN,33)
+#define K_F25 K(KT_FN,34)
+#define K_F26 K(KT_FN,35)
+#define K_F27 K(KT_FN,36)
+#define K_F28 K(KT_FN,37)
+#define K_F29 K(KT_FN,38)
+#define K_F30 K(KT_FN,39)
+#define K_F31 K(KT_FN,40)
+#define K_F32 K(KT_FN,41)
+#define K_F33 K(KT_FN,42)
+#define K_F34 K(KT_FN,43)
+#define K_F35 K(KT_FN,44)
+#define K_F36 K(KT_FN,45)
+#define K_F37 K(KT_FN,46)
+#define K_F38 K(KT_FN,47)
+#define K_F39 K(KT_FN,48)
+#define K_F40 K(KT_FN,49)
+#define K_F41 K(KT_FN,50)
+#define K_F42 K(KT_FN,51)
+#define K_F43 K(KT_FN,52)
+#define K_F44 K(KT_FN,53)
+#define K_F45 K(KT_FN,54)
+#define K_F46 K(KT_FN,55)
+#define K_F47 K(KT_FN,56)
+#define K_F48 K(KT_FN,57)
+#define K_F49 K(KT_FN,58)
+#define K_F50 K(KT_FN,59)
+#define K_F51 K(KT_FN,60)
+#define K_F52 K(KT_FN,61)
+#define K_F53 K(KT_FN,62)
+#define K_F54 K(KT_FN,63)
+#define K_F55 K(KT_FN,64)
+#define K_F56 K(KT_FN,65)
+#define K_F57 K(KT_FN,66)
+#define K_F58 K(KT_FN,67)
+#define K_F59 K(KT_FN,68)
+#define K_F60 K(KT_FN,69)
+#define K_F61 K(KT_FN,70)
+#define K_F62 K(KT_FN,71)
+#define K_F63 K(KT_FN,72)
+#define K_F64 K(KT_FN,73)
+#define K_F65 K(KT_FN,74)
+#define K_F66 K(KT_FN,75)
+#define K_F67 K(KT_FN,76)
+#define K_F68 K(KT_FN,77)
+#define K_F69 K(KT_FN,78)
+#define K_F70 K(KT_FN,79)
+#define K_F71 K(KT_FN,80)
+#define K_F72 K(KT_FN,81)
+#define K_F73 K(KT_FN,82)
+#define K_F74 K(KT_FN,83)
+#define K_F75 K(KT_FN,84)
+#define K_F76 K(KT_FN,85)
+#define K_F77 K(KT_FN,86)
+#define K_F78 K(KT_FN,87)
+#define K_F79 K(KT_FN,88)
+#define K_F80 K(KT_FN,89)
+#define K_F81 K(KT_FN,90)
+#define K_F82 K(KT_FN,91)
+#define K_F83 K(KT_FN,92)
+#define K_F84 K(KT_FN,93)
+#define K_F85 K(KT_FN,94)
+#define K_F86 K(KT_FN,95)
+#define K_F87 K(KT_FN,96)
+#define K_F88 K(KT_FN,97)
+#define K_F89 K(KT_FN,98)
+#define K_F90 K(KT_FN,99)
+#define K_F91 K(KT_FN,100)
+#define K_F92 K(KT_FN,101)
+#define K_F93 K(KT_FN,102)
+#define K_F94 K(KT_FN,103)
+#define K_F95 K(KT_FN,104)
+#define K_F96 K(KT_FN,105)
+#define K_F97 K(KT_FN,106)
+#define K_F98 K(KT_FN,107)
+#define K_F99 K(KT_FN,108)
+#define K_F100 K(KT_FN,109)
+#define K_F101 K(KT_FN,110)
+#define K_F102 K(KT_FN,111)
+#define K_F103 K(KT_FN,112)
+#define K_F104 K(KT_FN,113)
+#define K_F105 K(KT_FN,114)
+#define K_F106 K(KT_FN,115)
+#define K_F107 K(KT_FN,116)
+#define K_F108 K(KT_FN,117)
+#define K_F109 K(KT_FN,118)
+#define K_F110 K(KT_FN,119)
+#define K_F111 K(KT_FN,120)
+#define K_F112 K(KT_FN,121)
+#define K_F113 K(KT_FN,122)
+#define K_F114 K(KT_FN,123)
+#define K_F115 K(KT_FN,124)
+#define K_F116 K(KT_FN,125)
+#define K_F117 K(KT_FN,126)
+#define K_F118 K(KT_FN,127)
+#define K_F119 K(KT_FN,128)
+#define K_F120 K(KT_FN,129)
+#define K_F121 K(KT_FN,130)
+#define K_F122 K(KT_FN,131)
+#define K_F123 K(KT_FN,132)
+#define K_F124 K(KT_FN,133)
+#define K_F125 K(KT_FN,134)
+#define K_F126 K(KT_FN,135)
+#define K_F127 K(KT_FN,136)
+#define K_F128 K(KT_FN,137)
+#define K_F129 K(KT_FN,138)
+#define K_F130 K(KT_FN,139)
+#define K_F131 K(KT_FN,140)
+#define K_F132 K(KT_FN,141)
+#define K_F133 K(KT_FN,142)
+#define K_F134 K(KT_FN,143)
+#define K_F135 K(KT_FN,144)
+#define K_F136 K(KT_FN,145)
+#define K_F137 K(KT_FN,146)
+#define K_F138 K(KT_FN,147)
+#define K_F139 K(KT_FN,148)
+#define K_F140 K(KT_FN,149)
+#define K_F141 K(KT_FN,150)
+#define K_F142 K(KT_FN,151)
+#define K_F143 K(KT_FN,152)
+#define K_F144 K(KT_FN,153)
+#define K_F145 K(KT_FN,154)
+#define K_F146 K(KT_FN,155)
+#define K_F147 K(KT_FN,156)
+#define K_F148 K(KT_FN,157)
+#define K_F149 K(KT_FN,158)
+#define K_F150 K(KT_FN,159)
+#define K_F151 K(KT_FN,160)
+#define K_F152 K(KT_FN,161)
+#define K_F153 K(KT_FN,162)
+#define K_F154 K(KT_FN,163)
+#define K_F155 K(KT_FN,164)
+#define K_F156 K(KT_FN,165)
+#define K_F157 K(KT_FN,166)
+#define K_F158 K(KT_FN,167)
+#define K_F159 K(KT_FN,168)
+#define K_F160 K(KT_FN,169)
+#define K_F161 K(KT_FN,170)
+#define K_F162 K(KT_FN,171)
+#define K_F163 K(KT_FN,172)
+#define K_F164 K(KT_FN,173)
+#define K_F165 K(KT_FN,174)
+#define K_F166 K(KT_FN,175)
+#define K_F167 K(KT_FN,176)
+#define K_F168 K(KT_FN,177)
+#define K_F169 K(KT_FN,178)
+#define K_F170 K(KT_FN,179)
+#define K_F171 K(KT_FN,180)
+#define K_F172 K(KT_FN,181)
+#define K_F173 K(KT_FN,182)
+#define K_F174 K(KT_FN,183)
+#define K_F175 K(KT_FN,184)
+#define K_F176 K(KT_FN,185)
+#define K_F177 K(KT_FN,186)
+#define K_F178 K(KT_FN,187)
+#define K_F179 K(KT_FN,188)
+#define K_F180 K(KT_FN,189)
+#define K_F181 K(KT_FN,190)
+#define K_F182 K(KT_FN,191)
+#define K_F183 K(KT_FN,192)
+#define K_F184 K(KT_FN,193)
+#define K_F185 K(KT_FN,194)
+#define K_F186 K(KT_FN,195)
+#define K_F187 K(KT_FN,196)
+#define K_F188 K(KT_FN,197)
+#define K_F189 K(KT_FN,198)
+#define K_F190 K(KT_FN,199)
+#define K_F191 K(KT_FN,200)
+#define K_F192 K(KT_FN,201)
+#define K_F193 K(KT_FN,202)
+#define K_F194 K(KT_FN,203)
+#define K_F195 K(KT_FN,204)
+#define K_F196 K(KT_FN,205)
+#define K_F197 K(KT_FN,206)
+#define K_F198 K(KT_FN,207)
+#define K_F199 K(KT_FN,208)
+#define K_F200 K(KT_FN,209)
+#define K_F201 K(KT_FN,210)
+#define K_F202 K(KT_FN,211)
+#define K_F203 K(KT_FN,212)
+#define K_F204 K(KT_FN,213)
+#define K_F205 K(KT_FN,214)
+#define K_F206 K(KT_FN,215)
+#define K_F207 K(KT_FN,216)
+#define K_F208 K(KT_FN,217)
+#define K_F209 K(KT_FN,218)
+#define K_F210 K(KT_FN,219)
+#define K_F211 K(KT_FN,220)
+#define K_F212 K(KT_FN,221)
+#define K_F213 K(KT_FN,222)
+#define K_F214 K(KT_FN,223)
+#define K_F215 K(KT_FN,224)
+#define K_F216 K(KT_FN,225)
+#define K_F217 K(KT_FN,226)
+#define K_F218 K(KT_FN,227)
+#define K_F219 K(KT_FN,228)
+#define K_F220 K(KT_FN,229)
+#define K_F221 K(KT_FN,230)
+#define K_F222 K(KT_FN,231)
+#define K_F223 K(KT_FN,232)
+#define K_F224 K(KT_FN,233)
+#define K_F225 K(KT_FN,234)
+#define K_F226 K(KT_FN,235)
+#define K_F227 K(KT_FN,236)
+#define K_F228 K(KT_FN,237)
+#define K_F229 K(KT_FN,238)
+#define K_F230 K(KT_FN,239)
+#define K_F231 K(KT_FN,240)
+#define K_F232 K(KT_FN,241)
+#define K_F233 K(KT_FN,242)
+#define K_F234 K(KT_FN,243)
+#define K_F235 K(KT_FN,244)
+#define K_F236 K(KT_FN,245)
+#define K_F237 K(KT_FN,246)
+#define K_F238 K(KT_FN,247)
+#define K_F239 K(KT_FN,248)
+#define K_F240 K(KT_FN,249)
+#define K_F241 K(KT_FN,250)
+#define K_F242 K(KT_FN,251)
+#define K_F243 K(KT_FN,252)
+#define K_F244 K(KT_FN,253)
+#define K_F245 K(KT_FN,254)
+#define K_UNDO K(KT_FN,255)
+
+#define K_HOLE K(KT_SPEC,0)
+#define K_ENTER K(KT_SPEC,1)
+#define K_SH_REGS K(KT_SPEC,2)
+#define K_SH_MEM K(KT_SPEC,3)
+#define K_SH_STAT K(KT_SPEC,4)
+#define K_BREAK K(KT_SPEC,5)
+#define K_CONS K(KT_SPEC,6)
+#define K_CAPS K(KT_SPEC,7)
+#define K_NUM K(KT_SPEC,8)
+#define K_HOLD K(KT_SPEC,9)
+#define K_SCROLLFORW K(KT_SPEC,10)
+#define K_SCROLLBACK K(KT_SPEC,11)
+#define K_BOOT K(KT_SPEC,12)
+#define K_CAPSON K(KT_SPEC,13)
+#define K_COMPOSE K(KT_SPEC,14)
+#define K_SAK K(KT_SPEC,15)
+#define K_DECRCONSOLE K(KT_SPEC,16)
+#define K_INCRCONSOLE K(KT_SPEC,17)
+#define K_SPAWNCONSOLE K(KT_SPEC,18)
+#define K_BARENUMLOCK K(KT_SPEC,19)
+
+#define K_ALLOCATED K(KT_SPEC,126)
+#define K_NOSUCHMAP K(KT_SPEC,127)
+
+#define K_P0 K(KT_PAD,0)
+#define K_P1 K(KT_PAD,1)
+#define K_P2 K(KT_PAD,2)
+#define K_P3 K(KT_PAD,3)
+#define K_P4 K(KT_PAD,4)
+#define K_P5 K(KT_PAD,5)
+#define K_P6 K(KT_PAD,6)
+#define K_P7 K(KT_PAD,7)
+#define K_P8 K(KT_PAD,8)
+#define K_P9 K(KT_PAD,9)
+#define K_PPLUS K(KT_PAD,10)
+#define K_PMINUS K(KT_PAD,11)
+#define K_PSTAR K(KT_PAD,12)
+#define K_PSLASH K(KT_PAD,13)
+#define K_PENTER K(KT_PAD,14)
+#define K_PCOMMA K(KT_PAD,15)
+#define K_PDOT K(KT_PAD,16)
+#define K_PPLUSMINUS K(KT_PAD,17)
+#define K_PPARENL K(KT_PAD,18)
+#define K_PPARENR K(KT_PAD,19)
+
+#define NR_PAD 20
+
+#define K_DGRAVE K(KT_DEAD,0)
+#define K_DACUTE K(KT_DEAD,1)
+#define K_DCIRCM K(KT_DEAD,2)
+#define K_DTILDE K(KT_DEAD,3)
+#define K_DDIERE K(KT_DEAD,4)
+#define K_DCEDIL K(KT_DEAD,5)
+
+#define NR_DEAD 6
+
+#define K_DOWN K(KT_CUR,0)
+#define K_LEFT K(KT_CUR,1)
+#define K_RIGHT K(KT_CUR,2)
+#define K_UP K(KT_CUR,3)
+
+#define K_SHIFT K(KT_SHIFT,KG_SHIFT)
+#define K_CTRL K(KT_SHIFT,KG_CTRL)
+#define K_ALT K(KT_SHIFT,KG_ALT)
+#define K_ALTGR K(KT_SHIFT,KG_ALTGR)
+#define K_SHIFTL K(KT_SHIFT,KG_SHIFTL)
+#define K_SHIFTR K(KT_SHIFT,KG_SHIFTR)
+#define K_CTRLL K(KT_SHIFT,KG_CTRLL)
+#define K_CTRLR K(KT_SHIFT,KG_CTRLR)
+#define K_CAPSSHIFT K(KT_SHIFT,KG_CAPSSHIFT)
+
+#define K_ASC0 K(KT_ASCII,0)
+#define K_ASC1 K(KT_ASCII,1)
+#define K_ASC2 K(KT_ASCII,2)
+#define K_ASC3 K(KT_ASCII,3)
+#define K_ASC4 K(KT_ASCII,4)
+#define K_ASC5 K(KT_ASCII,5)
+#define K_ASC6 K(KT_ASCII,6)
+#define K_ASC7 K(KT_ASCII,7)
+#define K_ASC8 K(KT_ASCII,8)
+#define K_ASC9 K(KT_ASCII,9)
+#define K_HEX0 K(KT_ASCII,10)
+#define K_HEX1 K(KT_ASCII,11)
+#define K_HEX2 K(KT_ASCII,12)
+#define K_HEX3 K(KT_ASCII,13)
+#define K_HEX4 K(KT_ASCII,14)
+#define K_HEX5 K(KT_ASCII,15)
+#define K_HEX6 K(KT_ASCII,16)
+#define K_HEX7 K(KT_ASCII,17)
+#define K_HEX8 K(KT_ASCII,18)
+#define K_HEX9 K(KT_ASCII,19)
+#define K_HEXa K(KT_ASCII,20)
+#define K_HEXb K(KT_ASCII,21)
+#define K_HEXc K(KT_ASCII,22)
+#define K_HEXd K(KT_ASCII,23)
+#define K_HEXe K(KT_ASCII,24)
+#define K_HEXf K(KT_ASCII,25)
+
+#define NR_ASCII 26
+
+#define K_SHIFTLOCK K(KT_LOCK,KG_SHIFT)
+#define K_CTRLLOCK K(KT_LOCK,KG_CTRL)
+#define K_ALTLOCK K(KT_LOCK,KG_ALT)
+#define K_ALTGRLOCK K(KT_LOCK,KG_ALTGR)
+#define K_SHIFTLLOCK K(KT_LOCK,KG_SHIFTL)
+#define K_SHIFTRLOCK K(KT_LOCK,KG_SHIFTR)
+#define K_CTRLLLOCK K(KT_LOCK,KG_CTRLL)
+#define K_CTRLRLOCK K(KT_LOCK,KG_CTRLR)
+
+#define K_SHIFT_SLOCK K(KT_SLOCK,KG_SHIFT)
+#define K_CTRL_SLOCK K(KT_SLOCK,KG_CTRL)
+#define K_ALT_SLOCK K(KT_SLOCK,KG_ALT)
+#define K_ALTGR_SLOCK K(KT_SLOCK,KG_ALTGR)
+#define K_SHIFTL_SLOCK K(KT_SLOCK,KG_SHIFTL)
+#define K_SHIFTR_SLOCK K(KT_SLOCK,KG_SHIFTR)
+#define K_CTRLL_SLOCK K(KT_SLOCK,KG_CTRLL)
+#define K_CTRLR_SLOCK K(KT_SLOCK,KG_CTRLR)
+
+#define NR_LOCK 8
+
+#define K_BRL_BLANK K(KT_BRL, 0)
+#define K_BRL_DOT1 K(KT_BRL, 1)
+#define K_BRL_DOT2 K(KT_BRL, 2)
+#define K_BRL_DOT3 K(KT_BRL, 3)
+#define K_BRL_DOT4 K(KT_BRL, 4)
+#define K_BRL_DOT5 K(KT_BRL, 5)
+#define K_BRL_DOT6 K(KT_BRL, 6)
+#define K_BRL_DOT7 K(KT_BRL, 7)
+#define K_BRL_DOT8 K(KT_BRL, 8)
+
+#define NR_BRL 9
+
+#define MAX_DIACR 256
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/keychord.h b/6/platforms/android-3/arch-arm/usr/include/linux/keychord.h
new file mode 100644
index 0000000..9148431
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/keychord.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KEYCHORD_H_
+#define __LINUX_KEYCHORD_H_
+
+#include <linux/input.h>
+
+#define KEYCHORD_VERSION 1
+
+struct input_keychord {
+
+ __u16 version;
+
+ __u16 id;
+
+ __u16 count;
+
+ __u16 keycodes[];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/klist.h b/6/platforms/android-3/arch-arm/usr/include/linux/klist.h
new file mode 100644
index 0000000..0df014f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/klist.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KLIST_H
+#define _LINUX_KLIST_H
+
+#include <linux/spinlock.h>
+#include <linux/completion.h>
+#include <linux/kref.h>
+#include <linux/list.h>
+
+struct klist_node;
+struct klist {
+ spinlock_t k_lock;
+ struct list_head k_list;
+ void (*get)(struct klist_node *);
+ void (*put)(struct klist_node *);
+};
+
+struct klist_node {
+ struct klist * n_klist;
+ struct list_head n_node;
+ struct kref n_ref;
+ struct completion n_removed;
+};
+
+struct klist_iter {
+ struct klist * i_klist;
+ struct list_head * i_head;
+ struct klist_node * i_cur;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kmod.h b/6/platforms/android-3/arch-arm/usr/include/linux/kmod.h
new file mode 100644
index 0000000..d24456d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kmod.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KMOD_H__
+#define __LINUX_KMOD_H__
+
+#include <linux/stddef.h>
+#include <linux/errno.h>
+#include <linux/compiler.h>
+
+#define KMOD_PATH_LEN 256
+
+#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kobject.h b/6/platforms/android-3/arch-arm/usr/include/linux/kobject.h
new file mode 100644
index 0000000..c61a950
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kobject.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _KOBJECT_H_
+#define _KOBJECT_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/kref.h b/6/platforms/android-3/arch-arm/usr/include/linux/kref.h
new file mode 100644
index 0000000..ee02b7f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/kref.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _KREF_H_
+#define _KREF_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ktime.h b/6/platforms/android-3/arch-arm/usr/include/linux/ktime.h
new file mode 100644
index 0000000..34f8f0f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ktime.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KTIME_H
+#define _LINUX_KTIME_H
+
+#include <linux/time.h>
+#include <linux/jiffies.h>
+
+typedef union {
+ s64 tv64;
+#if BITS_PER_LONG != (64 && !defined(CONFIG_KTIME_SCALAR))
+ struct {
+#ifdef __BIG_ENDIAN
+ s32 sec, nsec;
+#else
+ s32 nsec, sec;
+#endif
+ } tv;
+#endif
+} ktime_t;
+
+#define KTIME_MAX ((s64)~((u64)1 << 63))
+#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
+
+#if BITS_PER_LONG == 64
+
+#if BITS_PER_LONG == 64
+#endif
+#define ktime_sub(lhs, rhs) ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
+#define ktime_add(lhs, rhs) ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
+#define ktime_add_ns(kt, nsval) ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })
+#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64)
+#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
+#define ktime_to_ns(kt) ((kt).tv64)
+#else
+
+#endif
+#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
+#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
+
+#define ktime_get_real_ts(ts) getnstimeofday(ts)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/limits.h b/6/platforms/android-3/arch-arm/usr/include/linux/limits.h
new file mode 100644
index 0000000..5565e30
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/limits.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LIMITS_H
+#define _LINUX_LIMITS_H
+
+#define NR_OPEN 1024
+
+#define NGROUPS_MAX 65536
+#define ARG_MAX 131072
+#define CHILD_MAX 999
+#define OPEN_MAX 256
+#define LINK_MAX 127
+#define MAX_CANON 255
+#define MAX_INPUT 255
+#define NAME_MAX 255
+#define PATH_MAX 4096
+#define PIPE_BUF 4096
+#define XATTR_NAME_MAX 255
+#define XATTR_SIZE_MAX 65536
+#define XATTR_LIST_MAX 65536
+
+#define RTSIG_MAX 32
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/linkage.h b/6/platforms/android-3/arch-arm/usr/include/linux/linkage.h
new file mode 100644
index 0000000..e0194bc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/linkage.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LINKAGE_H
+#define _LINUX_LINKAGE_H
+
+#include <asm/linkage.h>
+
+#ifdef __cplusplus
+#define CPP_ASMLINKAGE extern "C"
+#else
+#define CPP_ASMLINKAGE
+#endif
+
+#ifndef asmlinkage
+#define asmlinkage CPP_ASMLINKAGE
+#endif
+
+#ifndef prevent_tail_call
+#define prevent_tail_call(ret) do { } while (0)
+#endif
+
+#ifndef __ALIGN
+#define __ALIGN .align 4,0x90
+#define __ALIGN_STR ".align 4,0x90"
+#endif
+
+#ifdef __ASSEMBLY__
+
+#define ALIGN __ALIGN
+#define ALIGN_STR __ALIGN_STR
+
+#ifndef ENTRY
+#define ENTRY(name) .globl name; ALIGN; name:
+#endif
+
+#define KPROBE_ENTRY(name) .section .kprobes.text, "ax"; ENTRY(name)
+
+#ifndef END
+#define END(name) .size name, .-name
+#endif
+
+#ifndef ENDPROC
+#define ENDPROC(name) .type name, @function; END(name)
+#endif
+
+#endif
+
+#define NORET_TYPE
+#define ATTRIB_NORET __attribute__((noreturn))
+#define NORET_AND noreturn,
+
+#ifndef FASTCALL
+#define FASTCALL(x) x
+#define fastcall
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/list.h b/6/platforms/android-3/arch-arm/usr/include/linux/list.h
new file mode 100644
index 0000000..d17871d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/list.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LIST_H
+#define _LINUX_LIST_H
+
+#warning "don't include kernel headers in userspace"
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/lockd/nlm.h b/6/platforms/android-3/arch-arm/usr/include/linux/lockd/nlm.h
new file mode 100644
index 0000000..d5d44fe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/lockd/nlm.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_LOCKD_NLM_H
+#define LINUX_LOCKD_NLM_H
+
+#define NLM_OFFSET_MAX ((s32) 0x7fffffff)
+#define NLM4_OFFSET_MAX ((s64) ((~(u64)0) >> 1))
+
+enum {
+ NLM_LCK_GRANTED = 0,
+ NLM_LCK_DENIED = 1,
+ NLM_LCK_DENIED_NOLOCKS = 2,
+ NLM_LCK_BLOCKED = 3,
+ NLM_LCK_DENIED_GRACE_PERIOD = 4,
+};
+
+#define NLM_PROGRAM 100021
+
+#define NLMPROC_NULL 0
+#define NLMPROC_TEST 1
+#define NLMPROC_LOCK 2
+#define NLMPROC_CANCEL 3
+#define NLMPROC_UNLOCK 4
+#define NLMPROC_GRANTED 5
+#define NLMPROC_TEST_MSG 6
+#define NLMPROC_LOCK_MSG 7
+#define NLMPROC_CANCEL_MSG 8
+#define NLMPROC_UNLOCK_MSG 9
+#define NLMPROC_GRANTED_MSG 10
+#define NLMPROC_TEST_RES 11
+#define NLMPROC_LOCK_RES 12
+#define NLMPROC_CANCEL_RES 13
+#define NLMPROC_UNLOCK_RES 14
+#define NLMPROC_GRANTED_RES 15
+#define NLMPROC_NSM_NOTIFY 16
+#define NLMPROC_SHARE 20
+#define NLMPROC_UNSHARE 21
+#define NLMPROC_NM_LOCK 22
+#define NLMPROC_FREE_ALL 23
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/lockd/xdr.h b/6/platforms/android-3/arch-arm/usr/include/linux/lockd/xdr.h
new file mode 100644
index 0000000..75d0308
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/lockd/xdr.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LOCKD_XDR_H
+#define LOCKD_XDR_H
+
+#include <linux/fs.h>
+#include <linux/nfs.h>
+#include <linux/sunrpc/xdr.h>
+
+#define NLM_MAXCOOKIELEN 32
+#define NLM_MAXSTRLEN 1024
+
+#define nlm_granted __constant_htonl(NLM_LCK_GRANTED)
+#define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED)
+#define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
+#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
+#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
+
+struct nlm_lock {
+ char * caller;
+ int len;
+ struct nfs_fh fh;
+ struct xdr_netobj oh;
+ u32 svid;
+ struct file_lock fl;
+};
+
+struct nlm_cookie
+{
+ unsigned char data[NLM_MAXCOOKIELEN];
+ unsigned int len;
+};
+
+struct nlm_args {
+ struct nlm_cookie cookie;
+ struct nlm_lock lock;
+ u32 block;
+ u32 reclaim;
+ u32 state;
+ u32 monitor;
+ u32 fsm_access;
+ u32 fsm_mode;
+};
+
+typedef struct nlm_args nlm_args;
+
+struct nlm_res {
+ struct nlm_cookie cookie;
+ u32 status;
+ struct nlm_lock lock;
+};
+
+struct nlm_reboot {
+ char * mon;
+ int len;
+ u32 state;
+ u32 addr;
+ u32 vers;
+ u32 proto;
+};
+
+#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/lockdep.h b/6/platforms/android-3/arch-arm/usr/include/linux/lockdep.h
new file mode 100644
index 0000000..f5e8634
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/lockdep.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_LOCKDEP_H
+#define __LINUX_LOCKDEP_H
+
+#include <linux/linkage.h>
+#include <linux/list.h>
+#include <linux/debug_locks.h>
+#include <linux/stacktrace.h>
+
+#define lock_acquire(l, s, t, r, c, i) do { } while (0)
+#define lock_release(l, n, i) do { } while (0)
+#define lockdep_init() do { } while (0)
+#define lockdep_info() do { } while (0)
+#define lockdep_init_map(lock, name, key) do { (void)(key); } while (0)
+#define lockdep_set_class(lock, key) do { (void)(key); } while (0)
+#define lockdep_set_class_and_name(lock, key, name) do { (void)(key); } while (0)
+#define INIT_LOCKDEP
+#define lockdep_reset() do { debug_locks = 1; } while (0)
+#define lockdep_free_key_range(start, size) do { } while (0)
+
+#define early_init_irq_lock_class() do { } while (0)
+
+#define early_boot_irqs_off() do { } while (0)
+#define early_boot_irqs_on() do { } while (0)
+
+#define SINGLE_DEPTH_NESTING 1
+
+#define spin_acquire(l, s, t, i) do { } while (0)
+#define spin_release(l, n, i) do { } while (0)
+
+#define rwlock_acquire(l, s, t, i) do { } while (0)
+#define rwlock_acquire_read(l, s, t, i) do { } while (0)
+#define rwlock_release(l, n, i) do { } while (0)
+
+#define mutex_acquire(l, s, t, i) do { } while (0)
+#define mutex_release(l, n, i) do { } while (0)
+
+#define rwsem_acquire(l, s, t, i) do { } while (0)
+#define rwsem_acquire_read(l, s, t, i) do { } while (0)
+#define rwsem_release(l, n, i) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/loop.h b/6/platforms/android-3/arch-arm/usr/include/linux/loop.h
new file mode 100644
index 0000000..9cdfd38
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/loop.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LOOP_H
+#define _LINUX_LOOP_H
+
+#define LO_NAME_SIZE 64
+#define LO_KEY_SIZE 32
+
+enum {
+ LO_FLAGS_READ_ONLY = 1,
+ LO_FLAGS_USE_AOPS = 2,
+};
+
+#include <asm/posix_types.h>
+#include <asm/types.h>
+
+struct loop_info {
+ int lo_number;
+ __kernel_old_dev_t lo_device;
+ unsigned long lo_inode;
+ __kernel_old_dev_t lo_rdevice;
+ int lo_offset;
+ int lo_encrypt_type;
+ int lo_encrypt_key_size;
+ int lo_flags;
+ char lo_name[LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[LO_KEY_SIZE];
+ unsigned long lo_init[2];
+ char reserved[4];
+};
+
+struct loop_info64 {
+ __u64 lo_device;
+ __u64 lo_inode;
+ __u64 lo_rdevice;
+ __u64 lo_offset;
+ __u64 lo_sizelimit;
+ __u32 lo_number;
+ __u32 lo_encrypt_type;
+ __u32 lo_encrypt_key_size;
+ __u32 lo_flags;
+ __u8 lo_file_name[LO_NAME_SIZE];
+ __u8 lo_crypt_name[LO_NAME_SIZE];
+ __u8 lo_encrypt_key[LO_KEY_SIZE];
+ __u64 lo_init[2];
+};
+
+#define LO_CRYPT_NONE 0
+#define LO_CRYPT_XOR 1
+#define LO_CRYPT_DES 2
+#define LO_CRYPT_FISH2 3
+#define LO_CRYPT_BLOW 4
+#define LO_CRYPT_CAST128 5
+#define LO_CRYPT_IDEA 6
+#define LO_CRYPT_DUMMY 9
+#define LO_CRYPT_SKIPJACK 10
+#define LO_CRYPT_CRYPTOAPI 18
+#define MAX_LO_CRYPT 20
+
+#define LOOP_SET_FD 0x4C00
+#define LOOP_CLR_FD 0x4C01
+#define LOOP_SET_STATUS 0x4C02
+#define LOOP_GET_STATUS 0x4C03
+#define LOOP_SET_STATUS64 0x4C04
+#define LOOP_GET_STATUS64 0x4C05
+#define LOOP_CHANGE_FD 0x4C06
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/magic.h b/6/platforms/android-3/arch-arm/usr/include/linux/magic.h
new file mode 100644
index 0000000..c94f9ce
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/magic.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MAGIC_H__
+#define __LINUX_MAGIC_H__
+
+#define ADFS_SUPER_MAGIC 0xadf5
+#define AFFS_SUPER_MAGIC 0xadff
+#define AFS_SUPER_MAGIC 0x5346414F
+#define AUTOFS_SUPER_MAGIC 0x0187
+#define CODA_SUPER_MAGIC 0x73757245
+#define EFS_SUPER_MAGIC 0x414A53
+#define EXT2_SUPER_MAGIC 0xEF53
+#define EXT3_SUPER_MAGIC 0xEF53
+#define EXT4_SUPER_MAGIC 0xEF53
+#define HPFS_SUPER_MAGIC 0xf995e849
+#define ISOFS_SUPER_MAGIC 0x9660
+#define JFFS2_SUPER_MAGIC 0x72b6
+#define ANON_INODE_FS_MAGIC 0x09041934
+
+#define MINIX_SUPER_MAGIC 0x137F
+#define MINIX_SUPER_MAGIC2 0x138F
+#define MINIX2_SUPER_MAGIC 0x2468
+#define MINIX2_SUPER_MAGIC2 0x2478
+#define MINIX3_SUPER_MAGIC 0x4d5a
+
+#define MSDOS_SUPER_MAGIC 0x4d44
+#define NCP_SUPER_MAGIC 0x564c
+#define NFS_SUPER_MAGIC 0x6969
+#define OPENPROM_SUPER_MAGIC 0x9fa1
+#define PROC_SUPER_MAGIC 0x9fa0
+#define QNX4_SUPER_MAGIC 0x002f
+
+#define REISERFS_SUPER_MAGIC 0x52654973
+
+#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
+#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
+#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
+
+#define SMB_SUPER_MAGIC 0x517B
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+#define CGROUP_SUPER_MAGIC 0x27e0eb
+
+#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
+#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/major.h b/6/platforms/android-3/arch-arm/usr/include/linux/major.h
new file mode 100644
index 0000000..e42d698
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/major.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MAJOR_H
+#define _LINUX_MAJOR_H
+
+#define UNNAMED_MAJOR 0
+#define MEM_MAJOR 1
+#define RAMDISK_MAJOR 1
+#define FLOPPY_MAJOR 2
+#define PTY_MASTER_MAJOR 2
+#define IDE0_MAJOR 3
+#define HD_MAJOR IDE0_MAJOR
+#define PTY_SLAVE_MAJOR 3
+#define TTY_MAJOR 4
+#define TTYAUX_MAJOR 5
+#define LP_MAJOR 6
+#define VCS_MAJOR 7
+#define LOOP_MAJOR 7
+#define SCSI_DISK0_MAJOR 8
+#define SCSI_TAPE_MAJOR 9
+#define MD_MAJOR 9
+#define MISC_MAJOR 10
+#define SCSI_CDROM_MAJOR 11
+#define MUX_MAJOR 11
+#define XT_DISK_MAJOR 13
+#define INPUT_MAJOR 13
+#define SOUND_MAJOR 14
+#define CDU31A_CDROM_MAJOR 15
+#define JOYSTICK_MAJOR 15
+#define GOLDSTAR_CDROM_MAJOR 16
+#define OPTICS_CDROM_MAJOR 17
+#define SANYO_CDROM_MAJOR 18
+#define CYCLADES_MAJOR 19
+#define CYCLADESAUX_MAJOR 20
+#define MITSUMI_X_CDROM_MAJOR 20
+#define MFM_ACORN_MAJOR 21
+#define SCSI_GENERIC_MAJOR 21
+#define IDE1_MAJOR 22
+#define DIGICU_MAJOR 22
+#define DIGI_MAJOR 23
+#define MITSUMI_CDROM_MAJOR 23
+#define CDU535_CDROM_MAJOR 24
+#define STL_SERIALMAJOR 24
+#define MATSUSHITA_CDROM_MAJOR 25
+#define STL_CALLOUTMAJOR 25
+#define MATSUSHITA_CDROM2_MAJOR 26
+#define QIC117_TAPE_MAJOR 27
+#define MATSUSHITA_CDROM3_MAJOR 27
+#define MATSUSHITA_CDROM4_MAJOR 28
+#define STL_SIOMEMMAJOR 28
+#define ACSI_MAJOR 28
+#define AZTECH_CDROM_MAJOR 29
+#define GRAPHDEV_MAJOR 29
+#define CM206_CDROM_MAJOR 32
+#define IDE2_MAJOR 33
+#define IDE3_MAJOR 34
+#define Z8530_MAJOR 34
+#define XPRAM_MAJOR 35
+#define NETLINK_MAJOR 36
+#define PS2ESDI_MAJOR 36
+#define IDETAPE_MAJOR 37
+#define Z2RAM_MAJOR 37
+#define APBLOCK_MAJOR 38
+#define DDV_MAJOR 39
+#define NBD_MAJOR 43
+#define RISCOM8_NORMAL_MAJOR 48
+#define DAC960_MAJOR 48
+#define RISCOM8_CALLOUT_MAJOR 49
+#define MKISS_MAJOR 55
+#define DSP56K_MAJOR 55
+
+#define IDE4_MAJOR 56
+#define IDE5_MAJOR 57
+
+#define SCSI_DISK1_MAJOR 65
+#define SCSI_DISK2_MAJOR 66
+#define SCSI_DISK3_MAJOR 67
+#define SCSI_DISK4_MAJOR 68
+#define SCSI_DISK5_MAJOR 69
+#define SCSI_DISK6_MAJOR 70
+#define SCSI_DISK7_MAJOR 71
+
+#define COMPAQ_SMART2_MAJOR 72
+#define COMPAQ_SMART2_MAJOR1 73
+#define COMPAQ_SMART2_MAJOR2 74
+#define COMPAQ_SMART2_MAJOR3 75
+#define COMPAQ_SMART2_MAJOR4 76
+#define COMPAQ_SMART2_MAJOR5 77
+#define COMPAQ_SMART2_MAJOR6 78
+#define COMPAQ_SMART2_MAJOR7 79
+
+#define SPECIALIX_NORMAL_MAJOR 75
+#define SPECIALIX_CALLOUT_MAJOR 76
+
+#define AURORA_MAJOR 79
+
+#define I2O_MAJOR 80
+
+#define SHMIQ_MAJOR 85
+#define SCSI_CHANGER_MAJOR 86
+
+#define IDE6_MAJOR 88
+#define IDE7_MAJOR 89
+#define IDE8_MAJOR 90
+#define IDE9_MAJOR 91
+
+#define DASD_MAJOR 94
+
+#define MDISK_MAJOR 95
+
+#define UBD_MAJOR 98
+
+#define PP_MAJOR 99
+#define JSFD_MAJOR 99
+
+#define PHONE_MAJOR 100
+
+#define COMPAQ_CISS_MAJOR 104
+#define COMPAQ_CISS_MAJOR1 105
+#define COMPAQ_CISS_MAJOR2 106
+#define COMPAQ_CISS_MAJOR3 107
+#define COMPAQ_CISS_MAJOR4 108
+#define COMPAQ_CISS_MAJOR5 109
+#define COMPAQ_CISS_MAJOR6 110
+#define COMPAQ_CISS_MAJOR7 111
+
+#define VIODASD_MAJOR 112
+#define VIOCD_MAJOR 113
+
+#define ATARAID_MAJOR 114
+
+#define SCSI_DISK8_MAJOR 128
+#define SCSI_DISK9_MAJOR 129
+#define SCSI_DISK10_MAJOR 130
+#define SCSI_DISK11_MAJOR 131
+#define SCSI_DISK12_MAJOR 132
+#define SCSI_DISK13_MAJOR 133
+#define SCSI_DISK14_MAJOR 134
+#define SCSI_DISK15_MAJOR 135
+
+#define UNIX98_PTY_MASTER_MAJOR 128
+#define UNIX98_PTY_MAJOR_COUNT 8
+#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
+
+#define RTF_MAJOR 150
+#define RAW_MAJOR 162
+
+#define USB_ACM_MAJOR 166
+#define USB_ACM_AUX_MAJOR 167
+#define USB_CHAR_MAJOR 180
+
+#define VXVM_MAJOR 199
+#define VXSPEC_MAJOR 200
+#define VXDMP_MAJOR 201
+
+#define MSR_MAJOR 202
+#define CPUID_MAJOR 203
+
+#define OSST_MAJOR 206
+
+#define IBM_TTY3270_MAJOR 227
+#define IBM_FS3270_MAJOR 228
+
+#define VIOTAPE_MAJOR 230
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mc146818rtc.h b/6/platforms/android-3/arch-arm/usr/include/linux/mc146818rtc.h
new file mode 100644
index 0000000..74436ea
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mc146818rtc.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MC146818RTC_H
+#define _MC146818RTC_H
+
+#include <asm/io.h>
+#include <linux/rtc.h>
+#include <asm/mc146818rtc.h>
+
+#define RTC_SECONDS 0
+#define RTC_SECONDS_ALARM 1
+#define RTC_MINUTES 2
+#define RTC_MINUTES_ALARM 3
+#define RTC_HOURS 4
+#define RTC_HOURS_ALARM 5
+
+#define RTC_ALARM_DONT_CARE 0xC0
+
+#define RTC_DAY_OF_WEEK 6
+#define RTC_DAY_OF_MONTH 7
+#define RTC_MONTH 8
+#define RTC_YEAR 9
+
+#define RTC_REG_A 10
+#define RTC_REG_B 11
+#define RTC_REG_C 12
+#define RTC_REG_D 13
+
+#define RTC_FREQ_SELECT RTC_REG_A
+
+#define RTC_UIP 0x80
+#define RTC_DIV_CTL 0x70
+
+#define RTC_REF_CLCK_4MHZ 0x00
+#define RTC_REF_CLCK_1MHZ 0x10
+#define RTC_REF_CLCK_32KHZ 0x20
+
+#define RTC_DIV_RESET1 0x60
+#define RTC_DIV_RESET2 0x70
+
+#define RTC_RATE_SELECT 0x0F
+
+#define RTC_CONTROL RTC_REG_B
+#define RTC_SET 0x80
+#define RTC_PIE 0x40
+#define RTC_AIE 0x20
+#define RTC_UIE 0x10
+#define RTC_SQWE 0x08
+#define RTC_DM_BINARY 0x04
+#define RTC_24H 0x02
+#define RTC_DST_EN 0x01
+
+#define RTC_INTR_FLAGS RTC_REG_C
+
+#define RTC_IRQF 0x80
+#define RTC_PF 0x40
+#define RTC_AF 0x20
+#define RTC_UF 0x10
+
+#define RTC_VALID RTC_REG_D
+#define RTC_VRT 0x80
+
+#ifndef ARCH_RTC_LOCATION
+
+#define RTC_IO_EXTENT 0x8
+#define RTC_IOMAPPED 1
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mca.h b/6/platforms/android-3/arch-arm/usr/include/linux/mca.h
new file mode 100644
index 0000000..dfbfc2a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mca.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MCA_H
+#define _LINUX_MCA_H
+
+#include <linux/device.h>
+
+#define MCA_bus 0
+
+typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
+
+enum MCA_AdapterStatus {
+ MCA_ADAPTER_NORMAL = 0,
+ MCA_ADAPTER_NONE = 1,
+ MCA_ADAPTER_DISABLED = 2,
+ MCA_ADAPTER_ERROR = 3
+};
+
+struct mca_device {
+ u64 dma_mask;
+ int pos_id;
+ int slot;
+
+ int index;
+
+ int driver_loaded;
+
+ unsigned char pos[8];
+
+ short pos_register;
+
+ enum MCA_AdapterStatus status;
+ struct device dev;
+ char name[32];
+};
+#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
+
+struct mca_bus_accessor_functions {
+ unsigned char (*mca_read_pos)(struct mca_device *, int reg);
+ void (*mca_write_pos)(struct mca_device *, int reg,
+ unsigned char byte);
+ int (*mca_transform_irq)(struct mca_device *, int irq);
+ int (*mca_transform_ioport)(struct mca_device *,
+ int region);
+ void * (*mca_transform_memory)(struct mca_device *,
+ void *memory);
+};
+
+struct mca_bus {
+ u64 default_dma_mask;
+ int number;
+ struct mca_bus_accessor_functions f;
+ struct device dev;
+ char name[32];
+};
+#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
+
+struct mca_driver {
+ const short *id_table;
+ void *driver_data;
+ struct device_driver driver;
+};
+#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mempolicy.h b/6/platforms/android-3/arch-arm/usr/include/linux/mempolicy.h
new file mode 100644
index 0000000..6b7b2d4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mempolicy.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MEMPOLICY_H
+#define _LINUX_MEMPOLICY_H 1
+
+#include <linux/errno.h>
+
+#define MPOL_DEFAULT 0
+#define MPOL_PREFERRED 1
+#define MPOL_BIND 2
+#define MPOL_INTERLEAVE 3
+
+#define MPOL_MAX MPOL_INTERLEAVE
+
+#define MPOL_F_NODE (1<<0)
+#define MPOL_F_ADDR (1<<1)
+
+#define MPOL_MF_STRICT (1<<0)
+#define MPOL_MF_MOVE (1<<1)
+#define MPOL_MF_MOVE_ALL (1<<2)
+#define MPOL_MF_INTERNAL (1<<3)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mempool.h b/6/platforms/android-3/arch-arm/usr/include/linux/mempool.h
new file mode 100644
index 0000000..fa2432b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mempool.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MEMPOOL_H
+#define _LINUX_MEMPOOL_H
+
+#include <linux/wait.h>
+
+struct kmem_cache;
+
+typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
+typedef void (mempool_free_t)(void *element, void *pool_data);
+
+typedef struct mempool_s {
+ spinlock_t lock;
+ int min_nr;
+ int curr_nr;
+ void **elements;
+
+ void *pool_data;
+ mempool_alloc_t *alloc;
+ mempool_free_t *free;
+ wait_queue_head_t wait;
+} mempool_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/miscdevice.h b/6/platforms/android-3/arch-arm/usr/include/linux/miscdevice.h
new file mode 100644
index 0000000..457960a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/miscdevice.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MISCDEVICE_H
+#define _LINUX_MISCDEVICE_H
+#include <linux/module.h>
+#include <linux/major.h>
+
+#define PSMOUSE_MINOR 1
+#define MS_BUSMOUSE_MINOR 2
+#define ATIXL_BUSMOUSE_MINOR 3
+
+#define ATARIMOUSE_MINOR 5
+#define SUN_MOUSE_MINOR 6
+#define APOLLO_MOUSE_MINOR 7
+#define PC110PAD_MINOR 9
+
+#define WATCHDOG_MINOR 130
+#define TEMP_MINOR 131
+#define RTC_MINOR 135
+#define EFI_RTC_MINOR 136
+#define SUN_OPENPROM_MINOR 139
+#define DMAPI_MINOR 140
+#define NVRAM_MINOR 144
+#define SGI_MMTIMER 153
+#define STORE_QUEUE_MINOR 155
+#define I2O_MINOR 166
+#define MICROCODE_MINOR 184
+#define MWAVE_MINOR 219
+#define MPT_MINOR 220
+#define MISC_DYNAMIC_MINOR 255
+
+#define TUN_MINOR 200
+#define HPET_MINOR 228
+
+struct device;
+struct class_device;
+
+struct miscdevice {
+ int minor;
+ const char *name;
+ const struct file_operations *fops;
+ struct list_head list;
+ struct device *dev;
+ struct class_device *class;
+};
+
+#define MODULE_ALIAS_MISCDEV(minor) MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) "-" __stringify(minor))
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mm.h b/6/platforms/android-3/arch-arm/usr/include/linux/mm.h
new file mode 100644
index 0000000..fea293b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mm.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MM_H
+#define _LINUX_MM_H
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/capability.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mmc/card.h b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/card.h
new file mode 100644
index 0000000..94afe21
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/card.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MMC_CARD_H
+#define LINUX_MMC_CARD_H
+
+#include <linux/mmc/mmc.h>
+
+struct mmc_cid {
+ unsigned int manfid;
+ char prod_name[8];
+ unsigned int serial;
+ unsigned short oemid;
+ unsigned short year;
+ unsigned char hwrev;
+ unsigned char fwrev;
+ unsigned char month;
+};
+
+struct mmc_csd {
+ unsigned char mmca_vsn;
+ unsigned short cmdclass;
+ unsigned short tacc_clks;
+ unsigned int tacc_ns;
+ unsigned int r2w_factor;
+ unsigned int max_dtr;
+ unsigned int read_blkbits;
+ unsigned int write_blkbits;
+ unsigned int capacity;
+ unsigned int read_partial:1,
+ read_misalign:1,
+ write_partial:1,
+ write_misalign:1;
+};
+
+struct sd_scr {
+ unsigned char sda_vsn;
+ unsigned char bus_widths;
+#define SD_SCR_BUS_WIDTH_1 (1<<0)
+#define SD_SCR_BUS_WIDTH_4 (1<<2)
+};
+
+struct mmc_host;
+
+struct mmc_card {
+ struct list_head node;
+ struct mmc_host *host;
+ struct device dev;
+ unsigned int rca;
+ unsigned int state;
+#define MMC_STATE_PRESENT (1<<0)
+#define MMC_STATE_DEAD (1<<1)
+#define MMC_STATE_BAD (1<<2)
+#define MMC_STATE_SDCARD (1<<3)
+#define MMC_STATE_READONLY (1<<4)
+ u32 raw_cid[4];
+ u32 raw_csd[4];
+ u32 raw_scr[2];
+ struct mmc_cid cid;
+ struct mmc_csd csd;
+ struct sd_scr scr;
+};
+
+#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
+#define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD)
+#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
+#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
+#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
+
+#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
+#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
+#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
+#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
+#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
+
+#define mmc_card_name(c) ((c)->cid.prod_name)
+#define mmc_card_id(c) ((c)->dev.bus_id)
+
+#define mmc_list_to_card(l) container_of(l, struct mmc_card, node)
+#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev)
+#define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d)
+
+struct mmc_driver {
+ struct device_driver drv;
+ int (*probe)(struct mmc_card *);
+ void (*remove)(struct mmc_card *);
+ int (*suspend)(struct mmc_card *, pm_message_t);
+ int (*resume)(struct mmc_card *);
+};
+
+#define mmc_card_release_host(c) mmc_release_host((c)->host)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mmc/host.h b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/host.h
new file mode 100644
index 0000000..9433626
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/host.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MMC_HOST_H
+#define LINUX_MMC_HOST_H
+
+#include <linux/mmc/mmc.h>
+
+struct mmc_ios {
+ unsigned int clock;
+ unsigned short vdd;
+
+#define MMC_VDD_150 0
+#define MMC_VDD_155 1
+#define MMC_VDD_160 2
+#define MMC_VDD_165 3
+#define MMC_VDD_170 4
+#define MMC_VDD_180 5
+#define MMC_VDD_190 6
+#define MMC_VDD_200 7
+#define MMC_VDD_210 8
+#define MMC_VDD_220 9
+#define MMC_VDD_230 10
+#define MMC_VDD_240 11
+#define MMC_VDD_250 12
+#define MMC_VDD_260 13
+#define MMC_VDD_270 14
+#define MMC_VDD_280 15
+#define MMC_VDD_290 16
+#define MMC_VDD_300 17
+#define MMC_VDD_310 18
+#define MMC_VDD_320 19
+#define MMC_VDD_330 20
+#define MMC_VDD_340 21
+#define MMC_VDD_350 22
+#define MMC_VDD_360 23
+
+ unsigned char bus_mode;
+
+#define MMC_BUSMODE_OPENDRAIN 1
+#define MMC_BUSMODE_PUSHPULL 2
+
+ unsigned char chip_select;
+
+#define MMC_CS_DONTCARE 0
+#define MMC_CS_HIGH 1
+#define MMC_CS_LOW 2
+
+ unsigned char power_mode;
+
+#define MMC_POWER_OFF 0
+#define MMC_POWER_UP 1
+#define MMC_POWER_ON 2
+
+ unsigned char bus_width;
+
+#define MMC_BUS_WIDTH_1 0
+#define MMC_BUS_WIDTH_4 2
+};
+
+struct mmc_host_ops {
+ void (*request)(struct mmc_host *host, struct mmc_request *req);
+ void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
+ int (*get_ro)(struct mmc_host *host);
+};
+
+struct mmc_card;
+struct device;
+
+struct mmc_host {
+ struct device *dev;
+ struct class_device class_dev;
+ int index;
+ const struct mmc_host_ops *ops;
+ unsigned int f_min;
+ unsigned int f_max;
+ u32 ocr_avail;
+
+ unsigned long caps;
+
+#define MMC_CAP_4_BIT_DATA (1 << 0)
+
+ unsigned int max_seg_size;
+ unsigned short max_hw_segs;
+ unsigned short max_phys_segs;
+ unsigned short max_sectors;
+ unsigned short unused;
+
+ struct mmc_ios ios;
+ u32 ocr;
+
+ unsigned int mode;
+#define MMC_MODE_MMC 0
+#define MMC_MODE_SD 1
+
+ struct list_head cards;
+
+ wait_queue_head_t wq;
+ spinlock_t lock;
+ struct mmc_card *card_busy;
+ struct mmc_card *card_selected;
+
+ struct work_struct detect;
+
+ unsigned long private[0] ____cacheline_aligned;
+};
+
+#define mmc_dev(x) ((x)->dev)
+#define mmc_hostname(x) ((x)->class_dev.class_id)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mmc/mmc.h b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/mmc.h
new file mode 100644
index 0000000..089714c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mmc/mmc.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef MMC_H
+#define MMC_H
+
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/device.h>
+
+struct request;
+struct mmc_data;
+struct mmc_request;
+
+struct mmc_command {
+ u32 opcode;
+ u32 arg;
+ u32 resp[4];
+ unsigned int flags;
+#define MMC_RSP_PRESENT (1 << 0)
+#define MMC_RSP_136 (1 << 1)
+#define MMC_RSP_CRC (1 << 2)
+#define MMC_RSP_BUSY (1 << 3)
+#define MMC_RSP_OPCODE (1 << 4)
+#define MMC_CMD_MASK (3 << 5)
+#define MMC_CMD_AC (0 << 5)
+#define MMC_CMD_ADTC (1 << 5)
+#define MMC_CMD_BC (2 << 5)
+#define MMC_CMD_BCR (3 << 5)
+
+#define MMC_RSP_NONE (0)
+#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
+#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
+#define MMC_RSP_R3 (MMC_RSP_PRESENT)
+#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC)
+
+#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
+
+#define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK)
+
+ unsigned int retries;
+ unsigned int error;
+
+#define MMC_ERR_NONE 0
+#define MMC_ERR_TIMEOUT 1
+#define MMC_ERR_BADCRC 2
+#define MMC_ERR_FIFO 3
+#define MMC_ERR_FAILED 4
+#define MMC_ERR_INVALID 5
+
+ struct mmc_data *data;
+ struct mmc_request *mrq;
+};
+
+struct mmc_data {
+ unsigned int timeout_ns;
+ unsigned int timeout_clks;
+ unsigned int blksz_bits;
+ unsigned int blksz;
+ unsigned int blocks;
+ unsigned int error;
+ unsigned int flags;
+
+#define MMC_DATA_WRITE (1 << 8)
+#define MMC_DATA_READ (1 << 9)
+#define MMC_DATA_STREAM (1 << 10)
+#define MMC_DATA_MULTI (1 << 11)
+
+ unsigned int bytes_xfered;
+
+ struct mmc_command *stop;
+ struct mmc_request *mrq;
+
+ unsigned int sg_len;
+ struct scatterlist *sg;
+};
+
+struct mmc_request {
+ struct mmc_command *cmd;
+ struct mmc_data *data;
+ struct mmc_command *stop;
+
+ void *done_data;
+ void (*done)(struct mmc_request *);
+};
+
+struct mmc_host;
+struct mmc_card;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mmzone.h b/6/platforms/android-3/arch-arm/usr/include/linux/mmzone.h
new file mode 100644
index 0000000..a81382e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mmzone.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MMZONE_H
+#define _LINUX_MMZONE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mod_devicetable.h b/6/platforms/android-3/arch-arm/usr/include/linux/mod_devicetable.h
new file mode 100644
index 0000000..a3c1de8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mod_devicetable.h
@@ -0,0 +1,209 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#define PCI_ANY_ID (~0)
+
+struct pci_device_id {
+ __u32 vendor, device;
+ __u32 subvendor, subdevice;
+ __u32 class, class_mask;
+ kernel_ulong_t driver_data;
+};
+
+#define IEEE1394_MATCH_VENDOR_ID 0x0001
+#define IEEE1394_MATCH_MODEL_ID 0x0002
+#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
+#define IEEE1394_MATCH_VERSION 0x0008
+
+struct ieee1394_device_id {
+ __u32 match_flags;
+ __u32 vendor_id;
+ __u32 model_id;
+ __u32 specifier_id;
+ __u32 version;
+ kernel_ulong_t driver_data
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+struct usb_device_id {
+
+ __u16 match_flags;
+
+ __u16 idVendor;
+ __u16 idProduct;
+ __u16 bcdDevice_lo;
+ __u16 bcdDevice_hi;
+
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+
+ __u8 bInterfaceClass;
+ __u8 bInterfaceSubClass;
+ __u8 bInterfaceProtocol;
+
+ kernel_ulong_t driver_info;
+};
+
+#define USB_DEVICE_ID_MATCH_VENDOR 0x0001
+#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002
+#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004
+#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008
+#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010
+#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020
+#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040
+#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080
+#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100
+#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
+
+struct ccw_device_id {
+ __u16 match_flags;
+
+ __u16 cu_type;
+ __u16 dev_type;
+ __u8 cu_model;
+ __u8 dev_model;
+
+ kernel_ulong_t driver_info;
+};
+
+#define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
+#define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
+#define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
+#define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
+
+#define PNP_ID_LEN 8
+#define PNP_MAX_DEVICES 8
+
+struct pnp_device_id {
+ __u8 id[PNP_ID_LEN];
+ kernel_ulong_t driver_data;
+};
+
+struct pnp_card_device_id {
+ __u8 id[PNP_ID_LEN];
+ kernel_ulong_t driver_data;
+ struct {
+ __u8 id[PNP_ID_LEN];
+ } devs[PNP_MAX_DEVICES];
+};
+
+#define SERIO_ANY 0xff
+
+struct serio_device_id {
+ __u8 type;
+ __u8 extra;
+ __u8 id;
+ __u8 proto;
+};
+
+struct of_device_id
+{
+ char name[32];
+ char type[32];
+ char compatible[128];
+ kernel_ulong_t data;
+};
+
+struct vio_device_id {
+ char type[32];
+ char compat[32];
+};
+
+struct pcmcia_device_id {
+ __u16 match_flags;
+
+ __u16 manf_id;
+ __u16 card_id;
+
+ __u8 func_id;
+
+ __u8 function;
+
+ __u8 device_no;
+
+ __u32 prod_id_hash[4]
+ __attribute__((aligned(sizeof(__u32))));
+
+ kernel_ulong_t prod_id[4]
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+
+ kernel_ulong_t driver_info;
+ kernel_ulong_t cisfile;
+};
+
+#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
+#define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002
+#define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004
+#define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008
+#define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010
+#define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020
+#define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
+#define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
+#define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
+#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
+#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
+
+struct i2c_device_id {
+ __u16 id;
+};
+
+#define INPUT_DEVICE_ID_EV_MAX 0x1f
+#define INPUT_DEVICE_ID_KEY_MAX 0x1ff
+#define INPUT_DEVICE_ID_REL_MAX 0x0f
+#define INPUT_DEVICE_ID_ABS_MAX 0x3f
+#define INPUT_DEVICE_ID_MSC_MAX 0x07
+#define INPUT_DEVICE_ID_LED_MAX 0x0f
+#define INPUT_DEVICE_ID_SND_MAX 0x07
+#define INPUT_DEVICE_ID_FF_MAX 0x7f
+#define INPUT_DEVICE_ID_SW_MAX 0x0f
+
+#define INPUT_DEVICE_ID_MATCH_BUS 1
+#define INPUT_DEVICE_ID_MATCH_VENDOR 2
+#define INPUT_DEVICE_ID_MATCH_PRODUCT 4
+#define INPUT_DEVICE_ID_MATCH_VERSION 8
+
+#define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010
+#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020
+#define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040
+#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080
+#define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100
+#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200
+#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
+#define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
+#define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
+
+struct input_device_id {
+
+ kernel_ulong_t flags;
+
+ __u16 bustype;
+ __u16 vendor;
+ __u16 product;
+ __u16 version;
+
+ kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
+
+ kernel_ulong_t driver_info;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/module.h b/6/platforms/android-3/arch-arm/usr/include/linux/module.h
new file mode 100644
index 0000000..3c449c6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/module.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MODULE_H
+#define _LINUX_MODULE_H
+
+#include <linux/sched.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/stat.h>
+#include <linux/compiler.h>
+#include <linux/cache.h>
+#include <linux/kmod.h>
+#include <linux/elf.h>
+#include <linux/stringify.h>
+#include <linux/kobject.h>
+#include <linux/moduleparam.h>
+#include <asm/local.h>
+
+#include <asm/module.h>
+
+#define MODULE_SUPPORTED_DEVICE(name)
+
+#ifndef MODULE_SYMBOL_PREFIX
+#define MODULE_SYMBOL_PREFIX ""
+#endif
+
+#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
+
+struct kernel_symbol
+{
+ unsigned long value;
+ const char *name;
+};
+
+struct modversion_info
+{
+ unsigned long crc;
+ char name[MODULE_NAME_LEN];
+};
+
+struct module;
+
+struct module_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct module_attribute *, struct module *, char *);
+ ssize_t (*store)(struct module_attribute *, struct module *,
+ const char *, size_t count);
+ void (*setup)(struct module *, const char *);
+ int (*test)(struct module *);
+ void (*free)(struct module *);
+};
+
+struct module_kobject
+{
+ struct kobject kobj;
+ struct module *mod;
+};
+
+struct exception_table_entry;
+
+#ifdef MODULE
+#define MODULE_GENERIC_TABLE(gtype,name) extern const struct gtype##_id __mod_##gtype##_table __attribute__ ((unused, alias(__stringify(name))))
+
+#define THIS_MODULE (&__this_module)
+#else
+#define MODULE_GENERIC_TABLE(gtype,name)
+#define THIS_MODULE ((struct module *)0)
+#endif
+
+#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+
+#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
+
+#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
+
+#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
+
+#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
+
+#define MODULE_PARM_DESC(_parm, desc) __MODULE_INFO(parm, _parm, #_parm ":" desc)
+
+#define MODULE_DEVICE_TABLE(type,name) MODULE_GENERIC_TABLE(type##_device,name)
+
+#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
+
+struct notifier_block;
+
+#define EXPORT_SYMBOL(sym)
+#define EXPORT_SYMBOL_GPL(sym)
+#define EXPORT_SYMBOL_GPL_FUTURE(sym)
+#define EXPORT_UNUSED_SYMBOL(sym)
+#define EXPORT_UNUSED_SYMBOL_GPL(sym)
+
+#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
+#define symbol_put(x) do { } while(0)
+#define symbol_put_addr(x) do { } while(0)
+#define module_name(mod) "kernel"
+#define __unsafe(mod)
+#define module_put_and_exit(code) do_exit(code)
+
+struct module;
+
+#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
+#define __MODULE_STRING(x) __stringify(x)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/moduleparam.h b/6/platforms/android-3/arch-arm/usr/include/linux/moduleparam.h
new file mode 100644
index 0000000..b46ddd6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/moduleparam.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MODULE_PARAMS_H
+#define _LINUX_MODULE_PARAMS_H
+
+#include <linux/init.h>
+#include <linux/stringify.h>
+#include <linux/kernel.h>
+
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX
+#else
+#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
+#endif
+
+#ifdef MODULE
+#define ___module_cat(a,b) __mod_ ## a ## b
+#define __module_cat(a,b) ___module_cat(a,b)
+#define __MODULE_INFO(tag, name, info) static const char __module_cat(name,__LINE__)[] __attribute_used__ __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
+#else
+#define __MODULE_INFO(tag, name, info)
+#endif
+#define __MODULE_PARM_TYPE(name, _type) __MODULE_INFO(parmtype, name##type, #name ":" _type)
+
+struct kernel_param;
+
+typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
+
+typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
+
+struct kernel_param {
+ const char *name;
+ unsigned int perm;
+ param_set_fn set;
+ param_get_fn get;
+ void *arg;
+};
+
+struct kparam_string {
+ unsigned int maxlen;
+ char *string;
+};
+
+struct kparam_array
+{
+ unsigned int max;
+ unsigned int *num;
+ param_set_fn set;
+ param_get_fn get;
+ unsigned int elemsize;
+ void *elem;
+};
+
+#define __module_param_call(prefix, name, set, get, arg, perm) static char __param_str_##name[] = prefix #name; static struct kernel_param const __param_##name __attribute_used__ __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) = { __param_str_##name, perm, set, get, arg }
+
+#define module_param_call(name, set, get, arg, perm) __module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm)
+
+#define module_param_named(name, value, type, perm) param_check_##type(name, &(value)); module_param_call(name, param_set_##type, param_get_##type, &value, perm); __MODULE_PARM_TYPE(name, #type)
+
+#define module_param(name, type, perm) module_param_named(name, name, type, perm)
+
+#define module_param_string(name, string, len, perm) static struct kparam_string __param_string_##name = { len, string }; module_param_call(name, param_set_copystring, param_get_string, &__param_string_##name, perm); __MODULE_PARM_TYPE(name, "string")
+
+#define __param_check(name, p, type) static inline type *__check_##name(void) { return(p); }
+
+#define param_check_byte(name, p) __param_check(name, p, unsigned char)
+
+#define param_check_short(name, p) __param_check(name, p, short)
+
+#define param_check_ushort(name, p) __param_check(name, p, unsigned short)
+
+#define param_check_int(name, p) __param_check(name, p, int)
+
+#define param_check_uint(name, p) __param_check(name, p, unsigned int)
+
+#define param_check_long(name, p) __param_check(name, p, long)
+
+#define param_check_ulong(name, p) __param_check(name, p, unsigned long)
+
+#define param_check_charp(name, p) __param_check(name, p, char *)
+
+#define param_check_bool(name, p) __param_check(name, p, int)
+
+#define param_check_invbool(name, p) __param_check(name, p, int)
+
+#define module_param_array_named(name, array, type, nump, perm) static struct kparam_array __param_arr_##name = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type, sizeof(array[0]), array }; module_param_call(name, param_array_set, param_array_get, &__param_arr_##name, perm); __MODULE_PARM_TYPE(name, "array of " #type)
+
+#define module_param_array(name, type, nump, perm) module_param_array_named(name, name, type, nump, perm)
+
+struct module;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mount.h b/6/platforms/android-3/arch-arm/usr/include/linux/mount.h
new file mode 100644
index 0000000..ee476e0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mount.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MOUNT_H
+#define _LINUX_MOUNT_H
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/msdos_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/msdos_fs.h
new file mode 100644
index 0000000..5a4eb0a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/msdos_fs.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MSDOS_FS_H
+#define _LINUX_MSDOS_FS_H
+
+#include <linux/magic.h>
+
+#include <asm/byteorder.h>
+
+#define SECTOR_SIZE 512
+#define SECTOR_BITS 9
+#define MSDOS_DPB (MSDOS_DPS)
+#define MSDOS_DPB_BITS 4
+#define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
+#define MSDOS_DPS_BITS 4
+#define CF_LE_W(v) le16_to_cpu(v)
+#define CF_LE_L(v) le32_to_cpu(v)
+#define CT_LE_W(v) cpu_to_le16(v)
+#define CT_LE_L(v) cpu_to_le32(v)
+
+#define MSDOS_ROOT_INO 1
+#define MSDOS_DIR_BITS 5
+
+#define FAT_MAX_DIR_ENTRIES (65536)
+#define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
+
+#define ATTR_NONE 0
+#define ATTR_RO 1
+#define ATTR_HIDDEN 2
+#define ATTR_SYS 4
+#define ATTR_VOLUME 8
+#define ATTR_DIR 16
+#define ATTR_ARCH 32
+
+#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
+
+#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
+
+#define CASE_LOWER_BASE 8
+#define CASE_LOWER_EXT 16
+
+#define DELETED_FLAG 0xe5
+#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
+
+#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
+
+#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
+
+#define MSDOS_NAME 11
+#define MSDOS_LONGNAME 256
+#define MSDOS_SLOTS 21
+#define MSDOS_DOT ". "
+#define MSDOS_DOTDOT ".. "
+
+#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
+#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
+
+#define FAT_START_ENT 2
+
+#define MAX_FAT12 0xFF4
+#define MAX_FAT16 0xFFF4
+#define MAX_FAT32 0x0FFFFFF6
+#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
+
+#define BAD_FAT12 0xFF7
+#define BAD_FAT16 0xFFF7
+#define BAD_FAT32 0x0FFFFFF7
+
+#define EOF_FAT12 0xFFF
+#define EOF_FAT16 0xFFFF
+#define EOF_FAT32 0x0FFFFFFF
+
+#define FAT_ENT_FREE (0)
+#define FAT_ENT_BAD (BAD_FAT32)
+#define FAT_ENT_EOF (EOF_FAT32)
+
+#define FAT_FSINFO_SIG1 0x41615252
+#define FAT_FSINFO_SIG2 0x61417272
+#define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2)
+
+#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
+#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2])
+
+#define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
+#define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
+#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x12, __u32)
+
+#define VFAT_SFN_DISPLAY_LOWER 0x0001
+#define VFAT_SFN_DISPLAY_WIN95 0x0002
+#define VFAT_SFN_DISPLAY_WINNT 0x0004
+#define VFAT_SFN_CREATE_WIN95 0x0100
+#define VFAT_SFN_CREATE_WINNT 0x0200
+
+struct fat_boot_sector {
+ __u8 ignored[3];
+ __u8 system_id[8];
+ __u8 sector_size[2];
+ __u8 sec_per_clus;
+ __le16 reserved;
+ __u8 fats;
+ __u8 dir_entries[2];
+ __u8 sectors[2];
+ __u8 media;
+ __le16 fat_length;
+ __le16 secs_track;
+ __le16 heads;
+ __le32 hidden;
+ __le32 total_sect;
+
+ __le32 fat32_length;
+ __le16 flags;
+ __u8 version[2];
+ __le32 root_cluster;
+ __le16 info_sector;
+ __le16 backup_boot;
+ __le16 reserved2[6];
+};
+
+struct fat_boot_fsinfo {
+ __le32 signature1;
+ __le32 reserved1[120];
+ __le32 signature2;
+ __le32 free_clusters;
+ __le32 next_cluster;
+ __le32 reserved2[4];
+};
+
+struct fat_boot_bsx {
+ __u8 drive;
+ __u8 reserved1;
+ __u8 signature;
+ __u8 vol_id[4];
+ __u8 vol_label[11];
+ __u8 type[8];
+};
+#define FAT16_BSX_OFFSET 36
+#define FAT32_BSX_OFFSET 64
+
+struct msdos_dir_entry {
+ __u8 name[MSDOS_NAME];
+ __u8 attr;
+ __u8 lcase;
+ __u8 ctime_cs;
+ __le16 ctime;
+ __le16 cdate;
+ __le16 adate;
+ __le16 starthi;
+ __le16 time,date,start;
+ __le32 size;
+};
+
+struct msdos_dir_slot {
+ __u8 id;
+ __u8 name0_4[10];
+ __u8 attr;
+ __u8 reserved;
+ __u8 alias_checksum;
+ __u8 name5_10[12];
+ __le16 start;
+ __u8 name11_12[4];
+};
+
+struct fat_slot_info {
+ loff_t i_pos;
+ loff_t slot_off;
+ int nr_slots;
+ struct msdos_dir_entry *de;
+ struct buffer_head *bh;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/msg.h b/6/platforms/android-3/arch-arm/usr/include/linux/msg.h
new file mode 100644
index 0000000..254f1e9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/msg.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MSG_H
+#define _LINUX_MSG_H
+
+#include <linux/ipc.h>
+
+#define MSG_STAT 11
+#define MSG_INFO 12
+
+#define MSG_NOERROR 010000
+#define MSG_EXCEPT 020000
+
+struct msqid_ds {
+ struct ipc_perm msg_perm;
+ struct msg *msg_first;
+ struct msg *msg_last;
+ __kernel_time_t msg_stime;
+ __kernel_time_t msg_rtime;
+ __kernel_time_t msg_ctime;
+ unsigned long msg_lcbytes;
+ unsigned long msg_lqbytes;
+ unsigned short msg_cbytes;
+ unsigned short msg_qnum;
+ unsigned short msg_qbytes;
+ __kernel_ipc_pid_t msg_lspid;
+ __kernel_ipc_pid_t msg_lrpid;
+};
+
+#include <asm/msgbuf.h>
+
+struct msgbuf {
+ long mtype;
+ char mtext[1];
+};
+
+struct msginfo {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short msgseg;
+};
+
+#define MSGMNI 16
+#define MSGMAX 8192
+#define MSGMNB 16384
+
+#define MSGPOOL (MSGMNI*MSGMNB/1024)
+#define MSGTQL MSGMNB
+#define MSGMAP MSGMNB
+#define MSGSSZ 16
+#define __MSGSEG ((MSGPOOL*1024)/ MSGSSZ)
+#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/msm_adsp.h b/6/platforms/android-3/arch-arm/usr/include/linux/msm_adsp.h
new file mode 100644
index 0000000..6f12707
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/msm_adsp.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MSM_ADSP_H
+#define __LINUX_MSM_ADSP_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define ADSP_IOCTL_MAGIC 'q'
+
+struct adsp_command_t {
+ uint16_t queue;
+ uint32_t len;
+ uint8_t *data;
+};
+
+struct adsp_event_t {
+ uint16_t type;
+ uint32_t timeout_ms;
+ uint16_t msg_id;
+ uint16_t flags;
+ uint32_t len;
+ uint8_t *data;
+};
+
+struct adsp_pmem_info_t {
+ int fd;
+ void *vaddr;
+};
+
+#define ADSP_IOCTL_ENABLE _IOR(ADSP_IOCTL_MAGIC, 1, unsigned)
+
+#define ADSP_IOCTL_DISABLE _IOR(ADSP_IOCTL_MAGIC, 2, unsigned)
+
+#define ADSP_IOCTL_DISABLE_ACK _IOR(ADSP_IOCTL_MAGIC, 3, unsigned)
+
+#define ADSP_IOCTL_WRITE_COMMAND _IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *)
+
+#define ADSP_IOCTL_GET_EVENT _IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *)
+
+#define ADSP_IOCTL_DISABLE_EVENT_RSP _IOR(ADSP_IOCTL_MAGIC, 10, unsigned)
+
+#define ADSP_IOCTL_REGISTER_PMEM _IOW(ADSP_IOCTL_MAGIC, 13, struct adsp_pmem_info *)
+
+#define ADSP_IOCTL_ABORT_EVENT_READ _IOW(ADSP_IOCTL_MAGIC, 15, unsigned)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/msm_audio.h b/6/platforms/android-3/arch-arm/usr/include/linux/msm_audio.h
new file mode 100644
index 0000000..9ac58aa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/msm_audio.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MSM_AUDIO_H
+#define __LINUX_MSM_AUDIO_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define AUDIO_IOCTL_MAGIC 'a'
+
+#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned)
+#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned)
+#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned)
+#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned)
+#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned)
+#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned)
+#define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned)
+#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned)
+#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned)
+#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned)
+#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned)
+#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned)
+#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned)
+#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 13, unsigned)
+#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned)
+
+struct msm_audio_config {
+ uint32_t buffer_size;
+ uint32_t buffer_count;
+ uint32_t channel_count;
+ uint32_t sample_rate;
+ uint32_t type;
+ uint32_t unused[3];
+};
+
+struct msm_audio_stats {
+ uint32_t byte_count;
+ uint32_t sample_count;
+ uint32_t unused[2];
+};
+
+#define SND_IOCTL_MAGIC 's'
+
+#define SND_MUTE_UNMUTED 0
+#define SND_MUTE_MUTED 1
+
+struct msm_snd_device_config {
+ uint32_t device;
+ uint32_t ear_mute;
+ uint32_t mic_mute;
+};
+
+#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *)
+
+#define SND_METHOD_VOICE 0
+
+struct msm_snd_volume_config {
+ uint32_t device;
+ uint32_t method;
+ uint32_t volume;
+};
+
+#define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *)
+
+#define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *)
+
+struct msm_snd_endpoint {
+ int id;
+ char name[64];
+};
+
+#define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/msm_mdp.h b/6/platforms/android-3/arch-arm/usr/include/linux/msm_mdp.h
new file mode 100644
index 0000000..43fdac3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/msm_mdp.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MSM_MDP_H_
+#define _MSM_MDP_H_
+
+#include <linux/types.h>
+
+#define MSMFB_IOCTL_MAGIC 'm'
+#define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int)
+#define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int)
+
+enum {
+ MDP_RGB_565,
+ MDP_XRGB_8888,
+ MDP_Y_CBCR_H2V2,
+ MDP_ARGB_8888,
+ MDP_RGB_888,
+ MDP_Y_CRCB_H2V2,
+ MDP_YCRYCB_H2V1,
+ MDP_Y_CRCB_H2V1,
+ MDP_Y_CBCR_H2V1,
+ MDP_RGBA_8888,
+ MDP_BGRA_8888,
+ MDP_IMGTYPE_LIMIT
+};
+
+enum {
+ PMEM_IMG,
+ FB_IMG,
+};
+
+#define MDP_ROT_NOP 0
+#define MDP_FLIP_LR 0x1
+#define MDP_FLIP_UD 0x2
+#define MDP_ROT_90 0x4
+#define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR)
+#define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR)
+#define MDP_DITHER 0x8
+#define MDP_BLUR 0x10
+
+#define MDP_TRANSP_NOP 0xffffffff
+#define MDP_ALPHA_NOP 0xff
+
+struct mdp_rect {
+ uint32_t x;
+ uint32_t y;
+ uint32_t w;
+ uint32_t h;
+};
+
+struct mdp_img {
+ uint32_t width;
+ uint32_t height;
+ uint32_t format;
+ uint32_t offset;
+ int memory_id;
+};
+
+struct mdp_blit_req {
+ struct mdp_img src;
+ struct mdp_img dst;
+ struct mdp_rect src_rect;
+ struct mdp_rect dst_rect;
+ uint32_t alpha;
+ uint32_t transp_mask;
+ uint32_t flags;
+};
+
+struct mdp_blit_req_list {
+ uint32_t count;
+ struct mdp_blit_req req[];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mt9t013.h b/6/platforms/android-3/arch-arm/usr/include/linux/mt9t013.h
new file mode 100644
index 0000000..821ef21
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mt9t013.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef CAMERA_MT9T013_H
+#define CAMERA_MT9T013_H
+#include <linux/cdev.h>
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define MT9T013_I2C_IOCTL_MAGIC 'm'
+
+#define MT9T013_I2C_IOCTL_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 0, unsigned)
+
+#define MT9T013_I2C_IOCTL_R _IOR(MT9T013_I2C_IOCTL_MAGIC, 1, unsigned)
+
+#define MT9T013_I2C_IOCTL_AF_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 2, unsigned)
+
+#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 3)
+
+#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET_2 _IO(MT9T013_I2C_IOCTL_MAGIC, 4)
+
+#define CAMERA_CONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 7)
+
+#define CAMERA_UNCONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 8)
+
+#define CAMERA_LENS_POWER_ON _IO(MT9T013_I2C_IOCTL_MAGIC, 9)
+
+#define CAMERA_LENS_POWER_OFF _IO(MT9T013_I2C_IOCTL_MAGIC, 10)
+
+#define MT9T013_I2C_IOCTL_CAMIF_APPS_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 11)
+
+#define CAMIO_VFE_MDC_CLK 1
+#define CAMIO_MDC_CLK 2
+#define CAMIO_VFE_CLK 3
+
+#define MT9T013_I2C_IOCTL_CLK_ENABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 12, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_DISABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 13, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_SELECT _IOW(MT9T013_I2C_IOCTL_MAGIC, 14, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_FREQ_PROG _IOW(MT9T013_I2C_IOCTL_MAGIC, 15, unsigned)
+
+#define CAMSENSOR_REG_INIT 0<<0
+#define CAMSENSOR_REG_UPDATE_PERIODIC 1<<0
+#define CAMSENSOR_TYPE_PREVIEW 0<<1
+#define CAMSENSOR_TYPE_SNAPSHOT 1<<1
+
+#define MT9T013_I2C_IOCTL_SENSOR_SETTING _IOW(MT9T013_I2C_IOCTL_MAGIC, 16, uint32_t)
+
+struct mt9t013_reg_struct
+{
+ uint16_t vt_pix_clk_div;
+ uint16_t vt_sys_clk_div;
+ uint16_t pre_pll_clk_div;
+ uint16_t pll_multiplier;
+ uint16_t op_pix_clk_div;
+ uint16_t op_sys_clk_div;
+ uint16_t scale_m;
+ uint16_t row_speed;
+ uint16_t x_addr_start;
+ uint16_t x_addr_end;
+ uint16_t y_addr_start;
+ uint16_t y_addr_end;
+ uint16_t read_mode;
+ uint16_t x_output_size ;
+ uint16_t y_output_size;
+ uint16_t line_length_pck;
+ uint16_t frame_length_lines;
+ uint16_t coarse_integration_time;
+ uint16_t fine_integration_time;
+};
+
+struct mt9t013_reg_pat {
+ struct mt9t013_reg_struct reg[2];
+};
+
+#define MT9T013_I2C_IOCTL_GET_REGISTERS _IOR(MT9T013_I2C_IOCTL_MAGIC, 17, struct mt9t013_reg_pat *)
+
+struct mt9t013_exposure_gain {
+ uint16_t gain;
+ uint16_t line;
+ uint32_t mode;
+};
+
+#define MT9T013_I2C_IOCTL_EXPOSURE_GAIN _IOW(MT9T013_I2C_IOCTL_MAGIC, 18, struct exposure_gain *)
+
+#define MT9T013_I2C_IOCTL_MOVE_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 19, uint32_t)
+
+#define MT9T013_I2C_IOCTL_SET_DEFAULT_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 20, uint32_t)
+
+#define MT9T013_I2C_IOCTL_POWER_DOWN _IO(MT9T013_I2C_IOCTL_MAGIC, 21)
+
+struct mt9t013_init {
+ int preview;
+ uint16_t chipid;
+};
+
+#define MT9T013_I2C_IOCTL_INIT _IOWR(MT9T013_I2C_IOCTL_MAGIC, 22, struct mt9t013_init *)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/bbm.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/bbm.h
new file mode 100644
index 0000000..e311b23
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/bbm.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_BBM_H
+#define __LINUX_MTD_BBM_H
+
+#define NAND_MAX_CHIPS 8
+
+struct nand_bbt_descr {
+ int options;
+ int pages[NAND_MAX_CHIPS];
+ int offs;
+ int veroffs;
+ uint8_t version[NAND_MAX_CHIPS];
+ int len;
+ int maxblocks;
+ int reserved_block_code;
+ uint8_t *pattern;
+};
+
+#define NAND_BBT_NRBITS_MSK 0x0000000F
+#define NAND_BBT_1BIT 0x00000001
+#define NAND_BBT_2BIT 0x00000002
+#define NAND_BBT_4BIT 0x00000004
+#define NAND_BBT_8BIT 0x00000008
+
+#define NAND_BBT_LASTBLOCK 0x00000010
+
+#define NAND_BBT_ABSPAGE 0x00000020
+
+#define NAND_BBT_SEARCH 0x00000040
+
+#define NAND_BBT_PERCHIP 0x00000080
+
+#define NAND_BBT_VERSION 0x00000100
+
+#define NAND_BBT_CREATE 0x00000200
+
+#define NAND_BBT_SCANALLPAGES 0x00000400
+
+#define NAND_BBT_SCANEMPTY 0x00000800
+
+#define NAND_BBT_WRITE 0x00001000
+
+#define NAND_BBT_SAVECONTENT 0x00002000
+
+#define NAND_BBT_SCAN2NDPAGE 0x00004000
+
+#define NAND_BBT_SCAN_MAXBLOCKS 4
+
+#define ONENAND_BADBLOCK_POS 0
+
+struct bbm_info {
+ int bbt_erase_shift;
+ int badblockpos;
+ int options;
+
+ uint8_t *bbt;
+
+ int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
+
+ struct nand_bbt_descr *badblock_pattern;
+
+ void *priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/blktrans.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/blktrans.h
new file mode 100644
index 0000000..7c40724
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_TRANS_H__
+#define __MTD_TRANS_H__
+
+#include <linux/mutex.h>
+
+struct hd_geometry;
+struct mtd_info;
+struct mtd_blktrans_ops;
+struct file;
+struct inode;
+
+struct mtd_blktrans_dev {
+ struct mtd_blktrans_ops *tr;
+ struct list_head list;
+ struct mtd_info *mtd;
+ struct mutex lock;
+ int devnum;
+ int blksize;
+ unsigned long size;
+ int readonly;
+ void *blkcore_priv;
+};
+
+struct blkcore_priv;
+
+struct mtd_blktrans_ops {
+ char *name;
+ int major;
+ int part_bits;
+
+ int (*readsect)(struct mtd_blktrans_dev *dev,
+ unsigned long block, char *buffer);
+ int (*writesect)(struct mtd_blktrans_dev *dev,
+ unsigned long block, char *buffer);
+
+ int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
+ int (*flush)(struct mtd_blktrans_dev *dev);
+
+ int (*open)(struct mtd_blktrans_dev *dev);
+ int (*release)(struct mtd_blktrans_dev *dev);
+
+ void (*add_mtd)(struct mtd_blktrans_ops *tr, struct mtd_info *mtd);
+ void (*remove_dev)(struct mtd_blktrans_dev *dev);
+
+ struct list_head devs;
+ struct list_head list;
+ struct module *owner;
+
+ struct mtd_blkcore_priv *blkcore_priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi.h
new file mode 100644
index 0000000..d7f1ba1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi.h
@@ -0,0 +1,187 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_CFI_H__
+#define __MTD_CFI_H__
+
+#include <linux/delay.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/mtd/flashchip.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/cfi_endian.h>
+
+#define cfi_interleave_is_1(cfi) (0)
+
+#define cfi_interleave_is_2(cfi) (0)
+
+#define cfi_interleave_is_4(cfi) (0)
+
+#define cfi_interleave_is_8(cfi) (0)
+
+#define CFI_DEVICETYPE_X8 (8 / 8)
+#define CFI_DEVICETYPE_X16 (16 / 8)
+#define CFI_DEVICETYPE_X32 (32 / 8)
+#define CFI_DEVICETYPE_X64 (64 / 8)
+
+struct cfi_extquery {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+} __attribute__((packed));
+
+struct cfi_pri_intelext {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint32_t FeatureSupport;
+ uint8_t SuspendCmdSupport;
+ uint16_t BlkStatusRegMask;
+ uint8_t VccOptimal;
+ uint8_t VppOptimal;
+ uint8_t NumProtectionFields;
+ uint16_t ProtRegAddr;
+ uint8_t FactProtRegSize;
+ uint8_t UserProtRegSize;
+ uint8_t extra[0];
+} __attribute__((packed));
+
+struct cfi_intelext_otpinfo {
+ uint32_t ProtRegAddr;
+ uint16_t FactGroups;
+ uint8_t FactProtRegSize;
+ uint16_t UserGroups;
+ uint8_t UserProtRegSize;
+} __attribute__((packed));
+
+struct cfi_intelext_blockinfo {
+ uint16_t NumIdentBlocks;
+ uint16_t BlockSize;
+ uint16_t MinBlockEraseCycles;
+ uint8_t BitsPerCell;
+ uint8_t BlockCap;
+} __attribute__((packed));
+
+struct cfi_intelext_regioninfo {
+ uint16_t NumIdentPartitions;
+ uint8_t NumOpAllowed;
+ uint8_t NumOpAllowedSimProgMode;
+ uint8_t NumOpAllowedSimEraMode;
+ uint8_t NumBlockTypes;
+ struct cfi_intelext_blockinfo BlockTypes[1];
+} __attribute__((packed));
+
+struct cfi_intelext_programming_regioninfo {
+ uint8_t ProgRegShift;
+ uint8_t Reserved1;
+ uint8_t ControlValid;
+ uint8_t Reserved2;
+ uint8_t ControlInvalid;
+ uint8_t Reserved3;
+} __attribute__((packed));
+
+struct cfi_pri_amdstd {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint8_t SiliconRevision;
+ uint8_t EraseSuspend;
+ uint8_t BlkProt;
+ uint8_t TmpBlkUnprotect;
+ uint8_t BlkProtUnprot;
+ uint8_t SimultaneousOps;
+ uint8_t BurstMode;
+ uint8_t PageMode;
+ uint8_t VppMin;
+ uint8_t VppMax;
+ uint8_t TopBottom;
+} __attribute__((packed));
+
+struct cfi_pri_atmel {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint8_t Features;
+ uint8_t BottomBoot;
+ uint8_t BurstMode;
+ uint8_t PageMode;
+} __attribute__((packed));
+
+struct cfi_pri_query {
+ uint8_t NumFields;
+ uint32_t ProtField[1];
+} __attribute__((packed));
+
+struct cfi_bri_query {
+ uint8_t PageModeReadCap;
+ uint8_t NumFields;
+ uint32_t ConfField[1];
+} __attribute__((packed));
+
+#define P_ID_NONE 0x0000
+#define P_ID_INTEL_EXT 0x0001
+#define P_ID_AMD_STD 0x0002
+#define P_ID_INTEL_STD 0x0003
+#define P_ID_AMD_EXT 0x0004
+#define P_ID_WINBOND 0x0006
+#define P_ID_ST_ADV 0x0020
+#define P_ID_MITSUBISHI_STD 0x0100
+#define P_ID_MITSUBISHI_EXT 0x0101
+#define P_ID_SST_PAGE 0x0102
+#define P_ID_INTEL_PERFORMANCE 0x0200
+#define P_ID_INTEL_DATA 0x0210
+#define P_ID_RESERVED 0xffff
+
+#define CFI_MODE_CFI 1
+#define CFI_MODE_JEDEC 0
+
+struct cfi_private {
+ uint16_t cmdset;
+ void *cmdset_priv;
+ int interleave;
+ int device_type;
+ int cfi_mode;
+ int addr_unlock1;
+ int addr_unlock2;
+ struct mtd_info *(*cmdset_setup)(struct map_info *);
+ struct cfi_ident *cfiq;
+ int mfr, id;
+ int numchips;
+ unsigned long chipshift;
+ const char *im_name;
+ struct flchip chips[0];
+};
+
+#if BITS_PER_LONG >= 64
+#endif
+#define CMD(x) cfi_build_cmd((x), map, cfi)
+#if BITS_PER_LONG >= 64
+#endif
+#define MERGESTATUS(x) cfi_merge_status((x), map, cfi)
+
+struct cfi_fixup {
+ uint16_t mfr;
+ uint16_t id;
+ void (*fixup)(struct mtd_info *mtd, void* param);
+ void* param;
+};
+
+#define CFI_MFR_ANY 0xffff
+#define CFI_ID_ANY 0xffff
+
+#define CFI_MFR_AMD 0x0001
+#define CFI_MFR_ATMEL 0x001F
+#define CFI_MFR_ST 0x0020
+
+typedef int (*varsize_frob_t)(struct map_info *map, struct flchip *chip,
+ unsigned long adr, int len, void *thunk);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi_endian.h
new file mode 100644
index 0000000..452091e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/byteorder.h>
+
+#define CFI_HOST_ENDIAN
+
+#ifdef CFI_LITTLE_ENDIAN
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) cpu_to_le16(x)
+#define cpu_to_cfi32(x) cpu_to_le32(x)
+#define cpu_to_cfi64(x) cpu_to_le64(x)
+#define cfi16_to_cpu(x) le16_to_cpu(x)
+#define cfi32_to_cpu(x) le32_to_cpu(x)
+#define cfi64_to_cpu(x) le64_to_cpu(x)
+#elif defined (CFI_BIG_ENDIAN)
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) cpu_to_be16(x)
+#define cpu_to_cfi32(x) cpu_to_be32(x)
+#define cpu_to_cfi64(x) cpu_to_be64(x)
+#define cfi16_to_cpu(x) be16_to_cpu(x)
+#define cfi32_to_cpu(x) be32_to_cpu(x)
+#define cfi64_to_cpu(x) be64_to_cpu(x)
+#elif defined (CFI_HOST_ENDIAN)
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) (x)
+#define cpu_to_cfi32(x) (x)
+#define cpu_to_cfi64(x) (x)
+#define cfi16_to_cpu(x) (x)
+#define cfi32_to_cpu(x) (x)
+#define cfi64_to_cpu(x) (x)
+#else
+#error No CFI endianness defined
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/compatmac.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/compatmac.h
new file mode 100644
index 0000000..143f46a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_COMPATMAC_H__
+#define __LINUX_MTD_COMPATMAC_H__
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/flashchip.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/flashchip.h
new file mode 100644
index 0000000..e441048
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_FLASHCHIP_H__
+#define __MTD_FLASHCHIP_H__
+
+#include <linux/sched.h>
+
+typedef enum {
+ FL_READY,
+ FL_STATUS,
+ FL_CFI_QUERY,
+ FL_JEDEC_QUERY,
+ FL_ERASING,
+ FL_ERASE_SUSPENDING,
+ FL_ERASE_SUSPENDED,
+ FL_WRITING,
+ FL_WRITING_TO_BUFFER,
+ FL_OTP_WRITE,
+ FL_WRITE_SUSPENDING,
+ FL_WRITE_SUSPENDED,
+ FL_PM_SUSPENDED,
+ FL_SYNCING,
+ FL_UNLOADING,
+ FL_LOCKING,
+ FL_UNLOCKING,
+ FL_POINT,
+ FL_XIP_WHILE_ERASING,
+ FL_XIP_WHILE_WRITING,
+ FL_UNKNOWN
+} flstate_t;
+
+struct flchip {
+ unsigned long start;
+
+ int ref_point_counter;
+ flstate_t state;
+ flstate_t oldstate;
+
+ unsigned int write_suspended:1;
+ unsigned int erase_suspended:1;
+ unsigned long in_progress_block_addr;
+
+ spinlock_t *mutex;
+ spinlock_t _spinlock;
+ wait_queue_head_t wq;
+ int word_write_time;
+ int buffer_write_time;
+ int erase_time;
+
+ void *priv;
+};
+
+struct flchip_shared {
+ spinlock_t lock;
+ struct flchip *writing;
+ struct flchip *erasing;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/map.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/map.h
new file mode 100644
index 0000000..87124bc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/map.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_MAP_H__
+#define __LINUX_MTD_MAP_H__
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/string.h>
+
+#include <linux/mtd/compatmac.h>
+
+#include <asm/unaligned.h>
+#include <asm/system.h>
+#include <asm/io.h>
+
+#define map_bankwidth_is_1(map) (0)
+
+#define map_bankwidth_is_2(map) (0)
+
+#define map_bankwidth_is_4(map) (0)
+
+#define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long))
+
+#define map_bankwidth_is_8(map) (0)
+
+#define map_bankwidth_is_16(map) (0)
+
+#define map_bankwidth_is_32(map) (0)
+
+#ifndef map_bankwidth
+#error "No bus width supported. What's the point?"
+#endif
+
+#define MAX_MAP_LONGS ( ((MAX_MAP_BANKWIDTH*8) + BITS_PER_LONG - 1) / BITS_PER_LONG )
+
+struct map_info {
+ char *name;
+ unsigned long size;
+ unsigned long phys;
+#define NO_XIP (-1UL)
+
+ void __iomem *virt;
+ void *cached;
+
+ int bankwidth;
+
+ void (*inval_cache)(struct map_info *, unsigned long, ssize_t);
+
+ void (*set_vpp)(struct map_info *, int);
+
+ unsigned long map_priv_1;
+ unsigned long map_priv_2;
+ void *fldrv_priv;
+ struct mtd_chip_driver *fldrv;
+};
+
+struct mtd_chip_driver {
+ struct mtd_info *(*probe)(struct map_info *map);
+ void (*destroy)(struct mtd_info *);
+ struct module *module;
+ char *name;
+ struct list_head list;
+};
+
+struct mtd_info *do_map_probe(const char *name, struct map_info *map);
+
+#define ENABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 1); } while(0)
+#define DISABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 0); } while(0)
+
+#define INVALIDATE_CACHED_RANGE(map, from, size) do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
+
+#define map_word_andequal(m, a, b, z) map_word_equal(m, z, map_word_and(m, a, b))
+#if BITS_PER_LONG >= 64
+#endif
+#ifdef __LITTLE_ENDIAN
+#else
+#endif
+#if BITS_PER_LONG < 64
+#define MAP_FF_LIMIT 4
+#else
+#define MAP_FF_LIMIT 8
+#endif
+#if BITS_PER_LONG >= 64
+#endif
+#if BITS_PER_LONG >= 64
+#endif
+#define map_read(map, ofs) inline_map_read(map, ofs)
+#define map_copy_from(map, to, from, len) inline_map_copy_from(map, to, from, len)
+#define map_write(map, datum, ofs) inline_map_write(map, datum, ofs)
+#define map_copy_to(map, to, from, len) inline_map_copy_to(map, to, from, len)
+#define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
+#define map_is_linear(map) ({ (void)(map); 1; })
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/mtd.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/mtd.h
new file mode 100644
index 0000000..300813c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/mtd.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_MTD_H__
+#define __MTD_MTD_H__
+
+#error This is a kernel header. Perhaps include mtd-user.h instead?
+
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/uio.h>
+#include <linux/notifier.h>
+
+#include <linux/mtd/compatmac.h>
+#include <mtd/mtd-abi.h>
+
+#define MTD_CHAR_MAJOR 90
+#define MTD_BLOCK_MAJOR 31
+#define MAX_MTD_DEVICES 16
+
+#define MTD_ERASE_PENDING 0x01
+#define MTD_ERASING 0x02
+#define MTD_ERASE_SUSPEND 0x04
+#define MTD_ERASE_DONE 0x08
+#define MTD_ERASE_FAILED 0x10
+
+struct erase_info {
+ struct mtd_info *mtd;
+ u_int32_t addr;
+ u_int32_t len;
+ u_int32_t fail_addr;
+ u_long time;
+ u_long retries;
+ u_int dev;
+ u_int cell;
+ void (*callback) (struct erase_info *self);
+ u_long priv;
+ u_char state;
+ struct erase_info *next;
+};
+
+struct mtd_erase_region_info {
+ u_int32_t offset;
+ u_int32_t erasesize;
+ u_int32_t numblocks;
+};
+
+typedef enum {
+ MTD_OOB_PLACE,
+ MTD_OOB_AUTO,
+ MTD_OOB_RAW,
+} mtd_oob_mode_t;
+
+struct mtd_oob_ops {
+ mtd_oob_mode_t mode;
+ size_t len;
+ size_t retlen;
+ size_t ooblen;
+ uint32_t ooboffs;
+ uint8_t *datbuf;
+ uint8_t *oobbuf;
+};
+
+struct mtd_info {
+ u_char type;
+ u_int32_t flags;
+ u_int32_t size;
+
+ u_int32_t erasesize;
+
+ u_int32_t writesize;
+
+ u_int32_t oobsize;
+ u_int32_t ecctype;
+ u_int32_t eccsize;
+
+#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
+#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype
+
+ char *name;
+ int index;
+
+ struct nand_ecclayout *ecclayout;
+
+ int numeraseregions;
+ struct mtd_erase_region_info *eraseregions;
+
+ u_int32_t bank_size;
+
+ int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
+
+ int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
+
+ void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
+
+ int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
+
+ int (*read_oob) (struct mtd_info *mtd, loff_t from,
+ struct mtd_oob_ops *ops);
+ int (*write_oob) (struct mtd_info *mtd, loff_t to,
+ struct mtd_oob_ops *ops);
+
+ int (*get_fact_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
+ int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*get_user_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
+ int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
+
+ int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
+
+ void (*sync) (struct mtd_info *mtd);
+
+ int (*lock) (struct mtd_info *mtd, loff_t ofs, size_t len);
+ int (*unlock) (struct mtd_info *mtd, loff_t ofs, size_t len);
+
+ int (*suspend) (struct mtd_info *mtd);
+ void (*resume) (struct mtd_info *mtd);
+
+ int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
+ int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
+
+ struct notifier_block reboot_notifier;
+
+ struct mtd_ecc_stats ecc_stats;
+
+ void *priv;
+
+ struct module *owner;
+ int usecount;
+};
+
+struct mtd_notifier {
+ void (*add)(struct mtd_info *mtd);
+ void (*remove)(struct mtd_info *mtd);
+ struct list_head list;
+};
+
+#define MTD_DEBUG_LEVEL0 (0)
+#define MTD_DEBUG_LEVEL1 (1)
+#define MTD_DEBUG_LEVEL2 (2)
+#define MTD_DEBUG_LEVEL3 (3)
+#define DEBUG(n, args...) do { } while(0)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand.h
new file mode 100644
index 0000000..36e9fb4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand.h
@@ -0,0 +1,319 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_NAND_H
+#define __LINUX_MTD_NAND_H
+
+#include <linux/wait.h>
+#include <linux/spinlock.h>
+#include <linux/mtd/mtd.h>
+
+struct mtd_info;
+
+#define NAND_MAX_CHIPS 8
+
+#define NAND_MAX_OOBSIZE 64
+#define NAND_MAX_PAGESIZE 2048
+
+#define NAND_NCE 0x01
+
+#define NAND_CLE 0x02
+
+#define NAND_ALE 0x04
+
+#define NAND_CTRL_CLE (NAND_NCE | NAND_CLE)
+#define NAND_CTRL_ALE (NAND_NCE | NAND_ALE)
+#define NAND_CTRL_CHANGE 0x80
+
+#define NAND_CMD_READ0 0
+#define NAND_CMD_READ1 1
+#define NAND_CMD_RNDOUT 5
+#define NAND_CMD_PAGEPROG 0x10
+#define NAND_CMD_READOOB 0x50
+#define NAND_CMD_ERASE1 0x60
+#define NAND_CMD_STATUS 0x70
+#define NAND_CMD_STATUS_MULTI 0x71
+#define NAND_CMD_SEQIN 0x80
+#define NAND_CMD_RNDIN 0x85
+#define NAND_CMD_READID 0x90
+#define NAND_CMD_ERASE2 0xd0
+#define NAND_CMD_RESET 0xff
+
+#define NAND_CMD_READSTART 0x30
+#define NAND_CMD_RNDOUTSTART 0xE0
+#define NAND_CMD_CACHEDPROG 0x15
+
+#define NAND_CMD_DEPLETE1 0x100
+#define NAND_CMD_DEPLETE2 0x38
+#define NAND_CMD_STATUS_MULTI 0x71
+#define NAND_CMD_STATUS_ERROR 0x72
+
+#define NAND_CMD_STATUS_ERROR0 0x73
+#define NAND_CMD_STATUS_ERROR1 0x74
+#define NAND_CMD_STATUS_ERROR2 0x75
+#define NAND_CMD_STATUS_ERROR3 0x76
+#define NAND_CMD_STATUS_RESET 0x7f
+#define NAND_CMD_STATUS_CLEAR 0xff
+
+#define NAND_CMD_NONE -1
+
+#define NAND_STATUS_FAIL 0x01
+#define NAND_STATUS_FAIL_N1 0x02
+#define NAND_STATUS_TRUE_READY 0x20
+#define NAND_STATUS_READY 0x40
+#define NAND_STATUS_WP 0x80
+
+typedef enum {
+ NAND_ECC_NONE,
+ NAND_ECC_SOFT,
+ NAND_ECC_HW,
+ NAND_ECC_HW_SYNDROME,
+} nand_ecc_modes_t;
+
+#define NAND_ECC_READ 0
+
+#define NAND_ECC_WRITE 1
+
+#define NAND_ECC_READSYN 2
+
+#define NAND_GET_DEVICE 0x80
+
+#define NAND_NO_AUTOINCR 0x00000001
+
+#define NAND_BUSWIDTH_16 0x00000002
+
+#define NAND_NO_PADDING 0x00000004
+
+#define NAND_CACHEPRG 0x00000008
+
+#define NAND_COPYBACK 0x00000010
+
+#define NAND_IS_AND 0x00000020
+
+#define NAND_4PAGE_ARRAY 0x00000040
+
+#define BBT_AUTO_REFRESH 0x00000080
+
+#define NAND_NO_READRDY 0x00000100
+
+#define NAND_SAMSUNG_LP_OPTIONS (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
+
+#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
+#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
+#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
+#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
+
+#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
+
+#define NAND_USE_FLASH_BBT 0x00010000
+
+#define NAND_SKIP_BBTSCAN 0x00020000
+
+#define NAND_CONTROLLER_ALLOC 0x80000000
+
+typedef enum {
+ FL_READY,
+ FL_READING,
+ FL_WRITING,
+ FL_ERASING,
+ FL_SYNCING,
+ FL_CACHEDPRG,
+ FL_PM_SUSPENDED,
+} nand_state_t;
+
+struct nand_chip;
+
+struct nand_hw_control {
+ spinlock_t lock;
+ struct nand_chip *active;
+ wait_queue_head_t wq;
+};
+
+struct nand_ecc_ctrl {
+ nand_ecc_modes_t mode;
+ int steps;
+ int size;
+ int bytes;
+ int total;
+ int prepad;
+ int postpad;
+ struct nand_ecclayout *layout;
+ void (*hwctl)(struct mtd_info *mtd, int mode);
+ int (*calculate)(struct mtd_info *mtd,
+ const uint8_t *dat,
+ uint8_t *ecc_code);
+ int (*correct)(struct mtd_info *mtd, uint8_t *dat,
+ uint8_t *read_ecc,
+ uint8_t *calc_ecc);
+ int (*read_page)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ uint8_t *buf);
+ void (*write_page)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ const uint8_t *buf);
+ int (*read_oob)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ int page,
+ int sndcmd);
+ int (*write_oob)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ int page);
+};
+
+struct nand_buffers {
+ uint8_t ecccalc[NAND_MAX_OOBSIZE];
+ uint8_t ecccode[NAND_MAX_OOBSIZE];
+ uint8_t oobwbuf[NAND_MAX_OOBSIZE];
+ uint8_t databuf[NAND_MAX_PAGESIZE];
+ uint8_t oobrbuf[NAND_MAX_OOBSIZE];
+};
+
+struct nand_chip {
+ void __iomem *IO_ADDR_R;
+ void __iomem *IO_ADDR_W;
+
+ uint8_t (*read_byte)(struct mtd_info *mtd);
+ u16 (*read_word)(struct mtd_info *mtd);
+ void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
+ void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
+ int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
+ void (*select_chip)(struct mtd_info *mtd, int chip);
+ int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip);
+ int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
+ void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
+ unsigned int ctrl);
+ int (*dev_ready)(struct mtd_info *mtd);
+ void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr);
+ int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
+ void (*erase_cmd)(struct mtd_info *mtd, int page);
+ int (*scan_bbt)(struct mtd_info *mtd);
+ int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page);
+
+ int chip_delay;
+ unsigned int options;
+
+ int page_shift;
+ int phys_erase_shift;
+ int bbt_erase_shift;
+ int chip_shift;
+ int numchips;
+ unsigned long chipsize;
+ int pagemask;
+ int pagebuf;
+ int badblockpos;
+
+ nand_state_t state;
+
+ uint8_t *oob_poi;
+ struct nand_hw_control *controller;
+ struct nand_ecclayout *ecclayout;
+
+ struct nand_ecc_ctrl ecc;
+ struct nand_buffers buffers;
+ struct nand_hw_control hwcontrol;
+
+ struct mtd_oob_ops ops;
+
+ uint8_t *bbt;
+ struct nand_bbt_descr *bbt_td;
+ struct nand_bbt_descr *bbt_md;
+
+ struct nand_bbt_descr *badblock_pattern;
+
+ void *priv;
+};
+
+#define NAND_MFR_TOSHIBA 0x98
+#define NAND_MFR_SAMSUNG 0xec
+#define NAND_MFR_FUJITSU 0x04
+#define NAND_MFR_NATIONAL 0x8f
+#define NAND_MFR_RENESAS 0x07
+#define NAND_MFR_STMICRO 0x20
+#define NAND_MFR_HYNIX 0xad
+
+struct nand_flash_dev {
+ char *name;
+ int id;
+ unsigned long pagesize;
+ unsigned long chipsize;
+ unsigned long erasesize;
+ unsigned long options;
+};
+
+struct nand_manufacturers {
+ int id;
+ char * name;
+};
+
+struct nand_bbt_descr {
+ int options;
+ int pages[NAND_MAX_CHIPS];
+ int offs;
+ int veroffs;
+ uint8_t version[NAND_MAX_CHIPS];
+ int len;
+ int maxblocks;
+ int reserved_block_code;
+ uint8_t *pattern;
+};
+
+#define NAND_BBT_NRBITS_MSK 0x0000000F
+#define NAND_BBT_1BIT 0x00000001
+#define NAND_BBT_2BIT 0x00000002
+#define NAND_BBT_4BIT 0x00000004
+#define NAND_BBT_8BIT 0x00000008
+
+#define NAND_BBT_LASTBLOCK 0x00000010
+
+#define NAND_BBT_ABSPAGE 0x00000020
+
+#define NAND_BBT_SEARCH 0x00000040
+
+#define NAND_BBT_PERCHIP 0x00000080
+
+#define NAND_BBT_VERSION 0x00000100
+
+#define NAND_BBT_CREATE 0x00000200
+
+#define NAND_BBT_SCANALLPAGES 0x00000400
+
+#define NAND_BBT_SCANEMPTY 0x00000800
+
+#define NAND_BBT_WRITE 0x00001000
+
+#define NAND_BBT_SAVECONTENT 0x00002000
+
+#define NAND_BBT_SCAN2NDPAGE 0x00004000
+
+#define NAND_BBT_SCAN_MAXBLOCKS 4
+
+#define NAND_SMALL_BADBLOCK_POS 5
+#define NAND_LARGE_BADBLOCK_POS 0
+
+struct platform_nand_chip {
+ int nr_chips;
+ int chip_offset;
+ int nr_partitions;
+ struct mtd_partition *partitions;
+ struct nand_ecclayout *ecclayout;
+ int chip_delay;
+ unsigned int options;
+ void *priv;
+};
+
+struct platform_nand_ctrl {
+ void (*hwcontrol)(struct mtd_info *mtd, int cmd);
+ int (*dev_ready)(struct mtd_info *mtd);
+ void (*select_chip)(struct mtd_info *mtd, int chip);
+ void *priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand_ecc.h
new file mode 100644
index 0000000..3e817f4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_NAND_ECC_H__
+#define __MTD_NAND_ECC_H__
+
+struct mtd_info;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nftl.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nftl.h
new file mode 100644
index 0000000..da7320e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/nftl.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_NFTL_H__
+#define __MTD_NFTL_H__
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/blktrans.h>
+
+#include <mtd/nftl-user.h>
+
+#define BLOCK_NIL 0xffff
+#define BLOCK_FREE 0xfffe
+#define BLOCK_NOTEXPLORED 0xfffd
+#define BLOCK_RESERVED 0xfffc
+
+struct NFTLrecord {
+ struct mtd_blktrans_dev mbd;
+ __u16 MediaUnit, SpareMediaUnit;
+ __u32 EraseSize;
+ struct NFTLMediaHeader MediaHdr;
+ int usecount;
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ __u16 numvunits;
+ __u16 lastEUN;
+ __u16 numfreeEUNs;
+ __u16 LastFreeEUN;
+ int head,sect,cyl;
+ __u16 *EUNtable;
+ __u16 *ReplUnitTable;
+ unsigned int nb_blocks;
+ unsigned int nb_boot_blocks;
+ struct erase_info instr;
+ struct nand_ecclayout oobinfo;
+};
+
+#ifndef NFTL_MAJOR
+#define NFTL_MAJOR 93
+#endif
+
+#define MAX_NFTLS 16
+#define MAX_SECTORS_PER_UNIT 64
+#define NFTL_PARTN_BITS 4
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/onenand_regs.h
new file mode 100644
index 0000000..a39c78f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1,143 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ONENAND_REG_H
+#define __ONENAND_REG_H
+
+#define ONENAND_MEMORY_MAP(x) ((x) << 1)
+
+#define ONENAND_BOOTRAM ONENAND_MEMORY_MAP(0x0000)
+#define ONENAND_DATARAM ONENAND_MEMORY_MAP(0x0200)
+#define ONENAND_SPARERAM ONENAND_MEMORY_MAP(0x8010)
+
+#define ONENAND_REG_MANUFACTURER_ID ONENAND_MEMORY_MAP(0xF000)
+#define ONENAND_REG_DEVICE_ID ONENAND_MEMORY_MAP(0xF001)
+#define ONENAND_REG_VERSION_ID ONENAND_MEMORY_MAP(0xF002)
+#define ONENAND_REG_DATA_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF003)
+#define ONENAND_REG_BOOT_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF004)
+#define ONENAND_REG_NUM_BUFFERS ONENAND_MEMORY_MAP(0xF005)
+#define ONENAND_REG_TECHNOLOGY ONENAND_MEMORY_MAP(0xF006)
+
+#define ONENAND_REG_START_ADDRESS1 ONENAND_MEMORY_MAP(0xF100)
+#define ONENAND_REG_START_ADDRESS2 ONENAND_MEMORY_MAP(0xF101)
+#define ONENAND_REG_START_ADDRESS3 ONENAND_MEMORY_MAP(0xF102)
+#define ONENAND_REG_START_ADDRESS4 ONENAND_MEMORY_MAP(0xF103)
+#define ONENAND_REG_START_ADDRESS5 ONENAND_MEMORY_MAP(0xF104)
+#define ONENAND_REG_START_ADDRESS6 ONENAND_MEMORY_MAP(0xF105)
+#define ONENAND_REG_START_ADDRESS7 ONENAND_MEMORY_MAP(0xF106)
+#define ONENAND_REG_START_ADDRESS8 ONENAND_MEMORY_MAP(0xF107)
+
+#define ONENAND_REG_START_BUFFER ONENAND_MEMORY_MAP(0xF200)
+#define ONENAND_REG_COMMAND ONENAND_MEMORY_MAP(0xF220)
+#define ONENAND_REG_SYS_CFG1 ONENAND_MEMORY_MAP(0xF221)
+#define ONENAND_REG_SYS_CFG2 ONENAND_MEMORY_MAP(0xF222)
+#define ONENAND_REG_CTRL_STATUS ONENAND_MEMORY_MAP(0xF240)
+#define ONENAND_REG_INTERRUPT ONENAND_MEMORY_MAP(0xF241)
+#define ONENAND_REG_START_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24C)
+#define ONENAND_REG_END_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24D)
+#define ONENAND_REG_WP_STATUS ONENAND_MEMORY_MAP(0xF24E)
+
+#define ONENAND_REG_ECC_STATUS ONENAND_MEMORY_MAP(0xFF00)
+#define ONENAND_REG_ECC_M0 ONENAND_MEMORY_MAP(0xFF01)
+#define ONENAND_REG_ECC_S0 ONENAND_MEMORY_MAP(0xFF02)
+#define ONENAND_REG_ECC_M1 ONENAND_MEMORY_MAP(0xFF03)
+#define ONENAND_REG_ECC_S1 ONENAND_MEMORY_MAP(0xFF04)
+#define ONENAND_REG_ECC_M2 ONENAND_MEMORY_MAP(0xFF05)
+#define ONENAND_REG_ECC_S2 ONENAND_MEMORY_MAP(0xFF06)
+#define ONENAND_REG_ECC_M3 ONENAND_MEMORY_MAP(0xFF07)
+#define ONENAND_REG_ECC_S3 ONENAND_MEMORY_MAP(0xFF08)
+
+#define ONENAND_DEVICE_DENSITY_SHIFT (4)
+#define ONENAND_DEVICE_IS_DDP (1 << 3)
+#define ONENAND_DEVICE_IS_DEMUX (1 << 2)
+#define ONENAND_DEVICE_VCC_MASK (0x3)
+
+#define ONENAND_DEVICE_DENSITY_512Mb (0x002)
+
+#define ONENAND_VERSION_PROCESS_SHIFT (8)
+
+#define ONENAND_DDP_SHIFT (15)
+
+#define ONENAND_FPA_MASK (0x3f)
+#define ONENAND_FPA_SHIFT (2)
+#define ONENAND_FSA_MASK (0x03)
+
+#define ONENAND_BSA_MASK (0x03)
+#define ONENAND_BSA_SHIFT (8)
+#define ONENAND_BSA_BOOTRAM (0 << 2)
+#define ONENAND_BSA_DATARAM0 (2 << 2)
+#define ONENAND_BSA_DATARAM1 (3 << 2)
+#define ONENAND_BSC_MASK (0x03)
+
+#define ONENAND_CMD_READ (0x00)
+#define ONENAND_CMD_READOOB (0x13)
+#define ONENAND_CMD_PROG (0x80)
+#define ONENAND_CMD_PROGOOB (0x1A)
+#define ONENAND_CMD_UNLOCK (0x23)
+#define ONENAND_CMD_LOCK (0x2A)
+#define ONENAND_CMD_LOCK_TIGHT (0x2C)
+#define ONENAND_CMD_ERASE (0x94)
+#define ONENAND_CMD_RESET (0xF0)
+#define ONENAND_CMD_OTP_ACCESS (0x65)
+#define ONENAND_CMD_READID (0x90)
+
+#define ONENAND_CMD_BUFFERRAM (0x1978)
+
+#define ONENAND_SYS_CFG1_SYNC_READ (1 << 15)
+#define ONENAND_SYS_CFG1_BRL_7 (7 << 12)
+#define ONENAND_SYS_CFG1_BRL_6 (6 << 12)
+#define ONENAND_SYS_CFG1_BRL_5 (5 << 12)
+#define ONENAND_SYS_CFG1_BRL_4 (4 << 12)
+#define ONENAND_SYS_CFG1_BRL_3 (3 << 12)
+#define ONENAND_SYS_CFG1_BRL_10 (2 << 12)
+#define ONENAND_SYS_CFG1_BRL_9 (1 << 12)
+#define ONENAND_SYS_CFG1_BRL_8 (0 << 12)
+#define ONENAND_SYS_CFG1_BRL_SHIFT (12)
+#define ONENAND_SYS_CFG1_BL_32 (4 << 9)
+#define ONENAND_SYS_CFG1_BL_16 (3 << 9)
+#define ONENAND_SYS_CFG1_BL_8 (2 << 9)
+#define ONENAND_SYS_CFG1_BL_4 (1 << 9)
+#define ONENAND_SYS_CFG1_BL_CONT (0 << 9)
+#define ONENAND_SYS_CFG1_BL_SHIFT (9)
+#define ONENAND_SYS_CFG1_NO_ECC (1 << 8)
+#define ONENAND_SYS_CFG1_RDY (1 << 7)
+#define ONENAND_SYS_CFG1_INT (1 << 6)
+#define ONENAND_SYS_CFG1_IOBE (1 << 5)
+#define ONENAND_SYS_CFG1_RDY_CONF (1 << 4)
+
+#define ONENAND_CTRL_ONGO (1 << 15)
+#define ONENAND_CTRL_LOCK (1 << 14)
+#define ONENAND_CTRL_LOAD (1 << 13)
+#define ONENAND_CTRL_PROGRAM (1 << 12)
+#define ONENAND_CTRL_ERASE (1 << 11)
+#define ONENAND_CTRL_ERROR (1 << 10)
+#define ONENAND_CTRL_RSTB (1 << 7)
+#define ONENAND_CTRL_OTP_L (1 << 6)
+#define ONENAND_CTRL_OTP_BL (1 << 5)
+
+#define ONENAND_INT_MASTER (1 << 15)
+#define ONENAND_INT_READ (1 << 7)
+#define ONENAND_INT_WRITE (1 << 6)
+#define ONENAND_INT_ERASE (1 << 5)
+#define ONENAND_INT_RESET (1 << 4)
+#define ONENAND_INT_CLEAR (0 << 0)
+
+#define ONENAND_WP_US (1 << 2)
+#define ONENAND_WP_LS (1 << 1)
+#define ONENAND_WP_LTS (1 << 0)
+
+#define ONENAND_ECC_1BIT (1 << 0)
+#define ONENAND_ECC_2BIT (1 << 1)
+#define ONENAND_ECC_2BIT_ALL (0xAAAA)
+
+#define ONENAND_OTP_LOCK_OFFSET (14)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtd/partitions.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/partitions.h
new file mode 100644
index 0000000..aeb15e1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtd/partitions.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef MTD_PARTITIONS_H
+#define MTD_PARTITIONS_H
+
+#include <linux/types.h>
+
+struct mtd_partition {
+ char *name;
+ u_int32_t size;
+ u_int32_t offset;
+ u_int32_t mask_flags;
+ struct nand_ecclayout *ecclayout;
+ struct mtd_info **mtdp;
+};
+
+#define MTDPART_OFS_NXTBLK (-2)
+#define MTDPART_OFS_APPEND (-1)
+#define MTDPART_SIZ_FULL (0)
+
+struct mtd_part_parser {
+ struct list_head list;
+ struct module *owner;
+ const char *name;
+ int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long);
+};
+
+#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mtio.h b/6/platforms/android-3/arch-arm/usr/include/linux/mtio.h
new file mode 100644
index 0000000..47a6e2b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mtio.h
@@ -0,0 +1,259 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MTIO_H
+#define _LINUX_MTIO_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <linux/qic117.h>
+
+struct mtop {
+ short mt_op;
+ int mt_count;
+};
+
+#define MTRESET 0
+#define MTFSF 1
+#define MTBSF 2
+#define MTFSR 3
+#define MTBSR 4
+#define MTWEOF 5
+#define MTREW 6
+#define MTOFFL 7
+#define MTNOP 8
+#define MTRETEN 9
+#define MTBSFM 10
+#define MTFSFM 11
+#define MTEOM 12
+#define MTERASE 13
+
+#define MTRAS1 14
+#define MTRAS2 15
+#define MTRAS3 16
+
+#define MTSETBLK 20
+#define MTSETDENSITY 21
+#define MTSEEK 22
+#define MTTELL 23
+#define MTSETDRVBUFFER 24
+
+#define MTFSS 25
+#define MTBSS 26
+#define MTWSM 27
+
+#define MTLOCK 28
+#define MTUNLOCK 29
+#define MTLOAD 30
+#define MTUNLOAD 31
+#define MTCOMPRESSION 32
+#define MTSETPART 33
+#define MTMKPART 34
+
+struct mtget {
+ long mt_type;
+ long mt_resid;
+
+ long mt_dsreg;
+ long mt_gstat;
+ long mt_erreg;
+
+ __kernel_daddr_t mt_fileno;
+ __kernel_daddr_t mt_blkno;
+};
+
+#define MT_ISUNKNOWN 0x01
+#define MT_ISQIC02 0x02
+#define MT_ISWT5150 0x03
+#define MT_ISARCHIVE_5945L2 0x04
+#define MT_ISCMSJ500 0x05
+#define MT_ISTDC3610 0x06
+#define MT_ISARCHIVE_VP60I 0x07
+#define MT_ISARCHIVE_2150L 0x08
+#define MT_ISARCHIVE_2060L 0x09
+#define MT_ISARCHIVESC499 0x0A
+#define MT_ISQIC02_ALL_FEATURES 0x0F
+#define MT_ISWT5099EEN24 0x11
+#define MT_ISTEAC_MT2ST 0x12
+#define MT_ISEVEREX_FT40A 0x32
+#define MT_ISDDS1 0x51
+#define MT_ISDDS2 0x52
+#define MT_ISONSTREAM_SC 0x61
+#define MT_ISSCSI1 0x71
+#define MT_ISSCSI2 0x72
+
+#define MT_ISFTAPE_UNKNOWN 0x800000
+#define MT_ISFTAPE_FLAG 0x800000
+
+struct mt_tape_info {
+ long t_type;
+ char *t_name;
+};
+
+#define MT_TAPE_INFO { {MT_ISUNKNOWN, "Unknown type of tape device"}, {MT_ISQIC02, "Generic QIC-02 tape streamer"}, {MT_ISWT5150, "Wangtek 5150, QIC-150"}, {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, {MT_ISCMSJ500, "CMS Jumbo 500"}, {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, {MT_ISSCSI1, "Generic SCSI-1 tape"}, {MT_ISSCSI2, "Generic SCSI-2 tape"}, {0, NULL} }
+
+struct mtpos {
+ long mt_blkno;
+};
+
+struct mtvolinfo {
+ unsigned int mt_volno;
+ unsigned int mt_blksz;
+ unsigned int mt_rawsize;
+ unsigned int mt_size;
+ unsigned int mt_cmpr:1;
+};
+
+#define MT_FT_RD_SINGLE 0
+#define MT_FT_RD_AHEAD 1
+#define MT_FT_WR_ASYNC 0
+#define MT_FT_WR_MULTI 1
+#define MT_FT_WR_SINGLE 2
+#define MT_FT_WR_DELETE 3
+
+struct mtftseg
+{
+ unsigned mt_segno;
+ unsigned mt_mode;
+ int mt_result;
+ void __user *mt_data;
+};
+
+struct mttapesize {
+ unsigned long mt_capacity;
+ unsigned long mt_used;
+};
+
+#define FTFMT_SET_PARMS 1
+#define FTFMT_GET_PARMS 2
+#define FTFMT_FORMAT_TRACK 3
+#define FTFMT_STATUS 4
+#define FTFMT_VERIFY 5
+
+struct ftfmtparms {
+ unsigned char ft_qicstd;
+ unsigned char ft_fmtcode;
+ unsigned char ft_fhm;
+ unsigned char ft_ftm;
+ unsigned short ft_spt;
+ unsigned short ft_tpc;
+};
+
+struct ftfmttrack {
+ unsigned int ft_track;
+ unsigned char ft_gap3;
+};
+
+struct ftfmtstatus {
+ unsigned int ft_segment;
+};
+
+struct ftfmtverify {
+ unsigned int ft_segment;
+ unsigned long ft_bsm;
+};
+
+struct mtftformat {
+ unsigned int fmt_op;
+ union fmt_arg {
+ struct ftfmtparms fmt_parms;
+ struct ftfmttrack fmt_track;
+ struct ftfmtstatus fmt_status;
+ struct ftfmtverify fmt_verify;
+ } fmt_arg;
+};
+
+struct mtftcmd {
+ unsigned int ft_wait_before;
+ qic117_cmd_t ft_cmd;
+ unsigned char ft_parm_cnt;
+ unsigned char ft_parms[3];
+ unsigned int ft_result_bits;
+ unsigned int ft_result;
+ unsigned int ft_wait_after;
+ int ft_status;
+ int ft_error;
+};
+
+#define MTIOCTOP _IOW('m', 1, struct mtop)
+#define MTIOCGET _IOR('m', 2, struct mtget)
+#define MTIOCPOS _IOR('m', 3, struct mtpos)
+
+#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo)
+#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo)
+
+#define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg)
+#define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg)
+#define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)
+#define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)
+#define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat)
+#define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd)
+
+#define GMT_EOF(x) ((x) & 0x80000000)
+#define GMT_BOT(x) ((x) & 0x40000000)
+#define GMT_EOT(x) ((x) & 0x20000000)
+#define GMT_SM(x) ((x) & 0x10000000)
+#define GMT_EOD(x) ((x) & 0x08000000)
+#define GMT_WR_PROT(x) ((x) & 0x04000000)
+
+#define GMT_ONLINE(x) ((x) & 0x01000000)
+#define GMT_D_6250(x) ((x) & 0x00800000)
+#define GMT_D_1600(x) ((x) & 0x00400000)
+#define GMT_D_800(x) ((x) & 0x00200000)
+
+#define GMT_DR_OPEN(x) ((x) & 0x00040000)
+
+#define GMT_IM_REP_EN(x) ((x) & 0x00010000)
+#define GMT_CLN(x) ((x) & 0x00008000)
+
+#define MT_ST_BLKSIZE_SHIFT 0
+#define MT_ST_BLKSIZE_MASK 0xffffff
+#define MT_ST_DENSITY_SHIFT 24
+#define MT_ST_DENSITY_MASK 0xff000000
+
+#define MT_ST_SOFTERR_SHIFT 0
+#define MT_ST_SOFTERR_MASK 0xffff
+
+#define MT_ST_OPTIONS 0xf0000000
+#define MT_ST_BOOLEANS 0x10000000
+#define MT_ST_SETBOOLEANS 0x30000000
+#define MT_ST_CLEARBOOLEANS 0x40000000
+#define MT_ST_WRITE_THRESHOLD 0x20000000
+#define MT_ST_DEF_BLKSIZE 0x50000000
+#define MT_ST_DEF_OPTIONS 0x60000000
+#define MT_ST_TIMEOUTS 0x70000000
+#define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000)
+#define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000)
+#define MT_ST_SET_CLN 0x80000000
+
+#define MT_ST_BUFFER_WRITES 0x1
+#define MT_ST_ASYNC_WRITES 0x2
+#define MT_ST_READ_AHEAD 0x4
+#define MT_ST_DEBUGGING 0x8
+#define MT_ST_TWO_FM 0x10
+#define MT_ST_FAST_MTEOM 0x20
+#define MT_ST_AUTO_LOCK 0x40
+#define MT_ST_DEF_WRITES 0x80
+#define MT_ST_CAN_BSR 0x100
+#define MT_ST_NO_BLKLIMS 0x200
+#define MT_ST_CAN_PARTITIONS 0x400
+#define MT_ST_SCSI2LOGICAL 0x800
+#define MT_ST_SYSV 0x1000
+#define MT_ST_NOWAIT 0x2000
+
+#define MT_ST_CLEAR_DEFAULT 0xfffff
+#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
+#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
+#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
+
+#define MT_ST_HPLOADER_OFFSET 10000
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mutex-debug.h b/6/platforms/android-3/arch-arm/usr/include/linux/mutex-debug.h
new file mode 100644
index 0000000..7065610
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mutex-debug.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MUTEX_DEBUG_H
+#define __LINUX_MUTEX_DEBUG_H
+
+#include <linux/linkage.h>
+#include <linux/lockdep.h>
+
+#define __DEBUG_MUTEX_INITIALIZER(lockname) , .magic = &lockname
+
+#define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/mutex.h b/6/platforms/android-3/arch-arm/usr/include/linux/mutex.h
new file mode 100644
index 0000000..4b33a8a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/mutex.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MUTEX_H
+#define __LINUX_MUTEX_H
+
+#include <linux/list.h>
+#include <linux/spinlock_types.h>
+#include <linux/linkage.h>
+#include <linux/lockdep.h>
+
+#include <asm/atomic.h>
+
+struct mutex {
+
+ atomic_t count;
+ spinlock_t wait_lock;
+ struct list_head wait_list;
+};
+
+struct mutex_waiter {
+ struct list_head list;
+ struct task_struct *task;
+};
+
+#define __DEBUG_MUTEX_INITIALIZER(lockname)
+#define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0)
+#define mutex_destroy(mutex) do { } while (0)
+
+#define __DEP_MAP_MUTEX_INITIALIZER(lockname)
+
+#define __MUTEX_INITIALIZER(lockname) { .count = ATOMIC_INIT(1) , .wait_lock = SPIN_LOCK_UNLOCKED , .wait_list = LIST_HEAD_INIT(lockname.wait_list) __DEBUG_MUTEX_INITIALIZER(lockname) __DEP_MAP_MUTEX_INITIALIZER(lockname) }
+
+#define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
+
+#define mutex_lock_nested(lock, subclass) mutex_lock(lock)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ncp.h b/6/platforms/android-3/arch-arm/usr/include/linux/ncp.h
new file mode 100644
index 0000000..091220a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ncp.h
@@ -0,0 +1,193 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NCP_H
+#define _LINUX_NCP_H
+
+#include <linux/types.h>
+
+#define NCP_PTYPE (0x11)
+#define NCP_PORT (0x0451)
+
+#define NCP_ALLOC_SLOT_REQUEST (0x1111)
+#define NCP_REQUEST (0x2222)
+#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
+
+struct ncp_request_header {
+ __u16 type;
+ __u8 sequence;
+ __u8 conn_low;
+ __u8 task;
+ __u8 conn_high;
+ __u8 function;
+ __u8 data[0];
+} __attribute__((packed));
+
+#define NCP_REPLY (0x3333)
+#define NCP_WATCHDOG (0x3E3E)
+#define NCP_POSITIVE_ACK (0x9999)
+
+struct ncp_reply_header {
+ __u16 type;
+ __u8 sequence;
+ __u8 conn_low;
+ __u8 task;
+ __u8 conn_high;
+ __u8 completion_code;
+ __u8 connection_state;
+ __u8 data[0];
+} __attribute__((packed));
+
+#define NCP_VOLNAME_LEN (16)
+#define NCP_NUMBER_OF_VOLUMES (256)
+struct ncp_volume_info {
+ __u32 total_blocks;
+ __u32 free_blocks;
+ __u32 purgeable_blocks;
+ __u32 not_yet_purgeable_blocks;
+ __u32 total_dir_entries;
+ __u32 available_dir_entries;
+ __u8 sectors_per_block;
+ char volume_name[NCP_VOLNAME_LEN + 1];
+};
+
+#define AR_READ (cpu_to_le16(1))
+#define AR_WRITE (cpu_to_le16(2))
+#define AR_EXCLUSIVE (cpu_to_le16(0x20))
+
+#define NCP_FILE_ID_LEN 6
+
+#define NW_NS_DOS 0
+#define NW_NS_MAC 1
+#define NW_NS_NFS 2
+#define NW_NS_FTAM 3
+#define NW_NS_OS2 4
+
+#define RIM_NAME (cpu_to_le32(1))
+#define RIM_SPACE_ALLOCATED (cpu_to_le32(2))
+#define RIM_ATTRIBUTES (cpu_to_le32(4))
+#define RIM_DATA_SIZE (cpu_to_le32(8))
+#define RIM_TOTAL_SIZE (cpu_to_le32(0x10))
+#define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20))
+#define RIM_ARCHIVE (cpu_to_le32(0x40))
+#define RIM_MODIFY (cpu_to_le32(0x80))
+#define RIM_CREATION (cpu_to_le32(0x100))
+#define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200))
+#define RIM_DIRECTORY (cpu_to_le32(0x400))
+#define RIM_RIGHTS (cpu_to_le32(0x800))
+#define RIM_ALL (cpu_to_le32(0xFFF))
+#define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000))
+
+#define NSIBM_NFS_NAME 0x0001
+#define NSIBM_NFS_MODE 0x0002
+#define NSIBM_NFS_GID 0x0004
+#define NSIBM_NFS_NLINKS 0x0008
+#define NSIBM_NFS_RDEV 0x0010
+#define NSIBM_NFS_LINK 0x0020
+#define NSIBM_NFS_CREATED 0x0040
+#define NSIBM_NFS_UID 0x0080
+#define NSIBM_NFS_ACSFLAG 0x0100
+#define NSIBM_NFS_MYFLAG 0x0200
+
+#define OC_MODE_OPEN 0x01
+#define OC_MODE_TRUNCATE 0x02
+#define OC_MODE_REPLACE 0x02
+#define OC_MODE_CREATE 0x08
+
+#define OC_ACTION_NONE 0x00
+#define OC_ACTION_OPEN 0x01
+#define OC_ACTION_CREATE 0x02
+#define OC_ACTION_TRUNCATE 0x04
+#define OC_ACTION_REPLACE 0x04
+
+#ifndef AR_READ_ONLY
+#define AR_READ_ONLY 0x0001
+#define AR_WRITE_ONLY 0x0002
+#define AR_DENY_READ 0x0004
+#define AR_DENY_WRITE 0x0008
+#define AR_COMPATIBILITY 0x0010
+#define AR_WRITE_THROUGH 0x0040
+#define AR_OPEN_COMPRESSED 0x0100
+#endif
+
+struct nw_nfs_info {
+ __u32 mode;
+ __u32 rdev;
+};
+
+struct nw_info_struct {
+ __u32 spaceAlloc;
+ __le32 attributes;
+ __u16 flags;
+ __le32 dataStreamSize;
+ __le32 totalStreamSize;
+ __u16 numberOfStreams;
+ __le16 creationTime;
+ __le16 creationDate;
+ __u32 creatorID;
+ __le16 modifyTime;
+ __le16 modifyDate;
+ __u32 modifierID;
+ __le16 lastAccessDate;
+ __u16 archiveTime;
+ __u16 archiveDate;
+ __u32 archiverID;
+ __u16 inheritedRightsMask;
+ __le32 dirEntNum;
+ __le32 DosDirNum;
+ __u32 volNumber;
+ __u32 EADataSize;
+ __u32 EAKeyCount;
+ __u32 EAKeySize;
+ __u32 NSCreator;
+ __u8 nameLen;
+ __u8 entryName[256];
+
+} __attribute__((packed));
+
+#define DM_ATTRIBUTES (cpu_to_le32(0x02))
+#define DM_CREATE_DATE (cpu_to_le32(0x04))
+#define DM_CREATE_TIME (cpu_to_le32(0x08))
+#define DM_CREATOR_ID (cpu_to_le32(0x10))
+#define DM_ARCHIVE_DATE (cpu_to_le32(0x20))
+#define DM_ARCHIVE_TIME (cpu_to_le32(0x40))
+#define DM_ARCHIVER_ID (cpu_to_le32(0x80))
+#define DM_MODIFY_DATE (cpu_to_le32(0x0100))
+#define DM_MODIFY_TIME (cpu_to_le32(0x0200))
+#define DM_MODIFIER_ID (cpu_to_le32(0x0400))
+#define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800))
+#define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000))
+#define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000))
+
+struct nw_modify_dos_info {
+ __le32 attributes;
+ __le16 creationDate;
+ __le16 creationTime;
+ __u32 creatorID;
+ __le16 modifyDate;
+ __le16 modifyTime;
+ __u32 modifierID;
+ __u16 archiveDate;
+ __u16 archiveTime;
+ __u32 archiverID;
+ __le16 lastAccessDate;
+ __u16 inheritanceGrantMask;
+ __u16 inheritanceRevokeMask;
+ __u32 maximumSpace;
+} __attribute__((packed));
+
+struct nw_search_sequence {
+ __u8 volNumber;
+ __u32 dirBase;
+ __u32 sequence;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ncp_mount.h b/6/platforms/android-3/arch-arm/usr/include/linux/ncp_mount.h
new file mode 100644
index 0000000..204869f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ncp_mount.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NCP_MOUNT_H
+#define _LINUX_NCP_MOUNT_H
+
+#include <linux/types.h>
+#include <linux/ncp.h>
+
+#define NCP_MOUNT_VERSION 3
+
+#define NCP_MOUNT_SOFT 0x0001
+#define NCP_MOUNT_INTR 0x0002
+#define NCP_MOUNT_STRONG 0x0004
+#define NCP_MOUNT_NO_OS2 0x0008
+#define NCP_MOUNT_NO_NFS 0x0010
+#define NCP_MOUNT_EXTRAS 0x0020
+#define NCP_MOUNT_SYMLINKS 0x0040
+#define NCP_MOUNT_NFS_EXTRAS 0x0080
+
+struct ncp_mount_data {
+ int version;
+ unsigned int ncp_fd;
+ __kernel_uid_t mounted_uid;
+ __kernel_pid_t wdog_pid;
+
+ unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
+ unsigned int time_out;
+ unsigned int retry_count;
+ unsigned int flags;
+
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_mode_t file_mode;
+ __kernel_mode_t dir_mode;
+};
+
+#define NCP_MOUNT_VERSION_V4 (4)
+
+struct ncp_mount_data_v4 {
+ int version;
+ unsigned long flags;
+
+ unsigned long mounted_uid;
+
+ long wdog_pid;
+
+ unsigned int ncp_fd;
+ unsigned int time_out;
+ unsigned int retry_count;
+
+ unsigned long uid;
+ unsigned long gid;
+
+ unsigned long file_mode;
+ unsigned long dir_mode;
+};
+
+#define NCP_MOUNT_VERSION_V5 (5)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ncp_no.h b/6/platforms/android-3/arch-arm/usr/include/linux/ncp_no.h
new file mode 100644
index 0000000..9afed68
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ncp_no.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NCP_NO
+#define _NCP_NO
+
+#define aRONLY (__constant_cpu_to_le32(1))
+#define aHIDDEN (__constant_cpu_to_le32(2))
+#define aSYSTEM (__constant_cpu_to_le32(4))
+#define aEXECUTE (__constant_cpu_to_le32(8))
+#define aDIR (__constant_cpu_to_le32(0x10))
+#define aARCH (__constant_cpu_to_le32(0x20))
+#define aSHARED (__constant_cpu_to_le32(0x80))
+#define aDONTSUBALLOCATE (__constant_cpu_to_le32(1L<<11))
+#define aTRANSACTIONAL (__constant_cpu_to_le32(1L<<12))
+#define aPURGE (__constant_cpu_to_le32(1L<<16))
+#define aRENAMEINHIBIT (__constant_cpu_to_le32(1L<<17))
+#define aDELETEINHIBIT (__constant_cpu_to_le32(1L<<18))
+#define aDONTCOMPRESS (__constant_cpu_to_le32(1L<<27))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/net.h b/6/platforms/android-3/arch-arm/usr/include/linux/net.h
new file mode 100644
index 0000000..29fca2c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/net.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NET_H
+#define _LINUX_NET_H
+
+#include <linux/wait.h>
+#include <asm/socket.h>
+
+struct poll_table_struct;
+struct inode;
+
+#define NPROTO 32
+
+#define SYS_SOCKET 1
+#define SYS_BIND 2
+#define SYS_CONNECT 3
+#define SYS_LISTEN 4
+#define SYS_ACCEPT 5
+#define SYS_GETSOCKNAME 6
+#define SYS_GETPEERNAME 7
+#define SYS_SOCKETPAIR 8
+#define SYS_SEND 9
+#define SYS_RECV 10
+#define SYS_SENDTO 11
+#define SYS_RECVFROM 12
+#define SYS_SHUTDOWN 13
+#define SYS_SETSOCKOPT 14
+#define SYS_GETSOCKOPT 15
+#define SYS_SENDMSG 16
+#define SYS_RECVMSG 17
+
+typedef enum {
+ SS_FREE = 0,
+ SS_UNCONNECTED,
+ SS_CONNECTING,
+ SS_CONNECTED,
+ SS_DISCONNECTING
+} socket_state;
+
+#define __SO_ACCEPTCON (1 << 16)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netdevice.h b/6/platforms/android-3/arch-arm/usr/include/linux/netdevice.h
new file mode 100644
index 0000000..54b58f1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netdevice.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NETDEVICE_H
+#define _LINUX_NETDEVICE_H
+
+#include <linux/if.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
+
+#define MAX_ADDR_LEN 32
+
+#define NETDEV_TX_OK 0
+#define NETDEV_TX_BUSY 1
+#define NETDEV_TX_LOCKED -1
+
+#define LL_MAX_HEADER 32
+
+#define MAX_HEADER LL_MAX_HEADER
+
+struct net_device_stats
+{
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors;
+ unsigned long tx_errors;
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long multicast;
+ unsigned long collisions;
+
+ unsigned long rx_length_errors;
+ unsigned long rx_over_errors;
+ unsigned long rx_crc_errors;
+ unsigned long rx_frame_errors;
+ unsigned long rx_fifo_errors;
+ unsigned long rx_missed_errors;
+
+ unsigned long tx_aborted_errors;
+ unsigned long tx_carrier_errors;
+ unsigned long tx_fifo_errors;
+ unsigned long tx_heartbeat_errors;
+ unsigned long tx_window_errors;
+
+ unsigned long rx_compressed;
+ unsigned long tx_compressed;
+};
+
+enum {
+ IF_PORT_UNKNOWN = 0,
+ IF_PORT_10BASE2,
+ IF_PORT_10BASET,
+ IF_PORT_AUI,
+ IF_PORT_100BASET,
+ IF_PORT_100BASETX,
+ IF_PORT_100BASEFX
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter.h
new file mode 100644
index 0000000..0488344
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NETFILTER_H
+#define __LINUX_NETFILTER_H
+
+#include <linux/compiler.h>
+
+#define NF_DROP 0
+#define NF_ACCEPT 1
+#define NF_STOLEN 2
+#define NF_QUEUE 3
+#define NF_REPEAT 4
+#define NF_STOP 5
+#define NF_MAX_VERDICT NF_STOP
+
+#define NF_VERDICT_MASK 0x0000ffff
+#define NF_VERDICT_BITS 16
+
+#define NF_VERDICT_QMASK 0xffff0000
+#define NF_VERDICT_QBITS 16
+
+#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+
+#define NFC_UNKNOWN 0x4000
+#define NFC_ALTERED 0x8000
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 100644
index 0000000..69177fc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_COMMON_H
+#define _NF_CONNTRACK_COMMON_H
+
+enum ip_conntrack_info
+{
+
+ IP_CT_ESTABLISHED,
+
+ IP_CT_RELATED,
+
+ IP_CT_NEW,
+
+ IP_CT_IS_REPLY,
+
+ IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
+};
+
+enum ip_conntrack_status {
+
+ IPS_EXPECTED_BIT = 0,
+ IPS_EXPECTED = (1 << IPS_EXPECTED_BIT),
+
+ IPS_SEEN_REPLY_BIT = 1,
+ IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT),
+
+ IPS_ASSURED_BIT = 2,
+ IPS_ASSURED = (1 << IPS_ASSURED_BIT),
+
+ IPS_CONFIRMED_BIT = 3,
+ IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT),
+
+ IPS_SRC_NAT_BIT = 4,
+ IPS_SRC_NAT = (1 << IPS_SRC_NAT_BIT),
+
+ IPS_DST_NAT_BIT = 5,
+ IPS_DST_NAT = (1 << IPS_DST_NAT_BIT),
+
+ IPS_NAT_MASK = (IPS_DST_NAT | IPS_SRC_NAT),
+
+ IPS_SEQ_ADJUST_BIT = 6,
+ IPS_SEQ_ADJUST = (1 << IPS_SEQ_ADJUST_BIT),
+
+ IPS_SRC_NAT_DONE_BIT = 7,
+ IPS_SRC_NAT_DONE = (1 << IPS_SRC_NAT_DONE_BIT),
+
+ IPS_DST_NAT_DONE_BIT = 8,
+ IPS_DST_NAT_DONE = (1 << IPS_DST_NAT_DONE_BIT),
+
+ IPS_NAT_DONE_MASK = (IPS_DST_NAT_DONE | IPS_SRC_NAT_DONE),
+
+ IPS_DYING_BIT = 9,
+ IPS_DYING = (1 << IPS_DYING_BIT),
+
+ IPS_FIXED_TIMEOUT_BIT = 10,
+ IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT),
+};
+
+enum ip_conntrack_events
+{
+
+ IPCT_NEW_BIT = 0,
+ IPCT_NEW = (1 << IPCT_NEW_BIT),
+
+ IPCT_RELATED_BIT = 1,
+ IPCT_RELATED = (1 << IPCT_RELATED_BIT),
+
+ IPCT_DESTROY_BIT = 2,
+ IPCT_DESTROY = (1 << IPCT_DESTROY_BIT),
+
+ IPCT_REFRESH_BIT = 3,
+ IPCT_REFRESH = (1 << IPCT_REFRESH_BIT),
+
+ IPCT_STATUS_BIT = 4,
+ IPCT_STATUS = (1 << IPCT_STATUS_BIT),
+
+ IPCT_PROTOINFO_BIT = 5,
+ IPCT_PROTOINFO = (1 << IPCT_PROTOINFO_BIT),
+
+ IPCT_PROTOINFO_VOLATILE_BIT = 6,
+ IPCT_PROTOINFO_VOLATILE = (1 << IPCT_PROTOINFO_VOLATILE_BIT),
+
+ IPCT_HELPER_BIT = 7,
+ IPCT_HELPER = (1 << IPCT_HELPER_BIT),
+
+ IPCT_HELPINFO_BIT = 8,
+ IPCT_HELPINFO = (1 << IPCT_HELPINFO_BIT),
+
+ IPCT_HELPINFO_VOLATILE_BIT = 9,
+ IPCT_HELPINFO_VOLATILE = (1 << IPCT_HELPINFO_VOLATILE_BIT),
+
+ IPCT_NATINFO_BIT = 10,
+ IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
+
+ IPCT_COUNTER_FILLING_BIT = 11,
+ IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
+};
+
+enum ip_conntrack_expect_events {
+ IPEXP_NEW_BIT = 0,
+ IPEXP_NEW = (1 << IPEXP_NEW_BIT),
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 100644
index 0000000..ff815a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_FTP_H
+#define _NF_CONNTRACK_FTP_H
+
+enum ip_ct_ftp_type
+{
+
+ IP_CT_FTP_PORT,
+
+ IP_CT_FTP_PASV,
+
+ IP_CT_FTP_EPRT,
+
+ IP_CT_FTP_EPSV,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 100644
index 0000000..15768b2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_SCTP_H
+#define _NF_CONNTRACK_SCTP_H
+
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+
+enum sctp_conntrack {
+ SCTP_CONNTRACK_NONE,
+ SCTP_CONNTRACK_CLOSED,
+ SCTP_CONNTRACK_COOKIE_WAIT,
+ SCTP_CONNTRACK_COOKIE_ECHOED,
+ SCTP_CONNTRACK_ESTABLISHED,
+ SCTP_CONNTRACK_SHUTDOWN_SENT,
+ SCTP_CONNTRACK_SHUTDOWN_RECD,
+ SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
+ SCTP_CONNTRACK_MAX
+};
+
+struct ip_ct_sctp
+{
+ enum sctp_conntrack state;
+
+ u_int32_t vtag[IP_CT_DIR_MAX];
+ u_int32_t ttag[IP_CT_DIR_MAX];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 100644
index 0000000..227f902
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_TCP_H
+#define _NF_CONNTRACK_TCP_H
+
+enum tcp_conntrack {
+ TCP_CONNTRACK_NONE,
+ TCP_CONNTRACK_SYN_SENT,
+ TCP_CONNTRACK_SYN_RECV,
+ TCP_CONNTRACK_ESTABLISHED,
+ TCP_CONNTRACK_FIN_WAIT,
+ TCP_CONNTRACK_CLOSE_WAIT,
+ TCP_CONNTRACK_LAST_ACK,
+ TCP_CONNTRACK_TIME_WAIT,
+ TCP_CONNTRACK_CLOSE,
+ TCP_CONNTRACK_LISTEN,
+ TCP_CONNTRACK_MAX,
+ TCP_CONNTRACK_IGNORE
+};
+
+#define IP_CT_TCP_FLAG_WINDOW_SCALE 0x01
+
+#define IP_CT_TCP_FLAG_SACK_PERM 0x02
+
+#define IP_CT_TCP_FLAG_CLOSE_INIT 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 100644
index 0000000..f282543
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_TUPLE_COMMON_H
+#define _NF_CONNTRACK_TUPLE_COMMON_H
+
+enum ip_conntrack_dir
+{
+ IP_CT_DIR_ORIGINAL,
+ IP_CT_DIR_REPLY,
+ IP_CT_DIR_MAX
+};
+
+#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink.h
new file mode 100644
index 0000000..4544cab
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NFNETLINK_H
+#define _NFNETLINK_H
+#include <linux/types.h>
+
+#define NF_NETLINK_CONNTRACK_NEW 0x00000001
+#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
+#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004
+#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008
+#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010
+#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020
+
+enum nfnetlink_groups {
+ NFNLGRP_NONE,
+#define NFNLGRP_NONE NFNLGRP_NONE
+ NFNLGRP_CONNTRACK_NEW,
+#define NFNLGRP_CONNTRACK_NEW NFNLGRP_CONNTRACK_NEW
+ NFNLGRP_CONNTRACK_UPDATE,
+#define NFNLGRP_CONNTRACK_UPDATE NFNLGRP_CONNTRACK_UPDATE
+ NFNLGRP_CONNTRACK_DESTROY,
+#define NFNLGRP_CONNTRACK_DESTROY NFNLGRP_CONNTRACK_DESTROY
+ NFNLGRP_CONNTRACK_EXP_NEW,
+#define NFNLGRP_CONNTRACK_EXP_NEW NFNLGRP_CONNTRACK_EXP_NEW
+ NFNLGRP_CONNTRACK_EXP_UPDATE,
+#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
+ NFNLGRP_CONNTRACK_EXP_DESTROY,
+#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
+ __NFNLGRP_MAX,
+};
+#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
+
+struct nfattr
+{
+ u_int16_t nfa_len;
+ u_int16_t nfa_type;
+} __attribute__ ((packed));
+
+#define NFNL_NFA_NEST 0x8000
+#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
+
+#define NFA_ALIGNTO 4
+#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
+#define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && (nfa)->nfa_len <= (len))
+#define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
+#define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len))
+#define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len))
+#define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0)))
+#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
+#define NFA_NEST(skb, type) ({ struct nfattr *__start = (struct nfattr *) (skb)->tail; NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); __start; })
+#define NFA_NEST_END(skb, start) ({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); (skb)->len; })
+#define NFA_NEST_CANCEL(skb, start) ({ if (start) skb_trim(skb, (unsigned char *) (start) - (skb)->data); -1; })
+
+struct nfgenmsg {
+ u_int8_t nfgen_family;
+ u_int8_t version;
+ u_int16_t res_id;
+} __attribute__ ((packed));
+
+#define NFNETLINK_V0 0
+
+#define NFM_NFA(n) ((struct nfattr *)(((char *)(n)) + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+#define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+
+#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
+#define NFNL_MSG_TYPE(x) (x & 0x00ff)
+
+#define NFNL_SUBSYS_NONE 0
+#define NFNL_SUBSYS_CTNETLINK 1
+#define NFNL_SUBSYS_CTNETLINK_EXP 2
+#define NFNL_SUBSYS_QUEUE 3
+#define NFNL_SUBSYS_ULOG 4
+#define NFNL_SUBSYS_COUNT 5
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 100644
index 0000000..105dd09
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPCONNTRACK_NETLINK_H
+#define _IPCONNTRACK_NETLINK_H
+#include <linux/netfilter/nfnetlink.h>
+
+enum cntl_msg_types {
+ IPCTNL_MSG_CT_NEW,
+ IPCTNL_MSG_CT_GET,
+ IPCTNL_MSG_CT_DELETE,
+ IPCTNL_MSG_CT_GET_CTRZERO,
+
+ IPCTNL_MSG_MAX
+};
+
+enum ctnl_exp_msg_types {
+ IPCTNL_MSG_EXP_NEW,
+ IPCTNL_MSG_EXP_GET,
+ IPCTNL_MSG_EXP_DELETE,
+
+ IPCTNL_MSG_EXP_MAX
+};
+
+enum ctattr_type {
+ CTA_UNSPEC,
+ CTA_TUPLE_ORIG,
+ CTA_TUPLE_REPLY,
+ CTA_STATUS,
+ CTA_PROTOINFO,
+ CTA_HELP,
+ CTA_NAT_SRC,
+#define CTA_NAT CTA_NAT_SRC
+ CTA_TIMEOUT,
+ CTA_MARK,
+ CTA_COUNTERS_ORIG,
+ CTA_COUNTERS_REPLY,
+ CTA_USE,
+ CTA_ID,
+ CTA_NAT_DST,
+ __CTA_MAX
+};
+#define CTA_MAX (__CTA_MAX - 1)
+
+enum ctattr_tuple {
+ CTA_TUPLE_UNSPEC,
+ CTA_TUPLE_IP,
+ CTA_TUPLE_PROTO,
+ __CTA_TUPLE_MAX
+};
+#define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1)
+
+enum ctattr_ip {
+ CTA_IP_UNSPEC,
+ CTA_IP_V4_SRC,
+ CTA_IP_V4_DST,
+ CTA_IP_V6_SRC,
+ CTA_IP_V6_DST,
+ __CTA_IP_MAX
+};
+#define CTA_IP_MAX (__CTA_IP_MAX - 1)
+
+enum ctattr_l4proto {
+ CTA_PROTO_UNSPEC,
+ CTA_PROTO_NUM,
+ CTA_PROTO_SRC_PORT,
+ CTA_PROTO_DST_PORT,
+ CTA_PROTO_ICMP_ID,
+ CTA_PROTO_ICMP_TYPE,
+ CTA_PROTO_ICMP_CODE,
+ CTA_PROTO_ICMPV6_ID,
+ CTA_PROTO_ICMPV6_TYPE,
+ CTA_PROTO_ICMPV6_CODE,
+ __CTA_PROTO_MAX
+};
+#define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1)
+
+enum ctattr_protoinfo {
+ CTA_PROTOINFO_UNSPEC,
+ CTA_PROTOINFO_TCP,
+ __CTA_PROTOINFO_MAX
+};
+#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
+
+enum ctattr_protoinfo_tcp {
+ CTA_PROTOINFO_TCP_UNSPEC,
+ CTA_PROTOINFO_TCP_STATE,
+ __CTA_PROTOINFO_TCP_MAX
+};
+#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
+
+enum ctattr_counters {
+ CTA_COUNTERS_UNSPEC,
+ CTA_COUNTERS_PACKETS,
+ CTA_COUNTERS_BYTES,
+ CTA_COUNTERS32_PACKETS,
+ CTA_COUNTERS32_BYTES,
+ __CTA_COUNTERS_MAX
+};
+#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
+
+enum ctattr_nat {
+ CTA_NAT_UNSPEC,
+ CTA_NAT_MINIP,
+ CTA_NAT_MAXIP,
+ CTA_NAT_PROTO,
+ __CTA_NAT_MAX
+};
+#define CTA_NAT_MAX (__CTA_NAT_MAX - 1)
+
+enum ctattr_protonat {
+ CTA_PROTONAT_UNSPEC,
+ CTA_PROTONAT_PORT_MIN,
+ CTA_PROTONAT_PORT_MAX,
+ __CTA_PROTONAT_MAX
+};
+#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
+
+enum ctattr_expect {
+ CTA_EXPECT_UNSPEC,
+ CTA_EXPECT_MASTER,
+ CTA_EXPECT_TUPLE,
+ CTA_EXPECT_MASK,
+ CTA_EXPECT_TIMEOUT,
+ CTA_EXPECT_ID,
+ CTA_EXPECT_HELP_NAME,
+ __CTA_EXPECT_MAX
+};
+#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
+
+enum ctattr_help {
+ CTA_HELP_UNSPEC,
+ CTA_HELP_NAME,
+ __CTA_HELP_MAX
+};
+#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/x_tables.h
new file mode 100644
index 0000000..234181f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _X_TABLES_H
+#define _X_TABLES_H
+
+#define XT_FUNCTION_MAXNAMELEN 30
+#define XT_TABLE_MAXNAMELEN 32
+
+struct xt_entry_match
+{
+ union {
+ struct {
+ u_int16_t match_size;
+
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+ } user;
+ struct {
+ u_int16_t match_size;
+
+ struct xt_match *match;
+ } kernel;
+
+ u_int16_t match_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct xt_entry_target
+{
+ union {
+ struct {
+ u_int16_t target_size;
+
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+ } user;
+ struct {
+ u_int16_t target_size;
+
+ struct xt_target *target;
+ } kernel;
+
+ u_int16_t target_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct xt_standard_target
+{
+ struct xt_entry_target target;
+ int verdict;
+};
+
+struct xt_get_revision
+{
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+};
+
+#define XT_CONTINUE 0xFFFFFFFF
+
+#define XT_RETURN (-NF_REPEAT - 1)
+
+struct _xt_align
+{
+ u_int8_t u8;
+ u_int16_t u16;
+ u_int32_t u32;
+ u_int64_t u64;
+};
+
+#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & ~(__alignof__(struct _xt_align)-1))
+
+#define XT_STANDARD_TARGET ""
+
+#define XT_ERROR_TARGET "ERROR"
+
+#define XT_BASE_CTL 64
+
+#define XT_SO_SET_REPLACE (XT_BASE_CTL)
+#define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1)
+#define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS
+
+#define XT_SO_GET_INFO (XT_BASE_CTL)
+#define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1)
+#define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2)
+#define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3)
+#define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
+#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
+
+struct xt_counters
+{
+ u_int64_t pcnt, bcnt;
+};
+
+struct xt_counters_info
+{
+
+ char name[XT_TABLE_MAXNAMELEN];
+
+ unsigned int num_counters;
+
+ struct xt_counters counters[0];
+};
+
+#define XT_INV_PROTO 0x40
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 100644
index 0000000..1e9f61e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CLASSIFY_H
+#define _XT_CLASSIFY_H
+
+struct xt_classify_target_info {
+ u_int32_t priority;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 100644
index 0000000..5e16b2e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNSECMARK_H_target
+#define _XT_CONNSECMARK_H_target
+
+enum {
+ CONNSECMARK_SAVE = 1,
+ CONNSECMARK_RESTORE,
+};
+
+struct xt_connsecmark_target_info {
+ u_int8_t mode;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 100644
index 0000000..1f0cacb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_NFQ_TARGET_H
+#define _XT_NFQ_TARGET_H
+
+struct xt_NFQ_info {
+ u_int16_t queuenum;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 100644
index 0000000..a91d32c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_SECMARK_H_target
+#define _XT_SECMARK_H_target
+
+#define SECMARK_MODE_SEL 0x01
+#define SECMARK_SELCTX_MAX 256
+
+struct xt_secmark_target_selinux_info {
+ u_int32_t selsid;
+ char selctx[SECMARK_SELCTX_MAX];
+};
+
+struct xt_secmark_target_info {
+ u_int8_t mode;
+ union {
+ struct xt_secmark_target_selinux_info sel;
+ } u;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_comment.h
new file mode 100644
index 0000000..6ea26fc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_COMMENT_H
+#define _XT_COMMENT_H
+
+#define XT_MAX_COMMENT_LEN 256
+
+struct xt_comment_info {
+ unsigned char comment[XT_MAX_COMMENT_LEN];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
new file mode 100644
index 0000000..8cc80e1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNBYTES_H
+#define _XT_CONNBYTES_H
+
+enum xt_connbytes_what {
+ XT_CONNBYTES_PKTS,
+ XT_CONNBYTES_BYTES,
+ XT_CONNBYTES_AVGPKT,
+};
+
+enum xt_connbytes_direction {
+ XT_CONNBYTES_DIR_ORIGINAL,
+ XT_CONNBYTES_DIR_REPLY,
+ XT_CONNBYTES_DIR_BOTH,
+};
+
+struct xt_connbytes_info
+{
+ struct {
+ aligned_u64 from;
+ aligned_u64 to;
+ } count;
+ u_int8_t what;
+ u_int8_t direction;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
new file mode 100644
index 0000000..aa9bde2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNTRACK_H
+#define _XT_CONNTRACK_H
+
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+#include <linux/in.h>
+
+#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
+#define XT_CONNTRACK_STATE_INVALID (1 << 0)
+
+#define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
+#define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
+#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
+
+#define XT_CONNTRACK_STATE 0x01
+#define XT_CONNTRACK_PROTO 0x02
+#define XT_CONNTRACK_ORIGSRC 0x04
+#define XT_CONNTRACK_ORIGDST 0x08
+#define XT_CONNTRACK_REPLSRC 0x10
+#define XT_CONNTRACK_REPLDST 0x20
+#define XT_CONNTRACK_STATUS 0x40
+#define XT_CONNTRACK_EXPIRES 0x80
+
+struct ip_conntrack_old_tuple
+{
+ struct {
+ __u32 ip;
+ union {
+ __u16 all;
+ } u;
+ } src;
+
+ struct {
+ __u32 ip;
+ union {
+ __u16 all;
+ } u;
+
+ __u16 protonum;
+ } dst;
+};
+
+struct xt_conntrack_info
+{
+ unsigned int statemask, statusmask;
+
+ struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
+ struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
+
+ unsigned long expires_min, expires_max;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_dccp.h
new file mode 100644
index 0000000..8a10e67
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_DCCP_H_
+#define _XT_DCCP_H_
+
+#define XT_DCCP_SRC_PORTS 0x01
+#define XT_DCCP_DEST_PORTS 0x02
+#define XT_DCCP_TYPE 0x04
+#define XT_DCCP_OPTION 0x08
+
+#define XT_DCCP_VALID_FLAGS 0x0f
+
+struct xt_dccp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int16_t flags;
+ u_int16_t invflags;
+
+ u_int16_t typemask;
+ u_int8_t option;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_esp.h
new file mode 100644
index 0000000..175c47e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_ESP_H
+#define _XT_ESP_H
+
+struct xt_esp
+{
+ u_int32_t spis[2];
+ u_int8_t invflags;
+};
+
+#define XT_ESP_INV_SPI 0x01
+#define XT_ESP_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_helper.h
new file mode 100644
index 0000000..6ffa451
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_HELPER_H
+#define _XT_HELPER_H
+
+struct xt_helper_info {
+ int invert;
+ char name[30];
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_length.h
new file mode 100644
index 0000000..12db6c7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_LENGTH_H
+#define _XT_LENGTH_H
+
+struct xt_length_info {
+ u_int16_t min, max;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_limit.h
new file mode 100644
index 0000000..f9fb37f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_RATE_H
+#define _XT_RATE_H
+
+#define XT_LIMIT_SCALE 10000
+
+struct xt_rateinfo {
+ u_int32_t avg;
+ u_int32_t burst;
+
+ unsigned long prev;
+ u_int32_t credit;
+ u_int32_t credit_cap, cost;
+
+ struct xt_rateinfo *master;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_mac.h
new file mode 100644
index 0000000..2473aab
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_MAC_H
+#define _XT_MAC_H
+
+struct xt_mac_info {
+ unsigned char srcaddr[ETH_ALEN];
+ int invert;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_multiport.h
new file mode 100644
index 0000000..f17979a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_MULTIPORT_H
+#define _XT_MULTIPORT_H
+
+enum xt_multiport_flags
+{
+ XT_MULTIPORT_SOURCE,
+ XT_MULTIPORT_DESTINATION,
+ XT_MULTIPORT_EITHER
+};
+
+#define XT_MULTI_PORTS 15
+
+struct xt_multiport
+{
+ u_int8_t flags;
+ u_int8_t count;
+ u_int16_t ports[XT_MULTI_PORTS];
+};
+
+struct xt_multiport_v1
+{
+ u_int8_t flags;
+ u_int8_t count;
+ u_int16_t ports[XT_MULTI_PORTS];
+ u_int8_t pflags[XT_MULTI_PORTS];
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_physdev.h
new file mode 100644
index 0000000..d0ca032
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_PHYSDEV_H
+#define _XT_PHYSDEV_H
+
+#define XT_PHYSDEV_OP_IN 0x01
+#define XT_PHYSDEV_OP_OUT 0x02
+#define XT_PHYSDEV_OP_BRIDGED 0x04
+#define XT_PHYSDEV_OP_ISIN 0x08
+#define XT_PHYSDEV_OP_ISOUT 0x10
+#define XT_PHYSDEV_OP_MASK (0x20 - 1)
+
+struct xt_physdev_info {
+ char physindev[IFNAMSIZ];
+ char in_mask[IFNAMSIZ];
+ char physoutdev[IFNAMSIZ];
+ char out_mask[IFNAMSIZ];
+ u_int8_t invert;
+ u_int8_t bitmask;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
new file mode 100644
index 0000000..32527b8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_PKTTYPE_H
+#define _XT_PKTTYPE_H
+
+struct xt_pkttype_info {
+ int pkttype;
+ int invert;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_quota.h
new file mode 100644
index 0000000..d34752d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_QUOTA_H
+#define _XT_QUOTA_H
+
+enum xt_quota_flags {
+ XT_QUOTA_INVERT = 0x1,
+};
+#define XT_QUOTA_MASK 0x1
+
+struct xt_quota_info {
+ u_int32_t flags;
+ u_int32_t pad;
+ aligned_u64 quota;
+ struct xt_quota_info *master;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_realm.h
new file mode 100644
index 0000000..1a2a3cf
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_REALM_H
+#define _XT_REALM_H
+
+struct xt_realm_info {
+ u_int32_t id;
+ u_int32_t mask;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_sctp.h
new file mode 100644
index 0000000..f79c3b6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_SCTP_H_
+#define _XT_SCTP_H_
+
+#define XT_SCTP_SRC_PORTS 0x01
+#define XT_SCTP_DEST_PORTS 0x02
+#define XT_SCTP_CHUNK_TYPES 0x04
+
+#define XT_SCTP_VALID_FLAGS 0x07
+
+#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))
+
+struct xt_sctp_flag_info {
+ u_int8_t chunktype;
+ u_int8_t flag;
+ u_int8_t flag_mask;
+};
+
+#define XT_NUM_SCTP_FLAGS 4
+
+struct xt_sctp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int32_t chunkmap[256 / sizeof (u_int32_t)];
+
+#define SCTP_CHUNK_MATCH_ANY 0x01
+#define SCTP_CHUNK_MATCH_ALL 0x02
+#define SCTP_CHUNK_MATCH_ONLY 0x04
+
+ u_int32_t chunk_match_type;
+ struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS];
+ int flag_count;
+
+ u_int32_t flags;
+ u_int32_t invflags;
+};
+
+#define bytes(type) (sizeof(type) * 8)
+
+#define SCTP_CHUNKMAP_SET(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] |= 1 << (type % bytes(u_int32_t)); } while (0)
+
+#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] &= ~(1 << (type % bytes(u_int32_t))); } while (0)
+
+#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) ({ (chunkmap[type / bytes (u_int32_t)] & (1 << (type % bytes (u_int32_t)))) ? 1: 0; })
+
+#define SCTP_CHUNKMAP_RESET(chunkmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) chunkmap[i] = 0; } while (0)
+
+#define SCTP_CHUNKMAP_SET_ALL(chunkmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) chunkmap[i] = ~0; } while (0)
+
+#define SCTP_CHUNKMAP_COPY(destmap, srcmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) destmap[i] = srcmap[i]; } while (0)
+
+#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ELEMCOUNT(chunkmap); i++) { if (chunkmap[i]) { flag = 0; break; } } flag; })
+
+#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ELEMCOUNT(chunkmap); i++) { if (chunkmap[i] != ~0) { flag = 0; break; } } flag; })
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_state.h
new file mode 100644
index 0000000..6754776
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STATE_H
+#define _XT_STATE_H
+
+#define XT_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
+#define XT_STATE_INVALID (1 << 0)
+
+#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1))
+
+struct xt_state_info
+{
+ unsigned int statemask;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_statistic.h
new file mode 100644
index 0000000..999b0a1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STATISTIC_H
+#define _XT_STATISTIC_H
+
+enum xt_statistic_mode {
+ XT_STATISTIC_MODE_RANDOM,
+ XT_STATISTIC_MODE_NTH,
+ __XT_STATISTIC_MODE_MAX
+};
+#define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1)
+
+enum xt_statistic_flags {
+ XT_STATISTIC_INVERT = 0x1,
+};
+#define XT_STATISTIC_MASK 0x1
+
+struct xt_statistic_info {
+ u_int16_t mode;
+ u_int16_t flags;
+ union {
+ struct {
+ u_int32_t probability;
+ } random;
+ struct {
+ u_int32_t every;
+ u_int32_t packet;
+ u_int32_t count;
+ } nth;
+ } u;
+ struct xt_statistic_info *master __attribute__((aligned(8)));
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_string.h
new file mode 100644
index 0000000..a01018f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STRING_H
+#define _XT_STRING_H
+
+#define XT_STRING_MAX_PATTERN_SIZE 128
+#define XT_STRING_MAX_ALGO_NAME_SIZE 16
+
+struct xt_string_info
+{
+ u_int16_t from_offset;
+ u_int16_t to_offset;
+ char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
+ char pattern[XT_STRING_MAX_PATTERN_SIZE];
+ u_int8_t patlen;
+ u_int8_t invert;
+ struct ts_config __attribute__((aligned(8))) *config;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 100644
index 0000000..33de0ee
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_TCPMSS_MATCH_H
+#define _XT_TCPMSS_MATCH_H
+
+struct xt_tcpmss_match_info {
+ u_int16_t mss_min, mss_max;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 100644
index 0000000..476fffb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_TCPUDP_H
+#define _XT_TCPUDP_H
+
+struct xt_tcp
+{
+ u_int16_t spts[2];
+ u_int16_t dpts[2];
+ u_int8_t option;
+ u_int8_t flg_mask;
+ u_int8_t flg_cmp;
+ u_int8_t invflags;
+};
+
+#define XT_TCP_INV_SRCPT 0x01
+#define XT_TCP_INV_DSTPT 0x02
+#define XT_TCP_INV_FLAGS 0x04
+#define XT_TCP_INV_OPTION 0x08
+#define XT_TCP_INV_MASK 0x0F
+
+struct xt_udp
+{
+ u_int16_t spts[2];
+ u_int16_t dpts[2];
+ u_int8_t invflags;
+};
+
+#define XT_UDP_INV_SRCPT 0x01
+#define XT_UDP_INV_DSTPT 0x02
+#define XT_UDP_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp.h
new file mode 100644
index 0000000..08569db
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_ARP_NETFILTER_H
+#define __LINUX_ARP_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NF_ARP 0
+
+#define NF_ARP_IN 0
+#define NF_ARP_OUT 1
+#define NF_ARP_FORWARD 2
+#define NF_ARP_NUMHOOKS 3
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 100644
index 0000000..665a347
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1,159 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARPTABLES_H
+#define _ARPTABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_arp.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
+#define arpt_target xt_target
+#define arpt_table xt_table
+
+#define ARPT_DEV_ADDR_LEN_MAX 16
+
+struct arpt_devaddr_info {
+ char addr[ARPT_DEV_ADDR_LEN_MAX];
+ char mask[ARPT_DEV_ADDR_LEN_MAX];
+};
+
+struct arpt_arp {
+
+ struct in_addr src, tgt;
+
+ struct in_addr smsk, tmsk;
+
+ u_int8_t arhln, arhln_mask;
+ struct arpt_devaddr_info src_devaddr;
+ struct arpt_devaddr_info tgt_devaddr;
+
+ u_int16_t arpop, arpop_mask;
+
+ u_int16_t arhrd, arhrd_mask;
+ u_int16_t arpro, arpro_mask;
+
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int8_t flags;
+
+ u_int16_t invflags;
+};
+
+#define arpt_entry_target xt_entry_target
+#define arpt_standard_target xt_standard_target
+
+#define ARPT_F_MASK 0x00
+
+#define ARPT_INV_VIA_IN 0x0001
+#define ARPT_INV_VIA_OUT 0x0002
+#define ARPT_INV_SRCIP 0x0004
+#define ARPT_INV_TGTIP 0x0008
+#define ARPT_INV_SRCDEVADDR 0x0010
+#define ARPT_INV_TGTDEVADDR 0x0020
+#define ARPT_INV_ARPOP 0x0040
+#define ARPT_INV_ARPHRD 0x0080
+#define ARPT_INV_ARPPRO 0x0100
+#define ARPT_INV_ARPHLN 0x0200
+#define ARPT_INV_MASK 0x03FF
+
+struct arpt_entry
+{
+ struct arpt_arp arp;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define ARPT_CTL_OFFSET 32
+#define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
+#define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
+#define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
+#define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
+#define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
+
+#define ARPT_CONTINUE XT_CONTINUE
+
+#define ARPT_RETURN XT_RETURN
+
+struct arpt_getinfo
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_ARP_NUMHOOKS];
+
+ unsigned int underflow[NF_ARP_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct arpt_replace
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_ARP_NUMHOOKS];
+
+ unsigned int underflow[NF_ARP_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct arpt_entry entries[0];
+};
+
+#define arpt_counters_info xt_counters_info
+
+struct arpt_get_entries
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct arpt_entry entrytable[0];
+};
+
+#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define ARPT_ERROR_TARGET XT_ERROR_TARGET
+
+#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct arpt_entry *__entry; for (__i = 0; __i < (size); __i += __entry->next_offset) { __entry = (void *)(entries) + __i; __ret = fn(__entry , ## args); if (__ret != 0) break; } __ret; })
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_bridge.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_bridge.h
new file mode 100644
index 0000000..22cca55
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BRIDGE_NETFILTER_H
+#define __LINUX_BRIDGE_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NF_BR_PRE_ROUTING 0
+
+#define NF_BR_LOCAL_IN 1
+
+#define NF_BR_FORWARD 2
+
+#define NF_BR_LOCAL_OUT 3
+
+#define NF_BR_POST_ROUTING 4
+
+#define NF_BR_BROUTING 5
+#define NF_BR_NUMHOOKS 6
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4.h
new file mode 100644
index 0000000..17fd451
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IP_NETFILTER_H
+#define __LINUX_IP_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NFC_IP_SRC 0x0001
+
+#define NFC_IP_DST 0x0002
+
+#define NFC_IP_IF_IN 0x0004
+
+#define NFC_IP_IF_OUT 0x0008
+
+#define NFC_IP_TOS 0x0010
+
+#define NFC_IP_PROTO 0x0020
+
+#define NFC_IP_OPTIONS 0x0040
+
+#define NFC_IP_FRAG 0x0080
+
+#define NFC_IP_TCPFLAGS 0x0100
+
+#define NFC_IP_SRC_PT 0x0200
+
+#define NFC_IP_DST_PT 0x0400
+
+#define NFC_IP_PROTO_UNKNOWN 0x2000
+
+#define NF_IP_PRE_ROUTING 0
+
+#define NF_IP_LOCAL_IN 1
+
+#define NF_IP_FORWARD 2
+
+#define NF_IP_LOCAL_OUT 3
+
+#define NF_IP_POST_ROUTING 4
+#define NF_IP_NUMHOOKS 5
+
+enum nf_ip_hook_priorities {
+ NF_IP_PRI_FIRST = INT_MIN,
+ NF_IP_PRI_CONNTRACK_DEFRAG = -400,
+ NF_IP_PRI_RAW = -300,
+ NF_IP_PRI_SELINUX_FIRST = -225,
+ NF_IP_PRI_CONNTRACK = -200,
+ NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
+ NF_IP_PRI_MANGLE = -150,
+ NF_IP_PRI_NAT_DST = -100,
+ NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
+ NF_IP_PRI_FILTER = 0,
+ NF_IP_PRI_NAT_SRC = 100,
+ NF_IP_PRI_SELINUX_LAST = 225,
+ NF_IP_PRI_CONNTRACK_HELPER = INT_MAX - 2,
+ NF_IP_PRI_NAT_SEQ_ADJUST = INT_MAX - 1,
+ NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
+ NF_IP_PRI_LAST = INT_MAX,
+};
+
+#define SO_ORIGINAL_DST 80
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 100644
index 0000000..ef55a61
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_CONNTRACK_H
+#define _IP_CONNTRACK_H
+
+#include <linux/netfilter/nf_conntrack_common.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 100644
index 0000000..0c96baf
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_CONNTRACK_TUPLE_H
+#define _IP_CONNTRACK_TUPLE_H
+
+#include <linux/types.h>
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+
+union ip_conntrack_manip_proto
+{
+
+ u_int16_t all;
+
+ struct {
+ __be16 port;
+ } tcp;
+ struct {
+ u_int16_t port;
+ } udp;
+ struct {
+ u_int16_t id;
+ } icmp;
+ struct {
+ u_int16_t port;
+ } sctp;
+ struct {
+ __be16 key;
+ } gre;
+};
+
+struct ip_conntrack_manip
+{
+ u_int32_t ip;
+ union ip_conntrack_manip_proto u;
+};
+
+struct ip_conntrack_tuple
+{
+ struct ip_conntrack_manip src;
+
+ struct {
+ u_int32_t ip;
+ union {
+
+ u_int16_t all;
+
+ struct {
+ u_int16_t port;
+ } tcp;
+ struct {
+ u_int16_t port;
+ } udp;
+ struct {
+ u_int8_t type, code;
+ } icmp;
+ struct {
+ u_int16_t port;
+ } sctp;
+ struct {
+ __be16 key;
+ } gre;
+ } u;
+
+ u_int8_t protonum;
+
+ u_int8_t dir;
+ } dst;
+};
+
+#define IP_CT_TUPLE_U_BLANK(tuple) do { (tuple)->src.u.all = 0; (tuple)->dst.u.all = 0; } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 100644
index 0000000..7db9da3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_NAT_H
+#define _IP_NAT_H
+#include <linux/netfilter_ipv4.h>
+#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
+
+#define IP_NAT_MAPPING_TYPE_MAX_NAMELEN 16
+
+enum ip_nat_manip_type
+{
+ IP_NAT_MANIP_SRC,
+ IP_NAT_MANIP_DST
+};
+
+#define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
+
+#define IP_NAT_RANGE_MAP_IPS 1
+#define IP_NAT_RANGE_PROTO_SPECIFIED 2
+
+struct ip_nat_seq {
+
+ u_int32_t correction_pos;
+
+ int16_t offset_before, offset_after;
+};
+
+struct ip_nat_range
+{
+
+ unsigned int flags;
+
+ u_int32_t min_ip, max_ip;
+
+ union ip_conntrack_manip_proto min, max;
+};
+
+struct ip_nat_multi_range_compat
+{
+ unsigned int rangesize;
+
+ struct ip_nat_range range[1];
+};
+
+#define ip_nat_multi_range ip_nat_multi_range_compat
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 100644
index 0000000..b9db0b0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_NAT_RULE_H
+#define _IP_NAT_RULE_H
+#include <linux/netfilter_ipv4/ip_conntrack.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ip_nat.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 100644
index 0000000..5d17a54
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_QUEUE_H
+#define _IP_QUEUE_H
+
+#include <net/if.h>
+
+typedef struct ipq_packet_msg {
+ unsigned long packet_id;
+ unsigned long mark;
+ long timestamp_sec;
+ long timestamp_usec;
+ unsigned int hook;
+ char indev_name[IFNAMSIZ];
+ char outdev_name[IFNAMSIZ];
+ unsigned short hw_protocol;
+ unsigned short hw_type;
+ unsigned char hw_addrlen;
+ unsigned char hw_addr[8];
+ size_t data_len;
+ unsigned char payload[0];
+} ipq_packet_msg_t;
+
+typedef struct ipq_mode_msg {
+ unsigned char value;
+ size_t range;
+} ipq_mode_msg_t;
+
+typedef struct ipq_verdict_msg {
+ unsigned int value;
+ unsigned long id;
+ size_t data_len;
+ unsigned char payload[0];
+} ipq_verdict_msg_t;
+
+typedef struct ipq_peer_msg {
+ union {
+ ipq_verdict_msg_t verdict;
+ ipq_mode_msg_t mode;
+ } msg;
+} ipq_peer_msg_t;
+
+enum {
+ IPQ_COPY_NONE,
+ IPQ_COPY_META,
+ IPQ_COPY_PACKET
+};
+#define IPQ_COPY_MAX IPQ_COPY_PACKET
+
+#define IPQM_BASE 0x10
+#define IPQM_MODE (IPQM_BASE + 1)
+#define IPQM_VERDICT (IPQM_BASE + 2)
+#define IPQM_PACKET (IPQM_BASE + 3)
+#define IPQM_MAX (IPQM_BASE + 4)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 100644
index 0000000..aa48305
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPTABLES_H
+#define _IPTABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_ipv4.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define ipt_match xt_match
+#define ipt_target xt_target
+#define ipt_table xt_table
+#define ipt_get_revision xt_get_revision
+
+struct ipt_ip {
+
+ struct in_addr src, dst;
+
+ struct in_addr smsk, dmsk;
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int16_t proto;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+
+#define ipt_entry_match xt_entry_match
+#define ipt_entry_target xt_entry_target
+#define ipt_standard_target xt_standard_target
+
+#define ipt_counters xt_counters
+
+#define IPT_F_FRAG 0x01
+#define IPT_F_GOTO 0x02
+#define IPT_F_MASK 0x03
+
+#define IPT_INV_VIA_IN 0x01
+#define IPT_INV_VIA_OUT 0x02
+#define IPT_INV_TOS 0x04
+#define IPT_INV_SRCIP 0x08
+#define IPT_INV_DSTIP 0x10
+#define IPT_INV_FRAG 0x20
+#define IPT_INV_PROTO XT_INV_PROTO
+#define IPT_INV_MASK 0x7F
+
+struct ipt_entry
+{
+ struct ipt_ip ip;
+
+ unsigned int nfcache;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define IPT_BASE_CTL XT_BASE_CTL
+
+#define IPT_SO_SET_REPLACE XT_SO_SET_REPLACE
+#define IPT_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
+#define IPT_SO_SET_MAX XT_SO_SET_MAX
+
+#define IPT_SO_GET_INFO XT_SO_GET_INFO
+#define IPT_SO_GET_ENTRIES XT_SO_GET_ENTRIES
+#define IPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
+#define IPT_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
+#define IPT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define IPT_CONTINUE XT_CONTINUE
+#define IPT_RETURN XT_RETURN
+
+#include <linux/netfilter/xt_tcpudp.h>
+#define ipt_udp xt_udp
+#define ipt_tcp xt_tcp
+
+#define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT
+#define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT
+#define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS
+#define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION
+#define IPT_TCP_INV_MASK XT_TCP_INV_MASK
+
+#define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT
+#define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT
+#define IPT_UDP_INV_MASK XT_UDP_INV_MASK
+
+struct ipt_icmp
+{
+ u_int8_t type;
+ u_int8_t code[2];
+ u_int8_t invflags;
+};
+
+#define IPT_ICMP_INV 0x01
+
+struct ipt_getinfo
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_IP_NUMHOOKS];
+
+ unsigned int underflow[NF_IP_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct ipt_replace
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_IP_NUMHOOKS];
+
+ unsigned int underflow[NF_IP_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct ipt_entry entries[0];
+};
+
+#define ipt_counters_info xt_counters_info
+
+struct ipt_get_entries
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct ipt_entry entrytable[0];
+};
+
+#define IPT_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define IPT_ERROR_TARGET XT_ERROR_TARGET
+
+static __inline__ struct ipt_entry_target *
+ipt_get_target(struct ipt_entry *e)
+{
+ return (void *)e + e->target_offset;
+}
+
+#define IPT_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ipt_entry_match *__match; for (__i = sizeof(struct ipt_entry); __i < (e)->target_offset; __i += __match->u.match_size) { __match = (void *)(e) + __i; __ret = fn(__match , ## args); if (__ret != 0) break; } __ret; })
+
+#define IPT_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ipt_entry *__entry; for (__i = 0; __i < (size); __i += __entry->next_offset) { __entry = (void *)(entries) + __i; __ret = fn(__entry , ## args); if (__ret != 0) break; } __ret; })
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 100644
index 0000000..a738edd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_CLASSIFY_H
+#define _IPT_CLASSIFY_H
+
+#include <linux/netfilter/xt_CLASSIFY.h>
+#define ipt_classify_target_info xt_classify_target_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 100644
index 0000000..0271fb2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DSCP_TARGET_H
+#define _IPT_DSCP_TARGET_H
+#include <linux/netfilter_ipv4/ipt_dscp.h>
+
+struct ipt_DSCP_info {
+ u_int8_t dscp;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 100644
index 0000000..67c16fe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ECN_TARGET_H
+#define _IPT_ECN_TARGET_H
+#include <linux/netfilter_ipv4/ipt_DSCP.h>
+
+#define IPT_ECN_IP_MASK (~IPT_DSCP_MASK)
+
+#define IPT_ECN_OP_SET_IP 0x01
+#define IPT_ECN_OP_SET_ECE 0x10
+#define IPT_ECN_OP_SET_CWR 0x20
+
+#define IPT_ECN_OP_MASK 0xce
+
+struct ipt_ECN_info {
+ u_int8_t operation;
+ u_int8_t ip_ect;
+ union {
+ struct {
+ u_int8_t ece:1, cwr:1;
+ } tcp;
+ } proto;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 100644
index 0000000..dd6fd1b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_LOG_H
+#define _IPT_LOG_H
+
+#define IPT_LOG_TCPSEQ 0x01
+#define IPT_LOG_TCPOPT 0x02
+#define IPT_LOG_IPOPT 0x04
+#define IPT_LOG_UID 0x08
+#define IPT_LOG_NFLOG 0x10
+#define IPT_LOG_MASK 0x1f
+
+struct ipt_log_info {
+ unsigned char level;
+ unsigned char logflags;
+ char prefix[30];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 100644
index 0000000..27ac4a5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_NFQ_TARGET_H
+#define _IPT_NFQ_TARGET_H
+
+#include <linux/netfilter/xt_NFQUEUE.h>
+
+#define ipt_NFQ_info xt_NFQ_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 100644
index 0000000..d3c3965
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_REJECT_H
+#define _IPT_REJECT_H
+
+enum ipt_reject_with {
+ IPT_ICMP_NET_UNREACHABLE,
+ IPT_ICMP_HOST_UNREACHABLE,
+ IPT_ICMP_PROT_UNREACHABLE,
+ IPT_ICMP_PORT_UNREACHABLE,
+ IPT_ICMP_ECHOREPLY,
+ IPT_ICMP_NET_PROHIBITED,
+ IPT_ICMP_HOST_PROHIBITED,
+ IPT_TCP_RESET,
+ IPT_ICMP_ADMIN_PROHIBITED
+};
+
+struct ipt_reject_info {
+ enum ipt_reject_with with;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 100644
index 0000000..e924f37
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TCPMSS_H
+#define _IPT_TCPMSS_H
+
+struct ipt_tcpmss_info {
+ u_int16_t mss;
+};
+
+#define IPT_TCPMSS_CLAMP_PMTU 0xffff
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 100644
index 0000000..1cc2116
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TOS_H_target
+#define _IPT_TOS_H_target
+
+#ifndef IPTOS_NORMALSVC
+#define IPTOS_NORMALSVC 0
+#endif
+
+struct ipt_tos_target_info {
+ u_int8_t tos;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 100644
index 0000000..f9e98af
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TTL_H
+#define _IPT_TTL_H
+
+enum {
+ IPT_TTL_SET = 0,
+ IPT_TTL_INC,
+ IPT_TTL_DEC
+};
+
+#define IPT_TTL_MAXMODE IPT_TTL_DEC
+
+struct ipt_TTL_info {
+ u_int8_t mode;
+ u_int8_t ttl;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 100644
index 0000000..9511cb8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ULOG_H
+#define _IPT_ULOG_H
+
+#ifndef NETLINK_NFLOG
+#define NETLINK_NFLOG 5
+#endif
+
+#define ULOG_DEFAULT_NLGROUP 1
+#define ULOG_DEFAULT_QTHRESHOLD 1
+
+#define ULOG_MAC_LEN 80
+#define ULOG_PREFIX_LEN 32
+
+#define ULOG_MAX_QLEN 50
+
+struct ipt_ulog_info {
+ unsigned int nl_group;
+ size_t copy_range;
+ size_t qthreshold;
+ char prefix[ULOG_PREFIX_LEN];
+};
+
+typedef struct ulog_packet_msg {
+ unsigned long mark;
+ long timestamp_sec;
+ long timestamp_usec;
+ unsigned int hook;
+ char indev_name[IFNAMSIZ];
+ char outdev_name[IFNAMSIZ];
+ size_t data_len;
+ char prefix[ULOG_PREFIX_LEN];
+ unsigned char mac_len;
+ unsigned char mac[ULOG_MAC_LEN];
+ unsigned char payload[0];
+} ulog_packet_msg_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 100644
index 0000000..5203b32
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ADDRTYPE_H
+#define _IPT_ADDRTYPE_H
+
+struct ipt_addrtype_info {
+ u_int16_t source;
+ u_int16_t dest;
+ u_int32_t invert_source;
+ u_int32_t invert_dest;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 100644
index 0000000..11983e2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_AH_H
+#define _IPT_AH_H
+
+struct ipt_ah
+{
+ u_int32_t spis[2];
+ u_int8_t invflags;
+};
+
+#define IPT_AH_INV_SPI 0x01
+#define IPT_AH_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 100644
index 0000000..dbd7507
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_COMMENT_H
+#define _IPT_COMMENT_H
+
+#include <linux/netfilter/xt_comment.h>
+
+#define IPT_MAX_COMMENT_LEN XT_MAX_COMMENT_LEN
+
+#define ipt_comment_info xt_comment_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 100644
index 0000000..8ae19c5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_CONNBYTES_H
+#define _IPT_CONNBYTES_H
+
+#include <linux/netfilter/xt_connbytes.h>
+#define ipt_connbytes_what xt_connbytes_what
+
+#define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS
+#define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES
+#define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT
+
+#define ipt_connbytes_direction xt_connbytes_direction
+#define IPT_CONNBYTES_DIR_ORIGINAL XT_CONNBYTES_DIR_ORIGINAL
+#define IPT_CONNBYTES_DIR_REPLY XT_CONNBYTES_DIR_REPLY
+#define IPT_CONNBYTES_DIR_BOTH XT_CONNBYTES_DIR_BOTH
+
+#define ipt_connbytes_info xt_connbytes_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 100644
index 0000000..c1212c9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DCCP_H_
+#define _IPT_DCCP_H_
+
+#include <linux/netfilter/xt_dccp.h>
+#define IPT_DCCP_SRC_PORTS XT_DCCP_SRC_PORTS
+#define IPT_DCCP_DEST_PORTS XT_DCCP_DEST_PORTS
+#define IPT_DCCP_TYPE XT_DCCP_TYPE
+#define IPT_DCCP_OPTION XT_DCCP_OPTION
+
+#define IPT_DCCP_VALID_FLAGS XT_DCCP_VALID_FLAGS
+
+#define ipt_dccp_info xt_dccp_info
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 100644
index 0000000..aba8861
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DSCP_H
+#define _IPT_DSCP_H
+
+#define IPT_DSCP_MASK 0xfc
+#define IPT_DSCP_SHIFT 2
+#define IPT_DSCP_MAX 0x3f
+
+struct ipt_dscp_info {
+ u_int8_t dscp;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 100644
index 0000000..4947e7e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ESP_H
+#define _IPT_ESP_H
+
+#include <linux/netfilter/xt_esp.h>
+
+#define ipt_esp xt_esp
+#define IPT_ESP_INV_SPI XT_ESP_INV_SPI
+#define IPT_ESP_INV_MASK XT_ESP_INV_MASK
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 100644
index 0000000..adc1f41
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_HASHLIMIT_H
+#define _IPT_HASHLIMIT_H
+
+#define IPT_HASHLIMIT_SCALE 10000
+
+struct ipt_hashlimit_htable;
+
+#define IPT_HASHLIMIT_HASH_DIP 0x0001
+#define IPT_HASHLIMIT_HASH_DPT 0x0002
+#define IPT_HASHLIMIT_HASH_SIP 0x0004
+#define IPT_HASHLIMIT_HASH_SPT 0x0008
+
+struct hashlimit_cfg {
+ u_int32_t mode;
+ u_int32_t avg;
+ u_int32_t burst;
+
+ u_int32_t size;
+ u_int32_t max;
+ u_int32_t gc_interval;
+ u_int32_t expire;
+};
+
+struct ipt_hashlimit_info {
+ char name [IFNAMSIZ];
+ struct hashlimit_cfg cfg;
+ struct ipt_hashlimit_htable *hinfo;
+
+ union {
+ void *ptr;
+ struct ipt_hashlimit_info *master;
+ } u;
+};
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 100644
index 0000000..576add9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_HELPER_H
+#define _IPT_HELPER_H
+
+#include <linux/netfilter/xt_helper.h>
+#define ipt_helper_info xt_helper_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 100644
index 0000000..b4dd603
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_IPRANGE_H
+#define _IPT_IPRANGE_H
+
+#define IPRANGE_SRC 0x01
+#define IPRANGE_DST 0x02
+#define IPRANGE_SRC_INV 0x10
+#define IPRANGE_DST_INV 0x20
+
+struct ipt_iprange {
+
+ u_int32_t min_ip, max_ip;
+};
+
+struct ipt_iprange_info
+{
+ struct ipt_iprange src;
+ struct ipt_iprange dst;
+
+ u_int8_t flags;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 100644
index 0000000..9610859
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_LENGTH_H
+#define _IPT_LENGTH_H
+
+#include <linux/netfilter/xt_length.h>
+#define ipt_length_info xt_length_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 100644
index 0000000..89378a3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_MAC_H
+#define _IPT_MAC_H
+
+#include <linux/netfilter/xt_mac.h>
+#define ipt_mac_info xt_mac_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 100644
index 0000000..8b742b1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_OWNER_H
+#define _IPT_OWNER_H
+
+#define IPT_OWNER_UID 0x01
+#define IPT_OWNER_GID 0x02
+#define IPT_OWNER_PID 0x04
+#define IPT_OWNER_SID 0x08
+#define IPT_OWNER_COMM 0x10
+
+struct ipt_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ char comm[16];
+ u_int8_t match, invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 100644
index 0000000..791cf02
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_PHYSDEV_H
+#define _IPT_PHYSDEV_H
+
+#include <linux/netfilter/xt_physdev.h>
+
+#define IPT_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
+#define IPT_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
+#define IPT_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
+#define IPT_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
+#define IPT_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
+#define IPT_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
+
+#define ipt_physdev_info xt_physdev_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 100644
index 0000000..fbb20b1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_PKTTYPE_H
+#define _IPT_PKTTYPE_H
+
+#include <linux/netfilter/xt_pkttype.h>
+#define ipt_pkttype_info xt_pkttype_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 100644
index 0000000..9b80faa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_REALM_H
+#define _IPT_REALM_H
+
+#include <linux/netfilter/xt_realm.h>
+#define ipt_realm_info xt_realm_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 100644
index 0000000..45172bd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_RECENT_H
+#define _IPT_RECENT_H
+
+#define RECENT_NAME "ipt_recent"
+#define RECENT_VER "v0.3.1"
+
+#define IPT_RECENT_CHECK 1
+#define IPT_RECENT_SET 2
+#define IPT_RECENT_UPDATE 4
+#define IPT_RECENT_REMOVE 8
+#define IPT_RECENT_TTL 16
+
+#define IPT_RECENT_SOURCE 0
+#define IPT_RECENT_DEST 1
+
+#define IPT_RECENT_NAME_LEN 200
+
+struct ipt_recent_info {
+ u_int32_t seconds;
+ u_int32_t hit_count;
+ u_int8_t check_set;
+ u_int8_t invert;
+ char name[IPT_RECENT_NAME_LEN];
+ u_int8_t side;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 100644
index 0000000..20f301f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_SCTP_H_
+#define _IPT_SCTP_H_
+
+#define IPT_SCTP_SRC_PORTS 0x01
+#define IPT_SCTP_DEST_PORTS 0x02
+#define IPT_SCTP_CHUNK_TYPES 0x04
+
+#define IPT_SCTP_VALID_FLAGS 0x07
+
+struct ipt_sctp_flag_info {
+ u_int8_t chunktype;
+ u_int8_t flag;
+ u_int8_t flag_mask;
+};
+
+#define IPT_NUM_SCTP_FLAGS 4
+
+struct ipt_sctp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int32_t chunkmap[256 / sizeof (u_int32_t)];
+
+#define SCTP_CHUNK_MATCH_ANY 0x01
+#define SCTP_CHUNK_MATCH_ALL 0x02
+#define SCTP_CHUNK_MATCH_ONLY 0x04
+
+ u_int32_t chunk_match_type;
+ struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS];
+ int flag_count;
+
+ u_int32_t flags;
+ u_int32_t invflags;
+};
+
+#define bytes(type) (sizeof(type) * 8)
+
+#define SCTP_CHUNKMAP_SET(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] |= 1 << (type % bytes(u_int32_t)); } while (0)
+
+#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] &= ~(1 << (type % bytes(u_int32_t))); } while (0)
+
+#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) ({ (chunkmap[type / bytes (u_int32_t)] & (1 << (type % bytes (u_int32_t)))) ? 1: 0; })
+
+#define SCTP_CHUNKMAP_RESET(chunkmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) chunkmap[i] = 0; } while (0)
+
+#define SCTP_CHUNKMAP_SET_ALL(chunkmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) chunkmap[i] = ~0; } while (0)
+
+#define SCTP_CHUNKMAP_COPY(destmap, srcmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) destmap[i] = srcmap[i]; } while (0)
+
+#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { if (chunkmap[i]) { flag = 0; break; } } flag; })
+
+#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { if (chunkmap[i] != ~0) { flag = 0; break; } } flag; })
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 100644
index 0000000..bd51990
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_STATE_H
+#define _IPT_STATE_H
+
+#include <linux/netfilter/xt_state.h>
+
+#define IPT_STATE_BIT XT_STATE_BIT
+#define IPT_STATE_INVALID XT_STATE_INVALID
+
+#define IPT_STATE_UNTRACKED XT_STATE_UNTRACKED
+
+#define ipt_state_info xt_state_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 100644
index 0000000..60923dd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_STRING_H
+#define _IPT_STRING_H
+
+#include <linux/netfilter/xt_string.h>
+
+#define IPT_STRING_MAX_PATTERN_SIZE XT_STRING_MAX_PATTERN_SIZE
+#define IPT_STRING_MAX_ALGO_NAME_SIZE XT_STRING_MAX_ALGO_NAME_SIZE
+#define ipt_string_info xt_string_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 100644
index 0000000..789ce22
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TOS_H
+#define _IPT_TOS_H
+
+struct ipt_tos_info {
+ u_int8_t tos;
+ u_int8_t invert;
+};
+
+#ifndef IPTOS_NORMALSVC
+#define IPTOS_NORMALSVC 0
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6.h
new file mode 100644
index 0000000..0d68cd9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IP6_NETFILTER_H
+#define __LINUX_IP6_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NFC_IP6_SRC 0x0001
+
+#define NFC_IP6_DST 0x0002
+
+#define NFC_IP6_IF_IN 0x0004
+
+#define NFC_IP6_IF_OUT 0x0008
+
+#define NFC_IP6_TOS 0x0010
+
+#define NFC_IP6_PROTO 0x0020
+
+#define NFC_IP6_OPTIONS 0x0040
+
+#define NFC_IP6_FRAG 0x0080
+
+#define NFC_IP6_TCPFLAGS 0x0100
+
+#define NFC_IP6_SRC_PT 0x0200
+
+#define NFC_IP6_DST_PT 0x0400
+
+#define NFC_IP6_PROTO_UNKNOWN 0x2000
+
+#define NF_IP6_PRE_ROUTING 0
+
+#define NF_IP6_LOCAL_IN 1
+
+#define NF_IP6_FORWARD 2
+
+#define NF_IP6_LOCAL_OUT 3
+
+#define NF_IP6_POST_ROUTING 4
+#define NF_IP6_NUMHOOKS 5
+
+enum nf_ip6_hook_priorities {
+ NF_IP6_PRI_FIRST = INT_MIN,
+ NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
+ NF_IP6_PRI_SELINUX_FIRST = -225,
+ NF_IP6_PRI_CONNTRACK = -200,
+ NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
+ NF_IP6_PRI_MANGLE = -150,
+ NF_IP6_PRI_NAT_DST = -100,
+ NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
+ NF_IP6_PRI_FILTER = 0,
+ NF_IP6_PRI_NAT_SRC = 100,
+ NF_IP6_PRI_SELINUX_LAST = 225,
+ NF_IP6_PRI_LAST = INT_MAX,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 100644
index 0000000..1687e4f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1,178 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6_TABLES_H
+#define _IP6_TABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_ipv6.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
+
+#define ip6t_match xt_match
+#define ip6t_target xt_target
+#define ip6t_table xt_table
+#define ip6t_get_revision xt_get_revision
+
+struct ip6t_ip6 {
+
+ struct in6_addr src, dst;
+
+ struct in6_addr smsk, dmsk;
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int16_t proto;
+
+ u_int8_t tos;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+
+#define ip6t_entry_match xt_entry_match
+#define ip6t_entry_target xt_entry_target
+#define ip6t_standard_target xt_standard_target
+
+#define ip6t_counters xt_counters
+
+#define IP6T_F_PROTO 0x01
+#define IP6T_F_TOS 0x02
+#define IP6T_F_GOTO 0x04
+#define IP6T_F_MASK 0x07
+
+#define IP6T_INV_VIA_IN 0x01
+#define IP6T_INV_VIA_OUT 0x02
+#define IP6T_INV_TOS 0x04
+#define IP6T_INV_SRCIP 0x08
+#define IP6T_INV_DSTIP 0x10
+#define IP6T_INV_FRAG 0x20
+#define IP6T_INV_PROTO XT_INV_PROTO
+#define IP6T_INV_MASK 0x7F
+
+struct ip6t_entry
+{
+ struct ip6t_ip6 ipv6;
+
+ unsigned int nfcache;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define IP6T_BASE_CTL XT_BASE_CTL
+
+#define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE
+#define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
+#define IP6T_SO_SET_MAX XT_SO_SET_MAX
+
+#define IP6T_SO_GET_INFO XT_SO_GET_INFO
+#define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES
+#define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
+#define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
+#define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define IP6T_CONTINUE XT_CONTINUE
+
+#define IP6T_RETURN XT_RETURN
+
+#include <linux/netfilter/xt_tcpudp.h>
+
+#define ip6t_tcp xt_tcp
+#define ip6t_udp xt_udp
+
+#define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT
+#define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT
+#define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS
+#define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION
+#define IP6T_TCP_INV_MASK XT_TCP_INV_MASK
+
+#define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT
+#define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT
+#define IP6T_UDP_INV_MASK XT_UDP_INV_MASK
+
+struct ip6t_icmp
+{
+ u_int8_t type;
+ u_int8_t code[2];
+ u_int8_t invflags;
+};
+
+#define IP6T_ICMP_INV 0x01
+
+struct ip6t_getinfo
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct ip6t_replace
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct ip6t_entry entries[0];
+};
+
+#define ip6t_counters_info xt_counters_info
+
+struct ip6t_get_entries
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct ip6t_entry entrytable[0];
+};
+
+#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define IP6T_ERROR_TARGET XT_ERROR_TARGET
+
+#define IP6T_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry_match *__m; for (__i = sizeof(struct ip6t_entry); __i < (e)->target_offset; __i += __m->u.match_size) { __m = (void *)(e) + __i; __ret = fn(__m , ## args); if (__ret != 0) break; } __ret; })
+#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry *__e; for (__i = 0; __i < (size); __i += __e->next_offset) { __e = (void *)(entries) + __i; __ret = fn(__e , ## args); if (__ret != 0) break; } __ret; })
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 100644
index 0000000..344c133
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_LOG_H
+#define _IP6T_LOG_H
+
+#define IP6T_LOG_TCPSEQ 0x01
+#define IP6T_LOG_TCPOPT 0x02
+#define IP6T_LOG_IPOPT 0x04
+#define IP6T_LOG_UID 0x08
+#define IP6T_LOG_NFLOG 0x10
+#define IP6T_LOG_MASK 0x1f
+
+struct ip6t_log_info {
+ unsigned char level;
+ unsigned char logflags;
+ char prefix[30];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 100644
index 0000000..b101c85
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_REJECT_H
+#define _IP6T_REJECT_H
+
+enum ip6t_reject_with {
+ IP6T_ICMP6_NO_ROUTE,
+ IP6T_ICMP6_ADM_PROHIBITED,
+ IP6T_ICMP6_NOT_NEIGHBOUR,
+ IP6T_ICMP6_ADDR_UNREACH,
+ IP6T_ICMP6_PORT_UNREACH,
+ IP6T_ICMP6_ECHOREPLY,
+ IP6T_TCP_RESET
+};
+
+struct ip6t_reject_info {
+ u_int32_t with;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 100644
index 0000000..7110df5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_AH_H
+#define _IP6T_AH_H
+
+struct ip6t_ah
+{
+ u_int32_t spis[2];
+ u_int32_t hdrlen;
+ u_int8_t hdrres;
+ u_int8_t invflags;
+};
+
+#define IP6T_AH_SPI 0x01
+#define IP6T_AH_LEN 0x02
+#define IP6T_AH_RES 0x04
+
+#define IP6T_AH_INV_SPI 0x01
+#define IP6T_AH_INV_LEN 0x02
+#define IP6T_AH_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 100644
index 0000000..0aa7556
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_ESP_H
+#define _IP6T_ESP_H
+
+#include <linux/netfilter/xt_esp.h>
+
+#define ip6t_esp xt_esp
+#define IP6T_ESP_INV_SPI XT_ESP_INV_SPI
+#define IP6T_ESP_INV_MASK XT_ESP_INV_MASK
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 100644
index 0000000..134d6bb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_FRAG_H
+#define _IP6T_FRAG_H
+
+struct ip6t_frag
+{
+ u_int32_t ids[2];
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+};
+
+#define IP6T_FRAG_IDS 0x01
+#define IP6T_FRAG_LEN 0x02
+#define IP6T_FRAG_RES 0x04
+#define IP6T_FRAG_FST 0x08
+#define IP6T_FRAG_MF 0x10
+#define IP6T_FRAG_NMF 0x20
+
+#define IP6T_FRAG_INV_IDS 0x01
+#define IP6T_FRAG_INV_LEN 0x02
+#define IP6T_FRAG_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 100644
index 0000000..7e83ebc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __IPV6HEADER_H
+#define __IPV6HEADER_H
+
+struct ip6t_ipv6header_info
+{
+ u_int8_t matchflags;
+ u_int8_t invflags;
+ u_int8_t modeflag;
+};
+
+#define MASK_HOPOPTS 128
+#define MASK_DSTOPTS 64
+#define MASK_ROUTING 32
+#define MASK_FRAGMENT 16
+#define MASK_AH 8
+#define MASK_ESP 4
+#define MASK_NONE 2
+#define MASK_PROTO 1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 100644
index 0000000..fdc4c5f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_LENGTH_H
+#define _IP6T_LENGTH_H
+
+#include <linux/netfilter/xt_length.h>
+#define ip6t_length_info xt_length_info
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 100644
index 0000000..58e6023
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_MAC_H
+#define _IP6T_MAC_H
+
+#include <linux/netfilter/xt_mac.h>
+#define ip6t_mac_info xt_mac_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 100644
index 0000000..1d9db9c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_OPTS_H
+#define _IP6T_OPTS_H
+
+#define IP6T_OPTS_OPTSNR 16
+
+struct ip6t_opts
+{
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+ u_int16_t opts[IP6T_OPTS_OPTSNR];
+ u_int8_t optsnr;
+};
+
+#define IP6T_OPTS_LEN 0x01
+#define IP6T_OPTS_OPTS 0x02
+#define IP6T_OPTS_NSTRICT 0x04
+
+#define IP6T_OPTS_INV_LEN 0x01
+#define IP6T_OPTS_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 100644
index 0000000..a6126b4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_OWNER_H
+#define _IP6T_OWNER_H
+
+#define IP6T_OWNER_UID 0x01
+#define IP6T_OWNER_GID 0x02
+#define IP6T_OWNER_PID 0x04
+#define IP6T_OWNER_SID 0x08
+
+struct ip6t_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ u_int8_t match, invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 100644
index 0000000..657e2fb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_PHYSDEV_H
+#define _IP6T_PHYSDEV_H
+
+#include <linux/netfilter/xt_physdev.h>
+
+#define IP6T_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
+#define IP6T_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
+#define IP6T_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
+#define IP6T_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
+#define IP6T_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
+#define IP6T_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
+
+#define ip6t_physdev_info xt_physdev_info
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 100644
index 0000000..274a7ee
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_RT_H
+#define _IP6T_RT_H
+
+#define IP6T_RT_HOPS 16
+
+struct ip6t_rt
+{
+ u_int32_t rt_type;
+ u_int32_t segsleft[2];
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+ struct in6_addr addrs[IP6T_RT_HOPS];
+ u_int8_t addrnr;
+};
+
+#define IP6T_RT_TYP 0x01
+#define IP6T_RT_SGS 0x02
+#define IP6T_RT_LEN 0x04
+#define IP6T_RT_RES 0x08
+#define IP6T_RT_FST_MASK 0x30
+#define IP6T_RT_FST 0x10
+#define IP6T_RT_FST_NSTRICT 0x20
+
+#define IP6T_RT_INV_TYP 0x01
+#define IP6T_RT_INV_SGS 0x02
+#define IP6T_RT_INV_LEN 0x04
+#define IP6T_RT_INV_MASK 0x07
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/netlink.h b/6/platforms/android-3/arch-arm/usr/include/linux/netlink.h
new file mode 100644
index 0000000..b6f1c06
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/netlink.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NETLINK_H
+#define __LINUX_NETLINK_H
+
+#include <linux/socket.h>
+#include <linux/types.h>
+
+#define NETLINK_ROUTE 0
+#define NETLINK_UNUSED 1
+#define NETLINK_USERSOCK 2
+#define NETLINK_FIREWALL 3
+#define NETLINK_INET_DIAG 4
+#define NETLINK_NFLOG 5
+#define NETLINK_XFRM 6
+#define NETLINK_SELINUX 7
+#define NETLINK_ISCSI 8
+#define NETLINK_AUDIT 9
+#define NETLINK_FIB_LOOKUP 10
+#define NETLINK_CONNECTOR 11
+#define NETLINK_NETFILTER 12
+#define NETLINK_IP6_FW 13
+#define NETLINK_DNRTMSG 14
+#define NETLINK_KOBJECT_UEVENT 15
+#define NETLINK_GENERIC 16
+
+#define MAX_LINKS 32
+
+struct sockaddr_nl
+{
+ sa_family_t nl_family;
+ unsigned short nl_pad;
+ __u32 nl_pid;
+ __u32 nl_groups;
+};
+
+struct nlmsghdr
+{
+ __u32 nlmsg_len;
+ __u16 nlmsg_type;
+ __u16 nlmsg_flags;
+ __u32 nlmsg_seq;
+ __u32 nlmsg_pid;
+};
+
+#define NLM_F_REQUEST 1
+#define NLM_F_MULTI 2
+#define NLM_F_ACK 4
+#define NLM_F_ECHO 8
+
+#define NLM_F_ROOT 0x100
+#define NLM_F_MATCH 0x200
+#define NLM_F_ATOMIC 0x400
+#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)
+
+#define NLM_F_REPLACE 0x100
+#define NLM_F_EXCL 0x200
+#define NLM_F_CREATE 0x400
+#define NLM_F_APPEND 0x800
+
+#define NLMSG_ALIGNTO 4
+#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
+#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
+#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
+#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
+#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
+#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
+#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len))
+#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
+
+#define NLMSG_NOOP 0x1
+#define NLMSG_ERROR 0x2
+#define NLMSG_DONE 0x3
+#define NLMSG_OVERRUN 0x4
+
+#define NLMSG_MIN_TYPE 0x10
+
+struct nlmsgerr
+{
+ int error;
+ struct nlmsghdr msg;
+};
+
+#define NETLINK_ADD_MEMBERSHIP 1
+#define NETLINK_DROP_MEMBERSHIP 2
+#define NETLINK_PKTINFO 3
+
+struct nl_pktinfo
+{
+ __u32 group;
+};
+
+#define NET_MAJOR 36
+
+enum {
+ NETLINK_UNCONNECTED = 0,
+ NETLINK_CONNECTED,
+};
+
+struct nlattr
+{
+ __u16 nla_len;
+ __u16 nla_type;
+};
+
+#define NLA_ALIGNTO 4
+#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
+#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfs.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfs.h
new file mode 100644
index 0000000..d94dc9f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfs.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS_H
+#define _LINUX_NFS_H
+
+#define NFS_PROGRAM 100003
+#define NFS_PORT 2049
+#define NFS_MAXDATA 8192
+#define NFS_MAXPATHLEN 1024
+#define NFS_MAXNAMLEN 255
+#define NFS_MAXGROUPS 16
+#define NFS_FHSIZE 32
+#define NFS_COOKIESIZE 4
+#define NFS_FIFO_DEV (-1)
+#define NFSMODE_FMT 0170000
+#define NFSMODE_DIR 0040000
+#define NFSMODE_CHR 0020000
+#define NFSMODE_BLK 0060000
+#define NFSMODE_REG 0100000
+#define NFSMODE_LNK 0120000
+#define NFSMODE_SOCK 0140000
+#define NFSMODE_FIFO 0010000
+
+#define NFS_MNT_PROGRAM 100005
+#define NFS_MNT_PORT 627
+
+ enum nfs_stat {
+ NFS_OK = 0,
+ NFSERR_PERM = 1,
+ NFSERR_NOENT = 2,
+ NFSERR_IO = 5,
+ NFSERR_NXIO = 6,
+ NFSERR_EAGAIN = 11,
+ NFSERR_ACCES = 13,
+ NFSERR_EXIST = 17,
+ NFSERR_XDEV = 18,
+ NFSERR_NODEV = 19,
+ NFSERR_NOTDIR = 20,
+ NFSERR_ISDIR = 21,
+ NFSERR_INVAL = 22,
+ NFSERR_FBIG = 27,
+ NFSERR_NOSPC = 28,
+ NFSERR_ROFS = 30,
+ NFSERR_MLINK = 31,
+ NFSERR_OPNOTSUPP = 45,
+ NFSERR_NAMETOOLONG = 63,
+ NFSERR_NOTEMPTY = 66,
+ NFSERR_DQUOT = 69,
+ NFSERR_STALE = 70,
+ NFSERR_REMOTE = 71,
+ NFSERR_WFLUSH = 99,
+ NFSERR_BADHANDLE = 10001,
+ NFSERR_NOT_SYNC = 10002,
+ NFSERR_BAD_COOKIE = 10003,
+ NFSERR_NOTSUPP = 10004,
+ NFSERR_TOOSMALL = 10005,
+ NFSERR_SERVERFAULT = 10006,
+ NFSERR_BADTYPE = 10007,
+ NFSERR_JUKEBOX = 10008,
+ NFSERR_SAME = 10009,
+ NFSERR_DENIED = 10010,
+ NFSERR_EXPIRED = 10011,
+ NFSERR_LOCKED = 10012,
+ NFSERR_GRACE = 10013,
+ NFSERR_FHEXPIRED = 10014,
+ NFSERR_SHARE_DENIED = 10015,
+ NFSERR_WRONGSEC = 10016,
+ NFSERR_CLID_INUSE = 10017,
+ NFSERR_RESOURCE = 10018,
+ NFSERR_MOVED = 10019,
+ NFSERR_NOFILEHANDLE = 10020,
+ NFSERR_MINOR_VERS_MISMATCH = 10021,
+ NFSERR_STALE_CLIENTID = 10022,
+ NFSERR_STALE_STATEID = 10023,
+ NFSERR_OLD_STATEID = 10024,
+ NFSERR_BAD_STATEID = 10025,
+ NFSERR_BAD_SEQID = 10026,
+ NFSERR_NOT_SAME = 10027,
+ NFSERR_LOCK_RANGE = 10028,
+ NFSERR_SYMLINK = 10029,
+ NFSERR_RESTOREFH = 10030,
+ NFSERR_LEASE_MOVED = 10031,
+ NFSERR_ATTRNOTSUPP = 10032,
+ NFSERR_NO_GRACE = 10033,
+ NFSERR_RECLAIM_BAD = 10034,
+ NFSERR_RECLAIM_CONFLICT = 10035,
+ NFSERR_BAD_XDR = 10036,
+ NFSERR_LOCKS_HELD = 10037,
+ NFSERR_OPENMODE = 10038,
+ NFSERR_BADOWNER = 10039,
+ NFSERR_BADCHAR = 10040,
+ NFSERR_BADNAME = 10041,
+ NFSERR_BAD_RANGE = 10042,
+ NFSERR_LOCK_NOTSUPP = 10043,
+ NFSERR_OP_ILLEGAL = 10044,
+ NFSERR_DEADLOCK = 10045,
+ NFSERR_FILE_OPEN = 10046,
+ NFSERR_ADMIN_REVOKED = 10047,
+ NFSERR_CB_PATH_DOWN = 10048,
+ NFSERR_REPLAY_ME = 10049
+};
+
+enum nfs_ftype {
+ NFNON = 0,
+ NFREG = 1,
+ NFDIR = 2,
+ NFBLK = 3,
+ NFCHR = 4,
+ NFLNK = 5,
+ NFSOCK = 6,
+ NFBAD = 7,
+ NFFIFO = 8
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfs2.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfs2.h
new file mode 100644
index 0000000..1bb5df2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfs2.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS2_H
+#define _LINUX_NFS2_H
+
+#define NFS2_PORT 2049
+#define NFS2_MAXDATA 8192
+#define NFS2_MAXPATHLEN 1024
+#define NFS2_MAXNAMLEN 255
+#define NFS2_MAXGROUPS 16
+#define NFS2_FHSIZE 32
+#define NFS2_COOKIESIZE 4
+#define NFS2_FIFO_DEV (-1)
+#define NFS2MODE_FMT 0170000
+#define NFS2MODE_DIR 0040000
+#define NFS2MODE_CHR 0020000
+#define NFS2MODE_BLK 0060000
+#define NFS2MODE_REG 0100000
+#define NFS2MODE_LNK 0120000
+#define NFS2MODE_SOCK 0140000
+#define NFS2MODE_FIFO 0010000
+
+enum nfs2_ftype {
+ NF2NON = 0,
+ NF2REG = 1,
+ NF2DIR = 2,
+ NF2BLK = 3,
+ NF2CHR = 4,
+ NF2LNK = 5,
+ NF2SOCK = 6,
+ NF2BAD = 7,
+ NF2FIFO = 8
+};
+
+struct nfs2_fh {
+ char data[NFS2_FHSIZE];
+};
+
+#define NFS2_VERSION 2
+#define NFSPROC_NULL 0
+#define NFSPROC_GETATTR 1
+#define NFSPROC_SETATTR 2
+#define NFSPROC_ROOT 3
+#define NFSPROC_LOOKUP 4
+#define NFSPROC_READLINK 5
+#define NFSPROC_READ 6
+#define NFSPROC_WRITECACHE 7
+#define NFSPROC_WRITE 8
+#define NFSPROC_CREATE 9
+#define NFSPROC_REMOVE 10
+#define NFSPROC_RENAME 11
+#define NFSPROC_LINK 12
+#define NFSPROC_SYMLINK 13
+#define NFSPROC_MKDIR 14
+#define NFSPROC_RMDIR 15
+#define NFSPROC_READDIR 16
+#define NFSPROC_STATFS 17
+
+#define NFS_MNT_PROGRAM 100005
+#define NFS_MNT_VERSION 1
+#define MNTPROC_NULL 0
+#define MNTPROC_MNT 1
+#define MNTPROC_UMNT 3
+#define MNTPROC_UMNTALL 4
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfs3.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfs3.h
new file mode 100644
index 0000000..8303459
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfs3.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS3_H
+#define _LINUX_NFS3_H
+
+#define NFS3_PORT 2049
+#define NFS3_MAXDATA 32768
+#define NFS3_MAXPATHLEN PATH_MAX
+#define NFS3_MAXNAMLEN NAME_MAX
+#define NFS3_MAXGROUPS 16
+#define NFS3_FHSIZE 64
+#define NFS3_COOKIESIZE 4
+#define NFS3_FIFO_DEV (-1)
+#define NFS3MODE_FMT 0170000
+#define NFS3MODE_DIR 0040000
+#define NFS3MODE_CHR 0020000
+#define NFS3MODE_BLK 0060000
+#define NFS3MODE_REG 0100000
+#define NFS3MODE_LNK 0120000
+#define NFS3MODE_SOCK 0140000
+#define NFS3MODE_FIFO 0010000
+
+#define NFS3_ACCESS_READ 0x0001
+#define NFS3_ACCESS_LOOKUP 0x0002
+#define NFS3_ACCESS_MODIFY 0x0004
+#define NFS3_ACCESS_EXTEND 0x0008
+#define NFS3_ACCESS_DELETE 0x0010
+#define NFS3_ACCESS_EXECUTE 0x0020
+#define NFS3_ACCESS_FULL 0x003f
+
+enum nfs3_createmode {
+ NFS3_CREATE_UNCHECKED = 0,
+ NFS3_CREATE_GUARDED = 1,
+ NFS3_CREATE_EXCLUSIVE = 2
+};
+
+#define NFS3_FSF_LINK 0x0001
+#define NFS3_FSF_SYMLINK 0x0002
+#define NFS3_FSF_HOMOGENEOUS 0x0008
+#define NFS3_FSF_CANSETTIME 0x0010
+
+#define NFS3_FSF_DEFAULT 0x001B
+#define NFS3_FSF_BILLYBOY 0x0018
+#define NFS3_FSF_READONLY 0x0008
+
+enum nfs3_ftype {
+ NF3NON = 0,
+ NF3REG = 1,
+ NF3DIR = 2,
+ NF3BLK = 3,
+ NF3CHR = 4,
+ NF3LNK = 5,
+ NF3SOCK = 6,
+ NF3FIFO = 7,
+ NF3BAD = 8
+};
+
+struct nfs3_fh {
+ unsigned short size;
+ unsigned char data[NFS3_FHSIZE];
+};
+
+#define NFS3_VERSION 3
+#define NFS3PROC_NULL 0
+#define NFS3PROC_GETATTR 1
+#define NFS3PROC_SETATTR 2
+#define NFS3PROC_LOOKUP 3
+#define NFS3PROC_ACCESS 4
+#define NFS3PROC_READLINK 5
+#define NFS3PROC_READ 6
+#define NFS3PROC_WRITE 7
+#define NFS3PROC_CREATE 8
+#define NFS3PROC_MKDIR 9
+#define NFS3PROC_SYMLINK 10
+#define NFS3PROC_MKNOD 11
+#define NFS3PROC_REMOVE 12
+#define NFS3PROC_RMDIR 13
+#define NFS3PROC_RENAME 14
+#define NFS3PROC_LINK 15
+#define NFS3PROC_READDIR 16
+#define NFS3PROC_READDIRPLUS 17
+#define NFS3PROC_FSSTAT 18
+#define NFS3PROC_FSINFO 19
+#define NFS3PROC_PATHCONF 20
+#define NFS3PROC_COMMIT 21
+
+#define NFS_MNT3_PROGRAM 100005
+#define NFS_MNT3_VERSION 3
+#define MOUNTPROC3_NULL 0
+#define MOUNTPROC3_MNT 1
+#define MOUNTPROC3_UMNT 3
+#define MOUNTPROC3_UMNTALL 4
+
+#ifdef NFS_NEED_KERNEL_TYPES
+
+#define NFS3_POST_OP_ATTR_WORDS 22
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfs4.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfs4.h
new file mode 100644
index 0000000..2e95e45
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfs4.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS4_H
+#define _LINUX_NFS4_H
+
+#include <linux/types.h>
+
+#define NFS4_VERIFIER_SIZE 8
+#define NFS4_FHSIZE 128
+#define NFS4_MAXPATHLEN PATH_MAX
+#define NFS4_MAXNAMLEN NAME_MAX
+
+#define NFS4_ACCESS_READ 0x0001
+#define NFS4_ACCESS_LOOKUP 0x0002
+#define NFS4_ACCESS_MODIFY 0x0004
+#define NFS4_ACCESS_EXTEND 0x0008
+#define NFS4_ACCESS_DELETE 0x0010
+#define NFS4_ACCESS_EXECUTE 0x0020
+
+#define NFS4_FH_PERSISTENT 0x0000
+#define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001
+#define NFS4_FH_VOLATILE_ANY 0x0002
+#define NFS4_FH_VOL_MIGRATION 0x0004
+#define NFS4_FH_VOL_RENAME 0x0008
+
+#define NFS4_OPEN_RESULT_CONFIRM 0x0002
+#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
+
+#define NFS4_SHARE_ACCESS_READ 0x0001
+#define NFS4_SHARE_ACCESS_WRITE 0x0002
+#define NFS4_SHARE_ACCESS_BOTH 0x0003
+#define NFS4_SHARE_DENY_READ 0x0001
+#define NFS4_SHARE_DENY_WRITE 0x0002
+#define NFS4_SHARE_DENY_BOTH 0x0003
+
+#define NFS4_SET_TO_SERVER_TIME 0
+#define NFS4_SET_TO_CLIENT_TIME 1
+
+#define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
+#define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1
+#define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2
+#define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3
+
+#define ACL4_SUPPORT_ALLOW_ACL 0x01
+#define ACL4_SUPPORT_DENY_ACL 0x02
+#define ACL4_SUPPORT_AUDIT_ACL 0x04
+#define ACL4_SUPPORT_ALARM_ACL 0x08
+
+#define NFS4_ACE_FILE_INHERIT_ACE 0x00000001
+#define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002
+#define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004
+#define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008
+#define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
+#define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
+#define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
+#define NFS4_ACE_OWNER 0x00000080
+#define NFS4_ACE_GROUP 0x00000100
+#define NFS4_ACE_EVERYONE 0x00000200
+
+#define NFS4_ACE_READ_DATA 0x00000001
+#define NFS4_ACE_LIST_DIRECTORY 0x00000001
+#define NFS4_ACE_WRITE_DATA 0x00000002
+#define NFS4_ACE_ADD_FILE 0x00000002
+#define NFS4_ACE_APPEND_DATA 0x00000004
+#define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004
+#define NFS4_ACE_READ_NAMED_ATTRS 0x00000008
+#define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010
+#define NFS4_ACE_EXECUTE 0x00000020
+#define NFS4_ACE_DELETE_CHILD 0x00000040
+#define NFS4_ACE_READ_ATTRIBUTES 0x00000080
+#define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100
+#define NFS4_ACE_DELETE 0x00010000
+#define NFS4_ACE_READ_ACL 0x00020000
+#define NFS4_ACE_WRITE_ACL 0x00040000
+#define NFS4_ACE_WRITE_OWNER 0x00080000
+#define NFS4_ACE_SYNCHRONIZE 0x00100000
+#define NFS4_ACE_GENERIC_READ 0x00120081
+#define NFS4_ACE_GENERIC_WRITE 0x00160106
+#define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
+#define NFS4_ACE_MASK_ALL 0x001F01FF
+
+enum nfs4_acl_whotype {
+ NFS4_ACL_WHO_NAMED = 0,
+ NFS4_ACL_WHO_OWNER,
+ NFS4_ACL_WHO_GROUP,
+ NFS4_ACL_WHO_EVERYONE,
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfs_xdr.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfs_xdr.h
new file mode 100644
index 0000000..48fe262
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfs_xdr.h
@@ -0,0 +1,556 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS_XDR_H
+#define _LINUX_NFS_XDR_H
+
+#include <linux/sunrpc/xprt.h>
+#include <linux/nfsacl.h>
+
+#define NFS_MAX_FILE_IO_SIZE (1048576U)
+#define NFS_DEF_FILE_IO_SIZE (4096U)
+#define NFS_MIN_FILE_IO_SIZE (1024U)
+
+struct nfs_fsid {
+ uint64_t major;
+ uint64_t minor;
+};
+
+#define NFS_ATTR_WCC 0x0001
+#define NFS_ATTR_FATTR 0x0002
+#define NFS_ATTR_FATTR_V3 0x0004
+#define NFS_ATTR_FATTR_V4 0x0008
+#define NFS_ATTR_FATTR_V4_REFERRAL 0x0010
+
+struct nfs_fsinfo {
+ struct nfs_fattr *fattr;
+ __u32 rtmax;
+ __u32 rtpref;
+ __u32 rtmult;
+ __u32 wtmax;
+ __u32 wtpref;
+ __u32 wtmult;
+ __u32 dtpref;
+ __u64 maxfilesize;
+ __u32 lease_time;
+};
+
+struct nfs_fsstat {
+ struct nfs_fattr *fattr;
+ __u64 tbytes;
+ __u64 fbytes;
+ __u64 abytes;
+ __u64 tfiles;
+ __u64 ffiles;
+ __u64 afiles;
+};
+
+struct nfs2_fsstat {
+ __u32 tsize;
+ __u32 bsize;
+ __u32 blocks;
+ __u32 bfree;
+ __u32 bavail;
+};
+
+struct nfs_pathconf {
+ struct nfs_fattr *fattr;
+ __u32 max_link;
+ __u32 max_namelen;
+};
+
+struct nfs4_change_info {
+ u32 atomic;
+ u64 before;
+ u64 after;
+};
+
+struct nfs_seqid;
+
+struct nfs_openargs {
+ const struct nfs_fh * fh;
+ struct nfs_seqid * seqid;
+ int open_flags;
+ __u64 clientid;
+ __u32 id;
+ union {
+ struct iattr * attrs;
+ nfs4_verifier verifier;
+ nfs4_stateid delegation;
+ int delegation_type;
+ } u;
+ const struct qstr * name;
+ const struct nfs_server *server;
+ const u32 * bitmask;
+ __u32 claim;
+};
+
+struct nfs_openres {
+ nfs4_stateid stateid;
+ struct nfs_fh fh;
+ struct nfs4_change_info cinfo;
+ __u32 rflags;
+ struct nfs_fattr * f_attr;
+ struct nfs_fattr * dir_attr;
+ const struct nfs_server *server;
+ int delegation_type;
+ nfs4_stateid delegation;
+ __u32 do_recall;
+ __u64 maxsize;
+};
+
+struct nfs_open_confirmargs {
+ const struct nfs_fh * fh;
+ nfs4_stateid * stateid;
+ struct nfs_seqid * seqid;
+};
+
+struct nfs_open_confirmres {
+ nfs4_stateid stateid;
+};
+
+struct nfs_closeargs {
+ struct nfs_fh * fh;
+ nfs4_stateid * stateid;
+ struct nfs_seqid * seqid;
+ int open_flags;
+ const u32 * bitmask;
+};
+
+struct nfs_closeres {
+ nfs4_stateid stateid;
+ struct nfs_fattr * fattr;
+ const struct nfs_server *server;
+};
+
+struct nfs_lowner {
+ __u64 clientid;
+ u32 id;
+};
+
+struct nfs_lock_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_seqid * lock_seqid;
+ nfs4_stateid * lock_stateid;
+ struct nfs_seqid * open_seqid;
+ nfs4_stateid * open_stateid;
+ struct nfs_lowner lock_owner;
+ unsigned char block : 1;
+ unsigned char reclaim : 1;
+ unsigned char new_lock_owner : 1;
+};
+
+struct nfs_lock_res {
+ nfs4_stateid stateid;
+};
+
+struct nfs_locku_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_seqid * seqid;
+ nfs4_stateid * stateid;
+};
+
+struct nfs_locku_res {
+ nfs4_stateid stateid;
+};
+
+struct nfs_lockt_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_lowner lock_owner;
+};
+
+struct nfs_lockt_res {
+ struct file_lock * denied;
+};
+
+struct nfs4_delegreturnargs {
+ const struct nfs_fh *fhandle;
+ const nfs4_stateid *stateid;
+ const u32 * bitmask;
+};
+
+struct nfs4_delegreturnres {
+ struct nfs_fattr * fattr;
+ const struct nfs_server *server;
+};
+
+struct nfs_readargs {
+ struct nfs_fh * fh;
+ struct nfs_open_context *context;
+ __u64 offset;
+ __u32 count;
+ unsigned int pgbase;
+ struct page ** pages;
+};
+
+struct nfs_readres {
+ struct nfs_fattr * fattr;
+ __u32 count;
+ int eof;
+};
+
+struct nfs_writeargs {
+ struct nfs_fh * fh;
+ struct nfs_open_context *context;
+ __u64 offset;
+ __u32 count;
+ enum nfs3_stable_how stable;
+ unsigned int pgbase;
+ struct page ** pages;
+ const u32 * bitmask;
+};
+
+struct nfs_writeverf {
+ enum nfs3_stable_how committed;
+ __u32 verifier[2];
+};
+
+struct nfs_writeres {
+ struct nfs_fattr * fattr;
+ struct nfs_writeverf * verf;
+ __u32 count;
+ const struct nfs_server *server;
+};
+
+struct nfs_entry {
+ __u64 ino;
+ __u64 cookie,
+ prev_cookie;
+ const char * name;
+ unsigned int len;
+ int eof;
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs_sattrargs {
+ struct nfs_fh * fh;
+ struct iattr * sattr;
+};
+
+struct nfs_diropargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+};
+
+struct nfs_createargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+};
+
+struct nfs_renameargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs_setattrargs {
+ struct nfs_fh * fh;
+ nfs4_stateid stateid;
+ struct iattr * iap;
+ const struct nfs_server * server;
+ const u32 * bitmask;
+};
+
+struct nfs_setaclargs {
+ struct nfs_fh * fh;
+ size_t acl_len;
+ unsigned int acl_pgbase;
+ struct page ** acl_pages;
+};
+
+struct nfs_getaclargs {
+ struct nfs_fh * fh;
+ size_t acl_len;
+ unsigned int acl_pgbase;
+ struct page ** acl_pages;
+};
+
+struct nfs_setattrres {
+ struct nfs_fattr * fattr;
+ const struct nfs_server * server;
+};
+
+struct nfs_linkargs {
+ struct nfs_fh * fromfh;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs_symlinkargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ const char * topath;
+ unsigned int tolen;
+ struct iattr * sattr;
+};
+
+struct nfs_readdirargs {
+ struct nfs_fh * fh;
+ __u32 cookie;
+ unsigned int count;
+ struct page ** pages;
+};
+
+struct nfs3_getaclargs {
+ struct nfs_fh * fh;
+ int mask;
+ struct page ** pages;
+};
+
+struct nfs3_setaclargs {
+ struct inode * inode;
+ int mask;
+ struct posix_acl * acl_access;
+ struct posix_acl * acl_default;
+ struct page ** pages;
+};
+
+struct nfs_diropok {
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs_readlinkargs {
+ struct nfs_fh * fh;
+ unsigned int pgbase;
+ unsigned int pglen;
+ struct page ** pages;
+};
+
+struct nfs3_sattrargs {
+ struct nfs_fh * fh;
+ struct iattr * sattr;
+ unsigned int guard;
+ struct timespec guardtime;
+};
+
+struct nfs3_diropargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+};
+
+struct nfs3_accessargs {
+ struct nfs_fh * fh;
+ __u32 access;
+};
+
+struct nfs3_createargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+ enum nfs3_createmode createmode;
+ __u32 verifier[2];
+};
+
+struct nfs3_mkdirargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+};
+
+struct nfs3_symlinkargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ const char * topath;
+ unsigned int tolen;
+ struct iattr * sattr;
+};
+
+struct nfs3_mknodargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ enum nfs3_ftype type;
+ struct iattr * sattr;
+ dev_t rdev;
+};
+
+struct nfs3_renameargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs3_linkargs {
+ struct nfs_fh * fromfh;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs3_readdirargs {
+ struct nfs_fh * fh;
+ __u64 cookie;
+ __u32 verf[2];
+ int plus;
+ unsigned int count;
+ struct page ** pages;
+};
+
+struct nfs3_diropres {
+ struct nfs_fattr * dir_attr;
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs3_accessres {
+ struct nfs_fattr * fattr;
+ __u32 access;
+};
+
+struct nfs3_readlinkargs {
+ struct nfs_fh * fh;
+ unsigned int pgbase;
+ unsigned int pglen;
+ struct page ** pages;
+};
+
+struct nfs3_renameres {
+ struct nfs_fattr * fromattr;
+ struct nfs_fattr * toattr;
+};
+
+struct nfs3_linkres {
+ struct nfs_fattr * dir_attr;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs3_readdirres {
+ struct nfs_fattr * dir_attr;
+ __u32 * verf;
+ int plus;
+};
+
+struct nfs3_getaclres {
+ struct nfs_fattr * fattr;
+ int mask;
+ unsigned int acl_access_count;
+ unsigned int acl_default_count;
+ struct posix_acl * acl_access;
+ struct posix_acl * acl_default;
+};
+
+struct nfs_page;
+
+#define NFS_PAGEVEC_SIZE (8U)
+
+struct nfs_read_data {
+ int flags;
+ struct rpc_task task;
+ struct inode *inode;
+ struct rpc_cred *cred;
+ struct nfs_fattr fattr;
+ struct list_head pages;
+ struct nfs_page *req;
+ struct page **pagevec;
+ unsigned int npages;
+ struct nfs_readargs args;
+ struct nfs_readres res;
+ struct page *page_array[NFS_PAGEVEC_SIZE];
+};
+
+struct nfs_write_data {
+ int flags;
+ struct rpc_task task;
+ struct inode *inode;
+ struct rpc_cred *cred;
+ struct nfs_fattr fattr;
+ struct nfs_writeverf verf;
+ struct list_head pages;
+ struct nfs_page *req;
+ struct page **pagevec;
+ unsigned int npages;
+ struct nfs_writeargs args;
+ struct nfs_writeres res;
+ struct page *page_array[NFS_PAGEVEC_SIZE];
+};
+
+struct nfs_access_entry;
+
+struct nfs_rpc_ops {
+ int version;
+ struct dentry_operations *dentry_ops;
+ struct inode_operations *dir_inode_ops;
+ struct inode_operations *file_inode_ops;
+
+ int (*getroot) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsinfo *);
+ int (*getattr) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fattr *);
+ int (*setattr) (struct dentry *, struct nfs_fattr *,
+ struct iattr *);
+ int (*lookup) (struct inode *, struct qstr *,
+ struct nfs_fh *, struct nfs_fattr *);
+ int (*access) (struct inode *, struct nfs_access_entry *);
+ int (*readlink)(struct inode *, struct page *, unsigned int,
+ unsigned int);
+ int (*read) (struct nfs_read_data *);
+ int (*write) (struct nfs_write_data *);
+ int (*commit) (struct nfs_write_data *);
+ int (*create) (struct inode *, struct dentry *,
+ struct iattr *, int, struct nameidata *);
+ int (*remove) (struct inode *, struct qstr *);
+ int (*unlink_setup) (struct rpc_message *,
+ struct dentry *, struct qstr *);
+ int (*unlink_done) (struct dentry *, struct rpc_task *);
+ int (*rename) (struct inode *, struct qstr *,
+ struct inode *, struct qstr *);
+ int (*link) (struct inode *, struct inode *, struct qstr *);
+ int (*symlink) (struct inode *, struct qstr *, struct qstr *,
+ struct iattr *, struct nfs_fh *,
+ struct nfs_fattr *);
+ int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
+ int (*rmdir) (struct inode *, struct qstr *);
+ int (*readdir) (struct dentry *, struct rpc_cred *,
+ u64, struct page *, unsigned int, int);
+ int (*mknod) (struct inode *, struct dentry *, struct iattr *,
+ dev_t);
+ int (*statfs) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsstat *);
+ int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsinfo *);
+ int (*pathconf) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_pathconf *);
+ u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
+ void (*read_setup) (struct nfs_read_data *);
+ int (*read_done) (struct rpc_task *, struct nfs_read_data *);
+ void (*write_setup) (struct nfs_write_data *, int how);
+ int (*write_done) (struct rpc_task *, struct nfs_write_data *);
+ void (*commit_setup) (struct nfs_write_data *, int how);
+ int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
+ int (*file_open) (struct inode *, struct file *);
+ int (*file_release) (struct inode *, struct file *);
+ int (*lock)(struct file *, int, struct file_lock *);
+ void (*clear_acl_cache)(struct inode *);
+};
+
+#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsacl.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsacl.h
new file mode 100644
index 0000000..7dd95ab
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsacl.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NFSACL_H
+#define __LINUX_NFSACL_H
+
+#define NFS_ACL_PROGRAM 100227
+
+#define ACLPROC2_GETACL 1
+#define ACLPROC2_SETACL 2
+#define ACLPROC2_GETATTR 3
+#define ACLPROC2_ACCESS 4
+
+#define ACLPROC3_GETACL 1
+#define ACLPROC3_SETACL 2
+
+#define NFS_ACL 0x0001
+#define NFS_ACLCNT 0x0002
+#define NFS_DFACL 0x0004
+#define NFS_DFACLCNT 0x0008
+
+#define NFS_ACL_DEFAULT 0x1000
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/auth.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/auth.h
new file mode 100644
index 0000000..f840f0e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/auth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_AUTH_H
+#define LINUX_NFSD_AUTH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/const.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/const.h
new file mode 100644
index 0000000..c345508
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/const.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFSD_CONST_H
+#define _LINUX_NFSD_CONST_H
+
+#include <linux/nfs.h>
+#include <linux/nfs2.h>
+#include <linux/nfs3.h>
+#include <linux/nfs4.h>
+
+#define NFSSVC_MAXVERS 3
+
+#define NFSSVC_MAXBLKSIZE (32*1024)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/debug.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/debug.h
new file mode 100644
index 0000000..9b90f05
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/debug.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_DEBUG_H
+#define LINUX_NFSD_DEBUG_H
+
+#include <linux/sunrpc/debug.h>
+
+#ifdef RPC_DEBUG
+#define NFSD_DEBUG 1
+#endif
+
+#define NFSDDBG_SOCK 0x0001
+#define NFSDDBG_FH 0x0002
+#define NFSDDBG_EXPORT 0x0004
+#define NFSDDBG_SVC 0x0008
+#define NFSDDBG_PROC 0x0010
+#define NFSDDBG_FILEOP 0x0020
+#define NFSDDBG_AUTH 0x0040
+#define NFSDDBG_REPCACHE 0x0080
+#define NFSDDBG_XDR 0x0100
+#define NFSDDBG_LOCKD 0x0200
+#define NFSDDBG_ALL 0x7FFF
+#define NFSDDBG_NOCHANGE 0xFFFF
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/export.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/export.h
new file mode 100644
index 0000000..932274f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/export.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef NFSD_EXPORT_H
+#define NFSD_EXPORT_H
+
+#include <asm/types.h>
+
+#define NFSCLNT_IDMAX 1024
+#define NFSCLNT_ADDRMAX 16
+#define NFSCLNT_KEYMAX 32
+
+#define NFSEXP_READONLY 0x0001
+#define NFSEXP_INSECURE_PORT 0x0002
+#define NFSEXP_ROOTSQUASH 0x0004
+#define NFSEXP_ALLSQUASH 0x0008
+#define NFSEXP_ASYNC 0x0010
+#define NFSEXP_GATHERED_WRITES 0x0020
+
+#define NFSEXP_NOHIDE 0x0200
+#define NFSEXP_NOSUBTREECHECK 0x0400
+#define NFSEXP_NOAUTHNLM 0x0800
+#define NFSEXP_MSNFS 0x1000
+#define NFSEXP_FSID 0x2000
+#define NFSEXP_CROSSMOUNT 0x4000
+#define NFSEXP_NOACL 0x8000
+#define NFSEXP_ALLFLAGS 0xFE3F
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/interface.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/interface.h
new file mode 100644
index 0000000..3c3946a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/interface.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_INTERFACE_H
+#define LINUX_NFSD_INTERFACE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/nfsfh.h
new file mode 100644
index 0000000..13450d2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFSD_FH_H
+#define _LINUX_NFSD_FH_H
+
+#include <asm/types.h>
+#include <linux/nfsd/const.h>
+#include <linux/nfsd/debug.h>
+
+struct nfs_fhbase_old {
+ __u32 fb_dcookie;
+ __u32 fb_ino;
+ __u32 fb_dirino;
+ __u32 fb_dev;
+ __u32 fb_xdev;
+ __u32 fb_xino;
+ __u32 fb_generation;
+};
+
+struct nfs_fhbase_new {
+ __u8 fb_version;
+ __u8 fb_auth_type;
+ __u8 fb_fsid_type;
+ __u8 fb_fileid_type;
+ __u32 fb_auth[1];
+
+};
+
+struct knfsd_fh {
+ unsigned int fh_size;
+ union {
+ struct nfs_fhbase_old fh_old;
+ __u32 fh_pad[NFS4_FHSIZE/4];
+ struct nfs_fhbase_new fh_new;
+ } fh_base;
+};
+
+#define ofh_dcookie fh_base.fh_old.fb_dcookie
+#define ofh_ino fh_base.fh_old.fb_ino
+#define ofh_dirino fh_base.fh_old.fb_dirino
+#define ofh_dev fh_base.fh_old.fb_dev
+#define ofh_xdev fh_base.fh_old.fb_xdev
+#define ofh_xino fh_base.fh_old.fb_xino
+#define ofh_generation fh_base.fh_old.fb_generation
+
+#define fh_version fh_base.fh_new.fb_version
+#define fh_fsid_type fh_base.fh_new.fb_fsid_type
+#define fh_auth_type fh_base.fh_new.fb_auth_type
+#define fh_fileid_type fh_base.fh_new.fb_fileid_type
+#define fh_auth fh_base.fh_new.fb_auth
+#define fh_fsid fh_base.fh_new.fb_auth
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/stats.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/stats.h
new file mode 100644
index 0000000..647e65c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/stats.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_STATS_H
+#define LINUX_NFSD_STATS_H
+
+#include <linux/nfs4.h>
+
+struct nfsd_stats {
+ unsigned int rchits;
+ unsigned int rcmisses;
+ unsigned int rcnocache;
+ unsigned int fh_stale;
+ unsigned int fh_lookup;
+ unsigned int fh_anon;
+ unsigned int fh_nocache_dir;
+ unsigned int fh_nocache_nondir;
+ unsigned int io_read;
+ unsigned int io_write;
+ unsigned int th_cnt;
+ unsigned int th_usage[10];
+ unsigned int th_fullcnt;
+ unsigned int ra_size;
+ unsigned int ra_depth[11];
+
+};
+
+#define NFSD_USAGE_WRAP (HZ*1000000)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/xdr.h b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/xdr.h
new file mode 100644
index 0000000..f94961d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_H
+#define LINUX_NFSD_H
+
+#include <linux/fs.h>
+#include <linux/vfs.h>
+#include <linux/nfs.h>
+
+struct nfsd_fhandle {
+ struct svc_fh fh;
+};
+
+struct nfsd_sattrargs {
+ struct svc_fh fh;
+ struct iattr attrs;
+};
+
+struct nfsd_diropargs {
+ struct svc_fh fh;
+ char * name;
+ int len;
+};
+
+struct nfsd_readargs {
+ struct svc_fh fh;
+ __u32 offset;
+ __u32 count;
+ struct kvec vec[RPCSVC_MAXPAGES];
+ int vlen;
+};
+
+struct nfsd_writeargs {
+ svc_fh fh;
+ __u32 offset;
+ int len;
+ struct kvec vec[RPCSVC_MAXPAGES];
+ int vlen;
+};
+
+struct nfsd_createargs {
+ struct svc_fh fh;
+ char * name;
+ int len;
+ struct iattr attrs;
+};
+
+struct nfsd_renameargs {
+ struct svc_fh ffh;
+ char * fname;
+ int flen;
+ struct svc_fh tfh;
+ char * tname;
+ int tlen;
+};
+
+struct nfsd_readlinkargs {
+ struct svc_fh fh;
+ char * buffer;
+};
+
+struct nfsd_linkargs {
+ struct svc_fh ffh;
+ struct svc_fh tfh;
+ char * tname;
+ int tlen;
+};
+
+struct nfsd_symlinkargs {
+ struct svc_fh ffh;
+ char * fname;
+ int flen;
+ char * tname;
+ int tlen;
+ struct iattr attrs;
+};
+
+struct nfsd_readdirargs {
+ struct svc_fh fh;
+ __u32 cookie;
+ __u32 count;
+ u32 * buffer;
+};
+
+struct nfsd_attrstat {
+ struct svc_fh fh;
+ struct kstat stat;
+};
+
+struct nfsd_diropres {
+ struct svc_fh fh;
+ struct kstat stat;
+};
+
+struct nfsd_readlinkres {
+ int len;
+};
+
+struct nfsd_readres {
+ struct svc_fh fh;
+ unsigned long count;
+ struct kstat stat;
+};
+
+struct nfsd_readdirres {
+ int count;
+
+ struct readdir_cd common;
+ u32 * buffer;
+ int buflen;
+ u32 * offset;
+};
+
+struct nfsd_statfsres {
+ struct kstatfs stats;
+};
+
+union nfsd_xdrstore {
+ struct nfsd_sattrargs sattr;
+ struct nfsd_diropargs dirop;
+ struct nfsd_readargs read;
+ struct nfsd_writeargs write;
+ struct nfsd_createargs create;
+ struct nfsd_renameargs rename;
+ struct nfsd_linkargs link;
+ struct nfsd_symlinkargs symlink;
+ struct nfsd_readdirargs readdir;
+};
+
+#define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/node.h b/6/platforms/android-3/arch-arm/usr/include/linux/node.h
new file mode 100644
index 0000000..b33bffc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/node.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NODE_H_
+#define _LINUX_NODE_H_
+
+#include <linux/sysdev.h>
+#include <linux/cpumask.h>
+
+struct node {
+ struct sys_device sysdev;
+};
+
+#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nodemask.h b/6/platforms/android-3/arch-arm/usr/include/linux/nodemask.h
new file mode 100644
index 0000000..4ec8632
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nodemask.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NODEMASK_H
+#define __LINUX_NODEMASK_H
+
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/bitmap.h>
+#include <linux/numa.h>
+
+typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
+
+#define node_set(node, dst) __node_set((node), &(dst))
+#define node_clear(node, dst) __node_clear((node), &(dst))
+#define nodes_setall(dst) __nodes_setall(&(dst), MAX_NUMNODES)
+#define nodes_clear(dst) __nodes_clear(&(dst), MAX_NUMNODES)
+#define node_isset(node, nodemask) test_bit((node), (nodemask).bits)
+#define node_test_and_set(node, nodemask) __node_test_and_set((node), &(nodemask))
+#define nodes_and(dst, src1, src2) __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_or(dst, src1, src2) __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_xor(dst, src1, src2) __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_andnot(dst, src1, src2) __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_complement(dst, src) __nodes_complement(&(dst), &(src), MAX_NUMNODES)
+#define nodes_equal(src1, src2) __nodes_equal(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_intersects(src1, src2) __nodes_intersects(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_subset(src1, src2) __nodes_subset(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_empty(src) __nodes_empty(&(src), MAX_NUMNODES)
+#define nodes_full(nodemask) __nodes_full(&(nodemask), MAX_NUMNODES)
+#define nodes_weight(nodemask) __nodes_weight(&(nodemask), MAX_NUMNODES)
+#define nodes_shift_right(dst, src, n) __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES)
+#define nodes_shift_left(dst, src, n) __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES)
+#define first_node(src) __first_node(&(src))
+#define next_node(n, src) __next_node((n), &(src))
+#define nodemask_of_node(node) ({ typeof(_unused_nodemask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(node); } else { nodes_clear(m); node_set((node), m); } m; })
+#define first_unset_node(mask) __first_unset_node(&(mask))
+#define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
+#if MAX_NUMNODES <= BITS_PER_LONG
+#define NODE_MASK_ALL ((nodemask_t) { { [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD } })
+#else
+#define NODE_MASK_ALL ((nodemask_t) { { [0 ... BITS_TO_LONGS(MAX_NUMNODES)-2] = ~0UL, [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD } })
+#endif
+#define NODE_MASK_NONE ((nodemask_t) { { [0 ... BITS_TO_LONGS(MAX_NUMNODES)-1] = 0UL } })
+#define nodes_addr(src) ((src).bits)
+#define nodemask_scnprintf(buf, len, src) __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES)
+#define nodemask_parse(ubuf, ulen, dst) __nodemask_parse((ubuf), (ulen), &(dst), MAX_NUMNODES)
+#define nodelist_scnprintf(buf, len, src) __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES)
+#define nodelist_parse(buf, dst) __nodelist_parse((buf), &(dst), MAX_NUMNODES)
+#define node_remap(oldbit, old, new) __node_remap((oldbit), &(old), &(new), MAX_NUMNODES)
+#define nodes_remap(dst, src, old, new) __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES)
+#if MAX_NUMNODES > 1
+#define for_each_node_mask(node, mask) for ((node) = first_node(mask); (node) < MAX_NUMNODES; (node) = next_node((node), (mask)))
+#else
+#define for_each_node_mask(node, mask) if (!nodes_empty(mask)) for ((node) = 0; (node) < 1; (node)++)
+#endif
+
+#if MAX_NUMNODES > 1
+#define num_online_nodes() nodes_weight(node_online_map)
+#define num_possible_nodes() nodes_weight(node_possible_map)
+#define node_online(node) node_isset((node), node_online_map)
+#define node_possible(node) node_isset((node), node_possible_map)
+#define first_online_node first_node(node_online_map)
+#define next_online_node(nid) next_node((nid), node_online_map)
+#else
+#define num_online_nodes() 1
+#define num_possible_nodes() 1
+#define node_online(node) ((node) == 0)
+#define node_possible(node) ((node) == 0)
+#define first_online_node 0
+#define next_online_node(nid) (MAX_NUMNODES)
+#endif
+
+#define any_online_node(mask) ({ int node; for_each_node_mask(node, (mask)) if (node_online(node)) break; node; })
+
+#define node_set_online(node) set_bit((node), node_online_map.bits)
+#define node_set_offline(node) clear_bit((node), node_online_map.bits)
+
+#define for_each_node(node) for_each_node_mask((node), node_possible_map)
+#define for_each_online_node(node) for_each_node_mask((node), node_online_map)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/notifier.h b/6/platforms/android-3/arch-arm/usr/include/linux/notifier.h
new file mode 100644
index 0000000..f1fc461
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/notifier.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NOTIFIER_H
+#define _LINUX_NOTIFIER_H
+#include <linux/errno.h>
+#include <linux/mutex.h>
+#include <linux/rwsem.h>
+
+struct notifier_block {
+ int (*notifier_call)(struct notifier_block *, unsigned long, void *);
+ struct notifier_block *next;
+ int priority;
+};
+
+struct atomic_notifier_head {
+ spinlock_t lock;
+ struct notifier_block *head;
+};
+
+struct blocking_notifier_head {
+ struct rw_semaphore rwsem;
+ struct notifier_block *head;
+};
+
+struct raw_notifier_head {
+ struct notifier_block *head;
+};
+
+#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { spin_lock_init(&(name)->lock); (name)->head = NULL; } while (0)
+#define BLOCKING_INIT_NOTIFIER_HEAD(name) do { init_rwsem(&(name)->rwsem); (name)->head = NULL; } while (0)
+#define RAW_INIT_NOTIFIER_HEAD(name) do { (name)->head = NULL; } while (0)
+
+#define ATOMIC_NOTIFIER_INIT(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .head = NULL }
+#define BLOCKING_NOTIFIER_INIT(name) { .rwsem = __RWSEM_INITIALIZER((name).rwsem), .head = NULL }
+#define RAW_NOTIFIER_INIT(name) { .head = NULL }
+
+#define ATOMIC_NOTIFIER_HEAD(name) struct atomic_notifier_head name = ATOMIC_NOTIFIER_INIT(name)
+#define BLOCKING_NOTIFIER_HEAD(name) struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
+#define RAW_NOTIFIER_HEAD(name) struct raw_notifier_head name = RAW_NOTIFIER_INIT(name)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/numa.h b/6/platforms/android-3/arch-arm/usr/include/linux/numa.h
new file mode 100644
index 0000000..f5d66f5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/numa.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NUMA_H
+#define _LINUX_NUMA_H
+
+#define NODES_SHIFT 0
+
+#define MAX_NUMNODES (1 << NODES_SHIFT)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/nvram.h b/6/platforms/android-3/arch-arm/usr/include/linux/nvram.h
new file mode 100644
index 0000000..b358bdb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/nvram.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NVRAM_H
+#define _LINUX_NVRAM_H
+
+#include <linux/ioctl.h>
+
+#define NVRAM_INIT _IO('p', 0x40)
+#define NVRAM_SETCKS _IO('p', 0x41)
+
+#define NVRAM_FIRST_BYTE 14
+
+#define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/omap_csmi.h b/6/platforms/android-3/arch-arm/usr/include/linux/omap_csmi.h
new file mode 100644
index 0000000..6a28d3d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/omap_csmi.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _OMAP_CSMI_H_
+#define _OMAP_CSMI_H_
+
+#include <asm/ioctl.h>
+
+#define OMAP_CSMI_TTY_ENABLE_ACK _IO('c', 0)
+#define OMAP_CSMI_TTY_DISABLE_ACK _IO('c', 1)
+#define OMAP_CSMI_TTY_READ_UNACKED _IOR('c', 2, int)
+#define OMAP_CSMI_TTY_ACK _IOW('c', 3, int)
+#define OMAP_CSMI_TTY_WAKEUP_AND_ACK _IOW('c', 4, int)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pagemap.h b/6/platforms/android-3/arch-arm/usr/include/linux/pagemap.h
new file mode 100644
index 0000000..8dd397d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pagemap.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PAGEMAP_H
+#define _LINUX_PAGEMAP_H
+
+#include <linux/mm.h>
+#include <linux/fs.h>
+#include <linux/list.h>
+#include <linux/highmem.h>
+#include <linux/compiler.h>
+#include <asm/uaccess.h>
+#include <linux/gfp.h>
+
+#define AS_EIO (__GFP_BITS_SHIFT + 0)
+#define AS_ENOSPC (__GFP_BITS_SHIFT + 1)
+
+#define PAGE_CACHE_SHIFT PAGE_SHIFT
+#define PAGE_CACHE_SIZE PAGE_SIZE
+#define PAGE_CACHE_MASK PAGE_MASK
+#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
+#define page_cache_get(page) get_page(page)
+#define page_cache_release(page) put_page(page)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/param.h b/6/platforms/android-3/arch-arm/usr/include/linux/param.h
new file mode 100644
index 0000000..456695d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/param.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PARAM_H
+#define _LINUX_PARAM_H
+
+#include <asm/param.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/patchkey.h b/6/platforms/android-3/arch-arm/usr/include/linux/patchkey.h
new file mode 100644
index 0000000..fdf86ce
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/patchkey.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PATCHKEY_H_INDIRECT
+#error "patchkey.h included directly"
+#endif
+
+#ifndef _LINUX_PATCHKEY_H
+#define _LINUX_PATCHKEY_H
+
+#include <endian.h>
+
+#ifdef __BYTE_ORDER
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define _PATCHKEY(id) (0xfd00|id)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define _PATCHKEY(id) ((id<<8)|0x00fd)
+#else
+#error "could not determine byte order"
+#endif
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pci.h b/6/platforms/android-3/arch-arm/usr/include/linux/pci.h
new file mode 100644
index 0000000..165deb4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pci.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_PCI_H
+#define LINUX_PCI_H
+
+#include <linux/pci_regs.h>
+
+#include <linux/pci_ids.h>
+
+#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
+#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
+#define PCI_FUNC(devfn) ((devfn) & 0x07)
+
+#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
+#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00)
+#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01)
+#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02)
+#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pci_ids.h b/6/platforms/android-3/arch-arm/usr/include/linux/pci_ids.h
new file mode 100644
index 0000000..ec5adfb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pci_ids.h
@@ -0,0 +1,2270 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define PCI_CLASS_NOT_DEFINED 0x0000
+#define PCI_CLASS_NOT_DEFINED_VGA 0x0001
+
+#define PCI_BASE_CLASS_STORAGE 0x01
+#define PCI_CLASS_STORAGE_SCSI 0x0100
+#define PCI_CLASS_STORAGE_IDE 0x0101
+#define PCI_CLASS_STORAGE_FLOPPY 0x0102
+#define PCI_CLASS_STORAGE_IPI 0x0103
+#define PCI_CLASS_STORAGE_RAID 0x0104
+#define PCI_CLASS_STORAGE_SAS 0x0107
+#define PCI_CLASS_STORAGE_OTHER 0x0180
+
+#define PCI_BASE_CLASS_NETWORK 0x02
+#define PCI_CLASS_NETWORK_ETHERNET 0x0200
+#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201
+#define PCI_CLASS_NETWORK_FDDI 0x0202
+#define PCI_CLASS_NETWORK_ATM 0x0203
+#define PCI_CLASS_NETWORK_OTHER 0x0280
+
+#define PCI_BASE_CLASS_DISPLAY 0x03
+#define PCI_CLASS_DISPLAY_VGA 0x0300
+#define PCI_CLASS_DISPLAY_XGA 0x0301
+#define PCI_CLASS_DISPLAY_3D 0x0302
+#define PCI_CLASS_DISPLAY_OTHER 0x0380
+
+#define PCI_BASE_CLASS_MULTIMEDIA 0x04
+#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400
+#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401
+#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402
+#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480
+
+#define PCI_BASE_CLASS_MEMORY 0x05
+#define PCI_CLASS_MEMORY_RAM 0x0500
+#define PCI_CLASS_MEMORY_FLASH 0x0501
+#define PCI_CLASS_MEMORY_OTHER 0x0580
+
+#define PCI_BASE_CLASS_BRIDGE 0x06
+#define PCI_CLASS_BRIDGE_HOST 0x0600
+#define PCI_CLASS_BRIDGE_ISA 0x0601
+#define PCI_CLASS_BRIDGE_EISA 0x0602
+#define PCI_CLASS_BRIDGE_MC 0x0603
+#define PCI_CLASS_BRIDGE_PCI 0x0604
+#define PCI_CLASS_BRIDGE_PCMCIA 0x0605
+#define PCI_CLASS_BRIDGE_NUBUS 0x0606
+#define PCI_CLASS_BRIDGE_CARDBUS 0x0607
+#define PCI_CLASS_BRIDGE_RACEWAY 0x0608
+#define PCI_CLASS_BRIDGE_OTHER 0x0680
+
+#define PCI_BASE_CLASS_COMMUNICATION 0x07
+#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700
+#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
+#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702
+#define PCI_CLASS_COMMUNICATION_MODEM 0x0703
+#define PCI_CLASS_COMMUNICATION_OTHER 0x0780
+
+#define PCI_BASE_CLASS_SYSTEM 0x08
+#define PCI_CLASS_SYSTEM_PIC 0x0800
+#define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010
+#define PCI_CLASS_SYSTEM_PIC_IOXAPIC 0x080020
+#define PCI_CLASS_SYSTEM_DMA 0x0801
+#define PCI_CLASS_SYSTEM_TIMER 0x0802
+#define PCI_CLASS_SYSTEM_RTC 0x0803
+#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804
+#define PCI_CLASS_SYSTEM_SDHCI 0x0805
+#define PCI_CLASS_SYSTEM_OTHER 0x0880
+
+#define PCI_BASE_CLASS_INPUT 0x09
+#define PCI_CLASS_INPUT_KEYBOARD 0x0900
+#define PCI_CLASS_INPUT_PEN 0x0901
+#define PCI_CLASS_INPUT_MOUSE 0x0902
+#define PCI_CLASS_INPUT_SCANNER 0x0903
+#define PCI_CLASS_INPUT_GAMEPORT 0x0904
+#define PCI_CLASS_INPUT_OTHER 0x0980
+
+#define PCI_BASE_CLASS_DOCKING 0x0a
+#define PCI_CLASS_DOCKING_GENERIC 0x0a00
+#define PCI_CLASS_DOCKING_OTHER 0x0a80
+
+#define PCI_BASE_CLASS_PROCESSOR 0x0b
+#define PCI_CLASS_PROCESSOR_386 0x0b00
+#define PCI_CLASS_PROCESSOR_486 0x0b01
+#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02
+#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10
+#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20
+#define PCI_CLASS_PROCESSOR_MIPS 0x0b30
+#define PCI_CLASS_PROCESSOR_CO 0x0b40
+
+#define PCI_BASE_CLASS_SERIAL 0x0c
+#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
+#define PCI_CLASS_SERIAL_ACCESS 0x0c01
+#define PCI_CLASS_SERIAL_SSA 0x0c02
+#define PCI_CLASS_SERIAL_USB 0x0c03
+#define PCI_CLASS_SERIAL_USB_UHCI 0x0c0300
+#define PCI_CLASS_SERIAL_USB_OHCI 0x0c0310
+#define PCI_CLASS_SERIAL_USB_EHCI 0x0c0320
+#define PCI_CLASS_SERIAL_FIBER 0x0c04
+#define PCI_CLASS_SERIAL_SMBUS 0x0c05
+
+#define PCI_BASE_CLASS_INTELLIGENT 0x0e
+#define PCI_CLASS_INTELLIGENT_I2O 0x0e00
+
+#define PCI_BASE_CLASS_SATELLITE 0x0f
+#define PCI_CLASS_SATELLITE_TV 0x0f00
+#define PCI_CLASS_SATELLITE_AUDIO 0x0f01
+#define PCI_CLASS_SATELLITE_VOICE 0x0f03
+#define PCI_CLASS_SATELLITE_DATA 0x0f04
+
+#define PCI_BASE_CLASS_CRYPT 0x10
+#define PCI_CLASS_CRYPT_NETWORK 0x1000
+#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001
+#define PCI_CLASS_CRYPT_OTHER 0x1080
+
+#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11
+#define PCI_CLASS_SP_DPIO 0x1100
+#define PCI_CLASS_SP_OTHER 0x1180
+
+#define PCI_CLASS_OTHERS 0xff
+
+#define PCI_VENDOR_ID_DYNALINK 0x0675
+#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702
+
+#define PCI_VENDOR_ID_BERKOM 0x0871
+#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1
+#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2
+#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4
+#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8
+
+#define PCI_VENDOR_ID_COMPAQ 0x0e11
+#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508
+#define PCI_DEVICE_ID_COMPAQ_TACHYON 0xa0fc
+#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10
+#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32
+#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
+#define PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE 0xae33
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35
+#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40
+#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43
+#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011
+#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060
+#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178
+#define PCI_DEVICE_ID_COMPAQ_CISSC 0x46
+#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150
+
+#define PCI_VENDOR_ID_NCR 0x1000
+#define PCI_VENDOR_ID_LSI_LOGIC 0x1000
+#define PCI_DEVICE_ID_NCR_53C810 0x0001
+#define PCI_DEVICE_ID_NCR_53C820 0x0002
+#define PCI_DEVICE_ID_NCR_53C825 0x0003
+#define PCI_DEVICE_ID_NCR_53C815 0x0004
+#define PCI_DEVICE_ID_LSI_53C810AP 0x0005
+#define PCI_DEVICE_ID_NCR_53C860 0x0006
+#define PCI_DEVICE_ID_LSI_53C1510 0x000a
+#define PCI_DEVICE_ID_NCR_53C896 0x000b
+#define PCI_DEVICE_ID_NCR_53C895 0x000c
+#define PCI_DEVICE_ID_NCR_53C885 0x000d
+#define PCI_DEVICE_ID_NCR_53C875 0x000f
+#define PCI_DEVICE_ID_NCR_53C1510 0x0010
+#define PCI_DEVICE_ID_LSI_53C895A 0x0012
+#define PCI_DEVICE_ID_LSI_53C875A 0x0013
+#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020
+#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021
+#define PCI_DEVICE_ID_LSI_53C1030 0x0030
+#define PCI_DEVICE_ID_LSI_1030_53C1035 0x0032
+#define PCI_DEVICE_ID_LSI_53C1035 0x0040
+#define PCI_DEVICE_ID_NCR_53C875J 0x008f
+#define PCI_DEVICE_ID_LSI_FC909 0x0621
+#define PCI_DEVICE_ID_LSI_FC929 0x0622
+#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623
+#define PCI_DEVICE_ID_LSI_FC919 0x0624
+#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625
+#define PCI_DEVICE_ID_LSI_FC929X 0x0626
+#define PCI_DEVICE_ID_LSI_FC939X 0x0642
+#define PCI_DEVICE_ID_LSI_FC949X 0x0640
+#define PCI_DEVICE_ID_LSI_FC949ES 0x0646
+#define PCI_DEVICE_ID_LSI_FC919X 0x0628
+#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701
+#define PCI_DEVICE_ID_LSI_61C102 0x0901
+#define PCI_DEVICE_ID_LSI_63C815 0x1000
+#define PCI_DEVICE_ID_LSI_SAS1064 0x0050
+#define PCI_DEVICE_ID_LSI_SAS1064R 0x0411
+#define PCI_DEVICE_ID_LSI_SAS1066 0x005E
+#define PCI_DEVICE_ID_LSI_SAS1068 0x0054
+#define PCI_DEVICE_ID_LSI_SAS1064A 0x005C
+#define PCI_DEVICE_ID_LSI_SAS1064E 0x0056
+#define PCI_DEVICE_ID_LSI_SAS1066E 0x005A
+#define PCI_DEVICE_ID_LSI_SAS1068E 0x0058
+#define PCI_DEVICE_ID_LSI_SAS1078 0x0060
+
+#define PCI_VENDOR_ID_ATI 0x1002
+
+#define PCI_DEVICE_ID_ATI_68800 0x4158
+#define PCI_DEVICE_ID_ATI_215CT222 0x4354
+#define PCI_DEVICE_ID_ATI_210888CX 0x4358
+#define PCI_DEVICE_ID_ATI_215ET222 0x4554
+
+#define PCI_DEVICE_ID_ATI_215GB 0x4742
+#define PCI_DEVICE_ID_ATI_215GD 0x4744
+#define PCI_DEVICE_ID_ATI_215GI 0x4749
+#define PCI_DEVICE_ID_ATI_215GP 0x4750
+#define PCI_DEVICE_ID_ATI_215GQ 0x4751
+#define PCI_DEVICE_ID_ATI_215XL 0x4752
+#define PCI_DEVICE_ID_ATI_215GT 0x4754
+#define PCI_DEVICE_ID_ATI_215GTB 0x4755
+#define PCI_DEVICE_ID_ATI_215_IV 0x4756
+#define PCI_DEVICE_ID_ATI_215_IW 0x4757
+#define PCI_DEVICE_ID_ATI_215_IZ 0x475A
+#define PCI_DEVICE_ID_ATI_210888GX 0x4758
+#define PCI_DEVICE_ID_ATI_215_LB 0x4c42
+#define PCI_DEVICE_ID_ATI_215_LD 0x4c44
+#define PCI_DEVICE_ID_ATI_215_LG 0x4c47
+#define PCI_DEVICE_ID_ATI_215_LI 0x4c49
+#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D
+#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E
+#define PCI_DEVICE_ID_ATI_215_LR 0x4c52
+#define PCI_DEVICE_ID_ATI_215_LS 0x4c53
+#define PCI_DEVICE_ID_ATI_264_LT 0x4c54
+
+#define PCI_DEVICE_ID_ATI_264VT 0x5654
+#define PCI_DEVICE_ID_ATI_264VU 0x5655
+#define PCI_DEVICE_ID_ATI_264VV 0x5656
+
+#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
+#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
+#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x5247
+
+#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
+#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
+#define PCI_DEVICE_ID_ATI_RAGE128_SE 0x5345
+#define PCI_DEVICE_ID_ATI_RAGE128_SF 0x5346
+#define PCI_DEVICE_ID_ATI_RAGE128_SG 0x5347
+#define PCI_DEVICE_ID_ATI_RAGE128_SH 0x5348
+#define PCI_DEVICE_ID_ATI_RAGE128_SK 0x534b
+#define PCI_DEVICE_ID_ATI_RAGE128_SL 0x534c
+#define PCI_DEVICE_ID_ATI_RAGE128_SM 0x534d
+#define PCI_DEVICE_ID_ATI_RAGE128_SN 0x534e
+
+#define PCI_DEVICE_ID_ATI_RAGE128_TF 0x5446
+#define PCI_DEVICE_ID_ATI_RAGE128_TL 0x544c
+#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452
+#define PCI_DEVICE_ID_ATI_RAGE128_TS 0x5453
+#define PCI_DEVICE_ID_ATI_RAGE128_TT 0x5454
+#define PCI_DEVICE_ID_ATI_RAGE128_TU 0x5455
+
+#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45
+#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46
+
+#define PCI_DEVICE_ID_ATI_RAGE128_MF 0x4d46
+#define PCI_DEVICE_ID_ATI_RAGE128_ML 0x4d4c
+
+#define PCI_DEVICE_ID_ATI_RAGE128_PA 0x5041
+#define PCI_DEVICE_ID_ATI_RAGE128_PB 0x5042
+#define PCI_DEVICE_ID_ATI_RAGE128_PC 0x5043
+#define PCI_DEVICE_ID_ATI_RAGE128_PD 0x5044
+#define PCI_DEVICE_ID_ATI_RAGE128_PE 0x5045
+#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046
+
+#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047
+#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048
+#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049
+#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A
+#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B
+#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C
+#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D
+#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E
+#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F
+#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050
+#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051
+#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052
+#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053
+#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054
+#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055
+#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056
+#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057
+#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058
+
+#define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144
+#define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145
+#define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146
+#define PCI_DEVICE_ID_ATI_RADEON_QG 0x5147
+
+#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
+#define PCI_DEVICE_ID_ATI_RADEON_QZ 0x515a
+
+#define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c
+#define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e
+#define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f
+#define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c
+#define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242
+
+#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
+
+#define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157
+#define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158
+
+#define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964
+#define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965
+#define PCI_DEVICE_ID_ATI_RADEON_If 0x4966
+#define PCI_DEVICE_ID_ATI_RADEON_Ig 0x4967
+
+#define PCI_DEVICE_ID_ATI_RADEON_Ya 0x5961
+#define PCI_DEVICE_ID_ATI_RADEON_Yd 0x5964
+
+#define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44
+#define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45
+#define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46
+#define PCI_DEVICE_ID_ATI_RADEON_NG 0x4e47
+
+#define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59
+#define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a
+
+#define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57
+#define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58
+
+#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4c64
+#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4c65
+#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4c66
+#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4c67
+
+#define PCI_DEVICE_ID_ATI_RS100 0xcab0
+#define PCI_DEVICE_ID_ATI_RS200 0xcab2
+#define PCI_DEVICE_ID_ATI_RS200_B 0xcbb2
+#define PCI_DEVICE_ID_ATI_RS250 0xcab3
+#define PCI_DEVICE_ID_ATI_RS300_100 0x5830
+#define PCI_DEVICE_ID_ATI_RS300_133 0x5831
+#define PCI_DEVICE_ID_ATI_RS300_166 0x5832
+#define PCI_DEVICE_ID_ATI_RS300_200 0x5833
+#define PCI_DEVICE_ID_ATI_RS350_100 0x7830
+#define PCI_DEVICE_ID_ATI_RS350_133 0x7831
+#define PCI_DEVICE_ID_ATI_RS350_166 0x7832
+#define PCI_DEVICE_ID_ATI_RS350_200 0x7833
+#define PCI_DEVICE_ID_ATI_RS400_100 0x5a30
+#define PCI_DEVICE_ID_ATI_RS400_133 0x5a31
+#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32
+#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33
+#define PCI_DEVICE_ID_ATI_RS480 0x5950
+
+#define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349
+#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353
+#define PCI_DEVICE_ID_ATI_IXP300_SMBUS 0x4363
+#define PCI_DEVICE_ID_ATI_IXP300_IDE 0x4369
+#define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e
+#define PCI_DEVICE_ID_ATI_IXP400_SMBUS 0x4372
+#define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376
+#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
+#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
+#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
+#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
+#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
+
+#define PCI_VENDOR_ID_VLSI 0x1004
+#define PCI_DEVICE_ID_VLSI_82C592 0x0005
+#define PCI_DEVICE_ID_VLSI_82C593 0x0006
+#define PCI_DEVICE_ID_VLSI_82C594 0x0007
+#define PCI_DEVICE_ID_VLSI_82C597 0x0009
+#define PCI_DEVICE_ID_VLSI_82C541 0x000c
+#define PCI_DEVICE_ID_VLSI_82C543 0x000d
+#define PCI_DEVICE_ID_VLSI_82C532 0x0101
+#define PCI_DEVICE_ID_VLSI_82C534 0x0102
+#define PCI_DEVICE_ID_VLSI_82C535 0x0104
+#define PCI_DEVICE_ID_VLSI_82C147 0x0105
+#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702
+
+#define PCI_VENDOR_ID_ADL 0x1005
+#define PCI_DEVICE_ID_ADL_2301 0x2301
+
+#define PCI_VENDOR_ID_NS 0x100b
+#define PCI_DEVICE_ID_NS_87415 0x0002
+#define PCI_DEVICE_ID_NS_87560_LIO 0x000e
+#define PCI_DEVICE_ID_NS_87560_USB 0x0012
+#define PCI_DEVICE_ID_NS_83815 0x0020
+#define PCI_DEVICE_ID_NS_83820 0x0022
+#define PCI_DEVICE_ID_NS_CS5535_ISA 0x002b
+#define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d
+#define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e
+#define PCI_DEVICE_ID_NS_CS5535_USB 0x002f
+#define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030
+#define PCI_DEVICE_ID_NS_SATURN 0x0035
+#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500
+#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501
+#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502
+#define PCI_DEVICE_ID_NS_SCx200_AUDIO 0x0503
+#define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504
+#define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505
+#define PCI_DEVICE_ID_NS_SC1100_BRIDGE 0x0510
+#define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511
+#define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515
+#define PCI_DEVICE_ID_NS_87410 0xd001
+
+#define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028
+#define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b
+
+#define PCI_VENDOR_ID_TSENG 0x100c
+#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202
+#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205
+#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206
+#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207
+#define PCI_DEVICE_ID_TSENG_ET6000 0x3208
+
+#define PCI_VENDOR_ID_WEITEK 0x100e
+#define PCI_DEVICE_ID_WEITEK_P9000 0x9001
+#define PCI_DEVICE_ID_WEITEK_P9100 0x9100
+
+#define PCI_VENDOR_ID_DEC 0x1011
+#define PCI_DEVICE_ID_DEC_BRD 0x0001
+#define PCI_DEVICE_ID_DEC_TULIP 0x0002
+#define PCI_DEVICE_ID_DEC_TGA 0x0004
+#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009
+#define PCI_DEVICE_ID_DEC_TGA2 0x000D
+#define PCI_DEVICE_ID_DEC_FDDI 0x000F
+#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014
+#define PCI_DEVICE_ID_DEC_21142 0x0019
+#define PCI_DEVICE_ID_DEC_21052 0x0021
+#define PCI_DEVICE_ID_DEC_21150 0x0022
+#define PCI_DEVICE_ID_DEC_21152 0x0024
+#define PCI_DEVICE_ID_DEC_21153 0x0025
+#define PCI_DEVICE_ID_DEC_21154 0x0026
+#define PCI_DEVICE_ID_DEC_21285 0x1065
+#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046
+
+#define PCI_VENDOR_ID_CIRRUS 0x1013
+#define PCI_DEVICE_ID_CIRRUS_7548 0x0038
+#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0
+#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4
+#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
+#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
+#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8
+#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc
+#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0
+#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4
+#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6
+#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
+#define PCI_DEVICE_ID_CIRRUS_6832 0x1110
+#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
+#define PCI_DEVICE_ID_CIRRUS_4610 0x6001
+#define PCI_DEVICE_ID_CIRRUS_4612 0x6003
+#define PCI_DEVICE_ID_CIRRUS_4615 0x6004
+
+#define PCI_VENDOR_ID_IBM 0x1014
+#define PCI_DEVICE_ID_IBM_TR 0x0018
+#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e
+#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc
+#define PCI_DEVICE_ID_IBM_SNIPE 0x0180
+#define PCI_DEVICE_ID_IBM_CITRINE 0x028C
+#define PCI_DEVICE_ID_IBM_GEMSTONE 0xB166
+#define PCI_DEVICE_ID_IBM_OBSIDIAN 0x02BD
+#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_1 0x0031
+#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219
+#define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A
+#define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251
+#define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252
+
+#define PCI_VENDOR_ID_COMPEX2 0x101a
+#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005
+
+#define PCI_VENDOR_ID_WD 0x101c
+#define PCI_DEVICE_ID_WD_90C 0xc24a
+
+#define PCI_VENDOR_ID_AMI 0x101e
+#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960
+#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010
+#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060
+
+#define PCI_VENDOR_ID_AMD 0x1022
+#define PCI_DEVICE_ID_AMD_K8_NB 0x1100
+#define PCI_DEVICE_ID_AMD_LANCE 0x2000
+#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
+#define PCI_DEVICE_ID_AMD_SCSI 0x2020
+#define PCI_DEVICE_ID_AMD_SERENADE 0x36c0
+#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006
+#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007
+#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C
+#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E
+#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401
+#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409
+#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B
+#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410
+#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411
+#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413
+#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440
+#define PCI_DEVICE_ID_AMD_OPUS_7441 0x7441
+#define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443
+#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443
+#define PCI_DEVICE_ID_AMD_OPUS_7445 0x7445
+#define PCI_DEVICE_ID_AMD_8111_LPC 0x7468
+#define PCI_DEVICE_ID_AMD_8111_IDE 0x7469
+#define PCI_DEVICE_ID_AMD_8111_SMBUS2 0x746a
+#define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b
+#define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d
+#define PCI_DEVICE_ID_AMD_8151_0 0x7454
+#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
+#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451
+#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090
+#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091
+#define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093
+#define PCI_DEVICE_ID_AMD_CS5536_OHC 0x2094
+#define PCI_DEVICE_ID_AMD_CS5536_EHC 0x2095
+#define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096
+#define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097
+#define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A
+
+#define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081
+#define PCI_DEVICE_ID_AMD_LX_AES 0x2082
+
+#define PCI_VENDOR_ID_TRIDENT 0x1023
+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000
+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001
+#define PCI_DEVICE_ID_TRIDENT_9320 0x9320
+#define PCI_DEVICE_ID_TRIDENT_9388 0x9388
+#define PCI_DEVICE_ID_TRIDENT_9397 0x9397
+#define PCI_DEVICE_ID_TRIDENT_939A 0x939A
+#define PCI_DEVICE_ID_TRIDENT_9520 0x9520
+#define PCI_DEVICE_ID_TRIDENT_9525 0x9525
+#define PCI_DEVICE_ID_TRIDENT_9420 0x9420
+#define PCI_DEVICE_ID_TRIDENT_9440 0x9440
+#define PCI_DEVICE_ID_TRIDENT_9660 0x9660
+#define PCI_DEVICE_ID_TRIDENT_9750 0x9750
+#define PCI_DEVICE_ID_TRIDENT_9850 0x9850
+#define PCI_DEVICE_ID_TRIDENT_9880 0x9880
+#define PCI_DEVICE_ID_TRIDENT_8400 0x8400
+#define PCI_DEVICE_ID_TRIDENT_8420 0x8420
+#define PCI_DEVICE_ID_TRIDENT_8500 0x8500
+
+#define PCI_VENDOR_ID_AI 0x1025
+#define PCI_DEVICE_ID_AI_M1435 0x1435
+
+#define PCI_VENDOR_ID_DELL 0x1028
+#define PCI_DEVICE_ID_DELL_RACIII 0x0008
+#define PCI_DEVICE_ID_DELL_RAC4 0x0012
+#define PCI_DEVICE_ID_DELL_PERC5 0x0015
+
+#define PCI_VENDOR_ID_MATROX 0x102B
+#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518
+#define PCI_DEVICE_ID_MATROX_MIL 0x0519
+#define PCI_DEVICE_ID_MATROX_MYS 0x051A
+#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b
+#define PCI_DEVICE_ID_MATROX_MYS_AGP 0x051e
+#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f
+#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10
+#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000
+#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001
+#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
+#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521
+#define PCI_DEVICE_ID_MATROX_G400 0x0525
+#define PCI_DEVICE_ID_MATROX_G550 0x2527
+#define PCI_DEVICE_ID_MATROX_VIA 0x4536
+
+#define PCI_VENDOR_ID_CT 0x102c
+#define PCI_DEVICE_ID_CT_69000 0x00c0
+#define PCI_DEVICE_ID_CT_65545 0x00d8
+#define PCI_DEVICE_ID_CT_65548 0x00dc
+#define PCI_DEVICE_ID_CT_65550 0x00e0
+#define PCI_DEVICE_ID_CT_65554 0x00e4
+#define PCI_DEVICE_ID_CT_65555 0x00e5
+
+#define PCI_VENDOR_ID_MIRO 0x1031
+#define PCI_DEVICE_ID_MIRO_36050 0x5601
+#define PCI_DEVICE_ID_MIRO_DC10PLUS 0x7efe
+#define PCI_DEVICE_ID_MIRO_DC30PLUS 0xd801
+
+#define PCI_VENDOR_ID_NEC 0x1033
+#define PCI_DEVICE_ID_NEC_CBUS_1 0x0001
+#define PCI_DEVICE_ID_NEC_LOCAL 0x0002
+#define PCI_DEVICE_ID_NEC_ATM 0x0003
+#define PCI_DEVICE_ID_NEC_R4000 0x0004
+#define PCI_DEVICE_ID_NEC_486 0x0005
+#define PCI_DEVICE_ID_NEC_ACCEL_1 0x0006
+#define PCI_DEVICE_ID_NEC_UXBUS 0x0007
+#define PCI_DEVICE_ID_NEC_ACCEL_2 0x0008
+#define PCI_DEVICE_ID_NEC_GRAPH 0x0009
+#define PCI_DEVICE_ID_NEC_VL 0x0016
+#define PCI_DEVICE_ID_NEC_STARALPHA2 0x002c
+#define PCI_DEVICE_ID_NEC_CBUS_2 0x002d
+#define PCI_DEVICE_ID_NEC_USB 0x0035
+#define PCI_DEVICE_ID_NEC_CBUS_3 0x003b
+#define PCI_DEVICE_ID_NEC_NAPCCARD 0x003e
+#define PCI_DEVICE_ID_NEC_PCX2 0x0046
+#define PCI_DEVICE_ID_NEC_NILE4 0x005a
+#define PCI_DEVICE_ID_NEC_VRC5476 0x009b
+#define PCI_DEVICE_ID_NEC_VRC4173 0x00a5
+#define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6
+#define PCI_DEVICE_ID_NEC_PC9821CS01 0x800c
+#define PCI_DEVICE_ID_NEC_PC9821NRB06 0x800d
+
+#define PCI_VENDOR_ID_FD 0x1036
+#define PCI_DEVICE_ID_FD_36C70 0x0000
+
+#define PCI_VENDOR_ID_SI 0x1039
+#define PCI_DEVICE_ID_SI_5591_AGP 0x0001
+#define PCI_DEVICE_ID_SI_6202 0x0002
+#define PCI_DEVICE_ID_SI_503 0x0008
+#define PCI_DEVICE_ID_SI_ACPI 0x0009
+#define PCI_DEVICE_ID_SI_SMBUS 0x0016
+#define PCI_DEVICE_ID_SI_LPC 0x0018
+#define PCI_DEVICE_ID_SI_5597_VGA 0x0200
+#define PCI_DEVICE_ID_SI_6205 0x0205
+#define PCI_DEVICE_ID_SI_501 0x0406
+#define PCI_DEVICE_ID_SI_496 0x0496
+#define PCI_DEVICE_ID_SI_300 0x0300
+#define PCI_DEVICE_ID_SI_315H 0x0310
+#define PCI_DEVICE_ID_SI_315 0x0315
+#define PCI_DEVICE_ID_SI_315PRO 0x0325
+#define PCI_DEVICE_ID_SI_530 0x0530
+#define PCI_DEVICE_ID_SI_540 0x0540
+#define PCI_DEVICE_ID_SI_550 0x0550
+#define PCI_DEVICE_ID_SI_540_VGA 0x5300
+#define PCI_DEVICE_ID_SI_550_VGA 0x5315
+#define PCI_DEVICE_ID_SI_620 0x0620
+#define PCI_DEVICE_ID_SI_630 0x0630
+#define PCI_DEVICE_ID_SI_633 0x0633
+#define PCI_DEVICE_ID_SI_635 0x0635
+#define PCI_DEVICE_ID_SI_640 0x0640
+#define PCI_DEVICE_ID_SI_645 0x0645
+#define PCI_DEVICE_ID_SI_646 0x0646
+#define PCI_DEVICE_ID_SI_648 0x0648
+#define PCI_DEVICE_ID_SI_650 0x0650
+#define PCI_DEVICE_ID_SI_651 0x0651
+#define PCI_DEVICE_ID_SI_655 0x0655
+#define PCI_DEVICE_ID_SI_661 0x0661
+#define PCI_DEVICE_ID_SI_730 0x0730
+#define PCI_DEVICE_ID_SI_733 0x0733
+#define PCI_DEVICE_ID_SI_630_VGA 0x6300
+#define PCI_DEVICE_ID_SI_735 0x0735
+#define PCI_DEVICE_ID_SI_740 0x0740
+#define PCI_DEVICE_ID_SI_741 0x0741
+#define PCI_DEVICE_ID_SI_745 0x0745
+#define PCI_DEVICE_ID_SI_746 0x0746
+#define PCI_DEVICE_ID_SI_755 0x0755
+#define PCI_DEVICE_ID_SI_760 0x0760
+#define PCI_DEVICE_ID_SI_900 0x0900
+#define PCI_DEVICE_ID_SI_961 0x0961
+#define PCI_DEVICE_ID_SI_962 0x0962
+#define PCI_DEVICE_ID_SI_963 0x0963
+#define PCI_DEVICE_ID_SI_965 0x0965
+#define PCI_DEVICE_ID_SI_966 0x0966
+#define PCI_DEVICE_ID_SI_968 0x0968
+#define PCI_DEVICE_ID_SI_5511 0x5511
+#define PCI_DEVICE_ID_SI_5513 0x5513
+#define PCI_DEVICE_ID_SI_5517 0x5517
+#define PCI_DEVICE_ID_SI_5518 0x5518
+#define PCI_DEVICE_ID_SI_5571 0x5571
+#define PCI_DEVICE_ID_SI_5581 0x5581
+#define PCI_DEVICE_ID_SI_5582 0x5582
+#define PCI_DEVICE_ID_SI_5591 0x5591
+#define PCI_DEVICE_ID_SI_5596 0x5596
+#define PCI_DEVICE_ID_SI_5597 0x5597
+#define PCI_DEVICE_ID_SI_5598 0x5598
+#define PCI_DEVICE_ID_SI_5600 0x5600
+#define PCI_DEVICE_ID_SI_7012 0x7012
+#define PCI_DEVICE_ID_SI_7013 0x7013
+#define PCI_DEVICE_ID_SI_7016 0x7016
+#define PCI_DEVICE_ID_SI_7018 0x7018
+
+#define PCI_VENDOR_ID_HP 0x103c
+#define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX2 0x100a
+#define PCI_DEVICE_ID_HP_TACHYON 0x1028
+#define PCI_DEVICE_ID_HP_TACHLITE 0x1029
+#define PCI_DEVICE_ID_HP_J2585A 0x1030
+#define PCI_DEVICE_ID_HP_J2585B 0x1031
+#define PCI_DEVICE_ID_HP_J2973A 0x1040
+#define PCI_DEVICE_ID_HP_J2970A 0x1042
+#define PCI_DEVICE_ID_HP_DIVA 0x1048
+#define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
+#define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
+#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
+#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1
+#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b
+#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
+#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
+#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
+#define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a
+#define PCI_DEVICE_ID_HP_PCIX_LBA 0x122e
+#define PCI_DEVICE_ID_HP_SX1000_IOC 0x127c
+#define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282
+#define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290
+#define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301
+#define PCI_DEVICE_ID_HP_DIVA_HURRICANE 0x132a
+#define PCI_DEVICE_ID_HP_CISSA 0x3220
+#define PCI_DEVICE_ID_HP_CISSC 0x3230
+#define PCI_DEVICE_ID_HP_CISSD 0x3238
+#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
+
+#define PCI_VENDOR_ID_PCTECH 0x1042
+#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000
+#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001
+#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020
+
+#define PCI_VENDOR_ID_ASUSTEK 0x1043
+#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675
+
+#define PCI_VENDOR_ID_DPT 0x1044
+#define PCI_DEVICE_ID_DPT 0xa400
+
+#define PCI_VENDOR_ID_OPTI 0x1045
+#define PCI_DEVICE_ID_OPTI_82C558 0xc558
+#define PCI_DEVICE_ID_OPTI_82C621 0xc621
+#define PCI_DEVICE_ID_OPTI_82C700 0xc700
+#define PCI_DEVICE_ID_OPTI_82C825 0xd568
+
+#define PCI_VENDOR_ID_ELSA 0x1048
+#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000
+#define PCI_DEVICE_ID_ELSA_QS3000 0x3000
+
+#define PCI_VENDOR_ID_BUSLOGIC 0x104B
+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140
+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040
+#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130
+
+#define PCI_VENDOR_ID_TI 0x104c
+#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
+#define PCI_DEVICE_ID_TI_4450 0x8011
+#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
+#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034
+#define PCI_DEVICE_ID_TI_X515 0x8036
+#define PCI_DEVICE_ID_TI_XX12 0x8039
+#define PCI_DEVICE_ID_TI_1130 0xac12
+#define PCI_DEVICE_ID_TI_1031 0xac13
+#define PCI_DEVICE_ID_TI_1131 0xac15
+#define PCI_DEVICE_ID_TI_1250 0xac16
+#define PCI_DEVICE_ID_TI_1220 0xac17
+#define PCI_DEVICE_ID_TI_1221 0xac19
+#define PCI_DEVICE_ID_TI_1210 0xac1a
+#define PCI_DEVICE_ID_TI_1450 0xac1b
+#define PCI_DEVICE_ID_TI_1225 0xac1c
+#define PCI_DEVICE_ID_TI_1251A 0xac1d
+#define PCI_DEVICE_ID_TI_1211 0xac1e
+#define PCI_DEVICE_ID_TI_1251B 0xac1f
+#define PCI_DEVICE_ID_TI_4410 0xac41
+#define PCI_DEVICE_ID_TI_4451 0xac42
+#define PCI_DEVICE_ID_TI_4510 0xac44
+#define PCI_DEVICE_ID_TI_4520 0xac46
+#define PCI_DEVICE_ID_TI_7510 0xac47
+#define PCI_DEVICE_ID_TI_7610 0xac48
+#define PCI_DEVICE_ID_TI_7410 0xac49
+#define PCI_DEVICE_ID_TI_1410 0xac50
+#define PCI_DEVICE_ID_TI_1420 0xac51
+#define PCI_DEVICE_ID_TI_1451A 0xac52
+#define PCI_DEVICE_ID_TI_1620 0xac54
+#define PCI_DEVICE_ID_TI_1520 0xac55
+#define PCI_DEVICE_ID_TI_1510 0xac56
+#define PCI_DEVICE_ID_TI_X620 0xac8d
+#define PCI_DEVICE_ID_TI_X420 0xac8e
+
+#define PCI_VENDOR_ID_SONY 0x104d
+
+#define PCI_VENDOR_ID_WINBOND2 0x1050
+#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a
+#define PCI_DEVICE_ID_WINBOND2_6692 0x6692
+
+#define PCI_VENDOR_ID_ANIGMA 0x1051
+#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100
+
+#define PCI_VENDOR_ID_EFAR 0x1055
+#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130
+#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463
+
+#define PCI_VENDOR_ID_MOTOROLA 0x1057
+#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001
+#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002
+#define PCI_DEVICE_ID_MOTOROLA_MPC107 0x0004
+#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
+#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802
+#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803
+#define PCI_DEVICE_ID_MOTOROLA_HARRIER 0x480b
+#define PCI_DEVICE_ID_MOTOROLA_MPC5200 0x5803
+#define PCI_DEVICE_ID_MOTOROLA_MPC5200B 0x5809
+
+#define PCI_VENDOR_ID_PROMISE 0x105a
+#define PCI_DEVICE_ID_PROMISE_20265 0x0d30
+#define PCI_DEVICE_ID_PROMISE_20267 0x4d30
+#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
+#define PCI_DEVICE_ID_PROMISE_20262 0x4d38
+#define PCI_DEVICE_ID_PROMISE_20263 0x0D38
+#define PCI_DEVICE_ID_PROMISE_20268 0x4d68
+#define PCI_DEVICE_ID_PROMISE_20269 0x4d69
+#define PCI_DEVICE_ID_PROMISE_20270 0x6268
+#define PCI_DEVICE_ID_PROMISE_20271 0x6269
+#define PCI_DEVICE_ID_PROMISE_20275 0x1275
+#define PCI_DEVICE_ID_PROMISE_20276 0x5275
+#define PCI_DEVICE_ID_PROMISE_20277 0x7275
+
+#define PCI_VENDOR_ID_UMC 0x1060
+#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
+#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
+#define PCI_DEVICE_ID_UMC_UM8886A 0x886a
+
+#define PCI_VENDOR_ID_MYLEX 0x1069
+#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001
+#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002
+#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010
+#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020
+#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050
+#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56
+#define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166
+
+#define PCI_VENDOR_ID_APPLE 0x106b
+#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
+#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
+#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMACP 0x0024
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d
+#define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032
+#define PCI_DEVICE_ID_APPLE_UNI_N_ATA 0x0033
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034
+#define PCI_DEVICE_ID_APPLE_IPID_ATA100 0x003b
+#define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043
+#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b
+#define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c
+#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050
+#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
+#define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058
+#define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059
+#define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
+#define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
+#define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
+#define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b
+#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
+
+#define PCI_VENDOR_ID_YAMAHA 0x1073
+#define PCI_DEVICE_ID_YAMAHA_724 0x0004
+#define PCI_DEVICE_ID_YAMAHA_724F 0x000d
+#define PCI_DEVICE_ID_YAMAHA_740 0x000a
+#define PCI_DEVICE_ID_YAMAHA_740C 0x000c
+#define PCI_DEVICE_ID_YAMAHA_744 0x0010
+#define PCI_DEVICE_ID_YAMAHA_754 0x0012
+
+#define PCI_VENDOR_ID_QLOGIC 0x1077
+#define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016
+#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020
+#define PCI_DEVICE_ID_QLOGIC_ISP1080 0x1080
+#define PCI_DEVICE_ID_QLOGIC_ISP12160 0x1216
+#define PCI_DEVICE_ID_QLOGIC_ISP1240 0x1240
+#define PCI_DEVICE_ID_QLOGIC_ISP1280 0x1280
+#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100
+#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200
+#define PCI_DEVICE_ID_QLOGIC_ISP2300 0x2300
+#define PCI_DEVICE_ID_QLOGIC_ISP2312 0x2312
+#define PCI_DEVICE_ID_QLOGIC_ISP2322 0x2322
+#define PCI_DEVICE_ID_QLOGIC_ISP6312 0x6312
+#define PCI_DEVICE_ID_QLOGIC_ISP6322 0x6322
+#define PCI_DEVICE_ID_QLOGIC_ISP2422 0x2422
+#define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432
+#define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512
+#define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522
+#define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422
+#define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432
+
+#define PCI_VENDOR_ID_CYRIX 0x1078
+#define PCI_DEVICE_ID_CYRIX_5510 0x0000
+#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001
+#define PCI_DEVICE_ID_CYRIX_5520 0x0002
+#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100
+#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102
+#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103
+#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104
+
+#define PCI_VENDOR_ID_CONTAQ 0x1080
+#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693
+
+#define PCI_VENDOR_ID_OLICOM 0x108d
+#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012
+#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013
+#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014
+
+#define PCI_VENDOR_ID_SUN 0x108e
+#define PCI_DEVICE_ID_SUN_EBUS 0x1000
+#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001
+#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100
+#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101
+#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102
+#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103
+#define PCI_DEVICE_ID_SUN_GEM 0x2bad
+#define PCI_DEVICE_ID_SUN_SIMBA 0x5000
+#define PCI_DEVICE_ID_SUN_PBM 0x8000
+#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001
+#define PCI_DEVICE_ID_SUN_SABRE 0xa000
+#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
+#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801
+#define PCI_DEVICE_ID_SUN_CASSINI 0xabba
+
+#define PCI_VENDOR_ID_CMD 0x1095
+#define PCI_DEVICE_ID_CMD_643 0x0643
+#define PCI_DEVICE_ID_CMD_646 0x0646
+#define PCI_DEVICE_ID_CMD_648 0x0648
+#define PCI_DEVICE_ID_CMD_649 0x0649
+
+#define PCI_DEVICE_ID_SII_680 0x0680
+#define PCI_DEVICE_ID_SII_3112 0x3112
+#define PCI_DEVICE_ID_SII_1210SA 0x0240
+
+#define PCI_VENDOR_ID_BROOKTREE 0x109e
+#define PCI_DEVICE_ID_BROOKTREE_878 0x0878
+#define PCI_DEVICE_ID_BROOKTREE_879 0x0879
+
+#define PCI_VENDOR_ID_SGI 0x10a9
+#define PCI_DEVICE_ID_SGI_IOC3 0x0003
+#define PCI_DEVICE_ID_SGI_IOC4 0x100a
+#define PCI_VENDOR_ID_SGI_LITHIUM 0x1002
+
+#define PCI_VENDOR_ID_WINBOND 0x10ad
+#define PCI_DEVICE_ID_WINBOND_82C105 0x0105
+#define PCI_DEVICE_ID_WINBOND_83C553 0x0565
+
+#define PCI_VENDOR_ID_PLX 0x10b5
+#define PCI_DEVICE_ID_PLX_R685 0x1030
+#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a
+#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076
+#define PCI_DEVICE_ID_PLX_1077 0x1077
+#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103
+#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151
+#define PCI_DEVICE_ID_PLX_R753 0x1152
+#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
+#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
+#define PCI_DEVICE_ID_PLX_9050 0x9050
+#define PCI_DEVICE_ID_PLX_9080 0x9080
+#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
+
+#define PCI_VENDOR_ID_MADGE 0x10b6
+#define PCI_DEVICE_ID_MADGE_MK2 0x0002
+
+#define PCI_VENDOR_ID_3COM 0x10b7
+#define PCI_DEVICE_ID_3COM_3C985 0x0001
+#define PCI_DEVICE_ID_3COM_3C940 0x1700
+#define PCI_DEVICE_ID_3COM_3C339 0x3390
+#define PCI_DEVICE_ID_3COM_3C359 0x3590
+#define PCI_DEVICE_ID_3COM_3C940B 0x80eb
+#define PCI_DEVICE_ID_3COM_3CR990 0x9900
+#define PCI_DEVICE_ID_3COM_3CR990_TX_95 0x9902
+#define PCI_DEVICE_ID_3COM_3CR990_TX_97 0x9903
+#define PCI_DEVICE_ID_3COM_3CR990B 0x9904
+#define PCI_DEVICE_ID_3COM_3CR990_FX 0x9905
+#define PCI_DEVICE_ID_3COM_3CR990SVR95 0x9908
+#define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909
+#define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a
+
+#define PCI_VENDOR_ID_AL 0x10b9
+#define PCI_DEVICE_ID_AL_M1533 0x1533
+#define PCI_DEVICE_ID_AL_M1535 0x1535
+#define PCI_DEVICE_ID_AL_M1541 0x1541
+#define PCI_DEVICE_ID_AL_M1563 0x1563
+#define PCI_DEVICE_ID_AL_M1621 0x1621
+#define PCI_DEVICE_ID_AL_M1631 0x1631
+#define PCI_DEVICE_ID_AL_M1632 0x1632
+#define PCI_DEVICE_ID_AL_M1641 0x1641
+#define PCI_DEVICE_ID_AL_M1644 0x1644
+#define PCI_DEVICE_ID_AL_M1647 0x1647
+#define PCI_DEVICE_ID_AL_M1651 0x1651
+#define PCI_DEVICE_ID_AL_M1671 0x1671
+#define PCI_DEVICE_ID_AL_M1681 0x1681
+#define PCI_DEVICE_ID_AL_M1683 0x1683
+#define PCI_DEVICE_ID_AL_M1689 0x1689
+#define PCI_DEVICE_ID_AL_M5219 0x5219
+#define PCI_DEVICE_ID_AL_M5228 0x5228
+#define PCI_DEVICE_ID_AL_M5229 0x5229
+#define PCI_DEVICE_ID_AL_M5451 0x5451
+#define PCI_DEVICE_ID_AL_M7101 0x7101
+
+#define PCI_VENDOR_ID_NEOMAGIC 0x10c8
+#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
+#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
+#define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016
+
+#define PCI_VENDOR_ID_TCONRAD 0x10da
+#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508
+
+#define PCI_VENDOR_ID_NVIDIA 0x10de
+#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020
+#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028
+#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029
+#define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a
+#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C
+#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036
+#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037
+#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_LE 0x0042
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x0045
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_4000 0x004E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS 0x0052
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055
+#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
+#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
+#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
+#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
+#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
+#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069
+#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085
+#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086
+#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089
+#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a
+#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800 0x0098
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800_GTX 0x0099
+#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0
+#define PCI_DEVICE_ID_GEFORCE_6800A 0x00c1
+#define PCI_DEVICE_ID_GEFORCE_6800A_LE 0x00c2
+#define PCI_DEVICE_ID_GEFORCE_GO_6800 0x00c8
+#define PCI_DEVICE_ID_GEFORCE_GO_6800_ULTRA 0x00c9
+#define PCI_DEVICE_ID_QUADRO_FX_GO1400 0x00cc
+#define PCI_DEVICE_ID_QUADRO_FX_1400 0x00ce
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
+#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9
+#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
+#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6
+#define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT1 0x00f1
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT2 0x00f2
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6200_ALT1 0x00f3
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x00f9
+#define PCIE_DEVICE_ID_NVIDIA_QUADRO_NVS280 0x00fd
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101
+#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO 0x0112
+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600_GT 0x0140
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600 0x0141
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6610_XL 0x0145
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_540 0x014E
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200 0x014F
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152
+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200_TURBOCACHE 0x0161
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200 0x0164
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250 0x0166
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200_1 0x0167
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250_1 0x0168
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460 0x0170
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440 0x0171
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420 0x0172
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_SE 0x0173
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO 0x0174
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO 0x0175
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32 0x0176
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_460_GO 0x0177
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL 0x0178
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64 0x0179
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_200 0x017A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL 0x017B
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL 0x017C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_410_GO_M16 0x017D
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_MAC 0x0189
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_280_NVS 0x018A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_380_XGL 0x018B
+#define PCI_DEVICE_ID_NVIDIA_IGEFORCE2 0x01a0
+#define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4
+#define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc
+#define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1
+#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_2 0x0202
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_DDC 0x0203
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B 0x0211
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_LE 0x0212
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_GT 0x0215
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600 0x0250
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400 0x0251
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200 0x0253
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS 0x0264
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F
+#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
+#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_4200_GO 0x0286
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_980_XGL 0x0288
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_780_XGL 0x0289
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700_GOGL 0x028C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA 0x0301
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800 0x0302
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_2000 0x0308
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1000 0x0309
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA 0x0311
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600 0x0312
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600SE 0x0314
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5600 0x031A
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5650 0x031B
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO700 0x031C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200 0x0320
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA 0x0321
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1 0x0322
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200SE 0x0323
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5200 0x0324
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250 0x0325
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5500 0x0326
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5100 0x0327
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250_32 0x0328
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200 0x0329
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_NVS_280_PCI 0x032A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_500 0x032B
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5300 0x032C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5100 0x032D
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA 0x0330
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900 0x0331
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900XT 0x0332
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA 0x0333
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900ZT 0x0334
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_3000 0x0338
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_700 0x033F
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA 0x0341
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700 0x0342
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700LE 0x0343
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700VE 0x0344
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_1 0x0347
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E
+#define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372
+#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373
+#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC
+#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE
+#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448
+#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450
+#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
+#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
+#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
+
+#define PCI_VENDOR_ID_IMS 0x10e0
+#define PCI_DEVICE_ID_IMS_TT128 0x9128
+#define PCI_DEVICE_ID_IMS_TT3D 0x9135
+
+#define PCI_VENDOR_ID_INTERG 0x10ea
+#define PCI_DEVICE_ID_INTERG_1682 0x1682
+#define PCI_DEVICE_ID_INTERG_2000 0x2000
+#define PCI_DEVICE_ID_INTERG_2010 0x2010
+#define PCI_DEVICE_ID_INTERG_5000 0x5000
+#define PCI_DEVICE_ID_INTERG_5050 0x5050
+
+#define PCI_VENDOR_ID_REALTEK 0x10ec
+#define PCI_DEVICE_ID_REALTEK_8139 0x8139
+
+#define PCI_VENDOR_ID_XILINX 0x10ee
+#define PCI_DEVICE_ID_RME_DIGI96 0x3fc0
+#define PCI_DEVICE_ID_RME_DIGI96_8 0x3fc1
+#define PCI_DEVICE_ID_RME_DIGI96_8_PRO 0x3fc2
+#define PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST 0x3fc3
+#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5
+#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6
+
+#define PCI_VENDOR_ID_INIT 0x1101
+
+#define PCI_VENDOR_ID_CREATIVE 0x1102
+#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002
+
+#define PCI_VENDOR_ID_ECTIVA 0x1102
+#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938
+
+#define PCI_VENDOR_ID_TTI 0x1103
+#define PCI_DEVICE_ID_TTI_HPT343 0x0003
+#define PCI_DEVICE_ID_TTI_HPT366 0x0004
+#define PCI_DEVICE_ID_TTI_HPT372 0x0005
+#define PCI_DEVICE_ID_TTI_HPT302 0x0006
+#define PCI_DEVICE_ID_TTI_HPT371 0x0007
+#define PCI_DEVICE_ID_TTI_HPT374 0x0008
+#define PCI_DEVICE_ID_TTI_HPT372N 0x0009
+
+#define PCI_VENDOR_ID_VIA 0x1106
+#define PCI_DEVICE_ID_VIA_8763_0 0x0198
+#define PCI_DEVICE_ID_VIA_8380_0 0x0204
+#define PCI_DEVICE_ID_VIA_3238_0 0x0238
+#define PCI_DEVICE_ID_VIA_PT880 0x0258
+#define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308
+#define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259
+#define PCI_DEVICE_ID_VIA_3269_0 0x0269
+#define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282
+#define PCI_DEVICE_ID_VIA_3296_0 0x0296
+#define PCI_DEVICE_ID_VIA_8363_0 0x0305
+#define PCI_DEVICE_ID_VIA_P4M800CE 0x0314
+#define PCI_DEVICE_ID_VIA_8371_0 0x0391
+#define PCI_DEVICE_ID_VIA_8501_0 0x0501
+#define PCI_DEVICE_ID_VIA_82C561 0x0561
+#define PCI_DEVICE_ID_VIA_82C586_1 0x0571
+#define PCI_DEVICE_ID_VIA_82C576 0x0576
+#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x0581
+#define PCI_DEVICE_ID_VIA_82C586_0 0x0586
+#define PCI_DEVICE_ID_VIA_82C596 0x0596
+#define PCI_DEVICE_ID_VIA_82C597_0 0x0597
+#define PCI_DEVICE_ID_VIA_82C598_0 0x0598
+#define PCI_DEVICE_ID_VIA_8601_0 0x0601
+#define PCI_DEVICE_ID_VIA_8605_0 0x0605
+#define PCI_DEVICE_ID_VIA_82C686 0x0686
+#define PCI_DEVICE_ID_VIA_82C691_0 0x0691
+#define PCI_DEVICE_ID_VIA_82C576_1 0x1571
+#define PCI_DEVICE_ID_VIA_82C586_2 0x3038
+#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
+#define PCI_DEVICE_ID_VIA_82C596_3 0x3050
+#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051
+#define PCI_DEVICE_ID_VIA_82C686_4 0x3057
+#define PCI_DEVICE_ID_VIA_82C686_5 0x3058
+#define PCI_DEVICE_ID_VIA_8233_5 0x3059
+#define PCI_DEVICE_ID_VIA_8233_0 0x3074
+#define PCI_DEVICE_ID_VIA_8633_0 0x3091
+#define PCI_DEVICE_ID_VIA_8367_0 0x3099
+#define PCI_DEVICE_ID_VIA_8653_0 0x3101
+#define PCI_DEVICE_ID_VIA_8622 0x3102
+#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104
+#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
+#define PCI_DEVICE_ID_VIA_8361 0x3112
+#define PCI_DEVICE_ID_VIA_XM266 0x3116
+#define PCI_DEVICE_ID_VIA_612X 0x3119
+#define PCI_DEVICE_ID_VIA_862X_0 0x3123
+#define PCI_DEVICE_ID_VIA_8753_0 0x3128
+#define PCI_DEVICE_ID_VIA_8233A 0x3147
+#define PCI_DEVICE_ID_VIA_8703_51_0 0x3148
+#define PCI_DEVICE_ID_VIA_8237_SATA 0x3149
+#define PCI_DEVICE_ID_VIA_XN266 0x3156
+#define PCI_DEVICE_ID_VIA_6410 0x3164
+#define PCI_DEVICE_ID_VIA_8754C_0 0x3168
+#define PCI_DEVICE_ID_VIA_8235 0x3177
+#define PCI_DEVICE_ID_VIA_8385_0 0x3188
+#define PCI_DEVICE_ID_VIA_8377_0 0x3189
+#define PCI_DEVICE_ID_VIA_8378_0 0x3205
+#define PCI_DEVICE_ID_VIA_8783_0 0x3208
+#define PCI_DEVICE_ID_VIA_8237 0x3227
+#define PCI_DEVICE_ID_VIA_8251 0x3287
+#define PCI_DEVICE_ID_VIA_8237A 0x3337
+#define PCI_DEVICE_ID_VIA_8231 0x8231
+#define PCI_DEVICE_ID_VIA_8231_4 0x8235
+#define PCI_DEVICE_ID_VIA_8365_1 0x8305
+#define PCI_DEVICE_ID_VIA_CX700 0x8324
+#define PCI_DEVICE_ID_VIA_8371_1 0x8391
+#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
+#define PCI_DEVICE_ID_VIA_838X_1 0xB188
+#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
+
+#define PCI_VENDOR_ID_SIEMENS 0x110A
+#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
+
+#define PCI_VENDOR_ID_VORTEX 0x1119
+#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000
+#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001
+#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002
+#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003
+#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004
+#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005
+#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006
+#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007
+#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008
+#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009
+#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a
+#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b
+#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c
+#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d
+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100
+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101
+#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102
+#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103
+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104
+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105
+
+#define PCI_VENDOR_ID_EF 0x111a
+#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000
+#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002
+#define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003
+#define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005
+
+#define PCI_VENDOR_ID_IDT 0x111d
+#define PCI_DEVICE_ID_IDT_IDT77201 0x0001
+
+#define PCI_VENDOR_ID_FORE 0x1127
+#define PCI_DEVICE_ID_FORE_PCA200E 0x0300
+
+#define PCI_VENDOR_ID_PHILIPS 0x1131
+#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146
+#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730
+
+#define PCI_VENDOR_ID_EICON 0x1133
+#define PCI_DEVICE_ID_EICON_DIVA20 0xe002
+#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004
+#define PCI_DEVICE_ID_EICON_DIVA201 0xe005
+#define PCI_DEVICE_ID_EICON_DIVA202 0xe00b
+#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010
+#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012
+#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013
+#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014
+
+#define PCI_VENDOR_ID_ZIATECH 0x1138
+#define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550
+
+#define PCI_VENDOR_ID_SYSKONNECT 0x1148
+#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200
+#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300
+#define PCI_DEVICE_ID_SYSKONNECT_YU 0x4320
+#define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400
+#define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500
+
+#define PCI_VENDOR_ID_DIGI 0x114f
+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070
+#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071
+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072
+#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073
+#define PCI_DEVICE_ID_NEO_2DB9 0x00C8
+#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9
+#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
+#define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB
+
+#define PCI_VENDOR_ID_XIRCOM 0x115d
+#define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101
+#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103
+
+#define PCI_VENDOR_ID_SERVERWORKS 0x1166
+#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008
+#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
+#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
+#define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
+#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
+#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
+#define PCI_DEVICE_ID_SERVERWORKS_HT1000SB 0x0205
+#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211
+#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213
+#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227
+
+#define PCI_VENDOR_ID_SBE 0x1176
+#define PCI_DEVICE_ID_SBE_WANXL100 0x0301
+#define PCI_DEVICE_ID_SBE_WANXL200 0x0302
+#define PCI_DEVICE_ID_SBE_WANXL400 0x0104
+
+#define PCI_VENDOR_ID_TOSHIBA 0x1179
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO 0x0102
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_1 0x0103
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_2 0x0105
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
+
+#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
+#define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030
+#define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108
+#define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3
+
+#define PCI_VENDOR_ID_RICOH 0x1180
+#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465
+#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
+#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
+#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
+#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
+#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
+
+#define PCI_VENDOR_ID_DLINK 0x1186
+#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
+
+#define PCI_VENDOR_ID_ARTOP 0x1191
+#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005
+#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006
+#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007
+#define PCI_DEVICE_ID_ARTOP_ATP865 0x0008
+#define PCI_DEVICE_ID_ARTOP_ATP865R 0x0009
+#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002
+#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010
+#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020
+#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030
+#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040
+#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050
+#define PCI_DEVICE_ID_ARTOP_8060 0x8060
+
+#define PCI_VENDOR_ID_ZEITNET 0x1193
+#define PCI_DEVICE_ID_ZEITNET_1221 0x0001
+#define PCI_DEVICE_ID_ZEITNET_1225 0x0002
+
+#define PCI_VENDOR_ID_FUJITSU_ME 0x119e
+#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001
+#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003
+
+#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9
+#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334
+
+#define PCI_VENDOR_ID_MARVELL 0x11ab
+#define PCI_DEVICE_ID_MARVELL_GT64111 0x4146
+#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430
+#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460
+#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480
+#define PCI_DEVICE_ID_MARVELL_GT96100 0x9652
+#define PCI_DEVICE_ID_MARVELL_GT96100A 0x9653
+
+#define PCI_VENDOR_ID_V3 0x11b0
+#define PCI_DEVICE_ID_V3_V960 0x0001
+#define PCI_DEVICE_ID_V3_V351 0x0002
+
+#define PCI_VENDOR_ID_ATT 0x11c1
+#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480
+
+#define PCI_VENDOR_ID_SPECIALIX 0x11cb
+#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000
+#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000
+#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004
+
+#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4
+#define PCI_DEVICE_ID_AD1889JS 0x1889
+
+#define PCI_DEVICE_ID_SEGA_BBA 0x1234
+
+#define PCI_VENDOR_ID_ZORAN 0x11de
+#define PCI_DEVICE_ID_ZORAN_36057 0x6057
+#define PCI_DEVICE_ID_ZORAN_36120 0x6120
+
+#define PCI_VENDOR_ID_COMPEX 0x11f6
+#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
+
+#define PCI_VENDOR_ID_RP 0x11fe
+#define PCI_DEVICE_ID_RP32INTF 0x0001
+#define PCI_DEVICE_ID_RP8INTF 0x0002
+#define PCI_DEVICE_ID_RP16INTF 0x0003
+#define PCI_DEVICE_ID_RP4QUAD 0x0004
+#define PCI_DEVICE_ID_RP8OCTA 0x0005
+#define PCI_DEVICE_ID_RP8J 0x0006
+#define PCI_DEVICE_ID_RP4J 0x0007
+#define PCI_DEVICE_ID_RP8SNI 0x0008
+#define PCI_DEVICE_ID_RP16SNI 0x0009
+#define PCI_DEVICE_ID_RPP4 0x000A
+#define PCI_DEVICE_ID_RPP8 0x000B
+#define PCI_DEVICE_ID_RP4M 0x000D
+#define PCI_DEVICE_ID_RP2_232 0x000E
+#define PCI_DEVICE_ID_RP2_422 0x000F
+#define PCI_DEVICE_ID_URP32INTF 0x0801
+#define PCI_DEVICE_ID_URP8INTF 0x0802
+#define PCI_DEVICE_ID_URP16INTF 0x0803
+#define PCI_DEVICE_ID_URP8OCTA 0x0805
+#define PCI_DEVICE_ID_UPCI_RM3_8PORT 0x080C
+#define PCI_DEVICE_ID_UPCI_RM3_4PORT 0x080D
+#define PCI_DEVICE_ID_CRP16INTF 0x0903
+
+#define PCI_VENDOR_ID_CYCLADES 0x120e
+#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100
+#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101
+#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102
+#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103
+#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104
+#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105
+#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200
+#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201
+#define PCI_DEVICE_ID_PC300_RX_2 0x0300
+#define PCI_DEVICE_ID_PC300_RX_1 0x0301
+#define PCI_DEVICE_ID_PC300_TE_2 0x0310
+#define PCI_DEVICE_ID_PC300_TE_1 0x0311
+#define PCI_DEVICE_ID_PC300_TE_M_2 0x0320
+#define PCI_DEVICE_ID_PC300_TE_M_1 0x0321
+
+#define PCI_VENDOR_ID_ESSENTIAL 0x120f
+#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001
+
+#define PCI_VENDOR_ID_O2 0x1217
+#define PCI_DEVICE_ID_O2_6729 0x6729
+#define PCI_DEVICE_ID_O2_6730 0x673a
+#define PCI_DEVICE_ID_O2_6832 0x6832
+#define PCI_DEVICE_ID_O2_6836 0x6836
+
+#define PCI_VENDOR_ID_3DFX 0x121a
+#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001
+#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002
+#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003
+#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005
+#define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009
+
+#define PCI_VENDOR_ID_AVM 0x1244
+#define PCI_DEVICE_ID_AVM_B1 0x0700
+#define PCI_DEVICE_ID_AVM_C4 0x0800
+#define PCI_DEVICE_ID_AVM_A1 0x0a00
+#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00
+#define PCI_DEVICE_ID_AVM_C2 0x1100
+#define PCI_DEVICE_ID_AVM_T1 0x1200
+
+#define PCI_VENDOR_ID_STALLION 0x124d
+
+#define PCI_VENDOR_ID_AT 0x1259
+#define PCI_SUBDEVICE_ID_AT_2700FX 0x2701
+#define PCI_SUBDEVICE_ID_AT_2701FX 0x2703
+
+#define PCI_VENDOR_ID_ESS 0x125d
+#define PCI_DEVICE_ID_ESS_ESS1968 0x1968
+#define PCI_DEVICE_ID_ESS_ESS1978 0x1978
+#define PCI_DEVICE_ID_ESS_ALLEGRO_1 0x1988
+#define PCI_DEVICE_ID_ESS_ALLEGRO 0x1989
+#define PCI_DEVICE_ID_ESS_CANYON3D_2LE 0x1990
+#define PCI_DEVICE_ID_ESS_CANYON3D_2 0x1992
+#define PCI_DEVICE_ID_ESS_MAESTRO3 0x1998
+#define PCI_DEVICE_ID_ESS_MAESTRO3_1 0x1999
+#define PCI_DEVICE_ID_ESS_MAESTRO3_HW 0x199a
+#define PCI_DEVICE_ID_ESS_MAESTRO3_2 0x199b
+
+#define PCI_VENDOR_ID_SATSAGEM 0x1267
+#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016
+
+#define PCI_VENDOR_ID_ENSONIQ 0x1274
+#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880
+#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000
+#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371
+
+#define PCI_VENDOR_ID_TRANSMETA 0x1279
+#define PCI_DEVICE_ID_EFFICEON 0x0060
+
+#define PCI_VENDOR_ID_ROCKWELL 0x127A
+
+#define PCI_VENDOR_ID_ITE 0x1283
+#define PCI_DEVICE_ID_ITE_IT8172G 0x8172
+#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801
+#define PCI_DEVICE_ID_ITE_8211 0x8211
+#define PCI_DEVICE_ID_ITE_8212 0x8212
+#define PCI_DEVICE_ID_ITE_8872 0x8872
+#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
+
+#define PCI_DEVICE_ID_ESS_ESS0100 0x0100
+
+#define PCI_VENDOR_ID_ALTEON 0x12ae
+
+#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ 0x000C
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_PTM 0x000D
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_NT960PCI 0x0100
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2 0x0201
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4 0x0202
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232 0x0300
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232 0x0301
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232 0x0302
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1 0x0310
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2 0x0311
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4 0x0312
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2 0x0320
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4 0x0321
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8 0x0322
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485 0x0330
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332
+
+#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2
+#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018
+
+#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041
+#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D
+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001
+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010
+
+#define PCI_VENDOR_ID_AUREAL 0x12eb
+#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001
+#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002
+#define PCI_DEVICE_ID_AUREAL_ADVANTAGE 0x0003
+
+#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
+#define PCI_DEVICE_ID_LML_33R10 0x8a02
+
+#define PCI_VENDOR_ID_SIIG 0x131f
+#define PCI_SUBVENDOR_ID_SIIG 0x131f
+#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
+#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001
+#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012
+#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020
+#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021
+#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030
+#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031
+#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036
+#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050
+#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051
+#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052
+#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000
+#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001
+#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002
+#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020
+#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021
+#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030
+#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031
+#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012
+#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050
+#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051
+#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062
+#define PCI_DEVICE_ID_SIIG_8S_20x_550 0x2080
+#define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081
+#define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082
+#define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050
+
+#define PCI_VENDOR_ID_RADISYS 0x1331
+
+#define PCI_VENDOR_ID_DOMEX 0x134a
+#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001
+
+#define PCI_VENDOR_ID_INTASHIELD 0x135a
+#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80
+
+#define PCI_VENDOR_ID_QUATECH 0x135C
+#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010
+#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020
+#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050
+#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060
+
+#define PCI_VENDOR_ID_SEALEVEL 0x135e
+#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202
+#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401
+#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM8 0x7804
+
+#define PCI_VENDOR_ID_HYPERCOPE 0x1365
+#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050
+#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104
+#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106
+#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107
+#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108
+
+#define PCI_VENDOR_ID_KAWASAKI 0x136b
+#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01
+
+#define PCI_VENDOR_ID_CNET 0x1371
+#define PCI_DEVICE_ID_CNET_GIGACARD 0x434e
+
+#define PCI_VENDOR_ID_LMC 0x1376
+#define PCI_DEVICE_ID_LMC_HSSI 0x0003
+#define PCI_DEVICE_ID_LMC_DS3 0x0004
+#define PCI_DEVICE_ID_LMC_SSI 0x0005
+#define PCI_DEVICE_ID_LMC_T1 0x0006
+
+#define PCI_VENDOR_ID_NETGEAR 0x1385
+#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a
+
+#define PCI_VENDOR_ID_APPLICOM 0x1389
+#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001
+#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002
+#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003
+
+#define PCI_VENDOR_ID_MOXA 0x1393
+#define PCI_DEVICE_ID_MOXA_RC7000 0x0001
+#define PCI_DEVICE_ID_MOXA_CP102 0x1020
+#define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
+#define PCI_DEVICE_ID_MOXA_CP102U 0x1022
+#define PCI_DEVICE_ID_MOXA_C104 0x1040
+#define PCI_DEVICE_ID_MOXA_CP104U 0x1041
+#define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
+#define PCI_DEVICE_ID_MOXA_CT114 0x1140
+#define PCI_DEVICE_ID_MOXA_CP114 0x1141
+#define PCI_DEVICE_ID_MOXA_CP118U 0x1180
+#define PCI_DEVICE_ID_MOXA_CP132 0x1320
+#define PCI_DEVICE_ID_MOXA_CP132U 0x1321
+#define PCI_DEVICE_ID_MOXA_CP134U 0x1340
+#define PCI_DEVICE_ID_MOXA_C168 0x1680
+#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
+
+#define PCI_VENDOR_ID_CCD 0x1397
+#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0
+#define PCI_DEVICE_ID_CCD_B000 0xb000
+#define PCI_DEVICE_ID_CCD_B006 0xb006
+#define PCI_DEVICE_ID_CCD_B007 0xb007
+#define PCI_DEVICE_ID_CCD_B008 0xb008
+#define PCI_DEVICE_ID_CCD_B009 0xb009
+#define PCI_DEVICE_ID_CCD_B00A 0xb00a
+#define PCI_DEVICE_ID_CCD_B00B 0xb00b
+#define PCI_DEVICE_ID_CCD_B00C 0xb00c
+#define PCI_DEVICE_ID_CCD_B100 0xb100
+#define PCI_DEVICE_ID_CCD_B700 0xb700
+#define PCI_DEVICE_ID_CCD_B701 0xb701
+
+#define PCI_VENDOR_ID_EXAR 0x13a8
+#define PCI_DEVICE_ID_EXAR_XR17C152 0x0152
+#define PCI_DEVICE_ID_EXAR_XR17C154 0x0154
+#define PCI_DEVICE_ID_EXAR_XR17C158 0x0158
+
+#define PCI_VENDOR_ID_MICROGATE 0x13c0
+#define PCI_DEVICE_ID_MICROGATE_USC 0x0010
+#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030
+
+#define PCI_VENDOR_ID_3WARE 0x13C1
+#define PCI_DEVICE_ID_3WARE_1000 0x1000
+#define PCI_DEVICE_ID_3WARE_7000 0x1001
+#define PCI_DEVICE_ID_3WARE_9000 0x1002
+
+#define PCI_VENDOR_ID_IOMEGA 0x13ca
+#define PCI_DEVICE_ID_IOMEGA_BUZ 0x4231
+
+#define PCI_VENDOR_ID_ABOCOM 0x13D1
+#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1
+
+#define PCI_VENDOR_ID_CMEDIA 0x13f6
+#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100
+#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101
+#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111
+#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112
+
+#define PCI_VENDOR_ID_LAVA 0x1407
+#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100
+#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101
+#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102
+#define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180
+#define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181
+#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200
+#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201
+#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202
+#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500
+#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600
+#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000
+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002
+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003
+#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800
+
+#define PCI_VENDOR_ID_TIMEDIA 0x1409
+#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168
+
+#define PCI_VENDOR_ID_ICE 0x1412
+#define PCI_DEVICE_ID_ICE_1712 0x1712
+#define PCI_DEVICE_ID_VT1724 0x1724
+
+#define PCI_VENDOR_ID_OXSEMI 0x1415
+#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403
+#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501
+#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511
+#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513
+#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521
+
+#define PCI_VENDOR_ID_SAMSUNG 0x144d
+
+#define PCI_VENDOR_ID_MYRICOM 0x14c1
+
+#define PCI_VENDOR_ID_TITAN 0x14D2
+#define PCI_DEVICE_ID_TITAN_010L 0x8001
+#define PCI_DEVICE_ID_TITAN_100L 0x8010
+#define PCI_DEVICE_ID_TITAN_110L 0x8011
+#define PCI_DEVICE_ID_TITAN_200L 0x8020
+#define PCI_DEVICE_ID_TITAN_210L 0x8021
+#define PCI_DEVICE_ID_TITAN_400L 0x8040
+#define PCI_DEVICE_ID_TITAN_800L 0x8080
+#define PCI_DEVICE_ID_TITAN_100 0xA001
+#define PCI_DEVICE_ID_TITAN_200 0xA005
+#define PCI_DEVICE_ID_TITAN_400 0xA003
+#define PCI_DEVICE_ID_TITAN_800B 0xA004
+
+#define PCI_VENDOR_ID_PANACOM 0x14d4
+#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400
+#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402
+
+#define PCI_VENDOR_ID_AFAVLAB 0x14db
+#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180
+#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
+#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150
+
+#define PCI_VENDOR_ID_BROADCOM 0x14e4
+#define PCI_DEVICE_ID_TIGON3_5752 0x1600
+#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
+#define PCI_DEVICE_ID_TIGON3_5700 0x1644
+#define PCI_DEVICE_ID_TIGON3_5701 0x1645
+#define PCI_DEVICE_ID_TIGON3_5702 0x1646
+#define PCI_DEVICE_ID_TIGON3_5703 0x1647
+#define PCI_DEVICE_ID_TIGON3_5704 0x1648
+#define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649
+#define PCI_DEVICE_ID_NX2_5706 0x164a
+#define PCI_DEVICE_ID_NX2_5708 0x164c
+#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
+#define PCI_DEVICE_ID_TIGON3_5705 0x1653
+#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654
+#define PCI_DEVICE_ID_TIGON3_5720 0x1658
+#define PCI_DEVICE_ID_TIGON3_5721 0x1659
+#define PCI_DEVICE_ID_TIGON3_5705M 0x165d
+#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e
+#define PCI_DEVICE_ID_TIGON3_5714 0x1668
+#define PCI_DEVICE_ID_TIGON3_5714S 0x1669
+#define PCI_DEVICE_ID_TIGON3_5780 0x166a
+#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
+#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
+#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
+#define PCI_DEVICE_ID_TIGON3_5755M 0x1673
+#define PCI_DEVICE_ID_TIGON3_5750 0x1676
+#define PCI_DEVICE_ID_TIGON3_5751 0x1677
+#define PCI_DEVICE_ID_TIGON3_5715 0x1678
+#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
+#define PCI_DEVICE_ID_TIGON3_5754 0x167a
+#define PCI_DEVICE_ID_TIGON3_5755 0x167b
+#define PCI_DEVICE_ID_TIGON3_5750M 0x167c
+#define PCI_DEVICE_ID_TIGON3_5751M 0x167d
+#define PCI_DEVICE_ID_TIGON3_5751F 0x167e
+#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
+#define PCI_DEVICE_ID_TIGON3_5782 0x1696
+#define PCI_DEVICE_ID_TIGON3_5786 0x169a
+#define PCI_DEVICE_ID_TIGON3_5787 0x169b
+#define PCI_DEVICE_ID_TIGON3_5788 0x169c
+#define PCI_DEVICE_ID_TIGON3_5789 0x169d
+#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
+#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
+#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8
+#define PCI_DEVICE_ID_NX2_5706S 0x16aa
+#define PCI_DEVICE_ID_NX2_5708S 0x16ac
+#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6
+#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7
+#define PCI_DEVICE_ID_TIGON3_5781 0x16dd
+#define PCI_DEVICE_ID_TIGON3_5753 0x16f7
+#define PCI_DEVICE_ID_TIGON3_5753M 0x16fd
+#define PCI_DEVICE_ID_TIGON3_5753F 0x16fe
+#define PCI_DEVICE_ID_TIGON3_5901 0x170d
+#define PCI_DEVICE_ID_BCM4401B1 0x170c
+#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e
+#define PCI_DEVICE_ID_BCM4401 0x4401
+#define PCI_DEVICE_ID_BCM4401B0 0x4402
+
+#define PCI_VENDOR_ID_TOPIC 0x151f
+#define PCI_DEVICE_ID_TOPIC_TP560 0x0000
+
+#define PCI_VENDOR_ID_ENE 0x1524
+#define PCI_DEVICE_ID_ENE_1211 0x1211
+#define PCI_DEVICE_ID_ENE_1225 0x1225
+#define PCI_DEVICE_ID_ENE_1410 0x1410
+#define PCI_DEVICE_ID_ENE_710 0x1411
+#define PCI_DEVICE_ID_ENE_712 0x1412
+#define PCI_DEVICE_ID_ENE_1420 0x1420
+#define PCI_DEVICE_ID_ENE_720 0x1421
+#define PCI_DEVICE_ID_ENE_722 0x1422
+
+#define PCI_VENDOR_ID_CHELSIO 0x1425
+
+#define PCI_VENDOR_ID_SYBA 0x1592
+#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
+#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783
+
+#define PCI_VENDOR_ID_MORETON 0x15aa
+#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000
+
+#define PCI_VENDOR_ID_ZOLTRIX 0x15b0
+#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0
+
+#define PCI_VENDOR_ID_MELLANOX 0x15b3
+#define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44
+#define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE 0x5a46
+#define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
+#define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
+#define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
+#define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
+
+#define PCI_VENDOR_ID_PDC 0x15e9
+
+#define PCI_VENDOR_ID_FARSITE 0x1619
+#define PCI_DEVICE_ID_FARSITE_T2P 0x0400
+#define PCI_DEVICE_ID_FARSITE_T4P 0x0440
+#define PCI_DEVICE_ID_FARSITE_T1U 0x0610
+#define PCI_DEVICE_ID_FARSITE_T2U 0x0620
+#define PCI_DEVICE_ID_FARSITE_T4U 0x0640
+#define PCI_DEVICE_ID_FARSITE_TE1 0x1610
+#define PCI_DEVICE_ID_FARSITE_TE1C 0x1612
+
+#define PCI_VENDOR_ID_SIBYTE 0x166d
+#define PCI_DEVICE_ID_BCM1250_HT 0x0002
+
+#define PCI_VENDOR_ID_NETCELL 0x169c
+#define PCI_DEVICE_ID_REVOLUTION 0x0044
+
+#define PCI_VENDOR_ID_VITESSE 0x1725
+#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
+
+#define PCI_VENDOR_ID_LINKSYS 0x1737
+#define PCI_DEVICE_ID_LINKSYS_EG1064 0x1064
+
+#define PCI_VENDOR_ID_ALTIMA 0x173b
+#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8
+#define PCI_DEVICE_ID_ALTIMA_AC1001 0x03e9
+#define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea
+#define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb
+
+#define PCI_VENDOR_ID_S2IO 0x17d5
+#define PCI_DEVICE_ID_S2IO_WIN 0x5731
+#define PCI_DEVICE_ID_S2IO_UNI 0x5831
+#define PCI_DEVICE_ID_HERC_WIN 0x5732
+#define PCI_DEVICE_ID_HERC_UNI 0x5832
+
+#define PCI_VENDOR_ID_SITECOM 0x182d
+#define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069
+
+#define PCI_VENDOR_ID_TOPSPIN 0x1867
+
+#define PCI_VENDOR_ID_TDI 0x192E
+#define PCI_DEVICE_ID_TDI_EHCI 0x0101
+
+#define PCI_VENDOR_ID_JMICRON 0x197B
+#define PCI_DEVICE_ID_JMICRON_JMB360 0x2360
+#define PCI_DEVICE_ID_JMICRON_JMB361 0x2361
+#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363
+#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365
+#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
+#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
+
+#define PCI_VENDOR_ID_TEKRAM 0x1de1
+#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29
+
+#define PCI_VENDOR_ID_HINT 0x3388
+#define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013
+
+#define PCI_VENDOR_ID_3DLABS 0x3d3d
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009
+
+#define PCI_VENDOR_ID_AKS 0x416c
+#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100
+
+#define PCI_VENDOR_ID_S3 0x5333
+#define PCI_DEVICE_ID_S3_TRIO 0x8811
+#define PCI_DEVICE_ID_S3_868 0x8880
+#define PCI_DEVICE_ID_S3_968 0x88f0
+#define PCI_DEVICE_ID_S3_SAVAGE4 0x8a25
+#define PCI_DEVICE_ID_S3_PROSAVAGE8 0x8d04
+#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
+
+#define PCI_VENDOR_ID_DUNORD 0x5544
+#define PCI_DEVICE_ID_DUNORD_I3000 0x0001
+
+#define PCI_VENDOR_ID_DCI 0x6666
+#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
+#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
+#define PCI_DEVICE_ID_DCI_PCCOM2 0x0004
+
+#define PCI_VENDOR_ID_INTEL 0x8086
+#define PCI_DEVICE_ID_INTEL_EESSC 0x0008
+#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320
+#define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321
+#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
+#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
+#define PCI_DEVICE_ID_INTEL_PXHV 0x032C
+#define PCI_DEVICE_ID_INTEL_82375 0x0482
+#define PCI_DEVICE_ID_INTEL_82424 0x0483
+#define PCI_DEVICE_ID_INTEL_82378 0x0484
+#define PCI_DEVICE_ID_INTEL_I960 0x0960
+#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
+#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130
+#define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132
+#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221
+#define PCI_DEVICE_ID_INTEL_7505_0 0x2550
+#define PCI_DEVICE_ID_INTEL_7205_0 0x255d
+#define PCI_DEVICE_ID_INTEL_82437 0x122d
+#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e
+#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230
+#define PCI_DEVICE_ID_INTEL_82371MX 0x1234
+#define PCI_DEVICE_ID_INTEL_82441 0x1237
+#define PCI_DEVICE_ID_INTEL_82380FB 0x124b
+#define PCI_DEVICE_ID_INTEL_82439 0x1250
+#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960
+#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21
+#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30
+#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38
+#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
+#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
+#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413
+#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415
+#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416
+#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418
+#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420
+#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421
+#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423
+#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425
+#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426
+#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428
+#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440
+#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443
+#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445
+#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448
+#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a
+#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
+#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
+#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
+#define PCI_DEVICE_ID_INTEL_82801E_0 0x2450
+#define PCI_DEVICE_ID_INTEL_82801E_11 0x245b
+#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
+#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
+#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485
+#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486
+#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
+#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
+#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
+#define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0
+#define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1
+#define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3
+#define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5
+#define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6
+#define PCI_DEVICE_ID_INTEL_82801DB_9 0x24c9
+#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca
+#define PCI_DEVICE_ID_INTEL_82801DB_11 0x24cb
+#define PCI_DEVICE_ID_INTEL_82801DB_12 0x24cc
+#define PCI_DEVICE_ID_INTEL_82801EB_0 0x24d0
+#define PCI_DEVICE_ID_INTEL_82801EB_1 0x24d1
+#define PCI_DEVICE_ID_INTEL_82801EB_3 0x24d3
+#define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5
+#define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6
+#define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db
+#define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd
+#define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1
+#define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2
+#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4
+#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6
+#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
+#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
+#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
+#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
+#define PCI_DEVICE_ID_INTEL_82860_HB 0x2531
+#define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c
+#define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560
+#define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562
+#define PCI_DEVICE_ID_INTEL_82865_HB 0x2570
+#define PCI_DEVICE_ID_INTEL_82865_IG 0x2572
+#define PCI_DEVICE_ID_INTEL_82875_HB 0x2578
+#define PCI_DEVICE_ID_INTEL_82915G_HB 0x2580
+#define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582
+#define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590
+#define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592
+#define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770
+#define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772
+#define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0
+#define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2
+#define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640
+#define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641
+#define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642
+#define PCI_DEVICE_ID_INTEL_ICH6_16 0x266a
+#define PCI_DEVICE_ID_INTEL_ICH6_17 0x266d
+#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
+#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
+#define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670
+#define PCI_DEVICE_ID_INTEL_ESB2_14 0x2698
+#define PCI_DEVICE_ID_INTEL_ESB2_17 0x269b
+#define PCI_DEVICE_ID_INTEL_ESB2_18 0x269e
+#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
+#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
+#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
+#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
+#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da
+#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
+#define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de
+#define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df
+#define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810
+#define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811
+#define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812
+#define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814
+#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815
+#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e
+#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850
+#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
+#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
+#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
+#define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580
+#define PCI_DEVICE_ID_INTEL_82855GM_IG 0x3582
+#define PCI_DEVICE_ID_INTEL_E7520_MCH 0x3590
+#define PCI_DEVICE_ID_INTEL_E7320_MCH 0x3592
+#define PCI_DEVICE_ID_INTEL_MCH_PA 0x3595
+#define PCI_DEVICE_ID_INTEL_MCH_PA1 0x3596
+#define PCI_DEVICE_ID_INTEL_MCH_PB 0x3597
+#define PCI_DEVICE_ID_INTEL_MCH_PB1 0x3598
+#define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599
+#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
+#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
+#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
+#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
+#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
+#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
+#define PCI_DEVICE_ID_INTEL_82439TX 0x7100
+#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
+#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
+#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
+#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
+#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
+#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
+#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
+#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123
+#define PCI_DEVICE_ID_INTEL_82810E_MC 0x7124
+#define PCI_DEVICE_ID_INTEL_82810E_IG 0x7125
+#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180
+#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181
+#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190
+#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191
+#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192
+#define PCI_DEVICE_ID_INTEL_440MX 0x7195
+#define PCI_DEVICE_ID_INTEL_440MX_6 0x7196
+#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198
+#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199
+#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b
+#define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0
+#define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2
+#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
+#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
+#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
+#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
+#define PCI_DEVICE_ID_INTEL_82454NX 0x84cb
+#define PCI_DEVICE_ID_INTEL_84460GX 0x84ea
+#define PCI_DEVICE_ID_INTEL_IXP4XX 0x8500
+#define PCI_DEVICE_ID_INTEL_IXP2800 0x9004
+#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
+
+#define PCI_VENDOR_ID_SCALEMP 0x8686
+#define PCI_DEVICE_ID_SCALEMP_VSMP_CTL 0x1010
+
+#define PCI_VENDOR_ID_COMPUTONE 0x8e0e
+#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291
+#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302
+#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003
+
+#define PCI_VENDOR_ID_KTI 0x8e2e
+
+#define PCI_VENDOR_ID_ADAPTEC 0x9004
+#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078
+#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178
+#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860
+#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
+#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578
+#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038
+#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075
+#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078
+#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178
+#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078
+#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178
+#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
+#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378
+#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478
+#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895
+#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078
+#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178
+#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278
+#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378
+#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478
+#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578
+#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678
+#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778
+#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878
+
+#define PCI_VENDOR_ID_ADAPTEC2 0x9005
+#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010
+#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011
+#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013
+#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f
+#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050
+#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051
+#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f
+#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080
+#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081
+#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083
+#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f
+#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0
+#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1
+#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3
+#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf
+#define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500
+#define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503
+
+#define PCI_VENDOR_ID_HOLTEK 0x9412
+#define PCI_DEVICE_ID_HOLTEK_6565 0x6565
+
+#define PCI_VENDOR_ID_NETMOS 0x9710
+#define PCI_DEVICE_ID_NETMOS_9705 0x9705
+#define PCI_DEVICE_ID_NETMOS_9715 0x9715
+#define PCI_DEVICE_ID_NETMOS_9735 0x9735
+#define PCI_DEVICE_ID_NETMOS_9745 0x9745
+#define PCI_DEVICE_ID_NETMOS_9755 0x9755
+#define PCI_DEVICE_ID_NETMOS_9805 0x9805
+#define PCI_DEVICE_ID_NETMOS_9815 0x9815
+#define PCI_DEVICE_ID_NETMOS_9835 0x9835
+#define PCI_DEVICE_ID_NETMOS_9845 0x9845
+#define PCI_DEVICE_ID_NETMOS_9855 0x9855
+
+#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
+#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014
+#define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055
+
+#define PCI_VENDOR_ID_TIGERJET 0xe159
+#define PCI_DEVICE_ID_TIGERJET_300 0x0001
+#define PCI_DEVICE_ID_TIGERJET_100 0x0002
+
+#define PCI_VENDOR_ID_TTTECH 0x0357
+#define PCI_DEVICE_ID_TTTECH_MC322 0x000A
+
+#define PCI_VENDOR_ID_XILINX_RME 0xea60
+#define PCI_DEVICE_ID_RME_DIGI32 0x9896
+#define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897
+#define PCI_DEVICE_ID_RME_DIGI32_8 0x9898
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pci_regs.h b/6/platforms/android-3/arch-arm/usr/include/linux/pci_regs.h
new file mode 100644
index 0000000..93a21be
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pci_regs.h
@@ -0,0 +1,422 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_PCI_REGS_H
+#define LINUX_PCI_REGS_H
+
+#define PCI_VENDOR_ID 0x00
+#define PCI_DEVICE_ID 0x02
+#define PCI_COMMAND 0x04
+#define PCI_COMMAND_IO 0x1
+#define PCI_COMMAND_MEMORY 0x2
+#define PCI_COMMAND_MASTER 0x4
+#define PCI_COMMAND_SPECIAL 0x8
+#define PCI_COMMAND_INVALIDATE 0x10
+#define PCI_COMMAND_VGA_PALETTE 0x20
+#define PCI_COMMAND_PARITY 0x40
+#define PCI_COMMAND_WAIT 0x80
+#define PCI_COMMAND_SERR 0x100
+#define PCI_COMMAND_FAST_BACK 0x200
+#define PCI_COMMAND_INTX_DISABLE 0x400
+
+#define PCI_STATUS 0x06
+#define PCI_STATUS_CAP_LIST 0x10
+#define PCI_STATUS_66MHZ 0x20
+#define PCI_STATUS_UDF 0x40
+#define PCI_STATUS_FAST_BACK 0x80
+#define PCI_STATUS_PARITY 0x100
+#define PCI_STATUS_DEVSEL_MASK 0x600
+#define PCI_STATUS_DEVSEL_FAST 0x000
+#define PCI_STATUS_DEVSEL_MEDIUM 0x200
+#define PCI_STATUS_DEVSEL_SLOW 0x400
+#define PCI_STATUS_SIG_TARGET_ABORT 0x800
+#define PCI_STATUS_REC_TARGET_ABORT 0x1000
+#define PCI_STATUS_REC_MASTER_ABORT 0x2000
+#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000
+#define PCI_STATUS_DETECTED_PARITY 0x8000
+
+#define PCI_CLASS_REVISION 0x08
+#define PCI_REVISION_ID 0x08
+#define PCI_CLASS_PROG 0x09
+#define PCI_CLASS_DEVICE 0x0a
+
+#define PCI_CACHE_LINE_SIZE 0x0c
+#define PCI_LATENCY_TIMER 0x0d
+#define PCI_HEADER_TYPE 0x0e
+#define PCI_HEADER_TYPE_NORMAL 0
+#define PCI_HEADER_TYPE_BRIDGE 1
+#define PCI_HEADER_TYPE_CARDBUS 2
+
+#define PCI_BIST 0x0f
+#define PCI_BIST_CODE_MASK 0x0f
+#define PCI_BIST_START 0x40
+#define PCI_BIST_CAPABLE 0x80
+
+#define PCI_BASE_ADDRESS_0 0x10
+#define PCI_BASE_ADDRESS_1 0x14
+#define PCI_BASE_ADDRESS_2 0x18
+#define PCI_BASE_ADDRESS_3 0x1c
+#define PCI_BASE_ADDRESS_4 0x20
+#define PCI_BASE_ADDRESS_5 0x24
+#define PCI_BASE_ADDRESS_SPACE 0x01
+#define PCI_BASE_ADDRESS_SPACE_IO 0x01
+#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
+#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
+#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00
+#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02
+#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04
+#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08
+#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
+#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
+
+#define PCI_CARDBUS_CIS 0x28
+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
+#define PCI_SUBSYSTEM_ID 0x2e
+#define PCI_ROM_ADDRESS 0x30
+#define PCI_ROM_ADDRESS_ENABLE 0x01
+#define PCI_ROM_ADDRESS_MASK (~0x7ffUL)
+
+#define PCI_CAPABILITY_LIST 0x34
+
+#define PCI_INTERRUPT_LINE 0x3c
+#define PCI_INTERRUPT_PIN 0x3d
+#define PCI_MIN_GNT 0x3e
+#define PCI_MAX_LAT 0x3f
+
+#define PCI_PRIMARY_BUS 0x18
+#define PCI_SECONDARY_BUS 0x19
+#define PCI_SUBORDINATE_BUS 0x1a
+#define PCI_SEC_LATENCY_TIMER 0x1b
+#define PCI_IO_BASE 0x1c
+#define PCI_IO_LIMIT 0x1d
+#define PCI_IO_RANGE_TYPE_MASK 0x0fUL
+#define PCI_IO_RANGE_TYPE_16 0x00
+#define PCI_IO_RANGE_TYPE_32 0x01
+#define PCI_IO_RANGE_MASK (~0x0fUL)
+#define PCI_SEC_STATUS 0x1e
+#define PCI_MEMORY_BASE 0x20
+#define PCI_MEMORY_LIMIT 0x22
+#define PCI_MEMORY_RANGE_TYPE_MASK 0x0fUL
+#define PCI_MEMORY_RANGE_MASK (~0x0fUL)
+#define PCI_PREF_MEMORY_BASE 0x24
+#define PCI_PREF_MEMORY_LIMIT 0x26
+#define PCI_PREF_RANGE_TYPE_MASK 0x0fUL
+#define PCI_PREF_RANGE_TYPE_32 0x00
+#define PCI_PREF_RANGE_TYPE_64 0x01
+#define PCI_PREF_RANGE_MASK (~0x0fUL)
+#define PCI_PREF_BASE_UPPER32 0x28
+#define PCI_PREF_LIMIT_UPPER32 0x2c
+#define PCI_IO_BASE_UPPER16 0x30
+#define PCI_IO_LIMIT_UPPER16 0x32
+
+#define PCI_ROM_ADDRESS1 0x38
+
+#define PCI_BRIDGE_CONTROL 0x3e
+#define PCI_BRIDGE_CTL_PARITY 0x01
+#define PCI_BRIDGE_CTL_SERR 0x02
+#define PCI_BRIDGE_CTL_NO_ISA 0x04
+#define PCI_BRIDGE_CTL_VGA 0x08
+#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20
+#define PCI_BRIDGE_CTL_BUS_RESET 0x40
+#define PCI_BRIDGE_CTL_FAST_BACK 0x80
+
+#define PCI_CB_CAPABILITY_LIST 0x14
+
+#define PCI_CB_SEC_STATUS 0x16
+#define PCI_CB_PRIMARY_BUS 0x18
+#define PCI_CB_CARD_BUS 0x19
+#define PCI_CB_SUBORDINATE_BUS 0x1a
+#define PCI_CB_LATENCY_TIMER 0x1b
+#define PCI_CB_MEMORY_BASE_0 0x1c
+#define PCI_CB_MEMORY_LIMIT_0 0x20
+#define PCI_CB_MEMORY_BASE_1 0x24
+#define PCI_CB_MEMORY_LIMIT_1 0x28
+#define PCI_CB_IO_BASE_0 0x2c
+#define PCI_CB_IO_BASE_0_HI 0x2e
+#define PCI_CB_IO_LIMIT_0 0x30
+#define PCI_CB_IO_LIMIT_0_HI 0x32
+#define PCI_CB_IO_BASE_1 0x34
+#define PCI_CB_IO_BASE_1_HI 0x36
+#define PCI_CB_IO_LIMIT_1 0x38
+#define PCI_CB_IO_LIMIT_1_HI 0x3a
+#define PCI_CB_IO_RANGE_MASK (~0x03UL)
+
+#define PCI_CB_BRIDGE_CONTROL 0x3e
+#define PCI_CB_BRIDGE_CTL_PARITY 0x01
+#define PCI_CB_BRIDGE_CTL_SERR 0x02
+#define PCI_CB_BRIDGE_CTL_ISA 0x04
+#define PCI_CB_BRIDGE_CTL_VGA 0x08
+#define PCI_CB_BRIDGE_CTL_MASTER_ABORT 0x20
+#define PCI_CB_BRIDGE_CTL_CB_RESET 0x40
+#define PCI_CB_BRIDGE_CTL_16BIT_INT 0x80
+#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100
+#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
+#define PCI_CB_BRIDGE_CTL_POST_WRITES 0x400
+#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
+#define PCI_CB_SUBSYSTEM_ID 0x42
+#define PCI_CB_LEGACY_MODE_BASE 0x44
+
+#define PCI_CAP_LIST_ID 0
+#define PCI_CAP_ID_PM 0x01
+#define PCI_CAP_ID_AGP 0x02
+#define PCI_CAP_ID_VPD 0x03
+#define PCI_CAP_ID_SLOTID 0x04
+#define PCI_CAP_ID_MSI 0x05
+#define PCI_CAP_ID_CHSWP 0x06
+#define PCI_CAP_ID_PCIX 0x07
+#define PCI_CAP_ID_HT_IRQCONF 0x08
+#define PCI_CAP_ID_VNDR 0x09
+#define PCI_CAP_ID_SHPC 0x0C
+#define PCI_CAP_ID_EXP 0x10
+#define PCI_CAP_ID_MSIX 0x11
+#define PCI_CAP_LIST_NEXT 1
+#define PCI_CAP_FLAGS 2
+#define PCI_CAP_SIZEOF 4
+
+#define PCI_PM_PMC 2
+#define PCI_PM_CAP_VER_MASK 0x0007
+#define PCI_PM_CAP_PME_CLOCK 0x0008
+#define PCI_PM_CAP_RESERVED 0x0010
+#define PCI_PM_CAP_DSI 0x0020
+#define PCI_PM_CAP_AUX_POWER 0x01C0
+#define PCI_PM_CAP_D1 0x0200
+#define PCI_PM_CAP_D2 0x0400
+#define PCI_PM_CAP_PME 0x0800
+#define PCI_PM_CAP_PME_MASK 0xF800
+#define PCI_PM_CAP_PME_D0 0x0800
+#define PCI_PM_CAP_PME_D1 0x1000
+#define PCI_PM_CAP_PME_D2 0x2000
+#define PCI_PM_CAP_PME_D3 0x4000
+#define PCI_PM_CAP_PME_D3cold 0x8000
+#define PCI_PM_CTRL 4
+#define PCI_PM_CTRL_STATE_MASK 0x0003
+#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004
+#define PCI_PM_CTRL_PME_ENABLE 0x0100
+#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00
+#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000
+#define PCI_PM_CTRL_PME_STATUS 0x8000
+#define PCI_PM_PPB_EXTENSIONS 6
+#define PCI_PM_PPB_B2_B3 0x40
+#define PCI_PM_BPCC_ENABLE 0x80
+#define PCI_PM_DATA_REGISTER 7
+#define PCI_PM_SIZEOF 8
+
+#define PCI_AGP_VERSION 2
+#define PCI_AGP_RFU 3
+#define PCI_AGP_STATUS 4
+#define PCI_AGP_STATUS_RQ_MASK 0xff000000
+#define PCI_AGP_STATUS_SBA 0x0200
+#define PCI_AGP_STATUS_64BIT 0x0020
+#define PCI_AGP_STATUS_FW 0x0010
+#define PCI_AGP_STATUS_RATE4 0x0004
+#define PCI_AGP_STATUS_RATE2 0x0002
+#define PCI_AGP_STATUS_RATE1 0x0001
+#define PCI_AGP_COMMAND 8
+#define PCI_AGP_COMMAND_RQ_MASK 0xff000000
+#define PCI_AGP_COMMAND_SBA 0x0200
+#define PCI_AGP_COMMAND_AGP 0x0100
+#define PCI_AGP_COMMAND_64BIT 0x0020
+#define PCI_AGP_COMMAND_FW 0x0010
+#define PCI_AGP_COMMAND_RATE4 0x0004
+#define PCI_AGP_COMMAND_RATE2 0x0002
+#define PCI_AGP_COMMAND_RATE1 0x0001
+#define PCI_AGP_SIZEOF 12
+
+#define PCI_VPD_ADDR 2
+#define PCI_VPD_ADDR_MASK 0x7fff
+#define PCI_VPD_ADDR_F 0x8000
+#define PCI_VPD_DATA 4
+
+#define PCI_SID_ESR 2
+#define PCI_SID_ESR_NSLOTS 0x1f
+#define PCI_SID_ESR_FIC 0x20
+#define PCI_SID_CHASSIS_NR 3
+
+#define PCI_MSI_FLAGS 2
+#define PCI_MSI_FLAGS_64BIT 0x80
+#define PCI_MSI_FLAGS_QSIZE 0x70
+#define PCI_MSI_FLAGS_QMASK 0x0e
+#define PCI_MSI_FLAGS_ENABLE 0x01
+#define PCI_MSI_FLAGS_MASKBIT 0x100
+#define PCI_MSI_RFU 3
+#define PCI_MSI_ADDRESS_LO 4
+#define PCI_MSI_ADDRESS_HI 8
+#define PCI_MSI_DATA_32 8
+#define PCI_MSI_DATA_64 12
+#define PCI_MSI_MASK_BIT 16
+
+#define PCI_CHSWP_CSR 2
+#define PCI_CHSWP_DHA 0x01
+#define PCI_CHSWP_EIM 0x02
+#define PCI_CHSWP_PIE 0x04
+#define PCI_CHSWP_LOO 0x08
+#define PCI_CHSWP_PI 0x30
+#define PCI_CHSWP_EXT 0x40
+#define PCI_CHSWP_INS 0x80
+
+#define PCI_X_CMD 2
+#define PCI_X_CMD_DPERR_E 0x0001
+#define PCI_X_CMD_ERO 0x0002
+#define PCI_X_CMD_MAX_READ 0x000c
+#define PCI_X_CMD_MAX_SPLIT 0x0070
+#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3)
+#define PCI_X_STATUS 4
+#define PCI_X_STATUS_DEVFN 0x000000ff
+#define PCI_X_STATUS_BUS 0x0000ff00
+#define PCI_X_STATUS_64BIT 0x00010000
+#define PCI_X_STATUS_133MHZ 0x00020000
+#define PCI_X_STATUS_SPL_DISC 0x00040000
+#define PCI_X_STATUS_UNX_SPL 0x00080000
+#define PCI_X_STATUS_COMPLEX 0x00100000
+#define PCI_X_STATUS_MAX_READ 0x00600000
+#define PCI_X_STATUS_MAX_SPLIT 0x03800000
+#define PCI_X_STATUS_MAX_CUM 0x1c000000
+#define PCI_X_STATUS_SPL_ERR 0x20000000
+#define PCI_X_STATUS_266MHZ 0x40000000
+#define PCI_X_STATUS_533MHZ 0x80000000
+
+#define PCI_EXP_FLAGS 2
+#define PCI_EXP_FLAGS_VERS 0x000f
+#define PCI_EXP_FLAGS_TYPE 0x00f0
+#define PCI_EXP_TYPE_ENDPOINT 0x0
+#define PCI_EXP_TYPE_LEG_END 0x1
+#define PCI_EXP_TYPE_ROOT_PORT 0x4
+#define PCI_EXP_TYPE_UPSTREAM 0x5
+#define PCI_EXP_TYPE_DOWNSTREAM 0x6
+#define PCI_EXP_TYPE_PCI_BRIDGE 0x7
+#define PCI_EXP_FLAGS_SLOT 0x0100
+#define PCI_EXP_FLAGS_IRQ 0x3e00
+#define PCI_EXP_DEVCAP 4
+#define PCI_EXP_DEVCAP_PAYLOAD 0x07
+#define PCI_EXP_DEVCAP_PHANTOM 0x18
+#define PCI_EXP_DEVCAP_EXT_TAG 0x20
+#define PCI_EXP_DEVCAP_L0S 0x1c0
+#define PCI_EXP_DEVCAP_L1 0xe00
+#define PCI_EXP_DEVCAP_ATN_BUT 0x1000
+#define PCI_EXP_DEVCAP_ATN_IND 0x2000
+#define PCI_EXP_DEVCAP_PWR_IND 0x4000
+#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000
+#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000
+#define PCI_EXP_DEVCTL 8
+#define PCI_EXP_DEVCTL_CERE 0x0001
+#define PCI_EXP_DEVCTL_NFERE 0x0002
+#define PCI_EXP_DEVCTL_FERE 0x0004
+#define PCI_EXP_DEVCTL_URRE 0x0008
+#define PCI_EXP_DEVCTL_RELAX_EN 0x0010
+#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
+#define PCI_EXP_DEVCTL_EXT_TAG 0x0100
+#define PCI_EXP_DEVCTL_PHANTOM 0x0200
+#define PCI_EXP_DEVCTL_AUX_PME 0x0400
+#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800
+#define PCI_EXP_DEVCTL_READRQ 0x7000
+#define PCI_EXP_DEVSTA 10
+#define PCI_EXP_DEVSTA_CED 0x01
+#define PCI_EXP_DEVSTA_NFED 0x02
+#define PCI_EXP_DEVSTA_FED 0x04
+#define PCI_EXP_DEVSTA_URD 0x08
+#define PCI_EXP_DEVSTA_AUXPD 0x10
+#define PCI_EXP_DEVSTA_TRPND 0x20
+#define PCI_EXP_LNKCAP 12
+#define PCI_EXP_LNKCTL 16
+#define PCI_EXP_LNKSTA 18
+#define PCI_EXP_SLTCAP 20
+#define PCI_EXP_SLTCTL 24
+#define PCI_EXP_SLTSTA 26
+#define PCI_EXP_RTCTL 28
+#define PCI_EXP_RTCTL_SECEE 0x01
+#define PCI_EXP_RTCTL_SENFEE 0x02
+#define PCI_EXP_RTCTL_SEFEE 0x04
+#define PCI_EXP_RTCTL_PMEIE 0x08
+#define PCI_EXP_RTCTL_CRSSVE 0x10
+#define PCI_EXP_RTCAP 30
+#define PCI_EXP_RTSTA 32
+
+#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
+#define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf)
+#define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc)
+
+#define PCI_EXT_CAP_ID_ERR 1
+#define PCI_EXT_CAP_ID_VC 2
+#define PCI_EXT_CAP_ID_DSN 3
+#define PCI_EXT_CAP_ID_PWR 4
+
+#define PCI_ERR_UNCOR_STATUS 4
+#define PCI_ERR_UNC_TRAIN 0x00000001
+#define PCI_ERR_UNC_DLP 0x00000010
+#define PCI_ERR_UNC_POISON_TLP 0x00001000
+#define PCI_ERR_UNC_FCP 0x00002000
+#define PCI_ERR_UNC_COMP_TIME 0x00004000
+#define PCI_ERR_UNC_COMP_ABORT 0x00008000
+#define PCI_ERR_UNC_UNX_COMP 0x00010000
+#define PCI_ERR_UNC_RX_OVER 0x00020000
+#define PCI_ERR_UNC_MALF_TLP 0x00040000
+#define PCI_ERR_UNC_ECRC 0x00080000
+#define PCI_ERR_UNC_UNSUP 0x00100000
+#define PCI_ERR_UNCOR_MASK 8
+
+#define PCI_ERR_UNCOR_SEVER 12
+
+#define PCI_ERR_COR_STATUS 16
+#define PCI_ERR_COR_RCVR 0x00000001
+#define PCI_ERR_COR_BAD_TLP 0x00000040
+#define PCI_ERR_COR_BAD_DLLP 0x00000080
+#define PCI_ERR_COR_REP_ROLL 0x00000100
+#define PCI_ERR_COR_REP_TIMER 0x00001000
+#define PCI_ERR_COR_MASK 20
+
+#define PCI_ERR_CAP 24
+#define PCI_ERR_CAP_FEP(x) ((x) & 31)
+#define PCI_ERR_CAP_ECRC_GENC 0x00000020
+#define PCI_ERR_CAP_ECRC_GENE 0x00000040
+#define PCI_ERR_CAP_ECRC_CHKC 0x00000080
+#define PCI_ERR_CAP_ECRC_CHKE 0x00000100
+#define PCI_ERR_HEADER_LOG 28
+#define PCI_ERR_ROOT_COMMAND 44
+
+#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001
+
+#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002
+
+#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004
+#define PCI_ERR_ROOT_STATUS 48
+#define PCI_ERR_ROOT_COR_RCV 0x00000001
+
+#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002
+
+#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004
+
+#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008
+#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010
+#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020
+#define PCI_ERR_ROOT_FATAL_RCV 0x00000040
+#define PCI_ERR_ROOT_COR_SRC 52
+#define PCI_ERR_ROOT_SRC 54
+
+#define PCI_VC_PORT_REG1 4
+#define PCI_VC_PORT_REG2 8
+#define PCI_VC_PORT_CTRL 12
+#define PCI_VC_PORT_STATUS 14
+#define PCI_VC_RES_CAP 16
+#define PCI_VC_RES_CTRL 20
+#define PCI_VC_RES_STATUS 26
+
+#define PCI_PWR_DSR 4
+#define PCI_PWR_DATA 8
+#define PCI_PWR_DATA_BASE(x) ((x) & 0xff)
+#define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3)
+#define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7)
+#define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3)
+#define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7)
+#define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7)
+#define PCI_PWR_CAP 12
+#define PCI_PWR_CAP_BUDGET(x) ((x) & 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/percpu.h b/6/platforms/android-3/arch-arm/usr/include/linux/percpu.h
new file mode 100644
index 0000000..c195616
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/percpu.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PERCPU_H
+#define __LINUX_PERCPU_H
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/string.h>
+#include <asm/percpu.h>
+
+#ifndef PERCPU_ENOUGH_ROOM
+#define PERCPU_ENOUGH_ROOM 32768
+#endif
+
+#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); }))
+#define put_cpu_var(var) preempt_enable()
+
+#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
+
+#define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type))))
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/percpu_counter.h b/6/platforms/android-3/arch-arm/usr/include/linux/percpu_counter.h
new file mode 100644
index 0000000..112375c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/percpu_counter.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PERCPU_COUNTER_H
+#define _LINUX_PERCPU_COUNTER_H
+
+#include <linux/spinlock.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/percpu.h>
+#include <linux/types.h>
+
+struct percpu_counter {
+ s64 count;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/personality.h b/6/platforms/android-3/arch-arm/usr/include/linux/personality.h
new file mode 100644
index 0000000..1f84b4e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/personality.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PERSONALITY_H
+#define _LINUX_PERSONALITY_H
+
+struct exec_domain;
+struct pt_regs;
+
+enum {
+ ADDR_NO_RANDOMIZE = 0x0040000,
+ FDPIC_FUNCPTRS = 0x0080000,
+ MMAP_PAGE_ZERO = 0x0100000,
+ ADDR_COMPAT_LAYOUT = 0x0200000,
+ READ_IMPLIES_EXEC = 0x0400000,
+ ADDR_LIMIT_32BIT = 0x0800000,
+ SHORT_INODE = 0x1000000,
+ WHOLE_SECONDS = 0x2000000,
+ STICKY_TIMEOUTS = 0x4000000,
+ ADDR_LIMIT_3GB = 0x8000000,
+};
+
+#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE)
+
+enum {
+ PER_LINUX = 0x0000,
+ PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT,
+ PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS,
+ PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+ PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS |
+ WHOLE_SECONDS | SHORT_INODE,
+ PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
+ PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS,
+ PER_BSD = 0x0006,
+ PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
+ PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_LINUX32 = 0x0008,
+ PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
+ PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,
+ PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,
+ PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,
+ PER_RISCOS = 0x000c,
+ PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
+ PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+ PER_OSF4 = 0x000f,
+ PER_HPUX = 0x0010,
+ PER_MASK = 0x00ff,
+};
+
+typedef void (*handler_t)(int, struct pt_regs *);
+
+struct exec_domain {
+ const char *name;
+ handler_t handler;
+ unsigned char pers_low;
+ unsigned char pers_high;
+ unsigned long *signal_map;
+ unsigned long *signal_invmap;
+ struct map_segment *err_map;
+ struct map_segment *socktype_map;
+ struct map_segment *sockopt_map;
+ struct map_segment *af_map;
+ struct module *module;
+ struct exec_domain *next;
+};
+
+#define personality(pers) (pers & PER_MASK)
+
+#define get_personality (current->personality)
+
+#define set_personality(pers) ((current->personality == pers) ? 0 : __set_personality(pers))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pfkeyv2.h b/6/platforms/android-3/arch-arm/usr/include/linux/pfkeyv2.h
new file mode 100644
index 0000000..3ac9488
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pfkeyv2.h
@@ -0,0 +1,306 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PFKEY2_H
+#define _LINUX_PFKEY2_H
+
+#include <linux/types.h>
+
+#define PF_KEY_V2 2
+#define PFKEYV2_REVISION 199806L
+
+struct sadb_msg {
+ uint8_t sadb_msg_version;
+ uint8_t sadb_msg_type;
+ uint8_t sadb_msg_errno;
+ uint8_t sadb_msg_satype;
+ uint16_t sadb_msg_len;
+ uint16_t sadb_msg_reserved;
+ uint32_t sadb_msg_seq;
+ uint32_t sadb_msg_pid;
+} __attribute__((packed));
+
+struct sadb_ext {
+ uint16_t sadb_ext_len;
+ uint16_t sadb_ext_type;
+} __attribute__((packed));
+
+struct sadb_sa {
+ uint16_t sadb_sa_len;
+ uint16_t sadb_sa_exttype;
+ uint32_t sadb_sa_spi;
+ uint8_t sadb_sa_replay;
+ uint8_t sadb_sa_state;
+ uint8_t sadb_sa_auth;
+ uint8_t sadb_sa_encrypt;
+ uint32_t sadb_sa_flags;
+} __attribute__((packed));
+
+struct sadb_lifetime {
+ uint16_t sadb_lifetime_len;
+ uint16_t sadb_lifetime_exttype;
+ uint32_t sadb_lifetime_allocations;
+ uint64_t sadb_lifetime_bytes;
+ uint64_t sadb_lifetime_addtime;
+ uint64_t sadb_lifetime_usetime;
+} __attribute__((packed));
+
+struct sadb_address {
+ uint16_t sadb_address_len;
+ uint16_t sadb_address_exttype;
+ uint8_t sadb_address_proto;
+ uint8_t sadb_address_prefixlen;
+ uint16_t sadb_address_reserved;
+} __attribute__((packed));
+
+struct sadb_key {
+ uint16_t sadb_key_len;
+ uint16_t sadb_key_exttype;
+ uint16_t sadb_key_bits;
+ uint16_t sadb_key_reserved;
+} __attribute__((packed));
+
+struct sadb_ident {
+ uint16_t sadb_ident_len;
+ uint16_t sadb_ident_exttype;
+ uint16_t sadb_ident_type;
+ uint16_t sadb_ident_reserved;
+ uint64_t sadb_ident_id;
+} __attribute__((packed));
+
+struct sadb_sens {
+ uint16_t sadb_sens_len;
+ uint16_t sadb_sens_exttype;
+ uint32_t sadb_sens_dpd;
+ uint8_t sadb_sens_sens_level;
+ uint8_t sadb_sens_sens_len;
+ uint8_t sadb_sens_integ_level;
+ uint8_t sadb_sens_integ_len;
+ uint32_t sadb_sens_reserved;
+} __attribute__((packed));
+
+struct sadb_prop {
+ uint16_t sadb_prop_len;
+ uint16_t sadb_prop_exttype;
+ uint8_t sadb_prop_replay;
+ uint8_t sadb_prop_reserved[3];
+} __attribute__((packed));
+
+struct sadb_comb {
+ uint8_t sadb_comb_auth;
+ uint8_t sadb_comb_encrypt;
+ uint16_t sadb_comb_flags;
+ uint16_t sadb_comb_auth_minbits;
+ uint16_t sadb_comb_auth_maxbits;
+ uint16_t sadb_comb_encrypt_minbits;
+ uint16_t sadb_comb_encrypt_maxbits;
+ uint32_t sadb_comb_reserved;
+ uint32_t sadb_comb_soft_allocations;
+ uint32_t sadb_comb_hard_allocations;
+ uint64_t sadb_comb_soft_bytes;
+ uint64_t sadb_comb_hard_bytes;
+ uint64_t sadb_comb_soft_addtime;
+ uint64_t sadb_comb_hard_addtime;
+ uint64_t sadb_comb_soft_usetime;
+ uint64_t sadb_comb_hard_usetime;
+} __attribute__((packed));
+
+struct sadb_supported {
+ uint16_t sadb_supported_len;
+ uint16_t sadb_supported_exttype;
+ uint32_t sadb_supported_reserved;
+} __attribute__((packed));
+
+struct sadb_alg {
+ uint8_t sadb_alg_id;
+ uint8_t sadb_alg_ivlen;
+ uint16_t sadb_alg_minbits;
+ uint16_t sadb_alg_maxbits;
+ uint16_t sadb_alg_reserved;
+} __attribute__((packed));
+
+struct sadb_spirange {
+ uint16_t sadb_spirange_len;
+ uint16_t sadb_spirange_exttype;
+ uint32_t sadb_spirange_min;
+ uint32_t sadb_spirange_max;
+ uint32_t sadb_spirange_reserved;
+} __attribute__((packed));
+
+struct sadb_x_kmprivate {
+ uint16_t sadb_x_kmprivate_len;
+ uint16_t sadb_x_kmprivate_exttype;
+ uint32_t sadb_x_kmprivate_reserved;
+} __attribute__((packed));
+
+struct sadb_x_sa2 {
+ uint16_t sadb_x_sa2_len;
+ uint16_t sadb_x_sa2_exttype;
+ uint8_t sadb_x_sa2_mode;
+ uint8_t sadb_x_sa2_reserved1;
+ uint16_t sadb_x_sa2_reserved2;
+ uint32_t sadb_x_sa2_sequence;
+ uint32_t sadb_x_sa2_reqid;
+} __attribute__((packed));
+
+struct sadb_x_policy {
+ uint16_t sadb_x_policy_len;
+ uint16_t sadb_x_policy_exttype;
+ uint16_t sadb_x_policy_type;
+ uint8_t sadb_x_policy_dir;
+ uint8_t sadb_x_policy_reserved;
+ uint32_t sadb_x_policy_id;
+ uint32_t sadb_x_policy_priority;
+} __attribute__((packed));
+
+struct sadb_x_ipsecrequest {
+ uint16_t sadb_x_ipsecrequest_len;
+ uint16_t sadb_x_ipsecrequest_proto;
+ uint8_t sadb_x_ipsecrequest_mode;
+ uint8_t sadb_x_ipsecrequest_level;
+ uint16_t sadb_x_ipsecrequest_reserved1;
+ uint32_t sadb_x_ipsecrequest_reqid;
+ uint32_t sadb_x_ipsecrequest_reserved2;
+} __attribute__((packed));
+
+struct sadb_x_nat_t_type {
+ uint16_t sadb_x_nat_t_type_len;
+ uint16_t sadb_x_nat_t_type_exttype;
+ uint8_t sadb_x_nat_t_type_type;
+ uint8_t sadb_x_nat_t_type_reserved[3];
+} __attribute__((packed));
+
+struct sadb_x_nat_t_port {
+ uint16_t sadb_x_nat_t_port_len;
+ uint16_t sadb_x_nat_t_port_exttype;
+ uint16_t sadb_x_nat_t_port_port;
+ uint16_t sadb_x_nat_t_port_reserved;
+} __attribute__((packed));
+
+struct sadb_x_sec_ctx {
+ uint16_t sadb_x_sec_len;
+ uint16_t sadb_x_sec_exttype;
+ uint8_t sadb_x_ctx_alg;
+ uint8_t sadb_x_ctx_doi;
+ uint16_t sadb_x_ctx_len;
+} __attribute__((packed));
+
+#define SADB_RESERVED 0
+#define SADB_GETSPI 1
+#define SADB_UPDATE 2
+#define SADB_ADD 3
+#define SADB_DELETE 4
+#define SADB_GET 5
+#define SADB_ACQUIRE 6
+#define SADB_REGISTER 7
+#define SADB_EXPIRE 8
+#define SADB_FLUSH 9
+#define SADB_DUMP 10
+#define SADB_X_PROMISC 11
+#define SADB_X_PCHANGE 12
+#define SADB_X_SPDUPDATE 13
+#define SADB_X_SPDADD 14
+#define SADB_X_SPDDELETE 15
+#define SADB_X_SPDGET 16
+#define SADB_X_SPDACQUIRE 17
+#define SADB_X_SPDDUMP 18
+#define SADB_X_SPDFLUSH 19
+#define SADB_X_SPDSETIDX 20
+#define SADB_X_SPDEXPIRE 21
+#define SADB_X_SPDDELETE2 22
+#define SADB_X_NAT_T_NEW_MAPPING 23
+#define SADB_MAX 23
+
+#define SADB_SAFLAGS_PFS 1
+#define SADB_SAFLAGS_NOPMTUDISC 0x20000000
+#define SADB_SAFLAGS_DECAP_DSCP 0x40000000
+#define SADB_SAFLAGS_NOECN 0x80000000
+
+#define SADB_SASTATE_LARVAL 0
+#define SADB_SASTATE_MATURE 1
+#define SADB_SASTATE_DYING 2
+#define SADB_SASTATE_DEAD 3
+#define SADB_SASTATE_MAX 3
+
+#define SADB_SATYPE_UNSPEC 0
+#define SADB_SATYPE_AH 2
+#define SADB_SATYPE_ESP 3
+#define SADB_SATYPE_RSVP 5
+#define SADB_SATYPE_OSPFV2 6
+#define SADB_SATYPE_RIPV2 7
+#define SADB_SATYPE_MIP 8
+#define SADB_X_SATYPE_IPCOMP 9
+#define SADB_SATYPE_MAX 9
+
+#define SADB_AALG_NONE 0
+#define SADB_AALG_MD5HMAC 2
+#define SADB_AALG_SHA1HMAC 3
+#define SADB_X_AALG_SHA2_256HMAC 5
+#define SADB_X_AALG_SHA2_384HMAC 6
+#define SADB_X_AALG_SHA2_512HMAC 7
+#define SADB_X_AALG_RIPEMD160HMAC 8
+#define SADB_X_AALG_NULL 251
+#define SADB_AALG_MAX 251
+
+#define SADB_EALG_NONE 0
+#define SADB_EALG_DESCBC 2
+#define SADB_EALG_3DESCBC 3
+#define SADB_X_EALG_CASTCBC 6
+#define SADB_X_EALG_BLOWFISHCBC 7
+#define SADB_EALG_NULL 11
+#define SADB_X_EALG_AESCBC 12
+#define SADB_EALG_MAX 253
+
+#define SADB_X_EALG_SERPENTCBC 252
+#define SADB_X_EALG_TWOFISHCBC 253
+
+#define SADB_X_CALG_NONE 0
+#define SADB_X_CALG_OUI 1
+#define SADB_X_CALG_DEFLATE 2
+#define SADB_X_CALG_LZS 3
+#define SADB_X_CALG_LZJH 4
+#define SADB_X_CALG_MAX 4
+
+#define SADB_EXT_RESERVED 0
+#define SADB_EXT_SA 1
+#define SADB_EXT_LIFETIME_CURRENT 2
+#define SADB_EXT_LIFETIME_HARD 3
+#define SADB_EXT_LIFETIME_SOFT 4
+#define SADB_EXT_ADDRESS_SRC 5
+#define SADB_EXT_ADDRESS_DST 6
+#define SADB_EXT_ADDRESS_PROXY 7
+#define SADB_EXT_KEY_AUTH 8
+#define SADB_EXT_KEY_ENCRYPT 9
+#define SADB_EXT_IDENTITY_SRC 10
+#define SADB_EXT_IDENTITY_DST 11
+#define SADB_EXT_SENSITIVITY 12
+#define SADB_EXT_PROPOSAL 13
+#define SADB_EXT_SUPPORTED_AUTH 14
+#define SADB_EXT_SUPPORTED_ENCRYPT 15
+#define SADB_EXT_SPIRANGE 16
+#define SADB_X_EXT_KMPRIVATE 17
+#define SADB_X_EXT_POLICY 18
+#define SADB_X_EXT_SA2 19
+
+#define SADB_X_EXT_NAT_T_TYPE 20
+#define SADB_X_EXT_NAT_T_SPORT 21
+#define SADB_X_EXT_NAT_T_DPORT 22
+#define SADB_X_EXT_NAT_T_OA 23
+#define SADB_X_EXT_SEC_CTX 24
+#define SADB_EXT_MAX 24
+
+#define SADB_IDENTTYPE_RESERVED 0
+#define SADB_IDENTTYPE_PREFIX 1
+#define SADB_IDENTTYPE_FQDN 2
+#define SADB_IDENTTYPE_USERFQDN 3
+#define SADB_IDENTTYPE_MAX 3
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pkt_cls.h b/6/platforms/android-3/arch-arm/usr/include/linux/pkt_cls.h
new file mode 100644
index 0000000..601a683
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pkt_cls.h
@@ -0,0 +1,372 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PKT_CLS_H
+#define __LINUX_PKT_CLS_H
+
+#include <linux/pkt_sched.h>
+
+#define _TC_MAKE32(x) ((x))
+
+#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n))
+#define _TC_MAKEMASK(v,n) (_TC_MAKE32((_TC_MAKE32(1)<<(v))-1) << _TC_MAKE32(n))
+#define _TC_MAKEVALUE(v,n) (_TC_MAKE32(v) << _TC_MAKE32(n))
+#define _TC_GETVALUE(v,n,m) ((_TC_MAKE32(v) & _TC_MAKE32(m)) >> _TC_MAKE32(n))
+
+#define TC_MUNGED _TC_MAKEMASK1(0)
+#define SET_TC_MUNGED(v) ( TC_MUNGED | (v & ~TC_MUNGED))
+#define CLR_TC_MUNGED(v) ( v & ~TC_MUNGED)
+
+#define TC_OK2MUNGE _TC_MAKEMASK1(1)
+#define SET_TC_OK2MUNGE(v) ( TC_OK2MUNGE | (v & ~TC_OK2MUNGE))
+#define CLR_TC_OK2MUNGE(v) ( v & ~TC_OK2MUNGE)
+
+#define S_TC_VERD _TC_MAKE32(2)
+#define M_TC_VERD _TC_MAKEMASK(4,S_TC_VERD)
+#define G_TC_VERD(x) _TC_GETVALUE(x,S_TC_VERD,M_TC_VERD)
+#define V_TC_VERD(x) _TC_MAKEVALUE(x,S_TC_VERD)
+#define SET_TC_VERD(v,n) ((V_TC_VERD(n)) | (v & ~M_TC_VERD))
+
+#define S_TC_FROM _TC_MAKE32(6)
+#define M_TC_FROM _TC_MAKEMASK(2,S_TC_FROM)
+#define G_TC_FROM(x) _TC_GETVALUE(x,S_TC_FROM,M_TC_FROM)
+#define V_TC_FROM(x) _TC_MAKEVALUE(x,S_TC_FROM)
+#define SET_TC_FROM(v,n) ((V_TC_FROM(n)) | (v & ~M_TC_FROM))
+#define AT_STACK 0x0
+#define AT_INGRESS 0x1
+#define AT_EGRESS 0x2
+
+#define TC_NCLS _TC_MAKEMASK1(8)
+#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS))
+#define CLR_TC_NCLS(v) ( v & ~TC_NCLS)
+
+#define S_TC_RTTL _TC_MAKE32(9)
+#define M_TC_RTTL _TC_MAKEMASK(3,S_TC_RTTL)
+#define G_TC_RTTL(x) _TC_GETVALUE(x,S_TC_RTTL,M_TC_RTTL)
+#define V_TC_RTTL(x) _TC_MAKEVALUE(x,S_TC_RTTL)
+#define SET_TC_RTTL(v,n) ((V_TC_RTTL(n)) | (v & ~M_TC_RTTL))
+
+#define S_TC_AT _TC_MAKE32(12)
+#define M_TC_AT _TC_MAKEMASK(2,S_TC_AT)
+#define G_TC_AT(x) _TC_GETVALUE(x,S_TC_AT,M_TC_AT)
+#define V_TC_AT(x) _TC_MAKEVALUE(x,S_TC_AT)
+#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
+
+enum
+{
+ TCA_ACT_UNSPEC,
+ TCA_ACT_KIND,
+ TCA_ACT_OPTIONS,
+ TCA_ACT_INDEX,
+ TCA_ACT_STATS,
+ __TCA_ACT_MAX
+};
+
+#define TCA_ACT_MAX __TCA_ACT_MAX
+#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
+#define TCA_ACT_MAX_PRIO 32
+#define TCA_ACT_BIND 1
+#define TCA_ACT_NOBIND 0
+#define TCA_ACT_UNBIND 1
+#define TCA_ACT_NOUNBIND 0
+#define TCA_ACT_REPLACE 1
+#define TCA_ACT_NOREPLACE 0
+#define MAX_REC_LOOP 4
+#define MAX_RED_LOOP 4
+
+#define TC_ACT_UNSPEC (-1)
+#define TC_ACT_OK 0
+#define TC_ACT_RECLASSIFY 1
+#define TC_ACT_SHOT 2
+#define TC_ACT_PIPE 3
+#define TC_ACT_STOLEN 4
+#define TC_ACT_QUEUED 5
+#define TC_ACT_REPEAT 6
+#define TC_ACT_JUMP 0x10000000
+
+enum
+{
+ TCA_ID_UNSPEC=0,
+ TCA_ID_POLICE=1,
+
+ __TCA_ID_MAX=255
+};
+
+#define TCA_ID_MAX __TCA_ID_MAX
+
+struct tc_police
+{
+ __u32 index;
+ int action;
+#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
+#define TC_POLICE_OK TC_ACT_OK
+#define TC_POLICE_RECLASSIFY TC_ACT_RECLASSIFY
+#define TC_POLICE_SHOT TC_ACT_SHOT
+#define TC_POLICE_PIPE TC_ACT_PIPE
+
+ __u32 limit;
+ __u32 burst;
+ __u32 mtu;
+ struct tc_ratespec rate;
+ struct tc_ratespec peakrate;
+ int refcnt;
+ int bindcnt;
+ __u32 capab;
+};
+
+struct tcf_t
+{
+ __u64 install;
+ __u64 lastuse;
+ __u64 expires;
+};
+
+struct tc_cnt
+{
+ int refcnt;
+ int bindcnt;
+};
+
+#define tc_gen __u32 index; __u32 capab; int action; int refcnt; int bindcnt
+
+enum
+{
+ TCA_POLICE_UNSPEC,
+ TCA_POLICE_TBF,
+ TCA_POLICE_RATE,
+ TCA_POLICE_PEAKRATE,
+ TCA_POLICE_AVRATE,
+ TCA_POLICE_RESULT,
+ __TCA_POLICE_MAX
+#define TCA_POLICE_RESULT TCA_POLICE_RESULT
+};
+
+#define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
+
+#define TC_U32_HTID(h) ((h)&0xFFF00000)
+#define TC_U32_USERHTID(h) (TC_U32_HTID(h)>>20)
+#define TC_U32_HASH(h) (((h)>>12)&0xFF)
+#define TC_U32_NODE(h) ((h)&0xFFF)
+#define TC_U32_KEY(h) ((h)&0xFFFFF)
+#define TC_U32_UNSPEC 0
+#define TC_U32_ROOT (0xFFF00000)
+
+enum
+{
+ TCA_U32_UNSPEC,
+ TCA_U32_CLASSID,
+ TCA_U32_HASH,
+ TCA_U32_LINK,
+ TCA_U32_DIVISOR,
+ TCA_U32_SEL,
+ TCA_U32_POLICE,
+ TCA_U32_ACT,
+ TCA_U32_INDEV,
+ TCA_U32_PCNT,
+ TCA_U32_MARK,
+ __TCA_U32_MAX
+};
+
+#define TCA_U32_MAX (__TCA_U32_MAX - 1)
+
+struct tc_u32_key
+{
+ __u32 mask;
+ __u32 val;
+ int off;
+ int offmask;
+};
+
+struct tc_u32_sel
+{
+ unsigned char flags;
+ unsigned char offshift;
+ unsigned char nkeys;
+
+ __u16 offmask;
+ __u16 off;
+ short offoff;
+
+ short hoff;
+ __u32 hmask;
+ struct tc_u32_key keys[0];
+};
+
+struct tc_u32_mark
+{
+ __u32 val;
+ __u32 mask;
+ __u32 success;
+};
+
+struct tc_u32_pcnt
+{
+ __u64 rcnt;
+ __u64 rhit;
+ __u64 kcnts[0];
+};
+
+#define TC_U32_TERMINAL 1
+#define TC_U32_OFFSET 2
+#define TC_U32_VAROFFSET 4
+#define TC_U32_EAT 8
+
+#define TC_U32_MAXDEPTH 8
+
+enum
+{
+ TCA_RSVP_UNSPEC,
+ TCA_RSVP_CLASSID,
+ TCA_RSVP_DST,
+ TCA_RSVP_SRC,
+ TCA_RSVP_PINFO,
+ TCA_RSVP_POLICE,
+ TCA_RSVP_ACT,
+ __TCA_RSVP_MAX
+};
+
+#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
+
+struct tc_rsvp_gpi
+{
+ __u32 key;
+ __u32 mask;
+ int offset;
+};
+
+struct tc_rsvp_pinfo
+{
+ struct tc_rsvp_gpi dpi;
+ struct tc_rsvp_gpi spi;
+ __u8 protocol;
+ __u8 tunnelid;
+ __u8 tunnelhdr;
+ __u8 pad;
+};
+
+enum
+{
+ TCA_ROUTE4_UNSPEC,
+ TCA_ROUTE4_CLASSID,
+ TCA_ROUTE4_TO,
+ TCA_ROUTE4_FROM,
+ TCA_ROUTE4_IIF,
+ TCA_ROUTE4_POLICE,
+ TCA_ROUTE4_ACT,
+ __TCA_ROUTE4_MAX
+};
+
+#define TCA_ROUTE4_MAX (__TCA_ROUTE4_MAX - 1)
+
+enum
+{
+ TCA_FW_UNSPEC,
+ TCA_FW_CLASSID,
+ TCA_FW_POLICE,
+ TCA_FW_INDEV,
+ TCA_FW_ACT,
+ __TCA_FW_MAX
+};
+
+#define TCA_FW_MAX (__TCA_FW_MAX - 1)
+
+enum
+{
+ TCA_TCINDEX_UNSPEC,
+ TCA_TCINDEX_HASH,
+ TCA_TCINDEX_MASK,
+ TCA_TCINDEX_SHIFT,
+ TCA_TCINDEX_FALL_THROUGH,
+ TCA_TCINDEX_CLASSID,
+ TCA_TCINDEX_POLICE,
+ TCA_TCINDEX_ACT,
+ __TCA_TCINDEX_MAX
+};
+
+#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
+
+enum
+{
+ TCA_BASIC_UNSPEC,
+ TCA_BASIC_CLASSID,
+ TCA_BASIC_EMATCHES,
+ TCA_BASIC_ACT,
+ TCA_BASIC_POLICE,
+ __TCA_BASIC_MAX
+};
+
+#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
+
+struct tcf_ematch_tree_hdr
+{
+ __u16 nmatches;
+ __u16 progid;
+};
+
+enum
+{
+ TCA_EMATCH_TREE_UNSPEC,
+ TCA_EMATCH_TREE_HDR,
+ TCA_EMATCH_TREE_LIST,
+ __TCA_EMATCH_TREE_MAX
+};
+#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
+
+struct tcf_ematch_hdr
+{
+ __u16 matchid;
+ __u16 kind;
+ __u16 flags;
+ __u16 pad;
+};
+
+#define TCF_EM_REL_END 0
+#define TCF_EM_REL_AND (1<<0)
+#define TCF_EM_REL_OR (1<<1)
+#define TCF_EM_INVERT (1<<2)
+#define TCF_EM_SIMPLE (1<<3)
+
+#define TCF_EM_REL_MASK 3
+#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
+
+enum
+{
+ TCF_LAYER_LINK,
+ TCF_LAYER_NETWORK,
+ TCF_LAYER_TRANSPORT,
+ __TCF_LAYER_MAX
+};
+#define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1)
+
+enum
+{
+ TCF_EM_CONTAINER,
+ TCF_EM_CMP,
+ TCF_EM_NBYTE,
+ TCF_EM_U32,
+ TCF_EM_META,
+ TCF_EM_TEXT,
+ __TCF_EM_MAX
+};
+
+enum
+{
+ TCF_EM_PROG_TC
+};
+
+enum
+{
+ TCF_EM_OPND_EQ,
+ TCF_EM_OPND_GT,
+ TCF_EM_OPND_LT
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pkt_sched.h b/6/platforms/android-3/arch-arm/usr/include/linux/pkt_sched.h
new file mode 100644
index 0000000..1e15d83
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pkt_sched.h
@@ -0,0 +1,405 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PKT_SCHED_H
+#define __LINUX_PKT_SCHED_H
+
+#define TC_PRIO_BESTEFFORT 0
+#define TC_PRIO_FILLER 1
+#define TC_PRIO_BULK 2
+#define TC_PRIO_INTERACTIVE_BULK 4
+#define TC_PRIO_INTERACTIVE 6
+#define TC_PRIO_CONTROL 7
+
+#define TC_PRIO_MAX 15
+
+struct tc_stats
+{
+ __u64 bytes;
+ __u32 packets;
+ __u32 drops;
+ __u32 overlimits;
+ __u32 bps;
+ __u32 pps;
+ __u32 qlen;
+ __u32 backlog;
+};
+
+struct tc_estimator
+{
+ signed char interval;
+ unsigned char ewma_log;
+};
+
+#define TC_H_MAJ_MASK (0xFFFF0000U)
+#define TC_H_MIN_MASK (0x0000FFFFU)
+#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
+#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
+#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
+
+#define TC_H_UNSPEC (0U)
+#define TC_H_ROOT (0xFFFFFFFFU)
+#define TC_H_INGRESS (0xFFFFFFF1U)
+
+struct tc_ratespec
+{
+ unsigned char cell_log;
+ unsigned char __reserved;
+ unsigned short feature;
+ short addend;
+ unsigned short mpu;
+ __u32 rate;
+};
+
+struct tc_fifo_qopt
+{
+ __u32 limit;
+};
+
+#define TCQ_PRIO_BANDS 16
+#define TCQ_MIN_PRIO_BANDS 2
+
+struct tc_prio_qopt
+{
+ int bands;
+ __u8 priomap[TC_PRIO_MAX+1];
+};
+
+struct tc_tbf_qopt
+{
+ struct tc_ratespec rate;
+ struct tc_ratespec peakrate;
+ __u32 limit;
+ __u32 buffer;
+ __u32 mtu;
+};
+
+enum
+{
+ TCA_TBF_UNSPEC,
+ TCA_TBF_PARMS,
+ TCA_TBF_RTAB,
+ TCA_TBF_PTAB,
+ __TCA_TBF_MAX,
+};
+
+#define TCA_TBF_MAX (__TCA_TBF_MAX - 1)
+
+struct tc_sfq_qopt
+{
+ unsigned quantum;
+ int perturb_period;
+ __u32 limit;
+ unsigned divisor;
+ unsigned flows;
+};
+
+enum
+{
+ TCA_RED_UNSPEC,
+ TCA_RED_PARMS,
+ TCA_RED_STAB,
+ __TCA_RED_MAX,
+};
+
+#define TCA_RED_MAX (__TCA_RED_MAX - 1)
+
+struct tc_red_qopt
+{
+ __u32 limit;
+ __u32 qth_min;
+ __u32 qth_max;
+ unsigned char Wlog;
+ unsigned char Plog;
+ unsigned char Scell_log;
+ unsigned char flags;
+#define TC_RED_ECN 1
+#define TC_RED_HARDDROP 2
+};
+
+struct tc_red_xstats
+{
+ __u32 early;
+ __u32 pdrop;
+ __u32 other;
+ __u32 marked;
+};
+
+#define MAX_DPs 16
+
+enum
+{
+ TCA_GRED_UNSPEC,
+ TCA_GRED_PARMS,
+ TCA_GRED_STAB,
+ TCA_GRED_DPS,
+ __TCA_GRED_MAX,
+};
+
+#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
+
+struct tc_gred_qopt
+{
+ __u32 limit;
+ __u32 qth_min;
+ __u32 qth_max;
+ __u32 DP;
+ __u32 backlog;
+ __u32 qave;
+ __u32 forced;
+ __u32 early;
+ __u32 other;
+ __u32 pdrop;
+ __u8 Wlog;
+ __u8 Plog;
+ __u8 Scell_log;
+ __u8 prio;
+ __u32 packets;
+ __u32 bytesin;
+};
+
+struct tc_gred_sopt
+{
+ __u32 DPs;
+ __u32 def_DP;
+ __u8 grio;
+ __u8 flags;
+ __u16 pad1;
+};
+
+#define TC_HTB_NUMPRIO 8
+#define TC_HTB_MAXDEPTH 8
+#define TC_HTB_PROTOVER 3
+
+struct tc_htb_opt
+{
+ struct tc_ratespec rate;
+ struct tc_ratespec ceil;
+ __u32 buffer;
+ __u32 cbuffer;
+ __u32 quantum;
+ __u32 level;
+ __u32 prio;
+};
+struct tc_htb_glob
+{
+ __u32 version;
+ __u32 rate2quantum;
+ __u32 defcls;
+ __u32 debug;
+
+ __u32 direct_pkts;
+};
+enum
+{
+ TCA_HTB_UNSPEC,
+ TCA_HTB_PARMS,
+ TCA_HTB_INIT,
+ TCA_HTB_CTAB,
+ TCA_HTB_RTAB,
+ __TCA_HTB_MAX,
+};
+
+#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
+
+struct tc_htb_xstats
+{
+ __u32 lends;
+ __u32 borrows;
+ __u32 giants;
+ __u32 tokens;
+ __u32 ctokens;
+};
+
+struct tc_hfsc_qopt
+{
+ __u16 defcls;
+};
+
+struct tc_service_curve
+{
+ __u32 m1;
+ __u32 d;
+ __u32 m2;
+};
+
+struct tc_hfsc_stats
+{
+ __u64 work;
+ __u64 rtwork;
+ __u32 period;
+ __u32 level;
+};
+
+enum
+{
+ TCA_HFSC_UNSPEC,
+ TCA_HFSC_RSC,
+ TCA_HFSC_FSC,
+ TCA_HFSC_USC,
+ __TCA_HFSC_MAX,
+};
+
+#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1)
+
+#define TC_CBQ_MAXPRIO 8
+#define TC_CBQ_MAXLEVEL 8
+#define TC_CBQ_DEF_EWMA 5
+
+struct tc_cbq_lssopt
+{
+ unsigned char change;
+ unsigned char flags;
+#define TCF_CBQ_LSS_BOUNDED 1
+#define TCF_CBQ_LSS_ISOLATED 2
+ unsigned char ewma_log;
+ unsigned char level;
+#define TCF_CBQ_LSS_FLAGS 1
+#define TCF_CBQ_LSS_EWMA 2
+#define TCF_CBQ_LSS_MAXIDLE 4
+#define TCF_CBQ_LSS_MINIDLE 8
+#define TCF_CBQ_LSS_OFFTIME 0x10
+#define TCF_CBQ_LSS_AVPKT 0x20
+ __u32 maxidle;
+ __u32 minidle;
+ __u32 offtime;
+ __u32 avpkt;
+};
+
+struct tc_cbq_wrropt
+{
+ unsigned char flags;
+ unsigned char priority;
+ unsigned char cpriority;
+ unsigned char __reserved;
+ __u32 allot;
+ __u32 weight;
+};
+
+struct tc_cbq_ovl
+{
+ unsigned char strategy;
+#define TC_CBQ_OVL_CLASSIC 0
+#define TC_CBQ_OVL_DELAY 1
+#define TC_CBQ_OVL_LOWPRIO 2
+#define TC_CBQ_OVL_DROP 3
+#define TC_CBQ_OVL_RCLASSIC 4
+ unsigned char priority2;
+ __u16 pad;
+ __u32 penalty;
+};
+
+struct tc_cbq_police
+{
+ unsigned char police;
+ unsigned char __res1;
+ unsigned short __res2;
+};
+
+struct tc_cbq_fopt
+{
+ __u32 split;
+ __u32 defmap;
+ __u32 defchange;
+};
+
+struct tc_cbq_xstats
+{
+ __u32 borrows;
+ __u32 overactions;
+ __s32 avgidle;
+ __s32 undertime;
+};
+
+enum
+{
+ TCA_CBQ_UNSPEC,
+ TCA_CBQ_LSSOPT,
+ TCA_CBQ_WRROPT,
+ TCA_CBQ_FOPT,
+ TCA_CBQ_OVL_STRATEGY,
+ TCA_CBQ_RATE,
+ TCA_CBQ_RTAB,
+ TCA_CBQ_POLICE,
+ __TCA_CBQ_MAX,
+};
+
+#define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1)
+
+enum {
+ TCA_DSMARK_UNSPEC,
+ TCA_DSMARK_INDICES,
+ TCA_DSMARK_DEFAULT_INDEX,
+ TCA_DSMARK_SET_TC_INDEX,
+ TCA_DSMARK_MASK,
+ TCA_DSMARK_VALUE,
+ __TCA_DSMARK_MAX,
+};
+
+#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
+
+enum {
+ TCA_ATM_UNSPEC,
+ TCA_ATM_FD,
+ TCA_ATM_PTR,
+ TCA_ATM_HDR,
+ TCA_ATM_EXCESS,
+ TCA_ATM_ADDR,
+ TCA_ATM_STATE,
+ __TCA_ATM_MAX,
+};
+
+#define TCA_ATM_MAX (__TCA_ATM_MAX - 1)
+
+enum
+{
+ TCA_NETEM_UNSPEC,
+ TCA_NETEM_CORR,
+ TCA_NETEM_DELAY_DIST,
+ TCA_NETEM_REORDER,
+ TCA_NETEM_CORRUPT,
+ __TCA_NETEM_MAX,
+};
+
+#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
+
+struct tc_netem_qopt
+{
+ __u32 latency;
+ __u32 limit;
+ __u32 loss;
+ __u32 gap;
+ __u32 duplicate;
+ __u32 jitter;
+};
+
+struct tc_netem_corr
+{
+ __u32 delay_corr;
+ __u32 loss_corr;
+ __u32 dup_corr;
+};
+
+struct tc_netem_reorder
+{
+ __u32 probability;
+ __u32 correlation;
+};
+
+struct tc_netem_corrupt
+{
+ __u32 probability;
+ __u32 correlation;
+};
+
+#define NETEM_DIST_SCALE 8192
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/platform_device.h b/6/platforms/android-3/arch-arm/usr/include/linux/platform_device.h
new file mode 100644
index 0000000..a761b5b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/platform_device.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PLATFORM_DEVICE_H_
+#define _PLATFORM_DEVICE_H_
+
+#include <linux/device.h>
+
+struct platform_device {
+ const char * name;
+ u32 id;
+ struct device dev;
+ u32 num_resources;
+ struct resource * resource;
+};
+
+#define to_platform_device(x) container_of((x), struct platform_device, dev)
+
+struct platform_driver {
+ int (*probe)(struct platform_device *);
+ int (*remove)(struct platform_device *);
+ void (*shutdown)(struct platform_device *);
+ int (*suspend)(struct platform_device *, pm_message_t state);
+ int (*resume)(struct platform_device *);
+ struct device_driver driver;
+};
+
+#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
+#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/plist.h b/6/platforms/android-3/arch-arm/usr/include/linux/plist.h
new file mode 100644
index 0000000..5d65783
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/plist.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PLIST_H_
+#define _LINUX_PLIST_H_
+
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/spinlock_types.h>
+
+struct plist_head {
+ struct list_head prio_list;
+ struct list_head node_list;
+};
+
+struct plist_node {
+ int prio;
+ struct plist_head plist;
+};
+
+#define PLIST_HEAD_LOCK_INIT(_lock)
+
+#define PLIST_HEAD_INIT(head, _lock) { .prio_list = LIST_HEAD_INIT((head).prio_list), .node_list = LIST_HEAD_INIT((head).node_list), PLIST_HEAD_LOCK_INIT(&(_lock)) }
+
+#define PLIST_NODE_INIT(node, __prio) { .prio = (__prio), .plist = PLIST_HEAD_INIT((node).plist, NULL), }
+
+#define plist_for_each(pos, head) list_for_each_entry(pos, &(head)->node_list, plist.node_list)
+
+#define plist_for_each_safe(pos, n, head) list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
+
+#define plist_for_each_entry(pos, head, mem) list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
+
+#define plist_for_each_entry_safe(pos, n, head, m) list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
+
+#define plist_first_entry(head, type, member) container_of(plist_first(head), type, member)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pm.h b/6/platforms/android-3/arch-arm/usr/include/linux/pm.h
new file mode 100644
index 0000000..0548791
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pm.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PM_H
+#define _LINUX_PM_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/pnp.h b/6/platforms/android-3/arch-arm/usr/include/linux/pnp.h
new file mode 100644
index 0000000..30b0af7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/pnp.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PNP_H
+#define _LINUX_PNP_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/poll.h b/6/platforms/android-3/arch-arm/usr/include/linux/poll.h
new file mode 100644
index 0000000..6822509
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/poll.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_POLL_H
+#define _LINUX_POLL_H
+
+#include <asm/poll.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/posix_acl.h b/6/platforms/android-3/arch-arm/usr/include/linux/posix_acl.h
new file mode 100644
index 0000000..bdaee5b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/posix_acl.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_POSIX_ACL_H
+#define __LINUX_POSIX_ACL_H
+
+#include <linux/slab.h>
+
+#define ACL_UNDEFINED_ID (-1)
+
+#define ACL_TYPE_ACCESS (0x8000)
+#define ACL_TYPE_DEFAULT (0x4000)
+
+#define ACL_USER_OBJ (0x01)
+#define ACL_USER (0x02)
+#define ACL_GROUP_OBJ (0x04)
+#define ACL_GROUP (0x08)
+#define ACL_MASK (0x10)
+#define ACL_OTHER (0x20)
+
+#define ACL_READ (0x04)
+#define ACL_WRITE (0x02)
+#define ACL_EXECUTE (0x01)
+
+struct posix_acl_entry {
+ short e_tag;
+ unsigned short e_perm;
+ unsigned int e_id;
+};
+
+struct posix_acl {
+ atomic_t a_refcount;
+ unsigned int a_count;
+ struct posix_acl_entry a_entries[0];
+};
+
+#define FOREACH_ACL_ENTRY(pa, acl, pe) for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/posix_types.h b/6/platforms/android-3/arch-arm/usr/include/linux/posix_types.h
new file mode 100644
index 0000000..d7d0ad2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/posix_types.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_POSIX_TYPES_H
+#define _LINUX_POSIX_TYPES_H
+
+#include <linux/stddef.h>
+
+#undef __NFDBITS
+#define __NFDBITS (8 * sizeof(unsigned long))
+
+#undef __FD_SETSIZE
+#define __FD_SETSIZE 1024
+
+#undef __FDSET_LONGS
+#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS)
+
+#undef __FDELT
+#define __FDELT(d) ((d) / __NFDBITS)
+
+#undef __FDMASK
+#define __FDMASK(d) (1UL << ((d) % __NFDBITS))
+
+typedef struct {
+ unsigned long fds_bits [__FDSET_LONGS];
+} __kernel_fd_set;
+
+typedef void (*__kernel_sighandler_t)(int);
+
+typedef int __kernel_key_t;
+typedef int __kernel_mqd_t;
+
+#include <asm/posix_types.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ppdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/ppdev.h
new file mode 100644
index 0000000..c43f8b9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ppdev.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define PP_IOCTL 'p'
+
+#define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
+
+#define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
+#define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
+
+#define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
+#define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
+
+struct ppdev_frob_struct {
+ unsigned char mask;
+ unsigned char val;
+};
+#define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
+
+#define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
+#define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
+
+#define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
+#define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
+
+#define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
+#define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
+
+#define PPCLAIM _IO(PP_IOCTL, 0x8b)
+
+#define PPRELEASE _IO(PP_IOCTL, 0x8c)
+
+#define PPYIELD _IO(PP_IOCTL, 0x8d)
+
+#define PPEXCL _IO(PP_IOCTL, 0x8f)
+
+#define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
+
+#define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
+
+#define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
+
+#define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
+
+#define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
+
+#define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
+#define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
+
+#define PPGETMODES _IOR(PP_IOCTL, 0x97, unsigned int)
+
+#define PPGETMODE _IOR(PP_IOCTL, 0x98, int)
+#define PPGETPHASE _IOR(PP_IOCTL, 0x99, int)
+
+#define PPGETFLAGS _IOR(PP_IOCTL, 0x9a, int)
+#define PPSETFLAGS _IOW(PP_IOCTL, 0x9b, int)
+
+#define PP_FASTWRITE (1<<2)
+#define PP_FASTREAD (1<<3)
+#define PP_W91284PIC (1<<4)
+
+#define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ppp_defs.h b/6/platforms/android-3/arch-arm/usr/include/linux/ppp_defs.h
new file mode 100644
index 0000000..da54ac7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ppp_defs.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PPP_DEFS_H_
+#define _PPP_DEFS_H_
+
+#define PPP_HDRLEN 4
+#define PPP_FCSLEN 2
+#define PPP_MRU 1500
+
+#define PPP_ADDRESS(p) (((__u8 *)(p))[0])
+#define PPP_CONTROL(p) (((__u8 *)(p))[1])
+#define PPP_PROTOCOL(p) ((((__u8 *)(p))[2] << 8) + ((__u8 *)(p))[3])
+
+#define PPP_ALLSTATIONS 0xff
+#define PPP_UI 0x03
+#define PPP_FLAG 0x7e
+#define PPP_ESCAPE 0x7d
+#define PPP_TRANS 0x20
+
+#define PPP_IP 0x21
+#define PPP_AT 0x29
+#define PPP_IPX 0x2b
+#define PPP_VJC_COMP 0x2d
+#define PPP_VJC_UNCOMP 0x2f
+#define PPP_MP 0x3d
+#define PPP_IPV6 0x57
+#define PPP_COMPFRAG 0xfb
+#define PPP_COMP 0xfd
+#define PPP_MPLS_UC 0x0281
+#define PPP_MPLS_MC 0x0283
+#define PPP_IPCP 0x8021
+#define PPP_ATCP 0x8029
+#define PPP_IPXCP 0x802b
+#define PPP_IPV6CP 0x8057
+#define PPP_CCPFRAG 0x80fb
+#define PPP_CCP 0x80fd
+#define PPP_MPLSCP 0x80fd
+#define PPP_LCP 0xc021
+#define PPP_PAP 0xc023
+#define PPP_LQR 0xc025
+#define PPP_CHAP 0xc223
+#define PPP_CBCP 0xc029
+
+#define PPP_INITFCS 0xffff
+#define PPP_GOODFCS 0xf0b8
+
+typedef __u32 ext_accm[8];
+
+enum NPmode {
+ NPMODE_PASS,
+ NPMODE_DROP,
+ NPMODE_ERROR,
+ NPMODE_QUEUE
+};
+
+struct pppstat {
+ __u32 ppp_discards;
+
+ __u32 ppp_ibytes;
+ __u32 ppp_ioctects;
+ __u32 ppp_ipackets;
+ __u32 ppp_ierrors;
+ __u32 ppp_ilqrs;
+
+ __u32 ppp_obytes;
+ __u32 ppp_ooctects;
+ __u32 ppp_opackets;
+ __u32 ppp_oerrors;
+ __u32 ppp_olqrs;
+};
+
+struct vjstat {
+ __u32 vjs_packets;
+ __u32 vjs_compressed;
+ __u32 vjs_searches;
+ __u32 vjs_misses;
+ __u32 vjs_uncompressedin;
+ __u32 vjs_compressedin;
+ __u32 vjs_errorin;
+ __u32 vjs_tossed;
+};
+
+struct compstat {
+ __u32 unc_bytes;
+ __u32 unc_packets;
+ __u32 comp_bytes;
+ __u32 comp_packets;
+ __u32 inc_bytes;
+ __u32 inc_packets;
+
+ __u32 in_count;
+ __u32 bytes_out;
+
+ double ratio;
+};
+
+struct ppp_stats {
+ struct pppstat p;
+ struct vjstat vj;
+};
+
+struct ppp_comp_stats {
+ struct compstat c;
+ struct compstat d;
+};
+
+struct ppp_idle {
+ time_t xmit_idle;
+ time_t recv_idle;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/prctl.h b/6/platforms/android-3/arch-arm/usr/include/linux/prctl.h
new file mode 100644
index 0000000..a7631a2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/prctl.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PRCTL_H
+#define _LINUX_PRCTL_H
+
+#define PR_SET_PDEATHSIG 1
+#define PR_GET_PDEATHSIG 2
+
+#define PR_GET_DUMPABLE 3
+#define PR_SET_DUMPABLE 4
+
+#define PR_GET_UNALIGN 5
+#define PR_SET_UNALIGN 6
+#define PR_UNALIGN_NOPRINT 1
+#define PR_UNALIGN_SIGBUS 2
+
+#define PR_GET_KEEPCAPS 7
+#define PR_SET_KEEPCAPS 8
+
+#define PR_GET_FPEMU 9
+#define PR_SET_FPEMU 10
+#define PR_FPEMU_NOPRINT 1
+#define PR_FPEMU_SIGFPE 2
+
+#define PR_GET_FPEXC 11
+#define PR_SET_FPEXC 12
+#define PR_FP_EXC_SW_ENABLE 0x80
+#define PR_FP_EXC_DIV 0x010000
+#define PR_FP_EXC_OVF 0x020000
+#define PR_FP_EXC_UND 0x040000
+#define PR_FP_EXC_RES 0x080000
+#define PR_FP_EXC_INV 0x100000
+#define PR_FP_EXC_DISABLED 0
+#define PR_FP_EXC_NONRECOV 1
+#define PR_FP_EXC_ASYNC 2
+#define PR_FP_EXC_PRECISE 3
+
+#define PR_GET_TIMING 13
+#define PR_SET_TIMING 14
+#define PR_TIMING_STATISTICAL 0
+#define PR_TIMING_TIMESTAMP 1
+
+#define PR_SET_NAME 15
+#define PR_GET_NAME 16
+
+#define PR_GET_ENDIAN 19
+#define PR_SET_ENDIAN 20
+#define PR_ENDIAN_BIG 0
+#define PR_ENDIAN_LITTLE 1
+#define PR_ENDIAN_PPC_LITTLE 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/preempt.h b/6/platforms/android-3/arch-arm/usr/include/linux/preempt.h
new file mode 100644
index 0000000..b703dd3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/preempt.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PREEMPT_H
+#define __LINUX_PREEMPT_H
+
+#include <linux/thread_info.h>
+#include <linux/linkage.h>
+
+#define add_preempt_count(val) do { preempt_count() += (val); } while (0)
+#define sub_preempt_count(val) do { preempt_count() -= (val); } while (0)
+
+#define inc_preempt_count() add_preempt_count(1)
+#define dec_preempt_count() sub_preempt_count(1)
+
+#define preempt_count() (current_thread_info()->preempt_count)
+
+#define preempt_disable() do { } while (0)
+#define preempt_enable_no_resched() do { } while (0)
+#define preempt_enable() do { } while (0)
+#define preempt_check_resched() do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/proc_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/proc_fs.h
new file mode 100644
index 0000000..ccb22ac
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/proc_fs.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PROC_FS_H
+#define _LINUX_PROC_FS_H
+
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+
+#define FIRST_PROCESS_ENTRY 256
+
+enum {
+ PROC_ROOT_INO = 1,
+};
+
+#define PROC_SUPER_MAGIC 0x9fa0
+
+typedef int (read_proc_t)(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char __user *buffer,
+ unsigned long count, void *data);
+typedef int (get_info_t)(char *, char **, off_t, int);
+
+struct proc_dir_entry {
+ unsigned int low_ino;
+ unsigned short namelen;
+ const char *name;
+ mode_t mode;
+ nlink_t nlink;
+ uid_t uid;
+ gid_t gid;
+ loff_t size;
+ struct inode_operations * proc_iops;
+ const struct file_operations * proc_fops;
+ get_info_t *get_info;
+ struct module *owner;
+ struct proc_dir_entry *next, *parent, *subdir;
+ void *data;
+ read_proc_t *read_proc;
+ write_proc_t *write_proc;
+ atomic_t count;
+ int deleted;
+ void *set;
+};
+
+struct kcore_list {
+ struct kcore_list *next;
+ unsigned long addr;
+ size_t size;
+};
+
+struct vmcore {
+ struct list_head list;
+ unsigned long long paddr;
+ unsigned long long size;
+ loff_t offset;
+};
+
+#define proc_root_driver NULL
+#define proc_net NULL
+#define proc_bus NULL
+
+#define proc_net_fops_create(name, mode, fops) ({ (void)(mode), NULL; })
+#define proc_net_create(name, mode, info) ({ (void)(mode), NULL; })
+#define remove_proc_entry(name, parent) do {} while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ptrace.h b/6/platforms/android-3/arch-arm/usr/include/linux/ptrace.h
new file mode 100644
index 0000000..079c0c8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ptrace.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PTRACE_H
+#define _LINUX_PTRACE_H
+
+#define PTRACE_TRACEME 0
+#define PTRACE_PEEKTEXT 1
+#define PTRACE_PEEKDATA 2
+#define PTRACE_PEEKUSR 3
+#define PTRACE_POKETEXT 4
+#define PTRACE_POKEDATA 5
+#define PTRACE_POKEUSR 6
+#define PTRACE_CONT 7
+#define PTRACE_KILL 8
+#define PTRACE_SINGLESTEP 9
+
+#define PTRACE_ATTACH 0x10
+#define PTRACE_DETACH 0x11
+
+#define PTRACE_SYSCALL 24
+
+#define PTRACE_SETOPTIONS 0x4200
+#define PTRACE_GETEVENTMSG 0x4201
+#define PTRACE_GETSIGINFO 0x4202
+#define PTRACE_SETSIGINFO 0x4203
+
+#define PTRACE_O_TRACESYSGOOD 0x00000001
+#define PTRACE_O_TRACEFORK 0x00000002
+#define PTRACE_O_TRACEVFORK 0x00000004
+#define PTRACE_O_TRACECLONE 0x00000008
+#define PTRACE_O_TRACEEXEC 0x00000010
+#define PTRACE_O_TRACEVFORKDONE 0x00000020
+#define PTRACE_O_TRACEEXIT 0x00000040
+
+#define PTRACE_O_MASK 0x0000007f
+
+#define PTRACE_EVENT_FORK 1
+#define PTRACE_EVENT_VFORK 2
+#define PTRACE_EVENT_CLONE 3
+#define PTRACE_EVENT_EXEC 4
+#define PTRACE_EVENT_VFORK_DONE 5
+#define PTRACE_EVENT_EXIT 6
+
+#include <asm/ptrace.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/qic117.h b/6/platforms/android-3/arch-arm/usr/include/linux/qic117.h
new file mode 100644
index 0000000..e077090
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/qic117.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _QIC117_H
+#define _QIC117_H
+
+typedef enum {
+ QIC_NO_COMMAND = 0,
+ QIC_RESET = 1,
+ QIC_REPORT_NEXT_BIT = 2,
+ QIC_PAUSE = 3,
+ QIC_MICRO_STEP_PAUSE = 4,
+ QIC_ALTERNATE_TIMEOUT = 5,
+ QIC_REPORT_DRIVE_STATUS = 6,
+ QIC_REPORT_ERROR_CODE = 7,
+ QIC_REPORT_DRIVE_CONFIGURATION = 8,
+ QIC_REPORT_ROM_VERSION = 9,
+ QIC_LOGICAL_FORWARD = 10,
+ QIC_PHYSICAL_REVERSE = 11,
+ QIC_PHYSICAL_FORWARD = 12,
+ QIC_SEEK_HEAD_TO_TRACK = 13,
+ QIC_SEEK_LOAD_POINT = 14,
+ QIC_ENTER_FORMAT_MODE = 15,
+ QIC_WRITE_REFERENCE_BURST = 16,
+ QIC_ENTER_VERIFY_MODE = 17,
+ QIC_STOP_TAPE = 18,
+
+ QIC_MICRO_STEP_HEAD_UP = 21,
+ QIC_MICRO_STEP_HEAD_DOWN = 22,
+ QIC_SOFT_SELECT = 23,
+ QIC_SOFT_DESELECT = 24,
+ QIC_SKIP_REVERSE = 25,
+ QIC_SKIP_FORWARD = 26,
+ QIC_SELECT_RATE = 27,
+
+ QIC_ENTER_DIAGNOSTIC_1 = 28,
+ QIC_ENTER_DIAGNOSTIC_2 = 29,
+ QIC_ENTER_PRIMARY_MODE = 30,
+
+ QIC_REPORT_VENDOR_ID = 32,
+ QIC_REPORT_TAPE_STATUS = 33,
+ QIC_SKIP_EXTENDED_REVERSE = 34,
+ QIC_SKIP_EXTENDED_FORWARD = 35,
+ QIC_CALIBRATE_TAPE_LENGTH = 36,
+ QIC_REPORT_FORMAT_SEGMENTS = 37,
+ QIC_SET_FORMAT_SEGMENTS = 38,
+
+ QIC_PHANTOM_SELECT = 46,
+ QIC_PHANTOM_DESELECT = 47
+} qic117_cmd_t;
+
+typedef enum {
+ discretional = 0, required, ccs1, ccs2
+} qic_compatibility;
+
+typedef enum {
+ unused, mode, motion, report
+} command_types;
+
+struct qic117_command_table {
+ char *name;
+ __u8 mask;
+ __u8 state;
+ __u8 cmd_type;
+ __u8 non_intr;
+ __u8 level;
+};
+
+#define QIC117_COMMANDS { {NULL, 0x00, 0x00, mode, 0, discretional}, {"soft reset", 0x00, 0x00, motion, 1, required}, {"report next bit", 0x00, 0x00, report, 0, required}, {"pause", 0x36, 0x24, motion, 1, required}, {"micro step pause", 0x36, 0x24, motion, 1, required}, {"alternate command timeout", 0x00, 0x00, mode, 0, required}, {"report drive status", 0x00, 0x00, report, 0, required}, {"report error code", 0x01, 0x01, report, 0, required}, {"report drive configuration",0x00, 0x00, report, 0, required}, {"report rom version", 0x00, 0x00, report, 0, required}, {"logical forward", 0x37, 0x25, motion, 0, required}, {"physical reverse", 0x17, 0x05, motion, 0, required}, {"physical forward", 0x17, 0x05, motion, 0, required}, {"seek head to track", 0x37, 0x25, motion, 0, required}, {"seek load point", 0x17, 0x05, motion, 1, required}, {"enter format mode", 0x1f, 0x05, mode, 0, required}, {"write reference burst", 0x1f, 0x05, motion, 1, required}, {"enter verify mode", 0x37, 0x25, mode, 0, required}, {"stop tape", 0x00, 0x00, motion, 1, required}, {"reserved (19)", 0x00, 0x00, unused, 0, discretional}, {"reserved (20)", 0x00, 0x00, unused, 0, discretional}, {"micro step head up", 0x02, 0x00, motion, 0, required}, {"micro step head down", 0x02, 0x00, motion, 0, required}, {"soft select", 0x00, 0x00, mode, 0, discretional}, {"soft deselect", 0x00, 0x00, mode, 0, discretional}, {"skip segments reverse", 0x36, 0x24, motion, 1, required}, {"skip segments forward", 0x36, 0x24, motion, 1, required}, {"select rate or format", 0x03, 0x01, mode, 0, required }, {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional}, {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional}, {"enter primary mode", 0x00, 0x00, mode, 0, required}, {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional}, {"report vendor id", 0x00, 0x00, report, 0, required}, {"report tape status", 0x04, 0x04, report, 0, ccs1}, {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1}, {"skip extended forward", 0x36, 0x24, motion, 1, ccs1}, {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2}, {"report format segments", 0x17, 0x05, report, 0, ccs2}, {"set format segments", 0x17, 0x05, mode, 0, ccs2}, {"reserved (39)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional}, {"phantom select", 0x00, 0x00, mode, 0, discretional}, {"phantom deselect", 0x00, 0x00, mode, 0, discretional}, }
+
+#define QIC_STATUS_READY 0x01
+#define QIC_STATUS_ERROR 0x02
+#define QIC_STATUS_CARTRIDGE_PRESENT 0x04
+#define QIC_STATUS_WRITE_PROTECT 0x08
+#define QIC_STATUS_NEW_CARTRIDGE 0x10
+#define QIC_STATUS_REFERENCED 0x20
+#define QIC_STATUS_AT_BOT 0x40
+#define QIC_STATUS_AT_EOT 0x80
+
+#define QIC_CONFIG_RATE_MASK 0x18
+#define QIC_CONFIG_RATE_SHIFT 3
+#define QIC_CONFIG_RATE_250 0
+#define QIC_CONFIG_RATE_500 2
+#define QIC_CONFIG_RATE_1000 3
+#define QIC_CONFIG_RATE_2000 1
+#define QIC_CONFIG_RATE_4000 0
+
+#define QIC_CONFIG_LONG 0x40
+#define QIC_CONFIG_80 0x80
+
+#define QIC_TAPE_STD_MASK 0x0f
+#define QIC_TAPE_QIC40 0x01
+#define QIC_TAPE_QIC80 0x02
+#define QIC_TAPE_QIC3020 0x03
+#define QIC_TAPE_QIC3010 0x04
+
+#define QIC_TAPE_LEN_MASK 0x70
+#define QIC_TAPE_205FT 0x10
+#define QIC_TAPE_307FT 0x20
+#define QIC_TAPE_VARIABLE 0x30
+#define QIC_TAPE_1100FT 0x40
+#define QIC_TAPE_FLEX 0x60
+
+#define QIC_TAPE_WIDE 0x80
+
+#define QIC_TOP_TAPE_LEN 1500
+
+typedef struct {
+ char *message;
+ unsigned int fatal:1;
+} ftape_error;
+
+#define QIC117_ERRORS { { "No error", 0, }, { "Command Received while Drive Not Ready", 0, }, { "Cartridge Not Present or Removed", 1, }, { "Motor Speed Error (not within 1%)", 1, }, { "Motor Speed Fault (jammed, or gross speed error", 1, }, { "Cartridge Write Protected", 1, }, { "Undefined or Reserved Command Code", 1, }, { "Illegal Track Address Specified for Seek", 1, }, { "Illegal Command in Report Subcontext", 0, }, { "Illegal Entry into a Diagnostic Mode", 1, }, { "Broken Tape Detected (based on hole sensor)", 1, }, { "Warning--Read Gain Setting Error", 1, }, { "Command Received While Error Status Pending (obs)", 1, }, { "Command Received While New Cartridge Pending", 1, }, { "Command Illegal or Undefined in Primary Mode", 1, }, { "Command Illegal or Undefined in Format Mode", 1, }, { "Command Illegal or Undefined in Verify Mode", 1, }, { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, }, { "Logical EOT Before All Segments generated", 1, }, { "Command Illegal When Cartridge Not Referenced", 1, }, { "Self-Diagnostic Failed (cannot be cleared)", 1, }, { "Warning EEPROM Not Initialized, Defaults Set", 1, }, { "EEPROM Corrupted or Hardware Failure", 1, }, { "Motion Time-out Error", 1, }, { "Data Segment Too Long -- Logical Forward or Pause", 1, }, { "Transmit Overrun (obs)", 1, }, { "Power On Reset Occurred", 0, }, { "Software Reset Occurred", 0, }, { "Diagnostic Mode 1 Error", 1, }, { "Diagnostic Mode 2 Error", 1, }, { "Command Received During Non-Interruptible Process", 1, }, { "Rate or Format Selection Error", 1, }, { "Illegal Command While in High Speed Mode", 1, }, { "Illegal Seek Segment Value", 1, }, { "Invalid Media", 1, }, { "Head Positioning Failure", 1, }, { "Write Reference Burst Failure", 1, }, { "Prom Code Missing", 1, }, { "Invalid Format", 1, }, { "EOT/BOT System Failure", 1, }, { "Prom A Checksum Error", 1, }, { "Drive Wakeup Reset Occurred", 1, }, { "Prom B Checksum Error", 1, }, { "Illegal Entry into Format Mode", 1, }, }
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/qnxtypes.h b/6/platforms/android-3/arch-arm/usr/include/linux/qnxtypes.h
new file mode 100644
index 0000000..53cd20c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/qnxtypes.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _QNX4TYPES_H
+#define _QNX4TYPES_H
+
+typedef __le16 qnx4_nxtnt_t;
+typedef __u8 qnx4_ftype_t;
+
+typedef struct {
+ __le32 xtnt_blk;
+ __le32 xtnt_size;
+} qnx4_xtnt_t;
+
+typedef __le16 qnx4_mode_t;
+typedef __le16 qnx4_muid_t;
+typedef __le16 qnx4_mgid_t;
+typedef __le32 qnx4_off_t;
+typedef __le16 qnx4_nlink_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/quota.h b/6/platforms/android-3/arch-arm/usr/include/linux/quota.h
new file mode 100644
index 0000000..054af5a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/quota.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_QUOTA_
+#define _LINUX_QUOTA_
+
+#include <linux/errno.h>
+#include <linux/types.h>
+
+#define __DQUOT_VERSION__ "dquot_6.5.1"
+#define __DQUOT_NUM_VERSION__ 6*10000+5*100+1
+
+typedef __kernel_uid32_t qid_t;
+typedef __u64 qsize_t;
+
+#define QUOTABLOCK_BITS 10
+#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
+
+#define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10))
+#define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10))
+#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
+
+#define MAXQUOTAS 2
+#define USRQUOTA 0
+#define GRPQUOTA 1
+
+#define INITQFNAMES { "user", "group", "undefined", };
+
+#define SUBCMDMASK 0x00ff
+#define SUBCMDSHIFT 8
+#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
+
+#define Q_SYNC 0x800001
+#define Q_QUOTAON 0x800002
+#define Q_QUOTAOFF 0x800003
+#define Q_GETFMT 0x800004
+#define Q_GETINFO 0x800005
+#define Q_SETINFO 0x800006
+#define Q_GETQUOTA 0x800007
+#define Q_SETQUOTA 0x800008
+
+#define QIF_BLIMITS 1
+#define QIF_SPACE 2
+#define QIF_ILIMITS 4
+#define QIF_INODES 8
+#define QIF_BTIME 16
+#define QIF_ITIME 32
+#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
+#define QIF_USAGE (QIF_SPACE | QIF_INODES)
+#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
+#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
+
+struct if_dqblk {
+ __u64 dqb_bhardlimit;
+ __u64 dqb_bsoftlimit;
+ __u64 dqb_curspace;
+ __u64 dqb_ihardlimit;
+ __u64 dqb_isoftlimit;
+ __u64 dqb_curinodes;
+ __u64 dqb_btime;
+ __u64 dqb_itime;
+ __u32 dqb_valid;
+};
+
+#define IIF_BGRACE 1
+#define IIF_IGRACE 2
+#define IIF_FLAGS 4
+#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
+
+struct if_dqinfo {
+ __u64 dqi_bgrace;
+ __u64 dqi_igrace;
+ __u32 dqi_flags;
+ __u32 dqi_valid;
+};
+
+#include <sys/cdefs.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/raid/md.h b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md.h
new file mode 100644
index 0000000..d609c06
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_H
+#define _MD_H
+
+#include <linux/blkdev.h>
+#include <asm/semaphore.h>
+#include <linux/major.h>
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#include <linux/bitops.h>
+#include <linux/module.h>
+#include <linux/hdreg.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <linux/smp_lock.h>
+#include <linux/delay.h>
+#include <net/checksum.h>
+#include <linux/random.h>
+#include <linux/kernel_stat.h>
+#include <asm/io.h>
+#include <linux/completion.h>
+#include <linux/mempool.h>
+#include <linux/list.h>
+#include <linux/reboot.h>
+#include <linux/vmalloc.h>
+#include <linux/blkpg.h>
+#include <linux/bio.h>
+
+#include <linux/raid/md_p.h>
+#include <linux/raid/md_u.h>
+#include <linux/raid/md_k.h>
+
+#define MD_MAJOR_VERSION 0
+#define MD_MINOR_VERSION 90
+
+#define MD_PATCHLEVEL_VERSION 3
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_k.h b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_k.h
new file mode 100644
index 0000000..c8b858c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_k.h
@@ -0,0 +1,184 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_K_H
+#define _MD_K_H
+
+#include "../../../drivers/md/dm-bio-list.h"
+
+#define LEVEL_MULTIPATH (-4)
+#define LEVEL_LINEAR (-1)
+#define LEVEL_FAULTY (-5)
+
+#define LEVEL_NONE (-1000000)
+
+#define MaxSector (~(sector_t)0)
+#define MD_THREAD_NAME_MAX 14
+
+typedef struct mddev_s mddev_t;
+typedef struct mdk_rdev_s mdk_rdev_t;
+
+#define MAX_MD_DEVS 256
+
+#define MAX_CHUNK_SIZE (1<<30)
+
+struct mdk_rdev_s
+{
+ struct list_head same_set;
+
+ sector_t size;
+ mddev_t *mddev;
+ unsigned long last_events;
+
+ struct block_device *bdev;
+
+ struct page *sb_page;
+ int sb_loaded;
+ __u64 sb_events;
+ sector_t data_offset;
+ sector_t sb_offset;
+ int sb_size;
+ int preferred_minor;
+
+ struct kobject kobj;
+
+ unsigned long flags;
+#define Faulty 1
+#define In_sync 2
+#define WriteMostly 4
+#define BarriersNotsupp 5
+
+ int desc_nr;
+ int raid_disk;
+ int saved_raid_disk;
+ sector_t recovery_offset;
+
+ atomic_t nr_pending;
+ atomic_t read_errors;
+ atomic_t corrected_errors;
+};
+
+struct mddev_s
+{
+ void *private;
+ struct mdk_personality *pers;
+ dev_t unit;
+ int md_minor;
+ struct list_head disks;
+ int sb_dirty;
+ int ro;
+
+ struct gendisk *gendisk;
+
+ struct kobject kobj;
+
+ int major_version,
+ minor_version,
+ patch_version;
+ int persistent;
+ int chunk_size;
+ time_t ctime, utime;
+ int level, layout;
+ char clevel[16];
+ int raid_disks;
+ int max_disks;
+ sector_t size;
+ sector_t array_size;
+ __u64 events;
+
+ char uuid[16];
+
+ sector_t reshape_position;
+ int delta_disks, new_level, new_layout, new_chunk;
+
+ struct mdk_thread_s *thread;
+ struct mdk_thread_s *sync_thread;
+ sector_t curr_resync;
+ unsigned long resync_mark;
+ sector_t resync_mark_cnt;
+ sector_t curr_mark_cnt;
+
+ sector_t resync_max_sectors;
+
+ sector_t resync_mismatches;
+
+ sector_t suspend_lo;
+ sector_t suspend_hi;
+
+ int sync_speed_min;
+ int sync_speed_max;
+
+ int ok_start_degraded;
+
+#define MD_RECOVERY_RUNNING 0
+#define MD_RECOVERY_SYNC 1
+#define MD_RECOVERY_ERR 2
+#define MD_RECOVERY_INTR 3
+#define MD_RECOVERY_DONE 4
+#define MD_RECOVERY_NEEDED 5
+#define MD_RECOVERY_REQUESTED 6
+#define MD_RECOVERY_CHECK 7
+#define MD_RECOVERY_RESHAPE 8
+#define MD_RECOVERY_FROZEN 9
+
+ unsigned long recovery;
+
+ int in_sync;
+ struct mutex reconfig_mutex;
+ atomic_t active;
+
+ int changed;
+ int degraded;
+ int barriers_work;
+ struct bio *biolist;
+
+ atomic_t recovery_active;
+ wait_queue_head_t recovery_wait;
+ sector_t recovery_cp;
+
+ spinlock_t write_lock;
+ wait_queue_head_t sb_wait;
+ atomic_t pending_writes;
+
+ unsigned int safemode;
+ unsigned int safemode_delay;
+ struct timer_list safemode_timer;
+ atomic_t writes_pending;
+ request_queue_t *queue;
+
+ atomic_t write_behind;
+ unsigned int max_write_behind;
+
+ struct bitmap *bitmap;
+ struct file *bitmap_file;
+ long bitmap_offset;
+ long default_bitmap_offset;
+
+ struct list_head all_mddevs;
+};
+
+struct md_sysfs_entry {
+ struct attribute attr;
+ ssize_t (*show)(mddev_t *, char *);
+ ssize_t (*store)(mddev_t *, const char *, size_t);
+};
+
+#define ITERATE_RDEV_GENERIC(head,rdev,tmp) for ((tmp) = (head).next; (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), (tmp) = (tmp)->next, (tmp)->prev != &(head) ; )
+#define ITERATE_RDEV(mddev,rdev,tmp) ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp)
+#define ITERATE_RDEV_PENDING(rdev,tmp) ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp)
+
+#define THREAD_WAKEUP 0
+
+#define __wait_event_lock_irq(wq, condition, lock, cmd) do { wait_queue_t __wait; init_waitqueue_entry(&__wait, current); add_wait_queue(&wq, &__wait); for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); if (condition) break; spin_unlock_irq(&lock); cmd; schedule(); spin_lock_irq(&lock); } current->state = TASK_RUNNING; remove_wait_queue(&wq, &__wait); } while (0)
+
+#define wait_event_lock_irq(wq, condition, lock, cmd) do { if (condition) break; __wait_event_lock_irq(wq, condition, lock, cmd); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_p.h b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_p.h
new file mode 100644
index 0000000..ab856a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_p.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_P_H
+#define _MD_P_H
+
+#define MD_RESERVED_BYTES (64 * 1024)
+#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
+#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
+
+#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
+#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
+
+#define MD_SB_BYTES 4096
+#define MD_SB_WORDS (MD_SB_BYTES / 4)
+#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
+#define MD_SB_SECTORS (MD_SB_BYTES / 512)
+
+#define MD_SB_GENERIC_OFFSET 0
+#define MD_SB_PERSONALITY_OFFSET 64
+#define MD_SB_DISKS_OFFSET 128
+#define MD_SB_DESCRIPTOR_OFFSET 992
+
+#define MD_SB_GENERIC_CONSTANT_WORDS 32
+#define MD_SB_GENERIC_STATE_WORDS 32
+#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
+#define MD_SB_PERSONALITY_WORDS 64
+#define MD_SB_DESCRIPTOR_WORDS 32
+#define MD_SB_DISKS 27
+#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
+#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
+#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
+
+#define MD_DISK_FAULTY 0
+#define MD_DISK_ACTIVE 1
+#define MD_DISK_SYNC 2
+#define MD_DISK_REMOVED 3
+
+#define MD_DISK_WRITEMOSTLY 9
+
+typedef struct mdp_device_descriptor_s {
+ __u32 number;
+ __u32 major;
+ __u32 minor;
+ __u32 raid_disk;
+ __u32 state;
+ __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
+} mdp_disk_t;
+
+#define MD_SB_MAGIC 0xa92b4efc
+
+#define MD_SB_CLEAN 0
+#define MD_SB_ERRORS 1
+
+#define MD_SB_BITMAP_PRESENT 8
+
+typedef struct mdp_superblock_s {
+
+ __u32 md_magic;
+ __u32 major_version;
+ __u32 minor_version;
+ __u32 patch_version;
+ __u32 gvalid_words;
+ __u32 set_uuid0;
+ __u32 ctime;
+ __u32 level;
+ __u32 size;
+ __u32 nr_disks;
+ __u32 raid_disks;
+ __u32 md_minor;
+ __u32 not_persistent;
+ __u32 set_uuid1;
+ __u32 set_uuid2;
+ __u32 set_uuid3;
+ __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16];
+
+ __u32 utime;
+ __u32 state;
+ __u32 active_disks;
+ __u32 working_disks;
+ __u32 failed_disks;
+ __u32 spare_disks;
+ __u32 sb_csum;
+#ifdef __BIG_ENDIAN
+ __u32 events_hi;
+ __u32 events_lo;
+ __u32 cp_events_hi;
+ __u32 cp_events_lo;
+#else
+ __u32 events_lo;
+ __u32 events_hi;
+ __u32 cp_events_lo;
+ __u32 cp_events_hi;
+#endif
+ __u32 recovery_cp;
+
+ __u64 reshape_position;
+ __u32 new_level;
+ __u32 delta_disks;
+ __u32 new_layout;
+ __u32 new_chunk;
+ __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18];
+
+ __u32 layout;
+ __u32 chunk_size;
+ __u32 root_pv;
+ __u32 root_block;
+ __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4];
+
+ mdp_disk_t disks[MD_SB_DISKS];
+
+ __u32 reserved[MD_SB_RESERVED_WORDS];
+
+ mdp_disk_t this_disk;
+
+} mdp_super_t;
+
+#define WriteMostly1 1
+
+#define MD_FEATURE_BITMAP_OFFSET 1
+#define MD_FEATURE_RECOVERY_OFFSET 2
+#define MD_FEATURE_RESHAPE_ACTIVE 4
+
+#define MD_FEATURE_ALL (1|2|4)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_u.h b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_u.h
new file mode 100644
index 0000000..3671187
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/raid/md_u.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_U_H
+#define _MD_U_H
+
+#define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t)
+#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t)
+#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t)
+#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
+#define RAID_AUTORUN _IO (MD_MAJOR, 0x14)
+#define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t)
+
+#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
+#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
+#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
+#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t)
+#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
+#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
+#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
+#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
+#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
+#define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29)
+#define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a)
+#define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int)
+
+#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t)
+#define START_ARRAY _IO (MD_MAJOR, 0x31)
+#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
+#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
+#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
+
+typedef struct mdu_version_s {
+ int major;
+ int minor;
+ int patchlevel;
+} mdu_version_t;
+
+typedef struct mdu_array_info_s {
+
+ int major_version;
+ int minor_version;
+ int patch_version;
+ int ctime;
+ int level;
+ int size;
+ int nr_disks;
+ int raid_disks;
+ int md_minor;
+ int not_persistent;
+
+ int utime;
+ int state;
+ int active_disks;
+ int working_disks;
+ int failed_disks;
+ int spare_disks;
+
+ int layout;
+ int chunk_size;
+
+} mdu_array_info_t;
+
+typedef struct mdu_disk_info_s {
+
+ int number;
+ int major;
+ int minor;
+ int raid_disk;
+ int state;
+
+} mdu_disk_info_t;
+
+typedef struct mdu_start_info_s {
+
+ int major;
+ int minor;
+ int raid_disk;
+ int state;
+
+} mdu_start_info_t;
+
+typedef struct mdu_bitmap_file_s
+{
+ char pathname[4096];
+} mdu_bitmap_file_t;
+
+typedef struct mdu_param_s
+{
+ int personality;
+ int chunk_size;
+ int max_fault;
+} mdu_param_t;
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/raid/xor.h b/6/platforms/android-3/arch-arm/usr/include/linux/raid/xor.h
new file mode 100644
index 0000000..01e9f45
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/raid/xor.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XOR_H
+#define _XOR_H
+
+#include <linux/raid/md.h>
+
+#define MAX_XOR_BLOCKS 5
+
+struct xor_block_template {
+ struct xor_block_template *next;
+ const char *name;
+ int speed;
+ void (*do_2)(unsigned long, unsigned long *, unsigned long *);
+ void (*do_3)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *);
+ void (*do_4)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *, unsigned long *);
+ void (*do_5)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *, unsigned long *, unsigned long *);
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/random.h b/6/platforms/android-3/arch-arm/usr/include/linux/random.h
new file mode 100644
index 0000000..d2bef97
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/random.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RANDOM_H
+#define _LINUX_RANDOM_H
+
+#include <linux/ioctl.h>
+
+#define RNDGETENTCNT _IOR( 'R', 0x00, int )
+
+#define RNDADDTOENTCNT _IOW( 'R', 0x01, int )
+
+#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
+
+#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )
+
+#define RNDZAPENTCNT _IO( 'R', 0x04 )
+
+#define RNDCLEARPOOL _IO( 'R', 0x06 )
+
+struct rand_pool_info {
+ int entropy_count;
+ int buf_size;
+ __u32 buf[0];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/rbtree.h b/6/platforms/android-3/arch-arm/usr/include/linux/rbtree.h
new file mode 100644
index 0000000..714ffe9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/rbtree.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RBTREE_H
+#define _LINUX_RBTREE_H
+
+#include <linux/kernel.h>
+#include <linux/stddef.h>
+
+struct rb_node
+{
+ unsigned long rb_parent_color;
+#define RB_RED 0
+#define RB_BLACK 1
+ struct rb_node *rb_right;
+ struct rb_node *rb_left;
+} __attribute__((aligned(sizeof(long))));
+
+struct rb_root
+{
+ struct rb_node *rb_node;
+};
+
+#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
+#define rb_color(r) ((r)->rb_parent_color & 1)
+#define rb_is_red(r) (!rb_color(r))
+#define rb_is_black(r) rb_color(r)
+#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
+#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
+
+#define RB_ROOT (struct rb_root) { NULL, }
+#define rb_entry(ptr, type, member) container_of(ptr, type, member)
+#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
+#define RB_EMPTY_NODE(node) (rb_parent(node) != node)
+#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/rcupdate.h b/6/platforms/android-3/arch-arm/usr/include/linux/rcupdate.h
new file mode 100644
index 0000000..5547a4d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/rcupdate.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_RCUPDATE_H
+#define __LINUX_RCUPDATE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/reboot.h b/6/platforms/android-3/arch-arm/usr/include/linux/reboot.h
new file mode 100644
index 0000000..e10ff14
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/reboot.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_REBOOT_H
+#define _LINUX_REBOOT_H
+
+#define LINUX_REBOOT_MAGIC1 0xfee1dead
+#define LINUX_REBOOT_MAGIC2 672274793
+#define LINUX_REBOOT_MAGIC2A 85072278
+#define LINUX_REBOOT_MAGIC2B 369367448
+#define LINUX_REBOOT_MAGIC2C 537993216
+
+#define LINUX_REBOOT_CMD_RESTART 0x01234567
+#define LINUX_REBOOT_CMD_HALT 0xCDEF0123
+#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
+#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
+#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
+#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
+#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
+#define LINUX_REBOOT_CMD_KEXEC 0x45584543
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/relay.h b/6/platforms/android-3/arch-arm/usr/include/linux/relay.h
new file mode 100644
index 0000000..09f7219
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/relay.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RELAY_H
+#define _LINUX_RELAY_H
+
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/wait.h>
+#include <linux/list.h>
+#include <linux/fs.h>
+#include <linux/poll.h>
+#include <linux/kref.h>
+
+#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
+
+#define RELAYFS_CHANNEL_VERSION 6
+
+struct rchan_buf
+{
+ void *start;
+ void *data;
+ size_t offset;
+ size_t subbufs_produced;
+ size_t subbufs_consumed;
+ struct rchan *chan;
+ wait_queue_head_t read_wait;
+ struct work_struct wake_readers;
+ struct dentry *dentry;
+ struct kref kref;
+ struct page **page_array;
+ unsigned int page_count;
+ unsigned int finalized;
+ size_t *padding;
+ size_t prev_padding;
+ size_t bytes_consumed;
+ unsigned int cpu;
+} ____cacheline_aligned;
+
+struct rchan
+{
+ u32 version;
+ size_t subbuf_size;
+ size_t n_subbufs;
+ size_t alloc_size;
+ struct rchan_callbacks *cb;
+ struct kref kref;
+ void *private_data;
+ size_t last_toobig;
+ struct rchan_buf *buf[NR_CPUS];
+};
+
+struct rchan_callbacks
+{
+
+ int (*subbuf_start) (struct rchan_buf *buf,
+ void *subbuf,
+ void *prev_subbuf,
+ size_t prev_padding);
+
+ void (*buf_mapped)(struct rchan_buf *buf,
+ struct file *filp);
+
+ void (*buf_unmapped)(struct rchan_buf *buf,
+ struct file *filp);
+
+ struct dentry *(*create_buf_file)(const char *filename,
+ struct dentry *parent,
+ int mode,
+ struct rchan_buf *buf,
+ int *is_global);
+
+ int (*remove_buf_file)(struct dentry *dentry);
+};
+
+struct rchan *relay_open(const char *base_filename,
+ struct dentry *parent,
+ size_t subbuf_size,
+ size_t n_subbufs,
+ struct rchan_callbacks *cb);
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/resource.h b/6/platforms/android-3/arch-arm/usr/include/linux/resource.h
new file mode 100644
index 0000000..347b524
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/resource.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RESOURCE_H
+#define _LINUX_RESOURCE_H
+
+#include <linux/time.h>
+
+struct task_struct;
+
+#define RUSAGE_SELF 0
+#define RUSAGE_CHILDREN (-1)
+#define RUSAGE_BOTH (-2)
+
+struct rusage {
+ struct timeval ru_utime;
+ struct timeval ru_stime;
+ long ru_maxrss;
+ long ru_ixrss;
+ long ru_idrss;
+ long ru_isrss;
+ long ru_minflt;
+ long ru_majflt;
+ long ru_nswap;
+ long ru_inblock;
+ long ru_oublock;
+ long ru_msgsnd;
+ long ru_msgrcv;
+ long ru_nsignals;
+ long ru_nvcsw;
+ long ru_nivcsw;
+};
+
+struct rlimit {
+ unsigned long rlim_cur;
+ unsigned long rlim_max;
+};
+
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+
+#define PRIO_PROCESS 0
+#define PRIO_PGRP 1
+#define PRIO_USER 2
+
+#define _STK_LIM (8*1024*1024)
+
+#define MLOCK_LIMIT (8 * PAGE_SIZE)
+
+#include <asm/resource.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/route.h b/6/platforms/android-3/arch-arm/usr/include/linux/route.h
new file mode 100644
index 0000000..cdb8744
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/route.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ROUTE_H
+#define _LINUX_ROUTE_H
+
+#include <linux/if.h>
+#include <linux/compiler.h>
+
+struct rtentry
+{
+ unsigned long rt_pad1;
+ struct sockaddr rt_dst;
+ struct sockaddr rt_gateway;
+ struct sockaddr rt_genmask;
+ unsigned short rt_flags;
+ short rt_pad2;
+ unsigned long rt_pad3;
+ void *rt_pad4;
+ short rt_metric;
+ char __user *rt_dev;
+ unsigned long rt_mtu;
+#define rt_mss rt_mtu
+ unsigned long rt_window;
+ unsigned short rt_irtt;
+};
+
+#define RTF_UP 0x0001
+#define RTF_GATEWAY 0x0002
+#define RTF_HOST 0x0004
+#define RTF_REINSTATE 0x0008
+#define RTF_DYNAMIC 0x0010
+#define RTF_MODIFIED 0x0020
+#define RTF_MTU 0x0040
+#define RTF_MSS RTF_MTU
+#define RTF_WINDOW 0x0080
+#define RTF_IRTT 0x0100
+#define RTF_REJECT 0x0200
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/rtc.h b/6/platforms/android-3/arch-arm/usr/include/linux/rtc.h
new file mode 100644
index 0000000..b51bc71
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/rtc.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RTC_H_
+#define _LINUX_RTC_H_
+
+struct rtc_time {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+
+struct rtc_wkalrm {
+ unsigned char enabled;
+ unsigned char pending;
+ struct rtc_time time;
+};
+
+struct rtc_pll_info {
+ int pll_ctrl;
+ int pll_value;
+ int pll_max;
+ int pll_min;
+ int pll_posmult;
+ int pll_negmult;
+ long pll_clock;
+};
+
+#define RTC_AIE_ON _IO('p', 0x01)
+#define RTC_AIE_OFF _IO('p', 0x02)
+#define RTC_UIE_ON _IO('p', 0x03)
+#define RTC_UIE_OFF _IO('p', 0x04)
+#define RTC_PIE_ON _IO('p', 0x05)
+#define RTC_PIE_OFF _IO('p', 0x06)
+#define RTC_WIE_ON _IO('p', 0x0f)
+#define RTC_WIE_OFF _IO('p', 0x10)
+
+#define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time)
+#define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time)
+#define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time)
+#define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time)
+#define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long)
+#define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long)
+#define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long)
+#define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long)
+
+#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)
+#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)
+
+#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info)
+#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info)
+
+#define RTC_IRQF 0x80
+#define RTC_PF 0x40
+#define RTC_AF 0x20
+#define RTC_UF 0x10
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/rtnetlink.h b/6/platforms/android-3/arch-arm/usr/include/linux/rtnetlink.h
new file mode 100644
index 0000000..ddcffaa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/rtnetlink.h
@@ -0,0 +1,723 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_RTNETLINK_H
+#define __LINUX_RTNETLINK_H
+
+#include <linux/netlink.h>
+
+enum {
+ RTM_BASE = 16,
+#define RTM_BASE RTM_BASE
+
+ RTM_NEWLINK = 16,
+#define RTM_NEWLINK RTM_NEWLINK
+ RTM_DELLINK,
+#define RTM_DELLINK RTM_DELLINK
+ RTM_GETLINK,
+#define RTM_GETLINK RTM_GETLINK
+ RTM_SETLINK,
+#define RTM_SETLINK RTM_SETLINK
+
+ RTM_NEWADDR = 20,
+#define RTM_NEWADDR RTM_NEWADDR
+ RTM_DELADDR,
+#define RTM_DELADDR RTM_DELADDR
+ RTM_GETADDR,
+#define RTM_GETADDR RTM_GETADDR
+
+ RTM_NEWROUTE = 24,
+#define RTM_NEWROUTE RTM_NEWROUTE
+ RTM_DELROUTE,
+#define RTM_DELROUTE RTM_DELROUTE
+ RTM_GETROUTE,
+#define RTM_GETROUTE RTM_GETROUTE
+
+ RTM_NEWNEIGH = 28,
+#define RTM_NEWNEIGH RTM_NEWNEIGH
+ RTM_DELNEIGH,
+#define RTM_DELNEIGH RTM_DELNEIGH
+ RTM_GETNEIGH,
+#define RTM_GETNEIGH RTM_GETNEIGH
+
+ RTM_NEWRULE = 32,
+#define RTM_NEWRULE RTM_NEWRULE
+ RTM_DELRULE,
+#define RTM_DELRULE RTM_DELRULE
+ RTM_GETRULE,
+#define RTM_GETRULE RTM_GETRULE
+
+ RTM_NEWQDISC = 36,
+#define RTM_NEWQDISC RTM_NEWQDISC
+ RTM_DELQDISC,
+#define RTM_DELQDISC RTM_DELQDISC
+ RTM_GETQDISC,
+#define RTM_GETQDISC RTM_GETQDISC
+
+ RTM_NEWTCLASS = 40,
+#define RTM_NEWTCLASS RTM_NEWTCLASS
+ RTM_DELTCLASS,
+#define RTM_DELTCLASS RTM_DELTCLASS
+ RTM_GETTCLASS,
+#define RTM_GETTCLASS RTM_GETTCLASS
+
+ RTM_NEWTFILTER = 44,
+#define RTM_NEWTFILTER RTM_NEWTFILTER
+ RTM_DELTFILTER,
+#define RTM_DELTFILTER RTM_DELTFILTER
+ RTM_GETTFILTER,
+#define RTM_GETTFILTER RTM_GETTFILTER
+
+ RTM_NEWACTION = 48,
+#define RTM_NEWACTION RTM_NEWACTION
+ RTM_DELACTION,
+#define RTM_DELACTION RTM_DELACTION
+ RTM_GETACTION,
+#define RTM_GETACTION RTM_GETACTION
+
+ RTM_NEWPREFIX = 52,
+#define RTM_NEWPREFIX RTM_NEWPREFIX
+ RTM_GETPREFIX = 54,
+#define RTM_GETPREFIX RTM_GETPREFIX
+
+ RTM_GETMULTICAST = 58,
+#define RTM_GETMULTICAST RTM_GETMULTICAST
+
+ RTM_GETANYCAST = 62,
+#define RTM_GETANYCAST RTM_GETANYCAST
+
+ RTM_NEWNEIGHTBL = 64,
+#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
+ RTM_GETNEIGHTBL = 66,
+#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
+ RTM_SETNEIGHTBL,
+#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
+
+ __RTM_MAX,
+#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
+};
+
+#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
+#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
+#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
+
+struct rtattr
+{
+ unsigned short rta_len;
+ unsigned short rta_type;
+};
+
+#define RTA_ALIGNTO 4
+#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
+#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len))
+#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
+#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
+#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
+#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
+#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
+
+struct rtmsg
+{
+ unsigned char rtm_family;
+ unsigned char rtm_dst_len;
+ unsigned char rtm_src_len;
+ unsigned char rtm_tos;
+
+ unsigned char rtm_table;
+ unsigned char rtm_protocol;
+ unsigned char rtm_scope;
+ unsigned char rtm_type;
+
+ unsigned rtm_flags;
+};
+
+enum
+{
+ RTN_UNSPEC,
+ RTN_UNICAST,
+ RTN_LOCAL,
+ RTN_BROADCAST,
+ RTN_ANYCAST,
+ RTN_MULTICAST,
+ RTN_BLACKHOLE,
+ RTN_UNREACHABLE,
+ RTN_PROHIBIT,
+ RTN_THROW,
+ RTN_NAT,
+ RTN_XRESOLVE,
+ __RTN_MAX
+};
+
+#define RTN_MAX (__RTN_MAX - 1)
+
+#define RTPROT_UNSPEC 0
+#define RTPROT_REDIRECT 1
+#define RTPROT_KERNEL 2
+#define RTPROT_BOOT 3
+#define RTPROT_STATIC 4
+
+#define RTPROT_GATED 8
+#define RTPROT_RA 9
+#define RTPROT_MRT 10
+#define RTPROT_ZEBRA 11
+#define RTPROT_BIRD 12
+#define RTPROT_DNROUTED 13
+#define RTPROT_XORP 14
+#define RTPROT_NTK 15
+
+enum rt_scope_t
+{
+ RT_SCOPE_UNIVERSE=0,
+
+ RT_SCOPE_SITE=200,
+ RT_SCOPE_LINK=253,
+ RT_SCOPE_HOST=254,
+ RT_SCOPE_NOWHERE=255
+};
+
+#define RTM_F_NOTIFY 0x100
+#define RTM_F_CLONED 0x200
+#define RTM_F_EQUALIZE 0x400
+#define RTM_F_PREFIX 0x800
+
+enum rt_class_t
+{
+ RT_TABLE_UNSPEC=0,
+
+ RT_TABLE_DEFAULT=253,
+ RT_TABLE_MAIN=254,
+ RT_TABLE_LOCAL=255,
+ __RT_TABLE_MAX
+};
+#define RT_TABLE_MAX (__RT_TABLE_MAX - 1)
+
+enum rtattr_type_t
+{
+ RTA_UNSPEC,
+ RTA_DST,
+ RTA_SRC,
+ RTA_IIF,
+ RTA_OIF,
+ RTA_GATEWAY,
+ RTA_PRIORITY,
+ RTA_PREFSRC,
+ RTA_METRICS,
+ RTA_MULTIPATH,
+ RTA_PROTOINFO,
+ RTA_FLOW,
+ RTA_CACHEINFO,
+ RTA_SESSION,
+ RTA_MP_ALGO,
+ __RTA_MAX
+};
+
+#define RTA_MAX (__RTA_MAX - 1)
+
+#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
+#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
+
+struct rtnexthop
+{
+ unsigned short rtnh_len;
+ unsigned char rtnh_flags;
+ unsigned char rtnh_hops;
+ int rtnh_ifindex;
+};
+
+#define RTNH_F_DEAD 1
+#define RTNH_F_PERVASIVE 2
+#define RTNH_F_ONLINK 4
+
+#define RTNH_ALIGNTO 4
+#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
+#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && ((int)(rtnh)->rtnh_len) <= (len))
+#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
+#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
+#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
+#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
+
+struct rta_cacheinfo
+{
+ __u32 rta_clntref;
+ __u32 rta_lastuse;
+ __s32 rta_expires;
+ __u32 rta_error;
+ __u32 rta_used;
+
+#define RTNETLINK_HAVE_PEERINFO 1
+ __u32 rta_id;
+ __u32 rta_ts;
+ __u32 rta_tsage;
+};
+
+enum
+{
+ RTAX_UNSPEC,
+#define RTAX_UNSPEC RTAX_UNSPEC
+ RTAX_LOCK,
+#define RTAX_LOCK RTAX_LOCK
+ RTAX_MTU,
+#define RTAX_MTU RTAX_MTU
+ RTAX_WINDOW,
+#define RTAX_WINDOW RTAX_WINDOW
+ RTAX_RTT,
+#define RTAX_RTT RTAX_RTT
+ RTAX_RTTVAR,
+#define RTAX_RTTVAR RTAX_RTTVAR
+ RTAX_SSTHRESH,
+#define RTAX_SSTHRESH RTAX_SSTHRESH
+ RTAX_CWND,
+#define RTAX_CWND RTAX_CWND
+ RTAX_ADVMSS,
+#define RTAX_ADVMSS RTAX_ADVMSS
+ RTAX_REORDERING,
+#define RTAX_REORDERING RTAX_REORDERING
+ RTAX_HOPLIMIT,
+#define RTAX_HOPLIMIT RTAX_HOPLIMIT
+ RTAX_INITCWND,
+#define RTAX_INITCWND RTAX_INITCWND
+ RTAX_FEATURES,
+#define RTAX_FEATURES RTAX_FEATURES
+ __RTAX_MAX
+};
+
+#define RTAX_MAX (__RTAX_MAX - 1)
+
+#define RTAX_FEATURE_ECN 0x00000001
+#define RTAX_FEATURE_SACK 0x00000002
+#define RTAX_FEATURE_TIMESTAMP 0x00000004
+#define RTAX_FEATURE_ALLFRAG 0x00000008
+
+struct rta_session
+{
+ __u8 proto;
+ __u8 pad1;
+ __u16 pad2;
+
+ union {
+ struct {
+ __u16 sport;
+ __u16 dport;
+ } ports;
+
+ struct {
+ __u8 type;
+ __u8 code;
+ __u16 ident;
+ } icmpt;
+
+ __u32 spi;
+ } u;
+};
+
+struct ifaddrmsg
+{
+ unsigned char ifa_family;
+ unsigned char ifa_prefixlen;
+ unsigned char ifa_flags;
+ unsigned char ifa_scope;
+ int ifa_index;
+};
+
+enum
+{
+ IFA_UNSPEC,
+ IFA_ADDRESS,
+ IFA_LOCAL,
+ IFA_LABEL,
+ IFA_BROADCAST,
+ IFA_ANYCAST,
+ IFA_CACHEINFO,
+ IFA_MULTICAST,
+ __IFA_MAX
+};
+
+#define IFA_MAX (__IFA_MAX - 1)
+
+#define IFA_F_SECONDARY 0x01
+#define IFA_F_TEMPORARY IFA_F_SECONDARY
+
+#define IFA_F_DEPRECATED 0x20
+#define IFA_F_TENTATIVE 0x40
+#define IFA_F_PERMANENT 0x80
+
+struct ifa_cacheinfo
+{
+ __u32 ifa_prefered;
+ __u32 ifa_valid;
+ __u32 cstamp;
+ __u32 tstamp;
+};
+
+#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+
+struct ndmsg
+{
+ unsigned char ndm_family;
+ unsigned char ndm_pad1;
+ unsigned short ndm_pad2;
+ int ndm_ifindex;
+ __u16 ndm_state;
+ __u8 ndm_flags;
+ __u8 ndm_type;
+};
+
+enum
+{
+ NDA_UNSPEC,
+ NDA_DST,
+ NDA_LLADDR,
+ NDA_CACHEINFO,
+ NDA_PROBES,
+ __NDA_MAX
+};
+
+#define NDA_MAX (__NDA_MAX - 1)
+
+#define NDA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
+#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
+
+#define NTF_PROXY 0x08
+#define NTF_ROUTER 0x80
+
+#define NUD_INCOMPLETE 0x01
+#define NUD_REACHABLE 0x02
+#define NUD_STALE 0x04
+#define NUD_DELAY 0x08
+#define NUD_PROBE 0x10
+#define NUD_FAILED 0x20
+
+#define NUD_NOARP 0x40
+#define NUD_PERMANENT 0x80
+#define NUD_NONE 0x00
+
+struct nda_cacheinfo
+{
+ __u32 ndm_confirmed;
+ __u32 ndm_used;
+ __u32 ndm_updated;
+ __u32 ndm_refcnt;
+};
+
+struct ndt_stats
+{
+ __u64 ndts_allocs;
+ __u64 ndts_destroys;
+ __u64 ndts_hash_grows;
+ __u64 ndts_res_failed;
+ __u64 ndts_lookups;
+ __u64 ndts_hits;
+ __u64 ndts_rcv_probes_mcast;
+ __u64 ndts_rcv_probes_ucast;
+ __u64 ndts_periodic_gc_runs;
+ __u64 ndts_forced_gc_runs;
+};
+
+enum {
+ NDTPA_UNSPEC,
+ NDTPA_IFINDEX,
+ NDTPA_REFCNT,
+ NDTPA_REACHABLE_TIME,
+ NDTPA_BASE_REACHABLE_TIME,
+ NDTPA_RETRANS_TIME,
+ NDTPA_GC_STALETIME,
+ NDTPA_DELAY_PROBE_TIME,
+ NDTPA_QUEUE_LEN,
+ NDTPA_APP_PROBES,
+ NDTPA_UCAST_PROBES,
+ NDTPA_MCAST_PROBES,
+ NDTPA_ANYCAST_DELAY,
+ NDTPA_PROXY_DELAY,
+ NDTPA_PROXY_QLEN,
+ NDTPA_LOCKTIME,
+ __NDTPA_MAX
+};
+#define NDTPA_MAX (__NDTPA_MAX - 1)
+
+struct ndtmsg
+{
+ __u8 ndtm_family;
+ __u8 ndtm_pad1;
+ __u16 ndtm_pad2;
+};
+
+struct ndt_config
+{
+ __u16 ndtc_key_len;
+ __u16 ndtc_entry_size;
+ __u32 ndtc_entries;
+ __u32 ndtc_last_flush;
+ __u32 ndtc_last_rand;
+ __u32 ndtc_hash_rnd;
+ __u32 ndtc_hash_mask;
+ __u32 ndtc_hash_chain_gc;
+ __u32 ndtc_proxy_qlen;
+};
+
+enum {
+ NDTA_UNSPEC,
+ NDTA_NAME,
+ NDTA_THRESH1,
+ NDTA_THRESH2,
+ NDTA_THRESH3,
+ NDTA_CONFIG,
+ NDTA_PARMS,
+ NDTA_STATS,
+ NDTA_GC_INTERVAL,
+ __NDTA_MAX
+};
+#define NDTA_MAX (__NDTA_MAX - 1)
+
+#define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
+
+struct rtgenmsg
+{
+ unsigned char rtgen_family;
+};
+
+struct ifinfomsg
+{
+ unsigned char ifi_family;
+ unsigned char __ifi_pad;
+ unsigned short ifi_type;
+ int ifi_index;
+ unsigned ifi_flags;
+ unsigned ifi_change;
+};
+
+struct prefixmsg
+{
+ unsigned char prefix_family;
+ unsigned char prefix_pad1;
+ unsigned short prefix_pad2;
+ int prefix_ifindex;
+ unsigned char prefix_type;
+ unsigned char prefix_len;
+ unsigned char prefix_flags;
+ unsigned char prefix_pad3;
+};
+
+enum
+{
+ PREFIX_UNSPEC,
+ PREFIX_ADDRESS,
+ PREFIX_CACHEINFO,
+ __PREFIX_MAX
+};
+
+#define PREFIX_MAX (__PREFIX_MAX - 1)
+
+struct prefix_cacheinfo
+{
+ __u32 preferred_time;
+ __u32 valid_time;
+};
+
+struct rtnl_link_stats
+{
+ __u32 rx_packets;
+ __u32 tx_packets;
+ __u32 rx_bytes;
+ __u32 tx_bytes;
+ __u32 rx_errors;
+ __u32 tx_errors;
+ __u32 rx_dropped;
+ __u32 tx_dropped;
+ __u32 multicast;
+ __u32 collisions;
+
+ __u32 rx_length_errors;
+ __u32 rx_over_errors;
+ __u32 rx_crc_errors;
+ __u32 rx_frame_errors;
+ __u32 rx_fifo_errors;
+ __u32 rx_missed_errors;
+
+ __u32 tx_aborted_errors;
+ __u32 tx_carrier_errors;
+ __u32 tx_fifo_errors;
+ __u32 tx_heartbeat_errors;
+ __u32 tx_window_errors;
+
+ __u32 rx_compressed;
+ __u32 tx_compressed;
+};
+
+struct rtnl_link_ifmap
+{
+ __u64 mem_start;
+ __u64 mem_end;
+ __u64 base_addr;
+ __u16 irq;
+ __u8 dma;
+ __u8 port;
+};
+
+enum
+{
+ IFLA_UNSPEC,
+ IFLA_ADDRESS,
+ IFLA_BROADCAST,
+ IFLA_IFNAME,
+ IFLA_MTU,
+ IFLA_LINK,
+ IFLA_QDISC,
+ IFLA_STATS,
+ IFLA_COST,
+#define IFLA_COST IFLA_COST
+ IFLA_PRIORITY,
+#define IFLA_PRIORITY IFLA_PRIORITY
+ IFLA_MASTER,
+#define IFLA_MASTER IFLA_MASTER
+ IFLA_WIRELESS,
+#define IFLA_WIRELESS IFLA_WIRELESS
+ IFLA_PROTINFO,
+#define IFLA_PROTINFO IFLA_PROTINFO
+ IFLA_TXQLEN,
+#define IFLA_TXQLEN IFLA_TXQLEN
+ IFLA_MAP,
+#define IFLA_MAP IFLA_MAP
+ IFLA_WEIGHT,
+#define IFLA_WEIGHT IFLA_WEIGHT
+ IFLA_OPERSTATE,
+ IFLA_LINKMODE,
+ __IFLA_MAX
+};
+
+#define IFLA_MAX (__IFLA_MAX - 1)
+
+#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+
+enum
+{
+ IFLA_INET6_UNSPEC,
+ IFLA_INET6_FLAGS,
+ IFLA_INET6_CONF,
+ IFLA_INET6_STATS,
+ IFLA_INET6_MCAST,
+ IFLA_INET6_CACHEINFO,
+ __IFLA_INET6_MAX
+};
+
+#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
+
+struct ifla_cacheinfo
+{
+ __u32 max_reasm_len;
+ __u32 tstamp;
+ __u32 reachable_time;
+ __u32 retrans_time;
+};
+
+struct tcmsg
+{
+ unsigned char tcm_family;
+ unsigned char tcm__pad1;
+ unsigned short tcm__pad2;
+ int tcm_ifindex;
+ __u32 tcm_handle;
+ __u32 tcm_parent;
+ __u32 tcm_info;
+};
+
+enum
+{
+ TCA_UNSPEC,
+ TCA_KIND,
+ TCA_OPTIONS,
+ TCA_STATS,
+ TCA_XSTATS,
+ TCA_RATE,
+ TCA_FCNT,
+ TCA_STATS2,
+ __TCA_MAX
+};
+
+#define TCA_MAX (__TCA_MAX - 1)
+
+#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
+#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
+
+#define RTMGRP_LINK 1
+#define RTMGRP_NOTIFY 2
+#define RTMGRP_NEIGH 4
+#define RTMGRP_TC 8
+
+#define RTMGRP_IPV4_IFADDR 0x10
+#define RTMGRP_IPV4_MROUTE 0x20
+#define RTMGRP_IPV4_ROUTE 0x40
+#define RTMGRP_IPV4_RULE 0x80
+
+#define RTMGRP_IPV6_IFADDR 0x100
+#define RTMGRP_IPV6_MROUTE 0x200
+#define RTMGRP_IPV6_ROUTE 0x400
+#define RTMGRP_IPV6_IFINFO 0x800
+
+#define RTMGRP_DECnet_IFADDR 0x1000
+#define RTMGRP_DECnet_ROUTE 0x4000
+
+#define RTMGRP_IPV6_PREFIX 0x20000
+
+enum rtnetlink_groups {
+ RTNLGRP_NONE,
+#define RTNLGRP_NONE RTNLGRP_NONE
+ RTNLGRP_LINK,
+#define RTNLGRP_LINK RTNLGRP_LINK
+ RTNLGRP_NOTIFY,
+#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
+ RTNLGRP_NEIGH,
+#define RTNLGRP_NEIGH RTNLGRP_NEIGH
+ RTNLGRP_TC,
+#define RTNLGRP_TC RTNLGRP_TC
+ RTNLGRP_IPV4_IFADDR,
+#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
+ RTNLGRP_IPV4_MROUTE,
+#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
+ RTNLGRP_IPV4_ROUTE,
+#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
+ RTNLGRP_IPV4_RULE,
+#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE
+ RTNLGRP_IPV6_IFADDR,
+#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
+ RTNLGRP_IPV6_MROUTE,
+#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
+ RTNLGRP_IPV6_ROUTE,
+#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
+ RTNLGRP_IPV6_IFINFO,
+#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
+ RTNLGRP_DECnet_IFADDR,
+#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
+ RTNLGRP_NOP2,
+ RTNLGRP_DECnet_ROUTE,
+#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
+ RTNLGRP_NOP3,
+ RTNLGRP_NOP4,
+ RTNLGRP_IPV6_PREFIX,
+#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
+ __RTNLGRP_MAX
+};
+#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
+
+struct tcamsg
+{
+ unsigned char tca_family;
+ unsigned char tca__pad1;
+ unsigned short tca__pad2;
+};
+#define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
+#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
+#define TCA_ACT_TAB 1
+#define TCAA_MAX 1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/rwsem.h b/6/platforms/android-3/arch-arm/usr/include/linux/rwsem.h
new file mode 100644
index 0000000..e64c4c8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/rwsem.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RWSEM_H
+#define _LINUX_RWSEM_H
+
+#include <linux/linkage.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sched.h b/6/platforms/android-3/arch-arm/usr/include/linux/sched.h
new file mode 100644
index 0000000..6b781eb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sched.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SCHED_H
+#define _LINUX_SCHED_H
+
+#include <linux/auxvec.h>
+
+#define CSIGNAL 0x000000ff
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#define SCHED_NORMAL 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+#define SCHED_BATCH 3
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sem.h b/6/platforms/android-3/arch-arm/usr/include/linux/sem.h
new file mode 100644
index 0000000..dfa531b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sem.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SEM_H
+#define _LINUX_SEM_H
+
+#include <linux/ipc.h>
+
+#define SEM_UNDO 0x1000
+
+#define GETPID 11
+#define GETVAL 12
+#define GETALL 13
+#define GETNCNT 14
+#define GETZCNT 15
+#define SETVAL 16
+#define SETALL 17
+
+#define SEM_STAT 18
+#define SEM_INFO 19
+
+struct semid_ds {
+ struct ipc_perm sem_perm;
+ __kernel_time_t sem_otime;
+ __kernel_time_t sem_ctime;
+ struct sem *sem_base;
+ struct sem_queue *sem_pending;
+ struct sem_queue **sem_pending_last;
+ struct sem_undo *undo;
+ unsigned short sem_nsems;
+};
+
+#include <asm/sembuf.h>
+
+struct sembuf {
+ unsigned short sem_num;
+ short sem_op;
+ short sem_flg;
+};
+
+union semun {
+ int val;
+ struct semid_ds __user *buf;
+ unsigned short __user *array;
+ struct seminfo __user *__buf;
+ void __user *__pad;
+};
+
+struct seminfo {
+ int semmap;
+ int semmni;
+ int semmns;
+ int semmnu;
+ int semmsl;
+ int semopm;
+ int semume;
+ int semusz;
+ int semvmx;
+ int semaem;
+};
+
+#define SEMMNI 128
+#define SEMMSL 250
+#define SEMMNS (SEMMNI*SEMMSL)
+#define SEMOPM 32
+#define SEMVMX 32767
+#define SEMAEM SEMVMX
+
+#define SEMUME SEMOPM
+#define SEMMNU SEMMNS
+#define SEMMAP SEMMNS
+#define SEMUSZ 20
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/seq_file.h b/6/platforms/android-3/arch-arm/usr/include/linux/seq_file.h
new file mode 100644
index 0000000..81e314d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/seq_file.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SEQ_FILE_H
+#define _LINUX_SEQ_FILE_H
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/seqlock.h b/6/platforms/android-3/arch-arm/usr/include/linux/seqlock.h
new file mode 100644
index 0000000..a1e05d4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/seqlock.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SEQLOCK_H
+#define __LINUX_SEQLOCK_H
+
+#include <linux/spinlock.h>
+#include <linux/preempt.h>
+
+typedef struct {
+ unsigned sequence;
+ spinlock_t lock;
+} seqlock_t;
+
+#define __SEQLOCK_UNLOCKED(lockname) { 0, __SPIN_LOCK_UNLOCKED(lockname) }
+
+#define SEQLOCK_UNLOCKED __SEQLOCK_UNLOCKED(old_style_seqlock_init)
+
+#define seqlock_init(x) do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0)
+
+#define DEFINE_SEQLOCK(x) seqlock_t x = __SEQLOCK_UNLOCKED(x)
+
+#define SEQCNT_ZERO { 0 }
+#define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0)
+
+#define write_seqlock_irqsave(lock, flags) do { local_irq_save(flags); write_seqlock(lock); } while (0)
+#define write_seqlock_irq(lock) do { local_irq_disable(); write_seqlock(lock); } while (0)
+#define write_seqlock_bh(lock) do { local_bh_disable(); write_seqlock(lock); } while (0)
+#define write_sequnlock_irqrestore(lock, flags) do { write_sequnlock(lock); local_irq_restore(flags); } while(0)
+#define write_sequnlock_irq(lock) do { write_sequnlock(lock); local_irq_enable(); } while(0)
+#define write_sequnlock_bh(lock) do { write_sequnlock(lock); local_bh_enable(); } while(0)
+#define read_seqbegin_irqsave(lock, flags) ({ local_irq_save(flags); read_seqbegin(lock); })
+#define read_seqretry_irqrestore(lock, iv, flags) ({ int ret = read_seqretry(lock, iv); local_irq_restore(flags); ret; })
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/serial_core.h b/6/platforms/android-3/arch-arm/usr/include/linux/serial_core.h
new file mode 100644
index 0000000..79f0375
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/serial_core.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_SERIAL_CORE_H
+#define LINUX_SERIAL_CORE_H
+
+#define PORT_UNKNOWN 0
+#define PORT_8250 1
+#define PORT_16450 2
+#define PORT_16550 3
+#define PORT_16550A 4
+#define PORT_CIRRUS 5
+#define PORT_16650 6
+#define PORT_16650V2 7
+#define PORT_16750 8
+#define PORT_STARTECH 9
+#define PORT_16C950 10
+#define PORT_16654 11
+#define PORT_16850 12
+#define PORT_RSA 13
+#define PORT_NS16550A 14
+#define PORT_XSCALE 15
+#define PORT_MAX_8250 15
+
+#define PORT_PXA 31
+#define PORT_AMBA 32
+#define PORT_CLPS711X 33
+#define PORT_SA1100 34
+#define PORT_UART00 35
+#define PORT_21285 37
+
+#define PORT_SUNZILOG 38
+#define PORT_SUNSAB 39
+
+#define PORT_V850E_UART 40
+
+#define PORT_DZ 47
+
+#define PORT_MUX 48
+
+#define PORT_AT91 49
+
+#define PORT_MAC_ZILOG 50
+#define PORT_PMAC_ZILOG 51
+
+#define PORT_SCI 52
+#define PORT_SCIF 53
+#define PORT_IRDA 54
+
+#define PORT_S3C2410 55
+
+#define PORT_IP22ZILOG 56
+
+#define PORT_LH7A40X 57
+
+#define PORT_CPM 58
+
+#define PORT_MPC52xx 59
+
+#define PORT_ICOM 60
+
+#define PORT_S3C2440 61
+
+#define PORT_IMX 62
+
+#define PORT_MPSC 63
+
+#define PORT_TXX9 64
+
+#define PORT_VR41XX_SIU 65
+#define PORT_VR41XX_DSIU 66
+
+#define PORT_S3C2400 67
+
+#define PORT_M32R_SIO 68
+
+#define PORT_JSM 69
+
+#define PORT_IP3106 70
+
+#define PORT_NETX 71
+
+#define PORT_SUNHV 72
+
+#define PORT_S3C2412 73
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/serial_reg.h b/6/platforms/android-3/arch-arm/usr/include/linux/serial_reg.h
new file mode 100644
index 0000000..97b149a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/serial_reg.h
@@ -0,0 +1,249 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SERIAL_REG_H
+#define _LINUX_SERIAL_REG_H
+
+#define UART_RX 0
+#define UART_TX 0
+
+#define UART_IER 1
+#define UART_IER_MSI 0x08
+#define UART_IER_RLSI 0x04
+#define UART_IER_THRI 0x02
+#define UART_IER_RDI 0x01
+
+#define UART_IERX_SLEEP 0x10
+
+#define UART_IIR 2
+#define UART_IIR_NO_INT 0x01
+#define UART_IIR_ID 0x06
+#define UART_IIR_MSI 0x00
+#define UART_IIR_THRI 0x02
+#define UART_IIR_RDI 0x04
+#define UART_IIR_RLSI 0x06
+
+#define UART_FCR 2
+#define UART_FCR_ENABLE_FIFO 0x01
+#define UART_FCR_CLEAR_RCVR 0x02
+#define UART_FCR_CLEAR_XMIT 0x04
+#define UART_FCR_DMA_SELECT 0x08
+
+#define UART_FCR_R_TRIG_00 0x00
+#define UART_FCR_R_TRIG_01 0x40
+#define UART_FCR_R_TRIG_10 0x80
+#define UART_FCR_R_TRIG_11 0xc0
+#define UART_FCR_T_TRIG_00 0x00
+#define UART_FCR_T_TRIG_01 0x10
+#define UART_FCR_T_TRIG_10 0x20
+#define UART_FCR_T_TRIG_11 0x30
+
+#define UART_FCR_TRIGGER_MASK 0xC0
+#define UART_FCR_TRIGGER_1 0x00
+#define UART_FCR_TRIGGER_4 0x40
+#define UART_FCR_TRIGGER_8 0x80
+#define UART_FCR_TRIGGER_14 0xC0
+
+#define UART_FCR6_R_TRIGGER_8 0x00
+#define UART_FCR6_R_TRIGGER_16 0x40
+#define UART_FCR6_R_TRIGGER_24 0x80
+#define UART_FCR6_R_TRIGGER_28 0xC0
+#define UART_FCR6_T_TRIGGER_16 0x00
+#define UART_FCR6_T_TRIGGER_8 0x10
+#define UART_FCR6_T_TRIGGER_24 0x20
+#define UART_FCR6_T_TRIGGER_30 0x30
+#define UART_FCR7_64BYTE 0x20
+
+#define UART_LCR 3
+
+#define UART_LCR_DLAB 0x80
+#define UART_LCR_SBC 0x40
+#define UART_LCR_SPAR 0x20
+#define UART_LCR_EPAR 0x10
+#define UART_LCR_PARITY 0x08
+#define UART_LCR_STOP 0x04
+#define UART_LCR_WLEN5 0x00
+#define UART_LCR_WLEN6 0x01
+#define UART_LCR_WLEN7 0x02
+#define UART_LCR_WLEN8 0x03
+
+#define UART_MCR 4
+#define UART_MCR_CLKSEL 0x80
+#define UART_MCR_TCRTLR 0x40
+#define UART_MCR_XONANY 0x20
+#define UART_MCR_AFE 0x20
+#define UART_MCR_LOOP 0x10
+#define UART_MCR_OUT2 0x08
+#define UART_MCR_OUT1 0x04
+#define UART_MCR_RTS 0x02
+#define UART_MCR_DTR 0x01
+
+#define UART_LSR 5
+#define UART_LSR_TEMT 0x40
+#define UART_LSR_THRE 0x20
+#define UART_LSR_BI 0x10
+#define UART_LSR_FE 0x08
+#define UART_LSR_PE 0x04
+#define UART_LSR_OE 0x02
+#define UART_LSR_DR 0x01
+
+#define UART_MSR 6
+#define UART_MSR_DCD 0x80
+#define UART_MSR_RI 0x40
+#define UART_MSR_DSR 0x20
+#define UART_MSR_CTS 0x10
+#define UART_MSR_DDCD 0x08
+#define UART_MSR_TERI 0x04
+#define UART_MSR_DDSR 0x02
+#define UART_MSR_DCTS 0x01
+#define UART_MSR_ANY_DELTA 0x0F
+
+#define UART_SCR 7
+
+#define UART_DLL 0
+#define UART_DLM 1
+
+#define UART_EFR 2
+#define UART_EFR_CTS 0x80
+#define UART_EFR_RTS 0x40
+#define UART_EFR_SCD 0x20
+#define UART_EFR_ECB 0x10
+
+#define UART_XON1 4
+#define UART_XON2 5
+#define UART_XOFF1 6
+#define UART_XOFF2 7
+
+#define UART_TI752_TCR 6
+#define UART_TI752_TLR 7
+
+#define UART_TRG 0
+
+#define UART_TRG_1 0x01
+#define UART_TRG_4 0x04
+#define UART_TRG_8 0x08
+#define UART_TRG_16 0x10
+#define UART_TRG_32 0x20
+#define UART_TRG_64 0x40
+#define UART_TRG_96 0x60
+#define UART_TRG_120 0x78
+#define UART_TRG_128 0x80
+
+#define UART_FCTR 1
+#define UART_FCTR_RTS_NODELAY 0x00
+#define UART_FCTR_RTS_4DELAY 0x01
+#define UART_FCTR_RTS_6DELAY 0x02
+#define UART_FCTR_RTS_8DELAY 0x03
+#define UART_FCTR_IRDA 0x04
+#define UART_FCTR_TX_INT 0x08
+#define UART_FCTR_TRGA 0x00
+#define UART_FCTR_TRGB 0x10
+#define UART_FCTR_TRGC 0x20
+#define UART_FCTR_TRGD 0x30
+#define UART_FCTR_SCR_SWAP 0x40
+#define UART_FCTR_RX 0x00
+#define UART_FCTR_TX 0x80
+
+#define UART_EMSR 7
+#define UART_EMSR_FIFO_COUNT 0x01
+#define UART_EMSR_ALT_COUNT 0x02
+
+#define UART_IER_DMAE 0x80
+#define UART_IER_UUE 0x40
+#define UART_IER_NRZE 0x20
+#define UART_IER_RTOIE 0x10
+
+#define UART_IIR_TOD 0x08
+
+#define UART_FCR_PXAR1 0x00
+#define UART_FCR_PXAR8 0x40
+#define UART_FCR_PXAR16 0x80
+#define UART_FCR_PXAR32 0xc0
+
+#define UART_ASR 0x01
+#define UART_RFL 0x03
+#define UART_TFL 0x04
+#define UART_ICR 0x05
+
+#define UART_ACR 0x00
+#define UART_CPR 0x01
+#define UART_TCR 0x02
+#define UART_CKS 0x03
+#define UART_TTL 0x04
+#define UART_RTL 0x05
+#define UART_FCL 0x06
+#define UART_FCH 0x07
+#define UART_ID1 0x08
+#define UART_ID2 0x09
+#define UART_ID3 0x0A
+#define UART_REV 0x0B
+#define UART_CSR 0x0C
+#define UART_NMR 0x0D
+#define UART_CTR 0xFF
+
+#define UART_ACR_RXDIS 0x01
+#define UART_ACR_TXDIS 0x02
+#define UART_ACR_DSRFC 0x04
+#define UART_ACR_TLENB 0x20
+#define UART_ACR_ICRRD 0x40
+#define UART_ACR_ASREN 0x80
+
+#define UART_RSA_BASE (-8)
+
+#define UART_RSA_MSR ((UART_RSA_BASE) + 0)
+
+#define UART_RSA_MSR_SWAP (1 << 0)
+#define UART_RSA_MSR_FIFO (1 << 2)
+#define UART_RSA_MSR_FLOW (1 << 3)
+#define UART_RSA_MSR_ITYP (1 << 4)
+
+#define UART_RSA_IER ((UART_RSA_BASE) + 1)
+
+#define UART_RSA_IER_Rx_FIFO_H (1 << 0)
+#define UART_RSA_IER_Tx_FIFO_H (1 << 1)
+#define UART_RSA_IER_Tx_FIFO_E (1 << 2)
+#define UART_RSA_IER_Rx_TOUT (1 << 3)
+#define UART_RSA_IER_TIMER (1 << 4)
+
+#define UART_RSA_SRR ((UART_RSA_BASE) + 2)
+
+#define UART_RSA_SRR_Tx_FIFO_NEMP (1 << 0)
+#define UART_RSA_SRR_Tx_FIFO_NHFL (1 << 1)
+#define UART_RSA_SRR_Tx_FIFO_NFUL (1 << 2)
+#define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3)
+#define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4)
+#define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5)
+#define UART_RSA_SRR_Rx_TOUT (1 << 6)
+#define UART_RSA_SRR_TIMER (1 << 7)
+
+#define UART_RSA_FRR ((UART_RSA_BASE) + 2)
+
+#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3)
+
+#define UART_RSA_TCR ((UART_RSA_BASE) + 4)
+
+#define UART_RSA_TCR_SWITCH (1 << 0)
+
+#define SERIAL_RSA_BAUD_BASE (921600)
+#define SERIAL_RSA_BAUD_BASE_LO (SERIAL_RSA_BAUD_BASE / 8)
+
+#define UART_OMAP_MDR1 0x08
+#define UART_OMAP_MDR2 0x09
+#define UART_OMAP_SCR 0x10
+#define UART_OMAP_SSR 0x11
+#define UART_OMAP_EBLR 0x12
+#define UART_OMAP_OSC_12M_SEL 0x13
+#define UART_OMAP_MVER 0x14
+#define UART_OMAP_SYSC 0x15
+#define UART_OMAP_SYSS 0x16
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/serio.h b/6/platforms/android-3/arch-arm/usr/include/linux/serio.h
new file mode 100644
index 0000000..7f04987
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/serio.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SERIO_H
+#define _SERIO_H
+
+#include <linux/ioctl.h>
+
+#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
+
+#define SERIO_TIMEOUT 1
+#define SERIO_PARITY 2
+#define SERIO_FRAME 4
+
+#define SERIO_XT 0x00
+#define SERIO_8042 0x01
+#define SERIO_RS232 0x02
+#define SERIO_HIL_MLC 0x03
+#define SERIO_PS_PSTHRU 0x05
+#define SERIO_8042_XL 0x06
+
+#define SERIO_UNKNOWN 0x00
+#define SERIO_MSC 0x01
+#define SERIO_SUN 0x02
+#define SERIO_MS 0x03
+#define SERIO_MP 0x04
+#define SERIO_MZ 0x05
+#define SERIO_MZP 0x06
+#define SERIO_MZPP 0x07
+#define SERIO_VSXXXAA 0x08
+#define SERIO_SUNKBD 0x10
+#define SERIO_WARRIOR 0x18
+#define SERIO_SPACEORB 0x19
+#define SERIO_MAGELLAN 0x1a
+#define SERIO_SPACEBALL 0x1b
+#define SERIO_GUNZE 0x1c
+#define SERIO_IFORCE 0x1d
+#define SERIO_STINGER 0x1e
+#define SERIO_NEWTON 0x1f
+#define SERIO_STOWAWAY 0x20
+#define SERIO_H3600 0x21
+#define SERIO_PS2SER 0x22
+#define SERIO_TWIDKBD 0x23
+#define SERIO_TWIDJOY 0x24
+#define SERIO_HIL 0x25
+#define SERIO_SNES232 0x26
+#define SERIO_SEMTECH 0x27
+#define SERIO_LKKBD 0x28
+#define SERIO_ELO 0x29
+#define SERIO_MICROTOUCH 0x30
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/shm.h b/6/platforms/android-3/arch-arm/usr/include/linux/shm.h
new file mode 100644
index 0000000..a7056db
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/shm.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SHM_H_
+#define _LINUX_SHM_H_
+
+#include <linux/ipc.h>
+#include <linux/errno.h>
+#include <asm/page.h>
+
+#define SHMMAX 0x2000000
+#define SHMMIN 1
+#define SHMMNI 4096
+#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16))
+#define SHMSEG SHMMNI
+
+#include <asm/shmparam.h>
+
+struct shmid_ds {
+ struct ipc_perm shm_perm;
+ int shm_segsz;
+ __kernel_time_t shm_atime;
+ __kernel_time_t shm_dtime;
+ __kernel_time_t shm_ctime;
+ __kernel_ipc_pid_t shm_cpid;
+ __kernel_ipc_pid_t shm_lpid;
+ unsigned short shm_nattch;
+ unsigned short shm_unused;
+ void *shm_unused2;
+ void *shm_unused3;
+};
+
+#include <asm/shmbuf.h>
+
+#define SHM_R 0400
+#define SHM_W 0200
+
+#define SHM_RDONLY 010000
+#define SHM_RND 020000
+#define SHM_REMAP 040000
+#define SHM_EXEC 0100000
+
+#define SHM_LOCK 11
+#define SHM_UNLOCK 12
+
+#define SHM_STAT 13
+#define SHM_INFO 14
+
+struct shminfo {
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+};
+
+struct shm_info {
+ int used_ids;
+ unsigned long shm_tot;
+ unsigned long shm_rss;
+ unsigned long shm_swp;
+ unsigned long swap_attempts;
+ unsigned long swap_successes;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/signal.h b/6/platforms/android-3/arch-arm/usr/include/linux/signal.h
new file mode 100644
index 0000000..4577e54
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/signal.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SIGNAL_H
+#define _LINUX_SIGNAL_H
+
+#include <asm/signal.h>
+#include <asm/siginfo.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/skbuff.h b/6/platforms/android-3/arch-arm/usr/include/linux/skbuff.h
new file mode 100644
index 0000000..82140a6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/skbuff.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SKBUFF_H
+#define _LINUX_SKBUFF_H
+
+#include <linux/kernel.h>
+#include <linux/compiler.h>
+#include <linux/time.h>
+#include <linux/cache.h>
+
+#include <asm/atomic.h>
+#include <asm/types.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <linux/poll.h>
+#include <linux/net.h>
+#include <linux/textsearch.h>
+#include <net/checksum.h>
+#include <linux/dmaengine.h>
+
+#define HAVE_ALLOC_SKB
+#define HAVE_ALIGNABLE_SKB
+
+#define CHECKSUM_NONE 0
+#define CHECKSUM_HW 1
+#define CHECKSUM_UNNECESSARY 2
+
+#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & ~(SMP_CACHE_BYTES - 1))
+#define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - sizeof(struct skb_shared_info)) & ~(SMP_CACHE_BYTES - 1))
+#define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0))
+#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2))
+
+struct net_device;
+
+struct sk_buff_head {
+
+ struct sk_buff *next;
+ struct sk_buff *prev;
+
+ __u32 qlen;
+ spinlock_t lock;
+};
+
+struct sk_buff;
+
+#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
+
+typedef struct skb_frag_struct skb_frag_t;
+
+struct skb_frag_struct {
+ struct page *page;
+ __u16 page_offset;
+ __u16 size;
+};
+
+struct skb_shared_info {
+ atomic_t dataref;
+ unsigned short nr_frags;
+ unsigned short gso_size;
+
+ unsigned short gso_segs;
+ unsigned short gso_type;
+ unsigned int ip6_frag_id;
+ struct sk_buff *frag_list;
+ skb_frag_t frags[MAX_SKB_FRAGS];
+};
+
+#define SKB_DATAREF_SHIFT 16
+#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1)
+
+struct skb_timeval {
+ u32 off_sec;
+ u32 off_usec;
+};
+
+enum {
+ SKB_FCLONE_UNAVAILABLE,
+ SKB_FCLONE_ORIG,
+ SKB_FCLONE_CLONE,
+};
+
+enum {
+ SKB_GSO_TCPV4 = 1 << 0,
+ SKB_GSO_UDP = 1 << 1,
+
+ SKB_GSO_DODGY = 1 << 2,
+
+ SKB_GSO_TCP_ECN = 1 << 3,
+
+ SKB_GSO_TCPV6 = 1 << 4,
+};
+
+struct sk_buff {
+
+ struct sk_buff *next;
+ struct sk_buff *prev;
+
+ struct sock *sk;
+ struct skb_timeval tstamp;
+ struct net_device *dev;
+ struct net_device *input_dev;
+
+ union {
+ struct tcphdr *th;
+ struct udphdr *uh;
+ struct icmphdr *icmph;
+ struct igmphdr *igmph;
+ struct iphdr *ipiph;
+ struct ipv6hdr *ipv6h;
+ unsigned char *raw;
+ } h;
+
+ union {
+ struct iphdr *iph;
+ struct ipv6hdr *ipv6h;
+ struct arphdr *arph;
+ unsigned char *raw;
+ } nh;
+
+ union {
+ unsigned char *raw;
+ } mac;
+
+ struct dst_entry *dst;
+ struct sec_path *sp;
+
+ char cb[48];
+
+ unsigned int len,
+ data_len,
+ mac_len,
+ csum;
+ __u32 priority;
+ __u8 local_df:1,
+ cloned:1,
+ ip_summed:2,
+ nohdr:1,
+ nfctinfo:3;
+ __u8 pkt_type:3,
+ fclone:2,
+ ipvs_property:1;
+ __be16 protocol;
+
+ void (*destructor)(struct sk_buff *skb);
+
+ unsigned int truesize;
+ atomic_t users;
+ unsigned char *head,
+ *data,
+ *tail,
+ *end;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/slab.h b/6/platforms/android-3/arch-arm/usr/include/linux/slab.h
new file mode 100644
index 0000000..f165a93
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/slab.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SLAB_H
+#define _LINUX_SLAB_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/smb.h b/6/platforms/android-3/arch-arm/usr/include/linux/smb.h
new file mode 100644
index 0000000..72c8967
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/smb.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SMB_H
+#define _LINUX_SMB_H
+
+#include <linux/types.h>
+
+enum smb_protocol {
+ SMB_PROTOCOL_NONE,
+ SMB_PROTOCOL_CORE,
+ SMB_PROTOCOL_COREPLUS,
+ SMB_PROTOCOL_LANMAN1,
+ SMB_PROTOCOL_LANMAN2,
+ SMB_PROTOCOL_NT1
+};
+
+enum smb_case_hndl {
+ SMB_CASE_DEFAULT,
+ SMB_CASE_LOWER,
+ SMB_CASE_UPPER
+};
+
+struct smb_dskattr {
+ __u16 total;
+ __u16 allocblocks;
+ __u16 blocksize;
+ __u16 free;
+};
+
+struct smb_conn_opt {
+
+ unsigned int fd;
+
+ enum smb_protocol protocol;
+ enum smb_case_hndl case_handling;
+
+ __u32 max_xmit;
+ __u16 server_uid;
+ __u16 tid;
+
+ __u16 secmode;
+ __u16 maxmux;
+ __u16 maxvcs;
+ __u16 rawmode;
+ __u32 sesskey;
+
+ __u32 maxraw;
+ __u32 capabilities;
+ __s16 serverzone;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/smp.h b/6/platforms/android-3/arch-arm/usr/include/linux/smp.h
new file mode 100644
index 0000000..ab4982d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/smp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SMP_H
+#define __LINUX_SMP_H
+
+#define raw_smp_processor_id() 0
+#define hard_smp_processor_id() 0
+#define smp_call_function(func,info,retry,wait) (up_smp_call_function())
+#define on_each_cpu(func,info,retry,wait) ({ local_irq_disable(); func(info); local_irq_enable(); 0; })
+#define num_booting_cpus() 1
+#define smp_prepare_boot_cpu() do {} while (0)
+#define smp_processor_id() raw_smp_processor_id()
+#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
+#define put_cpu() preempt_enable()
+#define put_cpu_no_resched() preempt_enable_no_resched()
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/smp_lock.h b/6/platforms/android-3/arch-arm/usr/include/linux/smp_lock.h
new file mode 100644
index 0000000..523a970
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/smp_lock.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SMPLOCK_H
+#define __LINUX_SMPLOCK_H
+
+#define lock_kernel() do { } while(0)
+#define unlock_kernel() do { } while(0)
+#define release_kernel_lock(task) do { } while(0)
+#define reacquire_kernel_lock(task) 0
+#define kernel_locked() 1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/socket.h b/6/platforms/android-3/arch-arm/usr/include/linux/socket.h
new file mode 100644
index 0000000..b578df9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/socket.h
@@ -0,0 +1,227 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SOCKET_H
+#define _LINUX_SOCKET_H
+
+#define _K_SS_MAXSIZE 128
+#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
+
+struct __kernel_sockaddr_storage {
+ unsigned short ss_family;
+
+ char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
+
+} __attribute__ ((aligned(_K_SS_ALIGNSIZE)));
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#include <asm/socket.h>
+#include <linux/sockios.h>
+#include <linux/uio.h>
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+typedef unsigned short sa_family_t;
+
+struct sockaddr {
+ sa_family_t sa_family;
+ char sa_data[14];
+};
+
+struct linger {
+ int l_onoff;
+ int l_linger;
+};
+
+#define sockaddr_storage __kernel_sockaddr_storage
+
+struct msghdr {
+ void * msg_name;
+ int msg_namelen;
+ struct iovec * msg_iov;
+ __kernel_size_t msg_iovlen;
+ void * msg_control;
+ __kernel_size_t msg_controllen;
+ unsigned msg_flags;
+};
+
+struct cmsghdr {
+ __kernel_size_t cmsg_len;
+ int cmsg_level;
+ int cmsg_type;
+};
+
+#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg))
+#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
+
+#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
+
+#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
+#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
+#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+
+#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? (struct cmsghdr *)(ctl) : (struct cmsghdr *)NULL)
+#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
+#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
+
+#ifdef __GNUC__
+#define __KINLINE static __inline__
+#elif defined(__cplusplus)
+#define __KINLINE static inline
+#else
+#define __KINLINE static
+#endif
+
+__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr *__cmsg)
+{
+ struct cmsghdr * __ptr;
+
+ __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
+ if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
+ return (struct cmsghdr *)0;
+
+ return __ptr;
+}
+
+__KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
+{
+ return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
+}
+
+#define SCM_RIGHTS 0x01
+#define SCM_CREDENTIALS 0x02
+#define SCM_SECURITY 0x03
+
+struct ucred {
+ __u32 pid;
+ __u32 uid;
+ __u32 gid;
+};
+
+#define AF_UNSPEC 0
+#define AF_UNIX 1
+#define AF_LOCAL 1
+#define AF_INET 2
+#define AF_AX25 3
+#define AF_IPX 4
+#define AF_APPLETALK 5
+#define AF_NETROM 6
+#define AF_BRIDGE 7
+#define AF_ATMPVC 8
+#define AF_X25 9
+#define AF_INET6 10
+#define AF_ROSE 11
+#define AF_DECnet 12
+#define AF_NETBEUI 13
+#define AF_SECURITY 14
+#define AF_KEY 15
+#define AF_NETLINK 16
+#define AF_ROUTE AF_NETLINK
+#define AF_PACKET 17
+#define AF_ASH 18
+#define AF_ECONET 19
+#define AF_ATMSVC 20
+#define AF_SNA 22
+#define AF_IRDA 23
+#define AF_PPPOX 24
+#define AF_WANPIPE 25
+#define AF_LLC 26
+#define AF_TIPC 30
+#define AF_BLUETOOTH 31
+#define AF_MAX 32
+
+#define PF_UNSPEC AF_UNSPEC
+#define PF_UNIX AF_UNIX
+#define PF_LOCAL AF_LOCAL
+#define PF_INET AF_INET
+#define PF_AX25 AF_AX25
+#define PF_IPX AF_IPX
+#define PF_APPLETALK AF_APPLETALK
+#define PF_NETROM AF_NETROM
+#define PF_BRIDGE AF_BRIDGE
+#define PF_ATMPVC AF_ATMPVC
+#define PF_X25 AF_X25
+#define PF_INET6 AF_INET6
+#define PF_ROSE AF_ROSE
+#define PF_DECnet AF_DECnet
+#define PF_NETBEUI AF_NETBEUI
+#define PF_SECURITY AF_SECURITY
+#define PF_KEY AF_KEY
+#define PF_NETLINK AF_NETLINK
+#define PF_ROUTE AF_ROUTE
+#define PF_PACKET AF_PACKET
+#define PF_ASH AF_ASH
+#define PF_ECONET AF_ECONET
+#define PF_ATMSVC AF_ATMSVC
+#define PF_SNA AF_SNA
+#define PF_IRDA AF_IRDA
+#define PF_PPPOX AF_PPPOX
+#define PF_WANPIPE AF_WANPIPE
+#define PF_LLC AF_LLC
+#define PF_TIPC AF_TIPC
+#define PF_BLUETOOTH AF_BLUETOOTH
+#define PF_MAX AF_MAX
+
+#define SOMAXCONN 128
+
+#define MSG_OOB 1
+#define MSG_PEEK 2
+#define MSG_DONTROUTE 4
+#define MSG_TRYHARD 4
+#define MSG_CTRUNC 8
+#define MSG_PROBE 0x10
+#define MSG_TRUNC 0x20
+#define MSG_DONTWAIT 0x40
+#define MSG_EOR 0x80
+#define MSG_WAITALL 0x100
+#define MSG_FIN 0x200
+#define MSG_SYN 0x400
+#define MSG_CONFIRM 0x800
+#define MSG_RST 0x1000
+#define MSG_ERRQUEUE 0x2000
+#define MSG_NOSIGNAL 0x4000
+#define MSG_MORE 0x8000
+
+#define MSG_EOF MSG_FIN
+
+#define MSG_CMSG_COMPAT 0
+
+#define SOL_IP 0
+
+#define SOL_TCP 6
+#define SOL_UDP 17
+#define SOL_IPV6 41
+#define SOL_ICMPV6 58
+#define SOL_SCTP 132
+#define SOL_RAW 255
+#define SOL_IPX 256
+#define SOL_AX25 257
+#define SOL_ATALK 258
+#define SOL_NETROM 259
+#define SOL_ROSE 260
+#define SOL_DECNET 261
+#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264
+#define SOL_AAL 265
+#define SOL_IRDA 266
+#define SOL_NETBEUI 267
+#define SOL_LLC 268
+#define SOL_DCCP 269
+#define SOL_NETLINK 270
+#define SOL_TIPC 271
+
+#define IPX_TYPE 1
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sockios.h b/6/platforms/android-3/arch-arm/usr/include/linux/sockios.h
new file mode 100644
index 0000000..d111359
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sockios.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SOCKIOS_H
+#define _LINUX_SOCKIOS_H
+
+#include <asm/sockios.h>
+
+#define SIOCINQ FIONREAD
+#define SIOCOUTQ TIOCOUTQ
+
+#define SIOCADDRT 0x890B
+#define SIOCDELRT 0x890C
+#define SIOCRTMSG 0x890D
+
+#define SIOCGIFNAME 0x8910
+#define SIOCSIFLINK 0x8911
+#define SIOCGIFCONF 0x8912
+#define SIOCGIFFLAGS 0x8913
+#define SIOCSIFFLAGS 0x8914
+#define SIOCGIFADDR 0x8915
+#define SIOCSIFADDR 0x8916
+#define SIOCGIFDSTADDR 0x8917
+#define SIOCSIFDSTADDR 0x8918
+#define SIOCGIFBRDADDR 0x8919
+#define SIOCSIFBRDADDR 0x891a
+#define SIOCGIFNETMASK 0x891b
+#define SIOCSIFNETMASK 0x891c
+#define SIOCGIFMETRIC 0x891d
+#define SIOCSIFMETRIC 0x891e
+#define SIOCGIFMEM 0x891f
+#define SIOCSIFMEM 0x8920
+#define SIOCGIFMTU 0x8921
+#define SIOCSIFMTU 0x8922
+#define SIOCSIFNAME 0x8923
+#define SIOCSIFHWADDR 0x8924
+#define SIOCGIFENCAP 0x8925
+#define SIOCSIFENCAP 0x8926
+#define SIOCGIFHWADDR 0x8927
+#define SIOCGIFSLAVE 0x8929
+#define SIOCSIFSLAVE 0x8930
+#define SIOCADDMULTI 0x8931
+#define SIOCDELMULTI 0x8932
+#define SIOCGIFINDEX 0x8933
+#define SIOGIFINDEX SIOCGIFINDEX
+#define SIOCSIFPFLAGS 0x8934
+#define SIOCGIFPFLAGS 0x8935
+#define SIOCDIFADDR 0x8936
+#define SIOCSIFHWBROADCAST 0x8937
+#define SIOCGIFCOUNT 0x8938
+#define SIOCKILLADDR 0x8939
+
+#define SIOCGIFBR 0x8940
+#define SIOCSIFBR 0x8941
+
+#define SIOCGIFTXQLEN 0x8942
+#define SIOCSIFTXQLEN 0x8943
+
+#define SIOCETHTOOL 0x8946
+
+#define SIOCGMIIPHY 0x8947
+#define SIOCGMIIREG 0x8948
+#define SIOCSMIIREG 0x8949
+
+#define SIOCWANDEV 0x894A
+
+#define SIOCDARP 0x8953
+#define SIOCGARP 0x8954
+#define SIOCSARP 0x8955
+
+#define SIOCDRARP 0x8960
+#define SIOCGRARP 0x8961
+#define SIOCSRARP 0x8962
+
+#define SIOCGIFMAP 0x8970
+#define SIOCSIFMAP 0x8971
+
+#define SIOCADDDLCI 0x8980
+#define SIOCDELDLCI 0x8981
+
+#define SIOCGIFVLAN 0x8982
+#define SIOCSIFVLAN 0x8983
+
+#define SIOCBONDENSLAVE 0x8990
+#define SIOCBONDRELEASE 0x8991
+#define SIOCBONDSETHWADDR 0x8992
+#define SIOCBONDSLAVEINFOQUERY 0x8993
+#define SIOCBONDINFOQUERY 0x8994
+#define SIOCBONDCHANGEACTIVE 0x8995
+
+#define SIOCBRADDBR 0x89a0
+#define SIOCBRDELBR 0x89a1
+#define SIOCBRADDIF 0x89a2
+#define SIOCBRDELIF 0x89a3
+
+#define SIOCDEVPRIVATE 0x89F0
+
+#define SIOCPROTOPRIVATE 0x89E0
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/soundcard.h b/6/platforms/android-3/arch-arm/usr/include/linux/soundcard.h
new file mode 100644
index 0000000..8c69c28
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/soundcard.h
@@ -0,0 +1,831 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef SOUNDCARD_H
+#define SOUNDCARD_H
+
+#define SOUND_VERSION 0x030802
+#define OPEN_SOUND_SYSTEM
+
+#include <linux/ioctl.h>
+
+#include <endian.h>
+
+#define SNDCARD_ADLIB 1
+#define SNDCARD_SB 2
+#define SNDCARD_PAS 3
+#define SNDCARD_GUS 4
+#define SNDCARD_MPU401 5
+#define SNDCARD_SB16 6
+#define SNDCARD_SB16MIDI 7
+#define SNDCARD_UART6850 8
+#define SNDCARD_GUS16 9
+#define SNDCARD_MSS 10
+#define SNDCARD_PSS 11
+#define SNDCARD_SSCAPE 12
+#define SNDCARD_PSS_MPU 13
+#define SNDCARD_PSS_MSS 14
+#define SNDCARD_SSCAPE_MSS 15
+#define SNDCARD_TRXPRO 16
+#define SNDCARD_TRXPRO_SB 17
+#define SNDCARD_TRXPRO_MPU 18
+#define SNDCARD_MAD16 19
+#define SNDCARD_MAD16_MPU 20
+#define SNDCARD_CS4232 21
+#define SNDCARD_CS4232_MPU 22
+#define SNDCARD_MAUI 23
+#define SNDCARD_PSEUDO_MSS 24
+#define SNDCARD_GUSPNP 25
+#define SNDCARD_UART401 26
+
+#ifndef _SIOWR
+#if defined(_IOWR) && (defined(_AIX) || !defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__))
+
+#define SIOCPARM_MASK IOCPARM_MASK
+#define SIOC_VOID IOC_VOID
+#define SIOC_OUT IOC_OUT
+#define SIOC_IN IOC_IN
+#define SIOC_INOUT IOC_INOUT
+#define _SIOC_SIZE _IOC_SIZE
+#define _SIOC_DIR _IOC_DIR
+#define _SIOC_NONE _IOC_NONE
+#define _SIOC_READ _IOC_READ
+#define _SIOC_WRITE _IOC_WRITE
+#define _SIO _IO
+#define _SIOR _IOR
+#define _SIOW _IOW
+#define _SIOWR _IOWR
+#else
+
+#define SIOCPARM_MASK 0x1fff
+#define SIOC_VOID 0x00000000
+#define SIOC_OUT 0x20000000
+#define SIOC_IN 0x40000000
+#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
+
+#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y))
+#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+
+#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
+#define _SIOC_DIR(x) (x & 0xf0000000)
+#define _SIOC_NONE SIOC_VOID
+#define _SIOC_READ SIOC_OUT
+#define _SIOC_WRITE SIOC_IN
+#endif
+#endif
+
+#define SNDCTL_SEQ_RESET _SIO ('Q', 0)
+#define SNDCTL_SEQ_SYNC _SIO ('Q', 1)
+#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
+#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int)
+#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
+#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
+#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
+#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument)
+#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
+#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
+#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
+#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int)
+#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info)
+#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int)
+#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int)
+#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int)
+#define SNDCTL_SEQ_PANIC _SIO ('Q',17)
+#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec)
+#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int)
+#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info)
+#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control)
+#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample)
+
+typedef struct synth_control
+{
+ int devno;
+ char data[4000];
+}synth_control;
+
+typedef struct remove_sample
+{
+ int devno;
+ int bankno;
+ int instrno;
+} remove_sample;
+
+typedef struct seq_event_rec {
+ unsigned char arr[8];
+} seq_event_rec;
+
+#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
+#define SNDCTL_TMR_START _SIO ('T', 2)
+#define SNDCTL_TMR_STOP _SIO ('T', 3)
+#define SNDCTL_TMR_CONTINUE _SIO ('T', 4)
+#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
+#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
+#define TMR_INTERNAL 0x00000001
+#define TMR_EXTERNAL 0x00000002
+#define TMR_MODE_MIDI 0x00000010
+#define TMR_MODE_FSK 0x00000020
+#define TMR_MODE_CLS 0x00000040
+#define TMR_MODE_SMPTE 0x00000080
+#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int)
+#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int)
+
+#define _LINUX_PATCHKEY_H_INDIRECT
+#include <linux/patchkey.h>
+#undef _LINUX_PATCHKEY_H_INDIRECT
+
+#ifdef __BYTE_ORDER
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define AFMT_S16_NE AFMT_S16_BE
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define AFMT_S16_NE AFMT_S16_LE
+#else
+#error "could not determine byte order"
+#endif
+#endif
+
+struct patch_info {
+ unsigned short key;
+#define WAVE_PATCH _PATCHKEY(0x04)
+#define GUS_PATCH WAVE_PATCH
+#define WAVEFRONT_PATCH _PATCHKEY(0x06)
+
+ short device_no;
+ short instr_no;
+
+ unsigned int mode;
+
+#define WAVE_16_BITS 0x01
+#define WAVE_UNSIGNED 0x02
+#define WAVE_LOOPING 0x04
+#define WAVE_BIDIR_LOOP 0x08
+#define WAVE_LOOP_BACK 0x10
+#define WAVE_SUSTAIN_ON 0x20
+#define WAVE_ENVELOPES 0x40
+#define WAVE_FAST_RELEASE 0x80
+
+#define WAVE_VIBRATO 0x00010000
+#define WAVE_TREMOLO 0x00020000
+#define WAVE_SCALE 0x00040000
+#define WAVE_FRACTIONS 0x00080000
+
+#define WAVE_ROM 0x40000000
+#define WAVE_MULAW 0x20000000
+
+ int len;
+ int loop_start, loop_end;
+
+ unsigned int base_freq;
+ unsigned int base_note;
+ unsigned int high_note;
+ unsigned int low_note;
+ int panning;
+ int detuning;
+
+ unsigned char env_rate[ 6 ];
+ unsigned char env_offset[ 6 ];
+
+ unsigned char tremolo_sweep;
+ unsigned char tremolo_rate;
+ unsigned char tremolo_depth;
+
+ unsigned char vibrato_sweep;
+ unsigned char vibrato_rate;
+ unsigned char vibrato_depth;
+
+ int scale_frequency;
+ unsigned int scale_factor;
+
+ int volume;
+ int fractions;
+ int reserved1;
+ int spare[2];
+ char data[1];
+ };
+
+struct sysex_info {
+ short key;
+#define SYSEX_PATCH _PATCHKEY(0x05)
+#define MAUI_PATCH _PATCHKEY(0x06)
+ short device_no;
+ int len;
+ unsigned char data[1];
+ };
+
+#define SEQ_NOTEOFF 0
+#define SEQ_FMNOTEOFF SEQ_NOTEOFF
+#define SEQ_NOTEON 1
+#define SEQ_FMNOTEON SEQ_NOTEON
+#define SEQ_WAIT TMR_WAIT_ABS
+#define SEQ_PGMCHANGE 3
+#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
+#define SEQ_SYNCTIMER TMR_START
+#define SEQ_MIDIPUTC 5
+#define SEQ_DRUMON 6
+#define SEQ_DRUMOFF 7
+#define SEQ_ECHO TMR_ECHO
+#define SEQ_AFTERTOUCH 9
+#define SEQ_CONTROLLER 10
+
+#define CTL_BANK_SELECT 0x00
+#define CTL_MODWHEEL 0x01
+#define CTL_BREATH 0x02
+
+#define CTL_FOOT 0x04
+#define CTL_PORTAMENTO_TIME 0x05
+#define CTL_DATA_ENTRY 0x06
+#define CTL_MAIN_VOLUME 0x07
+#define CTL_BALANCE 0x08
+
+#define CTL_PAN 0x0a
+#define CTL_EXPRESSION 0x0b
+
+#define CTL_GENERAL_PURPOSE1 0x10
+#define CTL_GENERAL_PURPOSE2 0x11
+#define CTL_GENERAL_PURPOSE3 0x12
+#define CTL_GENERAL_PURPOSE4 0x13
+
+#define CTL_DAMPER_PEDAL 0x40
+#define CTL_SUSTAIN 0x40
+#define CTL_HOLD 0x40
+#define CTL_PORTAMENTO 0x41
+#define CTL_SOSTENUTO 0x42
+#define CTL_SOFT_PEDAL 0x43
+
+#define CTL_HOLD2 0x45
+
+#define CTL_GENERAL_PURPOSE5 0x50
+#define CTL_GENERAL_PURPOSE6 0x51
+#define CTL_GENERAL_PURPOSE7 0x52
+#define CTL_GENERAL_PURPOSE8 0x53
+
+#define CTL_EXT_EFF_DEPTH 0x5b
+#define CTL_TREMOLO_DEPTH 0x5c
+#define CTL_CHORUS_DEPTH 0x5d
+#define CTL_DETUNE_DEPTH 0x5e
+#define CTL_CELESTE_DEPTH 0x5e
+#define CTL_PHASER_DEPTH 0x5f
+#define CTL_DATA_INCREMENT 0x60
+#define CTL_DATA_DECREMENT 0x61
+#define CTL_NONREG_PARM_NUM_LSB 0x62
+#define CTL_NONREG_PARM_NUM_MSB 0x63
+#define CTL_REGIST_PARM_NUM_LSB 0x64
+#define CTL_REGIST_PARM_NUM_MSB 0x65
+
+#define CTRL_PITCH_BENDER 255
+#define CTRL_PITCH_BENDER_RANGE 254
+#define CTRL_EXPRESSION 253
+#define CTRL_MAIN_VOLUME 252
+#define SEQ_BALANCE 11
+#define SEQ_VOLMODE 12
+
+#define VOL_METHOD_ADAGIO 1
+#define VOL_METHOD_LINEAR 2
+
+#define SEQ_FULLSIZE 0xfd
+
+#define SEQ_PRIVATE 0xfe
+#define SEQ_EXTENDED 0xff
+
+typedef unsigned char sbi_instr_data[32];
+
+struct sbi_instrument {
+ unsigned short key;
+#define FM_PATCH _PATCHKEY(0x01)
+#define OPL3_PATCH _PATCHKEY(0x03)
+ short device;
+ int channel;
+ sbi_instr_data operators;
+ };
+
+struct synth_info {
+ char name[30];
+ int device;
+ int synth_type;
+#define SYNTH_TYPE_FM 0
+#define SYNTH_TYPE_SAMPLE 1
+#define SYNTH_TYPE_MIDI 2
+
+ int synth_subtype;
+#define FM_TYPE_ADLIB 0x00
+#define FM_TYPE_OPL3 0x01
+#define MIDI_TYPE_MPU401 0x401
+
+#define SAMPLE_TYPE_BASIC 0x10
+#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
+#define SAMPLE_TYPE_WAVEFRONT 0x11
+
+ int perc_mode;
+ int nr_voices;
+ int nr_drums;
+ int instr_bank_size;
+ unsigned int capabilities;
+#define SYNTH_CAP_PERCMODE 0x00000001
+#define SYNTH_CAP_OPL3 0x00000002
+#define SYNTH_CAP_INPUT 0x00000004
+ int dummies[19];
+ };
+
+struct sound_timer_info {
+ char name[32];
+ int caps;
+ };
+
+#define MIDI_CAP_MPU401 1
+
+struct midi_info {
+ char name[30];
+ int device;
+ unsigned int capabilities;
+ int dev_type;
+ int dummies[18];
+ };
+
+typedef struct {
+ unsigned char cmd;
+ char nr_args, nr_returns;
+ unsigned char data[30];
+ } mpu_command_rec;
+
+#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
+#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
+#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
+
+#define SNDCTL_DSP_RESET _SIO ('P', 0)
+#define SNDCTL_DSP_SYNC _SIO ('P', 1)
+#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
+#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
+#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
+#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
+#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
+#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
+#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
+#define SNDCTL_DSP_POST _SIO ('P', 8)
+#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
+#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
+
+#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int)
+#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int)
+#define AFMT_QUERY 0x00000000
+#define AFMT_MU_LAW 0x00000001
+#define AFMT_A_LAW 0x00000002
+#define AFMT_IMA_ADPCM 0x00000004
+#define AFMT_U8 0x00000008
+#define AFMT_S16_LE 0x00000010
+#define AFMT_S16_BE 0x00000020
+#define AFMT_S8 0x00000040
+#define AFMT_U16_LE 0x00000080
+#define AFMT_U16_BE 0x00000100
+#define AFMT_MPEG 0x00000200
+#define AFMT_AC3 0x00000400
+
+typedef struct audio_buf_info {
+ int fragments;
+ int fragstotal;
+ int fragsize;
+
+ int bytes;
+
+ } audio_buf_info;
+
+#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info)
+#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info)
+#define SNDCTL_DSP_NONBLOCK _SIO ('P',14)
+#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int)
+#define DSP_CAP_REVISION 0x000000ff
+#define DSP_CAP_DUPLEX 0x00000100
+#define DSP_CAP_REALTIME 0x00000200
+#define DSP_CAP_BATCH 0x00000400
+
+#define DSP_CAP_COPROC 0x00000800
+
+#define DSP_CAP_TRIGGER 0x00001000
+#define DSP_CAP_MMAP 0x00002000
+#define DSP_CAP_MULTI 0x00004000
+#define DSP_CAP_BIND 0x00008000
+
+#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int)
+#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int)
+#define PCM_ENABLE_INPUT 0x00000001
+#define PCM_ENABLE_OUTPUT 0x00000002
+
+typedef struct count_info {
+ int bytes;
+ int blocks;
+ int ptr;
+ } count_info;
+
+#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info)
+#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info)
+
+typedef struct buffmem_desc {
+ unsigned *buffer;
+ int size;
+ } buffmem_desc;
+#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc)
+#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc)
+#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21)
+#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22)
+#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int)
+
+#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
+#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
+#define DSP_BIND_QUERY 0x00000000
+#define DSP_BIND_FRONT 0x00000001
+#define DSP_BIND_SURR 0x00000002
+#define DSP_BIND_CENTER_LFE 0x00000004
+#define DSP_BIND_HANDSET 0x00000008
+#define DSP_BIND_MIC 0x00000010
+#define DSP_BIND_MODEM1 0x00000020
+#define DSP_BIND_MODEM2 0x00000040
+#define DSP_BIND_I2S 0x00000080
+#define DSP_BIND_SPDIF 0x00000100
+
+#define SNDCTL_DSP_SETSPDIF _SIOW ('P', 66, int)
+#define SNDCTL_DSP_GETSPDIF _SIOR ('P', 67, int)
+#define SPDIF_PRO 0x0001
+#define SPDIF_N_AUD 0x0002
+#define SPDIF_COPY 0x0004
+#define SPDIF_PRE 0x0008
+#define SPDIF_CC 0x07f0
+#define SPDIF_L 0x0800
+#define SPDIF_DRS 0x4000
+#define SPDIF_V 0x8000
+
+#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int)
+#define APF_NORMAL 0
+#define APF_NETWORK 1
+#define APF_CPUINTENS 2
+
+#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int)
+#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int)
+#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int)
+#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int)
+
+#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
+#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
+#define SOUND_PCM_POST SNDCTL_DSP_POST
+#define SOUND_PCM_RESET SNDCTL_DSP_RESET
+#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
+#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
+#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
+#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
+#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
+#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
+#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
+#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
+#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
+#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
+#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
+#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
+#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
+#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
+#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
+#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
+
+typedef struct copr_buffer {
+ int command;
+ int flags;
+#define CPF_NONE 0x0000
+#define CPF_FIRST 0x0001
+#define CPF_LAST 0x0002
+ int len;
+ int offs;
+
+ unsigned char data[4000];
+ } copr_buffer;
+
+typedef struct copr_debug_buf {
+ int command;
+ int parm1;
+ int parm2;
+ int flags;
+ int len;
+ } copr_debug_buf;
+
+typedef struct copr_msg {
+ int len;
+ unsigned char data[4000];
+ } copr_msg;
+
+#define SNDCTL_COPR_RESET _SIO ('C', 0)
+#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
+#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
+#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
+#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf)
+#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf)
+#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
+#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
+#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
+#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg)
+
+#define SOUND_MIXER_NRDEVICES 25
+#define SOUND_MIXER_VOLUME 0
+#define SOUND_MIXER_BASS 1
+#define SOUND_MIXER_TREBLE 2
+#define SOUND_MIXER_SYNTH 3
+#define SOUND_MIXER_PCM 4
+#define SOUND_MIXER_SPEAKER 5
+#define SOUND_MIXER_LINE 6
+#define SOUND_MIXER_MIC 7
+#define SOUND_MIXER_CD 8
+#define SOUND_MIXER_IMIX 9
+#define SOUND_MIXER_ALTPCM 10
+#define SOUND_MIXER_RECLEV 11
+#define SOUND_MIXER_IGAIN 12
+#define SOUND_MIXER_OGAIN 13
+
+#define SOUND_MIXER_LINE1 14
+#define SOUND_MIXER_LINE2 15
+#define SOUND_MIXER_LINE3 16
+#define SOUND_MIXER_DIGITAL1 17
+#define SOUND_MIXER_DIGITAL2 18
+#define SOUND_MIXER_DIGITAL3 19
+#define SOUND_MIXER_PHONEIN 20
+#define SOUND_MIXER_PHONEOUT 21
+#define SOUND_MIXER_VIDEO 22
+#define SOUND_MIXER_RADIO 23
+#define SOUND_MIXER_MONITOR 24
+
+#define SOUND_ONOFF_MIN 28
+#define SOUND_ONOFF_MAX 30
+
+#define SOUND_MIXER_NONE 31
+
+#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
+#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
+#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
+
+#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
+
+#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "line1", "line2", "line3", "dig1", "dig2", "dig3", "phin", "phout", "video", "radio", "monitor"}
+
+#define SOUND_MIXER_RECSRC 0xff
+#define SOUND_MIXER_DEVMASK 0xfe
+#define SOUND_MIXER_RECMASK 0xfd
+#define SOUND_MIXER_CAPS 0xfc
+#define SOUND_CAP_EXCL_INPUT 0x00000001
+#define SOUND_MIXER_STEREODEVS 0xfb
+#define SOUND_MIXER_OUTSRC 0xfa
+#define SOUND_MIXER_OUTMASK 0xf9
+
+#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
+#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
+#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
+#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
+#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
+#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
+#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
+#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
+#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
+#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
+#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
+#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
+#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
+#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
+#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
+#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
+#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
+#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
+#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
+#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
+#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
+#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
+#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
+#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
+#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
+
+#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
+#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
+#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
+
+#define MIXER_READ(dev) _SIOR('M', dev, int)
+#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
+#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
+#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
+#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
+#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
+#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
+#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
+#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
+#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
+#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
+#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
+#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
+#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
+#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
+#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
+#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
+#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
+
+#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
+#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
+#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
+
+#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
+#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
+#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
+#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
+#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
+
+#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
+#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
+#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
+#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
+#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
+#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
+#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
+#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
+#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
+#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
+#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
+#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
+#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
+#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
+#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
+#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
+#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
+#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
+
+#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
+#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
+#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
+
+#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
+
+typedef struct mixer_info
+{
+ char id[16];
+ char name[32];
+ int modify_counter;
+ int fillers[10];
+} mixer_info;
+
+typedef struct _old_mixer_info
+{
+ char id[16];
+ char name[32];
+} _old_mixer_info;
+
+#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info)
+#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info)
+
+typedef unsigned char mixer_record[128];
+
+#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
+
+#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
+#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
+
+#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
+#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
+#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
+#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
+#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
+
+typedef struct mixer_vol_table {
+ int num;
+ char name[32];
+ int levels[32];
+} mixer_vol_table;
+
+#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
+#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
+
+#define OSS_GETVERSION _SIOR ('M', 118, int)
+
+#define EV_SEQ_LOCAL 0x80
+#define EV_TIMING 0x81
+#define EV_CHN_COMMON 0x92
+#define EV_CHN_VOICE 0x93
+#define EV_SYSEX 0x94
+
+#define MIDI_NOTEOFF 0x80
+#define MIDI_NOTEON 0x90
+#define MIDI_KEY_PRESSURE 0xA0
+
+#define MIDI_CTL_CHANGE 0xB0
+#define MIDI_PGM_CHANGE 0xC0
+#define MIDI_CHN_PRESSURE 0xD0
+#define MIDI_PITCH_BEND 0xE0
+
+#define MIDI_SYSTEM_PREFIX 0xF0
+
+#define TMR_WAIT_REL 1
+#define TMR_WAIT_ABS 2
+#define TMR_STOP 3
+#define TMR_START 4
+#define TMR_CONTINUE 5
+#define TMR_TEMPO 6
+#define TMR_ECHO 8
+#define TMR_CLOCK 9
+#define TMR_SPP 10
+#define TMR_TIMESIG 11
+
+#define LOCL_STARTAUDIO 1
+
+#if !defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL) || defined(USE_SEQ_MACROS)
+
+#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
+
+#define SEQ_PM_DEFINES int __foo_bar___
+#ifdef OSSLIB
+#define SEQ_USE_EXTBUF() extern unsigned char *_seqbuf; extern int _seqbuflen;extern int _seqbufptr
+#define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
+#define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
+#define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
+#define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
+
+#define SEQ_LOAD_GMINSTR(dev, instr) OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
+#define SEQ_LOAD_GMDRUM(dev, drum) OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
+#else
+
+#define SEQ_LOAD_GMINSTR(dev, instr)
+#define SEQ_LOAD_GMDRUM(dev, drum)
+
+#define SEQ_USE_EXTBUF() extern unsigned char _seqbuf[]; extern int _seqbuflen;extern int _seqbufptr
+
+#ifndef USE_SIMPLE_MACROS
+
+#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
+#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
+#define _SEQ_ADVBUF(len) _seqbufptr += len
+#define SEQ_DUMPBUF seqbuf_dump
+#else
+
+#define _SEQ_NEEDBUF(len)
+#endif
+#endif
+
+#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr+1] = SEQ_VOLMODE; _seqbuf[_seqbufptr+2] = (dev); _seqbuf[_seqbufptr+3] = (mode); _seqbuf[_seqbufptr+4] = 0; _seqbuf[_seqbufptr+5] = 0; _seqbuf[_seqbufptr+6] = 0; _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define _CHN_VOICE(dev, event, chn, note, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_VOICE; _seqbuf[_seqbufptr+1] = (dev); _seqbuf[_seqbufptr+2] = (event); _seqbuf[_seqbufptr+3] = (chn); _seqbuf[_seqbufptr+4] = (note); _seqbuf[_seqbufptr+5] = (parm); _seqbuf[_seqbufptr+6] = (0); _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define SEQ_START_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
+
+#define SEQ_STOP_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
+
+#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
+
+#define _CHN_COMMON(dev, event, chn, p1, p2, w14) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_COMMON; _seqbuf[_seqbufptr+1] = (dev); _seqbuf[_seqbufptr+2] = (event); _seqbuf[_seqbufptr+3] = (chn); _seqbuf[_seqbufptr+4] = (p1); _seqbuf[_seqbufptr+5] = (p2); *(short *)&_seqbuf[_seqbufptr+6] = (w14); _SEQ_ADVBUF(8);}
+
+#define SEQ_SYSEX(dev, buf, len) {int ii, ll=(len); unsigned char *bufp=buf; if (ll>6)ll=6; _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_SYSEX; _seqbuf[_seqbufptr+1] = (dev); for(ii=0;ii<ll;ii++) _seqbuf[_seqbufptr+ii+2] = bufp[ii]; for(ii=ll;ii<6;ii++) _seqbuf[_seqbufptr+ii+2] = 0xff; _SEQ_ADVBUF(8);}
+
+#define SEQ_CHN_PRESSURE(dev, chn, pressure) _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
+
+#define SEQ_SET_PATCH SEQ_PGM_CHANGE
+#ifdef OSSLIB
+#define SEQ_PGM_CHANGE(dev, chn, patch) {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
+#else
+#define SEQ_PGM_CHANGE(dev, chn, patch) _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
+#endif
+
+#define SEQ_CONTROL(dev, chn, controller, value) _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
+
+#define SEQ_BENDER(dev, chn, value) _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
+
+#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER; _seqbuf[_seqbufptr+2] = (dev); _seqbuf[_seqbufptr+3] = (voice); _seqbuf[_seqbufptr+4] = (controller); _seqbuf[_seqbufptr+5] = ((value)&0xff); _seqbuf[_seqbufptr+6] = ((value>>8)&0xff); _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
+#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
+#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
+#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
+#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
+
+#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr+0] = EV_TIMING; _seqbuf[_seqbufptr+1] = (ev); _seqbuf[_seqbufptr+2] = 0; _seqbuf[_seqbufptr+3] = 0; *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); _SEQ_ADVBUF(8);}
+
+#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
+#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
+#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
+#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
+#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
+#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
+#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
+#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
+#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
+
+#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; _seqbuf[_seqbufptr+1] = (ev); _seqbuf[_seqbufptr+2] = 0; _seqbuf[_seqbufptr+3] = 0; *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); _SEQ_ADVBUF(8);}
+
+#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
+
+#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4); _seqbuf[_seqbufptr] = SEQ_MIDIPUTC; _seqbuf[_seqbufptr+1] = (byte); _seqbuf[_seqbufptr+2] = (device); _seqbuf[_seqbufptr+3] = 0; _SEQ_ADVBUF(4);}
+
+#ifdef OSSLIB
+#define SEQ_WRPATCH(patchx, len) OSS_write_patch(seqfd, (char*)(patchx), len)
+#define SEQ_WRPATCH2(patchx, len) OSS_write_patch2(seqfd, (char*)(patchx), len)
+#else
+#define SEQ_WRPATCH(patchx, len) {if (_seqbufptr) SEQ_DUMPBUF(); if (write(seqfd, (char*)(patchx), len)==-1) perror("Write patch: /dev/sequencer");}
+#define SEQ_WRPATCH2(patchx, len) (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
+#endif
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock.h
new file mode 100644
index 0000000..5504c9e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_H
+#define __LINUX_SPINLOCK_H
+
+#include <linux/preempt.h>
+#include <linux/linkage.h>
+#include <linux/compiler.h>
+#include <linux/thread_info.h>
+#include <linux/kernel.h>
+#include <linux/stringify.h>
+
+#include <asm/system.h>
+
+#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME
+
+#define LOCK_SECTION_START(extra) ".subsection 1\n\t" extra ".ifndef " LOCK_SECTION_NAME "\n\t" LOCK_SECTION_NAME ":\n\t" ".endif\n"
+
+#define LOCK_SECTION_END ".previous\n\t"
+
+#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
+
+#include <linux/spinlock_types.h>
+
+#include <linux/spinlock_up.h>
+
+#define spin_lock_init(lock) do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
+
+#define rwlock_init(lock) do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
+
+#define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock)
+
+#define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock)
+
+#include <linux/spinlock_api_up.h>
+
+#define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock)
+#define _raw_spin_lock_flags(lock, flags) __raw_spin_lock_flags(&(lock)->raw_lock, *(flags))
+#define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock)
+#define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
+#define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock)
+#define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock)
+#define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock)
+#define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock)
+#define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock)
+#define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock)
+
+#define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock)
+#define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock)
+
+#define spin_trylock(lock) __cond_lock(_spin_trylock(lock))
+#define read_trylock(lock) __cond_lock(_read_trylock(lock))
+#define write_trylock(lock) __cond_lock(_write_trylock(lock))
+
+#define spin_lock(lock) _spin_lock(lock)
+
+#define spin_lock_nested(lock, subclass) _spin_lock(lock)
+
+#define write_lock(lock) _write_lock(lock)
+#define read_lock(lock) _read_lock(lock)
+
+#define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags)
+#define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags)
+#define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags)
+
+#define spin_lock_irq(lock) _spin_lock_irq(lock)
+#define spin_lock_bh(lock) _spin_lock_bh(lock)
+
+#define read_lock_irq(lock) _read_lock_irq(lock)
+#define read_lock_bh(lock) _read_lock_bh(lock)
+
+#define write_lock_irq(lock) _write_lock_irq(lock)
+#define write_lock_bh(lock) _write_lock_bh(lock)
+
+#define spin_unlock(lock) _spin_unlock(lock)
+#define read_unlock(lock) _read_unlock(lock)
+#define write_unlock(lock) _write_unlock(lock)
+#define spin_unlock_irq(lock) _spin_unlock_irq(lock)
+#define read_unlock_irq(lock) _read_unlock_irq(lock)
+#define write_unlock_irq(lock) _write_unlock_irq(lock)
+
+#define spin_unlock_irqrestore(lock, flags) _spin_unlock_irqrestore(lock, flags)
+#define spin_unlock_bh(lock) _spin_unlock_bh(lock)
+
+#define read_unlock_irqrestore(lock, flags) _read_unlock_irqrestore(lock, flags)
+#define read_unlock_bh(lock) _read_unlock_bh(lock)
+
+#define write_unlock_irqrestore(lock, flags) _write_unlock_irqrestore(lock, flags)
+#define write_unlock_bh(lock) _write_unlock_bh(lock)
+
+#define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock))
+
+#define spin_trylock_irq(lock) ({ local_irq_disable(); _spin_trylock(lock) ? 1 : ({ local_irq_enable(); 0; }); })
+
+#define spin_trylock_irqsave(lock, flags) ({ local_irq_save(flags); _spin_trylock(lock) ? 1 : ({ local_irq_restore(flags); 0; }); })
+
+#include <asm/atomic.h>
+
+#define atomic_dec_and_lock(atomic, lock) __cond_lock(_atomic_dec_and_lock(atomic, lock))
+
+#define spin_can_lock(lock) (!spin_is_locked(lock))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_smp.h
new file mode 100644
index 0000000..74d8cc9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_API_SMP_H
+#define __LINUX_SPINLOCK_API_SMP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_up.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_up.h
new file mode 100644
index 0000000..c9a5c01
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_API_UP_H
+#define __LINUX_SPINLOCK_API_UP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define in_lock_functions(ADDR) 0
+
+#define assert_spin_locked(lock) do { (void)(lock); } while (0)
+
+#define __LOCK(lock) do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
+
+#define __LOCK_BH(lock) do { local_bh_disable(); __LOCK(lock); } while (0)
+
+#define __LOCK_IRQ(lock) do { local_irq_disable(); __LOCK(lock); } while (0)
+
+#define __LOCK_IRQSAVE(lock, flags) do { local_irq_save(flags); __LOCK(lock); } while (0)
+
+#define __UNLOCK(lock) do { preempt_enable(); __release(lock); (void)(lock); } while (0)
+
+#define __UNLOCK_BH(lock) do { preempt_enable_no_resched(); local_bh_enable(); __release(lock); (void)(lock); } while (0)
+
+#define __UNLOCK_IRQ(lock) do { local_irq_enable(); __UNLOCK(lock); } while (0)
+
+#define __UNLOCK_IRQRESTORE(lock, flags) do { local_irq_restore(flags); __UNLOCK(lock); } while (0)
+
+#define _spin_lock(lock) __LOCK(lock)
+#define _spin_lock_nested(lock, subclass) __LOCK(lock)
+#define _read_lock(lock) __LOCK(lock)
+#define _write_lock(lock) __LOCK(lock)
+#define _spin_lock_bh(lock) __LOCK_BH(lock)
+#define _read_lock_bh(lock) __LOCK_BH(lock)
+#define _write_lock_bh(lock) __LOCK_BH(lock)
+#define _spin_lock_irq(lock) __LOCK_IRQ(lock)
+#define _read_lock_irq(lock) __LOCK_IRQ(lock)
+#define _write_lock_irq(lock) __LOCK_IRQ(lock)
+#define _spin_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _read_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _write_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _spin_trylock(lock) ({ __LOCK(lock); 1; })
+#define _read_trylock(lock) ({ __LOCK(lock); 1; })
+#define _write_trylock(lock) ({ __LOCK(lock); 1; })
+#define _spin_trylock_bh(lock) ({ __LOCK_BH(lock); 1; })
+#define _spin_unlock(lock) __UNLOCK(lock)
+#define _read_unlock(lock) __UNLOCK(lock)
+#define _write_unlock(lock) __UNLOCK(lock)
+#define _spin_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _write_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _read_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _spin_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _read_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _write_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _spin_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+#define _read_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+#define _write_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types.h
new file mode 100644
index 0000000..0938b51
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#define __LINUX_SPINLOCK_TYPES_H
+
+#include <linux/lockdep.h>
+
+#include <linux/spinlock_types_up.h>
+
+typedef struct {
+ raw_spinlock_t raw_lock;
+} spinlock_t;
+
+#define SPINLOCK_MAGIC 0xdead4ead
+
+typedef struct {
+ raw_rwlock_t raw_lock;
+} rwlock_t;
+
+#define RWLOCK_MAGIC 0xdeaf1eed
+
+#define SPINLOCK_OWNER_INIT ((void *)-1L)
+
+#define SPIN_DEP_MAP_INIT(lockname)
+
+#define RW_DEP_MAP_INIT(lockname)
+
+#define __SPIN_LOCK_UNLOCKED(lockname) (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, SPIN_DEP_MAP_INIT(lockname) }
+#define __RW_LOCK_UNLOCKED(lockname) (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, RW_DEP_MAP_INIT(lockname) }
+
+#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
+#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)
+
+#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
+#define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types_up.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types_up.h
new file mode 100644
index 0000000..0db3037
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_TYPES_UP_H
+#define __LINUX_SPINLOCK_TYPES_UP_H
+
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#error "please don't include this file directly"
+#endif
+
+typedef struct { } raw_spinlock_t;
+
+#define __RAW_SPIN_LOCK_UNLOCKED { }
+
+typedef struct {
+
+} raw_rwlock_t;
+
+#define __RAW_RW_LOCK_UNLOCKED { }
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_up.h b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_up.h
new file mode 100644
index 0000000..b4958dc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/spinlock_up.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_UP_H
+#define __LINUX_SPINLOCK_UP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define __raw_spin_is_locked(lock) ((void)(lock), 0)
+
+#define __raw_spin_lock(lock) do { (void)(lock); } while (0)
+#define __raw_spin_unlock(lock) do { (void)(lock); } while (0)
+#define __raw_spin_trylock(lock) ({ (void)(lock); 1; })
+
+#define __raw_read_can_lock(lock) (((void)(lock), 1))
+#define __raw_write_can_lock(lock) (((void)(lock), 1))
+
+#define __raw_spin_unlock_wait(lock) do { cpu_relax(); } while (__raw_spin_is_locked(lock))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/stacktrace.h b/6/platforms/android-3/arch-arm/usr/include/linux/stacktrace.h
new file mode 100644
index 0000000..af7ecc8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/stacktrace.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_STACKTRACE_H
+#define __LINUX_STACKTRACE_H
+
+#define save_stack_trace(trace, task, all, skip) do { } while (0)
+#define print_stack_trace(trace) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/stat.h b/6/platforms/android-3/arch-arm/usr/include/linux/stat.h
new file mode 100644
index 0000000..0d757f4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/stat.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STAT_H
+#define _LINUX_STAT_H
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#define S_IFMT 00170000
+#define S_IFSOCK 0140000
+#define S_IFLNK 0120000
+#define S_IFREG 0100000
+#define S_IFBLK 0060000
+#define S_IFDIR 0040000
+#define S_IFCHR 0020000
+#define S_IFIFO 0010000
+#define S_ISUID 0004000
+#define S_ISGID 0002000
+#define S_ISVTX 0001000
+
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+
+#define S_IRWXU 00700
+#define S_IRUSR 00400
+#define S_IWUSR 00200
+#define S_IXUSR 00100
+
+#define S_IRWXG 00070
+#define S_IRGRP 00040
+#define S_IWGRP 00020
+#define S_IXGRP 00010
+
+#define S_IRWXO 00007
+#define S_IROTH 00004
+#define S_IWOTH 00002
+#define S_IXOTH 00001
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/statfs.h b/6/platforms/android-3/arch-arm/usr/include/linux/statfs.h
new file mode 100644
index 0000000..43a5d70
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/statfs.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STATFS_H
+#define _LINUX_STATFS_H
+
+#include <linux/types.h>
+
+#include <asm/statfs.h>
+
+struct kstatfs {
+ long f_type;
+ long f_bsize;
+ u64 f_blocks;
+ u64 f_bfree;
+ u64 f_bavail;
+ u64 f_files;
+ u64 f_ffree;
+ __kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_frsize;
+ long f_spare[5];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/stddef.h b/6/platforms/android-3/arch-arm/usr/include/linux/stddef.h
new file mode 100644
index 0000000..5412f47
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/stddef.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STDDEF_H
+#define _LINUX_STDDEF_H
+
+#include <linux/compiler.h>
+
+#undef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+
+#undef offsetof
+#ifdef __compiler_offsetof
+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+#else
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/string.h b/6/platforms/android-3/arch-arm/usr/include/linux/string.h
new file mode 100644
index 0000000..6759068
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/string.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STRING_H_
+#define _LINUX_STRING_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/stringify.h b/6/platforms/android-3/arch-arm/usr/include/linux/stringify.h
new file mode 100644
index 0000000..cbb9e5b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/stringify.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+#define __stringify_1(x) #x
+#define __stringify(x) __stringify_1(x)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth.h
new file mode 100644
index 0000000..ae0a3d0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_H
+#define _LINUX_SUNRPC_AUTH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth_gss.h
new file mode 100644
index 0000000..a64f1f8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_GSS_H
+#define _LINUX_SUNRPC_AUTH_GSS_H
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/clnt.h
new file mode 100644
index 0000000..a562ad9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_CLNT_H
+#define _LINUX_SUNRPC_CLNT_H
+
+#include <linux/sunrpc/msg_prot.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xprt.h>
+#include <linux/sunrpc/auth.h>
+#include <linux/sunrpc/stats.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/timer.h>
+#include <asm/signal.h>
+
+struct rpc_portmap {
+ __u32 pm_prog;
+ __u32 pm_vers;
+ __u32 pm_prot;
+ __u16 pm_port;
+ unsigned char pm_binding : 1;
+ struct rpc_wait_queue pm_bindwait;
+};
+
+struct rpc_inode;
+
+struct rpc_clnt {
+ atomic_t cl_count;
+ atomic_t cl_users;
+ struct rpc_xprt * cl_xprt;
+ struct rpc_procinfo * cl_procinfo;
+ u32 cl_maxproc;
+
+ char * cl_server;
+ char * cl_protname;
+ struct rpc_auth * cl_auth;
+ struct rpc_stat * cl_stats;
+ struct rpc_iostats * cl_metrics;
+
+ unsigned int cl_softrtry : 1,
+ cl_intr : 1,
+ cl_autobind : 1,
+ cl_oneshot : 1,
+ cl_dead : 1;
+
+ struct rpc_rtt * cl_rtt;
+ struct rpc_portmap * cl_pmap;
+
+ int cl_nodelen;
+ char cl_nodename[UNX_MAXNODENAME];
+ char cl_pathname[30];
+ struct vfsmount * cl_vfsmnt;
+ struct dentry * cl_dentry;
+ struct rpc_clnt * cl_parent;
+ struct rpc_rtt cl_rtt_default;
+ struct rpc_portmap cl_pmap_default;
+ char cl_inline_name[32];
+};
+#define cl_timeout cl_xprt->timeout
+#define cl_prog cl_pmap->pm_prog
+#define cl_vers cl_pmap->pm_vers
+#define cl_port cl_pmap->pm_port
+#define cl_prot cl_pmap->pm_prot
+
+#define RPC_MAXVERSION 4
+struct rpc_program {
+ char * name;
+ u32 number;
+ unsigned int nrvers;
+ struct rpc_version ** version;
+ struct rpc_stat * stats;
+ char * pipe_dir_name;
+};
+
+struct rpc_version {
+ u32 number;
+ unsigned int nrprocs;
+ struct rpc_procinfo * procs;
+};
+
+struct rpc_procinfo {
+ u32 p_proc;
+ kxdrproc_t p_encode;
+ kxdrproc_t p_decode;
+ unsigned int p_bufsiz;
+ unsigned int p_count;
+ unsigned int p_timer;
+ u32 p_statidx;
+ char * p_name;
+};
+
+#define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt))
+#define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/debug.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/debug.h
new file mode 100644
index 0000000..e2689f1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_DEBUG_H_
+#define _LINUX_SUNRPC_DEBUG_H_
+
+#define RPCDBG_XPRT 0x0001
+#define RPCDBG_CALL 0x0002
+#define RPCDBG_DEBUG 0x0004
+#define RPCDBG_NFS 0x0008
+#define RPCDBG_AUTH 0x0010
+#define RPCDBG_PMAP 0x0020
+#define RPCDBG_SCHED 0x0040
+#define RPCDBG_TRANS 0x0080
+#define RPCDBG_SVCSOCK 0x0100
+#define RPCDBG_SVCDSP 0x0200
+#define RPCDBG_MISC 0x0400
+#define RPCDBG_CACHE 0x0800
+#define RPCDBG_ALL 0x7fff
+
+#define CTL_SUNRPC 7249
+
+enum {
+ CTL_RPCDEBUG = 1,
+ CTL_NFSDEBUG,
+ CTL_NFSDDEBUG,
+ CTL_NLMDEBUG,
+ CTL_SLOTTABLE_UDP,
+ CTL_SLOTTABLE_TCP,
+ CTL_MIN_RESVPORT,
+ CTL_MAX_RESVPORT,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_api.h
new file mode 100644
index 0000000..cbc77c2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_API_H
+#define _LINUX_SUNRPC_GSS_API_H
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
new file mode 100644
index 0000000..8f18ba0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/sunrpc/gss_api.h>
+
+#define SIZEOF_INT 4
+
+#define G_BAD_SERVICE_NAME (-2045022976L)
+#define G_BAD_STRING_UID (-2045022975L)
+#define G_NOUSER (-2045022974L)
+#define G_VALIDATE_FAILED (-2045022973L)
+#define G_BUFFER_ALLOC (-2045022972L)
+#define G_BAD_MSG_CTX (-2045022971L)
+#define G_WRONG_SIZE (-2045022970L)
+#define G_BAD_USAGE (-2045022969L)
+#define G_UNKNOWN_QOP (-2045022968L)
+#define G_NO_HOSTNAME (-2045022967L)
+#define G_BAD_HOSTNAME (-2045022966L)
+#define G_WRONG_MECH (-2045022965L)
+#define G_BAD_TOK_HEADER (-2045022964L)
+#define G_BAD_DIRECTION (-2045022963L)
+#define G_TOK_TRUNC (-2045022962L)
+#define G_REFLECT (-2045022961L)
+#define G_WRONG_TOKID (-2045022960L)
+
+#define g_OID_equal(o1,o2) (((o1)->len == (o2)->len) && (memcmp((o1)->data,(o2)->data,(int) (o1)->len) == 0))
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_err.h
new file mode 100644
index 0000000..01fb1b4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_ERR_H
+#define _LINUX_SUNRPC_GSS_ERR_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/msg_prot.h
new file mode 100644
index 0000000..52f4e76
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_MSGPROT_H_
+#define _LINUX_SUNRPC_MSGPROT_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/sched.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/sched.h
new file mode 100644
index 0000000..859b2d8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SCHED_H_
+#define _LINUX_SUNRPC_SCHED_H_
+
+#include <linux/timer.h>
+#include <linux/sunrpc/types.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/xdr.h>
+
+struct rpc_procinfo;
+struct rpc_message {
+ struct rpc_procinfo * rpc_proc;
+ void * rpc_argp;
+ void * rpc_resp;
+ struct rpc_cred * rpc_cred;
+};
+
+struct rpc_call_ops;
+struct rpc_wait_queue;
+struct rpc_wait {
+ struct list_head list;
+ struct list_head links;
+ struct rpc_wait_queue * rpc_waitq;
+};
+
+struct rpc_task {
+#ifdef RPC_DEBUG
+ unsigned long tk_magic;
+#endif
+ atomic_t tk_count;
+ struct list_head tk_task;
+ struct rpc_clnt * tk_client;
+ struct rpc_rqst * tk_rqstp;
+ int tk_status;
+
+ struct rpc_message tk_msg;
+ __u8 tk_garb_retry;
+ __u8 tk_cred_retry;
+
+ unsigned long tk_cookie;
+
+ void (*tk_timeout_fn)(struct rpc_task *);
+ void (*tk_callback)(struct rpc_task *);
+ void (*tk_action)(struct rpc_task *);
+ const struct rpc_call_ops *tk_ops;
+ void * tk_calldata;
+
+ struct timer_list tk_timer;
+ unsigned long tk_timeout;
+ unsigned short tk_flags;
+ unsigned char tk_priority : 2;
+ unsigned long tk_runstate;
+ struct workqueue_struct *tk_workqueue;
+ union {
+ struct work_struct tk_work;
+ struct rpc_wait tk_wait;
+ } u;
+
+ unsigned short tk_timeouts;
+ size_t tk_bytes_sent;
+ unsigned long tk_start;
+ long tk_rtt;
+
+#ifdef RPC_DEBUG
+ unsigned short tk_pid;
+#endif
+};
+#define tk_auth tk_client->cl_auth
+#define tk_xprt tk_client->cl_xprt
+
+#define task_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1)
+
+#define task_for_first(task, head) if (!list_empty(head) && ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1))
+
+#define alltask_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, tk_task)),1)
+
+typedef void (*rpc_action)(struct rpc_task *);
+
+struct rpc_call_ops {
+ void (*rpc_call_prepare)(struct rpc_task *, void *);
+ void (*rpc_call_done)(struct rpc_task *, void *);
+ void (*rpc_release)(void *);
+};
+
+#define RPC_TASK_ASYNC 0x0001
+#define RPC_TASK_SWAPPER 0x0002
+#define RPC_TASK_CHILD 0x0008
+#define RPC_CALL_MAJORSEEN 0x0020
+#define RPC_TASK_ROOTCREDS 0x0040
+#define RPC_TASK_DYNAMIC 0x0080
+#define RPC_TASK_KILLED 0x0100
+#define RPC_TASK_SOFT 0x0200
+#define RPC_TASK_NOINTR 0x0400
+
+#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
+#define RPC_IS_CHILD(t) ((t)->tk_flags & RPC_TASK_CHILD)
+#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
+#define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
+#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
+#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
+#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
+#define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR)
+
+#define RPC_TASK_RUNNING 0
+#define RPC_TASK_QUEUED 1
+#define RPC_TASK_WAKEUP 2
+#define RPC_TASK_HAS_TIMER 3
+#define RPC_TASK_ACTIVE 4
+
+#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_test_and_set_running(t) (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_clear_running(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_clear_queued(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define rpc_start_wakeup(t) (test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0)
+#define rpc_finish_wakeup(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_clear_active(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while(0)
+
+#define RPC_PRIORITY_LOW 0
+#define RPC_PRIORITY_NORMAL 1
+#define RPC_PRIORITY_HIGH 2
+#define RPC_NR_PRIORITY (RPC_PRIORITY_HIGH+1)
+
+struct rpc_wait_queue {
+ spinlock_t lock;
+ struct list_head tasks[RPC_NR_PRIORITY];
+ unsigned long cookie;
+ unsigned char maxpriority;
+ unsigned char priority;
+ unsigned char count;
+ unsigned char nr;
+ unsigned short qlen;
+#ifdef RPC_DEBUG
+ const char * name;
+#endif
+};
+
+#define RPC_BATCH_COUNT 16
+
+#ifndef RPC_DEBUG
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, }
+#else
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, .name = qname, }
+#endif
+#define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var,qname)
+
+#define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
+
+struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent);
+
+struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
+
+#ifdef RPC_DEBUG
+
+#endif
+
+#ifdef RPC_DEBUG
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/stats.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/stats.h
new file mode 100644
index 0000000..03e7338
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_STATS_H
+#define _LINUX_SUNRPC_STATS_H
+
+#include <linux/proc_fs.h>
+
+struct rpc_stat {
+ struct rpc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn,
+ netreconn;
+ unsigned int rpccnt,
+ rpcretrans,
+ rpcauthrefresh,
+ rpcgarbage;
+};
+
+struct svc_stat {
+ struct svc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn;
+ unsigned int rpccnt,
+ rpcbadfmt,
+ rpcbadauth,
+ rpcbadclnt;
+};
+
+#ifdef MODULE
+
+#endif
+
+#define proc_net_rpc NULL
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svc.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svc.h
new file mode 100644
index 0000000..7a0cc2d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef SUNRPC_SVC_H
+#define SUNRPC_SVC_H
+
+#include <linux/in.h>
+#include <linux/sunrpc/types.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/svcauth.h>
+#include <linux/wait.h>
+#include <linux/mm.h>
+
+struct svc_serv {
+ struct list_head sv_threads;
+ struct list_head sv_sockets;
+ struct svc_program * sv_program;
+ struct svc_stat * sv_stats;
+ spinlock_t sv_lock;
+ unsigned int sv_nrthreads;
+ unsigned int sv_bufsz;
+ unsigned int sv_xdrsize;
+
+ struct list_head sv_permsocks;
+ struct list_head sv_tempsocks;
+ int sv_tmpcnt;
+
+ char * sv_name;
+};
+
+#define RPCSVC_MAXPAYLOAD (64*1024u)
+
+#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2)
+
+struct svc_program {
+ struct svc_program * pg_next;
+ u32 pg_prog;
+ unsigned int pg_lovers;
+ unsigned int pg_hivers;
+ unsigned int pg_nvers;
+ struct svc_version ** pg_vers;
+ char * pg_name;
+ char * pg_class;
+ struct svc_stat * pg_stats;
+ int (*pg_authenticate)(struct svc_rqst *);
+};
+
+struct svc_version {
+ u32 vs_vers;
+ u32 vs_nproc;
+ struct svc_procedure * vs_proc;
+ u32 vs_xdrsize;
+
+ int (*vs_dispatch)(struct svc_rqst *, u32 *);
+};
+
+typedef int (*svc_procfunc)(struct svc_rqst *, void *argp, void *resp);
+struct svc_procedure {
+ svc_procfunc pc_func;
+ kxdrproc_t pc_decode;
+ kxdrproc_t pc_encode;
+ kxdrproc_t pc_release;
+ unsigned int pc_argsize;
+ unsigned int pc_ressize;
+ unsigned int pc_count;
+ unsigned int pc_cachetype;
+ unsigned int pc_xdrressize;
+};
+
+typedef void (*svc_thread_fn)(struct svc_rqst *);
+
+struct svc_serv * svc_create(struct svc_program *, unsigned int);
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svcauth.h
new file mode 100644
index 0000000..9b414d7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SVCAUTH_H_
+#define _LINUX_SUNRPC_SVCAUTH_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/timer.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/timer.h
new file mode 100644
index 0000000..8fb78e5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TIMER_H
+#define _LINUX_SUNRPC_TIMER_H
+
+#include <asm/atomic.h>
+
+struct rpc_rtt {
+ unsigned long timeo;
+ unsigned long srtt[5];
+ unsigned long sdrtt[5];
+ int ntimeouts[5];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/types.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/types.h
new file mode 100644
index 0000000..ce52052
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/types.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TYPES_H_
+#define _LINUX_SUNRPC_TYPES_H_
+
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/debug.h>
+#include <linux/list.h>
+
+#define signalled() (signal_pending(current))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xdr.h
new file mode 100644
index 0000000..d513843
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SUNRPC_XDR_H_
+#define _SUNRPC_XDR_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xprt.h
new file mode 100644
index 0000000..145a26d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_XPRT_H
+#define _LINUX_SUNRPC_XPRT_H
+
+#include <linux/uio.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xdr.h>
+
+#define RPC_MIN_SLOT_TABLE (2U)
+#define RPC_DEF_SLOT_TABLE (16U)
+#define RPC_MAX_SLOT_TABLE (128U)
+
+#define RPC_CALLHDRSIZE 6
+#define RPC_REPHDRSIZE 4
+
+#define RPC_MIN_RESVPORT (1U)
+#define RPC_MAX_RESVPORT (65535U)
+#define RPC_DEF_MIN_RESVPORT (665U)
+#define RPC_DEF_MAX_RESVPORT (1023U)
+
+struct rpc_timeout {
+ unsigned long to_initval,
+ to_maxval,
+ to_increment;
+ unsigned int to_retries;
+ unsigned char to_exponential;
+};
+
+struct rpc_task;
+struct rpc_xprt;
+struct seq_file;
+
+struct rpc_rqst {
+
+ struct rpc_xprt * rq_xprt;
+ struct xdr_buf rq_snd_buf;
+ struct xdr_buf rq_rcv_buf;
+
+ struct rpc_task * rq_task;
+ __u32 rq_xid;
+ int rq_cong;
+ int rq_received;
+ u32 rq_seqno;
+ int rq_enc_pages_num;
+ struct page **rq_enc_pages;
+ void (*rq_release_snd_buf)(struct rpc_rqst *);
+ struct list_head rq_list;
+
+ __u32 * rq_buffer;
+ size_t rq_bufsize;
+
+ struct xdr_buf rq_private_buf;
+ unsigned long rq_majortimeo;
+ unsigned long rq_timeout;
+ unsigned int rq_retries;
+
+ u32 rq_bytes_sent;
+
+ unsigned long rq_xtime;
+ int rq_ntrans;
+};
+#define rq_svec rq_snd_buf.head
+#define rq_slen rq_snd_buf.len
+
+struct rpc_xprt_ops {
+ void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
+ int (*reserve_xprt)(struct rpc_task *task);
+ void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
+ void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
+ void (*connect)(struct rpc_task *task);
+ void * (*buf_alloc)(struct rpc_task *task, size_t size);
+ void (*buf_free)(struct rpc_task *task);
+ int (*send_request)(struct rpc_task *task);
+ void (*set_retrans_timeout)(struct rpc_task *task);
+ void (*timer)(struct rpc_task *task);
+ void (*release_request)(struct rpc_task *task);
+ void (*close)(struct rpc_xprt *xprt);
+ void (*destroy)(struct rpc_xprt *xprt);
+ void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
+};
+
+struct rpc_xprt {
+ struct rpc_xprt_ops * ops;
+ struct socket * sock;
+ struct sock * inet;
+
+ struct rpc_timeout timeout;
+ struct sockaddr_in addr;
+ int prot;
+
+ unsigned long cong;
+ unsigned long cwnd;
+
+ size_t rcvsize,
+ sndsize;
+
+ size_t max_payload;
+ unsigned int tsh_size;
+
+ struct rpc_wait_queue sending;
+ struct rpc_wait_queue resend;
+ struct rpc_wait_queue pending;
+ struct rpc_wait_queue backlog;
+ struct list_head free;
+ struct rpc_rqst * slot;
+ unsigned int max_reqs;
+ unsigned long state;
+ unsigned char shutdown : 1,
+ resvport : 1;
+
+ __u32 xid;
+
+ u32 tcp_recm,
+ tcp_xid,
+ tcp_reclen,
+ tcp_offset;
+ unsigned long tcp_copied,
+ tcp_flags;
+
+ unsigned long connect_timeout,
+ bind_timeout,
+ reestablish_timeout;
+ struct work_struct connect_worker;
+ unsigned short port;
+
+ struct work_struct task_cleanup;
+ struct timer_list timer;
+ unsigned long last_used,
+ idle_timeout;
+
+ spinlock_t transport_lock;
+ spinlock_t reserve_lock;
+ struct rpc_task * snd_task;
+
+ struct list_head recv;
+
+ struct {
+ unsigned long bind_count,
+ connect_count,
+ connect_start,
+ connect_time,
+ sends,
+ recvs,
+ bad_xids;
+
+ unsigned long long req_u,
+ bklog_u;
+ } stat;
+
+ void (*old_data_ready)(struct sock *, int);
+ void (*old_state_change)(struct sock *);
+ void (*old_write_space)(struct sock *);
+};
+
+#define XPRT_LAST_FRAG (1 << 0)
+#define XPRT_COPY_RECM (1 << 1)
+#define XPRT_COPY_XID (1 << 2)
+#define XPRT_COPY_DATA (1 << 3)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/swap.h b/6/platforms/android-3/arch-arm/usr/include/linux/swap.h
new file mode 100644
index 0000000..63ba556
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/swap.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SWAP_H
+#define _LINUX_SWAP_H
+
+#include <linux/spinlock.h>
+#include <linux/linkage.h>
+#include <linux/mmzone.h>
+#include <linux/list.h>
+#include <linux/sched.h>
+
+#include <asm/atomic.h>
+#include <asm/page.h>
+
+#define SWAP_FLAG_PREFER 0x8000
+#define SWAP_FLAG_PRIO_MASK 0x7fff
+#define SWAP_FLAG_PRIO_SHIFT 0
+
+#define MAX_SWAPFILES_SHIFT 5
+#define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT)
+
+typedef struct {
+ unsigned long val;
+} swp_entry_t;
+
+struct reclaim_state {
+ unsigned long reclaimed_slab;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sysctl.h b/6/platforms/android-3/arch-arm/usr/include/linux/sysctl.h
new file mode 100644
index 0000000..329e561
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sysctl.h
@@ -0,0 +1,824 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SYSCTL_H
+#define _LINUX_SYSCTL_H
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+struct file;
+struct completion;
+
+#define CTL_MAXNAME 10
+
+struct __sysctl_args {
+ int __user *name;
+ int nlen;
+ void __user *oldval;
+ size_t __user *oldlenp;
+ void __user *newval;
+ size_t newlen;
+ unsigned long __unused[4];
+};
+
+enum
+{
+ CTL_KERN=1,
+ CTL_VM=2,
+ CTL_NET=3,
+
+ CTL_FS=5,
+ CTL_DEBUG=6,
+ CTL_DEV=7,
+ CTL_BUS=8,
+ CTL_ABI=9,
+ CTL_CPU=10
+};
+
+enum
+{
+ CTL_BUS_ISA=1
+};
+
+enum
+{
+ INOTIFY_MAX_USER_INSTANCES=1,
+ INOTIFY_MAX_USER_WATCHES=2,
+ INOTIFY_MAX_QUEUED_EVENTS=3
+};
+
+enum
+{
+ KERN_OSTYPE=1,
+ KERN_OSRELEASE=2,
+ KERN_OSREV=3,
+ KERN_VERSION=4,
+ KERN_SECUREMASK=5,
+ KERN_PROF=6,
+ KERN_NODENAME=7,
+ KERN_DOMAINNAME=8,
+
+ KERN_CAP_BSET=14,
+ KERN_PANIC=15,
+ KERN_REALROOTDEV=16,
+
+ KERN_SPARC_REBOOT=21,
+ KERN_CTLALTDEL=22,
+ KERN_PRINTK=23,
+ KERN_NAMETRANS=24,
+ KERN_PPC_HTABRECLAIM=25,
+ KERN_PPC_ZEROPAGED=26,
+ KERN_PPC_POWERSAVE_NAP=27,
+ KERN_MODPROBE=28,
+ KERN_SG_BIG_BUFF=29,
+ KERN_ACCT=30,
+ KERN_PPC_L2CR=31,
+
+ KERN_RTSIGNR=32,
+ KERN_RTSIGMAX=33,
+
+ KERN_SHMMAX=34,
+ KERN_MSGMAX=35,
+ KERN_MSGMNB=36,
+ KERN_MSGPOOL=37,
+ KERN_SYSRQ=38,
+ KERN_MAX_THREADS=39,
+ KERN_RANDOM=40,
+ KERN_SHMALL=41,
+ KERN_MSGMNI=42,
+ KERN_SEM=43,
+ KERN_SPARC_STOP_A=44,
+ KERN_SHMMNI=45,
+ KERN_OVERFLOWUID=46,
+ KERN_OVERFLOWGID=47,
+ KERN_SHMPATH=48,
+ KERN_HOTPLUG=49,
+ KERN_IEEE_EMULATION_WARNINGS=50,
+ KERN_S390_USER_DEBUG_LOGGING=51,
+ KERN_CORE_USES_PID=52,
+ KERN_TAINTED=53,
+ KERN_CADPID=54,
+ KERN_PIDMAX=55,
+ KERN_CORE_PATTERN=56,
+ KERN_PANIC_ON_OOPS=57,
+ KERN_HPPA_PWRSW=58,
+ KERN_HPPA_UNALIGNED=59,
+ KERN_PRINTK_RATELIMIT=60,
+ KERN_PRINTK_RATELIMIT_BURST=61,
+ KERN_PTY=62,
+ KERN_NGROUPS_MAX=63,
+ KERN_SPARC_SCONS_PWROFF=64,
+ KERN_HZ_TIMER=65,
+ KERN_UNKNOWN_NMI_PANIC=66,
+ KERN_BOOTLOADER_TYPE=67,
+ KERN_RANDOMIZE=68,
+ KERN_SETUID_DUMPABLE=69,
+ KERN_SPIN_RETRY=70,
+ KERN_ACPI_VIDEO_FLAGS=71,
+ KERN_IA64_UNALIGNED=72,
+ KERN_COMPAT_LOG=73,
+ KERN_MAX_LOCK_DEPTH=74,
+};
+
+enum
+{
+ VM_UNUSED1=1,
+ VM_UNUSED2=2,
+ VM_UNUSED3=3,
+ VM_UNUSED4=4,
+ VM_OVERCOMMIT_MEMORY=5,
+ VM_UNUSED5=6,
+ VM_UNUSED7=7,
+ VM_UNUSED8=8,
+ VM_UNUSED9=9,
+ VM_PAGE_CLUSTER=10,
+ VM_DIRTY_BACKGROUND=11,
+ VM_DIRTY_RATIO=12,
+ VM_DIRTY_WB_CS=13,
+ VM_DIRTY_EXPIRE_CS=14,
+ VM_NR_PDFLUSH_THREADS=15,
+ VM_OVERCOMMIT_RATIO=16,
+ VM_PAGEBUF=17,
+ VM_HUGETLB_PAGES=18,
+ VM_SWAPPINESS=19,
+ VM_LOWMEM_RESERVE_RATIO=20,
+ VM_MIN_FREE_KBYTES=21,
+ VM_MAX_MAP_COUNT=22,
+ VM_LAPTOP_MODE=23,
+ VM_BLOCK_DUMP=24,
+ VM_HUGETLB_GROUP=25,
+ VM_VFS_CACHE_PRESSURE=26,
+ VM_LEGACY_VA_LAYOUT=27,
+ VM_SWAP_TOKEN_TIMEOUT=28,
+ VM_DROP_PAGECACHE=29,
+ VM_PERCPU_PAGELIST_FRACTION=30,
+ VM_ZONE_RECLAIM_MODE=31,
+ VM_MIN_UNMAPPED=32,
+ VM_PANIC_ON_OOM=33,
+ VM_VDSO_ENABLED=34,
+};
+
+enum
+{
+ NET_CORE=1,
+ NET_ETHER=2,
+ NET_802=3,
+ NET_UNIX=4,
+ NET_IPV4=5,
+ NET_IPX=6,
+ NET_ATALK=7,
+ NET_NETROM=8,
+ NET_AX25=9,
+ NET_BRIDGE=10,
+ NET_ROSE=11,
+ NET_IPV6=12,
+ NET_X25=13,
+ NET_TR=14,
+ NET_DECNET=15,
+ NET_ECONET=16,
+ NET_SCTP=17,
+ NET_LLC=18,
+ NET_NETFILTER=19,
+ NET_DCCP=20,
+};
+
+enum
+{
+ RANDOM_POOLSIZE=1,
+ RANDOM_ENTROPY_COUNT=2,
+ RANDOM_READ_THRESH=3,
+ RANDOM_WRITE_THRESH=4,
+ RANDOM_BOOT_ID=5,
+ RANDOM_UUID=6
+};
+
+enum
+{
+ PTY_MAX=1,
+ PTY_NR=2
+};
+
+enum
+{
+ BUS_ISA_MEM_BASE=1,
+ BUS_ISA_PORT_BASE=2,
+ BUS_ISA_PORT_SHIFT=3
+};
+
+enum
+{
+ NET_CORE_WMEM_MAX=1,
+ NET_CORE_RMEM_MAX=2,
+ NET_CORE_WMEM_DEFAULT=3,
+ NET_CORE_RMEM_DEFAULT=4,
+
+ NET_CORE_MAX_BACKLOG=6,
+ NET_CORE_FASTROUTE=7,
+ NET_CORE_MSG_COST=8,
+ NET_CORE_MSG_BURST=9,
+ NET_CORE_OPTMEM_MAX=10,
+ NET_CORE_HOT_LIST_LENGTH=11,
+ NET_CORE_DIVERT_VERSION=12,
+ NET_CORE_NO_CONG_THRESH=13,
+ NET_CORE_NO_CONG=14,
+ NET_CORE_LO_CONG=15,
+ NET_CORE_MOD_CONG=16,
+ NET_CORE_DEV_WEIGHT=17,
+ NET_CORE_SOMAXCONN=18,
+ NET_CORE_BUDGET=19,
+ NET_CORE_AEVENT_ETIME=20,
+ NET_CORE_AEVENT_RSEQTH=21,
+};
+
+enum
+{
+ NET_UNIX_DESTROY_DELAY=1,
+ NET_UNIX_DELETE_DELAY=2,
+ NET_UNIX_MAX_DGRAM_QLEN=3,
+};
+
+enum
+{
+ NET_NF_CONNTRACK_MAX=1,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
+ NET_NF_CONNTRACK_UDP_TIMEOUT=10,
+ NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
+ NET_NF_CONNTRACK_ICMP_TIMEOUT=12,
+ NET_NF_CONNTRACK_GENERIC_TIMEOUT=13,
+ NET_NF_CONNTRACK_BUCKETS=14,
+ NET_NF_CONNTRACK_LOG_INVALID=15,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
+ NET_NF_CONNTRACK_TCP_LOOSE=17,
+ NET_NF_CONNTRACK_TCP_BE_LIBERAL=18,
+ NET_NF_CONNTRACK_TCP_MAX_RETRANS=19,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
+ NET_NF_CONNTRACK_COUNT=27,
+ NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28,
+ NET_NF_CONNTRACK_FRAG6_TIMEOUT=29,
+ NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30,
+ NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31,
+ NET_NF_CONNTRACK_CHECKSUM=32,
+};
+
+enum
+{
+
+ NET_IPV4_FORWARD=8,
+ NET_IPV4_DYNADDR=9,
+
+ NET_IPV4_CONF=16,
+ NET_IPV4_NEIGH=17,
+ NET_IPV4_ROUTE=18,
+ NET_IPV4_FIB_HASH=19,
+ NET_IPV4_NETFILTER=20,
+
+ NET_IPV4_TCP_TIMESTAMPS=33,
+ NET_IPV4_TCP_WINDOW_SCALING=34,
+ NET_IPV4_TCP_SACK=35,
+ NET_IPV4_TCP_RETRANS_COLLAPSE=36,
+ NET_IPV4_DEFAULT_TTL=37,
+ NET_IPV4_AUTOCONFIG=38,
+ NET_IPV4_NO_PMTU_DISC=39,
+ NET_IPV4_TCP_SYN_RETRIES=40,
+ NET_IPV4_IPFRAG_HIGH_THRESH=41,
+ NET_IPV4_IPFRAG_LOW_THRESH=42,
+ NET_IPV4_IPFRAG_TIME=43,
+ NET_IPV4_TCP_MAX_KA_PROBES=44,
+ NET_IPV4_TCP_KEEPALIVE_TIME=45,
+ NET_IPV4_TCP_KEEPALIVE_PROBES=46,
+ NET_IPV4_TCP_RETRIES1=47,
+ NET_IPV4_TCP_RETRIES2=48,
+ NET_IPV4_TCP_FIN_TIMEOUT=49,
+ NET_IPV4_IP_MASQ_DEBUG=50,
+ NET_TCP_SYNCOOKIES=51,
+ NET_TCP_STDURG=52,
+ NET_TCP_RFC1337=53,
+ NET_TCP_SYN_TAILDROP=54,
+ NET_TCP_MAX_SYN_BACKLOG=55,
+ NET_IPV4_LOCAL_PORT_RANGE=56,
+ NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
+ NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
+ NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
+ NET_IPV4_ICMP_DESTUNREACH_RATE=60,
+ NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
+ NET_IPV4_ICMP_PARAMPROB_RATE=62,
+ NET_IPV4_ICMP_ECHOREPLY_RATE=63,
+ NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
+ NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
+ NET_TCP_TW_RECYCLE=66,
+ NET_IPV4_ALWAYS_DEFRAG=67,
+ NET_IPV4_TCP_KEEPALIVE_INTVL=68,
+ NET_IPV4_INET_PEER_THRESHOLD=69,
+ NET_IPV4_INET_PEER_MINTTL=70,
+ NET_IPV4_INET_PEER_MAXTTL=71,
+ NET_IPV4_INET_PEER_GC_MINTIME=72,
+ NET_IPV4_INET_PEER_GC_MAXTIME=73,
+ NET_TCP_ORPHAN_RETRIES=74,
+ NET_TCP_ABORT_ON_OVERFLOW=75,
+ NET_TCP_SYNACK_RETRIES=76,
+ NET_TCP_MAX_ORPHANS=77,
+ NET_TCP_MAX_TW_BUCKETS=78,
+ NET_TCP_FACK=79,
+ NET_TCP_REORDERING=80,
+ NET_TCP_ECN=81,
+ NET_TCP_DSACK=82,
+ NET_TCP_MEM=83,
+ NET_TCP_WMEM=84,
+ NET_TCP_RMEM=85,
+ NET_TCP_APP_WIN=86,
+ NET_TCP_ADV_WIN_SCALE=87,
+ NET_IPV4_NONLOCAL_BIND=88,
+ NET_IPV4_ICMP_RATELIMIT=89,
+ NET_IPV4_ICMP_RATEMASK=90,
+ NET_TCP_TW_REUSE=91,
+ NET_TCP_FRTO=92,
+ NET_TCP_LOW_LATENCY=93,
+ NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
+ NET_IPV4_IGMP_MAX_MSF=96,
+ NET_TCP_NO_METRICS_SAVE=97,
+ NET_TCP_DEFAULT_WIN_SCALE=105,
+ NET_TCP_MODERATE_RCVBUF=106,
+ NET_TCP_TSO_WIN_DIVISOR=107,
+ NET_TCP_BIC_BETA=108,
+ NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
+ NET_TCP_CONG_CONTROL=110,
+ NET_TCP_ABC=111,
+ NET_IPV4_IPFRAG_MAX_DIST=112,
+ NET_TCP_MTU_PROBING=113,
+ NET_TCP_BASE_MSS=114,
+ NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
+ NET_TCP_DMA_COPYBREAK=116,
+ NET_TCP_SLOW_START_AFTER_IDLE=117,
+};
+
+enum {
+ NET_IPV4_ROUTE_FLUSH=1,
+ NET_IPV4_ROUTE_MIN_DELAY=2,
+ NET_IPV4_ROUTE_MAX_DELAY=3,
+ NET_IPV4_ROUTE_GC_THRESH=4,
+ NET_IPV4_ROUTE_MAX_SIZE=5,
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
+ NET_IPV4_ROUTE_GC_TIMEOUT=7,
+ NET_IPV4_ROUTE_GC_INTERVAL=8,
+ NET_IPV4_ROUTE_REDIRECT_LOAD=9,
+ NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
+ NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
+ NET_IPV4_ROUTE_ERROR_COST=12,
+ NET_IPV4_ROUTE_ERROR_BURST=13,
+ NET_IPV4_ROUTE_GC_ELASTICITY=14,
+ NET_IPV4_ROUTE_MTU_EXPIRES=15,
+ NET_IPV4_ROUTE_MIN_PMTU=16,
+ NET_IPV4_ROUTE_MIN_ADVMSS=17,
+ NET_IPV4_ROUTE_SECRET_INTERVAL=18,
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
+};
+
+enum
+{
+ NET_PROTO_CONF_ALL=-2,
+ NET_PROTO_CONF_DEFAULT=-3
+
+};
+
+enum
+{
+ NET_IPV4_CONF_FORWARDING=1,
+ NET_IPV4_CONF_MC_FORWARDING=2,
+ NET_IPV4_CONF_PROXY_ARP=3,
+ NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
+ NET_IPV4_CONF_SECURE_REDIRECTS=5,
+ NET_IPV4_CONF_SEND_REDIRECTS=6,
+ NET_IPV4_CONF_SHARED_MEDIA=7,
+ NET_IPV4_CONF_RP_FILTER=8,
+ NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
+ NET_IPV4_CONF_BOOTP_RELAY=10,
+ NET_IPV4_CONF_LOG_MARTIANS=11,
+ NET_IPV4_CONF_TAG=12,
+ NET_IPV4_CONF_ARPFILTER=13,
+ NET_IPV4_CONF_MEDIUM_ID=14,
+ NET_IPV4_CONF_NOXFRM=15,
+ NET_IPV4_CONF_NOPOLICY=16,
+ NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
+ NET_IPV4_CONF_ARP_ANNOUNCE=18,
+ NET_IPV4_CONF_ARP_IGNORE=19,
+ NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
+ NET_IPV4_CONF_ARP_ACCEPT=21,
+ __NET_IPV4_CONF_MAX
+};
+
+enum
+{
+ NET_IPV4_NF_CONNTRACK_MAX=1,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
+ NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10,
+ NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
+ NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
+ NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
+ NET_IPV4_NF_CONNTRACK_BUCKETS=14,
+ NET_IPV4_NF_CONNTRACK_LOG_INVALID=15,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
+ NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17,
+ NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18,
+ NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
+ NET_IPV4_NF_CONNTRACK_COUNT=27,
+ NET_IPV4_NF_CONNTRACK_CHECKSUM=28,
+};
+
+enum {
+ NET_IPV6_CONF=16,
+ NET_IPV6_NEIGH=17,
+ NET_IPV6_ROUTE=18,
+ NET_IPV6_ICMP=19,
+ NET_IPV6_BINDV6ONLY=20,
+ NET_IPV6_IP6FRAG_HIGH_THRESH=21,
+ NET_IPV6_IP6FRAG_LOW_THRESH=22,
+ NET_IPV6_IP6FRAG_TIME=23,
+ NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
+ NET_IPV6_MLD_MAX_MSF=25,
+};
+
+enum {
+ NET_IPV6_ROUTE_FLUSH=1,
+ NET_IPV6_ROUTE_GC_THRESH=2,
+ NET_IPV6_ROUTE_MAX_SIZE=3,
+ NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
+ NET_IPV6_ROUTE_GC_TIMEOUT=5,
+ NET_IPV6_ROUTE_GC_INTERVAL=6,
+ NET_IPV6_ROUTE_GC_ELASTICITY=7,
+ NET_IPV6_ROUTE_MTU_EXPIRES=8,
+ NET_IPV6_ROUTE_MIN_ADVMSS=9,
+ NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10
+};
+
+enum {
+ NET_IPV6_FORWARDING=1,
+ NET_IPV6_HOP_LIMIT=2,
+ NET_IPV6_MTU=3,
+ NET_IPV6_ACCEPT_RA=4,
+ NET_IPV6_ACCEPT_REDIRECTS=5,
+ NET_IPV6_AUTOCONF=6,
+ NET_IPV6_DAD_TRANSMITS=7,
+ NET_IPV6_RTR_SOLICITS=8,
+ NET_IPV6_RTR_SOLICIT_INTERVAL=9,
+ NET_IPV6_RTR_SOLICIT_DELAY=10,
+ NET_IPV6_USE_TEMPADDR=11,
+ NET_IPV6_TEMP_VALID_LFT=12,
+ NET_IPV6_TEMP_PREFERED_LFT=13,
+ NET_IPV6_REGEN_MAX_RETRY=14,
+ NET_IPV6_MAX_DESYNC_FACTOR=15,
+ NET_IPV6_MAX_ADDRESSES=16,
+ NET_IPV6_FORCE_MLD_VERSION=17,
+ NET_IPV6_ACCEPT_RA_DEFRTR=18,
+ NET_IPV6_ACCEPT_RA_PINFO=19,
+ NET_IPV6_ACCEPT_RA_RTR_PREF=20,
+ NET_IPV6_RTR_PROBE_INTERVAL=21,
+ NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
+ __NET_IPV6_MAX
+};
+
+enum {
+ NET_IPV6_ICMP_RATELIMIT=1
+};
+
+enum {
+ NET_NEIGH_MCAST_SOLICIT=1,
+ NET_NEIGH_UCAST_SOLICIT=2,
+ NET_NEIGH_APP_SOLICIT=3,
+ NET_NEIGH_RETRANS_TIME=4,
+ NET_NEIGH_REACHABLE_TIME=5,
+ NET_NEIGH_DELAY_PROBE_TIME=6,
+ NET_NEIGH_GC_STALE_TIME=7,
+ NET_NEIGH_UNRES_QLEN=8,
+ NET_NEIGH_PROXY_QLEN=9,
+ NET_NEIGH_ANYCAST_DELAY=10,
+ NET_NEIGH_PROXY_DELAY=11,
+ NET_NEIGH_LOCKTIME=12,
+ NET_NEIGH_GC_INTERVAL=13,
+ NET_NEIGH_GC_THRESH1=14,
+ NET_NEIGH_GC_THRESH2=15,
+ NET_NEIGH_GC_THRESH3=16,
+ NET_NEIGH_RETRANS_TIME_MS=17,
+ NET_NEIGH_REACHABLE_TIME_MS=18,
+ __NET_NEIGH_MAX
+};
+
+enum {
+ NET_DCCP_DEFAULT=1,
+};
+
+enum {
+ NET_DCCP_DEFAULT_SEQ_WINDOW = 1,
+ NET_DCCP_DEFAULT_RX_CCID = 2,
+ NET_DCCP_DEFAULT_TX_CCID = 3,
+ NET_DCCP_DEFAULT_ACK_RATIO = 4,
+ NET_DCCP_DEFAULT_SEND_ACKVEC = 5,
+ NET_DCCP_DEFAULT_SEND_NDP = 6,
+};
+
+enum {
+ NET_IPX_PPROP_BROADCASTING=1,
+ NET_IPX_FORWARDING=2
+};
+
+enum {
+ NET_LLC2=1,
+ NET_LLC_STATION=2,
+};
+
+enum {
+ NET_LLC2_TIMEOUT=1,
+};
+
+enum {
+ NET_LLC_STATION_ACK_TIMEOUT=1,
+};
+
+enum {
+ NET_LLC2_ACK_TIMEOUT=1,
+ NET_LLC2_P_TIMEOUT=2,
+ NET_LLC2_REJ_TIMEOUT=3,
+ NET_LLC2_BUSY_TIMEOUT=4,
+};
+
+enum {
+ NET_ATALK_AARP_EXPIRY_TIME=1,
+ NET_ATALK_AARP_TICK_TIME=2,
+ NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
+ NET_ATALK_AARP_RESOLVE_TIME=4
+};
+
+enum {
+ NET_NETROM_DEFAULT_PATH_QUALITY=1,
+ NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
+ NET_NETROM_NETWORK_TTL_INITIALISER=3,
+ NET_NETROM_TRANSPORT_TIMEOUT=4,
+ NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
+ NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
+ NET_NETROM_TRANSPORT_BUSY_DELAY=7,
+ NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
+ NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
+ NET_NETROM_ROUTING_CONTROL=10,
+ NET_NETROM_LINK_FAILS_COUNT=11,
+ NET_NETROM_RESET=12
+};
+
+enum {
+ NET_AX25_IP_DEFAULT_MODE=1,
+ NET_AX25_DEFAULT_MODE=2,
+ NET_AX25_BACKOFF_TYPE=3,
+ NET_AX25_CONNECT_MODE=4,
+ NET_AX25_STANDARD_WINDOW=5,
+ NET_AX25_EXTENDED_WINDOW=6,
+ NET_AX25_T1_TIMEOUT=7,
+ NET_AX25_T2_TIMEOUT=8,
+ NET_AX25_T3_TIMEOUT=9,
+ NET_AX25_IDLE_TIMEOUT=10,
+ NET_AX25_N2=11,
+ NET_AX25_PACLEN=12,
+ NET_AX25_PROTOCOL=13,
+ NET_AX25_DAMA_SLAVE_TIMEOUT=14
+};
+
+enum {
+ NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
+ NET_ROSE_CALL_REQUEST_TIMEOUT=2,
+ NET_ROSE_RESET_REQUEST_TIMEOUT=3,
+ NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
+ NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
+ NET_ROSE_ROUTING_CONTROL=6,
+ NET_ROSE_LINK_FAIL_TIMEOUT=7,
+ NET_ROSE_MAX_VCS=8,
+ NET_ROSE_WINDOW_SIZE=9,
+ NET_ROSE_NO_ACTIVITY_TIMEOUT=10
+};
+
+enum {
+ NET_X25_RESTART_REQUEST_TIMEOUT=1,
+ NET_X25_CALL_REQUEST_TIMEOUT=2,
+ NET_X25_RESET_REQUEST_TIMEOUT=3,
+ NET_X25_CLEAR_REQUEST_TIMEOUT=4,
+ NET_X25_ACK_HOLD_BACK_TIMEOUT=5
+};
+
+enum
+{
+ NET_TR_RIF_TIMEOUT=1
+};
+
+enum {
+ NET_DECNET_NODE_TYPE = 1,
+ NET_DECNET_NODE_ADDRESS = 2,
+ NET_DECNET_NODE_NAME = 3,
+ NET_DECNET_DEFAULT_DEVICE = 4,
+ NET_DECNET_TIME_WAIT = 5,
+ NET_DECNET_DN_COUNT = 6,
+ NET_DECNET_DI_COUNT = 7,
+ NET_DECNET_DR_COUNT = 8,
+ NET_DECNET_DST_GC_INTERVAL = 9,
+ NET_DECNET_CONF = 10,
+ NET_DECNET_NO_FC_MAX_CWND = 11,
+ NET_DECNET_MEM = 12,
+ NET_DECNET_RMEM = 13,
+ NET_DECNET_WMEM = 14,
+ NET_DECNET_DEBUG_LEVEL = 255
+};
+
+enum {
+ NET_DECNET_CONF_LOOPBACK = -2,
+ NET_DECNET_CONF_DDCMP = -3,
+ NET_DECNET_CONF_PPP = -4,
+ NET_DECNET_CONF_X25 = -5,
+ NET_DECNET_CONF_GRE = -6,
+ NET_DECNET_CONF_ETHER = -7
+
+};
+
+enum {
+ NET_DECNET_CONF_DEV_PRIORITY = 1,
+ NET_DECNET_CONF_DEV_T1 = 2,
+ NET_DECNET_CONF_DEV_T2 = 3,
+ NET_DECNET_CONF_DEV_T3 = 4,
+ NET_DECNET_CONF_DEV_FORWARDING = 5,
+ NET_DECNET_CONF_DEV_BLKSIZE = 6,
+ NET_DECNET_CONF_DEV_STATE = 7
+};
+
+enum {
+ NET_SCTP_RTO_INITIAL = 1,
+ NET_SCTP_RTO_MIN = 2,
+ NET_SCTP_RTO_MAX = 3,
+ NET_SCTP_RTO_ALPHA = 4,
+ NET_SCTP_RTO_BETA = 5,
+ NET_SCTP_VALID_COOKIE_LIFE = 6,
+ NET_SCTP_ASSOCIATION_MAX_RETRANS = 7,
+ NET_SCTP_PATH_MAX_RETRANS = 8,
+ NET_SCTP_MAX_INIT_RETRANSMITS = 9,
+ NET_SCTP_HB_INTERVAL = 10,
+ NET_SCTP_PRESERVE_ENABLE = 11,
+ NET_SCTP_MAX_BURST = 12,
+ NET_SCTP_ADDIP_ENABLE = 13,
+ NET_SCTP_PRSCTP_ENABLE = 14,
+ NET_SCTP_SNDBUF_POLICY = 15,
+ NET_SCTP_SACK_TIMEOUT = 16,
+ NET_SCTP_RCVBUF_POLICY = 17,
+};
+
+enum {
+ NET_BRIDGE_NF_CALL_ARPTABLES = 1,
+ NET_BRIDGE_NF_CALL_IPTABLES = 2,
+ NET_BRIDGE_NF_CALL_IP6TABLES = 3,
+ NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
+};
+
+enum
+{
+ FS_NRINODE=1,
+ FS_STATINODE=2,
+ FS_MAXINODE=3,
+ FS_NRDQUOT=4,
+ FS_MAXDQUOT=5,
+ FS_NRFILE=6,
+ FS_MAXFILE=7,
+ FS_DENTRY=8,
+ FS_NRSUPER=9,
+ FS_MAXSUPER=10,
+ FS_OVERFLOWUID=11,
+ FS_OVERFLOWGID=12,
+ FS_LEASES=13,
+ FS_DIR_NOTIFY=14,
+ FS_LEASE_TIME=15,
+ FS_DQSTATS=16,
+ FS_XFS=17,
+ FS_AIO_NR=18,
+ FS_AIO_MAX_NR=19,
+ FS_INOTIFY=20,
+};
+
+enum {
+ FS_DQ_LOOKUPS = 1,
+ FS_DQ_DROPS = 2,
+ FS_DQ_READS = 3,
+ FS_DQ_WRITES = 4,
+ FS_DQ_CACHE_HITS = 5,
+ FS_DQ_ALLOCATED = 6,
+ FS_DQ_FREE = 7,
+ FS_DQ_SYNCS = 8,
+ FS_DQ_WARNINGS = 9,
+};
+
+enum {
+ DEV_CDROM=1,
+ DEV_HWMON=2,
+ DEV_PARPORT=3,
+ DEV_RAID=4,
+ DEV_MAC_HID=5,
+ DEV_SCSI=6,
+ DEV_IPMI=7,
+};
+
+enum {
+ DEV_CDROM_INFO=1,
+ DEV_CDROM_AUTOCLOSE=2,
+ DEV_CDROM_AUTOEJECT=3,
+ DEV_CDROM_DEBUG=4,
+ DEV_CDROM_LOCK=5,
+ DEV_CDROM_CHECK_MEDIA=6
+};
+
+enum {
+ DEV_PARPORT_DEFAULT=-3
+};
+
+enum {
+ DEV_RAID_SPEED_LIMIT_MIN=1,
+ DEV_RAID_SPEED_LIMIT_MAX=2
+};
+
+enum {
+ DEV_PARPORT_DEFAULT_TIMESLICE=1,
+ DEV_PARPORT_DEFAULT_SPINTIME=2
+};
+
+enum {
+ DEV_PARPORT_SPINTIME=1,
+ DEV_PARPORT_BASE_ADDR=2,
+ DEV_PARPORT_IRQ=3,
+ DEV_PARPORT_DMA=4,
+ DEV_PARPORT_MODES=5,
+ DEV_PARPORT_DEVICES=6,
+ DEV_PARPORT_AUTOPROBE=16
+};
+
+enum {
+ DEV_PARPORT_DEVICES_ACTIVE=-3,
+};
+
+enum {
+ DEV_PARPORT_DEVICE_TIMESLICE=1,
+};
+
+enum {
+ DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1,
+ DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2,
+ DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3,
+ DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4,
+ DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5,
+ DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6
+};
+
+enum {
+ DEV_SCSI_LOGGING_LEVEL=1,
+};
+
+enum {
+ DEV_IPMI_POWEROFF_POWERCYCLE=1,
+};
+
+enum
+{
+ ABI_DEFHANDLER_COFF=1,
+ ABI_DEFHANDLER_ELF=2,
+ ABI_DEFHANDLER_LCALL7=3,
+ ABI_DEFHANDLER_LIBCSO=4,
+ ABI_TRACE=5,
+ ABI_FAKE_UTSNAME=6,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sysdev.h b/6/platforms/android-3/arch-arm/usr/include/linux/sysdev.h
new file mode 100644
index 0000000..6ae2b26
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sysdev.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SYSDEV_H_
+#define _SYSDEV_H_
+
+#include <linux/kobject.h>
+#include <linux/pm.h>
+
+struct sys_device;
+
+struct sysdev_class {
+ struct list_head drivers;
+
+ int (*shutdown)(struct sys_device *);
+ int (*suspend)(struct sys_device *, pm_message_t state);
+ int (*resume)(struct sys_device *);
+ struct kset kset;
+};
+
+struct sysdev_class_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct sysdev_class *, char *);
+ ssize_t (*store)(struct sysdev_class *, const char *, size_t);
+};
+
+#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
+
+struct sysdev_driver {
+ struct list_head entry;
+ int (*add)(struct sys_device *);
+ int (*remove)(struct sys_device *);
+ int (*shutdown)(struct sys_device *);
+ int (*suspend)(struct sys_device *, pm_message_t state);
+ int (*resume)(struct sys_device *);
+};
+
+struct sys_device {
+ u32 id;
+ struct sysdev_class * cls;
+ struct kobject kobj;
+};
+
+struct sysdev_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct sys_device *, char *);
+ ssize_t (*store)(struct sys_device *, const char *, size_t);
+};
+
+#define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/sysfs.h b/6/platforms/android-3/arch-arm/usr/include/linux/sysfs.h
new file mode 100644
index 0000000..00b5f5a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/sysfs.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SYSFS_H_
+#define _SYSFS_H_
+
+#include <asm/atomic.h>
+
+struct kobject;
+struct module;
+
+struct attribute {
+ const char * name;
+ struct module * owner;
+ mode_t mode;
+};
+
+struct attribute_group {
+ const char * name;
+ struct attribute ** attrs;
+};
+
+#define __ATTR(_name,_mode,_show,_store) { .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, .show = _show, .store = _store, }
+
+#define __ATTR_RO(_name) { .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, .show = _name##_show, }
+
+#define __ATTR_NULL { .attr = { .name = NULL } }
+
+#define attr_name(_attr) (_attr).attr.name
+
+struct vm_area_struct;
+
+struct bin_attribute {
+ struct attribute attr;
+ size_t size;
+ void *private;
+ ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
+ ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
+ int (*mmap)(struct kobject *, struct bin_attribute *attr,
+ struct vm_area_struct *vma);
+};
+
+struct sysfs_ops {
+ ssize_t (*show)(struct kobject *, struct attribute *,char *);
+ ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
+};
+
+struct sysfs_dirent {
+ atomic_t s_count;
+ struct list_head s_sibling;
+ struct list_head s_children;
+ void * s_element;
+ int s_type;
+ umode_t s_mode;
+ struct dentry * s_dentry;
+ struct iattr * s_iattr;
+ atomic_t s_event;
+};
+
+#define SYSFS_ROOT 0x0001
+#define SYSFS_DIR 0x0002
+#define SYSFS_KOBJ_ATTR 0x0004
+#define SYSFS_KOBJ_BIN_ATTR 0x0008
+#define SYSFS_KOBJ_DEVICE 0x0010
+#define SYSFS_KOBJ_LINK 0x0020
+#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_DEVICE | SYSFS_KOBJ_LINK)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/taskstats.h b/6/platforms/android-3/arch-arm/usr/include/linux/taskstats.h
new file mode 100644
index 0000000..3e8ae4a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/taskstats.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TASKSTATS_H
+#define _LINUX_TASKSTATS_H
+
+#define TASKSTATS_VERSION 1
+
+struct taskstats {
+
+ __u16 version;
+ __u16 padding[3];
+
+ __u64 cpu_count;
+ __u64 cpu_delay_total;
+
+ __u64 blkio_count;
+ __u64 blkio_delay_total;
+
+ __u64 swapin_count;
+ __u64 swapin_delay_total;
+
+ __u64 cpu_run_real_total;
+
+ __u64 cpu_run_virtual_total;
+
+};
+
+enum {
+ TASKSTATS_CMD_UNSPEC = 0,
+ TASKSTATS_CMD_GET,
+ TASKSTATS_CMD_NEW,
+ __TASKSTATS_CMD_MAX,
+};
+
+#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1)
+
+enum {
+ TASKSTATS_TYPE_UNSPEC = 0,
+ TASKSTATS_TYPE_PID,
+ TASKSTATS_TYPE_TGID,
+ TASKSTATS_TYPE_STATS,
+ TASKSTATS_TYPE_AGGR_PID,
+ TASKSTATS_TYPE_AGGR_TGID,
+ __TASKSTATS_TYPE_MAX,
+};
+
+#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1)
+
+enum {
+ TASKSTATS_CMD_ATTR_UNSPEC = 0,
+ TASKSTATS_CMD_ATTR_PID,
+ TASKSTATS_CMD_ATTR_TGID,
+ TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
+ TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
+ __TASKSTATS_CMD_ATTR_MAX,
+};
+
+#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1)
+
+#define TASKSTATS_GENL_NAME "TASKSTATS"
+#define TASKSTATS_GENL_VERSION 0x1
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/taskstats_kern.h b/6/platforms/android-3/arch-arm/usr/include/linux/taskstats_kern.h
new file mode 100644
index 0000000..4948410
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/taskstats_kern.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TASKSTATS_KERN_H
+#define _LINUX_TASKSTATS_KERN_H
+
+#include <linux/taskstats.h>
+#include <linux/sched.h>
+#include <net/genetlink.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/tcp.h b/6/platforms/android-3/arch-arm/usr/include/linux/tcp.h
new file mode 100644
index 0000000..3fa95f8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/tcp.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TCP_H
+#define _LINUX_TCP_H
+
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+struct tcphdr {
+ __u16 source;
+ __u16 dest;
+ __u32 seq;
+ __u32 ack_seq;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u16 res1:4,
+ doff:4,
+ fin:1,
+ syn:1,
+ rst:1,
+ psh:1,
+ ack:1,
+ urg:1,
+ ece:1,
+ cwr:1;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u16 doff:4,
+ res1:4,
+ cwr:1,
+ ece:1,
+ urg:1,
+ ack:1,
+ psh:1,
+ rst:1,
+ syn:1,
+ fin:1;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u16 window;
+ __u16 check;
+ __u16 urg_ptr;
+};
+
+union tcp_word_hdr {
+ struct tcphdr hdr;
+ __u32 words[5];
+};
+
+#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
+
+enum {
+ TCP_FLAG_CWR = __constant_htonl(0x00800000),
+ TCP_FLAG_ECE = __constant_htonl(0x00400000),
+ TCP_FLAG_URG = __constant_htonl(0x00200000),
+ TCP_FLAG_ACK = __constant_htonl(0x00100000),
+ TCP_FLAG_PSH = __constant_htonl(0x00080000),
+ TCP_FLAG_RST = __constant_htonl(0x00040000),
+ TCP_FLAG_SYN = __constant_htonl(0x00020000),
+ TCP_FLAG_FIN = __constant_htonl(0x00010000),
+ TCP_RESERVED_BITS = __constant_htonl(0x0F000000),
+ TCP_DATA_OFFSET = __constant_htonl(0xF0000000)
+};
+
+#define TCP_NODELAY 1
+#define TCP_MAXSEG 2
+#define TCP_CORK 3
+#define TCP_KEEPIDLE 4
+#define TCP_KEEPINTVL 5
+#define TCP_KEEPCNT 6
+#define TCP_SYNCNT 7
+#define TCP_LINGER2 8
+#define TCP_DEFER_ACCEPT 9
+#define TCP_WINDOW_CLAMP 10
+#define TCP_INFO 11
+#define TCP_QUICKACK 12
+#define TCP_CONGESTION 13
+
+#define TCPI_OPT_TIMESTAMPS 1
+#define TCPI_OPT_SACK 2
+#define TCPI_OPT_WSCALE 4
+#define TCPI_OPT_ECN 8
+
+enum tcp_ca_state
+{
+ TCP_CA_Open = 0,
+#define TCPF_CA_Open (1<<TCP_CA_Open)
+ TCP_CA_Disorder = 1,
+#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
+ TCP_CA_CWR = 2,
+#define TCPF_CA_CWR (1<<TCP_CA_CWR)
+ TCP_CA_Recovery = 3,
+#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
+ TCP_CA_Loss = 4
+#define TCPF_CA_Loss (1<<TCP_CA_Loss)
+};
+
+struct tcp_info
+{
+ __u8 tcpi_state;
+ __u8 tcpi_ca_state;
+ __u8 tcpi_retransmits;
+ __u8 tcpi_probes;
+ __u8 tcpi_backoff;
+ __u8 tcpi_options;
+ __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
+
+ __u32 tcpi_rto;
+ __u32 tcpi_ato;
+ __u32 tcpi_snd_mss;
+ __u32 tcpi_rcv_mss;
+
+ __u32 tcpi_unacked;
+ __u32 tcpi_sacked;
+ __u32 tcpi_lost;
+ __u32 tcpi_retrans;
+ __u32 tcpi_fackets;
+
+ __u32 tcpi_last_data_sent;
+ __u32 tcpi_last_ack_sent;
+ __u32 tcpi_last_data_recv;
+ __u32 tcpi_last_ack_recv;
+
+ __u32 tcpi_pmtu;
+ __u32 tcpi_rcv_ssthresh;
+ __u32 tcpi_rtt;
+ __u32 tcpi_rttvar;
+ __u32 tcpi_snd_ssthresh;
+ __u32 tcpi_snd_cwnd;
+ __u32 tcpi_advmss;
+ __u32 tcpi_reordering;
+
+ __u32 tcpi_rcv_rtt;
+ __u32 tcpi_rcv_space;
+
+ __u32 tcpi_total_retrans;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/telephony.h b/6/platforms/android-3/arch-arm/usr/include/linux/telephony.h
new file mode 100644
index 0000000..0c1d83d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/telephony.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef TELEPHONY_H
+#define TELEPHONY_H
+
+#define TELEPHONY_VERSION 3013
+
+#define PHONE_VENDOR_IXJ 1
+#define PHONE_VENDOR_QUICKNET PHONE_VENDOR_IXJ
+#define PHONE_VENDOR_VOICETRONIX 2
+#define PHONE_VENDOR_ACULAB 3
+#define PHONE_VENDOR_DIGI 4
+#define PHONE_VENDOR_FRANKLIN 5
+
+#define QTI_PHONEJACK 100
+#define QTI_LINEJACK 300
+#define QTI_PHONEJACK_LITE 400
+#define QTI_PHONEJACK_PCI 500
+#define QTI_PHONECARD 600
+
+typedef enum {
+ vendor = 0,
+ device,
+ port,
+ codec,
+ dsp
+} phone_cap;
+
+struct phone_capability {
+ char desc[80];
+ phone_cap captype;
+ int cap;
+ int handle;
+};
+
+typedef enum {
+ pots = 0,
+ pstn,
+ handset,
+ speaker
+} phone_ports;
+
+#define PHONE_CAPABILITIES _IO ('q', 0x80)
+#define PHONE_CAPABILITIES_LIST _IOR ('q', 0x81, struct phone_capability *)
+#define PHONE_CAPABILITIES_CHECK _IOW ('q', 0x82, struct phone_capability *)
+
+typedef struct {
+ char month[3];
+ char day[3];
+ char hour[3];
+ char min[3];
+ int numlen;
+ char number[11];
+ int namelen;
+ char name[80];
+} PHONE_CID;
+
+#define PHONE_RING _IO ('q', 0x83)
+#define PHONE_HOOKSTATE _IO ('q', 0x84)
+#define PHONE_MAXRINGS _IOW ('q', 0x85, char)
+#define PHONE_RING_CADENCE _IOW ('q', 0x86, short)
+#define OLD_PHONE_RING_START _IO ('q', 0x87)
+#define PHONE_RING_START _IOW ('q', 0x87, PHONE_CID *)
+#define PHONE_RING_STOP _IO ('q', 0x88)
+
+#define USA_RING_CADENCE 0xC0C0
+
+#define PHONE_REC_CODEC _IOW ('q', 0x89, int)
+#define PHONE_REC_START _IO ('q', 0x8A)
+#define PHONE_REC_STOP _IO ('q', 0x8B)
+#define PHONE_REC_DEPTH _IOW ('q', 0x8C, int)
+#define PHONE_FRAME _IOW ('q', 0x8D, int)
+#define PHONE_REC_VOLUME _IOW ('q', 0x8E, int)
+#define PHONE_REC_VOLUME_LINEAR _IOW ('q', 0xDB, int)
+#define PHONE_REC_LEVEL _IO ('q', 0x8F)
+
+#define PHONE_PLAY_CODEC _IOW ('q', 0x90, int)
+#define PHONE_PLAY_START _IO ('q', 0x91)
+#define PHONE_PLAY_STOP _IO ('q', 0x92)
+#define PHONE_PLAY_DEPTH _IOW ('q', 0x93, int)
+#define PHONE_PLAY_VOLUME _IOW ('q', 0x94, int)
+#define PHONE_PLAY_VOLUME_LINEAR _IOW ('q', 0xDC, int)
+#define PHONE_PLAY_LEVEL _IO ('q', 0x95)
+#define PHONE_DTMF_READY _IOR ('q', 0x96, int)
+#define PHONE_GET_DTMF _IOR ('q', 0x97, int)
+#define PHONE_GET_DTMF_ASCII _IOR ('q', 0x98, int)
+#define PHONE_DTMF_OOB _IOW ('q', 0x99, int)
+#define PHONE_EXCEPTION _IOR ('q', 0x9A, int)
+#define PHONE_PLAY_TONE _IOW ('q', 0x9B, char)
+#define PHONE_SET_TONE_ON_TIME _IOW ('q', 0x9C, int)
+#define PHONE_SET_TONE_OFF_TIME _IOW ('q', 0x9D, int)
+#define PHONE_GET_TONE_ON_TIME _IO ('q', 0x9E)
+#define PHONE_GET_TONE_OFF_TIME _IO ('q', 0x9F)
+#define PHONE_GET_TONE_STATE _IO ('q', 0xA0)
+#define PHONE_BUSY _IO ('q', 0xA1)
+#define PHONE_RINGBACK _IO ('q', 0xA2)
+#define PHONE_DIALTONE _IO ('q', 0xA3)
+#define PHONE_CPT_STOP _IO ('q', 0xA4)
+
+#define PHONE_PSTN_SET_STATE _IOW ('q', 0xA4, int)
+#define PHONE_PSTN_GET_STATE _IO ('q', 0xA5)
+
+#define PSTN_ON_HOOK 0
+#define PSTN_RINGING 1
+#define PSTN_OFF_HOOK 2
+#define PSTN_PULSE_DIAL 3
+
+#define PHONE_WINK_DURATION _IOW ('q', 0xA6, int)
+#define PHONE_WINK _IOW ('q', 0xAA, int)
+
+typedef enum {
+ G723_63 = 1,
+ G723_53 = 2,
+ TS85 = 3,
+ TS48 = 4,
+ TS41 = 5,
+ G728 = 6,
+ G729 = 7,
+ ULAW = 8,
+ ALAW = 9,
+ LINEAR16 = 10,
+ LINEAR8 = 11,
+ WSS = 12,
+ G729B = 13
+} phone_codec;
+
+struct phone_codec_data
+{
+ phone_codec type;
+ unsigned short buf_min, buf_opt, buf_max;
+};
+
+#define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *)
+#define PHONE_PSTN_LINETEST _IO ('q', 0xA8)
+
+#define PHONE_VAD _IOW ('q', 0xA9, int)
+
+struct phone_except
+{
+ unsigned int dtmf_ready:1;
+ unsigned int hookstate:1;
+ unsigned int pstn_ring:1;
+ unsigned int caller_id:1;
+ unsigned int pstn_wink:1;
+ unsigned int f0:1;
+ unsigned int f1:1;
+ unsigned int f2:1;
+ unsigned int f3:1;
+ unsigned int flash:1;
+ unsigned int fc0:1;
+ unsigned int fc1:1;
+ unsigned int fc2:1;
+ unsigned int fc3:1;
+ unsigned int reserved:18;
+};
+
+union telephony_exception {
+ struct phone_except bits;
+ unsigned int bytes;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/termios.h b/6/platforms/android-3/arch-arm/usr/include/linux/termios.h
new file mode 100644
index 0000000..e28439d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/termios.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TERMIOS_H
+#define _LINUX_TERMIOS_H
+
+#include <linux/types.h>
+#include <asm/termios.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/textsearch.h b/6/platforms/android-3/arch-arm/usr/include/linux/textsearch.h
new file mode 100644
index 0000000..a921cdd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/textsearch.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_TEXTSEARCH_H
+#define __LINUX_TEXTSEARCH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/thread_info.h b/6/platforms/android-3/arch-arm/usr/include/linux/thread_info.h
new file mode 100644
index 0000000..074a1f9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/thread_info.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_THREAD_INFO_H
+#define _LINUX_THREAD_INFO_H
+
+struct restart_block {
+ long (*fn)(struct restart_block *);
+ unsigned long arg0, arg1, arg2, arg3;
+};
+
+#include <linux/bitops.h>
+#include <asm/thread_info.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/threads.h b/6/platforms/android-3/arch-arm/usr/include/linux/threads.h
new file mode 100644
index 0000000..5d85878
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/threads.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_THREADS_H
+#define _LINUX_THREADS_H
+
+#define NR_CPUS 1
+
+#define MIN_THREADS_LEFT_FOR_ROOT 4
+
+#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
+
+#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/time.h b/6/platforms/android-3/arch-arm/usr/include/linux/time.h
new file mode 100644
index 0000000..3e6e440
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/time.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIME_H
+#define _LINUX_TIME_H
+
+#include <linux/types.h>
+
+#ifndef _STRUCT_TIMESPEC
+#define _STRUCT_TIMESPEC
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+struct timeval {
+ time_t tv_sec;
+ suseconds_t tv_usec;
+};
+
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+
+#define NFDBITS __NFDBITS
+
+#define FD_SETSIZE __FD_SETSIZE
+#define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
+#define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
+#define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
+#define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
+
+#define ITIMER_REAL 0
+#define ITIMER_VIRTUAL 1
+#define ITIMER_PROF 2
+
+struct itimerspec {
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+
+struct itimerval {
+ struct timeval it_interval;
+ struct timeval it_value;
+};
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+
+#define CLOCK_SGI_CYCLE 10
+#define MAX_CLOCKS 16
+#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
+#define CLOCKS_MONO CLOCK_MONOTONIC
+
+#define TIMER_ABSTIME 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/timer.h b/6/platforms/android-3/arch-arm/usr/include/linux/timer.h
new file mode 100644
index 0000000..071a759
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/timer.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMER_H
+#define _LINUX_TIMER_H
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/stddef.h>
+
+struct tvec_t_base_s;
+
+struct timer_list {
+ struct list_head entry;
+ unsigned long expires;
+
+ void (*function)(unsigned long);
+ unsigned long data;
+
+ struct tvec_t_base_s *base;
+};
+
+#define TIMER_INITIALIZER(_function, _expires, _data) { .function = (_function), .expires = (_expires), .data = (_data), .base = &boot_tvec_bases, }
+
+#define DEFINE_TIMER(_name, _function, _expires, _data) struct timer_list _name = TIMER_INITIALIZER(_function, _expires, _data)
+
+#define try_to_del_timer_sync(t) del_timer(t)
+#define del_timer_sync(t) del_timer(t)
+#define del_singleshot_timer_sync(t) del_timer_sync(t)
+
+struct hrtimer;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/times.h b/6/platforms/android-3/arch-arm/usr/include/linux/times.h
new file mode 100644
index 0000000..4ae415c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/times.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMES_H
+#define _LINUX_TIMES_H
+
+#include <linux/types.h>
+
+struct tms {
+ clock_t tms_utime;
+ clock_t tms_stime;
+ clock_t tms_cutime;
+ clock_t tms_cstime;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/timex.h b/6/platforms/android-3/arch-arm/usr/include/linux/timex.h
new file mode 100644
index 0000000..342470b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/timex.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMEX_H
+#define _LINUX_TIMEX_H
+
+#include <linux/compiler.h>
+#include <linux/time.h>
+
+#include <asm/param.h>
+
+#define SHIFT_KG 6
+#define SHIFT_KF 16
+#define SHIFT_KH 2
+#define MAXTC 6
+
+#define SHIFT_SCALE 22
+#define SHIFT_UPDATE (SHIFT_KG + MAXTC)
+#define SHIFT_USEC 16
+#define FINENSEC (1L << (SHIFT_SCALE - 10))
+
+#define MAXPHASE 512000L
+#define MAXFREQ (512L << SHIFT_USEC)
+#define MINSEC 16L
+#define MAXSEC 1200L
+#define NTP_PHASE_LIMIT (MAXPHASE << 5)
+
+struct timex {
+ unsigned int modes;
+ long offset;
+ long freq;
+ long maxerror;
+ long esterror;
+ int status;
+ long constant;
+ long precision;
+ long tolerance;
+ struct timeval time;
+ long tick;
+
+ long ppsfreq;
+ long jitter;
+ int shift;
+ long stabil;
+ long jitcnt;
+ long calcnt;
+ long errcnt;
+ long stbcnt;
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+};
+
+#define ADJ_OFFSET 0x0001
+#define ADJ_FREQUENCY 0x0002
+#define ADJ_MAXERROR 0x0004
+#define ADJ_ESTERROR 0x0008
+#define ADJ_STATUS 0x0010
+#define ADJ_TIMECONST 0x0020
+#define ADJ_TICK 0x4000
+#define ADJ_OFFSET_SINGLESHOT 0x8001
+
+#define MOD_OFFSET ADJ_OFFSET
+#define MOD_FREQUENCY ADJ_FREQUENCY
+#define MOD_MAXERROR ADJ_MAXERROR
+#define MOD_ESTERROR ADJ_ESTERROR
+#define MOD_STATUS ADJ_STATUS
+#define MOD_TIMECONST ADJ_TIMECONST
+#define MOD_CLKB ADJ_TICK
+#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
+
+#define STA_PLL 0x0001
+#define STA_PPSFREQ 0x0002
+#define STA_PPSTIME 0x0004
+#define STA_FLL 0x0008
+
+#define STA_INS 0x0010
+#define STA_DEL 0x0020
+#define STA_UNSYNC 0x0040
+#define STA_FREQHOLD 0x0080
+
+#define STA_PPSSIGNAL 0x0100
+#define STA_PPSJITTER 0x0200
+#define STA_PPSWANDER 0x0400
+#define STA_PPSERROR 0x0800
+
+#define STA_CLOCKERR 0x1000
+
+#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR)
+
+#define TIME_OK 0
+#define TIME_INS 1
+#define TIME_DEL 2
+#define TIME_OOP 3
+#define TIME_WAIT 4
+#define TIME_ERROR 5
+#define TIME_BAD TIME_ERROR
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/tiocl.h b/6/platforms/android-3/arch-arm/usr/include/linux/tiocl.h
new file mode 100644
index 0000000..db15a8d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/tiocl.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIOCL_H
+#define _LINUX_TIOCL_H
+
+#define TIOCL_SETSEL 2
+#define TIOCL_SELCHAR 0
+#define TIOCL_SELWORD 1
+#define TIOCL_SELLINE 2
+#define TIOCL_SELPOINTER 3
+#define TIOCL_SELCLEAR 4
+#define TIOCL_SELMOUSEREPORT 16
+#define TIOCL_SELBUTTONMASK 15
+
+struct tiocl_selection {
+ unsigned short xs;
+ unsigned short ys;
+ unsigned short xe;
+ unsigned short ye;
+ unsigned short sel_mode;
+};
+
+#define TIOCL_PASTESEL 3
+#define TIOCL_UNBLANKSCREEN 4
+
+#define TIOCL_SELLOADLUT 5
+
+#define TIOCL_GETSHIFTSTATE 6
+#define TIOCL_GETMOUSEREPORTING 7
+#define TIOCL_SETVESABLANK 10
+#define TIOCL_SETKMSGREDIRECT 11
+#define TIOCL_GETFGCONSOLE 12
+#define TIOCL_SCROLLCONSOLE 13
+#define TIOCL_BLANKSCREEN 14
+#define TIOCL_BLANKEDSCREEN 15
+#define TIOCL_GETKMSGREDIRECT 17
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/transport_class.h b/6/platforms/android-3/arch-arm/usr/include/linux/transport_class.h
new file mode 100644
index 0000000..71ad084
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/transport_class.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _TRANSPORT_CLASS_H_
+#define _TRANSPORT_CLASS_H_
+
+#include <linux/device.h>
+#include <linux/attribute_container.h>
+
+struct transport_container;
+
+struct transport_class {
+ struct class class;
+ int (*setup)(struct transport_container *, struct device *,
+ struct class_device *);
+ int (*configure)(struct transport_container *, struct device *,
+ struct class_device *);
+ int (*remove)(struct transport_container *, struct device *,
+ struct class_device *);
+};
+
+#define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) struct transport_class cls = { .class = { .name = nm, }, .setup = su, .remove = rm, .configure = cfg, }
+
+struct anon_transport_class {
+ struct transport_class tclass;
+ struct attribute_container container;
+};
+
+#define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) struct anon_transport_class cls = { .tclass = { .configure = cfg, }, . container = { .match = mtch, }, }
+
+#define class_to_transport_class(x) container_of(x, struct transport_class, class)
+
+struct transport_container {
+ struct attribute_container ac;
+ struct attribute_group *statistics;
+};
+
+#define attribute_container_to_transport_container(x) container_of(x, struct transport_container, ac)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/tty.h b/6/platforms/android-3/arch-arm/usr/include/linux/tty.h
new file mode 100644
index 0000000..b28791c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/tty.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TTY_H
+#define _LINUX_TTY_H
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/types.h b/6/platforms/android-3/arch-arm/usr/include/linux/types.h
new file mode 100644
index 0000000..b118db0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/types.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+#include <linux/posix_types.h>
+#include <asm/types.h>
+
+#define __bitwise__
+#define __bitwise
+
+typedef __u16 __bitwise __le16;
+typedef __u16 __bitwise __be16;
+typedef __u32 __bitwise __le32;
+typedef __u32 __bitwise __be32;
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+typedef __u64 __bitwise __le64;
+typedef __u64 __bitwise __be64;
+#endif
+
+struct ustat {
+ __kernel_daddr_t f_tfree;
+ __kernel_ino_t f_tinode;
+ char f_fname[6];
+ char f_fpack[6];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/udp.h b/6/platforms/android-3/arch-arm/usr/include/linux/udp.h
new file mode 100644
index 0000000..e4bf864
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/udp.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UDP_H
+#define _LINUX_UDP_H
+
+#include <linux/types.h>
+
+struct udphdr {
+ __u16 source;
+ __u16 dest;
+ __u16 len;
+ __u16 check;
+};
+
+#define UDP_CORK 1
+#define UDP_ENCAP 100
+
+#define UDP_ENCAP_ESPINUDP_NON_IKE 1
+#define UDP_ENCAP_ESPINUDP 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_i.h b/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_i.h
new file mode 100644
index 0000000..d71adb6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UFS_FS_I_H
+#define _LINUX_UFS_FS_I_H
+
+struct ufs_inode_info {
+ union {
+ __fs32 i_data[15];
+ __u8 i_symlink[4*15];
+ __fs64 u2_i_data[15];
+ } i_u1;
+ __u32 i_flags;
+ __u32 i_gen;
+ __u32 i_shadow;
+ __u32 i_unused1;
+ __u32 i_unused2;
+ __u32 i_oeftflag;
+ __u16 i_osync;
+ __u32 i_lastfrag;
+ __u32 i_dir_start_lookup;
+ struct inode vfs_inode;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_sb.h
new file mode 100644
index 0000000..9c7226d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_UFS_FS_SB_H
+#define __LINUX_UFS_FS_SB_H
+
+#define UFS_MAX_GROUP_LOADED 8
+#define UFS_CGNO_EMPTY ((unsigned)-1)
+
+struct ufs_sb_private_info;
+struct ufs_cg_private_info;
+struct ufs_csum;
+#define UFS_MAXCSBUFS 31
+
+struct ufs_sb_info {
+ struct ufs_sb_private_info * s_uspi;
+ struct ufs_csum * s_csp;
+ unsigned s_bytesex;
+ unsigned s_flags;
+ struct buffer_head ** s_ucg;
+ struct ufs_cg_private_info * s_ucpi[UFS_MAX_GROUP_LOADED];
+ unsigned s_cgno[UFS_MAX_GROUP_LOADED];
+ unsigned short s_cg_loaded;
+ unsigned s_mount_opt;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/uio.h b/6/platforms/android-3/arch-arm/usr/include/linux/uio.h
new file mode 100644
index 0000000..b0895af
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/uio.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_UIO_H
+#define __LINUX_UIO_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+struct iovec
+{
+ void __user *iov_base;
+ __kernel_size_t iov_len;
+};
+
+#define UIO_FASTIOV 8
+#define UIO_MAXIOV 1024
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/un.h b/6/platforms/android-3/arch-arm/usr/include/linux/un.h
new file mode 100644
index 0000000..5b51b7c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/un.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UN_H
+#define _LINUX_UN_H
+
+#define UNIX_PATH_MAX 108
+
+struct sockaddr_un {
+ sa_family_t sun_family;
+ char sun_path[UNIX_PATH_MAX];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/unistd.h b/6/platforms/android-3/arch-arm/usr/include/linux/unistd.h
new file mode 100644
index 0000000..6a3ec4c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/unistd.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UNISTD_H_
+#define _LINUX_UNISTD_H_
+
+#include <asm/unistd.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/usb.h b/6/platforms/android-3/arch-arm/usr/include/linux/usb.h
new file mode 100644
index 0000000..ceee194
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/usb.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_USB_H
+#define __LINUX_USB_H
+
+#include <linux/mod_devicetable.h>
+#include <linux/usb_ch9.h>
+
+#define USB_MAJOR 180
+#define USB_DEVICE_MAJOR 189
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/usb_ch9.h b/6/platforms/android-3/arch-arm/usr/include/linux/usb_ch9.h
new file mode 100644
index 0000000..74e31e7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/usb_ch9.h
@@ -0,0 +1,388 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_USB_CH9_H
+#define __LINUX_USB_CH9_H
+
+#include <linux/types.h>
+
+#define USB_DIR_OUT 0
+#define USB_DIR_IN 0x80
+
+#define USB_TYPE_MASK (0x03 << 5)
+#define USB_TYPE_STANDARD (0x00 << 5)
+#define USB_TYPE_CLASS (0x01 << 5)
+#define USB_TYPE_VENDOR (0x02 << 5)
+#define USB_TYPE_RESERVED (0x03 << 5)
+
+#define USB_RECIP_MASK 0x1f
+#define USB_RECIP_DEVICE 0x00
+#define USB_RECIP_INTERFACE 0x01
+#define USB_RECIP_ENDPOINT 0x02
+#define USB_RECIP_OTHER 0x03
+
+#define USB_RECIP_PORT 0x04
+#define USB_RECIP_RPIPE 0x05
+
+#define USB_REQ_GET_STATUS 0x00
+#define USB_REQ_CLEAR_FEATURE 0x01
+#define USB_REQ_SET_FEATURE 0x03
+#define USB_REQ_SET_ADDRESS 0x05
+#define USB_REQ_GET_DESCRIPTOR 0x06
+#define USB_REQ_SET_DESCRIPTOR 0x07
+#define USB_REQ_GET_CONFIGURATION 0x08
+#define USB_REQ_SET_CONFIGURATION 0x09
+#define USB_REQ_GET_INTERFACE 0x0A
+#define USB_REQ_SET_INTERFACE 0x0B
+#define USB_REQ_SYNCH_FRAME 0x0C
+
+#define USB_REQ_SET_ENCRYPTION 0x0D
+#define USB_REQ_GET_ENCRYPTION 0x0E
+#define USB_REQ_RPIPE_ABORT 0x0E
+#define USB_REQ_SET_HANDSHAKE 0x0F
+#define USB_REQ_RPIPE_RESET 0x0F
+#define USB_REQ_GET_HANDSHAKE 0x10
+#define USB_REQ_SET_CONNECTION 0x11
+#define USB_REQ_SET_SECURITY_DATA 0x12
+#define USB_REQ_GET_SECURITY_DATA 0x13
+#define USB_REQ_SET_WUSB_DATA 0x14
+#define USB_REQ_LOOPBACK_DATA_WRITE 0x15
+#define USB_REQ_LOOPBACK_DATA_READ 0x16
+#define USB_REQ_SET_INTERFACE_DS 0x17
+
+#define USB_DEVICE_SELF_POWERED 0
+#define USB_DEVICE_REMOTE_WAKEUP 1
+#define USB_DEVICE_TEST_MODE 2
+#define USB_DEVICE_BATTERY 2
+#define USB_DEVICE_B_HNP_ENABLE 3
+#define USB_DEVICE_WUSB_DEVICE 3
+#define USB_DEVICE_A_HNP_SUPPORT 4
+#define USB_DEVICE_A_ALT_HNP_SUPPORT 5
+#define USB_DEVICE_DEBUG_MODE 6
+
+#define USB_ENDPOINT_HALT 0
+
+struct usb_ctrlrequest {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __le16 wValue;
+ __le16 wIndex;
+ __le16 wLength;
+} __attribute__ ((packed));
+
+#define USB_DT_DEVICE 0x01
+#define USB_DT_CONFIG 0x02
+#define USB_DT_STRING 0x03
+#define USB_DT_INTERFACE 0x04
+#define USB_DT_ENDPOINT 0x05
+#define USB_DT_DEVICE_QUALIFIER 0x06
+#define USB_DT_OTHER_SPEED_CONFIG 0x07
+#define USB_DT_INTERFACE_POWER 0x08
+
+#define USB_DT_OTG 0x09
+#define USB_DT_DEBUG 0x0a
+#define USB_DT_INTERFACE_ASSOCIATION 0x0b
+
+#define USB_DT_SECURITY 0x0c
+#define USB_DT_KEY 0x0d
+#define USB_DT_ENCRYPTION_TYPE 0x0e
+#define USB_DT_BOS 0x0f
+#define USB_DT_DEVICE_CAPABILITY 0x10
+#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
+#define USB_DT_WIRE_ADAPTER 0x21
+#define USB_DT_RPIPE 0x22
+
+#define USB_DT_CS_DEVICE 0x21
+#define USB_DT_CS_CONFIG 0x22
+#define USB_DT_CS_STRING 0x23
+#define USB_DT_CS_INTERFACE 0x24
+#define USB_DT_CS_ENDPOINT 0x25
+
+struct usb_descriptor_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+} __attribute__ ((packed));
+
+struct usb_device_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __le16 idVendor;
+ __le16 idProduct;
+ __le16 bcdDevice;
+ __u8 iManufacturer;
+ __u8 iProduct;
+ __u8 iSerialNumber;
+ __u8 bNumConfigurations;
+} __attribute__ ((packed));
+
+#define USB_DT_DEVICE_SIZE 18
+
+#define USB_CLASS_PER_INTERFACE 0
+#define USB_CLASS_AUDIO 1
+#define USB_CLASS_COMM 2
+#define USB_CLASS_HID 3
+#define USB_CLASS_PHYSICAL 5
+#define USB_CLASS_STILL_IMAGE 6
+#define USB_CLASS_PRINTER 7
+#define USB_CLASS_MASS_STORAGE 8
+#define USB_CLASS_HUB 9
+#define USB_CLASS_CDC_DATA 0x0a
+#define USB_CLASS_CSCID 0x0b
+#define USB_CLASS_CONTENT_SEC 0x0d
+#define USB_CLASS_VIDEO 0x0e
+#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
+#define USB_CLASS_APP_SPEC 0xfe
+#define USB_CLASS_VENDOR_SPEC 0xff
+
+struct usb_config_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumInterfaces;
+ __u8 bConfigurationValue;
+ __u8 iConfiguration;
+ __u8 bmAttributes;
+ __u8 bMaxPower;
+} __attribute__ ((packed));
+
+#define USB_DT_CONFIG_SIZE 9
+
+#define USB_CONFIG_ATT_ONE (1 << 7)
+#define USB_CONFIG_ATT_SELFPOWER (1 << 6)
+#define USB_CONFIG_ATT_WAKEUP (1 << 5)
+#define USB_CONFIG_ATT_BATTERY (1 << 4)
+
+struct usb_string_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wData[1];
+} __attribute__ ((packed));
+
+struct usb_interface_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bInterfaceNumber;
+ __u8 bAlternateSetting;
+ __u8 bNumEndpoints;
+ __u8 bInterfaceClass;
+ __u8 bInterfaceSubClass;
+ __u8 bInterfaceProtocol;
+ __u8 iInterface;
+} __attribute__ ((packed));
+
+#define USB_DT_INTERFACE_SIZE 9
+
+struct usb_endpoint_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bEndpointAddress;
+ __u8 bmAttributes;
+ __le16 wMaxPacketSize;
+ __u8 bInterval;
+
+ __u8 bRefresh;
+ __u8 bSynchAddress;
+} __attribute__ ((packed));
+
+#define USB_DT_ENDPOINT_SIZE 7
+#define USB_DT_ENDPOINT_AUDIO_SIZE 9
+
+#define USB_ENDPOINT_NUMBER_MASK 0x0f
+#define USB_ENDPOINT_DIR_MASK 0x80
+
+#define USB_ENDPOINT_XFERTYPE_MASK 0x03
+#define USB_ENDPOINT_XFER_CONTROL 0
+#define USB_ENDPOINT_XFER_ISOC 1
+#define USB_ENDPOINT_XFER_BULK 2
+#define USB_ENDPOINT_XFER_INT 3
+#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
+
+struct usb_qualifier_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __u8 bNumConfigurations;
+ __u8 bRESERVED;
+} __attribute__ ((packed));
+
+struct usb_otg_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bmAttributes;
+} __attribute__ ((packed));
+
+#define USB_OTG_SRP (1 << 0)
+#define USB_OTG_HNP (1 << 1)
+
+struct usb_debug_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bDebugInEndpoint;
+ __u8 bDebugOutEndpoint;
+};
+
+struct usb_interface_assoc_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bFirstInterface;
+ __u8 bInterfaceCount;
+ __u8 bFunctionClass;
+ __u8 bFunctionSubClass;
+ __u8 bFunctionProtocol;
+ __u8 iFunction;
+} __attribute__ ((packed));
+
+struct usb_security_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumEncryptionTypes;
+};
+
+struct usb_key_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 bKeyData[0];
+};
+
+struct usb_encryption_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bEncryptionType;
+#define USB_ENC_TYPE_UNSECURE 0
+#define USB_ENC_TYPE_WIRED 1
+#define USB_ENC_TYPE_CCM_1 2
+#define USB_ENC_TYPE_RSA_1 3
+ __u8 bEncryptionValue;
+ __u8 bAuthKeyIndex;
+};
+
+struct usb_bos_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumDeviceCaps;
+};
+
+struct usb_dev_cap_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+};
+
+#define USB_CAP_TYPE_WIRELESS_USB 1
+
+struct usb_wireless_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+
+ __u8 bmAttributes;
+#define USB_WIRELESS_P2P_DRD (1 << 1)
+#define USB_WIRELESS_BEACON_MASK (3 << 2)
+#define USB_WIRELESS_BEACON_SELF (1 << 2)
+#define USB_WIRELESS_BEACON_DIRECTED (2 << 2)
+#define USB_WIRELESS_BEACON_NONE (3 << 2)
+ __le16 wPHYRates;
+#define USB_WIRELESS_PHY_53 (1 << 0)
+#define USB_WIRELESS_PHY_80 (1 << 1)
+#define USB_WIRELESS_PHY_107 (1 << 2)
+#define USB_WIRELESS_PHY_160 (1 << 3)
+#define USB_WIRELESS_PHY_200 (1 << 4)
+#define USB_WIRELESS_PHY_320 (1 << 5)
+#define USB_WIRELESS_PHY_400 (1 << 6)
+#define USB_WIRELESS_PHY_480 (1 << 7)
+ __u8 bmTFITXPowerInfo;
+ __u8 bmFFITXPowerInfo;
+ __le16 bmBandGroup;
+ __u8 bReserved;
+};
+
+struct usb_wireless_ep_comp_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bMaxBurst;
+ __u8 bMaxSequence;
+ __le16 wMaxStreamDelay;
+ __le16 wOverTheAirPacketSize;
+ __u8 bOverTheAirInterval;
+ __u8 bmCompAttributes;
+#define USB_ENDPOINT_SWITCH_MASK 0x03
+#define USB_ENDPOINT_SWITCH_NO 0
+#define USB_ENDPOINT_SWITCH_SWITCH 1
+#define USB_ENDPOINT_SWITCH_SCALE 2
+};
+
+struct usb_handshake {
+ __u8 bMessageNumber;
+ __u8 bStatus;
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 CDID[16];
+ __u8 nonce[16];
+ __u8 MIC[8];
+};
+
+struct usb_connection_context {
+ __u8 CHID[16];
+ __u8 CDID[16];
+ __u8 CK[16];
+};
+
+enum usb_device_speed {
+ USB_SPEED_UNKNOWN = 0,
+ USB_SPEED_LOW, USB_SPEED_FULL,
+ USB_SPEED_HIGH,
+ USB_SPEED_VARIABLE,
+};
+
+enum usb_device_state {
+
+ USB_STATE_NOTATTACHED = 0,
+
+ USB_STATE_ATTACHED,
+ USB_STATE_POWERED,
+ USB_STATE_UNAUTHENTICATED,
+ USB_STATE_RECONNECTING,
+ USB_STATE_DEFAULT,
+ USB_STATE_ADDRESS,
+ USB_STATE_CONFIGURED,
+
+ USB_STATE_SUSPENDED
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/usbdevice_fs.h b/6/platforms/android-3/arch-arm/usr/include/linux/usbdevice_fs.h
new file mode 100644
index 0000000..f36efdc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_USBDEVICE_FS_H
+#define _LINUX_USBDEVICE_FS_H
+
+#include <linux/types.h>
+
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+
+struct usbdevfs_ctrltransfer {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __u16 wValue;
+ __u16 wIndex;
+ __u16 wLength;
+ __u32 timeout;
+ void __user *data;
+};
+
+struct usbdevfs_bulktransfer {
+ unsigned int ep;
+ unsigned int len;
+ unsigned int timeout;
+ void __user *data;
+};
+
+struct usbdevfs_setinterface {
+ unsigned int interface;
+ unsigned int altsetting;
+};
+
+struct usbdevfs_disconnectsignal {
+ unsigned int signr;
+ void __user *context;
+};
+
+#define USBDEVFS_MAXDRIVERNAME 255
+
+struct usbdevfs_getdriver {
+ unsigned int interface;
+ char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+
+struct usbdevfs_connectinfo {
+ unsigned int devnum;
+ unsigned char slow;
+};
+
+#define USBDEVFS_URB_SHORT_NOT_OK 1
+#define USBDEVFS_URB_ISO_ASAP 2
+
+#define USBDEVFS_URB_TYPE_ISO 0
+#define USBDEVFS_URB_TYPE_INTERRUPT 1
+#define USBDEVFS_URB_TYPE_CONTROL 2
+#define USBDEVFS_URB_TYPE_BULK 3
+
+struct usbdevfs_iso_packet_desc {
+ unsigned int length;
+ unsigned int actual_length;
+ unsigned int status;
+};
+
+struct usbdevfs_urb {
+ unsigned char type;
+ unsigned char endpoint;
+ int status;
+ unsigned int flags;
+ void __user *buffer;
+ int buffer_length;
+ int actual_length;
+ int start_frame;
+ int number_of_packets;
+ int error_count;
+ unsigned int signr;
+ void *usercontext;
+ struct usbdevfs_iso_packet_desc iso_frame_desc[0];
+};
+
+struct usbdevfs_ioctl {
+ int ifno;
+ int ioctl_code;
+ void __user *data;
+};
+
+struct usbdevfs_hub_portinfo {
+ char nports;
+ char port [127];
+};
+
+#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
+#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
+#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
+#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
+#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
+#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
+#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
+#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
+#define USBDEVFS_DISCARDURB _IO('U', 11)
+#define USBDEVFS_REAPURB _IOW('U', 12, void *)
+#define USBDEVFS_REAPURB32 _IOW('U', 12, u32)
+#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
+#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32)
+#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
+#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
+#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
+#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
+#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
+#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
+#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
+#define USBDEVFS_RESET _IO('U', 20)
+#define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
+#define USBDEVFS_DISCONNECT _IO('U', 22)
+#define USBDEVFS_CONNECT _IO('U', 23)
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/user.h b/6/platforms/android-3/arch-arm/usr/include/linux/user.h
new file mode 100644
index 0000000..1c0b9cb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/user.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/user.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/utime.h b/6/platforms/android-3/arch-arm/usr/include/linux/utime.h
new file mode 100644
index 0000000..4b1ba9c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/utime.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UTIME_H
+#define _LINUX_UTIME_H
+
+struct utimbuf {
+ time_t actime;
+ time_t modtime;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/utsname.h b/6/platforms/android-3/arch-arm/usr/include/linux/utsname.h
new file mode 100644
index 0000000..ea6ee89
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/utsname.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UTSNAME_H
+#define _LINUX_UTSNAME_H
+
+#define __OLD_UTS_LEN 8
+
+struct oldold_utsname {
+ char sysname[9];
+ char nodename[9];
+ char release[9];
+ char version[9];
+ char machine[9];
+};
+
+#define __NEW_UTS_LEN 64
+
+struct old_utsname {
+ char sysname[65];
+ char nodename[65];
+ char release[65];
+ char version[65];
+ char machine[65];
+};
+
+struct new_utsname {
+ char sysname[65];
+ char nodename[65];
+ char release[65];
+ char version[65];
+ char machine[65];
+ char domainname[65];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/version.h b/6/platforms/android-3/arch-arm/usr/include/linux/version.h
new file mode 100644
index 0000000..beff0ed
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/version.h
@@ -0,0 +1,13 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define LINUX_VERSION_CODE 132626
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/vfs.h b/6/platforms/android-3/arch-arm/usr/include/linux/vfs.h
new file mode 100644
index 0000000..70636e9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/vfs.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VFS_H
+#define _LINUX_VFS_H
+
+#include <linux/statfs.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/videodev.h b/6/platforms/android-3/arch-arm/usr/include/linux/videodev.h
new file mode 100644
index 0000000..1f37fde
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/videodev.h
@@ -0,0 +1,327 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_VIDEODEV_H
+#define __LINUX_VIDEODEV_H
+
+#include <linux/videodev2.h>
+
+struct video_capability
+{
+ char name[32];
+ int type;
+ int channels;
+ int audios;
+ int maxwidth;
+ int maxheight;
+ int minwidth;
+ int minheight;
+};
+
+struct video_channel
+{
+ int channel;
+ char name[32];
+ int tuners;
+ __u32 flags;
+#define VIDEO_VC_TUNER 1
+#define VIDEO_VC_AUDIO 2
+ __u16 type;
+#define VIDEO_TYPE_TV 1
+#define VIDEO_TYPE_CAMERA 2
+ __u16 norm;
+};
+
+struct video_tuner
+{
+ int tuner;
+ char name[32];
+ unsigned long rangelow, rangehigh;
+ __u32 flags;
+#define VIDEO_TUNER_PAL 1
+#define VIDEO_TUNER_NTSC 2
+#define VIDEO_TUNER_SECAM 4
+#define VIDEO_TUNER_LOW 8
+#define VIDEO_TUNER_NORM 16
+#define VIDEO_TUNER_STEREO_ON 128
+#define VIDEO_TUNER_RDS_ON 256
+#define VIDEO_TUNER_MBS_ON 512
+ __u16 mode;
+#define VIDEO_MODE_PAL 0
+#define VIDEO_MODE_NTSC 1
+#define VIDEO_MODE_SECAM 2
+#define VIDEO_MODE_AUTO 3
+ __u16 signal;
+};
+
+struct video_picture
+{
+ __u16 brightness;
+ __u16 hue;
+ __u16 colour;
+ __u16 contrast;
+ __u16 whiteness;
+ __u16 depth;
+ __u16 palette;
+#define VIDEO_PALETTE_GREY 1
+#define VIDEO_PALETTE_HI240 2
+#define VIDEO_PALETTE_RGB565 3
+#define VIDEO_PALETTE_RGB24 4
+#define VIDEO_PALETTE_RGB32 5
+#define VIDEO_PALETTE_RGB555 6
+#define VIDEO_PALETTE_YUV422 7
+#define VIDEO_PALETTE_YUYV 8
+#define VIDEO_PALETTE_UYVY 9
+#define VIDEO_PALETTE_YUV420 10
+#define VIDEO_PALETTE_YUV411 11
+#define VIDEO_PALETTE_RAW 12
+#define VIDEO_PALETTE_YUV422P 13
+#define VIDEO_PALETTE_YUV411P 14
+#define VIDEO_PALETTE_YUV420P 15
+#define VIDEO_PALETTE_YUV410P 16
+#define VIDEO_PALETTE_PLANAR 13
+#define VIDEO_PALETTE_COMPONENT 7
+};
+
+struct video_audio
+{
+ int audio;
+ __u16 volume;
+ __u16 bass, treble;
+ __u32 flags;
+#define VIDEO_AUDIO_MUTE 1
+#define VIDEO_AUDIO_MUTABLE 2
+#define VIDEO_AUDIO_VOLUME 4
+#define VIDEO_AUDIO_BASS 8
+#define VIDEO_AUDIO_TREBLE 16
+#define VIDEO_AUDIO_BALANCE 32
+ char name[16];
+#define VIDEO_SOUND_MONO 1
+#define VIDEO_SOUND_STEREO 2
+#define VIDEO_SOUND_LANG1 4
+#define VIDEO_SOUND_LANG2 8
+ __u16 mode;
+ __u16 balance;
+ __u16 step;
+};
+
+struct video_clip
+{
+ __s32 x,y;
+ __s32 width, height;
+ struct video_clip *next;
+};
+
+struct video_window
+{
+ __u32 x,y;
+ __u32 width,height;
+ __u32 chromakey;
+ __u32 flags;
+ struct video_clip __user *clips;
+ int clipcount;
+#define VIDEO_WINDOW_INTERLACE 1
+#define VIDEO_WINDOW_CHROMAKEY 16
+#define VIDEO_CLIP_BITMAP -1
+
+#define VIDEO_CLIPMAP_SIZE (128 * 625)
+};
+
+struct video_capture
+{
+ __u32 x,y;
+ __u32 width, height;
+ __u16 decimation;
+ __u16 flags;
+#define VIDEO_CAPTURE_ODD 0
+#define VIDEO_CAPTURE_EVEN 1
+};
+
+struct video_buffer
+{
+ void *base;
+ int height,width;
+ int depth;
+ int bytesperline;
+};
+
+struct video_mmap
+{
+ unsigned int frame;
+ int height,width;
+ unsigned int format;
+};
+
+struct video_key
+{
+ __u8 key[8];
+ __u32 flags;
+};
+
+struct video_mbuf
+{
+ int size;
+ int frames;
+ int offsets[VIDEO_MAX_FRAME];
+};
+
+#define VIDEO_NO_UNIT (-1)
+
+struct video_unit
+{
+ int video;
+ int vbi;
+ int radio;
+ int audio;
+ int teletext;
+};
+
+struct vbi_format {
+ __u32 sampling_rate;
+ __u32 samples_per_line;
+ __u32 sample_format;
+ __s32 start[2];
+ __u32 count[2];
+ __u32 flags;
+#define VBI_UNSYNC 1
+#define VBI_INTERLACED 2
+};
+
+struct video_info
+{
+ __u32 frame_count;
+ __u32 h_size;
+ __u32 v_size;
+ __u32 smpte_timecode;
+ __u32 picture_type;
+ __u32 temporal_reference;
+ __u8 user_data[256];
+
+};
+
+struct video_play_mode
+{
+ int mode;
+ int p1;
+ int p2;
+};
+
+struct video_code
+{
+ char loadwhat[16];
+ int datasize;
+ __u8 *data;
+};
+
+#define VIDIOCGCAP _IOR('v',1,struct video_capability)
+#define VIDIOCGCHAN _IOWR('v',2,struct video_channel)
+#define VIDIOCSCHAN _IOW('v',3,struct video_channel)
+#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner)
+#define VIDIOCSTUNER _IOW('v',5,struct video_tuner)
+#define VIDIOCGPICT _IOR('v',6,struct video_picture)
+#define VIDIOCSPICT _IOW('v',7,struct video_picture)
+#define VIDIOCCAPTURE _IOW('v',8,int)
+#define VIDIOCGWIN _IOR('v',9, struct video_window)
+#define VIDIOCSWIN _IOW('v',10, struct video_window)
+#define VIDIOCGFBUF _IOR('v',11, struct video_buffer)
+#define VIDIOCSFBUF _IOW('v',12, struct video_buffer)
+#define VIDIOCKEY _IOR('v',13, struct video_key)
+#define VIDIOCGFREQ _IOR('v',14, unsigned long)
+#define VIDIOCSFREQ _IOW('v',15, unsigned long)
+#define VIDIOCGAUDIO _IOR('v',16, struct video_audio)
+#define VIDIOCSAUDIO _IOW('v',17, struct video_audio)
+#define VIDIOCSYNC _IOW('v',18, int)
+#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap)
+#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf)
+#define VIDIOCGUNIT _IOR('v',21, struct video_unit)
+#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture)
+#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture)
+#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode)
+#define VIDIOCSWRITEMODE _IOW('v',25, int)
+#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info)
+#define VIDIOCSMICROCODE _IOW('v',27, struct video_code)
+#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format)
+#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format)
+
+#define BASE_VIDIOCPRIVATE 192
+
+#define VID_WRITE_MPEG_AUD 0
+#define VID_WRITE_MPEG_VID 1
+#define VID_WRITE_OSD 2
+#define VID_WRITE_TTX 3
+#define VID_WRITE_CC 4
+#define VID_WRITE_MJPEG 5
+
+#define VID_PLAY_VID_OUT_MODE 0
+
+#define VID_PLAY_GENLOCK 1
+
+#define VID_PLAY_NORMAL 2
+#define VID_PLAY_PAUSE 3
+#define VID_PLAY_SINGLE_FRAME 4
+#define VID_PLAY_FAST_FORWARD 5
+#define VID_PLAY_SLOW_MOTION 6
+#define VID_PLAY_IMMEDIATE_NORMAL 7
+#define VID_PLAY_SWITCH_CHANNELS 8
+#define VID_PLAY_FREEZE_FRAME 9
+#define VID_PLAY_STILL_MODE 10
+#define VID_PLAY_MASTER_MODE 11
+
+#define VID_PLAY_MASTER_NONE 1
+#define VID_PLAY_MASTER_VIDEO 2
+#define VID_PLAY_MASTER_AUDIO 3
+#define VID_PLAY_ACTIVE_SCANLINES 12
+
+#define VID_PLAY_RESET 13
+#define VID_PLAY_END_MARK 14
+
+#define VID_HARDWARE_BT848 1
+#define VID_HARDWARE_QCAM_BW 2
+#define VID_HARDWARE_PMS 3
+#define VID_HARDWARE_QCAM_C 4
+#define VID_HARDWARE_PSEUDO 5
+#define VID_HARDWARE_SAA5249 6
+#define VID_HARDWARE_AZTECH 7
+#define VID_HARDWARE_SF16MI 8
+#define VID_HARDWARE_RTRACK 9
+#define VID_HARDWARE_ZOLTRIX 10
+#define VID_HARDWARE_SAA7146 11
+#define VID_HARDWARE_VIDEUM 12
+#define VID_HARDWARE_RTRACK2 13
+#define VID_HARDWARE_PERMEDIA2 14
+#define VID_HARDWARE_RIVA128 15
+#define VID_HARDWARE_PLANB 16
+#define VID_HARDWARE_BROADWAY 17
+#define VID_HARDWARE_GEMTEK 18
+#define VID_HARDWARE_TYPHOON 19
+#define VID_HARDWARE_VINO 20
+#define VID_HARDWARE_CADET 21
+#define VID_HARDWARE_TRUST 22
+#define VID_HARDWARE_TERRATEC 23
+#define VID_HARDWARE_CPIA 24
+#define VID_HARDWARE_ZR36120 25
+#define VID_HARDWARE_ZR36067 26
+#define VID_HARDWARE_OV511 27
+#define VID_HARDWARE_ZR356700 28
+#define VID_HARDWARE_W9966 29
+#define VID_HARDWARE_SE401 30
+#define VID_HARDWARE_PWC 31
+#define VID_HARDWARE_MEYE 32
+#define VID_HARDWARE_CPIA2 33
+#define VID_HARDWARE_VICAM 34
+#define VID_HARDWARE_SF16FMR2 35
+#define VID_HARDWARE_W9968CF 36
+#define VID_HARDWARE_SAA7114H 37
+#define VID_HARDWARE_SN9C102 38
+#define VID_HARDWARE_ARV 39
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/videodev2.h b/6/platforms/android-3/arch-arm/usr/include/linux/videodev2.h
new file mode 100644
index 0000000..dae4e93
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/videodev2.h
@@ -0,0 +1,963 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_VIDEODEV2_H
+#define __LINUX_VIDEODEV2_H
+#define __user
+#include <linux/types.h>
+
+#define VIDEO_MAX_FRAME 32
+
+#define VID_TYPE_CAPTURE 1
+#define VID_TYPE_TUNER 2
+#define VID_TYPE_TELETEXT 4
+#define VID_TYPE_OVERLAY 8
+#define VID_TYPE_CHROMAKEY 16
+#define VID_TYPE_CLIPPING 32
+#define VID_TYPE_FRAMERAM 64
+#define VID_TYPE_SCALES 128
+#define VID_TYPE_MONOCHROME 256
+#define VID_TYPE_SUBCAPTURE 512
+#define VID_TYPE_MPEG_DECODER 1024
+#define VID_TYPE_MPEG_ENCODER 2048
+#define VID_TYPE_MJPEG_DECODER 4096
+#define VID_TYPE_MJPEG_ENCODER 8192
+
+#define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+
+enum v4l2_field {
+ V4L2_FIELD_ANY = 0,
+ V4L2_FIELD_NONE = 1,
+ V4L2_FIELD_TOP = 2,
+ V4L2_FIELD_BOTTOM = 3,
+ V4L2_FIELD_INTERLACED = 4,
+ V4L2_FIELD_SEQ_TB = 5,
+ V4L2_FIELD_SEQ_BT = 6,
+ V4L2_FIELD_ALTERNATE = 7,
+};
+#define V4L2_FIELD_HAS_TOP(field) ((field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+#define V4L2_FIELD_HAS_BOTTOM(field) ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+#define V4L2_FIELD_HAS_BOTH(field) ((field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+
+enum v4l2_buf_type {
+ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
+ V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
+ V4L2_BUF_TYPE_VBI_CAPTURE = 4,
+ V4L2_BUF_TYPE_VBI_OUTPUT = 5,
+
+ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
+ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
+ V4L2_BUF_TYPE_PRIVATE = 0x80,
+};
+
+enum v4l2_ctrl_type {
+ V4L2_CTRL_TYPE_INTEGER = 1,
+ V4L2_CTRL_TYPE_BOOLEAN = 2,
+ V4L2_CTRL_TYPE_MENU = 3,
+ V4L2_CTRL_TYPE_BUTTON = 4,
+ V4L2_CTRL_TYPE_INTEGER64 = 5,
+ V4L2_CTRL_TYPE_CTRL_CLASS = 6,
+};
+
+enum v4l2_tuner_type {
+ V4L2_TUNER_RADIO = 1,
+ V4L2_TUNER_ANALOG_TV = 2,
+ V4L2_TUNER_DIGITAL_TV = 3,
+};
+
+enum v4l2_memory {
+ V4L2_MEMORY_MMAP = 1,
+ V4L2_MEMORY_USERPTR = 2,
+ V4L2_MEMORY_OVERLAY = 3,
+};
+
+enum v4l2_colorspace {
+
+ V4L2_COLORSPACE_SMPTE170M = 1,
+
+ V4L2_COLORSPACE_SMPTE240M = 2,
+
+ V4L2_COLORSPACE_REC709 = 3,
+
+ V4L2_COLORSPACE_BT878 = 4,
+
+ V4L2_COLORSPACE_470_SYSTEM_M = 5,
+ V4L2_COLORSPACE_470_SYSTEM_BG = 6,
+
+ V4L2_COLORSPACE_JPEG = 7,
+
+ V4L2_COLORSPACE_SRGB = 8,
+};
+
+enum v4l2_priority {
+ V4L2_PRIORITY_UNSET = 0,
+ V4L2_PRIORITY_BACKGROUND = 1,
+ V4L2_PRIORITY_INTERACTIVE = 2,
+ V4L2_PRIORITY_RECORD = 3,
+ V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
+};
+
+struct v4l2_rect {
+ __s32 left;
+ __s32 top;
+ __s32 width;
+ __s32 height;
+};
+
+struct v4l2_fract {
+ __u32 numerator;
+ __u32 denominator;
+};
+
+struct v4l2_capability
+{
+ __u8 driver[16];
+ __u8 card[32];
+ __u8 bus_info[32];
+ __u32 version;
+ __u32 capabilities;
+ __u32 reserved[4];
+};
+
+#define V4L2_CAP_VIDEO_CAPTURE 0x00000001
+#define V4L2_CAP_VIDEO_OUTPUT 0x00000002
+#define V4L2_CAP_VIDEO_OVERLAY 0x00000004
+#define V4L2_CAP_VBI_CAPTURE 0x00000010
+#define V4L2_CAP_VBI_OUTPUT 0x00000020
+#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040
+#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080
+#define V4L2_CAP_RDS_CAPTURE 0x00000100
+
+#define V4L2_CAP_TUNER 0x00010000
+#define V4L2_CAP_AUDIO 0x00020000
+#define V4L2_CAP_RADIO 0x00040000
+
+#define V4L2_CAP_READWRITE 0x01000000
+#define V4L2_CAP_ASYNCIO 0x02000000
+#define V4L2_CAP_STREAMING 0x04000000
+
+struct v4l2_pix_format
+{
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
+ enum v4l2_field field;
+ __u32 bytesperline;
+ __u32 sizeimage;
+ enum v4l2_colorspace colorspace;
+ __u32 priv;
+};
+
+#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1')
+#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O')
+#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P')
+#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q')
+#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R')
+#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3')
+#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3')
+#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4')
+#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4')
+#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y')
+#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9')
+#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2')
+#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V')
+#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y')
+#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P')
+#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P')
+#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P')
+
+#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2')
+#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1')
+
+#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9')
+#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2')
+#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V')
+#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4')
+#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2')
+
+#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1')
+
+#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G')
+#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G')
+#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d')
+#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G')
+
+#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A')
+#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0')
+#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1')
+#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2')
+#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5')
+
+struct v4l2_fmtdesc
+{
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 flags;
+ __u8 description[32];
+ __u32 pixelformat;
+ __u32 reserved[4];
+};
+
+#define V4L2_FMT_FLAG_COMPRESSED 0x0001
+
+struct v4l2_timecode
+{
+ __u32 type;
+ __u32 flags;
+ __u8 frames;
+ __u8 seconds;
+ __u8 minutes;
+ __u8 hours;
+ __u8 userbits[4];
+};
+
+#define V4L2_TC_TYPE_24FPS 1
+#define V4L2_TC_TYPE_25FPS 2
+#define V4L2_TC_TYPE_30FPS 3
+#define V4L2_TC_TYPE_50FPS 4
+#define V4L2_TC_TYPE_60FPS 5
+
+#define V4L2_TC_FLAG_DROPFRAME 0x0001
+#define V4L2_TC_FLAG_COLORFRAME 0x0002
+#define V4L2_TC_USERBITS_field 0x000C
+#define V4L2_TC_USERBITS_USERDEFINED 0x0000
+#define V4L2_TC_USERBITS_8BITCHARS 0x0008
+
+struct v4l2_jpegcompression
+{
+ int quality;
+
+ int APPn;
+ int APP_len;
+ char APP_data[60];
+
+ int COM_len;
+ char COM_data[60];
+
+ __u32 jpeg_markers;
+
+#define V4L2_JPEG_MARKER_DHT (1<<3)
+#define V4L2_JPEG_MARKER_DQT (1<<4)
+#define V4L2_JPEG_MARKER_DRI (1<<5)
+#define V4L2_JPEG_MARKER_COM (1<<6)
+#define V4L2_JPEG_MARKER_APP (1<<7)
+};
+
+struct v4l2_requestbuffers
+{
+ __u32 count;
+ enum v4l2_buf_type type;
+ enum v4l2_memory memory;
+ __u32 reserved[2];
+};
+
+struct v4l2_buffer
+{
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 bytesused;
+ __u32 flags;
+ enum v4l2_field field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ __u32 sequence;
+
+ enum v4l2_memory memory;
+ union {
+ __u32 offset;
+ unsigned long userptr;
+ } m;
+ __u32 length;
+ __u32 input;
+ __u32 reserved;
+};
+
+#define V4L2_BUF_FLAG_MAPPED 0x0001
+#define V4L2_BUF_FLAG_QUEUED 0x0002
+#define V4L2_BUF_FLAG_DONE 0x0004
+#define V4L2_BUF_FLAG_KEYFRAME 0x0008
+#define V4L2_BUF_FLAG_PFRAME 0x0010
+#define V4L2_BUF_FLAG_BFRAME 0x0020
+#define V4L2_BUF_FLAG_TIMECODE 0x0100
+#define V4L2_BUF_FLAG_INPUT 0x0200
+
+struct v4l2_framebuffer
+{
+ __u32 capability;
+ __u32 flags;
+
+ void* base;
+ struct v4l2_pix_format fmt;
+};
+
+#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
+#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
+#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
+#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
+
+#define V4L2_FBUF_FLAG_PRIMARY 0x0001
+#define V4L2_FBUF_FLAG_OVERLAY 0x0002
+#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
+
+struct v4l2_clip
+{
+ struct v4l2_rect c;
+ struct v4l2_clip __user *next;
+};
+
+struct v4l2_window
+{
+ struct v4l2_rect w;
+ enum v4l2_field field;
+ __u32 chromakey;
+ struct v4l2_clip __user *clips;
+ __u32 clipcount;
+ void __user *bitmap;
+};
+
+struct v4l2_captureparm
+{
+ __u32 capability;
+ __u32 capturemode;
+ struct v4l2_fract timeperframe;
+ __u32 extendedmode;
+ __u32 readbuffers;
+ __u32 reserved[4];
+};
+
+#define V4L2_MODE_HIGHQUALITY 0x0001
+#define V4L2_CAP_TIMEPERFRAME 0x1000
+
+struct v4l2_outputparm
+{
+ __u32 capability;
+ __u32 outputmode;
+ struct v4l2_fract timeperframe;
+ __u32 extendedmode;
+ __u32 writebuffers;
+ __u32 reserved[4];
+};
+
+struct v4l2_cropcap {
+ enum v4l2_buf_type type;
+ struct v4l2_rect bounds;
+ struct v4l2_rect defrect;
+ struct v4l2_fract pixelaspect;
+};
+
+struct v4l2_crop {
+ enum v4l2_buf_type type;
+ struct v4l2_rect c;
+};
+
+typedef __u64 v4l2_std_id;
+
+#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
+#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
+#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
+#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
+#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
+#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
+#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
+#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
+
+#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
+#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
+#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
+#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
+
+#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
+#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
+#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
+#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
+
+#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
+#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
+#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
+#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
+#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
+#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
+#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
+#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
+
+#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
+#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
+
+#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
+#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
+#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H)
+#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK)
+
+#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_PAL_G)
+#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K)
+#define V4L2_STD_PAL (V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_H | V4L2_STD_PAL_I)
+#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR)
+#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1)
+#define V4L2_STD_SECAM (V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H | V4L2_STD_SECAM_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)
+
+#define V4L2_STD_525_60 (V4L2_STD_PAL_M | V4L2_STD_PAL_60 | V4L2_STD_NTSC | V4L2_STD_NTSC_443)
+#define V4L2_STD_625_50 (V4L2_STD_PAL | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_SECAM)
+#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | V4L2_STD_ATSC_16_VSB)
+
+#define V4L2_STD_UNKNOWN 0
+#define V4L2_STD_ALL (V4L2_STD_525_60 | V4L2_STD_625_50)
+
+struct v4l2_standard
+{
+ __u32 index;
+ v4l2_std_id id;
+ __u8 name[24];
+ struct v4l2_fract frameperiod;
+ __u32 framelines;
+ __u32 reserved[4];
+};
+
+struct v4l2_input
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 type;
+ __u32 audioset;
+ __u32 tuner;
+ v4l2_std_id std;
+ __u32 status;
+ __u32 reserved[4];
+};
+
+#define V4L2_INPUT_TYPE_TUNER 1
+#define V4L2_INPUT_TYPE_CAMERA 2
+
+#define V4L2_IN_ST_NO_POWER 0x00000001
+#define V4L2_IN_ST_NO_SIGNAL 0x00000002
+#define V4L2_IN_ST_NO_COLOR 0x00000004
+
+#define V4L2_IN_ST_NO_H_LOCK 0x00000100
+#define V4L2_IN_ST_COLOR_KILL 0x00000200
+
+#define V4L2_IN_ST_NO_SYNC 0x00010000
+#define V4L2_IN_ST_NO_EQU 0x00020000
+#define V4L2_IN_ST_NO_CARRIER 0x00040000
+
+#define V4L2_IN_ST_MACROVISION 0x01000000
+#define V4L2_IN_ST_NO_ACCESS 0x02000000
+#define V4L2_IN_ST_VTR 0x04000000
+
+struct v4l2_output
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 type;
+ __u32 audioset;
+ __u32 modulator;
+ v4l2_std_id std;
+ __u32 reserved[4];
+};
+
+#define V4L2_OUTPUT_TYPE_MODULATOR 1
+#define V4L2_OUTPUT_TYPE_ANALOG 2
+#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
+
+struct v4l2_control
+{
+ __u32 id;
+ __s32 value;
+};
+
+struct v4l2_ext_control
+{
+ __u32 id;
+ __u32 reserved2[2];
+ union {
+ __s32 value;
+ __s64 value64;
+ void *reserved;
+ };
+} __attribute__ ((packed));
+
+struct v4l2_ext_controls
+{
+ __u32 ctrl_class;
+ __u32 count;
+ __u32 error_idx;
+ __u32 reserved[2];
+ struct v4l2_ext_control *controls;
+};
+
+#define V4L2_CTRL_CLASS_USER 0x00980000
+#define V4L2_CTRL_CLASS_MPEG 0x00990000
+
+#define V4L2_CTRL_ID_MASK (0x0fffffff)
+#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
+#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
+
+struct v4l2_queryctrl
+{
+ __u32 id;
+ enum v4l2_ctrl_type type;
+ __u8 name[32];
+ __s32 minimum;
+ __s32 maximum;
+ __s32 step;
+ __s32 default_value;
+ __u32 flags;
+ __u32 reserved[2];
+};
+
+struct v4l2_querymenu
+{
+ __u32 id;
+ __u32 index;
+ __u8 name[32];
+ __u32 reserved;
+};
+
+#define V4L2_CTRL_FLAG_DISABLED 0x0001
+#define V4L2_CTRL_FLAG_GRABBED 0x0002
+#define V4L2_CTRL_FLAG_READ_ONLY 0x0004
+#define V4L2_CTRL_FLAG_UPDATE 0x0008
+#define V4L2_CTRL_FLAG_INACTIVE 0x0010
+#define V4L2_CTRL_FLAG_SLIDER 0x0020
+
+#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
+
+#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
+#define V4L2_CID_USER_BASE V4L2_CID_BASE
+
+#define V4L2_CID_PRIVATE_BASE 0x08000000
+
+#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
+#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
+#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
+#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
+#define V4L2_CID_HUE (V4L2_CID_BASE+3)
+#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
+#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
+#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
+#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
+#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
+#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
+#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11)
+#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
+#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
+#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
+#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
+#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
+#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)
+#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
+#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
+#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
+#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
+#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
+#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
+#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
+#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)
+
+#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
+#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
+
+#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
+enum v4l2_mpeg_stream_type {
+ V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1,
+ V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3,
+ V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5,
+};
+#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
+#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
+#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
+#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
+#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
+#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
+#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
+enum v4l2_mpeg_stream_vbi_fmt {
+ V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,
+ V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,
+};
+
+#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
+enum v4l2_mpeg_audio_sampling_freq {
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
+enum v4l2_mpeg_audio_encoding {
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
+enum v4l2_mpeg_audio_l1_bitrate {
+ V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
+ V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
+ V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
+ V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
+ V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
+ V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
+ V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
+ V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
+ V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
+ V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
+ V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
+ V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
+ V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
+enum v4l2_mpeg_audio_l2_bitrate {
+ V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
+ V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
+ V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
+ V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
+ V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
+ V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
+ V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
+ V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
+ V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
+ V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
+ V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
+ V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
+ V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
+enum v4l2_mpeg_audio_l3_bitrate {
+ V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
+ V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
+ V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
+ V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
+ V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
+ V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
+ V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
+ V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
+ V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
+ V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
+ V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
+ V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
+ V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
+enum v4l2_mpeg_audio_mode {
+ V4L2_MPEG_AUDIO_MODE_STEREO = 0,
+ V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
+ V4L2_MPEG_AUDIO_MODE_DUAL = 2,
+ V4L2_MPEG_AUDIO_MODE_MONO = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
+enum v4l2_mpeg_audio_mode_extension {
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
+enum v4l2_mpeg_audio_emphasis {
+ V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
+ V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
+ V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
+enum v4l2_mpeg_audio_crc {
+ V4L2_MPEG_AUDIO_CRC_NONE = 0,
+ V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
+};
+
+#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
+enum v4l2_mpeg_video_encoding {
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
+enum v4l2_mpeg_video_aspect {
+ V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
+ V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
+ V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
+ V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
+};
+#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
+#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
+#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
+#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
+enum v4l2_mpeg_video_bitrate_mode {
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
+#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
+
+#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
+enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
+ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
+ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
+enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
+enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
+enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
+ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
+ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
+enum v4l2_mpeg_cx2341x_video_median_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
+
+struct v4l2_tuner
+{
+ __u32 index;
+ __u8 name[32];
+ enum v4l2_tuner_type type;
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 rxsubchans;
+ __u32 audmode;
+ __s32 signal;
+ __s32 afc;
+ __u32 reserved[4];
+};
+
+struct v4l2_modulator
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 txsubchans;
+ __u32 reserved[4];
+};
+
+#define V4L2_TUNER_CAP_LOW 0x0001
+#define V4L2_TUNER_CAP_NORM 0x0002
+#define V4L2_TUNER_CAP_STEREO 0x0010
+#define V4L2_TUNER_CAP_LANG2 0x0020
+#define V4L2_TUNER_CAP_SAP 0x0020
+#define V4L2_TUNER_CAP_LANG1 0x0040
+
+#define V4L2_TUNER_SUB_MONO 0x0001
+#define V4L2_TUNER_SUB_STEREO 0x0002
+#define V4L2_TUNER_SUB_LANG2 0x0004
+#define V4L2_TUNER_SUB_SAP 0x0004
+#define V4L2_TUNER_SUB_LANG1 0x0008
+
+#define V4L2_TUNER_MODE_MONO 0x0000
+#define V4L2_TUNER_MODE_STEREO 0x0001
+#define V4L2_TUNER_MODE_LANG2 0x0002
+#define V4L2_TUNER_MODE_SAP 0x0002
+#define V4L2_TUNER_MODE_LANG1 0x0003
+#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
+
+struct v4l2_frequency
+{
+ __u32 tuner;
+ enum v4l2_tuner_type type;
+ __u32 frequency;
+ __u32 reserved[8];
+};
+
+struct v4l2_audio
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
+};
+
+#define V4L2_AUDCAP_STEREO 0x00001
+#define V4L2_AUDCAP_AVL 0x00002
+
+#define V4L2_AUDMODE_AVL 0x00001
+
+struct v4l2_audioout
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
+};
+
+struct v4l2_vbi_format
+{
+ __u32 sampling_rate;
+ __u32 offset;
+ __u32 samples_per_line;
+ __u32 sample_format;
+ __s32 start[2];
+ __u32 count[2];
+ __u32 flags;
+ __u32 reserved[2];
+};
+
+#define V4L2_VBI_UNSYNC (1<< 0)
+#define V4L2_VBI_INTERLACED (1<< 1)
+
+struct v4l2_sliced_vbi_format
+{
+ __u16 service_set;
+
+ __u16 service_lines[2][24];
+ __u32 io_size;
+ __u32 reserved[2];
+};
+
+#define V4L2_SLICED_TELETEXT_B (0x0001)
+
+#define V4L2_SLICED_VPS (0x0400)
+
+#define V4L2_SLICED_CAPTION_525 (0x1000)
+
+#define V4L2_SLICED_WSS_625 (0x4000)
+
+#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525)
+#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
+
+struct v4l2_sliced_vbi_cap
+{
+ __u16 service_set;
+
+ __u16 service_lines[2][24];
+ __u32 reserved[4];
+};
+
+struct v4l2_sliced_vbi_data
+{
+ __u32 id;
+ __u32 field;
+ __u32 line;
+ __u32 reserved;
+ __u8 data[48];
+};
+
+struct v4l2_format
+{
+ enum v4l2_buf_type type;
+ union
+ {
+ struct v4l2_pix_format pix;
+ struct v4l2_window win;
+ struct v4l2_vbi_format vbi;
+ struct v4l2_sliced_vbi_format sliced;
+ __u8 raw_data[200];
+ } fmt;
+};
+
+struct v4l2_streamparm
+{
+ enum v4l2_buf_type type;
+ union
+ {
+ struct v4l2_captureparm capture;
+ struct v4l2_outputparm output;
+ __u8 raw_data[200];
+ } parm;
+};
+
+#define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability)
+#define VIDIOC_RESERVED _IO ('V', 1)
+#define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc)
+#define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
+#define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format)
+#define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
+#define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
+#define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
+#define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer)
+#define VIDIOC_OVERLAY _IOW ('V', 14, int)
+#define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer)
+#define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer)
+#define VIDIOC_STREAMON _IOW ('V', 18, int)
+#define VIDIOC_STREAMOFF _IOW ('V', 19, int)
+#define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm)
+#define VIDIOC_S_PARM _IOWR ('V', 22, struct v4l2_streamparm)
+#define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id)
+#define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id)
+#define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard)
+#define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input)
+#define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control)
+#define VIDIOC_S_CTRL _IOWR ('V', 28, struct v4l2_control)
+#define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner)
+#define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner)
+#define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio)
+#define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio)
+#define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
+#define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
+#define VIDIOC_G_INPUT _IOR ('V', 38, int)
+#define VIDIOC_S_INPUT _IOWR ('V', 39, int)
+#define VIDIOC_G_OUTPUT _IOR ('V', 46, int)
+#define VIDIOC_S_OUTPUT _IOWR ('V', 47, int)
+#define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output)
+#define VIDIOC_G_AUDOUT _IOR ('V', 49, struct v4l2_audioout)
+#define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout)
+#define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator)
+#define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator)
+#define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency)
+#define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency)
+#define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap)
+#define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop)
+#define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop)
+#define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression)
+#define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression)
+#define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id)
+#define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format)
+#define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio)
+#define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout)
+#define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority)
+#define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority)
+#define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap)
+#define VIDIOC_LOG_STATUS _IO ('V', 70)
+#define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls)
+#define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls)
+#define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls)
+
+#ifdef __OLD_VIDIOC_
+
+#define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int)
+#define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm)
+#define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control)
+#define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio)
+#define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout)
+#define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap)
+#endif
+
+#define BASE_VIDIOC_PRIVATE 192
+
+#endif
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/vmalloc.h b/6/platforms/android-3/arch-arm/usr/include/linux/vmalloc.h
new file mode 100644
index 0000000..c7fd103
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/vmalloc.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VMALLOC_H
+#define _LINUX_VMALLOC_H
+
+#include <linux/spinlock.h>
+#include <asm/page.h>
+
+struct vm_area_struct;
+
+#define VM_IOREMAP 0x00000001
+#define VM_ALLOC 0x00000002
+#define VM_MAP 0x00000004
+#define VM_USERMAP 0x00000008
+#define VM_VPAGES 0x00000010
+
+#ifndef IOREMAP_MAX_ORDER
+#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)
+#endif
+
+struct vm_struct {
+ void *addr;
+ unsigned long size;
+ unsigned long flags;
+ struct page **pages;
+ unsigned int nr_pages;
+ unsigned long phys_addr;
+ struct vm_struct *next;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/vt.h b/6/platforms/android-3/arch-arm/usr/include/linux/vt.h
new file mode 100644
index 0000000..9992b3a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/vt.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VT_H
+#define _LINUX_VT_H
+
+#define MIN_NR_CONSOLES 1
+#define MAX_NR_CONSOLES 63
+#define MAX_NR_USER_CONSOLES 63
+
+#define VT_OPENQRY 0x5600
+
+struct vt_mode {
+ char mode;
+ char waitv;
+ short relsig;
+ short acqsig;
+ short frsig;
+};
+#define VT_GETMODE 0x5601
+#define VT_SETMODE 0x5602
+#define VT_AUTO 0x00
+#define VT_PROCESS 0x01
+#define VT_ACKACQ 0x02
+
+struct vt_stat {
+ unsigned short v_active;
+ unsigned short v_signal;
+ unsigned short v_state;
+};
+#define VT_GETSTATE 0x5603
+#define VT_SENDSIG 0x5604
+
+#define VT_RELDISP 0x5605
+
+#define VT_ACTIVATE 0x5606
+#define VT_WAITACTIVE 0x5607
+#define VT_DISALLOCATE 0x5608
+
+struct vt_sizes {
+ unsigned short v_rows;
+ unsigned short v_cols;
+ unsigned short v_scrollsize;
+};
+#define VT_RESIZE 0x5609
+
+struct vt_consize {
+ unsigned short v_rows;
+ unsigned short v_cols;
+ unsigned short v_vlin;
+ unsigned short v_clin;
+ unsigned short v_vcol;
+ unsigned short v_ccol;
+};
+#define VT_RESIZEX 0x560A
+#define VT_LOCKSWITCH 0x560B
+#define VT_UNLOCKSWITCH 0x560C
+#define VT_GETHIFONTMASK 0x560D
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/vt_buffer.h b/6/platforms/android-3/arch-arm/usr/include/linux/vt_buffer.h
new file mode 100644
index 0000000..46ce79d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/vt_buffer.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VT_BUFFER_H_
+#define _LINUX_VT_BUFFER_H_
+
+#ifndef VT_BUF_HAVE_RW
+#define scr_writew(val, addr) (*(addr) = (val))
+#define scr_readw(addr) (*(addr))
+#define scr_memcpyw(d, s, c) memcpy(d, s, c)
+#define scr_memmovew(d, s, c) memmove(d, s, c)
+#define VT_BUF_HAVE_MEMCPYW
+#define VT_BUF_HAVE_MEMMOVEW
+#endif
+
+#ifndef VT_BUF_HAVE_MEMSETW
+#endif
+#ifndef VT_BUF_HAVE_MEMCPYW
+#endif
+#ifndef VT_BUF_HAVE_MEMMOVEW
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/wait.h b/6/platforms/android-3/arch-arm/usr/include/linux/wait.h
new file mode 100644
index 0000000..7d9aa68
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/wait.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WAIT_H
+#define _LINUX_WAIT_H
+
+#define WNOHANG 0x00000001
+#define WUNTRACED 0x00000002
+#define WSTOPPED WUNTRACED
+#define WEXITED 0x00000004
+#define WCONTINUED 0x00000008
+#define WNOWAIT 0x01000000
+
+#define __WNOTHREAD 0x20000000
+#define __WALL 0x40000000
+#define __WCLONE 0x80000000
+
+#define P_ALL 0
+#define P_PID 1
+#define P_PGID 2
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/wanrouter.h b/6/platforms/android-3/arch-arm/usr/include/linux/wanrouter.h
new file mode 100644
index 0000000..8f25a86
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/wanrouter.h
@@ -0,0 +1,356 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ROUTER_H
+#define _ROUTER_H
+
+#define ROUTER_NAME "wanrouter"
+#define ROUTER_VERSION 1
+#define ROUTER_RELEASE 1
+#define ROUTER_IOCTL 'W'
+#define ROUTER_MAGIC 0x524D4157L
+
+enum router_ioctls
+{
+ ROUTER_SETUP = ROUTER_IOCTL<<8,
+ ROUTER_DOWN,
+ ROUTER_STAT,
+ ROUTER_IFNEW,
+ ROUTER_IFDEL,
+ ROUTER_IFSTAT,
+ ROUTER_USER = (ROUTER_IOCTL<<8)+16,
+ ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
+};
+
+#define PROC_DATA_PORT_0 0x8000
+#define PROC_DATA_PORT_1 0x8001
+
+#define NLPID_IP 0xCC
+#define NLPID_SNAP 0x80
+#define NLPID_CLNP 0x81
+#define NLPID_ESIS 0x82
+#define NLPID_ISIS 0x83
+#define NLPID_Q933 0x08
+
+#define WAN_IFNAME_SZ 15
+#define WAN_DRVNAME_SZ 15
+#define WAN_ADDRESS_SZ 31
+#define USED_BY_FIELD 8
+
+#define UDP_PTPIPE_TYPE 0x01
+#define UDP_FPIPE_TYPE 0x02
+#define UDP_CPIPE_TYPE 0x03
+#define UDP_DRVSTATS_TYPE 0x04
+#define UDP_INVALID_TYPE 0x05
+
+#define CMD_OK 0
+#define CMD_TIMEOUT 0xFF
+
+#define UDP_PKT_FRM_STACK 0x00
+#define UDP_PKT_FRM_NETWORK 0x01
+
+#define MAX_INTR_TEST_COUNTER 100
+
+#define CRITICAL_IN_ISR 0xA1
+#define CRITICAL_INTR_HANDLED 0xB1
+
+typedef struct wan_x25_conf
+{
+ unsigned lo_pvc;
+ unsigned hi_pvc;
+ unsigned lo_svc;
+ unsigned hi_svc;
+ unsigned hdlc_window;
+ unsigned pkt_window;
+ unsigned t1;
+ unsigned t2;
+ unsigned t4;
+ unsigned n2;
+ unsigned t10_t20;
+ unsigned t11_t21;
+ unsigned t12_t22;
+ unsigned t13_t23;
+ unsigned t16_t26;
+ unsigned t28;
+ unsigned r10_r20;
+ unsigned r12_r22;
+ unsigned r13_r23;
+ unsigned ccitt_compat;
+ unsigned x25_conf_opt;
+ unsigned char LAPB_hdlc_only;
+ unsigned char logging;
+ unsigned char oob_on_modem;
+} wan_x25_conf_t;
+
+typedef struct wan_fr_conf
+{
+ unsigned signalling;
+ unsigned t391;
+ unsigned t392;
+ unsigned n391;
+ unsigned n392;
+ unsigned n393;
+ unsigned dlci_num;
+ unsigned dlci[100];
+} wan_fr_conf_t;
+
+typedef struct wan_ppp_conf
+{
+ unsigned restart_tmr;
+ unsigned auth_rsrt_tmr;
+ unsigned auth_wait_tmr;
+ unsigned mdm_fail_tmr;
+ unsigned dtr_drop_tmr;
+ unsigned connect_tmout;
+ unsigned conf_retry;
+ unsigned term_retry;
+ unsigned fail_retry;
+ unsigned auth_retry;
+ unsigned auth_options;
+ unsigned ip_options;
+ char authenticator;
+ char ip_mode;
+} wan_ppp_conf_t;
+
+typedef struct wan_chdlc_conf
+{
+ unsigned char ignore_dcd;
+ unsigned char ignore_cts;
+ unsigned char ignore_keepalive;
+ unsigned char hdlc_streaming;
+ unsigned char receive_only;
+ unsigned keepalive_tx_tmr;
+ unsigned keepalive_rx_tmr;
+ unsigned keepalive_err_margin;
+ unsigned slarp_timer;
+} wan_chdlc_conf_t;
+
+typedef struct wandev_conf
+{
+ unsigned magic;
+ unsigned config_id;
+
+ unsigned ioport;
+ unsigned long maddr;
+ unsigned msize;
+ int irq;
+ int dma;
+ char S514_CPU_no[1];
+ unsigned PCI_slot_no;
+ char auto_pci_cfg;
+ char comm_port;
+ unsigned bps;
+ unsigned mtu;
+ unsigned udp_port;
+ unsigned char ttl;
+ unsigned char ft1;
+ char interface;
+ char clocking;
+ char line_coding;
+ char station;
+ char connection;
+ char read_mode;
+ char receive_only;
+ char tty;
+ unsigned tty_major;
+ unsigned tty_minor;
+ unsigned tty_mode;
+ char backup;
+ unsigned hw_opt[4];
+ unsigned reserved[4];
+
+ unsigned data_size;
+ void* data;
+ union
+ {
+ wan_x25_conf_t x25;
+ wan_ppp_conf_t ppp;
+ wan_fr_conf_t fr;
+ wan_chdlc_conf_t chdlc;
+ } u;
+} wandev_conf_t;
+
+#define WANCONFIG_X25 101
+#define WANCONFIG_FR 102
+#define WANCONFIG_PPP 103
+#define WANCONFIG_CHDLC 104
+#define WANCONFIG_BSC 105
+#define WANCONFIG_HDLC 106
+#define WANCONFIG_MPPP 107
+
+#define WANOPT_OFF 0
+#define WANOPT_ON 1
+#define WANOPT_NO 0
+#define WANOPT_YES 1
+
+#define WANOPT_RS232 0
+#define WANOPT_V35 1
+
+#define WANOPT_NRZ 0
+#define WANOPT_NRZI 1
+#define WANOPT_FM0 2
+#define WANOPT_FM1 3
+
+#define WANOPT_POINTTOPOINT 0
+#define WANOPT_MULTIDROP 1
+
+#define WANOPT_EXTERNAL 0
+#define WANOPT_INTERNAL 1
+
+#define WANOPT_DTE 0
+#define WANOPT_DCE 1
+#define WANOPT_CPE 0
+#define WANOPT_NODE 1
+#define WANOPT_SECONDARY 0
+#define WANOPT_PRIMARY 1
+
+#define WANOPT_PERMANENT 0
+#define WANOPT_SWITCHED 1
+#define WANOPT_ONDEMAND 2
+
+#define WANOPT_FR_ANSI 1
+#define WANOPT_FR_Q933 2
+#define WANOPT_FR_LMI 3
+
+#define WANOPT_PPP_STATIC 0
+#define WANOPT_PPP_HOST 1
+#define WANOPT_PPP_PEER 2
+
+#define WANOPT_ONE 1
+#define WANOPT_TWO 2
+#define WANOPT_ONE_AND_HALF 3
+
+#define WANOPT_NONE 0
+#define WANOPT_ODD 1
+#define WANOPT_EVEN 2
+
+#define WANOPT_PRI 0
+#define WANOPT_SEC 1
+
+#define WANOPT_INTR 0
+#define WANOPT_POLL 1
+
+#define WANOPT_TTY_SYNC 0
+#define WANOPT_TTY_ASYNC 1
+
+typedef struct wandev_stat
+{
+ unsigned state;
+ unsigned ndev;
+
+ unsigned connection;
+ unsigned media_type;
+ unsigned mtu;
+
+ unsigned modem_status;
+ unsigned rx_frames;
+ unsigned rx_overruns;
+ unsigned rx_crc_err;
+ unsigned rx_aborts;
+ unsigned rx_bad_length;
+ unsigned rx_dropped;
+ unsigned tx_frames;
+ unsigned tx_underruns;
+ unsigned tx_timeouts;
+ unsigned tx_rejects;
+
+ unsigned rx_bad_format;
+ unsigned rx_bad_addr;
+ unsigned tx_retries;
+ unsigned reserved[16];
+} wandev_stat_t;
+
+enum wan_states
+{
+ WAN_UNCONFIGURED,
+ WAN_DISCONNECTED,
+ WAN_CONNECTING,
+ WAN_CONNECTED,
+ WAN_LIMIT,
+ WAN_DUALPORT,
+ WAN_DISCONNECTING,
+ WAN_FT1_READY
+};
+
+enum {
+ WAN_LOCAL_IP,
+ WAN_POINTOPOINT_IP,
+ WAN_NETMASK_IP,
+ WAN_BROADCAST_IP
+};
+
+#define WAN_MODEM_CTS 0x0001
+#define WAN_MODEM_DCD 0x0002
+#define WAN_MODEM_DTR 0x0010
+#define WAN_MODEM_RTS 0x0020
+
+typedef struct wanif_conf
+{
+ unsigned magic;
+ unsigned config_id;
+ char name[WAN_IFNAME_SZ+1];
+ char addr[WAN_ADDRESS_SZ+1];
+ char usedby[USED_BY_FIELD];
+ unsigned idle_timeout;
+ unsigned hold_timeout;
+ unsigned cir;
+ unsigned bc;
+ unsigned be;
+ unsigned char enable_IPX;
+ unsigned char inarp;
+ unsigned inarp_interval;
+ unsigned long network_number;
+ char mc;
+ char local_addr[WAN_ADDRESS_SZ+1];
+ unsigned char port;
+ unsigned char protocol;
+ char pap;
+ char chap;
+ unsigned char userid[511];
+ unsigned char passwd[511];
+ unsigned char sysname[31];
+ unsigned char ignore_dcd;
+ unsigned char ignore_cts;
+ unsigned char ignore_keepalive;
+ unsigned char hdlc_streaming;
+ unsigned keepalive_tx_tmr;
+ unsigned keepalive_rx_tmr;
+ unsigned keepalive_err_margin;
+ unsigned slarp_timer;
+ unsigned char ttl;
+ char interface;
+ char clocking;
+ unsigned bps;
+ unsigned mtu;
+ unsigned char if_down;
+ unsigned char gateway;
+ unsigned char true_if_encoding;
+
+ unsigned char asy_data_trans;
+ unsigned char rts_hs_for_receive;
+ unsigned char xon_xoff_hs_for_receive;
+ unsigned char xon_xoff_hs_for_transmit;
+ unsigned char dcd_hs_for_transmit;
+ unsigned char cts_hs_for_transmit;
+ unsigned char async_mode;
+ unsigned tx_bits_per_char;
+ unsigned rx_bits_per_char;
+ unsigned stop_bits;
+ unsigned char parity;
+ unsigned break_timer;
+ unsigned inter_char_timer;
+ unsigned rx_complete_length;
+ unsigned xon_char;
+ unsigned xoff_char;
+ unsigned char receive_only;
+} wanif_conf_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/wireless.h b/6/platforms/android-3/arch-arm/usr/include/linux/wireless.h
new file mode 100644
index 0000000..81ceb75
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/wireless.h
@@ -0,0 +1,542 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WIRELESS_H
+#define _LINUX_WIRELESS_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/if.h>
+
+#define WIRELESS_EXT 20
+
+#define SIOCSIWCOMMIT 0x8B00
+#define SIOCGIWNAME 0x8B01
+
+#define SIOCSIWNWID 0x8B02
+#define SIOCGIWNWID 0x8B03
+#define SIOCSIWFREQ 0x8B04
+#define SIOCGIWFREQ 0x8B05
+#define SIOCSIWMODE 0x8B06
+#define SIOCGIWMODE 0x8B07
+#define SIOCSIWSENS 0x8B08
+#define SIOCGIWSENS 0x8B09
+
+#define SIOCSIWRANGE 0x8B0A
+#define SIOCGIWRANGE 0x8B0B
+#define SIOCSIWPRIV 0x8B0C
+#define SIOCGIWPRIV 0x8B0D
+#define SIOCSIWSTATS 0x8B0E
+#define SIOCGIWSTATS 0x8B0F
+
+#define SIOCSIWSPY 0x8B10
+#define SIOCGIWSPY 0x8B11
+#define SIOCSIWTHRSPY 0x8B12
+#define SIOCGIWTHRSPY 0x8B13
+
+#define SIOCSIWAP 0x8B14
+#define SIOCGIWAP 0x8B15
+#define SIOCGIWAPLIST 0x8B17
+#define SIOCSIWSCAN 0x8B18
+#define SIOCGIWSCAN 0x8B19
+
+#define SIOCSIWESSID 0x8B1A
+#define SIOCGIWESSID 0x8B1B
+#define SIOCSIWNICKN 0x8B1C
+#define SIOCGIWNICKN 0x8B1D
+
+#define SIOCSIWRATE 0x8B20
+#define SIOCGIWRATE 0x8B21
+#define SIOCSIWRTS 0x8B22
+#define SIOCGIWRTS 0x8B23
+#define SIOCSIWFRAG 0x8B24
+#define SIOCGIWFRAG 0x8B25
+#define SIOCSIWTXPOW 0x8B26
+#define SIOCGIWTXPOW 0x8B27
+#define SIOCSIWRETRY 0x8B28
+#define SIOCGIWRETRY 0x8B29
+
+#define SIOCSIWENCODE 0x8B2A
+#define SIOCGIWENCODE 0x8B2B
+
+#define SIOCSIWPOWER 0x8B2C
+#define SIOCGIWPOWER 0x8B2D
+
+#define SIOCSIWGENIE 0x8B30
+#define SIOCGIWGENIE 0x8B31
+
+#define SIOCSIWMLME 0x8B16
+
+#define SIOCSIWAUTH 0x8B32
+#define SIOCGIWAUTH 0x8B33
+
+#define SIOCSIWENCODEEXT 0x8B34
+#define SIOCGIWENCODEEXT 0x8B35
+
+#define SIOCSIWPMKSA 0x8B36
+
+#define SIOCIWFIRSTPRIV 0x8BE0
+#define SIOCIWLASTPRIV 0x8BFF
+
+#define SIOCIWFIRST 0x8B00
+#define SIOCIWLAST SIOCIWLASTPRIV
+#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
+
+#define IW_IS_SET(cmd) (!((cmd) & 0x1))
+#define IW_IS_GET(cmd) ((cmd) & 0x1)
+
+#define IWEVTXDROP 0x8C00
+#define IWEVQUAL 0x8C01
+#define IWEVCUSTOM 0x8C02
+#define IWEVREGISTERED 0x8C03
+#define IWEVEXPIRED 0x8C04
+#define IWEVGENIE 0x8C05
+#define IWEVMICHAELMICFAILURE 0x8C06
+#define IWEVASSOCREQIE 0x8C07
+#define IWEVASSOCRESPIE 0x8C08
+#define IWEVPMKIDCAND 0x8C09
+
+#define IWEVFIRST 0x8C00
+#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
+
+#define IW_PRIV_TYPE_MASK 0x7000
+#define IW_PRIV_TYPE_NONE 0x0000
+#define IW_PRIV_TYPE_BYTE 0x1000
+#define IW_PRIV_TYPE_CHAR 0x2000
+#define IW_PRIV_TYPE_INT 0x4000
+#define IW_PRIV_TYPE_FLOAT 0x5000
+#define IW_PRIV_TYPE_ADDR 0x6000
+
+#define IW_PRIV_SIZE_FIXED 0x0800
+
+#define IW_PRIV_SIZE_MASK 0x07FF
+
+#define IW_MAX_FREQUENCIES 32
+
+#define IW_MAX_BITRATES 32
+
+#define IW_MAX_TXPOWER 8
+
+#define IW_MAX_SPY 8
+
+#define IW_MAX_AP 64
+
+#define IW_ESSID_MAX_SIZE 32
+
+#define IW_MODE_AUTO 0
+#define IW_MODE_ADHOC 1
+#define IW_MODE_INFRA 2
+#define IW_MODE_MASTER 3
+#define IW_MODE_REPEAT 4
+#define IW_MODE_SECOND 5
+#define IW_MODE_MONITOR 6
+
+#define IW_QUAL_QUAL_UPDATED 0x01
+#define IW_QUAL_LEVEL_UPDATED 0x02
+#define IW_QUAL_NOISE_UPDATED 0x04
+#define IW_QUAL_ALL_UPDATED 0x07
+#define IW_QUAL_DBM 0x08
+#define IW_QUAL_QUAL_INVALID 0x10
+#define IW_QUAL_LEVEL_INVALID 0x20
+#define IW_QUAL_NOISE_INVALID 0x40
+#define IW_QUAL_ALL_INVALID 0x70
+
+#define IW_FREQ_AUTO 0x00
+#define IW_FREQ_FIXED 0x01
+
+#define IW_MAX_ENCODING_SIZES 8
+
+#define IW_ENCODING_TOKEN_MAX 64
+
+#define IW_ENCODE_INDEX 0x00FF
+#define IW_ENCODE_FLAGS 0xFF00
+#define IW_ENCODE_MODE 0xF000
+#define IW_ENCODE_DISABLED 0x8000
+#define IW_ENCODE_ENABLED 0x0000
+#define IW_ENCODE_RESTRICTED 0x4000
+#define IW_ENCODE_OPEN 0x2000
+#define IW_ENCODE_NOKEY 0x0800
+#define IW_ENCODE_TEMP 0x0400
+
+#define IW_POWER_ON 0x0000
+#define IW_POWER_TYPE 0xF000
+#define IW_POWER_PERIOD 0x1000
+#define IW_POWER_TIMEOUT 0x2000
+#define IW_POWER_MODE 0x0F00
+#define IW_POWER_UNICAST_R 0x0100
+#define IW_POWER_MULTICAST_R 0x0200
+#define IW_POWER_ALL_R 0x0300
+#define IW_POWER_FORCE_S 0x0400
+#define IW_POWER_REPEATER 0x0800
+#define IW_POWER_MODIFIER 0x000F
+#define IW_POWER_MIN 0x0001
+#define IW_POWER_MAX 0x0002
+#define IW_POWER_RELATIVE 0x0004
+
+#define IW_TXPOW_TYPE 0x00FF
+#define IW_TXPOW_DBM 0x0000
+#define IW_TXPOW_MWATT 0x0001
+#define IW_TXPOW_RELATIVE 0x0002
+#define IW_TXPOW_RANGE 0x1000
+
+#define IW_RETRY_ON 0x0000
+#define IW_RETRY_TYPE 0xF000
+#define IW_RETRY_LIMIT 0x1000
+#define IW_RETRY_LIFETIME 0x2000
+#define IW_RETRY_MODIFIER 0x000F
+#define IW_RETRY_MIN 0x0001
+#define IW_RETRY_MAX 0x0002
+#define IW_RETRY_RELATIVE 0x0004
+
+#define IW_SCAN_DEFAULT 0x0000
+#define IW_SCAN_ALL_ESSID 0x0001
+#define IW_SCAN_THIS_ESSID 0x0002
+#define IW_SCAN_ALL_FREQ 0x0004
+#define IW_SCAN_THIS_FREQ 0x0008
+#define IW_SCAN_ALL_MODE 0x0010
+#define IW_SCAN_THIS_MODE 0x0020
+#define IW_SCAN_ALL_RATE 0x0040
+#define IW_SCAN_THIS_RATE 0x0080
+
+#define IW_SCAN_TYPE_ACTIVE 0
+#define IW_SCAN_TYPE_PASSIVE 1
+
+#define IW_SCAN_MAX_DATA 4096
+
+#define IW_CUSTOM_MAX 256
+
+#define IW_GENERIC_IE_MAX 1024
+
+#define IW_MLME_DEAUTH 0
+#define IW_MLME_DISASSOC 1
+
+#define IW_AUTH_INDEX 0x0FFF
+#define IW_AUTH_FLAGS 0xF000
+
+#define IW_AUTH_WPA_VERSION 0
+#define IW_AUTH_CIPHER_PAIRWISE 1
+#define IW_AUTH_CIPHER_GROUP 2
+#define IW_AUTH_KEY_MGMT 3
+#define IW_AUTH_TKIP_COUNTERMEASURES 4
+#define IW_AUTH_DROP_UNENCRYPTED 5
+#define IW_AUTH_80211_AUTH_ALG 6
+#define IW_AUTH_WPA_ENABLED 7
+#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
+#define IW_AUTH_ROAMING_CONTROL 9
+#define IW_AUTH_PRIVACY_INVOKED 10
+
+#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
+#define IW_AUTH_WPA_VERSION_WPA 0x00000002
+#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
+
+#define IW_AUTH_CIPHER_NONE 0x00000001
+#define IW_AUTH_CIPHER_WEP40 0x00000002
+#define IW_AUTH_CIPHER_TKIP 0x00000004
+#define IW_AUTH_CIPHER_CCMP 0x00000008
+#define IW_AUTH_CIPHER_WEP104 0x00000010
+
+#define IW_AUTH_KEY_MGMT_802_1X 1
+#define IW_AUTH_KEY_MGMT_PSK 2
+
+#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
+#define IW_AUTH_ALG_SHARED_KEY 0x00000002
+#define IW_AUTH_ALG_LEAP 0x00000004
+
+#define IW_AUTH_ROAMING_ENABLE 0
+#define IW_AUTH_ROAMING_DISABLE 1
+
+#define IW_ENCODE_SEQ_MAX_SIZE 8
+
+#define IW_ENCODE_ALG_NONE 0
+#define IW_ENCODE_ALG_WEP 1
+#define IW_ENCODE_ALG_TKIP 2
+#define IW_ENCODE_ALG_CCMP 3
+
+#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
+#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
+#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
+#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
+
+#define IW_MICFAILURE_KEY_ID 0x00000003
+#define IW_MICFAILURE_GROUP 0x00000004
+#define IW_MICFAILURE_PAIRWISE 0x00000008
+#define IW_MICFAILURE_STAKEY 0x00000010
+#define IW_MICFAILURE_COUNT 0x00000060
+
+#define IW_ENC_CAPA_WPA 0x00000001
+#define IW_ENC_CAPA_WPA2 0x00000002
+#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
+#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
+
+#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : (cmd - SIOCSIWCOMMIT))
+#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
+#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
+
+#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A))
+#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
+
+#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
+#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
+
+struct iw_param
+{
+ __s32 value;
+ __u8 fixed;
+ __u8 disabled;
+ __u16 flags;
+};
+
+struct iw_point
+{
+ void __user *pointer;
+ __u16 length;
+ __u16 flags;
+};
+
+struct iw_freq
+{
+ __s32 m;
+ __s16 e;
+ __u8 i;
+ __u8 flags;
+};
+
+struct iw_quality
+{
+ __u8 qual;
+ __u8 level;
+ __u8 noise;
+ __u8 updated;
+};
+
+struct iw_discarded
+{
+ __u32 nwid;
+ __u32 code;
+ __u32 fragment;
+ __u32 retries;
+ __u32 misc;
+};
+
+struct iw_missed
+{
+ __u32 beacon;
+};
+
+struct iw_thrspy
+{
+ struct sockaddr addr;
+ struct iw_quality qual;
+ struct iw_quality low;
+ struct iw_quality high;
+};
+
+struct iw_scan_req
+{
+ __u8 scan_type;
+ __u8 essid_len;
+ __u8 num_channels;
+ __u8 flags;
+ struct sockaddr bssid;
+
+ __u8 essid[IW_ESSID_MAX_SIZE];
+
+ __u32 min_channel_time;
+ __u32 max_channel_time;
+
+ struct iw_freq channel_list[IW_MAX_FREQUENCIES];
+};
+
+struct iw_encode_ext
+{
+ __u32 ext_flags;
+ __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE];
+ __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE];
+ struct sockaddr addr;
+ __u16 alg;
+ __u16 key_len;
+ __u8 key[0];
+};
+
+struct iw_mlme
+{
+ __u16 cmd;
+ __u16 reason_code;
+ struct sockaddr addr;
+};
+
+#define IW_PMKSA_ADD 1
+#define IW_PMKSA_REMOVE 2
+#define IW_PMKSA_FLUSH 3
+
+#define IW_PMKID_LEN 16
+
+struct iw_pmksa
+{
+ __u32 cmd;
+ struct sockaddr bssid;
+ __u8 pmkid[IW_PMKID_LEN];
+};
+
+struct iw_michaelmicfailure
+{
+ __u32 flags;
+ struct sockaddr src_addr;
+ __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE];
+};
+
+#define IW_PMKID_CAND_PREAUTH 0x00000001
+struct iw_pmkid_cand
+{
+ __u32 flags;
+ __u32 index;
+ struct sockaddr bssid;
+};
+
+struct iw_statistics
+{
+ __u16 status;
+
+ struct iw_quality qual;
+ struct iw_discarded discard;
+ struct iw_missed miss;
+};
+
+union iwreq_data
+{
+
+ char name[IFNAMSIZ];
+
+ struct iw_point essid;
+ struct iw_param nwid;
+ struct iw_freq freq;
+
+ struct iw_param sens;
+ struct iw_param bitrate;
+ struct iw_param txpower;
+ struct iw_param rts;
+ struct iw_param frag;
+ __u32 mode;
+ struct iw_param retry;
+
+ struct iw_point encoding;
+ struct iw_param power;
+ struct iw_quality qual;
+
+ struct sockaddr ap_addr;
+ struct sockaddr addr;
+
+ struct iw_param param;
+ struct iw_point data;
+};
+
+struct iwreq
+{
+ union
+ {
+ char ifrn_name[IFNAMSIZ];
+ } ifr_ifrn;
+
+ union iwreq_data u;
+};
+
+struct iw_range
+{
+
+ __u32 throughput;
+
+ __u32 min_nwid;
+ __u32 max_nwid;
+
+ __u16 old_num_channels;
+ __u8 old_num_frequency;
+
+ __u32 event_capa[6];
+
+ __s32 sensitivity;
+
+ struct iw_quality max_qual;
+
+ struct iw_quality avg_qual;
+
+ __u8 num_bitrates;
+ __s32 bitrate[IW_MAX_BITRATES];
+
+ __s32 min_rts;
+ __s32 max_rts;
+
+ __s32 min_frag;
+ __s32 max_frag;
+
+ __s32 min_pmp;
+ __s32 max_pmp;
+ __s32 min_pmt;
+ __s32 max_pmt;
+ __u16 pmp_flags;
+ __u16 pmt_flags;
+ __u16 pm_capa;
+
+ __u16 encoding_size[IW_MAX_ENCODING_SIZES];
+ __u8 num_encoding_sizes;
+ __u8 max_encoding_tokens;
+
+ __u8 encoding_login_index;
+
+ __u16 txpower_capa;
+ __u8 num_txpower;
+ __s32 txpower[IW_MAX_TXPOWER];
+
+ __u8 we_version_compiled;
+ __u8 we_version_source;
+
+ __u16 retry_capa;
+ __u16 retry_flags;
+ __u16 r_time_flags;
+ __s32 min_retry;
+ __s32 max_retry;
+ __s32 min_r_time;
+ __s32 max_r_time;
+
+ __u16 num_channels;
+ __u8 num_frequency;
+ struct iw_freq freq[IW_MAX_FREQUENCIES];
+
+ __u32 enc_capa;
+};
+
+struct iw_priv_args
+{
+ __u32 cmd;
+ __u16 set_args;
+ __u16 get_args;
+ char name[IFNAMSIZ];
+};
+
+struct iw_event
+{
+ __u16 len;
+ __u16 cmd;
+ union iwreq_data u;
+};
+
+#define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
+
+#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
+#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
+#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
+#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
+#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
+#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
+
+#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - (char *) NULL)
+#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/workqueue.h b/6/platforms/android-3/arch-arm/usr/include/linux/workqueue.h
new file mode 100644
index 0000000..12fab2c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/workqueue.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WORKQUEUE_H
+#define _LINUX_WORKQUEUE_H
+
+#include <linux/timer.h>
+#include <linux/linkage.h>
+#include <linux/bitops.h>
+
+struct workqueue_struct;
+
+struct work_struct {
+ unsigned long pending;
+ struct list_head entry;
+ void (*func)(void *);
+ void *data;
+ void *wq_data;
+ struct timer_list timer;
+};
+
+struct execute_work {
+ struct work_struct work;
+};
+
+#define __WORK_INITIALIZER(n, f, d) { .entry = { &(n).entry, &(n).entry }, .func = (f), .data = (d), .timer = TIMER_INITIALIZER(NULL, 0, 0), }
+
+#define DECLARE_WORK(n, f, d) struct work_struct n = __WORK_INITIALIZER(n, f, d)
+
+#define PREPARE_WORK(_work, _func, _data) do { (_work)->func = _func; (_work)->data = _data; } while (0)
+
+#define INIT_WORK(_work, _func, _data) do { INIT_LIST_HEAD(&(_work)->entry); (_work)->pending = 0; PREPARE_WORK((_work), (_func), (_data)); init_timer(&(_work)->timer); } while (0)
+
+#define create_workqueue(name) __create_workqueue((name), 0)
+#define create_singlethread_workqueue(name) __create_workqueue((name), 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/xattr.h b/6/platforms/android-3/arch-arm/usr/include/linux/xattr.h
new file mode 100644
index 0000000..f5f640d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/xattr.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_XATTR_H
+#define _LINUX_XATTR_H
+
+#define XATTR_CREATE 0x1
+#define XATTR_REPLACE 0x2
+
+#define XATTR_OS2_PREFIX "os2."
+#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
+
+#define XATTR_SECURITY_PREFIX "security."
+#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
+
+#define XATTR_SYSTEM_PREFIX "system."
+#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
+
+#define XATTR_TRUSTED_PREFIX "trusted."
+#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
+
+#define XATTR_USER_PREFIX "user."
+#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
+
+struct xattr_handler {
+ char *prefix;
+ size_t (*list)(struct inode *inode, char *list, size_t list_size,
+ const char *name, size_t name_len);
+ int (*get)(struct inode *inode, const char *name, void *buffer,
+ size_t size);
+ int (*set)(struct inode *inode, const char *name, const void *buffer,
+ size_t size, int flags);
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/zconf.h b/6/platforms/android-3/arch-arm/usr/include/linux/zconf.h
new file mode 100644
index 0000000..18ea78c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/zconf.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ZCONF_H
+#define _ZCONF_H
+
+#ifndef MAX_MEM_LEVEL
+#define MAX_MEM_LEVEL 8
+#endif
+
+#ifndef MAX_WBITS
+#define MAX_WBITS 15
+#endif
+
+#ifndef DEF_WBITS
+#define DEF_WBITS MAX_WBITS
+#endif
+
+#if MAX_MEM_LEVEL >= 8
+#define DEF_MEM_LEVEL 8
+#else
+#define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+
+typedef unsigned char Byte;
+typedef unsigned int uInt;
+typedef unsigned long uLong;
+typedef void *voidp;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/zlib.h b/6/platforms/android-3/arch-arm/usr/include/linux/zlib.h
new file mode 100644
index 0000000..052adfe
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/zlib.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ZLIB_H
+#define _ZLIB_H
+
+#include <linux/zconf.h>
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Byte *next_in;
+ uInt avail_in;
+ uLong total_in;
+
+ Byte *next_out;
+ uInt avail_out;
+ uLong total_out;
+
+ char *msg;
+ struct internal_state *state;
+
+ void *workspace;
+
+ int data_type;
+ uLong adler;
+ uLong reserved;
+} z_stream;
+
+typedef z_stream *z_streamp;
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1
+#define Z_PACKET_FLUSH 2
+#define Z_SYNC_FLUSH 3
+#define Z_FULL_FLUSH 4
+#define Z_FINISH 5
+#define Z_BLOCK 6
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_DEFAULT_STRATEGY 0
+
+#define Z_BINARY 0
+#define Z_ASCII 1
+#define Z_UNKNOWN 2
+
+#define Z_DEFLATED 8
+
+#define zlib_deflateInit(strm, level) zlib_deflateInit2((strm), (level), Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY)
+#define zlib_inflateInit(strm) zlib_inflateInit2((strm), DEF_WBITS)
+
+#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/linux/zorro_ids.h b/6/platforms/android-3/arch-arm/usr/include/linux/zorro_ids.h
new file mode 100644
index 0000000..e6b1d48
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/linux/zorro_ids.h
@@ -0,0 +1,549 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3
+#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0)
+#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100
+#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0)
+
+#define ZORRO_MANUF_KUPKE_1 0x00DD
+#define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0)
+
+#define ZORRO_MANUF_MEMPHIS 0x0100
+#define ZORRO_PROD_MEMPHIS_STORMBRINGER ZORRO_ID(MEMPHIS, 0x00, 0)
+
+#define ZORRO_MANUF_3_STATE 0x0200
+#define ZORRO_PROD_3_STATE_MEGAMIX_2000 ZORRO_ID(3_STATE, 0x02, 0)
+
+#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG 0x0201
+#define ZORRO_PROD_CBM_A2088_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0)
+#define ZORRO_PROD_CBM_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0)
+#define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0)
+#define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202
+#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0)
+#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0)
+#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0)
+#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0)
+#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0)
+#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0)
+#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0)
+#define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0)
+#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0)
+#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0)
+#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0)
+#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0)
+#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0)
+#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0)
+#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0)
+#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0)
+#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203
+#define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4
+#define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0)
+
+#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF
+#define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0)
+
+#define ZORRO_MANUF_CARDCO_1 0x03EC
+#define ZORRO_PROD_CARDCO_KRONOS_2000_1 ZORRO_ID(CARDCO_1, 0x04, 0)
+#define ZORRO_PROD_CARDCO_A1000_1 ZORRO_ID(CARDCO_1, 0x0C, 0)
+#define ZORRO_PROD_CARDCO_ESCORT ZORRO_ID(CARDCO_1, 0x0E, 0)
+#define ZORRO_PROD_CARDCO_A2410 ZORRO_ID(CARDCO_1, 0xF5, 0)
+
+#define ZORRO_MANUF_A_SQUARED 0x03ED
+#define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0)
+
+#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE
+#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0)
+
+#define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1
+#define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0)
+
+#define ZORRO_MANUF_MICROBOTICS 0x03F2
+#define ZORRO_PROD_MICROBOTICS_STARBOARD_II ZORRO_ID(MICROBOTICS, 0x00, 0)
+#define ZORRO_PROD_MICROBOTICS_STARDRIVE ZORRO_ID(MICROBOTICS, 0x02, 0)
+#define ZORRO_PROD_MICROBOTICS_8_UP_A ZORRO_ID(MICROBOTICS, 0x03, 0)
+#define ZORRO_PROD_MICROBOTICS_8_UP_Z ZORRO_ID(MICROBOTICS, 0x04, 0)
+#define ZORRO_PROD_MICROBOTICS_DELTA_RAM ZORRO_ID(MICROBOTICS, 0x20, 0)
+#define ZORRO_PROD_MICROBOTICS_8_STAR_RAM ZORRO_ID(MICROBOTICS, 0x40, 0)
+#define ZORRO_PROD_MICROBOTICS_8_STAR ZORRO_ID(MICROBOTICS, 0x41, 0)
+#define ZORRO_PROD_MICROBOTICS_VXL_RAM_32 ZORRO_ID(MICROBOTICS, 0x44, 0)
+#define ZORRO_PROD_MICROBOTICS_VXL_68030 ZORRO_ID(MICROBOTICS, 0x45, 0)
+#define ZORRO_PROD_MICROBOTICS_DELTA ZORRO_ID(MICROBOTICS, 0x60, 0)
+#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM ZORRO_ID(MICROBOTICS, 0x81, 0)
+#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1 ZORRO_ID(MICROBOTICS, 0x96, 0)
+#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2 ZORRO_ID(MICROBOTICS, 0x9E, 0)
+#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z ZORRO_ID(MICROBOTICS, 0xC1, 0)
+
+#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA 0x03F4
+
+#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES 0x03F6
+
+#define ZORRO_MANUF_ASDG 0x03FF
+#define ZORRO_PROD_ASDG_MEMORY_1 ZORRO_ID(ASDG, 0x01, 0)
+#define ZORRO_PROD_ASDG_MEMORY_2 ZORRO_ID(ASDG, 0x02, 0)
+#define ZORRO_PROD_ASDG_EB920_LAN_ROVER ZORRO_ID(ASDG, 0xFE, 0)
+#define ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X ZORRO_ID(ASDG, 0xFF, 0)
+
+#define ZORRO_MANUF_IMTRONICS_1 0x0404
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_1 ZORRO_ID(IMTRONICS_1, 0x39, 0)
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_2 ZORRO_ID(IMTRONICS_1, 0x57, 0)
+
+#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL 0x0406
+#define ZORRO_PROD_CBM_A2410 ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0)
+
+#define ZORRO_MANUF_AMERISTAR 0x041D
+#define ZORRO_PROD_AMERISTAR_A2065 ZORRO_ID(AMERISTAR, 0x01, 0)
+#define ZORRO_PROD_AMERISTAR_A560 ZORRO_ID(AMERISTAR, 0x09, 0)
+#define ZORRO_PROD_AMERISTAR_A4066 ZORRO_ID(AMERISTAR, 0x0A, 0)
+
+#define ZORRO_MANUF_SUPRA 0x0420
+#define ZORRO_PROD_SUPRA_SUPRADRIVE_4x4 ZORRO_ID(SUPRA, 0x01, 0)
+#define ZORRO_PROD_SUPRA_1000_RAM ZORRO_ID(SUPRA, 0x02, 0)
+#define ZORRO_PROD_SUPRA_2000_DMA ZORRO_ID(SUPRA, 0x03, 0)
+#define ZORRO_PROD_SUPRA_500 ZORRO_ID(SUPRA, 0x05, 0)
+#define ZORRO_PROD_SUPRA_500_SCSI ZORRO_ID(SUPRA, 0x08, 0)
+#define ZORRO_PROD_SUPRA_500XP_2000_RAM ZORRO_ID(SUPRA, 0x09, 0)
+#define ZORRO_PROD_SUPRA_500RX_2000_RAM ZORRO_ID(SUPRA, 0x0A, 0)
+#define ZORRO_PROD_SUPRA_2400ZI ZORRO_ID(SUPRA, 0x0B, 0)
+#define ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC ZORRO_ID(SUPRA, 0x0C, 0)
+#define ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II ZORRO_ID(SUPRA, 0x0D, 0)
+#define ZORRO_PROD_SUPRA_2400ZIPLUS ZORRO_ID(SUPRA, 0x10, 0)
+
+#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES 0x0422
+#define ZORRO_PROD_CSA_MAGNUM ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0)
+#define ZORRO_PROD_CSA_12_GAUGE ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0)
+
+#define ZORRO_MANUF_MARC_MICHAEL_GROTH 0x0439
+
+#define ZORRO_MANUF_M_TECH 0x0502
+#define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0)
+
+#define ZORRO_MANUF_BYTEBOX 0x07DA
+#define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0)
+
+#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC
+#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0)
+#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0)
+#define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0)
+#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0)
+#define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20)
+#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30)
+#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40)
+#define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60)
+#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70)
+#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78)
+#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98)
+#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0)
+#define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0)
+#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0)
+#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0)
+#define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0)
+#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0)
+#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8)
+#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)
+
+#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0)
+#define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0)
+#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0)
+
+#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5
+#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0)
+
+#define ZORRO_MANUF_XETEC 0x07E6
+#define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0)
+#define ZORRO_PROD_XETEC_FASTCARD_RAM ZORRO_ID(XETEC, 0x02, 0)
+#define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA
+#define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0)
+#define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0)
+#define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0)
+#define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0)
+
+#define ZORRO_MANUF_XEBEC 0x07EC
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0)
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3
+
+#define ZORRO_MANUF_BSC_ALFADATA_1 0x07FE
+#define ZORRO_PROD_BSC_ALF_3_1 ZORRO_ID(BSC_ALFADATA_1, 0x03, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_2 0x0801
+#define ZORRO_PROD_BSC_ALF_2_1 ZORRO_ID(BSC_ALFADATA_2, 0x01, 0)
+#define ZORRO_PROD_BSC_ALF_2_2 ZORRO_ID(BSC_ALFADATA_2, 0x02, 0)
+#define ZORRO_PROD_BSC_ALF_3_2 ZORRO_ID(BSC_ALFADATA_2, 0x03, 0)
+
+#define ZORRO_MANUF_CARDCO_2 0x0802
+#define ZORRO_PROD_CARDCO_KRONOS_2000_2 ZORRO_ID(CARDCO_2, 0x04, 0)
+#define ZORRO_PROD_CARDCO_A1000_2 ZORRO_ID(CARDCO_2, 0x0C, 0)
+
+#define ZORRO_MANUF_JOCHHEIM 0x0804
+#define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0)
+
+#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807
+#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0)
+
+#define ZORRO_MANUF_EDOTRONIK 0x0810
+#define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0)
+#define ZORRO_PROD_EDOTRONIK_8032 ZORRO_ID(EDOTRONIK, 0x02, 0)
+#define ZORRO_PROD_EDOTRONIK_MULTISERIAL ZORRO_ID(EDOTRONIK, 0x03, 0)
+#define ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER ZORRO_ID(EDOTRONIK, 0x04, 0)
+#define ZORRO_PROD_EDOTRONIK_PARALLEL_IO ZORRO_ID(EDOTRONIK, 0x05, 0)
+#define ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING ZORRO_ID(EDOTRONIK, 0x06, 0)
+#define ZORRO_PROD_EDOTRONIK_ADC ZORRO_ID(EDOTRONIK, 0x07, 0)
+#define ZORRO_PROD_EDOTRONIK_VME ZORRO_ID(EDOTRONIK, 0x08, 0)
+#define ZORRO_PROD_EDOTRONIK_DSP96000 ZORRO_ID(EDOTRONIK, 0x09, 0)
+
+#define ZORRO_MANUF_NES_INC 0x0813
+#define ZORRO_PROD_NES_INC_RAM ZORRO_ID(NES_INC, 0x00, 0)
+
+#define ZORRO_MANUF_ICD 0x0817
+#define ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI ZORRO_ID(ICD, 0x01, 0)
+#define ZORRO_PROD_ICD_ADVANTAGE_IDE ZORRO_ID(ICD, 0x03, 0)
+#define ZORRO_PROD_ICD_ADVANTAGE_2080_RAM ZORRO_ID(ICD, 0x04, 0)
+
+#define ZORRO_MANUF_KUPKE_2 0x0819
+#define ZORRO_PROD_KUPKE_OMTI ZORRO_ID(KUPKE_2, 0x01, 0)
+#define ZORRO_PROD_KUPKE_SCSI_II ZORRO_ID(KUPKE_2, 0x02, 0)
+#define ZORRO_PROD_KUPKE_GOLEM_BOX ZORRO_ID(KUPKE_2, 0x03, 0)
+#define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0)
+#define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D
+#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0)
+
+#define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E
+
+#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820
+#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0)
+
+#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828
+#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0)
+#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_3 0x082C
+#define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0)
+#define ZORRO_PROD_BSC_TANDEM_AT_2008_508 ZORRO_ID(BSC_ALFADATA_3, 0x06, 0)
+#define ZORRO_PROD_BSC_ALFA_RAM_1200 ZORRO_ID(BSC_ALFADATA_3, 0x07, 0)
+#define ZORRO_PROD_BSC_OKTAGON_2008_RAM ZORRO_ID(BSC_ALFADATA_3, 0x08, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_I ZORRO_ID(BSC_ALFADATA_3, 0x10, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_II ZORRO_ID(BSC_ALFADATA_3, 0x11, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_III ZORRO_ID(BSC_ALFADATA_3, 0x12, 0)
+#define ZORRO_PROD_BSC_FRAMEMASTER_II ZORRO_ID(BSC_ALFADATA_3, 0x20, 0)
+#define ZORRO_PROD_BSC_GRAFFITI_RAM ZORRO_ID(BSC_ALFADATA_3, 0x21, 0)
+#define ZORRO_PROD_BSC_GRAFFITI_REG ZORRO_ID(BSC_ALFADATA_3, 0x22, 0)
+#define ZORRO_PROD_BSC_ISDN_MASTERCARD ZORRO_ID(BSC_ALFADATA_3, 0x40, 0)
+#define ZORRO_PROD_BSC_ISDN_MASTERCARD_II ZORRO_ID(BSC_ALFADATA_3, 0x41, 0)
+
+#define ZORRO_MANUF_PHOENIX 0x0835
+#define ZORRO_PROD_PHOENIX_ST506 ZORRO_ID(PHOENIX, 0x21, 0)
+#define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0)
+#define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0)
+
+#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836
+#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0)
+
+#define ZORRO_MANUF_IMPULSE 0x0838
+#define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0)
+
+#define ZORRO_MANUF_IVS 0x0840
+#define ZORRO_PROD_IVS_GRANDSLAM_PIC_2 ZORRO_ID(IVS, 0x02, 0)
+#define ZORRO_PROD_IVS_GRANDSLAM_PIC_1 ZORRO_ID(IVS, 0x04, 0)
+#define ZORRO_PROD_IVS_OVERDRIVE ZORRO_ID(IVS, 0x10, 0)
+#define ZORRO_PROD_IVS_TRUMPCARD_CLASSIC ZORRO_ID(IVS, 0x30, 0)
+#define ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM ZORRO_ID(IVS, 0x34, 0)
+#define ZORRO_PROD_IVS_META_4 ZORRO_ID(IVS, 0x40, 0)
+#define ZORRO_PROD_IVS_WAVETOOLS ZORRO_ID(IVS, 0xBF, 0)
+#define ZORRO_PROD_IVS_VECTOR_1 ZORRO_ID(IVS, 0xF3, 0)
+#define ZORRO_PROD_IVS_VECTOR_2 ZORRO_ID(IVS, 0xF4, 0)
+
+#define ZORRO_MANUF_VECTOR_1 0x0841
+#define ZORRO_PROD_VECTOR_CONNECTION_1 ZORRO_ID(VECTOR_1, 0xE3, 0)
+
+#define ZORRO_MANUF_XPERT_PRODEV 0x0845
+#define ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM ZORRO_ID(XPERT_PRODEV, 0x01, 0)
+#define ZORRO_PROD_XPERT_PRODEV_VISIONA_REG ZORRO_ID(XPERT_PRODEV, 0x02, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM ZORRO_ID(XPERT_PRODEV, 0x03, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1 ZORRO_ID(XPERT_PRODEV, 0x04, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2 ZORRO_ID(XPERT_PRODEV, 0xC9, 0)
+
+#define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849
+#define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0)
+
+#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0)
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0)
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0)
+
+#define ZORRO_MANUF_TRICERATOPS 0x0850
+#define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0)
+
+#define ZORRO_MANUF_APPLIED_MAGIC 0x0851
+#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0)
+#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0)
+
+#define ZORRO_MANUF_GFX_BASE 0x085E
+#define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0)
+#define ZORRO_PROD_GFX_BASE_GDA_1 ZORRO_ID(GFX_BASE, 0x01, 0)
+
+#define ZORRO_MANUF_ROCTEC 0x0860
+#define ZORRO_PROD_ROCTEC_RH_800C ZORRO_ID(ROCTEC, 0x01, 0)
+#define ZORRO_PROD_ROCTEC_RH_800C_RAM ZORRO_ID(ROCTEC, 0x01, 0)
+
+#define ZORRO_MANUF_KATO 0x0861
+#define ZORRO_PROD_KATO_MELODY ZORRO_ID(KATO, 0x80, 0)
+
+#define ZORRO_MANUF_HELFRICH_1 0x0861
+#define ZORRO_PROD_HELFRICH_RAINBOW_II ZORRO_ID(HELFRICH_1, 0x20, 0)
+#define ZORRO_PROD_HELFRICH_RAINBOW_III ZORRO_ID(HELFRICH_1, 0x21, 0)
+
+#define ZORRO_MANUF_ATLANTIS 0x0862
+
+#define ZORRO_MANUF_PROTAR 0x0864
+
+#define ZORRO_MANUF_ACS 0x0865
+
+#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866
+#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0)
+
+#define ZORRO_MANUF_MASOBOSHI 0x086D
+#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0)
+#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702 ZORRO_ID(MASOBOSHI, 0x04, 0)
+#define ZORRO_PROD_MASOBOSHI_MVD_819 ZORRO_ID(MASOBOSHI, 0x07, 0)
+
+#define ZORRO_MANUF_MAINHATTAN_DATA 0x086F
+#define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0)
+
+#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0)
+
+#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B
+#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0)
+#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0)
+
+#define ZORRO_MANUF_AMITRIX 0x0880
+#define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0)
+#define ZORRO_PROD_AMITRIX_CD_RAM ZORRO_ID(AMITRIX, 0x02, 0)
+
+#define ZORRO_MANUF_ARMAX 0x0885
+#define ZORRO_PROD_ARMAX_OMNIBUS ZORRO_ID(ARMAX, 0x00, 0)
+
+#define ZORRO_MANUF_ZEUS 0x088D
+#define ZORRO_PROD_ZEUS_SPIDER ZORRO_ID(ZEUS, 0x04, 0)
+
+#define ZORRO_MANUF_NEWTEK 0x088F
+#define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0)
+
+#define ZORRO_MANUF_M_TECH_GERMANY 0x0890
+#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0)
+#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0)
+#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0)
+#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0)
+#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0)
+#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0)
+#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891
+#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0)
+#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0)
+
+#define ZORRO_MANUF_APOLLO_1 0x0892
+#define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0)
+
+#define ZORRO_MANUF_HELFRICH_2 0x0893
+#define ZORRO_PROD_HELFRICH_PICCOLO_RAM ZORRO_ID(HELFRICH_2, 0x05, 0)
+#define ZORRO_PROD_HELFRICH_PICCOLO_REG ZORRO_ID(HELFRICH_2, 0x06, 0)
+#define ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG ZORRO_ID(HELFRICH_2, 0x07, 0)
+#define ZORRO_PROD_HELFRICH_VIDEOCRUNCHER ZORRO_ID(HELFRICH_2, 0x08, 0)
+#define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0)
+#define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B
+#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0)
+
+#define ZORRO_MANUF_ELBOX_COMPUTER 0x089E
+#define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0)
+
+#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00
+#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0)
+#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0)
+
+#define ZORRO_MANUF_MICRONIK 0x0A50
+#define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0)
+
+#define ZORRO_MANUF_MICRONIK2 0x0F0F
+#define ZORRO_PROD_MICRONIK2_Z3I ZORRO_ID(MICRONIK2, 0x01, 0)
+
+#define ZORRO_MANUF_MEGAMICRO 0x1000
+#define ZORRO_PROD_MEGAMICRO_SCRAM_500 ZORRO_ID(MEGAMICRO, 0x03, 0)
+#define ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM ZORRO_ID(MEGAMICRO, 0x04, 0)
+
+#define ZORRO_MANUF_IMTRONICS_2 0x1028
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_3 ZORRO_ID(IMTRONICS_2, 0x39, 0)
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0)
+
+#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0)
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0)
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0)
+
+#define ZORRO_MANUF_KUPKE_3 0x1248
+#define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0)
+
+#define ZORRO_MANUF_ITH 0x1388
+#define ZORRO_PROD_ITH_ISDN_MASTER_II ZORRO_ID(ITH, 0x01, 0)
+
+#define ZORRO_MANUF_VMC 0x1389
+#define ZORRO_PROD_VMC_ISDN_BLASTER_Z2 ZORRO_ID(VMC, 0x01, 0)
+#define ZORRO_PROD_VMC_HYPERCOM_4 ZORRO_ID(VMC, 0x02, 0)
+
+#define ZORRO_MANUF_INFORMATION 0x157C
+#define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0)
+
+#define ZORRO_MANUF_VORTEX 0x2017
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX ZORRO_ID(VORTEX, 0x07, 0)
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0)
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0)
+
+#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062
+#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0)
+
+#define ZORRO_MANUF_READYSOFT 0x2100
+#define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0)
+
+#define ZORRO_MANUF_PHASE5 0x2140
+#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0)
+#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0)
+#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0)
+#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0)
+
+#define ZORRO_MANUF_DPS 0x2169
+#define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_2 0x2200
+#define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0)
+#define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_3 0x2222
+#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0)
+#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0)
+
+#define ZORRO_MANUF_PETSOFF_LP 0x38A5
+#define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0)
+#define ZORRO_PROD_PETSOFF_LP_DELFINA_LITE ZORRO_ID(PETSOFF_LP, 0x01, 0)
+
+#define ZORRO_MANUF_UWE_GERLACH 0x3FF7
+#define ZORRO_PROD_UWE_GERLACH_RAM_ROM ZORRO_ID(UWE_GERLACH, 0xd4, 0)
+
+#define ZORRO_MANUF_ACT 0x4231
+#define ZORRO_PROD_ACT_PRELUDE ZORRO_ID(ACT, 0x01, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754
+#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0)
+#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0)
+#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0)
+#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0)
+#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0)
+#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0)
+#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0)
+#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0)
+#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0)
+#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0)
+
+#define ZORRO_MANUF_COMBITEC 0x6766
+
+#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000
+#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0)
+#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0)
+
+#define ZORRO_MANUF_REIS_WARE_2 0xA9AD
+#define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0)
+
+#define ZORRO_MANUF_CAMERON 0xAA01
+#define ZORRO_PROD_CAMERON_PERSONAL_A4 ZORRO_ID(CAMERON, 0x10, 0)
+
+#define ZORRO_MANUF_REIS_WARE 0xAA11
+#define ZORRO_PROD_REIS_WARE_HANDYSCANNER ZORRO_ID(REIS_WARE, 0x11, 0)
+
+#define ZORRO_MANUF_PHOENIX_2 0xB5A8
+#define ZORRO_PROD_PHOENIX_ST506_2 ZORRO_ID(PHOENIX_2, 0x21, 0)
+#define ZORRO_PROD_PHOENIX_SCSI_2 ZORRO_ID(PHOENIX_2, 0x22, 0)
+#define ZORRO_PROD_PHOENIX_RAM_2 ZORRO_ID(PHOENIX_2, 0xBE, 0)
+
+#define ZORRO_MANUF_COMBITEC_2 0xC008
+#define ZORRO_PROD_COMBITEC_HD ZORRO_ID(COMBITEC_2, 0x2A, 0)
+#define ZORRO_PROD_COMBITEC_SRAM ZORRO_ID(COMBITEC_2, 0x2B, 0)
+
+#define ZORRO_MANUF_HACKER 0x07DB
+#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0)
+#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0)
+#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0)
diff --git a/6/platforms/android-3/arch-arm/usr/include/locale.h b/6/platforms/android-3/arch-arm/usr/include/locale.h
new file mode 100644
index 0000000..4259ddd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/locale.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _LOCALE_H_
+#define _LOCALE_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+enum {
+ LC_CTYPE = 0,
+ LC_NUMERIC = 1,
+ LC_TIME = 2,
+ LC_COLLATE = 3,
+ LC_MONETARY = 4,
+ LC_MESSAGES = 5,
+ LC_ALL = 6,
+ LC_PAPER = 7,
+ LC_NAME = 8,
+ LC_ADDRESS = 9,
+
+ LC_TELEPHONE = 10,
+ LC_MEASUREMENT = 11,
+ LC_IDENTIFICATION = 12
+};
+
+extern char *setlocale(int category, const char *locale);
+
+#if 1 /* MISSING FROM BIONIC - DEFINED TO MAKE libstdc++-v3 happy */
+struct lconv { };
+struct lconv *localeconv(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _LOCALE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/_types.h b/6/platforms/android-3/arch-arm/usr/include/machine/_types.h
new file mode 100644
index 0000000..6d10e12
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/_types.h
@@ -0,0 +1,127 @@
+/* $OpenBSD: _types.h,v 1.3 2006/02/14 18:12:58 miod Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)types.h 8.3 (Berkeley) 1/5/94
+ * @(#)ansi.h 8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _ARM__TYPES_H_
+#define _ARM__TYPES_H_
+
+
+#if !defined(__ARM_EABI__)
+/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
+#define _SIZE_T
+#define _SSIZE_T
+#define _PTRDIFF_T
+typedef unsigned long size_t;
+typedef long ssize_t;
+typedef long ptrdiff_t;
+#endif
+
+//#include <linux/types.h>
+
+/* 7.18.1.1 Exact-width integer types */
+typedef __signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef short __int16_t;
+typedef unsigned short __uint16_t;
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+/* LONGLONG */
+typedef long long __int64_t;
+/* LONGLONG */
+typedef unsigned long long __uint64_t;
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef __int8_t __int_least8_t;
+typedef __uint8_t __uint_least8_t;
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types */
+typedef __int32_t __int_fast8_t;
+typedef __uint32_t __uint_fast8_t;
+typedef __int32_t __int_fast16_t;
+typedef __uint32_t __uint_fast16_t;
+typedef __int32_t __int_fast32_t;
+typedef __uint32_t __uint_fast32_t;
+typedef __int64_t __int_fast64_t;
+typedef __uint64_t __uint_fast64_t;
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+typedef int __intptr_t;
+typedef unsigned int __uintptr_t;
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef __int64_t __intmax_t;
+typedef __uint64_t __uintmax_t;
+
+/* Register size */
+typedef __int32_t __register_t;
+
+/* VM system types */
+typedef unsigned long __vaddr_t;
+typedef unsigned long __paddr_t;
+typedef unsigned long __vsize_t;
+typedef unsigned long __psize_t;
+
+/* Standard system types */
+typedef int __clock_t;
+typedef int __clockid_t;
+typedef long __ptrdiff_t;
+typedef int __time_t;
+typedef int __timer_t;
+#if defined(__GNUC__) && __GNUC__ >= 3
+typedef __builtin_va_list __va_list;
+#else
+typedef char * __va_list;
+#endif
+
+/* Wide character support types */
+#ifndef __cplusplus
+typedef int __wchar_t;
+#endif
+typedef int __wint_t;
+typedef int __rune_t;
+typedef void * __wctrans_t;
+typedef void * __wctype_t;
+
+#ifdef __ARMEB__
+#define _BYTE_ORDER _BIG_ENDIAN
+#else
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#endif
+
+#endif /* _ARM__TYPES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/asm.h b/6/platforms/android-3/arch-arm/usr/include/machine/asm.h
new file mode 100644
index 0000000..c7bd017
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/asm.h
@@ -0,0 +1,130 @@
+/* $OpenBSD: asm.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */
+
+/*
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * from: @(#)asm.h 5.5 (Berkeley) 5/7/91
+ */
+
+#ifndef _ARM32_ASM_H_
+#define _ARM32_ASM_H_
+
+#ifdef __ELF__
+# define _C_LABEL(x) x
+#else
+# ifdef __STDC__
+# define _C_LABEL(x) _ ## x
+# else
+# define _C_LABEL(x) _/**/x
+# endif
+#endif
+#define _ASM_LABEL(x) x
+
+#ifdef __STDC__
+# define __CONCAT(x,y) x ## y
+# define __STRING(x) #x
+#else
+# define __CONCAT(x,y) x/**/y
+# define __STRING(x) "x"
+#endif
+
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 0
+#endif
+
+/*
+ * gas/arm uses @ as a single comment character and thus cannot be used here
+ * Instead it recognised the # instead of an @ symbols in .type directives
+ * We define a couple of macros so that assembly code will not be dependant
+ * on one or the other.
+ */
+#define _ASM_TYPE_FUNCTION #function
+#define _ASM_TYPE_OBJECT #object
+#define _ENTRY(x) \
+ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:
+
+#ifdef GPROF
+# ifdef __ELF__
+# define _PROF_PROLOGUE \
+ mov ip, lr; bl __mcount
+# else
+# define _PROF_PROLOGUE \
+ mov ip,lr; bl mcount
+# endif
+#else
+# define _PROF_PROLOGUE
+#endif
+
+#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
+#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))
+#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
+#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
+
+#define ASMSTR .asciz
+
+#if defined(__ELF__) && defined(PIC)
+#ifdef __STDC__
+#define PIC_SYM(x,y) x ## ( ## y ## )
+#else
+#define PIC_SYM(x,y) x/**/(/**/y/**/)
+#endif
+#else
+#define PIC_SYM(x,y) x
+#endif
+
+#ifdef __ELF__
+#define RCSID(x) .section ".ident"; .asciz x
+#else
+#define RCSID(x) .text; .asciz x
+#endif
+
+#ifdef __ELF__
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; \
+ alias = sym
+#endif
+
+#ifdef __STDC__
+#define WARN_REFERENCES(sym,msg) \
+ .stabs msg ## ,30,0,0,0 ; \
+ .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0
+#elif defined(__ELF__)
+#define WARN_REFERENCES(sym,msg) \
+ .stabs msg,30,0,0,0 ; \
+ .stabs __STRING(sym),1,0,0,0
+#else
+#define WARN_REFERENCES(sym,msg) \
+ .stabs msg,30,0,0,0 ; \
+ .stabs __STRING(_/**/sym),1,0,0,0
+#endif /* __STDC__ */
+
+#endif /* !_ARM_ASM_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/cdefs.h b/6/platforms/android-3/arch-arm/usr/include/machine/cdefs.h
new file mode 100644
index 0000000..44f1542
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/cdefs.h
@@ -0,0 +1,19 @@
+/* $OpenBSD: cdefs.h,v 1.2 2005/11/24 20:46:44 deraadt Exp $ */
+
+#ifndef _MACHINE_CDEFS_H_
+#define _MACHINE_CDEFS_H_
+
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \
+ " = " __STRING(sym));
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text");
+#endif
+
+#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/cpu-features.h b/6/platforms/android-3/arch-arm/usr/include/machine/cpu-features.h
new file mode 100644
index 0000000..f836006
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/cpu-features.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ARM_MACHINE_CPU_FEATURES_H
+#define _ARM_MACHINE_CPU_FEATURES_H
+
+/* The purpose of this file is to define several macros corresponding
+ * to CPU features that may or may not be available at build time on
+ * on the target CPU.
+ *
+ * This is done to abstract us from the various ARM Architecture
+ * quirks and alphabet soup.
+ *
+ * IMPORTANT: We have no intention to support anything below an ARMv4T !
+ */
+
+/* _ARM_ARCH_REVISION is a number corresponding to the ARM revision
+ * we're going to support
+ *
+ * it looks like our toolchain doesn't define __ARM_ARCH__
+ * so try to guess it.
+ *
+ *
+ *
+ */
+#ifndef __ARM_ARCH__
+
+# if defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ || \
+ defined __ARM_ARCH_7R__ || defined __ARM_ARCH_7M__
+
+# define __ARM_ARCH__ 7
+
+# elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ || \
+ defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6Z__ || \
+ defined __ARM_ARCH_6KZ__ || defined __ARM_ARCH_6T2__
+#
+# define __ARM_ARCH__ 6
+#
+# elif defined __ARM_ARCH_5__ || defined __ARM_ARCH_5T__ || \
+ defined __ARM_ARCH_5TE__ || defined __ARM_ARCH_5TEJ__
+#
+# define __ARM_ARCH__ 5
+#
+# elif defined __ARM_ARCH_4T__
+#
+# define __ARM_ARCH__ 4
+#
+# elif defined __ARM_ARCH_4__
+# error ARMv4 is not supported, please use ARMv4T at a minimum
+# else
+# error Unknown or unsupported ARM architecture
+# endif
+#endif
+
+/* experimental feature used to check that our ARMv4 workarounds
+ * work correctly without a real ARMv4 machine */
+#ifdef BIONIC_EXPERIMENTAL_FORCE_ARMV4
+# undef __ARM_ARCH__
+# define __ARM_ARCH__ 4
+#endif
+
+/* define __ARM_HAVE_5TE if we have the ARMv5TE instructions */
+#if __ARM_ARCH__ > 5
+# define __ARM_HAVE_5TE 1
+#elif __ARM_ARCH__ == 5
+# if defined __ARM_ARCH_5TE__ || defined __ARM_ARCH_5TEJ__
+# define __ARM_HAVE_5TE 1
+# endif
+#endif
+
+/* instructions introduced in ARMv5 */
+#if __ARM_ARCH__ >= 5
+# define __ARM_HAVE_BLX 1
+# define __ARM_HAVE_CLZ 1
+# define __ARM_HAVE_LDC2 1
+# define __ARM_HAVE_MCR2 1
+# define __ARM_HAVE_MRC2 1
+# define __ARM_HAVE_STC2 1
+#endif
+
+/* ARMv5TE introduces a few instructions */
+#if __ARM_HAVE_5TE
+# define __ARM_HAVE_PLD 1
+# define __ARM_HAVE_MCRR 1
+# define __ARM_HAVE_MRRC 1
+#endif
+
+/* define __ARM_HAVE_HALFWORD_MULTIPLY when half-word multiply instructions
+ * this means variants of: smul, smulw, smla, smlaw, smlal
+ */
+#if __ARM_HAVE_5TE
+# define __ARM_HAVE_HALFWORD_MULTIPLY 1
+#endif
+
+/* define __ARM_HAVE_PAIR_LOAD_STORE when 64-bit memory loads and stored
+ * into/from a pair of 32-bit registers is supported throuhg 'ldrd' and 'strd'
+ */
+#if __ARM_HAVE_5TE
+# define __ARM_HAVE_PAIR_LOAD_STORE 1
+#endif
+
+/* define __ARM_HAVE_SATURATED_ARITHMETIC is you have the saturated integer
+ * arithmetic instructions: qdd, qdadd, qsub, qdsub
+ */
+#if __ARM_HAVE_5TE
+# define __ARM_HAVE_SATURATED_ARITHMETIC 1
+#endif
+
+/* define __ARM_HAVE_PC_INTERWORK when a direct assignment to the
+ * pc register will switch into thumb/ARM mode depending on bit 0
+ * of the new instruction address. Before ARMv5, this was not the
+ * case, and you have to write:
+ *
+ * mov r0, [<some address>]
+ * bx r0
+ *
+ * instead of:
+ *
+ * ldr pc, [<some address>]
+ *
+ * note that this affects any instruction that explicitely changes the
+ * value of the pc register, including ldm { ...,pc } or 'add pc, #offset'
+ */
+#if __ARM_ARCH__ >= 5
+# define __ARM_HAVE_PC_INTERWORK
+#endif
+
+
+/* Assembly-only macros */
+
+/* define a handy PLD(address) macro since the cache preload
+ * is an optional opcode
+ */
+#if __ARM_HAVE_PLD
+# define PLD(reg,offset) pld [reg, offset]
+#else
+# define PLD(reg,offset) /* nothing */
+#endif
+
+#endif /* _ARM_MACHINE_CPU_FEATURES_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/exec.h b/6/platforms/android-3/arch-arm/usr/include/machine/exec.h
new file mode 100644
index 0000000..227b207
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/exec.h
@@ -0,0 +1,50 @@
+/* $OpenBSD: exec.h,v 1.9 2003/04/17 03:42:14 drahn Exp $ */
+/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _ARM_EXEC_H_
+#define _ARM_EXEC_H_
+
+#define __LDPGSZ 4096
+
+#define NATIVE_EXEC_ELF
+
+#define ARCH_ELFSIZE 32
+
+#define ELF_TARG_CLASS ELFCLASS32
+#define ELF_TARG_DATA ELFDATA2LSB
+#define ELF_TARG_MACH EM_ARM
+
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#define _KERN_DO_ELF
+
+#endif /* _ARM_EXEC_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/ieee.h b/6/platforms/android-3/arch-arm/usr/include/machine/ieee.h
new file mode 100644
index 0000000..5f9b89e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/ieee.h
@@ -0,0 +1,191 @@
+/* $OpenBSD: ieee.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $NetBSD: ieee.h,v 1.2 2001/02/21 17:43:50 bjh21 Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ieee.h 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * ieee.h defines the machine-dependent layout of the machine's IEEE
+ * floating point.
+ */
+
+/*
+ * Define the number of bits in each fraction and exponent.
+ *
+ * k k+1
+ * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented
+ *
+ * (-exp_bias+1)
+ * as fractions that look like 0.fffff x 2 . This means that
+ *
+ * -126
+ * the number 0.10000 x 2 , for instance, is the same as the normalized
+ *
+ * -127 -128
+ * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero
+ *
+ * -129
+ * in the fraction; to represent 2 , we need two, and so on. This
+ *
+ * (-exp_bias-fracbits+1)
+ * implies that the smallest denormalized number is 2
+ *
+ * for whichever format we are talking about: for single precision, for
+ *
+ * -126 -149
+ * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and
+ *
+ * -149 == -127 - 23 + 1.
+ */
+
+/*
+ * The ARM has two sets of FP data formats. The FPA supports 32-bit, 64-bit
+ * and 96-bit IEEE formats, with the words in big-endian order. VFP supports
+ * 32-bin and 64-bit IEEE formats with the words in the CPU's native byte
+ * order.
+ *
+ * The FPA also has two packed decimal formats, but we ignore them here.
+ */
+
+#define SNG_EXPBITS 8
+#define SNG_FRACBITS 23
+
+#define DBL_EXPBITS 11
+#define DBL_FRACBITS 52
+
+#ifndef __VFP_FP__
+#define E80_EXPBITS 15
+#define E80_FRACBITS 64
+
+#define EXT_EXPBITS 15
+#define EXT_FRACBITS 112
+#endif
+
+struct ieee_single {
+ u_int sng_frac:23;
+ u_int sng_exponent:8;
+ u_int sng_sign:1;
+};
+
+#ifdef __VFP_FP__
+struct ieee_double {
+#ifdef __ARMEB__
+ u_int dbl_sign:1;
+ u_int dbl_exp:11;
+ u_int dbl_frach:20;
+ u_int dbl_fracl;
+#else /* !__ARMEB__ */
+ u_int dbl_fracl;
+ u_int dbl_frach:20;
+ u_int dbl_exp:11;
+ u_int dbl_sign:1;
+#endif /* !__ARMEB__ */
+};
+#else /* !__VFP_FP__ */
+struct ieee_double {
+ u_int dbl_frach:20;
+ u_int dbl_exp:11;
+ u_int dbl_sign:1;
+ u_int dbl_fracl;
+};
+
+union ieee_double_u {
+ double dblu_d;
+ struct ieee_double dblu_dbl;
+};
+
+
+struct ieee_e80 {
+ u_int e80_exp:15;
+ u_int e80_zero:16;
+ u_int e80_sign:1;
+ u_int e80_frach:31;
+ u_int e80_j:1;
+ u_int e80_fracl;
+};
+
+struct ieee_ext {
+ u_int ext_frach:16;
+ u_int ext_exp:15;
+ u_int ext_sign:1;
+ u_int ext_frachm;
+ u_int ext_fraclm;
+ u_int ext_fracl;
+};
+#endif /* !__VFP_FP__ */
+
+/*
+ * Floats whose exponent is in [1..INFNAN) (of whatever type) are
+ * `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
+ * Floats whose exponent is zero are either zero (iff all fraction
+ * bits are zero) or subnormal values.
+ *
+ * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
+ * high fraction; if the bit is set, it is a `quiet NaN'.
+ */
+#define SNG_EXP_INFNAN 255
+#define DBL_EXP_INFNAN 2047
+#ifndef __VFP_FP__
+#define E80_EXP_INFNAN 32767
+#define EXT_EXP_INFNAN 32767
+#endif /* !__VFP_FP__ */
+
+#if 0
+#define SNG_QUIETNAN (1 << 22)
+#define DBL_QUIETNAN (1 << 19)
+#ifndef __VFP_FP__
+#define E80_QUIETNAN (1 << 15)
+#define EXT_QUIETNAN (1 << 15)
+#endif /* !__VFP_FP__ */
+#endif
+
+/*
+ * Exponent biases.
+ */
+#define SNG_EXP_BIAS 127
+#define DBL_EXP_BIAS 1023
+#ifndef __VFP_FP__
+#define E80_EXP_BIAS 16383
+#define EXT_EXP_BIAS 16383
+#endif /* !__VFP_FP__ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/internal_types.h b/6/platforms/android-3/arch-arm/usr/include/machine/internal_types.h
new file mode 100644
index 0000000..7e610b0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/internal_types.h
@@ -0,0 +1,10 @@
+/* $OpenBSD: internal_types.h,v 1.2 2004/05/06 15:53:39 drahn Exp $ */
+/* Public domain */
+#ifndef _ARM_INTERNAL_TYPES_H_
+#define _ARM_INTERNAL_TYPES_H_
+
+#ifdef __CHAR_UNSIGNED__
+#define __machine_has_unsigned_chars
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/kernel.h b/6/platforms/android-3/arch-arm/usr/include/machine/kernel.h
new file mode 100644
index 0000000..462b8e3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/kernel.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ARCH_ARM_KERNEL_H
+#define _ARCH_ARM_KERNEL_H
+
+/* this file contains kernel-specific definitions that were optimized out of
+ our processed kernel headers, but still useful nonetheless... */
+
+typedef unsigned long __kernel_blkcnt_t;
+typedef unsigned long __kernel_blksize_t;
+
+/* these aren't really defined by the kernel headers though... */
+typedef unsigned long __kernel_fsblkcnt_t;
+typedef unsigned long __kernel_fsfilcnt_t;
+typedef unsigned int __kernel_id_t;
+
+#endif /* _ARCH_ARM_KERNEL_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/limits.h b/6/platforms/android-3/arch-arm/usr/include/machine/limits.h
new file mode 100644
index 0000000..f9c04fa
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/limits.h
@@ -0,0 +1,63 @@
+/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:46 millert Exp $ */
+/* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */
+
+/*
+ * Copyright (c) 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * from: @(#)limits.h 7.2 (Berkeley) 6/28/90
+ */
+
+#ifndef _ARM32_LIMITS_H_
+#define _ARM32_LIMITS_H_
+
+#include <sys/cdefs.h>
+
+#define MB_LEN_MAX 1 /* no multibyte characters */
+
+#ifndef SIZE_MAX
+#define SIZE_MAX UINT_MAX /* max value for a size_t */
+#endif
+#ifndef SSIZE_MAX
+#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
+#endif
+
+#if __BSD_VISIBLE
+#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */
+
+#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
+#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
+#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
+
+#endif /* __BSD_VISIBLE */
+
+#define LONGLONG_BIT 64
+#define LONGLONG_MIN (-9223372036854775807LL-1)
+#define LONGLONG_MAX 9223372036854775807LL
+#define ULONGLONG_MAX 18446744073709551615ULL
+
+#endif /* _ARM32_LIMITS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/machine/setjmp.h b/6/platforms/android-3/arch-arm/usr/include/machine/setjmp.h
new file mode 100644
index 0000000..f20cab2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/machine/setjmp.h
@@ -0,0 +1,87 @@
+/* $OpenBSD: setjmp.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $NetBSD: setjmp.h,v 1.2 2001/08/25 14:45:59 bjh21 Exp $ */
+
+/*
+ * machine/setjmp.h: machine dependent setjmp-related information.
+ */
+
+#ifdef __ELF__
+#define _JBLEN 64 /* size, in longs, of a jmp_buf */
+#else
+#define _JBLEN 29 /* size, in longs, of a jmp_buf */
+#endif
+
+/*
+ * NOTE: The internal structure of a jmp_buf is *PRIVATE*
+ * This information is provided as there is software
+ * that fiddles with this with obtain the stack pointer
+ * (yes really ! and its commercial !).
+ *
+ * Description of the setjmp buffer
+ *
+ * word 0 magic number (dependant on creator)
+ * 1 - 3 f4 fp register 4
+ * 4 - 6 f5 fp register 5
+ * 7 - 9 f6 fp register 6
+ * 10 - 12 f7 fp register 7
+ * 13 fpsr fp status register
+ * 14 r4 register 4
+ * 15 r5 register 5
+ * 16 r6 register 6
+ * 17 r7 register 7
+ * 18 r8 register 8
+ * 19 r9 register 9
+ * 20 r10 register 10 (sl)
+ * 21 r11 register 11 (fp)
+ * 22 r12 register 12 (ip)
+ * 23 r13 register 13 (sp)
+ * 24 r14 register 14 (lr)
+ * 25 signal mask (dependant on magic)
+ * 26 (con't)
+ * 27 (con't)
+ * 28 (con't)
+ *
+ * The magic number number identifies the jmp_buf and
+ * how the buffer was created as well as providing
+ * a sanity check
+ *
+ * A side note I should mention - Please do not tamper
+ * with the floating point fields. While they are
+ * always saved and restored at the moment this cannot
+ * be garenteed especially if the compiler happens
+ * to be generating soft-float code so no fp
+ * registers will be used.
+ *
+ * Whilst this can be seen an encouraging people to
+ * use the setjmp buffer in this way I think that it
+ * is for the best then if changes occur compiles will
+ * break rather than just having new builds falling over
+ * mysteriously.
+ */
+
+#define _JB_MAGIC__SETJMP 0x4278f500
+#define _JB_MAGIC_SETJMP 0x4278f501
+
+/* Valid for all jmp_buf's */
+
+#define _JB_MAGIC 0
+#define _JB_REG_F4 1
+#define _JB_REG_F5 4
+#define _JB_REG_F6 7
+#define _JB_REG_F7 10
+#define _JB_REG_FPSR 13
+#define _JB_REG_R4 14
+#define _JB_REG_R5 15
+#define _JB_REG_R6 16
+#define _JB_REG_R7 17
+#define _JB_REG_R8 18
+#define _JB_REG_R9 19
+#define _JB_REG_R10 20
+#define _JB_REG_R11 21
+#define _JB_REG_R12 22
+#define _JB_REG_R13 23
+#define _JB_REG_R14 24
+
+/* Only valid with the _JB_MAGIC_SETJMP magic */
+
+#define _JB_SIGMASK 25
diff --git a/6/platforms/android-3/arch-arm/usr/include/malloc.h b/6/platforms/android-3/arch-arm/usr/include/malloc.h
new file mode 100644
index 0000000..a864286
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/malloc.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _MALLOC_H_
+#define _MALLOC_H_
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+
+__BEGIN_DECLS
+
+extern __mallocfunc void* malloc(size_t);
+extern __mallocfunc void* calloc(size_t, size_t);
+extern __mallocfunc void* realloc(void *, size_t);
+extern void free(void *);
+
+extern void* memalign(size_t alignment, size_t bytesize);
+extern void* valloc(size_t bytesize);
+extern void* pvalloc(size_t bytesize);
+extern int mallopt(int param_number, int param_value);
+extern size_t malloc_footprint(void);
+extern size_t malloc_max_footprint(void);
+
+struct mallinfo {
+ size_t arena; /* non-mmapped space allocated from system */
+ size_t ordblks; /* number of free chunks */
+ size_t smblks; /* always 0 */
+ size_t hblks; /* always 0 */
+ size_t hblkhd; /* space in mmapped regions */
+ size_t usmblks; /* maximum total allocated space */
+ size_t fsmblks; /* always 0 */
+ size_t uordblks; /* total allocated space */
+ size_t fordblks; /* total free space */
+ size_t keepcost; /* releasable (via malloc_trim) space */
+};
+
+extern struct mallinfo mallinfo(void);
+
+
+/*
+ malloc_usable_size(void* p);
+
+ Returns the number of bytes you can actually use in
+ an allocated chunk, which may be more than you requested (although
+ often not) due to alignment and minimum size constraints.
+ You can use this many bytes without worrying about
+ overwriting other allocated objects. This is not a particularly great
+ programming practice. malloc_usable_size can be more useful in
+ debugging and assertions, for example:
+
+ p = malloc(n);
+ assert(malloc_usable_size(p) >= 256);
+*/
+extern size_t malloc_usable_size(void* block);
+
+/*
+ malloc_stats();
+ Prints on stderr the amount of space obtained from the system (both
+ via sbrk and mmap), the maximum amount (which may be more than
+ current if malloc_trim and/or munmap got called), and the current
+ number of bytes allocated via malloc (or realloc, etc) but not yet
+ freed. Note that this is the number of bytes allocated, not the
+ number requested. It will be larger than the number requested
+ because of alignment and bookkeeping overhead. Because it includes
+ alignment wastage as being in use, this figure may be greater than
+ zero even when no user-level chunks are allocated.
+
+ The reported current and maximum system memory can be inaccurate if
+ a program makes other calls to system memory allocation functions
+ (normally sbrk) outside of malloc.
+
+ malloc_stats prints only the most commonly interesting statistics.
+ More information can be obtained by calling mallinfo.
+*/
+extern void malloc_stats(void);
+
+__END_DECLS
+
+#endif /* _MALLOC_H_ */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/math.h b/6/platforms/android-3/arch-arm/usr/include/math.h
new file mode 100644
index 0000000..ef6a9e6
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/math.h
@@ -0,0 +1,486 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
+ */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#define __pure2
+
+/*
+ * ANSI/POSIX
+ */
+extern const union __infinity_un {
+ unsigned char __uc[8];
+ double __ud;
+} __infinity;
+
+extern const union __nan_un {
+ unsigned char __uc[sizeof(float)];
+ float __uf;
+} __nan;
+
+/* #if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) */
+#if 1
+#define __MATH_BUILTIN_CONSTANTS
+#endif
+
+/* #if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER) */
+#if 1
+#define __MATH_BUILTIN_RELOPS
+#endif
+
+/* #ifdef __MATH_BUILTIN_CONSTANTS */
+#if 1
+#define HUGE_VAL __builtin_huge_val()
+#else
+#define HUGE_VAL (__infinity.__ud)
+#endif
+
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+#define FP_ILOGB0 (-__INT_MAX)
+#define FP_ILOGBNAN __INT_MAX
+#else
+#define FP_ILOGB0 (-INT_MAX)
+#define FP_ILOGBNAN INT_MAX
+#endif
+
+#ifdef __MATH_BUILTIN_CONSTANTS
+#define HUGE_VALF __builtin_huge_valf()
+#define HUGE_VALL __builtin_huge_vall()
+#define INFINITY __builtin_inf()
+#define NAN __builtin_nan("")
+#else
+#define HUGE_VALF (float)HUGE_VAL
+#define HUGE_VALL (long double)HUGE_VAL
+#define INFINITY HUGE_VALF
+#define NAN (__nan.__uf)
+#endif /* __MATH_BUILTIN_CONSTANTS */
+
+#define MATH_ERRNO 1
+#define MATH_ERREXCEPT 2
+#define math_errhandling MATH_ERREXCEPT
+
+/* XXX We need a <machine/math.h>. */
+#if defined(__ia64__) || defined(__sparc64__)
+#define FP_FAST_FMA
+#endif
+#ifdef __ia64__
+#define FP_FAST_FMAL
+#endif
+#define FP_FAST_FMAF
+
+/* Symbolic constants to classify floating point numbers. */
+#define FP_INFINITE 0x01
+#define FP_NAN 0x02
+#define FP_NORMAL 0x04
+#define FP_SUBNORMAL 0x08
+#define FP_ZERO 0x10
+#define fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
+ : __fpclassifyl(x))
+
+#define isfinite(x) \
+ ((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
+ : (sizeof (x) == sizeof (double)) ? __isfinite(x) \
+ : __isfinitel(x))
+#define isinf(x) \
+ ((sizeof (x) == sizeof (float)) ? __isinff(x) \
+ : (sizeof (x) == sizeof (double)) ? __isinf(x) \
+ : __isinfl(x))
+#define isnan(x) \
+ ((sizeof (x) == sizeof (float)) ? isnanf(x) \
+ : (sizeof (x) == sizeof (double)) ? isnan(x) \
+ : __isnanl(x))
+#define isnormal(x) \
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
+ : __isnormall(x))
+
+#ifdef __MATH_BUILTIN_RELOPS
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+#else
+#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
+#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
+#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
+#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
+#define islessgreater(x, y) (!isunordered((x), (y)) && \
+ ((x) > (y) || (y) > (x)))
+#define isunordered(x, y) (isnan(x) || isnan(y))
+#endif /* __MATH_BUILTIN_RELOPS */
+
+#define signbit(x) \
+ ((sizeof (x) == sizeof (float)) ? __signbitf(x) \
+ : (sizeof (x) == sizeof (double)) ? __signbit(x) \
+ : __signbitl(x))
+
+#if 0
+typedef __double_t double_t;
+typedef __float_t float_t;
+#endif
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+
+/*
+ * XOPEN/SVID
+ */
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log 2e */
+#define M_LOG10E 0.43429448190325182765 /* log 10e */
+#define M_LN2 0.69314718055994530942 /* log e2 */
+#define M_LN10 2.30258509299404568402 /* log e10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define MAXFLOAT ((float)3.40282346638528860e+38)
+extern int signgam;
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+#if __BSD_VISIBLE
+#if 0
+/* Old value from 4.4BSD-Lite math.h; this is probably better. */
+#define HUGE HUGE_VAL
+#else
+#define HUGE MAXFLOAT
+#endif
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Most of these functions depend on the rounding mode and have the side
+ * effect of raising floating-point exceptions, so they are not declared
+ * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
+ */
+__BEGIN_DECLS
+/*
+ * ANSI/POSIX
+ */
+int __fpclassifyd(double) __pure2;
+int __fpclassifyf(float) __pure2;
+int __fpclassifyl(long double) __pure2;
+int __isfinitef(float) __pure2;
+int __isfinite(double) __pure2;
+int __isfinitel(long double) __pure2;
+int __isinff(float) __pure2;
+int __isinf(double) __pure2;
+int __isinfl(long double) __pure2;
+int __isnanl(long double) __pure2;
+int __isnormalf(float) __pure2;
+int __isnormal(double) __pure2;
+int __isnormall(long double) __pure2;
+int __signbit(double) __pure2;
+int __signbitf(float) __pure2;
+int __signbitl(long double) __pure2;
+
+double acos(double);
+double asin(double);
+double atan(double);
+double atan2(double, double);
+double cos(double);
+double sin(double);
+double tan(double);
+
+double cosh(double);
+double sinh(double);
+double tanh(double);
+
+double exp(double);
+double frexp(double, int *); /* fundamentally !__pure2 */
+double ldexp(double, int);
+double log(double);
+double log10(double);
+double modf(double, double *); /* fundamentally !__pure2 */
+
+double pow(double, double);
+double sqrt(double);
+
+double ceil(double);
+double fabs(double) __pure2;
+double floor(double);
+double fmod(double, double);
+
+/*
+ * These functions are not in C90.
+ */
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+double acosh(double);
+double asinh(double);
+double atanh(double);
+double cbrt(double);
+double erf(double);
+double erfc(double);
+double exp2(double);
+double expm1(double);
+double fma(double, double, double);
+double hypot(double, double);
+int ilogb(double) __pure2;
+/* int (isinf)(double) __pure2; */
+int (isnan)(double) __pure2;
+double lgamma(double);
+long long llrint(double);
+long long llround(double);
+double log1p(double);
+double logb(double);
+long lrint(double);
+long lround(double);
+double nextafter(double, double);
+double remainder(double, double);
+double remquo(double, double, int *);
+double rint(double);
+/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+double j0(double);
+double j1(double);
+double jn(int, double);
+double scalb(double, double);
+double y0(double);
+double y1(double);
+double yn(int, double);
+
+/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
+double gamma(double);
+/* #endif */
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
+double copysign(double, double) __pure2;
+double fdim(double, double);
+double fmax(double, double) __pure2;
+double fmin(double, double) __pure2;
+double nearbyint(double);
+double round(double);
+double scalbln(double, long);
+double scalbn(double, int);
+double tgamma(double);
+double trunc(double);
+/* #endif */
+
+/*
+ * BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+double drem(double, double);
+int finite(double) __pure2;
+int isnanf(float) __pure2;
+
+/*
+ * Reentrant version of gamma & lgamma; passes signgam back by reference
+ * as the second argument; user must allocate space for signgam.
+ */
+double gamma_r(double, int *);
+double lgamma_r(double, int *);
+
+/*
+ * IEEE Test Vector
+ */
+double significand(double);
+/* #endif */ /* __BSD_VISIBLE */
+
+/* float versions of ANSI/POSIX functions */
+/*#if __ISO_C_VISIBLE >= 1999 */
+float acosf(float);
+float asinf(float);
+float atanf(float);
+float atan2f(float, float);
+float cosf(float);
+float sinf(float);
+float tanf(float);
+
+float coshf(float);
+float sinhf(float);
+float tanhf(float);
+
+float exp2f(float);
+float expf(float);
+float expm1f(float);
+float frexpf(float, int *); /* fundamentally !__pure2 */
+int ilogbf(float) __pure2;
+float ldexpf(float, int);
+float log10f(float);
+float log1pf(float);
+float logf(float);
+float modff(float, float *); /* fundamentally !__pure2 */
+
+float powf(float, float);
+float sqrtf(float);
+
+float ceilf(float);
+float fabsf(float) __pure2;
+float floorf(float);
+float fmodf(float, float);
+float roundf(float);
+
+float erff(float);
+float erfcf(float);
+float hypotf(float, float);
+float lgammaf(float);
+
+float acoshf(float);
+float asinhf(float);
+float atanhf(float);
+float cbrtf(float);
+float logbf(float);
+float copysignf(float, float) __pure2;
+long long llrintf(float);
+long long llroundf(float);
+long lrintf(float);
+long lroundf(float);
+float nearbyintf(float);
+float nextafterf(float, float);
+float remainderf(float, float);
+float remquof(float, float, int *);
+float rintf(float);
+float scalblnf(float, long);
+float scalbnf(float, int);
+float truncf(float);
+
+float fdimf(float, float);
+float fmaf(float, float, float);
+float fmaxf(float, float) __pure2;
+float fminf(float, float) __pure2;
+/* #endif */
+
+/*
+ * float versions of BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+float dremf(float, float);
+int finitef(float) __pure2;
+float gammaf(float);
+float j0f(float);
+float j1f(float);
+float jnf(int, float);
+float scalbf(float, float);
+float y0f(float);
+float y1f(float);
+float ynf(int, float);
+
+/*
+ * Float versions of reentrant version of gamma & lgamma; passes
+ * signgam back by reference as the second argument; user must
+ * allocate space for signgam.
+ */
+float gammaf_r(float, int *);
+float lgammaf_r(float, int *);
+
+/*
+ * float version of IEEE Test Vector
+ */
+float significandf(float);
+/* #endif */ /* __BSD_VISIBLE */
+
+/*
+ * long double versions of ISO/POSIX math functions
+ */
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+long double acoshl(long double);
+long double acosl(long double);
+long double asinhl(long double);
+long double asinl(long double);
+long double atan2l(long double, long double);
+long double atanhl(long double);
+long double atanl(long double);
+long double cbrtl(long double);
+#endif
+long double ceill(long double);
+long double copysignl(long double, long double) __pure2;
+#if 0
+long double coshl(long double);
+long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
+long double exp2l(long double);
+long double expl(long double);
+long double expm1l(long double);
+#endif
+long double fabsl(long double) __pure2;
+long double fdiml(long double, long double);
+long double floorl(long double);
+long double fmal(long double, long double, long double);
+long double fmaxl(long double, long double) __pure2;
+long double fminl(long double, long double) __pure2;
+#if 0
+long double fmodl(long double, long double);
+#endif
+long double frexpl(long double value, int *); /* fundamentally !__pure2 */
+#if 0
+long double hypotl(long double, long double);
+#endif
+int ilogbl(long double) __pure2;
+long double ldexpl(long double, int);
+#if 0
+long double lgammal(long double);
+long long llrintl(long double);
+#endif
+long long llroundl(long double);
+#if 0
+long double log10l(long double);
+long double log1pl(long double);
+long double log2l(long double);
+long double logbl(long double);
+long double logl(long double);
+long lrintl(long double);
+#endif
+long lroundl(long double);
+#if 0
+long double modfl(long double, long double *); /* fundamentally !__pure2 */
+long double nanl(const char *) __pure2;
+long double nearbyintl(long double);
+#endif
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+#if 0
+long double powl(long double, long double);
+long double remainderl(long double, long double);
+long double remquol(long double, long double, int *);
+long double rintl(long double);
+#endif
+long double roundl(long double);
+long double scalblnl(long double, long);
+long double scalbnl(long double, int);
+#if 0
+long double sinhl(long double);
+long double sinl(long double);
+long double sqrtl(long double);
+long double tanhl(long double);
+long double tanl(long double);
+long double tgammal(long double);
+#endif
+long double truncl(long double);
+
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+__END_DECLS
+
+#endif /* !_MATH_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/memory.h b/6/platforms/android-3/arch-arm/usr/include/memory.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/memory.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/mntent.h b/6/platforms/android-3/arch-arm/usr/include/mntent.h
new file mode 100644
index 0000000..b83da1f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/mntent.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _MNTENT_H_
+#define _MNTENT_H_
+
+#include <stdio.h>
+
+#define MNTTYPE_IGNORE "ignore"
+
+struct mntent
+{
+ char* mnt_fsname;
+ char* mnt_dir;
+ char* mnt_type;
+ char* mnt_opts;
+ int mnt_freq;
+ int mnt_passno;
+};
+
+
+__BEGIN_DECLS
+
+
+struct mntent* getmntent(FILE*);
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-abi.h b/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-abi.h
new file mode 100644
index 0000000..0ae2263
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-abi.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_ABI_H__
+#define __MTD_ABI_H__
+
+struct erase_info_user {
+ uint32_t start;
+ uint32_t length;
+};
+
+struct mtd_oob_buf {
+ uint32_t start;
+ uint32_t length;
+ unsigned char __user *ptr;
+};
+
+#define MTD_ABSENT 0
+#define MTD_RAM 1
+#define MTD_ROM 2
+#define MTD_NORFLASH 3
+#define MTD_NANDFLASH 4
+#define MTD_DATAFLASH 6
+
+#define MTD_WRITEABLE 0x400
+#define MTD_BIT_WRITEABLE 0x800
+#define MTD_NO_ERASE 0x1000
+#define MTD_STUPID_LOCK 0x2000
+
+#define MTD_CAP_ROM 0
+#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
+#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
+#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
+
+#define MTD_NANDECC_OFF 0
+#define MTD_NANDECC_PLACE 1
+#define MTD_NANDECC_AUTOPLACE 2
+#define MTD_NANDECC_PLACEONLY 3
+#define MTD_NANDECC_AUTOPL_USR 4
+
+#define MTD_OTP_OFF 0
+#define MTD_OTP_FACTORY 1
+#define MTD_OTP_USER 2
+
+struct mtd_info_user {
+ uint8_t type;
+ uint32_t flags;
+ uint32_t size;
+ uint32_t erasesize;
+ uint32_t writesize;
+ uint32_t oobsize;
+
+ uint32_t ecctype;
+ uint32_t eccsize;
+};
+
+struct region_info_user {
+ uint32_t offset;
+ uint32_t erasesize;
+ uint32_t numblocks;
+ uint32_t regionindex;
+};
+
+struct otp_info {
+ uint32_t start;
+ uint32_t length;
+ uint32_t locked;
+};
+
+#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
+#define MEMERASE _IOW('M', 2, struct erase_info_user)
+#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
+#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
+#define MEMLOCK _IOW('M', 5, struct erase_info_user)
+#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
+#define MEMGETREGIONCOUNT _IOR('M', 7, int)
+#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
+#define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
+#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
+#define MEMGETBADBLOCK _IOW('M', 11, loff_t)
+#define MEMSETBADBLOCK _IOW('M', 12, loff_t)
+#define OTPSELECT _IOR('M', 13, int)
+#define OTPGETREGIONCOUNT _IOW('M', 14, int)
+#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
+#define OTPLOCK _IOR('M', 16, struct otp_info)
+#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout)
+#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
+#define MTDFILEMODE _IO('M', 19)
+
+struct nand_oobinfo {
+ uint32_t useecc;
+ uint32_t eccbytes;
+ uint32_t oobfree[8][2];
+ uint32_t eccpos[32];
+};
+
+struct nand_oobfree {
+ uint32_t offset;
+ uint32_t length;
+};
+
+#define MTD_MAX_OOBFREE_ENTRIES 8
+
+struct nand_ecclayout {
+ uint32_t eccbytes;
+ uint32_t eccpos[64];
+ uint32_t oobavail;
+ struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+};
+
+struct mtd_ecc_stats {
+ uint32_t corrected;
+ uint32_t failed;
+ uint32_t badblocks;
+ uint32_t bbtblocks;
+};
+
+enum mtd_file_modes {
+ MTD_MODE_NORMAL = MTD_OTP_OFF,
+ MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
+ MTD_MODE_OTP_USER = MTD_OTP_USER,
+ MTD_MODE_RAW,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-user.h b/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-user.h
new file mode 100644
index 0000000..1d37dc1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/mtd/mtd-user.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_USER_H__
+#define __MTD_USER_H__
+
+#include <stdint.h>
+
+#include <mtd/mtd-abi.h>
+
+typedef struct mtd_info_user mtd_info_t;
+typedef struct erase_info_user erase_info_t;
+typedef struct region_info_user region_info_t;
+typedef struct nand_oobinfo nand_oobinfo_t;
+typedef struct nand_ecclayout nand_ecclayout_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/ethertypes.h b/6/platforms/android-3/arch-arm/usr/include/net/ethertypes.h
new file mode 100644
index 0000000..1cfd2cd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/ethertypes.h
@@ -0,0 +1,313 @@
+/* $NetBSD: ethertypes.h,v 1.17 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * Ethernet protocol types.
+ *
+ * According to "assigned numbers", the Ethernet protocol numbers are also
+ * used as ARP protocol type numbers.
+ *
+ * I factor them out here to avoid pulling all the Ethernet header file
+ * into the hardware independent ARP code. -is
+ *
+ * Additional sources of information:
+ * http://www.mit.edu/~map/Ethernet/Ethernet.txt
+ * ftp://venera.isi.edu/in-notes/iana/assignments/ethernet-numbers
+ *
+ */
+
+#ifndef _NET_ETHERTYPES_H_
+#define _NET_ETHERTYPES_H_
+
+/*
+ * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
+ * However, there are some conflicts.
+ */
+
+#define ETHERTYPE_8023 0x0004 /* IEEE 802.3 packet */
+ /* 0x0101 .. 0x1FF Experimental */
+#define ETHERTYPE_PUP 0x0200 /* Xerox PUP protocol - see 0A00 */
+#define ETHERTYPE_PUPAT 0x0200 /* PUP Address Translation - see 0A01 */
+#define ETHERTYPE_SPRITE 0x0500 /* ??? */
+ /* 0x0400 Nixdorf */
+#define ETHERTYPE_NS 0x0600 /* XNS */
+#define ETHERTYPE_NSAT 0x0601 /* XNS Address Translation (3Mb only) */
+#define ETHERTYPE_DLOG1 0x0660 /* DLOG (?) */
+#define ETHERTYPE_DLOG2 0x0661 /* DLOG (?) */
+#define ETHERTYPE_IP 0x0800 /* IP protocol */
+#define ETHERTYPE_X75 0x0801 /* X.75 Internet */
+#define ETHERTYPE_NBS 0x0802 /* NBS Internet */
+#define ETHERTYPE_ECMA 0x0803 /* ECMA Internet */
+#define ETHERTYPE_CHAOS 0x0804 /* CHAOSnet */
+#define ETHERTYPE_X25 0x0805 /* X.25 Level 3 */
+#define ETHERTYPE_ARP 0x0806 /* Address resolution protocol */
+#define ETHERTYPE_NSCOMPAT 0x0807 /* XNS Compatibility */
+#define ETHERTYPE_FRARP 0x0808 /* Frame Relay ARP (RFC1701) */
+ /* 0x081C Symbolics Private */
+ /* 0x0888 - 0x088A Xyplex */
+#define ETHERTYPE_UBDEBUG 0x0900 /* Ungermann-Bass network debugger */
+#define ETHERTYPE_IEEEPUP 0x0A00 /* Xerox IEEE802.3 PUP */
+#define ETHERTYPE_IEEEPUPAT 0x0A01 /* Xerox IEEE802.3 PUP Address Translation */
+#define ETHERTYPE_VINES 0x0BAD /* Banyan VINES */
+#define ETHERTYPE_VINESLOOP 0x0BAE /* Banyan VINES Loopback */
+#define ETHERTYPE_VINESECHO 0x0BAF /* Banyan VINES Echo */
+
+/* 0x1000 - 0x100F Berkeley Trailer */
+/*
+ * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
+ * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
+ * by an ETHER type (as given above) and then the (variable-length) header.
+ */
+#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
+#define ETHERTYPE_NTRAILER 16
+
+#define ETHERTYPE_DCA 0x1234 /* DCA - Multicast */
+#define ETHERTYPE_VALID 0x1600 /* VALID system protocol */
+#define ETHERTYPE_DOGFIGHT 0x1989 /* Artificial Horizons ("Aviator" dogfight simulator [on Sun]) */
+#define ETHERTYPE_RCL 0x1995 /* Datapoint Corporation (RCL lan protocol) */
+
+ /* The following 3C0x types
+ are unregistered: */
+#define ETHERTYPE_NBPVCD 0x3C00 /* 3Com NBP virtual circuit datagram (like XNS SPP) not registered */
+#define ETHERTYPE_NBPSCD 0x3C01 /* 3Com NBP System control datagram not registered */
+#define ETHERTYPE_NBPCREQ 0x3C02 /* 3Com NBP Connect request (virtual cct) not registered */
+#define ETHERTYPE_NBPCRSP 0x3C03 /* 3Com NBP Connect repsonse not registered */
+#define ETHERTYPE_NBPCC 0x3C04 /* 3Com NBP Connect complete not registered */
+#define ETHERTYPE_NBPCLREQ 0x3C05 /* 3Com NBP Close request (virtual cct) not registered */
+#define ETHERTYPE_NBPCLRSP 0x3C06 /* 3Com NBP Close response not registered */
+#define ETHERTYPE_NBPDG 0x3C07 /* 3Com NBP Datagram (like XNS IDP) not registered */
+#define ETHERTYPE_NBPDGB 0x3C08 /* 3Com NBP Datagram broadcast not registered */
+#define ETHERTYPE_NBPCLAIM 0x3C09 /* 3Com NBP Claim NetBIOS name not registered */
+#define ETHERTYPE_NBPDLTE 0x3C0A /* 3Com NBP Delete Netbios name not registered */
+#define ETHERTYPE_NBPRAS 0x3C0B /* 3Com NBP Remote adaptor status request not registered */
+#define ETHERTYPE_NBPRAR 0x3C0C /* 3Com NBP Remote adaptor response not registered */
+#define ETHERTYPE_NBPRST 0x3C0D /* 3Com NBP Reset not registered */
+
+#define ETHERTYPE_PCS 0x4242 /* PCS Basic Block Protocol */
+#define ETHERTYPE_IMLBLDIAG 0x424C /* Information Modes Little Big LAN diagnostic */
+#define ETHERTYPE_DIDDLE 0x4321 /* THD - Diddle */
+#define ETHERTYPE_IMLBL 0x4C42 /* Information Modes Little Big LAN */
+#define ETHERTYPE_SIMNET 0x5208 /* BBN Simnet Private */
+#define ETHERTYPE_DECEXPER 0x6000 /* DEC Unassigned, experimental */
+#define ETHERTYPE_MOPDL 0x6001 /* DEC MOP dump/load */
+#define ETHERTYPE_MOPRC 0x6002 /* DEC MOP remote console */
+#define ETHERTYPE_DECnet 0x6003 /* DEC DECNET Phase IV route */
+#define ETHERTYPE_DN ETHERTYPE_DECnet /* libpcap, tcpdump */
+#define ETHERTYPE_LAT 0x6004 /* DEC LAT */
+#define ETHERTYPE_DECDIAG 0x6005 /* DEC diagnostic protocol (at interface initialization?) */
+#define ETHERTYPE_DECCUST 0x6006 /* DEC customer protocol */
+#define ETHERTYPE_SCA 0x6007 /* DEC LAVC, SCA */
+#define ETHERTYPE_AMBER 0x6008 /* DEC AMBER */
+#define ETHERTYPE_DECMUMPS 0x6009 /* DEC MUMPS */
+ /* 0x6010 - 0x6014 3Com Corporation */
+#define ETHERTYPE_TRANSETHER 0x6558 /* Trans Ether Bridging (RFC1701)*/
+#define ETHERTYPE_RAWFR 0x6559 /* Raw Frame Relay (RFC1701) */
+#define ETHERTYPE_UBDL 0x7000 /* Ungermann-Bass download */
+#define ETHERTYPE_UBNIU 0x7001 /* Ungermann-Bass NIUs */
+#define ETHERTYPE_UBDIAGLOOP 0x7002 /* Ungermann-Bass diagnostic/loopback */
+#define ETHERTYPE_UBNMC 0x7003 /* Ungermann-Bass ??? (NMC to/from UB Bridge) */
+#define ETHERTYPE_UBBST 0x7005 /* Ungermann-Bass Bridge Spanning Tree */
+#define ETHERTYPE_OS9 0x7007 /* OS/9 Microware */
+#define ETHERTYPE_OS9NET 0x7009 /* OS/9 Net? */
+ /* 0x7020 - 0x7029 LRT (England) (now Sintrom) */
+#define ETHERTYPE_RACAL 0x7030 /* Racal-Interlan */
+#define ETHERTYPE_PRIMENTS 0x7031 /* Prime NTS (Network Terminal Service) */
+#define ETHERTYPE_CABLETRON 0x7034 /* Cabletron */
+#define ETHERTYPE_CRONUSVLN 0x8003 /* Cronus VLN */
+#define ETHERTYPE_CRONUS 0x8004 /* Cronus Direct */
+#define ETHERTYPE_HP 0x8005 /* HP Probe */
+#define ETHERTYPE_NESTAR 0x8006 /* Nestar */
+#define ETHERTYPE_ATTSTANFORD 0x8008 /* AT&T/Stanford (local use) */
+#define ETHERTYPE_EXCELAN 0x8010 /* Excelan */
+#define ETHERTYPE_SG_DIAG 0x8013 /* SGI diagnostic type */
+#define ETHERTYPE_SG_NETGAMES 0x8014 /* SGI network games */
+#define ETHERTYPE_SG_RESV 0x8015 /* SGI reserved type */
+#define ETHERTYPE_SG_BOUNCE 0x8016 /* SGI bounce server */
+#define ETHERTYPE_APOLLODOMAIN 0x8019 /* Apollo DOMAIN */
+#define ETHERTYPE_TYMSHARE 0x802E /* Tymeshare */
+#define ETHERTYPE_TIGAN 0x802F /* Tigan, Inc. */
+#define ETHERTYPE_REVARP 0x8035 /* Reverse addr resolution protocol */
+#define ETHERTYPE_AEONIC 0x8036 /* Aeonic Systems */
+#define ETHERTYPE_IPXNEW 0x8037 /* IPX (Novell Netware?) */
+#define ETHERTYPE_LANBRIDGE 0x8038 /* DEC LANBridge */
+#define ETHERTYPE_DSMD 0x8039 /* DEC DSM/DDP */
+#define ETHERTYPE_ARGONAUT 0x803A /* DEC Argonaut Console */
+#define ETHERTYPE_VAXELN 0x803B /* DEC VAXELN */
+#define ETHERTYPE_DECDNS 0x803C /* DEC DNS Naming Service */
+#define ETHERTYPE_ENCRYPT 0x803D /* DEC Ethernet Encryption */
+#define ETHERTYPE_DECDTS 0x803E /* DEC Distributed Time Service */
+#define ETHERTYPE_DECLTM 0x803F /* DEC LAN Traffic Monitor */
+#define ETHERTYPE_DECNETBIOS 0x8040 /* DEC PATHWORKS DECnet NETBIOS Emulation */
+#define ETHERTYPE_DECLAST 0x8041 /* DEC Local Area System Transport */
+ /* 0x8042 DEC Unassigned */
+#define ETHERTYPE_PLANNING 0x8044 /* Planning Research Corp. */
+ /* 0x8046 - 0x8047 AT&T */
+#define ETHERTYPE_DECAM 0x8048 /* DEC Availability Manager for Distributed Systems DECamds (but someone at DEC says not) */
+#define ETHERTYPE_EXPERDATA 0x8049 /* ExperData */
+#define ETHERTYPE_VEXP 0x805B /* Stanford V Kernel exp. */
+#define ETHERTYPE_VPROD 0x805C /* Stanford V Kernel prod. */
+#define ETHERTYPE_ES 0x805D /* Evans & Sutherland */
+#define ETHERTYPE_LITTLE 0x8060 /* Little Machines */
+#define ETHERTYPE_COUNTERPOINT 0x8062 /* Counterpoint Computers */
+ /* 0x8065 - 0x8066 Univ. of Mass @ Amherst */
+#define ETHERTYPE_VEECO 0x8067 /* Veeco Integrated Auto. */
+#define ETHERTYPE_GENDYN 0x8068 /* General Dynamics */
+#define ETHERTYPE_ATT 0x8069 /* AT&T */
+#define ETHERTYPE_AUTOPHON 0x806A /* Autophon */
+#define ETHERTYPE_COMDESIGN 0x806C /* ComDesign */
+#define ETHERTYPE_COMPUGRAPHIC 0x806D /* Compugraphic Corporation */
+ /* 0x806E - 0x8077 Landmark Graphics Corp. */
+#define ETHERTYPE_MATRA 0x807A /* Matra */
+#define ETHERTYPE_DDE 0x807B /* Dansk Data Elektronik */
+#define ETHERTYPE_MERIT 0x807C /* Merit Internodal (or Univ of Michigan?) */
+ /* 0x807D - 0x807F Vitalink Communications */
+#define ETHERTYPE_VLTLMAN 0x8080 /* Vitalink TransLAN III Management */
+ /* 0x8081 - 0x8083 Counterpoint Computers */
+ /* 0x8088 - 0x808A Xyplex */
+#define ETHERTYPE_ATALK 0x809B /* AppleTalk */
+#define ETHERTYPE_AT ETHERTYPE_ATALK /* old NetBSD */
+#define ETHERTYPE_APPLETALK ETHERTYPE_ATALK /* HP-UX */
+ /* 0x809C - 0x809E Datability */
+#define ETHERTYPE_SPIDER 0x809F /* Spider Systems Ltd. */
+ /* 0x80A3 Nixdorf */
+ /* 0x80A4 - 0x80B3 Siemens Gammasonics Inc. */
+ /* 0x80C0 - 0x80C3 DCA (Digital Comm. Assoc.) Data Exchange Cluster */
+ /* 0x80C4 - 0x80C5 Banyan Systems */
+#define ETHERTYPE_PACER 0x80C6 /* Pacer Software */
+#define ETHERTYPE_APPLITEK 0x80C7 /* Applitek Corporation */
+ /* 0x80C8 - 0x80CC Intergraph Corporation */
+ /* 0x80CD - 0x80CE Harris Corporation */
+ /* 0x80CF - 0x80D2 Taylor Instrument */
+ /* 0x80D3 - 0x80D4 Rosemount Corporation */
+#define ETHERTYPE_SNA 0x80D5 /* IBM SNA Services over Ethernet */
+#define ETHERTYPE_VARIAN 0x80DD /* Varian Associates */
+ /* 0x80DE - 0x80DF TRFS (Integrated Solutions Transparent Remote File System) */
+ /* 0x80E0 - 0x80E3 Allen-Bradley */
+ /* 0x80E4 - 0x80F0 Datability */
+#define ETHERTYPE_RETIX 0x80F2 /* Retix */
+#define ETHERTYPE_AARP 0x80F3 /* AppleTalk AARP */
+ /* 0x80F4 - 0x80F5 Kinetics */
+#define ETHERTYPE_APOLLO 0x80F7 /* Apollo Computer */
+#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */
+ /* 0x80FF - 0x8101 Wellfleet Communications (XXX conflicts) */
+#define ETHERTYPE_BOFL 0x8102 /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */
+#define ETHERTYPE_WELLFLEET 0x8103 /* Wellfleet Communications */
+ /* 0x8107 - 0x8109 Symbolics Private */
+#define ETHERTYPE_TALARIS 0x812B /* Talaris */
+#define ETHERTYPE_WATERLOO 0x8130 /* Waterloo Microsystems Inc. (XXX which?) */
+#define ETHERTYPE_HAYES 0x8130 /* Hayes Microcomputers (XXX which?) */
+#define ETHERTYPE_VGLAB 0x8131 /* VG Laboratory Systems */
+ /* 0x8132 - 0x8137 Bridge Communications */
+#define ETHERTYPE_IPX 0x8137 /* Novell (old) NetWare IPX (ECONFIG E option) */
+#define ETHERTYPE_NOVELL 0x8138 /* Novell, Inc. */
+ /* 0x8139 - 0x813D KTI */
+#define ETHERTYPE_MUMPS 0x813F /* M/MUMPS data sharing */
+#define ETHERTYPE_AMOEBA 0x8145 /* Vrije Universiteit (NL) Amoeba 4 RPC (obsolete) */
+#define ETHERTYPE_FLIP 0x8146 /* Vrije Universiteit (NL) FLIP (Fast Local Internet Protocol) */
+#define ETHERTYPE_VURESERVED 0x8147 /* Vrije Universiteit (NL) [reserved] */
+#define ETHERTYPE_LOGICRAFT 0x8148 /* Logicraft */
+#define ETHERTYPE_NCD 0x8149 /* Network Computing Devices */
+#define ETHERTYPE_ALPHA 0x814A /* Alpha Micro */
+#define ETHERTYPE_SNMP 0x814C /* SNMP over Ethernet (see RFC1089) */
+ /* 0x814D - 0x814E BIIN */
+#define ETHERTYPE_TEC 0x814F /* Technically Elite Concepts */
+#define ETHERTYPE_RATIONAL 0x8150 /* Rational Corp */
+ /* 0x8151 - 0x8153 Qualcomm */
+ /* 0x815C - 0x815E Computer Protocol Pty Ltd */
+ /* 0x8164 - 0x8166 Charles River Data Systems */
+#define ETHERTYPE_XTP 0x817D /* Protocol Engines XTP */
+#define ETHERTYPE_SGITW 0x817E /* SGI/Time Warner prop. */
+#define ETHERTYPE_HIPPI_FP 0x8180 /* HIPPI-FP encapsulation */
+#define ETHERTYPE_STP 0x8181 /* Scheduled Transfer STP, HIPPI-ST */
+ /* 0x8182 - 0x8183 Reserved for HIPPI-6400 */
+ /* 0x8184 - 0x818C SGI prop. */
+#define ETHERTYPE_MOTOROLA 0x818D /* Motorola */
+#define ETHERTYPE_NETBEUI 0x8191 /* PowerLAN NetBIOS/NetBEUI (PC) */
+ /* 0x819A - 0x81A3 RAD Network Devices */
+ /* 0x81B7 - 0x81B9 Xyplex */
+ /* 0x81CC - 0x81D5 Apricot Computers */
+ /* 0x81D6 - 0x81DD Artisoft Lantastic */
+ /* 0x81E6 - 0x81EF Polygon */
+ /* 0x81F0 - 0x81F2 Comsat Labs */
+ /* 0x81F3 - 0x81F5 SAIC */
+ /* 0x81F6 - 0x81F8 VG Analytical */
+ /* 0x8203 - 0x8205 QNX Software Systems Ltd. */
+ /* 0x8221 - 0x8222 Ascom Banking Systems */
+ /* 0x823E - 0x8240 Advanced Encryption Systems */
+ /* 0x8263 - 0x826A Charles River Data Systems */
+ /* 0x827F - 0x8282 Athena Programming */
+ /* 0x829A - 0x829B Inst Ind Info Tech */
+ /* 0x829C - 0x82AB Taurus Controls */
+ /* 0x82AC - 0x8693 Walker Richer & Quinn */
+#define ETHERTYPE_ACCTON 0x8390 /* Accton Technologies (unregistered) */
+#define ETHERTYPE_TALARISMC 0x852B /* Talaris multicast */
+#define ETHERTYPE_KALPANA 0x8582 /* Kalpana */
+ /* 0x8694 - 0x869D Idea Courier */
+ /* 0x869E - 0x86A1 Computer Network Tech */
+ /* 0x86A3 - 0x86AC Gateway Communications */
+#define ETHERTYPE_SECTRA 0x86DB /* SECTRA */
+#define ETHERTYPE_IPV6 0x86DD /* IP protocol version 6 */
+#define ETHERTYPE_DELTACON 0x86DE /* Delta Controls */
+#define ETHERTYPE_ATOMIC 0x86DF /* ATOMIC */
+ /* 0x86E0 - 0x86EF Landis & Gyr Powers */
+ /* 0x8700 - 0x8710 Motorola */
+#define ETHERTYPE_RDP 0x8739 /* Control Technology Inc. RDP Without IP */
+#define ETHERTYPE_MICP 0x873A /* Control Technology Inc. Mcast Industrial Ctrl Proto. */
+ /* 0x873B - 0x873C Control Technology Inc. Proprietary */
+#define ETHERTYPE_TCPCOMP 0x876B /* TCP/IP Compression (RFC1701) */
+#define ETHERTYPE_IPAS 0x876C /* IP Autonomous Systems (RFC1701) */
+#define ETHERTYPE_SECUREDATA 0x876D /* Secure Data (RFC1701) */
+#define ETHERTYPE_FLOWCONTROL 0x8808 /* 802.3x flow control packet */
+#define ETHERTYPE_SLOWPROTOCOLS 0x8809 /* Slow protocols */
+#define ETHERTYPE_PPP 0x880B /* PPP (obsolete by PPPOE) */
+#define ETHERTYPE_HITACHI 0x8820 /* Hitachi Cable (Optoelectronic Systems Laboratory) */
+#define ETHERTYPE_MPLS 0x8847 /* MPLS Unicast */
+#define ETHERTYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */
+#define ETHERTYPE_AXIS 0x8856 /* Axis Communications AB proprietary bootstrap/config */
+#define ETHERTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */
+#define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */
+#define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */
+#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
+#define ETHERTYPE_LOOPBACK 0x9000 /* Loopback */
+#define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */
+#define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */
+#define ETHERTYPE_TCPSM 0x9002 /* 3Com (Formerly Bridge Communications), TCP/IP Systems Management */
+#define ETHERTYPE_BCLOOP 0x9003 /* 3Com (Formerly Bridge Communications), loopback detection */
+#define ETHERTYPE_DEBNI 0xAAAA /* DECNET? Used by VAX 6220 DEBNI */
+#define ETHERTYPE_SONIX 0xFAF5 /* Sonix Arpeggio */
+#define ETHERTYPE_VITAL 0xFF00 /* BBN VITAL-LanBridge cache wakeups */
+ /* 0xFF00 - 0xFFOF ISC Bunker Ramo */
+
+#define ETHERTYPE_MAX 0xFFFF /* Maximum valid ethernet type, reserved */
+
+#endif /* !_NET_ETHERTYPES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if.h b/6/platforms/android-3/arch-arm/usr/include/net/if.h
new file mode 100644
index 0000000..9044fc5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/if.h>
+#include <sys/cdefs.h>
+#ifndef IF_NAMESIZE
+#define IF_NAMESIZE IFNAMSIZ
+#endif
+
+__BEGIN_DECLS
+
+/*
+ * Map an interface name into its corresponding index.
+ */
+extern unsigned int if_nametoindex(const char *);
+extern char* if_indextoname(unsigned ifindex, char *ifname);
+
+__END_DECLS
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_arp.h b/6/platforms/android-3/arch-arm/usr/include/net/if_arp.h
new file mode 100644
index 0000000..a25f1b4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+#include <linux/if_arp.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_dl.h b/6/platforms/android-3/arch-arm/usr/include/net/if_dl.h
new file mode 100644
index 0000000..1f0c080
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_dl.h
@@ -0,0 +1,87 @@
+/* $NetBSD: if_dl.h,v 1.18 2005/12/11 23:05:24 thorpej Exp $ */
+
+/*
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_dl.h 8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * A Link-Level Sockaddr may specify the interface in one of two
+ * ways: either by means of a system-provided index number (computed
+ * anew and possibly differently on every reboot), or by a human-readable
+ * string such as "il0" (for managerial convenience).
+ *
+ * Census taking actions, such as something akin to SIOCGCONF would return
+ * both the index and the human name.
+ *
+ * High volume transactions (such as giving a link-level ``from'' address
+ * in a recvfrom or recvmsg call) may be likely only to provide the indexed
+ * form, (which requires fewer copy operations and less space).
+ *
+ * The form and interpretation of the link-level address is purely a matter
+ * of convention between the device driver and its consumers; however, it is
+ * expected that all drivers for an interface of a given if_type will agree.
+ */
+
+#ifndef _NET_IF_DL_H_
+#define _NET_IF_DL_H_
+
+#include <sys/socket.h>
+
+/*
+ * Structure of a Link-Level sockaddr:
+ */
+struct sockaddr_dl {
+ u_char sdl_len; /* Total length of sockaddr */
+ sa_family_t sdl_family; /* AF_LINK */
+ u_int16_t sdl_index; /* if != 0, system given index for interface */
+ u_char sdl_type; /* interface type */
+ u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
+ u_char sdl_alen; /* link level address length */
+ u_char sdl_slen; /* link layer selector length */
+ char sdl_data[12]; /* minimum work area, can be larger;
+ contains both if name and ll address */
+};
+
+/* We do arithmetic directly with these, so keep them char instead of void */
+#define LLADDR(s) ((char *)((s)->sdl_data + (s)->sdl_nlen))
+#define CLLADDR(s) ((const char *)((s)->sdl_data + (s)->sdl_nlen))
+
+#ifndef _KERNEL
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+void link_addr(const char *, struct sockaddr_dl *);
+char *link_ntoa(const struct sockaddr_dl *);
+__END_DECLS
+
+#endif /* !_KERNEL */
+
+#endif /* !_NET_IF_DL_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_ether.h b/6/platforms/android-3/arch-arm/usr/include/net/if_ether.h
new file mode 100644
index 0000000..121f9ac
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_ether.h
@@ -0,0 +1,217 @@
+/* $NetBSD: if_ether.h,v 1.43 2006/11/24 01:04:30 rpaulo Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NET_IF_ETHER_H_
+#define _NET_IF_ETHER_H_
+
+#ifdef _KERNEL
+#ifdef _KERNEL_OPT
+#include "opt_mbuftrace.h"
+#endif
+#include <sys/mbuf.h>
+#endif
+
+/*
+ * Some basic Ethernet constants.
+ */
+#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
+#define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */
+#define ETHER_CRC_LEN 4 /* length of the Ethernet CRC */
+#define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)
+#define ETHER_MIN_LEN 64 /* minimum frame length, including CRC */
+#define ETHER_MAX_LEN 1518 /* maximum frame length, including CRC */
+#define ETHER_MAX_LEN_JUMBO 9018 /* maximum jumbo frame len, including CRC */
+
+/*
+ * Some Ethernet extensions.
+ */
+#define ETHER_VLAN_ENCAP_LEN 4 /* length of 802.1Q VLAN encapsulation */
+
+/*
+ * Ethernet address - 6 octets
+ * this is only used by the ethers(3) functions.
+ */
+struct ether_addr {
+ u_int8_t ether_addr_octet[ETHER_ADDR_LEN];
+} __attribute__((__packed__));
+
+/*
+ * Structure of a 10Mb/s Ethernet header.
+ */
+struct ether_header {
+ u_int8_t ether_dhost[ETHER_ADDR_LEN];
+ u_int8_t ether_shost[ETHER_ADDR_LEN];
+ u_int16_t ether_type;
+} __attribute__((__packed__));
+
+#include <net/ethertypes.h>
+
+#define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
+
+#define ETHERMTU_JUMBO (ETHER_MAX_LEN_JUMBO - ETHER_HDR_LEN - ETHER_CRC_LEN)
+#define ETHERMTU (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
+#define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
+
+/*
+ * Compute the maximum frame size based on ethertype (i.e. possible
+ * encapsulation) and whether or not an FCS is present.
+ */
+#define ETHER_MAX_FRAME(ifp, etype, hasfcs) \
+ ((ifp)->if_mtu + ETHER_HDR_LEN + \
+ ((hasfcs) ? ETHER_CRC_LEN : 0) + \
+ (((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0))
+
+/*
+ * Ethernet CRC32 polynomials (big- and little-endian verions).
+ */
+#define ETHER_CRC_POLY_LE 0xedb88320
+#define ETHER_CRC_POLY_BE 0x04c11db6
+
+#ifndef _STANDALONE
+
+/*
+ * Ethernet-specific mbuf flags.
+ */
+#define M_HASFCS M_LINK0 /* FCS included at end of frame */
+#define M_PROMISC M_LINK1 /* this packet is not for us */
+
+#ifdef _KERNEL
+/*
+ * Macro to map an IP multicast address to an Ethernet multicast address.
+ * The high-order 25 bits of the Ethernet address are statically assigned,
+ * and the low-order 23 bits are taken from the low end of the IP address.
+ */
+#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
+ /* struct in_addr *ipaddr; */ \
+ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \
+{ \
+ (enaddr)[0] = 0x01; \
+ (enaddr)[1] = 0x00; \
+ (enaddr)[2] = 0x5e; \
+ (enaddr)[3] = ((u_int8_t *)ipaddr)[1] & 0x7f; \
+ (enaddr)[4] = ((u_int8_t *)ipaddr)[2]; \
+ (enaddr)[5] = ((u_int8_t *)ipaddr)[3]; \
+}
+/*
+ * Macro to map an IP6 multicast address to an Ethernet multicast address.
+ * The high-order 16 bits of the Ethernet address are statically assigned,
+ * and the low-order 32 bits are taken from the low end of the IP6 address.
+ */
+#define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr) \
+ /* struct in6_addr *ip6addr; */ \
+ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \
+{ \
+ (enaddr)[0] = 0x33; \
+ (enaddr)[1] = 0x33; \
+ (enaddr)[2] = ((u_int8_t *)ip6addr)[12]; \
+ (enaddr)[3] = ((u_int8_t *)ip6addr)[13]; \
+ (enaddr)[4] = ((u_int8_t *)ip6addr)[14]; \
+ (enaddr)[5] = ((u_int8_t *)ip6addr)[15]; \
+}
+#endif
+
+#define ETHERCAP_VLAN_MTU 0x00000001 /* VLAN-compatible MTU */
+#define ETHERCAP_VLAN_HWTAGGING 0x00000002 /* hardware VLAN tag support */
+#define ETHERCAP_JUMBO_MTU 0x00000004 /* 9000 byte MTU supported */
+
+#ifdef _KERNEL
+extern const uint8_t etherbroadcastaddr[ETHER_ADDR_LEN];
+extern const uint8_t ethermulticastaddr_slowprotocols[ETHER_ADDR_LEN];
+extern const uint8_t ether_ipmulticast_min[ETHER_ADDR_LEN];
+extern const uint8_t ether_ipmulticast_max[ETHER_ADDR_LEN];
+
+int ether_ioctl(struct ifnet *, u_long, caddr_t);
+int ether_addmulti (struct ifreq *, struct ethercom *);
+int ether_delmulti (struct ifreq *, struct ethercom *);
+int ether_changeaddr (struct ifreq *, struct ethercom *);
+int ether_multiaddr(struct sockaddr *, u_int8_t[], u_int8_t[]);
+
+/*
+ * Ethernet 802.1Q VLAN structures.
+ */
+
+/* add VLAN tag to input/received packet */
+#define VLAN_INPUT_TAG(ifp, m, vlanid, _errcase) \
+ do { \
+ struct m_tag *mtag = \
+ m_tag_get(PACKET_TAG_VLAN, sizeof(u_int), M_NOWAIT);\
+ if (mtag == NULL) { \
+ ifp->if_ierrors++; \
+ printf("%s: unable to allocate VLAN tag\n", \
+ ifp->if_xname); \
+ m_freem(m); \
+ _errcase; \
+ } \
+ *(u_int *)(mtag + 1) = vlanid; \
+ m_tag_prepend(m, mtag); \
+ } while(0)
+
+/* extract VLAN tag from output/trasmit packet */
+#define VLAN_OUTPUT_TAG(ec, m0) \
+ VLAN_ATTACHED(ec) ? m_tag_find((m0), PACKET_TAG_VLAN, NULL) : NULL
+
+/* extract VLAN ID value from a VLAN tag */
+#define VLAN_TAG_VALUE(mtag) \
+ ((*(u_int *)(mtag + 1)) & 4095)
+
+/* test if any VLAN is configured for this interface */
+#define VLAN_ATTACHED(ec) ((ec)->ec_nvlans > 0)
+
+void ether_ifattach(struct ifnet *, const u_int8_t *);
+void ether_ifdetach(struct ifnet *);
+
+char *ether_sprintf(const u_int8_t *);
+char *ether_snprintf(char *, size_t, const u_int8_t *);
+
+u_int32_t ether_crc32_le(const u_int8_t *, size_t);
+u_int32_t ether_crc32_be(const u_int8_t *, size_t);
+
+int ether_nonstatic_aton(u_char *, char *);
+#else
+/*
+ * Prototype ethers(3) functions.
+ */
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+char * ether_ntoa __P((const struct ether_addr *));
+struct ether_addr *
+ ether_aton __P((const char *));
+int ether_ntohost __P((char *, const struct ether_addr *));
+int ether_hostton __P((const char *, struct ether_addr *));
+int ether_line __P((const char *, struct ether_addr *, char *));
+__END_DECLS
+#endif
+
+#endif /* _STANDALONE */
+
+#endif /* !_NET_IF_ETHER_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_ieee1394.h b/6/platforms/android-3/arch-arm/usr/include/net/if_ieee1394.h
new file mode 100644
index 0000000..5a61581
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_ieee1394.h
@@ -0,0 +1,127 @@
+/* $NetBSD: if_ieee1394.h,v 1.6 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Atsushi Onoe.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _NET_IF_IEEE1394_H_
+#define _NET_IF_IEEE1394_H_
+
+/* hardware address information for arp / nd */
+struct ieee1394_hwaddr {
+ u_int8_t iha_uid[8]; /* node unique ID */
+ u_int8_t iha_maxrec; /* max_rec in the config ROM */
+ u_int8_t iha_speed; /* min of link/PHY speed */
+ u_int8_t iha_offset[6]; /* unicast FIFO address */
+};
+
+/*
+ * BPF wants to see one of these.
+ */
+struct ieee1394_bpfhdr {
+ uint8_t ibh_dhost[8];
+ uint8_t ibh_shost[8];
+ uint16_t ibh_type;
+};
+
+#ifdef _KERNEL
+
+/* pseudo header */
+struct ieee1394_header {
+ u_int8_t ih_uid[8]; /* dst/src uid */
+ u_int8_t ih_maxrec; /* dst maxrec for tx */
+ u_int8_t ih_speed; /* speed */
+ u_int8_t ih_offset[6]; /* dst offset */
+};
+
+/* unfragment encapsulation header */
+struct ieee1394_unfraghdr {
+ u_int16_t iuh_ft; /* fragment type == 0 */
+ u_int16_t iuh_etype; /* ether_type */
+};
+
+/* fragmented encapsulation header */
+struct ieee1394_fraghdr {
+ u_int16_t ifh_ft_size; /* fragment type, data size-1 */
+ u_int16_t ifh_etype_off; /* etype for first fragment */
+ /* offset for subseq frag */
+ u_int16_t ifh_dgl; /* datagram label */
+ u_int16_t ifh_reserved;
+};
+
+#define IEEE1394_FT_SUBSEQ 0x8000
+#define IEEE1394_FT_MORE 0x4000
+
+#define IEEE1394MTU 1500
+
+#define IEEE1394_GASP_LEN 8 /* GASP header for Stream */
+#define IEEE1394_ADDR_LEN 8
+#define IEEE1394_CRC_LEN 4
+
+struct ieee1394_reass_pkt {
+ LIST_ENTRY(ieee1394_reass_pkt) rp_next;
+ struct mbuf *rp_m;
+ u_int16_t rp_size;
+ u_int16_t rp_etype;
+ u_int16_t rp_off;
+ u_int16_t rp_dgl;
+ u_int16_t rp_len;
+ u_int16_t rp_ttl;
+};
+
+struct ieee1394_reassq {
+ LIST_ENTRY(ieee1394_reassq) rq_node;
+ LIST_HEAD(, ieee1394_reass_pkt) rq_pkt;
+ u_int32_t fr_id;
+};
+
+struct ieee1394com {
+ struct ifnet fc_if;
+ struct ieee1394_hwaddr ic_hwaddr;
+ u_int16_t ic_dgl;
+ LIST_HEAD(, ieee1394_reassq) ic_reassq;
+};
+
+const char *ieee1394_sprintf(const u_int8_t *);
+void ieee1394_input(struct ifnet *, struct mbuf *, u_int16_t);
+void ieee1394_ifattach(struct ifnet *, const struct ieee1394_hwaddr *);
+void ieee1394_ifdetach(struct ifnet *);
+int ieee1394_ioctl(struct ifnet *, u_long, caddr_t);
+struct mbuf * ieee1394_fragment(struct ifnet *, struct mbuf *, int, u_int16_t);
+void ieee1394_drain(struct ifnet *);
+void ieee1394_watchdog(struct ifnet *);
+#endif /* _KERNEL */
+
+#endif /* !_NET_IF_IEEE1394_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_packet.h b/6/platforms/android-3/arch-arm/usr/include/net/if_packet.h
new file mode 100644
index 0000000..b5e8e0e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+#include <linux/if_packet.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/if_types.h b/6/platforms/android-3/arch-arm/usr/include/net/if_types.h
new file mode 100644
index 0000000..f0a04f7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/if_types.h
@@ -0,0 +1,267 @@
+/* $NetBSD: if_types.h,v 1.24 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_types.h 8.3 (Berkeley) 4/28/95
+ */
+
+#ifndef _NET_IF_TYPES_H_
+#define _NET_IF_TYPES_H_
+
+/*
+ * Interface types for benefit of parsing media address headers.
+ * This list is derived from the SNMP list of ifTypes, originally
+ * documented in RFC1573, now maintained as:
+ *
+ * <URL:http://www.iana.org/assignments/smi-numbers>
+ */
+
+#define IFT_OTHER 0x1 /* none of the following */
+#define IFT_1822 0x2 /* old-style arpanet imp */
+#define IFT_HDH1822 0x3 /* HDH arpanet imp */
+#define IFT_X25DDN 0x4 /* x25 to imp */
+#define IFT_X25 0x5 /* PDN X25 interface (RFC877) */
+#define IFT_ETHER 0x6 /* Ethernet CSMA/CD */
+#define IFT_ISO88023 0x7 /* CSMA/CD */
+#define IFT_ISO88024 0x8 /* Token Bus */
+#define IFT_ISO88025 0x9 /* Token Ring */
+#define IFT_ISO88026 0xa /* MAN */
+#define IFT_STARLAN 0xb
+#define IFT_P10 0xc /* Proteon 10MBit ring */
+#define IFT_P80 0xd /* Proteon 80MBit ring */
+#define IFT_HY 0xe /* Hyperchannel */
+#define IFT_FDDI 0xf
+#define IFT_LAPB 0x10
+#define IFT_SDLC 0x11
+#define IFT_T1 0x12
+#define IFT_CEPT 0x13 /* E1 - european T1 */
+#define IFT_ISDNBASIC 0x14
+#define IFT_ISDNPRIMARY 0x15
+#define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */
+#define IFT_PPP 0x17 /* RFC 1331 */
+#define IFT_LOOP 0x18 /* loopback */
+#define IFT_EON 0x19 /* ISO over IP */
+#define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */
+#define IFT_NSIP 0x1b /* XNS over IP */
+#define IFT_SLIP 0x1c /* IP over generic TTY */
+#define IFT_ULTRA 0x1d /* Ultra Technologies */
+#define IFT_DS3 0x1e /* Generic T3 */
+#define IFT_SIP 0x1f /* SMDS */
+#define IFT_FRELAY 0x20 /* Frame Relay DTE only */
+#define IFT_RS232 0x21
+#define IFT_PARA 0x22 /* parallel-port */
+#define IFT_ARCNET 0x23
+#define IFT_ARCNETPLUS 0x24
+#define IFT_ATM 0x25 /* ATM cells */
+#define IFT_MIOX25 0x26
+#define IFT_SONET 0x27 /* SONET or SDH */
+#define IFT_X25PLE 0x28
+#define IFT_ISO88022LLC 0x29
+#define IFT_LOCALTALK 0x2a
+#define IFT_SMDSDXI 0x2b
+#define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */
+#define IFT_V35 0x2d
+#define IFT_HSSI 0x2e
+#define IFT_HIPPI 0x2f
+#define IFT_MODEM 0x30 /* Generic Modem */
+#define IFT_AAL5 0x31 /* AAL5 over ATM */
+#define IFT_SONETPATH 0x32
+#define IFT_SONETVT 0x33
+#define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */
+#define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */
+#define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */
+#define IFT_IEEE80212 0x37 /* 100BaseVG */
+#define IFT_FIBRECHANNEL 0x38 /* Fibre Channel */
+#define IFT_HIPPIINTERFACE 0x39 /* HIPPI interfaces */
+#define IFT_FRAMERELAYINTERCONNECT 0x3a /* Obsolete, use either 0x20 or 0x2c */
+#define IFT_AFLANE8023 0x3b /* ATM Emulated LAN for 802.3 */
+#define IFT_AFLANE8025 0x3c /* ATM Emulated LAN for 802.5 */
+#define IFT_CCTEMUL 0x3d /* ATM Emulated circuit */
+#define IFT_FASTETHER 0x3e /* Fast Ethernet (100BaseT) */
+#define IFT_ISDN 0x3f /* ISDN and X.25 */
+#define IFT_V11 0x40 /* CCITT V.11/X.21 */
+#define IFT_V36 0x41 /* CCITT V.36 */
+#define IFT_G703AT64K 0x42 /* CCITT G703 at 64Kbps */
+#define IFT_G703AT2MB 0x43 /* Obsolete see DS1-MIB */
+#define IFT_QLLC 0x44 /* SNA QLLC */
+#define IFT_FASTETHERFX 0x45 /* Fast Ethernet (100BaseFX) */
+#define IFT_CHANNEL 0x46 /* channel */
+#define IFT_IEEE80211 0x47 /* radio spread spectrum */
+#define IFT_IBM370PARCHAN 0x48 /* IBM System 360/370 OEMI Channel */
+#define IFT_ESCON 0x49 /* IBM Enterprise Systems Connection */
+#define IFT_DLSW 0x4a /* Data Link Switching */
+#define IFT_ISDNS 0x4b /* ISDN S/T interface */
+#define IFT_ISDNU 0x4c /* ISDN U interface */
+#define IFT_LAPD 0x4d /* Link Access Protocol D */
+#define IFT_IPSWITCH 0x4e /* IP Switching Objects */
+#define IFT_RSRB 0x4f /* Remote Source Route Bridging */
+#define IFT_ATMLOGICAL 0x50 /* ATM Logical Port */
+#define IFT_DS0 0x51 /* Digital Signal Level 0 */
+#define IFT_DS0BUNDLE 0x52 /* group of ds0s on the same ds1 */
+#define IFT_BSC 0x53 /* Bisynchronous Protocol */
+#define IFT_ASYNC 0x54 /* Asynchronous Protocol */
+#define IFT_CNR 0x55 /* Combat Net Radio */
+#define IFT_ISO88025DTR 0x56 /* ISO 802.5r DTR */
+#define IFT_EPLRS 0x57 /* Ext Pos Loc Report Sys */
+#define IFT_ARAP 0x58 /* Appletalk Remote Access Protocol */
+#define IFT_PROPCNLS 0x59 /* Proprietary Connectionless Protocol*/
+#define IFT_HOSTPAD 0x5a /* CCITT-ITU X.29 PAD Protocol */
+#define IFT_TERMPAD 0x5b /* CCITT-ITU X.3 PAD Facility */
+#define IFT_FRAMERELAYMPI 0x5c /* Multiproto Interconnect over FR */
+#define IFT_X213 0x5d /* CCITT-ITU X213 */
+#define IFT_ADSL 0x5e /* Asymmetric Digital Subscriber Loop */
+#define IFT_RADSL 0x5f /* Rate-Adapt. Digital Subscriber Loop*/
+#define IFT_SDSL 0x60 /* Symmetric Digital Subscriber Loop */
+#define IFT_VDSL 0x61 /* Very H-Speed Digital Subscrib. Loop*/
+#define IFT_ISO88025CRFPINT 0x62 /* ISO 802.5 CRFP */
+#define IFT_MYRINET 0x63 /* Myricom Myrinet */
+#define IFT_VOICEEM 0x64 /* voice recEive and transMit */
+#define IFT_VOICEFXO 0x65 /* voice Foreign Exchange Office */
+#define IFT_VOICEFXS 0x66 /* voice Foreign Exchange Station */
+#define IFT_VOICEENCAP 0x67 /* voice encapsulation */
+#define IFT_VOICEOVERIP 0x68 /* voice over IP encapsulation */
+#define IFT_ATMDXI 0x69 /* ATM DXI */
+#define IFT_ATMFUNI 0x6a /* ATM FUNI */
+#define IFT_ATMIMA 0x6b /* ATM IMA */
+#define IFT_PPPMULTILINKBUNDLE 0x6c /* PPP Multilink Bundle */
+#define IFT_IPOVERCDLC 0x6d /* IBM ipOverCdlc */
+#define IFT_IPOVERCLAW 0x6e /* IBM Common Link Access to Workstn */
+#define IFT_STACKTOSTACK 0x6f /* IBM stackToStack */
+#define IFT_VIRTUALIPADDRESS 0x70 /* IBM VIPA */
+#define IFT_MPC 0x71 /* IBM multi-protocol channel support */
+#define IFT_IPOVERATM 0x72 /* IBM ipOverAtm */
+#define IFT_ISO88025FIBER 0x73 /* ISO 802.5j Fiber Token Ring */
+#define IFT_TDLC 0x74 /* IBM twinaxial data link control */
+#define IFT_GIGABITETHERNET 0x75 /* Gigabit Ethernet */
+#define IFT_HDLC 0x76 /* HDLC */
+#define IFT_LAPF 0x77 /* LAP F */
+#define IFT_V37 0x78 /* V.37 */
+#define IFT_X25MLP 0x79 /* Multi-Link Protocol */
+#define IFT_X25HUNTGROUP 0x7a /* X25 Hunt Group */
+#define IFT_TRANSPHDLC 0x7b /* Transp HDLC */
+#define IFT_INTERLEAVE 0x7c /* Interleave channel */
+#define IFT_FAST 0x7d /* Fast channel */
+#define IFT_IP 0x7e /* IP (for APPN HPR in IP networks) */
+#define IFT_DOCSCABLEMACLAYER 0x7f /* CATV Mac Layer */
+#define IFT_DOCSCABLEDOWNSTREAM 0x80 /* CATV Downstream interface */
+#define IFT_DOCSCABLEUPSTREAM 0x81 /* CATV Upstream interface */
+#define IFT_A12MPPSWITCH 0x82 /* Avalon Parallel Processor */
+#define IFT_TUNNEL 0x83 /* Encapsulation interface */
+#define IFT_COFFEE 0x84 /* coffee pot */
+#define IFT_CES 0x85 /* Circiut Emulation Service */
+#define IFT_ATMSUBINTERFACE 0x86 /* (x) ATM Sub Interface */
+#define IFT_L2VLAN 0x87 /* Layer 2 Virtual LAN using 802.1Q */
+#define IFT_L3IPVLAN 0x88 /* Layer 3 Virtual LAN - IP Protocol */
+#define IFT_L3IPXVLAN 0x89 /* Layer 3 Virtual LAN - IPX Prot. */
+#define IFT_DIGITALPOWERLINE 0x8a /* IP over Power Lines */
+#define IFT_MEDIAMAILOVERIP 0x8b /* (xxx) Multimedia Mail over IP */
+#define IFT_DTM 0x8c /* Dynamic synchronous Transfer Mode */
+#define IFT_DCN 0x8d /* Data Communications Network */
+#define IFT_IPFORWARD 0x8e /* IP Forwarding Interface */
+#define IFT_MSDSL 0x8f /* Multi-rate Symmetric DSL */
+#define IFT_IEEE1394 0x90 /* IEEE1394 High Performance SerialBus*/
+#define IFT_IFGSN 0x91 /* HIPPI-6400 */
+#define IFT_DVBRCCMACLAYER 0x92 /* DVB-RCC MAC Layer */
+#define IFT_DVBRCCDOWNSTREAM 0x93 /* DVB-RCC Downstream Channel */
+#define IFT_DVBRCCUPSTREAM 0x94 /* DVB-RCC Upstream Channel */
+#define IFT_ATMVIRTUAL 0x95 /* ATM Virtual Interface */
+#define IFT_MPLSTUNNEL 0x96 /* MPLS Tunnel Virtual Interface */
+#define IFT_SRP 0x97 /* Spatial Reuse Protocol */
+#define IFT_VOICEOVERATM 0x98 /* Voice over ATM */
+#define IFT_VOICEOVERFRAMERELAY 0x99 /* Voice Over Frame Relay */
+#define IFT_IDSL 0x9a /* Digital Subscriber Loop over ISDN */
+#define IFT_COMPOSITELINK 0x9b /* Avici Composite Link Interface */
+#define IFT_SS7SIGLINK 0x9c /* SS7 Signaling Link */
+#define IFT_PROPWIRELESSP2P 0x9d /* Prop. P2P wireless interface */
+#define IFT_FRFORWARD 0x9e /* Frame forward Interface */
+#define IFT_RFC1483 0x9f /* Multiprotocol over ATM AAL5 */
+#define IFT_USB 0xa0 /* USB Interface */
+#define IFT_IEEE8023ADLAG 0xa1 /* IEEE 802.3ad Link Aggregate*/
+#define IFT_BGPPOLICYACCOUNTING 0xa2 /* BGP Policy Accounting */
+#define IFT_FRF16MFRBUNDLE 0xa3 /* FRF.16 Multilik Frame Relay*/
+#define IFT_H323GATEKEEPER 0xa4 /* H323 Gatekeeper */
+#define IFT_H323PROXY 0xa5 /* H323 Voice and Video Proxy */
+#define IFT_MPLS 0xa6 /* MPLS */
+#define IFT_MFSIGLINK 0xa7 /* Multi-frequency signaling link */
+#define IFT_HDSL2 0xa8 /* High Bit-Rate DSL, 2nd gen. */
+#define IFT_SHDSL 0xa9 /* Multirate HDSL2 */
+#define IFT_DS1FDL 0xaa /* Facility Data Link (4Kbps) on a DS1*/
+#define IFT_POS 0xab /* Packet over SONET/SDH Interface */
+#define IFT_DVBASILN 0xac /* DVB-ASI Input */
+#define IFT_DVBASIOUT 0xad /* DVB-ASI Output */
+#define IFT_PLC 0xae /* Power Line Communications */
+#define IFT_NFAS 0xaf /* Non-Facility Associated Signaling */
+#define IFT_TR008 0xb0 /* TROO8 */
+#define IFT_GR303RDT 0xb1 /* Remote Digital Terminal */
+#define IFT_GR303IDT 0xb2 /* Integrated Digital Terminal */
+#define IFT_ISUP 0xb3 /* ISUP */
+#define IFT_PROPDOCSWIRELESSMACLAYER 0xb4 /* prop/Wireless MAC Layer */
+#define IFT_PROPDOCSWIRELESSDOWNSTREAM 0xb5 /* prop/Wireless Downstream */
+#define IFT_PROPDOCSWIRELESSUPSTREAM 0xb6 /* prop/Wireless Upstream */
+#define IFT_HIPERLAN2 0xb7 /* HIPERLAN Type 2 Radio Interface */
+#define IFT_PROPBWAP2MP 0xb8 /* PropBroadbandWirelessAccess P2MP*/
+#define IFT_SONETOVERHEADCHANNEL 0xb9 /* SONET Overhead Channel */
+#define IFT_DIGITALWRAPPEROVERHEADCHANNEL 0xba /* Digital Wrapper Overhead */
+#define IFT_AAL2 0xbb /* ATM adaptation layer 2 */
+#define IFT_RADIOMAC 0xbc /* MAC layer over radio links */
+#define IFT_ATMRADIO 0xbd /* ATM over radio links */
+#define IFT_IMT 0xbe /* Inter-Machine Trunks */
+#define IFT_MVL 0xbf /* Multiple Virtual Lines DSL */
+#define IFT_REACHDSL 0xc0 /* Long Reach DSL */
+#define IFT_FRDLCIENDPT 0xc1 /* Frame Relay DLCI End Point */
+#define IFT_ATMVCIENDPT 0xc2 /* ATM VCI End Point */
+#define IFT_OPTICALCHANNEL 0xc3 /* Optical Channel */
+#define IFT_OPTICALTRANSPORT 0xc4 /* Optical Transport */
+#define IFT_PROPATM 0xc5 /* Proprietary ATM */
+#define IFT_VOICEOVERCABLE 0xc6 /* Voice Over Cable Interface */
+#define IFT_INFINIBAND 0xc7 /* Infiniband */
+#define IFT_TELINK 0xc8 /* TE Link */
+#define IFT_Q2931 0xc9 /* Q.2931 */
+#define IFT_VIRTUALTG 0xca /* Virtual Trunk Group */
+#define IFT_SIPTG 0xcb /* SIP Trunk Group */
+#define IFT_SIPSIG 0xcc /* SIP Signaling */
+#define IFT_DOCSCABLEUPSTREAMCHANNEL 0xcd /* CATV Upstream Channel */
+#define IFT_ECONET 0xce /* Acorn Econet */
+#define IFT_PON155 0xcf /* FSAN 155Mb Symetrical PON interface */
+#define IFT_PON622 0xd0 /* FSAN 622Mb Symetrical PON interface */*/
+#define IFT_BRIDGE 0xd1 /* Transparent bridge interface */
+#define IFT_LINEGROUP 0xd2 /* Interface common to multiple lines */
+#define IFT_VOICEEMFGD 0xd3 /* voice E&M Feature Group D */
+#define IFT_VOICEFGDEANA 0xd4 /* voice FGD Exchange Access North American */
+#define IFT_VOICEDID 0xd5 /* voice Direct Inward Dialing */
+#define IFT_STF 0xd7 /* 6to4 interface */
+
+/* not based on IANA assignments - how should we treat these? */
+#define IFT_GIF 0xf0
+#define IFT_PVC 0xf1
+#define IFT_FAITH 0xf2
+#define IFT_PFLOG 0xf5 /* Packet filter logging */
+#define IFT_PFSYNC 0xf6 /* Packet filter state syncing */
+
+#endif /* !_NET_IF_TYPES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/net/route.h b/6/platforms/android-3/arch-arm/usr/include/net/route.h
new file mode 100644
index 0000000..a60df24
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/net/route.h
@@ -0,0 +1 @@
+#include <linux/route.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/netdb.h b/6/platforms/android-3/arch-arm/usr/include/netdb.h
new file mode 100644
index 0000000..8d3996a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netdb.h
@@ -0,0 +1,256 @@
+/*-
+ * Copyright (c) 1980, 1983, 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * -
+ * --Copyright--
+ */
+
+/*
+ * @(#)netdb.h 8.1 (Berkeley) 6/2/93
+ * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
+ * $FreeBSD: /repoman/r/ncvs/src/include/netdb.h,v 1.41 2006/04/15 16:20:26 ume Exp $
+ */
+
+#ifndef _NETDB_H_
+#define _NETDB_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#ifndef _PATH_HEQUIV
+# define _PATH_HEQUIV "/system/etc/hosts.equiv"
+#endif
+#define _PATH_HOSTS "/system/etc/hosts"
+#define _PATH_NETWORKS "/system/etc/networks"
+#define _PATH_PROTOCOLS "/system/etc/protocols"
+#define _PATH_SERVICES "/system/etc/services"
+
+#define MAXHOSTNAMELEN 256
+
+
+/*
+ * Structures returned by network data base library. All addresses are
+ * supplied in host order, and returned in network order (suitable for
+ * use in system calls).
+ */
+struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ char **h_addr_list; /* list of addresses from name server */
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
+};
+
+struct netent {
+ char *n_name; /* official name of net */
+ char **n_aliases; /* alias list */
+ int n_addrtype; /* net address type */
+ uint32_t n_net; /* network # */
+};
+
+struct servent {
+ char *s_name; /* official service name */
+ char **s_aliases; /* alias list */
+ int s_port; /* port # */
+ char *s_proto; /* protocol to use */
+};
+
+struct protoent {
+ char *p_name; /* official protocol name */
+ char **p_aliases; /* alias list */
+ int p_proto; /* protocol # */
+};
+
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ socklen_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+
+/*
+ * Error return codes from gethostbyname() and gethostbyaddr()
+ * (left in h_errno).
+ */
+
+#define NETDB_INTERNAL -1 /* see errno */
+#define NETDB_SUCCESS 0 /* no problem */
+#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
+#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
+#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
+#define NO_DATA 4 /* Valid name, no data record of requested type */
+#define NO_ADDRESS NO_DATA /* no address, look for MX record */
+
+/*
+ * Error return codes from getaddrinfo()
+ */
+#if 0
+/* obsoleted */
+#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
+#endif
+#define EAI_AGAIN 2 /* temporary failure in name resolution */
+#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
+#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* memory allocation failure */
+#define EAI_NODATA 7 /* no address associated with hostname */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
+#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
+#define EAI_SYSTEM 11 /* system error returned in errno */
+#define EAI_BADHINTS 12 /* invalid value for hints */
+#define EAI_PROTOCOL 13 /* resolved protocol is unknown */
+#define EAI_OVERFLOW 14 /* argument buffer overflow */
+#define EAI_MAX 15
+
+/*
+ * Flag values for getaddrinfo()
+ */
+#define AI_PASSIVE 0x00000001 /* get address to use bind() */
+#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
+#define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */
+#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */
+/* valid flags for addrinfo (not a standard def, apps should not use it) */
+#define AI_MASK \
+ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \
+ AI_ADDRCONFIG)
+
+#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
+#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
+#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
+#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */
+/* special recommended flags for getipnodebyname */
+#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
+
+/*
+ * Constants for getnameinfo()
+ */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/*
+ * Flag values for getnameinfo()
+ */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+#if 0 /* obsolete */
+#define NI_WITHSCOPEID 0x00000020
+#endif
+
+/*
+ * Scope delimit character
+ */
+#define SCOPE_DELIMITER '%'
+
+__BEGIN_DECLS
+/* BIONIC-BEGIN */
+#define h_errno (*__get_h_errno())
+int* __get_h_errno(void);
+/* BIONIC-END */
+void endservent(void);
+struct hostent *gethostbyaddr(const char *, int, int);
+struct hostent *gethostbyname(const char *);
+int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
+struct hostent *gethostbyname2(const char *, int);
+struct hostent *gethostent(void);
+struct netent *getnetbyaddr(uint32_t, int);
+struct netent *getnetbyname(const char *);
+struct protoent *getprotobyname(const char *);
+struct protoent *getprotobynumber(int);
+struct servent *getservbyname(const char *, const char *);
+struct servent *getservbyport(int, const char *);
+struct servent *getservent(void);
+void herror(const char *);
+const char *hstrerror(int);
+int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **);
+int getnameinfo(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int);
+void freeaddrinfo(struct addrinfo *);
+const char *gai_strerror(int);
+void setservent(int);
+
+#if 0 /* MISSING FROM BIONIC */
+void endhostent(void);
+void endnetent(void);
+void endnetgrent(void);
+void endprotoent(void);
+void freehostent(struct hostent *);
+int gethostbyaddr_r(const char *, int, int, struct hostent *, char *, size_t, struct hostent **, int *);
+int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *);
+int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *);
+struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
+struct hostent *getipnodebyname(const char *, int, int, int *);
+int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t, struct netent**, int *);
+int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int *);
+int getnetent_r(struct netent *, char *, size_t, struct netent **, int *);
+int getnetgrent(char **, char **, char **);
+int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **);
+int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **);
+struct protoent *getprotoent(void);
+int getprotoent_r(struct protoent *, char *, size_t, struct protoent **);
+int innetgr(const char *, const char *, const char *, const char *);
+void sethostent(int);
+void setnetent(int);
+void setprotoent(int);
+struct netent *getnetent(void);
+void setnetgrent(const char *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* !_NETDB_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/ether.h b/6/platforms/android-3/arch-arm/usr/include/netinet/ether.h
new file mode 100644
index 0000000..a1c9cbb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/ether.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <net/if_ether.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/if_ether.h b/6/platforms/android-3/arch-arm/usr/include/netinet/if_ether.h
new file mode 100644
index 0000000..700b9db
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/if_ether.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/if_ether.h>
+#include <linux/if_arp.h>
+#ifndef ETHER_ADDR_LEN
+#define ETHER_ADDR_LEN ETH_ALEN
+#include <net/ethertypes.h>
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/in.h b/6/platforms/android-3/arch-arm/usr/include/netinet/in.h
new file mode 100644
index 0000000..7a4b6c7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/in.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_IN_H_
+#define _NETINET_IN_H_
+
+#include <endian.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#include <netinet/in6.h>
+
+__BEGIN_DECLS
+
+#define IPPORT_RESERVED 1024
+
+#define INET_ADDRSTRLEN 16
+
+extern int bindresvport (int sd, struct sockaddr_in *sin);
+
+static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
+
+__END_DECLS
+
+#endif /* _NETINET_IN_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/in6.h b/6/platforms/android-3/arch-arm/usr/include/netinet/in6.h
new file mode 100644
index 0000000..e756583
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/in6.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_IN6_H
+#define _NETINET_IN6_H
+
+#include <linux/in6.h>
+
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
+
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
+
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+
+#define IN6_IS_ADDR_MULTICAST(a) \
+ (((__const uint8_t *) (a))[0] == 0xff)
+
+
+#define IPV6_ADDR_SCOPE_NODELOCAL 0x01
+#define IPV6_ADDR_SCOPE_INTFACELOCAL 0x01
+#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
+#define IPV6_ADDR_SCOPE_SITELOCAL 0x05
+#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08
+#define IPV6_ADDR_SCOPE_GLOBAL 0x0e
+
+#define IPV6_ADDR_MC_SCOPE(a) \
+ ((a)->s6_addr[1] & 0x0f)
+
+#define IN6_IS_ADDR_MC_NODELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL))
+#define IN6_IS_ADDR_MC_SITELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL))
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL))
+#define IN6_IS_ADDR_MC_GLOBAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
+
+#define IN6_ARE_ADDR_EQUAL(a, b) \
+ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
+
+#define INET6_ADDRSTRLEN 46
+
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+
+#define IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
+
+#define ipv6mr_interface ipv6mr_ifindex
+
+
+#endif /* _NETINET_IN6_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/in_systm.h b/6/platforms/android-3/arch-arm/usr/include/netinet/in_systm.h
new file mode 100644
index 0000000..ff53fb7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/in_systm.h
@@ -0,0 +1,59 @@
+/* $NetBSD: in_systm.h,v 1.13 2005/12/10 23:36:23 elad Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IN_SYSTM_H_
+#define _NETINET_IN_SYSTM_H_
+
+/*
+ * Miscellaneous internetwork
+ * definitions for kernel.
+ */
+
+/*
+ * Network types.
+ *
+ * Internally the system keeps counters in the headers with the bytes
+ * swapped so that VAX instructions will work on them. It reverses
+ * the bytes before transmission at each protocol level. The n_ types
+ * represent the types with the bytes in ``high-ender'' order.
+ */
+typedef u_int16_t n_short; /* short as received from the net */
+typedef u_int32_t n_long; /* long as received from the net */
+
+typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
+
+#ifdef _KERNEL
+n_time iptime (void);
+#endif
+
+#endif /* !_NETINET_IN_SYSTM_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/ip.h b/6/platforms/android-3/arch-arm/usr/include/netinet/ip.h
new file mode 100644
index 0000000..541905c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/ip.h
@@ -0,0 +1,275 @@
+/* $OpenBSD: ip.h,v 1.12 2006/04/27 02:19:32 tedu Exp $ */
+/* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP_H_
+#define _NETINET_IP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <endian.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+
+__BEGIN_DECLS
+
+/*
+ * Definitions for internet protocol version 4.
+ * Per RFC 791, September 1981.
+ */
+#define IPVERSION 4
+
+/*
+ * Structure of an internet header, naked of options.
+ */
+struct ip {
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int32_t ip_hl:4, /* header length */
+ ip_v:4; /* version */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int32_t ip_v:4, /* version */
+ ip_hl:4; /* header length */
+#endif
+ u_int8_t ip_tos; /* type of service */
+ u_int16_t ip_len; /* total length */
+ u_int16_t ip_id; /* identification */
+ u_int16_t ip_off; /* fragment offset field */
+#define IP_RF 0x8000 /* reserved fragment flag */
+#define IP_DF 0x4000 /* dont fragment flag */
+#define IP_MF 0x2000 /* more fragments flag */
+#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
+ u_int8_t ip_ttl; /* time to live */
+ u_int8_t ip_p; /* protocol */
+ u_int16_t ip_sum; /* checksum */
+ struct in_addr ip_src, ip_dst; /* source and dest address */
+};
+
+#define IP_MAXPACKET 65535 /* maximum packet size */
+
+/*
+ * Definitions for IP type of service (ip_tos)
+ */
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+/* IPTOS_LOWCOST 0x02 XXX */
+#if 1
+/* ECN RFC3168 obsoletes RFC2481, and these will be deprecated soon. */
+#define IPTOS_CE 0x01 /* congestion experienced */
+#define IPTOS_ECT 0x02 /* ECN-capable transport */
+#endif
+
+/*
+ * Definitions for IP precedence (also in ip_tos) (hopefully unused)
+ */
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+/*
+ * ECN (Explicit Congestion Notification) codepoints in RFC3168
+ * mapped to the lower 2 bits of the TOS field.
+ */
+#define IPTOS_ECN_NOTECT 0x00 /* not-ECT */
+#define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */
+#define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */
+#define IPTOS_ECN_CE 0x03 /* congestion experienced */
+#define IPTOS_ECN_MASK 0x03 /* ECN field mask */
+
+/*
+ * Definitions for options.
+ */
+#define IPOPT_COPIED(o) ((o)&0x80)
+#define IPOPT_CLASS(o) ((o)&0x60)
+#define IPOPT_NUMBER(o) ((o)&0x1f)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_DEBMEAS 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_EOL 0 /* end of option list */
+#define IPOPT_NOP 1 /* no operation */
+
+#define IPOPT_RR 7 /* record packet route */
+#define IPOPT_TS 68 /* timestamp */
+#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
+#define IPOPT_LSRR 131 /* loose source route */
+#define IPOPT_SATID 136 /* satnet id */
+#define IPOPT_SSRR 137 /* strict source route */
+
+/*
+ * Offsets to fields in options other than EOL and NOP.
+ */
+#define IPOPT_OPTVAL 0 /* option ID */
+#define IPOPT_OLEN 1 /* option length */
+#define IPOPT_OFFSET 2 /* offset within option */
+#define IPOPT_MINOFF 4 /* min value of above */
+
+/*
+ * Time stamp option structure.
+ */
+struct ip_timestamp {
+ u_int8_t ipt_code; /* IPOPT_TS */
+ u_int8_t ipt_len; /* size of structure (variable) */
+ u_int8_t ipt_ptr; /* index of current entry */
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+ u_int32_t ipt_flg:4, /* flags, see below */
+ ipt_oflw:4; /* overflow counter */
+#endif
+#if _BYTE_ORDER == _BIG_ENDIAN
+ u_int32_t ipt_oflw:4, /* overflow counter */
+ ipt_flg:4; /* flags, see below */
+#endif
+ union ipt_timestamp {
+ n_time ipt_time[1];
+ struct ipt_ta {
+ struct in_addr ipt_addr;
+ n_time ipt_time;
+ } ipt_ta[1];
+ } ipt_timestamp;
+};
+
+/* flag bits for ipt_flg */
+#define IPOPT_TS_TSONLY 0 /* timestamps only */
+#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
+#define IPOPT_TS_PRESPEC 3 /* specified modules only */
+
+/* bits for security (not byte swapped) */
+#define IPOPT_SECUR_UNCLASS 0x0000
+#define IPOPT_SECUR_CONFID 0xf135
+#define IPOPT_SECUR_EFTO 0x789a
+#define IPOPT_SECUR_MMMM 0xbc4d
+#define IPOPT_SECUR_RESTR 0xaf13
+#define IPOPT_SECUR_SECRET 0xd788
+#define IPOPT_SECUR_TOPSECRET 0x6bc5
+
+/*
+ * Internet implementation parameters.
+ */
+#define MAXTTL 255 /* maximum time to live (seconds) */
+#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
+#define IPFRAGTTL 60 /* time to live for frags, slowhz */
+#define IPTTLDEC 1 /* subtracted when forwarding */
+
+#define IP_MSS 576 /* default maximum segment size */
+
+/*
+ * This is the real IPv4 pseudo header, used for computing the TCP and UDP
+ * checksums. For the Internet checksum, struct ipovly can be used instead.
+ * For stronger checksums, the real thing must be used.
+ */
+struct ippseudo {
+ struct in_addr ippseudo_src; /* source internet address */
+ struct in_addr ippseudo_dst; /* destination internet address */
+ u_int8_t ippseudo_pad; /* pad, must be zero */
+ u_int8_t ippseudo_p; /* protocol */
+ u_int16_t ippseudo_len; /* protocol length */
+};
+
+/* BIONIC addition: declarations matching the Linux kernel */
+/* some programs expect these... */
+
+#define IPOPT_OPTVAL 0
+#define IPOPT_OLEN 1
+#define IPOPT_OFFSET 2
+#define IPOPT_MINOFF 4
+#define MAX_IPOPTLEN 40
+
+#define IPOPT_COPY 0x80
+#define IPOPT_CLASS_MASK 0x60
+#define IPOPT_NUMBER_MASK 0x1f
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_MEASUREMENT 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_END (0 |IPOPT_CONTROL)
+#define IPOPT_NOOP (1 |IPOPT_CONTROL)
+#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
+#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
+
+struct iphdr {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ uint8_t ihl :4,
+ version:4;
+#elif defined (__BIG_ENDIAN_BITFIELD)
+ uint8_t version:4,
+ ihl :4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ uint8_t tos;
+ uint16_t tot_len;
+ uint16_t id;
+ uint16_t frag_off;
+ uint8_t ttl;
+ uint8_t protocol;
+ uint16_t check;
+ int32_t saddr;
+ int32_t daddr;
+};
+
+struct ip_auth_hdr {
+ uint8_t nexthdr;
+ uint8_t hdrlen;
+ uint16_t reserved;
+ uint32_t spi;
+ uint32_t seq_no;
+ uint8_t auth_data[0];
+};
+
+struct ip_esp_hdr {
+ uint32_t spi;
+ uint32_t seq_no;
+ uint8_t enc_data[0];
+};
+
+struct ip_comp_hdr {
+ uint8_t nexthdr;
+ uint8_t flags;
+ uint16_t cpi;
+};
+
+__END_DECLS
+
+#endif /* _NETINET_IP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/ip_icmp.h b/6/platforms/android-3/arch-arm/usr/include/netinet/ip_icmp.h
new file mode 100644
index 0000000..7510592
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/ip_icmp.h
@@ -0,0 +1,214 @@
+/* $OpenBSD: ip_icmp.h,v 1.21 2005/07/31 03:30:55 pascoe Exp $ */
+/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP_ICMP_H_
+#define _NETINET_IP_ICMP_H_
+
+#include <netinet/ip.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/*
+ * Interface Control Message Protocol Definitions.
+ * Per RFC 792, September 1981.
+ * RFC 950, August 1985. (Address Mask Request / Reply)
+ * RFC 1256, September 1991. (Router Advertisement and Solicitation)
+ * RFC 1108, November 1991. (Param Problem, Missing Req. Option)
+ * RFC 1393, January 1993. (Traceroute)
+ * RFC 1475, June 1993. (Datagram Conversion Error)
+ * RFC 1812, June 1995. (adm prohib, host precedence, precedence cutoff)
+ * RFC 2002, October 1996. (Mobility changes to Router Advertisement)
+ */
+
+/*
+ * ICMP Router Advertisement data
+ */
+struct icmp_ra_addr {
+ uint32_t ira_addr;
+ uint32_t ira_preference;
+};
+
+/*
+ * Structure of an icmp header.
+ */
+struct icmp {
+ uint8_t icmp_type; /* type of message, see below */
+ uint8_t icmp_code; /* type sub code */
+ uint16_t icmp_cksum; /* ones complement cksum of struct */
+ union {
+ uint8_t ih_pptr; /* ICMP_PARAMPROB */
+ struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
+ struct ih_idseq {
+ uint16_t icd_id;
+ uint16_t icd_seq;
+ } ih_idseq;
+ int32_t ih_void;
+
+ /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
+ struct ih_pmtu {
+ uint16_t ipm_void;
+ uint16_t ipm_nextmtu;
+ } ih_pmtu;
+
+ struct ih_rtradv {
+ uint8_t irt_num_addrs;
+ uint8_t irt_wpa;
+ uint16_t irt_lifetime;
+ } ih_rtradv;
+ } icmp_hun;
+#define icmp_pptr icmp_hun.ih_pptr
+#define icmp_gwaddr icmp_hun.ih_gwaddr
+#define icmp_id icmp_hun.ih_idseq.icd_id
+#define icmp_seq icmp_hun.ih_idseq.icd_seq
+#define icmp_void icmp_hun.ih_void
+#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
+#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
+#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
+#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
+#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
+ union {
+ struct id_ts {
+ uint32_t its_otime;
+ uint32_t its_rtime;
+ uint32_t its_ttime;
+ } id_ts;
+ struct id_ip {
+ struct ip idi_ip;
+ /* options and then 64 bits of data */
+ } id_ip;
+ uint32_t id_mask;
+ int8_t id_data[1];
+ } icmp_dun;
+#define icmp_otime icmp_dun.id_ts.its_otime
+#define icmp_rtime icmp_dun.id_ts.its_rtime
+#define icmp_ttime icmp_dun.id_ts.its_ttime
+#define icmp_ip icmp_dun.id_ip.idi_ip
+#define icmp_mask icmp_dun.id_mask
+#define icmp_data icmp_dun.id_data
+};
+
+/*
+ * For IPv6 transition related ICMP errors.
+ */
+#define ICMP_V6ADVLENMIN (8 + sizeof(struct ip) + 40)
+#define ICMP_V6ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 40)
+
+/*
+ * Lower bounds on packet lengths for various types.
+ * For the error advice packets must first insure that the
+ * packet is large enough to contain the returned ip header.
+ * Only then can we do the check to see if 64 bits of packet
+ * data have been returned, since we need to check the returned
+ * ip header length.
+ */
+#define ICMP_MINLEN 8 /* abs minimum */
+#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
+#define ICMP_MASKLEN 12 /* address mask */
+#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
+#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
+ /* N.B.: must separately check that ip_hl >= 5 */
+
+/*
+ * Definition of type and code field values.
+ * http://www.iana.org/assignments/icmp-parameters
+ */
+#define ICMP_ECHOREPLY 0 /* echo reply */
+#define ICMP_UNREACH 3 /* dest unreachable, codes: */
+#define ICMP_UNREACH_NET 0 /* bad net */
+#define ICMP_UNREACH_HOST 1 /* bad host */
+#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
+#define ICMP_UNREACH_PORT 3 /* bad port */
+#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
+#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
+#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
+#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
+#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
+#define ICMP_UNREACH_NET_PROHIB 9 /* for crypto devs */
+#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
+#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
+#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
+#define ICMP_UNREACH_FILTER_PROHIB 13 /* prohibited access */
+#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* precedence violat'n*/
+#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* precedence cutoff */
+#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
+#define ICMP_REDIRECT 5 /* shorter route, codes: */
+#define ICMP_REDIRECT_NET 0 /* for network */
+#define ICMP_REDIRECT_HOST 1 /* for host */
+#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
+#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
+#define ICMP_ALTHOSTADDR 6 /* alternate host address */
+#define ICMP_ECHO 8 /* echo service */
+#define ICMP_ROUTERADVERT 9 /* router advertisement */
+#define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */
+#define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */
+#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
+#define ICMP_TIMXCEED 11 /* time exceeded, code: */
+#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
+#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
+#define ICMP_PARAMPROB 12 /* ip header bad */
+#define ICMP_PARAMPROB_ERRATPTR 0 /* req. opt. absent */
+#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
+#define ICMP_PARAMPROB_LENGTH 2 /* bad length */
+#define ICMP_TSTAMP 13 /* timestamp request */
+#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
+#define ICMP_IREQ 15 /* information request */
+#define ICMP_IREQREPLY 16 /* information reply */
+#define ICMP_MASKREQ 17 /* address mask request */
+#define ICMP_MASKREPLY 18 /* address mask reply */
+#define ICMP_TRACEROUTE 30 /* traceroute */
+#define ICMP_DATACONVERR 31 /* data conversion error */
+#define ICMP_MOBILE_REDIRECT 32 /* mobile host redirect */
+#define ICMP_IPV6_WHEREAREYOU 33 /* IPv6 where-are-you */
+#define ICMP_IPV6_IAMHERE 34 /* IPv6 i-am-here */
+#define ICMP_MOBILE_REGREQUEST 35 /* mobile registration req */
+#define ICMP_MOBILE_REGREPLY 36 /* mobile registration reply */
+#define ICMP_SKIP 39 /* SKIP */
+#define ICMP_PHOTURIS 40 /* Photuris */
+#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* unknown sec index */
+#define ICMP_PHOTURIS_AUTH_FAILED 2 /* auth failed */
+#define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* decrypt failed */
+
+#define ICMP_MAXTYPE 40
+
+#define ICMP_INFOTYPE(type) \
+ ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
+ (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
+ (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
+ (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
+ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
+
+__END_DECLS
+
+#endif /* _NETINET_IP_ICMP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/tcp.h b/6/platforms/android-3/arch-arm/usr/include/netinet/tcp.h
new file mode 100644
index 0000000..9adf904
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/tcp.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_TCP_H
+#define _NETINET_TCP_H
+
+#include <endian.h> /* Include *before* linux/tcp.h */
+#include <linux/tcp.h>
+
+#endif /* _NETINET_TCP_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netinet/udp.h b/6/platforms/android-3/arch-arm/usr/include/netinet/udp.h
new file mode 100644
index 0000000..25e0dfc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netinet/udp.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_UDP_H
+#define _NETINET_UDP_H
+
+/*
+ * We would include linux/udp.h, but it brings in too much other stuff
+ */
+
+#ifdef __FAVOR_BSD
+
+struct udphdr {
+ u_int16_t uh_sport; /* source port */
+ u_int16_t uh_dport; /* destination port */
+ u_int16_t uh_ulen; /* udp length */
+ u_int16_t uh_sum; /* udp checksum */
+};
+
+#else
+
+struct udphdr {
+ __u16 source;
+ __u16 dest;
+ __u16 len;
+ __u16 check;
+};
+
+#endif /* __FAVOR_BSD */
+
+#endif /* _NETINET_UDP_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/netpacket/packet.h b/6/platforms/android-3/arch-arm/usr/include/netpacket/packet.h
new file mode 100644
index 0000000..b5e8e0e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+#include <linux/if_packet.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/nsswitch.h b/6/platforms/android-3/arch-arm/usr/include/nsswitch.h
new file mode 100644
index 0000000..0ddc74e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/nsswitch.h
@@ -0,0 +1,237 @@
+/* $NetBSD: nsswitch.h,v 1.18 2005/11/29 03:12:58 christos Exp $ */
+
+/*-
+ * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _NSSWITCH_H
+#define _NSSWITCH_H 1
+
+#include <sys/types.h>
+#include <stdarg.h>
+
+#define NSS_MODULE_INTERFACE_VERSION 0
+
+#ifndef _PATH_NS_CONF
+#define _PATH_NS_CONF "/etc/nsswitch.conf"
+#endif
+
+#define NS_CONTINUE 0
+#define NS_RETURN 1
+
+/*
+ * Layout of:
+ * uint32_t ns_src.flags
+ */
+ /* nsswitch.conf status codes and nsdispatch(3) return values */
+#define NS_SUCCESS (1<<0) /* entry was found */
+#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */
+#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */
+#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */
+#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */
+
+ /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */
+#define NS_FORCEALL (1<<8) /* force all methods to be invoked; */
+
+/*
+ * Currently implemented sources.
+ */
+#define NSSRC_FILES "files" /* local files */
+#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */
+#define NSSRC_NIS "nis" /* YP/NIS */
+#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */
+
+/*
+ * Currently implemented databases.
+ */
+#define NSDB_HOSTS "hosts"
+#define NSDB_GROUP "group"
+#define NSDB_GROUP_COMPAT "group_compat"
+#define NSDB_NETGROUP "netgroup"
+#define NSDB_NETWORKS "networks"
+#define NSDB_PASSWD "passwd"
+#define NSDB_PASSWD_COMPAT "passwd_compat"
+#define NSDB_SHELLS "shells"
+
+/*
+ * Suggested databases to implement.
+ */
+#define NSDB_ALIASES "aliases"
+#define NSDB_AUTH "auth"
+#define NSDB_AUTOMOUNT "automount"
+#define NSDB_BOOTPARAMS "bootparams"
+#define NSDB_ETHERS "ethers"
+#define NSDB_EXPORTS "exports"
+#define NSDB_NETMASKS "netmasks"
+#define NSDB_PHONES "phones"
+#define NSDB_PRINTCAP "printcap"
+#define NSDB_PROTOCOLS "protocols"
+#define NSDB_REMOTE "remote"
+#define NSDB_RPC "rpc"
+#define NSDB_SENDMAILVARS "sendmailvars"
+#define NSDB_SERVICES "services"
+#define NSDB_TERMCAP "termcap"
+#define NSDB_TTYS "ttys"
+
+/*
+ * ns_dtab `callback' function signature.
+ */
+typedef int (*nss_method)(void *, void *, va_list);
+
+/*
+ * ns_dtab - `nsswitch dispatch table'
+ * Contains an entry for each source and the appropriate function to call.
+ */
+typedef struct {
+ const char *src;
+ nss_method callback;
+ void *cb_data;
+} ns_dtab;
+
+/*
+ * Macros to help build an ns_dtab[]
+ */
+#define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) },
+#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) },
+
+#ifdef HESIOD
+# define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) },
+#else
+# define NS_DNS_CB(F,C)
+#endif
+
+#ifdef YP
+# define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) },
+#else
+# define NS_NIS_CB(F,C)
+#endif
+
+/*
+ * ns_src - `nsswitch source'
+ * Used by the nsparser routines to store a mapping between a source
+ * and its dispatch control flags for a given database.
+ */
+typedef struct {
+ const char *name;
+ uint32_t flags;
+} ns_src;
+
+
+/*
+ * Default sourcelists (if nsswitch.conf is missing, corrupt,
+ * or the requested database doesn't have an entry)
+ */
+#if 0 /* MISSING FROM BIONIC */
+extern const ns_src __nsdefaultsrc[];
+extern const ns_src __nsdefaultcompat[];
+extern const ns_src __nsdefaultcompat_forceall[];
+extern const ns_src __nsdefaultfiles[];
+extern const ns_src __nsdefaultfiles_forceall[];
+extern const ns_src __nsdefaultnis[];
+extern const ns_src __nsdefaultnis_forceall[];
+#endif /* MISSING */
+
+/*
+ * ns_mtab - `nsswitch method table'
+ * An nsswitch module provides a mapping from (database name, method name)
+ * tuples to the nss_method and associated callback data. Effectively,
+ * ns_dtab, but used for dynamically loaded modules.
+ */
+typedef struct {
+ const char *database;
+ const char *name;
+ nss_method method;
+ void *mdata;
+} ns_mtab;
+
+/*
+ * nss_module_register_fn - module registration function
+ * called at module load
+ * nss_module_unregister_fn - module un-registration function
+ * called at module unload
+ */
+typedef void (*nss_module_unregister_fn)(ns_mtab *, u_int);
+typedef ns_mtab *(*nss_module_register_fn)(const char *, u_int *,
+ nss_module_unregister_fn *);
+
+#ifdef _NS_PRIVATE
+
+/*
+ * Private data structures for back-end nsswitch implementation.
+ */
+
+/*
+ * ns_dbt - `nsswitch database thang'
+ * For each database in /etc/nsswitch.conf there is a ns_dbt, with its
+ * name and a list of ns_src's containing the source information.
+ */
+typedef struct {
+ const char *name; /* name of database */
+ ns_src *srclist; /* list of sources */
+ u_int srclistsize; /* size of srclist */
+} ns_dbt;
+
+/*
+ * ns_mod - `nsswitch module'
+ */
+typedef struct {
+ const char *name; /* module name */
+ void *handle; /* handle from dlopen() */
+ ns_mtab *mtab; /* method table */
+ u_int mtabsize; /* size of mtab */
+ /* called to unload module */
+ nss_module_unregister_fn unregister;
+} ns_mod;
+
+#endif /* _NS_PRIVATE */
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int nsdispatch(void *, const ns_dtab [], const char *,
+ const char *, const ns_src [], ...);
+
+#ifdef _NS_PRIVATE
+int _nsdbtaddsrc(ns_dbt *, const ns_src *);
+void _nsdbtdump(const ns_dbt *);
+int _nsdbtput(const ns_dbt *);
+void _nsyyerror(const char *);
+int _nsyylex(void);
+#endif /* _NS_PRIVATE */
+
+__END_DECLS
+
+#endif /* !_NSSWITCH_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/pathconf.h b/6/platforms/android-3/arch-arm/usr/include/pathconf.h
new file mode 100644
index 0000000..94f9787
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/pathconf.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PATHCONF_H_
+#define _PATHCONF_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* constants to be used for the 'name' paremeter of pathconf/fpathconf */
+
+#define _PC_FILESIZEBITS 0x0000
+#define _PC_LINK_MAX 0x0001
+#define _PC_MAX_CANON 0x0002
+#define _PC_MAX_INPUT 0x0003
+#define _PC_NAME_MAX 0x0004
+#define _PC_PATH_MAX 0x0005
+#define _PC_PIPE_BUF 0x0006
+#define _PC_2_SYMLINKS 0x0007
+#define _PC_ALLOC_SIZE_MIN 0x0008
+#define _PC_REC_INCR_XFER_SIZE 0x0009
+#define _PC_REC_MAX_XFER_SIZE 0x000a
+#define _PC_REC_MIN_XFER_SIZE 0x000b
+#define _PC_REC_XFER_ALIGN 0x000c
+#define _PC_SYMLINK_MAX 0x000d
+#define _PC_CHOWN_RESTRICTED 0x000e
+#define _PC_NO_TRUNC 0x000f
+#define _PC_VDISABLE 0x0010
+#define _PC_ASYNC_IO 0x0011
+#define _PC_PRIO_IO 0x0012
+#define _PC_SYNC_IO 0x0013
+
+extern long fpathconf(int fildes, int name);
+extern long pathconf(const char *path, int name);
+
+__END_DECLS
+
+#endif /* _PATHCONF_H_ */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/paths.h b/6/platforms/android-3/arch-arm/usr/include/paths.h
new file mode 100644
index 0000000..a72162f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/paths.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)paths.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _PATHS_H_
+#define _PATHS_H_
+
+/* Default search path. */
+#define _PATH_DEFPATH "/usr/bin:/bin"
+/* All standard utilities path. */
+#define _PATH_STDPATH \
+ "/usr/bin:/bin:/usr/sbin:/sbin"
+
+#define _PATH_BSHELL "/system/bin/sh"
+#define _PATH_CONSOLE "/dev/console"
+#define _PATH_CSHELL "/bin/csh"
+#define _PATH_DEVDB "/var/run/dev.db"
+#define _PATH_DEVNULL "/dev/null"
+#define _PATH_DRUM "/dev/drum"
+#define _PATH_KLOG "/proc/kmsg"
+#define _PATH_KMEM "/dev/kmem"
+#define _PATH_LASTLOG "/var/log/lastlog"
+#define _PATH_MAILDIR "/var/mail"
+#define _PATH_MAN "/usr/share/man"
+#define _PATH_MEM "/dev/mem"
+#define _PATH_MNTTAB "/etc/fstab"
+#define _PATH_MOUNTED "/etc/mtab"
+#define _PATH_NOLOGIN "/etc/nologin"
+#define _PATH_PRESERVE "/var/lib"
+#define _PATH_RWHODIR "/var/spool/rwho"
+#define _PATH_SENDMAIL "/usr/sbin/sendmail"
+#define _PATH_SHADOW "/etc/shadow"
+#define _PATH_SHELLS "/etc/shells"
+#define _PATH_TTY "/dev/tty"
+#define _PATH_UNIX "/boot/vmlinux"
+#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_VI "/bin/vi"
+#define _PATH_WTMP "/var/log/wtmp"
+
+/* Provide trailing slash, since mostly used for building pathnames. */
+#define _PATH_DEV "/dev/"
+#define _PATH_TMP "/tmp/"
+#define _PATH_VARDB "/var/db/"
+#define _PATH_VARRUN "/var/run/"
+#define _PATH_VARTMP "/var/tmp/"
+
+#endif /* !_PATHS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/poll.h b/6/platforms/android-3/arch-arm/usr/include/poll.h
new file mode 100644
index 0000000..560be89
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/poll.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _POLL_H_
+#define _POLL_H_
+
+#include <sys/cdefs.h>
+#include <linux/poll.h>
+
+__BEGIN_DECLS
+
+typedef unsigned int nfds_t;
+
+/* POSIX specifies "int" for the timeout, Linux seems to use long... */
+extern int poll(struct pollfd *, nfds_t, long);
+
+__END_DECLS
+
+#endif /* _POLL_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/pthread.h b/6/platforms/android-3/arch-arm/usr/include/pthread.h
new file mode 100644
index 0000000..e3afdae
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/pthread.h
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-3/arch-arm/usr/include/pwd.h b/6/platforms/android-3/arch-arm/usr/include/pwd.h
new file mode 100644
index 0000000..1e85efd
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/pwd.h
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)pwd.h 8.2 (Berkeley) 1/21/94
+ */
+
+/*-
+ * Portions Copyright(C) 1995, Jason Downs. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _PWD_H_
+#define _PWD_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define _PATH_PASSWD "/etc/passwd"
+#define _PATH_MASTERPASSWD "/etc/master.passwd"
+#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
+
+#define _PATH_PASSWD_CONF "/etc/passwd.conf"
+#define _PATH_PASSWDCONF _PATH_PASSWD_CONF /* XXX: compat */
+#define _PATH_USERMGMT_CONF "/etc/usermgmt.conf"
+
+#define _PATH_MP_DB "/etc/pwd.db"
+#define _PATH_SMP_DB "/etc/spwd.db"
+
+#define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb"
+
+#define _PW_KEYBYNAME '1' /* stored by name */
+#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */
+#define _PW_KEYBYUID '3' /* stored by uid */
+
+#define _PASSWORD_EFMT1 '_' /* extended DES encryption format */
+#define _PASSWORD_NONDES '$' /* non-DES encryption formats */
+
+#define _PASSWORD_LEN 128 /* max length, not counting NUL */
+
+#define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */
+#define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */
+#define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */
+#define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */
+
+#define _PASSWORD_OLDFMT 0x10 /* flag to expect an old style entry */
+#define _PASSWORD_NOWARN 0x20 /* no warnings for bad entries */
+
+#define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */
+#define _PASSWORD_CHGNOW -1 /* special day to force password change at next login */
+
+struct passwd
+{
+ char* pw_name;
+ char* pw_passwd;
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char* pw_dir;
+ char* pw_shell;
+};
+
+__BEGIN_DECLS
+
+struct passwd* getpwnam(const char*);
+struct passwd* getpwuid(uid_t);
+
+void endpwent(void);
+
+#if 0 /* MISSING FROM BIONIC */
+int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
+int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
+struct passwd* getpwent(void);
+int setpwent(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/resolv.h b/6/platforms/android-3/arch-arm/usr/include/resolv.h
new file mode 100644
index 0000000..4247d68
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/resolv.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _RESOLV_H_
+#define _RESOLV_H_
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/cdefs.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <arpa/nameser.h>
+
+__BEGIN_DECLS
+
+struct res_state;
+
+extern struct __res_state *__res_state(void);
+#define _res (*__res_state())
+
+/* Base-64 functions - because some code expects it there */
+
+#define b64_ntop __b64_ntop
+#define b64_pton __b64_pton
+extern int b64_ntop(u_char const *, size_t, char *, size_t);
+extern int b64_pton(char const *, u_char *, size_t);
+
+__END_DECLS
+
+#endif /* _RESOLV_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sched.h b/6/platforms/android-3/arch-arm/usr/include/sched.h
new file mode 100644
index 0000000..2be511b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sched.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/semaphore.h b/6/platforms/android-3/arch-arm/usr/include/semaphore.h
new file mode 100644
index 0000000..30e3123
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/semaphore.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SEMAPHORE_H
+#define _SEMAPHORE_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct {
+ volatile unsigned int count;
+} sem_t;
+
+#define SEM_FAILED NULL
+
+extern int sem_init(sem_t *sem, int pshared, unsigned int value);
+
+extern int sem_close(sem_t *);
+extern int sem_destroy(sem_t *);
+extern int sem_getvalue(sem_t *, int *);
+extern int sem_init(sem_t *, int, unsigned int);
+extern sem_t *sem_open(const char *, int, ...);
+extern int sem_post(sem_t *);
+extern int sem_trywait(sem_t *);
+extern int sem_unlink(const char *);
+extern int sem_wait(sem_t *);
+
+struct timespec;
+extern int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+
+__END_DECLS
+
+#endif /* _SEMAPHORE_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/setjmp.h b/6/platforms/android-3/arch-arm/usr/include/setjmp.h
new file mode 100644
index 0000000..68fdcef
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/setjmp.h
@@ -0,0 +1,63 @@
+/* $OpenBSD: setjmp.h,v 1.5 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: setjmp.h,v 1.11 1994/12/20 10:35:44 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)setjmp.h 8.2 (Berkeley) 1/21/94
+ */
+
+#ifndef _SETJMP_H_
+#define _SETJMP_H_
+
+#include <sys/cdefs.h>
+#include <machine/setjmp.h>
+
+typedef long sigjmp_buf[_JBLEN + 1];
+typedef long jmp_buf[_JBLEN];
+
+__BEGIN_DECLS
+
+int _setjmp(jmp_buf);
+void _longjmp(jmp_buf, int);
+void longjmperror(void);
+
+int setjmp(jmp_buf);
+void longjmp(jmp_buf, int);
+
+int sigsetjmp(sigjmp_buf, int);
+void siglongjmp(sigjmp_buf, int);
+
+__END_DECLS
+
+#endif /* !_SETJMP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sgtty.h b/6/platforms/android-3/arch-arm/usr/include/sgtty.h
new file mode 100644
index 0000000..d433266
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sgtty.h
@@ -0,0 +1,50 @@
+/* $NetBSD: sgtty.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */
+
+/*
+ * Copyright (c) 1985, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)sgtty.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _SGTTY_H_
+#define _SGTTY_H_
+
+#ifndef USE_OLD_TTY
+#define USE_OLD_TTY
+#endif
+#include <sys/ioctl.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+int gtty(int, struct sgttyb *);
+int stty(int, struct sgttyb *);
+#endif /* MISSING */
+__END_DECLS
+
+#endif /* _SGTTY_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sha1.h b/6/platforms/android-3/arch-arm/usr/include/sha1.h
new file mode 100644
index 0000000..f7ada46
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sha1.h
@@ -0,0 +1,31 @@
+/* $NetBSD: sha1.h,v 1.13 2005/12/26 18:41:36 perry Exp $ */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ */
+
+#ifndef _SYS_SHA1_H_
+#define _SYS_SHA1_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define SHA1_DIGEST_LENGTH 20
+#define SHA1_DIGEST_STRING_LENGTH 41
+
+typedef struct {
+ uint32_t state[5];
+ uint32_t count[2];
+ u_char buffer[64];
+} SHA1_CTX;
+
+__BEGIN_DECLS
+void SHA1Transform(uint32_t[5], const u_char[64]);
+void SHA1Init(SHA1_CTX *);
+void SHA1Update(SHA1_CTX *, const u_char *, u_int);
+void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
+__END_DECLS
+
+#endif /* _SYS_SHA1_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/signal.h b/6/platforms/android-3/arch-arm/usr/include/signal.h
new file mode 100644
index 0000000..5540847
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/signal.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
+
+#include <sys/cdefs.h>
+#include <limits.h> /* For LONG_BIT */
+#include <string.h> /* For memset() */
+#include <sys/types.h>
+#include <asm/signal.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+typedef int sig_atomic_t;
+
+/* crepy NIG / _NSIG handling, just to be safe */
+#ifndef NSIG
+# define NSIG _NSIG
+#endif
+#ifndef _NSIG
+# define _NSIG NSIG
+#endif
+
+extern const char * const sys_siglist[];
+
+static __inline__ int sigismember(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ return (int)((local_set[signum/LONG_BIT] >> (signum%LONG_BIT)) & 1);
+}
+
+
+static __inline__ int sigaddset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] |= 1UL << (signum%LONG_BIT);
+ return 0;
+}
+
+
+static __inline__ int sigdelset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] &= ~(1UL << (signum%LONG_BIT));
+ return 0;
+}
+
+
+static __inline__ int sigemptyset(sigset_t *set)
+{
+ memset(set, 0, sizeof *set);
+ return 0;
+}
+
+static __inline__ int sigfillset(sigset_t *set)
+{
+ memset(set, ~0, sizeof *set);
+ return 0;
+}
+
+
+/* compatibility types */
+typedef void (*sig_t)(int);
+typedef sig_t sighandler_t;
+
+/* differentiater between sysv and bsd behaviour 8*/
+extern __sighandler_t sysv_signal(int, __sighandler_t);
+extern __sighandler_t bsd_signal(int, __sighandler_t);
+
+/* the default is bsd */
+static __inline__ __sighandler_t signal(int s, __sighandler_t f)
+{
+ return bsd_signal(s,f);
+}
+
+/* the syscall itself */
+extern __sighandler_t __signal(int, __sighandler_t, int);
+
+extern int sigprocmask(int, const sigset_t *, sigset_t *);
+extern int sigaction(int, const struct sigaction *, struct sigaction *);
+
+extern int sigpending(sigset_t *);
+extern int sigsuspend(const sigset_t *);
+extern int sigwait(const sigset_t *set, int *sig);
+extern int siginterrupt(int sig, int flag);
+
+extern int raise(int);
+extern int kill(pid_t, int);
+
+
+__END_DECLS
+
+#endif /* _SIGNAL_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/stdint.h b/6/platforms/android-3/arch-arm/usr/include/stdint.h
new file mode 100644
index 0000000..e791475
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/stdint.h
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDINT_H
+#define _STDINT_H
+
+#include <stddef.h>
+#include <sys/_types.h>
+
+
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# define __STDINT_LIMITS
+#endif
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
+# define __STDINT_MACROS
+#endif
+
+#if !defined __STRICT_ANSI__ || __STDC_VERSION__ >= 199901L
+# define __STDC_INT64__
+#endif
+
+typedef __int8_t int8_t;
+typedef __uint8_t uint8_t;
+typedef __int16_t int16_t;
+typedef __uint16_t uint16_t;
+typedef __int32_t int32_t;
+typedef __uint32_t uint32_t;
+#if defined(__STDC_INT64__)
+typedef __int64_t int64_t;
+typedef __uint64_t uint64_t;
+#endif
+
+/*
+ * int8_t & uint8_t
+ */
+
+typedef int8_t int_least8_t;
+typedef int8_t int_fast8_t;
+
+typedef uint8_t uint_least8_t;
+typedef uint8_t uint_fast8_t;
+
+#ifdef __STDINT_LIMITS
+# define INT8_MIN (-128)
+# define INT8_MAX (127)
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST8_MAX INT8_MAX
+# define INT_FAST8_MIN INT8_MIN
+# define INT_FAST8_MAX INT8_MAX
+
+# define UINT8_MAX (255U)
+# define UINT_LEAST8_MAX UINT8_MAX
+# define UINT_FAST8_MAX UINT8_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT8_C(c) c
+# define INT_LEAST8_C(c) INT8_C(c)
+# define INT_FAST8_C(c) INT8_C(c)
+
+# define UINT8_C(c) c ## U
+# define UINT_LEAST8_C(c) UINT8_C(c)
+# define UINT_FAST8_C(c) UINT8_C(c)
+#endif
+
+/*
+ * int16_t & uint16_t
+ */
+
+
+typedef int16_t int_least16_t;
+typedef int32_t int_fast16_t;
+
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_fast16_t;
+
+#ifdef __STDINT_LIMITS
+# define INT16_MIN (-32768)
+# define INT16_MAX (32767)
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST16_MAX INT16_MAX
+# define INT_FAST16_MIN INT32_MIN
+# define INT_FAST16_MAX INT32_MAX
+
+# define UINT16_MAX (65535U)
+# define UINT_LEAST16_MAX UINT16_MAX
+# define UINT_FAST16_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT16_C(c) c
+# define INT_LEAST16_C(c) INT16_C(c)
+# define INT_FAST16_C(c) INT32_C(c)
+
+# define UINT16_C(c) c ## U
+# define UINT_LEAST16_C(c) UINT16_C(c)
+# define UINT_FAST16_C(c) UINT32_C(c)
+#endif
+
+/*
+ * int32_t & uint32_t
+ */
+
+typedef int32_t int_least32_t;
+typedef int32_t int_fast32_t;
+
+typedef uint32_t uint_least32_t;
+typedef uint32_t uint_fast32_t;
+
+#ifdef __STDINT_LIMITS
+# define INT32_MIN (-2147483647-1)
+# define INT32_MAX (2147483647)
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST32_MAX INT32_MAX
+# define INT_FAST32_MIN INT32_MIN
+# define INT_FAST32_MAX INT32_MAX
+
+# define UINT32_MAX (4294967295U)
+# define UINT_LEAST32_MAX UINT32_MAX
+# define UINT_FAST32_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT32_C(c) c
+# define INT_LEAST32_C(c) INT32_C(c)
+# define INT_FAST32_C(c) INT32_C(c)
+
+# define UINT32_C(c) c ## U
+# define UINT_LEAST32_C(c) UINT32_C(c)
+# define UINT_FAST32_C(c) UINT32_C(c)
+#endif
+
+#if defined(__STDC_INT64__)
+/*
+ * int64_t
+ */
+typedef int64_t int_least64_t;
+typedef int64_t int_fast64_t;
+
+typedef uint64_t uint_least64_t;
+typedef uint64_t uint_fast64_t;
+
+
+#ifdef __STDINT_LIMITS
+# define INT64_MIN (__INT64_C(-9223372036854775807)-1)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+# define UINT_LEAST64_MAX UINT64_MAX
+# define UINT_FAST64_MAX UINT64_MAX
+#endif
+
+#define __INT64_C(c) c ## LL
+#define __UINT64_C(c) c ## ULL
+
+#ifdef __STDINT_MACROS
+# define INT64_C(c) __INT64_C(c)
+# define INT_LEAST64_C(c) INT64_C(c)
+# define INT_FAST64_C(c) INT64_C(c)
+
+# define UINT64_C(c) __UINT64_C(c)
+# define UINT_LEAST64_C(c) UINT64_C(c)
+# define UINT_FAST64_C(c) UINT64_C(c)
+#endif
+
+
+# define __PRI64_RANK "ll"
+# define __PRIFAST_RANK ""
+# define __PRIPTR_RANK ""
+
+#endif /* __STDC_INT64__ */
+
+/*
+ * intptr_t & uintptr_t
+ */
+
+typedef int intptr_t;
+typedef unsigned int uintptr_t;
+
+#ifdef __STDINT_LIMITS
+# define INTPTR_MIN INT32_MIN
+# define INTPTR_MAX INT32_MAX
+# define UINTPTR_MAX UINT32_MAX
+# define PTRDIFF_MIN INT32_MIN
+# define PTRDIFF_MAX INT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTPTR_C(c) INT32_C(c)
+# define UINTPTR_C(c) UINT32_C(c)
+# define PTRDIFF_C(c) INT32_C(c)
+#endif
+
+
+
+/*
+ * intmax_t & uintmax_t
+ */
+
+#if defined(__STDC_INT64__)
+
+typedef uint64_t uintmax_t;
+typedef int64_t intmax_t;
+
+#ifdef __STDINT_LIMITS
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTMAX_C(c) INT64_C(c)
+# define UINTMAX_C(c) UINT64_C(c)
+#endif
+
+#else /* !__STDC_INT64__ */
+
+typedef uint32_t uintmax_t;
+typedef int32_t intmax_t;
+
+#ifdef __STDINT_LIMITS
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# define UINTMAX_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTMAX_C(c) INT32_C(c)
+# define UINTMAX_C(c) UINT32_C(c)
+#endif
+
+#endif /* !__STDC_INT64__ */
+
+
+/* size_t is defined by the GCC-specific <stddef.h> */
+#ifndef _SSIZE_T_DEFINED_
+#define _SSIZE_T_DEFINED_
+typedef long int ssize_t;
+#endif
+
+#define _BITSIZE 32
+
+/* Keep the kernel from trying to define these types... */
+#define __BIT_TYPES_DEFINED__
+
+#endif /* _STDINT_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/stdio.h b/6/platforms/android-3/arch-arm/usr/include/stdio.h
new file mode 100644
index 0000000..273f630
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/stdio.h
@@ -0,0 +1,442 @@
+/* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */
+/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stdio.h 5.17 (Berkeley) 6/3/91
+ */
+
+#ifndef _STDIO_H_
+#define _STDIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/* va_list and size_t must be defined by stdio.h according to Posix */
+#define __need___va_list
+#include <stdarg.h>
+
+/* note that this forces stddef.h to *only* define size_t */
+#define __need_size_t
+#include <stddef.h>
+
+#include <stddef.h>
+
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#include <sys/types.h> /* XXX should be removed */
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned long size_t;
+#endif
+
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef long off_t;
+#endif
+
+#ifndef NULL
+#ifdef __GNUG__
+#define NULL __null
+#else
+#define NULL 0L
+#endif
+#endif
+
+#define _FSTDIO /* Define for new stdio with functions. */
+
+typedef off_t fpos_t; /* stdio file position type */
+
+/*
+ * NB: to fit things in six character monocase externals, the stdio
+ * code uses the prefix `__s' for stdio objects, typically followed
+ * by a three-character attempt at a mnemonic.
+ */
+
+/* stdio buffers */
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+
+/*
+ * stdio state variables.
+ *
+ * The following always hold:
+ *
+ * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
+ * _lbfsize is -_bf._size, else _lbfsize is 0
+ * if _flags&__SRD, _w is 0
+ * if _flags&__SWR, _r is 0
+ *
+ * This ensures that the getc and putc macros (or inline functions) never
+ * try to write or read from a file that is in `read' or `write' mode.
+ * (Moreover, they can, and do, automatically switch from read mode to
+ * write mode, and back, on "r+" and "w+" files.)
+ *
+ * _lbfsize is used only to make the inline line-buffered output stream
+ * code as compact as possible.
+ *
+ * _ub, _up, and _ur are used when ungetc() pushes back more characters
+ * than fit in the current _bf, or when ungetc() pushes back a character
+ * that does not match the previous one in _bf. When this happens,
+ * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
+ * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * NOTE: if you change this structure, you also need to update the
+ * std() initializer in findfp.c.
+ */
+typedef struct __sFILE {
+ unsigned char *_p; /* current position in (some) buffer */
+ int _r; /* read space left for getc() */
+ int _w; /* write space left for putc() */
+ short _flags; /* flags, below; this FILE is free if 0 */
+ short _file; /* fileno, if Unix descriptor, else -1 */
+ struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
+ int _lbfsize; /* 0 or -_bf._size, for inline putc */
+
+ /* operations */
+ void *_cookie; /* cookie passed to io functions */
+ int (*_close)(void *);
+ int (*_read)(void *, char *, int);
+ fpos_t (*_seek)(void *, fpos_t, int);
+ int (*_write)(void *, const char *, int);
+
+ /* extension data, to avoid further ABI breakage */
+ struct __sbuf _ext;
+ /* data for long sequences of ungetc() */
+ unsigned char *_up; /* saved _p when _p is doing ungetc data */
+ int _ur; /* saved _r when _r is counting ungetc data */
+
+ /* tricks to meet minimum requirements even when malloc() fails */
+ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
+ unsigned char _nbuf[1]; /* guarantee a getc() buffer */
+
+ /* separate buffer for fgetln() when line crosses buffer boundary */
+ struct __sbuf _lb; /* buffer for fgetln() */
+
+ /* Unix stdio files get aligned to block boundaries on fseek() */
+ int _blksize; /* stat.st_blksize (may be != _bf._size) */
+ fpos_t _offset; /* current lseek offset */
+} FILE;
+
+__BEGIN_DECLS
+extern FILE __sF[];
+__END_DECLS
+
+#define __SLBF 0x0001 /* line buffered */
+#define __SNBF 0x0002 /* unbuffered */
+#define __SRD 0x0004 /* OK to read */
+#define __SWR 0x0008 /* OK to write */
+ /* RD and WR are never simultaneously asserted */
+#define __SRW 0x0010 /* open for reading & writing */
+#define __SEOF 0x0020 /* found EOF */
+#define __SERR 0x0040 /* found error */
+#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SAPP 0x0100 /* fdopen()ed in append mode */
+#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
+#define __SOPT 0x0400 /* do fseek() optimisation */
+#define __SNPT 0x0800 /* do not do fseek() optimisation */
+#define __SOFF 0x1000 /* set iff _offset is in fact correct */
+#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define _IOFBF 0 /* setvbuf should set fully buffered */
+#define _IOLBF 1 /* setvbuf should set line buffered */
+#define _IONBF 2 /* setvbuf should set unbuffered */
+
+#define BUFSIZ 1024 /* size of buffer used by setbuf */
+
+#define EOF (-1)
+
+/*
+ * FOPEN_MAX is a minimum maximum, and should be the number of descriptors
+ * that the kernel can provide without allocation of a resource that can
+ * fail without the process sleeping. Do not use this for anything.
+ */
+#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
+#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#if __BSD_VISIBLE || __XPG_VISIBLE
+#define P_tmpdir "/tmp/"
+#endif
+#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
+#define TMP_MAX 308915776
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1 /* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2 /* set file offset to EOF plus offset */
+#endif
+
+#define stdin (&__sF[0])
+#define stdout (&__sF[1])
+#define stderr (&__sF[2])
+
+/*
+ * Functions defined in ANSI C standard.
+ */
+__BEGIN_DECLS
+void clearerr(FILE *);
+int fclose(FILE *);
+int feof(FILE *);
+int ferror(FILE *);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fgetpos(FILE *, fpos_t *);
+char *fgets(char *, int, FILE *);
+FILE *fopen(const char *, const char *);
+int fprintf(FILE *, const char *, ...);
+int fputc(int, FILE *);
+int fputs(const char *, FILE *);
+size_t fread(void *, size_t, size_t, FILE *);
+FILE *freopen(const char *, const char *, FILE *);
+int fscanf(FILE *, const char *, ...);
+int fseek(FILE *, long, int);
+int fseeko(FILE *, off_t, int);
+int fsetpos(FILE *, const fpos_t *);
+long ftell(FILE *);
+off_t ftello(FILE *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+int getc(FILE *);
+int getchar(void);
+char *gets(char *);
+#if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
+#define __SYS_ERRLIST
+
+extern int sys_nerr; /* perror(3) external variables */
+extern char *sys_errlist[];
+#endif
+void perror(const char *);
+int printf(const char *, ...);
+int putc(int, FILE *);
+int putchar(int);
+int puts(const char *);
+int remove(const char *);
+int rename(const char *, const char *);
+void rewind(FILE *);
+int scanf(const char *, ...);
+void setbuf(FILE *, char *);
+int setvbuf(FILE *, char *, int, size_t);
+int sprintf(char *, const char *, ...);
+int sscanf(const char *, const char *, ...);
+FILE *tmpfile(void);
+char *tmpnam(char *);
+int ungetc(int, FILE *);
+int vfprintf(FILE *, const char *, __va_list);
+int vprintf(const char *, __va_list);
+int vsprintf(char *, const char *, __va_list);
+
+#if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
+int snprintf(char *, size_t, const char *, ...)
+ __attribute__((__format__ (printf, 3, 4)))
+ __attribute__((__nonnull__ (3)));
+int vfscanf(FILE *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+int vscanf(const char *, __va_list)
+ __attribute__((__format__ (scanf, 1, 0)))
+ __attribute__((__nonnull__ (1)));
+int vsnprintf(char *, size_t, const char *, __va_list)
+ __attribute__((__format__ (printf, 3, 0)))
+ __attribute__((__nonnull__ (3)));
+int vsscanf(const char *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+#endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
+
+__END_DECLS
+
+
+/*
+ * Functions defined in POSIX 1003.1.
+ */
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
+#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+char *ctermid(char *);
+char *cuserid(char *);
+#endif /* MISSING */
+FILE *fdopen(int, const char *);
+int fileno(FILE *);
+
+#if (__POSIX_VISIBLE >= 199209)
+int pclose(FILE *);
+FILE *popen(const char *, const char *);
+#endif
+
+#if __POSIX_VISIBLE >= 199506
+void flockfile(FILE *);
+int ftrylockfile(FILE *);
+void funlockfile(FILE *);
+
+/*
+ * These are normally used through macros as defined below, but POSIX
+ * requires functions as well.
+ */
+int getc_unlocked(FILE *);
+int getchar_unlocked(void);
+int putc_unlocked(int, FILE *);
+int putchar_unlocked(int);
+#endif /* __POSIX_VISIBLE >= 199506 */
+
+#if __XPG_VISIBLE
+char *tempnam(const char *, const char *);
+#endif
+__END_DECLS
+
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
+
+/*
+ * Routines that are purely local.
+ */
+#if __BSD_VISIBLE
+__BEGIN_DECLS
+int asprintf(char **, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)))
+ __attribute__((__nonnull__ (2)));
+char *fgetln(FILE *, size_t *);
+int fpurge(FILE *);
+int getw(FILE *);
+int putw(int, FILE *);
+void setbuffer(FILE *, char *, int);
+int setlinebuf(FILE *);
+int vasprintf(char **, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+__END_DECLS
+
+/*
+ * Stdio function-access interface.
+ */
+__BEGIN_DECLS
+FILE *funopen(const void *,
+ int (*)(void *, char *, int),
+ int (*)(void *, const char *, int),
+ fpos_t (*)(void *, fpos_t, int),
+ int (*)(void *));
+__END_DECLS
+#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Functions internal to the implementation.
+ */
+__BEGIN_DECLS
+int __srget(FILE *);
+int __swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__)
+static __inline int __sputc(int _c, FILE *_p) {
+ if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+ return (*_p->_p++ = _c);
+ else
+ return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define __sputc(c, p) \
+ (--(p)->_w < 0 ? \
+ (p)->_w >= (p)->_lbfsize ? \
+ (*(p)->_p = (c)), *(p)->_p != '\n' ? \
+ (int)*(p)->_p++ : \
+ __swbuf('\n', p) : \
+ __swbuf((int)(c), p) : \
+ (*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define __sfileno(p) ((p)->_file)
+
+#define feof(p) __sfeof(p)
+#define ferror(p) __sferror(p)
+
+#ifndef _POSIX_THREADS
+#define clearerr(p) __sclearerr(p)
+#endif
+
+#if __POSIX_VISIBLE
+#define fileno(p) __sfileno(p)
+#endif
+
+#ifndef lint
+#ifndef _POSIX_THREADS
+#define getc(fp) __sgetc(fp)
+#endif /* _POSIX_THREADS */
+#define getc_unlocked(fp) __sgetc(fp)
+/*
+ * The macro implementations of putc and putc_unlocked are not
+ * fully POSIX compliant; they do not set errno on failure
+ */
+#if __BSD_VISIBLE
+#ifndef _POSIX_THREADS
+#define putc(x, fp) __sputc(x, fp)
+#endif /* _POSIX_THREADS */
+#define putc_unlocked(x, fp) __sputc(x, fp)
+#endif /* __BSD_VISIBLE */
+#endif /* lint */
+
+#define getchar() getc(stdin)
+#define putchar(x) putc(x, stdout)
+#define getchar_unlocked() getc_unlocked(stdin)
+#define putchar_unlocked(c) putc_unlocked(c, stdout)
+
+#endif /* _STDIO_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/stdlib.h b/6/platforms/android-3/arch-arm/usr/include/stdlib.h
new file mode 100644
index 0000000..424adb4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern char* ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd)
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+extern int clearenv(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/string.h b/6/platforms/android-3/arch-arm/usr/include/string.h
new file mode 100644
index 0000000..613dcd7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/string.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STRING_H_
+#define _STRING_H_
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+#include <malloc.h>
+
+__BEGIN_DECLS
+
+extern void* memccpy(void *, const void *, int, size_t);
+extern void* memchr(const void *, int, size_t);
+extern void* memrchr(const void *, int, size_t);
+extern int memcmp(const void *, const void *, size_t);
+extern void* memcpy(void *, const void *, size_t);
+extern void* memmove(void *, const void *, size_t);
+extern void* memset(void *, int, size_t);
+extern void* memmem(const void *, size_t, const void *, size_t);
+extern void memswap(void *, void *, size_t);
+
+extern char* index(const char *, int);
+extern char* rindex(const char *, int);
+extern char* strchr(const char *, int);
+extern char* strrchr(const char *, int);
+
+extern size_t strlen(const char *);
+extern int strcmp(const char *, const char *);
+extern char* strcpy(char *, const char *);
+extern char* strcat(char *, const char *);
+
+extern int strcasecmp(const char *, const char *);
+extern int strncasecmp(const char *, const char *, size_t);
+extern char* strdup(const char *);
+
+extern char* strstr(const char *, const char *);
+extern char* strcasestr(const char *haystack, const char *needle);
+extern char* strtok(char *, const char *);
+extern char* strtok_r(char *, const char *, char**);
+
+extern char* strerror(int);
+extern int strerror_r(int errnum, char *buf, size_t n);
+
+extern size_t strnlen(const char *, size_t);
+extern char* strncat(char *, const char *, size_t);
+extern char* strndup(const char *, size_t);
+extern int strncmp(const char *, const char *, size_t);
+extern char* strncpy(char *, const char *, size_t);
+
+extern size_t strlcat(char *, const char *, size_t);
+extern size_t strlcpy(char *, const char *, size_t);
+
+extern size_t strcspn(const char *, const char *);
+extern char* strpbrk(const char *, const char *);
+extern char* strsep(char **, const char *);
+extern size_t strspn(const char *, const char *);
+
+extern char* strsignal(int sig);
+
+extern int strcoll(const char *, const char *);
+extern size_t strxfrm(char *, const char *, size_t);
+
+__END_DECLS
+
+#endif /* _STRING_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/strings.h b/6/platforms/android-3/arch-arm/usr/include/strings.h
new file mode 100644
index 0000000..7f5b328
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/strings.h
@@ -0,0 +1,58 @@
+/* $NetBSD: strings.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+void bcopy(const void *, void *, size_t);
+void bzero(void *, size_t);
+int ffs(int);
+char *index(const char *, int);
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+#if 0 /* MISSING FROM BIONIC */
+int bcmp(const void *, const void *, size_t);
+char *rindex(const char *, int);
+#endif /* MISSING */
+__END_DECLS
+
+#endif /* !defined(_STRINGS_H_) */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/_errdefs.h b/6/platforms/android-3/arch-arm/usr/include/sys/_errdefs.h
new file mode 100644
index 0000000..e27ab7a
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/_errdefs.h
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* the following corresponds to the error codes of the Linux kernel used by the Android platform
+ * these are distinct from the OpenBSD ones, which is why we need to redeclare them here
+ *
+ * this file may be included several times to define either error constants or their
+ * string representation
+ */
+
+#ifndef __BIONIC_ERRDEF
+#error "__BIONIC_ERRDEF must be defined before including this file"
+#endif
+__BIONIC_ERRDEF( EPERM , 1, "Operation not permitted" )
+__BIONIC_ERRDEF( ENOENT , 2, "No such file or directory" )
+__BIONIC_ERRDEF( ESRCH , 3, "No such process" )
+__BIONIC_ERRDEF( EINTR , 4, "Interrupted system call" )
+__BIONIC_ERRDEF( EIO , 5, "I/O error" )
+__BIONIC_ERRDEF( ENXIO , 6, "No such device or address" )
+__BIONIC_ERRDEF( E2BIG , 7, "Argument list too long" )
+__BIONIC_ERRDEF( ENOEXEC , 8, "Exec format error" )
+__BIONIC_ERRDEF( EBADF , 9, "Bad file number" )
+__BIONIC_ERRDEF( ECHILD , 10, "No child processes" )
+__BIONIC_ERRDEF( EAGAIN , 11, "Try again" )
+__BIONIC_ERRDEF( ENOMEM , 12, "Out of memory" )
+__BIONIC_ERRDEF( EACCES , 13, "Permission denied" )
+__BIONIC_ERRDEF( EFAULT , 14, "Bad address" )
+__BIONIC_ERRDEF( ENOTBLK , 15, "Block device required" )
+__BIONIC_ERRDEF( EBUSY , 16, "Device or resource busy" )
+__BIONIC_ERRDEF( EEXIST , 17, "File exists" )
+__BIONIC_ERRDEF( EXDEV , 18, "Cross-device link" )
+__BIONIC_ERRDEF( ENODEV , 19, "No such device" )
+__BIONIC_ERRDEF( ENOTDIR , 20, "Not a directory" )
+__BIONIC_ERRDEF( EISDIR , 21, "Is a directory" )
+__BIONIC_ERRDEF( EINVAL , 22, "Invalid argument" )
+__BIONIC_ERRDEF( ENFILE , 23, "File table overflow" )
+__BIONIC_ERRDEF( EMFILE , 24, "Too many open files" )
+__BIONIC_ERRDEF( ENOTTY , 25, "Not a typewriter" )
+__BIONIC_ERRDEF( ETXTBSY , 26, "Text file busy" )
+__BIONIC_ERRDEF( EFBIG , 27, "File too large" )
+__BIONIC_ERRDEF( ENOSPC , 28, "No space left on device" )
+__BIONIC_ERRDEF( ESPIPE , 29, "Illegal seek" )
+__BIONIC_ERRDEF( EROFS , 30, "Read-only file system" )
+__BIONIC_ERRDEF( EMLINK , 31, "Too many links" )
+__BIONIC_ERRDEF( EPIPE , 32, "Broken pipe" )
+__BIONIC_ERRDEF( EDOM , 33, "Math argument out of domain of func" )
+__BIONIC_ERRDEF( ERANGE , 34, "Math result not representable" )
+__BIONIC_ERRDEF( EDEADLK , 35, "Resource deadlock would occur" )
+__BIONIC_ERRDEF( ENAMETOOLONG , 36, "File name too long" )
+__BIONIC_ERRDEF( ENOLCK , 37, "No record locks available" )
+__BIONIC_ERRDEF( ENOSYS , 38, "Function not implemented" )
+__BIONIC_ERRDEF( ENOTEMPTY , 39, "Directory not empty" )
+__BIONIC_ERRDEF( ELOOP , 40, "Too many symbolic links encountered" )
+__BIONIC_ERRDEF( ENOMSG , 42, "No message of desired type" )
+__BIONIC_ERRDEF( EIDRM , 43, "Identifier removed" )
+__BIONIC_ERRDEF( ECHRNG , 44, "Channel number out of range" )
+__BIONIC_ERRDEF( EL2NSYNC , 45, "Level 2 not synchronized" )
+__BIONIC_ERRDEF( EL3HLT , 46, "Level 3 halted" )
+__BIONIC_ERRDEF( EL3RST , 47, "Level 3 reset" )
+__BIONIC_ERRDEF( ELNRNG , 48, "Link number out of range" )
+__BIONIC_ERRDEF( EUNATCH , 49, "Protocol driver not attached" )
+__BIONIC_ERRDEF( ENOCSI , 50, "No CSI structure available" )
+__BIONIC_ERRDEF( EL2HLT , 51, "Level 2 halted" )
+__BIONIC_ERRDEF( EBADE , 52, "Invalid exchange" )
+__BIONIC_ERRDEF( EBADR , 53, "Invalid request descriptor" )
+__BIONIC_ERRDEF( EXFULL , 54, "Exchange full" )
+__BIONIC_ERRDEF( ENOANO , 55, "No anode" )
+__BIONIC_ERRDEF( EBADRQC , 56, "Invalid request code" )
+__BIONIC_ERRDEF( EBADSLT , 57, "Invalid slot" )
+__BIONIC_ERRDEF( EBFONT , 59, "Bad font file format" )
+__BIONIC_ERRDEF( ENOSTR , 60, "Device not a stream" )
+__BIONIC_ERRDEF( ENODATA , 61, "No data available" )
+__BIONIC_ERRDEF( ETIME , 62, "Timer expired" )
+__BIONIC_ERRDEF( ENOSR , 63, "Out of streams resources" )
+__BIONIC_ERRDEF( ENONET , 64, "Machine is not on the network" )
+__BIONIC_ERRDEF( ENOPKG , 65, "Package not installed" )
+__BIONIC_ERRDEF( EREMOTE , 66, "Object is remote" )
+__BIONIC_ERRDEF( ENOLINK , 67, "Link has been severed" )
+__BIONIC_ERRDEF( EADV , 68, "Advertise error" )
+__BIONIC_ERRDEF( ESRMNT , 69, "Srmount error" )
+__BIONIC_ERRDEF( ECOMM , 70, "Communication error on send" )
+__BIONIC_ERRDEF( EPROTO , 71, "Protocol error" )
+__BIONIC_ERRDEF( EMULTIHOP , 72, "Multihop attempted" )
+__BIONIC_ERRDEF( EDOTDOT , 73, "RFS specific error" )
+__BIONIC_ERRDEF( EBADMSG , 74, "Not a data message" )
+__BIONIC_ERRDEF( EOVERFLOW , 75, "Value too large for defined data type" )
+__BIONIC_ERRDEF( ENOTUNIQ , 76, "Name not unique on network" )
+__BIONIC_ERRDEF( EBADFD , 77, "File descriptor in bad state" )
+__BIONIC_ERRDEF( EREMCHG , 78, "Remote address changed" )
+__BIONIC_ERRDEF( ELIBACC , 79, "Can not access a needed shared library" )
+__BIONIC_ERRDEF( ELIBBAD , 80, "Accessing a corrupted shared library" )
+__BIONIC_ERRDEF( ELIBSCN , 81, ".lib section in a.out corrupted" )
+__BIONIC_ERRDEF( ELIBMAX , 82, "Attempting to link in too many shared libraries" )
+__BIONIC_ERRDEF( ELIBEXEC , 83, "Cannot exec a shared library directly" )
+__BIONIC_ERRDEF( EILSEQ , 84, "Illegal byte sequence" )
+__BIONIC_ERRDEF( ERESTART , 85, "Interrupted system call should be restarted" )
+__BIONIC_ERRDEF( ESTRPIPE , 86, "Streams pipe error" )
+__BIONIC_ERRDEF( EUSERS , 87, "Too many users" )
+__BIONIC_ERRDEF( ENOTSOCK , 88, "Socket operation on non-socket" )
+__BIONIC_ERRDEF( EDESTADDRREQ , 89, "Destination address required" )
+__BIONIC_ERRDEF( EMSGSIZE , 90, "Message too long" )
+__BIONIC_ERRDEF( EPROTOTYPE , 91, "Protocol wrong type for socket" )
+__BIONIC_ERRDEF( ENOPROTOOPT , 92, "Protocol not available" )
+__BIONIC_ERRDEF( EPROTONOSUPPORT, 93, "Protocol not supported" )
+__BIONIC_ERRDEF( ESOCKTNOSUPPORT, 94, "Socket type not supported" )
+__BIONIC_ERRDEF( EOPNOTSUPP , 95, "Operation not supported on transport endpoint" )
+__BIONIC_ERRDEF( EPFNOSUPPORT , 96, "Protocol family not supported" )
+__BIONIC_ERRDEF( EAFNOSUPPORT , 97, "Address family not supported by protocol" )
+__BIONIC_ERRDEF( EADDRINUSE , 98, "Address already in use" )
+__BIONIC_ERRDEF( EADDRNOTAVAIL , 99, "Cannot assign requested address" )
+__BIONIC_ERRDEF( ENETDOWN , 100, "Network is down" )
+__BIONIC_ERRDEF( ENETUNREACH , 101, "Network is unreachable" )
+__BIONIC_ERRDEF( ENETRESET , 102, "Network dropped connection because of reset" )
+__BIONIC_ERRDEF( ECONNABORTED , 103, "Software caused connection abort" )
+__BIONIC_ERRDEF( ECONNRESET , 104, "Connection reset by peer" )
+__BIONIC_ERRDEF( ENOBUFS , 105, "No buffer space available" )
+__BIONIC_ERRDEF( EISCONN , 106, "Transport endpoint is already connected" )
+__BIONIC_ERRDEF( ENOTCONN , 107, "Transport endpoint is not connected" )
+__BIONIC_ERRDEF( ESHUTDOWN , 108, "Cannot send after transport endpoint shutdown" )
+__BIONIC_ERRDEF( ETOOMANYREFS , 109, "Too many references: cannot splice" )
+__BIONIC_ERRDEF( ETIMEDOUT , 110, "Connection timed out" )
+__BIONIC_ERRDEF( ECONNREFUSED , 111, "Connection refused" )
+__BIONIC_ERRDEF( EHOSTDOWN , 112, "Host is down" )
+__BIONIC_ERRDEF( EHOSTUNREACH , 113, "No route to host" )
+__BIONIC_ERRDEF( EALREADY , 114, "Operation already in progress" )
+__BIONIC_ERRDEF( EINPROGRESS , 115, "Operation now in progress" )
+__BIONIC_ERRDEF( ESTALE , 116, "Stale NFS file handle" )
+__BIONIC_ERRDEF( EUCLEAN , 117, "Structure needs cleaning" )
+__BIONIC_ERRDEF( ENOTNAM , 118, "Not a XENIX named type file" )
+__BIONIC_ERRDEF( ENAVAIL , 119, "No XENIX semaphores available" )
+__BIONIC_ERRDEF( EISNAM , 120, "Is a named type file" )
+__BIONIC_ERRDEF( EREMOTEIO , 121, "Remote I/O error" )
+__BIONIC_ERRDEF( EDQUOT , 122, "Quota exceeded" )
+__BIONIC_ERRDEF( ENOMEDIUM , 123, "No medium found" )
+__BIONIC_ERRDEF( EMEDIUMTYPE , 124, "Wrong medium type" )
+__BIONIC_ERRDEF( ECANCELED , 125, "Operation Canceled" )
+__BIONIC_ERRDEF( ENOKEY , 126, "Required key not available" )
+__BIONIC_ERRDEF( EKEYEXPIRED , 127, "Key has expired" )
+__BIONIC_ERRDEF( EKEYREVOKED , 128, "Key has been revoked" )
+__BIONIC_ERRDEF( EKEYREJECTED , 129, "Key was rejected by service" )
+__BIONIC_ERRDEF( EOWNERDEAD , 130, "Owner died" )
+__BIONIC_ERRDEF( ENOTRECOVERABLE, 131, "State not recoverable" )
+
+/* the following is not defined by Linux but needed for the BSD portions of the C library */
+__BIONIC_ERRDEF( EFTYPE, 1000, "Stupid C library hack !!" )
+
+#undef __BIONIC_ERRDEF
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/_sigdefs.h b/6/platforms/android-3/arch-arm/usr/include/sys/_sigdefs.h
new file mode 100644
index 0000000..a3cb7a3
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/_sigdefs.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/* this header is used to define signal constants and names; it might be included several times */
+#ifndef __BIONIC_SIGDEF
+#error __BIONIC_SIGDEF not defined
+#endif
+
+__BIONIC_SIGDEF(SIGHUP,1,"Hangup")
+__BIONIC_SIGDEF(SIGINT,2,"Interrupt")
+__BIONIC_SIGDEF(SIGQUIT,3,"Quit")
+__BIONIC_SIGDEF(SIGILL,4,"Illegal instruction")
+__BIONIC_SIGDEF(SIGTRAP,5,"Trap")
+__BIONIC_SIGDEF(SIGABRT,6,"Aborted")
+__BIONIC_SIGDEF(SIGBUS,7,"Bus error")
+__BIONIC_SIGDEF(SIGFPE,8,"Floating point exception")
+__BIONIC_SIGDEF(SIGKILL,9,"Killed")
+__BIONIC_SIGDEF(SIGUSR1,10,"User signal 1")
+__BIONIC_SIGDEF(SIGSEGV,11,"Segmentation fault")
+__BIONIC_SIGDEF(SIGUSR2,12,"User signal 2")
+__BIONIC_SIGDEF(SIGPIPE,13,"Broken pipe")
+__BIONIC_SIGDEF(SIGALRM,14,"Alarm clock")
+__BIONIC_SIGDEF(SIGTERM,15,"Terminated")
+__BIONIC_SIGDEF(SIGSTKFLT,16,"Stack fault")
+__BIONIC_SIGDEF(SIGCHLD,17,"Child exited")
+__BIONIC_SIGDEF(SIGCONT,18,"Continue")
+__BIONIC_SIGDEF(SIGSTOP,19,"Stopped (signal)")
+__BIONIC_SIGDEF(SIGTSTP,20,"Stopped")
+__BIONIC_SIGDEF(SIGTTIN,21,"Stopped (tty input)")
+__BIONIC_SIGDEF(SIGTTOU,22,"Stopper (tty output)")
+__BIONIC_SIGDEF(SIGURG,23,"Urgent I/O condition")
+__BIONIC_SIGDEF(SIGXCPU,24,"CPU time limit exceeded")
+__BIONIC_SIGDEF(SIGXFSZ,25,"File size limit exceeded")
+__BIONIC_SIGDEF(SIGVTALRM,26,"Virtual timer expired")
+__BIONIC_SIGDEF(SIGPROF,27,"Profiling timer expired")
+__BIONIC_SIGDEF(SIGWINCH,28,"Window size changed")
+__BIONIC_SIGDEF(SIGIO,29,"I/O possible")
+__BIONIC_SIGDEF(SIGPWR,30,"Power failure")
+__BIONIC_SIGDEF(SIGSYS,31,"Bad system call")
+
+#undef __BIONIC_SIGDEF
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/_system_properties.h b/6/platforms/android-3/arch-arm/usr/include/sys/_system_properties.h
new file mode 100644
index 0000000..42a7f6c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/_system_properties.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+
+#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#error you should #include <sys/system_properties.h> instead
+#else
+#include <sys/system_properties.h>
+
+typedef struct prop_area prop_area;
+typedef struct prop_msg prop_msg;
+
+#define PROP_AREA_MAGIC 0x504f5250
+#define PROP_AREA_VERSION 0x45434f76
+
+#define PROP_SERVICE_NAME "property_service"
+
+/* #define PROP_MAX_ENTRIES 247 */
+/* 247 -> 32620 bytes (<32768) */
+
+#define TOC_NAME_LEN(toc) ((toc) >> 24)
+#define TOC_TO_INFO(area, toc) ((prop_info*) (((char*) area) + ((toc) & 0xFFFFFF)))
+
+struct prop_area {
+ unsigned volatile count;
+ unsigned volatile serial;
+ unsigned magic;
+ unsigned version;
+ unsigned reserved[4];
+ unsigned toc[1];
+};
+
+#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
+#define SERIAL_DIRTY(serial) ((serial) & 1)
+
+struct prop_info {
+ char name[PROP_NAME_MAX];
+ unsigned volatile serial;
+ char value[PROP_VALUE_MAX];
+};
+
+struct prop_msg
+{
+ unsigned cmd;
+ char name[PROP_NAME_MAX];
+ char value[PROP_VALUE_MAX];
+};
+
+#define PROP_MSG_SETPROP 1
+
+/*
+** Rules:
+**
+** - there is only one writer, but many readers
+** - prop_area.count will never decrease in value
+** - once allocated, a prop_info's name will not change
+** - once allocated, a prop_info's offset will not change
+** - reading a value requires the following steps
+** 1. serial = pi->serial
+** 2. if SERIAL_DIRTY(serial), wait*, then goto 1
+** 3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1)
+** 4. if pi->serial != serial, goto 2
+**
+** - writing a value requires the following steps
+** 1. pi->serial = pi->serial | 1
+** 2. memcpy(pi->value, local_value, value_len)
+** 3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff)
+**
+** Improvements:
+** - maintain the toc sorted by pi->name to allow lookup
+** by binary search
+**
+*/
+
+#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
+#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
+#define PROP_PATH_SYSTEM_DEFAULT "/system/default.prop"
+#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/_types.h b/6/platforms/android-3/arch-arm/usr/include/sys/_types.h
new file mode 100644
index 0000000..7b99e06
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/_types.h
@@ -0,0 +1,77 @@
+/* $OpenBSD: _types.h,v 1.1 2006/01/06 18:53:05 millert Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)types.h 8.3 (Berkeley) 1/5/94
+ */
+
+#ifndef _SYS__TYPES_H_
+#define _SYS__TYPES_H_
+
+#undef __KERNEL_STRICT_NAMES
+#define __KERNEL_STRICT_NAMES 1
+
+#include <machine/_types.h>
+
+typedef unsigned long __cpuid_t; /* CPU id */
+typedef __int32_t __dev_t; /* device number */
+typedef __uint32_t __fixpt_t; /* fixed point number */
+typedef __uint32_t __gid_t; /* group id */
+typedef __uint32_t __id_t; /* may contain pid, uid or gid */
+typedef __uint32_t __in_addr_t; /* base type for internet address */
+typedef __uint16_t __in_port_t; /* IP port type */
+typedef __uint32_t __ino_t; /* inode number */
+typedef long __key_t; /* IPC key (for Sys V IPC) */
+typedef __uint32_t __mode_t; /* permissions */
+typedef __uint32_t __nlink_t; /* link count */
+typedef __int32_t __pid_t; /* process id */
+typedef __uint64_t __rlim_t; /* resource limit */
+typedef __uint16_t __sa_family_t; /* sockaddr address family type */
+typedef __int32_t __segsz_t; /* segment size */
+typedef __uint32_t __socklen_t; /* length type for network syscalls */
+typedef __int32_t __swblk_t; /* swap offset */
+typedef __uint32_t __uid_t; /* user id */
+typedef __uint32_t __useconds_t; /* microseconds */
+typedef __int32_t __suseconds_t; /* microseconds (signed) */
+
+/*
+ * mbstate_t is an opaque object to keep conversion state, during multibyte
+ * stream conversions. The content must not be referenced by user programs.
+ */
+typedef union {
+ char __mbstate8[128];
+ __int64_t __mbstateL; /* for alignment */
+} __mbstate_t;
+
+/* BIONIC: if we're using non-cleaned up user-level kernel headers,
+ * this will prevent many type declaration conflicts
+ */
+#define __KERNEL_STRICT_NAMES 1
+
+#endif /* !_SYS__TYPES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/atomics.h b/6/platforms/android-3/arch-arm/usr/include/sys/atomics.h
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/atomics.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_ATOMICS_H
+#define _SYS_ATOMICS_H
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+extern int __atomic_cmpxchg(int old, int _new, volatile int *ptr);
+extern int __atomic_swap(int _new, volatile int *ptr);
+extern int __atomic_dec(volatile int *ptr);
+extern int __atomic_inc(volatile int *ptr);
+
+int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout);
+int __futex_wake(volatile void *ftx, int count);
+
+__END_DECLS
+
+#endif /* _SYS_ATOMICS_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/cdefs.h b/6/platforms/android-3/arch-arm/usr/include/sys/cdefs.h
new file mode 100644
index 0000000..2389437
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/cdefs.h
@@ -0,0 +1,507 @@
+/* $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Berkeley Software Design, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
+ */
+
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
+
+/* our implementation of wchar_t is only 8-bit - die die non-portable code */
+#undef __WCHAR_TYPE__
+#define __WCHAR_TYPE__ unsigned char
+
+
+/*
+ * Macro to test if we're using a GNU C compiler of a specific vintage
+ * or later, for e.g. features that appeared in a particular version
+ * of GNU C. Usage:
+ *
+ * #if __GNUC_PREREQ__(major, minor)
+ * ...cool feature...
+ * #else
+ * ...delete feature...
+ * #endif
+ */
+#ifdef __GNUC__
+#define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
+#else
+#define __GNUC_PREREQ__(x, y) 0
+#endif
+
+#include <sys/cdefs_elf.h>
+
+#if defined(__cplusplus)
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS }
+#define __static_cast(x,y) static_cast<x>(y)
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#define __static_cast(x,y) (x)y
+#endif
+
+/*
+ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
+ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
+ * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
+ * in between its arguments. __CONCAT can also concatenate double-quoted
+ * strings produced by the __STRING macro, but this only works with ANSI C.
+ */
+
+#define ___STRING(x) __STRING(x)
+#define ___CONCAT(x,y) __CONCAT(x,y)
+
+#if __STDC__ || defined(__cplusplus)
+#define __P(protos) protos /* full-blown ANSI C */
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#define __const const /* define reserved names to standard */
+#define __signed signed
+#define __volatile volatile
+#if defined(__cplusplus)
+#define __inline inline /* convert to C++ keyword */
+#else
+#if !defined(__GNUC__) && !defined(__lint__)
+#define __inline /* delete GCC keyword */
+#endif /* !__GNUC__ && !__lint__ */
+#endif /* !__cplusplus */
+
+#else /* !(__STDC__ || __cplusplus) */
+#define __P(protos) () /* traditional C preprocessor */
+#define __CONCAT(x,y) x/**/y
+#define __STRING(x) "x"
+
+#ifndef __GNUC__
+#define __const /* delete pseudo-ANSI C keywords */
+#define __inline
+#define __signed
+#define __volatile
+#endif /* !__GNUC__ */
+
+/*
+ * In non-ANSI C environments, new programs will want ANSI-only C keywords
+ * deleted from the program and old programs will want them left alone.
+ * Programs using the ANSI C keywords const, inline etc. as normal
+ * identifiers should define -DNO_ANSI_KEYWORDS.
+ */
+#ifndef NO_ANSI_KEYWORDS
+#define const __const /* convert ANSI C keywords */
+#define inline __inline
+#define signed __signed
+#define volatile __volatile
+#endif /* !NO_ANSI_KEYWORDS */
+#endif /* !(__STDC__ || __cplusplus) */
+
+/*
+ * Used for internal auditing of the NetBSD source tree.
+ */
+#ifdef __AUDIT__
+#define __aconst __const
+#else
+#define __aconst
+#endif
+
+/*
+ * The following macro is used to remove const cast-away warnings
+ * from gcc -Wcast-qual; it should be used with caution because it
+ * can hide valid errors; in particular most valid uses are in
+ * situations where the API requires it, not to cast away string
+ * constants. We don't use *intptr_t on purpose here and we are
+ * explicit about unsigned long so that we don't have additional
+ * dependencies.
+ */
+#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+
+/*
+ * GCC2 provides __extension__ to suppress warnings for various GNU C
+ * language extensions under "-ansi -pedantic".
+ */
+#if !__GNUC_PREREQ__(2, 0)
+#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
+#endif
+
+/*
+ * GCC1 and some versions of GCC2 declare dead (non-returning) and
+ * pure (no side effects) functions using "volatile" and "const";
+ * unfortunately, these then cause warnings under "-ansi -pedantic".
+ * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
+ * these work for GNU C++ (modulo a slight glitch in the C++ grammar
+ * in the distribution version of 2.5.5).
+ */
+#if !__GNUC_PREREQ__(2, 5)
+#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __dead __volatile
+#define __pure __const
+#endif
+#endif
+
+/* Delete pseudo-keywords wherever they are not available or needed. */
+#ifndef __dead
+#define __dead
+#define __pure
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __unused __attribute__((__unused__))
+#else
+#define __unused /* delete */
+#endif
+
+#if __GNUC_PREREQ__(3, 1)
+#define __used __attribute__((__used__))
+#else
+#define __used /* delete */
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __packed __attribute__((__packed__))
+#define __aligned(x) __attribute__((__aligned__(x)))
+#define __section(x) __attribute__((__section__(x)))
+#elif defined(__lint__)
+#define __packed /* delete */
+#define __aligned(x) /* delete */
+#define __section(x) /* delete */
+#else
+#define __packed error: no __packed for this compiler
+#define __aligned(x) error: no __aligned for this compiler
+#define __section(x) error: no __section for this compiler
+#endif
+
+#if !__GNUC_PREREQ__(2, 8)
+#define __extension__
+#endif
+
+#if __GNUC_PREREQ__(2, 8)
+#define __statement(x) __extension__(x)
+#elif defined(lint)
+#define __statement(x) (0)
+#else
+#define __statement(x) (x)
+#endif
+
+/*
+ * C99 defines the restrict type qualifier keyword, which was made available
+ * in GCC 2.92.
+ */
+#if __STDC_VERSION__ >= 199901L
+#define __restrict restrict
+#else
+#if !__GNUC_PREREQ__(2, 92)
+#define __restrict /* delete __restrict when not supported */
+#endif
+#endif
+
+/*
+ * C99 defines __func__ predefined identifier, which was made available
+ * in GCC 2.95.
+ */
+#if !(__STDC_VERSION__ >= 199901L)
+#if __GNUC_PREREQ__(2, 6)
+#define __func__ __PRETTY_FUNCTION__
+#elif __GNUC_PREREQ__(2, 4)
+#define __func__ __FUNCTION__
+#else
+#define __func__ ""
+#endif
+#endif /* !(__STDC_VERSION__ >= 199901L) */
+
+#if defined(_KERNEL)
+#if defined(NO_KERNEL_RCSIDS)
+#undef __KERNEL_RCSID
+#define __KERNEL_RCSID(_n, _s) /* nothing */
+#endif /* NO_KERNEL_RCSIDS */
+#endif /* _KERNEL */
+
+#if !defined(_STANDALONE) && !defined(_KERNEL)
+#ifdef __GNUC__
+#define __RENAME(x) ___RENAME(x)
+#else
+#ifdef __lint__
+#define __RENAME(x) __symbolrename(x)
+#else
+#error "No function renaming possible"
+#endif /* __lint__ */
+#endif /* __GNUC__ */
+#else /* _STANDALONE || _KERNEL */
+#define __RENAME(x) no renaming in kernel or standalone environment
+#endif
+
+/*
+ * A barrier to stop the optimizer from moving code or assume live
+ * register values. This is gcc specific, the version is more or less
+ * arbitrary, might work with older compilers.
+ */
+#if __GNUC_PREREQ__(2, 95)
+#define __insn_barrier() __asm __volatile("":::"memory")
+#else
+#define __insn_barrier() /* */
+#endif
+
+/*
+ * GNU C version 2.96 adds explicit branch prediction so that
+ * the CPU back-end can hint the processor and also so that
+ * code blocks can be reordered such that the predicted path
+ * sees a more linear flow, thus improving cache behavior, etc.
+ *
+ * The following two macros provide us with a way to use this
+ * compiler feature. Use __predict_true() if you expect the expression
+ * to evaluate to true, and __predict_false() if you expect the
+ * expression to evaluate to false.
+ *
+ * A few notes about usage:
+ *
+ * * Generally, __predict_false() error condition checks (unless
+ * you have some _strong_ reason to do otherwise, in which case
+ * document it), and/or __predict_true() `no-error' condition
+ * checks, assuming you want to optimize for the no-error case.
+ *
+ * * Other than that, if you don't know the likelihood of a test
+ * succeeding from empirical or other `hard' evidence, don't
+ * make predictions.
+ *
+ * * These are meant to be used in places that are run `a lot'.
+ * It is wasteful to make predictions in code that is run
+ * seldomly (e.g. at subsystem initialization time) as the
+ * basic block reordering that this affects can often generate
+ * larger code.
+ */
+#if __GNUC_PREREQ__(2, 96)
+#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
+#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#else
+#define __predict_true(exp) (exp)
+#define __predict_false(exp) (exp)
+#endif
+
+#if __GNUC_PREREQ__(2, 96)
+#define __noreturn __attribute__((__noreturn__))
+#define __mallocfunc __attribute__((malloc))
+#else
+#define __noreturn
+#define __mallocfunc
+#endif
+
+/*
+ * Macros for manipulating "link sets". Link sets are arrays of pointers
+ * to objects, which are gathered up by the linker.
+ *
+ * Object format-specific code has provided us with the following macros:
+ *
+ * __link_set_add_text(set, sym)
+ * Add a reference to the .text symbol `sym' to `set'.
+ *
+ * __link_set_add_rodata(set, sym)
+ * Add a reference to the .rodata symbol `sym' to `set'.
+ *
+ * __link_set_add_data(set, sym)
+ * Add a reference to the .data symbol `sym' to `set'.
+ *
+ * __link_set_add_bss(set, sym)
+ * Add a reference to the .bss symbol `sym' to `set'.
+ *
+ * __link_set_decl(set, ptype)
+ * Provide an extern declaration of the set `set', which
+ * contains an array of the pointer type `ptype'. This
+ * macro must be used by any code which wishes to reference
+ * the elements of a link set.
+ *
+ * __link_set_start(set)
+ * This points to the first slot in the link set.
+ *
+ * __link_set_end(set)
+ * This points to the (non-existent) slot after the last
+ * entry in the link set.
+ *
+ * __link_set_count(set)
+ * Count the number of entries in link set `set'.
+ *
+ * In addition, we provide the following macros for accessing link sets:
+ *
+ * __link_set_foreach(pvar, set)
+ * Iterate over the link set `set'. Because a link set is
+ * an array of pointers, pvar must be declared as "type **pvar",
+ * and the actual entry accessed as "*pvar".
+ *
+ * __link_set_entry(set, idx)
+ * Access the link set entry at index `idx' from set `set'.
+ */
+#define __link_set_foreach(pvar, set) \
+ for (pvar = __link_set_start(set); pvar < __link_set_end(set); pvar++)
+
+#define __link_set_entry(set, idx) (__link_set_begin(set)[idx])
+
+/*
+ * Some of the recend FreeBSD sources used in Bionic need this.
+ * Originally, this is used to embed the rcs versions of each source file
+ * in the generated binary. We certainly don't want this in Bionic.
+ */
+#define __FBSDID(s) struct __hack
+
+/*-
+ * The following definitions are an extension of the behavior originally
+ * implemented in <sys/_posix.h>, but with a different level of granularity.
+ * POSIX.1 requires that the macros we test be defined before any standard
+ * header file is included.
+ *
+ * Here's a quick run-down of the versions:
+ * defined(_POSIX_SOURCE) 1003.1-1988
+ * _POSIX_C_SOURCE == 1 1003.1-1990
+ * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
+ * _POSIX_C_SOURCE == 199309 1003.1b-1993
+ * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ * _POSIX_C_SOURCE == 200112 1003.1-2001
+ * _POSIX_C_SOURCE == 200809 1003.1-2008
+ *
+ * In addition, the X/Open Portability Guide, which is now the Single UNIX
+ * Specification, defines a feature-test macro which indicates the version of
+ * that specification, and which subsumes _POSIX_C_SOURCE.
+ *
+ * Our macros begin with two underscores to avoid namespace screwage.
+ */
+
+/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
+#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
+#define _POSIX_C_SOURCE 199009
+#endif
+
+/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199209
+#endif
+
+/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
+#ifdef _XOPEN_SOURCE
+#if _XOPEN_SOURCE - 0 >= 700
+#define __XSI_VISIBLE 700
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809
+#elif _XOPEN_SOURCE - 0 >= 600
+#define __XSI_VISIBLE 600
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112
+#elif _XOPEN_SOURCE - 0 >= 500
+#define __XSI_VISIBLE 500
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199506
+#endif
+#endif
+
+/*
+ * Deal with all versions of POSIX. The ordering relative to the tests above is
+ * important.
+ */
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 198808
+#endif
+#ifdef _POSIX_C_SOURCE
+#if _POSIX_C_SOURCE >= 200809
+#define __POSIX_VISIBLE 200809
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 200112
+#define __POSIX_VISIBLE 200112
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 199506
+#define __POSIX_VISIBLE 199506
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199309
+#define __POSIX_VISIBLE 199309
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199209
+#define __POSIX_VISIBLE 199209
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199009
+#define __POSIX_VISIBLE 199009
+#define __ISO_C_VISIBLE 1990
+#else
+#define __POSIX_VISIBLE 198808
+#define __ISO_C_VISIBLE 0
+#endif /* _POSIX_C_SOURCE */
+#else
+/*-
+ * Deal with _ANSI_SOURCE:
+ * If it is defined, and no other compilation environment is explicitly
+ * requested, then define our internal feature-test macros to zero. This
+ * makes no difference to the preprocessor (undefined symbols in preprocessing
+ * expressions are defined to have value zero), but makes it more convenient for
+ * a test program to print out the values.
+ *
+ * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
+ * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
+ * environment (and in fact we will never get here).
+ */
+#if defined(_ANSI_SOURCE) /* Hide almost everything. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1990
+#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1999
+#else /* Default environment: show everything. */
+#define __POSIX_VISIBLE 200809
+#define __XSI_VISIBLE 700
+#define __BSD_VISIBLE 1
+#define __ISO_C_VISIBLE 1999
+#endif
+#endif
+
+/*
+ * Default values.
+ */
+#ifndef __XPG_VISIBLE
+# define __XPG_VISIBLE 700
+#endif
+#ifndef __POSIX_VISIBLE
+# define __POSIX_VISIBLE 200809
+#endif
+#ifndef __ISO_C_VISIBLE
+# define __ISO_C_VISIBLE 1999
+#endif
+#ifndef __BSD_VISIBLE
+# define __BSD_VISIBLE 1
+#endif
+
+#define __BIONIC__ 1
+
+#endif /* !_SYS_CDEFS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h b/6/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h
new file mode 100644
index 0000000..e051b1d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h
@@ -0,0 +1,152 @@
+/* $NetBSD: cdefs_elf.h,v 1.22 2005/02/26 22:25:34 perry Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _SYS_CDEFS_ELF_H_
+#define _SYS_CDEFS_ELF_H_
+
+#ifdef __LEADING_UNDERSCORE
+#define _C_LABEL(x) __CONCAT(_,x)
+#define _C_LABEL_STRING(x) "_"x
+#else
+#define _C_LABEL(x) x
+#define _C_LABEL_STRING(x) x
+#endif
+
+#if __STDC__
+#define ___RENAME(x) __asm__(___STRING(_C_LABEL(x)))
+#else
+#ifdef __LEADING_UNDERSCORE
+#define ___RENAME(x) ____RENAME(_/**/x)
+#define ____RENAME(x) __asm__(___STRING(x))
+#else
+#define ___RENAME(x) __asm__(___STRING(x))
+#endif
+#endif
+
+#define __indr_reference(sym,alias) /* nada, since we do weak refs */
+
+#if __STDC__
+#define __strong_alias(alias,sym) \
+ __asm__(".global " _C_LABEL_STRING(#alias) "\n" \
+ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
+
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " _C_LABEL_STRING(#alias) "\n" \
+ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
+#define __weak_extern(sym) \
+ __asm__(".weak " _C_LABEL_STRING(#sym));
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." #sym "\n\t.ascii \"" msg "\"\n\t.text");
+
+#else /* !__STDC__ */
+
+#ifdef __LEADING_UNDERSCORE
+#define __weak_alias(alias,sym) ___weak_alias(_/**/alias,_/**/sym)
+#define ___weak_alias(alias,sym) \
+ __asm__(".weak alias\nalias = sym");
+#else
+#define __weak_alias(alias,sym) \
+ __asm__(".weak alias\nalias = sym");
+#endif
+#ifdef __LEADING_UNDERSCORE
+#define __weak_extern(sym) ___weak_extern(_/**/sym)
+#define ___weak_extern(sym) \
+ __asm__(".weak sym");
+#else
+#define __weak_extern(sym) \
+ __asm__(".weak sym");
+#endif
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning.sym\n\t.ascii msg ; .text");
+
+#endif /* !__STDC__ */
+
+#if __STDC__
+#define __SECTIONSTRING(_sec, _str) \
+ __asm__(".section " #_sec "\n\t.asciz \"" _str "\"\n\t.previous")
+#else
+#define __SECTIONSTRING(_sec, _str) \
+ __asm__(".section _sec\n\t.asciz _str\n\t.previous")
+#endif
+
+#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)
+
+#define __RCSID(_s) __IDSTRING(rcsid,_s)
+#define __SCCSID(_s)
+#define __SCCSID2(_s)
+#if 0 /* XXX userland __COPYRIGHTs have \ns in them */
+#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s)
+#else
+#define __COPYRIGHT(_s) \
+ static const char copyright[] \
+ __attribute__((__unused__,__section__(".copyright"))) = _s
+#endif
+
+#define __KERNEL_RCSID(_n, _s) __RCSID(_s)
+#define __KERNEL_SCCSID(_n, _s)
+#if 0 /* XXX see above */
+#define __KERNEL_COPYRIGHT(_n, _s) __COPYRIGHT(_s)
+#else
+#define __KERNEL_COPYRIGHT(_n, _s) __SECTIONSTRING(.copyright, _s)
+#endif
+
+#ifndef __lint__
+#define __link_set_make_entry(set, sym) \
+ static void const * const __link_set_##set##_sym_##sym \
+ __section("link_set_" #set) __used = &sym
+#define __link_set_make_entry2(set, sym, n) \
+ static void const * const __link_set_##set##_sym_##sym##_##n \
+ __section("link_set_" #set) __used = &sym[n]
+#else
+#define __link_set_make_entry(set, sym) \
+ extern void const * const __link_set_##set##_sym_##sym
+#define __link_set_make_entry2(set, sym, n) \
+ extern void const * const __link_set_##set##_sym_##sym##_##n
+#endif /* __lint__ */
+
+#define __link_set_add_text(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_rodata(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_data(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_bss(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_text2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_rodata2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_data2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_bss2(set, sym, n) __link_set_make_entry2(set, sym, n)
+
+#define __link_set_decl(set, ptype) \
+ extern ptype * const __start_link_set_##set[]; \
+ extern ptype * const __stop_link_set_##set[] \
+
+#define __link_set_start(set) (__start_link_set_##set)
+#define __link_set_end(set) (__stop_link_set_##set)
+
+#define __link_set_count(set) \
+ (__link_set_end(set) - __link_set_start(set))
+
+#endif /* !_SYS_CDEFS_ELF_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/dirent.h b/6/platforms/android-3/arch-arm/usr/include/sys/dirent.h
new file mode 100644
index 0000000..da96f5e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/dirent.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_DIRENT_H_
+#define _SYS_DIRENT_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* this corresponds to the kernel dirent64 */
+struct dirent {
+ uint64_t d_ino;
+ int64_t d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+extern int getdents(unsigned int, struct dirent *, unsigned int);
+
+__END_DECLS
+
+#endif /* _SYS_DIRENT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/endian.h b/6/platforms/android-3/arch-arm/usr/include/sys/endian.h
new file mode 100644
index 0000000..00f4839
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/endian.h
@@ -0,0 +1,273 @@
+/* $OpenBSD: endian.h,v 1.17 2006/01/06 18:53:05 millert Exp $ */
+
+/*-
+ * Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Generic definitions for little- and big-endian systems. Other endianesses
+ * has to be dealt with in the specific machine/endian.h file for that port.
+ *
+ * This file is meant to be included from a little- or big-endian port's
+ * machine/endian.h after setting _BYTE_ORDER to either 1234 for little endian
+ * or 4321 for big..
+ */
+
+#ifndef _SYS_ENDIAN_H_
+#define _SYS_ENDIAN_H_
+
+#include <sys/cdefs.h>
+#include <machine/_types.h>
+
+#define _LITTLE_ENDIAN 1234
+#define _BIG_ENDIAN 4321
+#define _PDP_ENDIAN 3412
+
+#if __BSD_VISIBLE
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
+#define PDP_ENDIAN _PDP_ENDIAN
+#define BYTE_ORDER _BYTE_ORDER
+#endif
+
+#ifdef __GNUC__
+
+#define __swap16gen(x) __statement({ \
+ __uint16_t __swap16gen_x = (x); \
+ \
+ (__uint16_t)((__swap16gen_x & 0xff) << 8 | \
+ (__swap16gen_x & 0xff00) >> 8); \
+})
+
+#define __swap32gen(x) __statement({ \
+ __uint32_t __swap32gen_x = (x); \
+ \
+ (__uint32_t)((__swap32gen_x & 0xff) << 24 | \
+ (__swap32gen_x & 0xff00) << 8 | \
+ (__swap32gen_x & 0xff0000) >> 8 | \
+ (__swap32gen_x & 0xff000000) >> 24); \
+})
+
+#define __swap64gen(x) __statement({ \
+ __uint64_t __swap64gen_x = (x); \
+ \
+ (__uint64_t)((__swap64gen_x & 0xff) << 56 | \
+ (__swap64gen_x & 0xff00ULL) << 40 | \
+ (__swap64gen_x & 0xff0000ULL) << 24 | \
+ (__swap64gen_x & 0xff000000ULL) << 8 | \
+ (__swap64gen_x & 0xff00000000ULL) >> 8 | \
+ (__swap64gen_x & 0xff0000000000ULL) >> 24 | \
+ (__swap64gen_x & 0xff000000000000ULL) >> 40 | \
+ (__swap64gen_x & 0xff00000000000000ULL) >> 56); \
+})
+
+#else /* __GNUC__ */
+
+/* Note that these macros evaluate their arguments several times. */
+#define __swap16gen(x) \
+ (__uint16_t)(((__uint16_t)(x) & 0xff) << 8 | ((__uint16_t)(x) & 0xff00) >> 8)
+
+#define __swap32gen(x) \
+ (__uint32_t)(((__uint32_t)(x) & 0xff) << 24 | \
+ ((__uint32_t)(x) & 0xff00) << 8 | ((__uint32_t)(x) & 0xff0000) >> 8 |\
+ ((__uint32_t)(x) & 0xff000000) >> 24)
+
+#define __swap64gen(x) \
+ (__uint64_t)((((__uint64_t)(x) & 0xff) << 56) | \
+ ((__uint64_t)(x) & 0xff00ULL) << 40 | \
+ ((__uint64_t)(x) & 0xff0000ULL) << 24 | \
+ ((__uint64_t)(x) & 0xff000000ULL) << 8 | \
+ ((__uint64_t)(x) & 0xff00000000ULL) >> 8 | \
+ ((__uint64_t)(x) & 0xff0000000000ULL) >> 24 | \
+ ((__uint64_t)(x) & 0xff000000000000ULL) >> 40 | \
+ ((__uint64_t)(x) & 0xff00000000000000ULL) >> 56)
+
+#endif /* __GNUC__ */
+
+/*
+ * Define MD_SWAP if you provide swap{16,32}md functions/macros that are
+ * optimized for your architecture, These will be used for swap{16,32}
+ * unless the argument is a constant and we are using GCC, where we can
+ * take advantage of the CSE phase much better by using the generic version.
+ */
+#ifdef MD_SWAP
+#if __GNUC__
+
+#define __swap16(x) __statement({ \
+ __uint16_t __swap16_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap16gen(__swap16_x) : \
+ __swap16md(__swap16_x); \
+})
+
+#define __swap32(x) __statement({ \
+ __uint32_t __swap32_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap32gen(__swap32_x) : \
+ __swap32md(__swap32_x); \
+})
+
+#define __swap64(x) __statement({ \
+ __uint64_t __swap64_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap64gen(__swap64_x) : \
+ __swap64md(__swap64_x); \
+})
+
+#endif /* __GNUC__ */
+
+#else /* MD_SWAP */
+#define __swap16 __swap16gen
+#define __swap32 __swap32gen
+#define __swap64 __swap64gen
+#endif /* MD_SWAP */
+
+#define __swap16_multi(v, n) do { \
+ __size_t __swap16_multi_n = (n); \
+ __uint16_t *__swap16_multi_v = (v); \
+ \
+ while (__swap16_multi_n) { \
+ *__swap16_multi_v = swap16(*__swap16_multi_v); \
+ __swap16_multi_v++; \
+ __swap16_multi_n--; \
+ } \
+} while (0)
+
+#if __BSD_VISIBLE
+#define swap16 __swap16
+#define swap32 __swap32
+#define swap64 __swap64
+#define swap16_multi __swap16_multi
+
+__BEGIN_DECLS
+__uint64_t htobe64(__uint64_t);
+__uint32_t htobe32(__uint32_t);
+__uint16_t htobe16(__uint16_t);
+__uint64_t betoh64(__uint64_t);
+__uint32_t betoh32(__uint32_t);
+__uint16_t betoh16(__uint16_t);
+
+__uint64_t htole64(__uint64_t);
+__uint32_t htole32(__uint32_t);
+__uint16_t htole16(__uint16_t);
+__uint64_t letoh64(__uint64_t);
+__uint32_t letoh32(__uint32_t);
+__uint16_t letoh16(__uint16_t);
+__END_DECLS
+#endif /* __BSD_VISIBLE */
+
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+
+/* Can be overridden by machine/endian.h before inclusion of this file. */
+#ifndef _QUAD_HIGHWORD
+#define _QUAD_HIGHWORD 1
+#endif
+#ifndef _QUAD_LOWWORD
+#define _QUAD_LOWWORD 0
+#endif
+
+#if __BSD_VISIBLE
+#define htobe16 __swap16
+#define htobe32 __swap32
+#define htobe64 __swap64
+#define betoh16 __swap16
+#define betoh32 __swap32
+#define betoh64 __swap64
+
+#define htole16(x) (x)
+#define htole32(x) (x)
+#define htole64(x) (x)
+#define letoh16(x) (x)
+#define letoh32(x) (x)
+#define letoh64(x) (x)
+#endif /* __BSD_VISIBLE */
+
+#define htons(x) __swap16(x)
+#define htonl(x) __swap32(x)
+#define ntohs(x) __swap16(x)
+#define ntohl(x) __swap32(x)
+
+/* Bionic additions */
+#define ntohq(x) __swap64(x)
+#define htonq(x) __swap64(x)
+
+#define __LITTLE_ENDIAN_BITFIELD
+
+#endif /* _BYTE_ORDER */
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+
+/* Can be overridden by machine/endian.h before inclusion of this file. */
+#ifndef _QUAD_HIGHWORD
+#define _QUAD_HIGHWORD 0
+#endif
+#ifndef _QUAD_LOWWORD
+#define _QUAD_LOWWORD 1
+#endif
+
+#if __BSD_VISIBLE
+#define htole16 __swap16
+#define htole32 __swap32
+#define htole64 __swap64
+#define letoh16 __swap16
+#define letoh32 __swap32
+#define letoh64 __swap64
+
+#define htobe16(x) (x)
+#define htobe32(x) (x)
+#define htobe64(x) (x)
+#define betoh16(x) (x)
+#define betoh32(x) (x)
+#define betoh64(x) (x)
+#endif /* __BSD_VISIBLE */
+
+#define htons(x) (x)
+#define htonl(x) (x)
+#define ntohs(x) (x)
+#define ntohl(x) (x)
+
+/* Bionic additions */
+#define ntohq(x) (x)
+#define htonq(x) (x)
+
+#define __BIG_ENDIAN_BITFIELD
+
+#endif /* _BYTE_ORDER */
+
+#if __BSD_VISIBLE
+#define NTOHL(x) (x) = ntohl((u_int32_t)(x))
+#define NTOHS(x) (x) = ntohs((u_int16_t)(x))
+#define HTONL(x) (x) = htonl((u_int32_t)(x))
+#define HTONS(x) (x) = htons((u_int16_t)(x))
+#endif
+
+
+#define __BYTE_ORDER _BYTE_ORDER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#endif
+
+#endif /* _SYS_ENDIAN_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/epoll.h b/6/platforms/android-3/arch-arm/usr/include/sys/epoll.h
new file mode 100644
index 0000000..decdb46
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/epoll.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_EPOLL_H_
+#define _SYS_EPOLL_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define EPOLLIN 0x00000001
+#define EPOLLPRI 0x00000002
+#define EPOLLOUT 0x00000004
+#define EPOLLERR 0x00000008
+#define EPOLLHUP 0x00000010
+#define EPOLLRDNORM 0x00000040
+#define EPOLLRDBAND 0x00000080
+#define EPOLLWRNORM 0x00000100
+#define EPOLLWRBAND 0x00000200
+#define EPOLLMSG 0x00000400
+#define EPOLLET 0x80000000
+
+#define EPOLL_CTL_ADD 1
+#define EPOLL_CTL_DEL 2
+#define EPOLL_CTL_MOD 3
+
+typedef union epoll_data
+{
+ void *ptr;
+ int fd;
+ unsigned int u32;
+ unsigned long long u64;
+} epoll_data_t;
+
+struct epoll_event
+{
+ unsigned int events;
+ epoll_data_t data;
+};
+
+int epoll_create(int size);
+int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout);
+
+__END_DECLS
+
+#endif /* _SYS_EPOLL_H_ */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/errno.h b/6/platforms/android-3/arch-arm/usr/include/sys/errno.h
new file mode 100644
index 0000000..339f4fc
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/errno.h
@@ -0,0 +1 @@
+#include <errno.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/exec_elf.h b/6/platforms/android-3/arch-arm/usr/include/sys/exec_elf.h
new file mode 100644
index 0000000..f72f81e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/exec_elf.h
@@ -0,0 +1,625 @@
+/* $OpenBSD: exec_elf.h,v 1.41 2006/01/06 18:53:05 millert Exp $ */
+/*
+ * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This is the ELF ABI header file
+ * formerly known as "elf_abi.h".
+ */
+
+#ifndef _SYS_EXEC_ELF_H_
+#define _SYS_EXEC_ELF_H_
+
+#include <machine/_types.h>
+#include <machine/exec.h>
+
+typedef __uint8_t Elf_Byte;
+
+typedef __uint32_t Elf32_Addr; /* Unsigned program address */
+typedef __uint32_t Elf32_Off; /* Unsigned file offset */
+typedef __int32_t Elf32_Sword; /* Signed large integer */
+typedef __uint32_t Elf32_Word; /* Unsigned large integer */
+typedef __uint16_t Elf32_Half; /* Unsigned medium integer */
+
+typedef __uint64_t Elf64_Addr;
+typedef __uint64_t Elf64_Off;
+typedef __int32_t Elf64_Shalf;
+
+#ifdef __alpha__
+typedef __int64_t Elf64_Sword;
+typedef __uint64_t Elf64_Word;
+#else
+typedef __int32_t Elf64_Sword;
+typedef __uint32_t Elf64_Word;
+#endif
+
+typedef __int64_t Elf64_Sxword;
+typedef __uint64_t Elf64_Xword;
+
+typedef __uint32_t Elf64_Half;
+typedef __uint16_t Elf64_Quarter;
+
+/*
+ * e_ident[] identification indexes
+ * See http://www.caldera.com/developers/gabi/2000-07-17/ch4.eheader.html
+ */
+#define EI_MAG0 0 /* file ID */
+#define EI_MAG1 1 /* file ID */
+#define EI_MAG2 2 /* file ID */
+#define EI_MAG3 3 /* file ID */
+#define EI_CLASS 4 /* file class */
+#define EI_DATA 5 /* data encoding */
+#define EI_VERSION 6 /* ELF header version */
+#define EI_OSABI 7 /* OS/ABI ID */
+#define EI_ABIVERSION 8 /* ABI version */
+#define EI_PAD 9 /* start of pad bytes */
+#define EI_NIDENT 16 /* Size of e_ident[] */
+
+/* e_ident[] magic number */
+#define ELFMAG0 0x7f /* e_ident[EI_MAG0] */
+#define ELFMAG1 'E' /* e_ident[EI_MAG1] */
+#define ELFMAG2 'L' /* e_ident[EI_MAG2] */
+#define ELFMAG3 'F' /* e_ident[EI_MAG3] */
+#define ELFMAG "\177ELF" /* magic */
+#define SELFMAG 4 /* size of magic */
+
+/* e_ident[] file class */
+#define ELFCLASSNONE 0 /* invalid */
+#define ELFCLASS32 1 /* 32-bit objs */
+#define ELFCLASS64 2 /* 64-bit objs */
+#define ELFCLASSNUM 3 /* number of classes */
+
+/* e_ident[] data encoding */
+#define ELFDATANONE 0 /* invalid */
+#define ELFDATA2LSB 1 /* Little-Endian */
+#define ELFDATA2MSB 2 /* Big-Endian */
+#define ELFDATANUM 3 /* number of data encode defines */
+
+/* e_ident[] Operating System/ABI */
+#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
+#define ELFOSABI_HPUX 1 /* HP-UX operating system */
+#define ELFOSABI_NETBSD 2 /* NetBSD */
+#define ELFOSABI_LINUX 3 /* GNU/Linux */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */
+#define ELFOSABI_SOLARIS 6 /* Solaris */
+#define ELFOSABI_MONTEREY 7 /* Monterey */
+#define ELFOSABI_IRIX 8 /* IRIX */
+#define ELFOSABI_FREEBSD 9 /* FreeBSD */
+#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
+#define ELFOSABI_MODESTO 11 /* Novell Modesto */
+#define ELFOSABI_OPENBSD 12 /* OpenBSD */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
+
+/* e_ident */
+#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
+ (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
+ (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
+ (ehdr).e_ident[EI_MAG3] == ELFMAG3)
+
+/* ELF Header */
+typedef struct elfhdr {
+ unsigned char e_ident[EI_NIDENT]; /* ELF Identification */
+ Elf32_Half e_type; /* object file type */
+ Elf32_Half e_machine; /* machine */
+ Elf32_Word e_version; /* object file version */
+ Elf32_Addr e_entry; /* virtual entry point */
+ Elf32_Off e_phoff; /* program header table offset */
+ Elf32_Off e_shoff; /* section header table offset */
+ Elf32_Word e_flags; /* processor-specific flags */
+ Elf32_Half e_ehsize; /* ELF header size */
+ Elf32_Half e_phentsize; /* program header entry size */
+ Elf32_Half e_phnum; /* number of program header entries */
+ Elf32_Half e_shentsize; /* section header entry size */
+ Elf32_Half e_shnum; /* number of section header entries */
+ Elf32_Half e_shstrndx; /* section header table's "section
+ header string table" entry offset */
+} Elf32_Ehdr;
+
+typedef struct {
+ unsigned char e_ident[EI_NIDENT]; /* Id bytes */
+ Elf64_Quarter e_type; /* file type */
+ Elf64_Quarter e_machine; /* machine type */
+ Elf64_Half e_version; /* version number */
+ Elf64_Addr e_entry; /* entry point */
+ Elf64_Off e_phoff; /* Program hdr offset */
+ Elf64_Off e_shoff; /* Section hdr offset */
+ Elf64_Half e_flags; /* Processor flags */
+ Elf64_Quarter e_ehsize; /* sizeof ehdr */
+ Elf64_Quarter e_phentsize; /* Program header entry size */
+ Elf64_Quarter e_phnum; /* Number of program headers */
+ Elf64_Quarter e_shentsize; /* Section header entry size */
+ Elf64_Quarter e_shnum; /* Number of section headers */
+ Elf64_Quarter e_shstrndx; /* String table index */
+} Elf64_Ehdr;
+
+/* e_type */
+#define ET_NONE 0 /* No file type */
+#define ET_REL 1 /* relocatable file */
+#define ET_EXEC 2 /* executable file */
+#define ET_DYN 3 /* shared object file */
+#define ET_CORE 4 /* core file */
+#define ET_NUM 5 /* number of types */
+#define ET_LOPROC 0xff00 /* reserved range for processor */
+#define ET_HIPROC 0xffff /* specific e_type */
+
+/* e_machine */
+#define EM_NONE 0 /* No Machine */
+#define EM_M32 1 /* AT&T WE 32100 */
+#define EM_SPARC 2 /* SPARC */
+#define EM_386 3 /* Intel 80386 */
+#define EM_68K 4 /* Motorola 68000 */
+#define EM_88K 5 /* Motorola 88000 */
+#define EM_486 6 /* Intel 80486 - unused? */
+#define EM_860 7 /* Intel 80860 */
+#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */
+/*
+ * Don't know if EM_MIPS_RS4_BE,
+ * EM_SPARC64, EM_PARISC,
+ * or EM_PPC are ABI compliant
+ */
+#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */
+#define EM_SPARC64 11 /* SPARC v9 64-bit unoffical */
+#define EM_PARISC 15 /* HPPA */
+#define EM_SPARC32PLUS 18 /* Enhanced instruction set SPARC */
+#define EM_PPC 20 /* PowerPC */
+#define EM_ARM 40 /* Advanced RISC Machines ARM */
+#define EM_ALPHA 41 /* DEC ALPHA */
+#define EM_SPARCV9 43 /* SPARC version 9 */
+#define EM_ALPHA_EXP 0x9026 /* DEC ALPHA */
+#define EM_AMD64 62 /* AMD64 architecture */
+#define EM_VAX 75 /* DEC VAX */
+#define EM_NUM 15 /* number of machine types */
+
+/* Version */
+#define EV_NONE 0 /* Invalid */
+#define EV_CURRENT 1 /* Current */
+#define EV_NUM 2 /* number of versions */
+
+/* Section Header */
+typedef struct {
+ Elf32_Word sh_name; /* name - index into section header
+ string table section */
+ Elf32_Word sh_type; /* type */
+ Elf32_Word sh_flags; /* flags */
+ Elf32_Addr sh_addr; /* address */
+ Elf32_Off sh_offset; /* file offset */
+ Elf32_Word sh_size; /* section size */
+ Elf32_Word sh_link; /* section header table index link */
+ Elf32_Word sh_info; /* extra information */
+ Elf32_Word sh_addralign; /* address alignment */
+ Elf32_Word sh_entsize; /* section entry size */
+} Elf32_Shdr;
+
+typedef struct {
+ Elf64_Half sh_name; /* section name */
+ Elf64_Half sh_type; /* section type */
+ Elf64_Xword sh_flags; /* section flags */
+ Elf64_Addr sh_addr; /* virtual address */
+ Elf64_Off sh_offset; /* file offset */
+ Elf64_Xword sh_size; /* section size */
+ Elf64_Half sh_link; /* link to another */
+ Elf64_Half sh_info; /* misc info */
+ Elf64_Xword sh_addralign; /* memory alignment */
+ Elf64_Xword sh_entsize; /* table entry size */
+} Elf64_Shdr;
+
+/* Special Section Indexes */
+#define SHN_UNDEF 0 /* undefined */
+#define SHN_LORESERVE 0xff00 /* lower bounds of reserved indexes */
+#define SHN_LOPROC 0xff00 /* reserved range for processor */
+#define SHN_HIPROC 0xff1f /* specific section indexes */
+#define SHN_ABS 0xfff1 /* absolute value */
+#define SHN_COMMON 0xfff2 /* common symbol */
+#define SHN_HIRESERVE 0xffff /* upper bounds of reserved indexes */
+
+/* sh_type */
+#define SHT_NULL 0 /* inactive */
+#define SHT_PROGBITS 1 /* program defined information */
+#define SHT_SYMTAB 2 /* symbol table section */
+#define SHT_STRTAB 3 /* string table section */
+#define SHT_RELA 4 /* relocation section with addends*/
+#define SHT_HASH 5 /* symbol hash table section */
+#define SHT_DYNAMIC 6 /* dynamic section */
+#define SHT_NOTE 7 /* note section */
+#define SHT_NOBITS 8 /* no space section */
+#define SHT_REL 9 /* relation section without addends */
+#define SHT_SHLIB 10 /* reserved - purpose unknown */
+#define SHT_DYNSYM 11 /* dynamic symbol table section */
+#define SHT_NUM 12 /* number of section types */
+#define SHT_LOPROC 0x70000000 /* reserved range for processor */
+#define SHT_HIPROC 0x7fffffff /* specific section header types */
+#define SHT_LOUSER 0x80000000 /* reserved range for application */
+#define SHT_HIUSER 0xffffffff /* specific indexes */
+
+/* Section names */
+#define ELF_BSS ".bss" /* uninitialized data */
+#define ELF_DATA ".data" /* initialized data */
+#define ELF_DEBUG ".debug" /* debug */
+#define ELF_DYNAMIC ".dynamic" /* dynamic linking information */
+#define ELF_DYNSTR ".dynstr" /* dynamic string table */
+#define ELF_DYNSYM ".dynsym" /* dynamic symbol table */
+#define ELF_FINI ".fini" /* termination code */
+#define ELF_GOT ".got" /* global offset table */
+#define ELF_HASH ".hash" /* symbol hash table */
+#define ELF_INIT ".init" /* initialization code */
+#define ELF_REL_DATA ".rel.data" /* relocation data */
+#define ELF_REL_FINI ".rel.fini" /* relocation termination code */
+#define ELF_REL_INIT ".rel.init" /* relocation initialization code */
+#define ELF_REL_DYN ".rel.dyn" /* relocaltion dynamic link info */
+#define ELF_REL_RODATA ".rel.rodata" /* relocation read-only data */
+#define ELF_REL_TEXT ".rel.text" /* relocation code */
+#define ELF_RODATA ".rodata" /* read-only data */
+#define ELF_SHSTRTAB ".shstrtab" /* section header string table */
+#define ELF_STRTAB ".strtab" /* string table */
+#define ELF_SYMTAB ".symtab" /* symbol table */
+#define ELF_TEXT ".text" /* code */
+
+
+/* Section Attribute Flags - sh_flags */
+#define SHF_WRITE 0x1 /* Writable */
+#define SHF_ALLOC 0x2 /* occupies memory */
+#define SHF_EXECINSTR 0x4 /* executable */
+#define SHF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific section attributes */
+
+/* Symbol Table Entry */
+typedef struct elf32_sym {
+ Elf32_Word st_name; /* name - index into string table */
+ Elf32_Addr st_value; /* symbol value */
+ Elf32_Word st_size; /* symbol size */
+ unsigned char st_info; /* type and binding */
+ unsigned char st_other; /* 0 - no defined meaning */
+ Elf32_Half st_shndx; /* section header index */
+} Elf32_Sym;
+
+typedef struct {
+ Elf64_Half st_name; /* Symbol name index in str table */
+ Elf_Byte st_info; /* type / binding attrs */
+ Elf_Byte st_other; /* unused */
+ Elf64_Quarter st_shndx; /* section index of symbol */
+ Elf64_Xword st_value; /* value of symbol */
+ Elf64_Xword st_size; /* size of symbol */
+} Elf64_Sym;
+
+/* Symbol table index */
+#define STN_UNDEF 0 /* undefined */
+
+/* Extract symbol info - st_info */
+#define ELF32_ST_BIND(x) ((x) >> 4)
+#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF32_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+#define ELF64_ST_BIND(x) ((x) >> 4)
+#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF64_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+/* Symbol Binding - ELF32_ST_BIND - st_info */
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* like global - lower precedence */
+#define STB_NUM 3 /* number of symbol bindings */
+#define STB_LOPROC 13 /* reserved range for processor */
+#define STB_HIPROC 15 /* specific symbol bindings */
+
+/* Symbol type - ELF32_ST_TYPE - st_info */
+#define STT_NOTYPE 0 /* not specified */
+#define STT_OBJECT 1 /* data object */
+#define STT_FUNC 2 /* function */
+#define STT_SECTION 3 /* section */
+#define STT_FILE 4 /* file */
+#define STT_NUM 5 /* number of symbol types */
+#define STT_LOPROC 13 /* reserved range for processor */
+#define STT_HIPROC 15 /* specific symbol types */
+
+/* Relocation entry with implicit addend */
+typedef struct {
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+} Elf32_Rel;
+
+/* Relocation entry with explicit addend */
+typedef struct {
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+/* Extract relocation info - r_info */
+#define ELF32_R_SYM(i) ((i) >> 8)
+#define ELF32_R_TYPE(i) ((unsigned char) (i))
+#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t))
+
+typedef struct {
+ Elf64_Xword r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+} Elf64_Rel;
+
+typedef struct {
+ Elf64_Xword r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+ Elf64_Sxword r_addend; /* adjustment value */
+} Elf64_Rela;
+
+#define ELF64_R_SYM(info) ((info) >> 32)
+#define ELF64_R_TYPE(info) ((info) & 0xFFFFFFFF)
+#define ELF64_R_INFO(s,t) (((s) << 32) + (__uint32_t)(t))
+
+/* Program Header */
+typedef struct {
+ Elf32_Word p_type; /* segment type */
+ Elf32_Off p_offset; /* segment offset */
+ Elf32_Addr p_vaddr; /* virtual address of segment */
+ Elf32_Addr p_paddr; /* physical address - ignored? */
+ Elf32_Word p_filesz; /* number of bytes in file for seg. */
+ Elf32_Word p_memsz; /* number of bytes in mem. for seg. */
+ Elf32_Word p_flags; /* flags */
+ Elf32_Word p_align; /* memory alignment */
+} Elf32_Phdr;
+
+typedef struct {
+ Elf64_Half p_type; /* entry type */
+ Elf64_Half p_flags; /* flags */
+ Elf64_Off p_offset; /* offset */
+ Elf64_Addr p_vaddr; /* virtual address */
+ Elf64_Addr p_paddr; /* physical address */
+ Elf64_Xword p_filesz; /* file size */
+ Elf64_Xword p_memsz; /* memory size */
+ Elf64_Xword p_align; /* memory & file alignment */
+} Elf64_Phdr;
+
+/* Segment types - p_type */
+#define PT_NULL 0 /* unused */
+#define PT_LOAD 1 /* loadable segment */
+#define PT_DYNAMIC 2 /* dynamic linking section */
+#define PT_INTERP 3 /* the RTLD */
+#define PT_NOTE 4 /* auxiliary information */
+#define PT_SHLIB 5 /* reserved - purpose undefined */
+#define PT_PHDR 6 /* program header */
+#define PT_NUM 7 /* Number of segment types */
+#define PT_LOOS 0x60000000 /* reserved range for OS */
+#define PT_HIOS 0x6fffffff /* specific segment types */
+#define PT_LOPROC 0x70000000 /* reserved range for processor */
+#define PT_HIPROC 0x7fffffff /* specific segment types */
+
+/* Segment flags - p_flags */
+#define PF_X 0x1 /* Executable */
+#define PF_W 0x2 /* Writable */
+#define PF_R 0x4 /* Readable */
+#define PF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific segment flags */
+
+/* Dynamic structure */
+typedef struct {
+ Elf32_Sword d_tag; /* controls meaning of d_val */
+ union {
+ Elf32_Word d_val; /* Multiple meanings - see d_tag */
+ Elf32_Addr d_ptr; /* program virtual address */
+ } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+ Elf64_Xword d_tag; /* controls meaning of d_val */
+ union {
+ Elf64_Addr d_ptr;
+ Elf64_Xword d_val;
+ } d_un;
+} Elf64_Dyn;
+
+/* Dynamic Array Tags - d_tag */
+#define DT_NULL 0 /* marks end of _DYNAMIC array */
+#define DT_NEEDED 1 /* string table offset of needed lib */
+#define DT_PLTRELSZ 2 /* size of relocation entries in PLT */
+#define DT_PLTGOT 3 /* address PLT/GOT */
+#define DT_HASH 4 /* address of symbol hash table */
+#define DT_STRTAB 5 /* address of string table */
+#define DT_SYMTAB 6 /* address of symbol table */
+#define DT_RELA 7 /* address of relocation table */
+#define DT_RELASZ 8 /* size of relocation table */
+#define DT_RELAENT 9 /* size of relocation entry */
+#define DT_STRSZ 10 /* size of string table */
+#define DT_SYMENT 11 /* size of symbol table entry */
+#define DT_INIT 12 /* address of initialization func. */
+#define DT_FINI 13 /* address of termination function */
+#define DT_SONAME 14 /* string table offset of shared obj */
+#define DT_RPATH 15 /* string table offset of library
+ search path */
+#define DT_SYMBOLIC 16 /* start sym search in shared obj. */
+#define DT_REL 17 /* address of rel. tbl. w addends */
+#define DT_RELSZ 18 /* size of DT_REL relocation table */
+#define DT_RELENT 19 /* size of DT_REL relocation entry */
+#define DT_PLTREL 20 /* PLT referenced relocation entry */
+#define DT_DEBUG 21 /* bugger */
+#define DT_TEXTREL 22 /* Allow rel. mod. to unwritable seg */
+#define DT_JMPREL 23 /* add. of PLT's relocation entries */
+#define DT_BIND_NOW 24 /* Bind now regardless of env setting */
+#define DT_NUM 25 /* Number used. */
+#define DT_LOPROC 0x70000000 /* reserved range for processor */
+#define DT_HIPROC 0x7fffffff /* specific dynamic array tags */
+
+/* Standard ELF hashing function */
+unsigned int elf_hash(const unsigned char *name);
+
+/*
+ * Note Definitions
+ */
+typedef struct {
+ Elf32_Word namesz;
+ Elf32_Word descsz;
+ Elf32_Word type;
+} Elf32_Note;
+
+typedef struct {
+ Elf64_Half namesz;
+ Elf64_Half descsz;
+ Elf64_Half type;
+} Elf64_Note;
+
+/*
+ * XXX - these _KERNEL items aren't part of the ABI!
+ */
+#if defined(_KERNEL) || defined(_DYN_LOADER)
+
+#define ELF32_NO_ADDR ((u_long) ~0) /* Indicates addr. not yet filled in */
+#define ELF_AUX_ENTRIES 8 /* Size of aux array passed to loader */
+
+typedef struct {
+ Elf32_Sword au_id; /* 32-bit id */
+ Elf32_Word au_v; /* 32-bit value */
+} Aux32Info;
+
+#define ELF64_NO_ADDR ((__uint64_t) ~0)/* Indicates addr. not yet filled in */
+#define ELF64_AUX_ENTRIES 8 /* Size of aux array passed to loader */
+
+typedef struct {
+ Elf64_Shalf au_id; /* 32-bit id */
+ Elf64_Xword au_v; /* 64-bit id */
+} Aux64Info;
+
+enum AuxID {
+ AUX_null = 0,
+ AUX_ignore = 1,
+ AUX_execfd = 2,
+ AUX_phdr = 3, /* &phdr[0] */
+ AUX_phent = 4, /* sizeof(phdr[0]) */
+ AUX_phnum = 5, /* # phdr entries */
+ AUX_pagesz = 6, /* PAGESIZE */
+ AUX_base = 7, /* ld.so base addr */
+ AUX_flags = 8, /* processor flags */
+ AUX_entry = 9, /* a.out entry */
+ AUX_sun_uid = 2000, /* euid */
+ AUX_sun_ruid = 2001, /* ruid */
+ AUX_sun_gid = 2002, /* egid */
+ AUX_sun_rgid = 2003 /* rgid */
+};
+
+struct elf_args {
+ u_long arg_entry; /* program entry point */
+ u_long arg_interp; /* Interpreter load address */
+ u_long arg_phaddr; /* program header address */
+ u_long arg_phentsize; /* Size of program header */
+ u_long arg_phnum; /* Number of program headers */
+ u_long arg_os; /* OS tag */
+};
+
+#endif
+
+#if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
+#define ELFSIZE ARCH_ELFSIZE
+#endif
+
+#if defined(ELFSIZE)
+#define CONCAT(x,y) __CONCAT(x,y)
+#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))
+#define ELFNAME2(x,y) CONCAT(x,CONCAT(_elf,CONCAT(ELFSIZE,CONCAT(_,y))))
+#define ELFNAMEEND(x) CONCAT(x,CONCAT(_elf,ELFSIZE))
+#define ELFDEFNNAME(x) CONCAT(ELF,CONCAT(ELFSIZE,CONCAT(_,x)))
+#endif
+
+#if defined(ELFSIZE) && (ELFSIZE == 32)
+#define Elf_Ehdr Elf32_Ehdr
+#define Elf_Phdr Elf32_Phdr
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Rel Elf32_Rel
+#define Elf_RelA Elf32_Rela
+#define Elf_Dyn Elf32_Dyn
+#define Elf_Half Elf32_Half
+#define Elf_Word Elf32_Word
+#define Elf_Sword Elf32_Sword
+#define Elf_Addr Elf32_Addr
+#define Elf_Off Elf32_Off
+#define Elf_Nhdr Elf32_Nhdr
+#define Elf_Note Elf32_Note
+
+#define ELF_R_SYM ELF32_R_SYM
+#define ELF_R_TYPE ELF32_R_TYPE
+#define ELF_R_INFO ELF32_R_INFO
+#define ELFCLASS ELFCLASS32
+
+#define ELF_ST_BIND ELF32_ST_BIND
+#define ELF_ST_TYPE ELF32_ST_TYPE
+#define ELF_ST_INFO ELF32_ST_INFO
+
+#define AuxInfo Aux32Info
+#elif defined(ELFSIZE) && (ELFSIZE == 64)
+#define Elf_Ehdr Elf64_Ehdr
+#define Elf_Phdr Elf64_Phdr
+#define Elf_Shdr Elf64_Shdr
+#define Elf_Sym Elf64_Sym
+#define Elf_Rel Elf64_Rel
+#define Elf_RelA Elf64_Rela
+#define Elf_Dyn Elf64_Dyn
+#define Elf_Half Elf64_Half
+#define Elf_Word Elf64_Word
+#define Elf_Sword Elf64_Sword
+#define Elf_Addr Elf64_Addr
+#define Elf_Off Elf64_Off
+#define Elf_Nhdr Elf64_Nhdr
+#define Elf_Note Elf64_Note
+
+#define ELF_R_SYM ELF64_R_SYM
+#define ELF_R_TYPE ELF64_R_TYPE
+#define ELF_R_INFO ELF64_R_INFO
+#define ELFCLASS ELFCLASS64
+
+#define ELF_ST_BIND ELF64_ST_BIND
+#define ELF_ST_TYPE ELF64_ST_TYPE
+#define ELF_ST_INFO ELF64_ST_INFO
+
+#define AuxInfo Aux64Info
+#endif
+
+#ifndef _KERNEL
+extern Elf_Dyn _DYNAMIC[];
+#endif
+
+#ifdef _KERNEL
+#ifdef _KERN_DO_ELF64
+int exec_elf64_makecmds(struct proc *, struct exec_package *);
+void *elf64_copyargs(struct exec_package *, struct ps_strings *,
+ void *, void *);
+int exec_elf64_fixup(struct proc *, struct exec_package *);
+char *elf64_check_brand(Elf64_Ehdr *);
+int elf64_os_pt_note(struct proc *, struct exec_package *, Elf64_Ehdr *,
+ char *, size_t, size_t);
+#endif
+#ifdef _KERN_DO_ELF
+int exec_elf32_makecmds(struct proc *, struct exec_package *);
+void *elf32_copyargs(struct exec_package *, struct ps_strings *,
+ void *, void *);
+int exec_elf32_fixup(struct proc *, struct exec_package *);
+char *elf32_check_brand(Elf32_Ehdr *);
+int elf32_os_pt_note(struct proc *, struct exec_package *, Elf32_Ehdr *,
+ char *, size_t, size_t);
+#endif
+
+#endif /* _KERNEL */
+
+#define ELF_TARG_VER 1 /* The ver for which this code is intended */
+
+#endif /* _SYS_EXEC_ELF_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/file.h b/6/platforms/android-3/arch-arm/usr/include/sys/file.h
new file mode 100644
index 0000000..cf2f4b1
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/file.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_FILE_H_
+#define _SYS_FILE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+/* ANDROID: needed for flock() */
+#include <unistd.h>
+#include <fcntl.h>
+
+#endif /* _SYS_FILE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/fsuid.h b/6/platforms/android-3/arch-arm/usr/include/sys/fsuid.h
new file mode 100644
index 0000000..bc47e3d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/fsuid.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_FSUID_H_
+#define _SYS_FSUID_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+#if 0 /* MISSING FROM BIONIC */
+extern int setfsuid(uid_t);
+extern int setfsgid(gid_t);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_FSUID_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/inotify.h b/6/platforms/android-3/arch-arm/usr/include/sys/inotify.h
new file mode 100644
index 0000000..33f9e74
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/inotify.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_INOTIFY_H_
+#define _SYS_INOTIFY_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/inotify.h>
+
+__BEGIN_DECLS
+
+extern int inotify_init(void);
+extern int inotify_add_watch(int, const char *, __u32);
+extern int inotify_rm_watch(int, __u32);
+
+__END_DECLS
+
+#endif /* _SYS_INOTIFY_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ioctl.h b/6/platforms/android-3/arch-arm/usr/include/sys/ioctl.h
new file mode 100644
index 0000000..9f68510
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ioctl.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_IOCTL_H_
+#define _SYS_IOCTL_H_
+
+#include <sys/cdefs.h>
+#include <linux/ioctl.h>
+#include <asm/ioctls.h>
+#include <asm/termbits.h>
+#include <sys/ioctl_compat.h>
+
+__BEGIN_DECLS
+
+extern int ioctl(int, int, ...);
+
+__END_DECLS
+
+#endif /* _SYS_IOCTL_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ioctl_compat.h b/6/platforms/android-3/arch-arm/usr/include/sys/ioctl_compat.h
new file mode 100644
index 0000000..cab5c80
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ioctl_compat.h
@@ -0,0 +1,168 @@
+/* $NetBSD: ioctl_compat.h,v 1.15 2005/12/03 17:10:46 christos Exp $ */
+
+/*
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94
+ */
+
+#ifndef _SYS_IOCTL_COMPAT_H_
+#define _SYS_IOCTL_COMPAT_H_
+
+/*#include <sys/ttychars.h>*/
+/*#include <sys/ttydev.h>*/
+
+struct tchars {
+ char t_intrc; /* interrupt */
+ char t_quitc; /* quit */
+ char t_startc; /* start output */
+ char t_stopc; /* stop output */
+ char t_eofc; /* end-of-file */
+ char t_brkc; /* input delimiter (like nl) */
+};
+
+struct ltchars {
+ char t_suspc; /* stop process signal */
+ char t_dsuspc; /* delayed stop process signal */
+ char t_rprntc; /* reprint line */
+ char t_flushc; /* flush output (toggles) */
+ char t_werasc; /* word erase */
+ char t_lnextc; /* literal next character */
+};
+
+/*
+ * Structure for TIOCGETP and TIOCSETP ioctls.
+ */
+#ifndef _SGTTYB_
+#define _SGTTYB_
+struct sgttyb {
+ char sg_ispeed; /* input speed */
+ char sg_ospeed; /* output speed */
+ char sg_erase; /* erase character */
+ char sg_kill; /* kill character */
+ short sg_flags; /* mode flags */
+};
+#endif
+
+#ifdef USE_OLD_TTY
+# undef TIOCGETD
+# define TIOCGETD _IOR('t', 0, int) /* get line discipline */
+# undef TIOCSETD
+# define TIOCSETD _IOW('t', 1, int) /* set line discipline */
+#else
+# define OTIOCGETD _IOR('t', 0, int) /* get line discipline */
+# define OTIOCSETD _IOW('t', 1, int) /* set line discipline */
+#endif
+#define TIOCHPCL _IO('t', 2) /* hang up on last close */
+#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
+#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
+#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
+#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */
+#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */
+#if 0
+/* BUG: a bunch of these conflict with #defines in asm/termbits.h */
+#define TANDEM 0x00000001 /* send stopc on out q full */
+#define CBREAK 0x00000002 /* half-cooked mode */
+#define LCASE 0x00000004 /* simulate lower case */
+#define ECHO 0x00000008 /* enable echoing */
+#define CRMOD 0x00000010 /* map \r to \r\n on output */
+#define RAW 0x00000020 /* no i/o processing */
+#define ODDP 0x00000040 /* get/send odd parity */
+#define EVENP 0x00000080 /* get/send even parity */
+#define ANYP 0x000000c0 /* get any parity/send none */
+#define NLDELAY 0x00000300 /* \n delay */
+#define NL0 0x00000000
+#define NL1 0x00000100 /* tty 37 */
+#define NL2 0x00000200 /* vt05 */
+#define NL3 0x00000300
+#define TBDELAY 0x00000c00 /* horizontal tab delay */
+#define TAB0 0x00000000
+#define TAB1 0x00000400 /* tty 37 */
+#define TAB2 0x00000800
+#define XTABS 0x00000c00 /* expand tabs on output */
+#define CRDELAY 0x00003000 /* \r delay */
+#define CR0 0x00000000
+#define CR1 0x00001000 /* tn 300 */
+#define CR2 0x00002000 /* tty 37 */
+#define CR3 0x00003000 /* concept 100 */
+#define VTDELAY 0x00004000 /* vertical tab delay */
+#define FF0 0x00000000
+#define FF1 0x00004000 /* tty 37 */
+#define BSDELAY 0x00008000 /* \b delay */
+#define BS0 0x00000000
+#define BS1 0x00008000
+#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
+#define CRTBS 0x00010000 /* do backspacing for crt */
+#define PRTERA 0x00020000 /* \ ... / erase */
+#define CRTERA 0x00040000 /* " \b " to wipe out char */
+#define TILDE 0x00080000 /* hazeltine tilde kludge */
+#define MDMBUF 0x00100000 /* DTR/DCD hardware flow control */
+#define LITOUT 0x00200000 /* literal output */
+#define TOSTOP 0x00400000 /* stop background jobs on output */
+#define FLUSHO 0x00800000 /* output being flushed (state) */
+#define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */
+#define L001000 0x02000000
+#define CRTKIL 0x04000000 /* kill line with " \b " */
+#define PASS8 0x08000000
+#define CTLECH 0x10000000 /* echo control chars as ^X */
+#define PENDIN 0x20000000 /* re-echo input buffer at next read */
+#define DECCTQ 0x40000000 /* only ^Q starts after ^S */
+#define NOFLSH 0x80000000 /* don't flush output on signal */
+#endif
+#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
+#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */
+#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */
+#define TIOCLGET _IOR('t', 124, int) /* get local modes */
+#define LCRTBS (CRTBS>>16)
+#define LPRTERA (PRTERA>>16)
+#define LCRTERA (CRTERA>>16)
+#define LTILDE (TILDE>>16)
+#define LMDMBUF (MDMBUF>>16)
+#define LLITOUT (LITOUT>>16)
+#define LTOSTOP (TOSTOP>>16)
+#define LFLUSHO (FLUSHO>>16)
+#define LNOHANG (NOHANG>>16)
+#define LCRTKIL (CRTKIL>>16)
+#define LPASS8 (PASS8>>16)
+#define LCTLECH (CTLECH>>16)
+#define LPENDIN (PENDIN>>16)
+#define LDECCTQ (DECCTQ>>16)
+#define LNOFLSH (NOFLSH>>16)
+#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/
+#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/
+#define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */
+#define OTTYDISC 0
+#define NETLDISC 1
+#define NTTYDISC 2
+
+#endif /* !_SYS_IOCTL_COMPAT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ipc.h b/6/platforms/android-3/arch-arm/usr/include/sys/ipc.h
new file mode 100644
index 0000000..c0ae0ba
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ipc.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_IPC_H
+#define _SYS_IPC_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/ipc.h>
+
+__BEGIN_DECLS
+
+extern key_t ftok(const char* path, int id);
+
+__END_DECLS
+
+#endif /* _SYS_IPC_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/klog.h b/6/platforms/android-3/arch-arm/usr/include/sys/klog.h
new file mode 100644
index 0000000..21bb7d9
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/klog.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_KLOG_H_
+#define _SYS_KLOG_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define KLOG_CLOSE 0
+#define KLOG_OPEN 1
+#define KLOG_READ 2
+#define KLOG_READ_ALL 3
+#define KLOG_READ_CLEAR 4
+#define KLOG_CLEAR 5
+#define KLOG_DISABLE 6
+#define KLOG_ENABLE 7
+#define KLOG_SETLEVEL 8
+#define KLOG_UNREADSIZE 9
+#define KLOG_WRITE 10
+
+extern int klogctl(int, char *, int);
+
+__END_DECLS
+
+#endif /* _SYS_KLOG_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/limits.h b/6/platforms/android-3/arch-arm/usr/include/sys/limits.h
new file mode 100644
index 0000000..41d02ff
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/limits.h
@@ -0,0 +1,179 @@
+/* $OpenBSD: limits.h,v 1.6 2005/12/13 00:35:23 millert Exp $ */
+/*
+ * Copyright (c) 2002 Marc Espie.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
+ * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SYS_LIMITS_H_
+#define _SYS_LIMITS_H_
+
+#include <sys/cdefs.h>
+#include <linux/limits.h>
+
+/* Common definitions for limits.h. */
+
+/*
+ * <machine/internal_types.h> is meant to describe a specific architecture,
+ * but to be a safe include, that doesn't ever define anything that is
+ * user-visible (only typedefs and #define names that stays in the __xxx
+ * namespace).
+ *
+ * __machine_has_unsigned_chars (default is signed chars)
+ * __FLT_xxx/__DBL_xxx non standard values for floating
+ * points limits.
+ */
+#include <machine/internal_types.h>
+
+/* Legacy */
+#include <machine/limits.h>
+
+#define CHAR_BIT 8 /* number of bits in a char */
+
+#define SCHAR_MAX 0x7f /* max value for a signed char */
+#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
+
+#define UCHAR_MAX 0xffU /* max value for an unsigned char */
+#ifdef __machine_has_unsigned_chars
+# define CHAR_MIN 0 /* min value for a char */
+# define CHAR_MAX 0xff /* max value for a char */
+#else
+# define CHAR_MAX 0x7f
+# define CHAR_MIN (-0x7f-1)
+#endif
+
+#define USHRT_MAX 0xffffU /* max value for an unsigned short */
+#define SHRT_MAX 0x7fff /* max value for a short */
+#define SHRT_MIN (-0x7fff-1) /* min value for a short */
+
+#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
+#define INT_MAX 0x7fffffff /* max value for an int */
+#define INT_MIN (-0x7fffffff-1) /* min value for an int */
+
+#ifdef __LP64__
+# define ULONG_MAX 0xffffffffffffffffUL
+ /* max value for unsigned long */
+# define LONG_MAX 0x7fffffffffffffffL
+ /* max value for a signed long */
+# define LONG_MIN (-0x7fffffffffffffffL-1)
+ /* min value for a signed long */
+#else
+# define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
+# define LONG_MAX 0x7fffffffL /* max value for a long */
+# define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
+#endif
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
+# define ULLONG_MAX 0xffffffffffffffffULL
+ /* max value for unsigned long long */
+# define LLONG_MAX 0x7fffffffffffffffLL
+ /* max value for a signed long long */
+# define LLONG_MIN (-0x7fffffffffffffffLL-1)
+ /* min value for a signed long long */
+#endif
+
+#if __BSD_VISIBLE
+# define UID_MAX UINT_MAX /* max value for a uid_t */
+# define GID_MAX UINT_MAX /* max value for a gid_t */
+#endif
+
+
+#ifdef __LP64__
+# define LONG_BIT 64
+#else
+# define LONG_BIT 32
+#endif
+
+/* float.h defines these as well */
+# if !defined(DBL_DIG)
+# if defined(__DBL_DIG)
+# define DBL_DIG __DBL_DIG
+# define DBL_MAX __DBL_MAX
+# define DBL_MIN __DBL_MIN
+
+# define FLT_DIG __FLT_DIG
+# define FLT_MAX __FLT_MAX
+# define FLT_MIN __FLT_MIN
+# else
+# define DBL_DIG 15
+# define DBL_MAX 1.7976931348623157E+308
+# define DBL_MIN 2.2250738585072014E-308
+
+# define FLT_DIG 6
+# define FLT_MAX 3.40282347E+38F
+# define FLT_MIN 1.17549435E-38F
+# endif
+# endif
+
+/* Bionic: the following has been optimized out from our processed kernel headers */
+
+#define CHILD_MAX 999
+#define OPEN_MAX 256
+
+/* Bionic-specific definitions */
+
+#define _POSIX_VERSION 200112L /* Posix C language bindings version */
+#define _POSIX2_VERSION -1 /* we don't support Posix command-line tools */
+#define _POSIX2_C_VERSION _POSIX_VERSION
+#define _XOPEN_VERSION 500 /* by Posix definition */
+#define _XOPEN_XCU_VERSION -1 /* we don't support command-line utilities */
+
+/* tell what we implement legacy stuff when appropriate */
+#if _POSIX_VERSION > 0
+#define _XOPEN_XPG2 1
+#define _XOPEN_XPG3 1
+#define _XOPEN_XPG4 1
+#define _XOPEN_UNIX 1
+#endif
+
+#define _XOPEN_ENH_I18N -1 /* we don't support internationalization in the C library */
+#define _XOPEN_CRYPT -1 /* don't support X/Open Encryption */
+#define _XOPEN_LEGACY -1 /* don't claim we support these, we have some of them but not all */
+#define _XOPEN_REALTIME -1 /* we don't support all these functions */
+#define _XOPEN_REALTIME_THREADS -1 /* same here */
+
+#define _POSIX_REALTIME_SIGNALS -1 /* for now, this is not supported */
+#define _POSIX_PRIORITY_SCHEDULING 1 /* priority scheduling is a Linux feature */
+#define _POSIX_TIMERS 1 /* Posix timers are supported */
+#undef _POSIX_ASYNCHRONOUS_IO /* aio_ functions are not supported */
+#define _POSIX_SYNCHRONIZED_IO 1 /* synchronized i/o supported */
+#define _POSIX_FSYNC 1 /* fdatasync() supported */
+#define _POSIX_MAPPED_FILES 1 /* mmap-ed files supported */
+
+/* XXX: TODO: complete and check list here */
+
+
+#define _POSIX_THREADS 1 /* we support threads */
+#define _POSIX_THREAD_STACKADDR 1 /* we support thread stack address */
+#define _POSIX_THREAD_STACKSIZE 1 /* we support thread stack size */
+#define _POSIX_THREAD_PRIO_INHERIT 200112L /* linux feature */
+#define _POSIX_THREAD_PRIO_PROTECT 200112L /* linux feature */
+
+#undef _POSIX_PROCESS_SHARED /* we don't support process-shared synchronization */
+#undef _POSIX_THREAD_SAFE_FUNCTIONS /* most functions are, but not everything yet */
+#define _POSIX_CHOWN_RESTRICTED 1 /* yes, chown requires appropriate priviledges */
+#define _POSIX_NO_TRUNC 1 /* very long pathnames generate an error */
+#define _POSIX_SAVED_IDS 1 /* saved user ids is a Linux feature */
+#define _POSIX_JOB_CONTROL 1 /* job control is a Linux feature */
+
+
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/linux-syscalls.h b/6/platforms/android-3/arch-arm/usr/include/sys/linux-syscalls.h
new file mode 100644
index 0000000..7772f1e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/linux-syscalls.h
@@ -0,0 +1,223 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_SYSCALLS_H_
+
+#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H
+#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__
+ # define __NR_SYSCALL_BASE 0x900000
+ #else
+ # define __NR_SYSCALL_BASE 0
+ #endif
+
+#define __NR_exit (__NR_SYSCALL_BASE + 1)
+#define __NR_fork (__NR_SYSCALL_BASE + 2)
+#define __NR_clone (__NR_SYSCALL_BASE + 120)
+#define __NR_execve (__NR_SYSCALL_BASE + 11)
+#define __NR_setuid32 (__NR_SYSCALL_BASE + 213)
+#define __NR_getuid32 (__NR_SYSCALL_BASE + 199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE + 200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE + 202)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211)
+#define __NR_gettid (__NR_SYSCALL_BASE + 224)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205)
+#define __NR_getpgid (__NR_SYSCALL_BASE + 132)
+#define __NR_getppid (__NR_SYSCALL_BASE + 64)
+#define __NR_setsid (__NR_SYSCALL_BASE + 66)
+#define __NR_setgid32 (__NR_SYSCALL_BASE + 214)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210)
+#define __NR_brk (__NR_SYSCALL_BASE + 45)
+#define __NR_ptrace (__NR_SYSCALL_BASE + 26)
+#define __NR_getpriority (__NR_SYSCALL_BASE + 96)
+#define __NR_setpriority (__NR_SYSCALL_BASE + 97)
+#define __NR_setrlimit (__NR_SYSCALL_BASE + 75)
+#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191)
+#define __NR_getrusage (__NR_SYSCALL_BASE + 77)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206)
+#define __NR_setpgid (__NR_SYSCALL_BASE + 57)
+#define __NR_setregid32 (__NR_SYSCALL_BASE + 204)
+#define __NR_chroot (__NR_SYSCALL_BASE + 61)
+#define __NR_prctl (__NR_SYSCALL_BASE + 172)
+#define __NR_capget (__NR_SYSCALL_BASE + 184)
+#define __NR_capset (__NR_SYSCALL_BASE + 185)
+#define __NR_acct (__NR_SYSCALL_BASE + 51)
+#define __NR_read (__NR_SYSCALL_BASE + 3)
+#define __NR_write (__NR_SYSCALL_BASE + 4)
+#define __NR_pread64 (__NR_SYSCALL_BASE + 180)
+#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181)
+#define __NR_open (__NR_SYSCALL_BASE + 5)
+#define __NR_close (__NR_SYSCALL_BASE + 6)
+#define __NR_lseek (__NR_SYSCALL_BASE + 19)
+#define __NR__llseek (__NR_SYSCALL_BASE + 140)
+#define __NR_getpid (__NR_SYSCALL_BASE + 20)
+#define __NR_mmap2 (__NR_SYSCALL_BASE + 192)
+#define __NR_munmap (__NR_SYSCALL_BASE + 91)
+#define __NR_mremap (__NR_SYSCALL_BASE + 163)
+#define __NR_msync (__NR_SYSCALL_BASE + 144)
+#define __NR_mprotect (__NR_SYSCALL_BASE + 125)
+#define __NR_mlock (__NR_SYSCALL_BASE + 150)
+#define __NR_munlock (__NR_SYSCALL_BASE + 151)
+#define __NR_ioctl (__NR_SYSCALL_BASE + 54)
+#define __NR_readv (__NR_SYSCALL_BASE + 145)
+#define __NR_writev (__NR_SYSCALL_BASE + 146)
+#define __NR_fcntl (__NR_SYSCALL_BASE + 55)
+#define __NR_flock (__NR_SYSCALL_BASE + 143)
+#define __NR_fchmod (__NR_SYSCALL_BASE + 94)
+#define __NR_dup (__NR_SYSCALL_BASE + 41)
+#define __NR_pipe (__NR_SYSCALL_BASE + 42)
+#define __NR_dup2 (__NR_SYSCALL_BASE + 63)
+#define __NR__newselect (__NR_SYSCALL_BASE + 142)
+#define __NR_ftruncate (__NR_SYSCALL_BASE + 93)
+#define __NR_fsync (__NR_SYSCALL_BASE + 118)
+#define __NR_fchown32 (__NR_SYSCALL_BASE + 207)
+#define __NR_sync (__NR_SYSCALL_BASE + 36)
+#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)
+#define __NR_sendfile (__NR_SYSCALL_BASE + 187)
+#define __NR_link (__NR_SYSCALL_BASE + 9)
+#define __NR_unlink (__NR_SYSCALL_BASE + 10)
+#define __NR_chdir (__NR_SYSCALL_BASE + 12)
+#define __NR_mknod (__NR_SYSCALL_BASE + 14)
+#define __NR_chmod (__NR_SYSCALL_BASE + 15)
+#define __NR_chown32 (__NR_SYSCALL_BASE + 212)
+#define __NR_lchown32 (__NR_SYSCALL_BASE + 198)
+#define __NR_mount (__NR_SYSCALL_BASE + 21)
+#define __NR_umount2 (__NR_SYSCALL_BASE + 52)
+#define __NR_fstat64 (__NR_SYSCALL_BASE + 197)
+#define __NR_stat64 (__NR_SYSCALL_BASE + 195)
+#define __NR_lstat64 (__NR_SYSCALL_BASE + 196)
+#define __NR_mkdir (__NR_SYSCALL_BASE + 39)
+#define __NR_readlink (__NR_SYSCALL_BASE + 85)
+#define __NR_rmdir (__NR_SYSCALL_BASE + 40)
+#define __NR_rename (__NR_SYSCALL_BASE + 38)
+#define __NR_getcwd (__NR_SYSCALL_BASE + 183)
+#define __NR_access (__NR_SYSCALL_BASE + 33)
+#define __NR_symlink (__NR_SYSCALL_BASE + 83)
+#define __NR_fchdir (__NR_SYSCALL_BASE + 133)
+#define __NR_truncate (__NR_SYSCALL_BASE + 92)
+#define __NR_pause (__NR_SYSCALL_BASE + 29)
+#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78)
+#define __NR_settimeofday (__NR_SYSCALL_BASE + 79)
+#define __NR_times (__NR_SYSCALL_BASE + 43)
+#define __NR_nanosleep (__NR_SYSCALL_BASE + 162)
+#define __NR_getitimer (__NR_SYSCALL_BASE + 105)
+#define __NR_setitimer (__NR_SYSCALL_BASE + 104)
+#define __NR_sigaction (__NR_SYSCALL_BASE + 67)
+#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126)
+#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72)
+#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174)
+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175)
+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177)
+#define __NR_sigpending (__NR_SYSCALL_BASE + 73)
+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156)
+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157)
+#define __NR_sched_yield (__NR_SYSCALL_BASE + 158)
+#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154)
+#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155)
+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159)
+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160)
+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161)
+#define __NR_uname (__NR_SYSCALL_BASE + 122)
+#define __NR_wait4 (__NR_SYSCALL_BASE + 114)
+#define __NR_umask (__NR_SYSCALL_BASE + 60)
+#define __NR_reboot (__NR_SYSCALL_BASE + 88)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_init_module (__NR_SYSCALL_BASE + 128)
+#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_futex (__NR_SYSCALL_BASE + 240)
+#define __NR_poll (__NR_SYSCALL_BASE + 168)
+
+#ifdef __arm__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
+#define __NR_waitid (__NR_SYSCALL_BASE + 280)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 322)
+#define __NR_madvise (__NR_SYSCALL_BASE + 220)
+#define __NR_mincore (__NR_SYSCALL_BASE + 219)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 323)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 325)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 333)
+#define __NR_renameat (__NR_SYSCALL_BASE + 329)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 328)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 262)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 261)
+#define __NR_utimes (__NR_SYSCALL_BASE + 269)
+#define __NR_socket (__NR_SYSCALL_BASE + 281)
+#define __NR_socketpair (__NR_SYSCALL_BASE + 288)
+#define __NR_bind (__NR_SYSCALL_BASE + 282)
+#define __NR_connect (__NR_SYSCALL_BASE + 283)
+#define __NR_listen (__NR_SYSCALL_BASE + 284)
+#define __NR_accept (__NR_SYSCALL_BASE + 285)
+#define __NR_getsockname (__NR_SYSCALL_BASE + 286)
+#define __NR_getpeername (__NR_SYSCALL_BASE + 287)
+#define __NR_sendto (__NR_SYSCALL_BASE + 290)
+#define __NR_recvfrom (__NR_SYSCALL_BASE + 292)
+#define __NR_shutdown (__NR_SYSCALL_BASE + 293)
+#define __NR_setsockopt (__NR_SYSCALL_BASE + 294)
+#define __NR_getsockopt (__NR_SYSCALL_BASE + 295)
+#define __NR_sendmsg (__NR_SYSCALL_BASE + 296)
+#define __NR_recvmsg (__NR_SYSCALL_BASE + 297)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 250)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 316)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318)
+#define __NR_ARM_set_tls (__NR_SYSCALL_BASE + 983045)
+#define __NR_ARM_cacheflush (__NR_SYSCALL_BASE + 983042)
+#endif
+
+#ifdef __i386__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293)
+#endif
+
+#endif
+
+#endif /* _BIONIC_LINUX_SYSCALLS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/linux-unistd.h b/6/platforms/android-3/arch-arm/usr/include/sys/linux-unistd.h
new file mode 100644
index 0000000..789271e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/linux-unistd.h
@@ -0,0 +1,204 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_UNISTD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void _exit (int);
+void _exit_thread (int);
+pid_t __fork (void);
+pid_t _waitpid (pid_t, int*, int, struct rusage*);
+int waitid (int, pid_t, struct siginfo_t*, int,void*);
+pid_t __clone (int (*fn)(void*), void *child_stack, int flags, void *arg);
+int execve (const char*, char* const*, char* const*);
+int setuid (uid_t);
+uid_t getuid (void);
+gid_t getgid (void);
+uid_t geteuid (void);
+gid_t getegid (void);
+uid_t getresuid (void);
+gid_t getresgid (void);
+pid_t gettid (void);
+int getgroups (int, gid_t *);
+pid_t getpgid (pid_t);
+pid_t getppid (void);
+pid_t setsid (void);
+int setgid (gid_t);
+int seteuid (uid_t);
+int setreuid (uid_t, uid_t);
+int setresuid (uid_t, uid_t, uid_t);
+int setresgid (gid_t, gid_t, gid_t);
+void* __brk (void*);
+int kill (pid_t, int);
+int tkill (pid_t tid, int sig);
+int __ptrace (int request, int pid, void* addr, void* data);
+int __set_thread_area (void* user_desc);
+int __getpriority (int, int);
+int setpriority (int, int, int);
+int setrlimit (int resource, const struct rlimit *rlp);
+int getrlimit (int resource, struct rlimit *rlp);
+int getrusage (int who, struct rusage* r_usage);
+int setgroups (int, const gid_t *);
+pid_t getpgrp (void);
+int setpgid (pid_t, pid_t);
+pid_t vfork (void);
+int setregid (gid_t, gid_t);
+int chroot (const char *);
+int prctl (int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5);
+int capget (cap_user_header_t header, cap_user_data_t data);
+int capset (cap_user_header_t header, const cap_user_data_t data);
+int acct (const char* filepath);
+ssize_t read (int, void*, size_t);
+ssize_t write (int, const void*, size_t);
+ssize_t __pread64 (int, void *, size_t, off_t, off_t);
+ssize_t __pwrite64 (int, void *, size_t, off_t, off_t);
+int __open (const char*, int, mode_t);
+int __openat (int, const char*, int, mode_t);
+int close (int);
+int creat (const char*, mode_t);
+off_t lseek (int, off_t, int);
+int __llseek (int, unsigned long, unsigned long, loff_t*, int);
+pid_t getpid (void);
+void * mmap (void *, size_t, int, int, int, long);
+void * __mmap2 (void*, size_t, int, int, int, long);
+int munmap (void *, size_t);
+void * mremap (void *, size_t, size_t, unsigned long);
+int msync (const void *, size_t, int);
+int mprotect (const void *, size_t, int);
+int madvise (const void *, size_t, int);
+int mlock (const void *addr, size_t len);
+int munlock (const void *addr, size_t len);
+int mincore (void* start, size_t length, unsigned char* vec);
+int __ioctl (int, int, void *);
+int readv (int, const struct iovec *, int);
+int writev (int, const struct iovec *, int);
+int __fcntl (int, int, void*);
+int flock (int, int);
+int fchmod (int, mode_t);
+int dup (int);
+int pipe (int *);
+int dup2 (int, int);
+int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
+int ftruncate (int, off_t);
+int getdents (unsigned int, struct dirent *, unsigned int);
+int fsync (int);
+int fchown (int, uid_t, gid_t);
+void sync (void);
+int __fcntl64 (int, int, void *);
+int fstatfs (int, size_t, struct statfs *);
+ssize_t sendfile (int out_fd, int in_fd, off_t *offset, size_t count);
+int fstatat (int dirfd, const char *path, struct stat *buf, int flags);
+int mkdirat (int dirfd, const char *pathname, mode_t mode);
+int fchownat (int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+int fchmodat (int dirfd, const char *path, mode_t mode, int flags);
+int renameat (int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+int link (const char*, const char*);
+int unlink (const char*);
+int unlinkat (int, const char *, int);
+int chdir (const char*);
+int mknod (const char*, mode_t, dev_t);
+int chmod (const char*,mode_t);
+int chown (const char *, uid_t, gid_t);
+int lchown (const char*, uid_t, gid_t);
+int mount (const char*, const char*, const char*, unsigned long, const void*);
+int umount (const char*);
+int umount2 (const char*, int);
+int fstat (int, struct stat*);
+int stat (const char *, struct stat *);
+int lstat (const char *, struct stat *);
+int mkdir (const char *, mode_t);
+int readlink (const char *, char *, size_t);
+int rmdir (const char *);
+int rename (const char *, const char *);
+int __getcwd (char * buf, size_t size);
+int access (const char *, int);
+int symlink (const char *, const char *);
+int fchdir (int);
+int truncate (const char*, off_t);
+int __statfs64 (const char *, size_t, struct statfs *);
+int pause (void);
+int gettimeofday (struct timeval*, struct timezone*);
+int settimeofday (const struct timeval*, const struct timezone*);
+clock_t times (struct tms *);
+int nanosleep (const struct timespec *, struct timespec *);
+int clock_gettime (clockid_t clk_id, struct timespec *tp);
+int clock_settime (clockid_t clk_id, const struct timespec *tp);
+int clock_getres (clockid_t clk_id, struct timespec *res);
+int clock_nanosleep (const struct timespec *req, struct timespec *rem);
+int getitimer (int, const struct itimerval *);
+int setitimer (int, const struct itimerval *, struct itimerval *);
+int __timer_create (clockid_t clockid, struct sigevent *evp, timer_t *timerid);
+int __timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*);
+int __timer_gettime (timer_t, struct itimerspec*);
+int __timer_getoverrun (timer_t);
+int __timer_delete (timer_t);
+int utimes (const char*, const struct timeval tvp[2]);
+int sigaction (int, const struct sigaction *, struct sigaction *);
+int sigprocmask (int, const sigset_t *, sigset_t *);
+int __sigsuspend (int unused1, int unused2, unsigned mask);
+int __rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize);
+int __rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize);
+int __rt_sigtimedwait (const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size);
+int sigpending (sigset_t *);
+int socket (int, int, int);
+int socketpair (int, int, int, int*);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int socket (int, int, int);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int socketpair (int, int, int, int*);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param);
+int sched_getscheduler (pid_t pid);
+int sched_yield (void);
+int sched_setparam (pid_t pid, const struct sched_param *param);
+int sched_getparam (pid_t pid, struct sched_param *param);
+int sched_get_priority_max (int policy);
+int sched_get_priority_min (int policy);
+int sched_rr_get_interval (pid_t pid, struct timespec *interval);
+int uname (struct utsname *);
+pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
+mode_t umask (mode_t);
+int __reboot (int, int, int, void *);
+int __syslog (int, char *, int);
+int init_module (void *, unsigned long, const char *);
+int delete_module (const char*, unsigned int);
+int klogctl (int, char *, int);
+int futex (void *, int, int, void *, void *, int);
+int epoll_create (int size);
+int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait (int epfd, struct epoll_event *events, int max, int timeout);
+int inotify_init (void);
+int inotify_add_watch (int, const char *, unsigned int);
+int inotify_rm_watch (int, unsigned int);
+int poll (struct pollfd *, unsigned int, long);
+int __set_tls (void*);
+int cacheflush (long start, long end, long flags);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BIONIC_LINUX_UNISTD_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/mman.h b/6/platforms/android-3/arch-arm/usr/include/sys/mman.h
new file mode 100644
index 0000000..7a32974
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/mman.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_MMAN_H_
+#define _SYS_MMAN_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <asm/mman.h>
+#include <asm/page.h>
+
+__BEGIN_DECLS
+
+#ifndef MAP_ANON
+#define MAP_ANON MAP_ANONYMOUS
+#endif
+
+#define MAP_FAILED ((void *)-1)
+
+#define MREMAP_MAYMOVE 1
+#define MREMAP_FIXED 2
+
+extern void* mmap(void *, size_t, int, int, int, off_t);
+extern int munmap(void *, size_t);
+extern int msync(const void *, size_t, int);
+extern int mprotect(const void *, size_t, int);
+extern void* mremap(void *, size_t, size_t, unsigned long);
+
+extern int mlockall(int);
+extern int munlockall(void);
+extern int mlock(const void *, size_t);
+extern int munlock(const void *, size_t);
+extern int madvise(const void *, size_t, int);
+
+extern int mlock(const void *addr, size_t len);
+extern int munlock(const void *addr, size_t len);
+
+extern int mincore(void* start, size_t length, unsigned char* vec);
+
+__END_DECLS
+
+#endif /* _SYS_MMAN_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/mount.h b/6/platforms/android-3/arch-arm/usr/include/sys/mount.h
new file mode 100644
index 0000000..ba88447
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/mount.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_MOUNT_H
+#define _SYS_MOUNT_H
+
+#include <sys/cdefs.h>
+#include <sys/ioctl.h>
+
+__BEGIN_DECLS
+
+/*
+ * These are the fs-independent mount-flags: up to 32 flags are supported
+ */
+#define MS_RDONLY 1 /* Mount read-only */
+#define MS_NOSUID 2 /* Ignore suid and sgid bits */
+#define MS_NODEV 4 /* Disallow access to device special files */
+#define MS_NOEXEC 8 /* Disallow program execution */
+#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
+#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
+#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
+#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
+#define MS_NOATIME 1024 /* Do not update access times. */
+#define MS_NODIRATIME 2048 /* Do not update directory access times */
+#define MS_BIND 4096
+#define MS_MOVE 8192
+#define MS_REC 16384
+#define MS_VERBOSE 32768
+#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
+#define MS_ONE_SECOND (1<<17) /* fs has 1 sec a/m/ctime resolution */
+#define MS_ACTIVE (1<<30)
+#define MS_NOUSER (1<<31)
+
+/*
+ * Superblock flags that can be altered by MS_REMOUNT
+ */
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME|MS_NODIRATIME)
+
+/*
+ * Old magic mount flag and mask
+ */
+#define MS_MGC_VAL 0xC0ED0000
+#define MS_MGC_MSK 0xffff0000
+
+/*
+ * umount2() flags
+ */
+#define MNT_FORCE 1 /* Forcibly unmount */
+#define MNT_DETACH 2 /* Detach from tree only */
+#define MNT_EXPIRE 4 /* Mark for expiry */
+
+/*
+ * Block device ioctls
+ */
+#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
+#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
+#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
+#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
+#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
+#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
+#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
+
+/*
+ * Prototypes
+ */
+extern int mount(const char *, const char *,
+ const char *, unsigned long,
+ const void *);
+extern int umount(const char *);
+extern int umount2(const char *, int);
+
+#if 0 /* MISSING FROM BIONIC */
+extern int pivot_root(const char *, const char *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_MOUNT_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/param.h b/6/platforms/android-3/arch-arm/usr/include/sys/param.h
new file mode 100644
index 0000000..3a815cb
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/param.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PARAM_H_
+#define _SYS_PARAM_H_
+
+#include <limits.h>
+#include <linux/param.h>
+
+#define MAXPATHLEN PATH_MAX
+#define MAXSYMLINKS 8
+
+#define ALIGNBYTES 3
+#define ALIGN(p) (((unsigned int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+
+#endif /* _SYS_PARAM_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/poll.h b/6/platforms/android-3/arch-arm/usr/include/sys/poll.h
new file mode 100644
index 0000000..779ec77
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/poll.h
@@ -0,0 +1 @@
+#include <poll.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/prctl.h b/6/platforms/android-3/arch-arm/usr/include/sys/prctl.h
new file mode 100644
index 0000000..ce85bf7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/prctl.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PRCTL_H
+#define _SYS_PRCTL_H
+
+#include <linux/prctl.h>
+
+__BEGIN_DECLS
+
+extern int prctl(int option, unsigned long arg2, unsigned long arg3 , unsigned
+ long arg4, unsigned long arg5);
+
+__END_DECLS
+
+#endif /* _SYS_PRCTL_H */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ptrace.h b/6/platforms/android-3/arch-arm/usr/include/sys/ptrace.h
new file mode 100644
index 0000000..848416b
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ptrace.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PTRACE_H_
+#define _SYS_PTRACE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+/* For all of the defines */
+#include <linux/ptrace.h>
+
+__BEGIN_DECLS
+
+#define PTRACE_POKEUSER PTRACE_POKEUSR
+#define PTRACE_PEEKUSER PTRACE_PEEKUSR
+
+extern long ptrace(int request, pid_t pid, void *addr, void *data);
+
+__END_DECLS
+
+#endif /* _SYS_PTRACE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/queue.h b/6/platforms/android-3/arch-arm/usr/include/sys/queue.h
new file mode 100644
index 0000000..b0e6b38
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/queue.h
@@ -0,0 +1,557 @@
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list. Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction. Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ (head)->lh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_FOREACH(var, head, field) \
+ for ((var) = ((head)->lh_first); \
+ (var); \
+ (var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) do { \
+ (head)->slh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE(head, elm, type, field) do { \
+ if ((head)->slh_first == (elm)) { \
+ SLIST_REMOVE_HEAD((head), field); \
+ } \
+ else { \
+ struct type *curelm = (head)->slh_first; \
+ while(curelm->field.sle_next != (elm)) \
+ curelm = curelm->field.sle_next; \
+ curelm->field.sle_next = \
+ curelm->field.sle_next->field.sle_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define STAILQ_HEAD(name, type) \
+struct name { \
+ struct type *stqh_first; /* first element */ \
+ struct type **stqh_last; /* addr of last next element */ \
+}
+
+#define STAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).stqh_first }
+
+#define STAILQ_ENTRY(type) \
+struct { \
+ struct type *stqe_next; /* next element */ \
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define STAILQ_INIT(head) do { \
+ (head)->stqh_first = NULL; \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (head)->stqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.stqe_next = NULL; \
+ *(head)->stqh_last = (elm); \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (listelm)->field.stqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->stqh_first == (elm)) { \
+ STAILQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->stqh_first; \
+ while (curelm->field.stqe_next != (elm)) \
+ curelm = curelm->field.stqe_next; \
+ if ((curelm->field.stqe_next = \
+ curelm->field.stqe_next->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(curelm)->field.stqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->stqh_first); \
+ (var); \
+ (var) = ((var)->field.stqe_next))
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
+#define STAILQ_FIRST(head) ((head)->stqh_first)
+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->sqh_first == (elm)) { \
+ SIMPLEQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->sqh_first; \
+ while (curelm->field.sqe_next != (elm)) \
+ curelm = curelm->field.sqe_next; \
+ if ((curelm->field.sqe_next = \
+ curelm->field.sqe_next->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(curelm)->field.sqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define _TAILQ_HEAD(name, type, qual) \
+struct name { \
+ qual type *tqh_first; /* first element */ \
+ qual type *qual *tqh_last; /* addr of last next element */ \
+}
+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define _TAILQ_ENTRY(type, qual) \
+struct { \
+ qual type *tqe_next; /* next element */ \
+ qual type *qual *tqe_prev; /* address of previous next element */\
+}
+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->tqh_first); \
+ (var); \
+ (var) = ((var)->field.tqe_next))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var); \
+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+/*
+ * Tail queue access methods.
+ */
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = (void *)(head); \
+ (head)->cqh_last = (void *)(head); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = (void *)(head); \
+ if ((head)->cqh_last == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = (void *)(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/reboot.h b/6/platforms/android-3/arch-arm/usr/include/sys/reboot.h
new file mode 100644
index 0000000..df81139
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/reboot.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_REBOOT_H_
+#define _SYS_REBOOT_H_
+
+#include <sys/cdefs.h>
+#include <linux/reboot.h>
+
+__BEGIN_DECLS
+
+/* use glibc names as well */
+
+#define RB_AUTOBOOT LINUX_REBOOT_CMD_RESTART
+#define RB_HALT_SYSTEM LINUX_REBOOT_CMD_HALT
+#define RB_ENABLE_CAD LINUX_REBOOT_CMD_CAD_ON
+#define RB_DISABLE_CAD LINUX_REBOOT_CMD_CAD_OFF
+#define RB_POWER_OFF LINUX_REBOOT_CMD_POWER_OFF
+
+extern int reboot(int reboot_type);
+extern int __reboot(int, int, int, void *);
+
+__END_DECLS
+
+#endif /* _SYS_REBOOT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/resource.h b/6/platforms/android-3/arch-arm/usr/include/sys/resource.h
new file mode 100644
index 0000000..ef325c7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/resource.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h> /* MUST be included before linux/resource.h */
+
+/* TRICK AHEAD: <linux/resource.h> defines a getrusage function with
+ * a non-standard signature. this is surprising because the
+ * syscall seems to use the standard one instead.
+ * once again, creative macro usage saves the days
+ */
+#define getrusage __kernel_getrusage
+#include <linux/resource.h>
+#undef getrusage
+
+typedef unsigned long rlim_t;
+
+__BEGIN_DECLS
+
+extern int getpriority(int, int);
+extern int setpriority(int, int, int);
+extern int getrlimit(int resource, struct rlimit *rlp);
+extern int setrlimit(int resource, const struct rlimit *rlp);
+extern int getrusage(int who, struct rusage* r_usage);
+
+__END_DECLS
+
+#endif /* _SYS_RESOURCE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/select.h b/6/platforms/android-3/arch-arm/usr/include/sys/select.h
new file mode 100644
index 0000000..9d11ee8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/select.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SELECT_H_
+#define _SYS_SELECT_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <signal.h>
+
+__BEGIN_DECLS
+
+typedef __kernel_fd_set fd_set;
+
+extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+extern int pselect(int n, fd_set *readfds, fd_set *writefds, fd_set *errfds,
+ const struct timespec *timeout, const sigset_t *sigmask);
+
+__END_DECLS
+
+#endif /* _SYS_SELECT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/sendfile.h b/6/platforms/android-3/arch-arm/usr/include/sys/sendfile.h
new file mode 100644
index 0000000..d5aba26
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/sendfile.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SENDFILE_H_
+#define _SYS_SENDFILE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+extern ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
+
+__END_DECLS
+
+#endif /* _SYS_SENDFILE_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/socket.h b/6/platforms/android-3/arch-arm/usr/include/sys/socket.h
new file mode 100644
index 0000000..208663e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/socket.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SOCKET_H_
+#define _SYS_SOCKET_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/socket.h>
+
+__BEGIN_DECLS
+
+#define SOCK_STREAM 1
+#define SOCK_DGRAM 2
+#define SOCK_RAW 3
+#define SOCK_RDM 4
+#define SOCK_SEQPACKET 5
+#define SOCK_PACKET 10
+
+#ifdef __i386__
+# define __socketcall extern __attribute__((__cdecl__))
+#else
+# define __socketcall extern
+#endif
+
+/* BIONIC: second argument to shutdown() */
+enum {
+ SHUT_RD = 0, /* no more receptions */
+#define SHUT_RD SHUT_RD
+ SHUT_WR, /* no more transmissions */
+#define SHUT_WR SHUT_WR
+ SHUT_RDWR /* no more receptions or transmissions */
+#define SHUT_RDWR SHUT_RDWR
+};
+
+
+typedef int socklen_t;
+
+__socketcall int socket(int, int, int);
+__socketcall int bind(int, const struct sockaddr *, int);
+__socketcall int connect(int, const struct sockaddr *, socklen_t);
+__socketcall int listen(int, int);
+__socketcall int accept(int, struct sockaddr *, socklen_t *);
+__socketcall int getsockname(int, struct sockaddr *, socklen_t *);
+__socketcall int getpeername(int, struct sockaddr *, socklen_t *);
+__socketcall int socketpair(int, int, int, int *);
+__socketcall int shutdown(int, int);
+__socketcall int setsockopt(int, int, int, const void *, socklen_t);
+__socketcall int getsockopt(int, int, int, void *, socklen_t *);
+__socketcall int sendmsg(int, const struct msghdr *, unsigned int);
+__socketcall int recvmsg(int, struct msghdr *, unsigned int);
+
+extern ssize_t send(int, const void *, size_t, unsigned int);
+extern ssize_t recv(int, void *, size_t, unsigned int);
+
+__socketcall ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+__socketcall ssize_t recvfrom(int, void *, size_t, unsigned int, const struct sockaddr *, socklen_t *);
+
+#undef __socketcall
+
+__END_DECLS
+
+#endif /* _SYS_SOCKET_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/socketcalls.h b/6/platforms/android-3/arch-arm/usr/include/sys/socketcalls.h
new file mode 100644
index 0000000..c74f463
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/socketcalls.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SOCKETCALLS_H_
+#define _SYS_SOCKETCALLS_H_
+
+/* socketcalls by number */
+
+#define SYS_SOCKET 1 /* sys_socket(2) */
+#define SYS_BIND 2 /* sys_bind(2) */
+#define SYS_CONNECT 3 /* sys_connect(2) */
+#define SYS_LISTEN 4 /* sys_listen(2) */
+#define SYS_ACCEPT 5 /* sys_accept(2) */
+#define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */
+#define SYS_GETPEERNAME 7 /* sys_getpeername(2) */
+#define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */
+#define SYS_SEND 9 /* sys_send(2) */
+#define SYS_RECV 10 /* sys_recv(2) */
+#define SYS_SENDTO 11 /* sys_sendto(2) */
+#define SYS_RECVFROM 12 /* sys_recvfrom(2) */
+#define SYS_SHUTDOWN 13 /* sys_shutdown(2) */
+#define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */
+#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
+#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
+#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
+
+#endif /* _SYS_SOCKETCALLS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/stat.h b/6/platforms/android-3/arch-arm/usr/include/sys/stat.h
new file mode 100644
index 0000000..091ee6d
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/stat.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_STAT_H_
+#define _SYS_STAT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <linux/stat.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+/* really matches stat64 in the kernel, hence the padding
+ * Note: The kernel zero's the padded region because glibc might read them
+ * in the hope that the kernel has stretched to using larger sizes.
+ */
+struct stat {
+ unsigned long long st_dev;
+ unsigned char __pad0[4];
+
+ unsigned long __st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned long long st_rdev;
+ unsigned char __pad3[4];
+
+ long long st_size;
+ unsigned long st_blksize;
+ unsigned long long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+
+ unsigned long long st_ino;
+};
+
+/* For compatibility with GLibc, we provide macro aliases
+ * for the non-Posix nano-seconds accessors.
+ */
+#define st_atimensec st_atime_nsec
+#define st_mtimensec st_mtime_nsec
+#define st_ctimensec st_ctime_nsec
+
+extern int chmod(const char *, mode_t);
+extern int fchmod(int, mode_t);
+extern int mkdir(const char *, mode_t);
+
+extern int stat(const char *, struct stat *);
+extern int fstat(int, struct stat *);
+extern int lstat(const char *, struct stat *);
+extern int mknod(const char *, mode_t, dev_t);
+extern mode_t umask(mode_t);
+
+#define stat64 stat
+#define fstat64 fstat
+#define lstat64 lstat
+
+static __inline__ int mkfifo(const char *__p, mode_t __m)
+{
+ return mknod(__p, (__m & ~S_IFMT) | S_IFIFO, (dev_t)0);
+}
+
+extern int fstatat(int dirfd, const char *path, struct stat *buf, int flags);
+extern int mkdirat(int dirfd, const char *pathname, mode_t mode);
+extern int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+extern int fchmodat(int dirfd, const char *path, mode_t mode, int flags);
+extern int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+
+__END_DECLS
+
+#endif /* _SYS_STAT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/statfs.h b/6/platforms/android-3/arch-arm/usr/include/sys/statfs.h
new file mode 100644
index 0000000..53b3b5e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+#include <sys/vfs.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/syscall.h b/6/platforms/android-3/arch-arm/usr/include/sys/syscall.h
new file mode 100644
index 0000000..7055518
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/syscall.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSCALL_H_
+#define _SYS_SYSCALL_H_
+
+#include <errno.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <asm/unistd.h>
+
+__BEGIN_DECLS
+
+int syscall(int number, ...);
+
+__END_DECLS
+
+#endif /* _SYS_SYSCALL_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/sysconf.h b/6/platforms/android-3/arch-arm/usr/include/sys/sysconf.h
new file mode 100644
index 0000000..2fc1b08
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/sysconf.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSCONF_H_
+#define _SYS_SYSCONF_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* as listed by Posix sysconf() description */
+/* most of these will return -1 and ENOSYS */
+
+#define _SC_ARG_MAX 0x0000
+#define _SC_BC_BASE_MAX 0x0001
+#define _SC_BC_DIM_MAX 0x0002
+#define _SC_BC_SCALE_MAX 0x0003
+#define _SC_BC_STRING_MAX 0x0004
+#define _SC_CHILD_MAX 0x0005
+#define _SC_CLK_TCK 0x0006
+#define _SC_COLL_WEIGHTS_MAX 0x0007
+#define _SC_EXPR_NEST_MAX 0x0008
+#define _SC_LINE_MAX 0x0009
+#define _SC_NGROUPS_MAX 0x000a
+#define _SC_OPEN_MAX 0x000b
+#define _SC_PASS_MAX 0x000c
+#define _SC_2_C_BIND 0x000d
+#define _SC_2_C_DEV 0x000e
+#define _SC_2_C_VERSION 0x000f
+#define _SC_2_CHAR_TERM 0x0010
+#define _SC_2_FORT_DEV 0x0011
+#define _SC_2_FORT_RUN 0x0012
+#define _SC_2_LOCALEDEF 0x0013
+#define _SC_2_SW_DEV 0x0014
+#define _SC_2_UPE 0x0015
+#define _SC_2_VERSION 0x0016
+#define _SC_JOB_CONTROL 0x0017
+#define _SC_SAVED_IDS 0x0018
+#define _SC_VERSION 0x0019
+#define _SC_RE_DUP_MAX 0x001a
+#define _SC_STREAM_MAX 0x001b
+#define _SC_TZNAME_MAX 0x001c
+#define _SC_XOPEN_CRYPT 0x001d
+#define _SC_XOPEN_ENH_I18N 0x001e
+#define _SC_XOPEN_SHM 0x001f
+#define _SC_XOPEN_VERSION 0x0020
+#define _SC_XOPEN_XCU_VERSION 0x0021
+#define _SC_XOPEN_REALTIME 0x0022
+#define _SC_XOPEN_REALTIME_THREADS 0x0023
+#define _SC_XOPEN_LEGACY 0x0024
+#define _SC_ATEXIT_MAX 0x0025
+#define _SC_IOV_MAX 0x0026
+#define _SC_PAGESIZE 0x0027
+#define _SC_PAGE_SIZE 0x0028
+#define _SC_XOPEN_UNIX 0x0029
+#define _SC_XBS5_ILP32_OFF32 0x002a
+#define _SC_XBS5_ILP32_OFFBIG 0x002b
+#define _SC_XBS5_LP64_OFF64 0x002c
+#define _SC_XBS5_LPBIG_OFFBIG 0x002d
+#define _SC_AIO_LISTIO_MAX 0x002e
+#define _SC_AIO_MAX 0x002f
+#define _SC_AIO_PRIO_DELTA_MAX 0x0030
+#define _SC_DELAYTIMER_MAX 0x0031
+#define _SC_MQ_OPEN_MAX 0x0032
+#define _SC_MQ_PRIO_MAX 0x0033
+#define _SC_RTSIG_MAX 0x0034
+#define _SC_SEM_NSEMS_MAX 0x0035
+#define _SC_SEM_VALUE_MAX 0x0036
+#define _SC_SIGQUEUE_MAX 0x0037
+#define _SC_TIMER_MAX 0x0038
+#define _SC_ASYNCHRONOUS_IO 0x0039
+#define _SC_FSYNC 0x003a
+#define _SC_MAPPED_FILES 0x003b
+#define _SC_MEMLOCK 0x003c
+#define _SC_MEMLOCK_RANGE 0x003d
+#define _SC_MEMORY_PROTECTION 0x003e
+#define _SC_MESSAGE_PASSING 0x003f
+#define _SC_PRIORITIZED_IO 0x0040
+#define _SC_PRIORITY_SCHEDULING 0x0041
+#define _SC_REALTIME_SIGNALS 0x0042
+#define _SC_SEMAPHORES 0x0043
+#define _SC_SHARED_MEMORY_OBJECTS 0x0044
+#define _SC_SYNCHRONIZED_IO 0x0045
+#define _SC_TIMERS 0x0046
+#define _SC_GETGR_R_SIZE_MAX 0x0047
+#define _SC_GETPW_R_SIZE_MAX 0x0048
+#define _SC_LOGIN_NAME_MAX 0x0049
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS 0x004a
+#define _SC_THREAD_KEYS_MAX 0x004b
+#define _SC_THREAD_STACK_MIN 0x004c
+#define _SC_THREAD_THREADS_MAX 0x004d
+#define _SC_TTY_NAME_MAX 0x004e
+
+#define _SC_THREADS 0x004f
+#define _SC_THREAD_ATTR_STACKADDR 0x0050
+#define _SC_THREAD_ATTR_STACKSIZE 0x0051
+#define _SC_THREAD_PRIORITY_SCHEDULING 0x0052
+#define _SC_THREAD_PRIO_INHERIT 0x0053
+#define _SC_THREAD_PRIO_PROTECT 0x0054
+#define _SC_THREAD_SAFE_FUNCTIONS 0x0055
+
+#define _SC_NPROCESSORS_CONF 0x0060
+#define _SC_NPROCESSORS_ONLN 0x0061
+#define _SC_PHYS_PAGES 0x0062
+#define _SC_AVPHYS_PAGES 0x0063
+
+extern int sysconf (int name);
+
+__END_DECLS
+
+#endif /* _SYS_SYSCONF_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/sysinfo.h b/6/platforms/android-3/arch-arm/usr/include/sys/sysinfo.h
new file mode 100644
index 0000000..d5d1c6e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/sysinfo.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSINFO_H_
+#define _SYS_SYSINFO_H_
+
+#include <sys/cdefs.h>
+#include <linux/kernel.h>
+
+__BEGIN_DECLS
+
+#if 0 /* MISSING FROM BIONIC */
+extern int sysinfo (struct sysinfo *info);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_SYSINFO_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/syslimits.h b/6/platforms/android-3/arch-arm/usr/include/sys/syslimits.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/syslimits.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h b/6/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h
new file mode 100644
index 0000000..6f053a8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSMACROS_H_
+#define _SYS_SYSMACROS_H_
+
+/* some rogue code includes this file directly :-( */
+#ifndef _SYS_TYPES_H_
+# include <sys/types.h>
+#endif
+
+static __inline__ int major(dev_t _dev)
+{
+ return (_dev >> 8) & 0xfff;
+}
+
+static __inline__ int minor(dev_t _dev)
+{
+ return (_dev & 0xff) | ((_dev >> 12) & 0xfff00);
+}
+
+static __inline__ dev_t makedev(int __ma, int __mi)
+{
+ return ((__ma & 0xfff) << 8) | (__mi & 0xff) | ((__mi & 0xfff00) << 12);
+}
+
+#endif /* _SYS_SYSMACROS_H_ */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/system_properties.h b/6/platforms/android-3/arch-arm/usr/include/sys/system_properties.h
new file mode 100644
index 0000000..4fdc944
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/system_properties.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct prop_info prop_info;
+
+#define PROP_NAME_MAX 32
+#define PROP_VALUE_MAX 92
+
+/* Look up a system property by name, copying its value and a
+** \0 terminator to the provided pointer. The total bytes
+** copied will be no greater than PROP_VALUE_MAX. Returns
+** the string length of the value. A property that is not
+** defined is identical to a property with a length 0 value.
+*/
+int __system_property_get(const char *name, char *value);
+
+/* Return a pointer to the system property named name, if it
+** exists, or NULL if there is no such property. Use
+** __system_property_read() to obtain the string value from
+** the returned prop_info pointer.
+**
+** It is safe to cache the prop_info pointer to avoid future
+** lookups. These returned pointers will remain valid for
+** the lifetime of the system.
+*/
+const prop_info *__system_property_find(const char *name);
+
+/* Read the value of a system property. Returns the length
+** of the value. Copies the value and \0 terminator into
+** the provided value pointer. Total length (including
+** terminator) will be no greater that PROP_VALUE_MAX.
+**
+** If name is nonzero, up to PROP_NAME_MAX bytes will be
+** copied into the provided name pointer. The name will
+** be \0 terminated.
+*/
+int __system_property_read(const prop_info *pi, char *name, char *value);
+
+/* Return a prop_info for the nth system property, or NULL if
+** there is no nth property. Use __system_property_read() to
+** read the value of this property.
+**
+** This method is for inspecting and debugging the property
+** system. Please use __system_property_find() instead.
+**
+** Order of results may change from call to call. This is
+** not a bug.
+*/
+const prop_info *__system_property_find_nth(unsigned n);
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/time.h b/6/platforms/android-3/arch-arm/usr/include/sys/time.h
new file mode 100644
index 0000000..1f010d4
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/time.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIME_H_
+#define _SYS_TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/time.h>
+
+__BEGIN_DECLS
+
+extern int gettimeofday(struct timeval *, struct timezone *);
+extern int settimeofday(const struct timeval *, const struct timezone *);
+
+extern int getitimer(int, struct itimerval *);
+extern int setitimer(int, const struct itimerval *, struct itimerval *);
+
+extern int utimes(const char *, const struct timeval *);
+
+#define timerclear(a) \
+ ((a)->tv_sec = (a)->tv_usec = 0)
+
+#define timerisset(a) \
+ ((a)->tv_sec != 0 || (a)->tv_usec != 0)
+
+#define timercmp(a, b, op) \
+ ((a)->tv_sec == (b)->tv_sec \
+ ? (a)->tv_usec op (b)->tv_usec \
+ : (a)->tv_sec op (b)->tv_sec)
+
+#define timeradd(a, b, res) \
+ do { \
+ (res)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
+ (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
+ if ((res)->tv_usec >= 1000000) { \
+ (res)->tv_usec -= 1000000; \
+ (res)->tv_sec += 1; \
+ } \
+ } while (0)
+
+#define timersub(a, b, res) \
+ do { \
+ (res)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (res)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((res)->tv_usec < 0) { \
+ (res)->tv_usec += 1000000; \
+ (res)->tv_sec -= 1; \
+ } \
+ } while (0)
+
+__END_DECLS
+
+#endif /* _SYS_TIME_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/timeb.h b/6/platforms/android-3/arch-arm/usr/include/sys/timeb.h
new file mode 100644
index 0000000..f2cc39c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/timeb.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIMEB_H
+#define _SYS_TIMEB_H
+
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+struct timeb {
+ time_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+};
+
+extern int ftime(struct timeb* timebuf);
+
+__END_DECLS
+
+#endif /* _SYS_TIMEB_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/times.h b/6/platforms/android-3/arch-arm/usr/include/sys/times.h
new file mode 100644
index 0000000..1b9b8b2
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/times.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIMES_H_
+#define _SYS_TIMES_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/times.h>
+
+__BEGIN_DECLS
+
+extern clock_t times(struct tms *);
+
+__END_DECLS
+
+#endif /* _SYS_TIMES_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ttychars.h b/6/platforms/android-3/arch-arm/usr/include/sys/ttychars.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ttychars.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/ttydev.h b/6/platforms/android-3/arch-arm/usr/include/sys/ttydev.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/ttydev.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/types.h b/6/platforms/android-3/arch-arm/usr/include/sys/types.h
new file mode 100644
index 0000000..33fe30e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/types.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TYPES_H_
+#define _SYS_TYPES_H_
+
+#define __need_size_t
+#define __need_ptrdiff_t
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+#include <linux/posix_types.h>
+#include <asm/types.h>
+#include <linux/types.h>
+#include <machine/kernel.h>
+
+typedef __u32 __kernel_dev_t;
+
+/* be careful with __kernel_gid_t and __kernel_uid_t
+ * these are defined as 16-bit for legacy reason, but
+ * the kernel uses 32-bits instead.
+ *
+ * 32-bit valuea are required for Android, so use
+ * __kernel_uid32_t and __kernel_gid32_t
+ */
+
+typedef __kernel_blkcnt_t blkcnt_t;
+typedef __kernel_blksize_t blksize_t;
+typedef __kernel_clock_t clock_t;
+typedef __kernel_clockid_t clockid_t;
+typedef __kernel_dev_t dev_t;
+typedef __kernel_fsblkcnt_t fsblkcnt_t;
+typedef __kernel_fsfilcnt_t fsfilcnt_t;
+typedef __kernel_gid32_t gid_t;
+typedef __kernel_id_t id_t;
+typedef __kernel_ino_t ino_t;
+typedef __kernel_key_t key_t;
+typedef __kernel_mode_t mode_t;
+typedef __kernel_nlink_t nlink_t;
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef __kernel_off_t off_t;
+#endif
+typedef __kernel_loff_t loff_t;
+typedef loff_t off64_t; /* GLibc-specific */
+
+typedef __kernel_pid_t pid_t;
+
+/* while POSIX wants these in <sys/types.h>, we
+ * declare then in <pthread.h> instead */
+#if 0
+typedef .... pthread_attr_t;
+typedef .... pthread_cond_t;
+typedef .... pthread_condattr_t;
+typedef .... pthread_key_t;
+typedef .... pthread_mutex_t;
+typedef .... pthread_once_t;
+typedef .... pthread_rwlock_t;
+typedef .... pthread_rwlock_attr_t;
+typedef .... pthread_t;
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+
+/* size_t is defined by the GCC-specific <stddef.h> */
+#ifndef _SSIZE_T_DEFINED_
+#define _SSIZE_T_DEFINED_
+typedef long int ssize_t;
+#endif
+
+typedef __kernel_suseconds_t suseconds_t;
+typedef __kernel_time_t time_t;
+typedef __kernel_uid32_t uid_t;
+typedef signed long useconds_t;
+
+typedef __kernel_daddr_t daddr_t;
+typedef __kernel_timer_t timer_t;
+typedef __kernel_mqd_t mqd_t;
+
+typedef __kernel_caddr_t caddr_t;
+typedef unsigned int uint_t;
+typedef unsigned int uint;
+
+/* for some applications */
+#include <sys/sysmacros.h>
+
+#ifdef __BSD_VISIBLE
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+typedef uint32_t u_int32_t;
+typedef uint16_t u_int16_t;
+typedef uint8_t u_int8_t;
+typedef uint64_t u_int64_t;
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/uio.h b/6/platforms/android-3/arch-arm/usr/include/sys/uio.h
new file mode 100644
index 0000000..0251716
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/uio.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UIO_H_
+#define _SYS_UIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/uio.h>
+
+__BEGIN_DECLS
+
+int readv(int, const struct iovec *, int);
+int writev(int, const struct iovec *, int);
+
+__END_DECLS
+
+#endif /* _SYS_UIO_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/un.h b/6/platforms/android-3/arch-arm/usr/include/sys/un.h
new file mode 100644
index 0000000..973861f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/un.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UN_H_
+#define _SYS_UN_H_
+
+#include <linux/un.h>
+
+#endif /* _SYS_UN_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/utime.h b/6/platforms/android-3/arch-arm/usr/include/sys/utime.h
new file mode 100644
index 0000000..9f8810e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/utime.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UTIME_H_
+#define _SYS_UTIME_H_
+
+#include <linux/utime.h>
+
+#endif /* _SYS_UTIME_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/utsname.h b/6/platforms/android-3/arch-arm/usr/include/sys/utsname.h
new file mode 100644
index 0000000..d54a994
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/utsname.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UTSNAME_H_
+#define _SYS_UTSNAME_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define SYS_NMLN 65
+
+struct utsname {
+ char sysname [SYS_NMLN];
+ char nodename [SYS_NMLN];
+ char release [SYS_NMLN];
+ char version [SYS_NMLN];
+ char machine [SYS_NMLN];
+ char domainname[SYS_NMLN];
+};
+
+extern int uname(struct utsname *);
+
+__END_DECLS
+
+#endif /* _SYS_UTSNAME_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/vfs.h b/6/platforms/android-3/arch-arm/usr/include/sys/vfs.h
new file mode 100644
index 0000000..4adaf5f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/vfs.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_VFS_H_
+#define _SYS_VFS_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/* note: this corresponds to the kernel's statfs64 type */
+struct statfs {
+ uint32_t f_type;
+ uint32_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ __kernel_fsid_t f_fsid;
+ uint32_t f_namelen;
+ uint32_t f_frsize;
+ uint32_t f_spare[5];
+};
+
+#define ADFS_SUPER_MAGIC 0xadf5
+#define AFFS_SUPER_MAGIC 0xADFF
+#define BEFS_SUPER_MAGIC 0x42465331
+#define BFS_MAGIC 0x1BADFACE
+#define CIFS_MAGIC_NUMBER 0xFF534D42
+#define CODA_SUPER_MAGIC 0x73757245
+#define COH_SUPER_MAGIC 0x012FF7B7
+#define CRAMFS_MAGIC 0x28cd3d45
+#define DEVFS_SUPER_MAGIC 0x1373
+#define EFS_SUPER_MAGIC 0x00414A53
+#define EXT_SUPER_MAGIC 0x137D
+#define EXT2_OLD_SUPER_MAGIC 0xEF51
+#define EXT2_SUPER_MAGIC 0xEF53
+#define EXT3_SUPER_MAGIC 0xEF53
+#define HFS_SUPER_MAGIC 0x4244
+#define HPFS_SUPER_MAGIC 0xF995E849
+#define HUGETLBFS_MAGIC 0x958458f6
+#define ISOFS_SUPER_MAGIC 0x9660
+#define JFFS2_SUPER_MAGIC 0x72b6
+#define JFS_SUPER_MAGIC 0x3153464a
+#define MINIX_SUPER_MAGIC 0x137F /* orig. minix */
+#define MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */
+#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */
+#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */
+#define MSDOS_SUPER_MAGIC 0x4d44
+#define NCP_SUPER_MAGIC 0x564c
+#define NFS_SUPER_MAGIC 0x6969
+#define NTFS_SB_MAGIC 0x5346544e
+#define OPENPROM_SUPER_MAGIC 0x9fa1
+#define PROC_SUPER_MAGIC 0x9fa0
+#define QNX4_SUPER_MAGIC 0x002f
+#define REISERFS_SUPER_MAGIC 0x52654973
+#define ROMFS_MAGIC 0x7275
+#define SMB_SUPER_MAGIC 0x517B
+#define SYSV2_SUPER_MAGIC 0x012FF7B6
+#define SYSV4_SUPER_MAGIC 0x012FF7B5
+#define TMPFS_MAGIC 0x01021994
+#define UDF_SUPER_MAGIC 0x15013346
+#define UFS_MAGIC 0x00011954
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+#define VXFS_SUPER_MAGIC 0xa501FCF5
+#define XENIX_SUPER_MAGIC 0x012FF7B4
+#define XFS_SUPER_MAGIC 0x58465342
+#define _XIAFS_SUPER_MAGIC 0x012FD16D
+
+extern int statfs(const char *, struct statfs *);
+extern int fstatfs(int, struct statfs *);
+
+__END_DECLS
+
+#endif /* _SYS_VFS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/vt.h b/6/platforms/android-3/arch-arm/usr/include/sys/vt.h
new file mode 100644
index 0000000..b37a869
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/vt.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/vt.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/sys/wait.h b/6/platforms/android-3/arch-arm/usr/include/sys/wait.h
new file mode 100644
index 0000000..8ba1837
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/sys/wait.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/resource.h>
+#include <linux/wait.h>
+
+__BEGIN_DECLS
+
+#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
+#define WCOREDUMP(s) ((s) & 0x80)
+#define WTERMSIG(s) ((s) & 0x7f)
+#define WSTOPSIG(s) WEXITSTATUS(s)
+
+#define WIFEXITED(s) (WTERMSIG(s) == 0)
+#define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f)
+#define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2)
+
+extern pid_t wait(int *);
+extern pid_t waitpid(pid_t, int *, int);
+extern pid_t wait3(int *, int, struct rusage *);
+extern pid_t wait4(pid_t, int *, int, struct rusage *);
+
+__END_DECLS
+
+#endif /* _SYS_WAIT_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/syslog.h b/6/platforms/android-3/arch-arm/usr/include/syslog.h
new file mode 100644
index 0000000..d35bc79
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/syslog.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYSLOG_H
+#define _SYSLOG_H
+
+#include <stdio.h>
+#include <sys/cdefs.h>
+#include <stdarg.h>
+
+__BEGIN_DECLS
+
+/* Alert levels */
+#define LOG_EMERG 0
+#define LOG_ALERT 1
+#define LOG_CRIT 2
+#define LOG_ERR 3
+#define LOG_WARNING 4
+#define LOG_NOTICE 5
+#define LOG_INFO 6
+#define LOG_DEBUG 7
+
+#define LOG_PRIMASK 7
+#define LOG_PRI(x) ((x) & LOG_PRIMASK)
+
+
+/* Facilities; not actually used */
+#define LOG_KERN 0000
+#define LOG_USER 0010
+#define LOG_MAIL 0020
+#define LOG_DAEMON 0030
+#define LOG_AUTH 0040
+#define LOG_SYSLOG 0050
+#define LOG_LPR 0060
+#define LOG_NEWS 0070
+#define LOG_UUCP 0100
+#define LOG_CRON 0110
+#define LOG_AUTHPRIV 0120
+#define LOG_FTP 0130
+#define LOG_LOCAL0 0200
+#define LOG_LOCAL1 0210
+#define LOG_LOCAL2 0220
+#define LOG_LOCAL3 0230
+#define LOG_LOCAL4 0240
+#define LOG_LOCAL5 0250
+#define LOG_LOCAL6 0260
+#define LOG_LOCAL7 0270
+
+#define LOG_FACMASK 01770
+#define LOG_FAC(x) (((x) >> 3) & (LOG_FACMASK >> 3))
+
+#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
+#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
+
+/* openlog() flags; only LOG_PID and LOG_PERROR supported */
+#define LOG_PID 0x01 /* include pid with message */
+#define LOG_CONS 0x02 /* write to console on logger error */
+#define LOG_ODELAY 0x04 /* delay connection until syslog() */
+#define LOG_NDELAY 0x08 /* open connection immediately */
+#define LOG_NOWAIT 0x10 /* wait for child processes (unused on linux) */
+#define LOG_PERROR 0x20 /* additional logging to stderr */
+
+/* BIONIC: the following definitions are from OpenBSD's sys/syslog.h
+ */
+struct syslog_data {
+ int log_file;
+ int connected;
+ int opened;
+ int log_stat;
+ const char *log_tag;
+ int log_fac;
+ int log_mask;
+};
+
+#define SYSLOG_DATA_INIT {-1, 0, 0, 0, (const char *)0, LOG_USER, 0xff}
+
+#define _PATH_LOG "/dev/kmsg"
+
+extern void closelog(void);
+extern void openlog(const char *, int, int);
+extern int setlogmask(int);
+extern void syslog(int, const char *, ...);
+extern void vsyslog(int, const char *, va_list);
+extern void closelog_r(struct syslog_data *);
+extern void openlog_r(const char *, int, int, struct syslog_data *);
+extern int setlogmask_r(int, struct syslog_data *);
+extern void syslog_r(int, struct syslog_data *, const char *, ...);
+extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
+
+__END_DECLS
+
+#endif /* _SYSLOG_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/termio.h b/6/platforms/android-3/arch-arm/usr/include/termio.h
new file mode 100644
index 0000000..99d3630
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/termio.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* All definitions related to termio are in Linux kernel headers
+ * that are already included by <termios.h>
+ */
+#include <termios.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/termios.h b/6/platforms/android-3/arch-arm/usr/include/termios.h
new file mode 100644
index 0000000..ad19089
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/termios.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TERMIOS_H_
+#define _TERMIOS_H_
+
+#include <sys/cdefs.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <stdint.h>
+#include <linux/termios.h>
+
+__BEGIN_DECLS
+
+/* Redefine these to match their ioctl number */
+#undef TCSANOW
+#define TCSANOW TCSETS
+
+#undef TCSADRAIN
+#define TCSADRAIN TCSETSW
+
+#undef TCSAFLUSH
+#define TCSAFLUSH TCSETSF
+
+static __inline__ int tcgetattr(int fd, struct termios *s)
+{
+ return ioctl(fd, TCGETS, s);
+}
+
+static __inline__ int tcsetattr(int fd, int __opt, const struct termios *s)
+{
+ return ioctl(fd, __opt, (void *)s);
+}
+
+static __inline__ int tcflow(int fd, int action)
+{
+ return ioctl(fd, TCXONC, (void *)(intptr_t)action);
+}
+
+static __inline__ int tcflush(int fd, int __queue)
+{
+ return ioctl(fd, TCFLSH, (void *)(intptr_t)__queue);
+}
+
+static __inline__ pid_t tcgetsid(int fd)
+{
+ pid_t _pid;
+ return ioctl(fd, TIOCGSID, &_pid) ? (pid_t)-1 : _pid;
+}
+
+static __inline__ int tcsendbreak(int fd, int __duration)
+{
+ return ioctl(fd, TCSBRKP, (void *)(uintptr_t)__duration);
+}
+
+static __inline__ speed_t cfgetospeed(const struct termios *s)
+{
+ return (speed_t)(s->c_cflag & CBAUD);
+}
+
+static __inline__ int cfsetospeed(struct termios *s, speed_t speed)
+{
+ s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD);
+ return 0;
+}
+
+static __inline__ speed_t cfgetispeed(const struct termios *s)
+{
+ return (speed_t)(s->c_cflag & CBAUD);
+}
+
+static __inline__ int cfsetispeed(struct termios *s, speed_t speed)
+{
+ s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD);
+ return 0;
+}
+
+static __inline__ void cfmakeraw(struct termios *s)
+{
+ s->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+ s->c_oflag &= ~OPOST;
+ s->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ s->c_cflag &= ~(CSIZE|PARENB);
+ s->c_cflag |= CS8;
+}
+
+__END_DECLS
+
+#endif /* _TERMIOS_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/thread_db.h b/6/platforms/android-3/arch-arm/usr/include/thread_db.h
new file mode 100644
index 0000000..9c76d40
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/thread_db.h
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ */
+
+#ifndef _LIBTHREAD_DB__THREAD_DB_H
+#define _LIBTHREAD_DB__THREAD_DB_H
+
+#include <pthread.h>
+#include <signal.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+
+#define TD_THR_ANY_USER_FLAGS 0xffffffff
+#define TD_THR_LOWEST_PRIORITY -20
+#define TD_SIGNO_MASK NULL
+
+/* td_err_e values */
+enum {
+ TD_OK,
+ TD_ERR,
+ TD_NOTHR,
+ TD_NOSV,
+ TD_NOLWP,
+ TD_BADPH,
+ TD_BADTH,
+ TD_BADSH,
+ TD_BADTA,
+ TD_BADKEY,
+ TD_NOMSG,
+ TD_NOFPREGS,
+ TD_NOLIBTHREAD,
+ TD_NOEVENT,
+ TD_NOCAPAB,
+ TD_DBERR,
+ TD_NOAPLIC,
+ TD_NOTSD,
+ TD_MALLOC,
+ TD_PARTIALREG,
+ TD_NOXREGS,
+ TD_VERSION
+};
+
+/*
+ * td_event_e values
+ * NOTE: There is a max of 32 events
+ */
+enum {
+ TD_CREATE,
+ TD_DEATH
+};
+
+/* td_thr_state_e values */
+enum {
+ TD_THR_ANY_STATE,
+ TD_THR_UNKNOWN,
+ TD_THR_SLEEP,
+ TD_THR_ZOMBIE
+};
+
+typedef int32_t td_err_e;
+typedef uint32_t td_event_e;
+typedef uint32_t td_notify_e;
+typedef uint32_t td_thr_state_e;
+typedef pthread_t thread_t;
+
+typedef struct
+{
+ pid_t pid;
+} td_thragent_t;
+
+typedef struct
+{
+ pid_t pid;
+ pid_t tid;
+} td_thrhandle_t;
+
+typedef struct
+{
+ td_event_e event;
+ td_thrhandle_t const * th_p;
+ union {
+ void * data;
+ } msg;
+} td_event_msg_t;
+
+typedef struct
+{
+ uint32_t events;
+} td_thr_events_t;
+
+typedef struct
+{
+ union {
+ void * bptaddr;
+ } u;
+} td_notify_t;
+
+typedef struct
+{
+ td_thr_state_e ti_state;
+ thread_t ti_tid; // pthread's id for the thread
+ int32_t ti_lid; // the kernel's id for the thread
+} td_thrinfo_t;
+
+
+#define td_event_emptyset(set) \
+ (set)->events = 0
+
+#define td_event_fillset(set) \
+ (set)->events = 0xffffffff
+
+#define td_event_addset(set, n) \
+ (set)->events |= (1 << n)
+
+
+typedef int td_thr_iter_f(td_thrhandle_t const *, void *);
+
+
+struct ps_prochandle;
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+extern td_err_e td_ta_new(struct ps_prochandle const * proc_handle, td_thragent_t ** thread_agent);
+
+extern td_err_e td_ta_set_event(td_thragent_t const * agent, td_thr_events_t * event);
+
+extern td_err_e td_ta_event_addr(td_thragent_t const * agent, td_event_e event, td_notify_t * notify);
+
+extern td_err_e td_ta_event_getmsg(td_thragent_t const * agent, td_event_msg_t * event);
+
+extern td_err_e td_ta_thr_iter(td_thragent_t const * agent, td_thr_iter_f * func, void * cookie,
+ td_thr_state_e state, int32_t prio, sigset_t * sigmask, uint32_t user_flags);
+
+extern char const ** td_symbol_list(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-arm/usr/include/time.h b/6/platforms/android-3/arch-arm/usr/include/time.h
new file mode 100644
index 0000000..b5227d7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/time.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TIME_H_
+#define _TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+extern time_t time(time_t *);
+extern int nanosleep(const struct timespec *, struct timespec *);
+
+extern char *strtotimeval(const char *str, struct timeval *tv);
+
+struct tm {
+ int tm_sec; /* seconds */
+ int tm_min; /* minutes */
+ int tm_hour; /* hours */
+ int tm_mday; /* day of the month */
+ int tm_mon; /* month */
+ int tm_year; /* year */
+ int tm_wday; /* day of the week */
+ int tm_yday; /* day in the year */
+ int tm_isdst; /* daylight saving time */
+
+ long int tm_gmtoff; /* Seconds east of UTC. */
+ const char *tm_zone; /* Timezone abbreviation. */
+
+};
+
+/* defining TM_ZONE indicates that we have a "timezone abbreviation" field in
+ * struct tm, the value should be the field name
+ */
+#define TM_ZONE tm_zone
+
+extern char* asctime(const struct tm* a);
+extern char* asctime_r(const struct tm* a, char* buf);
+
+/* Return the difference between TIME1 and TIME0. */
+extern double difftime (time_t __time1, time_t __time0);
+extern time_t mktime (struct tm *a);
+
+extern struct tm* localtime(const time_t *t);
+extern struct tm* localtime_r(const time_t *timep, struct tm *result);
+
+extern struct tm* gmtime(const time_t *timep);
+extern struct tm* gmtime_r(const time_t *timep, struct tm *result);
+
+extern char* strptime(const char *buf, const char *fmt, struct tm *tm);
+extern size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
+
+extern char *ctime(const time_t *timep);
+extern char *ctime_r(const time_t *timep, char *buf);
+
+extern void tzset(void);
+
+/* global includes */
+extern char* tzname[];
+#if 0 /* MISSING FROM BIONIC */
+extern int daylight;
+extern long int timezone;
+#endif /* MISSING */
+
+#define CLOCKS_PER_SEC 1000000
+
+extern clock_t clock(void);
+
+/* BIONIC: extra linux clock goodies */
+extern int clock_getres(int, struct timespec *);
+extern int clock_gettime(int, struct timespec *);
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+#define CLOCK_REALTIME_HR 4
+#define CLOCK_MONOTONIC_HR 5
+
+extern int timer_create(int, struct sigevent*, timer_t*);
+extern int timer_delete(timer_t);
+extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue);
+extern int timer_gettime(timer_t timerid, struct itimerspec *value);
+extern int timer_getoverrun(timer_t timerid);
+
+__END_DECLS
+
+#endif /* _TIME_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/time64.h b/6/platforms/android-3/arch-arm/usr/include/time64.h
new file mode 100644
index 0000000..7ec05af
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/time64.h
@@ -0,0 +1,59 @@
+/*
+
+Copyright (c) 2007-2008 Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+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
+AUTHORS OR COPYRIGHT HOLDERS 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.
+
+Origin: http://code.google.com/p/y2038
+Modified for Bionic by the Android Open Source Project
+
+*/
+#ifndef TIME64_H
+#define TIME64_H
+
+#include <sys/cdefs.h>
+#include <time.h>
+#include <stdint.h>
+
+__BEGIN_DECLS
+
+typedef int64_t time64_t;
+
+struct tm *gmtime64_r (const time64_t *, struct tm *);
+struct tm *localtime64_r (const time64_t *, struct tm *);
+struct tm *gmtime64 (const time64_t *);
+struct tm *localtime64 (const time64_t *);
+
+char *asctime64 (const struct tm *);
+char *asctime64_r (const struct tm *, char *);
+
+char *ctime64 (const time64_t*);
+char *ctime64_r (const time64_t*, char*);
+
+time64_t timegm64 (const struct tm *);
+time64_t mktime64 (const struct tm *);
+time64_t timelocal64 (const struct tm *);
+
+__END_DECLS
+
+#endif /* TIME64_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/unistd.h b/6/platforms/android-3/arch-arm/usr/include/unistd.h
new file mode 100644
index 0000000..25fc334
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/unistd.h
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern void usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int fdatasync(int);
+extern int getlogin_r(char* name, size_t namesize);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+extern int ttyname_r(int, char*, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/util.h b/6/platforms/android-3/arch-arm/usr/include/util.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/util.h
diff --git a/6/platforms/android-3/arch-arm/usr/include/utime.h b/6/platforms/android-3/arch-arm/usr/include/utime.h
new file mode 100644
index 0000000..fa7cd2f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/utime.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UTIME_H_
+#define _UTIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/utime.h>
+
+__BEGIN_DECLS
+
+extern int utime(const char *, const struct utimbuf *);
+
+__END_DECLS
+
+#endif /* _UTIME_H_ */
+
diff --git a/6/platforms/android-3/arch-arm/usr/include/utmp.h b/6/platforms/android-3/arch-arm/usr/include/utmp.h
new file mode 100644
index 0000000..ffd3c92
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/utmp.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UTMP_H_
+#define _UTMP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <time.h>
+
+#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_WTMP "/var/log/wtmp"
+#define _PATH_LASTLOG "/var/log/lastlog"
+
+#define UT_NAMESIZE 8
+#define UT_LINESIZE 8
+#define UT_HOSTSIZE 16
+
+#define USER_PROCESS 7
+
+struct lastlog
+{
+ time_t ll_time;
+ char ll_line[UT_LINESIZE];
+ char ll_host[UT_HOSTSIZE];
+};
+
+struct exit_status
+{
+ short int e_termination;
+ short int e_exit;
+};
+
+
+struct utmp
+{
+ short int ut_type;
+ pid_t ut_pid;
+ char ut_line[UT_LINESIZE];
+ char ut_id[4];
+ char ut_user[UT_NAMESIZE];
+ char ut_host[UT_HOSTSIZE];
+
+ struct exit_status ut_exit;
+
+ long int ut_session;
+ struct timeval ut_tv;
+
+ int32_t ut_addr_v6[4];
+ char unsed[20];
+};
+
+
+#define ut_name ut_user
+#define ut_time ut_tv.tv_sec
+#define ut_addr ut_addr_v6[0]
+
+__BEGIN_DECLS
+
+int utmpname(const char*);
+void setutent();
+struct utmp* getutent();
+
+__END_DECLS
+
+#endif /* _UTMP_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/wchar.h b/6/platforms/android-3/arch-arm/usr/include/wchar.h
new file mode 100644
index 0000000..e2feb60
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/wchar.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX 255
+#define WCHAR_MIN 0
+#define WEOF (-1)
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-3/arch-arm/usr/include/wctype.h b/6/platforms/android-3/arch-arm/usr/include/wctype.h
new file mode 100644
index 0000000..b5f18a0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/wctype.h
@@ -0,0 +1 @@
+#include <wchar.h>
diff --git a/6/platforms/android-3/arch-arm/usr/include/zconf.h b/6/platforms/android-3/arch-arm/usr/include/zconf.h
new file mode 100644
index 0000000..03a9431
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/zconf.h
@@ -0,0 +1,332 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ */
+#ifdef Z_PREFIX
+# define deflateInit_ z_deflateInit_
+# define deflate z_deflate
+# define deflateEnd z_deflateEnd
+# define inflateInit_ z_inflateInit_
+# define inflate z_inflate
+# define inflateEnd z_inflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateCopy z_deflateCopy
+# define deflateReset z_deflateReset
+# define deflateParams z_deflateParams
+# define deflateBound z_deflateBound
+# define deflatePrime z_deflatePrime
+# define inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateCopy z_inflateCopy
+# define inflateReset z_inflateReset
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+# define zError z_zError
+
+# define alloc_func z_alloc_func
+# define free_func z_free_func
+# define in_func z_in_func
+# define out_func z_out_func
+# define Byte z_Byte
+# define uInt z_uInt
+# define uLong z_uLong
+# define Bytef z_Bytef
+# define charf z_charf
+# define intf z_intf
+# define uIntf z_uIntf
+# define uLongf z_uLongf
+# define voidpf z_voidpf
+# define voidp z_voidp
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+# ifdef FAR
+# undef FAR
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/6/platforms/android-3/arch-arm/usr/include/zlib.h b/6/platforms/android-3/arch-arm/usr/include/zlib.h
new file mode 100644
index 0000000..0228179
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/include/zlib.h
@@ -0,0 +1,1357 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has
+ dropped to zero. It must update next_out and avail_out when avail_out
+ has dropped to zero. The application must initialize zalloc, zfree and
+ opaque before calling the init function. All other fields are set by the
+ compression library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this
+ if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
+ pointers returned by zalloc for objects of exactly 65536 bytes *must*
+ have their offset normalized to zero. The default allocation function
+ provided by this library ensures this (see zutil.c). To reduce memory
+ requirements and avoid any allocation of 64K objects, at the expense of
+ compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or
+ progress reports. After compression, total_in holds the total size of
+ the uncompressed data and may be saved for use in the decompressor
+ (particularly if the decompressor wants to decompress everything in
+ a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+ This check is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller.
+ If zalloc and zfree are set to Z_NULL, deflateInit updates them to
+ use default allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at
+ all (the input data is simply copied a block at a time).
+ Z_DEFAULT_COMPRESSION requests a default compromise between speed and
+ compression (currently equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION).
+ msg is set to null if there is no error message. deflateInit does not
+ perform any compression: this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+ output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications).
+ Some output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating avail_in or avail_out accordingly; avail_out
+ should never be zero before the call. The application can consume the
+ compressed output when it wants, for example when the output buffer is full
+ (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
+ and with zero avail_out, it must be called again after making room in the
+ output buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumualte before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In particular
+ avail_in is zero after the call if enough output space has been provided
+ before the call.) Flushing may degrade compression for some compression
+ algorithms and so it should be used only when necessary.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there
+ was enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the
+ stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least
+ the value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect
+ the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case,
+ msg may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
+ value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller. msg is set to null if there is no error
+ message. inflateInit does not perform any decompression apart from reading
+ the zlib header if present: this will be done by inflate(). (So next_in and
+ avail_in may be modified, but next_out and avail_out are unchanged.)
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing
+ will resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there
+ is no more input data or no more space in the output buffer (see below
+ about the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating the next_* and avail_* values accordingly.
+ The application can consume the uncompressed output when it wants, for
+ example when the output buffer is full (avail_out == 0), or after each
+ call of inflate(). If inflate returns Z_OK and with zero avail_out, it
+ must be called again after making room in the output buffer because there
+ might be more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
+ Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate() stop
+ if and when it gets to the next deflate block boundary. When decoding the
+ zlib or gzip format, this will cause inflate() to return immediately after
+ the header and before the first block. When doing a raw inflate, inflate()
+ will go ahead and process the first block, and will return when it gets to
+ the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64
+ if inflate() is currently decoding the last block in the deflate stream,
+ plus 128 if inflate() returned immediately after decoding an end-of-block
+ code or decoding the complete header up to just before the first byte of the
+ deflate stream. The end-of-block will not be indicated until all of the
+ uncompressed data from that block has been written to strm->next_out. The
+ number of unused bits may in general be greater than seven, except when
+ bit 7 of data_type is set, in which case the number of unused bits will be
+ less than eight.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step
+ (a single call of inflate), the parameter flush should be set to
+ Z_FINISH. In this case all pending input is processed and all pending
+ output is flushed; avail_out must be large enough to hold all the
+ uncompressed data. (The size of the uncompressed data may have been saved
+ by the compressor for this purpose.) The next operation on this stream must
+ be inflateEnd to deallocate the decompression state. The use of Z_FINISH
+ is never required, but can be used to inform inflate that a faster approach
+ may be used for the single inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() will decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically. Any information
+ contained in the gzip header is not retained, so applications that need that
+ information should instead use raw inflate, see inflateInit2() below, or
+ inflateBack() and perform their own processing of the gzip header and
+ trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may then
+ call inflateSync() to look for a good compression block if a partial recovery
+ of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by
+ the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero),
+ no header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but
+ is slow and reduces compression ratio; memLevel=9 uses maximum memory
+ for optimal speed. The default value is 8. See zconf.h for total memory
+ usage as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
+ Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
+ parameter only affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately. Z_FIXED prevents the
+ use of dynamic Huffman codes, allowing for a simpler decoder for special
+ applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
+ method). msg is set to null if there is no error message. deflateInit2 does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any
+ call of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size in
+ deflate or deflate2. Thus the strings most likely to be useful should be
+ put at the end of the dictionary, not at the front. In addition, the
+ current implementation of deflate will use at most the window size minus
+ 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and
+ can consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+ The stream will keep the same compression level and any other attributes
+ that may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different
+ strategy. If the compression level is changed, the input available so far
+ is compressed with the old level (and may be flushed); the new level will
+ take effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to
+ be compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
+ if strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit()
+ or deflateInit2(). This would be used to allocate an output buffer
+ for deflation in a single pass, and so would be called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the
+ bits leftover from a previous deflate stream when appending to it. As such,
+ this function can only be used for raw deflate, and must be used before the
+ first deflate() call after a deflateInit2() or deflateReset(). bits must be
+ less than or equal to 16, and that many of the least significant bits of
+ value will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
+ a crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
+ is set to null if there is no error message. inflateInit2 does not perform
+ any decompression apart from reading the zlib header if present: this will
+ be done by inflate(). (So next_in and avail_in may be modified, but next_out
+ and avail_out are unchanged.)
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been found,
+ or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
+ case, the application may save the current current value of total_in which
+ indicates where valid compressed data was found. In the error case, the
+ application may repeatedly call inflateSync, providing more input each time,
+ until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+ The stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK can be used to
+ force inflate() to return immediately after header processing is complete
+ and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When
+ any of extra, name, or comment are not Z_NULL and the respective field is
+ not present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not
+ be allocated, or Z_VERSION_ERROR if the version of the library does not
+ match the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free
+ the allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects
+ only the raw deflate stream to decompress. This is different from the
+ normal behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format
+ error in the deflate stream (in which case strm->msg is set to indicate the
+ nature of the error), or Z_STREAM_ERROR if the stream was not properly
+ initialized. In the case of Z_BUF_ERROR, an input or output error can be
+ distinguished using strm->next_in which will be Z_NULL only if in() returned
+ an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
+ out() returning non-zero. (in() will always be called before out(), so
+ strm->next_in is assured to be defined if out() returns non-zero.) Note
+ that inflateBack() cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the
+ basic stream-oriented functions. To simplify the interface, some
+ default options are assumed (compression level and memory usage,
+ standard memory allocation functions). The source code of these
+ utility functions can easily be modified if you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be at least the value returned
+ by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+ This function can be used to compress a whole file at once if the
+ input file is mmap'ed.
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before
+ a compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be large enough to hold the
+ entire uncompressed data. (The size of the uncompressed data must have
+ been saved previously by the compressor and transmitted to the decompressor
+ by some mechanism outside the scope of this compression library.)
+ Upon exit, destLen is the actual size of the compressed buffer.
+ This function can be used to decompress a whole file at once if the
+ input file is mmap'ed.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+typedef voidp gzFile;
+
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+/*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+ ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
+ Huffman only compression as in "wb1h", or 'R' for run-length encoding
+ as in "wb1R". (See the description of deflateInit2 for more information
+ about the strategy parameter.)
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+ fileno (in the file has been previously opened with fopen).
+ The mode parameter is as in gzopen.
+ The next call of gzclose on the returned gzFile will also close the
+ file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
+ descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
+ gzdopen returns NULL if there was insufficient memory to allocate
+ the (de)compression state.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+ (0 in case of error).
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written (0 in case of error). The number of
+ uncompressed bytes written is limited to 4095. The caller should assure that
+ this limit is not exceeded. If it is exceeded, then gzprintf() will return
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. The string is then terminated with a null
+ character.
+ gzgets returns buf, or Z_NULL in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read again later.
+ Only one character of push-back is allowed. gzungetc() returns the
+ character pushed, or -1 on failure. gzungetc() will fail if a
+ character has been pushed but not read yet, or if c is -1. The pushed
+ character will be discarded if the stream is repositioned with gzseek()
+ or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+ error number (see function gzerror below). gzflush returns Z_OK if
+ the flush parameter is Z_FINISH and all output could be flushed.
+ gzflush should be called only when strictly necessary because it can
+ degrade compression.
+*/
+
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+/*
+ Sets the starting position for the next gzread or gzwrite on the
+ given compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+/*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns 1 if file is being read directly without decompression, otherwise
+ zero.
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+ error occurred in the file system and not in the compression library,
+ errnum is set to Z_ERRNO and the application may consult errno
+ to get the exact error code.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the
+ compression library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+/*
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+ value for the for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+/*
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/6/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
new file mode 100644
index 0000000..f34cba8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o
new file mode 100644
index 0000000..5230178
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_so.o
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/crtbegin_static.o b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_static.o
new file mode 100644
index 0000000..f34cba8
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/crtbegin_static.o
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/crtend_android.o b/6/platforms/android-3/arch-arm/usr/lib/crtend_android.o
new file mode 100644
index 0000000..c57149e
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/crtend_android.o
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/crtend_so.o b/6/platforms/android-3/arch-arm/usr/lib/crtend_so.o
new file mode 100644
index 0000000..c54db97
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/crtend_so.o
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libc.a b/6/platforms/android-3/arch-arm/usr/lib/libc.a
new file mode 100644
index 0000000..1877053
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libc.a
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libc.so b/6/platforms/android-3/arch-arm/usr/lib/libc.so
new file mode 100644
index 0000000..9714e97
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libc.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libdl.so b/6/platforms/android-3/arch-arm/usr/lib/libdl.so
new file mode 100644
index 0000000..e2a589c
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libdl.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/liblog.so b/6/platforms/android-3/arch-arm/usr/lib/liblog.so
new file mode 100644
index 0000000..92bf1a7
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/liblog.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libm.a b/6/platforms/android-3/arch-arm/usr/lib/libm.a
new file mode 100644
index 0000000..3e1ccb0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libm.a
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libm.so b/6/platforms/android-3/arch-arm/usr/lib/libm.so
new file mode 100644
index 0000000..87f4446
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libm.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libstdc++.a b/6/platforms/android-3/arch-arm/usr/lib/libstdc++.a
new file mode 100644
index 0000000..8f495a5
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libstdc++.a
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libstdc++.so b/6/platforms/android-3/arch-arm/usr/lib/libstdc++.so
new file mode 100644
index 0000000..d3d103f
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libstdc++.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libthread_db.a b/6/platforms/android-3/arch-arm/usr/lib/libthread_db.a
new file mode 100644
index 0000000..9d634be
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libthread_db.a
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libthread_db.so b/6/platforms/android-3/arch-arm/usr/lib/libthread_db.so
new file mode 100644
index 0000000..ea603f0
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libthread_db.so
Binary files differ
diff --git a/6/platforms/android-3/arch-arm/usr/lib/libz.so b/6/platforms/android-3/arch-arm/usr/lib/libz.so
new file mode 100644
index 0000000..f50a0ff
--- /dev/null
+++ b/6/platforms/android-3/arch-arm/usr/lib/libz.so
Binary files differ
diff --git a/6/platforms/android-3/arch-x86/usr/include/alloca.h b/6/platforms/android-3/arch-x86/usr/include/alloca.h
new file mode 100644
index 0000000..0c50fc3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/alloca.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ALLOCA_H
+#define _ALLOCA_H
+
+#define alloca(size) __builtin_alloca(size)
+
+#endif /* _ALLOCA_H */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/android/api-level.h b/6/platforms/android-3/arch-x86/usr/include/android/api-level.h
new file mode 100644
index 0000000..2ff8ed4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 3
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/android/log.h b/6/platforms/android-3/arch-x86/usr/include/android/log.h
new file mode 100644
index 0000000..0ea4c29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/android/log.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_LOG_H
+#define _ANDROID_LOG_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit) since
+ * platform release 1.5
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Support routines to send messages to the Android in-kernel log buffer,
+ * which can later be accessed through the 'logcat' utility.
+ *
+ * Each log message must have
+ * - a priority
+ * - a log tag
+ * - some text
+ *
+ * The tag normally corresponds to the component that emits the log message,
+ * and should be reasonably small.
+ *
+ * Log message text may be truncated to less than an implementation-specific
+ * limit (e.g. 1023 characters max).
+ *
+ * Note that a newline character ("\n") will be appended automatically to your
+ * log message, if not already there. It is not possible to send several messages
+ * and have them appear on a single line in logcat.
+ *
+ * PLEASE USE LOGS WITH MODERATION:
+ *
+ * - Sending log messages eats CPU and slow down your application and the
+ * system.
+ *
+ * - The circular log buffer is pretty small (<64KB), sending many messages
+ * might push off other important log messages from the rest of the system.
+ *
+ * - In release builds, only send log messages to account for exceptional
+ * conditions.
+ *
+ * NOTE: These functions MUST be implemented by /system/lib/liblog.so
+ */
+
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Android log priority values, in ascending priority order.
+ */
+typedef enum android_LogPriority {
+ ANDROID_LOG_UNKNOWN = 0,
+ ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */
+ ANDROID_LOG_VERBOSE,
+ ANDROID_LOG_DEBUG,
+ ANDROID_LOG_INFO,
+ ANDROID_LOG_WARN,
+ ANDROID_LOG_ERROR,
+ ANDROID_LOG_FATAL,
+ ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
+} android_LogPriority;
+
+/*
+ * Send a simple string to the log.
+ */
+int __android_log_write(int prio, const char *tag, const char *text);
+
+/*
+ * Send a formatted string to the log, used like printf(fmt,...)
+ */
+int __android_log_print(int prio, const char *tag, const char *fmt, ...)
+#if defined(__GNUC__)
+ __attribute__ ((format(printf, 3, 4)))
+#endif
+ ;
+
+/*
+ * A variant of __android_log_print() that takes a va_list to list
+ * additional parameters.
+ */
+int __android_log_vprint(int prio, const char *tag,
+ const char *fmt, va_list ap);
+
+/*
+ * Log an assertion failure and SIGTRAP the process to have a chance
+ * to inspect it, if a debugger is attached. This uses the FATAL priority.
+ */
+void __android_log_assert(const char *cond, const char *tag,
+ const char *fmt, ...)
+#if defined(__GNUC__)
+ __attribute__ ((noreturn))
+ __attribute__ ((format(printf, 3, 4)))
+#endif
+ ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ANDROID_LOG_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/arpa/inet.h b/6/platforms/android-3/arch-x86/usr/include/arpa/inet.h
new file mode 100644
index 0000000..e78e7c5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/arpa/inet.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ARPA_INET_H_
+#define _ARPA_INET_H_
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+__BEGIN_DECLS
+
+typedef uint32_t in_addr_t;
+
+extern uint32_t inet_addr(const char *);
+
+extern int inet_aton(const char *, struct in_addr *);
+extern char* inet_ntoa(struct in_addr);
+
+extern int inet_pton(int, const char *, void *);
+extern const char* inet_ntop(int, const void *, char *, size_t);
+
+extern unsigned int inet_nsap_addr(const char *, unsigned char *, int);
+extern char* inet_nsap_ntoa(int, const unsigned char *, char *);
+
+__END_DECLS
+
+#endif /* _ARPA_INET_H_ */
+
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/arpa/nameser.h b/6/platforms/android-3/arch-x86/usr/include/arpa/nameser.h
new file mode 100644
index 0000000..028eadc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/arpa/nameser.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _arpa_nameser_h
+#define _arpa_nameser_h
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+/* this header intentionally blank
+ *
+ * the definitions normally found in <arpa/nameser.h> are
+ * really a bunch of resolver's internal declarations that
+ * should not be exposed to client code in any way
+ */
+
+#endif /* _arpa_nameser_h */
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/4level-fixup.h
new file mode 100644
index 0000000..91ae7f4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _4LEVEL_FIXUP_H
+#define _4LEVEL_FIXUP_H
+
+#define __ARCH_HAS_4LEVEL_HACK
+#define __PAGETABLE_PUD_FOLDED
+
+#define PUD_SIZE PGDIR_SIZE
+#define PUD_MASK PGDIR_MASK
+#define PTRS_PER_PUD 1
+
+#define pud_t pgd_t
+
+#define pmd_alloc(mm, pud, address) ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? NULL: pmd_offset(pud, address))
+
+#define pud_alloc(mm, pgd, address) (pgd)
+#define pud_offset(pgd, start) (pgd)
+#define pud_none(pud) 0
+#define pud_bad(pud) 0
+#define pud_present(pud) 1
+#define pud_ERROR(pud) do { } while (0)
+#define pud_clear(pud) pgd_clear(pud)
+
+#undef pud_free_tlb
+#define pud_free_tlb(tlb, x) do { } while (0)
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/audit_dir_write.h
new file mode 100644
index 0000000..1327b59
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1,11 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/__ffs.h
new file mode 100644
index 0000000..3d135bd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS___FFS_H_
+#define _ASM_GENERIC_BITOPS___FFS_H_
+
+#include <asm/types.h>
+
+#if BITS_PER_LONG == 64
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/atomic.h
new file mode 100644
index 0000000..5f53ba9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
+#define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/ffz.h
new file mode 100644
index 0000000..18da271
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FFZ_H_
+#define _ASM_GENERIC_BITOPS_FFZ_H_
+
+#define ffz(x) __ffs(~(x))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/find.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/find.h
new file mode 100644
index 0000000..8361cfe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FIND_H_
+#define _ASM_GENERIC_BITOPS_FIND_H_
+
+#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
+#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls.h
new file mode 100644
index 0000000..8adbf31
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS_H_
+#define _ASM_GENERIC_BITOPS_FLS_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls64.h
new file mode 100644
index 0000000..af77098
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
+#define _ASM_GENERIC_BITOPS_FLS64_H_
+
+#include <asm/types.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/le.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/le.h
new file mode 100644
index 0000000..97ca973
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_LE_H_
+#define _ASM_GENERIC_BITOPS_LE_H_
+
+#include <asm/types.h>
+#include <asm/byteorder.h>
+
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
+
+#ifdef __LITTLE_ENDIAN
+
+#define generic_test_le_bit(nr, addr) test_bit(nr, addr)
+#define generic___set_le_bit(nr, addr) __set_bit(nr, addr)
+#define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr)
+
+#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit(nr, addr)
+#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit(nr, addr)
+
+#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit(nr, addr)
+#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr)
+
+#define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset)
+
+#elif defined(__BIG_ENDIAN)
+
+#define generic_test_le_bit(nr, addr) test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___set_le_bit(nr, addr) __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___clear_le_bit(nr, addr) __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
+
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+
+#define generic_find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
new file mode 100644
index 0000000..727f736
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+#define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
+
+#include <asm/types.h>
+
+#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
+#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/bug.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bug.h
new file mode 100644
index 0000000..d91a135
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/bug.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_BUG_H
+#define _ASM_GENERIC_BUG_H
+
+#include <linux/compiler.h>
+
+#ifndef HAVE_ARCH_BUG
+#define BUG()
+#endif
+
+#ifndef HAVE_ARCH_BUG_ON
+#define BUG_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#ifndef HAVE_ARCH_WARN_ON
+#define WARN_ON(condition) do { if (condition) ; } while(0)
+#endif
+
+#define WARN_ON_ONCE(condition) ({ static int __warn_once = 1; int __ret = 0; if (unlikely((condition) && __warn_once)) { __warn_once = 0; WARN_ON(1); __ret = 1; } __ret; })
+
+#define WARN_ON_SMP(x) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/cputime.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/cputime.h
new file mode 100644
index 0000000..0486b87
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/cputime.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_CPUTIME_H
+#define _ASM_GENERIC_CPUTIME_H
+
+#include <linux/time.h>
+#include <linux/jiffies.h>
+
+typedef unsigned long cputime_t;
+
+#define cputime_zero (0UL)
+#define cputime_max ((~0UL >> 1) - 1)
+#define cputime_add(__a, __b) ((__a) + (__b))
+#define cputime_sub(__a, __b) ((__a) - (__b))
+#define cputime_div(__a, __n) ((__a) / (__n))
+#define cputime_halve(__a) ((__a) >> 1)
+#define cputime_eq(__a, __b) ((__a) == (__b))
+#define cputime_gt(__a, __b) ((__a) > (__b))
+#define cputime_ge(__a, __b) ((__a) >= (__b))
+#define cputime_lt(__a, __b) ((__a) < (__b))
+#define cputime_le(__a, __b) ((__a) <= (__b))
+#define cputime_to_jiffies(__ct) (__ct)
+#define jiffies_to_cputime(__hz) (__hz)
+
+typedef u64 cputime64_t;
+
+#define cputime64_zero (0ULL)
+#define cputime64_add(__a, __b) ((__a) + (__b))
+#define cputime64_sub(__a, __b) ((__a) - (__b))
+#define cputime64_to_jiffies64(__ct) (__ct)
+#define jiffies64_to_cputime64(__jif) (__jif)
+#define cputime_to_cputime64(__ct) ((u64) __ct)
+
+#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
+#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
+
+#define cputime_to_secs(jif) ((jif) / HZ)
+#define secs_to_cputime(sec) ((sec) * HZ)
+
+#define timespec_to_cputime(__val) timespec_to_jiffies(__val)
+#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
+
+#define timeval_to_cputime(__val) timeval_to_jiffies(__val)
+#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
+
+#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
+#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
+
+#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/emergency-restart.h
new file mode 100644
index 0000000..619c682
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
+#define _ASM_GENERIC_EMERGENCY_RESTART_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno-base.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno-base.h
new file mode 100644
index 0000000..2fb4a33
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno-base.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_BASE_H
+#define _ASM_GENERIC_ERRNO_BASE_H
+
+#define EPERM 1
+#define ENOENT 2
+#define ESRCH 3
+#define EINTR 4
+#define EIO 5
+#define ENXIO 6
+#define E2BIG 7
+#define ENOEXEC 8
+#define EBADF 9
+#define ECHILD 10
+#define EAGAIN 11
+#define ENOMEM 12
+#define EACCES 13
+#define EFAULT 14
+#define ENOTBLK 15
+#define EBUSY 16
+#define EEXIST 17
+#define EXDEV 18
+#define ENODEV 19
+#define ENOTDIR 20
+#define EISDIR 21
+#define EINVAL 22
+#define ENFILE 23
+#define EMFILE 24
+#define ENOTTY 25
+#define ETXTBSY 26
+#define EFBIG 27
+#define ENOSPC 28
+#define ESPIPE 29
+#define EROFS 30
+#define EMLINK 31
+#define EPIPE 32
+#define EDOM 33
+#define ERANGE 34
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno.h
new file mode 100644
index 0000000..11dd00f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/errno.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_ERRNO_H
+#define _ASM_GENERIC_ERRNO_H
+
+#include <asm-generic/errno-base.h>
+
+#define EDEADLK 35
+#define ENAMETOOLONG 36
+#define ENOLCK 37
+#define ENOSYS 38
+#define ENOTEMPTY 39
+#define ELOOP 40
+#define EWOULDBLOCK EAGAIN
+#define ENOMSG 42
+#define EIDRM 43
+#define ECHRNG 44
+#define EL2NSYNC 45
+#define EL3HLT 46
+#define EL3RST 47
+#define ELNRNG 48
+#define EUNATCH 49
+#define ENOCSI 50
+#define EL2HLT 51
+#define EBADE 52
+#define EBADR 53
+#define EXFULL 54
+#define ENOANO 55
+#define EBADRQC 56
+#define EBADSLT 57
+
+#define EDEADLOCK EDEADLK
+
+#define EBFONT 59
+#define ENOSTR 60
+#define ENODATA 61
+#define ETIME 62
+#define ENOSR 63
+#define ENONET 64
+#define ENOPKG 65
+#define EREMOTE 66
+#define ENOLINK 67
+#define EADV 68
+#define ESRMNT 69
+#define ECOMM 70
+#define EPROTO 71
+#define EMULTIHOP 72
+#define EDOTDOT 73
+#define EBADMSG 74
+#define EOVERFLOW 75
+#define ENOTUNIQ 76
+#define EBADFD 77
+#define EREMCHG 78
+#define ELIBACC 79
+#define ELIBBAD 80
+#define ELIBSCN 81
+#define ELIBMAX 82
+#define ELIBEXEC 83
+#define EILSEQ 84
+#define ERESTART 85
+#define ESTRPIPE 86
+#define EUSERS 87
+#define ENOTSOCK 88
+#define EDESTADDRREQ 89
+#define EMSGSIZE 90
+#define EPROTOTYPE 91
+#define ENOPROTOOPT 92
+#define EPROTONOSUPPORT 93
+#define ESOCKTNOSUPPORT 94
+#define EOPNOTSUPP 95
+#define EPFNOSUPPORT 96
+#define EAFNOSUPPORT 97
+#define EADDRINUSE 98
+#define EADDRNOTAVAIL 99
+#define ENETDOWN 100
+#define ENETUNREACH 101
+#define ENETRESET 102
+#define ECONNABORTED 103
+#define ECONNRESET 104
+#define ENOBUFS 105
+#define EISCONN 106
+#define ENOTCONN 107
+#define ESHUTDOWN 108
+#define ETOOMANYREFS 109
+#define ETIMEDOUT 110
+#define ECONNREFUSED 111
+#define EHOSTDOWN 112
+#define EHOSTUNREACH 113
+#define EALREADY 114
+#define EINPROGRESS 115
+#define ESTALE 116
+#define EUCLEAN 117
+#define ENOTNAM 118
+#define ENAVAIL 119
+#define EISNAM 120
+#define EREMOTEIO 121
+#define EDQUOT 122
+
+#define ENOMEDIUM 123
+#define EMEDIUMTYPE 124
+#define ECANCELED 125
+#define ENOKEY 126
+#define EKEYEXPIRED 127
+#define EKEYREVOKED 128
+#define EKEYREJECTED 129
+
+#define EOWNERDEAD 130
+#define ENOTRECOVERABLE 131
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/fcntl.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/fcntl.h
new file mode 100644
index 0000000..a53b536
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/fcntl.h
@@ -0,0 +1,148 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FCNTL_H
+#define _ASM_GENERIC_FCNTL_H
+
+#include <linux/types.h>
+
+#define O_ACCMODE 00000003
+#define O_RDONLY 00000000
+#define O_WRONLY 00000001
+#define O_RDWR 00000002
+#ifndef O_CREAT
+#define O_CREAT 00000100
+#endif
+#ifndef O_EXCL
+#define O_EXCL 00000200
+#endif
+#ifndef O_NOCTTY
+#define O_NOCTTY 00000400
+#endif
+#ifndef O_TRUNC
+#define O_TRUNC 00001000
+#endif
+#ifndef O_APPEND
+#define O_APPEND 00002000
+#endif
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 00004000
+#endif
+#ifndef O_SYNC
+#define O_SYNC 00010000
+#endif
+#ifndef FASYNC
+#define FASYNC 00020000
+#endif
+#ifndef O_DIRECT
+#define O_DIRECT 00040000
+#endif
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 00100000
+#endif
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 00200000
+#endif
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW 00400000
+#endif
+#ifndef O_NOATIME
+#define O_NOATIME 01000000
+#endif
+#ifndef O_NDELAY
+#define O_NDELAY O_NONBLOCK
+#endif
+
+#define F_DUPFD 0
+#define F_GETFD 1
+#define F_SETFD 2
+#define F_GETFL 3
+#define F_SETFL 4
+#ifndef F_GETLK
+#define F_GETLK 5
+#define F_SETLK 6
+#define F_SETLKW 7
+#endif
+#ifndef F_SETOWN
+#define F_SETOWN 8
+#define F_GETOWN 9
+#endif
+#ifndef F_SETSIG
+#define F_SETSIG 10
+#define F_GETSIG 11
+#endif
+
+#define FD_CLOEXEC 1
+
+#ifndef F_RDLCK
+#define F_RDLCK 0
+#define F_WRLCK 1
+#define F_UNLCK 2
+#endif
+
+#ifndef F_EXLCK
+#define F_EXLCK 4
+#define F_SHLCK 8
+#endif
+
+#ifndef F_INPROGRESS
+#define F_INPROGRESS 16
+#endif
+
+#define LOCK_SH 1
+#define LOCK_EX 2
+#define LOCK_NB 4
+#define LOCK_UN 8
+
+#define LOCK_MAND 32
+#define LOCK_READ 64
+#define LOCK_WRITE 128
+#define LOCK_RW 192
+
+#define F_LINUX_SPECIFIC_BASE 1024
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK
+#ifndef __ARCH_FLOCK_PAD
+#define __ARCH_FLOCK_PAD
+#endif
+
+struct flock {
+ short l_type;
+ short l_whence;
+ off_t l_start;
+ off_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK_PAD
+};
+#endif
+
+#ifndef F_GETLK64
+#define F_GETLK64 12
+#define F_SETLK64 13
+#define F_SETLKW64 14
+#endif
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK64
+#ifndef __ARCH_FLOCK64_PAD
+#define __ARCH_FLOCK64_PAD
+#endif
+
+struct flock64 {
+ short l_type;
+ short l_whence;
+ loff_t l_start;
+ loff_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK64_PAD
+};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/futex.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/futex.h
new file mode 100644
index 0000000..05d3afe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/futex.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_FUTEX_H
+#define _ASM_GENERIC_FUTEX_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/ioctl.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/ioctl.h
new file mode 100644
index 0000000..cba2b8e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/ioctl.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IOCTL_H
+#define _ASM_GENERIC_IOCTL_H
+
+#define _IOC_NRBITS 8
+#define _IOC_TYPEBITS 8
+#define _IOC_SIZEBITS 14
+#define _IOC_DIRBITS 2
+
+#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
+
+#define _IOC_NRSHIFT 0
+#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
+
+#define _IOC_NONE 0U
+#define _IOC_WRITE 1U
+#define _IOC_READ 2U
+
+#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
+
+extern unsigned int __invalid_size_argument_for_IOC;
+#define _IOC_TYPECHECK(t) ((sizeof(t) == sizeof(t[1]) && sizeof(t) < (1 << _IOC_SIZEBITS)) ? sizeof(t) : __invalid_size_argument_for_IOC)
+
+#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
+#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
+#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
+#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
+#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
+#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
+
+#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
+#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
+#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
+#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
+#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/ipc.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/ipc.h
new file mode 100644
index 0000000..57657a7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/ipc.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_IPC_H
+#define _ASM_GENERIC_IPC_H
+
+struct ipc_kludge {
+ struct msgbuf __user *msgp;
+ long msgtyp;
+};
+
+#define SEMOP 1
+#define SEMGET 2
+#define SEMCTL 3
+#define SEMTIMEDOP 4
+#define MSGSND 11
+#define MSGRCV 12
+#define MSGGET 13
+#define MSGCTL 14
+#define SHMAT 21
+#define SHMDT 22
+#define SHMGET 23
+#define SHMCTL 24
+
+#define DIPC 25
+
+#define IPCCALL(version,op) ((version)<<16 | (op))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/local.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/local.h
new file mode 100644
index 0000000..cae0d54
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/local.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_LOCAL_H
+#define _ASM_GENERIC_LOCAL_H
+
+#include <linux/percpu.h>
+#include <linux/hardirq.h>
+#include <asm/atomic.h>
+#include <asm/types.h>
+
+typedef struct
+{
+ atomic_long_t a;
+} local_t;
+
+#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
+
+#define local_read(l) atomic_long_read(&(l)->a)
+#define local_set(l,i) atomic_long_set((&(l)->a),(i))
+#define local_inc(l) atomic_long_inc(&(l)->a)
+#define local_dec(l) atomic_long_dec(&(l)->a)
+#define local_add(i,l) atomic_long_add((i),(&(l)->a))
+#define local_sub(i,l) atomic_long_sub((i),(&(l)->a))
+
+#define __local_inc(l) local_set((l), local_read(l) + 1)
+#define __local_dec(l) local_set((l), local_read(l) - 1)
+#define __local_add(i,l) local_set((l), local_read(l) + (i))
+#define __local_sub(i,l) local_set((l), local_read(l) - (i))
+
+#define cpu_local_read(v) local_read(&__get_cpu_var(v))
+#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i))
+#define cpu_local_inc(v) local_inc(&__get_cpu_var(v))
+#define cpu_local_dec(v) local_dec(&__get_cpu_var(v))
+#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v))
+#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v))
+
+#define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v))
+#define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v))
+#define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v))
+#define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/memory_model.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/memory_model.h
new file mode 100644
index 0000000..fa7602e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/memory_model.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MEMORY_MODEL_H
+#define __ASM_MEMORY_MODEL_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/mman.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/mman.h
new file mode 100644
index 0000000..98d2783
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/mman.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MMAN_H
+#define _ASM_GENERIC_MMAN_H
+
+#define PROT_READ 0x1
+#define PROT_WRITE 0x2
+#define PROT_EXEC 0x4
+#define PROT_SEM 0x8
+#define PROT_NONE 0x0
+#define PROT_GROWSDOWN 0x01000000
+#define PROT_GROWSUP 0x02000000
+
+#define MAP_SHARED 0x01
+#define MAP_PRIVATE 0x02
+#define MAP_TYPE 0x0f
+#define MAP_FIXED 0x10
+#define MAP_ANONYMOUS 0x20
+
+#define MS_ASYNC 1
+#define MS_INVALIDATE 2
+#define MS_SYNC 4
+
+#define MADV_NORMAL 0
+#define MADV_RANDOM 1
+#define MADV_SEQUENTIAL 2
+#define MADV_WILLNEED 3
+#define MADV_DONTNEED 4
+
+#define MADV_REMOVE 9
+#define MADV_DONTFORK 10
+#define MADV_DOFORK 11
+
+#define MAP_ANON MAP_ANONYMOUS
+#define MAP_FILE 0
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/mutex-xchg.h
new file mode 100644
index 0000000..63a557e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_MUTEX_XCHG_H
+#define _ASM_GENERIC_MUTEX_XCHG_H
+
+#define __mutex_slowpath_needs_to_unlock() 0
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/percpu.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/percpu.h
new file mode 100644
index 0000000..e498300
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/percpu.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PERCPU_H_
+#define _ASM_GENERIC_PERCPU_H_
+#include <linux/compiler.h>
+
+#define __GENERIC_PER_CPU
+
+#define DEFINE_PER_CPU(type, name) __typeof__(type) per_cpu__##name
+
+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var) per_cpu__##var
+#define __raw_get_cpu_var(var) per_cpu__##var
+
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
+
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable-nopud.h
new file mode 100644
index 0000000..585f816
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PGTABLE_NOPUD_H
+#define _PGTABLE_NOPUD_H
+
+#ifndef __ASSEMBLY__
+
+#define __PAGETABLE_PUD_FOLDED
+
+typedef struct { pgd_t pgd; } pud_t;
+
+#define PUD_SHIFT PGDIR_SHIFT
+#define PTRS_PER_PUD 1
+#define PUD_SIZE (1UL << PUD_SHIFT)
+#define PUD_MASK (~(PUD_SIZE-1))
+
+#define pud_ERROR(pud) (pgd_ERROR((pud).pgd))
+#define pgd_populate(mm, pgd, pud) do { } while (0)
+#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
+#define pud_val(x) (pgd_val((x).pgd))
+#define __pud(x) ((pud_t) { __pgd(x) } )
+#define pgd_page(pgd) (pud_page((pud_t){ pgd }))
+#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd }))
+#define pud_alloc_one(mm, address) NULL
+#define pud_free(x) do { } while (0)
+#define __pud_free_tlb(tlb, x) do { } while (0)
+#undef pud_addr_end
+#define pud_addr_end(addr, end) (end)
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable.h
new file mode 100644
index 0000000..a21cdba
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/pgtable.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_PGTABLE_H
+#define _ASM_GENERIC_PGTABLE_H
+
+#ifndef __HAVE_ARCH_PTEP_ESTABLISH
+
+#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
+#define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#else
+#define ptep_establish(__vma, __address, __ptep, __entry) do { set_pte_atomic(__ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#endif
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
+
+#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) do { set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); flush_tlb_page(__vma, __address); } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define ptep_test_and_clear_young(__vma, __address, __ptep) ({ pte_t __pte = *(__ptep); int r = 1; if (!pte_young(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkold(__pte)); r; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
+#define ptep_clear_flush_young(__vma, __address, __ptep) ({ int __young; __young = ptep_test_and_clear_young(__vma, __address, __ptep); if (__young) flush_tlb_page(__vma, __address); __young; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
+#define ptep_test_and_clear_dirty(__vma, __address, __ptep) ({ pte_t __pte = *__ptep; int r = 1; if (!pte_dirty(__pte)) r = 0; else set_pte_at((__vma)->vm_mm, (__address), (__ptep), pte_mkclean(__pte)); r; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
+#define ptep_clear_flush_dirty(__vma, __address, __ptep) ({ int __dirty; __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); if (__dirty) flush_tlb_page(__vma, __address); __dirty; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define ptep_get_and_clear(__mm, __address, __ptep) ({ pte_t __pte = *(__ptep); pte_clear((__mm), (__address), (__ptep)); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
+#define ptep_get_and_clear_full(__mm, __address, __ptep, __full) ({ pte_t __pte; __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
+#define pte_clear_full(__mm, __address, __ptep, __full) do { pte_clear((__mm), (__address), (__ptep)); } while (0)
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
+#define ptep_clear_flush(__vma, __address, __ptep) ({ pte_t __pte; __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); flush_tlb_page(__vma, __address); __pte; })
+#endif
+
+#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
+struct mm_struct;
+#endif
+#ifndef __HAVE_ARCH_PTE_SAME
+#define pte_same(A,B) (pte_val(A) == pte_val(B))
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
+#define page_test_and_clear_dirty(page) (0)
+#define pte_maybe_dirty(pte) pte_dirty(pte)
+#else
+#define pte_maybe_dirty(pte) (1)
+#endif
+#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG
+#define page_test_and_clear_young(page) (0)
+#endif
+#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
+#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
+#endif
+#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
+#define lazy_mmu_prot_update(pte) do { } while (0)
+#endif
+#ifndef __HAVE_ARCH_MOVE_PTE
+#define move_pte(pte, prot, old_addr, new_addr) (pte)
+#endif
+#define pgd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#ifndef pud_addr_end
+#define pud_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#endif
+#ifndef pmd_addr_end
+#define pmd_addr_end(addr, end) ({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; (__boundary - 1 < (end) - 1)? __boundary: (end); })
+#endif
+#ifndef __ASSEMBLY__
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/poll.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/poll.h
new file mode 100644
index 0000000..b8cd3da
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/poll.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_GENERIC_POLL_H
+#define __ASM_GENERIC_POLL_H
+
+#define POLLIN 0x0001
+#define POLLPRI 0x0002
+#define POLLOUT 0x0004
+#define POLLERR 0x0008
+#define POLLHUP 0x0010
+#define POLLNVAL 0x0020
+
+#define POLLRDNORM 0x0040
+#define POLLRDBAND 0x0080
+#ifndef POLLWRNORM
+#define POLLWRNORM 0x0100
+#endif
+#ifndef POLLWRBAND
+#define POLLWRBAND 0x0200
+#endif
+#ifndef POLLMSG
+#define POLLMSG 0x0400
+#endif
+#ifndef POLLREMOVE
+#define POLLREMOVE 0x1000
+#endif
+#ifndef POLLRDHUP
+#define POLLRDHUP 0x2000
+#endif
+
+struct pollfd {
+ int fd;
+ short events;
+ short revents;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/resource.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/resource.h
new file mode 100644
index 0000000..a7f7dec
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/resource.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_RESOURCE_H
+#define _ASM_GENERIC_RESOURCE_H
+
+#define RLIMIT_CPU 0
+#define RLIMIT_FSIZE 1
+#define RLIMIT_DATA 2
+#define RLIMIT_STACK 3
+#define RLIMIT_CORE 4
+
+#ifndef RLIMIT_RSS
+#define RLIMIT_RSS 5
+#endif
+
+#ifndef RLIMIT_NPROC
+#define RLIMIT_NPROC 6
+#endif
+
+#ifndef RLIMIT_NOFILE
+#define RLIMIT_NOFILE 7
+#endif
+
+#ifndef RLIMIT_MEMLOCK
+#define RLIMIT_MEMLOCK 8
+#endif
+
+#ifndef RLIMIT_AS
+#define RLIMIT_AS 9
+#endif
+
+#define RLIMIT_LOCKS 10
+#define RLIMIT_SIGPENDING 11
+#define RLIMIT_MSGQUEUE 12
+#define RLIMIT_NICE 13
+#define RLIMIT_RTPRIO 14
+
+#define RLIM_NLIMITS 15
+
+#ifndef RLIM_INFINITY
+#define RLIM_INFINITY (~0UL)
+#endif
+
+#ifndef _STK_LIM_MAX
+#define _STK_LIM_MAX RLIM_INFINITY
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/sections.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/sections.h
new file mode 100644
index 0000000..e9eaa46
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/sections.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SECTIONS_H_
+#define _ASM_GENERIC_SECTIONS_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/siginfo.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/siginfo.h
new file mode 100644
index 0000000..d6743a7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/siginfo.h
@@ -0,0 +1,213 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SIGINFO_H
+#define _ASM_GENERIC_SIGINFO_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+typedef union sigval {
+ int sival_int;
+ void __user *sival_ptr;
+} sigval_t;
+
+#ifndef __ARCH_SI_PREAMBLE_SIZE
+#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
+#endif
+
+#define SI_MAX_SIZE 128
+#ifndef SI_PAD_SIZE
+#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+#endif
+
+#ifndef __ARCH_SI_UID_T
+#define __ARCH_SI_UID_T uid_t
+#endif
+
+#ifndef __ARCH_SI_BAND_T
+#define __ARCH_SI_BAND_T long
+#endif
+
+#ifndef HAVE_ARCH_SIGINFO_T
+
+typedef struct siginfo {
+ int si_signo;
+ int si_errno;
+ int si_code;
+
+ union {
+ int _pad[SI_PAD_SIZE];
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ } _kill;
+
+ struct {
+ timer_t _tid;
+ int _overrun;
+ char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+ sigval_t _sigval;
+ int _sys_private;
+ } _timer;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ sigval_t _sigval;
+ } _rt;
+
+ struct {
+ pid_t _pid;
+ __ARCH_SI_UID_T _uid;
+ int _status;
+ clock_t _utime;
+ clock_t _stime;
+ } _sigchld;
+
+ struct {
+ void __user *_addr;
+#ifdef __ARCH_SI_TRAPNO
+ int _trapno;
+#endif
+ } _sigfault;
+
+ struct {
+ __ARCH_SI_BAND_T _band;
+ int _fd;
+ } _sigpoll;
+ } _sifields;
+} siginfo_t;
+
+#endif
+
+#define si_pid _sifields._kill._pid
+#define si_uid _sifields._kill._uid
+#define si_tid _sifields._timer._tid
+#define si_overrun _sifields._timer._overrun
+#define si_sys_private _sifields._timer._sys_private
+#define si_status _sifields._sigchld._status
+#define si_utime _sifields._sigchld._utime
+#define si_stime _sifields._sigchld._stime
+#define si_value _sifields._rt._sigval
+#define si_int _sifields._rt._sigval.sival_int
+#define si_ptr _sifields._rt._sigval.sival_ptr
+#define si_addr _sifields._sigfault._addr
+#ifdef __ARCH_SI_TRAPNO
+#define si_trapno _sifields._sigfault._trapno
+#endif
+#define si_band _sifields._sigpoll._band
+#define si_fd _sifields._sigpoll._fd
+
+#define __SI_KILL 0
+#define __SI_TIMER 0
+#define __SI_POLL 0
+#define __SI_FAULT 0
+#define __SI_CHLD 0
+#define __SI_RT 0
+#define __SI_MESGQ 0
+#define __SI_CODE(T,N) (N)
+
+#define SI_USER 0
+#define SI_KERNEL 0x80
+#define SI_QUEUE -1
+#define SI_TIMER __SI_CODE(__SI_TIMER,-2)
+#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3)
+#define SI_ASYNCIO -4
+#define SI_SIGIO -5
+#define SI_TKILL -6
+#define SI_DETHREAD -7
+
+#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
+#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
+
+#define ILL_ILLOPC (__SI_FAULT|1)
+#define ILL_ILLOPN (__SI_FAULT|2)
+#define ILL_ILLADR (__SI_FAULT|3)
+#define ILL_ILLTRP (__SI_FAULT|4)
+#define ILL_PRVOPC (__SI_FAULT|5)
+#define ILL_PRVREG (__SI_FAULT|6)
+#define ILL_COPROC (__SI_FAULT|7)
+#define ILL_BADSTK (__SI_FAULT|8)
+#define NSIGILL 8
+
+#define FPE_INTDIV (__SI_FAULT|1)
+#define FPE_INTOVF (__SI_FAULT|2)
+#define FPE_FLTDIV (__SI_FAULT|3)
+#define FPE_FLTOVF (__SI_FAULT|4)
+#define FPE_FLTUND (__SI_FAULT|5)
+#define FPE_FLTRES (__SI_FAULT|6)
+#define FPE_FLTINV (__SI_FAULT|7)
+#define FPE_FLTSUB (__SI_FAULT|8)
+#define NSIGFPE 8
+
+#define SEGV_MAPERR (__SI_FAULT|1)
+#define SEGV_ACCERR (__SI_FAULT|2)
+#define NSIGSEGV 2
+
+#define BUS_ADRALN (__SI_FAULT|1)
+#define BUS_ADRERR (__SI_FAULT|2)
+#define BUS_OBJERR (__SI_FAULT|3)
+#define NSIGBUS 3
+
+#define TRAP_BRKPT (__SI_FAULT|1)
+#define TRAP_TRACE (__SI_FAULT|2)
+#define NSIGTRAP 2
+
+#define CLD_EXITED (__SI_CHLD|1)
+#define CLD_KILLED (__SI_CHLD|2)
+#define CLD_DUMPED (__SI_CHLD|3)
+#define CLD_TRAPPED (__SI_CHLD|4)
+#define CLD_STOPPED (__SI_CHLD|5)
+#define CLD_CONTINUED (__SI_CHLD|6)
+#define NSIGCHLD 6
+
+#define POLL_IN (__SI_POLL|1)
+#define POLL_OUT (__SI_POLL|2)
+#define POLL_MSG (__SI_POLL|3)
+#define POLL_ERR (__SI_POLL|4)
+#define POLL_PRI (__SI_POLL|5)
+#define POLL_HUP (__SI_POLL|6)
+#define NSIGPOLL 6
+
+#define SIGEV_SIGNAL 0
+#define SIGEV_NONE 1
+#define SIGEV_THREAD 2
+#define SIGEV_THREAD_ID 4
+
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
+#endif
+
+#define SIGEV_MAX_SIZE 64
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int))
+
+typedef struct sigevent {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+ union {
+ int _pad[SIGEV_PAD_SIZE];
+ int _tid;
+
+ struct {
+ void (*_function)(sigval_t);
+ void *_attribute;
+ } _sigev_thread;
+ } _sigev_un;
+} sigevent_t;
+
+#define sigev_notify_function _sigev_un._sigev_thread._function
+#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+#define sigev_notify_thread_id _sigev_un._tid
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/signal.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/signal.h
new file mode 100644
index 0000000..226d99c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/signal.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_GENERIC_SIGNAL_H
+#define __ASM_GENERIC_SIGNAL_H
+
+#include <linux/compiler.h>
+
+#ifndef SIG_BLOCK
+#define SIG_BLOCK 0
+#endif
+#ifndef SIG_UNBLOCK
+#define SIG_UNBLOCK 1
+#endif
+#ifndef SIG_SETMASK
+#define SIG_SETMASK 2
+#endif
+
+#ifndef __ASSEMBLY__
+typedef void __signalfn_t(int);
+typedef __signalfn_t __user *__sighandler_t;
+
+typedef void __restorefn_t(void);
+typedef __restorefn_t __user *__sigrestore_t;
+
+#define SIG_DFL ((__force __sighandler_t)0)
+#define SIG_IGN ((__force __sighandler_t)1)
+#define SIG_ERR ((__force __sighandler_t)-1)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/tlb.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/tlb.h
new file mode 100644
index 0000000..dc1e79f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/tlb.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC__TLB_H
+#define _ASM_GENERIC__TLB_H
+
+#include <linux/swap.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+
+#define FREE_PTE_NR 1
+#define tlb_fast_mode(tlb) 1
+
+struct mmu_gather {
+ struct mm_struct *mm;
+ unsigned int nr;
+ unsigned int need_flush;
+ unsigned int fullmm;
+ struct page * pages[FREE_PTE_NR];
+};
+
+#define tlb_remove_tlb_entry(tlb, ptep, address) do { tlb->need_flush = 1; __tlb_remove_tlb_entry(tlb, ptep, address); } while (0)
+#define pte_free_tlb(tlb, ptep) do { tlb->need_flush = 1; __pte_free_tlb(tlb, ptep); } while (0)
+#ifndef __ARCH_HAS_4LEVEL_HACK
+#define pud_free_tlb(tlb, pudp) do { tlb->need_flush = 1; __pud_free_tlb(tlb, pudp); } while (0)
+#endif
+#define pmd_free_tlb(tlb, pmdp) do { tlb->need_flush = 1; __pmd_free_tlb(tlb, pmdp); } while (0)
+#define tlb_migrate_finish(mm) do {} while (0)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/topology.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/topology.h
new file mode 100644
index 0000000..089b1f2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/topology.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_TOPOLOGY_H
+#define _ASM_GENERIC_TOPOLOGY_H
+
+#ifndef cpu_to_node
+#define cpu_to_node(cpu) (0)
+#endif
+#ifndef parent_node
+#define parent_node(node) (0)
+#endif
+#ifndef node_to_cpumask
+#define node_to_cpumask(node) (cpu_online_map)
+#endif
+#ifndef node_to_first_cpu
+#define node_to_first_cpu(node) (0)
+#endif
+#ifndef pcibus_to_node
+#define pcibus_to_node(node) (-1)
+#endif
+
+#ifndef pcibus_to_cpumask
+#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? CPU_MASK_ALL : node_to_cpumask(pcibus_to_node(bus)) )
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/asm-generic/xor.h b/6/platforms/android-3/arch-x86/usr/include/asm-generic/xor.h
new file mode 100644
index 0000000..6b1e4e8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/asm-generic/xor.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/processor.h>
+
+#define XOR_TRY_TEMPLATES do { xor_speed(&xor_block_8regs); xor_speed(&xor_block_8regs_p); xor_speed(&xor_block_32regs); xor_speed(&xor_block_32regs_p); } while (0)
diff --git a/6/platforms/android-3/arch-x86/usr/include/assert.h b/6/platforms/android-3/arch-x86/usr/include/assert.h
new file mode 100644
index 0000000..62470f5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/assert.h
@@ -0,0 +1,65 @@
+/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */
+/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)assert.h 8.2 (Berkeley) 1/21/94
+ */
+
+/*
+ * Unlike other ANSI header files, <assert.h> may usefully be included
+ * multiple times, with and without NDEBUG defined.
+ */
+
+#include <sys/cdefs.h>
+
+#undef assert
+#undef _assert
+
+#ifdef NDEBUG
+# define assert(e) ((void)0)
+# define _assert(e) ((void)0)
+#else
+# define _assert(e) assert(e)
+# if __ISO_C_VISIBLE >= 1999
+# define assert(e) ((e) ? (void)0 : __assert2(__FILE__, __LINE__, __func__, #e))
+# else
+# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
+# endif
+#endif
+
+__BEGIN_DECLS
+__dead void __assert(const char *, int, const char *);
+__dead void __assert2(const char *, int, const char *, const char *);
+__END_DECLS
diff --git a/6/platforms/android-3/arch-x86/usr/include/byteswap.h b/6/platforms/android-3/arch-x86/usr/include/byteswap.h
new file mode 100644
index 0000000..16d2ad4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/byteswap.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _BYTESWAP_H_
+#define _BYTESWAP_H_
+
+#include <sys/endian.h>
+
+#define bswap_16(x) swap16(x)
+#define bswap_32(x) swap32(x)
+#define bswap_64(x) swap64(x)
+
+#endif /* _BYTESWAP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/ctype.h b/6/platforms/android-3/arch-x86/usr/include/ctype.h
new file mode 100644
index 0000000..58b76ea
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/ctype.h
@@ -0,0 +1,207 @@
+/* $OpenBSD: ctype.h,v 1.19 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */
+
+/*
+ * Copyright (c) 1989 The Regents of the University of California.
+ * All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ctype.h 5.3 (Berkeley) 4/3/91
+ */
+
+#ifndef _CTYPE_H_
+#define _CTYPE_H_
+
+#include <sys/cdefs.h>
+
+#define _U 0x01
+#define _L 0x02
+#define _N 0x04
+#define _S 0x08
+#define _P 0x10
+#define _C 0x20
+#define _X 0x40
+#define _B 0x80
+
+__BEGIN_DECLS
+
+extern const char *_ctype_;
+extern const short *_tolower_tab_;
+extern const short *_toupper_tab_;
+
+/* extern __inline is a GNU C extension */
+#ifdef __GNUC__
+# if defined(__GNUC_STDC_INLINE__)
+#define __CTYPE_INLINE extern __inline __attribute__((__gnu_inline__))
+# else
+#define __CTYPE_INLINE extern __inline
+# endif
+#else
+#define __CTYPE_INLINE static __inline
+#endif
+
+#if defined(__GNUC__) || defined(_ANSI_LIBRARY) || defined(lint)
+int isalnum(int);
+int isalpha(int);
+int iscntrl(int);
+int isdigit(int);
+int isgraph(int);
+int islower(int);
+int isprint(int);
+int ispunct(int);
+int isspace(int);
+int isupper(int);
+int isxdigit(int);
+int tolower(int);
+int toupper(int);
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 200112 \
+ || __XPG_VISIBLE > 600
+int isblank(int);
+#endif
+
+#if __BSD_VISIBLE || __XPG_VISIBLE
+int isascii(int);
+int toascii(int);
+int _tolower(int);
+int _toupper(int);
+#endif /* __BSD_VISIBLE || __XPG_VISIBLE */
+
+#endif /* __GNUC__ || _ANSI_LIBRARY || lint */
+
+#if defined(NDEBUG)
+
+__CTYPE_INLINE int isalnum(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L|_N)));
+}
+
+__CTYPE_INLINE int isalpha(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_U|_L)));
+}
+
+__CTYPE_INLINE int iscntrl(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _C));
+}
+
+__CTYPE_INLINE int isdigit(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _N));
+}
+
+__CTYPE_INLINE int isgraph(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N)));
+}
+
+__CTYPE_INLINE int islower(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _L));
+}
+
+__CTYPE_INLINE int isprint(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_P|_U|_L|_N|_B)));
+}
+
+__CTYPE_INLINE int ispunct(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _P));
+}
+
+__CTYPE_INLINE int isspace(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _S));
+}
+
+__CTYPE_INLINE int isupper(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & _U));
+}
+
+__CTYPE_INLINE int isxdigit(int c)
+{
+ return (c == -1 ? 0 : ((_ctype_ + 1)[(unsigned char)c] & (_N|_X)));
+}
+
+__CTYPE_INLINE int tolower(int c)
+{
+ if ((unsigned int)c > 255)
+ return (c);
+ return ((_tolower_tab_ + 1)[c]);
+}
+
+__CTYPE_INLINE int toupper(int c)
+{
+ if ((unsigned int)c > 255)
+ return (c);
+ return ((_toupper_tab_ + 1)[c]);
+}
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __POSIX_VISIBLE > 200112 \
+ || __XPG_VISIBLE > 600
+__CTYPE_INLINE int isblank(int c)
+{
+ return (c == ' ' || c == '\t');
+}
+#endif
+
+#if __BSD_VISIBLE || __XPG_VISIBLE
+__CTYPE_INLINE int isascii(int c)
+{
+ return ((unsigned int)c <= 0177);
+}
+
+__CTYPE_INLINE int toascii(int c)
+{
+ return (c & 0177);
+}
+
+__CTYPE_INLINE int _tolower(int c)
+{
+ return (c - 'A' + 'a');
+}
+
+__CTYPE_INLINE int _toupper(int c)
+{
+ return (c - 'a' + 'A');
+}
+#endif /* __BSD_VISIBLE || __XPG_VISIBLE */
+
+#endif /* NDEBUG */
+
+__END_DECLS
+
+#undef __CTYPE_INLINE
+
+#endif /* !_CTYPE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/dirent.h b/6/platforms/android-3/arch-x86/usr/include/dirent.h
new file mode 100644
index 0000000..55eef7b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/dirent.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#ifndef DT_UNKNOWN
+#define DT_UNKNOWN 0
+#define DT_FIFO 1
+#define DT_CHR 2
+#define DT_DIR 4
+#define DT_BLK 6
+#define DT_REG 8
+#define DT_LNK 10
+#define DT_SOCK 12
+#define DT_WHT 14
+#endif
+
+/* the following structure is really called dirent64 by the kernel
+ * headers. They also define a struct dirent, but the latter lack
+ * the d_type field which is required by some libraries (e.g. hotplug)
+ * who assume to be able to access it directly. sad...
+ */
+struct dirent {
+ uint64_t d_ino;
+ int64_t d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+typedef struct DIR DIR;
+
+extern int getdents(unsigned int, struct dirent*, unsigned int);
+extern DIR* opendir(const char* dirpath);
+extern DIR* fdopendir(int fd);
+extern struct dirent* readdir(DIR* dirp);
+extern int readdir_r(DIR* dirp, struct dirent *entry, struct dirent **result);
+extern int closedir(DIR* dirp);
+extern void rewinddir(DIR *dirp);
+extern int dirfd(DIR* dirp);
+extern int alphasort(const void *a, const void *b);
+extern int scandir(const char *dir, struct dirent ***namelist,
+ int(*filter)(const struct dirent *),
+ int(*compar)(const struct dirent **,
+ const struct dirent **));
+
+__END_DECLS
+
+#endif /* _DIRENT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/dlfcn.h b/6/platforms/android-3/arch-x86/usr/include/dlfcn.h
new file mode 100644
index 0000000..9582796
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/dlfcn.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef __DLFCN_H__
+#define __DLFCN_H__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+extern void* dlopen(const char* filename, int flag);
+extern int dlclose(void* handle);
+extern const char* dlerror(void);
+extern void* dlsym(void* handle, const char* symbol);
+
+enum {
+ RTLD_NOW = 0,
+ RTLD_LAZY = 1,
+
+ RTLD_LOCAL = 0,
+ RTLD_GLOBAL = 2,
+};
+
+#define RTLD_DEFAULT ((void*) 0xffffffff)
+#define RTLD_NEXT ((void*) 0xfffffffe)
+
+__END_DECLS
+
+#endif /* __DLFCN_H */
+
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/elf.h b/6/platforms/android-3/arch-x86/usr/include/elf.h
new file mode 100644
index 0000000..8a86a63
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/elf.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ELF_H
+#define _ELF_H
+
+/* these definitions are missing from the BSD sources */
+enum {
+ AT_NULL = 0,
+ AT_IGNORE,
+ AT_EXECFD,
+ AT_PHDR,
+ AT_PHENT,
+ AT_PHNUM,
+ AT_PAGESZ,
+ AT_BASE,
+ AT_FLAGS,
+ AT_ENTRY,
+ AT_NOTELF,
+ AT_UID,
+ AT_EUID,
+ AT_GID,
+ AT_EGID,
+ AT_PLATFORM,
+ AT_HWCAP,
+ AT_CLKTCK,
+
+ AT_SECURE = 23
+};
+
+#include <sys/exec_elf.h>
+
+#endif /* _ELF_H */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/endian.h b/6/platforms/android-3/arch-x86/usr/include/endian.h
new file mode 100644
index 0000000..475b48c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/endian.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ENDIAN_H_
+#define _ENDIAN_H_
+
+#include <sys/endian.h>
+
+#endif /* _ENDIAN_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/err.h b/6/platforms/android-3/arch-x86/usr/include/err.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/err.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/errno.h b/6/platforms/android-3/arch-x86/usr/include/errno.h
new file mode 100644
index 0000000..2b2685a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/errno.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _ERRNO_H
+#define _ERRNO_H
+
+#include <sys/cdefs.h>
+#include <linux/errno.h>
+
+__BEGIN_DECLS
+
+/* on Linux, ENOTSUP and EOPNOTSUPP are defined as the same error code
+ * even if 1000.3 states that they should be different
+ */
+#ifndef ENOTUP
+#define ENOTSUP EOPNOTSUPP
+#endif
+
+/* internal function that should *only* be called from system calls */
+/* use errno = xxxx instead in C code */
+extern int __set_errno(int error);
+
+/* internal function returning the address of the thread-specific errno */
+extern volatile int* __errno(void);
+
+/* a macro expanding to the errno l-value */
+#define errno (*__errno())
+
+__END_DECLS
+
+#endif /* _ERRNO_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/fcntl.h b/6/platforms/android-3/arch-x86/usr/include/fcntl.h
new file mode 100644
index 0000000..7219dd7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/fcntl.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FCNTL_H
+#define _FCNTL_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/fcntl.h>
+#include <unistd.h> /* this is not required, but makes client code much happier */
+
+__BEGIN_DECLS
+
+#ifndef O_ASYNC
+#define O_ASYNC FASYNC
+#endif
+
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 02000000
+#endif
+
+extern int open(const char* path, int mode, ...);
+extern int openat(int fd, const char* path, int mode, ...);
+extern int unlinkat(int dirfd, const char *pathname, int flags);
+extern int fcntl(int fd, int command, ...);
+extern int creat(const char* path, mode_t mode);
+
+__END_DECLS
+
+#endif /* _FCNTL_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/features.h b/6/platforms/android-3/arch-x86/usr/include/features.h
new file mode 100644
index 0000000..343c84d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/features.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FEATURES_H_
+#define _FEATURES_H_
+
+/* certain Linux-specific programs expect a <features.h> header file
+ * that defines various features macros
+ */
+
+/* we do include a number of BSD extensions */
+#define _BSD_SOURCE 1
+
+/* we do include a number of GNU extensions */
+#define _GNU_SOURCE 1
+
+/* C95 support */
+#undef __USE_ISOC95
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L
+# define __USE_ISOC95 1
+#endif
+
+/* C99 support */
+#undef __USE_ISOC99
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+# define __USE_ISOC99 1
+#endif
+
+/* Posix support */
+#define __USE_POSIX 1
+#define __USE_POSIX2 1
+#define __USE_XPG 1
+
+#endif /* _FEATURES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/fnmatch.h b/6/platforms/android-3/arch-x86/usr/include/fnmatch.h
new file mode 100644
index 0000000..772b4ef
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/fnmatch.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _FNMATCH_H
+#define _FNMATCH_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define FNM_NOMATCH 1 /* Match failed. */
+#define FNM_NOSYS 2 /* Function not supported (unused). */
+
+#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
+#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
+#define FNM_PERIOD 0x04 /* Period must be matched by period. */
+#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
+#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
+
+#define FNM_IGNORECASE FNM_CASEFOLD
+#define FNM_FILE_NAME FNM_PATHNAME
+
+extern int fnmatch(const char *pattern, const char *string, int flags);
+
+__END_DECLS
+
+#endif /* _FNMATCH_H */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/getopt.h b/6/platforms/android-3/arch-x86/usr/include/getopt.h
new file mode 100644
index 0000000..ba3c4c9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/getopt.h
@@ -0,0 +1,90 @@
+/* $OpenBSD: getopt.h,v 1.1 2002/12/03 20:24:29 millert Exp $ */
+/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * GNU-like getopt_long() and 4.4BSD getsubopt()/optreset extensions
+ */
+#define no_argument 0
+#define required_argument 1
+#define optional_argument 2
+
+struct option {
+ /* name of long option */
+ const char *name;
+ /*
+ * one of no_argument, required_argument, and optional_argument:
+ * whether option takes an argument
+ */
+ int has_arg;
+ /* if not NULL, set *flag to val when option found */
+ int *flag;
+ /* if flag not NULL, value to set *flag to; else return value */
+ int val;
+};
+
+__BEGIN_DECLS
+int getopt_long(int, char * const *, const char *,
+ const struct option *, int *);
+int getopt_long_only(int, char * const *, const char *,
+ const struct option *, int *);
+#ifndef _GETOPT_DEFINED_
+#define _GETOPT_DEFINED_
+int getopt(int, char * const *, const char *);
+
+
+extern char *optarg; /* getopt(3) external variables */
+extern int opterr;
+extern int optind;
+extern int optopt;
+extern int optreset;
+
+#if 0 /* MISSING FROM BIONIC */
+int getsubopt(char **, char * const *, char **);
+extern char *suboptarg; /* getsubopt(3) external variable */
+#endif /* MISSING */
+
+#endif
+__END_DECLS
+
+#endif /* !_GETOPT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/grp.h b/6/platforms/android-3/arch-x86/usr/include/grp.h
new file mode 100644
index 0000000..7ddb791
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/grp.h
@@ -0,0 +1,85 @@
+/* $OpenBSD: grp.h,v 1.8 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)grp.h 8.2 (Berkeley) 1/21/94
+ */
+
+#ifndef _GRP_H_
+#define _GRP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#if __BSD_VISIBLE
+#define _PATH_GROUP "/etc/group"
+#endif
+
+struct group {
+ char *gr_name; /* group name */
+ char *gr_passwd; /* group password */
+ gid_t gr_gid; /* group id */
+ char **gr_mem; /* group members */
+};
+
+__BEGIN_DECLS
+struct group *getgrgid(gid_t);
+struct group *getgrnam(const char *);
+
+#if 0 /* MISSING FROM BIONIC */
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XPG_VISIBLE
+struct group *getgrent(void);
+void setgrent(void);
+void endgrent(void);
+int getgrgid_r(gid_t, struct group *, char *,
+ size_t, struct group **);
+int getgrnam_r(const char *, struct group *, char *,
+ size_t, struct group **);
+#endif
+#if __BSD_VISIBLE
+void setgrfile(const char *);
+int setgroupent(int);
+char *group_from_gid(gid_t, int);
+#endif
+#endif /* MISSING */
+
+int getgrouplist (const char *user, gid_t group,
+ gid_t *groups, int *ngroups);
+
+int initgroups (const char *user, gid_t group);
+
+__END_DECLS
+
+#endif /* !_GRP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/inttypes.h b/6/platforms/android-3/arch-x86/usr/include/inttypes.h
new file mode 100644
index 0000000..81d2315
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/inttypes.h
@@ -0,0 +1,261 @@
+/* $OpenBSD: inttypes.h,v 1.9 2006/01/15 00:47:51 millert Exp $ */
+
+/*
+ * Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _INTTYPES_H_
+#define _INTTYPES_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
+/*
+ * 7.8.1 Macros for format specifiers
+ *
+ * Each of the following object-like macros expands to a string
+ * literal containing a conversion specifier, possibly modified by
+ * a prefix such as hh, h, l, or ll, suitable for use within the
+ * format argument of a formatted input/output function when
+ * converting the corresponding integer type. These macro names
+ * have the general form of PRI (character string literals for the
+ * fprintf family) or SCN (character string literals for the fscanf
+ * family), followed by the conversion specifier, followed by a
+ * name corresponding to a similar typedef name. For example,
+ * PRIdFAST32 can be used in a format string to print the value of
+ * an integer of type int_fast32_t.
+ */
+
+/* fprintf macros for signed integers */
+#define PRId8 "d" /* int8_t */
+#define PRId16 "d" /* int16_t */
+#define PRId32 "d" /* int32_t */
+#define PRId64 "lld" /* int64_t */
+
+#define PRIdLEAST8 "d" /* int_least8_t */
+#define PRIdLEAST16 "d" /* int_least16_t */
+#define PRIdLEAST32 "d" /* int_least32_t */
+#define PRIdLEAST64 "lld" /* int_least64_t */
+
+#define PRIdFAST8 "d" /* int_fast8_t */
+#define PRIdFAST16 "d" /* int_fast16_t */
+#define PRIdFAST32 "d" /* int_fast32_t */
+#define PRIdFAST64 "lld" /* int_fast64_t */
+
+#define PRIdMAX "jd" /* intmax_t */
+#define PRIdPTR "ld" /* intptr_t */
+
+#define PRIi8 "i" /* int8_t */
+#define PRIi16 "i" /* int16_t */
+#define PRIi32 "i" /* int32_t */
+#define PRIi64 "lli" /* int64_t */
+
+#define PRIiLEAST8 "i" /* int_least8_t */
+#define PRIiLEAST16 "i" /* int_least16_t */
+#define PRIiLEAST32 "i" /* int_least32_t */
+#define PRIiLEAST64 "lli" /* int_least64_t */
+
+#define PRIiFAST8 "i" /* int_fast8_t */
+#define PRIiFAST16 "i" /* int_fast16_t */
+#define PRIiFAST32 "i" /* int_fast32_t */
+#define PRIiFAST64 "lli" /* int_fast64_t */
+
+#define PRIiMAX "ji" /* intmax_t */
+#define PRIiPTR "li" /* intptr_t */
+
+/* fprintf macros for unsigned integers */
+#define PRIo8 "o" /* int8_t */
+#define PRIo16 "o" /* int16_t */
+#define PRIo32 "o" /* int32_t */
+#define PRIo64 "llo" /* int64_t */
+
+#define PRIoLEAST8 "o" /* int_least8_t */
+#define PRIoLEAST16 "o" /* int_least16_t */
+#define PRIoLEAST32 "o" /* int_least32_t */
+#define PRIoLEAST64 "llo" /* int_least64_t */
+
+#define PRIoFAST8 "o" /* int_fast8_t */
+#define PRIoFAST16 "o" /* int_fast16_t */
+#define PRIoFAST32 "o" /* int_fast32_t */
+#define PRIoFAST64 "llo" /* int_fast64_t */
+
+#define PRIoMAX "jo" /* intmax_t */
+#define PRIoPTR "lo" /* intptr_t */
+
+#define PRIu8 "u" /* uint8_t */
+#define PRIu16 "u" /* uint16_t */
+#define PRIu32 "u" /* uint32_t */
+#define PRIu64 "llu" /* uint64_t */
+
+#define PRIuLEAST8 "u" /* uint_least8_t */
+#define PRIuLEAST16 "u" /* uint_least16_t */
+#define PRIuLEAST32 "u" /* uint_least32_t */
+#define PRIuLEAST64 "llu" /* uint_least64_t */
+
+#define PRIuFAST8 "u" /* uint_fast8_t */
+#define PRIuFAST16 "u" /* uint_fast16_t */
+#define PRIuFAST32 "u" /* uint_fast32_t */
+#define PRIuFAST64 "llu" /* uint_fast64_t */
+
+#define PRIuMAX "ju" /* uintmax_t */
+#define PRIuPTR "lu" /* uintptr_t */
+
+#define PRIx8 "x" /* uint8_t */
+#define PRIx16 "x" /* uint16_t */
+#define PRIx32 "x" /* uint32_t */
+#define PRIx64 "llx" /* uint64_t */
+
+#define PRIxLEAST8 "x" /* uint_least8_t */
+#define PRIxLEAST16 "x" /* uint_least16_t */
+#define PRIxLEAST32 "x" /* uint_least32_t */
+#define PRIxLEAST64 "llx" /* uint_least64_t */
+
+#define PRIxFAST8 "x" /* uint_fast8_t */
+#define PRIxFAST16 "x" /* uint_fast16_t */
+#define PRIxFAST32 "x" /* uint_fast32_t */
+#define PRIxFAST64 "llx" /* uint_fast64_t */
+
+#define PRIxMAX "jx" /* uintmax_t */
+#define PRIxPTR "lx" /* uintptr_t */
+
+#define PRIX8 "X" /* uint8_t */
+#define PRIX16 "X" /* uint16_t */
+#define PRIX32 "X" /* uint32_t */
+#define PRIX64 "llX" /* uint64_t */
+
+#define PRIXLEAST8 "X" /* uint_least8_t */
+#define PRIXLEAST16 "X" /* uint_least16_t */
+#define PRIXLEAST32 "X" /* uint_least32_t */
+#define PRIXLEAST64 "llX" /* uint_least64_t */
+
+#define PRIXFAST8 "X" /* uint_fast8_t */
+#define PRIXFAST16 "X" /* uint_fast16_t */
+#define PRIXFAST32 "X" /* uint_fast32_t */
+#define PRIXFAST64 "llX" /* uint_fast64_t */
+
+#define PRIXMAX "jX" /* uintmax_t */
+#define PRIXPTR "lX" /* uintptr_t */
+
+/* fscanf macros for signed integers */
+#define SCNd8 "hhd" /* int8_t */
+#define SCNd16 "hd" /* int16_t */
+#define SCNd32 "d" /* int32_t */
+#define SCNd64 "lld" /* int64_t */
+
+#define SCNdLEAST8 "hhd" /* int_least8_t */
+#define SCNdLEAST16 "hd" /* int_least16_t */
+#define SCNdLEAST32 "d" /* int_least32_t */
+#define SCNdLEAST64 "lld" /* int_least64_t */
+
+#define SCNdFAST8 "hhd" /* int_fast8_t */
+#define SCNdFAST16 "hd" /* int_fast16_t */
+#define SCNdFAST32 "d" /* int_fast32_t */
+#define SCNdFAST64 "lld" /* int_fast64_t */
+
+#define SCNdMAX "jd" /* intmax_t */
+#define SCNdPTR "ld" /* intptr_t */
+
+#define SCNi8 "hhi" /* int8_t */
+#define SCNi16 "hi" /* int16_t */
+#define SCNi32 "i" /* int32_t */
+#define SCNi64 "lli" /* int64_t */
+
+#define SCNiLEAST8 "hhi" /* int_least8_t */
+#define SCNiLEAST16 "hi" /* int_least16_t */
+#define SCNiLEAST32 "i" /* int_least32_t */
+#define SCNiLEAST64 "lli" /* int_least64_t */
+
+#define SCNiFAST8 "hhi" /* int_fast8_t */
+#define SCNiFAST16 "hi" /* int_fast16_t */
+#define SCNiFAST32 "i" /* int_fast32_t */
+#define SCNiFAST64 "lli" /* int_fast64_t */
+
+#define SCNiMAX "ji" /* intmax_t */
+#define SCNiPTR "li" /* intptr_t */
+
+/* fscanf macros for unsigned integers */
+#define SCNo8 "hho" /* uint8_t */
+#define SCNo16 "ho" /* uint16_t */
+#define SCNo32 "o" /* uint32_t */
+#define SCNo64 "llo" /* uint64_t */
+
+#define SCNoLEAST8 "hho" /* uint_least8_t */
+#define SCNoLEAST16 "ho" /* uint_least16_t */
+#define SCNoLEAST32 "o" /* uint_least32_t */
+#define SCNoLEAST64 "llo" /* uint_least64_t */
+
+#define SCNoFAST8 "hho" /* uint_fast8_t */
+#define SCNoFAST16 "ho" /* uint_fast16_t */
+#define SCNoFAST32 "o" /* uint_fast32_t */
+#define SCNoFAST64 "llo" /* uint_fast64_t */
+
+#define SCNoMAX "jo" /* uintmax_t */
+#define SCNoPTR "lo" /* uintptr_t */
+
+#define SCNu8 "hhu" /* uint8_t */
+#define SCNu16 "hu" /* uint16_t */
+#define SCNu32 "u" /* uint32_t */
+#define SCNu64 "llu" /* uint64_t */
+
+#define SCNuLEAST8 "hhu" /* uint_least8_t */
+#define SCNuLEAST16 "hu" /* uint_least16_t */
+#define SCNuLEAST32 "u" /* uint_least32_t */
+#define SCNuLEAST64 "llu" /* uint_least64_t */
+
+#define SCNuFAST8 "hhu" /* uint_fast8_t */
+#define SCNuFAST16 "hu" /* uint_fast16_t */
+#define SCNuFAST32 "u" /* uint_fast32_t */
+#define SCNuFAST64 "llu" /* uint_fast64_t */
+
+#define SCNuMAX "ju" /* uintmax_t */
+#define SCNuPTR "lu" /* uintptr_t */
+
+#define SCNx8 "hhx" /* uint8_t */
+#define SCNx16 "hx" /* uint16_t */
+#define SCNx32 "x" /* uint32_t */
+#define SCNx64 "llx" /* uint64_t */
+
+#define SCNxLEAST8 "hhx" /* uint_least8_t */
+#define SCNxLEAST16 "hx" /* uint_least16_t */
+#define SCNxLEAST32 "x" /* uint_least32_t */
+#define SCNxLEAST64 "llx" /* uint_least64_t */
+
+#define SCNxFAST8 "hhx" /* uint_fast8_t */
+#define SCNxFAST16 "hx" /* uint_fast16_t */
+#define SCNxFAST32 "x" /* uint_fast32_t */
+#define SCNxFAST64 "llx" /* uint_fast64_t */
+
+#define SCNxMAX "jx" /* uintmax_t */
+#define SCNxPTR "lx" /* uintptr_t */
+
+#endif /* __cplusplus || __STDC_FORMAT_MACROS */
+
+typedef struct {
+ intmax_t quot; /* quotient */
+ intmax_t rem; /* remainder */
+} imaxdiv_t;
+
+__BEGIN_DECLS
+intmax_t imaxabs(intmax_t);
+imaxdiv_t imaxdiv(intmax_t, intmax_t);
+intmax_t strtoimax(const char *, char **, int);
+uintmax_t strtoumax(const char *, char **, int);
+
+intmax_t strntoimax(const char *nptr, char **endptr, int base, size_t n);
+uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n);
+__END_DECLS
+
+#endif /* _INTTYPES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/jni.h b/6/platforms/android-3/arch-x86/usr/include/jni.h
new file mode 100644
index 0000000..ad954c8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/jni.h
@@ -0,0 +1,1140 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ *
+ * JNI specification, as defined by Sun:
+ * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html
+ *
+ * Everything here is expected to be VM-neutral.
+ */
+#ifndef _JNI_H
+#define _JNI_H
+
+#include <stdarg.h>
+
+/*
+ * Primitive types that match up with Java equivalents.
+ */
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h> /* C99 */
+typedef uint8_t jboolean; /* unsigned 8 bits */
+typedef int8_t jbyte; /* signed 8 bits */
+typedef uint16_t jchar; /* unsigned 16 bits */
+typedef int16_t jshort; /* signed 16 bits */
+typedef int32_t jint; /* signed 32 bits */
+typedef int64_t jlong; /* signed 64 bits */
+typedef float jfloat; /* 32-bit IEEE 754 */
+typedef double jdouble; /* 64-bit IEEE 754 */
+#else
+typedef unsigned char jboolean; /* unsigned 8 bits */
+typedef signed char jbyte; /* signed 8 bits */
+typedef unsigned short jchar; /* unsigned 16 bits */
+typedef short jshort; /* signed 16 bits */
+typedef int jint; /* signed 32 bits */
+typedef long long jlong; /* signed 64 bits */
+typedef float jfloat; /* 32-bit IEEE 754 */
+typedef double jdouble; /* 64-bit IEEE 754 */
+#endif
+
+/* "cardinal indices and sizes" */
+typedef jint jsize;
+
+#ifdef __cplusplus
+/*
+ * Reference types, in C++
+ */
+class _jobject {};
+class _jclass : public _jobject {};
+class _jstring : public _jobject {};
+class _jarray : public _jobject {};
+class _jobjectArray : public _jarray {};
+class _jbooleanArray : public _jarray {};
+class _jbyteArray : public _jarray {};
+class _jcharArray : public _jarray {};
+class _jshortArray : public _jarray {};
+class _jintArray : public _jarray {};
+class _jlongArray : public _jarray {};
+class _jfloatArray : public _jarray {};
+class _jdoubleArray : public _jarray {};
+class _jthrowable : public _jobject {};
+
+typedef _jobject* jobject;
+typedef _jclass* jclass;
+typedef _jstring* jstring;
+typedef _jarray* jarray;
+typedef _jobjectArray* jobjectArray;
+typedef _jbooleanArray* jbooleanArray;
+typedef _jbyteArray* jbyteArray;
+typedef _jcharArray* jcharArray;
+typedef _jshortArray* jshortArray;
+typedef _jintArray* jintArray;
+typedef _jlongArray* jlongArray;
+typedef _jfloatArray* jfloatArray;
+typedef _jdoubleArray* jdoubleArray;
+typedef _jthrowable* jthrowable;
+typedef _jobject* jweak;
+
+
+#else /* not __cplusplus */
+
+/*
+ * Reference types, in C.
+ */
+typedef void* jobject;
+typedef jobject jclass;
+typedef jobject jstring;
+typedef jobject 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;
+typedef jobject jthrowable;
+typedef jobject jweak;
+
+#endif /* not __cplusplus */
+
+struct _jfieldID; /* opaque structure */
+typedef struct _jfieldID* jfieldID; /* field IDs */
+
+struct _jmethodID; /* opaque structure */
+typedef struct _jmethodID* jmethodID; /* method IDs */
+
+struct JNIInvokeInterface;
+
+typedef union jvalue {
+ jboolean z;
+ jbyte b;
+ jchar c;
+ jshort s;
+ jint i;
+ jlong j;
+ jfloat f;
+ jdouble d;
+ jobject l;
+} jvalue;
+
+typedef enum jobjectRefType {
+ JNIInvalidRefType = 0,
+ JNILocalRefType = 1,
+ JNIGlobalRefType = 2,
+ JNIWeakGlobalRefType = 3
+} jobjectRefType;
+
+typedef struct {
+ const char* name;
+ const char* signature;
+ void* fnPtr;
+} JNINativeMethod;
+
+struct _JNIEnv;
+struct _JavaVM;
+typedef const struct JNINativeInterface* C_JNIEnv;
+
+#if defined(__cplusplus)
+typedef _JNIEnv JNIEnv;
+typedef _JavaVM JavaVM;
+#else
+typedef const struct JNINativeInterface* JNIEnv;
+typedef const struct JNIInvokeInterface* JavaVM;
+#endif
+
+/*
+ * Table of interface function pointers.
+ */
+struct JNINativeInterface {
+ void* reserved0;
+ void* reserved1;
+ void* reserved2;
+ void* reserved3;
+
+ jint (*GetVersion)(JNIEnv *);
+
+ jclass (*DefineClass)(JNIEnv*, const char*, jobject, const jbyte*,
+ jsize);
+ jclass (*FindClass)(JNIEnv*, const char*);
+
+ jmethodID (*FromReflectedMethod)(JNIEnv*, jobject);
+ jfieldID (*FromReflectedField)(JNIEnv*, jobject);
+ /* spec doesn't show jboolean parameter */
+ jobject (*ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean);
+
+ jclass (*GetSuperclass)(JNIEnv*, jclass);
+ jboolean (*IsAssignableFrom)(JNIEnv*, jclass, jclass);
+
+ /* spec doesn't show jboolean parameter */
+ jobject (*ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean);
+
+ jint (*Throw)(JNIEnv*, jthrowable);
+ jint (*ThrowNew)(JNIEnv *, jclass, const char *);
+ jthrowable (*ExceptionOccurred)(JNIEnv*);
+ void (*ExceptionDescribe)(JNIEnv*);
+ void (*ExceptionClear)(JNIEnv*);
+ void (*FatalError)(JNIEnv*, const char*);
+
+ jint (*PushLocalFrame)(JNIEnv*, jint);
+ jobject (*PopLocalFrame)(JNIEnv*, jobject);
+
+ jobject (*NewGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteLocalRef)(JNIEnv*, jobject);
+ jboolean (*IsSameObject)(JNIEnv*, jobject, jobject);
+
+ jobject (*NewLocalRef)(JNIEnv*, jobject);
+ jint (*EnsureLocalCapacity)(JNIEnv*, jint);
+
+ jobject (*AllocObject)(JNIEnv*, jclass);
+ jobject (*NewObject)(JNIEnv*, jclass, jmethodID, ...);
+ jobject (*NewObjectV)(JNIEnv*, jclass, jmethodID, va_list);
+ jobject (*NewObjectA)(JNIEnv*, jclass, jmethodID, jvalue*);
+
+ jclass (*GetObjectClass)(JNIEnv*, jobject);
+ jboolean (*IsInstanceOf)(JNIEnv*, jobject, jclass);
+ jmethodID (*GetMethodID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jobject (*CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jobject (*CallObjectMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jboolean (*CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jboolean (*CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jboolean (*CallBooleanMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jbyte (*CallByteMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jbyte (*CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jbyte (*CallByteMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jchar (*CallCharMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jchar (*CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jchar (*CallCharMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jshort (*CallShortMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jshort (*CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jshort (*CallShortMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jint (*CallIntMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jint (*CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jint (*CallIntMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...);
+ jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+ void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...);
+ void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list);
+ void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*);
+
+ jobject (*CallNonvirtualObjectMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jobject (*CallNonvirtualObjectMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jobject (*CallNonvirtualObjectMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jboolean (*CallNonvirtualBooleanMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jboolean (*CallNonvirtualBooleanMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jboolean (*CallNonvirtualBooleanMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jbyte (*CallNonvirtualByteMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jbyte (*CallNonvirtualByteMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jbyte (*CallNonvirtualByteMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jchar (*CallNonvirtualCharMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jchar (*CallNonvirtualCharMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jchar (*CallNonvirtualCharMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jshort (*CallNonvirtualShortMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jshort (*CallNonvirtualShortMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jshort (*CallNonvirtualShortMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jint (*CallNonvirtualIntMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jint (*CallNonvirtualIntMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jint (*CallNonvirtualIntMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jlong (*CallNonvirtualLongMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jlong (*CallNonvirtualLongMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+ void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass,
+ jmethodID, ...);
+ void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass,
+ jmethodID, va_list);
+ void (*CallNonvirtualVoidMethodA)(JNIEnv*, jobject, jclass,
+ jmethodID, jvalue*);
+
+ jfieldID (*GetFieldID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*GetObjectField)(JNIEnv*, jobject, jfieldID);
+ jboolean (*GetBooleanField)(JNIEnv*, jobject, jfieldID);
+ jbyte (*GetByteField)(JNIEnv*, jobject, jfieldID);
+ jchar (*GetCharField)(JNIEnv*, jobject, jfieldID);
+ jshort (*GetShortField)(JNIEnv*, jobject, jfieldID);
+ jint (*GetIntField)(JNIEnv*, jobject, jfieldID);
+ jlong (*GetLongField)(JNIEnv*, jobject, jfieldID);
+ jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID);
+ jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID);
+
+ void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject);
+ void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean);
+ void (*SetByteField)(JNIEnv*, jobject, jfieldID, jbyte);
+ void (*SetCharField)(JNIEnv*, jobject, jfieldID, jchar);
+ void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort);
+ void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint);
+ void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong);
+ void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat);
+ void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble);
+
+ jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*);
+
+ jobject (*CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jobject (*CallStaticObjectMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jobject (*CallStaticObjectMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jboolean (*CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jboolean (*CallStaticBooleanMethodV)(JNIEnv*, jclass, jmethodID,
+ va_list);
+ jboolean (*CallStaticBooleanMethodA)(JNIEnv*, jclass, jmethodID,
+ jvalue*);
+ jbyte (*CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jbyte (*CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jbyte (*CallStaticByteMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jchar (*CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jchar (*CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jchar (*CallStaticCharMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jshort (*CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jshort (*CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jshort (*CallStaticShortMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jint (*CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jint (*CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jint (*CallStaticIntMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...);
+ jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+ void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...);
+ void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list);
+ void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*);
+
+ jfieldID (*GetStaticFieldID)(JNIEnv*, jclass, const char*,
+ const char*);
+
+ jobject (*GetStaticObjectField)(JNIEnv*, jclass, jfieldID);
+ jboolean (*GetStaticBooleanField)(JNIEnv*, jclass, jfieldID);
+ jbyte (*GetStaticByteField)(JNIEnv*, jclass, jfieldID);
+ jchar (*GetStaticCharField)(JNIEnv*, jclass, jfieldID);
+ jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID);
+ jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID);
+ jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID);
+ jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID);
+ jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID);
+
+ void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject);
+ void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean);
+ void (*SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte);
+ void (*SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar);
+ void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort);
+ void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint);
+ void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong);
+ void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat);
+ void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble);
+
+ jstring (*NewString)(JNIEnv*, const jchar*, jsize);
+ jsize (*GetStringLength)(JNIEnv*, jstring);
+ const jchar* (*GetStringChars)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringChars)(JNIEnv*, jstring, const jchar*);
+ jstring (*NewStringUTF)(JNIEnv*, const char*);
+ jsize (*GetStringUTFLength)(JNIEnv*, jstring);
+ /* JNI spec says this returns const jbyte*, but that's inconsistent */
+ const char* (*GetStringUTFChars)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringUTFChars)(JNIEnv*, jstring, const char*);
+ jsize (*GetArrayLength)(JNIEnv*, jarray);
+ jobjectArray (*NewObjectArray)(JNIEnv*, jsize, jclass, jobject);
+ jobject (*GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize);
+ void (*SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject);
+
+ jbooleanArray (*NewBooleanArray)(JNIEnv*, jsize);
+ jbyteArray (*NewByteArray)(JNIEnv*, jsize);
+ jcharArray (*NewCharArray)(JNIEnv*, jsize);
+ jshortArray (*NewShortArray)(JNIEnv*, jsize);
+ jintArray (*NewIntArray)(JNIEnv*, jsize);
+ jlongArray (*NewLongArray)(JNIEnv*, jsize);
+ jfloatArray (*NewFloatArray)(JNIEnv*, jsize);
+ jdoubleArray (*NewDoubleArray)(JNIEnv*, jsize);
+
+ jboolean* (*GetBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*);
+ jbyte* (*GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*);
+ jchar* (*GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*);
+ jshort* (*GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*);
+ jint* (*GetIntArrayElements)(JNIEnv*, jintArray, jboolean*);
+ jlong* (*GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*);
+ jfloat* (*GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*);
+ jdouble* (*GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*);
+
+ void (*ReleaseBooleanArrayElements)(JNIEnv*, jbooleanArray,
+ jboolean*, jint);
+ void (*ReleaseByteArrayElements)(JNIEnv*, jbyteArray,
+ jbyte*, jint);
+ void (*ReleaseCharArrayElements)(JNIEnv*, jcharArray,
+ jchar*, jint);
+ void (*ReleaseShortArrayElements)(JNIEnv*, jshortArray,
+ jshort*, jint);
+ void (*ReleaseIntArrayElements)(JNIEnv*, jintArray,
+ jint*, jint);
+ void (*ReleaseLongArrayElements)(JNIEnv*, jlongArray,
+ jlong*, jint);
+ void (*ReleaseFloatArrayElements)(JNIEnv*, jfloatArray,
+ jfloat*, jint);
+ void (*ReleaseDoubleArrayElements)(JNIEnv*, jdoubleArray,
+ jdouble*, jint);
+
+ void (*GetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
+ jsize, jsize, jboolean*);
+ void (*GetByteArrayRegion)(JNIEnv*, jbyteArray,
+ jsize, jsize, jbyte*);
+ void (*GetCharArrayRegion)(JNIEnv*, jcharArray,
+ jsize, jsize, jchar*);
+ void (*GetShortArrayRegion)(JNIEnv*, jshortArray,
+ jsize, jsize, jshort*);
+ void (*GetIntArrayRegion)(JNIEnv*, jintArray,
+ jsize, jsize, jint*);
+ void (*GetLongArrayRegion)(JNIEnv*, jlongArray,
+ jsize, jsize, jlong*);
+ void (*GetFloatArrayRegion)(JNIEnv*, jfloatArray,
+ jsize, jsize, jfloat*);
+ void (*GetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
+ jsize, jsize, jdouble*);
+
+ /* spec shows these without const; some jni.h do, some don't */
+ void (*SetBooleanArrayRegion)(JNIEnv*, jbooleanArray,
+ jsize, jsize, const jboolean*);
+ void (*SetByteArrayRegion)(JNIEnv*, jbyteArray,
+ jsize, jsize, const jbyte*);
+ void (*SetCharArrayRegion)(JNIEnv*, jcharArray,
+ jsize, jsize, const jchar*);
+ void (*SetShortArrayRegion)(JNIEnv*, jshortArray,
+ jsize, jsize, const jshort*);
+ void (*SetIntArrayRegion)(JNIEnv*, jintArray,
+ jsize, jsize, const jint*);
+ void (*SetLongArrayRegion)(JNIEnv*, jlongArray,
+ jsize, jsize, const jlong*);
+ void (*SetFloatArrayRegion)(JNIEnv*, jfloatArray,
+ jsize, jsize, const jfloat*);
+ void (*SetDoubleArrayRegion)(JNIEnv*, jdoubleArray,
+ jsize, jsize, const jdouble*);
+
+ jint (*RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*,
+ jint);
+ jint (*UnregisterNatives)(JNIEnv*, jclass);
+ jint (*MonitorEnter)(JNIEnv*, jobject);
+ jint (*MonitorExit)(JNIEnv*, jobject);
+ jint (*GetJavaVM)(JNIEnv*, JavaVM**);
+
+ void (*GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*);
+ void (*GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*);
+
+ void* (*GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*);
+ void (*ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint);
+
+ const jchar* (*GetStringCritical)(JNIEnv*, jstring, jboolean*);
+ void (*ReleaseStringCritical)(JNIEnv*, jstring, const jchar*);
+
+ jweak (*NewWeakGlobalRef)(JNIEnv*, jobject);
+ void (*DeleteWeakGlobalRef)(JNIEnv*, jweak);
+
+ jboolean (*ExceptionCheck)(JNIEnv*);
+
+ jobject (*NewDirectByteBuffer)(JNIEnv*, void*, jlong);
+ void* (*GetDirectBufferAddress)(JNIEnv*, jobject);
+ jlong (*GetDirectBufferCapacity)(JNIEnv*, jobject);
+
+ /* added in JNI 1.6 */
+ jobjectRefType (*GetObjectRefType)(JNIEnv*, jobject);
+};
+
+/*
+ * C++ object wrapper.
+ *
+ * This is usually overlaid on a C struct whose first element is a
+ * JNINativeInterface*. We rely somewhat on compiler behavior.
+ */
+struct _JNIEnv {
+ /* do not rename this; it does not seem to be entirely opaque */
+ const struct JNINativeInterface* functions;
+
+#if defined(__cplusplus)
+
+ jint GetVersion()
+ { return functions->GetVersion(this); }
+
+ jclass DefineClass(const char *name, jobject loader, const jbyte* buf,
+ jsize bufLen)
+ { return functions->DefineClass(this, name, loader, buf, bufLen); }
+
+ jclass FindClass(const char* name)
+ { return functions->FindClass(this, name); }
+
+ jmethodID FromReflectedMethod(jobject method)
+ { return functions->FromReflectedMethod(this, method); }
+
+ jfieldID FromReflectedField(jobject field)
+ { return functions->FromReflectedField(this, field); }
+
+ jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic)
+ { return functions->ToReflectedMethod(this, cls, methodID, isStatic); }
+
+ jclass GetSuperclass(jclass clazz)
+ { return functions->GetSuperclass(this, clazz); }
+
+ jboolean IsAssignableFrom(jclass clazz1, jclass clazz2)
+ { return functions->IsAssignableFrom(this, clazz1, clazz2); }
+
+ jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic)
+ { return functions->ToReflectedField(this, cls, fieldID, isStatic); }
+
+ jint Throw(jthrowable obj)
+ { return functions->Throw(this, obj); }
+
+ jint ThrowNew(jclass clazz, const char* message)
+ { return functions->ThrowNew(this, clazz, message); }
+
+ jthrowable ExceptionOccurred()
+ { return functions->ExceptionOccurred(this); }
+
+ void ExceptionDescribe()
+ { functions->ExceptionDescribe(this); }
+
+ void ExceptionClear()
+ { functions->ExceptionClear(this); }
+
+ void FatalError(const char* msg)
+ { functions->FatalError(this, msg); }
+
+ jint PushLocalFrame(jint capacity)
+ { return functions->PushLocalFrame(this, capacity); }
+
+ jobject PopLocalFrame(jobject result)
+ { return functions->PopLocalFrame(this, result); }
+
+ jobject NewGlobalRef(jobject obj)
+ { return functions->NewGlobalRef(this, obj); }
+
+ void DeleteGlobalRef(jobject globalRef)
+ { functions->DeleteGlobalRef(this, globalRef); }
+
+ void DeleteLocalRef(jobject localRef)
+ { functions->DeleteLocalRef(this, localRef); }
+
+ jboolean IsSameObject(jobject ref1, jobject ref2)
+ { return functions->IsSameObject(this, ref1, ref2); }
+
+ jobject NewLocalRef(jobject ref)
+ { return functions->NewLocalRef(this, ref); }
+
+ jint EnsureLocalCapacity(jint capacity)
+ { return functions->EnsureLocalCapacity(this, capacity); }
+
+ jobject AllocObject(jclass clazz)
+ { return functions->AllocObject(this, clazz); }
+
+ jobject NewObject(jclass clazz, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ jobject result = functions->NewObjectV(this, clazz, methodID, args);
+ va_end(args);
+ return result;
+ }
+
+ jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args)
+ { return functions->NewObjectV(this, clazz, methodID, args); }
+
+ jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue* args)
+ { return functions->NewObjectA(this, clazz, methodID, args); }
+
+ jclass GetObjectClass(jobject obj)
+ { return functions->GetObjectClass(this, obj); }
+
+ jboolean IsInstanceOf(jobject obj, jclass clazz)
+ { return functions->IsInstanceOf(this, obj, clazz); }
+
+ jmethodID GetMethodID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetMethodID(this, clazz, name, sig); }
+
+#define CALL_TYPE_METHOD(_jtype, _jname) \
+ _jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->Call##_jname##MethodV(this, obj, methodID, \
+ args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_TYPE_METHODV(_jtype, _jname) \
+ _jtype Call##_jname##MethodV(jobject obj, jmethodID methodID, \
+ va_list args) \
+ { return functions->Call##_jname##MethodV(this, obj, methodID, args); }
+#define CALL_TYPE_METHODA(_jtype, _jname) \
+ _jtype Call##_jname##MethodA(jobject obj, jmethodID methodID, \
+ jvalue* args) \
+ { return functions->Call##_jname##MethodA(this, obj, methodID, args); }
+
+#define CALL_TYPE(_jtype, _jname) \
+ CALL_TYPE_METHOD(_jtype, _jname) \
+ CALL_TYPE_METHODV(_jtype, _jname) \
+ CALL_TYPE_METHODA(_jtype, _jname)
+
+ CALL_TYPE(jobject, Object)
+ CALL_TYPE(jboolean, Boolean)
+ CALL_TYPE(jbyte, Byte)
+ CALL_TYPE(jchar, Char)
+ CALL_TYPE(jshort, Short)
+ CALL_TYPE(jint, Int)
+ CALL_TYPE(jlong, Long)
+ CALL_TYPE(jfloat, Float)
+ CALL_TYPE(jdouble, Double)
+
+ void CallVoidMethod(jobject obj, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallVoidMethodV(this, obj, methodID, args);
+ va_end(args);
+ }
+ void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args)
+ { functions->CallVoidMethodV(this, obj, methodID, args); }
+ void CallVoidMethodA(jobject obj, jmethodID methodID, jvalue* args)
+ { functions->CallVoidMethodA(this, obj, methodID, args); }
+
+#define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz, \
+ jmethodID methodID, ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->CallNonvirtual##_jname##MethodV(this, obj, \
+ clazz, methodID, args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz, \
+ jmethodID methodID, va_list args) \
+ { return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz, \
+ methodID, args); }
+#define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) \
+ _jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz, \
+ jmethodID methodID, jvalue* args) \
+ { return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz, \
+ methodID, args); }
+
+#define CALL_NONVIRT_TYPE(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \
+ CALL_NONVIRT_TYPE_METHODA(_jtype, _jname)
+
+ CALL_NONVIRT_TYPE(jobject, Object)
+ CALL_NONVIRT_TYPE(jboolean, Boolean)
+ CALL_NONVIRT_TYPE(jbyte, Byte)
+ CALL_NONVIRT_TYPE(jchar, Char)
+ CALL_NONVIRT_TYPE(jshort, Short)
+ CALL_NONVIRT_TYPE(jint, Int)
+ CALL_NONVIRT_TYPE(jlong, Long)
+ CALL_NONVIRT_TYPE(jfloat, Float)
+ CALL_NONVIRT_TYPE(jdouble, Double)
+
+ void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
+ jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args);
+ va_end(args);
+ }
+ void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
+ jmethodID methodID, va_list args)
+ { functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); }
+ void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
+ jmethodID methodID, jvalue* args)
+ { functions->CallNonvirtualVoidMethodA(this, obj, clazz, methodID, args); }
+
+ jfieldID GetFieldID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetFieldID(this, clazz, name, sig); }
+
+ jobject GetObjectField(jobject obj, jfieldID fieldID)
+ { return functions->GetObjectField(this, obj, fieldID); }
+ jboolean GetBooleanField(jobject obj, jfieldID fieldID)
+ { return functions->GetBooleanField(this, obj, fieldID); }
+ jbyte GetByteField(jobject obj, jfieldID fieldID)
+ { return functions->GetByteField(this, obj, fieldID); }
+ jchar GetCharField(jobject obj, jfieldID fieldID)
+ { return functions->GetCharField(this, obj, fieldID); }
+ jshort GetShortField(jobject obj, jfieldID fieldID)
+ { return functions->GetShortField(this, obj, fieldID); }
+ jint GetIntField(jobject obj, jfieldID fieldID)
+ { return functions->GetIntField(this, obj, fieldID); }
+ jlong GetLongField(jobject obj, jfieldID fieldID)
+ { return functions->GetLongField(this, obj, fieldID); }
+ jfloat GetFloatField(jobject obj, jfieldID fieldID)
+ { return functions->GetFloatField(this, obj, fieldID); }
+ jdouble GetDoubleField(jobject obj, jfieldID fieldID)
+ { return functions->GetDoubleField(this, obj, fieldID); }
+
+ void SetObjectField(jobject obj, jfieldID fieldID, jobject value)
+ { functions->SetObjectField(this, obj, fieldID, value); }
+ void SetBooleanField(jobject obj, jfieldID fieldID, jboolean value)
+ { functions->SetBooleanField(this, obj, fieldID, value); }
+ void SetByteField(jobject obj, jfieldID fieldID, jbyte value)
+ { functions->SetByteField(this, obj, fieldID, value); }
+ void SetCharField(jobject obj, jfieldID fieldID, jchar value)
+ { functions->SetCharField(this, obj, fieldID, value); }
+ void SetShortField(jobject obj, jfieldID fieldID, jshort value)
+ { functions->SetShortField(this, obj, fieldID, value); }
+ void SetIntField(jobject obj, jfieldID fieldID, jint value)
+ { functions->SetIntField(this, obj, fieldID, value); }
+ void SetLongField(jobject obj, jfieldID fieldID, jlong value)
+ { functions->SetLongField(this, obj, fieldID, value); }
+ void SetFloatField(jobject obj, jfieldID fieldID, jfloat value)
+ { functions->SetFloatField(this, obj, fieldID, value); }
+ void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value)
+ { functions->SetDoubleField(this, obj, fieldID, value); }
+
+ jmethodID GetStaticMethodID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetStaticMethodID(this, clazz, name, sig); }
+
+#define CALL_STATIC_TYPE_METHOD(_jtype, _jname) \
+ _jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID, \
+ ...) \
+ { \
+ _jtype result; \
+ va_list args; \
+ va_start(args, methodID); \
+ result = functions->CallStatic##_jname##MethodV(this, clazz, \
+ methodID, args); \
+ va_end(args); \
+ return result; \
+ }
+#define CALL_STATIC_TYPE_METHODV(_jtype, _jname) \
+ _jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID, \
+ va_list args) \
+ { return functions->CallStatic##_jname##MethodV(this, clazz, methodID, \
+ args); }
+#define CALL_STATIC_TYPE_METHODA(_jtype, _jname) \
+ _jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID, \
+ jvalue* args) \
+ { return functions->CallStatic##_jname##MethodA(this, clazz, methodID, \
+ args); }
+
+#define CALL_STATIC_TYPE(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHOD(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHODV(_jtype, _jname) \
+ CALL_STATIC_TYPE_METHODA(_jtype, _jname)
+
+ CALL_STATIC_TYPE(jobject, Object)
+ CALL_STATIC_TYPE(jboolean, Boolean)
+ CALL_STATIC_TYPE(jbyte, Byte)
+ CALL_STATIC_TYPE(jchar, Char)
+ CALL_STATIC_TYPE(jshort, Short)
+ CALL_STATIC_TYPE(jint, Int)
+ CALL_STATIC_TYPE(jlong, Long)
+ CALL_STATIC_TYPE(jfloat, Float)
+ CALL_STATIC_TYPE(jdouble, Double)
+
+ void CallStaticVoidMethod(jclass clazz, jmethodID methodID, ...)
+ {
+ va_list args;
+ va_start(args, methodID);
+ functions->CallStaticVoidMethodV(this, clazz, methodID, args);
+ va_end(args);
+ }
+ void CallStaticVoidMethodV(jclass clazz, jmethodID methodID, va_list args)
+ { functions->CallStaticVoidMethodV(this, clazz, methodID, args); }
+ void CallStaticVoidMethodA(jclass clazz, jmethodID methodID, jvalue* args)
+ { functions->CallStaticVoidMethodA(this, clazz, methodID, args); }
+
+ jfieldID GetStaticFieldID(jclass clazz, const char* name, const char* sig)
+ { return functions->GetStaticFieldID(this, clazz, name, sig); }
+
+ jobject GetStaticObjectField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticObjectField(this, clazz, fieldID); }
+ jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticBooleanField(this, clazz, fieldID); }
+ jbyte GetStaticByteField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticByteField(this, clazz, fieldID); }
+ jchar GetStaticCharField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticCharField(this, clazz, fieldID); }
+ jshort GetStaticShortField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticShortField(this, clazz, fieldID); }
+ jint GetStaticIntField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticIntField(this, clazz, fieldID); }
+ jlong GetStaticLongField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticLongField(this, clazz, fieldID); }
+ jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticFloatField(this, clazz, fieldID); }
+ jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID)
+ { return functions->GetStaticDoubleField(this, clazz, fieldID); }
+
+ void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value)
+ { functions->SetStaticObjectField(this, clazz, fieldID, value); }
+ void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value)
+ { functions->SetStaticBooleanField(this, clazz, fieldID, value); }
+ void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value)
+ { functions->SetStaticByteField(this, clazz, fieldID, value); }
+ void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value)
+ { functions->SetStaticCharField(this, clazz, fieldID, value); }
+ void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value)
+ { functions->SetStaticShortField(this, clazz, fieldID, value); }
+ void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value)
+ { functions->SetStaticIntField(this, clazz, fieldID, value); }
+ void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value)
+ { functions->SetStaticLongField(this, clazz, fieldID, value); }
+ void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value)
+ { functions->SetStaticFloatField(this, clazz, fieldID, value); }
+ void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value)
+ { functions->SetStaticDoubleField(this, clazz, fieldID, value); }
+
+ jstring NewString(const jchar* unicodeChars, jsize len)
+ { return functions->NewString(this, unicodeChars, len); }
+
+ jsize GetStringLength(jstring string)
+ { return functions->GetStringLength(this, string); }
+
+ const jchar* GetStringChars(jstring string, jboolean* isCopy)
+ { return functions->GetStringChars(this, string, isCopy); }
+
+ void ReleaseStringChars(jstring string, const jchar* chars)
+ { functions->ReleaseStringChars(this, string, chars); }
+
+ jstring NewStringUTF(const char* bytes)
+ { return functions->NewStringUTF(this, bytes); }
+
+ jsize GetStringUTFLength(jstring string)
+ { return functions->GetStringUTFLength(this, string); }
+
+ const char* GetStringUTFChars(jstring string, jboolean* isCopy)
+ { return functions->GetStringUTFChars(this, string, isCopy); }
+
+ void ReleaseStringUTFChars(jstring string, const char* utf)
+ { functions->ReleaseStringUTFChars(this, string, utf); }
+
+ jsize GetArrayLength(jarray array)
+ { return functions->GetArrayLength(this, array); }
+
+ jobjectArray NewObjectArray(jsize length, jclass elementClass,
+ jobject initialElement)
+ { return functions->NewObjectArray(this, length, elementClass,
+ initialElement); }
+
+ jobject GetObjectArrayElement(jobjectArray array, jsize index)
+ { return functions->GetObjectArrayElement(this, array, index); }
+
+ void SetObjectArrayElement(jobjectArray array, jsize index, jobject value)
+ { functions->SetObjectArrayElement(this, array, index, value); }
+
+ jbooleanArray NewBooleanArray(jsize length)
+ { return functions->NewBooleanArray(this, length); }
+ jbyteArray NewByteArray(jsize length)
+ { return functions->NewByteArray(this, length); }
+ jcharArray NewCharArray(jsize length)
+ { return functions->NewCharArray(this, length); }
+ jshortArray NewShortArray(jsize length)
+ { return functions->NewShortArray(this, length); }
+ jintArray NewIntArray(jsize length)
+ { return functions->NewIntArray(this, length); }
+ jlongArray NewLongArray(jsize length)
+ { return functions->NewLongArray(this, length); }
+ jfloatArray NewFloatArray(jsize length)
+ { return functions->NewFloatArray(this, length); }
+ jdoubleArray NewDoubleArray(jsize length)
+ { return functions->NewDoubleArray(this, length); }
+
+ jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy)
+ { return functions->GetBooleanArrayElements(this, array, isCopy); }
+ jbyte* GetByteArrayElements(jbyteArray array, jboolean* isCopy)
+ { return functions->GetByteArrayElements(this, array, isCopy); }
+ jchar* GetCharArrayElements(jcharArray array, jboolean* isCopy)
+ { return functions->GetCharArrayElements(this, array, isCopy); }
+ jshort* GetShortArrayElements(jshortArray array, jboolean* isCopy)
+ { return functions->GetShortArrayElements(this, array, isCopy); }
+ jint* GetIntArrayElements(jintArray array, jboolean* isCopy)
+ { return functions->GetIntArrayElements(this, array, isCopy); }
+ jlong* GetLongArrayElements(jlongArray array, jboolean* isCopy)
+ { return functions->GetLongArrayElements(this, array, isCopy); }
+ jfloat* GetFloatArrayElements(jfloatArray array, jboolean* isCopy)
+ { return functions->GetFloatArrayElements(this, array, isCopy); }
+ jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean* isCopy)
+ { return functions->GetDoubleArrayElements(this, array, isCopy); }
+
+ void ReleaseBooleanArrayElements(jbooleanArray array, jboolean* elems,
+ jint mode)
+ { functions->ReleaseBooleanArrayElements(this, array, elems, mode); }
+ void ReleaseByteArrayElements(jbyteArray array, jbyte* elems,
+ jint mode)
+ { functions->ReleaseByteArrayElements(this, array, elems, mode); }
+ void ReleaseCharArrayElements(jcharArray array, jchar* elems,
+ jint mode)
+ { functions->ReleaseCharArrayElements(this, array, elems, mode); }
+ void ReleaseShortArrayElements(jshortArray array, jshort* elems,
+ jint mode)
+ { functions->ReleaseShortArrayElements(this, array, elems, mode); }
+ void ReleaseIntArrayElements(jintArray array, jint* elems,
+ jint mode)
+ { functions->ReleaseIntArrayElements(this, array, elems, mode); }
+ void ReleaseLongArrayElements(jlongArray array, jlong* elems,
+ jint mode)
+ { functions->ReleaseLongArrayElements(this, array, elems, mode); }
+ void ReleaseFloatArrayElements(jfloatArray array, jfloat* elems,
+ jint mode)
+ { functions->ReleaseFloatArrayElements(this, array, elems, mode); }
+ void ReleaseDoubleArrayElements(jdoubleArray array, jdouble* elems,
+ jint mode)
+ { functions->ReleaseDoubleArrayElements(this, array, elems, mode); }
+
+ void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
+ jboolean* buf)
+ { functions->GetBooleanArrayRegion(this, array, start, len, buf); }
+ void GetByteArrayRegion(jbyteArray array, jsize start, jsize len,
+ jbyte* buf)
+ { functions->GetByteArrayRegion(this, array, start, len, buf); }
+ void GetCharArrayRegion(jcharArray array, jsize start, jsize len,
+ jchar* buf)
+ { functions->GetCharArrayRegion(this, array, start, len, buf); }
+ void GetShortArrayRegion(jshortArray array, jsize start, jsize len,
+ jshort* buf)
+ { functions->GetShortArrayRegion(this, array, start, len, buf); }
+ void GetIntArrayRegion(jintArray array, jsize start, jsize len,
+ jint* buf)
+ { functions->GetIntArrayRegion(this, array, start, len, buf); }
+ void GetLongArrayRegion(jlongArray array, jsize start, jsize len,
+ jlong* buf)
+ { functions->GetLongArrayRegion(this, array, start, len, buf); }
+ void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
+ jfloat* buf)
+ { functions->GetFloatArrayRegion(this, array, start, len, buf); }
+ void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
+ jdouble* buf)
+ { functions->GetDoubleArrayRegion(this, array, start, len, buf); }
+
+ void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
+ const jboolean* buf)
+ { functions->SetBooleanArrayRegion(this, array, start, len, buf); }
+ void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
+ const jbyte* buf)
+ { functions->SetByteArrayRegion(this, array, start, len, buf); }
+ void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
+ const jchar* buf)
+ { functions->SetCharArrayRegion(this, array, start, len, buf); }
+ void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
+ const jshort* buf)
+ { functions->SetShortArrayRegion(this, array, start, len, buf); }
+ void SetIntArrayRegion(jintArray array, jsize start, jsize len,
+ const jint* buf)
+ { functions->SetIntArrayRegion(this, array, start, len, buf); }
+ void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
+ const jlong* buf)
+ { functions->SetLongArrayRegion(this, array, start, len, buf); }
+ void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
+ const jfloat* buf)
+ { functions->SetFloatArrayRegion(this, array, start, len, buf); }
+ void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
+ const jdouble* buf)
+ { functions->SetDoubleArrayRegion(this, array, start, len, buf); }
+
+ jint RegisterNatives(jclass clazz, const JNINativeMethod* methods,
+ jint nMethods)
+ { return functions->RegisterNatives(this, clazz, methods, nMethods); }
+
+ jint UnregisterNatives(jclass clazz)
+ { return functions->UnregisterNatives(this, clazz); }
+
+ jint MonitorEnter(jobject obj)
+ { return functions->MonitorEnter(this, obj); }
+
+ jint MonitorExit(jobject obj)
+ { return functions->MonitorExit(this, obj); }
+
+ jint GetJavaVM(JavaVM** vm)
+ { return functions->GetJavaVM(this, vm); }
+
+ void GetStringRegion(jstring str, jsize start, jsize len, jchar* buf)
+ { functions->GetStringRegion(this, str, start, len, buf); }
+
+ void GetStringUTFRegion(jstring str, jsize start, jsize len, char* buf)
+ { return functions->GetStringUTFRegion(this, str, start, len, buf); }
+
+ void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy)
+ { return functions->GetPrimitiveArrayCritical(this, array, isCopy); }
+
+ void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode)
+ { functions->ReleasePrimitiveArrayCritical(this, array, carray, mode); }
+
+ const jchar* GetStringCritical(jstring string, jboolean* isCopy)
+ { return functions->GetStringCritical(this, string, isCopy); }
+
+ void ReleaseStringCritical(jstring string, const jchar* carray)
+ { functions->ReleaseStringCritical(this, string, carray); }
+
+ jweak NewWeakGlobalRef(jobject obj)
+ { return functions->NewWeakGlobalRef(this, obj); }
+
+ void DeleteWeakGlobalRef(jweak obj)
+ { functions->DeleteWeakGlobalRef(this, obj); }
+
+ jboolean ExceptionCheck()
+ { return functions->ExceptionCheck(this); }
+
+ jobject NewDirectByteBuffer(void* address, jlong capacity)
+ { return functions->NewDirectByteBuffer(this, address, capacity); }
+
+ void* GetDirectBufferAddress(jobject buf)
+ { return functions->GetDirectBufferAddress(this, buf); }
+
+ jlong GetDirectBufferCapacity(jobject buf)
+ { return functions->GetDirectBufferCapacity(this, buf); }
+
+ /* added in JNI 1.6 */
+ jobjectRefType GetObjectRefType(jobject obj)
+ { return functions->GetObjectRefType(this, obj); }
+#endif /*__cplusplus*/
+};
+
+
+/*
+ * JNI invocation interface.
+ */
+struct JNIInvokeInterface {
+ void* reserved0;
+ void* reserved1;
+ void* reserved2;
+
+ jint (*DestroyJavaVM)(JavaVM*);
+ jint (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*);
+ jint (*DetachCurrentThread)(JavaVM*);
+ jint (*GetEnv)(JavaVM*, void**, jint);
+ jint (*AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*);
+};
+
+/*
+ * C++ version.
+ */
+struct _JavaVM {
+ const struct JNIInvokeInterface* functions;
+
+#if defined(__cplusplus)
+ jint DestroyJavaVM()
+ { return functions->DestroyJavaVM(this); }
+ jint AttachCurrentThread(JNIEnv** p_env, void* thr_args)
+ { return functions->AttachCurrentThread(this, p_env, thr_args); }
+ jint DetachCurrentThread()
+ { return functions->DetachCurrentThread(this); }
+ jint GetEnv(void** env, jint version)
+ { return functions->GetEnv(this, env, version); }
+ jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args)
+ { return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); }
+#endif /*__cplusplus*/
+};
+
+struct JavaVMAttachArgs {
+ jint version; /* must be >= JNI_VERSION_1_2 */
+ const char* name; /* NULL or name of thread as modified UTF-8 str */
+ jobject group; /* global ref of a ThreadGroup object, or NULL */
+};
+typedef struct JavaVMAttachArgs JavaVMAttachArgs;
+
+/*
+ * JNI 1.2+ initialization. (As of 1.6, the pre-1.2 structures are no
+ * longer supported.)
+ */
+typedef struct JavaVMOption {
+ const char* optionString;
+ void* extraInfo;
+} JavaVMOption;
+
+typedef struct JavaVMInitArgs {
+ jint version; /* use JNI_VERSION_1_2 or later */
+
+ jint nOptions;
+ JavaVMOption* options;
+ jboolean ignoreUnrecognized;
+} JavaVMInitArgs;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * VM initialization functions.
+ *
+ * Note these are the only symbols exported for JNI by the VM.
+ */
+jint JNI_GetDefaultJavaVMInitArgs(void*);
+jint JNI_CreateJavaVM(JavaVM**, JNIEnv**, void*);
+jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize*);
+
+/*
+ * Prototypes for functions exported by loadable shared libs. These are
+ * called by JNI, not provided by JNI.
+ */
+jint JNI_OnLoad(JavaVM* vm, void* reserved);
+void JNI_OnUnload(JavaVM* vm, void* reserved);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/*
+ * Manifest constants.
+ */
+#define JNI_FALSE 0
+#define JNI_TRUE 1
+
+#define JNI_VERSION_1_1 0x00010001
+#define JNI_VERSION_1_2 0x00010002
+#define JNI_VERSION_1_4 0x00010004
+#define JNI_VERSION_1_6 0x00010006
+
+#define JNI_OK (0) /* no error */
+#define JNI_ERR (-1) /* generic error */
+#define JNI_EDETACHED (-2) /* thread detached from the VM */
+#define JNI_EVERSION (-3) /* JNI version error */
+
+#define JNI_COMMIT 1 /* copy content, do not free buffer */
+#define JNI_ABORT 2 /* free buffer w/o copying back */
+
+/* need these for Windows-aware headers */
+#define JNIIMPORT
+#define JNIEXPORT
+#define JNICALL
+
+#endif /*_JNI_H*/
diff --git a/6/platforms/android-3/arch-x86/usr/include/lastlog.h b/6/platforms/android-3/arch-x86/usr/include/lastlog.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/lastlog.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/libgen.h b/6/platforms/android-3/arch-x86/usr/include/libgen.h
new file mode 100644
index 0000000..c5fc76a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/libgen.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _LIBGEN_H
+#define _LIBGEN_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/* our version of dirname/basename don't modify the input path */
+extern char* dirname (const char* path);
+extern char* basename(const char* path);
+
+/* special thread-safe Bionic versions
+ *
+ * if 'buffer' is NULL, 'bufflen' is ignored and the length of the result is returned
+ * otherwise, place result in 'buffer'
+ *
+ * at most bufflen-1 characters written, plus a terminating zero
+ *
+ * return length of result, or -1 in case of error, with errno set to:
+ *
+ * ERANGE: buffer is too short
+ * ENAMETOOLONG: the result is too long for a valid path
+ */
+extern int dirname_r(const char* path, char* buffer, size_t bufflen);
+extern int basename_r(const char* path, char* buffer, size_t bufflen);
+
+__END_DECLS
+
+#endif /* _LIBGEN_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/limits.h b/6/platforms/android-3/arch-x86/usr/include/limits.h
new file mode 100644
index 0000000..1de8ea6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/limits.h
@@ -0,0 +1,96 @@
+/* $OpenBSD: limits.h,v 1.13 2005/12/31 19:29:38 millert Exp $ */
+/* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */
+
+/*
+ * Copyright (c) 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)limits.h 5.9 (Berkeley) 4/3/91
+ */
+
+#ifndef _LIMITS_H_
+#define _LIMITS_H_
+
+#include <sys/cdefs.h>
+
+#if __POSIX_VISIBLE
+#define _POSIX_ARG_MAX 4096
+#define _POSIX_CHILD_MAX 25
+#define _POSIX_LINK_MAX 8
+#define _POSIX_MAX_CANON 255
+#define _POSIX_MAX_INPUT 255
+#define _POSIX_NAME_MAX 14
+#define _POSIX_NGROUPS_MAX 0
+#define _POSIX_OPEN_MAX 16
+#define _POSIX_PATH_MAX 256
+#define _POSIX_PIPE_BUF 512
+#define _POSIX_RE_DUP_MAX 255
+#define _POSIX_SSIZE_MAX 32767
+#define _POSIX_STREAM_MAX 8
+#define _POSIX_SYMLINK_MAX 255
+#define _POSIX_SYMLOOP_MAX 8
+#define _POSIX_TZNAME_MAX 3
+
+#define _POSIX2_BC_BASE_MAX 99
+#define _POSIX2_BC_DIM_MAX 2048
+#define _POSIX2_BC_SCALE_MAX 99
+#define _POSIX2_BC_STRING_MAX 1000
+#define _POSIX2_COLL_WEIGHTS_MAX 2
+#define _POSIX2_EXPR_NEST_MAX 32
+#define _POSIX2_LINE_MAX 2048
+#define _POSIX2_RE_DUP_MAX _POSIX_RE_DUP_MAX
+
+#if __POSIX_VISIBLE >= 200112
+#define _POSIX_TTY_NAME_MAX 9 /* includes trailing NUL */
+#define _POSIX_LOGIN_NAME_MAX 9 /* includes trailing NUL */
+#endif /* __POSIX_VISIBLE >= 200112 */
+#endif /* __POSIX_VISIBLE */
+
+#if __XPG_VISIBLE
+#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */
+
+#define NL_ARGMAX 9
+#define NL_LANGMAX 14
+#define NL_MSGMAX 32767
+#define NL_NMAX 1
+#define NL_SETMAX 255
+#define NL_TEXTMAX 255
+
+#define TMP_MAX 308915776
+#endif /* __XPG_VISIBLE */
+
+#include <sys/limits.h>
+
+#if __POSIX_VISIBLE
+#include <sys/syslimits.h>
+#endif
+
+#ifndef PAGESIZE
+#define PAGESIZE PAGE_SIZE
+#endif
+
+#endif /* !_LIMITS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/a.out.h b/6/platforms/android-3/arch-x86/usr/include/linux/a.out.h
new file mode 100644
index 0000000..7325304
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/a.out.h
@@ -0,0 +1,220 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __A_OUT_GNU_H__
+#define __A_OUT_GNU_H__
+
+#define __GNU_EXEC_MACROS__
+
+#ifndef __STRUCT_EXEC_OVERRIDE__
+
+#include <asm/a.out.h>
+
+#endif
+
+enum machine_type {
+#ifdef M_OLDSUN2
+ M__OLDSUN2 = M_OLDSUN2,
+#else
+ M_OLDSUN2 = 0,
+#endif
+#ifdef M_68010
+ M__68010 = M_68010,
+#else
+ M_68010 = 1,
+#endif
+#ifdef M_68020
+ M__68020 = M_68020,
+#else
+ M_68020 = 2,
+#endif
+#ifdef M_SPARC
+ M__SPARC = M_SPARC,
+#else
+ M_SPARC = 3,
+#endif
+
+ M_386 = 100,
+ M_MIPS1 = 151,
+ M_MIPS2 = 152
+};
+
+#ifndef N_MAGIC
+#define N_MAGIC(exec) ((exec).a_info & 0xffff)
+#endif
+#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+#define N_SET_INFO(exec, magic, type, flags) ((exec).a_info = ((magic) & 0xffff) | (((int)(type) & 0xff) << 16) | (((flags) & 0xff) << 24))
+#define N_SET_MAGIC(exec, magic) ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+
+#define N_SET_MACHTYPE(exec, machtype) ((exec).a_info = ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+
+#define N_SET_FLAGS(exec, flags) ((exec).a_info = ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+
+#define OMAGIC 0407
+
+#define NMAGIC 0410
+
+#define ZMAGIC 0413
+
+#define QMAGIC 0314
+
+#define CMAGIC 0421
+
+#ifndef N_BADMAG
+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
+#endif
+
+#define _N_HDROFF(x) (1024 - sizeof (struct exec))
+
+#ifndef N_TXTOFF
+#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
+#endif
+
+#ifndef N_DATOFF
+#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
+#endif
+
+#ifndef N_TRELOFF
+#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
+#endif
+
+#ifndef N_DRELOFF
+#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
+#endif
+
+#ifndef N_SYMOFF
+#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
+#endif
+
+#ifndef N_STROFF
+#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
+#endif
+
+#ifndef N_TXTADDR
+#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
+#endif
+
+#if defined(vax) || defined(hp300) || defined(pyr)
+#define SEGMENT_SIZE page_size
+#endif
+#ifdef sony
+#define SEGMENT_SIZE 0x2000
+#endif
+#ifdef is68k
+#define SEGMENT_SIZE 0x20000
+#endif
+#if defined(m68k) && defined(PORTAR)
+#define PAGE_SIZE 0x400
+#define SEGMENT_SIZE PAGE_SIZE
+#endif
+
+#ifdef linux
+#include <asm/page.h>
+#if defined(__i386__) || defined(__mc68000__)
+#define SEGMENT_SIZE 1024
+#else
+#ifndef SEGMENT_SIZE
+#define SEGMENT_SIZE PAGE_SIZE
+#endif
+#endif
+#endif
+
+#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
+
+#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
+
+#ifndef N_DATADDR
+#define N_DATADDR(x) (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
+#endif
+
+#ifndef N_BSSADDR
+#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#endif
+
+#ifndef N_NLIST_DECLARED
+struct nlist {
+ union {
+ char *n_name;
+ struct nlist *n_next;
+ long n_strx;
+ } n_un;
+ unsigned char n_type;
+ char n_other;
+ short n_desc;
+ unsigned long n_value;
+};
+#endif
+
+#ifndef N_UNDF
+#define N_UNDF 0
+#endif
+#ifndef N_ABS
+#define N_ABS 2
+#endif
+#ifndef N_TEXT
+#define N_TEXT 4
+#endif
+#ifndef N_DATA
+#define N_DATA 6
+#endif
+#ifndef N_BSS
+#define N_BSS 8
+#endif
+#ifndef N_FN
+#define N_FN 15
+#endif
+
+#ifndef N_EXT
+#define N_EXT 1
+#endif
+#ifndef N_TYPE
+#define N_TYPE 036
+#endif
+#ifndef N_STAB
+#define N_STAB 0340
+#endif
+
+#define N_INDR 0xa
+
+#define N_SETA 0x14
+#define N_SETT 0x16
+#define N_SETD 0x18
+#define N_SETB 0x1A
+
+#define N_SETV 0x1C
+
+#ifndef N_RELOCATION_INFO_DECLARED
+
+struct relocation_info
+{
+
+ int r_address;
+
+ unsigned int r_symbolnum:24;
+
+ unsigned int r_pcrel:1;
+
+ unsigned int r_length:2;
+
+ unsigned int r_extern:1;
+
+#ifdef NS32K
+ unsigned r_bsr:1;
+ unsigned r_disp:1;
+ unsigned r_pad:2;
+#else
+ unsigned int r_pad:4;
+#endif
+};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/aio_abi.h b/6/platforms/android-3/arch-x86/usr/include/linux/aio_abi.h
new file mode 100644
index 0000000..c92bc8f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/aio_abi.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX__AIO_ABI_H
+#define __LINUX__AIO_ABI_H
+
+#include <asm/byteorder.h>
+
+typedef unsigned long aio_context_t;
+
+enum {
+ IOCB_CMD_PREAD = 0,
+ IOCB_CMD_PWRITE = 1,
+ IOCB_CMD_FSYNC = 2,
+ IOCB_CMD_FDSYNC = 3,
+
+ IOCB_CMD_NOOP = 6,
+};
+
+struct io_event {
+ __u64 data;
+ __u64 obj;
+ __s64 res;
+ __s64 res2;
+};
+
+#ifdef __LITTLE_ENDIAN
+#define PADDED(x,y) x, y
+#elif defined(__BIG_ENDIAN)
+#define PADDED(x,y) y, x
+#else
+#error edit for your odd byteorder.
+#endif
+
+struct iocb {
+
+ __u64 aio_data;
+ __u32 PADDED(aio_key, aio_reserved1);
+
+ __u16 aio_lio_opcode;
+ __s16 aio_reqprio;
+ __u32 aio_fildes;
+
+ __u64 aio_buf;
+ __u64 aio_nbytes;
+ __s64 aio_offset;
+
+ __u64 aio_reserved2;
+ __u64 aio_reserved3;
+};
+
+#undef IFBIG
+#undef IFLITTLE
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/akm8976.h b/6/platforms/android-3/arch-x86/usr/include/linux/akm8976.h
new file mode 100644
index 0000000..a5aa68e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/akm8976.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef AKM8976_H
+#define AKM8976_H
+
+#include <linux/ioctl.h>
+
+#define AKECS_MODE_MEASURE 0x00
+
+#define AKECS_MODE_PFFD 0x01
+#define AKECS_MODE_E2P_READ 0x02
+#define AKECS_MODE_POWERDOWN 0x03
+
+#define AKECS_MODE_MEASURE_SNG 0x10
+#define AKECS_MODE_MEASURE_SEQ 0x11
+
+#define CSPEC_AINT 0x01
+#define CSPEC_SNG_NUM 0x01
+#define CSPEC_SEQ_NUM 0x02
+#define CSPEC_SFRQ_32 0x00
+#define CSPEC_SFRQ_64 0x01
+#define CSPEC_MCS 0x07
+#define CSPEC_MKS 0x01
+#define CSPEC_INTEN 0x01
+
+#define RBUFF_SIZE 31
+#define MAX_CALI_SIZE 0x1000U
+
+#define AKECS_REG_ST 0xC0
+#define AKECS_REG_TMPS 0xC1
+#define AKECS_REG_MS1 0xE0
+#define AKECS_REG_MS2 0xE1
+#define AKECS_REG_MS3 0xE2
+
+#define AKMIO 0xA1
+
+#define ECS_IOCTL_INIT _IO(AKMIO, 0x01)
+#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5])
+#define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5])
+#define ECS_IOCTL_RESET _IO(AKMIO, 0x04)
+#define ECS_IOCTL_INT_STATUS _IO(AKMIO, 0x05)
+#define ECS_IOCTL_FFD_STATUS _IO(AKMIO, 0x06)
+#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x07, short)
+#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE+1])
+#define ECS_IOCTL_GET_NUMFRQ _IOR(AKMIO, 0x09, char[2])
+#define ECS_IOCTL_SET_PERST _IO(AKMIO, 0x0A)
+#define ECS_IOCTL_SET_G0RST _IO(AKMIO, 0x0B)
+#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12])
+#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int)
+#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int)
+#define ECS_IOCTL_GET_CALI_DATA _IOR(AKMIO, 0x0F, char[MAX_CALI_SIZE])
+#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short)
+
+#define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short)
+#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short)
+#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short)
+#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short)
+#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short)
+#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short)
+#define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short)
+#define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17)
+#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short)
+#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY
+#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short)
+#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short)
+
+#define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short)
+
+#define ECS_RST 146
+#define ECS_CLK_ON 155
+#define ECS_INTR 161
+
+struct akm8976_platform_data {
+ int reset;
+ int clk_on;
+ int intr;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/android_alarm.h b/6/platforms/android-3/arch-x86/usr/include/linux/android_alarm.h
new file mode 100644
index 0000000..80828ea
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/android_alarm.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ANDROID_ALARM_H
+#define _LINUX_ANDROID_ALARM_H
+
+#include <asm/ioctl.h>
+#include <linux/time.h>
+
+typedef enum {
+
+ ANDROID_ALARM_RTC_WAKEUP,
+ ANDROID_ALARM_RTC,
+ ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
+ ANDROID_ALARM_ELAPSED_REALTIME,
+ ANDROID_ALARM_SYSTEMTIME,
+
+ ANDROID_ALARM_TYPE_COUNT,
+
+} android_alarm_type_t;
+
+typedef enum {
+ ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP,
+ ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC,
+ ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
+ ANDROID_ALARM_ELAPSED_REALTIME_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME,
+ ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME,
+ ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16
+} android_alarm_return_flags_t;
+
+#define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4))
+#define ANDROID_ALARM_WAIT _IO('a', 1)
+#define ANDROID_ALARM_SET(type) _IOW('a', 2 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_SET_AND_WAIT(type) _IOW('a', 3 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_GET_TIME(type) _IOW('a', 4 | ((type) << 4), struct timespec)
+#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec)
+#define ANDROID_ALARM_SET_TIMEZONE _IOW('a', 6, struct timezone)
+
+#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0)))
+#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/android_pmem.h b/6/platforms/android-3/arch-x86/usr/include/linux/android_pmem.h
new file mode 100644
index 0000000..858857e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/android_pmem.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ANDROID_PMEM_H_
+#define _ANDROID_PMEM_H_
+
+#include <stdint.h>
+
+#ifndef __user
+#define __user
+#endif
+
+struct pmem_region {
+ unsigned long offset;
+ unsigned long len;
+};
+
+#define PMEM_IOCTL_MAGIC 'p'
+#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, struct pmem_region *)
+#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, struct pmem_region *)
+#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, struct pmem_region *)
+#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, struct pmem_region *)
+
+#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
+
+#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
+
+#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, struct pmem_region *)
+
+#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
+#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
+#define HW3D_WAIT_IRQ _IOW(PMEM_IOCTL_MAGIC,10, unsigned int)
+
+struct android_pmem_platform_data;
+struct pmem_file_operations {
+ int (*mmap) (struct file *, struct vm_area_struct *);
+ int (*open) (struct inode *, struct file *);
+ ssize_t (*read) (struct file *, char __user *, size_t, long long *);
+ int (*release) (struct inode *, struct file *);
+ long (*ioctl) (struct file *, unsigned int, unsigned long);
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/android_power.h b/6/platforms/android-3/arch-x86/usr/include/linux/android_power.h
new file mode 100644
index 0000000..2e90321
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/android_power.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ANDROID_POWER_H
+#define _LINUX_ANDROID_POWER_H
+
+#include <linux/list.h>
+
+typedef struct
+{
+ struct list_head link;
+ int lock_count;
+ int flags;
+ const char *name;
+ int expires;
+} android_suspend_lock_t;
+
+#define ANDROID_SUSPEND_LOCK_FLAG_COUNTED (1U << 0)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_READABLE (1U << 1)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_SET (1U << 2)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_CLEAR (1U << 3)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_INC (1U << 4)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_DEC (1U << 5)
+#define ANDROID_SUSPEND_LOCK_FLAG_USER_VISIBLE_MASK (0x1fU << 1)
+#define ANDROID_SUSPEND_LOCK_AUTO_EXPIRE (1U << 6)
+
+typedef struct android_early_suspend android_early_suspend_t;
+struct android_early_suspend
+{
+ struct list_head link;
+ int level;
+ void (*suspend)(android_early_suspend_t *h);
+ void (*resume)(android_early_suspend_t *h);
+};
+
+typedef enum {
+ ANDROID_CHARGING_STATE_UNKNOWN,
+ ANDROID_CHARGING_STATE_DISCHARGE,
+ ANDROID_CHARGING_STATE_MAINTAIN,
+ ANDROID_CHARGING_STATE_SLOW,
+ ANDROID_CHARGING_STATE_NORMAL,
+ ANDROID_CHARGING_STATE_FAST,
+ ANDROID_CHARGING_STATE_OVERHEAT
+} android_charging_state_t;
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/apm_bios.h b/6/platforms/android-3/arch-x86/usr/include/linux/apm_bios.h
new file mode 100644
index 0000000..d32b4aa
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/apm_bios.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_APM_H
+#define _LINUX_APM_H
+
+typedef unsigned short apm_event_t;
+typedef unsigned short apm_eventinfo_t;
+
+#define APM_STATE_READY 0x0000
+#define APM_STATE_STANDBY 0x0001
+#define APM_STATE_SUSPEND 0x0002
+#define APM_STATE_OFF 0x0003
+#define APM_STATE_BUSY 0x0004
+#define APM_STATE_REJECT 0x0005
+#define APM_STATE_OEM_SYS 0x0020
+#define APM_STATE_OEM_DEV 0x0040
+
+#define APM_STATE_DISABLE 0x0000
+#define APM_STATE_ENABLE 0x0001
+
+#define APM_STATE_DISENGAGE 0x0000
+#define APM_STATE_ENGAGE 0x0001
+
+#define APM_SYS_STANDBY 0x0001
+#define APM_SYS_SUSPEND 0x0002
+#define APM_NORMAL_RESUME 0x0003
+#define APM_CRITICAL_RESUME 0x0004
+#define APM_LOW_BATTERY 0x0005
+#define APM_POWER_STATUS_CHANGE 0x0006
+#define APM_UPDATE_TIME 0x0007
+#define APM_CRITICAL_SUSPEND 0x0008
+#define APM_USER_STANDBY 0x0009
+#define APM_USER_SUSPEND 0x000a
+#define APM_STANDBY_RESUME 0x000b
+#define APM_CAPABILITY_CHANGE 0x000c
+
+#define APM_SUCCESS 0x00
+#define APM_DISABLED 0x01
+#define APM_CONNECTED 0x02
+#define APM_NOT_CONNECTED 0x03
+#define APM_16_CONNECTED 0x05
+#define APM_16_UNSUPPORTED 0x06
+#define APM_32_CONNECTED 0x07
+#define APM_32_UNSUPPORTED 0x08
+#define APM_BAD_DEVICE 0x09
+#define APM_BAD_PARAM 0x0a
+#define APM_NOT_ENGAGED 0x0b
+#define APM_BAD_FUNCTION 0x0c
+#define APM_RESUME_DISABLED 0x0d
+#define APM_NO_ERROR 0x53
+#define APM_BAD_STATE 0x60
+#define APM_NO_EVENTS 0x80
+#define APM_NOT_PRESENT 0x86
+
+#define APM_DEVICE_BIOS 0x0000
+#define APM_DEVICE_ALL 0x0001
+#define APM_DEVICE_DISPLAY 0x0100
+#define APM_DEVICE_STORAGE 0x0200
+#define APM_DEVICE_PARALLEL 0x0300
+#define APM_DEVICE_SERIAL 0x0400
+#define APM_DEVICE_NETWORK 0x0500
+#define APM_DEVICE_PCMCIA 0x0600
+#define APM_DEVICE_BATTERY 0x8000
+#define APM_DEVICE_OEM 0xe000
+#define APM_DEVICE_OLD_ALL 0xffff
+#define APM_DEVICE_CLASS 0x00ff
+#define APM_DEVICE_MASK 0xff00
+
+#define APM_MAX_BATTERIES 2
+
+#define APM_CAP_GLOBAL_STANDBY 0x0001
+#define APM_CAP_GLOBAL_SUSPEND 0x0002
+#define APM_CAP_RESUME_STANDBY_TIMER 0x0004
+#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008
+#define APM_CAP_RESUME_STANDBY_RING 0x0010
+#define APM_CAP_RESUME_SUSPEND_RING 0x0020
+#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040
+#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080
+
+#include <linux/ioctl.h>
+
+#define APM_IOC_STANDBY _IO('A', 1)
+#define APM_IOC_SUSPEND _IO('A', 2)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ashmem.h b/6/platforms/android-3/arch-x86/usr/include/linux/ashmem.h
new file mode 100644
index 0000000..a57d1de
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ashmem.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ASHMEM_H
+#define _LINUX_ASHMEM_H
+
+#include <linux/limits.h>
+#include <linux/ioctl.h>
+
+#define ASHMEM_NAME_LEN 256
+
+#define ASHMEM_NAME_DEF "dev/ashmem"
+
+#define ASHMEM_NOT_PURGED 0
+#define ASHMEM_WAS_PURGED 1
+
+#define ASHMEM_IS_UNPINNED 0
+#define ASHMEM_IS_PINNED 1
+
+struct ashmem_pin {
+ __u32 offset;
+ __u32 len;
+};
+
+#define __ASHMEMIOC 0x77
+
+#define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN])
+#define ASHMEM_GET_NAME _IOR(__ASHMEMIOC, 2, char[ASHMEM_NAME_LEN])
+#define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t)
+#define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4)
+#define ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned long)
+#define ASHMEM_GET_PROT_MASK _IO(__ASHMEMIOC, 6)
+#define ASHMEM_PIN _IOW(__ASHMEMIOC, 7, struct ashmem_pin)
+#define ASHMEM_UNPIN _IOW(__ASHMEMIOC, 8, struct ashmem_pin)
+#define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9)
+#define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ata.h b/6/platforms/android-3/arch-x86/usr/include/linux/ata.h
new file mode 100644
index 0000000..76af576
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ata.h
@@ -0,0 +1,265 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_ATA_H__
+#define __LINUX_ATA_H__
+
+#include <linux/types.h>
+
+#define ATA_DMA_BOUNDARY 0xffffUL
+#define ATA_DMA_MASK 0xffffffffULL
+
+enum {
+
+ ATA_MAX_DEVICES = 2,
+ ATA_MAX_PRD = 256,
+ ATA_SECT_SIZE = 512,
+
+ ATA_ID_WORDS = 256,
+ ATA_ID_SERNO_OFS = 10,
+ ATA_ID_FW_REV_OFS = 23,
+ ATA_ID_PROD_OFS = 27,
+ ATA_ID_OLD_PIO_MODES = 51,
+ ATA_ID_FIELD_VALID = 53,
+ ATA_ID_MWDMA_MODES = 63,
+ ATA_ID_PIO_MODES = 64,
+ ATA_ID_EIDE_DMA_MIN = 65,
+ ATA_ID_EIDE_PIO = 67,
+ ATA_ID_EIDE_PIO_IORDY = 68,
+ ATA_ID_UDMA_MODES = 88,
+ ATA_ID_MAJOR_VER = 80,
+ ATA_ID_PIO4 = (1 << 1),
+
+ ATA_PCI_CTL_OFS = 2,
+ ATA_SERNO_LEN = 20,
+ ATA_UDMA0 = (1 << 0),
+ ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
+ ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
+ ATA_UDMA3 = ATA_UDMA2 | (1 << 3),
+ ATA_UDMA4 = ATA_UDMA3 | (1 << 4),
+ ATA_UDMA5 = ATA_UDMA4 | (1 << 5),
+ ATA_UDMA6 = ATA_UDMA5 | (1 << 6),
+ ATA_UDMA7 = ATA_UDMA6 | (1 << 7),
+
+ ATA_UDMA_MASK_40C = ATA_UDMA2,
+
+ ATA_PRD_SZ = 8,
+ ATA_PRD_TBL_SZ = (ATA_MAX_PRD * ATA_PRD_SZ),
+ ATA_PRD_EOT = (1 << 31),
+
+ ATA_DMA_TABLE_OFS = 4,
+ ATA_DMA_STATUS = 2,
+ ATA_DMA_CMD = 0,
+ ATA_DMA_WR = (1 << 3),
+ ATA_DMA_START = (1 << 0),
+ ATA_DMA_INTR = (1 << 2),
+ ATA_DMA_ERR = (1 << 1),
+ ATA_DMA_ACTIVE = (1 << 0),
+
+ ATA_HOB = (1 << 7),
+ ATA_NIEN = (1 << 1),
+ ATA_LBA = (1 << 6),
+ ATA_DEV1 = (1 << 4),
+ ATA_DEVICE_OBS = (1 << 7) | (1 << 5),
+ ATA_DEVCTL_OBS = (1 << 3),
+ ATA_BUSY = (1 << 7),
+ ATA_DRDY = (1 << 6),
+ ATA_DF = (1 << 5),
+ ATA_DRQ = (1 << 3),
+ ATA_ERR = (1 << 0),
+ ATA_SRST = (1 << 2),
+ ATA_ICRC = (1 << 7),
+ ATA_UNC = (1 << 6),
+ ATA_IDNF = (1 << 4),
+ ATA_ABORTED = (1 << 2),
+
+ ATA_REG_DATA = 0x00,
+ ATA_REG_ERR = 0x01,
+ ATA_REG_NSECT = 0x02,
+ ATA_REG_LBAL = 0x03,
+ ATA_REG_LBAM = 0x04,
+ ATA_REG_LBAH = 0x05,
+ ATA_REG_DEVICE = 0x06,
+ ATA_REG_STATUS = 0x07,
+
+ ATA_REG_FEATURE = ATA_REG_ERR,
+ ATA_REG_CMD = ATA_REG_STATUS,
+ ATA_REG_BYTEL = ATA_REG_LBAM,
+ ATA_REG_BYTEH = ATA_REG_LBAH,
+ ATA_REG_DEVSEL = ATA_REG_DEVICE,
+ ATA_REG_IRQ = ATA_REG_NSECT,
+
+ ATA_CMD_CHK_POWER = 0xE5,
+ ATA_CMD_STANDBY = 0xE2,
+ ATA_CMD_IDLE = 0xE3,
+ ATA_CMD_EDD = 0x90,
+ ATA_CMD_FLUSH = 0xE7,
+ ATA_CMD_FLUSH_EXT = 0xEA,
+ ATA_CMD_ID_ATA = 0xEC,
+ ATA_CMD_ID_ATAPI = 0xA1,
+ ATA_CMD_READ = 0xC8,
+ ATA_CMD_READ_EXT = 0x25,
+ ATA_CMD_WRITE = 0xCA,
+ ATA_CMD_WRITE_EXT = 0x35,
+ ATA_CMD_WRITE_FUA_EXT = 0x3D,
+ ATA_CMD_FPDMA_READ = 0x60,
+ ATA_CMD_FPDMA_WRITE = 0x61,
+ ATA_CMD_PIO_READ = 0x20,
+ ATA_CMD_PIO_READ_EXT = 0x24,
+ ATA_CMD_PIO_WRITE = 0x30,
+ ATA_CMD_PIO_WRITE_EXT = 0x34,
+ ATA_CMD_READ_MULTI = 0xC4,
+ ATA_CMD_READ_MULTI_EXT = 0x29,
+ ATA_CMD_WRITE_MULTI = 0xC5,
+ ATA_CMD_WRITE_MULTI_EXT = 0x39,
+ ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE,
+ ATA_CMD_SET_FEATURES = 0xEF,
+ ATA_CMD_PACKET = 0xA0,
+ ATA_CMD_VERIFY = 0x40,
+ ATA_CMD_VERIFY_EXT = 0x42,
+ ATA_CMD_STANDBYNOW1 = 0xE0,
+ ATA_CMD_IDLEIMMEDIATE = 0xE1,
+ ATA_CMD_INIT_DEV_PARAMS = 0x91,
+ ATA_CMD_READ_NATIVE_MAX = 0xF8,
+ ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
+ ATA_CMD_READ_LOG_EXT = 0x2f,
+
+ ATA_LOG_SATA_NCQ = 0x10,
+
+ SETFEATURES_XFER = 0x03,
+ XFER_UDMA_7 = 0x47,
+ XFER_UDMA_6 = 0x46,
+ XFER_UDMA_5 = 0x45,
+ XFER_UDMA_4 = 0x44,
+ XFER_UDMA_3 = 0x43,
+ XFER_UDMA_2 = 0x42,
+ XFER_UDMA_1 = 0x41,
+ XFER_UDMA_0 = 0x40,
+ XFER_MW_DMA_2 = 0x22,
+ XFER_MW_DMA_1 = 0x21,
+ XFER_MW_DMA_0 = 0x20,
+ XFER_SW_DMA_2 = 0x12,
+ XFER_SW_DMA_1 = 0x11,
+ XFER_SW_DMA_0 = 0x10,
+ XFER_PIO_4 = 0x0C,
+ XFER_PIO_3 = 0x0B,
+ XFER_PIO_2 = 0x0A,
+ XFER_PIO_1 = 0x09,
+ XFER_PIO_0 = 0x08,
+ XFER_PIO_SLOW = 0x00,
+
+ SETFEATURES_WC_ON = 0x02,
+ SETFEATURES_WC_OFF = 0x82,
+
+ ATAPI_PKT_DMA = (1 << 0),
+ ATAPI_DMADIR = (1 << 2),
+ ATAPI_CDB_LEN = 16,
+
+ ATA_CBL_NONE = 0,
+ ATA_CBL_PATA40 = 1,
+ ATA_CBL_PATA80 = 2,
+ ATA_CBL_PATA_UNK = 3,
+ ATA_CBL_SATA = 4,
+
+ SCR_STATUS = 0,
+ SCR_ERROR = 1,
+ SCR_CONTROL = 2,
+ SCR_ACTIVE = 3,
+ SCR_NOTIFICATION = 4,
+
+ SERR_DATA_RECOVERED = (1 << 0),
+ SERR_COMM_RECOVERED = (1 << 1),
+ SERR_DATA = (1 << 8),
+ SERR_PERSISTENT = (1 << 9),
+ SERR_PROTOCOL = (1 << 10),
+ SERR_INTERNAL = (1 << 11),
+ SERR_PHYRDY_CHG = (1 << 16),
+ SERR_DEV_XCHG = (1 << 26),
+
+ ATA_TFLAG_LBA48 = (1 << 0),
+ ATA_TFLAG_ISADDR = (1 << 1),
+ ATA_TFLAG_DEVICE = (1 << 2),
+ ATA_TFLAG_WRITE = (1 << 3),
+ ATA_TFLAG_LBA = (1 << 4),
+ ATA_TFLAG_FUA = (1 << 5),
+ ATA_TFLAG_POLLING = (1 << 6),
+};
+
+enum ata_tf_protocols {
+
+ ATA_PROT_UNKNOWN,
+ ATA_PROT_NODATA,
+ ATA_PROT_PIO,
+ ATA_PROT_DMA,
+ ATA_PROT_NCQ,
+ ATA_PROT_ATAPI,
+ ATA_PROT_ATAPI_NODATA,
+ ATA_PROT_ATAPI_DMA,
+};
+
+enum ata_ioctls {
+ ATA_IOC_GET_IO32 = 0x309,
+ ATA_IOC_SET_IO32 = 0x324,
+};
+
+struct ata_prd {
+ u32 addr;
+ u32 flags_len;
+};
+
+struct ata_taskfile {
+ unsigned long flags;
+ u8 protocol;
+
+ u8 ctl;
+
+ u8 hob_feature;
+ u8 hob_nsect;
+ u8 hob_lbal;
+ u8 hob_lbam;
+ u8 hob_lbah;
+
+ u8 feature;
+ u8 nsect;
+ u8 lbal;
+ u8 lbam;
+ u8 lbah;
+
+ u8 device;
+
+ u8 command;
+};
+
+#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
+#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
+#define ata_id_is_sata(id) ((id)[93] == 0)
+#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
+#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
+#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
+#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
+#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
+#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
+#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
+#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
+#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
+#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
+#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
+#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
+#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
+#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1)
+#define ata_id_removeable(id) ((id)[0] & (1 << 7))
+#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
+#define ata_id_u32(id,n) (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
+#define ata_id_u64(id,n) ( ((u64) (id)[(n) + 3] << 48) | ((u64) (id)[(n) + 2] << 32) | ((u64) (id)[(n) + 1] << 16) | ((u64) (id)[(n) + 0]) )
+
+#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atm.h b/6/platforms/android-3/arch-x86/usr/include/linux/atm.h
new file mode 100644
index 0000000..c9bcd70
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atm.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATM_H
+#define _LINUX_ATM_H
+
+#include <linux/compiler.h>
+#include <linux/atmapi.h>
+#include <linux/atmsap.h>
+#include <linux/atmioc.h>
+
+#define ATM_CELL_SIZE 53
+#define ATM_CELL_PAYLOAD 48
+#define ATM_AAL0_SDU 52
+#define ATM_MAX_AAL34_PDU 65535
+#define ATM_AAL5_TRAILER 8
+#define ATM_MAX_AAL5_PDU 65535
+#define ATM_MAX_CDV 9999
+#define ATM_NOT_RSV_VCI 32
+
+#define ATM_MAX_VPI 255
+#define ATM_MAX_VPI_NNI 4096
+#define ATM_MAX_VCI 65535
+
+#define ATM_NO_AAL 0
+#define ATM_AAL0 13
+#define ATM_AAL1 1
+#define ATM_AAL2 2
+#define ATM_AAL34 3
+#define ATM_AAL5 5
+
+#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | sizeof(t))
+#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
+#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
+#define __SO_SIZE(c) ((c) & 0x3fff)
+
+#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
+
+#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
+
+#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
+
+#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
+
+#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
+
+#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
+
+#define ATM_HDR_GFC_MASK 0xf0000000
+#define ATM_HDR_GFC_SHIFT 28
+#define ATM_HDR_VPI_MASK 0x0ff00000
+#define ATM_HDR_VPI_SHIFT 20
+#define ATM_HDR_VCI_MASK 0x000ffff0
+#define ATM_HDR_VCI_SHIFT 4
+#define ATM_HDR_PTI_MASK 0x0000000e
+#define ATM_HDR_PTI_SHIFT 1
+#define ATM_HDR_CLP 0x00000001
+
+#define ATM_PTI_US0 0
+#define ATM_PTI_US1 1
+#define ATM_PTI_UCES0 2
+#define ATM_PTI_UCES1 3
+#define ATM_PTI_SEGF5 4
+#define ATM_PTI_E2EF5 5
+#define ATM_PTI_RSV_RM 6
+#define ATM_PTI_RSV 7
+
+#define ATM_NONE 0
+#define ATM_UBR 1
+#define ATM_CBR 2
+#define ATM_VBR 3
+#define ATM_ABR 4
+#define ATM_ANYCLASS 5
+
+#define ATM_MAX_PCR -1
+
+struct atm_trafprm {
+ unsigned char traffic_class;
+ int max_pcr;
+ int pcr;
+ int min_pcr;
+ int max_cdv;
+ int max_sdu;
+
+ unsigned int icr;
+ unsigned int tbe;
+ unsigned int frtt : 24;
+ unsigned int rif : 4;
+ unsigned int rdf : 4;
+ unsigned int nrm_pres :1;
+ unsigned int trm_pres :1;
+ unsigned int adtf_pres :1;
+ unsigned int cdf_pres :1;
+ unsigned int nrm :3;
+ unsigned int trm :3;
+ unsigned int adtf :10;
+ unsigned int cdf :3;
+ unsigned int spare :9;
+};
+
+struct atm_qos {
+ struct atm_trafprm txtp;
+ struct atm_trafprm rxtp __ATM_API_ALIGN;
+
+ unsigned char aal __ATM_API_ALIGN;
+};
+
+#define ATM_ITF_ANY -1
+#define ATM_VPI_ANY -1
+#define ATM_VCI_ANY -1
+#define ATM_VPI_UNSPEC -2
+#define ATM_VCI_UNSPEC -2
+
+struct sockaddr_atmpvc {
+ unsigned short sap_family;
+ struct {
+ short itf;
+ short vpi;
+ int vci;
+ } sap_addr __ATM_API_ALIGN;
+};
+
+#define ATM_ESA_LEN 20
+#define ATM_E164_LEN 12
+
+#define ATM_AFI_DCC 0x39
+#define ATM_AFI_ICD 0x47
+#define ATM_AFI_E164 0x45
+#define ATM_AFI_LOCAL 0x49
+
+#define ATM_AFI_DCC_GROUP 0xBD
+#define ATM_AFI_ICD_GROUP 0xC5
+#define ATM_AFI_E164_GROUP 0xC3
+#define ATM_AFI_LOCAL_GROUP 0xC7
+
+#define ATM_LIJ_NONE 0
+#define ATM_LIJ 1
+#define ATM_LIJ_RPJ 2
+#define ATM_LIJ_NJ 3
+
+struct sockaddr_atmsvc {
+ unsigned short sas_family;
+ struct {
+ unsigned char prv[ATM_ESA_LEN];
+ char pub[ATM_E164_LEN+1];
+
+ char lij_type;
+ uint32_t lij_id;
+ } sas_addr __ATM_API_ALIGN;
+};
+
+typedef unsigned short atm_backend_t;
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atmapi.h b/6/platforms/android-3/arch-x86/usr/include/linux/atmapi.h
new file mode 100644
index 0000000..bee5cae
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atmapi.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMAPI_H
+#define _LINUX_ATMAPI_H
+
+#if defined(__sparc__) || defined(__ia64__)
+
+#define __ATM_API_ALIGN __attribute__((aligned(8)))
+#else
+#define __ATM_API_ALIGN
+#endif
+
+typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atmdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/atmdev.h
new file mode 100644
index 0000000..27baeb0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atmdev.h
@@ -0,0 +1,161 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_ATMDEV_H
+#define LINUX_ATMDEV_H
+
+#include <linux/atmapi.h>
+#include <linux/atm.h>
+#include <linux/atmioc.h>
+
+#define ESI_LEN 6
+
+#define ATM_OC3_PCR (155520000/270*260/8/53)
+
+#define ATM_25_PCR ((25600000/8-8000)/54)
+
+#define ATM_OC12_PCR (622080000/1080*1040/8/53)
+
+#define ATM_DS3_PCR (8000*12)
+
+#define __AAL_STAT_ITEMS __HANDLE_ITEM(tx); __HANDLE_ITEM(tx_err); __HANDLE_ITEM(rx); __HANDLE_ITEM(rx_err); __HANDLE_ITEM(rx_drop);
+
+struct atm_aal_stats {
+#define __HANDLE_ITEM(i) int i
+ __AAL_STAT_ITEMS
+#undef __HANDLE_ITEM
+};
+
+struct atm_dev_stats {
+ struct atm_aal_stats aal0;
+ struct atm_aal_stats aal34;
+ struct atm_aal_stats aal5;
+} __ATM_API_ALIGN;
+
+#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc)
+
+#define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf)
+
+#define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc)
+
+#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
+
+#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
+
+#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
+
+#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
+
+#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
+
+#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
+
+#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
+
+#define ATM_SETESI _IOW('a',ATMIOC_ITF+12,struct atmif_sioc)
+
+#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
+
+#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
+
+#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
+
+#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
+
+#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
+
+#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
+
+#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc)
+
+#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc)
+
+#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc)
+
+#define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int)
+
+#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
+
+#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
+
+#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
+
+#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
+
+#define ATM_BACKEND_RAW 0
+#define ATM_BACKEND_PPP 1
+#define ATM_BACKEND_BR2684 2
+
+#define ATM_ITFTYP_LEN 8
+
+#define __ATM_LM_NONE 0
+#define __ATM_LM_AAL 1
+#define __ATM_LM_ATM 2
+
+#define __ATM_LM_PHY 8
+#define __ATM_LM_ANALOG 16
+
+#define __ATM_LM_MKLOC(n) ((n))
+#define __ATM_LM_MKRMT(n) ((n) << 8)
+
+#define __ATM_LM_XTLOC(n) ((n) & 0xff)
+#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff)
+
+#define ATM_LM_NONE 0
+
+#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL)
+#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM)
+#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY)
+#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG)
+
+#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL)
+#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM)
+#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY)
+#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG)
+
+struct atm_iobuf {
+ int length;
+ void __user *buffer;
+};
+
+#define ATM_CI_MAX -1
+
+struct atm_cirange {
+ signed char vpi_bits;
+ signed char vci_bits;
+};
+
+#define ATM_SC_RX 1024
+#define ATM_SC_TX 2048
+
+#define ATM_BACKLOG_DEFAULT 32
+
+#define ATM_MF_IMMED 1
+#define ATM_MF_INC_RSV 2
+#define ATM_MF_INC_SHP 4
+#define ATM_MF_DEC_RSV 8
+#define ATM_MF_DEC_SHP 16
+#define ATM_MF_BWD 32
+
+#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | ATM_MF_DEC_SHP | ATM_MF_BWD)
+
+#define ATM_VS_IDLE 0
+#define ATM_VS_CONNECTED 1
+#define ATM_VS_CLOSING 2
+#define ATM_VS_LISTEN 3
+#define ATM_VS_INUSE 4
+#define ATM_VS_BOUND 5
+
+#define ATM_VS2TXT_MAP "IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND"
+
+#define ATM_VF2TXT_MAP "ADDR", "READY", "PARTIAL", "REGIS", "RELEASED", "HASQOS", "LISTEN", "META", "256", "512", "1024", "2048", "SESSION", "HASSAP", "BOUND", "CLOSE"
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atmioc.h b/6/platforms/android-3/arch-x86/usr/include/linux/atmioc.h
new file mode 100644
index 0000000..d004339
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atmioc.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMIOC_H
+#define _LINUX_ATMIOC_H
+
+#include <asm/ioctl.h>
+
+#define ATMIOC_PHYCOM 0x00
+#define ATMIOC_PHYCOM_END 0x0f
+#define ATMIOC_PHYTYP 0x10
+#define ATMIOC_PHYTYP_END 0x2f
+#define ATMIOC_PHYPRV 0x30
+#define ATMIOC_PHYPRV_END 0x4f
+#define ATMIOC_SARCOM 0x50
+#define ATMIOC_SARCOM_END 0x50
+#define ATMIOC_SARPRV 0x60
+#define ATMIOC_SARPRV_END 0x7f
+#define ATMIOC_ITF 0x80
+#define ATMIOC_ITF_END 0x8f
+#define ATMIOC_BACKEND 0x90
+#define ATMIOC_BACKEND_END 0xaf
+
+#define ATMIOC_AREQUIPA 0xc0
+#define ATMIOC_LANE 0xd0
+#define ATMIOC_MPOA 0xd8
+#define ATMIOC_CLIP 0xe0
+#define ATMIOC_CLIP_END 0xef
+#define ATMIOC_SPECIAL 0xf0
+#define ATMIOC_SPECIAL_END 0xff
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atmppp.h b/6/platforms/android-3/arch-x86/usr/include/linux/atmppp.h
new file mode 100644
index 0000000..3330c32
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atmppp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMPPP_H
+#define _LINUX_ATMPPP_H
+
+#include <linux/atm.h>
+
+#define PPPOATM_ENCAPS_AUTODETECT (0)
+#define PPPOATM_ENCAPS_VC (1)
+#define PPPOATM_ENCAPS_LLC (2)
+
+struct atm_backend_ppp {
+ atm_backend_t backend_num;
+ int encaps;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/atmsap.h b/6/platforms/android-3/arch-x86/usr/include/linux/atmsap.h
new file mode 100644
index 0000000..456f75f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/atmsap.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ATMSAP_H
+#define _LINUX_ATMSAP_H
+
+#include <linux/atmapi.h>
+
+#define ATM_L2_NONE 0
+#define ATM_L2_ISO1745 0x01
+#define ATM_L2_Q291 0x02
+#define ATM_L2_X25_LL 0x06
+#define ATM_L2_X25_ML 0x07
+#define ATM_L2_LAPB 0x08
+#define ATM_L2_HDLC_ARM 0x09
+#define ATM_L2_HDLC_NRM 0x0a
+#define ATM_L2_HDLC_ABM 0x0b
+#define ATM_L2_ISO8802 0x0c
+#define ATM_L2_X75 0x0d
+#define ATM_L2_Q922 0x0e
+#define ATM_L2_USER 0x10
+#define ATM_L2_ISO7776 0x11
+
+#define ATM_L3_NONE 0
+#define ATM_L3_X25 0x06
+#define ATM_L3_ISO8208 0x07
+#define ATM_L3_X223 0x08
+#define ATM_L3_ISO8473 0x09
+#define ATM_L3_T70 0x0a
+#define ATM_L3_TR9577 0x0b
+#define ATM_L3_H310 0x0c
+#define ATM_L3_H321 0x0d
+#define ATM_L3_USER 0x10
+
+#define ATM_HL_NONE 0
+#define ATM_HL_ISO 0x01
+#define ATM_HL_USER 0x02
+#define ATM_HL_HLP 0x03
+#define ATM_HL_VENDOR 0x04
+
+#define ATM_IMD_NONE 0
+#define ATM_IMD_NORMAL 1
+#define ATM_IMD_EXTENDED 2
+
+#define ATM_TT_NONE 0
+#define ATM_TT_RX 1
+#define ATM_TT_TX 2
+#define ATM_TT_RXTX 3
+
+#define ATM_MC_NONE 0
+#define ATM_MC_TS 1
+#define ATM_MC_TS_FEC 2
+#define ATM_MC_PS 3
+#define ATM_MC_PS_FEC 4
+#define ATM_MC_H221 5
+
+#define ATM_MAX_HLI 8
+
+struct atm_blli {
+ unsigned char l2_proto;
+ union {
+ struct {
+ unsigned char mode;
+
+ unsigned char window;
+ } itu;
+ unsigned char user;
+ } l2;
+ unsigned char l3_proto;
+ union {
+ struct {
+ unsigned char mode;
+
+ unsigned char def_size;
+
+ unsigned char window;
+ } itu;
+ unsigned char user;
+ struct {
+ unsigned char term_type;
+ unsigned char fw_mpx_cap;
+
+ unsigned char bw_mpx_cap;
+
+ } h310;
+ struct {
+ unsigned char ipi;
+ unsigned char snap[5];
+
+ } tr9577;
+ } l3;
+} __ATM_API_ALIGN;
+
+struct atm_bhli {
+ unsigned char hl_type;
+ unsigned char hl_length;
+
+ unsigned char hl_info[ATM_MAX_HLI];
+};
+
+#define ATM_MAX_BLLI 3
+
+struct atm_sap {
+ struct atm_bhli bhli;
+ struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN;
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/attribute_container.h b/6/platforms/android-3/arch-x86/usr/include/linux/attribute_container.h
new file mode 100644
index 0000000..1a9bfb0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/attribute_container.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ATTRIBUTE_CONTAINER_H_
+#define _ATTRIBUTE_CONTAINER_H_
+
+#include <linux/device.h>
+#include <linux/list.h>
+#include <linux/klist.h>
+#include <linux/spinlock.h>
+
+struct attribute_container {
+ struct list_head node;
+ struct klist containers;
+ struct class *class;
+ struct class_device_attribute **attrs;
+ int (*match)(struct attribute_container *, struct device *);
+#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01
+ unsigned long flags;
+};
+
+struct attribute_container *attribute_container_classdev_to_container(struct class_device *);
+struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *);
+struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/auto_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/auto_fs.h
new file mode 100644
index 0000000..3711cc4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/auto_fs.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_AUTO_FS_H
+#define _LINUX_AUTO_FS_H
+
+#include <linux/ioctl.h>
+
+#define AUTOFS_PROTO_VERSION 3
+
+#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
+#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
+
+#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) || defined(__powerpc__) || defined(__s390__)
+typedef unsigned int autofs_wqt_t;
+#else
+typedef unsigned long autofs_wqt_t;
+#endif
+
+#define autofs_ptype_missing 0
+#define autofs_ptype_expire 1
+
+struct autofs_packet_hdr {
+ int proto_version;
+ int type;
+};
+
+struct autofs_packet_missing {
+ struct autofs_packet_hdr hdr;
+ autofs_wqt_t wait_queue_token;
+ int len;
+ char name[NAME_MAX+1];
+};
+
+struct autofs_packet_expire {
+ struct autofs_packet_hdr hdr;
+ int len;
+ char name[NAME_MAX+1];
+};
+
+#define AUTOFS_IOC_READY _IO(0x93,0x60)
+#define AUTOFS_IOC_FAIL _IO(0x93,0x61)
+#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
+#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
+#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
+#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/autoconf.h b/6/platforms/android-3/arch-x86/usr/include/linux/autoconf.h
new file mode 100644
index 0000000..306bf12
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/autoconf.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_AUTOCONF_CRAP_GOES_HERE
+#define LINUX_AUTOCONF_CRAP_GOES_HERE
+
+#define AUTOCONF_INCLUDED
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/auxvec.h b/6/platforms/android-3/arch-x86/usr/include/linux/auxvec.h
new file mode 100644
index 0000000..f8a0701
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/auxvec.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_AUXVEC_H
+#define _LINUX_AUXVEC_H
+
+#include <asm/auxvec.h>
+
+#define AT_NULL 0
+#define AT_IGNORE 1
+#define AT_EXECFD 2
+#define AT_PHDR 3
+#define AT_PHENT 4
+#define AT_PHNUM 5
+#define AT_PAGESZ 6
+#define AT_BASE 7
+#define AT_FLAGS 8
+#define AT_ENTRY 9
+#define AT_NOTELF 10
+#define AT_UID 11
+#define AT_EUID 12
+#define AT_GID 13
+#define AT_EGID 14
+#define AT_PLATFORM 15
+#define AT_HWCAP 16
+#define AT_CLKTCK 17
+
+#define AT_SECURE 23
+
+#define AT_VECTOR_SIZE 44
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/backing-dev.h b/6/platforms/android-3/arch-x86/usr/include/linux/backing-dev.h
new file mode 100644
index 0000000..4996d2c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/backing-dev.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BACKING_DEV_H
+#define _LINUX_BACKING_DEV_H
+
+#include <asm/atomic.h>
+
+enum bdi_state {
+ BDI_pdflush,
+ BDI_write_congested,
+ BDI_read_congested,
+ BDI_unused,
+};
+
+typedef int (congested_fn)(void *, int);
+
+struct backing_dev_info {
+ unsigned long ra_pages;
+ unsigned long state;
+ unsigned int capabilities;
+ congested_fn *congested_fn;
+ void *congested_data;
+ void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
+ void *unplug_io_data;
+};
+
+#define BDI_CAP_NO_ACCT_DIRTY 0x00000001
+#define BDI_CAP_NO_WRITEBACK 0x00000002
+#define BDI_CAP_MAP_COPY 0x00000004
+#define BDI_CAP_MAP_DIRECT 0x00000008
+#define BDI_CAP_READ_MAP 0x00000010
+#define BDI_CAP_WRITE_MAP 0x00000020
+#define BDI_CAP_EXEC_MAP 0x00000040
+#define BDI_CAP_VMFLAGS (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
+
+#if defined(VM_MAYREAD) && BDI_CAP_READ_MAP != (VM_MAYREAD || BDI_CAP_WRITE_MAP != (VM_MAYWRITE || BDI_CAP_EXEC_MAP != VM_MAYEXEC))
+#error please change backing_dev_info::capabilities flags
+#endif
+
+#define bdi_cap_writeback_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
+#define bdi_cap_account_dirty(bdi) (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
+#define mapping_cap_writeback_dirty(mapping) bdi_cap_writeback_dirty((mapping)->backing_dev_info)
+#define mapping_cap_account_dirty(mapping) bdi_cap_account_dirty((mapping)->backing_dev_info)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/binder.h b/6/platforms/android-3/arch-x86/usr/include/linux/binder.h
new file mode 100644
index 0000000..b97eafb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/binder.h
@@ -0,0 +1,186 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BINDER_H
+#define _LINUX_BINDER_H
+
+#include <linux/ioctl.h>
+
+#define B_PACK_CHARS(c1, c2, c3, c4) ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4))
+#define B_TYPE_LARGE 0x85
+
+enum {
+ BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE),
+ BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE),
+ BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE),
+ BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE),
+ BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE),
+};
+
+enum {
+ FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
+ FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
+};
+
+struct flat_binder_object {
+
+ unsigned long type;
+ unsigned long flags;
+
+ union {
+ void *binder;
+ signed long handle;
+ };
+
+ void *cookie;
+};
+
+struct binder_write_read {
+ signed long write_size;
+ signed long write_consumed;
+ unsigned long write_buffer;
+ signed long read_size;
+ signed long read_consumed;
+ unsigned long read_buffer;
+};
+
+struct binder_version {
+
+ signed long protocol_version;
+};
+
+#define BINDER_CURRENT_PROTOCOL_VERSION 7
+
+#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
+#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, int64_t)
+#define BINDER_SET_MAX_THREADS _IOW('b', 5, size_t)
+#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, int)
+#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, int)
+#define BINDER_THREAD_EXIT _IOW('b', 8, int)
+#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
+
+enum transaction_flags {
+ TF_ONE_WAY = 0x01,
+ TF_ROOT_OBJECT = 0x04,
+ TF_STATUS_CODE = 0x08,
+ TF_ACCEPT_FDS = 0x10,
+};
+
+struct binder_transaction_data {
+
+ union {
+ size_t handle;
+ void *ptr;
+ } target;
+ void *cookie;
+ unsigned int code;
+
+ unsigned int flags;
+ pid_t sender_pid;
+ uid_t sender_euid;
+ size_t data_size;
+ size_t offsets_size;
+
+ union {
+ struct {
+
+ const void *buffer;
+
+ const void *offsets;
+ } ptr;
+ uint8_t buf[8];
+ } data;
+};
+
+struct binder_ptr_cookie {
+ void *ptr;
+ void *cookie;
+};
+
+struct binder_pri_desc {
+ int priority;
+ int desc;
+};
+
+struct binder_pri_ptr_cookie {
+ int priority;
+ void *ptr;
+ void *cookie;
+};
+
+enum BinderDriverReturnProtocol {
+ BR_ERROR = _IOR_BAD('r', 0, int),
+
+ BR_OK = _IO('r', 1),
+
+ BR_TRANSACTION = _IOR_BAD('r', 2, struct binder_transaction_data),
+ BR_REPLY = _IOR_BAD('r', 3, struct binder_transaction_data),
+
+ BR_ACQUIRE_RESULT = _IOR_BAD('r', 4, int),
+
+ BR_DEAD_REPLY = _IO('r', 5),
+
+ BR_TRANSACTION_COMPLETE = _IO('r', 6),
+
+ BR_INCREFS = _IOR_BAD('r', 7, struct binder_ptr_cookie),
+ BR_ACQUIRE = _IOR_BAD('r', 8, struct binder_ptr_cookie),
+ BR_RELEASE = _IOR_BAD('r', 9, struct binder_ptr_cookie),
+ BR_DECREFS = _IOR_BAD('r', 10, struct binder_ptr_cookie),
+
+ BR_ATTEMPT_ACQUIRE = _IOR_BAD('r', 11, struct binder_pri_ptr_cookie),
+
+ BR_NOOP = _IO('r', 12),
+
+ BR_SPAWN_LOOPER = _IO('r', 13),
+
+ BR_FINISHED = _IO('r', 14),
+
+ BR_DEAD_BINDER = _IOR_BAD('r', 15, void *),
+
+ BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR_BAD('r', 16, void *),
+
+ BR_FAILED_REPLY = _IO('r', 17),
+
+};
+
+enum BinderDriverCommandProtocol {
+ BC_TRANSACTION = _IOW_BAD('c', 0, struct binder_transaction_data),
+ BC_REPLY = _IOW_BAD('c', 1, struct binder_transaction_data),
+
+ BC_ACQUIRE_RESULT = _IOW_BAD('c', 2, int),
+
+ BC_FREE_BUFFER = _IOW_BAD('c', 3, int),
+
+ BC_INCREFS = _IOW_BAD('c', 4, int),
+ BC_ACQUIRE = _IOW_BAD('c', 5, int),
+ BC_RELEASE = _IOW_BAD('c', 6, int),
+ BC_DECREFS = _IOW_BAD('c', 7, int),
+
+ BC_INCREFS_DONE = _IOW_BAD('c', 8, struct binder_ptr_cookie),
+ BC_ACQUIRE_DONE = _IOW_BAD('c', 9, struct binder_ptr_cookie),
+
+ BC_ATTEMPT_ACQUIRE = _IOW_BAD('c', 10, struct binder_pri_desc),
+
+ BC_REGISTER_LOOPER = _IO('c', 11),
+
+ BC_ENTER_LOOPER = _IO('c', 12),
+ BC_EXIT_LOOPER = _IO('c', 13),
+
+ BC_REQUEST_DEATH_NOTIFICATION = _IOW_BAD('c', 14, struct binder_ptr_cookie),
+
+ BC_CLEAR_DEATH_NOTIFICATION = _IOW_BAD('c', 15, struct binder_ptr_cookie),
+
+ BC_DEAD_BINDER_DONE = _IOW_BAD('c', 16, void *),
+
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/binfmts.h b/6/platforms/android-3/arch-x86/usr/include/linux/binfmts.h
new file mode 100644
index 0000000..3335985
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/binfmts.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BINFMTS_H
+#define _LINUX_BINFMTS_H
+
+#include <linux/capability.h>
+
+struct pt_regs;
+
+#define MAX_ARG_PAGES 32
+
+#define BINPRM_BUF_SIZE 128
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/bio.h b/6/platforms/android-3/arch-x86/usr/include/linux/bio.h
new file mode 100644
index 0000000..4e91314
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/bio.h
@@ -0,0 +1,171 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BIO_H
+#define __LINUX_BIO_H
+
+#include <linux/highmem.h>
+#include <linux/mempool.h>
+#include <linux/ioprio.h>
+
+#include <asm/io.h>
+
+#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
+#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
+#define BIOVEC_VIRT_OVERSIZE(x) ((x) > BIO_VMERGE_MAX_SIZE)
+#else
+#define BIOVEC_VIRT_START_SIZE(x) 0
+#define BIOVEC_VIRT_OVERSIZE(x) 0
+#endif
+
+#ifndef BIO_VMERGE_BOUNDARY
+#define BIO_VMERGE_BOUNDARY 0
+#endif
+
+#define BIO_DEBUG
+
+#ifdef BIO_DEBUG
+#define BIO_BUG_ON BUG_ON
+#else
+#define BIO_BUG_ON
+#endif
+
+#define BIO_MAX_PAGES 256
+#define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT)
+#define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
+
+struct bio_vec {
+ struct page *bv_page;
+ unsigned int bv_len;
+ unsigned int bv_offset;
+};
+
+struct bio_set;
+struct bio;
+typedef int (bio_end_io_t) (struct bio *, unsigned int, int);
+typedef void (bio_destructor_t) (struct bio *);
+
+struct bio {
+ sector_t bi_sector;
+ struct bio *bi_next;
+ struct block_device *bi_bdev;
+ unsigned long bi_flags;
+ unsigned long bi_rw;
+
+ unsigned short bi_vcnt;
+ unsigned short bi_idx;
+
+ unsigned short bi_phys_segments;
+
+ unsigned short bi_hw_segments;
+
+ unsigned int bi_size;
+
+ unsigned int bi_hw_front_size;
+ unsigned int bi_hw_back_size;
+
+ unsigned int bi_max_vecs;
+
+ struct bio_vec *bi_io_vec;
+
+ bio_end_io_t *bi_end_io;
+ atomic_t bi_cnt;
+
+ void *bi_private;
+
+ bio_destructor_t *bi_destructor;
+};
+
+#define BIO_UPTODATE 0
+#define BIO_RW_BLOCK 1
+#define BIO_EOF 2
+#define BIO_SEG_VALID 3
+#define BIO_CLONED 4
+#define BIO_BOUNCED 5
+#define BIO_USER_MAPPED 6
+#define BIO_EOPNOTSUPP 7
+#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
+
+#define BIO_POOL_BITS (4)
+#define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
+#define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
+#define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
+
+#define BIO_RW 0
+#define BIO_RW_AHEAD 1
+#define BIO_RW_BARRIER 2
+#define BIO_RW_FAILFAST 3
+#define BIO_RW_SYNC 4
+
+#define BIO_PRIO_SHIFT (8 * sizeof(unsigned long) - IOPRIO_BITS)
+#define bio_prio(bio) ((bio)->bi_rw >> BIO_PRIO_SHIFT)
+#define bio_prio_valid(bio) ioprio_valid(bio_prio(bio))
+
+#define bio_set_prio(bio, prio) do { WARN_ON(prio >= (1 << IOPRIO_BITS)); (bio)->bi_rw &= ((1UL << BIO_PRIO_SHIFT) - 1); (bio)->bi_rw |= ((unsigned long) (prio) << BIO_PRIO_SHIFT); } while (0)
+
+#define bio_iovec_idx(bio, idx) (&((bio)->bi_io_vec[(idx)]))
+#define bio_iovec(bio) bio_iovec_idx((bio), (bio)->bi_idx)
+#define bio_page(bio) bio_iovec((bio))->bv_page
+#define bio_offset(bio) bio_iovec((bio))->bv_offset
+#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
+#define bio_sectors(bio) ((bio)->bi_size >> 9)
+#define bio_cur_sectors(bio) (bio_iovec(bio)->bv_len >> 9)
+#define bio_data(bio) (page_address(bio_page((bio))) + bio_offset((bio)))
+#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
+#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
+#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
+#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
+
+#define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
+#define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
+
+#define __bio_kmap_atomic(bio, idx, kmtype) (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page, kmtype) + bio_iovec_idx((bio), (idx))->bv_offset)
+
+#define __bio_kunmap_atomic(addr, kmtype) kunmap_atomic(addr, kmtype)
+
+#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
+#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
+
+#ifndef BIOVEC_PHYS_MERGEABLE
+#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
+#endif
+
+#define BIOVEC_VIRT_MERGEABLE(vec1, vec2) ((((bvec_to_phys((vec1)) + (vec1)->bv_len) | bvec_to_phys((vec2))) & (BIO_VMERGE_BOUNDARY - 1)) == 0)
+#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
+#define BIOVEC_SEG_BOUNDARY(q, b1, b2) __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, (q)->seg_boundary_mask)
+#define BIO_SEG_BOUNDARY(q, b1, b2) BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2)))
+
+#define bio_io_error(bio, bytes) bio_endio((bio), (bytes), -EIO)
+
+#define __bio_for_each_segment(bvl, bio, i, start_idx) for (bvl = bio_iovec_idx((bio), (start_idx)), i = (start_idx); i < (bio)->bi_vcnt; bvl++, i++)
+
+#define bio_for_each_segment(bvl, bio, i) __bio_for_each_segment(bvl, bio, i, (bio)->bi_idx)
+
+#define bio_get(bio) atomic_inc(&(bio)->bi_cnt)
+
+struct bio_pair {
+ struct bio bio1, bio2;
+ struct bio_vec bv1, bv2;
+ atomic_t cnt;
+ int error;
+};
+
+struct request_queue;
+
+struct sg_iovec;
+
+#define bvec_kmap_irq(bvec, flags) (page_address((bvec)->bv_page) + (bvec)->bv_offset)
+#define bvec_kunmap_irq(buf, flags) do { *(flags) = 0; } while (0)
+
+#define __bio_kunmap_irq(buf, flags) bvec_kunmap_irq(buf, flags)
+#define bio_kmap_irq(bio, flags) __bio_kmap_irq((bio), (bio)->bi_idx, (flags))
+#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/bitmap.h b/6/platforms/android-3/arch-x86/usr/include/linux/bitmap.h
new file mode 100644
index 0000000..246d158
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/bitmap.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BITMAP_H
+#define __LINUX_BITMAP_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+#include <linux/bitops.h>
+#include <linux/string.h>
+
+#define BITMAP_LAST_WORD_MASK(nbits) ( ((nbits) % BITS_PER_LONG) ? (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL )
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/bitops.h b/6/platforms/android-3/arch-x86/usr/include/linux/bitops.h
new file mode 100644
index 0000000..f8df614
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/bitops.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BITOPS_H
+#define _LINUX_BITOPS_H
+#include <asm/types.h>
+
+#include <asm/bitops.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/blkdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/blkdev.h
new file mode 100644
index 0000000..3004524
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/blkdev.h
@@ -0,0 +1,461 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLKDEV_H
+#define _LINUX_BLKDEV_H
+
+#include <linux/major.h>
+#include <linux/genhd.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+#include <linux/pagemap.h>
+#include <linux/backing-dev.h>
+#include <linux/wait.h>
+#include <linux/mempool.h>
+#include <linux/bio.h>
+#include <linux/module.h>
+#include <linux/stringify.h>
+
+#include <asm/scatterlist.h>
+
+struct scsi_ioctl_command;
+
+struct request_queue;
+typedef struct request_queue request_queue_t;
+struct elevator_queue;
+typedef struct elevator_queue elevator_t;
+struct request_pm_state;
+struct blk_trace;
+
+#define BLKDEV_MIN_RQ 4
+#define BLKDEV_MAX_RQ 128
+
+struct as_io_context {
+ spinlock_t lock;
+
+ void (*dtor)(struct as_io_context *aic);
+ void (*exit)(struct as_io_context *aic);
+
+ unsigned long state;
+ atomic_t nr_queued;
+ atomic_t nr_dispatched;
+
+ unsigned long last_end_request;
+ unsigned long ttime_total;
+ unsigned long ttime_samples;
+ unsigned long ttime_mean;
+
+ unsigned int seek_samples;
+ sector_t last_request_pos;
+ u64 seek_total;
+ sector_t seek_mean;
+};
+
+struct cfq_queue;
+struct cfq_io_context {
+ struct rb_node rb_node;
+ void *key;
+
+ struct cfq_queue *cfqq[2];
+
+ struct io_context *ioc;
+
+ unsigned long last_end_request;
+ sector_t last_request_pos;
+ unsigned long last_queue;
+
+ unsigned long ttime_total;
+ unsigned long ttime_samples;
+ unsigned long ttime_mean;
+
+ unsigned int seek_samples;
+ u64 seek_total;
+ sector_t seek_mean;
+
+ struct list_head queue_list;
+
+ void (*dtor)(struct io_context *);
+ void (*exit)(struct io_context *);
+};
+
+struct io_context {
+ atomic_t refcount;
+ struct task_struct *task;
+
+ int (*set_ioprio)(struct io_context *, unsigned int);
+
+ unsigned long last_waited;
+ int nr_batch_requests;
+
+ struct as_io_context *aic;
+ struct rb_root cic_root;
+};
+
+struct io_context *current_io_context(gfp_t gfp_flags);
+struct io_context *get_io_context(gfp_t gfp_flags);
+
+struct request;
+typedef void (rq_end_io_fn)(struct request *, int);
+
+struct request_list {
+ int count[2];
+ int starved[2];
+ int elvpriv;
+ mempool_t *rq_pool;
+ wait_queue_head_t wait[2];
+};
+
+#define BLK_MAX_CDB 16
+
+struct request {
+ struct list_head queuelist;
+ struct list_head donelist;
+
+ unsigned long flags;
+
+ sector_t sector;
+ unsigned long nr_sectors;
+
+ unsigned int current_nr_sectors;
+
+ sector_t hard_sector;
+ unsigned long hard_nr_sectors;
+
+ unsigned int hard_cur_sectors;
+
+ struct bio *bio;
+ struct bio *biotail;
+
+ void *elevator_private;
+ void *completion_data;
+
+ int rq_status;
+ int errors;
+ struct gendisk *rq_disk;
+ unsigned long start_time;
+
+ unsigned short nr_phys_segments;
+
+ unsigned short nr_hw_segments;
+
+ unsigned short ioprio;
+
+ int tag;
+
+ int ref_count;
+ request_queue_t *q;
+ struct request_list *rl;
+
+ struct completion *waiting;
+ void *special;
+ char *buffer;
+
+ unsigned int cmd_len;
+ unsigned char cmd[BLK_MAX_CDB];
+
+ unsigned int data_len;
+ unsigned int sense_len;
+ void *data;
+ void *sense;
+
+ unsigned int timeout;
+ int retries;
+
+ rq_end_io_fn *end_io;
+ void *end_io_data;
+};
+
+enum rq_flag_bits {
+ __REQ_RW,
+ __REQ_FAILFAST,
+ __REQ_SORTED,
+ __REQ_SOFTBARRIER,
+ __REQ_HARDBARRIER,
+ __REQ_FUA,
+ __REQ_CMD,
+ __REQ_NOMERGE,
+ __REQ_STARTED,
+ __REQ_DONTPREP,
+ __REQ_QUEUED,
+ __REQ_ELVPRIV,
+
+ __REQ_PC,
+ __REQ_BLOCK_PC,
+ __REQ_SENSE,
+
+ __REQ_FAILED,
+ __REQ_QUIET,
+ __REQ_SPECIAL,
+ __REQ_DRIVE_CMD,
+ __REQ_DRIVE_TASK,
+ __REQ_DRIVE_TASKFILE,
+ __REQ_PREEMPT,
+ __REQ_PM_SUSPEND,
+ __REQ_PM_RESUME,
+ __REQ_PM_SHUTDOWN,
+ __REQ_ORDERED_COLOR,
+ __REQ_RW_SYNC,
+ __REQ_NR_BITS,
+};
+
+#define REQ_RW (1 << __REQ_RW)
+#define REQ_FAILFAST (1 << __REQ_FAILFAST)
+#define REQ_SORTED (1 << __REQ_SORTED)
+#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
+#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
+#define REQ_FUA (1 << __REQ_FUA)
+#define REQ_CMD (1 << __REQ_CMD)
+#define REQ_NOMERGE (1 << __REQ_NOMERGE)
+#define REQ_STARTED (1 << __REQ_STARTED)
+#define REQ_DONTPREP (1 << __REQ_DONTPREP)
+#define REQ_QUEUED (1 << __REQ_QUEUED)
+#define REQ_ELVPRIV (1 << __REQ_ELVPRIV)
+#define REQ_PC (1 << __REQ_PC)
+#define REQ_BLOCK_PC (1 << __REQ_BLOCK_PC)
+#define REQ_SENSE (1 << __REQ_SENSE)
+#define REQ_FAILED (1 << __REQ_FAILED)
+#define REQ_QUIET (1 << __REQ_QUIET)
+#define REQ_SPECIAL (1 << __REQ_SPECIAL)
+#define REQ_DRIVE_CMD (1 << __REQ_DRIVE_CMD)
+#define REQ_DRIVE_TASK (1 << __REQ_DRIVE_TASK)
+#define REQ_DRIVE_TASKFILE (1 << __REQ_DRIVE_TASKFILE)
+#define REQ_PREEMPT (1 << __REQ_PREEMPT)
+#define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
+#define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
+#define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
+#define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR)
+#define REQ_RW_SYNC (1 << __REQ_RW_SYNC)
+
+struct request_pm_state
+{
+
+ int pm_step;
+
+ u32 pm_state;
+ void* data;
+};
+
+#include <linux/elevator.h>
+
+typedef int (merge_request_fn) (request_queue_t *, struct request *,
+ struct bio *);
+typedef int (merge_requests_fn) (request_queue_t *, struct request *,
+ struct request *);
+typedef void (request_fn_proc) (request_queue_t *q);
+typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
+typedef int (prep_rq_fn) (request_queue_t *, struct request *);
+typedef void (unplug_fn) (request_queue_t *);
+
+struct bio_vec;
+typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
+typedef void (activity_fn) (void *data, int rw);
+typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
+typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
+typedef void (softirq_done_fn)(struct request *);
+
+enum blk_queue_state {
+ Queue_down,
+ Queue_up,
+};
+
+struct blk_queue_tag {
+ struct request **tag_index;
+ unsigned long *tag_map;
+ struct list_head busy_list;
+ int busy;
+ int max_depth;
+ int real_max_depth;
+ atomic_t refcnt;
+};
+
+struct request_queue
+{
+
+ struct list_head queue_head;
+ struct request *last_merge;
+ elevator_t *elevator;
+
+ struct request_list rq;
+
+ request_fn_proc *request_fn;
+ merge_request_fn *back_merge_fn;
+ merge_request_fn *front_merge_fn;
+ merge_requests_fn *merge_requests_fn;
+ make_request_fn *make_request_fn;
+ prep_rq_fn *prep_rq_fn;
+ unplug_fn *unplug_fn;
+ merge_bvec_fn *merge_bvec_fn;
+ activity_fn *activity_fn;
+ issue_flush_fn *issue_flush_fn;
+ prepare_flush_fn *prepare_flush_fn;
+ softirq_done_fn *softirq_done_fn;
+
+ sector_t end_sector;
+ struct request *boundary_rq;
+
+ struct timer_list unplug_timer;
+ int unplug_thresh;
+ unsigned long unplug_delay;
+ struct work_struct unplug_work;
+
+ struct backing_dev_info backing_dev_info;
+
+ void *queuedata;
+
+ void *activity_data;
+
+ unsigned long bounce_pfn;
+ gfp_t bounce_gfp;
+
+ unsigned long queue_flags;
+
+ spinlock_t __queue_lock;
+ spinlock_t *queue_lock;
+
+ struct kobject kobj;
+
+ unsigned long nr_requests;
+ unsigned int nr_congestion_on;
+ unsigned int nr_congestion_off;
+ unsigned int nr_batching;
+
+ unsigned int max_sectors;
+ unsigned int max_hw_sectors;
+ unsigned short max_phys_segments;
+ unsigned short max_hw_segments;
+ unsigned short hardsect_size;
+ unsigned int max_segment_size;
+
+ unsigned long seg_boundary_mask;
+ unsigned int dma_alignment;
+
+ struct blk_queue_tag *queue_tags;
+
+ unsigned int nr_sorted;
+ unsigned int in_flight;
+
+ unsigned int sg_timeout;
+ unsigned int sg_reserved_size;
+ int node;
+
+ struct blk_trace *blk_trace;
+
+ unsigned int ordered, next_ordered, ordseq;
+ int orderr, ordcolor;
+ struct request pre_flush_rq, bar_rq, post_flush_rq;
+ struct request *orig_bar_rq;
+ unsigned int bi_size;
+
+ struct mutex sysfs_lock;
+};
+
+#define RQ_INACTIVE (-1)
+#define RQ_ACTIVE 1
+
+#define QUEUE_FLAG_CLUSTER 0
+#define QUEUE_FLAG_QUEUED 1
+#define QUEUE_FLAG_STOPPED 2
+#define QUEUE_FLAG_READFULL 3
+#define QUEUE_FLAG_WRITEFULL 4
+#define QUEUE_FLAG_DEAD 5
+#define QUEUE_FLAG_REENTER 6
+#define QUEUE_FLAG_PLUGGED 7
+#define QUEUE_FLAG_ELVSWITCH 8
+
+enum {
+
+ QUEUE_ORDERED_NONE = 0x00,
+ QUEUE_ORDERED_DRAIN = 0x01,
+ QUEUE_ORDERED_TAG = 0x02,
+
+ QUEUE_ORDERED_PREFLUSH = 0x10,
+ QUEUE_ORDERED_POSTFLUSH = 0x20,
+ QUEUE_ORDERED_FUA = 0x40,
+
+ QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
+ QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
+ QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
+ QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
+ QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
+
+ QUEUE_ORDSEQ_STARTED = 0x01,
+ QUEUE_ORDSEQ_DRAIN = 0x02,
+ QUEUE_ORDSEQ_PREFLUSH = 0x04,
+ QUEUE_ORDSEQ_BAR = 0x08,
+ QUEUE_ORDSEQ_POSTFLUSH = 0x10,
+ QUEUE_ORDSEQ_DONE = 0x20,
+};
+
+#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
+#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
+#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
+#define blk_queue_flushing(q) ((q)->ordseq)
+
+#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
+#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
+#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
+#define blk_rq_started(rq) ((rq)->flags & REQ_STARTED)
+
+#define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq))
+
+#define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
+#define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
+#define blk_pm_request(rq) ((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME))
+
+#define blk_sorted_rq(rq) ((rq)->flags & REQ_SORTED)
+#define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER)
+#define blk_fua_rq(rq) ((rq)->flags & REQ_FUA)
+
+#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
+
+#define rq_data_dir(rq) ((rq)->flags & 1)
+
+#define RQ_NOMERGE_FLAGS (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
+#define rq_mergeable(rq) (!((rq)->flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq)))
+#define blk_queue_headactive(q, head_active)
+#define BLKPREP_OK 0
+#define BLKPREP_KILL 1
+#define BLKPREP_DEFER 2
+
+#define BLK_BOUNCE_HIGH ((u64)blk_max_low_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
+#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
+
+#define rq_for_each_bio(_bio, rq) if ((rq->bio)) for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)
+
+#define end_io_error(uptodate) (unlikely((uptodate) <= 0))
+
+#define blk_queue_tag_depth(q) ((q)->queue_tags->busy)
+#define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth)
+#define blk_rq_tagged(rq) ((rq)->flags & REQ_QUEUED)
+
+#define MAX_PHYS_SEGMENTS 128
+#define MAX_HW_SEGMENTS 128
+#define SAFE_MAX_SECTORS 255
+#define BLK_DEF_MAX_SECTORS 1024
+
+#define MAX_SEGMENT_SIZE 65536
+
+#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
+
+#define blk_finished_io(nsects) do { } while (0)
+#define blk_started_io(nsects) do { } while (0)
+
+#define sector_div(n, b)( { int _res; _res = (n) % (b); (n) /= (b); _res; } )
+
+#define MODULE_ALIAS_BLOCKDEV(major,minor) MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
+#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) MODULE_ALIAS("block-major-" __stringify(major) "-*")
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/blkpg.h b/6/platforms/android-3/arch-x86/usr/include/linux/blkpg.h
new file mode 100644
index 0000000..45a4a47
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/blkpg.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLKPG_H
+#define _LINUX_BLKPG_H
+
+#include <linux/compiler.h>
+#include <linux/ioctl.h>
+
+#define BLKPG _IO(0x12,105)
+
+struct blkpg_ioctl_arg {
+ int op;
+ int flags;
+ int datalen;
+ void __user *data;
+};
+
+#define BLKPG_ADD_PARTITION 1
+#define BLKPG_DEL_PARTITION 2
+
+#define BLKPG_DEVNAMELTH 64
+#define BLKPG_VOLNAMELTH 64
+
+struct blkpg_partition {
+ long long start;
+ long long length;
+ int pno;
+ char devname[BLKPG_DEVNAMELTH];
+ char volname[BLKPG_VOLNAMELTH];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/blockgroup_lock.h b/6/platforms/android-3/arch-x86/usr/include/linux/blockgroup_lock.h
new file mode 100644
index 0000000..c814020
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BLOCKGROUP_LOCK_H
+#define _LINUX_BLOCKGROUP_LOCK_H
+
+#include <linux/spinlock.h>
+#include <linux/cache.h>
+
+#define NR_BG_LOCKS 1
+
+struct bgl_lock {
+ spinlock_t lock;
+} ____cacheline_aligned_in_smp;
+
+struct blockgroup_lock {
+ struct bgl_lock locks[NR_BG_LOCKS];
+};
+
+#define sb_bgl_lock(sb, block_group) (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/big_endian.h
new file mode 100644
index 0000000..ee0d880
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H
+#define _LINUX_BYTEORDER_BIG_ENDIAN_H
+
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BIG_ENDIAN_BITFIELD
+#define __BIG_ENDIAN_BITFIELD
+#endif
+
+#include <linux/types.h>
+#include <linux/byteorder/swab.h>
+
+#define __constant_htonl(x) ((__force __be32)(__u32)(x))
+#define __constant_ntohl(x) ((__force __u32)(__be32)(x))
+#define __constant_htons(x) ((__force __be16)(__u16)(x))
+#define __constant_ntohs(x) ((__force __u16)(__be16)(x))
+#define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x)))
+#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x)))
+#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x)))
+#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x))
+#define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x))
+#define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x))
+#define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
+#define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
+#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
+#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
+#define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
+#define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
+#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
+
+#define __cpu_to_le64s(x) __swab64s((x))
+#define __le64_to_cpus(x) __swab64s((x))
+#define __cpu_to_le32s(x) __swab32s((x))
+#define __le32_to_cpus(x) __swab32s((x))
+#define __cpu_to_le16s(x) __swab16s((x))
+#define __le16_to_cpus(x) __swab16s((x))
+#define __cpu_to_be64s(x) do {} while (0)
+#define __be64_to_cpus(x) do {} while (0)
+#define __cpu_to_be32s(x) do {} while (0)
+#define __be32_to_cpus(x) do {} while (0)
+#define __cpu_to_be16s(x) do {} while (0)
+#define __be16_to_cpus(x) do {} while (0)
+#include <linux/byteorder/generic.h>
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/generic.h b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/generic.h
new file mode 100644
index 0000000..ac469ff
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/generic.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_GENERIC_H
+#define _LINUX_BYTEORDER_GENERIC_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/little_endian.h
new file mode 100644
index 0000000..2c26e9c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __LITTLE_ENDIAN_BITFIELD
+#define __LITTLE_ENDIAN_BITFIELD
+#endif
+
+#include <linux/types.h>
+#include <linux/byteorder/swab.h>
+
+#define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
+#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
+#define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
+#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
+#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
+#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
+#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
+#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
+#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
+#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
+#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
+#define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
+#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
+#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
+#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
+#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
+#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
+
+#define __cpu_to_le64s(x) do {} while (0)
+#define __le64_to_cpus(x) do {} while (0)
+#define __cpu_to_le32s(x) do {} while (0)
+#define __le32_to_cpus(x) do {} while (0)
+#define __cpu_to_le16s(x) do {} while (0)
+#define __le16_to_cpus(x) do {} while (0)
+#define __cpu_to_be64s(x) __swab64s((x))
+#define __be64_to_cpus(x) __swab64s((x))
+#define __cpu_to_be32s(x) __swab32s((x))
+#define __be32_to_cpus(x) __swab32s((x))
+#define __cpu_to_be16s(x) __swab16s((x))
+#define __be16_to_cpus(x) __swab16s((x))
+#include <linux/byteorder/generic.h>
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swab.h b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swab.h
new file mode 100644
index 0000000..37336b5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swab.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_SWAB_H
+#define _LINUX_BYTEORDER_SWAB_H
+
+#include <linux/compiler.h>
+
+#define ___swab16(x) ({ __u16 __x = (x); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); })
+
+#define ___swab32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); })
+
+#define ___swab64(x) ({ __u64 __x = (x); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); })
+
+#define ___constant_swab16(x) ((__u16)( (((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8) ))
+#define ___constant_swab32(x) ((__u32)( (((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
+#define ___constant_swab64(x) ((__u64)( (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
+
+#ifndef __arch__swab16
+#define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
+#endif
+#ifndef __arch__swab32
+#define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
+#endif
+#ifndef __arch__swab64
+#define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
+#endif
+
+#ifndef __arch__swab16p
+#define __arch__swab16p(x) __arch__swab16(*(x))
+#endif
+#ifndef __arch__swab32p
+#define __arch__swab32p(x) __arch__swab32(*(x))
+#endif
+#ifndef __arch__swab64p
+#define __arch__swab64p(x) __arch__swab64(*(x))
+#endif
+
+#ifndef __arch__swab16s
+#define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0)
+#endif
+#ifndef __arch__swab32s
+#define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0)
+#endif
+#ifndef __arch__swab64s
+#define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0)
+#endif
+
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
+#define __swab16(x) (__builtin_constant_p((__u16)(x)) ? ___swab16((x)) : __fswab16((x)))
+#define __swab32(x) (__builtin_constant_p((__u32)(x)) ? ___swab32((x)) : __fswab32((x)))
+#define __swab64(x) (__builtin_constant_p((__u64)(x)) ? ___swab64((x)) : __fswab64((x)))
+#else
+#define __swab16(x) __fswab16(x)
+#define __swab32(x) __fswab32(x)
+#define __swab64(x) __fswab64(x)
+#endif
+
+#ifdef __BYTEORDER_HAS_U64__
+#ifdef __SWAB_64_THRU_32__
+#else
+#endif
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swabb.h b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swabb.h
new file mode 100644
index 0000000..c5b6a3e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_BYTEORDER_SWABB_H
+#define _LINUX_BYTEORDER_SWABB_H
+
+#define ___swahw32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(__x) & (__u32)0xffff0000UL) >> 16) )); })
+#define ___swahb32(x) ({ __u32 __x = (x); ((__u32)( (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )); })
+
+#define ___constant_swahw32(x) ((__u32)( (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(x) & (__u32)0xffff0000UL) >> 16) ))
+#define ___constant_swahb32(x) ((__u32)( (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) ))
+
+#ifndef __arch__swahw32
+#define __arch__swahw32(x) ___swahw32(x)
+#endif
+#ifndef __arch__swahb32
+#define __arch__swahb32(x) ___swahb32(x)
+#endif
+
+#ifndef __arch__swahw32p
+#define __arch__swahw32p(x) __swahw32(*(x))
+#endif
+#ifndef __arch__swahb32p
+#define __arch__swahb32p(x) __swahb32(*(x))
+#endif
+
+#ifndef __arch__swahw32s
+#define __arch__swahw32s(x) do { *(x) = __swahw32p((x)); } while (0)
+#endif
+#ifndef __arch__swahb32s
+#define __arch__swahb32s(x) do { *(x) = __swahb32p((x)); } while (0)
+#endif
+
+#if defined(__GNUC__) && defined(__OPTIMIZE__)
+#define __swahw32(x) (__builtin_constant_p((__u32)(x)) ? ___swahw32((x)) : __fswahw32((x)))
+#define __swahb32(x) (__builtin_constant_p((__u32)(x)) ? ___swahb32((x)) : __fswahb32((x)))
+#else
+#define __swahw32(x) __fswahw32(x)
+#define __swahb32(x) __fswahb32(x)
+#endif
+
+#ifdef __BYTEORDER_HAS_U64__
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/cache.h b/6/platforms/android-3/arch-x86/usr/include/linux/cache.h
new file mode 100644
index 0000000..d281855
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/cache.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CACHE_H
+#define __LINUX_CACHE_H
+
+#include <linux/kernel.h>
+#include <asm/cache.h>
+
+#ifndef L1_CACHE_ALIGN
+#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
+#endif
+
+#ifndef SMP_CACHE_BYTES
+#define SMP_CACHE_BYTES L1_CACHE_BYTES
+#endif
+
+#ifndef __read_mostly
+#define __read_mostly
+#endif
+
+#ifndef ____cacheline_aligned
+#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
+#endif
+
+#ifndef ____cacheline_aligned_in_smp
+#define ____cacheline_aligned_in_smp
+#endif
+
+#ifndef __cacheline_aligned
+#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES), __section__(".data.cacheline_aligned")))
+#endif
+
+#ifndef __cacheline_aligned_in_smp
+#define __cacheline_aligned_in_smp
+#endif
+
+#ifndef INTERNODE_CACHE_SHIFT
+#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT
+#endif
+
+#ifndef ____cacheline_internodealigned_in_smp
+#define ____cacheline_internodealigned_in_smp
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/calc64.h b/6/platforms/android-3/arch-x86/usr/include/linux/calc64.h
new file mode 100644
index 0000000..9f726aa
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/calc64.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CALC64_H
+#define _LINUX_CALC64_H
+
+#include <linux/types.h>
+#include <asm/div64.h>
+
+#ifndef div_long_long_rem
+#define div_long_long_rem(dividend, divisor, remainder) do_div_llr((dividend), divisor, remainder)
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/capability.h b/6/platforms/android-3/arch-x86/usr/include/linux/capability.h
new file mode 100644
index 0000000..605bc27
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/capability.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CAPABILITY_H
+#define _LINUX_CAPABILITY_H
+
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+#define _LINUX_CAPABILITY_VERSION 0x19980330
+
+typedef struct __user_cap_header_struct {
+ __u32 version;
+ int pid;
+} __user *cap_user_header_t;
+
+typedef struct __user_cap_data_struct {
+ __u32 effective;
+ __u32 permitted;
+ __u32 inheritable;
+} __user *cap_user_data_t;
+
+#define CAP_CHOWN 0
+
+#define CAP_DAC_OVERRIDE 1
+
+#define CAP_DAC_READ_SEARCH 2
+
+#define CAP_FOWNER 3
+
+#define CAP_FSETID 4
+
+#define CAP_FS_MASK 0x1f
+
+#define CAP_KILL 5
+
+#define CAP_SETGID 6
+
+#define CAP_SETUID 7
+
+#define CAP_SETPCAP 8
+
+#define CAP_LINUX_IMMUTABLE 9
+
+#define CAP_NET_BIND_SERVICE 10
+
+#define CAP_NET_BROADCAST 11
+
+#define CAP_NET_ADMIN 12
+
+#define CAP_NET_RAW 13
+
+#define CAP_IPC_LOCK 14
+
+#define CAP_IPC_OWNER 15
+
+#define CAP_SYS_MODULE 16
+
+#define CAP_SYS_RAWIO 17
+
+#define CAP_SYS_CHROOT 18
+
+#define CAP_SYS_PTRACE 19
+
+#define CAP_SYS_PACCT 20
+
+#define CAP_SYS_ADMIN 21
+
+#define CAP_SYS_BOOT 22
+
+#define CAP_SYS_NICE 23
+
+#define CAP_SYS_RESOURCE 24
+
+#define CAP_SYS_TIME 25
+
+#define CAP_SYS_TTY_CONFIG 26
+
+#define CAP_MKNOD 27
+
+#define CAP_LEASE 28
+
+#define CAP_AUDIT_WRITE 29
+
+#define CAP_AUDIT_CONTROL 30
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/capi.h b/6/platforms/android-3/arch-x86/usr/include/linux/capi.h
new file mode 100644
index 0000000..5591cf6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/capi.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CAPI_H__
+#define __LINUX_CAPI_H__
+
+#include <asm/types.h>
+#include <linux/ioctl.h>
+#include <linux/kernelcapi.h>
+
+typedef struct capi_register_params {
+ __u32 level3cnt;
+ __u32 datablkcnt;
+ __u32 datablklen;
+} capi_register_params;
+
+#define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params)
+
+#define CAPI_MANUFACTURER_LEN 64
+
+#define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int)
+
+typedef struct capi_version {
+ __u32 majorversion;
+ __u32 minorversion;
+ __u32 majormanuversion;
+ __u32 minormanuversion;
+} capi_version;
+
+#define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version)
+
+#define CAPI_SERIAL_LEN 8
+#define CAPI_GET_SERIAL _IOWR('C',0x08,int)
+
+typedef struct capi_profile {
+ __u16 ncontroller;
+ __u16 nbchannel;
+ __u32 goptions;
+ __u32 support1;
+ __u32 support2;
+ __u32 support3;
+ __u32 reserved[6];
+ __u32 manu[5];
+} capi_profile;
+
+#define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile)
+
+typedef struct capi_manufacturer_cmd {
+ unsigned long cmd;
+ void __user *data;
+} capi_manufacturer_cmd;
+
+#define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd)
+
+#define CAPI_GET_ERRCODE _IOR('C',0x21, __u16)
+
+#define CAPI_INSTALLED _IOR('C',0x22, __u16)
+
+typedef union capi_ioctl_struct {
+ __u32 contr;
+ capi_register_params rparams;
+ __u8 manufacturer[CAPI_MANUFACTURER_LEN];
+ capi_version version;
+ __u8 serial[CAPI_SERIAL_LEN];
+ capi_profile profile;
+ capi_manufacturer_cmd cmd;
+ __u16 errcode;
+} capi_ioctl_struct;
+
+#define CAPIFLAG_HIGHJACKING 0x0001
+
+#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
+#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
+#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
+
+#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
+
+#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/cdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/cdev.h
new file mode 100644
index 0000000..7a71c7e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/cdev.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CDEV_H
+#define _LINUX_CDEV_H
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/cdrom.h b/6/platforms/android-3/arch-x86/usr/include/linux/cdrom.h
new file mode 100644
index 0000000..cc70c9f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/cdrom.h
@@ -0,0 +1,718 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CDROM_H
+#define _LINUX_CDROM_H
+
+#include <asm/byteorder.h>
+
+#define EDRIVE_CANT_DO_THIS EOPNOTSUPP
+
+#define CDROMPAUSE 0x5301
+#define CDROMRESUME 0x5302
+#define CDROMPLAYMSF 0x5303
+#define CDROMPLAYTRKIND 0x5304
+#define CDROMREADTOCHDR 0x5305
+#define CDROMREADTOCENTRY 0x5306
+#define CDROMSTOP 0x5307
+#define CDROMSTART 0x5308
+#define CDROMEJECT 0x5309
+#define CDROMVOLCTRL 0x530a
+#define CDROMSUBCHNL 0x530b
+#define CDROMREADMODE2 0x530c
+#define CDROMREADMODE1 0x530d
+#define CDROMREADAUDIO 0x530e
+#define CDROMEJECT_SW 0x530f
+#define CDROMMULTISESSION 0x5310
+#define CDROM_GET_MCN 0x5311
+#define CDROM_GET_UPC CDROM_GET_MCN
+#define CDROMRESET 0x5312
+#define CDROMVOLREAD 0x5313
+#define CDROMREADRAW 0x5314
+
+#define CDROMREADCOOKED 0x5315
+#define CDROMSEEK 0x5316
+
+#define CDROMPLAYBLK 0x5317
+
+#define CDROMREADALL 0x5318
+
+#define CDROMGETSPINDOWN 0x531d
+#define CDROMSETSPINDOWN 0x531e
+
+#define CDROMCLOSETRAY 0x5319
+#define CDROM_SET_OPTIONS 0x5320
+#define CDROM_CLEAR_OPTIONS 0x5321
+#define CDROM_SELECT_SPEED 0x5322
+#define CDROM_SELECT_DISC 0x5323
+#define CDROM_MEDIA_CHANGED 0x5325
+#define CDROM_DRIVE_STATUS 0x5326
+#define CDROM_DISC_STATUS 0x5327
+#define CDROM_CHANGER_NSLOTS 0x5328
+#define CDROM_LOCKDOOR 0x5329
+#define CDROM_DEBUG 0x5330
+#define CDROM_GET_CAPABILITY 0x5331
+
+#define CDROMAUDIOBUFSIZ 0x5382
+
+#define DVD_READ_STRUCT 0x5390
+#define DVD_WRITE_STRUCT 0x5391
+#define DVD_AUTH 0x5392
+
+#define CDROM_SEND_PACKET 0x5393
+#define CDROM_NEXT_WRITABLE 0x5394
+#define CDROM_LAST_WRITTEN 0x5395
+
+struct cdrom_msf0
+{
+ __u8 minute;
+ __u8 second;
+ __u8 frame;
+};
+
+union cdrom_addr
+{
+ struct cdrom_msf0 msf;
+ int lba;
+};
+
+struct cdrom_msf
+{
+ __u8 cdmsf_min0;
+ __u8 cdmsf_sec0;
+ __u8 cdmsf_frame0;
+ __u8 cdmsf_min1;
+ __u8 cdmsf_sec1;
+ __u8 cdmsf_frame1;
+};
+
+struct cdrom_ti
+{
+ __u8 cdti_trk0;
+ __u8 cdti_ind0;
+ __u8 cdti_trk1;
+ __u8 cdti_ind1;
+};
+
+struct cdrom_tochdr
+{
+ __u8 cdth_trk0;
+ __u8 cdth_trk1;
+};
+
+struct cdrom_volctrl
+{
+ __u8 channel0;
+ __u8 channel1;
+ __u8 channel2;
+ __u8 channel3;
+};
+
+struct cdrom_subchnl
+{
+ __u8 cdsc_format;
+ __u8 cdsc_audiostatus;
+ __u8 cdsc_adr: 4;
+ __u8 cdsc_ctrl: 4;
+ __u8 cdsc_trk;
+ __u8 cdsc_ind;
+ union cdrom_addr cdsc_absaddr;
+ union cdrom_addr cdsc_reladdr;
+};
+
+struct cdrom_tocentry
+{
+ __u8 cdte_track;
+ __u8 cdte_adr :4;
+ __u8 cdte_ctrl :4;
+ __u8 cdte_format;
+ union cdrom_addr cdte_addr;
+ __u8 cdte_datamode;
+};
+
+struct cdrom_read
+{
+ int cdread_lba;
+ char *cdread_bufaddr;
+ int cdread_buflen;
+};
+
+struct cdrom_read_audio
+{
+ union cdrom_addr addr;
+ __u8 addr_format;
+ int nframes;
+ __u8 __user *buf;
+};
+
+struct cdrom_multisession
+{
+ union cdrom_addr addr;
+ __u8 xa_flag;
+ __u8 addr_format;
+};
+
+struct cdrom_mcn
+{
+ __u8 medium_catalog_number[14];
+};
+
+struct cdrom_blk
+{
+ unsigned from;
+ unsigned short len;
+};
+
+#define CDROM_PACKET_SIZE 12
+
+#define CGC_DATA_UNKNOWN 0
+#define CGC_DATA_WRITE 1
+#define CGC_DATA_READ 2
+#define CGC_DATA_NONE 3
+
+struct cdrom_generic_command
+{
+ unsigned char cmd[CDROM_PACKET_SIZE];
+ unsigned char __user *buffer;
+ unsigned int buflen;
+ int stat;
+ struct request_sense __user *sense;
+ unsigned char data_direction;
+ int quiet;
+ int timeout;
+ void __user *reserved[1];
+};
+
+#define CD_MINS 74
+#define CD_SECS 60
+#define CD_FRAMES 75
+#define CD_SYNC_SIZE 12
+#define CD_MSF_OFFSET 150
+#define CD_CHUNK_SIZE 24
+#define CD_NUM_OF_CHUNKS 98
+#define CD_FRAMESIZE_SUB 96
+#define CD_HEAD_SIZE 4
+#define CD_SUBHEAD_SIZE 8
+#define CD_EDC_SIZE 4
+#define CD_ZERO_SIZE 8
+#define CD_ECC_SIZE 276
+#define CD_FRAMESIZE 2048
+#define CD_FRAMESIZE_RAW 2352
+#define CD_FRAMESIZE_RAWER 2646
+
+#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
+#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
+
+#define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
+#define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE)
+#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD)
+
+#define CDROM_LBA 0x01
+#define CDROM_MSF 0x02
+
+#define CDROM_DATA_TRACK 0x04
+
+#define CDROM_LEADOUT 0xAA
+
+#define CDROM_AUDIO_INVALID 0x00
+#define CDROM_AUDIO_PLAY 0x11
+#define CDROM_AUDIO_PAUSED 0x12
+#define CDROM_AUDIO_COMPLETED 0x13
+#define CDROM_AUDIO_ERROR 0x14
+#define CDROM_AUDIO_NO_STATUS 0x15
+
+#define CDC_CLOSE_TRAY 0x1
+#define CDC_OPEN_TRAY 0x2
+#define CDC_LOCK 0x4
+#define CDC_SELECT_SPEED 0x8
+#define CDC_SELECT_DISC 0x10
+#define CDC_MULTI_SESSION 0x20
+#define CDC_MCN 0x40
+#define CDC_MEDIA_CHANGED 0x80
+#define CDC_PLAY_AUDIO 0x100
+#define CDC_RESET 0x200
+#define CDC_DRIVE_STATUS 0x800
+#define CDC_GENERIC_PACKET 0x1000
+#define CDC_CD_R 0x2000
+#define CDC_CD_RW 0x4000
+#define CDC_DVD 0x8000
+#define CDC_DVD_R 0x10000
+#define CDC_DVD_RAM 0x20000
+#define CDC_MO_DRIVE 0x40000
+#define CDC_MRW 0x80000
+#define CDC_MRW_W 0x100000
+#define CDC_RAM 0x200000
+
+#define CDS_NO_INFO 0
+#define CDS_NO_DISC 1
+#define CDS_TRAY_OPEN 2
+#define CDS_DRIVE_NOT_READY 3
+#define CDS_DISC_OK 4
+
+#define CDS_AUDIO 100
+#define CDS_DATA_1 101
+#define CDS_DATA_2 102
+#define CDS_XA_2_1 103
+#define CDS_XA_2_2 104
+#define CDS_MIXED 105
+
+#define CDO_AUTO_CLOSE 0x1
+#define CDO_AUTO_EJECT 0x2
+#define CDO_USE_FFLAGS 0x4
+#define CDO_LOCK 0x8
+#define CDO_CHECK_TYPE 0x10
+
+#define CDSL_NONE ((int) (~0U>>1)-1)
+#define CDSL_CURRENT ((int) (~0U>>1))
+
+#define CD_PART_MAX 64
+#define CD_PART_MASK (CD_PART_MAX - 1)
+
+#define GPCMD_BLANK 0xa1
+#define GPCMD_CLOSE_TRACK 0x5b
+#define GPCMD_FLUSH_CACHE 0x35
+#define GPCMD_FORMAT_UNIT 0x04
+#define GPCMD_GET_CONFIGURATION 0x46
+#define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
+#define GPCMD_GET_PERFORMANCE 0xac
+#define GPCMD_INQUIRY 0x12
+#define GPCMD_LOAD_UNLOAD 0xa6
+#define GPCMD_MECHANISM_STATUS 0xbd
+#define GPCMD_MODE_SELECT_10 0x55
+#define GPCMD_MODE_SENSE_10 0x5a
+#define GPCMD_PAUSE_RESUME 0x4b
+#define GPCMD_PLAY_AUDIO_10 0x45
+#define GPCMD_PLAY_AUDIO_MSF 0x47
+#define GPCMD_PLAY_AUDIO_TI 0x48
+#define GPCMD_PLAY_CD 0xbc
+#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
+#define GPCMD_READ_10 0x28
+#define GPCMD_READ_12 0xa8
+#define GPCMD_READ_BUFFER_CAPACITY 0x5c
+#define GPCMD_READ_CDVD_CAPACITY 0x25
+#define GPCMD_READ_CD 0xbe
+#define GPCMD_READ_CD_MSF 0xb9
+#define GPCMD_READ_DISC_INFO 0x51
+#define GPCMD_READ_DVD_STRUCTURE 0xad
+#define GPCMD_READ_FORMAT_CAPACITIES 0x23
+#define GPCMD_READ_HEADER 0x44
+#define GPCMD_READ_TRACK_RZONE_INFO 0x52
+#define GPCMD_READ_SUBCHANNEL 0x42
+#define GPCMD_READ_TOC_PMA_ATIP 0x43
+#define GPCMD_REPAIR_RZONE_TRACK 0x58
+#define GPCMD_REPORT_KEY 0xa4
+#define GPCMD_REQUEST_SENSE 0x03
+#define GPCMD_RESERVE_RZONE_TRACK 0x53
+#define GPCMD_SEND_CUE_SHEET 0x5d
+#define GPCMD_SCAN 0xba
+#define GPCMD_SEEK 0x2b
+#define GPCMD_SEND_DVD_STRUCTURE 0xbf
+#define GPCMD_SEND_EVENT 0xa2
+#define GPCMD_SEND_KEY 0xa3
+#define GPCMD_SEND_OPC 0x54
+#define GPCMD_SET_READ_AHEAD 0xa7
+#define GPCMD_SET_STREAMING 0xb6
+#define GPCMD_START_STOP_UNIT 0x1b
+#define GPCMD_STOP_PLAY_SCAN 0x4e
+#define GPCMD_TEST_UNIT_READY 0x00
+#define GPCMD_VERIFY_10 0x2f
+#define GPCMD_WRITE_10 0x2a
+#define GPCMD_WRITE_AND_VERIFY_10 0x2e
+
+#define GPCMD_SET_SPEED 0xbb
+
+#define GPCMD_PLAYAUDIO_TI 0x48
+
+#define GPCMD_GET_MEDIA_STATUS 0xda
+
+#define GPMODE_VENDOR_PAGE 0x00
+#define GPMODE_R_W_ERROR_PAGE 0x01
+#define GPMODE_WRITE_PARMS_PAGE 0x05
+#define GPMODE_WCACHING_PAGE 0x08
+#define GPMODE_AUDIO_CTL_PAGE 0x0e
+#define GPMODE_POWER_PAGE 0x1a
+#define GPMODE_FAULT_FAIL_PAGE 0x1c
+#define GPMODE_TO_PROTECT_PAGE 0x1d
+#define GPMODE_CAPABILITIES_PAGE 0x2a
+#define GPMODE_ALL_PAGES 0x3f
+
+#define GPMODE_CDROM_PAGE 0x0d
+
+#define DVD_STRUCT_PHYSICAL 0x00
+#define DVD_STRUCT_COPYRIGHT 0x01
+#define DVD_STRUCT_DISCKEY 0x02
+#define DVD_STRUCT_BCA 0x03
+#define DVD_STRUCT_MANUFACT 0x04
+
+struct dvd_layer {
+ __u8 book_version : 4;
+ __u8 book_type : 4;
+ __u8 min_rate : 4;
+ __u8 disc_size : 4;
+ __u8 layer_type : 4;
+ __u8 track_path : 1;
+ __u8 nlayers : 2;
+ __u8 track_density : 4;
+ __u8 linear_density : 4;
+ __u8 bca : 1;
+ __u32 start_sector;
+ __u32 end_sector;
+ __u32 end_sector_l0;
+};
+
+#define DVD_LAYERS 4
+
+struct dvd_physical {
+ __u8 type;
+ __u8 layer_num;
+ struct dvd_layer layer[DVD_LAYERS];
+};
+
+struct dvd_copyright {
+ __u8 type;
+
+ __u8 layer_num;
+ __u8 cpst;
+ __u8 rmi;
+};
+
+struct dvd_disckey {
+ __u8 type;
+
+ unsigned agid : 2;
+ __u8 value[2048];
+};
+
+struct dvd_bca {
+ __u8 type;
+
+ int len;
+ __u8 value[188];
+};
+
+struct dvd_manufact {
+ __u8 type;
+
+ __u8 layer_num;
+ int len;
+ __u8 value[2048];
+};
+
+typedef union {
+ __u8 type;
+
+ struct dvd_physical physical;
+ struct dvd_copyright copyright;
+ struct dvd_disckey disckey;
+ struct dvd_bca bca;
+ struct dvd_manufact manufact;
+} dvd_struct;
+
+#define DVD_LU_SEND_AGID 0
+#define DVD_HOST_SEND_CHALLENGE 1
+#define DVD_LU_SEND_KEY1 2
+#define DVD_LU_SEND_CHALLENGE 3
+#define DVD_HOST_SEND_KEY2 4
+
+#define DVD_AUTH_ESTABLISHED 5
+#define DVD_AUTH_FAILURE 6
+
+#define DVD_LU_SEND_TITLE_KEY 7
+#define DVD_LU_SEND_ASF 8
+#define DVD_INVALIDATE_AGID 9
+#define DVD_LU_SEND_RPC_STATE 10
+#define DVD_HOST_SEND_RPC_STATE 11
+
+typedef __u8 dvd_key[5];
+typedef __u8 dvd_challenge[10];
+
+struct dvd_lu_send_agid {
+ __u8 type;
+ unsigned agid : 2;
+};
+
+struct dvd_host_send_challenge {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_challenge chal;
+};
+
+struct dvd_send_key {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_key key;
+};
+
+struct dvd_lu_send_challenge {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_challenge chal;
+};
+
+#define DVD_CPM_NO_COPYRIGHT 0
+#define DVD_CPM_COPYRIGHTED 1
+
+#define DVD_CP_SEC_NONE 0
+#define DVD_CP_SEC_EXIST 1
+
+#define DVD_CGMS_UNRESTRICTED 0
+#define DVD_CGMS_SINGLE 2
+#define DVD_CGMS_RESTRICTED 3
+
+struct dvd_lu_send_title_key {
+ __u8 type;
+ unsigned agid : 2;
+
+ dvd_key title_key;
+ int lba;
+ unsigned cpm : 1;
+ unsigned cp_sec : 1;
+ unsigned cgms : 2;
+};
+
+struct dvd_lu_send_asf {
+ __u8 type;
+ unsigned agid : 2;
+
+ unsigned asf : 1;
+};
+
+struct dvd_host_send_rpcstate {
+ __u8 type;
+ __u8 pdrc;
+};
+
+struct dvd_lu_send_rpcstate {
+ __u8 type : 2;
+ __u8 vra : 3;
+ __u8 ucca : 3;
+ __u8 region_mask;
+ __u8 rpc_scheme;
+};
+
+typedef union {
+ __u8 type;
+
+ struct dvd_lu_send_agid lsa;
+ struct dvd_host_send_challenge hsc;
+ struct dvd_send_key lsk;
+ struct dvd_lu_send_challenge lsc;
+ struct dvd_send_key hsk;
+ struct dvd_lu_send_title_key lstk;
+ struct dvd_lu_send_asf lsasf;
+ struct dvd_host_send_rpcstate hrpcs;
+ struct dvd_lu_send_rpcstate lrpcs;
+} dvd_authinfo;
+
+struct request_sense {
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 valid : 1;
+ __u8 error_code : 7;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 error_code : 7;
+ __u8 valid : 1;
+#endif
+ __u8 segment_number;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 ili : 1;
+ __u8 reserved2 : 1;
+ __u8 sense_key : 4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 sense_key : 4;
+ __u8 reserved2 : 1;
+ __u8 ili : 1;
+ __u8 reserved1 : 2;
+#endif
+ __u8 information[4];
+ __u8 add_sense_len;
+ __u8 command_info[4];
+ __u8 asc;
+ __u8 ascq;
+ __u8 fruc;
+ __u8 sks[3];
+ __u8 asb[46];
+};
+
+#define CDF_RWRT 0x0020
+#define CDF_HWDM 0x0024
+#define CDF_MRW 0x0028
+
+#define CDM_MRW_NOTMRW 0
+#define CDM_MRW_BGFORMAT_INACTIVE 1
+#define CDM_MRW_BGFORMAT_ACTIVE 2
+#define CDM_MRW_BGFORMAT_COMPLETE 3
+
+#define MRW_LBA_DMA 0
+#define MRW_LBA_GAA 1
+
+#define MRW_MODE_PC_PRE1 0x2c
+#define MRW_MODE_PC 0x03
+
+struct mrw_feature_desc {
+ __u16 feature_code;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 feature_version : 4;
+ __u8 persistent : 1;
+ __u8 curr : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 curr : 1;
+ __u8 persistent : 1;
+ __u8 feature_version : 4;
+ __u8 reserved1 : 2;
+#endif
+ __u8 add_len;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 7;
+ __u8 write : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 write : 1;
+ __u8 reserved2 : 7;
+#endif
+ __u8 reserved3;
+ __u8 reserved4;
+ __u8 reserved5;
+};
+
+struct rwrt_feature_desc {
+ __u16 feature_code;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 2;
+ __u8 feature_version : 4;
+ __u8 persistent : 1;
+ __u8 curr : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 curr : 1;
+ __u8 persistent : 1;
+ __u8 feature_version : 4;
+ __u8 reserved1 : 2;
+#endif
+ __u8 add_len;
+ __u32 last_lba;
+ __u32 block_size;
+ __u16 blocking;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 7;
+ __u8 page_present : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 page_present : 1;
+ __u8 reserved2 : 7;
+#endif
+ __u8 reserved3;
+};
+
+typedef struct {
+ __u16 disc_information_length;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved1 : 3;
+ __u8 erasable : 1;
+ __u8 border_status : 2;
+ __u8 disc_status : 2;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 disc_status : 2;
+ __u8 border_status : 2;
+ __u8 erasable : 1;
+ __u8 reserved1 : 3;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 n_first_track;
+ __u8 n_sessions_lsb;
+ __u8 first_track_lsb;
+ __u8 last_track_lsb;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 did_v : 1;
+ __u8 dbc_v : 1;
+ __u8 uru : 1;
+ __u8 reserved2 : 2;
+ __u8 dbit : 1;
+ __u8 mrw_status : 2;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 mrw_status : 2;
+ __u8 dbit : 1;
+ __u8 reserved2 : 2;
+ __u8 uru : 1;
+ __u8 dbc_v : 1;
+ __u8 did_v : 1;
+#endif
+ __u8 disc_type;
+ __u8 n_sessions_msb;
+ __u8 first_track_msb;
+ __u8 last_track_msb;
+ __u32 disc_id;
+ __u32 lead_in;
+ __u32 lead_out;
+ __u8 disc_bar_code[8];
+ __u8 reserved3;
+ __u8 n_opc;
+} disc_information;
+
+typedef struct {
+ __u16 track_information_length;
+ __u8 track_lsb;
+ __u8 session_lsb;
+ __u8 reserved1;
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 reserved2 : 2;
+ __u8 damage : 1;
+ __u8 copy : 1;
+ __u8 track_mode : 4;
+ __u8 rt : 1;
+ __u8 blank : 1;
+ __u8 packet : 1;
+ __u8 fp : 1;
+ __u8 data_mode : 4;
+ __u8 reserved3 : 6;
+ __u8 lra_v : 1;
+ __u8 nwa_v : 1;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 track_mode : 4;
+ __u8 copy : 1;
+ __u8 damage : 1;
+ __u8 reserved2 : 2;
+ __u8 data_mode : 4;
+ __u8 fp : 1;
+ __u8 packet : 1;
+ __u8 blank : 1;
+ __u8 rt : 1;
+ __u8 nwa_v : 1;
+ __u8 lra_v : 1;
+ __u8 reserved3 : 6;
+#endif
+ __u32 track_start;
+ __u32 next_writable;
+ __u32 free_blocks;
+ __u32 fixed_packet_size;
+ __u32 track_size;
+ __u32 last_rec_address;
+} track_information;
+
+struct feature_header {
+ __u32 data_len;
+ __u8 reserved1;
+ __u8 reserved2;
+ __u16 curr_profile;
+};
+
+struct mode_page_header {
+ __u16 mode_data_length;
+ __u8 medium_type;
+ __u8 reserved1;
+ __u8 reserved2;
+ __u8 reserved3;
+ __u16 desc_length;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/circ_buf.h b/6/platforms/android-3/arch-x86/usr/include/linux/circ_buf.h
new file mode 100644
index 0000000..438250c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/circ_buf.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CIRC_BUF_H
+#define _LINUX_CIRC_BUF_H 1
+
+struct circ_buf {
+ char *buf;
+ int head;
+ int tail;
+};
+
+#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))
+
+#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
+
+#define CIRC_CNT_TO_END(head,tail,size) ({int end = (size) - (tail); int n = ((head) + end) & ((size)-1); n < end ? n : end;})
+
+#define CIRC_SPACE_TO_END(head,tail,size) ({int end = (size) - 1 - (head); int n = (end + (tail)) & ((size)-1); n <= end ? n : end+1;})
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/clk.h b/6/platforms/android-3/arch-x86/usr/include/linux/clk.h
new file mode 100644
index 0000000..2b8f436
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/clk.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CLK_H
+#define __LINUX_CLK_H
+
+struct device;
+
+struct clk;
+
+struct clk *clk_get(struct device *dev, const char *id);
+
+struct clk *clk_get_parent(struct clk *clk);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/coda.h b/6/platforms/android-3/arch-x86/usr/include/linux/coda.h
new file mode 100644
index 0000000..e7e89f9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/coda.h
@@ -0,0 +1,594 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _CODA_HEADER_
+#define _CODA_HEADER_
+
+#if defined(__NetBSD__) || (defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL)
+#include <sys/types.h>
+#endif
+
+#ifndef CODA_MAXSYMLINKS
+#define CODA_MAXSYMLINKS 10
+#endif
+
+#if defined(DJGPP) || defined(__CYGWIN32__)
+#ifdef KERNEL
+typedef unsigned long u_long;
+typedef unsigned int u_int;
+typedef unsigned short u_short;
+typedef u_long ino_t;
+typedef u_long dev_t;
+typedef void * caddr_t;
+#ifdef DOS
+typedef unsigned __int64 u_quad_t;
+#else
+typedef unsigned long long u_quad_t;
+#endif
+
+#define inline
+
+struct timespec {
+ long ts_sec;
+ long ts_nsec;
+};
+#else
+#include <sys/time.h>
+typedef unsigned long long u_quad_t;
+#endif
+#endif
+
+#ifdef __linux__
+#include <linux/time.h>
+#define cdev_t u_quad_t
+#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
+#define _UQUAD_T_ 1
+typedef unsigned long long u_quad_t;
+#endif
+#else
+#define cdev_t dev_t
+#endif
+
+#ifdef __CYGWIN32__
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+#ifndef __BIT_TYPES_DEFINED__
+#define __BIT_TYPES_DEFINED__
+typedef signed char int8_t;
+typedef unsigned char u_int8_t;
+typedef short int16_t;
+typedef unsigned short u_int16_t;
+typedef int int32_t;
+typedef unsigned int u_int32_t;
+#endif
+
+#define CODA_MAXNAMLEN 255
+#define CODA_MAXPATHLEN 1024
+#define CODA_MAXSYMLINK 10
+
+#define C_O_READ 0x001
+#define C_O_WRITE 0x002
+#define C_O_TRUNC 0x010
+#define C_O_EXCL 0x100
+#define C_O_CREAT 0x200
+
+#define C_M_READ 00400
+#define C_M_WRITE 00200
+
+#define C_A_C_OK 8
+#define C_A_R_OK 4
+#define C_A_W_OK 2
+#define C_A_X_OK 1
+#define C_A_F_OK 0
+
+#ifndef _VENUS_DIRENT_T_
+#define _VENUS_DIRENT_T_ 1
+struct venus_dirent {
+ u_int32_t d_fileno;
+ u_int16_t d_reclen;
+ u_int8_t d_type;
+ u_int8_t d_namlen;
+ char d_name[CODA_MAXNAMLEN + 1];
+};
+#undef DIRSIZ
+#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
+
+#define CDT_UNKNOWN 0
+#define CDT_FIFO 1
+#define CDT_CHR 2
+#define CDT_DIR 4
+#define CDT_BLK 6
+#define CDT_REG 8
+#define CDT_LNK 10
+#define CDT_SOCK 12
+#define CDT_WHT 14
+
+#define IFTOCDT(mode) (((mode) & 0170000) >> 12)
+#define CDTTOIF(dirtype) ((dirtype) << 12)
+
+#endif
+
+#ifndef _VUID_T_
+#define _VUID_T_
+typedef u_int32_t vuid_t;
+typedef u_int32_t vgid_t;
+#endif
+
+struct CodaFid {
+ u_int32_t opaque[4];
+};
+
+#define coda_f2i(fid) (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
+
+#ifndef _VENUS_VATTR_T_
+#define _VENUS_VATTR_T_
+
+enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
+
+struct coda_vattr {
+ long va_type;
+ u_short va_mode;
+ short va_nlink;
+ vuid_t va_uid;
+ vgid_t va_gid;
+ long va_fileid;
+ u_quad_t va_size;
+ long va_blocksize;
+ struct timespec va_atime;
+ struct timespec va_mtime;
+ struct timespec va_ctime;
+ u_long va_gen;
+ u_long va_flags;
+ cdev_t va_rdev;
+ u_quad_t va_bytes;
+ u_quad_t va_filerev;
+};
+
+#endif
+
+struct coda_statfs {
+ int32_t f_blocks;
+ int32_t f_bfree;
+ int32_t f_bavail;
+ int32_t f_files;
+ int32_t f_ffree;
+};
+
+#define CODA_ROOT 2
+#define CODA_OPEN_BY_FD 3
+#define CODA_OPEN 4
+#define CODA_CLOSE 5
+#define CODA_IOCTL 6
+#define CODA_GETATTR 7
+#define CODA_SETATTR 8
+#define CODA_ACCESS 9
+#define CODA_LOOKUP 10
+#define CODA_CREATE 11
+#define CODA_REMOVE 12
+#define CODA_LINK 13
+#define CODA_RENAME 14
+#define CODA_MKDIR 15
+#define CODA_RMDIR 16
+#define CODA_SYMLINK 18
+#define CODA_READLINK 19
+#define CODA_FSYNC 20
+#define CODA_VGET 22
+#define CODA_SIGNAL 23
+#define CODA_REPLACE 24
+#define CODA_FLUSH 25
+#define CODA_PURGEUSER 26
+#define CODA_ZAPFILE 27
+#define CODA_ZAPDIR 28
+#define CODA_PURGEFID 30
+#define CODA_OPEN_BY_PATH 31
+#define CODA_RESOLVE 32
+#define CODA_REINTEGRATE 33
+#define CODA_STATFS 34
+#define CODA_STORE 35
+#define CODA_RELEASE 36
+#define CODA_NCALLS 37
+
+#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
+
+#define VC_MAXDATASIZE 8192
+#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) + VC_MAXDATASIZE
+
+#define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
+
+#define CODA_KERNEL_VERSION 3
+
+struct coda_in_hdr {
+ u_int32_t opcode;
+ u_int32_t unique;
+ pid_t pid;
+ pid_t pgid;
+ vuid_t uid;
+};
+
+struct coda_out_hdr {
+ u_int32_t opcode;
+ u_int32_t unique;
+ u_int32_t result;
+};
+
+struct coda_root_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+};
+
+struct coda_root_in {
+ struct coda_in_hdr in;
+};
+
+struct coda_open_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_out {
+ struct coda_out_hdr oh;
+ cdev_t dev;
+ ino_t inode;
+};
+
+struct coda_store_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_store_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_release_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_release_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_close_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_close_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_ioctl_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int cmd;
+ int len;
+ int rwflag;
+ char *data;
+};
+
+struct coda_ioctl_out {
+ struct coda_out_hdr oh;
+ int len;
+ caddr_t data;
+};
+
+struct coda_getattr_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_getattr_out {
+ struct coda_out_hdr oh;
+ struct coda_vattr attr;
+};
+
+struct coda_setattr_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_setattr_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_access_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_access_out {
+ struct coda_out_hdr out;
+};
+
+#define CLU_CASE_SENSITIVE 0x01
+#define CLU_CASE_INSENSITIVE 0x02
+
+struct coda_lookup_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+ int flags;
+};
+
+struct coda_lookup_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ int vtype;
+};
+
+struct coda_create_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+ int excl;
+ int mode;
+ int name;
+};
+
+struct coda_create_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_remove_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+};
+
+struct coda_remove_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_link_in {
+ struct coda_in_hdr ih;
+ struct CodaFid sourceFid;
+ struct CodaFid destFid;
+ int tname;
+};
+
+struct coda_link_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_rename_in {
+ struct coda_in_hdr ih;
+ struct CodaFid sourceFid;
+ int srcname;
+ struct CodaFid destFid;
+ int destname;
+};
+
+struct coda_rename_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_mkdir_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+ int name;
+};
+
+struct coda_mkdir_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ struct coda_vattr attr;
+};
+
+struct coda_rmdir_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int name;
+};
+
+struct coda_rmdir_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_symlink_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int srcname;
+ struct coda_vattr attr;
+ int tname;
+};
+
+struct coda_symlink_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_readlink_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_readlink_out {
+ struct coda_out_hdr oh;
+ int count;
+ caddr_t data;
+};
+
+struct coda_fsync_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_fsync_out {
+ struct coda_out_hdr out;
+};
+
+struct coda_vget_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+};
+
+struct coda_vget_out {
+ struct coda_out_hdr oh;
+ struct CodaFid VFid;
+ int vtype;
+};
+
+struct coda_purgeuser_out {
+ struct coda_out_hdr oh;
+ vuid_t uid;
+};
+
+struct coda_zapfile_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_zapdir_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_purgefid_out {
+ struct coda_out_hdr oh;
+ struct CodaFid CodaFid;
+};
+
+struct coda_replace_out {
+ struct coda_out_hdr oh;
+ struct CodaFid NewFid;
+ struct CodaFid OldFid;
+};
+
+struct coda_open_by_fd_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_by_fd_out {
+ struct coda_out_hdr oh;
+ int fd;
+
+};
+
+struct coda_open_by_path_in {
+ struct coda_in_hdr ih;
+ struct CodaFid VFid;
+ int flags;
+};
+
+struct coda_open_by_path_out {
+ struct coda_out_hdr oh;
+ int path;
+};
+
+struct coda_statfs_in {
+ struct coda_in_hdr in;
+};
+
+struct coda_statfs_out {
+ struct coda_out_hdr oh;
+ struct coda_statfs stat;
+};
+
+#define CODA_NOCACHE 0x80000000
+
+union inputArgs {
+ struct coda_in_hdr ih;
+ struct coda_open_in coda_open;
+ struct coda_store_in coda_store;
+ struct coda_release_in coda_release;
+ struct coda_close_in coda_close;
+ struct coda_ioctl_in coda_ioctl;
+ struct coda_getattr_in coda_getattr;
+ struct coda_setattr_in coda_setattr;
+ struct coda_access_in coda_access;
+ struct coda_lookup_in coda_lookup;
+ struct coda_create_in coda_create;
+ struct coda_remove_in coda_remove;
+ struct coda_link_in coda_link;
+ struct coda_rename_in coda_rename;
+ struct coda_mkdir_in coda_mkdir;
+ struct coda_rmdir_in coda_rmdir;
+ struct coda_symlink_in coda_symlink;
+ struct coda_readlink_in coda_readlink;
+ struct coda_fsync_in coda_fsync;
+ struct coda_vget_in coda_vget;
+ struct coda_open_by_fd_in coda_open_by_fd;
+ struct coda_open_by_path_in coda_open_by_path;
+ struct coda_statfs_in coda_statfs;
+};
+
+union outputArgs {
+ struct coda_out_hdr oh;
+ struct coda_root_out coda_root;
+ struct coda_open_out coda_open;
+ struct coda_ioctl_out coda_ioctl;
+ struct coda_getattr_out coda_getattr;
+ struct coda_lookup_out coda_lookup;
+ struct coda_create_out coda_create;
+ struct coda_mkdir_out coda_mkdir;
+ struct coda_readlink_out coda_readlink;
+ struct coda_vget_out coda_vget;
+ struct coda_purgeuser_out coda_purgeuser;
+ struct coda_zapfile_out coda_zapfile;
+ struct coda_zapdir_out coda_zapdir;
+ struct coda_purgefid_out coda_purgefid;
+ struct coda_replace_out coda_replace;
+ struct coda_open_by_fd_out coda_open_by_fd;
+ struct coda_open_by_path_out coda_open_by_path;
+ struct coda_statfs_out coda_statfs;
+};
+
+union coda_downcalls {
+
+ struct coda_purgeuser_out purgeuser;
+ struct coda_zapfile_out zapfile;
+ struct coda_zapdir_out zapdir;
+ struct coda_purgefid_out purgefid;
+ struct coda_replace_out replace;
+};
+
+#define PIOCPARM_MASK 0x0000ffff
+struct ViceIoctl {
+ void __user *in;
+ void __user *out;
+ u_short in_size;
+ u_short out_size;
+};
+
+struct PioctlData {
+ const char __user *path;
+ int follow;
+ struct ViceIoctl vi;
+};
+
+#define CODA_CONTROL ".CONTROL"
+#define CODA_CONTROLLEN 8
+#define CTL_INO -1
+
+#define CODA_MOUNT_VERSION 1
+
+struct coda_mount_data {
+ int version;
+ int fd;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/coda_fs_i.h b/6/platforms/android-3/arch-x86/usr/include/linux/coda_fs_i.h
new file mode 100644
index 0000000..28b0e59
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/coda_fs_i.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CODA_FS_I
+#define _LINUX_CODA_FS_I
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/compat.h b/6/platforms/android-3/arch-x86/usr/include/linux/compat.h
new file mode 100644
index 0000000..d30b550
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/compat.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_COMPAT_H
+#define _LINUX_COMPAT_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/compiler-gcc.h b/6/platforms/android-3/arch-x86/usr/include/linux/compiler-gcc.h
new file mode 100644
index 0000000..0dd4a62
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/compiler-gcc.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define barrier() __asm__ __volatile__("": : :"memory")
+
+#define RELOC_HIDE(ptr, off) ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"(ptr)); (typeof(ptr)) (__ptr + (off)); })
+
+#define inline inline __attribute__((always_inline))
+#define __inline__ __inline__ __attribute__((always_inline))
+#define __inline __inline __attribute__((always_inline))
+#define __deprecated __attribute__((deprecated))
+#define noinline __attribute__((noinline))
+#define __attribute_pure__ __attribute__((pure))
+#define __attribute_const__ __attribute__((__const__))
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/compiler.h b/6/platforms/android-3/arch-x86/usr/include/linux/compiler.h
new file mode 100644
index 0000000..4055e33
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/compiler.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_COMPILER_H
+#define __LINUX_COMPILER_H
+
+#ifndef __ASSEMBLY__
+
+#define __user
+#define __kernel
+#define __safe
+#define __force
+#define __nocast
+#define __iomem
+#define __chk_user_ptr(x) (void)0
+#define __chk_io_ptr(x) (void)0
+#define __builtin_warning(x, y...) (1)
+#define __acquires(x)
+#define __releases(x)
+#define __acquire(x) (void)0
+#define __release(x) (void)0
+#define __cond_lock(x) (x)
+
+#endif
+
+#ifndef __attribute_const__
+#define __attribute_const__
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/completion.h b/6/platforms/android-3/arch-x86/usr/include/linux/completion.h
new file mode 100644
index 0000000..ee18211
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/completion.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_COMPLETION_H
+#define __LINUX_COMPLETION_H
+
+#include <linux/wait.h>
+
+struct completion {
+ unsigned int done;
+ wait_queue_head_t wait;
+};
+
+#define COMPLETION_INITIALIZER(work) { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
+
+#define COMPLETION_INITIALIZER_ONSTACK(work) ({ init_completion(&work); work; })
+
+#define DECLARE_COMPLETION(work) struct completion work = COMPLETION_INITIALIZER(work)
+
+#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
+
+#define INIT_COMPLETION(x) ((x).done = 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/config.h b/6/platforms/android-3/arch-x86/usr/include/linux/config.h
new file mode 100644
index 0000000..7aa1056
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/config.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CONFIG_H
+#define _LINUX_CONFIG_H
+
+#include <linux/autoconf.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/console_struct.h b/6/platforms/android-3/arch-x86/usr/include/linux/console_struct.h
new file mode 100644
index 0000000..50e4cbe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/console_struct.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/wait.h>
+#include <linux/vt.h>
+
+struct vt_struct;
+
+#define NPAR 16
+
+struct vc_data {
+ unsigned short vc_num;
+ unsigned int vc_cols;
+ unsigned int vc_rows;
+ unsigned int vc_size_row;
+ unsigned int vc_scan_lines;
+ unsigned long vc_origin;
+ unsigned long vc_scr_end;
+ unsigned long vc_visible_origin;
+ unsigned int vc_top, vc_bottom;
+ const struct consw *vc_sw;
+ unsigned short *vc_screenbuf;
+ unsigned int vc_screenbuf_size;
+ unsigned char vc_mode;
+
+ unsigned char vc_attr;
+ unsigned char vc_def_color;
+ unsigned char vc_color;
+ unsigned char vc_s_color;
+ unsigned char vc_ulcolor;
+ unsigned char vc_halfcolor;
+
+ unsigned int vc_cursor_type;
+ unsigned short vc_complement_mask;
+ unsigned short vc_s_complement_mask;
+ unsigned int vc_x, vc_y;
+ unsigned int vc_saved_x, vc_saved_y;
+ unsigned long vc_pos;
+
+ unsigned short vc_hi_font_mask;
+ struct console_font vc_font;
+ unsigned short vc_video_erase_char;
+
+ unsigned int vc_state;
+ unsigned int vc_npar,vc_par[NPAR];
+ struct tty_struct *vc_tty;
+
+ struct vt_mode vt_mode;
+ int vt_pid;
+ int vt_newvt;
+ wait_queue_head_t paste_wait;
+
+ unsigned int vc_charset : 1;
+ unsigned int vc_s_charset : 1;
+ unsigned int vc_disp_ctrl : 1;
+ unsigned int vc_toggle_meta : 1;
+ unsigned int vc_decscnm : 1;
+ unsigned int vc_decom : 1;
+ unsigned int vc_decawm : 1;
+ unsigned int vc_deccm : 1;
+ unsigned int vc_decim : 1;
+ unsigned int vc_deccolm : 1;
+
+ unsigned int vc_intensity : 2;
+ unsigned int vc_underline : 1;
+ unsigned int vc_blink : 1;
+ unsigned int vc_reverse : 1;
+ unsigned int vc_s_intensity : 2;
+ unsigned int vc_s_underline : 1;
+ unsigned int vc_s_blink : 1;
+ unsigned int vc_s_reverse : 1;
+
+ unsigned int vc_ques : 1;
+ unsigned int vc_need_wrap : 1;
+ unsigned int vc_can_do_color : 1;
+ unsigned int vc_report_mouse : 2;
+ unsigned int vc_kmalloced : 1;
+ unsigned char vc_utf : 1;
+ unsigned char vc_utf_count;
+ int vc_utf_char;
+ unsigned int vc_tab_stop[8];
+ unsigned char vc_palette[16*3];
+ unsigned short * vc_translate;
+ unsigned char vc_G0_charset;
+ unsigned char vc_G1_charset;
+ unsigned char vc_saved_G0;
+ unsigned char vc_saved_G1;
+ unsigned int vc_bell_pitch;
+ unsigned int vc_bell_duration;
+ struct vc_data **vc_display_fg;
+ unsigned long vc_uni_pagedir;
+ unsigned long *vc_uni_pagedir_loc;
+
+};
+
+struct vc {
+ struct vc_data *d;
+
+};
+
+#define CUR_DEF 0
+#define CUR_NONE 1
+#define CUR_UNDERLINE 2
+#define CUR_LOWER_THIRD 3
+#define CUR_LOWER_HALF 4
+#define CUR_TWO_THIRDS 5
+#define CUR_BLOCK 6
+#define CUR_HWMASK 0x0f
+#define CUR_SWMASK 0xfff0
+
+#define CUR_DEFAULT CUR_UNDERLINE
+
+#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/cpu.h b/6/platforms/android-3/arch-x86/usr/include/linux/cpu.h
new file mode 100644
index 0000000..f7e3889
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/cpu.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CPU_H_
+#define _LINUX_CPU_H_
+
+#include <linux/sysdev.h>
+#include <linux/node.h>
+#include <linux/compiler.h>
+#include <linux/cpumask.h>
+#include <asm/semaphore.h>
+
+struct cpu {
+ int node_id;
+ int no_control;
+ struct sys_device sysdev;
+};
+
+struct notifier_block;
+
+#define lock_cpu_hotplug() do { } while (0)
+#define unlock_cpu_hotplug() do { } while (0)
+#define lock_cpu_hotplug_interruptible() 0
+#define hotcpu_notifier(fn, pri) do { } while (0)
+#define register_hotcpu_notifier(nb) do { } while (0)
+#define unregister_hotcpu_notifier(nb) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/cpumask.h b/6/platforms/android-3/arch-x86/usr/include/linux/cpumask.h
new file mode 100644
index 0000000..541940a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/cpumask.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CPUMASK_H
+#define __LINUX_CPUMASK_H
+
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/bitmap.h>
+
+typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
+#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
+#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
+#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
+#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
+#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
+#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
+#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_andnot(dst, src1, src2) __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
+#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
+#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
+#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
+#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
+#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
+#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
+#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
+#define cpus_shift_right(dst, src, n) __cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
+#define cpus_shift_left(dst, src, n) __cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
+#define first_cpu(src) 0
+#define next_cpu(n, src) 1
+#define cpumask_of_cpu(cpu) ({ typeof(_unused_cpumask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(cpu); } else { cpus_clear(m); cpu_set((cpu), m); } m; })
+#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
+#if NR_CPUS <= BITS_PER_LONG
+#define CPU_MASK_ALL (cpumask_t) { { [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD } }
+#else
+#define CPU_MASK_ALL (cpumask_t) { { [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD } }
+#endif
+#define CPU_MASK_NONE (cpumask_t) { { [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL } }
+#define CPU_MASK_CPU0 (cpumask_t) { { [0] = 1UL } }
+#define cpus_addr(src) ((src).bits)
+#define cpumask_scnprintf(buf, len, src) __cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
+#define cpumask_parse(ubuf, ulen, dst) __cpumask_parse((ubuf), (ulen), &(dst), NR_CPUS)
+#define cpulist_scnprintf(buf, len, src) __cpulist_scnprintf((buf), (len), &(src), NR_CPUS)
+#define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS)
+#define cpu_remap(oldbit, old, new) __cpu_remap((oldbit), &(old), &(new), NR_CPUS)
+#define cpus_remap(dst, src, old, new) __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS)
+#if NR_CPUS > 1
+#define for_each_cpu_mask(cpu, mask) for ((cpu) = first_cpu(mask); (cpu) < NR_CPUS; (cpu) = next_cpu((cpu), (mask)))
+#else
+#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
+#endif
+
+#if NR_CPUS > 1
+#define num_online_cpus() cpus_weight(cpu_online_map)
+#define num_possible_cpus() cpus_weight(cpu_possible_map)
+#define num_present_cpus() cpus_weight(cpu_present_map)
+#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map)
+#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map)
+#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map)
+#else
+#define num_online_cpus() 1
+#define num_possible_cpus() 1
+#define num_present_cpus() 1
+#define cpu_online(cpu) ((cpu) == 0)
+#define cpu_possible(cpu) ((cpu) == 0)
+#define cpu_present(cpu) ((cpu) == 0)
+#endif
+
+#define highest_possible_processor_id() 0
+#define any_online_cpu(mask) 0
+
+#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
+#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
+#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ctype.h b/6/platforms/android-3/arch-x86/usr/include/linux/ctype.h
new file mode 100644
index 0000000..4644d12
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ctype.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_CTYPE_H
+#define _LINUX_CTYPE_H
+
+#define _U 0x01
+#define _L 0x02
+#define _D 0x04
+#define _C 0x08
+#define _P 0x10
+#define _S 0x20
+#define _X 0x40
+#define _SP 0x80
+
+#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
+
+#define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0)
+#define isalpha(c) ((__ismask(c)&(_U|_L)) != 0)
+#define iscntrl(c) ((__ismask(c)&(_C)) != 0)
+#define isdigit(c) ((__ismask(c)&(_D)) != 0)
+#define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0)
+#define islower(c) ((__ismask(c)&(_L)) != 0)
+#define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
+#define ispunct(c) ((__ismask(c)&(_P)) != 0)
+#define isspace(c) ((__ismask(c)&(_S)) != 0)
+#define isupper(c) ((__ismask(c)&(_U)) != 0)
+#define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0)
+
+#define isascii(c) (((unsigned char)(c))<=0x7f)
+#define toascii(c) (((unsigned char)(c))&0x7f)
+
+#define tolower(c) __tolower(c)
+#define toupper(c) __toupper(c)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/dccp.h b/6/platforms/android-3/arch-x86/usr/include/linux/dccp.h
new file mode 100644
index 0000000..5e33777
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/dccp.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DCCP_H
+#define _LINUX_DCCP_H
+
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+struct dccp_hdr {
+ __be16 dccph_sport,
+ dccph_dport;
+ __u8 dccph_doff;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 dccph_cscov:4,
+ dccph_ccval:4;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 dccph_ccval:4,
+ dccph_cscov:4;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u16 dccph_checksum;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 dccph_x:1,
+ dccph_type:4,
+ dccph_reserved:3;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u8 dccph_reserved:3,
+ dccph_type:4,
+ dccph_x:1;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u8 dccph_seq2;
+ __be16 dccph_seq;
+};
+
+struct dccp_hdr_ext {
+ __be32 dccph_seq_low;
+};
+
+struct dccp_hdr_request {
+ __be32 dccph_req_service;
+};
+
+struct dccp_hdr_ack_bits {
+ __be16 dccph_reserved1;
+ __be16 dccph_ack_nr_high;
+ __be32 dccph_ack_nr_low;
+};
+
+struct dccp_hdr_response {
+ struct dccp_hdr_ack_bits dccph_resp_ack;
+ __be32 dccph_resp_service;
+};
+
+struct dccp_hdr_reset {
+ struct dccp_hdr_ack_bits dccph_reset_ack;
+ __u8 dccph_reset_code,
+ dccph_reset_data[3];
+};
+
+enum dccp_pkt_type {
+ DCCP_PKT_REQUEST = 0,
+ DCCP_PKT_RESPONSE,
+ DCCP_PKT_DATA,
+ DCCP_PKT_ACK,
+ DCCP_PKT_DATAACK,
+ DCCP_PKT_CLOSEREQ,
+ DCCP_PKT_CLOSE,
+ DCCP_PKT_RESET,
+ DCCP_PKT_SYNC,
+ DCCP_PKT_SYNCACK,
+ DCCP_PKT_INVALID,
+};
+
+#define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID
+
+enum {
+ DCCPO_PADDING = 0,
+ DCCPO_MANDATORY = 1,
+ DCCPO_MIN_RESERVED = 3,
+ DCCPO_MAX_RESERVED = 31,
+ DCCPO_CHANGE_L = 32,
+ DCCPO_CONFIRM_L = 33,
+ DCCPO_CHANGE_R = 34,
+ DCCPO_CONFIRM_R = 35,
+ DCCPO_NDP_COUNT = 37,
+ DCCPO_ACK_VECTOR_0 = 38,
+ DCCPO_ACK_VECTOR_1 = 39,
+ DCCPO_TIMESTAMP = 41,
+ DCCPO_TIMESTAMP_ECHO = 42,
+ DCCPO_ELAPSED_TIME = 43,
+ DCCPO_MAX = 45,
+ DCCPO_MIN_CCID_SPECIFIC = 128,
+ DCCPO_MAX_CCID_SPECIFIC = 255,
+};
+
+enum {
+ DCCPF_RESERVED = 0,
+ DCCPF_CCID = 1,
+ DCCPF_SEQUENCE_WINDOW = 3,
+ DCCPF_ACK_RATIO = 5,
+ DCCPF_SEND_ACK_VECTOR = 6,
+ DCCPF_SEND_NDP_COUNT = 7,
+
+ DCCPF_MIN_CCID_SPECIFIC = 128,
+ DCCPF_MAX_CCID_SPECIFIC = 255,
+};
+
+struct dccp_so_feat {
+ __u8 dccpsf_feat;
+ __u8 *dccpsf_val;
+ __u8 dccpsf_len;
+};
+
+#define DCCP_SOCKOPT_PACKET_SIZE 1
+#define DCCP_SOCKOPT_SERVICE 2
+#define DCCP_SOCKOPT_CHANGE_L 3
+#define DCCP_SOCKOPT_CHANGE_R 4
+#define DCCP_SOCKOPT_CCID_RX_INFO 128
+#define DCCP_SOCKOPT_CCID_TX_INFO 192
+
+#define DCCP_SERVICE_LIST_MAX_LEN 32
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/debug_locks.h b/6/platforms/android-3/arch-x86/usr/include/linux/debug_locks.h
new file mode 100644
index 0000000..2d55fcd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/debug_locks.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_DEBUG_LOCKING_H
+#define __LINUX_DEBUG_LOCKING_H
+
+struct task_struct;
+
+#define _RET_IP_ (unsigned long)__builtin_return_address(0)
+#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
+
+#define DEBUG_LOCKS_WARN_ON(c) ({ int __ret = 0; if (unlikely(c)) { if (debug_locks_off()) WARN_ON(1); __ret = 1; } __ret; })
+
+#define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0)
+
+#define locking_selftest() do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/delay.h b/6/platforms/android-3/arch-x86/usr/include/linux/delay.h
new file mode 100644
index 0000000..e032b6f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/delay.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DELAY_H
+#define _LINUX_DELAY_H
+
+#include <asm/delay.h>
+
+#ifndef MAX_UDELAY_MS
+#define MAX_UDELAY_MS 5
+#endif
+
+#ifndef mdelay
+#define mdelay(n) ( (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : ({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
+#endif
+
+#ifndef ndelay
+#define ndelay(x) udelay(((x)+999)/1000)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/device.h b/6/platforms/android-3/arch-x86/usr/include/linux/device.h
new file mode 100644
index 0000000..6419322
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/device.h
@@ -0,0 +1,222 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _DEVICE_H_
+#define _DEVICE_H_
+
+#include <linux/ioport.h>
+#include <linux/kobject.h>
+#include <linux/klist.h>
+#include <linux/list.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <asm/semaphore.h>
+#include <asm/atomic.h>
+
+#define DEVICE_NAME_SIZE 50
+#define DEVICE_NAME_HALF __stringify(20)
+#define DEVICE_ID_SIZE 32
+#define BUS_ID_SIZE KOBJ_NAME_LEN
+
+struct device;
+struct device_driver;
+struct class;
+struct class_device;
+
+struct bus_type {
+ const char * name;
+
+ struct subsystem subsys;
+ struct kset drivers;
+ struct kset devices;
+ struct klist klist_devices;
+ struct klist klist_drivers;
+
+ struct bus_attribute * bus_attrs;
+ struct device_attribute * dev_attrs;
+ struct driver_attribute * drv_attrs;
+
+ int (*match)(struct device * dev, struct device_driver * drv);
+ int (*uevent)(struct device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+ int (*probe)(struct device * dev);
+ int (*remove)(struct device * dev);
+ void (*shutdown)(struct device * dev);
+ int (*suspend)(struct device * dev, pm_message_t state);
+ int (*resume)(struct device * dev);
+};
+
+struct device * bus_find_device(struct bus_type *bus, struct device *start,
+ void *data, int (*match)(struct device *, void *));
+
+struct bus_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct bus_type *, char * buf);
+ ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
+};
+
+#define BUS_ATTR(_name,_mode,_show,_store) struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device_driver {
+ const char * name;
+ struct bus_type * bus;
+
+ struct completion unloaded;
+ struct kobject kobj;
+ struct klist klist_devices;
+ struct klist_node knode_bus;
+
+ struct module * owner;
+
+ int (*probe) (struct device * dev);
+ int (*remove) (struct device * dev);
+ void (*shutdown) (struct device * dev);
+ int (*suspend) (struct device * dev, pm_message_t state);
+ int (*resume) (struct device * dev);
+};
+
+struct driver_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct device_driver *, char * buf);
+ ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
+};
+
+#define DRIVER_ATTR(_name,_mode,_show,_store) struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device * driver_find_device(struct device_driver *drv,
+ struct device *start, void *data,
+ int (*match)(struct device *, void *));
+
+struct class {
+ const char * name;
+ struct module * owner;
+
+ struct subsystem subsys;
+ struct list_head children;
+ struct list_head devices;
+ struct list_head interfaces;
+ struct semaphore sem;
+
+ struct class_attribute * class_attrs;
+ struct class_device_attribute * class_dev_attrs;
+
+ int (*uevent)(struct class_device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+
+ void (*release)(struct class_device *dev);
+ void (*class_release)(struct class *class);
+};
+
+struct class_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct class *, char * buf);
+ ssize_t (*store)(struct class *, const char * buf, size_t count);
+};
+
+#define CLASS_ATTR(_name,_mode,_show,_store) struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct class_device_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct class_device *, char * buf);
+ ssize_t (*store)(struct class_device *, const char * buf, size_t count);
+};
+
+#define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) struct class_device_attribute class_device_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct class_device {
+ struct list_head node;
+
+ struct kobject kobj;
+ struct class * class;
+ dev_t devt;
+ struct class_device_attribute *devt_attr;
+ struct class_device_attribute uevent_attr;
+ struct device * dev;
+ void * class_data;
+ struct class_device *parent;
+ struct attribute_group ** groups;
+
+ void (*release)(struct class_device *dev);
+ int (*uevent)(struct class_device *dev, char **envp,
+ int num_envp, char *buffer, int buffer_size);
+ char class_id[BUS_ID_SIZE];
+};
+
+struct class_interface {
+ struct list_head node;
+ struct class *class;
+
+ int (*add) (struct class_device *, struct class_interface *);
+ void (*remove) (struct class_device *, struct class_interface *);
+};
+
+struct device_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct device *dev, struct device_attribute *attr,
+ char *buf);
+ ssize_t (*store)(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count);
+};
+
+#define DEVICE_ATTR(_name,_mode,_show,_store) struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store)
+
+struct device {
+ struct klist klist_children;
+ struct klist_node knode_parent;
+ struct klist_node knode_driver;
+ struct klist_node knode_bus;
+ struct device * parent;
+
+ struct kobject kobj;
+ char bus_id[BUS_ID_SIZE];
+ struct device_attribute uevent_attr;
+ struct device_attribute *devt_attr;
+
+ struct semaphore sem;
+
+ struct bus_type * bus;
+ struct device_driver *driver;
+ void *driver_data;
+ void *platform_data;
+ void *firmware_data;
+ struct dev_pm_info power;
+
+ u64 *dma_mask;
+ u64 coherent_dma_mask;
+
+ struct list_head dma_pools;
+
+ struct dma_coherent_mem *dma_mem;
+
+ struct list_head node;
+ struct class *class;
+ dev_t devt;
+
+ void (*release)(struct device * dev);
+};
+
+#define dev_printk(level, dev, format, arg...) printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
+
+#ifdef DEBUG
+#define dev_dbg(dev, format, arg...) dev_printk(KERN_DEBUG , dev , format , ## arg)
+#else
+#define dev_dbg(dev, format, arg...) do { (void)(dev); } while (0)
+#endif
+
+#define dev_err(dev, format, arg...) dev_printk(KERN_ERR , dev , format , ## arg)
+#define dev_info(dev, format, arg...) dev_printk(KERN_INFO , dev , format , ## arg)
+#define dev_warn(dev, format, arg...) dev_printk(KERN_WARNING , dev , format , ## arg)
+#define dev_notice(dev, format, arg...) dev_printk(KERN_NOTICE , dev , format , ## arg)
+
+#define MODULE_ALIAS_CHARDEV(major,minor) MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
+#define MODULE_ALIAS_CHARDEV_MAJOR(major) MODULE_ALIAS("char-major-" __stringify(major) "-*")
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/dirent.h b/6/platforms/android-3/arch-x86/usr/include/linux/dirent.h
new file mode 100644
index 0000000..2dace18
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/dirent.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DIRENT_H
+#define _LINUX_DIRENT_H
+
+struct dirent {
+ long d_ino;
+ __kernel_off_t d_off;
+ unsigned short d_reclen;
+ char d_name[256];
+};
+
+struct dirent64 {
+ __u64 d_ino;
+ __s64 d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/dm-ioctl.h b/6/platforms/android-3/arch-x86/usr/include/linux/dm-ioctl.h
new file mode 100644
index 0000000..ead7744
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/dm-ioctl.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_DM_IOCTL_V4_H
+#define _LINUX_DM_IOCTL_V4_H
+
+#include <linux/types.h>
+
+#define DM_DIR "mapper"
+#define DM_MAX_TYPE_NAME 16
+#define DM_NAME_LEN 128
+#define DM_UUID_LEN 129
+
+struct dm_ioctl {
+
+ uint32_t version[3];
+ uint32_t data_size;
+
+ uint32_t data_start;
+
+ uint32_t target_count;
+ int32_t open_count;
+ uint32_t flags;
+ uint32_t event_nr;
+ uint32_t padding;
+
+ uint64_t dev;
+
+ char name[DM_NAME_LEN];
+ char uuid[DM_UUID_LEN];
+ char data[7];
+};
+
+struct dm_target_spec {
+ uint64_t sector_start;
+ uint64_t length;
+ int32_t status;
+
+ uint32_t next;
+
+ char target_type[DM_MAX_TYPE_NAME];
+
+};
+
+struct dm_target_deps {
+ uint32_t count;
+ uint32_t padding;
+ uint64_t dev[0];
+};
+
+struct dm_name_list {
+ uint64_t dev;
+ uint32_t next;
+ char name[0];
+};
+
+struct dm_target_versions {
+ uint32_t next;
+ uint32_t version[3];
+
+ char name[0];
+};
+
+struct dm_target_msg {
+ uint64_t sector;
+
+ char message[0];
+};
+
+enum {
+
+ DM_VERSION_CMD = 0,
+ DM_REMOVE_ALL_CMD,
+ DM_LIST_DEVICES_CMD,
+
+ DM_DEV_CREATE_CMD,
+ DM_DEV_REMOVE_CMD,
+ DM_DEV_RENAME_CMD,
+ DM_DEV_SUSPEND_CMD,
+ DM_DEV_STATUS_CMD,
+ DM_DEV_WAIT_CMD,
+
+ DM_TABLE_LOAD_CMD,
+ DM_TABLE_CLEAR_CMD,
+ DM_TABLE_DEPS_CMD,
+ DM_TABLE_STATUS_CMD,
+
+ DM_LIST_VERSIONS_CMD,
+ DM_TARGET_MSG_CMD,
+ DM_DEV_SET_GEOMETRY_CMD
+};
+
+#define DM_IOCTL 0xfd
+
+#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
+#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
+#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
+
+#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
+#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
+#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
+#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
+#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
+#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
+
+#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
+#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
+#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
+#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
+
+#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
+
+#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
+#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
+
+#define DM_VERSION_MAJOR 4
+#define DM_VERSION_MINOR 14
+#define DM_VERSION_PATCHLEVEL 0
+#define DM_VERSION_EXTRA "-ioctl (2008-04-23)"
+
+#define DM_READONLY_FLAG (1 << 0)
+#define DM_SUSPEND_FLAG (1 << 1)
+#define DM_PERSISTENT_DEV_FLAG (1 << 3)
+
+#define DM_STATUS_TABLE_FLAG (1 << 4)
+
+#define DM_ACTIVE_PRESENT_FLAG (1 << 5)
+#define DM_INACTIVE_PRESENT_FLAG (1 << 6)
+
+#define DM_BUFFER_FULL_FLAG (1 << 8)
+
+#define DM_SKIP_BDGET_FLAG (1 << 9)
+
+#define DM_SKIP_LOCKFS_FLAG (1 << 10)
+
+#define DM_NOFLUSH_FLAG (1 << 11)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/dma-mapping.h b/6/platforms/android-3/arch-x86/usr/include/linux/dma-mapping.h
new file mode 100644
index 0000000..6432259
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/dma-mapping.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_LINUX_DMA_MAPPING_H
+#define _ASM_LINUX_DMA_MAPPING_H
+
+#include <linux/device.h>
+#include <linux/err.h>
+
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
+
+#define DMA_64BIT_MASK 0xffffffffffffffffULL
+#define DMA_48BIT_MASK 0x0000ffffffffffffULL
+#define DMA_40BIT_MASK 0x000000ffffffffffULL
+#define DMA_39BIT_MASK 0x0000007fffffffffULL
+#define DMA_32BIT_MASK 0x00000000ffffffffULL
+#define DMA_31BIT_MASK 0x000000007fffffffULL
+#define DMA_30BIT_MASK 0x000000003fffffffULL
+#define DMA_29BIT_MASK 0x000000001fffffffULL
+#define DMA_28BIT_MASK 0x000000000fffffffULL
+#define DMA_24BIT_MASK 0x0000000000ffffffULL
+
+#include <asm/dma-mapping.h>
+
+#define dma_sync_single dma_sync_single_for_cpu
+#define dma_sync_sg dma_sync_sg_for_cpu
+
+#define DMA_MEMORY_MAP 0x01
+#define DMA_MEMORY_IO 0x02
+#define DMA_MEMORY_INCLUDES_CHILDREN 0x04
+#define DMA_MEMORY_EXCLUSIVE 0x08
+
+#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/dmaengine.h b/6/platforms/android-3/arch-x86/usr/include/linux/dmaengine.h
new file mode 100644
index 0000000..549fea9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/dmaengine.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef DMAENGINE_H
+#define DMAENGINE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/efs_dir.h b/6/platforms/android-3/arch-x86/usr/include/linux/efs_dir.h
new file mode 100644
index 0000000..5be2762
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/efs_dir.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_DIR_H__
+#define __EFS_DIR_H__
+
+#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
+#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
+
+struct efs_dentry {
+ __be32 inode;
+ unsigned char namelen;
+ char name[3];
+};
+
+#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1)
+#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1)
+
+#define EFS_DIRBLK_HEADERSIZE 4
+#define EFS_DIRBLK_MAGIC 0xbeef
+
+struct efs_dir {
+ __be16 magic;
+ unsigned char firstused;
+ unsigned char slots;
+
+ unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE];
+};
+
+#define EFS_MAXENTS ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / (EFS_DENTSIZE + sizeof(char)))
+
+#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot])
+
+#define EFS_REALOFF(offset) ((offset << 1))
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_i.h b/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_i.h
new file mode 100644
index 0000000..6d88d28
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_i.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_FS_I_H__
+#define __EFS_FS_I_H__
+
+typedef int32_t efs_block_t;
+typedef uint32_t efs_ino_t;
+
+#define EFS_DIRECTEXTENTS 12
+
+typedef union extent_u {
+ unsigned char raw[8];
+ struct extent_s {
+ unsigned int ex_magic:8;
+ unsigned int ex_bn:24;
+ unsigned int ex_length:8;
+ unsigned int ex_offset:24;
+ } cooked;
+} efs_extent;
+
+typedef struct edevs {
+ __be16 odev;
+ __be32 ndev;
+} efs_devs;
+
+struct efs_dinode {
+ __be16 di_mode;
+ __be16 di_nlink;
+ __be16 di_uid;
+ __be16 di_gid;
+ __be32 di_size;
+ __be32 di_atime;
+ __be32 di_mtime;
+ __be32 di_ctime;
+ __be32 di_gen;
+ __be16 di_numextents;
+ u_char di_version;
+ u_char di_spare;
+ union di_addr {
+ efs_extent di_extents[EFS_DIRECTEXTENTS];
+ efs_devs di_dev;
+ } di_u;
+};
+
+struct efs_inode_info {
+ int numextents;
+ int lastextent;
+
+ efs_extent extents[EFS_DIRECTEXTENTS];
+ struct inode vfs_inode;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_sb.h b/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_sb.h
new file mode 100644
index 0000000..f7960c0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __EFS_FS_SB_H__
+#define __EFS_FS_SB_H__
+
+#define EFS_SUPER_MAGIC 0x414A53
+
+#define EFS_MAGIC 0x072959
+#define EFS_NEWMAGIC 0x07295a
+
+#define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
+
+#define EFS_SUPER 1
+#define EFS_ROOTINODE 2
+
+struct efs_super {
+ __be32 fs_size;
+ __be32 fs_firstcg;
+ __be32 fs_cgfsize;
+ __be16 fs_cgisize;
+ __be16 fs_sectors;
+ __be16 fs_heads;
+ __be16 fs_ncg;
+ __be16 fs_dirty;
+ __be32 fs_time;
+ __be32 fs_magic;
+ char fs_fname[6];
+ char fs_fpack[6];
+ __be32 fs_bmsize;
+ __be32 fs_tfree;
+ __be32 fs_tinode;
+ __be32 fs_bmblock;
+ __be32 fs_replsb;
+ __be32 fs_lastialloc;
+ char fs_spare[20];
+ __be32 fs_checksum;
+};
+
+struct efs_sb_info {
+ __u32 fs_magic;
+ __u32 fs_start;
+ __u32 first_block;
+ __u32 total_blocks;
+ __u32 group_size;
+ __u32 data_free;
+ __u32 inode_free;
+ __u16 inode_blocks;
+ __u16 total_groups;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/elevator.h b/6/platforms/android-3/arch-x86/usr/include/linux/elevator.h
new file mode 100644
index 0000000..2e79ce9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/elevator.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELEVATOR_H
+#define _LINUX_ELEVATOR_H
+
+typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
+ struct bio *);
+
+typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *);
+
+typedef void (elevator_merged_fn) (request_queue_t *, struct request *);
+
+typedef int (elevator_dispatch_fn) (request_queue_t *, int);
+
+typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_queue_empty_fn) (request_queue_t *);
+typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
+typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
+typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *);
+
+typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t);
+typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
+typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
+typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
+
+typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
+typedef void (elevator_exit_fn) (elevator_t *);
+
+struct elevator_ops
+{
+ elevator_merge_fn *elevator_merge_fn;
+ elevator_merged_fn *elevator_merged_fn;
+ elevator_merge_req_fn *elevator_merge_req_fn;
+
+ elevator_dispatch_fn *elevator_dispatch_fn;
+ elevator_add_req_fn *elevator_add_req_fn;
+ elevator_activate_req_fn *elevator_activate_req_fn;
+ elevator_deactivate_req_fn *elevator_deactivate_req_fn;
+
+ elevator_queue_empty_fn *elevator_queue_empty_fn;
+ elevator_completed_req_fn *elevator_completed_req_fn;
+
+ elevator_request_list_fn *elevator_former_req_fn;
+ elevator_request_list_fn *elevator_latter_req_fn;
+
+ elevator_set_req_fn *elevator_set_req_fn;
+ elevator_put_req_fn *elevator_put_req_fn;
+
+ elevator_may_queue_fn *elevator_may_queue_fn;
+
+ elevator_init_fn *elevator_init_fn;
+ elevator_exit_fn *elevator_exit_fn;
+ void (*trim)(struct io_context *);
+};
+
+#define ELV_NAME_MAX (16)
+
+struct elv_fs_entry {
+ struct attribute attr;
+ ssize_t (*show)(elevator_t *, char *);
+ ssize_t (*store)(elevator_t *, const char *, size_t);
+};
+
+struct elevator_type
+{
+ struct list_head list;
+ struct elevator_ops ops;
+ struct elevator_type *elevator_type;
+ struct elv_fs_entry *elevator_attrs;
+ char elevator_name[ELV_NAME_MAX];
+ struct module *elevator_owner;
+};
+
+struct elevator_queue
+{
+ struct elevator_ops *ops;
+ void *elevator_data;
+ struct kobject kobj;
+ struct elevator_type *elevator_type;
+ struct mutex sysfs_lock;
+};
+
+#define ELEVATOR_NO_MERGE 0
+#define ELEVATOR_FRONT_MERGE 1
+#define ELEVATOR_BACK_MERGE 2
+
+#define ELEVATOR_INSERT_FRONT 1
+#define ELEVATOR_INSERT_BACK 2
+#define ELEVATOR_INSERT_SORT 3
+#define ELEVATOR_INSERT_REQUEUE 4
+
+enum {
+ ELV_MQUEUE_MAY,
+ ELV_MQUEUE_NO,
+ ELV_MQUEUE_MUST,
+};
+
+#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/elf-em.h b/6/platforms/android-3/arch-x86/usr/include/linux/elf-em.h
new file mode 100644
index 0000000..e151fdf
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/elf-em.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELF_EM_H
+#define _LINUX_ELF_EM_H
+
+#define EM_NONE 0
+#define EM_M32 1
+#define EM_SPARC 2
+#define EM_386 3
+#define EM_68K 4
+#define EM_88K 5
+#define EM_486 6
+#define EM_860 7
+#define EM_MIPS 8
+
+#define EM_MIPS_RS3_LE 10
+#define EM_MIPS_RS4_BE 10
+
+#define EM_PARISC 15
+#define EM_SPARC32PLUS 18
+#define EM_PPC 20
+#define EM_PPC64 21
+#define EM_SH 42
+#define EM_SPARCV9 43
+#define EM_IA_64 50
+#define EM_X86_64 62
+#define EM_S390 22
+#define EM_CRIS 76
+#define EM_V850 87
+#define EM_M32R 88
+#define EM_H8_300 46
+#define EM_FRV 0x5441
+
+#define EM_ALPHA 0x9026
+
+#define EM_CYGNUS_V850 0x9080
+
+#define EM_CYGNUS_M32R 0x9041
+
+#define EM_S390_OLD 0xA390
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/elf.h b/6/platforms/android-3/arch-x86/usr/include/linux/elf.h
new file mode 100644
index 0000000..f16b439
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/elf.h
@@ -0,0 +1,361 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ELF_H
+#define _LINUX_ELF_H
+
+#include <linux/types.h>
+#include <linux/auxvec.h>
+#include <linux/elf-em.h>
+#include <asm/elf.h>
+
+#ifndef elf_read_implies_exec
+
+#define elf_read_implies_exec(ex, have_pt_gnu_stack) 0
+#endif
+
+typedef __u32 Elf32_Addr;
+typedef __u16 Elf32_Half;
+typedef __u32 Elf32_Off;
+typedef __s32 Elf32_Sword;
+typedef __u32 Elf32_Word;
+
+typedef __u64 Elf64_Addr;
+typedef __u16 Elf64_Half;
+typedef __s16 Elf64_SHalf;
+typedef __u64 Elf64_Off;
+typedef __s32 Elf64_Sword;
+typedef __u32 Elf64_Word;
+typedef __u64 Elf64_Xword;
+typedef __s64 Elf64_Sxword;
+
+#define PT_NULL 0
+#define PT_LOAD 1
+#define PT_DYNAMIC 2
+#define PT_INTERP 3
+#define PT_NOTE 4
+#define PT_SHLIB 5
+#define PT_PHDR 6
+#define PT_TLS 7
+#define PT_LOOS 0x60000000
+#define PT_HIOS 0x6fffffff
+#define PT_LOPROC 0x70000000
+#define PT_HIPROC 0x7fffffff
+#define PT_GNU_EH_FRAME 0x6474e550
+
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
+
+#define ET_NONE 0
+#define ET_REL 1
+#define ET_EXEC 2
+#define ET_DYN 3
+#define ET_CORE 4
+#define ET_LOPROC 0xff00
+#define ET_HIPROC 0xffff
+
+#define DT_NULL 0
+#define DT_NEEDED 1
+#define DT_PLTRELSZ 2
+#define DT_PLTGOT 3
+#define DT_HASH 4
+#define DT_STRTAB 5
+#define DT_SYMTAB 6
+#define DT_RELA 7
+#define DT_RELASZ 8
+#define DT_RELAENT 9
+#define DT_STRSZ 10
+#define DT_SYMENT 11
+#define DT_INIT 12
+#define DT_FINI 13
+#define DT_SONAME 14
+#define DT_RPATH 15
+#define DT_SYMBOLIC 16
+#define DT_REL 17
+#define DT_RELSZ 18
+#define DT_RELENT 19
+#define DT_PLTREL 20
+#define DT_DEBUG 21
+#define DT_TEXTREL 22
+#define DT_JMPREL 23
+#define DT_LOPROC 0x70000000
+#define DT_HIPROC 0x7fffffff
+
+#define STB_LOCAL 0
+#define STB_GLOBAL 1
+#define STB_WEAK 2
+
+#define STT_NOTYPE 0
+#define STT_OBJECT 1
+#define STT_FUNC 2
+#define STT_SECTION 3
+#define STT_FILE 4
+#define STT_COMMON 5
+#define STT_TLS 6
+
+#define ELF_ST_BIND(x) ((x) >> 4)
+#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF32_ST_BIND(x) ELF_ST_BIND(x)
+#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
+#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
+#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
+
+typedef struct dynamic{
+ Elf32_Sword d_tag;
+ union{
+ Elf32_Sword d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+ Elf64_Sxword d_tag;
+ union {
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
+ } d_un;
+} Elf64_Dyn;
+
+#define ELF32_R_SYM(x) ((x) >> 8)
+#define ELF32_R_TYPE(x) ((x) & 0xff)
+
+#define ELF64_R_SYM(i) ((i) >> 32)
+#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
+
+typedef struct elf32_rel {
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+} Elf32_Rel;
+
+typedef struct elf64_rel {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+} Elf64_Rel;
+
+typedef struct elf32_rela{
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+typedef struct elf64_rela {
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+ Elf64_Sxword r_addend;
+} Elf64_Rela;
+
+typedef struct elf32_sym{
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf32_Half st_shndx;
+} Elf32_Sym;
+
+typedef struct elf64_sym {
+ Elf64_Word st_name;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf64_Half st_shndx;
+ Elf64_Addr st_value;
+ Elf64_Xword st_size;
+} Elf64_Sym;
+
+#define EI_NIDENT 16
+
+typedef struct elf32_hdr{
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry;
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shstrndx;
+} Elf32_Ehdr;
+
+typedef struct elf64_hdr {
+ unsigned char e_ident[16];
+ Elf64_Half e_type;
+ Elf64_Half e_machine;
+ Elf64_Word e_version;
+ Elf64_Addr e_entry;
+ Elf64_Off e_phoff;
+ Elf64_Off e_shoff;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shstrndx;
+} Elf64_Ehdr;
+
+#define PF_R 0x4
+#define PF_W 0x2
+#define PF_X 0x1
+
+typedef struct elf32_phdr{
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
+} Elf32_Phdr;
+
+typedef struct elf64_phdr {
+ Elf64_Word p_type;
+ Elf64_Word p_flags;
+ Elf64_Off p_offset;
+ Elf64_Addr p_vaddr;
+ Elf64_Addr p_paddr;
+ Elf64_Xword p_filesz;
+ Elf64_Xword p_memsz;
+ Elf64_Xword p_align;
+} Elf64_Phdr;
+
+#define SHT_NULL 0
+#define SHT_PROGBITS 1
+#define SHT_SYMTAB 2
+#define SHT_STRTAB 3
+#define SHT_RELA 4
+#define SHT_HASH 5
+#define SHT_DYNAMIC 6
+#define SHT_NOTE 7
+#define SHT_NOBITS 8
+#define SHT_REL 9
+#define SHT_SHLIB 10
+#define SHT_DYNSYM 11
+#define SHT_NUM 12
+#define SHT_LOPROC 0x70000000
+#define SHT_HIPROC 0x7fffffff
+#define SHT_LOUSER 0x80000000
+#define SHT_HIUSER 0xffffffff
+
+#define SHF_WRITE 0x1
+#define SHF_ALLOC 0x2
+#define SHF_EXECINSTR 0x4
+#define SHF_MASKPROC 0xf0000000
+
+#define SHN_UNDEF 0
+#define SHN_LORESERVE 0xff00
+#define SHN_LOPROC 0xff00
+#define SHN_HIPROC 0xff1f
+#define SHN_ABS 0xfff1
+#define SHN_COMMON 0xfff2
+#define SHN_HIRESERVE 0xffff
+
+typedef struct {
+ Elf32_Word sh_name;
+ Elf32_Word sh_type;
+ Elf32_Word sh_flags;
+ Elf32_Addr sh_addr;
+ Elf32_Off sh_offset;
+ Elf32_Word sh_size;
+ Elf32_Word sh_link;
+ Elf32_Word sh_info;
+ Elf32_Word sh_addralign;
+ Elf32_Word sh_entsize;
+} Elf32_Shdr;
+
+typedef struct elf64_shdr {
+ Elf64_Word sh_name;
+ Elf64_Word sh_type;
+ Elf64_Xword sh_flags;
+ Elf64_Addr sh_addr;
+ Elf64_Off sh_offset;
+ Elf64_Xword sh_size;
+ Elf64_Word sh_link;
+ Elf64_Word sh_info;
+ Elf64_Xword sh_addralign;
+ Elf64_Xword sh_entsize;
+} Elf64_Shdr;
+
+#define EI_MAG0 0
+#define EI_MAG1 1
+#define EI_MAG2 2
+#define EI_MAG3 3
+#define EI_CLASS 4
+#define EI_DATA 5
+#define EI_VERSION 6
+#define EI_OSABI 7
+#define EI_PAD 8
+
+#define ELFMAG0 0x7f
+#define ELFMAG1 'E'
+#define ELFMAG2 'L'
+#define ELFMAG3 'F'
+#define ELFMAG "\177ELF"
+#define SELFMAG 4
+
+#define ELFCLASSNONE 0
+#define ELFCLASS32 1
+#define ELFCLASS64 2
+#define ELFCLASSNUM 3
+
+#define ELFDATANONE 0
+#define ELFDATA2LSB 1
+#define ELFDATA2MSB 2
+
+#define EV_NONE 0
+#define EV_CURRENT 1
+#define EV_NUM 2
+
+#define ELFOSABI_NONE 0
+#define ELFOSABI_LINUX 3
+
+#ifndef ELF_OSABI
+#define ELF_OSABI ELFOSABI_NONE
+#endif
+
+#define NT_PRSTATUS 1
+#define NT_PRFPREG 2
+#define NT_PRPSINFO 3
+#define NT_TASKSTRUCT 4
+#define NT_AUXV 6
+#define NT_PRXFPREG 0x46e62b7f
+
+typedef struct elf32_note {
+ Elf32_Word n_namesz;
+ Elf32_Word n_descsz;
+ Elf32_Word n_type;
+} Elf32_Nhdr;
+
+typedef struct elf64_note {
+ Elf64_Word n_namesz;
+ Elf64_Word n_descsz;
+ Elf64_Word n_type;
+} Elf64_Nhdr;
+
+#if ELF_CLASS == ELFCLASS32
+
+#define elfhdr elf32_hdr
+#define elf_phdr elf32_phdr
+#define elf_note elf32_note
+
+#else
+
+#define elfhdr elf64_hdr
+#define elf_phdr elf64_phdr
+#define elf_note elf64_note
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/err.h b/6/platforms/android-3/arch-x86/usr/include/linux/err.h
new file mode 100644
index 0000000..1aa4f9b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/err.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERR_H
+#define _LINUX_ERR_H
+
+#include <linux/compiler.h>
+
+#include <asm/errno.h>
+
+#define MAX_ERRNO 4095
+
+#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/errno.h b/6/platforms/android-3/arch-x86/usr/include/linux/errno.h
new file mode 100644
index 0000000..72ee642
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/errno.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERRNO_H
+#define _LINUX_ERRNO_H
+
+#include <asm/errno.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/errqueue.h b/6/platforms/android-3/arch-x86/usr/include/linux/errqueue.h
new file mode 100644
index 0000000..03b2e42
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/errqueue.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ERRQUEUE_H
+#define _LINUX_ERRQUEUE_H 1
+
+struct sock_extended_err
+{
+ __u32 ee_errno;
+ __u8 ee_origin;
+ __u8 ee_type;
+ __u8 ee_code;
+ __u8 ee_pad;
+ __u32 ee_info;
+ __u32 ee_data;
+};
+
+#define SO_EE_ORIGIN_NONE 0
+#define SO_EE_ORIGIN_LOCAL 1
+#define SO_EE_ORIGIN_ICMP 2
+#define SO_EE_ORIGIN_ICMP6 3
+
+#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/etherdevice.h b/6/platforms/android-3/arch-x86/usr/include/linux/etherdevice.h
new file mode 100644
index 0000000..d087e8f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/etherdevice.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ETHERDEVICE_H
+#define _LINUX_ETHERDEVICE_H
+
+#include <linux/if_ether.h>
+#include <linux/netdevice.h>
+#include <linux/random.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ext2_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/ext2_fs.h
new file mode 100644
index 0000000..c21b09a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ext2_fs.h
@@ -0,0 +1,378 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_EXT2_FS_H
+#define _LINUX_EXT2_FS_H
+
+#include <linux/types.h>
+
+#undef EXT2FS_DEBUG
+
+#define EXT2_PREALLOCATE
+#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
+
+#define EXT2FS_DATE "95/08/09"
+#define EXT2FS_VERSION "0.5b"
+
+#ifdef EXT2FS_DEBUG
+#define ext2_debug(f, a...) { printk ("EXT2-fs DEBUG (%s, %d): %s:", __FILE__, __LINE__, __FUNCTION__); printk (f, ## a); }
+#else
+#define ext2_debug(f, a...)
+#endif
+
+#define EXT2_BAD_INO 1
+#define EXT2_ROOT_INO 2
+#define EXT2_BOOT_LOADER_INO 5
+#define EXT2_UNDEL_DIR_INO 6
+
+#define EXT2_GOOD_OLD_FIRST_INO 11
+
+#define EXT2_SUPER_MAGIC 0xEF53
+
+#define EXT2_SB(sb) (sb)
+
+#define EXT2_LINK_MAX 32000
+
+#define EXT2_MIN_BLOCK_SIZE 1024
+#define EXT2_MAX_BLOCK_SIZE 4096
+#define EXT2_MIN_BLOCK_LOG_SIZE 10
+#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
+#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
+#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
+
+#define EXT2_MIN_FRAG_SIZE 1024
+#define EXT2_MAX_FRAG_SIZE 4096
+#define EXT2_MIN_FRAG_LOG_SIZE 10
+#define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+#define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
+
+struct ext2_group_desc
+{
+ __le32 bg_block_bitmap;
+ __le32 bg_inode_bitmap;
+ __le32 bg_inode_table;
+ __le16 bg_free_blocks_count;
+ __le16 bg_free_inodes_count;
+ __le16 bg_used_dirs_count;
+ __le16 bg_pad;
+ __le32 bg_reserved[3];
+};
+
+#define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
+#define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+
+#define EXT2_NDIR_BLOCKS 12
+#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
+#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
+#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
+#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
+
+#define EXT2_SECRM_FL 0x00000001
+#define EXT2_UNRM_FL 0x00000002
+#define EXT2_COMPR_FL 0x00000004
+#define EXT2_SYNC_FL 0x00000008
+#define EXT2_IMMUTABLE_FL 0x00000010
+#define EXT2_APPEND_FL 0x00000020
+#define EXT2_NODUMP_FL 0x00000040
+#define EXT2_NOATIME_FL 0x00000080
+
+#define EXT2_DIRTY_FL 0x00000100
+#define EXT2_COMPRBLK_FL 0x00000200
+#define EXT2_NOCOMP_FL 0x00000400
+#define EXT2_ECOMPR_FL 0x00000800
+
+#define EXT2_BTREE_FL 0x00001000
+#define EXT2_INDEX_FL 0x00001000
+#define EXT2_IMAGIC_FL 0x00002000
+#define EXT2_JOURNAL_DATA_FL 0x00004000
+#define EXT2_NOTAIL_FL 0x00008000
+#define EXT2_DIRSYNC_FL 0x00010000
+#define EXT2_TOPDIR_FL 0x00020000
+#define EXT2_RESERVED_FL 0x80000000
+
+#define EXT2_FL_USER_VISIBLE 0x0003DFFF
+#define EXT2_FL_USER_MODIFIABLE 0x000380FF
+
+#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
+#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
+#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
+#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
+
+struct ext2_inode {
+ __le16 i_mode;
+ __le16 i_uid;
+ __le32 i_size;
+ __le32 i_atime;
+ __le32 i_ctime;
+ __le32 i_mtime;
+ __le32 i_dtime;
+ __le16 i_gid;
+ __le16 i_links_count;
+ __le32 i_blocks;
+ __le32 i_flags;
+ union {
+ struct {
+ __le32 l_i_reserved1;
+ } linux1;
+ struct {
+ __le32 h_i_translator;
+ } hurd1;
+ struct {
+ __le32 m_i_reserved1;
+ } masix1;
+ } osd1;
+ __le32 i_block[EXT2_N_BLOCKS];
+ __le32 i_generation;
+ __le32 i_file_acl;
+ __le32 i_dir_acl;
+ __le32 i_faddr;
+ union {
+ struct {
+ __u8 l_i_frag;
+ __u8 l_i_fsize;
+ __u16 i_pad1;
+ __le16 l_i_uid_high;
+ __le16 l_i_gid_high;
+ __u32 l_i_reserved2;
+ } linux2;
+ struct {
+ __u8 h_i_frag;
+ __u8 h_i_fsize;
+ __le16 h_i_mode_high;
+ __le16 h_i_uid_high;
+ __le16 h_i_gid_high;
+ __le32 h_i_author;
+ } hurd2;
+ struct {
+ __u8 m_i_frag;
+ __u8 m_i_fsize;
+ __u16 m_pad1;
+ __u32 m_i_reserved2[2];
+ } masix2;
+ } osd2;
+};
+
+#define i_size_high i_dir_acl
+
+#ifdef __linux__
+#define i_reserved1 osd1.linux1.l_i_reserved1
+#define i_frag osd2.linux2.l_i_frag
+#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
+#define i_reserved2 osd2.linux2.l_i_reserved2
+#endif
+
+#ifdef __hurd__
+#define i_translator osd1.hurd1.h_i_translator
+#define i_frag osd2.hurd2.h_i_frag;
+#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_uid_high osd2.hurd2.h_i_uid_high
+#define i_gid_high osd2.hurd2.h_i_gid_high
+#define i_author osd2.hurd2.h_i_author
+#endif
+
+#ifdef __masix__
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+#endif
+
+#define EXT2_VALID_FS 0x0001
+#define EXT2_ERROR_FS 0x0002
+
+#define EXT2_MOUNT_CHECK 0x000001
+#define EXT2_MOUNT_OLDALLOC 0x000002
+#define EXT2_MOUNT_GRPID 0x000004
+#define EXT2_MOUNT_DEBUG 0x000008
+#define EXT2_MOUNT_ERRORS_CONT 0x000010
+#define EXT2_MOUNT_ERRORS_RO 0x000020
+#define EXT2_MOUNT_ERRORS_PANIC 0x000040
+#define EXT2_MOUNT_MINIX_DF 0x000080
+#define EXT2_MOUNT_NOBH 0x000100
+#define EXT2_MOUNT_NO_UID32 0x000200
+#define EXT2_MOUNT_XATTR_USER 0x004000
+#define EXT2_MOUNT_POSIX_ACL 0x008000
+#define EXT2_MOUNT_XIP 0x010000
+#define EXT2_MOUNT_USRQUOTA 0x020000
+#define EXT2_MOUNT_GRPQUOTA 0x040000
+
+#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
+#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_##opt)
+
+#define EXT2_DFL_MAX_MNT_COUNT 20
+#define EXT2_DFL_CHECKINTERVAL 0
+
+#define EXT2_ERRORS_CONTINUE 1
+#define EXT2_ERRORS_RO 2
+#define EXT2_ERRORS_PANIC 3
+#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
+
+struct ext2_super_block {
+ __le32 s_inodes_count;
+ __le32 s_blocks_count;
+ __le32 s_r_blocks_count;
+ __le32 s_free_blocks_count;
+ __le32 s_free_inodes_count;
+ __le32 s_first_data_block;
+ __le32 s_log_block_size;
+ __le32 s_log_frag_size;
+ __le32 s_blocks_per_group;
+ __le32 s_frags_per_group;
+ __le32 s_inodes_per_group;
+ __le32 s_mtime;
+ __le32 s_wtime;
+ __le16 s_mnt_count;
+ __le16 s_max_mnt_count;
+ __le16 s_magic;
+ __le16 s_state;
+ __le16 s_errors;
+ __le16 s_minor_rev_level;
+ __le32 s_lastcheck;
+ __le32 s_checkinterval;
+ __le32 s_creator_os;
+ __le32 s_rev_level;
+ __le16 s_def_resuid;
+ __le16 s_def_resgid;
+
+ __le32 s_first_ino;
+ __le16 s_inode_size;
+ __le16 s_block_group_nr;
+ __le32 s_feature_compat;
+ __le32 s_feature_incompat;
+ __le32 s_feature_ro_compat;
+ __u8 s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ __le32 s_algorithm_usage_bitmap;
+
+ __u8 s_prealloc_blocks;
+ __u8 s_prealloc_dir_blocks;
+ __u16 s_padding1;
+
+ __u8 s_journal_uuid[16];
+ __u32 s_journal_inum;
+ __u32 s_journal_dev;
+ __u32 s_last_orphan;
+ __u32 s_hash_seed[4];
+ __u8 s_def_hash_version;
+ __u8 s_reserved_char_pad;
+ __u16 s_reserved_word_pad;
+ __le32 s_default_mount_opts;
+ __le32 s_first_meta_bg;
+ __u32 s_reserved[190];
+};
+
+#define EXT2_OS_LINUX 0
+#define EXT2_OS_HURD 1
+#define EXT2_OS_MASIX 2
+#define EXT2_OS_FREEBSD 3
+#define EXT2_OS_LITES 4
+
+#define EXT2_GOOD_OLD_REV 0
+#define EXT2_DYNAMIC_REV 1
+
+#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
+#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
+
+#define EXT2_GOOD_OLD_INODE_SIZE 128
+
+#define EXT2_HAS_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
+#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
+#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) ( EXT2_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
+#define EXT2_SET_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
+#define EXT2_SET_RO_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
+#define EXT2_SET_INCOMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
+#define EXT2_CLEAR_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
+#define EXT2_CLEAR_RO_COMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
+#define EXT2_CLEAR_INCOMPAT_FEATURE(sb,mask) EXT2_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
+
+#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
+#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
+#define EXT2_FEATURE_COMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+#define EXT2_FEATURE_RO_COMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
+#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
+#define EXT2_FEATURE_INCOMPAT_ANY 0xffffffff
+
+#define EXT2_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
+#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| EXT2_FEATURE_INCOMPAT_META_BG)
+#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT2_FEATURE_RO_COMPAT_LARGE_FILE| EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
+#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT2_FEATURE_RO_COMPAT_SUPP
+#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED ~EXT2_FEATURE_INCOMPAT_SUPP
+
+#define EXT2_DEF_RESUID 0
+#define EXT2_DEF_RESGID 0
+
+#define EXT2_DEFM_DEBUG 0x0001
+#define EXT2_DEFM_BSDGROUPS 0x0002
+#define EXT2_DEFM_XATTR_USER 0x0004
+#define EXT2_DEFM_ACL 0x0008
+#define EXT2_DEFM_UID16 0x0010
+
+#define EXT3_DEFM_JMODE 0x0060
+#define EXT3_DEFM_JMODE_DATA 0x0020
+#define EXT3_DEFM_JMODE_ORDERED 0x0040
+#define EXT3_DEFM_JMODE_WBACK 0x0060
+
+#define EXT2_NAME_LEN 255
+
+struct ext2_dir_entry {
+ __le32 inode;
+ __le16 rec_len;
+ __le16 name_len;
+ char name[EXT2_NAME_LEN];
+};
+
+struct ext2_dir_entry_2 {
+ __le32 inode;
+ __le16 rec_len;
+ __u8 name_len;
+ __u8 file_type;
+ char name[EXT2_NAME_LEN];
+};
+
+enum {
+ EXT2_FT_UNKNOWN,
+ EXT2_FT_REG_FILE,
+ EXT2_FT_DIR,
+ EXT2_FT_CHRDEV,
+ EXT2_FT_BLKDEV,
+ EXT2_FT_FIFO,
+ EXT2_FT_SOCK,
+ EXT2_FT_SYMLINK,
+ EXT2_FT_MAX
+};
+
+#define EXT2_DIR_PAD 4
+#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
+#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & ~EXT2_DIR_ROUND)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ext3_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/ext3_fs.h
new file mode 100644
index 0000000..8016fd1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ext3_fs.h
@@ -0,0 +1,448 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_EXT3_FS_H
+#define _LINUX_EXT3_FS_H
+
+#include <linux/types.h>
+
+#undef EXT3FS_DEBUG
+
+#define EXT3_DEFAULT_RESERVE_BLOCKS 8
+
+#define EXT3_MAX_RESERVE_BLOCKS 1027
+#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED 0
+
+#define CONFIG_EXT3_INDEX
+
+#ifdef EXT3FS_DEBUG
+#define ext3_debug(f, a...) do { printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", __FILE__, __LINE__, __FUNCTION__); printk (KERN_DEBUG f, ## a); } while (0)
+#else
+#define ext3_debug(f, a...) do {} while (0)
+#endif
+
+#define EXT3_BAD_INO 1
+#define EXT3_ROOT_INO 2
+#define EXT3_BOOT_LOADER_INO 5
+#define EXT3_UNDEL_DIR_INO 6
+#define EXT3_RESIZE_INO 7
+#define EXT3_JOURNAL_INO 8
+
+#define EXT3_GOOD_OLD_FIRST_INO 11
+
+#define EXT3_SUPER_MAGIC 0xEF53
+
+#define EXT3_LINK_MAX 32000
+
+#define EXT3_MIN_BLOCK_SIZE 1024
+#define EXT3_MAX_BLOCK_SIZE 4096
+#define EXT3_MIN_BLOCK_LOG_SIZE 10
+#define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
+#define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+#define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? EXT3_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
+#define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? EXT3_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
+
+#define EXT3_MIN_FRAG_SIZE 1024
+#define EXT3_MAX_FRAG_SIZE 4096
+#define EXT3_MIN_FRAG_LOG_SIZE 10
+#define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size)
+#define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s))
+
+struct ext3_group_desc
+{
+ __le32 bg_block_bitmap;
+ __le32 bg_inode_bitmap;
+ __le32 bg_inode_table;
+ __le16 bg_free_blocks_count;
+ __le16 bg_free_inodes_count;
+ __le16 bg_used_dirs_count;
+ __u16 bg_pad;
+ __le32 bg_reserved[3];
+};
+
+#define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
+#define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc))
+#define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
+
+#define EXT3_NDIR_BLOCKS 12
+#define EXT3_IND_BLOCK EXT3_NDIR_BLOCKS
+#define EXT3_DIND_BLOCK (EXT3_IND_BLOCK + 1)
+#define EXT3_TIND_BLOCK (EXT3_DIND_BLOCK + 1)
+#define EXT3_N_BLOCKS (EXT3_TIND_BLOCK + 1)
+
+#define EXT3_SECRM_FL 0x00000001
+#define EXT3_UNRM_FL 0x00000002
+#define EXT3_COMPR_FL 0x00000004
+#define EXT3_SYNC_FL 0x00000008
+#define EXT3_IMMUTABLE_FL 0x00000010
+#define EXT3_APPEND_FL 0x00000020
+#define EXT3_NODUMP_FL 0x00000040
+#define EXT3_NOATIME_FL 0x00000080
+
+#define EXT3_DIRTY_FL 0x00000100
+#define EXT3_COMPRBLK_FL 0x00000200
+#define EXT3_NOCOMPR_FL 0x00000400
+#define EXT3_ECOMPR_FL 0x00000800
+
+#define EXT3_INDEX_FL 0x00001000
+#define EXT3_IMAGIC_FL 0x00002000
+#define EXT3_JOURNAL_DATA_FL 0x00004000
+#define EXT3_NOTAIL_FL 0x00008000
+#define EXT3_DIRSYNC_FL 0x00010000
+#define EXT3_TOPDIR_FL 0x00020000
+#define EXT3_RESERVED_FL 0x80000000
+
+#define EXT3_FL_USER_VISIBLE 0x0003DFFF
+#define EXT3_FL_USER_MODIFIABLE 0x000380FF
+
+#define EXT3_STATE_JDATA 0x00000001
+#define EXT3_STATE_NEW 0x00000002
+#define EXT3_STATE_XATTR 0x00000004
+
+struct ext3_new_group_input {
+ __u32 group;
+ __u32 block_bitmap;
+ __u32 inode_bitmap;
+ __u32 inode_table;
+ __u32 blocks_count;
+ __u16 reserved_blocks;
+ __u16 unused;
+};
+
+struct ext3_new_group_data {
+ __u32 group;
+ __u32 block_bitmap;
+ __u32 inode_bitmap;
+ __u32 inode_table;
+ __u32 blocks_count;
+ __u16 reserved_blocks;
+ __u16 unused;
+ __u32 free_blocks_count;
+};
+
+#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
+#define EXT3_IOC_SETFLAGS _IOW('f', 2, long)
+#define EXT3_IOC_GETVERSION _IOR('f', 3, long)
+#define EXT3_IOC_SETVERSION _IOW('f', 4, long)
+#define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
+#define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input)
+#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long)
+#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long)
+#define EXT3_IOC_GETRSVSZ _IOR('f', 5, long)
+#define EXT3_IOC_SETRSVSZ _IOW('f', 6, long)
+
+struct ext3_mount_options {
+ unsigned long s_mount_opt;
+ uid_t s_resuid;
+ gid_t s_resgid;
+ unsigned long s_commit_interval;
+};
+
+struct ext3_inode {
+ __le16 i_mode;
+ __le16 i_uid;
+ __le32 i_size;
+ __le32 i_atime;
+ __le32 i_ctime;
+ __le32 i_mtime;
+ __le32 i_dtime;
+ __le16 i_gid;
+ __le16 i_links_count;
+ __le32 i_blocks;
+ __le32 i_flags;
+ union {
+ struct {
+ __u32 l_i_reserved1;
+ } linux1;
+ struct {
+ __u32 h_i_translator;
+ } hurd1;
+ struct {
+ __u32 m_i_reserved1;
+ } masix1;
+ } osd1;
+ __le32 i_block[EXT3_N_BLOCKS];
+ __le32 i_generation;
+ __le32 i_file_acl;
+ __le32 i_dir_acl;
+ __le32 i_faddr;
+ union {
+ struct {
+ __u8 l_i_frag;
+ __u8 l_i_fsize;
+ __u16 i_pad1;
+ __le16 l_i_uid_high;
+ __le16 l_i_gid_high;
+ __u32 l_i_reserved2;
+ } linux2;
+ struct {
+ __u8 h_i_frag;
+ __u8 h_i_fsize;
+ __u16 h_i_mode_high;
+ __u16 h_i_uid_high;
+ __u16 h_i_gid_high;
+ __u32 h_i_author;
+ } hurd2;
+ struct {
+ __u8 m_i_frag;
+ __u8 m_i_fsize;
+ __u16 m_pad1;
+ __u32 m_i_reserved2[2];
+ } masix2;
+ } osd2;
+ __le16 i_extra_isize;
+ __le16 i_pad1;
+};
+
+#define i_size_high i_dir_acl
+
+#ifdef __linux__
+#define i_reserved1 osd1.linux1.l_i_reserved1
+#define i_frag osd2.linux2.l_i_frag
+#define i_fsize osd2.linux2.l_i_fsize
+#define i_uid_low i_uid
+#define i_gid_low i_gid
+#define i_uid_high osd2.linux2.l_i_uid_high
+#define i_gid_high osd2.linux2.l_i_gid_high
+#define i_reserved2 osd2.linux2.l_i_reserved2
+
+#elif defined(__GNU__)
+
+#define i_translator osd1.hurd1.h_i_translator
+#define i_frag osd2.hurd2.h_i_frag;
+#define i_fsize osd2.hurd2.h_i_fsize;
+#define i_uid_high osd2.hurd2.h_i_uid_high
+#define i_gid_high osd2.hurd2.h_i_gid_high
+#define i_author osd2.hurd2.h_i_author
+
+#elif defined(__masix__)
+
+#define i_reserved1 osd1.masix1.m_i_reserved1
+#define i_frag osd2.masix2.m_i_frag
+#define i_fsize osd2.masix2.m_i_fsize
+#define i_reserved2 osd2.masix2.m_i_reserved2
+
+#endif
+
+#define EXT3_VALID_FS 0x0001
+#define EXT3_ERROR_FS 0x0002
+#define EXT3_ORPHAN_FS 0x0004
+
+#define EXT3_MOUNT_CHECK 0x00001
+#define EXT3_MOUNT_OLDALLOC 0x00002
+#define EXT3_MOUNT_GRPID 0x00004
+#define EXT3_MOUNT_DEBUG 0x00008
+#define EXT3_MOUNT_ERRORS_CONT 0x00010
+#define EXT3_MOUNT_ERRORS_RO 0x00020
+#define EXT3_MOUNT_ERRORS_PANIC 0x00040
+#define EXT3_MOUNT_MINIX_DF 0x00080
+#define EXT3_MOUNT_NOLOAD 0x00100
+#define EXT3_MOUNT_ABORT 0x00200
+#define EXT3_MOUNT_DATA_FLAGS 0x00C00
+#define EXT3_MOUNT_JOURNAL_DATA 0x00400
+#define EXT3_MOUNT_ORDERED_DATA 0x00800
+#define EXT3_MOUNT_WRITEBACK_DATA 0x00C00
+#define EXT3_MOUNT_UPDATE_JOURNAL 0x01000
+#define EXT3_MOUNT_NO_UID32 0x02000
+#define EXT3_MOUNT_XATTR_USER 0x04000
+#define EXT3_MOUNT_POSIX_ACL 0x08000
+#define EXT3_MOUNT_RESERVATION 0x10000
+#define EXT3_MOUNT_BARRIER 0x20000
+#define EXT3_MOUNT_NOBH 0x40000
+#define EXT3_MOUNT_QUOTA 0x80000
+#define EXT3_MOUNT_USRQUOTA 0x100000
+#define EXT3_MOUNT_GRPQUOTA 0x200000
+
+#ifndef _LINUX_EXT2_FS_H
+#define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt
+#define set_opt(o, opt) o |= EXT3_MOUNT_##opt
+#define test_opt(sb, opt) (EXT3_SB(sb)->s_mount_opt & EXT3_MOUNT_##opt)
+#else
+#define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD
+#define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT
+#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS
+#endif
+
+#define ext3_set_bit ext2_set_bit
+#define ext3_set_bit_atomic ext2_set_bit_atomic
+#define ext3_clear_bit ext2_clear_bit
+#define ext3_clear_bit_atomic ext2_clear_bit_atomic
+#define ext3_test_bit ext2_test_bit
+#define ext3_find_first_zero_bit ext2_find_first_zero_bit
+#define ext3_find_next_zero_bit ext2_find_next_zero_bit
+
+#define EXT3_DFL_MAX_MNT_COUNT 20
+#define EXT3_DFL_CHECKINTERVAL 0
+
+#define EXT3_ERRORS_CONTINUE 1
+#define EXT3_ERRORS_RO 2
+#define EXT3_ERRORS_PANIC 3
+#define EXT3_ERRORS_DEFAULT EXT3_ERRORS_CONTINUE
+
+struct ext3_super_block {
+ __le32 s_inodes_count;
+ __le32 s_blocks_count;
+ __le32 s_r_blocks_count;
+ __le32 s_free_blocks_count;
+ __le32 s_free_inodes_count;
+ __le32 s_first_data_block;
+ __le32 s_log_block_size;
+ __le32 s_log_frag_size;
+ __le32 s_blocks_per_group;
+ __le32 s_frags_per_group;
+ __le32 s_inodes_per_group;
+ __le32 s_mtime;
+ __le32 s_wtime;
+ __le16 s_mnt_count;
+ __le16 s_max_mnt_count;
+ __le16 s_magic;
+ __le16 s_state;
+ __le16 s_errors;
+ __le16 s_minor_rev_level;
+ __le32 s_lastcheck;
+ __le32 s_checkinterval;
+ __le32 s_creator_os;
+ __le32 s_rev_level;
+ __le16 s_def_resuid;
+ __le16 s_def_resgid;
+
+ __le32 s_first_ino;
+ __le16 s_inode_size;
+ __le16 s_block_group_nr;
+ __le32 s_feature_compat;
+ __le32 s_feature_incompat;
+ __le32 s_feature_ro_compat;
+ __u8 s_uuid[16];
+ char s_volume_name[16];
+ char s_last_mounted[64];
+ __le32 s_algorithm_usage_bitmap;
+
+ __u8 s_prealloc_blocks;
+ __u8 s_prealloc_dir_blocks;
+ __u16 s_reserved_gdt_blocks;
+
+ __u8 s_journal_uuid[16];
+ __le32 s_journal_inum;
+ __le32 s_journal_dev;
+ __le32 s_last_orphan;
+ __le32 s_hash_seed[4];
+ __u8 s_def_hash_version;
+ __u8 s_reserved_char_pad;
+ __u16 s_reserved_word_pad;
+ __le32 s_default_mount_opts;
+ __le32 s_first_meta_bg;
+ __u32 s_reserved[190];
+};
+
+#define EXT3_SB(sb) (sb)
+
+#define NEXT_ORPHAN(inode) EXT3_I(inode)->i_dtime
+
+#define EXT3_OS_LINUX 0
+#define EXT3_OS_HURD 1
+#define EXT3_OS_MASIX 2
+#define EXT3_OS_FREEBSD 3
+#define EXT3_OS_LITES 4
+
+#define EXT3_GOOD_OLD_REV 0
+#define EXT3_DYNAMIC_REV 1
+
+#define EXT3_CURRENT_REV EXT3_GOOD_OLD_REV
+#define EXT3_MAX_SUPP_REV EXT3_DYNAMIC_REV
+
+#define EXT3_GOOD_OLD_INODE_SIZE 128
+
+#define EXT3_HAS_COMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
+#define EXT3_HAS_RO_COMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
+#define EXT3_HAS_INCOMPAT_FEATURE(sb,mask) ( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
+#define EXT3_SET_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
+#define EXT3_SET_RO_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
+#define EXT3_SET_INCOMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
+#define EXT3_CLEAR_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
+#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
+#define EXT3_CLEAR_INCOMPAT_FEATURE(sb,mask) EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
+
+#define EXT3_FEATURE_COMPAT_DIR_PREALLOC 0x0001
+#define EXT3_FEATURE_COMPAT_IMAGIC_INODES 0x0002
+#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
+#define EXT3_FEATURE_COMPAT_EXT_ATTR 0x0008
+#define EXT3_FEATURE_COMPAT_RESIZE_INODE 0x0010
+#define EXT3_FEATURE_COMPAT_DIR_INDEX 0x0020
+
+#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
+#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+
+#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
+#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
+#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
+#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
+#define EXT3_FEATURE_INCOMPAT_META_BG 0x0010
+
+#define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
+#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| EXT3_FEATURE_INCOMPAT_RECOVER| EXT3_FEATURE_INCOMPAT_META_BG)
+#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| EXT3_FEATURE_RO_COMPAT_LARGE_FILE| EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
+
+#define EXT3_DEF_RESUID 0
+#define EXT3_DEF_RESGID 0
+
+#define EXT3_DEFM_DEBUG 0x0001
+#define EXT3_DEFM_BSDGROUPS 0x0002
+#define EXT3_DEFM_XATTR_USER 0x0004
+#define EXT3_DEFM_ACL 0x0008
+#define EXT3_DEFM_UID16 0x0010
+#define EXT3_DEFM_JMODE 0x0060
+#define EXT3_DEFM_JMODE_DATA 0x0020
+#define EXT3_DEFM_JMODE_ORDERED 0x0040
+#define EXT3_DEFM_JMODE_WBACK 0x0060
+
+#define EXT3_NAME_LEN 255
+
+struct ext3_dir_entry {
+ __le32 inode;
+ __le16 rec_len;
+ __le16 name_len;
+ char name[EXT3_NAME_LEN];
+};
+
+struct ext3_dir_entry_2 {
+ __le32 inode;
+ __le16 rec_len;
+ __u8 name_len;
+ __u8 file_type;
+ char name[EXT3_NAME_LEN];
+};
+
+#define EXT3_FT_UNKNOWN 0
+#define EXT3_FT_REG_FILE 1
+#define EXT3_FT_DIR 2
+#define EXT3_FT_CHRDEV 3
+#define EXT3_FT_BLKDEV 4
+#define EXT3_FT_FIFO 5
+#define EXT3_FT_SOCK 6
+#define EXT3_FT_SYMLINK 7
+
+#define EXT3_FT_MAX 8
+
+#define EXT3_DIR_PAD 4
+#define EXT3_DIR_ROUND (EXT3_DIR_PAD - 1)
+#define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & ~EXT3_DIR_ROUND)
+
+#define is_dx(dir) 0
+#define EXT3_DIR_LINK_MAX(dir) ((dir)->i_nlink >= EXT3_LINK_MAX)
+#define EXT3_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2)
+
+#define DX_HASH_LEGACY 0
+#define DX_HASH_HALF_MD4 1
+#define DX_HASH_TEA 2
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/fadvise.h b/6/platforms/android-3/arch-x86/usr/include/linux/fadvise.h
new file mode 100644
index 0000000..25a0a4c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/fadvise.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef FADVISE_H_INCLUDED
+#define FADVISE_H_INCLUDED
+
+#define POSIX_FADV_NORMAL 0
+#define POSIX_FADV_RANDOM 1
+#define POSIX_FADV_SEQUENTIAL 2
+#define POSIX_FADV_WILLNEED 3
+
+#ifdef __s390x__
+#define POSIX_FADV_DONTNEED 6
+#define POSIX_FADV_NOREUSE 7
+#else
+#define POSIX_FADV_DONTNEED 4
+#define POSIX_FADV_NOREUSE 5
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/fb.h b/6/platforms/android-3/arch-x86/usr/include/linux/fb.h
new file mode 100644
index 0000000..336c439
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/fb.h
@@ -0,0 +1,347 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FB_H
+#define _LINUX_FB_H
+
+#include <asm/types.h>
+
+#define FB_MAJOR 29
+#define FB_MAX 32
+
+#define FBIOGET_VSCREENINFO 0x4600
+#define FBIOPUT_VSCREENINFO 0x4601
+#define FBIOGET_FSCREENINFO 0x4602
+#define FBIOGETCMAP 0x4604
+#define FBIOPUTCMAP 0x4605
+#define FBIOPAN_DISPLAY 0x4606
+#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor)
+
+#define FBIOGET_CON2FBMAP 0x460F
+#define FBIOPUT_CON2FBMAP 0x4610
+#define FBIOBLANK 0x4611
+#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
+#define FBIO_ALLOC 0x4613
+#define FBIO_FREE 0x4614
+#define FBIOGET_GLYPH 0x4615
+#define FBIOGET_HWCINFO 0x4616
+#define FBIOPUT_MODEINFO 0x4617
+#define FBIOGET_DISPINFO 0x4618
+
+#define FB_TYPE_PACKED_PIXELS 0
+#define FB_TYPE_PLANES 1
+#define FB_TYPE_INTERLEAVED_PLANES 2
+#define FB_TYPE_TEXT 3
+#define FB_TYPE_VGA_PLANES 4
+
+#define FB_AUX_TEXT_MDA 0
+#define FB_AUX_TEXT_CGA 1
+#define FB_AUX_TEXT_S3_MMIO 2
+#define FB_AUX_TEXT_MGA_STEP16 3
+#define FB_AUX_TEXT_MGA_STEP8 4
+
+#define FB_AUX_VGA_PLANES_VGA4 0
+#define FB_AUX_VGA_PLANES_CFB4 1
+#define FB_AUX_VGA_PLANES_CFB8 2
+
+#define FB_VISUAL_MONO01 0
+#define FB_VISUAL_MONO10 1
+#define FB_VISUAL_TRUECOLOR 2
+#define FB_VISUAL_PSEUDOCOLOR 3
+#define FB_VISUAL_DIRECTCOLOR 4
+#define FB_VISUAL_STATIC_PSEUDOCOLOR 5
+
+#define FB_ACCEL_NONE 0
+#define FB_ACCEL_ATARIBLITT 1
+#define FB_ACCEL_AMIGABLITT 2
+#define FB_ACCEL_S3_TRIO64 3
+#define FB_ACCEL_NCR_77C32BLT 4
+#define FB_ACCEL_S3_VIRGE 5
+#define FB_ACCEL_ATI_MACH64GX 6
+#define FB_ACCEL_DEC_TGA 7
+#define FB_ACCEL_ATI_MACH64CT 8
+#define FB_ACCEL_ATI_MACH64VT 9
+#define FB_ACCEL_ATI_MACH64GT 10
+#define FB_ACCEL_SUN_CREATOR 11
+#define FB_ACCEL_SUN_CGSIX 12
+#define FB_ACCEL_SUN_LEO 13
+#define FB_ACCEL_IMS_TWINTURBO 14
+#define FB_ACCEL_3DLABS_PERMEDIA2 15
+#define FB_ACCEL_MATROX_MGA2064W 16
+#define FB_ACCEL_MATROX_MGA1064SG 17
+#define FB_ACCEL_MATROX_MGA2164W 18
+#define FB_ACCEL_MATROX_MGA2164W_AGP 19
+#define FB_ACCEL_MATROX_MGAG100 20
+#define FB_ACCEL_MATROX_MGAG200 21
+#define FB_ACCEL_SUN_CG14 22
+#define FB_ACCEL_SUN_BWTWO 23
+#define FB_ACCEL_SUN_CGTHREE 24
+#define FB_ACCEL_SUN_TCX 25
+#define FB_ACCEL_MATROX_MGAG400 26
+#define FB_ACCEL_NV3 27
+#define FB_ACCEL_NV4 28
+#define FB_ACCEL_NV5 29
+#define FB_ACCEL_CT_6555x 30
+#define FB_ACCEL_3DFX_BANSHEE 31
+#define FB_ACCEL_ATI_RAGE128 32
+#define FB_ACCEL_IGS_CYBER2000 33
+#define FB_ACCEL_IGS_CYBER2010 34
+#define FB_ACCEL_IGS_CYBER5000 35
+#define FB_ACCEL_SIS_GLAMOUR 36
+#define FB_ACCEL_3DLABS_PERMEDIA3 37
+#define FB_ACCEL_ATI_RADEON 38
+#define FB_ACCEL_I810 39
+#define FB_ACCEL_SIS_GLAMOUR_2 40
+#define FB_ACCEL_SIS_XABRE 41
+#define FB_ACCEL_I830 42
+#define FB_ACCEL_NV_10 43
+#define FB_ACCEL_NV_20 44
+#define FB_ACCEL_NV_30 45
+#define FB_ACCEL_NV_40 46
+#define FB_ACCEL_XGI_VOLARI_V 47
+#define FB_ACCEL_XGI_VOLARI_Z 48
+#define FB_ACCEL_OMAP1610 49
+#define FB_ACCEL_NEOMAGIC_NM2070 90
+#define FB_ACCEL_NEOMAGIC_NM2090 91
+#define FB_ACCEL_NEOMAGIC_NM2093 92
+#define FB_ACCEL_NEOMAGIC_NM2097 93
+#define FB_ACCEL_NEOMAGIC_NM2160 94
+#define FB_ACCEL_NEOMAGIC_NM2200 95
+#define FB_ACCEL_NEOMAGIC_NM2230 96
+#define FB_ACCEL_NEOMAGIC_NM2360 97
+#define FB_ACCEL_NEOMAGIC_NM2380 98
+
+#define FB_ACCEL_SAVAGE4 0x80
+#define FB_ACCEL_SAVAGE3D 0x81
+#define FB_ACCEL_SAVAGE3D_MV 0x82
+#define FB_ACCEL_SAVAGE2000 0x83
+#define FB_ACCEL_SAVAGE_MX_MV 0x84
+#define FB_ACCEL_SAVAGE_MX 0x85
+#define FB_ACCEL_SAVAGE_IX_MV 0x86
+#define FB_ACCEL_SAVAGE_IX 0x87
+#define FB_ACCEL_PROSAVAGE_PM 0x88
+#define FB_ACCEL_PROSAVAGE_KM 0x89
+#define FB_ACCEL_S3TWISTER_P 0x8a
+#define FB_ACCEL_S3TWISTER_K 0x8b
+#define FB_ACCEL_SUPERSAVAGE 0x8c
+#define FB_ACCEL_PROSAVAGE_DDR 0x8d
+#define FB_ACCEL_PROSAVAGE_DDRK 0x8e
+
+struct fb_fix_screeninfo {
+ char id[16];
+ unsigned long smem_start;
+
+ __u32 smem_len;
+ __u32 type;
+ __u32 type_aux;
+ __u32 visual;
+ __u16 xpanstep;
+ __u16 ypanstep;
+ __u16 ywrapstep;
+ __u32 line_length;
+ unsigned long mmio_start;
+
+ __u32 mmio_len;
+ __u32 accel;
+
+ __u16 reserved[3];
+};
+
+struct fb_bitfield {
+ __u32 offset;
+ __u32 length;
+ __u32 msb_right;
+
+};
+
+#define FB_NONSTD_HAM 1
+
+#define FB_ACTIVATE_NOW 0
+#define FB_ACTIVATE_NXTOPEN 1
+#define FB_ACTIVATE_TEST 2
+#define FB_ACTIVATE_MASK 15
+
+#define FB_ACTIVATE_VBL 16
+#define FB_CHANGE_CMAP_VBL 32
+#define FB_ACTIVATE_ALL 64
+#define FB_ACTIVATE_FORCE 128
+#define FB_ACTIVATE_INV_MODE 256
+
+#define FB_ACCELF_TEXT 1
+
+#define FB_SYNC_HOR_HIGH_ACT 1
+#define FB_SYNC_VERT_HIGH_ACT 2
+#define FB_SYNC_EXT 4
+#define FB_SYNC_COMP_HIGH_ACT 8
+#define FB_SYNC_BROADCAST 16
+
+#define FB_SYNC_ON_GREEN 32
+
+#define FB_VMODE_NONINTERLACED 0
+#define FB_VMODE_INTERLACED 1
+#define FB_VMODE_DOUBLE 2
+#define FB_VMODE_MASK 255
+
+#define FB_VMODE_YWRAP 256
+#define FB_VMODE_SMOOTH_XPAN 512
+#define FB_VMODE_CONUPDATE 512
+
+#define FB_ROTATE_UR 0
+#define FB_ROTATE_CW 1
+#define FB_ROTATE_UD 2
+#define FB_ROTATE_CCW 3
+
+#define PICOS2KHZ(a) (1000000000UL/(a))
+#define KHZ2PICOS(a) (1000000000UL/(a))
+
+struct fb_var_screeninfo {
+ __u32 xres;
+ __u32 yres;
+ __u32 xres_virtual;
+ __u32 yres_virtual;
+ __u32 xoffset;
+ __u32 yoffset;
+
+ __u32 bits_per_pixel;
+ __u32 grayscale;
+
+ struct fb_bitfield red;
+ struct fb_bitfield green;
+ struct fb_bitfield blue;
+ struct fb_bitfield transp;
+
+ __u32 nonstd;
+
+ __u32 activate;
+
+ __u32 height;
+ __u32 width;
+
+ __u32 accel_flags;
+
+ __u32 pixclock;
+ __u32 left_margin;
+ __u32 right_margin;
+ __u32 upper_margin;
+ __u32 lower_margin;
+ __u32 hsync_len;
+ __u32 vsync_len;
+ __u32 sync;
+ __u32 vmode;
+ __u32 rotate;
+ __u32 reserved[5];
+};
+
+struct fb_cmap {
+ __u32 start;
+ __u32 len;
+ __u16 *red;
+ __u16 *green;
+ __u16 *blue;
+ __u16 *transp;
+};
+
+struct fb_con2fbmap {
+ __u32 console;
+ __u32 framebuffer;
+};
+
+#define VESA_NO_BLANKING 0
+#define VESA_VSYNC_SUSPEND 1
+#define VESA_HSYNC_SUSPEND 2
+#define VESA_POWERDOWN 3
+
+enum {
+
+ FB_BLANK_UNBLANK = VESA_NO_BLANKING,
+
+ FB_BLANK_NORMAL = VESA_NO_BLANKING + 1,
+
+ FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,
+
+ FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,
+
+ FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1
+};
+
+#define FB_VBLANK_VBLANKING 0x001
+#define FB_VBLANK_HBLANKING 0x002
+#define FB_VBLANK_HAVE_VBLANK 0x004
+#define FB_VBLANK_HAVE_HBLANK 0x008
+#define FB_VBLANK_HAVE_COUNT 0x010
+#define FB_VBLANK_HAVE_VCOUNT 0x020
+#define FB_VBLANK_HAVE_HCOUNT 0x040
+#define FB_VBLANK_VSYNCING 0x080
+#define FB_VBLANK_HAVE_VSYNC 0x100
+
+struct fb_vblank {
+ __u32 flags;
+ __u32 count;
+ __u32 vcount;
+ __u32 hcount;
+ __u32 reserved[4];
+};
+
+#define ROP_COPY 0
+#define ROP_XOR 1
+
+struct fb_copyarea {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 sx;
+ __u32 sy;
+};
+
+struct fb_fillrect {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 color;
+ __u32 rop;
+};
+
+struct fb_image {
+ __u32 dx;
+ __u32 dy;
+ __u32 width;
+ __u32 height;
+ __u32 fg_color;
+ __u32 bg_color;
+ __u8 depth;
+ const char *data;
+ struct fb_cmap cmap;
+};
+
+#define FB_CUR_SETIMAGE 0x01
+#define FB_CUR_SETPOS 0x02
+#define FB_CUR_SETHOT 0x04
+#define FB_CUR_SETCMAP 0x08
+#define FB_CUR_SETSHAPE 0x10
+#define FB_CUR_SETSIZE 0x20
+#define FB_CUR_SETALL 0xFF
+
+struct fbcurpos {
+ __u16 x, y;
+};
+
+struct fb_cursor {
+ __u16 set;
+ __u16 enable;
+ __u16 rop;
+ const char *mask;
+ struct fbcurpos hot;
+ struct fb_image image;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/fcntl.h b/6/platforms/android-3/arch-x86/usr/include/linux/fcntl.h
new file mode 100644
index 0000000..323e87a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/fcntl.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FCNTL_H
+#define _LINUX_FCNTL_H
+
+#include <asm/fcntl.h>
+
+#define F_SETLEASE (F_LINUX_SPECIFIC_BASE+0)
+#define F_GETLEASE (F_LINUX_SPECIFIC_BASE+1)
+
+#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
+
+#define DN_ACCESS 0x00000001
+#define DN_MODIFY 0x00000002
+#define DN_CREATE 0x00000004
+#define DN_DELETE 0x00000008
+#define DN_RENAME 0x00000010
+#define DN_ATTRIB 0x00000020
+#define DN_MULTISHOT 0x80000000
+
+#define AT_FDCWD -100
+#define AT_SYMLINK_NOFOLLOW 0x100
+#define AT_REMOVEDIR 0x200
+#define AT_SYMLINK_FOLLOW 0x400
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/fd.h b/6/platforms/android-3/arch-x86/usr/include/linux/fd.h
new file mode 100644
index 0000000..f3bedd1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/fd.h
@@ -0,0 +1,258 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FD_H
+#define _LINUX_FD_H
+
+#include <linux/ioctl.h>
+#include <linux/compiler.h>
+
+struct floppy_struct {
+ unsigned int size,
+ sect,
+ head,
+ track,
+ stretch;
+#define FD_STRETCH 1
+#define FD_SWAPSIDES 2
+#define FD_ZEROBASED 4
+
+ unsigned char gap,
+
+ rate,
+#define FD_2M 0x4
+#define FD_SIZECODEMASK 0x38
+#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
+#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? 512 : 128 << FD_SIZECODE(floppy) )
+#define FD_PERP 0x40
+
+ spec1,
+ fmt_gap;
+ const char * name;
+};
+
+#define FDCLRPRM _IO(2, 0x41)
+
+#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
+#define FDSETMEDIAPRM FDSETPRM
+
+#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
+#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
+#define FDDEFMEDIAPRM FDDEFPRM
+#define FDGETMEDIAPRM FDGETPRM
+
+#define FDMSGON _IO(2,0x45)
+#define FDMSGOFF _IO(2,0x46)
+
+#define FD_FILL_BYTE 0xF6
+
+struct format_descr {
+ unsigned int device,head,track;
+};
+
+#define FDFMTBEG _IO(2,0x47)
+
+#define FDFMTTRK _IOW(2,0x48, struct format_descr)
+
+#define FDFMTEND _IO(2,0x49)
+
+struct floppy_max_errors {
+ unsigned int
+ abort,
+ read_track,
+ reset,
+ recal,
+
+ reporting;
+
+};
+
+#define FDSETEMSGTRESH _IO(2,0x4a)
+
+#define FDFLUSH _IO(2,0x4b)
+
+#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
+#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
+
+typedef char floppy_drive_name[16];
+#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
+
+struct floppy_drive_params {
+ signed char cmos;
+
+ unsigned long max_dtr;
+ unsigned long hlt;
+ unsigned long hut;
+ unsigned long srt;
+
+ unsigned long spinup;
+ unsigned long spindown;
+ unsigned char spindown_offset;
+ unsigned char select_delay;
+ unsigned char rps;
+ unsigned char tracks;
+ unsigned long timeout;
+
+ unsigned char interleave_sect;
+
+ struct floppy_max_errors max_errors;
+
+ char flags;
+
+#define FTD_MSG 0x10
+#define FD_BROKEN_DCL 0x20
+#define FD_DEBUG 0x02
+#define FD_SILENT_DCL_CLEAR 0x4
+#define FD_INVERTED_DCL 0x80
+
+ char read_track;
+
+ short autodetect[8];
+
+ int checkfreq;
+ int native_format;
+};
+
+enum {
+ FD_NEED_TWADDLE_BIT,
+ FD_VERIFY_BIT,
+ FD_DISK_NEWCHANGE_BIT,
+ FD_UNUSED_BIT,
+ FD_DISK_CHANGED_BIT,
+ FD_DISK_WRITABLE_BIT
+};
+
+#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
+#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
+
+struct floppy_drive_struct {
+ unsigned long flags;
+
+#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
+#define FD_VERIFY (1 << FD_VERIFY_BIT)
+#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
+#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
+#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
+
+ unsigned long spinup_date;
+ unsigned long select_date;
+ unsigned long first_read_date;
+ short probed_format;
+ short track;
+ short maxblock;
+ short maxtrack;
+ int generation;
+
+ int keep_data;
+
+ int fd_ref;
+ int fd_device;
+ unsigned long last_checked;
+
+ char *dmabuf;
+ int bufblocks;
+};
+
+#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
+#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
+
+enum reset_mode {
+ FD_RESET_IF_NEEDED,
+ FD_RESET_IF_RAWCMD,
+ FD_RESET_ALWAYS
+};
+#define FDRESET _IO(2, 0x54)
+
+struct floppy_fdc_state {
+ int spec1;
+ int spec2;
+ int dtr;
+ unsigned char version;
+ unsigned char dor;
+ unsigned long address;
+ unsigned int rawcmd:2;
+ unsigned int reset:1;
+ unsigned int need_configure:1;
+ unsigned int perp_mode:2;
+ unsigned int has_fifo:1;
+ unsigned int driver_version;
+#define FD_DRIVER_VERSION 0x100
+
+ unsigned char track[4];
+
+};
+
+#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
+
+struct floppy_write_errors {
+
+ unsigned int write_errors;
+
+ unsigned long first_error_sector;
+ int first_error_generation;
+ unsigned long last_error_sector;
+ int last_error_generation;
+
+ unsigned int badness;
+};
+
+#define FDWERRORCLR _IO(2, 0x56)
+
+#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors)
+
+#define FDHAVEBATCHEDRAWCMD
+
+struct floppy_raw_cmd {
+ unsigned int flags;
+#define FD_RAW_READ 1
+#define FD_RAW_WRITE 2
+#define FD_RAW_NO_MOTOR 4
+#define FD_RAW_DISK_CHANGE 4
+#define FD_RAW_INTR 8
+#define FD_RAW_SPIN 0x10
+#define FD_RAW_NO_MOTOR_AFTER 0x20
+#define FD_RAW_NEED_DISK 0x40
+#define FD_RAW_NEED_SEEK 0x80
+
+#define FD_RAW_MORE 0x100
+#define FD_RAW_STOP_IF_FAILURE 0x200
+#define FD_RAW_STOP_IF_SUCCESS 0x400
+#define FD_RAW_SOFTFAILURE 0x800
+
+#define FD_RAW_FAILURE 0x10000
+#define FD_RAW_HARDFAILURE 0x20000
+
+ void __user *data;
+ char *kernel_data;
+ struct floppy_raw_cmd *next;
+ long length;
+ long phys_length;
+ int buffer_length;
+
+ unsigned char rate;
+ unsigned char cmd_count;
+ unsigned char cmd[16];
+ unsigned char reply_count;
+ unsigned char reply[16];
+ int track;
+ int resultcode;
+
+ int reserved1;
+ int reserved2;
+};
+
+#define FDRAWCMD _IO(2, 0x58)
+
+#define FDTWADDLE _IO(2, 0x59)
+
+#define FDEJECT _IO(2, 0x5a)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/file.h b/6/platforms/android-3/arch-x86/usr/include/linux/file.h
new file mode 100644
index 0000000..87e570b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/file.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_FILE_H
+#define __LINUX_FILE_H
+
+#include <asm/atomic.h>
+#include <linux/posix_types.h>
+#include <linux/compiler.h>
+#include <linux/spinlock.h>
+#include <linux/rcupdate.h>
+#include <linux/types.h>
+
+#define NR_OPEN_DEFAULT BITS_PER_LONG
+
+struct embedded_fd_set {
+ unsigned long fds_bits[1];
+};
+
+#define EMBEDDED_FD_SET_SIZE (BITS_PER_BYTE * sizeof(struct embedded_fd_set))
+
+struct fdtable {
+ unsigned int max_fds;
+ int max_fdset;
+ struct file ** fd;
+ fd_set *close_on_exec;
+ fd_set *open_fds;
+ struct rcu_head rcu;
+ struct files_struct *free_files;
+ struct fdtable *next;
+};
+
+struct files_struct {
+
+ atomic_t count;
+ struct fdtable *fdt;
+ struct fdtable fdtab;
+
+ spinlock_t file_lock ____cacheline_aligned_in_smp;
+ int next_fd;
+ struct embedded_fd_set close_on_exec_init;
+ struct embedded_fd_set open_fds_init;
+ struct file * fd_array[NR_OPEN_DEFAULT];
+};
+
+#define files_fdtable(files) (rcu_dereference((files)->fdt))
+
+struct kmem_cache;
+
+#define fcheck(fd) fcheck_files(current->files, fd)
+
+struct task_struct;
+
+struct files_struct *get_files_struct(struct task_struct *);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/filter.h b/6/platforms/android-3/arch-x86/usr/include/linux/filter.h
new file mode 100644
index 0000000..e858a0f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/filter.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_FILTER_H__
+#define __LINUX_FILTER_H__
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+#define BPF_MAJOR_VERSION 1
+#define BPF_MINOR_VERSION 1
+
+struct sock_filter
+{
+ __u16 code;
+ __u8 jt;
+ __u8 jf;
+ __u32 k;
+};
+
+struct sock_fprog
+{
+ unsigned short len;
+ struct sock_filter __user *filter;
+};
+
+#define BPF_CLASS(code) ((code) & 0x07)
+#define BPF_LD 0x00
+#define BPF_LDX 0x01
+#define BPF_ST 0x02
+#define BPF_STX 0x03
+#define BPF_ALU 0x04
+#define BPF_JMP 0x05
+#define BPF_RET 0x06
+#define BPF_MISC 0x07
+
+#define BPF_SIZE(code) ((code) & 0x18)
+#define BPF_W 0x00
+#define BPF_H 0x08
+#define BPF_B 0x10
+#define BPF_MODE(code) ((code) & 0xe0)
+#define BPF_IMM 0x00
+#define BPF_ABS 0x20
+#define BPF_IND 0x40
+#define BPF_MEM 0x60
+#define BPF_LEN 0x80
+#define BPF_MSH 0xa0
+
+#define BPF_OP(code) ((code) & 0xf0)
+#define BPF_ADD 0x00
+#define BPF_SUB 0x10
+#define BPF_MUL 0x20
+#define BPF_DIV 0x30
+#define BPF_OR 0x40
+#define BPF_AND 0x50
+#define BPF_LSH 0x60
+#define BPF_RSH 0x70
+#define BPF_NEG 0x80
+#define BPF_JA 0x00
+#define BPF_JEQ 0x10
+#define BPF_JGT 0x20
+#define BPF_JGE 0x30
+#define BPF_JSET 0x40
+#define BPF_SRC(code) ((code) & 0x08)
+#define BPF_K 0x00
+#define BPF_X 0x08
+
+#define BPF_RVAL(code) ((code) & 0x18)
+#define BPF_A 0x10
+
+#define BPF_MISCOP(code) ((code) & 0xf8)
+#define BPF_TAX 0x00
+#define BPF_TXA 0x80
+
+#ifndef BPF_MAXINSNS
+#define BPF_MAXINSNS 4096
+#endif
+
+#ifndef BPF_STMT
+#define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k }
+#endif
+#ifndef BPF_JUMP
+#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
+#endif
+
+#define BPF_MEMWORDS 16
+
+#define SKF_AD_OFF (-0x1000)
+#define SKF_AD_PROTOCOL 0
+#define SKF_AD_PKTTYPE 4
+#define SKF_AD_IFINDEX 8
+#define SKF_AD_MAX 12
+#define SKF_NET_OFF (-0x100000)
+#define SKF_LL_OFF (-0x200000)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/fs.h
new file mode 100644
index 0000000..8d375b5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/fs.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FS_H
+#define _LINUX_FS_H
+
+#include <linux/limits.h>
+#include <linux/ioctl.h>
+
+#undef NR_OPEN
+#define NR_OPEN (1024*1024)
+#define INR_OPEN 1024
+
+#define BLOCK_SIZE_BITS 10
+#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+struct files_stat_struct {
+ int nr_files;
+ int nr_free_files;
+ int max_files;
+};
+
+struct inodes_stat_t {
+ int nr_inodes;
+ int nr_unused;
+ int dummy[5];
+};
+
+#define NR_FILE 8192
+
+#define MAY_EXEC 1
+#define MAY_WRITE 2
+#define MAY_READ 4
+#define MAY_APPEND 8
+
+#define FMODE_READ 1
+#define FMODE_WRITE 2
+
+#define FMODE_LSEEK 4
+#define FMODE_PREAD 8
+#define FMODE_PWRITE FMODE_PREAD
+
+#define FMODE_EXEC 16
+
+#define RW_MASK 1
+#define RWA_MASK 2
+#define READ 0
+#define WRITE 1
+#define READA 2
+#define SWRITE 3
+#define SPECIAL 4
+#define READ_SYNC (READ | (1 << BIO_RW_SYNC))
+#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))
+#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
+
+#define SEL_IN 1
+#define SEL_OUT 2
+#define SEL_EX 4
+
+#define FS_REQUIRES_DEV 1
+#define FS_BINARY_MOUNTDATA 2
+#define FS_REVAL_DOT 16384
+#define FS_ODD_RENAME 32768
+
+#define MS_RDONLY 1
+#define MS_NOSUID 2
+#define MS_NODEV 4
+#define MS_NOEXEC 8
+#define MS_SYNCHRONOUS 16
+#define MS_REMOUNT 32
+#define MS_MANDLOCK 64
+#define MS_DIRSYNC 128
+#define MS_NOATIME 1024
+#define MS_NODIRATIME 2048
+#define MS_BIND 4096
+#define MS_MOVE 8192
+#define MS_REC 16384
+#define MS_VERBOSE 32768
+#define MS_SILENT 32768
+#define MS_POSIXACL (1<<16)
+#define MS_UNBINDABLE (1<<17)
+#define MS_PRIVATE (1<<18)
+#define MS_SLAVE (1<<19)
+#define MS_SHARED (1<<20)
+#define MS_ACTIVE (1<<30)
+#define MS_NOUSER (1<<31)
+
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK)
+
+#define MS_MGC_VAL 0xC0ED0000
+#define MS_MGC_MSK 0xffff0000
+
+#define S_SYNC 1
+#define S_NOATIME 2
+#define S_APPEND 4
+#define S_IMMUTABLE 8
+#define S_DEAD 16
+#define S_NOQUOTA 32
+#define S_DIRSYNC 64
+#define S_NOCMTIME 128
+#define S_SWAPFILE 256
+#define S_PRIVATE 512
+
+#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
+
+#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
+#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC))
+#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
+#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
+
+#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
+#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
+#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
+#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL)
+
+#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
+#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
+#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
+#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
+
+#define BLKROSET _IO(0x12,93)
+#define BLKROGET _IO(0x12,94)
+#define BLKRRPART _IO(0x12,95)
+#define BLKGETSIZE _IO(0x12,96)
+#define BLKFLSBUF _IO(0x12,97)
+#define BLKRASET _IO(0x12,98)
+#define BLKRAGET _IO(0x12,99)
+#define BLKFRASET _IO(0x12,100)
+#define BLKFRAGET _IO(0x12,101)
+#define BLKSECTSET _IO(0x12,102)
+#define BLKSECTGET _IO(0x12,103)
+#define BLKSSZGET _IO(0x12,104)
+
+#define BLKBSZGET _IOR(0x12,112,size_t)
+#define BLKBSZSET _IOW(0x12,113,size_t)
+#define BLKGETSIZE64 _IOR(0x12,114,size_t)
+#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
+#define BLKTRACESTART _IO(0x12,116)
+#define BLKTRACESTOP _IO(0x12,117)
+#define BLKTRACETEARDOWN _IO(0x12,118)
+
+#define BMAP_IOCTL 1
+#define FIBMAP _IO(0x00,1)
+#define FIGETBSZ _IO(0x00,2)
+
+#define SYNC_FILE_RANGE_WAIT_BEFORE 1
+#define SYNC_FILE_RANGE_WRITE 2
+#define SYNC_FILE_RANGE_WAIT_AFTER 4
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ftape.h b/6/platforms/android-3/arch-x86/usr/include/linux/ftape.h
new file mode 100644
index 0000000..bb1527c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ftape.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _FTAPE_H
+#define _FTAPE_H
+
+#define FTAPE_VERSION "ftape v3.04d 25/11/97"
+
+#include <linux/types.h>
+#include <linux/mtio.h>
+
+#define FT_SECTOR(x) (x+1)
+#define FT_SECTOR_SIZE 1024
+#define FT_SECTORS_PER_SEGMENT 32
+#define FT_ECC_SECTORS 3
+#define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE)
+#define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE)
+
+#define FTAPE_SEL_A 0
+#define FTAPE_SEL_B 1
+#define FTAPE_SEL_C 2
+#define FTAPE_SEL_D 3
+#define FTAPE_SEL_MASK 3
+#define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK)
+#define FTAPE_NO_REWIND 4
+
+typedef union {
+ struct {
+ __u8 error;
+ __u8 command;
+ } error;
+ long space;
+} ft_drive_error;
+typedef union {
+ struct {
+ __u8 drive_status;
+ __u8 drive_config;
+ __u8 tape_status;
+ } status;
+ long space;
+} ft_drive_status;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/futex.h b/6/platforms/android-3/arch-x86/usr/include/linux/futex.h
new file mode 100644
index 0000000..30f9e59
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/futex.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_FUTEX_H
+#define _LINUX_FUTEX_H
+
+#include <linux/sched.h>
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_FD 2
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
+
+struct robust_list {
+ struct robust_list __user *next;
+};
+
+struct robust_list_head {
+
+ struct robust_list list;
+
+ long futex_offset;
+
+ struct robust_list __user *list_op_pending;
+};
+
+#define FUTEX_WAITERS 0x80000000
+
+#define FUTEX_OWNER_DIED 0x40000000
+
+#define FUTEX_TID_MASK 0x3fffffff
+
+#define ROBUST_LIST_LIMIT 2048
+
+#define FUTEX_OP_SET 0
+#define FUTEX_OP_ADD 1
+#define FUTEX_OP_OR 2
+#define FUTEX_OP_ANDN 3
+#define FUTEX_OP_XOR 4
+#define FUTEX_OP_OPARG_SHIFT 8
+#define FUTEX_OP_CMP_EQ 0
+#define FUTEX_OP_CMP_NE 1
+#define FUTEX_OP_CMP_LT 2
+#define FUTEX_OP_CMP_LE 3
+#define FUTEX_OP_CMP_GT 4
+#define FUTEX_OP_CMP_GE 5
+#define FUTEX_OP(op, oparg, cmp, cmparg) (((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/genhd.h b/6/platforms/android-3/arch-x86/usr/include/linux/genhd.h
new file mode 100644
index 0000000..a3a3924
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/genhd.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_GENHD_H
+#define _LINUX_GENHD_H
+
+#include <linux/types.h>
+
+enum {
+
+ DOS_EXTENDED_PARTITION = 5,
+ LINUX_EXTENDED_PARTITION = 0x85,
+ WIN98_EXTENDED_PARTITION = 0x0f,
+
+ LINUX_SWAP_PARTITION = 0x82,
+ LINUX_RAID_PARTITION = 0xfd,
+
+ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
+ NEW_SOLARIS_X86_PARTITION = 0xbf,
+
+ DM6_AUX1PARTITION = 0x51,
+ DM6_AUX3PARTITION = 0x53,
+ DM6_PARTITION = 0x54,
+ EZD_PARTITION = 0x55,
+
+ FREEBSD_PARTITION = 0xa5,
+ OPENBSD_PARTITION = 0xa6,
+ NETBSD_PARTITION = 0xa9,
+ BSDI_PARTITION = 0xb7,
+ MINIX_PARTITION = 0x81,
+ UNIXWARE_PARTITION = 0x63,
+};
+
+struct partition {
+ unsigned char boot_ind;
+ unsigned char head;
+ unsigned char sector;
+ unsigned char cyl;
+ unsigned char sys_ind;
+ unsigned char end_head;
+ unsigned char end_sector;
+ unsigned char end_cyl;
+ unsigned int start_sect;
+ unsigned int nr_sects;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/gfp.h b/6/platforms/android-3/arch-x86/usr/include/linux/gfp.h
new file mode 100644
index 0000000..0a59fe9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/gfp.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_GFP_H
+#define __LINUX_GFP_H
+
+#include <linux/mmzone.h>
+#include <linux/stddef.h>
+#include <linux/linkage.h>
+
+struct vm_area_struct;
+
+#define __GFP_DMA ((__force gfp_t)0x01u)
+#define __GFP_HIGHMEM ((__force gfp_t)0x02u)
+#if BITS_PER_LONG < 64
+#define __GFP_DMA32 ((__force gfp_t)0x00)
+#else
+#define __GFP_DMA32 ((__force gfp_t)0x04)
+#endif
+
+#define __GFP_WAIT ((__force gfp_t)0x10u)
+#define __GFP_HIGH ((__force gfp_t)0x20u)
+#define __GFP_IO ((__force gfp_t)0x40u)
+#define __GFP_FS ((__force gfp_t)0x80u)
+#define __GFP_COLD ((__force gfp_t)0x100u)
+#define __GFP_NOWARN ((__force gfp_t)0x200u)
+#define __GFP_REPEAT ((__force gfp_t)0x400u)
+#define __GFP_NOFAIL ((__force gfp_t)0x800u)
+#define __GFP_NORETRY ((__force gfp_t)0x1000u)
+#define __GFP_NO_GROW ((__force gfp_t)0x2000u)
+#define __GFP_COMP ((__force gfp_t)0x4000u)
+#define __GFP_ZERO ((__force gfp_t)0x8000u)
+#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u)
+#define __GFP_HARDWALL ((__force gfp_t)0x20000u)
+
+#define __GFP_BITS_SHIFT 20
+#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
+
+#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| __GFP_NOMEMALLOC|__GFP_HARDWALL)
+
+#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
+
+#define GFP_ATOMIC (__GFP_HIGH)
+#define GFP_NOIO (__GFP_WAIT)
+#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
+#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
+#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
+#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM)
+
+#define GFP_DMA __GFP_DMA
+
+#define GFP_DMA32 __GFP_DMA32
+
+#ifndef HAVE_ARCH_FREE_PAGE
+#endif
+
+#define alloc_pages(gfp_mask, order) alloc_pages_node(numa_node_id(), gfp_mask, order)
+#define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
+#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
+
+#define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0)
+
+#define __get_dma_pages(gfp_mask, order) __get_free_pages((gfp_mask) | GFP_DMA,(order))
+
+#define __free_page(page) __free_pages((page), 0)
+#define free_page(addr) free_pages((addr),0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/hardirq.h b/6/platforms/android-3/arch-x86/usr/include/linux/hardirq.h
new file mode 100644
index 0000000..c0566b0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/hardirq.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_HARDIRQ_H
+#define LINUX_HARDIRQ_H
+
+#include <linux/preempt.h>
+#include <linux/smp_lock.h>
+#include <linux/lockdep.h>
+#include <asm/hardirq.h>
+#include <asm/system.h>
+
+#define PREEMPT_BITS 8
+#define SOFTIRQ_BITS 8
+
+#ifndef HARDIRQ_BITS
+#define HARDIRQ_BITS 12
+
+#if 1 << HARDIRQ_BITS < NR_IRQS
+#error HARDIRQ_BITS is too low!
+#endif
+#endif
+
+#define PREEMPT_SHIFT 0
+#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
+#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
+
+#define __IRQ_MASK(x) ((1UL << (x))-1)
+
+#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
+#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
+#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
+
+#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
+#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
+#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
+
+#if PREEMPT_ACTIVE < 1 << HARDIRQ_SHIFT + HARDIRQ_BITS
+#error PREEMPT_ACTIVE is too low!
+#endif
+
+#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
+#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
+#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
+
+#define in_irq() (hardirq_count())
+#define in_softirq() (softirq_count())
+#define in_interrupt() (irq_count())
+
+#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)
+
+#define preemptible() 0
+#define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
+
+#define synchronize_irq(irq) barrier()
+
+struct task_struct;
+
+#define irq_enter() do { account_system_vtime(current); add_preempt_count(HARDIRQ_OFFSET); trace_hardirq_enter(); } while (0)
+#define __irq_exit() do { trace_hardirq_exit(); account_system_vtime(current); sub_preempt_count(HARDIRQ_OFFSET); } while (0)
+
+#define nmi_enter() do { lockdep_off(); irq_enter(); } while (0)
+#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-3/arch-x86/usr/include/linux/hdlc/ioctl.h
new file mode 100644
index 0000000..c15a67f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __HDLC_IOCTL_H__
+#define __HDLC_IOCTL_H__
+
+typedef struct {
+ unsigned int clock_rate;
+ unsigned int clock_type;
+ unsigned short loopback;
+} sync_serial_settings;
+
+typedef struct {
+ unsigned int clock_rate;
+ unsigned int clock_type;
+ unsigned short loopback;
+ unsigned int slot_map;
+} te1_settings;
+
+typedef struct {
+ unsigned short encoding;
+ unsigned short parity;
+} raw_hdlc_proto;
+
+typedef struct {
+ unsigned int t391;
+ unsigned int t392;
+ unsigned int n391;
+ unsigned int n392;
+ unsigned int n393;
+ unsigned short lmi;
+ unsigned short dce;
+} fr_proto;
+
+typedef struct {
+ unsigned int dlci;
+} fr_proto_pvc;
+
+typedef struct {
+ unsigned int dlci;
+ char master[IFNAMSIZ];
+}fr_proto_pvc_info;
+
+typedef struct {
+ unsigned int interval;
+ unsigned int timeout;
+} cisco_proto;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/hdreg.h b/6/platforms/android-3/arch-x86/usr/include/linux/hdreg.h
new file mode 100644
index 0000000..a684ee9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/hdreg.h
@@ -0,0 +1,432 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HDREG_H
+#define _LINUX_HDREG_H
+
+#define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8))
+#define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8))
+#define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8))
+
+#define IDE_DRIVE_TASK_INVALID -1
+#define IDE_DRIVE_TASK_NO_DATA 0
+#define IDE_DRIVE_TASK_SET_XFER 1
+
+#define IDE_DRIVE_TASK_IN 2
+
+#define IDE_DRIVE_TASK_OUT 3
+#define IDE_DRIVE_TASK_RAW_WRITE 4
+
+#define IDE_TASKFILE_STD_IN_FLAGS 0xFE
+#define IDE_HOB_STD_IN_FLAGS 0x3C
+#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
+#define IDE_HOB_STD_OUT_FLAGS 0x3C
+
+typedef unsigned char task_ioreg_t;
+typedef unsigned long sata_ioreg_t;
+
+typedef union ide_reg_valid_s {
+ unsigned all : 16;
+ struct {
+ unsigned data : 1;
+ unsigned error_feature : 1;
+ unsigned sector : 1;
+ unsigned nsector : 1;
+ unsigned lcyl : 1;
+ unsigned hcyl : 1;
+ unsigned select : 1;
+ unsigned status_command : 1;
+
+ unsigned data_hob : 1;
+ unsigned error_feature_hob : 1;
+ unsigned sector_hob : 1;
+ unsigned nsector_hob : 1;
+ unsigned lcyl_hob : 1;
+ unsigned hcyl_hob : 1;
+ unsigned select_hob : 1;
+ unsigned control_hob : 1;
+ } b;
+} ide_reg_valid_t;
+
+typedef struct ide_task_request_s {
+ task_ioreg_t io_ports[8];
+ task_ioreg_t hob_ports[8];
+ ide_reg_valid_t out_flags;
+ ide_reg_valid_t in_flags;
+ int data_phase;
+ int req_cmd;
+ unsigned long out_size;
+ unsigned long in_size;
+} ide_task_request_t;
+
+typedef struct ide_ioctl_request_s {
+ ide_task_request_t *task_request;
+ unsigned char *out_buffer;
+ unsigned char *in_buffer;
+} ide_ioctl_request_t;
+
+struct hd_drive_cmd_hdr {
+ task_ioreg_t command;
+ task_ioreg_t sector_number;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+};
+
+typedef struct hd_drive_task_hdr {
+ task_ioreg_t data;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+ task_ioreg_t sector_number;
+ task_ioreg_t low_cylinder;
+ task_ioreg_t high_cylinder;
+ task_ioreg_t device_head;
+ task_ioreg_t command;
+} task_struct_t;
+
+typedef struct hd_drive_hob_hdr {
+ task_ioreg_t data;
+ task_ioreg_t feature;
+ task_ioreg_t sector_count;
+ task_ioreg_t sector_number;
+ task_ioreg_t low_cylinder;
+ task_ioreg_t high_cylinder;
+ task_ioreg_t device_head;
+ task_ioreg_t control;
+} hob_struct_t;
+
+#define TASKFILE_INVALID 0x7fff
+#define TASKFILE_48 0x8000
+
+#define TASKFILE_NO_DATA 0x0000
+
+#define TASKFILE_IN 0x0001
+#define TASKFILE_MULTI_IN 0x0002
+
+#define TASKFILE_OUT 0x0004
+#define TASKFILE_MULTI_OUT 0x0008
+#define TASKFILE_IN_OUT 0x0010
+
+#define TASKFILE_IN_DMA 0x0020
+#define TASKFILE_OUT_DMA 0x0040
+#define TASKFILE_IN_DMAQ 0x0080
+#define TASKFILE_OUT_DMAQ 0x0100
+
+#define TASKFILE_P_IN 0x0200
+#define TASKFILE_P_OUT 0x0400
+#define TASKFILE_P_IN_DMA 0x0800
+#define TASKFILE_P_OUT_DMA 0x1000
+#define TASKFILE_P_IN_DMAQ 0x2000
+#define TASKFILE_P_OUT_DMAQ 0x4000
+
+#define WIN_NOP 0x00
+
+#define CFA_REQ_EXT_ERROR_CODE 0x03
+
+#define WIN_SRST 0x08
+#define WIN_DEVICE_RESET 0x08
+
+#define WIN_RECAL 0x10
+#define WIN_RESTORE WIN_RECAL
+
+#define WIN_READ 0x20
+#define WIN_READ_ONCE 0x21
+#define WIN_READ_LONG 0x22
+#define WIN_READ_LONG_ONCE 0x23
+#define WIN_READ_EXT 0x24
+#define WIN_READDMA_EXT 0x25
+#define WIN_READDMA_QUEUED_EXT 0x26
+#define WIN_READ_NATIVE_MAX_EXT 0x27
+
+#define WIN_MULTREAD_EXT 0x29
+
+#define WIN_WRITE 0x30
+#define WIN_WRITE_ONCE 0x31
+#define WIN_WRITE_LONG 0x32
+#define WIN_WRITE_LONG_ONCE 0x33
+#define WIN_WRITE_EXT 0x34
+#define WIN_WRITEDMA_EXT 0x35
+#define WIN_WRITEDMA_QUEUED_EXT 0x36
+#define WIN_SET_MAX_EXT 0x37
+#define CFA_WRITE_SECT_WO_ERASE 0x38
+#define WIN_MULTWRITE_EXT 0x39
+
+#define WIN_WRITE_VERIFY 0x3C
+
+#define WIN_VERIFY 0x40
+#define WIN_VERIFY_ONCE 0x41
+#define WIN_VERIFY_EXT 0x42
+
+#define WIN_FORMAT 0x50
+
+#define WIN_INIT 0x60
+
+#define WIN_SEEK 0x70
+
+#define CFA_TRANSLATE_SECTOR 0x87
+#define WIN_DIAGNOSE 0x90
+#define WIN_SPECIFY 0x91
+#define WIN_DOWNLOAD_MICROCODE 0x92
+#define WIN_STANDBYNOW2 0x94
+#define WIN_STANDBY2 0x96
+#define WIN_SETIDLE2 0x97
+#define WIN_CHECKPOWERMODE2 0x98
+#define WIN_SLEEPNOW2 0x99
+
+#define WIN_PACKETCMD 0xA0
+#define WIN_PIDENTIFY 0xA1
+#define WIN_QUEUED_SERVICE 0xA2
+#define WIN_SMART 0xB0
+#define CFA_ERASE_SECTORS 0xC0
+#define WIN_MULTREAD 0xC4
+#define WIN_MULTWRITE 0xC5
+#define WIN_SETMULT 0xC6
+#define WIN_READDMA_QUEUED 0xC7
+#define WIN_READDMA 0xC8
+#define WIN_READDMA_ONCE 0xC9
+#define WIN_WRITEDMA 0xCA
+#define WIN_WRITEDMA_ONCE 0xCB
+#define WIN_WRITEDMA_QUEUED 0xCC
+#define CFA_WRITE_MULTI_WO_ERASE 0xCD
+#define WIN_GETMEDIASTATUS 0xDA
+#define WIN_ACKMEDIACHANGE 0xDB
+#define WIN_POSTBOOT 0xDC
+#define WIN_PREBOOT 0xDD
+#define WIN_DOORLOCK 0xDE
+#define WIN_DOORUNLOCK 0xDF
+#define WIN_STANDBYNOW1 0xE0
+#define WIN_IDLEIMMEDIATE 0xE1
+#define WIN_STANDBY 0xE2
+#define WIN_SETIDLE1 0xE3
+#define WIN_READ_BUFFER 0xE4
+#define WIN_CHECKPOWERMODE1 0xE5
+#define WIN_SLEEPNOW1 0xE6
+#define WIN_FLUSH_CACHE 0xE7
+#define WIN_WRITE_BUFFER 0xE8
+#define WIN_WRITE_SAME 0xE9
+
+#define WIN_FLUSH_CACHE_EXT 0xEA
+#define WIN_IDENTIFY 0xEC
+#define WIN_MEDIAEJECT 0xED
+#define WIN_IDENTIFY_DMA 0xEE
+#define WIN_SETFEATURES 0xEF
+#define EXABYTE_ENABLE_NEST 0xF0
+#define WIN_SECURITY_SET_PASS 0xF1
+#define WIN_SECURITY_UNLOCK 0xF2
+#define WIN_SECURITY_ERASE_PREPARE 0xF3
+#define WIN_SECURITY_ERASE_UNIT 0xF4
+#define WIN_SECURITY_FREEZE_LOCK 0xF5
+#define WIN_SECURITY_DISABLE 0xF6
+#define WIN_READ_NATIVE_MAX 0xF8
+#define WIN_SET_MAX 0xF9
+#define DISABLE_SEAGATE 0xFB
+
+#define SMART_READ_VALUES 0xD0
+#define SMART_READ_THRESHOLDS 0xD1
+#define SMART_AUTOSAVE 0xD2
+#define SMART_SAVE 0xD3
+#define SMART_IMMEDIATE_OFFLINE 0xD4
+#define SMART_READ_LOG_SECTOR 0xD5
+#define SMART_WRITE_LOG_SECTOR 0xD6
+#define SMART_WRITE_THRESHOLDS 0xD7
+#define SMART_ENABLE 0xD8
+#define SMART_DISABLE 0xD9
+#define SMART_STATUS 0xDA
+#define SMART_AUTO_OFFLINE 0xDB
+
+#define SMART_LCYL_PASS 0x4F
+#define SMART_HCYL_PASS 0xC2
+
+#define SETFEATURES_EN_8BIT 0x01
+#define SETFEATURES_EN_WCACHE 0x02
+#define SETFEATURES_DIS_DEFECT 0x04
+#define SETFEATURES_EN_APM 0x05
+#define SETFEATURES_EN_SAME_R 0x22
+#define SETFEATURES_DIS_MSN 0x31
+#define SETFEATURES_DIS_RETRY 0x33
+#define SETFEATURES_EN_AAM 0x42
+#define SETFEATURES_RW_LONG 0x44
+#define SETFEATURES_SET_CACHE 0x54
+#define SETFEATURES_DIS_RLA 0x55
+#define SETFEATURES_EN_RI 0x5D
+#define SETFEATURES_EN_SI 0x5E
+#define SETFEATURES_DIS_RPOD 0x66
+#define SETFEATURES_DIS_ECC 0x77
+#define SETFEATURES_DIS_8BIT 0x81
+#define SETFEATURES_DIS_WCACHE 0x82
+#define SETFEATURES_EN_DEFECT 0x84
+#define SETFEATURES_DIS_APM 0x85
+#define SETFEATURES_EN_ECC 0x88
+#define SETFEATURES_EN_MSN 0x95
+#define SETFEATURES_EN_RETRY 0x99
+#define SETFEATURES_EN_RLA 0xAA
+#define SETFEATURES_PREFETCH 0xAB
+#define SETFEATURES_EN_REST 0xAC
+#define SETFEATURES_4B_RW_LONG 0xBB
+#define SETFEATURES_DIS_AAM 0xC2
+#define SETFEATURES_EN_RPOD 0xCC
+#define SETFEATURES_DIS_RI 0xDD
+#define SETFEATURES_EN_SAME_M 0xDD
+#define SETFEATURES_DIS_SI 0xDE
+
+#define SECURITY_SET_PASSWORD 0xBA
+#define SECURITY_UNLOCK 0xBB
+#define SECURITY_ERASE_PREPARE 0xBC
+#define SECURITY_ERASE_UNIT 0xBD
+#define SECURITY_FREEZE_LOCK 0xBE
+#define SECURITY_DISABLE_PASSWORD 0xBF
+
+struct hd_geometry {
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ unsigned long start;
+};
+
+#define HDIO_GETGEO 0x0301
+#define HDIO_GET_UNMASKINTR 0x0302
+#define HDIO_GET_MULTCOUNT 0x0304
+#define HDIO_GET_QDMA 0x0305
+
+#define HDIO_SET_XFER 0x0306
+
+#define HDIO_OBSOLETE_IDENTITY 0x0307
+#define HDIO_GET_KEEPSETTINGS 0x0308
+#define HDIO_GET_32BIT 0x0309
+#define HDIO_GET_NOWERR 0x030a
+#define HDIO_GET_DMA 0x030b
+#define HDIO_GET_NICE 0x030c
+#define HDIO_GET_IDENTITY 0x030d
+#define HDIO_GET_WCACHE 0x030e
+#define HDIO_GET_ACOUSTIC 0x030f
+#define HDIO_GET_ADDRESS 0x0310
+
+#define HDIO_GET_BUSSTATE 0x031a
+#define HDIO_TRISTATE_HWIF 0x031b
+#define HDIO_DRIVE_RESET 0x031c
+#define HDIO_DRIVE_TASKFILE 0x031d
+#define HDIO_DRIVE_TASK 0x031e
+#define HDIO_DRIVE_CMD 0x031f
+#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK
+
+#define HDIO_SET_MULTCOUNT 0x0321
+#define HDIO_SET_UNMASKINTR 0x0322
+#define HDIO_SET_KEEPSETTINGS 0x0323
+#define HDIO_SET_32BIT 0x0324
+#define HDIO_SET_NOWERR 0x0325
+#define HDIO_SET_DMA 0x0326
+#define HDIO_SET_PIO_MODE 0x0327
+#define HDIO_SCAN_HWIF 0x0328
+#define HDIO_SET_NICE 0x0329
+#define HDIO_UNREGISTER_HWIF 0x032a
+#define HDIO_SET_WCACHE 0x032b
+#define HDIO_SET_ACOUSTIC 0x032c
+#define HDIO_SET_BUSSTATE 0x032d
+#define HDIO_SET_QDMA 0x032e
+#define HDIO_SET_ADDRESS 0x032f
+
+enum {
+ BUSSTATE_OFF = 0,
+ BUSSTATE_ON,
+ BUSSTATE_TRISTATE
+};
+
+#define __NEW_HD_DRIVE_ID
+
+struct hd_driveid {
+ unsigned short config;
+ unsigned short cyls;
+ unsigned short reserved2;
+ unsigned short heads;
+ unsigned short track_bytes;
+ unsigned short sector_bytes;
+ unsigned short sectors;
+ unsigned short vendor0;
+ unsigned short vendor1;
+ unsigned short vendor2;
+ unsigned char serial_no[20];
+ unsigned short buf_type;
+ unsigned short buf_size;
+ unsigned short ecc_bytes;
+ unsigned char fw_rev[8];
+ unsigned char model[40];
+ unsigned char max_multsect;
+ unsigned char vendor3;
+ unsigned short dword_io;
+ unsigned char vendor4;
+ unsigned char capability;
+ unsigned short reserved50;
+ unsigned char vendor5;
+ unsigned char tPIO;
+ unsigned char vendor6;
+ unsigned char tDMA;
+ unsigned short field_valid;
+ unsigned short cur_cyls;
+ unsigned short cur_heads;
+ unsigned short cur_sectors;
+ unsigned short cur_capacity0;
+ unsigned short cur_capacity1;
+ unsigned char multsect;
+ unsigned char multsect_valid;
+ unsigned int lba_capacity;
+ unsigned short dma_1word;
+ unsigned short dma_mword;
+ unsigned short eide_pio_modes;
+ unsigned short eide_dma_min;
+ unsigned short eide_dma_time;
+ unsigned short eide_pio;
+ unsigned short eide_pio_iordy;
+ unsigned short words69_70[2];
+
+ unsigned short words71_74[4];
+ unsigned short queue_depth;
+ unsigned short words76_79[4];
+ unsigned short major_rev_num;
+ unsigned short minor_rev_num;
+ unsigned short command_set_1;
+ unsigned short command_set_2;
+ unsigned short cfsse;
+ unsigned short cfs_enable_1;
+ unsigned short cfs_enable_2;
+ unsigned short csf_default;
+ unsigned short dma_ultra;
+ unsigned short trseuc;
+ unsigned short trsEuc;
+ unsigned short CurAPMvalues;
+ unsigned short mprc;
+ unsigned short hw_config;
+ unsigned short acoustic;
+ unsigned short msrqs;
+ unsigned short sxfert;
+ unsigned short sal;
+ unsigned int spg;
+ unsigned long long lba_capacity_2;
+ unsigned short words104_125[22];
+ unsigned short last_lun;
+ unsigned short word127;
+ unsigned short dlf;
+ unsigned short csfo;
+ unsigned short words130_155[26];
+ unsigned short word156;
+ unsigned short words157_159[3];
+ unsigned short cfa_power;
+ unsigned short words161_175[15];
+ unsigned short words176_205[30];
+ unsigned short words206_254[49];
+ unsigned short integrity_word;
+};
+
+#define IDE_NICE_DSC_OVERLAP (0)
+#define IDE_NICE_ATAPI_OVERLAP (1)
+#define IDE_NICE_0 (2)
+#define IDE_NICE_1 (3)
+#define IDE_NICE_2 (4)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/hdsmart.h b/6/platforms/android-3/arch-x86/usr/include/linux/hdsmart.h
new file mode 100644
index 0000000..6cbc653
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/hdsmart.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HDSMART_H
+#define _LINUX_HDSMART_H
+
+#define OFFLINE_FULL_SCAN 0
+#define SHORT_SELF_TEST 1
+#define EXTEND_SELF_TEST 2
+#define SHORT_CAPTIVE_SELF_TEST 129
+#define EXTEND_CAPTIVE_SELF_TEST 130
+
+typedef struct ata_smart_attribute_s {
+ unsigned char id;
+ unsigned short status_flag;
+ unsigned char normalized;
+ unsigned char worse_normal;
+ unsigned char raw[6];
+ unsigned char reserv;
+} __attribute__ ((packed)) ata_smart_attribute_t;
+
+typedef struct ata_smart_values_s {
+ unsigned short revnumber;
+ ata_smart_attribute_t vendor_attributes [30];
+ unsigned char offline_data_collection_status;
+ unsigned char self_test_exec_status;
+ unsigned short total_time_to_complete_off_line;
+ unsigned char vendor_specific_366;
+ unsigned char offline_data_collection_capability;
+ unsigned short smart_capability;
+ unsigned char errorlog_capability;
+ unsigned char vendor_specific_371;
+ unsigned char short_test_completion_time;
+ unsigned char extend_test_completion_time;
+ unsigned char reserved_374_385 [12];
+ unsigned char vendor_specific_386_509 [125];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_values_t;
+
+typedef struct ata_smart_threshold_entry_s {
+ unsigned char id;
+ unsigned char normalized_threshold;
+ unsigned char reserved[10];
+} __attribute__ ((packed)) ata_smart_threshold_entry_t;
+
+typedef struct ata_smart_thresholds_s {
+ unsigned short revnumber;
+ ata_smart_threshold_entry_t thres_entries[30];
+ unsigned char reserved[149];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_thresholds_t;
+
+typedef struct ata_smart_errorlog_command_struct_s {
+ unsigned char devicecontrolreg;
+ unsigned char featuresreg;
+ unsigned char sector_count;
+ unsigned char sector_number;
+ unsigned char cylinder_low;
+ unsigned char cylinder_high;
+ unsigned char drive_head;
+ unsigned char commandreg;
+ unsigned int timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
+
+typedef struct ata_smart_errorlog_error_struct_s {
+ unsigned char error_condition;
+ unsigned char extended_error[14];
+ unsigned char state;
+ unsigned short timestamp;
+} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
+
+typedef struct ata_smart_errorlog_struct_s {
+ ata_smart_errorlog_command_struct_t commands[6];
+ ata_smart_errorlog_error_struct_t error_struct;
+} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
+
+typedef struct ata_smart_errorlog_s {
+ unsigned char revnumber;
+ unsigned char error_log_pointer;
+ ata_smart_errorlog_struct_t errorlog_struct[5];
+ unsigned short ata_error_count;
+ unsigned short non_fatal_count;
+ unsigned short drive_timeout_count;
+ unsigned char reserved[53];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_errorlog_t;
+
+typedef struct ata_smart_selftestlog_struct_s {
+ unsigned char selftestnumber;
+ unsigned char selfteststatus;
+ unsigned short timestamp;
+ unsigned char selftestfailurecheckpoint;
+ unsigned int lbafirstfailure;
+ unsigned char vendorspecific[15];
+} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
+
+typedef struct ata_smart_selftestlog_s {
+ unsigned short revnumber;
+ ata_smart_selftestlog_struct_t selftest_struct[21];
+ unsigned char vendorspecific[2];
+ unsigned char mostrecenttest;
+ unsigned char resevered[2];
+ unsigned char chksum;
+} __attribute__ ((packed)) ata_smart_selftestlog_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/highmem.h b/6/platforms/android-3/arch-x86/usr/include/linux/highmem.h
new file mode 100644
index 0000000..d4a34ca
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/highmem.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_HIGHMEM_H
+#define _LINUX_HIGHMEM_H
+
+#include <linux/fs.h>
+#include <linux/mm.h>
+
+#include <asm/cacheflush.h>
+
+#ifndef ARCH_HAS_FLUSH_ANON_PAGE
+#endif
+#ifndef ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
+#endif
+#define kunmap(page) do { (void) (page); } while (0)
+#define kmap_atomic(page, idx) page_address(page)
+#define kunmap_atomic(addr, idx) do { } while (0)
+#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
+#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
+#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/hil.h b/6/platforms/android-3/arch-x86/usr/include/linux/hil.h
new file mode 100644
index 0000000..a0b3b97
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/hil.h
@@ -0,0 +1,256 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _HIL_H_
+#define _HIL_H_
+
+#include <asm/types.h>
+
+#define HIL_CLOCK 8MHZ
+#define HIL_EK1_CLOCK 30HZ
+#define HIL_EK2_CLOCK 60HZ
+
+#define HIL_TIMEOUT_DEV 5
+#define HIL_TIMEOUT_DEVS 10
+#define HIL_TIMEOUT_NORESP 10
+#define HIL_TIMEOUT_DEVS_DATA 16
+#define HIL_TIMEOUT_SELFTEST 200
+
+#define HIL_WIRE_PACKET_LEN 15
+enum hil_wire_bitpos {
+ HIL_WIRE_START = 0,
+ HIL_WIRE_ADDR2,
+ HIL_WIRE_ADDR1,
+ HIL_WIRE_ADDR0,
+ HIL_WIRE_COMMAND,
+ HIL_WIRE_DATA7,
+ HIL_WIRE_DATA6,
+ HIL_WIRE_DATA5,
+ HIL_WIRE_DATA4,
+ HIL_WIRE_DATA3,
+ HIL_WIRE_DATA2,
+ HIL_WIRE_DATA1,
+ HIL_WIRE_DATA0,
+ HIL_WIRE_PARITY,
+ HIL_WIRE_STOP
+};
+
+enum hil_pkt_bitpos {
+ HIL_PKT_CMD = 0x00000800,
+ HIL_PKT_ADDR2 = 0x00000400,
+ HIL_PKT_ADDR1 = 0x00000200,
+ HIL_PKT_ADDR0 = 0x00000100,
+ HIL_PKT_ADDR_MASK = 0x00000700,
+ HIL_PKT_ADDR_SHIFT = 8,
+ HIL_PKT_DATA7 = 0x00000080,
+ HIL_PKT_DATA6 = 0x00000040,
+ HIL_PKT_DATA5 = 0x00000020,
+ HIL_PKT_DATA4 = 0x00000010,
+ HIL_PKT_DATA3 = 0x00000008,
+ HIL_PKT_DATA2 = 0x00000004,
+ HIL_PKT_DATA1 = 0x00000002,
+ HIL_PKT_DATA0 = 0x00000001,
+ HIL_PKT_DATA_MASK = 0x000000FF,
+ HIL_PKT_DATA_SHIFT = 0
+};
+
+enum hil_error_bitpos {
+ HIL_ERR_OB = 0x00000800,
+ HIL_ERR_INT = 0x00010000,
+ HIL_ERR_NMI = 0x00020000,
+ HIL_ERR_LERR = 0x00040000,
+ HIL_ERR_PERR = 0x01000000,
+ HIL_ERR_FERR = 0x02000000,
+ HIL_ERR_FOF = 0x04000000
+};
+
+enum hil_control_bitpos {
+ HIL_CTRL_TEST = 0x00010000,
+ HIL_CTRL_IPF = 0x00040000,
+ HIL_CTRL_APE = 0x02000000
+};
+
+#define HIL_DO_ALTER_CTRL 0x40000000
+#define HIL_CTRL_ONLY 0xc0000000
+
+typedef u32 hil_packet;
+
+enum hil_command {
+ HIL_CMD_IFC = 0x00,
+ HIL_CMD_EPT = 0x01,
+ HIL_CMD_ELB = 0x02,
+ HIL_CMD_IDD = 0x03,
+ HIL_CMD_DSR = 0x04,
+ HIL_CMD_PST = 0x05,
+ HIL_CMD_RRG = 0x06,
+ HIL_CMD_WRG = 0x07,
+ HIL_CMD_ACF = 0x08,
+ HIL_CMDID_ACF = 0x07,
+ HIL_CMD_POL = 0x10,
+ HIL_CMDCT_POL = 0x0f,
+ HIL_CMD_RPL = 0x20,
+ HIL_CMDCT_RPL = 0x0f,
+ HIL_CMD_RNM = 0x30,
+ HIL_CMD_RST = 0x31,
+ HIL_CMD_EXD = 0x32,
+ HIL_CMD_RSC = 0x33,
+
+ HIL_CMD_DKA = 0x3d,
+ HIL_CMD_EK1 = 0x3e,
+ HIL_CMD_EK2 = 0x3f,
+ HIL_CMD_PR1 = 0x40,
+ HIL_CMD_PR2 = 0x41,
+ HIL_CMD_PR3 = 0x42,
+ HIL_CMD_PR4 = 0x43,
+ HIL_CMD_PR5 = 0x44,
+ HIL_CMD_PR6 = 0x45,
+ HIL_CMD_PR7 = 0x46,
+ HIL_CMD_PRM = 0x47,
+ HIL_CMD_AK1 = 0x48,
+ HIL_CMD_AK2 = 0x49,
+ HIL_CMD_AK3 = 0x4a,
+ HIL_CMD_AK4 = 0x4b,
+ HIL_CMD_AK5 = 0x4c,
+ HIL_CMD_AK6 = 0x4d,
+ HIL_CMD_AK7 = 0x4e,
+ HIL_CMD_ACK = 0x4f,
+
+ HIL_CMD_RIO = 0xfa,
+ HIL_CMD_SHR = 0xfb,
+ HIL_CMD_TER = 0xfc,
+ HIL_CMD_CAE = 0xfd,
+ HIL_CMD_DHR = 0xfe,
+
+};
+
+#define HIL_IDD_DID_TYPE_MASK 0xe0
+#define HIL_IDD_DID_TYPE_KB_INTEGRAL 0xa0
+#define HIL_IDD_DID_TYPE_KB_ITF 0xc0
+#define HIL_IDD_DID_TYPE_KB_RSVD 0xe0
+#define HIL_IDD_DID_TYPE_KB_LANG_MASK 0x1f
+#define HIL_IDD_DID_KBLANG_USE_ESD 0x00
+#define HIL_IDD_DID_TYPE_ABS 0x80
+#define HIL_IDD_DID_ABS_RSVD1_MASK 0xf8
+#define HIL_IDD_DID_ABS_RSVD1 0x98
+#define HIL_IDD_DID_ABS_TABLET_MASK 0xf8
+#define HIL_IDD_DID_ABS_TABLET 0x90
+#define HIL_IDD_DID_ABS_TSCREEN_MASK 0xfc
+#define HIL_IDD_DID_ABS_TSCREEN 0x8c
+#define HIL_IDD_DID_ABS_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_ABS_RSVD2 0x88
+#define HIL_IDD_DID_ABS_RSVD3_MASK 0xfc
+#define HIL_IDD_DID_ABS_RSVD3 0x80
+#define HIL_IDD_DID_TYPE_REL 0x60
+#define HIL_IDD_DID_REL_RSVD1_MASK 0xf0
+#define HIL_IDD_DID_REL_RSVD1 0x70
+#define HIL_IDD_DID_REL_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_REL_RSVD2 0x6c
+#define HIL_IDD_DID_REL_MOUSE_MASK 0xfc
+#define HIL_IDD_DID_REL_MOUSE 0x68
+#define HIL_IDD_DID_REL_QUAD_MASK 0xf8
+#define HIL_IDD_DID_REL_QUAD 0x60
+#define HIL_IDD_DID_TYPE_CHAR 0x40
+#define HIL_IDD_DID_CHAR_BARCODE_MASK 0xfc
+#define HIL_IDD_DID_CHAR_BARCODE 0x5c
+#define HIL_IDD_DID_CHAR_RSVD1_MASK 0xfc
+#define HIL_IDD_DID_CHAR_RSVD1 0x58
+#define HIL_IDD_DID_CHAR_RSVD2_MASK 0xf8
+#define HIL_IDD_DID_CHAR_RSVD2 0x50
+#define HIL_IDD_DID_CHAR_RSVD3_MASK 0xf0
+#define HIL_IDD_DID_CHAR_RSVD3 0x40
+#define HIL_IDD_DID_TYPE_OTHER 0x20
+#define HIL_IDD_DID_OTHER_RSVD1_MASK 0xf0
+#define HIL_IDD_DID_OTHER_RSVD1 0x30
+#define HIL_IDD_DID_OTHER_BARCODE_MASK 0xfc
+#define HIL_IDD_DID_OTHER_BARCODE 0x2c
+#define HIL_IDD_DID_OTHER_RSVD2_MASK 0xfc
+#define HIL_IDD_DID_OTHER_RSVD2 0x28
+#define HIL_IDD_DID_OTHER_RSVD3_MASK 0xf8
+#define HIL_IDD_DID_OTHER_RSVD3 0x20
+#define HIL_IDD_DID_TYPE_KEYPAD 0x00
+
+#define HIL_IDD_HEADER_AXSET_MASK 0x03
+#define HIL_IDD_HEADER_RSC 0x04
+#define HIL_IDD_HEADER_EXD 0x08
+#define HIL_IDD_HEADER_IOD 0x10
+#define HIL_IDD_HEADER_16BIT 0x20
+#define HIL_IDD_HEADER_ABS 0x40
+#define HIL_IDD_HEADER_2X_AXIS 0x80
+
+#define HIL_IDD_IOD_NBUTTON_MASK 0x07
+#define HIL_IDD_IOD_PROXIMITY 0x08
+#define HIL_IDD_IOD_PROMPT_MASK 0x70
+#define HIL_IDD_IOD_PROMPT_SHIFT 4
+#define HIL_IDD_IOD_PROMPT 0x80
+
+#define HIL_IDD_NUM_AXES_PER_SET(header_packet) ((header_packet) & HIL_IDD_HEADER_AXSET_MASK)
+
+#define HIL_IDD_NUM_AXSETS(header_packet) (2 - !((header_packet) & HIL_IDD_HEADER_2X_AXIS))
+
+#define HIL_IDD_LEN(header_packet) ((4 - !(header_packet & HIL_IDD_HEADER_IOD) - 2 * !(HIL_IDD_NUM_AXES_PER_SET(header_packet))) + 2 * HIL_IDD_NUM_AXES_PER_SET(header_packet) * !!((header_packet) & HIL_IDD_HEADER_ABS))
+
+#define HIL_IDD_AXIS_COUNTS_PER_M(header_ptr) (!(HIL_IDD_NUM_AXSETS(*(header_ptr))) ? -1 : (((*(header_ptr + 1) & HIL_PKT_DATA_MASK) + ((*(header_ptr + 2) & HIL_PKT_DATA_MASK)) << 8) * ((*(header_ptr) & HIL_IDD_HEADER_16BIT) ? 100 : 1)))
+
+#define HIL_IDD_AXIS_MAX(header_ptr, __axnum) ((!(*(header_ptr) & HIL_IDD_HEADER_ABS) || (HIL_IDD_NUM_AXES_PER_SET(*(header_ptr)) <= __axnum)) ? 0 : ((HIL_PKT_DATA_MASK & *((header_ptr) + 3 + 2 * __axnum)) + ((HIL_PKT_DATA_MASK & *((header_ptr) + 4 + 2 * __axnum)) << 8)))
+
+#define HIL_IDD_IOD(header_ptr) (*(header_ptr + HIL_IDD_LEN((*header_ptr)) - 1))
+
+#define HIL_IDD_HAS_GEN_PROMPT(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) && (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROMPT))
+
+#define HIL_IDD_HAS_GEN_PROXIMITY(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) && (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROXIMITY))
+
+#define HIL_IDD_NUM_BUTTONS(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) ? (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NBUTTON_MASK) : 0)
+
+#define HIL_IDD_NUM_PROMPTS(header_ptr) ((*header_ptr & HIL_IDD_HEADER_IOD) ? ((HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NPROMPT_MASK) >> HIL_IDD_IOD_PROMPT_SHIFT) : 0)
+
+#define HIL_EXD_HEADER_WRG 0x03
+#define HIL_EXD_HEADER_WRG_TYPE1 0x01
+#define HIL_EXD_HEADER_WRG_TYPE2 0x02
+#define HIL_EXD_HEADER_RRG 0x04
+#define HIL_EXD_HEADER_RNM 0x10
+#define HIL_EXD_HEADER_RST 0x20
+#define HIL_EXD_HEADER_LOCALE 0x40
+
+#define HIL_EXD_NUM_RRG(header_ptr) ((*header_ptr & HIL_EXD_HEADER_RRG) ? (*(header_ptr + 1) & HIL_PKT_DATA_MASK) : 0)
+
+#define HIL_EXD_NUM_WWG(header_ptr) ((*header_ptr & HIL_EXD_HEADER_WRG) ? (*(header_ptr + 2 - !(*header_ptr & HIL_EXD_HEADER_RRG)) & HIL_PKT_DATA_MASK) : 0)
+
+#define HIL_EXD_LEN(header_ptr) (!!(*header_ptr & HIL_EXD_HEADER_RRG) + !!(*header_ptr & HIL_EXD_HEADER_WRG) + !!(*header_ptr & HIL_EXD_HEADER_LOCALE) + 2 * !!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) + 1)
+
+#define HIL_EXD_LOCALE(header_ptr) (!(*header_ptr & HIL_EXD_HEADER_LOCALE) ? -1 : (*(header_ptr + HIL_EXD_LEN(header_ptr) - 1) & HIL_PKT_DATA_MASK))
+
+#define HIL_EXD_WRG_TYPE2_LEN(header_ptr) (!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) ? -1 : (*(header_ptr + HIL_EXD_LEN(header_ptr) - 2 - !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) + ((*(header_ptr + HIL_EXD_LEN(header_ptr) - 1 - !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) << 8))
+
+#define HIL_LOCALE_MAX 0x1f
+
+#define HIL_LOCALE_MAP "", "", "", "swiss.french", "portuguese", "arabic", "hebrew", "english.canadian", "turkish", "greek", "thai", "italian", "korean", "dutch", "swedish", "german", "chinese", "chinese", "swiss.french", "spanish", "swiss.german", "flemish", "finnish", "english.uk", "french.canadian", "swiss.german", "norwegian", "french", "danish", "japanese", "spanish", "english.us"
+
+#define HIL_KEYCODES_SET1_TBLSIZE 128
+#define HIL_KEYCODES_SET1 KEY_5, KEY_RESERVED, KEY_RIGHTALT, KEY_LEFTALT, KEY_RIGHTSHIFT, KEY_LEFTSHIFT, KEY_LEFTCTRL, KEY_SYSRQ, KEY_KP4, KEY_KP8, KEY_KP5, KEY_KP9, KEY_KP6, KEY_KP7, KEY_KPCOMMA, KEY_KPENTER, KEY_KP1, KEY_KPSLASH, KEY_KP2, KEY_KPPLUS, KEY_KP3, KEY_KPASTERISK, KEY_KP0, KEY_KPMINUS, KEY_B, KEY_V, KEY_C, KEY_X, KEY_Z, KEY_RESERVED, KEY_RESERVED, KEY_ESC, KEY_6, KEY_F10, KEY_3, KEY_F11, KEY_KPDOT, KEY_F9, KEY_TAB , KEY_F12, KEY_H, KEY_G, KEY_F, KEY_D, KEY_S, KEY_A, KEY_RESERVED, KEY_CAPSLOCK, KEY_U, KEY_Y, KEY_T, KEY_R, KEY_E, KEY_W, KEY_Q, KEY_TAB, KEY_7, KEY_6, KEY_5, KEY_4, KEY_3, KEY_2, KEY_1, KEY_GRAVE, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17, KEY_F18, KEY_F19, KEY_F20, KEY_MENU, KEY_F4, KEY_F3, KEY_F2, KEY_F1, KEY_VOLUMEUP, KEY_STOP, KEY_SENDFILE, KEY_SYSRQ, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_VOLUMEDOWN, KEY_DEL_EOL, KEY_DEL_EOS, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUAL, KEY_BACKSPACE, KEY_INS_LINE, KEY_DEL_LINE, KEY_I, KEY_O, KEY_P, KEY_LEFTBRACE, KEY_RIGHTBRACE, KEY_BACKSLASH, KEY_INSERT, KEY_DELETE, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, KEY_APOSTROPHE, KEY_ENTER, KEY_HOME, KEY_PAGEUP, KEY_M, KEY_COMMA, KEY_DOT, KEY_SLASH, KEY_BACKSLASH, KEY_SELECT, KEY_102ND, KEY_PAGEDOWN, KEY_N, KEY_SPACE, KEY_NEXT, KEY_RESERVED, KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT
+
+#define HIL_KEYCODES_SET3_TBLSIZE 128
+#define HIL_KEYCODES_SET3 KEY_RESERVED, KEY_ESC, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUAL, KEY_BACKSPACE, KEY_TAB, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_LEFTBRACE, KEY_RIGHTBRACE, KEY_ENTER, KEY_LEFTCTRL, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, KEY_APOSTROPHE,KEY_GRAVE, KEY_LEFTSHIFT, KEY_BACKSLASH, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, KEY_COMMA, KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, KEY_KPASTERISK, KEY_LEFTALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KPMINUS, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KPPLUS, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT, KEY_SYSRQ, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_UP, KEY_LEFT, KEY_DOWN, KEY_RIGHT, KEY_HOME, KEY_PAGEUP, KEY_END, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, KEY_102ND, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED
+
+#define HIL_POL_NUM_AXES_MASK 0x03
+#define HIL_POL_CTS 0x04
+#define HIL_POL_STATUS_PENDING 0x08
+#define HIL_POL_CHARTYPE_MASK 0x70
+#define HIL_POL_CHARTYPE_NONE 0x00
+#define HIL_POL_CHARTYPE_RSVD1 0x10
+#define HIL_POL_CHARTYPE_ASCII 0x20
+#define HIL_POL_CHARTYPE_BINARY 0x30
+#define HIL_POL_CHARTYPE_SET1 0x40
+#define HIL_POL_CHARTYPE_RSVD2 0x50
+#define HIL_POL_CHARTYPE_SET2 0x60
+#define HIL_POL_CHARTYPE_SET3 0x70
+#define HIL_POL_AXIS_ALT 0x80
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/i2c.h b/6/platforms/android-3/arch-x86/usr/include/linux/i2c.h
new file mode 100644
index 0000000..9513fc6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/i2c.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_I2C_H
+#define _LINUX_I2C_H
+
+#include <linux/types.h>
+
+struct i2c_msg {
+ __u16 addr;
+ __u16 flags;
+#define I2C_M_TEN 0x10
+#define I2C_M_RD 0x01
+#define I2C_M_NOSTART 0x4000
+#define I2C_M_REV_DIR_ADDR 0x2000
+#define I2C_M_IGNORE_NAK 0x1000
+#define I2C_M_NO_RD_ACK 0x0800
+ __u16 len;
+ __u8 *buf;
+};
+
+#define I2C_FUNC_I2C 0x00000001
+#define I2C_FUNC_10BIT_ADDR 0x00000002
+#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004
+#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008
+#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000
+#define I2C_FUNC_SMBUS_QUICK 0x00010000
+#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
+#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
+#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
+#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
+#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
+#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
+#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
+#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
+#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000
+
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
+
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | I2C_FUNC_SMBUS_I2C_BLOCK)
+
+#define I2C_SMBUS_BLOCK_MAX 32
+union i2c_smbus_data {
+ __u8 byte;
+ __u16 word;
+ __u8 block[I2C_SMBUS_BLOCK_MAX + 2];
+
+};
+
+#define I2C_SMBUS_READ 1
+#define I2C_SMBUS_WRITE 0
+
+#define I2C_SMBUS_QUICK 0
+#define I2C_SMBUS_BYTE 1
+#define I2C_SMBUS_BYTE_DATA 2
+#define I2C_SMBUS_WORD_DATA 3
+#define I2C_SMBUS_PROC_CALL 4
+#define I2C_SMBUS_BLOCK_DATA 5
+#define I2C_SMBUS_I2C_BLOCK_DATA 6
+#define I2C_SMBUS_BLOCK_PROC_CALL 7
+
+#define I2C_RETRIES 0x0701
+
+#define I2C_TIMEOUT 0x0702
+
+#define I2C_SLAVE 0x0703
+
+#define I2C_SLAVE_FORCE 0x0706
+
+#define I2C_TENBIT 0x0704
+
+#define I2C_FUNCS 0x0705
+#define I2C_RDWR 0x0707
+#define I2C_PEC 0x0708
+
+#define I2C_SMBUS 0x0720
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/icmp.h b/6/platforms/android-3/arch-x86/usr/include/linux/icmp.h
new file mode 100644
index 0000000..c5b58bb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/icmp.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ICMP_H
+#define _LINUX_ICMP_H
+
+#include <linux/types.h>
+
+#define ICMP_ECHOREPLY 0
+#define ICMP_DEST_UNREACH 3
+#define ICMP_SOURCE_QUENCH 4
+#define ICMP_REDIRECT 5
+#define ICMP_ECHO 8
+#define ICMP_TIME_EXCEEDED 11
+#define ICMP_PARAMETERPROB 12
+#define ICMP_TIMESTAMP 13
+#define ICMP_TIMESTAMPREPLY 14
+#define ICMP_INFO_REQUEST 15
+#define ICMP_INFO_REPLY 16
+#define ICMP_ADDRESS 17
+#define ICMP_ADDRESSREPLY 18
+#define NR_ICMP_TYPES 18
+
+#define ICMP_NET_UNREACH 0
+#define ICMP_HOST_UNREACH 1
+#define ICMP_PROT_UNREACH 2
+#define ICMP_PORT_UNREACH 3
+#define ICMP_FRAG_NEEDED 4
+#define ICMP_SR_FAILED 5
+#define ICMP_NET_UNKNOWN 6
+#define ICMP_HOST_UNKNOWN 7
+#define ICMP_HOST_ISOLATED 8
+#define ICMP_NET_ANO 9
+#define ICMP_HOST_ANO 10
+#define ICMP_NET_UNR_TOS 11
+#define ICMP_HOST_UNR_TOS 12
+#define ICMP_PKT_FILTERED 13
+#define ICMP_PREC_VIOLATION 14
+#define ICMP_PREC_CUTOFF 15
+#define NR_ICMP_UNREACH 15
+
+#define ICMP_REDIR_NET 0
+#define ICMP_REDIR_HOST 1
+#define ICMP_REDIR_NETTOS 2
+#define ICMP_REDIR_HOSTTOS 3
+
+#define ICMP_EXC_TTL 0
+#define ICMP_EXC_FRAGTIME 1
+
+struct icmphdr {
+ __u8 type;
+ __u8 code;
+ __u16 checksum;
+ union {
+ struct {
+ __u16 id;
+ __u16 sequence;
+ } echo;
+ __u32 gateway;
+ struct {
+ __u16 __unused_field;
+ __u16 mtu;
+ } frag;
+ } un;
+};
+
+#define ICMP_FILTER 1
+
+struct icmp_filter {
+ __u32 data;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if.h b/6/platforms/android-3/arch-x86/usr/include/linux/if.h
new file mode 100644
index 0000000..47c29d9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_H
+#define _LINUX_IF_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/compiler.h>
+
+#define IFNAMSIZ 16
+#include <linux/hdlc/ioctl.h>
+
+#define IFF_UP 0x1
+#define IFF_BROADCAST 0x2
+#define IFF_DEBUG 0x4
+#define IFF_LOOPBACK 0x8
+#define IFF_POINTOPOINT 0x10
+#define IFF_NOTRAILERS 0x20
+#define IFF_RUNNING 0x40
+#define IFF_NOARP 0x80
+#define IFF_PROMISC 0x100
+#define IFF_ALLMULTI 0x200
+
+#define IFF_MASTER 0x400
+#define IFF_SLAVE 0x800
+
+#define IFF_MULTICAST 0x1000
+
+#define IFF_PORTSEL 0x2000
+#define IFF_AUTOMEDIA 0x4000
+#define IFF_DYNAMIC 0x8000
+
+#define IFF_LOWER_UP 0x10000
+#define IFF_DORMANT 0x20000
+
+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
+
+#define IFF_802_1Q_VLAN 0x1
+#define IFF_EBRIDGE 0x2
+#define IFF_SLAVE_INACTIVE 0x4
+#define IFF_MASTER_8023AD 0x8
+#define IFF_MASTER_ALB 0x10
+
+#define IF_GET_IFACE 0x0001
+#define IF_GET_PROTO 0x0002
+
+#define IF_IFACE_V35 0x1000
+#define IF_IFACE_V24 0x1001
+#define IF_IFACE_X21 0x1002
+#define IF_IFACE_T1 0x1003
+#define IF_IFACE_E1 0x1004
+#define IF_IFACE_SYNC_SERIAL 0x1005
+#define IF_IFACE_X21D 0x1006
+
+#define IF_PROTO_HDLC 0x2000
+#define IF_PROTO_PPP 0x2001
+#define IF_PROTO_CISCO 0x2002
+#define IF_PROTO_FR 0x2003
+#define IF_PROTO_FR_ADD_PVC 0x2004
+#define IF_PROTO_FR_DEL_PVC 0x2005
+#define IF_PROTO_X25 0x2006
+#define IF_PROTO_HDLC_ETH 0x2007
+#define IF_PROTO_FR_ADD_ETH_PVC 0x2008
+#define IF_PROTO_FR_DEL_ETH_PVC 0x2009
+#define IF_PROTO_FR_PVC 0x200A
+#define IF_PROTO_FR_ETH_PVC 0x200B
+#define IF_PROTO_RAW 0x200C
+
+enum {
+ IF_OPER_UNKNOWN,
+ IF_OPER_NOTPRESENT,
+ IF_OPER_DOWN,
+ IF_OPER_LOWERLAYERDOWN,
+ IF_OPER_TESTING,
+ IF_OPER_DORMANT,
+ IF_OPER_UP,
+};
+
+enum {
+ IF_LINK_MODE_DEFAULT,
+ IF_LINK_MODE_DORMANT,
+};
+
+struct ifmap
+{
+ unsigned long mem_start;
+ unsigned long mem_end;
+ unsigned short base_addr;
+ unsigned char irq;
+ unsigned char dma;
+ unsigned char port;
+
+};
+
+struct if_settings
+{
+ unsigned int type;
+ unsigned int size;
+ union {
+
+ raw_hdlc_proto __user *raw_hdlc;
+ cisco_proto __user *cisco;
+ fr_proto __user *fr;
+ fr_proto_pvc __user *fr_pvc;
+ fr_proto_pvc_info __user *fr_pvc_info;
+
+ sync_serial_settings __user *sync;
+ te1_settings __user *te1;
+ } ifs_ifsu;
+};
+
+struct ifreq
+{
+#define IFHWADDRLEN 6
+ union
+ {
+ char ifrn_name[IFNAMSIZ];
+ } ifr_ifrn;
+
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ struct sockaddr ifru_netmask;
+ struct sockaddr ifru_hwaddr;
+ short ifru_flags;
+ int ifru_ivalue;
+ int ifru_mtu;
+ struct ifmap ifru_map;
+ char ifru_slave[IFNAMSIZ];
+ char ifru_newname[IFNAMSIZ];
+ void __user * ifru_data;
+ struct if_settings ifru_settings;
+ } ifr_ifru;
+};
+
+#define ifr_name ifr_ifrn.ifrn_name
+#define ifr_hwaddr ifr_ifru.ifru_hwaddr
+#define ifr_addr ifr_ifru.ifru_addr
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr
+#define ifr_netmask ifr_ifru.ifru_netmask
+#define ifr_flags ifr_ifru.ifru_flags
+#define ifr_metric ifr_ifru.ifru_ivalue
+#define ifr_mtu ifr_ifru.ifru_mtu
+#define ifr_map ifr_ifru.ifru_map
+#define ifr_slave ifr_ifru.ifru_slave
+#define ifr_data ifr_ifru.ifru_data
+#define ifr_ifindex ifr_ifru.ifru_ivalue
+#define ifr_bandwidth ifr_ifru.ifru_ivalue
+#define ifr_qlen ifr_ifru.ifru_ivalue
+#define ifr_newname ifr_ifru.ifru_newname
+#define ifr_settings ifr_ifru.ifru_settings
+
+struct ifconf
+{
+ int ifc_len;
+ union
+ {
+ char __user *ifcu_buf;
+ struct ifreq __user *ifcu_req;
+ } ifc_ifcu;
+};
+#define ifc_buf ifc_ifcu.ifcu_buf
+#define ifc_req ifc_ifcu.ifcu_req
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_arcnet.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_arcnet.h
new file mode 100644
index 0000000..a1ad877
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_arcnet.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ARCNET_H
+#define _LINUX_IF_ARCNET_H
+
+#include <linux/if_ether.h>
+
+#define ARC_P_IP 212
+#define ARC_P_IPV6 196
+#define ARC_P_ARP 213
+#define ARC_P_RARP 214
+#define ARC_P_IPX 250
+#define ARC_P_NOVELL_EC 236
+
+#define ARC_P_IP_RFC1051 240
+#define ARC_P_ARP_RFC1051 241
+
+#define ARC_P_ETHER 232
+
+#define ARC_P_DATAPOINT_BOOT 0
+#define ARC_P_DATAPOINT_MOUNT 1
+#define ARC_P_POWERLAN_BEACON 8
+#define ARC_P_POWERLAN_BEACON2 243
+#define ARC_P_LANSOFT 251
+#define ARC_P_ATALK 0xDD
+
+#define ARCNET_ALEN 1
+
+struct arc_rfc1201
+{
+ uint8_t proto;
+ uint8_t split_flag;
+ uint16_t sequence;
+ uint8_t payload[0];
+};
+#define RFC1201_HDR_SIZE 4
+
+struct arc_rfc1051
+{
+ uint8_t proto;
+ uint8_t payload[0];
+};
+#define RFC1051_HDR_SIZE 1
+
+struct arc_eth_encap
+{
+ uint8_t proto;
+ struct ethhdr eth;
+ uint8_t payload[0];
+};
+#define ETH_ENCAP_HDR_SIZE 14
+
+struct arc_cap
+{
+ uint8_t proto;
+ uint8_t cookie[sizeof(int)];
+ union {
+ uint8_t ack;
+ uint8_t raw[0];
+ } mes;
+};
+
+struct arc_hardware
+{
+ uint8_t source,
+ dest,
+ offset[2];
+};
+#define ARC_HDR_SIZE 4
+
+struct archdr
+{
+
+ struct arc_hardware hard;
+
+ union {
+ struct arc_rfc1201 rfc1201;
+ struct arc_rfc1051 rfc1051;
+ struct arc_eth_encap eth_encap;
+ struct arc_cap cap;
+ uint8_t raw[0];
+ } soft;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_arp.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_arp.h
new file mode 100644
index 0000000..1da50f5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_arp.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ARP_H
+#define _LINUX_IF_ARP_H
+
+#include <linux/netdevice.h>
+
+#define ARPHRD_NETROM 0
+#define ARPHRD_ETHER 1
+#define ARPHRD_EETHER 2
+#define ARPHRD_AX25 3
+#define ARPHRD_PRONET 4
+#define ARPHRD_CHAOS 5
+#define ARPHRD_IEEE802 6
+#define ARPHRD_ARCNET 7
+#define ARPHRD_APPLETLK 8
+#define ARPHRD_DLCI 15
+#define ARPHRD_ATM 19
+#define ARPHRD_METRICOM 23
+#define ARPHRD_IEEE1394 24
+#define ARPHRD_EUI64 27
+#define ARPHRD_INFINIBAND 32
+
+#define ARPHRD_SLIP 256
+#define ARPHRD_CSLIP 257
+#define ARPHRD_SLIP6 258
+#define ARPHRD_CSLIP6 259
+#define ARPHRD_RSRVD 260
+#define ARPHRD_ADAPT 264
+#define ARPHRD_ROSE 270
+#define ARPHRD_X25 271
+#define ARPHRD_HWX25 272
+#define ARPHRD_PPP 512
+#define ARPHRD_CISCO 513
+#define ARPHRD_HDLC ARPHRD_CISCO
+#define ARPHRD_LAPB 516
+#define ARPHRD_DDCMP 517
+#define ARPHRD_RAWHDLC 518
+
+#define ARPHRD_TUNNEL 768
+#define ARPHRD_TUNNEL6 769
+#define ARPHRD_FRAD 770
+#define ARPHRD_SKIP 771
+#define ARPHRD_LOOPBACK 772
+#define ARPHRD_LOCALTLK 773
+#define ARPHRD_FDDI 774
+#define ARPHRD_BIF 775
+#define ARPHRD_SIT 776
+#define ARPHRD_IPDDP 777
+#define ARPHRD_IPGRE 778
+#define ARPHRD_PIMREG 779
+#define ARPHRD_HIPPI 780
+#define ARPHRD_ASH 781
+#define ARPHRD_ECONET 782
+#define ARPHRD_IRDA 783
+
+#define ARPHRD_FCPP 784
+#define ARPHRD_FCAL 785
+#define ARPHRD_FCPL 786
+#define ARPHRD_FCFABRIC 787
+
+#define ARPHRD_IEEE802_TR 800
+#define ARPHRD_IEEE80211 801
+#define ARPHRD_IEEE80211_PRISM 802
+#define ARPHRD_IEEE80211_RADIOTAP 803
+
+#define ARPHRD_VOID 0xFFFF
+#define ARPHRD_NONE 0xFFFE
+
+#define ARPOP_REQUEST 1
+#define ARPOP_REPLY 2
+#define ARPOP_RREQUEST 3
+#define ARPOP_RREPLY 4
+#define ARPOP_InREQUEST 8
+#define ARPOP_InREPLY 9
+#define ARPOP_NAK 10
+
+struct arpreq {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+ char arp_dev[16];
+};
+
+struct arpreq_old {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+};
+
+#define ATF_COM 0x02
+#define ATF_PERM 0x04
+#define ATF_PUBL 0x08
+#define ATF_USETRAILERS 0x10
+#define ATF_NETMASK 0x20
+#define ATF_DONTPUB 0x40
+
+struct arphdr
+{
+ unsigned short ar_hrd;
+ unsigned short ar_pro;
+ unsigned char ar_hln;
+ unsigned char ar_pln;
+ unsigned short ar_op;
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_bridge.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_bridge.h
new file mode 100644
index 0000000..93f9494
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_bridge.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_BRIDGE_H
+#define _LINUX_IF_BRIDGE_H
+
+#include <linux/types.h>
+
+#define SYSFS_BRIDGE_ATTR "bridge"
+#define SYSFS_BRIDGE_FDB "brforward"
+#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
+#define SYSFS_BRIDGE_PORT_ATTR "brport"
+#define SYSFS_BRIDGE_PORT_LINK "bridge"
+
+#define BRCTL_VERSION 1
+
+#define BRCTL_GET_VERSION 0
+#define BRCTL_GET_BRIDGES 1
+#define BRCTL_ADD_BRIDGE 2
+#define BRCTL_DEL_BRIDGE 3
+#define BRCTL_ADD_IF 4
+#define BRCTL_DEL_IF 5
+#define BRCTL_GET_BRIDGE_INFO 6
+#define BRCTL_GET_PORT_LIST 7
+#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
+#define BRCTL_SET_BRIDGE_HELLO_TIME 9
+#define BRCTL_SET_BRIDGE_MAX_AGE 10
+#define BRCTL_SET_AGEING_TIME 11
+#define BRCTL_SET_GC_INTERVAL 12
+#define BRCTL_GET_PORT_INFO 13
+#define BRCTL_SET_BRIDGE_STP_STATE 14
+#define BRCTL_SET_BRIDGE_PRIORITY 15
+#define BRCTL_SET_PORT_PRIORITY 16
+#define BRCTL_SET_PATH_COST 17
+#define BRCTL_GET_FDB_ENTRIES 18
+
+#define BR_STATE_DISABLED 0
+#define BR_STATE_LISTENING 1
+#define BR_STATE_LEARNING 2
+#define BR_STATE_FORWARDING 3
+#define BR_STATE_BLOCKING 4
+
+struct __bridge_info
+{
+ __u64 designated_root;
+ __u64 bridge_id;
+ __u32 root_path_cost;
+ __u32 max_age;
+ __u32 hello_time;
+ __u32 forward_delay;
+ __u32 bridge_max_age;
+ __u32 bridge_hello_time;
+ __u32 bridge_forward_delay;
+ __u8 topology_change;
+ __u8 topology_change_detected;
+ __u8 root_port;
+ __u8 stp_enabled;
+ __u32 ageing_time;
+ __u32 gc_interval;
+ __u32 hello_timer_value;
+ __u32 tcn_timer_value;
+ __u32 topology_change_timer_value;
+ __u32 gc_timer_value;
+};
+
+struct __port_info
+{
+ __u64 designated_root;
+ __u64 designated_bridge;
+ __u16 port_id;
+ __u16 designated_port;
+ __u32 path_cost;
+ __u32 designated_cost;
+ __u8 state;
+ __u8 top_change_ack;
+ __u8 config_pending;
+ __u8 unused0;
+ __u32 message_age_timer_value;
+ __u32 forward_delay_timer_value;
+ __u32 hold_timer_value;
+};
+
+struct __fdb_entry
+{
+ __u8 mac_addr[6];
+ __u8 port_no;
+ __u8 is_local;
+ __u32 ageing_timer_value;
+ __u32 unused;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_ether.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_ether.h
new file mode 100644
index 0000000..ff89c3d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_ether.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_ETHER_H
+#define _LINUX_IF_ETHER_H
+
+#include <linux/types.h>
+
+#define ETH_ALEN 6
+#define ETH_HLEN 14
+#define ETH_ZLEN 60
+#define ETH_DATA_LEN 1500
+#define ETH_FRAME_LEN 1514
+
+#define ETH_P_LOOP 0x0060
+#define ETH_P_PUP 0x0200
+#define ETH_P_PUPAT 0x0201
+#define ETH_P_IP 0x0800
+#define ETH_P_X25 0x0805
+#define ETH_P_ARP 0x0806
+#define ETH_P_BPQ 0x08FF
+#define ETH_P_IEEEPUP 0x0a00
+#define ETH_P_IEEEPUPAT 0x0a01
+#define ETH_P_DEC 0x6000
+#define ETH_P_DNA_DL 0x6001
+#define ETH_P_DNA_RC 0x6002
+#define ETH_P_DNA_RT 0x6003
+#define ETH_P_LAT 0x6004
+#define ETH_P_DIAG 0x6005
+#define ETH_P_CUST 0x6006
+#define ETH_P_SCA 0x6007
+#define ETH_P_RARP 0x8035
+#define ETH_P_ATALK 0x809B
+#define ETH_P_AARP 0x80F3
+#define ETH_P_8021Q 0x8100
+#define ETH_P_IPX 0x8137
+#define ETH_P_IPV6 0x86DD
+#define ETH_P_SLOW 0x8809
+#define ETH_P_WCCP 0x883E
+#define ETH_P_PPP_DISC 0x8863
+#define ETH_P_PPP_SES 0x8864
+#define ETH_P_MPLS_UC 0x8847
+#define ETH_P_MPLS_MC 0x8848
+#define ETH_P_ATMMPOA 0x884c
+#define ETH_P_ATMFATE 0x8884
+#define ETH_P_AOE 0x88A2
+#define ETH_P_TIPC 0x88CA
+
+#define ETH_P_802_3 0x0001
+#define ETH_P_AX25 0x0002
+#define ETH_P_ALL 0x0003
+#define ETH_P_802_2 0x0004
+#define ETH_P_SNAP 0x0005
+#define ETH_P_DDCMP 0x0006
+#define ETH_P_WAN_PPP 0x0007
+#define ETH_P_PPP_MP 0x0008
+#define ETH_P_LOCALTALK 0x0009
+#define ETH_P_PPPTALK 0x0010
+#define ETH_P_TR_802_2 0x0011
+#define ETH_P_MOBITEX 0x0015
+#define ETH_P_CONTROL 0x0016
+#define ETH_P_IRDA 0x0017
+#define ETH_P_ECONET 0x0018
+#define ETH_P_HDLC 0x0019
+#define ETH_P_ARCNET 0x001A
+
+struct ethhdr {
+ unsigned char h_dest[ETH_ALEN];
+ unsigned char h_source[ETH_ALEN];
+ __be16 h_proto;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_fc.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_fc.h
new file mode 100644
index 0000000..a6a47b4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_fc.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_FC_H
+#define _LINUX_IF_FC_H
+
+#define FC_ALEN 6
+#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
+#define FC_ID_LEN 3
+
+#define EXTENDED_SAP 0xAA
+#define UI_CMD 0x03
+
+struct fch_hdr {
+ __u8 daddr[FC_ALEN];
+ __u8 saddr[FC_ALEN];
+};
+
+struct fcllc {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 llc;
+ __u8 protid[3];
+ __be16 ethertype;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_fddi.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_fddi.h
new file mode 100644
index 0000000..f59492f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_fddi.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_FDDI_H
+#define _LINUX_IF_FDDI_H
+
+#define FDDI_K_ALEN 6
+#define FDDI_K_8022_HLEN 16
+#define FDDI_K_SNAP_HLEN 21
+#define FDDI_K_8022_ZLEN 16
+#define FDDI_K_SNAP_ZLEN 21
+#define FDDI_K_8022_DLEN 4475
+#define FDDI_K_SNAP_DLEN 4470
+#define FDDI_K_LLC_ZLEN 13
+#define FDDI_K_LLC_LEN 4491
+
+#define FDDI_FC_K_VOID 0x00
+#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80
+#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0
+#define FDDI_FC_K_SMT_MIN 0x41
+#define FDDI_FC_K_SMT_MAX 0x4F
+#define FDDI_FC_K_MAC_MIN 0xC1
+#define FDDI_FC_K_MAC_MAX 0xCF
+#define FDDI_FC_K_ASYNC_LLC_MIN 0x50
+#define FDDI_FC_K_ASYNC_LLC_DEF 0x54
+#define FDDI_FC_K_ASYNC_LLC_MAX 0x5F
+#define FDDI_FC_K_SYNC_LLC_MIN 0xD0
+#define FDDI_FC_K_SYNC_LLC_MAX 0xD7
+#define FDDI_FC_K_IMPLEMENTOR_MIN 0x60
+#define FDDI_FC_K_IMPLEMENTOR_MAX 0x6F
+#define FDDI_FC_K_RESERVED_MIN 0x70
+#define FDDI_FC_K_RESERVED_MAX 0x7F
+
+#define FDDI_EXTENDED_SAP 0xAA
+#define FDDI_UI_CMD 0x03
+
+struct fddi_8022_1_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ } __attribute__ ((packed));
+
+struct fddi_8022_2_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl_1;
+ __u8 ctrl_2;
+ } __attribute__ ((packed));
+
+#define FDDI_K_OUI_LEN 3
+struct fddi_snap_hdr
+ {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ __u8 oui[FDDI_K_OUI_LEN];
+ __be16 ethertype;
+ } __attribute__ ((packed));
+
+struct fddihdr
+ {
+ __u8 fc;
+ __u8 daddr[FDDI_K_ALEN];
+ __u8 saddr[FDDI_K_ALEN];
+ union
+ {
+ struct fddi_8022_1_hdr llc_8022_1;
+ struct fddi_8022_2_hdr llc_8022_2;
+ struct fddi_snap_hdr llc_snap;
+ } hdr;
+ } __attribute__ ((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_hippi.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_hippi.h
new file mode 100644
index 0000000..52d36f6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_hippi.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_HIPPI_H
+#define _LINUX_IF_HIPPI_H
+
+#include <asm/byteorder.h>
+
+#define HIPPI_ALEN 6
+#define HIPPI_HLEN sizeof(struct hippi_hdr)
+#define HIPPI_ZLEN 0
+#define HIPPI_DATA_LEN 65280
+#define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN)
+
+#define HIPPI_EXTENDED_SAP 0xAA
+#define HIPPI_UI_CMD 0x03
+
+struct hipnet_statistics
+{
+ int rx_packets;
+ int tx_packets;
+ int rx_errors;
+ int tx_errors;
+ int rx_dropped;
+ int tx_dropped;
+
+ int rx_length_errors;
+ int rx_over_errors;
+ int rx_crc_errors;
+ int rx_frame_errors;
+ int rx_fifo_errors;
+ int rx_missed_errors;
+
+ int tx_aborted_errors;
+ int tx_carrier_errors;
+ int tx_fifo_errors;
+ int tx_heartbeat_errors;
+ int tx_window_errors;
+};
+
+struct hippi_fp_hdr
+{
+ __be32 fixed;
+ __be32 d2_size;
+} __attribute__ ((packed));
+
+struct hippi_le_hdr
+{
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 fc:3;
+ __u8 double_wide:1;
+ __u8 message_type:4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 message_type:4;
+ __u8 double_wide:1;
+ __u8 fc:3;
+#endif
+ __u8 dest_switch_addr[3];
+#ifdef __BIG_ENDIAN_BITFIELD
+ __u8 dest_addr_type:4,
+ src_addr_type:4;
+#elif defined(__LITTLE_ENDIAN_BITFIELD)
+ __u8 src_addr_type:4,
+ dest_addr_type:4;
+#endif
+ __u8 src_switch_addr[3];
+ __u16 reserved;
+ __u8 daddr[HIPPI_ALEN];
+ __u16 locally_administered;
+ __u8 saddr[HIPPI_ALEN];
+} __attribute__ ((packed));
+
+#define HIPPI_OUI_LEN 3
+
+struct hippi_snap_hdr
+{
+ __u8 dsap;
+ __u8 ssap;
+ __u8 ctrl;
+ __u8 oui[HIPPI_OUI_LEN];
+ __be16 ethertype;
+} __attribute__ ((packed));
+
+struct hippi_hdr
+{
+ struct hippi_fp_hdr fp;
+ struct hippi_le_hdr le;
+ struct hippi_snap_hdr snap;
+} __attribute__ ((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_packet.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_packet.h
new file mode 100644
index 0000000..1aa3bea
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_packet.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IF_PACKET_H
+#define __LINUX_IF_PACKET_H
+
+struct sockaddr_pkt
+{
+ unsigned short spkt_family;
+ unsigned char spkt_device[14];
+ unsigned short spkt_protocol;
+};
+
+struct sockaddr_ll
+{
+ unsigned short sll_family;
+ unsigned short sll_protocol;
+ int sll_ifindex;
+ unsigned short sll_hatype;
+ unsigned char sll_pkttype;
+ unsigned char sll_halen;
+ unsigned char sll_addr[8];
+};
+
+#define PACKET_HOST 0
+#define PACKET_BROADCAST 1
+#define PACKET_MULTICAST 2
+#define PACKET_OTHERHOST 3
+#define PACKET_OUTGOING 4
+
+#define PACKET_LOOPBACK 5
+#define PACKET_FASTROUTE 6
+
+#define PACKET_ADD_MEMBERSHIP 1
+#define PACKET_DROP_MEMBERSHIP 2
+#define PACKET_RECV_OUTPUT 3
+
+#define PACKET_RX_RING 5
+#define PACKET_STATISTICS 6
+#define PACKET_COPY_THRESH 7
+
+struct tpacket_stats
+{
+ unsigned int tp_packets;
+ unsigned int tp_drops;
+};
+
+struct tpacket_hdr
+{
+ unsigned long tp_status;
+#define TP_STATUS_KERNEL 0
+#define TP_STATUS_USER 1
+#define TP_STATUS_COPY 2
+#define TP_STATUS_LOSING 4
+#define TP_STATUS_CSUMNOTREADY 8
+ unsigned int tp_len;
+ unsigned int tp_snaplen;
+ unsigned short tp_mac;
+ unsigned short tp_net;
+ unsigned int tp_sec;
+ unsigned int tp_usec;
+};
+
+#define TPACKET_ALIGNMENT 16
+#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
+#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
+
+struct tpacket_req
+{
+ unsigned int tp_block_size;
+ unsigned int tp_block_nr;
+ unsigned int tp_frame_size;
+ unsigned int tp_frame_nr;
+};
+
+struct packet_mreq
+{
+ int mr_ifindex;
+ unsigned short mr_type;
+ unsigned short mr_alen;
+ unsigned char mr_address[8];
+};
+
+#define PACKET_MR_MULTICAST 0
+#define PACKET_MR_PROMISC 1
+#define PACKET_MR_ALLMULTI 2
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_ppp.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_ppp.h
new file mode 100644
index 0000000..9f35c97
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_ppp.h
@@ -0,0 +1,116 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IF_PPP_H_
+#define _IF_PPP_H_
+
+#include <linux/compiler.h>
+
+#define PPP_MTU 1500
+#define PPP_MAXMRU 65000
+#define PROTO_IPX 0x002b
+#define PROTO_DNA_RT 0x0027
+
+#define SC_COMP_PROT 0x00000001
+#define SC_COMP_AC 0x00000002
+#define SC_COMP_TCP 0x00000004
+#define SC_NO_TCP_CCID 0x00000008
+#define SC_REJ_COMP_AC 0x00000010
+#define SC_REJ_COMP_TCP 0x00000020
+#define SC_CCP_OPEN 0x00000040
+#define SC_CCP_UP 0x00000080
+#define SC_ENABLE_IP 0x00000100
+#define SC_LOOP_TRAFFIC 0x00000200
+#define SC_MULTILINK 0x00000400
+#define SC_MP_SHORTSEQ 0x00000800
+#define SC_COMP_RUN 0x00001000
+#define SC_DECOMP_RUN 0x00002000
+#define SC_MP_XSHORTSEQ 0x00004000
+#define SC_DEBUG 0x00010000
+#define SC_LOG_INPKT 0x00020000
+#define SC_LOG_OUTPKT 0x00040000
+#define SC_LOG_RAWIN 0x00080000
+#define SC_LOG_FLUSH 0x00100000
+#define SC_SYNC 0x00200000
+#define SC_MUST_COMP 0x00400000
+#define SC_MASK 0x0f600fff
+
+#define SC_XMIT_BUSY 0x10000000
+#define SC_RCV_ODDP 0x08000000
+#define SC_RCV_EVNP 0x04000000
+#define SC_RCV_B7_1 0x02000000
+#define SC_RCV_B7_0 0x01000000
+#define SC_DC_FERROR 0x00800000
+#define SC_DC_ERROR 0x00400000
+
+struct npioctl {
+ int protocol;
+ enum NPmode mode;
+};
+
+struct ppp_option_data {
+ __u8 __user *ptr;
+ __u32 length;
+ int transmit;
+};
+
+struct ifpppstatsreq {
+ struct ifreq b;
+ struct ppp_stats stats;
+};
+
+struct ifpppcstatsreq {
+ struct ifreq b;
+ struct ppp_comp_stats stats;
+};
+
+#define ifr__name b.ifr_ifrn.ifrn_name
+#define stats_ptr b.ifr_ifru.ifru_data
+
+#define PPPIOCGFLAGS _IOR('t', 90, int)
+#define PPPIOCSFLAGS _IOW('t', 89, int)
+#define PPPIOCGASYNCMAP _IOR('t', 88, int)
+#define PPPIOCSASYNCMAP _IOW('t', 87, int)
+#define PPPIOCGUNIT _IOR('t', 86, int)
+#define PPPIOCGRASYNCMAP _IOR('t', 85, int)
+#define PPPIOCSRASYNCMAP _IOW('t', 84, int)
+#define PPPIOCGMRU _IOR('t', 83, int)
+#define PPPIOCSMRU _IOW('t', 82, int)
+#define PPPIOCSMAXCID _IOW('t', 81, int)
+#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm)
+#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm)
+#define PPPIOCXFERUNIT _IO('t', 78)
+#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
+#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl)
+#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl)
+#define PPPIOCSPASS _IOW('t', 71, struct sock_fprog)
+#define PPPIOCSACTIVE _IOW('t', 70, struct sock_fprog)
+#define PPPIOCGDEBUG _IOR('t', 65, int)
+#define PPPIOCSDEBUG _IOW('t', 64, int)
+#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle)
+#define PPPIOCNEWUNIT _IOWR('t', 62, int)
+#define PPPIOCATTACH _IOW('t', 61, int)
+#define PPPIOCDETACH _IOW('t', 60, int)
+#define PPPIOCSMRRU _IOW('t', 59, int)
+#define PPPIOCCONNECT _IOW('t', 58, int)
+#define PPPIOCDISCONN _IO('t', 57)
+#define PPPIOCATTCHAN _IOW('t', 56, int)
+#define PPPIOCGCHAN _IOR('t', 55, int)
+
+#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
+#define SIOCGPPPVER (SIOCDEVPRIVATE + 1)
+#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
+
+#ifndef ifr_mtu
+#define ifr_mtu ifr_ifru.ifru_metric
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_tr.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_tr.h
new file mode 100644
index 0000000..7d6319a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_tr.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_TR_H
+#define _LINUX_IF_TR_H
+
+#include <asm/byteorder.h>
+
+#define TR_ALEN 6
+#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc))
+#define AC 0x10
+#define LLC_FRAME 0x40
+
+#define EXTENDED_SAP 0xAA
+#define UI_CMD 0x03
+
+struct trh_hdr {
+ __u8 ac;
+ __u8 fc;
+ __u8 daddr[TR_ALEN];
+ __u8 saddr[TR_ALEN];
+ __be16 rcf;
+ __be16 rseg[8];
+};
+
+struct trllc {
+ __u8 dsap;
+ __u8 ssap;
+ __u8 llc;
+ __u8 protid[3];
+ __be16 ethertype;
+};
+
+struct tr_statistics {
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors;
+ unsigned long tx_errors;
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long multicast;
+ unsigned long transmit_collision;
+
+ unsigned long line_errors;
+ unsigned long internal_errors;
+ unsigned long burst_errors;
+ unsigned long A_C_errors;
+ unsigned long abort_delimiters;
+ unsigned long lost_frames;
+ unsigned long recv_congest_count;
+ unsigned long frame_copied_errors;
+ unsigned long frequency_errors;
+ unsigned long token_errors;
+ unsigned long dummy1;
+};
+
+#define TR_RII 0x80
+#define TR_RCF_DIR_BIT 0x80
+#define TR_RCF_LEN_MASK 0x1f00
+#define TR_RCF_BROADCAST 0x8000
+#define TR_RCF_LIMITED_BROADCAST 0xC000
+#define TR_RCF_FRAME2K 0x20
+#define TR_RCF_BROADCAST_MASK 0xC000
+#define TR_MAXRIFLEN 18
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_tun.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_tun.h
new file mode 100644
index 0000000..c5db4e0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_tun.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __IF_TUN_H
+#define __IF_TUN_H
+
+#define TUN_READQ_SIZE 500
+
+#define TUN_TUN_DEV 0x0001
+#define TUN_TAP_DEV 0x0002
+#define TUN_TYPE_MASK 0x000f
+
+#define TUN_FASYNC 0x0010
+#define TUN_NOCHECKSUM 0x0020
+#define TUN_NO_PI 0x0040
+#define TUN_ONE_QUEUE 0x0080
+#define TUN_PERSIST 0x0100
+
+#define TUNSETNOCSUM _IOW('T', 200, int)
+#define TUNSETDEBUG _IOW('T', 201, int)
+#define TUNSETIFF _IOW('T', 202, int)
+#define TUNSETPERSIST _IOW('T', 203, int)
+#define TUNSETOWNER _IOW('T', 204, int)
+#define TUNSETLINK _IOW('T', 205, int)
+
+#define IFF_TUN 0x0001
+#define IFF_TAP 0x0002
+#define IFF_NO_PI 0x1000
+#define IFF_ONE_QUEUE 0x2000
+
+struct tun_pi {
+ unsigned short flags;
+ unsigned short proto;
+};
+#define TUN_PKT_STRIP 0x0001
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/if_vlan.h b/6/platforms/android-3/arch-x86/usr/include/linux/if_vlan.h
new file mode 100644
index 0000000..d3d2df2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/if_vlan.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IF_VLAN_H_
+#define _LINUX_IF_VLAN_H_
+
+enum vlan_ioctl_cmds {
+ ADD_VLAN_CMD,
+ DEL_VLAN_CMD,
+ SET_VLAN_INGRESS_PRIORITY_CMD,
+ SET_VLAN_EGRESS_PRIORITY_CMD,
+ GET_VLAN_INGRESS_PRIORITY_CMD,
+ GET_VLAN_EGRESS_PRIORITY_CMD,
+ SET_VLAN_NAME_TYPE_CMD,
+ SET_VLAN_FLAG_CMD,
+ GET_VLAN_REALDEV_NAME_CMD,
+ GET_VLAN_VID_CMD
+};
+
+enum vlan_name_types {
+ VLAN_NAME_TYPE_PLUS_VID,
+ VLAN_NAME_TYPE_RAW_PLUS_VID,
+ VLAN_NAME_TYPE_PLUS_VID_NO_PAD,
+ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD,
+ VLAN_NAME_TYPE_HIGHEST
+};
+
+struct vlan_ioctl_args {
+ int cmd;
+ char device1[24];
+
+ union {
+ char device2[24];
+ int VID;
+ unsigned int skb_priority;
+ unsigned int name_type;
+ unsigned int bind_type;
+ unsigned int flag;
+ } u;
+
+ short vlan_qos;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/in.h b/6/platforms/android-3/arch-x86/usr/include/linux/in.h
new file mode 100644
index 0000000..894e2da
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/in.h
@@ -0,0 +1,211 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IN_H
+#define _LINUX_IN_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+
+enum {
+ IPPROTO_IP = 0,
+ IPPROTO_ICMP = 1,
+ IPPROTO_IGMP = 2,
+ IPPROTO_IPIP = 4,
+ IPPROTO_TCP = 6,
+ IPPROTO_EGP = 8,
+ IPPROTO_PUP = 12,
+ IPPROTO_UDP = 17,
+ IPPROTO_IDP = 22,
+ IPPROTO_DCCP = 33,
+ IPPROTO_RSVP = 46,
+ IPPROTO_GRE = 47,
+
+ IPPROTO_IPV6 = 41,
+
+ IPPROTO_ESP = 50,
+ IPPROTO_AH = 51,
+ IPPROTO_PIM = 103,
+
+ IPPROTO_COMP = 108,
+ IPPROTO_SCTP = 132,
+
+ IPPROTO_RAW = 255,
+ IPPROTO_MAX
+};
+
+struct in_addr {
+ __u32 s_addr;
+};
+
+#define IP_TOS 1
+#define IP_TTL 2
+#define IP_HDRINCL 3
+#define IP_OPTIONS 4
+#define IP_ROUTER_ALERT 5
+#define IP_RECVOPTS 6
+#define IP_RETOPTS 7
+#define IP_PKTINFO 8
+#define IP_PKTOPTIONS 9
+#define IP_MTU_DISCOVER 10
+#define IP_RECVERR 11
+#define IP_RECVTTL 12
+#define IP_RECVTOS 13
+#define IP_MTU 14
+#define IP_FREEBIND 15
+#define IP_IPSEC_POLICY 16
+#define IP_XFRM_POLICY 17
+#define IP_PASSSEC 18
+
+#define IP_RECVRETOPTS IP_RETOPTS
+
+#define IP_PMTUDISC_DONT 0
+#define IP_PMTUDISC_WANT 1
+#define IP_PMTUDISC_DO 2
+
+#define IP_MULTICAST_IF 32
+#define IP_MULTICAST_TTL 33
+#define IP_MULTICAST_LOOP 34
+#define IP_ADD_MEMBERSHIP 35
+#define IP_DROP_MEMBERSHIP 36
+#define IP_UNBLOCK_SOURCE 37
+#define IP_BLOCK_SOURCE 38
+#define IP_ADD_SOURCE_MEMBERSHIP 39
+#define IP_DROP_SOURCE_MEMBERSHIP 40
+#define IP_MSFILTER 41
+#define MCAST_JOIN_GROUP 42
+#define MCAST_BLOCK_SOURCE 43
+#define MCAST_UNBLOCK_SOURCE 44
+#define MCAST_LEAVE_GROUP 45
+#define MCAST_JOIN_SOURCE_GROUP 46
+#define MCAST_LEAVE_SOURCE_GROUP 47
+#define MCAST_MSFILTER 48
+
+#define MCAST_EXCLUDE 0
+#define MCAST_INCLUDE 1
+
+#define IP_DEFAULT_MULTICAST_TTL 1
+#define IP_DEFAULT_MULTICAST_LOOP 1
+
+struct ip_mreq
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+
+struct ip_mreqn
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_address;
+ int imr_ifindex;
+};
+
+struct ip_mreq_source {
+ __u32 imr_multiaddr;
+ __u32 imr_interface;
+ __u32 imr_sourceaddr;
+};
+
+struct ip_msfilter {
+ __u32 imsf_multiaddr;
+ __u32 imsf_interface;
+ __u32 imsf_fmode;
+ __u32 imsf_numsrc;
+ __u32 imsf_slist[1];
+};
+
+#define IP_MSFILTER_SIZE(numsrc) (sizeof(struct ip_msfilter) - sizeof(__u32) + (numsrc) * sizeof(__u32))
+
+struct group_req
+{
+ __u32 gr_interface;
+ struct __kernel_sockaddr_storage gr_group;
+};
+
+struct group_source_req
+{
+ __u32 gsr_interface;
+ struct __kernel_sockaddr_storage gsr_group;
+ struct __kernel_sockaddr_storage gsr_source;
+};
+
+struct group_filter
+{
+ __u32 gf_interface;
+ struct __kernel_sockaddr_storage gf_group;
+ __u32 gf_fmode;
+ __u32 gf_numsrc;
+ struct __kernel_sockaddr_storage gf_slist[1];
+};
+
+#define GROUP_FILTER_SIZE(numsrc) (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) + (numsrc) * sizeof(struct __kernel_sockaddr_storage))
+
+struct in_pktinfo
+{
+ int ipi_ifindex;
+ struct in_addr ipi_spec_dst;
+ struct in_addr ipi_addr;
+};
+
+#define __SOCK_SIZE__ 16
+struct sockaddr_in {
+ sa_family_t sin_family;
+ unsigned short int sin_port;
+ struct in_addr sin_addr;
+
+ unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
+ sizeof(unsigned short int) - sizeof(struct in_addr)];
+};
+#define sin_zero __pad
+
+#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
+#define IN_CLASSA_NET 0xff000000
+#define IN_CLASSA_NSHIFT 24
+#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
+#define IN_CLASSA_MAX 128
+
+#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
+#define IN_CLASSB_NET 0xffff0000
+#define IN_CLASSB_NSHIFT 16
+#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
+#define IN_CLASSB_MAX 65536
+
+#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000)
+#define IN_CLASSC_NET 0xffffff00
+#define IN_CLASSC_NSHIFT 8
+#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
+
+#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
+#define IN_MULTICAST(a) IN_CLASSD(a)
+#define IN_MULTICAST_NET 0xF0000000
+
+#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
+#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
+
+#define INADDR_ANY ((unsigned long int) 0x00000000)
+
+#define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
+
+#define INADDR_NONE ((unsigned long int) 0xffffffff)
+
+#define IN_LOOPBACKNET 127
+
+#define INADDR_LOOPBACK 0x7f000001
+#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
+
+#define INADDR_UNSPEC_GROUP 0xe0000000U
+#define INADDR_ALLHOSTS_GROUP 0xe0000001U
+#define INADDR_ALLRTRS_GROUP 0xe0000002U
+#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU
+
+#include <asm/byteorder.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/in6.h b/6/platforms/android-3/arch-x86/usr/include/linux/in6.h
new file mode 100644
index 0000000..ceaeb7d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/in6.h
@@ -0,0 +1,158 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IN6_H
+#define _LINUX_IN6_H
+
+#include <linux/types.h>
+
+struct in6_addr
+{
+ union
+ {
+ __u8 u6_addr8[16];
+ __u16 u6_addr16[8];
+ __u32 u6_addr32[4];
+ } in6_u;
+#define s6_addr in6_u.u6_addr8
+#define s6_addr16 in6_u.u6_addr16
+#define s6_addr32 in6_u.u6_addr32
+};
+
+#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
+
+struct sockaddr_in6 {
+ unsigned short int sin6_family;
+ __u16 sin6_port;
+ __u32 sin6_flowinfo;
+ struct in6_addr sin6_addr;
+ __u32 sin6_scope_id;
+};
+
+struct ipv6_mreq {
+
+ struct in6_addr ipv6mr_multiaddr;
+
+ int ipv6mr_ifindex;
+};
+
+#define ipv6mr_acaddr ipv6mr_multiaddr
+
+struct in6_flowlabel_req
+{
+ struct in6_addr flr_dst;
+ __u32 flr_label;
+ __u8 flr_action;
+ __u8 flr_share;
+ __u16 flr_flags;
+ __u16 flr_expires;
+ __u16 flr_linger;
+ __u32 __flr_pad;
+
+};
+
+#define IPV6_FL_A_GET 0
+#define IPV6_FL_A_PUT 1
+#define IPV6_FL_A_RENEW 2
+
+#define IPV6_FL_F_CREATE 1
+#define IPV6_FL_F_EXCL 2
+
+#define IPV6_FL_S_NONE 0
+#define IPV6_FL_S_EXCL 1
+#define IPV6_FL_S_PROCESS 2
+#define IPV6_FL_S_USER 3
+#define IPV6_FL_S_ANY 255
+
+#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
+#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
+
+#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
+#define IPV6_PRIORITY_FILLER 0x0100
+#define IPV6_PRIORITY_UNATTENDED 0x0200
+#define IPV6_PRIORITY_RESERVED1 0x0300
+#define IPV6_PRIORITY_BULK 0x0400
+#define IPV6_PRIORITY_RESERVED2 0x0500
+#define IPV6_PRIORITY_INTERACTIVE 0x0600
+#define IPV6_PRIORITY_CONTROL 0x0700
+#define IPV6_PRIORITY_8 0x0800
+#define IPV6_PRIORITY_9 0x0900
+#define IPV6_PRIORITY_10 0x0a00
+#define IPV6_PRIORITY_11 0x0b00
+#define IPV6_PRIORITY_12 0x0c00
+#define IPV6_PRIORITY_13 0x0d00
+#define IPV6_PRIORITY_14 0x0e00
+#define IPV6_PRIORITY_15 0x0f00
+
+#define IPPROTO_HOPOPTS 0
+#define IPPROTO_ROUTING 43
+#define IPPROTO_FRAGMENT 44
+#define IPPROTO_ICMPV6 58
+#define IPPROTO_NONE 59
+#define IPPROTO_DSTOPTS 60
+
+#define IPV6_TLV_PAD0 0
+#define IPV6_TLV_PADN 1
+#define IPV6_TLV_ROUTERALERT 5
+#define IPV6_TLV_JUMBO 194
+
+#define IPV6_ADDRFORM 1
+#define IPV6_2292PKTINFO 2
+#define IPV6_2292HOPOPTS 3
+#define IPV6_2292DSTOPTS 4
+#define IPV6_2292RTHDR 5
+#define IPV6_2292PKTOPTIONS 6
+#define IPV6_CHECKSUM 7
+#define IPV6_2292HOPLIMIT 8
+#define IPV6_NEXTHOP 9
+#define IPV6_AUTHHDR 10
+#define IPV6_FLOWINFO 11
+
+#define IPV6_UNICAST_HOPS 16
+#define IPV6_MULTICAST_IF 17
+#define IPV6_MULTICAST_HOPS 18
+#define IPV6_MULTICAST_LOOP 19
+#define IPV6_ADD_MEMBERSHIP 20
+#define IPV6_DROP_MEMBERSHIP 21
+#define IPV6_ROUTER_ALERT 22
+#define IPV6_MTU_DISCOVER 23
+#define IPV6_MTU 24
+#define IPV6_RECVERR 25
+#define IPV6_V6ONLY 26
+#define IPV6_JOIN_ANYCAST 27
+#define IPV6_LEAVE_ANYCAST 28
+
+#define IPV6_PMTUDISC_DONT 0
+#define IPV6_PMTUDISC_WANT 1
+#define IPV6_PMTUDISC_DO 2
+
+#define IPV6_FLOWLABEL_MGR 32
+#define IPV6_FLOWINFO_SEND 33
+
+#define IPV6_IPSEC_POLICY 34
+#define IPV6_XFRM_POLICY 35
+
+#define IPV6_RECVPKTINFO 49
+#define IPV6_PKTINFO 50
+#define IPV6_RECVHOPLIMIT 51
+#define IPV6_HOPLIMIT 52
+#define IPV6_RECVHOPOPTS 53
+#define IPV6_HOPOPTS 54
+#define IPV6_RTHDRDSTOPTS 55
+#define IPV6_RECVRTHDR 56
+#define IPV6_RTHDR 57
+#define IPV6_RECVDSTOPTS 58
+#define IPV6_DSTOPTS 59
+
+#define IPV6_RECVTCLASS 66
+#define IPV6_TCLASS 67
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/init.h b/6/platforms/android-3/arch-x86/usr/include/linux/init.h
new file mode 100644
index 0000000..846c4eb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/init.h
@@ -0,0 +1,137 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INIT_H
+#define _LINUX_INIT_H
+
+#include <linux/compiler.h>
+
+#define __init __attribute__ ((__section__ (".init.text")))
+#define __initdata __attribute__ ((__section__ (".init.data")))
+#define __exitdata __attribute__ ((__section__(".exit.data")))
+#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
+
+#ifdef MODULE
+#define __exit __attribute__ ((__section__(".exit.text")))
+#else
+#define __exit __attribute_used__ __attribute__ ((__section__(".exit.text")))
+#endif
+
+#define __INIT .section ".init.text","ax"
+#define __FINIT .previous
+#define __INITDATA .section ".init.data","aw"
+
+#ifndef __ASSEMBLY__
+
+typedef int (*initcall_t)(void);
+typedef void (*exitcall_t)(void);
+
+#endif
+
+#ifndef MODULE
+
+#ifndef __ASSEMBLY__
+
+#define __define_initcall(level,fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".initcall" level ".init"))) = fn
+
+#define core_initcall(fn) __define_initcall("1",fn)
+#define postcore_initcall(fn) __define_initcall("2",fn)
+#define arch_initcall(fn) __define_initcall("3",fn)
+#define subsys_initcall(fn) __define_initcall("4",fn)
+#define fs_initcall(fn) __define_initcall("5",fn)
+#define device_initcall(fn) __define_initcall("6",fn)
+#define late_initcall(fn) __define_initcall("7",fn)
+
+#define __initcall(fn) device_initcall(fn)
+
+#define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn
+
+#define console_initcall(fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".con_initcall.init")))=fn
+
+#define security_initcall(fn) static initcall_t __initcall_##fn __attribute_used__ __attribute__((__section__(".security_initcall.init"))) = fn
+
+struct obs_kernel_param {
+ const char *str;
+ int (*setup_func)(char *);
+ int early;
+};
+
+#define __setup_param(str, unique_id, fn, early) static char __setup_str_##unique_id[] __initdata = str; static struct obs_kernel_param __setup_##unique_id __attribute_used__ __attribute__((__section__(".init.setup"))) __attribute__((aligned((sizeof(long))))) = { __setup_str_##unique_id, fn, early }
+
+#define __setup_null_param(str, unique_id) __setup_param(str, unique_id, NULL, 0)
+
+#define __setup(str, fn) __setup_param(str, fn, fn, 0)
+
+#define __obsolete_setup(str) __setup_null_param(str, __LINE__)
+
+#define early_param(str, fn) __setup_param(str, fn, fn, 1)
+
+#endif
+
+#define module_init(x) __initcall(x);
+
+#define module_exit(x) __exitcall(x);
+
+#else
+
+#define core_initcall(fn) module_init(fn)
+#define postcore_initcall(fn) module_init(fn)
+#define arch_initcall(fn) module_init(fn)
+#define subsys_initcall(fn) module_init(fn)
+#define fs_initcall(fn) module_init(fn)
+#define device_initcall(fn) module_init(fn)
+#define late_initcall(fn) module_init(fn)
+
+#define security_initcall(fn) module_init(fn)
+
+#define module_init(initfn) static inline initcall_t __inittest(void) { return initfn; } int init_module(void) __attribute__((alias(#initfn)));
+
+#define module_exit(exitfn) static inline exitcall_t __exittest(void) { return exitfn; } void cleanup_module(void) __attribute__((alias(#exitfn)));
+
+#define __setup_param(str, unique_id, fn)
+#define __setup_null_param(str, unique_id)
+#define __setup(str, func)
+#define __obsolete_setup(str)
+#endif
+
+#define __nosavedata __attribute__ ((__section__ (".data.nosave")))
+
+#define __init_or_module __init
+#define __initdata_or_module __initdata
+
+#define __devinit __init
+#define __devinitdata __initdata
+#define __devexit __exit
+#define __devexitdata __exitdata
+
+#define __cpuinit __init
+#define __cpuinitdata __initdata
+#define __cpuexit __exit
+#define __cpuexitdata __exitdata
+
+#define __meminit __init
+#define __meminitdata __initdata
+#define __memexit __exit
+#define __memexitdata __exitdata
+
+#ifdef MODULE
+#define __devexit_p(x) x
+#else
+#define __devexit_p(x) NULL
+#endif
+
+#ifdef MODULE
+#define __exit_p(x) x
+#else
+#define __exit_p(x) NULL
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/inotify.h b/6/platforms/android-3/arch-x86/usr/include/linux/inotify.h
new file mode 100644
index 0000000..db53417
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/inotify.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INOTIFY_H
+#define _LINUX_INOTIFY_H
+
+#include <linux/types.h>
+
+struct inotify_event {
+ __s32 wd;
+ __u32 mask;
+ __u32 cookie;
+ __u32 len;
+ char name[0];
+};
+
+#define IN_ACCESS 0x00000001
+#define IN_MODIFY 0x00000002
+#define IN_ATTRIB 0x00000004
+#define IN_CLOSE_WRITE 0x00000008
+#define IN_CLOSE_NOWRITE 0x00000010
+#define IN_OPEN 0x00000020
+#define IN_MOVED_FROM 0x00000040
+#define IN_MOVED_TO 0x00000080
+#define IN_CREATE 0x00000100
+#define IN_DELETE 0x00000200
+#define IN_DELETE_SELF 0x00000400
+#define IN_MOVE_SELF 0x00000800
+
+#define IN_UNMOUNT 0x00002000
+#define IN_Q_OVERFLOW 0x00004000
+#define IN_IGNORED 0x00008000
+
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO)
+
+#define IN_ONLYDIR 0x01000000
+#define IN_DONT_FOLLOW 0x02000000
+#define IN_MASK_ADD 0x20000000
+#define IN_ISDIR 0x40000000
+#define IN_ONESHOT 0x80000000
+
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | IN_MOVE_SELF)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/input.h b/6/platforms/android-3/arch-x86/usr/include/linux/input.h
new file mode 100644
index 0000000..96dae14
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/input.h
@@ -0,0 +1,715 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _INPUT_H
+#define _INPUT_H
+
+#include <sys/time.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <asm/types.h>
+
+struct input_event {
+ struct timeval time;
+ __u16 type;
+ __u16 code;
+ __s32 value;
+};
+
+#define EV_VERSION 0x010000
+
+struct input_id {
+ __u16 bustype;
+ __u16 vendor;
+ __u16 product;
+ __u16 version;
+};
+
+struct input_absinfo {
+ __s32 value;
+ __s32 minimum;
+ __s32 maximum;
+ __s32 fuzz;
+ __s32 flat;
+};
+
+#define EVIOCGVERSION _IOR('E', 0x01, int)
+#define EVIOCGID _IOR('E', 0x02, struct input_id)
+#define EVIOCGREP _IOR('E', 0x03, int[2])
+#define EVIOCSREP _IOW('E', 0x03, int[2])
+#define EVIOCGKEYCODE _IOR('E', 0x04, int[2])
+#define EVIOCSKEYCODE _IOW('E', 0x04, int[2])
+
+#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len)
+#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len)
+#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len)
+
+#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len)
+#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len)
+#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len)
+#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len)
+
+#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len)
+#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo)
+#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo)
+
+#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect))
+#define EVIOCRMFF _IOW('E', 0x81, int)
+#define EVIOCGEFFECTS _IOR('E', 0x84, int)
+
+#define EVIOCGRAB _IOW('E', 0x90, int)
+
+#define EV_SYN 0x00
+#define EV_KEY 0x01
+#define EV_REL 0x02
+#define EV_ABS 0x03
+#define EV_MSC 0x04
+#define EV_SW 0x05
+#define EV_LED 0x11
+#define EV_SND 0x12
+#define EV_REP 0x14
+#define EV_FF 0x15
+#define EV_PWR 0x16
+#define EV_FF_STATUS 0x17
+#define EV_MAX 0x1f
+
+#define SYN_REPORT 0
+#define SYN_CONFIG 1
+
+#define KEY_RESERVED 0
+#define KEY_ESC 1
+#define KEY_1 2
+#define KEY_2 3
+#define KEY_3 4
+#define KEY_4 5
+#define KEY_5 6
+#define KEY_6 7
+#define KEY_7 8
+#define KEY_8 9
+#define KEY_9 10
+#define KEY_0 11
+#define KEY_MINUS 12
+#define KEY_EQUAL 13
+#define KEY_BACKSPACE 14
+#define KEY_TAB 15
+#define KEY_Q 16
+#define KEY_W 17
+#define KEY_E 18
+#define KEY_R 19
+#define KEY_T 20
+#define KEY_Y 21
+#define KEY_U 22
+#define KEY_I 23
+#define KEY_O 24
+#define KEY_P 25
+#define KEY_LEFTBRACE 26
+#define KEY_RIGHTBRACE 27
+#define KEY_ENTER 28
+#define KEY_LEFTCTRL 29
+#define KEY_A 30
+#define KEY_S 31
+#define KEY_D 32
+#define KEY_F 33
+#define KEY_G 34
+#define KEY_H 35
+#define KEY_J 36
+#define KEY_K 37
+#define KEY_L 38
+#define KEY_SEMICOLON 39
+#define KEY_APOSTROPHE 40
+#define KEY_GRAVE 41
+#define KEY_LEFTSHIFT 42
+#define KEY_BACKSLASH 43
+#define KEY_Z 44
+#define KEY_X 45
+#define KEY_C 46
+#define KEY_V 47
+#define KEY_B 48
+#define KEY_N 49
+#define KEY_M 50
+#define KEY_COMMA 51
+#define KEY_DOT 52
+#define KEY_SLASH 53
+#define KEY_RIGHTSHIFT 54
+#define KEY_KPASTERISK 55
+#define KEY_LEFTALT 56
+#define KEY_SPACE 57
+#define KEY_CAPSLOCK 58
+#define KEY_F1 59
+#define KEY_F2 60
+#define KEY_F3 61
+#define KEY_F4 62
+#define KEY_F5 63
+#define KEY_F6 64
+#define KEY_F7 65
+#define KEY_F8 66
+#define KEY_F9 67
+#define KEY_F10 68
+#define KEY_NUMLOCK 69
+#define KEY_SCROLLLOCK 70
+#define KEY_KP7 71
+#define KEY_KP8 72
+#define KEY_KP9 73
+#define KEY_KPMINUS 74
+#define KEY_KP4 75
+#define KEY_KP5 76
+#define KEY_KP6 77
+#define KEY_KPPLUS 78
+#define KEY_KP1 79
+#define KEY_KP2 80
+#define KEY_KP3 81
+#define KEY_KP0 82
+#define KEY_KPDOT 83
+
+#define KEY_ZENKAKUHANKAKU 85
+#define KEY_102ND 86
+#define KEY_F11 87
+#define KEY_F12 88
+#define KEY_RO 89
+#define KEY_KATAKANA 90
+#define KEY_HIRAGANA 91
+#define KEY_HENKAN 92
+#define KEY_KATAKANAHIRAGANA 93
+#define KEY_MUHENKAN 94
+#define KEY_KPJPCOMMA 95
+#define KEY_KPENTER 96
+#define KEY_RIGHTCTRL 97
+#define KEY_KPSLASH 98
+#define KEY_SYSRQ 99
+#define KEY_RIGHTALT 100
+#define KEY_LINEFEED 101
+#define KEY_HOME 102
+#define KEY_UP 103
+#define KEY_PAGEUP 104
+#define KEY_LEFT 105
+#define KEY_RIGHT 106
+#define KEY_END 107
+#define KEY_DOWN 108
+#define KEY_PAGEDOWN 109
+#define KEY_INSERT 110
+#define KEY_DELETE 111
+#define KEY_MACRO 112
+#define KEY_MUTE 113
+#define KEY_VOLUMEDOWN 114
+#define KEY_VOLUMEUP 115
+#define KEY_POWER 116
+#define KEY_KPEQUAL 117
+#define KEY_KPPLUSMINUS 118
+#define KEY_PAUSE 119
+
+#define KEY_KPCOMMA 121
+#define KEY_HANGEUL 122
+#define KEY_HANGUEL KEY_HANGEUL
+#define KEY_HANJA 123
+#define KEY_YEN 124
+#define KEY_LEFTMETA 125
+#define KEY_RIGHTMETA 126
+#define KEY_COMPOSE 127
+
+#define KEY_STOP 128
+#define KEY_AGAIN 129
+#define KEY_PROPS 130
+#define KEY_UNDO 131
+#define KEY_FRONT 132
+#define KEY_COPY 133
+#define KEY_OPEN 134
+#define KEY_PASTE 135
+#define KEY_FIND 136
+#define KEY_CUT 137
+#define KEY_HELP 138
+#define KEY_MENU 139
+#define KEY_CALC 140
+#define KEY_SETUP 141
+#define KEY_SLEEP 142
+#define KEY_WAKEUP 143
+#define KEY_FILE 144
+#define KEY_SENDFILE 145
+#define KEY_DELETEFILE 146
+#define KEY_XFER 147
+#define KEY_PROG1 148
+#define KEY_PROG2 149
+#define KEY_WWW 150
+#define KEY_MSDOS 151
+#define KEY_COFFEE 152
+#define KEY_DIRECTION 153
+#define KEY_CYCLEWINDOWS 154
+#define KEY_MAIL 155
+#define KEY_BOOKMARKS 156
+#define KEY_COMPUTER 157
+#define KEY_BACK 158
+#define KEY_FORWARD 159
+#define KEY_CLOSECD 160
+#define KEY_EJECTCD 161
+#define KEY_EJECTCLOSECD 162
+#define KEY_NEXTSONG 163
+#define KEY_PLAYPAUSE 164
+#define KEY_PREVIOUSSONG 165
+#define KEY_STOPCD 166
+#define KEY_RECORD 167
+#define KEY_REWIND 168
+#define KEY_PHONE 169
+#define KEY_ISO 170
+#define KEY_CONFIG 171
+#define KEY_HOMEPAGE 172
+#define KEY_REFRESH 173
+#define KEY_EXIT 174
+#define KEY_MOVE 175
+#define KEY_EDIT 176
+#define KEY_SCROLLUP 177
+#define KEY_SCROLLDOWN 178
+#define KEY_KPLEFTPAREN 179
+#define KEY_KPRIGHTPAREN 180
+#define KEY_NEW 181
+#define KEY_REDO 182
+
+#define KEY_F13 183
+#define KEY_F14 184
+#define KEY_F15 185
+#define KEY_F16 186
+#define KEY_F17 187
+#define KEY_F18 188
+#define KEY_F19 189
+#define KEY_F20 190
+#define KEY_F21 191
+#define KEY_F22 192
+#define KEY_F23 193
+#define KEY_F24 194
+
+#define KEY_PLAYCD 200
+#define KEY_PAUSECD 201
+#define KEY_PROG3 202
+#define KEY_PROG4 203
+#define KEY_SUSPEND 205
+#define KEY_CLOSE 206
+#define KEY_PLAY 207
+#define KEY_FASTFORWARD 208
+#define KEY_BASSBOOST 209
+#define KEY_PRINT 210
+#define KEY_HP 211
+#define KEY_CAMERA 212
+#define KEY_SOUND 213
+#define KEY_QUESTION 214
+#define KEY_EMAIL 215
+#define KEY_CHAT 216
+#define KEY_SEARCH 217
+#define KEY_CONNECT 218
+#define KEY_FINANCE 219
+#define KEY_SPORT 220
+#define KEY_SHOP 221
+#define KEY_ALTERASE 222
+#define KEY_CANCEL 223
+#define KEY_BRIGHTNESSDOWN 224
+#define KEY_BRIGHTNESSUP 225
+#define KEY_MEDIA 226
+
+#define KEY_STAR 227
+#define KEY_SHARP 228
+#define KEY_SOFT1 229
+#define KEY_SOFT2 230
+#define KEY_SEND 231
+#define KEY_CENTER 232
+#define KEY_HEADSETHOOK 233
+#define KEY_0_5 234
+#define KEY_2_5 235
+
+#define KEY_SWITCHVIDEOMODE 236
+#define KEY_KBDILLUMTOGGLE 237
+#define KEY_KBDILLUMDOWN 238
+#define KEY_KBDILLUMUP 239
+
+#define KEY_SEND 231
+#define KEY_REPLY 232
+#define KEY_FORWARDMAIL 233
+#define KEY_SAVE 234
+#define KEY_DOCUMENTS 235
+
+#define KEY_BATTERY 236
+
+#define KEY_UNKNOWN 240
+
+#define BTN_MISC 0x100
+#define BTN_0 0x100
+#define BTN_1 0x101
+#define BTN_2 0x102
+#define BTN_3 0x103
+#define BTN_4 0x104
+#define BTN_5 0x105
+#define BTN_6 0x106
+#define BTN_7 0x107
+#define BTN_8 0x108
+#define BTN_9 0x109
+
+#define BTN_MOUSE 0x110
+#define BTN_LEFT 0x110
+#define BTN_RIGHT 0x111
+#define BTN_MIDDLE 0x112
+#define BTN_SIDE 0x113
+#define BTN_EXTRA 0x114
+#define BTN_FORWARD 0x115
+#define BTN_BACK 0x116
+#define BTN_TASK 0x117
+
+#define BTN_JOYSTICK 0x120
+#define BTN_TRIGGER 0x120
+#define BTN_THUMB 0x121
+#define BTN_THUMB2 0x122
+#define BTN_TOP 0x123
+#define BTN_TOP2 0x124
+#define BTN_PINKIE 0x125
+#define BTN_BASE 0x126
+#define BTN_BASE2 0x127
+#define BTN_BASE3 0x128
+#define BTN_BASE4 0x129
+#define BTN_BASE5 0x12a
+#define BTN_BASE6 0x12b
+#define BTN_DEAD 0x12f
+
+#define BTN_GAMEPAD 0x130
+#define BTN_A 0x130
+#define BTN_B 0x131
+#define BTN_C 0x132
+#define BTN_X 0x133
+#define BTN_Y 0x134
+#define BTN_Z 0x135
+#define BTN_TL 0x136
+#define BTN_TR 0x137
+#define BTN_TL2 0x138
+#define BTN_TR2 0x139
+#define BTN_SELECT 0x13a
+#define BTN_START 0x13b
+#define BTN_MODE 0x13c
+#define BTN_THUMBL 0x13d
+#define BTN_THUMBR 0x13e
+
+#define BTN_DIGI 0x140
+#define BTN_TOOL_PEN 0x140
+#define BTN_TOOL_RUBBER 0x141
+#define BTN_TOOL_BRUSH 0x142
+#define BTN_TOOL_PENCIL 0x143
+#define BTN_TOOL_AIRBRUSH 0x144
+#define BTN_TOOL_FINGER 0x145
+#define BTN_TOOL_MOUSE 0x146
+#define BTN_TOOL_LENS 0x147
+#define BTN_TOUCH 0x14a
+#define BTN_STYLUS 0x14b
+#define BTN_STYLUS2 0x14c
+#define BTN_TOOL_DOUBLETAP 0x14d
+#define BTN_TOOL_TRIPLETAP 0x14e
+
+#define BTN_WHEEL 0x150
+#define BTN_GEAR_DOWN 0x150
+#define BTN_GEAR_UP 0x151
+
+#define KEY_OK 0x160
+#define KEY_SELECT 0x161
+#define KEY_GOTO 0x162
+#define KEY_CLEAR 0x163
+#define KEY_POWER2 0x164
+#define KEY_OPTION 0x165
+#define KEY_INFO 0x166
+#define KEY_TIME 0x167
+#define KEY_VENDOR 0x168
+#define KEY_ARCHIVE 0x169
+#define KEY_PROGRAM 0x16a
+#define KEY_CHANNEL 0x16b
+#define KEY_FAVORITES 0x16c
+#define KEY_EPG 0x16d
+#define KEY_PVR 0x16e
+#define KEY_MHP 0x16f
+#define KEY_LANGUAGE 0x170
+#define KEY_TITLE 0x171
+#define KEY_SUBTITLE 0x172
+#define KEY_ANGLE 0x173
+#define KEY_ZOOM 0x174
+#define KEY_MODE 0x175
+#define KEY_KEYBOARD 0x176
+#define KEY_SCREEN 0x177
+#define KEY_PC 0x178
+#define KEY_TV 0x179
+#define KEY_TV2 0x17a
+#define KEY_VCR 0x17b
+#define KEY_VCR2 0x17c
+#define KEY_SAT 0x17d
+#define KEY_SAT2 0x17e
+#define KEY_CD 0x17f
+#define KEY_TAPE 0x180
+#define KEY_RADIO 0x181
+#define KEY_TUNER 0x182
+#define KEY_PLAYER 0x183
+#define KEY_TEXT 0x184
+#define KEY_DVD 0x185
+#define KEY_AUX 0x186
+#define KEY_MP3 0x187
+#define KEY_AUDIO 0x188
+#define KEY_VIDEO 0x189
+#define KEY_DIRECTORY 0x18a
+#define KEY_LIST 0x18b
+#define KEY_MEMO 0x18c
+#define KEY_CALENDAR 0x18d
+#define KEY_RED 0x18e
+#define KEY_GREEN 0x18f
+#define KEY_YELLOW 0x190
+#define KEY_BLUE 0x191
+#define KEY_CHANNELUP 0x192
+#define KEY_CHANNELDOWN 0x193
+#define KEY_FIRST 0x194
+#define KEY_LAST 0x195
+#define KEY_AB 0x196
+#define KEY_NEXT 0x197
+#define KEY_RESTART 0x198
+#define KEY_SLOW 0x199
+#define KEY_SHUFFLE 0x19a
+#define KEY_BREAK 0x19b
+#define KEY_PREVIOUS 0x19c
+#define KEY_DIGITS 0x19d
+#define KEY_TEEN 0x19e
+#define KEY_TWEN 0x19f
+
+#define KEY_DEL_EOL 0x1c0
+#define KEY_DEL_EOS 0x1c1
+#define KEY_INS_LINE 0x1c2
+#define KEY_DEL_LINE 0x1c3
+
+#define KEY_FN 0x1d0
+#define KEY_FN_ESC 0x1d1
+#define KEY_FN_F1 0x1d2
+#define KEY_FN_F2 0x1d3
+#define KEY_FN_F3 0x1d4
+#define KEY_FN_F4 0x1d5
+#define KEY_FN_F5 0x1d6
+#define KEY_FN_F6 0x1d7
+#define KEY_FN_F7 0x1d8
+#define KEY_FN_F8 0x1d9
+#define KEY_FN_F9 0x1da
+#define KEY_FN_F10 0x1db
+#define KEY_FN_F11 0x1dc
+#define KEY_FN_F12 0x1dd
+#define KEY_FN_1 0x1de
+#define KEY_FN_2 0x1df
+#define KEY_FN_D 0x1e0
+#define KEY_FN_E 0x1e1
+#define KEY_FN_F 0x1e2
+#define KEY_FN_S 0x1e3
+#define KEY_FN_B 0x1e4
+
+#define KEY_BRL_DOT1 0x1f1
+#define KEY_BRL_DOT2 0x1f2
+#define KEY_BRL_DOT3 0x1f3
+#define KEY_BRL_DOT4 0x1f4
+#define KEY_BRL_DOT5 0x1f5
+#define KEY_BRL_DOT6 0x1f6
+#define KEY_BRL_DOT7 0x1f7
+#define KEY_BRL_DOT8 0x1f8
+
+#define KEY_MIN_INTERESTING KEY_MUTE
+#define KEY_MAX 0x1ff
+
+#define REL_X 0x00
+#define REL_Y 0x01
+#define REL_Z 0x02
+#define REL_RX 0x03
+#define REL_RY 0x04
+#define REL_RZ 0x05
+#define REL_HWHEEL 0x06
+#define REL_DIAL 0x07
+#define REL_WHEEL 0x08
+#define REL_MISC 0x09
+#define REL_MAX 0x0f
+
+#define ABS_X 0x00
+#define ABS_Y 0x01
+#define ABS_Z 0x02
+#define ABS_RX 0x03
+#define ABS_RY 0x04
+#define ABS_RZ 0x05
+#define ABS_THROTTLE 0x06
+#define ABS_RUDDER 0x07
+#define ABS_WHEEL 0x08
+#define ABS_GAS 0x09
+#define ABS_BRAKE 0x0a
+#define ABS_HAT0X 0x10
+#define ABS_HAT0Y 0x11
+#define ABS_HAT1X 0x12
+#define ABS_HAT1Y 0x13
+#define ABS_HAT2X 0x14
+#define ABS_HAT2Y 0x15
+#define ABS_HAT3X 0x16
+#define ABS_HAT3Y 0x17
+#define ABS_PRESSURE 0x18
+#define ABS_DISTANCE 0x19
+#define ABS_TILT_X 0x1a
+#define ABS_TILT_Y 0x1b
+#define ABS_TOOL_WIDTH 0x1c
+#define ABS_VOLUME 0x20
+#define ABS_MISC 0x28
+#define ABS_MAX 0x3f
+
+#define SW_LID 0x00
+#define SW_TABLET_MODE 0x01
+#define SW_HEADPHONE_INSERT 0x02
+#define SW_MAX 0x0f
+
+#define MSC_SERIAL 0x00
+#define MSC_PULSELED 0x01
+#define MSC_GESTURE 0x02
+#define MSC_RAW 0x03
+#define MSC_SCAN 0x04
+#define MSC_MAX 0x07
+
+#define LED_NUML 0x00
+#define LED_CAPSL 0x01
+#define LED_SCROLLL 0x02
+#define LED_COMPOSE 0x03
+#define LED_KANA 0x04
+#define LED_SLEEP 0x05
+#define LED_SUSPEND 0x06
+#define LED_MUTE 0x07
+#define LED_MISC 0x08
+#define LED_MAIL 0x09
+#define LED_CHARGING 0x0a
+#define LED_MAX 0x0f
+
+#define REP_DELAY 0x00
+#define REP_PERIOD 0x01
+#define REP_MAX 0x01
+
+#define SND_CLICK 0x00
+#define SND_BELL 0x01
+#define SND_TONE 0x02
+#define SND_MAX 0x07
+
+#define ID_BUS 0
+#define ID_VENDOR 1
+#define ID_PRODUCT 2
+#define ID_VERSION 3
+
+#define BUS_PCI 0x01
+#define BUS_ISAPNP 0x02
+#define BUS_USB 0x03
+#define BUS_HIL 0x04
+#define BUS_BLUETOOTH 0x05
+
+#define BUS_ISA 0x10
+#define BUS_I8042 0x11
+#define BUS_XTKBD 0x12
+#define BUS_RS232 0x13
+#define BUS_GAMEPORT 0x14
+#define BUS_PARPORT 0x15
+#define BUS_AMIGA 0x16
+#define BUS_ADB 0x17
+#define BUS_I2C 0x18
+#define BUS_HOST 0x19
+#define BUS_GSC 0x1A
+
+#define FF_STATUS_STOPPED 0x00
+#define FF_STATUS_PLAYING 0x01
+#define FF_STATUS_MAX 0x01
+
+struct ff_replay {
+ __u16 length;
+ __u16 delay;
+};
+
+struct ff_trigger {
+ __u16 button;
+ __u16 interval;
+};
+
+struct ff_envelope {
+ __u16 attack_length;
+ __u16 attack_level;
+ __u16 fade_length;
+ __u16 fade_level;
+};
+
+struct ff_constant_effect {
+ __s16 level;
+ struct ff_envelope envelope;
+};
+
+struct ff_ramp_effect {
+ __s16 start_level;
+ __s16 end_level;
+ struct ff_envelope envelope;
+};
+
+struct ff_condition_effect {
+ __u16 right_saturation;
+ __u16 left_saturation;
+
+ __s16 right_coeff;
+ __s16 left_coeff;
+
+ __u16 deadband;
+ __s16 center;
+
+};
+
+struct ff_periodic_effect {
+ __u16 waveform;
+ __u16 period;
+ __s16 magnitude;
+ __s16 offset;
+ __u16 phase;
+
+ struct ff_envelope envelope;
+
+ __u32 custom_len;
+ __s16 *custom_data;
+
+};
+
+struct ff_rumble_effect {
+ __u16 strong_magnitude;
+ __u16 weak_magnitude;
+};
+
+struct ff_effect {
+ __u16 type;
+
+ __s16 id;
+
+ __u16 direction;
+
+ struct ff_trigger trigger;
+ struct ff_replay replay;
+
+ union {
+ struct ff_constant_effect constant;
+ struct ff_ramp_effect ramp;
+ struct ff_periodic_effect periodic;
+ struct ff_condition_effect condition[2];
+ struct ff_rumble_effect rumble;
+ } u;
+};
+
+#define FF_RUMBLE 0x50
+#define FF_PERIODIC 0x51
+#define FF_CONSTANT 0x52
+#define FF_SPRING 0x53
+#define FF_FRICTION 0x54
+#define FF_DAMPER 0x55
+#define FF_INERTIA 0x56
+#define FF_RAMP 0x57
+
+#define FF_SQUARE 0x58
+#define FF_TRIANGLE 0x59
+#define FF_SINE 0x5a
+#define FF_SAW_UP 0x5b
+#define FF_SAW_DOWN 0x5c
+#define FF_CUSTOM 0x5d
+
+#define FF_GAIN 0x60
+#define FF_AUTOCENTER 0x61
+
+#define FF_MAX 0x7f
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/interrupt.h b/6/platforms/android-3/arch-x86/usr/include/linux/interrupt.h
new file mode 100644
index 0000000..f48592f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/interrupt.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_INTERRUPT_H
+#define _LINUX_INTERRUPT_H
+
+#include <linux/kernel.h>
+#include <linux/linkage.h>
+#include <linux/bitops.h>
+#include <linux/preempt.h>
+#include <linux/cpumask.h>
+#include <linux/irqreturn.h>
+#include <linux/hardirq.h>
+#include <linux/sched.h>
+#include <linux/irqflags.h>
+#include <asm/atomic.h>
+#include <asm/ptrace.h>
+#include <asm/system.h>
+
+#define IRQF_TRIGGER_NONE 0x00000000
+#define IRQF_TRIGGER_RISING 0x00000001
+#define IRQF_TRIGGER_FALLING 0x00000002
+#define IRQF_TRIGGER_HIGH 0x00000004
+#define IRQF_TRIGGER_LOW 0x00000008
+#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
+#define IRQF_TRIGGER_PROBE 0x00000010
+
+#define IRQF_DISABLED 0x00000020
+#define IRQF_SAMPLE_RANDOM 0x00000040
+#define IRQF_SHARED 0x00000080
+#define IRQF_PROBE_SHARED 0x00000100
+#define IRQF_TIMER 0x00000200
+#define IRQF_PERCPU 0x00000400
+
+#define SA_INTERRUPT IRQF_DISABLED
+#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
+#define SA_SHIRQ IRQF_SHARED
+#define SA_PROBEIRQ IRQF_PROBE_SHARED
+#define SA_PERCPU IRQF_PERCPU
+
+#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
+#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
+#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
+#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
+#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
+
+struct irqaction {
+ irqreturn_t (*handler)(int, void *, struct pt_regs *);
+ unsigned long flags;
+ cpumask_t mask;
+ const char *name;
+ void *dev_id;
+ struct irqaction *next;
+ int irq;
+ struct proc_dir_entry *dir;
+};
+
+#define local_irq_enable_in_hardirq() local_irq_enable()
+
+#define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq)
+#define disable_irq_lockdep(irq) disable_irq(irq)
+#define enable_irq_lockdep(irq) enable_irq(irq)
+
+#ifndef __ARCH_SET_SOFTIRQ_PENDING
+#define set_softirq_pending(x) (local_softirq_pending() = (x))
+#define or_softirq_pending(x) (local_softirq_pending() |= (x))
+#endif
+
+#define save_flags(x) save_flags(&x)
+#define save_and_cli(x) save_and_cli(&x)
+
+enum
+{
+ HI_SOFTIRQ=0,
+ TIMER_SOFTIRQ,
+ NET_TX_SOFTIRQ,
+ NET_RX_SOFTIRQ,
+ BLOCK_SOFTIRQ,
+ TASKLET_SOFTIRQ
+};
+
+struct softirq_action
+{
+ void (*action)(struct softirq_action *);
+ void *data;
+};
+
+#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
+
+struct tasklet_struct
+{
+ struct tasklet_struct *next;
+ unsigned long state;
+ atomic_t count;
+ void (*func)(unsigned long);
+ unsigned long data;
+};
+
+#define DECLARE_TASKLET(name, func, data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
+
+#define DECLARE_TASKLET_DISABLED(name, func, data) struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
+
+enum
+{
+ TASKLET_STATE_SCHED,
+ TASKLET_STATE_RUN
+};
+
+#define tasklet_trylock(t) 1
+#define tasklet_unlock_wait(t) do { } while (0)
+#define tasklet_unlock(t) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ioctl.h b/6/platforms/android-3/arch-x86/usr/include/linux/ioctl.h
new file mode 100644
index 0000000..9efbeab
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ioctl.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IOCTL_H
+#define _LINUX_IOCTL_H
+
+#include <asm/ioctl.h>
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ioport.h b/6/platforms/android-3/arch-x86/usr/include/linux/ioport.h
new file mode 100644
index 0000000..b2081fc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ioport.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IOPORT_H
+#define _LINUX_IOPORT_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+struct resource {
+ resource_size_t start;
+ resource_size_t end;
+ const char *name;
+ unsigned long flags;
+ struct resource *parent, *sibling, *child;
+};
+
+struct resource_list {
+ struct resource_list *next;
+ struct resource *res;
+ struct pci_dev *dev;
+};
+
+#define IORESOURCE_BITS 0x000000ff
+
+#define IORESOURCE_IO 0x00000100
+#define IORESOURCE_MEM 0x00000200
+#define IORESOURCE_IRQ 0x00000400
+#define IORESOURCE_DMA 0x00000800
+
+#define IORESOURCE_PREFETCH 0x00001000
+#define IORESOURCE_READONLY 0x00002000
+#define IORESOURCE_CACHEABLE 0x00004000
+#define IORESOURCE_RANGELENGTH 0x00008000
+#define IORESOURCE_SHADOWABLE 0x00010000
+#define IORESOURCE_BUS_HAS_VGA 0x00080000
+
+#define IORESOURCE_DISABLED 0x10000000
+#define IORESOURCE_UNSET 0x20000000
+#define IORESOURCE_AUTO 0x40000000
+#define IORESOURCE_BUSY 0x80000000
+
+#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
+#define IORESOURCE_IRQ_LOWEDGE (1<<1)
+#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+#define IORESOURCE_IRQ_SHAREABLE (1<<4)
+
+#define IORESOURCE_DMA_TYPE_MASK (3<<0)
+#define IORESOURCE_DMA_8BIT (0<<0)
+#define IORESOURCE_DMA_8AND16BIT (1<<0)
+#define IORESOURCE_DMA_16BIT (2<<0)
+
+#define IORESOURCE_DMA_MASTER (1<<2)
+#define IORESOURCE_DMA_BYTE (1<<3)
+#define IORESOURCE_DMA_WORD (1<<4)
+
+#define IORESOURCE_DMA_SPEED_MASK (3<<6)
+#define IORESOURCE_DMA_COMPATIBLE (0<<6)
+#define IORESOURCE_DMA_TYPEA (1<<6)
+#define IORESOURCE_DMA_TYPEB (2<<6)
+#define IORESOURCE_DMA_TYPEF (3<<6)
+
+#define IORESOURCE_MEM_WRITEABLE (1<<0)
+#define IORESOURCE_MEM_CACHEABLE (1<<1)
+#define IORESOURCE_MEM_RANGELENGTH (1<<2)
+#define IORESOURCE_MEM_TYPE_MASK (3<<3)
+#define IORESOURCE_MEM_8BIT (0<<3)
+#define IORESOURCE_MEM_16BIT (1<<3)
+#define IORESOURCE_MEM_8AND16BIT (2<<3)
+#define IORESOURCE_MEM_32BIT (3<<3)
+#define IORESOURCE_MEM_SHADOWABLE (1<<5)
+#define IORESOURCE_MEM_EXPANSIONROM (1<<6)
+
+#define IORESOURCE_ROM_ENABLE (1<<0)
+#define IORESOURCE_ROM_SHADOW (1<<1)
+#define IORESOURCE_ROM_COPY (1<<2)
+
+#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
+#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
+#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
+
+#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
+#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
+#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ioprio.h b/6/platforms/android-3/arch-x86/usr/include/linux/ioprio.h
new file mode 100644
index 0000000..a0a5d48
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ioprio.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef IOPRIO_H
+#define IOPRIO_H
+
+#include <linux/sched.h>
+
+#define IOPRIO_BITS (16)
+#define IOPRIO_CLASS_SHIFT (13)
+#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
+
+#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
+#define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK)
+#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
+
+#define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
+
+enum {
+ IOPRIO_CLASS_NONE,
+ IOPRIO_CLASS_RT,
+ IOPRIO_CLASS_BE,
+ IOPRIO_CLASS_IDLE,
+};
+
+#define IOPRIO_BE_NR (8)
+
+enum {
+ IOPRIO_WHO_PROCESS = 1,
+ IOPRIO_WHO_PGRP,
+ IOPRIO_WHO_USER,
+};
+
+#define IOPRIO_NORM (4)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ip.h b/6/platforms/android-3/arch-x86/usr/include/linux/ip.h
new file mode 100644
index 0000000..040789d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ip.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IP_H
+#define _LINUX_IP_H
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+#define IPTOS_TOS_MASK 0x1E
+#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+#define IPTOS_MINCOST 0x02
+
+#define IPTOS_PREC_MASK 0xE0
+#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+#define IPOPT_COPY 0x80
+#define IPOPT_CLASS_MASK 0x60
+#define IPOPT_NUMBER_MASK 0x1f
+
+#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
+#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
+#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_MEASUREMENT 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_END (0 |IPOPT_CONTROL)
+#define IPOPT_NOOP (1 |IPOPT_CONTROL)
+#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
+#define IPOPT_RR (7 |IPOPT_CONTROL)
+#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
+
+#define IPVERSION 4
+#define MAXTTL 255
+#define IPDEFTTL 64
+
+#define IPOPT_OPTVAL 0
+#define IPOPT_OLEN 1
+#define IPOPT_OFFSET 2
+#define IPOPT_MINOFF 4
+#define MAX_IPOPTLEN 40
+#define IPOPT_NOP IPOPT_NOOP
+#define IPOPT_EOL IPOPT_END
+#define IPOPT_TS IPOPT_TIMESTAMP
+
+#define IPOPT_TS_TSONLY 0
+#define IPOPT_TS_TSANDADDR 1
+#define IPOPT_TS_PRESPEC 3
+
+struct iphdr {
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u8 ihl:4,
+ version:4;
+#elif defined (__BIG_ENDIAN_BITFIELD)
+ __u8 version:4,
+ ihl:4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ __u8 tos;
+ __be16 tot_len;
+ __be16 id;
+ __be16 frag_off;
+ __u8 ttl;
+ __u8 protocol;
+ __u16 check;
+ __be32 saddr;
+ __be32 daddr;
+
+};
+
+struct ip_auth_hdr {
+ __u8 nexthdr;
+ __u8 hdrlen;
+ __u16 reserved;
+ __u32 spi;
+ __u32 seq_no;
+ __u8 auth_data[0];
+};
+
+struct ip_esp_hdr {
+ __u32 spi;
+ __u32 seq_no;
+ __u8 enc_data[0];
+};
+
+struct ip_comp_hdr {
+ __u8 nexthdr;
+ __u8 flags;
+ __u16 cpi;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ipc.h b/6/platforms/android-3/arch-x86/usr/include/linux/ipc.h
new file mode 100644
index 0000000..54766d5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ipc.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IPC_H
+#define _LINUX_IPC_H
+
+#include <linux/types.h>
+
+#define IPC_PRIVATE ((__kernel_key_t) 0)
+
+struct ipc_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+};
+
+#include <asm/ipcbuf.h>
+
+#define IPC_CREAT 00001000
+#define IPC_EXCL 00002000
+#define IPC_NOWAIT 00004000
+
+#define IPC_DIPC 00010000
+#define IPC_OWN 00020000
+
+#define IPC_RMID 0
+#define IPC_SET 1
+#define IPC_STAT 2
+#define IPC_INFO 3
+
+#define IPC_OLD 0
+#define IPC_64 0x0100
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_msgdefs.h
new file mode 100644
index 0000000..247d563
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IPMI_MSGDEFS_H
+#define __LINUX_IPMI_MSGDEFS_H
+
+#define IPMI_NETFN_SENSOR_EVENT_REQUEST 0x04
+#define IPMI_NETFN_SENSOR_EVENT_RESPONSE 0x05
+#define IPMI_GET_EVENT_RECEIVER_CMD 0x01
+
+#define IPMI_NETFN_APP_REQUEST 0x06
+#define IPMI_NETFN_APP_RESPONSE 0x07
+#define IPMI_GET_DEVICE_ID_CMD 0x01
+#define IPMI_CLEAR_MSG_FLAGS_CMD 0x30
+#define IPMI_GET_DEVICE_GUID_CMD 0x08
+#define IPMI_GET_MSG_FLAGS_CMD 0x31
+#define IPMI_SEND_MSG_CMD 0x34
+#define IPMI_GET_MSG_CMD 0x33
+#define IPMI_SET_BMC_GLOBAL_ENABLES_CMD 0x2e
+#define IPMI_GET_BMC_GLOBAL_ENABLES_CMD 0x2f
+#define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35
+#define IPMI_GET_CHANNEL_INFO_CMD 0x42
+
+#define IPMI_NETFN_STORAGE_REQUEST 0x0a
+#define IPMI_NETFN_STORAGE_RESPONSE 0x0b
+#define IPMI_ADD_SEL_ENTRY_CMD 0x44
+
+#define IPMI_BMC_SLAVE_ADDR 0x20
+
+#define IPMI_MAX_MSG_LENGTH 272
+
+#define IPMI_CC_NO_ERROR 0x00
+#define IPMI_NODE_BUSY_ERR 0xc0
+#define IPMI_INVALID_COMMAND_ERR 0xc1
+#define IPMI_ERR_MSG_TRUNCATED 0xc6
+#define IPMI_LOST_ARBITRATION_ERR 0x81
+#define IPMI_ERR_UNSPECIFIED 0xff
+
+#define IPMI_CHANNEL_PROTOCOL_IPMB 1
+#define IPMI_CHANNEL_PROTOCOL_ICMB 2
+#define IPMI_CHANNEL_PROTOCOL_SMBUS 4
+#define IPMI_CHANNEL_PROTOCOL_KCS 5
+#define IPMI_CHANNEL_PROTOCOL_SMIC 6
+#define IPMI_CHANNEL_PROTOCOL_BT10 7
+#define IPMI_CHANNEL_PROTOCOL_BT15 8
+#define IPMI_CHANNEL_PROTOCOL_TMODE 9
+
+#define IPMI_CHANNEL_MEDIUM_IPMB 1
+#define IPMI_CHANNEL_MEDIUM_ICMB10 2
+#define IPMI_CHANNEL_MEDIUM_ICMB09 3
+#define IPMI_CHANNEL_MEDIUM_8023LAN 4
+#define IPMI_CHANNEL_MEDIUM_ASYNC 5
+#define IPMI_CHANNEL_MEDIUM_OTHER_LAN 6
+#define IPMI_CHANNEL_MEDIUM_PCI_SMBUS 7
+#define IPMI_CHANNEL_MEDIUM_SMBUS1 8
+#define IPMI_CHANNEL_MEDIUM_SMBUS2 9
+#define IPMI_CHANNEL_MEDIUM_USB1 10
+#define IPMI_CHANNEL_MEDIUM_USB2 11
+#define IPMI_CHANNEL_MEDIUM_SYSINTF 12
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_smi.h b/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_smi.h
new file mode 100644
index 0000000..56cc210
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ipmi_smi.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IPMI_SMI_H
+#define __LINUX_IPMI_SMI_H
+
+#include <linux/ipmi_msgdefs.h>
+#include <linux/proc_fs.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/ipmi_smi.h>
+
+typedef struct ipmi_smi *ipmi_smi_t;
+
+struct ipmi_smi_msg
+{
+ struct list_head link;
+
+ long msgid;
+ void *user_data;
+
+ int data_size;
+ unsigned char data[IPMI_MAX_MSG_LENGTH];
+
+ int rsp_size;
+ unsigned char rsp[IPMI_MAX_MSG_LENGTH];
+
+ void (*done)(struct ipmi_smi_msg *msg);
+};
+
+struct ipmi_smi_handlers
+{
+ struct module *owner;
+
+ int (*start_processing)(void *send_info,
+ ipmi_smi_t new_intf);
+
+ void (*sender)(void *send_info,
+ struct ipmi_smi_msg *msg,
+ int priority);
+
+ void (*request_events)(void *send_info);
+
+ void (*set_run_to_completion)(void *send_info, int run_to_completion);
+
+ void (*poll)(void *send_info);
+
+ int (*inc_usecount)(void *send_info);
+ void (*dec_usecount)(void *send_info);
+};
+
+struct ipmi_device_id {
+ unsigned char device_id;
+ unsigned char device_revision;
+ unsigned char firmware_revision_1;
+ unsigned char firmware_revision_2;
+ unsigned char ipmi_version;
+ unsigned char additional_device_support;
+ unsigned int manufacturer_id;
+ unsigned int product_id;
+ unsigned char aux_firmware_revision[4];
+ unsigned int aux_firmware_revision_set : 1;
+};
+
+#define ipmi_version_major(v) ((v)->ipmi_version & 0xf)
+#define ipmi_version_minor(v) ((v)->ipmi_version >> 4)
+
+struct ipmi_smi_msg *ipmi_alloc_smi_msg(void);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ipx.h b/6/platforms/android-3/arch-x86/usr/include/linux/ipx.h
new file mode 100644
index 0000000..ff675e9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ipx.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPX_H_
+#define _IPX_H_
+#include <linux/sockios.h>
+#include <linux/socket.h>
+#define IPX_NODE_LEN 6
+#define IPX_MTU 576
+
+struct sockaddr_ipx {
+ sa_family_t sipx_family;
+ __u16 sipx_port;
+ __u32 sipx_network;
+ unsigned char sipx_node[IPX_NODE_LEN];
+ __u8 sipx_type;
+ unsigned char sipx_zero;
+};
+
+#define sipx_special sipx_port
+#define sipx_action sipx_zero
+#define IPX_DLTITF 0
+#define IPX_CRTITF 1
+
+struct ipx_route_definition {
+ __u32 ipx_network;
+ __u32 ipx_router_network;
+ unsigned char ipx_router_node[IPX_NODE_LEN];
+};
+
+struct ipx_interface_definition {
+ __u32 ipx_network;
+ unsigned char ipx_device[16];
+ unsigned char ipx_dlink_type;
+#define IPX_FRAME_NONE 0
+#define IPX_FRAME_SNAP 1
+#define IPX_FRAME_8022 2
+#define IPX_FRAME_ETHERII 3
+#define IPX_FRAME_8023 4
+#define IPX_FRAME_TR_8022 5
+ unsigned char ipx_special;
+#define IPX_SPECIAL_NONE 0
+#define IPX_PRIMARY 1
+#define IPX_INTERNAL 2
+ unsigned char ipx_node[IPX_NODE_LEN];
+};
+
+struct ipx_config_data {
+ unsigned char ipxcfg_auto_select_primary;
+ unsigned char ipxcfg_auto_create_interfaces;
+};
+
+struct ipx_route_def {
+ __u32 ipx_network;
+ __u32 ipx_router_network;
+#define IPX_ROUTE_NO_ROUTER 0
+ unsigned char ipx_router_node[IPX_NODE_LEN];
+ unsigned char ipx_device[16];
+ unsigned short ipx_flags;
+#define IPX_RT_SNAP 8
+#define IPX_RT_8022 4
+#define IPX_RT_BLUEBOOK 2
+#define IPX_RT_ROUTED 1
+};
+
+#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
+#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
+#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2)
+#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/irq.h b/6/platforms/android-3/arch-x86/usr/include/linux/irq.h
new file mode 100644
index 0000000..38f5db7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/irq.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IRQ_H
+#define _LINUX_IRQ_H
+
+#include <linux/smp.h>
+
+#include <linux/linkage.h>
+#include <linux/cache.h>
+#include <linux/spinlock.h>
+#include <linux/cpumask.h>
+#include <linux/irqreturn.h>
+
+#include <asm/irq.h>
+#include <asm/ptrace.h>
+
+#define IRQ_TYPE_NONE 0x00000000
+#define IRQ_TYPE_EDGE_RISING 0x00000001
+#define IRQ_TYPE_EDGE_FALLING 0x00000002
+#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
+#define IRQ_TYPE_LEVEL_HIGH 0x00000004
+#define IRQ_TYPE_LEVEL_LOW 0x00000008
+#define IRQ_TYPE_SENSE_MASK 0x0000000f
+#define IRQ_TYPE_PROBE 0x00000010
+
+#define IRQ_INPROGRESS 0x00010000
+#define IRQ_DISABLED 0x00020000
+#define IRQ_PENDING 0x00040000
+#define IRQ_REPLAY 0x00080000
+#define IRQ_AUTODETECT 0x00100000
+#define IRQ_WAITING 0x00200000
+#define IRQ_LEVEL 0x00400000
+#define IRQ_MASKED 0x00800000
+#define IRQ_PER_CPU 0x01000000
+#define CHECK_IRQ_PER_CPU(var) 0
+
+#define IRQ_NOPROBE 0x02000000
+#define IRQ_NOREQUEST 0x04000000
+#define IRQ_NOAUTOEN 0x08000000
+#define IRQ_DELAYED_DISABLE 0x10000000
+#define IRQ_WAKEUP 0x20000000
+
+struct proc_dir_entry;
+
+struct irq_chip {
+ const char *name;
+ unsigned int (*startup)(unsigned int irq);
+ void (*shutdown)(unsigned int irq);
+ void (*enable)(unsigned int irq);
+ void (*disable)(unsigned int irq);
+
+ void (*ack)(unsigned int irq);
+ void (*mask)(unsigned int irq);
+ void (*mask_ack)(unsigned int irq);
+ void (*unmask)(unsigned int irq);
+ void (*eoi)(unsigned int irq);
+
+ void (*end)(unsigned int irq);
+ void (*set_affinity)(unsigned int irq, cpumask_t dest);
+ int (*retrigger)(unsigned int irq);
+ int (*set_type)(unsigned int irq, unsigned int flow_type);
+ int (*set_wake)(unsigned int irq, unsigned int on);
+
+ const char *typename;
+};
+
+struct irq_desc {
+ void fastcall (*handle_irq)(unsigned int irq,
+ struct irq_desc *desc,
+ struct pt_regs *regs);
+ struct irq_chip *chip;
+ void *handler_data;
+ void *chip_data;
+ struct irqaction *action;
+ unsigned int status;
+
+ unsigned int depth;
+ unsigned int wake_depth;
+ unsigned int irq_count;
+ unsigned int irqs_unhandled;
+ spinlock_t lock;
+} ____cacheline_aligned;
+
+#define hw_interrupt_type irq_chip
+typedef struct irq_chip hw_irq_controller;
+#define no_irq_type no_irq_chip
+typedef struct irq_desc irq_desc_t;
+
+#include <asm/hw_irq.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/irq_cpustat.h b/6/platforms/android-3/arch-x86/usr/include/linux/irq_cpustat.h
new file mode 100644
index 0000000..3540a4a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/irq_cpustat.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __irq_cpustat_h
+#define __irq_cpustat_h
+
+#ifndef __ARCH_IRQ_STAT
+
+#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
+#endif
+
+#define local_softirq_pending() __IRQ_STAT(smp_processor_id(), __softirq_pending)
+
+#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/irqflags.h b/6/platforms/android-3/arch-x86/usr/include/linux/irqflags.h
new file mode 100644
index 0000000..1bf3f90
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/irqflags.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TRACE_IRQFLAGS_H
+#define _LINUX_TRACE_IRQFLAGS_H
+
+#define trace_hardirqs_on() do { } while (0)
+#define trace_hardirqs_off() do { } while (0)
+#define trace_softirqs_on(ip) do { } while (0)
+#define trace_softirqs_off(ip) do { } while (0)
+#define trace_hardirq_context(p) 0
+#define trace_softirq_context(p) 0
+#define trace_hardirqs_enabled(p) 0
+#define trace_softirqs_enabled(p) 0
+#define trace_hardirq_enter() do { } while (0)
+#define trace_hardirq_exit() do { } while (0)
+#define trace_softirq_enter() do { } while (0)
+#define trace_softirq_exit() do { } while (0)
+#define INIT_TRACE_IRQFLAGS
+
+#define raw_local_irq_disable() local_irq_disable()
+#define raw_local_irq_enable() local_irq_enable()
+#define raw_local_irq_save(flags) local_irq_save(flags)
+#define raw_local_irq_restore(flags) local_irq_restore(flags)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/irqreturn.h b/6/platforms/android-3/arch-x86/usr/include/linux/irqreturn.h
new file mode 100644
index 0000000..e37f430
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/irqreturn.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IRQRETURN_H
+#define _LINUX_IRQRETURN_H
+
+typedef int irqreturn_t;
+
+#define IRQ_NONE (0)
+#define IRQ_HANDLED (1)
+#define IRQ_RETVAL(x) ((x) != 0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/jbd.h b/6/platforms/android-3/arch-x86/usr/include/linux/jbd.h
new file mode 100644
index 0000000..7ba766c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/jbd.h
@@ -0,0 +1,118 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_JBD_H
+#define _LINUX_JBD_H
+
+#include "jfs_compat.h"
+#define JFS_DEBUG
+#define jfs_debug jbd_debug
+
+#define journal_oom_retry 1
+
+#undef JBD_PARANOID_IOFAIL
+
+#define JBD_DEFAULT_MAX_COMMIT_AGE 5
+
+#define jbd_debug(f, a...)
+
+#define jbd_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
+#define jbd_rep_kmalloc(size, flags) __jbd_kmalloc(__FUNCTION__, (size), (flags), 1)
+
+#define JFS_MIN_JOURNAL_BLOCKS 1024
+
+#define JFS_MAGIC_NUMBER 0xc03b3998U
+
+#define JFS_DESCRIPTOR_BLOCK 1
+#define JFS_COMMIT_BLOCK 2
+#define JFS_SUPERBLOCK_V1 3
+#define JFS_SUPERBLOCK_V2 4
+#define JFS_REVOKE_BLOCK 5
+
+typedef struct journal_header_s
+{
+ __be32 h_magic;
+ __be32 h_blocktype;
+ __be32 h_sequence;
+} journal_header_t;
+
+typedef struct journal_block_tag_s
+{
+ __be32 t_blocknr;
+ __be32 t_flags;
+} journal_block_tag_t;
+
+typedef struct journal_revoke_header_s
+{
+ journal_header_t r_header;
+ __be32 r_count;
+} journal_revoke_header_t;
+
+#define JFS_FLAG_ESCAPE 1
+#define JFS_FLAG_SAME_UUID 2
+#define JFS_FLAG_DELETED 4
+#define JFS_FLAG_LAST_TAG 8
+
+typedef struct journal_superblock_s
+{
+
+ journal_header_t s_header;
+
+ __be32 s_blocksize;
+ __be32 s_maxlen;
+ __be32 s_first;
+
+ __be32 s_sequence;
+ __be32 s_start;
+
+ __be32 s_errno;
+
+ __be32 s_feature_compat;
+ __be32 s_feature_incompat;
+ __be32 s_feature_ro_compat;
+
+ __u8 s_uuid[16];
+
+ __be32 s_nr_users;
+
+ __be32 s_dynsuper;
+
+ __be32 s_max_transaction;
+ __be32 s_max_trans_data;
+
+ __u32 s_padding[44];
+
+ __u8 s_users[16*48];
+
+} journal_superblock_t;
+
+#define JFS_HAS_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
+#define JFS_HAS_RO_COMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
+#define JFS_HAS_INCOMPAT_FEATURE(j,mask) ((j)->j_format_version >= 2 && ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
+
+#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001
+
+#define JFS_KNOWN_COMPAT_FEATURES 0
+#define JFS_KNOWN_ROCOMPAT_FEATURES 0
+#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE
+
+#define BJ_None 0
+#define BJ_SyncData 1
+#define BJ_Metadata 2
+#define BJ_Forget 3
+#define BJ_IO 4
+#define BJ_Shadow 5
+#define BJ_LogCtl 6
+#define BJ_Reserved 7
+#define BJ_Locked 8
+#define BJ_Types 9
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/jiffies.h b/6/platforms/android-3/arch-x86/usr/include/linux/jiffies.h
new file mode 100644
index 0000000..86b705b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/jiffies.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_JIFFIES_H
+#define _LINUX_JIFFIES_H
+
+#include <linux/calc64.h>
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/time.h>
+#include <linux/timex.h>
+#include <asm/param.h>
+
+#if HZ >= (12 && HZ < 24)
+#define SHIFT_HZ 4
+#elif HZ >= 24 && HZ < 48
+#define SHIFT_HZ 5
+#elif HZ >= 48 && HZ < 96
+#define SHIFT_HZ 6
+#elif HZ >= 96 && HZ < 192
+#define SHIFT_HZ 7
+#elif HZ >= 192 && HZ < 384
+#define SHIFT_HZ 8
+#elif HZ >= 384 && HZ < 768
+#define SHIFT_HZ 9
+#elif HZ >= 768 && HZ < 1536
+#define SHIFT_HZ 10
+#else
+#error You lose.
+#endif
+
+#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ)
+
+#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ)
+
+#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
+
+#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
+
+#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8))
+
+#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
+
+#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8))
+
+#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
+
+#define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8))
+
+#define __jiffy_data __attribute__((section(".data")))
+
+#if BITS_PER_LONG < 64
+
+#else
+#endif
+#define time_after(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(b) - (long)(a) < 0))
+#define time_before(a,b) time_after(b,a)
+#define time_after_eq(a,b) (typecheck(unsigned long, a) && typecheck(unsigned long, b) && ((long)(a) - (long)(b) >= 0))
+#define time_before_eq(a,b) time_after_eq(b,a)
+#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
+#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1)
+#define SEC_JIFFIE_SC (31 - SHIFT_HZ)
+#if !((NSEC_PER_SEC << 2) / TICK_NSEC << SEC_JIFFIE_SC - 2 & 0x80000000)
+#undef SEC_JIFFIE_SC
+#define SEC_JIFFIE_SC (32 - SHIFT_HZ)
+#endif
+#define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29)
+#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19)
+#define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define USEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_USEC << USEC_JIFFIE_SC) + TICK_NSEC -1) / (u64)TICK_NSEC))
+#define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1)
+#if BITS_PER_LONG < 64
+#define MAX_SEC_IN_JIFFIES (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC)
+#else
+#define MAX_SEC_IN_JIFFIES (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)
+#endif
+#if HZ <= (MSEC_PER_SEC && !(MSEC_PER_SEC % HZ))
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+#else
+#endif
+#if HZ <= (USEC_PER_SEC && !(USEC_PER_SEC % HZ))
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+#else
+#endif
+#if HZ <= (MSEC_PER_SEC && !(MSEC_PER_SEC % HZ))
+#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
+#else
+#endif
+#if HZ <= (USEC_PER_SEC && !(USEC_PER_SEC % HZ))
+#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
+#else
+#endif
+#if TICK_NSEC % NSEC_PER_SEC / USER_HZ == 0
+#else
+#endif
+#if HZ % USER_HZ == 0
+#else
+#endif
+#if TICK_NSEC % NSEC_PER_SEC / USER_HZ == 0
+#else
+#endif
+#if NSEC_PER_SEC % USER_HZ == 0
+#elif (USER_HZ % 512) == 0
+#else
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kd.h b/6/platforms/android-3/arch-x86/usr/include/linux/kd.h
new file mode 100644
index 0000000..1541ddf
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kd.h
@@ -0,0 +1,176 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KD_H
+#define _LINUX_KD_H
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+#define GIO_FONT 0x4B60
+#define PIO_FONT 0x4B61
+
+#define GIO_FONTX 0x4B6B
+#define PIO_FONTX 0x4B6C
+struct consolefontdesc {
+ unsigned short charcount;
+ unsigned short charheight;
+ char __user *chardata;
+};
+
+#define PIO_FONTRESET 0x4B6D
+
+#define GIO_CMAP 0x4B70
+#define PIO_CMAP 0x4B71
+
+#define KIOCSOUND 0x4B2F
+#define KDMKTONE 0x4B30
+
+#define KDGETLED 0x4B31
+#define KDSETLED 0x4B32
+#define LED_SCR 0x01
+#define LED_NUM 0x02
+#define LED_CAP 0x04
+
+#define KDGKBTYPE 0x4B33
+#define KB_84 0x01
+#define KB_101 0x02
+#define KB_OTHER 0x03
+
+#define KDADDIO 0x4B34
+#define KDDELIO 0x4B35
+#define KDENABIO 0x4B36
+#define KDDISABIO 0x4B37
+
+#define KDSETMODE 0x4B3A
+#define KD_TEXT 0x00
+#define KD_GRAPHICS 0x01
+#define KD_TEXT0 0x02
+#define KD_TEXT1 0x03
+#define KDGETMODE 0x4B3B
+
+#define KDMAPDISP 0x4B3C
+#define KDUNMAPDISP 0x4B3D
+
+typedef char scrnmap_t;
+#define E_TABSZ 256
+#define GIO_SCRNMAP 0x4B40
+#define PIO_SCRNMAP 0x4B41
+#define GIO_UNISCRNMAP 0x4B69
+#define PIO_UNISCRNMAP 0x4B6A
+
+#define GIO_UNIMAP 0x4B66
+struct unipair {
+ unsigned short unicode;
+ unsigned short fontpos;
+};
+struct unimapdesc {
+ unsigned short entry_ct;
+ struct unipair __user *entries;
+};
+#define PIO_UNIMAP 0x4B67
+#define PIO_UNIMAPCLR 0x4B68
+struct unimapinit {
+ unsigned short advised_hashsize;
+ unsigned short advised_hashstep;
+ unsigned short advised_hashlevel;
+};
+
+#define UNI_DIRECT_BASE 0xF000
+#define UNI_DIRECT_MASK 0x01FF
+
+#define K_RAW 0x00
+#define K_XLATE 0x01
+#define K_MEDIUMRAW 0x02
+#define K_UNICODE 0x03
+#define KDGKBMODE 0x4B44
+#define KDSKBMODE 0x4B45
+
+#define K_METABIT 0x03
+#define K_ESCPREFIX 0x04
+#define KDGKBMETA 0x4B62
+#define KDSKBMETA 0x4B63
+
+#define K_SCROLLLOCK 0x01
+#define K_NUMLOCK 0x02
+#define K_CAPSLOCK 0x04
+#define KDGKBLED 0x4B64
+#define KDSKBLED 0x4B65
+
+struct kbentry {
+ unsigned char kb_table;
+ unsigned char kb_index;
+ unsigned short kb_value;
+};
+#define K_NORMTAB 0x00
+#define K_SHIFTTAB 0x01
+#define K_ALTTAB 0x02
+#define K_ALTSHIFTTAB 0x03
+
+#define KDGKBENT 0x4B46
+#define KDSKBENT 0x4B47
+
+struct kbsentry {
+ unsigned char kb_func;
+ unsigned char kb_string[512];
+};
+#define KDGKBSENT 0x4B48
+#define KDSKBSENT 0x4B49
+
+struct kbdiacr {
+ unsigned char diacr, base, result;
+};
+struct kbdiacrs {
+ unsigned int kb_cnt;
+ struct kbdiacr kbdiacr[256];
+};
+#define KDGKBDIACR 0x4B4A
+#define KDSKBDIACR 0x4B4B
+
+struct kbkeycode {
+ unsigned int scancode, keycode;
+};
+#define KDGETKEYCODE 0x4B4C
+#define KDSETKEYCODE 0x4B4D
+
+#define KDSIGACCEPT 0x4B4E
+
+struct kbd_repeat {
+ int delay;
+ int period;
+
+};
+
+#define KDKBDREP 0x4B52
+
+#define KDFONTOP 0x4B72
+
+struct console_font_op {
+ unsigned int op;
+ unsigned int flags;
+ unsigned int width, height;
+ unsigned int charcount;
+ unsigned char __user *data;
+};
+
+struct console_font {
+ unsigned int width, height;
+ unsigned int charcount;
+ unsigned char *data;
+};
+
+#define KD_FONT_OP_SET 0
+#define KD_FONT_OP_GET 1
+#define KD_FONT_OP_SET_DEFAULT 2
+#define KD_FONT_OP_COPY 3
+
+#define KD_FONT_FLAG_DONT_RECALC 1
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kdev_t.h b/6/platforms/android-3/arch-x86/usr/include/linux/kdev_t.h
new file mode 100644
index 0000000..517f9c3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kdev_t.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KDEV_T_H
+#define _LINUX_KDEV_T_H
+
+#define MAJOR(dev) ((dev)>>8)
+#define MINOR(dev) ((dev) & 0xff)
+#define MKDEV(ma,mi) ((ma)<<8 | (mi))
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kernel.h b/6/platforms/android-3/arch-x86/usr/include/linux/kernel.h
new file mode 100644
index 0000000..9682e47
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kernel.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KERNEL_H
+#define _LINUX_KERNEL_H
+
+#define SI_LOAD_SHIFT 16
+struct sysinfo {
+ long uptime;
+ unsigned long loads[3];
+ unsigned long totalram;
+ unsigned long freeram;
+ unsigned long sharedram;
+ unsigned long bufferram;
+ unsigned long totalswap;
+ unsigned long freeswap;
+ unsigned short procs;
+ unsigned short pad;
+ unsigned long totalhigh;
+ unsigned long freehigh;
+ unsigned int mem_unit;
+ char _f[20-2*sizeof(long)-sizeof(int)];
+};
+
+#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
+
+#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
+
+#define __FUNCTION__ (__func__)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kernel_stat.h b/6/platforms/android-3/arch-x86/usr/include/linux/kernel_stat.h
new file mode 100644
index 0000000..f333736
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kernel_stat.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KERNEL_STAT_H
+#define _LINUX_KERNEL_STAT_H
+
+#include <asm/irq.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/percpu.h>
+#include <linux/cpumask.h>
+#include <asm/cputime.h>
+
+struct cpu_usage_stat {
+ cputime64_t user;
+ cputime64_t nice;
+ cputime64_t system;
+ cputime64_t softirq;
+ cputime64_t irq;
+ cputime64_t idle;
+ cputime64_t iowait;
+ cputime64_t steal;
+};
+
+struct kernel_stat {
+ struct cpu_usage_stat cpustat;
+ unsigned int irqs[NR_IRQS];
+};
+
+#define kstat_cpu(cpu) per_cpu(kstat, cpu)
+
+#define kstat_this_cpu __get_cpu_var(kstat)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kernelcapi.h b/6/platforms/android-3/arch-x86/usr/include/linux/kernelcapi.h
new file mode 100644
index 0000000..4638b0a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kernelcapi.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __KERNELCAPI_H__
+#define __KERNELCAPI_H__
+
+#define CAPI_MAXAPPL 240
+#define CAPI_MAXCONTR 32
+#define CAPI_MAXDATAWINDOW 8
+
+typedef struct kcapi_flagdef {
+ int contr;
+ int flag;
+} kcapi_flagdef;
+
+typedef struct kcapi_carddef {
+ char driver[32];
+ unsigned int port;
+ unsigned irq;
+ unsigned int membase;
+ int cardnr;
+} kcapi_carddef;
+
+#define KCAPI_CMD_TRACE 10
+#define KCAPI_CMD_ADDCARD 11
+
+#define KCAPI_TRACE_OFF 0
+#define KCAPI_TRACE_SHORT_NO_DATA 1
+#define KCAPI_TRACE_FULL_NO_DATA 2
+#define KCAPI_TRACE_SHORT 3
+#define KCAPI_TRACE_FULL 4
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kexec.h b/6/platforms/android-3/arch-x86/usr/include/linux/kexec.h
new file mode 100644
index 0000000..4004646
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kexec.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_KEXEC_H
+#define LINUX_KEXEC_H
+
+struct pt_regs;
+struct task_struct;
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/key.h b/6/platforms/android-3/arch-x86/usr/include/linux/key.h
new file mode 100644
index 0000000..5c485d7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/key.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KEY_H
+#define _LINUX_KEY_H
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/rbtree.h>
+#include <linux/rcupdate.h>
+#include <asm/atomic.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/keyboard.h b/6/platforms/android-3/arch-x86/usr/include/linux/keyboard.h
new file mode 100644
index 0000000..25e0945
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/keyboard.h
@@ -0,0 +1,446 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KEYBOARD_H
+#define __LINUX_KEYBOARD_H
+
+#include <linux/wait.h>
+
+#define KG_SHIFT 0
+#define KG_CTRL 2
+#define KG_ALT 3
+#define KG_ALTGR 1
+#define KG_SHIFTL 4
+#define KG_KANASHIFT 4
+#define KG_SHIFTR 5
+#define KG_CTRLL 6
+#define KG_CTRLR 7
+#define KG_CAPSSHIFT 8
+
+#define NR_SHIFT 9
+
+#define NR_KEYS 256
+#define MAX_NR_KEYMAPS 256
+
+#define MAX_NR_OF_USER_KEYMAPS 256
+
+#define MAX_NR_FUNC 256
+
+#define KT_LATIN 0
+#define KT_LETTER 11
+#define KT_FN 1
+#define KT_SPEC 2
+#define KT_PAD 3
+#define KT_DEAD 4
+#define KT_CONS 5
+#define KT_CUR 6
+#define KT_SHIFT 7
+#define KT_META 8
+#define KT_ASCII 9
+#define KT_LOCK 10
+#define KT_SLOCK 12
+#define KT_BRL 14
+
+#define K(t,v) (((t)<<8)|(v))
+#define KTYP(x) ((x) >> 8)
+#define KVAL(x) ((x) & 0xff)
+
+#define K_F1 K(KT_FN,0)
+#define K_F2 K(KT_FN,1)
+#define K_F3 K(KT_FN,2)
+#define K_F4 K(KT_FN,3)
+#define K_F5 K(KT_FN,4)
+#define K_F6 K(KT_FN,5)
+#define K_F7 K(KT_FN,6)
+#define K_F8 K(KT_FN,7)
+#define K_F9 K(KT_FN,8)
+#define K_F10 K(KT_FN,9)
+#define K_F11 K(KT_FN,10)
+#define K_F12 K(KT_FN,11)
+#define K_F13 K(KT_FN,12)
+#define K_F14 K(KT_FN,13)
+#define K_F15 K(KT_FN,14)
+#define K_F16 K(KT_FN,15)
+#define K_F17 K(KT_FN,16)
+#define K_F18 K(KT_FN,17)
+#define K_F19 K(KT_FN,18)
+#define K_F20 K(KT_FN,19)
+#define K_FIND K(KT_FN,20)
+#define K_INSERT K(KT_FN,21)
+#define K_REMOVE K(KT_FN,22)
+#define K_SELECT K(KT_FN,23)
+#define K_PGUP K(KT_FN,24)
+#define K_PGDN K(KT_FN,25)
+#define K_MACRO K(KT_FN,26)
+#define K_HELP K(KT_FN,27)
+#define K_DO K(KT_FN,28)
+#define K_PAUSE K(KT_FN,29)
+#define K_F21 K(KT_FN,30)
+#define K_F22 K(KT_FN,31)
+#define K_F23 K(KT_FN,32)
+#define K_F24 K(KT_FN,33)
+#define K_F25 K(KT_FN,34)
+#define K_F26 K(KT_FN,35)
+#define K_F27 K(KT_FN,36)
+#define K_F28 K(KT_FN,37)
+#define K_F29 K(KT_FN,38)
+#define K_F30 K(KT_FN,39)
+#define K_F31 K(KT_FN,40)
+#define K_F32 K(KT_FN,41)
+#define K_F33 K(KT_FN,42)
+#define K_F34 K(KT_FN,43)
+#define K_F35 K(KT_FN,44)
+#define K_F36 K(KT_FN,45)
+#define K_F37 K(KT_FN,46)
+#define K_F38 K(KT_FN,47)
+#define K_F39 K(KT_FN,48)
+#define K_F40 K(KT_FN,49)
+#define K_F41 K(KT_FN,50)
+#define K_F42 K(KT_FN,51)
+#define K_F43 K(KT_FN,52)
+#define K_F44 K(KT_FN,53)
+#define K_F45 K(KT_FN,54)
+#define K_F46 K(KT_FN,55)
+#define K_F47 K(KT_FN,56)
+#define K_F48 K(KT_FN,57)
+#define K_F49 K(KT_FN,58)
+#define K_F50 K(KT_FN,59)
+#define K_F51 K(KT_FN,60)
+#define K_F52 K(KT_FN,61)
+#define K_F53 K(KT_FN,62)
+#define K_F54 K(KT_FN,63)
+#define K_F55 K(KT_FN,64)
+#define K_F56 K(KT_FN,65)
+#define K_F57 K(KT_FN,66)
+#define K_F58 K(KT_FN,67)
+#define K_F59 K(KT_FN,68)
+#define K_F60 K(KT_FN,69)
+#define K_F61 K(KT_FN,70)
+#define K_F62 K(KT_FN,71)
+#define K_F63 K(KT_FN,72)
+#define K_F64 K(KT_FN,73)
+#define K_F65 K(KT_FN,74)
+#define K_F66 K(KT_FN,75)
+#define K_F67 K(KT_FN,76)
+#define K_F68 K(KT_FN,77)
+#define K_F69 K(KT_FN,78)
+#define K_F70 K(KT_FN,79)
+#define K_F71 K(KT_FN,80)
+#define K_F72 K(KT_FN,81)
+#define K_F73 K(KT_FN,82)
+#define K_F74 K(KT_FN,83)
+#define K_F75 K(KT_FN,84)
+#define K_F76 K(KT_FN,85)
+#define K_F77 K(KT_FN,86)
+#define K_F78 K(KT_FN,87)
+#define K_F79 K(KT_FN,88)
+#define K_F80 K(KT_FN,89)
+#define K_F81 K(KT_FN,90)
+#define K_F82 K(KT_FN,91)
+#define K_F83 K(KT_FN,92)
+#define K_F84 K(KT_FN,93)
+#define K_F85 K(KT_FN,94)
+#define K_F86 K(KT_FN,95)
+#define K_F87 K(KT_FN,96)
+#define K_F88 K(KT_FN,97)
+#define K_F89 K(KT_FN,98)
+#define K_F90 K(KT_FN,99)
+#define K_F91 K(KT_FN,100)
+#define K_F92 K(KT_FN,101)
+#define K_F93 K(KT_FN,102)
+#define K_F94 K(KT_FN,103)
+#define K_F95 K(KT_FN,104)
+#define K_F96 K(KT_FN,105)
+#define K_F97 K(KT_FN,106)
+#define K_F98 K(KT_FN,107)
+#define K_F99 K(KT_FN,108)
+#define K_F100 K(KT_FN,109)
+#define K_F101 K(KT_FN,110)
+#define K_F102 K(KT_FN,111)
+#define K_F103 K(KT_FN,112)
+#define K_F104 K(KT_FN,113)
+#define K_F105 K(KT_FN,114)
+#define K_F106 K(KT_FN,115)
+#define K_F107 K(KT_FN,116)
+#define K_F108 K(KT_FN,117)
+#define K_F109 K(KT_FN,118)
+#define K_F110 K(KT_FN,119)
+#define K_F111 K(KT_FN,120)
+#define K_F112 K(KT_FN,121)
+#define K_F113 K(KT_FN,122)
+#define K_F114 K(KT_FN,123)
+#define K_F115 K(KT_FN,124)
+#define K_F116 K(KT_FN,125)
+#define K_F117 K(KT_FN,126)
+#define K_F118 K(KT_FN,127)
+#define K_F119 K(KT_FN,128)
+#define K_F120 K(KT_FN,129)
+#define K_F121 K(KT_FN,130)
+#define K_F122 K(KT_FN,131)
+#define K_F123 K(KT_FN,132)
+#define K_F124 K(KT_FN,133)
+#define K_F125 K(KT_FN,134)
+#define K_F126 K(KT_FN,135)
+#define K_F127 K(KT_FN,136)
+#define K_F128 K(KT_FN,137)
+#define K_F129 K(KT_FN,138)
+#define K_F130 K(KT_FN,139)
+#define K_F131 K(KT_FN,140)
+#define K_F132 K(KT_FN,141)
+#define K_F133 K(KT_FN,142)
+#define K_F134 K(KT_FN,143)
+#define K_F135 K(KT_FN,144)
+#define K_F136 K(KT_FN,145)
+#define K_F137 K(KT_FN,146)
+#define K_F138 K(KT_FN,147)
+#define K_F139 K(KT_FN,148)
+#define K_F140 K(KT_FN,149)
+#define K_F141 K(KT_FN,150)
+#define K_F142 K(KT_FN,151)
+#define K_F143 K(KT_FN,152)
+#define K_F144 K(KT_FN,153)
+#define K_F145 K(KT_FN,154)
+#define K_F146 K(KT_FN,155)
+#define K_F147 K(KT_FN,156)
+#define K_F148 K(KT_FN,157)
+#define K_F149 K(KT_FN,158)
+#define K_F150 K(KT_FN,159)
+#define K_F151 K(KT_FN,160)
+#define K_F152 K(KT_FN,161)
+#define K_F153 K(KT_FN,162)
+#define K_F154 K(KT_FN,163)
+#define K_F155 K(KT_FN,164)
+#define K_F156 K(KT_FN,165)
+#define K_F157 K(KT_FN,166)
+#define K_F158 K(KT_FN,167)
+#define K_F159 K(KT_FN,168)
+#define K_F160 K(KT_FN,169)
+#define K_F161 K(KT_FN,170)
+#define K_F162 K(KT_FN,171)
+#define K_F163 K(KT_FN,172)
+#define K_F164 K(KT_FN,173)
+#define K_F165 K(KT_FN,174)
+#define K_F166 K(KT_FN,175)
+#define K_F167 K(KT_FN,176)
+#define K_F168 K(KT_FN,177)
+#define K_F169 K(KT_FN,178)
+#define K_F170 K(KT_FN,179)
+#define K_F171 K(KT_FN,180)
+#define K_F172 K(KT_FN,181)
+#define K_F173 K(KT_FN,182)
+#define K_F174 K(KT_FN,183)
+#define K_F175 K(KT_FN,184)
+#define K_F176 K(KT_FN,185)
+#define K_F177 K(KT_FN,186)
+#define K_F178 K(KT_FN,187)
+#define K_F179 K(KT_FN,188)
+#define K_F180 K(KT_FN,189)
+#define K_F181 K(KT_FN,190)
+#define K_F182 K(KT_FN,191)
+#define K_F183 K(KT_FN,192)
+#define K_F184 K(KT_FN,193)
+#define K_F185 K(KT_FN,194)
+#define K_F186 K(KT_FN,195)
+#define K_F187 K(KT_FN,196)
+#define K_F188 K(KT_FN,197)
+#define K_F189 K(KT_FN,198)
+#define K_F190 K(KT_FN,199)
+#define K_F191 K(KT_FN,200)
+#define K_F192 K(KT_FN,201)
+#define K_F193 K(KT_FN,202)
+#define K_F194 K(KT_FN,203)
+#define K_F195 K(KT_FN,204)
+#define K_F196 K(KT_FN,205)
+#define K_F197 K(KT_FN,206)
+#define K_F198 K(KT_FN,207)
+#define K_F199 K(KT_FN,208)
+#define K_F200 K(KT_FN,209)
+#define K_F201 K(KT_FN,210)
+#define K_F202 K(KT_FN,211)
+#define K_F203 K(KT_FN,212)
+#define K_F204 K(KT_FN,213)
+#define K_F205 K(KT_FN,214)
+#define K_F206 K(KT_FN,215)
+#define K_F207 K(KT_FN,216)
+#define K_F208 K(KT_FN,217)
+#define K_F209 K(KT_FN,218)
+#define K_F210 K(KT_FN,219)
+#define K_F211 K(KT_FN,220)
+#define K_F212 K(KT_FN,221)
+#define K_F213 K(KT_FN,222)
+#define K_F214 K(KT_FN,223)
+#define K_F215 K(KT_FN,224)
+#define K_F216 K(KT_FN,225)
+#define K_F217 K(KT_FN,226)
+#define K_F218 K(KT_FN,227)
+#define K_F219 K(KT_FN,228)
+#define K_F220 K(KT_FN,229)
+#define K_F221 K(KT_FN,230)
+#define K_F222 K(KT_FN,231)
+#define K_F223 K(KT_FN,232)
+#define K_F224 K(KT_FN,233)
+#define K_F225 K(KT_FN,234)
+#define K_F226 K(KT_FN,235)
+#define K_F227 K(KT_FN,236)
+#define K_F228 K(KT_FN,237)
+#define K_F229 K(KT_FN,238)
+#define K_F230 K(KT_FN,239)
+#define K_F231 K(KT_FN,240)
+#define K_F232 K(KT_FN,241)
+#define K_F233 K(KT_FN,242)
+#define K_F234 K(KT_FN,243)
+#define K_F235 K(KT_FN,244)
+#define K_F236 K(KT_FN,245)
+#define K_F237 K(KT_FN,246)
+#define K_F238 K(KT_FN,247)
+#define K_F239 K(KT_FN,248)
+#define K_F240 K(KT_FN,249)
+#define K_F241 K(KT_FN,250)
+#define K_F242 K(KT_FN,251)
+#define K_F243 K(KT_FN,252)
+#define K_F244 K(KT_FN,253)
+#define K_F245 K(KT_FN,254)
+#define K_UNDO K(KT_FN,255)
+
+#define K_HOLE K(KT_SPEC,0)
+#define K_ENTER K(KT_SPEC,1)
+#define K_SH_REGS K(KT_SPEC,2)
+#define K_SH_MEM K(KT_SPEC,3)
+#define K_SH_STAT K(KT_SPEC,4)
+#define K_BREAK K(KT_SPEC,5)
+#define K_CONS K(KT_SPEC,6)
+#define K_CAPS K(KT_SPEC,7)
+#define K_NUM K(KT_SPEC,8)
+#define K_HOLD K(KT_SPEC,9)
+#define K_SCROLLFORW K(KT_SPEC,10)
+#define K_SCROLLBACK K(KT_SPEC,11)
+#define K_BOOT K(KT_SPEC,12)
+#define K_CAPSON K(KT_SPEC,13)
+#define K_COMPOSE K(KT_SPEC,14)
+#define K_SAK K(KT_SPEC,15)
+#define K_DECRCONSOLE K(KT_SPEC,16)
+#define K_INCRCONSOLE K(KT_SPEC,17)
+#define K_SPAWNCONSOLE K(KT_SPEC,18)
+#define K_BARENUMLOCK K(KT_SPEC,19)
+
+#define K_ALLOCATED K(KT_SPEC,126)
+#define K_NOSUCHMAP K(KT_SPEC,127)
+
+#define K_P0 K(KT_PAD,0)
+#define K_P1 K(KT_PAD,1)
+#define K_P2 K(KT_PAD,2)
+#define K_P3 K(KT_PAD,3)
+#define K_P4 K(KT_PAD,4)
+#define K_P5 K(KT_PAD,5)
+#define K_P6 K(KT_PAD,6)
+#define K_P7 K(KT_PAD,7)
+#define K_P8 K(KT_PAD,8)
+#define K_P9 K(KT_PAD,9)
+#define K_PPLUS K(KT_PAD,10)
+#define K_PMINUS K(KT_PAD,11)
+#define K_PSTAR K(KT_PAD,12)
+#define K_PSLASH K(KT_PAD,13)
+#define K_PENTER K(KT_PAD,14)
+#define K_PCOMMA K(KT_PAD,15)
+#define K_PDOT K(KT_PAD,16)
+#define K_PPLUSMINUS K(KT_PAD,17)
+#define K_PPARENL K(KT_PAD,18)
+#define K_PPARENR K(KT_PAD,19)
+
+#define NR_PAD 20
+
+#define K_DGRAVE K(KT_DEAD,0)
+#define K_DACUTE K(KT_DEAD,1)
+#define K_DCIRCM K(KT_DEAD,2)
+#define K_DTILDE K(KT_DEAD,3)
+#define K_DDIERE K(KT_DEAD,4)
+#define K_DCEDIL K(KT_DEAD,5)
+
+#define NR_DEAD 6
+
+#define K_DOWN K(KT_CUR,0)
+#define K_LEFT K(KT_CUR,1)
+#define K_RIGHT K(KT_CUR,2)
+#define K_UP K(KT_CUR,3)
+
+#define K_SHIFT K(KT_SHIFT,KG_SHIFT)
+#define K_CTRL K(KT_SHIFT,KG_CTRL)
+#define K_ALT K(KT_SHIFT,KG_ALT)
+#define K_ALTGR K(KT_SHIFT,KG_ALTGR)
+#define K_SHIFTL K(KT_SHIFT,KG_SHIFTL)
+#define K_SHIFTR K(KT_SHIFT,KG_SHIFTR)
+#define K_CTRLL K(KT_SHIFT,KG_CTRLL)
+#define K_CTRLR K(KT_SHIFT,KG_CTRLR)
+#define K_CAPSSHIFT K(KT_SHIFT,KG_CAPSSHIFT)
+
+#define K_ASC0 K(KT_ASCII,0)
+#define K_ASC1 K(KT_ASCII,1)
+#define K_ASC2 K(KT_ASCII,2)
+#define K_ASC3 K(KT_ASCII,3)
+#define K_ASC4 K(KT_ASCII,4)
+#define K_ASC5 K(KT_ASCII,5)
+#define K_ASC6 K(KT_ASCII,6)
+#define K_ASC7 K(KT_ASCII,7)
+#define K_ASC8 K(KT_ASCII,8)
+#define K_ASC9 K(KT_ASCII,9)
+#define K_HEX0 K(KT_ASCII,10)
+#define K_HEX1 K(KT_ASCII,11)
+#define K_HEX2 K(KT_ASCII,12)
+#define K_HEX3 K(KT_ASCII,13)
+#define K_HEX4 K(KT_ASCII,14)
+#define K_HEX5 K(KT_ASCII,15)
+#define K_HEX6 K(KT_ASCII,16)
+#define K_HEX7 K(KT_ASCII,17)
+#define K_HEX8 K(KT_ASCII,18)
+#define K_HEX9 K(KT_ASCII,19)
+#define K_HEXa K(KT_ASCII,20)
+#define K_HEXb K(KT_ASCII,21)
+#define K_HEXc K(KT_ASCII,22)
+#define K_HEXd K(KT_ASCII,23)
+#define K_HEXe K(KT_ASCII,24)
+#define K_HEXf K(KT_ASCII,25)
+
+#define NR_ASCII 26
+
+#define K_SHIFTLOCK K(KT_LOCK,KG_SHIFT)
+#define K_CTRLLOCK K(KT_LOCK,KG_CTRL)
+#define K_ALTLOCK K(KT_LOCK,KG_ALT)
+#define K_ALTGRLOCK K(KT_LOCK,KG_ALTGR)
+#define K_SHIFTLLOCK K(KT_LOCK,KG_SHIFTL)
+#define K_SHIFTRLOCK K(KT_LOCK,KG_SHIFTR)
+#define K_CTRLLLOCK K(KT_LOCK,KG_CTRLL)
+#define K_CTRLRLOCK K(KT_LOCK,KG_CTRLR)
+
+#define K_SHIFT_SLOCK K(KT_SLOCK,KG_SHIFT)
+#define K_CTRL_SLOCK K(KT_SLOCK,KG_CTRL)
+#define K_ALT_SLOCK K(KT_SLOCK,KG_ALT)
+#define K_ALTGR_SLOCK K(KT_SLOCK,KG_ALTGR)
+#define K_SHIFTL_SLOCK K(KT_SLOCK,KG_SHIFTL)
+#define K_SHIFTR_SLOCK K(KT_SLOCK,KG_SHIFTR)
+#define K_CTRLL_SLOCK K(KT_SLOCK,KG_CTRLL)
+#define K_CTRLR_SLOCK K(KT_SLOCK,KG_CTRLR)
+
+#define NR_LOCK 8
+
+#define K_BRL_BLANK K(KT_BRL, 0)
+#define K_BRL_DOT1 K(KT_BRL, 1)
+#define K_BRL_DOT2 K(KT_BRL, 2)
+#define K_BRL_DOT3 K(KT_BRL, 3)
+#define K_BRL_DOT4 K(KT_BRL, 4)
+#define K_BRL_DOT5 K(KT_BRL, 5)
+#define K_BRL_DOT6 K(KT_BRL, 6)
+#define K_BRL_DOT7 K(KT_BRL, 7)
+#define K_BRL_DOT8 K(KT_BRL, 8)
+
+#define NR_BRL 9
+
+#define MAX_DIACR 256
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/keychord.h b/6/platforms/android-3/arch-x86/usr/include/linux/keychord.h
new file mode 100644
index 0000000..9148431
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/keychord.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KEYCHORD_H_
+#define __LINUX_KEYCHORD_H_
+
+#include <linux/input.h>
+
+#define KEYCHORD_VERSION 1
+
+struct input_keychord {
+
+ __u16 version;
+
+ __u16 id;
+
+ __u16 count;
+
+ __u16 keycodes[];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/klist.h b/6/platforms/android-3/arch-x86/usr/include/linux/klist.h
new file mode 100644
index 0000000..0df014f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/klist.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KLIST_H
+#define _LINUX_KLIST_H
+
+#include <linux/spinlock.h>
+#include <linux/completion.h>
+#include <linux/kref.h>
+#include <linux/list.h>
+
+struct klist_node;
+struct klist {
+ spinlock_t k_lock;
+ struct list_head k_list;
+ void (*get)(struct klist_node *);
+ void (*put)(struct klist_node *);
+};
+
+struct klist_node {
+ struct klist * n_klist;
+ struct list_head n_node;
+ struct kref n_ref;
+ struct completion n_removed;
+};
+
+struct klist_iter {
+ struct klist * i_klist;
+ struct list_head * i_head;
+ struct klist_node * i_cur;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kmod.h b/6/platforms/android-3/arch-x86/usr/include/linux/kmod.h
new file mode 100644
index 0000000..d24456d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kmod.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_KMOD_H__
+#define __LINUX_KMOD_H__
+
+#include <linux/stddef.h>
+#include <linux/errno.h>
+#include <linux/compiler.h>
+
+#define KMOD_PATH_LEN 256
+
+#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kobject.h b/6/platforms/android-3/arch-x86/usr/include/linux/kobject.h
new file mode 100644
index 0000000..c61a950
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kobject.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _KOBJECT_H_
+#define _KOBJECT_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/kref.h b/6/platforms/android-3/arch-x86/usr/include/linux/kref.h
new file mode 100644
index 0000000..ee02b7f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/kref.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _KREF_H_
+#define _KREF_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ktime.h b/6/platforms/android-3/arch-x86/usr/include/linux/ktime.h
new file mode 100644
index 0000000..34f8f0f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ktime.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_KTIME_H
+#define _LINUX_KTIME_H
+
+#include <linux/time.h>
+#include <linux/jiffies.h>
+
+typedef union {
+ s64 tv64;
+#if BITS_PER_LONG != (64 && !defined(CONFIG_KTIME_SCALAR))
+ struct {
+#ifdef __BIG_ENDIAN
+ s32 sec, nsec;
+#else
+ s32 nsec, sec;
+#endif
+ } tv;
+#endif
+} ktime_t;
+
+#define KTIME_MAX ((s64)~((u64)1 << 63))
+#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
+
+#if BITS_PER_LONG == 64
+
+#if BITS_PER_LONG == 64
+#endif
+#define ktime_sub(lhs, rhs) ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
+#define ktime_add(lhs, rhs) ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
+#define ktime_add_ns(kt, nsval) ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })
+#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64)
+#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
+#define ktime_to_ns(kt) ((kt).tv64)
+#else
+
+#endif
+#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
+#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
+
+#define ktime_get_real_ts(ts) getnstimeofday(ts)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/limits.h b/6/platforms/android-3/arch-x86/usr/include/linux/limits.h
new file mode 100644
index 0000000..5565e30
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/limits.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LIMITS_H
+#define _LINUX_LIMITS_H
+
+#define NR_OPEN 1024
+
+#define NGROUPS_MAX 65536
+#define ARG_MAX 131072
+#define CHILD_MAX 999
+#define OPEN_MAX 256
+#define LINK_MAX 127
+#define MAX_CANON 255
+#define MAX_INPUT 255
+#define NAME_MAX 255
+#define PATH_MAX 4096
+#define PIPE_BUF 4096
+#define XATTR_NAME_MAX 255
+#define XATTR_SIZE_MAX 65536
+#define XATTR_LIST_MAX 65536
+
+#define RTSIG_MAX 32
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/linkage.h b/6/platforms/android-3/arch-x86/usr/include/linux/linkage.h
new file mode 100644
index 0000000..e0194bc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/linkage.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LINKAGE_H
+#define _LINUX_LINKAGE_H
+
+#include <asm/linkage.h>
+
+#ifdef __cplusplus
+#define CPP_ASMLINKAGE extern "C"
+#else
+#define CPP_ASMLINKAGE
+#endif
+
+#ifndef asmlinkage
+#define asmlinkage CPP_ASMLINKAGE
+#endif
+
+#ifndef prevent_tail_call
+#define prevent_tail_call(ret) do { } while (0)
+#endif
+
+#ifndef __ALIGN
+#define __ALIGN .align 4,0x90
+#define __ALIGN_STR ".align 4,0x90"
+#endif
+
+#ifdef __ASSEMBLY__
+
+#define ALIGN __ALIGN
+#define ALIGN_STR __ALIGN_STR
+
+#ifndef ENTRY
+#define ENTRY(name) .globl name; ALIGN; name:
+#endif
+
+#define KPROBE_ENTRY(name) .section .kprobes.text, "ax"; ENTRY(name)
+
+#ifndef END
+#define END(name) .size name, .-name
+#endif
+
+#ifndef ENDPROC
+#define ENDPROC(name) .type name, @function; END(name)
+#endif
+
+#endif
+
+#define NORET_TYPE
+#define ATTRIB_NORET __attribute__((noreturn))
+#define NORET_AND noreturn,
+
+#ifndef FASTCALL
+#define FASTCALL(x) x
+#define fastcall
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/list.h b/6/platforms/android-3/arch-x86/usr/include/linux/list.h
new file mode 100644
index 0000000..d17871d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/list.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LIST_H
+#define _LINUX_LIST_H
+
+#warning "don't include kernel headers in userspace"
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/lockd/nlm.h b/6/platforms/android-3/arch-x86/usr/include/linux/lockd/nlm.h
new file mode 100644
index 0000000..d5d44fe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/lockd/nlm.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_LOCKD_NLM_H
+#define LINUX_LOCKD_NLM_H
+
+#define NLM_OFFSET_MAX ((s32) 0x7fffffff)
+#define NLM4_OFFSET_MAX ((s64) ((~(u64)0) >> 1))
+
+enum {
+ NLM_LCK_GRANTED = 0,
+ NLM_LCK_DENIED = 1,
+ NLM_LCK_DENIED_NOLOCKS = 2,
+ NLM_LCK_BLOCKED = 3,
+ NLM_LCK_DENIED_GRACE_PERIOD = 4,
+};
+
+#define NLM_PROGRAM 100021
+
+#define NLMPROC_NULL 0
+#define NLMPROC_TEST 1
+#define NLMPROC_LOCK 2
+#define NLMPROC_CANCEL 3
+#define NLMPROC_UNLOCK 4
+#define NLMPROC_GRANTED 5
+#define NLMPROC_TEST_MSG 6
+#define NLMPROC_LOCK_MSG 7
+#define NLMPROC_CANCEL_MSG 8
+#define NLMPROC_UNLOCK_MSG 9
+#define NLMPROC_GRANTED_MSG 10
+#define NLMPROC_TEST_RES 11
+#define NLMPROC_LOCK_RES 12
+#define NLMPROC_CANCEL_RES 13
+#define NLMPROC_UNLOCK_RES 14
+#define NLMPROC_GRANTED_RES 15
+#define NLMPROC_NSM_NOTIFY 16
+#define NLMPROC_SHARE 20
+#define NLMPROC_UNSHARE 21
+#define NLMPROC_NM_LOCK 22
+#define NLMPROC_FREE_ALL 23
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/lockd/xdr.h b/6/platforms/android-3/arch-x86/usr/include/linux/lockd/xdr.h
new file mode 100644
index 0000000..75d0308
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/lockd/xdr.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LOCKD_XDR_H
+#define LOCKD_XDR_H
+
+#include <linux/fs.h>
+#include <linux/nfs.h>
+#include <linux/sunrpc/xdr.h>
+
+#define NLM_MAXCOOKIELEN 32
+#define NLM_MAXSTRLEN 1024
+
+#define nlm_granted __constant_htonl(NLM_LCK_GRANTED)
+#define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED)
+#define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
+#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
+#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
+
+struct nlm_lock {
+ char * caller;
+ int len;
+ struct nfs_fh fh;
+ struct xdr_netobj oh;
+ u32 svid;
+ struct file_lock fl;
+};
+
+struct nlm_cookie
+{
+ unsigned char data[NLM_MAXCOOKIELEN];
+ unsigned int len;
+};
+
+struct nlm_args {
+ struct nlm_cookie cookie;
+ struct nlm_lock lock;
+ u32 block;
+ u32 reclaim;
+ u32 state;
+ u32 monitor;
+ u32 fsm_access;
+ u32 fsm_mode;
+};
+
+typedef struct nlm_args nlm_args;
+
+struct nlm_res {
+ struct nlm_cookie cookie;
+ u32 status;
+ struct nlm_lock lock;
+};
+
+struct nlm_reboot {
+ char * mon;
+ int len;
+ u32 state;
+ u32 addr;
+ u32 vers;
+ u32 proto;
+};
+
+#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/lockdep.h b/6/platforms/android-3/arch-x86/usr/include/linux/lockdep.h
new file mode 100644
index 0000000..f5e8634
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/lockdep.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_LOCKDEP_H
+#define __LINUX_LOCKDEP_H
+
+#include <linux/linkage.h>
+#include <linux/list.h>
+#include <linux/debug_locks.h>
+#include <linux/stacktrace.h>
+
+#define lock_acquire(l, s, t, r, c, i) do { } while (0)
+#define lock_release(l, n, i) do { } while (0)
+#define lockdep_init() do { } while (0)
+#define lockdep_info() do { } while (0)
+#define lockdep_init_map(lock, name, key) do { (void)(key); } while (0)
+#define lockdep_set_class(lock, key) do { (void)(key); } while (0)
+#define lockdep_set_class_and_name(lock, key, name) do { (void)(key); } while (0)
+#define INIT_LOCKDEP
+#define lockdep_reset() do { debug_locks = 1; } while (0)
+#define lockdep_free_key_range(start, size) do { } while (0)
+
+#define early_init_irq_lock_class() do { } while (0)
+
+#define early_boot_irqs_off() do { } while (0)
+#define early_boot_irqs_on() do { } while (0)
+
+#define SINGLE_DEPTH_NESTING 1
+
+#define spin_acquire(l, s, t, i) do { } while (0)
+#define spin_release(l, n, i) do { } while (0)
+
+#define rwlock_acquire(l, s, t, i) do { } while (0)
+#define rwlock_acquire_read(l, s, t, i) do { } while (0)
+#define rwlock_release(l, n, i) do { } while (0)
+
+#define mutex_acquire(l, s, t, i) do { } while (0)
+#define mutex_release(l, n, i) do { } while (0)
+
+#define rwsem_acquire(l, s, t, i) do { } while (0)
+#define rwsem_acquire_read(l, s, t, i) do { } while (0)
+#define rwsem_release(l, n, i) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/loop.h b/6/platforms/android-3/arch-x86/usr/include/linux/loop.h
new file mode 100644
index 0000000..9cdfd38
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/loop.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_LOOP_H
+#define _LINUX_LOOP_H
+
+#define LO_NAME_SIZE 64
+#define LO_KEY_SIZE 32
+
+enum {
+ LO_FLAGS_READ_ONLY = 1,
+ LO_FLAGS_USE_AOPS = 2,
+};
+
+#include <asm/posix_types.h>
+#include <asm/types.h>
+
+struct loop_info {
+ int lo_number;
+ __kernel_old_dev_t lo_device;
+ unsigned long lo_inode;
+ __kernel_old_dev_t lo_rdevice;
+ int lo_offset;
+ int lo_encrypt_type;
+ int lo_encrypt_key_size;
+ int lo_flags;
+ char lo_name[LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[LO_KEY_SIZE];
+ unsigned long lo_init[2];
+ char reserved[4];
+};
+
+struct loop_info64 {
+ __u64 lo_device;
+ __u64 lo_inode;
+ __u64 lo_rdevice;
+ __u64 lo_offset;
+ __u64 lo_sizelimit;
+ __u32 lo_number;
+ __u32 lo_encrypt_type;
+ __u32 lo_encrypt_key_size;
+ __u32 lo_flags;
+ __u8 lo_file_name[LO_NAME_SIZE];
+ __u8 lo_crypt_name[LO_NAME_SIZE];
+ __u8 lo_encrypt_key[LO_KEY_SIZE];
+ __u64 lo_init[2];
+};
+
+#define LO_CRYPT_NONE 0
+#define LO_CRYPT_XOR 1
+#define LO_CRYPT_DES 2
+#define LO_CRYPT_FISH2 3
+#define LO_CRYPT_BLOW 4
+#define LO_CRYPT_CAST128 5
+#define LO_CRYPT_IDEA 6
+#define LO_CRYPT_DUMMY 9
+#define LO_CRYPT_SKIPJACK 10
+#define LO_CRYPT_CRYPTOAPI 18
+#define MAX_LO_CRYPT 20
+
+#define LOOP_SET_FD 0x4C00
+#define LOOP_CLR_FD 0x4C01
+#define LOOP_SET_STATUS 0x4C02
+#define LOOP_GET_STATUS 0x4C03
+#define LOOP_SET_STATUS64 0x4C04
+#define LOOP_GET_STATUS64 0x4C05
+#define LOOP_CHANGE_FD 0x4C06
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/magic.h b/6/platforms/android-3/arch-x86/usr/include/linux/magic.h
new file mode 100644
index 0000000..c94f9ce
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/magic.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MAGIC_H__
+#define __LINUX_MAGIC_H__
+
+#define ADFS_SUPER_MAGIC 0xadf5
+#define AFFS_SUPER_MAGIC 0xadff
+#define AFS_SUPER_MAGIC 0x5346414F
+#define AUTOFS_SUPER_MAGIC 0x0187
+#define CODA_SUPER_MAGIC 0x73757245
+#define EFS_SUPER_MAGIC 0x414A53
+#define EXT2_SUPER_MAGIC 0xEF53
+#define EXT3_SUPER_MAGIC 0xEF53
+#define EXT4_SUPER_MAGIC 0xEF53
+#define HPFS_SUPER_MAGIC 0xf995e849
+#define ISOFS_SUPER_MAGIC 0x9660
+#define JFFS2_SUPER_MAGIC 0x72b6
+#define ANON_INODE_FS_MAGIC 0x09041934
+
+#define MINIX_SUPER_MAGIC 0x137F
+#define MINIX_SUPER_MAGIC2 0x138F
+#define MINIX2_SUPER_MAGIC 0x2468
+#define MINIX2_SUPER_MAGIC2 0x2478
+#define MINIX3_SUPER_MAGIC 0x4d5a
+
+#define MSDOS_SUPER_MAGIC 0x4d44
+#define NCP_SUPER_MAGIC 0x564c
+#define NFS_SUPER_MAGIC 0x6969
+#define OPENPROM_SUPER_MAGIC 0x9fa1
+#define PROC_SUPER_MAGIC 0x9fa0
+#define QNX4_SUPER_MAGIC 0x002f
+
+#define REISERFS_SUPER_MAGIC 0x52654973
+
+#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
+#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
+#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
+
+#define SMB_SUPER_MAGIC 0x517B
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+#define CGROUP_SUPER_MAGIC 0x27e0eb
+
+#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
+#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/major.h b/6/platforms/android-3/arch-x86/usr/include/linux/major.h
new file mode 100644
index 0000000..e42d698
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/major.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MAJOR_H
+#define _LINUX_MAJOR_H
+
+#define UNNAMED_MAJOR 0
+#define MEM_MAJOR 1
+#define RAMDISK_MAJOR 1
+#define FLOPPY_MAJOR 2
+#define PTY_MASTER_MAJOR 2
+#define IDE0_MAJOR 3
+#define HD_MAJOR IDE0_MAJOR
+#define PTY_SLAVE_MAJOR 3
+#define TTY_MAJOR 4
+#define TTYAUX_MAJOR 5
+#define LP_MAJOR 6
+#define VCS_MAJOR 7
+#define LOOP_MAJOR 7
+#define SCSI_DISK0_MAJOR 8
+#define SCSI_TAPE_MAJOR 9
+#define MD_MAJOR 9
+#define MISC_MAJOR 10
+#define SCSI_CDROM_MAJOR 11
+#define MUX_MAJOR 11
+#define XT_DISK_MAJOR 13
+#define INPUT_MAJOR 13
+#define SOUND_MAJOR 14
+#define CDU31A_CDROM_MAJOR 15
+#define JOYSTICK_MAJOR 15
+#define GOLDSTAR_CDROM_MAJOR 16
+#define OPTICS_CDROM_MAJOR 17
+#define SANYO_CDROM_MAJOR 18
+#define CYCLADES_MAJOR 19
+#define CYCLADESAUX_MAJOR 20
+#define MITSUMI_X_CDROM_MAJOR 20
+#define MFM_ACORN_MAJOR 21
+#define SCSI_GENERIC_MAJOR 21
+#define IDE1_MAJOR 22
+#define DIGICU_MAJOR 22
+#define DIGI_MAJOR 23
+#define MITSUMI_CDROM_MAJOR 23
+#define CDU535_CDROM_MAJOR 24
+#define STL_SERIALMAJOR 24
+#define MATSUSHITA_CDROM_MAJOR 25
+#define STL_CALLOUTMAJOR 25
+#define MATSUSHITA_CDROM2_MAJOR 26
+#define QIC117_TAPE_MAJOR 27
+#define MATSUSHITA_CDROM3_MAJOR 27
+#define MATSUSHITA_CDROM4_MAJOR 28
+#define STL_SIOMEMMAJOR 28
+#define ACSI_MAJOR 28
+#define AZTECH_CDROM_MAJOR 29
+#define GRAPHDEV_MAJOR 29
+#define CM206_CDROM_MAJOR 32
+#define IDE2_MAJOR 33
+#define IDE3_MAJOR 34
+#define Z8530_MAJOR 34
+#define XPRAM_MAJOR 35
+#define NETLINK_MAJOR 36
+#define PS2ESDI_MAJOR 36
+#define IDETAPE_MAJOR 37
+#define Z2RAM_MAJOR 37
+#define APBLOCK_MAJOR 38
+#define DDV_MAJOR 39
+#define NBD_MAJOR 43
+#define RISCOM8_NORMAL_MAJOR 48
+#define DAC960_MAJOR 48
+#define RISCOM8_CALLOUT_MAJOR 49
+#define MKISS_MAJOR 55
+#define DSP56K_MAJOR 55
+
+#define IDE4_MAJOR 56
+#define IDE5_MAJOR 57
+
+#define SCSI_DISK1_MAJOR 65
+#define SCSI_DISK2_MAJOR 66
+#define SCSI_DISK3_MAJOR 67
+#define SCSI_DISK4_MAJOR 68
+#define SCSI_DISK5_MAJOR 69
+#define SCSI_DISK6_MAJOR 70
+#define SCSI_DISK7_MAJOR 71
+
+#define COMPAQ_SMART2_MAJOR 72
+#define COMPAQ_SMART2_MAJOR1 73
+#define COMPAQ_SMART2_MAJOR2 74
+#define COMPAQ_SMART2_MAJOR3 75
+#define COMPAQ_SMART2_MAJOR4 76
+#define COMPAQ_SMART2_MAJOR5 77
+#define COMPAQ_SMART2_MAJOR6 78
+#define COMPAQ_SMART2_MAJOR7 79
+
+#define SPECIALIX_NORMAL_MAJOR 75
+#define SPECIALIX_CALLOUT_MAJOR 76
+
+#define AURORA_MAJOR 79
+
+#define I2O_MAJOR 80
+
+#define SHMIQ_MAJOR 85
+#define SCSI_CHANGER_MAJOR 86
+
+#define IDE6_MAJOR 88
+#define IDE7_MAJOR 89
+#define IDE8_MAJOR 90
+#define IDE9_MAJOR 91
+
+#define DASD_MAJOR 94
+
+#define MDISK_MAJOR 95
+
+#define UBD_MAJOR 98
+
+#define PP_MAJOR 99
+#define JSFD_MAJOR 99
+
+#define PHONE_MAJOR 100
+
+#define COMPAQ_CISS_MAJOR 104
+#define COMPAQ_CISS_MAJOR1 105
+#define COMPAQ_CISS_MAJOR2 106
+#define COMPAQ_CISS_MAJOR3 107
+#define COMPAQ_CISS_MAJOR4 108
+#define COMPAQ_CISS_MAJOR5 109
+#define COMPAQ_CISS_MAJOR6 110
+#define COMPAQ_CISS_MAJOR7 111
+
+#define VIODASD_MAJOR 112
+#define VIOCD_MAJOR 113
+
+#define ATARAID_MAJOR 114
+
+#define SCSI_DISK8_MAJOR 128
+#define SCSI_DISK9_MAJOR 129
+#define SCSI_DISK10_MAJOR 130
+#define SCSI_DISK11_MAJOR 131
+#define SCSI_DISK12_MAJOR 132
+#define SCSI_DISK13_MAJOR 133
+#define SCSI_DISK14_MAJOR 134
+#define SCSI_DISK15_MAJOR 135
+
+#define UNIX98_PTY_MASTER_MAJOR 128
+#define UNIX98_PTY_MAJOR_COUNT 8
+#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
+
+#define RTF_MAJOR 150
+#define RAW_MAJOR 162
+
+#define USB_ACM_MAJOR 166
+#define USB_ACM_AUX_MAJOR 167
+#define USB_CHAR_MAJOR 180
+
+#define VXVM_MAJOR 199
+#define VXSPEC_MAJOR 200
+#define VXDMP_MAJOR 201
+
+#define MSR_MAJOR 202
+#define CPUID_MAJOR 203
+
+#define OSST_MAJOR 206
+
+#define IBM_TTY3270_MAJOR 227
+#define IBM_FS3270_MAJOR 228
+
+#define VIOTAPE_MAJOR 230
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mc146818rtc.h b/6/platforms/android-3/arch-x86/usr/include/linux/mc146818rtc.h
new file mode 100644
index 0000000..74436ea
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mc146818rtc.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MC146818RTC_H
+#define _MC146818RTC_H
+
+#include <asm/io.h>
+#include <linux/rtc.h>
+#include <asm/mc146818rtc.h>
+
+#define RTC_SECONDS 0
+#define RTC_SECONDS_ALARM 1
+#define RTC_MINUTES 2
+#define RTC_MINUTES_ALARM 3
+#define RTC_HOURS 4
+#define RTC_HOURS_ALARM 5
+
+#define RTC_ALARM_DONT_CARE 0xC0
+
+#define RTC_DAY_OF_WEEK 6
+#define RTC_DAY_OF_MONTH 7
+#define RTC_MONTH 8
+#define RTC_YEAR 9
+
+#define RTC_REG_A 10
+#define RTC_REG_B 11
+#define RTC_REG_C 12
+#define RTC_REG_D 13
+
+#define RTC_FREQ_SELECT RTC_REG_A
+
+#define RTC_UIP 0x80
+#define RTC_DIV_CTL 0x70
+
+#define RTC_REF_CLCK_4MHZ 0x00
+#define RTC_REF_CLCK_1MHZ 0x10
+#define RTC_REF_CLCK_32KHZ 0x20
+
+#define RTC_DIV_RESET1 0x60
+#define RTC_DIV_RESET2 0x70
+
+#define RTC_RATE_SELECT 0x0F
+
+#define RTC_CONTROL RTC_REG_B
+#define RTC_SET 0x80
+#define RTC_PIE 0x40
+#define RTC_AIE 0x20
+#define RTC_UIE 0x10
+#define RTC_SQWE 0x08
+#define RTC_DM_BINARY 0x04
+#define RTC_24H 0x02
+#define RTC_DST_EN 0x01
+
+#define RTC_INTR_FLAGS RTC_REG_C
+
+#define RTC_IRQF 0x80
+#define RTC_PF 0x40
+#define RTC_AF 0x20
+#define RTC_UF 0x10
+
+#define RTC_VALID RTC_REG_D
+#define RTC_VRT 0x80
+
+#ifndef ARCH_RTC_LOCATION
+
+#define RTC_IO_EXTENT 0x8
+#define RTC_IOMAPPED 1
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mca.h b/6/platforms/android-3/arch-x86/usr/include/linux/mca.h
new file mode 100644
index 0000000..dfbfc2a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mca.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MCA_H
+#define _LINUX_MCA_H
+
+#include <linux/device.h>
+
+#define MCA_bus 0
+
+typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
+
+enum MCA_AdapterStatus {
+ MCA_ADAPTER_NORMAL = 0,
+ MCA_ADAPTER_NONE = 1,
+ MCA_ADAPTER_DISABLED = 2,
+ MCA_ADAPTER_ERROR = 3
+};
+
+struct mca_device {
+ u64 dma_mask;
+ int pos_id;
+ int slot;
+
+ int index;
+
+ int driver_loaded;
+
+ unsigned char pos[8];
+
+ short pos_register;
+
+ enum MCA_AdapterStatus status;
+ struct device dev;
+ char name[32];
+};
+#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
+
+struct mca_bus_accessor_functions {
+ unsigned char (*mca_read_pos)(struct mca_device *, int reg);
+ void (*mca_write_pos)(struct mca_device *, int reg,
+ unsigned char byte);
+ int (*mca_transform_irq)(struct mca_device *, int irq);
+ int (*mca_transform_ioport)(struct mca_device *,
+ int region);
+ void * (*mca_transform_memory)(struct mca_device *,
+ void *memory);
+};
+
+struct mca_bus {
+ u64 default_dma_mask;
+ int number;
+ struct mca_bus_accessor_functions f;
+ struct device dev;
+ char name[32];
+};
+#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
+
+struct mca_driver {
+ const short *id_table;
+ void *driver_data;
+ struct device_driver driver;
+};
+#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mempolicy.h b/6/platforms/android-3/arch-x86/usr/include/linux/mempolicy.h
new file mode 100644
index 0000000..6b7b2d4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mempolicy.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MEMPOLICY_H
+#define _LINUX_MEMPOLICY_H 1
+
+#include <linux/errno.h>
+
+#define MPOL_DEFAULT 0
+#define MPOL_PREFERRED 1
+#define MPOL_BIND 2
+#define MPOL_INTERLEAVE 3
+
+#define MPOL_MAX MPOL_INTERLEAVE
+
+#define MPOL_F_NODE (1<<0)
+#define MPOL_F_ADDR (1<<1)
+
+#define MPOL_MF_STRICT (1<<0)
+#define MPOL_MF_MOVE (1<<1)
+#define MPOL_MF_MOVE_ALL (1<<2)
+#define MPOL_MF_INTERNAL (1<<3)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mempool.h b/6/platforms/android-3/arch-x86/usr/include/linux/mempool.h
new file mode 100644
index 0000000..fa2432b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mempool.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MEMPOOL_H
+#define _LINUX_MEMPOOL_H
+
+#include <linux/wait.h>
+
+struct kmem_cache;
+
+typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
+typedef void (mempool_free_t)(void *element, void *pool_data);
+
+typedef struct mempool_s {
+ spinlock_t lock;
+ int min_nr;
+ int curr_nr;
+ void **elements;
+
+ void *pool_data;
+ mempool_alloc_t *alloc;
+ mempool_free_t *free;
+ wait_queue_head_t wait;
+} mempool_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/miscdevice.h b/6/platforms/android-3/arch-x86/usr/include/linux/miscdevice.h
new file mode 100644
index 0000000..457960a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/miscdevice.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MISCDEVICE_H
+#define _LINUX_MISCDEVICE_H
+#include <linux/module.h>
+#include <linux/major.h>
+
+#define PSMOUSE_MINOR 1
+#define MS_BUSMOUSE_MINOR 2
+#define ATIXL_BUSMOUSE_MINOR 3
+
+#define ATARIMOUSE_MINOR 5
+#define SUN_MOUSE_MINOR 6
+#define APOLLO_MOUSE_MINOR 7
+#define PC110PAD_MINOR 9
+
+#define WATCHDOG_MINOR 130
+#define TEMP_MINOR 131
+#define RTC_MINOR 135
+#define EFI_RTC_MINOR 136
+#define SUN_OPENPROM_MINOR 139
+#define DMAPI_MINOR 140
+#define NVRAM_MINOR 144
+#define SGI_MMTIMER 153
+#define STORE_QUEUE_MINOR 155
+#define I2O_MINOR 166
+#define MICROCODE_MINOR 184
+#define MWAVE_MINOR 219
+#define MPT_MINOR 220
+#define MISC_DYNAMIC_MINOR 255
+
+#define TUN_MINOR 200
+#define HPET_MINOR 228
+
+struct device;
+struct class_device;
+
+struct miscdevice {
+ int minor;
+ const char *name;
+ const struct file_operations *fops;
+ struct list_head list;
+ struct device *dev;
+ struct class_device *class;
+};
+
+#define MODULE_ALIAS_MISCDEV(minor) MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) "-" __stringify(minor))
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mm.h b/6/platforms/android-3/arch-x86/usr/include/linux/mm.h
new file mode 100644
index 0000000..fea293b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mm.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MM_H
+#define _LINUX_MM_H
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/capability.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mmc/card.h b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/card.h
new file mode 100644
index 0000000..94afe21
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/card.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MMC_CARD_H
+#define LINUX_MMC_CARD_H
+
+#include <linux/mmc/mmc.h>
+
+struct mmc_cid {
+ unsigned int manfid;
+ char prod_name[8];
+ unsigned int serial;
+ unsigned short oemid;
+ unsigned short year;
+ unsigned char hwrev;
+ unsigned char fwrev;
+ unsigned char month;
+};
+
+struct mmc_csd {
+ unsigned char mmca_vsn;
+ unsigned short cmdclass;
+ unsigned short tacc_clks;
+ unsigned int tacc_ns;
+ unsigned int r2w_factor;
+ unsigned int max_dtr;
+ unsigned int read_blkbits;
+ unsigned int write_blkbits;
+ unsigned int capacity;
+ unsigned int read_partial:1,
+ read_misalign:1,
+ write_partial:1,
+ write_misalign:1;
+};
+
+struct sd_scr {
+ unsigned char sda_vsn;
+ unsigned char bus_widths;
+#define SD_SCR_BUS_WIDTH_1 (1<<0)
+#define SD_SCR_BUS_WIDTH_4 (1<<2)
+};
+
+struct mmc_host;
+
+struct mmc_card {
+ struct list_head node;
+ struct mmc_host *host;
+ struct device dev;
+ unsigned int rca;
+ unsigned int state;
+#define MMC_STATE_PRESENT (1<<0)
+#define MMC_STATE_DEAD (1<<1)
+#define MMC_STATE_BAD (1<<2)
+#define MMC_STATE_SDCARD (1<<3)
+#define MMC_STATE_READONLY (1<<4)
+ u32 raw_cid[4];
+ u32 raw_csd[4];
+ u32 raw_scr[2];
+ struct mmc_cid cid;
+ struct mmc_csd csd;
+ struct sd_scr scr;
+};
+
+#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
+#define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD)
+#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
+#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
+#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
+
+#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
+#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
+#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
+#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
+#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
+
+#define mmc_card_name(c) ((c)->cid.prod_name)
+#define mmc_card_id(c) ((c)->dev.bus_id)
+
+#define mmc_list_to_card(l) container_of(l, struct mmc_card, node)
+#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev)
+#define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d)
+
+struct mmc_driver {
+ struct device_driver drv;
+ int (*probe)(struct mmc_card *);
+ void (*remove)(struct mmc_card *);
+ int (*suspend)(struct mmc_card *, pm_message_t);
+ int (*resume)(struct mmc_card *);
+};
+
+#define mmc_card_release_host(c) mmc_release_host((c)->host)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mmc/host.h b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/host.h
new file mode 100644
index 0000000..9433626
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/host.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MMC_HOST_H
+#define LINUX_MMC_HOST_H
+
+#include <linux/mmc/mmc.h>
+
+struct mmc_ios {
+ unsigned int clock;
+ unsigned short vdd;
+
+#define MMC_VDD_150 0
+#define MMC_VDD_155 1
+#define MMC_VDD_160 2
+#define MMC_VDD_165 3
+#define MMC_VDD_170 4
+#define MMC_VDD_180 5
+#define MMC_VDD_190 6
+#define MMC_VDD_200 7
+#define MMC_VDD_210 8
+#define MMC_VDD_220 9
+#define MMC_VDD_230 10
+#define MMC_VDD_240 11
+#define MMC_VDD_250 12
+#define MMC_VDD_260 13
+#define MMC_VDD_270 14
+#define MMC_VDD_280 15
+#define MMC_VDD_290 16
+#define MMC_VDD_300 17
+#define MMC_VDD_310 18
+#define MMC_VDD_320 19
+#define MMC_VDD_330 20
+#define MMC_VDD_340 21
+#define MMC_VDD_350 22
+#define MMC_VDD_360 23
+
+ unsigned char bus_mode;
+
+#define MMC_BUSMODE_OPENDRAIN 1
+#define MMC_BUSMODE_PUSHPULL 2
+
+ unsigned char chip_select;
+
+#define MMC_CS_DONTCARE 0
+#define MMC_CS_HIGH 1
+#define MMC_CS_LOW 2
+
+ unsigned char power_mode;
+
+#define MMC_POWER_OFF 0
+#define MMC_POWER_UP 1
+#define MMC_POWER_ON 2
+
+ unsigned char bus_width;
+
+#define MMC_BUS_WIDTH_1 0
+#define MMC_BUS_WIDTH_4 2
+};
+
+struct mmc_host_ops {
+ void (*request)(struct mmc_host *host, struct mmc_request *req);
+ void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
+ int (*get_ro)(struct mmc_host *host);
+};
+
+struct mmc_card;
+struct device;
+
+struct mmc_host {
+ struct device *dev;
+ struct class_device class_dev;
+ int index;
+ const struct mmc_host_ops *ops;
+ unsigned int f_min;
+ unsigned int f_max;
+ u32 ocr_avail;
+
+ unsigned long caps;
+
+#define MMC_CAP_4_BIT_DATA (1 << 0)
+
+ unsigned int max_seg_size;
+ unsigned short max_hw_segs;
+ unsigned short max_phys_segs;
+ unsigned short max_sectors;
+ unsigned short unused;
+
+ struct mmc_ios ios;
+ u32 ocr;
+
+ unsigned int mode;
+#define MMC_MODE_MMC 0
+#define MMC_MODE_SD 1
+
+ struct list_head cards;
+
+ wait_queue_head_t wq;
+ spinlock_t lock;
+ struct mmc_card *card_busy;
+ struct mmc_card *card_selected;
+
+ struct work_struct detect;
+
+ unsigned long private[0] ____cacheline_aligned;
+};
+
+#define mmc_dev(x) ((x)->dev)
+#define mmc_hostname(x) ((x)->class_dev.class_id)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mmc/mmc.h b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/mmc.h
new file mode 100644
index 0000000..089714c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mmc/mmc.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef MMC_H
+#define MMC_H
+
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/device.h>
+
+struct request;
+struct mmc_data;
+struct mmc_request;
+
+struct mmc_command {
+ u32 opcode;
+ u32 arg;
+ u32 resp[4];
+ unsigned int flags;
+#define MMC_RSP_PRESENT (1 << 0)
+#define MMC_RSP_136 (1 << 1)
+#define MMC_RSP_CRC (1 << 2)
+#define MMC_RSP_BUSY (1 << 3)
+#define MMC_RSP_OPCODE (1 << 4)
+#define MMC_CMD_MASK (3 << 5)
+#define MMC_CMD_AC (0 << 5)
+#define MMC_CMD_ADTC (1 << 5)
+#define MMC_CMD_BC (2 << 5)
+#define MMC_CMD_BCR (3 << 5)
+
+#define MMC_RSP_NONE (0)
+#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
+#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
+#define MMC_RSP_R3 (MMC_RSP_PRESENT)
+#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC)
+
+#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
+
+#define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK)
+
+ unsigned int retries;
+ unsigned int error;
+
+#define MMC_ERR_NONE 0
+#define MMC_ERR_TIMEOUT 1
+#define MMC_ERR_BADCRC 2
+#define MMC_ERR_FIFO 3
+#define MMC_ERR_FAILED 4
+#define MMC_ERR_INVALID 5
+
+ struct mmc_data *data;
+ struct mmc_request *mrq;
+};
+
+struct mmc_data {
+ unsigned int timeout_ns;
+ unsigned int timeout_clks;
+ unsigned int blksz_bits;
+ unsigned int blksz;
+ unsigned int blocks;
+ unsigned int error;
+ unsigned int flags;
+
+#define MMC_DATA_WRITE (1 << 8)
+#define MMC_DATA_READ (1 << 9)
+#define MMC_DATA_STREAM (1 << 10)
+#define MMC_DATA_MULTI (1 << 11)
+
+ unsigned int bytes_xfered;
+
+ struct mmc_command *stop;
+ struct mmc_request *mrq;
+
+ unsigned int sg_len;
+ struct scatterlist *sg;
+};
+
+struct mmc_request {
+ struct mmc_command *cmd;
+ struct mmc_data *data;
+ struct mmc_command *stop;
+
+ void *done_data;
+ void (*done)(struct mmc_request *);
+};
+
+struct mmc_host;
+struct mmc_card;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mmzone.h b/6/platforms/android-3/arch-x86/usr/include/linux/mmzone.h
new file mode 100644
index 0000000..a81382e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mmzone.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MMZONE_H
+#define _LINUX_MMZONE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mod_devicetable.h b/6/platforms/android-3/arch-x86/usr/include/linux/mod_devicetable.h
new file mode 100644
index 0000000..a3c1de8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mod_devicetable.h
@@ -0,0 +1,209 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_MOD_DEVICETABLE_H
+#define LINUX_MOD_DEVICETABLE_H
+
+#define PCI_ANY_ID (~0)
+
+struct pci_device_id {
+ __u32 vendor, device;
+ __u32 subvendor, subdevice;
+ __u32 class, class_mask;
+ kernel_ulong_t driver_data;
+};
+
+#define IEEE1394_MATCH_VENDOR_ID 0x0001
+#define IEEE1394_MATCH_MODEL_ID 0x0002
+#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
+#define IEEE1394_MATCH_VERSION 0x0008
+
+struct ieee1394_device_id {
+ __u32 match_flags;
+ __u32 vendor_id;
+ __u32 model_id;
+ __u32 specifier_id;
+ __u32 version;
+ kernel_ulong_t driver_data
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+};
+
+struct usb_device_id {
+
+ __u16 match_flags;
+
+ __u16 idVendor;
+ __u16 idProduct;
+ __u16 bcdDevice_lo;
+ __u16 bcdDevice_hi;
+
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+
+ __u8 bInterfaceClass;
+ __u8 bInterfaceSubClass;
+ __u8 bInterfaceProtocol;
+
+ kernel_ulong_t driver_info;
+};
+
+#define USB_DEVICE_ID_MATCH_VENDOR 0x0001
+#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002
+#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004
+#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008
+#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010
+#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020
+#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040
+#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080
+#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100
+#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
+
+struct ccw_device_id {
+ __u16 match_flags;
+
+ __u16 cu_type;
+ __u16 dev_type;
+ __u8 cu_model;
+ __u8 dev_model;
+
+ kernel_ulong_t driver_info;
+};
+
+#define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
+#define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
+#define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
+#define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
+
+#define PNP_ID_LEN 8
+#define PNP_MAX_DEVICES 8
+
+struct pnp_device_id {
+ __u8 id[PNP_ID_LEN];
+ kernel_ulong_t driver_data;
+};
+
+struct pnp_card_device_id {
+ __u8 id[PNP_ID_LEN];
+ kernel_ulong_t driver_data;
+ struct {
+ __u8 id[PNP_ID_LEN];
+ } devs[PNP_MAX_DEVICES];
+};
+
+#define SERIO_ANY 0xff
+
+struct serio_device_id {
+ __u8 type;
+ __u8 extra;
+ __u8 id;
+ __u8 proto;
+};
+
+struct of_device_id
+{
+ char name[32];
+ char type[32];
+ char compatible[128];
+ kernel_ulong_t data;
+};
+
+struct vio_device_id {
+ char type[32];
+ char compat[32];
+};
+
+struct pcmcia_device_id {
+ __u16 match_flags;
+
+ __u16 manf_id;
+ __u16 card_id;
+
+ __u8 func_id;
+
+ __u8 function;
+
+ __u8 device_no;
+
+ __u32 prod_id_hash[4]
+ __attribute__((aligned(sizeof(__u32))));
+
+ kernel_ulong_t prod_id[4]
+ __attribute__((aligned(sizeof(kernel_ulong_t))));
+
+ kernel_ulong_t driver_info;
+ kernel_ulong_t cisfile;
+};
+
+#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
+#define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002
+#define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004
+#define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008
+#define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010
+#define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020
+#define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
+#define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
+#define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
+#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
+#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
+
+struct i2c_device_id {
+ __u16 id;
+};
+
+#define INPUT_DEVICE_ID_EV_MAX 0x1f
+#define INPUT_DEVICE_ID_KEY_MAX 0x1ff
+#define INPUT_DEVICE_ID_REL_MAX 0x0f
+#define INPUT_DEVICE_ID_ABS_MAX 0x3f
+#define INPUT_DEVICE_ID_MSC_MAX 0x07
+#define INPUT_DEVICE_ID_LED_MAX 0x0f
+#define INPUT_DEVICE_ID_SND_MAX 0x07
+#define INPUT_DEVICE_ID_FF_MAX 0x7f
+#define INPUT_DEVICE_ID_SW_MAX 0x0f
+
+#define INPUT_DEVICE_ID_MATCH_BUS 1
+#define INPUT_DEVICE_ID_MATCH_VENDOR 2
+#define INPUT_DEVICE_ID_MATCH_PRODUCT 4
+#define INPUT_DEVICE_ID_MATCH_VERSION 8
+
+#define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010
+#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020
+#define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040
+#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080
+#define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100
+#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200
+#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
+#define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
+#define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
+
+struct input_device_id {
+
+ kernel_ulong_t flags;
+
+ __u16 bustype;
+ __u16 vendor;
+ __u16 product;
+ __u16 version;
+
+ kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
+ kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
+
+ kernel_ulong_t driver_info;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/module.h b/6/platforms/android-3/arch-x86/usr/include/linux/module.h
new file mode 100644
index 0000000..3c449c6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/module.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MODULE_H
+#define _LINUX_MODULE_H
+
+#include <linux/sched.h>
+#include <linux/spinlock.h>
+#include <linux/list.h>
+#include <linux/stat.h>
+#include <linux/compiler.h>
+#include <linux/cache.h>
+#include <linux/kmod.h>
+#include <linux/elf.h>
+#include <linux/stringify.h>
+#include <linux/kobject.h>
+#include <linux/moduleparam.h>
+#include <asm/local.h>
+
+#include <asm/module.h>
+
+#define MODULE_SUPPORTED_DEVICE(name)
+
+#ifndef MODULE_SYMBOL_PREFIX
+#define MODULE_SYMBOL_PREFIX ""
+#endif
+
+#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
+
+struct kernel_symbol
+{
+ unsigned long value;
+ const char *name;
+};
+
+struct modversion_info
+{
+ unsigned long crc;
+ char name[MODULE_NAME_LEN];
+};
+
+struct module;
+
+struct module_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct module_attribute *, struct module *, char *);
+ ssize_t (*store)(struct module_attribute *, struct module *,
+ const char *, size_t count);
+ void (*setup)(struct module *, const char *);
+ int (*test)(struct module *);
+ void (*free)(struct module *);
+};
+
+struct module_kobject
+{
+ struct kobject kobj;
+ struct module *mod;
+};
+
+struct exception_table_entry;
+
+#ifdef MODULE
+#define MODULE_GENERIC_TABLE(gtype,name) extern const struct gtype##_id __mod_##gtype##_table __attribute__ ((unused, alias(__stringify(name))))
+
+#define THIS_MODULE (&__this_module)
+#else
+#define MODULE_GENERIC_TABLE(gtype,name)
+#define THIS_MODULE ((struct module *)0)
+#endif
+
+#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+
+#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
+
+#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
+
+#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
+
+#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
+
+#define MODULE_PARM_DESC(_parm, desc) __MODULE_INFO(parm, _parm, #_parm ":" desc)
+
+#define MODULE_DEVICE_TABLE(type,name) MODULE_GENERIC_TABLE(type##_device,name)
+
+#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
+
+struct notifier_block;
+
+#define EXPORT_SYMBOL(sym)
+#define EXPORT_SYMBOL_GPL(sym)
+#define EXPORT_SYMBOL_GPL_FUTURE(sym)
+#define EXPORT_UNUSED_SYMBOL(sym)
+#define EXPORT_UNUSED_SYMBOL_GPL(sym)
+
+#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
+#define symbol_put(x) do { } while(0)
+#define symbol_put_addr(x) do { } while(0)
+#define module_name(mod) "kernel"
+#define __unsafe(mod)
+#define module_put_and_exit(code) do_exit(code)
+
+struct module;
+
+#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
+#define __MODULE_STRING(x) __stringify(x)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/moduleparam.h b/6/platforms/android-3/arch-x86/usr/include/linux/moduleparam.h
new file mode 100644
index 0000000..b46ddd6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/moduleparam.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MODULE_PARAMS_H
+#define _LINUX_MODULE_PARAMS_H
+
+#include <linux/init.h>
+#include <linux/stringify.h>
+#include <linux/kernel.h>
+
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX
+#else
+#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
+#endif
+
+#ifdef MODULE
+#define ___module_cat(a,b) __mod_ ## a ## b
+#define __module_cat(a,b) ___module_cat(a,b)
+#define __MODULE_INFO(tag, name, info) static const char __module_cat(name,__LINE__)[] __attribute_used__ __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
+#else
+#define __MODULE_INFO(tag, name, info)
+#endif
+#define __MODULE_PARM_TYPE(name, _type) __MODULE_INFO(parmtype, name##type, #name ":" _type)
+
+struct kernel_param;
+
+typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
+
+typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
+
+struct kernel_param {
+ const char *name;
+ unsigned int perm;
+ param_set_fn set;
+ param_get_fn get;
+ void *arg;
+};
+
+struct kparam_string {
+ unsigned int maxlen;
+ char *string;
+};
+
+struct kparam_array
+{
+ unsigned int max;
+ unsigned int *num;
+ param_set_fn set;
+ param_get_fn get;
+ unsigned int elemsize;
+ void *elem;
+};
+
+#define __module_param_call(prefix, name, set, get, arg, perm) static char __param_str_##name[] = prefix #name; static struct kernel_param const __param_##name __attribute_used__ __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) = { __param_str_##name, perm, set, get, arg }
+
+#define module_param_call(name, set, get, arg, perm) __module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm)
+
+#define module_param_named(name, value, type, perm) param_check_##type(name, &(value)); module_param_call(name, param_set_##type, param_get_##type, &value, perm); __MODULE_PARM_TYPE(name, #type)
+
+#define module_param(name, type, perm) module_param_named(name, name, type, perm)
+
+#define module_param_string(name, string, len, perm) static struct kparam_string __param_string_##name = { len, string }; module_param_call(name, param_set_copystring, param_get_string, &__param_string_##name, perm); __MODULE_PARM_TYPE(name, "string")
+
+#define __param_check(name, p, type) static inline type *__check_##name(void) { return(p); }
+
+#define param_check_byte(name, p) __param_check(name, p, unsigned char)
+
+#define param_check_short(name, p) __param_check(name, p, short)
+
+#define param_check_ushort(name, p) __param_check(name, p, unsigned short)
+
+#define param_check_int(name, p) __param_check(name, p, int)
+
+#define param_check_uint(name, p) __param_check(name, p, unsigned int)
+
+#define param_check_long(name, p) __param_check(name, p, long)
+
+#define param_check_ulong(name, p) __param_check(name, p, unsigned long)
+
+#define param_check_charp(name, p) __param_check(name, p, char *)
+
+#define param_check_bool(name, p) __param_check(name, p, int)
+
+#define param_check_invbool(name, p) __param_check(name, p, int)
+
+#define module_param_array_named(name, array, type, nump, perm) static struct kparam_array __param_arr_##name = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type, sizeof(array[0]), array }; module_param_call(name, param_array_set, param_array_get, &__param_arr_##name, perm); __MODULE_PARM_TYPE(name, "array of " #type)
+
+#define module_param_array(name, type, nump, perm) module_param_array_named(name, name, type, nump, perm)
+
+struct module;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mount.h b/6/platforms/android-3/arch-x86/usr/include/linux/mount.h
new file mode 100644
index 0000000..ee476e0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mount.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MOUNT_H
+#define _LINUX_MOUNT_H
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/msdos_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/msdos_fs.h
new file mode 100644
index 0000000..5a4eb0a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/msdos_fs.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MSDOS_FS_H
+#define _LINUX_MSDOS_FS_H
+
+#include <linux/magic.h>
+
+#include <asm/byteorder.h>
+
+#define SECTOR_SIZE 512
+#define SECTOR_BITS 9
+#define MSDOS_DPB (MSDOS_DPS)
+#define MSDOS_DPB_BITS 4
+#define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
+#define MSDOS_DPS_BITS 4
+#define CF_LE_W(v) le16_to_cpu(v)
+#define CF_LE_L(v) le32_to_cpu(v)
+#define CT_LE_W(v) cpu_to_le16(v)
+#define CT_LE_L(v) cpu_to_le32(v)
+
+#define MSDOS_ROOT_INO 1
+#define MSDOS_DIR_BITS 5
+
+#define FAT_MAX_DIR_ENTRIES (65536)
+#define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
+
+#define ATTR_NONE 0
+#define ATTR_RO 1
+#define ATTR_HIDDEN 2
+#define ATTR_SYS 4
+#define ATTR_VOLUME 8
+#define ATTR_DIR 16
+#define ATTR_ARCH 32
+
+#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
+
+#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
+
+#define CASE_LOWER_BASE 8
+#define CASE_LOWER_EXT 16
+
+#define DELETED_FLAG 0xe5
+#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
+
+#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
+
+#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
+
+#define MSDOS_NAME 11
+#define MSDOS_LONGNAME 256
+#define MSDOS_SLOTS 21
+#define MSDOS_DOT ". "
+#define MSDOS_DOTDOT ".. "
+
+#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
+#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
+
+#define FAT_START_ENT 2
+
+#define MAX_FAT12 0xFF4
+#define MAX_FAT16 0xFFF4
+#define MAX_FAT32 0x0FFFFFF6
+#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
+
+#define BAD_FAT12 0xFF7
+#define BAD_FAT16 0xFFF7
+#define BAD_FAT32 0x0FFFFFF7
+
+#define EOF_FAT12 0xFFF
+#define EOF_FAT16 0xFFFF
+#define EOF_FAT32 0x0FFFFFFF
+
+#define FAT_ENT_FREE (0)
+#define FAT_ENT_BAD (BAD_FAT32)
+#define FAT_ENT_EOF (EOF_FAT32)
+
+#define FAT_FSINFO_SIG1 0x41615252
+#define FAT_FSINFO_SIG2 0x61417272
+#define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2)
+
+#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
+#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2])
+
+#define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
+#define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
+#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x12, __u32)
+
+#define VFAT_SFN_DISPLAY_LOWER 0x0001
+#define VFAT_SFN_DISPLAY_WIN95 0x0002
+#define VFAT_SFN_DISPLAY_WINNT 0x0004
+#define VFAT_SFN_CREATE_WIN95 0x0100
+#define VFAT_SFN_CREATE_WINNT 0x0200
+
+struct fat_boot_sector {
+ __u8 ignored[3];
+ __u8 system_id[8];
+ __u8 sector_size[2];
+ __u8 sec_per_clus;
+ __le16 reserved;
+ __u8 fats;
+ __u8 dir_entries[2];
+ __u8 sectors[2];
+ __u8 media;
+ __le16 fat_length;
+ __le16 secs_track;
+ __le16 heads;
+ __le32 hidden;
+ __le32 total_sect;
+
+ __le32 fat32_length;
+ __le16 flags;
+ __u8 version[2];
+ __le32 root_cluster;
+ __le16 info_sector;
+ __le16 backup_boot;
+ __le16 reserved2[6];
+};
+
+struct fat_boot_fsinfo {
+ __le32 signature1;
+ __le32 reserved1[120];
+ __le32 signature2;
+ __le32 free_clusters;
+ __le32 next_cluster;
+ __le32 reserved2[4];
+};
+
+struct fat_boot_bsx {
+ __u8 drive;
+ __u8 reserved1;
+ __u8 signature;
+ __u8 vol_id[4];
+ __u8 vol_label[11];
+ __u8 type[8];
+};
+#define FAT16_BSX_OFFSET 36
+#define FAT32_BSX_OFFSET 64
+
+struct msdos_dir_entry {
+ __u8 name[MSDOS_NAME];
+ __u8 attr;
+ __u8 lcase;
+ __u8 ctime_cs;
+ __le16 ctime;
+ __le16 cdate;
+ __le16 adate;
+ __le16 starthi;
+ __le16 time,date,start;
+ __le32 size;
+};
+
+struct msdos_dir_slot {
+ __u8 id;
+ __u8 name0_4[10];
+ __u8 attr;
+ __u8 reserved;
+ __u8 alias_checksum;
+ __u8 name5_10[12];
+ __le16 start;
+ __u8 name11_12[4];
+};
+
+struct fat_slot_info {
+ loff_t i_pos;
+ loff_t slot_off;
+ int nr_slots;
+ struct msdos_dir_entry *de;
+ struct buffer_head *bh;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/msg.h b/6/platforms/android-3/arch-x86/usr/include/linux/msg.h
new file mode 100644
index 0000000..254f1e9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/msg.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MSG_H
+#define _LINUX_MSG_H
+
+#include <linux/ipc.h>
+
+#define MSG_STAT 11
+#define MSG_INFO 12
+
+#define MSG_NOERROR 010000
+#define MSG_EXCEPT 020000
+
+struct msqid_ds {
+ struct ipc_perm msg_perm;
+ struct msg *msg_first;
+ struct msg *msg_last;
+ __kernel_time_t msg_stime;
+ __kernel_time_t msg_rtime;
+ __kernel_time_t msg_ctime;
+ unsigned long msg_lcbytes;
+ unsigned long msg_lqbytes;
+ unsigned short msg_cbytes;
+ unsigned short msg_qnum;
+ unsigned short msg_qbytes;
+ __kernel_ipc_pid_t msg_lspid;
+ __kernel_ipc_pid_t msg_lrpid;
+};
+
+#include <asm/msgbuf.h>
+
+struct msgbuf {
+ long mtype;
+ char mtext[1];
+};
+
+struct msginfo {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short msgseg;
+};
+
+#define MSGMNI 16
+#define MSGMAX 8192
+#define MSGMNB 16384
+
+#define MSGPOOL (MSGMNI*MSGMNB/1024)
+#define MSGTQL MSGMNB
+#define MSGMAP MSGMNB
+#define MSGSSZ 16
+#define __MSGSEG ((MSGPOOL*1024)/ MSGSSZ)
+#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/msm_adsp.h b/6/platforms/android-3/arch-x86/usr/include/linux/msm_adsp.h
new file mode 100644
index 0000000..6f12707
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/msm_adsp.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MSM_ADSP_H
+#define __LINUX_MSM_ADSP_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define ADSP_IOCTL_MAGIC 'q'
+
+struct adsp_command_t {
+ uint16_t queue;
+ uint32_t len;
+ uint8_t *data;
+};
+
+struct adsp_event_t {
+ uint16_t type;
+ uint32_t timeout_ms;
+ uint16_t msg_id;
+ uint16_t flags;
+ uint32_t len;
+ uint8_t *data;
+};
+
+struct adsp_pmem_info_t {
+ int fd;
+ void *vaddr;
+};
+
+#define ADSP_IOCTL_ENABLE _IOR(ADSP_IOCTL_MAGIC, 1, unsigned)
+
+#define ADSP_IOCTL_DISABLE _IOR(ADSP_IOCTL_MAGIC, 2, unsigned)
+
+#define ADSP_IOCTL_DISABLE_ACK _IOR(ADSP_IOCTL_MAGIC, 3, unsigned)
+
+#define ADSP_IOCTL_WRITE_COMMAND _IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *)
+
+#define ADSP_IOCTL_GET_EVENT _IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *)
+
+#define ADSP_IOCTL_DISABLE_EVENT_RSP _IOR(ADSP_IOCTL_MAGIC, 10, unsigned)
+
+#define ADSP_IOCTL_REGISTER_PMEM _IOW(ADSP_IOCTL_MAGIC, 13, struct adsp_pmem_info *)
+
+#define ADSP_IOCTL_ABORT_EVENT_READ _IOW(ADSP_IOCTL_MAGIC, 15, unsigned)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/msm_audio.h b/6/platforms/android-3/arch-x86/usr/include/linux/msm_audio.h
new file mode 100644
index 0000000..9ac58aa
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/msm_audio.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MSM_AUDIO_H
+#define __LINUX_MSM_AUDIO_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define AUDIO_IOCTL_MAGIC 'a'
+
+#define AUDIO_START _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned)
+#define AUDIO_STOP _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned)
+#define AUDIO_FLUSH _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned)
+#define AUDIO_GET_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned)
+#define AUDIO_SET_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned)
+#define AUDIO_GET_STATS _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned)
+#define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned)
+#define AUDIO_SET_ADRC _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned)
+#define AUDIO_SET_EQ _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned)
+#define AUDIO_SET_RX_IIR _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned)
+#define AUDIO_SET_VOLUME _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned)
+#define AUDIO_ENABLE_AUDPRE _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned)
+#define AUDIO_SET_AGC _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned)
+#define AUDIO_SET_NS _IOW(AUDIO_IOCTL_MAGIC, 13, unsigned)
+#define AUDIO_SET_TX_IIR _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned)
+
+struct msm_audio_config {
+ uint32_t buffer_size;
+ uint32_t buffer_count;
+ uint32_t channel_count;
+ uint32_t sample_rate;
+ uint32_t type;
+ uint32_t unused[3];
+};
+
+struct msm_audio_stats {
+ uint32_t byte_count;
+ uint32_t sample_count;
+ uint32_t unused[2];
+};
+
+#define SND_IOCTL_MAGIC 's'
+
+#define SND_MUTE_UNMUTED 0
+#define SND_MUTE_MUTED 1
+
+struct msm_snd_device_config {
+ uint32_t device;
+ uint32_t ear_mute;
+ uint32_t mic_mute;
+};
+
+#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *)
+
+#define SND_METHOD_VOICE 0
+
+struct msm_snd_volume_config {
+ uint32_t device;
+ uint32_t method;
+ uint32_t volume;
+};
+
+#define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *)
+
+#define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *)
+
+struct msm_snd_endpoint {
+ int id;
+ char name[64];
+};
+
+#define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/msm_mdp.h b/6/platforms/android-3/arch-x86/usr/include/linux/msm_mdp.h
new file mode 100644
index 0000000..43fdac3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/msm_mdp.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MSM_MDP_H_
+#define _MSM_MDP_H_
+
+#include <linux/types.h>
+
+#define MSMFB_IOCTL_MAGIC 'm'
+#define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int)
+#define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int)
+
+enum {
+ MDP_RGB_565,
+ MDP_XRGB_8888,
+ MDP_Y_CBCR_H2V2,
+ MDP_ARGB_8888,
+ MDP_RGB_888,
+ MDP_Y_CRCB_H2V2,
+ MDP_YCRYCB_H2V1,
+ MDP_Y_CRCB_H2V1,
+ MDP_Y_CBCR_H2V1,
+ MDP_RGBA_8888,
+ MDP_BGRA_8888,
+ MDP_IMGTYPE_LIMIT
+};
+
+enum {
+ PMEM_IMG,
+ FB_IMG,
+};
+
+#define MDP_ROT_NOP 0
+#define MDP_FLIP_LR 0x1
+#define MDP_FLIP_UD 0x2
+#define MDP_ROT_90 0x4
+#define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR)
+#define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR)
+#define MDP_DITHER 0x8
+#define MDP_BLUR 0x10
+
+#define MDP_TRANSP_NOP 0xffffffff
+#define MDP_ALPHA_NOP 0xff
+
+struct mdp_rect {
+ uint32_t x;
+ uint32_t y;
+ uint32_t w;
+ uint32_t h;
+};
+
+struct mdp_img {
+ uint32_t width;
+ uint32_t height;
+ uint32_t format;
+ uint32_t offset;
+ int memory_id;
+};
+
+struct mdp_blit_req {
+ struct mdp_img src;
+ struct mdp_img dst;
+ struct mdp_rect src_rect;
+ struct mdp_rect dst_rect;
+ uint32_t alpha;
+ uint32_t transp_mask;
+ uint32_t flags;
+};
+
+struct mdp_blit_req_list {
+ uint32_t count;
+ struct mdp_blit_req req[];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mt9t013.h b/6/platforms/android-3/arch-x86/usr/include/linux/mt9t013.h
new file mode 100644
index 0000000..821ef21
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mt9t013.h
@@ -0,0 +1,111 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef CAMERA_MT9T013_H
+#define CAMERA_MT9T013_H
+#include <linux/cdev.h>
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <asm/sizes.h>
+
+#define MT9T013_I2C_IOCTL_MAGIC 'm'
+
+#define MT9T013_I2C_IOCTL_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 0, unsigned)
+
+#define MT9T013_I2C_IOCTL_R _IOR(MT9T013_I2C_IOCTL_MAGIC, 1, unsigned)
+
+#define MT9T013_I2C_IOCTL_AF_W _IOW(MT9T013_I2C_IOCTL_MAGIC, 2, unsigned)
+
+#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 3)
+
+#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET_2 _IO(MT9T013_I2C_IOCTL_MAGIC, 4)
+
+#define CAMERA_CONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 7)
+
+#define CAMERA_UNCONFIGURE_GPIOS _IO(MT9T013_I2C_IOCTL_MAGIC, 8)
+
+#define CAMERA_LENS_POWER_ON _IO(MT9T013_I2C_IOCTL_MAGIC, 9)
+
+#define CAMERA_LENS_POWER_OFF _IO(MT9T013_I2C_IOCTL_MAGIC, 10)
+
+#define MT9T013_I2C_IOCTL_CAMIF_APPS_RESET _IO(MT9T013_I2C_IOCTL_MAGIC, 11)
+
+#define CAMIO_VFE_MDC_CLK 1
+#define CAMIO_MDC_CLK 2
+#define CAMIO_VFE_CLK 3
+
+#define MT9T013_I2C_IOCTL_CLK_ENABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 12, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_DISABLE _IOW(MT9T013_I2C_IOCTL_MAGIC, 13, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_SELECT _IOW(MT9T013_I2C_IOCTL_MAGIC, 14, unsigned)
+
+#define MT9T013_I2C_IOCTL_CLK_FREQ_PROG _IOW(MT9T013_I2C_IOCTL_MAGIC, 15, unsigned)
+
+#define CAMSENSOR_REG_INIT 0<<0
+#define CAMSENSOR_REG_UPDATE_PERIODIC 1<<0
+#define CAMSENSOR_TYPE_PREVIEW 0<<1
+#define CAMSENSOR_TYPE_SNAPSHOT 1<<1
+
+#define MT9T013_I2C_IOCTL_SENSOR_SETTING _IOW(MT9T013_I2C_IOCTL_MAGIC, 16, uint32_t)
+
+struct mt9t013_reg_struct
+{
+ uint16_t vt_pix_clk_div;
+ uint16_t vt_sys_clk_div;
+ uint16_t pre_pll_clk_div;
+ uint16_t pll_multiplier;
+ uint16_t op_pix_clk_div;
+ uint16_t op_sys_clk_div;
+ uint16_t scale_m;
+ uint16_t row_speed;
+ uint16_t x_addr_start;
+ uint16_t x_addr_end;
+ uint16_t y_addr_start;
+ uint16_t y_addr_end;
+ uint16_t read_mode;
+ uint16_t x_output_size ;
+ uint16_t y_output_size;
+ uint16_t line_length_pck;
+ uint16_t frame_length_lines;
+ uint16_t coarse_integration_time;
+ uint16_t fine_integration_time;
+};
+
+struct mt9t013_reg_pat {
+ struct mt9t013_reg_struct reg[2];
+};
+
+#define MT9T013_I2C_IOCTL_GET_REGISTERS _IOR(MT9T013_I2C_IOCTL_MAGIC, 17, struct mt9t013_reg_pat *)
+
+struct mt9t013_exposure_gain {
+ uint16_t gain;
+ uint16_t line;
+ uint32_t mode;
+};
+
+#define MT9T013_I2C_IOCTL_EXPOSURE_GAIN _IOW(MT9T013_I2C_IOCTL_MAGIC, 18, struct exposure_gain *)
+
+#define MT9T013_I2C_IOCTL_MOVE_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 19, uint32_t)
+
+#define MT9T013_I2C_IOCTL_SET_DEFAULT_FOCUS _IOW(MT9T013_I2C_IOCTL_MAGIC, 20, uint32_t)
+
+#define MT9T013_I2C_IOCTL_POWER_DOWN _IO(MT9T013_I2C_IOCTL_MAGIC, 21)
+
+struct mt9t013_init {
+ int preview;
+ uint16_t chipid;
+};
+
+#define MT9T013_I2C_IOCTL_INIT _IOWR(MT9T013_I2C_IOCTL_MAGIC, 22, struct mt9t013_init *)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/bbm.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/bbm.h
new file mode 100644
index 0000000..e311b23
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/bbm.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_BBM_H
+#define __LINUX_MTD_BBM_H
+
+#define NAND_MAX_CHIPS 8
+
+struct nand_bbt_descr {
+ int options;
+ int pages[NAND_MAX_CHIPS];
+ int offs;
+ int veroffs;
+ uint8_t version[NAND_MAX_CHIPS];
+ int len;
+ int maxblocks;
+ int reserved_block_code;
+ uint8_t *pattern;
+};
+
+#define NAND_BBT_NRBITS_MSK 0x0000000F
+#define NAND_BBT_1BIT 0x00000001
+#define NAND_BBT_2BIT 0x00000002
+#define NAND_BBT_4BIT 0x00000004
+#define NAND_BBT_8BIT 0x00000008
+
+#define NAND_BBT_LASTBLOCK 0x00000010
+
+#define NAND_BBT_ABSPAGE 0x00000020
+
+#define NAND_BBT_SEARCH 0x00000040
+
+#define NAND_BBT_PERCHIP 0x00000080
+
+#define NAND_BBT_VERSION 0x00000100
+
+#define NAND_BBT_CREATE 0x00000200
+
+#define NAND_BBT_SCANALLPAGES 0x00000400
+
+#define NAND_BBT_SCANEMPTY 0x00000800
+
+#define NAND_BBT_WRITE 0x00001000
+
+#define NAND_BBT_SAVECONTENT 0x00002000
+
+#define NAND_BBT_SCAN2NDPAGE 0x00004000
+
+#define NAND_BBT_SCAN_MAXBLOCKS 4
+
+#define ONENAND_BADBLOCK_POS 0
+
+struct bbm_info {
+ int bbt_erase_shift;
+ int badblockpos;
+ int options;
+
+ uint8_t *bbt;
+
+ int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
+
+ struct nand_bbt_descr *badblock_pattern;
+
+ void *priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/blktrans.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/blktrans.h
new file mode 100644
index 0000000..7c40724
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_TRANS_H__
+#define __MTD_TRANS_H__
+
+#include <linux/mutex.h>
+
+struct hd_geometry;
+struct mtd_info;
+struct mtd_blktrans_ops;
+struct file;
+struct inode;
+
+struct mtd_blktrans_dev {
+ struct mtd_blktrans_ops *tr;
+ struct list_head list;
+ struct mtd_info *mtd;
+ struct mutex lock;
+ int devnum;
+ int blksize;
+ unsigned long size;
+ int readonly;
+ void *blkcore_priv;
+};
+
+struct blkcore_priv;
+
+struct mtd_blktrans_ops {
+ char *name;
+ int major;
+ int part_bits;
+
+ int (*readsect)(struct mtd_blktrans_dev *dev,
+ unsigned long block, char *buffer);
+ int (*writesect)(struct mtd_blktrans_dev *dev,
+ unsigned long block, char *buffer);
+
+ int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
+ int (*flush)(struct mtd_blktrans_dev *dev);
+
+ int (*open)(struct mtd_blktrans_dev *dev);
+ int (*release)(struct mtd_blktrans_dev *dev);
+
+ void (*add_mtd)(struct mtd_blktrans_ops *tr, struct mtd_info *mtd);
+ void (*remove_dev)(struct mtd_blktrans_dev *dev);
+
+ struct list_head devs;
+ struct list_head list;
+ struct module *owner;
+
+ struct mtd_blkcore_priv *blkcore_priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi.h
new file mode 100644
index 0000000..d7f1ba1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi.h
@@ -0,0 +1,187 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_CFI_H__
+#define __MTD_CFI_H__
+
+#include <linux/delay.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/mtd/flashchip.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/cfi_endian.h>
+
+#define cfi_interleave_is_1(cfi) (0)
+
+#define cfi_interleave_is_2(cfi) (0)
+
+#define cfi_interleave_is_4(cfi) (0)
+
+#define cfi_interleave_is_8(cfi) (0)
+
+#define CFI_DEVICETYPE_X8 (8 / 8)
+#define CFI_DEVICETYPE_X16 (16 / 8)
+#define CFI_DEVICETYPE_X32 (32 / 8)
+#define CFI_DEVICETYPE_X64 (64 / 8)
+
+struct cfi_extquery {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+} __attribute__((packed));
+
+struct cfi_pri_intelext {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint32_t FeatureSupport;
+ uint8_t SuspendCmdSupport;
+ uint16_t BlkStatusRegMask;
+ uint8_t VccOptimal;
+ uint8_t VppOptimal;
+ uint8_t NumProtectionFields;
+ uint16_t ProtRegAddr;
+ uint8_t FactProtRegSize;
+ uint8_t UserProtRegSize;
+ uint8_t extra[0];
+} __attribute__((packed));
+
+struct cfi_intelext_otpinfo {
+ uint32_t ProtRegAddr;
+ uint16_t FactGroups;
+ uint8_t FactProtRegSize;
+ uint16_t UserGroups;
+ uint8_t UserProtRegSize;
+} __attribute__((packed));
+
+struct cfi_intelext_blockinfo {
+ uint16_t NumIdentBlocks;
+ uint16_t BlockSize;
+ uint16_t MinBlockEraseCycles;
+ uint8_t BitsPerCell;
+ uint8_t BlockCap;
+} __attribute__((packed));
+
+struct cfi_intelext_regioninfo {
+ uint16_t NumIdentPartitions;
+ uint8_t NumOpAllowed;
+ uint8_t NumOpAllowedSimProgMode;
+ uint8_t NumOpAllowedSimEraMode;
+ uint8_t NumBlockTypes;
+ struct cfi_intelext_blockinfo BlockTypes[1];
+} __attribute__((packed));
+
+struct cfi_intelext_programming_regioninfo {
+ uint8_t ProgRegShift;
+ uint8_t Reserved1;
+ uint8_t ControlValid;
+ uint8_t Reserved2;
+ uint8_t ControlInvalid;
+ uint8_t Reserved3;
+} __attribute__((packed));
+
+struct cfi_pri_amdstd {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint8_t SiliconRevision;
+ uint8_t EraseSuspend;
+ uint8_t BlkProt;
+ uint8_t TmpBlkUnprotect;
+ uint8_t BlkProtUnprot;
+ uint8_t SimultaneousOps;
+ uint8_t BurstMode;
+ uint8_t PageMode;
+ uint8_t VppMin;
+ uint8_t VppMax;
+ uint8_t TopBottom;
+} __attribute__((packed));
+
+struct cfi_pri_atmel {
+ uint8_t pri[3];
+ uint8_t MajorVersion;
+ uint8_t MinorVersion;
+ uint8_t Features;
+ uint8_t BottomBoot;
+ uint8_t BurstMode;
+ uint8_t PageMode;
+} __attribute__((packed));
+
+struct cfi_pri_query {
+ uint8_t NumFields;
+ uint32_t ProtField[1];
+} __attribute__((packed));
+
+struct cfi_bri_query {
+ uint8_t PageModeReadCap;
+ uint8_t NumFields;
+ uint32_t ConfField[1];
+} __attribute__((packed));
+
+#define P_ID_NONE 0x0000
+#define P_ID_INTEL_EXT 0x0001
+#define P_ID_AMD_STD 0x0002
+#define P_ID_INTEL_STD 0x0003
+#define P_ID_AMD_EXT 0x0004
+#define P_ID_WINBOND 0x0006
+#define P_ID_ST_ADV 0x0020
+#define P_ID_MITSUBISHI_STD 0x0100
+#define P_ID_MITSUBISHI_EXT 0x0101
+#define P_ID_SST_PAGE 0x0102
+#define P_ID_INTEL_PERFORMANCE 0x0200
+#define P_ID_INTEL_DATA 0x0210
+#define P_ID_RESERVED 0xffff
+
+#define CFI_MODE_CFI 1
+#define CFI_MODE_JEDEC 0
+
+struct cfi_private {
+ uint16_t cmdset;
+ void *cmdset_priv;
+ int interleave;
+ int device_type;
+ int cfi_mode;
+ int addr_unlock1;
+ int addr_unlock2;
+ struct mtd_info *(*cmdset_setup)(struct map_info *);
+ struct cfi_ident *cfiq;
+ int mfr, id;
+ int numchips;
+ unsigned long chipshift;
+ const char *im_name;
+ struct flchip chips[0];
+};
+
+#if BITS_PER_LONG >= 64
+#endif
+#define CMD(x) cfi_build_cmd((x), map, cfi)
+#if BITS_PER_LONG >= 64
+#endif
+#define MERGESTATUS(x) cfi_merge_status((x), map, cfi)
+
+struct cfi_fixup {
+ uint16_t mfr;
+ uint16_t id;
+ void (*fixup)(struct mtd_info *mtd, void* param);
+ void* param;
+};
+
+#define CFI_MFR_ANY 0xffff
+#define CFI_ID_ANY 0xffff
+
+#define CFI_MFR_AMD 0x0001
+#define CFI_MFR_ATMEL 0x001F
+#define CFI_MFR_ST 0x0020
+
+typedef int (*varsize_frob_t)(struct map_info *map, struct flchip *chip,
+ unsigned long adr, int len, void *thunk);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi_endian.h
new file mode 100644
index 0000000..452091e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/byteorder.h>
+
+#define CFI_HOST_ENDIAN
+
+#ifdef CFI_LITTLE_ENDIAN
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) cpu_to_le16(x)
+#define cpu_to_cfi32(x) cpu_to_le32(x)
+#define cpu_to_cfi64(x) cpu_to_le64(x)
+#define cfi16_to_cpu(x) le16_to_cpu(x)
+#define cfi32_to_cpu(x) le32_to_cpu(x)
+#define cfi64_to_cpu(x) le64_to_cpu(x)
+#elif defined (CFI_BIG_ENDIAN)
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) cpu_to_be16(x)
+#define cpu_to_cfi32(x) cpu_to_be32(x)
+#define cpu_to_cfi64(x) cpu_to_be64(x)
+#define cfi16_to_cpu(x) be16_to_cpu(x)
+#define cfi32_to_cpu(x) be32_to_cpu(x)
+#define cfi64_to_cpu(x) be64_to_cpu(x)
+#elif defined (CFI_HOST_ENDIAN)
+#define cpu_to_cfi8(x) (x)
+#define cfi8_to_cpu(x) (x)
+#define cpu_to_cfi16(x) (x)
+#define cpu_to_cfi32(x) (x)
+#define cpu_to_cfi64(x) (x)
+#define cfi16_to_cpu(x) (x)
+#define cfi32_to_cpu(x) (x)
+#define cfi64_to_cpu(x) (x)
+#else
+#error No CFI endianness defined
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/compatmac.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/compatmac.h
new file mode 100644
index 0000000..143f46a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_COMPATMAC_H__
+#define __LINUX_MTD_COMPATMAC_H__
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/flashchip.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/flashchip.h
new file mode 100644
index 0000000..e441048
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_FLASHCHIP_H__
+#define __MTD_FLASHCHIP_H__
+
+#include <linux/sched.h>
+
+typedef enum {
+ FL_READY,
+ FL_STATUS,
+ FL_CFI_QUERY,
+ FL_JEDEC_QUERY,
+ FL_ERASING,
+ FL_ERASE_SUSPENDING,
+ FL_ERASE_SUSPENDED,
+ FL_WRITING,
+ FL_WRITING_TO_BUFFER,
+ FL_OTP_WRITE,
+ FL_WRITE_SUSPENDING,
+ FL_WRITE_SUSPENDED,
+ FL_PM_SUSPENDED,
+ FL_SYNCING,
+ FL_UNLOADING,
+ FL_LOCKING,
+ FL_UNLOCKING,
+ FL_POINT,
+ FL_XIP_WHILE_ERASING,
+ FL_XIP_WHILE_WRITING,
+ FL_UNKNOWN
+} flstate_t;
+
+struct flchip {
+ unsigned long start;
+
+ int ref_point_counter;
+ flstate_t state;
+ flstate_t oldstate;
+
+ unsigned int write_suspended:1;
+ unsigned int erase_suspended:1;
+ unsigned long in_progress_block_addr;
+
+ spinlock_t *mutex;
+ spinlock_t _spinlock;
+ wait_queue_head_t wq;
+ int word_write_time;
+ int buffer_write_time;
+ int erase_time;
+
+ void *priv;
+};
+
+struct flchip_shared {
+ spinlock_t lock;
+ struct flchip *writing;
+ struct flchip *erasing;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/map.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/map.h
new file mode 100644
index 0000000..87124bc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/map.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_MAP_H__
+#define __LINUX_MTD_MAP_H__
+
+#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/string.h>
+
+#include <linux/mtd/compatmac.h>
+
+#include <asm/unaligned.h>
+#include <asm/system.h>
+#include <asm/io.h>
+
+#define map_bankwidth_is_1(map) (0)
+
+#define map_bankwidth_is_2(map) (0)
+
+#define map_bankwidth_is_4(map) (0)
+
+#define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long))
+
+#define map_bankwidth_is_8(map) (0)
+
+#define map_bankwidth_is_16(map) (0)
+
+#define map_bankwidth_is_32(map) (0)
+
+#ifndef map_bankwidth
+#error "No bus width supported. What's the point?"
+#endif
+
+#define MAX_MAP_LONGS ( ((MAX_MAP_BANKWIDTH*8) + BITS_PER_LONG - 1) / BITS_PER_LONG )
+
+struct map_info {
+ char *name;
+ unsigned long size;
+ unsigned long phys;
+#define NO_XIP (-1UL)
+
+ void __iomem *virt;
+ void *cached;
+
+ int bankwidth;
+
+ void (*inval_cache)(struct map_info *, unsigned long, ssize_t);
+
+ void (*set_vpp)(struct map_info *, int);
+
+ unsigned long map_priv_1;
+ unsigned long map_priv_2;
+ void *fldrv_priv;
+ struct mtd_chip_driver *fldrv;
+};
+
+struct mtd_chip_driver {
+ struct mtd_info *(*probe)(struct map_info *map);
+ void (*destroy)(struct mtd_info *);
+ struct module *module;
+ char *name;
+ struct list_head list;
+};
+
+struct mtd_info *do_map_probe(const char *name, struct map_info *map);
+
+#define ENABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 1); } while(0)
+#define DISABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 0); } while(0)
+
+#define INVALIDATE_CACHED_RANGE(map, from, size) do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
+
+#define map_word_andequal(m, a, b, z) map_word_equal(m, z, map_word_and(m, a, b))
+#if BITS_PER_LONG >= 64
+#endif
+#ifdef __LITTLE_ENDIAN
+#else
+#endif
+#if BITS_PER_LONG < 64
+#define MAP_FF_LIMIT 4
+#else
+#define MAP_FF_LIMIT 8
+#endif
+#if BITS_PER_LONG >= 64
+#endif
+#if BITS_PER_LONG >= 64
+#endif
+#define map_read(map, ofs) inline_map_read(map, ofs)
+#define map_copy_from(map, to, from, len) inline_map_copy_from(map, to, from, len)
+#define map_write(map, datum, ofs) inline_map_write(map, datum, ofs)
+#define map_copy_to(map, to, from, len) inline_map_copy_to(map, to, from, len)
+#define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
+#define map_is_linear(map) ({ (void)(map); 1; })
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/mtd.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/mtd.h
new file mode 100644
index 0000000..300813c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/mtd.h
@@ -0,0 +1,153 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_MTD_H__
+#define __MTD_MTD_H__
+
+#error This is a kernel header. Perhaps include mtd-user.h instead?
+
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/uio.h>
+#include <linux/notifier.h>
+
+#include <linux/mtd/compatmac.h>
+#include <mtd/mtd-abi.h>
+
+#define MTD_CHAR_MAJOR 90
+#define MTD_BLOCK_MAJOR 31
+#define MAX_MTD_DEVICES 16
+
+#define MTD_ERASE_PENDING 0x01
+#define MTD_ERASING 0x02
+#define MTD_ERASE_SUSPEND 0x04
+#define MTD_ERASE_DONE 0x08
+#define MTD_ERASE_FAILED 0x10
+
+struct erase_info {
+ struct mtd_info *mtd;
+ u_int32_t addr;
+ u_int32_t len;
+ u_int32_t fail_addr;
+ u_long time;
+ u_long retries;
+ u_int dev;
+ u_int cell;
+ void (*callback) (struct erase_info *self);
+ u_long priv;
+ u_char state;
+ struct erase_info *next;
+};
+
+struct mtd_erase_region_info {
+ u_int32_t offset;
+ u_int32_t erasesize;
+ u_int32_t numblocks;
+};
+
+typedef enum {
+ MTD_OOB_PLACE,
+ MTD_OOB_AUTO,
+ MTD_OOB_RAW,
+} mtd_oob_mode_t;
+
+struct mtd_oob_ops {
+ mtd_oob_mode_t mode;
+ size_t len;
+ size_t retlen;
+ size_t ooblen;
+ uint32_t ooboffs;
+ uint8_t *datbuf;
+ uint8_t *oobbuf;
+};
+
+struct mtd_info {
+ u_char type;
+ u_int32_t flags;
+ u_int32_t size;
+
+ u_int32_t erasesize;
+
+ u_int32_t writesize;
+
+ u_int32_t oobsize;
+ u_int32_t ecctype;
+ u_int32_t eccsize;
+
+#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
+#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype
+
+ char *name;
+ int index;
+
+ struct nand_ecclayout *ecclayout;
+
+ int numeraseregions;
+ struct mtd_erase_region_info *eraseregions;
+
+ u_int32_t bank_size;
+
+ int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
+
+ int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
+
+ void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
+
+ int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
+
+ int (*read_oob) (struct mtd_info *mtd, loff_t from,
+ struct mtd_oob_ops *ops);
+ int (*write_oob) (struct mtd_info *mtd, loff_t to,
+ struct mtd_oob_ops *ops);
+
+ int (*get_fact_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
+ int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*get_user_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
+ int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
+ int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
+
+ int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
+
+ void (*sync) (struct mtd_info *mtd);
+
+ int (*lock) (struct mtd_info *mtd, loff_t ofs, size_t len);
+ int (*unlock) (struct mtd_info *mtd, loff_t ofs, size_t len);
+
+ int (*suspend) (struct mtd_info *mtd);
+ void (*resume) (struct mtd_info *mtd);
+
+ int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
+ int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
+
+ struct notifier_block reboot_notifier;
+
+ struct mtd_ecc_stats ecc_stats;
+
+ void *priv;
+
+ struct module *owner;
+ int usecount;
+};
+
+struct mtd_notifier {
+ void (*add)(struct mtd_info *mtd);
+ void (*remove)(struct mtd_info *mtd);
+ struct list_head list;
+};
+
+#define MTD_DEBUG_LEVEL0 (0)
+#define MTD_DEBUG_LEVEL1 (1)
+#define MTD_DEBUG_LEVEL2 (2)
+#define MTD_DEBUG_LEVEL3 (3)
+#define DEBUG(n, args...) do { } while(0)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand.h
new file mode 100644
index 0000000..36e9fb4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand.h
@@ -0,0 +1,319 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MTD_NAND_H
+#define __LINUX_MTD_NAND_H
+
+#include <linux/wait.h>
+#include <linux/spinlock.h>
+#include <linux/mtd/mtd.h>
+
+struct mtd_info;
+
+#define NAND_MAX_CHIPS 8
+
+#define NAND_MAX_OOBSIZE 64
+#define NAND_MAX_PAGESIZE 2048
+
+#define NAND_NCE 0x01
+
+#define NAND_CLE 0x02
+
+#define NAND_ALE 0x04
+
+#define NAND_CTRL_CLE (NAND_NCE | NAND_CLE)
+#define NAND_CTRL_ALE (NAND_NCE | NAND_ALE)
+#define NAND_CTRL_CHANGE 0x80
+
+#define NAND_CMD_READ0 0
+#define NAND_CMD_READ1 1
+#define NAND_CMD_RNDOUT 5
+#define NAND_CMD_PAGEPROG 0x10
+#define NAND_CMD_READOOB 0x50
+#define NAND_CMD_ERASE1 0x60
+#define NAND_CMD_STATUS 0x70
+#define NAND_CMD_STATUS_MULTI 0x71
+#define NAND_CMD_SEQIN 0x80
+#define NAND_CMD_RNDIN 0x85
+#define NAND_CMD_READID 0x90
+#define NAND_CMD_ERASE2 0xd0
+#define NAND_CMD_RESET 0xff
+
+#define NAND_CMD_READSTART 0x30
+#define NAND_CMD_RNDOUTSTART 0xE0
+#define NAND_CMD_CACHEDPROG 0x15
+
+#define NAND_CMD_DEPLETE1 0x100
+#define NAND_CMD_DEPLETE2 0x38
+#define NAND_CMD_STATUS_MULTI 0x71
+#define NAND_CMD_STATUS_ERROR 0x72
+
+#define NAND_CMD_STATUS_ERROR0 0x73
+#define NAND_CMD_STATUS_ERROR1 0x74
+#define NAND_CMD_STATUS_ERROR2 0x75
+#define NAND_CMD_STATUS_ERROR3 0x76
+#define NAND_CMD_STATUS_RESET 0x7f
+#define NAND_CMD_STATUS_CLEAR 0xff
+
+#define NAND_CMD_NONE -1
+
+#define NAND_STATUS_FAIL 0x01
+#define NAND_STATUS_FAIL_N1 0x02
+#define NAND_STATUS_TRUE_READY 0x20
+#define NAND_STATUS_READY 0x40
+#define NAND_STATUS_WP 0x80
+
+typedef enum {
+ NAND_ECC_NONE,
+ NAND_ECC_SOFT,
+ NAND_ECC_HW,
+ NAND_ECC_HW_SYNDROME,
+} nand_ecc_modes_t;
+
+#define NAND_ECC_READ 0
+
+#define NAND_ECC_WRITE 1
+
+#define NAND_ECC_READSYN 2
+
+#define NAND_GET_DEVICE 0x80
+
+#define NAND_NO_AUTOINCR 0x00000001
+
+#define NAND_BUSWIDTH_16 0x00000002
+
+#define NAND_NO_PADDING 0x00000004
+
+#define NAND_CACHEPRG 0x00000008
+
+#define NAND_COPYBACK 0x00000010
+
+#define NAND_IS_AND 0x00000020
+
+#define NAND_4PAGE_ARRAY 0x00000040
+
+#define BBT_AUTO_REFRESH 0x00000080
+
+#define NAND_NO_READRDY 0x00000100
+
+#define NAND_SAMSUNG_LP_OPTIONS (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
+
+#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
+#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
+#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
+#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
+
+#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
+
+#define NAND_USE_FLASH_BBT 0x00010000
+
+#define NAND_SKIP_BBTSCAN 0x00020000
+
+#define NAND_CONTROLLER_ALLOC 0x80000000
+
+typedef enum {
+ FL_READY,
+ FL_READING,
+ FL_WRITING,
+ FL_ERASING,
+ FL_SYNCING,
+ FL_CACHEDPRG,
+ FL_PM_SUSPENDED,
+} nand_state_t;
+
+struct nand_chip;
+
+struct nand_hw_control {
+ spinlock_t lock;
+ struct nand_chip *active;
+ wait_queue_head_t wq;
+};
+
+struct nand_ecc_ctrl {
+ nand_ecc_modes_t mode;
+ int steps;
+ int size;
+ int bytes;
+ int total;
+ int prepad;
+ int postpad;
+ struct nand_ecclayout *layout;
+ void (*hwctl)(struct mtd_info *mtd, int mode);
+ int (*calculate)(struct mtd_info *mtd,
+ const uint8_t *dat,
+ uint8_t *ecc_code);
+ int (*correct)(struct mtd_info *mtd, uint8_t *dat,
+ uint8_t *read_ecc,
+ uint8_t *calc_ecc);
+ int (*read_page)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ uint8_t *buf);
+ void (*write_page)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ const uint8_t *buf);
+ int (*read_oob)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ int page,
+ int sndcmd);
+ int (*write_oob)(struct mtd_info *mtd,
+ struct nand_chip *chip,
+ int page);
+};
+
+struct nand_buffers {
+ uint8_t ecccalc[NAND_MAX_OOBSIZE];
+ uint8_t ecccode[NAND_MAX_OOBSIZE];
+ uint8_t oobwbuf[NAND_MAX_OOBSIZE];
+ uint8_t databuf[NAND_MAX_PAGESIZE];
+ uint8_t oobrbuf[NAND_MAX_OOBSIZE];
+};
+
+struct nand_chip {
+ void __iomem *IO_ADDR_R;
+ void __iomem *IO_ADDR_W;
+
+ uint8_t (*read_byte)(struct mtd_info *mtd);
+ u16 (*read_word)(struct mtd_info *mtd);
+ void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
+ void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
+ int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
+ void (*select_chip)(struct mtd_info *mtd, int chip);
+ int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip);
+ int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
+ void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
+ unsigned int ctrl);
+ int (*dev_ready)(struct mtd_info *mtd);
+ void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr);
+ int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
+ void (*erase_cmd)(struct mtd_info *mtd, int page);
+ int (*scan_bbt)(struct mtd_info *mtd);
+ int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page);
+
+ int chip_delay;
+ unsigned int options;
+
+ int page_shift;
+ int phys_erase_shift;
+ int bbt_erase_shift;
+ int chip_shift;
+ int numchips;
+ unsigned long chipsize;
+ int pagemask;
+ int pagebuf;
+ int badblockpos;
+
+ nand_state_t state;
+
+ uint8_t *oob_poi;
+ struct nand_hw_control *controller;
+ struct nand_ecclayout *ecclayout;
+
+ struct nand_ecc_ctrl ecc;
+ struct nand_buffers buffers;
+ struct nand_hw_control hwcontrol;
+
+ struct mtd_oob_ops ops;
+
+ uint8_t *bbt;
+ struct nand_bbt_descr *bbt_td;
+ struct nand_bbt_descr *bbt_md;
+
+ struct nand_bbt_descr *badblock_pattern;
+
+ void *priv;
+};
+
+#define NAND_MFR_TOSHIBA 0x98
+#define NAND_MFR_SAMSUNG 0xec
+#define NAND_MFR_FUJITSU 0x04
+#define NAND_MFR_NATIONAL 0x8f
+#define NAND_MFR_RENESAS 0x07
+#define NAND_MFR_STMICRO 0x20
+#define NAND_MFR_HYNIX 0xad
+
+struct nand_flash_dev {
+ char *name;
+ int id;
+ unsigned long pagesize;
+ unsigned long chipsize;
+ unsigned long erasesize;
+ unsigned long options;
+};
+
+struct nand_manufacturers {
+ int id;
+ char * name;
+};
+
+struct nand_bbt_descr {
+ int options;
+ int pages[NAND_MAX_CHIPS];
+ int offs;
+ int veroffs;
+ uint8_t version[NAND_MAX_CHIPS];
+ int len;
+ int maxblocks;
+ int reserved_block_code;
+ uint8_t *pattern;
+};
+
+#define NAND_BBT_NRBITS_MSK 0x0000000F
+#define NAND_BBT_1BIT 0x00000001
+#define NAND_BBT_2BIT 0x00000002
+#define NAND_BBT_4BIT 0x00000004
+#define NAND_BBT_8BIT 0x00000008
+
+#define NAND_BBT_LASTBLOCK 0x00000010
+
+#define NAND_BBT_ABSPAGE 0x00000020
+
+#define NAND_BBT_SEARCH 0x00000040
+
+#define NAND_BBT_PERCHIP 0x00000080
+
+#define NAND_BBT_VERSION 0x00000100
+
+#define NAND_BBT_CREATE 0x00000200
+
+#define NAND_BBT_SCANALLPAGES 0x00000400
+
+#define NAND_BBT_SCANEMPTY 0x00000800
+
+#define NAND_BBT_WRITE 0x00001000
+
+#define NAND_BBT_SAVECONTENT 0x00002000
+
+#define NAND_BBT_SCAN2NDPAGE 0x00004000
+
+#define NAND_BBT_SCAN_MAXBLOCKS 4
+
+#define NAND_SMALL_BADBLOCK_POS 5
+#define NAND_LARGE_BADBLOCK_POS 0
+
+struct platform_nand_chip {
+ int nr_chips;
+ int chip_offset;
+ int nr_partitions;
+ struct mtd_partition *partitions;
+ struct nand_ecclayout *ecclayout;
+ int chip_delay;
+ unsigned int options;
+ void *priv;
+};
+
+struct platform_nand_ctrl {
+ void (*hwcontrol)(struct mtd_info *mtd, int cmd);
+ int (*dev_ready)(struct mtd_info *mtd);
+ void (*select_chip)(struct mtd_info *mtd, int chip);
+ void *priv;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand_ecc.h
new file mode 100644
index 0000000..3e817f4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_NAND_ECC_H__
+#define __MTD_NAND_ECC_H__
+
+struct mtd_info;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nftl.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nftl.h
new file mode 100644
index 0000000..da7320e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/nftl.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_NFTL_H__
+#define __MTD_NFTL_H__
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/blktrans.h>
+
+#include <mtd/nftl-user.h>
+
+#define BLOCK_NIL 0xffff
+#define BLOCK_FREE 0xfffe
+#define BLOCK_NOTEXPLORED 0xfffd
+#define BLOCK_RESERVED 0xfffc
+
+struct NFTLrecord {
+ struct mtd_blktrans_dev mbd;
+ __u16 MediaUnit, SpareMediaUnit;
+ __u32 EraseSize;
+ struct NFTLMediaHeader MediaHdr;
+ int usecount;
+ unsigned char heads;
+ unsigned char sectors;
+ unsigned short cylinders;
+ __u16 numvunits;
+ __u16 lastEUN;
+ __u16 numfreeEUNs;
+ __u16 LastFreeEUN;
+ int head,sect,cyl;
+ __u16 *EUNtable;
+ __u16 *ReplUnitTable;
+ unsigned int nb_blocks;
+ unsigned int nb_boot_blocks;
+ struct erase_info instr;
+ struct nand_ecclayout oobinfo;
+};
+
+#ifndef NFTL_MAJOR
+#define NFTL_MAJOR 93
+#endif
+
+#define MAX_NFTLS 16
+#define MAX_SECTORS_PER_UNIT 64
+#define NFTL_PARTN_BITS 4
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/onenand_regs.h
new file mode 100644
index 0000000..a39c78f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1,143 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ONENAND_REG_H
+#define __ONENAND_REG_H
+
+#define ONENAND_MEMORY_MAP(x) ((x) << 1)
+
+#define ONENAND_BOOTRAM ONENAND_MEMORY_MAP(0x0000)
+#define ONENAND_DATARAM ONENAND_MEMORY_MAP(0x0200)
+#define ONENAND_SPARERAM ONENAND_MEMORY_MAP(0x8010)
+
+#define ONENAND_REG_MANUFACTURER_ID ONENAND_MEMORY_MAP(0xF000)
+#define ONENAND_REG_DEVICE_ID ONENAND_MEMORY_MAP(0xF001)
+#define ONENAND_REG_VERSION_ID ONENAND_MEMORY_MAP(0xF002)
+#define ONENAND_REG_DATA_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF003)
+#define ONENAND_REG_BOOT_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF004)
+#define ONENAND_REG_NUM_BUFFERS ONENAND_MEMORY_MAP(0xF005)
+#define ONENAND_REG_TECHNOLOGY ONENAND_MEMORY_MAP(0xF006)
+
+#define ONENAND_REG_START_ADDRESS1 ONENAND_MEMORY_MAP(0xF100)
+#define ONENAND_REG_START_ADDRESS2 ONENAND_MEMORY_MAP(0xF101)
+#define ONENAND_REG_START_ADDRESS3 ONENAND_MEMORY_MAP(0xF102)
+#define ONENAND_REG_START_ADDRESS4 ONENAND_MEMORY_MAP(0xF103)
+#define ONENAND_REG_START_ADDRESS5 ONENAND_MEMORY_MAP(0xF104)
+#define ONENAND_REG_START_ADDRESS6 ONENAND_MEMORY_MAP(0xF105)
+#define ONENAND_REG_START_ADDRESS7 ONENAND_MEMORY_MAP(0xF106)
+#define ONENAND_REG_START_ADDRESS8 ONENAND_MEMORY_MAP(0xF107)
+
+#define ONENAND_REG_START_BUFFER ONENAND_MEMORY_MAP(0xF200)
+#define ONENAND_REG_COMMAND ONENAND_MEMORY_MAP(0xF220)
+#define ONENAND_REG_SYS_CFG1 ONENAND_MEMORY_MAP(0xF221)
+#define ONENAND_REG_SYS_CFG2 ONENAND_MEMORY_MAP(0xF222)
+#define ONENAND_REG_CTRL_STATUS ONENAND_MEMORY_MAP(0xF240)
+#define ONENAND_REG_INTERRUPT ONENAND_MEMORY_MAP(0xF241)
+#define ONENAND_REG_START_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24C)
+#define ONENAND_REG_END_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24D)
+#define ONENAND_REG_WP_STATUS ONENAND_MEMORY_MAP(0xF24E)
+
+#define ONENAND_REG_ECC_STATUS ONENAND_MEMORY_MAP(0xFF00)
+#define ONENAND_REG_ECC_M0 ONENAND_MEMORY_MAP(0xFF01)
+#define ONENAND_REG_ECC_S0 ONENAND_MEMORY_MAP(0xFF02)
+#define ONENAND_REG_ECC_M1 ONENAND_MEMORY_MAP(0xFF03)
+#define ONENAND_REG_ECC_S1 ONENAND_MEMORY_MAP(0xFF04)
+#define ONENAND_REG_ECC_M2 ONENAND_MEMORY_MAP(0xFF05)
+#define ONENAND_REG_ECC_S2 ONENAND_MEMORY_MAP(0xFF06)
+#define ONENAND_REG_ECC_M3 ONENAND_MEMORY_MAP(0xFF07)
+#define ONENAND_REG_ECC_S3 ONENAND_MEMORY_MAP(0xFF08)
+
+#define ONENAND_DEVICE_DENSITY_SHIFT (4)
+#define ONENAND_DEVICE_IS_DDP (1 << 3)
+#define ONENAND_DEVICE_IS_DEMUX (1 << 2)
+#define ONENAND_DEVICE_VCC_MASK (0x3)
+
+#define ONENAND_DEVICE_DENSITY_512Mb (0x002)
+
+#define ONENAND_VERSION_PROCESS_SHIFT (8)
+
+#define ONENAND_DDP_SHIFT (15)
+
+#define ONENAND_FPA_MASK (0x3f)
+#define ONENAND_FPA_SHIFT (2)
+#define ONENAND_FSA_MASK (0x03)
+
+#define ONENAND_BSA_MASK (0x03)
+#define ONENAND_BSA_SHIFT (8)
+#define ONENAND_BSA_BOOTRAM (0 << 2)
+#define ONENAND_BSA_DATARAM0 (2 << 2)
+#define ONENAND_BSA_DATARAM1 (3 << 2)
+#define ONENAND_BSC_MASK (0x03)
+
+#define ONENAND_CMD_READ (0x00)
+#define ONENAND_CMD_READOOB (0x13)
+#define ONENAND_CMD_PROG (0x80)
+#define ONENAND_CMD_PROGOOB (0x1A)
+#define ONENAND_CMD_UNLOCK (0x23)
+#define ONENAND_CMD_LOCK (0x2A)
+#define ONENAND_CMD_LOCK_TIGHT (0x2C)
+#define ONENAND_CMD_ERASE (0x94)
+#define ONENAND_CMD_RESET (0xF0)
+#define ONENAND_CMD_OTP_ACCESS (0x65)
+#define ONENAND_CMD_READID (0x90)
+
+#define ONENAND_CMD_BUFFERRAM (0x1978)
+
+#define ONENAND_SYS_CFG1_SYNC_READ (1 << 15)
+#define ONENAND_SYS_CFG1_BRL_7 (7 << 12)
+#define ONENAND_SYS_CFG1_BRL_6 (6 << 12)
+#define ONENAND_SYS_CFG1_BRL_5 (5 << 12)
+#define ONENAND_SYS_CFG1_BRL_4 (4 << 12)
+#define ONENAND_SYS_CFG1_BRL_3 (3 << 12)
+#define ONENAND_SYS_CFG1_BRL_10 (2 << 12)
+#define ONENAND_SYS_CFG1_BRL_9 (1 << 12)
+#define ONENAND_SYS_CFG1_BRL_8 (0 << 12)
+#define ONENAND_SYS_CFG1_BRL_SHIFT (12)
+#define ONENAND_SYS_CFG1_BL_32 (4 << 9)
+#define ONENAND_SYS_CFG1_BL_16 (3 << 9)
+#define ONENAND_SYS_CFG1_BL_8 (2 << 9)
+#define ONENAND_SYS_CFG1_BL_4 (1 << 9)
+#define ONENAND_SYS_CFG1_BL_CONT (0 << 9)
+#define ONENAND_SYS_CFG1_BL_SHIFT (9)
+#define ONENAND_SYS_CFG1_NO_ECC (1 << 8)
+#define ONENAND_SYS_CFG1_RDY (1 << 7)
+#define ONENAND_SYS_CFG1_INT (1 << 6)
+#define ONENAND_SYS_CFG1_IOBE (1 << 5)
+#define ONENAND_SYS_CFG1_RDY_CONF (1 << 4)
+
+#define ONENAND_CTRL_ONGO (1 << 15)
+#define ONENAND_CTRL_LOCK (1 << 14)
+#define ONENAND_CTRL_LOAD (1 << 13)
+#define ONENAND_CTRL_PROGRAM (1 << 12)
+#define ONENAND_CTRL_ERASE (1 << 11)
+#define ONENAND_CTRL_ERROR (1 << 10)
+#define ONENAND_CTRL_RSTB (1 << 7)
+#define ONENAND_CTRL_OTP_L (1 << 6)
+#define ONENAND_CTRL_OTP_BL (1 << 5)
+
+#define ONENAND_INT_MASTER (1 << 15)
+#define ONENAND_INT_READ (1 << 7)
+#define ONENAND_INT_WRITE (1 << 6)
+#define ONENAND_INT_ERASE (1 << 5)
+#define ONENAND_INT_RESET (1 << 4)
+#define ONENAND_INT_CLEAR (0 << 0)
+
+#define ONENAND_WP_US (1 << 2)
+#define ONENAND_WP_LS (1 << 1)
+#define ONENAND_WP_LTS (1 << 0)
+
+#define ONENAND_ECC_1BIT (1 << 0)
+#define ONENAND_ECC_2BIT (1 << 1)
+#define ONENAND_ECC_2BIT_ALL (0xAAAA)
+
+#define ONENAND_OTP_LOCK_OFFSET (14)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtd/partitions.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/partitions.h
new file mode 100644
index 0000000..aeb15e1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtd/partitions.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef MTD_PARTITIONS_H
+#define MTD_PARTITIONS_H
+
+#include <linux/types.h>
+
+struct mtd_partition {
+ char *name;
+ u_int32_t size;
+ u_int32_t offset;
+ u_int32_t mask_flags;
+ struct nand_ecclayout *ecclayout;
+ struct mtd_info **mtdp;
+};
+
+#define MTDPART_OFS_NXTBLK (-2)
+#define MTDPART_OFS_APPEND (-1)
+#define MTDPART_SIZ_FULL (0)
+
+struct mtd_part_parser {
+ struct list_head list;
+ struct module *owner;
+ const char *name;
+ int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long);
+};
+
+#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mtio.h b/6/platforms/android-3/arch-x86/usr/include/linux/mtio.h
new file mode 100644
index 0000000..47a6e2b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mtio.h
@@ -0,0 +1,259 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MTIO_H
+#define _LINUX_MTIO_H
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+#include <linux/qic117.h>
+
+struct mtop {
+ short mt_op;
+ int mt_count;
+};
+
+#define MTRESET 0
+#define MTFSF 1
+#define MTBSF 2
+#define MTFSR 3
+#define MTBSR 4
+#define MTWEOF 5
+#define MTREW 6
+#define MTOFFL 7
+#define MTNOP 8
+#define MTRETEN 9
+#define MTBSFM 10
+#define MTFSFM 11
+#define MTEOM 12
+#define MTERASE 13
+
+#define MTRAS1 14
+#define MTRAS2 15
+#define MTRAS3 16
+
+#define MTSETBLK 20
+#define MTSETDENSITY 21
+#define MTSEEK 22
+#define MTTELL 23
+#define MTSETDRVBUFFER 24
+
+#define MTFSS 25
+#define MTBSS 26
+#define MTWSM 27
+
+#define MTLOCK 28
+#define MTUNLOCK 29
+#define MTLOAD 30
+#define MTUNLOAD 31
+#define MTCOMPRESSION 32
+#define MTSETPART 33
+#define MTMKPART 34
+
+struct mtget {
+ long mt_type;
+ long mt_resid;
+
+ long mt_dsreg;
+ long mt_gstat;
+ long mt_erreg;
+
+ __kernel_daddr_t mt_fileno;
+ __kernel_daddr_t mt_blkno;
+};
+
+#define MT_ISUNKNOWN 0x01
+#define MT_ISQIC02 0x02
+#define MT_ISWT5150 0x03
+#define MT_ISARCHIVE_5945L2 0x04
+#define MT_ISCMSJ500 0x05
+#define MT_ISTDC3610 0x06
+#define MT_ISARCHIVE_VP60I 0x07
+#define MT_ISARCHIVE_2150L 0x08
+#define MT_ISARCHIVE_2060L 0x09
+#define MT_ISARCHIVESC499 0x0A
+#define MT_ISQIC02_ALL_FEATURES 0x0F
+#define MT_ISWT5099EEN24 0x11
+#define MT_ISTEAC_MT2ST 0x12
+#define MT_ISEVEREX_FT40A 0x32
+#define MT_ISDDS1 0x51
+#define MT_ISDDS2 0x52
+#define MT_ISONSTREAM_SC 0x61
+#define MT_ISSCSI1 0x71
+#define MT_ISSCSI2 0x72
+
+#define MT_ISFTAPE_UNKNOWN 0x800000
+#define MT_ISFTAPE_FLAG 0x800000
+
+struct mt_tape_info {
+ long t_type;
+ char *t_name;
+};
+
+#define MT_TAPE_INFO { {MT_ISUNKNOWN, "Unknown type of tape device"}, {MT_ISQIC02, "Generic QIC-02 tape streamer"}, {MT_ISWT5150, "Wangtek 5150, QIC-150"}, {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, {MT_ISCMSJ500, "CMS Jumbo 500"}, {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, {MT_ISSCSI1, "Generic SCSI-1 tape"}, {MT_ISSCSI2, "Generic SCSI-2 tape"}, {0, NULL} }
+
+struct mtpos {
+ long mt_blkno;
+};
+
+struct mtvolinfo {
+ unsigned int mt_volno;
+ unsigned int mt_blksz;
+ unsigned int mt_rawsize;
+ unsigned int mt_size;
+ unsigned int mt_cmpr:1;
+};
+
+#define MT_FT_RD_SINGLE 0
+#define MT_FT_RD_AHEAD 1
+#define MT_FT_WR_ASYNC 0
+#define MT_FT_WR_MULTI 1
+#define MT_FT_WR_SINGLE 2
+#define MT_FT_WR_DELETE 3
+
+struct mtftseg
+{
+ unsigned mt_segno;
+ unsigned mt_mode;
+ int mt_result;
+ void __user *mt_data;
+};
+
+struct mttapesize {
+ unsigned long mt_capacity;
+ unsigned long mt_used;
+};
+
+#define FTFMT_SET_PARMS 1
+#define FTFMT_GET_PARMS 2
+#define FTFMT_FORMAT_TRACK 3
+#define FTFMT_STATUS 4
+#define FTFMT_VERIFY 5
+
+struct ftfmtparms {
+ unsigned char ft_qicstd;
+ unsigned char ft_fmtcode;
+ unsigned char ft_fhm;
+ unsigned char ft_ftm;
+ unsigned short ft_spt;
+ unsigned short ft_tpc;
+};
+
+struct ftfmttrack {
+ unsigned int ft_track;
+ unsigned char ft_gap3;
+};
+
+struct ftfmtstatus {
+ unsigned int ft_segment;
+};
+
+struct ftfmtverify {
+ unsigned int ft_segment;
+ unsigned long ft_bsm;
+};
+
+struct mtftformat {
+ unsigned int fmt_op;
+ union fmt_arg {
+ struct ftfmtparms fmt_parms;
+ struct ftfmttrack fmt_track;
+ struct ftfmtstatus fmt_status;
+ struct ftfmtverify fmt_verify;
+ } fmt_arg;
+};
+
+struct mtftcmd {
+ unsigned int ft_wait_before;
+ qic117_cmd_t ft_cmd;
+ unsigned char ft_parm_cnt;
+ unsigned char ft_parms[3];
+ unsigned int ft_result_bits;
+ unsigned int ft_result;
+ unsigned int ft_wait_after;
+ int ft_status;
+ int ft_error;
+};
+
+#define MTIOCTOP _IOW('m', 1, struct mtop)
+#define MTIOCGET _IOR('m', 2, struct mtget)
+#define MTIOCPOS _IOR('m', 3, struct mtpos)
+
+#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo)
+#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo)
+
+#define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg)
+#define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg)
+#define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)
+#define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)
+#define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat)
+#define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd)
+
+#define GMT_EOF(x) ((x) & 0x80000000)
+#define GMT_BOT(x) ((x) & 0x40000000)
+#define GMT_EOT(x) ((x) & 0x20000000)
+#define GMT_SM(x) ((x) & 0x10000000)
+#define GMT_EOD(x) ((x) & 0x08000000)
+#define GMT_WR_PROT(x) ((x) & 0x04000000)
+
+#define GMT_ONLINE(x) ((x) & 0x01000000)
+#define GMT_D_6250(x) ((x) & 0x00800000)
+#define GMT_D_1600(x) ((x) & 0x00400000)
+#define GMT_D_800(x) ((x) & 0x00200000)
+
+#define GMT_DR_OPEN(x) ((x) & 0x00040000)
+
+#define GMT_IM_REP_EN(x) ((x) & 0x00010000)
+#define GMT_CLN(x) ((x) & 0x00008000)
+
+#define MT_ST_BLKSIZE_SHIFT 0
+#define MT_ST_BLKSIZE_MASK 0xffffff
+#define MT_ST_DENSITY_SHIFT 24
+#define MT_ST_DENSITY_MASK 0xff000000
+
+#define MT_ST_SOFTERR_SHIFT 0
+#define MT_ST_SOFTERR_MASK 0xffff
+
+#define MT_ST_OPTIONS 0xf0000000
+#define MT_ST_BOOLEANS 0x10000000
+#define MT_ST_SETBOOLEANS 0x30000000
+#define MT_ST_CLEARBOOLEANS 0x40000000
+#define MT_ST_WRITE_THRESHOLD 0x20000000
+#define MT_ST_DEF_BLKSIZE 0x50000000
+#define MT_ST_DEF_OPTIONS 0x60000000
+#define MT_ST_TIMEOUTS 0x70000000
+#define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000)
+#define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000)
+#define MT_ST_SET_CLN 0x80000000
+
+#define MT_ST_BUFFER_WRITES 0x1
+#define MT_ST_ASYNC_WRITES 0x2
+#define MT_ST_READ_AHEAD 0x4
+#define MT_ST_DEBUGGING 0x8
+#define MT_ST_TWO_FM 0x10
+#define MT_ST_FAST_MTEOM 0x20
+#define MT_ST_AUTO_LOCK 0x40
+#define MT_ST_DEF_WRITES 0x80
+#define MT_ST_CAN_BSR 0x100
+#define MT_ST_NO_BLKLIMS 0x200
+#define MT_ST_CAN_PARTITIONS 0x400
+#define MT_ST_SCSI2LOGICAL 0x800
+#define MT_ST_SYSV 0x1000
+#define MT_ST_NOWAIT 0x2000
+
+#define MT_ST_CLEAR_DEFAULT 0xfffff
+#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
+#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
+#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
+
+#define MT_ST_HPLOADER_OFFSET 10000
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mutex-debug.h b/6/platforms/android-3/arch-x86/usr/include/linux/mutex-debug.h
new file mode 100644
index 0000000..7065610
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mutex-debug.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MUTEX_DEBUG_H
+#define __LINUX_MUTEX_DEBUG_H
+
+#include <linux/linkage.h>
+#include <linux/lockdep.h>
+
+#define __DEBUG_MUTEX_INITIALIZER(lockname) , .magic = &lockname
+
+#define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/mutex.h b/6/platforms/android-3/arch-x86/usr/include/linux/mutex.h
new file mode 100644
index 0000000..4b33a8a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/mutex.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MUTEX_H
+#define __LINUX_MUTEX_H
+
+#include <linux/list.h>
+#include <linux/spinlock_types.h>
+#include <linux/linkage.h>
+#include <linux/lockdep.h>
+
+#include <asm/atomic.h>
+
+struct mutex {
+
+ atomic_t count;
+ spinlock_t wait_lock;
+ struct list_head wait_list;
+};
+
+struct mutex_waiter {
+ struct list_head list;
+ struct task_struct *task;
+};
+
+#define __DEBUG_MUTEX_INITIALIZER(lockname)
+#define mutex_init(mutex) do { static struct lock_class_key __key; __mutex_init((mutex), #mutex, &__key); } while (0)
+#define mutex_destroy(mutex) do { } while (0)
+
+#define __DEP_MAP_MUTEX_INITIALIZER(lockname)
+
+#define __MUTEX_INITIALIZER(lockname) { .count = ATOMIC_INIT(1) , .wait_lock = SPIN_LOCK_UNLOCKED , .wait_list = LIST_HEAD_INIT(lockname.wait_list) __DEBUG_MUTEX_INITIALIZER(lockname) __DEP_MAP_MUTEX_INITIALIZER(lockname) }
+
+#define DEFINE_MUTEX(mutexname) struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
+
+#define mutex_lock_nested(lock, subclass) mutex_lock(lock)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ncp.h b/6/platforms/android-3/arch-x86/usr/include/linux/ncp.h
new file mode 100644
index 0000000..091220a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ncp.h
@@ -0,0 +1,193 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NCP_H
+#define _LINUX_NCP_H
+
+#include <linux/types.h>
+
+#define NCP_PTYPE (0x11)
+#define NCP_PORT (0x0451)
+
+#define NCP_ALLOC_SLOT_REQUEST (0x1111)
+#define NCP_REQUEST (0x2222)
+#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
+
+struct ncp_request_header {
+ __u16 type;
+ __u8 sequence;
+ __u8 conn_low;
+ __u8 task;
+ __u8 conn_high;
+ __u8 function;
+ __u8 data[0];
+} __attribute__((packed));
+
+#define NCP_REPLY (0x3333)
+#define NCP_WATCHDOG (0x3E3E)
+#define NCP_POSITIVE_ACK (0x9999)
+
+struct ncp_reply_header {
+ __u16 type;
+ __u8 sequence;
+ __u8 conn_low;
+ __u8 task;
+ __u8 conn_high;
+ __u8 completion_code;
+ __u8 connection_state;
+ __u8 data[0];
+} __attribute__((packed));
+
+#define NCP_VOLNAME_LEN (16)
+#define NCP_NUMBER_OF_VOLUMES (256)
+struct ncp_volume_info {
+ __u32 total_blocks;
+ __u32 free_blocks;
+ __u32 purgeable_blocks;
+ __u32 not_yet_purgeable_blocks;
+ __u32 total_dir_entries;
+ __u32 available_dir_entries;
+ __u8 sectors_per_block;
+ char volume_name[NCP_VOLNAME_LEN + 1];
+};
+
+#define AR_READ (cpu_to_le16(1))
+#define AR_WRITE (cpu_to_le16(2))
+#define AR_EXCLUSIVE (cpu_to_le16(0x20))
+
+#define NCP_FILE_ID_LEN 6
+
+#define NW_NS_DOS 0
+#define NW_NS_MAC 1
+#define NW_NS_NFS 2
+#define NW_NS_FTAM 3
+#define NW_NS_OS2 4
+
+#define RIM_NAME (cpu_to_le32(1))
+#define RIM_SPACE_ALLOCATED (cpu_to_le32(2))
+#define RIM_ATTRIBUTES (cpu_to_le32(4))
+#define RIM_DATA_SIZE (cpu_to_le32(8))
+#define RIM_TOTAL_SIZE (cpu_to_le32(0x10))
+#define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20))
+#define RIM_ARCHIVE (cpu_to_le32(0x40))
+#define RIM_MODIFY (cpu_to_le32(0x80))
+#define RIM_CREATION (cpu_to_le32(0x100))
+#define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200))
+#define RIM_DIRECTORY (cpu_to_le32(0x400))
+#define RIM_RIGHTS (cpu_to_le32(0x800))
+#define RIM_ALL (cpu_to_le32(0xFFF))
+#define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000))
+
+#define NSIBM_NFS_NAME 0x0001
+#define NSIBM_NFS_MODE 0x0002
+#define NSIBM_NFS_GID 0x0004
+#define NSIBM_NFS_NLINKS 0x0008
+#define NSIBM_NFS_RDEV 0x0010
+#define NSIBM_NFS_LINK 0x0020
+#define NSIBM_NFS_CREATED 0x0040
+#define NSIBM_NFS_UID 0x0080
+#define NSIBM_NFS_ACSFLAG 0x0100
+#define NSIBM_NFS_MYFLAG 0x0200
+
+#define OC_MODE_OPEN 0x01
+#define OC_MODE_TRUNCATE 0x02
+#define OC_MODE_REPLACE 0x02
+#define OC_MODE_CREATE 0x08
+
+#define OC_ACTION_NONE 0x00
+#define OC_ACTION_OPEN 0x01
+#define OC_ACTION_CREATE 0x02
+#define OC_ACTION_TRUNCATE 0x04
+#define OC_ACTION_REPLACE 0x04
+
+#ifndef AR_READ_ONLY
+#define AR_READ_ONLY 0x0001
+#define AR_WRITE_ONLY 0x0002
+#define AR_DENY_READ 0x0004
+#define AR_DENY_WRITE 0x0008
+#define AR_COMPATIBILITY 0x0010
+#define AR_WRITE_THROUGH 0x0040
+#define AR_OPEN_COMPRESSED 0x0100
+#endif
+
+struct nw_nfs_info {
+ __u32 mode;
+ __u32 rdev;
+};
+
+struct nw_info_struct {
+ __u32 spaceAlloc;
+ __le32 attributes;
+ __u16 flags;
+ __le32 dataStreamSize;
+ __le32 totalStreamSize;
+ __u16 numberOfStreams;
+ __le16 creationTime;
+ __le16 creationDate;
+ __u32 creatorID;
+ __le16 modifyTime;
+ __le16 modifyDate;
+ __u32 modifierID;
+ __le16 lastAccessDate;
+ __u16 archiveTime;
+ __u16 archiveDate;
+ __u32 archiverID;
+ __u16 inheritedRightsMask;
+ __le32 dirEntNum;
+ __le32 DosDirNum;
+ __u32 volNumber;
+ __u32 EADataSize;
+ __u32 EAKeyCount;
+ __u32 EAKeySize;
+ __u32 NSCreator;
+ __u8 nameLen;
+ __u8 entryName[256];
+
+} __attribute__((packed));
+
+#define DM_ATTRIBUTES (cpu_to_le32(0x02))
+#define DM_CREATE_DATE (cpu_to_le32(0x04))
+#define DM_CREATE_TIME (cpu_to_le32(0x08))
+#define DM_CREATOR_ID (cpu_to_le32(0x10))
+#define DM_ARCHIVE_DATE (cpu_to_le32(0x20))
+#define DM_ARCHIVE_TIME (cpu_to_le32(0x40))
+#define DM_ARCHIVER_ID (cpu_to_le32(0x80))
+#define DM_MODIFY_DATE (cpu_to_le32(0x0100))
+#define DM_MODIFY_TIME (cpu_to_le32(0x0200))
+#define DM_MODIFIER_ID (cpu_to_le32(0x0400))
+#define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800))
+#define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000))
+#define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000))
+
+struct nw_modify_dos_info {
+ __le32 attributes;
+ __le16 creationDate;
+ __le16 creationTime;
+ __u32 creatorID;
+ __le16 modifyDate;
+ __le16 modifyTime;
+ __u32 modifierID;
+ __u16 archiveDate;
+ __u16 archiveTime;
+ __u32 archiverID;
+ __le16 lastAccessDate;
+ __u16 inheritanceGrantMask;
+ __u16 inheritanceRevokeMask;
+ __u32 maximumSpace;
+} __attribute__((packed));
+
+struct nw_search_sequence {
+ __u8 volNumber;
+ __u32 dirBase;
+ __u32 sequence;
+} __attribute__((packed));
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ncp_mount.h b/6/platforms/android-3/arch-x86/usr/include/linux/ncp_mount.h
new file mode 100644
index 0000000..204869f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ncp_mount.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NCP_MOUNT_H
+#define _LINUX_NCP_MOUNT_H
+
+#include <linux/types.h>
+#include <linux/ncp.h>
+
+#define NCP_MOUNT_VERSION 3
+
+#define NCP_MOUNT_SOFT 0x0001
+#define NCP_MOUNT_INTR 0x0002
+#define NCP_MOUNT_STRONG 0x0004
+#define NCP_MOUNT_NO_OS2 0x0008
+#define NCP_MOUNT_NO_NFS 0x0010
+#define NCP_MOUNT_EXTRAS 0x0020
+#define NCP_MOUNT_SYMLINKS 0x0040
+#define NCP_MOUNT_NFS_EXTRAS 0x0080
+
+struct ncp_mount_data {
+ int version;
+ unsigned int ncp_fd;
+ __kernel_uid_t mounted_uid;
+ __kernel_pid_t wdog_pid;
+
+ unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
+ unsigned int time_out;
+ unsigned int retry_count;
+ unsigned int flags;
+
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_mode_t file_mode;
+ __kernel_mode_t dir_mode;
+};
+
+#define NCP_MOUNT_VERSION_V4 (4)
+
+struct ncp_mount_data_v4 {
+ int version;
+ unsigned long flags;
+
+ unsigned long mounted_uid;
+
+ long wdog_pid;
+
+ unsigned int ncp_fd;
+ unsigned int time_out;
+ unsigned int retry_count;
+
+ unsigned long uid;
+ unsigned long gid;
+
+ unsigned long file_mode;
+ unsigned long dir_mode;
+};
+
+#define NCP_MOUNT_VERSION_V5 (5)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ncp_no.h b/6/platforms/android-3/arch-x86/usr/include/linux/ncp_no.h
new file mode 100644
index 0000000..9afed68
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ncp_no.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NCP_NO
+#define _NCP_NO
+
+#define aRONLY (__constant_cpu_to_le32(1))
+#define aHIDDEN (__constant_cpu_to_le32(2))
+#define aSYSTEM (__constant_cpu_to_le32(4))
+#define aEXECUTE (__constant_cpu_to_le32(8))
+#define aDIR (__constant_cpu_to_le32(0x10))
+#define aARCH (__constant_cpu_to_le32(0x20))
+#define aSHARED (__constant_cpu_to_le32(0x80))
+#define aDONTSUBALLOCATE (__constant_cpu_to_le32(1L<<11))
+#define aTRANSACTIONAL (__constant_cpu_to_le32(1L<<12))
+#define aPURGE (__constant_cpu_to_le32(1L<<16))
+#define aRENAMEINHIBIT (__constant_cpu_to_le32(1L<<17))
+#define aDELETEINHIBIT (__constant_cpu_to_le32(1L<<18))
+#define aDONTCOMPRESS (__constant_cpu_to_le32(1L<<27))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/net.h b/6/platforms/android-3/arch-x86/usr/include/linux/net.h
new file mode 100644
index 0000000..29fca2c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/net.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NET_H
+#define _LINUX_NET_H
+
+#include <linux/wait.h>
+#include <asm/socket.h>
+
+struct poll_table_struct;
+struct inode;
+
+#define NPROTO 32
+
+#define SYS_SOCKET 1
+#define SYS_BIND 2
+#define SYS_CONNECT 3
+#define SYS_LISTEN 4
+#define SYS_ACCEPT 5
+#define SYS_GETSOCKNAME 6
+#define SYS_GETPEERNAME 7
+#define SYS_SOCKETPAIR 8
+#define SYS_SEND 9
+#define SYS_RECV 10
+#define SYS_SENDTO 11
+#define SYS_RECVFROM 12
+#define SYS_SHUTDOWN 13
+#define SYS_SETSOCKOPT 14
+#define SYS_GETSOCKOPT 15
+#define SYS_SENDMSG 16
+#define SYS_RECVMSG 17
+
+typedef enum {
+ SS_FREE = 0,
+ SS_UNCONNECTED,
+ SS_CONNECTING,
+ SS_CONNECTED,
+ SS_DISCONNECTING
+} socket_state;
+
+#define __SO_ACCEPTCON (1 << 16)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netdevice.h b/6/platforms/android-3/arch-x86/usr/include/linux/netdevice.h
new file mode 100644
index 0000000..54b58f1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netdevice.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NETDEVICE_H
+#define _LINUX_NETDEVICE_H
+
+#include <linux/if.h>
+#include <linux/if_ether.h>
+#include <linux/if_packet.h>
+
+#define MAX_ADDR_LEN 32
+
+#define NETDEV_TX_OK 0
+#define NETDEV_TX_BUSY 1
+#define NETDEV_TX_LOCKED -1
+
+#define LL_MAX_HEADER 32
+
+#define MAX_HEADER LL_MAX_HEADER
+
+struct net_device_stats
+{
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors;
+ unsigned long tx_errors;
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long multicast;
+ unsigned long collisions;
+
+ unsigned long rx_length_errors;
+ unsigned long rx_over_errors;
+ unsigned long rx_crc_errors;
+ unsigned long rx_frame_errors;
+ unsigned long rx_fifo_errors;
+ unsigned long rx_missed_errors;
+
+ unsigned long tx_aborted_errors;
+ unsigned long tx_carrier_errors;
+ unsigned long tx_fifo_errors;
+ unsigned long tx_heartbeat_errors;
+ unsigned long tx_window_errors;
+
+ unsigned long rx_compressed;
+ unsigned long tx_compressed;
+};
+
+enum {
+ IF_PORT_UNKNOWN = 0,
+ IF_PORT_10BASE2,
+ IF_PORT_10BASET,
+ IF_PORT_AUI,
+ IF_PORT_100BASET,
+ IF_PORT_100BASETX,
+ IF_PORT_100BASEFX
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter.h
new file mode 100644
index 0000000..0488344
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NETFILTER_H
+#define __LINUX_NETFILTER_H
+
+#include <linux/compiler.h>
+
+#define NF_DROP 0
+#define NF_ACCEPT 1
+#define NF_STOLEN 2
+#define NF_QUEUE 3
+#define NF_REPEAT 4
+#define NF_STOP 5
+#define NF_MAX_VERDICT NF_STOP
+
+#define NF_VERDICT_MASK 0x0000ffff
+#define NF_VERDICT_BITS 16
+
+#define NF_VERDICT_QMASK 0xffff0000
+#define NF_VERDICT_QBITS 16
+
+#define NF_QUEUE_NR(x) (((x << NF_VERDICT_QBITS) & NF_VERDICT_QMASK) | NF_QUEUE)
+
+#define NFC_UNKNOWN 0x4000
+#define NFC_ALTERED 0x8000
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 100644
index 0000000..69177fc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_COMMON_H
+#define _NF_CONNTRACK_COMMON_H
+
+enum ip_conntrack_info
+{
+
+ IP_CT_ESTABLISHED,
+
+ IP_CT_RELATED,
+
+ IP_CT_NEW,
+
+ IP_CT_IS_REPLY,
+
+ IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
+};
+
+enum ip_conntrack_status {
+
+ IPS_EXPECTED_BIT = 0,
+ IPS_EXPECTED = (1 << IPS_EXPECTED_BIT),
+
+ IPS_SEEN_REPLY_BIT = 1,
+ IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT),
+
+ IPS_ASSURED_BIT = 2,
+ IPS_ASSURED = (1 << IPS_ASSURED_BIT),
+
+ IPS_CONFIRMED_BIT = 3,
+ IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT),
+
+ IPS_SRC_NAT_BIT = 4,
+ IPS_SRC_NAT = (1 << IPS_SRC_NAT_BIT),
+
+ IPS_DST_NAT_BIT = 5,
+ IPS_DST_NAT = (1 << IPS_DST_NAT_BIT),
+
+ IPS_NAT_MASK = (IPS_DST_NAT | IPS_SRC_NAT),
+
+ IPS_SEQ_ADJUST_BIT = 6,
+ IPS_SEQ_ADJUST = (1 << IPS_SEQ_ADJUST_BIT),
+
+ IPS_SRC_NAT_DONE_BIT = 7,
+ IPS_SRC_NAT_DONE = (1 << IPS_SRC_NAT_DONE_BIT),
+
+ IPS_DST_NAT_DONE_BIT = 8,
+ IPS_DST_NAT_DONE = (1 << IPS_DST_NAT_DONE_BIT),
+
+ IPS_NAT_DONE_MASK = (IPS_DST_NAT_DONE | IPS_SRC_NAT_DONE),
+
+ IPS_DYING_BIT = 9,
+ IPS_DYING = (1 << IPS_DYING_BIT),
+
+ IPS_FIXED_TIMEOUT_BIT = 10,
+ IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT),
+};
+
+enum ip_conntrack_events
+{
+
+ IPCT_NEW_BIT = 0,
+ IPCT_NEW = (1 << IPCT_NEW_BIT),
+
+ IPCT_RELATED_BIT = 1,
+ IPCT_RELATED = (1 << IPCT_RELATED_BIT),
+
+ IPCT_DESTROY_BIT = 2,
+ IPCT_DESTROY = (1 << IPCT_DESTROY_BIT),
+
+ IPCT_REFRESH_BIT = 3,
+ IPCT_REFRESH = (1 << IPCT_REFRESH_BIT),
+
+ IPCT_STATUS_BIT = 4,
+ IPCT_STATUS = (1 << IPCT_STATUS_BIT),
+
+ IPCT_PROTOINFO_BIT = 5,
+ IPCT_PROTOINFO = (1 << IPCT_PROTOINFO_BIT),
+
+ IPCT_PROTOINFO_VOLATILE_BIT = 6,
+ IPCT_PROTOINFO_VOLATILE = (1 << IPCT_PROTOINFO_VOLATILE_BIT),
+
+ IPCT_HELPER_BIT = 7,
+ IPCT_HELPER = (1 << IPCT_HELPER_BIT),
+
+ IPCT_HELPINFO_BIT = 8,
+ IPCT_HELPINFO = (1 << IPCT_HELPINFO_BIT),
+
+ IPCT_HELPINFO_VOLATILE_BIT = 9,
+ IPCT_HELPINFO_VOLATILE = (1 << IPCT_HELPINFO_VOLATILE_BIT),
+
+ IPCT_NATINFO_BIT = 10,
+ IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
+
+ IPCT_COUNTER_FILLING_BIT = 11,
+ IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
+};
+
+enum ip_conntrack_expect_events {
+ IPEXP_NEW_BIT = 0,
+ IPEXP_NEW = (1 << IPEXP_NEW_BIT),
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 100644
index 0000000..ff815a7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_FTP_H
+#define _NF_CONNTRACK_FTP_H
+
+enum ip_ct_ftp_type
+{
+
+ IP_CT_FTP_PORT,
+
+ IP_CT_FTP_PASV,
+
+ IP_CT_FTP_EPRT,
+
+ IP_CT_FTP_EPSV,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 100644
index 0000000..15768b2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_SCTP_H
+#define _NF_CONNTRACK_SCTP_H
+
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+
+enum sctp_conntrack {
+ SCTP_CONNTRACK_NONE,
+ SCTP_CONNTRACK_CLOSED,
+ SCTP_CONNTRACK_COOKIE_WAIT,
+ SCTP_CONNTRACK_COOKIE_ECHOED,
+ SCTP_CONNTRACK_ESTABLISHED,
+ SCTP_CONNTRACK_SHUTDOWN_SENT,
+ SCTP_CONNTRACK_SHUTDOWN_RECD,
+ SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
+ SCTP_CONNTRACK_MAX
+};
+
+struct ip_ct_sctp
+{
+ enum sctp_conntrack state;
+
+ u_int32_t vtag[IP_CT_DIR_MAX];
+ u_int32_t ttag[IP_CT_DIR_MAX];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 100644
index 0000000..227f902
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_TCP_H
+#define _NF_CONNTRACK_TCP_H
+
+enum tcp_conntrack {
+ TCP_CONNTRACK_NONE,
+ TCP_CONNTRACK_SYN_SENT,
+ TCP_CONNTRACK_SYN_RECV,
+ TCP_CONNTRACK_ESTABLISHED,
+ TCP_CONNTRACK_FIN_WAIT,
+ TCP_CONNTRACK_CLOSE_WAIT,
+ TCP_CONNTRACK_LAST_ACK,
+ TCP_CONNTRACK_TIME_WAIT,
+ TCP_CONNTRACK_CLOSE,
+ TCP_CONNTRACK_LISTEN,
+ TCP_CONNTRACK_MAX,
+ TCP_CONNTRACK_IGNORE
+};
+
+#define IP_CT_TCP_FLAG_WINDOW_SCALE 0x01
+
+#define IP_CT_TCP_FLAG_SACK_PERM 0x02
+
+#define IP_CT_TCP_FLAG_CLOSE_INIT 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 100644
index 0000000..f282543
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NF_CONNTRACK_TUPLE_COMMON_H
+#define _NF_CONNTRACK_TUPLE_COMMON_H
+
+enum ip_conntrack_dir
+{
+ IP_CT_DIR_ORIGINAL,
+ IP_CT_DIR_REPLY,
+ IP_CT_DIR_MAX
+};
+
+#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink.h
new file mode 100644
index 0000000..4544cab
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NFNETLINK_H
+#define _NFNETLINK_H
+#include <linux/types.h>
+
+#define NF_NETLINK_CONNTRACK_NEW 0x00000001
+#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
+#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004
+#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008
+#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010
+#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020
+
+enum nfnetlink_groups {
+ NFNLGRP_NONE,
+#define NFNLGRP_NONE NFNLGRP_NONE
+ NFNLGRP_CONNTRACK_NEW,
+#define NFNLGRP_CONNTRACK_NEW NFNLGRP_CONNTRACK_NEW
+ NFNLGRP_CONNTRACK_UPDATE,
+#define NFNLGRP_CONNTRACK_UPDATE NFNLGRP_CONNTRACK_UPDATE
+ NFNLGRP_CONNTRACK_DESTROY,
+#define NFNLGRP_CONNTRACK_DESTROY NFNLGRP_CONNTRACK_DESTROY
+ NFNLGRP_CONNTRACK_EXP_NEW,
+#define NFNLGRP_CONNTRACK_EXP_NEW NFNLGRP_CONNTRACK_EXP_NEW
+ NFNLGRP_CONNTRACK_EXP_UPDATE,
+#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
+ NFNLGRP_CONNTRACK_EXP_DESTROY,
+#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
+ __NFNLGRP_MAX,
+};
+#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
+
+struct nfattr
+{
+ u_int16_t nfa_len;
+ u_int16_t nfa_type;
+} __attribute__ ((packed));
+
+#define NFNL_NFA_NEST 0x8000
+#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
+
+#define NFA_ALIGNTO 4
+#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
+#define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && (nfa)->nfa_len <= (len))
+#define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
+#define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len))
+#define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len))
+#define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0)))
+#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
+#define NFA_NEST(skb, type) ({ struct nfattr *__start = (struct nfattr *) (skb)->tail; NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); __start; })
+#define NFA_NEST_END(skb, start) ({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); (skb)->len; })
+#define NFA_NEST_CANCEL(skb, start) ({ if (start) skb_trim(skb, (unsigned char *) (start) - (skb)->data); -1; })
+
+struct nfgenmsg {
+ u_int8_t nfgen_family;
+ u_int8_t version;
+ u_int16_t res_id;
+} __attribute__ ((packed));
+
+#define NFNETLINK_V0 0
+
+#define NFM_NFA(n) ((struct nfattr *)(((char *)(n)) + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+#define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+
+#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
+#define NFNL_MSG_TYPE(x) (x & 0x00ff)
+
+#define NFNL_SUBSYS_NONE 0
+#define NFNL_SUBSYS_CTNETLINK 1
+#define NFNL_SUBSYS_CTNETLINK_EXP 2
+#define NFNL_SUBSYS_QUEUE 3
+#define NFNL_SUBSYS_ULOG 4
+#define NFNL_SUBSYS_COUNT 5
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 100644
index 0000000..105dd09
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1,146 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPCONNTRACK_NETLINK_H
+#define _IPCONNTRACK_NETLINK_H
+#include <linux/netfilter/nfnetlink.h>
+
+enum cntl_msg_types {
+ IPCTNL_MSG_CT_NEW,
+ IPCTNL_MSG_CT_GET,
+ IPCTNL_MSG_CT_DELETE,
+ IPCTNL_MSG_CT_GET_CTRZERO,
+
+ IPCTNL_MSG_MAX
+};
+
+enum ctnl_exp_msg_types {
+ IPCTNL_MSG_EXP_NEW,
+ IPCTNL_MSG_EXP_GET,
+ IPCTNL_MSG_EXP_DELETE,
+
+ IPCTNL_MSG_EXP_MAX
+};
+
+enum ctattr_type {
+ CTA_UNSPEC,
+ CTA_TUPLE_ORIG,
+ CTA_TUPLE_REPLY,
+ CTA_STATUS,
+ CTA_PROTOINFO,
+ CTA_HELP,
+ CTA_NAT_SRC,
+#define CTA_NAT CTA_NAT_SRC
+ CTA_TIMEOUT,
+ CTA_MARK,
+ CTA_COUNTERS_ORIG,
+ CTA_COUNTERS_REPLY,
+ CTA_USE,
+ CTA_ID,
+ CTA_NAT_DST,
+ __CTA_MAX
+};
+#define CTA_MAX (__CTA_MAX - 1)
+
+enum ctattr_tuple {
+ CTA_TUPLE_UNSPEC,
+ CTA_TUPLE_IP,
+ CTA_TUPLE_PROTO,
+ __CTA_TUPLE_MAX
+};
+#define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1)
+
+enum ctattr_ip {
+ CTA_IP_UNSPEC,
+ CTA_IP_V4_SRC,
+ CTA_IP_V4_DST,
+ CTA_IP_V6_SRC,
+ CTA_IP_V6_DST,
+ __CTA_IP_MAX
+};
+#define CTA_IP_MAX (__CTA_IP_MAX - 1)
+
+enum ctattr_l4proto {
+ CTA_PROTO_UNSPEC,
+ CTA_PROTO_NUM,
+ CTA_PROTO_SRC_PORT,
+ CTA_PROTO_DST_PORT,
+ CTA_PROTO_ICMP_ID,
+ CTA_PROTO_ICMP_TYPE,
+ CTA_PROTO_ICMP_CODE,
+ CTA_PROTO_ICMPV6_ID,
+ CTA_PROTO_ICMPV6_TYPE,
+ CTA_PROTO_ICMPV6_CODE,
+ __CTA_PROTO_MAX
+};
+#define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1)
+
+enum ctattr_protoinfo {
+ CTA_PROTOINFO_UNSPEC,
+ CTA_PROTOINFO_TCP,
+ __CTA_PROTOINFO_MAX
+};
+#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
+
+enum ctattr_protoinfo_tcp {
+ CTA_PROTOINFO_TCP_UNSPEC,
+ CTA_PROTOINFO_TCP_STATE,
+ __CTA_PROTOINFO_TCP_MAX
+};
+#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
+
+enum ctattr_counters {
+ CTA_COUNTERS_UNSPEC,
+ CTA_COUNTERS_PACKETS,
+ CTA_COUNTERS_BYTES,
+ CTA_COUNTERS32_PACKETS,
+ CTA_COUNTERS32_BYTES,
+ __CTA_COUNTERS_MAX
+};
+#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
+
+enum ctattr_nat {
+ CTA_NAT_UNSPEC,
+ CTA_NAT_MINIP,
+ CTA_NAT_MAXIP,
+ CTA_NAT_PROTO,
+ __CTA_NAT_MAX
+};
+#define CTA_NAT_MAX (__CTA_NAT_MAX - 1)
+
+enum ctattr_protonat {
+ CTA_PROTONAT_UNSPEC,
+ CTA_PROTONAT_PORT_MIN,
+ CTA_PROTONAT_PORT_MAX,
+ __CTA_PROTONAT_MAX
+};
+#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
+
+enum ctattr_expect {
+ CTA_EXPECT_UNSPEC,
+ CTA_EXPECT_MASTER,
+ CTA_EXPECT_TUPLE,
+ CTA_EXPECT_MASK,
+ CTA_EXPECT_TIMEOUT,
+ CTA_EXPECT_ID,
+ CTA_EXPECT_HELP_NAME,
+ __CTA_EXPECT_MAX
+};
+#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
+
+enum ctattr_help {
+ CTA_HELP_UNSPEC,
+ CTA_HELP_NAME,
+ __CTA_HELP_MAX
+};
+#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/x_tables.h
new file mode 100644
index 0000000..234181f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1,125 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _X_TABLES_H
+#define _X_TABLES_H
+
+#define XT_FUNCTION_MAXNAMELEN 30
+#define XT_TABLE_MAXNAMELEN 32
+
+struct xt_entry_match
+{
+ union {
+ struct {
+ u_int16_t match_size;
+
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+ } user;
+ struct {
+ u_int16_t match_size;
+
+ struct xt_match *match;
+ } kernel;
+
+ u_int16_t match_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct xt_entry_target
+{
+ union {
+ struct {
+ u_int16_t target_size;
+
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+ } user;
+ struct {
+ u_int16_t target_size;
+
+ struct xt_target *target;
+ } kernel;
+
+ u_int16_t target_size;
+ } u;
+
+ unsigned char data[0];
+};
+
+struct xt_standard_target
+{
+ struct xt_entry_target target;
+ int verdict;
+};
+
+struct xt_get_revision
+{
+ char name[XT_FUNCTION_MAXNAMELEN-1];
+
+ u_int8_t revision;
+};
+
+#define XT_CONTINUE 0xFFFFFFFF
+
+#define XT_RETURN (-NF_REPEAT - 1)
+
+struct _xt_align
+{
+ u_int8_t u8;
+ u_int16_t u16;
+ u_int32_t u32;
+ u_int64_t u64;
+};
+
+#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) & ~(__alignof__(struct _xt_align)-1))
+
+#define XT_STANDARD_TARGET ""
+
+#define XT_ERROR_TARGET "ERROR"
+
+#define XT_BASE_CTL 64
+
+#define XT_SO_SET_REPLACE (XT_BASE_CTL)
+#define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1)
+#define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS
+
+#define XT_SO_GET_INFO (XT_BASE_CTL)
+#define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1)
+#define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2)
+#define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3)
+#define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
+#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
+
+struct xt_counters
+{
+ u_int64_t pcnt, bcnt;
+};
+
+struct xt_counters_info
+{
+
+ char name[XT_TABLE_MAXNAMELEN];
+
+ unsigned int num_counters;
+
+ struct xt_counters counters[0];
+};
+
+#define XT_INV_PROTO 0x40
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 100644
index 0000000..1e9f61e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CLASSIFY_H
+#define _XT_CLASSIFY_H
+
+struct xt_classify_target_info {
+ u_int32_t priority;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 100644
index 0000000..5e16b2e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNSECMARK_H_target
+#define _XT_CONNSECMARK_H_target
+
+enum {
+ CONNSECMARK_SAVE = 1,
+ CONNSECMARK_RESTORE,
+};
+
+struct xt_connsecmark_target_info {
+ u_int8_t mode;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 100644
index 0000000..1f0cacb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_NFQ_TARGET_H
+#define _XT_NFQ_TARGET_H
+
+struct xt_NFQ_info {
+ u_int16_t queuenum;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 100644
index 0000000..a91d32c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_SECMARK_H_target
+#define _XT_SECMARK_H_target
+
+#define SECMARK_MODE_SEL 0x01
+#define SECMARK_SELCTX_MAX 256
+
+struct xt_secmark_target_selinux_info {
+ u_int32_t selsid;
+ char selctx[SECMARK_SELCTX_MAX];
+};
+
+struct xt_secmark_target_info {
+ u_int8_t mode;
+ union {
+ struct xt_secmark_target_selinux_info sel;
+ } u;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_comment.h
new file mode 100644
index 0000000..6ea26fc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_COMMENT_H
+#define _XT_COMMENT_H
+
+#define XT_MAX_COMMENT_LEN 256
+
+struct xt_comment_info {
+ unsigned char comment[XT_MAX_COMMENT_LEN];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
new file mode 100644
index 0000000..8cc80e1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNBYTES_H
+#define _XT_CONNBYTES_H
+
+enum xt_connbytes_what {
+ XT_CONNBYTES_PKTS,
+ XT_CONNBYTES_BYTES,
+ XT_CONNBYTES_AVGPKT,
+};
+
+enum xt_connbytes_direction {
+ XT_CONNBYTES_DIR_ORIGINAL,
+ XT_CONNBYTES_DIR_REPLY,
+ XT_CONNBYTES_DIR_BOTH,
+};
+
+struct xt_connbytes_info
+{
+ struct {
+ aligned_u64 from;
+ aligned_u64 to;
+ } count;
+ u_int8_t what;
+ u_int8_t direction;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
new file mode 100644
index 0000000..aa9bde2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_CONNTRACK_H
+#define _XT_CONNTRACK_H
+
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+#include <linux/in.h>
+
+#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
+#define XT_CONNTRACK_STATE_INVALID (1 << 0)
+
+#define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
+#define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
+#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
+
+#define XT_CONNTRACK_STATE 0x01
+#define XT_CONNTRACK_PROTO 0x02
+#define XT_CONNTRACK_ORIGSRC 0x04
+#define XT_CONNTRACK_ORIGDST 0x08
+#define XT_CONNTRACK_REPLSRC 0x10
+#define XT_CONNTRACK_REPLDST 0x20
+#define XT_CONNTRACK_STATUS 0x40
+#define XT_CONNTRACK_EXPIRES 0x80
+
+struct ip_conntrack_old_tuple
+{
+ struct {
+ __u32 ip;
+ union {
+ __u16 all;
+ } u;
+ } src;
+
+ struct {
+ __u32 ip;
+ union {
+ __u16 all;
+ } u;
+
+ __u16 protonum;
+ } dst;
+};
+
+struct xt_conntrack_info
+{
+ unsigned int statemask, statusmask;
+
+ struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
+ struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
+
+ unsigned long expires_min, expires_max;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_dccp.h
new file mode 100644
index 0000000..8a10e67
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_DCCP_H_
+#define _XT_DCCP_H_
+
+#define XT_DCCP_SRC_PORTS 0x01
+#define XT_DCCP_DEST_PORTS 0x02
+#define XT_DCCP_TYPE 0x04
+#define XT_DCCP_OPTION 0x08
+
+#define XT_DCCP_VALID_FLAGS 0x0f
+
+struct xt_dccp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int16_t flags;
+ u_int16_t invflags;
+
+ u_int16_t typemask;
+ u_int8_t option;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_esp.h
new file mode 100644
index 0000000..175c47e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_ESP_H
+#define _XT_ESP_H
+
+struct xt_esp
+{
+ u_int32_t spis[2];
+ u_int8_t invflags;
+};
+
+#define XT_ESP_INV_SPI 0x01
+#define XT_ESP_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_helper.h
new file mode 100644
index 0000000..6ffa451
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_HELPER_H
+#define _XT_HELPER_H
+
+struct xt_helper_info {
+ int invert;
+ char name[30];
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_length.h
new file mode 100644
index 0000000..12db6c7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_LENGTH_H
+#define _XT_LENGTH_H
+
+struct xt_length_info {
+ u_int16_t min, max;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_limit.h
new file mode 100644
index 0000000..f9fb37f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_RATE_H
+#define _XT_RATE_H
+
+#define XT_LIMIT_SCALE 10000
+
+struct xt_rateinfo {
+ u_int32_t avg;
+ u_int32_t burst;
+
+ unsigned long prev;
+ u_int32_t credit;
+ u_int32_t credit_cap, cost;
+
+ struct xt_rateinfo *master;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_mac.h
new file mode 100644
index 0000000..2473aab
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_MAC_H
+#define _XT_MAC_H
+
+struct xt_mac_info {
+ unsigned char srcaddr[ETH_ALEN];
+ int invert;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_multiport.h
new file mode 100644
index 0000000..f17979a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_MULTIPORT_H
+#define _XT_MULTIPORT_H
+
+enum xt_multiport_flags
+{
+ XT_MULTIPORT_SOURCE,
+ XT_MULTIPORT_DESTINATION,
+ XT_MULTIPORT_EITHER
+};
+
+#define XT_MULTI_PORTS 15
+
+struct xt_multiport
+{
+ u_int8_t flags;
+ u_int8_t count;
+ u_int16_t ports[XT_MULTI_PORTS];
+};
+
+struct xt_multiport_v1
+{
+ u_int8_t flags;
+ u_int8_t count;
+ u_int16_t ports[XT_MULTI_PORTS];
+ u_int8_t pflags[XT_MULTI_PORTS];
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_physdev.h
new file mode 100644
index 0000000..d0ca032
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_PHYSDEV_H
+#define _XT_PHYSDEV_H
+
+#define XT_PHYSDEV_OP_IN 0x01
+#define XT_PHYSDEV_OP_OUT 0x02
+#define XT_PHYSDEV_OP_BRIDGED 0x04
+#define XT_PHYSDEV_OP_ISIN 0x08
+#define XT_PHYSDEV_OP_ISOUT 0x10
+#define XT_PHYSDEV_OP_MASK (0x20 - 1)
+
+struct xt_physdev_info {
+ char physindev[IFNAMSIZ];
+ char in_mask[IFNAMSIZ];
+ char physoutdev[IFNAMSIZ];
+ char out_mask[IFNAMSIZ];
+ u_int8_t invert;
+ u_int8_t bitmask;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
new file mode 100644
index 0000000..32527b8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_PKTTYPE_H
+#define _XT_PKTTYPE_H
+
+struct xt_pkttype_info {
+ int pkttype;
+ int invert;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_quota.h
new file mode 100644
index 0000000..d34752d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_QUOTA_H
+#define _XT_QUOTA_H
+
+enum xt_quota_flags {
+ XT_QUOTA_INVERT = 0x1,
+};
+#define XT_QUOTA_MASK 0x1
+
+struct xt_quota_info {
+ u_int32_t flags;
+ u_int32_t pad;
+ aligned_u64 quota;
+ struct xt_quota_info *master;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_realm.h
new file mode 100644
index 0000000..1a2a3cf
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_REALM_H
+#define _XT_REALM_H
+
+struct xt_realm_info {
+ u_int32_t id;
+ u_int32_t mask;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_sctp.h
new file mode 100644
index 0000000..f79c3b6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_SCTP_H_
+#define _XT_SCTP_H_
+
+#define XT_SCTP_SRC_PORTS 0x01
+#define XT_SCTP_DEST_PORTS 0x02
+#define XT_SCTP_CHUNK_TYPES 0x04
+
+#define XT_SCTP_VALID_FLAGS 0x07
+
+#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))
+
+struct xt_sctp_flag_info {
+ u_int8_t chunktype;
+ u_int8_t flag;
+ u_int8_t flag_mask;
+};
+
+#define XT_NUM_SCTP_FLAGS 4
+
+struct xt_sctp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int32_t chunkmap[256 / sizeof (u_int32_t)];
+
+#define SCTP_CHUNK_MATCH_ANY 0x01
+#define SCTP_CHUNK_MATCH_ALL 0x02
+#define SCTP_CHUNK_MATCH_ONLY 0x04
+
+ u_int32_t chunk_match_type;
+ struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS];
+ int flag_count;
+
+ u_int32_t flags;
+ u_int32_t invflags;
+};
+
+#define bytes(type) (sizeof(type) * 8)
+
+#define SCTP_CHUNKMAP_SET(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] |= 1 << (type % bytes(u_int32_t)); } while (0)
+
+#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] &= ~(1 << (type % bytes(u_int32_t))); } while (0)
+
+#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) ({ (chunkmap[type / bytes (u_int32_t)] & (1 << (type % bytes (u_int32_t)))) ? 1: 0; })
+
+#define SCTP_CHUNKMAP_RESET(chunkmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) chunkmap[i] = 0; } while (0)
+
+#define SCTP_CHUNKMAP_SET_ALL(chunkmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) chunkmap[i] = ~0; } while (0)
+
+#define SCTP_CHUNKMAP_COPY(destmap, srcmap) do { int i; for (i = 0; i < ELEMCOUNT(chunkmap); i++) destmap[i] = srcmap[i]; } while (0)
+
+#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ELEMCOUNT(chunkmap); i++) { if (chunkmap[i]) { flag = 0; break; } } flag; })
+
+#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ELEMCOUNT(chunkmap); i++) { if (chunkmap[i] != ~0) { flag = 0; break; } } flag; })
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_state.h
new file mode 100644
index 0000000..6754776
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STATE_H
+#define _XT_STATE_H
+
+#define XT_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
+#define XT_STATE_INVALID (1 << 0)
+
+#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1))
+
+struct xt_state_info
+{
+ unsigned int statemask;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_statistic.h
new file mode 100644
index 0000000..999b0a1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STATISTIC_H
+#define _XT_STATISTIC_H
+
+enum xt_statistic_mode {
+ XT_STATISTIC_MODE_RANDOM,
+ XT_STATISTIC_MODE_NTH,
+ __XT_STATISTIC_MODE_MAX
+};
+#define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1)
+
+enum xt_statistic_flags {
+ XT_STATISTIC_INVERT = 0x1,
+};
+#define XT_STATISTIC_MASK 0x1
+
+struct xt_statistic_info {
+ u_int16_t mode;
+ u_int16_t flags;
+ union {
+ struct {
+ u_int32_t probability;
+ } random;
+ struct {
+ u_int32_t every;
+ u_int32_t packet;
+ u_int32_t count;
+ } nth;
+ } u;
+ struct xt_statistic_info *master __attribute__((aligned(8)));
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_string.h
new file mode 100644
index 0000000..a01018f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_STRING_H
+#define _XT_STRING_H
+
+#define XT_STRING_MAX_PATTERN_SIZE 128
+#define XT_STRING_MAX_ALGO_NAME_SIZE 16
+
+struct xt_string_info
+{
+ u_int16_t from_offset;
+ u_int16_t to_offset;
+ char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
+ char pattern[XT_STRING_MAX_PATTERN_SIZE];
+ u_int8_t patlen;
+ u_int8_t invert;
+ struct ts_config __attribute__((aligned(8))) *config;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 100644
index 0000000..33de0ee
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_TCPMSS_MATCH_H
+#define _XT_TCPMSS_MATCH_H
+
+struct xt_tcpmss_match_info {
+ u_int16_t mss_min, mss_max;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 100644
index 0000000..476fffb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XT_TCPUDP_H
+#define _XT_TCPUDP_H
+
+struct xt_tcp
+{
+ u_int16_t spts[2];
+ u_int16_t dpts[2];
+ u_int8_t option;
+ u_int8_t flg_mask;
+ u_int8_t flg_cmp;
+ u_int8_t invflags;
+};
+
+#define XT_TCP_INV_SRCPT 0x01
+#define XT_TCP_INV_DSTPT 0x02
+#define XT_TCP_INV_FLAGS 0x04
+#define XT_TCP_INV_OPTION 0x08
+#define XT_TCP_INV_MASK 0x0F
+
+struct xt_udp
+{
+ u_int16_t spts[2];
+ u_int16_t dpts[2];
+ u_int8_t invflags;
+};
+
+#define XT_UDP_INV_SRCPT 0x01
+#define XT_UDP_INV_DSTPT 0x02
+#define XT_UDP_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp.h
new file mode 100644
index 0000000..08569db
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_ARP_NETFILTER_H
+#define __LINUX_ARP_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NF_ARP 0
+
+#define NF_ARP_IN 0
+#define NF_ARP_OUT 1
+#define NF_ARP_FORWARD 2
+#define NF_ARP_NUMHOOKS 3
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 100644
index 0000000..665a347
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1,159 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARPTABLES_H
+#define _ARPTABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_arp.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
+#define arpt_target xt_target
+#define arpt_table xt_table
+
+#define ARPT_DEV_ADDR_LEN_MAX 16
+
+struct arpt_devaddr_info {
+ char addr[ARPT_DEV_ADDR_LEN_MAX];
+ char mask[ARPT_DEV_ADDR_LEN_MAX];
+};
+
+struct arpt_arp {
+
+ struct in_addr src, tgt;
+
+ struct in_addr smsk, tmsk;
+
+ u_int8_t arhln, arhln_mask;
+ struct arpt_devaddr_info src_devaddr;
+ struct arpt_devaddr_info tgt_devaddr;
+
+ u_int16_t arpop, arpop_mask;
+
+ u_int16_t arhrd, arhrd_mask;
+ u_int16_t arpro, arpro_mask;
+
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int8_t flags;
+
+ u_int16_t invflags;
+};
+
+#define arpt_entry_target xt_entry_target
+#define arpt_standard_target xt_standard_target
+
+#define ARPT_F_MASK 0x00
+
+#define ARPT_INV_VIA_IN 0x0001
+#define ARPT_INV_VIA_OUT 0x0002
+#define ARPT_INV_SRCIP 0x0004
+#define ARPT_INV_TGTIP 0x0008
+#define ARPT_INV_SRCDEVADDR 0x0010
+#define ARPT_INV_TGTDEVADDR 0x0020
+#define ARPT_INV_ARPOP 0x0040
+#define ARPT_INV_ARPHRD 0x0080
+#define ARPT_INV_ARPPRO 0x0100
+#define ARPT_INV_ARPHLN 0x0200
+#define ARPT_INV_MASK 0x03FF
+
+struct arpt_entry
+{
+ struct arpt_arp arp;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define ARPT_CTL_OFFSET 32
+#define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
+#define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
+#define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
+#define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
+
+#define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
+#define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
+
+#define ARPT_CONTINUE XT_CONTINUE
+
+#define ARPT_RETURN XT_RETURN
+
+struct arpt_getinfo
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_ARP_NUMHOOKS];
+
+ unsigned int underflow[NF_ARP_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct arpt_replace
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_ARP_NUMHOOKS];
+
+ unsigned int underflow[NF_ARP_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct arpt_entry entries[0];
+};
+
+#define arpt_counters_info xt_counters_info
+
+struct arpt_get_entries
+{
+
+ char name[ARPT_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct arpt_entry entrytable[0];
+};
+
+#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define ARPT_ERROR_TARGET XT_ERROR_TARGET
+
+#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct arpt_entry *__entry; for (__i = 0; __i < (size); __i += __entry->next_offset) { __entry = (void *)(entries) + __i; __ret = fn(__entry , ## args); if (__ret != 0) break; } __ret; })
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_bridge.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_bridge.h
new file mode 100644
index 0000000..22cca55
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_BRIDGE_NETFILTER_H
+#define __LINUX_BRIDGE_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NF_BR_PRE_ROUTING 0
+
+#define NF_BR_LOCAL_IN 1
+
+#define NF_BR_FORWARD 2
+
+#define NF_BR_LOCAL_OUT 3
+
+#define NF_BR_POST_ROUTING 4
+
+#define NF_BR_BROUTING 5
+#define NF_BR_NUMHOOKS 6
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4.h
new file mode 100644
index 0000000..17fd451
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IP_NETFILTER_H
+#define __LINUX_IP_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NFC_IP_SRC 0x0001
+
+#define NFC_IP_DST 0x0002
+
+#define NFC_IP_IF_IN 0x0004
+
+#define NFC_IP_IF_OUT 0x0008
+
+#define NFC_IP_TOS 0x0010
+
+#define NFC_IP_PROTO 0x0020
+
+#define NFC_IP_OPTIONS 0x0040
+
+#define NFC_IP_FRAG 0x0080
+
+#define NFC_IP_TCPFLAGS 0x0100
+
+#define NFC_IP_SRC_PT 0x0200
+
+#define NFC_IP_DST_PT 0x0400
+
+#define NFC_IP_PROTO_UNKNOWN 0x2000
+
+#define NF_IP_PRE_ROUTING 0
+
+#define NF_IP_LOCAL_IN 1
+
+#define NF_IP_FORWARD 2
+
+#define NF_IP_LOCAL_OUT 3
+
+#define NF_IP_POST_ROUTING 4
+#define NF_IP_NUMHOOKS 5
+
+enum nf_ip_hook_priorities {
+ NF_IP_PRI_FIRST = INT_MIN,
+ NF_IP_PRI_CONNTRACK_DEFRAG = -400,
+ NF_IP_PRI_RAW = -300,
+ NF_IP_PRI_SELINUX_FIRST = -225,
+ NF_IP_PRI_CONNTRACK = -200,
+ NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
+ NF_IP_PRI_MANGLE = -150,
+ NF_IP_PRI_NAT_DST = -100,
+ NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
+ NF_IP_PRI_FILTER = 0,
+ NF_IP_PRI_NAT_SRC = 100,
+ NF_IP_PRI_SELINUX_LAST = 225,
+ NF_IP_PRI_CONNTRACK_HELPER = INT_MAX - 2,
+ NF_IP_PRI_NAT_SEQ_ADJUST = INT_MAX - 1,
+ NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
+ NF_IP_PRI_LAST = INT_MAX,
+};
+
+#define SO_ORIGINAL_DST 80
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 100644
index 0000000..ef55a61
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_CONNTRACK_H
+#define _IP_CONNTRACK_H
+
+#include <linux/netfilter/nf_conntrack_common.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 100644
index 0000000..0c96baf
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_CONNTRACK_TUPLE_H
+#define _IP_CONNTRACK_TUPLE_H
+
+#include <linux/types.h>
+#include <linux/netfilter/nf_conntrack_tuple_common.h>
+
+union ip_conntrack_manip_proto
+{
+
+ u_int16_t all;
+
+ struct {
+ __be16 port;
+ } tcp;
+ struct {
+ u_int16_t port;
+ } udp;
+ struct {
+ u_int16_t id;
+ } icmp;
+ struct {
+ u_int16_t port;
+ } sctp;
+ struct {
+ __be16 key;
+ } gre;
+};
+
+struct ip_conntrack_manip
+{
+ u_int32_t ip;
+ union ip_conntrack_manip_proto u;
+};
+
+struct ip_conntrack_tuple
+{
+ struct ip_conntrack_manip src;
+
+ struct {
+ u_int32_t ip;
+ union {
+
+ u_int16_t all;
+
+ struct {
+ u_int16_t port;
+ } tcp;
+ struct {
+ u_int16_t port;
+ } udp;
+ struct {
+ u_int8_t type, code;
+ } icmp;
+ struct {
+ u_int16_t port;
+ } sctp;
+ struct {
+ __be16 key;
+ } gre;
+ } u;
+
+ u_int8_t protonum;
+
+ u_int8_t dir;
+ } dst;
+};
+
+#define IP_CT_TUPLE_U_BLANK(tuple) do { (tuple)->src.u.all = 0; (tuple)->dst.u.all = 0; } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 100644
index 0000000..7db9da3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_NAT_H
+#define _IP_NAT_H
+#include <linux/netfilter_ipv4.h>
+#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
+
+#define IP_NAT_MAPPING_TYPE_MAX_NAMELEN 16
+
+enum ip_nat_manip_type
+{
+ IP_NAT_MANIP_SRC,
+ IP_NAT_MANIP_DST
+};
+
+#define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
+
+#define IP_NAT_RANGE_MAP_IPS 1
+#define IP_NAT_RANGE_PROTO_SPECIFIED 2
+
+struct ip_nat_seq {
+
+ u_int32_t correction_pos;
+
+ int16_t offset_before, offset_after;
+};
+
+struct ip_nat_range
+{
+
+ unsigned int flags;
+
+ u_int32_t min_ip, max_ip;
+
+ union ip_conntrack_manip_proto min, max;
+};
+
+struct ip_nat_multi_range_compat
+{
+ unsigned int rangesize;
+
+ struct ip_nat_range range[1];
+};
+
+#define ip_nat_multi_range ip_nat_multi_range_compat
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 100644
index 0000000..b9db0b0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_NAT_RULE_H
+#define _IP_NAT_RULE_H
+#include <linux/netfilter_ipv4/ip_conntrack.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ip_nat.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 100644
index 0000000..5d17a54
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP_QUEUE_H
+#define _IP_QUEUE_H
+
+#include <net/if.h>
+
+typedef struct ipq_packet_msg {
+ unsigned long packet_id;
+ unsigned long mark;
+ long timestamp_sec;
+ long timestamp_usec;
+ unsigned int hook;
+ char indev_name[IFNAMSIZ];
+ char outdev_name[IFNAMSIZ];
+ unsigned short hw_protocol;
+ unsigned short hw_type;
+ unsigned char hw_addrlen;
+ unsigned char hw_addr[8];
+ size_t data_len;
+ unsigned char payload[0];
+} ipq_packet_msg_t;
+
+typedef struct ipq_mode_msg {
+ unsigned char value;
+ size_t range;
+} ipq_mode_msg_t;
+
+typedef struct ipq_verdict_msg {
+ unsigned int value;
+ unsigned long id;
+ size_t data_len;
+ unsigned char payload[0];
+} ipq_verdict_msg_t;
+
+typedef struct ipq_peer_msg {
+ union {
+ ipq_verdict_msg_t verdict;
+ ipq_mode_msg_t mode;
+ } msg;
+} ipq_peer_msg_t;
+
+enum {
+ IPQ_COPY_NONE,
+ IPQ_COPY_META,
+ IPQ_COPY_PACKET
+};
+#define IPQ_COPY_MAX IPQ_COPY_PACKET
+
+#define IPQM_BASE 0x10
+#define IPQM_MODE (IPQM_BASE + 1)
+#define IPQM_VERDICT (IPQM_BASE + 2)
+#define IPQM_PACKET (IPQM_BASE + 3)
+#define IPQM_MAX (IPQM_BASE + 4)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 100644
index 0000000..aa48305
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPTABLES_H
+#define _IPTABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_ipv4.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define ipt_match xt_match
+#define ipt_target xt_target
+#define ipt_table xt_table
+#define ipt_get_revision xt_get_revision
+
+struct ipt_ip {
+
+ struct in_addr src, dst;
+
+ struct in_addr smsk, dmsk;
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int16_t proto;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+
+#define ipt_entry_match xt_entry_match
+#define ipt_entry_target xt_entry_target
+#define ipt_standard_target xt_standard_target
+
+#define ipt_counters xt_counters
+
+#define IPT_F_FRAG 0x01
+#define IPT_F_GOTO 0x02
+#define IPT_F_MASK 0x03
+
+#define IPT_INV_VIA_IN 0x01
+#define IPT_INV_VIA_OUT 0x02
+#define IPT_INV_TOS 0x04
+#define IPT_INV_SRCIP 0x08
+#define IPT_INV_DSTIP 0x10
+#define IPT_INV_FRAG 0x20
+#define IPT_INV_PROTO XT_INV_PROTO
+#define IPT_INV_MASK 0x7F
+
+struct ipt_entry
+{
+ struct ipt_ip ip;
+
+ unsigned int nfcache;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define IPT_BASE_CTL XT_BASE_CTL
+
+#define IPT_SO_SET_REPLACE XT_SO_SET_REPLACE
+#define IPT_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
+#define IPT_SO_SET_MAX XT_SO_SET_MAX
+
+#define IPT_SO_GET_INFO XT_SO_GET_INFO
+#define IPT_SO_GET_ENTRIES XT_SO_GET_ENTRIES
+#define IPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
+#define IPT_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
+#define IPT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define IPT_CONTINUE XT_CONTINUE
+#define IPT_RETURN XT_RETURN
+
+#include <linux/netfilter/xt_tcpudp.h>
+#define ipt_udp xt_udp
+#define ipt_tcp xt_tcp
+
+#define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT
+#define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT
+#define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS
+#define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION
+#define IPT_TCP_INV_MASK XT_TCP_INV_MASK
+
+#define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT
+#define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT
+#define IPT_UDP_INV_MASK XT_UDP_INV_MASK
+
+struct ipt_icmp
+{
+ u_int8_t type;
+ u_int8_t code[2];
+ u_int8_t invflags;
+};
+
+#define IPT_ICMP_INV 0x01
+
+struct ipt_getinfo
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_IP_NUMHOOKS];
+
+ unsigned int underflow[NF_IP_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct ipt_replace
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_IP_NUMHOOKS];
+
+ unsigned int underflow[NF_IP_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct ipt_entry entries[0];
+};
+
+#define ipt_counters_info xt_counters_info
+
+struct ipt_get_entries
+{
+
+ char name[IPT_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct ipt_entry entrytable[0];
+};
+
+#define IPT_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define IPT_ERROR_TARGET XT_ERROR_TARGET
+
+static __inline__ struct ipt_entry_target *
+ipt_get_target(struct ipt_entry *e)
+{
+ return (void *)e + e->target_offset;
+}
+
+#define IPT_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ipt_entry_match *__match; for (__i = sizeof(struct ipt_entry); __i < (e)->target_offset; __i += __match->u.match_size) { __match = (void *)(e) + __i; __ret = fn(__match , ## args); if (__ret != 0) break; } __ret; })
+
+#define IPT_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ipt_entry *__entry; for (__i = 0; __i < (size); __i += __entry->next_offset) { __entry = (void *)(entries) + __i; __ret = fn(__entry , ## args); if (__ret != 0) break; } __ret; })
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 100644
index 0000000..a738edd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_CLASSIFY_H
+#define _IPT_CLASSIFY_H
+
+#include <linux/netfilter/xt_CLASSIFY.h>
+#define ipt_classify_target_info xt_classify_target_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 100644
index 0000000..0271fb2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DSCP_TARGET_H
+#define _IPT_DSCP_TARGET_H
+#include <linux/netfilter_ipv4/ipt_dscp.h>
+
+struct ipt_DSCP_info {
+ u_int8_t dscp;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 100644
index 0000000..67c16fe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ECN_TARGET_H
+#define _IPT_ECN_TARGET_H
+#include <linux/netfilter_ipv4/ipt_DSCP.h>
+
+#define IPT_ECN_IP_MASK (~IPT_DSCP_MASK)
+
+#define IPT_ECN_OP_SET_IP 0x01
+#define IPT_ECN_OP_SET_ECE 0x10
+#define IPT_ECN_OP_SET_CWR 0x20
+
+#define IPT_ECN_OP_MASK 0xce
+
+struct ipt_ECN_info {
+ u_int8_t operation;
+ u_int8_t ip_ect;
+ union {
+ struct {
+ u_int8_t ece:1, cwr:1;
+ } tcp;
+ } proto;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 100644
index 0000000..dd6fd1b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_LOG_H
+#define _IPT_LOG_H
+
+#define IPT_LOG_TCPSEQ 0x01
+#define IPT_LOG_TCPOPT 0x02
+#define IPT_LOG_IPOPT 0x04
+#define IPT_LOG_UID 0x08
+#define IPT_LOG_NFLOG 0x10
+#define IPT_LOG_MASK 0x1f
+
+struct ipt_log_info {
+ unsigned char level;
+ unsigned char logflags;
+ char prefix[30];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 100644
index 0000000..27ac4a5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_NFQ_TARGET_H
+#define _IPT_NFQ_TARGET_H
+
+#include <linux/netfilter/xt_NFQUEUE.h>
+
+#define ipt_NFQ_info xt_NFQ_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 100644
index 0000000..d3c3965
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_REJECT_H
+#define _IPT_REJECT_H
+
+enum ipt_reject_with {
+ IPT_ICMP_NET_UNREACHABLE,
+ IPT_ICMP_HOST_UNREACHABLE,
+ IPT_ICMP_PROT_UNREACHABLE,
+ IPT_ICMP_PORT_UNREACHABLE,
+ IPT_ICMP_ECHOREPLY,
+ IPT_ICMP_NET_PROHIBITED,
+ IPT_ICMP_HOST_PROHIBITED,
+ IPT_TCP_RESET,
+ IPT_ICMP_ADMIN_PROHIBITED
+};
+
+struct ipt_reject_info {
+ enum ipt_reject_with with;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 100644
index 0000000..e924f37
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TCPMSS_H
+#define _IPT_TCPMSS_H
+
+struct ipt_tcpmss_info {
+ u_int16_t mss;
+};
+
+#define IPT_TCPMSS_CLAMP_PMTU 0xffff
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 100644
index 0000000..1cc2116
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TOS_H_target
+#define _IPT_TOS_H_target
+
+#ifndef IPTOS_NORMALSVC
+#define IPTOS_NORMALSVC 0
+#endif
+
+struct ipt_tos_target_info {
+ u_int8_t tos;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 100644
index 0000000..f9e98af
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TTL_H
+#define _IPT_TTL_H
+
+enum {
+ IPT_TTL_SET = 0,
+ IPT_TTL_INC,
+ IPT_TTL_DEC
+};
+
+#define IPT_TTL_MAXMODE IPT_TTL_DEC
+
+struct ipt_TTL_info {
+ u_int8_t mode;
+ u_int8_t ttl;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 100644
index 0000000..9511cb8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ULOG_H
+#define _IPT_ULOG_H
+
+#ifndef NETLINK_NFLOG
+#define NETLINK_NFLOG 5
+#endif
+
+#define ULOG_DEFAULT_NLGROUP 1
+#define ULOG_DEFAULT_QTHRESHOLD 1
+
+#define ULOG_MAC_LEN 80
+#define ULOG_PREFIX_LEN 32
+
+#define ULOG_MAX_QLEN 50
+
+struct ipt_ulog_info {
+ unsigned int nl_group;
+ size_t copy_range;
+ size_t qthreshold;
+ char prefix[ULOG_PREFIX_LEN];
+};
+
+typedef struct ulog_packet_msg {
+ unsigned long mark;
+ long timestamp_sec;
+ long timestamp_usec;
+ unsigned int hook;
+ char indev_name[IFNAMSIZ];
+ char outdev_name[IFNAMSIZ];
+ size_t data_len;
+ char prefix[ULOG_PREFIX_LEN];
+ unsigned char mac_len;
+ unsigned char mac[ULOG_MAC_LEN];
+ unsigned char payload[0];
+} ulog_packet_msg_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 100644
index 0000000..5203b32
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ADDRTYPE_H
+#define _IPT_ADDRTYPE_H
+
+struct ipt_addrtype_info {
+ u_int16_t source;
+ u_int16_t dest;
+ u_int32_t invert_source;
+ u_int32_t invert_dest;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 100644
index 0000000..11983e2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_AH_H
+#define _IPT_AH_H
+
+struct ipt_ah
+{
+ u_int32_t spis[2];
+ u_int8_t invflags;
+};
+
+#define IPT_AH_INV_SPI 0x01
+#define IPT_AH_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 100644
index 0000000..dbd7507
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_COMMENT_H
+#define _IPT_COMMENT_H
+
+#include <linux/netfilter/xt_comment.h>
+
+#define IPT_MAX_COMMENT_LEN XT_MAX_COMMENT_LEN
+
+#define ipt_comment_info xt_comment_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 100644
index 0000000..8ae19c5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_CONNBYTES_H
+#define _IPT_CONNBYTES_H
+
+#include <linux/netfilter/xt_connbytes.h>
+#define ipt_connbytes_what xt_connbytes_what
+
+#define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS
+#define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES
+#define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT
+
+#define ipt_connbytes_direction xt_connbytes_direction
+#define IPT_CONNBYTES_DIR_ORIGINAL XT_CONNBYTES_DIR_ORIGINAL
+#define IPT_CONNBYTES_DIR_REPLY XT_CONNBYTES_DIR_REPLY
+#define IPT_CONNBYTES_DIR_BOTH XT_CONNBYTES_DIR_BOTH
+
+#define ipt_connbytes_info xt_connbytes_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 100644
index 0000000..c1212c9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DCCP_H_
+#define _IPT_DCCP_H_
+
+#include <linux/netfilter/xt_dccp.h>
+#define IPT_DCCP_SRC_PORTS XT_DCCP_SRC_PORTS
+#define IPT_DCCP_DEST_PORTS XT_DCCP_DEST_PORTS
+#define IPT_DCCP_TYPE XT_DCCP_TYPE
+#define IPT_DCCP_OPTION XT_DCCP_OPTION
+
+#define IPT_DCCP_VALID_FLAGS XT_DCCP_VALID_FLAGS
+
+#define ipt_dccp_info xt_dccp_info
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 100644
index 0000000..aba8861
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_DSCP_H
+#define _IPT_DSCP_H
+
+#define IPT_DSCP_MASK 0xfc
+#define IPT_DSCP_SHIFT 2
+#define IPT_DSCP_MAX 0x3f
+
+struct ipt_dscp_info {
+ u_int8_t dscp;
+ u_int8_t invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 100644
index 0000000..4947e7e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_ESP_H
+#define _IPT_ESP_H
+
+#include <linux/netfilter/xt_esp.h>
+
+#define ipt_esp xt_esp
+#define IPT_ESP_INV_SPI XT_ESP_INV_SPI
+#define IPT_ESP_INV_MASK XT_ESP_INV_MASK
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 100644
index 0000000..adc1f41
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_HASHLIMIT_H
+#define _IPT_HASHLIMIT_H
+
+#define IPT_HASHLIMIT_SCALE 10000
+
+struct ipt_hashlimit_htable;
+
+#define IPT_HASHLIMIT_HASH_DIP 0x0001
+#define IPT_HASHLIMIT_HASH_DPT 0x0002
+#define IPT_HASHLIMIT_HASH_SIP 0x0004
+#define IPT_HASHLIMIT_HASH_SPT 0x0008
+
+struct hashlimit_cfg {
+ u_int32_t mode;
+ u_int32_t avg;
+ u_int32_t burst;
+
+ u_int32_t size;
+ u_int32_t max;
+ u_int32_t gc_interval;
+ u_int32_t expire;
+};
+
+struct ipt_hashlimit_info {
+ char name [IFNAMSIZ];
+ struct hashlimit_cfg cfg;
+ struct ipt_hashlimit_htable *hinfo;
+
+ union {
+ void *ptr;
+ struct ipt_hashlimit_info *master;
+ } u;
+};
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 100644
index 0000000..576add9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_HELPER_H
+#define _IPT_HELPER_H
+
+#include <linux/netfilter/xt_helper.h>
+#define ipt_helper_info xt_helper_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 100644
index 0000000..b4dd603
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_IPRANGE_H
+#define _IPT_IPRANGE_H
+
+#define IPRANGE_SRC 0x01
+#define IPRANGE_DST 0x02
+#define IPRANGE_SRC_INV 0x10
+#define IPRANGE_DST_INV 0x20
+
+struct ipt_iprange {
+
+ u_int32_t min_ip, max_ip;
+};
+
+struct ipt_iprange_info
+{
+ struct ipt_iprange src;
+ struct ipt_iprange dst;
+
+ u_int8_t flags;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 100644
index 0000000..9610859
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_LENGTH_H
+#define _IPT_LENGTH_H
+
+#include <linux/netfilter/xt_length.h>
+#define ipt_length_info xt_length_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 100644
index 0000000..89378a3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_MAC_H
+#define _IPT_MAC_H
+
+#include <linux/netfilter/xt_mac.h>
+#define ipt_mac_info xt_mac_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 100644
index 0000000..8b742b1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_OWNER_H
+#define _IPT_OWNER_H
+
+#define IPT_OWNER_UID 0x01
+#define IPT_OWNER_GID 0x02
+#define IPT_OWNER_PID 0x04
+#define IPT_OWNER_SID 0x08
+#define IPT_OWNER_COMM 0x10
+
+struct ipt_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ char comm[16];
+ u_int8_t match, invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 100644
index 0000000..791cf02
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_PHYSDEV_H
+#define _IPT_PHYSDEV_H
+
+#include <linux/netfilter/xt_physdev.h>
+
+#define IPT_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
+#define IPT_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
+#define IPT_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
+#define IPT_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
+#define IPT_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
+#define IPT_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
+
+#define ipt_physdev_info xt_physdev_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 100644
index 0000000..fbb20b1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_PKTTYPE_H
+#define _IPT_PKTTYPE_H
+
+#include <linux/netfilter/xt_pkttype.h>
+#define ipt_pkttype_info xt_pkttype_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 100644
index 0000000..9b80faa
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_REALM_H
+#define _IPT_REALM_H
+
+#include <linux/netfilter/xt_realm.h>
+#define ipt_realm_info xt_realm_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 100644
index 0000000..45172bd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_RECENT_H
+#define _IPT_RECENT_H
+
+#define RECENT_NAME "ipt_recent"
+#define RECENT_VER "v0.3.1"
+
+#define IPT_RECENT_CHECK 1
+#define IPT_RECENT_SET 2
+#define IPT_RECENT_UPDATE 4
+#define IPT_RECENT_REMOVE 8
+#define IPT_RECENT_TTL 16
+
+#define IPT_RECENT_SOURCE 0
+#define IPT_RECENT_DEST 1
+
+#define IPT_RECENT_NAME_LEN 200
+
+struct ipt_recent_info {
+ u_int32_t seconds;
+ u_int32_t hit_count;
+ u_int8_t check_set;
+ u_int8_t invert;
+ char name[IPT_RECENT_NAME_LEN];
+ u_int8_t side;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 100644
index 0000000..20f301f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_SCTP_H_
+#define _IPT_SCTP_H_
+
+#define IPT_SCTP_SRC_PORTS 0x01
+#define IPT_SCTP_DEST_PORTS 0x02
+#define IPT_SCTP_CHUNK_TYPES 0x04
+
+#define IPT_SCTP_VALID_FLAGS 0x07
+
+struct ipt_sctp_flag_info {
+ u_int8_t chunktype;
+ u_int8_t flag;
+ u_int8_t flag_mask;
+};
+
+#define IPT_NUM_SCTP_FLAGS 4
+
+struct ipt_sctp_info {
+ u_int16_t dpts[2];
+ u_int16_t spts[2];
+
+ u_int32_t chunkmap[256 / sizeof (u_int32_t)];
+
+#define SCTP_CHUNK_MATCH_ANY 0x01
+#define SCTP_CHUNK_MATCH_ALL 0x02
+#define SCTP_CHUNK_MATCH_ONLY 0x04
+
+ u_int32_t chunk_match_type;
+ struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS];
+ int flag_count;
+
+ u_int32_t flags;
+ u_int32_t invflags;
+};
+
+#define bytes(type) (sizeof(type) * 8)
+
+#define SCTP_CHUNKMAP_SET(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] |= 1 << (type % bytes(u_int32_t)); } while (0)
+
+#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) do { chunkmap[type / bytes(u_int32_t)] &= ~(1 << (type % bytes(u_int32_t))); } while (0)
+
+#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) ({ (chunkmap[type / bytes (u_int32_t)] & (1 << (type % bytes (u_int32_t)))) ? 1: 0; })
+
+#define SCTP_CHUNKMAP_RESET(chunkmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) chunkmap[i] = 0; } while (0)
+
+#define SCTP_CHUNKMAP_SET_ALL(chunkmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) chunkmap[i] = ~0; } while (0)
+
+#define SCTP_CHUNKMAP_COPY(destmap, srcmap) do { int i; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) destmap[i] = srcmap[i]; } while (0)
+
+#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { if (chunkmap[i]) { flag = 0; break; } } flag; })
+
+#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) ({ int i; int flag = 1; for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { if (chunkmap[i] != ~0) { flag = 0; break; } } flag; })
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 100644
index 0000000..bd51990
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_STATE_H
+#define _IPT_STATE_H
+
+#include <linux/netfilter/xt_state.h>
+
+#define IPT_STATE_BIT XT_STATE_BIT
+#define IPT_STATE_INVALID XT_STATE_INVALID
+
+#define IPT_STATE_UNTRACKED XT_STATE_UNTRACKED
+
+#define ipt_state_info xt_state_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 100644
index 0000000..60923dd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_STRING_H
+#define _IPT_STRING_H
+
+#include <linux/netfilter/xt_string.h>
+
+#define IPT_STRING_MAX_PATTERN_SIZE XT_STRING_MAX_PATTERN_SIZE
+#define IPT_STRING_MAX_ALGO_NAME_SIZE XT_STRING_MAX_ALGO_NAME_SIZE
+#define ipt_string_info xt_string_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 100644
index 0000000..789ce22
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IPT_TOS_H
+#define _IPT_TOS_H
+
+struct ipt_tos_info {
+ u_int8_t tos;
+ u_int8_t invert;
+};
+
+#ifndef IPTOS_NORMALSVC
+#define IPTOS_NORMALSVC 0
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6.h
new file mode 100644
index 0000000..0d68cd9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_IP6_NETFILTER_H
+#define __LINUX_IP6_NETFILTER_H
+
+#include <linux/netfilter.h>
+
+#define NFC_IP6_SRC 0x0001
+
+#define NFC_IP6_DST 0x0002
+
+#define NFC_IP6_IF_IN 0x0004
+
+#define NFC_IP6_IF_OUT 0x0008
+
+#define NFC_IP6_TOS 0x0010
+
+#define NFC_IP6_PROTO 0x0020
+
+#define NFC_IP6_OPTIONS 0x0040
+
+#define NFC_IP6_FRAG 0x0080
+
+#define NFC_IP6_TCPFLAGS 0x0100
+
+#define NFC_IP6_SRC_PT 0x0200
+
+#define NFC_IP6_DST_PT 0x0400
+
+#define NFC_IP6_PROTO_UNKNOWN 0x2000
+
+#define NF_IP6_PRE_ROUTING 0
+
+#define NF_IP6_LOCAL_IN 1
+
+#define NF_IP6_FORWARD 2
+
+#define NF_IP6_LOCAL_OUT 3
+
+#define NF_IP6_POST_ROUTING 4
+#define NF_IP6_NUMHOOKS 5
+
+enum nf_ip6_hook_priorities {
+ NF_IP6_PRI_FIRST = INT_MIN,
+ NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
+ NF_IP6_PRI_SELINUX_FIRST = -225,
+ NF_IP6_PRI_CONNTRACK = -200,
+ NF_IP6_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
+ NF_IP6_PRI_MANGLE = -150,
+ NF_IP6_PRI_NAT_DST = -100,
+ NF_IP6_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
+ NF_IP6_PRI_FILTER = 0,
+ NF_IP6_PRI_NAT_SRC = 100,
+ NF_IP6_PRI_SELINUX_LAST = 225,
+ NF_IP6_PRI_LAST = INT_MAX,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 100644
index 0000000..1687e4f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1,178 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6_TABLES_H
+#define _IP6_TABLES_H
+
+#include <linux/compiler.h>
+#include <linux/netfilter_ipv6.h>
+
+#include <linux/netfilter/x_tables.h>
+
+#define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
+
+#define ip6t_match xt_match
+#define ip6t_target xt_target
+#define ip6t_table xt_table
+#define ip6t_get_revision xt_get_revision
+
+struct ip6t_ip6 {
+
+ struct in6_addr src, dst;
+
+ struct in6_addr smsk, dmsk;
+ char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
+ unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
+
+ u_int16_t proto;
+
+ u_int8_t tos;
+
+ u_int8_t flags;
+
+ u_int8_t invflags;
+};
+
+#define ip6t_entry_match xt_entry_match
+#define ip6t_entry_target xt_entry_target
+#define ip6t_standard_target xt_standard_target
+
+#define ip6t_counters xt_counters
+
+#define IP6T_F_PROTO 0x01
+#define IP6T_F_TOS 0x02
+#define IP6T_F_GOTO 0x04
+#define IP6T_F_MASK 0x07
+
+#define IP6T_INV_VIA_IN 0x01
+#define IP6T_INV_VIA_OUT 0x02
+#define IP6T_INV_TOS 0x04
+#define IP6T_INV_SRCIP 0x08
+#define IP6T_INV_DSTIP 0x10
+#define IP6T_INV_FRAG 0x20
+#define IP6T_INV_PROTO XT_INV_PROTO
+#define IP6T_INV_MASK 0x7F
+
+struct ip6t_entry
+{
+ struct ip6t_ip6 ipv6;
+
+ unsigned int nfcache;
+
+ u_int16_t target_offset;
+
+ u_int16_t next_offset;
+
+ unsigned int comefrom;
+
+ struct xt_counters counters;
+
+ unsigned char elems[0];
+};
+
+#define IP6T_BASE_CTL XT_BASE_CTL
+
+#define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE
+#define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
+#define IP6T_SO_SET_MAX XT_SO_SET_MAX
+
+#define IP6T_SO_GET_INFO XT_SO_GET_INFO
+#define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES
+#define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
+#define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
+#define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET
+
+#define IP6T_CONTINUE XT_CONTINUE
+
+#define IP6T_RETURN XT_RETURN
+
+#include <linux/netfilter/xt_tcpudp.h>
+
+#define ip6t_tcp xt_tcp
+#define ip6t_udp xt_udp
+
+#define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT
+#define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT
+#define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS
+#define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION
+#define IP6T_TCP_INV_MASK XT_TCP_INV_MASK
+
+#define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT
+#define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT
+#define IP6T_UDP_INV_MASK XT_UDP_INV_MASK
+
+struct ip6t_icmp
+{
+ u_int8_t type;
+ u_int8_t code[2];
+ u_int8_t invflags;
+};
+
+#define IP6T_ICMP_INV 0x01
+
+struct ip6t_getinfo
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ unsigned int num_entries;
+
+ unsigned int size;
+};
+
+struct ip6t_replace
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int valid_hooks;
+
+ unsigned int num_entries;
+
+ unsigned int size;
+
+ unsigned int hook_entry[NF_IP6_NUMHOOKS];
+
+ unsigned int underflow[NF_IP6_NUMHOOKS];
+
+ unsigned int num_counters;
+
+ struct xt_counters __user *counters;
+
+ struct ip6t_entry entries[0];
+};
+
+#define ip6t_counters_info xt_counters_info
+
+struct ip6t_get_entries
+{
+
+ char name[IP6T_TABLE_MAXNAMELEN];
+
+ unsigned int size;
+
+ struct ip6t_entry entrytable[0];
+};
+
+#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET
+
+#define IP6T_ERROR_TARGET XT_ERROR_TARGET
+
+#define IP6T_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry_match *__m; for (__i = sizeof(struct ip6t_entry); __i < (e)->target_offset; __i += __m->u.match_size) { __m = (void *)(e) + __i; __ret = fn(__m , ## args); if (__ret != 0) break; } __ret; })
+#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry *__e; for (__i = 0; __i < (size); __i += __e->next_offset) { __e = (void *)(entries) + __i; __ret = fn(__e , ## args); if (__ret != 0) break; } __ret; })
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 100644
index 0000000..344c133
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_LOG_H
+#define _IP6T_LOG_H
+
+#define IP6T_LOG_TCPSEQ 0x01
+#define IP6T_LOG_TCPOPT 0x02
+#define IP6T_LOG_IPOPT 0x04
+#define IP6T_LOG_UID 0x08
+#define IP6T_LOG_NFLOG 0x10
+#define IP6T_LOG_MASK 0x1f
+
+struct ip6t_log_info {
+ unsigned char level;
+ unsigned char logflags;
+ char prefix[30];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 100644
index 0000000..b101c85
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_REJECT_H
+#define _IP6T_REJECT_H
+
+enum ip6t_reject_with {
+ IP6T_ICMP6_NO_ROUTE,
+ IP6T_ICMP6_ADM_PROHIBITED,
+ IP6T_ICMP6_NOT_NEIGHBOUR,
+ IP6T_ICMP6_ADDR_UNREACH,
+ IP6T_ICMP6_PORT_UNREACH,
+ IP6T_ICMP6_ECHOREPLY,
+ IP6T_TCP_RESET
+};
+
+struct ip6t_reject_info {
+ u_int32_t with;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 100644
index 0000000..7110df5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_AH_H
+#define _IP6T_AH_H
+
+struct ip6t_ah
+{
+ u_int32_t spis[2];
+ u_int32_t hdrlen;
+ u_int8_t hdrres;
+ u_int8_t invflags;
+};
+
+#define IP6T_AH_SPI 0x01
+#define IP6T_AH_LEN 0x02
+#define IP6T_AH_RES 0x04
+
+#define IP6T_AH_INV_SPI 0x01
+#define IP6T_AH_INV_LEN 0x02
+#define IP6T_AH_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 100644
index 0000000..0aa7556
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_ESP_H
+#define _IP6T_ESP_H
+
+#include <linux/netfilter/xt_esp.h>
+
+#define ip6t_esp xt_esp
+#define IP6T_ESP_INV_SPI XT_ESP_INV_SPI
+#define IP6T_ESP_INV_MASK XT_ESP_INV_MASK
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 100644
index 0000000..134d6bb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_FRAG_H
+#define _IP6T_FRAG_H
+
+struct ip6t_frag
+{
+ u_int32_t ids[2];
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+};
+
+#define IP6T_FRAG_IDS 0x01
+#define IP6T_FRAG_LEN 0x02
+#define IP6T_FRAG_RES 0x04
+#define IP6T_FRAG_FST 0x08
+#define IP6T_FRAG_MF 0x10
+#define IP6T_FRAG_NMF 0x20
+
+#define IP6T_FRAG_INV_IDS 0x01
+#define IP6T_FRAG_INV_LEN 0x02
+#define IP6T_FRAG_INV_MASK 0x03
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 100644
index 0000000..7e83ebc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __IPV6HEADER_H
+#define __IPV6HEADER_H
+
+struct ip6t_ipv6header_info
+{
+ u_int8_t matchflags;
+ u_int8_t invflags;
+ u_int8_t modeflag;
+};
+
+#define MASK_HOPOPTS 128
+#define MASK_DSTOPTS 64
+#define MASK_ROUTING 32
+#define MASK_FRAGMENT 16
+#define MASK_AH 8
+#define MASK_ESP 4
+#define MASK_NONE 2
+#define MASK_PROTO 1
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 100644
index 0000000..fdc4c5f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_LENGTH_H
+#define _IP6T_LENGTH_H
+
+#include <linux/netfilter/xt_length.h>
+#define ip6t_length_info xt_length_info
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 100644
index 0000000..58e6023
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_MAC_H
+#define _IP6T_MAC_H
+
+#include <linux/netfilter/xt_mac.h>
+#define ip6t_mac_info xt_mac_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 100644
index 0000000..1d9db9c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_OPTS_H
+#define _IP6T_OPTS_H
+
+#define IP6T_OPTS_OPTSNR 16
+
+struct ip6t_opts
+{
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+ u_int16_t opts[IP6T_OPTS_OPTSNR];
+ u_int8_t optsnr;
+};
+
+#define IP6T_OPTS_LEN 0x01
+#define IP6T_OPTS_OPTS 0x02
+#define IP6T_OPTS_NSTRICT 0x04
+
+#define IP6T_OPTS_INV_LEN 0x01
+#define IP6T_OPTS_INV_MASK 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 100644
index 0000000..a6126b4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_OWNER_H
+#define _IP6T_OWNER_H
+
+#define IP6T_OWNER_UID 0x01
+#define IP6T_OWNER_GID 0x02
+#define IP6T_OWNER_PID 0x04
+#define IP6T_OWNER_SID 0x08
+
+struct ip6t_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ u_int8_t match, invert;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 100644
index 0000000..657e2fb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_PHYSDEV_H
+#define _IP6T_PHYSDEV_H
+
+#include <linux/netfilter/xt_physdev.h>
+
+#define IP6T_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
+#define IP6T_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
+#define IP6T_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
+#define IP6T_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
+#define IP6T_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
+#define IP6T_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
+
+#define ip6t_physdev_info xt_physdev_info
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 100644
index 0000000..274a7ee
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _IP6T_RT_H
+#define _IP6T_RT_H
+
+#define IP6T_RT_HOPS 16
+
+struct ip6t_rt
+{
+ u_int32_t rt_type;
+ u_int32_t segsleft[2];
+ u_int32_t hdrlen;
+ u_int8_t flags;
+ u_int8_t invflags;
+ struct in6_addr addrs[IP6T_RT_HOPS];
+ u_int8_t addrnr;
+};
+
+#define IP6T_RT_TYP 0x01
+#define IP6T_RT_SGS 0x02
+#define IP6T_RT_LEN 0x04
+#define IP6T_RT_RES 0x08
+#define IP6T_RT_FST_MASK 0x30
+#define IP6T_RT_FST 0x10
+#define IP6T_RT_FST_NSTRICT 0x20
+
+#define IP6T_RT_INV_TYP 0x01
+#define IP6T_RT_INV_SGS 0x02
+#define IP6T_RT_INV_LEN 0x04
+#define IP6T_RT_INV_MASK 0x07
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/netlink.h b/6/platforms/android-3/arch-x86/usr/include/linux/netlink.h
new file mode 100644
index 0000000..b6f1c06
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/netlink.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NETLINK_H
+#define __LINUX_NETLINK_H
+
+#include <linux/socket.h>
+#include <linux/types.h>
+
+#define NETLINK_ROUTE 0
+#define NETLINK_UNUSED 1
+#define NETLINK_USERSOCK 2
+#define NETLINK_FIREWALL 3
+#define NETLINK_INET_DIAG 4
+#define NETLINK_NFLOG 5
+#define NETLINK_XFRM 6
+#define NETLINK_SELINUX 7
+#define NETLINK_ISCSI 8
+#define NETLINK_AUDIT 9
+#define NETLINK_FIB_LOOKUP 10
+#define NETLINK_CONNECTOR 11
+#define NETLINK_NETFILTER 12
+#define NETLINK_IP6_FW 13
+#define NETLINK_DNRTMSG 14
+#define NETLINK_KOBJECT_UEVENT 15
+#define NETLINK_GENERIC 16
+
+#define MAX_LINKS 32
+
+struct sockaddr_nl
+{
+ sa_family_t nl_family;
+ unsigned short nl_pad;
+ __u32 nl_pid;
+ __u32 nl_groups;
+};
+
+struct nlmsghdr
+{
+ __u32 nlmsg_len;
+ __u16 nlmsg_type;
+ __u16 nlmsg_flags;
+ __u32 nlmsg_seq;
+ __u32 nlmsg_pid;
+};
+
+#define NLM_F_REQUEST 1
+#define NLM_F_MULTI 2
+#define NLM_F_ACK 4
+#define NLM_F_ECHO 8
+
+#define NLM_F_ROOT 0x100
+#define NLM_F_MATCH 0x200
+#define NLM_F_ATOMIC 0x400
+#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)
+
+#define NLM_F_REPLACE 0x100
+#define NLM_F_EXCL 0x200
+#define NLM_F_CREATE 0x400
+#define NLM_F_APPEND 0x800
+
+#define NLMSG_ALIGNTO 4
+#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
+#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
+#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
+#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
+#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
+#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
+#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len))
+#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
+
+#define NLMSG_NOOP 0x1
+#define NLMSG_ERROR 0x2
+#define NLMSG_DONE 0x3
+#define NLMSG_OVERRUN 0x4
+
+#define NLMSG_MIN_TYPE 0x10
+
+struct nlmsgerr
+{
+ int error;
+ struct nlmsghdr msg;
+};
+
+#define NETLINK_ADD_MEMBERSHIP 1
+#define NETLINK_DROP_MEMBERSHIP 2
+#define NETLINK_PKTINFO 3
+
+struct nl_pktinfo
+{
+ __u32 group;
+};
+
+#define NET_MAJOR 36
+
+enum {
+ NETLINK_UNCONNECTED = 0,
+ NETLINK_CONNECTED,
+};
+
+struct nlattr
+{
+ __u16 nla_len;
+ __u16 nla_type;
+};
+
+#define NLA_ALIGNTO 4
+#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
+#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfs.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfs.h
new file mode 100644
index 0000000..d94dc9f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfs.h
@@ -0,0 +1,124 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS_H
+#define _LINUX_NFS_H
+
+#define NFS_PROGRAM 100003
+#define NFS_PORT 2049
+#define NFS_MAXDATA 8192
+#define NFS_MAXPATHLEN 1024
+#define NFS_MAXNAMLEN 255
+#define NFS_MAXGROUPS 16
+#define NFS_FHSIZE 32
+#define NFS_COOKIESIZE 4
+#define NFS_FIFO_DEV (-1)
+#define NFSMODE_FMT 0170000
+#define NFSMODE_DIR 0040000
+#define NFSMODE_CHR 0020000
+#define NFSMODE_BLK 0060000
+#define NFSMODE_REG 0100000
+#define NFSMODE_LNK 0120000
+#define NFSMODE_SOCK 0140000
+#define NFSMODE_FIFO 0010000
+
+#define NFS_MNT_PROGRAM 100005
+#define NFS_MNT_PORT 627
+
+ enum nfs_stat {
+ NFS_OK = 0,
+ NFSERR_PERM = 1,
+ NFSERR_NOENT = 2,
+ NFSERR_IO = 5,
+ NFSERR_NXIO = 6,
+ NFSERR_EAGAIN = 11,
+ NFSERR_ACCES = 13,
+ NFSERR_EXIST = 17,
+ NFSERR_XDEV = 18,
+ NFSERR_NODEV = 19,
+ NFSERR_NOTDIR = 20,
+ NFSERR_ISDIR = 21,
+ NFSERR_INVAL = 22,
+ NFSERR_FBIG = 27,
+ NFSERR_NOSPC = 28,
+ NFSERR_ROFS = 30,
+ NFSERR_MLINK = 31,
+ NFSERR_OPNOTSUPP = 45,
+ NFSERR_NAMETOOLONG = 63,
+ NFSERR_NOTEMPTY = 66,
+ NFSERR_DQUOT = 69,
+ NFSERR_STALE = 70,
+ NFSERR_REMOTE = 71,
+ NFSERR_WFLUSH = 99,
+ NFSERR_BADHANDLE = 10001,
+ NFSERR_NOT_SYNC = 10002,
+ NFSERR_BAD_COOKIE = 10003,
+ NFSERR_NOTSUPP = 10004,
+ NFSERR_TOOSMALL = 10005,
+ NFSERR_SERVERFAULT = 10006,
+ NFSERR_BADTYPE = 10007,
+ NFSERR_JUKEBOX = 10008,
+ NFSERR_SAME = 10009,
+ NFSERR_DENIED = 10010,
+ NFSERR_EXPIRED = 10011,
+ NFSERR_LOCKED = 10012,
+ NFSERR_GRACE = 10013,
+ NFSERR_FHEXPIRED = 10014,
+ NFSERR_SHARE_DENIED = 10015,
+ NFSERR_WRONGSEC = 10016,
+ NFSERR_CLID_INUSE = 10017,
+ NFSERR_RESOURCE = 10018,
+ NFSERR_MOVED = 10019,
+ NFSERR_NOFILEHANDLE = 10020,
+ NFSERR_MINOR_VERS_MISMATCH = 10021,
+ NFSERR_STALE_CLIENTID = 10022,
+ NFSERR_STALE_STATEID = 10023,
+ NFSERR_OLD_STATEID = 10024,
+ NFSERR_BAD_STATEID = 10025,
+ NFSERR_BAD_SEQID = 10026,
+ NFSERR_NOT_SAME = 10027,
+ NFSERR_LOCK_RANGE = 10028,
+ NFSERR_SYMLINK = 10029,
+ NFSERR_RESTOREFH = 10030,
+ NFSERR_LEASE_MOVED = 10031,
+ NFSERR_ATTRNOTSUPP = 10032,
+ NFSERR_NO_GRACE = 10033,
+ NFSERR_RECLAIM_BAD = 10034,
+ NFSERR_RECLAIM_CONFLICT = 10035,
+ NFSERR_BAD_XDR = 10036,
+ NFSERR_LOCKS_HELD = 10037,
+ NFSERR_OPENMODE = 10038,
+ NFSERR_BADOWNER = 10039,
+ NFSERR_BADCHAR = 10040,
+ NFSERR_BADNAME = 10041,
+ NFSERR_BAD_RANGE = 10042,
+ NFSERR_LOCK_NOTSUPP = 10043,
+ NFSERR_OP_ILLEGAL = 10044,
+ NFSERR_DEADLOCK = 10045,
+ NFSERR_FILE_OPEN = 10046,
+ NFSERR_ADMIN_REVOKED = 10047,
+ NFSERR_CB_PATH_DOWN = 10048,
+ NFSERR_REPLAY_ME = 10049
+};
+
+enum nfs_ftype {
+ NFNON = 0,
+ NFREG = 1,
+ NFDIR = 2,
+ NFBLK = 3,
+ NFCHR = 4,
+ NFLNK = 5,
+ NFSOCK = 6,
+ NFBAD = 7,
+ NFFIFO = 8
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfs2.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfs2.h
new file mode 100644
index 0000000..1bb5df2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfs2.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS2_H
+#define _LINUX_NFS2_H
+
+#define NFS2_PORT 2049
+#define NFS2_MAXDATA 8192
+#define NFS2_MAXPATHLEN 1024
+#define NFS2_MAXNAMLEN 255
+#define NFS2_MAXGROUPS 16
+#define NFS2_FHSIZE 32
+#define NFS2_COOKIESIZE 4
+#define NFS2_FIFO_DEV (-1)
+#define NFS2MODE_FMT 0170000
+#define NFS2MODE_DIR 0040000
+#define NFS2MODE_CHR 0020000
+#define NFS2MODE_BLK 0060000
+#define NFS2MODE_REG 0100000
+#define NFS2MODE_LNK 0120000
+#define NFS2MODE_SOCK 0140000
+#define NFS2MODE_FIFO 0010000
+
+enum nfs2_ftype {
+ NF2NON = 0,
+ NF2REG = 1,
+ NF2DIR = 2,
+ NF2BLK = 3,
+ NF2CHR = 4,
+ NF2LNK = 5,
+ NF2SOCK = 6,
+ NF2BAD = 7,
+ NF2FIFO = 8
+};
+
+struct nfs2_fh {
+ char data[NFS2_FHSIZE];
+};
+
+#define NFS2_VERSION 2
+#define NFSPROC_NULL 0
+#define NFSPROC_GETATTR 1
+#define NFSPROC_SETATTR 2
+#define NFSPROC_ROOT 3
+#define NFSPROC_LOOKUP 4
+#define NFSPROC_READLINK 5
+#define NFSPROC_READ 6
+#define NFSPROC_WRITECACHE 7
+#define NFSPROC_WRITE 8
+#define NFSPROC_CREATE 9
+#define NFSPROC_REMOVE 10
+#define NFSPROC_RENAME 11
+#define NFSPROC_LINK 12
+#define NFSPROC_SYMLINK 13
+#define NFSPROC_MKDIR 14
+#define NFSPROC_RMDIR 15
+#define NFSPROC_READDIR 16
+#define NFSPROC_STATFS 17
+
+#define NFS_MNT_PROGRAM 100005
+#define NFS_MNT_VERSION 1
+#define MNTPROC_NULL 0
+#define MNTPROC_MNT 1
+#define MNTPROC_UMNT 3
+#define MNTPROC_UMNTALL 4
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfs3.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfs3.h
new file mode 100644
index 0000000..8303459
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfs3.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS3_H
+#define _LINUX_NFS3_H
+
+#define NFS3_PORT 2049
+#define NFS3_MAXDATA 32768
+#define NFS3_MAXPATHLEN PATH_MAX
+#define NFS3_MAXNAMLEN NAME_MAX
+#define NFS3_MAXGROUPS 16
+#define NFS3_FHSIZE 64
+#define NFS3_COOKIESIZE 4
+#define NFS3_FIFO_DEV (-1)
+#define NFS3MODE_FMT 0170000
+#define NFS3MODE_DIR 0040000
+#define NFS3MODE_CHR 0020000
+#define NFS3MODE_BLK 0060000
+#define NFS3MODE_REG 0100000
+#define NFS3MODE_LNK 0120000
+#define NFS3MODE_SOCK 0140000
+#define NFS3MODE_FIFO 0010000
+
+#define NFS3_ACCESS_READ 0x0001
+#define NFS3_ACCESS_LOOKUP 0x0002
+#define NFS3_ACCESS_MODIFY 0x0004
+#define NFS3_ACCESS_EXTEND 0x0008
+#define NFS3_ACCESS_DELETE 0x0010
+#define NFS3_ACCESS_EXECUTE 0x0020
+#define NFS3_ACCESS_FULL 0x003f
+
+enum nfs3_createmode {
+ NFS3_CREATE_UNCHECKED = 0,
+ NFS3_CREATE_GUARDED = 1,
+ NFS3_CREATE_EXCLUSIVE = 2
+};
+
+#define NFS3_FSF_LINK 0x0001
+#define NFS3_FSF_SYMLINK 0x0002
+#define NFS3_FSF_HOMOGENEOUS 0x0008
+#define NFS3_FSF_CANSETTIME 0x0010
+
+#define NFS3_FSF_DEFAULT 0x001B
+#define NFS3_FSF_BILLYBOY 0x0018
+#define NFS3_FSF_READONLY 0x0008
+
+enum nfs3_ftype {
+ NF3NON = 0,
+ NF3REG = 1,
+ NF3DIR = 2,
+ NF3BLK = 3,
+ NF3CHR = 4,
+ NF3LNK = 5,
+ NF3SOCK = 6,
+ NF3FIFO = 7,
+ NF3BAD = 8
+};
+
+struct nfs3_fh {
+ unsigned short size;
+ unsigned char data[NFS3_FHSIZE];
+};
+
+#define NFS3_VERSION 3
+#define NFS3PROC_NULL 0
+#define NFS3PROC_GETATTR 1
+#define NFS3PROC_SETATTR 2
+#define NFS3PROC_LOOKUP 3
+#define NFS3PROC_ACCESS 4
+#define NFS3PROC_READLINK 5
+#define NFS3PROC_READ 6
+#define NFS3PROC_WRITE 7
+#define NFS3PROC_CREATE 8
+#define NFS3PROC_MKDIR 9
+#define NFS3PROC_SYMLINK 10
+#define NFS3PROC_MKNOD 11
+#define NFS3PROC_REMOVE 12
+#define NFS3PROC_RMDIR 13
+#define NFS3PROC_RENAME 14
+#define NFS3PROC_LINK 15
+#define NFS3PROC_READDIR 16
+#define NFS3PROC_READDIRPLUS 17
+#define NFS3PROC_FSSTAT 18
+#define NFS3PROC_FSINFO 19
+#define NFS3PROC_PATHCONF 20
+#define NFS3PROC_COMMIT 21
+
+#define NFS_MNT3_PROGRAM 100005
+#define NFS_MNT3_VERSION 3
+#define MOUNTPROC3_NULL 0
+#define MOUNTPROC3_MNT 1
+#define MOUNTPROC3_UMNT 3
+#define MOUNTPROC3_UMNTALL 4
+
+#ifdef NFS_NEED_KERNEL_TYPES
+
+#define NFS3_POST_OP_ATTR_WORDS 22
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfs4.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfs4.h
new file mode 100644
index 0000000..2e95e45
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfs4.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS4_H
+#define _LINUX_NFS4_H
+
+#include <linux/types.h>
+
+#define NFS4_VERIFIER_SIZE 8
+#define NFS4_FHSIZE 128
+#define NFS4_MAXPATHLEN PATH_MAX
+#define NFS4_MAXNAMLEN NAME_MAX
+
+#define NFS4_ACCESS_READ 0x0001
+#define NFS4_ACCESS_LOOKUP 0x0002
+#define NFS4_ACCESS_MODIFY 0x0004
+#define NFS4_ACCESS_EXTEND 0x0008
+#define NFS4_ACCESS_DELETE 0x0010
+#define NFS4_ACCESS_EXECUTE 0x0020
+
+#define NFS4_FH_PERSISTENT 0x0000
+#define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001
+#define NFS4_FH_VOLATILE_ANY 0x0002
+#define NFS4_FH_VOL_MIGRATION 0x0004
+#define NFS4_FH_VOL_RENAME 0x0008
+
+#define NFS4_OPEN_RESULT_CONFIRM 0x0002
+#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
+
+#define NFS4_SHARE_ACCESS_READ 0x0001
+#define NFS4_SHARE_ACCESS_WRITE 0x0002
+#define NFS4_SHARE_ACCESS_BOTH 0x0003
+#define NFS4_SHARE_DENY_READ 0x0001
+#define NFS4_SHARE_DENY_WRITE 0x0002
+#define NFS4_SHARE_DENY_BOTH 0x0003
+
+#define NFS4_SET_TO_SERVER_TIME 0
+#define NFS4_SET_TO_CLIENT_TIME 1
+
+#define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
+#define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1
+#define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2
+#define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3
+
+#define ACL4_SUPPORT_ALLOW_ACL 0x01
+#define ACL4_SUPPORT_DENY_ACL 0x02
+#define ACL4_SUPPORT_AUDIT_ACL 0x04
+#define ACL4_SUPPORT_ALARM_ACL 0x08
+
+#define NFS4_ACE_FILE_INHERIT_ACE 0x00000001
+#define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002
+#define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004
+#define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008
+#define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
+#define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
+#define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
+#define NFS4_ACE_OWNER 0x00000080
+#define NFS4_ACE_GROUP 0x00000100
+#define NFS4_ACE_EVERYONE 0x00000200
+
+#define NFS4_ACE_READ_DATA 0x00000001
+#define NFS4_ACE_LIST_DIRECTORY 0x00000001
+#define NFS4_ACE_WRITE_DATA 0x00000002
+#define NFS4_ACE_ADD_FILE 0x00000002
+#define NFS4_ACE_APPEND_DATA 0x00000004
+#define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004
+#define NFS4_ACE_READ_NAMED_ATTRS 0x00000008
+#define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010
+#define NFS4_ACE_EXECUTE 0x00000020
+#define NFS4_ACE_DELETE_CHILD 0x00000040
+#define NFS4_ACE_READ_ATTRIBUTES 0x00000080
+#define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100
+#define NFS4_ACE_DELETE 0x00010000
+#define NFS4_ACE_READ_ACL 0x00020000
+#define NFS4_ACE_WRITE_ACL 0x00040000
+#define NFS4_ACE_WRITE_OWNER 0x00080000
+#define NFS4_ACE_SYNCHRONIZE 0x00100000
+#define NFS4_ACE_GENERIC_READ 0x00120081
+#define NFS4_ACE_GENERIC_WRITE 0x00160106
+#define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
+#define NFS4_ACE_MASK_ALL 0x001F01FF
+
+enum nfs4_acl_whotype {
+ NFS4_ACL_WHO_NAMED = 0,
+ NFS4_ACL_WHO_OWNER,
+ NFS4_ACL_WHO_GROUP,
+ NFS4_ACL_WHO_EVERYONE,
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfs_xdr.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfs_xdr.h
new file mode 100644
index 0000000..48fe262
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfs_xdr.h
@@ -0,0 +1,556 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFS_XDR_H
+#define _LINUX_NFS_XDR_H
+
+#include <linux/sunrpc/xprt.h>
+#include <linux/nfsacl.h>
+
+#define NFS_MAX_FILE_IO_SIZE (1048576U)
+#define NFS_DEF_FILE_IO_SIZE (4096U)
+#define NFS_MIN_FILE_IO_SIZE (1024U)
+
+struct nfs_fsid {
+ uint64_t major;
+ uint64_t minor;
+};
+
+#define NFS_ATTR_WCC 0x0001
+#define NFS_ATTR_FATTR 0x0002
+#define NFS_ATTR_FATTR_V3 0x0004
+#define NFS_ATTR_FATTR_V4 0x0008
+#define NFS_ATTR_FATTR_V4_REFERRAL 0x0010
+
+struct nfs_fsinfo {
+ struct nfs_fattr *fattr;
+ __u32 rtmax;
+ __u32 rtpref;
+ __u32 rtmult;
+ __u32 wtmax;
+ __u32 wtpref;
+ __u32 wtmult;
+ __u32 dtpref;
+ __u64 maxfilesize;
+ __u32 lease_time;
+};
+
+struct nfs_fsstat {
+ struct nfs_fattr *fattr;
+ __u64 tbytes;
+ __u64 fbytes;
+ __u64 abytes;
+ __u64 tfiles;
+ __u64 ffiles;
+ __u64 afiles;
+};
+
+struct nfs2_fsstat {
+ __u32 tsize;
+ __u32 bsize;
+ __u32 blocks;
+ __u32 bfree;
+ __u32 bavail;
+};
+
+struct nfs_pathconf {
+ struct nfs_fattr *fattr;
+ __u32 max_link;
+ __u32 max_namelen;
+};
+
+struct nfs4_change_info {
+ u32 atomic;
+ u64 before;
+ u64 after;
+};
+
+struct nfs_seqid;
+
+struct nfs_openargs {
+ const struct nfs_fh * fh;
+ struct nfs_seqid * seqid;
+ int open_flags;
+ __u64 clientid;
+ __u32 id;
+ union {
+ struct iattr * attrs;
+ nfs4_verifier verifier;
+ nfs4_stateid delegation;
+ int delegation_type;
+ } u;
+ const struct qstr * name;
+ const struct nfs_server *server;
+ const u32 * bitmask;
+ __u32 claim;
+};
+
+struct nfs_openres {
+ nfs4_stateid stateid;
+ struct nfs_fh fh;
+ struct nfs4_change_info cinfo;
+ __u32 rflags;
+ struct nfs_fattr * f_attr;
+ struct nfs_fattr * dir_attr;
+ const struct nfs_server *server;
+ int delegation_type;
+ nfs4_stateid delegation;
+ __u32 do_recall;
+ __u64 maxsize;
+};
+
+struct nfs_open_confirmargs {
+ const struct nfs_fh * fh;
+ nfs4_stateid * stateid;
+ struct nfs_seqid * seqid;
+};
+
+struct nfs_open_confirmres {
+ nfs4_stateid stateid;
+};
+
+struct nfs_closeargs {
+ struct nfs_fh * fh;
+ nfs4_stateid * stateid;
+ struct nfs_seqid * seqid;
+ int open_flags;
+ const u32 * bitmask;
+};
+
+struct nfs_closeres {
+ nfs4_stateid stateid;
+ struct nfs_fattr * fattr;
+ const struct nfs_server *server;
+};
+
+struct nfs_lowner {
+ __u64 clientid;
+ u32 id;
+};
+
+struct nfs_lock_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_seqid * lock_seqid;
+ nfs4_stateid * lock_stateid;
+ struct nfs_seqid * open_seqid;
+ nfs4_stateid * open_stateid;
+ struct nfs_lowner lock_owner;
+ unsigned char block : 1;
+ unsigned char reclaim : 1;
+ unsigned char new_lock_owner : 1;
+};
+
+struct nfs_lock_res {
+ nfs4_stateid stateid;
+};
+
+struct nfs_locku_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_seqid * seqid;
+ nfs4_stateid * stateid;
+};
+
+struct nfs_locku_res {
+ nfs4_stateid stateid;
+};
+
+struct nfs_lockt_args {
+ struct nfs_fh * fh;
+ struct file_lock * fl;
+ struct nfs_lowner lock_owner;
+};
+
+struct nfs_lockt_res {
+ struct file_lock * denied;
+};
+
+struct nfs4_delegreturnargs {
+ const struct nfs_fh *fhandle;
+ const nfs4_stateid *stateid;
+ const u32 * bitmask;
+};
+
+struct nfs4_delegreturnres {
+ struct nfs_fattr * fattr;
+ const struct nfs_server *server;
+};
+
+struct nfs_readargs {
+ struct nfs_fh * fh;
+ struct nfs_open_context *context;
+ __u64 offset;
+ __u32 count;
+ unsigned int pgbase;
+ struct page ** pages;
+};
+
+struct nfs_readres {
+ struct nfs_fattr * fattr;
+ __u32 count;
+ int eof;
+};
+
+struct nfs_writeargs {
+ struct nfs_fh * fh;
+ struct nfs_open_context *context;
+ __u64 offset;
+ __u32 count;
+ enum nfs3_stable_how stable;
+ unsigned int pgbase;
+ struct page ** pages;
+ const u32 * bitmask;
+};
+
+struct nfs_writeverf {
+ enum nfs3_stable_how committed;
+ __u32 verifier[2];
+};
+
+struct nfs_writeres {
+ struct nfs_fattr * fattr;
+ struct nfs_writeverf * verf;
+ __u32 count;
+ const struct nfs_server *server;
+};
+
+struct nfs_entry {
+ __u64 ino;
+ __u64 cookie,
+ prev_cookie;
+ const char * name;
+ unsigned int len;
+ int eof;
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs_sattrargs {
+ struct nfs_fh * fh;
+ struct iattr * sattr;
+};
+
+struct nfs_diropargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+};
+
+struct nfs_createargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+};
+
+struct nfs_renameargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs_setattrargs {
+ struct nfs_fh * fh;
+ nfs4_stateid stateid;
+ struct iattr * iap;
+ const struct nfs_server * server;
+ const u32 * bitmask;
+};
+
+struct nfs_setaclargs {
+ struct nfs_fh * fh;
+ size_t acl_len;
+ unsigned int acl_pgbase;
+ struct page ** acl_pages;
+};
+
+struct nfs_getaclargs {
+ struct nfs_fh * fh;
+ size_t acl_len;
+ unsigned int acl_pgbase;
+ struct page ** acl_pages;
+};
+
+struct nfs_setattrres {
+ struct nfs_fattr * fattr;
+ const struct nfs_server * server;
+};
+
+struct nfs_linkargs {
+ struct nfs_fh * fromfh;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs_symlinkargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ const char * topath;
+ unsigned int tolen;
+ struct iattr * sattr;
+};
+
+struct nfs_readdirargs {
+ struct nfs_fh * fh;
+ __u32 cookie;
+ unsigned int count;
+ struct page ** pages;
+};
+
+struct nfs3_getaclargs {
+ struct nfs_fh * fh;
+ int mask;
+ struct page ** pages;
+};
+
+struct nfs3_setaclargs {
+ struct inode * inode;
+ int mask;
+ struct posix_acl * acl_access;
+ struct posix_acl * acl_default;
+ struct page ** pages;
+};
+
+struct nfs_diropok {
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs_readlinkargs {
+ struct nfs_fh * fh;
+ unsigned int pgbase;
+ unsigned int pglen;
+ struct page ** pages;
+};
+
+struct nfs3_sattrargs {
+ struct nfs_fh * fh;
+ struct iattr * sattr;
+ unsigned int guard;
+ struct timespec guardtime;
+};
+
+struct nfs3_diropargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+};
+
+struct nfs3_accessargs {
+ struct nfs_fh * fh;
+ __u32 access;
+};
+
+struct nfs3_createargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+ enum nfs3_createmode createmode;
+ __u32 verifier[2];
+};
+
+struct nfs3_mkdirargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ struct iattr * sattr;
+};
+
+struct nfs3_symlinkargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ const char * topath;
+ unsigned int tolen;
+ struct iattr * sattr;
+};
+
+struct nfs3_mknodargs {
+ struct nfs_fh * fh;
+ const char * name;
+ unsigned int len;
+ enum nfs3_ftype type;
+ struct iattr * sattr;
+ dev_t rdev;
+};
+
+struct nfs3_renameargs {
+ struct nfs_fh * fromfh;
+ const char * fromname;
+ unsigned int fromlen;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs3_linkargs {
+ struct nfs_fh * fromfh;
+ struct nfs_fh * tofh;
+ const char * toname;
+ unsigned int tolen;
+};
+
+struct nfs3_readdirargs {
+ struct nfs_fh * fh;
+ __u64 cookie;
+ __u32 verf[2];
+ int plus;
+ unsigned int count;
+ struct page ** pages;
+};
+
+struct nfs3_diropres {
+ struct nfs_fattr * dir_attr;
+ struct nfs_fh * fh;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs3_accessres {
+ struct nfs_fattr * fattr;
+ __u32 access;
+};
+
+struct nfs3_readlinkargs {
+ struct nfs_fh * fh;
+ unsigned int pgbase;
+ unsigned int pglen;
+ struct page ** pages;
+};
+
+struct nfs3_renameres {
+ struct nfs_fattr * fromattr;
+ struct nfs_fattr * toattr;
+};
+
+struct nfs3_linkres {
+ struct nfs_fattr * dir_attr;
+ struct nfs_fattr * fattr;
+};
+
+struct nfs3_readdirres {
+ struct nfs_fattr * dir_attr;
+ __u32 * verf;
+ int plus;
+};
+
+struct nfs3_getaclres {
+ struct nfs_fattr * fattr;
+ int mask;
+ unsigned int acl_access_count;
+ unsigned int acl_default_count;
+ struct posix_acl * acl_access;
+ struct posix_acl * acl_default;
+};
+
+struct nfs_page;
+
+#define NFS_PAGEVEC_SIZE (8U)
+
+struct nfs_read_data {
+ int flags;
+ struct rpc_task task;
+ struct inode *inode;
+ struct rpc_cred *cred;
+ struct nfs_fattr fattr;
+ struct list_head pages;
+ struct nfs_page *req;
+ struct page **pagevec;
+ unsigned int npages;
+ struct nfs_readargs args;
+ struct nfs_readres res;
+ struct page *page_array[NFS_PAGEVEC_SIZE];
+};
+
+struct nfs_write_data {
+ int flags;
+ struct rpc_task task;
+ struct inode *inode;
+ struct rpc_cred *cred;
+ struct nfs_fattr fattr;
+ struct nfs_writeverf verf;
+ struct list_head pages;
+ struct nfs_page *req;
+ struct page **pagevec;
+ unsigned int npages;
+ struct nfs_writeargs args;
+ struct nfs_writeres res;
+ struct page *page_array[NFS_PAGEVEC_SIZE];
+};
+
+struct nfs_access_entry;
+
+struct nfs_rpc_ops {
+ int version;
+ struct dentry_operations *dentry_ops;
+ struct inode_operations *dir_inode_ops;
+ struct inode_operations *file_inode_ops;
+
+ int (*getroot) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsinfo *);
+ int (*getattr) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fattr *);
+ int (*setattr) (struct dentry *, struct nfs_fattr *,
+ struct iattr *);
+ int (*lookup) (struct inode *, struct qstr *,
+ struct nfs_fh *, struct nfs_fattr *);
+ int (*access) (struct inode *, struct nfs_access_entry *);
+ int (*readlink)(struct inode *, struct page *, unsigned int,
+ unsigned int);
+ int (*read) (struct nfs_read_data *);
+ int (*write) (struct nfs_write_data *);
+ int (*commit) (struct nfs_write_data *);
+ int (*create) (struct inode *, struct dentry *,
+ struct iattr *, int, struct nameidata *);
+ int (*remove) (struct inode *, struct qstr *);
+ int (*unlink_setup) (struct rpc_message *,
+ struct dentry *, struct qstr *);
+ int (*unlink_done) (struct dentry *, struct rpc_task *);
+ int (*rename) (struct inode *, struct qstr *,
+ struct inode *, struct qstr *);
+ int (*link) (struct inode *, struct inode *, struct qstr *);
+ int (*symlink) (struct inode *, struct qstr *, struct qstr *,
+ struct iattr *, struct nfs_fh *,
+ struct nfs_fattr *);
+ int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
+ int (*rmdir) (struct inode *, struct qstr *);
+ int (*readdir) (struct dentry *, struct rpc_cred *,
+ u64, struct page *, unsigned int, int);
+ int (*mknod) (struct inode *, struct dentry *, struct iattr *,
+ dev_t);
+ int (*statfs) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsstat *);
+ int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_fsinfo *);
+ int (*pathconf) (struct nfs_server *, struct nfs_fh *,
+ struct nfs_pathconf *);
+ u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
+ void (*read_setup) (struct nfs_read_data *);
+ int (*read_done) (struct rpc_task *, struct nfs_read_data *);
+ void (*write_setup) (struct nfs_write_data *, int how);
+ int (*write_done) (struct rpc_task *, struct nfs_write_data *);
+ void (*commit_setup) (struct nfs_write_data *, int how);
+ int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
+ int (*file_open) (struct inode *, struct file *);
+ int (*file_release) (struct inode *, struct file *);
+ int (*lock)(struct file *, int, struct file_lock *);
+ void (*clear_acl_cache)(struct inode *);
+};
+
+#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsacl.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsacl.h
new file mode 100644
index 0000000..7dd95ab
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsacl.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NFSACL_H
+#define __LINUX_NFSACL_H
+
+#define NFS_ACL_PROGRAM 100227
+
+#define ACLPROC2_GETACL 1
+#define ACLPROC2_SETACL 2
+#define ACLPROC2_GETATTR 3
+#define ACLPROC2_ACCESS 4
+
+#define ACLPROC3_GETACL 1
+#define ACLPROC3_SETACL 2
+
+#define NFS_ACL 0x0001
+#define NFS_ACLCNT 0x0002
+#define NFS_DFACL 0x0004
+#define NFS_DFACLCNT 0x0008
+
+#define NFS_ACL_DEFAULT 0x1000
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/auth.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/auth.h
new file mode 100644
index 0000000..f840f0e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/auth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_AUTH_H
+#define LINUX_NFSD_AUTH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/const.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/const.h
new file mode 100644
index 0000000..c345508
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/const.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFSD_CONST_H
+#define _LINUX_NFSD_CONST_H
+
+#include <linux/nfs.h>
+#include <linux/nfs2.h>
+#include <linux/nfs3.h>
+#include <linux/nfs4.h>
+
+#define NFSSVC_MAXVERS 3
+
+#define NFSSVC_MAXBLKSIZE (32*1024)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/debug.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/debug.h
new file mode 100644
index 0000000..9b90f05
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/debug.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_DEBUG_H
+#define LINUX_NFSD_DEBUG_H
+
+#include <linux/sunrpc/debug.h>
+
+#ifdef RPC_DEBUG
+#define NFSD_DEBUG 1
+#endif
+
+#define NFSDDBG_SOCK 0x0001
+#define NFSDDBG_FH 0x0002
+#define NFSDDBG_EXPORT 0x0004
+#define NFSDDBG_SVC 0x0008
+#define NFSDDBG_PROC 0x0010
+#define NFSDDBG_FILEOP 0x0020
+#define NFSDDBG_AUTH 0x0040
+#define NFSDDBG_REPCACHE 0x0080
+#define NFSDDBG_XDR 0x0100
+#define NFSDDBG_LOCKD 0x0200
+#define NFSDDBG_ALL 0x7FFF
+#define NFSDDBG_NOCHANGE 0xFFFF
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/export.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/export.h
new file mode 100644
index 0000000..932274f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/export.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef NFSD_EXPORT_H
+#define NFSD_EXPORT_H
+
+#include <asm/types.h>
+
+#define NFSCLNT_IDMAX 1024
+#define NFSCLNT_ADDRMAX 16
+#define NFSCLNT_KEYMAX 32
+
+#define NFSEXP_READONLY 0x0001
+#define NFSEXP_INSECURE_PORT 0x0002
+#define NFSEXP_ROOTSQUASH 0x0004
+#define NFSEXP_ALLSQUASH 0x0008
+#define NFSEXP_ASYNC 0x0010
+#define NFSEXP_GATHERED_WRITES 0x0020
+
+#define NFSEXP_NOHIDE 0x0200
+#define NFSEXP_NOSUBTREECHECK 0x0400
+#define NFSEXP_NOAUTHNLM 0x0800
+#define NFSEXP_MSNFS 0x1000
+#define NFSEXP_FSID 0x2000
+#define NFSEXP_CROSSMOUNT 0x4000
+#define NFSEXP_NOACL 0x8000
+#define NFSEXP_ALLFLAGS 0xFE3F
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/interface.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/interface.h
new file mode 100644
index 0000000..3c3946a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/interface.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_INTERFACE_H
+#define LINUX_NFSD_INTERFACE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/nfsfh.h
new file mode 100644
index 0000000..13450d2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NFSD_FH_H
+#define _LINUX_NFSD_FH_H
+
+#include <asm/types.h>
+#include <linux/nfsd/const.h>
+#include <linux/nfsd/debug.h>
+
+struct nfs_fhbase_old {
+ __u32 fb_dcookie;
+ __u32 fb_ino;
+ __u32 fb_dirino;
+ __u32 fb_dev;
+ __u32 fb_xdev;
+ __u32 fb_xino;
+ __u32 fb_generation;
+};
+
+struct nfs_fhbase_new {
+ __u8 fb_version;
+ __u8 fb_auth_type;
+ __u8 fb_fsid_type;
+ __u8 fb_fileid_type;
+ __u32 fb_auth[1];
+
+};
+
+struct knfsd_fh {
+ unsigned int fh_size;
+ union {
+ struct nfs_fhbase_old fh_old;
+ __u32 fh_pad[NFS4_FHSIZE/4];
+ struct nfs_fhbase_new fh_new;
+ } fh_base;
+};
+
+#define ofh_dcookie fh_base.fh_old.fb_dcookie
+#define ofh_ino fh_base.fh_old.fb_ino
+#define ofh_dirino fh_base.fh_old.fb_dirino
+#define ofh_dev fh_base.fh_old.fb_dev
+#define ofh_xdev fh_base.fh_old.fb_xdev
+#define ofh_xino fh_base.fh_old.fb_xino
+#define ofh_generation fh_base.fh_old.fb_generation
+
+#define fh_version fh_base.fh_new.fb_version
+#define fh_fsid_type fh_base.fh_new.fb_fsid_type
+#define fh_auth_type fh_base.fh_new.fb_auth_type
+#define fh_fileid_type fh_base.fh_new.fb_fileid_type
+#define fh_auth fh_base.fh_new.fb_auth
+#define fh_fsid fh_base.fh_new.fb_auth
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/stats.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/stats.h
new file mode 100644
index 0000000..647e65c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/stats.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_STATS_H
+#define LINUX_NFSD_STATS_H
+
+#include <linux/nfs4.h>
+
+struct nfsd_stats {
+ unsigned int rchits;
+ unsigned int rcmisses;
+ unsigned int rcnocache;
+ unsigned int fh_stale;
+ unsigned int fh_lookup;
+ unsigned int fh_anon;
+ unsigned int fh_nocache_dir;
+ unsigned int fh_nocache_nondir;
+ unsigned int io_read;
+ unsigned int io_write;
+ unsigned int th_cnt;
+ unsigned int th_usage[10];
+ unsigned int th_fullcnt;
+ unsigned int ra_size;
+ unsigned int ra_depth[11];
+
+};
+
+#define NFSD_USAGE_WRAP (HZ*1000000)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/xdr.h b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/xdr.h
new file mode 100644
index 0000000..f94961d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_NFSD_H
+#define LINUX_NFSD_H
+
+#include <linux/fs.h>
+#include <linux/vfs.h>
+#include <linux/nfs.h>
+
+struct nfsd_fhandle {
+ struct svc_fh fh;
+};
+
+struct nfsd_sattrargs {
+ struct svc_fh fh;
+ struct iattr attrs;
+};
+
+struct nfsd_diropargs {
+ struct svc_fh fh;
+ char * name;
+ int len;
+};
+
+struct nfsd_readargs {
+ struct svc_fh fh;
+ __u32 offset;
+ __u32 count;
+ struct kvec vec[RPCSVC_MAXPAGES];
+ int vlen;
+};
+
+struct nfsd_writeargs {
+ svc_fh fh;
+ __u32 offset;
+ int len;
+ struct kvec vec[RPCSVC_MAXPAGES];
+ int vlen;
+};
+
+struct nfsd_createargs {
+ struct svc_fh fh;
+ char * name;
+ int len;
+ struct iattr attrs;
+};
+
+struct nfsd_renameargs {
+ struct svc_fh ffh;
+ char * fname;
+ int flen;
+ struct svc_fh tfh;
+ char * tname;
+ int tlen;
+};
+
+struct nfsd_readlinkargs {
+ struct svc_fh fh;
+ char * buffer;
+};
+
+struct nfsd_linkargs {
+ struct svc_fh ffh;
+ struct svc_fh tfh;
+ char * tname;
+ int tlen;
+};
+
+struct nfsd_symlinkargs {
+ struct svc_fh ffh;
+ char * fname;
+ int flen;
+ char * tname;
+ int tlen;
+ struct iattr attrs;
+};
+
+struct nfsd_readdirargs {
+ struct svc_fh fh;
+ __u32 cookie;
+ __u32 count;
+ u32 * buffer;
+};
+
+struct nfsd_attrstat {
+ struct svc_fh fh;
+ struct kstat stat;
+};
+
+struct nfsd_diropres {
+ struct svc_fh fh;
+ struct kstat stat;
+};
+
+struct nfsd_readlinkres {
+ int len;
+};
+
+struct nfsd_readres {
+ struct svc_fh fh;
+ unsigned long count;
+ struct kstat stat;
+};
+
+struct nfsd_readdirres {
+ int count;
+
+ struct readdir_cd common;
+ u32 * buffer;
+ int buflen;
+ u32 * offset;
+};
+
+struct nfsd_statfsres {
+ struct kstatfs stats;
+};
+
+union nfsd_xdrstore {
+ struct nfsd_sattrargs sattr;
+ struct nfsd_diropargs dirop;
+ struct nfsd_readargs read;
+ struct nfsd_writeargs write;
+ struct nfsd_createargs create;
+ struct nfsd_renameargs rename;
+ struct nfsd_linkargs link;
+ struct nfsd_symlinkargs symlink;
+ struct nfsd_readdirargs readdir;
+};
+
+#define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/node.h b/6/platforms/android-3/arch-x86/usr/include/linux/node.h
new file mode 100644
index 0000000..b33bffc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/node.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NODE_H_
+#define _LINUX_NODE_H_
+
+#include <linux/sysdev.h>
+#include <linux/cpumask.h>
+
+struct node {
+ struct sys_device sysdev;
+};
+
+#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nodemask.h b/6/platforms/android-3/arch-x86/usr/include/linux/nodemask.h
new file mode 100644
index 0000000..4ec8632
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nodemask.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NODEMASK_H
+#define __LINUX_NODEMASK_H
+
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/bitmap.h>
+#include <linux/numa.h>
+
+typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
+
+#define node_set(node, dst) __node_set((node), &(dst))
+#define node_clear(node, dst) __node_clear((node), &(dst))
+#define nodes_setall(dst) __nodes_setall(&(dst), MAX_NUMNODES)
+#define nodes_clear(dst) __nodes_clear(&(dst), MAX_NUMNODES)
+#define node_isset(node, nodemask) test_bit((node), (nodemask).bits)
+#define node_test_and_set(node, nodemask) __node_test_and_set((node), &(nodemask))
+#define nodes_and(dst, src1, src2) __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_or(dst, src1, src2) __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_xor(dst, src1, src2) __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_andnot(dst, src1, src2) __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES)
+#define nodes_complement(dst, src) __nodes_complement(&(dst), &(src), MAX_NUMNODES)
+#define nodes_equal(src1, src2) __nodes_equal(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_intersects(src1, src2) __nodes_intersects(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_subset(src1, src2) __nodes_subset(&(src1), &(src2), MAX_NUMNODES)
+#define nodes_empty(src) __nodes_empty(&(src), MAX_NUMNODES)
+#define nodes_full(nodemask) __nodes_full(&(nodemask), MAX_NUMNODES)
+#define nodes_weight(nodemask) __nodes_weight(&(nodemask), MAX_NUMNODES)
+#define nodes_shift_right(dst, src, n) __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES)
+#define nodes_shift_left(dst, src, n) __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES)
+#define first_node(src) __first_node(&(src))
+#define next_node(n, src) __next_node((n), &(src))
+#define nodemask_of_node(node) ({ typeof(_unused_nodemask_arg_) m; if (sizeof(m) == sizeof(unsigned long)) { m.bits[0] = 1UL<<(node); } else { nodes_clear(m); node_set((node), m); } m; })
+#define first_unset_node(mask) __first_unset_node(&(mask))
+#define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
+#if MAX_NUMNODES <= BITS_PER_LONG
+#define NODE_MASK_ALL ((nodemask_t) { { [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD } })
+#else
+#define NODE_MASK_ALL ((nodemask_t) { { [0 ... BITS_TO_LONGS(MAX_NUMNODES)-2] = ~0UL, [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD } })
+#endif
+#define NODE_MASK_NONE ((nodemask_t) { { [0 ... BITS_TO_LONGS(MAX_NUMNODES)-1] = 0UL } })
+#define nodes_addr(src) ((src).bits)
+#define nodemask_scnprintf(buf, len, src) __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES)
+#define nodemask_parse(ubuf, ulen, dst) __nodemask_parse((ubuf), (ulen), &(dst), MAX_NUMNODES)
+#define nodelist_scnprintf(buf, len, src) __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES)
+#define nodelist_parse(buf, dst) __nodelist_parse((buf), &(dst), MAX_NUMNODES)
+#define node_remap(oldbit, old, new) __node_remap((oldbit), &(old), &(new), MAX_NUMNODES)
+#define nodes_remap(dst, src, old, new) __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES)
+#if MAX_NUMNODES > 1
+#define for_each_node_mask(node, mask) for ((node) = first_node(mask); (node) < MAX_NUMNODES; (node) = next_node((node), (mask)))
+#else
+#define for_each_node_mask(node, mask) if (!nodes_empty(mask)) for ((node) = 0; (node) < 1; (node)++)
+#endif
+
+#if MAX_NUMNODES > 1
+#define num_online_nodes() nodes_weight(node_online_map)
+#define num_possible_nodes() nodes_weight(node_possible_map)
+#define node_online(node) node_isset((node), node_online_map)
+#define node_possible(node) node_isset((node), node_possible_map)
+#define first_online_node first_node(node_online_map)
+#define next_online_node(nid) next_node((nid), node_online_map)
+#else
+#define num_online_nodes() 1
+#define num_possible_nodes() 1
+#define node_online(node) ((node) == 0)
+#define node_possible(node) ((node) == 0)
+#define first_online_node 0
+#define next_online_node(nid) (MAX_NUMNODES)
+#endif
+
+#define any_online_node(mask) ({ int node; for_each_node_mask(node, (mask)) if (node_online(node)) break; node; })
+
+#define node_set_online(node) set_bit((node), node_online_map.bits)
+#define node_set_offline(node) clear_bit((node), node_online_map.bits)
+
+#define for_each_node(node) for_each_node_mask((node), node_possible_map)
+#define for_each_online_node(node) for_each_node_mask((node), node_online_map)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/notifier.h b/6/platforms/android-3/arch-x86/usr/include/linux/notifier.h
new file mode 100644
index 0000000..f1fc461
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/notifier.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NOTIFIER_H
+#define _LINUX_NOTIFIER_H
+#include <linux/errno.h>
+#include <linux/mutex.h>
+#include <linux/rwsem.h>
+
+struct notifier_block {
+ int (*notifier_call)(struct notifier_block *, unsigned long, void *);
+ struct notifier_block *next;
+ int priority;
+};
+
+struct atomic_notifier_head {
+ spinlock_t lock;
+ struct notifier_block *head;
+};
+
+struct blocking_notifier_head {
+ struct rw_semaphore rwsem;
+ struct notifier_block *head;
+};
+
+struct raw_notifier_head {
+ struct notifier_block *head;
+};
+
+#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { spin_lock_init(&(name)->lock); (name)->head = NULL; } while (0)
+#define BLOCKING_INIT_NOTIFIER_HEAD(name) do { init_rwsem(&(name)->rwsem); (name)->head = NULL; } while (0)
+#define RAW_INIT_NOTIFIER_HEAD(name) do { (name)->head = NULL; } while (0)
+
+#define ATOMIC_NOTIFIER_INIT(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .head = NULL }
+#define BLOCKING_NOTIFIER_INIT(name) { .rwsem = __RWSEM_INITIALIZER((name).rwsem), .head = NULL }
+#define RAW_NOTIFIER_INIT(name) { .head = NULL }
+
+#define ATOMIC_NOTIFIER_HEAD(name) struct atomic_notifier_head name = ATOMIC_NOTIFIER_INIT(name)
+#define BLOCKING_NOTIFIER_HEAD(name) struct blocking_notifier_head name = BLOCKING_NOTIFIER_INIT(name)
+#define RAW_NOTIFIER_HEAD(name) struct raw_notifier_head name = RAW_NOTIFIER_INIT(name)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/numa.h b/6/platforms/android-3/arch-x86/usr/include/linux/numa.h
new file mode 100644
index 0000000..f5d66f5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/numa.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NUMA_H
+#define _LINUX_NUMA_H
+
+#define NODES_SHIFT 0
+
+#define MAX_NUMNODES (1 << NODES_SHIFT)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/nvram.h b/6/platforms/android-3/arch-x86/usr/include/linux/nvram.h
new file mode 100644
index 0000000..b358bdb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/nvram.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_NVRAM_H
+#define _LINUX_NVRAM_H
+
+#include <linux/ioctl.h>
+
+#define NVRAM_INIT _IO('p', 0x40)
+#define NVRAM_SETCKS _IO('p', 0x41)
+
+#define NVRAM_FIRST_BYTE 14
+
+#define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/omap_csmi.h b/6/platforms/android-3/arch-x86/usr/include/linux/omap_csmi.h
new file mode 100644
index 0000000..6a28d3d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/omap_csmi.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _OMAP_CSMI_H_
+#define _OMAP_CSMI_H_
+
+#include <asm/ioctl.h>
+
+#define OMAP_CSMI_TTY_ENABLE_ACK _IO('c', 0)
+#define OMAP_CSMI_TTY_DISABLE_ACK _IO('c', 1)
+#define OMAP_CSMI_TTY_READ_UNACKED _IOR('c', 2, int)
+#define OMAP_CSMI_TTY_ACK _IOW('c', 3, int)
+#define OMAP_CSMI_TTY_WAKEUP_AND_ACK _IOW('c', 4, int)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pagemap.h b/6/platforms/android-3/arch-x86/usr/include/linux/pagemap.h
new file mode 100644
index 0000000..8dd397d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pagemap.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PAGEMAP_H
+#define _LINUX_PAGEMAP_H
+
+#include <linux/mm.h>
+#include <linux/fs.h>
+#include <linux/list.h>
+#include <linux/highmem.h>
+#include <linux/compiler.h>
+#include <asm/uaccess.h>
+#include <linux/gfp.h>
+
+#define AS_EIO (__GFP_BITS_SHIFT + 0)
+#define AS_ENOSPC (__GFP_BITS_SHIFT + 1)
+
+#define PAGE_CACHE_SHIFT PAGE_SHIFT
+#define PAGE_CACHE_SIZE PAGE_SIZE
+#define PAGE_CACHE_MASK PAGE_MASK
+#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
+#define page_cache_get(page) get_page(page)
+#define page_cache_release(page) put_page(page)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/param.h b/6/platforms/android-3/arch-x86/usr/include/linux/param.h
new file mode 100644
index 0000000..456695d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/param.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PARAM_H
+#define _LINUX_PARAM_H
+
+#include <asm/param.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/patchkey.h b/6/platforms/android-3/arch-x86/usr/include/linux/patchkey.h
new file mode 100644
index 0000000..fdf86ce
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/patchkey.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PATCHKEY_H_INDIRECT
+#error "patchkey.h included directly"
+#endif
+
+#ifndef _LINUX_PATCHKEY_H
+#define _LINUX_PATCHKEY_H
+
+#include <endian.h>
+
+#ifdef __BYTE_ORDER
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define _PATCHKEY(id) (0xfd00|id)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define _PATCHKEY(id) ((id<<8)|0x00fd)
+#else
+#error "could not determine byte order"
+#endif
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pci.h b/6/platforms/android-3/arch-x86/usr/include/linux/pci.h
new file mode 100644
index 0000000..165deb4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pci.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_PCI_H
+#define LINUX_PCI_H
+
+#include <linux/pci_regs.h>
+
+#include <linux/pci_ids.h>
+
+#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
+#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
+#define PCI_FUNC(devfn) ((devfn) & 0x07)
+
+#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
+#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00)
+#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01)
+#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02)
+#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pci_ids.h b/6/platforms/android-3/arch-x86/usr/include/linux/pci_ids.h
new file mode 100644
index 0000000..ec5adfb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pci_ids.h
@@ -0,0 +1,2270 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define PCI_CLASS_NOT_DEFINED 0x0000
+#define PCI_CLASS_NOT_DEFINED_VGA 0x0001
+
+#define PCI_BASE_CLASS_STORAGE 0x01
+#define PCI_CLASS_STORAGE_SCSI 0x0100
+#define PCI_CLASS_STORAGE_IDE 0x0101
+#define PCI_CLASS_STORAGE_FLOPPY 0x0102
+#define PCI_CLASS_STORAGE_IPI 0x0103
+#define PCI_CLASS_STORAGE_RAID 0x0104
+#define PCI_CLASS_STORAGE_SAS 0x0107
+#define PCI_CLASS_STORAGE_OTHER 0x0180
+
+#define PCI_BASE_CLASS_NETWORK 0x02
+#define PCI_CLASS_NETWORK_ETHERNET 0x0200
+#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201
+#define PCI_CLASS_NETWORK_FDDI 0x0202
+#define PCI_CLASS_NETWORK_ATM 0x0203
+#define PCI_CLASS_NETWORK_OTHER 0x0280
+
+#define PCI_BASE_CLASS_DISPLAY 0x03
+#define PCI_CLASS_DISPLAY_VGA 0x0300
+#define PCI_CLASS_DISPLAY_XGA 0x0301
+#define PCI_CLASS_DISPLAY_3D 0x0302
+#define PCI_CLASS_DISPLAY_OTHER 0x0380
+
+#define PCI_BASE_CLASS_MULTIMEDIA 0x04
+#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400
+#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401
+#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402
+#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480
+
+#define PCI_BASE_CLASS_MEMORY 0x05
+#define PCI_CLASS_MEMORY_RAM 0x0500
+#define PCI_CLASS_MEMORY_FLASH 0x0501
+#define PCI_CLASS_MEMORY_OTHER 0x0580
+
+#define PCI_BASE_CLASS_BRIDGE 0x06
+#define PCI_CLASS_BRIDGE_HOST 0x0600
+#define PCI_CLASS_BRIDGE_ISA 0x0601
+#define PCI_CLASS_BRIDGE_EISA 0x0602
+#define PCI_CLASS_BRIDGE_MC 0x0603
+#define PCI_CLASS_BRIDGE_PCI 0x0604
+#define PCI_CLASS_BRIDGE_PCMCIA 0x0605
+#define PCI_CLASS_BRIDGE_NUBUS 0x0606
+#define PCI_CLASS_BRIDGE_CARDBUS 0x0607
+#define PCI_CLASS_BRIDGE_RACEWAY 0x0608
+#define PCI_CLASS_BRIDGE_OTHER 0x0680
+
+#define PCI_BASE_CLASS_COMMUNICATION 0x07
+#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700
+#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
+#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702
+#define PCI_CLASS_COMMUNICATION_MODEM 0x0703
+#define PCI_CLASS_COMMUNICATION_OTHER 0x0780
+
+#define PCI_BASE_CLASS_SYSTEM 0x08
+#define PCI_CLASS_SYSTEM_PIC 0x0800
+#define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010
+#define PCI_CLASS_SYSTEM_PIC_IOXAPIC 0x080020
+#define PCI_CLASS_SYSTEM_DMA 0x0801
+#define PCI_CLASS_SYSTEM_TIMER 0x0802
+#define PCI_CLASS_SYSTEM_RTC 0x0803
+#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804
+#define PCI_CLASS_SYSTEM_SDHCI 0x0805
+#define PCI_CLASS_SYSTEM_OTHER 0x0880
+
+#define PCI_BASE_CLASS_INPUT 0x09
+#define PCI_CLASS_INPUT_KEYBOARD 0x0900
+#define PCI_CLASS_INPUT_PEN 0x0901
+#define PCI_CLASS_INPUT_MOUSE 0x0902
+#define PCI_CLASS_INPUT_SCANNER 0x0903
+#define PCI_CLASS_INPUT_GAMEPORT 0x0904
+#define PCI_CLASS_INPUT_OTHER 0x0980
+
+#define PCI_BASE_CLASS_DOCKING 0x0a
+#define PCI_CLASS_DOCKING_GENERIC 0x0a00
+#define PCI_CLASS_DOCKING_OTHER 0x0a80
+
+#define PCI_BASE_CLASS_PROCESSOR 0x0b
+#define PCI_CLASS_PROCESSOR_386 0x0b00
+#define PCI_CLASS_PROCESSOR_486 0x0b01
+#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02
+#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10
+#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20
+#define PCI_CLASS_PROCESSOR_MIPS 0x0b30
+#define PCI_CLASS_PROCESSOR_CO 0x0b40
+
+#define PCI_BASE_CLASS_SERIAL 0x0c
+#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
+#define PCI_CLASS_SERIAL_ACCESS 0x0c01
+#define PCI_CLASS_SERIAL_SSA 0x0c02
+#define PCI_CLASS_SERIAL_USB 0x0c03
+#define PCI_CLASS_SERIAL_USB_UHCI 0x0c0300
+#define PCI_CLASS_SERIAL_USB_OHCI 0x0c0310
+#define PCI_CLASS_SERIAL_USB_EHCI 0x0c0320
+#define PCI_CLASS_SERIAL_FIBER 0x0c04
+#define PCI_CLASS_SERIAL_SMBUS 0x0c05
+
+#define PCI_BASE_CLASS_INTELLIGENT 0x0e
+#define PCI_CLASS_INTELLIGENT_I2O 0x0e00
+
+#define PCI_BASE_CLASS_SATELLITE 0x0f
+#define PCI_CLASS_SATELLITE_TV 0x0f00
+#define PCI_CLASS_SATELLITE_AUDIO 0x0f01
+#define PCI_CLASS_SATELLITE_VOICE 0x0f03
+#define PCI_CLASS_SATELLITE_DATA 0x0f04
+
+#define PCI_BASE_CLASS_CRYPT 0x10
+#define PCI_CLASS_CRYPT_NETWORK 0x1000
+#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001
+#define PCI_CLASS_CRYPT_OTHER 0x1080
+
+#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11
+#define PCI_CLASS_SP_DPIO 0x1100
+#define PCI_CLASS_SP_OTHER 0x1180
+
+#define PCI_CLASS_OTHERS 0xff
+
+#define PCI_VENDOR_ID_DYNALINK 0x0675
+#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702
+
+#define PCI_VENDOR_ID_BERKOM 0x0871
+#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1
+#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2
+#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4
+#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8
+
+#define PCI_VENDOR_ID_COMPAQ 0x0e11
+#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508
+#define PCI_DEVICE_ID_COMPAQ_TACHYON 0xa0fc
+#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10
+#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32
+#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
+#define PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE 0xae33
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35
+#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40
+#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43
+#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011
+#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060
+#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178
+#define PCI_DEVICE_ID_COMPAQ_CISSC 0x46
+#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
+#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150
+
+#define PCI_VENDOR_ID_NCR 0x1000
+#define PCI_VENDOR_ID_LSI_LOGIC 0x1000
+#define PCI_DEVICE_ID_NCR_53C810 0x0001
+#define PCI_DEVICE_ID_NCR_53C820 0x0002
+#define PCI_DEVICE_ID_NCR_53C825 0x0003
+#define PCI_DEVICE_ID_NCR_53C815 0x0004
+#define PCI_DEVICE_ID_LSI_53C810AP 0x0005
+#define PCI_DEVICE_ID_NCR_53C860 0x0006
+#define PCI_DEVICE_ID_LSI_53C1510 0x000a
+#define PCI_DEVICE_ID_NCR_53C896 0x000b
+#define PCI_DEVICE_ID_NCR_53C895 0x000c
+#define PCI_DEVICE_ID_NCR_53C885 0x000d
+#define PCI_DEVICE_ID_NCR_53C875 0x000f
+#define PCI_DEVICE_ID_NCR_53C1510 0x0010
+#define PCI_DEVICE_ID_LSI_53C895A 0x0012
+#define PCI_DEVICE_ID_LSI_53C875A 0x0013
+#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020
+#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021
+#define PCI_DEVICE_ID_LSI_53C1030 0x0030
+#define PCI_DEVICE_ID_LSI_1030_53C1035 0x0032
+#define PCI_DEVICE_ID_LSI_53C1035 0x0040
+#define PCI_DEVICE_ID_NCR_53C875J 0x008f
+#define PCI_DEVICE_ID_LSI_FC909 0x0621
+#define PCI_DEVICE_ID_LSI_FC929 0x0622
+#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623
+#define PCI_DEVICE_ID_LSI_FC919 0x0624
+#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625
+#define PCI_DEVICE_ID_LSI_FC929X 0x0626
+#define PCI_DEVICE_ID_LSI_FC939X 0x0642
+#define PCI_DEVICE_ID_LSI_FC949X 0x0640
+#define PCI_DEVICE_ID_LSI_FC949ES 0x0646
+#define PCI_DEVICE_ID_LSI_FC919X 0x0628
+#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701
+#define PCI_DEVICE_ID_LSI_61C102 0x0901
+#define PCI_DEVICE_ID_LSI_63C815 0x1000
+#define PCI_DEVICE_ID_LSI_SAS1064 0x0050
+#define PCI_DEVICE_ID_LSI_SAS1064R 0x0411
+#define PCI_DEVICE_ID_LSI_SAS1066 0x005E
+#define PCI_DEVICE_ID_LSI_SAS1068 0x0054
+#define PCI_DEVICE_ID_LSI_SAS1064A 0x005C
+#define PCI_DEVICE_ID_LSI_SAS1064E 0x0056
+#define PCI_DEVICE_ID_LSI_SAS1066E 0x005A
+#define PCI_DEVICE_ID_LSI_SAS1068E 0x0058
+#define PCI_DEVICE_ID_LSI_SAS1078 0x0060
+
+#define PCI_VENDOR_ID_ATI 0x1002
+
+#define PCI_DEVICE_ID_ATI_68800 0x4158
+#define PCI_DEVICE_ID_ATI_215CT222 0x4354
+#define PCI_DEVICE_ID_ATI_210888CX 0x4358
+#define PCI_DEVICE_ID_ATI_215ET222 0x4554
+
+#define PCI_DEVICE_ID_ATI_215GB 0x4742
+#define PCI_DEVICE_ID_ATI_215GD 0x4744
+#define PCI_DEVICE_ID_ATI_215GI 0x4749
+#define PCI_DEVICE_ID_ATI_215GP 0x4750
+#define PCI_DEVICE_ID_ATI_215GQ 0x4751
+#define PCI_DEVICE_ID_ATI_215XL 0x4752
+#define PCI_DEVICE_ID_ATI_215GT 0x4754
+#define PCI_DEVICE_ID_ATI_215GTB 0x4755
+#define PCI_DEVICE_ID_ATI_215_IV 0x4756
+#define PCI_DEVICE_ID_ATI_215_IW 0x4757
+#define PCI_DEVICE_ID_ATI_215_IZ 0x475A
+#define PCI_DEVICE_ID_ATI_210888GX 0x4758
+#define PCI_DEVICE_ID_ATI_215_LB 0x4c42
+#define PCI_DEVICE_ID_ATI_215_LD 0x4c44
+#define PCI_DEVICE_ID_ATI_215_LG 0x4c47
+#define PCI_DEVICE_ID_ATI_215_LI 0x4c49
+#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D
+#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E
+#define PCI_DEVICE_ID_ATI_215_LR 0x4c52
+#define PCI_DEVICE_ID_ATI_215_LS 0x4c53
+#define PCI_DEVICE_ID_ATI_264_LT 0x4c54
+
+#define PCI_DEVICE_ID_ATI_264VT 0x5654
+#define PCI_DEVICE_ID_ATI_264VU 0x5655
+#define PCI_DEVICE_ID_ATI_264VV 0x5656
+
+#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
+#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
+#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x5247
+
+#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
+#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
+#define PCI_DEVICE_ID_ATI_RAGE128_SE 0x5345
+#define PCI_DEVICE_ID_ATI_RAGE128_SF 0x5346
+#define PCI_DEVICE_ID_ATI_RAGE128_SG 0x5347
+#define PCI_DEVICE_ID_ATI_RAGE128_SH 0x5348
+#define PCI_DEVICE_ID_ATI_RAGE128_SK 0x534b
+#define PCI_DEVICE_ID_ATI_RAGE128_SL 0x534c
+#define PCI_DEVICE_ID_ATI_RAGE128_SM 0x534d
+#define PCI_DEVICE_ID_ATI_RAGE128_SN 0x534e
+
+#define PCI_DEVICE_ID_ATI_RAGE128_TF 0x5446
+#define PCI_DEVICE_ID_ATI_RAGE128_TL 0x544c
+#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452
+#define PCI_DEVICE_ID_ATI_RAGE128_TS 0x5453
+#define PCI_DEVICE_ID_ATI_RAGE128_TT 0x5454
+#define PCI_DEVICE_ID_ATI_RAGE128_TU 0x5455
+
+#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45
+#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46
+
+#define PCI_DEVICE_ID_ATI_RAGE128_MF 0x4d46
+#define PCI_DEVICE_ID_ATI_RAGE128_ML 0x4d4c
+
+#define PCI_DEVICE_ID_ATI_RAGE128_PA 0x5041
+#define PCI_DEVICE_ID_ATI_RAGE128_PB 0x5042
+#define PCI_DEVICE_ID_ATI_RAGE128_PC 0x5043
+#define PCI_DEVICE_ID_ATI_RAGE128_PD 0x5044
+#define PCI_DEVICE_ID_ATI_RAGE128_PE 0x5045
+#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046
+
+#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047
+#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048
+#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049
+#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A
+#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B
+#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C
+#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D
+#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E
+#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F
+#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050
+#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051
+#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052
+#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053
+#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054
+#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055
+#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056
+#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057
+#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058
+
+#define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144
+#define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145
+#define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146
+#define PCI_DEVICE_ID_ATI_RADEON_QG 0x5147
+
+#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
+#define PCI_DEVICE_ID_ATI_RADEON_QZ 0x515a
+
+#define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c
+#define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e
+#define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f
+#define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c
+#define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242
+
+#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
+
+#define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157
+#define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158
+
+#define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964
+#define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965
+#define PCI_DEVICE_ID_ATI_RADEON_If 0x4966
+#define PCI_DEVICE_ID_ATI_RADEON_Ig 0x4967
+
+#define PCI_DEVICE_ID_ATI_RADEON_Ya 0x5961
+#define PCI_DEVICE_ID_ATI_RADEON_Yd 0x5964
+
+#define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44
+#define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45
+#define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46
+#define PCI_DEVICE_ID_ATI_RADEON_NG 0x4e47
+
+#define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59
+#define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a
+
+#define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57
+#define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58
+
+#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4c64
+#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4c65
+#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4c66
+#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4c67
+
+#define PCI_DEVICE_ID_ATI_RS100 0xcab0
+#define PCI_DEVICE_ID_ATI_RS200 0xcab2
+#define PCI_DEVICE_ID_ATI_RS200_B 0xcbb2
+#define PCI_DEVICE_ID_ATI_RS250 0xcab3
+#define PCI_DEVICE_ID_ATI_RS300_100 0x5830
+#define PCI_DEVICE_ID_ATI_RS300_133 0x5831
+#define PCI_DEVICE_ID_ATI_RS300_166 0x5832
+#define PCI_DEVICE_ID_ATI_RS300_200 0x5833
+#define PCI_DEVICE_ID_ATI_RS350_100 0x7830
+#define PCI_DEVICE_ID_ATI_RS350_133 0x7831
+#define PCI_DEVICE_ID_ATI_RS350_166 0x7832
+#define PCI_DEVICE_ID_ATI_RS350_200 0x7833
+#define PCI_DEVICE_ID_ATI_RS400_100 0x5a30
+#define PCI_DEVICE_ID_ATI_RS400_133 0x5a31
+#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32
+#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33
+#define PCI_DEVICE_ID_ATI_RS480 0x5950
+
+#define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349
+#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353
+#define PCI_DEVICE_ID_ATI_IXP300_SMBUS 0x4363
+#define PCI_DEVICE_ID_ATI_IXP300_IDE 0x4369
+#define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e
+#define PCI_DEVICE_ID_ATI_IXP400_SMBUS 0x4372
+#define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376
+#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
+#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
+#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
+#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
+#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
+
+#define PCI_VENDOR_ID_VLSI 0x1004
+#define PCI_DEVICE_ID_VLSI_82C592 0x0005
+#define PCI_DEVICE_ID_VLSI_82C593 0x0006
+#define PCI_DEVICE_ID_VLSI_82C594 0x0007
+#define PCI_DEVICE_ID_VLSI_82C597 0x0009
+#define PCI_DEVICE_ID_VLSI_82C541 0x000c
+#define PCI_DEVICE_ID_VLSI_82C543 0x000d
+#define PCI_DEVICE_ID_VLSI_82C532 0x0101
+#define PCI_DEVICE_ID_VLSI_82C534 0x0102
+#define PCI_DEVICE_ID_VLSI_82C535 0x0104
+#define PCI_DEVICE_ID_VLSI_82C147 0x0105
+#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702
+
+#define PCI_VENDOR_ID_ADL 0x1005
+#define PCI_DEVICE_ID_ADL_2301 0x2301
+
+#define PCI_VENDOR_ID_NS 0x100b
+#define PCI_DEVICE_ID_NS_87415 0x0002
+#define PCI_DEVICE_ID_NS_87560_LIO 0x000e
+#define PCI_DEVICE_ID_NS_87560_USB 0x0012
+#define PCI_DEVICE_ID_NS_83815 0x0020
+#define PCI_DEVICE_ID_NS_83820 0x0022
+#define PCI_DEVICE_ID_NS_CS5535_ISA 0x002b
+#define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d
+#define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e
+#define PCI_DEVICE_ID_NS_CS5535_USB 0x002f
+#define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030
+#define PCI_DEVICE_ID_NS_SATURN 0x0035
+#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500
+#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501
+#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502
+#define PCI_DEVICE_ID_NS_SCx200_AUDIO 0x0503
+#define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504
+#define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505
+#define PCI_DEVICE_ID_NS_SC1100_BRIDGE 0x0510
+#define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511
+#define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515
+#define PCI_DEVICE_ID_NS_87410 0xd001
+
+#define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028
+#define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b
+
+#define PCI_VENDOR_ID_TSENG 0x100c
+#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202
+#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205
+#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206
+#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207
+#define PCI_DEVICE_ID_TSENG_ET6000 0x3208
+
+#define PCI_VENDOR_ID_WEITEK 0x100e
+#define PCI_DEVICE_ID_WEITEK_P9000 0x9001
+#define PCI_DEVICE_ID_WEITEK_P9100 0x9100
+
+#define PCI_VENDOR_ID_DEC 0x1011
+#define PCI_DEVICE_ID_DEC_BRD 0x0001
+#define PCI_DEVICE_ID_DEC_TULIP 0x0002
+#define PCI_DEVICE_ID_DEC_TGA 0x0004
+#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009
+#define PCI_DEVICE_ID_DEC_TGA2 0x000D
+#define PCI_DEVICE_ID_DEC_FDDI 0x000F
+#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014
+#define PCI_DEVICE_ID_DEC_21142 0x0019
+#define PCI_DEVICE_ID_DEC_21052 0x0021
+#define PCI_DEVICE_ID_DEC_21150 0x0022
+#define PCI_DEVICE_ID_DEC_21152 0x0024
+#define PCI_DEVICE_ID_DEC_21153 0x0025
+#define PCI_DEVICE_ID_DEC_21154 0x0026
+#define PCI_DEVICE_ID_DEC_21285 0x1065
+#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046
+
+#define PCI_VENDOR_ID_CIRRUS 0x1013
+#define PCI_DEVICE_ID_CIRRUS_7548 0x0038
+#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0
+#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4
+#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
+#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
+#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8
+#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc
+#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0
+#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4
+#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6
+#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
+#define PCI_DEVICE_ID_CIRRUS_6832 0x1110
+#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
+#define PCI_DEVICE_ID_CIRRUS_4610 0x6001
+#define PCI_DEVICE_ID_CIRRUS_4612 0x6003
+#define PCI_DEVICE_ID_CIRRUS_4615 0x6004
+
+#define PCI_VENDOR_ID_IBM 0x1014
+#define PCI_DEVICE_ID_IBM_TR 0x0018
+#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e
+#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc
+#define PCI_DEVICE_ID_IBM_SNIPE 0x0180
+#define PCI_DEVICE_ID_IBM_CITRINE 0x028C
+#define PCI_DEVICE_ID_IBM_GEMSTONE 0xB166
+#define PCI_DEVICE_ID_IBM_OBSIDIAN 0x02BD
+#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_1 0x0031
+#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219
+#define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A
+#define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251
+#define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252
+
+#define PCI_VENDOR_ID_COMPEX2 0x101a
+#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005
+
+#define PCI_VENDOR_ID_WD 0x101c
+#define PCI_DEVICE_ID_WD_90C 0xc24a
+
+#define PCI_VENDOR_ID_AMI 0x101e
+#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960
+#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010
+#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060
+
+#define PCI_VENDOR_ID_AMD 0x1022
+#define PCI_DEVICE_ID_AMD_K8_NB 0x1100
+#define PCI_DEVICE_ID_AMD_LANCE 0x2000
+#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
+#define PCI_DEVICE_ID_AMD_SCSI 0x2020
+#define PCI_DEVICE_ID_AMD_SERENADE 0x36c0
+#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006
+#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007
+#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C
+#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E
+#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401
+#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409
+#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B
+#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410
+#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411
+#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413
+#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440
+#define PCI_DEVICE_ID_AMD_OPUS_7441 0x7441
+#define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443
+#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443
+#define PCI_DEVICE_ID_AMD_OPUS_7445 0x7445
+#define PCI_DEVICE_ID_AMD_8111_LPC 0x7468
+#define PCI_DEVICE_ID_AMD_8111_IDE 0x7469
+#define PCI_DEVICE_ID_AMD_8111_SMBUS2 0x746a
+#define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b
+#define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d
+#define PCI_DEVICE_ID_AMD_8151_0 0x7454
+#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
+#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451
+#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090
+#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091
+#define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093
+#define PCI_DEVICE_ID_AMD_CS5536_OHC 0x2094
+#define PCI_DEVICE_ID_AMD_CS5536_EHC 0x2095
+#define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096
+#define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097
+#define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A
+
+#define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081
+#define PCI_DEVICE_ID_AMD_LX_AES 0x2082
+
+#define PCI_VENDOR_ID_TRIDENT 0x1023
+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000
+#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001
+#define PCI_DEVICE_ID_TRIDENT_9320 0x9320
+#define PCI_DEVICE_ID_TRIDENT_9388 0x9388
+#define PCI_DEVICE_ID_TRIDENT_9397 0x9397
+#define PCI_DEVICE_ID_TRIDENT_939A 0x939A
+#define PCI_DEVICE_ID_TRIDENT_9520 0x9520
+#define PCI_DEVICE_ID_TRIDENT_9525 0x9525
+#define PCI_DEVICE_ID_TRIDENT_9420 0x9420
+#define PCI_DEVICE_ID_TRIDENT_9440 0x9440
+#define PCI_DEVICE_ID_TRIDENT_9660 0x9660
+#define PCI_DEVICE_ID_TRIDENT_9750 0x9750
+#define PCI_DEVICE_ID_TRIDENT_9850 0x9850
+#define PCI_DEVICE_ID_TRIDENT_9880 0x9880
+#define PCI_DEVICE_ID_TRIDENT_8400 0x8400
+#define PCI_DEVICE_ID_TRIDENT_8420 0x8420
+#define PCI_DEVICE_ID_TRIDENT_8500 0x8500
+
+#define PCI_VENDOR_ID_AI 0x1025
+#define PCI_DEVICE_ID_AI_M1435 0x1435
+
+#define PCI_VENDOR_ID_DELL 0x1028
+#define PCI_DEVICE_ID_DELL_RACIII 0x0008
+#define PCI_DEVICE_ID_DELL_RAC4 0x0012
+#define PCI_DEVICE_ID_DELL_PERC5 0x0015
+
+#define PCI_VENDOR_ID_MATROX 0x102B
+#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518
+#define PCI_DEVICE_ID_MATROX_MIL 0x0519
+#define PCI_DEVICE_ID_MATROX_MYS 0x051A
+#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b
+#define PCI_DEVICE_ID_MATROX_MYS_AGP 0x051e
+#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f
+#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10
+#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000
+#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001
+#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
+#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521
+#define PCI_DEVICE_ID_MATROX_G400 0x0525
+#define PCI_DEVICE_ID_MATROX_G550 0x2527
+#define PCI_DEVICE_ID_MATROX_VIA 0x4536
+
+#define PCI_VENDOR_ID_CT 0x102c
+#define PCI_DEVICE_ID_CT_69000 0x00c0
+#define PCI_DEVICE_ID_CT_65545 0x00d8
+#define PCI_DEVICE_ID_CT_65548 0x00dc
+#define PCI_DEVICE_ID_CT_65550 0x00e0
+#define PCI_DEVICE_ID_CT_65554 0x00e4
+#define PCI_DEVICE_ID_CT_65555 0x00e5
+
+#define PCI_VENDOR_ID_MIRO 0x1031
+#define PCI_DEVICE_ID_MIRO_36050 0x5601
+#define PCI_DEVICE_ID_MIRO_DC10PLUS 0x7efe
+#define PCI_DEVICE_ID_MIRO_DC30PLUS 0xd801
+
+#define PCI_VENDOR_ID_NEC 0x1033
+#define PCI_DEVICE_ID_NEC_CBUS_1 0x0001
+#define PCI_DEVICE_ID_NEC_LOCAL 0x0002
+#define PCI_DEVICE_ID_NEC_ATM 0x0003
+#define PCI_DEVICE_ID_NEC_R4000 0x0004
+#define PCI_DEVICE_ID_NEC_486 0x0005
+#define PCI_DEVICE_ID_NEC_ACCEL_1 0x0006
+#define PCI_DEVICE_ID_NEC_UXBUS 0x0007
+#define PCI_DEVICE_ID_NEC_ACCEL_2 0x0008
+#define PCI_DEVICE_ID_NEC_GRAPH 0x0009
+#define PCI_DEVICE_ID_NEC_VL 0x0016
+#define PCI_DEVICE_ID_NEC_STARALPHA2 0x002c
+#define PCI_DEVICE_ID_NEC_CBUS_2 0x002d
+#define PCI_DEVICE_ID_NEC_USB 0x0035
+#define PCI_DEVICE_ID_NEC_CBUS_3 0x003b
+#define PCI_DEVICE_ID_NEC_NAPCCARD 0x003e
+#define PCI_DEVICE_ID_NEC_PCX2 0x0046
+#define PCI_DEVICE_ID_NEC_NILE4 0x005a
+#define PCI_DEVICE_ID_NEC_VRC5476 0x009b
+#define PCI_DEVICE_ID_NEC_VRC4173 0x00a5
+#define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6
+#define PCI_DEVICE_ID_NEC_PC9821CS01 0x800c
+#define PCI_DEVICE_ID_NEC_PC9821NRB06 0x800d
+
+#define PCI_VENDOR_ID_FD 0x1036
+#define PCI_DEVICE_ID_FD_36C70 0x0000
+
+#define PCI_VENDOR_ID_SI 0x1039
+#define PCI_DEVICE_ID_SI_5591_AGP 0x0001
+#define PCI_DEVICE_ID_SI_6202 0x0002
+#define PCI_DEVICE_ID_SI_503 0x0008
+#define PCI_DEVICE_ID_SI_ACPI 0x0009
+#define PCI_DEVICE_ID_SI_SMBUS 0x0016
+#define PCI_DEVICE_ID_SI_LPC 0x0018
+#define PCI_DEVICE_ID_SI_5597_VGA 0x0200
+#define PCI_DEVICE_ID_SI_6205 0x0205
+#define PCI_DEVICE_ID_SI_501 0x0406
+#define PCI_DEVICE_ID_SI_496 0x0496
+#define PCI_DEVICE_ID_SI_300 0x0300
+#define PCI_DEVICE_ID_SI_315H 0x0310
+#define PCI_DEVICE_ID_SI_315 0x0315
+#define PCI_DEVICE_ID_SI_315PRO 0x0325
+#define PCI_DEVICE_ID_SI_530 0x0530
+#define PCI_DEVICE_ID_SI_540 0x0540
+#define PCI_DEVICE_ID_SI_550 0x0550
+#define PCI_DEVICE_ID_SI_540_VGA 0x5300
+#define PCI_DEVICE_ID_SI_550_VGA 0x5315
+#define PCI_DEVICE_ID_SI_620 0x0620
+#define PCI_DEVICE_ID_SI_630 0x0630
+#define PCI_DEVICE_ID_SI_633 0x0633
+#define PCI_DEVICE_ID_SI_635 0x0635
+#define PCI_DEVICE_ID_SI_640 0x0640
+#define PCI_DEVICE_ID_SI_645 0x0645
+#define PCI_DEVICE_ID_SI_646 0x0646
+#define PCI_DEVICE_ID_SI_648 0x0648
+#define PCI_DEVICE_ID_SI_650 0x0650
+#define PCI_DEVICE_ID_SI_651 0x0651
+#define PCI_DEVICE_ID_SI_655 0x0655
+#define PCI_DEVICE_ID_SI_661 0x0661
+#define PCI_DEVICE_ID_SI_730 0x0730
+#define PCI_DEVICE_ID_SI_733 0x0733
+#define PCI_DEVICE_ID_SI_630_VGA 0x6300
+#define PCI_DEVICE_ID_SI_735 0x0735
+#define PCI_DEVICE_ID_SI_740 0x0740
+#define PCI_DEVICE_ID_SI_741 0x0741
+#define PCI_DEVICE_ID_SI_745 0x0745
+#define PCI_DEVICE_ID_SI_746 0x0746
+#define PCI_DEVICE_ID_SI_755 0x0755
+#define PCI_DEVICE_ID_SI_760 0x0760
+#define PCI_DEVICE_ID_SI_900 0x0900
+#define PCI_DEVICE_ID_SI_961 0x0961
+#define PCI_DEVICE_ID_SI_962 0x0962
+#define PCI_DEVICE_ID_SI_963 0x0963
+#define PCI_DEVICE_ID_SI_965 0x0965
+#define PCI_DEVICE_ID_SI_966 0x0966
+#define PCI_DEVICE_ID_SI_968 0x0968
+#define PCI_DEVICE_ID_SI_5511 0x5511
+#define PCI_DEVICE_ID_SI_5513 0x5513
+#define PCI_DEVICE_ID_SI_5517 0x5517
+#define PCI_DEVICE_ID_SI_5518 0x5518
+#define PCI_DEVICE_ID_SI_5571 0x5571
+#define PCI_DEVICE_ID_SI_5581 0x5581
+#define PCI_DEVICE_ID_SI_5582 0x5582
+#define PCI_DEVICE_ID_SI_5591 0x5591
+#define PCI_DEVICE_ID_SI_5596 0x5596
+#define PCI_DEVICE_ID_SI_5597 0x5597
+#define PCI_DEVICE_ID_SI_5598 0x5598
+#define PCI_DEVICE_ID_SI_5600 0x5600
+#define PCI_DEVICE_ID_SI_7012 0x7012
+#define PCI_DEVICE_ID_SI_7013 0x7013
+#define PCI_DEVICE_ID_SI_7016 0x7016
+#define PCI_DEVICE_ID_SI_7018 0x7018
+
+#define PCI_VENDOR_ID_HP 0x103c
+#define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008
+#define PCI_DEVICE_ID_HP_VISUALIZE_FX2 0x100a
+#define PCI_DEVICE_ID_HP_TACHYON 0x1028
+#define PCI_DEVICE_ID_HP_TACHLITE 0x1029
+#define PCI_DEVICE_ID_HP_J2585A 0x1030
+#define PCI_DEVICE_ID_HP_J2585B 0x1031
+#define PCI_DEVICE_ID_HP_J2973A 0x1040
+#define PCI_DEVICE_ID_HP_J2970A 0x1042
+#define PCI_DEVICE_ID_HP_DIVA 0x1048
+#define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
+#define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
+#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
+#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1
+#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b
+#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
+#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
+#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
+#define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a
+#define PCI_DEVICE_ID_HP_PCIX_LBA 0x122e
+#define PCI_DEVICE_ID_HP_SX1000_IOC 0x127c
+#define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282
+#define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290
+#define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301
+#define PCI_DEVICE_ID_HP_DIVA_HURRICANE 0x132a
+#define PCI_DEVICE_ID_HP_CISSA 0x3220
+#define PCI_DEVICE_ID_HP_CISSC 0x3230
+#define PCI_DEVICE_ID_HP_CISSD 0x3238
+#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
+
+#define PCI_VENDOR_ID_PCTECH 0x1042
+#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000
+#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001
+#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020
+
+#define PCI_VENDOR_ID_ASUSTEK 0x1043
+#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675
+
+#define PCI_VENDOR_ID_DPT 0x1044
+#define PCI_DEVICE_ID_DPT 0xa400
+
+#define PCI_VENDOR_ID_OPTI 0x1045
+#define PCI_DEVICE_ID_OPTI_82C558 0xc558
+#define PCI_DEVICE_ID_OPTI_82C621 0xc621
+#define PCI_DEVICE_ID_OPTI_82C700 0xc700
+#define PCI_DEVICE_ID_OPTI_82C825 0xd568
+
+#define PCI_VENDOR_ID_ELSA 0x1048
+#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000
+#define PCI_DEVICE_ID_ELSA_QS3000 0x3000
+
+#define PCI_VENDOR_ID_BUSLOGIC 0x104B
+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140
+#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040
+#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130
+
+#define PCI_VENDOR_ID_TI 0x104c
+#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
+#define PCI_DEVICE_ID_TI_4450 0x8011
+#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
+#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034
+#define PCI_DEVICE_ID_TI_X515 0x8036
+#define PCI_DEVICE_ID_TI_XX12 0x8039
+#define PCI_DEVICE_ID_TI_1130 0xac12
+#define PCI_DEVICE_ID_TI_1031 0xac13
+#define PCI_DEVICE_ID_TI_1131 0xac15
+#define PCI_DEVICE_ID_TI_1250 0xac16
+#define PCI_DEVICE_ID_TI_1220 0xac17
+#define PCI_DEVICE_ID_TI_1221 0xac19
+#define PCI_DEVICE_ID_TI_1210 0xac1a
+#define PCI_DEVICE_ID_TI_1450 0xac1b
+#define PCI_DEVICE_ID_TI_1225 0xac1c
+#define PCI_DEVICE_ID_TI_1251A 0xac1d
+#define PCI_DEVICE_ID_TI_1211 0xac1e
+#define PCI_DEVICE_ID_TI_1251B 0xac1f
+#define PCI_DEVICE_ID_TI_4410 0xac41
+#define PCI_DEVICE_ID_TI_4451 0xac42
+#define PCI_DEVICE_ID_TI_4510 0xac44
+#define PCI_DEVICE_ID_TI_4520 0xac46
+#define PCI_DEVICE_ID_TI_7510 0xac47
+#define PCI_DEVICE_ID_TI_7610 0xac48
+#define PCI_DEVICE_ID_TI_7410 0xac49
+#define PCI_DEVICE_ID_TI_1410 0xac50
+#define PCI_DEVICE_ID_TI_1420 0xac51
+#define PCI_DEVICE_ID_TI_1451A 0xac52
+#define PCI_DEVICE_ID_TI_1620 0xac54
+#define PCI_DEVICE_ID_TI_1520 0xac55
+#define PCI_DEVICE_ID_TI_1510 0xac56
+#define PCI_DEVICE_ID_TI_X620 0xac8d
+#define PCI_DEVICE_ID_TI_X420 0xac8e
+
+#define PCI_VENDOR_ID_SONY 0x104d
+
+#define PCI_VENDOR_ID_WINBOND2 0x1050
+#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a
+#define PCI_DEVICE_ID_WINBOND2_6692 0x6692
+
+#define PCI_VENDOR_ID_ANIGMA 0x1051
+#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100
+
+#define PCI_VENDOR_ID_EFAR 0x1055
+#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130
+#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463
+
+#define PCI_VENDOR_ID_MOTOROLA 0x1057
+#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001
+#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002
+#define PCI_DEVICE_ID_MOTOROLA_MPC107 0x0004
+#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
+#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802
+#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803
+#define PCI_DEVICE_ID_MOTOROLA_HARRIER 0x480b
+#define PCI_DEVICE_ID_MOTOROLA_MPC5200 0x5803
+#define PCI_DEVICE_ID_MOTOROLA_MPC5200B 0x5809
+
+#define PCI_VENDOR_ID_PROMISE 0x105a
+#define PCI_DEVICE_ID_PROMISE_20265 0x0d30
+#define PCI_DEVICE_ID_PROMISE_20267 0x4d30
+#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
+#define PCI_DEVICE_ID_PROMISE_20262 0x4d38
+#define PCI_DEVICE_ID_PROMISE_20263 0x0D38
+#define PCI_DEVICE_ID_PROMISE_20268 0x4d68
+#define PCI_DEVICE_ID_PROMISE_20269 0x4d69
+#define PCI_DEVICE_ID_PROMISE_20270 0x6268
+#define PCI_DEVICE_ID_PROMISE_20271 0x6269
+#define PCI_DEVICE_ID_PROMISE_20275 0x1275
+#define PCI_DEVICE_ID_PROMISE_20276 0x5275
+#define PCI_DEVICE_ID_PROMISE_20277 0x7275
+
+#define PCI_VENDOR_ID_UMC 0x1060
+#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
+#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
+#define PCI_DEVICE_ID_UMC_UM8886A 0x886a
+
+#define PCI_VENDOR_ID_MYLEX 0x1069
+#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001
+#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002
+#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010
+#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020
+#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050
+#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56
+#define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166
+
+#define PCI_VENDOR_ID_APPLE 0x106b
+#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
+#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
+#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMACP 0x0024
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d
+#define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032
+#define PCI_DEVICE_ID_APPLE_UNI_N_ATA 0x0033
+#define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034
+#define PCI_DEVICE_ID_APPLE_IPID_ATA100 0x003b
+#define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043
+#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b
+#define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c
+#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050
+#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
+#define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058
+#define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059
+#define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
+#define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
+#define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
+#define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b
+#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
+
+#define PCI_VENDOR_ID_YAMAHA 0x1073
+#define PCI_DEVICE_ID_YAMAHA_724 0x0004
+#define PCI_DEVICE_ID_YAMAHA_724F 0x000d
+#define PCI_DEVICE_ID_YAMAHA_740 0x000a
+#define PCI_DEVICE_ID_YAMAHA_740C 0x000c
+#define PCI_DEVICE_ID_YAMAHA_744 0x0010
+#define PCI_DEVICE_ID_YAMAHA_754 0x0012
+
+#define PCI_VENDOR_ID_QLOGIC 0x1077
+#define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016
+#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020
+#define PCI_DEVICE_ID_QLOGIC_ISP1080 0x1080
+#define PCI_DEVICE_ID_QLOGIC_ISP12160 0x1216
+#define PCI_DEVICE_ID_QLOGIC_ISP1240 0x1240
+#define PCI_DEVICE_ID_QLOGIC_ISP1280 0x1280
+#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100
+#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200
+#define PCI_DEVICE_ID_QLOGIC_ISP2300 0x2300
+#define PCI_DEVICE_ID_QLOGIC_ISP2312 0x2312
+#define PCI_DEVICE_ID_QLOGIC_ISP2322 0x2322
+#define PCI_DEVICE_ID_QLOGIC_ISP6312 0x6312
+#define PCI_DEVICE_ID_QLOGIC_ISP6322 0x6322
+#define PCI_DEVICE_ID_QLOGIC_ISP2422 0x2422
+#define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432
+#define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512
+#define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522
+#define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422
+#define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432
+
+#define PCI_VENDOR_ID_CYRIX 0x1078
+#define PCI_DEVICE_ID_CYRIX_5510 0x0000
+#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001
+#define PCI_DEVICE_ID_CYRIX_5520 0x0002
+#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100
+#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102
+#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103
+#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104
+
+#define PCI_VENDOR_ID_CONTAQ 0x1080
+#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693
+
+#define PCI_VENDOR_ID_OLICOM 0x108d
+#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012
+#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013
+#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014
+
+#define PCI_VENDOR_ID_SUN 0x108e
+#define PCI_DEVICE_ID_SUN_EBUS 0x1000
+#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001
+#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100
+#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101
+#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102
+#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103
+#define PCI_DEVICE_ID_SUN_GEM 0x2bad
+#define PCI_DEVICE_ID_SUN_SIMBA 0x5000
+#define PCI_DEVICE_ID_SUN_PBM 0x8000
+#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001
+#define PCI_DEVICE_ID_SUN_SABRE 0xa000
+#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
+#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801
+#define PCI_DEVICE_ID_SUN_CASSINI 0xabba
+
+#define PCI_VENDOR_ID_CMD 0x1095
+#define PCI_DEVICE_ID_CMD_643 0x0643
+#define PCI_DEVICE_ID_CMD_646 0x0646
+#define PCI_DEVICE_ID_CMD_648 0x0648
+#define PCI_DEVICE_ID_CMD_649 0x0649
+
+#define PCI_DEVICE_ID_SII_680 0x0680
+#define PCI_DEVICE_ID_SII_3112 0x3112
+#define PCI_DEVICE_ID_SII_1210SA 0x0240
+
+#define PCI_VENDOR_ID_BROOKTREE 0x109e
+#define PCI_DEVICE_ID_BROOKTREE_878 0x0878
+#define PCI_DEVICE_ID_BROOKTREE_879 0x0879
+
+#define PCI_VENDOR_ID_SGI 0x10a9
+#define PCI_DEVICE_ID_SGI_IOC3 0x0003
+#define PCI_DEVICE_ID_SGI_IOC4 0x100a
+#define PCI_VENDOR_ID_SGI_LITHIUM 0x1002
+
+#define PCI_VENDOR_ID_WINBOND 0x10ad
+#define PCI_DEVICE_ID_WINBOND_82C105 0x0105
+#define PCI_DEVICE_ID_WINBOND_83C553 0x0565
+
+#define PCI_VENDOR_ID_PLX 0x10b5
+#define PCI_DEVICE_ID_PLX_R685 0x1030
+#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a
+#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076
+#define PCI_DEVICE_ID_PLX_1077 0x1077
+#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103
+#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151
+#define PCI_DEVICE_ID_PLX_R753 0x1152
+#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
+#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
+#define PCI_DEVICE_ID_PLX_9050 0x9050
+#define PCI_DEVICE_ID_PLX_9080 0x9080
+#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
+
+#define PCI_VENDOR_ID_MADGE 0x10b6
+#define PCI_DEVICE_ID_MADGE_MK2 0x0002
+
+#define PCI_VENDOR_ID_3COM 0x10b7
+#define PCI_DEVICE_ID_3COM_3C985 0x0001
+#define PCI_DEVICE_ID_3COM_3C940 0x1700
+#define PCI_DEVICE_ID_3COM_3C339 0x3390
+#define PCI_DEVICE_ID_3COM_3C359 0x3590
+#define PCI_DEVICE_ID_3COM_3C940B 0x80eb
+#define PCI_DEVICE_ID_3COM_3CR990 0x9900
+#define PCI_DEVICE_ID_3COM_3CR990_TX_95 0x9902
+#define PCI_DEVICE_ID_3COM_3CR990_TX_97 0x9903
+#define PCI_DEVICE_ID_3COM_3CR990B 0x9904
+#define PCI_DEVICE_ID_3COM_3CR990_FX 0x9905
+#define PCI_DEVICE_ID_3COM_3CR990SVR95 0x9908
+#define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909
+#define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a
+
+#define PCI_VENDOR_ID_AL 0x10b9
+#define PCI_DEVICE_ID_AL_M1533 0x1533
+#define PCI_DEVICE_ID_AL_M1535 0x1535
+#define PCI_DEVICE_ID_AL_M1541 0x1541
+#define PCI_DEVICE_ID_AL_M1563 0x1563
+#define PCI_DEVICE_ID_AL_M1621 0x1621
+#define PCI_DEVICE_ID_AL_M1631 0x1631
+#define PCI_DEVICE_ID_AL_M1632 0x1632
+#define PCI_DEVICE_ID_AL_M1641 0x1641
+#define PCI_DEVICE_ID_AL_M1644 0x1644
+#define PCI_DEVICE_ID_AL_M1647 0x1647
+#define PCI_DEVICE_ID_AL_M1651 0x1651
+#define PCI_DEVICE_ID_AL_M1671 0x1671
+#define PCI_DEVICE_ID_AL_M1681 0x1681
+#define PCI_DEVICE_ID_AL_M1683 0x1683
+#define PCI_DEVICE_ID_AL_M1689 0x1689
+#define PCI_DEVICE_ID_AL_M5219 0x5219
+#define PCI_DEVICE_ID_AL_M5228 0x5228
+#define PCI_DEVICE_ID_AL_M5229 0x5229
+#define PCI_DEVICE_ID_AL_M5451 0x5451
+#define PCI_DEVICE_ID_AL_M7101 0x7101
+
+#define PCI_VENDOR_ID_NEOMAGIC 0x10c8
+#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
+#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
+#define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016
+
+#define PCI_VENDOR_ID_TCONRAD 0x10da
+#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508
+
+#define PCI_VENDOR_ID_NVIDIA 0x10de
+#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020
+#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028
+#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029
+#define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a
+#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C
+#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036
+#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037
+#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_LE 0x0042
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x0045
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_4000 0x004E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS 0x0052
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055
+#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
+#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
+#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
+#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
+#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
+#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069
+#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085
+#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086
+#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089
+#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a
+#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800 0x0098
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800_GTX 0x0099
+#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0
+#define PCI_DEVICE_ID_GEFORCE_6800A 0x00c1
+#define PCI_DEVICE_ID_GEFORCE_6800A_LE 0x00c2
+#define PCI_DEVICE_ID_GEFORCE_GO_6800 0x00c8
+#define PCI_DEVICE_ID_GEFORCE_GO_6800_ULTRA 0x00c9
+#define PCI_DEVICE_ID_QUADRO_FX_GO1400 0x00cc
+#define PCI_DEVICE_ID_QUADRO_FX_1400 0x00ce
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
+#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9
+#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
+#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6
+#define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT1 0x00f1
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT2 0x00f2
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6200_ALT1 0x00f3
+#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x00f9
+#define PCIE_DEVICE_ID_NVIDIA_QUADRO_NVS280 0x00fd
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101
+#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO 0x0112
+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600_GT 0x0140
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600 0x0141
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6610_XL 0x0145
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_540 0x014E
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200 0x014F
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152
+#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200_TURBOCACHE 0x0161
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200 0x0164
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250 0x0166
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200_1 0x0167
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250_1 0x0168
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460 0x0170
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440 0x0171
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420 0x0172
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_SE 0x0173
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO 0x0174
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO 0x0175
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32 0x0176
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_460_GO 0x0177
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL 0x0178
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64 0x0179
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_200 0x017A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL 0x017B
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL 0x017C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_410_GO_M16 0x017D
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_MAC 0x0189
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_280_NVS 0x018A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_380_XGL 0x018B
+#define PCI_DEVICE_ID_NVIDIA_IGEFORCE2 0x01a0
+#define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4
+#define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc
+#define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1
+#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_2 0x0202
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_DDC 0x0203
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B 0x0211
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_LE 0x0212
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_GT 0x0215
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600 0x0250
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400 0x0251
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200 0x0253
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS 0x0264
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F
+#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
+#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_4200_GO 0x0286
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_980_XGL 0x0288
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_780_XGL 0x0289
+#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700_GOGL 0x028C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA 0x0301
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800 0x0302
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_2000 0x0308
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1000 0x0309
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA 0x0311
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600 0x0312
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600SE 0x0314
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5600 0x031A
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5650 0x031B
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO700 0x031C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200 0x0320
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA 0x0321
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1 0x0322
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200SE 0x0323
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5200 0x0324
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250 0x0325
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5500 0x0326
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5100 0x0327
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250_32 0x0328
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200 0x0329
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_NVS_280_PCI 0x032A
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_500 0x032B
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5300 0x032C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5100 0x032D
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA 0x0330
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900 0x0331
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900XT 0x0332
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA 0x0333
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900ZT 0x0334
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_3000 0x0338
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_700 0x033F
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA 0x0341
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700 0x0342
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700LE 0x0343
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700VE 0x0344
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_1 0x0347
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E
+#define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372
+#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373
+#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5
+#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC
+#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE
+#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448
+#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450
+#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
+#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
+#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
+
+#define PCI_VENDOR_ID_IMS 0x10e0
+#define PCI_DEVICE_ID_IMS_TT128 0x9128
+#define PCI_DEVICE_ID_IMS_TT3D 0x9135
+
+#define PCI_VENDOR_ID_INTERG 0x10ea
+#define PCI_DEVICE_ID_INTERG_1682 0x1682
+#define PCI_DEVICE_ID_INTERG_2000 0x2000
+#define PCI_DEVICE_ID_INTERG_2010 0x2010
+#define PCI_DEVICE_ID_INTERG_5000 0x5000
+#define PCI_DEVICE_ID_INTERG_5050 0x5050
+
+#define PCI_VENDOR_ID_REALTEK 0x10ec
+#define PCI_DEVICE_ID_REALTEK_8139 0x8139
+
+#define PCI_VENDOR_ID_XILINX 0x10ee
+#define PCI_DEVICE_ID_RME_DIGI96 0x3fc0
+#define PCI_DEVICE_ID_RME_DIGI96_8 0x3fc1
+#define PCI_DEVICE_ID_RME_DIGI96_8_PRO 0x3fc2
+#define PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST 0x3fc3
+#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5
+#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6
+
+#define PCI_VENDOR_ID_INIT 0x1101
+
+#define PCI_VENDOR_ID_CREATIVE 0x1102
+#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002
+
+#define PCI_VENDOR_ID_ECTIVA 0x1102
+#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938
+
+#define PCI_VENDOR_ID_TTI 0x1103
+#define PCI_DEVICE_ID_TTI_HPT343 0x0003
+#define PCI_DEVICE_ID_TTI_HPT366 0x0004
+#define PCI_DEVICE_ID_TTI_HPT372 0x0005
+#define PCI_DEVICE_ID_TTI_HPT302 0x0006
+#define PCI_DEVICE_ID_TTI_HPT371 0x0007
+#define PCI_DEVICE_ID_TTI_HPT374 0x0008
+#define PCI_DEVICE_ID_TTI_HPT372N 0x0009
+
+#define PCI_VENDOR_ID_VIA 0x1106
+#define PCI_DEVICE_ID_VIA_8763_0 0x0198
+#define PCI_DEVICE_ID_VIA_8380_0 0x0204
+#define PCI_DEVICE_ID_VIA_3238_0 0x0238
+#define PCI_DEVICE_ID_VIA_PT880 0x0258
+#define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308
+#define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259
+#define PCI_DEVICE_ID_VIA_3269_0 0x0269
+#define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282
+#define PCI_DEVICE_ID_VIA_3296_0 0x0296
+#define PCI_DEVICE_ID_VIA_8363_0 0x0305
+#define PCI_DEVICE_ID_VIA_P4M800CE 0x0314
+#define PCI_DEVICE_ID_VIA_8371_0 0x0391
+#define PCI_DEVICE_ID_VIA_8501_0 0x0501
+#define PCI_DEVICE_ID_VIA_82C561 0x0561
+#define PCI_DEVICE_ID_VIA_82C586_1 0x0571
+#define PCI_DEVICE_ID_VIA_82C576 0x0576
+#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x0581
+#define PCI_DEVICE_ID_VIA_82C586_0 0x0586
+#define PCI_DEVICE_ID_VIA_82C596 0x0596
+#define PCI_DEVICE_ID_VIA_82C597_0 0x0597
+#define PCI_DEVICE_ID_VIA_82C598_0 0x0598
+#define PCI_DEVICE_ID_VIA_8601_0 0x0601
+#define PCI_DEVICE_ID_VIA_8605_0 0x0605
+#define PCI_DEVICE_ID_VIA_82C686 0x0686
+#define PCI_DEVICE_ID_VIA_82C691_0 0x0691
+#define PCI_DEVICE_ID_VIA_82C576_1 0x1571
+#define PCI_DEVICE_ID_VIA_82C586_2 0x3038
+#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
+#define PCI_DEVICE_ID_VIA_82C596_3 0x3050
+#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051
+#define PCI_DEVICE_ID_VIA_82C686_4 0x3057
+#define PCI_DEVICE_ID_VIA_82C686_5 0x3058
+#define PCI_DEVICE_ID_VIA_8233_5 0x3059
+#define PCI_DEVICE_ID_VIA_8233_0 0x3074
+#define PCI_DEVICE_ID_VIA_8633_0 0x3091
+#define PCI_DEVICE_ID_VIA_8367_0 0x3099
+#define PCI_DEVICE_ID_VIA_8653_0 0x3101
+#define PCI_DEVICE_ID_VIA_8622 0x3102
+#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104
+#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
+#define PCI_DEVICE_ID_VIA_8361 0x3112
+#define PCI_DEVICE_ID_VIA_XM266 0x3116
+#define PCI_DEVICE_ID_VIA_612X 0x3119
+#define PCI_DEVICE_ID_VIA_862X_0 0x3123
+#define PCI_DEVICE_ID_VIA_8753_0 0x3128
+#define PCI_DEVICE_ID_VIA_8233A 0x3147
+#define PCI_DEVICE_ID_VIA_8703_51_0 0x3148
+#define PCI_DEVICE_ID_VIA_8237_SATA 0x3149
+#define PCI_DEVICE_ID_VIA_XN266 0x3156
+#define PCI_DEVICE_ID_VIA_6410 0x3164
+#define PCI_DEVICE_ID_VIA_8754C_0 0x3168
+#define PCI_DEVICE_ID_VIA_8235 0x3177
+#define PCI_DEVICE_ID_VIA_8385_0 0x3188
+#define PCI_DEVICE_ID_VIA_8377_0 0x3189
+#define PCI_DEVICE_ID_VIA_8378_0 0x3205
+#define PCI_DEVICE_ID_VIA_8783_0 0x3208
+#define PCI_DEVICE_ID_VIA_8237 0x3227
+#define PCI_DEVICE_ID_VIA_8251 0x3287
+#define PCI_DEVICE_ID_VIA_8237A 0x3337
+#define PCI_DEVICE_ID_VIA_8231 0x8231
+#define PCI_DEVICE_ID_VIA_8231_4 0x8235
+#define PCI_DEVICE_ID_VIA_8365_1 0x8305
+#define PCI_DEVICE_ID_VIA_CX700 0x8324
+#define PCI_DEVICE_ID_VIA_8371_1 0x8391
+#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
+#define PCI_DEVICE_ID_VIA_838X_1 0xB188
+#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
+
+#define PCI_VENDOR_ID_SIEMENS 0x110A
+#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
+
+#define PCI_VENDOR_ID_VORTEX 0x1119
+#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000
+#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001
+#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002
+#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003
+#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004
+#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005
+#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006
+#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007
+#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008
+#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009
+#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a
+#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b
+#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c
+#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d
+#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100
+#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101
+#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102
+#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103
+#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104
+#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105
+
+#define PCI_VENDOR_ID_EF 0x111a
+#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000
+#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002
+#define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003
+#define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005
+
+#define PCI_VENDOR_ID_IDT 0x111d
+#define PCI_DEVICE_ID_IDT_IDT77201 0x0001
+
+#define PCI_VENDOR_ID_FORE 0x1127
+#define PCI_DEVICE_ID_FORE_PCA200E 0x0300
+
+#define PCI_VENDOR_ID_PHILIPS 0x1131
+#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146
+#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730
+
+#define PCI_VENDOR_ID_EICON 0x1133
+#define PCI_DEVICE_ID_EICON_DIVA20 0xe002
+#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004
+#define PCI_DEVICE_ID_EICON_DIVA201 0xe005
+#define PCI_DEVICE_ID_EICON_DIVA202 0xe00b
+#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010
+#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012
+#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013
+#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014
+
+#define PCI_VENDOR_ID_ZIATECH 0x1138
+#define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550
+
+#define PCI_VENDOR_ID_SYSKONNECT 0x1148
+#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200
+#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300
+#define PCI_DEVICE_ID_SYSKONNECT_YU 0x4320
+#define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400
+#define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500
+
+#define PCI_VENDOR_ID_DIGI 0x114f
+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070
+#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071
+#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072
+#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073
+#define PCI_DEVICE_ID_NEO_2DB9 0x00C8
+#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9
+#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
+#define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB
+
+#define PCI_VENDOR_ID_XIRCOM 0x115d
+#define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101
+#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103
+
+#define PCI_VENDOR_ID_SERVERWORKS 0x1166
+#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008
+#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
+#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
+#define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
+#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
+#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
+#define PCI_DEVICE_ID_SERVERWORKS_HT1000SB 0x0205
+#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211
+#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213
+#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
+#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227
+
+#define PCI_VENDOR_ID_SBE 0x1176
+#define PCI_DEVICE_ID_SBE_WANXL100 0x0301
+#define PCI_DEVICE_ID_SBE_WANXL200 0x0302
+#define PCI_DEVICE_ID_SBE_WANXL400 0x0104
+
+#define PCI_VENDOR_ID_TOSHIBA 0x1179
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO 0x0102
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_1 0x0103
+#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_2 0x0105
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
+#define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
+
+#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
+#define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030
+#define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108
+#define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3
+
+#define PCI_VENDOR_ID_RICOH 0x1180
+#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465
+#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
+#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
+#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
+#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
+#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
+
+#define PCI_VENDOR_ID_DLINK 0x1186
+#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
+
+#define PCI_VENDOR_ID_ARTOP 0x1191
+#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005
+#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006
+#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007
+#define PCI_DEVICE_ID_ARTOP_ATP865 0x0008
+#define PCI_DEVICE_ID_ARTOP_ATP865R 0x0009
+#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002
+#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010
+#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020
+#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030
+#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040
+#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050
+#define PCI_DEVICE_ID_ARTOP_8060 0x8060
+
+#define PCI_VENDOR_ID_ZEITNET 0x1193
+#define PCI_DEVICE_ID_ZEITNET_1221 0x0001
+#define PCI_DEVICE_ID_ZEITNET_1225 0x0002
+
+#define PCI_VENDOR_ID_FUJITSU_ME 0x119e
+#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001
+#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003
+
+#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9
+#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334
+
+#define PCI_VENDOR_ID_MARVELL 0x11ab
+#define PCI_DEVICE_ID_MARVELL_GT64111 0x4146
+#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430
+#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460
+#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480
+#define PCI_DEVICE_ID_MARVELL_GT96100 0x9652
+#define PCI_DEVICE_ID_MARVELL_GT96100A 0x9653
+
+#define PCI_VENDOR_ID_V3 0x11b0
+#define PCI_DEVICE_ID_V3_V960 0x0001
+#define PCI_DEVICE_ID_V3_V351 0x0002
+
+#define PCI_VENDOR_ID_ATT 0x11c1
+#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480
+
+#define PCI_VENDOR_ID_SPECIALIX 0x11cb
+#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000
+#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000
+#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004
+
+#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4
+#define PCI_DEVICE_ID_AD1889JS 0x1889
+
+#define PCI_DEVICE_ID_SEGA_BBA 0x1234
+
+#define PCI_VENDOR_ID_ZORAN 0x11de
+#define PCI_DEVICE_ID_ZORAN_36057 0x6057
+#define PCI_DEVICE_ID_ZORAN_36120 0x6120
+
+#define PCI_VENDOR_ID_COMPEX 0x11f6
+#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
+
+#define PCI_VENDOR_ID_RP 0x11fe
+#define PCI_DEVICE_ID_RP32INTF 0x0001
+#define PCI_DEVICE_ID_RP8INTF 0x0002
+#define PCI_DEVICE_ID_RP16INTF 0x0003
+#define PCI_DEVICE_ID_RP4QUAD 0x0004
+#define PCI_DEVICE_ID_RP8OCTA 0x0005
+#define PCI_DEVICE_ID_RP8J 0x0006
+#define PCI_DEVICE_ID_RP4J 0x0007
+#define PCI_DEVICE_ID_RP8SNI 0x0008
+#define PCI_DEVICE_ID_RP16SNI 0x0009
+#define PCI_DEVICE_ID_RPP4 0x000A
+#define PCI_DEVICE_ID_RPP8 0x000B
+#define PCI_DEVICE_ID_RP4M 0x000D
+#define PCI_DEVICE_ID_RP2_232 0x000E
+#define PCI_DEVICE_ID_RP2_422 0x000F
+#define PCI_DEVICE_ID_URP32INTF 0x0801
+#define PCI_DEVICE_ID_URP8INTF 0x0802
+#define PCI_DEVICE_ID_URP16INTF 0x0803
+#define PCI_DEVICE_ID_URP8OCTA 0x0805
+#define PCI_DEVICE_ID_UPCI_RM3_8PORT 0x080C
+#define PCI_DEVICE_ID_UPCI_RM3_4PORT 0x080D
+#define PCI_DEVICE_ID_CRP16INTF 0x0903
+
+#define PCI_VENDOR_ID_CYCLADES 0x120e
+#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100
+#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101
+#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102
+#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103
+#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104
+#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105
+#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200
+#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201
+#define PCI_DEVICE_ID_PC300_RX_2 0x0300
+#define PCI_DEVICE_ID_PC300_RX_1 0x0301
+#define PCI_DEVICE_ID_PC300_TE_2 0x0310
+#define PCI_DEVICE_ID_PC300_TE_1 0x0311
+#define PCI_DEVICE_ID_PC300_TE_M_2 0x0320
+#define PCI_DEVICE_ID_PC300_TE_M_1 0x0321
+
+#define PCI_VENDOR_ID_ESSENTIAL 0x120f
+#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001
+
+#define PCI_VENDOR_ID_O2 0x1217
+#define PCI_DEVICE_ID_O2_6729 0x6729
+#define PCI_DEVICE_ID_O2_6730 0x673a
+#define PCI_DEVICE_ID_O2_6832 0x6832
+#define PCI_DEVICE_ID_O2_6836 0x6836
+
+#define PCI_VENDOR_ID_3DFX 0x121a
+#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001
+#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002
+#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003
+#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005
+#define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009
+
+#define PCI_VENDOR_ID_AVM 0x1244
+#define PCI_DEVICE_ID_AVM_B1 0x0700
+#define PCI_DEVICE_ID_AVM_C4 0x0800
+#define PCI_DEVICE_ID_AVM_A1 0x0a00
+#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00
+#define PCI_DEVICE_ID_AVM_C2 0x1100
+#define PCI_DEVICE_ID_AVM_T1 0x1200
+
+#define PCI_VENDOR_ID_STALLION 0x124d
+
+#define PCI_VENDOR_ID_AT 0x1259
+#define PCI_SUBDEVICE_ID_AT_2700FX 0x2701
+#define PCI_SUBDEVICE_ID_AT_2701FX 0x2703
+
+#define PCI_VENDOR_ID_ESS 0x125d
+#define PCI_DEVICE_ID_ESS_ESS1968 0x1968
+#define PCI_DEVICE_ID_ESS_ESS1978 0x1978
+#define PCI_DEVICE_ID_ESS_ALLEGRO_1 0x1988
+#define PCI_DEVICE_ID_ESS_ALLEGRO 0x1989
+#define PCI_DEVICE_ID_ESS_CANYON3D_2LE 0x1990
+#define PCI_DEVICE_ID_ESS_CANYON3D_2 0x1992
+#define PCI_DEVICE_ID_ESS_MAESTRO3 0x1998
+#define PCI_DEVICE_ID_ESS_MAESTRO3_1 0x1999
+#define PCI_DEVICE_ID_ESS_MAESTRO3_HW 0x199a
+#define PCI_DEVICE_ID_ESS_MAESTRO3_2 0x199b
+
+#define PCI_VENDOR_ID_SATSAGEM 0x1267
+#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016
+
+#define PCI_VENDOR_ID_ENSONIQ 0x1274
+#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880
+#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000
+#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371
+
+#define PCI_VENDOR_ID_TRANSMETA 0x1279
+#define PCI_DEVICE_ID_EFFICEON 0x0060
+
+#define PCI_VENDOR_ID_ROCKWELL 0x127A
+
+#define PCI_VENDOR_ID_ITE 0x1283
+#define PCI_DEVICE_ID_ITE_IT8172G 0x8172
+#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801
+#define PCI_DEVICE_ID_ITE_8211 0x8211
+#define PCI_DEVICE_ID_ITE_8212 0x8212
+#define PCI_DEVICE_ID_ITE_8872 0x8872
+#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
+
+#define PCI_DEVICE_ID_ESS_ESS0100 0x0100
+
+#define PCI_VENDOR_ID_ALTEON 0x12ae
+
+#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ 0x000C
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_PTM 0x000D
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_NT960PCI 0x0100
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2 0x0201
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4 0x0202
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232 0x0300
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232 0x0301
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232 0x0302
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1 0x0310
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2 0x0311
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4 0x0312
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2 0x0320
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4 0x0321
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8 0x0322
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485 0x0330
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331
+#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332
+
+#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2
+#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018
+
+#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011
+#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041
+#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D
+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001
+#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010
+
+#define PCI_VENDOR_ID_AUREAL 0x12eb
+#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001
+#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002
+#define PCI_DEVICE_ID_AUREAL_ADVANTAGE 0x0003
+
+#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
+#define PCI_DEVICE_ID_LML_33R10 0x8a02
+
+#define PCI_VENDOR_ID_SIIG 0x131f
+#define PCI_SUBVENDOR_ID_SIIG 0x131f
+#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
+#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001
+#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011
+#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012
+#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020
+#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021
+#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030
+#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031
+#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035
+#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036
+#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050
+#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051
+#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052
+#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000
+#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001
+#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002
+#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020
+#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021
+#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030
+#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031
+#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041
+#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011
+#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012
+#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050
+#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051
+#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061
+#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062
+#define PCI_DEVICE_ID_SIIG_8S_20x_550 0x2080
+#define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081
+#define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082
+#define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050
+
+#define PCI_VENDOR_ID_RADISYS 0x1331
+
+#define PCI_VENDOR_ID_DOMEX 0x134a
+#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001
+
+#define PCI_VENDOR_ID_INTASHIELD 0x135a
+#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80
+
+#define PCI_VENDOR_ID_QUATECH 0x135C
+#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010
+#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020
+#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050
+#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060
+
+#define PCI_VENDOR_ID_SEALEVEL 0x135e
+#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202
+#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401
+#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801
+#define PCI_DEVICE_ID_SEALEVEL_UCOMM8 0x7804
+
+#define PCI_VENDOR_ID_HYPERCOPE 0x1365
+#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050
+#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104
+#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106
+#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107
+#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108
+
+#define PCI_VENDOR_ID_KAWASAKI 0x136b
+#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01
+
+#define PCI_VENDOR_ID_CNET 0x1371
+#define PCI_DEVICE_ID_CNET_GIGACARD 0x434e
+
+#define PCI_VENDOR_ID_LMC 0x1376
+#define PCI_DEVICE_ID_LMC_HSSI 0x0003
+#define PCI_DEVICE_ID_LMC_DS3 0x0004
+#define PCI_DEVICE_ID_LMC_SSI 0x0005
+#define PCI_DEVICE_ID_LMC_T1 0x0006
+
+#define PCI_VENDOR_ID_NETGEAR 0x1385
+#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a
+
+#define PCI_VENDOR_ID_APPLICOM 0x1389
+#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001
+#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002
+#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003
+
+#define PCI_VENDOR_ID_MOXA 0x1393
+#define PCI_DEVICE_ID_MOXA_RC7000 0x0001
+#define PCI_DEVICE_ID_MOXA_CP102 0x1020
+#define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
+#define PCI_DEVICE_ID_MOXA_CP102U 0x1022
+#define PCI_DEVICE_ID_MOXA_C104 0x1040
+#define PCI_DEVICE_ID_MOXA_CP104U 0x1041
+#define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
+#define PCI_DEVICE_ID_MOXA_CT114 0x1140
+#define PCI_DEVICE_ID_MOXA_CP114 0x1141
+#define PCI_DEVICE_ID_MOXA_CP118U 0x1180
+#define PCI_DEVICE_ID_MOXA_CP132 0x1320
+#define PCI_DEVICE_ID_MOXA_CP132U 0x1321
+#define PCI_DEVICE_ID_MOXA_CP134U 0x1340
+#define PCI_DEVICE_ID_MOXA_C168 0x1680
+#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
+
+#define PCI_VENDOR_ID_CCD 0x1397
+#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0
+#define PCI_DEVICE_ID_CCD_B000 0xb000
+#define PCI_DEVICE_ID_CCD_B006 0xb006
+#define PCI_DEVICE_ID_CCD_B007 0xb007
+#define PCI_DEVICE_ID_CCD_B008 0xb008
+#define PCI_DEVICE_ID_CCD_B009 0xb009
+#define PCI_DEVICE_ID_CCD_B00A 0xb00a
+#define PCI_DEVICE_ID_CCD_B00B 0xb00b
+#define PCI_DEVICE_ID_CCD_B00C 0xb00c
+#define PCI_DEVICE_ID_CCD_B100 0xb100
+#define PCI_DEVICE_ID_CCD_B700 0xb700
+#define PCI_DEVICE_ID_CCD_B701 0xb701
+
+#define PCI_VENDOR_ID_EXAR 0x13a8
+#define PCI_DEVICE_ID_EXAR_XR17C152 0x0152
+#define PCI_DEVICE_ID_EXAR_XR17C154 0x0154
+#define PCI_DEVICE_ID_EXAR_XR17C158 0x0158
+
+#define PCI_VENDOR_ID_MICROGATE 0x13c0
+#define PCI_DEVICE_ID_MICROGATE_USC 0x0010
+#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030
+
+#define PCI_VENDOR_ID_3WARE 0x13C1
+#define PCI_DEVICE_ID_3WARE_1000 0x1000
+#define PCI_DEVICE_ID_3WARE_7000 0x1001
+#define PCI_DEVICE_ID_3WARE_9000 0x1002
+
+#define PCI_VENDOR_ID_IOMEGA 0x13ca
+#define PCI_DEVICE_ID_IOMEGA_BUZ 0x4231
+
+#define PCI_VENDOR_ID_ABOCOM 0x13D1
+#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1
+
+#define PCI_VENDOR_ID_CMEDIA 0x13f6
+#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100
+#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101
+#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111
+#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112
+
+#define PCI_VENDOR_ID_LAVA 0x1407
+#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100
+#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101
+#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102
+#define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180
+#define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181
+#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200
+#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201
+#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202
+#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500
+#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600
+#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000
+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002
+#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003
+#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800
+
+#define PCI_VENDOR_ID_TIMEDIA 0x1409
+#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168
+
+#define PCI_VENDOR_ID_ICE 0x1412
+#define PCI_DEVICE_ID_ICE_1712 0x1712
+#define PCI_DEVICE_ID_VT1724 0x1724
+
+#define PCI_VENDOR_ID_OXSEMI 0x1415
+#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403
+#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501
+#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511
+#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513
+#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521
+
+#define PCI_VENDOR_ID_SAMSUNG 0x144d
+
+#define PCI_VENDOR_ID_MYRICOM 0x14c1
+
+#define PCI_VENDOR_ID_TITAN 0x14D2
+#define PCI_DEVICE_ID_TITAN_010L 0x8001
+#define PCI_DEVICE_ID_TITAN_100L 0x8010
+#define PCI_DEVICE_ID_TITAN_110L 0x8011
+#define PCI_DEVICE_ID_TITAN_200L 0x8020
+#define PCI_DEVICE_ID_TITAN_210L 0x8021
+#define PCI_DEVICE_ID_TITAN_400L 0x8040
+#define PCI_DEVICE_ID_TITAN_800L 0x8080
+#define PCI_DEVICE_ID_TITAN_100 0xA001
+#define PCI_DEVICE_ID_TITAN_200 0xA005
+#define PCI_DEVICE_ID_TITAN_400 0xA003
+#define PCI_DEVICE_ID_TITAN_800B 0xA004
+
+#define PCI_VENDOR_ID_PANACOM 0x14d4
+#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400
+#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402
+
+#define PCI_VENDOR_ID_AFAVLAB 0x14db
+#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180
+#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
+#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150
+
+#define PCI_VENDOR_ID_BROADCOM 0x14e4
+#define PCI_DEVICE_ID_TIGON3_5752 0x1600
+#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
+#define PCI_DEVICE_ID_TIGON3_5700 0x1644
+#define PCI_DEVICE_ID_TIGON3_5701 0x1645
+#define PCI_DEVICE_ID_TIGON3_5702 0x1646
+#define PCI_DEVICE_ID_TIGON3_5703 0x1647
+#define PCI_DEVICE_ID_TIGON3_5704 0x1648
+#define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649
+#define PCI_DEVICE_ID_NX2_5706 0x164a
+#define PCI_DEVICE_ID_NX2_5708 0x164c
+#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
+#define PCI_DEVICE_ID_TIGON3_5705 0x1653
+#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654
+#define PCI_DEVICE_ID_TIGON3_5720 0x1658
+#define PCI_DEVICE_ID_TIGON3_5721 0x1659
+#define PCI_DEVICE_ID_TIGON3_5705M 0x165d
+#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e
+#define PCI_DEVICE_ID_TIGON3_5714 0x1668
+#define PCI_DEVICE_ID_TIGON3_5714S 0x1669
+#define PCI_DEVICE_ID_TIGON3_5780 0x166a
+#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
+#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
+#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
+#define PCI_DEVICE_ID_TIGON3_5755M 0x1673
+#define PCI_DEVICE_ID_TIGON3_5750 0x1676
+#define PCI_DEVICE_ID_TIGON3_5751 0x1677
+#define PCI_DEVICE_ID_TIGON3_5715 0x1678
+#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
+#define PCI_DEVICE_ID_TIGON3_5754 0x167a
+#define PCI_DEVICE_ID_TIGON3_5755 0x167b
+#define PCI_DEVICE_ID_TIGON3_5750M 0x167c
+#define PCI_DEVICE_ID_TIGON3_5751M 0x167d
+#define PCI_DEVICE_ID_TIGON3_5751F 0x167e
+#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
+#define PCI_DEVICE_ID_TIGON3_5782 0x1696
+#define PCI_DEVICE_ID_TIGON3_5786 0x169a
+#define PCI_DEVICE_ID_TIGON3_5787 0x169b
+#define PCI_DEVICE_ID_TIGON3_5788 0x169c
+#define PCI_DEVICE_ID_TIGON3_5789 0x169d
+#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
+#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
+#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8
+#define PCI_DEVICE_ID_NX2_5706S 0x16aa
+#define PCI_DEVICE_ID_NX2_5708S 0x16ac
+#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6
+#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7
+#define PCI_DEVICE_ID_TIGON3_5781 0x16dd
+#define PCI_DEVICE_ID_TIGON3_5753 0x16f7
+#define PCI_DEVICE_ID_TIGON3_5753M 0x16fd
+#define PCI_DEVICE_ID_TIGON3_5753F 0x16fe
+#define PCI_DEVICE_ID_TIGON3_5901 0x170d
+#define PCI_DEVICE_ID_BCM4401B1 0x170c
+#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e
+#define PCI_DEVICE_ID_BCM4401 0x4401
+#define PCI_DEVICE_ID_BCM4401B0 0x4402
+
+#define PCI_VENDOR_ID_TOPIC 0x151f
+#define PCI_DEVICE_ID_TOPIC_TP560 0x0000
+
+#define PCI_VENDOR_ID_ENE 0x1524
+#define PCI_DEVICE_ID_ENE_1211 0x1211
+#define PCI_DEVICE_ID_ENE_1225 0x1225
+#define PCI_DEVICE_ID_ENE_1410 0x1410
+#define PCI_DEVICE_ID_ENE_710 0x1411
+#define PCI_DEVICE_ID_ENE_712 0x1412
+#define PCI_DEVICE_ID_ENE_1420 0x1420
+#define PCI_DEVICE_ID_ENE_720 0x1421
+#define PCI_DEVICE_ID_ENE_722 0x1422
+
+#define PCI_VENDOR_ID_CHELSIO 0x1425
+
+#define PCI_VENDOR_ID_SYBA 0x1592
+#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
+#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783
+
+#define PCI_VENDOR_ID_MORETON 0x15aa
+#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000
+
+#define PCI_VENDOR_ID_ZOLTRIX 0x15b0
+#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0
+
+#define PCI_VENDOR_ID_MELLANOX 0x15b3
+#define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44
+#define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE 0x5a46
+#define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
+#define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
+#define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
+#define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
+
+#define PCI_VENDOR_ID_PDC 0x15e9
+
+#define PCI_VENDOR_ID_FARSITE 0x1619
+#define PCI_DEVICE_ID_FARSITE_T2P 0x0400
+#define PCI_DEVICE_ID_FARSITE_T4P 0x0440
+#define PCI_DEVICE_ID_FARSITE_T1U 0x0610
+#define PCI_DEVICE_ID_FARSITE_T2U 0x0620
+#define PCI_DEVICE_ID_FARSITE_T4U 0x0640
+#define PCI_DEVICE_ID_FARSITE_TE1 0x1610
+#define PCI_DEVICE_ID_FARSITE_TE1C 0x1612
+
+#define PCI_VENDOR_ID_SIBYTE 0x166d
+#define PCI_DEVICE_ID_BCM1250_HT 0x0002
+
+#define PCI_VENDOR_ID_NETCELL 0x169c
+#define PCI_DEVICE_ID_REVOLUTION 0x0044
+
+#define PCI_VENDOR_ID_VITESSE 0x1725
+#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
+
+#define PCI_VENDOR_ID_LINKSYS 0x1737
+#define PCI_DEVICE_ID_LINKSYS_EG1064 0x1064
+
+#define PCI_VENDOR_ID_ALTIMA 0x173b
+#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8
+#define PCI_DEVICE_ID_ALTIMA_AC1001 0x03e9
+#define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea
+#define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb
+
+#define PCI_VENDOR_ID_S2IO 0x17d5
+#define PCI_DEVICE_ID_S2IO_WIN 0x5731
+#define PCI_DEVICE_ID_S2IO_UNI 0x5831
+#define PCI_DEVICE_ID_HERC_WIN 0x5732
+#define PCI_DEVICE_ID_HERC_UNI 0x5832
+
+#define PCI_VENDOR_ID_SITECOM 0x182d
+#define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069
+
+#define PCI_VENDOR_ID_TOPSPIN 0x1867
+
+#define PCI_VENDOR_ID_TDI 0x192E
+#define PCI_DEVICE_ID_TDI_EHCI 0x0101
+
+#define PCI_VENDOR_ID_JMICRON 0x197B
+#define PCI_DEVICE_ID_JMICRON_JMB360 0x2360
+#define PCI_DEVICE_ID_JMICRON_JMB361 0x2361
+#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363
+#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365
+#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
+#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
+
+#define PCI_VENDOR_ID_TEKRAM 0x1de1
+#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29
+
+#define PCI_VENDOR_ID_HINT 0x3388
+#define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013
+
+#define PCI_VENDOR_ID_3DLABS 0x3d3d
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007
+#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009
+
+#define PCI_VENDOR_ID_AKS 0x416c
+#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100
+
+#define PCI_VENDOR_ID_S3 0x5333
+#define PCI_DEVICE_ID_S3_TRIO 0x8811
+#define PCI_DEVICE_ID_S3_868 0x8880
+#define PCI_DEVICE_ID_S3_968 0x88f0
+#define PCI_DEVICE_ID_S3_SAVAGE4 0x8a25
+#define PCI_DEVICE_ID_S3_PROSAVAGE8 0x8d04
+#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
+
+#define PCI_VENDOR_ID_DUNORD 0x5544
+#define PCI_DEVICE_ID_DUNORD_I3000 0x0001
+
+#define PCI_VENDOR_ID_DCI 0x6666
+#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
+#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
+#define PCI_DEVICE_ID_DCI_PCCOM2 0x0004
+
+#define PCI_VENDOR_ID_INTEL 0x8086
+#define PCI_DEVICE_ID_INTEL_EESSC 0x0008
+#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320
+#define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321
+#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
+#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
+#define PCI_DEVICE_ID_INTEL_PXHV 0x032C
+#define PCI_DEVICE_ID_INTEL_82375 0x0482
+#define PCI_DEVICE_ID_INTEL_82424 0x0483
+#define PCI_DEVICE_ID_INTEL_82378 0x0484
+#define PCI_DEVICE_ID_INTEL_I960 0x0960
+#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
+#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130
+#define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132
+#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221
+#define PCI_DEVICE_ID_INTEL_7505_0 0x2550
+#define PCI_DEVICE_ID_INTEL_7205_0 0x255d
+#define PCI_DEVICE_ID_INTEL_82437 0x122d
+#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e
+#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230
+#define PCI_DEVICE_ID_INTEL_82371MX 0x1234
+#define PCI_DEVICE_ID_INTEL_82441 0x1237
+#define PCI_DEVICE_ID_INTEL_82380FB 0x124b
+#define PCI_DEVICE_ID_INTEL_82439 0x1250
+#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960
+#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21
+#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30
+#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38
+#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
+#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
+#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413
+#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415
+#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416
+#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418
+#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420
+#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421
+#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423
+#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425
+#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426
+#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428
+#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440
+#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443
+#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445
+#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448
+#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a
+#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
+#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
+#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
+#define PCI_DEVICE_ID_INTEL_82801E_0 0x2450
+#define PCI_DEVICE_ID_INTEL_82801E_11 0x245b
+#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
+#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
+#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485
+#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486
+#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
+#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
+#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
+#define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0
+#define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1
+#define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3
+#define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5
+#define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6
+#define PCI_DEVICE_ID_INTEL_82801DB_9 0x24c9
+#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca
+#define PCI_DEVICE_ID_INTEL_82801DB_11 0x24cb
+#define PCI_DEVICE_ID_INTEL_82801DB_12 0x24cc
+#define PCI_DEVICE_ID_INTEL_82801EB_0 0x24d0
+#define PCI_DEVICE_ID_INTEL_82801EB_1 0x24d1
+#define PCI_DEVICE_ID_INTEL_82801EB_3 0x24d3
+#define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5
+#define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6
+#define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db
+#define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd
+#define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1
+#define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2
+#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4
+#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6
+#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
+#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
+#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
+#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
+#define PCI_DEVICE_ID_INTEL_82860_HB 0x2531
+#define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c
+#define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560
+#define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562
+#define PCI_DEVICE_ID_INTEL_82865_HB 0x2570
+#define PCI_DEVICE_ID_INTEL_82865_IG 0x2572
+#define PCI_DEVICE_ID_INTEL_82875_HB 0x2578
+#define PCI_DEVICE_ID_INTEL_82915G_HB 0x2580
+#define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582
+#define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590
+#define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592
+#define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770
+#define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772
+#define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0
+#define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2
+#define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640
+#define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641
+#define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642
+#define PCI_DEVICE_ID_INTEL_ICH6_16 0x266a
+#define PCI_DEVICE_ID_INTEL_ICH6_17 0x266d
+#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
+#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
+#define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670
+#define PCI_DEVICE_ID_INTEL_ESB2_14 0x2698
+#define PCI_DEVICE_ID_INTEL_ESB2_17 0x269b
+#define PCI_DEVICE_ID_INTEL_ESB2_18 0x269e
+#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
+#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
+#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
+#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
+#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da
+#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
+#define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de
+#define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df
+#define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810
+#define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811
+#define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812
+#define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814
+#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815
+#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e
+#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850
+#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
+#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
+#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
+#define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580
+#define PCI_DEVICE_ID_INTEL_82855GM_IG 0x3582
+#define PCI_DEVICE_ID_INTEL_E7520_MCH 0x3590
+#define PCI_DEVICE_ID_INTEL_E7320_MCH 0x3592
+#define PCI_DEVICE_ID_INTEL_MCH_PA 0x3595
+#define PCI_DEVICE_ID_INTEL_MCH_PA1 0x3596
+#define PCI_DEVICE_ID_INTEL_MCH_PB 0x3597
+#define PCI_DEVICE_ID_INTEL_MCH_PB1 0x3598
+#define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599
+#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
+#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
+#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
+#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
+#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
+#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
+#define PCI_DEVICE_ID_INTEL_82439TX 0x7100
+#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
+#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
+#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
+#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
+#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
+#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
+#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
+#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123
+#define PCI_DEVICE_ID_INTEL_82810E_MC 0x7124
+#define PCI_DEVICE_ID_INTEL_82810E_IG 0x7125
+#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180
+#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181
+#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190
+#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191
+#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192
+#define PCI_DEVICE_ID_INTEL_440MX 0x7195
+#define PCI_DEVICE_ID_INTEL_440MX_6 0x7196
+#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198
+#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199
+#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b
+#define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0
+#define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2
+#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
+#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
+#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
+#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
+#define PCI_DEVICE_ID_INTEL_82454NX 0x84cb
+#define PCI_DEVICE_ID_INTEL_84460GX 0x84ea
+#define PCI_DEVICE_ID_INTEL_IXP4XX 0x8500
+#define PCI_DEVICE_ID_INTEL_IXP2800 0x9004
+#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
+
+#define PCI_VENDOR_ID_SCALEMP 0x8686
+#define PCI_DEVICE_ID_SCALEMP_VSMP_CTL 0x1010
+
+#define PCI_VENDOR_ID_COMPUTONE 0x8e0e
+#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291
+#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302
+#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002
+#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003
+
+#define PCI_VENDOR_ID_KTI 0x8e2e
+
+#define PCI_VENDOR_ID_ADAPTEC 0x9004
+#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078
+#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178
+#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860
+#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
+#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578
+#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038
+#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075
+#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078
+#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178
+#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078
+#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178
+#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
+#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378
+#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478
+#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895
+#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078
+#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178
+#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278
+#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378
+#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478
+#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578
+#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678
+#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778
+#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878
+
+#define PCI_VENDOR_ID_ADAPTEC2 0x9005
+#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010
+#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011
+#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013
+#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f
+#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050
+#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051
+#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f
+#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080
+#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081
+#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083
+#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f
+#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0
+#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1
+#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3
+#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf
+#define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500
+#define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503
+
+#define PCI_VENDOR_ID_HOLTEK 0x9412
+#define PCI_DEVICE_ID_HOLTEK_6565 0x6565
+
+#define PCI_VENDOR_ID_NETMOS 0x9710
+#define PCI_DEVICE_ID_NETMOS_9705 0x9705
+#define PCI_DEVICE_ID_NETMOS_9715 0x9715
+#define PCI_DEVICE_ID_NETMOS_9735 0x9735
+#define PCI_DEVICE_ID_NETMOS_9745 0x9745
+#define PCI_DEVICE_ID_NETMOS_9755 0x9755
+#define PCI_DEVICE_ID_NETMOS_9805 0x9805
+#define PCI_DEVICE_ID_NETMOS_9815 0x9815
+#define PCI_DEVICE_ID_NETMOS_9835 0x9835
+#define PCI_DEVICE_ID_NETMOS_9845 0x9845
+#define PCI_DEVICE_ID_NETMOS_9855 0x9855
+
+#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
+#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014
+#define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055
+
+#define PCI_VENDOR_ID_TIGERJET 0xe159
+#define PCI_DEVICE_ID_TIGERJET_300 0x0001
+#define PCI_DEVICE_ID_TIGERJET_100 0x0002
+
+#define PCI_VENDOR_ID_TTTECH 0x0357
+#define PCI_DEVICE_ID_TTTECH_MC322 0x000A
+
+#define PCI_VENDOR_ID_XILINX_RME 0xea60
+#define PCI_DEVICE_ID_RME_DIGI32 0x9896
+#define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897
+#define PCI_DEVICE_ID_RME_DIGI32_8 0x9898
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pci_regs.h b/6/platforms/android-3/arch-x86/usr/include/linux/pci_regs.h
new file mode 100644
index 0000000..93a21be
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pci_regs.h
@@ -0,0 +1,422 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_PCI_REGS_H
+#define LINUX_PCI_REGS_H
+
+#define PCI_VENDOR_ID 0x00
+#define PCI_DEVICE_ID 0x02
+#define PCI_COMMAND 0x04
+#define PCI_COMMAND_IO 0x1
+#define PCI_COMMAND_MEMORY 0x2
+#define PCI_COMMAND_MASTER 0x4
+#define PCI_COMMAND_SPECIAL 0x8
+#define PCI_COMMAND_INVALIDATE 0x10
+#define PCI_COMMAND_VGA_PALETTE 0x20
+#define PCI_COMMAND_PARITY 0x40
+#define PCI_COMMAND_WAIT 0x80
+#define PCI_COMMAND_SERR 0x100
+#define PCI_COMMAND_FAST_BACK 0x200
+#define PCI_COMMAND_INTX_DISABLE 0x400
+
+#define PCI_STATUS 0x06
+#define PCI_STATUS_CAP_LIST 0x10
+#define PCI_STATUS_66MHZ 0x20
+#define PCI_STATUS_UDF 0x40
+#define PCI_STATUS_FAST_BACK 0x80
+#define PCI_STATUS_PARITY 0x100
+#define PCI_STATUS_DEVSEL_MASK 0x600
+#define PCI_STATUS_DEVSEL_FAST 0x000
+#define PCI_STATUS_DEVSEL_MEDIUM 0x200
+#define PCI_STATUS_DEVSEL_SLOW 0x400
+#define PCI_STATUS_SIG_TARGET_ABORT 0x800
+#define PCI_STATUS_REC_TARGET_ABORT 0x1000
+#define PCI_STATUS_REC_MASTER_ABORT 0x2000
+#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000
+#define PCI_STATUS_DETECTED_PARITY 0x8000
+
+#define PCI_CLASS_REVISION 0x08
+#define PCI_REVISION_ID 0x08
+#define PCI_CLASS_PROG 0x09
+#define PCI_CLASS_DEVICE 0x0a
+
+#define PCI_CACHE_LINE_SIZE 0x0c
+#define PCI_LATENCY_TIMER 0x0d
+#define PCI_HEADER_TYPE 0x0e
+#define PCI_HEADER_TYPE_NORMAL 0
+#define PCI_HEADER_TYPE_BRIDGE 1
+#define PCI_HEADER_TYPE_CARDBUS 2
+
+#define PCI_BIST 0x0f
+#define PCI_BIST_CODE_MASK 0x0f
+#define PCI_BIST_START 0x40
+#define PCI_BIST_CAPABLE 0x80
+
+#define PCI_BASE_ADDRESS_0 0x10
+#define PCI_BASE_ADDRESS_1 0x14
+#define PCI_BASE_ADDRESS_2 0x18
+#define PCI_BASE_ADDRESS_3 0x1c
+#define PCI_BASE_ADDRESS_4 0x20
+#define PCI_BASE_ADDRESS_5 0x24
+#define PCI_BASE_ADDRESS_SPACE 0x01
+#define PCI_BASE_ADDRESS_SPACE_IO 0x01
+#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
+#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
+#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00
+#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02
+#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04
+#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08
+#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
+#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
+
+#define PCI_CARDBUS_CIS 0x28
+#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
+#define PCI_SUBSYSTEM_ID 0x2e
+#define PCI_ROM_ADDRESS 0x30
+#define PCI_ROM_ADDRESS_ENABLE 0x01
+#define PCI_ROM_ADDRESS_MASK (~0x7ffUL)
+
+#define PCI_CAPABILITY_LIST 0x34
+
+#define PCI_INTERRUPT_LINE 0x3c
+#define PCI_INTERRUPT_PIN 0x3d
+#define PCI_MIN_GNT 0x3e
+#define PCI_MAX_LAT 0x3f
+
+#define PCI_PRIMARY_BUS 0x18
+#define PCI_SECONDARY_BUS 0x19
+#define PCI_SUBORDINATE_BUS 0x1a
+#define PCI_SEC_LATENCY_TIMER 0x1b
+#define PCI_IO_BASE 0x1c
+#define PCI_IO_LIMIT 0x1d
+#define PCI_IO_RANGE_TYPE_MASK 0x0fUL
+#define PCI_IO_RANGE_TYPE_16 0x00
+#define PCI_IO_RANGE_TYPE_32 0x01
+#define PCI_IO_RANGE_MASK (~0x0fUL)
+#define PCI_SEC_STATUS 0x1e
+#define PCI_MEMORY_BASE 0x20
+#define PCI_MEMORY_LIMIT 0x22
+#define PCI_MEMORY_RANGE_TYPE_MASK 0x0fUL
+#define PCI_MEMORY_RANGE_MASK (~0x0fUL)
+#define PCI_PREF_MEMORY_BASE 0x24
+#define PCI_PREF_MEMORY_LIMIT 0x26
+#define PCI_PREF_RANGE_TYPE_MASK 0x0fUL
+#define PCI_PREF_RANGE_TYPE_32 0x00
+#define PCI_PREF_RANGE_TYPE_64 0x01
+#define PCI_PREF_RANGE_MASK (~0x0fUL)
+#define PCI_PREF_BASE_UPPER32 0x28
+#define PCI_PREF_LIMIT_UPPER32 0x2c
+#define PCI_IO_BASE_UPPER16 0x30
+#define PCI_IO_LIMIT_UPPER16 0x32
+
+#define PCI_ROM_ADDRESS1 0x38
+
+#define PCI_BRIDGE_CONTROL 0x3e
+#define PCI_BRIDGE_CTL_PARITY 0x01
+#define PCI_BRIDGE_CTL_SERR 0x02
+#define PCI_BRIDGE_CTL_NO_ISA 0x04
+#define PCI_BRIDGE_CTL_VGA 0x08
+#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20
+#define PCI_BRIDGE_CTL_BUS_RESET 0x40
+#define PCI_BRIDGE_CTL_FAST_BACK 0x80
+
+#define PCI_CB_CAPABILITY_LIST 0x14
+
+#define PCI_CB_SEC_STATUS 0x16
+#define PCI_CB_PRIMARY_BUS 0x18
+#define PCI_CB_CARD_BUS 0x19
+#define PCI_CB_SUBORDINATE_BUS 0x1a
+#define PCI_CB_LATENCY_TIMER 0x1b
+#define PCI_CB_MEMORY_BASE_0 0x1c
+#define PCI_CB_MEMORY_LIMIT_0 0x20
+#define PCI_CB_MEMORY_BASE_1 0x24
+#define PCI_CB_MEMORY_LIMIT_1 0x28
+#define PCI_CB_IO_BASE_0 0x2c
+#define PCI_CB_IO_BASE_0_HI 0x2e
+#define PCI_CB_IO_LIMIT_0 0x30
+#define PCI_CB_IO_LIMIT_0_HI 0x32
+#define PCI_CB_IO_BASE_1 0x34
+#define PCI_CB_IO_BASE_1_HI 0x36
+#define PCI_CB_IO_LIMIT_1 0x38
+#define PCI_CB_IO_LIMIT_1_HI 0x3a
+#define PCI_CB_IO_RANGE_MASK (~0x03UL)
+
+#define PCI_CB_BRIDGE_CONTROL 0x3e
+#define PCI_CB_BRIDGE_CTL_PARITY 0x01
+#define PCI_CB_BRIDGE_CTL_SERR 0x02
+#define PCI_CB_BRIDGE_CTL_ISA 0x04
+#define PCI_CB_BRIDGE_CTL_VGA 0x08
+#define PCI_CB_BRIDGE_CTL_MASTER_ABORT 0x20
+#define PCI_CB_BRIDGE_CTL_CB_RESET 0x40
+#define PCI_CB_BRIDGE_CTL_16BIT_INT 0x80
+#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100
+#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
+#define PCI_CB_BRIDGE_CTL_POST_WRITES 0x400
+#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
+#define PCI_CB_SUBSYSTEM_ID 0x42
+#define PCI_CB_LEGACY_MODE_BASE 0x44
+
+#define PCI_CAP_LIST_ID 0
+#define PCI_CAP_ID_PM 0x01
+#define PCI_CAP_ID_AGP 0x02
+#define PCI_CAP_ID_VPD 0x03
+#define PCI_CAP_ID_SLOTID 0x04
+#define PCI_CAP_ID_MSI 0x05
+#define PCI_CAP_ID_CHSWP 0x06
+#define PCI_CAP_ID_PCIX 0x07
+#define PCI_CAP_ID_HT_IRQCONF 0x08
+#define PCI_CAP_ID_VNDR 0x09
+#define PCI_CAP_ID_SHPC 0x0C
+#define PCI_CAP_ID_EXP 0x10
+#define PCI_CAP_ID_MSIX 0x11
+#define PCI_CAP_LIST_NEXT 1
+#define PCI_CAP_FLAGS 2
+#define PCI_CAP_SIZEOF 4
+
+#define PCI_PM_PMC 2
+#define PCI_PM_CAP_VER_MASK 0x0007
+#define PCI_PM_CAP_PME_CLOCK 0x0008
+#define PCI_PM_CAP_RESERVED 0x0010
+#define PCI_PM_CAP_DSI 0x0020
+#define PCI_PM_CAP_AUX_POWER 0x01C0
+#define PCI_PM_CAP_D1 0x0200
+#define PCI_PM_CAP_D2 0x0400
+#define PCI_PM_CAP_PME 0x0800
+#define PCI_PM_CAP_PME_MASK 0xF800
+#define PCI_PM_CAP_PME_D0 0x0800
+#define PCI_PM_CAP_PME_D1 0x1000
+#define PCI_PM_CAP_PME_D2 0x2000
+#define PCI_PM_CAP_PME_D3 0x4000
+#define PCI_PM_CAP_PME_D3cold 0x8000
+#define PCI_PM_CTRL 4
+#define PCI_PM_CTRL_STATE_MASK 0x0003
+#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004
+#define PCI_PM_CTRL_PME_ENABLE 0x0100
+#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00
+#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000
+#define PCI_PM_CTRL_PME_STATUS 0x8000
+#define PCI_PM_PPB_EXTENSIONS 6
+#define PCI_PM_PPB_B2_B3 0x40
+#define PCI_PM_BPCC_ENABLE 0x80
+#define PCI_PM_DATA_REGISTER 7
+#define PCI_PM_SIZEOF 8
+
+#define PCI_AGP_VERSION 2
+#define PCI_AGP_RFU 3
+#define PCI_AGP_STATUS 4
+#define PCI_AGP_STATUS_RQ_MASK 0xff000000
+#define PCI_AGP_STATUS_SBA 0x0200
+#define PCI_AGP_STATUS_64BIT 0x0020
+#define PCI_AGP_STATUS_FW 0x0010
+#define PCI_AGP_STATUS_RATE4 0x0004
+#define PCI_AGP_STATUS_RATE2 0x0002
+#define PCI_AGP_STATUS_RATE1 0x0001
+#define PCI_AGP_COMMAND 8
+#define PCI_AGP_COMMAND_RQ_MASK 0xff000000
+#define PCI_AGP_COMMAND_SBA 0x0200
+#define PCI_AGP_COMMAND_AGP 0x0100
+#define PCI_AGP_COMMAND_64BIT 0x0020
+#define PCI_AGP_COMMAND_FW 0x0010
+#define PCI_AGP_COMMAND_RATE4 0x0004
+#define PCI_AGP_COMMAND_RATE2 0x0002
+#define PCI_AGP_COMMAND_RATE1 0x0001
+#define PCI_AGP_SIZEOF 12
+
+#define PCI_VPD_ADDR 2
+#define PCI_VPD_ADDR_MASK 0x7fff
+#define PCI_VPD_ADDR_F 0x8000
+#define PCI_VPD_DATA 4
+
+#define PCI_SID_ESR 2
+#define PCI_SID_ESR_NSLOTS 0x1f
+#define PCI_SID_ESR_FIC 0x20
+#define PCI_SID_CHASSIS_NR 3
+
+#define PCI_MSI_FLAGS 2
+#define PCI_MSI_FLAGS_64BIT 0x80
+#define PCI_MSI_FLAGS_QSIZE 0x70
+#define PCI_MSI_FLAGS_QMASK 0x0e
+#define PCI_MSI_FLAGS_ENABLE 0x01
+#define PCI_MSI_FLAGS_MASKBIT 0x100
+#define PCI_MSI_RFU 3
+#define PCI_MSI_ADDRESS_LO 4
+#define PCI_MSI_ADDRESS_HI 8
+#define PCI_MSI_DATA_32 8
+#define PCI_MSI_DATA_64 12
+#define PCI_MSI_MASK_BIT 16
+
+#define PCI_CHSWP_CSR 2
+#define PCI_CHSWP_DHA 0x01
+#define PCI_CHSWP_EIM 0x02
+#define PCI_CHSWP_PIE 0x04
+#define PCI_CHSWP_LOO 0x08
+#define PCI_CHSWP_PI 0x30
+#define PCI_CHSWP_EXT 0x40
+#define PCI_CHSWP_INS 0x80
+
+#define PCI_X_CMD 2
+#define PCI_X_CMD_DPERR_E 0x0001
+#define PCI_X_CMD_ERO 0x0002
+#define PCI_X_CMD_MAX_READ 0x000c
+#define PCI_X_CMD_MAX_SPLIT 0x0070
+#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3)
+#define PCI_X_STATUS 4
+#define PCI_X_STATUS_DEVFN 0x000000ff
+#define PCI_X_STATUS_BUS 0x0000ff00
+#define PCI_X_STATUS_64BIT 0x00010000
+#define PCI_X_STATUS_133MHZ 0x00020000
+#define PCI_X_STATUS_SPL_DISC 0x00040000
+#define PCI_X_STATUS_UNX_SPL 0x00080000
+#define PCI_X_STATUS_COMPLEX 0x00100000
+#define PCI_X_STATUS_MAX_READ 0x00600000
+#define PCI_X_STATUS_MAX_SPLIT 0x03800000
+#define PCI_X_STATUS_MAX_CUM 0x1c000000
+#define PCI_X_STATUS_SPL_ERR 0x20000000
+#define PCI_X_STATUS_266MHZ 0x40000000
+#define PCI_X_STATUS_533MHZ 0x80000000
+
+#define PCI_EXP_FLAGS 2
+#define PCI_EXP_FLAGS_VERS 0x000f
+#define PCI_EXP_FLAGS_TYPE 0x00f0
+#define PCI_EXP_TYPE_ENDPOINT 0x0
+#define PCI_EXP_TYPE_LEG_END 0x1
+#define PCI_EXP_TYPE_ROOT_PORT 0x4
+#define PCI_EXP_TYPE_UPSTREAM 0x5
+#define PCI_EXP_TYPE_DOWNSTREAM 0x6
+#define PCI_EXP_TYPE_PCI_BRIDGE 0x7
+#define PCI_EXP_FLAGS_SLOT 0x0100
+#define PCI_EXP_FLAGS_IRQ 0x3e00
+#define PCI_EXP_DEVCAP 4
+#define PCI_EXP_DEVCAP_PAYLOAD 0x07
+#define PCI_EXP_DEVCAP_PHANTOM 0x18
+#define PCI_EXP_DEVCAP_EXT_TAG 0x20
+#define PCI_EXP_DEVCAP_L0S 0x1c0
+#define PCI_EXP_DEVCAP_L1 0xe00
+#define PCI_EXP_DEVCAP_ATN_BUT 0x1000
+#define PCI_EXP_DEVCAP_ATN_IND 0x2000
+#define PCI_EXP_DEVCAP_PWR_IND 0x4000
+#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000
+#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000
+#define PCI_EXP_DEVCTL 8
+#define PCI_EXP_DEVCTL_CERE 0x0001
+#define PCI_EXP_DEVCTL_NFERE 0x0002
+#define PCI_EXP_DEVCTL_FERE 0x0004
+#define PCI_EXP_DEVCTL_URRE 0x0008
+#define PCI_EXP_DEVCTL_RELAX_EN 0x0010
+#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
+#define PCI_EXP_DEVCTL_EXT_TAG 0x0100
+#define PCI_EXP_DEVCTL_PHANTOM 0x0200
+#define PCI_EXP_DEVCTL_AUX_PME 0x0400
+#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800
+#define PCI_EXP_DEVCTL_READRQ 0x7000
+#define PCI_EXP_DEVSTA 10
+#define PCI_EXP_DEVSTA_CED 0x01
+#define PCI_EXP_DEVSTA_NFED 0x02
+#define PCI_EXP_DEVSTA_FED 0x04
+#define PCI_EXP_DEVSTA_URD 0x08
+#define PCI_EXP_DEVSTA_AUXPD 0x10
+#define PCI_EXP_DEVSTA_TRPND 0x20
+#define PCI_EXP_LNKCAP 12
+#define PCI_EXP_LNKCTL 16
+#define PCI_EXP_LNKSTA 18
+#define PCI_EXP_SLTCAP 20
+#define PCI_EXP_SLTCTL 24
+#define PCI_EXP_SLTSTA 26
+#define PCI_EXP_RTCTL 28
+#define PCI_EXP_RTCTL_SECEE 0x01
+#define PCI_EXP_RTCTL_SENFEE 0x02
+#define PCI_EXP_RTCTL_SEFEE 0x04
+#define PCI_EXP_RTCTL_PMEIE 0x08
+#define PCI_EXP_RTCTL_CRSSVE 0x10
+#define PCI_EXP_RTCAP 30
+#define PCI_EXP_RTSTA 32
+
+#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
+#define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf)
+#define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc)
+
+#define PCI_EXT_CAP_ID_ERR 1
+#define PCI_EXT_CAP_ID_VC 2
+#define PCI_EXT_CAP_ID_DSN 3
+#define PCI_EXT_CAP_ID_PWR 4
+
+#define PCI_ERR_UNCOR_STATUS 4
+#define PCI_ERR_UNC_TRAIN 0x00000001
+#define PCI_ERR_UNC_DLP 0x00000010
+#define PCI_ERR_UNC_POISON_TLP 0x00001000
+#define PCI_ERR_UNC_FCP 0x00002000
+#define PCI_ERR_UNC_COMP_TIME 0x00004000
+#define PCI_ERR_UNC_COMP_ABORT 0x00008000
+#define PCI_ERR_UNC_UNX_COMP 0x00010000
+#define PCI_ERR_UNC_RX_OVER 0x00020000
+#define PCI_ERR_UNC_MALF_TLP 0x00040000
+#define PCI_ERR_UNC_ECRC 0x00080000
+#define PCI_ERR_UNC_UNSUP 0x00100000
+#define PCI_ERR_UNCOR_MASK 8
+
+#define PCI_ERR_UNCOR_SEVER 12
+
+#define PCI_ERR_COR_STATUS 16
+#define PCI_ERR_COR_RCVR 0x00000001
+#define PCI_ERR_COR_BAD_TLP 0x00000040
+#define PCI_ERR_COR_BAD_DLLP 0x00000080
+#define PCI_ERR_COR_REP_ROLL 0x00000100
+#define PCI_ERR_COR_REP_TIMER 0x00001000
+#define PCI_ERR_COR_MASK 20
+
+#define PCI_ERR_CAP 24
+#define PCI_ERR_CAP_FEP(x) ((x) & 31)
+#define PCI_ERR_CAP_ECRC_GENC 0x00000020
+#define PCI_ERR_CAP_ECRC_GENE 0x00000040
+#define PCI_ERR_CAP_ECRC_CHKC 0x00000080
+#define PCI_ERR_CAP_ECRC_CHKE 0x00000100
+#define PCI_ERR_HEADER_LOG 28
+#define PCI_ERR_ROOT_COMMAND 44
+
+#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001
+
+#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002
+
+#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004
+#define PCI_ERR_ROOT_STATUS 48
+#define PCI_ERR_ROOT_COR_RCV 0x00000001
+
+#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002
+
+#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004
+
+#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008
+#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010
+#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020
+#define PCI_ERR_ROOT_FATAL_RCV 0x00000040
+#define PCI_ERR_ROOT_COR_SRC 52
+#define PCI_ERR_ROOT_SRC 54
+
+#define PCI_VC_PORT_REG1 4
+#define PCI_VC_PORT_REG2 8
+#define PCI_VC_PORT_CTRL 12
+#define PCI_VC_PORT_STATUS 14
+#define PCI_VC_RES_CAP 16
+#define PCI_VC_RES_CTRL 20
+#define PCI_VC_RES_STATUS 26
+
+#define PCI_PWR_DSR 4
+#define PCI_PWR_DATA 8
+#define PCI_PWR_DATA_BASE(x) ((x) & 0xff)
+#define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3)
+#define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7)
+#define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3)
+#define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7)
+#define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7)
+#define PCI_PWR_CAP 12
+#define PCI_PWR_CAP_BUDGET(x) ((x) & 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/percpu.h b/6/platforms/android-3/arch-x86/usr/include/linux/percpu.h
new file mode 100644
index 0000000..c195616
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/percpu.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PERCPU_H
+#define __LINUX_PERCPU_H
+#include <linux/spinlock.h>
+#include <linux/slab.h>
+#include <linux/smp.h>
+#include <linux/string.h>
+#include <asm/percpu.h>
+
+#ifndef PERCPU_ENOUGH_ROOM
+#define PERCPU_ENOUGH_ROOM 32768
+#endif
+
+#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); }))
+#define put_cpu_var(var) preempt_enable()
+
+#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
+
+#define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type))))
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/percpu_counter.h b/6/platforms/android-3/arch-x86/usr/include/linux/percpu_counter.h
new file mode 100644
index 0000000..112375c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/percpu_counter.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PERCPU_COUNTER_H
+#define _LINUX_PERCPU_COUNTER_H
+
+#include <linux/spinlock.h>
+#include <linux/smp.h>
+#include <linux/threads.h>
+#include <linux/percpu.h>
+#include <linux/types.h>
+
+struct percpu_counter {
+ s64 count;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/personality.h b/6/platforms/android-3/arch-x86/usr/include/linux/personality.h
new file mode 100644
index 0000000..1f84b4e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/personality.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PERSONALITY_H
+#define _LINUX_PERSONALITY_H
+
+struct exec_domain;
+struct pt_regs;
+
+enum {
+ ADDR_NO_RANDOMIZE = 0x0040000,
+ FDPIC_FUNCPTRS = 0x0080000,
+ MMAP_PAGE_ZERO = 0x0100000,
+ ADDR_COMPAT_LAYOUT = 0x0200000,
+ READ_IMPLIES_EXEC = 0x0400000,
+ ADDR_LIMIT_32BIT = 0x0800000,
+ SHORT_INODE = 0x1000000,
+ WHOLE_SECONDS = 0x2000000,
+ STICKY_TIMEOUTS = 0x4000000,
+ ADDR_LIMIT_3GB = 0x8000000,
+};
+
+#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE)
+
+enum {
+ PER_LINUX = 0x0000,
+ PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT,
+ PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS,
+ PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+ PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS |
+ WHOLE_SECONDS | SHORT_INODE,
+ PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
+ PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS,
+ PER_BSD = 0x0006,
+ PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
+ PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
+ PER_LINUX32 = 0x0008,
+ PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
+ PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,
+ PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,
+ PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,
+ PER_RISCOS = 0x000c,
+ PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
+ PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
+ PER_OSF4 = 0x000f,
+ PER_HPUX = 0x0010,
+ PER_MASK = 0x00ff,
+};
+
+typedef void (*handler_t)(int, struct pt_regs *);
+
+struct exec_domain {
+ const char *name;
+ handler_t handler;
+ unsigned char pers_low;
+ unsigned char pers_high;
+ unsigned long *signal_map;
+ unsigned long *signal_invmap;
+ struct map_segment *err_map;
+ struct map_segment *socktype_map;
+ struct map_segment *sockopt_map;
+ struct map_segment *af_map;
+ struct module *module;
+ struct exec_domain *next;
+};
+
+#define personality(pers) (pers & PER_MASK)
+
+#define get_personality (current->personality)
+
+#define set_personality(pers) ((current->personality == pers) ? 0 : __set_personality(pers))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pfkeyv2.h b/6/platforms/android-3/arch-x86/usr/include/linux/pfkeyv2.h
new file mode 100644
index 0000000..3ac9488
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pfkeyv2.h
@@ -0,0 +1,306 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PFKEY2_H
+#define _LINUX_PFKEY2_H
+
+#include <linux/types.h>
+
+#define PF_KEY_V2 2
+#define PFKEYV2_REVISION 199806L
+
+struct sadb_msg {
+ uint8_t sadb_msg_version;
+ uint8_t sadb_msg_type;
+ uint8_t sadb_msg_errno;
+ uint8_t sadb_msg_satype;
+ uint16_t sadb_msg_len;
+ uint16_t sadb_msg_reserved;
+ uint32_t sadb_msg_seq;
+ uint32_t sadb_msg_pid;
+} __attribute__((packed));
+
+struct sadb_ext {
+ uint16_t sadb_ext_len;
+ uint16_t sadb_ext_type;
+} __attribute__((packed));
+
+struct sadb_sa {
+ uint16_t sadb_sa_len;
+ uint16_t sadb_sa_exttype;
+ uint32_t sadb_sa_spi;
+ uint8_t sadb_sa_replay;
+ uint8_t sadb_sa_state;
+ uint8_t sadb_sa_auth;
+ uint8_t sadb_sa_encrypt;
+ uint32_t sadb_sa_flags;
+} __attribute__((packed));
+
+struct sadb_lifetime {
+ uint16_t sadb_lifetime_len;
+ uint16_t sadb_lifetime_exttype;
+ uint32_t sadb_lifetime_allocations;
+ uint64_t sadb_lifetime_bytes;
+ uint64_t sadb_lifetime_addtime;
+ uint64_t sadb_lifetime_usetime;
+} __attribute__((packed));
+
+struct sadb_address {
+ uint16_t sadb_address_len;
+ uint16_t sadb_address_exttype;
+ uint8_t sadb_address_proto;
+ uint8_t sadb_address_prefixlen;
+ uint16_t sadb_address_reserved;
+} __attribute__((packed));
+
+struct sadb_key {
+ uint16_t sadb_key_len;
+ uint16_t sadb_key_exttype;
+ uint16_t sadb_key_bits;
+ uint16_t sadb_key_reserved;
+} __attribute__((packed));
+
+struct sadb_ident {
+ uint16_t sadb_ident_len;
+ uint16_t sadb_ident_exttype;
+ uint16_t sadb_ident_type;
+ uint16_t sadb_ident_reserved;
+ uint64_t sadb_ident_id;
+} __attribute__((packed));
+
+struct sadb_sens {
+ uint16_t sadb_sens_len;
+ uint16_t sadb_sens_exttype;
+ uint32_t sadb_sens_dpd;
+ uint8_t sadb_sens_sens_level;
+ uint8_t sadb_sens_sens_len;
+ uint8_t sadb_sens_integ_level;
+ uint8_t sadb_sens_integ_len;
+ uint32_t sadb_sens_reserved;
+} __attribute__((packed));
+
+struct sadb_prop {
+ uint16_t sadb_prop_len;
+ uint16_t sadb_prop_exttype;
+ uint8_t sadb_prop_replay;
+ uint8_t sadb_prop_reserved[3];
+} __attribute__((packed));
+
+struct sadb_comb {
+ uint8_t sadb_comb_auth;
+ uint8_t sadb_comb_encrypt;
+ uint16_t sadb_comb_flags;
+ uint16_t sadb_comb_auth_minbits;
+ uint16_t sadb_comb_auth_maxbits;
+ uint16_t sadb_comb_encrypt_minbits;
+ uint16_t sadb_comb_encrypt_maxbits;
+ uint32_t sadb_comb_reserved;
+ uint32_t sadb_comb_soft_allocations;
+ uint32_t sadb_comb_hard_allocations;
+ uint64_t sadb_comb_soft_bytes;
+ uint64_t sadb_comb_hard_bytes;
+ uint64_t sadb_comb_soft_addtime;
+ uint64_t sadb_comb_hard_addtime;
+ uint64_t sadb_comb_soft_usetime;
+ uint64_t sadb_comb_hard_usetime;
+} __attribute__((packed));
+
+struct sadb_supported {
+ uint16_t sadb_supported_len;
+ uint16_t sadb_supported_exttype;
+ uint32_t sadb_supported_reserved;
+} __attribute__((packed));
+
+struct sadb_alg {
+ uint8_t sadb_alg_id;
+ uint8_t sadb_alg_ivlen;
+ uint16_t sadb_alg_minbits;
+ uint16_t sadb_alg_maxbits;
+ uint16_t sadb_alg_reserved;
+} __attribute__((packed));
+
+struct sadb_spirange {
+ uint16_t sadb_spirange_len;
+ uint16_t sadb_spirange_exttype;
+ uint32_t sadb_spirange_min;
+ uint32_t sadb_spirange_max;
+ uint32_t sadb_spirange_reserved;
+} __attribute__((packed));
+
+struct sadb_x_kmprivate {
+ uint16_t sadb_x_kmprivate_len;
+ uint16_t sadb_x_kmprivate_exttype;
+ uint32_t sadb_x_kmprivate_reserved;
+} __attribute__((packed));
+
+struct sadb_x_sa2 {
+ uint16_t sadb_x_sa2_len;
+ uint16_t sadb_x_sa2_exttype;
+ uint8_t sadb_x_sa2_mode;
+ uint8_t sadb_x_sa2_reserved1;
+ uint16_t sadb_x_sa2_reserved2;
+ uint32_t sadb_x_sa2_sequence;
+ uint32_t sadb_x_sa2_reqid;
+} __attribute__((packed));
+
+struct sadb_x_policy {
+ uint16_t sadb_x_policy_len;
+ uint16_t sadb_x_policy_exttype;
+ uint16_t sadb_x_policy_type;
+ uint8_t sadb_x_policy_dir;
+ uint8_t sadb_x_policy_reserved;
+ uint32_t sadb_x_policy_id;
+ uint32_t sadb_x_policy_priority;
+} __attribute__((packed));
+
+struct sadb_x_ipsecrequest {
+ uint16_t sadb_x_ipsecrequest_len;
+ uint16_t sadb_x_ipsecrequest_proto;
+ uint8_t sadb_x_ipsecrequest_mode;
+ uint8_t sadb_x_ipsecrequest_level;
+ uint16_t sadb_x_ipsecrequest_reserved1;
+ uint32_t sadb_x_ipsecrequest_reqid;
+ uint32_t sadb_x_ipsecrequest_reserved2;
+} __attribute__((packed));
+
+struct sadb_x_nat_t_type {
+ uint16_t sadb_x_nat_t_type_len;
+ uint16_t sadb_x_nat_t_type_exttype;
+ uint8_t sadb_x_nat_t_type_type;
+ uint8_t sadb_x_nat_t_type_reserved[3];
+} __attribute__((packed));
+
+struct sadb_x_nat_t_port {
+ uint16_t sadb_x_nat_t_port_len;
+ uint16_t sadb_x_nat_t_port_exttype;
+ uint16_t sadb_x_nat_t_port_port;
+ uint16_t sadb_x_nat_t_port_reserved;
+} __attribute__((packed));
+
+struct sadb_x_sec_ctx {
+ uint16_t sadb_x_sec_len;
+ uint16_t sadb_x_sec_exttype;
+ uint8_t sadb_x_ctx_alg;
+ uint8_t sadb_x_ctx_doi;
+ uint16_t sadb_x_ctx_len;
+} __attribute__((packed));
+
+#define SADB_RESERVED 0
+#define SADB_GETSPI 1
+#define SADB_UPDATE 2
+#define SADB_ADD 3
+#define SADB_DELETE 4
+#define SADB_GET 5
+#define SADB_ACQUIRE 6
+#define SADB_REGISTER 7
+#define SADB_EXPIRE 8
+#define SADB_FLUSH 9
+#define SADB_DUMP 10
+#define SADB_X_PROMISC 11
+#define SADB_X_PCHANGE 12
+#define SADB_X_SPDUPDATE 13
+#define SADB_X_SPDADD 14
+#define SADB_X_SPDDELETE 15
+#define SADB_X_SPDGET 16
+#define SADB_X_SPDACQUIRE 17
+#define SADB_X_SPDDUMP 18
+#define SADB_X_SPDFLUSH 19
+#define SADB_X_SPDSETIDX 20
+#define SADB_X_SPDEXPIRE 21
+#define SADB_X_SPDDELETE2 22
+#define SADB_X_NAT_T_NEW_MAPPING 23
+#define SADB_MAX 23
+
+#define SADB_SAFLAGS_PFS 1
+#define SADB_SAFLAGS_NOPMTUDISC 0x20000000
+#define SADB_SAFLAGS_DECAP_DSCP 0x40000000
+#define SADB_SAFLAGS_NOECN 0x80000000
+
+#define SADB_SASTATE_LARVAL 0
+#define SADB_SASTATE_MATURE 1
+#define SADB_SASTATE_DYING 2
+#define SADB_SASTATE_DEAD 3
+#define SADB_SASTATE_MAX 3
+
+#define SADB_SATYPE_UNSPEC 0
+#define SADB_SATYPE_AH 2
+#define SADB_SATYPE_ESP 3
+#define SADB_SATYPE_RSVP 5
+#define SADB_SATYPE_OSPFV2 6
+#define SADB_SATYPE_RIPV2 7
+#define SADB_SATYPE_MIP 8
+#define SADB_X_SATYPE_IPCOMP 9
+#define SADB_SATYPE_MAX 9
+
+#define SADB_AALG_NONE 0
+#define SADB_AALG_MD5HMAC 2
+#define SADB_AALG_SHA1HMAC 3
+#define SADB_X_AALG_SHA2_256HMAC 5
+#define SADB_X_AALG_SHA2_384HMAC 6
+#define SADB_X_AALG_SHA2_512HMAC 7
+#define SADB_X_AALG_RIPEMD160HMAC 8
+#define SADB_X_AALG_NULL 251
+#define SADB_AALG_MAX 251
+
+#define SADB_EALG_NONE 0
+#define SADB_EALG_DESCBC 2
+#define SADB_EALG_3DESCBC 3
+#define SADB_X_EALG_CASTCBC 6
+#define SADB_X_EALG_BLOWFISHCBC 7
+#define SADB_EALG_NULL 11
+#define SADB_X_EALG_AESCBC 12
+#define SADB_EALG_MAX 253
+
+#define SADB_X_EALG_SERPENTCBC 252
+#define SADB_X_EALG_TWOFISHCBC 253
+
+#define SADB_X_CALG_NONE 0
+#define SADB_X_CALG_OUI 1
+#define SADB_X_CALG_DEFLATE 2
+#define SADB_X_CALG_LZS 3
+#define SADB_X_CALG_LZJH 4
+#define SADB_X_CALG_MAX 4
+
+#define SADB_EXT_RESERVED 0
+#define SADB_EXT_SA 1
+#define SADB_EXT_LIFETIME_CURRENT 2
+#define SADB_EXT_LIFETIME_HARD 3
+#define SADB_EXT_LIFETIME_SOFT 4
+#define SADB_EXT_ADDRESS_SRC 5
+#define SADB_EXT_ADDRESS_DST 6
+#define SADB_EXT_ADDRESS_PROXY 7
+#define SADB_EXT_KEY_AUTH 8
+#define SADB_EXT_KEY_ENCRYPT 9
+#define SADB_EXT_IDENTITY_SRC 10
+#define SADB_EXT_IDENTITY_DST 11
+#define SADB_EXT_SENSITIVITY 12
+#define SADB_EXT_PROPOSAL 13
+#define SADB_EXT_SUPPORTED_AUTH 14
+#define SADB_EXT_SUPPORTED_ENCRYPT 15
+#define SADB_EXT_SPIRANGE 16
+#define SADB_X_EXT_KMPRIVATE 17
+#define SADB_X_EXT_POLICY 18
+#define SADB_X_EXT_SA2 19
+
+#define SADB_X_EXT_NAT_T_TYPE 20
+#define SADB_X_EXT_NAT_T_SPORT 21
+#define SADB_X_EXT_NAT_T_DPORT 22
+#define SADB_X_EXT_NAT_T_OA 23
+#define SADB_X_EXT_SEC_CTX 24
+#define SADB_EXT_MAX 24
+
+#define SADB_IDENTTYPE_RESERVED 0
+#define SADB_IDENTTYPE_PREFIX 1
+#define SADB_IDENTTYPE_FQDN 2
+#define SADB_IDENTTYPE_USERFQDN 3
+#define SADB_IDENTTYPE_MAX 3
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pkt_cls.h b/6/platforms/android-3/arch-x86/usr/include/linux/pkt_cls.h
new file mode 100644
index 0000000..601a683
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pkt_cls.h
@@ -0,0 +1,372 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PKT_CLS_H
+#define __LINUX_PKT_CLS_H
+
+#include <linux/pkt_sched.h>
+
+#define _TC_MAKE32(x) ((x))
+
+#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n))
+#define _TC_MAKEMASK(v,n) (_TC_MAKE32((_TC_MAKE32(1)<<(v))-1) << _TC_MAKE32(n))
+#define _TC_MAKEVALUE(v,n) (_TC_MAKE32(v) << _TC_MAKE32(n))
+#define _TC_GETVALUE(v,n,m) ((_TC_MAKE32(v) & _TC_MAKE32(m)) >> _TC_MAKE32(n))
+
+#define TC_MUNGED _TC_MAKEMASK1(0)
+#define SET_TC_MUNGED(v) ( TC_MUNGED | (v & ~TC_MUNGED))
+#define CLR_TC_MUNGED(v) ( v & ~TC_MUNGED)
+
+#define TC_OK2MUNGE _TC_MAKEMASK1(1)
+#define SET_TC_OK2MUNGE(v) ( TC_OK2MUNGE | (v & ~TC_OK2MUNGE))
+#define CLR_TC_OK2MUNGE(v) ( v & ~TC_OK2MUNGE)
+
+#define S_TC_VERD _TC_MAKE32(2)
+#define M_TC_VERD _TC_MAKEMASK(4,S_TC_VERD)
+#define G_TC_VERD(x) _TC_GETVALUE(x,S_TC_VERD,M_TC_VERD)
+#define V_TC_VERD(x) _TC_MAKEVALUE(x,S_TC_VERD)
+#define SET_TC_VERD(v,n) ((V_TC_VERD(n)) | (v & ~M_TC_VERD))
+
+#define S_TC_FROM _TC_MAKE32(6)
+#define M_TC_FROM _TC_MAKEMASK(2,S_TC_FROM)
+#define G_TC_FROM(x) _TC_GETVALUE(x,S_TC_FROM,M_TC_FROM)
+#define V_TC_FROM(x) _TC_MAKEVALUE(x,S_TC_FROM)
+#define SET_TC_FROM(v,n) ((V_TC_FROM(n)) | (v & ~M_TC_FROM))
+#define AT_STACK 0x0
+#define AT_INGRESS 0x1
+#define AT_EGRESS 0x2
+
+#define TC_NCLS _TC_MAKEMASK1(8)
+#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS))
+#define CLR_TC_NCLS(v) ( v & ~TC_NCLS)
+
+#define S_TC_RTTL _TC_MAKE32(9)
+#define M_TC_RTTL _TC_MAKEMASK(3,S_TC_RTTL)
+#define G_TC_RTTL(x) _TC_GETVALUE(x,S_TC_RTTL,M_TC_RTTL)
+#define V_TC_RTTL(x) _TC_MAKEVALUE(x,S_TC_RTTL)
+#define SET_TC_RTTL(v,n) ((V_TC_RTTL(n)) | (v & ~M_TC_RTTL))
+
+#define S_TC_AT _TC_MAKE32(12)
+#define M_TC_AT _TC_MAKEMASK(2,S_TC_AT)
+#define G_TC_AT(x) _TC_GETVALUE(x,S_TC_AT,M_TC_AT)
+#define V_TC_AT(x) _TC_MAKEVALUE(x,S_TC_AT)
+#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
+
+enum
+{
+ TCA_ACT_UNSPEC,
+ TCA_ACT_KIND,
+ TCA_ACT_OPTIONS,
+ TCA_ACT_INDEX,
+ TCA_ACT_STATS,
+ __TCA_ACT_MAX
+};
+
+#define TCA_ACT_MAX __TCA_ACT_MAX
+#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
+#define TCA_ACT_MAX_PRIO 32
+#define TCA_ACT_BIND 1
+#define TCA_ACT_NOBIND 0
+#define TCA_ACT_UNBIND 1
+#define TCA_ACT_NOUNBIND 0
+#define TCA_ACT_REPLACE 1
+#define TCA_ACT_NOREPLACE 0
+#define MAX_REC_LOOP 4
+#define MAX_RED_LOOP 4
+
+#define TC_ACT_UNSPEC (-1)
+#define TC_ACT_OK 0
+#define TC_ACT_RECLASSIFY 1
+#define TC_ACT_SHOT 2
+#define TC_ACT_PIPE 3
+#define TC_ACT_STOLEN 4
+#define TC_ACT_QUEUED 5
+#define TC_ACT_REPEAT 6
+#define TC_ACT_JUMP 0x10000000
+
+enum
+{
+ TCA_ID_UNSPEC=0,
+ TCA_ID_POLICE=1,
+
+ __TCA_ID_MAX=255
+};
+
+#define TCA_ID_MAX __TCA_ID_MAX
+
+struct tc_police
+{
+ __u32 index;
+ int action;
+#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
+#define TC_POLICE_OK TC_ACT_OK
+#define TC_POLICE_RECLASSIFY TC_ACT_RECLASSIFY
+#define TC_POLICE_SHOT TC_ACT_SHOT
+#define TC_POLICE_PIPE TC_ACT_PIPE
+
+ __u32 limit;
+ __u32 burst;
+ __u32 mtu;
+ struct tc_ratespec rate;
+ struct tc_ratespec peakrate;
+ int refcnt;
+ int bindcnt;
+ __u32 capab;
+};
+
+struct tcf_t
+{
+ __u64 install;
+ __u64 lastuse;
+ __u64 expires;
+};
+
+struct tc_cnt
+{
+ int refcnt;
+ int bindcnt;
+};
+
+#define tc_gen __u32 index; __u32 capab; int action; int refcnt; int bindcnt
+
+enum
+{
+ TCA_POLICE_UNSPEC,
+ TCA_POLICE_TBF,
+ TCA_POLICE_RATE,
+ TCA_POLICE_PEAKRATE,
+ TCA_POLICE_AVRATE,
+ TCA_POLICE_RESULT,
+ __TCA_POLICE_MAX
+#define TCA_POLICE_RESULT TCA_POLICE_RESULT
+};
+
+#define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
+
+#define TC_U32_HTID(h) ((h)&0xFFF00000)
+#define TC_U32_USERHTID(h) (TC_U32_HTID(h)>>20)
+#define TC_U32_HASH(h) (((h)>>12)&0xFF)
+#define TC_U32_NODE(h) ((h)&0xFFF)
+#define TC_U32_KEY(h) ((h)&0xFFFFF)
+#define TC_U32_UNSPEC 0
+#define TC_U32_ROOT (0xFFF00000)
+
+enum
+{
+ TCA_U32_UNSPEC,
+ TCA_U32_CLASSID,
+ TCA_U32_HASH,
+ TCA_U32_LINK,
+ TCA_U32_DIVISOR,
+ TCA_U32_SEL,
+ TCA_U32_POLICE,
+ TCA_U32_ACT,
+ TCA_U32_INDEV,
+ TCA_U32_PCNT,
+ TCA_U32_MARK,
+ __TCA_U32_MAX
+};
+
+#define TCA_U32_MAX (__TCA_U32_MAX - 1)
+
+struct tc_u32_key
+{
+ __u32 mask;
+ __u32 val;
+ int off;
+ int offmask;
+};
+
+struct tc_u32_sel
+{
+ unsigned char flags;
+ unsigned char offshift;
+ unsigned char nkeys;
+
+ __u16 offmask;
+ __u16 off;
+ short offoff;
+
+ short hoff;
+ __u32 hmask;
+ struct tc_u32_key keys[0];
+};
+
+struct tc_u32_mark
+{
+ __u32 val;
+ __u32 mask;
+ __u32 success;
+};
+
+struct tc_u32_pcnt
+{
+ __u64 rcnt;
+ __u64 rhit;
+ __u64 kcnts[0];
+};
+
+#define TC_U32_TERMINAL 1
+#define TC_U32_OFFSET 2
+#define TC_U32_VAROFFSET 4
+#define TC_U32_EAT 8
+
+#define TC_U32_MAXDEPTH 8
+
+enum
+{
+ TCA_RSVP_UNSPEC,
+ TCA_RSVP_CLASSID,
+ TCA_RSVP_DST,
+ TCA_RSVP_SRC,
+ TCA_RSVP_PINFO,
+ TCA_RSVP_POLICE,
+ TCA_RSVP_ACT,
+ __TCA_RSVP_MAX
+};
+
+#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
+
+struct tc_rsvp_gpi
+{
+ __u32 key;
+ __u32 mask;
+ int offset;
+};
+
+struct tc_rsvp_pinfo
+{
+ struct tc_rsvp_gpi dpi;
+ struct tc_rsvp_gpi spi;
+ __u8 protocol;
+ __u8 tunnelid;
+ __u8 tunnelhdr;
+ __u8 pad;
+};
+
+enum
+{
+ TCA_ROUTE4_UNSPEC,
+ TCA_ROUTE4_CLASSID,
+ TCA_ROUTE4_TO,
+ TCA_ROUTE4_FROM,
+ TCA_ROUTE4_IIF,
+ TCA_ROUTE4_POLICE,
+ TCA_ROUTE4_ACT,
+ __TCA_ROUTE4_MAX
+};
+
+#define TCA_ROUTE4_MAX (__TCA_ROUTE4_MAX - 1)
+
+enum
+{
+ TCA_FW_UNSPEC,
+ TCA_FW_CLASSID,
+ TCA_FW_POLICE,
+ TCA_FW_INDEV,
+ TCA_FW_ACT,
+ __TCA_FW_MAX
+};
+
+#define TCA_FW_MAX (__TCA_FW_MAX - 1)
+
+enum
+{
+ TCA_TCINDEX_UNSPEC,
+ TCA_TCINDEX_HASH,
+ TCA_TCINDEX_MASK,
+ TCA_TCINDEX_SHIFT,
+ TCA_TCINDEX_FALL_THROUGH,
+ TCA_TCINDEX_CLASSID,
+ TCA_TCINDEX_POLICE,
+ TCA_TCINDEX_ACT,
+ __TCA_TCINDEX_MAX
+};
+
+#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
+
+enum
+{
+ TCA_BASIC_UNSPEC,
+ TCA_BASIC_CLASSID,
+ TCA_BASIC_EMATCHES,
+ TCA_BASIC_ACT,
+ TCA_BASIC_POLICE,
+ __TCA_BASIC_MAX
+};
+
+#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
+
+struct tcf_ematch_tree_hdr
+{
+ __u16 nmatches;
+ __u16 progid;
+};
+
+enum
+{
+ TCA_EMATCH_TREE_UNSPEC,
+ TCA_EMATCH_TREE_HDR,
+ TCA_EMATCH_TREE_LIST,
+ __TCA_EMATCH_TREE_MAX
+};
+#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
+
+struct tcf_ematch_hdr
+{
+ __u16 matchid;
+ __u16 kind;
+ __u16 flags;
+ __u16 pad;
+};
+
+#define TCF_EM_REL_END 0
+#define TCF_EM_REL_AND (1<<0)
+#define TCF_EM_REL_OR (1<<1)
+#define TCF_EM_INVERT (1<<2)
+#define TCF_EM_SIMPLE (1<<3)
+
+#define TCF_EM_REL_MASK 3
+#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
+
+enum
+{
+ TCF_LAYER_LINK,
+ TCF_LAYER_NETWORK,
+ TCF_LAYER_TRANSPORT,
+ __TCF_LAYER_MAX
+};
+#define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1)
+
+enum
+{
+ TCF_EM_CONTAINER,
+ TCF_EM_CMP,
+ TCF_EM_NBYTE,
+ TCF_EM_U32,
+ TCF_EM_META,
+ TCF_EM_TEXT,
+ __TCF_EM_MAX
+};
+
+enum
+{
+ TCF_EM_PROG_TC
+};
+
+enum
+{
+ TCF_EM_OPND_EQ,
+ TCF_EM_OPND_GT,
+ TCF_EM_OPND_LT
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pkt_sched.h b/6/platforms/android-3/arch-x86/usr/include/linux/pkt_sched.h
new file mode 100644
index 0000000..1e15d83
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pkt_sched.h
@@ -0,0 +1,405 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PKT_SCHED_H
+#define __LINUX_PKT_SCHED_H
+
+#define TC_PRIO_BESTEFFORT 0
+#define TC_PRIO_FILLER 1
+#define TC_PRIO_BULK 2
+#define TC_PRIO_INTERACTIVE_BULK 4
+#define TC_PRIO_INTERACTIVE 6
+#define TC_PRIO_CONTROL 7
+
+#define TC_PRIO_MAX 15
+
+struct tc_stats
+{
+ __u64 bytes;
+ __u32 packets;
+ __u32 drops;
+ __u32 overlimits;
+ __u32 bps;
+ __u32 pps;
+ __u32 qlen;
+ __u32 backlog;
+};
+
+struct tc_estimator
+{
+ signed char interval;
+ unsigned char ewma_log;
+};
+
+#define TC_H_MAJ_MASK (0xFFFF0000U)
+#define TC_H_MIN_MASK (0x0000FFFFU)
+#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
+#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
+#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
+
+#define TC_H_UNSPEC (0U)
+#define TC_H_ROOT (0xFFFFFFFFU)
+#define TC_H_INGRESS (0xFFFFFFF1U)
+
+struct tc_ratespec
+{
+ unsigned char cell_log;
+ unsigned char __reserved;
+ unsigned short feature;
+ short addend;
+ unsigned short mpu;
+ __u32 rate;
+};
+
+struct tc_fifo_qopt
+{
+ __u32 limit;
+};
+
+#define TCQ_PRIO_BANDS 16
+#define TCQ_MIN_PRIO_BANDS 2
+
+struct tc_prio_qopt
+{
+ int bands;
+ __u8 priomap[TC_PRIO_MAX+1];
+};
+
+struct tc_tbf_qopt
+{
+ struct tc_ratespec rate;
+ struct tc_ratespec peakrate;
+ __u32 limit;
+ __u32 buffer;
+ __u32 mtu;
+};
+
+enum
+{
+ TCA_TBF_UNSPEC,
+ TCA_TBF_PARMS,
+ TCA_TBF_RTAB,
+ TCA_TBF_PTAB,
+ __TCA_TBF_MAX,
+};
+
+#define TCA_TBF_MAX (__TCA_TBF_MAX - 1)
+
+struct tc_sfq_qopt
+{
+ unsigned quantum;
+ int perturb_period;
+ __u32 limit;
+ unsigned divisor;
+ unsigned flows;
+};
+
+enum
+{
+ TCA_RED_UNSPEC,
+ TCA_RED_PARMS,
+ TCA_RED_STAB,
+ __TCA_RED_MAX,
+};
+
+#define TCA_RED_MAX (__TCA_RED_MAX - 1)
+
+struct tc_red_qopt
+{
+ __u32 limit;
+ __u32 qth_min;
+ __u32 qth_max;
+ unsigned char Wlog;
+ unsigned char Plog;
+ unsigned char Scell_log;
+ unsigned char flags;
+#define TC_RED_ECN 1
+#define TC_RED_HARDDROP 2
+};
+
+struct tc_red_xstats
+{
+ __u32 early;
+ __u32 pdrop;
+ __u32 other;
+ __u32 marked;
+};
+
+#define MAX_DPs 16
+
+enum
+{
+ TCA_GRED_UNSPEC,
+ TCA_GRED_PARMS,
+ TCA_GRED_STAB,
+ TCA_GRED_DPS,
+ __TCA_GRED_MAX,
+};
+
+#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
+
+struct tc_gred_qopt
+{
+ __u32 limit;
+ __u32 qth_min;
+ __u32 qth_max;
+ __u32 DP;
+ __u32 backlog;
+ __u32 qave;
+ __u32 forced;
+ __u32 early;
+ __u32 other;
+ __u32 pdrop;
+ __u8 Wlog;
+ __u8 Plog;
+ __u8 Scell_log;
+ __u8 prio;
+ __u32 packets;
+ __u32 bytesin;
+};
+
+struct tc_gred_sopt
+{
+ __u32 DPs;
+ __u32 def_DP;
+ __u8 grio;
+ __u8 flags;
+ __u16 pad1;
+};
+
+#define TC_HTB_NUMPRIO 8
+#define TC_HTB_MAXDEPTH 8
+#define TC_HTB_PROTOVER 3
+
+struct tc_htb_opt
+{
+ struct tc_ratespec rate;
+ struct tc_ratespec ceil;
+ __u32 buffer;
+ __u32 cbuffer;
+ __u32 quantum;
+ __u32 level;
+ __u32 prio;
+};
+struct tc_htb_glob
+{
+ __u32 version;
+ __u32 rate2quantum;
+ __u32 defcls;
+ __u32 debug;
+
+ __u32 direct_pkts;
+};
+enum
+{
+ TCA_HTB_UNSPEC,
+ TCA_HTB_PARMS,
+ TCA_HTB_INIT,
+ TCA_HTB_CTAB,
+ TCA_HTB_RTAB,
+ __TCA_HTB_MAX,
+};
+
+#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
+
+struct tc_htb_xstats
+{
+ __u32 lends;
+ __u32 borrows;
+ __u32 giants;
+ __u32 tokens;
+ __u32 ctokens;
+};
+
+struct tc_hfsc_qopt
+{
+ __u16 defcls;
+};
+
+struct tc_service_curve
+{
+ __u32 m1;
+ __u32 d;
+ __u32 m2;
+};
+
+struct tc_hfsc_stats
+{
+ __u64 work;
+ __u64 rtwork;
+ __u32 period;
+ __u32 level;
+};
+
+enum
+{
+ TCA_HFSC_UNSPEC,
+ TCA_HFSC_RSC,
+ TCA_HFSC_FSC,
+ TCA_HFSC_USC,
+ __TCA_HFSC_MAX,
+};
+
+#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1)
+
+#define TC_CBQ_MAXPRIO 8
+#define TC_CBQ_MAXLEVEL 8
+#define TC_CBQ_DEF_EWMA 5
+
+struct tc_cbq_lssopt
+{
+ unsigned char change;
+ unsigned char flags;
+#define TCF_CBQ_LSS_BOUNDED 1
+#define TCF_CBQ_LSS_ISOLATED 2
+ unsigned char ewma_log;
+ unsigned char level;
+#define TCF_CBQ_LSS_FLAGS 1
+#define TCF_CBQ_LSS_EWMA 2
+#define TCF_CBQ_LSS_MAXIDLE 4
+#define TCF_CBQ_LSS_MINIDLE 8
+#define TCF_CBQ_LSS_OFFTIME 0x10
+#define TCF_CBQ_LSS_AVPKT 0x20
+ __u32 maxidle;
+ __u32 minidle;
+ __u32 offtime;
+ __u32 avpkt;
+};
+
+struct tc_cbq_wrropt
+{
+ unsigned char flags;
+ unsigned char priority;
+ unsigned char cpriority;
+ unsigned char __reserved;
+ __u32 allot;
+ __u32 weight;
+};
+
+struct tc_cbq_ovl
+{
+ unsigned char strategy;
+#define TC_CBQ_OVL_CLASSIC 0
+#define TC_CBQ_OVL_DELAY 1
+#define TC_CBQ_OVL_LOWPRIO 2
+#define TC_CBQ_OVL_DROP 3
+#define TC_CBQ_OVL_RCLASSIC 4
+ unsigned char priority2;
+ __u16 pad;
+ __u32 penalty;
+};
+
+struct tc_cbq_police
+{
+ unsigned char police;
+ unsigned char __res1;
+ unsigned short __res2;
+};
+
+struct tc_cbq_fopt
+{
+ __u32 split;
+ __u32 defmap;
+ __u32 defchange;
+};
+
+struct tc_cbq_xstats
+{
+ __u32 borrows;
+ __u32 overactions;
+ __s32 avgidle;
+ __s32 undertime;
+};
+
+enum
+{
+ TCA_CBQ_UNSPEC,
+ TCA_CBQ_LSSOPT,
+ TCA_CBQ_WRROPT,
+ TCA_CBQ_FOPT,
+ TCA_CBQ_OVL_STRATEGY,
+ TCA_CBQ_RATE,
+ TCA_CBQ_RTAB,
+ TCA_CBQ_POLICE,
+ __TCA_CBQ_MAX,
+};
+
+#define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1)
+
+enum {
+ TCA_DSMARK_UNSPEC,
+ TCA_DSMARK_INDICES,
+ TCA_DSMARK_DEFAULT_INDEX,
+ TCA_DSMARK_SET_TC_INDEX,
+ TCA_DSMARK_MASK,
+ TCA_DSMARK_VALUE,
+ __TCA_DSMARK_MAX,
+};
+
+#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
+
+enum {
+ TCA_ATM_UNSPEC,
+ TCA_ATM_FD,
+ TCA_ATM_PTR,
+ TCA_ATM_HDR,
+ TCA_ATM_EXCESS,
+ TCA_ATM_ADDR,
+ TCA_ATM_STATE,
+ __TCA_ATM_MAX,
+};
+
+#define TCA_ATM_MAX (__TCA_ATM_MAX - 1)
+
+enum
+{
+ TCA_NETEM_UNSPEC,
+ TCA_NETEM_CORR,
+ TCA_NETEM_DELAY_DIST,
+ TCA_NETEM_REORDER,
+ TCA_NETEM_CORRUPT,
+ __TCA_NETEM_MAX,
+};
+
+#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
+
+struct tc_netem_qopt
+{
+ __u32 latency;
+ __u32 limit;
+ __u32 loss;
+ __u32 gap;
+ __u32 duplicate;
+ __u32 jitter;
+};
+
+struct tc_netem_corr
+{
+ __u32 delay_corr;
+ __u32 loss_corr;
+ __u32 dup_corr;
+};
+
+struct tc_netem_reorder
+{
+ __u32 probability;
+ __u32 correlation;
+};
+
+struct tc_netem_corrupt
+{
+ __u32 probability;
+ __u32 correlation;
+};
+
+#define NETEM_DIST_SCALE 8192
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/platform_device.h b/6/platforms/android-3/arch-x86/usr/include/linux/platform_device.h
new file mode 100644
index 0000000..a761b5b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/platform_device.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PLATFORM_DEVICE_H_
+#define _PLATFORM_DEVICE_H_
+
+#include <linux/device.h>
+
+struct platform_device {
+ const char * name;
+ u32 id;
+ struct device dev;
+ u32 num_resources;
+ struct resource * resource;
+};
+
+#define to_platform_device(x) container_of((x), struct platform_device, dev)
+
+struct platform_driver {
+ int (*probe)(struct platform_device *);
+ int (*remove)(struct platform_device *);
+ void (*shutdown)(struct platform_device *);
+ int (*suspend)(struct platform_device *, pm_message_t state);
+ int (*resume)(struct platform_device *);
+ struct device_driver driver;
+};
+
+#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
+#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/plist.h b/6/platforms/android-3/arch-x86/usr/include/linux/plist.h
new file mode 100644
index 0000000..5d65783
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/plist.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PLIST_H_
+#define _LINUX_PLIST_H_
+
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/spinlock_types.h>
+
+struct plist_head {
+ struct list_head prio_list;
+ struct list_head node_list;
+};
+
+struct plist_node {
+ int prio;
+ struct plist_head plist;
+};
+
+#define PLIST_HEAD_LOCK_INIT(_lock)
+
+#define PLIST_HEAD_INIT(head, _lock) { .prio_list = LIST_HEAD_INIT((head).prio_list), .node_list = LIST_HEAD_INIT((head).node_list), PLIST_HEAD_LOCK_INIT(&(_lock)) }
+
+#define PLIST_NODE_INIT(node, __prio) { .prio = (__prio), .plist = PLIST_HEAD_INIT((node).plist, NULL), }
+
+#define plist_for_each(pos, head) list_for_each_entry(pos, &(head)->node_list, plist.node_list)
+
+#define plist_for_each_safe(pos, n, head) list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
+
+#define plist_for_each_entry(pos, head, mem) list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
+
+#define plist_for_each_entry_safe(pos, n, head, m) list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
+
+#define plist_first_entry(head, type, member) container_of(plist_first(head), type, member)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pm.h b/6/platforms/android-3/arch-x86/usr/include/linux/pm.h
new file mode 100644
index 0000000..0548791
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pm.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PM_H
+#define _LINUX_PM_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/pnp.h b/6/platforms/android-3/arch-x86/usr/include/linux/pnp.h
new file mode 100644
index 0000000..30b0af7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/pnp.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PNP_H
+#define _LINUX_PNP_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/poll.h b/6/platforms/android-3/arch-x86/usr/include/linux/poll.h
new file mode 100644
index 0000000..6822509
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/poll.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_POLL_H
+#define _LINUX_POLL_H
+
+#include <asm/poll.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/posix_acl.h b/6/platforms/android-3/arch-x86/usr/include/linux/posix_acl.h
new file mode 100644
index 0000000..bdaee5b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/posix_acl.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_POSIX_ACL_H
+#define __LINUX_POSIX_ACL_H
+
+#include <linux/slab.h>
+
+#define ACL_UNDEFINED_ID (-1)
+
+#define ACL_TYPE_ACCESS (0x8000)
+#define ACL_TYPE_DEFAULT (0x4000)
+
+#define ACL_USER_OBJ (0x01)
+#define ACL_USER (0x02)
+#define ACL_GROUP_OBJ (0x04)
+#define ACL_GROUP (0x08)
+#define ACL_MASK (0x10)
+#define ACL_OTHER (0x20)
+
+#define ACL_READ (0x04)
+#define ACL_WRITE (0x02)
+#define ACL_EXECUTE (0x01)
+
+struct posix_acl_entry {
+ short e_tag;
+ unsigned short e_perm;
+ unsigned int e_id;
+};
+
+struct posix_acl {
+ atomic_t a_refcount;
+ unsigned int a_count;
+ struct posix_acl_entry a_entries[0];
+};
+
+#define FOREACH_ACL_ENTRY(pa, acl, pe) for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/posix_types.h b/6/platforms/android-3/arch-x86/usr/include/linux/posix_types.h
new file mode 100644
index 0000000..d7d0ad2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/posix_types.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_POSIX_TYPES_H
+#define _LINUX_POSIX_TYPES_H
+
+#include <linux/stddef.h>
+
+#undef __NFDBITS
+#define __NFDBITS (8 * sizeof(unsigned long))
+
+#undef __FD_SETSIZE
+#define __FD_SETSIZE 1024
+
+#undef __FDSET_LONGS
+#define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS)
+
+#undef __FDELT
+#define __FDELT(d) ((d) / __NFDBITS)
+
+#undef __FDMASK
+#define __FDMASK(d) (1UL << ((d) % __NFDBITS))
+
+typedef struct {
+ unsigned long fds_bits [__FDSET_LONGS];
+} __kernel_fd_set;
+
+typedef void (*__kernel_sighandler_t)(int);
+
+typedef int __kernel_key_t;
+typedef int __kernel_mqd_t;
+
+#include <asm/posix_types.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ppdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/ppdev.h
new file mode 100644
index 0000000..c43f8b9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ppdev.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define PP_IOCTL 'p'
+
+#define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
+
+#define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
+#define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
+
+#define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
+#define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
+
+struct ppdev_frob_struct {
+ unsigned char mask;
+ unsigned char val;
+};
+#define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
+
+#define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
+#define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
+
+#define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
+#define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
+
+#define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
+#define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
+
+#define PPCLAIM _IO(PP_IOCTL, 0x8b)
+
+#define PPRELEASE _IO(PP_IOCTL, 0x8c)
+
+#define PPYIELD _IO(PP_IOCTL, 0x8d)
+
+#define PPEXCL _IO(PP_IOCTL, 0x8f)
+
+#define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
+
+#define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
+
+#define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
+
+#define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
+
+#define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
+
+#define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
+#define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
+
+#define PPGETMODES _IOR(PP_IOCTL, 0x97, unsigned int)
+
+#define PPGETMODE _IOR(PP_IOCTL, 0x98, int)
+#define PPGETPHASE _IOR(PP_IOCTL, 0x99, int)
+
+#define PPGETFLAGS _IOR(PP_IOCTL, 0x9a, int)
+#define PPSETFLAGS _IOW(PP_IOCTL, 0x9b, int)
+
+#define PP_FASTWRITE (1<<2)
+#define PP_FASTREAD (1<<3)
+#define PP_W91284PIC (1<<4)
+
+#define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ppp_defs.h b/6/platforms/android-3/arch-x86/usr/include/linux/ppp_defs.h
new file mode 100644
index 0000000..da54ac7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ppp_defs.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _PPP_DEFS_H_
+#define _PPP_DEFS_H_
+
+#define PPP_HDRLEN 4
+#define PPP_FCSLEN 2
+#define PPP_MRU 1500
+
+#define PPP_ADDRESS(p) (((__u8 *)(p))[0])
+#define PPP_CONTROL(p) (((__u8 *)(p))[1])
+#define PPP_PROTOCOL(p) ((((__u8 *)(p))[2] << 8) + ((__u8 *)(p))[3])
+
+#define PPP_ALLSTATIONS 0xff
+#define PPP_UI 0x03
+#define PPP_FLAG 0x7e
+#define PPP_ESCAPE 0x7d
+#define PPP_TRANS 0x20
+
+#define PPP_IP 0x21
+#define PPP_AT 0x29
+#define PPP_IPX 0x2b
+#define PPP_VJC_COMP 0x2d
+#define PPP_VJC_UNCOMP 0x2f
+#define PPP_MP 0x3d
+#define PPP_IPV6 0x57
+#define PPP_COMPFRAG 0xfb
+#define PPP_COMP 0xfd
+#define PPP_MPLS_UC 0x0281
+#define PPP_MPLS_MC 0x0283
+#define PPP_IPCP 0x8021
+#define PPP_ATCP 0x8029
+#define PPP_IPXCP 0x802b
+#define PPP_IPV6CP 0x8057
+#define PPP_CCPFRAG 0x80fb
+#define PPP_CCP 0x80fd
+#define PPP_MPLSCP 0x80fd
+#define PPP_LCP 0xc021
+#define PPP_PAP 0xc023
+#define PPP_LQR 0xc025
+#define PPP_CHAP 0xc223
+#define PPP_CBCP 0xc029
+
+#define PPP_INITFCS 0xffff
+#define PPP_GOODFCS 0xf0b8
+
+typedef __u32 ext_accm[8];
+
+enum NPmode {
+ NPMODE_PASS,
+ NPMODE_DROP,
+ NPMODE_ERROR,
+ NPMODE_QUEUE
+};
+
+struct pppstat {
+ __u32 ppp_discards;
+
+ __u32 ppp_ibytes;
+ __u32 ppp_ioctects;
+ __u32 ppp_ipackets;
+ __u32 ppp_ierrors;
+ __u32 ppp_ilqrs;
+
+ __u32 ppp_obytes;
+ __u32 ppp_ooctects;
+ __u32 ppp_opackets;
+ __u32 ppp_oerrors;
+ __u32 ppp_olqrs;
+};
+
+struct vjstat {
+ __u32 vjs_packets;
+ __u32 vjs_compressed;
+ __u32 vjs_searches;
+ __u32 vjs_misses;
+ __u32 vjs_uncompressedin;
+ __u32 vjs_compressedin;
+ __u32 vjs_errorin;
+ __u32 vjs_tossed;
+};
+
+struct compstat {
+ __u32 unc_bytes;
+ __u32 unc_packets;
+ __u32 comp_bytes;
+ __u32 comp_packets;
+ __u32 inc_bytes;
+ __u32 inc_packets;
+
+ __u32 in_count;
+ __u32 bytes_out;
+
+ double ratio;
+};
+
+struct ppp_stats {
+ struct pppstat p;
+ struct vjstat vj;
+};
+
+struct ppp_comp_stats {
+ struct compstat c;
+ struct compstat d;
+};
+
+struct ppp_idle {
+ time_t xmit_idle;
+ time_t recv_idle;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/prctl.h b/6/platforms/android-3/arch-x86/usr/include/linux/prctl.h
new file mode 100644
index 0000000..a7631a2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/prctl.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PRCTL_H
+#define _LINUX_PRCTL_H
+
+#define PR_SET_PDEATHSIG 1
+#define PR_GET_PDEATHSIG 2
+
+#define PR_GET_DUMPABLE 3
+#define PR_SET_DUMPABLE 4
+
+#define PR_GET_UNALIGN 5
+#define PR_SET_UNALIGN 6
+#define PR_UNALIGN_NOPRINT 1
+#define PR_UNALIGN_SIGBUS 2
+
+#define PR_GET_KEEPCAPS 7
+#define PR_SET_KEEPCAPS 8
+
+#define PR_GET_FPEMU 9
+#define PR_SET_FPEMU 10
+#define PR_FPEMU_NOPRINT 1
+#define PR_FPEMU_SIGFPE 2
+
+#define PR_GET_FPEXC 11
+#define PR_SET_FPEXC 12
+#define PR_FP_EXC_SW_ENABLE 0x80
+#define PR_FP_EXC_DIV 0x010000
+#define PR_FP_EXC_OVF 0x020000
+#define PR_FP_EXC_UND 0x040000
+#define PR_FP_EXC_RES 0x080000
+#define PR_FP_EXC_INV 0x100000
+#define PR_FP_EXC_DISABLED 0
+#define PR_FP_EXC_NONRECOV 1
+#define PR_FP_EXC_ASYNC 2
+#define PR_FP_EXC_PRECISE 3
+
+#define PR_GET_TIMING 13
+#define PR_SET_TIMING 14
+#define PR_TIMING_STATISTICAL 0
+#define PR_TIMING_TIMESTAMP 1
+
+#define PR_SET_NAME 15
+#define PR_GET_NAME 16
+
+#define PR_GET_ENDIAN 19
+#define PR_SET_ENDIAN 20
+#define PR_ENDIAN_BIG 0
+#define PR_ENDIAN_LITTLE 1
+#define PR_ENDIAN_PPC_LITTLE 2
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/preempt.h b/6/platforms/android-3/arch-x86/usr/include/linux/preempt.h
new file mode 100644
index 0000000..b703dd3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/preempt.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_PREEMPT_H
+#define __LINUX_PREEMPT_H
+
+#include <linux/thread_info.h>
+#include <linux/linkage.h>
+
+#define add_preempt_count(val) do { preempt_count() += (val); } while (0)
+#define sub_preempt_count(val) do { preempt_count() -= (val); } while (0)
+
+#define inc_preempt_count() add_preempt_count(1)
+#define dec_preempt_count() sub_preempt_count(1)
+
+#define preempt_count() (current_thread_info()->preempt_count)
+
+#define preempt_disable() do { } while (0)
+#define preempt_enable_no_resched() do { } while (0)
+#define preempt_enable() do { } while (0)
+#define preempt_check_resched() do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/proc_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/proc_fs.h
new file mode 100644
index 0000000..ccb22ac
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/proc_fs.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PROC_FS_H
+#define _LINUX_PROC_FS_H
+
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+
+#define FIRST_PROCESS_ENTRY 256
+
+enum {
+ PROC_ROOT_INO = 1,
+};
+
+#define PROC_SUPER_MAGIC 0x9fa0
+
+typedef int (read_proc_t)(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char __user *buffer,
+ unsigned long count, void *data);
+typedef int (get_info_t)(char *, char **, off_t, int);
+
+struct proc_dir_entry {
+ unsigned int low_ino;
+ unsigned short namelen;
+ const char *name;
+ mode_t mode;
+ nlink_t nlink;
+ uid_t uid;
+ gid_t gid;
+ loff_t size;
+ struct inode_operations * proc_iops;
+ const struct file_operations * proc_fops;
+ get_info_t *get_info;
+ struct module *owner;
+ struct proc_dir_entry *next, *parent, *subdir;
+ void *data;
+ read_proc_t *read_proc;
+ write_proc_t *write_proc;
+ atomic_t count;
+ int deleted;
+ void *set;
+};
+
+struct kcore_list {
+ struct kcore_list *next;
+ unsigned long addr;
+ size_t size;
+};
+
+struct vmcore {
+ struct list_head list;
+ unsigned long long paddr;
+ unsigned long long size;
+ loff_t offset;
+};
+
+#define proc_root_driver NULL
+#define proc_net NULL
+#define proc_bus NULL
+
+#define proc_net_fops_create(name, mode, fops) ({ (void)(mode), NULL; })
+#define proc_net_create(name, mode, info) ({ (void)(mode), NULL; })
+#define remove_proc_entry(name, parent) do {} while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ptrace.h b/6/platforms/android-3/arch-x86/usr/include/linux/ptrace.h
new file mode 100644
index 0000000..079c0c8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ptrace.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_PTRACE_H
+#define _LINUX_PTRACE_H
+
+#define PTRACE_TRACEME 0
+#define PTRACE_PEEKTEXT 1
+#define PTRACE_PEEKDATA 2
+#define PTRACE_PEEKUSR 3
+#define PTRACE_POKETEXT 4
+#define PTRACE_POKEDATA 5
+#define PTRACE_POKEUSR 6
+#define PTRACE_CONT 7
+#define PTRACE_KILL 8
+#define PTRACE_SINGLESTEP 9
+
+#define PTRACE_ATTACH 0x10
+#define PTRACE_DETACH 0x11
+
+#define PTRACE_SYSCALL 24
+
+#define PTRACE_SETOPTIONS 0x4200
+#define PTRACE_GETEVENTMSG 0x4201
+#define PTRACE_GETSIGINFO 0x4202
+#define PTRACE_SETSIGINFO 0x4203
+
+#define PTRACE_O_TRACESYSGOOD 0x00000001
+#define PTRACE_O_TRACEFORK 0x00000002
+#define PTRACE_O_TRACEVFORK 0x00000004
+#define PTRACE_O_TRACECLONE 0x00000008
+#define PTRACE_O_TRACEEXEC 0x00000010
+#define PTRACE_O_TRACEVFORKDONE 0x00000020
+#define PTRACE_O_TRACEEXIT 0x00000040
+
+#define PTRACE_O_MASK 0x0000007f
+
+#define PTRACE_EVENT_FORK 1
+#define PTRACE_EVENT_VFORK 2
+#define PTRACE_EVENT_CLONE 3
+#define PTRACE_EVENT_EXEC 4
+#define PTRACE_EVENT_VFORK_DONE 5
+#define PTRACE_EVENT_EXIT 6
+
+#include <asm/ptrace.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/qic117.h b/6/platforms/android-3/arch-x86/usr/include/linux/qic117.h
new file mode 100644
index 0000000..e077090
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/qic117.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _QIC117_H
+#define _QIC117_H
+
+typedef enum {
+ QIC_NO_COMMAND = 0,
+ QIC_RESET = 1,
+ QIC_REPORT_NEXT_BIT = 2,
+ QIC_PAUSE = 3,
+ QIC_MICRO_STEP_PAUSE = 4,
+ QIC_ALTERNATE_TIMEOUT = 5,
+ QIC_REPORT_DRIVE_STATUS = 6,
+ QIC_REPORT_ERROR_CODE = 7,
+ QIC_REPORT_DRIVE_CONFIGURATION = 8,
+ QIC_REPORT_ROM_VERSION = 9,
+ QIC_LOGICAL_FORWARD = 10,
+ QIC_PHYSICAL_REVERSE = 11,
+ QIC_PHYSICAL_FORWARD = 12,
+ QIC_SEEK_HEAD_TO_TRACK = 13,
+ QIC_SEEK_LOAD_POINT = 14,
+ QIC_ENTER_FORMAT_MODE = 15,
+ QIC_WRITE_REFERENCE_BURST = 16,
+ QIC_ENTER_VERIFY_MODE = 17,
+ QIC_STOP_TAPE = 18,
+
+ QIC_MICRO_STEP_HEAD_UP = 21,
+ QIC_MICRO_STEP_HEAD_DOWN = 22,
+ QIC_SOFT_SELECT = 23,
+ QIC_SOFT_DESELECT = 24,
+ QIC_SKIP_REVERSE = 25,
+ QIC_SKIP_FORWARD = 26,
+ QIC_SELECT_RATE = 27,
+
+ QIC_ENTER_DIAGNOSTIC_1 = 28,
+ QIC_ENTER_DIAGNOSTIC_2 = 29,
+ QIC_ENTER_PRIMARY_MODE = 30,
+
+ QIC_REPORT_VENDOR_ID = 32,
+ QIC_REPORT_TAPE_STATUS = 33,
+ QIC_SKIP_EXTENDED_REVERSE = 34,
+ QIC_SKIP_EXTENDED_FORWARD = 35,
+ QIC_CALIBRATE_TAPE_LENGTH = 36,
+ QIC_REPORT_FORMAT_SEGMENTS = 37,
+ QIC_SET_FORMAT_SEGMENTS = 38,
+
+ QIC_PHANTOM_SELECT = 46,
+ QIC_PHANTOM_DESELECT = 47
+} qic117_cmd_t;
+
+typedef enum {
+ discretional = 0, required, ccs1, ccs2
+} qic_compatibility;
+
+typedef enum {
+ unused, mode, motion, report
+} command_types;
+
+struct qic117_command_table {
+ char *name;
+ __u8 mask;
+ __u8 state;
+ __u8 cmd_type;
+ __u8 non_intr;
+ __u8 level;
+};
+
+#define QIC117_COMMANDS { {NULL, 0x00, 0x00, mode, 0, discretional}, {"soft reset", 0x00, 0x00, motion, 1, required}, {"report next bit", 0x00, 0x00, report, 0, required}, {"pause", 0x36, 0x24, motion, 1, required}, {"micro step pause", 0x36, 0x24, motion, 1, required}, {"alternate command timeout", 0x00, 0x00, mode, 0, required}, {"report drive status", 0x00, 0x00, report, 0, required}, {"report error code", 0x01, 0x01, report, 0, required}, {"report drive configuration",0x00, 0x00, report, 0, required}, {"report rom version", 0x00, 0x00, report, 0, required}, {"logical forward", 0x37, 0x25, motion, 0, required}, {"physical reverse", 0x17, 0x05, motion, 0, required}, {"physical forward", 0x17, 0x05, motion, 0, required}, {"seek head to track", 0x37, 0x25, motion, 0, required}, {"seek load point", 0x17, 0x05, motion, 1, required}, {"enter format mode", 0x1f, 0x05, mode, 0, required}, {"write reference burst", 0x1f, 0x05, motion, 1, required}, {"enter verify mode", 0x37, 0x25, mode, 0, required}, {"stop tape", 0x00, 0x00, motion, 1, required}, {"reserved (19)", 0x00, 0x00, unused, 0, discretional}, {"reserved (20)", 0x00, 0x00, unused, 0, discretional}, {"micro step head up", 0x02, 0x00, motion, 0, required}, {"micro step head down", 0x02, 0x00, motion, 0, required}, {"soft select", 0x00, 0x00, mode, 0, discretional}, {"soft deselect", 0x00, 0x00, mode, 0, discretional}, {"skip segments reverse", 0x36, 0x24, motion, 1, required}, {"skip segments forward", 0x36, 0x24, motion, 1, required}, {"select rate or format", 0x03, 0x01, mode, 0, required }, {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional}, {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional}, {"enter primary mode", 0x00, 0x00, mode, 0, required}, {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional}, {"report vendor id", 0x00, 0x00, report, 0, required}, {"report tape status", 0x04, 0x04, report, 0, ccs1}, {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1}, {"skip extended forward", 0x36, 0x24, motion, 1, ccs1}, {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2}, {"report format segments", 0x17, 0x05, report, 0, ccs2}, {"set format segments", 0x17, 0x05, mode, 0, ccs2}, {"reserved (39)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional}, {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional}, {"phantom select", 0x00, 0x00, mode, 0, discretional}, {"phantom deselect", 0x00, 0x00, mode, 0, discretional}, }
+
+#define QIC_STATUS_READY 0x01
+#define QIC_STATUS_ERROR 0x02
+#define QIC_STATUS_CARTRIDGE_PRESENT 0x04
+#define QIC_STATUS_WRITE_PROTECT 0x08
+#define QIC_STATUS_NEW_CARTRIDGE 0x10
+#define QIC_STATUS_REFERENCED 0x20
+#define QIC_STATUS_AT_BOT 0x40
+#define QIC_STATUS_AT_EOT 0x80
+
+#define QIC_CONFIG_RATE_MASK 0x18
+#define QIC_CONFIG_RATE_SHIFT 3
+#define QIC_CONFIG_RATE_250 0
+#define QIC_CONFIG_RATE_500 2
+#define QIC_CONFIG_RATE_1000 3
+#define QIC_CONFIG_RATE_2000 1
+#define QIC_CONFIG_RATE_4000 0
+
+#define QIC_CONFIG_LONG 0x40
+#define QIC_CONFIG_80 0x80
+
+#define QIC_TAPE_STD_MASK 0x0f
+#define QIC_TAPE_QIC40 0x01
+#define QIC_TAPE_QIC80 0x02
+#define QIC_TAPE_QIC3020 0x03
+#define QIC_TAPE_QIC3010 0x04
+
+#define QIC_TAPE_LEN_MASK 0x70
+#define QIC_TAPE_205FT 0x10
+#define QIC_TAPE_307FT 0x20
+#define QIC_TAPE_VARIABLE 0x30
+#define QIC_TAPE_1100FT 0x40
+#define QIC_TAPE_FLEX 0x60
+
+#define QIC_TAPE_WIDE 0x80
+
+#define QIC_TOP_TAPE_LEN 1500
+
+typedef struct {
+ char *message;
+ unsigned int fatal:1;
+} ftape_error;
+
+#define QIC117_ERRORS { { "No error", 0, }, { "Command Received while Drive Not Ready", 0, }, { "Cartridge Not Present or Removed", 1, }, { "Motor Speed Error (not within 1%)", 1, }, { "Motor Speed Fault (jammed, or gross speed error", 1, }, { "Cartridge Write Protected", 1, }, { "Undefined or Reserved Command Code", 1, }, { "Illegal Track Address Specified for Seek", 1, }, { "Illegal Command in Report Subcontext", 0, }, { "Illegal Entry into a Diagnostic Mode", 1, }, { "Broken Tape Detected (based on hole sensor)", 1, }, { "Warning--Read Gain Setting Error", 1, }, { "Command Received While Error Status Pending (obs)", 1, }, { "Command Received While New Cartridge Pending", 1, }, { "Command Illegal or Undefined in Primary Mode", 1, }, { "Command Illegal or Undefined in Format Mode", 1, }, { "Command Illegal or Undefined in Verify Mode", 1, }, { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, }, { "Logical EOT Before All Segments generated", 1, }, { "Command Illegal When Cartridge Not Referenced", 1, }, { "Self-Diagnostic Failed (cannot be cleared)", 1, }, { "Warning EEPROM Not Initialized, Defaults Set", 1, }, { "EEPROM Corrupted or Hardware Failure", 1, }, { "Motion Time-out Error", 1, }, { "Data Segment Too Long -- Logical Forward or Pause", 1, }, { "Transmit Overrun (obs)", 1, }, { "Power On Reset Occurred", 0, }, { "Software Reset Occurred", 0, }, { "Diagnostic Mode 1 Error", 1, }, { "Diagnostic Mode 2 Error", 1, }, { "Command Received During Non-Interruptible Process", 1, }, { "Rate or Format Selection Error", 1, }, { "Illegal Command While in High Speed Mode", 1, }, { "Illegal Seek Segment Value", 1, }, { "Invalid Media", 1, }, { "Head Positioning Failure", 1, }, { "Write Reference Burst Failure", 1, }, { "Prom Code Missing", 1, }, { "Invalid Format", 1, }, { "EOT/BOT System Failure", 1, }, { "Prom A Checksum Error", 1, }, { "Drive Wakeup Reset Occurred", 1, }, { "Prom B Checksum Error", 1, }, { "Illegal Entry into Format Mode", 1, }, }
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/qnxtypes.h b/6/platforms/android-3/arch-x86/usr/include/linux/qnxtypes.h
new file mode 100644
index 0000000..53cd20c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/qnxtypes.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _QNX4TYPES_H
+#define _QNX4TYPES_H
+
+typedef __le16 qnx4_nxtnt_t;
+typedef __u8 qnx4_ftype_t;
+
+typedef struct {
+ __le32 xtnt_blk;
+ __le32 xtnt_size;
+} qnx4_xtnt_t;
+
+typedef __le16 qnx4_mode_t;
+typedef __le16 qnx4_muid_t;
+typedef __le16 qnx4_mgid_t;
+typedef __le32 qnx4_off_t;
+typedef __le16 qnx4_nlink_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/quota.h b/6/platforms/android-3/arch-x86/usr/include/linux/quota.h
new file mode 100644
index 0000000..054af5a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/quota.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_QUOTA_
+#define _LINUX_QUOTA_
+
+#include <linux/errno.h>
+#include <linux/types.h>
+
+#define __DQUOT_VERSION__ "dquot_6.5.1"
+#define __DQUOT_NUM_VERSION__ 6*10000+5*100+1
+
+typedef __kernel_uid32_t qid_t;
+typedef __u64 qsize_t;
+
+#define QUOTABLOCK_BITS 10
+#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
+
+#define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10))
+#define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10))
+#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
+
+#define MAXQUOTAS 2
+#define USRQUOTA 0
+#define GRPQUOTA 1
+
+#define INITQFNAMES { "user", "group", "undefined", };
+
+#define SUBCMDMASK 0x00ff
+#define SUBCMDSHIFT 8
+#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
+
+#define Q_SYNC 0x800001
+#define Q_QUOTAON 0x800002
+#define Q_QUOTAOFF 0x800003
+#define Q_GETFMT 0x800004
+#define Q_GETINFO 0x800005
+#define Q_SETINFO 0x800006
+#define Q_GETQUOTA 0x800007
+#define Q_SETQUOTA 0x800008
+
+#define QIF_BLIMITS 1
+#define QIF_SPACE 2
+#define QIF_ILIMITS 4
+#define QIF_INODES 8
+#define QIF_BTIME 16
+#define QIF_ITIME 32
+#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
+#define QIF_USAGE (QIF_SPACE | QIF_INODES)
+#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
+#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
+
+struct if_dqblk {
+ __u64 dqb_bhardlimit;
+ __u64 dqb_bsoftlimit;
+ __u64 dqb_curspace;
+ __u64 dqb_ihardlimit;
+ __u64 dqb_isoftlimit;
+ __u64 dqb_curinodes;
+ __u64 dqb_btime;
+ __u64 dqb_itime;
+ __u32 dqb_valid;
+};
+
+#define IIF_BGRACE 1
+#define IIF_IGRACE 2
+#define IIF_FLAGS 4
+#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
+
+struct if_dqinfo {
+ __u64 dqi_bgrace;
+ __u64 dqi_igrace;
+ __u32 dqi_flags;
+ __u32 dqi_valid;
+};
+
+#include <sys/cdefs.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/raid/md.h b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md.h
new file mode 100644
index 0000000..d609c06
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_H
+#define _MD_H
+
+#include <linux/blkdev.h>
+#include <asm/semaphore.h>
+#include <linux/major.h>
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#include <linux/bitops.h>
+#include <linux/module.h>
+#include <linux/hdreg.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+#include <linux/smp_lock.h>
+#include <linux/delay.h>
+#include <net/checksum.h>
+#include <linux/random.h>
+#include <linux/kernel_stat.h>
+#include <asm/io.h>
+#include <linux/completion.h>
+#include <linux/mempool.h>
+#include <linux/list.h>
+#include <linux/reboot.h>
+#include <linux/vmalloc.h>
+#include <linux/blkpg.h>
+#include <linux/bio.h>
+
+#include <linux/raid/md_p.h>
+#include <linux/raid/md_u.h>
+#include <linux/raid/md_k.h>
+
+#define MD_MAJOR_VERSION 0
+#define MD_MINOR_VERSION 90
+
+#define MD_PATCHLEVEL_VERSION 3
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_k.h b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_k.h
new file mode 100644
index 0000000..c8b858c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_k.h
@@ -0,0 +1,184 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_K_H
+#define _MD_K_H
+
+#include "../../../drivers/md/dm-bio-list.h"
+
+#define LEVEL_MULTIPATH (-4)
+#define LEVEL_LINEAR (-1)
+#define LEVEL_FAULTY (-5)
+
+#define LEVEL_NONE (-1000000)
+
+#define MaxSector (~(sector_t)0)
+#define MD_THREAD_NAME_MAX 14
+
+typedef struct mddev_s mddev_t;
+typedef struct mdk_rdev_s mdk_rdev_t;
+
+#define MAX_MD_DEVS 256
+
+#define MAX_CHUNK_SIZE (1<<30)
+
+struct mdk_rdev_s
+{
+ struct list_head same_set;
+
+ sector_t size;
+ mddev_t *mddev;
+ unsigned long last_events;
+
+ struct block_device *bdev;
+
+ struct page *sb_page;
+ int sb_loaded;
+ __u64 sb_events;
+ sector_t data_offset;
+ sector_t sb_offset;
+ int sb_size;
+ int preferred_minor;
+
+ struct kobject kobj;
+
+ unsigned long flags;
+#define Faulty 1
+#define In_sync 2
+#define WriteMostly 4
+#define BarriersNotsupp 5
+
+ int desc_nr;
+ int raid_disk;
+ int saved_raid_disk;
+ sector_t recovery_offset;
+
+ atomic_t nr_pending;
+ atomic_t read_errors;
+ atomic_t corrected_errors;
+};
+
+struct mddev_s
+{
+ void *private;
+ struct mdk_personality *pers;
+ dev_t unit;
+ int md_minor;
+ struct list_head disks;
+ int sb_dirty;
+ int ro;
+
+ struct gendisk *gendisk;
+
+ struct kobject kobj;
+
+ int major_version,
+ minor_version,
+ patch_version;
+ int persistent;
+ int chunk_size;
+ time_t ctime, utime;
+ int level, layout;
+ char clevel[16];
+ int raid_disks;
+ int max_disks;
+ sector_t size;
+ sector_t array_size;
+ __u64 events;
+
+ char uuid[16];
+
+ sector_t reshape_position;
+ int delta_disks, new_level, new_layout, new_chunk;
+
+ struct mdk_thread_s *thread;
+ struct mdk_thread_s *sync_thread;
+ sector_t curr_resync;
+ unsigned long resync_mark;
+ sector_t resync_mark_cnt;
+ sector_t curr_mark_cnt;
+
+ sector_t resync_max_sectors;
+
+ sector_t resync_mismatches;
+
+ sector_t suspend_lo;
+ sector_t suspend_hi;
+
+ int sync_speed_min;
+ int sync_speed_max;
+
+ int ok_start_degraded;
+
+#define MD_RECOVERY_RUNNING 0
+#define MD_RECOVERY_SYNC 1
+#define MD_RECOVERY_ERR 2
+#define MD_RECOVERY_INTR 3
+#define MD_RECOVERY_DONE 4
+#define MD_RECOVERY_NEEDED 5
+#define MD_RECOVERY_REQUESTED 6
+#define MD_RECOVERY_CHECK 7
+#define MD_RECOVERY_RESHAPE 8
+#define MD_RECOVERY_FROZEN 9
+
+ unsigned long recovery;
+
+ int in_sync;
+ struct mutex reconfig_mutex;
+ atomic_t active;
+
+ int changed;
+ int degraded;
+ int barriers_work;
+ struct bio *biolist;
+
+ atomic_t recovery_active;
+ wait_queue_head_t recovery_wait;
+ sector_t recovery_cp;
+
+ spinlock_t write_lock;
+ wait_queue_head_t sb_wait;
+ atomic_t pending_writes;
+
+ unsigned int safemode;
+ unsigned int safemode_delay;
+ struct timer_list safemode_timer;
+ atomic_t writes_pending;
+ request_queue_t *queue;
+
+ atomic_t write_behind;
+ unsigned int max_write_behind;
+
+ struct bitmap *bitmap;
+ struct file *bitmap_file;
+ long bitmap_offset;
+ long default_bitmap_offset;
+
+ struct list_head all_mddevs;
+};
+
+struct md_sysfs_entry {
+ struct attribute attr;
+ ssize_t (*show)(mddev_t *, char *);
+ ssize_t (*store)(mddev_t *, const char *, size_t);
+};
+
+#define ITERATE_RDEV_GENERIC(head,rdev,tmp) for ((tmp) = (head).next; (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), (tmp) = (tmp)->next, (tmp)->prev != &(head) ; )
+#define ITERATE_RDEV(mddev,rdev,tmp) ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp)
+#define ITERATE_RDEV_PENDING(rdev,tmp) ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp)
+
+#define THREAD_WAKEUP 0
+
+#define __wait_event_lock_irq(wq, condition, lock, cmd) do { wait_queue_t __wait; init_waitqueue_entry(&__wait, current); add_wait_queue(&wq, &__wait); for (;;) { set_current_state(TASK_UNINTERRUPTIBLE); if (condition) break; spin_unlock_irq(&lock); cmd; schedule(); spin_lock_irq(&lock); } current->state = TASK_RUNNING; remove_wait_queue(&wq, &__wait); } while (0)
+
+#define wait_event_lock_irq(wq, condition, lock, cmd) do { if (condition) break; __wait_event_lock_irq(wq, condition, lock, cmd); } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_p.h b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_p.h
new file mode 100644
index 0000000..ab856a7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_p.h
@@ -0,0 +1,135 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_P_H
+#define _MD_P_H
+
+#define MD_RESERVED_BYTES (64 * 1024)
+#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
+#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
+
+#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
+#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
+
+#define MD_SB_BYTES 4096
+#define MD_SB_WORDS (MD_SB_BYTES / 4)
+#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
+#define MD_SB_SECTORS (MD_SB_BYTES / 512)
+
+#define MD_SB_GENERIC_OFFSET 0
+#define MD_SB_PERSONALITY_OFFSET 64
+#define MD_SB_DISKS_OFFSET 128
+#define MD_SB_DESCRIPTOR_OFFSET 992
+
+#define MD_SB_GENERIC_CONSTANT_WORDS 32
+#define MD_SB_GENERIC_STATE_WORDS 32
+#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
+#define MD_SB_PERSONALITY_WORDS 64
+#define MD_SB_DESCRIPTOR_WORDS 32
+#define MD_SB_DISKS 27
+#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
+#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
+#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
+
+#define MD_DISK_FAULTY 0
+#define MD_DISK_ACTIVE 1
+#define MD_DISK_SYNC 2
+#define MD_DISK_REMOVED 3
+
+#define MD_DISK_WRITEMOSTLY 9
+
+typedef struct mdp_device_descriptor_s {
+ __u32 number;
+ __u32 major;
+ __u32 minor;
+ __u32 raid_disk;
+ __u32 state;
+ __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
+} mdp_disk_t;
+
+#define MD_SB_MAGIC 0xa92b4efc
+
+#define MD_SB_CLEAN 0
+#define MD_SB_ERRORS 1
+
+#define MD_SB_BITMAP_PRESENT 8
+
+typedef struct mdp_superblock_s {
+
+ __u32 md_magic;
+ __u32 major_version;
+ __u32 minor_version;
+ __u32 patch_version;
+ __u32 gvalid_words;
+ __u32 set_uuid0;
+ __u32 ctime;
+ __u32 level;
+ __u32 size;
+ __u32 nr_disks;
+ __u32 raid_disks;
+ __u32 md_minor;
+ __u32 not_persistent;
+ __u32 set_uuid1;
+ __u32 set_uuid2;
+ __u32 set_uuid3;
+ __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16];
+
+ __u32 utime;
+ __u32 state;
+ __u32 active_disks;
+ __u32 working_disks;
+ __u32 failed_disks;
+ __u32 spare_disks;
+ __u32 sb_csum;
+#ifdef __BIG_ENDIAN
+ __u32 events_hi;
+ __u32 events_lo;
+ __u32 cp_events_hi;
+ __u32 cp_events_lo;
+#else
+ __u32 events_lo;
+ __u32 events_hi;
+ __u32 cp_events_lo;
+ __u32 cp_events_hi;
+#endif
+ __u32 recovery_cp;
+
+ __u64 reshape_position;
+ __u32 new_level;
+ __u32 delta_disks;
+ __u32 new_layout;
+ __u32 new_chunk;
+ __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18];
+
+ __u32 layout;
+ __u32 chunk_size;
+ __u32 root_pv;
+ __u32 root_block;
+ __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4];
+
+ mdp_disk_t disks[MD_SB_DISKS];
+
+ __u32 reserved[MD_SB_RESERVED_WORDS];
+
+ mdp_disk_t this_disk;
+
+} mdp_super_t;
+
+#define WriteMostly1 1
+
+#define MD_FEATURE_BITMAP_OFFSET 1
+#define MD_FEATURE_RECOVERY_OFFSET 2
+#define MD_FEATURE_RESHAPE_ACTIVE 4
+
+#define MD_FEATURE_ALL (1|2|4)
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_u.h b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_u.h
new file mode 100644
index 0000000..3671187
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/raid/md_u.h
@@ -0,0 +1,104 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _MD_U_H
+#define _MD_U_H
+
+#define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t)
+#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t)
+#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t)
+#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
+#define RAID_AUTORUN _IO (MD_MAJOR, 0x14)
+#define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t)
+
+#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
+#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
+#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
+#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t)
+#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
+#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
+#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
+#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
+#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
+#define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29)
+#define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a)
+#define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int)
+
+#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t)
+#define START_ARRAY _IO (MD_MAJOR, 0x31)
+#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
+#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
+#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
+
+typedef struct mdu_version_s {
+ int major;
+ int minor;
+ int patchlevel;
+} mdu_version_t;
+
+typedef struct mdu_array_info_s {
+
+ int major_version;
+ int minor_version;
+ int patch_version;
+ int ctime;
+ int level;
+ int size;
+ int nr_disks;
+ int raid_disks;
+ int md_minor;
+ int not_persistent;
+
+ int utime;
+ int state;
+ int active_disks;
+ int working_disks;
+ int failed_disks;
+ int spare_disks;
+
+ int layout;
+ int chunk_size;
+
+} mdu_array_info_t;
+
+typedef struct mdu_disk_info_s {
+
+ int number;
+ int major;
+ int minor;
+ int raid_disk;
+ int state;
+
+} mdu_disk_info_t;
+
+typedef struct mdu_start_info_s {
+
+ int major;
+ int minor;
+ int raid_disk;
+ int state;
+
+} mdu_start_info_t;
+
+typedef struct mdu_bitmap_file_s
+{
+ char pathname[4096];
+} mdu_bitmap_file_t;
+
+typedef struct mdu_param_s
+{
+ int personality;
+ int chunk_size;
+ int max_fault;
+} mdu_param_t;
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/raid/xor.h b/6/platforms/android-3/arch-x86/usr/include/linux/raid/xor.h
new file mode 100644
index 0000000..01e9f45
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/raid/xor.h
@@ -0,0 +1,32 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _XOR_H
+#define _XOR_H
+
+#include <linux/raid/md.h>
+
+#define MAX_XOR_BLOCKS 5
+
+struct xor_block_template {
+ struct xor_block_template *next;
+ const char *name;
+ int speed;
+ void (*do_2)(unsigned long, unsigned long *, unsigned long *);
+ void (*do_3)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *);
+ void (*do_4)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *, unsigned long *);
+ void (*do_5)(unsigned long, unsigned long *, unsigned long *,
+ unsigned long *, unsigned long *, unsigned long *);
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/random.h b/6/platforms/android-3/arch-x86/usr/include/linux/random.h
new file mode 100644
index 0000000..d2bef97
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/random.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RANDOM_H
+#define _LINUX_RANDOM_H
+
+#include <linux/ioctl.h>
+
+#define RNDGETENTCNT _IOR( 'R', 0x00, int )
+
+#define RNDADDTOENTCNT _IOW( 'R', 0x01, int )
+
+#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
+
+#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )
+
+#define RNDZAPENTCNT _IO( 'R', 0x04 )
+
+#define RNDCLEARPOOL _IO( 'R', 0x06 )
+
+struct rand_pool_info {
+ int entropy_count;
+ int buf_size;
+ __u32 buf[0];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/rbtree.h b/6/platforms/android-3/arch-x86/usr/include/linux/rbtree.h
new file mode 100644
index 0000000..714ffe9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/rbtree.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RBTREE_H
+#define _LINUX_RBTREE_H
+
+#include <linux/kernel.h>
+#include <linux/stddef.h>
+
+struct rb_node
+{
+ unsigned long rb_parent_color;
+#define RB_RED 0
+#define RB_BLACK 1
+ struct rb_node *rb_right;
+ struct rb_node *rb_left;
+} __attribute__((aligned(sizeof(long))));
+
+struct rb_root
+{
+ struct rb_node *rb_node;
+};
+
+#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
+#define rb_color(r) ((r)->rb_parent_color & 1)
+#define rb_is_red(r) (!rb_color(r))
+#define rb_is_black(r) rb_color(r)
+#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
+#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
+
+#define RB_ROOT (struct rb_root) { NULL, }
+#define rb_entry(ptr, type, member) container_of(ptr, type, member)
+#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
+#define RB_EMPTY_NODE(node) (rb_parent(node) != node)
+#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/rcupdate.h b/6/platforms/android-3/arch-x86/usr/include/linux/rcupdate.h
new file mode 100644
index 0000000..5547a4d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/rcupdate.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_RCUPDATE_H
+#define __LINUX_RCUPDATE_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/reboot.h b/6/platforms/android-3/arch-x86/usr/include/linux/reboot.h
new file mode 100644
index 0000000..e10ff14
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/reboot.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_REBOOT_H
+#define _LINUX_REBOOT_H
+
+#define LINUX_REBOOT_MAGIC1 0xfee1dead
+#define LINUX_REBOOT_MAGIC2 672274793
+#define LINUX_REBOOT_MAGIC2A 85072278
+#define LINUX_REBOOT_MAGIC2B 369367448
+#define LINUX_REBOOT_MAGIC2C 537993216
+
+#define LINUX_REBOOT_CMD_RESTART 0x01234567
+#define LINUX_REBOOT_CMD_HALT 0xCDEF0123
+#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
+#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
+#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
+#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
+#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
+#define LINUX_REBOOT_CMD_KEXEC 0x45584543
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/relay.h b/6/platforms/android-3/arch-x86/usr/include/linux/relay.h
new file mode 100644
index 0000000..09f7219
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/relay.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RELAY_H
+#define _LINUX_RELAY_H
+
+#include <linux/types.h>
+#include <linux/sched.h>
+#include <linux/wait.h>
+#include <linux/list.h>
+#include <linux/fs.h>
+#include <linux/poll.h>
+#include <linux/kref.h>
+
+#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
+
+#define RELAYFS_CHANNEL_VERSION 6
+
+struct rchan_buf
+{
+ void *start;
+ void *data;
+ size_t offset;
+ size_t subbufs_produced;
+ size_t subbufs_consumed;
+ struct rchan *chan;
+ wait_queue_head_t read_wait;
+ struct work_struct wake_readers;
+ struct dentry *dentry;
+ struct kref kref;
+ struct page **page_array;
+ unsigned int page_count;
+ unsigned int finalized;
+ size_t *padding;
+ size_t prev_padding;
+ size_t bytes_consumed;
+ unsigned int cpu;
+} ____cacheline_aligned;
+
+struct rchan
+{
+ u32 version;
+ size_t subbuf_size;
+ size_t n_subbufs;
+ size_t alloc_size;
+ struct rchan_callbacks *cb;
+ struct kref kref;
+ void *private_data;
+ size_t last_toobig;
+ struct rchan_buf *buf[NR_CPUS];
+};
+
+struct rchan_callbacks
+{
+
+ int (*subbuf_start) (struct rchan_buf *buf,
+ void *subbuf,
+ void *prev_subbuf,
+ size_t prev_padding);
+
+ void (*buf_mapped)(struct rchan_buf *buf,
+ struct file *filp);
+
+ void (*buf_unmapped)(struct rchan_buf *buf,
+ struct file *filp);
+
+ struct dentry *(*create_buf_file)(const char *filename,
+ struct dentry *parent,
+ int mode,
+ struct rchan_buf *buf,
+ int *is_global);
+
+ int (*remove_buf_file)(struct dentry *dentry);
+};
+
+struct rchan *relay_open(const char *base_filename,
+ struct dentry *parent,
+ size_t subbuf_size,
+ size_t n_subbufs,
+ struct rchan_callbacks *cb);
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/resource.h b/6/platforms/android-3/arch-x86/usr/include/linux/resource.h
new file mode 100644
index 0000000..347b524
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/resource.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RESOURCE_H
+#define _LINUX_RESOURCE_H
+
+#include <linux/time.h>
+
+struct task_struct;
+
+#define RUSAGE_SELF 0
+#define RUSAGE_CHILDREN (-1)
+#define RUSAGE_BOTH (-2)
+
+struct rusage {
+ struct timeval ru_utime;
+ struct timeval ru_stime;
+ long ru_maxrss;
+ long ru_ixrss;
+ long ru_idrss;
+ long ru_isrss;
+ long ru_minflt;
+ long ru_majflt;
+ long ru_nswap;
+ long ru_inblock;
+ long ru_oublock;
+ long ru_msgsnd;
+ long ru_msgrcv;
+ long ru_nsignals;
+ long ru_nvcsw;
+ long ru_nivcsw;
+};
+
+struct rlimit {
+ unsigned long rlim_cur;
+ unsigned long rlim_max;
+};
+
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+
+#define PRIO_PROCESS 0
+#define PRIO_PGRP 1
+#define PRIO_USER 2
+
+#define _STK_LIM (8*1024*1024)
+
+#define MLOCK_LIMIT (8 * PAGE_SIZE)
+
+#include <asm/resource.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/route.h b/6/platforms/android-3/arch-x86/usr/include/linux/route.h
new file mode 100644
index 0000000..cdb8744
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/route.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_ROUTE_H
+#define _LINUX_ROUTE_H
+
+#include <linux/if.h>
+#include <linux/compiler.h>
+
+struct rtentry
+{
+ unsigned long rt_pad1;
+ struct sockaddr rt_dst;
+ struct sockaddr rt_gateway;
+ struct sockaddr rt_genmask;
+ unsigned short rt_flags;
+ short rt_pad2;
+ unsigned long rt_pad3;
+ void *rt_pad4;
+ short rt_metric;
+ char __user *rt_dev;
+ unsigned long rt_mtu;
+#define rt_mss rt_mtu
+ unsigned long rt_window;
+ unsigned short rt_irtt;
+};
+
+#define RTF_UP 0x0001
+#define RTF_GATEWAY 0x0002
+#define RTF_HOST 0x0004
+#define RTF_REINSTATE 0x0008
+#define RTF_DYNAMIC 0x0010
+#define RTF_MODIFIED 0x0020
+#define RTF_MTU 0x0040
+#define RTF_MSS RTF_MTU
+#define RTF_WINDOW 0x0080
+#define RTF_IRTT 0x0100
+#define RTF_REJECT 0x0200
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/rtc.h b/6/platforms/android-3/arch-x86/usr/include/linux/rtc.h
new file mode 100644
index 0000000..b51bc71
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/rtc.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RTC_H_
+#define _LINUX_RTC_H_
+
+struct rtc_time {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+
+struct rtc_wkalrm {
+ unsigned char enabled;
+ unsigned char pending;
+ struct rtc_time time;
+};
+
+struct rtc_pll_info {
+ int pll_ctrl;
+ int pll_value;
+ int pll_max;
+ int pll_min;
+ int pll_posmult;
+ int pll_negmult;
+ long pll_clock;
+};
+
+#define RTC_AIE_ON _IO('p', 0x01)
+#define RTC_AIE_OFF _IO('p', 0x02)
+#define RTC_UIE_ON _IO('p', 0x03)
+#define RTC_UIE_OFF _IO('p', 0x04)
+#define RTC_PIE_ON _IO('p', 0x05)
+#define RTC_PIE_OFF _IO('p', 0x06)
+#define RTC_WIE_ON _IO('p', 0x0f)
+#define RTC_WIE_OFF _IO('p', 0x10)
+
+#define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time)
+#define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time)
+#define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time)
+#define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time)
+#define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long)
+#define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long)
+#define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long)
+#define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long)
+
+#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)
+#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)
+
+#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info)
+#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info)
+
+#define RTC_IRQF 0x80
+#define RTC_PF 0x40
+#define RTC_AF 0x20
+#define RTC_UF 0x10
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/rtnetlink.h b/6/platforms/android-3/arch-x86/usr/include/linux/rtnetlink.h
new file mode 100644
index 0000000..ddcffaa
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/rtnetlink.h
@@ -0,0 +1,723 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_RTNETLINK_H
+#define __LINUX_RTNETLINK_H
+
+#include <linux/netlink.h>
+
+enum {
+ RTM_BASE = 16,
+#define RTM_BASE RTM_BASE
+
+ RTM_NEWLINK = 16,
+#define RTM_NEWLINK RTM_NEWLINK
+ RTM_DELLINK,
+#define RTM_DELLINK RTM_DELLINK
+ RTM_GETLINK,
+#define RTM_GETLINK RTM_GETLINK
+ RTM_SETLINK,
+#define RTM_SETLINK RTM_SETLINK
+
+ RTM_NEWADDR = 20,
+#define RTM_NEWADDR RTM_NEWADDR
+ RTM_DELADDR,
+#define RTM_DELADDR RTM_DELADDR
+ RTM_GETADDR,
+#define RTM_GETADDR RTM_GETADDR
+
+ RTM_NEWROUTE = 24,
+#define RTM_NEWROUTE RTM_NEWROUTE
+ RTM_DELROUTE,
+#define RTM_DELROUTE RTM_DELROUTE
+ RTM_GETROUTE,
+#define RTM_GETROUTE RTM_GETROUTE
+
+ RTM_NEWNEIGH = 28,
+#define RTM_NEWNEIGH RTM_NEWNEIGH
+ RTM_DELNEIGH,
+#define RTM_DELNEIGH RTM_DELNEIGH
+ RTM_GETNEIGH,
+#define RTM_GETNEIGH RTM_GETNEIGH
+
+ RTM_NEWRULE = 32,
+#define RTM_NEWRULE RTM_NEWRULE
+ RTM_DELRULE,
+#define RTM_DELRULE RTM_DELRULE
+ RTM_GETRULE,
+#define RTM_GETRULE RTM_GETRULE
+
+ RTM_NEWQDISC = 36,
+#define RTM_NEWQDISC RTM_NEWQDISC
+ RTM_DELQDISC,
+#define RTM_DELQDISC RTM_DELQDISC
+ RTM_GETQDISC,
+#define RTM_GETQDISC RTM_GETQDISC
+
+ RTM_NEWTCLASS = 40,
+#define RTM_NEWTCLASS RTM_NEWTCLASS
+ RTM_DELTCLASS,
+#define RTM_DELTCLASS RTM_DELTCLASS
+ RTM_GETTCLASS,
+#define RTM_GETTCLASS RTM_GETTCLASS
+
+ RTM_NEWTFILTER = 44,
+#define RTM_NEWTFILTER RTM_NEWTFILTER
+ RTM_DELTFILTER,
+#define RTM_DELTFILTER RTM_DELTFILTER
+ RTM_GETTFILTER,
+#define RTM_GETTFILTER RTM_GETTFILTER
+
+ RTM_NEWACTION = 48,
+#define RTM_NEWACTION RTM_NEWACTION
+ RTM_DELACTION,
+#define RTM_DELACTION RTM_DELACTION
+ RTM_GETACTION,
+#define RTM_GETACTION RTM_GETACTION
+
+ RTM_NEWPREFIX = 52,
+#define RTM_NEWPREFIX RTM_NEWPREFIX
+ RTM_GETPREFIX = 54,
+#define RTM_GETPREFIX RTM_GETPREFIX
+
+ RTM_GETMULTICAST = 58,
+#define RTM_GETMULTICAST RTM_GETMULTICAST
+
+ RTM_GETANYCAST = 62,
+#define RTM_GETANYCAST RTM_GETANYCAST
+
+ RTM_NEWNEIGHTBL = 64,
+#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
+ RTM_GETNEIGHTBL = 66,
+#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
+ RTM_SETNEIGHTBL,
+#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
+
+ __RTM_MAX,
+#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
+};
+
+#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
+#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
+#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
+
+struct rtattr
+{
+ unsigned short rta_len;
+ unsigned short rta_type;
+};
+
+#define RTA_ALIGNTO 4
+#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
+#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len))
+#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
+#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
+#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
+#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
+#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
+
+struct rtmsg
+{
+ unsigned char rtm_family;
+ unsigned char rtm_dst_len;
+ unsigned char rtm_src_len;
+ unsigned char rtm_tos;
+
+ unsigned char rtm_table;
+ unsigned char rtm_protocol;
+ unsigned char rtm_scope;
+ unsigned char rtm_type;
+
+ unsigned rtm_flags;
+};
+
+enum
+{
+ RTN_UNSPEC,
+ RTN_UNICAST,
+ RTN_LOCAL,
+ RTN_BROADCAST,
+ RTN_ANYCAST,
+ RTN_MULTICAST,
+ RTN_BLACKHOLE,
+ RTN_UNREACHABLE,
+ RTN_PROHIBIT,
+ RTN_THROW,
+ RTN_NAT,
+ RTN_XRESOLVE,
+ __RTN_MAX
+};
+
+#define RTN_MAX (__RTN_MAX - 1)
+
+#define RTPROT_UNSPEC 0
+#define RTPROT_REDIRECT 1
+#define RTPROT_KERNEL 2
+#define RTPROT_BOOT 3
+#define RTPROT_STATIC 4
+
+#define RTPROT_GATED 8
+#define RTPROT_RA 9
+#define RTPROT_MRT 10
+#define RTPROT_ZEBRA 11
+#define RTPROT_BIRD 12
+#define RTPROT_DNROUTED 13
+#define RTPROT_XORP 14
+#define RTPROT_NTK 15
+
+enum rt_scope_t
+{
+ RT_SCOPE_UNIVERSE=0,
+
+ RT_SCOPE_SITE=200,
+ RT_SCOPE_LINK=253,
+ RT_SCOPE_HOST=254,
+ RT_SCOPE_NOWHERE=255
+};
+
+#define RTM_F_NOTIFY 0x100
+#define RTM_F_CLONED 0x200
+#define RTM_F_EQUALIZE 0x400
+#define RTM_F_PREFIX 0x800
+
+enum rt_class_t
+{
+ RT_TABLE_UNSPEC=0,
+
+ RT_TABLE_DEFAULT=253,
+ RT_TABLE_MAIN=254,
+ RT_TABLE_LOCAL=255,
+ __RT_TABLE_MAX
+};
+#define RT_TABLE_MAX (__RT_TABLE_MAX - 1)
+
+enum rtattr_type_t
+{
+ RTA_UNSPEC,
+ RTA_DST,
+ RTA_SRC,
+ RTA_IIF,
+ RTA_OIF,
+ RTA_GATEWAY,
+ RTA_PRIORITY,
+ RTA_PREFSRC,
+ RTA_METRICS,
+ RTA_MULTIPATH,
+ RTA_PROTOINFO,
+ RTA_FLOW,
+ RTA_CACHEINFO,
+ RTA_SESSION,
+ RTA_MP_ALGO,
+ __RTA_MAX
+};
+
+#define RTA_MAX (__RTA_MAX - 1)
+
+#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
+#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
+
+struct rtnexthop
+{
+ unsigned short rtnh_len;
+ unsigned char rtnh_flags;
+ unsigned char rtnh_hops;
+ int rtnh_ifindex;
+};
+
+#define RTNH_F_DEAD 1
+#define RTNH_F_PERVASIVE 2
+#define RTNH_F_ONLINK 4
+
+#define RTNH_ALIGNTO 4
+#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
+#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && ((int)(rtnh)->rtnh_len) <= (len))
+#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
+#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
+#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
+#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
+
+struct rta_cacheinfo
+{
+ __u32 rta_clntref;
+ __u32 rta_lastuse;
+ __s32 rta_expires;
+ __u32 rta_error;
+ __u32 rta_used;
+
+#define RTNETLINK_HAVE_PEERINFO 1
+ __u32 rta_id;
+ __u32 rta_ts;
+ __u32 rta_tsage;
+};
+
+enum
+{
+ RTAX_UNSPEC,
+#define RTAX_UNSPEC RTAX_UNSPEC
+ RTAX_LOCK,
+#define RTAX_LOCK RTAX_LOCK
+ RTAX_MTU,
+#define RTAX_MTU RTAX_MTU
+ RTAX_WINDOW,
+#define RTAX_WINDOW RTAX_WINDOW
+ RTAX_RTT,
+#define RTAX_RTT RTAX_RTT
+ RTAX_RTTVAR,
+#define RTAX_RTTVAR RTAX_RTTVAR
+ RTAX_SSTHRESH,
+#define RTAX_SSTHRESH RTAX_SSTHRESH
+ RTAX_CWND,
+#define RTAX_CWND RTAX_CWND
+ RTAX_ADVMSS,
+#define RTAX_ADVMSS RTAX_ADVMSS
+ RTAX_REORDERING,
+#define RTAX_REORDERING RTAX_REORDERING
+ RTAX_HOPLIMIT,
+#define RTAX_HOPLIMIT RTAX_HOPLIMIT
+ RTAX_INITCWND,
+#define RTAX_INITCWND RTAX_INITCWND
+ RTAX_FEATURES,
+#define RTAX_FEATURES RTAX_FEATURES
+ __RTAX_MAX
+};
+
+#define RTAX_MAX (__RTAX_MAX - 1)
+
+#define RTAX_FEATURE_ECN 0x00000001
+#define RTAX_FEATURE_SACK 0x00000002
+#define RTAX_FEATURE_TIMESTAMP 0x00000004
+#define RTAX_FEATURE_ALLFRAG 0x00000008
+
+struct rta_session
+{
+ __u8 proto;
+ __u8 pad1;
+ __u16 pad2;
+
+ union {
+ struct {
+ __u16 sport;
+ __u16 dport;
+ } ports;
+
+ struct {
+ __u8 type;
+ __u8 code;
+ __u16 ident;
+ } icmpt;
+
+ __u32 spi;
+ } u;
+};
+
+struct ifaddrmsg
+{
+ unsigned char ifa_family;
+ unsigned char ifa_prefixlen;
+ unsigned char ifa_flags;
+ unsigned char ifa_scope;
+ int ifa_index;
+};
+
+enum
+{
+ IFA_UNSPEC,
+ IFA_ADDRESS,
+ IFA_LOCAL,
+ IFA_LABEL,
+ IFA_BROADCAST,
+ IFA_ANYCAST,
+ IFA_CACHEINFO,
+ IFA_MULTICAST,
+ __IFA_MAX
+};
+
+#define IFA_MAX (__IFA_MAX - 1)
+
+#define IFA_F_SECONDARY 0x01
+#define IFA_F_TEMPORARY IFA_F_SECONDARY
+
+#define IFA_F_DEPRECATED 0x20
+#define IFA_F_TENTATIVE 0x40
+#define IFA_F_PERMANENT 0x80
+
+struct ifa_cacheinfo
+{
+ __u32 ifa_prefered;
+ __u32 ifa_valid;
+ __u32 cstamp;
+ __u32 tstamp;
+};
+
+#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+
+struct ndmsg
+{
+ unsigned char ndm_family;
+ unsigned char ndm_pad1;
+ unsigned short ndm_pad2;
+ int ndm_ifindex;
+ __u16 ndm_state;
+ __u8 ndm_flags;
+ __u8 ndm_type;
+};
+
+enum
+{
+ NDA_UNSPEC,
+ NDA_DST,
+ NDA_LLADDR,
+ NDA_CACHEINFO,
+ NDA_PROBES,
+ __NDA_MAX
+};
+
+#define NDA_MAX (__NDA_MAX - 1)
+
+#define NDA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
+#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
+
+#define NTF_PROXY 0x08
+#define NTF_ROUTER 0x80
+
+#define NUD_INCOMPLETE 0x01
+#define NUD_REACHABLE 0x02
+#define NUD_STALE 0x04
+#define NUD_DELAY 0x08
+#define NUD_PROBE 0x10
+#define NUD_FAILED 0x20
+
+#define NUD_NOARP 0x40
+#define NUD_PERMANENT 0x80
+#define NUD_NONE 0x00
+
+struct nda_cacheinfo
+{
+ __u32 ndm_confirmed;
+ __u32 ndm_used;
+ __u32 ndm_updated;
+ __u32 ndm_refcnt;
+};
+
+struct ndt_stats
+{
+ __u64 ndts_allocs;
+ __u64 ndts_destroys;
+ __u64 ndts_hash_grows;
+ __u64 ndts_res_failed;
+ __u64 ndts_lookups;
+ __u64 ndts_hits;
+ __u64 ndts_rcv_probes_mcast;
+ __u64 ndts_rcv_probes_ucast;
+ __u64 ndts_periodic_gc_runs;
+ __u64 ndts_forced_gc_runs;
+};
+
+enum {
+ NDTPA_UNSPEC,
+ NDTPA_IFINDEX,
+ NDTPA_REFCNT,
+ NDTPA_REACHABLE_TIME,
+ NDTPA_BASE_REACHABLE_TIME,
+ NDTPA_RETRANS_TIME,
+ NDTPA_GC_STALETIME,
+ NDTPA_DELAY_PROBE_TIME,
+ NDTPA_QUEUE_LEN,
+ NDTPA_APP_PROBES,
+ NDTPA_UCAST_PROBES,
+ NDTPA_MCAST_PROBES,
+ NDTPA_ANYCAST_DELAY,
+ NDTPA_PROXY_DELAY,
+ NDTPA_PROXY_QLEN,
+ NDTPA_LOCKTIME,
+ __NDTPA_MAX
+};
+#define NDTPA_MAX (__NDTPA_MAX - 1)
+
+struct ndtmsg
+{
+ __u8 ndtm_family;
+ __u8 ndtm_pad1;
+ __u16 ndtm_pad2;
+};
+
+struct ndt_config
+{
+ __u16 ndtc_key_len;
+ __u16 ndtc_entry_size;
+ __u32 ndtc_entries;
+ __u32 ndtc_last_flush;
+ __u32 ndtc_last_rand;
+ __u32 ndtc_hash_rnd;
+ __u32 ndtc_hash_mask;
+ __u32 ndtc_hash_chain_gc;
+ __u32 ndtc_proxy_qlen;
+};
+
+enum {
+ NDTA_UNSPEC,
+ NDTA_NAME,
+ NDTA_THRESH1,
+ NDTA_THRESH2,
+ NDTA_THRESH3,
+ NDTA_CONFIG,
+ NDTA_PARMS,
+ NDTA_STATS,
+ NDTA_GC_INTERVAL,
+ __NDTA_MAX
+};
+#define NDTA_MAX (__NDTA_MAX - 1)
+
+#define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
+
+struct rtgenmsg
+{
+ unsigned char rtgen_family;
+};
+
+struct ifinfomsg
+{
+ unsigned char ifi_family;
+ unsigned char __ifi_pad;
+ unsigned short ifi_type;
+ int ifi_index;
+ unsigned ifi_flags;
+ unsigned ifi_change;
+};
+
+struct prefixmsg
+{
+ unsigned char prefix_family;
+ unsigned char prefix_pad1;
+ unsigned short prefix_pad2;
+ int prefix_ifindex;
+ unsigned char prefix_type;
+ unsigned char prefix_len;
+ unsigned char prefix_flags;
+ unsigned char prefix_pad3;
+};
+
+enum
+{
+ PREFIX_UNSPEC,
+ PREFIX_ADDRESS,
+ PREFIX_CACHEINFO,
+ __PREFIX_MAX
+};
+
+#define PREFIX_MAX (__PREFIX_MAX - 1)
+
+struct prefix_cacheinfo
+{
+ __u32 preferred_time;
+ __u32 valid_time;
+};
+
+struct rtnl_link_stats
+{
+ __u32 rx_packets;
+ __u32 tx_packets;
+ __u32 rx_bytes;
+ __u32 tx_bytes;
+ __u32 rx_errors;
+ __u32 tx_errors;
+ __u32 rx_dropped;
+ __u32 tx_dropped;
+ __u32 multicast;
+ __u32 collisions;
+
+ __u32 rx_length_errors;
+ __u32 rx_over_errors;
+ __u32 rx_crc_errors;
+ __u32 rx_frame_errors;
+ __u32 rx_fifo_errors;
+ __u32 rx_missed_errors;
+
+ __u32 tx_aborted_errors;
+ __u32 tx_carrier_errors;
+ __u32 tx_fifo_errors;
+ __u32 tx_heartbeat_errors;
+ __u32 tx_window_errors;
+
+ __u32 rx_compressed;
+ __u32 tx_compressed;
+};
+
+struct rtnl_link_ifmap
+{
+ __u64 mem_start;
+ __u64 mem_end;
+ __u64 base_addr;
+ __u16 irq;
+ __u8 dma;
+ __u8 port;
+};
+
+enum
+{
+ IFLA_UNSPEC,
+ IFLA_ADDRESS,
+ IFLA_BROADCAST,
+ IFLA_IFNAME,
+ IFLA_MTU,
+ IFLA_LINK,
+ IFLA_QDISC,
+ IFLA_STATS,
+ IFLA_COST,
+#define IFLA_COST IFLA_COST
+ IFLA_PRIORITY,
+#define IFLA_PRIORITY IFLA_PRIORITY
+ IFLA_MASTER,
+#define IFLA_MASTER IFLA_MASTER
+ IFLA_WIRELESS,
+#define IFLA_WIRELESS IFLA_WIRELESS
+ IFLA_PROTINFO,
+#define IFLA_PROTINFO IFLA_PROTINFO
+ IFLA_TXQLEN,
+#define IFLA_TXQLEN IFLA_TXQLEN
+ IFLA_MAP,
+#define IFLA_MAP IFLA_MAP
+ IFLA_WEIGHT,
+#define IFLA_WEIGHT IFLA_WEIGHT
+ IFLA_OPERSTATE,
+ IFLA_LINKMODE,
+ __IFLA_MAX
+};
+
+#define IFLA_MAX (__IFLA_MAX - 1)
+
+#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+
+enum
+{
+ IFLA_INET6_UNSPEC,
+ IFLA_INET6_FLAGS,
+ IFLA_INET6_CONF,
+ IFLA_INET6_STATS,
+ IFLA_INET6_MCAST,
+ IFLA_INET6_CACHEINFO,
+ __IFLA_INET6_MAX
+};
+
+#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
+
+struct ifla_cacheinfo
+{
+ __u32 max_reasm_len;
+ __u32 tstamp;
+ __u32 reachable_time;
+ __u32 retrans_time;
+};
+
+struct tcmsg
+{
+ unsigned char tcm_family;
+ unsigned char tcm__pad1;
+ unsigned short tcm__pad2;
+ int tcm_ifindex;
+ __u32 tcm_handle;
+ __u32 tcm_parent;
+ __u32 tcm_info;
+};
+
+enum
+{
+ TCA_UNSPEC,
+ TCA_KIND,
+ TCA_OPTIONS,
+ TCA_STATS,
+ TCA_XSTATS,
+ TCA_RATE,
+ TCA_FCNT,
+ TCA_STATS2,
+ __TCA_MAX
+};
+
+#define TCA_MAX (__TCA_MAX - 1)
+
+#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
+#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
+
+#define RTMGRP_LINK 1
+#define RTMGRP_NOTIFY 2
+#define RTMGRP_NEIGH 4
+#define RTMGRP_TC 8
+
+#define RTMGRP_IPV4_IFADDR 0x10
+#define RTMGRP_IPV4_MROUTE 0x20
+#define RTMGRP_IPV4_ROUTE 0x40
+#define RTMGRP_IPV4_RULE 0x80
+
+#define RTMGRP_IPV6_IFADDR 0x100
+#define RTMGRP_IPV6_MROUTE 0x200
+#define RTMGRP_IPV6_ROUTE 0x400
+#define RTMGRP_IPV6_IFINFO 0x800
+
+#define RTMGRP_DECnet_IFADDR 0x1000
+#define RTMGRP_DECnet_ROUTE 0x4000
+
+#define RTMGRP_IPV6_PREFIX 0x20000
+
+enum rtnetlink_groups {
+ RTNLGRP_NONE,
+#define RTNLGRP_NONE RTNLGRP_NONE
+ RTNLGRP_LINK,
+#define RTNLGRP_LINK RTNLGRP_LINK
+ RTNLGRP_NOTIFY,
+#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
+ RTNLGRP_NEIGH,
+#define RTNLGRP_NEIGH RTNLGRP_NEIGH
+ RTNLGRP_TC,
+#define RTNLGRP_TC RTNLGRP_TC
+ RTNLGRP_IPV4_IFADDR,
+#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
+ RTNLGRP_IPV4_MROUTE,
+#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
+ RTNLGRP_IPV4_ROUTE,
+#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
+ RTNLGRP_IPV4_RULE,
+#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE
+ RTNLGRP_IPV6_IFADDR,
+#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
+ RTNLGRP_IPV6_MROUTE,
+#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
+ RTNLGRP_IPV6_ROUTE,
+#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
+ RTNLGRP_IPV6_IFINFO,
+#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
+ RTNLGRP_DECnet_IFADDR,
+#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
+ RTNLGRP_NOP2,
+ RTNLGRP_DECnet_ROUTE,
+#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
+ RTNLGRP_NOP3,
+ RTNLGRP_NOP4,
+ RTNLGRP_IPV6_PREFIX,
+#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
+ __RTNLGRP_MAX
+};
+#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
+
+struct tcamsg
+{
+ unsigned char tca_family;
+ unsigned char tca__pad1;
+ unsigned short tca__pad2;
+};
+#define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
+#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
+#define TCA_ACT_TAB 1
+#define TCAA_MAX 1
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/rwsem.h b/6/platforms/android-3/arch-x86/usr/include/linux/rwsem.h
new file mode 100644
index 0000000..e64c4c8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/rwsem.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_RWSEM_H
+#define _LINUX_RWSEM_H
+
+#include <linux/linkage.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sched.h b/6/platforms/android-3/arch-x86/usr/include/linux/sched.h
new file mode 100644
index 0000000..6b781eb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sched.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SCHED_H
+#define _LINUX_SCHED_H
+
+#include <linux/auxvec.h>
+
+#define CSIGNAL 0x000000ff
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#define SCHED_NORMAL 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+#define SCHED_BATCH 3
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sem.h b/6/platforms/android-3/arch-x86/usr/include/linux/sem.h
new file mode 100644
index 0000000..dfa531b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sem.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SEM_H
+#define _LINUX_SEM_H
+
+#include <linux/ipc.h>
+
+#define SEM_UNDO 0x1000
+
+#define GETPID 11
+#define GETVAL 12
+#define GETALL 13
+#define GETNCNT 14
+#define GETZCNT 15
+#define SETVAL 16
+#define SETALL 17
+
+#define SEM_STAT 18
+#define SEM_INFO 19
+
+struct semid_ds {
+ struct ipc_perm sem_perm;
+ __kernel_time_t sem_otime;
+ __kernel_time_t sem_ctime;
+ struct sem *sem_base;
+ struct sem_queue *sem_pending;
+ struct sem_queue **sem_pending_last;
+ struct sem_undo *undo;
+ unsigned short sem_nsems;
+};
+
+#include <asm/sembuf.h>
+
+struct sembuf {
+ unsigned short sem_num;
+ short sem_op;
+ short sem_flg;
+};
+
+union semun {
+ int val;
+ struct semid_ds __user *buf;
+ unsigned short __user *array;
+ struct seminfo __user *__buf;
+ void __user *__pad;
+};
+
+struct seminfo {
+ int semmap;
+ int semmni;
+ int semmns;
+ int semmnu;
+ int semmsl;
+ int semopm;
+ int semume;
+ int semusz;
+ int semvmx;
+ int semaem;
+};
+
+#define SEMMNI 128
+#define SEMMSL 250
+#define SEMMNS (SEMMNI*SEMMSL)
+#define SEMOPM 32
+#define SEMVMX 32767
+#define SEMAEM SEMVMX
+
+#define SEMUME SEMOPM
+#define SEMMNU SEMMNS
+#define SEMMAP SEMMNS
+#define SEMUSZ 20
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/seq_file.h b/6/platforms/android-3/arch-x86/usr/include/linux/seq_file.h
new file mode 100644
index 0000000..81e314d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/seq_file.h
@@ -0,0 +1,14 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SEQ_FILE_H
+#define _LINUX_SEQ_FILE_H
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/seqlock.h b/6/platforms/android-3/arch-x86/usr/include/linux/seqlock.h
new file mode 100644
index 0000000..a1e05d4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/seqlock.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SEQLOCK_H
+#define __LINUX_SEQLOCK_H
+
+#include <linux/spinlock.h>
+#include <linux/preempt.h>
+
+typedef struct {
+ unsigned sequence;
+ spinlock_t lock;
+} seqlock_t;
+
+#define __SEQLOCK_UNLOCKED(lockname) { 0, __SPIN_LOCK_UNLOCKED(lockname) }
+
+#define SEQLOCK_UNLOCKED __SEQLOCK_UNLOCKED(old_style_seqlock_init)
+
+#define seqlock_init(x) do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0)
+
+#define DEFINE_SEQLOCK(x) seqlock_t x = __SEQLOCK_UNLOCKED(x)
+
+#define SEQCNT_ZERO { 0 }
+#define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0)
+
+#define write_seqlock_irqsave(lock, flags) do { local_irq_save(flags); write_seqlock(lock); } while (0)
+#define write_seqlock_irq(lock) do { local_irq_disable(); write_seqlock(lock); } while (0)
+#define write_seqlock_bh(lock) do { local_bh_disable(); write_seqlock(lock); } while (0)
+#define write_sequnlock_irqrestore(lock, flags) do { write_sequnlock(lock); local_irq_restore(flags); } while(0)
+#define write_sequnlock_irq(lock) do { write_sequnlock(lock); local_irq_enable(); } while(0)
+#define write_sequnlock_bh(lock) do { write_sequnlock(lock); local_bh_enable(); } while(0)
+#define read_seqbegin_irqsave(lock, flags) ({ local_irq_save(flags); read_seqbegin(lock); })
+#define read_seqretry_irqrestore(lock, iv, flags) ({ int ret = read_seqretry(lock, iv); local_irq_restore(flags); ret; })
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/serial_core.h b/6/platforms/android-3/arch-x86/usr/include/linux/serial_core.h
new file mode 100644
index 0000000..79f0375
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/serial_core.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef LINUX_SERIAL_CORE_H
+#define LINUX_SERIAL_CORE_H
+
+#define PORT_UNKNOWN 0
+#define PORT_8250 1
+#define PORT_16450 2
+#define PORT_16550 3
+#define PORT_16550A 4
+#define PORT_CIRRUS 5
+#define PORT_16650 6
+#define PORT_16650V2 7
+#define PORT_16750 8
+#define PORT_STARTECH 9
+#define PORT_16C950 10
+#define PORT_16654 11
+#define PORT_16850 12
+#define PORT_RSA 13
+#define PORT_NS16550A 14
+#define PORT_XSCALE 15
+#define PORT_MAX_8250 15
+
+#define PORT_PXA 31
+#define PORT_AMBA 32
+#define PORT_CLPS711X 33
+#define PORT_SA1100 34
+#define PORT_UART00 35
+#define PORT_21285 37
+
+#define PORT_SUNZILOG 38
+#define PORT_SUNSAB 39
+
+#define PORT_V850E_UART 40
+
+#define PORT_DZ 47
+
+#define PORT_MUX 48
+
+#define PORT_AT91 49
+
+#define PORT_MAC_ZILOG 50
+#define PORT_PMAC_ZILOG 51
+
+#define PORT_SCI 52
+#define PORT_SCIF 53
+#define PORT_IRDA 54
+
+#define PORT_S3C2410 55
+
+#define PORT_IP22ZILOG 56
+
+#define PORT_LH7A40X 57
+
+#define PORT_CPM 58
+
+#define PORT_MPC52xx 59
+
+#define PORT_ICOM 60
+
+#define PORT_S3C2440 61
+
+#define PORT_IMX 62
+
+#define PORT_MPSC 63
+
+#define PORT_TXX9 64
+
+#define PORT_VR41XX_SIU 65
+#define PORT_VR41XX_DSIU 66
+
+#define PORT_S3C2400 67
+
+#define PORT_M32R_SIO 68
+
+#define PORT_JSM 69
+
+#define PORT_IP3106 70
+
+#define PORT_NETX 71
+
+#define PORT_SUNHV 72
+
+#define PORT_S3C2412 73
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/serial_reg.h b/6/platforms/android-3/arch-x86/usr/include/linux/serial_reg.h
new file mode 100644
index 0000000..97b149a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/serial_reg.h
@@ -0,0 +1,249 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SERIAL_REG_H
+#define _LINUX_SERIAL_REG_H
+
+#define UART_RX 0
+#define UART_TX 0
+
+#define UART_IER 1
+#define UART_IER_MSI 0x08
+#define UART_IER_RLSI 0x04
+#define UART_IER_THRI 0x02
+#define UART_IER_RDI 0x01
+
+#define UART_IERX_SLEEP 0x10
+
+#define UART_IIR 2
+#define UART_IIR_NO_INT 0x01
+#define UART_IIR_ID 0x06
+#define UART_IIR_MSI 0x00
+#define UART_IIR_THRI 0x02
+#define UART_IIR_RDI 0x04
+#define UART_IIR_RLSI 0x06
+
+#define UART_FCR 2
+#define UART_FCR_ENABLE_FIFO 0x01
+#define UART_FCR_CLEAR_RCVR 0x02
+#define UART_FCR_CLEAR_XMIT 0x04
+#define UART_FCR_DMA_SELECT 0x08
+
+#define UART_FCR_R_TRIG_00 0x00
+#define UART_FCR_R_TRIG_01 0x40
+#define UART_FCR_R_TRIG_10 0x80
+#define UART_FCR_R_TRIG_11 0xc0
+#define UART_FCR_T_TRIG_00 0x00
+#define UART_FCR_T_TRIG_01 0x10
+#define UART_FCR_T_TRIG_10 0x20
+#define UART_FCR_T_TRIG_11 0x30
+
+#define UART_FCR_TRIGGER_MASK 0xC0
+#define UART_FCR_TRIGGER_1 0x00
+#define UART_FCR_TRIGGER_4 0x40
+#define UART_FCR_TRIGGER_8 0x80
+#define UART_FCR_TRIGGER_14 0xC0
+
+#define UART_FCR6_R_TRIGGER_8 0x00
+#define UART_FCR6_R_TRIGGER_16 0x40
+#define UART_FCR6_R_TRIGGER_24 0x80
+#define UART_FCR6_R_TRIGGER_28 0xC0
+#define UART_FCR6_T_TRIGGER_16 0x00
+#define UART_FCR6_T_TRIGGER_8 0x10
+#define UART_FCR6_T_TRIGGER_24 0x20
+#define UART_FCR6_T_TRIGGER_30 0x30
+#define UART_FCR7_64BYTE 0x20
+
+#define UART_LCR 3
+
+#define UART_LCR_DLAB 0x80
+#define UART_LCR_SBC 0x40
+#define UART_LCR_SPAR 0x20
+#define UART_LCR_EPAR 0x10
+#define UART_LCR_PARITY 0x08
+#define UART_LCR_STOP 0x04
+#define UART_LCR_WLEN5 0x00
+#define UART_LCR_WLEN6 0x01
+#define UART_LCR_WLEN7 0x02
+#define UART_LCR_WLEN8 0x03
+
+#define UART_MCR 4
+#define UART_MCR_CLKSEL 0x80
+#define UART_MCR_TCRTLR 0x40
+#define UART_MCR_XONANY 0x20
+#define UART_MCR_AFE 0x20
+#define UART_MCR_LOOP 0x10
+#define UART_MCR_OUT2 0x08
+#define UART_MCR_OUT1 0x04
+#define UART_MCR_RTS 0x02
+#define UART_MCR_DTR 0x01
+
+#define UART_LSR 5
+#define UART_LSR_TEMT 0x40
+#define UART_LSR_THRE 0x20
+#define UART_LSR_BI 0x10
+#define UART_LSR_FE 0x08
+#define UART_LSR_PE 0x04
+#define UART_LSR_OE 0x02
+#define UART_LSR_DR 0x01
+
+#define UART_MSR 6
+#define UART_MSR_DCD 0x80
+#define UART_MSR_RI 0x40
+#define UART_MSR_DSR 0x20
+#define UART_MSR_CTS 0x10
+#define UART_MSR_DDCD 0x08
+#define UART_MSR_TERI 0x04
+#define UART_MSR_DDSR 0x02
+#define UART_MSR_DCTS 0x01
+#define UART_MSR_ANY_DELTA 0x0F
+
+#define UART_SCR 7
+
+#define UART_DLL 0
+#define UART_DLM 1
+
+#define UART_EFR 2
+#define UART_EFR_CTS 0x80
+#define UART_EFR_RTS 0x40
+#define UART_EFR_SCD 0x20
+#define UART_EFR_ECB 0x10
+
+#define UART_XON1 4
+#define UART_XON2 5
+#define UART_XOFF1 6
+#define UART_XOFF2 7
+
+#define UART_TI752_TCR 6
+#define UART_TI752_TLR 7
+
+#define UART_TRG 0
+
+#define UART_TRG_1 0x01
+#define UART_TRG_4 0x04
+#define UART_TRG_8 0x08
+#define UART_TRG_16 0x10
+#define UART_TRG_32 0x20
+#define UART_TRG_64 0x40
+#define UART_TRG_96 0x60
+#define UART_TRG_120 0x78
+#define UART_TRG_128 0x80
+
+#define UART_FCTR 1
+#define UART_FCTR_RTS_NODELAY 0x00
+#define UART_FCTR_RTS_4DELAY 0x01
+#define UART_FCTR_RTS_6DELAY 0x02
+#define UART_FCTR_RTS_8DELAY 0x03
+#define UART_FCTR_IRDA 0x04
+#define UART_FCTR_TX_INT 0x08
+#define UART_FCTR_TRGA 0x00
+#define UART_FCTR_TRGB 0x10
+#define UART_FCTR_TRGC 0x20
+#define UART_FCTR_TRGD 0x30
+#define UART_FCTR_SCR_SWAP 0x40
+#define UART_FCTR_RX 0x00
+#define UART_FCTR_TX 0x80
+
+#define UART_EMSR 7
+#define UART_EMSR_FIFO_COUNT 0x01
+#define UART_EMSR_ALT_COUNT 0x02
+
+#define UART_IER_DMAE 0x80
+#define UART_IER_UUE 0x40
+#define UART_IER_NRZE 0x20
+#define UART_IER_RTOIE 0x10
+
+#define UART_IIR_TOD 0x08
+
+#define UART_FCR_PXAR1 0x00
+#define UART_FCR_PXAR8 0x40
+#define UART_FCR_PXAR16 0x80
+#define UART_FCR_PXAR32 0xc0
+
+#define UART_ASR 0x01
+#define UART_RFL 0x03
+#define UART_TFL 0x04
+#define UART_ICR 0x05
+
+#define UART_ACR 0x00
+#define UART_CPR 0x01
+#define UART_TCR 0x02
+#define UART_CKS 0x03
+#define UART_TTL 0x04
+#define UART_RTL 0x05
+#define UART_FCL 0x06
+#define UART_FCH 0x07
+#define UART_ID1 0x08
+#define UART_ID2 0x09
+#define UART_ID3 0x0A
+#define UART_REV 0x0B
+#define UART_CSR 0x0C
+#define UART_NMR 0x0D
+#define UART_CTR 0xFF
+
+#define UART_ACR_RXDIS 0x01
+#define UART_ACR_TXDIS 0x02
+#define UART_ACR_DSRFC 0x04
+#define UART_ACR_TLENB 0x20
+#define UART_ACR_ICRRD 0x40
+#define UART_ACR_ASREN 0x80
+
+#define UART_RSA_BASE (-8)
+
+#define UART_RSA_MSR ((UART_RSA_BASE) + 0)
+
+#define UART_RSA_MSR_SWAP (1 << 0)
+#define UART_RSA_MSR_FIFO (1 << 2)
+#define UART_RSA_MSR_FLOW (1 << 3)
+#define UART_RSA_MSR_ITYP (1 << 4)
+
+#define UART_RSA_IER ((UART_RSA_BASE) + 1)
+
+#define UART_RSA_IER_Rx_FIFO_H (1 << 0)
+#define UART_RSA_IER_Tx_FIFO_H (1 << 1)
+#define UART_RSA_IER_Tx_FIFO_E (1 << 2)
+#define UART_RSA_IER_Rx_TOUT (1 << 3)
+#define UART_RSA_IER_TIMER (1 << 4)
+
+#define UART_RSA_SRR ((UART_RSA_BASE) + 2)
+
+#define UART_RSA_SRR_Tx_FIFO_NEMP (1 << 0)
+#define UART_RSA_SRR_Tx_FIFO_NHFL (1 << 1)
+#define UART_RSA_SRR_Tx_FIFO_NFUL (1 << 2)
+#define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3)
+#define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4)
+#define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5)
+#define UART_RSA_SRR_Rx_TOUT (1 << 6)
+#define UART_RSA_SRR_TIMER (1 << 7)
+
+#define UART_RSA_FRR ((UART_RSA_BASE) + 2)
+
+#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3)
+
+#define UART_RSA_TCR ((UART_RSA_BASE) + 4)
+
+#define UART_RSA_TCR_SWITCH (1 << 0)
+
+#define SERIAL_RSA_BAUD_BASE (921600)
+#define SERIAL_RSA_BAUD_BASE_LO (SERIAL_RSA_BAUD_BASE / 8)
+
+#define UART_OMAP_MDR1 0x08
+#define UART_OMAP_MDR2 0x09
+#define UART_OMAP_SCR 0x10
+#define UART_OMAP_SSR 0x11
+#define UART_OMAP_EBLR 0x12
+#define UART_OMAP_OSC_12M_SEL 0x13
+#define UART_OMAP_MVER 0x14
+#define UART_OMAP_SYSC 0x15
+#define UART_OMAP_SYSS 0x16
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/serio.h b/6/platforms/android-3/arch-x86/usr/include/linux/serio.h
new file mode 100644
index 0000000..7f04987
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/serio.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SERIO_H
+#define _SERIO_H
+
+#include <linux/ioctl.h>
+
+#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
+
+#define SERIO_TIMEOUT 1
+#define SERIO_PARITY 2
+#define SERIO_FRAME 4
+
+#define SERIO_XT 0x00
+#define SERIO_8042 0x01
+#define SERIO_RS232 0x02
+#define SERIO_HIL_MLC 0x03
+#define SERIO_PS_PSTHRU 0x05
+#define SERIO_8042_XL 0x06
+
+#define SERIO_UNKNOWN 0x00
+#define SERIO_MSC 0x01
+#define SERIO_SUN 0x02
+#define SERIO_MS 0x03
+#define SERIO_MP 0x04
+#define SERIO_MZ 0x05
+#define SERIO_MZP 0x06
+#define SERIO_MZPP 0x07
+#define SERIO_VSXXXAA 0x08
+#define SERIO_SUNKBD 0x10
+#define SERIO_WARRIOR 0x18
+#define SERIO_SPACEORB 0x19
+#define SERIO_MAGELLAN 0x1a
+#define SERIO_SPACEBALL 0x1b
+#define SERIO_GUNZE 0x1c
+#define SERIO_IFORCE 0x1d
+#define SERIO_STINGER 0x1e
+#define SERIO_NEWTON 0x1f
+#define SERIO_STOWAWAY 0x20
+#define SERIO_H3600 0x21
+#define SERIO_PS2SER 0x22
+#define SERIO_TWIDKBD 0x23
+#define SERIO_TWIDJOY 0x24
+#define SERIO_HIL 0x25
+#define SERIO_SNES232 0x26
+#define SERIO_SEMTECH 0x27
+#define SERIO_LKKBD 0x28
+#define SERIO_ELO 0x29
+#define SERIO_MICROTOUCH 0x30
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/shm.h b/6/platforms/android-3/arch-x86/usr/include/linux/shm.h
new file mode 100644
index 0000000..a7056db
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/shm.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SHM_H_
+#define _LINUX_SHM_H_
+
+#include <linux/ipc.h>
+#include <linux/errno.h>
+#include <asm/page.h>
+
+#define SHMMAX 0x2000000
+#define SHMMIN 1
+#define SHMMNI 4096
+#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16))
+#define SHMSEG SHMMNI
+
+#include <asm/shmparam.h>
+
+struct shmid_ds {
+ struct ipc_perm shm_perm;
+ int shm_segsz;
+ __kernel_time_t shm_atime;
+ __kernel_time_t shm_dtime;
+ __kernel_time_t shm_ctime;
+ __kernel_ipc_pid_t shm_cpid;
+ __kernel_ipc_pid_t shm_lpid;
+ unsigned short shm_nattch;
+ unsigned short shm_unused;
+ void *shm_unused2;
+ void *shm_unused3;
+};
+
+#include <asm/shmbuf.h>
+
+#define SHM_R 0400
+#define SHM_W 0200
+
+#define SHM_RDONLY 010000
+#define SHM_RND 020000
+#define SHM_REMAP 040000
+#define SHM_EXEC 0100000
+
+#define SHM_LOCK 11
+#define SHM_UNLOCK 12
+
+#define SHM_STAT 13
+#define SHM_INFO 14
+
+struct shminfo {
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+};
+
+struct shm_info {
+ int used_ids;
+ unsigned long shm_tot;
+ unsigned long shm_rss;
+ unsigned long shm_swp;
+ unsigned long swap_attempts;
+ unsigned long swap_successes;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/signal.h b/6/platforms/android-3/arch-x86/usr/include/linux/signal.h
new file mode 100644
index 0000000..4577e54
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/signal.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SIGNAL_H
+#define _LINUX_SIGNAL_H
+
+#include <asm/signal.h>
+#include <asm/siginfo.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/skbuff.h b/6/platforms/android-3/arch-x86/usr/include/linux/skbuff.h
new file mode 100644
index 0000000..82140a6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/skbuff.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SKBUFF_H
+#define _LINUX_SKBUFF_H
+
+#include <linux/kernel.h>
+#include <linux/compiler.h>
+#include <linux/time.h>
+#include <linux/cache.h>
+
+#include <asm/atomic.h>
+#include <asm/types.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/highmem.h>
+#include <linux/poll.h>
+#include <linux/net.h>
+#include <linux/textsearch.h>
+#include <net/checksum.h>
+#include <linux/dmaengine.h>
+
+#define HAVE_ALLOC_SKB
+#define HAVE_ALIGNABLE_SKB
+
+#define CHECKSUM_NONE 0
+#define CHECKSUM_HW 1
+#define CHECKSUM_UNNECESSARY 2
+
+#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & ~(SMP_CACHE_BYTES - 1))
+#define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - sizeof(struct skb_shared_info)) & ~(SMP_CACHE_BYTES - 1))
+#define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0))
+#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2))
+
+struct net_device;
+
+struct sk_buff_head {
+
+ struct sk_buff *next;
+ struct sk_buff *prev;
+
+ __u32 qlen;
+ spinlock_t lock;
+};
+
+struct sk_buff;
+
+#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
+
+typedef struct skb_frag_struct skb_frag_t;
+
+struct skb_frag_struct {
+ struct page *page;
+ __u16 page_offset;
+ __u16 size;
+};
+
+struct skb_shared_info {
+ atomic_t dataref;
+ unsigned short nr_frags;
+ unsigned short gso_size;
+
+ unsigned short gso_segs;
+ unsigned short gso_type;
+ unsigned int ip6_frag_id;
+ struct sk_buff *frag_list;
+ skb_frag_t frags[MAX_SKB_FRAGS];
+};
+
+#define SKB_DATAREF_SHIFT 16
+#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1)
+
+struct skb_timeval {
+ u32 off_sec;
+ u32 off_usec;
+};
+
+enum {
+ SKB_FCLONE_UNAVAILABLE,
+ SKB_FCLONE_ORIG,
+ SKB_FCLONE_CLONE,
+};
+
+enum {
+ SKB_GSO_TCPV4 = 1 << 0,
+ SKB_GSO_UDP = 1 << 1,
+
+ SKB_GSO_DODGY = 1 << 2,
+
+ SKB_GSO_TCP_ECN = 1 << 3,
+
+ SKB_GSO_TCPV6 = 1 << 4,
+};
+
+struct sk_buff {
+
+ struct sk_buff *next;
+ struct sk_buff *prev;
+
+ struct sock *sk;
+ struct skb_timeval tstamp;
+ struct net_device *dev;
+ struct net_device *input_dev;
+
+ union {
+ struct tcphdr *th;
+ struct udphdr *uh;
+ struct icmphdr *icmph;
+ struct igmphdr *igmph;
+ struct iphdr *ipiph;
+ struct ipv6hdr *ipv6h;
+ unsigned char *raw;
+ } h;
+
+ union {
+ struct iphdr *iph;
+ struct ipv6hdr *ipv6h;
+ struct arphdr *arph;
+ unsigned char *raw;
+ } nh;
+
+ union {
+ unsigned char *raw;
+ } mac;
+
+ struct dst_entry *dst;
+ struct sec_path *sp;
+
+ char cb[48];
+
+ unsigned int len,
+ data_len,
+ mac_len,
+ csum;
+ __u32 priority;
+ __u8 local_df:1,
+ cloned:1,
+ ip_summed:2,
+ nohdr:1,
+ nfctinfo:3;
+ __u8 pkt_type:3,
+ fclone:2,
+ ipvs_property:1;
+ __be16 protocol;
+
+ void (*destructor)(struct sk_buff *skb);
+
+ unsigned int truesize;
+ atomic_t users;
+ unsigned char *head,
+ *data,
+ *tail,
+ *end;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/slab.h b/6/platforms/android-3/arch-x86/usr/include/linux/slab.h
new file mode 100644
index 0000000..f165a93
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/slab.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SLAB_H
+#define _LINUX_SLAB_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/smb.h b/6/platforms/android-3/arch-x86/usr/include/linux/smb.h
new file mode 100644
index 0000000..72c8967
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/smb.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SMB_H
+#define _LINUX_SMB_H
+
+#include <linux/types.h>
+
+enum smb_protocol {
+ SMB_PROTOCOL_NONE,
+ SMB_PROTOCOL_CORE,
+ SMB_PROTOCOL_COREPLUS,
+ SMB_PROTOCOL_LANMAN1,
+ SMB_PROTOCOL_LANMAN2,
+ SMB_PROTOCOL_NT1
+};
+
+enum smb_case_hndl {
+ SMB_CASE_DEFAULT,
+ SMB_CASE_LOWER,
+ SMB_CASE_UPPER
+};
+
+struct smb_dskattr {
+ __u16 total;
+ __u16 allocblocks;
+ __u16 blocksize;
+ __u16 free;
+};
+
+struct smb_conn_opt {
+
+ unsigned int fd;
+
+ enum smb_protocol protocol;
+ enum smb_case_hndl case_handling;
+
+ __u32 max_xmit;
+ __u16 server_uid;
+ __u16 tid;
+
+ __u16 secmode;
+ __u16 maxmux;
+ __u16 maxvcs;
+ __u16 rawmode;
+ __u32 sesskey;
+
+ __u32 maxraw;
+ __u32 capabilities;
+ __s16 serverzone;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/smp.h b/6/platforms/android-3/arch-x86/usr/include/linux/smp.h
new file mode 100644
index 0000000..ab4982d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/smp.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SMP_H
+#define __LINUX_SMP_H
+
+#define raw_smp_processor_id() 0
+#define hard_smp_processor_id() 0
+#define smp_call_function(func,info,retry,wait) (up_smp_call_function())
+#define on_each_cpu(func,info,retry,wait) ({ local_irq_disable(); func(info); local_irq_enable(); 0; })
+#define num_booting_cpus() 1
+#define smp_prepare_boot_cpu() do {} while (0)
+#define smp_processor_id() raw_smp_processor_id()
+#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
+#define put_cpu() preempt_enable()
+#define put_cpu_no_resched() preempt_enable_no_resched()
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/smp_lock.h b/6/platforms/android-3/arch-x86/usr/include/linux/smp_lock.h
new file mode 100644
index 0000000..523a970
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/smp_lock.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SMPLOCK_H
+#define __LINUX_SMPLOCK_H
+
+#define lock_kernel() do { } while(0)
+#define unlock_kernel() do { } while(0)
+#define release_kernel_lock(task) do { } while(0)
+#define reacquire_kernel_lock(task) 0
+#define kernel_locked() 1
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/socket.h b/6/platforms/android-3/arch-x86/usr/include/linux/socket.h
new file mode 100644
index 0000000..b578df9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/socket.h
@@ -0,0 +1,227 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SOCKET_H
+#define _LINUX_SOCKET_H
+
+#define _K_SS_MAXSIZE 128
+#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
+
+struct __kernel_sockaddr_storage {
+ unsigned short ss_family;
+
+ char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
+
+} __attribute__ ((aligned(_K_SS_ALIGNSIZE)));
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#include <asm/socket.h>
+#include <linux/sockios.h>
+#include <linux/uio.h>
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+typedef unsigned short sa_family_t;
+
+struct sockaddr {
+ sa_family_t sa_family;
+ char sa_data[14];
+};
+
+struct linger {
+ int l_onoff;
+ int l_linger;
+};
+
+#define sockaddr_storage __kernel_sockaddr_storage
+
+struct msghdr {
+ void * msg_name;
+ int msg_namelen;
+ struct iovec * msg_iov;
+ __kernel_size_t msg_iovlen;
+ void * msg_control;
+ __kernel_size_t msg_controllen;
+ unsigned msg_flags;
+};
+
+struct cmsghdr {
+ __kernel_size_t cmsg_len;
+ int cmsg_level;
+ int cmsg_type;
+};
+
+#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg))
+#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
+
+#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
+
+#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
+#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
+#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+
+#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? (struct cmsghdr *)(ctl) : (struct cmsghdr *)NULL)
+#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
+#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
+
+#ifdef __GNUC__
+#define __KINLINE static __inline__
+#elif defined(__cplusplus)
+#define __KINLINE static inline
+#else
+#define __KINLINE static
+#endif
+
+__KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
+ struct cmsghdr *__cmsg)
+{
+ struct cmsghdr * __ptr;
+
+ __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
+ if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
+ return (struct cmsghdr *)0;
+
+ return __ptr;
+}
+
+__KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
+{
+ return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
+}
+
+#define SCM_RIGHTS 0x01
+#define SCM_CREDENTIALS 0x02
+#define SCM_SECURITY 0x03
+
+struct ucred {
+ __u32 pid;
+ __u32 uid;
+ __u32 gid;
+};
+
+#define AF_UNSPEC 0
+#define AF_UNIX 1
+#define AF_LOCAL 1
+#define AF_INET 2
+#define AF_AX25 3
+#define AF_IPX 4
+#define AF_APPLETALK 5
+#define AF_NETROM 6
+#define AF_BRIDGE 7
+#define AF_ATMPVC 8
+#define AF_X25 9
+#define AF_INET6 10
+#define AF_ROSE 11
+#define AF_DECnet 12
+#define AF_NETBEUI 13
+#define AF_SECURITY 14
+#define AF_KEY 15
+#define AF_NETLINK 16
+#define AF_ROUTE AF_NETLINK
+#define AF_PACKET 17
+#define AF_ASH 18
+#define AF_ECONET 19
+#define AF_ATMSVC 20
+#define AF_SNA 22
+#define AF_IRDA 23
+#define AF_PPPOX 24
+#define AF_WANPIPE 25
+#define AF_LLC 26
+#define AF_TIPC 30
+#define AF_BLUETOOTH 31
+#define AF_MAX 32
+
+#define PF_UNSPEC AF_UNSPEC
+#define PF_UNIX AF_UNIX
+#define PF_LOCAL AF_LOCAL
+#define PF_INET AF_INET
+#define PF_AX25 AF_AX25
+#define PF_IPX AF_IPX
+#define PF_APPLETALK AF_APPLETALK
+#define PF_NETROM AF_NETROM
+#define PF_BRIDGE AF_BRIDGE
+#define PF_ATMPVC AF_ATMPVC
+#define PF_X25 AF_X25
+#define PF_INET6 AF_INET6
+#define PF_ROSE AF_ROSE
+#define PF_DECnet AF_DECnet
+#define PF_NETBEUI AF_NETBEUI
+#define PF_SECURITY AF_SECURITY
+#define PF_KEY AF_KEY
+#define PF_NETLINK AF_NETLINK
+#define PF_ROUTE AF_ROUTE
+#define PF_PACKET AF_PACKET
+#define PF_ASH AF_ASH
+#define PF_ECONET AF_ECONET
+#define PF_ATMSVC AF_ATMSVC
+#define PF_SNA AF_SNA
+#define PF_IRDA AF_IRDA
+#define PF_PPPOX AF_PPPOX
+#define PF_WANPIPE AF_WANPIPE
+#define PF_LLC AF_LLC
+#define PF_TIPC AF_TIPC
+#define PF_BLUETOOTH AF_BLUETOOTH
+#define PF_MAX AF_MAX
+
+#define SOMAXCONN 128
+
+#define MSG_OOB 1
+#define MSG_PEEK 2
+#define MSG_DONTROUTE 4
+#define MSG_TRYHARD 4
+#define MSG_CTRUNC 8
+#define MSG_PROBE 0x10
+#define MSG_TRUNC 0x20
+#define MSG_DONTWAIT 0x40
+#define MSG_EOR 0x80
+#define MSG_WAITALL 0x100
+#define MSG_FIN 0x200
+#define MSG_SYN 0x400
+#define MSG_CONFIRM 0x800
+#define MSG_RST 0x1000
+#define MSG_ERRQUEUE 0x2000
+#define MSG_NOSIGNAL 0x4000
+#define MSG_MORE 0x8000
+
+#define MSG_EOF MSG_FIN
+
+#define MSG_CMSG_COMPAT 0
+
+#define SOL_IP 0
+
+#define SOL_TCP 6
+#define SOL_UDP 17
+#define SOL_IPV6 41
+#define SOL_ICMPV6 58
+#define SOL_SCTP 132
+#define SOL_RAW 255
+#define SOL_IPX 256
+#define SOL_AX25 257
+#define SOL_ATALK 258
+#define SOL_NETROM 259
+#define SOL_ROSE 260
+#define SOL_DECNET 261
+#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264
+#define SOL_AAL 265
+#define SOL_IRDA 266
+#define SOL_NETBEUI 267
+#define SOL_LLC 268
+#define SOL_DCCP 269
+#define SOL_NETLINK 270
+#define SOL_TIPC 271
+
+#define IPX_TYPE 1
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sockios.h b/6/platforms/android-3/arch-x86/usr/include/linux/sockios.h
new file mode 100644
index 0000000..d111359
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sockios.h
@@ -0,0 +1,107 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SOCKIOS_H
+#define _LINUX_SOCKIOS_H
+
+#include <asm/sockios.h>
+
+#define SIOCINQ FIONREAD
+#define SIOCOUTQ TIOCOUTQ
+
+#define SIOCADDRT 0x890B
+#define SIOCDELRT 0x890C
+#define SIOCRTMSG 0x890D
+
+#define SIOCGIFNAME 0x8910
+#define SIOCSIFLINK 0x8911
+#define SIOCGIFCONF 0x8912
+#define SIOCGIFFLAGS 0x8913
+#define SIOCSIFFLAGS 0x8914
+#define SIOCGIFADDR 0x8915
+#define SIOCSIFADDR 0x8916
+#define SIOCGIFDSTADDR 0x8917
+#define SIOCSIFDSTADDR 0x8918
+#define SIOCGIFBRDADDR 0x8919
+#define SIOCSIFBRDADDR 0x891a
+#define SIOCGIFNETMASK 0x891b
+#define SIOCSIFNETMASK 0x891c
+#define SIOCGIFMETRIC 0x891d
+#define SIOCSIFMETRIC 0x891e
+#define SIOCGIFMEM 0x891f
+#define SIOCSIFMEM 0x8920
+#define SIOCGIFMTU 0x8921
+#define SIOCSIFMTU 0x8922
+#define SIOCSIFNAME 0x8923
+#define SIOCSIFHWADDR 0x8924
+#define SIOCGIFENCAP 0x8925
+#define SIOCSIFENCAP 0x8926
+#define SIOCGIFHWADDR 0x8927
+#define SIOCGIFSLAVE 0x8929
+#define SIOCSIFSLAVE 0x8930
+#define SIOCADDMULTI 0x8931
+#define SIOCDELMULTI 0x8932
+#define SIOCGIFINDEX 0x8933
+#define SIOGIFINDEX SIOCGIFINDEX
+#define SIOCSIFPFLAGS 0x8934
+#define SIOCGIFPFLAGS 0x8935
+#define SIOCDIFADDR 0x8936
+#define SIOCSIFHWBROADCAST 0x8937
+#define SIOCGIFCOUNT 0x8938
+#define SIOCKILLADDR 0x8939
+
+#define SIOCGIFBR 0x8940
+#define SIOCSIFBR 0x8941
+
+#define SIOCGIFTXQLEN 0x8942
+#define SIOCSIFTXQLEN 0x8943
+
+#define SIOCETHTOOL 0x8946
+
+#define SIOCGMIIPHY 0x8947
+#define SIOCGMIIREG 0x8948
+#define SIOCSMIIREG 0x8949
+
+#define SIOCWANDEV 0x894A
+
+#define SIOCDARP 0x8953
+#define SIOCGARP 0x8954
+#define SIOCSARP 0x8955
+
+#define SIOCDRARP 0x8960
+#define SIOCGRARP 0x8961
+#define SIOCSRARP 0x8962
+
+#define SIOCGIFMAP 0x8970
+#define SIOCSIFMAP 0x8971
+
+#define SIOCADDDLCI 0x8980
+#define SIOCDELDLCI 0x8981
+
+#define SIOCGIFVLAN 0x8982
+#define SIOCSIFVLAN 0x8983
+
+#define SIOCBONDENSLAVE 0x8990
+#define SIOCBONDRELEASE 0x8991
+#define SIOCBONDSETHWADDR 0x8992
+#define SIOCBONDSLAVEINFOQUERY 0x8993
+#define SIOCBONDINFOQUERY 0x8994
+#define SIOCBONDCHANGEACTIVE 0x8995
+
+#define SIOCBRADDBR 0x89a0
+#define SIOCBRDELBR 0x89a1
+#define SIOCBRADDIF 0x89a2
+#define SIOCBRDELIF 0x89a3
+
+#define SIOCDEVPRIVATE 0x89F0
+
+#define SIOCPROTOPRIVATE 0x89E0
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/soundcard.h b/6/platforms/android-3/arch-x86/usr/include/linux/soundcard.h
new file mode 100644
index 0000000..8c69c28
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/soundcard.h
@@ -0,0 +1,831 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef SOUNDCARD_H
+#define SOUNDCARD_H
+
+#define SOUND_VERSION 0x030802
+#define OPEN_SOUND_SYSTEM
+
+#include <linux/ioctl.h>
+
+#include <endian.h>
+
+#define SNDCARD_ADLIB 1
+#define SNDCARD_SB 2
+#define SNDCARD_PAS 3
+#define SNDCARD_GUS 4
+#define SNDCARD_MPU401 5
+#define SNDCARD_SB16 6
+#define SNDCARD_SB16MIDI 7
+#define SNDCARD_UART6850 8
+#define SNDCARD_GUS16 9
+#define SNDCARD_MSS 10
+#define SNDCARD_PSS 11
+#define SNDCARD_SSCAPE 12
+#define SNDCARD_PSS_MPU 13
+#define SNDCARD_PSS_MSS 14
+#define SNDCARD_SSCAPE_MSS 15
+#define SNDCARD_TRXPRO 16
+#define SNDCARD_TRXPRO_SB 17
+#define SNDCARD_TRXPRO_MPU 18
+#define SNDCARD_MAD16 19
+#define SNDCARD_MAD16_MPU 20
+#define SNDCARD_CS4232 21
+#define SNDCARD_CS4232_MPU 22
+#define SNDCARD_MAUI 23
+#define SNDCARD_PSEUDO_MSS 24
+#define SNDCARD_GUSPNP 25
+#define SNDCARD_UART401 26
+
+#ifndef _SIOWR
+#if defined(_IOWR) && (defined(_AIX) || !defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__))
+
+#define SIOCPARM_MASK IOCPARM_MASK
+#define SIOC_VOID IOC_VOID
+#define SIOC_OUT IOC_OUT
+#define SIOC_IN IOC_IN
+#define SIOC_INOUT IOC_INOUT
+#define _SIOC_SIZE _IOC_SIZE
+#define _SIOC_DIR _IOC_DIR
+#define _SIOC_NONE _IOC_NONE
+#define _SIOC_READ _IOC_READ
+#define _SIOC_WRITE _IOC_WRITE
+#define _SIO _IO
+#define _SIOR _IOR
+#define _SIOW _IOW
+#define _SIOWR _IOWR
+#else
+
+#define SIOCPARM_MASK 0x1fff
+#define SIOC_VOID 0x00000000
+#define SIOC_OUT 0x20000000
+#define SIOC_IN 0x40000000
+#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
+
+#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y))
+#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+
+#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
+#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
+#define _SIOC_DIR(x) (x & 0xf0000000)
+#define _SIOC_NONE SIOC_VOID
+#define _SIOC_READ SIOC_OUT
+#define _SIOC_WRITE SIOC_IN
+#endif
+#endif
+
+#define SNDCTL_SEQ_RESET _SIO ('Q', 0)
+#define SNDCTL_SEQ_SYNC _SIO ('Q', 1)
+#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
+#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int)
+#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
+#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
+#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
+#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument)
+#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
+#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
+#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
+#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int)
+#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info)
+#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int)
+#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int)
+#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int)
+#define SNDCTL_SEQ_PANIC _SIO ('Q',17)
+#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec)
+#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int)
+#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info)
+#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control)
+#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample)
+
+typedef struct synth_control
+{
+ int devno;
+ char data[4000];
+}synth_control;
+
+typedef struct remove_sample
+{
+ int devno;
+ int bankno;
+ int instrno;
+} remove_sample;
+
+typedef struct seq_event_rec {
+ unsigned char arr[8];
+} seq_event_rec;
+
+#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
+#define SNDCTL_TMR_START _SIO ('T', 2)
+#define SNDCTL_TMR_STOP _SIO ('T', 3)
+#define SNDCTL_TMR_CONTINUE _SIO ('T', 4)
+#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
+#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
+#define TMR_INTERNAL 0x00000001
+#define TMR_EXTERNAL 0x00000002
+#define TMR_MODE_MIDI 0x00000010
+#define TMR_MODE_FSK 0x00000020
+#define TMR_MODE_CLS 0x00000040
+#define TMR_MODE_SMPTE 0x00000080
+#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int)
+#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int)
+
+#define _LINUX_PATCHKEY_H_INDIRECT
+#include <linux/patchkey.h>
+#undef _LINUX_PATCHKEY_H_INDIRECT
+
+#ifdef __BYTE_ORDER
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define AFMT_S16_NE AFMT_S16_BE
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define AFMT_S16_NE AFMT_S16_LE
+#else
+#error "could not determine byte order"
+#endif
+#endif
+
+struct patch_info {
+ unsigned short key;
+#define WAVE_PATCH _PATCHKEY(0x04)
+#define GUS_PATCH WAVE_PATCH
+#define WAVEFRONT_PATCH _PATCHKEY(0x06)
+
+ short device_no;
+ short instr_no;
+
+ unsigned int mode;
+
+#define WAVE_16_BITS 0x01
+#define WAVE_UNSIGNED 0x02
+#define WAVE_LOOPING 0x04
+#define WAVE_BIDIR_LOOP 0x08
+#define WAVE_LOOP_BACK 0x10
+#define WAVE_SUSTAIN_ON 0x20
+#define WAVE_ENVELOPES 0x40
+#define WAVE_FAST_RELEASE 0x80
+
+#define WAVE_VIBRATO 0x00010000
+#define WAVE_TREMOLO 0x00020000
+#define WAVE_SCALE 0x00040000
+#define WAVE_FRACTIONS 0x00080000
+
+#define WAVE_ROM 0x40000000
+#define WAVE_MULAW 0x20000000
+
+ int len;
+ int loop_start, loop_end;
+
+ unsigned int base_freq;
+ unsigned int base_note;
+ unsigned int high_note;
+ unsigned int low_note;
+ int panning;
+ int detuning;
+
+ unsigned char env_rate[ 6 ];
+ unsigned char env_offset[ 6 ];
+
+ unsigned char tremolo_sweep;
+ unsigned char tremolo_rate;
+ unsigned char tremolo_depth;
+
+ unsigned char vibrato_sweep;
+ unsigned char vibrato_rate;
+ unsigned char vibrato_depth;
+
+ int scale_frequency;
+ unsigned int scale_factor;
+
+ int volume;
+ int fractions;
+ int reserved1;
+ int spare[2];
+ char data[1];
+ };
+
+struct sysex_info {
+ short key;
+#define SYSEX_PATCH _PATCHKEY(0x05)
+#define MAUI_PATCH _PATCHKEY(0x06)
+ short device_no;
+ int len;
+ unsigned char data[1];
+ };
+
+#define SEQ_NOTEOFF 0
+#define SEQ_FMNOTEOFF SEQ_NOTEOFF
+#define SEQ_NOTEON 1
+#define SEQ_FMNOTEON SEQ_NOTEON
+#define SEQ_WAIT TMR_WAIT_ABS
+#define SEQ_PGMCHANGE 3
+#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
+#define SEQ_SYNCTIMER TMR_START
+#define SEQ_MIDIPUTC 5
+#define SEQ_DRUMON 6
+#define SEQ_DRUMOFF 7
+#define SEQ_ECHO TMR_ECHO
+#define SEQ_AFTERTOUCH 9
+#define SEQ_CONTROLLER 10
+
+#define CTL_BANK_SELECT 0x00
+#define CTL_MODWHEEL 0x01
+#define CTL_BREATH 0x02
+
+#define CTL_FOOT 0x04
+#define CTL_PORTAMENTO_TIME 0x05
+#define CTL_DATA_ENTRY 0x06
+#define CTL_MAIN_VOLUME 0x07
+#define CTL_BALANCE 0x08
+
+#define CTL_PAN 0x0a
+#define CTL_EXPRESSION 0x0b
+
+#define CTL_GENERAL_PURPOSE1 0x10
+#define CTL_GENERAL_PURPOSE2 0x11
+#define CTL_GENERAL_PURPOSE3 0x12
+#define CTL_GENERAL_PURPOSE4 0x13
+
+#define CTL_DAMPER_PEDAL 0x40
+#define CTL_SUSTAIN 0x40
+#define CTL_HOLD 0x40
+#define CTL_PORTAMENTO 0x41
+#define CTL_SOSTENUTO 0x42
+#define CTL_SOFT_PEDAL 0x43
+
+#define CTL_HOLD2 0x45
+
+#define CTL_GENERAL_PURPOSE5 0x50
+#define CTL_GENERAL_PURPOSE6 0x51
+#define CTL_GENERAL_PURPOSE7 0x52
+#define CTL_GENERAL_PURPOSE8 0x53
+
+#define CTL_EXT_EFF_DEPTH 0x5b
+#define CTL_TREMOLO_DEPTH 0x5c
+#define CTL_CHORUS_DEPTH 0x5d
+#define CTL_DETUNE_DEPTH 0x5e
+#define CTL_CELESTE_DEPTH 0x5e
+#define CTL_PHASER_DEPTH 0x5f
+#define CTL_DATA_INCREMENT 0x60
+#define CTL_DATA_DECREMENT 0x61
+#define CTL_NONREG_PARM_NUM_LSB 0x62
+#define CTL_NONREG_PARM_NUM_MSB 0x63
+#define CTL_REGIST_PARM_NUM_LSB 0x64
+#define CTL_REGIST_PARM_NUM_MSB 0x65
+
+#define CTRL_PITCH_BENDER 255
+#define CTRL_PITCH_BENDER_RANGE 254
+#define CTRL_EXPRESSION 253
+#define CTRL_MAIN_VOLUME 252
+#define SEQ_BALANCE 11
+#define SEQ_VOLMODE 12
+
+#define VOL_METHOD_ADAGIO 1
+#define VOL_METHOD_LINEAR 2
+
+#define SEQ_FULLSIZE 0xfd
+
+#define SEQ_PRIVATE 0xfe
+#define SEQ_EXTENDED 0xff
+
+typedef unsigned char sbi_instr_data[32];
+
+struct sbi_instrument {
+ unsigned short key;
+#define FM_PATCH _PATCHKEY(0x01)
+#define OPL3_PATCH _PATCHKEY(0x03)
+ short device;
+ int channel;
+ sbi_instr_data operators;
+ };
+
+struct synth_info {
+ char name[30];
+ int device;
+ int synth_type;
+#define SYNTH_TYPE_FM 0
+#define SYNTH_TYPE_SAMPLE 1
+#define SYNTH_TYPE_MIDI 2
+
+ int synth_subtype;
+#define FM_TYPE_ADLIB 0x00
+#define FM_TYPE_OPL3 0x01
+#define MIDI_TYPE_MPU401 0x401
+
+#define SAMPLE_TYPE_BASIC 0x10
+#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
+#define SAMPLE_TYPE_WAVEFRONT 0x11
+
+ int perc_mode;
+ int nr_voices;
+ int nr_drums;
+ int instr_bank_size;
+ unsigned int capabilities;
+#define SYNTH_CAP_PERCMODE 0x00000001
+#define SYNTH_CAP_OPL3 0x00000002
+#define SYNTH_CAP_INPUT 0x00000004
+ int dummies[19];
+ };
+
+struct sound_timer_info {
+ char name[32];
+ int caps;
+ };
+
+#define MIDI_CAP_MPU401 1
+
+struct midi_info {
+ char name[30];
+ int device;
+ unsigned int capabilities;
+ int dev_type;
+ int dummies[18];
+ };
+
+typedef struct {
+ unsigned char cmd;
+ char nr_args, nr_returns;
+ unsigned char data[30];
+ } mpu_command_rec;
+
+#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
+#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
+#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
+
+#define SNDCTL_DSP_RESET _SIO ('P', 0)
+#define SNDCTL_DSP_SYNC _SIO ('P', 1)
+#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
+#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
+#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
+#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
+#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
+#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
+#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
+#define SNDCTL_DSP_POST _SIO ('P', 8)
+#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
+#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
+
+#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int)
+#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int)
+#define AFMT_QUERY 0x00000000
+#define AFMT_MU_LAW 0x00000001
+#define AFMT_A_LAW 0x00000002
+#define AFMT_IMA_ADPCM 0x00000004
+#define AFMT_U8 0x00000008
+#define AFMT_S16_LE 0x00000010
+#define AFMT_S16_BE 0x00000020
+#define AFMT_S8 0x00000040
+#define AFMT_U16_LE 0x00000080
+#define AFMT_U16_BE 0x00000100
+#define AFMT_MPEG 0x00000200
+#define AFMT_AC3 0x00000400
+
+typedef struct audio_buf_info {
+ int fragments;
+ int fragstotal;
+ int fragsize;
+
+ int bytes;
+
+ } audio_buf_info;
+
+#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info)
+#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info)
+#define SNDCTL_DSP_NONBLOCK _SIO ('P',14)
+#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int)
+#define DSP_CAP_REVISION 0x000000ff
+#define DSP_CAP_DUPLEX 0x00000100
+#define DSP_CAP_REALTIME 0x00000200
+#define DSP_CAP_BATCH 0x00000400
+
+#define DSP_CAP_COPROC 0x00000800
+
+#define DSP_CAP_TRIGGER 0x00001000
+#define DSP_CAP_MMAP 0x00002000
+#define DSP_CAP_MULTI 0x00004000
+#define DSP_CAP_BIND 0x00008000
+
+#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int)
+#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int)
+#define PCM_ENABLE_INPUT 0x00000001
+#define PCM_ENABLE_OUTPUT 0x00000002
+
+typedef struct count_info {
+ int bytes;
+ int blocks;
+ int ptr;
+ } count_info;
+
+#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info)
+#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info)
+
+typedef struct buffmem_desc {
+ unsigned *buffer;
+ int size;
+ } buffmem_desc;
+#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc)
+#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc)
+#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21)
+#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22)
+#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int)
+
+#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
+#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
+#define DSP_BIND_QUERY 0x00000000
+#define DSP_BIND_FRONT 0x00000001
+#define DSP_BIND_SURR 0x00000002
+#define DSP_BIND_CENTER_LFE 0x00000004
+#define DSP_BIND_HANDSET 0x00000008
+#define DSP_BIND_MIC 0x00000010
+#define DSP_BIND_MODEM1 0x00000020
+#define DSP_BIND_MODEM2 0x00000040
+#define DSP_BIND_I2S 0x00000080
+#define DSP_BIND_SPDIF 0x00000100
+
+#define SNDCTL_DSP_SETSPDIF _SIOW ('P', 66, int)
+#define SNDCTL_DSP_GETSPDIF _SIOR ('P', 67, int)
+#define SPDIF_PRO 0x0001
+#define SPDIF_N_AUD 0x0002
+#define SPDIF_COPY 0x0004
+#define SPDIF_PRE 0x0008
+#define SPDIF_CC 0x07f0
+#define SPDIF_L 0x0800
+#define SPDIF_DRS 0x4000
+#define SPDIF_V 0x8000
+
+#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int)
+#define APF_NORMAL 0
+#define APF_NETWORK 1
+#define APF_CPUINTENS 2
+
+#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int)
+#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int)
+#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int)
+#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int)
+
+#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
+#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
+#define SOUND_PCM_POST SNDCTL_DSP_POST
+#define SOUND_PCM_RESET SNDCTL_DSP_RESET
+#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
+#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
+#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
+#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
+#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
+#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
+#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
+#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
+#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
+#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
+#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
+#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
+#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
+#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
+#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
+#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
+
+typedef struct copr_buffer {
+ int command;
+ int flags;
+#define CPF_NONE 0x0000
+#define CPF_FIRST 0x0001
+#define CPF_LAST 0x0002
+ int len;
+ int offs;
+
+ unsigned char data[4000];
+ } copr_buffer;
+
+typedef struct copr_debug_buf {
+ int command;
+ int parm1;
+ int parm2;
+ int flags;
+ int len;
+ } copr_debug_buf;
+
+typedef struct copr_msg {
+ int len;
+ unsigned char data[4000];
+ } copr_msg;
+
+#define SNDCTL_COPR_RESET _SIO ('C', 0)
+#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
+#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
+#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
+#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf)
+#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf)
+#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
+#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
+#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
+#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg)
+
+#define SOUND_MIXER_NRDEVICES 25
+#define SOUND_MIXER_VOLUME 0
+#define SOUND_MIXER_BASS 1
+#define SOUND_MIXER_TREBLE 2
+#define SOUND_MIXER_SYNTH 3
+#define SOUND_MIXER_PCM 4
+#define SOUND_MIXER_SPEAKER 5
+#define SOUND_MIXER_LINE 6
+#define SOUND_MIXER_MIC 7
+#define SOUND_MIXER_CD 8
+#define SOUND_MIXER_IMIX 9
+#define SOUND_MIXER_ALTPCM 10
+#define SOUND_MIXER_RECLEV 11
+#define SOUND_MIXER_IGAIN 12
+#define SOUND_MIXER_OGAIN 13
+
+#define SOUND_MIXER_LINE1 14
+#define SOUND_MIXER_LINE2 15
+#define SOUND_MIXER_LINE3 16
+#define SOUND_MIXER_DIGITAL1 17
+#define SOUND_MIXER_DIGITAL2 18
+#define SOUND_MIXER_DIGITAL3 19
+#define SOUND_MIXER_PHONEIN 20
+#define SOUND_MIXER_PHONEOUT 21
+#define SOUND_MIXER_VIDEO 22
+#define SOUND_MIXER_RADIO 23
+#define SOUND_MIXER_MONITOR 24
+
+#define SOUND_ONOFF_MIN 28
+#define SOUND_ONOFF_MAX 30
+
+#define SOUND_MIXER_NONE 31
+
+#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
+#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
+#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
+
+#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
+
+#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", "line1", "line2", "line3", "dig1", "dig2", "dig3", "phin", "phout", "video", "radio", "monitor"}
+
+#define SOUND_MIXER_RECSRC 0xff
+#define SOUND_MIXER_DEVMASK 0xfe
+#define SOUND_MIXER_RECMASK 0xfd
+#define SOUND_MIXER_CAPS 0xfc
+#define SOUND_CAP_EXCL_INPUT 0x00000001
+#define SOUND_MIXER_STEREODEVS 0xfb
+#define SOUND_MIXER_OUTSRC 0xfa
+#define SOUND_MIXER_OUTMASK 0xf9
+
+#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
+#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
+#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
+#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
+#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
+#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
+#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
+#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
+#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
+#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
+#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
+#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
+#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
+#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
+#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
+#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
+#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
+#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
+#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
+#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
+#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
+#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
+#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
+#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
+#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
+
+#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
+#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
+#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
+
+#define MIXER_READ(dev) _SIOR('M', dev, int)
+#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
+#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
+#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
+#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
+#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
+#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
+#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
+#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
+#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
+#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
+#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
+#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
+#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
+#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
+#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
+#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
+#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
+
+#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
+#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
+#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
+
+#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
+#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
+#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
+#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
+#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
+
+#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
+#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
+#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
+#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
+#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
+#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
+#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
+#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
+#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
+#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
+#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
+#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
+#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
+#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
+#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
+#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
+#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
+#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
+
+#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
+#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
+#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
+
+#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
+
+typedef struct mixer_info
+{
+ char id[16];
+ char name[32];
+ int modify_counter;
+ int fillers[10];
+} mixer_info;
+
+typedef struct _old_mixer_info
+{
+ char id[16];
+ char name[32];
+} _old_mixer_info;
+
+#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info)
+#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info)
+
+typedef unsigned char mixer_record[128];
+
+#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
+
+#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
+#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
+
+#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
+#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
+#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
+#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
+#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
+
+typedef struct mixer_vol_table {
+ int num;
+ char name[32];
+ int levels[32];
+} mixer_vol_table;
+
+#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
+#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
+
+#define OSS_GETVERSION _SIOR ('M', 118, int)
+
+#define EV_SEQ_LOCAL 0x80
+#define EV_TIMING 0x81
+#define EV_CHN_COMMON 0x92
+#define EV_CHN_VOICE 0x93
+#define EV_SYSEX 0x94
+
+#define MIDI_NOTEOFF 0x80
+#define MIDI_NOTEON 0x90
+#define MIDI_KEY_PRESSURE 0xA0
+
+#define MIDI_CTL_CHANGE 0xB0
+#define MIDI_PGM_CHANGE 0xC0
+#define MIDI_CHN_PRESSURE 0xD0
+#define MIDI_PITCH_BEND 0xE0
+
+#define MIDI_SYSTEM_PREFIX 0xF0
+
+#define TMR_WAIT_REL 1
+#define TMR_WAIT_ABS 2
+#define TMR_STOP 3
+#define TMR_START 4
+#define TMR_CONTINUE 5
+#define TMR_TEMPO 6
+#define TMR_ECHO 8
+#define TMR_CLOCK 9
+#define TMR_SPP 10
+#define TMR_TIMESIG 11
+
+#define LOCL_STARTAUDIO 1
+
+#if !defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL) || defined(USE_SEQ_MACROS)
+
+#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
+
+#define SEQ_PM_DEFINES int __foo_bar___
+#ifdef OSSLIB
+#define SEQ_USE_EXTBUF() extern unsigned char *_seqbuf; extern int _seqbuflen;extern int _seqbufptr
+#define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
+#define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
+#define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
+#define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
+
+#define SEQ_LOAD_GMINSTR(dev, instr) OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
+#define SEQ_LOAD_GMDRUM(dev, drum) OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
+#else
+
+#define SEQ_LOAD_GMINSTR(dev, instr)
+#define SEQ_LOAD_GMDRUM(dev, drum)
+
+#define SEQ_USE_EXTBUF() extern unsigned char _seqbuf[]; extern int _seqbuflen;extern int _seqbufptr
+
+#ifndef USE_SIMPLE_MACROS
+
+#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
+#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
+#define _SEQ_ADVBUF(len) _seqbufptr += len
+#define SEQ_DUMPBUF seqbuf_dump
+#else
+
+#define _SEQ_NEEDBUF(len)
+#endif
+#endif
+
+#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr+1] = SEQ_VOLMODE; _seqbuf[_seqbufptr+2] = (dev); _seqbuf[_seqbufptr+3] = (mode); _seqbuf[_seqbufptr+4] = 0; _seqbuf[_seqbufptr+5] = 0; _seqbuf[_seqbufptr+6] = 0; _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define _CHN_VOICE(dev, event, chn, note, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_VOICE; _seqbuf[_seqbufptr+1] = (dev); _seqbuf[_seqbufptr+2] = (event); _seqbuf[_seqbufptr+3] = (chn); _seqbuf[_seqbufptr+4] = (note); _seqbuf[_seqbufptr+5] = (parm); _seqbuf[_seqbufptr+6] = (0); _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define SEQ_START_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
+
+#define SEQ_STOP_NOTE(dev, chn, note, vol) _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
+
+#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
+
+#define _CHN_COMMON(dev, event, chn, p1, p2, w14) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_CHN_COMMON; _seqbuf[_seqbufptr+1] = (dev); _seqbuf[_seqbufptr+2] = (event); _seqbuf[_seqbufptr+3] = (chn); _seqbuf[_seqbufptr+4] = (p1); _seqbuf[_seqbufptr+5] = (p2); *(short *)&_seqbuf[_seqbufptr+6] = (w14); _SEQ_ADVBUF(8);}
+
+#define SEQ_SYSEX(dev, buf, len) {int ii, ll=(len); unsigned char *bufp=buf; if (ll>6)ll=6; _SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = EV_SYSEX; _seqbuf[_seqbufptr+1] = (dev); for(ii=0;ii<ll;ii++) _seqbuf[_seqbufptr+ii+2] = bufp[ii]; for(ii=ll;ii<6;ii++) _seqbuf[_seqbufptr+ii+2] = 0xff; _SEQ_ADVBUF(8);}
+
+#define SEQ_CHN_PRESSURE(dev, chn, pressure) _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
+
+#define SEQ_SET_PATCH SEQ_PGM_CHANGE
+#ifdef OSSLIB
+#define SEQ_PGM_CHANGE(dev, chn, patch) {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
+#else
+#define SEQ_PGM_CHANGE(dev, chn, patch) _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
+#endif
+
+#define SEQ_CONTROL(dev, chn, controller, value) _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
+
+#define SEQ_BENDER(dev, chn, value) _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
+
+#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_EXTENDED; _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER; _seqbuf[_seqbufptr+2] = (dev); _seqbuf[_seqbufptr+3] = (voice); _seqbuf[_seqbufptr+4] = (controller); _seqbuf[_seqbufptr+5] = ((value)&0xff); _seqbuf[_seqbufptr+6] = ((value>>8)&0xff); _seqbuf[_seqbufptr+7] = 0; _SEQ_ADVBUF(8);}
+
+#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
+#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
+#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
+#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
+#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
+
+#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr+0] = EV_TIMING; _seqbuf[_seqbufptr+1] = (ev); _seqbuf[_seqbufptr+2] = 0; _seqbuf[_seqbufptr+3] = 0; *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); _SEQ_ADVBUF(8);}
+
+#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
+#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
+#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
+#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
+#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
+#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
+#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
+#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
+#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
+
+#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; _seqbuf[_seqbufptr+1] = (ev); _seqbuf[_seqbufptr+2] = 0; _seqbuf[_seqbufptr+3] = 0; *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); _SEQ_ADVBUF(8);}
+
+#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
+
+#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4); _seqbuf[_seqbufptr] = SEQ_MIDIPUTC; _seqbuf[_seqbufptr+1] = (byte); _seqbuf[_seqbufptr+2] = (device); _seqbuf[_seqbufptr+3] = 0; _SEQ_ADVBUF(4);}
+
+#ifdef OSSLIB
+#define SEQ_WRPATCH(patchx, len) OSS_write_patch(seqfd, (char*)(patchx), len)
+#define SEQ_WRPATCH2(patchx, len) OSS_write_patch2(seqfd, (char*)(patchx), len)
+#else
+#define SEQ_WRPATCH(patchx, len) {if (_seqbufptr) SEQ_DUMPBUF(); if (write(seqfd, (char*)(patchx), len)==-1) perror("Write patch: /dev/sequencer");}
+#define SEQ_WRPATCH2(patchx, len) (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
+#endif
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock.h
new file mode 100644
index 0000000..5504c9e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock.h
@@ -0,0 +1,112 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_H
+#define __LINUX_SPINLOCK_H
+
+#include <linux/preempt.h>
+#include <linux/linkage.h>
+#include <linux/compiler.h>
+#include <linux/thread_info.h>
+#include <linux/kernel.h>
+#include <linux/stringify.h>
+
+#include <asm/system.h>
+
+#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME
+
+#define LOCK_SECTION_START(extra) ".subsection 1\n\t" extra ".ifndef " LOCK_SECTION_NAME "\n\t" LOCK_SECTION_NAME ":\n\t" ".endif\n"
+
+#define LOCK_SECTION_END ".previous\n\t"
+
+#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
+
+#include <linux/spinlock_types.h>
+
+#include <linux/spinlock_up.h>
+
+#define spin_lock_init(lock) do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
+
+#define rwlock_init(lock) do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
+
+#define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock)
+
+#define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock)
+
+#include <linux/spinlock_api_up.h>
+
+#define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock)
+#define _raw_spin_lock_flags(lock, flags) __raw_spin_lock_flags(&(lock)->raw_lock, *(flags))
+#define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock)
+#define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
+#define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock)
+#define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock)
+#define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock)
+#define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock)
+#define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock)
+#define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock)
+
+#define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock)
+#define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock)
+
+#define spin_trylock(lock) __cond_lock(_spin_trylock(lock))
+#define read_trylock(lock) __cond_lock(_read_trylock(lock))
+#define write_trylock(lock) __cond_lock(_write_trylock(lock))
+
+#define spin_lock(lock) _spin_lock(lock)
+
+#define spin_lock_nested(lock, subclass) _spin_lock(lock)
+
+#define write_lock(lock) _write_lock(lock)
+#define read_lock(lock) _read_lock(lock)
+
+#define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags)
+#define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags)
+#define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags)
+
+#define spin_lock_irq(lock) _spin_lock_irq(lock)
+#define spin_lock_bh(lock) _spin_lock_bh(lock)
+
+#define read_lock_irq(lock) _read_lock_irq(lock)
+#define read_lock_bh(lock) _read_lock_bh(lock)
+
+#define write_lock_irq(lock) _write_lock_irq(lock)
+#define write_lock_bh(lock) _write_lock_bh(lock)
+
+#define spin_unlock(lock) _spin_unlock(lock)
+#define read_unlock(lock) _read_unlock(lock)
+#define write_unlock(lock) _write_unlock(lock)
+#define spin_unlock_irq(lock) _spin_unlock_irq(lock)
+#define read_unlock_irq(lock) _read_unlock_irq(lock)
+#define write_unlock_irq(lock) _write_unlock_irq(lock)
+
+#define spin_unlock_irqrestore(lock, flags) _spin_unlock_irqrestore(lock, flags)
+#define spin_unlock_bh(lock) _spin_unlock_bh(lock)
+
+#define read_unlock_irqrestore(lock, flags) _read_unlock_irqrestore(lock, flags)
+#define read_unlock_bh(lock) _read_unlock_bh(lock)
+
+#define write_unlock_irqrestore(lock, flags) _write_unlock_irqrestore(lock, flags)
+#define write_unlock_bh(lock) _write_unlock_bh(lock)
+
+#define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock))
+
+#define spin_trylock_irq(lock) ({ local_irq_disable(); _spin_trylock(lock) ? 1 : ({ local_irq_enable(); 0; }); })
+
+#define spin_trylock_irqsave(lock, flags) ({ local_irq_save(flags); _spin_trylock(lock) ? 1 : ({ local_irq_restore(flags); 0; }); })
+
+#include <asm/atomic.h>
+
+#define atomic_dec_and_lock(atomic, lock) __cond_lock(_atomic_dec_and_lock(atomic, lock))
+
+#define spin_can_lock(lock) (!spin_is_locked(lock))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_smp.h
new file mode 100644
index 0000000..74d8cc9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_API_SMP_H
+#define __LINUX_SPINLOCK_API_SMP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_up.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_up.h
new file mode 100644
index 0000000..c9a5c01
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_API_UP_H
+#define __LINUX_SPINLOCK_API_UP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define in_lock_functions(ADDR) 0
+
+#define assert_spin_locked(lock) do { (void)(lock); } while (0)
+
+#define __LOCK(lock) do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
+
+#define __LOCK_BH(lock) do { local_bh_disable(); __LOCK(lock); } while (0)
+
+#define __LOCK_IRQ(lock) do { local_irq_disable(); __LOCK(lock); } while (0)
+
+#define __LOCK_IRQSAVE(lock, flags) do { local_irq_save(flags); __LOCK(lock); } while (0)
+
+#define __UNLOCK(lock) do { preempt_enable(); __release(lock); (void)(lock); } while (0)
+
+#define __UNLOCK_BH(lock) do { preempt_enable_no_resched(); local_bh_enable(); __release(lock); (void)(lock); } while (0)
+
+#define __UNLOCK_IRQ(lock) do { local_irq_enable(); __UNLOCK(lock); } while (0)
+
+#define __UNLOCK_IRQRESTORE(lock, flags) do { local_irq_restore(flags); __UNLOCK(lock); } while (0)
+
+#define _spin_lock(lock) __LOCK(lock)
+#define _spin_lock_nested(lock, subclass) __LOCK(lock)
+#define _read_lock(lock) __LOCK(lock)
+#define _write_lock(lock) __LOCK(lock)
+#define _spin_lock_bh(lock) __LOCK_BH(lock)
+#define _read_lock_bh(lock) __LOCK_BH(lock)
+#define _write_lock_bh(lock) __LOCK_BH(lock)
+#define _spin_lock_irq(lock) __LOCK_IRQ(lock)
+#define _read_lock_irq(lock) __LOCK_IRQ(lock)
+#define _write_lock_irq(lock) __LOCK_IRQ(lock)
+#define _spin_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _read_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _write_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
+#define _spin_trylock(lock) ({ __LOCK(lock); 1; })
+#define _read_trylock(lock) ({ __LOCK(lock); 1; })
+#define _write_trylock(lock) ({ __LOCK(lock); 1; })
+#define _spin_trylock_bh(lock) ({ __LOCK_BH(lock); 1; })
+#define _spin_unlock(lock) __UNLOCK(lock)
+#define _read_unlock(lock) __UNLOCK(lock)
+#define _write_unlock(lock) __UNLOCK(lock)
+#define _spin_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _write_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _read_unlock_bh(lock) __UNLOCK_BH(lock)
+#define _spin_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _read_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _write_unlock_irq(lock) __UNLOCK_IRQ(lock)
+#define _spin_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+#define _read_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+#define _write_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types.h
new file mode 100644
index 0000000..0938b51
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types.h
@@ -0,0 +1,46 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#define __LINUX_SPINLOCK_TYPES_H
+
+#include <linux/lockdep.h>
+
+#include <linux/spinlock_types_up.h>
+
+typedef struct {
+ raw_spinlock_t raw_lock;
+} spinlock_t;
+
+#define SPINLOCK_MAGIC 0xdead4ead
+
+typedef struct {
+ raw_rwlock_t raw_lock;
+} rwlock_t;
+
+#define RWLOCK_MAGIC 0xdeaf1eed
+
+#define SPINLOCK_OWNER_INIT ((void *)-1L)
+
+#define SPIN_DEP_MAP_INIT(lockname)
+
+#define RW_DEP_MAP_INIT(lockname)
+
+#define __SPIN_LOCK_UNLOCKED(lockname) (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, SPIN_DEP_MAP_INIT(lockname) }
+#define __RW_LOCK_UNLOCKED(lockname) (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, RW_DEP_MAP_INIT(lockname) }
+
+#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
+#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)
+
+#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
+#define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types_up.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types_up.h
new file mode 100644
index 0000000..0db3037
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_TYPES_UP_H
+#define __LINUX_SPINLOCK_TYPES_UP_H
+
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#error "please don't include this file directly"
+#endif
+
+typedef struct { } raw_spinlock_t;
+
+#define __RAW_SPIN_LOCK_UNLOCKED { }
+
+typedef struct {
+
+} raw_rwlock_t;
+
+#define __RAW_RW_LOCK_UNLOCKED { }
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_up.h b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_up.h
new file mode 100644
index 0000000..b4958dc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/spinlock_up.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_SPINLOCK_UP_H
+#define __LINUX_SPINLOCK_UP_H
+
+#ifndef __LINUX_SPINLOCK_H
+#error "please don't include this file directly"
+#endif
+
+#define __raw_spin_is_locked(lock) ((void)(lock), 0)
+
+#define __raw_spin_lock(lock) do { (void)(lock); } while (0)
+#define __raw_spin_unlock(lock) do { (void)(lock); } while (0)
+#define __raw_spin_trylock(lock) ({ (void)(lock); 1; })
+
+#define __raw_read_can_lock(lock) (((void)(lock), 1))
+#define __raw_write_can_lock(lock) (((void)(lock), 1))
+
+#define __raw_spin_unlock_wait(lock) do { cpu_relax(); } while (__raw_spin_is_locked(lock))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/stacktrace.h b/6/platforms/android-3/arch-x86/usr/include/linux/stacktrace.h
new file mode 100644
index 0000000..af7ecc8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/stacktrace.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_STACKTRACE_H
+#define __LINUX_STACKTRACE_H
+
+#define save_stack_trace(trace, task, all, skip) do { } while (0)
+#define print_stack_trace(trace) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/stat.h b/6/platforms/android-3/arch-x86/usr/include/linux/stat.h
new file mode 100644
index 0000000..0d757f4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/stat.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STAT_H
+#define _LINUX_STAT_H
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#define S_IFMT 00170000
+#define S_IFSOCK 0140000
+#define S_IFLNK 0120000
+#define S_IFREG 0100000
+#define S_IFBLK 0060000
+#define S_IFDIR 0040000
+#define S_IFCHR 0020000
+#define S_IFIFO 0010000
+#define S_ISUID 0004000
+#define S_ISGID 0002000
+#define S_ISVTX 0001000
+
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+
+#define S_IRWXU 00700
+#define S_IRUSR 00400
+#define S_IWUSR 00200
+#define S_IXUSR 00100
+
+#define S_IRWXG 00070
+#define S_IRGRP 00040
+#define S_IWGRP 00020
+#define S_IXGRP 00010
+
+#define S_IRWXO 00007
+#define S_IROTH 00004
+#define S_IWOTH 00002
+#define S_IXOTH 00001
+
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/statfs.h b/6/platforms/android-3/arch-x86/usr/include/linux/statfs.h
new file mode 100644
index 0000000..43a5d70
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/statfs.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STATFS_H
+#define _LINUX_STATFS_H
+
+#include <linux/types.h>
+
+#include <asm/statfs.h>
+
+struct kstatfs {
+ long f_type;
+ long f_bsize;
+ u64 f_blocks;
+ u64 f_bfree;
+ u64 f_bavail;
+ u64 f_files;
+ u64 f_ffree;
+ __kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_frsize;
+ long f_spare[5];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/stddef.h b/6/platforms/android-3/arch-x86/usr/include/linux/stddef.h
new file mode 100644
index 0000000..5412f47
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/stddef.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STDDEF_H
+#define _LINUX_STDDEF_H
+
+#include <linux/compiler.h>
+
+#undef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+
+#undef offsetof
+#ifdef __compiler_offsetof
+#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+#else
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/string.h b/6/platforms/android-3/arch-x86/usr/include/linux/string.h
new file mode 100644
index 0000000..6759068
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/string.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_STRING_H_
+#define _LINUX_STRING_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/stringify.h b/6/platforms/android-3/arch-x86/usr/include/linux/stringify.h
new file mode 100644
index 0000000..cbb9e5b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/stringify.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+#define __stringify_1(x) #x
+#define __stringify(x) __stringify_1(x)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth.h
new file mode 100644
index 0000000..ae0a3d0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_H
+#define _LINUX_SUNRPC_AUTH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth_gss.h
new file mode 100644
index 0000000..a64f1f8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_AUTH_GSS_H
+#define _LINUX_SUNRPC_AUTH_GSS_H
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/clnt.h
new file mode 100644
index 0000000..a562ad9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_CLNT_H
+#define _LINUX_SUNRPC_CLNT_H
+
+#include <linux/sunrpc/msg_prot.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xprt.h>
+#include <linux/sunrpc/auth.h>
+#include <linux/sunrpc/stats.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/timer.h>
+#include <asm/signal.h>
+
+struct rpc_portmap {
+ __u32 pm_prog;
+ __u32 pm_vers;
+ __u32 pm_prot;
+ __u16 pm_port;
+ unsigned char pm_binding : 1;
+ struct rpc_wait_queue pm_bindwait;
+};
+
+struct rpc_inode;
+
+struct rpc_clnt {
+ atomic_t cl_count;
+ atomic_t cl_users;
+ struct rpc_xprt * cl_xprt;
+ struct rpc_procinfo * cl_procinfo;
+ u32 cl_maxproc;
+
+ char * cl_server;
+ char * cl_protname;
+ struct rpc_auth * cl_auth;
+ struct rpc_stat * cl_stats;
+ struct rpc_iostats * cl_metrics;
+
+ unsigned int cl_softrtry : 1,
+ cl_intr : 1,
+ cl_autobind : 1,
+ cl_oneshot : 1,
+ cl_dead : 1;
+
+ struct rpc_rtt * cl_rtt;
+ struct rpc_portmap * cl_pmap;
+
+ int cl_nodelen;
+ char cl_nodename[UNX_MAXNODENAME];
+ char cl_pathname[30];
+ struct vfsmount * cl_vfsmnt;
+ struct dentry * cl_dentry;
+ struct rpc_clnt * cl_parent;
+ struct rpc_rtt cl_rtt_default;
+ struct rpc_portmap cl_pmap_default;
+ char cl_inline_name[32];
+};
+#define cl_timeout cl_xprt->timeout
+#define cl_prog cl_pmap->pm_prog
+#define cl_vers cl_pmap->pm_vers
+#define cl_port cl_pmap->pm_port
+#define cl_prot cl_pmap->pm_prot
+
+#define RPC_MAXVERSION 4
+struct rpc_program {
+ char * name;
+ u32 number;
+ unsigned int nrvers;
+ struct rpc_version ** version;
+ struct rpc_stat * stats;
+ char * pipe_dir_name;
+};
+
+struct rpc_version {
+ u32 number;
+ unsigned int nrprocs;
+ struct rpc_procinfo * procs;
+};
+
+struct rpc_procinfo {
+ u32 p_proc;
+ kxdrproc_t p_encode;
+ kxdrproc_t p_decode;
+ unsigned int p_bufsiz;
+ unsigned int p_count;
+ unsigned int p_timer;
+ u32 p_statidx;
+ char * p_name;
+};
+
+#define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt))
+#define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/debug.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/debug.h
new file mode 100644
index 0000000..e2689f1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_DEBUG_H_
+#define _LINUX_SUNRPC_DEBUG_H_
+
+#define RPCDBG_XPRT 0x0001
+#define RPCDBG_CALL 0x0002
+#define RPCDBG_DEBUG 0x0004
+#define RPCDBG_NFS 0x0008
+#define RPCDBG_AUTH 0x0010
+#define RPCDBG_PMAP 0x0020
+#define RPCDBG_SCHED 0x0040
+#define RPCDBG_TRANS 0x0080
+#define RPCDBG_SVCSOCK 0x0100
+#define RPCDBG_SVCDSP 0x0200
+#define RPCDBG_MISC 0x0400
+#define RPCDBG_CACHE 0x0800
+#define RPCDBG_ALL 0x7fff
+
+#define CTL_SUNRPC 7249
+
+enum {
+ CTL_RPCDEBUG = 1,
+ CTL_NFSDEBUG,
+ CTL_NFSDDEBUG,
+ CTL_NLMDEBUG,
+ CTL_SLOTTABLE_UDP,
+ CTL_SLOTTABLE_TCP,
+ CTL_MIN_RESVPORT,
+ CTL_MAX_RESVPORT,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_api.h
new file mode 100644
index 0000000..cbc77c2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_API_H
+#define _LINUX_SUNRPC_GSS_API_H
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
new file mode 100644
index 0000000..8f18ba0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/sunrpc/gss_api.h>
+
+#define SIZEOF_INT 4
+
+#define G_BAD_SERVICE_NAME (-2045022976L)
+#define G_BAD_STRING_UID (-2045022975L)
+#define G_NOUSER (-2045022974L)
+#define G_VALIDATE_FAILED (-2045022973L)
+#define G_BUFFER_ALLOC (-2045022972L)
+#define G_BAD_MSG_CTX (-2045022971L)
+#define G_WRONG_SIZE (-2045022970L)
+#define G_BAD_USAGE (-2045022969L)
+#define G_UNKNOWN_QOP (-2045022968L)
+#define G_NO_HOSTNAME (-2045022967L)
+#define G_BAD_HOSTNAME (-2045022966L)
+#define G_WRONG_MECH (-2045022965L)
+#define G_BAD_TOK_HEADER (-2045022964L)
+#define G_BAD_DIRECTION (-2045022963L)
+#define G_TOK_TRUNC (-2045022962L)
+#define G_REFLECT (-2045022961L)
+#define G_WRONG_TOKID (-2045022960L)
+
+#define g_OID_equal(o1,o2) (((o1)->len == (o2)->len) && (memcmp((o1)->data,(o2)->data,(int) (o1)->len) == 0))
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_err.h
new file mode 100644
index 0000000..01fb1b4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_GSS_ERR_H
+#define _LINUX_SUNRPC_GSS_ERR_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/msg_prot.h
new file mode 100644
index 0000000..52f4e76
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_MSGPROT_H_
+#define _LINUX_SUNRPC_MSGPROT_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/sched.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/sched.h
new file mode 100644
index 0000000..859b2d8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1,182 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SCHED_H_
+#define _LINUX_SUNRPC_SCHED_H_
+
+#include <linux/timer.h>
+#include <linux/sunrpc/types.h>
+#include <linux/spinlock.h>
+#include <linux/wait.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/xdr.h>
+
+struct rpc_procinfo;
+struct rpc_message {
+ struct rpc_procinfo * rpc_proc;
+ void * rpc_argp;
+ void * rpc_resp;
+ struct rpc_cred * rpc_cred;
+};
+
+struct rpc_call_ops;
+struct rpc_wait_queue;
+struct rpc_wait {
+ struct list_head list;
+ struct list_head links;
+ struct rpc_wait_queue * rpc_waitq;
+};
+
+struct rpc_task {
+#ifdef RPC_DEBUG
+ unsigned long tk_magic;
+#endif
+ atomic_t tk_count;
+ struct list_head tk_task;
+ struct rpc_clnt * tk_client;
+ struct rpc_rqst * tk_rqstp;
+ int tk_status;
+
+ struct rpc_message tk_msg;
+ __u8 tk_garb_retry;
+ __u8 tk_cred_retry;
+
+ unsigned long tk_cookie;
+
+ void (*tk_timeout_fn)(struct rpc_task *);
+ void (*tk_callback)(struct rpc_task *);
+ void (*tk_action)(struct rpc_task *);
+ const struct rpc_call_ops *tk_ops;
+ void * tk_calldata;
+
+ struct timer_list tk_timer;
+ unsigned long tk_timeout;
+ unsigned short tk_flags;
+ unsigned char tk_priority : 2;
+ unsigned long tk_runstate;
+ struct workqueue_struct *tk_workqueue;
+ union {
+ struct work_struct tk_work;
+ struct rpc_wait tk_wait;
+ } u;
+
+ unsigned short tk_timeouts;
+ size_t tk_bytes_sent;
+ unsigned long tk_start;
+ long tk_rtt;
+
+#ifdef RPC_DEBUG
+ unsigned short tk_pid;
+#endif
+};
+#define tk_auth tk_client->cl_auth
+#define tk_xprt tk_client->cl_xprt
+
+#define task_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1)
+
+#define task_for_first(task, head) if (!list_empty(head) && ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1))
+
+#define alltask_for_each(task, pos, head) list_for_each(pos, head) if ((task=list_entry(pos, struct rpc_task, tk_task)),1)
+
+typedef void (*rpc_action)(struct rpc_task *);
+
+struct rpc_call_ops {
+ void (*rpc_call_prepare)(struct rpc_task *, void *);
+ void (*rpc_call_done)(struct rpc_task *, void *);
+ void (*rpc_release)(void *);
+};
+
+#define RPC_TASK_ASYNC 0x0001
+#define RPC_TASK_SWAPPER 0x0002
+#define RPC_TASK_CHILD 0x0008
+#define RPC_CALL_MAJORSEEN 0x0020
+#define RPC_TASK_ROOTCREDS 0x0040
+#define RPC_TASK_DYNAMIC 0x0080
+#define RPC_TASK_KILLED 0x0100
+#define RPC_TASK_SOFT 0x0200
+#define RPC_TASK_NOINTR 0x0400
+
+#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
+#define RPC_IS_CHILD(t) ((t)->tk_flags & RPC_TASK_CHILD)
+#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
+#define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
+#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
+#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
+#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
+#define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR)
+
+#define RPC_TASK_RUNNING 0
+#define RPC_TASK_QUEUED 1
+#define RPC_TASK_WAKEUP 2
+#define RPC_TASK_HAS_TIMER 3
+#define RPC_TASK_ACTIVE 4
+
+#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_test_and_set_running(t) (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
+#define rpc_clear_running(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
+#define rpc_clear_queued(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define rpc_start_wakeup(t) (test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0)
+#define rpc_finish_wakeup(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while (0)
+
+#define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
+#define rpc_clear_active(t) do { smp_mb__before_clear_bit(); clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); smp_mb__after_clear_bit(); } while(0)
+
+#define RPC_PRIORITY_LOW 0
+#define RPC_PRIORITY_NORMAL 1
+#define RPC_PRIORITY_HIGH 2
+#define RPC_NR_PRIORITY (RPC_PRIORITY_HIGH+1)
+
+struct rpc_wait_queue {
+ spinlock_t lock;
+ struct list_head tasks[RPC_NR_PRIORITY];
+ unsigned long cookie;
+ unsigned char maxpriority;
+ unsigned char priority;
+ unsigned char count;
+ unsigned char nr;
+ unsigned short qlen;
+#ifdef RPC_DEBUG
+ const char * name;
+#endif
+};
+
+#define RPC_BATCH_COUNT 16
+
+#ifndef RPC_DEBUG
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, }
+#else
+#define RPC_WAITQ_INIT(var,qname) { .lock = SPIN_LOCK_UNLOCKED, .tasks = { [0] = LIST_HEAD_INIT(var.tasks[0]), [1] = LIST_HEAD_INIT(var.tasks[1]), [2] = LIST_HEAD_INIT(var.tasks[2]), }, .name = qname, }
+#endif
+#define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var,qname)
+
+#define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
+
+struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
+ const struct rpc_call_ops *ops, void *data);
+struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent);
+
+struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
+
+#ifdef RPC_DEBUG
+
+#endif
+
+#ifdef RPC_DEBUG
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/stats.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/stats.h
new file mode 100644
index 0000000..03e7338
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_STATS_H
+#define _LINUX_SUNRPC_STATS_H
+
+#include <linux/proc_fs.h>
+
+struct rpc_stat {
+ struct rpc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn,
+ netreconn;
+ unsigned int rpccnt,
+ rpcretrans,
+ rpcauthrefresh,
+ rpcgarbage;
+};
+
+struct svc_stat {
+ struct svc_program * program;
+
+ unsigned int netcnt,
+ netudpcnt,
+ nettcpcnt,
+ nettcpconn;
+ unsigned int rpccnt,
+ rpcbadfmt,
+ rpcbadauth,
+ rpcbadclnt;
+};
+
+#ifdef MODULE
+
+#endif
+
+#define proc_net_rpc NULL
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svc.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svc.h
new file mode 100644
index 0000000..7a0cc2d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef SUNRPC_SVC_H
+#define SUNRPC_SVC_H
+
+#include <linux/in.h>
+#include <linux/sunrpc/types.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/svcauth.h>
+#include <linux/wait.h>
+#include <linux/mm.h>
+
+struct svc_serv {
+ struct list_head sv_threads;
+ struct list_head sv_sockets;
+ struct svc_program * sv_program;
+ struct svc_stat * sv_stats;
+ spinlock_t sv_lock;
+ unsigned int sv_nrthreads;
+ unsigned int sv_bufsz;
+ unsigned int sv_xdrsize;
+
+ struct list_head sv_permsocks;
+ struct list_head sv_tempsocks;
+ int sv_tmpcnt;
+
+ char * sv_name;
+};
+
+#define RPCSVC_MAXPAYLOAD (64*1024u)
+
+#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2)
+
+struct svc_program {
+ struct svc_program * pg_next;
+ u32 pg_prog;
+ unsigned int pg_lovers;
+ unsigned int pg_hivers;
+ unsigned int pg_nvers;
+ struct svc_version ** pg_vers;
+ char * pg_name;
+ char * pg_class;
+ struct svc_stat * pg_stats;
+ int (*pg_authenticate)(struct svc_rqst *);
+};
+
+struct svc_version {
+ u32 vs_vers;
+ u32 vs_nproc;
+ struct svc_procedure * vs_proc;
+ u32 vs_xdrsize;
+
+ int (*vs_dispatch)(struct svc_rqst *, u32 *);
+};
+
+typedef int (*svc_procfunc)(struct svc_rqst *, void *argp, void *resp);
+struct svc_procedure {
+ svc_procfunc pc_func;
+ kxdrproc_t pc_decode;
+ kxdrproc_t pc_encode;
+ kxdrproc_t pc_release;
+ unsigned int pc_argsize;
+ unsigned int pc_ressize;
+ unsigned int pc_count;
+ unsigned int pc_cachetype;
+ unsigned int pc_xdrressize;
+};
+
+typedef void (*svc_thread_fn)(struct svc_rqst *);
+
+struct svc_serv * svc_create(struct svc_program *, unsigned int);
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svcauth.h
new file mode 100644
index 0000000..9b414d7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_SVCAUTH_H_
+#define _LINUX_SUNRPC_SVCAUTH_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/timer.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/timer.h
new file mode 100644
index 0000000..8fb78e5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TIMER_H
+#define _LINUX_SUNRPC_TIMER_H
+
+#include <asm/atomic.h>
+
+struct rpc_rtt {
+ unsigned long timeo;
+ unsigned long srtt[5];
+ unsigned long sdrtt[5];
+ int ntimeouts[5];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/types.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/types.h
new file mode 100644
index 0000000..ce52052
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/types.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_TYPES_H_
+#define _LINUX_SUNRPC_TYPES_H_
+
+#include <linux/timer.h>
+#include <linux/workqueue.h>
+#include <linux/sunrpc/debug.h>
+#include <linux/list.h>
+
+#define signalled() (signal_pending(current))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xdr.h
new file mode 100644
index 0000000..d513843
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SUNRPC_XDR_H_
+#define _SUNRPC_XDR_H_
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xprt.h
new file mode 100644
index 0000000..145a26d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SUNRPC_XPRT_H
+#define _LINUX_SUNRPC_XPRT_H
+
+#include <linux/uio.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xdr.h>
+
+#define RPC_MIN_SLOT_TABLE (2U)
+#define RPC_DEF_SLOT_TABLE (16U)
+#define RPC_MAX_SLOT_TABLE (128U)
+
+#define RPC_CALLHDRSIZE 6
+#define RPC_REPHDRSIZE 4
+
+#define RPC_MIN_RESVPORT (1U)
+#define RPC_MAX_RESVPORT (65535U)
+#define RPC_DEF_MIN_RESVPORT (665U)
+#define RPC_DEF_MAX_RESVPORT (1023U)
+
+struct rpc_timeout {
+ unsigned long to_initval,
+ to_maxval,
+ to_increment;
+ unsigned int to_retries;
+ unsigned char to_exponential;
+};
+
+struct rpc_task;
+struct rpc_xprt;
+struct seq_file;
+
+struct rpc_rqst {
+
+ struct rpc_xprt * rq_xprt;
+ struct xdr_buf rq_snd_buf;
+ struct xdr_buf rq_rcv_buf;
+
+ struct rpc_task * rq_task;
+ __u32 rq_xid;
+ int rq_cong;
+ int rq_received;
+ u32 rq_seqno;
+ int rq_enc_pages_num;
+ struct page **rq_enc_pages;
+ void (*rq_release_snd_buf)(struct rpc_rqst *);
+ struct list_head rq_list;
+
+ __u32 * rq_buffer;
+ size_t rq_bufsize;
+
+ struct xdr_buf rq_private_buf;
+ unsigned long rq_majortimeo;
+ unsigned long rq_timeout;
+ unsigned int rq_retries;
+
+ u32 rq_bytes_sent;
+
+ unsigned long rq_xtime;
+ int rq_ntrans;
+};
+#define rq_svec rq_snd_buf.head
+#define rq_slen rq_snd_buf.len
+
+struct rpc_xprt_ops {
+ void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
+ int (*reserve_xprt)(struct rpc_task *task);
+ void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
+ void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
+ void (*connect)(struct rpc_task *task);
+ void * (*buf_alloc)(struct rpc_task *task, size_t size);
+ void (*buf_free)(struct rpc_task *task);
+ int (*send_request)(struct rpc_task *task);
+ void (*set_retrans_timeout)(struct rpc_task *task);
+ void (*timer)(struct rpc_task *task);
+ void (*release_request)(struct rpc_task *task);
+ void (*close)(struct rpc_xprt *xprt);
+ void (*destroy)(struct rpc_xprt *xprt);
+ void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
+};
+
+struct rpc_xprt {
+ struct rpc_xprt_ops * ops;
+ struct socket * sock;
+ struct sock * inet;
+
+ struct rpc_timeout timeout;
+ struct sockaddr_in addr;
+ int prot;
+
+ unsigned long cong;
+ unsigned long cwnd;
+
+ size_t rcvsize,
+ sndsize;
+
+ size_t max_payload;
+ unsigned int tsh_size;
+
+ struct rpc_wait_queue sending;
+ struct rpc_wait_queue resend;
+ struct rpc_wait_queue pending;
+ struct rpc_wait_queue backlog;
+ struct list_head free;
+ struct rpc_rqst * slot;
+ unsigned int max_reqs;
+ unsigned long state;
+ unsigned char shutdown : 1,
+ resvport : 1;
+
+ __u32 xid;
+
+ u32 tcp_recm,
+ tcp_xid,
+ tcp_reclen,
+ tcp_offset;
+ unsigned long tcp_copied,
+ tcp_flags;
+
+ unsigned long connect_timeout,
+ bind_timeout,
+ reestablish_timeout;
+ struct work_struct connect_worker;
+ unsigned short port;
+
+ struct work_struct task_cleanup;
+ struct timer_list timer;
+ unsigned long last_used,
+ idle_timeout;
+
+ spinlock_t transport_lock;
+ spinlock_t reserve_lock;
+ struct rpc_task * snd_task;
+
+ struct list_head recv;
+
+ struct {
+ unsigned long bind_count,
+ connect_count,
+ connect_start,
+ connect_time,
+ sends,
+ recvs,
+ bad_xids;
+
+ unsigned long long req_u,
+ bklog_u;
+ } stat;
+
+ void (*old_data_ready)(struct sock *, int);
+ void (*old_state_change)(struct sock *);
+ void (*old_write_space)(struct sock *);
+};
+
+#define XPRT_LAST_FRAG (1 << 0)
+#define XPRT_COPY_RECM (1 << 1)
+#define XPRT_COPY_XID (1 << 2)
+#define XPRT_COPY_DATA (1 << 3)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/swap.h b/6/platforms/android-3/arch-x86/usr/include/linux/swap.h
new file mode 100644
index 0000000..63ba556
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/swap.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SWAP_H
+#define _LINUX_SWAP_H
+
+#include <linux/spinlock.h>
+#include <linux/linkage.h>
+#include <linux/mmzone.h>
+#include <linux/list.h>
+#include <linux/sched.h>
+
+#include <asm/atomic.h>
+#include <asm/page.h>
+
+#define SWAP_FLAG_PREFER 0x8000
+#define SWAP_FLAG_PRIO_MASK 0x7fff
+#define SWAP_FLAG_PRIO_SHIFT 0
+
+#define MAX_SWAPFILES_SHIFT 5
+#define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT)
+
+typedef struct {
+ unsigned long val;
+} swp_entry_t;
+
+struct reclaim_state {
+ unsigned long reclaimed_slab;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sysctl.h b/6/platforms/android-3/arch-x86/usr/include/linux/sysctl.h
new file mode 100644
index 0000000..329e561
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sysctl.h
@@ -0,0 +1,824 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_SYSCTL_H
+#define _LINUX_SYSCTL_H
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+struct file;
+struct completion;
+
+#define CTL_MAXNAME 10
+
+struct __sysctl_args {
+ int __user *name;
+ int nlen;
+ void __user *oldval;
+ size_t __user *oldlenp;
+ void __user *newval;
+ size_t newlen;
+ unsigned long __unused[4];
+};
+
+enum
+{
+ CTL_KERN=1,
+ CTL_VM=2,
+ CTL_NET=3,
+
+ CTL_FS=5,
+ CTL_DEBUG=6,
+ CTL_DEV=7,
+ CTL_BUS=8,
+ CTL_ABI=9,
+ CTL_CPU=10
+};
+
+enum
+{
+ CTL_BUS_ISA=1
+};
+
+enum
+{
+ INOTIFY_MAX_USER_INSTANCES=1,
+ INOTIFY_MAX_USER_WATCHES=2,
+ INOTIFY_MAX_QUEUED_EVENTS=3
+};
+
+enum
+{
+ KERN_OSTYPE=1,
+ KERN_OSRELEASE=2,
+ KERN_OSREV=3,
+ KERN_VERSION=4,
+ KERN_SECUREMASK=5,
+ KERN_PROF=6,
+ KERN_NODENAME=7,
+ KERN_DOMAINNAME=8,
+
+ KERN_CAP_BSET=14,
+ KERN_PANIC=15,
+ KERN_REALROOTDEV=16,
+
+ KERN_SPARC_REBOOT=21,
+ KERN_CTLALTDEL=22,
+ KERN_PRINTK=23,
+ KERN_NAMETRANS=24,
+ KERN_PPC_HTABRECLAIM=25,
+ KERN_PPC_ZEROPAGED=26,
+ KERN_PPC_POWERSAVE_NAP=27,
+ KERN_MODPROBE=28,
+ KERN_SG_BIG_BUFF=29,
+ KERN_ACCT=30,
+ KERN_PPC_L2CR=31,
+
+ KERN_RTSIGNR=32,
+ KERN_RTSIGMAX=33,
+
+ KERN_SHMMAX=34,
+ KERN_MSGMAX=35,
+ KERN_MSGMNB=36,
+ KERN_MSGPOOL=37,
+ KERN_SYSRQ=38,
+ KERN_MAX_THREADS=39,
+ KERN_RANDOM=40,
+ KERN_SHMALL=41,
+ KERN_MSGMNI=42,
+ KERN_SEM=43,
+ KERN_SPARC_STOP_A=44,
+ KERN_SHMMNI=45,
+ KERN_OVERFLOWUID=46,
+ KERN_OVERFLOWGID=47,
+ KERN_SHMPATH=48,
+ KERN_HOTPLUG=49,
+ KERN_IEEE_EMULATION_WARNINGS=50,
+ KERN_S390_USER_DEBUG_LOGGING=51,
+ KERN_CORE_USES_PID=52,
+ KERN_TAINTED=53,
+ KERN_CADPID=54,
+ KERN_PIDMAX=55,
+ KERN_CORE_PATTERN=56,
+ KERN_PANIC_ON_OOPS=57,
+ KERN_HPPA_PWRSW=58,
+ KERN_HPPA_UNALIGNED=59,
+ KERN_PRINTK_RATELIMIT=60,
+ KERN_PRINTK_RATELIMIT_BURST=61,
+ KERN_PTY=62,
+ KERN_NGROUPS_MAX=63,
+ KERN_SPARC_SCONS_PWROFF=64,
+ KERN_HZ_TIMER=65,
+ KERN_UNKNOWN_NMI_PANIC=66,
+ KERN_BOOTLOADER_TYPE=67,
+ KERN_RANDOMIZE=68,
+ KERN_SETUID_DUMPABLE=69,
+ KERN_SPIN_RETRY=70,
+ KERN_ACPI_VIDEO_FLAGS=71,
+ KERN_IA64_UNALIGNED=72,
+ KERN_COMPAT_LOG=73,
+ KERN_MAX_LOCK_DEPTH=74,
+};
+
+enum
+{
+ VM_UNUSED1=1,
+ VM_UNUSED2=2,
+ VM_UNUSED3=3,
+ VM_UNUSED4=4,
+ VM_OVERCOMMIT_MEMORY=5,
+ VM_UNUSED5=6,
+ VM_UNUSED7=7,
+ VM_UNUSED8=8,
+ VM_UNUSED9=9,
+ VM_PAGE_CLUSTER=10,
+ VM_DIRTY_BACKGROUND=11,
+ VM_DIRTY_RATIO=12,
+ VM_DIRTY_WB_CS=13,
+ VM_DIRTY_EXPIRE_CS=14,
+ VM_NR_PDFLUSH_THREADS=15,
+ VM_OVERCOMMIT_RATIO=16,
+ VM_PAGEBUF=17,
+ VM_HUGETLB_PAGES=18,
+ VM_SWAPPINESS=19,
+ VM_LOWMEM_RESERVE_RATIO=20,
+ VM_MIN_FREE_KBYTES=21,
+ VM_MAX_MAP_COUNT=22,
+ VM_LAPTOP_MODE=23,
+ VM_BLOCK_DUMP=24,
+ VM_HUGETLB_GROUP=25,
+ VM_VFS_CACHE_PRESSURE=26,
+ VM_LEGACY_VA_LAYOUT=27,
+ VM_SWAP_TOKEN_TIMEOUT=28,
+ VM_DROP_PAGECACHE=29,
+ VM_PERCPU_PAGELIST_FRACTION=30,
+ VM_ZONE_RECLAIM_MODE=31,
+ VM_MIN_UNMAPPED=32,
+ VM_PANIC_ON_OOM=33,
+ VM_VDSO_ENABLED=34,
+};
+
+enum
+{
+ NET_CORE=1,
+ NET_ETHER=2,
+ NET_802=3,
+ NET_UNIX=4,
+ NET_IPV4=5,
+ NET_IPX=6,
+ NET_ATALK=7,
+ NET_NETROM=8,
+ NET_AX25=9,
+ NET_BRIDGE=10,
+ NET_ROSE=11,
+ NET_IPV6=12,
+ NET_X25=13,
+ NET_TR=14,
+ NET_DECNET=15,
+ NET_ECONET=16,
+ NET_SCTP=17,
+ NET_LLC=18,
+ NET_NETFILTER=19,
+ NET_DCCP=20,
+};
+
+enum
+{
+ RANDOM_POOLSIZE=1,
+ RANDOM_ENTROPY_COUNT=2,
+ RANDOM_READ_THRESH=3,
+ RANDOM_WRITE_THRESH=4,
+ RANDOM_BOOT_ID=5,
+ RANDOM_UUID=6
+};
+
+enum
+{
+ PTY_MAX=1,
+ PTY_NR=2
+};
+
+enum
+{
+ BUS_ISA_MEM_BASE=1,
+ BUS_ISA_PORT_BASE=2,
+ BUS_ISA_PORT_SHIFT=3
+};
+
+enum
+{
+ NET_CORE_WMEM_MAX=1,
+ NET_CORE_RMEM_MAX=2,
+ NET_CORE_WMEM_DEFAULT=3,
+ NET_CORE_RMEM_DEFAULT=4,
+
+ NET_CORE_MAX_BACKLOG=6,
+ NET_CORE_FASTROUTE=7,
+ NET_CORE_MSG_COST=8,
+ NET_CORE_MSG_BURST=9,
+ NET_CORE_OPTMEM_MAX=10,
+ NET_CORE_HOT_LIST_LENGTH=11,
+ NET_CORE_DIVERT_VERSION=12,
+ NET_CORE_NO_CONG_THRESH=13,
+ NET_CORE_NO_CONG=14,
+ NET_CORE_LO_CONG=15,
+ NET_CORE_MOD_CONG=16,
+ NET_CORE_DEV_WEIGHT=17,
+ NET_CORE_SOMAXCONN=18,
+ NET_CORE_BUDGET=19,
+ NET_CORE_AEVENT_ETIME=20,
+ NET_CORE_AEVENT_RSEQTH=21,
+};
+
+enum
+{
+ NET_UNIX_DESTROY_DELAY=1,
+ NET_UNIX_DELETE_DELAY=2,
+ NET_UNIX_MAX_DGRAM_QLEN=3,
+};
+
+enum
+{
+ NET_NF_CONNTRACK_MAX=1,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
+ NET_NF_CONNTRACK_UDP_TIMEOUT=10,
+ NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
+ NET_NF_CONNTRACK_ICMP_TIMEOUT=12,
+ NET_NF_CONNTRACK_GENERIC_TIMEOUT=13,
+ NET_NF_CONNTRACK_BUCKETS=14,
+ NET_NF_CONNTRACK_LOG_INVALID=15,
+ NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
+ NET_NF_CONNTRACK_TCP_LOOSE=17,
+ NET_NF_CONNTRACK_TCP_BE_LIBERAL=18,
+ NET_NF_CONNTRACK_TCP_MAX_RETRANS=19,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
+ NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
+ NET_NF_CONNTRACK_COUNT=27,
+ NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28,
+ NET_NF_CONNTRACK_FRAG6_TIMEOUT=29,
+ NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30,
+ NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31,
+ NET_NF_CONNTRACK_CHECKSUM=32,
+};
+
+enum
+{
+
+ NET_IPV4_FORWARD=8,
+ NET_IPV4_DYNADDR=9,
+
+ NET_IPV4_CONF=16,
+ NET_IPV4_NEIGH=17,
+ NET_IPV4_ROUTE=18,
+ NET_IPV4_FIB_HASH=19,
+ NET_IPV4_NETFILTER=20,
+
+ NET_IPV4_TCP_TIMESTAMPS=33,
+ NET_IPV4_TCP_WINDOW_SCALING=34,
+ NET_IPV4_TCP_SACK=35,
+ NET_IPV4_TCP_RETRANS_COLLAPSE=36,
+ NET_IPV4_DEFAULT_TTL=37,
+ NET_IPV4_AUTOCONFIG=38,
+ NET_IPV4_NO_PMTU_DISC=39,
+ NET_IPV4_TCP_SYN_RETRIES=40,
+ NET_IPV4_IPFRAG_HIGH_THRESH=41,
+ NET_IPV4_IPFRAG_LOW_THRESH=42,
+ NET_IPV4_IPFRAG_TIME=43,
+ NET_IPV4_TCP_MAX_KA_PROBES=44,
+ NET_IPV4_TCP_KEEPALIVE_TIME=45,
+ NET_IPV4_TCP_KEEPALIVE_PROBES=46,
+ NET_IPV4_TCP_RETRIES1=47,
+ NET_IPV4_TCP_RETRIES2=48,
+ NET_IPV4_TCP_FIN_TIMEOUT=49,
+ NET_IPV4_IP_MASQ_DEBUG=50,
+ NET_TCP_SYNCOOKIES=51,
+ NET_TCP_STDURG=52,
+ NET_TCP_RFC1337=53,
+ NET_TCP_SYN_TAILDROP=54,
+ NET_TCP_MAX_SYN_BACKLOG=55,
+ NET_IPV4_LOCAL_PORT_RANGE=56,
+ NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
+ NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
+ NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
+ NET_IPV4_ICMP_DESTUNREACH_RATE=60,
+ NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
+ NET_IPV4_ICMP_PARAMPROB_RATE=62,
+ NET_IPV4_ICMP_ECHOREPLY_RATE=63,
+ NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
+ NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
+ NET_TCP_TW_RECYCLE=66,
+ NET_IPV4_ALWAYS_DEFRAG=67,
+ NET_IPV4_TCP_KEEPALIVE_INTVL=68,
+ NET_IPV4_INET_PEER_THRESHOLD=69,
+ NET_IPV4_INET_PEER_MINTTL=70,
+ NET_IPV4_INET_PEER_MAXTTL=71,
+ NET_IPV4_INET_PEER_GC_MINTIME=72,
+ NET_IPV4_INET_PEER_GC_MAXTIME=73,
+ NET_TCP_ORPHAN_RETRIES=74,
+ NET_TCP_ABORT_ON_OVERFLOW=75,
+ NET_TCP_SYNACK_RETRIES=76,
+ NET_TCP_MAX_ORPHANS=77,
+ NET_TCP_MAX_TW_BUCKETS=78,
+ NET_TCP_FACK=79,
+ NET_TCP_REORDERING=80,
+ NET_TCP_ECN=81,
+ NET_TCP_DSACK=82,
+ NET_TCP_MEM=83,
+ NET_TCP_WMEM=84,
+ NET_TCP_RMEM=85,
+ NET_TCP_APP_WIN=86,
+ NET_TCP_ADV_WIN_SCALE=87,
+ NET_IPV4_NONLOCAL_BIND=88,
+ NET_IPV4_ICMP_RATELIMIT=89,
+ NET_IPV4_ICMP_RATEMASK=90,
+ NET_TCP_TW_REUSE=91,
+ NET_TCP_FRTO=92,
+ NET_TCP_LOW_LATENCY=93,
+ NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
+ NET_IPV4_IGMP_MAX_MSF=96,
+ NET_TCP_NO_METRICS_SAVE=97,
+ NET_TCP_DEFAULT_WIN_SCALE=105,
+ NET_TCP_MODERATE_RCVBUF=106,
+ NET_TCP_TSO_WIN_DIVISOR=107,
+ NET_TCP_BIC_BETA=108,
+ NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
+ NET_TCP_CONG_CONTROL=110,
+ NET_TCP_ABC=111,
+ NET_IPV4_IPFRAG_MAX_DIST=112,
+ NET_TCP_MTU_PROBING=113,
+ NET_TCP_BASE_MSS=114,
+ NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
+ NET_TCP_DMA_COPYBREAK=116,
+ NET_TCP_SLOW_START_AFTER_IDLE=117,
+};
+
+enum {
+ NET_IPV4_ROUTE_FLUSH=1,
+ NET_IPV4_ROUTE_MIN_DELAY=2,
+ NET_IPV4_ROUTE_MAX_DELAY=3,
+ NET_IPV4_ROUTE_GC_THRESH=4,
+ NET_IPV4_ROUTE_MAX_SIZE=5,
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
+ NET_IPV4_ROUTE_GC_TIMEOUT=7,
+ NET_IPV4_ROUTE_GC_INTERVAL=8,
+ NET_IPV4_ROUTE_REDIRECT_LOAD=9,
+ NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
+ NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
+ NET_IPV4_ROUTE_ERROR_COST=12,
+ NET_IPV4_ROUTE_ERROR_BURST=13,
+ NET_IPV4_ROUTE_GC_ELASTICITY=14,
+ NET_IPV4_ROUTE_MTU_EXPIRES=15,
+ NET_IPV4_ROUTE_MIN_PMTU=16,
+ NET_IPV4_ROUTE_MIN_ADVMSS=17,
+ NET_IPV4_ROUTE_SECRET_INTERVAL=18,
+ NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
+};
+
+enum
+{
+ NET_PROTO_CONF_ALL=-2,
+ NET_PROTO_CONF_DEFAULT=-3
+
+};
+
+enum
+{
+ NET_IPV4_CONF_FORWARDING=1,
+ NET_IPV4_CONF_MC_FORWARDING=2,
+ NET_IPV4_CONF_PROXY_ARP=3,
+ NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
+ NET_IPV4_CONF_SECURE_REDIRECTS=5,
+ NET_IPV4_CONF_SEND_REDIRECTS=6,
+ NET_IPV4_CONF_SHARED_MEDIA=7,
+ NET_IPV4_CONF_RP_FILTER=8,
+ NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
+ NET_IPV4_CONF_BOOTP_RELAY=10,
+ NET_IPV4_CONF_LOG_MARTIANS=11,
+ NET_IPV4_CONF_TAG=12,
+ NET_IPV4_CONF_ARPFILTER=13,
+ NET_IPV4_CONF_MEDIUM_ID=14,
+ NET_IPV4_CONF_NOXFRM=15,
+ NET_IPV4_CONF_NOPOLICY=16,
+ NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
+ NET_IPV4_CONF_ARP_ANNOUNCE=18,
+ NET_IPV4_CONF_ARP_IGNORE=19,
+ NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
+ NET_IPV4_CONF_ARP_ACCEPT=21,
+ __NET_IPV4_CONF_MAX
+};
+
+enum
+{
+ NET_IPV4_NF_CONNTRACK_MAX=1,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
+ NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10,
+ NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
+ NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
+ NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
+ NET_IPV4_NF_CONNTRACK_BUCKETS=14,
+ NET_IPV4_NF_CONNTRACK_LOG_INVALID=15,
+ NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
+ NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17,
+ NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18,
+ NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
+ NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
+ NET_IPV4_NF_CONNTRACK_COUNT=27,
+ NET_IPV4_NF_CONNTRACK_CHECKSUM=28,
+};
+
+enum {
+ NET_IPV6_CONF=16,
+ NET_IPV6_NEIGH=17,
+ NET_IPV6_ROUTE=18,
+ NET_IPV6_ICMP=19,
+ NET_IPV6_BINDV6ONLY=20,
+ NET_IPV6_IP6FRAG_HIGH_THRESH=21,
+ NET_IPV6_IP6FRAG_LOW_THRESH=22,
+ NET_IPV6_IP6FRAG_TIME=23,
+ NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
+ NET_IPV6_MLD_MAX_MSF=25,
+};
+
+enum {
+ NET_IPV6_ROUTE_FLUSH=1,
+ NET_IPV6_ROUTE_GC_THRESH=2,
+ NET_IPV6_ROUTE_MAX_SIZE=3,
+ NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
+ NET_IPV6_ROUTE_GC_TIMEOUT=5,
+ NET_IPV6_ROUTE_GC_INTERVAL=6,
+ NET_IPV6_ROUTE_GC_ELASTICITY=7,
+ NET_IPV6_ROUTE_MTU_EXPIRES=8,
+ NET_IPV6_ROUTE_MIN_ADVMSS=9,
+ NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10
+};
+
+enum {
+ NET_IPV6_FORWARDING=1,
+ NET_IPV6_HOP_LIMIT=2,
+ NET_IPV6_MTU=3,
+ NET_IPV6_ACCEPT_RA=4,
+ NET_IPV6_ACCEPT_REDIRECTS=5,
+ NET_IPV6_AUTOCONF=6,
+ NET_IPV6_DAD_TRANSMITS=7,
+ NET_IPV6_RTR_SOLICITS=8,
+ NET_IPV6_RTR_SOLICIT_INTERVAL=9,
+ NET_IPV6_RTR_SOLICIT_DELAY=10,
+ NET_IPV6_USE_TEMPADDR=11,
+ NET_IPV6_TEMP_VALID_LFT=12,
+ NET_IPV6_TEMP_PREFERED_LFT=13,
+ NET_IPV6_REGEN_MAX_RETRY=14,
+ NET_IPV6_MAX_DESYNC_FACTOR=15,
+ NET_IPV6_MAX_ADDRESSES=16,
+ NET_IPV6_FORCE_MLD_VERSION=17,
+ NET_IPV6_ACCEPT_RA_DEFRTR=18,
+ NET_IPV6_ACCEPT_RA_PINFO=19,
+ NET_IPV6_ACCEPT_RA_RTR_PREF=20,
+ NET_IPV6_RTR_PROBE_INTERVAL=21,
+ NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
+ __NET_IPV6_MAX
+};
+
+enum {
+ NET_IPV6_ICMP_RATELIMIT=1
+};
+
+enum {
+ NET_NEIGH_MCAST_SOLICIT=1,
+ NET_NEIGH_UCAST_SOLICIT=2,
+ NET_NEIGH_APP_SOLICIT=3,
+ NET_NEIGH_RETRANS_TIME=4,
+ NET_NEIGH_REACHABLE_TIME=5,
+ NET_NEIGH_DELAY_PROBE_TIME=6,
+ NET_NEIGH_GC_STALE_TIME=7,
+ NET_NEIGH_UNRES_QLEN=8,
+ NET_NEIGH_PROXY_QLEN=9,
+ NET_NEIGH_ANYCAST_DELAY=10,
+ NET_NEIGH_PROXY_DELAY=11,
+ NET_NEIGH_LOCKTIME=12,
+ NET_NEIGH_GC_INTERVAL=13,
+ NET_NEIGH_GC_THRESH1=14,
+ NET_NEIGH_GC_THRESH2=15,
+ NET_NEIGH_GC_THRESH3=16,
+ NET_NEIGH_RETRANS_TIME_MS=17,
+ NET_NEIGH_REACHABLE_TIME_MS=18,
+ __NET_NEIGH_MAX
+};
+
+enum {
+ NET_DCCP_DEFAULT=1,
+};
+
+enum {
+ NET_DCCP_DEFAULT_SEQ_WINDOW = 1,
+ NET_DCCP_DEFAULT_RX_CCID = 2,
+ NET_DCCP_DEFAULT_TX_CCID = 3,
+ NET_DCCP_DEFAULT_ACK_RATIO = 4,
+ NET_DCCP_DEFAULT_SEND_ACKVEC = 5,
+ NET_DCCP_DEFAULT_SEND_NDP = 6,
+};
+
+enum {
+ NET_IPX_PPROP_BROADCASTING=1,
+ NET_IPX_FORWARDING=2
+};
+
+enum {
+ NET_LLC2=1,
+ NET_LLC_STATION=2,
+};
+
+enum {
+ NET_LLC2_TIMEOUT=1,
+};
+
+enum {
+ NET_LLC_STATION_ACK_TIMEOUT=1,
+};
+
+enum {
+ NET_LLC2_ACK_TIMEOUT=1,
+ NET_LLC2_P_TIMEOUT=2,
+ NET_LLC2_REJ_TIMEOUT=3,
+ NET_LLC2_BUSY_TIMEOUT=4,
+};
+
+enum {
+ NET_ATALK_AARP_EXPIRY_TIME=1,
+ NET_ATALK_AARP_TICK_TIME=2,
+ NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
+ NET_ATALK_AARP_RESOLVE_TIME=4
+};
+
+enum {
+ NET_NETROM_DEFAULT_PATH_QUALITY=1,
+ NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
+ NET_NETROM_NETWORK_TTL_INITIALISER=3,
+ NET_NETROM_TRANSPORT_TIMEOUT=4,
+ NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
+ NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
+ NET_NETROM_TRANSPORT_BUSY_DELAY=7,
+ NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
+ NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
+ NET_NETROM_ROUTING_CONTROL=10,
+ NET_NETROM_LINK_FAILS_COUNT=11,
+ NET_NETROM_RESET=12
+};
+
+enum {
+ NET_AX25_IP_DEFAULT_MODE=1,
+ NET_AX25_DEFAULT_MODE=2,
+ NET_AX25_BACKOFF_TYPE=3,
+ NET_AX25_CONNECT_MODE=4,
+ NET_AX25_STANDARD_WINDOW=5,
+ NET_AX25_EXTENDED_WINDOW=6,
+ NET_AX25_T1_TIMEOUT=7,
+ NET_AX25_T2_TIMEOUT=8,
+ NET_AX25_T3_TIMEOUT=9,
+ NET_AX25_IDLE_TIMEOUT=10,
+ NET_AX25_N2=11,
+ NET_AX25_PACLEN=12,
+ NET_AX25_PROTOCOL=13,
+ NET_AX25_DAMA_SLAVE_TIMEOUT=14
+};
+
+enum {
+ NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
+ NET_ROSE_CALL_REQUEST_TIMEOUT=2,
+ NET_ROSE_RESET_REQUEST_TIMEOUT=3,
+ NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
+ NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
+ NET_ROSE_ROUTING_CONTROL=6,
+ NET_ROSE_LINK_FAIL_TIMEOUT=7,
+ NET_ROSE_MAX_VCS=8,
+ NET_ROSE_WINDOW_SIZE=9,
+ NET_ROSE_NO_ACTIVITY_TIMEOUT=10
+};
+
+enum {
+ NET_X25_RESTART_REQUEST_TIMEOUT=1,
+ NET_X25_CALL_REQUEST_TIMEOUT=2,
+ NET_X25_RESET_REQUEST_TIMEOUT=3,
+ NET_X25_CLEAR_REQUEST_TIMEOUT=4,
+ NET_X25_ACK_HOLD_BACK_TIMEOUT=5
+};
+
+enum
+{
+ NET_TR_RIF_TIMEOUT=1
+};
+
+enum {
+ NET_DECNET_NODE_TYPE = 1,
+ NET_DECNET_NODE_ADDRESS = 2,
+ NET_DECNET_NODE_NAME = 3,
+ NET_DECNET_DEFAULT_DEVICE = 4,
+ NET_DECNET_TIME_WAIT = 5,
+ NET_DECNET_DN_COUNT = 6,
+ NET_DECNET_DI_COUNT = 7,
+ NET_DECNET_DR_COUNT = 8,
+ NET_DECNET_DST_GC_INTERVAL = 9,
+ NET_DECNET_CONF = 10,
+ NET_DECNET_NO_FC_MAX_CWND = 11,
+ NET_DECNET_MEM = 12,
+ NET_DECNET_RMEM = 13,
+ NET_DECNET_WMEM = 14,
+ NET_DECNET_DEBUG_LEVEL = 255
+};
+
+enum {
+ NET_DECNET_CONF_LOOPBACK = -2,
+ NET_DECNET_CONF_DDCMP = -3,
+ NET_DECNET_CONF_PPP = -4,
+ NET_DECNET_CONF_X25 = -5,
+ NET_DECNET_CONF_GRE = -6,
+ NET_DECNET_CONF_ETHER = -7
+
+};
+
+enum {
+ NET_DECNET_CONF_DEV_PRIORITY = 1,
+ NET_DECNET_CONF_DEV_T1 = 2,
+ NET_DECNET_CONF_DEV_T2 = 3,
+ NET_DECNET_CONF_DEV_T3 = 4,
+ NET_DECNET_CONF_DEV_FORWARDING = 5,
+ NET_DECNET_CONF_DEV_BLKSIZE = 6,
+ NET_DECNET_CONF_DEV_STATE = 7
+};
+
+enum {
+ NET_SCTP_RTO_INITIAL = 1,
+ NET_SCTP_RTO_MIN = 2,
+ NET_SCTP_RTO_MAX = 3,
+ NET_SCTP_RTO_ALPHA = 4,
+ NET_SCTP_RTO_BETA = 5,
+ NET_SCTP_VALID_COOKIE_LIFE = 6,
+ NET_SCTP_ASSOCIATION_MAX_RETRANS = 7,
+ NET_SCTP_PATH_MAX_RETRANS = 8,
+ NET_SCTP_MAX_INIT_RETRANSMITS = 9,
+ NET_SCTP_HB_INTERVAL = 10,
+ NET_SCTP_PRESERVE_ENABLE = 11,
+ NET_SCTP_MAX_BURST = 12,
+ NET_SCTP_ADDIP_ENABLE = 13,
+ NET_SCTP_PRSCTP_ENABLE = 14,
+ NET_SCTP_SNDBUF_POLICY = 15,
+ NET_SCTP_SACK_TIMEOUT = 16,
+ NET_SCTP_RCVBUF_POLICY = 17,
+};
+
+enum {
+ NET_BRIDGE_NF_CALL_ARPTABLES = 1,
+ NET_BRIDGE_NF_CALL_IPTABLES = 2,
+ NET_BRIDGE_NF_CALL_IP6TABLES = 3,
+ NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
+};
+
+enum
+{
+ FS_NRINODE=1,
+ FS_STATINODE=2,
+ FS_MAXINODE=3,
+ FS_NRDQUOT=4,
+ FS_MAXDQUOT=5,
+ FS_NRFILE=6,
+ FS_MAXFILE=7,
+ FS_DENTRY=8,
+ FS_NRSUPER=9,
+ FS_MAXSUPER=10,
+ FS_OVERFLOWUID=11,
+ FS_OVERFLOWGID=12,
+ FS_LEASES=13,
+ FS_DIR_NOTIFY=14,
+ FS_LEASE_TIME=15,
+ FS_DQSTATS=16,
+ FS_XFS=17,
+ FS_AIO_NR=18,
+ FS_AIO_MAX_NR=19,
+ FS_INOTIFY=20,
+};
+
+enum {
+ FS_DQ_LOOKUPS = 1,
+ FS_DQ_DROPS = 2,
+ FS_DQ_READS = 3,
+ FS_DQ_WRITES = 4,
+ FS_DQ_CACHE_HITS = 5,
+ FS_DQ_ALLOCATED = 6,
+ FS_DQ_FREE = 7,
+ FS_DQ_SYNCS = 8,
+ FS_DQ_WARNINGS = 9,
+};
+
+enum {
+ DEV_CDROM=1,
+ DEV_HWMON=2,
+ DEV_PARPORT=3,
+ DEV_RAID=4,
+ DEV_MAC_HID=5,
+ DEV_SCSI=6,
+ DEV_IPMI=7,
+};
+
+enum {
+ DEV_CDROM_INFO=1,
+ DEV_CDROM_AUTOCLOSE=2,
+ DEV_CDROM_AUTOEJECT=3,
+ DEV_CDROM_DEBUG=4,
+ DEV_CDROM_LOCK=5,
+ DEV_CDROM_CHECK_MEDIA=6
+};
+
+enum {
+ DEV_PARPORT_DEFAULT=-3
+};
+
+enum {
+ DEV_RAID_SPEED_LIMIT_MIN=1,
+ DEV_RAID_SPEED_LIMIT_MAX=2
+};
+
+enum {
+ DEV_PARPORT_DEFAULT_TIMESLICE=1,
+ DEV_PARPORT_DEFAULT_SPINTIME=2
+};
+
+enum {
+ DEV_PARPORT_SPINTIME=1,
+ DEV_PARPORT_BASE_ADDR=2,
+ DEV_PARPORT_IRQ=3,
+ DEV_PARPORT_DMA=4,
+ DEV_PARPORT_MODES=5,
+ DEV_PARPORT_DEVICES=6,
+ DEV_PARPORT_AUTOPROBE=16
+};
+
+enum {
+ DEV_PARPORT_DEVICES_ACTIVE=-3,
+};
+
+enum {
+ DEV_PARPORT_DEVICE_TIMESLICE=1,
+};
+
+enum {
+ DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1,
+ DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2,
+ DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3,
+ DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4,
+ DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5,
+ DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6
+};
+
+enum {
+ DEV_SCSI_LOGGING_LEVEL=1,
+};
+
+enum {
+ DEV_IPMI_POWEROFF_POWERCYCLE=1,
+};
+
+enum
+{
+ ABI_DEFHANDLER_COFF=1,
+ ABI_DEFHANDLER_ELF=2,
+ ABI_DEFHANDLER_LCALL7=3,
+ ABI_DEFHANDLER_LIBCSO=4,
+ ABI_TRACE=5,
+ ABI_FAKE_UTSNAME=6,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sysdev.h b/6/platforms/android-3/arch-x86/usr/include/linux/sysdev.h
new file mode 100644
index 0000000..6ae2b26
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sysdev.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SYSDEV_H_
+#define _SYSDEV_H_
+
+#include <linux/kobject.h>
+#include <linux/pm.h>
+
+struct sys_device;
+
+struct sysdev_class {
+ struct list_head drivers;
+
+ int (*shutdown)(struct sys_device *);
+ int (*suspend)(struct sys_device *, pm_message_t state);
+ int (*resume)(struct sys_device *);
+ struct kset kset;
+};
+
+struct sysdev_class_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct sysdev_class *, char *);
+ ssize_t (*store)(struct sysdev_class *, const char *, size_t);
+};
+
+#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) struct sysdev_class_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
+
+struct sysdev_driver {
+ struct list_head entry;
+ int (*add)(struct sys_device *);
+ int (*remove)(struct sys_device *);
+ int (*shutdown)(struct sys_device *);
+ int (*suspend)(struct sys_device *, pm_message_t state);
+ int (*resume)(struct sys_device *);
+};
+
+struct sys_device {
+ u32 id;
+ struct sysdev_class * cls;
+ struct kobject kobj;
+};
+
+struct sysdev_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct sys_device *, char *);
+ ssize_t (*store)(struct sys_device *, const char *, size_t);
+};
+
+#define SYSDEV_ATTR(_name,_mode,_show,_store) struct sysdev_attribute attr_##_name = { .attr = {.name = __stringify(_name), .mode = _mode }, .show = _show, .store = _store, };
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/sysfs.h b/6/platforms/android-3/arch-x86/usr/include/linux/sysfs.h
new file mode 100644
index 0000000..00b5f5a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/sysfs.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _SYSFS_H_
+#define _SYSFS_H_
+
+#include <asm/atomic.h>
+
+struct kobject;
+struct module;
+
+struct attribute {
+ const char * name;
+ struct module * owner;
+ mode_t mode;
+};
+
+struct attribute_group {
+ const char * name;
+ struct attribute ** attrs;
+};
+
+#define __ATTR(_name,_mode,_show,_store) { .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, .show = _show, .store = _store, }
+
+#define __ATTR_RO(_name) { .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, .show = _name##_show, }
+
+#define __ATTR_NULL { .attr = { .name = NULL } }
+
+#define attr_name(_attr) (_attr).attr.name
+
+struct vm_area_struct;
+
+struct bin_attribute {
+ struct attribute attr;
+ size_t size;
+ void *private;
+ ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
+ ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
+ int (*mmap)(struct kobject *, struct bin_attribute *attr,
+ struct vm_area_struct *vma);
+};
+
+struct sysfs_ops {
+ ssize_t (*show)(struct kobject *, struct attribute *,char *);
+ ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
+};
+
+struct sysfs_dirent {
+ atomic_t s_count;
+ struct list_head s_sibling;
+ struct list_head s_children;
+ void * s_element;
+ int s_type;
+ umode_t s_mode;
+ struct dentry * s_dentry;
+ struct iattr * s_iattr;
+ atomic_t s_event;
+};
+
+#define SYSFS_ROOT 0x0001
+#define SYSFS_DIR 0x0002
+#define SYSFS_KOBJ_ATTR 0x0004
+#define SYSFS_KOBJ_BIN_ATTR 0x0008
+#define SYSFS_KOBJ_DEVICE 0x0010
+#define SYSFS_KOBJ_LINK 0x0020
+#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_DEVICE | SYSFS_KOBJ_LINK)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/taskstats.h b/6/platforms/android-3/arch-x86/usr/include/linux/taskstats.h
new file mode 100644
index 0000000..3e8ae4a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/taskstats.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TASKSTATS_H
+#define _LINUX_TASKSTATS_H
+
+#define TASKSTATS_VERSION 1
+
+struct taskstats {
+
+ __u16 version;
+ __u16 padding[3];
+
+ __u64 cpu_count;
+ __u64 cpu_delay_total;
+
+ __u64 blkio_count;
+ __u64 blkio_delay_total;
+
+ __u64 swapin_count;
+ __u64 swapin_delay_total;
+
+ __u64 cpu_run_real_total;
+
+ __u64 cpu_run_virtual_total;
+
+};
+
+enum {
+ TASKSTATS_CMD_UNSPEC = 0,
+ TASKSTATS_CMD_GET,
+ TASKSTATS_CMD_NEW,
+ __TASKSTATS_CMD_MAX,
+};
+
+#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1)
+
+enum {
+ TASKSTATS_TYPE_UNSPEC = 0,
+ TASKSTATS_TYPE_PID,
+ TASKSTATS_TYPE_TGID,
+ TASKSTATS_TYPE_STATS,
+ TASKSTATS_TYPE_AGGR_PID,
+ TASKSTATS_TYPE_AGGR_TGID,
+ __TASKSTATS_TYPE_MAX,
+};
+
+#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1)
+
+enum {
+ TASKSTATS_CMD_ATTR_UNSPEC = 0,
+ TASKSTATS_CMD_ATTR_PID,
+ TASKSTATS_CMD_ATTR_TGID,
+ TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
+ TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
+ __TASKSTATS_CMD_ATTR_MAX,
+};
+
+#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1)
+
+#define TASKSTATS_GENL_NAME "TASKSTATS"
+#define TASKSTATS_GENL_VERSION 0x1
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/taskstats_kern.h b/6/platforms/android-3/arch-x86/usr/include/linux/taskstats_kern.h
new file mode 100644
index 0000000..4948410
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/taskstats_kern.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TASKSTATS_KERN_H
+#define _LINUX_TASKSTATS_KERN_H
+
+#include <linux/taskstats.h>
+#include <linux/sched.h>
+#include <net/genetlink.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/tcp.h b/6/platforms/android-3/arch-x86/usr/include/linux/tcp.h
new file mode 100644
index 0000000..3fa95f8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/tcp.h
@@ -0,0 +1,147 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TCP_H
+#define _LINUX_TCP_H
+
+#include <linux/types.h>
+#include <asm/byteorder.h>
+
+struct tcphdr {
+ __u16 source;
+ __u16 dest;
+ __u32 seq;
+ __u32 ack_seq;
+#ifdef __LITTLE_ENDIAN_BITFIELD
+ __u16 res1:4,
+ doff:4,
+ fin:1,
+ syn:1,
+ rst:1,
+ psh:1,
+ ack:1,
+ urg:1,
+ ece:1,
+ cwr:1;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+ __u16 doff:4,
+ res1:4,
+ cwr:1,
+ ece:1,
+ urg:1,
+ ack:1,
+ psh:1,
+ rst:1,
+ syn:1,
+ fin:1;
+#else
+#error "Adjust your <asm/byteorder.h> defines"
+#endif
+ __u16 window;
+ __u16 check;
+ __u16 urg_ptr;
+};
+
+union tcp_word_hdr {
+ struct tcphdr hdr;
+ __u32 words[5];
+};
+
+#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
+
+enum {
+ TCP_FLAG_CWR = __constant_htonl(0x00800000),
+ TCP_FLAG_ECE = __constant_htonl(0x00400000),
+ TCP_FLAG_URG = __constant_htonl(0x00200000),
+ TCP_FLAG_ACK = __constant_htonl(0x00100000),
+ TCP_FLAG_PSH = __constant_htonl(0x00080000),
+ TCP_FLAG_RST = __constant_htonl(0x00040000),
+ TCP_FLAG_SYN = __constant_htonl(0x00020000),
+ TCP_FLAG_FIN = __constant_htonl(0x00010000),
+ TCP_RESERVED_BITS = __constant_htonl(0x0F000000),
+ TCP_DATA_OFFSET = __constant_htonl(0xF0000000)
+};
+
+#define TCP_NODELAY 1
+#define TCP_MAXSEG 2
+#define TCP_CORK 3
+#define TCP_KEEPIDLE 4
+#define TCP_KEEPINTVL 5
+#define TCP_KEEPCNT 6
+#define TCP_SYNCNT 7
+#define TCP_LINGER2 8
+#define TCP_DEFER_ACCEPT 9
+#define TCP_WINDOW_CLAMP 10
+#define TCP_INFO 11
+#define TCP_QUICKACK 12
+#define TCP_CONGESTION 13
+
+#define TCPI_OPT_TIMESTAMPS 1
+#define TCPI_OPT_SACK 2
+#define TCPI_OPT_WSCALE 4
+#define TCPI_OPT_ECN 8
+
+enum tcp_ca_state
+{
+ TCP_CA_Open = 0,
+#define TCPF_CA_Open (1<<TCP_CA_Open)
+ TCP_CA_Disorder = 1,
+#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
+ TCP_CA_CWR = 2,
+#define TCPF_CA_CWR (1<<TCP_CA_CWR)
+ TCP_CA_Recovery = 3,
+#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
+ TCP_CA_Loss = 4
+#define TCPF_CA_Loss (1<<TCP_CA_Loss)
+};
+
+struct tcp_info
+{
+ __u8 tcpi_state;
+ __u8 tcpi_ca_state;
+ __u8 tcpi_retransmits;
+ __u8 tcpi_probes;
+ __u8 tcpi_backoff;
+ __u8 tcpi_options;
+ __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
+
+ __u32 tcpi_rto;
+ __u32 tcpi_ato;
+ __u32 tcpi_snd_mss;
+ __u32 tcpi_rcv_mss;
+
+ __u32 tcpi_unacked;
+ __u32 tcpi_sacked;
+ __u32 tcpi_lost;
+ __u32 tcpi_retrans;
+ __u32 tcpi_fackets;
+
+ __u32 tcpi_last_data_sent;
+ __u32 tcpi_last_ack_sent;
+ __u32 tcpi_last_data_recv;
+ __u32 tcpi_last_ack_recv;
+
+ __u32 tcpi_pmtu;
+ __u32 tcpi_rcv_ssthresh;
+ __u32 tcpi_rtt;
+ __u32 tcpi_rttvar;
+ __u32 tcpi_snd_ssthresh;
+ __u32 tcpi_snd_cwnd;
+ __u32 tcpi_advmss;
+ __u32 tcpi_reordering;
+
+ __u32 tcpi_rcv_rtt;
+ __u32 tcpi_rcv_space;
+
+ __u32 tcpi_total_retrans;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/telephony.h b/6/platforms/android-3/arch-x86/usr/include/linux/telephony.h
new file mode 100644
index 0000000..0c1d83d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/telephony.h
@@ -0,0 +1,172 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef TELEPHONY_H
+#define TELEPHONY_H
+
+#define TELEPHONY_VERSION 3013
+
+#define PHONE_VENDOR_IXJ 1
+#define PHONE_VENDOR_QUICKNET PHONE_VENDOR_IXJ
+#define PHONE_VENDOR_VOICETRONIX 2
+#define PHONE_VENDOR_ACULAB 3
+#define PHONE_VENDOR_DIGI 4
+#define PHONE_VENDOR_FRANKLIN 5
+
+#define QTI_PHONEJACK 100
+#define QTI_LINEJACK 300
+#define QTI_PHONEJACK_LITE 400
+#define QTI_PHONEJACK_PCI 500
+#define QTI_PHONECARD 600
+
+typedef enum {
+ vendor = 0,
+ device,
+ port,
+ codec,
+ dsp
+} phone_cap;
+
+struct phone_capability {
+ char desc[80];
+ phone_cap captype;
+ int cap;
+ int handle;
+};
+
+typedef enum {
+ pots = 0,
+ pstn,
+ handset,
+ speaker
+} phone_ports;
+
+#define PHONE_CAPABILITIES _IO ('q', 0x80)
+#define PHONE_CAPABILITIES_LIST _IOR ('q', 0x81, struct phone_capability *)
+#define PHONE_CAPABILITIES_CHECK _IOW ('q', 0x82, struct phone_capability *)
+
+typedef struct {
+ char month[3];
+ char day[3];
+ char hour[3];
+ char min[3];
+ int numlen;
+ char number[11];
+ int namelen;
+ char name[80];
+} PHONE_CID;
+
+#define PHONE_RING _IO ('q', 0x83)
+#define PHONE_HOOKSTATE _IO ('q', 0x84)
+#define PHONE_MAXRINGS _IOW ('q', 0x85, char)
+#define PHONE_RING_CADENCE _IOW ('q', 0x86, short)
+#define OLD_PHONE_RING_START _IO ('q', 0x87)
+#define PHONE_RING_START _IOW ('q', 0x87, PHONE_CID *)
+#define PHONE_RING_STOP _IO ('q', 0x88)
+
+#define USA_RING_CADENCE 0xC0C0
+
+#define PHONE_REC_CODEC _IOW ('q', 0x89, int)
+#define PHONE_REC_START _IO ('q', 0x8A)
+#define PHONE_REC_STOP _IO ('q', 0x8B)
+#define PHONE_REC_DEPTH _IOW ('q', 0x8C, int)
+#define PHONE_FRAME _IOW ('q', 0x8D, int)
+#define PHONE_REC_VOLUME _IOW ('q', 0x8E, int)
+#define PHONE_REC_VOLUME_LINEAR _IOW ('q', 0xDB, int)
+#define PHONE_REC_LEVEL _IO ('q', 0x8F)
+
+#define PHONE_PLAY_CODEC _IOW ('q', 0x90, int)
+#define PHONE_PLAY_START _IO ('q', 0x91)
+#define PHONE_PLAY_STOP _IO ('q', 0x92)
+#define PHONE_PLAY_DEPTH _IOW ('q', 0x93, int)
+#define PHONE_PLAY_VOLUME _IOW ('q', 0x94, int)
+#define PHONE_PLAY_VOLUME_LINEAR _IOW ('q', 0xDC, int)
+#define PHONE_PLAY_LEVEL _IO ('q', 0x95)
+#define PHONE_DTMF_READY _IOR ('q', 0x96, int)
+#define PHONE_GET_DTMF _IOR ('q', 0x97, int)
+#define PHONE_GET_DTMF_ASCII _IOR ('q', 0x98, int)
+#define PHONE_DTMF_OOB _IOW ('q', 0x99, int)
+#define PHONE_EXCEPTION _IOR ('q', 0x9A, int)
+#define PHONE_PLAY_TONE _IOW ('q', 0x9B, char)
+#define PHONE_SET_TONE_ON_TIME _IOW ('q', 0x9C, int)
+#define PHONE_SET_TONE_OFF_TIME _IOW ('q', 0x9D, int)
+#define PHONE_GET_TONE_ON_TIME _IO ('q', 0x9E)
+#define PHONE_GET_TONE_OFF_TIME _IO ('q', 0x9F)
+#define PHONE_GET_TONE_STATE _IO ('q', 0xA0)
+#define PHONE_BUSY _IO ('q', 0xA1)
+#define PHONE_RINGBACK _IO ('q', 0xA2)
+#define PHONE_DIALTONE _IO ('q', 0xA3)
+#define PHONE_CPT_STOP _IO ('q', 0xA4)
+
+#define PHONE_PSTN_SET_STATE _IOW ('q', 0xA4, int)
+#define PHONE_PSTN_GET_STATE _IO ('q', 0xA5)
+
+#define PSTN_ON_HOOK 0
+#define PSTN_RINGING 1
+#define PSTN_OFF_HOOK 2
+#define PSTN_PULSE_DIAL 3
+
+#define PHONE_WINK_DURATION _IOW ('q', 0xA6, int)
+#define PHONE_WINK _IOW ('q', 0xAA, int)
+
+typedef enum {
+ G723_63 = 1,
+ G723_53 = 2,
+ TS85 = 3,
+ TS48 = 4,
+ TS41 = 5,
+ G728 = 6,
+ G729 = 7,
+ ULAW = 8,
+ ALAW = 9,
+ LINEAR16 = 10,
+ LINEAR8 = 11,
+ WSS = 12,
+ G729B = 13
+} phone_codec;
+
+struct phone_codec_data
+{
+ phone_codec type;
+ unsigned short buf_min, buf_opt, buf_max;
+};
+
+#define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *)
+#define PHONE_PSTN_LINETEST _IO ('q', 0xA8)
+
+#define PHONE_VAD _IOW ('q', 0xA9, int)
+
+struct phone_except
+{
+ unsigned int dtmf_ready:1;
+ unsigned int hookstate:1;
+ unsigned int pstn_ring:1;
+ unsigned int caller_id:1;
+ unsigned int pstn_wink:1;
+ unsigned int f0:1;
+ unsigned int f1:1;
+ unsigned int f2:1;
+ unsigned int f3:1;
+ unsigned int flash:1;
+ unsigned int fc0:1;
+ unsigned int fc1:1;
+ unsigned int fc2:1;
+ unsigned int fc3:1;
+ unsigned int reserved:18;
+};
+
+union telephony_exception {
+ struct phone_except bits;
+ unsigned int bytes;
+};
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/termios.h b/6/platforms/android-3/arch-x86/usr/include/linux/termios.h
new file mode 100644
index 0000000..e28439d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/termios.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TERMIOS_H
+#define _LINUX_TERMIOS_H
+
+#include <linux/types.h>
+#include <asm/termios.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/textsearch.h b/6/platforms/android-3/arch-x86/usr/include/linux/textsearch.h
new file mode 100644
index 0000000..a921cdd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/textsearch.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_TEXTSEARCH_H
+#define __LINUX_TEXTSEARCH_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/thread_info.h b/6/platforms/android-3/arch-x86/usr/include/linux/thread_info.h
new file mode 100644
index 0000000..074a1f9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/thread_info.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_THREAD_INFO_H
+#define _LINUX_THREAD_INFO_H
+
+struct restart_block {
+ long (*fn)(struct restart_block *);
+ unsigned long arg0, arg1, arg2, arg3;
+};
+
+#include <linux/bitops.h>
+#include <asm/thread_info.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/threads.h b/6/platforms/android-3/arch-x86/usr/include/linux/threads.h
new file mode 100644
index 0000000..5d85878
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/threads.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_THREADS_H
+#define _LINUX_THREADS_H
+
+#define NR_CPUS 1
+
+#define MIN_THREADS_LEFT_FOR_ROOT 4
+
+#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
+
+#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/time.h b/6/platforms/android-3/arch-x86/usr/include/linux/time.h
new file mode 100644
index 0000000..3e6e440
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/time.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIME_H
+#define _LINUX_TIME_H
+
+#include <linux/types.h>
+
+#ifndef _STRUCT_TIMESPEC
+#define _STRUCT_TIMESPEC
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+
+struct timeval {
+ time_t tv_sec;
+ suseconds_t tv_usec;
+};
+
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+
+#define NFDBITS __NFDBITS
+
+#define FD_SETSIZE __FD_SETSIZE
+#define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
+#define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
+#define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
+#define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
+
+#define ITIMER_REAL 0
+#define ITIMER_VIRTUAL 1
+#define ITIMER_PROF 2
+
+struct itimerspec {
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+
+struct itimerval {
+ struct timeval it_interval;
+ struct timeval it_value;
+};
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+
+#define CLOCK_SGI_CYCLE 10
+#define MAX_CLOCKS 16
+#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
+#define CLOCKS_MONO CLOCK_MONOTONIC
+
+#define TIMER_ABSTIME 0x01
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/timer.h b/6/platforms/android-3/arch-x86/usr/include/linux/timer.h
new file mode 100644
index 0000000..071a759
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/timer.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMER_H
+#define _LINUX_TIMER_H
+
+#include <linux/list.h>
+#include <linux/spinlock.h>
+#include <linux/stddef.h>
+
+struct tvec_t_base_s;
+
+struct timer_list {
+ struct list_head entry;
+ unsigned long expires;
+
+ void (*function)(unsigned long);
+ unsigned long data;
+
+ struct tvec_t_base_s *base;
+};
+
+#define TIMER_INITIALIZER(_function, _expires, _data) { .function = (_function), .expires = (_expires), .data = (_data), .base = &boot_tvec_bases, }
+
+#define DEFINE_TIMER(_name, _function, _expires, _data) struct timer_list _name = TIMER_INITIALIZER(_function, _expires, _data)
+
+#define try_to_del_timer_sync(t) del_timer(t)
+#define del_timer_sync(t) del_timer(t)
+#define del_singleshot_timer_sync(t) del_timer_sync(t)
+
+struct hrtimer;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/times.h b/6/platforms/android-3/arch-x86/usr/include/linux/times.h
new file mode 100644
index 0000000..4ae415c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/times.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMES_H
+#define _LINUX_TIMES_H
+
+#include <linux/types.h>
+
+struct tms {
+ clock_t tms_utime;
+ clock_t tms_stime;
+ clock_t tms_cutime;
+ clock_t tms_cstime;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/timex.h b/6/platforms/android-3/arch-x86/usr/include/linux/timex.h
new file mode 100644
index 0000000..342470b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/timex.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIMEX_H
+#define _LINUX_TIMEX_H
+
+#include <linux/compiler.h>
+#include <linux/time.h>
+
+#include <asm/param.h>
+
+#define SHIFT_KG 6
+#define SHIFT_KF 16
+#define SHIFT_KH 2
+#define MAXTC 6
+
+#define SHIFT_SCALE 22
+#define SHIFT_UPDATE (SHIFT_KG + MAXTC)
+#define SHIFT_USEC 16
+#define FINENSEC (1L << (SHIFT_SCALE - 10))
+
+#define MAXPHASE 512000L
+#define MAXFREQ (512L << SHIFT_USEC)
+#define MINSEC 16L
+#define MAXSEC 1200L
+#define NTP_PHASE_LIMIT (MAXPHASE << 5)
+
+struct timex {
+ unsigned int modes;
+ long offset;
+ long freq;
+ long maxerror;
+ long esterror;
+ int status;
+ long constant;
+ long precision;
+ long tolerance;
+ struct timeval time;
+ long tick;
+
+ long ppsfreq;
+ long jitter;
+ int shift;
+ long stabil;
+ long jitcnt;
+ long calcnt;
+ long errcnt;
+ long stbcnt;
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+};
+
+#define ADJ_OFFSET 0x0001
+#define ADJ_FREQUENCY 0x0002
+#define ADJ_MAXERROR 0x0004
+#define ADJ_ESTERROR 0x0008
+#define ADJ_STATUS 0x0010
+#define ADJ_TIMECONST 0x0020
+#define ADJ_TICK 0x4000
+#define ADJ_OFFSET_SINGLESHOT 0x8001
+
+#define MOD_OFFSET ADJ_OFFSET
+#define MOD_FREQUENCY ADJ_FREQUENCY
+#define MOD_MAXERROR ADJ_MAXERROR
+#define MOD_ESTERROR ADJ_ESTERROR
+#define MOD_STATUS ADJ_STATUS
+#define MOD_TIMECONST ADJ_TIMECONST
+#define MOD_CLKB ADJ_TICK
+#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
+
+#define STA_PLL 0x0001
+#define STA_PPSFREQ 0x0002
+#define STA_PPSTIME 0x0004
+#define STA_FLL 0x0008
+
+#define STA_INS 0x0010
+#define STA_DEL 0x0020
+#define STA_UNSYNC 0x0040
+#define STA_FREQHOLD 0x0080
+
+#define STA_PPSSIGNAL 0x0100
+#define STA_PPSJITTER 0x0200
+#define STA_PPSWANDER 0x0400
+#define STA_PPSERROR 0x0800
+
+#define STA_CLOCKERR 0x1000
+
+#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR)
+
+#define TIME_OK 0
+#define TIME_INS 1
+#define TIME_DEL 2
+#define TIME_OOP 3
+#define TIME_WAIT 4
+#define TIME_ERROR 5
+#define TIME_BAD TIME_ERROR
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/tiocl.h b/6/platforms/android-3/arch-x86/usr/include/linux/tiocl.h
new file mode 100644
index 0000000..db15a8d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/tiocl.h
@@ -0,0 +1,47 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TIOCL_H
+#define _LINUX_TIOCL_H
+
+#define TIOCL_SETSEL 2
+#define TIOCL_SELCHAR 0
+#define TIOCL_SELWORD 1
+#define TIOCL_SELLINE 2
+#define TIOCL_SELPOINTER 3
+#define TIOCL_SELCLEAR 4
+#define TIOCL_SELMOUSEREPORT 16
+#define TIOCL_SELBUTTONMASK 15
+
+struct tiocl_selection {
+ unsigned short xs;
+ unsigned short ys;
+ unsigned short xe;
+ unsigned short ye;
+ unsigned short sel_mode;
+};
+
+#define TIOCL_PASTESEL 3
+#define TIOCL_UNBLANKSCREEN 4
+
+#define TIOCL_SELLOADLUT 5
+
+#define TIOCL_GETSHIFTSTATE 6
+#define TIOCL_GETMOUSEREPORTING 7
+#define TIOCL_SETVESABLANK 10
+#define TIOCL_SETKMSGREDIRECT 11
+#define TIOCL_GETFGCONSOLE 12
+#define TIOCL_SCROLLCONSOLE 13
+#define TIOCL_BLANKSCREEN 14
+#define TIOCL_BLANKEDSCREEN 15
+#define TIOCL_GETKMSGREDIRECT 17
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/transport_class.h b/6/platforms/android-3/arch-x86/usr/include/linux/transport_class.h
new file mode 100644
index 0000000..71ad084
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/transport_class.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _TRANSPORT_CLASS_H_
+#define _TRANSPORT_CLASS_H_
+
+#include <linux/device.h>
+#include <linux/attribute_container.h>
+
+struct transport_container;
+
+struct transport_class {
+ struct class class;
+ int (*setup)(struct transport_container *, struct device *,
+ struct class_device *);
+ int (*configure)(struct transport_container *, struct device *,
+ struct class_device *);
+ int (*remove)(struct transport_container *, struct device *,
+ struct class_device *);
+};
+
+#define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) struct transport_class cls = { .class = { .name = nm, }, .setup = su, .remove = rm, .configure = cfg, }
+
+struct anon_transport_class {
+ struct transport_class tclass;
+ struct attribute_container container;
+};
+
+#define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) struct anon_transport_class cls = { .tclass = { .configure = cfg, }, . container = { .match = mtch, }, }
+
+#define class_to_transport_class(x) container_of(x, struct transport_class, class)
+
+struct transport_container {
+ struct attribute_container ac;
+ struct attribute_group *statistics;
+};
+
+#define attribute_container_to_transport_container(x) container_of(x, struct transport_container, ac)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/tty.h b/6/platforms/android-3/arch-x86/usr/include/linux/tty.h
new file mode 100644
index 0000000..b28791c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/tty.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TTY_H
+#define _LINUX_TTY_H
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/types.h b/6/platforms/android-3/arch-x86/usr/include/linux/types.h
new file mode 100644
index 0000000..b118db0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/types.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+
+#include <linux/posix_types.h>
+#include <asm/types.h>
+
+#define __bitwise__
+#define __bitwise
+
+typedef __u16 __bitwise __le16;
+typedef __u16 __bitwise __be16;
+typedef __u32 __bitwise __le32;
+typedef __u32 __bitwise __be32;
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+typedef __u64 __bitwise __le64;
+typedef __u64 __bitwise __be64;
+#endif
+
+struct ustat {
+ __kernel_daddr_t f_tfree;
+ __kernel_ino_t f_tinode;
+ char f_fname[6];
+ char f_fpack[6];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/udp.h b/6/platforms/android-3/arch-x86/usr/include/linux/udp.h
new file mode 100644
index 0000000..e4bf864
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/udp.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UDP_H
+#define _LINUX_UDP_H
+
+#include <linux/types.h>
+
+struct udphdr {
+ __u16 source;
+ __u16 dest;
+ __u16 len;
+ __u16 check;
+};
+
+#define UDP_CORK 1
+#define UDP_ENCAP 100
+
+#define UDP_ENCAP_ESPINUDP_NON_IKE 1
+#define UDP_ENCAP_ESPINUDP 2
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_i.h b/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_i.h
new file mode 100644
index 0000000..d71adb6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UFS_FS_I_H
+#define _LINUX_UFS_FS_I_H
+
+struct ufs_inode_info {
+ union {
+ __fs32 i_data[15];
+ __u8 i_symlink[4*15];
+ __fs64 u2_i_data[15];
+ } i_u1;
+ __u32 i_flags;
+ __u32 i_gen;
+ __u32 i_shadow;
+ __u32 i_unused1;
+ __u32 i_unused2;
+ __u32 i_oeftflag;
+ __u16 i_osync;
+ __u32 i_lastfrag;
+ __u32 i_dir_start_lookup;
+ struct inode vfs_inode;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_sb.h
new file mode 100644
index 0000000..9c7226d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1,35 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_UFS_FS_SB_H
+#define __LINUX_UFS_FS_SB_H
+
+#define UFS_MAX_GROUP_LOADED 8
+#define UFS_CGNO_EMPTY ((unsigned)-1)
+
+struct ufs_sb_private_info;
+struct ufs_cg_private_info;
+struct ufs_csum;
+#define UFS_MAXCSBUFS 31
+
+struct ufs_sb_info {
+ struct ufs_sb_private_info * s_uspi;
+ struct ufs_csum * s_csp;
+ unsigned s_bytesex;
+ unsigned s_flags;
+ struct buffer_head ** s_ucg;
+ struct ufs_cg_private_info * s_ucpi[UFS_MAX_GROUP_LOADED];
+ unsigned s_cgno[UFS_MAX_GROUP_LOADED];
+ unsigned short s_cg_loaded;
+ unsigned s_mount_opt;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/uio.h b/6/platforms/android-3/arch-x86/usr/include/linux/uio.h
new file mode 100644
index 0000000..b0895af
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/uio.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_UIO_H
+#define __LINUX_UIO_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+struct iovec
+{
+ void __user *iov_base;
+ __kernel_size_t iov_len;
+};
+
+#define UIO_FASTIOV 8
+#define UIO_MAXIOV 1024
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/un.h b/6/platforms/android-3/arch-x86/usr/include/linux/un.h
new file mode 100644
index 0000000..5b51b7c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/un.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UN_H
+#define _LINUX_UN_H
+
+#define UNIX_PATH_MAX 108
+
+struct sockaddr_un {
+ sa_family_t sun_family;
+ char sun_path[UNIX_PATH_MAX];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/unistd.h b/6/platforms/android-3/arch-x86/usr/include/linux/unistd.h
new file mode 100644
index 0000000..6a3ec4c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/unistd.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UNISTD_H_
+#define _LINUX_UNISTD_H_
+
+#include <asm/unistd.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/usb.h b/6/platforms/android-3/arch-x86/usr/include/linux/usb.h
new file mode 100644
index 0000000..ceee194
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/usb.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_USB_H
+#define __LINUX_USB_H
+
+#include <linux/mod_devicetable.h>
+#include <linux/usb_ch9.h>
+
+#define USB_MAJOR 180
+#define USB_DEVICE_MAJOR 189
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/usb_ch9.h b/6/platforms/android-3/arch-x86/usr/include/linux/usb_ch9.h
new file mode 100644
index 0000000..74e31e7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/usb_ch9.h
@@ -0,0 +1,388 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_USB_CH9_H
+#define __LINUX_USB_CH9_H
+
+#include <linux/types.h>
+
+#define USB_DIR_OUT 0
+#define USB_DIR_IN 0x80
+
+#define USB_TYPE_MASK (0x03 << 5)
+#define USB_TYPE_STANDARD (0x00 << 5)
+#define USB_TYPE_CLASS (0x01 << 5)
+#define USB_TYPE_VENDOR (0x02 << 5)
+#define USB_TYPE_RESERVED (0x03 << 5)
+
+#define USB_RECIP_MASK 0x1f
+#define USB_RECIP_DEVICE 0x00
+#define USB_RECIP_INTERFACE 0x01
+#define USB_RECIP_ENDPOINT 0x02
+#define USB_RECIP_OTHER 0x03
+
+#define USB_RECIP_PORT 0x04
+#define USB_RECIP_RPIPE 0x05
+
+#define USB_REQ_GET_STATUS 0x00
+#define USB_REQ_CLEAR_FEATURE 0x01
+#define USB_REQ_SET_FEATURE 0x03
+#define USB_REQ_SET_ADDRESS 0x05
+#define USB_REQ_GET_DESCRIPTOR 0x06
+#define USB_REQ_SET_DESCRIPTOR 0x07
+#define USB_REQ_GET_CONFIGURATION 0x08
+#define USB_REQ_SET_CONFIGURATION 0x09
+#define USB_REQ_GET_INTERFACE 0x0A
+#define USB_REQ_SET_INTERFACE 0x0B
+#define USB_REQ_SYNCH_FRAME 0x0C
+
+#define USB_REQ_SET_ENCRYPTION 0x0D
+#define USB_REQ_GET_ENCRYPTION 0x0E
+#define USB_REQ_RPIPE_ABORT 0x0E
+#define USB_REQ_SET_HANDSHAKE 0x0F
+#define USB_REQ_RPIPE_RESET 0x0F
+#define USB_REQ_GET_HANDSHAKE 0x10
+#define USB_REQ_SET_CONNECTION 0x11
+#define USB_REQ_SET_SECURITY_DATA 0x12
+#define USB_REQ_GET_SECURITY_DATA 0x13
+#define USB_REQ_SET_WUSB_DATA 0x14
+#define USB_REQ_LOOPBACK_DATA_WRITE 0x15
+#define USB_REQ_LOOPBACK_DATA_READ 0x16
+#define USB_REQ_SET_INTERFACE_DS 0x17
+
+#define USB_DEVICE_SELF_POWERED 0
+#define USB_DEVICE_REMOTE_WAKEUP 1
+#define USB_DEVICE_TEST_MODE 2
+#define USB_DEVICE_BATTERY 2
+#define USB_DEVICE_B_HNP_ENABLE 3
+#define USB_DEVICE_WUSB_DEVICE 3
+#define USB_DEVICE_A_HNP_SUPPORT 4
+#define USB_DEVICE_A_ALT_HNP_SUPPORT 5
+#define USB_DEVICE_DEBUG_MODE 6
+
+#define USB_ENDPOINT_HALT 0
+
+struct usb_ctrlrequest {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __le16 wValue;
+ __le16 wIndex;
+ __le16 wLength;
+} __attribute__ ((packed));
+
+#define USB_DT_DEVICE 0x01
+#define USB_DT_CONFIG 0x02
+#define USB_DT_STRING 0x03
+#define USB_DT_INTERFACE 0x04
+#define USB_DT_ENDPOINT 0x05
+#define USB_DT_DEVICE_QUALIFIER 0x06
+#define USB_DT_OTHER_SPEED_CONFIG 0x07
+#define USB_DT_INTERFACE_POWER 0x08
+
+#define USB_DT_OTG 0x09
+#define USB_DT_DEBUG 0x0a
+#define USB_DT_INTERFACE_ASSOCIATION 0x0b
+
+#define USB_DT_SECURITY 0x0c
+#define USB_DT_KEY 0x0d
+#define USB_DT_ENCRYPTION_TYPE 0x0e
+#define USB_DT_BOS 0x0f
+#define USB_DT_DEVICE_CAPABILITY 0x10
+#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
+#define USB_DT_WIRE_ADAPTER 0x21
+#define USB_DT_RPIPE 0x22
+
+#define USB_DT_CS_DEVICE 0x21
+#define USB_DT_CS_CONFIG 0x22
+#define USB_DT_CS_STRING 0x23
+#define USB_DT_CS_INTERFACE 0x24
+#define USB_DT_CS_ENDPOINT 0x25
+
+struct usb_descriptor_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+} __attribute__ ((packed));
+
+struct usb_device_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __le16 idVendor;
+ __le16 idProduct;
+ __le16 bcdDevice;
+ __u8 iManufacturer;
+ __u8 iProduct;
+ __u8 iSerialNumber;
+ __u8 bNumConfigurations;
+} __attribute__ ((packed));
+
+#define USB_DT_DEVICE_SIZE 18
+
+#define USB_CLASS_PER_INTERFACE 0
+#define USB_CLASS_AUDIO 1
+#define USB_CLASS_COMM 2
+#define USB_CLASS_HID 3
+#define USB_CLASS_PHYSICAL 5
+#define USB_CLASS_STILL_IMAGE 6
+#define USB_CLASS_PRINTER 7
+#define USB_CLASS_MASS_STORAGE 8
+#define USB_CLASS_HUB 9
+#define USB_CLASS_CDC_DATA 0x0a
+#define USB_CLASS_CSCID 0x0b
+#define USB_CLASS_CONTENT_SEC 0x0d
+#define USB_CLASS_VIDEO 0x0e
+#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
+#define USB_CLASS_APP_SPEC 0xfe
+#define USB_CLASS_VENDOR_SPEC 0xff
+
+struct usb_config_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumInterfaces;
+ __u8 bConfigurationValue;
+ __u8 iConfiguration;
+ __u8 bmAttributes;
+ __u8 bMaxPower;
+} __attribute__ ((packed));
+
+#define USB_DT_CONFIG_SIZE 9
+
+#define USB_CONFIG_ATT_ONE (1 << 7)
+#define USB_CONFIG_ATT_SELFPOWER (1 << 6)
+#define USB_CONFIG_ATT_WAKEUP (1 << 5)
+#define USB_CONFIG_ATT_BATTERY (1 << 4)
+
+struct usb_string_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wData[1];
+} __attribute__ ((packed));
+
+struct usb_interface_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bInterfaceNumber;
+ __u8 bAlternateSetting;
+ __u8 bNumEndpoints;
+ __u8 bInterfaceClass;
+ __u8 bInterfaceSubClass;
+ __u8 bInterfaceProtocol;
+ __u8 iInterface;
+} __attribute__ ((packed));
+
+#define USB_DT_INTERFACE_SIZE 9
+
+struct usb_endpoint_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bEndpointAddress;
+ __u8 bmAttributes;
+ __le16 wMaxPacketSize;
+ __u8 bInterval;
+
+ __u8 bRefresh;
+ __u8 bSynchAddress;
+} __attribute__ ((packed));
+
+#define USB_DT_ENDPOINT_SIZE 7
+#define USB_DT_ENDPOINT_AUDIO_SIZE 9
+
+#define USB_ENDPOINT_NUMBER_MASK 0x0f
+#define USB_ENDPOINT_DIR_MASK 0x80
+
+#define USB_ENDPOINT_XFERTYPE_MASK 0x03
+#define USB_ENDPOINT_XFER_CONTROL 0
+#define USB_ENDPOINT_XFER_ISOC 1
+#define USB_ENDPOINT_XFER_BULK 2
+#define USB_ENDPOINT_XFER_INT 3
+#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
+
+struct usb_qualifier_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __u8 bNumConfigurations;
+ __u8 bRESERVED;
+} __attribute__ ((packed));
+
+struct usb_otg_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bmAttributes;
+} __attribute__ ((packed));
+
+#define USB_OTG_SRP (1 << 0)
+#define USB_OTG_HNP (1 << 1)
+
+struct usb_debug_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bDebugInEndpoint;
+ __u8 bDebugOutEndpoint;
+};
+
+struct usb_interface_assoc_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bFirstInterface;
+ __u8 bInterfaceCount;
+ __u8 bFunctionClass;
+ __u8 bFunctionSubClass;
+ __u8 bFunctionProtocol;
+ __u8 iFunction;
+} __attribute__ ((packed));
+
+struct usb_security_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumEncryptionTypes;
+};
+
+struct usb_key_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 bKeyData[0];
+};
+
+struct usb_encryption_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bEncryptionType;
+#define USB_ENC_TYPE_UNSECURE 0
+#define USB_ENC_TYPE_WIRED 1
+#define USB_ENC_TYPE_CCM_1 2
+#define USB_ENC_TYPE_RSA_1 3
+ __u8 bEncryptionValue;
+ __u8 bAuthKeyIndex;
+};
+
+struct usb_bos_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __le16 wTotalLength;
+ __u8 bNumDeviceCaps;
+};
+
+struct usb_dev_cap_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+};
+
+#define USB_CAP_TYPE_WIRELESS_USB 1
+
+struct usb_wireless_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+
+ __u8 bmAttributes;
+#define USB_WIRELESS_P2P_DRD (1 << 1)
+#define USB_WIRELESS_BEACON_MASK (3 << 2)
+#define USB_WIRELESS_BEACON_SELF (1 << 2)
+#define USB_WIRELESS_BEACON_DIRECTED (2 << 2)
+#define USB_WIRELESS_BEACON_NONE (3 << 2)
+ __le16 wPHYRates;
+#define USB_WIRELESS_PHY_53 (1 << 0)
+#define USB_WIRELESS_PHY_80 (1 << 1)
+#define USB_WIRELESS_PHY_107 (1 << 2)
+#define USB_WIRELESS_PHY_160 (1 << 3)
+#define USB_WIRELESS_PHY_200 (1 << 4)
+#define USB_WIRELESS_PHY_320 (1 << 5)
+#define USB_WIRELESS_PHY_400 (1 << 6)
+#define USB_WIRELESS_PHY_480 (1 << 7)
+ __u8 bmTFITXPowerInfo;
+ __u8 bmFFITXPowerInfo;
+ __le16 bmBandGroup;
+ __u8 bReserved;
+};
+
+struct usb_wireless_ep_comp_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+
+ __u8 bMaxBurst;
+ __u8 bMaxSequence;
+ __le16 wMaxStreamDelay;
+ __le16 wOverTheAirPacketSize;
+ __u8 bOverTheAirInterval;
+ __u8 bmCompAttributes;
+#define USB_ENDPOINT_SWITCH_MASK 0x03
+#define USB_ENDPOINT_SWITCH_NO 0
+#define USB_ENDPOINT_SWITCH_SWITCH 1
+#define USB_ENDPOINT_SWITCH_SCALE 2
+};
+
+struct usb_handshake {
+ __u8 bMessageNumber;
+ __u8 bStatus;
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 CDID[16];
+ __u8 nonce[16];
+ __u8 MIC[8];
+};
+
+struct usb_connection_context {
+ __u8 CHID[16];
+ __u8 CDID[16];
+ __u8 CK[16];
+};
+
+enum usb_device_speed {
+ USB_SPEED_UNKNOWN = 0,
+ USB_SPEED_LOW, USB_SPEED_FULL,
+ USB_SPEED_HIGH,
+ USB_SPEED_VARIABLE,
+};
+
+enum usb_device_state {
+
+ USB_STATE_NOTATTACHED = 0,
+
+ USB_STATE_ATTACHED,
+ USB_STATE_POWERED,
+ USB_STATE_UNAUTHENTICATED,
+ USB_STATE_RECONNECTING,
+ USB_STATE_DEFAULT,
+ USB_STATE_ADDRESS,
+ USB_STATE_CONFIGURED,
+
+ USB_STATE_SUSPENDED
+
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/usbdevice_fs.h b/6/platforms/android-3/arch-x86/usr/include/linux/usbdevice_fs.h
new file mode 100644
index 0000000..f36efdc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_USBDEVICE_FS_H
+#define _LINUX_USBDEVICE_FS_H
+
+#include <linux/types.h>
+
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+
+struct usbdevfs_ctrltransfer {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __u16 wValue;
+ __u16 wIndex;
+ __u16 wLength;
+ __u32 timeout;
+ void __user *data;
+};
+
+struct usbdevfs_bulktransfer {
+ unsigned int ep;
+ unsigned int len;
+ unsigned int timeout;
+ void __user *data;
+};
+
+struct usbdevfs_setinterface {
+ unsigned int interface;
+ unsigned int altsetting;
+};
+
+struct usbdevfs_disconnectsignal {
+ unsigned int signr;
+ void __user *context;
+};
+
+#define USBDEVFS_MAXDRIVERNAME 255
+
+struct usbdevfs_getdriver {
+ unsigned int interface;
+ char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+
+struct usbdevfs_connectinfo {
+ unsigned int devnum;
+ unsigned char slow;
+};
+
+#define USBDEVFS_URB_SHORT_NOT_OK 1
+#define USBDEVFS_URB_ISO_ASAP 2
+
+#define USBDEVFS_URB_TYPE_ISO 0
+#define USBDEVFS_URB_TYPE_INTERRUPT 1
+#define USBDEVFS_URB_TYPE_CONTROL 2
+#define USBDEVFS_URB_TYPE_BULK 3
+
+struct usbdevfs_iso_packet_desc {
+ unsigned int length;
+ unsigned int actual_length;
+ unsigned int status;
+};
+
+struct usbdevfs_urb {
+ unsigned char type;
+ unsigned char endpoint;
+ int status;
+ unsigned int flags;
+ void __user *buffer;
+ int buffer_length;
+ int actual_length;
+ int start_frame;
+ int number_of_packets;
+ int error_count;
+ unsigned int signr;
+ void *usercontext;
+ struct usbdevfs_iso_packet_desc iso_frame_desc[0];
+};
+
+struct usbdevfs_ioctl {
+ int ifno;
+ int ioctl_code;
+ void __user *data;
+};
+
+struct usbdevfs_hub_portinfo {
+ char nports;
+ char port [127];
+};
+
+#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
+#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
+#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
+#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
+#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
+#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
+#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
+#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
+#define USBDEVFS_DISCARDURB _IO('U', 11)
+#define USBDEVFS_REAPURB _IOW('U', 12, void *)
+#define USBDEVFS_REAPURB32 _IOW('U', 12, u32)
+#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
+#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32)
+#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
+#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
+#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
+#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
+#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
+#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
+#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
+#define USBDEVFS_RESET _IO('U', 20)
+#define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
+#define USBDEVFS_DISCONNECT _IO('U', 22)
+#define USBDEVFS_CONNECT _IO('U', 23)
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/user.h b/6/platforms/android-3/arch-x86/usr/include/linux/user.h
new file mode 100644
index 0000000..1c0b9cb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/user.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm/user.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/utime.h b/6/platforms/android-3/arch-x86/usr/include/linux/utime.h
new file mode 100644
index 0000000..4b1ba9c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/utime.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UTIME_H
+#define _LINUX_UTIME_H
+
+struct utimbuf {
+ time_t actime;
+ time_t modtime;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/utsname.h b/6/platforms/android-3/arch-x86/usr/include/linux/utsname.h
new file mode 100644
index 0000000..ea6ee89
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/utsname.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_UTSNAME_H
+#define _LINUX_UTSNAME_H
+
+#define __OLD_UTS_LEN 8
+
+struct oldold_utsname {
+ char sysname[9];
+ char nodename[9];
+ char release[9];
+ char version[9];
+ char machine[9];
+};
+
+#define __NEW_UTS_LEN 64
+
+struct old_utsname {
+ char sysname[65];
+ char nodename[65];
+ char release[65];
+ char version[65];
+ char machine[65];
+};
+
+struct new_utsname {
+ char sysname[65];
+ char nodename[65];
+ char release[65];
+ char version[65];
+ char machine[65];
+ char domainname[65];
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/version.h b/6/platforms/android-3/arch-x86/usr/include/linux/version.h
new file mode 100644
index 0000000..beff0ed
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/version.h
@@ -0,0 +1,13 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define LINUX_VERSION_CODE 132626
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/vfs.h b/6/platforms/android-3/arch-x86/usr/include/linux/vfs.h
new file mode 100644
index 0000000..70636e9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/vfs.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VFS_H
+#define _LINUX_VFS_H
+
+#include <linux/statfs.h>
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/videodev.h b/6/platforms/android-3/arch-x86/usr/include/linux/videodev.h
new file mode 100644
index 0000000..1f37fde
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/videodev.h
@@ -0,0 +1,327 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_VIDEODEV_H
+#define __LINUX_VIDEODEV_H
+
+#include <linux/videodev2.h>
+
+struct video_capability
+{
+ char name[32];
+ int type;
+ int channels;
+ int audios;
+ int maxwidth;
+ int maxheight;
+ int minwidth;
+ int minheight;
+};
+
+struct video_channel
+{
+ int channel;
+ char name[32];
+ int tuners;
+ __u32 flags;
+#define VIDEO_VC_TUNER 1
+#define VIDEO_VC_AUDIO 2
+ __u16 type;
+#define VIDEO_TYPE_TV 1
+#define VIDEO_TYPE_CAMERA 2
+ __u16 norm;
+};
+
+struct video_tuner
+{
+ int tuner;
+ char name[32];
+ unsigned long rangelow, rangehigh;
+ __u32 flags;
+#define VIDEO_TUNER_PAL 1
+#define VIDEO_TUNER_NTSC 2
+#define VIDEO_TUNER_SECAM 4
+#define VIDEO_TUNER_LOW 8
+#define VIDEO_TUNER_NORM 16
+#define VIDEO_TUNER_STEREO_ON 128
+#define VIDEO_TUNER_RDS_ON 256
+#define VIDEO_TUNER_MBS_ON 512
+ __u16 mode;
+#define VIDEO_MODE_PAL 0
+#define VIDEO_MODE_NTSC 1
+#define VIDEO_MODE_SECAM 2
+#define VIDEO_MODE_AUTO 3
+ __u16 signal;
+};
+
+struct video_picture
+{
+ __u16 brightness;
+ __u16 hue;
+ __u16 colour;
+ __u16 contrast;
+ __u16 whiteness;
+ __u16 depth;
+ __u16 palette;
+#define VIDEO_PALETTE_GREY 1
+#define VIDEO_PALETTE_HI240 2
+#define VIDEO_PALETTE_RGB565 3
+#define VIDEO_PALETTE_RGB24 4
+#define VIDEO_PALETTE_RGB32 5
+#define VIDEO_PALETTE_RGB555 6
+#define VIDEO_PALETTE_YUV422 7
+#define VIDEO_PALETTE_YUYV 8
+#define VIDEO_PALETTE_UYVY 9
+#define VIDEO_PALETTE_YUV420 10
+#define VIDEO_PALETTE_YUV411 11
+#define VIDEO_PALETTE_RAW 12
+#define VIDEO_PALETTE_YUV422P 13
+#define VIDEO_PALETTE_YUV411P 14
+#define VIDEO_PALETTE_YUV420P 15
+#define VIDEO_PALETTE_YUV410P 16
+#define VIDEO_PALETTE_PLANAR 13
+#define VIDEO_PALETTE_COMPONENT 7
+};
+
+struct video_audio
+{
+ int audio;
+ __u16 volume;
+ __u16 bass, treble;
+ __u32 flags;
+#define VIDEO_AUDIO_MUTE 1
+#define VIDEO_AUDIO_MUTABLE 2
+#define VIDEO_AUDIO_VOLUME 4
+#define VIDEO_AUDIO_BASS 8
+#define VIDEO_AUDIO_TREBLE 16
+#define VIDEO_AUDIO_BALANCE 32
+ char name[16];
+#define VIDEO_SOUND_MONO 1
+#define VIDEO_SOUND_STEREO 2
+#define VIDEO_SOUND_LANG1 4
+#define VIDEO_SOUND_LANG2 8
+ __u16 mode;
+ __u16 balance;
+ __u16 step;
+};
+
+struct video_clip
+{
+ __s32 x,y;
+ __s32 width, height;
+ struct video_clip *next;
+};
+
+struct video_window
+{
+ __u32 x,y;
+ __u32 width,height;
+ __u32 chromakey;
+ __u32 flags;
+ struct video_clip __user *clips;
+ int clipcount;
+#define VIDEO_WINDOW_INTERLACE 1
+#define VIDEO_WINDOW_CHROMAKEY 16
+#define VIDEO_CLIP_BITMAP -1
+
+#define VIDEO_CLIPMAP_SIZE (128 * 625)
+};
+
+struct video_capture
+{
+ __u32 x,y;
+ __u32 width, height;
+ __u16 decimation;
+ __u16 flags;
+#define VIDEO_CAPTURE_ODD 0
+#define VIDEO_CAPTURE_EVEN 1
+};
+
+struct video_buffer
+{
+ void *base;
+ int height,width;
+ int depth;
+ int bytesperline;
+};
+
+struct video_mmap
+{
+ unsigned int frame;
+ int height,width;
+ unsigned int format;
+};
+
+struct video_key
+{
+ __u8 key[8];
+ __u32 flags;
+};
+
+struct video_mbuf
+{
+ int size;
+ int frames;
+ int offsets[VIDEO_MAX_FRAME];
+};
+
+#define VIDEO_NO_UNIT (-1)
+
+struct video_unit
+{
+ int video;
+ int vbi;
+ int radio;
+ int audio;
+ int teletext;
+};
+
+struct vbi_format {
+ __u32 sampling_rate;
+ __u32 samples_per_line;
+ __u32 sample_format;
+ __s32 start[2];
+ __u32 count[2];
+ __u32 flags;
+#define VBI_UNSYNC 1
+#define VBI_INTERLACED 2
+};
+
+struct video_info
+{
+ __u32 frame_count;
+ __u32 h_size;
+ __u32 v_size;
+ __u32 smpte_timecode;
+ __u32 picture_type;
+ __u32 temporal_reference;
+ __u8 user_data[256];
+
+};
+
+struct video_play_mode
+{
+ int mode;
+ int p1;
+ int p2;
+};
+
+struct video_code
+{
+ char loadwhat[16];
+ int datasize;
+ __u8 *data;
+};
+
+#define VIDIOCGCAP _IOR('v',1,struct video_capability)
+#define VIDIOCGCHAN _IOWR('v',2,struct video_channel)
+#define VIDIOCSCHAN _IOW('v',3,struct video_channel)
+#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner)
+#define VIDIOCSTUNER _IOW('v',5,struct video_tuner)
+#define VIDIOCGPICT _IOR('v',6,struct video_picture)
+#define VIDIOCSPICT _IOW('v',7,struct video_picture)
+#define VIDIOCCAPTURE _IOW('v',8,int)
+#define VIDIOCGWIN _IOR('v',9, struct video_window)
+#define VIDIOCSWIN _IOW('v',10, struct video_window)
+#define VIDIOCGFBUF _IOR('v',11, struct video_buffer)
+#define VIDIOCSFBUF _IOW('v',12, struct video_buffer)
+#define VIDIOCKEY _IOR('v',13, struct video_key)
+#define VIDIOCGFREQ _IOR('v',14, unsigned long)
+#define VIDIOCSFREQ _IOW('v',15, unsigned long)
+#define VIDIOCGAUDIO _IOR('v',16, struct video_audio)
+#define VIDIOCSAUDIO _IOW('v',17, struct video_audio)
+#define VIDIOCSYNC _IOW('v',18, int)
+#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap)
+#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf)
+#define VIDIOCGUNIT _IOR('v',21, struct video_unit)
+#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture)
+#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture)
+#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode)
+#define VIDIOCSWRITEMODE _IOW('v',25, int)
+#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info)
+#define VIDIOCSMICROCODE _IOW('v',27, struct video_code)
+#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format)
+#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format)
+
+#define BASE_VIDIOCPRIVATE 192
+
+#define VID_WRITE_MPEG_AUD 0
+#define VID_WRITE_MPEG_VID 1
+#define VID_WRITE_OSD 2
+#define VID_WRITE_TTX 3
+#define VID_WRITE_CC 4
+#define VID_WRITE_MJPEG 5
+
+#define VID_PLAY_VID_OUT_MODE 0
+
+#define VID_PLAY_GENLOCK 1
+
+#define VID_PLAY_NORMAL 2
+#define VID_PLAY_PAUSE 3
+#define VID_PLAY_SINGLE_FRAME 4
+#define VID_PLAY_FAST_FORWARD 5
+#define VID_PLAY_SLOW_MOTION 6
+#define VID_PLAY_IMMEDIATE_NORMAL 7
+#define VID_PLAY_SWITCH_CHANNELS 8
+#define VID_PLAY_FREEZE_FRAME 9
+#define VID_PLAY_STILL_MODE 10
+#define VID_PLAY_MASTER_MODE 11
+
+#define VID_PLAY_MASTER_NONE 1
+#define VID_PLAY_MASTER_VIDEO 2
+#define VID_PLAY_MASTER_AUDIO 3
+#define VID_PLAY_ACTIVE_SCANLINES 12
+
+#define VID_PLAY_RESET 13
+#define VID_PLAY_END_MARK 14
+
+#define VID_HARDWARE_BT848 1
+#define VID_HARDWARE_QCAM_BW 2
+#define VID_HARDWARE_PMS 3
+#define VID_HARDWARE_QCAM_C 4
+#define VID_HARDWARE_PSEUDO 5
+#define VID_HARDWARE_SAA5249 6
+#define VID_HARDWARE_AZTECH 7
+#define VID_HARDWARE_SF16MI 8
+#define VID_HARDWARE_RTRACK 9
+#define VID_HARDWARE_ZOLTRIX 10
+#define VID_HARDWARE_SAA7146 11
+#define VID_HARDWARE_VIDEUM 12
+#define VID_HARDWARE_RTRACK2 13
+#define VID_HARDWARE_PERMEDIA2 14
+#define VID_HARDWARE_RIVA128 15
+#define VID_HARDWARE_PLANB 16
+#define VID_HARDWARE_BROADWAY 17
+#define VID_HARDWARE_GEMTEK 18
+#define VID_HARDWARE_TYPHOON 19
+#define VID_HARDWARE_VINO 20
+#define VID_HARDWARE_CADET 21
+#define VID_HARDWARE_TRUST 22
+#define VID_HARDWARE_TERRATEC 23
+#define VID_HARDWARE_CPIA 24
+#define VID_HARDWARE_ZR36120 25
+#define VID_HARDWARE_ZR36067 26
+#define VID_HARDWARE_OV511 27
+#define VID_HARDWARE_ZR356700 28
+#define VID_HARDWARE_W9966 29
+#define VID_HARDWARE_SE401 30
+#define VID_HARDWARE_PWC 31
+#define VID_HARDWARE_MEYE 32
+#define VID_HARDWARE_CPIA2 33
+#define VID_HARDWARE_VICAM 34
+#define VID_HARDWARE_SF16FMR2 35
+#define VID_HARDWARE_W9968CF 36
+#define VID_HARDWARE_SAA7114H 37
+#define VID_HARDWARE_SN9C102 38
+#define VID_HARDWARE_ARV 39
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/videodev2.h b/6/platforms/android-3/arch-x86/usr/include/linux/videodev2.h
new file mode 100644
index 0000000..dae4e93
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/videodev2.h
@@ -0,0 +1,963 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_VIDEODEV2_H
+#define __LINUX_VIDEODEV2_H
+#define __user
+#include <linux/types.h>
+
+#define VIDEO_MAX_FRAME 32
+
+#define VID_TYPE_CAPTURE 1
+#define VID_TYPE_TUNER 2
+#define VID_TYPE_TELETEXT 4
+#define VID_TYPE_OVERLAY 8
+#define VID_TYPE_CHROMAKEY 16
+#define VID_TYPE_CLIPPING 32
+#define VID_TYPE_FRAMERAM 64
+#define VID_TYPE_SCALES 128
+#define VID_TYPE_MONOCHROME 256
+#define VID_TYPE_SUBCAPTURE 512
+#define VID_TYPE_MPEG_DECODER 1024
+#define VID_TYPE_MPEG_ENCODER 2048
+#define VID_TYPE_MJPEG_DECODER 4096
+#define VID_TYPE_MJPEG_ENCODER 8192
+
+#define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+
+enum v4l2_field {
+ V4L2_FIELD_ANY = 0,
+ V4L2_FIELD_NONE = 1,
+ V4L2_FIELD_TOP = 2,
+ V4L2_FIELD_BOTTOM = 3,
+ V4L2_FIELD_INTERLACED = 4,
+ V4L2_FIELD_SEQ_TB = 5,
+ V4L2_FIELD_SEQ_BT = 6,
+ V4L2_FIELD_ALTERNATE = 7,
+};
+#define V4L2_FIELD_HAS_TOP(field) ((field) == V4L2_FIELD_TOP || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+#define V4L2_FIELD_HAS_BOTTOM(field) ((field) == V4L2_FIELD_BOTTOM || (field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+#define V4L2_FIELD_HAS_BOTH(field) ((field) == V4L2_FIELD_INTERLACED || (field) == V4L2_FIELD_SEQ_TB || (field) == V4L2_FIELD_SEQ_BT)
+
+enum v4l2_buf_type {
+ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
+ V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
+ V4L2_BUF_TYPE_VBI_CAPTURE = 4,
+ V4L2_BUF_TYPE_VBI_OUTPUT = 5,
+
+ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
+ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
+ V4L2_BUF_TYPE_PRIVATE = 0x80,
+};
+
+enum v4l2_ctrl_type {
+ V4L2_CTRL_TYPE_INTEGER = 1,
+ V4L2_CTRL_TYPE_BOOLEAN = 2,
+ V4L2_CTRL_TYPE_MENU = 3,
+ V4L2_CTRL_TYPE_BUTTON = 4,
+ V4L2_CTRL_TYPE_INTEGER64 = 5,
+ V4L2_CTRL_TYPE_CTRL_CLASS = 6,
+};
+
+enum v4l2_tuner_type {
+ V4L2_TUNER_RADIO = 1,
+ V4L2_TUNER_ANALOG_TV = 2,
+ V4L2_TUNER_DIGITAL_TV = 3,
+};
+
+enum v4l2_memory {
+ V4L2_MEMORY_MMAP = 1,
+ V4L2_MEMORY_USERPTR = 2,
+ V4L2_MEMORY_OVERLAY = 3,
+};
+
+enum v4l2_colorspace {
+
+ V4L2_COLORSPACE_SMPTE170M = 1,
+
+ V4L2_COLORSPACE_SMPTE240M = 2,
+
+ V4L2_COLORSPACE_REC709 = 3,
+
+ V4L2_COLORSPACE_BT878 = 4,
+
+ V4L2_COLORSPACE_470_SYSTEM_M = 5,
+ V4L2_COLORSPACE_470_SYSTEM_BG = 6,
+
+ V4L2_COLORSPACE_JPEG = 7,
+
+ V4L2_COLORSPACE_SRGB = 8,
+};
+
+enum v4l2_priority {
+ V4L2_PRIORITY_UNSET = 0,
+ V4L2_PRIORITY_BACKGROUND = 1,
+ V4L2_PRIORITY_INTERACTIVE = 2,
+ V4L2_PRIORITY_RECORD = 3,
+ V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
+};
+
+struct v4l2_rect {
+ __s32 left;
+ __s32 top;
+ __s32 width;
+ __s32 height;
+};
+
+struct v4l2_fract {
+ __u32 numerator;
+ __u32 denominator;
+};
+
+struct v4l2_capability
+{
+ __u8 driver[16];
+ __u8 card[32];
+ __u8 bus_info[32];
+ __u32 version;
+ __u32 capabilities;
+ __u32 reserved[4];
+};
+
+#define V4L2_CAP_VIDEO_CAPTURE 0x00000001
+#define V4L2_CAP_VIDEO_OUTPUT 0x00000002
+#define V4L2_CAP_VIDEO_OVERLAY 0x00000004
+#define V4L2_CAP_VBI_CAPTURE 0x00000010
+#define V4L2_CAP_VBI_OUTPUT 0x00000020
+#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040
+#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080
+#define V4L2_CAP_RDS_CAPTURE 0x00000100
+
+#define V4L2_CAP_TUNER 0x00010000
+#define V4L2_CAP_AUDIO 0x00020000
+#define V4L2_CAP_RADIO 0x00040000
+
+#define V4L2_CAP_READWRITE 0x01000000
+#define V4L2_CAP_ASYNCIO 0x02000000
+#define V4L2_CAP_STREAMING 0x04000000
+
+struct v4l2_pix_format
+{
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
+ enum v4l2_field field;
+ __u32 bytesperline;
+ __u32 sizeimage;
+ enum v4l2_colorspace colorspace;
+ __u32 priv;
+};
+
+#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1')
+#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O')
+#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P')
+#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q')
+#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R')
+#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3')
+#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3')
+#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4')
+#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4')
+#define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y')
+#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9')
+#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2')
+#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V')
+#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y')
+#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P')
+#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P')
+#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P')
+
+#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2')
+#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1')
+
+#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9')
+#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2')
+#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V')
+#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4')
+#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2')
+
+#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1')
+
+#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G')
+#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G')
+#define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d')
+#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G')
+
+#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A')
+#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0')
+#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1')
+#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2')
+#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5')
+
+struct v4l2_fmtdesc
+{
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 flags;
+ __u8 description[32];
+ __u32 pixelformat;
+ __u32 reserved[4];
+};
+
+#define V4L2_FMT_FLAG_COMPRESSED 0x0001
+
+struct v4l2_timecode
+{
+ __u32 type;
+ __u32 flags;
+ __u8 frames;
+ __u8 seconds;
+ __u8 minutes;
+ __u8 hours;
+ __u8 userbits[4];
+};
+
+#define V4L2_TC_TYPE_24FPS 1
+#define V4L2_TC_TYPE_25FPS 2
+#define V4L2_TC_TYPE_30FPS 3
+#define V4L2_TC_TYPE_50FPS 4
+#define V4L2_TC_TYPE_60FPS 5
+
+#define V4L2_TC_FLAG_DROPFRAME 0x0001
+#define V4L2_TC_FLAG_COLORFRAME 0x0002
+#define V4L2_TC_USERBITS_field 0x000C
+#define V4L2_TC_USERBITS_USERDEFINED 0x0000
+#define V4L2_TC_USERBITS_8BITCHARS 0x0008
+
+struct v4l2_jpegcompression
+{
+ int quality;
+
+ int APPn;
+ int APP_len;
+ char APP_data[60];
+
+ int COM_len;
+ char COM_data[60];
+
+ __u32 jpeg_markers;
+
+#define V4L2_JPEG_MARKER_DHT (1<<3)
+#define V4L2_JPEG_MARKER_DQT (1<<4)
+#define V4L2_JPEG_MARKER_DRI (1<<5)
+#define V4L2_JPEG_MARKER_COM (1<<6)
+#define V4L2_JPEG_MARKER_APP (1<<7)
+};
+
+struct v4l2_requestbuffers
+{
+ __u32 count;
+ enum v4l2_buf_type type;
+ enum v4l2_memory memory;
+ __u32 reserved[2];
+};
+
+struct v4l2_buffer
+{
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 bytesused;
+ __u32 flags;
+ enum v4l2_field field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ __u32 sequence;
+
+ enum v4l2_memory memory;
+ union {
+ __u32 offset;
+ unsigned long userptr;
+ } m;
+ __u32 length;
+ __u32 input;
+ __u32 reserved;
+};
+
+#define V4L2_BUF_FLAG_MAPPED 0x0001
+#define V4L2_BUF_FLAG_QUEUED 0x0002
+#define V4L2_BUF_FLAG_DONE 0x0004
+#define V4L2_BUF_FLAG_KEYFRAME 0x0008
+#define V4L2_BUF_FLAG_PFRAME 0x0010
+#define V4L2_BUF_FLAG_BFRAME 0x0020
+#define V4L2_BUF_FLAG_TIMECODE 0x0100
+#define V4L2_BUF_FLAG_INPUT 0x0200
+
+struct v4l2_framebuffer
+{
+ __u32 capability;
+ __u32 flags;
+
+ void* base;
+ struct v4l2_pix_format fmt;
+};
+
+#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
+#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
+#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
+#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
+
+#define V4L2_FBUF_FLAG_PRIMARY 0x0001
+#define V4L2_FBUF_FLAG_OVERLAY 0x0002
+#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
+
+struct v4l2_clip
+{
+ struct v4l2_rect c;
+ struct v4l2_clip __user *next;
+};
+
+struct v4l2_window
+{
+ struct v4l2_rect w;
+ enum v4l2_field field;
+ __u32 chromakey;
+ struct v4l2_clip __user *clips;
+ __u32 clipcount;
+ void __user *bitmap;
+};
+
+struct v4l2_captureparm
+{
+ __u32 capability;
+ __u32 capturemode;
+ struct v4l2_fract timeperframe;
+ __u32 extendedmode;
+ __u32 readbuffers;
+ __u32 reserved[4];
+};
+
+#define V4L2_MODE_HIGHQUALITY 0x0001
+#define V4L2_CAP_TIMEPERFRAME 0x1000
+
+struct v4l2_outputparm
+{
+ __u32 capability;
+ __u32 outputmode;
+ struct v4l2_fract timeperframe;
+ __u32 extendedmode;
+ __u32 writebuffers;
+ __u32 reserved[4];
+};
+
+struct v4l2_cropcap {
+ enum v4l2_buf_type type;
+ struct v4l2_rect bounds;
+ struct v4l2_rect defrect;
+ struct v4l2_fract pixelaspect;
+};
+
+struct v4l2_crop {
+ enum v4l2_buf_type type;
+ struct v4l2_rect c;
+};
+
+typedef __u64 v4l2_std_id;
+
+#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
+#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
+#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
+#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
+#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
+#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
+#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
+#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
+
+#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
+#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
+#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
+#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
+
+#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
+#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
+#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
+#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
+
+#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
+#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
+#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
+#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
+#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
+#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
+#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
+#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
+
+#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
+#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
+
+#define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC)
+#define V4L2_STD_B (V4L2_STD_PAL_B|V4L2_STD_PAL_B1|V4L2_STD_SECAM_B)
+#define V4L2_STD_GH (V4L2_STD_PAL_G|V4L2_STD_PAL_H|V4L2_STD_SECAM_G|V4L2_STD_SECAM_H)
+#define V4L2_STD_DK (V4L2_STD_PAL_DK|V4L2_STD_SECAM_DK)
+
+#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | V4L2_STD_PAL_B1 | V4L2_STD_PAL_G)
+#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D | V4L2_STD_PAL_D1 | V4L2_STD_PAL_K)
+#define V4L2_STD_PAL (V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_H | V4L2_STD_PAL_I)
+#define V4L2_STD_NTSC (V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR)
+#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D | V4L2_STD_SECAM_K | V4L2_STD_SECAM_K1)
+#define V4L2_STD_SECAM (V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H | V4L2_STD_SECAM_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)
+
+#define V4L2_STD_525_60 (V4L2_STD_PAL_M | V4L2_STD_PAL_60 | V4L2_STD_NTSC | V4L2_STD_NTSC_443)
+#define V4L2_STD_625_50 (V4L2_STD_PAL | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | V4L2_STD_SECAM)
+#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB | V4L2_STD_ATSC_16_VSB)
+
+#define V4L2_STD_UNKNOWN 0
+#define V4L2_STD_ALL (V4L2_STD_525_60 | V4L2_STD_625_50)
+
+struct v4l2_standard
+{
+ __u32 index;
+ v4l2_std_id id;
+ __u8 name[24];
+ struct v4l2_fract frameperiod;
+ __u32 framelines;
+ __u32 reserved[4];
+};
+
+struct v4l2_input
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 type;
+ __u32 audioset;
+ __u32 tuner;
+ v4l2_std_id std;
+ __u32 status;
+ __u32 reserved[4];
+};
+
+#define V4L2_INPUT_TYPE_TUNER 1
+#define V4L2_INPUT_TYPE_CAMERA 2
+
+#define V4L2_IN_ST_NO_POWER 0x00000001
+#define V4L2_IN_ST_NO_SIGNAL 0x00000002
+#define V4L2_IN_ST_NO_COLOR 0x00000004
+
+#define V4L2_IN_ST_NO_H_LOCK 0x00000100
+#define V4L2_IN_ST_COLOR_KILL 0x00000200
+
+#define V4L2_IN_ST_NO_SYNC 0x00010000
+#define V4L2_IN_ST_NO_EQU 0x00020000
+#define V4L2_IN_ST_NO_CARRIER 0x00040000
+
+#define V4L2_IN_ST_MACROVISION 0x01000000
+#define V4L2_IN_ST_NO_ACCESS 0x02000000
+#define V4L2_IN_ST_VTR 0x04000000
+
+struct v4l2_output
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 type;
+ __u32 audioset;
+ __u32 modulator;
+ v4l2_std_id std;
+ __u32 reserved[4];
+};
+
+#define V4L2_OUTPUT_TYPE_MODULATOR 1
+#define V4L2_OUTPUT_TYPE_ANALOG 2
+#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
+
+struct v4l2_control
+{
+ __u32 id;
+ __s32 value;
+};
+
+struct v4l2_ext_control
+{
+ __u32 id;
+ __u32 reserved2[2];
+ union {
+ __s32 value;
+ __s64 value64;
+ void *reserved;
+ };
+} __attribute__ ((packed));
+
+struct v4l2_ext_controls
+{
+ __u32 ctrl_class;
+ __u32 count;
+ __u32 error_idx;
+ __u32 reserved[2];
+ struct v4l2_ext_control *controls;
+};
+
+#define V4L2_CTRL_CLASS_USER 0x00980000
+#define V4L2_CTRL_CLASS_MPEG 0x00990000
+
+#define V4L2_CTRL_ID_MASK (0x0fffffff)
+#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
+#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
+
+struct v4l2_queryctrl
+{
+ __u32 id;
+ enum v4l2_ctrl_type type;
+ __u8 name[32];
+ __s32 minimum;
+ __s32 maximum;
+ __s32 step;
+ __s32 default_value;
+ __u32 flags;
+ __u32 reserved[2];
+};
+
+struct v4l2_querymenu
+{
+ __u32 id;
+ __u32 index;
+ __u8 name[32];
+ __u32 reserved;
+};
+
+#define V4L2_CTRL_FLAG_DISABLED 0x0001
+#define V4L2_CTRL_FLAG_GRABBED 0x0002
+#define V4L2_CTRL_FLAG_READ_ONLY 0x0004
+#define V4L2_CTRL_FLAG_UPDATE 0x0008
+#define V4L2_CTRL_FLAG_INACTIVE 0x0010
+#define V4L2_CTRL_FLAG_SLIDER 0x0020
+
+#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
+
+#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
+#define V4L2_CID_USER_BASE V4L2_CID_BASE
+
+#define V4L2_CID_PRIVATE_BASE 0x08000000
+
+#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
+#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
+#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
+#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
+#define V4L2_CID_HUE (V4L2_CID_BASE+3)
+#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
+#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
+#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
+#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
+#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
+#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
+#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11)
+#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
+#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
+#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
+#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
+#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
+#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)
+#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
+#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
+#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
+#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
+#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
+#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
+#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
+#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)
+
+#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
+#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
+
+#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
+enum v4l2_mpeg_stream_type {
+ V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1,
+ V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3,
+ V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4,
+ V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5,
+};
+#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
+#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
+#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
+#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
+#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
+#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
+#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
+enum v4l2_mpeg_stream_vbi_fmt {
+ V4L2_MPEG_STREAM_VBI_FMT_NONE = 0,
+ V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1,
+};
+
+#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
+enum v4l2_mpeg_audio_sampling_freq {
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
+ V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
+enum v4l2_mpeg_audio_encoding {
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
+ V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
+enum v4l2_mpeg_audio_l1_bitrate {
+ V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
+ V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
+ V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
+ V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
+ V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
+ V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
+ V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
+ V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
+ V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
+ V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
+ V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
+ V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
+ V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
+enum v4l2_mpeg_audio_l2_bitrate {
+ V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
+ V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
+ V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
+ V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
+ V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
+ V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
+ V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
+ V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
+ V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
+ V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
+ V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
+ V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
+ V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
+enum v4l2_mpeg_audio_l3_bitrate {
+ V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
+ V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
+ V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
+ V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
+ V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
+ V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
+ V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
+ V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
+ V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
+ V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
+ V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
+ V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
+ V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
+ V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
+enum v4l2_mpeg_audio_mode {
+ V4L2_MPEG_AUDIO_MODE_STEREO = 0,
+ V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
+ V4L2_MPEG_AUDIO_MODE_DUAL = 2,
+ V4L2_MPEG_AUDIO_MODE_MONO = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
+enum v4l2_mpeg_audio_mode_extension {
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
+ V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
+};
+#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
+enum v4l2_mpeg_audio_emphasis {
+ V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
+ V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
+ V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
+};
+#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
+enum v4l2_mpeg_audio_crc {
+ V4L2_MPEG_AUDIO_CRC_NONE = 0,
+ V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
+};
+
+#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
+enum v4l2_mpeg_video_encoding {
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
+ V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
+enum v4l2_mpeg_video_aspect {
+ V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
+ V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
+ V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
+ V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
+};
+#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
+#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
+#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
+#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
+enum v4l2_mpeg_video_bitrate_mode {
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
+};
+#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
+#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
+#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
+
+#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
+enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
+ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
+ V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
+enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
+ V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
+enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
+enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
+ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
+ V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
+enum v4l2_mpeg_cx2341x_video_median_filter_type {
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
+ V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
+};
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
+#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
+
+struct v4l2_tuner
+{
+ __u32 index;
+ __u8 name[32];
+ enum v4l2_tuner_type type;
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 rxsubchans;
+ __u32 audmode;
+ __s32 signal;
+ __s32 afc;
+ __u32 reserved[4];
+};
+
+struct v4l2_modulator
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 rangelow;
+ __u32 rangehigh;
+ __u32 txsubchans;
+ __u32 reserved[4];
+};
+
+#define V4L2_TUNER_CAP_LOW 0x0001
+#define V4L2_TUNER_CAP_NORM 0x0002
+#define V4L2_TUNER_CAP_STEREO 0x0010
+#define V4L2_TUNER_CAP_LANG2 0x0020
+#define V4L2_TUNER_CAP_SAP 0x0020
+#define V4L2_TUNER_CAP_LANG1 0x0040
+
+#define V4L2_TUNER_SUB_MONO 0x0001
+#define V4L2_TUNER_SUB_STEREO 0x0002
+#define V4L2_TUNER_SUB_LANG2 0x0004
+#define V4L2_TUNER_SUB_SAP 0x0004
+#define V4L2_TUNER_SUB_LANG1 0x0008
+
+#define V4L2_TUNER_MODE_MONO 0x0000
+#define V4L2_TUNER_MODE_STEREO 0x0001
+#define V4L2_TUNER_MODE_LANG2 0x0002
+#define V4L2_TUNER_MODE_SAP 0x0002
+#define V4L2_TUNER_MODE_LANG1 0x0003
+#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
+
+struct v4l2_frequency
+{
+ __u32 tuner;
+ enum v4l2_tuner_type type;
+ __u32 frequency;
+ __u32 reserved[8];
+};
+
+struct v4l2_audio
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
+};
+
+#define V4L2_AUDCAP_STEREO 0x00001
+#define V4L2_AUDCAP_AVL 0x00002
+
+#define V4L2_AUDMODE_AVL 0x00001
+
+struct v4l2_audioout
+{
+ __u32 index;
+ __u8 name[32];
+ __u32 capability;
+ __u32 mode;
+ __u32 reserved[2];
+};
+
+struct v4l2_vbi_format
+{
+ __u32 sampling_rate;
+ __u32 offset;
+ __u32 samples_per_line;
+ __u32 sample_format;
+ __s32 start[2];
+ __u32 count[2];
+ __u32 flags;
+ __u32 reserved[2];
+};
+
+#define V4L2_VBI_UNSYNC (1<< 0)
+#define V4L2_VBI_INTERLACED (1<< 1)
+
+struct v4l2_sliced_vbi_format
+{
+ __u16 service_set;
+
+ __u16 service_lines[2][24];
+ __u32 io_size;
+ __u32 reserved[2];
+};
+
+#define V4L2_SLICED_TELETEXT_B (0x0001)
+
+#define V4L2_SLICED_VPS (0x0400)
+
+#define V4L2_SLICED_CAPTION_525 (0x1000)
+
+#define V4L2_SLICED_WSS_625 (0x4000)
+
+#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525)
+#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
+
+struct v4l2_sliced_vbi_cap
+{
+ __u16 service_set;
+
+ __u16 service_lines[2][24];
+ __u32 reserved[4];
+};
+
+struct v4l2_sliced_vbi_data
+{
+ __u32 id;
+ __u32 field;
+ __u32 line;
+ __u32 reserved;
+ __u8 data[48];
+};
+
+struct v4l2_format
+{
+ enum v4l2_buf_type type;
+ union
+ {
+ struct v4l2_pix_format pix;
+ struct v4l2_window win;
+ struct v4l2_vbi_format vbi;
+ struct v4l2_sliced_vbi_format sliced;
+ __u8 raw_data[200];
+ } fmt;
+};
+
+struct v4l2_streamparm
+{
+ enum v4l2_buf_type type;
+ union
+ {
+ struct v4l2_captureparm capture;
+ struct v4l2_outputparm output;
+ __u8 raw_data[200];
+ } parm;
+};
+
+#define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability)
+#define VIDIOC_RESERVED _IO ('V', 1)
+#define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc)
+#define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format)
+#define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format)
+#define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers)
+#define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer)
+#define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer)
+#define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer)
+#define VIDIOC_OVERLAY _IOW ('V', 14, int)
+#define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer)
+#define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer)
+#define VIDIOC_STREAMON _IOW ('V', 18, int)
+#define VIDIOC_STREAMOFF _IOW ('V', 19, int)
+#define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm)
+#define VIDIOC_S_PARM _IOWR ('V', 22, struct v4l2_streamparm)
+#define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id)
+#define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id)
+#define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard)
+#define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input)
+#define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control)
+#define VIDIOC_S_CTRL _IOWR ('V', 28, struct v4l2_control)
+#define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner)
+#define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner)
+#define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio)
+#define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio)
+#define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl)
+#define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu)
+#define VIDIOC_G_INPUT _IOR ('V', 38, int)
+#define VIDIOC_S_INPUT _IOWR ('V', 39, int)
+#define VIDIOC_G_OUTPUT _IOR ('V', 46, int)
+#define VIDIOC_S_OUTPUT _IOWR ('V', 47, int)
+#define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output)
+#define VIDIOC_G_AUDOUT _IOR ('V', 49, struct v4l2_audioout)
+#define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout)
+#define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator)
+#define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator)
+#define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency)
+#define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency)
+#define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap)
+#define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop)
+#define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop)
+#define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression)
+#define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression)
+#define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id)
+#define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format)
+#define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio)
+#define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout)
+#define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority)
+#define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority)
+#define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap)
+#define VIDIOC_LOG_STATUS _IO ('V', 70)
+#define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls)
+#define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls)
+#define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls)
+
+#ifdef __OLD_VIDIOC_
+
+#define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int)
+#define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm)
+#define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control)
+#define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio)
+#define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout)
+#define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap)
+#endif
+
+#define BASE_VIDIOC_PRIVATE 192
+
+#endif
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/vmalloc.h b/6/platforms/android-3/arch-x86/usr/include/linux/vmalloc.h
new file mode 100644
index 0000000..c7fd103
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/vmalloc.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VMALLOC_H
+#define _LINUX_VMALLOC_H
+
+#include <linux/spinlock.h>
+#include <asm/page.h>
+
+struct vm_area_struct;
+
+#define VM_IOREMAP 0x00000001
+#define VM_ALLOC 0x00000002
+#define VM_MAP 0x00000004
+#define VM_USERMAP 0x00000008
+#define VM_VPAGES 0x00000010
+
+#ifndef IOREMAP_MAX_ORDER
+#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)
+#endif
+
+struct vm_struct {
+ void *addr;
+ unsigned long size;
+ unsigned long flags;
+ struct page **pages;
+ unsigned int nr_pages;
+ unsigned long phys_addr;
+ struct vm_struct *next;
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/vt.h b/6/platforms/android-3/arch-x86/usr/include/linux/vt.h
new file mode 100644
index 0000000..9992b3a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/vt.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VT_H
+#define _LINUX_VT_H
+
+#define MIN_NR_CONSOLES 1
+#define MAX_NR_CONSOLES 63
+#define MAX_NR_USER_CONSOLES 63
+
+#define VT_OPENQRY 0x5600
+
+struct vt_mode {
+ char mode;
+ char waitv;
+ short relsig;
+ short acqsig;
+ short frsig;
+};
+#define VT_GETMODE 0x5601
+#define VT_SETMODE 0x5602
+#define VT_AUTO 0x00
+#define VT_PROCESS 0x01
+#define VT_ACKACQ 0x02
+
+struct vt_stat {
+ unsigned short v_active;
+ unsigned short v_signal;
+ unsigned short v_state;
+};
+#define VT_GETSTATE 0x5603
+#define VT_SENDSIG 0x5604
+
+#define VT_RELDISP 0x5605
+
+#define VT_ACTIVATE 0x5606
+#define VT_WAITACTIVE 0x5607
+#define VT_DISALLOCATE 0x5608
+
+struct vt_sizes {
+ unsigned short v_rows;
+ unsigned short v_cols;
+ unsigned short v_scrollsize;
+};
+#define VT_RESIZE 0x5609
+
+struct vt_consize {
+ unsigned short v_rows;
+ unsigned short v_cols;
+ unsigned short v_vlin;
+ unsigned short v_clin;
+ unsigned short v_vcol;
+ unsigned short v_ccol;
+};
+#define VT_RESIZEX 0x560A
+#define VT_LOCKSWITCH 0x560B
+#define VT_UNLOCKSWITCH 0x560C
+#define VT_GETHIFONTMASK 0x560D
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/vt_buffer.h b/6/platforms/android-3/arch-x86/usr/include/linux/vt_buffer.h
new file mode 100644
index 0000000..46ce79d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/vt_buffer.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VT_BUFFER_H_
+#define _LINUX_VT_BUFFER_H_
+
+#ifndef VT_BUF_HAVE_RW
+#define scr_writew(val, addr) (*(addr) = (val))
+#define scr_readw(addr) (*(addr))
+#define scr_memcpyw(d, s, c) memcpy(d, s, c)
+#define scr_memmovew(d, s, c) memmove(d, s, c)
+#define VT_BUF_HAVE_MEMCPYW
+#define VT_BUF_HAVE_MEMMOVEW
+#endif
+
+#ifndef VT_BUF_HAVE_MEMSETW
+#endif
+#ifndef VT_BUF_HAVE_MEMCPYW
+#endif
+#ifndef VT_BUF_HAVE_MEMMOVEW
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/wait.h b/6/platforms/android-3/arch-x86/usr/include/linux/wait.h
new file mode 100644
index 0000000..7d9aa68
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/wait.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WAIT_H
+#define _LINUX_WAIT_H
+
+#define WNOHANG 0x00000001
+#define WUNTRACED 0x00000002
+#define WSTOPPED WUNTRACED
+#define WEXITED 0x00000004
+#define WCONTINUED 0x00000008
+#define WNOWAIT 0x01000000
+
+#define __WNOTHREAD 0x20000000
+#define __WALL 0x40000000
+#define __WCLONE 0x80000000
+
+#define P_ALL 0
+#define P_PID 1
+#define P_PGID 2
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/wanrouter.h b/6/platforms/android-3/arch-x86/usr/include/linux/wanrouter.h
new file mode 100644
index 0000000..8f25a86
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/wanrouter.h
@@ -0,0 +1,356 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ROUTER_H
+#define _ROUTER_H
+
+#define ROUTER_NAME "wanrouter"
+#define ROUTER_VERSION 1
+#define ROUTER_RELEASE 1
+#define ROUTER_IOCTL 'W'
+#define ROUTER_MAGIC 0x524D4157L
+
+enum router_ioctls
+{
+ ROUTER_SETUP = ROUTER_IOCTL<<8,
+ ROUTER_DOWN,
+ ROUTER_STAT,
+ ROUTER_IFNEW,
+ ROUTER_IFDEL,
+ ROUTER_IFSTAT,
+ ROUTER_USER = (ROUTER_IOCTL<<8)+16,
+ ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
+};
+
+#define PROC_DATA_PORT_0 0x8000
+#define PROC_DATA_PORT_1 0x8001
+
+#define NLPID_IP 0xCC
+#define NLPID_SNAP 0x80
+#define NLPID_CLNP 0x81
+#define NLPID_ESIS 0x82
+#define NLPID_ISIS 0x83
+#define NLPID_Q933 0x08
+
+#define WAN_IFNAME_SZ 15
+#define WAN_DRVNAME_SZ 15
+#define WAN_ADDRESS_SZ 31
+#define USED_BY_FIELD 8
+
+#define UDP_PTPIPE_TYPE 0x01
+#define UDP_FPIPE_TYPE 0x02
+#define UDP_CPIPE_TYPE 0x03
+#define UDP_DRVSTATS_TYPE 0x04
+#define UDP_INVALID_TYPE 0x05
+
+#define CMD_OK 0
+#define CMD_TIMEOUT 0xFF
+
+#define UDP_PKT_FRM_STACK 0x00
+#define UDP_PKT_FRM_NETWORK 0x01
+
+#define MAX_INTR_TEST_COUNTER 100
+
+#define CRITICAL_IN_ISR 0xA1
+#define CRITICAL_INTR_HANDLED 0xB1
+
+typedef struct wan_x25_conf
+{
+ unsigned lo_pvc;
+ unsigned hi_pvc;
+ unsigned lo_svc;
+ unsigned hi_svc;
+ unsigned hdlc_window;
+ unsigned pkt_window;
+ unsigned t1;
+ unsigned t2;
+ unsigned t4;
+ unsigned n2;
+ unsigned t10_t20;
+ unsigned t11_t21;
+ unsigned t12_t22;
+ unsigned t13_t23;
+ unsigned t16_t26;
+ unsigned t28;
+ unsigned r10_r20;
+ unsigned r12_r22;
+ unsigned r13_r23;
+ unsigned ccitt_compat;
+ unsigned x25_conf_opt;
+ unsigned char LAPB_hdlc_only;
+ unsigned char logging;
+ unsigned char oob_on_modem;
+} wan_x25_conf_t;
+
+typedef struct wan_fr_conf
+{
+ unsigned signalling;
+ unsigned t391;
+ unsigned t392;
+ unsigned n391;
+ unsigned n392;
+ unsigned n393;
+ unsigned dlci_num;
+ unsigned dlci[100];
+} wan_fr_conf_t;
+
+typedef struct wan_ppp_conf
+{
+ unsigned restart_tmr;
+ unsigned auth_rsrt_tmr;
+ unsigned auth_wait_tmr;
+ unsigned mdm_fail_tmr;
+ unsigned dtr_drop_tmr;
+ unsigned connect_tmout;
+ unsigned conf_retry;
+ unsigned term_retry;
+ unsigned fail_retry;
+ unsigned auth_retry;
+ unsigned auth_options;
+ unsigned ip_options;
+ char authenticator;
+ char ip_mode;
+} wan_ppp_conf_t;
+
+typedef struct wan_chdlc_conf
+{
+ unsigned char ignore_dcd;
+ unsigned char ignore_cts;
+ unsigned char ignore_keepalive;
+ unsigned char hdlc_streaming;
+ unsigned char receive_only;
+ unsigned keepalive_tx_tmr;
+ unsigned keepalive_rx_tmr;
+ unsigned keepalive_err_margin;
+ unsigned slarp_timer;
+} wan_chdlc_conf_t;
+
+typedef struct wandev_conf
+{
+ unsigned magic;
+ unsigned config_id;
+
+ unsigned ioport;
+ unsigned long maddr;
+ unsigned msize;
+ int irq;
+ int dma;
+ char S514_CPU_no[1];
+ unsigned PCI_slot_no;
+ char auto_pci_cfg;
+ char comm_port;
+ unsigned bps;
+ unsigned mtu;
+ unsigned udp_port;
+ unsigned char ttl;
+ unsigned char ft1;
+ char interface;
+ char clocking;
+ char line_coding;
+ char station;
+ char connection;
+ char read_mode;
+ char receive_only;
+ char tty;
+ unsigned tty_major;
+ unsigned tty_minor;
+ unsigned tty_mode;
+ char backup;
+ unsigned hw_opt[4];
+ unsigned reserved[4];
+
+ unsigned data_size;
+ void* data;
+ union
+ {
+ wan_x25_conf_t x25;
+ wan_ppp_conf_t ppp;
+ wan_fr_conf_t fr;
+ wan_chdlc_conf_t chdlc;
+ } u;
+} wandev_conf_t;
+
+#define WANCONFIG_X25 101
+#define WANCONFIG_FR 102
+#define WANCONFIG_PPP 103
+#define WANCONFIG_CHDLC 104
+#define WANCONFIG_BSC 105
+#define WANCONFIG_HDLC 106
+#define WANCONFIG_MPPP 107
+
+#define WANOPT_OFF 0
+#define WANOPT_ON 1
+#define WANOPT_NO 0
+#define WANOPT_YES 1
+
+#define WANOPT_RS232 0
+#define WANOPT_V35 1
+
+#define WANOPT_NRZ 0
+#define WANOPT_NRZI 1
+#define WANOPT_FM0 2
+#define WANOPT_FM1 3
+
+#define WANOPT_POINTTOPOINT 0
+#define WANOPT_MULTIDROP 1
+
+#define WANOPT_EXTERNAL 0
+#define WANOPT_INTERNAL 1
+
+#define WANOPT_DTE 0
+#define WANOPT_DCE 1
+#define WANOPT_CPE 0
+#define WANOPT_NODE 1
+#define WANOPT_SECONDARY 0
+#define WANOPT_PRIMARY 1
+
+#define WANOPT_PERMANENT 0
+#define WANOPT_SWITCHED 1
+#define WANOPT_ONDEMAND 2
+
+#define WANOPT_FR_ANSI 1
+#define WANOPT_FR_Q933 2
+#define WANOPT_FR_LMI 3
+
+#define WANOPT_PPP_STATIC 0
+#define WANOPT_PPP_HOST 1
+#define WANOPT_PPP_PEER 2
+
+#define WANOPT_ONE 1
+#define WANOPT_TWO 2
+#define WANOPT_ONE_AND_HALF 3
+
+#define WANOPT_NONE 0
+#define WANOPT_ODD 1
+#define WANOPT_EVEN 2
+
+#define WANOPT_PRI 0
+#define WANOPT_SEC 1
+
+#define WANOPT_INTR 0
+#define WANOPT_POLL 1
+
+#define WANOPT_TTY_SYNC 0
+#define WANOPT_TTY_ASYNC 1
+
+typedef struct wandev_stat
+{
+ unsigned state;
+ unsigned ndev;
+
+ unsigned connection;
+ unsigned media_type;
+ unsigned mtu;
+
+ unsigned modem_status;
+ unsigned rx_frames;
+ unsigned rx_overruns;
+ unsigned rx_crc_err;
+ unsigned rx_aborts;
+ unsigned rx_bad_length;
+ unsigned rx_dropped;
+ unsigned tx_frames;
+ unsigned tx_underruns;
+ unsigned tx_timeouts;
+ unsigned tx_rejects;
+
+ unsigned rx_bad_format;
+ unsigned rx_bad_addr;
+ unsigned tx_retries;
+ unsigned reserved[16];
+} wandev_stat_t;
+
+enum wan_states
+{
+ WAN_UNCONFIGURED,
+ WAN_DISCONNECTED,
+ WAN_CONNECTING,
+ WAN_CONNECTED,
+ WAN_LIMIT,
+ WAN_DUALPORT,
+ WAN_DISCONNECTING,
+ WAN_FT1_READY
+};
+
+enum {
+ WAN_LOCAL_IP,
+ WAN_POINTOPOINT_IP,
+ WAN_NETMASK_IP,
+ WAN_BROADCAST_IP
+};
+
+#define WAN_MODEM_CTS 0x0001
+#define WAN_MODEM_DCD 0x0002
+#define WAN_MODEM_DTR 0x0010
+#define WAN_MODEM_RTS 0x0020
+
+typedef struct wanif_conf
+{
+ unsigned magic;
+ unsigned config_id;
+ char name[WAN_IFNAME_SZ+1];
+ char addr[WAN_ADDRESS_SZ+1];
+ char usedby[USED_BY_FIELD];
+ unsigned idle_timeout;
+ unsigned hold_timeout;
+ unsigned cir;
+ unsigned bc;
+ unsigned be;
+ unsigned char enable_IPX;
+ unsigned char inarp;
+ unsigned inarp_interval;
+ unsigned long network_number;
+ char mc;
+ char local_addr[WAN_ADDRESS_SZ+1];
+ unsigned char port;
+ unsigned char protocol;
+ char pap;
+ char chap;
+ unsigned char userid[511];
+ unsigned char passwd[511];
+ unsigned char sysname[31];
+ unsigned char ignore_dcd;
+ unsigned char ignore_cts;
+ unsigned char ignore_keepalive;
+ unsigned char hdlc_streaming;
+ unsigned keepalive_tx_tmr;
+ unsigned keepalive_rx_tmr;
+ unsigned keepalive_err_margin;
+ unsigned slarp_timer;
+ unsigned char ttl;
+ char interface;
+ char clocking;
+ unsigned bps;
+ unsigned mtu;
+ unsigned char if_down;
+ unsigned char gateway;
+ unsigned char true_if_encoding;
+
+ unsigned char asy_data_trans;
+ unsigned char rts_hs_for_receive;
+ unsigned char xon_xoff_hs_for_receive;
+ unsigned char xon_xoff_hs_for_transmit;
+ unsigned char dcd_hs_for_transmit;
+ unsigned char cts_hs_for_transmit;
+ unsigned char async_mode;
+ unsigned tx_bits_per_char;
+ unsigned rx_bits_per_char;
+ unsigned stop_bits;
+ unsigned char parity;
+ unsigned break_timer;
+ unsigned inter_char_timer;
+ unsigned rx_complete_length;
+ unsigned xon_char;
+ unsigned xoff_char;
+ unsigned char receive_only;
+} wanif_conf_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/wireless.h b/6/platforms/android-3/arch-x86/usr/include/linux/wireless.h
new file mode 100644
index 0000000..81ceb75
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/wireless.h
@@ -0,0 +1,542 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WIRELESS_H
+#define _LINUX_WIRELESS_H
+
+#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/if.h>
+
+#define WIRELESS_EXT 20
+
+#define SIOCSIWCOMMIT 0x8B00
+#define SIOCGIWNAME 0x8B01
+
+#define SIOCSIWNWID 0x8B02
+#define SIOCGIWNWID 0x8B03
+#define SIOCSIWFREQ 0x8B04
+#define SIOCGIWFREQ 0x8B05
+#define SIOCSIWMODE 0x8B06
+#define SIOCGIWMODE 0x8B07
+#define SIOCSIWSENS 0x8B08
+#define SIOCGIWSENS 0x8B09
+
+#define SIOCSIWRANGE 0x8B0A
+#define SIOCGIWRANGE 0x8B0B
+#define SIOCSIWPRIV 0x8B0C
+#define SIOCGIWPRIV 0x8B0D
+#define SIOCSIWSTATS 0x8B0E
+#define SIOCGIWSTATS 0x8B0F
+
+#define SIOCSIWSPY 0x8B10
+#define SIOCGIWSPY 0x8B11
+#define SIOCSIWTHRSPY 0x8B12
+#define SIOCGIWTHRSPY 0x8B13
+
+#define SIOCSIWAP 0x8B14
+#define SIOCGIWAP 0x8B15
+#define SIOCGIWAPLIST 0x8B17
+#define SIOCSIWSCAN 0x8B18
+#define SIOCGIWSCAN 0x8B19
+
+#define SIOCSIWESSID 0x8B1A
+#define SIOCGIWESSID 0x8B1B
+#define SIOCSIWNICKN 0x8B1C
+#define SIOCGIWNICKN 0x8B1D
+
+#define SIOCSIWRATE 0x8B20
+#define SIOCGIWRATE 0x8B21
+#define SIOCSIWRTS 0x8B22
+#define SIOCGIWRTS 0x8B23
+#define SIOCSIWFRAG 0x8B24
+#define SIOCGIWFRAG 0x8B25
+#define SIOCSIWTXPOW 0x8B26
+#define SIOCGIWTXPOW 0x8B27
+#define SIOCSIWRETRY 0x8B28
+#define SIOCGIWRETRY 0x8B29
+
+#define SIOCSIWENCODE 0x8B2A
+#define SIOCGIWENCODE 0x8B2B
+
+#define SIOCSIWPOWER 0x8B2C
+#define SIOCGIWPOWER 0x8B2D
+
+#define SIOCSIWGENIE 0x8B30
+#define SIOCGIWGENIE 0x8B31
+
+#define SIOCSIWMLME 0x8B16
+
+#define SIOCSIWAUTH 0x8B32
+#define SIOCGIWAUTH 0x8B33
+
+#define SIOCSIWENCODEEXT 0x8B34
+#define SIOCGIWENCODEEXT 0x8B35
+
+#define SIOCSIWPMKSA 0x8B36
+
+#define SIOCIWFIRSTPRIV 0x8BE0
+#define SIOCIWLASTPRIV 0x8BFF
+
+#define SIOCIWFIRST 0x8B00
+#define SIOCIWLAST SIOCIWLASTPRIV
+#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
+
+#define IW_IS_SET(cmd) (!((cmd) & 0x1))
+#define IW_IS_GET(cmd) ((cmd) & 0x1)
+
+#define IWEVTXDROP 0x8C00
+#define IWEVQUAL 0x8C01
+#define IWEVCUSTOM 0x8C02
+#define IWEVREGISTERED 0x8C03
+#define IWEVEXPIRED 0x8C04
+#define IWEVGENIE 0x8C05
+#define IWEVMICHAELMICFAILURE 0x8C06
+#define IWEVASSOCREQIE 0x8C07
+#define IWEVASSOCRESPIE 0x8C08
+#define IWEVPMKIDCAND 0x8C09
+
+#define IWEVFIRST 0x8C00
+#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
+
+#define IW_PRIV_TYPE_MASK 0x7000
+#define IW_PRIV_TYPE_NONE 0x0000
+#define IW_PRIV_TYPE_BYTE 0x1000
+#define IW_PRIV_TYPE_CHAR 0x2000
+#define IW_PRIV_TYPE_INT 0x4000
+#define IW_PRIV_TYPE_FLOAT 0x5000
+#define IW_PRIV_TYPE_ADDR 0x6000
+
+#define IW_PRIV_SIZE_FIXED 0x0800
+
+#define IW_PRIV_SIZE_MASK 0x07FF
+
+#define IW_MAX_FREQUENCIES 32
+
+#define IW_MAX_BITRATES 32
+
+#define IW_MAX_TXPOWER 8
+
+#define IW_MAX_SPY 8
+
+#define IW_MAX_AP 64
+
+#define IW_ESSID_MAX_SIZE 32
+
+#define IW_MODE_AUTO 0
+#define IW_MODE_ADHOC 1
+#define IW_MODE_INFRA 2
+#define IW_MODE_MASTER 3
+#define IW_MODE_REPEAT 4
+#define IW_MODE_SECOND 5
+#define IW_MODE_MONITOR 6
+
+#define IW_QUAL_QUAL_UPDATED 0x01
+#define IW_QUAL_LEVEL_UPDATED 0x02
+#define IW_QUAL_NOISE_UPDATED 0x04
+#define IW_QUAL_ALL_UPDATED 0x07
+#define IW_QUAL_DBM 0x08
+#define IW_QUAL_QUAL_INVALID 0x10
+#define IW_QUAL_LEVEL_INVALID 0x20
+#define IW_QUAL_NOISE_INVALID 0x40
+#define IW_QUAL_ALL_INVALID 0x70
+
+#define IW_FREQ_AUTO 0x00
+#define IW_FREQ_FIXED 0x01
+
+#define IW_MAX_ENCODING_SIZES 8
+
+#define IW_ENCODING_TOKEN_MAX 64
+
+#define IW_ENCODE_INDEX 0x00FF
+#define IW_ENCODE_FLAGS 0xFF00
+#define IW_ENCODE_MODE 0xF000
+#define IW_ENCODE_DISABLED 0x8000
+#define IW_ENCODE_ENABLED 0x0000
+#define IW_ENCODE_RESTRICTED 0x4000
+#define IW_ENCODE_OPEN 0x2000
+#define IW_ENCODE_NOKEY 0x0800
+#define IW_ENCODE_TEMP 0x0400
+
+#define IW_POWER_ON 0x0000
+#define IW_POWER_TYPE 0xF000
+#define IW_POWER_PERIOD 0x1000
+#define IW_POWER_TIMEOUT 0x2000
+#define IW_POWER_MODE 0x0F00
+#define IW_POWER_UNICAST_R 0x0100
+#define IW_POWER_MULTICAST_R 0x0200
+#define IW_POWER_ALL_R 0x0300
+#define IW_POWER_FORCE_S 0x0400
+#define IW_POWER_REPEATER 0x0800
+#define IW_POWER_MODIFIER 0x000F
+#define IW_POWER_MIN 0x0001
+#define IW_POWER_MAX 0x0002
+#define IW_POWER_RELATIVE 0x0004
+
+#define IW_TXPOW_TYPE 0x00FF
+#define IW_TXPOW_DBM 0x0000
+#define IW_TXPOW_MWATT 0x0001
+#define IW_TXPOW_RELATIVE 0x0002
+#define IW_TXPOW_RANGE 0x1000
+
+#define IW_RETRY_ON 0x0000
+#define IW_RETRY_TYPE 0xF000
+#define IW_RETRY_LIMIT 0x1000
+#define IW_RETRY_LIFETIME 0x2000
+#define IW_RETRY_MODIFIER 0x000F
+#define IW_RETRY_MIN 0x0001
+#define IW_RETRY_MAX 0x0002
+#define IW_RETRY_RELATIVE 0x0004
+
+#define IW_SCAN_DEFAULT 0x0000
+#define IW_SCAN_ALL_ESSID 0x0001
+#define IW_SCAN_THIS_ESSID 0x0002
+#define IW_SCAN_ALL_FREQ 0x0004
+#define IW_SCAN_THIS_FREQ 0x0008
+#define IW_SCAN_ALL_MODE 0x0010
+#define IW_SCAN_THIS_MODE 0x0020
+#define IW_SCAN_ALL_RATE 0x0040
+#define IW_SCAN_THIS_RATE 0x0080
+
+#define IW_SCAN_TYPE_ACTIVE 0
+#define IW_SCAN_TYPE_PASSIVE 1
+
+#define IW_SCAN_MAX_DATA 4096
+
+#define IW_CUSTOM_MAX 256
+
+#define IW_GENERIC_IE_MAX 1024
+
+#define IW_MLME_DEAUTH 0
+#define IW_MLME_DISASSOC 1
+
+#define IW_AUTH_INDEX 0x0FFF
+#define IW_AUTH_FLAGS 0xF000
+
+#define IW_AUTH_WPA_VERSION 0
+#define IW_AUTH_CIPHER_PAIRWISE 1
+#define IW_AUTH_CIPHER_GROUP 2
+#define IW_AUTH_KEY_MGMT 3
+#define IW_AUTH_TKIP_COUNTERMEASURES 4
+#define IW_AUTH_DROP_UNENCRYPTED 5
+#define IW_AUTH_80211_AUTH_ALG 6
+#define IW_AUTH_WPA_ENABLED 7
+#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
+#define IW_AUTH_ROAMING_CONTROL 9
+#define IW_AUTH_PRIVACY_INVOKED 10
+
+#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
+#define IW_AUTH_WPA_VERSION_WPA 0x00000002
+#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
+
+#define IW_AUTH_CIPHER_NONE 0x00000001
+#define IW_AUTH_CIPHER_WEP40 0x00000002
+#define IW_AUTH_CIPHER_TKIP 0x00000004
+#define IW_AUTH_CIPHER_CCMP 0x00000008
+#define IW_AUTH_CIPHER_WEP104 0x00000010
+
+#define IW_AUTH_KEY_MGMT_802_1X 1
+#define IW_AUTH_KEY_MGMT_PSK 2
+
+#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
+#define IW_AUTH_ALG_SHARED_KEY 0x00000002
+#define IW_AUTH_ALG_LEAP 0x00000004
+
+#define IW_AUTH_ROAMING_ENABLE 0
+#define IW_AUTH_ROAMING_DISABLE 1
+
+#define IW_ENCODE_SEQ_MAX_SIZE 8
+
+#define IW_ENCODE_ALG_NONE 0
+#define IW_ENCODE_ALG_WEP 1
+#define IW_ENCODE_ALG_TKIP 2
+#define IW_ENCODE_ALG_CCMP 3
+
+#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
+#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
+#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
+#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
+
+#define IW_MICFAILURE_KEY_ID 0x00000003
+#define IW_MICFAILURE_GROUP 0x00000004
+#define IW_MICFAILURE_PAIRWISE 0x00000008
+#define IW_MICFAILURE_STAKEY 0x00000010
+#define IW_MICFAILURE_COUNT 0x00000060
+
+#define IW_ENC_CAPA_WPA 0x00000001
+#define IW_ENC_CAPA_WPA2 0x00000002
+#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
+#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
+
+#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : (cmd - SIOCSIWCOMMIT))
+#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
+#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
+
+#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A))
+#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
+
+#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
+#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
+
+struct iw_param
+{
+ __s32 value;
+ __u8 fixed;
+ __u8 disabled;
+ __u16 flags;
+};
+
+struct iw_point
+{
+ void __user *pointer;
+ __u16 length;
+ __u16 flags;
+};
+
+struct iw_freq
+{
+ __s32 m;
+ __s16 e;
+ __u8 i;
+ __u8 flags;
+};
+
+struct iw_quality
+{
+ __u8 qual;
+ __u8 level;
+ __u8 noise;
+ __u8 updated;
+};
+
+struct iw_discarded
+{
+ __u32 nwid;
+ __u32 code;
+ __u32 fragment;
+ __u32 retries;
+ __u32 misc;
+};
+
+struct iw_missed
+{
+ __u32 beacon;
+};
+
+struct iw_thrspy
+{
+ struct sockaddr addr;
+ struct iw_quality qual;
+ struct iw_quality low;
+ struct iw_quality high;
+};
+
+struct iw_scan_req
+{
+ __u8 scan_type;
+ __u8 essid_len;
+ __u8 num_channels;
+ __u8 flags;
+ struct sockaddr bssid;
+
+ __u8 essid[IW_ESSID_MAX_SIZE];
+
+ __u32 min_channel_time;
+ __u32 max_channel_time;
+
+ struct iw_freq channel_list[IW_MAX_FREQUENCIES];
+};
+
+struct iw_encode_ext
+{
+ __u32 ext_flags;
+ __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE];
+ __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE];
+ struct sockaddr addr;
+ __u16 alg;
+ __u16 key_len;
+ __u8 key[0];
+};
+
+struct iw_mlme
+{
+ __u16 cmd;
+ __u16 reason_code;
+ struct sockaddr addr;
+};
+
+#define IW_PMKSA_ADD 1
+#define IW_PMKSA_REMOVE 2
+#define IW_PMKSA_FLUSH 3
+
+#define IW_PMKID_LEN 16
+
+struct iw_pmksa
+{
+ __u32 cmd;
+ struct sockaddr bssid;
+ __u8 pmkid[IW_PMKID_LEN];
+};
+
+struct iw_michaelmicfailure
+{
+ __u32 flags;
+ struct sockaddr src_addr;
+ __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE];
+};
+
+#define IW_PMKID_CAND_PREAUTH 0x00000001
+struct iw_pmkid_cand
+{
+ __u32 flags;
+ __u32 index;
+ struct sockaddr bssid;
+};
+
+struct iw_statistics
+{
+ __u16 status;
+
+ struct iw_quality qual;
+ struct iw_discarded discard;
+ struct iw_missed miss;
+};
+
+union iwreq_data
+{
+
+ char name[IFNAMSIZ];
+
+ struct iw_point essid;
+ struct iw_param nwid;
+ struct iw_freq freq;
+
+ struct iw_param sens;
+ struct iw_param bitrate;
+ struct iw_param txpower;
+ struct iw_param rts;
+ struct iw_param frag;
+ __u32 mode;
+ struct iw_param retry;
+
+ struct iw_point encoding;
+ struct iw_param power;
+ struct iw_quality qual;
+
+ struct sockaddr ap_addr;
+ struct sockaddr addr;
+
+ struct iw_param param;
+ struct iw_point data;
+};
+
+struct iwreq
+{
+ union
+ {
+ char ifrn_name[IFNAMSIZ];
+ } ifr_ifrn;
+
+ union iwreq_data u;
+};
+
+struct iw_range
+{
+
+ __u32 throughput;
+
+ __u32 min_nwid;
+ __u32 max_nwid;
+
+ __u16 old_num_channels;
+ __u8 old_num_frequency;
+
+ __u32 event_capa[6];
+
+ __s32 sensitivity;
+
+ struct iw_quality max_qual;
+
+ struct iw_quality avg_qual;
+
+ __u8 num_bitrates;
+ __s32 bitrate[IW_MAX_BITRATES];
+
+ __s32 min_rts;
+ __s32 max_rts;
+
+ __s32 min_frag;
+ __s32 max_frag;
+
+ __s32 min_pmp;
+ __s32 max_pmp;
+ __s32 min_pmt;
+ __s32 max_pmt;
+ __u16 pmp_flags;
+ __u16 pmt_flags;
+ __u16 pm_capa;
+
+ __u16 encoding_size[IW_MAX_ENCODING_SIZES];
+ __u8 num_encoding_sizes;
+ __u8 max_encoding_tokens;
+
+ __u8 encoding_login_index;
+
+ __u16 txpower_capa;
+ __u8 num_txpower;
+ __s32 txpower[IW_MAX_TXPOWER];
+
+ __u8 we_version_compiled;
+ __u8 we_version_source;
+
+ __u16 retry_capa;
+ __u16 retry_flags;
+ __u16 r_time_flags;
+ __s32 min_retry;
+ __s32 max_retry;
+ __s32 min_r_time;
+ __s32 max_r_time;
+
+ __u16 num_channels;
+ __u8 num_frequency;
+ struct iw_freq freq[IW_MAX_FREQUENCIES];
+
+ __u32 enc_capa;
+};
+
+struct iw_priv_args
+{
+ __u32 cmd;
+ __u16 set_args;
+ __u16 get_args;
+ char name[IFNAMSIZ];
+};
+
+struct iw_event
+{
+ __u16 len;
+ __u16 cmd;
+ union iwreq_data u;
+};
+
+#define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
+
+#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
+#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
+#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
+#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
+#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
+#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
+
+#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - (char *) NULL)
+#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/workqueue.h b/6/platforms/android-3/arch-x86/usr/include/linux/workqueue.h
new file mode 100644
index 0000000..12fab2c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/workqueue.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_WORKQUEUE_H
+#define _LINUX_WORKQUEUE_H
+
+#include <linux/timer.h>
+#include <linux/linkage.h>
+#include <linux/bitops.h>
+
+struct workqueue_struct;
+
+struct work_struct {
+ unsigned long pending;
+ struct list_head entry;
+ void (*func)(void *);
+ void *data;
+ void *wq_data;
+ struct timer_list timer;
+};
+
+struct execute_work {
+ struct work_struct work;
+};
+
+#define __WORK_INITIALIZER(n, f, d) { .entry = { &(n).entry, &(n).entry }, .func = (f), .data = (d), .timer = TIMER_INITIALIZER(NULL, 0, 0), }
+
+#define DECLARE_WORK(n, f, d) struct work_struct n = __WORK_INITIALIZER(n, f, d)
+
+#define PREPARE_WORK(_work, _func, _data) do { (_work)->func = _func; (_work)->data = _data; } while (0)
+
+#define INIT_WORK(_work, _func, _data) do { INIT_LIST_HEAD(&(_work)->entry); (_work)->pending = 0; PREPARE_WORK((_work), (_func), (_data)); init_timer(&(_work)->timer); } while (0)
+
+#define create_workqueue(name) __create_workqueue((name), 0)
+#define create_singlethread_workqueue(name) __create_workqueue((name), 1)
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/xattr.h b/6/platforms/android-3/arch-x86/usr/include/linux/xattr.h
new file mode 100644
index 0000000..f5f640d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/xattr.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_XATTR_H
+#define _LINUX_XATTR_H
+
+#define XATTR_CREATE 0x1
+#define XATTR_REPLACE 0x2
+
+#define XATTR_OS2_PREFIX "os2."
+#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
+
+#define XATTR_SECURITY_PREFIX "security."
+#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
+
+#define XATTR_SYSTEM_PREFIX "system."
+#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
+
+#define XATTR_TRUSTED_PREFIX "trusted."
+#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
+
+#define XATTR_USER_PREFIX "user."
+#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
+
+struct xattr_handler {
+ char *prefix;
+ size_t (*list)(struct inode *inode, char *list, size_t list_size,
+ const char *name, size_t name_len);
+ int (*get)(struct inode *inode, const char *name, void *buffer,
+ size_t size);
+ int (*set)(struct inode *inode, const char *name, const void *buffer,
+ size_t size, int flags);
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/zconf.h b/6/platforms/android-3/arch-x86/usr/include/linux/zconf.h
new file mode 100644
index 0000000..18ea78c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/zconf.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ZCONF_H
+#define _ZCONF_H
+
+#ifndef MAX_MEM_LEVEL
+#define MAX_MEM_LEVEL 8
+#endif
+
+#ifndef MAX_WBITS
+#define MAX_WBITS 15
+#endif
+
+#ifndef DEF_WBITS
+#define DEF_WBITS MAX_WBITS
+#endif
+
+#if MAX_MEM_LEVEL >= 8
+#define DEF_MEM_LEVEL 8
+#else
+#define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+
+typedef unsigned char Byte;
+typedef unsigned int uInt;
+typedef unsigned long uLong;
+typedef void *voidp;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/zlib.h b/6/platforms/android-3/arch-x86/usr/include/linux/zlib.h
new file mode 100644
index 0000000..052adfe
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/zlib.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ZLIB_H
+#define _ZLIB_H
+
+#include <linux/zconf.h>
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Byte *next_in;
+ uInt avail_in;
+ uLong total_in;
+
+ Byte *next_out;
+ uInt avail_out;
+ uLong total_out;
+
+ char *msg;
+ struct internal_state *state;
+
+ void *workspace;
+
+ int data_type;
+ uLong adler;
+ uLong reserved;
+} z_stream;
+
+typedef z_stream *z_streamp;
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1
+#define Z_PACKET_FLUSH 2
+#define Z_SYNC_FLUSH 3
+#define Z_FULL_FLUSH 4
+#define Z_FINISH 5
+#define Z_BLOCK 6
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_DEFAULT_STRATEGY 0
+
+#define Z_BINARY 0
+#define Z_ASCII 1
+#define Z_UNKNOWN 2
+
+#define Z_DEFLATED 8
+
+#define zlib_deflateInit(strm, level) zlib_deflateInit2((strm), (level), Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY)
+#define zlib_inflateInit(strm) zlib_inflateInit2((strm), DEF_WBITS)
+
+#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;};
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/linux/zorro_ids.h b/6/platforms/android-3/arch-x86/usr/include/linux/zorro_ids.h
new file mode 100644
index 0000000..e6b1d48
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/linux/zorro_ids.h
@@ -0,0 +1,549 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3
+#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0)
+#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100
+#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0)
+
+#define ZORRO_MANUF_KUPKE_1 0x00DD
+#define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0)
+
+#define ZORRO_MANUF_MEMPHIS 0x0100
+#define ZORRO_PROD_MEMPHIS_STORMBRINGER ZORRO_ID(MEMPHIS, 0x00, 0)
+
+#define ZORRO_MANUF_3_STATE 0x0200
+#define ZORRO_PROD_3_STATE_MEGAMIX_2000 ZORRO_ID(3_STATE, 0x02, 0)
+
+#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG 0x0201
+#define ZORRO_PROD_CBM_A2088_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0)
+#define ZORRO_PROD_CBM_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0)
+#define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0)
+#define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202
+#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0)
+#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0)
+#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0)
+#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0)
+#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0)
+#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0)
+#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0)
+#define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0)
+#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0)
+#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0)
+#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0)
+#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0)
+#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0)
+#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0)
+#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0)
+#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0)
+#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0)
+
+#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203
+#define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4
+#define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0)
+
+#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF
+#define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0)
+
+#define ZORRO_MANUF_CARDCO_1 0x03EC
+#define ZORRO_PROD_CARDCO_KRONOS_2000_1 ZORRO_ID(CARDCO_1, 0x04, 0)
+#define ZORRO_PROD_CARDCO_A1000_1 ZORRO_ID(CARDCO_1, 0x0C, 0)
+#define ZORRO_PROD_CARDCO_ESCORT ZORRO_ID(CARDCO_1, 0x0E, 0)
+#define ZORRO_PROD_CARDCO_A2410 ZORRO_ID(CARDCO_1, 0xF5, 0)
+
+#define ZORRO_MANUF_A_SQUARED 0x03ED
+#define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0)
+
+#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE
+#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0)
+
+#define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1
+#define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0)
+
+#define ZORRO_MANUF_MICROBOTICS 0x03F2
+#define ZORRO_PROD_MICROBOTICS_STARBOARD_II ZORRO_ID(MICROBOTICS, 0x00, 0)
+#define ZORRO_PROD_MICROBOTICS_STARDRIVE ZORRO_ID(MICROBOTICS, 0x02, 0)
+#define ZORRO_PROD_MICROBOTICS_8_UP_A ZORRO_ID(MICROBOTICS, 0x03, 0)
+#define ZORRO_PROD_MICROBOTICS_8_UP_Z ZORRO_ID(MICROBOTICS, 0x04, 0)
+#define ZORRO_PROD_MICROBOTICS_DELTA_RAM ZORRO_ID(MICROBOTICS, 0x20, 0)
+#define ZORRO_PROD_MICROBOTICS_8_STAR_RAM ZORRO_ID(MICROBOTICS, 0x40, 0)
+#define ZORRO_PROD_MICROBOTICS_8_STAR ZORRO_ID(MICROBOTICS, 0x41, 0)
+#define ZORRO_PROD_MICROBOTICS_VXL_RAM_32 ZORRO_ID(MICROBOTICS, 0x44, 0)
+#define ZORRO_PROD_MICROBOTICS_VXL_68030 ZORRO_ID(MICROBOTICS, 0x45, 0)
+#define ZORRO_PROD_MICROBOTICS_DELTA ZORRO_ID(MICROBOTICS, 0x60, 0)
+#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM ZORRO_ID(MICROBOTICS, 0x81, 0)
+#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1 ZORRO_ID(MICROBOTICS, 0x96, 0)
+#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2 ZORRO_ID(MICROBOTICS, 0x9E, 0)
+#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z ZORRO_ID(MICROBOTICS, 0xC1, 0)
+
+#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA 0x03F4
+
+#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES 0x03F6
+
+#define ZORRO_MANUF_ASDG 0x03FF
+#define ZORRO_PROD_ASDG_MEMORY_1 ZORRO_ID(ASDG, 0x01, 0)
+#define ZORRO_PROD_ASDG_MEMORY_2 ZORRO_ID(ASDG, 0x02, 0)
+#define ZORRO_PROD_ASDG_EB920_LAN_ROVER ZORRO_ID(ASDG, 0xFE, 0)
+#define ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X ZORRO_ID(ASDG, 0xFF, 0)
+
+#define ZORRO_MANUF_IMTRONICS_1 0x0404
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_1 ZORRO_ID(IMTRONICS_1, 0x39, 0)
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_2 ZORRO_ID(IMTRONICS_1, 0x57, 0)
+
+#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL 0x0406
+#define ZORRO_PROD_CBM_A2410 ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0)
+
+#define ZORRO_MANUF_AMERISTAR 0x041D
+#define ZORRO_PROD_AMERISTAR_A2065 ZORRO_ID(AMERISTAR, 0x01, 0)
+#define ZORRO_PROD_AMERISTAR_A560 ZORRO_ID(AMERISTAR, 0x09, 0)
+#define ZORRO_PROD_AMERISTAR_A4066 ZORRO_ID(AMERISTAR, 0x0A, 0)
+
+#define ZORRO_MANUF_SUPRA 0x0420
+#define ZORRO_PROD_SUPRA_SUPRADRIVE_4x4 ZORRO_ID(SUPRA, 0x01, 0)
+#define ZORRO_PROD_SUPRA_1000_RAM ZORRO_ID(SUPRA, 0x02, 0)
+#define ZORRO_PROD_SUPRA_2000_DMA ZORRO_ID(SUPRA, 0x03, 0)
+#define ZORRO_PROD_SUPRA_500 ZORRO_ID(SUPRA, 0x05, 0)
+#define ZORRO_PROD_SUPRA_500_SCSI ZORRO_ID(SUPRA, 0x08, 0)
+#define ZORRO_PROD_SUPRA_500XP_2000_RAM ZORRO_ID(SUPRA, 0x09, 0)
+#define ZORRO_PROD_SUPRA_500RX_2000_RAM ZORRO_ID(SUPRA, 0x0A, 0)
+#define ZORRO_PROD_SUPRA_2400ZI ZORRO_ID(SUPRA, 0x0B, 0)
+#define ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC ZORRO_ID(SUPRA, 0x0C, 0)
+#define ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II ZORRO_ID(SUPRA, 0x0D, 0)
+#define ZORRO_PROD_SUPRA_2400ZIPLUS ZORRO_ID(SUPRA, 0x10, 0)
+
+#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES 0x0422
+#define ZORRO_PROD_CSA_MAGNUM ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0)
+#define ZORRO_PROD_CSA_12_GAUGE ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0)
+
+#define ZORRO_MANUF_MARC_MICHAEL_GROTH 0x0439
+
+#define ZORRO_MANUF_M_TECH 0x0502
+#define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0)
+
+#define ZORRO_MANUF_BYTEBOX 0x07DA
+#define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0)
+
+#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC
+#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0)
+#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0)
+#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0)
+#define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0)
+#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0)
+#define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20)
+#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30)
+#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40)
+#define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60)
+#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70)
+#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78)
+#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98)
+#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0)
+#define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0)
+#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0)
+#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0)
+#define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0)
+#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0)
+#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8)
+#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)
+
+#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0)
+#define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0)
+#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0)
+
+#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5
+#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0)
+
+#define ZORRO_MANUF_XETEC 0x07E6
+#define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0)
+#define ZORRO_PROD_XETEC_FASTCARD_RAM ZORRO_ID(XETEC, 0x02, 0)
+#define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0)
+
+#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA
+#define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0)
+#define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0)
+#define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0)
+#define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0)
+
+#define ZORRO_MANUF_XEBEC 0x07EC
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0)
+#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0)
+
+#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3
+
+#define ZORRO_MANUF_BSC_ALFADATA_1 0x07FE
+#define ZORRO_PROD_BSC_ALF_3_1 ZORRO_ID(BSC_ALFADATA_1, 0x03, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_2 0x0801
+#define ZORRO_PROD_BSC_ALF_2_1 ZORRO_ID(BSC_ALFADATA_2, 0x01, 0)
+#define ZORRO_PROD_BSC_ALF_2_2 ZORRO_ID(BSC_ALFADATA_2, 0x02, 0)
+#define ZORRO_PROD_BSC_ALF_3_2 ZORRO_ID(BSC_ALFADATA_2, 0x03, 0)
+
+#define ZORRO_MANUF_CARDCO_2 0x0802
+#define ZORRO_PROD_CARDCO_KRONOS_2000_2 ZORRO_ID(CARDCO_2, 0x04, 0)
+#define ZORRO_PROD_CARDCO_A1000_2 ZORRO_ID(CARDCO_2, 0x0C, 0)
+
+#define ZORRO_MANUF_JOCHHEIM 0x0804
+#define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0)
+
+#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807
+#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0)
+
+#define ZORRO_MANUF_EDOTRONIK 0x0810
+#define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0)
+#define ZORRO_PROD_EDOTRONIK_8032 ZORRO_ID(EDOTRONIK, 0x02, 0)
+#define ZORRO_PROD_EDOTRONIK_MULTISERIAL ZORRO_ID(EDOTRONIK, 0x03, 0)
+#define ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER ZORRO_ID(EDOTRONIK, 0x04, 0)
+#define ZORRO_PROD_EDOTRONIK_PARALLEL_IO ZORRO_ID(EDOTRONIK, 0x05, 0)
+#define ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING ZORRO_ID(EDOTRONIK, 0x06, 0)
+#define ZORRO_PROD_EDOTRONIK_ADC ZORRO_ID(EDOTRONIK, 0x07, 0)
+#define ZORRO_PROD_EDOTRONIK_VME ZORRO_ID(EDOTRONIK, 0x08, 0)
+#define ZORRO_PROD_EDOTRONIK_DSP96000 ZORRO_ID(EDOTRONIK, 0x09, 0)
+
+#define ZORRO_MANUF_NES_INC 0x0813
+#define ZORRO_PROD_NES_INC_RAM ZORRO_ID(NES_INC, 0x00, 0)
+
+#define ZORRO_MANUF_ICD 0x0817
+#define ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI ZORRO_ID(ICD, 0x01, 0)
+#define ZORRO_PROD_ICD_ADVANTAGE_IDE ZORRO_ID(ICD, 0x03, 0)
+#define ZORRO_PROD_ICD_ADVANTAGE_2080_RAM ZORRO_ID(ICD, 0x04, 0)
+
+#define ZORRO_MANUF_KUPKE_2 0x0819
+#define ZORRO_PROD_KUPKE_OMTI ZORRO_ID(KUPKE_2, 0x01, 0)
+#define ZORRO_PROD_KUPKE_SCSI_II ZORRO_ID(KUPKE_2, 0x02, 0)
+#define ZORRO_PROD_KUPKE_GOLEM_BOX ZORRO_ID(KUPKE_2, 0x03, 0)
+#define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0)
+#define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D
+#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0)
+#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0)
+
+#define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E
+
+#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820
+#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0)
+
+#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828
+#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0)
+#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0)
+
+#define ZORRO_MANUF_BSC_ALFADATA_3 0x082C
+#define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0)
+#define ZORRO_PROD_BSC_TANDEM_AT_2008_508 ZORRO_ID(BSC_ALFADATA_3, 0x06, 0)
+#define ZORRO_PROD_BSC_ALFA_RAM_1200 ZORRO_ID(BSC_ALFADATA_3, 0x07, 0)
+#define ZORRO_PROD_BSC_OKTAGON_2008_RAM ZORRO_ID(BSC_ALFADATA_3, 0x08, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_I ZORRO_ID(BSC_ALFADATA_3, 0x10, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_II ZORRO_ID(BSC_ALFADATA_3, 0x11, 0)
+#define ZORRO_PROD_BSC_MULTIFACE_III ZORRO_ID(BSC_ALFADATA_3, 0x12, 0)
+#define ZORRO_PROD_BSC_FRAMEMASTER_II ZORRO_ID(BSC_ALFADATA_3, 0x20, 0)
+#define ZORRO_PROD_BSC_GRAFFITI_RAM ZORRO_ID(BSC_ALFADATA_3, 0x21, 0)
+#define ZORRO_PROD_BSC_GRAFFITI_REG ZORRO_ID(BSC_ALFADATA_3, 0x22, 0)
+#define ZORRO_PROD_BSC_ISDN_MASTERCARD ZORRO_ID(BSC_ALFADATA_3, 0x40, 0)
+#define ZORRO_PROD_BSC_ISDN_MASTERCARD_II ZORRO_ID(BSC_ALFADATA_3, 0x41, 0)
+
+#define ZORRO_MANUF_PHOENIX 0x0835
+#define ZORRO_PROD_PHOENIX_ST506 ZORRO_ID(PHOENIX, 0x21, 0)
+#define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0)
+#define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0)
+
+#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836
+#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0)
+
+#define ZORRO_MANUF_IMPULSE 0x0838
+#define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0)
+
+#define ZORRO_MANUF_IVS 0x0840
+#define ZORRO_PROD_IVS_GRANDSLAM_PIC_2 ZORRO_ID(IVS, 0x02, 0)
+#define ZORRO_PROD_IVS_GRANDSLAM_PIC_1 ZORRO_ID(IVS, 0x04, 0)
+#define ZORRO_PROD_IVS_OVERDRIVE ZORRO_ID(IVS, 0x10, 0)
+#define ZORRO_PROD_IVS_TRUMPCARD_CLASSIC ZORRO_ID(IVS, 0x30, 0)
+#define ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM ZORRO_ID(IVS, 0x34, 0)
+#define ZORRO_PROD_IVS_META_4 ZORRO_ID(IVS, 0x40, 0)
+#define ZORRO_PROD_IVS_WAVETOOLS ZORRO_ID(IVS, 0xBF, 0)
+#define ZORRO_PROD_IVS_VECTOR_1 ZORRO_ID(IVS, 0xF3, 0)
+#define ZORRO_PROD_IVS_VECTOR_2 ZORRO_ID(IVS, 0xF4, 0)
+
+#define ZORRO_MANUF_VECTOR_1 0x0841
+#define ZORRO_PROD_VECTOR_CONNECTION_1 ZORRO_ID(VECTOR_1, 0xE3, 0)
+
+#define ZORRO_MANUF_XPERT_PRODEV 0x0845
+#define ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM ZORRO_ID(XPERT_PRODEV, 0x01, 0)
+#define ZORRO_PROD_XPERT_PRODEV_VISIONA_REG ZORRO_ID(XPERT_PRODEV, 0x02, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM ZORRO_ID(XPERT_PRODEV, 0x03, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1 ZORRO_ID(XPERT_PRODEV, 0x04, 0)
+#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2 ZORRO_ID(XPERT_PRODEV, 0xC9, 0)
+
+#define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849
+#define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0)
+
+#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0)
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0)
+#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0)
+
+#define ZORRO_MANUF_TRICERATOPS 0x0850
+#define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0)
+
+#define ZORRO_MANUF_APPLIED_MAGIC 0x0851
+#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0)
+#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0)
+
+#define ZORRO_MANUF_GFX_BASE 0x085E
+#define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0)
+#define ZORRO_PROD_GFX_BASE_GDA_1 ZORRO_ID(GFX_BASE, 0x01, 0)
+
+#define ZORRO_MANUF_ROCTEC 0x0860
+#define ZORRO_PROD_ROCTEC_RH_800C ZORRO_ID(ROCTEC, 0x01, 0)
+#define ZORRO_PROD_ROCTEC_RH_800C_RAM ZORRO_ID(ROCTEC, 0x01, 0)
+
+#define ZORRO_MANUF_KATO 0x0861
+#define ZORRO_PROD_KATO_MELODY ZORRO_ID(KATO, 0x80, 0)
+
+#define ZORRO_MANUF_HELFRICH_1 0x0861
+#define ZORRO_PROD_HELFRICH_RAINBOW_II ZORRO_ID(HELFRICH_1, 0x20, 0)
+#define ZORRO_PROD_HELFRICH_RAINBOW_III ZORRO_ID(HELFRICH_1, 0x21, 0)
+
+#define ZORRO_MANUF_ATLANTIS 0x0862
+
+#define ZORRO_MANUF_PROTAR 0x0864
+
+#define ZORRO_MANUF_ACS 0x0865
+
+#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866
+#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0)
+
+#define ZORRO_MANUF_MASOBOSHI 0x086D
+#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0)
+#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702 ZORRO_ID(MASOBOSHI, 0x04, 0)
+#define ZORRO_PROD_MASOBOSHI_MVD_819 ZORRO_ID(MASOBOSHI, 0x07, 0)
+
+#define ZORRO_MANUF_MAINHATTAN_DATA 0x086F
+#define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0)
+
+#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0)
+#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0)
+
+#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B
+#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0)
+#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0)
+
+#define ZORRO_MANUF_AMITRIX 0x0880
+#define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0)
+#define ZORRO_PROD_AMITRIX_CD_RAM ZORRO_ID(AMITRIX, 0x02, 0)
+
+#define ZORRO_MANUF_ARMAX 0x0885
+#define ZORRO_PROD_ARMAX_OMNIBUS ZORRO_ID(ARMAX, 0x00, 0)
+
+#define ZORRO_MANUF_ZEUS 0x088D
+#define ZORRO_PROD_ZEUS_SPIDER ZORRO_ID(ZEUS, 0x04, 0)
+
+#define ZORRO_MANUF_NEWTEK 0x088F
+#define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0)
+
+#define ZORRO_MANUF_M_TECH_GERMANY 0x0890
+#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0)
+#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0)
+#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0)
+#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0)
+#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0)
+#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0)
+#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0)
+
+#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891
+#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0)
+#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0)
+
+#define ZORRO_MANUF_APOLLO_1 0x0892
+#define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0)
+
+#define ZORRO_MANUF_HELFRICH_2 0x0893
+#define ZORRO_PROD_HELFRICH_PICCOLO_RAM ZORRO_ID(HELFRICH_2, 0x05, 0)
+#define ZORRO_PROD_HELFRICH_PICCOLO_REG ZORRO_ID(HELFRICH_2, 0x06, 0)
+#define ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG ZORRO_ID(HELFRICH_2, 0x07, 0)
+#define ZORRO_PROD_HELFRICH_VIDEOCRUNCHER ZORRO_ID(HELFRICH_2, 0x08, 0)
+#define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0)
+#define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B
+#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0)
+
+#define ZORRO_MANUF_ELBOX_COMPUTER 0x089E
+#define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0)
+
+#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00
+#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0)
+#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0)
+
+#define ZORRO_MANUF_MICRONIK 0x0A50
+#define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0)
+
+#define ZORRO_MANUF_MICRONIK2 0x0F0F
+#define ZORRO_PROD_MICRONIK2_Z3I ZORRO_ID(MICRONIK2, 0x01, 0)
+
+#define ZORRO_MANUF_MEGAMICRO 0x1000
+#define ZORRO_PROD_MEGAMICRO_SCRAM_500 ZORRO_ID(MEGAMICRO, 0x03, 0)
+#define ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM ZORRO_ID(MEGAMICRO, 0x04, 0)
+
+#define ZORRO_MANUF_IMTRONICS_2 0x1028
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_3 ZORRO_ID(IMTRONICS_2, 0x39, 0)
+#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0)
+
+#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0)
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0)
+#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0)
+
+#define ZORRO_MANUF_KUPKE_3 0x1248
+#define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0)
+
+#define ZORRO_MANUF_ITH 0x1388
+#define ZORRO_PROD_ITH_ISDN_MASTER_II ZORRO_ID(ITH, 0x01, 0)
+
+#define ZORRO_MANUF_VMC 0x1389
+#define ZORRO_PROD_VMC_ISDN_BLASTER_Z2 ZORRO_ID(VMC, 0x01, 0)
+#define ZORRO_PROD_VMC_HYPERCOM_4 ZORRO_ID(VMC, 0x02, 0)
+
+#define ZORRO_MANUF_INFORMATION 0x157C
+#define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0)
+
+#define ZORRO_MANUF_VORTEX 0x2017
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX ZORRO_ID(VORTEX, 0x07, 0)
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0)
+#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0)
+
+#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062
+#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0)
+#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0)
+
+#define ZORRO_MANUF_READYSOFT 0x2100
+#define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0)
+
+#define ZORRO_MANUF_PHASE5 0x2140
+#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0)
+#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0)
+#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0)
+#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0)
+#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0)
+#define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0)
+
+#define ZORRO_MANUF_DPS 0x2169
+#define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_2 0x2200
+#define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0)
+#define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0)
+
+#define ZORRO_MANUF_APOLLO_3 0x2222
+#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0)
+#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0)
+
+#define ZORRO_MANUF_PETSOFF_LP 0x38A5
+#define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0)
+#define ZORRO_PROD_PETSOFF_LP_DELFINA_LITE ZORRO_ID(PETSOFF_LP, 0x01, 0)
+
+#define ZORRO_MANUF_UWE_GERLACH 0x3FF7
+#define ZORRO_PROD_UWE_GERLACH_RAM_ROM ZORRO_ID(UWE_GERLACH, 0xd4, 0)
+
+#define ZORRO_MANUF_ACT 0x4231
+#define ZORRO_PROD_ACT_PRELUDE ZORRO_ID(ACT, 0x01, 0)
+
+#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754
+#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0)
+#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0)
+#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0)
+#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0)
+#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0)
+#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0)
+#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0)
+#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0)
+#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0)
+#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0)
+
+#define ZORRO_MANUF_COMBITEC 0x6766
+
+#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000
+#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0)
+#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0)
+
+#define ZORRO_MANUF_REIS_WARE_2 0xA9AD
+#define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0)
+
+#define ZORRO_MANUF_CAMERON 0xAA01
+#define ZORRO_PROD_CAMERON_PERSONAL_A4 ZORRO_ID(CAMERON, 0x10, 0)
+
+#define ZORRO_MANUF_REIS_WARE 0xAA11
+#define ZORRO_PROD_REIS_WARE_HANDYSCANNER ZORRO_ID(REIS_WARE, 0x11, 0)
+
+#define ZORRO_MANUF_PHOENIX_2 0xB5A8
+#define ZORRO_PROD_PHOENIX_ST506_2 ZORRO_ID(PHOENIX_2, 0x21, 0)
+#define ZORRO_PROD_PHOENIX_SCSI_2 ZORRO_ID(PHOENIX_2, 0x22, 0)
+#define ZORRO_PROD_PHOENIX_RAM_2 ZORRO_ID(PHOENIX_2, 0xBE, 0)
+
+#define ZORRO_MANUF_COMBITEC_2 0xC008
+#define ZORRO_PROD_COMBITEC_HD ZORRO_ID(COMBITEC_2, 0x2A, 0)
+#define ZORRO_PROD_COMBITEC_SRAM ZORRO_ID(COMBITEC_2, 0x2B, 0)
+
+#define ZORRO_MANUF_HACKER 0x07DB
+#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0)
+#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0)
+#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0)
+#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0)
diff --git a/6/platforms/android-3/arch-x86/usr/include/locale.h b/6/platforms/android-3/arch-x86/usr/include/locale.h
new file mode 100644
index 0000000..4259ddd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/locale.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _LOCALE_H_
+#define _LOCALE_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+enum {
+ LC_CTYPE = 0,
+ LC_NUMERIC = 1,
+ LC_TIME = 2,
+ LC_COLLATE = 3,
+ LC_MONETARY = 4,
+ LC_MESSAGES = 5,
+ LC_ALL = 6,
+ LC_PAPER = 7,
+ LC_NAME = 8,
+ LC_ADDRESS = 9,
+
+ LC_TELEPHONE = 10,
+ LC_MEASUREMENT = 11,
+ LC_IDENTIFICATION = 12
+};
+
+extern char *setlocale(int category, const char *locale);
+
+#if 1 /* MISSING FROM BIONIC - DEFINED TO MAKE libstdc++-v3 happy */
+struct lconv { };
+struct lconv *localeconv(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _LOCALE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/malloc.h b/6/platforms/android-3/arch-x86/usr/include/malloc.h
new file mode 100644
index 0000000..a864286
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/malloc.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _MALLOC_H_
+#define _MALLOC_H_
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+
+__BEGIN_DECLS
+
+extern __mallocfunc void* malloc(size_t);
+extern __mallocfunc void* calloc(size_t, size_t);
+extern __mallocfunc void* realloc(void *, size_t);
+extern void free(void *);
+
+extern void* memalign(size_t alignment, size_t bytesize);
+extern void* valloc(size_t bytesize);
+extern void* pvalloc(size_t bytesize);
+extern int mallopt(int param_number, int param_value);
+extern size_t malloc_footprint(void);
+extern size_t malloc_max_footprint(void);
+
+struct mallinfo {
+ size_t arena; /* non-mmapped space allocated from system */
+ size_t ordblks; /* number of free chunks */
+ size_t smblks; /* always 0 */
+ size_t hblks; /* always 0 */
+ size_t hblkhd; /* space in mmapped regions */
+ size_t usmblks; /* maximum total allocated space */
+ size_t fsmblks; /* always 0 */
+ size_t uordblks; /* total allocated space */
+ size_t fordblks; /* total free space */
+ size_t keepcost; /* releasable (via malloc_trim) space */
+};
+
+extern struct mallinfo mallinfo(void);
+
+
+/*
+ malloc_usable_size(void* p);
+
+ Returns the number of bytes you can actually use in
+ an allocated chunk, which may be more than you requested (although
+ often not) due to alignment and minimum size constraints.
+ You can use this many bytes without worrying about
+ overwriting other allocated objects. This is not a particularly great
+ programming practice. malloc_usable_size can be more useful in
+ debugging and assertions, for example:
+
+ p = malloc(n);
+ assert(malloc_usable_size(p) >= 256);
+*/
+extern size_t malloc_usable_size(void* block);
+
+/*
+ malloc_stats();
+ Prints on stderr the amount of space obtained from the system (both
+ via sbrk and mmap), the maximum amount (which may be more than
+ current if malloc_trim and/or munmap got called), and the current
+ number of bytes allocated via malloc (or realloc, etc) but not yet
+ freed. Note that this is the number of bytes allocated, not the
+ number requested. It will be larger than the number requested
+ because of alignment and bookkeeping overhead. Because it includes
+ alignment wastage as being in use, this figure may be greater than
+ zero even when no user-level chunks are allocated.
+
+ The reported current and maximum system memory can be inaccurate if
+ a program makes other calls to system memory allocation functions
+ (normally sbrk) outside of malloc.
+
+ malloc_stats prints only the most commonly interesting statistics.
+ More information can be obtained by calling mallinfo.
+*/
+extern void malloc_stats(void);
+
+__END_DECLS
+
+#endif /* _MALLOC_H_ */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/math.h b/6/platforms/android-3/arch-x86/usr/include/math.h
new file mode 100644
index 0000000..ef6a9e6
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/math.h
@@ -0,0 +1,486 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
+ */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#define __pure2
+
+/*
+ * ANSI/POSIX
+ */
+extern const union __infinity_un {
+ unsigned char __uc[8];
+ double __ud;
+} __infinity;
+
+extern const union __nan_un {
+ unsigned char __uc[sizeof(float)];
+ float __uf;
+} __nan;
+
+/* #if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) */
+#if 1
+#define __MATH_BUILTIN_CONSTANTS
+#endif
+
+/* #if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER) */
+#if 1
+#define __MATH_BUILTIN_RELOPS
+#endif
+
+/* #ifdef __MATH_BUILTIN_CONSTANTS */
+#if 1
+#define HUGE_VAL __builtin_huge_val()
+#else
+#define HUGE_VAL (__infinity.__ud)
+#endif
+
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+#define FP_ILOGB0 (-__INT_MAX)
+#define FP_ILOGBNAN __INT_MAX
+#else
+#define FP_ILOGB0 (-INT_MAX)
+#define FP_ILOGBNAN INT_MAX
+#endif
+
+#ifdef __MATH_BUILTIN_CONSTANTS
+#define HUGE_VALF __builtin_huge_valf()
+#define HUGE_VALL __builtin_huge_vall()
+#define INFINITY __builtin_inf()
+#define NAN __builtin_nan("")
+#else
+#define HUGE_VALF (float)HUGE_VAL
+#define HUGE_VALL (long double)HUGE_VAL
+#define INFINITY HUGE_VALF
+#define NAN (__nan.__uf)
+#endif /* __MATH_BUILTIN_CONSTANTS */
+
+#define MATH_ERRNO 1
+#define MATH_ERREXCEPT 2
+#define math_errhandling MATH_ERREXCEPT
+
+/* XXX We need a <machine/math.h>. */
+#if defined(__ia64__) || defined(__sparc64__)
+#define FP_FAST_FMA
+#endif
+#ifdef __ia64__
+#define FP_FAST_FMAL
+#endif
+#define FP_FAST_FMAF
+
+/* Symbolic constants to classify floating point numbers. */
+#define FP_INFINITE 0x01
+#define FP_NAN 0x02
+#define FP_NORMAL 0x04
+#define FP_SUBNORMAL 0x08
+#define FP_ZERO 0x10
+#define fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
+ : __fpclassifyl(x))
+
+#define isfinite(x) \
+ ((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
+ : (sizeof (x) == sizeof (double)) ? __isfinite(x) \
+ : __isfinitel(x))
+#define isinf(x) \
+ ((sizeof (x) == sizeof (float)) ? __isinff(x) \
+ : (sizeof (x) == sizeof (double)) ? __isinf(x) \
+ : __isinfl(x))
+#define isnan(x) \
+ ((sizeof (x) == sizeof (float)) ? isnanf(x) \
+ : (sizeof (x) == sizeof (double)) ? isnan(x) \
+ : __isnanl(x))
+#define isnormal(x) \
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
+ : __isnormall(x))
+
+#ifdef __MATH_BUILTIN_RELOPS
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+#else
+#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
+#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
+#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
+#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
+#define islessgreater(x, y) (!isunordered((x), (y)) && \
+ ((x) > (y) || (y) > (x)))
+#define isunordered(x, y) (isnan(x) || isnan(y))
+#endif /* __MATH_BUILTIN_RELOPS */
+
+#define signbit(x) \
+ ((sizeof (x) == sizeof (float)) ? __signbitf(x) \
+ : (sizeof (x) == sizeof (double)) ? __signbit(x) \
+ : __signbitl(x))
+
+#if 0
+typedef __double_t double_t;
+typedef __float_t float_t;
+#endif
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+
+/*
+ * XOPEN/SVID
+ */
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log 2e */
+#define M_LOG10E 0.43429448190325182765 /* log 10e */
+#define M_LN2 0.69314718055994530942 /* log e2 */
+#define M_LN10 2.30258509299404568402 /* log e10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define MAXFLOAT ((float)3.40282346638528860e+38)
+extern int signgam;
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+#if __BSD_VISIBLE
+#if 0
+/* Old value from 4.4BSD-Lite math.h; this is probably better. */
+#define HUGE HUGE_VAL
+#else
+#define HUGE MAXFLOAT
+#endif
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Most of these functions depend on the rounding mode and have the side
+ * effect of raising floating-point exceptions, so they are not declared
+ * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
+ */
+__BEGIN_DECLS
+/*
+ * ANSI/POSIX
+ */
+int __fpclassifyd(double) __pure2;
+int __fpclassifyf(float) __pure2;
+int __fpclassifyl(long double) __pure2;
+int __isfinitef(float) __pure2;
+int __isfinite(double) __pure2;
+int __isfinitel(long double) __pure2;
+int __isinff(float) __pure2;
+int __isinf(double) __pure2;
+int __isinfl(long double) __pure2;
+int __isnanl(long double) __pure2;
+int __isnormalf(float) __pure2;
+int __isnormal(double) __pure2;
+int __isnormall(long double) __pure2;
+int __signbit(double) __pure2;
+int __signbitf(float) __pure2;
+int __signbitl(long double) __pure2;
+
+double acos(double);
+double asin(double);
+double atan(double);
+double atan2(double, double);
+double cos(double);
+double sin(double);
+double tan(double);
+
+double cosh(double);
+double sinh(double);
+double tanh(double);
+
+double exp(double);
+double frexp(double, int *); /* fundamentally !__pure2 */
+double ldexp(double, int);
+double log(double);
+double log10(double);
+double modf(double, double *); /* fundamentally !__pure2 */
+
+double pow(double, double);
+double sqrt(double);
+
+double ceil(double);
+double fabs(double) __pure2;
+double floor(double);
+double fmod(double, double);
+
+/*
+ * These functions are not in C90.
+ */
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+double acosh(double);
+double asinh(double);
+double atanh(double);
+double cbrt(double);
+double erf(double);
+double erfc(double);
+double exp2(double);
+double expm1(double);
+double fma(double, double, double);
+double hypot(double, double);
+int ilogb(double) __pure2;
+/* int (isinf)(double) __pure2; */
+int (isnan)(double) __pure2;
+double lgamma(double);
+long long llrint(double);
+long long llround(double);
+double log1p(double);
+double logb(double);
+long lrint(double);
+long lround(double);
+double nextafter(double, double);
+double remainder(double, double);
+double remquo(double, double, int *);
+double rint(double);
+/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+double j0(double);
+double j1(double);
+double jn(int, double);
+double scalb(double, double);
+double y0(double);
+double y1(double);
+double yn(int, double);
+
+/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
+double gamma(double);
+/* #endif */
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
+double copysign(double, double) __pure2;
+double fdim(double, double);
+double fmax(double, double) __pure2;
+double fmin(double, double) __pure2;
+double nearbyint(double);
+double round(double);
+double scalbln(double, long);
+double scalbn(double, int);
+double tgamma(double);
+double trunc(double);
+/* #endif */
+
+/*
+ * BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+double drem(double, double);
+int finite(double) __pure2;
+int isnanf(float) __pure2;
+
+/*
+ * Reentrant version of gamma & lgamma; passes signgam back by reference
+ * as the second argument; user must allocate space for signgam.
+ */
+double gamma_r(double, int *);
+double lgamma_r(double, int *);
+
+/*
+ * IEEE Test Vector
+ */
+double significand(double);
+/* #endif */ /* __BSD_VISIBLE */
+
+/* float versions of ANSI/POSIX functions */
+/*#if __ISO_C_VISIBLE >= 1999 */
+float acosf(float);
+float asinf(float);
+float atanf(float);
+float atan2f(float, float);
+float cosf(float);
+float sinf(float);
+float tanf(float);
+
+float coshf(float);
+float sinhf(float);
+float tanhf(float);
+
+float exp2f(float);
+float expf(float);
+float expm1f(float);
+float frexpf(float, int *); /* fundamentally !__pure2 */
+int ilogbf(float) __pure2;
+float ldexpf(float, int);
+float log10f(float);
+float log1pf(float);
+float logf(float);
+float modff(float, float *); /* fundamentally !__pure2 */
+
+float powf(float, float);
+float sqrtf(float);
+
+float ceilf(float);
+float fabsf(float) __pure2;
+float floorf(float);
+float fmodf(float, float);
+float roundf(float);
+
+float erff(float);
+float erfcf(float);
+float hypotf(float, float);
+float lgammaf(float);
+
+float acoshf(float);
+float asinhf(float);
+float atanhf(float);
+float cbrtf(float);
+float logbf(float);
+float copysignf(float, float) __pure2;
+long long llrintf(float);
+long long llroundf(float);
+long lrintf(float);
+long lroundf(float);
+float nearbyintf(float);
+float nextafterf(float, float);
+float remainderf(float, float);
+float remquof(float, float, int *);
+float rintf(float);
+float scalblnf(float, long);
+float scalbnf(float, int);
+float truncf(float);
+
+float fdimf(float, float);
+float fmaf(float, float, float);
+float fmaxf(float, float) __pure2;
+float fminf(float, float) __pure2;
+/* #endif */
+
+/*
+ * float versions of BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+float dremf(float, float);
+int finitef(float) __pure2;
+float gammaf(float);
+float j0f(float);
+float j1f(float);
+float jnf(int, float);
+float scalbf(float, float);
+float y0f(float);
+float y1f(float);
+float ynf(int, float);
+
+/*
+ * Float versions of reentrant version of gamma & lgamma; passes
+ * signgam back by reference as the second argument; user must
+ * allocate space for signgam.
+ */
+float gammaf_r(float, int *);
+float lgammaf_r(float, int *);
+
+/*
+ * float version of IEEE Test Vector
+ */
+float significandf(float);
+/* #endif */ /* __BSD_VISIBLE */
+
+/*
+ * long double versions of ISO/POSIX math functions
+ */
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+long double acoshl(long double);
+long double acosl(long double);
+long double asinhl(long double);
+long double asinl(long double);
+long double atan2l(long double, long double);
+long double atanhl(long double);
+long double atanl(long double);
+long double cbrtl(long double);
+#endif
+long double ceill(long double);
+long double copysignl(long double, long double) __pure2;
+#if 0
+long double coshl(long double);
+long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
+long double exp2l(long double);
+long double expl(long double);
+long double expm1l(long double);
+#endif
+long double fabsl(long double) __pure2;
+long double fdiml(long double, long double);
+long double floorl(long double);
+long double fmal(long double, long double, long double);
+long double fmaxl(long double, long double) __pure2;
+long double fminl(long double, long double) __pure2;
+#if 0
+long double fmodl(long double, long double);
+#endif
+long double frexpl(long double value, int *); /* fundamentally !__pure2 */
+#if 0
+long double hypotl(long double, long double);
+#endif
+int ilogbl(long double) __pure2;
+long double ldexpl(long double, int);
+#if 0
+long double lgammal(long double);
+long long llrintl(long double);
+#endif
+long long llroundl(long double);
+#if 0
+long double log10l(long double);
+long double log1pl(long double);
+long double log2l(long double);
+long double logbl(long double);
+long double logl(long double);
+long lrintl(long double);
+#endif
+long lroundl(long double);
+#if 0
+long double modfl(long double, long double *); /* fundamentally !__pure2 */
+long double nanl(const char *) __pure2;
+long double nearbyintl(long double);
+#endif
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+#if 0
+long double powl(long double, long double);
+long double remainderl(long double, long double);
+long double remquol(long double, long double, int *);
+long double rintl(long double);
+#endif
+long double roundl(long double);
+long double scalblnl(long double, long);
+long double scalbnl(long double, int);
+#if 0
+long double sinhl(long double);
+long double sinl(long double);
+long double sqrtl(long double);
+long double tanhl(long double);
+long double tanl(long double);
+long double tgammal(long double);
+#endif
+long double truncl(long double);
+
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+__END_DECLS
+
+#endif /* !_MATH_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/memory.h b/6/platforms/android-3/arch-x86/usr/include/memory.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/memory.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/mntent.h b/6/platforms/android-3/arch-x86/usr/include/mntent.h
new file mode 100644
index 0000000..b83da1f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/mntent.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _MNTENT_H_
+#define _MNTENT_H_
+
+#include <stdio.h>
+
+#define MNTTYPE_IGNORE "ignore"
+
+struct mntent
+{
+ char* mnt_fsname;
+ char* mnt_dir;
+ char* mnt_type;
+ char* mnt_opts;
+ int mnt_freq;
+ int mnt_passno;
+};
+
+
+__BEGIN_DECLS
+
+
+struct mntent* getmntent(FILE*);
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-abi.h b/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-abi.h
new file mode 100644
index 0000000..0ae2263
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-abi.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_ABI_H__
+#define __MTD_ABI_H__
+
+struct erase_info_user {
+ uint32_t start;
+ uint32_t length;
+};
+
+struct mtd_oob_buf {
+ uint32_t start;
+ uint32_t length;
+ unsigned char __user *ptr;
+};
+
+#define MTD_ABSENT 0
+#define MTD_RAM 1
+#define MTD_ROM 2
+#define MTD_NORFLASH 3
+#define MTD_NANDFLASH 4
+#define MTD_DATAFLASH 6
+
+#define MTD_WRITEABLE 0x400
+#define MTD_BIT_WRITEABLE 0x800
+#define MTD_NO_ERASE 0x1000
+#define MTD_STUPID_LOCK 0x2000
+
+#define MTD_CAP_ROM 0
+#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
+#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
+#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
+
+#define MTD_NANDECC_OFF 0
+#define MTD_NANDECC_PLACE 1
+#define MTD_NANDECC_AUTOPLACE 2
+#define MTD_NANDECC_PLACEONLY 3
+#define MTD_NANDECC_AUTOPL_USR 4
+
+#define MTD_OTP_OFF 0
+#define MTD_OTP_FACTORY 1
+#define MTD_OTP_USER 2
+
+struct mtd_info_user {
+ uint8_t type;
+ uint32_t flags;
+ uint32_t size;
+ uint32_t erasesize;
+ uint32_t writesize;
+ uint32_t oobsize;
+
+ uint32_t ecctype;
+ uint32_t eccsize;
+};
+
+struct region_info_user {
+ uint32_t offset;
+ uint32_t erasesize;
+ uint32_t numblocks;
+ uint32_t regionindex;
+};
+
+struct otp_info {
+ uint32_t start;
+ uint32_t length;
+ uint32_t locked;
+};
+
+#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
+#define MEMERASE _IOW('M', 2, struct erase_info_user)
+#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
+#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
+#define MEMLOCK _IOW('M', 5, struct erase_info_user)
+#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
+#define MEMGETREGIONCOUNT _IOR('M', 7, int)
+#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
+#define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
+#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
+#define MEMGETBADBLOCK _IOW('M', 11, loff_t)
+#define MEMSETBADBLOCK _IOW('M', 12, loff_t)
+#define OTPSELECT _IOR('M', 13, int)
+#define OTPGETREGIONCOUNT _IOW('M', 14, int)
+#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
+#define OTPLOCK _IOR('M', 16, struct otp_info)
+#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout)
+#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
+#define MTDFILEMODE _IO('M', 19)
+
+struct nand_oobinfo {
+ uint32_t useecc;
+ uint32_t eccbytes;
+ uint32_t oobfree[8][2];
+ uint32_t eccpos[32];
+};
+
+struct nand_oobfree {
+ uint32_t offset;
+ uint32_t length;
+};
+
+#define MTD_MAX_OOBFREE_ENTRIES 8
+
+struct nand_ecclayout {
+ uint32_t eccbytes;
+ uint32_t eccpos[64];
+ uint32_t oobavail;
+ struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+};
+
+struct mtd_ecc_stats {
+ uint32_t corrected;
+ uint32_t failed;
+ uint32_t badblocks;
+ uint32_t bbtblocks;
+};
+
+enum mtd_file_modes {
+ MTD_MODE_NORMAL = MTD_OTP_OFF,
+ MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
+ MTD_MODE_OTP_USER = MTD_OTP_USER,
+ MTD_MODE_RAW,
+};
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-user.h b/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-user.h
new file mode 100644
index 0000000..1d37dc1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/mtd/mtd-user.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MTD_USER_H__
+#define __MTD_USER_H__
+
+#include <stdint.h>
+
+#include <mtd/mtd-abi.h>
+
+typedef struct mtd_info_user mtd_info_t;
+typedef struct erase_info_user erase_info_t;
+typedef struct region_info_user region_info_t;
+typedef struct nand_oobinfo nand_oobinfo_t;
+typedef struct nand_ecclayout nand_ecclayout_t;
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/ethertypes.h b/6/platforms/android-3/arch-x86/usr/include/net/ethertypes.h
new file mode 100644
index 0000000..1cfd2cd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/ethertypes.h
@@ -0,0 +1,313 @@
+/* $NetBSD: ethertypes.h,v 1.17 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * Ethernet protocol types.
+ *
+ * According to "assigned numbers", the Ethernet protocol numbers are also
+ * used as ARP protocol type numbers.
+ *
+ * I factor them out here to avoid pulling all the Ethernet header file
+ * into the hardware independent ARP code. -is
+ *
+ * Additional sources of information:
+ * http://www.mit.edu/~map/Ethernet/Ethernet.txt
+ * ftp://venera.isi.edu/in-notes/iana/assignments/ethernet-numbers
+ *
+ */
+
+#ifndef _NET_ETHERTYPES_H_
+#define _NET_ETHERTYPES_H_
+
+/*
+ * NOTE: 0x0000-0x05DC (0..1500) are generally IEEE 802.3 length fields.
+ * However, there are some conflicts.
+ */
+
+#define ETHERTYPE_8023 0x0004 /* IEEE 802.3 packet */
+ /* 0x0101 .. 0x1FF Experimental */
+#define ETHERTYPE_PUP 0x0200 /* Xerox PUP protocol - see 0A00 */
+#define ETHERTYPE_PUPAT 0x0200 /* PUP Address Translation - see 0A01 */
+#define ETHERTYPE_SPRITE 0x0500 /* ??? */
+ /* 0x0400 Nixdorf */
+#define ETHERTYPE_NS 0x0600 /* XNS */
+#define ETHERTYPE_NSAT 0x0601 /* XNS Address Translation (3Mb only) */
+#define ETHERTYPE_DLOG1 0x0660 /* DLOG (?) */
+#define ETHERTYPE_DLOG2 0x0661 /* DLOG (?) */
+#define ETHERTYPE_IP 0x0800 /* IP protocol */
+#define ETHERTYPE_X75 0x0801 /* X.75 Internet */
+#define ETHERTYPE_NBS 0x0802 /* NBS Internet */
+#define ETHERTYPE_ECMA 0x0803 /* ECMA Internet */
+#define ETHERTYPE_CHAOS 0x0804 /* CHAOSnet */
+#define ETHERTYPE_X25 0x0805 /* X.25 Level 3 */
+#define ETHERTYPE_ARP 0x0806 /* Address resolution protocol */
+#define ETHERTYPE_NSCOMPAT 0x0807 /* XNS Compatibility */
+#define ETHERTYPE_FRARP 0x0808 /* Frame Relay ARP (RFC1701) */
+ /* 0x081C Symbolics Private */
+ /* 0x0888 - 0x088A Xyplex */
+#define ETHERTYPE_UBDEBUG 0x0900 /* Ungermann-Bass network debugger */
+#define ETHERTYPE_IEEEPUP 0x0A00 /* Xerox IEEE802.3 PUP */
+#define ETHERTYPE_IEEEPUPAT 0x0A01 /* Xerox IEEE802.3 PUP Address Translation */
+#define ETHERTYPE_VINES 0x0BAD /* Banyan VINES */
+#define ETHERTYPE_VINESLOOP 0x0BAE /* Banyan VINES Loopback */
+#define ETHERTYPE_VINESECHO 0x0BAF /* Banyan VINES Echo */
+
+/* 0x1000 - 0x100F Berkeley Trailer */
+/*
+ * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
+ * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
+ * by an ETHER type (as given above) and then the (variable-length) header.
+ */
+#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
+#define ETHERTYPE_NTRAILER 16
+
+#define ETHERTYPE_DCA 0x1234 /* DCA - Multicast */
+#define ETHERTYPE_VALID 0x1600 /* VALID system protocol */
+#define ETHERTYPE_DOGFIGHT 0x1989 /* Artificial Horizons ("Aviator" dogfight simulator [on Sun]) */
+#define ETHERTYPE_RCL 0x1995 /* Datapoint Corporation (RCL lan protocol) */
+
+ /* The following 3C0x types
+ are unregistered: */
+#define ETHERTYPE_NBPVCD 0x3C00 /* 3Com NBP virtual circuit datagram (like XNS SPP) not registered */
+#define ETHERTYPE_NBPSCD 0x3C01 /* 3Com NBP System control datagram not registered */
+#define ETHERTYPE_NBPCREQ 0x3C02 /* 3Com NBP Connect request (virtual cct) not registered */
+#define ETHERTYPE_NBPCRSP 0x3C03 /* 3Com NBP Connect repsonse not registered */
+#define ETHERTYPE_NBPCC 0x3C04 /* 3Com NBP Connect complete not registered */
+#define ETHERTYPE_NBPCLREQ 0x3C05 /* 3Com NBP Close request (virtual cct) not registered */
+#define ETHERTYPE_NBPCLRSP 0x3C06 /* 3Com NBP Close response not registered */
+#define ETHERTYPE_NBPDG 0x3C07 /* 3Com NBP Datagram (like XNS IDP) not registered */
+#define ETHERTYPE_NBPDGB 0x3C08 /* 3Com NBP Datagram broadcast not registered */
+#define ETHERTYPE_NBPCLAIM 0x3C09 /* 3Com NBP Claim NetBIOS name not registered */
+#define ETHERTYPE_NBPDLTE 0x3C0A /* 3Com NBP Delete Netbios name not registered */
+#define ETHERTYPE_NBPRAS 0x3C0B /* 3Com NBP Remote adaptor status request not registered */
+#define ETHERTYPE_NBPRAR 0x3C0C /* 3Com NBP Remote adaptor response not registered */
+#define ETHERTYPE_NBPRST 0x3C0D /* 3Com NBP Reset not registered */
+
+#define ETHERTYPE_PCS 0x4242 /* PCS Basic Block Protocol */
+#define ETHERTYPE_IMLBLDIAG 0x424C /* Information Modes Little Big LAN diagnostic */
+#define ETHERTYPE_DIDDLE 0x4321 /* THD - Diddle */
+#define ETHERTYPE_IMLBL 0x4C42 /* Information Modes Little Big LAN */
+#define ETHERTYPE_SIMNET 0x5208 /* BBN Simnet Private */
+#define ETHERTYPE_DECEXPER 0x6000 /* DEC Unassigned, experimental */
+#define ETHERTYPE_MOPDL 0x6001 /* DEC MOP dump/load */
+#define ETHERTYPE_MOPRC 0x6002 /* DEC MOP remote console */
+#define ETHERTYPE_DECnet 0x6003 /* DEC DECNET Phase IV route */
+#define ETHERTYPE_DN ETHERTYPE_DECnet /* libpcap, tcpdump */
+#define ETHERTYPE_LAT 0x6004 /* DEC LAT */
+#define ETHERTYPE_DECDIAG 0x6005 /* DEC diagnostic protocol (at interface initialization?) */
+#define ETHERTYPE_DECCUST 0x6006 /* DEC customer protocol */
+#define ETHERTYPE_SCA 0x6007 /* DEC LAVC, SCA */
+#define ETHERTYPE_AMBER 0x6008 /* DEC AMBER */
+#define ETHERTYPE_DECMUMPS 0x6009 /* DEC MUMPS */
+ /* 0x6010 - 0x6014 3Com Corporation */
+#define ETHERTYPE_TRANSETHER 0x6558 /* Trans Ether Bridging (RFC1701)*/
+#define ETHERTYPE_RAWFR 0x6559 /* Raw Frame Relay (RFC1701) */
+#define ETHERTYPE_UBDL 0x7000 /* Ungermann-Bass download */
+#define ETHERTYPE_UBNIU 0x7001 /* Ungermann-Bass NIUs */
+#define ETHERTYPE_UBDIAGLOOP 0x7002 /* Ungermann-Bass diagnostic/loopback */
+#define ETHERTYPE_UBNMC 0x7003 /* Ungermann-Bass ??? (NMC to/from UB Bridge) */
+#define ETHERTYPE_UBBST 0x7005 /* Ungermann-Bass Bridge Spanning Tree */
+#define ETHERTYPE_OS9 0x7007 /* OS/9 Microware */
+#define ETHERTYPE_OS9NET 0x7009 /* OS/9 Net? */
+ /* 0x7020 - 0x7029 LRT (England) (now Sintrom) */
+#define ETHERTYPE_RACAL 0x7030 /* Racal-Interlan */
+#define ETHERTYPE_PRIMENTS 0x7031 /* Prime NTS (Network Terminal Service) */
+#define ETHERTYPE_CABLETRON 0x7034 /* Cabletron */
+#define ETHERTYPE_CRONUSVLN 0x8003 /* Cronus VLN */
+#define ETHERTYPE_CRONUS 0x8004 /* Cronus Direct */
+#define ETHERTYPE_HP 0x8005 /* HP Probe */
+#define ETHERTYPE_NESTAR 0x8006 /* Nestar */
+#define ETHERTYPE_ATTSTANFORD 0x8008 /* AT&T/Stanford (local use) */
+#define ETHERTYPE_EXCELAN 0x8010 /* Excelan */
+#define ETHERTYPE_SG_DIAG 0x8013 /* SGI diagnostic type */
+#define ETHERTYPE_SG_NETGAMES 0x8014 /* SGI network games */
+#define ETHERTYPE_SG_RESV 0x8015 /* SGI reserved type */
+#define ETHERTYPE_SG_BOUNCE 0x8016 /* SGI bounce server */
+#define ETHERTYPE_APOLLODOMAIN 0x8019 /* Apollo DOMAIN */
+#define ETHERTYPE_TYMSHARE 0x802E /* Tymeshare */
+#define ETHERTYPE_TIGAN 0x802F /* Tigan, Inc. */
+#define ETHERTYPE_REVARP 0x8035 /* Reverse addr resolution protocol */
+#define ETHERTYPE_AEONIC 0x8036 /* Aeonic Systems */
+#define ETHERTYPE_IPXNEW 0x8037 /* IPX (Novell Netware?) */
+#define ETHERTYPE_LANBRIDGE 0x8038 /* DEC LANBridge */
+#define ETHERTYPE_DSMD 0x8039 /* DEC DSM/DDP */
+#define ETHERTYPE_ARGONAUT 0x803A /* DEC Argonaut Console */
+#define ETHERTYPE_VAXELN 0x803B /* DEC VAXELN */
+#define ETHERTYPE_DECDNS 0x803C /* DEC DNS Naming Service */
+#define ETHERTYPE_ENCRYPT 0x803D /* DEC Ethernet Encryption */
+#define ETHERTYPE_DECDTS 0x803E /* DEC Distributed Time Service */
+#define ETHERTYPE_DECLTM 0x803F /* DEC LAN Traffic Monitor */
+#define ETHERTYPE_DECNETBIOS 0x8040 /* DEC PATHWORKS DECnet NETBIOS Emulation */
+#define ETHERTYPE_DECLAST 0x8041 /* DEC Local Area System Transport */
+ /* 0x8042 DEC Unassigned */
+#define ETHERTYPE_PLANNING 0x8044 /* Planning Research Corp. */
+ /* 0x8046 - 0x8047 AT&T */
+#define ETHERTYPE_DECAM 0x8048 /* DEC Availability Manager for Distributed Systems DECamds (but someone at DEC says not) */
+#define ETHERTYPE_EXPERDATA 0x8049 /* ExperData */
+#define ETHERTYPE_VEXP 0x805B /* Stanford V Kernel exp. */
+#define ETHERTYPE_VPROD 0x805C /* Stanford V Kernel prod. */
+#define ETHERTYPE_ES 0x805D /* Evans & Sutherland */
+#define ETHERTYPE_LITTLE 0x8060 /* Little Machines */
+#define ETHERTYPE_COUNTERPOINT 0x8062 /* Counterpoint Computers */
+ /* 0x8065 - 0x8066 Univ. of Mass @ Amherst */
+#define ETHERTYPE_VEECO 0x8067 /* Veeco Integrated Auto. */
+#define ETHERTYPE_GENDYN 0x8068 /* General Dynamics */
+#define ETHERTYPE_ATT 0x8069 /* AT&T */
+#define ETHERTYPE_AUTOPHON 0x806A /* Autophon */
+#define ETHERTYPE_COMDESIGN 0x806C /* ComDesign */
+#define ETHERTYPE_COMPUGRAPHIC 0x806D /* Compugraphic Corporation */
+ /* 0x806E - 0x8077 Landmark Graphics Corp. */
+#define ETHERTYPE_MATRA 0x807A /* Matra */
+#define ETHERTYPE_DDE 0x807B /* Dansk Data Elektronik */
+#define ETHERTYPE_MERIT 0x807C /* Merit Internodal (or Univ of Michigan?) */
+ /* 0x807D - 0x807F Vitalink Communications */
+#define ETHERTYPE_VLTLMAN 0x8080 /* Vitalink TransLAN III Management */
+ /* 0x8081 - 0x8083 Counterpoint Computers */
+ /* 0x8088 - 0x808A Xyplex */
+#define ETHERTYPE_ATALK 0x809B /* AppleTalk */
+#define ETHERTYPE_AT ETHERTYPE_ATALK /* old NetBSD */
+#define ETHERTYPE_APPLETALK ETHERTYPE_ATALK /* HP-UX */
+ /* 0x809C - 0x809E Datability */
+#define ETHERTYPE_SPIDER 0x809F /* Spider Systems Ltd. */
+ /* 0x80A3 Nixdorf */
+ /* 0x80A4 - 0x80B3 Siemens Gammasonics Inc. */
+ /* 0x80C0 - 0x80C3 DCA (Digital Comm. Assoc.) Data Exchange Cluster */
+ /* 0x80C4 - 0x80C5 Banyan Systems */
+#define ETHERTYPE_PACER 0x80C6 /* Pacer Software */
+#define ETHERTYPE_APPLITEK 0x80C7 /* Applitek Corporation */
+ /* 0x80C8 - 0x80CC Intergraph Corporation */
+ /* 0x80CD - 0x80CE Harris Corporation */
+ /* 0x80CF - 0x80D2 Taylor Instrument */
+ /* 0x80D3 - 0x80D4 Rosemount Corporation */
+#define ETHERTYPE_SNA 0x80D5 /* IBM SNA Services over Ethernet */
+#define ETHERTYPE_VARIAN 0x80DD /* Varian Associates */
+ /* 0x80DE - 0x80DF TRFS (Integrated Solutions Transparent Remote File System) */
+ /* 0x80E0 - 0x80E3 Allen-Bradley */
+ /* 0x80E4 - 0x80F0 Datability */
+#define ETHERTYPE_RETIX 0x80F2 /* Retix */
+#define ETHERTYPE_AARP 0x80F3 /* AppleTalk AARP */
+ /* 0x80F4 - 0x80F5 Kinetics */
+#define ETHERTYPE_APOLLO 0x80F7 /* Apollo Computer */
+#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging (XXX conflicts) */
+ /* 0x80FF - 0x8101 Wellfleet Communications (XXX conflicts) */
+#define ETHERTYPE_BOFL 0x8102 /* Wellfleet; BOFL (Breath OF Life) pkts [every 5-10 secs.] */
+#define ETHERTYPE_WELLFLEET 0x8103 /* Wellfleet Communications */
+ /* 0x8107 - 0x8109 Symbolics Private */
+#define ETHERTYPE_TALARIS 0x812B /* Talaris */
+#define ETHERTYPE_WATERLOO 0x8130 /* Waterloo Microsystems Inc. (XXX which?) */
+#define ETHERTYPE_HAYES 0x8130 /* Hayes Microcomputers (XXX which?) */
+#define ETHERTYPE_VGLAB 0x8131 /* VG Laboratory Systems */
+ /* 0x8132 - 0x8137 Bridge Communications */
+#define ETHERTYPE_IPX 0x8137 /* Novell (old) NetWare IPX (ECONFIG E option) */
+#define ETHERTYPE_NOVELL 0x8138 /* Novell, Inc. */
+ /* 0x8139 - 0x813D KTI */
+#define ETHERTYPE_MUMPS 0x813F /* M/MUMPS data sharing */
+#define ETHERTYPE_AMOEBA 0x8145 /* Vrije Universiteit (NL) Amoeba 4 RPC (obsolete) */
+#define ETHERTYPE_FLIP 0x8146 /* Vrije Universiteit (NL) FLIP (Fast Local Internet Protocol) */
+#define ETHERTYPE_VURESERVED 0x8147 /* Vrije Universiteit (NL) [reserved] */
+#define ETHERTYPE_LOGICRAFT 0x8148 /* Logicraft */
+#define ETHERTYPE_NCD 0x8149 /* Network Computing Devices */
+#define ETHERTYPE_ALPHA 0x814A /* Alpha Micro */
+#define ETHERTYPE_SNMP 0x814C /* SNMP over Ethernet (see RFC1089) */
+ /* 0x814D - 0x814E BIIN */
+#define ETHERTYPE_TEC 0x814F /* Technically Elite Concepts */
+#define ETHERTYPE_RATIONAL 0x8150 /* Rational Corp */
+ /* 0x8151 - 0x8153 Qualcomm */
+ /* 0x815C - 0x815E Computer Protocol Pty Ltd */
+ /* 0x8164 - 0x8166 Charles River Data Systems */
+#define ETHERTYPE_XTP 0x817D /* Protocol Engines XTP */
+#define ETHERTYPE_SGITW 0x817E /* SGI/Time Warner prop. */
+#define ETHERTYPE_HIPPI_FP 0x8180 /* HIPPI-FP encapsulation */
+#define ETHERTYPE_STP 0x8181 /* Scheduled Transfer STP, HIPPI-ST */
+ /* 0x8182 - 0x8183 Reserved for HIPPI-6400 */
+ /* 0x8184 - 0x818C SGI prop. */
+#define ETHERTYPE_MOTOROLA 0x818D /* Motorola */
+#define ETHERTYPE_NETBEUI 0x8191 /* PowerLAN NetBIOS/NetBEUI (PC) */
+ /* 0x819A - 0x81A3 RAD Network Devices */
+ /* 0x81B7 - 0x81B9 Xyplex */
+ /* 0x81CC - 0x81D5 Apricot Computers */
+ /* 0x81D6 - 0x81DD Artisoft Lantastic */
+ /* 0x81E6 - 0x81EF Polygon */
+ /* 0x81F0 - 0x81F2 Comsat Labs */
+ /* 0x81F3 - 0x81F5 SAIC */
+ /* 0x81F6 - 0x81F8 VG Analytical */
+ /* 0x8203 - 0x8205 QNX Software Systems Ltd. */
+ /* 0x8221 - 0x8222 Ascom Banking Systems */
+ /* 0x823E - 0x8240 Advanced Encryption Systems */
+ /* 0x8263 - 0x826A Charles River Data Systems */
+ /* 0x827F - 0x8282 Athena Programming */
+ /* 0x829A - 0x829B Inst Ind Info Tech */
+ /* 0x829C - 0x82AB Taurus Controls */
+ /* 0x82AC - 0x8693 Walker Richer & Quinn */
+#define ETHERTYPE_ACCTON 0x8390 /* Accton Technologies (unregistered) */
+#define ETHERTYPE_TALARISMC 0x852B /* Talaris multicast */
+#define ETHERTYPE_KALPANA 0x8582 /* Kalpana */
+ /* 0x8694 - 0x869D Idea Courier */
+ /* 0x869E - 0x86A1 Computer Network Tech */
+ /* 0x86A3 - 0x86AC Gateway Communications */
+#define ETHERTYPE_SECTRA 0x86DB /* SECTRA */
+#define ETHERTYPE_IPV6 0x86DD /* IP protocol version 6 */
+#define ETHERTYPE_DELTACON 0x86DE /* Delta Controls */
+#define ETHERTYPE_ATOMIC 0x86DF /* ATOMIC */
+ /* 0x86E0 - 0x86EF Landis & Gyr Powers */
+ /* 0x8700 - 0x8710 Motorola */
+#define ETHERTYPE_RDP 0x8739 /* Control Technology Inc. RDP Without IP */
+#define ETHERTYPE_MICP 0x873A /* Control Technology Inc. Mcast Industrial Ctrl Proto. */
+ /* 0x873B - 0x873C Control Technology Inc. Proprietary */
+#define ETHERTYPE_TCPCOMP 0x876B /* TCP/IP Compression (RFC1701) */
+#define ETHERTYPE_IPAS 0x876C /* IP Autonomous Systems (RFC1701) */
+#define ETHERTYPE_SECUREDATA 0x876D /* Secure Data (RFC1701) */
+#define ETHERTYPE_FLOWCONTROL 0x8808 /* 802.3x flow control packet */
+#define ETHERTYPE_SLOWPROTOCOLS 0x8809 /* Slow protocols */
+#define ETHERTYPE_PPP 0x880B /* PPP (obsolete by PPPOE) */
+#define ETHERTYPE_HITACHI 0x8820 /* Hitachi Cable (Optoelectronic Systems Laboratory) */
+#define ETHERTYPE_MPLS 0x8847 /* MPLS Unicast */
+#define ETHERTYPE_MPLS_MCAST 0x8848 /* MPLS Multicast */
+#define ETHERTYPE_AXIS 0x8856 /* Axis Communications AB proprietary bootstrap/config */
+#define ETHERTYPE_PPPOEDISC 0x8863 /* PPP Over Ethernet Discovery Stage */
+#define ETHERTYPE_PPPOE 0x8864 /* PPP Over Ethernet Session Stage */
+#define ETHERTYPE_LANPROBE 0x8888 /* HP LanProbe test? */
+#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
+#define ETHERTYPE_LOOPBACK 0x9000 /* Loopback */
+#define ETHERTYPE_LBACK ETHERTYPE_LOOPBACK /* DEC MOP loopback */
+#define ETHERTYPE_XNSSM 0x9001 /* 3Com (Formerly Bridge Communications), XNS Systems Management */
+#define ETHERTYPE_TCPSM 0x9002 /* 3Com (Formerly Bridge Communications), TCP/IP Systems Management */
+#define ETHERTYPE_BCLOOP 0x9003 /* 3Com (Formerly Bridge Communications), loopback detection */
+#define ETHERTYPE_DEBNI 0xAAAA /* DECNET? Used by VAX 6220 DEBNI */
+#define ETHERTYPE_SONIX 0xFAF5 /* Sonix Arpeggio */
+#define ETHERTYPE_VITAL 0xFF00 /* BBN VITAL-LanBridge cache wakeups */
+ /* 0xFF00 - 0xFFOF ISC Bunker Ramo */
+
+#define ETHERTYPE_MAX 0xFFFF /* Maximum valid ethernet type, reserved */
+
+#endif /* !_NET_ETHERTYPES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if.h b/6/platforms/android-3/arch-x86/usr/include/net/if.h
new file mode 100644
index 0000000..9044fc5
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/if.h>
+#include <sys/cdefs.h>
+#ifndef IF_NAMESIZE
+#define IF_NAMESIZE IFNAMSIZ
+#endif
+
+__BEGIN_DECLS
+
+/*
+ * Map an interface name into its corresponding index.
+ */
+extern unsigned int if_nametoindex(const char *);
+extern char* if_indextoname(unsigned ifindex, char *ifname);
+
+__END_DECLS
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_arp.h b/6/platforms/android-3/arch-x86/usr/include/net/if_arp.h
new file mode 100644
index 0000000..a25f1b4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+#include <linux/if_arp.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_dl.h b/6/platforms/android-3/arch-x86/usr/include/net/if_dl.h
new file mode 100644
index 0000000..1f0c080
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_dl.h
@@ -0,0 +1,87 @@
+/* $NetBSD: if_dl.h,v 1.18 2005/12/11 23:05:24 thorpej Exp $ */
+
+/*
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_dl.h 8.1 (Berkeley) 6/10/93
+ */
+
+/*
+ * A Link-Level Sockaddr may specify the interface in one of two
+ * ways: either by means of a system-provided index number (computed
+ * anew and possibly differently on every reboot), or by a human-readable
+ * string such as "il0" (for managerial convenience).
+ *
+ * Census taking actions, such as something akin to SIOCGCONF would return
+ * both the index and the human name.
+ *
+ * High volume transactions (such as giving a link-level ``from'' address
+ * in a recvfrom or recvmsg call) may be likely only to provide the indexed
+ * form, (which requires fewer copy operations and less space).
+ *
+ * The form and interpretation of the link-level address is purely a matter
+ * of convention between the device driver and its consumers; however, it is
+ * expected that all drivers for an interface of a given if_type will agree.
+ */
+
+#ifndef _NET_IF_DL_H_
+#define _NET_IF_DL_H_
+
+#include <sys/socket.h>
+
+/*
+ * Structure of a Link-Level sockaddr:
+ */
+struct sockaddr_dl {
+ u_char sdl_len; /* Total length of sockaddr */
+ sa_family_t sdl_family; /* AF_LINK */
+ u_int16_t sdl_index; /* if != 0, system given index for interface */
+ u_char sdl_type; /* interface type */
+ u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
+ u_char sdl_alen; /* link level address length */
+ u_char sdl_slen; /* link layer selector length */
+ char sdl_data[12]; /* minimum work area, can be larger;
+ contains both if name and ll address */
+};
+
+/* We do arithmetic directly with these, so keep them char instead of void */
+#define LLADDR(s) ((char *)((s)->sdl_data + (s)->sdl_nlen))
+#define CLLADDR(s) ((const char *)((s)->sdl_data + (s)->sdl_nlen))
+
+#ifndef _KERNEL
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+void link_addr(const char *, struct sockaddr_dl *);
+char *link_ntoa(const struct sockaddr_dl *);
+__END_DECLS
+
+#endif /* !_KERNEL */
+
+#endif /* !_NET_IF_DL_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_ether.h b/6/platforms/android-3/arch-x86/usr/include/net/if_ether.h
new file mode 100644
index 0000000..121f9ac
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_ether.h
@@ -0,0 +1,217 @@
+/* $NetBSD: if_ether.h,v 1.43 2006/11/24 01:04:30 rpaulo Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NET_IF_ETHER_H_
+#define _NET_IF_ETHER_H_
+
+#ifdef _KERNEL
+#ifdef _KERNEL_OPT
+#include "opt_mbuftrace.h"
+#endif
+#include <sys/mbuf.h>
+#endif
+
+/*
+ * Some basic Ethernet constants.
+ */
+#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
+#define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */
+#define ETHER_CRC_LEN 4 /* length of the Ethernet CRC */
+#define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)
+#define ETHER_MIN_LEN 64 /* minimum frame length, including CRC */
+#define ETHER_MAX_LEN 1518 /* maximum frame length, including CRC */
+#define ETHER_MAX_LEN_JUMBO 9018 /* maximum jumbo frame len, including CRC */
+
+/*
+ * Some Ethernet extensions.
+ */
+#define ETHER_VLAN_ENCAP_LEN 4 /* length of 802.1Q VLAN encapsulation */
+
+/*
+ * Ethernet address - 6 octets
+ * this is only used by the ethers(3) functions.
+ */
+struct ether_addr {
+ u_int8_t ether_addr_octet[ETHER_ADDR_LEN];
+} __attribute__((__packed__));
+
+/*
+ * Structure of a 10Mb/s Ethernet header.
+ */
+struct ether_header {
+ u_int8_t ether_dhost[ETHER_ADDR_LEN];
+ u_int8_t ether_shost[ETHER_ADDR_LEN];
+ u_int16_t ether_type;
+} __attribute__((__packed__));
+
+#include <net/ethertypes.h>
+
+#define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
+
+#define ETHERMTU_JUMBO (ETHER_MAX_LEN_JUMBO - ETHER_HDR_LEN - ETHER_CRC_LEN)
+#define ETHERMTU (ETHER_MAX_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
+#define ETHERMIN (ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
+
+/*
+ * Compute the maximum frame size based on ethertype (i.e. possible
+ * encapsulation) and whether or not an FCS is present.
+ */
+#define ETHER_MAX_FRAME(ifp, etype, hasfcs) \
+ ((ifp)->if_mtu + ETHER_HDR_LEN + \
+ ((hasfcs) ? ETHER_CRC_LEN : 0) + \
+ (((etype) == ETHERTYPE_VLAN) ? ETHER_VLAN_ENCAP_LEN : 0))
+
+/*
+ * Ethernet CRC32 polynomials (big- and little-endian verions).
+ */
+#define ETHER_CRC_POLY_LE 0xedb88320
+#define ETHER_CRC_POLY_BE 0x04c11db6
+
+#ifndef _STANDALONE
+
+/*
+ * Ethernet-specific mbuf flags.
+ */
+#define M_HASFCS M_LINK0 /* FCS included at end of frame */
+#define M_PROMISC M_LINK1 /* this packet is not for us */
+
+#ifdef _KERNEL
+/*
+ * Macro to map an IP multicast address to an Ethernet multicast address.
+ * The high-order 25 bits of the Ethernet address are statically assigned,
+ * and the low-order 23 bits are taken from the low end of the IP address.
+ */
+#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
+ /* struct in_addr *ipaddr; */ \
+ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \
+{ \
+ (enaddr)[0] = 0x01; \
+ (enaddr)[1] = 0x00; \
+ (enaddr)[2] = 0x5e; \
+ (enaddr)[3] = ((u_int8_t *)ipaddr)[1] & 0x7f; \
+ (enaddr)[4] = ((u_int8_t *)ipaddr)[2]; \
+ (enaddr)[5] = ((u_int8_t *)ipaddr)[3]; \
+}
+/*
+ * Macro to map an IP6 multicast address to an Ethernet multicast address.
+ * The high-order 16 bits of the Ethernet address are statically assigned,
+ * and the low-order 32 bits are taken from the low end of the IP6 address.
+ */
+#define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr) \
+ /* struct in6_addr *ip6addr; */ \
+ /* u_int8_t enaddr[ETHER_ADDR_LEN]; */ \
+{ \
+ (enaddr)[0] = 0x33; \
+ (enaddr)[1] = 0x33; \
+ (enaddr)[2] = ((u_int8_t *)ip6addr)[12]; \
+ (enaddr)[3] = ((u_int8_t *)ip6addr)[13]; \
+ (enaddr)[4] = ((u_int8_t *)ip6addr)[14]; \
+ (enaddr)[5] = ((u_int8_t *)ip6addr)[15]; \
+}
+#endif
+
+#define ETHERCAP_VLAN_MTU 0x00000001 /* VLAN-compatible MTU */
+#define ETHERCAP_VLAN_HWTAGGING 0x00000002 /* hardware VLAN tag support */
+#define ETHERCAP_JUMBO_MTU 0x00000004 /* 9000 byte MTU supported */
+
+#ifdef _KERNEL
+extern const uint8_t etherbroadcastaddr[ETHER_ADDR_LEN];
+extern const uint8_t ethermulticastaddr_slowprotocols[ETHER_ADDR_LEN];
+extern const uint8_t ether_ipmulticast_min[ETHER_ADDR_LEN];
+extern const uint8_t ether_ipmulticast_max[ETHER_ADDR_LEN];
+
+int ether_ioctl(struct ifnet *, u_long, caddr_t);
+int ether_addmulti (struct ifreq *, struct ethercom *);
+int ether_delmulti (struct ifreq *, struct ethercom *);
+int ether_changeaddr (struct ifreq *, struct ethercom *);
+int ether_multiaddr(struct sockaddr *, u_int8_t[], u_int8_t[]);
+
+/*
+ * Ethernet 802.1Q VLAN structures.
+ */
+
+/* add VLAN tag to input/received packet */
+#define VLAN_INPUT_TAG(ifp, m, vlanid, _errcase) \
+ do { \
+ struct m_tag *mtag = \
+ m_tag_get(PACKET_TAG_VLAN, sizeof(u_int), M_NOWAIT);\
+ if (mtag == NULL) { \
+ ifp->if_ierrors++; \
+ printf("%s: unable to allocate VLAN tag\n", \
+ ifp->if_xname); \
+ m_freem(m); \
+ _errcase; \
+ } \
+ *(u_int *)(mtag + 1) = vlanid; \
+ m_tag_prepend(m, mtag); \
+ } while(0)
+
+/* extract VLAN tag from output/trasmit packet */
+#define VLAN_OUTPUT_TAG(ec, m0) \
+ VLAN_ATTACHED(ec) ? m_tag_find((m0), PACKET_TAG_VLAN, NULL) : NULL
+
+/* extract VLAN ID value from a VLAN tag */
+#define VLAN_TAG_VALUE(mtag) \
+ ((*(u_int *)(mtag + 1)) & 4095)
+
+/* test if any VLAN is configured for this interface */
+#define VLAN_ATTACHED(ec) ((ec)->ec_nvlans > 0)
+
+void ether_ifattach(struct ifnet *, const u_int8_t *);
+void ether_ifdetach(struct ifnet *);
+
+char *ether_sprintf(const u_int8_t *);
+char *ether_snprintf(char *, size_t, const u_int8_t *);
+
+u_int32_t ether_crc32_le(const u_int8_t *, size_t);
+u_int32_t ether_crc32_be(const u_int8_t *, size_t);
+
+int ether_nonstatic_aton(u_char *, char *);
+#else
+/*
+ * Prototype ethers(3) functions.
+ */
+#include <sys/cdefs.h>
+__BEGIN_DECLS
+char * ether_ntoa __P((const struct ether_addr *));
+struct ether_addr *
+ ether_aton __P((const char *));
+int ether_ntohost __P((char *, const struct ether_addr *));
+int ether_hostton __P((const char *, struct ether_addr *));
+int ether_line __P((const char *, struct ether_addr *, char *));
+__END_DECLS
+#endif
+
+#endif /* _STANDALONE */
+
+#endif /* !_NET_IF_ETHER_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_ieee1394.h b/6/platforms/android-3/arch-x86/usr/include/net/if_ieee1394.h
new file mode 100644
index 0000000..5a61581
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_ieee1394.h
@@ -0,0 +1,127 @@
+/* $NetBSD: if_ieee1394.h,v 1.6 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Atsushi Onoe.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _NET_IF_IEEE1394_H_
+#define _NET_IF_IEEE1394_H_
+
+/* hardware address information for arp / nd */
+struct ieee1394_hwaddr {
+ u_int8_t iha_uid[8]; /* node unique ID */
+ u_int8_t iha_maxrec; /* max_rec in the config ROM */
+ u_int8_t iha_speed; /* min of link/PHY speed */
+ u_int8_t iha_offset[6]; /* unicast FIFO address */
+};
+
+/*
+ * BPF wants to see one of these.
+ */
+struct ieee1394_bpfhdr {
+ uint8_t ibh_dhost[8];
+ uint8_t ibh_shost[8];
+ uint16_t ibh_type;
+};
+
+#ifdef _KERNEL
+
+/* pseudo header */
+struct ieee1394_header {
+ u_int8_t ih_uid[8]; /* dst/src uid */
+ u_int8_t ih_maxrec; /* dst maxrec for tx */
+ u_int8_t ih_speed; /* speed */
+ u_int8_t ih_offset[6]; /* dst offset */
+};
+
+/* unfragment encapsulation header */
+struct ieee1394_unfraghdr {
+ u_int16_t iuh_ft; /* fragment type == 0 */
+ u_int16_t iuh_etype; /* ether_type */
+};
+
+/* fragmented encapsulation header */
+struct ieee1394_fraghdr {
+ u_int16_t ifh_ft_size; /* fragment type, data size-1 */
+ u_int16_t ifh_etype_off; /* etype for first fragment */
+ /* offset for subseq frag */
+ u_int16_t ifh_dgl; /* datagram label */
+ u_int16_t ifh_reserved;
+};
+
+#define IEEE1394_FT_SUBSEQ 0x8000
+#define IEEE1394_FT_MORE 0x4000
+
+#define IEEE1394MTU 1500
+
+#define IEEE1394_GASP_LEN 8 /* GASP header for Stream */
+#define IEEE1394_ADDR_LEN 8
+#define IEEE1394_CRC_LEN 4
+
+struct ieee1394_reass_pkt {
+ LIST_ENTRY(ieee1394_reass_pkt) rp_next;
+ struct mbuf *rp_m;
+ u_int16_t rp_size;
+ u_int16_t rp_etype;
+ u_int16_t rp_off;
+ u_int16_t rp_dgl;
+ u_int16_t rp_len;
+ u_int16_t rp_ttl;
+};
+
+struct ieee1394_reassq {
+ LIST_ENTRY(ieee1394_reassq) rq_node;
+ LIST_HEAD(, ieee1394_reass_pkt) rq_pkt;
+ u_int32_t fr_id;
+};
+
+struct ieee1394com {
+ struct ifnet fc_if;
+ struct ieee1394_hwaddr ic_hwaddr;
+ u_int16_t ic_dgl;
+ LIST_HEAD(, ieee1394_reassq) ic_reassq;
+};
+
+const char *ieee1394_sprintf(const u_int8_t *);
+void ieee1394_input(struct ifnet *, struct mbuf *, u_int16_t);
+void ieee1394_ifattach(struct ifnet *, const struct ieee1394_hwaddr *);
+void ieee1394_ifdetach(struct ifnet *);
+int ieee1394_ioctl(struct ifnet *, u_long, caddr_t);
+struct mbuf * ieee1394_fragment(struct ifnet *, struct mbuf *, int, u_int16_t);
+void ieee1394_drain(struct ifnet *);
+void ieee1394_watchdog(struct ifnet *);
+#endif /* _KERNEL */
+
+#endif /* !_NET_IF_IEEE1394_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_packet.h b/6/platforms/android-3/arch-x86/usr/include/net/if_packet.h
new file mode 100644
index 0000000..b5e8e0e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+#include <linux/if_packet.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/if_types.h b/6/platforms/android-3/arch-x86/usr/include/net/if_types.h
new file mode 100644
index 0000000..f0a04f7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/if_types.h
@@ -0,0 +1,267 @@
+/* $NetBSD: if_types.h,v 1.24 2005/12/10 23:21:38 elad Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)if_types.h 8.3 (Berkeley) 4/28/95
+ */
+
+#ifndef _NET_IF_TYPES_H_
+#define _NET_IF_TYPES_H_
+
+/*
+ * Interface types for benefit of parsing media address headers.
+ * This list is derived from the SNMP list of ifTypes, originally
+ * documented in RFC1573, now maintained as:
+ *
+ * <URL:http://www.iana.org/assignments/smi-numbers>
+ */
+
+#define IFT_OTHER 0x1 /* none of the following */
+#define IFT_1822 0x2 /* old-style arpanet imp */
+#define IFT_HDH1822 0x3 /* HDH arpanet imp */
+#define IFT_X25DDN 0x4 /* x25 to imp */
+#define IFT_X25 0x5 /* PDN X25 interface (RFC877) */
+#define IFT_ETHER 0x6 /* Ethernet CSMA/CD */
+#define IFT_ISO88023 0x7 /* CSMA/CD */
+#define IFT_ISO88024 0x8 /* Token Bus */
+#define IFT_ISO88025 0x9 /* Token Ring */
+#define IFT_ISO88026 0xa /* MAN */
+#define IFT_STARLAN 0xb
+#define IFT_P10 0xc /* Proteon 10MBit ring */
+#define IFT_P80 0xd /* Proteon 80MBit ring */
+#define IFT_HY 0xe /* Hyperchannel */
+#define IFT_FDDI 0xf
+#define IFT_LAPB 0x10
+#define IFT_SDLC 0x11
+#define IFT_T1 0x12
+#define IFT_CEPT 0x13 /* E1 - european T1 */
+#define IFT_ISDNBASIC 0x14
+#define IFT_ISDNPRIMARY 0x15
+#define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */
+#define IFT_PPP 0x17 /* RFC 1331 */
+#define IFT_LOOP 0x18 /* loopback */
+#define IFT_EON 0x19 /* ISO over IP */
+#define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */
+#define IFT_NSIP 0x1b /* XNS over IP */
+#define IFT_SLIP 0x1c /* IP over generic TTY */
+#define IFT_ULTRA 0x1d /* Ultra Technologies */
+#define IFT_DS3 0x1e /* Generic T3 */
+#define IFT_SIP 0x1f /* SMDS */
+#define IFT_FRELAY 0x20 /* Frame Relay DTE only */
+#define IFT_RS232 0x21
+#define IFT_PARA 0x22 /* parallel-port */
+#define IFT_ARCNET 0x23
+#define IFT_ARCNETPLUS 0x24
+#define IFT_ATM 0x25 /* ATM cells */
+#define IFT_MIOX25 0x26
+#define IFT_SONET 0x27 /* SONET or SDH */
+#define IFT_X25PLE 0x28
+#define IFT_ISO88022LLC 0x29
+#define IFT_LOCALTALK 0x2a
+#define IFT_SMDSDXI 0x2b
+#define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */
+#define IFT_V35 0x2d
+#define IFT_HSSI 0x2e
+#define IFT_HIPPI 0x2f
+#define IFT_MODEM 0x30 /* Generic Modem */
+#define IFT_AAL5 0x31 /* AAL5 over ATM */
+#define IFT_SONETPATH 0x32
+#define IFT_SONETVT 0x33
+#define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */
+#define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */
+#define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */
+#define IFT_IEEE80212 0x37 /* 100BaseVG */
+#define IFT_FIBRECHANNEL 0x38 /* Fibre Channel */
+#define IFT_HIPPIINTERFACE 0x39 /* HIPPI interfaces */
+#define IFT_FRAMERELAYINTERCONNECT 0x3a /* Obsolete, use either 0x20 or 0x2c */
+#define IFT_AFLANE8023 0x3b /* ATM Emulated LAN for 802.3 */
+#define IFT_AFLANE8025 0x3c /* ATM Emulated LAN for 802.5 */
+#define IFT_CCTEMUL 0x3d /* ATM Emulated circuit */
+#define IFT_FASTETHER 0x3e /* Fast Ethernet (100BaseT) */
+#define IFT_ISDN 0x3f /* ISDN and X.25 */
+#define IFT_V11 0x40 /* CCITT V.11/X.21 */
+#define IFT_V36 0x41 /* CCITT V.36 */
+#define IFT_G703AT64K 0x42 /* CCITT G703 at 64Kbps */
+#define IFT_G703AT2MB 0x43 /* Obsolete see DS1-MIB */
+#define IFT_QLLC 0x44 /* SNA QLLC */
+#define IFT_FASTETHERFX 0x45 /* Fast Ethernet (100BaseFX) */
+#define IFT_CHANNEL 0x46 /* channel */
+#define IFT_IEEE80211 0x47 /* radio spread spectrum */
+#define IFT_IBM370PARCHAN 0x48 /* IBM System 360/370 OEMI Channel */
+#define IFT_ESCON 0x49 /* IBM Enterprise Systems Connection */
+#define IFT_DLSW 0x4a /* Data Link Switching */
+#define IFT_ISDNS 0x4b /* ISDN S/T interface */
+#define IFT_ISDNU 0x4c /* ISDN U interface */
+#define IFT_LAPD 0x4d /* Link Access Protocol D */
+#define IFT_IPSWITCH 0x4e /* IP Switching Objects */
+#define IFT_RSRB 0x4f /* Remote Source Route Bridging */
+#define IFT_ATMLOGICAL 0x50 /* ATM Logical Port */
+#define IFT_DS0 0x51 /* Digital Signal Level 0 */
+#define IFT_DS0BUNDLE 0x52 /* group of ds0s on the same ds1 */
+#define IFT_BSC 0x53 /* Bisynchronous Protocol */
+#define IFT_ASYNC 0x54 /* Asynchronous Protocol */
+#define IFT_CNR 0x55 /* Combat Net Radio */
+#define IFT_ISO88025DTR 0x56 /* ISO 802.5r DTR */
+#define IFT_EPLRS 0x57 /* Ext Pos Loc Report Sys */
+#define IFT_ARAP 0x58 /* Appletalk Remote Access Protocol */
+#define IFT_PROPCNLS 0x59 /* Proprietary Connectionless Protocol*/
+#define IFT_HOSTPAD 0x5a /* CCITT-ITU X.29 PAD Protocol */
+#define IFT_TERMPAD 0x5b /* CCITT-ITU X.3 PAD Facility */
+#define IFT_FRAMERELAYMPI 0x5c /* Multiproto Interconnect over FR */
+#define IFT_X213 0x5d /* CCITT-ITU X213 */
+#define IFT_ADSL 0x5e /* Asymmetric Digital Subscriber Loop */
+#define IFT_RADSL 0x5f /* Rate-Adapt. Digital Subscriber Loop*/
+#define IFT_SDSL 0x60 /* Symmetric Digital Subscriber Loop */
+#define IFT_VDSL 0x61 /* Very H-Speed Digital Subscrib. Loop*/
+#define IFT_ISO88025CRFPINT 0x62 /* ISO 802.5 CRFP */
+#define IFT_MYRINET 0x63 /* Myricom Myrinet */
+#define IFT_VOICEEM 0x64 /* voice recEive and transMit */
+#define IFT_VOICEFXO 0x65 /* voice Foreign Exchange Office */
+#define IFT_VOICEFXS 0x66 /* voice Foreign Exchange Station */
+#define IFT_VOICEENCAP 0x67 /* voice encapsulation */
+#define IFT_VOICEOVERIP 0x68 /* voice over IP encapsulation */
+#define IFT_ATMDXI 0x69 /* ATM DXI */
+#define IFT_ATMFUNI 0x6a /* ATM FUNI */
+#define IFT_ATMIMA 0x6b /* ATM IMA */
+#define IFT_PPPMULTILINKBUNDLE 0x6c /* PPP Multilink Bundle */
+#define IFT_IPOVERCDLC 0x6d /* IBM ipOverCdlc */
+#define IFT_IPOVERCLAW 0x6e /* IBM Common Link Access to Workstn */
+#define IFT_STACKTOSTACK 0x6f /* IBM stackToStack */
+#define IFT_VIRTUALIPADDRESS 0x70 /* IBM VIPA */
+#define IFT_MPC 0x71 /* IBM multi-protocol channel support */
+#define IFT_IPOVERATM 0x72 /* IBM ipOverAtm */
+#define IFT_ISO88025FIBER 0x73 /* ISO 802.5j Fiber Token Ring */
+#define IFT_TDLC 0x74 /* IBM twinaxial data link control */
+#define IFT_GIGABITETHERNET 0x75 /* Gigabit Ethernet */
+#define IFT_HDLC 0x76 /* HDLC */
+#define IFT_LAPF 0x77 /* LAP F */
+#define IFT_V37 0x78 /* V.37 */
+#define IFT_X25MLP 0x79 /* Multi-Link Protocol */
+#define IFT_X25HUNTGROUP 0x7a /* X25 Hunt Group */
+#define IFT_TRANSPHDLC 0x7b /* Transp HDLC */
+#define IFT_INTERLEAVE 0x7c /* Interleave channel */
+#define IFT_FAST 0x7d /* Fast channel */
+#define IFT_IP 0x7e /* IP (for APPN HPR in IP networks) */
+#define IFT_DOCSCABLEMACLAYER 0x7f /* CATV Mac Layer */
+#define IFT_DOCSCABLEDOWNSTREAM 0x80 /* CATV Downstream interface */
+#define IFT_DOCSCABLEUPSTREAM 0x81 /* CATV Upstream interface */
+#define IFT_A12MPPSWITCH 0x82 /* Avalon Parallel Processor */
+#define IFT_TUNNEL 0x83 /* Encapsulation interface */
+#define IFT_COFFEE 0x84 /* coffee pot */
+#define IFT_CES 0x85 /* Circiut Emulation Service */
+#define IFT_ATMSUBINTERFACE 0x86 /* (x) ATM Sub Interface */
+#define IFT_L2VLAN 0x87 /* Layer 2 Virtual LAN using 802.1Q */
+#define IFT_L3IPVLAN 0x88 /* Layer 3 Virtual LAN - IP Protocol */
+#define IFT_L3IPXVLAN 0x89 /* Layer 3 Virtual LAN - IPX Prot. */
+#define IFT_DIGITALPOWERLINE 0x8a /* IP over Power Lines */
+#define IFT_MEDIAMAILOVERIP 0x8b /* (xxx) Multimedia Mail over IP */
+#define IFT_DTM 0x8c /* Dynamic synchronous Transfer Mode */
+#define IFT_DCN 0x8d /* Data Communications Network */
+#define IFT_IPFORWARD 0x8e /* IP Forwarding Interface */
+#define IFT_MSDSL 0x8f /* Multi-rate Symmetric DSL */
+#define IFT_IEEE1394 0x90 /* IEEE1394 High Performance SerialBus*/
+#define IFT_IFGSN 0x91 /* HIPPI-6400 */
+#define IFT_DVBRCCMACLAYER 0x92 /* DVB-RCC MAC Layer */
+#define IFT_DVBRCCDOWNSTREAM 0x93 /* DVB-RCC Downstream Channel */
+#define IFT_DVBRCCUPSTREAM 0x94 /* DVB-RCC Upstream Channel */
+#define IFT_ATMVIRTUAL 0x95 /* ATM Virtual Interface */
+#define IFT_MPLSTUNNEL 0x96 /* MPLS Tunnel Virtual Interface */
+#define IFT_SRP 0x97 /* Spatial Reuse Protocol */
+#define IFT_VOICEOVERATM 0x98 /* Voice over ATM */
+#define IFT_VOICEOVERFRAMERELAY 0x99 /* Voice Over Frame Relay */
+#define IFT_IDSL 0x9a /* Digital Subscriber Loop over ISDN */
+#define IFT_COMPOSITELINK 0x9b /* Avici Composite Link Interface */
+#define IFT_SS7SIGLINK 0x9c /* SS7 Signaling Link */
+#define IFT_PROPWIRELESSP2P 0x9d /* Prop. P2P wireless interface */
+#define IFT_FRFORWARD 0x9e /* Frame forward Interface */
+#define IFT_RFC1483 0x9f /* Multiprotocol over ATM AAL5 */
+#define IFT_USB 0xa0 /* USB Interface */
+#define IFT_IEEE8023ADLAG 0xa1 /* IEEE 802.3ad Link Aggregate*/
+#define IFT_BGPPOLICYACCOUNTING 0xa2 /* BGP Policy Accounting */
+#define IFT_FRF16MFRBUNDLE 0xa3 /* FRF.16 Multilik Frame Relay*/
+#define IFT_H323GATEKEEPER 0xa4 /* H323 Gatekeeper */
+#define IFT_H323PROXY 0xa5 /* H323 Voice and Video Proxy */
+#define IFT_MPLS 0xa6 /* MPLS */
+#define IFT_MFSIGLINK 0xa7 /* Multi-frequency signaling link */
+#define IFT_HDSL2 0xa8 /* High Bit-Rate DSL, 2nd gen. */
+#define IFT_SHDSL 0xa9 /* Multirate HDSL2 */
+#define IFT_DS1FDL 0xaa /* Facility Data Link (4Kbps) on a DS1*/
+#define IFT_POS 0xab /* Packet over SONET/SDH Interface */
+#define IFT_DVBASILN 0xac /* DVB-ASI Input */
+#define IFT_DVBASIOUT 0xad /* DVB-ASI Output */
+#define IFT_PLC 0xae /* Power Line Communications */
+#define IFT_NFAS 0xaf /* Non-Facility Associated Signaling */
+#define IFT_TR008 0xb0 /* TROO8 */
+#define IFT_GR303RDT 0xb1 /* Remote Digital Terminal */
+#define IFT_GR303IDT 0xb2 /* Integrated Digital Terminal */
+#define IFT_ISUP 0xb3 /* ISUP */
+#define IFT_PROPDOCSWIRELESSMACLAYER 0xb4 /* prop/Wireless MAC Layer */
+#define IFT_PROPDOCSWIRELESSDOWNSTREAM 0xb5 /* prop/Wireless Downstream */
+#define IFT_PROPDOCSWIRELESSUPSTREAM 0xb6 /* prop/Wireless Upstream */
+#define IFT_HIPERLAN2 0xb7 /* HIPERLAN Type 2 Radio Interface */
+#define IFT_PROPBWAP2MP 0xb8 /* PropBroadbandWirelessAccess P2MP*/
+#define IFT_SONETOVERHEADCHANNEL 0xb9 /* SONET Overhead Channel */
+#define IFT_DIGITALWRAPPEROVERHEADCHANNEL 0xba /* Digital Wrapper Overhead */
+#define IFT_AAL2 0xbb /* ATM adaptation layer 2 */
+#define IFT_RADIOMAC 0xbc /* MAC layer over radio links */
+#define IFT_ATMRADIO 0xbd /* ATM over radio links */
+#define IFT_IMT 0xbe /* Inter-Machine Trunks */
+#define IFT_MVL 0xbf /* Multiple Virtual Lines DSL */
+#define IFT_REACHDSL 0xc0 /* Long Reach DSL */
+#define IFT_FRDLCIENDPT 0xc1 /* Frame Relay DLCI End Point */
+#define IFT_ATMVCIENDPT 0xc2 /* ATM VCI End Point */
+#define IFT_OPTICALCHANNEL 0xc3 /* Optical Channel */
+#define IFT_OPTICALTRANSPORT 0xc4 /* Optical Transport */
+#define IFT_PROPATM 0xc5 /* Proprietary ATM */
+#define IFT_VOICEOVERCABLE 0xc6 /* Voice Over Cable Interface */
+#define IFT_INFINIBAND 0xc7 /* Infiniband */
+#define IFT_TELINK 0xc8 /* TE Link */
+#define IFT_Q2931 0xc9 /* Q.2931 */
+#define IFT_VIRTUALTG 0xca /* Virtual Trunk Group */
+#define IFT_SIPTG 0xcb /* SIP Trunk Group */
+#define IFT_SIPSIG 0xcc /* SIP Signaling */
+#define IFT_DOCSCABLEUPSTREAMCHANNEL 0xcd /* CATV Upstream Channel */
+#define IFT_ECONET 0xce /* Acorn Econet */
+#define IFT_PON155 0xcf /* FSAN 155Mb Symetrical PON interface */
+#define IFT_PON622 0xd0 /* FSAN 622Mb Symetrical PON interface */*/
+#define IFT_BRIDGE 0xd1 /* Transparent bridge interface */
+#define IFT_LINEGROUP 0xd2 /* Interface common to multiple lines */
+#define IFT_VOICEEMFGD 0xd3 /* voice E&M Feature Group D */
+#define IFT_VOICEFGDEANA 0xd4 /* voice FGD Exchange Access North American */
+#define IFT_VOICEDID 0xd5 /* voice Direct Inward Dialing */
+#define IFT_STF 0xd7 /* 6to4 interface */
+
+/* not based on IANA assignments - how should we treat these? */
+#define IFT_GIF 0xf0
+#define IFT_PVC 0xf1
+#define IFT_FAITH 0xf2
+#define IFT_PFLOG 0xf5 /* Packet filter logging */
+#define IFT_PFSYNC 0xf6 /* Packet filter state syncing */
+
+#endif /* !_NET_IF_TYPES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/net/route.h b/6/platforms/android-3/arch-x86/usr/include/net/route.h
new file mode 100644
index 0000000..a60df24
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/net/route.h
@@ -0,0 +1 @@
+#include <linux/route.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/netdb.h b/6/platforms/android-3/arch-x86/usr/include/netdb.h
new file mode 100644
index 0000000..8d3996a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netdb.h
@@ -0,0 +1,256 @@
+/*-
+ * Copyright (c) 1980, 1983, 1988, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * -
+ * --Copyright--
+ */
+
+/*
+ * @(#)netdb.h 8.1 (Berkeley) 6/2/93
+ * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
+ * $FreeBSD: /repoman/r/ncvs/src/include/netdb.h,v 1.41 2006/04/15 16:20:26 ume Exp $
+ */
+
+#ifndef _NETDB_H_
+#define _NETDB_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#ifndef _PATH_HEQUIV
+# define _PATH_HEQUIV "/system/etc/hosts.equiv"
+#endif
+#define _PATH_HOSTS "/system/etc/hosts"
+#define _PATH_NETWORKS "/system/etc/networks"
+#define _PATH_PROTOCOLS "/system/etc/protocols"
+#define _PATH_SERVICES "/system/etc/services"
+
+#define MAXHOSTNAMELEN 256
+
+
+/*
+ * Structures returned by network data base library. All addresses are
+ * supplied in host order, and returned in network order (suitable for
+ * use in system calls).
+ */
+struct hostent {
+ char *h_name; /* official name of host */
+ char **h_aliases; /* alias list */
+ int h_addrtype; /* host address type */
+ int h_length; /* length of address */
+ char **h_addr_list; /* list of addresses from name server */
+#define h_addr h_addr_list[0] /* address, for backward compatibility */
+};
+
+struct netent {
+ char *n_name; /* official name of net */
+ char **n_aliases; /* alias list */
+ int n_addrtype; /* net address type */
+ uint32_t n_net; /* network # */
+};
+
+struct servent {
+ char *s_name; /* official service name */
+ char **s_aliases; /* alias list */
+ int s_port; /* port # */
+ char *s_proto; /* protocol to use */
+};
+
+struct protoent {
+ char *p_name; /* official protocol name */
+ char **p_aliases; /* alias list */
+ int p_proto; /* protocol # */
+};
+
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ socklen_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+
+/*
+ * Error return codes from gethostbyname() and gethostbyaddr()
+ * (left in h_errno).
+ */
+
+#define NETDB_INTERNAL -1 /* see errno */
+#define NETDB_SUCCESS 0 /* no problem */
+#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
+#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
+#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
+#define NO_DATA 4 /* Valid name, no data record of requested type */
+#define NO_ADDRESS NO_DATA /* no address, look for MX record */
+
+/*
+ * Error return codes from getaddrinfo()
+ */
+#if 0
+/* obsoleted */
+#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
+#endif
+#define EAI_AGAIN 2 /* temporary failure in name resolution */
+#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
+#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* memory allocation failure */
+#define EAI_NODATA 7 /* no address associated with hostname */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
+#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
+#define EAI_SYSTEM 11 /* system error returned in errno */
+#define EAI_BADHINTS 12 /* invalid value for hints */
+#define EAI_PROTOCOL 13 /* resolved protocol is unknown */
+#define EAI_OVERFLOW 14 /* argument buffer overflow */
+#define EAI_MAX 15
+
+/*
+ * Flag values for getaddrinfo()
+ */
+#define AI_PASSIVE 0x00000001 /* get address to use bind() */
+#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
+#define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */
+#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */
+/* valid flags for addrinfo (not a standard def, apps should not use it) */
+#define AI_MASK \
+ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \
+ AI_ADDRCONFIG)
+
+#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
+#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
+#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
+#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */
+/* special recommended flags for getipnodebyname */
+#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
+
+/*
+ * Constants for getnameinfo()
+ */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/*
+ * Flag values for getnameinfo()
+ */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+#if 0 /* obsolete */
+#define NI_WITHSCOPEID 0x00000020
+#endif
+
+/*
+ * Scope delimit character
+ */
+#define SCOPE_DELIMITER '%'
+
+__BEGIN_DECLS
+/* BIONIC-BEGIN */
+#define h_errno (*__get_h_errno())
+int* __get_h_errno(void);
+/* BIONIC-END */
+void endservent(void);
+struct hostent *gethostbyaddr(const char *, int, int);
+struct hostent *gethostbyname(const char *);
+int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
+struct hostent *gethostbyname2(const char *, int);
+struct hostent *gethostent(void);
+struct netent *getnetbyaddr(uint32_t, int);
+struct netent *getnetbyname(const char *);
+struct protoent *getprotobyname(const char *);
+struct protoent *getprotobynumber(int);
+struct servent *getservbyname(const char *, const char *);
+struct servent *getservbyport(int, const char *);
+struct servent *getservent(void);
+void herror(const char *);
+const char *hstrerror(int);
+int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **);
+int getnameinfo(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int);
+void freeaddrinfo(struct addrinfo *);
+const char *gai_strerror(int);
+void setservent(int);
+
+#if 0 /* MISSING FROM BIONIC */
+void endhostent(void);
+void endnetent(void);
+void endnetgrent(void);
+void endprotoent(void);
+void freehostent(struct hostent *);
+int gethostbyaddr_r(const char *, int, int, struct hostent *, char *, size_t, struct hostent **, int *);
+int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *);
+int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *);
+struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
+struct hostent *getipnodebyname(const char *, int, int, int *);
+int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t, struct netent**, int *);
+int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int *);
+int getnetent_r(struct netent *, char *, size_t, struct netent **, int *);
+int getnetgrent(char **, char **, char **);
+int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **);
+int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **);
+struct protoent *getprotoent(void);
+int getprotoent_r(struct protoent *, char *, size_t, struct protoent **);
+int innetgr(const char *, const char *, const char *, const char *);
+void sethostent(int);
+void setnetent(int);
+void setprotoent(int);
+struct netent *getnetent(void);
+void setnetgrent(const char *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* !_NETDB_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/ether.h b/6/platforms/android-3/arch-x86/usr/include/netinet/ether.h
new file mode 100644
index 0000000..a1c9cbb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/ether.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <net/if_ether.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/if_ether.h b/6/platforms/android-3/arch-x86/usr/include/netinet/if_ether.h
new file mode 100644
index 0000000..700b9db
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/if_ether.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/if_ether.h>
+#include <linux/if_arp.h>
+#ifndef ETHER_ADDR_LEN
+#define ETHER_ADDR_LEN ETH_ALEN
+#include <net/ethertypes.h>
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/in.h b/6/platforms/android-3/arch-x86/usr/include/netinet/in.h
new file mode 100644
index 0000000..7a4b6c7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/in.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_IN_H_
+#define _NETINET_IN_H_
+
+#include <endian.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/in6.h>
+#include <netinet/in6.h>
+
+__BEGIN_DECLS
+
+#define IPPORT_RESERVED 1024
+
+#define INET_ADDRSTRLEN 16
+
+extern int bindresvport (int sd, struct sockaddr_in *sin);
+
+static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+static const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
+
+__END_DECLS
+
+#endif /* _NETINET_IN_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/in6.h b/6/platforms/android-3/arch-x86/usr/include/netinet/in6.h
new file mode 100644
index 0000000..e756583
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/in6.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_IN6_H
+#define _NETINET_IN6_H
+
+#include <linux/in6.h>
+
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
+
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
+
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+
+#define IN6_IS_ADDR_MULTICAST(a) \
+ (((__const uint8_t *) (a))[0] == 0xff)
+
+
+#define IPV6_ADDR_SCOPE_NODELOCAL 0x01
+#define IPV6_ADDR_SCOPE_INTFACELOCAL 0x01
+#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
+#define IPV6_ADDR_SCOPE_SITELOCAL 0x05
+#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08
+#define IPV6_ADDR_SCOPE_GLOBAL 0x0e
+
+#define IPV6_ADDR_MC_SCOPE(a) \
+ ((a)->s6_addr[1] & 0x0f)
+
+#define IN6_IS_ADDR_MC_NODELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL))
+#define IN6_IS_ADDR_MC_SITELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL))
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL))
+#define IN6_IS_ADDR_MC_GLOBAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
+
+#define IN6_ARE_ADDR_EQUAL(a, b) \
+ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
+
+#define INET6_ADDRSTRLEN 46
+
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+
+#define IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}}
+
+#define ipv6mr_interface ipv6mr_ifindex
+
+
+#endif /* _NETINET_IN6_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/in_systm.h b/6/platforms/android-3/arch-x86/usr/include/netinet/in_systm.h
new file mode 100644
index 0000000..ff53fb7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/in_systm.h
@@ -0,0 +1,59 @@
+/* $NetBSD: in_systm.h,v 1.13 2005/12/10 23:36:23 elad Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IN_SYSTM_H_
+#define _NETINET_IN_SYSTM_H_
+
+/*
+ * Miscellaneous internetwork
+ * definitions for kernel.
+ */
+
+/*
+ * Network types.
+ *
+ * Internally the system keeps counters in the headers with the bytes
+ * swapped so that VAX instructions will work on them. It reverses
+ * the bytes before transmission at each protocol level. The n_ types
+ * represent the types with the bytes in ``high-ender'' order.
+ */
+typedef u_int16_t n_short; /* short as received from the net */
+typedef u_int32_t n_long; /* long as received from the net */
+
+typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
+
+#ifdef _KERNEL
+n_time iptime (void);
+#endif
+
+#endif /* !_NETINET_IN_SYSTM_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/ip.h b/6/platforms/android-3/arch-x86/usr/include/netinet/ip.h
new file mode 100644
index 0000000..541905c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/ip.h
@@ -0,0 +1,275 @@
+/* $OpenBSD: ip.h,v 1.12 2006/04/27 02:19:32 tedu Exp $ */
+/* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP_H_
+#define _NETINET_IP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <endian.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+
+__BEGIN_DECLS
+
+/*
+ * Definitions for internet protocol version 4.
+ * Per RFC 791, September 1981.
+ */
+#define IPVERSION 4
+
+/*
+ * Structure of an internet header, naked of options.
+ */
+struct ip {
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int32_t ip_hl:4, /* header length */
+ ip_v:4; /* version */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int32_t ip_v:4, /* version */
+ ip_hl:4; /* header length */
+#endif
+ u_int8_t ip_tos; /* type of service */
+ u_int16_t ip_len; /* total length */
+ u_int16_t ip_id; /* identification */
+ u_int16_t ip_off; /* fragment offset field */
+#define IP_RF 0x8000 /* reserved fragment flag */
+#define IP_DF 0x4000 /* dont fragment flag */
+#define IP_MF 0x2000 /* more fragments flag */
+#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
+ u_int8_t ip_ttl; /* time to live */
+ u_int8_t ip_p; /* protocol */
+ u_int16_t ip_sum; /* checksum */
+ struct in_addr ip_src, ip_dst; /* source and dest address */
+};
+
+#define IP_MAXPACKET 65535 /* maximum packet size */
+
+/*
+ * Definitions for IP type of service (ip_tos)
+ */
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+/* IPTOS_LOWCOST 0x02 XXX */
+#if 1
+/* ECN RFC3168 obsoletes RFC2481, and these will be deprecated soon. */
+#define IPTOS_CE 0x01 /* congestion experienced */
+#define IPTOS_ECT 0x02 /* ECN-capable transport */
+#endif
+
+/*
+ * Definitions for IP precedence (also in ip_tos) (hopefully unused)
+ */
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+/*
+ * ECN (Explicit Congestion Notification) codepoints in RFC3168
+ * mapped to the lower 2 bits of the TOS field.
+ */
+#define IPTOS_ECN_NOTECT 0x00 /* not-ECT */
+#define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */
+#define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */
+#define IPTOS_ECN_CE 0x03 /* congestion experienced */
+#define IPTOS_ECN_MASK 0x03 /* ECN field mask */
+
+/*
+ * Definitions for options.
+ */
+#define IPOPT_COPIED(o) ((o)&0x80)
+#define IPOPT_CLASS(o) ((o)&0x60)
+#define IPOPT_NUMBER(o) ((o)&0x1f)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_DEBMEAS 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_EOL 0 /* end of option list */
+#define IPOPT_NOP 1 /* no operation */
+
+#define IPOPT_RR 7 /* record packet route */
+#define IPOPT_TS 68 /* timestamp */
+#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
+#define IPOPT_LSRR 131 /* loose source route */
+#define IPOPT_SATID 136 /* satnet id */
+#define IPOPT_SSRR 137 /* strict source route */
+
+/*
+ * Offsets to fields in options other than EOL and NOP.
+ */
+#define IPOPT_OPTVAL 0 /* option ID */
+#define IPOPT_OLEN 1 /* option length */
+#define IPOPT_OFFSET 2 /* offset within option */
+#define IPOPT_MINOFF 4 /* min value of above */
+
+/*
+ * Time stamp option structure.
+ */
+struct ip_timestamp {
+ u_int8_t ipt_code; /* IPOPT_TS */
+ u_int8_t ipt_len; /* size of structure (variable) */
+ u_int8_t ipt_ptr; /* index of current entry */
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+ u_int32_t ipt_flg:4, /* flags, see below */
+ ipt_oflw:4; /* overflow counter */
+#endif
+#if _BYTE_ORDER == _BIG_ENDIAN
+ u_int32_t ipt_oflw:4, /* overflow counter */
+ ipt_flg:4; /* flags, see below */
+#endif
+ union ipt_timestamp {
+ n_time ipt_time[1];
+ struct ipt_ta {
+ struct in_addr ipt_addr;
+ n_time ipt_time;
+ } ipt_ta[1];
+ } ipt_timestamp;
+};
+
+/* flag bits for ipt_flg */
+#define IPOPT_TS_TSONLY 0 /* timestamps only */
+#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
+#define IPOPT_TS_PRESPEC 3 /* specified modules only */
+
+/* bits for security (not byte swapped) */
+#define IPOPT_SECUR_UNCLASS 0x0000
+#define IPOPT_SECUR_CONFID 0xf135
+#define IPOPT_SECUR_EFTO 0x789a
+#define IPOPT_SECUR_MMMM 0xbc4d
+#define IPOPT_SECUR_RESTR 0xaf13
+#define IPOPT_SECUR_SECRET 0xd788
+#define IPOPT_SECUR_TOPSECRET 0x6bc5
+
+/*
+ * Internet implementation parameters.
+ */
+#define MAXTTL 255 /* maximum time to live (seconds) */
+#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
+#define IPFRAGTTL 60 /* time to live for frags, slowhz */
+#define IPTTLDEC 1 /* subtracted when forwarding */
+
+#define IP_MSS 576 /* default maximum segment size */
+
+/*
+ * This is the real IPv4 pseudo header, used for computing the TCP and UDP
+ * checksums. For the Internet checksum, struct ipovly can be used instead.
+ * For stronger checksums, the real thing must be used.
+ */
+struct ippseudo {
+ struct in_addr ippseudo_src; /* source internet address */
+ struct in_addr ippseudo_dst; /* destination internet address */
+ u_int8_t ippseudo_pad; /* pad, must be zero */
+ u_int8_t ippseudo_p; /* protocol */
+ u_int16_t ippseudo_len; /* protocol length */
+};
+
+/* BIONIC addition: declarations matching the Linux kernel */
+/* some programs expect these... */
+
+#define IPOPT_OPTVAL 0
+#define IPOPT_OLEN 1
+#define IPOPT_OFFSET 2
+#define IPOPT_MINOFF 4
+#define MAX_IPOPTLEN 40
+
+#define IPOPT_COPY 0x80
+#define IPOPT_CLASS_MASK 0x60
+#define IPOPT_NUMBER_MASK 0x1f
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_MEASUREMENT 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_END (0 |IPOPT_CONTROL)
+#define IPOPT_NOOP (1 |IPOPT_CONTROL)
+#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
+#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
+#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
+
+struct iphdr {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+ uint8_t ihl :4,
+ version:4;
+#elif defined (__BIG_ENDIAN_BITFIELD)
+ uint8_t version:4,
+ ihl :4;
+#else
+#error "Please fix <asm/byteorder.h>"
+#endif
+ uint8_t tos;
+ uint16_t tot_len;
+ uint16_t id;
+ uint16_t frag_off;
+ uint8_t ttl;
+ uint8_t protocol;
+ uint16_t check;
+ int32_t saddr;
+ int32_t daddr;
+};
+
+struct ip_auth_hdr {
+ uint8_t nexthdr;
+ uint8_t hdrlen;
+ uint16_t reserved;
+ uint32_t spi;
+ uint32_t seq_no;
+ uint8_t auth_data[0];
+};
+
+struct ip_esp_hdr {
+ uint32_t spi;
+ uint32_t seq_no;
+ uint8_t enc_data[0];
+};
+
+struct ip_comp_hdr {
+ uint8_t nexthdr;
+ uint8_t flags;
+ uint16_t cpi;
+};
+
+__END_DECLS
+
+#endif /* _NETINET_IP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/ip_icmp.h b/6/platforms/android-3/arch-x86/usr/include/netinet/ip_icmp.h
new file mode 100644
index 0000000..7510592
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/ip_icmp.h
@@ -0,0 +1,214 @@
+/* $OpenBSD: ip_icmp.h,v 1.21 2005/07/31 03:30:55 pascoe Exp $ */
+/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP_ICMP_H_
+#define _NETINET_IP_ICMP_H_
+
+#include <netinet/ip.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/*
+ * Interface Control Message Protocol Definitions.
+ * Per RFC 792, September 1981.
+ * RFC 950, August 1985. (Address Mask Request / Reply)
+ * RFC 1256, September 1991. (Router Advertisement and Solicitation)
+ * RFC 1108, November 1991. (Param Problem, Missing Req. Option)
+ * RFC 1393, January 1993. (Traceroute)
+ * RFC 1475, June 1993. (Datagram Conversion Error)
+ * RFC 1812, June 1995. (adm prohib, host precedence, precedence cutoff)
+ * RFC 2002, October 1996. (Mobility changes to Router Advertisement)
+ */
+
+/*
+ * ICMP Router Advertisement data
+ */
+struct icmp_ra_addr {
+ uint32_t ira_addr;
+ uint32_t ira_preference;
+};
+
+/*
+ * Structure of an icmp header.
+ */
+struct icmp {
+ uint8_t icmp_type; /* type of message, see below */
+ uint8_t icmp_code; /* type sub code */
+ uint16_t icmp_cksum; /* ones complement cksum of struct */
+ union {
+ uint8_t ih_pptr; /* ICMP_PARAMPROB */
+ struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
+ struct ih_idseq {
+ uint16_t icd_id;
+ uint16_t icd_seq;
+ } ih_idseq;
+ int32_t ih_void;
+
+ /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
+ struct ih_pmtu {
+ uint16_t ipm_void;
+ uint16_t ipm_nextmtu;
+ } ih_pmtu;
+
+ struct ih_rtradv {
+ uint8_t irt_num_addrs;
+ uint8_t irt_wpa;
+ uint16_t irt_lifetime;
+ } ih_rtradv;
+ } icmp_hun;
+#define icmp_pptr icmp_hun.ih_pptr
+#define icmp_gwaddr icmp_hun.ih_gwaddr
+#define icmp_id icmp_hun.ih_idseq.icd_id
+#define icmp_seq icmp_hun.ih_idseq.icd_seq
+#define icmp_void icmp_hun.ih_void
+#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
+#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
+#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
+#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
+#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
+ union {
+ struct id_ts {
+ uint32_t its_otime;
+ uint32_t its_rtime;
+ uint32_t its_ttime;
+ } id_ts;
+ struct id_ip {
+ struct ip idi_ip;
+ /* options and then 64 bits of data */
+ } id_ip;
+ uint32_t id_mask;
+ int8_t id_data[1];
+ } icmp_dun;
+#define icmp_otime icmp_dun.id_ts.its_otime
+#define icmp_rtime icmp_dun.id_ts.its_rtime
+#define icmp_ttime icmp_dun.id_ts.its_ttime
+#define icmp_ip icmp_dun.id_ip.idi_ip
+#define icmp_mask icmp_dun.id_mask
+#define icmp_data icmp_dun.id_data
+};
+
+/*
+ * For IPv6 transition related ICMP errors.
+ */
+#define ICMP_V6ADVLENMIN (8 + sizeof(struct ip) + 40)
+#define ICMP_V6ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 40)
+
+/*
+ * Lower bounds on packet lengths for various types.
+ * For the error advice packets must first insure that the
+ * packet is large enough to contain the returned ip header.
+ * Only then can we do the check to see if 64 bits of packet
+ * data have been returned, since we need to check the returned
+ * ip header length.
+ */
+#define ICMP_MINLEN 8 /* abs minimum */
+#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
+#define ICMP_MASKLEN 12 /* address mask */
+#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
+#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
+ /* N.B.: must separately check that ip_hl >= 5 */
+
+/*
+ * Definition of type and code field values.
+ * http://www.iana.org/assignments/icmp-parameters
+ */
+#define ICMP_ECHOREPLY 0 /* echo reply */
+#define ICMP_UNREACH 3 /* dest unreachable, codes: */
+#define ICMP_UNREACH_NET 0 /* bad net */
+#define ICMP_UNREACH_HOST 1 /* bad host */
+#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
+#define ICMP_UNREACH_PORT 3 /* bad port */
+#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
+#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
+#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
+#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
+#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
+#define ICMP_UNREACH_NET_PROHIB 9 /* for crypto devs */
+#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
+#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
+#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
+#define ICMP_UNREACH_FILTER_PROHIB 13 /* prohibited access */
+#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* precedence violat'n*/
+#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* precedence cutoff */
+#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
+#define ICMP_REDIRECT 5 /* shorter route, codes: */
+#define ICMP_REDIRECT_NET 0 /* for network */
+#define ICMP_REDIRECT_HOST 1 /* for host */
+#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
+#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
+#define ICMP_ALTHOSTADDR 6 /* alternate host address */
+#define ICMP_ECHO 8 /* echo service */
+#define ICMP_ROUTERADVERT 9 /* router advertisement */
+#define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */
+#define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */
+#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
+#define ICMP_TIMXCEED 11 /* time exceeded, code: */
+#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
+#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
+#define ICMP_PARAMPROB 12 /* ip header bad */
+#define ICMP_PARAMPROB_ERRATPTR 0 /* req. opt. absent */
+#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
+#define ICMP_PARAMPROB_LENGTH 2 /* bad length */
+#define ICMP_TSTAMP 13 /* timestamp request */
+#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
+#define ICMP_IREQ 15 /* information request */
+#define ICMP_IREQREPLY 16 /* information reply */
+#define ICMP_MASKREQ 17 /* address mask request */
+#define ICMP_MASKREPLY 18 /* address mask reply */
+#define ICMP_TRACEROUTE 30 /* traceroute */
+#define ICMP_DATACONVERR 31 /* data conversion error */
+#define ICMP_MOBILE_REDIRECT 32 /* mobile host redirect */
+#define ICMP_IPV6_WHEREAREYOU 33 /* IPv6 where-are-you */
+#define ICMP_IPV6_IAMHERE 34 /* IPv6 i-am-here */
+#define ICMP_MOBILE_REGREQUEST 35 /* mobile registration req */
+#define ICMP_MOBILE_REGREPLY 36 /* mobile registration reply */
+#define ICMP_SKIP 39 /* SKIP */
+#define ICMP_PHOTURIS 40 /* Photuris */
+#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* unknown sec index */
+#define ICMP_PHOTURIS_AUTH_FAILED 2 /* auth failed */
+#define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* decrypt failed */
+
+#define ICMP_MAXTYPE 40
+
+#define ICMP_INFOTYPE(type) \
+ ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
+ (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
+ (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
+ (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
+ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
+
+__END_DECLS
+
+#endif /* _NETINET_IP_ICMP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/tcp.h b/6/platforms/android-3/arch-x86/usr/include/netinet/tcp.h
new file mode 100644
index 0000000..9adf904
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/tcp.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_TCP_H
+#define _NETINET_TCP_H
+
+#include <endian.h> /* Include *before* linux/tcp.h */
+#include <linux/tcp.h>
+
+#endif /* _NETINET_TCP_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netinet/udp.h b/6/platforms/android-3/arch-x86/usr/include/netinet/udp.h
new file mode 100644
index 0000000..25e0dfc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netinet/udp.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _NETINET_UDP_H
+#define _NETINET_UDP_H
+
+/*
+ * We would include linux/udp.h, but it brings in too much other stuff
+ */
+
+#ifdef __FAVOR_BSD
+
+struct udphdr {
+ u_int16_t uh_sport; /* source port */
+ u_int16_t uh_dport; /* destination port */
+ u_int16_t uh_ulen; /* udp length */
+ u_int16_t uh_sum; /* udp checksum */
+};
+
+#else
+
+struct udphdr {
+ __u16 source;
+ __u16 dest;
+ __u16 len;
+ __u16 check;
+};
+
+#endif /* __FAVOR_BSD */
+
+#endif /* _NETINET_UDP_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/netpacket/packet.h b/6/platforms/android-3/arch-x86/usr/include/netpacket/packet.h
new file mode 100644
index 0000000..b5e8e0e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+#include <linux/if_packet.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/nsswitch.h b/6/platforms/android-3/arch-x86/usr/include/nsswitch.h
new file mode 100644
index 0000000..0ddc74e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/nsswitch.h
@@ -0,0 +1,237 @@
+/* $NetBSD: nsswitch.h,v 1.18 2005/11/29 03:12:58 christos Exp $ */
+
+/*-
+ * Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Luke Mewburn.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _NSSWITCH_H
+#define _NSSWITCH_H 1
+
+#include <sys/types.h>
+#include <stdarg.h>
+
+#define NSS_MODULE_INTERFACE_VERSION 0
+
+#ifndef _PATH_NS_CONF
+#define _PATH_NS_CONF "/etc/nsswitch.conf"
+#endif
+
+#define NS_CONTINUE 0
+#define NS_RETURN 1
+
+/*
+ * Layout of:
+ * uint32_t ns_src.flags
+ */
+ /* nsswitch.conf status codes and nsdispatch(3) return values */
+#define NS_SUCCESS (1<<0) /* entry was found */
+#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */
+#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */
+#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */
+#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */
+
+ /* internal nsdispatch(3) flags; not settable in nsswitch.conf(5) */
+#define NS_FORCEALL (1<<8) /* force all methods to be invoked; */
+
+/*
+ * Currently implemented sources.
+ */
+#define NSSRC_FILES "files" /* local files */
+#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */
+#define NSSRC_NIS "nis" /* YP/NIS */
+#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */
+
+/*
+ * Currently implemented databases.
+ */
+#define NSDB_HOSTS "hosts"
+#define NSDB_GROUP "group"
+#define NSDB_GROUP_COMPAT "group_compat"
+#define NSDB_NETGROUP "netgroup"
+#define NSDB_NETWORKS "networks"
+#define NSDB_PASSWD "passwd"
+#define NSDB_PASSWD_COMPAT "passwd_compat"
+#define NSDB_SHELLS "shells"
+
+/*
+ * Suggested databases to implement.
+ */
+#define NSDB_ALIASES "aliases"
+#define NSDB_AUTH "auth"
+#define NSDB_AUTOMOUNT "automount"
+#define NSDB_BOOTPARAMS "bootparams"
+#define NSDB_ETHERS "ethers"
+#define NSDB_EXPORTS "exports"
+#define NSDB_NETMASKS "netmasks"
+#define NSDB_PHONES "phones"
+#define NSDB_PRINTCAP "printcap"
+#define NSDB_PROTOCOLS "protocols"
+#define NSDB_REMOTE "remote"
+#define NSDB_RPC "rpc"
+#define NSDB_SENDMAILVARS "sendmailvars"
+#define NSDB_SERVICES "services"
+#define NSDB_TERMCAP "termcap"
+#define NSDB_TTYS "ttys"
+
+/*
+ * ns_dtab `callback' function signature.
+ */
+typedef int (*nss_method)(void *, void *, va_list);
+
+/*
+ * ns_dtab - `nsswitch dispatch table'
+ * Contains an entry for each source and the appropriate function to call.
+ */
+typedef struct {
+ const char *src;
+ nss_method callback;
+ void *cb_data;
+} ns_dtab;
+
+/*
+ * Macros to help build an ns_dtab[]
+ */
+#define NS_FILES_CB(F,C) { NSSRC_FILES, F, __UNCONST(C) },
+#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, __UNCONST(C) },
+
+#ifdef HESIOD
+# define NS_DNS_CB(F,C) { NSSRC_DNS, F, __UNCONST(C) },
+#else
+# define NS_DNS_CB(F,C)
+#endif
+
+#ifdef YP
+# define NS_NIS_CB(F,C) { NSSRC_NIS, F, __UNCONST(C) },
+#else
+# define NS_NIS_CB(F,C)
+#endif
+
+/*
+ * ns_src - `nsswitch source'
+ * Used by the nsparser routines to store a mapping between a source
+ * and its dispatch control flags for a given database.
+ */
+typedef struct {
+ const char *name;
+ uint32_t flags;
+} ns_src;
+
+
+/*
+ * Default sourcelists (if nsswitch.conf is missing, corrupt,
+ * or the requested database doesn't have an entry)
+ */
+#if 0 /* MISSING FROM BIONIC */
+extern const ns_src __nsdefaultsrc[];
+extern const ns_src __nsdefaultcompat[];
+extern const ns_src __nsdefaultcompat_forceall[];
+extern const ns_src __nsdefaultfiles[];
+extern const ns_src __nsdefaultfiles_forceall[];
+extern const ns_src __nsdefaultnis[];
+extern const ns_src __nsdefaultnis_forceall[];
+#endif /* MISSING */
+
+/*
+ * ns_mtab - `nsswitch method table'
+ * An nsswitch module provides a mapping from (database name, method name)
+ * tuples to the nss_method and associated callback data. Effectively,
+ * ns_dtab, but used for dynamically loaded modules.
+ */
+typedef struct {
+ const char *database;
+ const char *name;
+ nss_method method;
+ void *mdata;
+} ns_mtab;
+
+/*
+ * nss_module_register_fn - module registration function
+ * called at module load
+ * nss_module_unregister_fn - module un-registration function
+ * called at module unload
+ */
+typedef void (*nss_module_unregister_fn)(ns_mtab *, u_int);
+typedef ns_mtab *(*nss_module_register_fn)(const char *, u_int *,
+ nss_module_unregister_fn *);
+
+#ifdef _NS_PRIVATE
+
+/*
+ * Private data structures for back-end nsswitch implementation.
+ */
+
+/*
+ * ns_dbt - `nsswitch database thang'
+ * For each database in /etc/nsswitch.conf there is a ns_dbt, with its
+ * name and a list of ns_src's containing the source information.
+ */
+typedef struct {
+ const char *name; /* name of database */
+ ns_src *srclist; /* list of sources */
+ u_int srclistsize; /* size of srclist */
+} ns_dbt;
+
+/*
+ * ns_mod - `nsswitch module'
+ */
+typedef struct {
+ const char *name; /* module name */
+ void *handle; /* handle from dlopen() */
+ ns_mtab *mtab; /* method table */
+ u_int mtabsize; /* size of mtab */
+ /* called to unload module */
+ nss_module_unregister_fn unregister;
+} ns_mod;
+
+#endif /* _NS_PRIVATE */
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int nsdispatch(void *, const ns_dtab [], const char *,
+ const char *, const ns_src [], ...);
+
+#ifdef _NS_PRIVATE
+int _nsdbtaddsrc(ns_dbt *, const ns_src *);
+void _nsdbtdump(const ns_dbt *);
+int _nsdbtput(const ns_dbt *);
+void _nsyyerror(const char *);
+int _nsyylex(void);
+#endif /* _NS_PRIVATE */
+
+__END_DECLS
+
+#endif /* !_NSSWITCH_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/pathconf.h b/6/platforms/android-3/arch-x86/usr/include/pathconf.h
new file mode 100644
index 0000000..94f9787
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/pathconf.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PATHCONF_H_
+#define _PATHCONF_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* constants to be used for the 'name' paremeter of pathconf/fpathconf */
+
+#define _PC_FILESIZEBITS 0x0000
+#define _PC_LINK_MAX 0x0001
+#define _PC_MAX_CANON 0x0002
+#define _PC_MAX_INPUT 0x0003
+#define _PC_NAME_MAX 0x0004
+#define _PC_PATH_MAX 0x0005
+#define _PC_PIPE_BUF 0x0006
+#define _PC_2_SYMLINKS 0x0007
+#define _PC_ALLOC_SIZE_MIN 0x0008
+#define _PC_REC_INCR_XFER_SIZE 0x0009
+#define _PC_REC_MAX_XFER_SIZE 0x000a
+#define _PC_REC_MIN_XFER_SIZE 0x000b
+#define _PC_REC_XFER_ALIGN 0x000c
+#define _PC_SYMLINK_MAX 0x000d
+#define _PC_CHOWN_RESTRICTED 0x000e
+#define _PC_NO_TRUNC 0x000f
+#define _PC_VDISABLE 0x0010
+#define _PC_ASYNC_IO 0x0011
+#define _PC_PRIO_IO 0x0012
+#define _PC_SYNC_IO 0x0013
+
+extern long fpathconf(int fildes, int name);
+extern long pathconf(const char *path, int name);
+
+__END_DECLS
+
+#endif /* _PATHCONF_H_ */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/paths.h b/6/platforms/android-3/arch-x86/usr/include/paths.h
new file mode 100644
index 0000000..a72162f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/paths.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)paths.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _PATHS_H_
+#define _PATHS_H_
+
+/* Default search path. */
+#define _PATH_DEFPATH "/usr/bin:/bin"
+/* All standard utilities path. */
+#define _PATH_STDPATH \
+ "/usr/bin:/bin:/usr/sbin:/sbin"
+
+#define _PATH_BSHELL "/system/bin/sh"
+#define _PATH_CONSOLE "/dev/console"
+#define _PATH_CSHELL "/bin/csh"
+#define _PATH_DEVDB "/var/run/dev.db"
+#define _PATH_DEVNULL "/dev/null"
+#define _PATH_DRUM "/dev/drum"
+#define _PATH_KLOG "/proc/kmsg"
+#define _PATH_KMEM "/dev/kmem"
+#define _PATH_LASTLOG "/var/log/lastlog"
+#define _PATH_MAILDIR "/var/mail"
+#define _PATH_MAN "/usr/share/man"
+#define _PATH_MEM "/dev/mem"
+#define _PATH_MNTTAB "/etc/fstab"
+#define _PATH_MOUNTED "/etc/mtab"
+#define _PATH_NOLOGIN "/etc/nologin"
+#define _PATH_PRESERVE "/var/lib"
+#define _PATH_RWHODIR "/var/spool/rwho"
+#define _PATH_SENDMAIL "/usr/sbin/sendmail"
+#define _PATH_SHADOW "/etc/shadow"
+#define _PATH_SHELLS "/etc/shells"
+#define _PATH_TTY "/dev/tty"
+#define _PATH_UNIX "/boot/vmlinux"
+#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_VI "/bin/vi"
+#define _PATH_WTMP "/var/log/wtmp"
+
+/* Provide trailing slash, since mostly used for building pathnames. */
+#define _PATH_DEV "/dev/"
+#define _PATH_TMP "/tmp/"
+#define _PATH_VARDB "/var/db/"
+#define _PATH_VARRUN "/var/run/"
+#define _PATH_VARTMP "/var/tmp/"
+
+#endif /* !_PATHS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/poll.h b/6/platforms/android-3/arch-x86/usr/include/poll.h
new file mode 100644
index 0000000..560be89
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/poll.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _POLL_H_
+#define _POLL_H_
+
+#include <sys/cdefs.h>
+#include <linux/poll.h>
+
+__BEGIN_DECLS
+
+typedef unsigned int nfds_t;
+
+/* POSIX specifies "int" for the timeout, Linux seems to use long... */
+extern int poll(struct pollfd *, nfds_t, long);
+
+__END_DECLS
+
+#endif /* _POLL_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/pthread.h b/6/platforms/android-3/arch-x86/usr/include/pthread.h
new file mode 100644
index 0000000..e3afdae
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/pthread.h
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-3/arch-x86/usr/include/pwd.h b/6/platforms/android-3/arch-x86/usr/include/pwd.h
new file mode 100644
index 0000000..1e85efd
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/pwd.h
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)pwd.h 8.2 (Berkeley) 1/21/94
+ */
+
+/*-
+ * Portions Copyright(C) 1995, Jason Downs. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _PWD_H_
+#define _PWD_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define _PATH_PASSWD "/etc/passwd"
+#define _PATH_MASTERPASSWD "/etc/master.passwd"
+#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
+
+#define _PATH_PASSWD_CONF "/etc/passwd.conf"
+#define _PATH_PASSWDCONF _PATH_PASSWD_CONF /* XXX: compat */
+#define _PATH_USERMGMT_CONF "/etc/usermgmt.conf"
+
+#define _PATH_MP_DB "/etc/pwd.db"
+#define _PATH_SMP_DB "/etc/spwd.db"
+
+#define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb"
+
+#define _PW_KEYBYNAME '1' /* stored by name */
+#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */
+#define _PW_KEYBYUID '3' /* stored by uid */
+
+#define _PASSWORD_EFMT1 '_' /* extended DES encryption format */
+#define _PASSWORD_NONDES '$' /* non-DES encryption formats */
+
+#define _PASSWORD_LEN 128 /* max length, not counting NUL */
+
+#define _PASSWORD_NOUID 0x01 /* flag for no specified uid. */
+#define _PASSWORD_NOGID 0x02 /* flag for no specified gid. */
+#define _PASSWORD_NOCHG 0x04 /* flag for no specified change. */
+#define _PASSWORD_NOEXP 0x08 /* flag for no specified expire. */
+
+#define _PASSWORD_OLDFMT 0x10 /* flag to expect an old style entry */
+#define _PASSWORD_NOWARN 0x20 /* no warnings for bad entries */
+
+#define _PASSWORD_WARNDAYS 14 /* days to warn about expiry */
+#define _PASSWORD_CHGNOW -1 /* special day to force password change at next login */
+
+struct passwd
+{
+ char* pw_name;
+ char* pw_passwd;
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char* pw_dir;
+ char* pw_shell;
+};
+
+__BEGIN_DECLS
+
+struct passwd* getpwnam(const char*);
+struct passwd* getpwuid(uid_t);
+
+void endpwent(void);
+
+#if 0 /* MISSING FROM BIONIC */
+int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
+int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
+struct passwd* getpwent(void);
+int setpwent(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/resolv.h b/6/platforms/android-3/arch-x86/usr/include/resolv.h
new file mode 100644
index 0000000..4247d68
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/resolv.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _RESOLV_H_
+#define _RESOLV_H_
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/cdefs.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <arpa/nameser.h>
+
+__BEGIN_DECLS
+
+struct res_state;
+
+extern struct __res_state *__res_state(void);
+#define _res (*__res_state())
+
+/* Base-64 functions - because some code expects it there */
+
+#define b64_ntop __b64_ntop
+#define b64_pton __b64_pton
+extern int b64_ntop(u_char const *, size_t, char *, size_t);
+extern int b64_pton(char const *, u_char *, size_t);
+
+__END_DECLS
+
+#endif /* _RESOLV_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sched.h b/6/platforms/android-3/arch-x86/usr/include/sched.h
new file mode 100644
index 0000000..2be511b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sched.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/semaphore.h b/6/platforms/android-3/arch-x86/usr/include/semaphore.h
new file mode 100644
index 0000000..30e3123
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/semaphore.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SEMAPHORE_H
+#define _SEMAPHORE_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct {
+ volatile unsigned int count;
+} sem_t;
+
+#define SEM_FAILED NULL
+
+extern int sem_init(sem_t *sem, int pshared, unsigned int value);
+
+extern int sem_close(sem_t *);
+extern int sem_destroy(sem_t *);
+extern int sem_getvalue(sem_t *, int *);
+extern int sem_init(sem_t *, int, unsigned int);
+extern sem_t *sem_open(const char *, int, ...);
+extern int sem_post(sem_t *);
+extern int sem_trywait(sem_t *);
+extern int sem_unlink(const char *);
+extern int sem_wait(sem_t *);
+
+struct timespec;
+extern int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+
+__END_DECLS
+
+#endif /* _SEMAPHORE_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/setjmp.h b/6/platforms/android-3/arch-x86/usr/include/setjmp.h
new file mode 100644
index 0000000..68fdcef
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/setjmp.h
@@ -0,0 +1,63 @@
+/* $OpenBSD: setjmp.h,v 1.5 2005/12/13 00:35:22 millert Exp $ */
+/* $NetBSD: setjmp.h,v 1.11 1994/12/20 10:35:44 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)setjmp.h 8.2 (Berkeley) 1/21/94
+ */
+
+#ifndef _SETJMP_H_
+#define _SETJMP_H_
+
+#include <sys/cdefs.h>
+#include <machine/setjmp.h>
+
+typedef long sigjmp_buf[_JBLEN + 1];
+typedef long jmp_buf[_JBLEN];
+
+__BEGIN_DECLS
+
+int _setjmp(jmp_buf);
+void _longjmp(jmp_buf, int);
+void longjmperror(void);
+
+int setjmp(jmp_buf);
+void longjmp(jmp_buf, int);
+
+int sigsetjmp(sigjmp_buf, int);
+void siglongjmp(sigjmp_buf, int);
+
+__END_DECLS
+
+#endif /* !_SETJMP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sgtty.h b/6/platforms/android-3/arch-x86/usr/include/sgtty.h
new file mode 100644
index 0000000..d433266
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sgtty.h
@@ -0,0 +1,50 @@
+/* $NetBSD: sgtty.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */
+
+/*
+ * Copyright (c) 1985, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)sgtty.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _SGTTY_H_
+#define _SGTTY_H_
+
+#ifndef USE_OLD_TTY
+#define USE_OLD_TTY
+#endif
+#include <sys/ioctl.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+int gtty(int, struct sgttyb *);
+int stty(int, struct sgttyb *);
+#endif /* MISSING */
+__END_DECLS
+
+#endif /* _SGTTY_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sha1.h b/6/platforms/android-3/arch-x86/usr/include/sha1.h
new file mode 100644
index 0000000..f7ada46
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sha1.h
@@ -0,0 +1,31 @@
+/* $NetBSD: sha1.h,v 1.13 2005/12/26 18:41:36 perry Exp $ */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ */
+
+#ifndef _SYS_SHA1_H_
+#define _SYS_SHA1_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#define SHA1_DIGEST_LENGTH 20
+#define SHA1_DIGEST_STRING_LENGTH 41
+
+typedef struct {
+ uint32_t state[5];
+ uint32_t count[2];
+ u_char buffer[64];
+} SHA1_CTX;
+
+__BEGIN_DECLS
+void SHA1Transform(uint32_t[5], const u_char[64]);
+void SHA1Init(SHA1_CTX *);
+void SHA1Update(SHA1_CTX *, const u_char *, u_int);
+void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
+__END_DECLS
+
+#endif /* _SYS_SHA1_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/signal.h b/6/platforms/android-3/arch-x86/usr/include/signal.h
new file mode 100644
index 0000000..5540847
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/signal.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
+
+#include <sys/cdefs.h>
+#include <limits.h> /* For LONG_BIT */
+#include <string.h> /* For memset() */
+#include <sys/types.h>
+#include <asm/signal.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+typedef int sig_atomic_t;
+
+/* crepy NIG / _NSIG handling, just to be safe */
+#ifndef NSIG
+# define NSIG _NSIG
+#endif
+#ifndef _NSIG
+# define _NSIG NSIG
+#endif
+
+extern const char * const sys_siglist[];
+
+static __inline__ int sigismember(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ return (int)((local_set[signum/LONG_BIT] >> (signum%LONG_BIT)) & 1);
+}
+
+
+static __inline__ int sigaddset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] |= 1UL << (signum%LONG_BIT);
+ return 0;
+}
+
+
+static __inline__ int sigdelset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] &= ~(1UL << (signum%LONG_BIT));
+ return 0;
+}
+
+
+static __inline__ int sigemptyset(sigset_t *set)
+{
+ memset(set, 0, sizeof *set);
+ return 0;
+}
+
+static __inline__ int sigfillset(sigset_t *set)
+{
+ memset(set, ~0, sizeof *set);
+ return 0;
+}
+
+
+/* compatibility types */
+typedef void (*sig_t)(int);
+typedef sig_t sighandler_t;
+
+/* differentiater between sysv and bsd behaviour 8*/
+extern __sighandler_t sysv_signal(int, __sighandler_t);
+extern __sighandler_t bsd_signal(int, __sighandler_t);
+
+/* the default is bsd */
+static __inline__ __sighandler_t signal(int s, __sighandler_t f)
+{
+ return bsd_signal(s,f);
+}
+
+/* the syscall itself */
+extern __sighandler_t __signal(int, __sighandler_t, int);
+
+extern int sigprocmask(int, const sigset_t *, sigset_t *);
+extern int sigaction(int, const struct sigaction *, struct sigaction *);
+
+extern int sigpending(sigset_t *);
+extern int sigsuspend(const sigset_t *);
+extern int sigwait(const sigset_t *set, int *sig);
+extern int siginterrupt(int sig, int flag);
+
+extern int raise(int);
+extern int kill(pid_t, int);
+
+
+__END_DECLS
+
+#endif /* _SIGNAL_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/stdint.h b/6/platforms/android-3/arch-x86/usr/include/stdint.h
new file mode 100644
index 0000000..e791475
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/stdint.h
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDINT_H
+#define _STDINT_H
+
+#include <stddef.h>
+#include <sys/_types.h>
+
+
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
+# define __STDINT_LIMITS
+#endif
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
+# define __STDINT_MACROS
+#endif
+
+#if !defined __STRICT_ANSI__ || __STDC_VERSION__ >= 199901L
+# define __STDC_INT64__
+#endif
+
+typedef __int8_t int8_t;
+typedef __uint8_t uint8_t;
+typedef __int16_t int16_t;
+typedef __uint16_t uint16_t;
+typedef __int32_t int32_t;
+typedef __uint32_t uint32_t;
+#if defined(__STDC_INT64__)
+typedef __int64_t int64_t;
+typedef __uint64_t uint64_t;
+#endif
+
+/*
+ * int8_t & uint8_t
+ */
+
+typedef int8_t int_least8_t;
+typedef int8_t int_fast8_t;
+
+typedef uint8_t uint_least8_t;
+typedef uint8_t uint_fast8_t;
+
+#ifdef __STDINT_LIMITS
+# define INT8_MIN (-128)
+# define INT8_MAX (127)
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST8_MAX INT8_MAX
+# define INT_FAST8_MIN INT8_MIN
+# define INT_FAST8_MAX INT8_MAX
+
+# define UINT8_MAX (255U)
+# define UINT_LEAST8_MAX UINT8_MAX
+# define UINT_FAST8_MAX UINT8_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT8_C(c) c
+# define INT_LEAST8_C(c) INT8_C(c)
+# define INT_FAST8_C(c) INT8_C(c)
+
+# define UINT8_C(c) c ## U
+# define UINT_LEAST8_C(c) UINT8_C(c)
+# define UINT_FAST8_C(c) UINT8_C(c)
+#endif
+
+/*
+ * int16_t & uint16_t
+ */
+
+
+typedef int16_t int_least16_t;
+typedef int32_t int_fast16_t;
+
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_fast16_t;
+
+#ifdef __STDINT_LIMITS
+# define INT16_MIN (-32768)
+# define INT16_MAX (32767)
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST16_MAX INT16_MAX
+# define INT_FAST16_MIN INT32_MIN
+# define INT_FAST16_MAX INT32_MAX
+
+# define UINT16_MAX (65535U)
+# define UINT_LEAST16_MAX UINT16_MAX
+# define UINT_FAST16_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT16_C(c) c
+# define INT_LEAST16_C(c) INT16_C(c)
+# define INT_FAST16_C(c) INT32_C(c)
+
+# define UINT16_C(c) c ## U
+# define UINT_LEAST16_C(c) UINT16_C(c)
+# define UINT_FAST16_C(c) UINT32_C(c)
+#endif
+
+/*
+ * int32_t & uint32_t
+ */
+
+typedef int32_t int_least32_t;
+typedef int32_t int_fast32_t;
+
+typedef uint32_t uint_least32_t;
+typedef uint32_t uint_fast32_t;
+
+#ifdef __STDINT_LIMITS
+# define INT32_MIN (-2147483647-1)
+# define INT32_MAX (2147483647)
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST32_MAX INT32_MAX
+# define INT_FAST32_MIN INT32_MIN
+# define INT_FAST32_MAX INT32_MAX
+
+# define UINT32_MAX (4294967295U)
+# define UINT_LEAST32_MAX UINT32_MAX
+# define UINT_FAST32_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INT32_C(c) c
+# define INT_LEAST32_C(c) INT32_C(c)
+# define INT_FAST32_C(c) INT32_C(c)
+
+# define UINT32_C(c) c ## U
+# define UINT_LEAST32_C(c) UINT32_C(c)
+# define UINT_FAST32_C(c) UINT32_C(c)
+#endif
+
+#if defined(__STDC_INT64__)
+/*
+ * int64_t
+ */
+typedef int64_t int_least64_t;
+typedef int64_t int_fast64_t;
+
+typedef uint64_t uint_least64_t;
+typedef uint64_t uint_fast64_t;
+
+
+#ifdef __STDINT_LIMITS
+# define INT64_MIN (__INT64_C(-9223372036854775807)-1)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+# define UINT_LEAST64_MAX UINT64_MAX
+# define UINT_FAST64_MAX UINT64_MAX
+#endif
+
+#define __INT64_C(c) c ## LL
+#define __UINT64_C(c) c ## ULL
+
+#ifdef __STDINT_MACROS
+# define INT64_C(c) __INT64_C(c)
+# define INT_LEAST64_C(c) INT64_C(c)
+# define INT_FAST64_C(c) INT64_C(c)
+
+# define UINT64_C(c) __UINT64_C(c)
+# define UINT_LEAST64_C(c) UINT64_C(c)
+# define UINT_FAST64_C(c) UINT64_C(c)
+#endif
+
+
+# define __PRI64_RANK "ll"
+# define __PRIFAST_RANK ""
+# define __PRIPTR_RANK ""
+
+#endif /* __STDC_INT64__ */
+
+/*
+ * intptr_t & uintptr_t
+ */
+
+typedef int intptr_t;
+typedef unsigned int uintptr_t;
+
+#ifdef __STDINT_LIMITS
+# define INTPTR_MIN INT32_MIN
+# define INTPTR_MAX INT32_MAX
+# define UINTPTR_MAX UINT32_MAX
+# define PTRDIFF_MIN INT32_MIN
+# define PTRDIFF_MAX INT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTPTR_C(c) INT32_C(c)
+# define UINTPTR_C(c) UINT32_C(c)
+# define PTRDIFF_C(c) INT32_C(c)
+#endif
+
+
+
+/*
+ * intmax_t & uintmax_t
+ */
+
+#if defined(__STDC_INT64__)
+
+typedef uint64_t uintmax_t;
+typedef int64_t intmax_t;
+
+#ifdef __STDINT_LIMITS
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTMAX_C(c) INT64_C(c)
+# define UINTMAX_C(c) UINT64_C(c)
+#endif
+
+#else /* !__STDC_INT64__ */
+
+typedef uint32_t uintmax_t;
+typedef int32_t intmax_t;
+
+#ifdef __STDINT_LIMITS
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# define UINTMAX_MAX UINT32_MAX
+#endif
+
+#ifdef __STDINT_MACROS
+# define INTMAX_C(c) INT32_C(c)
+# define UINTMAX_C(c) UINT32_C(c)
+#endif
+
+#endif /* !__STDC_INT64__ */
+
+
+/* size_t is defined by the GCC-specific <stddef.h> */
+#ifndef _SSIZE_T_DEFINED_
+#define _SSIZE_T_DEFINED_
+typedef long int ssize_t;
+#endif
+
+#define _BITSIZE 32
+
+/* Keep the kernel from trying to define these types... */
+#define __BIT_TYPES_DEFINED__
+
+#endif /* _STDINT_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/stdio.h b/6/platforms/android-3/arch-x86/usr/include/stdio.h
new file mode 100644
index 0000000..273f630
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/stdio.h
@@ -0,0 +1,442 @@
+/* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */
+/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stdio.h 5.17 (Berkeley) 6/3/91
+ */
+
+#ifndef _STDIO_H_
+#define _STDIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/* va_list and size_t must be defined by stdio.h according to Posix */
+#define __need___va_list
+#include <stdarg.h>
+
+/* note that this forces stddef.h to *only* define size_t */
+#define __need_size_t
+#include <stddef.h>
+
+#include <stddef.h>
+
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#include <sys/types.h> /* XXX should be removed */
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned long size_t;
+#endif
+
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef long off_t;
+#endif
+
+#ifndef NULL
+#ifdef __GNUG__
+#define NULL __null
+#else
+#define NULL 0L
+#endif
+#endif
+
+#define _FSTDIO /* Define for new stdio with functions. */
+
+typedef off_t fpos_t; /* stdio file position type */
+
+/*
+ * NB: to fit things in six character monocase externals, the stdio
+ * code uses the prefix `__s' for stdio objects, typically followed
+ * by a three-character attempt at a mnemonic.
+ */
+
+/* stdio buffers */
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+
+/*
+ * stdio state variables.
+ *
+ * The following always hold:
+ *
+ * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
+ * _lbfsize is -_bf._size, else _lbfsize is 0
+ * if _flags&__SRD, _w is 0
+ * if _flags&__SWR, _r is 0
+ *
+ * This ensures that the getc and putc macros (or inline functions) never
+ * try to write or read from a file that is in `read' or `write' mode.
+ * (Moreover, they can, and do, automatically switch from read mode to
+ * write mode, and back, on "r+" and "w+" files.)
+ *
+ * _lbfsize is used only to make the inline line-buffered output stream
+ * code as compact as possible.
+ *
+ * _ub, _up, and _ur are used when ungetc() pushes back more characters
+ * than fit in the current _bf, or when ungetc() pushes back a character
+ * that does not match the previous one in _bf. When this happens,
+ * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
+ * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * NOTE: if you change this structure, you also need to update the
+ * std() initializer in findfp.c.
+ */
+typedef struct __sFILE {
+ unsigned char *_p; /* current position in (some) buffer */
+ int _r; /* read space left for getc() */
+ int _w; /* write space left for putc() */
+ short _flags; /* flags, below; this FILE is free if 0 */
+ short _file; /* fileno, if Unix descriptor, else -1 */
+ struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
+ int _lbfsize; /* 0 or -_bf._size, for inline putc */
+
+ /* operations */
+ void *_cookie; /* cookie passed to io functions */
+ int (*_close)(void *);
+ int (*_read)(void *, char *, int);
+ fpos_t (*_seek)(void *, fpos_t, int);
+ int (*_write)(void *, const char *, int);
+
+ /* extension data, to avoid further ABI breakage */
+ struct __sbuf _ext;
+ /* data for long sequences of ungetc() */
+ unsigned char *_up; /* saved _p when _p is doing ungetc data */
+ int _ur; /* saved _r when _r is counting ungetc data */
+
+ /* tricks to meet minimum requirements even when malloc() fails */
+ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
+ unsigned char _nbuf[1]; /* guarantee a getc() buffer */
+
+ /* separate buffer for fgetln() when line crosses buffer boundary */
+ struct __sbuf _lb; /* buffer for fgetln() */
+
+ /* Unix stdio files get aligned to block boundaries on fseek() */
+ int _blksize; /* stat.st_blksize (may be != _bf._size) */
+ fpos_t _offset; /* current lseek offset */
+} FILE;
+
+__BEGIN_DECLS
+extern FILE __sF[];
+__END_DECLS
+
+#define __SLBF 0x0001 /* line buffered */
+#define __SNBF 0x0002 /* unbuffered */
+#define __SRD 0x0004 /* OK to read */
+#define __SWR 0x0008 /* OK to write */
+ /* RD and WR are never simultaneously asserted */
+#define __SRW 0x0010 /* open for reading & writing */
+#define __SEOF 0x0020 /* found EOF */
+#define __SERR 0x0040 /* found error */
+#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SAPP 0x0100 /* fdopen()ed in append mode */
+#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
+#define __SOPT 0x0400 /* do fseek() optimisation */
+#define __SNPT 0x0800 /* do not do fseek() optimisation */
+#define __SOFF 0x1000 /* set iff _offset is in fact correct */
+#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define _IOFBF 0 /* setvbuf should set fully buffered */
+#define _IOLBF 1 /* setvbuf should set line buffered */
+#define _IONBF 2 /* setvbuf should set unbuffered */
+
+#define BUFSIZ 1024 /* size of buffer used by setbuf */
+
+#define EOF (-1)
+
+/*
+ * FOPEN_MAX is a minimum maximum, and should be the number of descriptors
+ * that the kernel can provide without allocation of a resource that can
+ * fail without the process sleeping. Do not use this for anything.
+ */
+#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
+#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#if __BSD_VISIBLE || __XPG_VISIBLE
+#define P_tmpdir "/tmp/"
+#endif
+#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
+#define TMP_MAX 308915776
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1 /* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2 /* set file offset to EOF plus offset */
+#endif
+
+#define stdin (&__sF[0])
+#define stdout (&__sF[1])
+#define stderr (&__sF[2])
+
+/*
+ * Functions defined in ANSI C standard.
+ */
+__BEGIN_DECLS
+void clearerr(FILE *);
+int fclose(FILE *);
+int feof(FILE *);
+int ferror(FILE *);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fgetpos(FILE *, fpos_t *);
+char *fgets(char *, int, FILE *);
+FILE *fopen(const char *, const char *);
+int fprintf(FILE *, const char *, ...);
+int fputc(int, FILE *);
+int fputs(const char *, FILE *);
+size_t fread(void *, size_t, size_t, FILE *);
+FILE *freopen(const char *, const char *, FILE *);
+int fscanf(FILE *, const char *, ...);
+int fseek(FILE *, long, int);
+int fseeko(FILE *, off_t, int);
+int fsetpos(FILE *, const fpos_t *);
+long ftell(FILE *);
+off_t ftello(FILE *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+int getc(FILE *);
+int getchar(void);
+char *gets(char *);
+#if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
+#define __SYS_ERRLIST
+
+extern int sys_nerr; /* perror(3) external variables */
+extern char *sys_errlist[];
+#endif
+void perror(const char *);
+int printf(const char *, ...);
+int putc(int, FILE *);
+int putchar(int);
+int puts(const char *);
+int remove(const char *);
+int rename(const char *, const char *);
+void rewind(FILE *);
+int scanf(const char *, ...);
+void setbuf(FILE *, char *);
+int setvbuf(FILE *, char *, int, size_t);
+int sprintf(char *, const char *, ...);
+int sscanf(const char *, const char *, ...);
+FILE *tmpfile(void);
+char *tmpnam(char *);
+int ungetc(int, FILE *);
+int vfprintf(FILE *, const char *, __va_list);
+int vprintf(const char *, __va_list);
+int vsprintf(char *, const char *, __va_list);
+
+#if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
+int snprintf(char *, size_t, const char *, ...)
+ __attribute__((__format__ (printf, 3, 4)))
+ __attribute__((__nonnull__ (3)));
+int vfscanf(FILE *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+int vscanf(const char *, __va_list)
+ __attribute__((__format__ (scanf, 1, 0)))
+ __attribute__((__nonnull__ (1)));
+int vsnprintf(char *, size_t, const char *, __va_list)
+ __attribute__((__format__ (printf, 3, 0)))
+ __attribute__((__nonnull__ (3)));
+int vsscanf(const char *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+#endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
+
+__END_DECLS
+
+
+/*
+ * Functions defined in POSIX 1003.1.
+ */
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
+#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+char *ctermid(char *);
+char *cuserid(char *);
+#endif /* MISSING */
+FILE *fdopen(int, const char *);
+int fileno(FILE *);
+
+#if (__POSIX_VISIBLE >= 199209)
+int pclose(FILE *);
+FILE *popen(const char *, const char *);
+#endif
+
+#if __POSIX_VISIBLE >= 199506
+void flockfile(FILE *);
+int ftrylockfile(FILE *);
+void funlockfile(FILE *);
+
+/*
+ * These are normally used through macros as defined below, but POSIX
+ * requires functions as well.
+ */
+int getc_unlocked(FILE *);
+int getchar_unlocked(void);
+int putc_unlocked(int, FILE *);
+int putchar_unlocked(int);
+#endif /* __POSIX_VISIBLE >= 199506 */
+
+#if __XPG_VISIBLE
+char *tempnam(const char *, const char *);
+#endif
+__END_DECLS
+
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
+
+/*
+ * Routines that are purely local.
+ */
+#if __BSD_VISIBLE
+__BEGIN_DECLS
+int asprintf(char **, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)))
+ __attribute__((__nonnull__ (2)));
+char *fgetln(FILE *, size_t *);
+int fpurge(FILE *);
+int getw(FILE *);
+int putw(int, FILE *);
+void setbuffer(FILE *, char *, int);
+int setlinebuf(FILE *);
+int vasprintf(char **, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+__END_DECLS
+
+/*
+ * Stdio function-access interface.
+ */
+__BEGIN_DECLS
+FILE *funopen(const void *,
+ int (*)(void *, char *, int),
+ int (*)(void *, const char *, int),
+ fpos_t (*)(void *, fpos_t, int),
+ int (*)(void *));
+__END_DECLS
+#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Functions internal to the implementation.
+ */
+__BEGIN_DECLS
+int __srget(FILE *);
+int __swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__)
+static __inline int __sputc(int _c, FILE *_p) {
+ if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+ return (*_p->_p++ = _c);
+ else
+ return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define __sputc(c, p) \
+ (--(p)->_w < 0 ? \
+ (p)->_w >= (p)->_lbfsize ? \
+ (*(p)->_p = (c)), *(p)->_p != '\n' ? \
+ (int)*(p)->_p++ : \
+ __swbuf('\n', p) : \
+ __swbuf((int)(c), p) : \
+ (*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define __sfileno(p) ((p)->_file)
+
+#define feof(p) __sfeof(p)
+#define ferror(p) __sferror(p)
+
+#ifndef _POSIX_THREADS
+#define clearerr(p) __sclearerr(p)
+#endif
+
+#if __POSIX_VISIBLE
+#define fileno(p) __sfileno(p)
+#endif
+
+#ifndef lint
+#ifndef _POSIX_THREADS
+#define getc(fp) __sgetc(fp)
+#endif /* _POSIX_THREADS */
+#define getc_unlocked(fp) __sgetc(fp)
+/*
+ * The macro implementations of putc and putc_unlocked are not
+ * fully POSIX compliant; they do not set errno on failure
+ */
+#if __BSD_VISIBLE
+#ifndef _POSIX_THREADS
+#define putc(x, fp) __sputc(x, fp)
+#endif /* _POSIX_THREADS */
+#define putc_unlocked(x, fp) __sputc(x, fp)
+#endif /* __BSD_VISIBLE */
+#endif /* lint */
+
+#define getchar() getc(stdin)
+#define putchar(x) putc(x, stdout)
+#define getchar_unlocked() getc_unlocked(stdin)
+#define putchar_unlocked(c) putc_unlocked(c, stdout)
+
+#endif /* _STDIO_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/stdlib.h b/6/platforms/android-3/arch-x86/usr/include/stdlib.h
new file mode 100644
index 0000000..424adb4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern char* ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd)
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+extern int clearenv(void);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/string.h b/6/platforms/android-3/arch-x86/usr/include/string.h
new file mode 100644
index 0000000..613dcd7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/string.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STRING_H_
+#define _STRING_H_
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+#include <malloc.h>
+
+__BEGIN_DECLS
+
+extern void* memccpy(void *, const void *, int, size_t);
+extern void* memchr(const void *, int, size_t);
+extern void* memrchr(const void *, int, size_t);
+extern int memcmp(const void *, const void *, size_t);
+extern void* memcpy(void *, const void *, size_t);
+extern void* memmove(void *, const void *, size_t);
+extern void* memset(void *, int, size_t);
+extern void* memmem(const void *, size_t, const void *, size_t);
+extern void memswap(void *, void *, size_t);
+
+extern char* index(const char *, int);
+extern char* rindex(const char *, int);
+extern char* strchr(const char *, int);
+extern char* strrchr(const char *, int);
+
+extern size_t strlen(const char *);
+extern int strcmp(const char *, const char *);
+extern char* strcpy(char *, const char *);
+extern char* strcat(char *, const char *);
+
+extern int strcasecmp(const char *, const char *);
+extern int strncasecmp(const char *, const char *, size_t);
+extern char* strdup(const char *);
+
+extern char* strstr(const char *, const char *);
+extern char* strcasestr(const char *haystack, const char *needle);
+extern char* strtok(char *, const char *);
+extern char* strtok_r(char *, const char *, char**);
+
+extern char* strerror(int);
+extern int strerror_r(int errnum, char *buf, size_t n);
+
+extern size_t strnlen(const char *, size_t);
+extern char* strncat(char *, const char *, size_t);
+extern char* strndup(const char *, size_t);
+extern int strncmp(const char *, const char *, size_t);
+extern char* strncpy(char *, const char *, size_t);
+
+extern size_t strlcat(char *, const char *, size_t);
+extern size_t strlcpy(char *, const char *, size_t);
+
+extern size_t strcspn(const char *, const char *);
+extern char* strpbrk(const char *, const char *);
+extern char* strsep(char **, const char *);
+extern size_t strspn(const char *, const char *);
+
+extern char* strsignal(int sig);
+
+extern int strcoll(const char *, const char *);
+extern size_t strxfrm(char *, const char *, size_t);
+
+__END_DECLS
+
+#endif /* _STRING_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/strings.h b/6/platforms/android-3/arch-x86/usr/include/strings.h
new file mode 100644
index 0000000..7f5b328
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/strings.h
@@ -0,0 +1,58 @@
+/* $NetBSD: strings.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+void bcopy(const void *, void *, size_t);
+void bzero(void *, size_t);
+int ffs(int);
+char *index(const char *, int);
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+#if 0 /* MISSING FROM BIONIC */
+int bcmp(const void *, const void *, size_t);
+char *rindex(const char *, int);
+#endif /* MISSING */
+__END_DECLS
+
+#endif /* !defined(_STRINGS_H_) */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/_errdefs.h b/6/platforms/android-3/arch-x86/usr/include/sys/_errdefs.h
new file mode 100644
index 0000000..e27ab7a
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/_errdefs.h
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* the following corresponds to the error codes of the Linux kernel used by the Android platform
+ * these are distinct from the OpenBSD ones, which is why we need to redeclare them here
+ *
+ * this file may be included several times to define either error constants or their
+ * string representation
+ */
+
+#ifndef __BIONIC_ERRDEF
+#error "__BIONIC_ERRDEF must be defined before including this file"
+#endif
+__BIONIC_ERRDEF( EPERM , 1, "Operation not permitted" )
+__BIONIC_ERRDEF( ENOENT , 2, "No such file or directory" )
+__BIONIC_ERRDEF( ESRCH , 3, "No such process" )
+__BIONIC_ERRDEF( EINTR , 4, "Interrupted system call" )
+__BIONIC_ERRDEF( EIO , 5, "I/O error" )
+__BIONIC_ERRDEF( ENXIO , 6, "No such device or address" )
+__BIONIC_ERRDEF( E2BIG , 7, "Argument list too long" )
+__BIONIC_ERRDEF( ENOEXEC , 8, "Exec format error" )
+__BIONIC_ERRDEF( EBADF , 9, "Bad file number" )
+__BIONIC_ERRDEF( ECHILD , 10, "No child processes" )
+__BIONIC_ERRDEF( EAGAIN , 11, "Try again" )
+__BIONIC_ERRDEF( ENOMEM , 12, "Out of memory" )
+__BIONIC_ERRDEF( EACCES , 13, "Permission denied" )
+__BIONIC_ERRDEF( EFAULT , 14, "Bad address" )
+__BIONIC_ERRDEF( ENOTBLK , 15, "Block device required" )
+__BIONIC_ERRDEF( EBUSY , 16, "Device or resource busy" )
+__BIONIC_ERRDEF( EEXIST , 17, "File exists" )
+__BIONIC_ERRDEF( EXDEV , 18, "Cross-device link" )
+__BIONIC_ERRDEF( ENODEV , 19, "No such device" )
+__BIONIC_ERRDEF( ENOTDIR , 20, "Not a directory" )
+__BIONIC_ERRDEF( EISDIR , 21, "Is a directory" )
+__BIONIC_ERRDEF( EINVAL , 22, "Invalid argument" )
+__BIONIC_ERRDEF( ENFILE , 23, "File table overflow" )
+__BIONIC_ERRDEF( EMFILE , 24, "Too many open files" )
+__BIONIC_ERRDEF( ENOTTY , 25, "Not a typewriter" )
+__BIONIC_ERRDEF( ETXTBSY , 26, "Text file busy" )
+__BIONIC_ERRDEF( EFBIG , 27, "File too large" )
+__BIONIC_ERRDEF( ENOSPC , 28, "No space left on device" )
+__BIONIC_ERRDEF( ESPIPE , 29, "Illegal seek" )
+__BIONIC_ERRDEF( EROFS , 30, "Read-only file system" )
+__BIONIC_ERRDEF( EMLINK , 31, "Too many links" )
+__BIONIC_ERRDEF( EPIPE , 32, "Broken pipe" )
+__BIONIC_ERRDEF( EDOM , 33, "Math argument out of domain of func" )
+__BIONIC_ERRDEF( ERANGE , 34, "Math result not representable" )
+__BIONIC_ERRDEF( EDEADLK , 35, "Resource deadlock would occur" )
+__BIONIC_ERRDEF( ENAMETOOLONG , 36, "File name too long" )
+__BIONIC_ERRDEF( ENOLCK , 37, "No record locks available" )
+__BIONIC_ERRDEF( ENOSYS , 38, "Function not implemented" )
+__BIONIC_ERRDEF( ENOTEMPTY , 39, "Directory not empty" )
+__BIONIC_ERRDEF( ELOOP , 40, "Too many symbolic links encountered" )
+__BIONIC_ERRDEF( ENOMSG , 42, "No message of desired type" )
+__BIONIC_ERRDEF( EIDRM , 43, "Identifier removed" )
+__BIONIC_ERRDEF( ECHRNG , 44, "Channel number out of range" )
+__BIONIC_ERRDEF( EL2NSYNC , 45, "Level 2 not synchronized" )
+__BIONIC_ERRDEF( EL3HLT , 46, "Level 3 halted" )
+__BIONIC_ERRDEF( EL3RST , 47, "Level 3 reset" )
+__BIONIC_ERRDEF( ELNRNG , 48, "Link number out of range" )
+__BIONIC_ERRDEF( EUNATCH , 49, "Protocol driver not attached" )
+__BIONIC_ERRDEF( ENOCSI , 50, "No CSI structure available" )
+__BIONIC_ERRDEF( EL2HLT , 51, "Level 2 halted" )
+__BIONIC_ERRDEF( EBADE , 52, "Invalid exchange" )
+__BIONIC_ERRDEF( EBADR , 53, "Invalid request descriptor" )
+__BIONIC_ERRDEF( EXFULL , 54, "Exchange full" )
+__BIONIC_ERRDEF( ENOANO , 55, "No anode" )
+__BIONIC_ERRDEF( EBADRQC , 56, "Invalid request code" )
+__BIONIC_ERRDEF( EBADSLT , 57, "Invalid slot" )
+__BIONIC_ERRDEF( EBFONT , 59, "Bad font file format" )
+__BIONIC_ERRDEF( ENOSTR , 60, "Device not a stream" )
+__BIONIC_ERRDEF( ENODATA , 61, "No data available" )
+__BIONIC_ERRDEF( ETIME , 62, "Timer expired" )
+__BIONIC_ERRDEF( ENOSR , 63, "Out of streams resources" )
+__BIONIC_ERRDEF( ENONET , 64, "Machine is not on the network" )
+__BIONIC_ERRDEF( ENOPKG , 65, "Package not installed" )
+__BIONIC_ERRDEF( EREMOTE , 66, "Object is remote" )
+__BIONIC_ERRDEF( ENOLINK , 67, "Link has been severed" )
+__BIONIC_ERRDEF( EADV , 68, "Advertise error" )
+__BIONIC_ERRDEF( ESRMNT , 69, "Srmount error" )
+__BIONIC_ERRDEF( ECOMM , 70, "Communication error on send" )
+__BIONIC_ERRDEF( EPROTO , 71, "Protocol error" )
+__BIONIC_ERRDEF( EMULTIHOP , 72, "Multihop attempted" )
+__BIONIC_ERRDEF( EDOTDOT , 73, "RFS specific error" )
+__BIONIC_ERRDEF( EBADMSG , 74, "Not a data message" )
+__BIONIC_ERRDEF( EOVERFLOW , 75, "Value too large for defined data type" )
+__BIONIC_ERRDEF( ENOTUNIQ , 76, "Name not unique on network" )
+__BIONIC_ERRDEF( EBADFD , 77, "File descriptor in bad state" )
+__BIONIC_ERRDEF( EREMCHG , 78, "Remote address changed" )
+__BIONIC_ERRDEF( ELIBACC , 79, "Can not access a needed shared library" )
+__BIONIC_ERRDEF( ELIBBAD , 80, "Accessing a corrupted shared library" )
+__BIONIC_ERRDEF( ELIBSCN , 81, ".lib section in a.out corrupted" )
+__BIONIC_ERRDEF( ELIBMAX , 82, "Attempting to link in too many shared libraries" )
+__BIONIC_ERRDEF( ELIBEXEC , 83, "Cannot exec a shared library directly" )
+__BIONIC_ERRDEF( EILSEQ , 84, "Illegal byte sequence" )
+__BIONIC_ERRDEF( ERESTART , 85, "Interrupted system call should be restarted" )
+__BIONIC_ERRDEF( ESTRPIPE , 86, "Streams pipe error" )
+__BIONIC_ERRDEF( EUSERS , 87, "Too many users" )
+__BIONIC_ERRDEF( ENOTSOCK , 88, "Socket operation on non-socket" )
+__BIONIC_ERRDEF( EDESTADDRREQ , 89, "Destination address required" )
+__BIONIC_ERRDEF( EMSGSIZE , 90, "Message too long" )
+__BIONIC_ERRDEF( EPROTOTYPE , 91, "Protocol wrong type for socket" )
+__BIONIC_ERRDEF( ENOPROTOOPT , 92, "Protocol not available" )
+__BIONIC_ERRDEF( EPROTONOSUPPORT, 93, "Protocol not supported" )
+__BIONIC_ERRDEF( ESOCKTNOSUPPORT, 94, "Socket type not supported" )
+__BIONIC_ERRDEF( EOPNOTSUPP , 95, "Operation not supported on transport endpoint" )
+__BIONIC_ERRDEF( EPFNOSUPPORT , 96, "Protocol family not supported" )
+__BIONIC_ERRDEF( EAFNOSUPPORT , 97, "Address family not supported by protocol" )
+__BIONIC_ERRDEF( EADDRINUSE , 98, "Address already in use" )
+__BIONIC_ERRDEF( EADDRNOTAVAIL , 99, "Cannot assign requested address" )
+__BIONIC_ERRDEF( ENETDOWN , 100, "Network is down" )
+__BIONIC_ERRDEF( ENETUNREACH , 101, "Network is unreachable" )
+__BIONIC_ERRDEF( ENETRESET , 102, "Network dropped connection because of reset" )
+__BIONIC_ERRDEF( ECONNABORTED , 103, "Software caused connection abort" )
+__BIONIC_ERRDEF( ECONNRESET , 104, "Connection reset by peer" )
+__BIONIC_ERRDEF( ENOBUFS , 105, "No buffer space available" )
+__BIONIC_ERRDEF( EISCONN , 106, "Transport endpoint is already connected" )
+__BIONIC_ERRDEF( ENOTCONN , 107, "Transport endpoint is not connected" )
+__BIONIC_ERRDEF( ESHUTDOWN , 108, "Cannot send after transport endpoint shutdown" )
+__BIONIC_ERRDEF( ETOOMANYREFS , 109, "Too many references: cannot splice" )
+__BIONIC_ERRDEF( ETIMEDOUT , 110, "Connection timed out" )
+__BIONIC_ERRDEF( ECONNREFUSED , 111, "Connection refused" )
+__BIONIC_ERRDEF( EHOSTDOWN , 112, "Host is down" )
+__BIONIC_ERRDEF( EHOSTUNREACH , 113, "No route to host" )
+__BIONIC_ERRDEF( EALREADY , 114, "Operation already in progress" )
+__BIONIC_ERRDEF( EINPROGRESS , 115, "Operation now in progress" )
+__BIONIC_ERRDEF( ESTALE , 116, "Stale NFS file handle" )
+__BIONIC_ERRDEF( EUCLEAN , 117, "Structure needs cleaning" )
+__BIONIC_ERRDEF( ENOTNAM , 118, "Not a XENIX named type file" )
+__BIONIC_ERRDEF( ENAVAIL , 119, "No XENIX semaphores available" )
+__BIONIC_ERRDEF( EISNAM , 120, "Is a named type file" )
+__BIONIC_ERRDEF( EREMOTEIO , 121, "Remote I/O error" )
+__BIONIC_ERRDEF( EDQUOT , 122, "Quota exceeded" )
+__BIONIC_ERRDEF( ENOMEDIUM , 123, "No medium found" )
+__BIONIC_ERRDEF( EMEDIUMTYPE , 124, "Wrong medium type" )
+__BIONIC_ERRDEF( ECANCELED , 125, "Operation Canceled" )
+__BIONIC_ERRDEF( ENOKEY , 126, "Required key not available" )
+__BIONIC_ERRDEF( EKEYEXPIRED , 127, "Key has expired" )
+__BIONIC_ERRDEF( EKEYREVOKED , 128, "Key has been revoked" )
+__BIONIC_ERRDEF( EKEYREJECTED , 129, "Key was rejected by service" )
+__BIONIC_ERRDEF( EOWNERDEAD , 130, "Owner died" )
+__BIONIC_ERRDEF( ENOTRECOVERABLE, 131, "State not recoverable" )
+
+/* the following is not defined by Linux but needed for the BSD portions of the C library */
+__BIONIC_ERRDEF( EFTYPE, 1000, "Stupid C library hack !!" )
+
+#undef __BIONIC_ERRDEF
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/_sigdefs.h b/6/platforms/android-3/arch-x86/usr/include/sys/_sigdefs.h
new file mode 100644
index 0000000..a3cb7a3
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/_sigdefs.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/* this header is used to define signal constants and names; it might be included several times */
+#ifndef __BIONIC_SIGDEF
+#error __BIONIC_SIGDEF not defined
+#endif
+
+__BIONIC_SIGDEF(SIGHUP,1,"Hangup")
+__BIONIC_SIGDEF(SIGINT,2,"Interrupt")
+__BIONIC_SIGDEF(SIGQUIT,3,"Quit")
+__BIONIC_SIGDEF(SIGILL,4,"Illegal instruction")
+__BIONIC_SIGDEF(SIGTRAP,5,"Trap")
+__BIONIC_SIGDEF(SIGABRT,6,"Aborted")
+__BIONIC_SIGDEF(SIGBUS,7,"Bus error")
+__BIONIC_SIGDEF(SIGFPE,8,"Floating point exception")
+__BIONIC_SIGDEF(SIGKILL,9,"Killed")
+__BIONIC_SIGDEF(SIGUSR1,10,"User signal 1")
+__BIONIC_SIGDEF(SIGSEGV,11,"Segmentation fault")
+__BIONIC_SIGDEF(SIGUSR2,12,"User signal 2")
+__BIONIC_SIGDEF(SIGPIPE,13,"Broken pipe")
+__BIONIC_SIGDEF(SIGALRM,14,"Alarm clock")
+__BIONIC_SIGDEF(SIGTERM,15,"Terminated")
+__BIONIC_SIGDEF(SIGSTKFLT,16,"Stack fault")
+__BIONIC_SIGDEF(SIGCHLD,17,"Child exited")
+__BIONIC_SIGDEF(SIGCONT,18,"Continue")
+__BIONIC_SIGDEF(SIGSTOP,19,"Stopped (signal)")
+__BIONIC_SIGDEF(SIGTSTP,20,"Stopped")
+__BIONIC_SIGDEF(SIGTTIN,21,"Stopped (tty input)")
+__BIONIC_SIGDEF(SIGTTOU,22,"Stopper (tty output)")
+__BIONIC_SIGDEF(SIGURG,23,"Urgent I/O condition")
+__BIONIC_SIGDEF(SIGXCPU,24,"CPU time limit exceeded")
+__BIONIC_SIGDEF(SIGXFSZ,25,"File size limit exceeded")
+__BIONIC_SIGDEF(SIGVTALRM,26,"Virtual timer expired")
+__BIONIC_SIGDEF(SIGPROF,27,"Profiling timer expired")
+__BIONIC_SIGDEF(SIGWINCH,28,"Window size changed")
+__BIONIC_SIGDEF(SIGIO,29,"I/O possible")
+__BIONIC_SIGDEF(SIGPWR,30,"Power failure")
+__BIONIC_SIGDEF(SIGSYS,31,"Bad system call")
+
+#undef __BIONIC_SIGDEF
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/_system_properties.h b/6/platforms/android-3/arch-x86/usr/include/sys/_system_properties.h
new file mode 100644
index 0000000..42a7f6c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/_system_properties.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
+
+#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#error you should #include <sys/system_properties.h> instead
+#else
+#include <sys/system_properties.h>
+
+typedef struct prop_area prop_area;
+typedef struct prop_msg prop_msg;
+
+#define PROP_AREA_MAGIC 0x504f5250
+#define PROP_AREA_VERSION 0x45434f76
+
+#define PROP_SERVICE_NAME "property_service"
+
+/* #define PROP_MAX_ENTRIES 247 */
+/* 247 -> 32620 bytes (<32768) */
+
+#define TOC_NAME_LEN(toc) ((toc) >> 24)
+#define TOC_TO_INFO(area, toc) ((prop_info*) (((char*) area) + ((toc) & 0xFFFFFF)))
+
+struct prop_area {
+ unsigned volatile count;
+ unsigned volatile serial;
+ unsigned magic;
+ unsigned version;
+ unsigned reserved[4];
+ unsigned toc[1];
+};
+
+#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
+#define SERIAL_DIRTY(serial) ((serial) & 1)
+
+struct prop_info {
+ char name[PROP_NAME_MAX];
+ unsigned volatile serial;
+ char value[PROP_VALUE_MAX];
+};
+
+struct prop_msg
+{
+ unsigned cmd;
+ char name[PROP_NAME_MAX];
+ char value[PROP_VALUE_MAX];
+};
+
+#define PROP_MSG_SETPROP 1
+
+/*
+** Rules:
+**
+** - there is only one writer, but many readers
+** - prop_area.count will never decrease in value
+** - once allocated, a prop_info's name will not change
+** - once allocated, a prop_info's offset will not change
+** - reading a value requires the following steps
+** 1. serial = pi->serial
+** 2. if SERIAL_DIRTY(serial), wait*, then goto 1
+** 3. memcpy(local, pi->value, SERIAL_VALUE_LEN(serial) + 1)
+** 4. if pi->serial != serial, goto 2
+**
+** - writing a value requires the following steps
+** 1. pi->serial = pi->serial | 1
+** 2. memcpy(pi->value, local_value, value_len)
+** 3. pi->serial = (value_len << 24) | ((pi->serial + 1) & 0xffffff)
+**
+** Improvements:
+** - maintain the toc sorted by pi->name to allow lookup
+** by binary search
+**
+*/
+
+#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
+#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
+#define PROP_PATH_SYSTEM_DEFAULT "/system/default.prop"
+#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
+
+#endif
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/_types.h b/6/platforms/android-3/arch-x86/usr/include/sys/_types.h
new file mode 100644
index 0000000..7b99e06
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/_types.h
@@ -0,0 +1,77 @@
+/* $OpenBSD: _types.h,v 1.1 2006/01/06 18:53:05 millert Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)types.h 8.3 (Berkeley) 1/5/94
+ */
+
+#ifndef _SYS__TYPES_H_
+#define _SYS__TYPES_H_
+
+#undef __KERNEL_STRICT_NAMES
+#define __KERNEL_STRICT_NAMES 1
+
+#include <machine/_types.h>
+
+typedef unsigned long __cpuid_t; /* CPU id */
+typedef __int32_t __dev_t; /* device number */
+typedef __uint32_t __fixpt_t; /* fixed point number */
+typedef __uint32_t __gid_t; /* group id */
+typedef __uint32_t __id_t; /* may contain pid, uid or gid */
+typedef __uint32_t __in_addr_t; /* base type for internet address */
+typedef __uint16_t __in_port_t; /* IP port type */
+typedef __uint32_t __ino_t; /* inode number */
+typedef long __key_t; /* IPC key (for Sys V IPC) */
+typedef __uint32_t __mode_t; /* permissions */
+typedef __uint32_t __nlink_t; /* link count */
+typedef __int32_t __pid_t; /* process id */
+typedef __uint64_t __rlim_t; /* resource limit */
+typedef __uint16_t __sa_family_t; /* sockaddr address family type */
+typedef __int32_t __segsz_t; /* segment size */
+typedef __uint32_t __socklen_t; /* length type for network syscalls */
+typedef __int32_t __swblk_t; /* swap offset */
+typedef __uint32_t __uid_t; /* user id */
+typedef __uint32_t __useconds_t; /* microseconds */
+typedef __int32_t __suseconds_t; /* microseconds (signed) */
+
+/*
+ * mbstate_t is an opaque object to keep conversion state, during multibyte
+ * stream conversions. The content must not be referenced by user programs.
+ */
+typedef union {
+ char __mbstate8[128];
+ __int64_t __mbstateL; /* for alignment */
+} __mbstate_t;
+
+/* BIONIC: if we're using non-cleaned up user-level kernel headers,
+ * this will prevent many type declaration conflicts
+ */
+#define __KERNEL_STRICT_NAMES 1
+
+#endif /* !_SYS__TYPES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/atomics.h b/6/platforms/android-3/arch-x86/usr/include/sys/atomics.h
new file mode 100644
index 0000000..d3fa145
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/atomics.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_ATOMICS_H
+#define _SYS_ATOMICS_H
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+extern int __atomic_cmpxchg(int old, int _new, volatile int *ptr);
+extern int __atomic_swap(int _new, volatile int *ptr);
+extern int __atomic_dec(volatile int *ptr);
+extern int __atomic_inc(volatile int *ptr);
+
+int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout);
+int __futex_wake(volatile void *ftx, int count);
+
+__END_DECLS
+
+#endif /* _SYS_ATOMICS_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/cdefs.h b/6/platforms/android-3/arch-x86/usr/include/sys/cdefs.h
new file mode 100644
index 0000000..2389437
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/cdefs.h
@@ -0,0 +1,507 @@
+/* $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Berkeley Software Design, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
+ */
+
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
+
+/* our implementation of wchar_t is only 8-bit - die die non-portable code */
+#undef __WCHAR_TYPE__
+#define __WCHAR_TYPE__ unsigned char
+
+
+/*
+ * Macro to test if we're using a GNU C compiler of a specific vintage
+ * or later, for e.g. features that appeared in a particular version
+ * of GNU C. Usage:
+ *
+ * #if __GNUC_PREREQ__(major, minor)
+ * ...cool feature...
+ * #else
+ * ...delete feature...
+ * #endif
+ */
+#ifdef __GNUC__
+#define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
+#else
+#define __GNUC_PREREQ__(x, y) 0
+#endif
+
+#include <sys/cdefs_elf.h>
+
+#if defined(__cplusplus)
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS }
+#define __static_cast(x,y) static_cast<x>(y)
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#define __static_cast(x,y) (x)y
+#endif
+
+/*
+ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
+ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
+ * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
+ * in between its arguments. __CONCAT can also concatenate double-quoted
+ * strings produced by the __STRING macro, but this only works with ANSI C.
+ */
+
+#define ___STRING(x) __STRING(x)
+#define ___CONCAT(x,y) __CONCAT(x,y)
+
+#if __STDC__ || defined(__cplusplus)
+#define __P(protos) protos /* full-blown ANSI C */
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#define __const const /* define reserved names to standard */
+#define __signed signed
+#define __volatile volatile
+#if defined(__cplusplus)
+#define __inline inline /* convert to C++ keyword */
+#else
+#if !defined(__GNUC__) && !defined(__lint__)
+#define __inline /* delete GCC keyword */
+#endif /* !__GNUC__ && !__lint__ */
+#endif /* !__cplusplus */
+
+#else /* !(__STDC__ || __cplusplus) */
+#define __P(protos) () /* traditional C preprocessor */
+#define __CONCAT(x,y) x/**/y
+#define __STRING(x) "x"
+
+#ifndef __GNUC__
+#define __const /* delete pseudo-ANSI C keywords */
+#define __inline
+#define __signed
+#define __volatile
+#endif /* !__GNUC__ */
+
+/*
+ * In non-ANSI C environments, new programs will want ANSI-only C keywords
+ * deleted from the program and old programs will want them left alone.
+ * Programs using the ANSI C keywords const, inline etc. as normal
+ * identifiers should define -DNO_ANSI_KEYWORDS.
+ */
+#ifndef NO_ANSI_KEYWORDS
+#define const __const /* convert ANSI C keywords */
+#define inline __inline
+#define signed __signed
+#define volatile __volatile
+#endif /* !NO_ANSI_KEYWORDS */
+#endif /* !(__STDC__ || __cplusplus) */
+
+/*
+ * Used for internal auditing of the NetBSD source tree.
+ */
+#ifdef __AUDIT__
+#define __aconst __const
+#else
+#define __aconst
+#endif
+
+/*
+ * The following macro is used to remove const cast-away warnings
+ * from gcc -Wcast-qual; it should be used with caution because it
+ * can hide valid errors; in particular most valid uses are in
+ * situations where the API requires it, not to cast away string
+ * constants. We don't use *intptr_t on purpose here and we are
+ * explicit about unsigned long so that we don't have additional
+ * dependencies.
+ */
+#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+
+/*
+ * GCC2 provides __extension__ to suppress warnings for various GNU C
+ * language extensions under "-ansi -pedantic".
+ */
+#if !__GNUC_PREREQ__(2, 0)
+#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
+#endif
+
+/*
+ * GCC1 and some versions of GCC2 declare dead (non-returning) and
+ * pure (no side effects) functions using "volatile" and "const";
+ * unfortunately, these then cause warnings under "-ansi -pedantic".
+ * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
+ * these work for GNU C++ (modulo a slight glitch in the C++ grammar
+ * in the distribution version of 2.5.5).
+ */
+#if !__GNUC_PREREQ__(2, 5)
+#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __dead __volatile
+#define __pure __const
+#endif
+#endif
+
+/* Delete pseudo-keywords wherever they are not available or needed. */
+#ifndef __dead
+#define __dead
+#define __pure
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __unused __attribute__((__unused__))
+#else
+#define __unused /* delete */
+#endif
+
+#if __GNUC_PREREQ__(3, 1)
+#define __used __attribute__((__used__))
+#else
+#define __used /* delete */
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __packed __attribute__((__packed__))
+#define __aligned(x) __attribute__((__aligned__(x)))
+#define __section(x) __attribute__((__section__(x)))
+#elif defined(__lint__)
+#define __packed /* delete */
+#define __aligned(x) /* delete */
+#define __section(x) /* delete */
+#else
+#define __packed error: no __packed for this compiler
+#define __aligned(x) error: no __aligned for this compiler
+#define __section(x) error: no __section for this compiler
+#endif
+
+#if !__GNUC_PREREQ__(2, 8)
+#define __extension__
+#endif
+
+#if __GNUC_PREREQ__(2, 8)
+#define __statement(x) __extension__(x)
+#elif defined(lint)
+#define __statement(x) (0)
+#else
+#define __statement(x) (x)
+#endif
+
+/*
+ * C99 defines the restrict type qualifier keyword, which was made available
+ * in GCC 2.92.
+ */
+#if __STDC_VERSION__ >= 199901L
+#define __restrict restrict
+#else
+#if !__GNUC_PREREQ__(2, 92)
+#define __restrict /* delete __restrict when not supported */
+#endif
+#endif
+
+/*
+ * C99 defines __func__ predefined identifier, which was made available
+ * in GCC 2.95.
+ */
+#if !(__STDC_VERSION__ >= 199901L)
+#if __GNUC_PREREQ__(2, 6)
+#define __func__ __PRETTY_FUNCTION__
+#elif __GNUC_PREREQ__(2, 4)
+#define __func__ __FUNCTION__
+#else
+#define __func__ ""
+#endif
+#endif /* !(__STDC_VERSION__ >= 199901L) */
+
+#if defined(_KERNEL)
+#if defined(NO_KERNEL_RCSIDS)
+#undef __KERNEL_RCSID
+#define __KERNEL_RCSID(_n, _s) /* nothing */
+#endif /* NO_KERNEL_RCSIDS */
+#endif /* _KERNEL */
+
+#if !defined(_STANDALONE) && !defined(_KERNEL)
+#ifdef __GNUC__
+#define __RENAME(x) ___RENAME(x)
+#else
+#ifdef __lint__
+#define __RENAME(x) __symbolrename(x)
+#else
+#error "No function renaming possible"
+#endif /* __lint__ */
+#endif /* __GNUC__ */
+#else /* _STANDALONE || _KERNEL */
+#define __RENAME(x) no renaming in kernel or standalone environment
+#endif
+
+/*
+ * A barrier to stop the optimizer from moving code or assume live
+ * register values. This is gcc specific, the version is more or less
+ * arbitrary, might work with older compilers.
+ */
+#if __GNUC_PREREQ__(2, 95)
+#define __insn_barrier() __asm __volatile("":::"memory")
+#else
+#define __insn_barrier() /* */
+#endif
+
+/*
+ * GNU C version 2.96 adds explicit branch prediction so that
+ * the CPU back-end can hint the processor and also so that
+ * code blocks can be reordered such that the predicted path
+ * sees a more linear flow, thus improving cache behavior, etc.
+ *
+ * The following two macros provide us with a way to use this
+ * compiler feature. Use __predict_true() if you expect the expression
+ * to evaluate to true, and __predict_false() if you expect the
+ * expression to evaluate to false.
+ *
+ * A few notes about usage:
+ *
+ * * Generally, __predict_false() error condition checks (unless
+ * you have some _strong_ reason to do otherwise, in which case
+ * document it), and/or __predict_true() `no-error' condition
+ * checks, assuming you want to optimize for the no-error case.
+ *
+ * * Other than that, if you don't know the likelihood of a test
+ * succeeding from empirical or other `hard' evidence, don't
+ * make predictions.
+ *
+ * * These are meant to be used in places that are run `a lot'.
+ * It is wasteful to make predictions in code that is run
+ * seldomly (e.g. at subsystem initialization time) as the
+ * basic block reordering that this affects can often generate
+ * larger code.
+ */
+#if __GNUC_PREREQ__(2, 96)
+#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
+#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#else
+#define __predict_true(exp) (exp)
+#define __predict_false(exp) (exp)
+#endif
+
+#if __GNUC_PREREQ__(2, 96)
+#define __noreturn __attribute__((__noreturn__))
+#define __mallocfunc __attribute__((malloc))
+#else
+#define __noreturn
+#define __mallocfunc
+#endif
+
+/*
+ * Macros for manipulating "link sets". Link sets are arrays of pointers
+ * to objects, which are gathered up by the linker.
+ *
+ * Object format-specific code has provided us with the following macros:
+ *
+ * __link_set_add_text(set, sym)
+ * Add a reference to the .text symbol `sym' to `set'.
+ *
+ * __link_set_add_rodata(set, sym)
+ * Add a reference to the .rodata symbol `sym' to `set'.
+ *
+ * __link_set_add_data(set, sym)
+ * Add a reference to the .data symbol `sym' to `set'.
+ *
+ * __link_set_add_bss(set, sym)
+ * Add a reference to the .bss symbol `sym' to `set'.
+ *
+ * __link_set_decl(set, ptype)
+ * Provide an extern declaration of the set `set', which
+ * contains an array of the pointer type `ptype'. This
+ * macro must be used by any code which wishes to reference
+ * the elements of a link set.
+ *
+ * __link_set_start(set)
+ * This points to the first slot in the link set.
+ *
+ * __link_set_end(set)
+ * This points to the (non-existent) slot after the last
+ * entry in the link set.
+ *
+ * __link_set_count(set)
+ * Count the number of entries in link set `set'.
+ *
+ * In addition, we provide the following macros for accessing link sets:
+ *
+ * __link_set_foreach(pvar, set)
+ * Iterate over the link set `set'. Because a link set is
+ * an array of pointers, pvar must be declared as "type **pvar",
+ * and the actual entry accessed as "*pvar".
+ *
+ * __link_set_entry(set, idx)
+ * Access the link set entry at index `idx' from set `set'.
+ */
+#define __link_set_foreach(pvar, set) \
+ for (pvar = __link_set_start(set); pvar < __link_set_end(set); pvar++)
+
+#define __link_set_entry(set, idx) (__link_set_begin(set)[idx])
+
+/*
+ * Some of the recend FreeBSD sources used in Bionic need this.
+ * Originally, this is used to embed the rcs versions of each source file
+ * in the generated binary. We certainly don't want this in Bionic.
+ */
+#define __FBSDID(s) struct __hack
+
+/*-
+ * The following definitions are an extension of the behavior originally
+ * implemented in <sys/_posix.h>, but with a different level of granularity.
+ * POSIX.1 requires that the macros we test be defined before any standard
+ * header file is included.
+ *
+ * Here's a quick run-down of the versions:
+ * defined(_POSIX_SOURCE) 1003.1-1988
+ * _POSIX_C_SOURCE == 1 1003.1-1990
+ * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
+ * _POSIX_C_SOURCE == 199309 1003.1b-1993
+ * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ * _POSIX_C_SOURCE == 200112 1003.1-2001
+ * _POSIX_C_SOURCE == 200809 1003.1-2008
+ *
+ * In addition, the X/Open Portability Guide, which is now the Single UNIX
+ * Specification, defines a feature-test macro which indicates the version of
+ * that specification, and which subsumes _POSIX_C_SOURCE.
+ *
+ * Our macros begin with two underscores to avoid namespace screwage.
+ */
+
+/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
+#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
+#define _POSIX_C_SOURCE 199009
+#endif
+
+/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199209
+#endif
+
+/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
+#ifdef _XOPEN_SOURCE
+#if _XOPEN_SOURCE - 0 >= 700
+#define __XSI_VISIBLE 700
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809
+#elif _XOPEN_SOURCE - 0 >= 600
+#define __XSI_VISIBLE 600
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112
+#elif _XOPEN_SOURCE - 0 >= 500
+#define __XSI_VISIBLE 500
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199506
+#endif
+#endif
+
+/*
+ * Deal with all versions of POSIX. The ordering relative to the tests above is
+ * important.
+ */
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 198808
+#endif
+#ifdef _POSIX_C_SOURCE
+#if _POSIX_C_SOURCE >= 200809
+#define __POSIX_VISIBLE 200809
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 200112
+#define __POSIX_VISIBLE 200112
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 199506
+#define __POSIX_VISIBLE 199506
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199309
+#define __POSIX_VISIBLE 199309
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199209
+#define __POSIX_VISIBLE 199209
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199009
+#define __POSIX_VISIBLE 199009
+#define __ISO_C_VISIBLE 1990
+#else
+#define __POSIX_VISIBLE 198808
+#define __ISO_C_VISIBLE 0
+#endif /* _POSIX_C_SOURCE */
+#else
+/*-
+ * Deal with _ANSI_SOURCE:
+ * If it is defined, and no other compilation environment is explicitly
+ * requested, then define our internal feature-test macros to zero. This
+ * makes no difference to the preprocessor (undefined symbols in preprocessing
+ * expressions are defined to have value zero), but makes it more convenient for
+ * a test program to print out the values.
+ *
+ * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
+ * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
+ * environment (and in fact we will never get here).
+ */
+#if defined(_ANSI_SOURCE) /* Hide almost everything. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1990
+#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1999
+#else /* Default environment: show everything. */
+#define __POSIX_VISIBLE 200809
+#define __XSI_VISIBLE 700
+#define __BSD_VISIBLE 1
+#define __ISO_C_VISIBLE 1999
+#endif
+#endif
+
+/*
+ * Default values.
+ */
+#ifndef __XPG_VISIBLE
+# define __XPG_VISIBLE 700
+#endif
+#ifndef __POSIX_VISIBLE
+# define __POSIX_VISIBLE 200809
+#endif
+#ifndef __ISO_C_VISIBLE
+# define __ISO_C_VISIBLE 1999
+#endif
+#ifndef __BSD_VISIBLE
+# define __BSD_VISIBLE 1
+#endif
+
+#define __BIONIC__ 1
+
+#endif /* !_SYS_CDEFS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/cdefs_elf.h b/6/platforms/android-3/arch-x86/usr/include/sys/cdefs_elf.h
new file mode 100644
index 0000000..e051b1d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/cdefs_elf.h
@@ -0,0 +1,152 @@
+/* $NetBSD: cdefs_elf.h,v 1.22 2005/02/26 22:25:34 perry Exp $ */
+
+/*
+ * Copyright (c) 1995, 1996 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _SYS_CDEFS_ELF_H_
+#define _SYS_CDEFS_ELF_H_
+
+#ifdef __LEADING_UNDERSCORE
+#define _C_LABEL(x) __CONCAT(_,x)
+#define _C_LABEL_STRING(x) "_"x
+#else
+#define _C_LABEL(x) x
+#define _C_LABEL_STRING(x) x
+#endif
+
+#if __STDC__
+#define ___RENAME(x) __asm__(___STRING(_C_LABEL(x)))
+#else
+#ifdef __LEADING_UNDERSCORE
+#define ___RENAME(x) ____RENAME(_/**/x)
+#define ____RENAME(x) __asm__(___STRING(x))
+#else
+#define ___RENAME(x) __asm__(___STRING(x))
+#endif
+#endif
+
+#define __indr_reference(sym,alias) /* nada, since we do weak refs */
+
+#if __STDC__
+#define __strong_alias(alias,sym) \
+ __asm__(".global " _C_LABEL_STRING(#alias) "\n" \
+ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
+
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " _C_LABEL_STRING(#alias) "\n" \
+ _C_LABEL_STRING(#alias) " = " _C_LABEL_STRING(#sym));
+#define __weak_extern(sym) \
+ __asm__(".weak " _C_LABEL_STRING(#sym));
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." #sym "\n\t.ascii \"" msg "\"\n\t.text");
+
+#else /* !__STDC__ */
+
+#ifdef __LEADING_UNDERSCORE
+#define __weak_alias(alias,sym) ___weak_alias(_/**/alias,_/**/sym)
+#define ___weak_alias(alias,sym) \
+ __asm__(".weak alias\nalias = sym");
+#else
+#define __weak_alias(alias,sym) \
+ __asm__(".weak alias\nalias = sym");
+#endif
+#ifdef __LEADING_UNDERSCORE
+#define __weak_extern(sym) ___weak_extern(_/**/sym)
+#define ___weak_extern(sym) \
+ __asm__(".weak sym");
+#else
+#define __weak_extern(sym) \
+ __asm__(".weak sym");
+#endif
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning.sym\n\t.ascii msg ; .text");
+
+#endif /* !__STDC__ */
+
+#if __STDC__
+#define __SECTIONSTRING(_sec, _str) \
+ __asm__(".section " #_sec "\n\t.asciz \"" _str "\"\n\t.previous")
+#else
+#define __SECTIONSTRING(_sec, _str) \
+ __asm__(".section _sec\n\t.asciz _str\n\t.previous")
+#endif
+
+#define __IDSTRING(_n,_s) __SECTIONSTRING(.ident,_s)
+
+#define __RCSID(_s) __IDSTRING(rcsid,_s)
+#define __SCCSID(_s)
+#define __SCCSID2(_s)
+#if 0 /* XXX userland __COPYRIGHTs have \ns in them */
+#define __COPYRIGHT(_s) __SECTIONSTRING(.copyright,_s)
+#else
+#define __COPYRIGHT(_s) \
+ static const char copyright[] \
+ __attribute__((__unused__,__section__(".copyright"))) = _s
+#endif
+
+#define __KERNEL_RCSID(_n, _s) __RCSID(_s)
+#define __KERNEL_SCCSID(_n, _s)
+#if 0 /* XXX see above */
+#define __KERNEL_COPYRIGHT(_n, _s) __COPYRIGHT(_s)
+#else
+#define __KERNEL_COPYRIGHT(_n, _s) __SECTIONSTRING(.copyright, _s)
+#endif
+
+#ifndef __lint__
+#define __link_set_make_entry(set, sym) \
+ static void const * const __link_set_##set##_sym_##sym \
+ __section("link_set_" #set) __used = &sym
+#define __link_set_make_entry2(set, sym, n) \
+ static void const * const __link_set_##set##_sym_##sym##_##n \
+ __section("link_set_" #set) __used = &sym[n]
+#else
+#define __link_set_make_entry(set, sym) \
+ extern void const * const __link_set_##set##_sym_##sym
+#define __link_set_make_entry2(set, sym, n) \
+ extern void const * const __link_set_##set##_sym_##sym##_##n
+#endif /* __lint__ */
+
+#define __link_set_add_text(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_rodata(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_data(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_bss(set, sym) __link_set_make_entry(set, sym)
+#define __link_set_add_text2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_rodata2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_data2(set, sym, n) __link_set_make_entry2(set, sym, n)
+#define __link_set_add_bss2(set, sym, n) __link_set_make_entry2(set, sym, n)
+
+#define __link_set_decl(set, ptype) \
+ extern ptype * const __start_link_set_##set[]; \
+ extern ptype * const __stop_link_set_##set[] \
+
+#define __link_set_start(set) (__start_link_set_##set)
+#define __link_set_end(set) (__stop_link_set_##set)
+
+#define __link_set_count(set) \
+ (__link_set_end(set) - __link_set_start(set))
+
+#endif /* !_SYS_CDEFS_ELF_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/dirent.h b/6/platforms/android-3/arch-x86/usr/include/sys/dirent.h
new file mode 100644
index 0000000..da96f5e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/dirent.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_DIRENT_H_
+#define _SYS_DIRENT_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* this corresponds to the kernel dirent64 */
+struct dirent {
+ uint64_t d_ino;
+ int64_t d_off;
+ unsigned short d_reclen;
+ unsigned char d_type;
+ char d_name[256];
+};
+
+extern int getdents(unsigned int, struct dirent *, unsigned int);
+
+__END_DECLS
+
+#endif /* _SYS_DIRENT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/endian.h b/6/platforms/android-3/arch-x86/usr/include/sys/endian.h
new file mode 100644
index 0000000..00f4839
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/endian.h
@@ -0,0 +1,273 @@
+/* $OpenBSD: endian.h,v 1.17 2006/01/06 18:53:05 millert Exp $ */
+
+/*-
+ * Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Generic definitions for little- and big-endian systems. Other endianesses
+ * has to be dealt with in the specific machine/endian.h file for that port.
+ *
+ * This file is meant to be included from a little- or big-endian port's
+ * machine/endian.h after setting _BYTE_ORDER to either 1234 for little endian
+ * or 4321 for big..
+ */
+
+#ifndef _SYS_ENDIAN_H_
+#define _SYS_ENDIAN_H_
+
+#include <sys/cdefs.h>
+#include <machine/_types.h>
+
+#define _LITTLE_ENDIAN 1234
+#define _BIG_ENDIAN 4321
+#define _PDP_ENDIAN 3412
+
+#if __BSD_VISIBLE
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
+#define PDP_ENDIAN _PDP_ENDIAN
+#define BYTE_ORDER _BYTE_ORDER
+#endif
+
+#ifdef __GNUC__
+
+#define __swap16gen(x) __statement({ \
+ __uint16_t __swap16gen_x = (x); \
+ \
+ (__uint16_t)((__swap16gen_x & 0xff) << 8 | \
+ (__swap16gen_x & 0xff00) >> 8); \
+})
+
+#define __swap32gen(x) __statement({ \
+ __uint32_t __swap32gen_x = (x); \
+ \
+ (__uint32_t)((__swap32gen_x & 0xff) << 24 | \
+ (__swap32gen_x & 0xff00) << 8 | \
+ (__swap32gen_x & 0xff0000) >> 8 | \
+ (__swap32gen_x & 0xff000000) >> 24); \
+})
+
+#define __swap64gen(x) __statement({ \
+ __uint64_t __swap64gen_x = (x); \
+ \
+ (__uint64_t)((__swap64gen_x & 0xff) << 56 | \
+ (__swap64gen_x & 0xff00ULL) << 40 | \
+ (__swap64gen_x & 0xff0000ULL) << 24 | \
+ (__swap64gen_x & 0xff000000ULL) << 8 | \
+ (__swap64gen_x & 0xff00000000ULL) >> 8 | \
+ (__swap64gen_x & 0xff0000000000ULL) >> 24 | \
+ (__swap64gen_x & 0xff000000000000ULL) >> 40 | \
+ (__swap64gen_x & 0xff00000000000000ULL) >> 56); \
+})
+
+#else /* __GNUC__ */
+
+/* Note that these macros evaluate their arguments several times. */
+#define __swap16gen(x) \
+ (__uint16_t)(((__uint16_t)(x) & 0xff) << 8 | ((__uint16_t)(x) & 0xff00) >> 8)
+
+#define __swap32gen(x) \
+ (__uint32_t)(((__uint32_t)(x) & 0xff) << 24 | \
+ ((__uint32_t)(x) & 0xff00) << 8 | ((__uint32_t)(x) & 0xff0000) >> 8 |\
+ ((__uint32_t)(x) & 0xff000000) >> 24)
+
+#define __swap64gen(x) \
+ (__uint64_t)((((__uint64_t)(x) & 0xff) << 56) | \
+ ((__uint64_t)(x) & 0xff00ULL) << 40 | \
+ ((__uint64_t)(x) & 0xff0000ULL) << 24 | \
+ ((__uint64_t)(x) & 0xff000000ULL) << 8 | \
+ ((__uint64_t)(x) & 0xff00000000ULL) >> 8 | \
+ ((__uint64_t)(x) & 0xff0000000000ULL) >> 24 | \
+ ((__uint64_t)(x) & 0xff000000000000ULL) >> 40 | \
+ ((__uint64_t)(x) & 0xff00000000000000ULL) >> 56)
+
+#endif /* __GNUC__ */
+
+/*
+ * Define MD_SWAP if you provide swap{16,32}md functions/macros that are
+ * optimized for your architecture, These will be used for swap{16,32}
+ * unless the argument is a constant and we are using GCC, where we can
+ * take advantage of the CSE phase much better by using the generic version.
+ */
+#ifdef MD_SWAP
+#if __GNUC__
+
+#define __swap16(x) __statement({ \
+ __uint16_t __swap16_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap16gen(__swap16_x) : \
+ __swap16md(__swap16_x); \
+})
+
+#define __swap32(x) __statement({ \
+ __uint32_t __swap32_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap32gen(__swap32_x) : \
+ __swap32md(__swap32_x); \
+})
+
+#define __swap64(x) __statement({ \
+ __uint64_t __swap64_x = (x); \
+ \
+ __builtin_constant_p(x) ? __swap64gen(__swap64_x) : \
+ __swap64md(__swap64_x); \
+})
+
+#endif /* __GNUC__ */
+
+#else /* MD_SWAP */
+#define __swap16 __swap16gen
+#define __swap32 __swap32gen
+#define __swap64 __swap64gen
+#endif /* MD_SWAP */
+
+#define __swap16_multi(v, n) do { \
+ __size_t __swap16_multi_n = (n); \
+ __uint16_t *__swap16_multi_v = (v); \
+ \
+ while (__swap16_multi_n) { \
+ *__swap16_multi_v = swap16(*__swap16_multi_v); \
+ __swap16_multi_v++; \
+ __swap16_multi_n--; \
+ } \
+} while (0)
+
+#if __BSD_VISIBLE
+#define swap16 __swap16
+#define swap32 __swap32
+#define swap64 __swap64
+#define swap16_multi __swap16_multi
+
+__BEGIN_DECLS
+__uint64_t htobe64(__uint64_t);
+__uint32_t htobe32(__uint32_t);
+__uint16_t htobe16(__uint16_t);
+__uint64_t betoh64(__uint64_t);
+__uint32_t betoh32(__uint32_t);
+__uint16_t betoh16(__uint16_t);
+
+__uint64_t htole64(__uint64_t);
+__uint32_t htole32(__uint32_t);
+__uint16_t htole16(__uint16_t);
+__uint64_t letoh64(__uint64_t);
+__uint32_t letoh32(__uint32_t);
+__uint16_t letoh16(__uint16_t);
+__END_DECLS
+#endif /* __BSD_VISIBLE */
+
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+
+/* Can be overridden by machine/endian.h before inclusion of this file. */
+#ifndef _QUAD_HIGHWORD
+#define _QUAD_HIGHWORD 1
+#endif
+#ifndef _QUAD_LOWWORD
+#define _QUAD_LOWWORD 0
+#endif
+
+#if __BSD_VISIBLE
+#define htobe16 __swap16
+#define htobe32 __swap32
+#define htobe64 __swap64
+#define betoh16 __swap16
+#define betoh32 __swap32
+#define betoh64 __swap64
+
+#define htole16(x) (x)
+#define htole32(x) (x)
+#define htole64(x) (x)
+#define letoh16(x) (x)
+#define letoh32(x) (x)
+#define letoh64(x) (x)
+#endif /* __BSD_VISIBLE */
+
+#define htons(x) __swap16(x)
+#define htonl(x) __swap32(x)
+#define ntohs(x) __swap16(x)
+#define ntohl(x) __swap32(x)
+
+/* Bionic additions */
+#define ntohq(x) __swap64(x)
+#define htonq(x) __swap64(x)
+
+#define __LITTLE_ENDIAN_BITFIELD
+
+#endif /* _BYTE_ORDER */
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+
+/* Can be overridden by machine/endian.h before inclusion of this file. */
+#ifndef _QUAD_HIGHWORD
+#define _QUAD_HIGHWORD 0
+#endif
+#ifndef _QUAD_LOWWORD
+#define _QUAD_LOWWORD 1
+#endif
+
+#if __BSD_VISIBLE
+#define htole16 __swap16
+#define htole32 __swap32
+#define htole64 __swap64
+#define letoh16 __swap16
+#define letoh32 __swap32
+#define letoh64 __swap64
+
+#define htobe16(x) (x)
+#define htobe32(x) (x)
+#define htobe64(x) (x)
+#define betoh16(x) (x)
+#define betoh32(x) (x)
+#define betoh64(x) (x)
+#endif /* __BSD_VISIBLE */
+
+#define htons(x) (x)
+#define htonl(x) (x)
+#define ntohs(x) (x)
+#define ntohl(x) (x)
+
+/* Bionic additions */
+#define ntohq(x) (x)
+#define htonq(x) (x)
+
+#define __BIG_ENDIAN_BITFIELD
+
+#endif /* _BYTE_ORDER */
+
+#if __BSD_VISIBLE
+#define NTOHL(x) (x) = ntohl((u_int32_t)(x))
+#define NTOHS(x) (x) = ntohs((u_int16_t)(x))
+#define HTONL(x) (x) = htonl((u_int32_t)(x))
+#define HTONS(x) (x) = htons((u_int16_t)(x))
+#endif
+
+
+#define __BYTE_ORDER _BYTE_ORDER
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#endif
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN _BIG_ENDIAN
+#endif
+
+#endif /* _SYS_ENDIAN_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/epoll.h b/6/platforms/android-3/arch-x86/usr/include/sys/epoll.h
new file mode 100644
index 0000000..decdb46
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/epoll.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_EPOLL_H_
+#define _SYS_EPOLL_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define EPOLLIN 0x00000001
+#define EPOLLPRI 0x00000002
+#define EPOLLOUT 0x00000004
+#define EPOLLERR 0x00000008
+#define EPOLLHUP 0x00000010
+#define EPOLLRDNORM 0x00000040
+#define EPOLLRDBAND 0x00000080
+#define EPOLLWRNORM 0x00000100
+#define EPOLLWRBAND 0x00000200
+#define EPOLLMSG 0x00000400
+#define EPOLLET 0x80000000
+
+#define EPOLL_CTL_ADD 1
+#define EPOLL_CTL_DEL 2
+#define EPOLL_CTL_MOD 3
+
+typedef union epoll_data
+{
+ void *ptr;
+ int fd;
+ unsigned int u32;
+ unsigned long long u64;
+} epoll_data_t;
+
+struct epoll_event
+{
+ unsigned int events;
+ epoll_data_t data;
+};
+
+int epoll_create(int size);
+int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait(int epfd, struct epoll_event *events, int max, int timeout);
+
+__END_DECLS
+
+#endif /* _SYS_EPOLL_H_ */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/errno.h b/6/platforms/android-3/arch-x86/usr/include/sys/errno.h
new file mode 100644
index 0000000..339f4fc
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/errno.h
@@ -0,0 +1 @@
+#include <errno.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/exec_elf.h b/6/platforms/android-3/arch-x86/usr/include/sys/exec_elf.h
new file mode 100644
index 0000000..f72f81e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/exec_elf.h
@@ -0,0 +1,625 @@
+/* $OpenBSD: exec_elf.h,v 1.41 2006/01/06 18:53:05 millert Exp $ */
+/*
+ * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This is the ELF ABI header file
+ * formerly known as "elf_abi.h".
+ */
+
+#ifndef _SYS_EXEC_ELF_H_
+#define _SYS_EXEC_ELF_H_
+
+#include <machine/_types.h>
+#include <machine/exec.h>
+
+typedef __uint8_t Elf_Byte;
+
+typedef __uint32_t Elf32_Addr; /* Unsigned program address */
+typedef __uint32_t Elf32_Off; /* Unsigned file offset */
+typedef __int32_t Elf32_Sword; /* Signed large integer */
+typedef __uint32_t Elf32_Word; /* Unsigned large integer */
+typedef __uint16_t Elf32_Half; /* Unsigned medium integer */
+
+typedef __uint64_t Elf64_Addr;
+typedef __uint64_t Elf64_Off;
+typedef __int32_t Elf64_Shalf;
+
+#ifdef __alpha__
+typedef __int64_t Elf64_Sword;
+typedef __uint64_t Elf64_Word;
+#else
+typedef __int32_t Elf64_Sword;
+typedef __uint32_t Elf64_Word;
+#endif
+
+typedef __int64_t Elf64_Sxword;
+typedef __uint64_t Elf64_Xword;
+
+typedef __uint32_t Elf64_Half;
+typedef __uint16_t Elf64_Quarter;
+
+/*
+ * e_ident[] identification indexes
+ * See http://www.caldera.com/developers/gabi/2000-07-17/ch4.eheader.html
+ */
+#define EI_MAG0 0 /* file ID */
+#define EI_MAG1 1 /* file ID */
+#define EI_MAG2 2 /* file ID */
+#define EI_MAG3 3 /* file ID */
+#define EI_CLASS 4 /* file class */
+#define EI_DATA 5 /* data encoding */
+#define EI_VERSION 6 /* ELF header version */
+#define EI_OSABI 7 /* OS/ABI ID */
+#define EI_ABIVERSION 8 /* ABI version */
+#define EI_PAD 9 /* start of pad bytes */
+#define EI_NIDENT 16 /* Size of e_ident[] */
+
+/* e_ident[] magic number */
+#define ELFMAG0 0x7f /* e_ident[EI_MAG0] */
+#define ELFMAG1 'E' /* e_ident[EI_MAG1] */
+#define ELFMAG2 'L' /* e_ident[EI_MAG2] */
+#define ELFMAG3 'F' /* e_ident[EI_MAG3] */
+#define ELFMAG "\177ELF" /* magic */
+#define SELFMAG 4 /* size of magic */
+
+/* e_ident[] file class */
+#define ELFCLASSNONE 0 /* invalid */
+#define ELFCLASS32 1 /* 32-bit objs */
+#define ELFCLASS64 2 /* 64-bit objs */
+#define ELFCLASSNUM 3 /* number of classes */
+
+/* e_ident[] data encoding */
+#define ELFDATANONE 0 /* invalid */
+#define ELFDATA2LSB 1 /* Little-Endian */
+#define ELFDATA2MSB 2 /* Big-Endian */
+#define ELFDATANUM 3 /* number of data encode defines */
+
+/* e_ident[] Operating System/ABI */
+#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
+#define ELFOSABI_HPUX 1 /* HP-UX operating system */
+#define ELFOSABI_NETBSD 2 /* NetBSD */
+#define ELFOSABI_LINUX 3 /* GNU/Linux */
+#define ELFOSABI_HURD 4 /* GNU/Hurd */
+#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */
+#define ELFOSABI_SOLARIS 6 /* Solaris */
+#define ELFOSABI_MONTEREY 7 /* Monterey */
+#define ELFOSABI_IRIX 8 /* IRIX */
+#define ELFOSABI_FREEBSD 9 /* FreeBSD */
+#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
+#define ELFOSABI_MODESTO 11 /* Novell Modesto */
+#define ELFOSABI_OPENBSD 12 /* OpenBSD */
+#define ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
+
+/* e_ident */
+#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
+ (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
+ (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
+ (ehdr).e_ident[EI_MAG3] == ELFMAG3)
+
+/* ELF Header */
+typedef struct elfhdr {
+ unsigned char e_ident[EI_NIDENT]; /* ELF Identification */
+ Elf32_Half e_type; /* object file type */
+ Elf32_Half e_machine; /* machine */
+ Elf32_Word e_version; /* object file version */
+ Elf32_Addr e_entry; /* virtual entry point */
+ Elf32_Off e_phoff; /* program header table offset */
+ Elf32_Off e_shoff; /* section header table offset */
+ Elf32_Word e_flags; /* processor-specific flags */
+ Elf32_Half e_ehsize; /* ELF header size */
+ Elf32_Half e_phentsize; /* program header entry size */
+ Elf32_Half e_phnum; /* number of program header entries */
+ Elf32_Half e_shentsize; /* section header entry size */
+ Elf32_Half e_shnum; /* number of section header entries */
+ Elf32_Half e_shstrndx; /* section header table's "section
+ header string table" entry offset */
+} Elf32_Ehdr;
+
+typedef struct {
+ unsigned char e_ident[EI_NIDENT]; /* Id bytes */
+ Elf64_Quarter e_type; /* file type */
+ Elf64_Quarter e_machine; /* machine type */
+ Elf64_Half e_version; /* version number */
+ Elf64_Addr e_entry; /* entry point */
+ Elf64_Off e_phoff; /* Program hdr offset */
+ Elf64_Off e_shoff; /* Section hdr offset */
+ Elf64_Half e_flags; /* Processor flags */
+ Elf64_Quarter e_ehsize; /* sizeof ehdr */
+ Elf64_Quarter e_phentsize; /* Program header entry size */
+ Elf64_Quarter e_phnum; /* Number of program headers */
+ Elf64_Quarter e_shentsize; /* Section header entry size */
+ Elf64_Quarter e_shnum; /* Number of section headers */
+ Elf64_Quarter e_shstrndx; /* String table index */
+} Elf64_Ehdr;
+
+/* e_type */
+#define ET_NONE 0 /* No file type */
+#define ET_REL 1 /* relocatable file */
+#define ET_EXEC 2 /* executable file */
+#define ET_DYN 3 /* shared object file */
+#define ET_CORE 4 /* core file */
+#define ET_NUM 5 /* number of types */
+#define ET_LOPROC 0xff00 /* reserved range for processor */
+#define ET_HIPROC 0xffff /* specific e_type */
+
+/* e_machine */
+#define EM_NONE 0 /* No Machine */
+#define EM_M32 1 /* AT&T WE 32100 */
+#define EM_SPARC 2 /* SPARC */
+#define EM_386 3 /* Intel 80386 */
+#define EM_68K 4 /* Motorola 68000 */
+#define EM_88K 5 /* Motorola 88000 */
+#define EM_486 6 /* Intel 80486 - unused? */
+#define EM_860 7 /* Intel 80860 */
+#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */
+/*
+ * Don't know if EM_MIPS_RS4_BE,
+ * EM_SPARC64, EM_PARISC,
+ * or EM_PPC are ABI compliant
+ */
+#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */
+#define EM_SPARC64 11 /* SPARC v9 64-bit unoffical */
+#define EM_PARISC 15 /* HPPA */
+#define EM_SPARC32PLUS 18 /* Enhanced instruction set SPARC */
+#define EM_PPC 20 /* PowerPC */
+#define EM_ARM 40 /* Advanced RISC Machines ARM */
+#define EM_ALPHA 41 /* DEC ALPHA */
+#define EM_SPARCV9 43 /* SPARC version 9 */
+#define EM_ALPHA_EXP 0x9026 /* DEC ALPHA */
+#define EM_AMD64 62 /* AMD64 architecture */
+#define EM_VAX 75 /* DEC VAX */
+#define EM_NUM 15 /* number of machine types */
+
+/* Version */
+#define EV_NONE 0 /* Invalid */
+#define EV_CURRENT 1 /* Current */
+#define EV_NUM 2 /* number of versions */
+
+/* Section Header */
+typedef struct {
+ Elf32_Word sh_name; /* name - index into section header
+ string table section */
+ Elf32_Word sh_type; /* type */
+ Elf32_Word sh_flags; /* flags */
+ Elf32_Addr sh_addr; /* address */
+ Elf32_Off sh_offset; /* file offset */
+ Elf32_Word sh_size; /* section size */
+ Elf32_Word sh_link; /* section header table index link */
+ Elf32_Word sh_info; /* extra information */
+ Elf32_Word sh_addralign; /* address alignment */
+ Elf32_Word sh_entsize; /* section entry size */
+} Elf32_Shdr;
+
+typedef struct {
+ Elf64_Half sh_name; /* section name */
+ Elf64_Half sh_type; /* section type */
+ Elf64_Xword sh_flags; /* section flags */
+ Elf64_Addr sh_addr; /* virtual address */
+ Elf64_Off sh_offset; /* file offset */
+ Elf64_Xword sh_size; /* section size */
+ Elf64_Half sh_link; /* link to another */
+ Elf64_Half sh_info; /* misc info */
+ Elf64_Xword sh_addralign; /* memory alignment */
+ Elf64_Xword sh_entsize; /* table entry size */
+} Elf64_Shdr;
+
+/* Special Section Indexes */
+#define SHN_UNDEF 0 /* undefined */
+#define SHN_LORESERVE 0xff00 /* lower bounds of reserved indexes */
+#define SHN_LOPROC 0xff00 /* reserved range for processor */
+#define SHN_HIPROC 0xff1f /* specific section indexes */
+#define SHN_ABS 0xfff1 /* absolute value */
+#define SHN_COMMON 0xfff2 /* common symbol */
+#define SHN_HIRESERVE 0xffff /* upper bounds of reserved indexes */
+
+/* sh_type */
+#define SHT_NULL 0 /* inactive */
+#define SHT_PROGBITS 1 /* program defined information */
+#define SHT_SYMTAB 2 /* symbol table section */
+#define SHT_STRTAB 3 /* string table section */
+#define SHT_RELA 4 /* relocation section with addends*/
+#define SHT_HASH 5 /* symbol hash table section */
+#define SHT_DYNAMIC 6 /* dynamic section */
+#define SHT_NOTE 7 /* note section */
+#define SHT_NOBITS 8 /* no space section */
+#define SHT_REL 9 /* relation section without addends */
+#define SHT_SHLIB 10 /* reserved - purpose unknown */
+#define SHT_DYNSYM 11 /* dynamic symbol table section */
+#define SHT_NUM 12 /* number of section types */
+#define SHT_LOPROC 0x70000000 /* reserved range for processor */
+#define SHT_HIPROC 0x7fffffff /* specific section header types */
+#define SHT_LOUSER 0x80000000 /* reserved range for application */
+#define SHT_HIUSER 0xffffffff /* specific indexes */
+
+/* Section names */
+#define ELF_BSS ".bss" /* uninitialized data */
+#define ELF_DATA ".data" /* initialized data */
+#define ELF_DEBUG ".debug" /* debug */
+#define ELF_DYNAMIC ".dynamic" /* dynamic linking information */
+#define ELF_DYNSTR ".dynstr" /* dynamic string table */
+#define ELF_DYNSYM ".dynsym" /* dynamic symbol table */
+#define ELF_FINI ".fini" /* termination code */
+#define ELF_GOT ".got" /* global offset table */
+#define ELF_HASH ".hash" /* symbol hash table */
+#define ELF_INIT ".init" /* initialization code */
+#define ELF_REL_DATA ".rel.data" /* relocation data */
+#define ELF_REL_FINI ".rel.fini" /* relocation termination code */
+#define ELF_REL_INIT ".rel.init" /* relocation initialization code */
+#define ELF_REL_DYN ".rel.dyn" /* relocaltion dynamic link info */
+#define ELF_REL_RODATA ".rel.rodata" /* relocation read-only data */
+#define ELF_REL_TEXT ".rel.text" /* relocation code */
+#define ELF_RODATA ".rodata" /* read-only data */
+#define ELF_SHSTRTAB ".shstrtab" /* section header string table */
+#define ELF_STRTAB ".strtab" /* string table */
+#define ELF_SYMTAB ".symtab" /* symbol table */
+#define ELF_TEXT ".text" /* code */
+
+
+/* Section Attribute Flags - sh_flags */
+#define SHF_WRITE 0x1 /* Writable */
+#define SHF_ALLOC 0x2 /* occupies memory */
+#define SHF_EXECINSTR 0x4 /* executable */
+#define SHF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific section attributes */
+
+/* Symbol Table Entry */
+typedef struct elf32_sym {
+ Elf32_Word st_name; /* name - index into string table */
+ Elf32_Addr st_value; /* symbol value */
+ Elf32_Word st_size; /* symbol size */
+ unsigned char st_info; /* type and binding */
+ unsigned char st_other; /* 0 - no defined meaning */
+ Elf32_Half st_shndx; /* section header index */
+} Elf32_Sym;
+
+typedef struct {
+ Elf64_Half st_name; /* Symbol name index in str table */
+ Elf_Byte st_info; /* type / binding attrs */
+ Elf_Byte st_other; /* unused */
+ Elf64_Quarter st_shndx; /* section index of symbol */
+ Elf64_Xword st_value; /* value of symbol */
+ Elf64_Xword st_size; /* size of symbol */
+} Elf64_Sym;
+
+/* Symbol table index */
+#define STN_UNDEF 0 /* undefined */
+
+/* Extract symbol info - st_info */
+#define ELF32_ST_BIND(x) ((x) >> 4)
+#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF32_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+#define ELF64_ST_BIND(x) ((x) >> 4)
+#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
+#define ELF64_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf))
+
+/* Symbol Binding - ELF32_ST_BIND - st_info */
+#define STB_LOCAL 0 /* Local symbol */
+#define STB_GLOBAL 1 /* Global symbol */
+#define STB_WEAK 2 /* like global - lower precedence */
+#define STB_NUM 3 /* number of symbol bindings */
+#define STB_LOPROC 13 /* reserved range for processor */
+#define STB_HIPROC 15 /* specific symbol bindings */
+
+/* Symbol type - ELF32_ST_TYPE - st_info */
+#define STT_NOTYPE 0 /* not specified */
+#define STT_OBJECT 1 /* data object */
+#define STT_FUNC 2 /* function */
+#define STT_SECTION 3 /* section */
+#define STT_FILE 4 /* file */
+#define STT_NUM 5 /* number of symbol types */
+#define STT_LOPROC 13 /* reserved range for processor */
+#define STT_HIPROC 15 /* specific symbol types */
+
+/* Relocation entry with implicit addend */
+typedef struct {
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+} Elf32_Rel;
+
+/* Relocation entry with explicit addend */
+typedef struct {
+ Elf32_Addr r_offset; /* offset of relocation */
+ Elf32_Word r_info; /* symbol table index and type */
+ Elf32_Sword r_addend;
+} Elf32_Rela;
+
+/* Extract relocation info - r_info */
+#define ELF32_R_SYM(i) ((i) >> 8)
+#define ELF32_R_TYPE(i) ((unsigned char) (i))
+#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t))
+
+typedef struct {
+ Elf64_Xword r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+} Elf64_Rel;
+
+typedef struct {
+ Elf64_Xword r_offset; /* where to do it */
+ Elf64_Xword r_info; /* index & type of relocation */
+ Elf64_Sxword r_addend; /* adjustment value */
+} Elf64_Rela;
+
+#define ELF64_R_SYM(info) ((info) >> 32)
+#define ELF64_R_TYPE(info) ((info) & 0xFFFFFFFF)
+#define ELF64_R_INFO(s,t) (((s) << 32) + (__uint32_t)(t))
+
+/* Program Header */
+typedef struct {
+ Elf32_Word p_type; /* segment type */
+ Elf32_Off p_offset; /* segment offset */
+ Elf32_Addr p_vaddr; /* virtual address of segment */
+ Elf32_Addr p_paddr; /* physical address - ignored? */
+ Elf32_Word p_filesz; /* number of bytes in file for seg. */
+ Elf32_Word p_memsz; /* number of bytes in mem. for seg. */
+ Elf32_Word p_flags; /* flags */
+ Elf32_Word p_align; /* memory alignment */
+} Elf32_Phdr;
+
+typedef struct {
+ Elf64_Half p_type; /* entry type */
+ Elf64_Half p_flags; /* flags */
+ Elf64_Off p_offset; /* offset */
+ Elf64_Addr p_vaddr; /* virtual address */
+ Elf64_Addr p_paddr; /* physical address */
+ Elf64_Xword p_filesz; /* file size */
+ Elf64_Xword p_memsz; /* memory size */
+ Elf64_Xword p_align; /* memory & file alignment */
+} Elf64_Phdr;
+
+/* Segment types - p_type */
+#define PT_NULL 0 /* unused */
+#define PT_LOAD 1 /* loadable segment */
+#define PT_DYNAMIC 2 /* dynamic linking section */
+#define PT_INTERP 3 /* the RTLD */
+#define PT_NOTE 4 /* auxiliary information */
+#define PT_SHLIB 5 /* reserved - purpose undefined */
+#define PT_PHDR 6 /* program header */
+#define PT_NUM 7 /* Number of segment types */
+#define PT_LOOS 0x60000000 /* reserved range for OS */
+#define PT_HIOS 0x6fffffff /* specific segment types */
+#define PT_LOPROC 0x70000000 /* reserved range for processor */
+#define PT_HIPROC 0x7fffffff /* specific segment types */
+
+/* Segment flags - p_flags */
+#define PF_X 0x1 /* Executable */
+#define PF_W 0x2 /* Writable */
+#define PF_R 0x4 /* Readable */
+#define PF_MASKPROC 0xf0000000 /* reserved bits for processor */
+ /* specific segment flags */
+
+/* Dynamic structure */
+typedef struct {
+ Elf32_Sword d_tag; /* controls meaning of d_val */
+ union {
+ Elf32_Word d_val; /* Multiple meanings - see d_tag */
+ Elf32_Addr d_ptr; /* program virtual address */
+ } d_un;
+} Elf32_Dyn;
+
+typedef struct {
+ Elf64_Xword d_tag; /* controls meaning of d_val */
+ union {
+ Elf64_Addr d_ptr;
+ Elf64_Xword d_val;
+ } d_un;
+} Elf64_Dyn;
+
+/* Dynamic Array Tags - d_tag */
+#define DT_NULL 0 /* marks end of _DYNAMIC array */
+#define DT_NEEDED 1 /* string table offset of needed lib */
+#define DT_PLTRELSZ 2 /* size of relocation entries in PLT */
+#define DT_PLTGOT 3 /* address PLT/GOT */
+#define DT_HASH 4 /* address of symbol hash table */
+#define DT_STRTAB 5 /* address of string table */
+#define DT_SYMTAB 6 /* address of symbol table */
+#define DT_RELA 7 /* address of relocation table */
+#define DT_RELASZ 8 /* size of relocation table */
+#define DT_RELAENT 9 /* size of relocation entry */
+#define DT_STRSZ 10 /* size of string table */
+#define DT_SYMENT 11 /* size of symbol table entry */
+#define DT_INIT 12 /* address of initialization func. */
+#define DT_FINI 13 /* address of termination function */
+#define DT_SONAME 14 /* string table offset of shared obj */
+#define DT_RPATH 15 /* string table offset of library
+ search path */
+#define DT_SYMBOLIC 16 /* start sym search in shared obj. */
+#define DT_REL 17 /* address of rel. tbl. w addends */
+#define DT_RELSZ 18 /* size of DT_REL relocation table */
+#define DT_RELENT 19 /* size of DT_REL relocation entry */
+#define DT_PLTREL 20 /* PLT referenced relocation entry */
+#define DT_DEBUG 21 /* bugger */
+#define DT_TEXTREL 22 /* Allow rel. mod. to unwritable seg */
+#define DT_JMPREL 23 /* add. of PLT's relocation entries */
+#define DT_BIND_NOW 24 /* Bind now regardless of env setting */
+#define DT_NUM 25 /* Number used. */
+#define DT_LOPROC 0x70000000 /* reserved range for processor */
+#define DT_HIPROC 0x7fffffff /* specific dynamic array tags */
+
+/* Standard ELF hashing function */
+unsigned int elf_hash(const unsigned char *name);
+
+/*
+ * Note Definitions
+ */
+typedef struct {
+ Elf32_Word namesz;
+ Elf32_Word descsz;
+ Elf32_Word type;
+} Elf32_Note;
+
+typedef struct {
+ Elf64_Half namesz;
+ Elf64_Half descsz;
+ Elf64_Half type;
+} Elf64_Note;
+
+/*
+ * XXX - these _KERNEL items aren't part of the ABI!
+ */
+#if defined(_KERNEL) || defined(_DYN_LOADER)
+
+#define ELF32_NO_ADDR ((u_long) ~0) /* Indicates addr. not yet filled in */
+#define ELF_AUX_ENTRIES 8 /* Size of aux array passed to loader */
+
+typedef struct {
+ Elf32_Sword au_id; /* 32-bit id */
+ Elf32_Word au_v; /* 32-bit value */
+} Aux32Info;
+
+#define ELF64_NO_ADDR ((__uint64_t) ~0)/* Indicates addr. not yet filled in */
+#define ELF64_AUX_ENTRIES 8 /* Size of aux array passed to loader */
+
+typedef struct {
+ Elf64_Shalf au_id; /* 32-bit id */
+ Elf64_Xword au_v; /* 64-bit id */
+} Aux64Info;
+
+enum AuxID {
+ AUX_null = 0,
+ AUX_ignore = 1,
+ AUX_execfd = 2,
+ AUX_phdr = 3, /* &phdr[0] */
+ AUX_phent = 4, /* sizeof(phdr[0]) */
+ AUX_phnum = 5, /* # phdr entries */
+ AUX_pagesz = 6, /* PAGESIZE */
+ AUX_base = 7, /* ld.so base addr */
+ AUX_flags = 8, /* processor flags */
+ AUX_entry = 9, /* a.out entry */
+ AUX_sun_uid = 2000, /* euid */
+ AUX_sun_ruid = 2001, /* ruid */
+ AUX_sun_gid = 2002, /* egid */
+ AUX_sun_rgid = 2003 /* rgid */
+};
+
+struct elf_args {
+ u_long arg_entry; /* program entry point */
+ u_long arg_interp; /* Interpreter load address */
+ u_long arg_phaddr; /* program header address */
+ u_long arg_phentsize; /* Size of program header */
+ u_long arg_phnum; /* Number of program headers */
+ u_long arg_os; /* OS tag */
+};
+
+#endif
+
+#if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
+#define ELFSIZE ARCH_ELFSIZE
+#endif
+
+#if defined(ELFSIZE)
+#define CONCAT(x,y) __CONCAT(x,y)
+#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x)))
+#define ELFNAME2(x,y) CONCAT(x,CONCAT(_elf,CONCAT(ELFSIZE,CONCAT(_,y))))
+#define ELFNAMEEND(x) CONCAT(x,CONCAT(_elf,ELFSIZE))
+#define ELFDEFNNAME(x) CONCAT(ELF,CONCAT(ELFSIZE,CONCAT(_,x)))
+#endif
+
+#if defined(ELFSIZE) && (ELFSIZE == 32)
+#define Elf_Ehdr Elf32_Ehdr
+#define Elf_Phdr Elf32_Phdr
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Rel Elf32_Rel
+#define Elf_RelA Elf32_Rela
+#define Elf_Dyn Elf32_Dyn
+#define Elf_Half Elf32_Half
+#define Elf_Word Elf32_Word
+#define Elf_Sword Elf32_Sword
+#define Elf_Addr Elf32_Addr
+#define Elf_Off Elf32_Off
+#define Elf_Nhdr Elf32_Nhdr
+#define Elf_Note Elf32_Note
+
+#define ELF_R_SYM ELF32_R_SYM
+#define ELF_R_TYPE ELF32_R_TYPE
+#define ELF_R_INFO ELF32_R_INFO
+#define ELFCLASS ELFCLASS32
+
+#define ELF_ST_BIND ELF32_ST_BIND
+#define ELF_ST_TYPE ELF32_ST_TYPE
+#define ELF_ST_INFO ELF32_ST_INFO
+
+#define AuxInfo Aux32Info
+#elif defined(ELFSIZE) && (ELFSIZE == 64)
+#define Elf_Ehdr Elf64_Ehdr
+#define Elf_Phdr Elf64_Phdr
+#define Elf_Shdr Elf64_Shdr
+#define Elf_Sym Elf64_Sym
+#define Elf_Rel Elf64_Rel
+#define Elf_RelA Elf64_Rela
+#define Elf_Dyn Elf64_Dyn
+#define Elf_Half Elf64_Half
+#define Elf_Word Elf64_Word
+#define Elf_Sword Elf64_Sword
+#define Elf_Addr Elf64_Addr
+#define Elf_Off Elf64_Off
+#define Elf_Nhdr Elf64_Nhdr
+#define Elf_Note Elf64_Note
+
+#define ELF_R_SYM ELF64_R_SYM
+#define ELF_R_TYPE ELF64_R_TYPE
+#define ELF_R_INFO ELF64_R_INFO
+#define ELFCLASS ELFCLASS64
+
+#define ELF_ST_BIND ELF64_ST_BIND
+#define ELF_ST_TYPE ELF64_ST_TYPE
+#define ELF_ST_INFO ELF64_ST_INFO
+
+#define AuxInfo Aux64Info
+#endif
+
+#ifndef _KERNEL
+extern Elf_Dyn _DYNAMIC[];
+#endif
+
+#ifdef _KERNEL
+#ifdef _KERN_DO_ELF64
+int exec_elf64_makecmds(struct proc *, struct exec_package *);
+void *elf64_copyargs(struct exec_package *, struct ps_strings *,
+ void *, void *);
+int exec_elf64_fixup(struct proc *, struct exec_package *);
+char *elf64_check_brand(Elf64_Ehdr *);
+int elf64_os_pt_note(struct proc *, struct exec_package *, Elf64_Ehdr *,
+ char *, size_t, size_t);
+#endif
+#ifdef _KERN_DO_ELF
+int exec_elf32_makecmds(struct proc *, struct exec_package *);
+void *elf32_copyargs(struct exec_package *, struct ps_strings *,
+ void *, void *);
+int exec_elf32_fixup(struct proc *, struct exec_package *);
+char *elf32_check_brand(Elf32_Ehdr *);
+int elf32_os_pt_note(struct proc *, struct exec_package *, Elf32_Ehdr *,
+ char *, size_t, size_t);
+#endif
+
+#endif /* _KERNEL */
+
+#define ELF_TARG_VER 1 /* The ver for which this code is intended */
+
+#endif /* _SYS_EXEC_ELF_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/file.h b/6/platforms/android-3/arch-x86/usr/include/sys/file.h
new file mode 100644
index 0000000..cf2f4b1
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/file.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_FILE_H_
+#define _SYS_FILE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+/* ANDROID: needed for flock() */
+#include <unistd.h>
+#include <fcntl.h>
+
+#endif /* _SYS_FILE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/fsuid.h b/6/platforms/android-3/arch-x86/usr/include/sys/fsuid.h
new file mode 100644
index 0000000..bc47e3d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/fsuid.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_FSUID_H_
+#define _SYS_FSUID_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+#if 0 /* MISSING FROM BIONIC */
+extern int setfsuid(uid_t);
+extern int setfsgid(gid_t);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_FSUID_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/inotify.h b/6/platforms/android-3/arch-x86/usr/include/sys/inotify.h
new file mode 100644
index 0000000..33f9e74
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/inotify.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_INOTIFY_H_
+#define _SYS_INOTIFY_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/inotify.h>
+
+__BEGIN_DECLS
+
+extern int inotify_init(void);
+extern int inotify_add_watch(int, const char *, __u32);
+extern int inotify_rm_watch(int, __u32);
+
+__END_DECLS
+
+#endif /* _SYS_INOTIFY_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ioctl.h b/6/platforms/android-3/arch-x86/usr/include/sys/ioctl.h
new file mode 100644
index 0000000..9f68510
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ioctl.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_IOCTL_H_
+#define _SYS_IOCTL_H_
+
+#include <sys/cdefs.h>
+#include <linux/ioctl.h>
+#include <asm/ioctls.h>
+#include <asm/termbits.h>
+#include <sys/ioctl_compat.h>
+
+__BEGIN_DECLS
+
+extern int ioctl(int, int, ...);
+
+__END_DECLS
+
+#endif /* _SYS_IOCTL_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ioctl_compat.h b/6/platforms/android-3/arch-x86/usr/include/sys/ioctl_compat.h
new file mode 100644
index 0000000..cab5c80
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ioctl_compat.h
@@ -0,0 +1,168 @@
+/* $NetBSD: ioctl_compat.h,v 1.15 2005/12/03 17:10:46 christos Exp $ */
+
+/*
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ioctl_compat.h 8.4 (Berkeley) 1/21/94
+ */
+
+#ifndef _SYS_IOCTL_COMPAT_H_
+#define _SYS_IOCTL_COMPAT_H_
+
+/*#include <sys/ttychars.h>*/
+/*#include <sys/ttydev.h>*/
+
+struct tchars {
+ char t_intrc; /* interrupt */
+ char t_quitc; /* quit */
+ char t_startc; /* start output */
+ char t_stopc; /* stop output */
+ char t_eofc; /* end-of-file */
+ char t_brkc; /* input delimiter (like nl) */
+};
+
+struct ltchars {
+ char t_suspc; /* stop process signal */
+ char t_dsuspc; /* delayed stop process signal */
+ char t_rprntc; /* reprint line */
+ char t_flushc; /* flush output (toggles) */
+ char t_werasc; /* word erase */
+ char t_lnextc; /* literal next character */
+};
+
+/*
+ * Structure for TIOCGETP and TIOCSETP ioctls.
+ */
+#ifndef _SGTTYB_
+#define _SGTTYB_
+struct sgttyb {
+ char sg_ispeed; /* input speed */
+ char sg_ospeed; /* output speed */
+ char sg_erase; /* erase character */
+ char sg_kill; /* kill character */
+ short sg_flags; /* mode flags */
+};
+#endif
+
+#ifdef USE_OLD_TTY
+# undef TIOCGETD
+# define TIOCGETD _IOR('t', 0, int) /* get line discipline */
+# undef TIOCSETD
+# define TIOCSETD _IOW('t', 1, int) /* set line discipline */
+#else
+# define OTIOCGETD _IOR('t', 0, int) /* get line discipline */
+# define OTIOCSETD _IOW('t', 1, int) /* set line discipline */
+#endif
+#define TIOCHPCL _IO('t', 2) /* hang up on last close */
+#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
+#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
+#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
+#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */
+#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */
+#if 0
+/* BUG: a bunch of these conflict with #defines in asm/termbits.h */
+#define TANDEM 0x00000001 /* send stopc on out q full */
+#define CBREAK 0x00000002 /* half-cooked mode */
+#define LCASE 0x00000004 /* simulate lower case */
+#define ECHO 0x00000008 /* enable echoing */
+#define CRMOD 0x00000010 /* map \r to \r\n on output */
+#define RAW 0x00000020 /* no i/o processing */
+#define ODDP 0x00000040 /* get/send odd parity */
+#define EVENP 0x00000080 /* get/send even parity */
+#define ANYP 0x000000c0 /* get any parity/send none */
+#define NLDELAY 0x00000300 /* \n delay */
+#define NL0 0x00000000
+#define NL1 0x00000100 /* tty 37 */
+#define NL2 0x00000200 /* vt05 */
+#define NL3 0x00000300
+#define TBDELAY 0x00000c00 /* horizontal tab delay */
+#define TAB0 0x00000000
+#define TAB1 0x00000400 /* tty 37 */
+#define TAB2 0x00000800
+#define XTABS 0x00000c00 /* expand tabs on output */
+#define CRDELAY 0x00003000 /* \r delay */
+#define CR0 0x00000000
+#define CR1 0x00001000 /* tn 300 */
+#define CR2 0x00002000 /* tty 37 */
+#define CR3 0x00003000 /* concept 100 */
+#define VTDELAY 0x00004000 /* vertical tab delay */
+#define FF0 0x00000000
+#define FF1 0x00004000 /* tty 37 */
+#define BSDELAY 0x00008000 /* \b delay */
+#define BS0 0x00000000
+#define BS1 0x00008000
+#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
+#define CRTBS 0x00010000 /* do backspacing for crt */
+#define PRTERA 0x00020000 /* \ ... / erase */
+#define CRTERA 0x00040000 /* " \b " to wipe out char */
+#define TILDE 0x00080000 /* hazeltine tilde kludge */
+#define MDMBUF 0x00100000 /* DTR/DCD hardware flow control */
+#define LITOUT 0x00200000 /* literal output */
+#define TOSTOP 0x00400000 /* stop background jobs on output */
+#define FLUSHO 0x00800000 /* output being flushed (state) */
+#define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */
+#define L001000 0x02000000
+#define CRTKIL 0x04000000 /* kill line with " \b " */
+#define PASS8 0x08000000
+#define CTLECH 0x10000000 /* echo control chars as ^X */
+#define PENDIN 0x20000000 /* re-echo input buffer at next read */
+#define DECCTQ 0x40000000 /* only ^Q starts after ^S */
+#define NOFLSH 0x80000000 /* don't flush output on signal */
+#endif
+#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
+#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */
+#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */
+#define TIOCLGET _IOR('t', 124, int) /* get local modes */
+#define LCRTBS (CRTBS>>16)
+#define LPRTERA (PRTERA>>16)
+#define LCRTERA (CRTERA>>16)
+#define LTILDE (TILDE>>16)
+#define LMDMBUF (MDMBUF>>16)
+#define LLITOUT (LITOUT>>16)
+#define LTOSTOP (TOSTOP>>16)
+#define LFLUSHO (FLUSHO>>16)
+#define LNOHANG (NOHANG>>16)
+#define LCRTKIL (CRTKIL>>16)
+#define LPASS8 (PASS8>>16)
+#define LCTLECH (CTLECH>>16)
+#define LPENDIN (PENDIN>>16)
+#define LDECCTQ (DECCTQ>>16)
+#define LNOFLSH (NOFLSH>>16)
+#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars*/
+#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars*/
+#define OTIOCCONS _IO('t', 98) /* for hp300 -- sans int arg */
+#define OTTYDISC 0
+#define NETLDISC 1
+#define NTTYDISC 2
+
+#endif /* !_SYS_IOCTL_COMPAT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ipc.h b/6/platforms/android-3/arch-x86/usr/include/sys/ipc.h
new file mode 100644
index 0000000..c0ae0ba
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ipc.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_IPC_H
+#define _SYS_IPC_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/ipc.h>
+
+__BEGIN_DECLS
+
+extern key_t ftok(const char* path, int id);
+
+__END_DECLS
+
+#endif /* _SYS_IPC_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/klog.h b/6/platforms/android-3/arch-x86/usr/include/sys/klog.h
new file mode 100644
index 0000000..21bb7d9
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/klog.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_KLOG_H_
+#define _SYS_KLOG_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define KLOG_CLOSE 0
+#define KLOG_OPEN 1
+#define KLOG_READ 2
+#define KLOG_READ_ALL 3
+#define KLOG_READ_CLEAR 4
+#define KLOG_CLEAR 5
+#define KLOG_DISABLE 6
+#define KLOG_ENABLE 7
+#define KLOG_SETLEVEL 8
+#define KLOG_UNREADSIZE 9
+#define KLOG_WRITE 10
+
+extern int klogctl(int, char *, int);
+
+__END_DECLS
+
+#endif /* _SYS_KLOG_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/limits.h b/6/platforms/android-3/arch-x86/usr/include/sys/limits.h
new file mode 100644
index 0000000..41d02ff
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/limits.h
@@ -0,0 +1,179 @@
+/* $OpenBSD: limits.h,v 1.6 2005/12/13 00:35:23 millert Exp $ */
+/*
+ * Copyright (c) 2002 Marc Espie.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD
+ * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _SYS_LIMITS_H_
+#define _SYS_LIMITS_H_
+
+#include <sys/cdefs.h>
+#include <linux/limits.h>
+
+/* Common definitions for limits.h. */
+
+/*
+ * <machine/internal_types.h> is meant to describe a specific architecture,
+ * but to be a safe include, that doesn't ever define anything that is
+ * user-visible (only typedefs and #define names that stays in the __xxx
+ * namespace).
+ *
+ * __machine_has_unsigned_chars (default is signed chars)
+ * __FLT_xxx/__DBL_xxx non standard values for floating
+ * points limits.
+ */
+#include <machine/internal_types.h>
+
+/* Legacy */
+#include <machine/limits.h>
+
+#define CHAR_BIT 8 /* number of bits in a char */
+
+#define SCHAR_MAX 0x7f /* max value for a signed char */
+#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
+
+#define UCHAR_MAX 0xffU /* max value for an unsigned char */
+#ifdef __machine_has_unsigned_chars
+# define CHAR_MIN 0 /* min value for a char */
+# define CHAR_MAX 0xff /* max value for a char */
+#else
+# define CHAR_MAX 0x7f
+# define CHAR_MIN (-0x7f-1)
+#endif
+
+#define USHRT_MAX 0xffffU /* max value for an unsigned short */
+#define SHRT_MAX 0x7fff /* max value for a short */
+#define SHRT_MIN (-0x7fff-1) /* min value for a short */
+
+#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
+#define INT_MAX 0x7fffffff /* max value for an int */
+#define INT_MIN (-0x7fffffff-1) /* min value for an int */
+
+#ifdef __LP64__
+# define ULONG_MAX 0xffffffffffffffffUL
+ /* max value for unsigned long */
+# define LONG_MAX 0x7fffffffffffffffL
+ /* max value for a signed long */
+# define LONG_MIN (-0x7fffffffffffffffL-1)
+ /* min value for a signed long */
+#else
+# define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
+# define LONG_MAX 0x7fffffffL /* max value for a long */
+# define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
+#endif
+
+#if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999
+# define ULLONG_MAX 0xffffffffffffffffULL
+ /* max value for unsigned long long */
+# define LLONG_MAX 0x7fffffffffffffffLL
+ /* max value for a signed long long */
+# define LLONG_MIN (-0x7fffffffffffffffLL-1)
+ /* min value for a signed long long */
+#endif
+
+#if __BSD_VISIBLE
+# define UID_MAX UINT_MAX /* max value for a uid_t */
+# define GID_MAX UINT_MAX /* max value for a gid_t */
+#endif
+
+
+#ifdef __LP64__
+# define LONG_BIT 64
+#else
+# define LONG_BIT 32
+#endif
+
+/* float.h defines these as well */
+# if !defined(DBL_DIG)
+# if defined(__DBL_DIG)
+# define DBL_DIG __DBL_DIG
+# define DBL_MAX __DBL_MAX
+# define DBL_MIN __DBL_MIN
+
+# define FLT_DIG __FLT_DIG
+# define FLT_MAX __FLT_MAX
+# define FLT_MIN __FLT_MIN
+# else
+# define DBL_DIG 15
+# define DBL_MAX 1.7976931348623157E+308
+# define DBL_MIN 2.2250738585072014E-308
+
+# define FLT_DIG 6
+# define FLT_MAX 3.40282347E+38F
+# define FLT_MIN 1.17549435E-38F
+# endif
+# endif
+
+/* Bionic: the following has been optimized out from our processed kernel headers */
+
+#define CHILD_MAX 999
+#define OPEN_MAX 256
+
+/* Bionic-specific definitions */
+
+#define _POSIX_VERSION 200112L /* Posix C language bindings version */
+#define _POSIX2_VERSION -1 /* we don't support Posix command-line tools */
+#define _POSIX2_C_VERSION _POSIX_VERSION
+#define _XOPEN_VERSION 500 /* by Posix definition */
+#define _XOPEN_XCU_VERSION -1 /* we don't support command-line utilities */
+
+/* tell what we implement legacy stuff when appropriate */
+#if _POSIX_VERSION > 0
+#define _XOPEN_XPG2 1
+#define _XOPEN_XPG3 1
+#define _XOPEN_XPG4 1
+#define _XOPEN_UNIX 1
+#endif
+
+#define _XOPEN_ENH_I18N -1 /* we don't support internationalization in the C library */
+#define _XOPEN_CRYPT -1 /* don't support X/Open Encryption */
+#define _XOPEN_LEGACY -1 /* don't claim we support these, we have some of them but not all */
+#define _XOPEN_REALTIME -1 /* we don't support all these functions */
+#define _XOPEN_REALTIME_THREADS -1 /* same here */
+
+#define _POSIX_REALTIME_SIGNALS -1 /* for now, this is not supported */
+#define _POSIX_PRIORITY_SCHEDULING 1 /* priority scheduling is a Linux feature */
+#define _POSIX_TIMERS 1 /* Posix timers are supported */
+#undef _POSIX_ASYNCHRONOUS_IO /* aio_ functions are not supported */
+#define _POSIX_SYNCHRONIZED_IO 1 /* synchronized i/o supported */
+#define _POSIX_FSYNC 1 /* fdatasync() supported */
+#define _POSIX_MAPPED_FILES 1 /* mmap-ed files supported */
+
+/* XXX: TODO: complete and check list here */
+
+
+#define _POSIX_THREADS 1 /* we support threads */
+#define _POSIX_THREAD_STACKADDR 1 /* we support thread stack address */
+#define _POSIX_THREAD_STACKSIZE 1 /* we support thread stack size */
+#define _POSIX_THREAD_PRIO_INHERIT 200112L /* linux feature */
+#define _POSIX_THREAD_PRIO_PROTECT 200112L /* linux feature */
+
+#undef _POSIX_PROCESS_SHARED /* we don't support process-shared synchronization */
+#undef _POSIX_THREAD_SAFE_FUNCTIONS /* most functions are, but not everything yet */
+#define _POSIX_CHOWN_RESTRICTED 1 /* yes, chown requires appropriate priviledges */
+#define _POSIX_NO_TRUNC 1 /* very long pathnames generate an error */
+#define _POSIX_SAVED_IDS 1 /* saved user ids is a Linux feature */
+#define _POSIX_JOB_CONTROL 1 /* job control is a Linux feature */
+
+
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/linux-syscalls.h b/6/platforms/android-3/arch-x86/usr/include/sys/linux-syscalls.h
new file mode 100644
index 0000000..7772f1e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/linux-syscalls.h
@@ -0,0 +1,223 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_SYSCALLS_H_
+
+#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H
+#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__
+ # define __NR_SYSCALL_BASE 0x900000
+ #else
+ # define __NR_SYSCALL_BASE 0
+ #endif
+
+#define __NR_exit (__NR_SYSCALL_BASE + 1)
+#define __NR_fork (__NR_SYSCALL_BASE + 2)
+#define __NR_clone (__NR_SYSCALL_BASE + 120)
+#define __NR_execve (__NR_SYSCALL_BASE + 11)
+#define __NR_setuid32 (__NR_SYSCALL_BASE + 213)
+#define __NR_getuid32 (__NR_SYSCALL_BASE + 199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE + 200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE + 202)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211)
+#define __NR_gettid (__NR_SYSCALL_BASE + 224)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205)
+#define __NR_getpgid (__NR_SYSCALL_BASE + 132)
+#define __NR_getppid (__NR_SYSCALL_BASE + 64)
+#define __NR_setsid (__NR_SYSCALL_BASE + 66)
+#define __NR_setgid32 (__NR_SYSCALL_BASE + 214)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210)
+#define __NR_brk (__NR_SYSCALL_BASE + 45)
+#define __NR_ptrace (__NR_SYSCALL_BASE + 26)
+#define __NR_getpriority (__NR_SYSCALL_BASE + 96)
+#define __NR_setpriority (__NR_SYSCALL_BASE + 97)
+#define __NR_setrlimit (__NR_SYSCALL_BASE + 75)
+#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191)
+#define __NR_getrusage (__NR_SYSCALL_BASE + 77)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206)
+#define __NR_setpgid (__NR_SYSCALL_BASE + 57)
+#define __NR_setregid32 (__NR_SYSCALL_BASE + 204)
+#define __NR_chroot (__NR_SYSCALL_BASE + 61)
+#define __NR_prctl (__NR_SYSCALL_BASE + 172)
+#define __NR_capget (__NR_SYSCALL_BASE + 184)
+#define __NR_capset (__NR_SYSCALL_BASE + 185)
+#define __NR_acct (__NR_SYSCALL_BASE + 51)
+#define __NR_read (__NR_SYSCALL_BASE + 3)
+#define __NR_write (__NR_SYSCALL_BASE + 4)
+#define __NR_pread64 (__NR_SYSCALL_BASE + 180)
+#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181)
+#define __NR_open (__NR_SYSCALL_BASE + 5)
+#define __NR_close (__NR_SYSCALL_BASE + 6)
+#define __NR_lseek (__NR_SYSCALL_BASE + 19)
+#define __NR__llseek (__NR_SYSCALL_BASE + 140)
+#define __NR_getpid (__NR_SYSCALL_BASE + 20)
+#define __NR_mmap2 (__NR_SYSCALL_BASE + 192)
+#define __NR_munmap (__NR_SYSCALL_BASE + 91)
+#define __NR_mremap (__NR_SYSCALL_BASE + 163)
+#define __NR_msync (__NR_SYSCALL_BASE + 144)
+#define __NR_mprotect (__NR_SYSCALL_BASE + 125)
+#define __NR_mlock (__NR_SYSCALL_BASE + 150)
+#define __NR_munlock (__NR_SYSCALL_BASE + 151)
+#define __NR_ioctl (__NR_SYSCALL_BASE + 54)
+#define __NR_readv (__NR_SYSCALL_BASE + 145)
+#define __NR_writev (__NR_SYSCALL_BASE + 146)
+#define __NR_fcntl (__NR_SYSCALL_BASE + 55)
+#define __NR_flock (__NR_SYSCALL_BASE + 143)
+#define __NR_fchmod (__NR_SYSCALL_BASE + 94)
+#define __NR_dup (__NR_SYSCALL_BASE + 41)
+#define __NR_pipe (__NR_SYSCALL_BASE + 42)
+#define __NR_dup2 (__NR_SYSCALL_BASE + 63)
+#define __NR__newselect (__NR_SYSCALL_BASE + 142)
+#define __NR_ftruncate (__NR_SYSCALL_BASE + 93)
+#define __NR_fsync (__NR_SYSCALL_BASE + 118)
+#define __NR_fchown32 (__NR_SYSCALL_BASE + 207)
+#define __NR_sync (__NR_SYSCALL_BASE + 36)
+#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)
+#define __NR_sendfile (__NR_SYSCALL_BASE + 187)
+#define __NR_link (__NR_SYSCALL_BASE + 9)
+#define __NR_unlink (__NR_SYSCALL_BASE + 10)
+#define __NR_chdir (__NR_SYSCALL_BASE + 12)
+#define __NR_mknod (__NR_SYSCALL_BASE + 14)
+#define __NR_chmod (__NR_SYSCALL_BASE + 15)
+#define __NR_chown32 (__NR_SYSCALL_BASE + 212)
+#define __NR_lchown32 (__NR_SYSCALL_BASE + 198)
+#define __NR_mount (__NR_SYSCALL_BASE + 21)
+#define __NR_umount2 (__NR_SYSCALL_BASE + 52)
+#define __NR_fstat64 (__NR_SYSCALL_BASE + 197)
+#define __NR_stat64 (__NR_SYSCALL_BASE + 195)
+#define __NR_lstat64 (__NR_SYSCALL_BASE + 196)
+#define __NR_mkdir (__NR_SYSCALL_BASE + 39)
+#define __NR_readlink (__NR_SYSCALL_BASE + 85)
+#define __NR_rmdir (__NR_SYSCALL_BASE + 40)
+#define __NR_rename (__NR_SYSCALL_BASE + 38)
+#define __NR_getcwd (__NR_SYSCALL_BASE + 183)
+#define __NR_access (__NR_SYSCALL_BASE + 33)
+#define __NR_symlink (__NR_SYSCALL_BASE + 83)
+#define __NR_fchdir (__NR_SYSCALL_BASE + 133)
+#define __NR_truncate (__NR_SYSCALL_BASE + 92)
+#define __NR_pause (__NR_SYSCALL_BASE + 29)
+#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78)
+#define __NR_settimeofday (__NR_SYSCALL_BASE + 79)
+#define __NR_times (__NR_SYSCALL_BASE + 43)
+#define __NR_nanosleep (__NR_SYSCALL_BASE + 162)
+#define __NR_getitimer (__NR_SYSCALL_BASE + 105)
+#define __NR_setitimer (__NR_SYSCALL_BASE + 104)
+#define __NR_sigaction (__NR_SYSCALL_BASE + 67)
+#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126)
+#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72)
+#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174)
+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175)
+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177)
+#define __NR_sigpending (__NR_SYSCALL_BASE + 73)
+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156)
+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157)
+#define __NR_sched_yield (__NR_SYSCALL_BASE + 158)
+#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154)
+#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155)
+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159)
+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160)
+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161)
+#define __NR_uname (__NR_SYSCALL_BASE + 122)
+#define __NR_wait4 (__NR_SYSCALL_BASE + 114)
+#define __NR_umask (__NR_SYSCALL_BASE + 60)
+#define __NR_reboot (__NR_SYSCALL_BASE + 88)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_init_module (__NR_SYSCALL_BASE + 128)
+#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_futex (__NR_SYSCALL_BASE + 240)
+#define __NR_poll (__NR_SYSCALL_BASE + 168)
+
+#ifdef __arm__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
+#define __NR_waitid (__NR_SYSCALL_BASE + 280)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 322)
+#define __NR_madvise (__NR_SYSCALL_BASE + 220)
+#define __NR_mincore (__NR_SYSCALL_BASE + 219)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 323)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 325)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 333)
+#define __NR_renameat (__NR_SYSCALL_BASE + 329)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 328)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 262)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 261)
+#define __NR_utimes (__NR_SYSCALL_BASE + 269)
+#define __NR_socket (__NR_SYSCALL_BASE + 281)
+#define __NR_socketpair (__NR_SYSCALL_BASE + 288)
+#define __NR_bind (__NR_SYSCALL_BASE + 282)
+#define __NR_connect (__NR_SYSCALL_BASE + 283)
+#define __NR_listen (__NR_SYSCALL_BASE + 284)
+#define __NR_accept (__NR_SYSCALL_BASE + 285)
+#define __NR_getsockname (__NR_SYSCALL_BASE + 286)
+#define __NR_getpeername (__NR_SYSCALL_BASE + 287)
+#define __NR_sendto (__NR_SYSCALL_BASE + 290)
+#define __NR_recvfrom (__NR_SYSCALL_BASE + 292)
+#define __NR_shutdown (__NR_SYSCALL_BASE + 293)
+#define __NR_setsockopt (__NR_SYSCALL_BASE + 294)
+#define __NR_getsockopt (__NR_SYSCALL_BASE + 295)
+#define __NR_sendmsg (__NR_SYSCALL_BASE + 296)
+#define __NR_recvmsg (__NR_SYSCALL_BASE + 297)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 250)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 316)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318)
+#define __NR_ARM_set_tls (__NR_SYSCALL_BASE + 983045)
+#define __NR_ARM_cacheflush (__NR_SYSCALL_BASE + 983042)
+#endif
+
+#ifdef __i386__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293)
+#endif
+
+#endif
+
+#endif /* _BIONIC_LINUX_SYSCALLS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/linux-unistd.h b/6/platforms/android-3/arch-x86/usr/include/sys/linux-unistd.h
new file mode 100644
index 0000000..789271e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/linux-unistd.h
@@ -0,0 +1,204 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_UNISTD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void _exit (int);
+void _exit_thread (int);
+pid_t __fork (void);
+pid_t _waitpid (pid_t, int*, int, struct rusage*);
+int waitid (int, pid_t, struct siginfo_t*, int,void*);
+pid_t __clone (int (*fn)(void*), void *child_stack, int flags, void *arg);
+int execve (const char*, char* const*, char* const*);
+int setuid (uid_t);
+uid_t getuid (void);
+gid_t getgid (void);
+uid_t geteuid (void);
+gid_t getegid (void);
+uid_t getresuid (void);
+gid_t getresgid (void);
+pid_t gettid (void);
+int getgroups (int, gid_t *);
+pid_t getpgid (pid_t);
+pid_t getppid (void);
+pid_t setsid (void);
+int setgid (gid_t);
+int seteuid (uid_t);
+int setreuid (uid_t, uid_t);
+int setresuid (uid_t, uid_t, uid_t);
+int setresgid (gid_t, gid_t, gid_t);
+void* __brk (void*);
+int kill (pid_t, int);
+int tkill (pid_t tid, int sig);
+int __ptrace (int request, int pid, void* addr, void* data);
+int __set_thread_area (void* user_desc);
+int __getpriority (int, int);
+int setpriority (int, int, int);
+int setrlimit (int resource, const struct rlimit *rlp);
+int getrlimit (int resource, struct rlimit *rlp);
+int getrusage (int who, struct rusage* r_usage);
+int setgroups (int, const gid_t *);
+pid_t getpgrp (void);
+int setpgid (pid_t, pid_t);
+pid_t vfork (void);
+int setregid (gid_t, gid_t);
+int chroot (const char *);
+int prctl (int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5);
+int capget (cap_user_header_t header, cap_user_data_t data);
+int capset (cap_user_header_t header, const cap_user_data_t data);
+int acct (const char* filepath);
+ssize_t read (int, void*, size_t);
+ssize_t write (int, const void*, size_t);
+ssize_t __pread64 (int, void *, size_t, off_t, off_t);
+ssize_t __pwrite64 (int, void *, size_t, off_t, off_t);
+int __open (const char*, int, mode_t);
+int __openat (int, const char*, int, mode_t);
+int close (int);
+int creat (const char*, mode_t);
+off_t lseek (int, off_t, int);
+int __llseek (int, unsigned long, unsigned long, loff_t*, int);
+pid_t getpid (void);
+void * mmap (void *, size_t, int, int, int, long);
+void * __mmap2 (void*, size_t, int, int, int, long);
+int munmap (void *, size_t);
+void * mremap (void *, size_t, size_t, unsigned long);
+int msync (const void *, size_t, int);
+int mprotect (const void *, size_t, int);
+int madvise (const void *, size_t, int);
+int mlock (const void *addr, size_t len);
+int munlock (const void *addr, size_t len);
+int mincore (void* start, size_t length, unsigned char* vec);
+int __ioctl (int, int, void *);
+int readv (int, const struct iovec *, int);
+int writev (int, const struct iovec *, int);
+int __fcntl (int, int, void*);
+int flock (int, int);
+int fchmod (int, mode_t);
+int dup (int);
+int pipe (int *);
+int dup2 (int, int);
+int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
+int ftruncate (int, off_t);
+int getdents (unsigned int, struct dirent *, unsigned int);
+int fsync (int);
+int fchown (int, uid_t, gid_t);
+void sync (void);
+int __fcntl64 (int, int, void *);
+int fstatfs (int, size_t, struct statfs *);
+ssize_t sendfile (int out_fd, int in_fd, off_t *offset, size_t count);
+int fstatat (int dirfd, const char *path, struct stat *buf, int flags);
+int mkdirat (int dirfd, const char *pathname, mode_t mode);
+int fchownat (int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+int fchmodat (int dirfd, const char *path, mode_t mode, int flags);
+int renameat (int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+int link (const char*, const char*);
+int unlink (const char*);
+int unlinkat (int, const char *, int);
+int chdir (const char*);
+int mknod (const char*, mode_t, dev_t);
+int chmod (const char*,mode_t);
+int chown (const char *, uid_t, gid_t);
+int lchown (const char*, uid_t, gid_t);
+int mount (const char*, const char*, const char*, unsigned long, const void*);
+int umount (const char*);
+int umount2 (const char*, int);
+int fstat (int, struct stat*);
+int stat (const char *, struct stat *);
+int lstat (const char *, struct stat *);
+int mkdir (const char *, mode_t);
+int readlink (const char *, char *, size_t);
+int rmdir (const char *);
+int rename (const char *, const char *);
+int __getcwd (char * buf, size_t size);
+int access (const char *, int);
+int symlink (const char *, const char *);
+int fchdir (int);
+int truncate (const char*, off_t);
+int __statfs64 (const char *, size_t, struct statfs *);
+int pause (void);
+int gettimeofday (struct timeval*, struct timezone*);
+int settimeofday (const struct timeval*, const struct timezone*);
+clock_t times (struct tms *);
+int nanosleep (const struct timespec *, struct timespec *);
+int clock_gettime (clockid_t clk_id, struct timespec *tp);
+int clock_settime (clockid_t clk_id, const struct timespec *tp);
+int clock_getres (clockid_t clk_id, struct timespec *res);
+int clock_nanosleep (const struct timespec *req, struct timespec *rem);
+int getitimer (int, const struct itimerval *);
+int setitimer (int, const struct itimerval *, struct itimerval *);
+int __timer_create (clockid_t clockid, struct sigevent *evp, timer_t *timerid);
+int __timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*);
+int __timer_gettime (timer_t, struct itimerspec*);
+int __timer_getoverrun (timer_t);
+int __timer_delete (timer_t);
+int utimes (const char*, const struct timeval tvp[2]);
+int sigaction (int, const struct sigaction *, struct sigaction *);
+int sigprocmask (int, const sigset_t *, sigset_t *);
+int __sigsuspend (int unused1, int unused2, unsigned mask);
+int __rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize);
+int __rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize);
+int __rt_sigtimedwait (const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size);
+int sigpending (sigset_t *);
+int socket (int, int, int);
+int socketpair (int, int, int, int*);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int socket (int, int, int);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int socketpair (int, int, int, int*);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param);
+int sched_getscheduler (pid_t pid);
+int sched_yield (void);
+int sched_setparam (pid_t pid, const struct sched_param *param);
+int sched_getparam (pid_t pid, struct sched_param *param);
+int sched_get_priority_max (int policy);
+int sched_get_priority_min (int policy);
+int sched_rr_get_interval (pid_t pid, struct timespec *interval);
+int uname (struct utsname *);
+pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
+mode_t umask (mode_t);
+int __reboot (int, int, int, void *);
+int __syslog (int, char *, int);
+int init_module (void *, unsigned long, const char *);
+int delete_module (const char*, unsigned int);
+int klogctl (int, char *, int);
+int futex (void *, int, int, void *, void *, int);
+int epoll_create (int size);
+int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait (int epfd, struct epoll_event *events, int max, int timeout);
+int inotify_init (void);
+int inotify_add_watch (int, const char *, unsigned int);
+int inotify_rm_watch (int, unsigned int);
+int poll (struct pollfd *, unsigned int, long);
+int __set_tls (void*);
+int cacheflush (long start, long end, long flags);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BIONIC_LINUX_UNISTD_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/mman.h b/6/platforms/android-3/arch-x86/usr/include/sys/mman.h
new file mode 100644
index 0000000..7a32974
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/mman.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_MMAN_H_
+#define _SYS_MMAN_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <asm/mman.h>
+#include <asm/page.h>
+
+__BEGIN_DECLS
+
+#ifndef MAP_ANON
+#define MAP_ANON MAP_ANONYMOUS
+#endif
+
+#define MAP_FAILED ((void *)-1)
+
+#define MREMAP_MAYMOVE 1
+#define MREMAP_FIXED 2
+
+extern void* mmap(void *, size_t, int, int, int, off_t);
+extern int munmap(void *, size_t);
+extern int msync(const void *, size_t, int);
+extern int mprotect(const void *, size_t, int);
+extern void* mremap(void *, size_t, size_t, unsigned long);
+
+extern int mlockall(int);
+extern int munlockall(void);
+extern int mlock(const void *, size_t);
+extern int munlock(const void *, size_t);
+extern int madvise(const void *, size_t, int);
+
+extern int mlock(const void *addr, size_t len);
+extern int munlock(const void *addr, size_t len);
+
+extern int mincore(void* start, size_t length, unsigned char* vec);
+
+__END_DECLS
+
+#endif /* _SYS_MMAN_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/mount.h b/6/platforms/android-3/arch-x86/usr/include/sys/mount.h
new file mode 100644
index 0000000..ba88447
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/mount.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_MOUNT_H
+#define _SYS_MOUNT_H
+
+#include <sys/cdefs.h>
+#include <sys/ioctl.h>
+
+__BEGIN_DECLS
+
+/*
+ * These are the fs-independent mount-flags: up to 32 flags are supported
+ */
+#define MS_RDONLY 1 /* Mount read-only */
+#define MS_NOSUID 2 /* Ignore suid and sgid bits */
+#define MS_NODEV 4 /* Disallow access to device special files */
+#define MS_NOEXEC 8 /* Disallow program execution */
+#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
+#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
+#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
+#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
+#define MS_NOATIME 1024 /* Do not update access times. */
+#define MS_NODIRATIME 2048 /* Do not update directory access times */
+#define MS_BIND 4096
+#define MS_MOVE 8192
+#define MS_REC 16384
+#define MS_VERBOSE 32768
+#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
+#define MS_ONE_SECOND (1<<17) /* fs has 1 sec a/m/ctime resolution */
+#define MS_ACTIVE (1<<30)
+#define MS_NOUSER (1<<31)
+
+/*
+ * Superblock flags that can be altered by MS_REMOUNT
+ */
+#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME|MS_NODIRATIME)
+
+/*
+ * Old magic mount flag and mask
+ */
+#define MS_MGC_VAL 0xC0ED0000
+#define MS_MGC_MSK 0xffff0000
+
+/*
+ * umount2() flags
+ */
+#define MNT_FORCE 1 /* Forcibly unmount */
+#define MNT_DETACH 2 /* Detach from tree only */
+#define MNT_EXPIRE 4 /* Mark for expiry */
+
+/*
+ * Block device ioctls
+ */
+#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
+#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
+#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
+#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
+#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
+#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
+#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
+
+/*
+ * Prototypes
+ */
+extern int mount(const char *, const char *,
+ const char *, unsigned long,
+ const void *);
+extern int umount(const char *);
+extern int umount2(const char *, int);
+
+#if 0 /* MISSING FROM BIONIC */
+extern int pivot_root(const char *, const char *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_MOUNT_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/param.h b/6/platforms/android-3/arch-x86/usr/include/sys/param.h
new file mode 100644
index 0000000..3a815cb
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/param.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PARAM_H_
+#define _SYS_PARAM_H_
+
+#include <limits.h>
+#include <linux/param.h>
+
+#define MAXPATHLEN PATH_MAX
+#define MAXSYMLINKS 8
+
+#define ALIGNBYTES 3
+#define ALIGN(p) (((unsigned int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+
+#endif /* _SYS_PARAM_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/poll.h b/6/platforms/android-3/arch-x86/usr/include/sys/poll.h
new file mode 100644
index 0000000..779ec77
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/poll.h
@@ -0,0 +1 @@
+#include <poll.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/prctl.h b/6/platforms/android-3/arch-x86/usr/include/sys/prctl.h
new file mode 100644
index 0000000..ce85bf7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/prctl.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PRCTL_H
+#define _SYS_PRCTL_H
+
+#include <linux/prctl.h>
+
+__BEGIN_DECLS
+
+extern int prctl(int option, unsigned long arg2, unsigned long arg3 , unsigned
+ long arg4, unsigned long arg5);
+
+__END_DECLS
+
+#endif /* _SYS_PRCTL_H */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ptrace.h b/6/platforms/android-3/arch-x86/usr/include/sys/ptrace.h
new file mode 100644
index 0000000..848416b
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ptrace.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_PTRACE_H_
+#define _SYS_PTRACE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+/* For all of the defines */
+#include <linux/ptrace.h>
+
+__BEGIN_DECLS
+
+#define PTRACE_POKEUSER PTRACE_POKEUSR
+#define PTRACE_PEEKUSER PTRACE_PEEKUSR
+
+extern long ptrace(int request, pid_t pid, void *addr, void *data);
+
+__END_DECLS
+
+#endif /* _SYS_PTRACE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/queue.h b/6/platforms/android-3/arch-x86/usr/include/sys/queue.h
new file mode 100644
index 0000000..b0e6b38
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/queue.h
@@ -0,0 +1,557 @@
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list. Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction. Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * List definitions.
+ */
+#define LIST_HEAD(name, type) \
+struct name { \
+ struct type *lh_first; /* first element */ \
+}
+
+#define LIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define LIST_ENTRY(type) \
+struct { \
+ struct type *le_next; /* next element */ \
+ struct type **le_prev; /* address of previous next element */ \
+}
+
+/*
+ * List functions.
+ */
+#define LIST_INIT(head) do { \
+ (head)->lh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_AFTER(listelm, elm, field) do { \
+ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
+ (listelm)->field.le_next->field.le_prev = \
+ &(elm)->field.le_next; \
+ (listelm)->field.le_next = (elm); \
+ (elm)->field.le_prev = &(listelm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.le_prev = (listelm)->field.le_prev; \
+ (elm)->field.le_next = (listelm); \
+ *(listelm)->field.le_prev = (elm); \
+ (listelm)->field.le_prev = &(elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.le_next = (head)->lh_first) != NULL) \
+ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+ (head)->lh_first = (elm); \
+ (elm)->field.le_prev = &(head)->lh_first; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_REMOVE(elm, field) do { \
+ if ((elm)->field.le_next != NULL) \
+ (elm)->field.le_next->field.le_prev = \
+ (elm)->field.le_prev; \
+ *(elm)->field.le_prev = (elm)->field.le_next; \
+} while (/*CONSTCOND*/0)
+
+#define LIST_FOREACH(var, head, field) \
+ for ((var) = ((head)->lh_first); \
+ (var); \
+ (var) = ((var)->field.le_next))
+
+/*
+ * List access methods.
+ */
+#define LIST_EMPTY(head) ((head)->lh_first == NULL)
+#define LIST_FIRST(head) ((head)->lh_first)
+#define LIST_NEXT(elm, field) ((elm)->field.le_next)
+
+
+/*
+ * Singly-linked List definitions.
+ */
+#define SLIST_HEAD(name, type) \
+struct name { \
+ struct type *slh_first; /* first element */ \
+}
+
+#define SLIST_HEAD_INITIALIZER(head) \
+ { NULL }
+
+#define SLIST_ENTRY(type) \
+struct { \
+ struct type *sle_next; /* next element */ \
+}
+
+/*
+ * Singly-linked List functions.
+ */
+#define SLIST_INIT(head) do { \
+ (head)->slh_first = NULL; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
+ (elm)->field.sle_next = (slistelm)->field.sle_next; \
+ (slistelm)->field.sle_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.sle_next = (head)->slh_first; \
+ (head)->slh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE_HEAD(head, field) do { \
+ (head)->slh_first = (head)->slh_first->field.sle_next; \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_REMOVE(head, elm, type, field) do { \
+ if ((head)->slh_first == (elm)) { \
+ SLIST_REMOVE_HEAD((head), field); \
+ } \
+ else { \
+ struct type *curelm = (head)->slh_first; \
+ while(curelm->field.sle_next != (elm)) \
+ curelm = curelm->field.sle_next; \
+ curelm->field.sle_next = \
+ curelm->field.sle_next->field.sle_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SLIST_FOREACH(var, head, field) \
+ for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+
+/*
+ * Singly-linked List access methods.
+ */
+#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
+#define SLIST_FIRST(head) ((head)->slh_first)
+#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
+
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define STAILQ_HEAD(name, type) \
+struct name { \
+ struct type *stqh_first; /* first element */ \
+ struct type **stqh_last; /* addr of last next element */ \
+}
+
+#define STAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).stqh_first }
+
+#define STAILQ_ENTRY(type) \
+struct { \
+ struct type *stqe_next; /* next element */ \
+}
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define STAILQ_INIT(head) do { \
+ (head)->stqh_first = NULL; \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (head)->stqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.stqe_next = NULL; \
+ *(head)->stqh_last = (elm); \
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+ (head)->stqh_last = &(elm)->field.stqe_next; \
+ (listelm)->field.stqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(head)->stqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->stqh_first == (elm)) { \
+ STAILQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->stqh_first; \
+ while (curelm->field.stqe_next != (elm)) \
+ curelm = curelm->field.stqe_next; \
+ if ((curelm->field.stqe_next = \
+ curelm->field.stqe_next->field.stqe_next) == NULL) \
+ (head)->stqh_last = &(curelm)->field.stqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define STAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->stqh_first); \
+ (var); \
+ (var) = ((var)->field.stqe_next))
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
+#define STAILQ_FIRST(head) ((head)->stqh_first)
+#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).sqh_first }
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (head)->sqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+ (listelm)->field.sqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
+ if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
+ if ((head)->sqh_first == (elm)) { \
+ SIMPLEQ_REMOVE_HEAD((head), field); \
+ } else { \
+ struct type *curelm = (head)->sqh_first; \
+ while (curelm->field.sqe_next != (elm)) \
+ curelm = curelm->field.sqe_next; \
+ if ((curelm->field.sqe_next = \
+ curelm->field.sqe_next->field.sqe_next) == NULL) \
+ (head)->sqh_last = &(curelm)->field.sqe_next; \
+ } \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+
+/*
+ * Tail queue definitions.
+ */
+#define _TAILQ_HEAD(name, type, qual) \
+struct name { \
+ qual type *tqh_first; /* first element */ \
+ qual type *qual *tqh_last; /* addr of last next element */ \
+}
+#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
+
+#define TAILQ_HEAD_INITIALIZER(head) \
+ { NULL, &(head).tqh_first }
+
+#define _TAILQ_ENTRY(type, qual) \
+struct { \
+ qual type *tqe_next; /* next element */ \
+ qual type *qual *tqe_prev; /* address of previous next element */\
+}
+#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue functions.
+ */
+#define TAILQ_INIT(head) do { \
+ (head)->tqh_first = NULL; \
+ (head)->tqh_last = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_HEAD(head, elm, field) do { \
+ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
+ (head)->tqh_first->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (head)->tqh_first = (elm); \
+ (elm)->field.tqe_prev = &(head)->tqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.tqe_next = NULL; \
+ (elm)->field.tqe_prev = (head)->tqh_last; \
+ *(head)->tqh_last = (elm); \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
+ (elm)->field.tqe_next->field.tqe_prev = \
+ &(elm)->field.tqe_next; \
+ else \
+ (head)->tqh_last = &(elm)->field.tqe_next; \
+ (listelm)->field.tqe_next = (elm); \
+ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
+ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
+ (elm)->field.tqe_next = (listelm); \
+ *(listelm)->field.tqe_prev = (elm); \
+ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REMOVE(head, elm, field) do { \
+ if (((elm)->field.tqe_next) != NULL) \
+ (elm)->field.tqe_next->field.tqe_prev = \
+ (elm)->field.tqe_prev; \
+ else \
+ (head)->tqh_last = (elm)->field.tqe_prev; \
+ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->tqh_first); \
+ (var); \
+ (var) = ((var)->field.tqe_next))
+
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
+ for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
+ (var); \
+ (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+/*
+ * Tail queue access methods.
+ */
+#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
+#define TAILQ_FIRST(head) ((head)->tqh_first)
+#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
+
+#define TAILQ_LAST(head, headname) \
+ (*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define TAILQ_PREV(elm, headname, field) \
+ (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+
+
+/*
+ * Circular queue definitions.
+ */
+#define CIRCLEQ_HEAD(name, type) \
+struct name { \
+ struct type *cqh_first; /* first element */ \
+ struct type *cqh_last; /* last element */ \
+}
+
+#define CIRCLEQ_HEAD_INITIALIZER(head) \
+ { (void *)&head, (void *)&head }
+
+#define CIRCLEQ_ENTRY(type) \
+struct { \
+ struct type *cqe_next; /* next element */ \
+ struct type *cqe_prev; /* previous element */ \
+}
+
+/*
+ * Circular queue functions.
+ */
+#define CIRCLEQ_INIT(head) do { \
+ (head)->cqh_first = (void *)(head); \
+ (head)->cqh_last = (void *)(head); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
+ (elm)->field.cqe_prev = (listelm); \
+ if ((listelm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (listelm)->field.cqe_next->field.cqe_prev = (elm); \
+ (listelm)->field.cqe_next = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
+ (elm)->field.cqe_next = (listelm); \
+ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
+ if ((listelm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (listelm)->field.cqe_prev->field.cqe_next = (elm); \
+ (listelm)->field.cqe_prev = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
+ (elm)->field.cqe_next = (head)->cqh_first; \
+ (elm)->field.cqe_prev = (void *)(head); \
+ if ((head)->cqh_last == (void *)(head)) \
+ (head)->cqh_last = (elm); \
+ else \
+ (head)->cqh_first->field.cqe_prev = (elm); \
+ (head)->cqh_first = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.cqe_next = (void *)(head); \
+ (elm)->field.cqe_prev = (head)->cqh_last; \
+ if ((head)->cqh_first == (void *)(head)) \
+ (head)->cqh_first = (elm); \
+ else \
+ (head)->cqh_last->field.cqe_next = (elm); \
+ (head)->cqh_last = (elm); \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_REMOVE(head, elm, field) do { \
+ if ((elm)->field.cqe_next == (void *)(head)) \
+ (head)->cqh_last = (elm)->field.cqe_prev; \
+ else \
+ (elm)->field.cqe_next->field.cqe_prev = \
+ (elm)->field.cqe_prev; \
+ if ((elm)->field.cqe_prev == (void *)(head)) \
+ (head)->cqh_first = (elm)->field.cqe_next; \
+ else \
+ (elm)->field.cqe_prev->field.cqe_next = \
+ (elm)->field.cqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define CIRCLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->cqh_first); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_next))
+
+#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
+ for ((var) = ((head)->cqh_last); \
+ (var) != (const void *)(head); \
+ (var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
+#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
+#define CIRCLEQ_LAST(head) ((head)->cqh_last)
+#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
+#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
+ (((elm)->field.cqe_next == (void *)(head)) \
+ ? ((head)->cqh_first) \
+ : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field) \
+ (((elm)->field.cqe_prev == (void *)(head)) \
+ ? ((head)->cqh_last) \
+ : (elm->field.cqe_prev))
+
+#endif /* sys/queue.h */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/reboot.h b/6/platforms/android-3/arch-x86/usr/include/sys/reboot.h
new file mode 100644
index 0000000..df81139
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/reboot.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_REBOOT_H_
+#define _SYS_REBOOT_H_
+
+#include <sys/cdefs.h>
+#include <linux/reboot.h>
+
+__BEGIN_DECLS
+
+/* use glibc names as well */
+
+#define RB_AUTOBOOT LINUX_REBOOT_CMD_RESTART
+#define RB_HALT_SYSTEM LINUX_REBOOT_CMD_HALT
+#define RB_ENABLE_CAD LINUX_REBOOT_CMD_CAD_ON
+#define RB_DISABLE_CAD LINUX_REBOOT_CMD_CAD_OFF
+#define RB_POWER_OFF LINUX_REBOOT_CMD_POWER_OFF
+
+extern int reboot(int reboot_type);
+extern int __reboot(int, int, int, void *);
+
+__END_DECLS
+
+#endif /* _SYS_REBOOT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/resource.h b/6/platforms/android-3/arch-x86/usr/include/sys/resource.h
new file mode 100644
index 0000000..ef325c7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/resource.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_RESOURCE_H_
+#define _SYS_RESOURCE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h> /* MUST be included before linux/resource.h */
+
+/* TRICK AHEAD: <linux/resource.h> defines a getrusage function with
+ * a non-standard signature. this is surprising because the
+ * syscall seems to use the standard one instead.
+ * once again, creative macro usage saves the days
+ */
+#define getrusage __kernel_getrusage
+#include <linux/resource.h>
+#undef getrusage
+
+typedef unsigned long rlim_t;
+
+__BEGIN_DECLS
+
+extern int getpriority(int, int);
+extern int setpriority(int, int, int);
+extern int getrlimit(int resource, struct rlimit *rlp);
+extern int setrlimit(int resource, const struct rlimit *rlp);
+extern int getrusage(int who, struct rusage* r_usage);
+
+__END_DECLS
+
+#endif /* _SYS_RESOURCE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/select.h b/6/platforms/android-3/arch-x86/usr/include/sys/select.h
new file mode 100644
index 0000000..9d11ee8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/select.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SELECT_H_
+#define _SYS_SELECT_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <signal.h>
+
+__BEGIN_DECLS
+
+typedef __kernel_fd_set fd_set;
+
+extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
+extern int pselect(int n, fd_set *readfds, fd_set *writefds, fd_set *errfds,
+ const struct timespec *timeout, const sigset_t *sigmask);
+
+__END_DECLS
+
+#endif /* _SYS_SELECT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/sendfile.h b/6/platforms/android-3/arch-x86/usr/include/sys/sendfile.h
new file mode 100644
index 0000000..d5aba26
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/sendfile.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SENDFILE_H_
+#define _SYS_SENDFILE_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+extern ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
+
+__END_DECLS
+
+#endif /* _SYS_SENDFILE_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/socket.h b/6/platforms/android-3/arch-x86/usr/include/sys/socket.h
new file mode 100644
index 0000000..208663e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/socket.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SOCKET_H_
+#define _SYS_SOCKET_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/socket.h>
+
+__BEGIN_DECLS
+
+#define SOCK_STREAM 1
+#define SOCK_DGRAM 2
+#define SOCK_RAW 3
+#define SOCK_RDM 4
+#define SOCK_SEQPACKET 5
+#define SOCK_PACKET 10
+
+#ifdef __i386__
+# define __socketcall extern __attribute__((__cdecl__))
+#else
+# define __socketcall extern
+#endif
+
+/* BIONIC: second argument to shutdown() */
+enum {
+ SHUT_RD = 0, /* no more receptions */
+#define SHUT_RD SHUT_RD
+ SHUT_WR, /* no more transmissions */
+#define SHUT_WR SHUT_WR
+ SHUT_RDWR /* no more receptions or transmissions */
+#define SHUT_RDWR SHUT_RDWR
+};
+
+
+typedef int socklen_t;
+
+__socketcall int socket(int, int, int);
+__socketcall int bind(int, const struct sockaddr *, int);
+__socketcall int connect(int, const struct sockaddr *, socklen_t);
+__socketcall int listen(int, int);
+__socketcall int accept(int, struct sockaddr *, socklen_t *);
+__socketcall int getsockname(int, struct sockaddr *, socklen_t *);
+__socketcall int getpeername(int, struct sockaddr *, socklen_t *);
+__socketcall int socketpair(int, int, int, int *);
+__socketcall int shutdown(int, int);
+__socketcall int setsockopt(int, int, int, const void *, socklen_t);
+__socketcall int getsockopt(int, int, int, void *, socklen_t *);
+__socketcall int sendmsg(int, const struct msghdr *, unsigned int);
+__socketcall int recvmsg(int, struct msghdr *, unsigned int);
+
+extern ssize_t send(int, const void *, size_t, unsigned int);
+extern ssize_t recv(int, void *, size_t, unsigned int);
+
+__socketcall ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+__socketcall ssize_t recvfrom(int, void *, size_t, unsigned int, const struct sockaddr *, socklen_t *);
+
+#undef __socketcall
+
+__END_DECLS
+
+#endif /* _SYS_SOCKET_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/socketcalls.h b/6/platforms/android-3/arch-x86/usr/include/sys/socketcalls.h
new file mode 100644
index 0000000..c74f463
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/socketcalls.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SOCKETCALLS_H_
+#define _SYS_SOCKETCALLS_H_
+
+/* socketcalls by number */
+
+#define SYS_SOCKET 1 /* sys_socket(2) */
+#define SYS_BIND 2 /* sys_bind(2) */
+#define SYS_CONNECT 3 /* sys_connect(2) */
+#define SYS_LISTEN 4 /* sys_listen(2) */
+#define SYS_ACCEPT 5 /* sys_accept(2) */
+#define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */
+#define SYS_GETPEERNAME 7 /* sys_getpeername(2) */
+#define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */
+#define SYS_SEND 9 /* sys_send(2) */
+#define SYS_RECV 10 /* sys_recv(2) */
+#define SYS_SENDTO 11 /* sys_sendto(2) */
+#define SYS_RECVFROM 12 /* sys_recvfrom(2) */
+#define SYS_SHUTDOWN 13 /* sys_shutdown(2) */
+#define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */
+#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
+#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
+#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
+
+#endif /* _SYS_SOCKETCALLS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/stat.h b/6/platforms/android-3/arch-x86/usr/include/sys/stat.h
new file mode 100644
index 0000000..091ee6d
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/stat.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_STAT_H_
+#define _SYS_STAT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <linux/stat.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+/* really matches stat64 in the kernel, hence the padding
+ * Note: The kernel zero's the padded region because glibc might read them
+ * in the hope that the kernel has stretched to using larger sizes.
+ */
+struct stat {
+ unsigned long long st_dev;
+ unsigned char __pad0[4];
+
+ unsigned long __st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned long long st_rdev;
+ unsigned char __pad3[4];
+
+ long long st_size;
+ unsigned long st_blksize;
+ unsigned long long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+
+ unsigned long long st_ino;
+};
+
+/* For compatibility with GLibc, we provide macro aliases
+ * for the non-Posix nano-seconds accessors.
+ */
+#define st_atimensec st_atime_nsec
+#define st_mtimensec st_mtime_nsec
+#define st_ctimensec st_ctime_nsec
+
+extern int chmod(const char *, mode_t);
+extern int fchmod(int, mode_t);
+extern int mkdir(const char *, mode_t);
+
+extern int stat(const char *, struct stat *);
+extern int fstat(int, struct stat *);
+extern int lstat(const char *, struct stat *);
+extern int mknod(const char *, mode_t, dev_t);
+extern mode_t umask(mode_t);
+
+#define stat64 stat
+#define fstat64 fstat
+#define lstat64 lstat
+
+static __inline__ int mkfifo(const char *__p, mode_t __m)
+{
+ return mknod(__p, (__m & ~S_IFMT) | S_IFIFO, (dev_t)0);
+}
+
+extern int fstatat(int dirfd, const char *path, struct stat *buf, int flags);
+extern int mkdirat(int dirfd, const char *pathname, mode_t mode);
+extern int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+extern int fchmodat(int dirfd, const char *path, mode_t mode, int flags);
+extern int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+
+__END_DECLS
+
+#endif /* _SYS_STAT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/statfs.h b/6/platforms/android-3/arch-x86/usr/include/sys/statfs.h
new file mode 100644
index 0000000..53b3b5e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+#include <sys/vfs.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/syscall.h b/6/platforms/android-3/arch-x86/usr/include/sys/syscall.h
new file mode 100644
index 0000000..7055518
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/syscall.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSCALL_H_
+#define _SYS_SYSCALL_H_
+
+#include <errno.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <asm/unistd.h>
+
+__BEGIN_DECLS
+
+int syscall(int number, ...);
+
+__END_DECLS
+
+#endif /* _SYS_SYSCALL_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/sysconf.h b/6/platforms/android-3/arch-x86/usr/include/sys/sysconf.h
new file mode 100644
index 0000000..2fc1b08
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/sysconf.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSCONF_H_
+#define _SYS_SYSCONF_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/* as listed by Posix sysconf() description */
+/* most of these will return -1 and ENOSYS */
+
+#define _SC_ARG_MAX 0x0000
+#define _SC_BC_BASE_MAX 0x0001
+#define _SC_BC_DIM_MAX 0x0002
+#define _SC_BC_SCALE_MAX 0x0003
+#define _SC_BC_STRING_MAX 0x0004
+#define _SC_CHILD_MAX 0x0005
+#define _SC_CLK_TCK 0x0006
+#define _SC_COLL_WEIGHTS_MAX 0x0007
+#define _SC_EXPR_NEST_MAX 0x0008
+#define _SC_LINE_MAX 0x0009
+#define _SC_NGROUPS_MAX 0x000a
+#define _SC_OPEN_MAX 0x000b
+#define _SC_PASS_MAX 0x000c
+#define _SC_2_C_BIND 0x000d
+#define _SC_2_C_DEV 0x000e
+#define _SC_2_C_VERSION 0x000f
+#define _SC_2_CHAR_TERM 0x0010
+#define _SC_2_FORT_DEV 0x0011
+#define _SC_2_FORT_RUN 0x0012
+#define _SC_2_LOCALEDEF 0x0013
+#define _SC_2_SW_DEV 0x0014
+#define _SC_2_UPE 0x0015
+#define _SC_2_VERSION 0x0016
+#define _SC_JOB_CONTROL 0x0017
+#define _SC_SAVED_IDS 0x0018
+#define _SC_VERSION 0x0019
+#define _SC_RE_DUP_MAX 0x001a
+#define _SC_STREAM_MAX 0x001b
+#define _SC_TZNAME_MAX 0x001c
+#define _SC_XOPEN_CRYPT 0x001d
+#define _SC_XOPEN_ENH_I18N 0x001e
+#define _SC_XOPEN_SHM 0x001f
+#define _SC_XOPEN_VERSION 0x0020
+#define _SC_XOPEN_XCU_VERSION 0x0021
+#define _SC_XOPEN_REALTIME 0x0022
+#define _SC_XOPEN_REALTIME_THREADS 0x0023
+#define _SC_XOPEN_LEGACY 0x0024
+#define _SC_ATEXIT_MAX 0x0025
+#define _SC_IOV_MAX 0x0026
+#define _SC_PAGESIZE 0x0027
+#define _SC_PAGE_SIZE 0x0028
+#define _SC_XOPEN_UNIX 0x0029
+#define _SC_XBS5_ILP32_OFF32 0x002a
+#define _SC_XBS5_ILP32_OFFBIG 0x002b
+#define _SC_XBS5_LP64_OFF64 0x002c
+#define _SC_XBS5_LPBIG_OFFBIG 0x002d
+#define _SC_AIO_LISTIO_MAX 0x002e
+#define _SC_AIO_MAX 0x002f
+#define _SC_AIO_PRIO_DELTA_MAX 0x0030
+#define _SC_DELAYTIMER_MAX 0x0031
+#define _SC_MQ_OPEN_MAX 0x0032
+#define _SC_MQ_PRIO_MAX 0x0033
+#define _SC_RTSIG_MAX 0x0034
+#define _SC_SEM_NSEMS_MAX 0x0035
+#define _SC_SEM_VALUE_MAX 0x0036
+#define _SC_SIGQUEUE_MAX 0x0037
+#define _SC_TIMER_MAX 0x0038
+#define _SC_ASYNCHRONOUS_IO 0x0039
+#define _SC_FSYNC 0x003a
+#define _SC_MAPPED_FILES 0x003b
+#define _SC_MEMLOCK 0x003c
+#define _SC_MEMLOCK_RANGE 0x003d
+#define _SC_MEMORY_PROTECTION 0x003e
+#define _SC_MESSAGE_PASSING 0x003f
+#define _SC_PRIORITIZED_IO 0x0040
+#define _SC_PRIORITY_SCHEDULING 0x0041
+#define _SC_REALTIME_SIGNALS 0x0042
+#define _SC_SEMAPHORES 0x0043
+#define _SC_SHARED_MEMORY_OBJECTS 0x0044
+#define _SC_SYNCHRONIZED_IO 0x0045
+#define _SC_TIMERS 0x0046
+#define _SC_GETGR_R_SIZE_MAX 0x0047
+#define _SC_GETPW_R_SIZE_MAX 0x0048
+#define _SC_LOGIN_NAME_MAX 0x0049
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS 0x004a
+#define _SC_THREAD_KEYS_MAX 0x004b
+#define _SC_THREAD_STACK_MIN 0x004c
+#define _SC_THREAD_THREADS_MAX 0x004d
+#define _SC_TTY_NAME_MAX 0x004e
+
+#define _SC_THREADS 0x004f
+#define _SC_THREAD_ATTR_STACKADDR 0x0050
+#define _SC_THREAD_ATTR_STACKSIZE 0x0051
+#define _SC_THREAD_PRIORITY_SCHEDULING 0x0052
+#define _SC_THREAD_PRIO_INHERIT 0x0053
+#define _SC_THREAD_PRIO_PROTECT 0x0054
+#define _SC_THREAD_SAFE_FUNCTIONS 0x0055
+
+#define _SC_NPROCESSORS_CONF 0x0060
+#define _SC_NPROCESSORS_ONLN 0x0061
+#define _SC_PHYS_PAGES 0x0062
+#define _SC_AVPHYS_PAGES 0x0063
+
+extern int sysconf (int name);
+
+__END_DECLS
+
+#endif /* _SYS_SYSCONF_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/sysinfo.h b/6/platforms/android-3/arch-x86/usr/include/sys/sysinfo.h
new file mode 100644
index 0000000..d5d1c6e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/sysinfo.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSINFO_H_
+#define _SYS_SYSINFO_H_
+
+#include <sys/cdefs.h>
+#include <linux/kernel.h>
+
+__BEGIN_DECLS
+
+#if 0 /* MISSING FROM BIONIC */
+extern int sysinfo (struct sysinfo *info);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _SYS_SYSINFO_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/syslimits.h b/6/platforms/android-3/arch-x86/usr/include/sys/syslimits.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/syslimits.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/sysmacros.h b/6/platforms/android-3/arch-x86/usr/include/sys/sysmacros.h
new file mode 100644
index 0000000..6f053a8
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/sysmacros.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSMACROS_H_
+#define _SYS_SYSMACROS_H_
+
+/* some rogue code includes this file directly :-( */
+#ifndef _SYS_TYPES_H_
+# include <sys/types.h>
+#endif
+
+static __inline__ int major(dev_t _dev)
+{
+ return (_dev >> 8) & 0xfff;
+}
+
+static __inline__ int minor(dev_t _dev)
+{
+ return (_dev & 0xff) | ((_dev >> 12) & 0xfff00);
+}
+
+static __inline__ dev_t makedev(int __ma, int __mi)
+{
+ return ((__ma & 0xfff) << 8) | (__mi & 0xff) | ((__mi & 0xfff00) << 12);
+}
+
+#endif /* _SYS_SYSMACROS_H_ */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/system_properties.h b/6/platforms/android-3/arch-x86/usr/include/sys/system_properties.h
new file mode 100644
index 0000000..4fdc944
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/system_properties.h
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+#define _INCLUDE_SYS_SYSTEM_PROPERTIES_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct prop_info prop_info;
+
+#define PROP_NAME_MAX 32
+#define PROP_VALUE_MAX 92
+
+/* Look up a system property by name, copying its value and a
+** \0 terminator to the provided pointer. The total bytes
+** copied will be no greater than PROP_VALUE_MAX. Returns
+** the string length of the value. A property that is not
+** defined is identical to a property with a length 0 value.
+*/
+int __system_property_get(const char *name, char *value);
+
+/* Return a pointer to the system property named name, if it
+** exists, or NULL if there is no such property. Use
+** __system_property_read() to obtain the string value from
+** the returned prop_info pointer.
+**
+** It is safe to cache the prop_info pointer to avoid future
+** lookups. These returned pointers will remain valid for
+** the lifetime of the system.
+*/
+const prop_info *__system_property_find(const char *name);
+
+/* Read the value of a system property. Returns the length
+** of the value. Copies the value and \0 terminator into
+** the provided value pointer. Total length (including
+** terminator) will be no greater that PROP_VALUE_MAX.
+**
+** If name is nonzero, up to PROP_NAME_MAX bytes will be
+** copied into the provided name pointer. The name will
+** be \0 terminated.
+*/
+int __system_property_read(const prop_info *pi, char *name, char *value);
+
+/* Return a prop_info for the nth system property, or NULL if
+** there is no nth property. Use __system_property_read() to
+** read the value of this property.
+**
+** This method is for inspecting and debugging the property
+** system. Please use __system_property_find() instead.
+**
+** Order of results may change from call to call. This is
+** not a bug.
+*/
+const prop_info *__system_property_find_nth(unsigned n);
+
+__END_DECLS
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/time.h b/6/platforms/android-3/arch-x86/usr/include/sys/time.h
new file mode 100644
index 0000000..1f010d4
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/time.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIME_H_
+#define _SYS_TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/time.h>
+
+__BEGIN_DECLS
+
+extern int gettimeofday(struct timeval *, struct timezone *);
+extern int settimeofday(const struct timeval *, const struct timezone *);
+
+extern int getitimer(int, struct itimerval *);
+extern int setitimer(int, const struct itimerval *, struct itimerval *);
+
+extern int utimes(const char *, const struct timeval *);
+
+#define timerclear(a) \
+ ((a)->tv_sec = (a)->tv_usec = 0)
+
+#define timerisset(a) \
+ ((a)->tv_sec != 0 || (a)->tv_usec != 0)
+
+#define timercmp(a, b, op) \
+ ((a)->tv_sec == (b)->tv_sec \
+ ? (a)->tv_usec op (b)->tv_usec \
+ : (a)->tv_sec op (b)->tv_sec)
+
+#define timeradd(a, b, res) \
+ do { \
+ (res)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
+ (res)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
+ if ((res)->tv_usec >= 1000000) { \
+ (res)->tv_usec -= 1000000; \
+ (res)->tv_sec += 1; \
+ } \
+ } while (0)
+
+#define timersub(a, b, res) \
+ do { \
+ (res)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (res)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((res)->tv_usec < 0) { \
+ (res)->tv_usec += 1000000; \
+ (res)->tv_sec -= 1; \
+ } \
+ } while (0)
+
+__END_DECLS
+
+#endif /* _SYS_TIME_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/timeb.h b/6/platforms/android-3/arch-x86/usr/include/sys/timeb.h
new file mode 100644
index 0000000..f2cc39c
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/timeb.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIMEB_H
+#define _SYS_TIMEB_H
+
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+struct timeb {
+ time_t time;
+ unsigned short millitm;
+ short timezone;
+ short dstflag;
+};
+
+extern int ftime(struct timeb* timebuf);
+
+__END_DECLS
+
+#endif /* _SYS_TIMEB_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/times.h b/6/platforms/android-3/arch-x86/usr/include/sys/times.h
new file mode 100644
index 0000000..1b9b8b2
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/times.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TIMES_H_
+#define _SYS_TIMES_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/times.h>
+
+__BEGIN_DECLS
+
+extern clock_t times(struct tms *);
+
+__END_DECLS
+
+#endif /* _SYS_TIMES_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ttychars.h b/6/platforms/android-3/arch-x86/usr/include/sys/ttychars.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ttychars.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/ttydev.h b/6/platforms/android-3/arch-x86/usr/include/sys/ttydev.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/ttydev.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/types.h b/6/platforms/android-3/arch-x86/usr/include/sys/types.h
new file mode 100644
index 0000000..33fe30e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/types.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_TYPES_H_
+#define _SYS_TYPES_H_
+
+#define __need_size_t
+#define __need_ptrdiff_t
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/cdefs.h>
+
+#include <linux/posix_types.h>
+#include <asm/types.h>
+#include <linux/types.h>
+#include <machine/kernel.h>
+
+typedef __u32 __kernel_dev_t;
+
+/* be careful with __kernel_gid_t and __kernel_uid_t
+ * these are defined as 16-bit for legacy reason, but
+ * the kernel uses 32-bits instead.
+ *
+ * 32-bit valuea are required for Android, so use
+ * __kernel_uid32_t and __kernel_gid32_t
+ */
+
+typedef __kernel_blkcnt_t blkcnt_t;
+typedef __kernel_blksize_t blksize_t;
+typedef __kernel_clock_t clock_t;
+typedef __kernel_clockid_t clockid_t;
+typedef __kernel_dev_t dev_t;
+typedef __kernel_fsblkcnt_t fsblkcnt_t;
+typedef __kernel_fsfilcnt_t fsfilcnt_t;
+typedef __kernel_gid32_t gid_t;
+typedef __kernel_id_t id_t;
+typedef __kernel_ino_t ino_t;
+typedef __kernel_key_t key_t;
+typedef __kernel_mode_t mode_t;
+typedef __kernel_nlink_t nlink_t;
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef __kernel_off_t off_t;
+#endif
+typedef __kernel_loff_t loff_t;
+typedef loff_t off64_t; /* GLibc-specific */
+
+typedef __kernel_pid_t pid_t;
+
+/* while POSIX wants these in <sys/types.h>, we
+ * declare then in <pthread.h> instead */
+#if 0
+typedef .... pthread_attr_t;
+typedef .... pthread_cond_t;
+typedef .... pthread_condattr_t;
+typedef .... pthread_key_t;
+typedef .... pthread_mutex_t;
+typedef .... pthread_once_t;
+typedef .... pthread_rwlock_t;
+typedef .... pthread_rwlock_attr_t;
+typedef .... pthread_t;
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+
+/* size_t is defined by the GCC-specific <stddef.h> */
+#ifndef _SSIZE_T_DEFINED_
+#define _SSIZE_T_DEFINED_
+typedef long int ssize_t;
+#endif
+
+typedef __kernel_suseconds_t suseconds_t;
+typedef __kernel_time_t time_t;
+typedef __kernel_uid32_t uid_t;
+typedef signed long useconds_t;
+
+typedef __kernel_daddr_t daddr_t;
+typedef __kernel_timer_t timer_t;
+typedef __kernel_mqd_t mqd_t;
+
+typedef __kernel_caddr_t caddr_t;
+typedef unsigned int uint_t;
+typedef unsigned int uint;
+
+/* for some applications */
+#include <sys/sysmacros.h>
+
+#ifdef __BSD_VISIBLE
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+typedef uint32_t u_int32_t;
+typedef uint16_t u_int16_t;
+typedef uint8_t u_int8_t;
+typedef uint64_t u_int64_t;
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/uio.h b/6/platforms/android-3/arch-x86/usr/include/sys/uio.h
new file mode 100644
index 0000000..0251716
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/uio.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UIO_H_
+#define _SYS_UIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/uio.h>
+
+__BEGIN_DECLS
+
+int readv(int, const struct iovec *, int);
+int writev(int, const struct iovec *, int);
+
+__END_DECLS
+
+#endif /* _SYS_UIO_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/un.h b/6/platforms/android-3/arch-x86/usr/include/sys/un.h
new file mode 100644
index 0000000..973861f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/un.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UN_H_
+#define _SYS_UN_H_
+
+#include <linux/un.h>
+
+#endif /* _SYS_UN_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/utime.h b/6/platforms/android-3/arch-x86/usr/include/sys/utime.h
new file mode 100644
index 0000000..9f8810e
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/utime.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UTIME_H_
+#define _SYS_UTIME_H_
+
+#include <linux/utime.h>
+
+#endif /* _SYS_UTIME_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/utsname.h b/6/platforms/android-3/arch-x86/usr/include/sys/utsname.h
new file mode 100644
index 0000000..d54a994
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/utsname.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_UTSNAME_H_
+#define _SYS_UTSNAME_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+#define SYS_NMLN 65
+
+struct utsname {
+ char sysname [SYS_NMLN];
+ char nodename [SYS_NMLN];
+ char release [SYS_NMLN];
+ char version [SYS_NMLN];
+ char machine [SYS_NMLN];
+ char domainname[SYS_NMLN];
+};
+
+extern int uname(struct utsname *);
+
+__END_DECLS
+
+#endif /* _SYS_UTSNAME_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/vfs.h b/6/platforms/android-3/arch-x86/usr/include/sys/vfs.h
new file mode 100644
index 0000000..4adaf5f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/vfs.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_VFS_H_
+#define _SYS_VFS_H_
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/* note: this corresponds to the kernel's statfs64 type */
+struct statfs {
+ uint32_t f_type;
+ uint32_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ __kernel_fsid_t f_fsid;
+ uint32_t f_namelen;
+ uint32_t f_frsize;
+ uint32_t f_spare[5];
+};
+
+#define ADFS_SUPER_MAGIC 0xadf5
+#define AFFS_SUPER_MAGIC 0xADFF
+#define BEFS_SUPER_MAGIC 0x42465331
+#define BFS_MAGIC 0x1BADFACE
+#define CIFS_MAGIC_NUMBER 0xFF534D42
+#define CODA_SUPER_MAGIC 0x73757245
+#define COH_SUPER_MAGIC 0x012FF7B7
+#define CRAMFS_MAGIC 0x28cd3d45
+#define DEVFS_SUPER_MAGIC 0x1373
+#define EFS_SUPER_MAGIC 0x00414A53
+#define EXT_SUPER_MAGIC 0x137D
+#define EXT2_OLD_SUPER_MAGIC 0xEF51
+#define EXT2_SUPER_MAGIC 0xEF53
+#define EXT3_SUPER_MAGIC 0xEF53
+#define HFS_SUPER_MAGIC 0x4244
+#define HPFS_SUPER_MAGIC 0xF995E849
+#define HUGETLBFS_MAGIC 0x958458f6
+#define ISOFS_SUPER_MAGIC 0x9660
+#define JFFS2_SUPER_MAGIC 0x72b6
+#define JFS_SUPER_MAGIC 0x3153464a
+#define MINIX_SUPER_MAGIC 0x137F /* orig. minix */
+#define MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */
+#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */
+#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */
+#define MSDOS_SUPER_MAGIC 0x4d44
+#define NCP_SUPER_MAGIC 0x564c
+#define NFS_SUPER_MAGIC 0x6969
+#define NTFS_SB_MAGIC 0x5346544e
+#define OPENPROM_SUPER_MAGIC 0x9fa1
+#define PROC_SUPER_MAGIC 0x9fa0
+#define QNX4_SUPER_MAGIC 0x002f
+#define REISERFS_SUPER_MAGIC 0x52654973
+#define ROMFS_MAGIC 0x7275
+#define SMB_SUPER_MAGIC 0x517B
+#define SYSV2_SUPER_MAGIC 0x012FF7B6
+#define SYSV4_SUPER_MAGIC 0x012FF7B5
+#define TMPFS_MAGIC 0x01021994
+#define UDF_SUPER_MAGIC 0x15013346
+#define UFS_MAGIC 0x00011954
+#define USBDEVICE_SUPER_MAGIC 0x9fa2
+#define VXFS_SUPER_MAGIC 0xa501FCF5
+#define XENIX_SUPER_MAGIC 0x012FF7B4
+#define XFS_SUPER_MAGIC 0x58465342
+#define _XIAFS_SUPER_MAGIC 0x012FD16D
+
+extern int statfs(const char *, struct statfs *);
+extern int fstatfs(int, struct statfs *);
+
+__END_DECLS
+
+#endif /* _SYS_VFS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/vt.h b/6/platforms/android-3/arch-x86/usr/include/sys/vt.h
new file mode 100644
index 0000000..b37a869
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/vt.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <linux/vt.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/sys/wait.h b/6/platforms/android-3/arch-x86/usr/include/sys/wait.h
new file mode 100644
index 0000000..8ba1837
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/sys/wait.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/resource.h>
+#include <linux/wait.h>
+
+__BEGIN_DECLS
+
+#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
+#define WCOREDUMP(s) ((s) & 0x80)
+#define WTERMSIG(s) ((s) & 0x7f)
+#define WSTOPSIG(s) WEXITSTATUS(s)
+
+#define WIFEXITED(s) (WTERMSIG(s) == 0)
+#define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f)
+#define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2)
+
+extern pid_t wait(int *);
+extern pid_t waitpid(pid_t, int *, int);
+extern pid_t wait3(int *, int, struct rusage *);
+extern pid_t wait4(pid_t, int *, int, struct rusage *);
+
+__END_DECLS
+
+#endif /* _SYS_WAIT_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/syslog.h b/6/platforms/android-3/arch-x86/usr/include/syslog.h
new file mode 100644
index 0000000..d35bc79
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/syslog.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYSLOG_H
+#define _SYSLOG_H
+
+#include <stdio.h>
+#include <sys/cdefs.h>
+#include <stdarg.h>
+
+__BEGIN_DECLS
+
+/* Alert levels */
+#define LOG_EMERG 0
+#define LOG_ALERT 1
+#define LOG_CRIT 2
+#define LOG_ERR 3
+#define LOG_WARNING 4
+#define LOG_NOTICE 5
+#define LOG_INFO 6
+#define LOG_DEBUG 7
+
+#define LOG_PRIMASK 7
+#define LOG_PRI(x) ((x) & LOG_PRIMASK)
+
+
+/* Facilities; not actually used */
+#define LOG_KERN 0000
+#define LOG_USER 0010
+#define LOG_MAIL 0020
+#define LOG_DAEMON 0030
+#define LOG_AUTH 0040
+#define LOG_SYSLOG 0050
+#define LOG_LPR 0060
+#define LOG_NEWS 0070
+#define LOG_UUCP 0100
+#define LOG_CRON 0110
+#define LOG_AUTHPRIV 0120
+#define LOG_FTP 0130
+#define LOG_LOCAL0 0200
+#define LOG_LOCAL1 0210
+#define LOG_LOCAL2 0220
+#define LOG_LOCAL3 0230
+#define LOG_LOCAL4 0240
+#define LOG_LOCAL5 0250
+#define LOG_LOCAL6 0260
+#define LOG_LOCAL7 0270
+
+#define LOG_FACMASK 01770
+#define LOG_FAC(x) (((x) >> 3) & (LOG_FACMASK >> 3))
+
+#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
+#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
+
+/* openlog() flags; only LOG_PID and LOG_PERROR supported */
+#define LOG_PID 0x01 /* include pid with message */
+#define LOG_CONS 0x02 /* write to console on logger error */
+#define LOG_ODELAY 0x04 /* delay connection until syslog() */
+#define LOG_NDELAY 0x08 /* open connection immediately */
+#define LOG_NOWAIT 0x10 /* wait for child processes (unused on linux) */
+#define LOG_PERROR 0x20 /* additional logging to stderr */
+
+/* BIONIC: the following definitions are from OpenBSD's sys/syslog.h
+ */
+struct syslog_data {
+ int log_file;
+ int connected;
+ int opened;
+ int log_stat;
+ const char *log_tag;
+ int log_fac;
+ int log_mask;
+};
+
+#define SYSLOG_DATA_INIT {-1, 0, 0, 0, (const char *)0, LOG_USER, 0xff}
+
+#define _PATH_LOG "/dev/kmsg"
+
+extern void closelog(void);
+extern void openlog(const char *, int, int);
+extern int setlogmask(int);
+extern void syslog(int, const char *, ...);
+extern void vsyslog(int, const char *, va_list);
+extern void closelog_r(struct syslog_data *);
+extern void openlog_r(const char *, int, int, struct syslog_data *);
+extern int setlogmask_r(int, struct syslog_data *);
+extern void syslog_r(int, struct syslog_data *, const char *, ...);
+extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
+
+__END_DECLS
+
+#endif /* _SYSLOG_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/termio.h b/6/platforms/android-3/arch-x86/usr/include/termio.h
new file mode 100644
index 0000000..99d3630
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/termio.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* All definitions related to termio are in Linux kernel headers
+ * that are already included by <termios.h>
+ */
+#include <termios.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/termios.h b/6/platforms/android-3/arch-x86/usr/include/termios.h
new file mode 100644
index 0000000..ad19089
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/termios.h
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TERMIOS_H_
+#define _TERMIOS_H_
+
+#include <sys/cdefs.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <stdint.h>
+#include <linux/termios.h>
+
+__BEGIN_DECLS
+
+/* Redefine these to match their ioctl number */
+#undef TCSANOW
+#define TCSANOW TCSETS
+
+#undef TCSADRAIN
+#define TCSADRAIN TCSETSW
+
+#undef TCSAFLUSH
+#define TCSAFLUSH TCSETSF
+
+static __inline__ int tcgetattr(int fd, struct termios *s)
+{
+ return ioctl(fd, TCGETS, s);
+}
+
+static __inline__ int tcsetattr(int fd, int __opt, const struct termios *s)
+{
+ return ioctl(fd, __opt, (void *)s);
+}
+
+static __inline__ int tcflow(int fd, int action)
+{
+ return ioctl(fd, TCXONC, (void *)(intptr_t)action);
+}
+
+static __inline__ int tcflush(int fd, int __queue)
+{
+ return ioctl(fd, TCFLSH, (void *)(intptr_t)__queue);
+}
+
+static __inline__ pid_t tcgetsid(int fd)
+{
+ pid_t _pid;
+ return ioctl(fd, TIOCGSID, &_pid) ? (pid_t)-1 : _pid;
+}
+
+static __inline__ int tcsendbreak(int fd, int __duration)
+{
+ return ioctl(fd, TCSBRKP, (void *)(uintptr_t)__duration);
+}
+
+static __inline__ speed_t cfgetospeed(const struct termios *s)
+{
+ return (speed_t)(s->c_cflag & CBAUD);
+}
+
+static __inline__ int cfsetospeed(struct termios *s, speed_t speed)
+{
+ s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD);
+ return 0;
+}
+
+static __inline__ speed_t cfgetispeed(const struct termios *s)
+{
+ return (speed_t)(s->c_cflag & CBAUD);
+}
+
+static __inline__ int cfsetispeed(struct termios *s, speed_t speed)
+{
+ s->c_cflag = (s->c_cflag & ~CBAUD) | (speed & CBAUD);
+ return 0;
+}
+
+static __inline__ void cfmakeraw(struct termios *s)
+{
+ s->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+ s->c_oflag &= ~OPOST;
+ s->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ s->c_cflag &= ~(CSIZE|PARENB);
+ s->c_cflag |= CS8;
+}
+
+__END_DECLS
+
+#endif /* _TERMIOS_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/thread_db.h b/6/platforms/android-3/arch-x86/usr/include/thread_db.h
new file mode 100644
index 0000000..9c76d40
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/thread_db.h
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ */
+
+#ifndef _LIBTHREAD_DB__THREAD_DB_H
+#define _LIBTHREAD_DB__THREAD_DB_H
+
+#include <pthread.h>
+#include <signal.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+
+#define TD_THR_ANY_USER_FLAGS 0xffffffff
+#define TD_THR_LOWEST_PRIORITY -20
+#define TD_SIGNO_MASK NULL
+
+/* td_err_e values */
+enum {
+ TD_OK,
+ TD_ERR,
+ TD_NOTHR,
+ TD_NOSV,
+ TD_NOLWP,
+ TD_BADPH,
+ TD_BADTH,
+ TD_BADSH,
+ TD_BADTA,
+ TD_BADKEY,
+ TD_NOMSG,
+ TD_NOFPREGS,
+ TD_NOLIBTHREAD,
+ TD_NOEVENT,
+ TD_NOCAPAB,
+ TD_DBERR,
+ TD_NOAPLIC,
+ TD_NOTSD,
+ TD_MALLOC,
+ TD_PARTIALREG,
+ TD_NOXREGS,
+ TD_VERSION
+};
+
+/*
+ * td_event_e values
+ * NOTE: There is a max of 32 events
+ */
+enum {
+ TD_CREATE,
+ TD_DEATH
+};
+
+/* td_thr_state_e values */
+enum {
+ TD_THR_ANY_STATE,
+ TD_THR_UNKNOWN,
+ TD_THR_SLEEP,
+ TD_THR_ZOMBIE
+};
+
+typedef int32_t td_err_e;
+typedef uint32_t td_event_e;
+typedef uint32_t td_notify_e;
+typedef uint32_t td_thr_state_e;
+typedef pthread_t thread_t;
+
+typedef struct
+{
+ pid_t pid;
+} td_thragent_t;
+
+typedef struct
+{
+ pid_t pid;
+ pid_t tid;
+} td_thrhandle_t;
+
+typedef struct
+{
+ td_event_e event;
+ td_thrhandle_t const * th_p;
+ union {
+ void * data;
+ } msg;
+} td_event_msg_t;
+
+typedef struct
+{
+ uint32_t events;
+} td_thr_events_t;
+
+typedef struct
+{
+ union {
+ void * bptaddr;
+ } u;
+} td_notify_t;
+
+typedef struct
+{
+ td_thr_state_e ti_state;
+ thread_t ti_tid; // pthread's id for the thread
+ int32_t ti_lid; // the kernel's id for the thread
+} td_thrinfo_t;
+
+
+#define td_event_emptyset(set) \
+ (set)->events = 0
+
+#define td_event_fillset(set) \
+ (set)->events = 0xffffffff
+
+#define td_event_addset(set, n) \
+ (set)->events |= (1 << n)
+
+
+typedef int td_thr_iter_f(td_thrhandle_t const *, void *);
+
+
+struct ps_prochandle;
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+extern td_err_e td_ta_new(struct ps_prochandle const * proc_handle, td_thragent_t ** thread_agent);
+
+extern td_err_e td_ta_set_event(td_thragent_t const * agent, td_thr_events_t * event);
+
+extern td_err_e td_ta_event_addr(td_thragent_t const * agent, td_event_e event, td_notify_t * notify);
+
+extern td_err_e td_ta_event_getmsg(td_thragent_t const * agent, td_event_msg_t * event);
+
+extern td_err_e td_ta_thr_iter(td_thragent_t const * agent, td_thr_iter_f * func, void * cookie,
+ td_thr_state_e state, int32_t prio, sigset_t * sigmask, uint32_t user_flags);
+
+extern char const ** td_symbol_list(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-3/arch-x86/usr/include/time.h b/6/platforms/android-3/arch-x86/usr/include/time.h
new file mode 100644
index 0000000..b5227d7
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/time.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TIME_H_
+#define _TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+extern time_t time(time_t *);
+extern int nanosleep(const struct timespec *, struct timespec *);
+
+extern char *strtotimeval(const char *str, struct timeval *tv);
+
+struct tm {
+ int tm_sec; /* seconds */
+ int tm_min; /* minutes */
+ int tm_hour; /* hours */
+ int tm_mday; /* day of the month */
+ int tm_mon; /* month */
+ int tm_year; /* year */
+ int tm_wday; /* day of the week */
+ int tm_yday; /* day in the year */
+ int tm_isdst; /* daylight saving time */
+
+ long int tm_gmtoff; /* Seconds east of UTC. */
+ const char *tm_zone; /* Timezone abbreviation. */
+
+};
+
+/* defining TM_ZONE indicates that we have a "timezone abbreviation" field in
+ * struct tm, the value should be the field name
+ */
+#define TM_ZONE tm_zone
+
+extern char* asctime(const struct tm* a);
+extern char* asctime_r(const struct tm* a, char* buf);
+
+/* Return the difference between TIME1 and TIME0. */
+extern double difftime (time_t __time1, time_t __time0);
+extern time_t mktime (struct tm *a);
+
+extern struct tm* localtime(const time_t *t);
+extern struct tm* localtime_r(const time_t *timep, struct tm *result);
+
+extern struct tm* gmtime(const time_t *timep);
+extern struct tm* gmtime_r(const time_t *timep, struct tm *result);
+
+extern char* strptime(const char *buf, const char *fmt, struct tm *tm);
+extern size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
+
+extern char *ctime(const time_t *timep);
+extern char *ctime_r(const time_t *timep, char *buf);
+
+extern void tzset(void);
+
+/* global includes */
+extern char* tzname[];
+#if 0 /* MISSING FROM BIONIC */
+extern int daylight;
+extern long int timezone;
+#endif /* MISSING */
+
+#define CLOCKS_PER_SEC 1000000
+
+extern clock_t clock(void);
+
+/* BIONIC: extra linux clock goodies */
+extern int clock_getres(int, struct timespec *);
+extern int clock_gettime(int, struct timespec *);
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+#define CLOCK_REALTIME_HR 4
+#define CLOCK_MONOTONIC_HR 5
+
+extern int timer_create(int, struct sigevent*, timer_t*);
+extern int timer_delete(timer_t);
+extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue);
+extern int timer_gettime(timer_t timerid, struct itimerspec *value);
+extern int timer_getoverrun(timer_t timerid);
+
+__END_DECLS
+
+#endif /* _TIME_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/time64.h b/6/platforms/android-3/arch-x86/usr/include/time64.h
new file mode 100644
index 0000000..7ec05af
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/time64.h
@@ -0,0 +1,59 @@
+/*
+
+Copyright (c) 2007-2008 Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+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
+AUTHORS OR COPYRIGHT HOLDERS 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.
+
+Origin: http://code.google.com/p/y2038
+Modified for Bionic by the Android Open Source Project
+
+*/
+#ifndef TIME64_H
+#define TIME64_H
+
+#include <sys/cdefs.h>
+#include <time.h>
+#include <stdint.h>
+
+__BEGIN_DECLS
+
+typedef int64_t time64_t;
+
+struct tm *gmtime64_r (const time64_t *, struct tm *);
+struct tm *localtime64_r (const time64_t *, struct tm *);
+struct tm *gmtime64 (const time64_t *);
+struct tm *localtime64 (const time64_t *);
+
+char *asctime64 (const struct tm *);
+char *asctime64_r (const struct tm *, char *);
+
+char *ctime64 (const time64_t*);
+char *ctime64_r (const time64_t*, char*);
+
+time64_t timegm64 (const struct tm *);
+time64_t mktime64 (const struct tm *);
+time64_t timelocal64 (const struct tm *);
+
+__END_DECLS
+
+#endif /* TIME64_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/unistd.h b/6/platforms/android-3/arch-x86/usr/include/unistd.h
new file mode 100644
index 0000000..25fc334
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/unistd.h
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern void usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int fdatasync(int);
+extern int getlogin_r(char* name, size_t namesize);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+extern int ttyname_r(int, char*, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/util.h b/6/platforms/android-3/arch-x86/usr/include/util.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/util.h
diff --git a/6/platforms/android-3/arch-x86/usr/include/utime.h b/6/platforms/android-3/arch-x86/usr/include/utime.h
new file mode 100644
index 0000000..fa7cd2f
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/utime.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UTIME_H_
+#define _UTIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/utime.h>
+
+__BEGIN_DECLS
+
+extern int utime(const char *, const struct utimbuf *);
+
+__END_DECLS
+
+#endif /* _UTIME_H_ */
+
diff --git a/6/platforms/android-3/arch-x86/usr/include/utmp.h b/6/platforms/android-3/arch-x86/usr/include/utmp.h
new file mode 100644
index 0000000..ffd3c92
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/utmp.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UTMP_H_
+#define _UTMP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <time.h>
+
+#define _PATH_UTMP "/var/run/utmp"
+#define _PATH_WTMP "/var/log/wtmp"
+#define _PATH_LASTLOG "/var/log/lastlog"
+
+#define UT_NAMESIZE 8
+#define UT_LINESIZE 8
+#define UT_HOSTSIZE 16
+
+#define USER_PROCESS 7
+
+struct lastlog
+{
+ time_t ll_time;
+ char ll_line[UT_LINESIZE];
+ char ll_host[UT_HOSTSIZE];
+};
+
+struct exit_status
+{
+ short int e_termination;
+ short int e_exit;
+};
+
+
+struct utmp
+{
+ short int ut_type;
+ pid_t ut_pid;
+ char ut_line[UT_LINESIZE];
+ char ut_id[4];
+ char ut_user[UT_NAMESIZE];
+ char ut_host[UT_HOSTSIZE];
+
+ struct exit_status ut_exit;
+
+ long int ut_session;
+ struct timeval ut_tv;
+
+ int32_t ut_addr_v6[4];
+ char unsed[20];
+};
+
+
+#define ut_name ut_user
+#define ut_time ut_tv.tv_sec
+#define ut_addr ut_addr_v6[0]
+
+__BEGIN_DECLS
+
+int utmpname(const char*);
+void setutent();
+struct utmp* getutent();
+
+__END_DECLS
+
+#endif /* _UTMP_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/wchar.h b/6/platforms/android-3/arch-x86/usr/include/wchar.h
new file mode 100644
index 0000000..e2feb60
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/wchar.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX 255
+#define WCHAR_MIN 0
+#define WEOF (-1)
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-3/arch-x86/usr/include/wctype.h b/6/platforms/android-3/arch-x86/usr/include/wctype.h
new file mode 100644
index 0000000..b5f18a0
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/wctype.h
@@ -0,0 +1 @@
+#include <wchar.h>
diff --git a/6/platforms/android-3/arch-x86/usr/include/zconf.h b/6/platforms/android-3/arch-x86/usr/include/zconf.h
new file mode 100644
index 0000000..03a9431
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/zconf.h
@@ -0,0 +1,332 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ */
+#ifdef Z_PREFIX
+# define deflateInit_ z_deflateInit_
+# define deflate z_deflate
+# define deflateEnd z_deflateEnd
+# define inflateInit_ z_inflateInit_
+# define inflate z_inflate
+# define inflateEnd z_inflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateCopy z_deflateCopy
+# define deflateReset z_deflateReset
+# define deflateParams z_deflateParams
+# define deflateBound z_deflateBound
+# define deflatePrime z_deflatePrime
+# define inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateCopy z_inflateCopy
+# define inflateReset z_inflateReset
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+# define zError z_zError
+
+# define alloc_func z_alloc_func
+# define free_func z_free_func
+# define in_func z_in_func
+# define out_func z_out_func
+# define Byte z_Byte
+# define uInt z_uInt
+# define uLong z_uLong
+# define Bytef z_Bytef
+# define charf z_charf
+# define intf z_intf
+# define uIntf z_uIntf
+# define uLongf z_uLongf
+# define voidpf z_voidpf
+# define voidp z_voidp
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+# ifdef FAR
+# undef FAR
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/6/platforms/android-3/arch-x86/usr/include/zlib.h b/6/platforms/android-3/arch-x86/usr/include/zlib.h
new file mode 100644
index 0000000..0228179
--- /dev/null
+++ b/6/platforms/android-3/arch-x86/usr/include/zlib.h
@@ -0,0 +1,1357 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has
+ dropped to zero. It must update next_out and avail_out when avail_out
+ has dropped to zero. The application must initialize zalloc, zfree and
+ opaque before calling the init function. All other fields are set by the
+ compression library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this
+ if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
+ pointers returned by zalloc for objects of exactly 65536 bytes *must*
+ have their offset normalized to zero. The default allocation function
+ provided by this library ensures this (see zutil.c). To reduce memory
+ requirements and avoid any allocation of 64K objects, at the expense of
+ compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or
+ progress reports. After compression, total_in holds the total size of
+ the uncompressed data and may be saved for use in the decompressor
+ (particularly if the decompressor wants to decompress everything in
+ a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+ This check is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller.
+ If zalloc and zfree are set to Z_NULL, deflateInit updates them to
+ use default allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at
+ all (the input data is simply copied a block at a time).
+ Z_DEFAULT_COMPRESSION requests a default compromise between speed and
+ compression (currently equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION).
+ msg is set to null if there is no error message. deflateInit does not
+ perform any compression: this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+ output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications).
+ Some output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating avail_in or avail_out accordingly; avail_out
+ should never be zero before the call. The application can consume the
+ compressed output when it wants, for example when the output buffer is full
+ (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
+ and with zero avail_out, it must be called again after making room in the
+ output buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumualte before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In particular
+ avail_in is zero after the call if enough output space has been provided
+ before the call.) Flushing may degrade compression for some compression
+ algorithms and so it should be used only when necessary.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there
+ was enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the
+ stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least
+ the value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect
+ the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case,
+ msg may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
+ value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller. msg is set to null if there is no error
+ message. inflateInit does not perform any decompression apart from reading
+ the zlib header if present: this will be done by inflate(). (So next_in and
+ avail_in may be modified, but next_out and avail_out are unchanged.)
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing
+ will resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there
+ is no more input data or no more space in the output buffer (see below
+ about the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating the next_* and avail_* values accordingly.
+ The application can consume the uncompressed output when it wants, for
+ example when the output buffer is full (avail_out == 0), or after each
+ call of inflate(). If inflate returns Z_OK and with zero avail_out, it
+ must be called again after making room in the output buffer because there
+ might be more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
+ Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate() stop
+ if and when it gets to the next deflate block boundary. When decoding the
+ zlib or gzip format, this will cause inflate() to return immediately after
+ the header and before the first block. When doing a raw inflate, inflate()
+ will go ahead and process the first block, and will return when it gets to
+ the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64
+ if inflate() is currently decoding the last block in the deflate stream,
+ plus 128 if inflate() returned immediately after decoding an end-of-block
+ code or decoding the complete header up to just before the first byte of the
+ deflate stream. The end-of-block will not be indicated until all of the
+ uncompressed data from that block has been written to strm->next_out. The
+ number of unused bits may in general be greater than seven, except when
+ bit 7 of data_type is set, in which case the number of unused bits will be
+ less than eight.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step
+ (a single call of inflate), the parameter flush should be set to
+ Z_FINISH. In this case all pending input is processed and all pending
+ output is flushed; avail_out must be large enough to hold all the
+ uncompressed data. (The size of the uncompressed data may have been saved
+ by the compressor for this purpose.) The next operation on this stream must
+ be inflateEnd to deallocate the decompression state. The use of Z_FINISH
+ is never required, but can be used to inform inflate that a faster approach
+ may be used for the single inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() will decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically. Any information
+ contained in the gzip header is not retained, so applications that need that
+ information should instead use raw inflate, see inflateInit2() below, or
+ inflateBack() and perform their own processing of the gzip header and
+ trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may then
+ call inflateSync() to look for a good compression block if a partial recovery
+ of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by
+ the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero),
+ no header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but
+ is slow and reduces compression ratio; memLevel=9 uses maximum memory
+ for optimal speed. The default value is 8. See zconf.h for total memory
+ usage as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
+ Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
+ parameter only affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately. Z_FIXED prevents the
+ use of dynamic Huffman codes, allowing for a simpler decoder for special
+ applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
+ method). msg is set to null if there is no error message. deflateInit2 does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any
+ call of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size in
+ deflate or deflate2. Thus the strings most likely to be useful should be
+ put at the end of the dictionary, not at the front. In addition, the
+ current implementation of deflate will use at most the window size minus
+ 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and
+ can consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+ The stream will keep the same compression level and any other attributes
+ that may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different
+ strategy. If the compression level is changed, the input available so far
+ is compressed with the old level (and may be flushed); the new level will
+ take effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to
+ be compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
+ if strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit()
+ or deflateInit2(). This would be used to allocate an output buffer
+ for deflation in a single pass, and so would be called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the
+ bits leftover from a previous deflate stream when appending to it. As such,
+ this function can only be used for raw deflate, and must be used before the
+ first deflate() call after a deflateInit2() or deflateReset(). bits must be
+ less than or equal to 16, and that many of the least significant bits of
+ value will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
+ a crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
+ is set to null if there is no error message. inflateInit2 does not perform
+ any decompression apart from reading the zlib header if present: this will
+ be done by inflate(). (So next_in and avail_in may be modified, but next_out
+ and avail_out are unchanged.)
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been found,
+ or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
+ case, the application may save the current current value of total_in which
+ indicates where valid compressed data was found. In the error case, the
+ application may repeatedly call inflateSync, providing more input each time,
+ until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+ The stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK can be used to
+ force inflate() to return immediately after header processing is complete
+ and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When
+ any of extra, name, or comment are not Z_NULL and the respective field is
+ not present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not
+ be allocated, or Z_VERSION_ERROR if the version of the library does not
+ match the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free
+ the allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects
+ only the raw deflate stream to decompress. This is different from the
+ normal behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format
+ error in the deflate stream (in which case strm->msg is set to indicate the
+ nature of the error), or Z_STREAM_ERROR if the stream was not properly
+ initialized. In the case of Z_BUF_ERROR, an input or output error can be
+ distinguished using strm->next_in which will be Z_NULL only if in() returned
+ an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
+ out() returning non-zero. (in() will always be called before out(), so
+ strm->next_in is assured to be defined if out() returns non-zero.) Note
+ that inflateBack() cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the
+ basic stream-oriented functions. To simplify the interface, some
+ default options are assumed (compression level and memory usage,
+ standard memory allocation functions). The source code of these
+ utility functions can easily be modified if you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be at least the value returned
+ by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+ This function can be used to compress a whole file at once if the
+ input file is mmap'ed.
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before
+ a compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be large enough to hold the
+ entire uncompressed data. (The size of the uncompressed data must have
+ been saved previously by the compressor and transmitted to the decompressor
+ by some mechanism outside the scope of this compression library.)
+ Upon exit, destLen is the actual size of the compressed buffer.
+ This function can be used to decompress a whole file at once if the
+ input file is mmap'ed.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+typedef voidp gzFile;
+
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+/*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+ ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
+ Huffman only compression as in "wb1h", or 'R' for run-length encoding
+ as in "wb1R". (See the description of deflateInit2 for more information
+ about the strategy parameter.)
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+ fileno (in the file has been previously opened with fopen).
+ The mode parameter is as in gzopen.
+ The next call of gzclose on the returned gzFile will also close the
+ file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
+ descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
+ gzdopen returns NULL if there was insufficient memory to allocate
+ the (de)compression state.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+ (0 in case of error).
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written (0 in case of error). The number of
+ uncompressed bytes written is limited to 4095. The caller should assure that
+ this limit is not exceeded. If it is exceeded, then gzprintf() will return
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. The string is then terminated with a null
+ character.
+ gzgets returns buf, or Z_NULL in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read again later.
+ Only one character of push-back is allowed. gzungetc() returns the
+ character pushed, or -1 on failure. gzungetc() will fail if a
+ character has been pushed but not read yet, or if c is -1. The pushed
+ character will be discarded if the stream is repositioned with gzseek()
+ or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+ error number (see function gzerror below). gzflush returns Z_OK if
+ the flush parameter is Z_FINISH and all output could be flushed.
+ gzflush should be called only when strictly necessary because it can
+ degrade compression.
+*/
+
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+/*
+ Sets the starting position for the next gzread or gzwrite on the
+ given compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+/*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns 1 if file is being read directly without decompression, otherwise
+ zero.
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+ error occurred in the file system and not in the compression library,
+ errnum is set to Z_ERRNO and the application may consult errno
+ to get the exact error code.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the
+ compression library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+/*
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+ value for the for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+/*
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/6/platforms/android-4/arch-arm/usr/include/GLES/gl.h b/6/platforms/android-4/arch-arm/usr/include/GLES/gl.h
new file mode 100644
index 0000000..2e8b971
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/GLES/gl.h
@@ -0,0 +1,769 @@
+#ifndef __gl_h_
+#define __gl_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+#include <GLES/glplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef khronos_int8_t GLbyte;
+typedef short GLshort;
+typedef int GLint;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned int GLuint;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef khronos_int32_t GLclampx;
+
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
+
+
+/*************************************************************/
+
+/* OpenGL ES core versions */
+#define GL_VERSION_ES_CM_1_0 1
+#define GL_VERSION_ES_CL_1_0 1
+#define GL_VERSION_ES_CM_1_1 1
+#define GL_VERSION_ES_CL_1_1 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+
+/* Boolean */
+#define GL_FALSE 0
+#define GL_TRUE 1
+
+/* BeginMode */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+
+/* AlphaFunction */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+
+/* BlendingFactorDest */
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+
+/* BlendingFactorSrc */
+/* GL_ZERO */
+/* GL_ONE */
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+/* GL_SRC_ALPHA */
+/* GL_ONE_MINUS_SRC_ALPHA */
+/* GL_DST_ALPHA */
+/* GL_ONE_MINUS_DST_ALPHA */
+
+/* ClipPlaneName */
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+
+/* ColorMaterialFace */
+/* GL_FRONT_AND_BACK */
+
+/* ColorMaterialParameter */
+/* GL_AMBIENT_AND_DIFFUSE */
+
+/* ColorPointerType */
+/* GL_UNSIGNED_BYTE */
+/* GL_FLOAT */
+/* GL_FIXED */
+
+/* CullFaceMode */
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_FRONT_AND_BACK 0x0408
+
+/* DepthFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* EnableCap */
+#define GL_FOG 0x0B60
+#define GL_LIGHTING 0x0B50
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_CULL_FACE 0x0B44
+#define GL_ALPHA_TEST 0x0BC0
+#define GL_BLEND 0x0BE2
+#define GL_COLOR_LOGIC_OP 0x0BF2
+#define GL_DITHER 0x0BD0
+#define GL_STENCIL_TEST 0x0B90
+#define GL_DEPTH_TEST 0x0B71
+/* GL_LIGHT0 */
+/* GL_LIGHT1 */
+/* GL_LIGHT2 */
+/* GL_LIGHT3 */
+/* GL_LIGHT4 */
+/* GL_LIGHT5 */
+/* GL_LIGHT6 */
+/* GL_LIGHT7 */
+#define GL_POINT_SMOOTH 0x0B10
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_MATERIAL 0x0B57
+#define GL_NORMALIZE 0x0BA1
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_NORMAL_ARRAY 0x8075
+#define GL_COLOR_ARRAY 0x8076
+#define GL_TEXTURE_COORD_ARRAY 0x8078
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_OUT_OF_MEMORY 0x0505
+
+/* FogMode */
+/* GL_LINEAR */
+#define GL_EXP 0x0800
+#define GL_EXP2 0x0801
+
+/* FogParameter */
+#define GL_FOG_DENSITY 0x0B62
+#define GL_FOG_START 0x0B63
+#define GL_FOG_END 0x0B64
+#define GL_FOG_MODE 0x0B65
+#define GL_FOG_COLOR 0x0B66
+
+/* FrontFaceDirection */
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+
+/* GetPName */
+#define GL_CURRENT_COLOR 0x0B00
+#define GL_CURRENT_NORMAL 0x0B02
+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_LINE_WIDTH 0x0B21
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_SHADE_MODEL 0x0B54
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_MATRIX_MODE 0x0BA0
+#define GL_VIEWPORT 0x0BA2
+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
+#define GL_MODELVIEW_MATRIX 0x0BA6
+#define GL_PROJECTION_MATRIX 0x0BA7
+#define GL_TEXTURE_MATRIX 0x0BA8
+#define GL_ALPHA_TEST_FUNC 0x0BC1
+#define GL_ALPHA_TEST_REF 0x0BC2
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_SRC 0x0BE1
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_LIGHTS 0x0D31
+#define GL_MAX_CLIP_PLANES 0x0D32
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_RED_BITS 0x0D52
+#define GL_GREEN_BITS 0x0D53
+#define GL_BLUE_BITS 0x0D54
+#define GL_ALPHA_BITS 0x0D55
+#define GL_DEPTH_BITS 0x0D56
+#define GL_STENCIL_BITS 0x0D57
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_VERTEX_ARRAY_SIZE 0x807A
+#define GL_VERTEX_ARRAY_TYPE 0x807B
+#define GL_VERTEX_ARRAY_STRIDE 0x807C
+#define GL_NORMAL_ARRAY_TYPE 0x807E
+#define GL_NORMAL_ARRAY_STRIDE 0x807F
+#define GL_COLOR_ARRAY_SIZE 0x8081
+#define GL_COLOR_ARRAY_TYPE 0x8082
+#define GL_COLOR_ARRAY_STRIDE 0x8083
+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define GL_VERTEX_ARRAY_POINTER 0x808E
+#define GL_NORMAL_ARRAY_POINTER 0x808F
+#define GL_COLOR_ARRAY_POINTER 0x8090
+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+
+/* GetTextureParameter */
+/* GL_TEXTURE_MAG_FILTER */
+/* GL_TEXTURE_MIN_FILTER */
+/* GL_TEXTURE_WRAP_S */
+/* GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+
+/* HintTarget */
+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define GL_POINT_SMOOTH_HINT 0x0C51
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_FOG_HINT 0x0C54
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+
+/* LightModelParameter */
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+
+/* LightParameter */
+#define GL_AMBIENT 0x1200
+#define GL_DIFFUSE 0x1201
+#define GL_SPECULAR 0x1202
+#define GL_POSITION 0x1203
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_SPOT_EXPONENT 0x1205
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_CONSTANT_ATTENUATION 0x1207
+#define GL_LINEAR_ATTENUATION 0x1208
+#define GL_QUADRATIC_ATTENUATION 0x1209
+
+/* DataType */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_FLOAT 0x1406
+#define GL_FIXED 0x140C
+
+/* LogicOp */
+#define GL_CLEAR 0x1500
+#define GL_AND 0x1501
+#define GL_AND_REVERSE 0x1502
+#define GL_COPY 0x1503
+#define GL_AND_INVERTED 0x1504
+#define GL_NOOP 0x1505
+#define GL_XOR 0x1506
+#define GL_OR 0x1507
+#define GL_NOR 0x1508
+#define GL_EQUIV 0x1509
+#define GL_INVERT 0x150A
+#define GL_OR_REVERSE 0x150B
+#define GL_COPY_INVERTED 0x150C
+#define GL_OR_INVERTED 0x150D
+#define GL_NAND 0x150E
+#define GL_SET 0x150F
+
+/* MaterialFace */
+/* GL_FRONT_AND_BACK */
+
+/* MaterialParameter */
+#define GL_EMISSION 0x1600
+#define GL_SHININESS 0x1601
+#define GL_AMBIENT_AND_DIFFUSE 0x1602
+/* GL_AMBIENT */
+/* GL_DIFFUSE */
+/* GL_SPECULAR */
+
+/* MatrixMode */
+#define GL_MODELVIEW 0x1700
+#define GL_PROJECTION 0x1701
+#define GL_TEXTURE 0x1702
+
+/* NormalPointerType */
+/* GL_BYTE */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+
+/* PixelFormat */
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+
+/* PixelStoreParameter */
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+
+/* PixelType */
+/* GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+
+/* ShadingModel */
+#define GL_FLAT 0x1D00
+#define GL_SMOOTH 0x1D01
+
+/* StencilFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* StencilOp */
+/* GL_ZERO */
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+/* GL_INVERT */
+
+/* StringName */
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+
+/* TexCoordPointerType */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+/* GL_BYTE */
+
+/* TextureEnvMode */
+#define GL_MODULATE 0x2100
+#define GL_DECAL 0x2101
+/* GL_BLEND */
+#define GL_ADD 0x0104
+/* GL_REPLACE */
+
+/* TextureEnvParameter */
+#define GL_TEXTURE_ENV_MODE 0x2200
+#define GL_TEXTURE_ENV_COLOR 0x2201
+
+/* TextureEnvTarget */
+#define GL_TEXTURE_ENV 0x2300
+
+/* TextureMagFilter */
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+
+/* TextureMinFilter */
+/* GL_NEAREST */
+/* GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_GENERATE_MIPMAP 0x8191
+
+/* TextureTarget */
+/* GL_TEXTURE_2D */
+
+/* TextureUnit */
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+
+/* TextureWrapMode */
+#define GL_REPEAT 0x2901
+#define GL_CLAMP_TO_EDGE 0x812F
+
+/* VertexPointerType */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+/* GL_BYTE */
+
+/* LightName */
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+
+#define GL_STATIC_DRAW 0x88E4
+#define GL_DYNAMIC_DRAW 0x88E8
+
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+
+/* Texture combine + dot3 */
+#define GL_SUBTRACT 0x84E7
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_RGB_SCALE 0x8573
+#define GL_ADD_SIGNED 0x8574
+#define GL_INTERPOLATE 0x8575
+#define GL_CONSTANT 0x8576
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PREVIOUS 0x8578
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND2_ALPHA 0x859A
+
+#define GL_ALPHA_SCALE 0x0D1C
+
+#define GL_SRC0_RGB 0x8580
+#define GL_SRC1_RGB 0x8581
+#define GL_SRC2_RGB 0x8582
+#define GL_SRC0_ALPHA 0x8588
+#define GL_SRC1_ALPHA 0x8589
+#define GL_SRC2_ALPHA 0x858A
+
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+
+/*------------------------------------------------------------------------*
+ * required OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* OES_read_format */
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+/* OES_point_size_array */
+#ifndef GL_OES_point_size_array
+#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
+#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
+#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
+#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
+#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
+#endif
+
+/* GL_OES_point_sprite */
+#ifndef GL_OES_point_sprite
+#define GL_POINT_SPRITE_OES 0x8861
+#define GL_COORD_REPLACE_OES 0x8862
+#endif
+
+/*************************************************************/
+
+/* Available only in Common profile */
+GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
+GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
+GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
+GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLineWidth (GLfloat width);
+GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
+GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
+GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
+GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glPointSize (GLfloat size);
+GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
+
+/* Available in both Common and Common-Lite profiles */
+GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
+GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GL_API void GL_APIENTRY glClear (GLbitfield mask);
+GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
+GL_API void GL_APIENTRY glClearStencil (GLint s);
+GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
+GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
+GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glCullFace (GLenum mode);
+GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GL_API void GL_APIENTRY glDepthFunc (GLenum func);
+GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
+GL_API void GL_APIENTRY glDisable (GLenum cap);
+GL_API void GL_APIENTRY glDisableClientState (GLenum array);
+GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+GL_API void GL_APIENTRY glEnable (GLenum cap);
+GL_API void GL_APIENTRY glEnableClientState (GLenum array);
+GL_API void GL_APIENTRY glFinish (void);
+GL_API void GL_APIENTRY glFlush (void);
+GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glFrontFace (GLenum mode);
+GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
+GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
+GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GL_API GLenum GL_APIENTRY glGetError (void);
+GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
+GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
+GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
+GL_API void GL_APIENTRY glLoadIdentity (void);
+GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
+GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
+GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
+GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
+GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
+GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glPointSizex (GLfixed size);
+GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
+GL_API void GL_APIENTRY glPopMatrix (void);
+GL_API void GL_APIENTRY glPushMatrix (void);
+GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
+GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glShadeModel (GLenum mode);
+GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_API void GL_APIENTRY glStencilMask (GLuint mask);
+GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+/*------------------------------------------------------------------------*
+ * Required OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_read_format */
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_point_size_array */
+#ifndef GL_OES_point_size_array
+#define GL_OES_point_size_array 1
+GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+/* GL_OES_point_sprite */
+#ifndef GL_OES_point_sprite
+#define GL_OES_point_sprite 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl_h_ */
+
diff --git a/6/platforms/android-4/arch-arm/usr/include/GLES/glext.h b/6/platforms/android-4/arch-arm/usr/include/GLES/glext.h
new file mode 100644
index 0000000..a8fe2e9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/GLES/glext.h
@@ -0,0 +1,607 @@
+#ifndef __glext_h_
+#define __glext_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+# define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_blend_equation_separate */
+#ifndef GL_OES_blend_equation_separate
+/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
+#define GL_BLEND_EQUATION_RGB_OES 0x8009
+#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
+#endif
+
+/* GL_OES_blend_func_separate */
+#ifndef GL_OES_blend_func_separate
+#define GL_BLEND_DST_RGB_OES 0x80C8
+#define GL_BLEND_SRC_RGB_OES 0x80C9
+#define GL_BLEND_DST_ALPHA_OES 0x80CA
+#define GL_BLEND_SRC_ALPHA_OES 0x80CB
+#endif
+
+/* GL_OES_blend_subtract */
+#ifndef GL_OES_blend_subtract
+#define GL_BLEND_EQUATION_OES 0x8009
+#define GL_FUNC_ADD_OES 0x8006
+#define GL_FUNC_SUBTRACT_OES 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
+#endif
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES 0x8D64
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES 0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES 0x81A7
+#endif
+
+/* GL_OES_draw_texture */
+#ifndef GL_OES_draw_texture
+#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_fixed_point */
+#ifndef GL_OES_fixed_point
+#define GL_FIXED_OES 0x140C
+#endif
+
+/* GL_OES_framebuffer_object */
+#ifndef GL_OES_framebuffer_object
+#define GL_NONE_OES 0
+#define GL_FRAMEBUFFER_OES 0x8D40
+#define GL_RENDERBUFFER_OES 0x8D41
+#define GL_RGBA4_OES 0x8056
+#define GL_RGB5_A1_OES 0x8057
+#define GL_RGB565_OES 0x8D62
+#define GL_DEPTH_COMPONENT16_OES 0x81A5
+#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
+#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
+#define GL_DEPTH_ATTACHMENT_OES 0x8D00
+#define GL_STENCIL_ATTACHMENT_OES 0x8D20
+#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
+#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
+#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
+#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
+#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES 0x88B9
+#define GL_BUFFER_ACCESS_OES 0x88BB
+#define GL_BUFFER_MAPPED_OES 0x88BC
+#define GL_BUFFER_MAP_POINTER_OES 0x88BD
+#endif
+
+/* GL_OES_matrix_get */
+#ifndef GL_OES_matrix_get
+#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
+#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
+#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
+#endif
+
+/* GL_OES_matrix_palette */
+#ifndef GL_OES_matrix_palette
+#define GL_MAX_VERTEX_UNITS_OES 0x86A4
+#define GL_MAX_PALETTE_MATRICES_OES 0x8842
+#define GL_MATRIX_PALETTE_OES 0x8840
+#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
+#define GL_WEIGHT_ARRAY_OES 0x86AD
+#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
+#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
+#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
+#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
+#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
+#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES 0x84F9
+#define GL_UNSIGNED_INT_24_8_OES 0x84FA
+#define GL_DEPTH24_STENCIL8_OES 0x88F0
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES 0x8051
+#define GL_RGBA8_OES 0x8058
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES 0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES 0x8D47
+#endif
+
+/* GL_OES_stencil8 */
+#ifndef GL_OES_stencil8
+#define GL_STENCIL_INDEX8_OES 0x8D48
+#endif
+
+/* GL_OES_stencil_wrap */
+#ifndef GL_OES_stencil_wrap
+#define GL_INCR_WRAP_OES 0x8507
+#define GL_DECR_WRAP_OES 0x8508
+#endif
+
+/* GL_OES_texture_cube_map */
+#ifndef GL_OES_texture_cube_map
+#define GL_NORMAL_MAP_OES 0x8511
+#define GL_REFLECTION_MAP_OES 0x8512
+#define GL_TEXTURE_CUBE_MAP_OES 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
+#define GL_TEXTURE_GEN_MODE_OES 0x2500
+#define GL_TEXTURE_GEN_STR_OES 0x8D60
+#endif
+
+/* GL_OES_texture_mirrored_repeat */
+#ifndef GL_OES_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_OES 0x8370
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD 0x87F9
+#define GL_3DC_XY_AMD 0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD 0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_blend_equation_separate */
+#ifndef GL_OES_blend_equation_separate
+#define GL_OES_blend_equation_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+/* GL_OES_blend_func_separate */
+#ifndef GL_OES_blend_func_separate
+#define GL_OES_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+/* GL_OES_blend_subtract */
+#ifndef GL_OES_blend_subtract
+#define GL_OES_blend_subtract 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
+#endif
+
+/* GL_OES_byte_coordinates */
+#ifndef GL_OES_byte_coordinates
+#define GL_OES_byte_coordinates 1
+#endif
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_draw_texture */
+#ifndef GL_OES_draw_texture
+#define GL_OES_draw_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
+GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
+GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
+GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
+GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_extended_matrix_palette */
+#ifndef GL_OES_extended_matrix_palette
+#define GL_OES_extended_matrix_palette 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fixed_point */
+#ifndef GL_OES_fixed_point
+#define GL_OES_fixed_point 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref);
+GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth);
+GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
+GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar);
+GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]);
+GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
+GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
+GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
+GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
+GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
+GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
+GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
+GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref);
+typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
+typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar);
+typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]);
+typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
+typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
+typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
+typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
+typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
+typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
+#endif
+
+/* GL_OES_framebuffer_object */
+#ifndef GL_OES_framebuffer_object
+#define GL_OES_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
+GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
+GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers);
+GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers);
+GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params);
+GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
+GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
+GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers);
+GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers);
+GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
+GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
+#endif
+typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
+typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
+typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
+typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+#endif
+
+/* GL_OES_matrix_get */
+#ifndef GL_OES_matrix_get
+#define GL_OES_matrix_get 1
+#endif
+
+/* GL_OES_matrix_palette */
+#ifndef GL_OES_matrix_palette
+#define GL_OES_matrix_palette 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
+GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
+GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
+typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
+typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_query_matrix */
+#ifndef GL_OES_query_matrix
+#define GL_OES_query_matrix 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]);
+#endif
+typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]);
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_single_precision */
+#ifndef GL_OES_single_precision
+#define GL_OES_single_precision 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
+GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
+GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
+GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+/* GL_OES_stencil8 */
+#ifndef GL_OES_stencil8
+#define GL_OES_stencil8 1
+#endif
+
+/* GL_OES_stencil_wrap */
+#ifndef GL_OES_stencil_wrap
+#define GL_OES_stencil_wrap 1
+#endif
+
+/* GL_OES_texture_cube_map */
+#ifndef GL_OES_texture_cube_map
+#define GL_OES_texture_cube_map 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
+#endif
+
+/* GL_OES_texture_env_crossbar */
+#ifndef GL_OES_texture_env_crossbar
+#define GL_OES_texture_env_crossbar 1
+#endif
+
+/* GL_OES_texture_mirrored_repeat */
+#ifndef GL_OES_texture_mirrored_repeat
+#define GL_OES_texture_mirrored_repeat 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glext_h_ */
+
diff --git a/6/platforms/android-4/arch-arm/usr/include/GLES/glplatform.h b/6/platforms/android-4/arch-arm/usr/include/GLES/glplatform.h
new file mode 100644
index 0000000..a38ea4c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/GLES/glplatform.h
@@ -0,0 +1,39 @@
+#ifndef __glplatform_h_
+#define __glplatform_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
+ * Last modified on 2008/12/19
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+#ifndef GL_API
+#define GL_API KHRONOS_APICALL
+#endif
+
+#if defined(__ANDROID__)
+
+#define GL_APIENTRY KHRONOS_APIENTRY
+
+// XXX: this should probably not be here
+#define GL_DIRECT_TEXTURE_2D_QUALCOMM 0x7E80
+
+// XXX: not sure how this is intended to be used
+#define GL_GLEXT_PROTOTYPES
+
+#endif
+
+#endif /* __glplatform_h_ */
diff --git a/6/platforms/android-4/arch-arm/usr/include/KHR/khrplatform.h b/6/platforms/android-4/arch-arm/usr/include/KHR/khrplatform.h
new file mode 100644
index 0000000..75bc551
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/KHR/khrplatform.h
@@ -0,0 +1,243 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions.
+ * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by sending them to the public Khronos Bugzilla
+ * (http://khronos.org/bugzilla) by filing a bug against product
+ * "Khronos (general)" component "Registry".
+ *
+ * A predefined template which fills in some of the bug fields can be
+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
+ * must create a Bugzilla login first.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system.
+ * http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ *
+ * This file should be included as
+ * #include <KHR/khrplatform.h>
+ * by the Khronos API header file that uses its types and defines.
+ *
+ * The types in this file should only be used to define API-specific types.
+ * Types defined in this file:
+ * khronos_int8_t signed 8 bit
+ * khronos_uint8_t unsigned 8 bit
+ * khronos_int16_t signed 16 bit
+ * khronos_uint16_t unsigned 16 bit
+ * khronos_int32_t signed 32 bit
+ * khronos_uint32_t unsigned 32 bit
+ * khronos_int64_t signed 64 bit
+ * khronos_uint64_t unsigned 64 bit
+ * khronos_intptr_t signed same number of bits as a pointer
+ * khronos_uintptr_t unsigned same number of bits as a pointer
+ * khronos_ssize_t signed size
+ * khronos_usize_t unsigned size
+ * khronos_float_t signed 32 bit floating point
+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ * nanoseconds
+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ *
+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ *
+ * Macros defined in this file:
+ * KHRONOS_APICALL
+ * KHRONOS_APIENTRY
+ * KHRONOS_APIATTRIBUTES
+ * These may be used in function prototypes as:
+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ * int arg1,
+ * int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+# define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+# define KHRONOS_APICALL IMPORT_C
+#elif defined(__ANDROID__)
+# define KHRONOS_APICALL __attribute__((visibility("default")))
+#else
+# define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+ /* Win32 but not WinCE */
+# define KHRONOS_APIENTRY __stdcall
+#else
+# define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using <stdint.h>
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using <inttypes.h>
+ */
+#include <inttypes.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32 khronos_int32_t;
+typedef unsigned __int32 khronos_uint32_t;
+typedef __int64 khronos_int64_t;
+typedef unsigned __int64 khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int khronos_int64_t;
+typedef unsigned long int khronos_uint64_t;
+#else
+typedef long long int khronos_int64_t;
+typedef unsigned long long int khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64 0
+#define KHRONOS_SUPPORT_FLOAT 0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed char khronos_int8_t;
+typedef unsigned char khronos_uint8_t;
+typedef signed short int khronos_int16_t;
+typedef unsigned short int khronos_uint16_t;
+typedef signed long int khronos_intptr_t;
+typedef unsigned long int khronos_uintptr_t;
+typedef signed long int khronos_ssize_t;
+typedef unsigned long int khronos_usize_t;
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef float khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted). The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
+typedef khronos_int64_t khronos_stime_nanoseconds_t;
+#endif
+
+
+#endif /* __khrplatform_h_ */
diff --git a/6/platforms/android-4/arch-arm/usr/include/alloca.h b/6/platforms/android-4/arch-arm/usr/include/alloca.h
new file mode 120000
index 0000000..aa35c1c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/android/api-level.h b/6/platforms/android-4/arch-arm/usr/include/android/api-level.h
new file mode 100644
index 0000000..7e085c5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 4
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-4/arch-arm/usr/include/android/log.h b/6/platforms/android-4/arch-arm/usr/include/android/log.h
new file mode 120000
index 0000000..d4d9cf9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/arpa/inet.h b/6/platforms/android-4/arch-arm/usr/include/arpa/inet.h
new file mode 120000
index 0000000..69e9b92
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/arpa/nameser.h b/6/platforms/android-4/arch-arm/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..8468329
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..36bddec
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..dba5aad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..75c1614
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..782d966
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..ec95ef4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/find.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..22a1b4d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..e2860dc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..904872d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/le.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..42503cd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..fa0492d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/bug.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..967cfb5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/cputime.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..b367e52
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..7577a46
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno-base.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..52ef5a9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..6a2cef0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/fcntl.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..ed90c71
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/futex.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..90a4b90
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/ioctl.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..1e46b10
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/ipc.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..971e74b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/local.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..6f70b73
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/memory_model.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..b8bcb5a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/mman.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..168a433
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..b5a5597
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/percpu.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..9e32203
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..71520ba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..0b4ed30
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/poll.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..0cc5afa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/resource.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..0340895
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/sections.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..b39b2b7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..6c8140d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/signal.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..515c235
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/tlb.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..8e0327b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/topology.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..086ae59
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm-generic/xor.h b/6/platforms/android-4/arch-arm/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..90742af
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/a.out.h b/6/platforms/android-4/arch-arm/usr/include/asm/a.out.h
new file mode 120000
index 0000000..2513d8e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/board-perseus2.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/board-perseus2.h
new file mode 120000
index 0000000..c7e5565
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/board-perseus2.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/board-perseus2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/board.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/board.h
new file mode 120000
index 0000000..a953514
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/board.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/board.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/cpu.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/cpu.h
new file mode 120000
index 0000000..a18aefb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/cpu.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/dma.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/dma.h
new file mode 120000
index 0000000..414affe
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/dma.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/dma.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/fpga.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/fpga.h
new file mode 120000
index 0000000..ba7839e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/fpga.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/fpga.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio-switch.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio-switch.h
new file mode 120000
index 0000000..a3104ae
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio-switch.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/gpio-switch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h
new file mode 120000
index 0000000..c0fdfad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/gpio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/hardware.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/hardware.h
new file mode 120000
index 0000000..d5a55b6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/hardware.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/io.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/io.h
new file mode 120000
index 0000000..16508a3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/io.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/io.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/irqs.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/irqs.h
new file mode 120000
index 0000000..be74c52
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/irqs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/irqs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/mcbsp.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mcbsp.h
new file mode 120000
index 0000000..e5207dc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mcbsp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/mcbsp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/memory.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/memory.h
new file mode 120000
index 0000000..48b3015
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/memory.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/memory.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/mtd-xip.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mtd-xip.h
new file mode 120000
index 0000000..bbff98f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/mux.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mux.h
new file mode 120000
index 0000000..403cb93
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/mux.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/mux.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/omap24xx.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/omap24xx.h
new file mode 120000
index 0000000..2516126
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/omap24xx.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/omap24xx.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/serial.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/serial.h
new file mode 120000
index 0000000..0c6120e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/serial.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/serial.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/timex.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/timex.h
new file mode 120000
index 0000000..562ba65
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/timex.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/timex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/arch/vmalloc.h b/6/platforms/android-4/arch-arm/usr/include/asm/arch/vmalloc.h
new file mode 120000
index 0000000..c446db3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/arch/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/asm/arch/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/atomic.h b/6/platforms/android-4/arch-arm/usr/include/asm/atomic.h
new file mode 120000
index 0000000..88277a6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/atomic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/auxvec.h b/6/platforms/android-4/arch-arm/usr/include/asm/auxvec.h
new file mode 120000
index 0000000..e64ba7b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/bitops.h b/6/platforms/android-4/arch-arm/usr/include/asm/bitops.h
new file mode 120000
index 0000000..2447504
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/byteorder.h b/6/platforms/android-4/arch-arm/usr/include/asm/byteorder.h
new file mode 120000
index 0000000..0602c71
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/byteorder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/byteorder.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/cache.h b/6/platforms/android-4/arch-arm/usr/include/asm/cache.h
new file mode 120000
index 0000000..6209b1b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/cache.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/cacheflush.h b/6/platforms/android-4/arch-arm/usr/include/asm/cacheflush.h
new file mode 120000
index 0000000..79876de
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/cacheflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/cacheflush.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/cputime.h b/6/platforms/android-4/arch-arm/usr/include/asm/cputime.h
new file mode 120000
index 0000000..08c6247
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/delay.h b/6/platforms/android-4/arch-arm/usr/include/asm/delay.h
new file mode 120000
index 0000000..716e3b5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/delay.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/div64.h b/6/platforms/android-4/arch-arm/usr/include/asm/div64.h
new file mode 120000
index 0000000..b1a9273
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/div64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/div64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/dma-mapping.h b/6/platforms/android-4/arch-arm/usr/include/asm/dma-mapping.h
new file mode 120000
index 0000000..47aa548
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/dma.h b/6/platforms/android-4/arch-arm/usr/include/asm/dma.h
new file mode 120000
index 0000000..9017302
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/dma.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/dma.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/domain.h b/6/platforms/android-4/arch-arm/usr/include/asm/domain.h
new file mode 120000
index 0000000..c33939f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/domain.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/domain.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/dyntick.h b/6/platforms/android-4/arch-arm/usr/include/asm/dyntick.h
new file mode 120000
index 0000000..685beb4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/dyntick.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/dyntick.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/elf.h b/6/platforms/android-4/arch-arm/usr/include/asm/elf.h
new file mode 120000
index 0000000..02c9745
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/errno.h b/6/platforms/android-4/arch-arm/usr/include/asm/errno.h
new file mode 120000
index 0000000..4ed52cd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/fcntl.h b/6/platforms/android-4/arch-arm/usr/include/asm/fcntl.h
new file mode 120000
index 0000000..ebc134c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/fpstate.h b/6/platforms/android-4/arch-arm/usr/include/asm/fpstate.h
new file mode 120000
index 0000000..4433518
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/fpstate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/fpstate.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/glue.h b/6/platforms/android-4/arch-arm/usr/include/asm/glue.h
new file mode 120000
index 0000000..8df79bc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/glue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/glue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/hardirq.h b/6/platforms/android-4/arch-arm/usr/include/asm/hardirq.h
new file mode 120000
index 0000000..130f6b2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/hardware.h b/6/platforms/android-4/arch-arm/usr/include/asm/hardware.h
new file mode 120000
index 0000000..2114076
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/hardware.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/hw_irq.h b/6/platforms/android-4/arch-arm/usr/include/asm/hw_irq.h
new file mode 120000
index 0000000..15eac89
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/hw_irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/hw_irq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/ide.h b/6/platforms/android-4/arch-arm/usr/include/asm/ide.h
new file mode 120000
index 0000000..ab664f4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/ide.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/ide.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/io.h b/6/platforms/android-4/arch-arm/usr/include/asm/io.h
new file mode 120000
index 0000000..adcd5f8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/io.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/io.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/ioctl.h b/6/platforms/android-4/arch-arm/usr/include/asm/ioctl.h
new file mode 120000
index 0000000..fefbf54
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/ioctls.h b/6/platforms/android-4/arch-arm/usr/include/asm/ioctls.h
new file mode 120000
index 0000000..59b2e94
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/ioctls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/ioctls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/ipcbuf.h b/6/platforms/android-4/arch-arm/usr/include/asm/ipcbuf.h
new file mode 120000
index 0000000..8c6cff3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/ipcbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/ipcbuf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/irq.h b/6/platforms/android-4/arch-arm/usr/include/asm/irq.h
new file mode 120000
index 0000000..bff06d3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/irq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/linkage.h b/6/platforms/android-4/arch-arm/usr/include/asm/linkage.h
new file mode 120000
index 0000000..af66421
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/local.h b/6/platforms/android-4/arch-arm/usr/include/asm/local.h
new file mode 120000
index 0000000..981b318
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/local.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/locks.h b/6/platforms/android-4/arch-arm/usr/include/asm/locks.h
new file mode 120000
index 0000000..e881416
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/locks.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/mc146818rtc.h b/6/platforms/android-4/arch-arm/usr/include/asm/mc146818rtc.h
new file mode 120000
index 0000000..ecd60ae
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/memory.h b/6/platforms/android-4/arch-arm/usr/include/asm/memory.h
new file mode 120000
index 0000000..ec743d3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/memory.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/memory.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/mman.h b/6/platforms/android-4/arch-arm/usr/include/asm/mman.h
new file mode 120000
index 0000000..457801e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/mman.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/module.h b/6/platforms/android-4/arch-arm/usr/include/asm/module.h
new file mode 120000
index 0000000..df2283c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/module.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/msgbuf.h b/6/platforms/android-4/arch-arm/usr/include/asm/msgbuf.h
new file mode 120000
index 0000000..35cf0fb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/msgbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/msgbuf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/mtd-xip.h b/6/platforms/android-4/arch-arm/usr/include/asm/mtd-xip.h
new file mode 120000
index 0000000..f399994
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/page.h b/6/platforms/android-4/arch-arm/usr/include/asm/page.h
new file mode 120000
index 0000000..cbd5e5d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/page.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/page.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/param.h b/6/platforms/android-4/arch-arm/usr/include/asm/param.h
new file mode 120000
index 0000000..55ef73a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/param.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/percpu.h b/6/platforms/android-4/arch-arm/usr/include/asm/percpu.h
new file mode 120000
index 0000000..9258089
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/pgalloc.h b/6/platforms/android-4/arch-arm/usr/include/asm/pgalloc.h
new file mode 120000
index 0000000..6ea3a30
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/pgalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/pgalloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/pgtable-hwdef.h b/6/platforms/android-4/arch-arm/usr/include/asm/pgtable-hwdef.h
new file mode 120000
index 0000000..58fc1ba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/pgtable-hwdef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/pgtable-hwdef.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/pgtable.h b/6/platforms/android-4/arch-arm/usr/include/asm/pgtable.h
new file mode 120000
index 0000000..1653060
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/poll.h b/6/platforms/android-4/arch-arm/usr/include/asm/poll.h
new file mode 120000
index 0000000..395f2a1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/posix_types.h b/6/platforms/android-4/arch-arm/usr/include/asm/posix_types.h
new file mode 120000
index 0000000..d8a4fbf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/proc-fns.h b/6/platforms/android-4/arch-arm/usr/include/asm/proc-fns.h
new file mode 120000
index 0000000..6ce8818
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/proc-fns.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/proc-fns.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/processor.h b/6/platforms/android-4/arch-arm/usr/include/asm/processor.h
new file mode 120000
index 0000000..ce8870c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/processor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/processor.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/procinfo.h b/6/platforms/android-4/arch-arm/usr/include/asm/procinfo.h
new file mode 120000
index 0000000..989738c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/procinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/procinfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/ptrace.h b/6/platforms/android-4/arch-arm/usr/include/asm/ptrace.h
new file mode 120000
index 0000000..85418ce
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/resource.h b/6/platforms/android-4/arch-arm/usr/include/asm/resource.h
new file mode 120000
index 0000000..622c60a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/scatterlist.h b/6/platforms/android-4/arch-arm/usr/include/asm/scatterlist.h
new file mode 120000
index 0000000..d13002d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/scatterlist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/scatterlist.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/semaphore.h b/6/platforms/android-4/arch-arm/usr/include/asm/semaphore.h
new file mode 120000
index 0000000..9ffa115
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/semaphore.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/sembuf.h b/6/platforms/android-4/arch-arm/usr/include/asm/sembuf.h
new file mode 120000
index 0000000..c162ecd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/sembuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/sembuf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/shmbuf.h b/6/platforms/android-4/arch-arm/usr/include/asm/shmbuf.h
new file mode 120000
index 0000000..1a2c9f0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/shmbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/shmbuf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/shmparam.h b/6/platforms/android-4/arch-arm/usr/include/asm/shmparam.h
new file mode 120000
index 0000000..8874999
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/shmparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/shmparam.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/sigcontext.h b/6/platforms/android-4/arch-arm/usr/include/asm/sigcontext.h
new file mode 120000
index 0000000..b5206e5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/sigcontext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/sigcontext.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/siginfo.h b/6/platforms/android-4/arch-arm/usr/include/asm/siginfo.h
new file mode 120000
index 0000000..c3f4026
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/signal.h b/6/platforms/android-4/arch-arm/usr/include/asm/signal.h
new file mode 120000
index 0000000..c9eaa4f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/sizes.h b/6/platforms/android-4/arch-arm/usr/include/asm/sizes.h
new file mode 120000
index 0000000..9463365
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/sizes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/sizes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/smp.h b/6/platforms/android-4/arch-arm/usr/include/asm/smp.h
new file mode 120000
index 0000000..2452643
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/smp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/socket.h b/6/platforms/android-4/arch-arm/usr/include/asm/socket.h
new file mode 120000
index 0000000..7da3b4a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/socket.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/sockios.h b/6/platforms/android-4/arch-arm/usr/include/asm/sockios.h
new file mode 120000
index 0000000..a5907c3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/spinlock.h b/6/platforms/android-4/arch-arm/usr/include/asm/spinlock.h
new file mode 120000
index 0000000..7f4890a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/spinlock_types.h b/6/platforms/android-4/arch-arm/usr/include/asm/spinlock_types.h
new file mode 120000
index 0000000..7a2b124
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/stat.h b/6/platforms/android-4/arch-arm/usr/include/asm/stat.h
new file mode 120000
index 0000000..6827279
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/statfs.h b/6/platforms/android-4/arch-arm/usr/include/asm/statfs.h
new file mode 120000
index 0000000..70bc2fb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/suspend.h b/6/platforms/android-4/arch-arm/usr/include/asm/suspend.h
new file mode 120000
index 0000000..d9359fc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/suspend.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/suspend.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/system.h b/6/platforms/android-4/arch-arm/usr/include/asm/system.h
new file mode 120000
index 0000000..8b24be3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/system.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/system.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/termbits.h b/6/platforms/android-4/arch-arm/usr/include/asm/termbits.h
new file mode 120000
index 0000000..2f05d35
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/termbits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/termbits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/termios.h b/6/platforms/android-4/arch-arm/usr/include/asm/termios.h
new file mode 120000
index 0000000..09462ef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/termios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/thread_info.h b/6/platforms/android-4/arch-arm/usr/include/asm/thread_info.h
new file mode 120000
index 0000000..98dd557
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/timex.h b/6/platforms/android-4/arch-arm/usr/include/asm/timex.h
new file mode 120000
index 0000000..45ccb36
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/timex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/tlbflush.h b/6/platforms/android-4/arch-arm/usr/include/asm/tlbflush.h
new file mode 120000
index 0000000..92f2bef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/tlbflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/tlbflush.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/topology.h b/6/platforms/android-4/arch-arm/usr/include/asm/topology.h
new file mode 120000
index 0000000..cf43d27
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/topology.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/types.h b/6/platforms/android-4/arch-arm/usr/include/asm/types.h
new file mode 120000
index 0000000..f3ffe25
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/uaccess.h b/6/platforms/android-4/arch-arm/usr/include/asm/uaccess.h
new file mode 120000
index 0000000..354c6ec
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/uaccess.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/uaccess.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/unaligned.h b/6/platforms/android-4/arch-arm/usr/include/asm/unaligned.h
new file mode 120000
index 0000000..c38dbee
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/unaligned.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/unaligned.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/unistd.h b/6/platforms/android-4/arch-arm/usr/include/asm/unistd.h
new file mode 120000
index 0000000..9fca7aa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/user.h b/6/platforms/android-4/arch-arm/usr/include/asm/user.h
new file mode 120000
index 0000000..f61ca32
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/user.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/asm/vga.h b/6/platforms/android-4/arch-arm/usr/include/asm/vga.h
new file mode 120000
index 0000000..cac5a7e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/asm/vga.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/asm/vga.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/assert.h b/6/platforms/android-4/arch-arm/usr/include/assert.h
new file mode 120000
index 0000000..b386939
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/byteswap.h b/6/platforms/android-4/arch-arm/usr/include/byteswap.h
new file mode 120000
index 0000000..b647a72
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/ctype.h b/6/platforms/android-4/arch-arm/usr/include/ctype.h
new file mode 120000
index 0000000..c903d91
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/dirent.h b/6/platforms/android-4/arch-arm/usr/include/dirent.h
new file mode 120000
index 0000000..ac9eb02
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/dlfcn.h b/6/platforms/android-4/arch-arm/usr/include/dlfcn.h
new file mode 120000
index 0000000..2829a30
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/elf.h b/6/platforms/android-4/arch-arm/usr/include/elf.h
new file mode 120000
index 0000000..c03a1eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/endian.h b/6/platforms/android-4/arch-arm/usr/include/endian.h
new file mode 120000
index 0000000..9530567
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/err.h b/6/platforms/android-4/arch-arm/usr/include/err.h
new file mode 120000
index 0000000..a3b693a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/errno.h b/6/platforms/android-4/arch-arm/usr/include/errno.h
new file mode 120000
index 0000000..0d89fa4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/fcntl.h b/6/platforms/android-4/arch-arm/usr/include/fcntl.h
new file mode 120000
index 0000000..88352e1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/features.h b/6/platforms/android-4/arch-arm/usr/include/features.h
new file mode 120000
index 0000000..985e17f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/fenv.h b/6/platforms/android-4/arch-arm/usr/include/fenv.h
new file mode 120000
index 0000000..56536a6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/fenv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/fenv.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/fnmatch.h b/6/platforms/android-4/arch-arm/usr/include/fnmatch.h
new file mode 120000
index 0000000..c4fd37d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/getopt.h b/6/platforms/android-4/arch-arm/usr/include/getopt.h
new file mode 120000
index 0000000..7017b65
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/grp.h b/6/platforms/android-4/arch-arm/usr/include/grp.h
new file mode 120000
index 0000000..d7a18f9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/inttypes.h b/6/platforms/android-4/arch-arm/usr/include/inttypes.h
new file mode 120000
index 0000000..16d4af8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/jni.h b/6/platforms/android-4/arch-arm/usr/include/jni.h
new file mode 120000
index 0000000..5fd6703
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/lastlog.h b/6/platforms/android-4/arch-arm/usr/include/lastlog.h
new file mode 120000
index 0000000..fbe7b14
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/libgen.h b/6/platforms/android-4/arch-arm/usr/include/libgen.h
new file mode 120000
index 0000000..dc1c98e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/limits.h b/6/platforms/android-4/arch-arm/usr/include/limits.h
new file mode 120000
index 0000000..b33b52b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/a.out.h b/6/platforms/android-4/arch-arm/usr/include/linux/a.out.h
new file mode 120000
index 0000000..0729824
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/aio_abi.h b/6/platforms/android-4/arch-arm/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..5ce8559
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/akm8976.h b/6/platforms/android-4/arch-arm/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..620ad1b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/android_alarm.h b/6/platforms/android-4/arch-arm/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..2fd62a7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/android_pmem.h b/6/platforms/android-4/arch-arm/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..826add1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/android_power.h b/6/platforms/android-4/arch-arm/usr/include/linux/android_power.h
new file mode 120000
index 0000000..006d096
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/apm_bios.h b/6/platforms/android-4/arch-arm/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..7fa8ba4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ashmem.h b/6/platforms/android-4/arch-arm/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..96ef092
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ata.h b/6/platforms/android-4/arch-arm/usr/include/linux/ata.h
new file mode 120000
index 0000000..57b1b6f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atm.h b/6/platforms/android-4/arch-arm/usr/include/linux/atm.h
new file mode 120000
index 0000000..8779622
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atmapi.h b/6/platforms/android-4/arch-arm/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..57a64d4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atmdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..4026dfa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atmioc.h b/6/platforms/android-4/arch-arm/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..5b1eaa9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atmppp.h b/6/platforms/android-4/arch-arm/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..592baf7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/atmsap.h b/6/platforms/android-4/arch-arm/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..dce3f34
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/attribute_container.h b/6/platforms/android-4/arch-arm/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..4d47b32
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/auto_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..326e4d2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/autoconf.h b/6/platforms/android-4/arch-arm/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..17a4c72
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/auxvec.h b/6/platforms/android-4/arch-arm/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..726a8a6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/backing-dev.h b/6/platforms/android-4/arch-arm/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..3fc3cce
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/binder.h b/6/platforms/android-4/arch-arm/usr/include/linux/binder.h
new file mode 120000
index 0000000..3c909f2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/binfmts.h b/6/platforms/android-4/arch-arm/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..c6827e7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/bio.h b/6/platforms/android-4/arch-arm/usr/include/linux/bio.h
new file mode 120000
index 0000000..088d9a8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/bitmap.h b/6/platforms/android-4/arch-arm/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..3fe9116
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/bitops.h b/6/platforms/android-4/arch-arm/usr/include/linux/bitops.h
new file mode 120000
index 0000000..cf9459a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/blkdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..026ac54
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/blkpg.h b/6/platforms/android-4/arch-arm/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..8bb997c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/blockgroup_lock.h b/6/platforms/android-4/arch-arm/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..72f1e84
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..fbbe151
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/generic.h b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..0d9109d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..420742a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swab.h b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..b6f8a4a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swabb.h b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..2594730
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/cache.h b/6/platforms/android-4/arch-arm/usr/include/linux/cache.h
new file mode 120000
index 0000000..55917f5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/calc64.h b/6/platforms/android-4/arch-arm/usr/include/linux/calc64.h
new file mode 120000
index 0000000..7abe845
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/capability.h b/6/platforms/android-4/arch-arm/usr/include/linux/capability.h
new file mode 120000
index 0000000..6b69b26
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/capi.h b/6/platforms/android-4/arch-arm/usr/include/linux/capi.h
new file mode 120000
index 0000000..2a67ed1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/cdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/cdev.h
new file mode 120000
index 0000000..f3e9016
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/cdrom.h b/6/platforms/android-4/arch-arm/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..d31116b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/circ_buf.h b/6/platforms/android-4/arch-arm/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..e390979
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/clk.h b/6/platforms/android-4/arch-arm/usr/include/linux/clk.h
new file mode 120000
index 0000000..b5a560b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/coda.h b/6/platforms/android-4/arch-arm/usr/include/linux/coda.h
new file mode 120000
index 0000000..a25df7c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/coda_fs_i.h b/6/platforms/android-4/arch-arm/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..3f436e4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/compat.h b/6/platforms/android-4/arch-arm/usr/include/linux/compat.h
new file mode 120000
index 0000000..4df682b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/compiler-gcc.h b/6/platforms/android-4/arch-arm/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..b6d5d7f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/compiler.h b/6/platforms/android-4/arch-arm/usr/include/linux/compiler.h
new file mode 120000
index 0000000..bc751ba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/completion.h b/6/platforms/android-4/arch-arm/usr/include/linux/completion.h
new file mode 120000
index 0000000..e61ca9a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/config.h b/6/platforms/android-4/arch-arm/usr/include/linux/config.h
new file mode 120000
index 0000000..7179f97
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/console_struct.h b/6/platforms/android-4/arch-arm/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..afa64bc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/cpu.h b/6/platforms/android-4/arch-arm/usr/include/linux/cpu.h
new file mode 120000
index 0000000..8ac0d95
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/cpumask.h b/6/platforms/android-4/arch-arm/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..c9362a8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ctype.h b/6/platforms/android-4/arch-arm/usr/include/linux/ctype.h
new file mode 120000
index 0000000..4fa4a83
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/dccp.h b/6/platforms/android-4/arch-arm/usr/include/linux/dccp.h
new file mode 120000
index 0000000..4c4e080
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/debug_locks.h b/6/platforms/android-4/arch-arm/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..b0fd915
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/delay.h b/6/platforms/android-4/arch-arm/usr/include/linux/delay.h
new file mode 120000
index 0000000..883ade2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/device.h b/6/platforms/android-4/arch-arm/usr/include/linux/device.h
new file mode 120000
index 0000000..87f27af
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/dirent.h b/6/platforms/android-4/arch-arm/usr/include/linux/dirent.h
new file mode 120000
index 0000000..f78cd07
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/dm-ioctl.h b/6/platforms/android-4/arch-arm/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..7e037a9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/dma-mapping.h b/6/platforms/android-4/arch-arm/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..8a44eb0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/dmaengine.h b/6/platforms/android-4/arch-arm/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..ae35ad1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/efs_dir.h b/6/platforms/android-4/arch-arm/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..0009be4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_i.h b/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..5ecd908
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_sb.h b/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..3b00f7a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/elevator.h b/6/platforms/android-4/arch-arm/usr/include/linux/elevator.h
new file mode 120000
index 0000000..f4215c3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/elf-em.h b/6/platforms/android-4/arch-arm/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..df78328
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/elf.h b/6/platforms/android-4/arch-arm/usr/include/linux/elf.h
new file mode 120000
index 0000000..0acb266
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/err.h b/6/platforms/android-4/arch-arm/usr/include/linux/err.h
new file mode 120000
index 0000000..66d0064
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/errno.h b/6/platforms/android-4/arch-arm/usr/include/linux/errno.h
new file mode 120000
index 0000000..ea5e093
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/errqueue.h b/6/platforms/android-4/arch-arm/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..4991add
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/etherdevice.h b/6/platforms/android-4/arch-arm/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..4325b7f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ext2_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..5f0b283
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ext3_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..1b0ac0c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/fadvise.h b/6/platforms/android-4/arch-arm/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..df43a63
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/fb.h b/6/platforms/android-4/arch-arm/usr/include/linux/fb.h
new file mode 120000
index 0000000..b05223d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/fcntl.h b/6/platforms/android-4/arch-arm/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..d9a2bf0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/fd.h b/6/platforms/android-4/arch-arm/usr/include/linux/fd.h
new file mode 120000
index 0000000..02a2dd4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/file.h b/6/platforms/android-4/arch-arm/usr/include/linux/file.h
new file mode 120000
index 0000000..c4135d9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/filter.h b/6/platforms/android-4/arch-arm/usr/include/linux/filter.h
new file mode 120000
index 0000000..322cbef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/fs.h
new file mode 120000
index 0000000..c37dd43
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ftape.h b/6/platforms/android-4/arch-arm/usr/include/linux/ftape.h
new file mode 120000
index 0000000..80a394f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/futex.h b/6/platforms/android-4/arch-arm/usr/include/linux/futex.h
new file mode 120000
index 0000000..b4f8bf4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/genhd.h b/6/platforms/android-4/arch-arm/usr/include/linux/genhd.h
new file mode 120000
index 0000000..376e15c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/gfp.h b/6/platforms/android-4/arch-arm/usr/include/linux/gfp.h
new file mode 120000
index 0000000..5b92fe6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/hardirq.h b/6/platforms/android-4/arch-arm/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..6c3262f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-4/arch-arm/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..c64683b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/hdreg.h b/6/platforms/android-4/arch-arm/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..68be760
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/hdsmart.h b/6/platforms/android-4/arch-arm/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..2581d73
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/highmem.h b/6/platforms/android-4/arch-arm/usr/include/linux/highmem.h
new file mode 120000
index 0000000..51882e0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/hil.h b/6/platforms/android-4/arch-arm/usr/include/linux/hil.h
new file mode 120000
index 0000000..41ece3a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/i2c.h b/6/platforms/android-4/arch-arm/usr/include/linux/i2c.h
new file mode 120000
index 0000000..62805b0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/icmp.h b/6/platforms/android-4/arch-arm/usr/include/linux/icmp.h
new file mode 120000
index 0000000..4a2f5a7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if.h b/6/platforms/android-4/arch-arm/usr/include/linux/if.h
new file mode 120000
index 0000000..1a96985
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_arcnet.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..d624c87
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_arp.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..4e11d00
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_bridge.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..375ba96
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_ether.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..fbb1ddf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_fc.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..a5fac71
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_fddi.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..6e4d6ad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_hippi.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..1f7774a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_packet.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..6c5a993
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_ppp.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..bda16c5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_tr.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..61bacfc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_tun.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..45046a0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/if_vlan.h b/6/platforms/android-4/arch-arm/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..3b1729b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/in.h b/6/platforms/android-4/arch-arm/usr/include/linux/in.h
new file mode 120000
index 0000000..2ed08ac
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/in6.h b/6/platforms/android-4/arch-arm/usr/include/linux/in6.h
new file mode 120000
index 0000000..fdf4733
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/init.h b/6/platforms/android-4/arch-arm/usr/include/linux/init.h
new file mode 120000
index 0000000..5153689
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/inotify.h b/6/platforms/android-4/arch-arm/usr/include/linux/inotify.h
new file mode 120000
index 0000000..b15cb63
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/input.h b/6/platforms/android-4/arch-arm/usr/include/linux/input.h
new file mode 120000
index 0000000..6b721b9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/interrupt.h b/6/platforms/android-4/arch-arm/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..5eabe57
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ioctl.h b/6/platforms/android-4/arch-arm/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..9dfd6b3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ioport.h b/6/platforms/android-4/arch-arm/usr/include/linux/ioport.h
new file mode 120000
index 0000000..3c584f2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ioprio.h b/6/platforms/android-4/arch-arm/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..7067fa5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ip.h b/6/platforms/android-4/arch-arm/usr/include/linux/ip.h
new file mode 120000
index 0000000..2f11fc2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ipc.h b/6/platforms/android-4/arch-arm/usr/include/linux/ipc.h
new file mode 120000
index 0000000..2bbb5bc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..6a9ee2c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_smi.h b/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..5f72e07
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ipx.h b/6/platforms/android-4/arch-arm/usr/include/linux/ipx.h
new file mode 120000
index 0000000..6b92062
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/irq.h b/6/platforms/android-4/arch-arm/usr/include/linux/irq.h
new file mode 120000
index 0000000..3494cb7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/irq_cpustat.h b/6/platforms/android-4/arch-arm/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..ef8337a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/irqflags.h b/6/platforms/android-4/arch-arm/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..83c0c64
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/irqreturn.h b/6/platforms/android-4/arch-arm/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..7227e25
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/jbd.h b/6/platforms/android-4/arch-arm/usr/include/linux/jbd.h
new file mode 120000
index 0000000..2b73589
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/jiffies.h b/6/platforms/android-4/arch-arm/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..01ccdda
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kd.h b/6/platforms/android-4/arch-arm/usr/include/linux/kd.h
new file mode 120000
index 0000000..4819f38
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kdev_t.h b/6/platforms/android-4/arch-arm/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..fa749f3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kernel.h b/6/platforms/android-4/arch-arm/usr/include/linux/kernel.h
new file mode 120000
index 0000000..510b4ac
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kernel_stat.h b/6/platforms/android-4/arch-arm/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..1f3e26a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kernelcapi.h b/6/platforms/android-4/arch-arm/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..3bb9049
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kexec.h b/6/platforms/android-4/arch-arm/usr/include/linux/kexec.h
new file mode 120000
index 0000000..0bc2095
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/key.h b/6/platforms/android-4/arch-arm/usr/include/linux/key.h
new file mode 120000
index 0000000..a5b99fd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/keyboard.h b/6/platforms/android-4/arch-arm/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..d6adf92
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/keychord.h b/6/platforms/android-4/arch-arm/usr/include/linux/keychord.h
new file mode 120000
index 0000000..e291b11
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/klist.h b/6/platforms/android-4/arch-arm/usr/include/linux/klist.h
new file mode 120000
index 0000000..839be84
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kmod.h b/6/platforms/android-4/arch-arm/usr/include/linux/kmod.h
new file mode 120000
index 0000000..880870a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kobject.h b/6/platforms/android-4/arch-arm/usr/include/linux/kobject.h
new file mode 120000
index 0000000..87f0338
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/kref.h b/6/platforms/android-4/arch-arm/usr/include/linux/kref.h
new file mode 120000
index 0000000..24dc3b1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ktime.h b/6/platforms/android-4/arch-arm/usr/include/linux/ktime.h
new file mode 120000
index 0000000..1b31d69
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/limits.h b/6/platforms/android-4/arch-arm/usr/include/linux/limits.h
new file mode 120000
index 0000000..2ebe1eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/linkage.h b/6/platforms/android-4/arch-arm/usr/include/linux/linkage.h
new file mode 120000
index 0000000..399f078
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/list.h b/6/platforms/android-4/arch-arm/usr/include/linux/list.h
new file mode 120000
index 0000000..f7dc484
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/lockd/nlm.h b/6/platforms/android-4/arch-arm/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..73199eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/lockd/xdr.h b/6/platforms/android-4/arch-arm/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..fa6681d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/lockdep.h b/6/platforms/android-4/arch-arm/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..99a4325
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/loop.h b/6/platforms/android-4/arch-arm/usr/include/linux/loop.h
new file mode 120000
index 0000000..1088bdd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/magic.h b/6/platforms/android-4/arch-arm/usr/include/linux/magic.h
new file mode 120000
index 0000000..97ed686
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/major.h b/6/platforms/android-4/arch-arm/usr/include/linux/major.h
new file mode 120000
index 0000000..1306590
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mc146818rtc.h b/6/platforms/android-4/arch-arm/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..0ef045b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mca.h b/6/platforms/android-4/arch-arm/usr/include/linux/mca.h
new file mode 120000
index 0000000..746a9d8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mempolicy.h b/6/platforms/android-4/arch-arm/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..ec14e84
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mempool.h b/6/platforms/android-4/arch-arm/usr/include/linux/mempool.h
new file mode 120000
index 0000000..ae7ca17
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/miscdevice.h b/6/platforms/android-4/arch-arm/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..edd7d68
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mm.h b/6/platforms/android-4/arch-arm/usr/include/linux/mm.h
new file mode 120000
index 0000000..03334b7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mmc/card.h b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..0b40811
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mmc/host.h b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..84ea4ad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mmc/mmc.h b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..4871062
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mmzone.h b/6/platforms/android-4/arch-arm/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..5dd6ee2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mod_devicetable.h b/6/platforms/android-4/arch-arm/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..d53449b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/module.h b/6/platforms/android-4/arch-arm/usr/include/linux/module.h
new file mode 120000
index 0000000..dd242ba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/moduleparam.h b/6/platforms/android-4/arch-arm/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..c5999eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mount.h b/6/platforms/android-4/arch-arm/usr/include/linux/mount.h
new file mode 120000
index 0000000..45785b1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/msdos_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..d4e2b2f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/msg.h b/6/platforms/android-4/arch-arm/usr/include/linux/msg.h
new file mode 120000
index 0000000..f3a869e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/msm_adsp.h b/6/platforms/android-4/arch-arm/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..2c926c4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/msm_audio.h b/6/platforms/android-4/arch-arm/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..75ced72
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/msm_mdp.h b/6/platforms/android-4/arch-arm/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..28d1a07
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mt9t013.h b/6/platforms/android-4/arch-arm/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..cc1954c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/bbm.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..aa9f80a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/blktrans.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..0071b93
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..aa92209
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..bce9a0c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/compatmac.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..9d3b41c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/flashchip.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..42d4442
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/map.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..3f5a5be
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/mtd.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..22b295a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..f0ac8c9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..517b12e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nftl.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..d178588
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..dd6cd4b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtd/partitions.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..33d6731
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mtio.h b/6/platforms/android-4/arch-arm/usr/include/linux/mtio.h
new file mode 120000
index 0000000..18a0b71
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mutex-debug.h b/6/platforms/android-4/arch-arm/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..4ff911a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/mutex.h b/6/platforms/android-4/arch-arm/usr/include/linux/mutex.h
new file mode 120000
index 0000000..cc1078d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ncp.h b/6/platforms/android-4/arch-arm/usr/include/linux/ncp.h
new file mode 120000
index 0000000..05330ce
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ncp_mount.h b/6/platforms/android-4/arch-arm/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..d57e03c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ncp_no.h b/6/platforms/android-4/arch-arm/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..bda5a7f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/net.h b/6/platforms/android-4/arch-arm/usr/include/linux/net.h
new file mode 120000
index 0000000..12983cc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netdevice.h b/6/platforms/android-4/arch-arm/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..a65d77a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..7ce3799
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..b7293d0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..256d831
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..6ccfd8e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..b72dd9d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..b6b9358
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..98d8817
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..df9ec48
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..2d6f820
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..3efbe06
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..5dcf700
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..f6dc8ac
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..51ee6d4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..355da43
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..9de0fa0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..0a51324
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..de42c53
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..90b1cae
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..9194392
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..fbeed4a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..afae0ab
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..a048047
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..f2db028
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..a3b54e7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..c5cad75
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..2da67e8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..abecb96
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..434529d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..d96bd13
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..8d3cf55
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..40ad410
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..733d37e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..b48e6b6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..060f278
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..288be29
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_bridge.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..9e09b5d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..4b464f9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..7c9ceaa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..8068c58
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..a1209b4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..5aebbee
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..7cfb09c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..e41f3ad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..1e24144
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..029f828
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..9256367
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..6d7d54e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..92fc1a0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..fd2bb6b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..b1583b8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..0cb4a42
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..80a9657
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..4b5ef03
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..2980793
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..bfc4808
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..dd9f6fb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..75addae
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..ae6b2db
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..bf1a672
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..d1a0bd0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..4bd73c0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..924827c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..b0dec90
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..7905de7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..a520464
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..248a9f8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..75a8734
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..2d9c683
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..44776e9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..e7fa3e7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..43c7ef0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..b687ad5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..e4fa77d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..6134f9f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..c9bc7ed
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..751984b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..d319782
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..9551818
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..f9d6d98
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..ac82cc7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..7669433
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..268dd03
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..8ee2362
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..636ec0d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..eeb6314
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..e8e6855
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..8dd3fa4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..e86fc87
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/netlink.h b/6/platforms/android-4/arch-arm/usr/include/linux/netlink.h
new file mode 120000
index 0000000..840e300
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfs.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfs.h
new file mode 120000
index 0000000..63ecb9e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfs2.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..cb5100b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfs3.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..61b90ef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfs4.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..6d3f629
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfs_xdr.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..75dafde
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsacl.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..24e440e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/auth.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..dfd673c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/const.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..892e3f6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/debug.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..ab00982
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/export.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..376a60f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/interface.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..e63afc0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..8421970
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/stats.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..f8bd464
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/xdr.h b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..17e8016
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/node.h b/6/platforms/android-4/arch-arm/usr/include/linux/node.h
new file mode 120000
index 0000000..a1d7220
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nodemask.h b/6/platforms/android-4/arch-arm/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..6d0436d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/notifier.h b/6/platforms/android-4/arch-arm/usr/include/linux/notifier.h
new file mode 120000
index 0000000..13882c9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/numa.h b/6/platforms/android-4/arch-arm/usr/include/linux/numa.h
new file mode 120000
index 0000000..eb5edcd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/nvram.h b/6/platforms/android-4/arch-arm/usr/include/linux/nvram.h
new file mode 120000
index 0000000..096fa0b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/omap_csmi.h b/6/platforms/android-4/arch-arm/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..91e53f8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pagemap.h b/6/platforms/android-4/arch-arm/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..804bfb3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/param.h b/6/platforms/android-4/arch-arm/usr/include/linux/param.h
new file mode 120000
index 0000000..b70314d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/patchkey.h b/6/platforms/android-4/arch-arm/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..901bfd3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pci.h b/6/platforms/android-4/arch-arm/usr/include/linux/pci.h
new file mode 120000
index 0000000..285ff4b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pci_ids.h b/6/platforms/android-4/arch-arm/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..fc039d2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pci_regs.h b/6/platforms/android-4/arch-arm/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..8f90ce3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/percpu.h b/6/platforms/android-4/arch-arm/usr/include/linux/percpu.h
new file mode 120000
index 0000000..a6e5f5a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/percpu_counter.h b/6/platforms/android-4/arch-arm/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..186792a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/personality.h b/6/platforms/android-4/arch-arm/usr/include/linux/personality.h
new file mode 120000
index 0000000..c83d6ca
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pfkeyv2.h b/6/platforms/android-4/arch-arm/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..d86d4e6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pkt_cls.h b/6/platforms/android-4/arch-arm/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..26165fc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pkt_sched.h b/6/platforms/android-4/arch-arm/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..905e974
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/platform_device.h b/6/platforms/android-4/arch-arm/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..e609273
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/plist.h b/6/platforms/android-4/arch-arm/usr/include/linux/plist.h
new file mode 120000
index 0000000..2e8d742
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pm.h b/6/platforms/android-4/arch-arm/usr/include/linux/pm.h
new file mode 120000
index 0000000..1195393
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/pnp.h b/6/platforms/android-4/arch-arm/usr/include/linux/pnp.h
new file mode 120000
index 0000000..4782c7f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/poll.h b/6/platforms/android-4/arch-arm/usr/include/linux/poll.h
new file mode 120000
index 0000000..ce75fb7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/posix_acl.h b/6/platforms/android-4/arch-arm/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..c0129c2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/posix_types.h b/6/platforms/android-4/arch-arm/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..8974220
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ppdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..ddae98e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ppp_defs.h b/6/platforms/android-4/arch-arm/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..5988ce0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/prctl.h b/6/platforms/android-4/arch-arm/usr/include/linux/prctl.h
new file mode 120000
index 0000000..bbb9c8d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/preempt.h b/6/platforms/android-4/arch-arm/usr/include/linux/preempt.h
new file mode 120000
index 0000000..38ecfaf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/proc_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..c54955c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ptrace.h b/6/platforms/android-4/arch-arm/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..cbd0ea8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/qic117.h b/6/platforms/android-4/arch-arm/usr/include/linux/qic117.h
new file mode 120000
index 0000000..e1ea96e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/qnxtypes.h b/6/platforms/android-4/arch-arm/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..c08bf02
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/quota.h b/6/platforms/android-4/arch-arm/usr/include/linux/quota.h
new file mode 120000
index 0000000..0d495ec
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/raid/md.h b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..3bc08ea
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_k.h b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..43cd723
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_p.h b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..ae66b52
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_u.h b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..d25ba73
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/raid/xor.h b/6/platforms/android-4/arch-arm/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..9f3f186
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/random.h b/6/platforms/android-4/arch-arm/usr/include/linux/random.h
new file mode 120000
index 0000000..b5b462b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/rbtree.h b/6/platforms/android-4/arch-arm/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..f25f06c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/rcupdate.h b/6/platforms/android-4/arch-arm/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..9525e4a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/reboot.h b/6/platforms/android-4/arch-arm/usr/include/linux/reboot.h
new file mode 120000
index 0000000..82c58ee
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/relay.h b/6/platforms/android-4/arch-arm/usr/include/linux/relay.h
new file mode 120000
index 0000000..9a69cb1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/resource.h b/6/platforms/android-4/arch-arm/usr/include/linux/resource.h
new file mode 120000
index 0000000..779fec0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/route.h b/6/platforms/android-4/arch-arm/usr/include/linux/route.h
new file mode 120000
index 0000000..6ae422f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/rtc.h b/6/platforms/android-4/arch-arm/usr/include/linux/rtc.h
new file mode 120000
index 0000000..d8f57b3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/rtnetlink.h b/6/platforms/android-4/arch-arm/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..b81c69f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/rwsem.h b/6/platforms/android-4/arch-arm/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..cc913ea
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sched.h b/6/platforms/android-4/arch-arm/usr/include/linux/sched.h
new file mode 120000
index 0000000..83c1dc3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sem.h b/6/platforms/android-4/arch-arm/usr/include/linux/sem.h
new file mode 120000
index 0000000..c002848
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/seq_file.h b/6/platforms/android-4/arch-arm/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..8eb333e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/seqlock.h b/6/platforms/android-4/arch-arm/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..16a780c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/serial_core.h b/6/platforms/android-4/arch-arm/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..72eed32
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/serial_reg.h b/6/platforms/android-4/arch-arm/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..8b29572
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/serio.h b/6/platforms/android-4/arch-arm/usr/include/linux/serio.h
new file mode 120000
index 0000000..cfcff92
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/shm.h b/6/platforms/android-4/arch-arm/usr/include/linux/shm.h
new file mode 120000
index 0000000..9752b08
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/signal.h b/6/platforms/android-4/arch-arm/usr/include/linux/signal.h
new file mode 120000
index 0000000..233813f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/skbuff.h b/6/platforms/android-4/arch-arm/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..7264e87
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/slab.h b/6/platforms/android-4/arch-arm/usr/include/linux/slab.h
new file mode 120000
index 0000000..b8eafab
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/smb.h b/6/platforms/android-4/arch-arm/usr/include/linux/smb.h
new file mode 120000
index 0000000..7435880
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/smp.h b/6/platforms/android-4/arch-arm/usr/include/linux/smp.h
new file mode 120000
index 0000000..f057617
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/smp_lock.h b/6/platforms/android-4/arch-arm/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..5f465ad
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/socket.h b/6/platforms/android-4/arch-arm/usr/include/linux/socket.h
new file mode 120000
index 0000000..c1048e0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sockios.h b/6/platforms/android-4/arch-arm/usr/include/linux/sockios.h
new file mode 120000
index 0000000..acd9a26
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/soundcard.h b/6/platforms/android-4/arch-arm/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..4a9217a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..8eea35f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..63dfd27
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_up.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..f806c8a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..f66b6d5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types_up.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..892b787
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_up.h b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..ccc7e90
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/stacktrace.h b/6/platforms/android-4/arch-arm/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..41ca4d9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/stat.h b/6/platforms/android-4/arch-arm/usr/include/linux/stat.h
new file mode 120000
index 0000000..c463297
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/statfs.h b/6/platforms/android-4/arch-arm/usr/include/linux/statfs.h
new file mode 120000
index 0000000..c0a23b2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/stddef.h b/6/platforms/android-4/arch-arm/usr/include/linux/stddef.h
new file mode 120000
index 0000000..3f6741f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/string.h b/6/platforms/android-4/arch-arm/usr/include/linux/string.h
new file mode 120000
index 0000000..0d6e5b8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/stringify.h b/6/platforms/android-4/arch-arm/usr/include/linux/stringify.h
new file mode 120000
index 0000000..8cee65a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..b515e63
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..3ab8dcf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..4e90440
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/debug.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..a3ed683
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..84ea8a7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..82f862b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..6819d41
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..2efa853
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/sched.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..924d619
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/stats.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..a2d0737
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svc.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..e30749d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..7b378b1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/timer.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..d535d8d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/types.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..68bf357
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..10b57c5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..badc5ee
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-arm/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/swap.h b/6/platforms/android-4/arch-arm/usr/include/linux/swap.h
new file mode 120000
index 0000000..4cc423b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sysctl.h b/6/platforms/android-4/arch-arm/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..a4d675c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sysdev.h b/6/platforms/android-4/arch-arm/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..52ac87c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/sysfs.h b/6/platforms/android-4/arch-arm/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..c9a2326
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/taskstats.h b/6/platforms/android-4/arch-arm/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..8e608e3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/taskstats_kern.h b/6/platforms/android-4/arch-arm/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..82aac4b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/tcp.h b/6/platforms/android-4/arch-arm/usr/include/linux/tcp.h
new file mode 120000
index 0000000..764b814
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/telephony.h b/6/platforms/android-4/arch-arm/usr/include/linux/telephony.h
new file mode 120000
index 0000000..bc40f97
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/termios.h b/6/platforms/android-4/arch-arm/usr/include/linux/termios.h
new file mode 120000
index 0000000..2b664ae
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/textsearch.h b/6/platforms/android-4/arch-arm/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..8b6ee7b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/thread_info.h b/6/platforms/android-4/arch-arm/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..843b859
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/threads.h b/6/platforms/android-4/arch-arm/usr/include/linux/threads.h
new file mode 120000
index 0000000..6468e62
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/time.h b/6/platforms/android-4/arch-arm/usr/include/linux/time.h
new file mode 120000
index 0000000..9df474a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/timer.h b/6/platforms/android-4/arch-arm/usr/include/linux/timer.h
new file mode 120000
index 0000000..71ca82f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/times.h b/6/platforms/android-4/arch-arm/usr/include/linux/times.h
new file mode 120000
index 0000000..c151f89
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/timex.h b/6/platforms/android-4/arch-arm/usr/include/linux/timex.h
new file mode 120000
index 0000000..3b1557b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/tiocl.h b/6/platforms/android-4/arch-arm/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..e0553c6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/transport_class.h b/6/platforms/android-4/arch-arm/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..fc2e84a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/tty.h b/6/platforms/android-4/arch-arm/usr/include/linux/tty.h
new file mode 120000
index 0000000..713ed41
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/types.h b/6/platforms/android-4/arch-arm/usr/include/linux/types.h
new file mode 120000
index 0000000..1b87ab0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/udp.h b/6/platforms/android-4/arch-arm/usr/include/linux/udp.h
new file mode 120000
index 0000000..e1d87e1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_i.h b/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..243bdfa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..9055e43
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/uio.h b/6/platforms/android-4/arch-arm/usr/include/linux/uio.h
new file mode 120000
index 0000000..bc15fbc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/un.h b/6/platforms/android-4/arch-arm/usr/include/linux/un.h
new file mode 120000
index 0000000..7068298
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/unistd.h b/6/platforms/android-4/arch-arm/usr/include/linux/unistd.h
new file mode 120000
index 0000000..744a6cb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/usb.h b/6/platforms/android-4/arch-arm/usr/include/linux/usb.h
new file mode 120000
index 0000000..5503c8c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/usb_ch9.h b/6/platforms/android-4/arch-arm/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..7d51ef4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/usbdevice_fs.h b/6/platforms/android-4/arch-arm/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..eaba31b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/user.h b/6/platforms/android-4/arch-arm/usr/include/linux/user.h
new file mode 120000
index 0000000..bb1e77b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/utime.h b/6/platforms/android-4/arch-arm/usr/include/linux/utime.h
new file mode 120000
index 0000000..a287b8a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/utsname.h b/6/platforms/android-4/arch-arm/usr/include/linux/utsname.h
new file mode 120000
index 0000000..99bd1f0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/version.h b/6/platforms/android-4/arch-arm/usr/include/linux/version.h
new file mode 120000
index 0000000..b54573e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/vfs.h b/6/platforms/android-4/arch-arm/usr/include/linux/vfs.h
new file mode 120000
index 0000000..bc63516
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/videodev.h b/6/platforms/android-4/arch-arm/usr/include/linux/videodev.h
new file mode 120000
index 0000000..769742f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/videodev2.h b/6/platforms/android-4/arch-arm/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..32dfce4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/vmalloc.h b/6/platforms/android-4/arch-arm/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..894b0db
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/vt.h b/6/platforms/android-4/arch-arm/usr/include/linux/vt.h
new file mode 120000
index 0000000..5b2346d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/vt_buffer.h b/6/platforms/android-4/arch-arm/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..1bce67b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/wait.h b/6/platforms/android-4/arch-arm/usr/include/linux/wait.h
new file mode 120000
index 0000000..fff3d10
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/wanrouter.h b/6/platforms/android-4/arch-arm/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..19a75e6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/wireless.h b/6/platforms/android-4/arch-arm/usr/include/linux/wireless.h
new file mode 120000
index 0000000..6228452
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/workqueue.h b/6/platforms/android-4/arch-arm/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..ca96e93
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/xattr.h b/6/platforms/android-4/arch-arm/usr/include/linux/xattr.h
new file mode 120000
index 0000000..fcd8723
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/zconf.h b/6/platforms/android-4/arch-arm/usr/include/linux/zconf.h
new file mode 120000
index 0000000..19456b9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/zlib.h b/6/platforms/android-4/arch-arm/usr/include/linux/zlib.h
new file mode 120000
index 0000000..d120095
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/linux/zorro_ids.h b/6/platforms/android-4/arch-arm/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..b8d6047
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/locale.h b/6/platforms/android-4/arch-arm/usr/include/locale.h
new file mode 120000
index 0000000..de40c82
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/_types.h b/6/platforms/android-4/arch-arm/usr/include/machine/_types.h
new file mode 120000
index 0000000..651e788
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/asm.h b/6/platforms/android-4/arch-arm/usr/include/machine/asm.h
new file mode 120000
index 0000000..7737196
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/asm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/asm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/cdefs.h b/6/platforms/android-4/arch-arm/usr/include/machine/cdefs.h
new file mode 120000
index 0000000..6069043
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/cpu-features.h b/6/platforms/android-4/arch-arm/usr/include/machine/cpu-features.h
new file mode 120000
index 0000000..ee08fb1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/cpu-features.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/cpu-features.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/exec.h b/6/platforms/android-4/arch-arm/usr/include/machine/exec.h
new file mode 120000
index 0000000..77377c8
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/exec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/exec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/ieee.h b/6/platforms/android-4/arch-arm/usr/include/machine/ieee.h
new file mode 120000
index 0000000..5db5eef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/ieee.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/ieee.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/internal_types.h b/6/platforms/android-4/arch-arm/usr/include/machine/internal_types.h
new file mode 120000
index 0000000..3a3cda4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/internal_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/internal_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/kernel.h b/6/platforms/android-4/arch-arm/usr/include/machine/kernel.h
new file mode 120000
index 0000000..c63e1df
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/limits.h b/6/platforms/android-4/arch-arm/usr/include/machine/limits.h
new file mode 120000
index 0000000..77b14b1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/machine/setjmp.h b/6/platforms/android-4/arch-arm/usr/include/machine/setjmp.h
new file mode 120000
index 0000000..3eec760
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/machine/setjmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/machine/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/malloc.h b/6/platforms/android-4/arch-arm/usr/include/malloc.h
new file mode 120000
index 0000000..3ce96fa
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/math.h b/6/platforms/android-4/arch-arm/usr/include/math.h
new file mode 120000
index 0000000..01586d7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/memory.h b/6/platforms/android-4/arch-arm/usr/include/memory.h
new file mode 120000
index 0000000..1a4fe92
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/mntent.h b/6/platforms/android-4/arch-arm/usr/include/mntent.h
new file mode 120000
index 0000000..dd0d75d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-abi.h b/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..f78aaa3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-user.h b/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..ab61cf7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/ethertypes.h b/6/platforms/android-4/arch-arm/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..c8a04de
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if.h b/6/platforms/android-4/arch-arm/usr/include/net/if.h
new file mode 120000
index 0000000..cc492ca
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_arp.h b/6/platforms/android-4/arch-arm/usr/include/net/if_arp.h
new file mode 120000
index 0000000..1f18fbc
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_dl.h b/6/platforms/android-4/arch-arm/usr/include/net/if_dl.h
new file mode 120000
index 0000000..44b1318
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_ether.h b/6/platforms/android-4/arch-arm/usr/include/net/if_ether.h
new file mode 120000
index 0000000..1d18369
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_ieee1394.h b/6/platforms/android-4/arch-arm/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..4b8f037
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_packet.h b/6/platforms/android-4/arch-arm/usr/include/net/if_packet.h
new file mode 120000
index 0000000..8b0114e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/if_types.h b/6/platforms/android-4/arch-arm/usr/include/net/if_types.h
new file mode 120000
index 0000000..9d327eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/net/route.h b/6/platforms/android-4/arch-arm/usr/include/net/route.h
new file mode 120000
index 0000000..45b0dc9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netdb.h b/6/platforms/android-4/arch-arm/usr/include/netdb.h
new file mode 120000
index 0000000..856f742
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/ether.h b/6/platforms/android-4/arch-arm/usr/include/netinet/ether.h
new file mode 120000
index 0000000..abd22c3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/if_ether.h b/6/platforms/android-4/arch-arm/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..019c227
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/in.h b/6/platforms/android-4/arch-arm/usr/include/netinet/in.h
new file mode 120000
index 0000000..ca7366d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/in6.h b/6/platforms/android-4/arch-arm/usr/include/netinet/in6.h
new file mode 120000
index 0000000..f38fe4c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/in_systm.h b/6/platforms/android-4/arch-arm/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..bd4600c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/ip.h b/6/platforms/android-4/arch-arm/usr/include/netinet/ip.h
new file mode 120000
index 0000000..f81c797
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/ip_icmp.h b/6/platforms/android-4/arch-arm/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..b3bb6bb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/tcp.h b/6/platforms/android-4/arch-arm/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..f73dace
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netinet/udp.h b/6/platforms/android-4/arch-arm/usr/include/netinet/udp.h
new file mode 120000
index 0000000..a48e4c7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/netpacket/packet.h b/6/platforms/android-4/arch-arm/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..930c8b2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/nsswitch.h b/6/platforms/android-4/arch-arm/usr/include/nsswitch.h
new file mode 120000
index 0000000..f7b9009
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/pathconf.h b/6/platforms/android-4/arch-arm/usr/include/pathconf.h
new file mode 120000
index 0000000..6e6a0e4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/paths.h b/6/platforms/android-4/arch-arm/usr/include/paths.h
new file mode 120000
index 0000000..7d0745e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/poll.h b/6/platforms/android-4/arch-arm/usr/include/poll.h
new file mode 120000
index 0000000..6a1a2ce
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/pthread.h b/6/platforms/android-4/arch-arm/usr/include/pthread.h
new file mode 120000
index 0000000..a776b97
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/pthread.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/pthread.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/pwd.h b/6/platforms/android-4/arch-arm/usr/include/pwd.h
new file mode 120000
index 0000000..a1c106a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/resolv.h b/6/platforms/android-4/arch-arm/usr/include/resolv.h
new file mode 120000
index 0000000..1cd89fd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sched.h b/6/platforms/android-4/arch-arm/usr/include/sched.h
new file mode 120000
index 0000000..43675ba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sched.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/semaphore.h b/6/platforms/android-4/arch-arm/usr/include/semaphore.h
new file mode 120000
index 0000000..9ee6154
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/setjmp.h b/6/platforms/android-4/arch-arm/usr/include/setjmp.h
new file mode 120000
index 0000000..8ddb665
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sgtty.h b/6/platforms/android-4/arch-arm/usr/include/sgtty.h
new file mode 120000
index 0000000..cb83dba
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sha1.h b/6/platforms/android-4/arch-arm/usr/include/sha1.h
new file mode 120000
index 0000000..03eeb4d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/signal.h b/6/platforms/android-4/arch-arm/usr/include/signal.h
new file mode 120000
index 0000000..c1c8ae3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/stdint.h b/6/platforms/android-4/arch-arm/usr/include/stdint.h
new file mode 120000
index 0000000..6d7d821
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/stdio.h b/6/platforms/android-4/arch-arm/usr/include/stdio.h
new file mode 120000
index 0000000..343d87c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/stdlib.h b/6/platforms/android-4/arch-arm/usr/include/stdlib.h
new file mode 120000
index 0000000..97c57bf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/stdlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/stdlib.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/string.h b/6/platforms/android-4/arch-arm/usr/include/string.h
new file mode 120000
index 0000000..7f7efa2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/strings.h b/6/platforms/android-4/arch-arm/usr/include/strings.h
new file mode 120000
index 0000000..d7eda87
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/_errdefs.h b/6/platforms/android-4/arch-arm/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..13f85a3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/_sigdefs.h b/6/platforms/android-4/arch-arm/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..19a6420
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/_system_properties.h b/6/platforms/android-4/arch-arm/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..01023e7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/_types.h b/6/platforms/android-4/arch-arm/usr/include/sys/_types.h
new file mode 120000
index 0000000..0b7195b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/atomics.h b/6/platforms/android-4/arch-arm/usr/include/sys/atomics.h
new file mode 120000
index 0000000..d45aed7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/cdefs.h b/6/platforms/android-4/arch-arm/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..23f6a8d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/cdefs_elf.h b/6/platforms/android-4/arch-arm/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..4666ae7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/dirent.h b/6/platforms/android-4/arch-arm/usr/include/sys/dirent.h
new file mode 120000
index 0000000..f60f948
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/endian.h b/6/platforms/android-4/arch-arm/usr/include/sys/endian.h
new file mode 120000
index 0000000..46abe6b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/epoll.h b/6/platforms/android-4/arch-arm/usr/include/sys/epoll.h
new file mode 120000
index 0000000..b920dc3
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/errno.h b/6/platforms/android-4/arch-arm/usr/include/sys/errno.h
new file mode 120000
index 0000000..6110dd2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/exec_elf.h b/6/platforms/android-4/arch-arm/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..949b70a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/file.h b/6/platforms/android-4/arch-arm/usr/include/sys/file.h
new file mode 120000
index 0000000..2043da4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/fsuid.h b/6/platforms/android-4/arch-arm/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..3e301fe
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/inotify.h b/6/platforms/android-4/arch-arm/usr/include/sys/inotify.h
new file mode 120000
index 0000000..8116495
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ioctl.h b/6/platforms/android-4/arch-arm/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..1d311a5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ioctl_compat.h b/6/platforms/android-4/arch-arm/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..31ff708
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ipc.h b/6/platforms/android-4/arch-arm/usr/include/sys/ipc.h
new file mode 120000
index 0000000..43f386e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/klog.h b/6/platforms/android-4/arch-arm/usr/include/sys/klog.h
new file mode 120000
index 0000000..3920b6f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/limits.h b/6/platforms/android-4/arch-arm/usr/include/sys/limits.h
new file mode 120000
index 0000000..b97cebe
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/linux-syscalls.h b/6/platforms/android-4/arch-arm/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..dcc6365
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/linux-unistd.h b/6/platforms/android-4/arch-arm/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..eb2ce22
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/mman.h b/6/platforms/android-4/arch-arm/usr/include/sys/mman.h
new file mode 120000
index 0000000..61fcbb0
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/mount.h b/6/platforms/android-4/arch-arm/usr/include/sys/mount.h
new file mode 120000
index 0000000..59b7d97
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/param.h b/6/platforms/android-4/arch-arm/usr/include/sys/param.h
new file mode 120000
index 0000000..689600c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/poll.h b/6/platforms/android-4/arch-arm/usr/include/sys/poll.h
new file mode 120000
index 0000000..2197a61
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/prctl.h b/6/platforms/android-4/arch-arm/usr/include/sys/prctl.h
new file mode 120000
index 0000000..3015a5d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ptrace.h b/6/platforms/android-4/arch-arm/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..814d656
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/queue.h b/6/platforms/android-4/arch-arm/usr/include/sys/queue.h
new file mode 120000
index 0000000..7da69e5
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/reboot.h b/6/platforms/android-4/arch-arm/usr/include/sys/reboot.h
new file mode 120000
index 0000000..cec4602
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/resource.h b/6/platforms/android-4/arch-arm/usr/include/sys/resource.h
new file mode 120000
index 0000000..b38ae0b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/select.h b/6/platforms/android-4/arch-arm/usr/include/sys/select.h
new file mode 120000
index 0000000..5535347
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/sendfile.h b/6/platforms/android-4/arch-arm/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..788a6ef
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/socket.h b/6/platforms/android-4/arch-arm/usr/include/sys/socket.h
new file mode 120000
index 0000000..42a315a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/socketcalls.h b/6/platforms/android-4/arch-arm/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..fff4e0e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/stat.h b/6/platforms/android-4/arch-arm/usr/include/sys/stat.h
new file mode 120000
index 0000000..139bee7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/statfs.h b/6/platforms/android-4/arch-arm/usr/include/sys/statfs.h
new file mode 120000
index 0000000..7809a2c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/syscall.h b/6/platforms/android-4/arch-arm/usr/include/sys/syscall.h
new file mode 120000
index 0000000..d00c737
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/sysconf.h b/6/platforms/android-4/arch-arm/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..538927d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/sysinfo.h b/6/platforms/android-4/arch-arm/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..00c5f33
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/syslimits.h b/6/platforms/android-4/arch-arm/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..1dd6b57
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/sysmacros.h b/6/platforms/android-4/arch-arm/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..0ef50c4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/system_properties.h b/6/platforms/android-4/arch-arm/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..4f8dc8d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/time.h b/6/platforms/android-4/arch-arm/usr/include/sys/time.h
new file mode 120000
index 0000000..f926111
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/timeb.h b/6/platforms/android-4/arch-arm/usr/include/sys/timeb.h
new file mode 120000
index 0000000..14ead59
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/times.h b/6/platforms/android-4/arch-arm/usr/include/sys/times.h
new file mode 120000
index 0000000..a030078
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ttychars.h b/6/platforms/android-4/arch-arm/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..0361f4f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/ttydev.h b/6/platforms/android-4/arch-arm/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..24fc1da
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/types.h b/6/platforms/android-4/arch-arm/usr/include/sys/types.h
new file mode 120000
index 0000000..e600b9b
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/uio.h b/6/platforms/android-4/arch-arm/usr/include/sys/uio.h
new file mode 120000
index 0000000..de93fcd
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/un.h b/6/platforms/android-4/arch-arm/usr/include/sys/un.h
new file mode 120000
index 0000000..7c1ea8a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/utime.h b/6/platforms/android-4/arch-arm/usr/include/sys/utime.h
new file mode 120000
index 0000000..92035b2
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/utsname.h b/6/platforms/android-4/arch-arm/usr/include/sys/utsname.h
new file mode 120000
index 0000000..e55ecaf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/vfs.h b/6/platforms/android-4/arch-arm/usr/include/sys/vfs.h
new file mode 120000
index 0000000..46d4b8a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/vt.h b/6/platforms/android-4/arch-arm/usr/include/sys/vt.h
new file mode 120000
index 0000000..12b20ca
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/sys/wait.h b/6/platforms/android-4/arch-arm/usr/include/sys/wait.h
new file mode 120000
index 0000000..0e80d98
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-arm/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/syslog.h b/6/platforms/android-4/arch-arm/usr/include/syslog.h
new file mode 120000
index 0000000..fd6fbbf
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/termio.h b/6/platforms/android-4/arch-arm/usr/include/termio.h
new file mode 120000
index 0000000..227a87f
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/termios.h b/6/platforms/android-4/arch-arm/usr/include/termios.h
new file mode 120000
index 0000000..ee3a9b1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/thread_db.h b/6/platforms/android-4/arch-arm/usr/include/thread_db.h
new file mode 120000
index 0000000..fb3776a
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/time.h b/6/platforms/android-4/arch-arm/usr/include/time.h
new file mode 120000
index 0000000..e93edc1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/time64.h b/6/platforms/android-4/arch-arm/usr/include/time64.h
new file mode 120000
index 0000000..b61747e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/unistd.h b/6/platforms/android-4/arch-arm/usr/include/unistd.h
new file mode 120000
index 0000000..792063d
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/unistd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/util.h b/6/platforms/android-4/arch-arm/usr/include/util.h
new file mode 120000
index 0000000..a515b28
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/utime.h b/6/platforms/android-4/arch-arm/usr/include/utime.h
new file mode 120000
index 0000000..aaf1869
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/utmp.h b/6/platforms/android-4/arch-arm/usr/include/utmp.h
new file mode 120000
index 0000000..93e99f4
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/wchar.h b/6/platforms/android-4/arch-arm/usr/include/wchar.h
new file mode 120000
index 0000000..43be6b7
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/wchar.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/wchar.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/wctype.h b/6/platforms/android-4/arch-arm/usr/include/wctype.h
new file mode 120000
index 0000000..e4ccfb1
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/zconf.h b/6/platforms/android-4/arch-arm/usr/include/zconf.h
new file mode 120000
index 0000000..8518180
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/include/zlib.h b/6/platforms/android-4/arch-arm/usr/include/zlib.h
new file mode 120000
index 0000000..60c0fab
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o
new file mode 120000
index 0000000..fc234de
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/crtbegin_dynamic.o \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/crtbegin_so.o b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_so.o
new file mode 120000
index 0000000..d60d687
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/crtbegin_so.o \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o
new file mode 120000
index 0000000..54c7b4c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/crtbegin_static.o
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/crtbegin_static.o \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/crtend_android.o b/6/platforms/android-4/arch-arm/usr/lib/crtend_android.o
new file mode 120000
index 0000000..4e708f9
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/crtend_android.o
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/crtend_android.o \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/crtend_so.o b/6/platforms/android-4/arch-arm/usr/lib/crtend_so.o
new file mode 120000
index 0000000..097ff92
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/crtend_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/crtend_so.o \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libGLESv1_CM.so b/6/platforms/android-4/arch-arm/usr/lib/libGLESv1_CM.so
new file mode 100644
index 0000000..f61f631
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libGLESv1_CM.so
Binary files differ
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libc.a b/6/platforms/android-4/arch-arm/usr/lib/libc.a
new file mode 120000
index 0000000..982fbb6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libc.a
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libc.a \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libc.so b/6/platforms/android-4/arch-arm/usr/lib/libc.so
new file mode 120000
index 0000000..e366501
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libc.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libc.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libdl.so b/6/platforms/android-4/arch-arm/usr/lib/libdl.so
new file mode 120000
index 0000000..5307404
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libdl.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libdl.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/liblog.so b/6/platforms/android-4/arch-arm/usr/lib/liblog.so
new file mode 120000
index 0000000..064be23
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/liblog.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/liblog.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libm.a b/6/platforms/android-4/arch-arm/usr/lib/libm.a
new file mode 120000
index 0000000..9843c42
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libm.a
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libm.a \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libm.so b/6/platforms/android-4/arch-arm/usr/lib/libm.so
new file mode 120000
index 0000000..c0ad83c
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libm.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libm.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libstdc++.a b/6/platforms/android-4/arch-arm/usr/lib/libstdc++.a
new file mode 120000
index 0000000..e2f017e
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libstdc++.a
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libstdc++.a \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libstdc++.so b/6/platforms/android-4/arch-arm/usr/lib/libstdc++.so
new file mode 120000
index 0000000..d895378
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libstdc++.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libstdc++.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libthread_db.a b/6/platforms/android-4/arch-arm/usr/lib/libthread_db.a
new file mode 120000
index 0000000..86573e6
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libthread_db.a
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libthread_db.a \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libthread_db.so b/6/platforms/android-4/arch-arm/usr/lib/libthread_db.so
new file mode 120000
index 0000000..82cf1eb
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libthread_db.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libthread_db.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-arm/usr/lib/libz.so b/6/platforms/android-4/arch-arm/usr/lib/libz.so
new file mode 120000
index 0000000..f4a2944
--- /dev/null
+++ b/6/platforms/android-4/arch-arm/usr/lib/libz.so
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-arm/usr/lib/libz.so \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/GLES/gl.h b/6/platforms/android-4/arch-x86/usr/include/GLES/gl.h
new file mode 100644
index 0000000..2e8b971
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/GLES/gl.h
@@ -0,0 +1,769 @@
+#ifndef __gl_h_
+#define __gl_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+#include <GLES/glplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef khronos_int8_t GLbyte;
+typedef short GLshort;
+typedef int GLint;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned int GLuint;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef khronos_int32_t GLclampx;
+
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
+
+
+/*************************************************************/
+
+/* OpenGL ES core versions */
+#define GL_VERSION_ES_CM_1_0 1
+#define GL_VERSION_ES_CL_1_0 1
+#define GL_VERSION_ES_CM_1_1 1
+#define GL_VERSION_ES_CL_1_1 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+
+/* Boolean */
+#define GL_FALSE 0
+#define GL_TRUE 1
+
+/* BeginMode */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+
+/* AlphaFunction */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+
+/* BlendingFactorDest */
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+
+/* BlendingFactorSrc */
+/* GL_ZERO */
+/* GL_ONE */
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+/* GL_SRC_ALPHA */
+/* GL_ONE_MINUS_SRC_ALPHA */
+/* GL_DST_ALPHA */
+/* GL_ONE_MINUS_DST_ALPHA */
+
+/* ClipPlaneName */
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+
+/* ColorMaterialFace */
+/* GL_FRONT_AND_BACK */
+
+/* ColorMaterialParameter */
+/* GL_AMBIENT_AND_DIFFUSE */
+
+/* ColorPointerType */
+/* GL_UNSIGNED_BYTE */
+/* GL_FLOAT */
+/* GL_FIXED */
+
+/* CullFaceMode */
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_FRONT_AND_BACK 0x0408
+
+/* DepthFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* EnableCap */
+#define GL_FOG 0x0B60
+#define GL_LIGHTING 0x0B50
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_CULL_FACE 0x0B44
+#define GL_ALPHA_TEST 0x0BC0
+#define GL_BLEND 0x0BE2
+#define GL_COLOR_LOGIC_OP 0x0BF2
+#define GL_DITHER 0x0BD0
+#define GL_STENCIL_TEST 0x0B90
+#define GL_DEPTH_TEST 0x0B71
+/* GL_LIGHT0 */
+/* GL_LIGHT1 */
+/* GL_LIGHT2 */
+/* GL_LIGHT3 */
+/* GL_LIGHT4 */
+/* GL_LIGHT5 */
+/* GL_LIGHT6 */
+/* GL_LIGHT7 */
+#define GL_POINT_SMOOTH 0x0B10
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_MATERIAL 0x0B57
+#define GL_NORMALIZE 0x0BA1
+#define GL_RESCALE_NORMAL 0x803A
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_NORMAL_ARRAY 0x8075
+#define GL_COLOR_ARRAY 0x8076
+#define GL_TEXTURE_COORD_ARRAY 0x8078
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+#define GL_OUT_OF_MEMORY 0x0505
+
+/* FogMode */
+/* GL_LINEAR */
+#define GL_EXP 0x0800
+#define GL_EXP2 0x0801
+
+/* FogParameter */
+#define GL_FOG_DENSITY 0x0B62
+#define GL_FOG_START 0x0B63
+#define GL_FOG_END 0x0B64
+#define GL_FOG_MODE 0x0B65
+#define GL_FOG_COLOR 0x0B66
+
+/* FrontFaceDirection */
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+
+/* GetPName */
+#define GL_CURRENT_COLOR 0x0B00
+#define GL_CURRENT_NORMAL 0x0B02
+#define GL_CURRENT_TEXTURE_COORDS 0x0B03
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_MIN 0x8126
+#define GL_POINT_SIZE_MAX 0x8127
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_LINE_WIDTH 0x0B21
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_SHADE_MODEL 0x0B54
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_MATRIX_MODE 0x0BA0
+#define GL_VIEWPORT 0x0BA2
+#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
+#define GL_PROJECTION_STACK_DEPTH 0x0BA4
+#define GL_TEXTURE_STACK_DEPTH 0x0BA5
+#define GL_MODELVIEW_MATRIX 0x0BA6
+#define GL_PROJECTION_MATRIX 0x0BA7
+#define GL_TEXTURE_MATRIX 0x0BA8
+#define GL_ALPHA_TEST_FUNC 0x0BC1
+#define GL_ALPHA_TEST_REF 0x0BC2
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_SRC 0x0BE1
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_LIGHTS 0x0D31
+#define GL_MAX_CLIP_PLANES 0x0D32
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
+#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
+#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_MAX_TEXTURE_UNITS 0x84E2
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_RED_BITS 0x0D52
+#define GL_GREEN_BITS 0x0D53
+#define GL_BLUE_BITS 0x0D54
+#define GL_ALPHA_BITS 0x0D55
+#define GL_DEPTH_BITS 0x0D56
+#define GL_STENCIL_BITS 0x0D57
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_VERTEX_ARRAY_SIZE 0x807A
+#define GL_VERTEX_ARRAY_TYPE 0x807B
+#define GL_VERTEX_ARRAY_STRIDE 0x807C
+#define GL_NORMAL_ARRAY_TYPE 0x807E
+#define GL_NORMAL_ARRAY_STRIDE 0x807F
+#define GL_COLOR_ARRAY_SIZE 0x8081
+#define GL_COLOR_ARRAY_TYPE 0x8082
+#define GL_COLOR_ARRAY_STRIDE 0x8083
+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define GL_VERTEX_ARRAY_POINTER 0x808E
+#define GL_NORMAL_ARRAY_POINTER 0x808F
+#define GL_COLOR_ARRAY_POINTER 0x8090
+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+
+/* GetTextureParameter */
+/* GL_TEXTURE_MAG_FILTER */
+/* GL_TEXTURE_MIN_FILTER */
+/* GL_TEXTURE_WRAP_S */
+/* GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+
+/* HintTarget */
+#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define GL_POINT_SMOOTH_HINT 0x0C51
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_FOG_HINT 0x0C54
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+
+/* LightModelParameter */
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+
+/* LightParameter */
+#define GL_AMBIENT 0x1200
+#define GL_DIFFUSE 0x1201
+#define GL_SPECULAR 0x1202
+#define GL_POSITION 0x1203
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_SPOT_EXPONENT 0x1205
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_CONSTANT_ATTENUATION 0x1207
+#define GL_LINEAR_ATTENUATION 0x1208
+#define GL_QUADRATIC_ATTENUATION 0x1209
+
+/* DataType */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_FLOAT 0x1406
+#define GL_FIXED 0x140C
+
+/* LogicOp */
+#define GL_CLEAR 0x1500
+#define GL_AND 0x1501
+#define GL_AND_REVERSE 0x1502
+#define GL_COPY 0x1503
+#define GL_AND_INVERTED 0x1504
+#define GL_NOOP 0x1505
+#define GL_XOR 0x1506
+#define GL_OR 0x1507
+#define GL_NOR 0x1508
+#define GL_EQUIV 0x1509
+#define GL_INVERT 0x150A
+#define GL_OR_REVERSE 0x150B
+#define GL_COPY_INVERTED 0x150C
+#define GL_OR_INVERTED 0x150D
+#define GL_NAND 0x150E
+#define GL_SET 0x150F
+
+/* MaterialFace */
+/* GL_FRONT_AND_BACK */
+
+/* MaterialParameter */
+#define GL_EMISSION 0x1600
+#define GL_SHININESS 0x1601
+#define GL_AMBIENT_AND_DIFFUSE 0x1602
+/* GL_AMBIENT */
+/* GL_DIFFUSE */
+/* GL_SPECULAR */
+
+/* MatrixMode */
+#define GL_MODELVIEW 0x1700
+#define GL_PROJECTION 0x1701
+#define GL_TEXTURE 0x1702
+
+/* NormalPointerType */
+/* GL_BYTE */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+
+/* PixelFormat */
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+
+/* PixelStoreParameter */
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+
+/* PixelType */
+/* GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+
+/* ShadingModel */
+#define GL_FLAT 0x1D00
+#define GL_SMOOTH 0x1D01
+
+/* StencilFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* StencilOp */
+/* GL_ZERO */
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+/* GL_INVERT */
+
+/* StringName */
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+
+/* TexCoordPointerType */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+/* GL_BYTE */
+
+/* TextureEnvMode */
+#define GL_MODULATE 0x2100
+#define GL_DECAL 0x2101
+/* GL_BLEND */
+#define GL_ADD 0x0104
+/* GL_REPLACE */
+
+/* TextureEnvParameter */
+#define GL_TEXTURE_ENV_MODE 0x2200
+#define GL_TEXTURE_ENV_COLOR 0x2201
+
+/* TextureEnvTarget */
+#define GL_TEXTURE_ENV 0x2300
+
+/* TextureMagFilter */
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+
+/* TextureMinFilter */
+/* GL_NEAREST */
+/* GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+#define GL_GENERATE_MIPMAP 0x8191
+
+/* TextureTarget */
+/* GL_TEXTURE_2D */
+
+/* TextureUnit */
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+
+/* TextureWrapMode */
+#define GL_REPEAT 0x2901
+#define GL_CLAMP_TO_EDGE 0x812F
+
+/* VertexPointerType */
+/* GL_SHORT */
+/* GL_FLOAT */
+/* GL_FIXED */
+/* GL_BYTE */
+
+/* LightName */
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+
+#define GL_STATIC_DRAW 0x88E4
+#define GL_DYNAMIC_DRAW 0x88E8
+
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+
+/* Texture combine + dot3 */
+#define GL_SUBTRACT 0x84E7
+#define GL_COMBINE 0x8570
+#define GL_COMBINE_RGB 0x8571
+#define GL_COMBINE_ALPHA 0x8572
+#define GL_RGB_SCALE 0x8573
+#define GL_ADD_SIGNED 0x8574
+#define GL_INTERPOLATE 0x8575
+#define GL_CONSTANT 0x8576
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PREVIOUS 0x8578
+#define GL_OPERAND0_RGB 0x8590
+#define GL_OPERAND1_RGB 0x8591
+#define GL_OPERAND2_RGB 0x8592
+#define GL_OPERAND0_ALPHA 0x8598
+#define GL_OPERAND1_ALPHA 0x8599
+#define GL_OPERAND2_ALPHA 0x859A
+
+#define GL_ALPHA_SCALE 0x0D1C
+
+#define GL_SRC0_RGB 0x8580
+#define GL_SRC1_RGB 0x8581
+#define GL_SRC2_RGB 0x8582
+#define GL_SRC0_ALPHA 0x8588
+#define GL_SRC1_ALPHA 0x8589
+#define GL_SRC2_ALPHA 0x858A
+
+#define GL_DOT3_RGB 0x86AE
+#define GL_DOT3_RGBA 0x86AF
+
+/*------------------------------------------------------------------------*
+ * required OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* OES_read_format */
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+/* OES_point_size_array */
+#ifndef GL_OES_point_size_array
+#define GL_POINT_SIZE_ARRAY_OES 0x8B9C
+#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A
+#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B
+#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C
+#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F
+#endif
+
+/* GL_OES_point_sprite */
+#ifndef GL_OES_point_sprite
+#define GL_POINT_SPRITE_OES 0x8861
+#define GL_COORD_REPLACE_OES 0x8862
+#endif
+
+/*************************************************************/
+
+/* Available only in Common profile */
+GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
+GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
+GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
+GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glLineWidth (GLfloat width);
+GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m);
+GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m);
+GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
+GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glPointSize (GLfloat size);
+GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
+GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
+
+/* Available in both Common and Common-Lite profiles */
+GL_API void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
+GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GL_API void GL_APIENTRY glClear (GLbitfield mask);
+GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
+GL_API void GL_APIENTRY glClearStencil (GLint s);
+GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture);
+GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
+GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glCullFace (GLenum mode);
+GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GL_API void GL_APIENTRY glDepthFunc (GLenum func);
+GL_API void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
+GL_API void GL_APIENTRY glDisable (GLenum cap);
+GL_API void GL_APIENTRY glDisableClientState (GLenum array);
+GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+GL_API void GL_APIENTRY glEnable (GLenum cap);
+GL_API void GL_APIENTRY glEnableClientState (GLenum array);
+GL_API void GL_APIENTRY glFinish (void);
+GL_API void GL_APIENTRY glFlush (void);
+GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glFrontFace (GLenum mode);
+GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
+GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
+GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GL_API GLenum GL_APIENTRY glGetError (void);
+GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
+GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
+GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
+GL_API void GL_APIENTRY glLoadIdentity (void);
+GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
+GL_API void GL_APIENTRY glLogicOp (GLenum opcode);
+GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glMatrixMode (GLenum mode);
+GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
+GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
+GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glPointSizex (GLfixed size);
+GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
+GL_API void GL_APIENTRY glPopMatrix (void);
+GL_API void GL_APIENTRY glPushMatrix (void);
+GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
+GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glShadeModel (GLenum mode);
+GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_API void GL_APIENTRY glStencilMask (GLuint mask);
+GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+/*------------------------------------------------------------------------*
+ * Required OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_read_format */
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_point_size_array */
+#ifndef GL_OES_point_size_array
+#define GL_OES_point_size_array 1
+GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+/* GL_OES_point_sprite */
+#ifndef GL_OES_point_sprite
+#define GL_OES_point_sprite 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl_h_ */
+
diff --git a/6/platforms/android-4/arch-x86/usr/include/GLES/glext.h b/6/platforms/android-4/arch-x86/usr/include/GLES/glext.h
new file mode 100644
index 0000000..a8fe2e9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/GLES/glext.h
@@ -0,0 +1,607 @@
+#ifndef __glext_h_
+#define __glext_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+# define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_blend_equation_separate */
+#ifndef GL_OES_blend_equation_separate
+/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */
+#define GL_BLEND_EQUATION_RGB_OES 0x8009
+#define GL_BLEND_EQUATION_ALPHA_OES 0x883D
+#endif
+
+/* GL_OES_blend_func_separate */
+#ifndef GL_OES_blend_func_separate
+#define GL_BLEND_DST_RGB_OES 0x80C8
+#define GL_BLEND_SRC_RGB_OES 0x80C9
+#define GL_BLEND_DST_ALPHA_OES 0x80CA
+#define GL_BLEND_SRC_ALPHA_OES 0x80CB
+#endif
+
+/* GL_OES_blend_subtract */
+#ifndef GL_OES_blend_subtract
+#define GL_BLEND_EQUATION_OES 0x8009
+#define GL_FUNC_ADD_OES 0x8006
+#define GL_FUNC_SUBTRACT_OES 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B
+#endif
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES 0x8D64
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES 0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES 0x81A7
+#endif
+
+/* GL_OES_draw_texture */
+#ifndef GL_OES_draw_texture
+#define GL_TEXTURE_CROP_RECT_OES 0x8B9D
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_fixed_point */
+#ifndef GL_OES_fixed_point
+#define GL_FIXED_OES 0x140C
+#endif
+
+/* GL_OES_framebuffer_object */
+#ifndef GL_OES_framebuffer_object
+#define GL_NONE_OES 0
+#define GL_FRAMEBUFFER_OES 0x8D40
+#define GL_RENDERBUFFER_OES 0x8D41
+#define GL_RGBA4_OES 0x8056
+#define GL_RGB5_A1_OES 0x8057
+#define GL_RGB565_OES 0x8D62
+#define GL_DEPTH_COMPONENT16_OES 0x81A5
+#define GL_RENDERBUFFER_WIDTH_OES 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3
+#define GL_COLOR_ATTACHMENT0_OES 0x8CE0
+#define GL_DEPTH_ATTACHMENT_OES 0x8D00
+#define GL_STENCIL_ATTACHMENT_OES 0x8D20
+#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA
+#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD
+#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6
+#define GL_RENDERBUFFER_BINDING_OES 0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8
+#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES 0x88B9
+#define GL_BUFFER_ACCESS_OES 0x88BB
+#define GL_BUFFER_MAPPED_OES 0x88BC
+#define GL_BUFFER_MAP_POINTER_OES 0x88BD
+#endif
+
+/* GL_OES_matrix_get */
+#ifndef GL_OES_matrix_get
+#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
+#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
+#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
+#endif
+
+/* GL_OES_matrix_palette */
+#ifndef GL_OES_matrix_palette
+#define GL_MAX_VERTEX_UNITS_OES 0x86A4
+#define GL_MAX_PALETTE_MATRICES_OES 0x8842
+#define GL_MATRIX_PALETTE_OES 0x8840
+#define GL_MATRIX_INDEX_ARRAY_OES 0x8844
+#define GL_WEIGHT_ARRAY_OES 0x86AD
+#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843
+#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846
+#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847
+#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848
+#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849
+#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E
+#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB
+#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9
+#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA
+#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC
+#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES 0x84F9
+#define GL_UNSIGNED_INT_24_8_OES 0x84FA
+#define GL_DEPTH24_STENCIL8_OES 0x88F0
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES 0x8051
+#define GL_RGBA8_OES 0x8058
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES 0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES 0x8D47
+#endif
+
+/* GL_OES_stencil8 */
+#ifndef GL_OES_stencil8
+#define GL_STENCIL_INDEX8_OES 0x8D48
+#endif
+
+/* GL_OES_stencil_wrap */
+#ifndef GL_OES_stencil_wrap
+#define GL_INCR_WRAP_OES 0x8507
+#define GL_DECR_WRAP_OES 0x8508
+#endif
+
+/* GL_OES_texture_cube_map */
+#ifndef GL_OES_texture_cube_map
+#define GL_NORMAL_MAP_OES 0x8511
+#define GL_REFLECTION_MAP_OES 0x8512
+#define GL_TEXTURE_CUBE_MAP_OES 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C
+#define GL_TEXTURE_GEN_MODE_OES 0x2500
+#define GL_TEXTURE_GEN_STR_OES 0x8D60
+#endif
+
+/* GL_OES_texture_mirrored_repeat */
+#ifndef GL_OES_texture_mirrored_repeat
+#define GL_MIRRORED_REPEAT_OES 0x8370
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD 0x87F9
+#define GL_3DC_XY_AMD 0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD 0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_blend_equation_separate */
+#ifndef GL_OES_blend_equation_separate
+#define GL_OES_blend_equation_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha);
+#endif
+
+/* GL_OES_blend_func_separate */
+#ifndef GL_OES_blend_func_separate
+#define GL_OES_blend_func_separate 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+/* GL_OES_blend_subtract */
+#ifndef GL_OES_blend_subtract
+#define GL_OES_blend_subtract 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode);
+#endif
+
+/* GL_OES_byte_coordinates */
+#ifndef GL_OES_byte_coordinates
+#define GL_OES_byte_coordinates 1
+#endif
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_draw_texture */
+#ifndef GL_OES_draw_texture
+#define GL_OES_draw_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height);
+GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords);
+GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords);
+GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords);
+GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords);
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_extended_matrix_palette */
+#ifndef GL_OES_extended_matrix_palette
+#define GL_OES_extended_matrix_palette 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fixed_point */
+#ifndef GL_OES_fixed_point
+#define GL_OES_fixed_point 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref);
+GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth);
+GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);
+GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar);
+GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]);
+GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);
+GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width);
+GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m);
+GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m);
+GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);
+GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glPointSizexOES (GLfixed size);
+GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);
+GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert);
+GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);
+GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref);
+typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);
+typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar);
+typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]);
+typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);
+typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);
+typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
+typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);
+typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);
+typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);
+typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert);
+typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
+typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);
+#endif
+
+/* GL_OES_framebuffer_object */
+#ifndef GL_OES_framebuffer_object
+#define GL_OES_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer);
+GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer);
+GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers);
+GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers);
+GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params);
+GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer);
+GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer);
+GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers);
+GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers);
+GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target);
+GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target);
+#endif
+typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers);
+typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers);
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params);
+typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer);
+typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers);
+typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers);
+typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+#endif
+
+/* GL_OES_matrix_get */
+#ifndef GL_OES_matrix_get
+#define GL_OES_matrix_get 1
+#endif
+
+/* GL_OES_matrix_palette */
+#ifndef GL_OES_matrix_palette
+#define GL_OES_matrix_palette 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex);
+GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void);
+GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex);
+typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void);
+typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_query_matrix */
+#ifndef GL_OES_query_matrix
+#define GL_OES_query_matrix 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]);
+#endif
+typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]);
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_single_precision */
+#ifndef GL_OES_single_precision
+#define GL_OES_single_precision 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar);
+GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);
+GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]);
+GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar);
+typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);
+typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]);
+typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+/* GL_OES_stencil8 */
+#ifndef GL_OES_stencil8
+#define GL_OES_stencil8 1
+#endif
+
+/* GL_OES_stencil_wrap */
+#ifndef GL_OES_stencil_wrap
+#define GL_OES_stencil_wrap 1
+#endif
+
+/* GL_OES_texture_cube_map */
+#ifndef GL_OES_texture_cube_map
+#define GL_OES_texture_cube_map 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param);
+GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params);
+GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params);
+GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);
+GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);
+GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params);
+GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param);
+typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params);
+typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);
+typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);
+#endif
+
+/* GL_OES_texture_env_crossbar */
+#ifndef GL_OES_texture_env_crossbar
+#define GL_OES_texture_env_crossbar 1
+#endif
+
+/* GL_OES_texture_mirrored_repeat */
+#ifndef GL_OES_texture_mirrored_repeat
+#define GL_OES_texture_mirrored_repeat 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __glext_h_ */
+
diff --git a/6/platforms/android-4/arch-x86/usr/include/GLES/glplatform.h b/6/platforms/android-4/arch-x86/usr/include/GLES/glplatform.h
new file mode 100644
index 0000000..a38ea4c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/GLES/glplatform.h
@@ -0,0 +1,39 @@
+#ifndef __glplatform_h_
+#define __glplatform_h_
+
+/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
+ * Last modified on 2008/12/19
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+#ifndef GL_API
+#define GL_API KHRONOS_APICALL
+#endif
+
+#if defined(__ANDROID__)
+
+#define GL_APIENTRY KHRONOS_APIENTRY
+
+// XXX: this should probably not be here
+#define GL_DIRECT_TEXTURE_2D_QUALCOMM 0x7E80
+
+// XXX: not sure how this is intended to be used
+#define GL_GLEXT_PROTOTYPES
+
+#endif
+
+#endif /* __glplatform_h_ */
diff --git a/6/platforms/android-4/arch-x86/usr/include/KHR/khrplatform.h b/6/platforms/android-4/arch-x86/usr/include/KHR/khrplatform.h
new file mode 100644
index 0000000..75bc551
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/KHR/khrplatform.h
@@ -0,0 +1,243 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions.
+ * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by sending them to the public Khronos Bugzilla
+ * (http://khronos.org/bugzilla) by filing a bug against product
+ * "Khronos (general)" component "Registry".
+ *
+ * A predefined template which fills in some of the bug fields can be
+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
+ * must create a Bugzilla login first.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system.
+ * http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ *
+ * This file should be included as
+ * #include <KHR/khrplatform.h>
+ * by the Khronos API header file that uses its types and defines.
+ *
+ * The types in this file should only be used to define API-specific types.
+ * Types defined in this file:
+ * khronos_int8_t signed 8 bit
+ * khronos_uint8_t unsigned 8 bit
+ * khronos_int16_t signed 16 bit
+ * khronos_uint16_t unsigned 16 bit
+ * khronos_int32_t signed 32 bit
+ * khronos_uint32_t unsigned 32 bit
+ * khronos_int64_t signed 64 bit
+ * khronos_uint64_t unsigned 64 bit
+ * khronos_intptr_t signed same number of bits as a pointer
+ * khronos_uintptr_t unsigned same number of bits as a pointer
+ * khronos_ssize_t signed size
+ * khronos_usize_t unsigned size
+ * khronos_float_t signed 32 bit floating point
+ * khronos_time_ns_t unsigned 64 bit time in nanoseconds
+ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ * nanoseconds
+ * khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ *
+ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ *
+ * Macros defined in this file:
+ * KHRONOS_APICALL
+ * KHRONOS_APIENTRY
+ * KHRONOS_APIATTRIBUTES
+ * These may be used in function prototypes as:
+ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ * int arg1,
+ * int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+# define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+# define KHRONOS_APICALL IMPORT_C
+#elif defined(__ANDROID__)
+# define KHRONOS_APICALL __attribute__((visibility("default")))
+#else
+# define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+ /* Win32 but not WinCE */
+# define KHRONOS_APIENTRY __stdcall
+#else
+# define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using <stdint.h>
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using <inttypes.h>
+ */
+#include <inttypes.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32 khronos_int32_t;
+typedef unsigned __int32 khronos_uint32_t;
+typedef __int64 khronos_int64_t;
+typedef unsigned __int64 khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int khronos_int64_t;
+typedef unsigned long int khronos_uint64_t;
+#else
+typedef long long int khronos_int64_t;
+typedef unsigned long long int khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int khronos_int32_t;
+typedef unsigned int khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64 0
+#define KHRONOS_SUPPORT_FLOAT 0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include <stdint.h>
+typedef int32_t khronos_int32_t;
+typedef uint32_t khronos_uint32_t;
+typedef int64_t khronos_int64_t;
+typedef uint64_t khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64 1
+#define KHRONOS_SUPPORT_FLOAT 1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed char khronos_int8_t;
+typedef unsigned char khronos_uint8_t;
+typedef signed short int khronos_int16_t;
+typedef unsigned short int khronos_uint16_t;
+typedef signed long int khronos_intptr_t;
+typedef unsigned long int khronos_uintptr_t;
+typedef signed long int khronos_ssize_t;
+typedef unsigned long int khronos_usize_t;
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef float khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time. Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted). The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years. Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t khronos_utime_nanoseconds_t;
+typedef khronos_int64_t khronos_stime_nanoseconds_t;
+#endif
+
+
+#endif /* __khrplatform_h_ */
diff --git a/6/platforms/android-4/arch-x86/usr/include/alloca.h b/6/platforms/android-4/arch-x86/usr/include/alloca.h
new file mode 120000
index 0000000..871ca7d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/android/api-level.h b/6/platforms/android-4/arch-x86/usr/include/android/api-level.h
new file mode 100644
index 0000000..7e085c5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 4
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-4/arch-x86/usr/include/android/log.h b/6/platforms/android-4/arch-x86/usr/include/android/log.h
new file mode 120000
index 0000000..bf64932
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/arpa/inet.h b/6/platforms/android-4/arch-x86/usr/include/arpa/inet.h
new file mode 120000
index 0000000..30dc0e1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/arpa/nameser.h b/6/platforms/android-4/arch-x86/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..4b76d8e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..06d0444
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..7605358
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..433f1d4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..4416e05
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..bfd50c3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/find.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..50a0462
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..0cd84a5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..4e31291
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/le.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..aa65477
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..c85d69c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/bug.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..3ac8005
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/cputime.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..7efce08
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..a31bd3d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno-base.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..180582d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..41c8714
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/fcntl.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..949ac48
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/futex.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..c81f536
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/ioctl.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..c399fff
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/ipc.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..559de9e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/local.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..dfe3b44
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/memory_model.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..b891438
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/mman.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..a6f05b0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..412d826
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/percpu.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..2c7932b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..9af319b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..64890ef
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/poll.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..492a2a9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/resource.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..3be002f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/sections.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..f123a53
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/siginfo.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..0523874
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/signal.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..3156c54
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/tlb.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..54bcf34
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/topology.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..a6e9ff2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/asm-generic/xor.h b/6/platforms/android-4/arch-x86/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..b255943
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/assert.h b/6/platforms/android-4/arch-x86/usr/include/assert.h
new file mode 120000
index 0000000..d5f8f8f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/byteswap.h b/6/platforms/android-4/arch-x86/usr/include/byteswap.h
new file mode 120000
index 0000000..b2dc2bd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/ctype.h b/6/platforms/android-4/arch-x86/usr/include/ctype.h
new file mode 120000
index 0000000..6007603
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/dirent.h b/6/platforms/android-4/arch-x86/usr/include/dirent.h
new file mode 120000
index 0000000..6533a0a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/dlfcn.h b/6/platforms/android-4/arch-x86/usr/include/dlfcn.h
new file mode 120000
index 0000000..3bde525
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/elf.h b/6/platforms/android-4/arch-x86/usr/include/elf.h
new file mode 120000
index 0000000..3fab22b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/endian.h b/6/platforms/android-4/arch-x86/usr/include/endian.h
new file mode 120000
index 0000000..93e27bd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/err.h b/6/platforms/android-4/arch-x86/usr/include/err.h
new file mode 120000
index 0000000..73a8580
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/errno.h b/6/platforms/android-4/arch-x86/usr/include/errno.h
new file mode 120000
index 0000000..98e8331
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/fcntl.h b/6/platforms/android-4/arch-x86/usr/include/fcntl.h
new file mode 120000
index 0000000..ba2df0e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/features.h b/6/platforms/android-4/arch-x86/usr/include/features.h
new file mode 120000
index 0000000..a72a93c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/fnmatch.h b/6/platforms/android-4/arch-x86/usr/include/fnmatch.h
new file mode 120000
index 0000000..e91e118
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/getopt.h b/6/platforms/android-4/arch-x86/usr/include/getopt.h
new file mode 120000
index 0000000..a765300
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/grp.h b/6/platforms/android-4/arch-x86/usr/include/grp.h
new file mode 120000
index 0000000..a6a329b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/inttypes.h b/6/platforms/android-4/arch-x86/usr/include/inttypes.h
new file mode 120000
index 0000000..df7410f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/jni.h b/6/platforms/android-4/arch-x86/usr/include/jni.h
new file mode 120000
index 0000000..6b0c9f9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/lastlog.h b/6/platforms/android-4/arch-x86/usr/include/lastlog.h
new file mode 120000
index 0000000..e15a1d2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/libgen.h b/6/platforms/android-4/arch-x86/usr/include/libgen.h
new file mode 120000
index 0000000..b7aaa86
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/limits.h b/6/platforms/android-4/arch-x86/usr/include/limits.h
new file mode 120000
index 0000000..906fa28
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/a.out.h b/6/platforms/android-4/arch-x86/usr/include/linux/a.out.h
new file mode 120000
index 0000000..ed216bd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/aio_abi.h b/6/platforms/android-4/arch-x86/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..2b276cf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/akm8976.h b/6/platforms/android-4/arch-x86/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..db13323
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/android_alarm.h b/6/platforms/android-4/arch-x86/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..a6956de
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/android_pmem.h b/6/platforms/android-4/arch-x86/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..d8b28a6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/android_power.h b/6/platforms/android-4/arch-x86/usr/include/linux/android_power.h
new file mode 120000
index 0000000..f08afdb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/apm_bios.h b/6/platforms/android-4/arch-x86/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..0b58bc1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ashmem.h b/6/platforms/android-4/arch-x86/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..5dc0824
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ata.h b/6/platforms/android-4/arch-x86/usr/include/linux/ata.h
new file mode 120000
index 0000000..0edcb1b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atm.h b/6/platforms/android-4/arch-x86/usr/include/linux/atm.h
new file mode 120000
index 0000000..311af5a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atmapi.h b/6/platforms/android-4/arch-x86/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..d4c92b1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atmdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..a8a884b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atmioc.h b/6/platforms/android-4/arch-x86/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..621f3c7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atmppp.h b/6/platforms/android-4/arch-x86/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..c6c91c9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/atmsap.h b/6/platforms/android-4/arch-x86/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..fbb913d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/attribute_container.h b/6/platforms/android-4/arch-x86/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..f339dcb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/auto_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..14db45f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/autoconf.h b/6/platforms/android-4/arch-x86/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..0631dd9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/auxvec.h b/6/platforms/android-4/arch-x86/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..ce4229a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/backing-dev.h b/6/platforms/android-4/arch-x86/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..1334615
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/binder.h b/6/platforms/android-4/arch-x86/usr/include/linux/binder.h
new file mode 120000
index 0000000..87f667b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/binfmts.h b/6/platforms/android-4/arch-x86/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..a55e417
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/bio.h b/6/platforms/android-4/arch-x86/usr/include/linux/bio.h
new file mode 120000
index 0000000..93ad048
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/bitmap.h b/6/platforms/android-4/arch-x86/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..df85e95
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/bitops.h b/6/platforms/android-4/arch-x86/usr/include/linux/bitops.h
new file mode 120000
index 0000000..526020e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/blkdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..6dda643
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/blkpg.h b/6/platforms/android-4/arch-x86/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..4e8ae5a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/blockgroup_lock.h b/6/platforms/android-4/arch-x86/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..284e4e6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..ab974dc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/generic.h b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..ff34582
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..078ae22
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swab.h b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..0713b95
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swabb.h b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..96a7f56
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/cache.h b/6/platforms/android-4/arch-x86/usr/include/linux/cache.h
new file mode 120000
index 0000000..7f475f9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/calc64.h b/6/platforms/android-4/arch-x86/usr/include/linux/calc64.h
new file mode 120000
index 0000000..de50427
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/capability.h b/6/platforms/android-4/arch-x86/usr/include/linux/capability.h
new file mode 120000
index 0000000..913ab22
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/capi.h b/6/platforms/android-4/arch-x86/usr/include/linux/capi.h
new file mode 120000
index 0000000..326a125
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/cdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/cdev.h
new file mode 120000
index 0000000..ad985ae
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/cdrom.h b/6/platforms/android-4/arch-x86/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..3a55b29
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/circ_buf.h b/6/platforms/android-4/arch-x86/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..87d6a1f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/clk.h b/6/platforms/android-4/arch-x86/usr/include/linux/clk.h
new file mode 120000
index 0000000..a079a3e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/coda.h b/6/platforms/android-4/arch-x86/usr/include/linux/coda.h
new file mode 120000
index 0000000..b78d35e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/coda_fs_i.h b/6/platforms/android-4/arch-x86/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..4dbf0f7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/compat.h b/6/platforms/android-4/arch-x86/usr/include/linux/compat.h
new file mode 120000
index 0000000..03a7f7b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/compiler-gcc.h b/6/platforms/android-4/arch-x86/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..b2d6aee
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/compiler.h b/6/platforms/android-4/arch-x86/usr/include/linux/compiler.h
new file mode 120000
index 0000000..ba1ca9c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/completion.h b/6/platforms/android-4/arch-x86/usr/include/linux/completion.h
new file mode 120000
index 0000000..63ae75d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/config.h b/6/platforms/android-4/arch-x86/usr/include/linux/config.h
new file mode 120000
index 0000000..40dc952
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/console_struct.h b/6/platforms/android-4/arch-x86/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..65c66b7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/cpu.h b/6/platforms/android-4/arch-x86/usr/include/linux/cpu.h
new file mode 120000
index 0000000..8b955a3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/cpumask.h b/6/platforms/android-4/arch-x86/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..337ea9c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ctype.h b/6/platforms/android-4/arch-x86/usr/include/linux/ctype.h
new file mode 120000
index 0000000..5640905
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/dccp.h b/6/platforms/android-4/arch-x86/usr/include/linux/dccp.h
new file mode 120000
index 0000000..6c2383c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/debug_locks.h b/6/platforms/android-4/arch-x86/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..9209591
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/delay.h b/6/platforms/android-4/arch-x86/usr/include/linux/delay.h
new file mode 120000
index 0000000..513e91c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/device.h b/6/platforms/android-4/arch-x86/usr/include/linux/device.h
new file mode 120000
index 0000000..c06fb2b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/dirent.h b/6/platforms/android-4/arch-x86/usr/include/linux/dirent.h
new file mode 120000
index 0000000..f194107
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/dm-ioctl.h b/6/platforms/android-4/arch-x86/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..a974f32
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/dma-mapping.h b/6/platforms/android-4/arch-x86/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..6df82be
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/dmaengine.h b/6/platforms/android-4/arch-x86/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..166c2b8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/efs_dir.h b/6/platforms/android-4/arch-x86/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..4b8cd9e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_i.h b/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..c2af8c3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_sb.h b/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..f5b17ca
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/elevator.h b/6/platforms/android-4/arch-x86/usr/include/linux/elevator.h
new file mode 120000
index 0000000..fd7e5b9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/elf-em.h b/6/platforms/android-4/arch-x86/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..fae2585
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/elf.h b/6/platforms/android-4/arch-x86/usr/include/linux/elf.h
new file mode 120000
index 0000000..6e3b022
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/err.h b/6/platforms/android-4/arch-x86/usr/include/linux/err.h
new file mode 120000
index 0000000..a79efca
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/errno.h b/6/platforms/android-4/arch-x86/usr/include/linux/errno.h
new file mode 120000
index 0000000..778ad23
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/errqueue.h b/6/platforms/android-4/arch-x86/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..0b92f8a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/etherdevice.h b/6/platforms/android-4/arch-x86/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..789ff70
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ext2_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..c7c2a60
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ext3_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..573218f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/fadvise.h b/6/platforms/android-4/arch-x86/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..a9b1c2d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/fb.h b/6/platforms/android-4/arch-x86/usr/include/linux/fb.h
new file mode 120000
index 0000000..e711aa9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/fcntl.h b/6/platforms/android-4/arch-x86/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..2f6a3bf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/fd.h b/6/platforms/android-4/arch-x86/usr/include/linux/fd.h
new file mode 120000
index 0000000..3b6dde0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/file.h b/6/platforms/android-4/arch-x86/usr/include/linux/file.h
new file mode 120000
index 0000000..488f5fe
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/filter.h b/6/platforms/android-4/arch-x86/usr/include/linux/filter.h
new file mode 120000
index 0000000..8f245f4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/fs.h
new file mode 120000
index 0000000..cdfe110
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ftape.h b/6/platforms/android-4/arch-x86/usr/include/linux/ftape.h
new file mode 120000
index 0000000..85c385e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/futex.h b/6/platforms/android-4/arch-x86/usr/include/linux/futex.h
new file mode 120000
index 0000000..d79db57
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/genhd.h b/6/platforms/android-4/arch-x86/usr/include/linux/genhd.h
new file mode 120000
index 0000000..7631309
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/gfp.h b/6/platforms/android-4/arch-x86/usr/include/linux/gfp.h
new file mode 120000
index 0000000..a52ebfe
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/hardirq.h b/6/platforms/android-4/arch-x86/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..ca212fa
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-4/arch-x86/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..a97c373
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/hdreg.h b/6/platforms/android-4/arch-x86/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..58e3075
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/hdsmart.h b/6/platforms/android-4/arch-x86/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..f33289f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/highmem.h b/6/platforms/android-4/arch-x86/usr/include/linux/highmem.h
new file mode 120000
index 0000000..2c913d9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/hil.h b/6/platforms/android-4/arch-x86/usr/include/linux/hil.h
new file mode 120000
index 0000000..a841514
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/i2c.h b/6/platforms/android-4/arch-x86/usr/include/linux/i2c.h
new file mode 120000
index 0000000..e08bcac
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/icmp.h b/6/platforms/android-4/arch-x86/usr/include/linux/icmp.h
new file mode 120000
index 0000000..8071ffb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if.h b/6/platforms/android-4/arch-x86/usr/include/linux/if.h
new file mode 120000
index 0000000..5135096
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_arcnet.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..2c589a5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_arp.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..19a7fa4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_bridge.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..a5cc7a6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_ether.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..9f77984
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_fc.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..0de6e8b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_fddi.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..a26dfa2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_hippi.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..88bbcc1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_packet.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..9738466
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_ppp.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..d3ccd34
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_tr.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..36ad517
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_tun.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..e1f0e78
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/if_vlan.h b/6/platforms/android-4/arch-x86/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..327a7c1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/in.h b/6/platforms/android-4/arch-x86/usr/include/linux/in.h
new file mode 120000
index 0000000..d31aaa7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/in6.h b/6/platforms/android-4/arch-x86/usr/include/linux/in6.h
new file mode 120000
index 0000000..00eaf17
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/init.h b/6/platforms/android-4/arch-x86/usr/include/linux/init.h
new file mode 120000
index 0000000..f1a86ae
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/inotify.h b/6/platforms/android-4/arch-x86/usr/include/linux/inotify.h
new file mode 120000
index 0000000..99877e9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/input.h b/6/platforms/android-4/arch-x86/usr/include/linux/input.h
new file mode 120000
index 0000000..d8c8849
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/interrupt.h b/6/platforms/android-4/arch-x86/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..2da23a3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ioctl.h b/6/platforms/android-4/arch-x86/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..07f5d34
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ioport.h b/6/platforms/android-4/arch-x86/usr/include/linux/ioport.h
new file mode 120000
index 0000000..b3a76f7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ioprio.h b/6/platforms/android-4/arch-x86/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..76f243c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ip.h b/6/platforms/android-4/arch-x86/usr/include/linux/ip.h
new file mode 120000
index 0000000..5c15bd3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ipc.h b/6/platforms/android-4/arch-x86/usr/include/linux/ipc.h
new file mode 120000
index 0000000..708efe2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..f509950
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_smi.h b/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..0576879
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ipx.h b/6/platforms/android-4/arch-x86/usr/include/linux/ipx.h
new file mode 120000
index 0000000..775a001
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/irq.h b/6/platforms/android-4/arch-x86/usr/include/linux/irq.h
new file mode 120000
index 0000000..024637e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/irq_cpustat.h b/6/platforms/android-4/arch-x86/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..83a008a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/irqflags.h b/6/platforms/android-4/arch-x86/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..0d8d8e1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/irqreturn.h b/6/platforms/android-4/arch-x86/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..ab10399
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/jbd.h b/6/platforms/android-4/arch-x86/usr/include/linux/jbd.h
new file mode 120000
index 0000000..d44627c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/jiffies.h b/6/platforms/android-4/arch-x86/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..51f5e82
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kd.h b/6/platforms/android-4/arch-x86/usr/include/linux/kd.h
new file mode 120000
index 0000000..3421890
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kdev_t.h b/6/platforms/android-4/arch-x86/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..403a7bb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kernel.h b/6/platforms/android-4/arch-x86/usr/include/linux/kernel.h
new file mode 120000
index 0000000..42c4be3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kernel_stat.h b/6/platforms/android-4/arch-x86/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..f8b6baf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kernelcapi.h b/6/platforms/android-4/arch-x86/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..5a5cf12
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kexec.h b/6/platforms/android-4/arch-x86/usr/include/linux/kexec.h
new file mode 120000
index 0000000..e9be4b6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/key.h b/6/platforms/android-4/arch-x86/usr/include/linux/key.h
new file mode 120000
index 0000000..99d24f0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/keyboard.h b/6/platforms/android-4/arch-x86/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..16916ab
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/keychord.h b/6/platforms/android-4/arch-x86/usr/include/linux/keychord.h
new file mode 120000
index 0000000..d0e0893
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/klist.h b/6/platforms/android-4/arch-x86/usr/include/linux/klist.h
new file mode 120000
index 0000000..488ed31
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kmod.h b/6/platforms/android-4/arch-x86/usr/include/linux/kmod.h
new file mode 120000
index 0000000..a71d8c7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kobject.h b/6/platforms/android-4/arch-x86/usr/include/linux/kobject.h
new file mode 120000
index 0000000..e390435
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/kref.h b/6/platforms/android-4/arch-x86/usr/include/linux/kref.h
new file mode 120000
index 0000000..709c4dc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ktime.h b/6/platforms/android-4/arch-x86/usr/include/linux/ktime.h
new file mode 120000
index 0000000..aabefe2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/limits.h b/6/platforms/android-4/arch-x86/usr/include/linux/limits.h
new file mode 120000
index 0000000..7930b3e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/linkage.h b/6/platforms/android-4/arch-x86/usr/include/linux/linkage.h
new file mode 120000
index 0000000..5365a02
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/list.h b/6/platforms/android-4/arch-x86/usr/include/linux/list.h
new file mode 120000
index 0000000..a1fc682
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/lockd/nlm.h b/6/platforms/android-4/arch-x86/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..56a43de
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/lockd/xdr.h b/6/platforms/android-4/arch-x86/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..1b6c641
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/lockdep.h b/6/platforms/android-4/arch-x86/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..57174ae
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/loop.h b/6/platforms/android-4/arch-x86/usr/include/linux/loop.h
new file mode 120000
index 0000000..3dfd613
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/magic.h b/6/platforms/android-4/arch-x86/usr/include/linux/magic.h
new file mode 120000
index 0000000..05b9d38
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/major.h b/6/platforms/android-4/arch-x86/usr/include/linux/major.h
new file mode 120000
index 0000000..17abc15
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mc146818rtc.h b/6/platforms/android-4/arch-x86/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..6ab9705
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mca.h b/6/platforms/android-4/arch-x86/usr/include/linux/mca.h
new file mode 120000
index 0000000..5248a56
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mempolicy.h b/6/platforms/android-4/arch-x86/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..442f521
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mempool.h b/6/platforms/android-4/arch-x86/usr/include/linux/mempool.h
new file mode 120000
index 0000000..1775bd0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/miscdevice.h b/6/platforms/android-4/arch-x86/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..1e27883
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mm.h b/6/platforms/android-4/arch-x86/usr/include/linux/mm.h
new file mode 120000
index 0000000..a22cad9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mmc/card.h b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..19260b9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mmc/host.h b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..452767c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mmc/mmc.h b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..ec97ec6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mmzone.h b/6/platforms/android-4/arch-x86/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..5253d33
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mod_devicetable.h b/6/platforms/android-4/arch-x86/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..b31300e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/module.h b/6/platforms/android-4/arch-x86/usr/include/linux/module.h
new file mode 120000
index 0000000..aed76f5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/moduleparam.h b/6/platforms/android-4/arch-x86/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..ba7ccd3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mount.h b/6/platforms/android-4/arch-x86/usr/include/linux/mount.h
new file mode 120000
index 0000000..33bf1bd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/msdos_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..79c640e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/msg.h b/6/platforms/android-4/arch-x86/usr/include/linux/msg.h
new file mode 120000
index 0000000..d2d0a5e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/msm_adsp.h b/6/platforms/android-4/arch-x86/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..256610b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/msm_audio.h b/6/platforms/android-4/arch-x86/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..100a31e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/msm_mdp.h b/6/platforms/android-4/arch-x86/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..bf349ad
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mt9t013.h b/6/platforms/android-4/arch-x86/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..0149920
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/bbm.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..575e029
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/blktrans.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..4ae4af4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..4439593
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..9eedf5f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/compatmac.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..bdfd50d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/flashchip.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..5bf6e9b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/map.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..e9f51a8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/mtd.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..0c67b38
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..57fcde9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..d5ef420
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nftl.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..25ac186
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..3061374
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtd/partitions.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..1be9beb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mtio.h b/6/platforms/android-4/arch-x86/usr/include/linux/mtio.h
new file mode 120000
index 0000000..e566251
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mutex-debug.h b/6/platforms/android-4/arch-x86/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..bf2bcea
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/mutex.h b/6/platforms/android-4/arch-x86/usr/include/linux/mutex.h
new file mode 120000
index 0000000..f561848
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ncp.h b/6/platforms/android-4/arch-x86/usr/include/linux/ncp.h
new file mode 120000
index 0000000..b8ceedc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ncp_mount.h b/6/platforms/android-4/arch-x86/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..c542050
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ncp_no.h b/6/platforms/android-4/arch-x86/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..e827ddf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/net.h b/6/platforms/android-4/arch-x86/usr/include/linux/net.h
new file mode 120000
index 0000000..cab5fe7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netdevice.h b/6/platforms/android-4/arch-x86/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..a882182
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..8dc2341
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..769adbc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..c465571
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..75de88d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..114b2e0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..53f7104
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..cc5e012
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..9b0b9e0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..7e4ad6b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..fe28c5d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..46998ff
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..f5131ca
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..a19376b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..36851a5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..0a6b82d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..7c55fd6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..91139db
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..c5b298b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..cdc745a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..f9a849a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..df241b4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..66e3437
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..e7bcb82
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..e8354d6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..0b957ab
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..e50dcfe
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..6dafaa2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..e075e08
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..0f4a29f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..9c2fb37
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..d5620ba
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..5db7e3c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..44c984d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..b334c5d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..e81563a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_bridge.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..4eb598c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..4e120c9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..eccb541
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..9d10119
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..975baab
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..120726d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..8b0d881
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..ae37bce
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..84aadb0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..77e95c3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..ab0a02a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..f52b302
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..7b396e8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..c05040d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..419003c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..7466709
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..8f02d18
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..f1690b0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..567f562
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..e751e74
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..74e9dfb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..99a3ece
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..408029f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..1bb603b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..d789c51
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..fef4fad
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..be91715
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..4a3cfcd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..c0c7dd3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..eab3f32
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..cb5e534
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..f064416
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..2b3eb1c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..dad5c60
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..4e233de
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..010765e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..4be51ab
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..dc07e74
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..8b782a7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..be1bad1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..327bb72
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..40fc67f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..07c688c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..1fdbd7b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..e1d0a64
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..c5a9f03
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..45b50f4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..32e3f3f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..221da75
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..818e75f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..9e8c7ca
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..b80c887
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..724e50c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/netlink.h b/6/platforms/android-4/arch-x86/usr/include/linux/netlink.h
new file mode 120000
index 0000000..3be57b1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfs.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfs.h
new file mode 120000
index 0000000..bb0a151
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfs2.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..4a042c3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfs3.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..bb0aa91
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfs4.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..5ce74fd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfs_xdr.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..0678a55
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsacl.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..43455fa
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/auth.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..1a2feef
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/const.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..271557e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/debug.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..13cd6e8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/export.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..0f14566
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/interface.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..bebc294
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..ca315a1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/stats.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..d0d77c4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/xdr.h b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..388860f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/node.h b/6/platforms/android-4/arch-x86/usr/include/linux/node.h
new file mode 120000
index 0000000..6708d4a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nodemask.h b/6/platforms/android-4/arch-x86/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..9bc3928
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/notifier.h b/6/platforms/android-4/arch-x86/usr/include/linux/notifier.h
new file mode 120000
index 0000000..6b9094a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/numa.h b/6/platforms/android-4/arch-x86/usr/include/linux/numa.h
new file mode 120000
index 0000000..a92ecf3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/nvram.h b/6/platforms/android-4/arch-x86/usr/include/linux/nvram.h
new file mode 120000
index 0000000..2df34e6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/omap_csmi.h b/6/platforms/android-4/arch-x86/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..0c2c00f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pagemap.h b/6/platforms/android-4/arch-x86/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..cd62c68
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/param.h b/6/platforms/android-4/arch-x86/usr/include/linux/param.h
new file mode 120000
index 0000000..0224154
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/patchkey.h b/6/platforms/android-4/arch-x86/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..6627881
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pci.h b/6/platforms/android-4/arch-x86/usr/include/linux/pci.h
new file mode 120000
index 0000000..0ccee9d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pci_ids.h b/6/platforms/android-4/arch-x86/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..96a60bb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pci_regs.h b/6/platforms/android-4/arch-x86/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..afba9e7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/percpu.h b/6/platforms/android-4/arch-x86/usr/include/linux/percpu.h
new file mode 120000
index 0000000..ab081db
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/percpu_counter.h b/6/platforms/android-4/arch-x86/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..1fcf4d7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/personality.h b/6/platforms/android-4/arch-x86/usr/include/linux/personality.h
new file mode 120000
index 0000000..33a7486
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pfkeyv2.h b/6/platforms/android-4/arch-x86/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..2d1a16f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pkt_cls.h b/6/platforms/android-4/arch-x86/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..d7d3163
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pkt_sched.h b/6/platforms/android-4/arch-x86/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..a398cc4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/platform_device.h b/6/platforms/android-4/arch-x86/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..8202755
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/plist.h b/6/platforms/android-4/arch-x86/usr/include/linux/plist.h
new file mode 120000
index 0000000..0bdf953
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pm.h b/6/platforms/android-4/arch-x86/usr/include/linux/pm.h
new file mode 120000
index 0000000..f1aa1b4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/pnp.h b/6/platforms/android-4/arch-x86/usr/include/linux/pnp.h
new file mode 120000
index 0000000..0f6daeb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/poll.h b/6/platforms/android-4/arch-x86/usr/include/linux/poll.h
new file mode 120000
index 0000000..f776ee3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/posix_acl.h b/6/platforms/android-4/arch-x86/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..9a85979
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/posix_types.h b/6/platforms/android-4/arch-x86/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..51989dc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ppdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..5351a00
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ppp_defs.h b/6/platforms/android-4/arch-x86/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..3a1ba60
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/prctl.h b/6/platforms/android-4/arch-x86/usr/include/linux/prctl.h
new file mode 120000
index 0000000..53a8b89
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/preempt.h b/6/platforms/android-4/arch-x86/usr/include/linux/preempt.h
new file mode 120000
index 0000000..abe43ed
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/proc_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..4b289d6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ptrace.h b/6/platforms/android-4/arch-x86/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..847fb23
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/qic117.h b/6/platforms/android-4/arch-x86/usr/include/linux/qic117.h
new file mode 120000
index 0000000..84ad0a2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/qnxtypes.h b/6/platforms/android-4/arch-x86/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..c2090e7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/quota.h b/6/platforms/android-4/arch-x86/usr/include/linux/quota.h
new file mode 120000
index 0000000..48f0894
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/raid/md.h b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..040b177
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_k.h b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..2500989
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_p.h b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..94baa18
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_u.h b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..951883c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/raid/xor.h b/6/platforms/android-4/arch-x86/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..3adbeac
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/random.h b/6/platforms/android-4/arch-x86/usr/include/linux/random.h
new file mode 120000
index 0000000..d1f6a06
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/rbtree.h b/6/platforms/android-4/arch-x86/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..6845761
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/rcupdate.h b/6/platforms/android-4/arch-x86/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..69dd38c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/reboot.h b/6/platforms/android-4/arch-x86/usr/include/linux/reboot.h
new file mode 120000
index 0000000..320a435
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/relay.h b/6/platforms/android-4/arch-x86/usr/include/linux/relay.h
new file mode 120000
index 0000000..e43ff64
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/resource.h b/6/platforms/android-4/arch-x86/usr/include/linux/resource.h
new file mode 120000
index 0000000..ec67d0b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/route.h b/6/platforms/android-4/arch-x86/usr/include/linux/route.h
new file mode 120000
index 0000000..f76c8db
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/rtc.h b/6/platforms/android-4/arch-x86/usr/include/linux/rtc.h
new file mode 120000
index 0000000..4af2ef4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/rtnetlink.h b/6/platforms/android-4/arch-x86/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..9192618
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/rwsem.h b/6/platforms/android-4/arch-x86/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..c3f905a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sched.h b/6/platforms/android-4/arch-x86/usr/include/linux/sched.h
new file mode 120000
index 0000000..01cd125
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sem.h b/6/platforms/android-4/arch-x86/usr/include/linux/sem.h
new file mode 120000
index 0000000..b76284f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/seq_file.h b/6/platforms/android-4/arch-x86/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..4fa6b9d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/seqlock.h b/6/platforms/android-4/arch-x86/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..ffea98f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/serial_core.h b/6/platforms/android-4/arch-x86/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..02ceb76
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/serial_reg.h b/6/platforms/android-4/arch-x86/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..e7d6946
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/serio.h b/6/platforms/android-4/arch-x86/usr/include/linux/serio.h
new file mode 120000
index 0000000..405d615
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/shm.h b/6/platforms/android-4/arch-x86/usr/include/linux/shm.h
new file mode 120000
index 0000000..5278b30
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/signal.h b/6/platforms/android-4/arch-x86/usr/include/linux/signal.h
new file mode 120000
index 0000000..55d4375
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/skbuff.h b/6/platforms/android-4/arch-x86/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..e690f50
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/slab.h b/6/platforms/android-4/arch-x86/usr/include/linux/slab.h
new file mode 120000
index 0000000..969f91e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/smb.h b/6/platforms/android-4/arch-x86/usr/include/linux/smb.h
new file mode 120000
index 0000000..868b9e4
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/smp.h b/6/platforms/android-4/arch-x86/usr/include/linux/smp.h
new file mode 120000
index 0000000..d05ed5a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/smp_lock.h b/6/platforms/android-4/arch-x86/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..72e9239
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/socket.h b/6/platforms/android-4/arch-x86/usr/include/linux/socket.h
new file mode 120000
index 0000000..d509d14
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sockios.h b/6/platforms/android-4/arch-x86/usr/include/linux/sockios.h
new file mode 120000
index 0000000..0d80f6e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/soundcard.h b/6/platforms/android-4/arch-x86/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..7f14458
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..6de9220
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..9b8d95f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_up.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..ed7d2b9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..4668bc5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types_up.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..da021f2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_up.h b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..94949eb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/stacktrace.h b/6/platforms/android-4/arch-x86/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..3b17a0a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/stat.h b/6/platforms/android-4/arch-x86/usr/include/linux/stat.h
new file mode 120000
index 0000000..c8485b2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/statfs.h b/6/platforms/android-4/arch-x86/usr/include/linux/statfs.h
new file mode 120000
index 0000000..c4d6ba0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/stddef.h b/6/platforms/android-4/arch-x86/usr/include/linux/stddef.h
new file mode 120000
index 0000000..51d2192
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/string.h b/6/platforms/android-4/arch-x86/usr/include/linux/string.h
new file mode 120000
index 0000000..ccc8dea
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/stringify.h b/6/platforms/android-4/arch-x86/usr/include/linux/stringify.h
new file mode 120000
index 0000000..359d3c0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..36999c9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..7a2e3c1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..ea8db19
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/debug.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..867fcc1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..5146fa7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..ff260c0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..255ff64
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..5a8af7d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/sched.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..cec320b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/stats.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..308dd3c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svc.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..c5204df
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..91b1ce2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/timer.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..f6491e0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/types.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..c1d882b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..2041986
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..63ae653
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-3/arch-x86/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/swap.h b/6/platforms/android-4/arch-x86/usr/include/linux/swap.h
new file mode 120000
index 0000000..7b35683
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sysctl.h b/6/platforms/android-4/arch-x86/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..7bb3e2a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sysdev.h b/6/platforms/android-4/arch-x86/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..6108824
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/sysfs.h b/6/platforms/android-4/arch-x86/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..ef4eb9f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/taskstats.h b/6/platforms/android-4/arch-x86/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..bcb3df7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/taskstats_kern.h b/6/platforms/android-4/arch-x86/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..4189c43
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/tcp.h b/6/platforms/android-4/arch-x86/usr/include/linux/tcp.h
new file mode 120000
index 0000000..495dfd0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/telephony.h b/6/platforms/android-4/arch-x86/usr/include/linux/telephony.h
new file mode 120000
index 0000000..b925b42
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/termios.h b/6/platforms/android-4/arch-x86/usr/include/linux/termios.h
new file mode 120000
index 0000000..b8066d5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/textsearch.h b/6/platforms/android-4/arch-x86/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..3cadde2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/thread_info.h b/6/platforms/android-4/arch-x86/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..b266fda
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/threads.h b/6/platforms/android-4/arch-x86/usr/include/linux/threads.h
new file mode 120000
index 0000000..6366a6c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/time.h b/6/platforms/android-4/arch-x86/usr/include/linux/time.h
new file mode 120000
index 0000000..605b822
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/timer.h b/6/platforms/android-4/arch-x86/usr/include/linux/timer.h
new file mode 120000
index 0000000..bd8b287
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/times.h b/6/platforms/android-4/arch-x86/usr/include/linux/times.h
new file mode 120000
index 0000000..c37e829
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/timex.h b/6/platforms/android-4/arch-x86/usr/include/linux/timex.h
new file mode 120000
index 0000000..1d63cd2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/tiocl.h b/6/platforms/android-4/arch-x86/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..2b44acf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/transport_class.h b/6/platforms/android-4/arch-x86/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..56a7df8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/tty.h b/6/platforms/android-4/arch-x86/usr/include/linux/tty.h
new file mode 120000
index 0000000..a0c3d5c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/types.h b/6/platforms/android-4/arch-x86/usr/include/linux/types.h
new file mode 120000
index 0000000..4cdac14
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/udp.h b/6/platforms/android-4/arch-x86/usr/include/linux/udp.h
new file mode 120000
index 0000000..c0d5096
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_i.h b/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..e15984e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..80dc13d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/uio.h b/6/platforms/android-4/arch-x86/usr/include/linux/uio.h
new file mode 120000
index 0000000..fcc1c93
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/un.h b/6/platforms/android-4/arch-x86/usr/include/linux/un.h
new file mode 120000
index 0000000..43f873d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/unistd.h b/6/platforms/android-4/arch-x86/usr/include/linux/unistd.h
new file mode 120000
index 0000000..90998e6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/usb.h b/6/platforms/android-4/arch-x86/usr/include/linux/usb.h
new file mode 120000
index 0000000..dbcb950
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/usb_ch9.h b/6/platforms/android-4/arch-x86/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..0e36e15
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/usbdevice_fs.h b/6/platforms/android-4/arch-x86/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..70f27a9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/user.h b/6/platforms/android-4/arch-x86/usr/include/linux/user.h
new file mode 120000
index 0000000..bcbb964
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/utime.h b/6/platforms/android-4/arch-x86/usr/include/linux/utime.h
new file mode 120000
index 0000000..0b5ece3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/utsname.h b/6/platforms/android-4/arch-x86/usr/include/linux/utsname.h
new file mode 120000
index 0000000..531e712
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/version.h b/6/platforms/android-4/arch-x86/usr/include/linux/version.h
new file mode 120000
index 0000000..f575233
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/vfs.h b/6/platforms/android-4/arch-x86/usr/include/linux/vfs.h
new file mode 120000
index 0000000..192097e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/videodev.h b/6/platforms/android-4/arch-x86/usr/include/linux/videodev.h
new file mode 120000
index 0000000..0a1239d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/videodev2.h b/6/platforms/android-4/arch-x86/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..7dc0022
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/vmalloc.h b/6/platforms/android-4/arch-x86/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..7dfcb6e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/vt.h b/6/platforms/android-4/arch-x86/usr/include/linux/vt.h
new file mode 120000
index 0000000..207045a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/vt_buffer.h b/6/platforms/android-4/arch-x86/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..6f9b16e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/wait.h b/6/platforms/android-4/arch-x86/usr/include/linux/wait.h
new file mode 120000
index 0000000..f28d49d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/wanrouter.h b/6/platforms/android-4/arch-x86/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..e969c5a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/wireless.h b/6/platforms/android-4/arch-x86/usr/include/linux/wireless.h
new file mode 120000
index 0000000..7219426
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/workqueue.h b/6/platforms/android-4/arch-x86/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..0cdf32c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/xattr.h b/6/platforms/android-4/arch-x86/usr/include/linux/xattr.h
new file mode 120000
index 0000000..cc85358
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/zconf.h b/6/platforms/android-4/arch-x86/usr/include/linux/zconf.h
new file mode 120000
index 0000000..2fd8b28
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/zlib.h b/6/platforms/android-4/arch-x86/usr/include/linux/zlib.h
new file mode 120000
index 0000000..592525d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/linux/zorro_ids.h b/6/platforms/android-4/arch-x86/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..0c19970
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/locale.h b/6/platforms/android-4/arch-x86/usr/include/locale.h
new file mode 120000
index 0000000..0fba85b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/malloc.h b/6/platforms/android-4/arch-x86/usr/include/malloc.h
new file mode 120000
index 0000000..a94d484
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/math.h b/6/platforms/android-4/arch-x86/usr/include/math.h
new file mode 120000
index 0000000..187b71a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/memory.h b/6/platforms/android-4/arch-x86/usr/include/memory.h
new file mode 120000
index 0000000..c9a574f
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/mntent.h b/6/platforms/android-4/arch-x86/usr/include/mntent.h
new file mode 120000
index 0000000..15d67c2
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-abi.h b/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..e8a020e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-user.h b/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..eb1df9a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/ethertypes.h b/6/platforms/android-4/arch-x86/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..16b9856
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if.h b/6/platforms/android-4/arch-x86/usr/include/net/if.h
new file mode 120000
index 0000000..b98bb97
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_arp.h b/6/platforms/android-4/arch-x86/usr/include/net/if_arp.h
new file mode 120000
index 0000000..0bef01a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_dl.h b/6/platforms/android-4/arch-x86/usr/include/net/if_dl.h
new file mode 120000
index 0000000..dee2328
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_ether.h b/6/platforms/android-4/arch-x86/usr/include/net/if_ether.h
new file mode 120000
index 0000000..e7cbffc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_ieee1394.h b/6/platforms/android-4/arch-x86/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..66c4456
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_packet.h b/6/platforms/android-4/arch-x86/usr/include/net/if_packet.h
new file mode 120000
index 0000000..432f5b9
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/if_types.h b/6/platforms/android-4/arch-x86/usr/include/net/if_types.h
new file mode 120000
index 0000000..8ffdb5b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/net/route.h b/6/platforms/android-4/arch-x86/usr/include/net/route.h
new file mode 120000
index 0000000..9a5aa24
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netdb.h b/6/platforms/android-4/arch-x86/usr/include/netdb.h
new file mode 120000
index 0000000..120689e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/ether.h b/6/platforms/android-4/arch-x86/usr/include/netinet/ether.h
new file mode 120000
index 0000000..efc9cc3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/if_ether.h b/6/platforms/android-4/arch-x86/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..b9cd1bf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/in.h b/6/platforms/android-4/arch-x86/usr/include/netinet/in.h
new file mode 120000
index 0000000..cf2effb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/in6.h b/6/platforms/android-4/arch-x86/usr/include/netinet/in6.h
new file mode 120000
index 0000000..27a579b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/in_systm.h b/6/platforms/android-4/arch-x86/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..3e7f4fd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/ip.h b/6/platforms/android-4/arch-x86/usr/include/netinet/ip.h
new file mode 120000
index 0000000..46a1779
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/ip_icmp.h b/6/platforms/android-4/arch-x86/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..7747c9a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/tcp.h b/6/platforms/android-4/arch-x86/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..832483b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netinet/udp.h b/6/platforms/android-4/arch-x86/usr/include/netinet/udp.h
new file mode 120000
index 0000000..6d8ec5e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/netpacket/packet.h b/6/platforms/android-4/arch-x86/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..99d9d27
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/nsswitch.h b/6/platforms/android-4/arch-x86/usr/include/nsswitch.h
new file mode 120000
index 0000000..f14f5ed
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/pathconf.h b/6/platforms/android-4/arch-x86/usr/include/pathconf.h
new file mode 120000
index 0000000..c847e15
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/paths.h b/6/platforms/android-4/arch-x86/usr/include/paths.h
new file mode 120000
index 0000000..1fcf8d3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/poll.h b/6/platforms/android-4/arch-x86/usr/include/poll.h
new file mode 120000
index 0000000..d98e04e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/pthread.h b/6/platforms/android-4/arch-x86/usr/include/pthread.h
new file mode 120000
index 0000000..985a61d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/pthread.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/pthread.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/pwd.h b/6/platforms/android-4/arch-x86/usr/include/pwd.h
new file mode 120000
index 0000000..e33f0f1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/resolv.h b/6/platforms/android-4/arch-x86/usr/include/resolv.h
new file mode 120000
index 0000000..84e5b94
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sched.h b/6/platforms/android-4/arch-x86/usr/include/sched.h
new file mode 120000
index 0000000..fd1f462
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sched.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/sched.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/semaphore.h b/6/platforms/android-4/arch-x86/usr/include/semaphore.h
new file mode 120000
index 0000000..d2bfd48
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/setjmp.h b/6/platforms/android-4/arch-x86/usr/include/setjmp.h
new file mode 120000
index 0000000..b8b17ac
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sgtty.h b/6/platforms/android-4/arch-x86/usr/include/sgtty.h
new file mode 120000
index 0000000..c930750
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sha1.h b/6/platforms/android-4/arch-x86/usr/include/sha1.h
new file mode 120000
index 0000000..0c275cd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/signal.h b/6/platforms/android-4/arch-x86/usr/include/signal.h
new file mode 120000
index 0000000..e51d2e6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/stdint.h b/6/platforms/android-4/arch-x86/usr/include/stdint.h
new file mode 120000
index 0000000..b258a7e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/stdio.h b/6/platforms/android-4/arch-x86/usr/include/stdio.h
new file mode 120000
index 0000000..101a987
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/stdlib.h b/6/platforms/android-4/arch-x86/usr/include/stdlib.h
new file mode 120000
index 0000000..6a4f02d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/stdlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/stdlib.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/string.h b/6/platforms/android-4/arch-x86/usr/include/string.h
new file mode 120000
index 0000000..a706db7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/strings.h b/6/platforms/android-4/arch-x86/usr/include/strings.h
new file mode 120000
index 0000000..406a4eb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/_errdefs.h b/6/platforms/android-4/arch-x86/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..ca17cdc
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/_sigdefs.h b/6/platforms/android-4/arch-x86/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..f82b008
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/_system_properties.h b/6/platforms/android-4/arch-x86/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..57c4079
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/_types.h b/6/platforms/android-4/arch-x86/usr/include/sys/_types.h
new file mode 120000
index 0000000..989870e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/atomics.h b/6/platforms/android-4/arch-x86/usr/include/sys/atomics.h
new file mode 120000
index 0000000..4067998
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/cdefs.h b/6/platforms/android-4/arch-x86/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..a189f74
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/cdefs_elf.h b/6/platforms/android-4/arch-x86/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..2f535e3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/dirent.h b/6/platforms/android-4/arch-x86/usr/include/sys/dirent.h
new file mode 120000
index 0000000..b65a3b1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/endian.h b/6/platforms/android-4/arch-x86/usr/include/sys/endian.h
new file mode 120000
index 0000000..bc82125
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/epoll.h b/6/platforms/android-4/arch-x86/usr/include/sys/epoll.h
new file mode 120000
index 0000000..286d617
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/errno.h b/6/platforms/android-4/arch-x86/usr/include/sys/errno.h
new file mode 120000
index 0000000..35cb55c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/exec_elf.h b/6/platforms/android-4/arch-x86/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..8e3dc65
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/file.h b/6/platforms/android-4/arch-x86/usr/include/sys/file.h
new file mode 120000
index 0000000..a6e345e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/fsuid.h b/6/platforms/android-4/arch-x86/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..5d0655a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/inotify.h b/6/platforms/android-4/arch-x86/usr/include/sys/inotify.h
new file mode 120000
index 0000000..cffdbc8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ioctl.h b/6/platforms/android-4/arch-x86/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..e0a6963
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ioctl_compat.h b/6/platforms/android-4/arch-x86/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..74079b8
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ipc.h b/6/platforms/android-4/arch-x86/usr/include/sys/ipc.h
new file mode 120000
index 0000000..fb09713
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/klog.h b/6/platforms/android-4/arch-x86/usr/include/sys/klog.h
new file mode 120000
index 0000000..d529308
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/limits.h b/6/platforms/android-4/arch-x86/usr/include/sys/limits.h
new file mode 120000
index 0000000..5ea6508
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/linux-syscalls.h b/6/platforms/android-4/arch-x86/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..8005e06
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/linux-unistd.h b/6/platforms/android-4/arch-x86/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..39c9e36
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/mman.h b/6/platforms/android-4/arch-x86/usr/include/sys/mman.h
new file mode 120000
index 0000000..87882bb
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/mount.h b/6/platforms/android-4/arch-x86/usr/include/sys/mount.h
new file mode 120000
index 0000000..da6ffd7
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/param.h b/6/platforms/android-4/arch-x86/usr/include/sys/param.h
new file mode 120000
index 0000000..ad64aa6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/poll.h b/6/platforms/android-4/arch-x86/usr/include/sys/poll.h
new file mode 120000
index 0000000..742932e
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/prctl.h b/6/platforms/android-4/arch-x86/usr/include/sys/prctl.h
new file mode 120000
index 0000000..ac59e3c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ptrace.h b/6/platforms/android-4/arch-x86/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..717d29d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/queue.h b/6/platforms/android-4/arch-x86/usr/include/sys/queue.h
new file mode 120000
index 0000000..b485339
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/reboot.h b/6/platforms/android-4/arch-x86/usr/include/sys/reboot.h
new file mode 120000
index 0000000..8a7f44a
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/resource.h b/6/platforms/android-4/arch-x86/usr/include/sys/resource.h
new file mode 120000
index 0000000..64bfef1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/select.h b/6/platforms/android-4/arch-x86/usr/include/sys/select.h
new file mode 120000
index 0000000..3dd584c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/sendfile.h b/6/platforms/android-4/arch-x86/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..8601939
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/socket.h b/6/platforms/android-4/arch-x86/usr/include/sys/socket.h
new file mode 120000
index 0000000..5830b42
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/socketcalls.h b/6/platforms/android-4/arch-x86/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..7fae906
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/stat.h b/6/platforms/android-4/arch-x86/usr/include/sys/stat.h
new file mode 120000
index 0000000..925f4ec
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/statfs.h b/6/platforms/android-4/arch-x86/usr/include/sys/statfs.h
new file mode 120000
index 0000000..2a39c26
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/syscall.h b/6/platforms/android-4/arch-x86/usr/include/sys/syscall.h
new file mode 120000
index 0000000..2361395
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/sysconf.h b/6/platforms/android-4/arch-x86/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..790b913
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/sysinfo.h b/6/platforms/android-4/arch-x86/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..a7df995
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/syslimits.h b/6/platforms/android-4/arch-x86/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..82fd3bd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/sysmacros.h b/6/platforms/android-4/arch-x86/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..65394fd
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/system_properties.h b/6/platforms/android-4/arch-x86/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..924ed85
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/time.h b/6/platforms/android-4/arch-x86/usr/include/sys/time.h
new file mode 120000
index 0000000..dd176d5
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/timeb.h b/6/platforms/android-4/arch-x86/usr/include/sys/timeb.h
new file mode 120000
index 0000000..7699b46
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/times.h b/6/platforms/android-4/arch-x86/usr/include/sys/times.h
new file mode 120000
index 0000000..c615e31
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ttychars.h b/6/platforms/android-4/arch-x86/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..b1f30b0
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/ttydev.h b/6/platforms/android-4/arch-x86/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..67412f6
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/types.h b/6/platforms/android-4/arch-x86/usr/include/sys/types.h
new file mode 120000
index 0000000..46e8823
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/uio.h b/6/platforms/android-4/arch-x86/usr/include/sys/uio.h
new file mode 120000
index 0000000..34ab132
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/un.h b/6/platforms/android-4/arch-x86/usr/include/sys/un.h
new file mode 120000
index 0000000..078186d
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/utime.h b/6/platforms/android-4/arch-x86/usr/include/sys/utime.h
new file mode 120000
index 0000000..3399fab
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/utsname.h b/6/platforms/android-4/arch-x86/usr/include/sys/utsname.h
new file mode 120000
index 0000000..6cc1853
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/vfs.h b/6/platforms/android-4/arch-x86/usr/include/sys/vfs.h
new file mode 120000
index 0000000..bf93b7c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/vt.h b/6/platforms/android-4/arch-x86/usr/include/sys/vt.h
new file mode 120000
index 0000000..b289727
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/sys/wait.h b/6/platforms/android-4/arch-x86/usr/include/sys/wait.h
new file mode 120000
index 0000000..2323f7b
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-3/arch-x86/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/syslog.h b/6/platforms/android-4/arch-x86/usr/include/syslog.h
new file mode 120000
index 0000000..3b60a93
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/termio.h b/6/platforms/android-4/arch-x86/usr/include/termio.h
new file mode 120000
index 0000000..dd1aa99
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/termios.h b/6/platforms/android-4/arch-x86/usr/include/termios.h
new file mode 120000
index 0000000..01cdc50
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/thread_db.h b/6/platforms/android-4/arch-x86/usr/include/thread_db.h
new file mode 120000
index 0000000..5e6d1ec
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/time.h b/6/platforms/android-4/arch-x86/usr/include/time.h
new file mode 120000
index 0000000..ab59e4c
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/time64.h b/6/platforms/android-4/arch-x86/usr/include/time64.h
new file mode 120000
index 0000000..3818fe1
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/unistd.h b/6/platforms/android-4/arch-x86/usr/include/unistd.h
new file mode 120000
index 0000000..7153041
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/unistd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/util.h b/6/platforms/android-4/arch-x86/usr/include/util.h
new file mode 120000
index 0000000..d885201
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/utime.h b/6/platforms/android-4/arch-x86/usr/include/utime.h
new file mode 120000
index 0000000..b8abc13
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/utmp.h b/6/platforms/android-4/arch-x86/usr/include/utmp.h
new file mode 120000
index 0000000..487d458
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/wchar.h b/6/platforms/android-4/arch-x86/usr/include/wchar.h
new file mode 120000
index 0000000..5d903e3
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/wchar.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/wchar.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/wctype.h b/6/platforms/android-4/arch-x86/usr/include/wctype.h
new file mode 120000
index 0000000..80b24af
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/zconf.h b/6/platforms/android-4/arch-x86/usr/include/zconf.h
new file mode 120000
index 0000000..752ebdf
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-4/arch-x86/usr/include/zlib.h b/6/platforms/android-4/arch-x86/usr/include/zlib.h
new file mode 120000
index 0000000..be4fd81
--- /dev/null
+++ b/6/platforms/android-4/arch-x86/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-3/arch-x86/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES/gl.h b/6/platforms/android-5/arch-arm/usr/include/GLES/gl.h
new file mode 120000
index 0000000..f277064
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES/glext.h b/6/platforms/android-5/arch-arm/usr/include/GLES/glext.h
new file mode 120000
index 0000000..2e75236
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES/glplatform.h b/6/platforms/android-5/arch-arm/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..473ab9d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2.h b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2.h
new file mode 100644
index 0000000..0182a67
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2.h
@@ -0,0 +1,620 @@
+#ifndef __gl2_h_
+#define __gl2_h_
+
+/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+
+#include <GLES2/gl2platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/*-------------------------------------------------------------------------
+ * Data type definitions
+ *-----------------------------------------------------------------------*/
+
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef khronos_int8_t GLbyte;
+typedef short GLshort;
+typedef int GLint;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned int GLuint;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+
+/* GL types for handling large vertex buffer objects */
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
+
+/* OpenGL ES core versions */
+#define GL_ES_VERSION_2_0 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+
+/* Boolean */
+#define GL_FALSE 0
+#define GL_TRUE 1
+
+/* BeginMode */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+
+/* AlphaFunction (not supported in ES20) */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* BlendingFactorDest */
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+
+/* BlendingFactorSrc */
+/* GL_ZERO */
+/* GL_ONE */
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+/* GL_SRC_ALPHA */
+/* GL_ONE_MINUS_SRC_ALPHA */
+/* GL_DST_ALPHA */
+/* GL_ONE_MINUS_DST_ALPHA */
+
+/* BlendEquationSeparate */
+#define GL_FUNC_ADD 0x8006
+#define GL_BLEND_EQUATION 0x8009
+#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+
+/* BlendSubtract */
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+
+/* Separate Blend Functions */
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STATIC_DRAW 0x88E4
+#define GL_DYNAMIC_DRAW 0x88E8
+
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+
+/* CullFaceMode */
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_FRONT_AND_BACK 0x0408
+
+/* DepthFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* EnableCap */
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_CULL_FACE 0x0B44
+#define GL_BLEND 0x0BE2
+#define GL_DITHER 0x0BD0
+#define GL_STENCIL_TEST 0x0B90
+#define GL_DEPTH_TEST 0x0B71
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_COVERAGE 0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_OUT_OF_MEMORY 0x0505
+
+/* FrontFaceDirection */
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+
+/* GetPName */
+#define GL_LINE_WIDTH 0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#define GL_VIEWPORT 0x0BA2
+#define GL_SCISSOR_BOX 0x0C10
+/* GL_SCISSOR_TEST */
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_RED_BITS 0x0D52
+#define GL_GREEN_BITS 0x0D53
+#define GL_BLUE_BITS 0x0D54
+#define GL_ALPHA_BITS 0x0D55
+#define GL_DEPTH_BITS 0x0D56
+#define GL_STENCIL_BITS 0x0D57
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+/* GL_POLYGON_OFFSET_FILL */
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+
+/* GetTextureParameter */
+/* GL_TEXTURE_MAG_FILTER */
+/* GL_TEXTURE_MIN_FILTER */
+/* GL_TEXTURE_WRAP_S */
+/* GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+
+/* HintTarget */
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+
+/* DataType */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_FIXED 0x140C
+
+/* PixelFormat */
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+
+/* PixelType */
+/* GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+
+/* Shaders */
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_DELETE_STATUS 0x8B80
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+
+/* StencilFunction */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+
+/* StencilOp */
+/* GL_ZERO */
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+#define GL_INVERT 0x150A
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+
+/* StringName */
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+
+/* TextureMagFilter */
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+
+/* TextureMinFilter */
+/* GL_NEAREST */
+/* GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+
+/* TextureTarget */
+/* GL_TEXTURE_2D */
+#define GL_TEXTURE 0x1702
+
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+
+/* TextureUnit */
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+
+/* TextureWrapMode */
+#define GL_REPEAT 0x2901
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_MIRRORED_REPEAT 0x8370
+
+/* Uniform Types */
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_CUBE 0x8B60
+
+/* Vertex Arrays */
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+
+/* Read Format */
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+
+/* Shader Source */
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_SHADER_COMPILER 0x8DFA
+
+/* Shader Binary */
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+
+/* Shader Precision-Specified Types */
+#define GL_LOW_FLOAT 0x8DF0
+#define GL_MEDIUM_FLOAT 0x8DF1
+#define GL_HIGH_FLOAT 0x8DF2
+#define GL_LOW_INT 0x8DF3
+#define GL_MEDIUM_INT 0x8DF4
+#define GL_HIGH_INT 0x8DF5
+
+/* Framebuffer Object. */
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_RENDERBUFFER 0x8D41
+
+#define GL_RGBA4 0x8056
+#define GL_RGB5_A1 0x8057
+#define GL_RGB565 0x8D62
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_STENCIL_INDEX 0x1901
+#define GL_STENCIL_INDEX8 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_STENCIL_ATTACHMENT 0x8D20
+
+#define GL_NONE 0
+
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+
+/*-------------------------------------------------------------------------
+ * GL core functions.
+ *-----------------------------------------------------------------------*/
+
+GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
+GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
+GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
+GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
+GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glFinish (void);
+GL_APICALL void GL_APIENTRY glFlush (void);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
+GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
+GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL GLenum GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
+GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
+GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
+GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
+GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
+GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2_h_ */
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2ext.h b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2ext.h
new file mode 100644
index 0000000..72f1ae7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2ext.h
@@ -0,0 +1,518 @@
+#ifndef __gl2ext_h_
+#define __gl2ext_h_
+
+/* $Revision: 8271 $ on $Date:: 2009-05-21 09:33:40 -0700 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+# define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES 0x8D64
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES 0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES 0x81A7
+#endif
+
+/* GL_OES_depth_texture */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
+#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES 0x88B9
+#define GL_BUFFER_ACCESS_OES 0x88BB
+#define GL_BUFFER_MAPPED_OES 0x88BC
+#define GL_BUFFER_MAP_POINTER_OES 0x88BD
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES 0x84F9
+#define GL_UNSIGNED_INT_24_8_OES 0x84FA
+#define GL_DEPTH24_STENCIL8_OES 0x88F0
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES 0x8051
+#define GL_RGBA8_OES 0x8058
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES 0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES 0x8D47
+#endif
+
+/* GL_OES_texture3D */
+#ifndef GL_OES_texture3D
+#define GL_TEXTURE_WRAP_R_OES 0x8072
+#define GL_TEXTURE_3D_OES 0x806F
+#define GL_TEXTURE_BINDING_3D_OES 0x806A
+#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
+#define GL_SAMPLER_3D_OES 0x8B5F
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_HALF_FLOAT_OES 0x8D61
+#endif
+
+/* GL_OES_vertex_half_float */
+/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
+#define GL_INT_10_10_10_2_OES 0x8DF7
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD 0x87F9
+#define GL_3DC_XY_AMD 0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD 0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD 0x8740
+#endif
+
+/* GL_AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_COUNTER_TYPE_AMD 0x8BC0
+#define GL_COUNTER_RANGE_AMD 0x8BC1
+#define GL_UNSIGNED_INT64_AMD 0x8BC2
+#define GL_PERCENTAGE_AMD 0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
+#define GL_PERFMON_RESULT_AMD 0x8BC6
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA 0x80E1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_depth_texture */
+#ifndef GL_OES_depth_texture
+#define GL_OES_depth_texture 1
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fragment_precision_high */
+#ifndef GL_OES_fragment_precision_high
+#define GL_OES_fragment_precision_high 1
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_OES_get_program_binary 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_OES_standard_derivatives 1
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_OES_texture_3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
+/* GL_OES_texture_float */
+#ifndef GL_OES_texture_float
+#define GL_OES_texture_float 1
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_OES_texture_half_float 1
+#endif
+
+/* GL_OES_texture_npot */
+#ifndef GL_OES_texture_npot
+#define GL_OES_texture_npot 1
+#endif
+
+/* GL_OES_vertex_half_float */
+#ifndef GL_OES_vertex_half_float
+#define GL_OES_vertex_half_float 1
+#endif
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_OES_vertex_type_10_10_10_2 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
+/* AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
+GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
+GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
+GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
+GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2ext_h_ */
diff --git a/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2platform.h b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2platform.h
new file mode 100644
index 0000000..3e9036c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/GLES2/gl2platform.h
@@ -0,0 +1,29 @@
+#ifndef __gl2platform_h_
+#define __gl2platform_h_
+
+/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
+ * Last modified on 2008/12/19
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+#ifndef GL_APICALL
+#define GL_APICALL KHRONOS_APICALL
+#endif
+
+#define GL_APIENTRY KHRONOS_APIENTRY
+
+#endif /* __gl2platform_h_ */
diff --git a/6/platforms/android-5/arch-arm/usr/include/KHR/khrplatform.h b/6/platforms/android-5/arch-arm/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..e9418bf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/alloca.h b/6/platforms/android-5/arch-arm/usr/include/alloca.h
new file mode 120000
index 0000000..7ccc6ed
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/android/api-level.h b/6/platforms/android-5/arch-arm/usr/include/android/api-level.h
new file mode 100644
index 0000000..2280147
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 5
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-5/arch-arm/usr/include/android/log.h b/6/platforms/android-5/arch-arm/usr/include/android/log.h
new file mode 120000
index 0000000..e5fa5c5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/arpa/inet.h b/6/platforms/android-5/arch-arm/usr/include/arpa/inet.h
new file mode 120000
index 0000000..ca560f7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/arpa/nameser.h b/6/platforms/android-5/arch-arm/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..3c2822b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..d0f0213
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..d6fbbc8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..4188784
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..252ca44
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..6927dc9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/find.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..cf82fc1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..804fecf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..ea0a489
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/le.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..fdf5699
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..75115c7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/bug.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..a32f327
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/cputime.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..fffaecb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..e91bb71
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno-base.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..d925371
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..3173d64
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/fcntl.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..fe63d4a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/futex.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..9c2c77b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/ioctl.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..436b154
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/ipc.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..b8165d2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/local.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..42b9d92
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/memory_model.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..def10ad
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/mman.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..1c7935d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..0044a7b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/percpu.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..5775fac
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..267b6b2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..5e76cb7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/poll.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..0d16fa7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/resource.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..ac253f1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/sections.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..02f0cce
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/siginfo.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..677ebc4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/signal.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..1ea1206
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/tlb.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..36c40e1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/topology.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..7e6aee4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm-generic/xor.h b/6/platforms/android-5/arch-arm/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..601c246
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/a.out.h b/6/platforms/android-5/arch-arm/usr/include/asm/a.out.h
new file mode 120000
index 0000000..6dd8aa1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/board-perseus2.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/board-perseus2.h
new file mode 120000
index 0000000..8d9fc62
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/board-perseus2.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/board-perseus2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/board.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/board.h
new file mode 120000
index 0000000..aaaee07
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/board.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/board.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/cpu.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/cpu.h
new file mode 120000
index 0000000..fe622ec
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/cpu.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/dma.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/dma.h
new file mode 120000
index 0000000..4bdd2d1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/dma.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/dma.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/fpga.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/fpga.h
new file mode 120000
index 0000000..9703789
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/fpga.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/fpga.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio-switch.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio-switch.h
new file mode 120000
index 0000000..57fdbc2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio-switch.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/gpio-switch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio.h
new file mode 120000
index 0000000..2b5130d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/gpio.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/gpio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/hardware.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/hardware.h
new file mode 120000
index 0000000..f9c7722
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/hardware.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/io.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/io.h
new file mode 120000
index 0000000..8d30d54
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/io.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/io.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/irqs.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/irqs.h
new file mode 120000
index 0000000..8267834
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/irqs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/irqs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/mcbsp.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mcbsp.h
new file mode 120000
index 0000000..82df31a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mcbsp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/mcbsp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/memory.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/memory.h
new file mode 120000
index 0000000..064b457
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/memory.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/memory.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/mtd-xip.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mtd-xip.h
new file mode 120000
index 0000000..ac10285
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/mux.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mux.h
new file mode 120000
index 0000000..eddef8b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/mux.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/mux.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/omap24xx.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/omap24xx.h
new file mode 120000
index 0000000..f3b1817
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/omap24xx.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/omap24xx.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/serial.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/serial.h
new file mode 120000
index 0000000..622025f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/serial.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/serial.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/timex.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/timex.h
new file mode 120000
index 0000000..95d0994
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/timex.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/timex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/arch/vmalloc.h b/6/platforms/android-5/arch-arm/usr/include/asm/arch/vmalloc.h
new file mode 120000
index 0000000..5fc5a9f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/arch/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/asm/arch/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/atomic.h b/6/platforms/android-5/arch-arm/usr/include/asm/atomic.h
new file mode 120000
index 0000000..8a7ffeb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/atomic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/auxvec.h b/6/platforms/android-5/arch-arm/usr/include/asm/auxvec.h
new file mode 120000
index 0000000..7cd185b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/bitops.h b/6/platforms/android-5/arch-arm/usr/include/asm/bitops.h
new file mode 120000
index 0000000..7847a8d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/byteorder.h b/6/platforms/android-5/arch-arm/usr/include/asm/byteorder.h
new file mode 120000
index 0000000..232b3fe
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/byteorder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/byteorder.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/cache.h b/6/platforms/android-5/arch-arm/usr/include/asm/cache.h
new file mode 120000
index 0000000..2d8eabe
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/cache.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/cacheflush.h b/6/platforms/android-5/arch-arm/usr/include/asm/cacheflush.h
new file mode 120000
index 0000000..e8a71a0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/cacheflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/cacheflush.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/cputime.h b/6/platforms/android-5/arch-arm/usr/include/asm/cputime.h
new file mode 120000
index 0000000..8544c19
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/delay.h b/6/platforms/android-5/arch-arm/usr/include/asm/delay.h
new file mode 120000
index 0000000..6d5867f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/delay.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/div64.h b/6/platforms/android-5/arch-arm/usr/include/asm/div64.h
new file mode 120000
index 0000000..eaf4eb3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/div64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/div64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/dma-mapping.h b/6/platforms/android-5/arch-arm/usr/include/asm/dma-mapping.h
new file mode 120000
index 0000000..e5c11a3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/dma.h b/6/platforms/android-5/arch-arm/usr/include/asm/dma.h
new file mode 120000
index 0000000..0fcc3df
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/dma.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/dma.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/domain.h b/6/platforms/android-5/arch-arm/usr/include/asm/domain.h
new file mode 120000
index 0000000..6fe720a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/domain.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/domain.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/dyntick.h b/6/platforms/android-5/arch-arm/usr/include/asm/dyntick.h
new file mode 120000
index 0000000..2c3ce89
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/dyntick.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/dyntick.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/elf.h b/6/platforms/android-5/arch-arm/usr/include/asm/elf.h
new file mode 120000
index 0000000..2110205
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/errno.h b/6/platforms/android-5/arch-arm/usr/include/asm/errno.h
new file mode 120000
index 0000000..277a9a2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/fcntl.h b/6/platforms/android-5/arch-arm/usr/include/asm/fcntl.h
new file mode 120000
index 0000000..2195551
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/fpstate.h b/6/platforms/android-5/arch-arm/usr/include/asm/fpstate.h
new file mode 120000
index 0000000..8c09b64
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/fpstate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/fpstate.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/glue.h b/6/platforms/android-5/arch-arm/usr/include/asm/glue.h
new file mode 120000
index 0000000..35eb1e0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/glue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/glue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/hardirq.h b/6/platforms/android-5/arch-arm/usr/include/asm/hardirq.h
new file mode 120000
index 0000000..0822352
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/hardware.h b/6/platforms/android-5/arch-arm/usr/include/asm/hardware.h
new file mode 120000
index 0000000..e7ba327
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/hardware.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/hw_irq.h b/6/platforms/android-5/arch-arm/usr/include/asm/hw_irq.h
new file mode 120000
index 0000000..cf1be42
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/hw_irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/hw_irq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/ide.h b/6/platforms/android-5/arch-arm/usr/include/asm/ide.h
new file mode 120000
index 0000000..af6c715
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/ide.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/ide.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/io.h b/6/platforms/android-5/arch-arm/usr/include/asm/io.h
new file mode 120000
index 0000000..a90a573
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/io.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/io.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/ioctl.h b/6/platforms/android-5/arch-arm/usr/include/asm/ioctl.h
new file mode 120000
index 0000000..44d7d41
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/ioctls.h b/6/platforms/android-5/arch-arm/usr/include/asm/ioctls.h
new file mode 120000
index 0000000..ff9ed98
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/ioctls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/ioctls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/ipcbuf.h b/6/platforms/android-5/arch-arm/usr/include/asm/ipcbuf.h
new file mode 120000
index 0000000..ddf90eb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/ipcbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/ipcbuf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/irq.h b/6/platforms/android-5/arch-arm/usr/include/asm/irq.h
new file mode 120000
index 0000000..1ecb890
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/irq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/linkage.h b/6/platforms/android-5/arch-arm/usr/include/asm/linkage.h
new file mode 120000
index 0000000..1f2a4ab
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/local.h b/6/platforms/android-5/arch-arm/usr/include/asm/local.h
new file mode 120000
index 0000000..d531b2d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/local.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/locks.h b/6/platforms/android-5/arch-arm/usr/include/asm/locks.h
new file mode 120000
index 0000000..33b23b1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/locks.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/mc146818rtc.h b/6/platforms/android-5/arch-arm/usr/include/asm/mc146818rtc.h
new file mode 120000
index 0000000..5b3fda2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/memory.h b/6/platforms/android-5/arch-arm/usr/include/asm/memory.h
new file mode 120000
index 0000000..0f4b460
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/memory.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/memory.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/mman.h b/6/platforms/android-5/arch-arm/usr/include/asm/mman.h
new file mode 120000
index 0000000..ebc297d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/mman.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/module.h b/6/platforms/android-5/arch-arm/usr/include/asm/module.h
new file mode 120000
index 0000000..5146059
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/module.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/msgbuf.h b/6/platforms/android-5/arch-arm/usr/include/asm/msgbuf.h
new file mode 120000
index 0000000..e8d73c4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/msgbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/msgbuf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/mtd-xip.h b/6/platforms/android-5/arch-arm/usr/include/asm/mtd-xip.h
new file mode 120000
index 0000000..4c0b05c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/page.h b/6/platforms/android-5/arch-arm/usr/include/asm/page.h
new file mode 120000
index 0000000..e4b1ff0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/page.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/page.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/param.h b/6/platforms/android-5/arch-arm/usr/include/asm/param.h
new file mode 120000
index 0000000..a798e60
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/param.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/percpu.h b/6/platforms/android-5/arch-arm/usr/include/asm/percpu.h
new file mode 120000
index 0000000..f5de2a1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/pgalloc.h b/6/platforms/android-5/arch-arm/usr/include/asm/pgalloc.h
new file mode 120000
index 0000000..126c5e3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/pgalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/pgalloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/pgtable-hwdef.h b/6/platforms/android-5/arch-arm/usr/include/asm/pgtable-hwdef.h
new file mode 120000
index 0000000..56578a5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/pgtable-hwdef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/pgtable-hwdef.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/pgtable.h b/6/platforms/android-5/arch-arm/usr/include/asm/pgtable.h
new file mode 120000
index 0000000..c99dc3d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/poll.h b/6/platforms/android-5/arch-arm/usr/include/asm/poll.h
new file mode 120000
index 0000000..4a37b36
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/posix_types.h b/6/platforms/android-5/arch-arm/usr/include/asm/posix_types.h
new file mode 120000
index 0000000..d029bae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/proc-fns.h b/6/platforms/android-5/arch-arm/usr/include/asm/proc-fns.h
new file mode 120000
index 0000000..c6c2324
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/proc-fns.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/proc-fns.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/processor.h b/6/platforms/android-5/arch-arm/usr/include/asm/processor.h
new file mode 120000
index 0000000..d658dbe
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/processor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/processor.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/procinfo.h b/6/platforms/android-5/arch-arm/usr/include/asm/procinfo.h
new file mode 120000
index 0000000..4abe789
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/procinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/procinfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/ptrace.h b/6/platforms/android-5/arch-arm/usr/include/asm/ptrace.h
new file mode 120000
index 0000000..f6787de
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/resource.h b/6/platforms/android-5/arch-arm/usr/include/asm/resource.h
new file mode 120000
index 0000000..4b44338
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/scatterlist.h b/6/platforms/android-5/arch-arm/usr/include/asm/scatterlist.h
new file mode 120000
index 0000000..9b3ca81
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/scatterlist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/scatterlist.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/semaphore.h b/6/platforms/android-5/arch-arm/usr/include/asm/semaphore.h
new file mode 120000
index 0000000..4d58998
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/semaphore.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/sembuf.h b/6/platforms/android-5/arch-arm/usr/include/asm/sembuf.h
new file mode 120000
index 0000000..24db70f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/sembuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/sembuf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/shmbuf.h b/6/platforms/android-5/arch-arm/usr/include/asm/shmbuf.h
new file mode 120000
index 0000000..0231191
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/shmbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/shmbuf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/shmparam.h b/6/platforms/android-5/arch-arm/usr/include/asm/shmparam.h
new file mode 120000
index 0000000..8843d15
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/shmparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/shmparam.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/sigcontext.h b/6/platforms/android-5/arch-arm/usr/include/asm/sigcontext.h
new file mode 120000
index 0000000..1d946d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/sigcontext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/sigcontext.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/siginfo.h b/6/platforms/android-5/arch-arm/usr/include/asm/siginfo.h
new file mode 120000
index 0000000..7b7ecd8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/signal.h b/6/platforms/android-5/arch-arm/usr/include/asm/signal.h
new file mode 120000
index 0000000..e1f58aa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/sizes.h b/6/platforms/android-5/arch-arm/usr/include/asm/sizes.h
new file mode 120000
index 0000000..e0ce987
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/sizes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/sizes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/smp.h b/6/platforms/android-5/arch-arm/usr/include/asm/smp.h
new file mode 120000
index 0000000..33ebc3e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/smp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/socket.h b/6/platforms/android-5/arch-arm/usr/include/asm/socket.h
new file mode 120000
index 0000000..477f5da
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/socket.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/sockios.h b/6/platforms/android-5/arch-arm/usr/include/asm/sockios.h
new file mode 120000
index 0000000..4f76240
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/spinlock.h b/6/platforms/android-5/arch-arm/usr/include/asm/spinlock.h
new file mode 120000
index 0000000..10b1160
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/spinlock_types.h b/6/platforms/android-5/arch-arm/usr/include/asm/spinlock_types.h
new file mode 120000
index 0000000..775fbd6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/stat.h b/6/platforms/android-5/arch-arm/usr/include/asm/stat.h
new file mode 120000
index 0000000..c5b1a1c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/statfs.h b/6/platforms/android-5/arch-arm/usr/include/asm/statfs.h
new file mode 120000
index 0000000..f4d71be
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/suspend.h b/6/platforms/android-5/arch-arm/usr/include/asm/suspend.h
new file mode 120000
index 0000000..8bb7d85
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/suspend.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/suspend.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/system.h b/6/platforms/android-5/arch-arm/usr/include/asm/system.h
new file mode 120000
index 0000000..db26547
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/system.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/system.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/termbits.h b/6/platforms/android-5/arch-arm/usr/include/asm/termbits.h
new file mode 120000
index 0000000..692b4a2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/termbits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/termbits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/termios.h b/6/platforms/android-5/arch-arm/usr/include/asm/termios.h
new file mode 120000
index 0000000..4f65ef0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/termios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/thread_info.h b/6/platforms/android-5/arch-arm/usr/include/asm/thread_info.h
new file mode 120000
index 0000000..74338cc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/timex.h b/6/platforms/android-5/arch-arm/usr/include/asm/timex.h
new file mode 120000
index 0000000..d1acbba
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/timex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/tlbflush.h b/6/platforms/android-5/arch-arm/usr/include/asm/tlbflush.h
new file mode 120000
index 0000000..26f13d3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/tlbflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/tlbflush.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/topology.h b/6/platforms/android-5/arch-arm/usr/include/asm/topology.h
new file mode 120000
index 0000000..8291f71
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/topology.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/types.h b/6/platforms/android-5/arch-arm/usr/include/asm/types.h
new file mode 120000
index 0000000..93b963d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/uaccess.h b/6/platforms/android-5/arch-arm/usr/include/asm/uaccess.h
new file mode 120000
index 0000000..af8c749
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/uaccess.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/uaccess.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/unaligned.h b/6/platforms/android-5/arch-arm/usr/include/asm/unaligned.h
new file mode 120000
index 0000000..a93160b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/unaligned.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/unaligned.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/unistd.h b/6/platforms/android-5/arch-arm/usr/include/asm/unistd.h
new file mode 120000
index 0000000..406a93f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/user.h b/6/platforms/android-5/arch-arm/usr/include/asm/user.h
new file mode 120000
index 0000000..8311459
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/user.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/asm/vga.h b/6/platforms/android-5/arch-arm/usr/include/asm/vga.h
new file mode 120000
index 0000000..705f256
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/asm/vga.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/asm/vga.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/assert.h b/6/platforms/android-5/arch-arm/usr/include/assert.h
new file mode 120000
index 0000000..99af813
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/byteswap.h b/6/platforms/android-5/arch-arm/usr/include/byteswap.h
new file mode 120000
index 0000000..d1e5ee2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/ctype.h b/6/platforms/android-5/arch-arm/usr/include/ctype.h
new file mode 120000
index 0000000..5ea2301
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/dirent.h b/6/platforms/android-5/arch-arm/usr/include/dirent.h
new file mode 120000
index 0000000..16a79ce
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/dlfcn.h b/6/platforms/android-5/arch-arm/usr/include/dlfcn.h
new file mode 120000
index 0000000..639aaa6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/elf.h b/6/platforms/android-5/arch-arm/usr/include/elf.h
new file mode 120000
index 0000000..6378e2b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/endian.h b/6/platforms/android-5/arch-arm/usr/include/endian.h
new file mode 120000
index 0000000..bcb1c10
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/err.h b/6/platforms/android-5/arch-arm/usr/include/err.h
new file mode 120000
index 0000000..3d63870
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/errno.h b/6/platforms/android-5/arch-arm/usr/include/errno.h
new file mode 120000
index 0000000..f92c35a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/fcntl.h b/6/platforms/android-5/arch-arm/usr/include/fcntl.h
new file mode 120000
index 0000000..dbbbc42
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/features.h b/6/platforms/android-5/arch-arm/usr/include/features.h
new file mode 120000
index 0000000..c312133
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/fenv.h b/6/platforms/android-5/arch-arm/usr/include/fenv.h
new file mode 120000
index 0000000..701b83a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/fenv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/fenv.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/fnmatch.h b/6/platforms/android-5/arch-arm/usr/include/fnmatch.h
new file mode 120000
index 0000000..ea8ce5b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/getopt.h b/6/platforms/android-5/arch-arm/usr/include/getopt.h
new file mode 120000
index 0000000..1407693
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/grp.h b/6/platforms/android-5/arch-arm/usr/include/grp.h
new file mode 120000
index 0000000..09ec5fd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/inttypes.h b/6/platforms/android-5/arch-arm/usr/include/inttypes.h
new file mode 120000
index 0000000..fab39cf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/jni.h b/6/platforms/android-5/arch-arm/usr/include/jni.h
new file mode 120000
index 0000000..84ab43b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/lastlog.h b/6/platforms/android-5/arch-arm/usr/include/lastlog.h
new file mode 120000
index 0000000..1b21b8a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/libgen.h b/6/platforms/android-5/arch-arm/usr/include/libgen.h
new file mode 120000
index 0000000..b78903f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/limits.h b/6/platforms/android-5/arch-arm/usr/include/limits.h
new file mode 120000
index 0000000..3ab87bc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/a.out.h b/6/platforms/android-5/arch-arm/usr/include/linux/a.out.h
new file mode 120000
index 0000000..097c5de
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/aio_abi.h b/6/platforms/android-5/arch-arm/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..e98ef5e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/akm8976.h b/6/platforms/android-5/arch-arm/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..d9c605d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/android_alarm.h b/6/platforms/android-5/arch-arm/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..f6a8da0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/android_pmem.h b/6/platforms/android-5/arch-arm/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..490694a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/android_power.h b/6/platforms/android-5/arch-arm/usr/include/linux/android_power.h
new file mode 120000
index 0000000..3fe7f9f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/apm_bios.h b/6/platforms/android-5/arch-arm/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..242bfdf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ashmem.h b/6/platforms/android-5/arch-arm/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..010257b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ata.h b/6/platforms/android-5/arch-arm/usr/include/linux/ata.h
new file mode 120000
index 0000000..6acb12a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atm.h b/6/platforms/android-5/arch-arm/usr/include/linux/atm.h
new file mode 120000
index 0000000..2b3dabe
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atmapi.h b/6/platforms/android-5/arch-arm/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..f9bf567
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atmdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..cc5b1d0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atmioc.h b/6/platforms/android-5/arch-arm/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..c0f67d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atmppp.h b/6/platforms/android-5/arch-arm/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..d73d0e4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/atmsap.h b/6/platforms/android-5/arch-arm/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..05c1c56
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/attribute_container.h b/6/platforms/android-5/arch-arm/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..80c1bd8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/auto_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..57e406a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/autoconf.h b/6/platforms/android-5/arch-arm/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..c32264f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/auxvec.h b/6/platforms/android-5/arch-arm/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..13351ca
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/backing-dev.h b/6/platforms/android-5/arch-arm/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..71b03d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/binder.h b/6/platforms/android-5/arch-arm/usr/include/linux/binder.h
new file mode 120000
index 0000000..376972a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/binfmts.h b/6/platforms/android-5/arch-arm/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..9506784
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/bio.h b/6/platforms/android-5/arch-arm/usr/include/linux/bio.h
new file mode 120000
index 0000000..496a029
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/bitmap.h b/6/platforms/android-5/arch-arm/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..bd75623
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/bitops.h b/6/platforms/android-5/arch-arm/usr/include/linux/bitops.h
new file mode 120000
index 0000000..af331e8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/blkdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..239a90b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/blkpg.h b/6/platforms/android-5/arch-arm/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..197951a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/blockgroup_lock.h b/6/platforms/android-5/arch-arm/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..e0eb78d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..0165730
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/generic.h b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..b65f24d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..0058fea
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swab.h b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..8c79bf5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swabb.h b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..927d94e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/cache.h b/6/platforms/android-5/arch-arm/usr/include/linux/cache.h
new file mode 120000
index 0000000..f853821
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/calc64.h b/6/platforms/android-5/arch-arm/usr/include/linux/calc64.h
new file mode 120000
index 0000000..9bb2aa0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/capability.h b/6/platforms/android-5/arch-arm/usr/include/linux/capability.h
new file mode 120000
index 0000000..f124a4a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/capi.h b/6/platforms/android-5/arch-arm/usr/include/linux/capi.h
new file mode 120000
index 0000000..e5d82cc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/cdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/cdev.h
new file mode 120000
index 0000000..1699b00
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/cdrom.h b/6/platforms/android-5/arch-arm/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..c4a35fa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/circ_buf.h b/6/platforms/android-5/arch-arm/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..b53fbb5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/clk.h b/6/platforms/android-5/arch-arm/usr/include/linux/clk.h
new file mode 120000
index 0000000..b6556b1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/coda.h b/6/platforms/android-5/arch-arm/usr/include/linux/coda.h
new file mode 120000
index 0000000..17f9fed
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/coda_fs_i.h b/6/platforms/android-5/arch-arm/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..9e94d52
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/compat.h b/6/platforms/android-5/arch-arm/usr/include/linux/compat.h
new file mode 120000
index 0000000..65aa0d4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/compiler-gcc.h b/6/platforms/android-5/arch-arm/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..6c70f55
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/compiler.h b/6/platforms/android-5/arch-arm/usr/include/linux/compiler.h
new file mode 120000
index 0000000..39d18cb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/completion.h b/6/platforms/android-5/arch-arm/usr/include/linux/completion.h
new file mode 120000
index 0000000..3612f97
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/config.h b/6/platforms/android-5/arch-arm/usr/include/linux/config.h
new file mode 120000
index 0000000..4eae743
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/console_struct.h b/6/platforms/android-5/arch-arm/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..3a9fbdb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/cpu.h b/6/platforms/android-5/arch-arm/usr/include/linux/cpu.h
new file mode 120000
index 0000000..229c581
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/cpumask.h b/6/platforms/android-5/arch-arm/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..9aeb8f0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ctype.h b/6/platforms/android-5/arch-arm/usr/include/linux/ctype.h
new file mode 120000
index 0000000..cf8a48c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/dccp.h b/6/platforms/android-5/arch-arm/usr/include/linux/dccp.h
new file mode 120000
index 0000000..4f86f95
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/debug_locks.h b/6/platforms/android-5/arch-arm/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..bb65d8a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/delay.h b/6/platforms/android-5/arch-arm/usr/include/linux/delay.h
new file mode 120000
index 0000000..a1dc710
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/device.h b/6/platforms/android-5/arch-arm/usr/include/linux/device.h
new file mode 120000
index 0000000..bedc329
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/dirent.h b/6/platforms/android-5/arch-arm/usr/include/linux/dirent.h
new file mode 120000
index 0000000..3240a1a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/dm-ioctl.h b/6/platforms/android-5/arch-arm/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..50a9752
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/dma-mapping.h b/6/platforms/android-5/arch-arm/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..f18d659
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/dmaengine.h b/6/platforms/android-5/arch-arm/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..ca47d6f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/efs_dir.h b/6/platforms/android-5/arch-arm/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..ce8f14e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_i.h b/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..732a509
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_sb.h b/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..933d6b7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/elevator.h b/6/platforms/android-5/arch-arm/usr/include/linux/elevator.h
new file mode 120000
index 0000000..603aa1a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/elf-em.h b/6/platforms/android-5/arch-arm/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..bccda33
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/elf.h b/6/platforms/android-5/arch-arm/usr/include/linux/elf.h
new file mode 120000
index 0000000..2d75df9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/err.h b/6/platforms/android-5/arch-arm/usr/include/linux/err.h
new file mode 120000
index 0000000..4fffbca
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/errno.h b/6/platforms/android-5/arch-arm/usr/include/linux/errno.h
new file mode 120000
index 0000000..200f9e8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/errqueue.h b/6/platforms/android-5/arch-arm/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..5c6640b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/etherdevice.h b/6/platforms/android-5/arch-arm/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..eef79b5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ext2_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..9e76d18
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ext3_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..fe18fa4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/fadvise.h b/6/platforms/android-5/arch-arm/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..9c34eb8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/fb.h b/6/platforms/android-5/arch-arm/usr/include/linux/fb.h
new file mode 120000
index 0000000..336dee3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/fcntl.h b/6/platforms/android-5/arch-arm/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..95ea2ff
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/fd.h b/6/platforms/android-5/arch-arm/usr/include/linux/fd.h
new file mode 120000
index 0000000..8dc694e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/file.h b/6/platforms/android-5/arch-arm/usr/include/linux/file.h
new file mode 120000
index 0000000..02a35e87
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/filter.h b/6/platforms/android-5/arch-arm/usr/include/linux/filter.h
new file mode 120000
index 0000000..389608b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/fs.h
new file mode 120000
index 0000000..e3c60e2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ftape.h b/6/platforms/android-5/arch-arm/usr/include/linux/ftape.h
new file mode 120000
index 0000000..40eb3fc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/futex.h b/6/platforms/android-5/arch-arm/usr/include/linux/futex.h
new file mode 120000
index 0000000..0edd49c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/genhd.h b/6/platforms/android-5/arch-arm/usr/include/linux/genhd.h
new file mode 120000
index 0000000..d76e5f4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/gfp.h b/6/platforms/android-5/arch-arm/usr/include/linux/gfp.h
new file mode 120000
index 0000000..3220e2e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/hardirq.h b/6/platforms/android-5/arch-arm/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..b486232
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-5/arch-arm/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..311cd01
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/hdreg.h b/6/platforms/android-5/arch-arm/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..85a6e9a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/hdsmart.h b/6/platforms/android-5/arch-arm/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..2bcf447
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/highmem.h b/6/platforms/android-5/arch-arm/usr/include/linux/highmem.h
new file mode 120000
index 0000000..fe44851
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/hil.h b/6/platforms/android-5/arch-arm/usr/include/linux/hil.h
new file mode 120000
index 0000000..c7b07ea
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/i2c.h b/6/platforms/android-5/arch-arm/usr/include/linux/i2c.h
new file mode 120000
index 0000000..ac623d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/icmp.h b/6/platforms/android-5/arch-arm/usr/include/linux/icmp.h
new file mode 120000
index 0000000..626b2d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if.h b/6/platforms/android-5/arch-arm/usr/include/linux/if.h
new file mode 120000
index 0000000..ed3fd29
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_arcnet.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..b215e30
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_arp.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..6c26789
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_bridge.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..d200946
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_ether.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..6b270cf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_fc.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..7f26e7a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_fddi.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..4bf1d6b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_hippi.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..84e5d44
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_packet.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..127c673
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_ppp.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..71dc62d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_tr.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..3b24f96
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_tun.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..ef996f3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/if_vlan.h b/6/platforms/android-5/arch-arm/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..9d7ec29
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/in.h b/6/platforms/android-5/arch-arm/usr/include/linux/in.h
new file mode 120000
index 0000000..73ce5aa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/in6.h b/6/platforms/android-5/arch-arm/usr/include/linux/in6.h
new file mode 120000
index 0000000..63ef86a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/init.h b/6/platforms/android-5/arch-arm/usr/include/linux/init.h
new file mode 120000
index 0000000..1af1080
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/inotify.h b/6/platforms/android-5/arch-arm/usr/include/linux/inotify.h
new file mode 120000
index 0000000..d3ac713
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/input.h b/6/platforms/android-5/arch-arm/usr/include/linux/input.h
new file mode 120000
index 0000000..52e5a0e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/interrupt.h b/6/platforms/android-5/arch-arm/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..53d609e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ioctl.h b/6/platforms/android-5/arch-arm/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..5bbdd0c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ioport.h b/6/platforms/android-5/arch-arm/usr/include/linux/ioport.h
new file mode 120000
index 0000000..d9223a3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ioprio.h b/6/platforms/android-5/arch-arm/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..d27a10b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ip.h b/6/platforms/android-5/arch-arm/usr/include/linux/ip.h
new file mode 120000
index 0000000..629944b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ipc.h b/6/platforms/android-5/arch-arm/usr/include/linux/ipc.h
new file mode 120000
index 0000000..6c424f9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..8b6eba1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_smi.h b/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..468364b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ipx.h b/6/platforms/android-5/arch-arm/usr/include/linux/ipx.h
new file mode 120000
index 0000000..0996458
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/irq.h b/6/platforms/android-5/arch-arm/usr/include/linux/irq.h
new file mode 120000
index 0000000..156ec84
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/irq_cpustat.h b/6/platforms/android-5/arch-arm/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..634fc27
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/irqflags.h b/6/platforms/android-5/arch-arm/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..4b6ba01
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/irqreturn.h b/6/platforms/android-5/arch-arm/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..08709ca
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/jbd.h b/6/platforms/android-5/arch-arm/usr/include/linux/jbd.h
new file mode 120000
index 0000000..c98be9d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/jiffies.h b/6/platforms/android-5/arch-arm/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..4689311
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kd.h b/6/platforms/android-5/arch-arm/usr/include/linux/kd.h
new file mode 120000
index 0000000..7f8a04d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kdev_t.h b/6/platforms/android-5/arch-arm/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..ebd4907
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kernel.h b/6/platforms/android-5/arch-arm/usr/include/linux/kernel.h
new file mode 120000
index 0000000..8c2fbdb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kernel_stat.h b/6/platforms/android-5/arch-arm/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..16ec630
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kernelcapi.h b/6/platforms/android-5/arch-arm/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..667bf96
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kexec.h b/6/platforms/android-5/arch-arm/usr/include/linux/kexec.h
new file mode 120000
index 0000000..d2948cb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/key.h b/6/platforms/android-5/arch-arm/usr/include/linux/key.h
new file mode 120000
index 0000000..bcaa625
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/keyboard.h b/6/platforms/android-5/arch-arm/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..2bf8935
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/keychord.h b/6/platforms/android-5/arch-arm/usr/include/linux/keychord.h
new file mode 120000
index 0000000..174a498
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/klist.h b/6/platforms/android-5/arch-arm/usr/include/linux/klist.h
new file mode 120000
index 0000000..f43c0ae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kmod.h b/6/platforms/android-5/arch-arm/usr/include/linux/kmod.h
new file mode 120000
index 0000000..8d7a3ef
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kobject.h b/6/platforms/android-5/arch-arm/usr/include/linux/kobject.h
new file mode 120000
index 0000000..bec89b5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/kref.h b/6/platforms/android-5/arch-arm/usr/include/linux/kref.h
new file mode 120000
index 0000000..06fc10a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ktime.h b/6/platforms/android-5/arch-arm/usr/include/linux/ktime.h
new file mode 120000
index 0000000..4d692c7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/limits.h b/6/platforms/android-5/arch-arm/usr/include/linux/limits.h
new file mode 120000
index 0000000..20087a9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/linkage.h b/6/platforms/android-5/arch-arm/usr/include/linux/linkage.h
new file mode 120000
index 0000000..9cfdb65
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/list.h b/6/platforms/android-5/arch-arm/usr/include/linux/list.h
new file mode 120000
index 0000000..57ae76d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/lockd/nlm.h b/6/platforms/android-5/arch-arm/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..ae9f3ea
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/lockd/xdr.h b/6/platforms/android-5/arch-arm/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..d65e057
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/lockdep.h b/6/platforms/android-5/arch-arm/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..07d1c9d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/loop.h b/6/platforms/android-5/arch-arm/usr/include/linux/loop.h
new file mode 120000
index 0000000..4647736
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/magic.h b/6/platforms/android-5/arch-arm/usr/include/linux/magic.h
new file mode 120000
index 0000000..a5dd008
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/major.h b/6/platforms/android-5/arch-arm/usr/include/linux/major.h
new file mode 120000
index 0000000..e2e5068
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mc146818rtc.h b/6/platforms/android-5/arch-arm/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..e70bdfd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mca.h b/6/platforms/android-5/arch-arm/usr/include/linux/mca.h
new file mode 120000
index 0000000..3306b94
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mempolicy.h b/6/platforms/android-5/arch-arm/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..bb54228
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mempool.h b/6/platforms/android-5/arch-arm/usr/include/linux/mempool.h
new file mode 120000
index 0000000..a757c14
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/miscdevice.h b/6/platforms/android-5/arch-arm/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..8c4d5fc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mm.h b/6/platforms/android-5/arch-arm/usr/include/linux/mm.h
new file mode 120000
index 0000000..0221293
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mmc/card.h b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..aca23e6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mmc/host.h b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..70c4500
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mmc/mmc.h b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..f86db37
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mmzone.h b/6/platforms/android-5/arch-arm/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..cffbf41
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mod_devicetable.h b/6/platforms/android-5/arch-arm/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..5f4c1f4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/module.h b/6/platforms/android-5/arch-arm/usr/include/linux/module.h
new file mode 120000
index 0000000..dd797f0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/moduleparam.h b/6/platforms/android-5/arch-arm/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..3732764
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mount.h b/6/platforms/android-5/arch-arm/usr/include/linux/mount.h
new file mode 120000
index 0000000..303cb3b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/msdos_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..a40d306
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/msg.h b/6/platforms/android-5/arch-arm/usr/include/linux/msg.h
new file mode 120000
index 0000000..66ccd65
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/msm_adsp.h b/6/platforms/android-5/arch-arm/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..2e1430a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/msm_audio.h b/6/platforms/android-5/arch-arm/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..80810ae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/msm_mdp.h b/6/platforms/android-5/arch-arm/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..8d8dde2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mt9t013.h b/6/platforms/android-5/arch-arm/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..faf2834
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/bbm.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..df15007
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/blktrans.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..cbfd501
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..63a1fd2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..6ea59f3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/compatmac.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..32ca157
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/flashchip.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..0a67b89
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/map.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..b9028f2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/mtd.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..ce1e923
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..14b267c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..28ef1ac
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nftl.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..a5ad78a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..c21e189
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtd/partitions.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..aa65271
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mtio.h b/6/platforms/android-5/arch-arm/usr/include/linux/mtio.h
new file mode 120000
index 0000000..3bd0d37
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mutex-debug.h b/6/platforms/android-5/arch-arm/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..98cbeb1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/mutex.h b/6/platforms/android-5/arch-arm/usr/include/linux/mutex.h
new file mode 120000
index 0000000..00d9fab
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ncp.h b/6/platforms/android-5/arch-arm/usr/include/linux/ncp.h
new file mode 120000
index 0000000..e0798bd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ncp_mount.h b/6/platforms/android-5/arch-arm/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..c1d5b28
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ncp_no.h b/6/platforms/android-5/arch-arm/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..a264d64
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/net.h b/6/platforms/android-5/arch-arm/usr/include/linux/net.h
new file mode 120000
index 0000000..00f0eb4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netdevice.h b/6/platforms/android-5/arch-arm/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..47036bb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..ddf3f51
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..66f2d79
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..c82dd22
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..9ff1af9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..d95ce08
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..8e61e86
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..9fa099f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..0d84ab1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..1a27912
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..a1b56ae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..7a7ff5e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..65da311
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..cdd1129
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..1d69542
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..f335e78
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..ef2e038
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..becfe57
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..e163b89
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..a9caa19
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..22e6959
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..a65ac44
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..2b5448b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..52a9e63
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..b348aa6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..ec0d816
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..7fb7a04
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..53dc078
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..516cb2c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..06b48bf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..f13373d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..285c9e0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..a2860b5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..13c3580
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..5393b92
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..b891e6d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_bridge.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..0495093
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..8f8cbe6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..0babb34
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..daf8ee2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..0f03bc6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..f567ad2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..e38d891
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..152b0d0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..825a21f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..f7bead6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..0a8e46a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..88c392d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..287e626
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..9782806
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..daf3d67
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..06db69f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..13f7418
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..29469c2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..a3eab36
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..fb8408c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..a5619f6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..23cd72a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..84ae9e7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..ec4b4e9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..7bd40d0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..e3ec3b8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..bd72930
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..32f76ef
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..c2dd5ec
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..9688054
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..3d68e1b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..e8089c1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..019898b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..e2be4c8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..c22b8ca
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..427d2e8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..0fe48a9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..bc7a1a7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..08ead8e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..bdbe9f8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..7759112
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..8db9cf6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..8eec949
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..bd93bf1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..081e8b4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..dcf6321
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..d3dd3e7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..dc8dc38
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..e62734a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..d4b7ac9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..cedd8d8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..c4ed7b4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..320efde
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/netlink.h b/6/platforms/android-5/arch-arm/usr/include/linux/netlink.h
new file mode 120000
index 0000000..72498dd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfs.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfs.h
new file mode 120000
index 0000000..08e0414
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfs2.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..b3b2e8a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfs3.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..86dcfb3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfs4.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..42a80a0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfs_xdr.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..6e6f110
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsacl.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..0c4a9fd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/auth.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..d2499e8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/const.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..936d3ce
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/debug.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..899b320
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/export.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..c06ebf1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/interface.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..3ffe884
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..34c25f9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/stats.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..824ddca
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/xdr.h b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..fa7a2f7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/node.h b/6/platforms/android-5/arch-arm/usr/include/linux/node.h
new file mode 120000
index 0000000..3a6f379
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nodemask.h b/6/platforms/android-5/arch-arm/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..e6f2735
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/notifier.h b/6/platforms/android-5/arch-arm/usr/include/linux/notifier.h
new file mode 120000
index 0000000..c9467ea
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/numa.h b/6/platforms/android-5/arch-arm/usr/include/linux/numa.h
new file mode 120000
index 0000000..4c5aa54
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/nvram.h b/6/platforms/android-5/arch-arm/usr/include/linux/nvram.h
new file mode 120000
index 0000000..3687b4e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/omap_csmi.h b/6/platforms/android-5/arch-arm/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..03a2c13
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pagemap.h b/6/platforms/android-5/arch-arm/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..866b5a6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/param.h b/6/platforms/android-5/arch-arm/usr/include/linux/param.h
new file mode 120000
index 0000000..ac14a4d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/patchkey.h b/6/platforms/android-5/arch-arm/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..4230d7a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pci.h b/6/platforms/android-5/arch-arm/usr/include/linux/pci.h
new file mode 120000
index 0000000..a9388cf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pci_ids.h b/6/platforms/android-5/arch-arm/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..bc1e76a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pci_regs.h b/6/platforms/android-5/arch-arm/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..e97921e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/percpu.h b/6/platforms/android-5/arch-arm/usr/include/linux/percpu.h
new file mode 120000
index 0000000..4b73275
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/percpu_counter.h b/6/platforms/android-5/arch-arm/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..0a2e752
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/personality.h b/6/platforms/android-5/arch-arm/usr/include/linux/personality.h
new file mode 120000
index 0000000..bc00378
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pfkeyv2.h b/6/platforms/android-5/arch-arm/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..69e14df
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pkt_cls.h b/6/platforms/android-5/arch-arm/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..eabbdf3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pkt_sched.h b/6/platforms/android-5/arch-arm/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..43d9ab1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/platform_device.h b/6/platforms/android-5/arch-arm/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..721c574
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/plist.h b/6/platforms/android-5/arch-arm/usr/include/linux/plist.h
new file mode 120000
index 0000000..5616f9e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pm.h b/6/platforms/android-5/arch-arm/usr/include/linux/pm.h
new file mode 120000
index 0000000..69e8f88
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/pnp.h b/6/platforms/android-5/arch-arm/usr/include/linux/pnp.h
new file mode 120000
index 0000000..5951ba6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/poll.h b/6/platforms/android-5/arch-arm/usr/include/linux/poll.h
new file mode 120000
index 0000000..9aba531
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/posix_acl.h b/6/platforms/android-5/arch-arm/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..4b05956
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/posix_types.h b/6/platforms/android-5/arch-arm/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..a263b84
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ppdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..1bf650f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ppp_defs.h b/6/platforms/android-5/arch-arm/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..7f6d93b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/prctl.h b/6/platforms/android-5/arch-arm/usr/include/linux/prctl.h
new file mode 120000
index 0000000..270186b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/preempt.h b/6/platforms/android-5/arch-arm/usr/include/linux/preempt.h
new file mode 120000
index 0000000..12dcfac
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/proc_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..d064149
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ptrace.h b/6/platforms/android-5/arch-arm/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..803bfcd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/qic117.h b/6/platforms/android-5/arch-arm/usr/include/linux/qic117.h
new file mode 120000
index 0000000..89a7feb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/qnxtypes.h b/6/platforms/android-5/arch-arm/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..81160a2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/quota.h b/6/platforms/android-5/arch-arm/usr/include/linux/quota.h
new file mode 120000
index 0000000..fefefad
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/raid/md.h b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..8c2d58a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_k.h b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..046e9e3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_p.h b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..7714211
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_u.h b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..588b465
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/raid/xor.h b/6/platforms/android-5/arch-arm/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..dee67ec
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/random.h b/6/platforms/android-5/arch-arm/usr/include/linux/random.h
new file mode 120000
index 0000000..3be68b2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/rbtree.h b/6/platforms/android-5/arch-arm/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..efebd56
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/rcupdate.h b/6/platforms/android-5/arch-arm/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..5981014
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/reboot.h b/6/platforms/android-5/arch-arm/usr/include/linux/reboot.h
new file mode 120000
index 0000000..d46a33e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/relay.h b/6/platforms/android-5/arch-arm/usr/include/linux/relay.h
new file mode 120000
index 0000000..bb47555
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/resource.h b/6/platforms/android-5/arch-arm/usr/include/linux/resource.h
new file mode 120000
index 0000000..87c48c9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/route.h b/6/platforms/android-5/arch-arm/usr/include/linux/route.h
new file mode 120000
index 0000000..3e4f74c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/rtc.h b/6/platforms/android-5/arch-arm/usr/include/linux/rtc.h
new file mode 120000
index 0000000..61278c3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/rtnetlink.h b/6/platforms/android-5/arch-arm/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..00c4341
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/rwsem.h b/6/platforms/android-5/arch-arm/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..727b338
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sched.h b/6/platforms/android-5/arch-arm/usr/include/linux/sched.h
new file mode 120000
index 0000000..aa57c31
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sem.h b/6/platforms/android-5/arch-arm/usr/include/linux/sem.h
new file mode 120000
index 0000000..671ed76
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/seq_file.h b/6/platforms/android-5/arch-arm/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..418f515
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/seqlock.h b/6/platforms/android-5/arch-arm/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..5414d3f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/serial_core.h b/6/platforms/android-5/arch-arm/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..dc7c615
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/serial_reg.h b/6/platforms/android-5/arch-arm/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..c2499b4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/serio.h b/6/platforms/android-5/arch-arm/usr/include/linux/serio.h
new file mode 120000
index 0000000..e276b06
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/shm.h b/6/platforms/android-5/arch-arm/usr/include/linux/shm.h
new file mode 120000
index 0000000..b12e3b4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/signal.h b/6/platforms/android-5/arch-arm/usr/include/linux/signal.h
new file mode 120000
index 0000000..3c2a8f8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/skbuff.h b/6/platforms/android-5/arch-arm/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..1d5daf3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/slab.h b/6/platforms/android-5/arch-arm/usr/include/linux/slab.h
new file mode 120000
index 0000000..489549a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/smb.h b/6/platforms/android-5/arch-arm/usr/include/linux/smb.h
new file mode 120000
index 0000000..d9d8cde
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/smp.h b/6/platforms/android-5/arch-arm/usr/include/linux/smp.h
new file mode 120000
index 0000000..c41867f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/smp_lock.h b/6/platforms/android-5/arch-arm/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..d403e26
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/socket.h b/6/platforms/android-5/arch-arm/usr/include/linux/socket.h
new file mode 120000
index 0000000..9c6722c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sockios.h b/6/platforms/android-5/arch-arm/usr/include/linux/sockios.h
new file mode 120000
index 0000000..24de74c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/soundcard.h b/6/platforms/android-5/arch-arm/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..7231ebc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..04c13dd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..d70d148
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_up.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..51dcd10
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..77ae2c5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types_up.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..16e5f78
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_up.h b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..a52fe0d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/stacktrace.h b/6/platforms/android-5/arch-arm/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..8ae360f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/stat.h b/6/platforms/android-5/arch-arm/usr/include/linux/stat.h
new file mode 120000
index 0000000..295fb38
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/statfs.h b/6/platforms/android-5/arch-arm/usr/include/linux/statfs.h
new file mode 120000
index 0000000..e335ca0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/stddef.h b/6/platforms/android-5/arch-arm/usr/include/linux/stddef.h
new file mode 120000
index 0000000..8504275
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/string.h b/6/platforms/android-5/arch-arm/usr/include/linux/string.h
new file mode 120000
index 0000000..f173c42
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/stringify.h b/6/platforms/android-5/arch-arm/usr/include/linux/stringify.h
new file mode 120000
index 0000000..118bfa4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..cec22f8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..18c1de2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..4c9a195
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/debug.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..3638c6d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..ba4266d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..1c3ed12
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..924e0ab
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..e074732
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/sched.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..417f959
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/stats.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..0f1ce95
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svc.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..3e87f99
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..4d44388
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/timer.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..52460dc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/types.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..d0c8052
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..f2e185a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..efa10ae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-arm/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/swap.h b/6/platforms/android-5/arch-arm/usr/include/linux/swap.h
new file mode 120000
index 0000000..36b1131
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sysctl.h b/6/platforms/android-5/arch-arm/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..c95b0f6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sysdev.h b/6/platforms/android-5/arch-arm/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..f50b95d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/sysfs.h b/6/platforms/android-5/arch-arm/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..ff439b5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/taskstats.h b/6/platforms/android-5/arch-arm/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..31db896
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/taskstats_kern.h b/6/platforms/android-5/arch-arm/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..1a1b1c1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/tcp.h b/6/platforms/android-5/arch-arm/usr/include/linux/tcp.h
new file mode 120000
index 0000000..d318161
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/telephony.h b/6/platforms/android-5/arch-arm/usr/include/linux/telephony.h
new file mode 120000
index 0000000..5215e86
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/termios.h b/6/platforms/android-5/arch-arm/usr/include/linux/termios.h
new file mode 120000
index 0000000..765d249
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/textsearch.h b/6/platforms/android-5/arch-arm/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..303d29d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/thread_info.h b/6/platforms/android-5/arch-arm/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..3effb42
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/threads.h b/6/platforms/android-5/arch-arm/usr/include/linux/threads.h
new file mode 120000
index 0000000..b514f6a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/time.h b/6/platforms/android-5/arch-arm/usr/include/linux/time.h
new file mode 120000
index 0000000..caed7de
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/timer.h b/6/platforms/android-5/arch-arm/usr/include/linux/timer.h
new file mode 120000
index 0000000..ede67dd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/times.h b/6/platforms/android-5/arch-arm/usr/include/linux/times.h
new file mode 120000
index 0000000..5cd5e6a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/timex.h b/6/platforms/android-5/arch-arm/usr/include/linux/timex.h
new file mode 120000
index 0000000..628a5f4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/tiocl.h b/6/platforms/android-5/arch-arm/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..59fdbf5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/transport_class.h b/6/platforms/android-5/arch-arm/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..5cffffb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/tty.h b/6/platforms/android-5/arch-arm/usr/include/linux/tty.h
new file mode 120000
index 0000000..849c4f2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/types.h b/6/platforms/android-5/arch-arm/usr/include/linux/types.h
new file mode 120000
index 0000000..8304d2a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/udp.h b/6/platforms/android-5/arch-arm/usr/include/linux/udp.h
new file mode 120000
index 0000000..723f3a9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_i.h b/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..e56f9b5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..dfaf8cc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/uio.h b/6/platforms/android-5/arch-arm/usr/include/linux/uio.h
new file mode 120000
index 0000000..8602a6e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/un.h b/6/platforms/android-5/arch-arm/usr/include/linux/un.h
new file mode 120000
index 0000000..059c2aa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/unistd.h b/6/platforms/android-5/arch-arm/usr/include/linux/unistd.h
new file mode 120000
index 0000000..b720c3e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/usb.h b/6/platforms/android-5/arch-arm/usr/include/linux/usb.h
new file mode 120000
index 0000000..2deb4c0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/usb_ch9.h b/6/platforms/android-5/arch-arm/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..aa32067
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/usbdevice_fs.h b/6/platforms/android-5/arch-arm/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..efccc39
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/user.h b/6/platforms/android-5/arch-arm/usr/include/linux/user.h
new file mode 120000
index 0000000..85ad1f5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/utime.h b/6/platforms/android-5/arch-arm/usr/include/linux/utime.h
new file mode 120000
index 0000000..5fc0b8e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/utsname.h b/6/platforms/android-5/arch-arm/usr/include/linux/utsname.h
new file mode 120000
index 0000000..1150692
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/version.h b/6/platforms/android-5/arch-arm/usr/include/linux/version.h
new file mode 120000
index 0000000..9659508
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/vfs.h b/6/platforms/android-5/arch-arm/usr/include/linux/vfs.h
new file mode 120000
index 0000000..cd06a94
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/videodev.h b/6/platforms/android-5/arch-arm/usr/include/linux/videodev.h
new file mode 120000
index 0000000..d6fee30
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/videodev2.h b/6/platforms/android-5/arch-arm/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..baed3ec
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/vmalloc.h b/6/platforms/android-5/arch-arm/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..e68fa6e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/vt.h b/6/platforms/android-5/arch-arm/usr/include/linux/vt.h
new file mode 120000
index 0000000..ce2824b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/vt_buffer.h b/6/platforms/android-5/arch-arm/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..a08fd7f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/wait.h b/6/platforms/android-5/arch-arm/usr/include/linux/wait.h
new file mode 120000
index 0000000..b45776c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/wanrouter.h b/6/platforms/android-5/arch-arm/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..764a3e4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/wireless.h b/6/platforms/android-5/arch-arm/usr/include/linux/wireless.h
new file mode 120000
index 0000000..30a359d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/workqueue.h b/6/platforms/android-5/arch-arm/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..c4414e9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/xattr.h b/6/platforms/android-5/arch-arm/usr/include/linux/xattr.h
new file mode 120000
index 0000000..c04c221
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/zconf.h b/6/platforms/android-5/arch-arm/usr/include/linux/zconf.h
new file mode 120000
index 0000000..f174fc9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/zlib.h b/6/platforms/android-5/arch-arm/usr/include/linux/zlib.h
new file mode 120000
index 0000000..9e95368
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/linux/zorro_ids.h b/6/platforms/android-5/arch-arm/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..3a33ee8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/locale.h b/6/platforms/android-5/arch-arm/usr/include/locale.h
new file mode 120000
index 0000000..5ccc12e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/_types.h b/6/platforms/android-5/arch-arm/usr/include/machine/_types.h
new file mode 120000
index 0000000..9abde9d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/asm.h b/6/platforms/android-5/arch-arm/usr/include/machine/asm.h
new file mode 120000
index 0000000..8eee84f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/asm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/asm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/cdefs.h b/6/platforms/android-5/arch-arm/usr/include/machine/cdefs.h
new file mode 120000
index 0000000..6099daa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/cpu-features.h b/6/platforms/android-5/arch-arm/usr/include/machine/cpu-features.h
new file mode 120000
index 0000000..0b1eda9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/cpu-features.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/cpu-features.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/exec.h b/6/platforms/android-5/arch-arm/usr/include/machine/exec.h
new file mode 120000
index 0000000..cf1ca13
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/exec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/exec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/ieee.h b/6/platforms/android-5/arch-arm/usr/include/machine/ieee.h
new file mode 120000
index 0000000..cb5b6d0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/ieee.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/ieee.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/internal_types.h b/6/platforms/android-5/arch-arm/usr/include/machine/internal_types.h
new file mode 120000
index 0000000..b9cdad1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/internal_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/internal_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/kernel.h b/6/platforms/android-5/arch-arm/usr/include/machine/kernel.h
new file mode 120000
index 0000000..e851fbd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/limits.h b/6/platforms/android-5/arch-arm/usr/include/machine/limits.h
new file mode 120000
index 0000000..aee3cf4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/machine/setjmp.h b/6/platforms/android-5/arch-arm/usr/include/machine/setjmp.h
new file mode 120000
index 0000000..29c8e2d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/machine/setjmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/machine/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/malloc.h b/6/platforms/android-5/arch-arm/usr/include/malloc.h
new file mode 120000
index 0000000..24a1921
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/math.h b/6/platforms/android-5/arch-arm/usr/include/math.h
new file mode 120000
index 0000000..4318dbc
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/memory.h b/6/platforms/android-5/arch-arm/usr/include/memory.h
new file mode 120000
index 0000000..137a4b9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/mntent.h b/6/platforms/android-5/arch-arm/usr/include/mntent.h
new file mode 120000
index 0000000..bf95200
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-abi.h b/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..10caf77
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-user.h b/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..dd4f5fb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/ethertypes.h b/6/platforms/android-5/arch-arm/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..ee1475b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if.h b/6/platforms/android-5/arch-arm/usr/include/net/if.h
new file mode 120000
index 0000000..5a91a32
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_arp.h b/6/platforms/android-5/arch-arm/usr/include/net/if_arp.h
new file mode 120000
index 0000000..9d88ecf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_dl.h b/6/platforms/android-5/arch-arm/usr/include/net/if_dl.h
new file mode 120000
index 0000000..d9ba9f5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_ether.h b/6/platforms/android-5/arch-arm/usr/include/net/if_ether.h
new file mode 120000
index 0000000..1ef0265
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_ieee1394.h b/6/platforms/android-5/arch-arm/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..b08d294
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_packet.h b/6/platforms/android-5/arch-arm/usr/include/net/if_packet.h
new file mode 120000
index 0000000..9d28720
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/if_types.h b/6/platforms/android-5/arch-arm/usr/include/net/if_types.h
new file mode 120000
index 0000000..36813dd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/net/route.h b/6/platforms/android-5/arch-arm/usr/include/net/route.h
new file mode 120000
index 0000000..14a1ce9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netdb.h b/6/platforms/android-5/arch-arm/usr/include/netdb.h
new file mode 120000
index 0000000..7732ffe
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/ether.h b/6/platforms/android-5/arch-arm/usr/include/netinet/ether.h
new file mode 120000
index 0000000..fa238b0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/if_ether.h b/6/platforms/android-5/arch-arm/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..dafa711
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/in.h b/6/platforms/android-5/arch-arm/usr/include/netinet/in.h
new file mode 120000
index 0000000..9bcb783
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/in6.h b/6/platforms/android-5/arch-arm/usr/include/netinet/in6.h
new file mode 120000
index 0000000..18204f5
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/in_systm.h b/6/platforms/android-5/arch-arm/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..eedded9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/ip.h b/6/platforms/android-5/arch-arm/usr/include/netinet/ip.h
new file mode 120000
index 0000000..67e46e2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/ip_icmp.h b/6/platforms/android-5/arch-arm/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..91698d7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/tcp.h b/6/platforms/android-5/arch-arm/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..c9aca0e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netinet/udp.h b/6/platforms/android-5/arch-arm/usr/include/netinet/udp.h
new file mode 120000
index 0000000..05fe7f8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/netpacket/packet.h b/6/platforms/android-5/arch-arm/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..9b08b20
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/nsswitch.h b/6/platforms/android-5/arch-arm/usr/include/nsswitch.h
new file mode 120000
index 0000000..9c677af
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/pathconf.h b/6/platforms/android-5/arch-arm/usr/include/pathconf.h
new file mode 120000
index 0000000..c98f8c0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/paths.h b/6/platforms/android-5/arch-arm/usr/include/paths.h
new file mode 120000
index 0000000..4ae3013
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/poll.h b/6/platforms/android-5/arch-arm/usr/include/poll.h
new file mode 120000
index 0000000..fbca279
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/pthread.h b/6/platforms/android-5/arch-arm/usr/include/pthread.h
new file mode 100644
index 0000000..6603b3f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/pthread.h
@@ -0,0 +1,270 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-5/arch-arm/usr/include/pwd.h b/6/platforms/android-5/arch-arm/usr/include/pwd.h
new file mode 120000
index 0000000..34a4c22
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/resolv.h b/6/platforms/android-5/arch-arm/usr/include/resolv.h
new file mode 120000
index 0000000..e34faa7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sched.h b/6/platforms/android-5/arch-arm/usr/include/sched.h
new file mode 120000
index 0000000..0465a60
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sched.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/semaphore.h b/6/platforms/android-5/arch-arm/usr/include/semaphore.h
new file mode 120000
index 0000000..dbf848a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/setjmp.h b/6/platforms/android-5/arch-arm/usr/include/setjmp.h
new file mode 120000
index 0000000..da3f39a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sgtty.h b/6/platforms/android-5/arch-arm/usr/include/sgtty.h
new file mode 120000
index 0000000..03f705d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sha1.h b/6/platforms/android-5/arch-arm/usr/include/sha1.h
new file mode 120000
index 0000000..4bc9657
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/signal.h b/6/platforms/android-5/arch-arm/usr/include/signal.h
new file mode 120000
index 0000000..b175a1a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/stdint.h b/6/platforms/android-5/arch-arm/usr/include/stdint.h
new file mode 120000
index 0000000..3014a21
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/stdio.h b/6/platforms/android-5/arch-arm/usr/include/stdio.h
new file mode 120000
index 0000000..c2720ff
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/stdlib.h b/6/platforms/android-5/arch-arm/usr/include/stdlib.h
new file mode 120000
index 0000000..11c9e1a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/stdlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/stdlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/string.h b/6/platforms/android-5/arch-arm/usr/include/string.h
new file mode 120000
index 0000000..d486cdf
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/strings.h b/6/platforms/android-5/arch-arm/usr/include/strings.h
new file mode 120000
index 0000000..28bac8b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/_errdefs.h b/6/platforms/android-5/arch-arm/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..c073222
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/_sigdefs.h b/6/platforms/android-5/arch-arm/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..c0b20d6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/_system_properties.h b/6/platforms/android-5/arch-arm/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..0822def
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/_types.h b/6/platforms/android-5/arch-arm/usr/include/sys/_types.h
new file mode 120000
index 0000000..99152a1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/atomics.h b/6/platforms/android-5/arch-arm/usr/include/sys/atomics.h
new file mode 120000
index 0000000..4e540d4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/cdefs.h b/6/platforms/android-5/arch-arm/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..25b96d6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/cdefs_elf.h b/6/platforms/android-5/arch-arm/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..a28640f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/dirent.h b/6/platforms/android-5/arch-arm/usr/include/sys/dirent.h
new file mode 120000
index 0000000..7fc62ee
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/endian.h b/6/platforms/android-5/arch-arm/usr/include/sys/endian.h
new file mode 120000
index 0000000..9fa82e9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/epoll.h b/6/platforms/android-5/arch-arm/usr/include/sys/epoll.h
new file mode 120000
index 0000000..720a5be
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/errno.h b/6/platforms/android-5/arch-arm/usr/include/sys/errno.h
new file mode 120000
index 0000000..0f7c0ac
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/exec_elf.h b/6/platforms/android-5/arch-arm/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..075d9a1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/file.h b/6/platforms/android-5/arch-arm/usr/include/sys/file.h
new file mode 120000
index 0000000..6fb72e3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/fsuid.h b/6/platforms/android-5/arch-arm/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..74cbd6c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/inotify.h b/6/platforms/android-5/arch-arm/usr/include/sys/inotify.h
new file mode 120000
index 0000000..45c015f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ioctl.h b/6/platforms/android-5/arch-arm/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..c4af7af
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ioctl_compat.h b/6/platforms/android-5/arch-arm/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..9fe3e7f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ipc.h b/6/platforms/android-5/arch-arm/usr/include/sys/ipc.h
new file mode 120000
index 0000000..a368311
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/klog.h b/6/platforms/android-5/arch-arm/usr/include/sys/klog.h
new file mode 120000
index 0000000..a682fd9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/limits.h b/6/platforms/android-5/arch-arm/usr/include/sys/limits.h
new file mode 120000
index 0000000..4f7c0ac
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/linux-syscalls.h b/6/platforms/android-5/arch-arm/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..ce02a54
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/linux-unistd.h b/6/platforms/android-5/arch-arm/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..28f8aa9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/mman.h b/6/platforms/android-5/arch-arm/usr/include/sys/mman.h
new file mode 120000
index 0000000..cb2ed58
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/mount.h b/6/platforms/android-5/arch-arm/usr/include/sys/mount.h
new file mode 120000
index 0000000..48ce496
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/param.h b/6/platforms/android-5/arch-arm/usr/include/sys/param.h
new file mode 120000
index 0000000..b52dcee
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/poll.h b/6/platforms/android-5/arch-arm/usr/include/sys/poll.h
new file mode 120000
index 0000000..9f1163f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/prctl.h b/6/platforms/android-5/arch-arm/usr/include/sys/prctl.h
new file mode 120000
index 0000000..318dc59
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ptrace.h b/6/platforms/android-5/arch-arm/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..b32101b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/queue.h b/6/platforms/android-5/arch-arm/usr/include/sys/queue.h
new file mode 120000
index 0000000..c10e2b6
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/reboot.h b/6/platforms/android-5/arch-arm/usr/include/sys/reboot.h
new file mode 120000
index 0000000..c582890
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/resource.h b/6/platforms/android-5/arch-arm/usr/include/sys/resource.h
new file mode 120000
index 0000000..1f85832
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/select.h b/6/platforms/android-5/arch-arm/usr/include/sys/select.h
new file mode 120000
index 0000000..264c7d9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/sendfile.h b/6/platforms/android-5/arch-arm/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..da39c25
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/socket.h b/6/platforms/android-5/arch-arm/usr/include/sys/socket.h
new file mode 120000
index 0000000..c7a8baa
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/socketcalls.h b/6/platforms/android-5/arch-arm/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..7c51ed2
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/stat.h b/6/platforms/android-5/arch-arm/usr/include/sys/stat.h
new file mode 120000
index 0000000..ad6ed4b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/statfs.h b/6/platforms/android-5/arch-arm/usr/include/sys/statfs.h
new file mode 120000
index 0000000..01cf0b8
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/syscall.h b/6/platforms/android-5/arch-arm/usr/include/sys/syscall.h
new file mode 120000
index 0000000..0aea956
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/sysconf.h b/6/platforms/android-5/arch-arm/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..4c1f45d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/sysinfo.h b/6/platforms/android-5/arch-arm/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..522bc71
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/syslimits.h b/6/platforms/android-5/arch-arm/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..781efb1
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/sysmacros.h b/6/platforms/android-5/arch-arm/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..715ab32
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/system_properties.h b/6/platforms/android-5/arch-arm/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..a454341
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/time.h b/6/platforms/android-5/arch-arm/usr/include/sys/time.h
new file mode 120000
index 0000000..fbbfd16
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/timeb.h b/6/platforms/android-5/arch-arm/usr/include/sys/timeb.h
new file mode 120000
index 0000000..8f07539
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/times.h b/6/platforms/android-5/arch-arm/usr/include/sys/times.h
new file mode 120000
index 0000000..d03ecc4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ttychars.h b/6/platforms/android-5/arch-arm/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..d81ea37
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/ttydev.h b/6/platforms/android-5/arch-arm/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..b6c0bdb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/types.h b/6/platforms/android-5/arch-arm/usr/include/sys/types.h
new file mode 120000
index 0000000..e917d16
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/uio.h b/6/platforms/android-5/arch-arm/usr/include/sys/uio.h
new file mode 120000
index 0000000..fe1258b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/un.h b/6/platforms/android-5/arch-arm/usr/include/sys/un.h
new file mode 120000
index 0000000..2b9a82e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/utime.h b/6/platforms/android-5/arch-arm/usr/include/sys/utime.h
new file mode 120000
index 0000000..f4aeaeb
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/utsname.h b/6/platforms/android-5/arch-arm/usr/include/sys/utsname.h
new file mode 120000
index 0000000..d95cbc9
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/vfs.h b/6/platforms/android-5/arch-arm/usr/include/sys/vfs.h
new file mode 120000
index 0000000..cb94d04
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/vt.h b/6/platforms/android-5/arch-arm/usr/include/sys/vt.h
new file mode 120000
index 0000000..1cb3c95
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/sys/wait.h b/6/platforms/android-5/arch-arm/usr/include/sys/wait.h
new file mode 120000
index 0000000..28b8fb0
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-arm/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/syslog.h b/6/platforms/android-5/arch-arm/usr/include/syslog.h
new file mode 120000
index 0000000..98f7987
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/termio.h b/6/platforms/android-5/arch-arm/usr/include/termio.h
new file mode 120000
index 0000000..ab35769
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/termios.h b/6/platforms/android-5/arch-arm/usr/include/termios.h
new file mode 120000
index 0000000..20bed55
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/thread_db.h b/6/platforms/android-5/arch-arm/usr/include/thread_db.h
new file mode 120000
index 0000000..ba91500
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/time.h b/6/platforms/android-5/arch-arm/usr/include/time.h
new file mode 120000
index 0000000..f3d49a3
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/time64.h b/6/platforms/android-5/arch-arm/usr/include/time64.h
new file mode 120000
index 0000000..4e4b46a
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/unistd.h b/6/platforms/android-5/arch-arm/usr/include/unistd.h
new file mode 120000
index 0000000..f1a9809
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/unistd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/util.h b/6/platforms/android-5/arch-arm/usr/include/util.h
new file mode 120000
index 0000000..2784106
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/utime.h b/6/platforms/android-5/arch-arm/usr/include/utime.h
new file mode 120000
index 0000000..026b0f4
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/utmp.h b/6/platforms/android-5/arch-arm/usr/include/utmp.h
new file mode 120000
index 0000000..7a6a611
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/wchar.h b/6/platforms/android-5/arch-arm/usr/include/wchar.h
new file mode 120000
index 0000000..c03dc83
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/wchar.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/wchar.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/wctype.h b/6/platforms/android-5/arch-arm/usr/include/wctype.h
new file mode 120000
index 0000000..8d94c38
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/zconf.h b/6/platforms/android-5/arch-arm/usr/include/zconf.h
new file mode 120000
index 0000000..160774d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/include/zlib.h b/6/platforms/android-5/arch-arm/usr/include/zlib.h
new file mode 120000
index 0000000..9695099
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o
new file mode 120000
index 0000000..e8ff6ae
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/crtbegin_dynamic.o \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o
new file mode 120000
index 0000000..cbd5b1e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/crtbegin_so.o \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/crtbegin_static.o b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_static.o
new file mode 120000
index 0000000..47d199f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/crtbegin_static.o
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/crtbegin_static.o \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/crtend_android.o b/6/platforms/android-5/arch-arm/usr/lib/crtend_android.o
new file mode 120000
index 0000000..b43053b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/crtend_android.o
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/crtend_android.o \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/crtend_so.o b/6/platforms/android-5/arch-arm/usr/lib/crtend_so.o
new file mode 120000
index 0000000..4e28f07
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/crtend_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/crtend_so.o \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libGLESv1_CM.so b/6/platforms/android-5/arch-arm/usr/lib/libGLESv1_CM.so
new file mode 120000
index 0000000..896864e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libGLESv1_CM.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libGLESv1_CM.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libGLESv2.so b/6/platforms/android-5/arch-arm/usr/lib/libGLESv2.so
new file mode 100644
index 0000000..fa6557b
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libGLESv2.so
Binary files differ
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libc.a b/6/platforms/android-5/arch-arm/usr/lib/libc.a
new file mode 120000
index 0000000..95c075c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libc.a
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libc.a \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libc.so b/6/platforms/android-5/arch-arm/usr/lib/libc.so
new file mode 100644
index 0000000..2483bf7
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libc.so
Binary files differ
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libdl.so b/6/platforms/android-5/arch-arm/usr/lib/libdl.so
new file mode 120000
index 0000000..3ef819e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libdl.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libdl.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/liblog.so b/6/platforms/android-5/arch-arm/usr/lib/liblog.so
new file mode 120000
index 0000000..4db510c
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/liblog.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/liblog.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libm.a b/6/platforms/android-5/arch-arm/usr/lib/libm.a
new file mode 120000
index 0000000..049930d
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libm.a
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libm.a \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libm.so b/6/platforms/android-5/arch-arm/usr/lib/libm.so
new file mode 120000
index 0000000..e9bf9cd
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libm.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libm.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libstdc++.a b/6/platforms/android-5/arch-arm/usr/lib/libstdc++.a
new file mode 120000
index 0000000..34aaa50
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libstdc++.a
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libstdc++.a \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libstdc++.so b/6/platforms/android-5/arch-arm/usr/lib/libstdc++.so
new file mode 120000
index 0000000..b82b54e
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libstdc++.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libstdc++.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libthread_db.a b/6/platforms/android-5/arch-arm/usr/lib/libthread_db.a
new file mode 120000
index 0000000..293c428
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libthread_db.a
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libthread_db.a \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libthread_db.so b/6/platforms/android-5/arch-arm/usr/lib/libthread_db.so
new file mode 120000
index 0000000..79ed2de
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libthread_db.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libthread_db.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-arm/usr/lib/libz.so b/6/platforms/android-5/arch-arm/usr/lib/libz.so
new file mode 120000
index 0000000..a7d2d7f
--- /dev/null
+++ b/6/platforms/android-5/arch-arm/usr/lib/libz.so
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-arm/usr/lib/libz.so \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES/gl.h b/6/platforms/android-5/arch-x86/usr/include/GLES/gl.h
new file mode 120000
index 0000000..9f55626
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES/glext.h b/6/platforms/android-5/arch-x86/usr/include/GLES/glext.h
new file mode 120000
index 0000000..9980ec8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES/glplatform.h b/6/platforms/android-5/arch-x86/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..106fc55
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2.h b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2.h
new file mode 100644
index 0000000..0182a67
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2.h
@@ -0,0 +1,620 @@
+#ifndef __gl2_h_
+#define __gl2_h_
+
+/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+
+#include <GLES2/gl2platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/*-------------------------------------------------------------------------
+ * Data type definitions
+ *-----------------------------------------------------------------------*/
+
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef khronos_int8_t GLbyte;
+typedef short GLshort;
+typedef int GLint;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned int GLuint;
+typedef khronos_float_t GLfloat;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+
+/* GL types for handling large vertex buffer objects */
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t GLsizeiptr;
+
+/* OpenGL ES core versions */
+#define GL_ES_VERSION_2_0 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+
+/* Boolean */
+#define GL_FALSE 0
+#define GL_TRUE 1
+
+/* BeginMode */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+
+/* AlphaFunction (not supported in ES20) */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* BlendingFactorDest */
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+
+/* BlendingFactorSrc */
+/* GL_ZERO */
+/* GL_ONE */
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+/* GL_SRC_ALPHA */
+/* GL_ONE_MINUS_SRC_ALPHA */
+/* GL_DST_ALPHA */
+/* GL_ONE_MINUS_DST_ALPHA */
+
+/* BlendEquationSeparate */
+#define GL_FUNC_ADD 0x8006
+#define GL_BLEND_EQUATION 0x8009
+#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+
+/* BlendSubtract */
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+
+/* Separate Blend Functions */
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STATIC_DRAW 0x88E4
+#define GL_DYNAMIC_DRAW 0x88E8
+
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+
+/* CullFaceMode */
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_FRONT_AND_BACK 0x0408
+
+/* DepthFunction */
+/* GL_NEVER */
+/* GL_LESS */
+/* GL_EQUAL */
+/* GL_LEQUAL */
+/* GL_GREATER */
+/* GL_NOTEQUAL */
+/* GL_GEQUAL */
+/* GL_ALWAYS */
+
+/* EnableCap */
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_CULL_FACE 0x0B44
+#define GL_BLEND 0x0BE2
+#define GL_DITHER 0x0BD0
+#define GL_STENCIL_TEST 0x0B90
+#define GL_DEPTH_TEST 0x0B71
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_COVERAGE 0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_OUT_OF_MEMORY 0x0505
+
+/* FrontFaceDirection */
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+
+/* GetPName */
+#define GL_LINE_WIDTH 0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#define GL_VIEWPORT 0x0BA2
+#define GL_SCISSOR_BOX 0x0C10
+/* GL_SCISSOR_TEST */
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_RED_BITS 0x0D52
+#define GL_GREEN_BITS 0x0D53
+#define GL_BLUE_BITS 0x0D54
+#define GL_ALPHA_BITS 0x0D55
+#define GL_DEPTH_BITS 0x0D56
+#define GL_STENCIL_BITS 0x0D57
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+/* GL_POLYGON_OFFSET_FILL */
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_TEXTURE_BINDING_2D 0x8069
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+
+/* GetTextureParameter */
+/* GL_TEXTURE_MAG_FILTER */
+/* GL_TEXTURE_MIN_FILTER */
+/* GL_TEXTURE_WRAP_S */
+/* GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+
+/* HintTarget */
+#define GL_GENERATE_MIPMAP_HINT 0x8192
+
+/* DataType */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_FIXED 0x140C
+
+/* PixelFormat */
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+
+/* PixelType */
+/* GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+
+/* Shaders */
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_DELETE_STATUS 0x8B80
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+
+/* StencilFunction */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+
+/* StencilOp */
+/* GL_ZERO */
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+#define GL_INVERT 0x150A
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+
+/* StringName */
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+
+/* TextureMagFilter */
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+
+/* TextureMinFilter */
+/* GL_NEAREST */
+/* GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+
+/* TextureTarget */
+/* GL_TEXTURE_2D */
+#define GL_TEXTURE 0x1702
+
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+
+/* TextureUnit */
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+
+/* TextureWrapMode */
+#define GL_REPEAT 0x2901
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_MIRRORED_REPEAT 0x8370
+
+/* Uniform Types */
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_CUBE 0x8B60
+
+/* Vertex Arrays */
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+
+/* Read Format */
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+
+/* Shader Source */
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_SHADER_COMPILER 0x8DFA
+
+/* Shader Binary */
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+
+/* Shader Precision-Specified Types */
+#define GL_LOW_FLOAT 0x8DF0
+#define GL_MEDIUM_FLOAT 0x8DF1
+#define GL_HIGH_FLOAT 0x8DF2
+#define GL_LOW_INT 0x8DF3
+#define GL_MEDIUM_INT 0x8DF4
+#define GL_HIGH_INT 0x8DF5
+
+/* Framebuffer Object. */
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_RENDERBUFFER 0x8D41
+
+#define GL_RGBA4 0x8056
+#define GL_RGB5_A1 0x8057
+#define GL_RGB565 0x8D62
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_STENCIL_INDEX 0x1901
+#define GL_STENCIL_INDEX8 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_STENCIL_ATTACHMENT 0x8D20
+
+#define GL_NONE 0
+
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+
+/*-------------------------------------------------------------------------
+ * GL core functions.
+ *-----------------------------------------------------------------------*/
+
+GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
+GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
+GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
+GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
+GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
+GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
+GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
+GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void GL_APIENTRY glFinish (void);
+GL_APICALL void GL_APIENTRY glFlush (void);
+GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
+GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
+GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
+GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
+GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL GLenum GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
+GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
+GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
+GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
+GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
+GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
+GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2_h_ */
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2ext.h b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2ext.h
new file mode 100644
index 0000000..72f1ae7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2ext.h
@@ -0,0 +1,518 @@
+#ifndef __gl2ext_h_
+#define __gl2ext_h_
+
+/* $Revision: 8271 $ on $Date:: 2009-05-21 09:33:40 -0700 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+# define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES 0x8D64
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES 0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES 0x81A7
+#endif
+
+/* GL_OES_depth_texture */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
+#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES 0x88B9
+#define GL_BUFFER_ACCESS_OES 0x88BB
+#define GL_BUFFER_MAPPED_OES 0x88BC
+#define GL_BUFFER_MAP_POINTER_OES 0x88BD
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES 0x84F9
+#define GL_UNSIGNED_INT_24_8_OES 0x84FA
+#define GL_DEPTH24_STENCIL8_OES 0x88F0
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES 0x8051
+#define GL_RGBA8_OES 0x8058
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES 0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES 0x8D47
+#endif
+
+/* GL_OES_texture3D */
+#ifndef GL_OES_texture3D
+#define GL_TEXTURE_WRAP_R_OES 0x8072
+#define GL_TEXTURE_3D_OES 0x806F
+#define GL_TEXTURE_BINDING_3D_OES 0x806A
+#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
+#define GL_SAMPLER_3D_OES 0x8B5F
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_HALF_FLOAT_OES 0x8D61
+#endif
+
+/* GL_OES_vertex_half_float */
+/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
+#define GL_INT_10_10_10_2_OES 0x8DF7
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD 0x87F9
+#define GL_3DC_XY_AMD 0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD 0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD 0x8740
+#endif
+
+/* GL_AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_COUNTER_TYPE_AMD 0x8BC0
+#define GL_COUNTER_RANGE_AMD 0x8BC1
+#define GL_UNSIGNED_INT64_AMD 0x8BC2
+#define GL_PERCENTAGE_AMD 0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
+#define GL_PERFMON_RESULT_AMD 0x8BC6
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA 0x80E1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_depth_texture */
+#ifndef GL_OES_depth_texture
+#define GL_OES_depth_texture 1
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fragment_precision_high */
+#ifndef GL_OES_fragment_precision_high
+#define GL_OES_fragment_precision_high 1
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_OES_get_program_binary 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_OES_standard_derivatives 1
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_OES_texture_3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
+/* GL_OES_texture_float */
+#ifndef GL_OES_texture_float
+#define GL_OES_texture_float 1
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_OES_texture_half_float 1
+#endif
+
+/* GL_OES_texture_npot */
+#ifndef GL_OES_texture_npot
+#define GL_OES_texture_npot 1
+#endif
+
+/* GL_OES_vertex_half_float */
+#ifndef GL_OES_vertex_half_float
+#define GL_OES_vertex_half_float 1
+#endif
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_OES_vertex_type_10_10_10_2 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
+/* AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
+GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
+GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
+GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);
+GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2ext_h_ */
diff --git a/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2platform.h b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2platform.h
new file mode 100644
index 0000000..3e9036c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/GLES2/gl2platform.h
@@ -0,0 +1,29 @@
+#ifndef __gl2platform_h_
+#define __gl2platform_h_
+
+/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
+ * Last modified on 2008/12/19
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+#ifndef GL_APICALL
+#define GL_APICALL KHRONOS_APICALL
+#endif
+
+#define GL_APIENTRY KHRONOS_APIENTRY
+
+#endif /* __gl2platform_h_ */
diff --git a/6/platforms/android-5/arch-x86/usr/include/KHR/khrplatform.h b/6/platforms/android-5/arch-x86/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..aff7763
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/alloca.h b/6/platforms/android-5/arch-x86/usr/include/alloca.h
new file mode 120000
index 0000000..368863b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/android/api-level.h b/6/platforms/android-5/arch-x86/usr/include/android/api-level.h
new file mode 100644
index 0000000..2280147
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 5
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-5/arch-x86/usr/include/android/log.h b/6/platforms/android-5/arch-x86/usr/include/android/log.h
new file mode 120000
index 0000000..5901223
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/arpa/inet.h b/6/platforms/android-5/arch-x86/usr/include/arpa/inet.h
new file mode 120000
index 0000000..6baac29
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/arpa/nameser.h b/6/platforms/android-5/arch-x86/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..1d7a5b0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..ddea405
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..68eec3a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..4eeba54
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..0ddd43e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..4aaa3a4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/find.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..6b2ff3d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..6a5dc5c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..6e2c349
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/le.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..0874eb3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..4380890
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/bug.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..9bfe6c1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/cputime.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..297a1f2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..0c6bf97
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno-base.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..c66eb0c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..4de417e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/fcntl.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..70241ae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/futex.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..5b36c08
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/ioctl.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..ca96fe6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/ipc.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..3f9c610
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/local.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..dd6c458
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/memory_model.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..5326f70
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/mman.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..76ace3a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..9a7f8ec
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/percpu.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..8fa876c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..b41367d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..3308cda
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/poll.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..f6bfd09
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/resource.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..1aabbaf
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/sections.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..ec8e236
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/siginfo.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..dc6cd5e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/signal.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..f1d50ed
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/tlb.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..0bc6bb4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/topology.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..368dbc9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/asm-generic/xor.h b/6/platforms/android-5/arch-x86/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..3332510
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/assert.h b/6/platforms/android-5/arch-x86/usr/include/assert.h
new file mode 120000
index 0000000..394ba6a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/byteswap.h b/6/platforms/android-5/arch-x86/usr/include/byteswap.h
new file mode 120000
index 0000000..538e9a7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/ctype.h b/6/platforms/android-5/arch-x86/usr/include/ctype.h
new file mode 120000
index 0000000..13f3a4e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/dirent.h b/6/platforms/android-5/arch-x86/usr/include/dirent.h
new file mode 120000
index 0000000..6b24b78
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/dlfcn.h b/6/platforms/android-5/arch-x86/usr/include/dlfcn.h
new file mode 120000
index 0000000..8a3dac4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/elf.h b/6/platforms/android-5/arch-x86/usr/include/elf.h
new file mode 120000
index 0000000..d34d091
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/endian.h b/6/platforms/android-5/arch-x86/usr/include/endian.h
new file mode 120000
index 0000000..093a4ea
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/err.h b/6/platforms/android-5/arch-x86/usr/include/err.h
new file mode 120000
index 0000000..3a6b6f0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/errno.h b/6/platforms/android-5/arch-x86/usr/include/errno.h
new file mode 120000
index 0000000..fdf585e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/fcntl.h b/6/platforms/android-5/arch-x86/usr/include/fcntl.h
new file mode 120000
index 0000000..3b906e3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/features.h b/6/platforms/android-5/arch-x86/usr/include/features.h
new file mode 120000
index 0000000..f302c29
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/fnmatch.h b/6/platforms/android-5/arch-x86/usr/include/fnmatch.h
new file mode 120000
index 0000000..bbae00a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/getopt.h b/6/platforms/android-5/arch-x86/usr/include/getopt.h
new file mode 120000
index 0000000..ad6d5ba
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/grp.h b/6/platforms/android-5/arch-x86/usr/include/grp.h
new file mode 120000
index 0000000..92cfa10
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/inttypes.h b/6/platforms/android-5/arch-x86/usr/include/inttypes.h
new file mode 120000
index 0000000..8c900b3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/jni.h b/6/platforms/android-5/arch-x86/usr/include/jni.h
new file mode 120000
index 0000000..d00a085
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/lastlog.h b/6/platforms/android-5/arch-x86/usr/include/lastlog.h
new file mode 120000
index 0000000..4dab2d0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/libgen.h b/6/platforms/android-5/arch-x86/usr/include/libgen.h
new file mode 120000
index 0000000..38986d9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/limits.h b/6/platforms/android-5/arch-x86/usr/include/limits.h
new file mode 120000
index 0000000..5f9f10b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/a.out.h b/6/platforms/android-5/arch-x86/usr/include/linux/a.out.h
new file mode 120000
index 0000000..c5a61ed
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/aio_abi.h b/6/platforms/android-5/arch-x86/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..2774da2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/akm8976.h b/6/platforms/android-5/arch-x86/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..45e1359
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/android_alarm.h b/6/platforms/android-5/arch-x86/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..78bc968
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/android_pmem.h b/6/platforms/android-5/arch-x86/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..682a7ca
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/android_power.h b/6/platforms/android-5/arch-x86/usr/include/linux/android_power.h
new file mode 120000
index 0000000..2966c06
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/apm_bios.h b/6/platforms/android-5/arch-x86/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..56f252c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ashmem.h b/6/platforms/android-5/arch-x86/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..36aeb12
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ata.h b/6/platforms/android-5/arch-x86/usr/include/linux/ata.h
new file mode 120000
index 0000000..028be3f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atm.h b/6/platforms/android-5/arch-x86/usr/include/linux/atm.h
new file mode 120000
index 0000000..42e2816
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atmapi.h b/6/platforms/android-5/arch-x86/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..c79ac5f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atmdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..fdfcc7e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atmioc.h b/6/platforms/android-5/arch-x86/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..02a3a71
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atmppp.h b/6/platforms/android-5/arch-x86/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..1a3ed01
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/atmsap.h b/6/platforms/android-5/arch-x86/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..bd0ea06
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/attribute_container.h b/6/platforms/android-5/arch-x86/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..122711b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/auto_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..ca4d1f2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/autoconf.h b/6/platforms/android-5/arch-x86/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..3b5f6bd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/auxvec.h b/6/platforms/android-5/arch-x86/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..797a517
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/backing-dev.h b/6/platforms/android-5/arch-x86/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..8fc99f9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/binder.h b/6/platforms/android-5/arch-x86/usr/include/linux/binder.h
new file mode 120000
index 0000000..7a4d19b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/binfmts.h b/6/platforms/android-5/arch-x86/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..ea6dd24
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/bio.h b/6/platforms/android-5/arch-x86/usr/include/linux/bio.h
new file mode 120000
index 0000000..77b3f4f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/bitmap.h b/6/platforms/android-5/arch-x86/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..9cde5f7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/bitops.h b/6/platforms/android-5/arch-x86/usr/include/linux/bitops.h
new file mode 120000
index 0000000..587c203
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/blkdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..a5be6fd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/blkpg.h b/6/platforms/android-5/arch-x86/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..d1fab6b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/blockgroup_lock.h b/6/platforms/android-5/arch-x86/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..baf80f5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..a9efb8c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/generic.h b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..c5afa3f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..35014a7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swab.h b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..2e9ae42
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swabb.h b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..4fa5fd2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/cache.h b/6/platforms/android-5/arch-x86/usr/include/linux/cache.h
new file mode 120000
index 0000000..bcf6718
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/calc64.h b/6/platforms/android-5/arch-x86/usr/include/linux/calc64.h
new file mode 120000
index 0000000..1435db6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/capability.h b/6/platforms/android-5/arch-x86/usr/include/linux/capability.h
new file mode 120000
index 0000000..2b89476
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/capi.h b/6/platforms/android-5/arch-x86/usr/include/linux/capi.h
new file mode 120000
index 0000000..bd852a1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/cdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/cdev.h
new file mode 120000
index 0000000..c7042a1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/cdrom.h b/6/platforms/android-5/arch-x86/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..daeaadb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/circ_buf.h b/6/platforms/android-5/arch-x86/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..eff37ad
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/clk.h b/6/platforms/android-5/arch-x86/usr/include/linux/clk.h
new file mode 120000
index 0000000..6a1866b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/coda.h b/6/platforms/android-5/arch-x86/usr/include/linux/coda.h
new file mode 120000
index 0000000..13b747e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/coda_fs_i.h b/6/platforms/android-5/arch-x86/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..aed9dfc
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/compat.h b/6/platforms/android-5/arch-x86/usr/include/linux/compat.h
new file mode 120000
index 0000000..3b7685c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/compiler-gcc.h b/6/platforms/android-5/arch-x86/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..ed9b94c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/compiler.h b/6/platforms/android-5/arch-x86/usr/include/linux/compiler.h
new file mode 120000
index 0000000..0d38117
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/completion.h b/6/platforms/android-5/arch-x86/usr/include/linux/completion.h
new file mode 120000
index 0000000..023a311
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/config.h b/6/platforms/android-5/arch-x86/usr/include/linux/config.h
new file mode 120000
index 0000000..21cc18a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/console_struct.h b/6/platforms/android-5/arch-x86/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..7c57858
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/cpu.h b/6/platforms/android-5/arch-x86/usr/include/linux/cpu.h
new file mode 120000
index 0000000..1baeb30
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/cpumask.h b/6/platforms/android-5/arch-x86/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..b74b55e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ctype.h b/6/platforms/android-5/arch-x86/usr/include/linux/ctype.h
new file mode 120000
index 0000000..6090723
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/dccp.h b/6/platforms/android-5/arch-x86/usr/include/linux/dccp.h
new file mode 120000
index 0000000..a394f2c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/debug_locks.h b/6/platforms/android-5/arch-x86/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..a1c9a63
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/delay.h b/6/platforms/android-5/arch-x86/usr/include/linux/delay.h
new file mode 120000
index 0000000..708dfae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/device.h b/6/platforms/android-5/arch-x86/usr/include/linux/device.h
new file mode 120000
index 0000000..0e07d8a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/dirent.h b/6/platforms/android-5/arch-x86/usr/include/linux/dirent.h
new file mode 120000
index 0000000..8c9ebc7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/dm-ioctl.h b/6/platforms/android-5/arch-x86/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..6527262
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/dma-mapping.h b/6/platforms/android-5/arch-x86/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..a170135
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/dmaengine.h b/6/platforms/android-5/arch-x86/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..ea330ce
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/efs_dir.h b/6/platforms/android-5/arch-x86/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..cda7821
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_i.h b/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..5a82b5f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_sb.h b/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..58803ba
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/elevator.h b/6/platforms/android-5/arch-x86/usr/include/linux/elevator.h
new file mode 120000
index 0000000..3ee7245
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/elf-em.h b/6/platforms/android-5/arch-x86/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..57e2f34
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/elf.h b/6/platforms/android-5/arch-x86/usr/include/linux/elf.h
new file mode 120000
index 0000000..e8fc84a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/err.h b/6/platforms/android-5/arch-x86/usr/include/linux/err.h
new file mode 120000
index 0000000..c65befa
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/errno.h b/6/platforms/android-5/arch-x86/usr/include/linux/errno.h
new file mode 120000
index 0000000..d7ef7fe
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/errqueue.h b/6/platforms/android-5/arch-x86/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..8206d6c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/etherdevice.h b/6/platforms/android-5/arch-x86/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..d393d0a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ext2_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..aff4e34
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ext3_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..8a80ee7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/fadvise.h b/6/platforms/android-5/arch-x86/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..534cfa6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/fb.h b/6/platforms/android-5/arch-x86/usr/include/linux/fb.h
new file mode 120000
index 0000000..de15881
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/fcntl.h b/6/platforms/android-5/arch-x86/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..97caf85
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/fd.h b/6/platforms/android-5/arch-x86/usr/include/linux/fd.h
new file mode 120000
index 0000000..6b16d20
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/file.h b/6/platforms/android-5/arch-x86/usr/include/linux/file.h
new file mode 120000
index 0000000..2fd9ef9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/filter.h b/6/platforms/android-5/arch-x86/usr/include/linux/filter.h
new file mode 120000
index 0000000..1251741
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/fs.h
new file mode 120000
index 0000000..acd6abb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ftape.h b/6/platforms/android-5/arch-x86/usr/include/linux/ftape.h
new file mode 120000
index 0000000..bf61f45
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/futex.h b/6/platforms/android-5/arch-x86/usr/include/linux/futex.h
new file mode 120000
index 0000000..ac265bd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/genhd.h b/6/platforms/android-5/arch-x86/usr/include/linux/genhd.h
new file mode 120000
index 0000000..6174674
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/gfp.h b/6/platforms/android-5/arch-x86/usr/include/linux/gfp.h
new file mode 120000
index 0000000..6f079f9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/hardirq.h b/6/platforms/android-5/arch-x86/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..eab9929
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-5/arch-x86/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..5ddf756
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/hdreg.h b/6/platforms/android-5/arch-x86/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..d0c2f61
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/hdsmart.h b/6/platforms/android-5/arch-x86/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..aaa6c62
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/highmem.h b/6/platforms/android-5/arch-x86/usr/include/linux/highmem.h
new file mode 120000
index 0000000..32f0c3e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/hil.h b/6/platforms/android-5/arch-x86/usr/include/linux/hil.h
new file mode 120000
index 0000000..157a7e6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/i2c.h b/6/platforms/android-5/arch-x86/usr/include/linux/i2c.h
new file mode 120000
index 0000000..d6a7557
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/icmp.h b/6/platforms/android-5/arch-x86/usr/include/linux/icmp.h
new file mode 120000
index 0000000..61e7e74
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if.h b/6/platforms/android-5/arch-x86/usr/include/linux/if.h
new file mode 120000
index 0000000..d716749
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_arcnet.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..9e250f2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_arp.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..2edc4c0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_bridge.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..c86e9b5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_ether.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..22bd034
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_fc.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..a5bb94f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_fddi.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..910c9de
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_hippi.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..ce81989
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_packet.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..ffa9571
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_ppp.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..5f03c0b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_tr.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..f6df095
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_tun.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..9dd83d1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/if_vlan.h b/6/platforms/android-5/arch-x86/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..9f7be42
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/in.h b/6/platforms/android-5/arch-x86/usr/include/linux/in.h
new file mode 120000
index 0000000..773c491
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/in6.h b/6/platforms/android-5/arch-x86/usr/include/linux/in6.h
new file mode 120000
index 0000000..2effcd1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/init.h b/6/platforms/android-5/arch-x86/usr/include/linux/init.h
new file mode 120000
index 0000000..0b940b8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/inotify.h b/6/platforms/android-5/arch-x86/usr/include/linux/inotify.h
new file mode 120000
index 0000000..02a51e8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/input.h b/6/platforms/android-5/arch-x86/usr/include/linux/input.h
new file mode 120000
index 0000000..0daaa83
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/interrupt.h b/6/platforms/android-5/arch-x86/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..1c384ab
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ioctl.h b/6/platforms/android-5/arch-x86/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..b072683
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ioport.h b/6/platforms/android-5/arch-x86/usr/include/linux/ioport.h
new file mode 120000
index 0000000..dafbc79
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ioprio.h b/6/platforms/android-5/arch-x86/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..c8d3642
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ip.h b/6/platforms/android-5/arch-x86/usr/include/linux/ip.h
new file mode 120000
index 0000000..3273c60
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ipc.h b/6/platforms/android-5/arch-x86/usr/include/linux/ipc.h
new file mode 120000
index 0000000..4b2fb92
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..63db870
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_smi.h b/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..631bb1f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ipx.h b/6/platforms/android-5/arch-x86/usr/include/linux/ipx.h
new file mode 120000
index 0000000..3b611f3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/irq.h b/6/platforms/android-5/arch-x86/usr/include/linux/irq.h
new file mode 120000
index 0000000..b16f797
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/irq_cpustat.h b/6/platforms/android-5/arch-x86/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..fd65439
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/irqflags.h b/6/platforms/android-5/arch-x86/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..3f84990
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/irqreturn.h b/6/platforms/android-5/arch-x86/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..1c194af
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/jbd.h b/6/platforms/android-5/arch-x86/usr/include/linux/jbd.h
new file mode 120000
index 0000000..a7ba6c3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/jiffies.h b/6/platforms/android-5/arch-x86/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..95c93a2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kd.h b/6/platforms/android-5/arch-x86/usr/include/linux/kd.h
new file mode 120000
index 0000000..67a0e89
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kdev_t.h b/6/platforms/android-5/arch-x86/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..d0b38fd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kernel.h b/6/platforms/android-5/arch-x86/usr/include/linux/kernel.h
new file mode 120000
index 0000000..4b550a8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kernel_stat.h b/6/platforms/android-5/arch-x86/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..481b2f9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kernelcapi.h b/6/platforms/android-5/arch-x86/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..1f3cfb4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kexec.h b/6/platforms/android-5/arch-x86/usr/include/linux/kexec.h
new file mode 120000
index 0000000..80009e2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/key.h b/6/platforms/android-5/arch-x86/usr/include/linux/key.h
new file mode 120000
index 0000000..8557039
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/keyboard.h b/6/platforms/android-5/arch-x86/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..ca26cfc
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/keychord.h b/6/platforms/android-5/arch-x86/usr/include/linux/keychord.h
new file mode 120000
index 0000000..2c5ec9a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/klist.h b/6/platforms/android-5/arch-x86/usr/include/linux/klist.h
new file mode 120000
index 0000000..a8b6899
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kmod.h b/6/platforms/android-5/arch-x86/usr/include/linux/kmod.h
new file mode 120000
index 0000000..d8f8033
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kobject.h b/6/platforms/android-5/arch-x86/usr/include/linux/kobject.h
new file mode 120000
index 0000000..26515da
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/kref.h b/6/platforms/android-5/arch-x86/usr/include/linux/kref.h
new file mode 120000
index 0000000..f2b4ba7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ktime.h b/6/platforms/android-5/arch-x86/usr/include/linux/ktime.h
new file mode 120000
index 0000000..7180064
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/limits.h b/6/platforms/android-5/arch-x86/usr/include/linux/limits.h
new file mode 120000
index 0000000..e9aad60
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/linkage.h b/6/platforms/android-5/arch-x86/usr/include/linux/linkage.h
new file mode 120000
index 0000000..6563827
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/list.h b/6/platforms/android-5/arch-x86/usr/include/linux/list.h
new file mode 120000
index 0000000..751176c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/lockd/nlm.h b/6/platforms/android-5/arch-x86/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..b4ae21e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/lockd/xdr.h b/6/platforms/android-5/arch-x86/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..2f020d8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/lockdep.h b/6/platforms/android-5/arch-x86/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..c03f43d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/loop.h b/6/platforms/android-5/arch-x86/usr/include/linux/loop.h
new file mode 120000
index 0000000..7bc367e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/magic.h b/6/platforms/android-5/arch-x86/usr/include/linux/magic.h
new file mode 120000
index 0000000..9775d1b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/major.h b/6/platforms/android-5/arch-x86/usr/include/linux/major.h
new file mode 120000
index 0000000..38e50a1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mc146818rtc.h b/6/platforms/android-5/arch-x86/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..7918be4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mca.h b/6/platforms/android-5/arch-x86/usr/include/linux/mca.h
new file mode 120000
index 0000000..db3f26d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mempolicy.h b/6/platforms/android-5/arch-x86/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..24c4601
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mempool.h b/6/platforms/android-5/arch-x86/usr/include/linux/mempool.h
new file mode 120000
index 0000000..8d41638
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/miscdevice.h b/6/platforms/android-5/arch-x86/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..11e0255
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mm.h b/6/platforms/android-5/arch-x86/usr/include/linux/mm.h
new file mode 120000
index 0000000..1180ee5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mmc/card.h b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..6f2af13
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mmc/host.h b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..778a472
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mmc/mmc.h b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..71169e5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mmzone.h b/6/platforms/android-5/arch-x86/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..cd3fe31
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mod_devicetable.h b/6/platforms/android-5/arch-x86/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..93f3694
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/module.h b/6/platforms/android-5/arch-x86/usr/include/linux/module.h
new file mode 120000
index 0000000..9234be8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/moduleparam.h b/6/platforms/android-5/arch-x86/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..8c92a4e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mount.h b/6/platforms/android-5/arch-x86/usr/include/linux/mount.h
new file mode 120000
index 0000000..f398008
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/msdos_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..489f9f6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/msg.h b/6/platforms/android-5/arch-x86/usr/include/linux/msg.h
new file mode 120000
index 0000000..e9721eb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/msm_adsp.h b/6/platforms/android-5/arch-x86/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..a01a58d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/msm_audio.h b/6/platforms/android-5/arch-x86/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..4c00d48
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/msm_mdp.h b/6/platforms/android-5/arch-x86/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..ef1f1e5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mt9t013.h b/6/platforms/android-5/arch-x86/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..4da8cc5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/bbm.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..a2e59f1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/blktrans.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..0918962
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..785300f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..ee62af0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/compatmac.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..4e8758b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/flashchip.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..da10c13
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/map.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..d57cfce
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/mtd.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..14d5a7a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..f0eb14f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..d2ced2e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nftl.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..8a0d3ae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..873148f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtd/partitions.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..7844296
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mtio.h b/6/platforms/android-5/arch-x86/usr/include/linux/mtio.h
new file mode 120000
index 0000000..c672275
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mutex-debug.h b/6/platforms/android-5/arch-x86/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..f1aaab6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/mutex.h b/6/platforms/android-5/arch-x86/usr/include/linux/mutex.h
new file mode 120000
index 0000000..6503760
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ncp.h b/6/platforms/android-5/arch-x86/usr/include/linux/ncp.h
new file mode 120000
index 0000000..454b31d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ncp_mount.h b/6/platforms/android-5/arch-x86/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..fc9b956
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ncp_no.h b/6/platforms/android-5/arch-x86/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..e4f63b2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/net.h b/6/platforms/android-5/arch-x86/usr/include/linux/net.h
new file mode 120000
index 0000000..59071d2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netdevice.h b/6/platforms/android-5/arch-x86/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..69494e0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..1b72f15
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..9a5a262
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..7eb7d92
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..a385b3e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..46ffe48
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..6163fd4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..d586367
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..131fcc1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..8089d4e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..cea8391
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..3d698f4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..7f66a95
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..48f9193
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..b9b469a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..e19a08b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..39517e0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..abe841e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..9b60f41
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..a2a5c0a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..42f1b5b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..ff81e49
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..328c9b4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..cb675e5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..6f036b8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..ea458ae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..1db5c8d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..301bf81
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..bce91bb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..149b8f2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..df9dc26
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..c6dc23f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..481cb4b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..3f53959
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..2d45a10
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..b452eb9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_bridge.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..f419a9f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..122d745
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..f43c246
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..512016b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..bc0ae64
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..307937c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..63d5af8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..d260c74
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..d3f9976
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..f7c1102
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..352f7ff
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..32600f7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..7444e8c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..3014778
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..b36a31d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..ac0cff0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..161e334
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..352b3c6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..3ed68f8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..52f0485
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..a329cf8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..76aa12b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..9d02976
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..ec105ba
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..20b9890
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..35264ff
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..72faf4a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..0818fa3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..66bec47
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..e6e0b84
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..7025d96
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..10f0c18
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..9023947
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..c0aa80b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..a8a084d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..c044c8f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..3c7e002
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..9addfc9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..7ef7a49
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..c625abb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..2d8ab9e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..49ec961
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..8526382
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..fc22a73
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..40b4bf6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..aa2b23e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..814cfb9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..462d718
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..f7015b9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..05a4c6d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..dc02a36
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..66b8d06
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..759312c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/netlink.h b/6/platforms/android-5/arch-x86/usr/include/linux/netlink.h
new file mode 120000
index 0000000..b56390a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfs.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfs.h
new file mode 120000
index 0000000..bf28bc0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfs2.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..7a40c8e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfs3.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..af6a76e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfs4.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..2cdc9c7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfs_xdr.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..43a2185
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsacl.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..4679954
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/auth.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..83931af
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/const.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..71ff6c8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/debug.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..6b2e9b2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/export.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..6b40951
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/interface.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..655a0b3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..c082d8a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/stats.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..23c7bba
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/xdr.h b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..490d09b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/node.h b/6/platforms/android-5/arch-x86/usr/include/linux/node.h
new file mode 120000
index 0000000..c8f48c5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nodemask.h b/6/platforms/android-5/arch-x86/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..9011ffb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/notifier.h b/6/platforms/android-5/arch-x86/usr/include/linux/notifier.h
new file mode 120000
index 0000000..1a47ea9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/numa.h b/6/platforms/android-5/arch-x86/usr/include/linux/numa.h
new file mode 120000
index 0000000..485dd71
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/nvram.h b/6/platforms/android-5/arch-x86/usr/include/linux/nvram.h
new file mode 120000
index 0000000..0e08015
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/omap_csmi.h b/6/platforms/android-5/arch-x86/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..61b7461
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pagemap.h b/6/platforms/android-5/arch-x86/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..0a19bf8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/param.h b/6/platforms/android-5/arch-x86/usr/include/linux/param.h
new file mode 120000
index 0000000..2acd9ab
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/patchkey.h b/6/platforms/android-5/arch-x86/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..71c9dc4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pci.h b/6/platforms/android-5/arch-x86/usr/include/linux/pci.h
new file mode 120000
index 0000000..ac67ea8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pci_ids.h b/6/platforms/android-5/arch-x86/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..4d07038
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pci_regs.h b/6/platforms/android-5/arch-x86/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..1ee100c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/percpu.h b/6/platforms/android-5/arch-x86/usr/include/linux/percpu.h
new file mode 120000
index 0000000..6ed144e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/percpu_counter.h b/6/platforms/android-5/arch-x86/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..564ff5c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/personality.h b/6/platforms/android-5/arch-x86/usr/include/linux/personality.h
new file mode 120000
index 0000000..91c47a6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pfkeyv2.h b/6/platforms/android-5/arch-x86/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..81be0e4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pkt_cls.h b/6/platforms/android-5/arch-x86/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..3358798
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pkt_sched.h b/6/platforms/android-5/arch-x86/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..b90825e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/platform_device.h b/6/platforms/android-5/arch-x86/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..6c0e090
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/plist.h b/6/platforms/android-5/arch-x86/usr/include/linux/plist.h
new file mode 120000
index 0000000..dce831d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pm.h b/6/platforms/android-5/arch-x86/usr/include/linux/pm.h
new file mode 120000
index 0000000..ac50f87
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/pnp.h b/6/platforms/android-5/arch-x86/usr/include/linux/pnp.h
new file mode 120000
index 0000000..bd43ede
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/poll.h b/6/platforms/android-5/arch-x86/usr/include/linux/poll.h
new file mode 120000
index 0000000..8cc74c5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/posix_acl.h b/6/platforms/android-5/arch-x86/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..1eeb18d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/posix_types.h b/6/platforms/android-5/arch-x86/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..6693821
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ppdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..62d920a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ppp_defs.h b/6/platforms/android-5/arch-x86/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..ddbd8ad
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/prctl.h b/6/platforms/android-5/arch-x86/usr/include/linux/prctl.h
new file mode 120000
index 0000000..651d00e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/preempt.h b/6/platforms/android-5/arch-x86/usr/include/linux/preempt.h
new file mode 120000
index 0000000..a8e6c83
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/proc_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..de2a8f0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ptrace.h b/6/platforms/android-5/arch-x86/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..b1184aa
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/qic117.h b/6/platforms/android-5/arch-x86/usr/include/linux/qic117.h
new file mode 120000
index 0000000..de0905d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/qnxtypes.h b/6/platforms/android-5/arch-x86/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..d609e4e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/quota.h b/6/platforms/android-5/arch-x86/usr/include/linux/quota.h
new file mode 120000
index 0000000..5683269
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/raid/md.h b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..aa43f15
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_k.h b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..bf2e84b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_p.h b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..78b1df2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_u.h b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..fce4034
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/raid/xor.h b/6/platforms/android-5/arch-x86/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..ec7d42c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/random.h b/6/platforms/android-5/arch-x86/usr/include/linux/random.h
new file mode 120000
index 0000000..be3c491
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/rbtree.h b/6/platforms/android-5/arch-x86/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..86e8b60
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/rcupdate.h b/6/platforms/android-5/arch-x86/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..a291b24
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/reboot.h b/6/platforms/android-5/arch-x86/usr/include/linux/reboot.h
new file mode 120000
index 0000000..f395177
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/relay.h b/6/platforms/android-5/arch-x86/usr/include/linux/relay.h
new file mode 120000
index 0000000..7c4f190
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/resource.h b/6/platforms/android-5/arch-x86/usr/include/linux/resource.h
new file mode 120000
index 0000000..afd5e20
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/route.h b/6/platforms/android-5/arch-x86/usr/include/linux/route.h
new file mode 120000
index 0000000..1427285
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/rtc.h b/6/platforms/android-5/arch-x86/usr/include/linux/rtc.h
new file mode 120000
index 0000000..c7a0670
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/rtnetlink.h b/6/platforms/android-5/arch-x86/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..9ad6af5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/rwsem.h b/6/platforms/android-5/arch-x86/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..0096da6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sched.h b/6/platforms/android-5/arch-x86/usr/include/linux/sched.h
new file mode 120000
index 0000000..34cbc87
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sem.h b/6/platforms/android-5/arch-x86/usr/include/linux/sem.h
new file mode 120000
index 0000000..c4395ce
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/seq_file.h b/6/platforms/android-5/arch-x86/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..04966a1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/seqlock.h b/6/platforms/android-5/arch-x86/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..4223baf
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/serial_core.h b/6/platforms/android-5/arch-x86/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..812a130
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/serial_reg.h b/6/platforms/android-5/arch-x86/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..3caef0c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/serio.h b/6/platforms/android-5/arch-x86/usr/include/linux/serio.h
new file mode 120000
index 0000000..0779801
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/shm.h b/6/platforms/android-5/arch-x86/usr/include/linux/shm.h
new file mode 120000
index 0000000..6ecd636
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/signal.h b/6/platforms/android-5/arch-x86/usr/include/linux/signal.h
new file mode 120000
index 0000000..9cbba21
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/skbuff.h b/6/platforms/android-5/arch-x86/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..0137228
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/slab.h b/6/platforms/android-5/arch-x86/usr/include/linux/slab.h
new file mode 120000
index 0000000..dc6633a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/smb.h b/6/platforms/android-5/arch-x86/usr/include/linux/smb.h
new file mode 120000
index 0000000..2d13b9c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/smp.h b/6/platforms/android-5/arch-x86/usr/include/linux/smp.h
new file mode 120000
index 0000000..c9fb16c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/smp_lock.h b/6/platforms/android-5/arch-x86/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..3453bc8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/socket.h b/6/platforms/android-5/arch-x86/usr/include/linux/socket.h
new file mode 120000
index 0000000..447923f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sockios.h b/6/platforms/android-5/arch-x86/usr/include/linux/sockios.h
new file mode 120000
index 0000000..e52fd9a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/soundcard.h b/6/platforms/android-5/arch-x86/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..82bfc20
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..4a4eaab
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..6896453
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_up.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..f576382
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..b9321f3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types_up.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..1379814
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_up.h b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..1f07d7d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/stacktrace.h b/6/platforms/android-5/arch-x86/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..08130d8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/stat.h b/6/platforms/android-5/arch-x86/usr/include/linux/stat.h
new file mode 120000
index 0000000..6f67991
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/statfs.h b/6/platforms/android-5/arch-x86/usr/include/linux/statfs.h
new file mode 120000
index 0000000..c61dbf1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/stddef.h b/6/platforms/android-5/arch-x86/usr/include/linux/stddef.h
new file mode 120000
index 0000000..230cb81
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/string.h b/6/platforms/android-5/arch-x86/usr/include/linux/string.h
new file mode 120000
index 0000000..79561c8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/stringify.h b/6/platforms/android-5/arch-x86/usr/include/linux/stringify.h
new file mode 120000
index 0000000..4382147
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..9bc756b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..d209e1d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..19805a0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/debug.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..5a10c3e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..92a0571
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..a505e46
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..94894a8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..4cb61ca
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/sched.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..88d9419
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/stats.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..9e25a4b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svc.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..dd8c422
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..229bd59
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/timer.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..17878e0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/types.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..4b4f4e2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..5609b9e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..798bf5f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-4/arch-x86/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/swap.h b/6/platforms/android-5/arch-x86/usr/include/linux/swap.h
new file mode 120000
index 0000000..1c63952
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sysctl.h b/6/platforms/android-5/arch-x86/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..63c82c8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sysdev.h b/6/platforms/android-5/arch-x86/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..ab75252
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/sysfs.h b/6/platforms/android-5/arch-x86/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..3c1b3d0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/taskstats.h b/6/platforms/android-5/arch-x86/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..b1c8ffe
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/taskstats_kern.h b/6/platforms/android-5/arch-x86/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..067edd6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/tcp.h b/6/platforms/android-5/arch-x86/usr/include/linux/tcp.h
new file mode 120000
index 0000000..a7f61ce
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/telephony.h b/6/platforms/android-5/arch-x86/usr/include/linux/telephony.h
new file mode 120000
index 0000000..ac2bb8f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/termios.h b/6/platforms/android-5/arch-x86/usr/include/linux/termios.h
new file mode 120000
index 0000000..73506b6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/textsearch.h b/6/platforms/android-5/arch-x86/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..0f2a1d2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/thread_info.h b/6/platforms/android-5/arch-x86/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..8409732
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/threads.h b/6/platforms/android-5/arch-x86/usr/include/linux/threads.h
new file mode 120000
index 0000000..0415f1b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/time.h b/6/platforms/android-5/arch-x86/usr/include/linux/time.h
new file mode 120000
index 0000000..53a234e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/timer.h b/6/platforms/android-5/arch-x86/usr/include/linux/timer.h
new file mode 120000
index 0000000..30d53dd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/times.h b/6/platforms/android-5/arch-x86/usr/include/linux/times.h
new file mode 120000
index 0000000..698db8c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/timex.h b/6/platforms/android-5/arch-x86/usr/include/linux/timex.h
new file mode 120000
index 0000000..71644c9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/tiocl.h b/6/platforms/android-5/arch-x86/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..9d0a90b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/transport_class.h b/6/platforms/android-5/arch-x86/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..b95e78d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/tty.h b/6/platforms/android-5/arch-x86/usr/include/linux/tty.h
new file mode 120000
index 0000000..dc63ebf
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/types.h b/6/platforms/android-5/arch-x86/usr/include/linux/types.h
new file mode 120000
index 0000000..2575d28
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/udp.h b/6/platforms/android-5/arch-x86/usr/include/linux/udp.h
new file mode 120000
index 0000000..1b4e10c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_i.h b/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..8b9535d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..aacb28c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/uio.h b/6/platforms/android-5/arch-x86/usr/include/linux/uio.h
new file mode 120000
index 0000000..abefd3e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/un.h b/6/platforms/android-5/arch-x86/usr/include/linux/un.h
new file mode 120000
index 0000000..d499d7e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/unistd.h b/6/platforms/android-5/arch-x86/usr/include/linux/unistd.h
new file mode 120000
index 0000000..3575edf
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/usb.h b/6/platforms/android-5/arch-x86/usr/include/linux/usb.h
new file mode 120000
index 0000000..cd4643c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/usb_ch9.h b/6/platforms/android-5/arch-x86/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..31ff6cb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/usbdevice_fs.h b/6/platforms/android-5/arch-x86/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..2db6ee3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/user.h b/6/platforms/android-5/arch-x86/usr/include/linux/user.h
new file mode 120000
index 0000000..89f841c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/utime.h b/6/platforms/android-5/arch-x86/usr/include/linux/utime.h
new file mode 120000
index 0000000..30cab5a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/utsname.h b/6/platforms/android-5/arch-x86/usr/include/linux/utsname.h
new file mode 120000
index 0000000..f82c94d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/version.h b/6/platforms/android-5/arch-x86/usr/include/linux/version.h
new file mode 120000
index 0000000..68fccfc
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/vfs.h b/6/platforms/android-5/arch-x86/usr/include/linux/vfs.h
new file mode 120000
index 0000000..ee70a24
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/videodev.h b/6/platforms/android-5/arch-x86/usr/include/linux/videodev.h
new file mode 120000
index 0000000..fade817
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/videodev2.h b/6/platforms/android-5/arch-x86/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..9fa9cc8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/vmalloc.h b/6/platforms/android-5/arch-x86/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..5f8bf92
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/vt.h b/6/platforms/android-5/arch-x86/usr/include/linux/vt.h
new file mode 120000
index 0000000..2994828
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/vt_buffer.h b/6/platforms/android-5/arch-x86/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..88b4833
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/wait.h b/6/platforms/android-5/arch-x86/usr/include/linux/wait.h
new file mode 120000
index 0000000..cde8dad
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/wanrouter.h b/6/platforms/android-5/arch-x86/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..1b8fc1f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/wireless.h b/6/platforms/android-5/arch-x86/usr/include/linux/wireless.h
new file mode 120000
index 0000000..78a6637
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/workqueue.h b/6/platforms/android-5/arch-x86/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..4999583
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/xattr.h b/6/platforms/android-5/arch-x86/usr/include/linux/xattr.h
new file mode 120000
index 0000000..aa54908
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/zconf.h b/6/platforms/android-5/arch-x86/usr/include/linux/zconf.h
new file mode 120000
index 0000000..df15665
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/zlib.h b/6/platforms/android-5/arch-x86/usr/include/linux/zlib.h
new file mode 120000
index 0000000..962e7c8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/linux/zorro_ids.h b/6/platforms/android-5/arch-x86/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..cb9271b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/locale.h b/6/platforms/android-5/arch-x86/usr/include/locale.h
new file mode 120000
index 0000000..b6f22b5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/malloc.h b/6/platforms/android-5/arch-x86/usr/include/malloc.h
new file mode 120000
index 0000000..343dbc7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/math.h b/6/platforms/android-5/arch-x86/usr/include/math.h
new file mode 120000
index 0000000..8cfe797
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/memory.h b/6/platforms/android-5/arch-x86/usr/include/memory.h
new file mode 120000
index 0000000..064e9f9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/mntent.h b/6/platforms/android-5/arch-x86/usr/include/mntent.h
new file mode 120000
index 0000000..5463300
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-abi.h b/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..48f8718
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-user.h b/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..f4b8eae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/ethertypes.h b/6/platforms/android-5/arch-x86/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..e0e7174
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if.h b/6/platforms/android-5/arch-x86/usr/include/net/if.h
new file mode 120000
index 0000000..0c67693
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_arp.h b/6/platforms/android-5/arch-x86/usr/include/net/if_arp.h
new file mode 120000
index 0000000..627c8a1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_dl.h b/6/platforms/android-5/arch-x86/usr/include/net/if_dl.h
new file mode 120000
index 0000000..013f0e2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_ether.h b/6/platforms/android-5/arch-x86/usr/include/net/if_ether.h
new file mode 120000
index 0000000..8227646
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_ieee1394.h b/6/platforms/android-5/arch-x86/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..4dd1db1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_packet.h b/6/platforms/android-5/arch-x86/usr/include/net/if_packet.h
new file mode 120000
index 0000000..6e89215
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/if_types.h b/6/platforms/android-5/arch-x86/usr/include/net/if_types.h
new file mode 120000
index 0000000..54f9dec
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/net/route.h b/6/platforms/android-5/arch-x86/usr/include/net/route.h
new file mode 120000
index 0000000..f79063b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netdb.h b/6/platforms/android-5/arch-x86/usr/include/netdb.h
new file mode 120000
index 0000000..4e9813a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/ether.h b/6/platforms/android-5/arch-x86/usr/include/netinet/ether.h
new file mode 120000
index 0000000..42adfd9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/if_ether.h b/6/platforms/android-5/arch-x86/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..66f2ec7
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/in.h b/6/platforms/android-5/arch-x86/usr/include/netinet/in.h
new file mode 120000
index 0000000..0c22a38
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/in6.h b/6/platforms/android-5/arch-x86/usr/include/netinet/in6.h
new file mode 120000
index 0000000..7e29282
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/in_systm.h b/6/platforms/android-5/arch-x86/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..af3f3c0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/ip.h b/6/platforms/android-5/arch-x86/usr/include/netinet/ip.h
new file mode 120000
index 0000000..861d49a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/ip_icmp.h b/6/platforms/android-5/arch-x86/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..4fe967b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/tcp.h b/6/platforms/android-5/arch-x86/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..45f7905
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netinet/udp.h b/6/platforms/android-5/arch-x86/usr/include/netinet/udp.h
new file mode 120000
index 0000000..414ce2c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/netpacket/packet.h b/6/platforms/android-5/arch-x86/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..c373d6b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/nsswitch.h b/6/platforms/android-5/arch-x86/usr/include/nsswitch.h
new file mode 120000
index 0000000..8d634c0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/pathconf.h b/6/platforms/android-5/arch-x86/usr/include/pathconf.h
new file mode 120000
index 0000000..9b859b4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/paths.h b/6/platforms/android-5/arch-x86/usr/include/paths.h
new file mode 120000
index 0000000..4c21a66
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/poll.h b/6/platforms/android-5/arch-x86/usr/include/poll.h
new file mode 120000
index 0000000..6402900
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/pthread.h b/6/platforms/android-5/arch-x86/usr/include/pthread.h
new file mode 100644
index 0000000..6603b3f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/pthread.h
@@ -0,0 +1,270 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-5/arch-x86/usr/include/pwd.h b/6/platforms/android-5/arch-x86/usr/include/pwd.h
new file mode 120000
index 0000000..cd8ffed
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/resolv.h b/6/platforms/android-5/arch-x86/usr/include/resolv.h
new file mode 120000
index 0000000..6c69bf5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sched.h b/6/platforms/android-5/arch-x86/usr/include/sched.h
new file mode 120000
index 0000000..95d4ddd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sched.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/sched.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/semaphore.h b/6/platforms/android-5/arch-x86/usr/include/semaphore.h
new file mode 120000
index 0000000..596bbf4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/setjmp.h b/6/platforms/android-5/arch-x86/usr/include/setjmp.h
new file mode 120000
index 0000000..5791d6c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sgtty.h b/6/platforms/android-5/arch-x86/usr/include/sgtty.h
new file mode 120000
index 0000000..0fd55af
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sha1.h b/6/platforms/android-5/arch-x86/usr/include/sha1.h
new file mode 120000
index 0000000..79315db
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/signal.h b/6/platforms/android-5/arch-x86/usr/include/signal.h
new file mode 120000
index 0000000..003f177
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/stdint.h b/6/platforms/android-5/arch-x86/usr/include/stdint.h
new file mode 120000
index 0000000..d6ad6f2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/stdio.h b/6/platforms/android-5/arch-x86/usr/include/stdio.h
new file mode 120000
index 0000000..4b9cf6e
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/stdlib.h b/6/platforms/android-5/arch-x86/usr/include/stdlib.h
new file mode 120000
index 0000000..dbad83d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/stdlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/stdlib.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/string.h b/6/platforms/android-5/arch-x86/usr/include/string.h
new file mode 120000
index 0000000..ddb473b
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/strings.h b/6/platforms/android-5/arch-x86/usr/include/strings.h
new file mode 120000
index 0000000..4bd32e1
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/_errdefs.h b/6/platforms/android-5/arch-x86/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..d3f33cf
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/_sigdefs.h b/6/platforms/android-5/arch-x86/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..648687f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/_system_properties.h b/6/platforms/android-5/arch-x86/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..c608ee2
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/_types.h b/6/platforms/android-5/arch-x86/usr/include/sys/_types.h
new file mode 120000
index 0000000..f4f0ffb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/atomics.h b/6/platforms/android-5/arch-x86/usr/include/sys/atomics.h
new file mode 120000
index 0000000..770e102
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/cdefs.h b/6/platforms/android-5/arch-x86/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..9e76cf8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/cdefs_elf.h b/6/platforms/android-5/arch-x86/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..fd1c4c6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/dirent.h b/6/platforms/android-5/arch-x86/usr/include/sys/dirent.h
new file mode 120000
index 0000000..d8eddeb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/endian.h b/6/platforms/android-5/arch-x86/usr/include/sys/endian.h
new file mode 120000
index 0000000..743b76c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/epoll.h b/6/platforms/android-5/arch-x86/usr/include/sys/epoll.h
new file mode 120000
index 0000000..0db87a8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/errno.h b/6/platforms/android-5/arch-x86/usr/include/sys/errno.h
new file mode 120000
index 0000000..018f270
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/exec_elf.h b/6/platforms/android-5/arch-x86/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..3f3c631
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/file.h b/6/platforms/android-5/arch-x86/usr/include/sys/file.h
new file mode 120000
index 0000000..4d4f8fe
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/fsuid.h b/6/platforms/android-5/arch-x86/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..ac0e6f0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/inotify.h b/6/platforms/android-5/arch-x86/usr/include/sys/inotify.h
new file mode 120000
index 0000000..4541242
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ioctl.h b/6/platforms/android-5/arch-x86/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..b2fc924
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ioctl_compat.h b/6/platforms/android-5/arch-x86/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..d7058b5
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ipc.h b/6/platforms/android-5/arch-x86/usr/include/sys/ipc.h
new file mode 120000
index 0000000..d2078dd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/klog.h b/6/platforms/android-5/arch-x86/usr/include/sys/klog.h
new file mode 120000
index 0000000..0d4faaa
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/limits.h b/6/platforms/android-5/arch-x86/usr/include/sys/limits.h
new file mode 120000
index 0000000..6b774de
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/linux-syscalls.h b/6/platforms/android-5/arch-x86/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..e2d7b7d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/linux-unistd.h b/6/platforms/android-5/arch-x86/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..dfff35c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/mman.h b/6/platforms/android-5/arch-x86/usr/include/sys/mman.h
new file mode 120000
index 0000000..66cd610
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/mount.h b/6/platforms/android-5/arch-x86/usr/include/sys/mount.h
new file mode 120000
index 0000000..f15a580
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/param.h b/6/platforms/android-5/arch-x86/usr/include/sys/param.h
new file mode 120000
index 0000000..e03f626
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/poll.h b/6/platforms/android-5/arch-x86/usr/include/sys/poll.h
new file mode 120000
index 0000000..9b2d925
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/prctl.h b/6/platforms/android-5/arch-x86/usr/include/sys/prctl.h
new file mode 120000
index 0000000..c19ef65
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ptrace.h b/6/platforms/android-5/arch-x86/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..47f2a03
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/queue.h b/6/platforms/android-5/arch-x86/usr/include/sys/queue.h
new file mode 120000
index 0000000..de55947
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/reboot.h b/6/platforms/android-5/arch-x86/usr/include/sys/reboot.h
new file mode 120000
index 0000000..9d2fa15
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/resource.h b/6/platforms/android-5/arch-x86/usr/include/sys/resource.h
new file mode 120000
index 0000000..a44e5e4
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/select.h b/6/platforms/android-5/arch-x86/usr/include/sys/select.h
new file mode 120000
index 0000000..a813c93
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/sendfile.h b/6/platforms/android-5/arch-x86/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..fe9c015
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/socket.h b/6/platforms/android-5/arch-x86/usr/include/sys/socket.h
new file mode 120000
index 0000000..dac4c35
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/socketcalls.h b/6/platforms/android-5/arch-x86/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..3bfdd63
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/stat.h b/6/platforms/android-5/arch-x86/usr/include/sys/stat.h
new file mode 120000
index 0000000..608e4fb
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/statfs.h b/6/platforms/android-5/arch-x86/usr/include/sys/statfs.h
new file mode 120000
index 0000000..dedcd41
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/syscall.h b/6/platforms/android-5/arch-x86/usr/include/sys/syscall.h
new file mode 120000
index 0000000..cad1c02
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/sysconf.h b/6/platforms/android-5/arch-x86/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..c7d240c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/sysinfo.h b/6/platforms/android-5/arch-x86/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..1c86575
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/syslimits.h b/6/platforms/android-5/arch-x86/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..3edc478
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/sysmacros.h b/6/platforms/android-5/arch-x86/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..4d83d3d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/system_properties.h b/6/platforms/android-5/arch-x86/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..b90387c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/time.h b/6/platforms/android-5/arch-x86/usr/include/sys/time.h
new file mode 120000
index 0000000..03b89d8
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/timeb.h b/6/platforms/android-5/arch-x86/usr/include/sys/timeb.h
new file mode 120000
index 0000000..b1e58d6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/times.h b/6/platforms/android-5/arch-x86/usr/include/sys/times.h
new file mode 120000
index 0000000..33d6309
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ttychars.h b/6/platforms/android-5/arch-x86/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..31edcfe
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/ttydev.h b/6/platforms/android-5/arch-x86/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..7769917
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/types.h b/6/platforms/android-5/arch-x86/usr/include/sys/types.h
new file mode 120000
index 0000000..60a5665
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/uio.h b/6/platforms/android-5/arch-x86/usr/include/sys/uio.h
new file mode 120000
index 0000000..d432e92
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/un.h b/6/platforms/android-5/arch-x86/usr/include/sys/un.h
new file mode 120000
index 0000000..989976f
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/utime.h b/6/platforms/android-5/arch-x86/usr/include/sys/utime.h
new file mode 120000
index 0000000..518e54a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/utsname.h b/6/platforms/android-5/arch-x86/usr/include/sys/utsname.h
new file mode 120000
index 0000000..d8acdf6
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/vfs.h b/6/platforms/android-5/arch-x86/usr/include/sys/vfs.h
new file mode 120000
index 0000000..b7f51dc
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/vt.h b/6/platforms/android-5/arch-x86/usr/include/sys/vt.h
new file mode 120000
index 0000000..50b49da
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/sys/wait.h b/6/platforms/android-5/arch-x86/usr/include/sys/wait.h
new file mode 120000
index 0000000..966a3a9
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-4/arch-x86/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/syslog.h b/6/platforms/android-5/arch-x86/usr/include/syslog.h
new file mode 120000
index 0000000..1cd1a66
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/termio.h b/6/platforms/android-5/arch-x86/usr/include/termio.h
new file mode 120000
index 0000000..49d2a6c
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/termios.h b/6/platforms/android-5/arch-x86/usr/include/termios.h
new file mode 120000
index 0000000..0fa9dc3
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/thread_db.h b/6/platforms/android-5/arch-x86/usr/include/thread_db.h
new file mode 120000
index 0000000..943aae0
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/time.h b/6/platforms/android-5/arch-x86/usr/include/time.h
new file mode 120000
index 0000000..e3ac0ab
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/time64.h b/6/platforms/android-5/arch-x86/usr/include/time64.h
new file mode 120000
index 0000000..934e68d
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/unistd.h b/6/platforms/android-5/arch-x86/usr/include/unistd.h
new file mode 120000
index 0000000..8d8d519
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/unistd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/util.h b/6/platforms/android-5/arch-x86/usr/include/util.h
new file mode 120000
index 0000000..322ad03
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/utime.h b/6/platforms/android-5/arch-x86/usr/include/utime.h
new file mode 120000
index 0000000..7548b78
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/utmp.h b/6/platforms/android-5/arch-x86/usr/include/utmp.h
new file mode 120000
index 0000000..d92149a
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/wchar.h b/6/platforms/android-5/arch-x86/usr/include/wchar.h
new file mode 120000
index 0000000..2203204
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/wchar.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/wchar.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/wctype.h b/6/platforms/android-5/arch-x86/usr/include/wctype.h
new file mode 120000
index 0000000..76305ae
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/zconf.h b/6/platforms/android-5/arch-x86/usr/include/zconf.h
new file mode 120000
index 0000000..9848d09
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-5/arch-x86/usr/include/zlib.h b/6/platforms/android-5/arch-x86/usr/include/zlib.h
new file mode 120000
index 0000000..81afadd
--- /dev/null
+++ b/6/platforms/android-5/arch-x86/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-4/arch-x86/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES/gl.h b/6/platforms/android-8/arch-arm/usr/include/GLES/gl.h
new file mode 120000
index 0000000..690be48
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES/glext.h b/6/platforms/android-8/arch-arm/usr/include/GLES/glext.h
new file mode 120000
index 0000000..aa7907c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES/glplatform.h b/6/platforms/android-8/arch-arm/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..80e8fbf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2.h b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2.h
new file mode 120000
index 0000000..f6e989d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES2/gl2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2ext.h b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2ext.h
new file mode 120000
index 0000000..94ac6fb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2ext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES2/gl2ext.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2platform.h b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2platform.h
new file mode 120000
index 0000000..a0ceb84
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/GLES2/gl2platform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/GLES2/gl2platform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h b/6/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..02f0b71
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/alloca.h b/6/platforms/android-8/arch-arm/usr/include/alloca.h
new file mode 120000
index 0000000..9f7bd16
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/android/api-level.h b/6/platforms/android-8/arch-arm/usr/include/android/api-level.h
new file mode 100644
index 0000000..e580d72
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 8
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-8/arch-arm/usr/include/android/bitmap.h b/6/platforms/android-8/arch-arm/usr/include/android/bitmap.h
new file mode 100644
index 0000000..5078277
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/android/bitmap.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BITMAP_H
+#define ANDROID_BITMAP_H
+
+#include <stdint.h>
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ANDROID_BITMAP_RESUT_SUCCESS 0
+#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1
+#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2
+#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3
+
+enum AndroidBitmapFormat {
+ ANDROID_BITMAP_FORMAT_NONE = 0,
+ ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
+ ANDROID_BITMAP_FORMAT_RGB_565 = 4,
+ ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
+ ANDROID_BITMAP_FORMAT_A_8 = 8,
+};
+
+typedef struct {
+ uint32_t width;
+ uint32_t height;
+ uint32_t stride;
+ int32_t format;
+ uint32_t flags; // 0 for now
+} AndroidBitmapInfo;
+
+/**
+ * Given a java bitmap object, fill out the AndroidBitmap struct for it.
+ * If the call fails, the info parameter will be ignored
+ */
+int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
+ AndroidBitmapInfo* info);
+
+/**
+ * Given a java bitmap object, attempt to lock the pixel address.
+ * Locking will ensure that the memory for the pixels will not move
+ * until the unlockPixels call, and ensure that, if the pixels had been
+ * previously purged, they will have been restored.
+ *
+ * If this call succeeds, it must be balanced by a call to
+ * AndroidBitmap_unlockPixels, after which time the address of the pixels should
+ * no longer be used.
+ *
+ * If this succeeds, *addrPtr will be set to the pixel address. If the call
+ * fails, addrPtr will be ignored.
+ */
+int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
+
+/**
+ * Call this to balanace a successful call to AndroidBitmap_lockPixels
+ */
+int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-8/arch-arm/usr/include/android/log.h b/6/platforms/android-8/arch-arm/usr/include/android/log.h
new file mode 120000
index 0000000..bb56441
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/arpa/inet.h b/6/platforms/android-8/arch-arm/usr/include/arpa/inet.h
new file mode 120000
index 0000000..eb8dd6e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/arpa/nameser.h b/6/platforms/android-8/arch-arm/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..17f10dd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..0fdfc81
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..fee2eea
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..0948748
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..f68d052
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..6ce1635
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/find.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..7669e77
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..bd818ef
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..0672018
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/le.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..8d70ae0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..a98c57e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/bug.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..f800cfb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/cputime.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..105fc9f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..f68021f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno-base.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..0787c39
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..1e7c33a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/fcntl.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..53d7d66
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/futex.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..6518612
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/ioctl.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..f750948
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/ipc.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..33f5fcf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/local.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..a3dbce4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/memory_model.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..367fd97
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/mman.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..d907f7c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..1d91005
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/percpu.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..aaedc88
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..25bd6ba
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..f139c38
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/poll.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..5a82244
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/resource.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..3a47a81
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/sections.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..ab44333
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/siginfo.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..13592f4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/signal.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..eecb1ce
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/tlb.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..7c87378
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/topology.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..339f349
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm-generic/xor.h b/6/platforms/android-8/arch-arm/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..6bd4010
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/a.out.h b/6/platforms/android-8/arch-arm/usr/include/asm/a.out.h
new file mode 120000
index 0000000..5271c7c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/board-perseus2.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/board-perseus2.h
new file mode 120000
index 0000000..e0e2cd2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/board-perseus2.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/board-perseus2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/board.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/board.h
new file mode 120000
index 0000000..8c5fdf3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/board.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/board.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/cpu.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/cpu.h
new file mode 120000
index 0000000..f15d216
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/cpu.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/dma.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/dma.h
new file mode 120000
index 0000000..8f81346
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/dma.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/dma.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/fpga.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/fpga.h
new file mode 120000
index 0000000..8e4ce95
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/fpga.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/fpga.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio-switch.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio-switch.h
new file mode 120000
index 0000000..d924824
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio-switch.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/gpio-switch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio.h
new file mode 120000
index 0000000..e7fb057
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/gpio.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/gpio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/hardware.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/hardware.h
new file mode 120000
index 0000000..ffbf204
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/hardware.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/io.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/io.h
new file mode 120000
index 0000000..46e776c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/io.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/io.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/irqs.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/irqs.h
new file mode 120000
index 0000000..fe5049b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/irqs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/irqs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/mcbsp.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mcbsp.h
new file mode 120000
index 0000000..02f92ad
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mcbsp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/mcbsp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/memory.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/memory.h
new file mode 120000
index 0000000..6f95b25
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/memory.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/memory.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/mtd-xip.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mtd-xip.h
new file mode 120000
index 0000000..7690a5e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/mux.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mux.h
new file mode 120000
index 0000000..47212ec
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/mux.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/mux.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/omap24xx.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/omap24xx.h
new file mode 120000
index 0000000..a8fa63d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/omap24xx.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/omap24xx.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/serial.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/serial.h
new file mode 120000
index 0000000..8edc440
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/serial.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/serial.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/timex.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/timex.h
new file mode 120000
index 0000000..bf7b05b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/timex.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/timex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/arch/vmalloc.h b/6/platforms/android-8/arch-arm/usr/include/asm/arch/vmalloc.h
new file mode 120000
index 0000000..ead0cc7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/arch/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/asm/arch/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/atomic.h b/6/platforms/android-8/arch-arm/usr/include/asm/atomic.h
new file mode 120000
index 0000000..2492e90
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/atomic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/auxvec.h b/6/platforms/android-8/arch-arm/usr/include/asm/auxvec.h
new file mode 120000
index 0000000..22aab99
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/bitops.h b/6/platforms/android-8/arch-arm/usr/include/asm/bitops.h
new file mode 120000
index 0000000..c92ee76
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/byteorder.h b/6/platforms/android-8/arch-arm/usr/include/asm/byteorder.h
new file mode 120000
index 0000000..9780d91
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/byteorder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/byteorder.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/cache.h b/6/platforms/android-8/arch-arm/usr/include/asm/cache.h
new file mode 120000
index 0000000..8cba570
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/cache.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/cacheflush.h b/6/platforms/android-8/arch-arm/usr/include/asm/cacheflush.h
new file mode 120000
index 0000000..59a904c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/cacheflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/cacheflush.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/cputime.h b/6/platforms/android-8/arch-arm/usr/include/asm/cputime.h
new file mode 120000
index 0000000..4552083
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/delay.h b/6/platforms/android-8/arch-arm/usr/include/asm/delay.h
new file mode 120000
index 0000000..b83c033
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/delay.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/div64.h b/6/platforms/android-8/arch-arm/usr/include/asm/div64.h
new file mode 120000
index 0000000..401ddfa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/div64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/div64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/dma-mapping.h b/6/platforms/android-8/arch-arm/usr/include/asm/dma-mapping.h
new file mode 120000
index 0000000..b6fb79c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/dma.h b/6/platforms/android-8/arch-arm/usr/include/asm/dma.h
new file mode 120000
index 0000000..1ec6fcd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/dma.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/dma.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/domain.h b/6/platforms/android-8/arch-arm/usr/include/asm/domain.h
new file mode 120000
index 0000000..9f81f37
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/domain.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/domain.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/dyntick.h b/6/platforms/android-8/arch-arm/usr/include/asm/dyntick.h
new file mode 120000
index 0000000..ec00c99
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/dyntick.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/dyntick.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/elf.h b/6/platforms/android-8/arch-arm/usr/include/asm/elf.h
new file mode 120000
index 0000000..244eea4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/errno.h b/6/platforms/android-8/arch-arm/usr/include/asm/errno.h
new file mode 120000
index 0000000..f5fb8de
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/fcntl.h b/6/platforms/android-8/arch-arm/usr/include/asm/fcntl.h
new file mode 120000
index 0000000..7fd12b8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/fpstate.h b/6/platforms/android-8/arch-arm/usr/include/asm/fpstate.h
new file mode 120000
index 0000000..409e788
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/fpstate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/fpstate.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/glue.h b/6/platforms/android-8/arch-arm/usr/include/asm/glue.h
new file mode 120000
index 0000000..1d5691d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/glue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/glue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/hardirq.h b/6/platforms/android-8/arch-arm/usr/include/asm/hardirq.h
new file mode 120000
index 0000000..46971e4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/hardware.h b/6/platforms/android-8/arch-arm/usr/include/asm/hardware.h
new file mode 120000
index 0000000..444baf1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/hardware.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/hw_irq.h b/6/platforms/android-8/arch-arm/usr/include/asm/hw_irq.h
new file mode 120000
index 0000000..edfb21f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/hw_irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/hw_irq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/ide.h b/6/platforms/android-8/arch-arm/usr/include/asm/ide.h
new file mode 120000
index 0000000..bc9d32c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/ide.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/ide.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/io.h b/6/platforms/android-8/arch-arm/usr/include/asm/io.h
new file mode 120000
index 0000000..32054f0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/io.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/io.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/ioctl.h b/6/platforms/android-8/arch-arm/usr/include/asm/ioctl.h
new file mode 120000
index 0000000..f648d0d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/ioctls.h b/6/platforms/android-8/arch-arm/usr/include/asm/ioctls.h
new file mode 120000
index 0000000..72ebc7c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/ioctls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/ioctls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/ipcbuf.h b/6/platforms/android-8/arch-arm/usr/include/asm/ipcbuf.h
new file mode 120000
index 0000000..748cf72
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/ipcbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/ipcbuf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/irq.h b/6/platforms/android-8/arch-arm/usr/include/asm/irq.h
new file mode 120000
index 0000000..3326bae
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/irq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/linkage.h b/6/platforms/android-8/arch-arm/usr/include/asm/linkage.h
new file mode 120000
index 0000000..981f684
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/local.h b/6/platforms/android-8/arch-arm/usr/include/asm/local.h
new file mode 120000
index 0000000..e17f26d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/local.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/locks.h b/6/platforms/android-8/arch-arm/usr/include/asm/locks.h
new file mode 120000
index 0000000..06886d1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/locks.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/mc146818rtc.h b/6/platforms/android-8/arch-arm/usr/include/asm/mc146818rtc.h
new file mode 120000
index 0000000..5b5eb0e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/memory.h b/6/platforms/android-8/arch-arm/usr/include/asm/memory.h
new file mode 120000
index 0000000..e89f1ec
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/memory.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/memory.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/mman.h b/6/platforms/android-8/arch-arm/usr/include/asm/mman.h
new file mode 120000
index 0000000..001aa26
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/mman.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/module.h b/6/platforms/android-8/arch-arm/usr/include/asm/module.h
new file mode 120000
index 0000000..7932d5f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/module.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/msgbuf.h b/6/platforms/android-8/arch-arm/usr/include/asm/msgbuf.h
new file mode 120000
index 0000000..f9fec28
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/msgbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/msgbuf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/mtd-xip.h b/6/platforms/android-8/arch-arm/usr/include/asm/mtd-xip.h
new file mode 120000
index 0000000..9d2f3fb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/page.h b/6/platforms/android-8/arch-arm/usr/include/asm/page.h
new file mode 120000
index 0000000..9126384
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/page.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/page.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/param.h b/6/platforms/android-8/arch-arm/usr/include/asm/param.h
new file mode 120000
index 0000000..6e54c66
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/param.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/percpu.h b/6/platforms/android-8/arch-arm/usr/include/asm/percpu.h
new file mode 120000
index 0000000..c7bf144
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/pgalloc.h b/6/platforms/android-8/arch-arm/usr/include/asm/pgalloc.h
new file mode 120000
index 0000000..ec46783
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/pgalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/pgalloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/pgtable-hwdef.h b/6/platforms/android-8/arch-arm/usr/include/asm/pgtable-hwdef.h
new file mode 120000
index 0000000..1fec3ff
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/pgtable-hwdef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/pgtable-hwdef.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/pgtable.h b/6/platforms/android-8/arch-arm/usr/include/asm/pgtable.h
new file mode 120000
index 0000000..650eda5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/poll.h b/6/platforms/android-8/arch-arm/usr/include/asm/poll.h
new file mode 120000
index 0000000..940f8f8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/posix_types.h b/6/platforms/android-8/arch-arm/usr/include/asm/posix_types.h
new file mode 120000
index 0000000..4005935
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/proc-fns.h b/6/platforms/android-8/arch-arm/usr/include/asm/proc-fns.h
new file mode 120000
index 0000000..7c390c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/proc-fns.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/proc-fns.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/processor.h b/6/platforms/android-8/arch-arm/usr/include/asm/processor.h
new file mode 120000
index 0000000..5ae4558
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/processor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/processor.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/procinfo.h b/6/platforms/android-8/arch-arm/usr/include/asm/procinfo.h
new file mode 120000
index 0000000..f2e976d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/procinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/procinfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/ptrace.h b/6/platforms/android-8/arch-arm/usr/include/asm/ptrace.h
new file mode 120000
index 0000000..6648029
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/resource.h b/6/platforms/android-8/arch-arm/usr/include/asm/resource.h
new file mode 120000
index 0000000..ce47d5e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/scatterlist.h b/6/platforms/android-8/arch-arm/usr/include/asm/scatterlist.h
new file mode 120000
index 0000000..c55a394
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/scatterlist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/scatterlist.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/semaphore.h b/6/platforms/android-8/arch-arm/usr/include/asm/semaphore.h
new file mode 120000
index 0000000..fc35a0f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/semaphore.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/sembuf.h b/6/platforms/android-8/arch-arm/usr/include/asm/sembuf.h
new file mode 120000
index 0000000..70894ce
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/sembuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/sembuf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/shmbuf.h b/6/platforms/android-8/arch-arm/usr/include/asm/shmbuf.h
new file mode 120000
index 0000000..648f56f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/shmbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/shmbuf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/shmparam.h b/6/platforms/android-8/arch-arm/usr/include/asm/shmparam.h
new file mode 120000
index 0000000..024c82d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/shmparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/shmparam.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/sigcontext.h b/6/platforms/android-8/arch-arm/usr/include/asm/sigcontext.h
new file mode 120000
index 0000000..a6bbbb9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/sigcontext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/sigcontext.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/siginfo.h b/6/platforms/android-8/arch-arm/usr/include/asm/siginfo.h
new file mode 120000
index 0000000..ef0b9a4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/signal.h b/6/platforms/android-8/arch-arm/usr/include/asm/signal.h
new file mode 120000
index 0000000..439620b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/signal.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/sizes.h b/6/platforms/android-8/arch-arm/usr/include/asm/sizes.h
new file mode 120000
index 0000000..7c1e0cc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/sizes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/sizes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/smp.h b/6/platforms/android-8/arch-arm/usr/include/asm/smp.h
new file mode 120000
index 0000000..6f7f7d1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/smp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/socket.h b/6/platforms/android-8/arch-arm/usr/include/asm/socket.h
new file mode 120000
index 0000000..a375a6e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/socket.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/sockios.h b/6/platforms/android-8/arch-arm/usr/include/asm/sockios.h
new file mode 120000
index 0000000..3510b4a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/spinlock.h b/6/platforms/android-8/arch-arm/usr/include/asm/spinlock.h
new file mode 120000
index 0000000..bd309b2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/spinlock_types.h b/6/platforms/android-8/arch-arm/usr/include/asm/spinlock_types.h
new file mode 120000
index 0000000..5934de0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/stat.h b/6/platforms/android-8/arch-arm/usr/include/asm/stat.h
new file mode 120000
index 0000000..991a1a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/statfs.h b/6/platforms/android-8/arch-arm/usr/include/asm/statfs.h
new file mode 120000
index 0000000..74282e4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/suspend.h b/6/platforms/android-8/arch-arm/usr/include/asm/suspend.h
new file mode 120000
index 0000000..bc72bf8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/suspend.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/suspend.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/system.h b/6/platforms/android-8/arch-arm/usr/include/asm/system.h
new file mode 120000
index 0000000..d6d9ae9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/system.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/system.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/termbits.h b/6/platforms/android-8/arch-arm/usr/include/asm/termbits.h
new file mode 120000
index 0000000..0550aa8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/termbits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/termbits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/termios.h b/6/platforms/android-8/arch-arm/usr/include/asm/termios.h
new file mode 120000
index 0000000..0debfc1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/termios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/thread_info.h b/6/platforms/android-8/arch-arm/usr/include/asm/thread_info.h
new file mode 120000
index 0000000..358a733
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/timex.h b/6/platforms/android-8/arch-arm/usr/include/asm/timex.h
new file mode 120000
index 0000000..0bb637c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/timex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/tlbflush.h b/6/platforms/android-8/arch-arm/usr/include/asm/tlbflush.h
new file mode 120000
index 0000000..74adc37
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/tlbflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/tlbflush.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/topology.h b/6/platforms/android-8/arch-arm/usr/include/asm/topology.h
new file mode 120000
index 0000000..e72e136
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/topology.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/types.h b/6/platforms/android-8/arch-arm/usr/include/asm/types.h
new file mode 120000
index 0000000..780aad7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/uaccess.h b/6/platforms/android-8/arch-arm/usr/include/asm/uaccess.h
new file mode 120000
index 0000000..087e4ed
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/uaccess.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/uaccess.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/unaligned.h b/6/platforms/android-8/arch-arm/usr/include/asm/unaligned.h
new file mode 120000
index 0000000..039ff9e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/unaligned.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/unaligned.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/unistd.h b/6/platforms/android-8/arch-arm/usr/include/asm/unistd.h
new file mode 120000
index 0000000..c4a2d8f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/user.h b/6/platforms/android-8/arch-arm/usr/include/asm/user.h
new file mode 120000
index 0000000..7fce8f1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/user.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/asm/vga.h b/6/platforms/android-8/arch-arm/usr/include/asm/vga.h
new file mode 120000
index 0000000..18c2827
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/asm/vga.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/asm/vga.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/assert.h b/6/platforms/android-8/arch-arm/usr/include/assert.h
new file mode 120000
index 0000000..e3bd637
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/byteswap.h b/6/platforms/android-8/arch-arm/usr/include/byteswap.h
new file mode 120000
index 0000000..f17938c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/ctype.h b/6/platforms/android-8/arch-arm/usr/include/ctype.h
new file mode 120000
index 0000000..9076ac7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/dirent.h b/6/platforms/android-8/arch-arm/usr/include/dirent.h
new file mode 120000
index 0000000..569e704
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/dlfcn.h b/6/platforms/android-8/arch-arm/usr/include/dlfcn.h
new file mode 100644
index 0000000..f84d1d1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/dlfcn.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef __DLFCN_H__
+#define __DLFCN_H__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct {
+ const char *dli_fname; /* Pathname of shared object that
+ contains address */
+ void *dli_fbase; /* Address at which shared object
+ is loaded */
+ const char *dli_sname; /* Name of nearest symbol with address
+ lower than addr */
+ void *dli_saddr; /* Exact address of symbol named
+ in dli_sname */
+} Dl_info;
+
+extern void* dlopen(const char* filename, int flag);
+extern int dlclose(void* handle);
+extern const char* dlerror(void);
+extern void* dlsym(void* handle, const char* symbol);
+extern int dladdr(void* addr, Dl_info *info);
+
+enum {
+ RTLD_NOW = 0,
+ RTLD_LAZY = 1,
+
+ RTLD_LOCAL = 0,
+ RTLD_GLOBAL = 2,
+};
+
+#define RTLD_DEFAULT ((void*) 0xffffffff)
+#define RTLD_NEXT ((void*) 0xfffffffe)
+
+__END_DECLS
+
+#endif /* __DLFCN_H */
+
+
diff --git a/6/platforms/android-8/arch-arm/usr/include/elf.h b/6/platforms/android-8/arch-arm/usr/include/elf.h
new file mode 120000
index 0000000..bb8ce64
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/endian.h b/6/platforms/android-8/arch-arm/usr/include/endian.h
new file mode 120000
index 0000000..412014b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/err.h b/6/platforms/android-8/arch-arm/usr/include/err.h
new file mode 100644
index 0000000..1636efe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/err.h
@@ -0,0 +1,90 @@
+/* $OpenBSD: err.h,v 1.10 2006/01/06 18:53:04 millert Exp $ */
+/* $NetBSD: err.h,v 1.11 1994/10/26 00:55:52 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)err.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _ERR_H_
+#define _ERR_H_
+
+/*
+ * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two
+ * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
+ * of them here we may collide with the utility's includes. It's unreasonable
+ * for utilities to have to include one of them to include err.h, so we get
+ * __va_list from <machine/_types.h> and use it.
+ */
+#include <sys/cdefs.h>
+#include <machine/_types.h>
+
+__BEGIN_DECLS
+
+__noreturn void err(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void verr(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+__noreturn void errx(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void verrx(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void vwarn(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+void warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void vwarnx(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+
+/*
+ * The _* versions are for use in library functions so user-defined
+ * versions of err*,warn* do not get used.
+ */
+__noreturn void _err(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void _verr(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+__noreturn void _errx(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void _verrx(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void _warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void _vwarn(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+void _warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void _vwarnx(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+
+__END_DECLS
+
+#endif /* !_ERR_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/errno.h b/6/platforms/android-8/arch-arm/usr/include/errno.h
new file mode 120000
index 0000000..3e17af8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/fcntl.h b/6/platforms/android-8/arch-arm/usr/include/fcntl.h
new file mode 120000
index 0000000..f4cb73d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/features.h b/6/platforms/android-8/arch-arm/usr/include/features.h
new file mode 120000
index 0000000..2fb4cf8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/fenv.h b/6/platforms/android-8/arch-arm/usr/include/fenv.h
new file mode 120000
index 0000000..1fd4ee3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/fenv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/fenv.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/fnmatch.h b/6/platforms/android-8/arch-arm/usr/include/fnmatch.h
new file mode 120000
index 0000000..a9a0ad6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/fts.h b/6/platforms/android-8/arch-arm/usr/include/fts.h
new file mode 100644
index 0000000..da26a88
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/fts.h
@@ -0,0 +1,125 @@
+/* $OpenBSD: fts.h,v 1.12 2009/08/27 16:19:27 millert Exp $ */
+/* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)fts.h 8.3 (Berkeley) 8/14/94
+ */
+
+#ifndef _FTS_H_
+#define _FTS_H_
+
+typedef struct {
+ struct _ftsent *fts_cur; /* current node */
+ struct _ftsent *fts_child; /* linked list of children */
+ struct _ftsent **fts_array; /* sort array */
+ dev_t fts_dev; /* starting device # */
+ char *fts_path; /* path for this descent */
+ int fts_rfd; /* fd for root */
+ size_t fts_pathlen; /* sizeof(path) */
+ int fts_nitems; /* elements in the sort array */
+ int (*fts_compar)(); /* compare function */
+
+#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
+#define FTS_LOGICAL 0x0002 /* logical walk */
+#define FTS_NOCHDIR 0x0004 /* don't change directories */
+#define FTS_NOSTAT 0x0008 /* don't get stat info */
+#define FTS_PHYSICAL 0x0010 /* physical walk */
+#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */
+#define FTS_XDEV 0x0040 /* don't cross devices */
+#define FTS_OPTIONMASK 0x00ff /* valid user option mask */
+
+#define FTS_NAMEONLY 0x1000 /* (private) child names only */
+#define FTS_STOP 0x2000 /* (private) unrecoverable error */
+ int fts_options; /* fts_open options, global flags */
+} FTS;
+
+typedef struct _ftsent {
+ struct _ftsent *fts_cycle; /* cycle node */
+ struct _ftsent *fts_parent; /* parent directory */
+ struct _ftsent *fts_link; /* next file in directory */
+ long fts_number; /* local numeric value */
+ void *fts_pointer; /* local address value */
+ char *fts_accpath; /* access path */
+ char *fts_path; /* root path */
+ int fts_errno; /* errno for this node */
+ int fts_symfd; /* fd for symlink */
+ size_t fts_pathlen; /* strlen(fts_path) */
+ size_t fts_namelen; /* strlen(fts_name) */
+
+ ino_t fts_ino; /* inode */
+ dev_t fts_dev; /* device */
+ nlink_t fts_nlink; /* link count */
+
+#define FTS_ROOTPARENTLEVEL -1
+#define FTS_ROOTLEVEL 0
+#define FTS_MAXLEVEL 0x7fff
+ short fts_level; /* depth (-1 to N) */
+
+#define FTS_D 1 /* preorder directory */
+#define FTS_DC 2 /* directory that causes cycles */
+#define FTS_DEFAULT 3 /* none of the above */
+#define FTS_DNR 4 /* unreadable directory */
+#define FTS_DOT 5 /* dot or dot-dot */
+#define FTS_DP 6 /* postorder directory */
+#define FTS_ERR 7 /* error; errno is set */
+#define FTS_F 8 /* regular file */
+#define FTS_INIT 9 /* initialized only */
+#define FTS_NS 10 /* stat(2) failed */
+#define FTS_NSOK 11 /* no stat(2) requested */
+#define FTS_SL 12 /* symbolic link */
+#define FTS_SLNONE 13 /* symbolic link without target */
+ unsigned short fts_info; /* user flags for FTSENT structure */
+
+#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
+#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
+ unsigned short fts_flags; /* private flags for FTSENT structure */
+
+#define FTS_AGAIN 1 /* read node again */
+#define FTS_FOLLOW 2 /* follow symbolic link */
+#define FTS_NOINSTR 3 /* no instructions */
+#define FTS_SKIP 4 /* discard node */
+ unsigned short fts_instr; /* fts_set() instructions */
+
+ struct stat *fts_statp; /* stat(2) information */
+ char fts_name[1]; /* file name */
+} FTSENT;
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+FTSENT *fts_children(FTS *, int);
+int fts_close(FTS *);
+FTS *fts_open(char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **));
+FTSENT *fts_read(FTS *);
+int fts_set(FTS *, FTSENT *, int);
+__END_DECLS
+
+#endif /* !_FTS_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/getopt.h b/6/platforms/android-8/arch-arm/usr/include/getopt.h
new file mode 120000
index 0000000..a34a2e9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/grp.h b/6/platforms/android-8/arch-arm/usr/include/grp.h
new file mode 120000
index 0000000..c3d2f42
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/inttypes.h b/6/platforms/android-8/arch-arm/usr/include/inttypes.h
new file mode 120000
index 0000000..7ca1e49
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/jni.h b/6/platforms/android-8/arch-arm/usr/include/jni.h
new file mode 120000
index 0000000..0060efe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/lastlog.h b/6/platforms/android-8/arch-arm/usr/include/lastlog.h
new file mode 120000
index 0000000..70e9338
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/libgen.h b/6/platforms/android-8/arch-arm/usr/include/libgen.h
new file mode 120000
index 0000000..2fc33ec
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/limits.h b/6/platforms/android-8/arch-arm/usr/include/limits.h
new file mode 120000
index 0000000..6ce44ae
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/a.out.h b/6/platforms/android-8/arch-arm/usr/include/linux/a.out.h
new file mode 120000
index 0000000..fc5b1be
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/aio_abi.h b/6/platforms/android-8/arch-arm/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..fbf4dda
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/akm8976.h b/6/platforms/android-8/arch-arm/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..c5ad826
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/android_alarm.h b/6/platforms/android-8/arch-arm/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..6c6f4f2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/android_pmem.h b/6/platforms/android-8/arch-arm/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..68b9e63
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/android_power.h b/6/platforms/android-8/arch-arm/usr/include/linux/android_power.h
new file mode 120000
index 0000000..dfcd82f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/apm_bios.h b/6/platforms/android-8/arch-arm/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..f30d0ad
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ashmem.h b/6/platforms/android-8/arch-arm/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..d03b81a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ata.h b/6/platforms/android-8/arch-arm/usr/include/linux/ata.h
new file mode 120000
index 0000000..5784fa5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atm.h b/6/platforms/android-8/arch-arm/usr/include/linux/atm.h
new file mode 120000
index 0000000..293b7e9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atmapi.h b/6/platforms/android-8/arch-arm/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..622a3b7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atmdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..1194aa8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atmioc.h b/6/platforms/android-8/arch-arm/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..5612e88
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atmppp.h b/6/platforms/android-8/arch-arm/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..893a3e9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/atmsap.h b/6/platforms/android-8/arch-arm/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..99e7e3c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/attribute_container.h b/6/platforms/android-8/arch-arm/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..e79a462
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/auto_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..14229b7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/autoconf.h b/6/platforms/android-8/arch-arm/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..76ecca8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/auxvec.h b/6/platforms/android-8/arch-arm/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..0880757
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/backing-dev.h b/6/platforms/android-8/arch-arm/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..851b2c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/binder.h b/6/platforms/android-8/arch-arm/usr/include/linux/binder.h
new file mode 120000
index 0000000..378d9ab
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/binfmts.h b/6/platforms/android-8/arch-arm/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..6da7126
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/bio.h b/6/platforms/android-8/arch-arm/usr/include/linux/bio.h
new file mode 120000
index 0000000..88e8abd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/bitmap.h b/6/platforms/android-8/arch-arm/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..104504c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/bitops.h b/6/platforms/android-8/arch-arm/usr/include/linux/bitops.h
new file mode 120000
index 0000000..f7d53ad
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/blkdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..88339c0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/blkpg.h b/6/platforms/android-8/arch-arm/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..28b9702
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/blockgroup_lock.h b/6/platforms/android-8/arch-arm/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..5541b99
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..2e4f428
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/generic.h b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..817e41b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..c375125
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swab.h b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..1fd7686
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swabb.h b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..0326096
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/cache.h b/6/platforms/android-8/arch-arm/usr/include/linux/cache.h
new file mode 120000
index 0000000..70e156f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/calc64.h b/6/platforms/android-8/arch-arm/usr/include/linux/calc64.h
new file mode 120000
index 0000000..c5d6f92
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/capability.h b/6/platforms/android-8/arch-arm/usr/include/linux/capability.h
new file mode 120000
index 0000000..08a95d0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/capi.h b/6/platforms/android-8/arch-arm/usr/include/linux/capi.h
new file mode 120000
index 0000000..5625269
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/cdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/cdev.h
new file mode 120000
index 0000000..793c134
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/cdrom.h b/6/platforms/android-8/arch-arm/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..ab06587
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/circ_buf.h b/6/platforms/android-8/arch-arm/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..dc742c8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/clk.h b/6/platforms/android-8/arch-arm/usr/include/linux/clk.h
new file mode 120000
index 0000000..7cd5f41
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/coda.h b/6/platforms/android-8/arch-arm/usr/include/linux/coda.h
new file mode 120000
index 0000000..83cac87
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/coda_fs_i.h b/6/platforms/android-8/arch-arm/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..3aea2fb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/compat.h b/6/platforms/android-8/arch-arm/usr/include/linux/compat.h
new file mode 120000
index 0000000..db07ded
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/compiler-gcc.h b/6/platforms/android-8/arch-arm/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..0003ded
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/compiler.h b/6/platforms/android-8/arch-arm/usr/include/linux/compiler.h
new file mode 120000
index 0000000..ec5eaa5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/completion.h b/6/platforms/android-8/arch-arm/usr/include/linux/completion.h
new file mode 120000
index 0000000..3558dec
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/config.h b/6/platforms/android-8/arch-arm/usr/include/linux/config.h
new file mode 120000
index 0000000..7ea1bfd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/console_struct.h b/6/platforms/android-8/arch-arm/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..0e4878c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/cpu.h b/6/platforms/android-8/arch-arm/usr/include/linux/cpu.h
new file mode 120000
index 0000000..cbb1d8d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/cpumask.h b/6/platforms/android-8/arch-arm/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..981743b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ctype.h b/6/platforms/android-8/arch-arm/usr/include/linux/ctype.h
new file mode 120000
index 0000000..5b8a9e5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/dccp.h b/6/platforms/android-8/arch-arm/usr/include/linux/dccp.h
new file mode 120000
index 0000000..33672b5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/debug_locks.h b/6/platforms/android-8/arch-arm/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..dd8bcd0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/delay.h b/6/platforms/android-8/arch-arm/usr/include/linux/delay.h
new file mode 120000
index 0000000..34d7ab8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/device.h b/6/platforms/android-8/arch-arm/usr/include/linux/device.h
new file mode 120000
index 0000000..0c920f2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/dirent.h b/6/platforms/android-8/arch-arm/usr/include/linux/dirent.h
new file mode 120000
index 0000000..d3f4398
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/dm-ioctl.h b/6/platforms/android-8/arch-arm/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..6aa1d81
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/dma-mapping.h b/6/platforms/android-8/arch-arm/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..006fd33
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/dmaengine.h b/6/platforms/android-8/arch-arm/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..242934b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/efs_dir.h b/6/platforms/android-8/arch-arm/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..60ed6b1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_i.h b/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..af8bc6d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_sb.h b/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..eb89f64
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/elevator.h b/6/platforms/android-8/arch-arm/usr/include/linux/elevator.h
new file mode 120000
index 0000000..69c5ae8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/elf-em.h b/6/platforms/android-8/arch-arm/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..a4d8a27
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/elf.h b/6/platforms/android-8/arch-arm/usr/include/linux/elf.h
new file mode 120000
index 0000000..bb38a97
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/err.h b/6/platforms/android-8/arch-arm/usr/include/linux/err.h
new file mode 120000
index 0000000..78f6336
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/errno.h b/6/platforms/android-8/arch-arm/usr/include/linux/errno.h
new file mode 120000
index 0000000..9710955
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/errqueue.h b/6/platforms/android-8/arch-arm/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..29f0f6c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/etherdevice.h b/6/platforms/android-8/arch-arm/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..c34309d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ext2_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..38fc499
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ext3_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..1c199d6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/fadvise.h b/6/platforms/android-8/arch-arm/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..cb8c056
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/fb.h b/6/platforms/android-8/arch-arm/usr/include/linux/fb.h
new file mode 120000
index 0000000..c2e73ae
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/fcntl.h b/6/platforms/android-8/arch-arm/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..5af08a0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/fd.h b/6/platforms/android-8/arch-arm/usr/include/linux/fd.h
new file mode 120000
index 0000000..9c6949b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/file.h b/6/platforms/android-8/arch-arm/usr/include/linux/file.h
new file mode 120000
index 0000000..d297470
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/filter.h b/6/platforms/android-8/arch-arm/usr/include/linux/filter.h
new file mode 120000
index 0000000..4ea3f9a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/fs.h
new file mode 120000
index 0000000..23929c6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ftape.h b/6/platforms/android-8/arch-arm/usr/include/linux/ftape.h
new file mode 120000
index 0000000..1d643fa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/futex.h b/6/platforms/android-8/arch-arm/usr/include/linux/futex.h
new file mode 120000
index 0000000..85e0785
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/genhd.h b/6/platforms/android-8/arch-arm/usr/include/linux/genhd.h
new file mode 120000
index 0000000..4d61166
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/gfp.h b/6/platforms/android-8/arch-arm/usr/include/linux/gfp.h
new file mode 120000
index 0000000..4867cd2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/hardirq.h b/6/platforms/android-8/arch-arm/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..a4d6313
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-8/arch-arm/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..9cba6e2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/hdreg.h b/6/platforms/android-8/arch-arm/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..b326c78
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/hdsmart.h b/6/platforms/android-8/arch-arm/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..5e6bb2f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/highmem.h b/6/platforms/android-8/arch-arm/usr/include/linux/highmem.h
new file mode 120000
index 0000000..55a27a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/hil.h b/6/platforms/android-8/arch-arm/usr/include/linux/hil.h
new file mode 120000
index 0000000..cf2a768
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/i2c.h b/6/platforms/android-8/arch-arm/usr/include/linux/i2c.h
new file mode 120000
index 0000000..5adc5d6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/icmp.h b/6/platforms/android-8/arch-arm/usr/include/linux/icmp.h
new file mode 120000
index 0000000..d59d434
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if.h b/6/platforms/android-8/arch-arm/usr/include/linux/if.h
new file mode 120000
index 0000000..0aa4710
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_arcnet.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..be6315c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_arp.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..3a51b72
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_bridge.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..ce41ff1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_ether.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..c24c904
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_fc.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..cdd0dca
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_fddi.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..8d29a04
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_hippi.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..894fab9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_packet.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..ff01608
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_ppp.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..670b4dc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_tr.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..e88c408
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_tun.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..421d844
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/if_vlan.h b/6/platforms/android-8/arch-arm/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..e5a898b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/in.h b/6/platforms/android-8/arch-arm/usr/include/linux/in.h
new file mode 120000
index 0000000..3f949cf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/in6.h b/6/platforms/android-8/arch-arm/usr/include/linux/in6.h
new file mode 120000
index 0000000..e0d4b8f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/init.h b/6/platforms/android-8/arch-arm/usr/include/linux/init.h
new file mode 120000
index 0000000..f67f39e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/inotify.h b/6/platforms/android-8/arch-arm/usr/include/linux/inotify.h
new file mode 120000
index 0000000..6a99c1f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/input.h b/6/platforms/android-8/arch-arm/usr/include/linux/input.h
new file mode 120000
index 0000000..8e9d71c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/interrupt.h b/6/platforms/android-8/arch-arm/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..2fd2a22
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ioctl.h b/6/platforms/android-8/arch-arm/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..e5997bc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ioport.h b/6/platforms/android-8/arch-arm/usr/include/linux/ioport.h
new file mode 120000
index 0000000..feac7b5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ioprio.h b/6/platforms/android-8/arch-arm/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..d2f97f3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ip.h b/6/platforms/android-8/arch-arm/usr/include/linux/ip.h
new file mode 120000
index 0000000..0982868
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ipc.h b/6/platforms/android-8/arch-arm/usr/include/linux/ipc.h
new file mode 120000
index 0000000..c5cd095
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..2ad24a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_smi.h b/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..ab158ef
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ipx.h b/6/platforms/android-8/arch-arm/usr/include/linux/ipx.h
new file mode 120000
index 0000000..d6f8900
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/irq.h b/6/platforms/android-8/arch-arm/usr/include/linux/irq.h
new file mode 120000
index 0000000..b212552
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/irq_cpustat.h b/6/platforms/android-8/arch-arm/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..3481979
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/irqflags.h b/6/platforms/android-8/arch-arm/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..54429a3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/irqreturn.h b/6/platforms/android-8/arch-arm/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..1fb284f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/jbd.h b/6/platforms/android-8/arch-arm/usr/include/linux/jbd.h
new file mode 120000
index 0000000..be74b0a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/jiffies.h b/6/platforms/android-8/arch-arm/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..48d38b8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kd.h b/6/platforms/android-8/arch-arm/usr/include/linux/kd.h
new file mode 120000
index 0000000..24bb520
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kdev_t.h b/6/platforms/android-8/arch-arm/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..6f073a3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kernel.h b/6/platforms/android-8/arch-arm/usr/include/linux/kernel.h
new file mode 120000
index 0000000..a514485
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kernel_stat.h b/6/platforms/android-8/arch-arm/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..ccd64dc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kernelcapi.h b/6/platforms/android-8/arch-arm/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..307993c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kexec.h b/6/platforms/android-8/arch-arm/usr/include/linux/kexec.h
new file mode 120000
index 0000000..837d57e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/key.h b/6/platforms/android-8/arch-arm/usr/include/linux/key.h
new file mode 120000
index 0000000..72acf71
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/keyboard.h b/6/platforms/android-8/arch-arm/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..0de996a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/keychord.h b/6/platforms/android-8/arch-arm/usr/include/linux/keychord.h
new file mode 120000
index 0000000..a958ab6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/klist.h b/6/platforms/android-8/arch-arm/usr/include/linux/klist.h
new file mode 120000
index 0000000..8c5e094
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kmod.h b/6/platforms/android-8/arch-arm/usr/include/linux/kmod.h
new file mode 120000
index 0000000..077b83c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kobject.h b/6/platforms/android-8/arch-arm/usr/include/linux/kobject.h
new file mode 120000
index 0000000..434462a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/kref.h b/6/platforms/android-8/arch-arm/usr/include/linux/kref.h
new file mode 120000
index 0000000..66a7055
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ktime.h b/6/platforms/android-8/arch-arm/usr/include/linux/ktime.h
new file mode 120000
index 0000000..7f2f70e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/limits.h b/6/platforms/android-8/arch-arm/usr/include/linux/limits.h
new file mode 120000
index 0000000..52b2e2e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/linkage.h b/6/platforms/android-8/arch-arm/usr/include/linux/linkage.h
new file mode 120000
index 0000000..3cd4a56
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/list.h b/6/platforms/android-8/arch-arm/usr/include/linux/list.h
new file mode 120000
index 0000000..1bcdc15
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/lockd/nlm.h b/6/platforms/android-8/arch-arm/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..84d7727
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/lockd/xdr.h b/6/platforms/android-8/arch-arm/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..8b98edf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/lockdep.h b/6/platforms/android-8/arch-arm/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..9c7bcab
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/loop.h b/6/platforms/android-8/arch-arm/usr/include/linux/loop.h
new file mode 120000
index 0000000..d83b32a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/magic.h b/6/platforms/android-8/arch-arm/usr/include/linux/magic.h
new file mode 120000
index 0000000..80405ed
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/major.h b/6/platforms/android-8/arch-arm/usr/include/linux/major.h
new file mode 120000
index 0000000..f2fcb58
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mc146818rtc.h b/6/platforms/android-8/arch-arm/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..4929a7b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mca.h b/6/platforms/android-8/arch-arm/usr/include/linux/mca.h
new file mode 120000
index 0000000..a6aebcf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mempolicy.h b/6/platforms/android-8/arch-arm/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..b832d30
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mempool.h b/6/platforms/android-8/arch-arm/usr/include/linux/mempool.h
new file mode 120000
index 0000000..ffe36de
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/miscdevice.h b/6/platforms/android-8/arch-arm/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..de2927a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mm.h b/6/platforms/android-8/arch-arm/usr/include/linux/mm.h
new file mode 120000
index 0000000..2d4adf6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mmc/card.h b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..94add38
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mmc/host.h b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..1130f20
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mmc/mmc.h b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..c35f7db
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mmzone.h b/6/platforms/android-8/arch-arm/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..9658bb4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mod_devicetable.h b/6/platforms/android-8/arch-arm/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..82bf645
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/module.h b/6/platforms/android-8/arch-arm/usr/include/linux/module.h
new file mode 120000
index 0000000..6001048
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/moduleparam.h b/6/platforms/android-8/arch-arm/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..a380ff0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mount.h b/6/platforms/android-8/arch-arm/usr/include/linux/mount.h
new file mode 120000
index 0000000..9e74b12
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/msdos_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..085645a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/msg.h b/6/platforms/android-8/arch-arm/usr/include/linux/msg.h
new file mode 120000
index 0000000..91667fc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/msm_adsp.h b/6/platforms/android-8/arch-arm/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..deb4566
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/msm_audio.h b/6/platforms/android-8/arch-arm/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..e95970c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/msm_mdp.h b/6/platforms/android-8/arch-arm/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..97dfc89
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mt9t013.h b/6/platforms/android-8/arch-arm/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..1842be5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/bbm.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..873332e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/blktrans.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..0b8dbcd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..a9e9733
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..096603a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/compatmac.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..d481d6a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/flashchip.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..b1167a7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/map.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..29c63f2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/mtd.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..1ecfc48
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..5ba99ce
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..f4ae56e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nftl.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..a801168
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..c54f76c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtd/partitions.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..ffb963d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mtio.h b/6/platforms/android-8/arch-arm/usr/include/linux/mtio.h
new file mode 120000
index 0000000..c66bda4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mutex-debug.h b/6/platforms/android-8/arch-arm/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..7044439
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/mutex.h b/6/platforms/android-8/arch-arm/usr/include/linux/mutex.h
new file mode 120000
index 0000000..e10a79b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ncp.h b/6/platforms/android-8/arch-arm/usr/include/linux/ncp.h
new file mode 120000
index 0000000..73b6d61
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ncp_mount.h b/6/platforms/android-8/arch-arm/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..c6dcdbc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ncp_no.h b/6/platforms/android-8/arch-arm/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..6bbde24
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/net.h b/6/platforms/android-8/arch-arm/usr/include/linux/net.h
new file mode 120000
index 0000000..128dd7c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netdevice.h b/6/platforms/android-8/arch-arm/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..080b156
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..c045c54
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..9708f15
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..77f7a51
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..57f8df4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..82e75e4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..ad08012
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..5fe51d7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..48bc7ba
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..377e17a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..9a3884d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..2e40ad4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..327f315
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..a7bd543
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..a53b502
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..3ba7cfb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..a6c455c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..74f563c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..4372f4f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..ce80a66
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..af3a2d3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..4866cfd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..3e0f689
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..7dc9d01
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..98ee3ca
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..1ed915b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..8e49982
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..834b640
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..6af175a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..aeb34de
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..adddaa7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..54cee84
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..c14d805
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..764de28
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..56c11c6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..220992a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_bridge.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..8507e30
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..38a0264
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..d9dc5b6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..1ed25ba
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..c6a0c60
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..e2bd417
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..e3148d3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..f1e16eb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..b80c2fe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..20835b6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..b2c38b1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..c203b31
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..cb282cf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..530d6fe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..2ee15ca
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..e2185e3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..478ff53
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..7795b2d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..585b1aa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..52b6e01
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..4effb13
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..65ccf00
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..5f6cece
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..3cef3bd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..0e786ad
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..d32f8f2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..ed7f48d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..7ae6ea8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..8e9fab6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..e9b7775
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..26f27ee
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..44a96b6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..5b79c79
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..d7b4c6a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..4b4b301
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..fcacbd5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..9c94fb9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..28ea6fa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..11e1fb8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..006af0b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..89b0e3c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..b57289f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..2c260fc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..2b3774a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..c39a213
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..1992b80
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..4c69aed
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..2b35dde
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..423f325
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..b672ab6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..3e6aff0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..9a753e7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..7788f21
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/netlink.h b/6/platforms/android-8/arch-arm/usr/include/linux/netlink.h
new file mode 120000
index 0000000..5a66483
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfs.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfs.h
new file mode 120000
index 0000000..25c25fa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfs2.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..6a31786
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfs3.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..7501da8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfs4.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..61660d7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfs_xdr.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..5da144e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsacl.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..6f6a4e6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/auth.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..34e8b50
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/const.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..dc5a55e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/debug.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..ca075b8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/export.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..a1bba67
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/interface.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..fc9f2e8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..e2ea239
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/stats.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..b54b12c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/xdr.h b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..874849e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/node.h b/6/platforms/android-8/arch-arm/usr/include/linux/node.h
new file mode 120000
index 0000000..2c61f7e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nodemask.h b/6/platforms/android-8/arch-arm/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..cf28e67
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/notifier.h b/6/platforms/android-8/arch-arm/usr/include/linux/notifier.h
new file mode 120000
index 0000000..b9286e9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/numa.h b/6/platforms/android-8/arch-arm/usr/include/linux/numa.h
new file mode 120000
index 0000000..8858d37
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/nvram.h b/6/platforms/android-8/arch-arm/usr/include/linux/nvram.h
new file mode 120000
index 0000000..c6d6134
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/omap_csmi.h b/6/platforms/android-8/arch-arm/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..265c3ef
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pagemap.h b/6/platforms/android-8/arch-arm/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..5ee979e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/param.h b/6/platforms/android-8/arch-arm/usr/include/linux/param.h
new file mode 120000
index 0000000..1ed2582
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/patchkey.h b/6/platforms/android-8/arch-arm/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..a1f50c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pci.h b/6/platforms/android-8/arch-arm/usr/include/linux/pci.h
new file mode 120000
index 0000000..53324ae
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pci_ids.h b/6/platforms/android-8/arch-arm/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..8816cf6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pci_regs.h b/6/platforms/android-8/arch-arm/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..c6f309c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/percpu.h b/6/platforms/android-8/arch-arm/usr/include/linux/percpu.h
new file mode 120000
index 0000000..a4ed100
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/percpu_counter.h b/6/platforms/android-8/arch-arm/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..312a66c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/personality.h b/6/platforms/android-8/arch-arm/usr/include/linux/personality.h
new file mode 120000
index 0000000..b3d63bc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pfkeyv2.h b/6/platforms/android-8/arch-arm/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..846ea5c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pkt_cls.h b/6/platforms/android-8/arch-arm/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..b0f20a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pkt_sched.h b/6/platforms/android-8/arch-arm/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..6f22e6e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/platform_device.h b/6/platforms/android-8/arch-arm/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..4f717da
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/plist.h b/6/platforms/android-8/arch-arm/usr/include/linux/plist.h
new file mode 120000
index 0000000..32abb18
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pm.h b/6/platforms/android-8/arch-arm/usr/include/linux/pm.h
new file mode 120000
index 0000000..abb4222
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/pnp.h b/6/platforms/android-8/arch-arm/usr/include/linux/pnp.h
new file mode 120000
index 0000000..db147ef
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/poll.h b/6/platforms/android-8/arch-arm/usr/include/linux/poll.h
new file mode 120000
index 0000000..27b2ec5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/posix_acl.h b/6/platforms/android-8/arch-arm/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..1a0681d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/posix_types.h b/6/platforms/android-8/arch-arm/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..94522d9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ppdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..e565e9c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ppp_defs.h b/6/platforms/android-8/arch-arm/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..cdf5346
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/prctl.h b/6/platforms/android-8/arch-arm/usr/include/linux/prctl.h
new file mode 120000
index 0000000..71a9645
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/preempt.h b/6/platforms/android-8/arch-arm/usr/include/linux/preempt.h
new file mode 120000
index 0000000..b97f4b2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/proc_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..198ec4e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ptrace.h b/6/platforms/android-8/arch-arm/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..3d7cfbe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/qic117.h b/6/platforms/android-8/arch-arm/usr/include/linux/qic117.h
new file mode 120000
index 0000000..8832ea6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/qnxtypes.h b/6/platforms/android-8/arch-arm/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..a4157d6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/quota.h b/6/platforms/android-8/arch-arm/usr/include/linux/quota.h
new file mode 120000
index 0000000..e3bea77
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/raid/md.h b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..3bca39b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_k.h b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..94f22f4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_p.h b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..b9d8c73
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_u.h b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..52e2561
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/raid/xor.h b/6/platforms/android-8/arch-arm/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..6571e10
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/random.h b/6/platforms/android-8/arch-arm/usr/include/linux/random.h
new file mode 120000
index 0000000..892a84c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/rbtree.h b/6/platforms/android-8/arch-arm/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..2cd2894
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/rcupdate.h b/6/platforms/android-8/arch-arm/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..a96b260
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/reboot.h b/6/platforms/android-8/arch-arm/usr/include/linux/reboot.h
new file mode 120000
index 0000000..d86cf7f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/relay.h b/6/platforms/android-8/arch-arm/usr/include/linux/relay.h
new file mode 120000
index 0000000..18109a5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/resource.h b/6/platforms/android-8/arch-arm/usr/include/linux/resource.h
new file mode 120000
index 0000000..e388580
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/route.h b/6/platforms/android-8/arch-arm/usr/include/linux/route.h
new file mode 120000
index 0000000..f363e1c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/rtc.h b/6/platforms/android-8/arch-arm/usr/include/linux/rtc.h
new file mode 120000
index 0000000..07a432e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/rtnetlink.h b/6/platforms/android-8/arch-arm/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..e07cbda
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/rwsem.h b/6/platforms/android-8/arch-arm/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..af99ef6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sched.h b/6/platforms/android-8/arch-arm/usr/include/linux/sched.h
new file mode 120000
index 0000000..25c7952
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sem.h b/6/platforms/android-8/arch-arm/usr/include/linux/sem.h
new file mode 120000
index 0000000..dcfc829
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/seq_file.h b/6/platforms/android-8/arch-arm/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..4afe520
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/seqlock.h b/6/platforms/android-8/arch-arm/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..7aa00da
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/serial_core.h b/6/platforms/android-8/arch-arm/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..044988f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/serial_reg.h b/6/platforms/android-8/arch-arm/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..2ae46e5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/serio.h b/6/platforms/android-8/arch-arm/usr/include/linux/serio.h
new file mode 120000
index 0000000..64e6b88
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/shm.h b/6/platforms/android-8/arch-arm/usr/include/linux/shm.h
new file mode 120000
index 0000000..63d251a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/signal.h b/6/platforms/android-8/arch-arm/usr/include/linux/signal.h
new file mode 120000
index 0000000..82b212b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/skbuff.h b/6/platforms/android-8/arch-arm/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..7942376
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/slab.h b/6/platforms/android-8/arch-arm/usr/include/linux/slab.h
new file mode 120000
index 0000000..1483715
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/smb.h b/6/platforms/android-8/arch-arm/usr/include/linux/smb.h
new file mode 120000
index 0000000..9e84bfe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/smp.h b/6/platforms/android-8/arch-arm/usr/include/linux/smp.h
new file mode 120000
index 0000000..468eba7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/smp_lock.h b/6/platforms/android-8/arch-arm/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..25ea743
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/socket.h b/6/platforms/android-8/arch-arm/usr/include/linux/socket.h
new file mode 120000
index 0000000..00f4bda
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sockios.h b/6/platforms/android-8/arch-arm/usr/include/linux/sockios.h
new file mode 120000
index 0000000..3523d49
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/soundcard.h b/6/platforms/android-8/arch-arm/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..1f0a96e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..2863452
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..842f5cc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_up.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..23094c0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..e6573b8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types_up.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..db8e943
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_up.h b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..45aa762
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/stacktrace.h b/6/platforms/android-8/arch-arm/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..a91f736
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/stat.h b/6/platforms/android-8/arch-arm/usr/include/linux/stat.h
new file mode 120000
index 0000000..c0a8c5a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/statfs.h b/6/platforms/android-8/arch-arm/usr/include/linux/statfs.h
new file mode 120000
index 0000000..6321e3b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/stddef.h b/6/platforms/android-8/arch-arm/usr/include/linux/stddef.h
new file mode 120000
index 0000000..1f8d329
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/string.h b/6/platforms/android-8/arch-arm/usr/include/linux/string.h
new file mode 120000
index 0000000..8af35c0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/stringify.h b/6/platforms/android-8/arch-arm/usr/include/linux/stringify.h
new file mode 120000
index 0000000..4519da6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..64f00d2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..3cc9833
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..e429912
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/debug.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..14cf333
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..be3f7bf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..3922956
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..20ddb78
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..1dc36a1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/sched.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..e91f7ca
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/stats.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..163e3c5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svc.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..5aa157a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..a7f8f27
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/timer.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..4043901
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/types.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..d18a124
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..37fc6cd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..96a2d57
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-arm/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/swap.h b/6/platforms/android-8/arch-arm/usr/include/linux/swap.h
new file mode 120000
index 0000000..27de6e6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sysctl.h b/6/platforms/android-8/arch-arm/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..6e2bdc9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sysdev.h b/6/platforms/android-8/arch-arm/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..a5473b1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/sysfs.h b/6/platforms/android-8/arch-arm/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..b44c87e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/taskstats.h b/6/platforms/android-8/arch-arm/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..fb1217f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/taskstats_kern.h b/6/platforms/android-8/arch-arm/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..713aa0d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/tcp.h b/6/platforms/android-8/arch-arm/usr/include/linux/tcp.h
new file mode 120000
index 0000000..9a24a3e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/telephony.h b/6/platforms/android-8/arch-arm/usr/include/linux/telephony.h
new file mode 120000
index 0000000..0c89f16
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/termios.h b/6/platforms/android-8/arch-arm/usr/include/linux/termios.h
new file mode 120000
index 0000000..2e292c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/textsearch.h b/6/platforms/android-8/arch-arm/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..af6344e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/thread_info.h b/6/platforms/android-8/arch-arm/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..5850da5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/threads.h b/6/platforms/android-8/arch-arm/usr/include/linux/threads.h
new file mode 120000
index 0000000..ecebc49
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/time.h b/6/platforms/android-8/arch-arm/usr/include/linux/time.h
new file mode 120000
index 0000000..8e93056
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/timer.h b/6/platforms/android-8/arch-arm/usr/include/linux/timer.h
new file mode 120000
index 0000000..4dd4702
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/times.h b/6/platforms/android-8/arch-arm/usr/include/linux/times.h
new file mode 120000
index 0000000..ab1c1b4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/timex.h b/6/platforms/android-8/arch-arm/usr/include/linux/timex.h
new file mode 120000
index 0000000..6845dd4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/tiocl.h b/6/platforms/android-8/arch-arm/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..c9e3feb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/transport_class.h b/6/platforms/android-8/arch-arm/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..8048b76
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/tty.h b/6/platforms/android-8/arch-arm/usr/include/linux/tty.h
new file mode 120000
index 0000000..32e6791
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/types.h b/6/platforms/android-8/arch-arm/usr/include/linux/types.h
new file mode 120000
index 0000000..abeeb2e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/udp.h b/6/platforms/android-8/arch-arm/usr/include/linux/udp.h
new file mode 120000
index 0000000..8307b82
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_i.h b/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..e3a3916
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..a9ff458
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/uio.h b/6/platforms/android-8/arch-arm/usr/include/linux/uio.h
new file mode 120000
index 0000000..b4480a6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/un.h b/6/platforms/android-8/arch-arm/usr/include/linux/un.h
new file mode 120000
index 0000000..f879d2c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/unistd.h b/6/platforms/android-8/arch-arm/usr/include/linux/unistd.h
new file mode 120000
index 0000000..8a48bc1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/usb.h b/6/platforms/android-8/arch-arm/usr/include/linux/usb.h
new file mode 120000
index 0000000..bde703f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/usb_ch9.h b/6/platforms/android-8/arch-arm/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..3340abe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/usbdevice_fs.h b/6/platforms/android-8/arch-arm/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..b00c880
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/user.h b/6/platforms/android-8/arch-arm/usr/include/linux/user.h
new file mode 120000
index 0000000..504a816
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/utime.h b/6/platforms/android-8/arch-arm/usr/include/linux/utime.h
new file mode 120000
index 0000000..89fb43c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/utsname.h b/6/platforms/android-8/arch-arm/usr/include/linux/utsname.h
new file mode 120000
index 0000000..9c450ed
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/version.h b/6/platforms/android-8/arch-arm/usr/include/linux/version.h
new file mode 120000
index 0000000..03cd20f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/vfs.h b/6/platforms/android-8/arch-arm/usr/include/linux/vfs.h
new file mode 120000
index 0000000..caf4b2b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/videodev.h b/6/platforms/android-8/arch-arm/usr/include/linux/videodev.h
new file mode 120000
index 0000000..c0676a1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/videodev2.h b/6/platforms/android-8/arch-arm/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..52ddebf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/vmalloc.h b/6/platforms/android-8/arch-arm/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..7f7dab3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/vt.h b/6/platforms/android-8/arch-arm/usr/include/linux/vt.h
new file mode 120000
index 0000000..7270a0f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/vt_buffer.h b/6/platforms/android-8/arch-arm/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..4c6c0d6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/wait.h b/6/platforms/android-8/arch-arm/usr/include/linux/wait.h
new file mode 120000
index 0000000..0b49d72
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/wanrouter.h b/6/platforms/android-8/arch-arm/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..ea34a04
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/wireless.h b/6/platforms/android-8/arch-arm/usr/include/linux/wireless.h
new file mode 120000
index 0000000..25b1f84
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/workqueue.h b/6/platforms/android-8/arch-arm/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..0f1177c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/xattr.h b/6/platforms/android-8/arch-arm/usr/include/linux/xattr.h
new file mode 120000
index 0000000..03fe828
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/zconf.h b/6/platforms/android-8/arch-arm/usr/include/linux/zconf.h
new file mode 120000
index 0000000..5a4797c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/zlib.h b/6/platforms/android-8/arch-arm/usr/include/linux/zlib.h
new file mode 120000
index 0000000..9cce148
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/linux/zorro_ids.h b/6/platforms/android-8/arch-arm/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..517c75f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/locale.h b/6/platforms/android-8/arch-arm/usr/include/locale.h
new file mode 120000
index 0000000..034e8e6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/_types.h b/6/platforms/android-8/arch-arm/usr/include/machine/_types.h
new file mode 120000
index 0000000..d9b4be6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/asm.h b/6/platforms/android-8/arch-arm/usr/include/machine/asm.h
new file mode 120000
index 0000000..d783bc1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/asm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/asm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/cdefs.h b/6/platforms/android-8/arch-arm/usr/include/machine/cdefs.h
new file mode 120000
index 0000000..3f0e644
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/cpu-features.h b/6/platforms/android-8/arch-arm/usr/include/machine/cpu-features.h
new file mode 120000
index 0000000..b2902d9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/cpu-features.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/cpu-features.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/exec.h b/6/platforms/android-8/arch-arm/usr/include/machine/exec.h
new file mode 120000
index 0000000..9438739
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/exec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/exec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/ieee.h b/6/platforms/android-8/arch-arm/usr/include/machine/ieee.h
new file mode 120000
index 0000000..7966e0e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/ieee.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/ieee.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/internal_types.h b/6/platforms/android-8/arch-arm/usr/include/machine/internal_types.h
new file mode 120000
index 0000000..c2b4622
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/internal_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/internal_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/kernel.h b/6/platforms/android-8/arch-arm/usr/include/machine/kernel.h
new file mode 120000
index 0000000..f721428
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/limits.h b/6/platforms/android-8/arch-arm/usr/include/machine/limits.h
new file mode 120000
index 0000000..a9b2c23
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/machine/setjmp.h b/6/platforms/android-8/arch-arm/usr/include/machine/setjmp.h
new file mode 120000
index 0000000..4af570b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/machine/setjmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/machine/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/malloc.h b/6/platforms/android-8/arch-arm/usr/include/malloc.h
new file mode 120000
index 0000000..a25aaa7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/math.h b/6/platforms/android-8/arch-arm/usr/include/math.h
new file mode 120000
index 0000000..d487d7f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/memory.h b/6/platforms/android-8/arch-arm/usr/include/memory.h
new file mode 120000
index 0000000..61d3b9c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/mntent.h b/6/platforms/android-8/arch-arm/usr/include/mntent.h
new file mode 120000
index 0000000..03a574a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-abi.h b/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..c9ffc61
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-user.h b/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..beb1d8c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/ethertypes.h b/6/platforms/android-8/arch-arm/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..4768bc8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if.h b/6/platforms/android-8/arch-arm/usr/include/net/if.h
new file mode 120000
index 0000000..05d7009
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_arp.h b/6/platforms/android-8/arch-arm/usr/include/net/if_arp.h
new file mode 120000
index 0000000..efc080e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_dl.h b/6/platforms/android-8/arch-arm/usr/include/net/if_dl.h
new file mode 120000
index 0000000..5bb316f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_ether.h b/6/platforms/android-8/arch-arm/usr/include/net/if_ether.h
new file mode 120000
index 0000000..a58aadc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_ieee1394.h b/6/platforms/android-8/arch-arm/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..ba837d9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_packet.h b/6/platforms/android-8/arch-arm/usr/include/net/if_packet.h
new file mode 120000
index 0000000..d6c553c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/if_types.h b/6/platforms/android-8/arch-arm/usr/include/net/if_types.h
new file mode 120000
index 0000000..b482971
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/net/route.h b/6/platforms/android-8/arch-arm/usr/include/net/route.h
new file mode 120000
index 0000000..28dbf37
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netdb.h b/6/platforms/android-8/arch-arm/usr/include/netdb.h
new file mode 120000
index 0000000..251784e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/ether.h b/6/platforms/android-8/arch-arm/usr/include/netinet/ether.h
new file mode 120000
index 0000000..76141c7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/if_ether.h b/6/platforms/android-8/arch-arm/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..bf8d3b6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/in.h b/6/platforms/android-8/arch-arm/usr/include/netinet/in.h
new file mode 120000
index 0000000..1641d33
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/in6.h b/6/platforms/android-8/arch-arm/usr/include/netinet/in6.h
new file mode 120000
index 0000000..5254a54
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/in_systm.h b/6/platforms/android-8/arch-arm/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..4edf104
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/ip.h b/6/platforms/android-8/arch-arm/usr/include/netinet/ip.h
new file mode 120000
index 0000000..b90de7e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/ip_icmp.h b/6/platforms/android-8/arch-arm/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..43493b0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/tcp.h b/6/platforms/android-8/arch-arm/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..6716db8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netinet/udp.h b/6/platforms/android-8/arch-arm/usr/include/netinet/udp.h
new file mode 120000
index 0000000..4bad7bd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/netpacket/packet.h b/6/platforms/android-8/arch-arm/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..557e473
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/nsswitch.h b/6/platforms/android-8/arch-arm/usr/include/nsswitch.h
new file mode 120000
index 0000000..a7a6f25
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/pathconf.h b/6/platforms/android-8/arch-arm/usr/include/pathconf.h
new file mode 120000
index 0000000..6458841
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/paths.h b/6/platforms/android-8/arch-arm/usr/include/paths.h
new file mode 120000
index 0000000..695e46b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/poll.h b/6/platforms/android-8/arch-arm/usr/include/poll.h
new file mode 120000
index 0000000..6ba36bc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/pthread.h b/6/platforms/android-8/arch-arm/usr/include/pthread.h
new file mode 100644
index 0000000..eb2d169
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/pthread.h
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_condattr_init(pthread_condattr_t *attr);
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared);
+int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared);
+int pthread_condattr_destroy(pthread_condattr_t *attr);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-8/arch-arm/usr/include/pwd.h b/6/platforms/android-8/arch-arm/usr/include/pwd.h
new file mode 120000
index 0000000..b91e788
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/regex.h b/6/platforms/android-8/arch-arm/usr/include/regex.h
new file mode 100644
index 0000000..aec38e3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/regex.h
@@ -0,0 +1,105 @@
+/* $OpenBSD: regex.h,v 1.6 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: regex.h,v 1.4.6.1 1996/06/10 18:57:07 explorer Exp $ */
+
+/*-
+ * Copyright (c) 1992 Henry Spencer.
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer of the University of Toronto.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)regex.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _REGEX_H_
+#define _REGEX_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+/* types */
+typedef off_t regoff_t;
+
+typedef struct {
+ int re_magic;
+ size_t re_nsub; /* number of parenthesized subexpressions */
+ const char *re_endp; /* end pointer for REG_PEND */
+ struct re_guts *re_g; /* none of your business :-) */
+} regex_t;
+
+typedef struct {
+ regoff_t rm_so; /* start of match */
+ regoff_t rm_eo; /* end of match */
+} regmatch_t;
+
+/* regcomp() flags */
+#define REG_BASIC 0000
+#define REG_EXTENDED 0001
+#define REG_ICASE 0002
+#define REG_NOSUB 0004
+#define REG_NEWLINE 0010
+#define REG_NOSPEC 0020
+#define REG_PEND 0040
+#define REG_DUMP 0200
+
+/* regerror() flags */
+#define REG_NOMATCH 1
+#define REG_BADPAT 2
+#define REG_ECOLLATE 3
+#define REG_ECTYPE 4
+#define REG_EESCAPE 5
+#define REG_ESUBREG 6
+#define REG_EBRACK 7
+#define REG_EPAREN 8
+#define REG_EBRACE 9
+#define REG_BADBR 10
+#define REG_ERANGE 11
+#define REG_ESPACE 12
+#define REG_BADRPT 13
+#define REG_EMPTY 14
+#define REG_ASSERT 15
+#define REG_INVARG 16
+#define REG_ATOI 255 /* convert name to number (!) */
+#define REG_ITOA 0400 /* convert number to name (!) */
+
+/* regexec() flags */
+#define REG_NOTBOL 00001
+#define REG_NOTEOL 00002
+#define REG_STARTEND 00004
+#define REG_TRACE 00400 /* tracing of execution */
+#define REG_LARGE 01000 /* force large representation */
+#define REG_BACKR 02000 /* force use of backref code */
+
+__BEGIN_DECLS
+int regcomp(regex_t *, const char *, int);
+size_t regerror(int, const regex_t *, char *, size_t);
+int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
+void regfree(regex_t *);
+__END_DECLS
+
+#endif /* !_REGEX_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/resolv.h b/6/platforms/android-8/arch-arm/usr/include/resolv.h
new file mode 120000
index 0000000..cd385f3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sched.h b/6/platforms/android-8/arch-arm/usr/include/sched.h
new file mode 100644
index 0000000..2dba5b1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sched.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#ifdef _GNU_SOURCE
+extern int clone(int (*fn)(void*), void *child_stack, int flags, void *arg);
+#endif
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/semaphore.h b/6/platforms/android-8/arch-arm/usr/include/semaphore.h
new file mode 120000
index 0000000..0faba97
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/setjmp.h b/6/platforms/android-8/arch-arm/usr/include/setjmp.h
new file mode 120000
index 0000000..a637eb2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sgtty.h b/6/platforms/android-8/arch-arm/usr/include/sgtty.h
new file mode 120000
index 0000000..6e0bd7d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sha1.h b/6/platforms/android-8/arch-arm/usr/include/sha1.h
new file mode 120000
index 0000000..d7fc4c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/signal.h b/6/platforms/android-8/arch-arm/usr/include/signal.h
new file mode 100644
index 0000000..4401164
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/signal.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
+
+#include <sys/cdefs.h>
+#include <limits.h> /* For LONG_BIT */
+#include <string.h> /* For memset() */
+#include <sys/types.h>
+#include <asm/signal.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+typedef int sig_atomic_t;
+
+/* crepy NIG / _NSIG handling, just to be safe */
+#ifndef NSIG
+# define NSIG _NSIG
+#endif
+#ifndef _NSIG
+# define _NSIG NSIG
+#endif
+
+extern const char * const sys_siglist[];
+extern const char * const sys_signame[];
+
+static __inline__ int sigismember(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ return (int)((local_set[signum/LONG_BIT] >> (signum%LONG_BIT)) & 1);
+}
+
+
+static __inline__ int sigaddset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] |= 1UL << (signum%LONG_BIT);
+ return 0;
+}
+
+
+static __inline__ int sigdelset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] &= ~(1UL << (signum%LONG_BIT));
+ return 0;
+}
+
+
+static __inline__ int sigemptyset(sigset_t *set)
+{
+ memset(set, 0, sizeof *set);
+ return 0;
+}
+
+static __inline__ int sigfillset(sigset_t *set)
+{
+ memset(set, ~0, sizeof *set);
+ return 0;
+}
+
+
+/* compatibility types */
+typedef void (*sig_t)(int);
+typedef sig_t sighandler_t;
+
+/* differentiater between sysv and bsd behaviour 8*/
+extern __sighandler_t sysv_signal(int, __sighandler_t);
+extern __sighandler_t bsd_signal(int, __sighandler_t);
+
+/* the default is bsd */
+static __inline__ __sighandler_t signal(int s, __sighandler_t f)
+{
+ return bsd_signal(s,f);
+}
+
+/* the syscall itself */
+extern __sighandler_t __signal(int, __sighandler_t, int);
+
+extern int sigprocmask(int, const sigset_t *, sigset_t *);
+extern int sigaction(int, const struct sigaction *, struct sigaction *);
+
+extern int sigpending(sigset_t *);
+extern int sigsuspend(const sigset_t *);
+extern int sigwait(const sigset_t *set, int *sig);
+extern int siginterrupt(int sig, int flag);
+
+extern int raise(int);
+extern int kill(pid_t, int);
+extern int killpg(int pgrp, int sig);
+extern int sigaltstack(const stack_t *ss, stack_t *oss);
+
+
+__END_DECLS
+
+#endif /* _SIGNAL_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/stdint.h b/6/platforms/android-8/arch-arm/usr/include/stdint.h
new file mode 120000
index 0000000..948a643
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/stdio.h b/6/platforms/android-8/arch-arm/usr/include/stdio.h
new file mode 100644
index 0000000..c38ed5a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/stdio.h
@@ -0,0 +1,453 @@
+/* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */
+/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stdio.h 5.17 (Berkeley) 6/3/91
+ */
+
+#ifndef _STDIO_H_
+#define _STDIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/* va_list and size_t must be defined by stdio.h according to Posix */
+#define __need___va_list
+#include <stdarg.h>
+
+/* note that this forces stddef.h to *only* define size_t */
+#define __need_size_t
+#include <stddef.h>
+
+#include <stddef.h>
+
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#include <sys/types.h> /* XXX should be removed */
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned long size_t;
+#endif
+
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef long off_t;
+#endif
+
+#ifndef NULL
+#ifdef __GNUG__
+#define NULL __null
+#else
+#define NULL 0L
+#endif
+#endif
+
+#define _FSTDIO /* Define for new stdio with functions. */
+
+typedef off_t fpos_t; /* stdio file position type */
+
+/*
+ * NB: to fit things in six character monocase externals, the stdio
+ * code uses the prefix `__s' for stdio objects, typically followed
+ * by a three-character attempt at a mnemonic.
+ */
+
+/* stdio buffers */
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+
+/*
+ * stdio state variables.
+ *
+ * The following always hold:
+ *
+ * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
+ * _lbfsize is -_bf._size, else _lbfsize is 0
+ * if _flags&__SRD, _w is 0
+ * if _flags&__SWR, _r is 0
+ *
+ * This ensures that the getc and putc macros (or inline functions) never
+ * try to write or read from a file that is in `read' or `write' mode.
+ * (Moreover, they can, and do, automatically switch from read mode to
+ * write mode, and back, on "r+" and "w+" files.)
+ *
+ * _lbfsize is used only to make the inline line-buffered output stream
+ * code as compact as possible.
+ *
+ * _ub, _up, and _ur are used when ungetc() pushes back more characters
+ * than fit in the current _bf, or when ungetc() pushes back a character
+ * that does not match the previous one in _bf. When this happens,
+ * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
+ * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * NOTE: if you change this structure, you also need to update the
+ * std() initializer in findfp.c.
+ */
+typedef struct __sFILE {
+ unsigned char *_p; /* current position in (some) buffer */
+ int _r; /* read space left for getc() */
+ int _w; /* write space left for putc() */
+ short _flags; /* flags, below; this FILE is free if 0 */
+ short _file; /* fileno, if Unix descriptor, else -1 */
+ struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
+ int _lbfsize; /* 0 or -_bf._size, for inline putc */
+
+ /* operations */
+ void *_cookie; /* cookie passed to io functions */
+ int (*_close)(void *);
+ int (*_read)(void *, char *, int);
+ fpos_t (*_seek)(void *, fpos_t, int);
+ int (*_write)(void *, const char *, int);
+
+ /* extension data, to avoid further ABI breakage */
+ struct __sbuf _ext;
+ /* data for long sequences of ungetc() */
+ unsigned char *_up; /* saved _p when _p is doing ungetc data */
+ int _ur; /* saved _r when _r is counting ungetc data */
+
+ /* tricks to meet minimum requirements even when malloc() fails */
+ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
+ unsigned char _nbuf[1]; /* guarantee a getc() buffer */
+
+ /* separate buffer for fgetln() when line crosses buffer boundary */
+ struct __sbuf _lb; /* buffer for fgetln() */
+
+ /* Unix stdio files get aligned to block boundaries on fseek() */
+ int _blksize; /* stat.st_blksize (may be != _bf._size) */
+ fpos_t _offset; /* current lseek offset */
+} FILE;
+
+__BEGIN_DECLS
+extern FILE __sF[];
+__END_DECLS
+
+#define __SLBF 0x0001 /* line buffered */
+#define __SNBF 0x0002 /* unbuffered */
+#define __SRD 0x0004 /* OK to read */
+#define __SWR 0x0008 /* OK to write */
+ /* RD and WR are never simultaneously asserted */
+#define __SRW 0x0010 /* open for reading & writing */
+#define __SEOF 0x0020 /* found EOF */
+#define __SERR 0x0040 /* found error */
+#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SAPP 0x0100 /* fdopen()ed in append mode */
+#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
+#define __SOPT 0x0400 /* do fseek() optimisation */
+#define __SNPT 0x0800 /* do not do fseek() optimisation */
+#define __SOFF 0x1000 /* set iff _offset is in fact correct */
+#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define _IOFBF 0 /* setvbuf should set fully buffered */
+#define _IOLBF 1 /* setvbuf should set line buffered */
+#define _IONBF 2 /* setvbuf should set unbuffered */
+
+#define BUFSIZ 1024 /* size of buffer used by setbuf */
+
+#define EOF (-1)
+
+/*
+ * FOPEN_MAX is a minimum maximum, and should be the number of descriptors
+ * that the kernel can provide without allocation of a resource that can
+ * fail without the process sleeping. Do not use this for anything.
+ */
+#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
+#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#if __BSD_VISIBLE || __XPG_VISIBLE
+#define P_tmpdir "/tmp/"
+#endif
+#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
+#define TMP_MAX 308915776
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1 /* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2 /* set file offset to EOF plus offset */
+#endif
+
+#define stdin (&__sF[0])
+#define stdout (&__sF[1])
+#define stderr (&__sF[2])
+
+/*
+ * Functions defined in ANSI C standard.
+ */
+__BEGIN_DECLS
+void clearerr(FILE *);
+int fclose(FILE *);
+int feof(FILE *);
+int ferror(FILE *);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fgetpos(FILE *, fpos_t *);
+char *fgets(char *, int, FILE *);
+FILE *fopen(const char *, const char *);
+int fprintf(FILE *, const char *, ...);
+int fputc(int, FILE *);
+int fputs(const char *, FILE *);
+size_t fread(void *, size_t, size_t, FILE *);
+FILE *freopen(const char *, const char *, FILE *);
+int fscanf(FILE *, const char *, ...);
+int fseek(FILE *, long, int);
+int fseeko(FILE *, off_t, int);
+int fsetpos(FILE *, const fpos_t *);
+long ftell(FILE *);
+off_t ftello(FILE *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+int getc(FILE *);
+int getchar(void);
+char *gets(char *);
+#if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
+#define __SYS_ERRLIST
+
+extern int sys_nerr; /* perror(3) external variables */
+extern char *sys_errlist[];
+#endif
+void perror(const char *);
+int printf(const char *, ...);
+int putc(int, FILE *);
+int putchar(int);
+int puts(const char *);
+int remove(const char *);
+int rename(const char *, const char *);
+void rewind(FILE *);
+int scanf(const char *, ...);
+void setbuf(FILE *, char *);
+int setvbuf(FILE *, char *, int, size_t);
+int sprintf(char *, const char *, ...);
+int sscanf(const char *, const char *, ...);
+FILE *tmpfile(void);
+char *tmpnam(char *);
+int ungetc(int, FILE *);
+int vfprintf(FILE *, const char *, __va_list);
+int vprintf(const char *, __va_list);
+int vsprintf(char *, const char *, __va_list);
+
+#if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
+int snprintf(char *, size_t, const char *, ...)
+ __attribute__((__format__ (printf, 3, 4)))
+ __attribute__((__nonnull__ (3)));
+int vfscanf(FILE *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+int vscanf(const char *, __va_list)
+ __attribute__((__format__ (scanf, 1, 0)))
+ __attribute__((__nonnull__ (1)));
+int vsnprintf(char *, size_t, const char *, __va_list)
+ __attribute__((__format__ (printf, 3, 0)))
+ __attribute__((__nonnull__ (3)));
+int vsscanf(const char *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+#endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
+
+__END_DECLS
+
+
+/*
+ * Functions defined in POSIX 1003.1.
+ */
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
+#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+char *ctermid(char *);
+char *cuserid(char *);
+#endif /* MISSING */
+FILE *fdopen(int, const char *);
+int fileno(FILE *);
+
+#if (__POSIX_VISIBLE >= 199209)
+int pclose(FILE *);
+FILE *popen(const char *, const char *);
+#endif
+
+#if __POSIX_VISIBLE >= 199506
+void flockfile(FILE *);
+int ftrylockfile(FILE *);
+void funlockfile(FILE *);
+
+/*
+ * These are normally used through macros as defined below, but POSIX
+ * requires functions as well.
+ */
+int getc_unlocked(FILE *);
+int getchar_unlocked(void);
+int putc_unlocked(int, FILE *);
+int putchar_unlocked(int);
+#endif /* __POSIX_VISIBLE >= 199506 */
+
+#if __XPG_VISIBLE
+char *tempnam(const char *, const char *);
+#endif
+__END_DECLS
+
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
+
+/*
+ * Routines that are purely local.
+ */
+#if __BSD_VISIBLE
+__BEGIN_DECLS
+int asprintf(char **, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)))
+ __attribute__((__nonnull__ (2)));
+char *fgetln(FILE *, size_t *);
+int fpurge(FILE *);
+int getw(FILE *);
+int putw(int, FILE *);
+void setbuffer(FILE *, char *, int);
+int setlinebuf(FILE *);
+int vasprintf(char **, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+__END_DECLS
+
+/*
+ * Stdio function-access interface.
+ */
+__BEGIN_DECLS
+FILE *funopen(const void *,
+ int (*)(void *, char *, int),
+ int (*)(void *, const char *, int),
+ fpos_t (*)(void *, fpos_t, int),
+ int (*)(void *));
+__END_DECLS
+#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Functions internal to the implementation.
+ */
+__BEGIN_DECLS
+int __srget(FILE *);
+int __swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__)
+static __inline int __sputc(int _c, FILE *_p) {
+ if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+ return (*_p->_p++ = _c);
+ else
+ return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define __sputc(c, p) \
+ (--(p)->_w < 0 ? \
+ (p)->_w >= (p)->_lbfsize ? \
+ (*(p)->_p = (c)), *(p)->_p != '\n' ? \
+ (int)*(p)->_p++ : \
+ __swbuf('\n', p) : \
+ __swbuf((int)(c), p) : \
+ (*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define __sfileno(p) ((p)->_file)
+
+#define feof(p) __sfeof(p)
+#define ferror(p) __sferror(p)
+
+#ifndef _POSIX_THREADS
+#define clearerr(p) __sclearerr(p)
+#endif
+
+#if __POSIX_VISIBLE
+#define fileno(p) __sfileno(p)
+#endif
+
+#ifndef lint
+#ifndef _POSIX_THREADS
+#define getc(fp) __sgetc(fp)
+#endif /* _POSIX_THREADS */
+#define getc_unlocked(fp) __sgetc(fp)
+/*
+ * The macro implementations of putc and putc_unlocked are not
+ * fully POSIX compliant; they do not set errno on failure
+ */
+#if __BSD_VISIBLE
+#ifndef _POSIX_THREADS
+#define putc(x, fp) __sputc(x, fp)
+#endif /* _POSIX_THREADS */
+#define putc_unlocked(x, fp) __sputc(x, fp)
+#endif /* __BSD_VISIBLE */
+#endif /* lint */
+
+#define getchar() getc(stdin)
+#define putchar(x) putc(x, stdout)
+#define getchar_unlocked() getc_unlocked(stdin)
+#define putchar_unlocked(c) putc_unlocked(c, stdout)
+
+#ifdef _GNU_SOURCE
+/*
+ * glibc defines dprintf(int, const char*, ...), which is poorly named
+ * and likely to conflict with locally defined debugging printfs
+ * fdprintf is a better name, and some programs that use fdprintf use a
+ * #define fdprintf dprintf for compatibility
+ */
+int fdprintf(int, const char*, ...);
+int vfdprintf(int, const char*, __va_list);
+#endif /* _GNU_SOURCE */
+
+#endif /* _STDIO_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/stdlib.h b/6/platforms/android-8/arch-arm/usr/include/stdlib.h
new file mode 100644
index 0000000..ddaf32c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+extern int clearenv(void);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern char* ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd)
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/string.h b/6/platforms/android-8/arch-arm/usr/include/string.h
new file mode 120000
index 0000000..1663e9c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/strings.h b/6/platforms/android-8/arch-arm/usr/include/strings.h
new file mode 120000
index 0000000..30ded7e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/_errdefs.h b/6/platforms/android-8/arch-arm/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..323e9fd
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/_sigdefs.h b/6/platforms/android-8/arch-arm/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..75239d0
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/_system_properties.h b/6/platforms/android-8/arch-arm/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..28f502f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/_types.h b/6/platforms/android-8/arch-arm/usr/include/sys/_types.h
new file mode 120000
index 0000000..5d7bdcc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/atomics.h b/6/platforms/android-8/arch-arm/usr/include/sys/atomics.h
new file mode 120000
index 0000000..2f0eec5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/cdefs.h b/6/platforms/android-8/arch-arm/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..4eeeac3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h b/6/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..cc30b77
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/dirent.h b/6/platforms/android-8/arch-arm/usr/include/sys/dirent.h
new file mode 120000
index 0000000..ca995c9
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/endian.h b/6/platforms/android-8/arch-arm/usr/include/sys/endian.h
new file mode 120000
index 0000000..e5f8b82
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/epoll.h b/6/platforms/android-8/arch-arm/usr/include/sys/epoll.h
new file mode 120000
index 0000000..d2305b5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/errno.h b/6/platforms/android-8/arch-arm/usr/include/sys/errno.h
new file mode 120000
index 0000000..9c23fed
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/exec_elf.h b/6/platforms/android-8/arch-arm/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..132620b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/file.h b/6/platforms/android-8/arch-arm/usr/include/sys/file.h
new file mode 120000
index 0000000..e6db7ab
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/fsuid.h b/6/platforms/android-8/arch-arm/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..208a340
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/inotify.h b/6/platforms/android-8/arch-arm/usr/include/sys/inotify.h
new file mode 120000
index 0000000..8d4769c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ioctl.h b/6/platforms/android-8/arch-arm/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..6c86f47
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ioctl_compat.h b/6/platforms/android-8/arch-arm/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..59526e1
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ipc.h b/6/platforms/android-8/arch-arm/usr/include/sys/ipc.h
new file mode 120000
index 0000000..9ec0d13
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/klog.h b/6/platforms/android-8/arch-arm/usr/include/sys/klog.h
new file mode 120000
index 0000000..585b6ff
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/limits.h b/6/platforms/android-8/arch-arm/usr/include/sys/limits.h
new file mode 120000
index 0000000..c0efeaf
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/linux-syscalls.h b/6/platforms/android-8/arch-arm/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..76a148b
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/linux-unistd.h b/6/platforms/android-8/arch-arm/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..1d7d9d2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/mman.h b/6/platforms/android-8/arch-arm/usr/include/sys/mman.h
new file mode 120000
index 0000000..50ea19d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/mount.h b/6/platforms/android-8/arch-arm/usr/include/sys/mount.h
new file mode 120000
index 0000000..ca4a353
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/param.h b/6/platforms/android-8/arch-arm/usr/include/sys/param.h
new file mode 120000
index 0000000..573a10e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/poll.h b/6/platforms/android-8/arch-arm/usr/include/sys/poll.h
new file mode 120000
index 0000000..4b7b215
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/prctl.h b/6/platforms/android-8/arch-arm/usr/include/sys/prctl.h
new file mode 120000
index 0000000..3242dd3
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ptrace.h b/6/platforms/android-8/arch-arm/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..1c73072
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/queue.h b/6/platforms/android-8/arch-arm/usr/include/sys/queue.h
new file mode 120000
index 0000000..afb0109
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/reboot.h b/6/platforms/android-8/arch-arm/usr/include/sys/reboot.h
new file mode 120000
index 0000000..96f1607
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/resource.h b/6/platforms/android-8/arch-arm/usr/include/sys/resource.h
new file mode 120000
index 0000000..f8b1812
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/select.h b/6/platforms/android-8/arch-arm/usr/include/sys/select.h
new file mode 120000
index 0000000..2681111
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/sendfile.h b/6/platforms/android-8/arch-arm/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..46d613d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/socket.h b/6/platforms/android-8/arch-arm/usr/include/sys/socket.h
new file mode 120000
index 0000000..76e652d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/socketcalls.h b/6/platforms/android-8/arch-arm/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..03bcff8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/stat.h b/6/platforms/android-8/arch-arm/usr/include/sys/stat.h
new file mode 120000
index 0000000..80319a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/statfs.h b/6/platforms/android-8/arch-arm/usr/include/sys/statfs.h
new file mode 120000
index 0000000..ac4e431
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/syscall.h b/6/platforms/android-8/arch-arm/usr/include/sys/syscall.h
new file mode 120000
index 0000000..2fc9fcc
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/sysconf.h b/6/platforms/android-8/arch-arm/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..3a16227
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/sysinfo.h b/6/platforms/android-8/arch-arm/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..0746941
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/syslimits.h b/6/platforms/android-8/arch-arm/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..feeeebb
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/sysmacros.h b/6/platforms/android-8/arch-arm/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..18414c7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/system_properties.h b/6/platforms/android-8/arch-arm/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..546591a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/time.h b/6/platforms/android-8/arch-arm/usr/include/sys/time.h
new file mode 120000
index 0000000..b551c1e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/timeb.h b/6/platforms/android-8/arch-arm/usr/include/sys/timeb.h
new file mode 120000
index 0000000..767db6e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/times.h b/6/platforms/android-8/arch-arm/usr/include/sys/times.h
new file mode 120000
index 0000000..cf2d902
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ttychars.h b/6/platforms/android-8/arch-arm/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..9a51742
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/ttydev.h b/6/platforms/android-8/arch-arm/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..5e11309
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/types.h b/6/platforms/android-8/arch-arm/usr/include/sys/types.h
new file mode 120000
index 0000000..13ae55f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/uio.h b/6/platforms/android-8/arch-arm/usr/include/sys/uio.h
new file mode 120000
index 0000000..74a59b6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/un.h b/6/platforms/android-8/arch-arm/usr/include/sys/un.h
new file mode 120000
index 0000000..2108ef6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/utime.h b/6/platforms/android-8/arch-arm/usr/include/sys/utime.h
new file mode 120000
index 0000000..ab8d1a7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/utsname.h b/6/platforms/android-8/arch-arm/usr/include/sys/utsname.h
new file mode 120000
index 0000000..5b308c5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/vfs.h b/6/platforms/android-8/arch-arm/usr/include/sys/vfs.h
new file mode 120000
index 0000000..a6dacec
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/vt.h b/6/platforms/android-8/arch-arm/usr/include/sys/vt.h
new file mode 120000
index 0000000..36958fa
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/sys/wait.h b/6/platforms/android-8/arch-arm/usr/include/sys/wait.h
new file mode 120000
index 0000000..ac529a8
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-arm/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/syslog.h b/6/platforms/android-8/arch-arm/usr/include/syslog.h
new file mode 120000
index 0000000..bf838db
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/termio.h b/6/platforms/android-8/arch-arm/usr/include/termio.h
new file mode 120000
index 0000000..339b215
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/termios.h b/6/platforms/android-8/arch-arm/usr/include/termios.h
new file mode 120000
index 0000000..708c540
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/thread_db.h b/6/platforms/android-8/arch-arm/usr/include/thread_db.h
new file mode 120000
index 0000000..ecfcf21
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/time.h b/6/platforms/android-8/arch-arm/usr/include/time.h
new file mode 100644
index 0000000..6163c6d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/time.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TIME_H_
+#define _TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+extern time_t time(time_t *);
+extern int nanosleep(const struct timespec *, struct timespec *);
+
+extern char *strtotimeval(const char *str, struct timeval *tv);
+
+struct tm {
+ int tm_sec; /* seconds */
+ int tm_min; /* minutes */
+ int tm_hour; /* hours */
+ int tm_mday; /* day of the month */
+ int tm_mon; /* month */
+ int tm_year; /* year */
+ int tm_wday; /* day of the week */
+ int tm_yday; /* day in the year */
+ int tm_isdst; /* daylight saving time */
+
+ long int tm_gmtoff; /* Seconds east of UTC. */
+ const char *tm_zone; /* Timezone abbreviation. */
+
+};
+
+/* defining TM_ZONE indicates that we have a "timezone abbreviation" field in
+ * struct tm, the value should be the field name
+ */
+#define TM_ZONE tm_zone
+
+extern char* asctime(const struct tm* a);
+extern char* asctime_r(const struct tm* a, char* buf);
+
+/* Return the difference between TIME1 and TIME0. */
+extern double difftime (time_t __time1, time_t __time0);
+extern time_t mktime (struct tm *a);
+
+extern struct tm* localtime(const time_t *t);
+extern struct tm* localtime_r(const time_t *timep, struct tm *result);
+
+extern struct tm* gmtime(const time_t *timep);
+extern struct tm* gmtime_r(const time_t *timep, struct tm *result);
+
+extern char* strptime(const char *buf, const char *fmt, struct tm *tm);
+extern size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
+
+extern char *ctime(const time_t *timep);
+extern char *ctime_r(const time_t *timep, char *buf);
+
+extern void tzset(void);
+
+/* global includes */
+extern char* tzname[];
+extern int daylight;
+extern long int timezone;
+
+#define CLOCKS_PER_SEC 1000000
+
+extern clock_t clock(void);
+
+/* BIONIC: extra linux clock goodies */
+extern int clock_getres(int, struct timespec *);
+extern int clock_gettime(int, struct timespec *);
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+#define CLOCK_REALTIME_HR 4
+#define CLOCK_MONOTONIC_HR 5
+
+extern int timer_create(int, struct sigevent*, timer_t*);
+extern int timer_delete(timer_t);
+extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue);
+extern int timer_gettime(timer_t timerid, struct itimerspec *value);
+extern int timer_getoverrun(timer_t timerid);
+
+__END_DECLS
+
+#endif /* _TIME_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/time64.h b/6/platforms/android-8/arch-arm/usr/include/time64.h
new file mode 120000
index 0000000..4cbb16e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/unistd.h b/6/platforms/android-8/arch-arm/usr/include/unistd.h
new file mode 100644
index 0000000..863d56d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/unistd.h
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern int usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+extern int ttyname_r(int, char*, size_t);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int fdatasync(int);
+extern int getlogin_r(char* name, size_t namesize);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/util.h b/6/platforms/android-8/arch-arm/usr/include/util.h
new file mode 120000
index 0000000..f3d55e7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/utime.h b/6/platforms/android-8/arch-arm/usr/include/utime.h
new file mode 120000
index 0000000..1a67e66
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/utmp.h b/6/platforms/android-8/arch-arm/usr/include/utmp.h
new file mode 120000
index 0000000..c7a7032
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/wchar.h b/6/platforms/android-8/arch-arm/usr/include/wchar.h
new file mode 100644
index 0000000..97e1b5c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/wchar.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX 255
+#define WCHAR_MIN 0
+#define WEOF (-1)
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-8/arch-arm/usr/include/wctype.h b/6/platforms/android-8/arch-arm/usr/include/wctype.h
new file mode 120000
index 0000000..05c2be5
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/zconf.h b/6/platforms/android-8/arch-arm/usr/include/zconf.h
new file mode 120000
index 0000000..fd7831a
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/include/zlib.h b/6/platforms/android-8/arch-arm/usr/include/zlib.h
new file mode 120000
index 0000000..1aa17f4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o
new file mode 120000
index 0000000..b1da41d
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/crtbegin_so.o b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_so.o
new file mode 120000
index 0000000..100e04e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/crtbegin_so.o \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/crtbegin_static.o b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_static.o
new file mode 120000
index 0000000..df70c7c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/crtbegin_static.o
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/crtbegin_static.o \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/crtend_android.o b/6/platforms/android-8/arch-arm/usr/lib/crtend_android.o
new file mode 120000
index 0000000..10529d4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/crtend_android.o
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/crtend_android.o \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/crtend_so.o b/6/platforms/android-8/arch-arm/usr/lib/crtend_so.o
new file mode 120000
index 0000000..9f77a51
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/crtend_so.o
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/crtend_so.o \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libGLESv1_CM.so b/6/platforms/android-8/arch-arm/usr/lib/libGLESv1_CM.so
new file mode 120000
index 0000000..3f66b4f
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libGLESv1_CM.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libGLESv1_CM.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libGLESv2.so b/6/platforms/android-8/arch-arm/usr/lib/libGLESv2.so
new file mode 120000
index 0000000..6495ef6
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libGLESv2.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libGLESv2.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libc.a b/6/platforms/android-8/arch-arm/usr/lib/libc.a
new file mode 120000
index 0000000..c8eacd2
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libc.a
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libc.a \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libc.so b/6/platforms/android-8/arch-arm/usr/lib/libc.so
new file mode 100644
index 0000000..b965d04
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libc.so
Binary files differ
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libdl.so b/6/platforms/android-8/arch-arm/usr/lib/libdl.so
new file mode 100644
index 0000000..3319c4c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libdl.so
Binary files differ
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libjnigraphics.so b/6/platforms/android-8/arch-arm/usr/lib/libjnigraphics.so
new file mode 100755
index 0000000..4c21f4c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libjnigraphics.so
Binary files differ
diff --git a/6/platforms/android-8/arch-arm/usr/lib/liblog.so b/6/platforms/android-8/arch-arm/usr/lib/liblog.so
new file mode 120000
index 0000000..f3aab50
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/liblog.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/liblog.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libm.a b/6/platforms/android-8/arch-arm/usr/lib/libm.a
new file mode 120000
index 0000000..2e3b757
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libm.a
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libm.a \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libm.so b/6/platforms/android-8/arch-arm/usr/lib/libm.so
new file mode 120000
index 0000000..f6583e7
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libm.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libm.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libstdc++.a b/6/platforms/android-8/arch-arm/usr/lib/libstdc++.a
new file mode 120000
index 0000000..c4456fe
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libstdc++.a
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libstdc++.a \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libstdc++.so b/6/platforms/android-8/arch-arm/usr/lib/libstdc++.so
new file mode 120000
index 0000000..e8a20f4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libstdc++.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libstdc++.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libthread_db.a b/6/platforms/android-8/arch-arm/usr/lib/libthread_db.a
new file mode 120000
index 0000000..ca0715c
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libthread_db.a
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libthread_db.a \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libthread_db.so b/6/platforms/android-8/arch-arm/usr/lib/libthread_db.so
new file mode 120000
index 0000000..fa433e4
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libthread_db.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libthread_db.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-arm/usr/lib/libz.so b/6/platforms/android-8/arch-arm/usr/lib/libz.so
new file mode 120000
index 0000000..7e6523e
--- /dev/null
+++ b/6/platforms/android-8/arch-arm/usr/lib/libz.so
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-arm/usr/lib/libz.so \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES/gl.h b/6/platforms/android-8/arch-x86/usr/include/GLES/gl.h
new file mode 120000
index 0000000..f8fde90
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES/glext.h b/6/platforms/android-8/arch-x86/usr/include/GLES/glext.h
new file mode 120000
index 0000000..98a9907
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES/glplatform.h b/6/platforms/android-8/arch-x86/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..127e58b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2.h b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2.h
new file mode 120000
index 0000000..fd07ca7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES2/gl2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2ext.h b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2ext.h
new file mode 120000
index 0000000..92a6ef3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2ext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES2/gl2ext.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2platform.h b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2platform.h
new file mode 120000
index 0000000..342e06d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/GLES2/gl2platform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/GLES2/gl2platform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/KHR/khrplatform.h b/6/platforms/android-8/arch-x86/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..c986df7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/alloca.h b/6/platforms/android-8/arch-x86/usr/include/alloca.h
new file mode 120000
index 0000000..f91862f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/android/api-level.h b/6/platforms/android-8/arch-x86/usr/include/android/api-level.h
new file mode 100644
index 0000000..e580d72
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 8
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-8/arch-x86/usr/include/android/bitmap.h b/6/platforms/android-8/arch-x86/usr/include/android/bitmap.h
new file mode 100644
index 0000000..5078277
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/android/bitmap.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BITMAP_H
+#define ANDROID_BITMAP_H
+
+#include <stdint.h>
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ANDROID_BITMAP_RESUT_SUCCESS 0
+#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1
+#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2
+#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3
+
+enum AndroidBitmapFormat {
+ ANDROID_BITMAP_FORMAT_NONE = 0,
+ ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
+ ANDROID_BITMAP_FORMAT_RGB_565 = 4,
+ ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
+ ANDROID_BITMAP_FORMAT_A_8 = 8,
+};
+
+typedef struct {
+ uint32_t width;
+ uint32_t height;
+ uint32_t stride;
+ int32_t format;
+ uint32_t flags; // 0 for now
+} AndroidBitmapInfo;
+
+/**
+ * Given a java bitmap object, fill out the AndroidBitmap struct for it.
+ * If the call fails, the info parameter will be ignored
+ */
+int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
+ AndroidBitmapInfo* info);
+
+/**
+ * Given a java bitmap object, attempt to lock the pixel address.
+ * Locking will ensure that the memory for the pixels will not move
+ * until the unlockPixels call, and ensure that, if the pixels had been
+ * previously purged, they will have been restored.
+ *
+ * If this call succeeds, it must be balanced by a call to
+ * AndroidBitmap_unlockPixels, after which time the address of the pixels should
+ * no longer be used.
+ *
+ * If this succeeds, *addrPtr will be set to the pixel address. If the call
+ * fails, addrPtr will be ignored.
+ */
+int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
+
+/**
+ * Call this to balanace a successful call to AndroidBitmap_lockPixels
+ */
+int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-8/arch-x86/usr/include/android/log.h b/6/platforms/android-8/arch-x86/usr/include/android/log.h
new file mode 120000
index 0000000..768a63d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/arpa/inet.h b/6/platforms/android-8/arch-x86/usr/include/arpa/inet.h
new file mode 120000
index 0000000..cf05af3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/arpa/nameser.h b/6/platforms/android-8/arch-x86/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..f238484
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..34ee8cb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..5826d97
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..308bb19
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..1d0ce9f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..1607e21
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/find.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..a955626
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..e10f1f6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..63d98ab
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/le.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..26d6d90
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..e5c774a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/bug.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..fdfd21d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/cputime.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..5de5e12
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..26bd99a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno-base.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..f72db4a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..ab0947b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/fcntl.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..3ac23db
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/futex.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..3214ee5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/ioctl.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..ad2a381
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/ipc.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..7f17b8d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/local.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..77e4a14
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/memory_model.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..d98154d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/mman.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..66b35b6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..0fc9f72
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/percpu.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..93d4bff
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..9ca7d47
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..659b244
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/poll.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..4fefcfd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/resource.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..c38cf93
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/sections.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..e6a1fcc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/siginfo.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..e49b388
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/signal.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..58bb104
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/tlb.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..1371de6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/topology.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..58f0bc8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/asm-generic/xor.h b/6/platforms/android-8/arch-x86/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..5738954
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/assert.h b/6/platforms/android-8/arch-x86/usr/include/assert.h
new file mode 120000
index 0000000..4fc7690
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/byteswap.h b/6/platforms/android-8/arch-x86/usr/include/byteswap.h
new file mode 120000
index 0000000..62a631c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/ctype.h b/6/platforms/android-8/arch-x86/usr/include/ctype.h
new file mode 120000
index 0000000..1e38734
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/dirent.h b/6/platforms/android-8/arch-x86/usr/include/dirent.h
new file mode 120000
index 0000000..128d5cd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/dlfcn.h b/6/platforms/android-8/arch-x86/usr/include/dlfcn.h
new file mode 100644
index 0000000..f84d1d1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/dlfcn.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef __DLFCN_H__
+#define __DLFCN_H__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+typedef struct {
+ const char *dli_fname; /* Pathname of shared object that
+ contains address */
+ void *dli_fbase; /* Address at which shared object
+ is loaded */
+ const char *dli_sname; /* Name of nearest symbol with address
+ lower than addr */
+ void *dli_saddr; /* Exact address of symbol named
+ in dli_sname */
+} Dl_info;
+
+extern void* dlopen(const char* filename, int flag);
+extern int dlclose(void* handle);
+extern const char* dlerror(void);
+extern void* dlsym(void* handle, const char* symbol);
+extern int dladdr(void* addr, Dl_info *info);
+
+enum {
+ RTLD_NOW = 0,
+ RTLD_LAZY = 1,
+
+ RTLD_LOCAL = 0,
+ RTLD_GLOBAL = 2,
+};
+
+#define RTLD_DEFAULT ((void*) 0xffffffff)
+#define RTLD_NEXT ((void*) 0xfffffffe)
+
+__END_DECLS
+
+#endif /* __DLFCN_H */
+
+
diff --git a/6/platforms/android-8/arch-x86/usr/include/elf.h b/6/platforms/android-8/arch-x86/usr/include/elf.h
new file mode 120000
index 0000000..f978b94
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/endian.h b/6/platforms/android-8/arch-x86/usr/include/endian.h
new file mode 120000
index 0000000..7bc1e37
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/err.h b/6/platforms/android-8/arch-x86/usr/include/err.h
new file mode 100644
index 0000000..1636efe
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/err.h
@@ -0,0 +1,90 @@
+/* $OpenBSD: err.h,v 1.10 2006/01/06 18:53:04 millert Exp $ */
+/* $NetBSD: err.h,v 1.11 1994/10/26 00:55:52 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)err.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _ERR_H_
+#define _ERR_H_
+
+/*
+ * Don't use va_list in the err/warn prototypes. Va_list is typedef'd in two
+ * places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
+ * of them here we may collide with the utility's includes. It's unreasonable
+ * for utilities to have to include one of them to include err.h, so we get
+ * __va_list from <machine/_types.h> and use it.
+ */
+#include <sys/cdefs.h>
+#include <machine/_types.h>
+
+__BEGIN_DECLS
+
+__noreturn void err(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void verr(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+__noreturn void errx(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void verrx(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void vwarn(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+void warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void vwarnx(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+
+/*
+ * The _* versions are for use in library functions so user-defined
+ * versions of err*,warn* do not get used.
+ */
+__noreturn void _err(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void _verr(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+__noreturn void _errx(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+__noreturn void _verrx(int, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)));
+void _warn(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void _vwarn(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+void _warnx(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
+void _vwarnx(const char *, __va_list)
+ __attribute__((__format__ (printf, 1, 0)));
+
+__END_DECLS
+
+#endif /* !_ERR_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/errno.h b/6/platforms/android-8/arch-x86/usr/include/errno.h
new file mode 120000
index 0000000..2b0a873
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/fcntl.h b/6/platforms/android-8/arch-x86/usr/include/fcntl.h
new file mode 120000
index 0000000..0e7a7a6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/features.h b/6/platforms/android-8/arch-x86/usr/include/features.h
new file mode 120000
index 0000000..b81d381
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/fnmatch.h b/6/platforms/android-8/arch-x86/usr/include/fnmatch.h
new file mode 120000
index 0000000..9aa5396
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/fts.h b/6/platforms/android-8/arch-x86/usr/include/fts.h
new file mode 100644
index 0000000..da26a88
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/fts.h
@@ -0,0 +1,125 @@
+/* $OpenBSD: fts.h,v 1.12 2009/08/27 16:19:27 millert Exp $ */
+/* $NetBSD: fts.h,v 1.5 1994/12/28 01:41:50 mycroft Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)fts.h 8.3 (Berkeley) 8/14/94
+ */
+
+#ifndef _FTS_H_
+#define _FTS_H_
+
+typedef struct {
+ struct _ftsent *fts_cur; /* current node */
+ struct _ftsent *fts_child; /* linked list of children */
+ struct _ftsent **fts_array; /* sort array */
+ dev_t fts_dev; /* starting device # */
+ char *fts_path; /* path for this descent */
+ int fts_rfd; /* fd for root */
+ size_t fts_pathlen; /* sizeof(path) */
+ int fts_nitems; /* elements in the sort array */
+ int (*fts_compar)(); /* compare function */
+
+#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */
+#define FTS_LOGICAL 0x0002 /* logical walk */
+#define FTS_NOCHDIR 0x0004 /* don't change directories */
+#define FTS_NOSTAT 0x0008 /* don't get stat info */
+#define FTS_PHYSICAL 0x0010 /* physical walk */
+#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */
+#define FTS_XDEV 0x0040 /* don't cross devices */
+#define FTS_OPTIONMASK 0x00ff /* valid user option mask */
+
+#define FTS_NAMEONLY 0x1000 /* (private) child names only */
+#define FTS_STOP 0x2000 /* (private) unrecoverable error */
+ int fts_options; /* fts_open options, global flags */
+} FTS;
+
+typedef struct _ftsent {
+ struct _ftsent *fts_cycle; /* cycle node */
+ struct _ftsent *fts_parent; /* parent directory */
+ struct _ftsent *fts_link; /* next file in directory */
+ long fts_number; /* local numeric value */
+ void *fts_pointer; /* local address value */
+ char *fts_accpath; /* access path */
+ char *fts_path; /* root path */
+ int fts_errno; /* errno for this node */
+ int fts_symfd; /* fd for symlink */
+ size_t fts_pathlen; /* strlen(fts_path) */
+ size_t fts_namelen; /* strlen(fts_name) */
+
+ ino_t fts_ino; /* inode */
+ dev_t fts_dev; /* device */
+ nlink_t fts_nlink; /* link count */
+
+#define FTS_ROOTPARENTLEVEL -1
+#define FTS_ROOTLEVEL 0
+#define FTS_MAXLEVEL 0x7fff
+ short fts_level; /* depth (-1 to N) */
+
+#define FTS_D 1 /* preorder directory */
+#define FTS_DC 2 /* directory that causes cycles */
+#define FTS_DEFAULT 3 /* none of the above */
+#define FTS_DNR 4 /* unreadable directory */
+#define FTS_DOT 5 /* dot or dot-dot */
+#define FTS_DP 6 /* postorder directory */
+#define FTS_ERR 7 /* error; errno is set */
+#define FTS_F 8 /* regular file */
+#define FTS_INIT 9 /* initialized only */
+#define FTS_NS 10 /* stat(2) failed */
+#define FTS_NSOK 11 /* no stat(2) requested */
+#define FTS_SL 12 /* symbolic link */
+#define FTS_SLNONE 13 /* symbolic link without target */
+ unsigned short fts_info; /* user flags for FTSENT structure */
+
+#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
+#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
+ unsigned short fts_flags; /* private flags for FTSENT structure */
+
+#define FTS_AGAIN 1 /* read node again */
+#define FTS_FOLLOW 2 /* follow symbolic link */
+#define FTS_NOINSTR 3 /* no instructions */
+#define FTS_SKIP 4 /* discard node */
+ unsigned short fts_instr; /* fts_set() instructions */
+
+ struct stat *fts_statp; /* stat(2) information */
+ char fts_name[1]; /* file name */
+} FTSENT;
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+FTSENT *fts_children(FTS *, int);
+int fts_close(FTS *);
+FTS *fts_open(char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **));
+FTSENT *fts_read(FTS *);
+int fts_set(FTS *, FTSENT *, int);
+__END_DECLS
+
+#endif /* !_FTS_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/getopt.h b/6/platforms/android-8/arch-x86/usr/include/getopt.h
new file mode 120000
index 0000000..91fd45a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/grp.h b/6/platforms/android-8/arch-x86/usr/include/grp.h
new file mode 120000
index 0000000..1b76cb2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/inttypes.h b/6/platforms/android-8/arch-x86/usr/include/inttypes.h
new file mode 120000
index 0000000..711aa3b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/jni.h b/6/platforms/android-8/arch-x86/usr/include/jni.h
new file mode 120000
index 0000000..02aba0e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/lastlog.h b/6/platforms/android-8/arch-x86/usr/include/lastlog.h
new file mode 120000
index 0000000..953248b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/libgen.h b/6/platforms/android-8/arch-x86/usr/include/libgen.h
new file mode 120000
index 0000000..f1734c0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/limits.h b/6/platforms/android-8/arch-x86/usr/include/limits.h
new file mode 120000
index 0000000..4362786
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/a.out.h b/6/platforms/android-8/arch-x86/usr/include/linux/a.out.h
new file mode 120000
index 0000000..bd7d421
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/aio_abi.h b/6/platforms/android-8/arch-x86/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..e731d0e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/akm8976.h b/6/platforms/android-8/arch-x86/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..84a7f93
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/android_alarm.h b/6/platforms/android-8/arch-x86/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..3ffadb3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/android_pmem.h b/6/platforms/android-8/arch-x86/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..e2d8cdc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/android_power.h b/6/platforms/android-8/arch-x86/usr/include/linux/android_power.h
new file mode 120000
index 0000000..b377e3e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/apm_bios.h b/6/platforms/android-8/arch-x86/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..09ea852
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ashmem.h b/6/platforms/android-8/arch-x86/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..290505f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ata.h b/6/platforms/android-8/arch-x86/usr/include/linux/ata.h
new file mode 120000
index 0000000..8daa9c5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atm.h b/6/platforms/android-8/arch-x86/usr/include/linux/atm.h
new file mode 120000
index 0000000..adc0ca0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atmapi.h b/6/platforms/android-8/arch-x86/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..9a48c01
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atmdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..fee4ed3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atmioc.h b/6/platforms/android-8/arch-x86/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..e5f0da2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atmppp.h b/6/platforms/android-8/arch-x86/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..7839ff0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/atmsap.h b/6/platforms/android-8/arch-x86/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..0d3ea2a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/attribute_container.h b/6/platforms/android-8/arch-x86/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..4c885d4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/auto_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..14d4361
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/autoconf.h b/6/platforms/android-8/arch-x86/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..0551861
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/auxvec.h b/6/platforms/android-8/arch-x86/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..48336de
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/backing-dev.h b/6/platforms/android-8/arch-x86/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..8efef88
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/binder.h b/6/platforms/android-8/arch-x86/usr/include/linux/binder.h
new file mode 120000
index 0000000..decfdaf
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/binfmts.h b/6/platforms/android-8/arch-x86/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..5350ca2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/bio.h b/6/platforms/android-8/arch-x86/usr/include/linux/bio.h
new file mode 120000
index 0000000..9a44c77
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/bitmap.h b/6/platforms/android-8/arch-x86/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..72af20f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/bitops.h b/6/platforms/android-8/arch-x86/usr/include/linux/bitops.h
new file mode 120000
index 0000000..caca1a2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/blkdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..b50be2a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/blkpg.h b/6/platforms/android-8/arch-x86/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..9a76370
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/blockgroup_lock.h b/6/platforms/android-8/arch-x86/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..3b158a3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..ed41a1b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/generic.h b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..8cd86f7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..5d887b2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swab.h b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..5a5d59d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swabb.h b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..db60e12
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/cache.h b/6/platforms/android-8/arch-x86/usr/include/linux/cache.h
new file mode 120000
index 0000000..4239e8f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/calc64.h b/6/platforms/android-8/arch-x86/usr/include/linux/calc64.h
new file mode 120000
index 0000000..f9ebe45
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/capability.h b/6/platforms/android-8/arch-x86/usr/include/linux/capability.h
new file mode 120000
index 0000000..e53ae32
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/capi.h b/6/platforms/android-8/arch-x86/usr/include/linux/capi.h
new file mode 120000
index 0000000..fe83278
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/cdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/cdev.h
new file mode 120000
index 0000000..0933806
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/cdrom.h b/6/platforms/android-8/arch-x86/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..46462fb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/circ_buf.h b/6/platforms/android-8/arch-x86/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..ec4c97d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/clk.h b/6/platforms/android-8/arch-x86/usr/include/linux/clk.h
new file mode 120000
index 0000000..8e359f3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/coda.h b/6/platforms/android-8/arch-x86/usr/include/linux/coda.h
new file mode 120000
index 0000000..bc1825e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/coda_fs_i.h b/6/platforms/android-8/arch-x86/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..1ce2de0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/compat.h b/6/platforms/android-8/arch-x86/usr/include/linux/compat.h
new file mode 120000
index 0000000..c4a23b7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/compiler-gcc.h b/6/platforms/android-8/arch-x86/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..1fcf74a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/compiler.h b/6/platforms/android-8/arch-x86/usr/include/linux/compiler.h
new file mode 120000
index 0000000..7927d97
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/completion.h b/6/platforms/android-8/arch-x86/usr/include/linux/completion.h
new file mode 120000
index 0000000..5e25472
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/config.h b/6/platforms/android-8/arch-x86/usr/include/linux/config.h
new file mode 120000
index 0000000..a977457
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/console_struct.h b/6/platforms/android-8/arch-x86/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..ad340d1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/cpu.h b/6/platforms/android-8/arch-x86/usr/include/linux/cpu.h
new file mode 120000
index 0000000..b3cc050
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/cpumask.h b/6/platforms/android-8/arch-x86/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..7903b76
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ctype.h b/6/platforms/android-8/arch-x86/usr/include/linux/ctype.h
new file mode 120000
index 0000000..755049a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/dccp.h b/6/platforms/android-8/arch-x86/usr/include/linux/dccp.h
new file mode 120000
index 0000000..7a81bd5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/debug_locks.h b/6/platforms/android-8/arch-x86/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..667cfa9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/delay.h b/6/platforms/android-8/arch-x86/usr/include/linux/delay.h
new file mode 120000
index 0000000..b5a397c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/device.h b/6/platforms/android-8/arch-x86/usr/include/linux/device.h
new file mode 120000
index 0000000..d69f2dc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/dirent.h b/6/platforms/android-8/arch-x86/usr/include/linux/dirent.h
new file mode 120000
index 0000000..f7d8424
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/dm-ioctl.h b/6/platforms/android-8/arch-x86/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..d044b7a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/dma-mapping.h b/6/platforms/android-8/arch-x86/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..ca53d3f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/dmaengine.h b/6/platforms/android-8/arch-x86/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..f0ca4a4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/efs_dir.h b/6/platforms/android-8/arch-x86/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..a648a67
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_i.h b/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..0b1a8f6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_sb.h b/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..f211660
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/elevator.h b/6/platforms/android-8/arch-x86/usr/include/linux/elevator.h
new file mode 120000
index 0000000..9efbda4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/elf-em.h b/6/platforms/android-8/arch-x86/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..e3598ef
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/elf.h b/6/platforms/android-8/arch-x86/usr/include/linux/elf.h
new file mode 120000
index 0000000..1873f9d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/err.h b/6/platforms/android-8/arch-x86/usr/include/linux/err.h
new file mode 120000
index 0000000..6ec4103
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/errno.h b/6/platforms/android-8/arch-x86/usr/include/linux/errno.h
new file mode 120000
index 0000000..219c0be
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/errqueue.h b/6/platforms/android-8/arch-x86/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..7a77001
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/etherdevice.h b/6/platforms/android-8/arch-x86/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..c7b382c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ext2_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..34e9f92
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ext3_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..26c35e8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/fadvise.h b/6/platforms/android-8/arch-x86/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..02a4dd6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/fb.h b/6/platforms/android-8/arch-x86/usr/include/linux/fb.h
new file mode 120000
index 0000000..69766f9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/fcntl.h b/6/platforms/android-8/arch-x86/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..dea867e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/fd.h b/6/platforms/android-8/arch-x86/usr/include/linux/fd.h
new file mode 120000
index 0000000..3d80fd6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/file.h b/6/platforms/android-8/arch-x86/usr/include/linux/file.h
new file mode 120000
index 0000000..bb6bd81
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/filter.h b/6/platforms/android-8/arch-x86/usr/include/linux/filter.h
new file mode 120000
index 0000000..ca1f941
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/fs.h
new file mode 120000
index 0000000..4471087
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ftape.h b/6/platforms/android-8/arch-x86/usr/include/linux/ftape.h
new file mode 120000
index 0000000..44b1160
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/futex.h b/6/platforms/android-8/arch-x86/usr/include/linux/futex.h
new file mode 120000
index 0000000..f487d52
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/genhd.h b/6/platforms/android-8/arch-x86/usr/include/linux/genhd.h
new file mode 120000
index 0000000..206cd26
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/gfp.h b/6/platforms/android-8/arch-x86/usr/include/linux/gfp.h
new file mode 120000
index 0000000..91deaa7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/hardirq.h b/6/platforms/android-8/arch-x86/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..30edb85
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-8/arch-x86/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..3298fc8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/hdreg.h b/6/platforms/android-8/arch-x86/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..5e0c450
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/hdsmart.h b/6/platforms/android-8/arch-x86/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..0ad2e48
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/highmem.h b/6/platforms/android-8/arch-x86/usr/include/linux/highmem.h
new file mode 120000
index 0000000..8321d4b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/hil.h b/6/platforms/android-8/arch-x86/usr/include/linux/hil.h
new file mode 120000
index 0000000..23889e2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/i2c.h b/6/platforms/android-8/arch-x86/usr/include/linux/i2c.h
new file mode 120000
index 0000000..c60e488
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/icmp.h b/6/platforms/android-8/arch-x86/usr/include/linux/icmp.h
new file mode 120000
index 0000000..5f7169c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if.h b/6/platforms/android-8/arch-x86/usr/include/linux/if.h
new file mode 120000
index 0000000..1c58ea2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_arcnet.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..01f50e6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_arp.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..0f195e7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_bridge.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..4035cae
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_ether.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..1cd2cfa
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_fc.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..ad18b25
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_fddi.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..644de7d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_hippi.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..457c44c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_packet.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..b4fa5f9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_ppp.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..586a85d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_tr.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..d4670da
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_tun.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..4a32972
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/if_vlan.h b/6/platforms/android-8/arch-x86/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..ecd9c25
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/in.h b/6/platforms/android-8/arch-x86/usr/include/linux/in.h
new file mode 120000
index 0000000..a37131b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/in6.h b/6/platforms/android-8/arch-x86/usr/include/linux/in6.h
new file mode 120000
index 0000000..b57d471
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/init.h b/6/platforms/android-8/arch-x86/usr/include/linux/init.h
new file mode 120000
index 0000000..fb10661
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/inotify.h b/6/platforms/android-8/arch-x86/usr/include/linux/inotify.h
new file mode 120000
index 0000000..98add12
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/input.h b/6/platforms/android-8/arch-x86/usr/include/linux/input.h
new file mode 120000
index 0000000..7d51d42
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/interrupt.h b/6/platforms/android-8/arch-x86/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..09df739
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ioctl.h b/6/platforms/android-8/arch-x86/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..7182c99
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ioport.h b/6/platforms/android-8/arch-x86/usr/include/linux/ioport.h
new file mode 120000
index 0000000..234ce20
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ioprio.h b/6/platforms/android-8/arch-x86/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..f6752ad
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ip.h b/6/platforms/android-8/arch-x86/usr/include/linux/ip.h
new file mode 120000
index 0000000..301c85b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ipc.h b/6/platforms/android-8/arch-x86/usr/include/linux/ipc.h
new file mode 120000
index 0000000..133ade9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..3982f18
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_smi.h b/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..433f876
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ipx.h b/6/platforms/android-8/arch-x86/usr/include/linux/ipx.h
new file mode 120000
index 0000000..b614409
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/irq.h b/6/platforms/android-8/arch-x86/usr/include/linux/irq.h
new file mode 120000
index 0000000..79caa99
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/irq_cpustat.h b/6/platforms/android-8/arch-x86/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..54a0898
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/irqflags.h b/6/platforms/android-8/arch-x86/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..8d1e20a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/irqreturn.h b/6/platforms/android-8/arch-x86/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..3d7e630
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/jbd.h b/6/platforms/android-8/arch-x86/usr/include/linux/jbd.h
new file mode 120000
index 0000000..9d8c6f0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/jiffies.h b/6/platforms/android-8/arch-x86/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..c23b63c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kd.h b/6/platforms/android-8/arch-x86/usr/include/linux/kd.h
new file mode 120000
index 0000000..afeb1f1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kdev_t.h b/6/platforms/android-8/arch-x86/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..1c45021
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kernel.h b/6/platforms/android-8/arch-x86/usr/include/linux/kernel.h
new file mode 120000
index 0000000..ef1b995
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kernel_stat.h b/6/platforms/android-8/arch-x86/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..bd37ae2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kernelcapi.h b/6/platforms/android-8/arch-x86/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..463332b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kexec.h b/6/platforms/android-8/arch-x86/usr/include/linux/kexec.h
new file mode 120000
index 0000000..dd82195
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/key.h b/6/platforms/android-8/arch-x86/usr/include/linux/key.h
new file mode 120000
index 0000000..b37412b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/keyboard.h b/6/platforms/android-8/arch-x86/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..760c85e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/keychord.h b/6/platforms/android-8/arch-x86/usr/include/linux/keychord.h
new file mode 120000
index 0000000..51d093e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/klist.h b/6/platforms/android-8/arch-x86/usr/include/linux/klist.h
new file mode 120000
index 0000000..d37c5a5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kmod.h b/6/platforms/android-8/arch-x86/usr/include/linux/kmod.h
new file mode 120000
index 0000000..6c7b8de
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kobject.h b/6/platforms/android-8/arch-x86/usr/include/linux/kobject.h
new file mode 120000
index 0000000..f5ce0f3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/kref.h b/6/platforms/android-8/arch-x86/usr/include/linux/kref.h
new file mode 120000
index 0000000..3b7e0b7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ktime.h b/6/platforms/android-8/arch-x86/usr/include/linux/ktime.h
new file mode 120000
index 0000000..8a78587
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/limits.h b/6/platforms/android-8/arch-x86/usr/include/linux/limits.h
new file mode 120000
index 0000000..46480a9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/linkage.h b/6/platforms/android-8/arch-x86/usr/include/linux/linkage.h
new file mode 120000
index 0000000..47a0e07
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/list.h b/6/platforms/android-8/arch-x86/usr/include/linux/list.h
new file mode 120000
index 0000000..9989dc4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/lockd/nlm.h b/6/platforms/android-8/arch-x86/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..1b5a467
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/lockd/xdr.h b/6/platforms/android-8/arch-x86/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..9ebb549
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/lockdep.h b/6/platforms/android-8/arch-x86/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..8e8888f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/loop.h b/6/platforms/android-8/arch-x86/usr/include/linux/loop.h
new file mode 120000
index 0000000..78655cd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/magic.h b/6/platforms/android-8/arch-x86/usr/include/linux/magic.h
new file mode 120000
index 0000000..973b1b4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/major.h b/6/platforms/android-8/arch-x86/usr/include/linux/major.h
new file mode 120000
index 0000000..f543eb6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mc146818rtc.h b/6/platforms/android-8/arch-x86/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..d24ec2c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mca.h b/6/platforms/android-8/arch-x86/usr/include/linux/mca.h
new file mode 120000
index 0000000..7e5ce8d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mempolicy.h b/6/platforms/android-8/arch-x86/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..f2e60ed
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mempool.h b/6/platforms/android-8/arch-x86/usr/include/linux/mempool.h
new file mode 120000
index 0000000..b3fc682
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/miscdevice.h b/6/platforms/android-8/arch-x86/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..8644e2b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mm.h b/6/platforms/android-8/arch-x86/usr/include/linux/mm.h
new file mode 120000
index 0000000..e969f1a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mmc/card.h b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..d0d873b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mmc/host.h b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..c569649
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mmc/mmc.h b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..bbc2917
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mmzone.h b/6/platforms/android-8/arch-x86/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..84ea47b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mod_devicetable.h b/6/platforms/android-8/arch-x86/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..25cd7aa
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/module.h b/6/platforms/android-8/arch-x86/usr/include/linux/module.h
new file mode 120000
index 0000000..8b38017
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/moduleparam.h b/6/platforms/android-8/arch-x86/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..b377675
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mount.h b/6/platforms/android-8/arch-x86/usr/include/linux/mount.h
new file mode 120000
index 0000000..00638ff
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/msdos_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..31b596e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/msg.h b/6/platforms/android-8/arch-x86/usr/include/linux/msg.h
new file mode 120000
index 0000000..90e94bf
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/msm_adsp.h b/6/platforms/android-8/arch-x86/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..a20d0d4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/msm_audio.h b/6/platforms/android-8/arch-x86/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..25918ee
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/msm_mdp.h b/6/platforms/android-8/arch-x86/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..153a300
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mt9t013.h b/6/platforms/android-8/arch-x86/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..45a5bb7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/bbm.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..31ea234
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/blktrans.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..025dd74
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..dd7abe8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..7fb608c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/compatmac.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..02685ec
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/flashchip.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..f19e73d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/map.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..60f2110
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/mtd.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..5a5b438
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..303cf73
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..05c5a61
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nftl.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..1463a4e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..eab1fb5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtd/partitions.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..f3bce94
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mtio.h b/6/platforms/android-8/arch-x86/usr/include/linux/mtio.h
new file mode 120000
index 0000000..0e5d018
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mutex-debug.h b/6/platforms/android-8/arch-x86/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..f25a963
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/mutex.h b/6/platforms/android-8/arch-x86/usr/include/linux/mutex.h
new file mode 120000
index 0000000..15e429b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ncp.h b/6/platforms/android-8/arch-x86/usr/include/linux/ncp.h
new file mode 120000
index 0000000..e76a46a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ncp_mount.h b/6/platforms/android-8/arch-x86/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..bc2fa7f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ncp_no.h b/6/platforms/android-8/arch-x86/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..156f9e0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/net.h b/6/platforms/android-8/arch-x86/usr/include/linux/net.h
new file mode 120000
index 0000000..1518868
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netdevice.h b/6/platforms/android-8/arch-x86/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..0a7f753
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..5efe00c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..9fabc9c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..f3ab24c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..12d4ea1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..f345690
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..0b965ab
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..1f0b33c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..1018e3f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..377e872
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..b04422b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..967b0fa
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..1a9d2a5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..45b2fcc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..b4cc417
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..7270b9c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..b2d74c0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..c2f11da
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..5a88dd4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..dc76121
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..d335b97
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..6f328ca
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..db4be0f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..ece48e6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..86a1010
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..3b20164
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..15143d5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..71b5055
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..fd9eb7e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..af6b923
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..f9432ad
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..44e2adc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..8dd1ee4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..33239f5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..8623f70
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..33b5796
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_bridge.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..d93ff3c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..c3095f5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..694c971
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..d176b41
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..0c0da15
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..ea0971a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..63559a7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..77d7805
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..a63068d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..83f52c7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..7be926b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..f4fe6a3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..86269ab
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..d3e4b9e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..2a57144
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..4df6dd7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..4944146
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..a7791b0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..29aa9da
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..f074746
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..88dbb7b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..6d108e4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..d106507
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..29345c5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..44f5dd7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..da408e9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..bb62e9b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..9d09fc5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..5087962
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..77663a4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..58958b0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..886ba4f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..2128c31
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..1f47397
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..f734951
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..608022c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..a544413
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..030473a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..dd2447f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..4d0e4ae
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..f5bdbb0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..787daf2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..7054d43
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..12fe91c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..0a58c8f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..8f42587
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..20aec06
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..c91ceba
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..8d2cdc5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..3920f82
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..5e0e406
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..489d401
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..fc450c7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/netlink.h b/6/platforms/android-8/arch-x86/usr/include/linux/netlink.h
new file mode 120000
index 0000000..5d1c796
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfs.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfs.h
new file mode 120000
index 0000000..30881bc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfs2.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..ca3cf6e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfs3.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..dfdc99c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfs4.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..32f9b9b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfs_xdr.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..ffbd59e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsacl.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..800d712
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/auth.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..2ae71ad
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/const.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..23902a5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/debug.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..ea7d0ea
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/export.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..fa13ad2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/interface.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..9a8fd16
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..86d48cf
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/stats.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..85ab9f3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/xdr.h b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..6c514a0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/node.h b/6/platforms/android-8/arch-x86/usr/include/linux/node.h
new file mode 120000
index 0000000..6c7edad
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nodemask.h b/6/platforms/android-8/arch-x86/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..09e0e00
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/notifier.h b/6/platforms/android-8/arch-x86/usr/include/linux/notifier.h
new file mode 120000
index 0000000..8e06a56
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/numa.h b/6/platforms/android-8/arch-x86/usr/include/linux/numa.h
new file mode 120000
index 0000000..9c545e1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/nvram.h b/6/platforms/android-8/arch-x86/usr/include/linux/nvram.h
new file mode 120000
index 0000000..8c02548
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/omap_csmi.h b/6/platforms/android-8/arch-x86/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..10ac0e1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pagemap.h b/6/platforms/android-8/arch-x86/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..621cfac
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/param.h b/6/platforms/android-8/arch-x86/usr/include/linux/param.h
new file mode 120000
index 0000000..412c9d5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/patchkey.h b/6/platforms/android-8/arch-x86/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..4189d8e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pci.h b/6/platforms/android-8/arch-x86/usr/include/linux/pci.h
new file mode 120000
index 0000000..5d8b294
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pci_ids.h b/6/platforms/android-8/arch-x86/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..d3802a9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pci_regs.h b/6/platforms/android-8/arch-x86/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..9fae0eb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/percpu.h b/6/platforms/android-8/arch-x86/usr/include/linux/percpu.h
new file mode 120000
index 0000000..5431e15
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/percpu_counter.h b/6/platforms/android-8/arch-x86/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..517b2cb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/personality.h b/6/platforms/android-8/arch-x86/usr/include/linux/personality.h
new file mode 120000
index 0000000..996cc28
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pfkeyv2.h b/6/platforms/android-8/arch-x86/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..26bad95
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pkt_cls.h b/6/platforms/android-8/arch-x86/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..90f8b6c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pkt_sched.h b/6/platforms/android-8/arch-x86/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..4b58331
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/platform_device.h b/6/platforms/android-8/arch-x86/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..37b83dd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/plist.h b/6/platforms/android-8/arch-x86/usr/include/linux/plist.h
new file mode 120000
index 0000000..b71e02e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pm.h b/6/platforms/android-8/arch-x86/usr/include/linux/pm.h
new file mode 120000
index 0000000..6351303
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/pnp.h b/6/platforms/android-8/arch-x86/usr/include/linux/pnp.h
new file mode 120000
index 0000000..61f176e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/poll.h b/6/platforms/android-8/arch-x86/usr/include/linux/poll.h
new file mode 120000
index 0000000..899b59b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/posix_acl.h b/6/platforms/android-8/arch-x86/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..251ea81
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/posix_types.h b/6/platforms/android-8/arch-x86/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..12d3357
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ppdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..3385d04
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ppp_defs.h b/6/platforms/android-8/arch-x86/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..ef7a2bd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/prctl.h b/6/platforms/android-8/arch-x86/usr/include/linux/prctl.h
new file mode 120000
index 0000000..be2b343
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/preempt.h b/6/platforms/android-8/arch-x86/usr/include/linux/preempt.h
new file mode 120000
index 0000000..d3027ff
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/proc_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..c112d4e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ptrace.h b/6/platforms/android-8/arch-x86/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..986598a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/qic117.h b/6/platforms/android-8/arch-x86/usr/include/linux/qic117.h
new file mode 120000
index 0000000..9f08eab
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/qnxtypes.h b/6/platforms/android-8/arch-x86/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..ab837e2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/quota.h b/6/platforms/android-8/arch-x86/usr/include/linux/quota.h
new file mode 120000
index 0000000..699c2a5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/raid/md.h b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..1c8ae60
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_k.h b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..8cf6541
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_p.h b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..8e58a87
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_u.h b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..7d5cbd2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/raid/xor.h b/6/platforms/android-8/arch-x86/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..abad568
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/random.h b/6/platforms/android-8/arch-x86/usr/include/linux/random.h
new file mode 120000
index 0000000..e11b9ae
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/rbtree.h b/6/platforms/android-8/arch-x86/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..8034eeb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/rcupdate.h b/6/platforms/android-8/arch-x86/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..4bf62c6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/reboot.h b/6/platforms/android-8/arch-x86/usr/include/linux/reboot.h
new file mode 120000
index 0000000..fbf6baf
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/relay.h b/6/platforms/android-8/arch-x86/usr/include/linux/relay.h
new file mode 120000
index 0000000..7f027f3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/resource.h b/6/platforms/android-8/arch-x86/usr/include/linux/resource.h
new file mode 120000
index 0000000..6b7fdd9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/route.h b/6/platforms/android-8/arch-x86/usr/include/linux/route.h
new file mode 120000
index 0000000..7998704
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/rtc.h b/6/platforms/android-8/arch-x86/usr/include/linux/rtc.h
new file mode 120000
index 0000000..351c414
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/rtnetlink.h b/6/platforms/android-8/arch-x86/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..0bbe9d6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/rwsem.h b/6/platforms/android-8/arch-x86/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..7f0f494
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sched.h b/6/platforms/android-8/arch-x86/usr/include/linux/sched.h
new file mode 120000
index 0000000..6af7636
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sem.h b/6/platforms/android-8/arch-x86/usr/include/linux/sem.h
new file mode 120000
index 0000000..7398b80
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/seq_file.h b/6/platforms/android-8/arch-x86/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..bb89ad0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/seqlock.h b/6/platforms/android-8/arch-x86/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..985264f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/serial_core.h b/6/platforms/android-8/arch-x86/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..e7de4d2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/serial_reg.h b/6/platforms/android-8/arch-x86/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..aa3efec
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/serio.h b/6/platforms/android-8/arch-x86/usr/include/linux/serio.h
new file mode 120000
index 0000000..9f673f5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/shm.h b/6/platforms/android-8/arch-x86/usr/include/linux/shm.h
new file mode 120000
index 0000000..d36030e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/signal.h b/6/platforms/android-8/arch-x86/usr/include/linux/signal.h
new file mode 120000
index 0000000..46bf56f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/skbuff.h b/6/platforms/android-8/arch-x86/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..d628a8a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/slab.h b/6/platforms/android-8/arch-x86/usr/include/linux/slab.h
new file mode 120000
index 0000000..01e3363
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/smb.h b/6/platforms/android-8/arch-x86/usr/include/linux/smb.h
new file mode 120000
index 0000000..1bce5ae
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/smp.h b/6/platforms/android-8/arch-x86/usr/include/linux/smp.h
new file mode 120000
index 0000000..2d5af21
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/smp_lock.h b/6/platforms/android-8/arch-x86/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..2c8edb3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/socket.h b/6/platforms/android-8/arch-x86/usr/include/linux/socket.h
new file mode 120000
index 0000000..fcc8ae5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sockios.h b/6/platforms/android-8/arch-x86/usr/include/linux/sockios.h
new file mode 120000
index 0000000..658594d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/soundcard.h b/6/platforms/android-8/arch-x86/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..59baee5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..0bac429
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..597a12a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_up.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..ef3238a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..67d5aeb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types_up.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..8d80292
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_up.h b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..ca4c738
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/stacktrace.h b/6/platforms/android-8/arch-x86/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..33e3143
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/stat.h b/6/platforms/android-8/arch-x86/usr/include/linux/stat.h
new file mode 120000
index 0000000..947ec16
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/statfs.h b/6/platforms/android-8/arch-x86/usr/include/linux/statfs.h
new file mode 120000
index 0000000..90c59af
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/stddef.h b/6/platforms/android-8/arch-x86/usr/include/linux/stddef.h
new file mode 120000
index 0000000..f03b111
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/string.h b/6/platforms/android-8/arch-x86/usr/include/linux/string.h
new file mode 120000
index 0000000..bd5432f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/stringify.h b/6/platforms/android-8/arch-x86/usr/include/linux/stringify.h
new file mode 120000
index 0000000..aa0ad77
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..6d494d8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..092b349
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..3443065
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/debug.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..ac4648e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..b631a3c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..50114ce
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..d34c3a8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..12e9be0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/sched.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..613203f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/stats.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..139806b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svc.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..3c7b6f6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..6af9d94
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/timer.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..47261c1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/types.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..292acb9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..71b5d24
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..70c0c0a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-5/arch-x86/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/swap.h b/6/platforms/android-8/arch-x86/usr/include/linux/swap.h
new file mode 120000
index 0000000..5c3e412
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sysctl.h b/6/platforms/android-8/arch-x86/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..52c7b48
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sysdev.h b/6/platforms/android-8/arch-x86/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..2bf3d6f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/sysfs.h b/6/platforms/android-8/arch-x86/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..93161cb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/taskstats.h b/6/platforms/android-8/arch-x86/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..2d846e6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/taskstats_kern.h b/6/platforms/android-8/arch-x86/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..cf61f4d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/tcp.h b/6/platforms/android-8/arch-x86/usr/include/linux/tcp.h
new file mode 120000
index 0000000..7e77245
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/telephony.h b/6/platforms/android-8/arch-x86/usr/include/linux/telephony.h
new file mode 120000
index 0000000..4ae796e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/termios.h b/6/platforms/android-8/arch-x86/usr/include/linux/termios.h
new file mode 120000
index 0000000..362f74c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/textsearch.h b/6/platforms/android-8/arch-x86/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..0a7503f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/thread_info.h b/6/platforms/android-8/arch-x86/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..6e0ddb5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/threads.h b/6/platforms/android-8/arch-x86/usr/include/linux/threads.h
new file mode 120000
index 0000000..948ec4f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/time.h b/6/platforms/android-8/arch-x86/usr/include/linux/time.h
new file mode 120000
index 0000000..8f8b9d0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/timer.h b/6/platforms/android-8/arch-x86/usr/include/linux/timer.h
new file mode 120000
index 0000000..112a88d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/times.h b/6/platforms/android-8/arch-x86/usr/include/linux/times.h
new file mode 120000
index 0000000..4562aa8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/timex.h b/6/platforms/android-8/arch-x86/usr/include/linux/timex.h
new file mode 120000
index 0000000..d9007bf
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/tiocl.h b/6/platforms/android-8/arch-x86/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..eb81082
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/transport_class.h b/6/platforms/android-8/arch-x86/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..7c3f90e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/tty.h b/6/platforms/android-8/arch-x86/usr/include/linux/tty.h
new file mode 120000
index 0000000..a8f98f5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/types.h b/6/platforms/android-8/arch-x86/usr/include/linux/types.h
new file mode 120000
index 0000000..42d1d45
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/udp.h b/6/platforms/android-8/arch-x86/usr/include/linux/udp.h
new file mode 120000
index 0000000..e568d1d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_i.h b/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..e060c38
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..f91293d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/uio.h b/6/platforms/android-8/arch-x86/usr/include/linux/uio.h
new file mode 120000
index 0000000..178cdaa
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/un.h b/6/platforms/android-8/arch-x86/usr/include/linux/un.h
new file mode 120000
index 0000000..914fa15
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/unistd.h b/6/platforms/android-8/arch-x86/usr/include/linux/unistd.h
new file mode 120000
index 0000000..5309cb8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/usb.h b/6/platforms/android-8/arch-x86/usr/include/linux/usb.h
new file mode 120000
index 0000000..1daef50
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/usb_ch9.h b/6/platforms/android-8/arch-x86/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..05d9759
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/usbdevice_fs.h b/6/platforms/android-8/arch-x86/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..db4b719
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/user.h b/6/platforms/android-8/arch-x86/usr/include/linux/user.h
new file mode 120000
index 0000000..b16580d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/utime.h b/6/platforms/android-8/arch-x86/usr/include/linux/utime.h
new file mode 120000
index 0000000..1214ff1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/utsname.h b/6/platforms/android-8/arch-x86/usr/include/linux/utsname.h
new file mode 120000
index 0000000..2833a6f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/version.h b/6/platforms/android-8/arch-x86/usr/include/linux/version.h
new file mode 120000
index 0000000..7ca4476
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/vfs.h b/6/platforms/android-8/arch-x86/usr/include/linux/vfs.h
new file mode 120000
index 0000000..851e28d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/videodev.h b/6/platforms/android-8/arch-x86/usr/include/linux/videodev.h
new file mode 120000
index 0000000..2ac67e5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/videodev2.h b/6/platforms/android-8/arch-x86/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..c6fd292
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/vmalloc.h b/6/platforms/android-8/arch-x86/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..ea805c9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/vt.h b/6/platforms/android-8/arch-x86/usr/include/linux/vt.h
new file mode 120000
index 0000000..a8f85aa
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/vt_buffer.h b/6/platforms/android-8/arch-x86/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..fd394f9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/wait.h b/6/platforms/android-8/arch-x86/usr/include/linux/wait.h
new file mode 120000
index 0000000..551a957
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/wanrouter.h b/6/platforms/android-8/arch-x86/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..4f06e44
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/wireless.h b/6/platforms/android-8/arch-x86/usr/include/linux/wireless.h
new file mode 120000
index 0000000..d94d18d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/workqueue.h b/6/platforms/android-8/arch-x86/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..59c08df
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/xattr.h b/6/platforms/android-8/arch-x86/usr/include/linux/xattr.h
new file mode 120000
index 0000000..7c379b8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/zconf.h b/6/platforms/android-8/arch-x86/usr/include/linux/zconf.h
new file mode 120000
index 0000000..729bdcc
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/zlib.h b/6/platforms/android-8/arch-x86/usr/include/linux/zlib.h
new file mode 120000
index 0000000..9b33c4c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/linux/zorro_ids.h b/6/platforms/android-8/arch-x86/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..8b199db
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/locale.h b/6/platforms/android-8/arch-x86/usr/include/locale.h
new file mode 120000
index 0000000..d647b41
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/malloc.h b/6/platforms/android-8/arch-x86/usr/include/malloc.h
new file mode 120000
index 0000000..d0ebc68
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/math.h b/6/platforms/android-8/arch-x86/usr/include/math.h
new file mode 120000
index 0000000..5937146
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/math.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/math.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/memory.h b/6/platforms/android-8/arch-x86/usr/include/memory.h
new file mode 120000
index 0000000..5f1fea0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/mntent.h b/6/platforms/android-8/arch-x86/usr/include/mntent.h
new file mode 120000
index 0000000..16061af
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-abi.h b/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..53c35df
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-user.h b/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..042056c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/ethertypes.h b/6/platforms/android-8/arch-x86/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..98d8bb6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if.h b/6/platforms/android-8/arch-x86/usr/include/net/if.h
new file mode 120000
index 0000000..1beed7a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_arp.h b/6/platforms/android-8/arch-x86/usr/include/net/if_arp.h
new file mode 120000
index 0000000..6c43c41
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_dl.h b/6/platforms/android-8/arch-x86/usr/include/net/if_dl.h
new file mode 120000
index 0000000..407d682
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_ether.h b/6/platforms/android-8/arch-x86/usr/include/net/if_ether.h
new file mode 120000
index 0000000..df4da71
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_ieee1394.h b/6/platforms/android-8/arch-x86/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..6fdcda7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_packet.h b/6/platforms/android-8/arch-x86/usr/include/net/if_packet.h
new file mode 120000
index 0000000..6ac736f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/if_types.h b/6/platforms/android-8/arch-x86/usr/include/net/if_types.h
new file mode 120000
index 0000000..828f54b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/net/route.h b/6/platforms/android-8/arch-x86/usr/include/net/route.h
new file mode 120000
index 0000000..b78f4ca
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netdb.h b/6/platforms/android-8/arch-x86/usr/include/netdb.h
new file mode 120000
index 0000000..3b5a8a7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/ether.h b/6/platforms/android-8/arch-x86/usr/include/netinet/ether.h
new file mode 120000
index 0000000..500f837
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/if_ether.h b/6/platforms/android-8/arch-x86/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..00226f8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/in.h b/6/platforms/android-8/arch-x86/usr/include/netinet/in.h
new file mode 120000
index 0000000..cab5701
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/in6.h b/6/platforms/android-8/arch-x86/usr/include/netinet/in6.h
new file mode 120000
index 0000000..a8588dd
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/in_systm.h b/6/platforms/android-8/arch-x86/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..11f14e8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/ip.h b/6/platforms/android-8/arch-x86/usr/include/netinet/ip.h
new file mode 120000
index 0000000..7a30fab
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/ip_icmp.h b/6/platforms/android-8/arch-x86/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..4412fa8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/tcp.h b/6/platforms/android-8/arch-x86/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..5591786
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netinet/udp.h b/6/platforms/android-8/arch-x86/usr/include/netinet/udp.h
new file mode 120000
index 0000000..37a9f47
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/netpacket/packet.h b/6/platforms/android-8/arch-x86/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..47083de
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/nsswitch.h b/6/platforms/android-8/arch-x86/usr/include/nsswitch.h
new file mode 120000
index 0000000..5d78b1c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/pathconf.h b/6/platforms/android-8/arch-x86/usr/include/pathconf.h
new file mode 120000
index 0000000..5be5cb5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/paths.h b/6/platforms/android-8/arch-x86/usr/include/paths.h
new file mode 120000
index 0000000..d8c1911
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/poll.h b/6/platforms/android-8/arch-x86/usr/include/poll.h
new file mode 120000
index 0000000..3b3a5d7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/pthread.h b/6/platforms/android-8/arch-x86/usr/include/pthread.h
new file mode 100644
index 0000000..eb2d169
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/pthread.h
@@ -0,0 +1,275 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+
+int pthread_condattr_init(pthread_condattr_t *attr);
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared);
+int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared);
+int pthread_condattr_destroy(pthread_condattr_t *attr);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-8/arch-x86/usr/include/pwd.h b/6/platforms/android-8/arch-x86/usr/include/pwd.h
new file mode 120000
index 0000000..353e1f0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/regex.h b/6/platforms/android-8/arch-x86/usr/include/regex.h
new file mode 100644
index 0000000..aec38e3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/regex.h
@@ -0,0 +1,105 @@
+/* $OpenBSD: regex.h,v 1.6 2003/06/02 19:34:12 millert Exp $ */
+/* $NetBSD: regex.h,v 1.4.6.1 1996/06/10 18:57:07 explorer Exp $ */
+
+/*-
+ * Copyright (c) 1992 Henry Spencer.
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer of the University of Toronto.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)regex.h 8.1 (Berkeley) 6/2/93
+ */
+
+#ifndef _REGEX_H_
+#define _REGEX_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+/* types */
+typedef off_t regoff_t;
+
+typedef struct {
+ int re_magic;
+ size_t re_nsub; /* number of parenthesized subexpressions */
+ const char *re_endp; /* end pointer for REG_PEND */
+ struct re_guts *re_g; /* none of your business :-) */
+} regex_t;
+
+typedef struct {
+ regoff_t rm_so; /* start of match */
+ regoff_t rm_eo; /* end of match */
+} regmatch_t;
+
+/* regcomp() flags */
+#define REG_BASIC 0000
+#define REG_EXTENDED 0001
+#define REG_ICASE 0002
+#define REG_NOSUB 0004
+#define REG_NEWLINE 0010
+#define REG_NOSPEC 0020
+#define REG_PEND 0040
+#define REG_DUMP 0200
+
+/* regerror() flags */
+#define REG_NOMATCH 1
+#define REG_BADPAT 2
+#define REG_ECOLLATE 3
+#define REG_ECTYPE 4
+#define REG_EESCAPE 5
+#define REG_ESUBREG 6
+#define REG_EBRACK 7
+#define REG_EPAREN 8
+#define REG_EBRACE 9
+#define REG_BADBR 10
+#define REG_ERANGE 11
+#define REG_ESPACE 12
+#define REG_BADRPT 13
+#define REG_EMPTY 14
+#define REG_ASSERT 15
+#define REG_INVARG 16
+#define REG_ATOI 255 /* convert name to number (!) */
+#define REG_ITOA 0400 /* convert number to name (!) */
+
+/* regexec() flags */
+#define REG_NOTBOL 00001
+#define REG_NOTEOL 00002
+#define REG_STARTEND 00004
+#define REG_TRACE 00400 /* tracing of execution */
+#define REG_LARGE 01000 /* force large representation */
+#define REG_BACKR 02000 /* force use of backref code */
+
+__BEGIN_DECLS
+int regcomp(regex_t *, const char *, int);
+size_t regerror(int, const regex_t *, char *, size_t);
+int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
+void regfree(regex_t *);
+__END_DECLS
+
+#endif /* !_REGEX_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/resolv.h b/6/platforms/android-8/arch-x86/usr/include/resolv.h
new file mode 120000
index 0000000..5acc4c2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sched.h b/6/platforms/android-8/arch-x86/usr/include/sched.h
new file mode 100644
index 0000000..2dba5b1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sched.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#ifdef _GNU_SOURCE
+extern int clone(int (*fn)(void*), void *child_stack, int flags, void *arg);
+#endif
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/semaphore.h b/6/platforms/android-8/arch-x86/usr/include/semaphore.h
new file mode 120000
index 0000000..8593204
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/setjmp.h b/6/platforms/android-8/arch-x86/usr/include/setjmp.h
new file mode 120000
index 0000000..18373b6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sgtty.h b/6/platforms/android-8/arch-x86/usr/include/sgtty.h
new file mode 120000
index 0000000..1bc7757
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sha1.h b/6/platforms/android-8/arch-x86/usr/include/sha1.h
new file mode 120000
index 0000000..1e9a668
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/signal.h b/6/platforms/android-8/arch-x86/usr/include/signal.h
new file mode 100644
index 0000000..4401164
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/signal.h
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SIGNAL_H_
+#define _SIGNAL_H_
+
+#include <sys/cdefs.h>
+#include <limits.h> /* For LONG_BIT */
+#include <string.h> /* For memset() */
+#include <sys/types.h>
+#include <asm/signal.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+typedef int sig_atomic_t;
+
+/* crepy NIG / _NSIG handling, just to be safe */
+#ifndef NSIG
+# define NSIG _NSIG
+#endif
+#ifndef _NSIG
+# define _NSIG NSIG
+#endif
+
+extern const char * const sys_siglist[];
+extern const char * const sys_signame[];
+
+static __inline__ int sigismember(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ return (int)((local_set[signum/LONG_BIT] >> (signum%LONG_BIT)) & 1);
+}
+
+
+static __inline__ int sigaddset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] |= 1UL << (signum%LONG_BIT);
+ return 0;
+}
+
+
+static __inline__ int sigdelset(sigset_t *set, int signum)
+{
+ unsigned long *local_set = (unsigned long *)set;
+ signum--;
+ local_set[signum/LONG_BIT] &= ~(1UL << (signum%LONG_BIT));
+ return 0;
+}
+
+
+static __inline__ int sigemptyset(sigset_t *set)
+{
+ memset(set, 0, sizeof *set);
+ return 0;
+}
+
+static __inline__ int sigfillset(sigset_t *set)
+{
+ memset(set, ~0, sizeof *set);
+ return 0;
+}
+
+
+/* compatibility types */
+typedef void (*sig_t)(int);
+typedef sig_t sighandler_t;
+
+/* differentiater between sysv and bsd behaviour 8*/
+extern __sighandler_t sysv_signal(int, __sighandler_t);
+extern __sighandler_t bsd_signal(int, __sighandler_t);
+
+/* the default is bsd */
+static __inline__ __sighandler_t signal(int s, __sighandler_t f)
+{
+ return bsd_signal(s,f);
+}
+
+/* the syscall itself */
+extern __sighandler_t __signal(int, __sighandler_t, int);
+
+extern int sigprocmask(int, const sigset_t *, sigset_t *);
+extern int sigaction(int, const struct sigaction *, struct sigaction *);
+
+extern int sigpending(sigset_t *);
+extern int sigsuspend(const sigset_t *);
+extern int sigwait(const sigset_t *set, int *sig);
+extern int siginterrupt(int sig, int flag);
+
+extern int raise(int);
+extern int kill(pid_t, int);
+extern int killpg(int pgrp, int sig);
+extern int sigaltstack(const stack_t *ss, stack_t *oss);
+
+
+__END_DECLS
+
+#endif /* _SIGNAL_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/stdint.h b/6/platforms/android-8/arch-x86/usr/include/stdint.h
new file mode 120000
index 0000000..0cb9105
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/stdio.h b/6/platforms/android-8/arch-x86/usr/include/stdio.h
new file mode 100644
index 0000000..c38ed5a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/stdio.h
@@ -0,0 +1,453 @@
+/* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */
+/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)stdio.h 5.17 (Berkeley) 6/3/91
+ */
+
+#ifndef _STDIO_H_
+#define _STDIO_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/* va_list and size_t must be defined by stdio.h according to Posix */
+#define __need___va_list
+#include <stdarg.h>
+
+/* note that this forces stddef.h to *only* define size_t */
+#define __need_size_t
+#include <stddef.h>
+
+#include <stddef.h>
+
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#include <sys/types.h> /* XXX should be removed */
+#endif
+
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned long size_t;
+#endif
+
+#ifndef _OFF_T_DEFINED_
+#define _OFF_T_DEFINED_
+typedef long off_t;
+#endif
+
+#ifndef NULL
+#ifdef __GNUG__
+#define NULL __null
+#else
+#define NULL 0L
+#endif
+#endif
+
+#define _FSTDIO /* Define for new stdio with functions. */
+
+typedef off_t fpos_t; /* stdio file position type */
+
+/*
+ * NB: to fit things in six character monocase externals, the stdio
+ * code uses the prefix `__s' for stdio objects, typically followed
+ * by a three-character attempt at a mnemonic.
+ */
+
+/* stdio buffers */
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+
+/*
+ * stdio state variables.
+ *
+ * The following always hold:
+ *
+ * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
+ * _lbfsize is -_bf._size, else _lbfsize is 0
+ * if _flags&__SRD, _w is 0
+ * if _flags&__SWR, _r is 0
+ *
+ * This ensures that the getc and putc macros (or inline functions) never
+ * try to write or read from a file that is in `read' or `write' mode.
+ * (Moreover, they can, and do, automatically switch from read mode to
+ * write mode, and back, on "r+" and "w+" files.)
+ *
+ * _lbfsize is used only to make the inline line-buffered output stream
+ * code as compact as possible.
+ *
+ * _ub, _up, and _ur are used when ungetc() pushes back more characters
+ * than fit in the current _bf, or when ungetc() pushes back a character
+ * that does not match the previous one in _bf. When this happens,
+ * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
+ * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
+ *
+ * NOTE: if you change this structure, you also need to update the
+ * std() initializer in findfp.c.
+ */
+typedef struct __sFILE {
+ unsigned char *_p; /* current position in (some) buffer */
+ int _r; /* read space left for getc() */
+ int _w; /* write space left for putc() */
+ short _flags; /* flags, below; this FILE is free if 0 */
+ short _file; /* fileno, if Unix descriptor, else -1 */
+ struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
+ int _lbfsize; /* 0 or -_bf._size, for inline putc */
+
+ /* operations */
+ void *_cookie; /* cookie passed to io functions */
+ int (*_close)(void *);
+ int (*_read)(void *, char *, int);
+ fpos_t (*_seek)(void *, fpos_t, int);
+ int (*_write)(void *, const char *, int);
+
+ /* extension data, to avoid further ABI breakage */
+ struct __sbuf _ext;
+ /* data for long sequences of ungetc() */
+ unsigned char *_up; /* saved _p when _p is doing ungetc data */
+ int _ur; /* saved _r when _r is counting ungetc data */
+
+ /* tricks to meet minimum requirements even when malloc() fails */
+ unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
+ unsigned char _nbuf[1]; /* guarantee a getc() buffer */
+
+ /* separate buffer for fgetln() when line crosses buffer boundary */
+ struct __sbuf _lb; /* buffer for fgetln() */
+
+ /* Unix stdio files get aligned to block boundaries on fseek() */
+ int _blksize; /* stat.st_blksize (may be != _bf._size) */
+ fpos_t _offset; /* current lseek offset */
+} FILE;
+
+__BEGIN_DECLS
+extern FILE __sF[];
+__END_DECLS
+
+#define __SLBF 0x0001 /* line buffered */
+#define __SNBF 0x0002 /* unbuffered */
+#define __SRD 0x0004 /* OK to read */
+#define __SWR 0x0008 /* OK to write */
+ /* RD and WR are never simultaneously asserted */
+#define __SRW 0x0010 /* open for reading & writing */
+#define __SEOF 0x0020 /* found EOF */
+#define __SERR 0x0040 /* found error */
+#define __SMBF 0x0080 /* _buf is from malloc */
+#define __SAPP 0x0100 /* fdopen()ed in append mode */
+#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
+#define __SOPT 0x0400 /* do fseek() optimisation */
+#define __SNPT 0x0800 /* do not do fseek() optimisation */
+#define __SOFF 0x1000 /* set iff _offset is in fact correct */
+#define __SMOD 0x2000 /* true => fgetln modified _p text */
+#define __SALC 0x4000 /* allocate string space dynamically */
+
+/*
+ * The following three definitions are for ANSI C, which took them
+ * from System V, which brilliantly took internal interface macros and
+ * made them official arguments to setvbuf(), without renaming them.
+ * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
+ *
+ * Although numbered as their counterparts above, the implementation
+ * does not rely on this.
+ */
+#define _IOFBF 0 /* setvbuf should set fully buffered */
+#define _IOLBF 1 /* setvbuf should set line buffered */
+#define _IONBF 2 /* setvbuf should set unbuffered */
+
+#define BUFSIZ 1024 /* size of buffer used by setbuf */
+
+#define EOF (-1)
+
+/*
+ * FOPEN_MAX is a minimum maximum, and should be the number of descriptors
+ * that the kernel can provide without allocation of a resource that can
+ * fail without the process sleeping. Do not use this for anything.
+ */
+#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
+#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
+
+/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
+#if __BSD_VISIBLE || __XPG_VISIBLE
+#define P_tmpdir "/tmp/"
+#endif
+#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
+#define TMP_MAX 308915776
+
+#ifndef SEEK_SET
+#define SEEK_SET 0 /* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1 /* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2 /* set file offset to EOF plus offset */
+#endif
+
+#define stdin (&__sF[0])
+#define stdout (&__sF[1])
+#define stderr (&__sF[2])
+
+/*
+ * Functions defined in ANSI C standard.
+ */
+__BEGIN_DECLS
+void clearerr(FILE *);
+int fclose(FILE *);
+int feof(FILE *);
+int ferror(FILE *);
+int fflush(FILE *);
+int fgetc(FILE *);
+int fgetpos(FILE *, fpos_t *);
+char *fgets(char *, int, FILE *);
+FILE *fopen(const char *, const char *);
+int fprintf(FILE *, const char *, ...);
+int fputc(int, FILE *);
+int fputs(const char *, FILE *);
+size_t fread(void *, size_t, size_t, FILE *);
+FILE *freopen(const char *, const char *, FILE *);
+int fscanf(FILE *, const char *, ...);
+int fseek(FILE *, long, int);
+int fseeko(FILE *, off_t, int);
+int fsetpos(FILE *, const fpos_t *);
+long ftell(FILE *);
+off_t ftello(FILE *);
+size_t fwrite(const void *, size_t, size_t, FILE *);
+int getc(FILE *);
+int getchar(void);
+char *gets(char *);
+#if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
+#define __SYS_ERRLIST
+
+extern int sys_nerr; /* perror(3) external variables */
+extern char *sys_errlist[];
+#endif
+void perror(const char *);
+int printf(const char *, ...);
+int putc(int, FILE *);
+int putchar(int);
+int puts(const char *);
+int remove(const char *);
+int rename(const char *, const char *);
+void rewind(FILE *);
+int scanf(const char *, ...);
+void setbuf(FILE *, char *);
+int setvbuf(FILE *, char *, int, size_t);
+int sprintf(char *, const char *, ...);
+int sscanf(const char *, const char *, ...);
+FILE *tmpfile(void);
+char *tmpnam(char *);
+int ungetc(int, FILE *);
+int vfprintf(FILE *, const char *, __va_list);
+int vprintf(const char *, __va_list);
+int vsprintf(char *, const char *, __va_list);
+
+#if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
+int snprintf(char *, size_t, const char *, ...)
+ __attribute__((__format__ (printf, 3, 4)))
+ __attribute__((__nonnull__ (3)));
+int vfscanf(FILE *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+int vscanf(const char *, __va_list)
+ __attribute__((__format__ (scanf, 1, 0)))
+ __attribute__((__nonnull__ (1)));
+int vsnprintf(char *, size_t, const char *, __va_list)
+ __attribute__((__format__ (printf, 3, 0)))
+ __attribute__((__nonnull__ (3)));
+int vsscanf(const char *, const char *, __va_list)
+ __attribute__((__format__ (scanf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+#endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
+
+__END_DECLS
+
+
+/*
+ * Functions defined in POSIX 1003.1.
+ */
+#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
+#define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
+#define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
+
+__BEGIN_DECLS
+#if 0 /* MISSING FROM BIONIC */
+char *ctermid(char *);
+char *cuserid(char *);
+#endif /* MISSING */
+FILE *fdopen(int, const char *);
+int fileno(FILE *);
+
+#if (__POSIX_VISIBLE >= 199209)
+int pclose(FILE *);
+FILE *popen(const char *, const char *);
+#endif
+
+#if __POSIX_VISIBLE >= 199506
+void flockfile(FILE *);
+int ftrylockfile(FILE *);
+void funlockfile(FILE *);
+
+/*
+ * These are normally used through macros as defined below, but POSIX
+ * requires functions as well.
+ */
+int getc_unlocked(FILE *);
+int getchar_unlocked(void);
+int putc_unlocked(int, FILE *);
+int putchar_unlocked(int);
+#endif /* __POSIX_VISIBLE >= 199506 */
+
+#if __XPG_VISIBLE
+char *tempnam(const char *, const char *);
+#endif
+__END_DECLS
+
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
+
+/*
+ * Routines that are purely local.
+ */
+#if __BSD_VISIBLE
+__BEGIN_DECLS
+int asprintf(char **, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)))
+ __attribute__((__nonnull__ (2)));
+char *fgetln(FILE *, size_t *);
+int fpurge(FILE *);
+int getw(FILE *);
+int putw(int, FILE *);
+void setbuffer(FILE *, char *, int);
+int setlinebuf(FILE *);
+int vasprintf(char **, const char *, __va_list)
+ __attribute__((__format__ (printf, 2, 0)))
+ __attribute__((__nonnull__ (2)));
+__END_DECLS
+
+/*
+ * Stdio function-access interface.
+ */
+__BEGIN_DECLS
+FILE *funopen(const void *,
+ int (*)(void *, char *, int),
+ int (*)(void *, const char *, int),
+ fpos_t (*)(void *, fpos_t, int),
+ int (*)(void *));
+__END_DECLS
+#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
+#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Functions internal to the implementation.
+ */
+__BEGIN_DECLS
+int __srget(FILE *);
+int __swbuf(int, FILE *);
+__END_DECLS
+
+/*
+ * The __sfoo macros are here so that we can
+ * define function versions in the C library.
+ */
+#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
+#if defined(__GNUC__)
+static __inline int __sputc(int _c, FILE *_p) {
+ if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
+ return (*_p->_p++ = _c);
+ else
+ return (__swbuf(_c, _p));
+}
+#else
+/*
+ * This has been tuned to generate reasonable code on the vax using pcc.
+ */
+#define __sputc(c, p) \
+ (--(p)->_w < 0 ? \
+ (p)->_w >= (p)->_lbfsize ? \
+ (*(p)->_p = (c)), *(p)->_p != '\n' ? \
+ (int)*(p)->_p++ : \
+ __swbuf('\n', p) : \
+ __swbuf((int)(c), p) : \
+ (*(p)->_p = (c), (int)*(p)->_p++))
+#endif
+
+#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+#define __sferror(p) (((p)->_flags & __SERR) != 0)
+#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+#define __sfileno(p) ((p)->_file)
+
+#define feof(p) __sfeof(p)
+#define ferror(p) __sferror(p)
+
+#ifndef _POSIX_THREADS
+#define clearerr(p) __sclearerr(p)
+#endif
+
+#if __POSIX_VISIBLE
+#define fileno(p) __sfileno(p)
+#endif
+
+#ifndef lint
+#ifndef _POSIX_THREADS
+#define getc(fp) __sgetc(fp)
+#endif /* _POSIX_THREADS */
+#define getc_unlocked(fp) __sgetc(fp)
+/*
+ * The macro implementations of putc and putc_unlocked are not
+ * fully POSIX compliant; they do not set errno on failure
+ */
+#if __BSD_VISIBLE
+#ifndef _POSIX_THREADS
+#define putc(x, fp) __sputc(x, fp)
+#endif /* _POSIX_THREADS */
+#define putc_unlocked(x, fp) __sputc(x, fp)
+#endif /* __BSD_VISIBLE */
+#endif /* lint */
+
+#define getchar() getc(stdin)
+#define putchar(x) putc(x, stdout)
+#define getchar_unlocked() getc_unlocked(stdin)
+#define putchar_unlocked(c) putc_unlocked(c, stdout)
+
+#ifdef _GNU_SOURCE
+/*
+ * glibc defines dprintf(int, const char*, ...), which is poorly named
+ * and likely to conflict with locally defined debugging printfs
+ * fdprintf is a better name, and some programs that use fdprintf use a
+ * #define fdprintf dprintf for compatibility
+ */
+int fdprintf(int, const char*, ...);
+int vfdprintf(int, const char*, __va_list);
+#endif /* _GNU_SOURCE */
+
+#endif /* _STDIO_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/stdlib.h b/6/platforms/android-8/arch-x86/usr/include/stdlib.h
new file mode 100644
index 0000000..ddaf32c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+extern int clearenv(void);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern char* ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd)
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/string.h b/6/platforms/android-8/arch-x86/usr/include/string.h
new file mode 120000
index 0000000..259ded3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/strings.h b/6/platforms/android-8/arch-x86/usr/include/strings.h
new file mode 120000
index 0000000..fc34959
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/strings.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/strings.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/_errdefs.h b/6/platforms/android-8/arch-x86/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..5a167d6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/_sigdefs.h b/6/platforms/android-8/arch-x86/usr/include/sys/_sigdefs.h
new file mode 120000
index 0000000..9a8adb8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/_sigdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/_sigdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/_system_properties.h b/6/platforms/android-8/arch-x86/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..117b08c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/_types.h b/6/platforms/android-8/arch-x86/usr/include/sys/_types.h
new file mode 120000
index 0000000..4078510
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/atomics.h b/6/platforms/android-8/arch-x86/usr/include/sys/atomics.h
new file mode 120000
index 0000000..b0751f9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/cdefs.h b/6/platforms/android-8/arch-x86/usr/include/sys/cdefs.h
new file mode 120000
index 0000000..8a40736
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/cdefs_elf.h b/6/platforms/android-8/arch-x86/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..bb88709
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/dirent.h b/6/platforms/android-8/arch-x86/usr/include/sys/dirent.h
new file mode 120000
index 0000000..133ea9a
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/endian.h b/6/platforms/android-8/arch-x86/usr/include/sys/endian.h
new file mode 120000
index 0000000..568c4ee
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/epoll.h b/6/platforms/android-8/arch-x86/usr/include/sys/epoll.h
new file mode 120000
index 0000000..5a4b7f3
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/errno.h b/6/platforms/android-8/arch-x86/usr/include/sys/errno.h
new file mode 120000
index 0000000..93e2ee7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/exec_elf.h b/6/platforms/android-8/arch-x86/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..0158ed8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/file.h b/6/platforms/android-8/arch-x86/usr/include/sys/file.h
new file mode 120000
index 0000000..2ed450b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/fsuid.h b/6/platforms/android-8/arch-x86/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..a3fde63
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/inotify.h b/6/platforms/android-8/arch-x86/usr/include/sys/inotify.h
new file mode 120000
index 0000000..c94e3ff
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ioctl.h b/6/platforms/android-8/arch-x86/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..84a3d94
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ioctl_compat.h b/6/platforms/android-8/arch-x86/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..f13d4f7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ipc.h b/6/platforms/android-8/arch-x86/usr/include/sys/ipc.h
new file mode 120000
index 0000000..95e160e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/klog.h b/6/platforms/android-8/arch-x86/usr/include/sys/klog.h
new file mode 120000
index 0000000..3620cd6
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/limits.h b/6/platforms/android-8/arch-x86/usr/include/sys/limits.h
new file mode 120000
index 0000000..74fc300
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/linux-syscalls.h b/6/platforms/android-8/arch-x86/usr/include/sys/linux-syscalls.h
new file mode 120000
index 0000000..ee673c7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/linux-syscalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/linux-syscalls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/linux-unistd.h b/6/platforms/android-8/arch-x86/usr/include/sys/linux-unistd.h
new file mode 120000
index 0000000..b02f609
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/linux-unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/linux-unistd.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/mman.h b/6/platforms/android-8/arch-x86/usr/include/sys/mman.h
new file mode 120000
index 0000000..9b19f3d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/mount.h b/6/platforms/android-8/arch-x86/usr/include/sys/mount.h
new file mode 120000
index 0000000..c6b3e51
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/param.h b/6/platforms/android-8/arch-x86/usr/include/sys/param.h
new file mode 120000
index 0000000..ae2e315
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/poll.h b/6/platforms/android-8/arch-x86/usr/include/sys/poll.h
new file mode 120000
index 0000000..67df1c1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/prctl.h b/6/platforms/android-8/arch-x86/usr/include/sys/prctl.h
new file mode 120000
index 0000000..5f569b9
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ptrace.h b/6/platforms/android-8/arch-x86/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..66ff63e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/queue.h b/6/platforms/android-8/arch-x86/usr/include/sys/queue.h
new file mode 120000
index 0000000..a6f1e83
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/reboot.h b/6/platforms/android-8/arch-x86/usr/include/sys/reboot.h
new file mode 120000
index 0000000..a644973
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/resource.h b/6/platforms/android-8/arch-x86/usr/include/sys/resource.h
new file mode 120000
index 0000000..4cdcbe0
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/select.h b/6/platforms/android-8/arch-x86/usr/include/sys/select.h
new file mode 120000
index 0000000..e9d85c4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/sendfile.h b/6/platforms/android-8/arch-x86/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..8a288d2
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/socket.h b/6/platforms/android-8/arch-x86/usr/include/sys/socket.h
new file mode 120000
index 0000000..2cab11f
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/socketcalls.h b/6/platforms/android-8/arch-x86/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..b373b42
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/stat.h b/6/platforms/android-8/arch-x86/usr/include/sys/stat.h
new file mode 120000
index 0000000..59b254d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/statfs.h b/6/platforms/android-8/arch-x86/usr/include/sys/statfs.h
new file mode 120000
index 0000000..cd77226
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/syscall.h b/6/platforms/android-8/arch-x86/usr/include/sys/syscall.h
new file mode 120000
index 0000000..de2071e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/sysconf.h b/6/platforms/android-8/arch-x86/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..35e37a8
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/sysinfo.h b/6/platforms/android-8/arch-x86/usr/include/sys/sysinfo.h
new file mode 120000
index 0000000..eb9c18e
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/sysinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/sysinfo.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/syslimits.h b/6/platforms/android-8/arch-x86/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..634b3d4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/sysmacros.h b/6/platforms/android-8/arch-x86/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..0474898
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/system_properties.h b/6/platforms/android-8/arch-x86/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..0a6fd9b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/time.h b/6/platforms/android-8/arch-x86/usr/include/sys/time.h
new file mode 120000
index 0000000..3a6a8f4
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/timeb.h b/6/platforms/android-8/arch-x86/usr/include/sys/timeb.h
new file mode 120000
index 0000000..42a4845
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/times.h b/6/platforms/android-8/arch-x86/usr/include/sys/times.h
new file mode 120000
index 0000000..528730b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ttychars.h b/6/platforms/android-8/arch-x86/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..ffdd678
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/ttydev.h b/6/platforms/android-8/arch-x86/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..8df6600
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/types.h b/6/platforms/android-8/arch-x86/usr/include/sys/types.h
new file mode 120000
index 0000000..0030488
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/uio.h b/6/platforms/android-8/arch-x86/usr/include/sys/uio.h
new file mode 120000
index 0000000..374a78b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/un.h b/6/platforms/android-8/arch-x86/usr/include/sys/un.h
new file mode 120000
index 0000000..d8b0170
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/utime.h b/6/platforms/android-8/arch-x86/usr/include/sys/utime.h
new file mode 120000
index 0000000..2caf3a1
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/utsname.h b/6/platforms/android-8/arch-x86/usr/include/sys/utsname.h
new file mode 120000
index 0000000..e977a80
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/vfs.h b/6/platforms/android-8/arch-x86/usr/include/sys/vfs.h
new file mode 120000
index 0000000..3bf08f5
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/vt.h b/6/platforms/android-8/arch-x86/usr/include/sys/vt.h
new file mode 120000
index 0000000..96095db
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/sys/wait.h b/6/platforms/android-8/arch-x86/usr/include/sys/wait.h
new file mode 120000
index 0000000..8da9d69
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/sys/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-5/arch-x86/usr/include/sys/wait.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/syslog.h b/6/platforms/android-8/arch-x86/usr/include/syslog.h
new file mode 120000
index 0000000..8b6fb48
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/termio.h b/6/platforms/android-8/arch-x86/usr/include/termio.h
new file mode 120000
index 0000000..8bdb59d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/termios.h b/6/platforms/android-8/arch-x86/usr/include/termios.h
new file mode 120000
index 0000000..8864f81
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/thread_db.h b/6/platforms/android-8/arch-x86/usr/include/thread_db.h
new file mode 120000
index 0000000..315aed7
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/thread_db.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/thread_db.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/time.h b/6/platforms/android-8/arch-x86/usr/include/time.h
new file mode 100644
index 0000000..6163c6d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/time.h
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _TIME_H_
+#define _TIME_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+#define __ARCH_SI_UID_T __kernel_uid32_t
+#include <asm/siginfo.h>
+#undef __ARCH_SI_UID_T
+
+__BEGIN_DECLS
+
+extern time_t time(time_t *);
+extern int nanosleep(const struct timespec *, struct timespec *);
+
+extern char *strtotimeval(const char *str, struct timeval *tv);
+
+struct tm {
+ int tm_sec; /* seconds */
+ int tm_min; /* minutes */
+ int tm_hour; /* hours */
+ int tm_mday; /* day of the month */
+ int tm_mon; /* month */
+ int tm_year; /* year */
+ int tm_wday; /* day of the week */
+ int tm_yday; /* day in the year */
+ int tm_isdst; /* daylight saving time */
+
+ long int tm_gmtoff; /* Seconds east of UTC. */
+ const char *tm_zone; /* Timezone abbreviation. */
+
+};
+
+/* defining TM_ZONE indicates that we have a "timezone abbreviation" field in
+ * struct tm, the value should be the field name
+ */
+#define TM_ZONE tm_zone
+
+extern char* asctime(const struct tm* a);
+extern char* asctime_r(const struct tm* a, char* buf);
+
+/* Return the difference between TIME1 and TIME0. */
+extern double difftime (time_t __time1, time_t __time0);
+extern time_t mktime (struct tm *a);
+
+extern struct tm* localtime(const time_t *t);
+extern struct tm* localtime_r(const time_t *timep, struct tm *result);
+
+extern struct tm* gmtime(const time_t *timep);
+extern struct tm* gmtime_r(const time_t *timep, struct tm *result);
+
+extern char* strptime(const char *buf, const char *fmt, struct tm *tm);
+extern size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
+
+extern char *ctime(const time_t *timep);
+extern char *ctime_r(const time_t *timep, char *buf);
+
+extern void tzset(void);
+
+/* global includes */
+extern char* tzname[];
+extern int daylight;
+extern long int timezone;
+
+#define CLOCKS_PER_SEC 1000000
+
+extern clock_t clock(void);
+
+/* BIONIC: extra linux clock goodies */
+extern int clock_getres(int, struct timespec *);
+extern int clock_gettime(int, struct timespec *);
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+#define CLOCK_PROCESS_CPUTIME_ID 2
+#define CLOCK_THREAD_CPUTIME_ID 3
+#define CLOCK_REALTIME_HR 4
+#define CLOCK_MONOTONIC_HR 5
+
+extern int timer_create(int, struct sigevent*, timer_t*);
+extern int timer_delete(timer_t);
+extern int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue);
+extern int timer_gettime(timer_t timerid, struct itimerspec *value);
+extern int timer_getoverrun(timer_t timerid);
+
+__END_DECLS
+
+#endif /* _TIME_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/time64.h b/6/platforms/android-8/arch-x86/usr/include/time64.h
new file mode 120000
index 0000000..a5ffe91
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/unistd.h b/6/platforms/android-8/arch-x86/usr/include/unistd.h
new file mode 100644
index 0000000..863d56d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/unistd.h
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern int usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+extern int ttyname_r(int, char*, size_t);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int fdatasync(int);
+extern int getlogin_r(char* name, size_t namesize);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/util.h b/6/platforms/android-8/arch-x86/usr/include/util.h
new file mode 120000
index 0000000..14ba732
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/utime.h b/6/platforms/android-8/arch-x86/usr/include/utime.h
new file mode 120000
index 0000000..ec5ba6b
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/utmp.h b/6/platforms/android-8/arch-x86/usr/include/utmp.h
new file mode 120000
index 0000000..e144c1d
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/wchar.h b/6/platforms/android-8/arch-x86/usr/include/wchar.h
new file mode 100644
index 0000000..97e1b5c
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/wchar.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX 255
+#define WCHAR_MIN 0
+#define WEOF (-1)
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-8/arch-x86/usr/include/wctype.h b/6/platforms/android-8/arch-x86/usr/include/wctype.h
new file mode 120000
index 0000000..82292be
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/zconf.h b/6/platforms/android-8/arch-x86/usr/include/zconf.h
new file mode 120000
index 0000000..b9764bb
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-8/arch-x86/usr/include/zlib.h b/6/platforms/android-8/arch-x86/usr/include/zlib.h
new file mode 120000
index 0000000..1f08d12
--- /dev/null
+++ b/6/platforms/android-8/arch-x86/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-5/arch-x86/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/EGL/egl.h b/6/platforms/android-9/arch-arm/usr/include/EGL/egl.h
new file mode 100644
index 0000000..99ea342
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/EGL/egl.h
@@ -0,0 +1,329 @@
+/* -*- mode: c; tab-width: 8; -*- */
+/* vi: set sw=4 ts=8: */
+/* Reference version of egl.h for EGL 1.4.
+ * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
+ */
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#ifndef __egl_h_
+#define __egl_h_
+
+/* All platform-dependent types and macro boilerplate (such as EGLAPI
+ * and EGLAPIENTRY) should go in eglplatform.h.
+ */
+#include <EGL/eglplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* EGL Types */
+/* EGLint is defined in eglplatform.h */
+typedef unsigned int EGLBoolean;
+typedef unsigned int EGLenum;
+typedef void *EGLConfig;
+typedef void *EGLContext;
+typedef void *EGLDisplay;
+typedef void *EGLSurface;
+typedef void *EGLClientBuffer;
+
+/* EGL Versioning */
+#define EGL_VERSION_1_0 1
+#define EGL_VERSION_1_1 1
+#define EGL_VERSION_1_2 1
+#define EGL_VERSION_1_3 1
+#define EGL_VERSION_1_4 1
+
+/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
+ * enums are assigned unique values starting at 0x3000.
+ */
+
+/* EGL aliases */
+#define EGL_FALSE 0
+#define EGL_TRUE 1
+
+/* Out-of-band handle values */
+#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
+#define EGL_NO_CONTEXT ((EGLContext)0)
+#define EGL_NO_DISPLAY ((EGLDisplay)0)
+#define EGL_NO_SURFACE ((EGLSurface)0)
+
+/* Out-of-band attribute value */
+#define EGL_DONT_CARE ((EGLint)-1)
+
+/* Errors / GetError return values */
+#define EGL_SUCCESS 0x3000
+#define EGL_NOT_INITIALIZED 0x3001
+#define EGL_BAD_ACCESS 0x3002
+#define EGL_BAD_ALLOC 0x3003
+#define EGL_BAD_ATTRIBUTE 0x3004
+#define EGL_BAD_CONFIG 0x3005
+#define EGL_BAD_CONTEXT 0x3006
+#define EGL_BAD_CURRENT_SURFACE 0x3007
+#define EGL_BAD_DISPLAY 0x3008
+#define EGL_BAD_MATCH 0x3009
+#define EGL_BAD_NATIVE_PIXMAP 0x300A
+#define EGL_BAD_NATIVE_WINDOW 0x300B
+#define EGL_BAD_PARAMETER 0x300C
+#define EGL_BAD_SURFACE 0x300D
+#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
+
+/* Reserved 0x300F-0x301F for additional errors */
+
+/* Config attributes */
+#define EGL_BUFFER_SIZE 0x3020
+#define EGL_ALPHA_SIZE 0x3021
+#define EGL_BLUE_SIZE 0x3022
+#define EGL_GREEN_SIZE 0x3023
+#define EGL_RED_SIZE 0x3024
+#define EGL_DEPTH_SIZE 0x3025
+#define EGL_STENCIL_SIZE 0x3026
+#define EGL_CONFIG_CAVEAT 0x3027
+#define EGL_CONFIG_ID 0x3028
+#define EGL_LEVEL 0x3029
+#define EGL_MAX_PBUFFER_HEIGHT 0x302A
+#define EGL_MAX_PBUFFER_PIXELS 0x302B
+#define EGL_MAX_PBUFFER_WIDTH 0x302C
+#define EGL_NATIVE_RENDERABLE 0x302D
+#define EGL_NATIVE_VISUAL_ID 0x302E
+#define EGL_NATIVE_VISUAL_TYPE 0x302F
+#define EGL_SAMPLES 0x3031
+#define EGL_SAMPLE_BUFFERS 0x3032
+#define EGL_SURFACE_TYPE 0x3033
+#define EGL_TRANSPARENT_TYPE 0x3034
+#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
+#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
+#define EGL_TRANSPARENT_RED_VALUE 0x3037
+#define EGL_NONE 0x3038 /* Attrib list terminator */
+#define EGL_BIND_TO_TEXTURE_RGB 0x3039
+#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
+#define EGL_MIN_SWAP_INTERVAL 0x303B
+#define EGL_MAX_SWAP_INTERVAL 0x303C
+#define EGL_LUMINANCE_SIZE 0x303D
+#define EGL_ALPHA_MASK_SIZE 0x303E
+#define EGL_COLOR_BUFFER_TYPE 0x303F
+#define EGL_RENDERABLE_TYPE 0x3040
+#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
+#define EGL_CONFORMANT 0x3042
+
+/* Reserved 0x3041-0x304F for additional config attributes */
+
+/* Config attribute values */
+#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
+#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
+#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
+#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
+#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
+
+/* More config attribute values, for EGL_TEXTURE_FORMAT */
+#define EGL_NO_TEXTURE 0x305C
+#define EGL_TEXTURE_RGB 0x305D
+#define EGL_TEXTURE_RGBA 0x305E
+#define EGL_TEXTURE_2D 0x305F
+
+/* Config attribute mask bits */
+#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
+
+#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
+
+/* QueryString targets */
+#define EGL_VENDOR 0x3053
+#define EGL_VERSION 0x3054
+#define EGL_EXTENSIONS 0x3055
+#define EGL_CLIENT_APIS 0x308D
+
+/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
+#define EGL_HEIGHT 0x3056
+#define EGL_WIDTH 0x3057
+#define EGL_LARGEST_PBUFFER 0x3058
+#define EGL_TEXTURE_FORMAT 0x3080
+#define EGL_TEXTURE_TARGET 0x3081
+#define EGL_MIPMAP_TEXTURE 0x3082
+#define EGL_MIPMAP_LEVEL 0x3083
+#define EGL_RENDER_BUFFER 0x3086
+#define EGL_VG_COLORSPACE 0x3087
+#define EGL_VG_ALPHA_FORMAT 0x3088
+#define EGL_HORIZONTAL_RESOLUTION 0x3090
+#define EGL_VERTICAL_RESOLUTION 0x3091
+#define EGL_PIXEL_ASPECT_RATIO 0x3092
+#define EGL_SWAP_BEHAVIOR 0x3093
+#define EGL_MULTISAMPLE_RESOLVE 0x3099
+
+/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
+#define EGL_BACK_BUFFER 0x3084
+#define EGL_SINGLE_BUFFER 0x3085
+
+/* OpenVG color spaces */
+#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
+#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
+
+/* OpenVG alpha formats */
+#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
+#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
+
+/* Constant scale factor by which fractional display resolutions &
+ * aspect ratio are scaled when queried as integer values.
+ */
+#define EGL_DISPLAY_SCALING 10000
+
+/* Unknown display resolution/aspect ratio */
+#define EGL_UNKNOWN ((EGLint)-1)
+
+/* Back buffer swap behaviors */
+#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
+#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
+
+/* CreatePbufferFromClientBuffer buffer types */
+#define EGL_OPENVG_IMAGE 0x3096
+
+/* QueryContext targets */
+#define EGL_CONTEXT_CLIENT_TYPE 0x3097
+
+/* CreateContext attributes */
+#define EGL_CONTEXT_CLIENT_VERSION 0x3098
+
+/* Multisample resolution behaviors */
+#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
+#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
+
+/* BindAPI/QueryAPI targets */
+#define EGL_OPENGL_ES_API 0x30A0
+#define EGL_OPENVG_API 0x30A1
+#define EGL_OPENGL_API 0x30A2
+
+/* GetCurrentSurface targets */
+#define EGL_DRAW 0x3059
+#define EGL_READ 0x305A
+
+/* WaitNative engines */
+#define EGL_CORE_NATIVE_ENGINE 0x305B
+
+/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
+#define EGL_COLORSPACE EGL_VG_COLORSPACE
+#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
+#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
+#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
+#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
+#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
+
+/* EGL extensions must request enum blocks from the Khronos
+ * API Registrar, who maintains the enumerant registry. Submit
+ * a bug in Khronos Bugzilla against task "Registry".
+ */
+
+
+
+/* EGL Functions */
+
+EGLAPI EGLint EGLAPIENTRY eglGetError(void);
+
+EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
+EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
+EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
+
+EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
+ EGLint config_size, EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
+ EGLConfig *configs, EGLint config_size,
+ EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
+ const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
+EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
+ EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
+ EGLConfig config, const EGLint *attrib_list);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
+ EGLint attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
+
+
+EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
+ EGLContext share_context,
+ const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
+EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
+ EGLSurface read, EGLContext ctx);
+
+EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
+EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
+ EGLNativePixmapType target);
+
+/* This is a generic function pointer type, whose name indicates it must
+ * be cast to the proper type *and calling convention* before use.
+ */
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+
+/* Now, define eglGetProcAddress using the generic function ptr. type */
+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
+ eglGetProcAddress(const char *procname);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __egl_h_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/EGL/eglext.h b/6/platforms/android-9/arch-arm/usr/include/EGL/eglext.h
new file mode 100644
index 0000000..1ffcd56
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/EGL/eglext.h
@@ -0,0 +1,244 @@
+#ifndef __eglext_h_
+#define __eglext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2010 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#include <EGL/eglplatform.h>
+
+/*************************************************************/
+
+/* Header file version number */
+/* Current version at http://www.khronos.org/registry/egl/ */
+/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */
+#define EGL_EGLEXT_VERSION 5
+
+#ifndef EGL_KHR_config_attribs
+#define EGL_KHR_config_attribs 1
+#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
+#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
+#endif
+
+#ifndef EGL_KHR_lock_surface
+#define EGL_KHR_lock_surface 1
+#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
+#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
+#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
+#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
+#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
+#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
+#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
+#endif
+
+#ifndef EGL_KHR_image
+#define EGL_KHR_image 1
+#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
+typedef void *EGLImageKHR;
+#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
+#endif
+
+#ifndef EGL_KHR_vg_parent_image
+#define EGL_KHR_vg_parent_image 1
+#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_2D_image
+#define EGL_KHR_gl_texture_2D_image 1
+#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_texture_cubemap_image
+#define EGL_KHR_gl_texture_cubemap_image 1
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_3D_image
+#define EGL_KHR_gl_texture_3D_image 1
+#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_renderbuffer_image
+#define EGL_KHR_gl_renderbuffer_image 1
+#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+
+typedef void* EGLSyncKHR;
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+
+#define EGL_SYNC_STATUS_KHR 0x30F1
+#define EGL_SIGNALED_KHR 0x30F2
+#define EGL_UNSIGNALED_KHR 0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
+#define EGL_CONDITION_SATISFIED_KHR 0x30F6
+#define EGL_SYNC_TYPE_KHR 0x30F7
+#define EGL_SYNC_REUSABLE_KHR 0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
+#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_image_base
+#define EGL_KHR_image_base 1
+/* Most interfaces defined by EGL_KHR_image_pixmap above */
+#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_image_pixmap
+#define EGL_KHR_image_pixmap 1
+/* Interfaces defined by EGL_KHR_image above */
+#endif
+
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
+#endif
+
+#ifndef EGL_NV_coverage_sample
+#define EGL_NV_coverage_sample 1
+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#endif
+
+#ifndef EGL_NV_depth_nonlinear
+#define EGL_NV_depth_nonlinear 1
+#define EGL_DEPTH_ENCODING_NV 0x30E2
+#define EGL_DEPTH_ENCODING_NONE_NV 0
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#endif
+
+#ifndef EGL_NV_sync
+#define EGL_NV_sync 1
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
+#define EGL_SYNC_STATUS_NV 0x30E7
+#define EGL_SIGNALED_NV 0x30E8
+#define EGL_UNSIGNALED_NV 0x30E9
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
+#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
+#define EGL_ALREADY_SIGNALED_NV 0x30EA
+#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
+#define EGL_CONDITION_SATISFIED_NV 0x30EC
+#define EGL_SYNC_TYPE_NV 0x30ED
+#define EGL_SYNC_CONDITION_NV 0x30EE
+#define EGL_SYNC_FENCE_NV 0x30EF
+#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
+typedef void* EGLSyncNV;
+typedef unsigned long long EGLTimeNV;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
+EGLBoolean eglFenceNV (EGLSyncNV sync);
+EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
+#define EGL_SYNC_CONDITION_KHR 0x30F8
+#define EGL_SYNC_FENCE_KHR 0x30F9
+#endif
+
+#ifndef EGL_ANDROID_image_native_buffer
+#define EGL_ANDROID_image_native_buffer 1
+struct android_native_buffer_t;
+#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_ANDROID_swap_rectangle
+#define EGL_ANDROID_swap_rectangle 1
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSetSwapRectangleANDROID (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-arm/usr/include/EGL/eglplatform.h b/6/platforms/android-9/arch-arm/usr/include/EGL/eglplatform.h
new file mode 100644
index 0000000..bfac71b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/EGL/eglplatform.h
@@ -0,0 +1,120 @@
+#ifndef __eglplatform_h_
+#define __eglplatform_h_
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions for egl.h
+ * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "EGL" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+/* Macros used in EGL function prototype declarations.
+ *
+ * EGL functions should be prototyped as:
+ *
+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
+ *
+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
+ */
+
+#ifndef EGLAPI
+#define EGLAPI KHRONOS_APICALL
+#endif
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY KHRONOS_APIENTRY
+#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
+
+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
+ * are aliases of window-system-dependent types, such as X Display * or
+ * Windows Device Context. They must be defined in platform-specific
+ * code below. The EGL-prefixed versions of Native*Type are the same
+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ */
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+
+typedef HDC EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+typedef HWND EGLNativeWindowType;
+
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
+
+typedef int EGLNativeDisplayType;
+typedef void *EGLNativeWindowType;
+typedef void *EGLNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+#include <android/native_window.h>
+
+struct egl_native_pixmap_t;
+
+typedef struct ANativeWindow* EGLNativeWindowType;
+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
+typedef void* EGLNativeDisplayType;
+
+#elif defined(__unix__)
+
+/* X11 (tentative) */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap EGLNativePixmapType;
+typedef Window EGLNativeWindowType;
+
+#else
+#error "Platform not recognized"
+#endif
+
+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
+typedef EGLNativeDisplayType NativeDisplayType;
+typedef EGLNativePixmapType NativePixmapType;
+typedef EGLNativeWindowType NativeWindowType;
+
+
+/* Define EGLint. This must be a signed integral type large enough to contain
+ * all legal attribute names and values passed into and out of EGL, whether
+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
+ * handle, or other. While in general a 32-bit integer will suffice, if
+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
+ * integer type.
+ */
+typedef khronos_int32_t EGLint;
+
+#endif /* __eglplatform_h */
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES/gl.h b/6/platforms/android-9/arch-arm/usr/include/GLES/gl.h
new file mode 120000
index 0000000..ca398f5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES/glext.h b/6/platforms/android-9/arch-arm/usr/include/GLES/glext.h
new file mode 120000
index 0000000..009df46
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES/glplatform.h b/6/platforms/android-9/arch-arm/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..9018fc3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2.h b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2.h
new file mode 120000
index 0000000..1dd2ebb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES2/gl2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2ext.h b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2ext.h
new file mode 120000
index 0000000..e020e3a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2ext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES2/gl2ext.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2platform.h b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2platform.h
new file mode 120000
index 0000000..2975ee7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/GLES2/gl2platform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/GLES2/gl2platform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/KHR/khrplatform.h b/6/platforms/android-9/arch-arm/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..c729e41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES.h b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES.h
new file mode 100644
index 0000000..16496f9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES.h
@@ -0,0 +1,2774 @@
+/*
+ * Copyright (c) 2007-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and /or associated documentation files (the "Materials "), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * 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 Materials.
+ *
+ * THE MATERIALS ARE 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
+ * AUTHORS OR COPYRIGHT HOLDERS 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 MATERIALS OR THE USE OR OTHER DEALINGS IN THE
+ * MATERIALS.
+ *
+ * OpenSLES.h - OpenSL ES version 1.0.1
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file is a standard OpenSL ES header file and should not be */
+/* modified in any way. */
+/****************************************************************************/
+
+#ifndef OPENSL_ES_H_
+#define OPENSL_ES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "OpenSLES_Platform.h"
+
+
+/*****************************************************************************/
+/* Common types, structures, and defines */
+/*****************************************************************************/
+
+#ifndef _KHRONOS_KEYS_
+#define _KHRONOS_KEYS_
+
+#define KHRONOS_TITLE "KhronosTitle"
+#define KHRONOS_ALBUM "KhronosAlbum"
+#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
+#define KHRONOS_ARTIST "KhronosArtist"
+#define KHRONOS_GENRE "KhronosGenre"
+#define KHRONOS_YEAR "KhronosYear"
+#define KHRONOS_COMMENT "KhronosComment"
+#define KHRONOS_ARTIST_URL "KhronosArtistURL"
+#define KHRONOS_CONTENT_URL "KhronosContentURL"
+#define KHRONOS_RATING "KhronosRating"
+#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
+#define KHRONOS_COPYRIGHT "KhronosCopyright"
+
+#endif
+
+
+/* remap common types to SL types for clarity */
+typedef sl_int8_t SLint8; /* 8 bit signed integer */
+typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
+typedef sl_int16_t SLint16; /* 16 bit signed integer */
+typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
+typedef sl_int32_t SLint32; /* 32 bit signed integer */
+typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
+
+typedef SLuint32 SLboolean;
+#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
+#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
+
+typedef SLuint8 SLchar; /* UTF-8 is to be used */
+typedef SLint16 SLmillibel;
+typedef SLuint32 SLmillisecond;
+typedef SLuint32 SLmilliHertz;
+typedef SLint32 SLmillimeter;
+typedef SLint32 SLmillidegree;
+typedef SLint16 SLpermille;
+typedef SLuint32 SLmicrosecond;
+typedef SLuint32 SLresult;
+
+#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
+#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
+
+#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
+#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
+
+/** Interface ID defined as a UUID */
+typedef const struct SLInterfaceID_ {
+ SLuint32 time_low;
+ SLuint16 time_mid;
+ SLuint16 time_hi_and_version;
+ SLuint16 clock_seq;
+ SLuint8 node[6];
+} * SLInterfaceID;
+
+/* Forward declaration for the object interface */
+struct SLObjectItf_;
+
+typedef const struct SLObjectItf_ * const * SLObjectItf;
+
+/* Objects ID's */
+
+#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
+#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
+#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
+#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
+#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
+#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
+#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
+#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
+#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
+#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
+
+
+/* SL Profiles */
+
+#define SL_PROFILES_PHONE ((SLuint16) 0x0001)
+#define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
+#define SL_PROFILES_GAME ((SLuint16) 0x0004)
+
+/* Types of voices supported by the system */
+
+#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
+#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
+#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
+#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
+
+/* Convenient macros representing various different priority levels, for use with the SetPriority method */
+
+#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
+#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
+#define SL_PRIORITY_LOW ((SLint32) -0x40000000)
+#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
+#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
+#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
+#define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
+#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
+#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
+
+
+/** These macros list the various sample formats that are possible on audio input and output devices. */
+
+#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
+#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
+#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
+#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
+#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
+#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
+
+
+/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
+
+#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
+#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
+#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
+#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
+#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
+#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
+#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
+#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
+#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
+#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
+#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
+#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
+#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
+
+#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
+#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
+#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
+#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
+#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
+#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
+#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
+#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
+#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
+#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
+#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
+#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
+#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
+#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
+#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
+#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
+#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
+#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
+
+
+/*****************************************************************************/
+/* Errors */
+/* */
+/*****************************************************************************/
+
+#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
+#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
+#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
+#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
+#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
+#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
+#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
+#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
+#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
+#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
+#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
+#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
+#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
+#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
+#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
+#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
+#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
+
+
+/* Object state definitions */
+
+#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
+#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
+#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
+
+/* Object event definitions */
+
+#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
+#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
+#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
+#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
+
+
+/*****************************************************************************/
+/* Interface definitions */
+/*****************************************************************************/
+
+/** NULL Interface */
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_NULL;
+
+/*---------------------------------------------------------------------------*/
+/* Data Source and Data Sink Structures */
+/*---------------------------------------------------------------------------*/
+
+/** Data locator macros */
+#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
+#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
+#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
+#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
+#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
+#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
+#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
+#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
+
+
+
+/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
+typedef struct SLDataLocator_URI_ {
+ SLuint32 locatorType;
+ SLchar * URI;
+} SLDataLocator_URI;
+
+/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
+typedef struct SLDataLocator_Address_ {
+ SLuint32 locatorType;
+ void *pAddress;
+ SLuint32 length;
+} SLDataLocator_Address;
+
+/** IODevice-types */
+#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
+#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
+#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
+#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
+#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
+
+/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
+typedef struct SLDataLocator_IODevice_ {
+ SLuint32 locatorType;
+ SLuint32 deviceType;
+ SLuint32 deviceID;
+ SLObjectItf device;
+} SLDataLocator_IODevice;
+
+/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
+typedef struct SLDataLocator_OutputMix {
+ SLuint32 locatorType;
+ SLObjectItf outputMix;
+} SLDataLocator_OutputMix;
+
+
+/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
+typedef struct SLDataLocator_BufferQueue {
+ SLuint32 locatorType;
+ SLuint32 numBuffers;
+} SLDataLocator_BufferQueue;
+
+/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
+typedef struct SLDataLocator_MIDIBufferQueue {
+ SLuint32 locatorType;
+ SLuint32 tpqn;
+ SLuint32 numBuffers;
+} SLDataLocator_MIDIBufferQueue;
+
+/** Data format defines */
+#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
+#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
+#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
+
+
+/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
+typedef struct SLDataFormat_MIME_ {
+ SLuint32 formatType;
+ SLchar * mimeType;
+ SLuint32 containerType;
+} SLDataFormat_MIME;
+
+/* Byte order of a block of 16- or 32-bit data */
+#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
+#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
+
+/* Container type */
+#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
+#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
+#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
+#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
+#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
+#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
+#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
+#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
+#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
+#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
+#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
+#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
+#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
+#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
+#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
+#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
+#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
+#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
+#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
+#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
+#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
+#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
+#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
+#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
+#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
+#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
+#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
+#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
+
+
+/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
+typedef struct SLDataFormat_PCM_ {
+ SLuint32 formatType;
+ SLuint32 numChannels;
+ SLuint32 samplesPerSec;
+ SLuint32 bitsPerSample;
+ SLuint32 containerSize;
+ SLuint32 channelMask;
+ SLuint32 endianness;
+} SLDataFormat_PCM;
+
+typedef struct SLDataSource_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSource;
+
+
+typedef struct SLDataSink_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSink;
+
+
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Standard Object Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_OBJECT;
+
+/** Object callback */
+
+
+typedef void (/*SLAPIENTRY*/ *slObjectCallback) (
+ SLObjectItf caller,
+ const void * pContext,
+ SLuint32 event,
+ SLresult result,
+ SLuint32 param,
+ void *pInterface
+);
+
+
+struct SLObjectItf_ {
+ SLresult (*Realize) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*Resume) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*GetState) (
+ SLObjectItf self,
+ SLuint32 * pState
+ );
+ SLresult (*GetInterface) (
+ SLObjectItf self,
+ const SLInterfaceID iid,
+ void * pInterface
+ );
+ SLresult (*RegisterCallback) (
+ SLObjectItf self,
+ slObjectCallback callback,
+ void * pContext
+ );
+ void (*AbortAsyncOperation) (
+ SLObjectItf self
+ );
+ void (*Destroy) (
+ SLObjectItf self
+ );
+ SLresult (*SetPriority) (
+ SLObjectItf self,
+ SLint32 priority,
+ SLboolean preemptable
+ );
+ SLresult (*GetPriority) (
+ SLObjectItf self,
+ SLint32 *pPriority,
+ SLboolean *pPreemptable
+ );
+ SLresult (*SetLossOfControlInterfaces) (
+ SLObjectItf self,
+ SLint16 numInterfaces,
+ SLInterfaceID * pInterfaceIDs,
+ SLboolean enabled
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio IO Device capabilities interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
+#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
+#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
+#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
+#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
+
+
+#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
+#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
+#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
+#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
+
+
+#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
+#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
+#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
+#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
+#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
+/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
+#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
+
+
+#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
+#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
+#define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
+
+
+typedef struct SLAudioInputDescriptor_ {
+ SLchar *deviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioInputDescriptor;
+
+
+typedef struct SLAudioOutputDescriptor_ {
+ SLchar *pDeviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioOutputDescriptor;
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
+
+struct SLAudioIODeviceCapabilitiesItf_;
+typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
+
+
+typedef void (/*SLAPIENTRY*/ *slAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numInputs,
+ SLboolean isNew
+);
+
+
+typedef void (/*SLAPIENTRY*/ *slAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numOutputs,
+ SLboolean isNew
+);
+
+typedef void (/*SLAPIENTRY*/ *slDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLboolean isOutput,
+ SLint32 numDevices
+);
+
+
+struct SLAudioIODeviceCapabilitiesItf_ {
+ SLresult (*GetAvailableAudioInputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumInputs,
+ SLuint32 *pInputDeviceIDs
+ );
+ SLresult (*QueryAudioInputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioInputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioInputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAvailableAudioOutputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumOutputs,
+ SLuint32 *pOutputDeviceIDs
+ );
+ SLresult (*QueryAudioOutputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioOutputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioOutputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slDefaultDeviceIDMapChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAssociatedAudioInputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioInputs,
+ SLuint32 *pAudioInputDeviceIDs
+ );
+ SLresult (*GetAssociatedAudioOutputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioOutputs,
+ SLuint32 *pAudioOutputDeviceIDs
+ );
+ SLresult (*GetDefaultAudioDevices) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 defaultDeviceID,
+ SLint32 *pNumAudioDevices,
+ SLuint32 *pAudioDeviceIDs
+ );
+ SLresult (*QuerySampleFormatsSupported)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLmilliHertz samplingRate,
+ SLint32 *pSampleFormats,
+ SLint32 *pNumOfSampleFormats
+ );
+};
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the LED array IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLLEDDescriptor_ {
+ SLuint8 ledCount;
+ SLuint8 primaryLED;
+ SLuint32 colorMask;
+} SLLEDDescriptor;
+
+
+/*---------------------------------------------------------------------------*/
+/* LED Array interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLHSL_ {
+ SLmillidegree hue;
+ SLpermille saturation;
+ SLpermille lightness;
+} SLHSL;
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_LED;
+
+struct SLLEDArrayItf_;
+typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
+
+struct SLLEDArrayItf_ {
+ SLresult (*ActivateLEDArray) (
+ SLLEDArrayItf self,
+ SLuint32 lightMask
+ );
+ SLresult (*IsLEDArrayActivated) (
+ SLLEDArrayItf self,
+ SLuint32 *lightMask
+ );
+ SLresult (*SetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ const SLHSL *color
+ );
+ SLresult (*GetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ SLHSL *color
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the Vibra IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVibraDescriptor_ {
+ SLboolean supportsFrequency;
+ SLboolean supportsIntensity;
+ SLmilliHertz minFrequency;
+ SLmilliHertz maxFrequency;
+} SLVibraDescriptor;
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Vibra interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VIBRA;
+
+
+struct SLVibraItf_;
+typedef const struct SLVibraItf_ * const * SLVibraItf;
+
+struct SLVibraItf_ {
+ SLresult (*Vibrate) (
+ SLVibraItf self,
+ SLboolean vibrate
+ );
+ SLresult (*IsVibrating) (
+ SLVibraItf self,
+ SLboolean *pVibrating
+ );
+ SLresult (*SetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz frequency
+ );
+ SLresult (*GetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz *pFrequency
+ );
+ SLresult (*SetIntensity) (
+ SLVibraItf self,
+ SLpermille intensity
+ );
+ SLresult (*GetIntensity) (
+ SLVibraItf self,
+ SLpermille *pIntensity
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data extraction related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
+#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
+#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
+#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
+#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
+#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
+#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
+#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
+#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
+#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
+#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
+#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
+#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
+#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
+#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
+#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
+#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
+#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
+#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
+#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
+#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
+#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
+#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
+#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
+#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
+#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
+#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
+#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
+#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
+#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
+#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
+#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
+
+
+#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
+#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
+#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
+
+
+typedef struct SLMetadataInfo_ {
+ SLuint32 size;
+ SLuint32 encoding;
+ SLchar langCountry[16];
+ SLuint8 data[1];
+} SLMetadataInfo;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_METADATAEXTRACTION;
+
+struct SLMetadataExtractionItf_;
+typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
+
+
+struct SLMetadataExtractionItf_ {
+ SLresult (*GetItemCount) (
+ SLMetadataExtractionItf self,
+ SLuint32 *pItemCount
+ );
+ SLresult (*GetKeySize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pKeySize
+ );
+ SLresult (*GetKey) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 keySize,
+ SLMetadataInfo *pKey
+ );
+ SLresult (*GetValueSize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pValueSize
+ );
+ SLresult (*GetValue) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 valueSize,
+ SLMetadataInfo *pValue
+ );
+ SLresult (*AddKeyFilter) (
+ SLMetadataExtractionItf self,
+ SLuint32 keySize,
+ const void *pKey,
+ SLuint32 keyEncoding,
+ const SLchar *pValueLangCountry,
+ SLuint32 valueEncoding,
+ SLuint8 filterMask
+ );
+ SLresult (*ClearKeyFilter) (
+ SLMetadataExtractionItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data traversal related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
+#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
+
+
+#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
+#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
+#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
+
+#define SL_NODE_PARENT 0xFFFFFFFF
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_METADATATRAVERSAL;
+
+struct SLMetadataTraversalItf_;
+typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
+
+struct SLMetadataTraversalItf_ {
+ SLresult (*SetMode) (
+ SLMetadataTraversalItf self,
+ SLuint32 mode
+ );
+ SLresult (*GetChildCount) (
+ SLMetadataTraversalItf self,
+ SLuint32 *pCount
+ );
+ SLresult (*GetChildMIMETypeSize) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLuint32 *pSize
+ );
+ SLresult (*GetChildInfo) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLint32 *pNodeID,
+ SLuint32 *pType,
+ SLuint32 size,
+ SLchar *pMimeType
+ );
+ SLresult (*SetActiveNode) (
+ SLMetadataTraversalItf self,
+ SLuint32 index
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Source types and interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DYNAMICSOURCE;
+
+struct SLDynamicSourceItf_;
+typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
+
+struct SLDynamicSourceItf_ {
+ SLresult (*SetSource) (
+ SLDynamicSourceItf self,
+ SLDataSource *pDataSource
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Output Mix interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_OUTPUTMIX;
+
+struct SLOutputMixItf_;
+typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
+
+typedef void (/*SLAPIENTRY*/ *slMixDeviceChangeCallback) (
+ SLOutputMixItf caller,
+ void *pContext
+);
+
+
+struct SLOutputMixItf_ {
+ SLresult (*GetDestinationOutputDeviceIDs) (
+ SLOutputMixItf self,
+ SLint32 *pNumDevices,
+ SLuint32 *pDeviceIDs
+ );
+ SLresult (*RegisterDeviceChangeCallback) (
+ SLOutputMixItf self,
+ slMixDeviceChangeCallback callback,
+ void *pContext
+ );
+ SLresult (*ReRoute)(
+ SLOutputMixItf self,
+ SLint32 numOutputDevices,
+ SLuint32 *pOutputDeviceIDs
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Playback interface */
+/*---------------------------------------------------------------------------*/
+
+/** Playback states */
+#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
+
+/** Play events **/
+#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
+#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+
+#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PLAY;
+
+/** Playback interface methods */
+
+struct SLPlayItf_;
+typedef const struct SLPlayItf_ * const * SLPlayItf;
+
+typedef void (/*SLAPIENTRY*/ *slPlayCallback) (
+ SLPlayItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPlayItf_ {
+ SLresult (*SetPlayState) (
+ SLPlayItf self,
+ SLuint32 state
+ );
+ SLresult (*GetPlayState) (
+ SLPlayItf self,
+ SLuint32 *pState
+ );
+ SLresult (*GetDuration) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*GetPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLPlayItf self,
+ slPlayCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLPlayItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Prefetch status interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
+#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
+
+#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
+#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
+#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PREFETCHSTATUS;
+
+
+/** Prefetch status interface methods */
+
+struct SLPrefetchStatusItf_;
+typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
+
+typedef void (/*SLAPIENTRY*/ *slPrefetchCallback) (
+ SLPrefetchStatusItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPrefetchStatusItf_ {
+ SLresult (*GetPrefetchStatus) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pStatus
+ );
+ SLresult (*GetFillLevel) (
+ SLPrefetchStatusItf self,
+ SLpermille *pLevel
+ );
+ SLresult (*RegisterCallback) (
+ SLPrefetchStatusItf self,
+ slPrefetchCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille period
+ );
+ SLresult (*GetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille *pPeriod
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Playback Rate interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
+#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
+#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
+#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
+#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
+#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PLAYBACKRATE;
+
+struct SLPlaybackRateItf_;
+typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
+
+struct SLPlaybackRateItf_ {
+ SLresult (*SetRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate)(
+ SLPlaybackRateItf self,
+ SLpermille *pRate
+ );
+ SLresult (*SetPropertyConstraints)(
+ SLPlaybackRateItf self,
+ SLuint32 constraints
+ );
+ SLresult (*GetProperties)(
+ SLPlaybackRateItf self,
+ SLuint32 *pProperties
+ );
+ SLresult (*GetCapabilitiesOfRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate,
+ SLuint32 *pCapabilities
+ );
+ SLresult (*GetRateRange) (
+ SLPlaybackRateItf self,
+ SLuint8 index,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate,
+ SLpermille *pStepSize,
+ SLuint32 *pCapabilities
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Seek Interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
+#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_SEEK;
+
+struct SLSeekItf_;
+typedef const struct SLSeekItf_ * const * SLSeekItf;
+
+struct SLSeekItf_ {
+ SLresult (*SetPosition)(
+ SLSeekItf self,
+ SLmillisecond pos,
+ SLuint32 seekMode
+ );
+ SLresult (*SetLoop)(
+ SLSeekItf self,
+ SLboolean loopEnable,
+ SLmillisecond startPos,
+ SLmillisecond endPos
+ );
+ SLresult (*GetLoop)(
+ SLSeekItf self,
+ SLboolean *pLoopEnabled,
+ SLmillisecond *pStartPos,
+ SLmillisecond *pEndPos
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Standard Recording Interface */
+/*---------------------------------------------------------------------------*/
+
+/** Recording states */
+#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
+
+
+/** Record event **/
+#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
+#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
+#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
+#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_RECORD;
+
+struct SLRecordItf_;
+typedef const struct SLRecordItf_ * const * SLRecordItf;
+
+typedef void (/*SLAPIENTRY*/ *slRecordCallback) (
+ SLRecordItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+/** Recording interface methods */
+struct SLRecordItf_ {
+ SLresult (*SetRecordState) (
+ SLRecordItf self,
+ SLuint32 state
+ );
+ SLresult (*GetRecordState) (
+ SLRecordItf self,
+ SLuint32 *pState
+ );
+ SLresult (*SetDurationLimit) (
+ SLRecordItf self,
+ SLmillisecond msec
+ );
+ SLresult (*GetPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLRecordItf self,
+ slRecordCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLRecordItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Equalizer interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_EQUALIZER;
+
+struct SLEqualizerItf_;
+typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
+
+struct SLEqualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLEqualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLEqualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*GetNumberOfBands)(
+ SLEqualizerItf self,
+ SLuint16 *pAmount
+ );
+ SLresult (*GetBandLevelRange)(
+ SLEqualizerItf self,
+ SLmillibel *pMin,
+ SLmillibel *pMax
+ );
+ SLresult (*SetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel level
+ );
+ SLresult (*GetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetCenterFreq)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pCenter
+ );
+ SLresult (*GetBandFreqRange)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pMin,
+ SLmilliHertz *pMax
+ );
+ SLresult (*GetBand)(
+ SLEqualizerItf self,
+ SLmilliHertz frequency,
+ SLuint16 *pBand
+ );
+ SLresult (*GetCurrentPreset)(
+ SLEqualizerItf self,
+ SLuint16 *pPreset
+ );
+ SLresult (*UsePreset)(
+ SLEqualizerItf self,
+ SLuint16 index
+ );
+ SLresult (*GetNumberOfPresets)(
+ SLEqualizerItf self,
+ SLuint16 *pNumPresets
+ );
+ SLresult (*GetPresetName)(
+ SLEqualizerItf self,
+ SLuint16 index,
+ const SLchar ** ppName
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VOLUME;
+
+struct SLVolumeItf_;
+typedef const struct SLVolumeItf_ * const * SLVolumeItf;
+
+struct SLVolumeItf_ {
+ SLresult (*SetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel level
+ );
+ SLresult (*GetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetMaxVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pMaxLevel
+ );
+ SLresult (*SetMute) (
+ SLVolumeItf self,
+ SLboolean mute
+ );
+ SLresult (*GetMute) (
+ SLVolumeItf self,
+ SLboolean *pMute
+ );
+ SLresult (*EnableStereoPosition) (
+ SLVolumeItf self,
+ SLboolean enable
+ );
+ SLresult (*IsEnabledStereoPosition) (
+ SLVolumeItf self,
+ SLboolean *pEnable
+ );
+ SLresult (*SetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille stereoPosition
+ );
+ SLresult (*GetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille *pStereoPosition
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Device Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DEVICEVOLUME;
+
+struct SLDeviceVolumeItf_;
+typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
+
+struct SLDeviceVolumeItf_ {
+ SLresult (*GetVolumeScale) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pMinValue,
+ SLint32 *pMaxValue,
+ SLboolean *pIsMillibelScale
+ );
+ SLresult (*SetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 volume
+ );
+ SLresult (*GetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pVolume
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_BUFFERQUEUE;
+
+struct SLBufferQueueItf_;
+typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
+
+typedef void (/*SLAPIENTRY*/ *slBufferQueueCallback)(
+ SLBufferQueueItf caller,
+ void *pContext
+);
+
+/** Buffer queue state **/
+
+typedef struct SLBufferQueueState_ {
+ SLuint32 count;
+ SLuint32 playIndex;
+} SLBufferQueueState;
+
+
+struct SLBufferQueueItf_ {
+ SLresult (*Enqueue) (
+ SLBufferQueueItf self,
+ const void *pBuffer,
+ SLuint32 size
+ );
+ SLresult (*Clear) (
+ SLBufferQueueItf self
+ );
+ SLresult (*GetState) (
+ SLBufferQueueItf self,
+ SLBufferQueueState *pState
+ );
+ SLresult (*RegisterCallback) (
+ SLBufferQueueItf self,
+ slBufferQueueCallback callback,
+ void* pContext
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* PresetReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
+#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
+#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
+#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
+#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
+#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
+#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PRESETREVERB;
+
+struct SLPresetReverbItf_;
+typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
+
+struct SLPresetReverbItf_ {
+ SLresult (*SetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 preset
+ );
+ SLresult (*GetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 *pPreset
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* EnvironmentalReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
+ { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
+ { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
+ { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
+ { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
+ { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
+ { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
+ { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
+ { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
+ { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
+ { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
+ { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
+ { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
+ { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
+ { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
+ { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
+ { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
+ { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
+ { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
+ { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
+ { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
+ { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
+ { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
+ { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
+ { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
+ { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
+ { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
+ { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
+ { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
+ { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
+ { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
+
+
+typedef struct SLEnvironmentalReverbSettings_ {
+ SLmillibel roomLevel;
+ SLmillibel roomHFLevel;
+ SLmillisecond decayTime;
+ SLpermille decayHFRatio;
+ SLmillibel reflectionsLevel;
+ SLmillisecond reflectionsDelay;
+ SLmillibel reverbLevel;
+ SLmillisecond reverbDelay;
+ SLpermille diffusion;
+ SLpermille density;
+} SLEnvironmentalReverbSettings;
+
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
+
+
+struct SLEnvironmentalReverbItf_;
+typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
+
+struct SLEnvironmentalReverbItf_ {
+ SLresult (*SetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel room
+ );
+ SLresult (*GetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoom
+ );
+ SLresult (*SetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel roomHF
+ );
+ SLresult (*GetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoomHF
+ );
+ SLresult (*SetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond decayTime
+ );
+ SLresult (*GetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pDecayTime
+ );
+ SLresult (*SetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille decayHFRatio
+ );
+ SLresult (*GetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDecayHFRatio
+ );
+ SLresult (*SetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reflectionsLevel
+ );
+ SLresult (*GetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReflectionsLevel
+ );
+ SLresult (*SetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reflectionsDelay
+ );
+ SLresult (*GetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReflectionsDelay
+ );
+ SLresult (*SetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reverbLevel
+ );
+ SLresult (*GetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReverbLevel
+ );
+ SLresult (*SetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reverbDelay
+ );
+ SLresult (*GetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReverbDelay
+ );
+ SLresult (*SetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille diffusion
+ );
+ SLresult (*GetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDiffusion
+ );
+ SLresult (*SetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille density
+ );
+ SLresult (*GetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDensity
+ );
+ SLresult (*SetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ const SLEnvironmentalReverbSettings *pProperties
+ );
+ SLresult (*GetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ SLEnvironmentalReverbSettings *pProperties
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Effects Send Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_EFFECTSEND;
+
+struct SLEffectSendItf_;
+typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
+
+struct SLEffectSendItf_ {
+ SLresult (*EnableEffectSend) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLboolean enable,
+ SLmillibel initialLevel
+ );
+ SLresult (*IsEnabled) (
+ SLEffectSendItf self,
+ const void * pAuxEffect,
+ SLboolean *pEnable
+ );
+ SLresult (*SetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel directLevel
+ );
+ SLresult (*GetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel *pDirectLevel
+ );
+ SLresult (*SetSendLevel) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel sendLevel
+ );
+ SLresult (*GetSendLevel)(
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel *pSendLevel
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Grouping Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DGROUPING;
+
+
+struct SL3DGroupingItf_ ;
+typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
+
+struct SL3DGroupingItf_ {
+ SLresult (*Set3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf group
+ );
+ SLresult (*Get3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf *pGroup
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Commit Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DCOMMIT;
+
+struct SL3DCommitItf_;
+typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
+
+struct SL3DCommitItf_ {
+ SLresult (*Commit) (
+ SL3DCommitItf self
+ );
+ SLresult (*SetDeferred) (
+ SL3DCommitItf self,
+ SLboolean deferred
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Location Interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVec3D_ {
+ SLint32 x;
+ SLint32 y;
+ SLint32 z;
+} SLVec3D;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DLOCATION;
+
+struct SL3DLocationItf_;
+typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
+
+struct SL3DLocationItf_ {
+ SLresult (*SetLocationCartesian) (
+ SL3DLocationItf self,
+ const SLVec3D *pLocation
+ );
+ SLresult (*SetLocationSpherical) (
+ SL3DLocationItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter distance
+ );
+ SLresult (*Move) (
+ SL3DLocationItf self,
+ const SLVec3D *pMovement
+ );
+ SLresult (*GetLocationCartesian) (
+ SL3DLocationItf self,
+ SLVec3D *pLocation
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DLocationItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DLocationItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*Rotate) (
+ SL3DLocationItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DLocationItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Doppler Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DDOPPLER;
+
+struct SL3DDopplerItf_;
+typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
+
+struct SL3DDopplerItf_ {
+ SLresult (*SetVelocityCartesian) (
+ SL3DDopplerItf self,
+ const SLVec3D *pVelocity
+ );
+ SLresult (*SetVelocitySpherical) (
+ SL3DDopplerItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter speed
+ );
+ SLresult (*GetVelocityCartesian) (
+ SL3DDopplerItf self,
+ SLVec3D *pVelocity
+ );
+ SLresult (*SetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille dopplerFactor
+ );
+ SLresult (*GetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille *pDopplerFactor
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Source Interface and associated defines */
+/* --------------------------------------------------------------------------*/
+
+#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
+#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DSOURCE;
+
+struct SL3DSourceItf_;
+typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
+
+struct SL3DSourceItf_ {
+ SLresult (*SetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean headRelative
+ );
+ SLresult (*GetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean *pHeadRelative
+ );
+ SLresult (*SetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter minDistance,
+ SLmillimeter maxDistance
+ );
+ SLresult (*GetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter *pMinDistance,
+ SLmillimeter *pMaxDistance
+ );
+ SLresult (*SetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean mute
+ );
+ SLresult (*GetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean *pMute
+ );
+ SLresult (*SetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille rolloffFactor
+ );
+ SLresult (*GetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRolloffFactor
+ );
+ SLresult (*SetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille roomRolloffFactor
+ );
+ SLresult (*GetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRoomRolloffFactor
+ );
+ SLresult (*SetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 model
+ );
+ SLresult (*GetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 *pModel
+ );
+ SLresult (*SetCone) (
+ SL3DSourceItf self,
+ SLmillidegree innerAngle,
+ SLmillidegree outerAngle,
+ SLmillibel outerLevel
+ );
+ SLresult (*GetCone) (
+ SL3DSourceItf self,
+ SLmillidegree *pInnerAngle,
+ SLmillidegree *pOuterAngle,
+ SLmillibel *pOuterLevel
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Macroscopic Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DMACROSCOPIC;
+
+struct SL3DMacroscopicItf_;
+typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
+
+struct SL3DMacroscopicItf_ {
+ SLresult (*SetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter width,
+ SLmillimeter height,
+ SLmillimeter depth
+ );
+ SLresult (*GetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter *pWidth,
+ SLmillimeter *pHeight,
+ SLmillimeter *pDepth
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DMacroscopicItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*Rotate) (
+ SL3DMacroscopicItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Mute Solo Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MUTESOLO;
+
+struct SLMuteSoloItf_;
+typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
+
+struct SLMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pSolo
+ );
+ SLresult (*GetNumChannels) (
+ SLMuteSoloItf self,
+ SLuint8 *pNumChannels
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Interface Management Interface and associated types and macros */
+/* --------------------------------------------------------------------------*/
+
+#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
+
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
+
+struct SLDynamicInterfaceManagementItf_;
+typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
+
+typedef void (/*SLAPIENTRY*/ *slDynamicInterfaceManagementCallback) (
+ SLDynamicInterfaceManagementItf caller,
+ void * pContext,
+ SLuint32 event,
+ SLresult result,
+ const SLInterfaceID iid
+);
+
+
+struct SLDynamicInterfaceManagementItf_ {
+ SLresult (*AddInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RemoveInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid
+ );
+ SLresult (*ResumeInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RegisterCallback) (
+ SLDynamicInterfaceManagementItf self,
+ slDynamicInterfaceManagementCallback callback,
+ void * pContext
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Midi Message Interface and associated types */
+/* --------------------------------------------------------------------------*/
+
+#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
+#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
+#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
+#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
+#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
+#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
+#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDIMESSAGE;
+
+struct SLMIDIMessageItf_;
+typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
+
+typedef void (/*SLAPIENTRY*/ *slMetaEventCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 type,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+typedef void (/*SLAPIENTRY*/ *slMIDIMessageCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 statusByte,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+struct SLMIDIMessageItf_ {
+ SLresult (*SendMessage) (
+ SLMIDIMessageItf self,
+ const SLuint8 *data,
+ SLuint32 length
+ );
+ SLresult (*RegisterMetaEventCallback) (
+ SLMIDIMessageItf self,
+ slMetaEventCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterMIDIMessageCallback) (
+ SLMIDIMessageItf self,
+ slMIDIMessageCallback callback,
+ void *pContext
+ );
+ SLresult (*AddMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self,
+ SLuint32 messageType
+ );
+ SLresult (*ClearMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Mute Solo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDIMUTESOLO;
+
+struct SLMIDIMuteSoloItf_;
+typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
+
+struct SLMIDIMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pSolo
+ );
+ SLresult (*GetTrackCount) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 *pCount
+ );
+ SLresult (*SetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean mute
+ );
+ SLresult (*GetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pMute
+ );
+ SLresult (*SetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean solo
+ );
+ SLresult (*GetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pSolo
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Tempo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDITEMPO;
+
+struct SLMIDITempoItf_;
+typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
+
+struct SLMIDITempoItf_ {
+ SLresult (*SetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 tpqn
+ );
+ SLresult (*GetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 *pTpqn
+ );
+ SLresult (*SetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond uspqn
+ );
+ SLresult (*GetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond *uspqn
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Time interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDITIME;
+
+struct SLMIDITimeItf_;
+typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
+
+struct SLMIDITimeItf_ {
+ SLresult (*GetDuration) (
+ SLMIDITimeItf self,
+ SLuint32 *pDuration
+ );
+ SLresult (*SetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 position
+ );
+ SLresult (*GetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 *pPosition
+ );
+ SLresult (*SetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 startTick,
+ SLuint32 numTicks
+ );
+ SLresult (*GetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 *pStartTick,
+ SLuint32 *pNumTicks
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Decoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/*Audio Codec related defines*/
+
+#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
+#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
+
+#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
+#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
+#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
+#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
+#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
+#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
+#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
+#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
+
+#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
+#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
+#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
+#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
+
+#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
+
+#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
+
+#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
+#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
+#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
+
+#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
+#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
+
+#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
+#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
+
+#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
+
+typedef struct SLAudioCodecDescriptor_ {
+ SLuint32 maxChannels;
+ SLuint32 minBitsPerSample;
+ SLuint32 maxBitsPerSample;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *pSampleRatesSupported;
+ SLuint32 numSampleRatesSupported;
+ SLuint32 minBitRate;
+ SLuint32 maxBitRate;
+ SLboolean isBitrateRangeContinuous;
+ SLuint32 *pBitratesSupported;
+ SLuint32 numBitratesSupported;
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecDescriptor;
+
+/*Structure used to retrieve the profile and level settings supported by an audio encoder */
+
+typedef struct SLAudioCodecProfileMode_ {
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecProfileMode;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
+
+struct SLAudioDecoderCapabilitiesItf_;
+typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
+
+struct SLAudioDecoderCapabilitiesItf_ {
+ SLresult (*GetAudioDecoders) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 * pNumDecoders ,
+ SLuint32 *pDecoderIds
+ );
+ SLresult (*GetAudioDecoderCapabilities) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 decoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor *pDescriptor
+ );
+};
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/* Structure used when setting audio encoding parameters */
+
+typedef struct SLAudioEncoderSettings_ {
+ SLuint32 encoderId;
+ SLuint32 channelsIn;
+ SLuint32 channelsOut;
+ SLmilliHertz sampleRate;
+ SLuint32 bitRate;
+ SLuint32 bitsPerSample;
+ SLuint32 rateControl;
+ SLuint32 profileSetting;
+ SLuint32 levelSetting;
+ SLuint32 channelMode;
+ SLuint32 streamFormat;
+ SLuint32 encodeOptions;
+ SLuint32 blockAlignment;
+} SLAudioEncoderSettings;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
+
+struct SLAudioEncoderCapabilitiesItf_;
+typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
+
+struct SLAudioEncoderCapabilitiesItf_ {
+ SLresult (*GetAudioEncoders) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 *pNumEncoders ,
+ SLuint32 *pEncoderIds
+ );
+ SLresult (*GetAudioEncoderCapabilities) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 encoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor * pDescriptor
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOENCODER;
+
+struct SLAudioEncoderItf_;
+typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
+
+struct SLAudioEncoderItf_ {
+ SLresult (*SetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+ SLresult (*GetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Bass Boost Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_BASSBOOST;
+
+struct SLBassBoostItf_;
+typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
+
+struct SLBassBoostItf_ {
+ SLresult (*SetEnabled)(
+ SLBassBoostItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLBassBoostItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLBassBoostItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLBassBoostItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLBassBoostItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Pitch Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PITCH;
+
+struct SLPitchItf_;
+typedef const struct SLPitchItf_ * const * SLPitchItf;
+
+struct SLPitchItf_ {
+ SLresult (*SetPitch) (
+ SLPitchItf self,
+ SLpermille pitch
+ );
+ SLresult (*GetPitch) (
+ SLPitchItf self,
+ SLpermille *pPitch
+ );
+ SLresult (*GetPitchCapabilities) (
+ SLPitchItf self,
+ SLpermille *pMinPitch,
+ SLpermille *pMaxPitch
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Rate Pitch Interface */
+/* RatePitchItf is an interface for controlling the rate a sound is played */
+/* back. A change in rate will cause a change in pitch. */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_RATEPITCH;
+
+struct SLRatePitchItf_;
+typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
+
+struct SLRatePitchItf_ {
+ SLresult (*SetRate) (
+ SLRatePitchItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate) (
+ SLRatePitchItf self,
+ SLpermille *pRate
+ );
+ SLresult (*GetRatePitchCapabilities) (
+ SLRatePitchItf self,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Virtualizer Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VIRTUALIZER;
+
+struct SLVirtualizerItf_;
+typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
+
+struct SLVirtualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLVirtualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLVirtualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLVirtualizerItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLVirtualizerItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLVirtualizerItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Visualization Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VISUALIZATION;
+
+struct SLVisualizationItf_;
+typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
+
+typedef void (/*SLAPIENTRY*/ *slVisualizationCallback) (
+ void *pContext,
+ const SLuint8 waveform[],
+ const SLuint8 fft[],
+ SLmilliHertz samplerate
+);
+
+struct SLVisualizationItf_{
+ SLresult (*RegisterVisualizationCallback)(
+ SLVisualizationItf self,
+ slVisualizationCallback callback,
+ void *pContext,
+ SLmilliHertz rate
+ );
+ SLresult (*GetMaxRate)(
+ SLVisualizationItf self,
+ SLmilliHertz* pRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENGINE;
+
+struct SLEngineItf_;
+typedef const struct SLEngineItf_ * const * SLEngineItf;
+
+
+struct SLEngineItf_ {
+
+ SLresult (*CreateLEDDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateVibraDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioRecorder) (
+ SLEngineItf self,
+ SLObjectItf * pRecorder,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMidiPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pMIDISrc,
+ SLDataSource *pBankSrc,
+ SLDataSink *pAudioOutput,
+ SLDataSink *pVibra,
+ SLDataSink *pLEDArray,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateListener) (
+ SLEngineItf self,
+ SLObjectItf * pListener,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*Create3DGroup) (
+ SLEngineItf self,
+ SLObjectItf * pGroup,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateOutputMix) (
+ SLEngineItf self,
+ SLObjectItf * pMix,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMetadataExtractor) (
+ SLEngineItf self,
+ SLObjectItf * pMetadataExtractor,
+ SLDataSource * pDataSource,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateExtensionObject) (
+ SLEngineItf self,
+ SLObjectItf * pObject,
+ void * pParameters,
+ SLuint32 objectID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*QueryNumSupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 * pNumSupportedInterfaces
+ );
+ SLresult (*QuerySupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+ );
+ SLresult (*QueryNumSupportedExtensions) (
+ SLEngineItf self,
+ SLuint32 * pNumExtensions
+ );
+ SLresult (*QuerySupportedExtension) (
+ SLEngineItf self,
+ SLuint32 index,
+ SLchar * pExtensionName,
+ SLint16 * pNameLength
+ );
+ SLresult (*IsExtensionSupported) (
+ SLEngineItf self,
+ const SLchar * pExtensionName,
+ SLboolean * pSupported
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENGINECAPABILITIES;
+
+struct SLEngineCapabilitiesItf_;
+typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
+
+struct SLEngineCapabilitiesItf_ {
+ SLresult (*QuerySupportedProfiles) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 *pProfilesSupported
+ );
+ SLresult (*QueryAvailableVoices) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 voiceType,
+ SLint16 *pNumMaxVoices,
+ SLboolean *pIsAbsoluteMax,
+ SLint16 *pNumFreeVoices
+ );
+ SLresult (*QueryNumberOfMIDISynthesizers) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pNumMIDIsynthesizers
+ );
+ SLresult (*QueryAPIVersion) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pMajor,
+ SLint16 *pMinor,
+ SLint16 *pStep
+ );
+ SLresult (*QueryLEDCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pLEDDeviceID,
+ SLLEDDescriptor *pDescriptor
+ );
+ SLresult (*QueryVibraCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pVibraDeviceID,
+ SLVibraDescriptor *pDescriptor
+ );
+ SLresult (*IsThreadSafe) (
+ SLEngineCapabilitiesItf self,
+ SLboolean *pIsThreadSafe
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Thread Sync Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_THREADSYNC;
+
+struct SLThreadSyncItf_;
+typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
+
+
+struct SLThreadSyncItf_ {
+ SLresult (*EnterCriticalSection) (
+ SLThreadSyncItf self
+ );
+ SLresult (*ExitCriticalSection) (
+ SLThreadSyncItf self
+ );
+};
+
+
+/*****************************************************************************/
+/* SL engine constructor */
+/*****************************************************************************/
+
+#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
+#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
+
+typedef struct SLEngineOption_ {
+ SLuint32 feature;
+ SLuint32 data;
+} SLEngineOption;
+
+
+SLresult SLAPIENTRY slCreateEngine(
+ SLObjectItf *pEngine,
+ SLuint32 numOptions,
+ const SLEngineOption *pEngineOptions,
+ SLuint32 numInterfaces,
+ const SLInterfaceID *pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+);
+
+SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
+ SLuint32 * pNumSupportedInterfaces
+);
+
+SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* OPENSL_ES_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Android.h b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Android.h
new file mode 100644
index 0000000..829df68
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Android.h
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPENSL_ES_ANDROID_H_
+#define OPENSL_ES_ANDROID_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Android common types */
+/*---------------------------------------------------------------------------*/
+
+typedef sl_int64_t SLAint64; /* 64 bit signed integer */
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECT;
+
+/** Android Effect interface methods */
+
+struct SLAndroidEffectItf_;
+typedef const struct SLAndroidEffectItf_ * const * SLAndroidEffectItf;
+
+struct SLAndroidEffectItf_ {
+
+ SLresult (*CreateEffect) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId);
+
+ SLresult (*ReleaseEffect) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId);
+
+ SLresult (*SetEnabled) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean enabled);
+
+ SLresult (*IsEnabled) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean *pEnabled);
+
+ SLresult (*SendCommand) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLuint32 command,
+ SLuint32 commandSize,
+ void *pCommandData,
+ SLuint32 *replySize,
+ void *pReplyData);
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect Send interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECTSEND;
+
+/** Android Effect Send interface methods */
+
+struct SLAndroidEffectSendItf_;
+typedef const struct SLAndroidEffectSendItf_ * const * SLAndroidEffectSendItf;
+
+struct SLAndroidEffectSendItf_ {
+ SLresult (*EnableEffectSend) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean enable,
+ SLmillibel initialLevel
+ );
+ SLresult (*IsEnabled) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean *pEnable
+ );
+ SLresult (*SetDirectLevel) (
+ SLAndroidEffectSendItf self,
+ SLmillibel directLevel
+ );
+ SLresult (*GetDirectLevel) (
+ SLAndroidEffectSendItf self,
+ SLmillibel *pDirectLevel
+ );
+ SLresult (*SetSendLevel) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLmillibel sendLevel
+ );
+ SLresult (*GetSendLevel)(
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLmillibel *pSendLevel
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect Capabilities interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECTCAPABILITIES;
+
+/** Android Effect Capabilities interface methods */
+
+struct SLAndroidEffectCapabilitiesItf_;
+typedef const struct SLAndroidEffectCapabilitiesItf_ * const * SLAndroidEffectCapabilitiesItf;
+
+struct SLAndroidEffectCapabilitiesItf_ {
+
+ SLresult (*QueryNumEffects) (SLAndroidEffectCapabilitiesItf self,
+ SLuint32 *pNumSupportedEffects);
+
+
+ SLresult (*QueryEffect) (SLAndroidEffectCapabilitiesItf self,
+ SLuint32 index,
+ SLInterfaceID *pEffectType,
+ SLInterfaceID *pEffectImplementation,
+ SLchar *pName,
+ SLuint16 *pNameSize);
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Configuration interface */
+/*---------------------------------------------------------------------------*/
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDCONFIGURATION;
+
+/** Android Configuration interface methods */
+
+struct SLAndroidConfigurationItf_;
+typedef const struct SLAndroidConfigurationItf_ * const * SLAndroidConfigurationItf;
+
+struct SLAndroidConfigurationItf_ {
+
+ SLresult (*SetConfiguration) (SLAndroidConfigurationItf self,
+ const SLchar *configKey,
+ const void *pConfigValue,
+ SLuint32 valueSize);
+
+ SLresult (*GetConfiguration) (SLAndroidConfigurationItf self,
+ const SLchar *configKey,
+ SLuint32 *pValueSize,
+ void *pConfigValue
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Simple Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDSIMPLEBUFFERQUEUE;
+
+struct SLAndroidSimpleBufferQueueItf_;
+typedef const struct SLAndroidSimpleBufferQueueItf_ * const * SLAndroidSimpleBufferQueueItf;
+
+typedef void (/*SLAPIENTRY*/ *slAndroidSimpleBufferQueueCallback)(
+ SLAndroidSimpleBufferQueueItf caller,
+ void *pContext
+);
+
+/** Android simple buffer queue state **/
+
+typedef struct SLAndroidSimpleBufferQueueState_ {
+ SLuint32 count;
+ SLuint32 index;
+} SLAndroidSimpleBufferQueueState;
+
+
+struct SLAndroidSimpleBufferQueueItf_ {
+ SLresult (*Enqueue) (
+ SLAndroidSimpleBufferQueueItf self,
+ const void *pBuffer,
+ SLuint32 size
+ );
+ SLresult (*Clear) (
+ SLAndroidSimpleBufferQueueItf self
+ );
+ SLresult (*GetState) (
+ SLAndroidSimpleBufferQueueItf self,
+ SLAndroidSimpleBufferQueueState *pState
+ );
+ SLresult (*RegisterCallback) (
+ SLAndroidSimpleBufferQueueItf self,
+ slAndroidSimpleBufferQueueCallback callback,
+ void* pContext
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android File Descriptor Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define SL_DATALOCATOR_ANDROIDFD ((SLuint32) 0x800007BC)
+
+#define SL_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE ((SLAint64) 0xFFFFFFFFFFFFFFFFll)
+
+/** File Descriptor-based data locator definition, locatorType must be SL_DATALOCATOR_ANDROIDFD */
+typedef struct SLDataLocator_AndroidFD_ {
+ SLuint32 locatorType;
+ SLint32 fd;
+ SLAint64 offset;
+ SLAint64 length;
+} SLDataLocator_AndroidFD;
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Android Simple Buffer Queue Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE ((SLuint32) 0x800007BD)
+
+/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE*/
+typedef struct SLDataLocator_AndroidSimpleBufferQueue {
+ SLuint32 locatorType;
+ SLuint32 numBuffers;
+} SLDataLocator_AndroidSimpleBufferQueue;
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROID_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_AndroidConfiguration.h b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_AndroidConfiguration.h
new file mode 100644
index 0000000..bff6410
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_AndroidConfiguration.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_
+#define OPENSL_ES_ANDROIDCONFIGURATION_H_
+
+#ifdef __cplusplus
+extern "C" {
+
+/*---------------------------------------------------------------------------*/
+/* Android AudioRecorder configuration */
+/*---------------------------------------------------------------------------*/
+
+/** Audio recording preset */
+/** Audio recording preset key */
+#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
+/** Audio recording preset values */
+/** preset "none" cannot be set, it is used to indicate the current settings
+ * do not match any of the presets. */
+#define SL_ANDROID_RECORDING_PRESET_NONE ((SLuint32) 0x00000000)
+/** generic recording configuration on the platform */
+#define SL_ANDROID_RECORDING_PRESET_GENERIC ((SLuint32) 0x00000001)
+/** uses the microphone audio source with the same orientation as the camera
+ * if available, the main device microphone otherwise */
+#define SL_ANDROID_RECORDING_PRESET_CAMCORDER ((SLuint32) 0x00000002)
+/** uses the main microphone tuned for voice recognition */
+#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003)
+
+/*---------------------------------------------------------------------------*/
+/* Android AudioPlayer configuration */
+/*---------------------------------------------------------------------------*/
+
+/** Audio playback stream type */
+/** Audio playback stream type key */
+#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
+
+/** Audio playback stream type values */
+/* same as android.media.AudioManager.STREAM_VOICE_CALL */
+#define SL_ANDROID_STREAM_VOICE ((SLint32) 0x00000000)
+/* same as android.media.AudioManager.STREAM_SYSTEM */
+#define SL_ANDROID_STREAM_SYSTEM ((SLint32) 0x00000001)
+/* same as android.media.AudioManager.STREAM_RING */
+#define SL_ANDROID_STREAM_RING ((SLint32) 0x00000002)
+/* same as android.media.AudioManager.STREAM_MUSIC */
+#define SL_ANDROID_STREAM_MEDIA ((SLint32) 0x00000003)
+/* same as android.media.AudioManager.STREAM_ALARM */
+#define SL_ANDROID_STREAM_ALARM ((SLint32) 0x00000004)
+/* same as android.media.AudioManager.STREAM_NOTIFICATION */
+#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
+
+
+
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Platform.h b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Platform.h
new file mode 100644
index 0000000..ea401a7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/SLES/OpenSLES_Platform.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and /or associated documentation files (the "Materials "), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * 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 Materials.
+ *
+ * THE MATERIALS ARE 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
+ * AUTHORS OR COPYRIGHT HOLDERS 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 MATERIALS OR THE USE OR OTHER DEALINGS IN THE
+ * MATERIALS.
+ *
+ * OpenSLES_Platform.h - OpenSL ES version 1.0
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file contains definitions for the base types and the */
+/* SLAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */
+/* the correct definitions specific to the platform being used. */
+/****************************************************************************/
+
+#ifndef _OPENSLES_PLATFORM_H_
+#define _OPENSLES_PLATFORM_H_
+
+typedef unsigned char sl_uint8_t;
+typedef signed char sl_int8_t;
+typedef unsigned short sl_uint16_t;
+typedef signed short sl_int16_t;
+typedef unsigned long sl_uint32_t;
+typedef signed long sl_int32_t;
+typedef long long sl_int64_t;
+
+#ifndef SLAPIENTRY
+#ifdef __GNUC__
+#define SLAPIENTRY /* override per-platform */
+#else
+#define SLAPIENTRY __declspec(dllimport)
+#endif
+#endif
+
+#endif /* _OPENSLES_PLATFORM_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/alloca.h b/6/platforms/android-9/arch-arm/usr/include/alloca.h
new file mode 120000
index 0000000..74cb920
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/api-level.h b/6/platforms/android-9/arch-arm/usr/include/android/api-level.h
new file mode 100644
index 0000000..a644a66
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 9
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/asset_manager.h b/6/platforms/android-9/arch-arm/usr/include/android/asset_manager.h
new file mode 100644
index 0000000..4fa0ef3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/asset_manager.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_ASSET_MANAGER_H
+#define ANDROID_ASSET_MANAGER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AAssetManager;
+typedef struct AAssetManager AAssetManager;
+
+struct AAssetDir;
+typedef struct AAssetDir AAssetDir;
+
+struct AAsset;
+typedef struct AAsset AAsset;
+
+/* Available modes for opening assets */
+enum {
+ AASSET_MODE_UNKNOWN = 0,
+ AASSET_MODE_RANDOM = 1,
+ AASSET_MODE_STREAMING = 2,
+ AASSET_MODE_BUFFER = 3
+};
+
+
+/**
+ * Open the named directory within the asset hierarchy. The directory can then
+ * be inspected with the AAssetDir functions. To open the top-level directory,
+ * pass in "" as the dirName.
+ *
+ * The object returned here should be freed by calling AAssetDir_close().
+ */
+AAssetDir* AAssetManager_openDir(AAssetManager* mgr, const char* dirName);
+
+/**
+ * Open an asset.
+ *
+ * The object returned here should be freed by calling AAsset_close().
+ */
+AAsset* AAssetManager_open(AAssetManager* mgr, const char* filename, int mode);
+
+/**
+ * Iterate over the files in an asset directory. A NULL string is returned
+ * when all the file names have been returned.
+ *
+ * The returned file name is suitable for passing to AAssetManager_open().
+ *
+ * The string returned here is owned by the AssetDir implementation and is not
+ * guaranteed to remain valid if any other calls are made on this AAssetDir
+ * instance.
+ */
+const char* AAssetDir_getNextFileName(AAssetDir* assetDir);
+
+/**
+ * Reset the iteration state of AAssetDir_getNextFileName() to the beginning.
+ */
+void AAssetDir_rewind(AAssetDir* assetDir);
+
+/**
+ * Close an opened AAssetDir, freeing any related resources.
+ */
+void AAssetDir_close(AAssetDir* assetDir);
+
+/**
+ * Attempt to read 'count' bytes of data from the current offset.
+ *
+ * Returns the number of bytes read, zero on EOF, or < 0 on error.
+ */
+int AAsset_read(AAsset* asset, void* buf, size_t count);
+
+/**
+ * Seek to the specified offset within the asset data. 'whence' uses the
+ * same constants as lseek()/fseek().
+ *
+ * Returns the new position on success, or (off_t) -1 on error.
+ */
+off_t AAsset_seek(AAsset* asset, off_t offset, int whence);
+
+/**
+ * Close the asset, freeing all associated resources.
+ */
+void AAsset_close(AAsset* asset);
+
+/**
+ * Get a pointer to a buffer holding the entire contents of the assset.
+ *
+ * Returns NULL on failure.
+ */
+const void* AAsset_getBuffer(AAsset* asset);
+
+/**
+ * Report the total size of the asset data.
+ */
+off_t AAsset_getLength(AAsset* asset);
+
+/**
+ * Report the total amount of asset data that can be read from the current position.
+ */
+off_t AAsset_getRemainingLength(AAsset* asset);
+
+/**
+ * Open a new file descriptor that can be used to read the asset data.
+ *
+ * Returns < 0 if direct fd access is not possible (for example, if the asset is
+ * compressed).
+ */
+int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
+
+/**
+ * Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
+ * mmapped).
+ */
+int AAsset_isAllocated(AAsset* asset);
+
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_ASSET_MANAGER_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/asset_manager_jni.h b/6/platforms/android-9/arch-arm/usr/include/android/asset_manager_jni.h
new file mode 100644
index 0000000..aec2d3c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/asset_manager_jni.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_ASSET_MANAGER_JNI_H
+#define ANDROID_ASSET_MANAGER_JNI_H
+
+#include <android/asset_manager.h>
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager
+ * object. Note that the caller is responsible for obtaining and holding a VM reference
+ * to the jobject to prevent its being garbage collected while the native object is
+ * in use.
+ */
+AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_ASSET_MANAGER_JNI_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/bitmap.h b/6/platforms/android-9/arch-arm/usr/include/android/bitmap.h
new file mode 100644
index 0000000..160e34a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/bitmap.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BITMAP_H
+#define ANDROID_BITMAP_H
+
+#include <sys/cdefs.h>
+#include <stdint.h>
+#include <jni.h>
+
+__BEGIN_DECLS
+
+#define ANDROID_BITMAP_RESUT_SUCCESS 0
+#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1
+#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2
+#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3
+
+enum AndroidBitmapFormat {
+ ANDROID_BITMAP_FORMAT_NONE = 0,
+ ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
+ ANDROID_BITMAP_FORMAT_RGB_565 = 4,
+ ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
+ ANDROID_BITMAP_FORMAT_A_8 = 8,
+};
+
+typedef struct {
+ uint32_t width;
+ uint32_t height;
+ uint32_t stride;
+ int32_t format;
+ uint32_t flags; // 0 for now
+} AndroidBitmapInfo;
+
+/**
+ * Given a java bitmap object, fill out the AndroidBitmap struct for it.
+ * If the call fails, the info parameter will be ignored
+ */
+int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
+ AndroidBitmapInfo* info);
+
+/**
+ * Given a java bitmap object, attempt to lock the pixel address.
+ * Locking will ensure that the memory for the pixels will not move
+ * until the unlockPixels call, and ensure that, if the pixels had been
+ * previously purged, they will have been restored.
+ *
+ * If this call succeeds, it must be balanced by a call to
+ * AndroidBitmap_unlockPixels, after which time the address of the pixels should
+ * no longer be used.
+ *
+ * If this succeeds, *addrPtr will be set to the pixel address. If the call
+ * fails, addrPtr will be ignored.
+ */
+int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
+
+/**
+ * Call this to balanace a successful call to AndroidBitmap_lockPixels
+ */
+int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
+
+__END_DECLS
+
+#endif /* ANDROID_BITMAP_H */
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/configuration.h b/6/platforms/android-9/arch-arm/usr/include/android/configuration.h
new file mode 100644
index 0000000..99e8f97
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/configuration.h
@@ -0,0 +1,319 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_CONFIGURATION_H
+#define ANDROID_CONFIGURATION_H
+
+#include <android/asset_manager.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AConfiguration;
+typedef struct AConfiguration AConfiguration;
+
+enum {
+ ACONFIGURATION_ORIENTATION_ANY = 0x0000,
+ ACONFIGURATION_ORIENTATION_PORT = 0x0001,
+ ACONFIGURATION_ORIENTATION_LAND = 0x0002,
+ ACONFIGURATION_ORIENTATION_SQUARE = 0x0003,
+
+ ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000,
+ ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001,
+ ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002,
+ ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003,
+
+ ACONFIGURATION_DENSITY_DEFAULT = 0,
+ ACONFIGURATION_DENSITY_LOW = 120,
+ ACONFIGURATION_DENSITY_MEDIUM = 160,
+ ACONFIGURATION_DENSITY_HIGH = 240,
+ ACONFIGURATION_DENSITY_NONE = 0xffff,
+
+ ACONFIGURATION_KEYBOARD_ANY = 0x0000,
+ ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001,
+ ACONFIGURATION_KEYBOARD_QWERTY = 0x0002,
+ ACONFIGURATION_KEYBOARD_12KEY = 0x0003,
+
+ ACONFIGURATION_NAVIGATION_ANY = 0x0000,
+ ACONFIGURATION_NAVIGATION_NONAV = 0x0001,
+ ACONFIGURATION_NAVIGATION_DPAD = 0x0002,
+ ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003,
+ ACONFIGURATION_NAVIGATION_WHEEL = 0x0004,
+
+ ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000,
+ ACONFIGURATION_KEYSHIDDEN_NO = 0x0001,
+ ACONFIGURATION_KEYSHIDDEN_YES = 0x0002,
+ ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003,
+
+ ACONFIGURATION_NAVHIDDEN_ANY = 0x0000,
+ ACONFIGURATION_NAVHIDDEN_NO = 0x0001,
+ ACONFIGURATION_NAVHIDDEN_YES = 0x0002,
+
+ ACONFIGURATION_SCREENSIZE_ANY = 0x00,
+ ACONFIGURATION_SCREENSIZE_SMALL = 0x01,
+ ACONFIGURATION_SCREENSIZE_NORMAL = 0x02,
+ ACONFIGURATION_SCREENSIZE_LARGE = 0x03,
+ ACONFIGURATION_SCREENSIZE_XLARGE = 0x04,
+
+ ACONFIGURATION_SCREENLONG_ANY = 0x00,
+ ACONFIGURATION_SCREENLONG_NO = 0x1,
+ ACONFIGURATION_SCREENLONG_YES = 0x2,
+
+ ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00,
+ ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
+ ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
+ ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
+
+ ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
+ ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
+ ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2,
+
+ ACONFIGURATION_MCC = 0x0001,
+ ACONFIGURATION_MNC = 0x0002,
+ ACONFIGURATION_LOCALE = 0x0004,
+ ACONFIGURATION_TOUCHSCREEN = 0x0008,
+ ACONFIGURATION_KEYBOARD = 0x0010,
+ ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020,
+ ACONFIGURATION_NAVIGATION = 0x0040,
+ ACONFIGURATION_ORIENTATION = 0x0080,
+ ACONFIGURATION_DENSITY = 0x0100,
+ ACONFIGURATION_SCREEN_SIZE = 0x0200,
+ ACONFIGURATION_VERSION = 0x0400,
+ ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
+ ACONFIGURATION_UI_MODE = 0x1000,
+};
+
+/**
+ * Create a new AConfiguration, initialized with no values set.
+ */
+AConfiguration* AConfiguration_new();
+
+/**
+ * Free an AConfiguration that was previously created with
+ * AConfiguration_new().
+ */
+void AConfiguration_delete(AConfiguration* config);
+
+/**
+ * Create and return a new AConfiguration based on the current configuration in
+ * use in the given AssetManager.
+ */
+void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am);
+
+/**
+ * Copy the contents of 'src' to 'dest'.
+ */
+void AConfiguration_copy(AConfiguration* dest, AConfiguration* src);
+
+/**
+ * Return the current MCC set in the configuration. 0 if not set.
+ */
+int32_t AConfiguration_getMcc(AConfiguration* config);
+
+/**
+ * Set the current MCC in the configuration. 0 to clear.
+ */
+void AConfiguration_setMcc(AConfiguration* config, int32_t mcc);
+
+/**
+ * Return the current MNC set in the configuration. 0 if not set.
+ */
+int32_t AConfiguration_getMnc(AConfiguration* config);
+
+/**
+ * Set the current MNC in the configuration. 0 to clear.
+ */
+void AConfiguration_setMnc(AConfiguration* config, int32_t mnc);
+
+/**
+ * Return the current language code set in the configuration. The output will
+ * be filled with an array of two characters. They are not 0-terminated. If
+ * a language is not set, they will be 0.
+ */
+void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage);
+
+/**
+ * Set the current language code in the configuration, from the first two
+ * characters in the string.
+ */
+void AConfiguration_setLanguage(AConfiguration* config, const char* language);
+
+/**
+ * Return the current country code set in the configuration. The output will
+ * be filled with an array of two characters. They are not 0-terminated. If
+ * a country is not set, they will be 0.
+ */
+void AConfiguration_getCountry(AConfiguration* config, char* outCountry);
+
+/**
+ * Set the current country code in the configuration, from the first two
+ * characters in the string.
+ */
+void AConfiguration_setCountry(AConfiguration* config, const char* country);
+
+/**
+ * Return the current ACONFIGURATION_ORIENTATION_* set in the configuration.
+ */
+int32_t AConfiguration_getOrientation(AConfiguration* config);
+
+/**
+ * Set the current orientation in the configuration.
+ */
+void AConfiguration_setOrientation(AConfiguration* config, int32_t orientation);
+
+/**
+ * Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration.
+ */
+int32_t AConfiguration_getTouchscreen(AConfiguration* config);
+
+/**
+ * Set the current touchscreen in the configuration.
+ */
+void AConfiguration_setTouchscreen(AConfiguration* config, int32_t touchscreen);
+
+/**
+ * Return the current ACONFIGURATION_DENSITY_* set in the configuration.
+ */
+int32_t AConfiguration_getDensity(AConfiguration* config);
+
+/**
+ * Set the current density in the configuration.
+ */
+void AConfiguration_setDensity(AConfiguration* config, int32_t density);
+
+/**
+ * Return the current ACONFIGURATION_KEYBOARD_* set in the configuration.
+ */
+int32_t AConfiguration_getKeyboard(AConfiguration* config);
+
+/**
+ * Set the current keyboard in the configuration.
+ */
+void AConfiguration_setKeyboard(AConfiguration* config, int32_t keyboard);
+
+/**
+ * Return the current ACONFIGURATION_NAVIGATION_* set in the configuration.
+ */
+int32_t AConfiguration_getNavigation(AConfiguration* config);
+
+/**
+ * Set the current navigation in the configuration.
+ */
+void AConfiguration_setNavigation(AConfiguration* config, int32_t navigation);
+
+/**
+ * Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration.
+ */
+int32_t AConfiguration_getKeysHidden(AConfiguration* config);
+
+/**
+ * Set the current keys hidden in the configuration.
+ */
+void AConfiguration_setKeysHidden(AConfiguration* config, int32_t keysHidden);
+
+/**
+ * Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration.
+ */
+int32_t AConfiguration_getNavHidden(AConfiguration* config);
+
+/**
+ * Set the current nav hidden in the configuration.
+ */
+void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden);
+
+/**
+ * Return the current SDK (API) version set in the configuration.
+ */
+int32_t AConfiguration_getSdkVersion(AConfiguration* config);
+
+/**
+ * Set the current SDK version in the configuration.
+ */
+void AConfiguration_setSdkVersion(AConfiguration* config, int32_t sdkVersion);
+
+/**
+ * Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration.
+ */
+int32_t AConfiguration_getScreenSize(AConfiguration* config);
+
+/**
+ * Set the current screen size in the configuration.
+ */
+void AConfiguration_setScreenSize(AConfiguration* config, int32_t screenSize);
+
+/**
+ * Return the current ACONFIGURATION_SCREENLONG_* set in the configuration.
+ */
+int32_t AConfiguration_getScreenLong(AConfiguration* config);
+
+/**
+ * Set the current screen long in the configuration.
+ */
+void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong);
+
+/**
+ * Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration.
+ */
+int32_t AConfiguration_getUiModeType(AConfiguration* config);
+
+/**
+ * Set the current UI mode type in the configuration.
+ */
+void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType);
+
+/**
+ * Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration.
+ */
+int32_t AConfiguration_getUiModeNight(AConfiguration* config);
+
+/**
+ * Set the current UI mode night in the configuration.
+ */
+void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight);
+
+/**
+ * Perform a diff between two configurations. Returns a bit mask of
+ * ACONFIGURATION_* constants, each bit set meaning that configuration element
+ * is different between them.
+ */
+int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2);
+
+/**
+ * Determine whether 'base' is a valid configuration for use within the
+ * environment 'requested'. Returns 0 if there are any values in 'base'
+ * that conflict with 'requested'. Returns 1 if it does not conflict.
+ */
+int32_t AConfiguration_match(AConfiguration* base, AConfiguration* requested);
+
+/**
+ * Determine whether the configuration in 'test' is better than the existing
+ * configuration in 'base'. If 'requested' is non-NULL, this decision is based
+ * on the overall configuration given there. If it is NULL, this decision is
+ * simply based on which configuration is more specific. Returns non-0 if
+ * 'test' is better than 'base'.
+ *
+ * This assumes you have already filtered the configurations with
+ * AConfiguration_match().
+ */
+int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test,
+ AConfiguration* requested);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_CONFIGURATION_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/input.h b/6/platforms/android-9/arch-arm/usr/include/android/input.h
new file mode 100644
index 0000000..9449574
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/input.h
@@ -0,0 +1,688 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_INPUT_H
+#define _ANDROID_INPUT_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process input events in
+ * native code.
+ *
+ * NOTE: These functions MUST be implemented by /system/lib/libui.so
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <android/keycodes.h>
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key states (may be returned by queries about the current state of a
+ * particular key code, scan code or switch).
+ */
+enum {
+ /* The key state is unknown or the requested key itself is not supported. */
+ AKEY_STATE_UNKNOWN = -1,
+
+ /* The key is up. */
+ AKEY_STATE_UP = 0,
+
+ /* The key is down. */
+ AKEY_STATE_DOWN = 1,
+
+ /* The key is down but is a virtual key press that is being emulated by the system. */
+ AKEY_STATE_VIRTUAL = 2
+};
+
+/*
+ * Meta key / modifer state.
+ */
+enum {
+ /* No meta keys are pressed. */
+ AMETA_NONE = 0,
+
+ /* This mask is used to check whether one of the ALT meta keys is pressed. */
+ AMETA_ALT_ON = 0x02,
+
+ /* This mask is used to check whether the left ALT meta key is pressed. */
+ AMETA_ALT_LEFT_ON = 0x10,
+
+ /* This mask is used to check whether the right ALT meta key is pressed. */
+ AMETA_ALT_RIGHT_ON = 0x20,
+
+ /* This mask is used to check whether one of the SHIFT meta keys is pressed. */
+ AMETA_SHIFT_ON = 0x01,
+
+ /* This mask is used to check whether the left SHIFT meta key is pressed. */
+ AMETA_SHIFT_LEFT_ON = 0x40,
+
+ /* This mask is used to check whether the right SHIFT meta key is pressed. */
+ AMETA_SHIFT_RIGHT_ON = 0x80,
+
+ /* This mask is used to check whether the SYM meta key is pressed. */
+ AMETA_SYM_ON = 0x04
+};
+
+/*
+ * Input events.
+ *
+ * Input events are opaque structures. Use the provided accessors functions to
+ * read their properties.
+ */
+struct AInputEvent;
+typedef struct AInputEvent AInputEvent;
+
+/*
+ * Input event types.
+ */
+enum {
+ /* Indicates that the input event is a key event. */
+ AINPUT_EVENT_TYPE_KEY = 1,
+
+ /* Indicates that the input event is a motion event. */
+ AINPUT_EVENT_TYPE_MOTION = 2
+};
+
+/*
+ * Key event actions.
+ */
+enum {
+ /* The key has been pressed down. */
+ AKEY_EVENT_ACTION_DOWN = 0,
+
+ /* The key has been released. */
+ AKEY_EVENT_ACTION_UP = 1,
+
+ /* Multiple duplicate key events have occurred in a row, or a complex string is
+ * being delivered. The repeat_count property of the key event contains the number
+ * of times the given key code should be executed.
+ */
+ AKEY_EVENT_ACTION_MULTIPLE = 2
+};
+
+/*
+ * Key event flags.
+ */
+enum {
+ /* This mask is set if the device woke because of this key event. */
+ AKEY_EVENT_FLAG_WOKE_HERE = 0x1,
+
+ /* This mask is set if the key event was generated by a software keyboard. */
+ AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2,
+
+ /* This mask is set if we don't want the key event to cause us to leave touch mode. */
+ AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4,
+
+ /* This mask is set if an event was known to come from a trusted part
+ * of the system. That is, the event is known to come from the user,
+ * and could not have been spoofed by a third party component. */
+ AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8,
+
+ /* This mask is used for compatibility, to identify enter keys that are
+ * coming from an IME whose enter key has been auto-labelled "next" or
+ * "done". This allows TextView to dispatch these as normal enter keys
+ * for old applications, but still do the appropriate action when
+ * receiving them. */
+ AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10,
+
+ /* When associated with up key events, this indicates that the key press
+ * has been canceled. Typically this is used with virtual touch screen
+ * keys, where the user can slide from the virtual key area on to the
+ * display: in that case, the application will receive a canceled up
+ * event and should not perform the action normally associated with the
+ * key. Note that for this to work, the application can not perform an
+ * action for a key until it receives an up or the long press timeout has
+ * expired. */
+ AKEY_EVENT_FLAG_CANCELED = 0x20,
+
+ /* This key event was generated by a virtual (on-screen) hard key area.
+ * Typically this is an area of the touchscreen, outside of the regular
+ * display, dedicated to "hardware" buttons. */
+ AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40,
+
+ /* This flag is set for the first key repeat that occurs after the
+ * long press timeout. */
+ AKEY_EVENT_FLAG_LONG_PRESS = 0x80,
+
+ /* Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long
+ * press action was executed while it was down. */
+ AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100,
+
+ /* Set for AKEY_EVENT_ACTION_UP when this event's key code is still being
+ * tracked from its initial down. That is, somebody requested that tracking
+ * started on the key down and a long press has not caused
+ * the tracking to be canceled. */
+ AKEY_EVENT_FLAG_TRACKING = 0x200
+};
+
+/*
+ * Motion event actions.
+ */
+
+/* Bit shift for the action bits holding the pointer index as
+ * defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
+ */
+#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8
+
+enum {
+ /* Bit mask of the parts of the action code that are the action itself.
+ */
+ AMOTION_EVENT_ACTION_MASK = 0xff,
+
+ /* Bits in the action code that represent a pointer index, used with
+ * AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting
+ * down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer
+ * index where the data for the pointer going up or down can be found.
+ */
+ AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00,
+
+ /* A pressed gesture has started, the motion contains the initial starting location.
+ */
+ AMOTION_EVENT_ACTION_DOWN = 0,
+
+ /* A pressed gesture has finished, the motion contains the final release location
+ * as well as any intermediate points since the last down or move event.
+ */
+ AMOTION_EVENT_ACTION_UP = 1,
+
+ /* A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and
+ * AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as
+ * any intermediate points since the last down or move event.
+ */
+ AMOTION_EVENT_ACTION_MOVE = 2,
+
+ /* The current gesture has been aborted.
+ * You will not receive any more points in it. You should treat this as
+ * an up event, but not perform any action that you normally would.
+ */
+ AMOTION_EVENT_ACTION_CANCEL = 3,
+
+ /* A movement has happened outside of the normal bounds of the UI element.
+ * This does not provide a full gesture, but only the initial location of the movement/touch.
+ */
+ AMOTION_EVENT_ACTION_OUTSIDE = 4,
+
+ /* A non-primary pointer has gone down.
+ * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+ */
+ AMOTION_EVENT_ACTION_POINTER_DOWN = 5,
+
+ /* A non-primary pointer has gone up.
+ * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+ */
+ AMOTION_EVENT_ACTION_POINTER_UP = 6
+};
+
+/*
+ * Motion event flags.
+ */
+enum {
+ /* This flag indicates that the window that received this motion event is partly
+ * or wholly obscured by another visible window above it. This flag is set to true
+ * even if the event did not directly pass through the obscured area.
+ * A security sensitive application can check this flag to identify situations in which
+ * a malicious application may have covered up part of its content for the purpose
+ * of misleading the user or hijacking touches. An appropriate response might be
+ * to drop the suspect touches or to take additional precautions to confirm the user's
+ * actual intent.
+ */
+ AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1,
+};
+
+/*
+ * Motion event edge touch flags.
+ */
+enum {
+ /* No edges intersected */
+ AMOTION_EVENT_EDGE_FLAG_NONE = 0,
+
+ /* Flag indicating the motion event intersected the top edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_TOP = 0x01,
+
+ /* Flag indicating the motion event intersected the bottom edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02,
+
+ /* Flag indicating the motion event intersected the left edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04,
+
+ /* Flag indicating the motion event intersected the right edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08
+};
+
+/*
+ * Input sources.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details about input sources
+ * and their correct interpretation.
+ */
+enum {
+ AINPUT_SOURCE_CLASS_MASK = 0x000000ff,
+
+ AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
+ AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
+ AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
+ AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
+};
+
+enum {
+ AINPUT_SOURCE_UNKNOWN = 0x00000000,
+
+ AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
+ AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
+
+ AINPUT_SOURCE_ANY = 0xffffff00,
+};
+
+/*
+ * Keyboard types.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details.
+ */
+enum {
+ AINPUT_KEYBOARD_TYPE_NONE = 0,
+ AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC = 1,
+ AINPUT_KEYBOARD_TYPE_ALPHABETIC = 2,
+};
+
+/*
+ * Constants used to retrieve information about the range of motion for a particular
+ * coordinate of a motion event.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details about input sources
+ * and their correct interpretation.
+ */
+enum {
+ AINPUT_MOTION_RANGE_X = 0,
+ AINPUT_MOTION_RANGE_Y = 1,
+ AINPUT_MOTION_RANGE_PRESSURE = 2,
+ AINPUT_MOTION_RANGE_SIZE = 3,
+ AINPUT_MOTION_RANGE_TOUCH_MAJOR = 4,
+ AINPUT_MOTION_RANGE_TOUCH_MINOR = 5,
+ AINPUT_MOTION_RANGE_TOOL_MAJOR = 6,
+ AINPUT_MOTION_RANGE_TOOL_MINOR = 7,
+ AINPUT_MOTION_RANGE_ORIENTATION = 8,
+};
+
+
+/*
+ * Input event accessors.
+ *
+ * Note that most functions can only be used on input events that are of a given type.
+ * Calling these functions on input events of other types will yield undefined behavior.
+ */
+
+/*** Accessors for all input events. ***/
+
+/* Get the input event type. */
+int32_t AInputEvent_getType(const AInputEvent* event);
+
+/* Get the id for the device that an input event came from.
+ *
+ * Input events can be generated by multiple different input devices.
+ * Use the input device id to obtain information about the input
+ * device that was responsible for generating a particular event.
+ *
+ * An input device id of 0 indicates that the event didn't come from a physical device;
+ * other numbers are arbitrary and you shouldn't depend on the values.
+ * Use the provided input device query API to obtain information about input devices.
+ */
+int32_t AInputEvent_getDeviceId(const AInputEvent* event);
+
+/* Get the input event source. */
+int32_t AInputEvent_getSource(const AInputEvent* event);
+
+/*** Accessors for key events only. ***/
+
+/* Get the key event action. */
+int32_t AKeyEvent_getAction(const AInputEvent* key_event);
+
+/* Get the key event flags. */
+int32_t AKeyEvent_getFlags(const AInputEvent* key_event);
+
+/* Get the key code of the key event.
+ * This is the physical key that was pressed, not the Unicode character. */
+int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event);
+
+/* Get the hardware key id of this key event.
+ * These values are not reliable and vary from device to device. */
+int32_t AKeyEvent_getScanCode(const AInputEvent* key_event);
+
+/* Get the meta key state. */
+int32_t AKeyEvent_getMetaState(const AInputEvent* key_event);
+
+/* Get the repeat count of the event.
+ * For both key up an key down events, this is the number of times the key has
+ * repeated with the first down starting at 0 and counting up from there. For
+ * multiple key events, this is the number of down/up pairs that have occurred. */
+int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event);
+
+/* Get the time of the most recent key down event, in the
+ * java.lang.System.nanoTime() time base. If this is a down event,
+ * this will be the same as eventTime.
+ * Note that when chording keys, this value is the down time of the most recently
+ * pressed key, which may not be the same physical key of this event. */
+int64_t AKeyEvent_getDownTime(const AInputEvent* key_event);
+
+/* Get the time this event occurred, in the
+ * java.lang.System.nanoTime() time base. */
+int64_t AKeyEvent_getEventTime(const AInputEvent* key_event);
+
+/*** Accessors for motion events only. ***/
+
+/* Get the combined motion event action code and pointer index. */
+int32_t AMotionEvent_getAction(const AInputEvent* motion_event);
+
+/* Get the motion event flags. */
+int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
+
+/* Get the state of any meta / modifier keys that were in effect when the
+ * event was generated. */
+int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
+
+/* Get a bitfield indicating which edges, if any, were touched by this motion event.
+ * For touch events, clients can use this to determine if the user's finger was
+ * touching the edge of the display. */
+int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event);
+
+/* Get the time when the user originally pressed down to start a stream of
+ * position events, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event);
+
+/* Get the time when this specific event was generated,
+ * in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
+
+/* Get the X coordinate offset.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getXOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getYOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the X coordinates being reported.
+ * You can multiply this number with an X coordinate sample to find the
+ * actual hardware value of the X coordinate. */
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * You can multiply this number with a Y coordinate sample to find the
+ * actual hardware value of the Y coordinate. */
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
+
+/* Get the number of pointers of data contained in this event.
+ * Always >= 1. */
+size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
+
+/* Get the pointer identifier associated with a particular pointer
+ * data index is this event. The identifier tells you the actual pointer
+ * number associated with the data, accounting for individual pointers
+ * going up and down since the start of the current gesture. */
+int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current X coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current Y coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current pressure of this event for the given pointer index.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * although values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1. The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation. A positive angle
+ * indicates that the major axis of contact is oriented to the right. A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the number of historical points in this event. These are movements that
+ * have occurred between this event and the previous event. This only applies
+ * to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0.
+ * Historical samples are indexed from oldest to newest. */
+size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event);
+
+/* Get the time that a historical movement occurred between this event and
+ * the previous event, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getHistoricalEventTime(AInputEvent* motion_event,
+ size_t history_index);
+
+/* Get the historical raw X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical raw Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalX(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalY(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical pressure of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * although values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getHistoricalPressure(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1. The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getHistoricalSize(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation. A positive angle
+ * indicates that the major axis of contact is oriented to the right. A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+
+/*
+ * Input queue
+ *
+ * An input queue is the facility through which you retrieve input
+ * events.
+ */
+struct AInputQueue;
+typedef struct AInputQueue AInputQueue;
+
+/*
+ * Add this input queue to a looper for processing. See
+ * ALooper_addFd() for information on the ident, callback, and data params.
+ */
+void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper,
+ int ident, ALooper_callbackFunc callback, void* data);
+
+/*
+ * Remove the input queue from the looper it is currently attached to.
+ */
+void AInputQueue_detachLooper(AInputQueue* queue);
+
+/*
+ * Returns true if there are one or more events available in the
+ * input queue. Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int32_t AInputQueue_hasEvents(AInputQueue* queue);
+
+/*
+ * Returns the next available event from the queue. Returns a negative
+ * value if no events are available or an error has occurred.
+ */
+int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent);
+
+/*
+ * Sends the key for standard pre-dispatching -- that is, possibly deliver
+ * it to the current IME to be consumed before the app. Returns 0 if it
+ * was not pre-dispatched, meaning you can process it right now. If non-zero
+ * is returned, you must abandon the current event processing and allow the
+ * event to appear again in the event queue (if it does not get consumed during
+ * pre-dispatching).
+ */
+int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event);
+
+/*
+ * Report that dispatching has finished with the given event.
+ * This must be called after receiving an event with AInputQueue_get_event().
+ */
+void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_INPUT_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/keycodes.h b/6/platforms/android-9/arch-arm/usr/include/android/keycodes.h
new file mode 100644
index 0000000..496eccc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/keycodes.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_KEYCODES_H
+#define _ANDROID_KEYCODES_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key codes.
+ */
+enum {
+ AKEYCODE_UNKNOWN = 0,
+ AKEYCODE_SOFT_LEFT = 1,
+ AKEYCODE_SOFT_RIGHT = 2,
+ AKEYCODE_HOME = 3,
+ AKEYCODE_BACK = 4,
+ AKEYCODE_CALL = 5,
+ AKEYCODE_ENDCALL = 6,
+ AKEYCODE_0 = 7,
+ AKEYCODE_1 = 8,
+ AKEYCODE_2 = 9,
+ AKEYCODE_3 = 10,
+ AKEYCODE_4 = 11,
+ AKEYCODE_5 = 12,
+ AKEYCODE_6 = 13,
+ AKEYCODE_7 = 14,
+ AKEYCODE_8 = 15,
+ AKEYCODE_9 = 16,
+ AKEYCODE_STAR = 17,
+ AKEYCODE_POUND = 18,
+ AKEYCODE_DPAD_UP = 19,
+ AKEYCODE_DPAD_DOWN = 20,
+ AKEYCODE_DPAD_LEFT = 21,
+ AKEYCODE_DPAD_RIGHT = 22,
+ AKEYCODE_DPAD_CENTER = 23,
+ AKEYCODE_VOLUME_UP = 24,
+ AKEYCODE_VOLUME_DOWN = 25,
+ AKEYCODE_POWER = 26,
+ AKEYCODE_CAMERA = 27,
+ AKEYCODE_CLEAR = 28,
+ AKEYCODE_A = 29,
+ AKEYCODE_B = 30,
+ AKEYCODE_C = 31,
+ AKEYCODE_D = 32,
+ AKEYCODE_E = 33,
+ AKEYCODE_F = 34,
+ AKEYCODE_G = 35,
+ AKEYCODE_H = 36,
+ AKEYCODE_I = 37,
+ AKEYCODE_J = 38,
+ AKEYCODE_K = 39,
+ AKEYCODE_L = 40,
+ AKEYCODE_M = 41,
+ AKEYCODE_N = 42,
+ AKEYCODE_O = 43,
+ AKEYCODE_P = 44,
+ AKEYCODE_Q = 45,
+ AKEYCODE_R = 46,
+ AKEYCODE_S = 47,
+ AKEYCODE_T = 48,
+ AKEYCODE_U = 49,
+ AKEYCODE_V = 50,
+ AKEYCODE_W = 51,
+ AKEYCODE_X = 52,
+ AKEYCODE_Y = 53,
+ AKEYCODE_Z = 54,
+ AKEYCODE_COMMA = 55,
+ AKEYCODE_PERIOD = 56,
+ AKEYCODE_ALT_LEFT = 57,
+ AKEYCODE_ALT_RIGHT = 58,
+ AKEYCODE_SHIFT_LEFT = 59,
+ AKEYCODE_SHIFT_RIGHT = 60,
+ AKEYCODE_TAB = 61,
+ AKEYCODE_SPACE = 62,
+ AKEYCODE_SYM = 63,
+ AKEYCODE_EXPLORER = 64,
+ AKEYCODE_ENVELOPE = 65,
+ AKEYCODE_ENTER = 66,
+ AKEYCODE_DEL = 67,
+ AKEYCODE_GRAVE = 68,
+ AKEYCODE_MINUS = 69,
+ AKEYCODE_EQUALS = 70,
+ AKEYCODE_LEFT_BRACKET = 71,
+ AKEYCODE_RIGHT_BRACKET = 72,
+ AKEYCODE_BACKSLASH = 73,
+ AKEYCODE_SEMICOLON = 74,
+ AKEYCODE_APOSTROPHE = 75,
+ AKEYCODE_SLASH = 76,
+ AKEYCODE_AT = 77,
+ AKEYCODE_NUM = 78,
+ AKEYCODE_HEADSETHOOK = 79,
+ AKEYCODE_FOCUS = 80, // *Camera* focus
+ AKEYCODE_PLUS = 81,
+ AKEYCODE_MENU = 82,
+ AKEYCODE_NOTIFICATION = 83,
+ AKEYCODE_SEARCH = 84,
+ AKEYCODE_MEDIA_PLAY_PAUSE= 85,
+ AKEYCODE_MEDIA_STOP = 86,
+ AKEYCODE_MEDIA_NEXT = 87,
+ AKEYCODE_MEDIA_PREVIOUS = 88,
+ AKEYCODE_MEDIA_REWIND = 89,
+ AKEYCODE_MEDIA_FAST_FORWARD = 90,
+ AKEYCODE_MUTE = 91,
+ AKEYCODE_PAGE_UP = 92,
+ AKEYCODE_PAGE_DOWN = 93,
+ AKEYCODE_PICTSYMBOLS = 94,
+ AKEYCODE_SWITCH_CHARSET = 95,
+ AKEYCODE_BUTTON_A = 96,
+ AKEYCODE_BUTTON_B = 97,
+ AKEYCODE_BUTTON_C = 98,
+ AKEYCODE_BUTTON_X = 99,
+ AKEYCODE_BUTTON_Y = 100,
+ AKEYCODE_BUTTON_Z = 101,
+ AKEYCODE_BUTTON_L1 = 102,
+ AKEYCODE_BUTTON_R1 = 103,
+ AKEYCODE_BUTTON_L2 = 104,
+ AKEYCODE_BUTTON_R2 = 105,
+ AKEYCODE_BUTTON_THUMBL = 106,
+ AKEYCODE_BUTTON_THUMBR = 107,
+ AKEYCODE_BUTTON_START = 108,
+ AKEYCODE_BUTTON_SELECT = 109,
+ AKEYCODE_BUTTON_MODE = 110,
+
+ // NOTE: If you add a new keycode here you must also add it to several other files.
+ // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_KEYCODES_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/log.h b/6/platforms/android-9/arch-arm/usr/include/android/log.h
new file mode 120000
index 0000000..58f6111
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/looper.h b/6/platforms/android-9/arch-arm/usr/include/android/looper.h
new file mode 100644
index 0000000..a9d8426
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/looper.h
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_LOOPER_H
+#define ANDROID_LOOPER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ALooper
+ *
+ * A looper is the state tracking an event loop for a thread.
+ * Loopers do not define event structures or other such things; rather
+ * they are a lower-level facility to attach one or more discrete objects
+ * listening for an event. An "event" here is simply data available on
+ * a file descriptor: each attached object has an associated file descriptor,
+ * and waiting for "events" means (internally) polling on all of these file
+ * descriptors until one or more of them have data available.
+ *
+ * A thread can have only one ALooper associated with it.
+ */
+struct ALooper;
+typedef struct ALooper ALooper;
+
+/**
+ * Returns the looper associated with the calling thread, or NULL if
+ * there is not one.
+ */
+ALooper* ALooper_forThread();
+
+enum {
+ /**
+ * Option for ALooper_prepare: this looper will accept calls to
+ * ALooper_addFd() that do not have a callback (that is provide NULL
+ * for the callback). In this case the caller of ALooper_pollOnce()
+ * or ALooper_pollAll() MUST check the return from these functions to
+ * discover when data is available on such fds and process it.
+ */
+ ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0
+};
+
+/**
+ * Prepares a looper associated with the calling thread, and returns it.
+ * If the thread already has a looper, it is returned. Otherwise, a new
+ * one is created, associated with the thread, and returned.
+ *
+ * The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0.
+ */
+ALooper* ALooper_prepare(int opts);
+
+enum {
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * The poll was awoken using wake() before the timeout expired
+ * and no callbacks were executed and no other file descriptors were ready.
+ */
+ ALOOPER_POLL_WAKE = -1,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * One or more callbacks were executed.
+ */
+ ALOOPER_POLL_CALLBACK = -2,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * The timeout expired.
+ */
+ ALOOPER_POLL_TIMEOUT = -3,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * An error occurred.
+ */
+ ALOOPER_POLL_ERROR = -4,
+};
+
+/**
+ * Acquire a reference on the given ALooper object. This prevents the object
+ * from being deleted until the reference is removed. This is only needed
+ * to safely hand an ALooper from one thread to another.
+ */
+void ALooper_acquire(ALooper* looper);
+
+/**
+ * Remove a reference that was previously acquired with ALooper_acquire().
+ */
+void ALooper_release(ALooper* looper);
+
+/**
+ * Flags for file descriptor events that a looper can monitor.
+ *
+ * These flag bits can be combined to monitor multiple events at once.
+ */
+enum {
+ /**
+ * The file descriptor is available for read operations.
+ */
+ ALOOPER_EVENT_INPUT = 1 << 0,
+
+ /**
+ * The file descriptor is available for write operations.
+ */
+ ALOOPER_EVENT_OUTPUT = 1 << 1,
+
+ /**
+ * The file descriptor has encountered an error condition.
+ *
+ * The looper always sends notifications about errors; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_ERROR = 1 << 2,
+
+ /**
+ * The file descriptor was hung up.
+ * For example, indicates that the remote end of a pipe or socket was closed.
+ *
+ * The looper always sends notifications about hangups; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_HANGUP = 1 << 3,
+
+ /**
+ * The file descriptor is invalid.
+ * For example, the file descriptor was closed prematurely.
+ *
+ * The looper always sends notifications about invalid file descriptors; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_INVALID = 1 << 4,
+};
+
+/**
+ * For callback-based event loops, this is the prototype of the function
+ * that is called. It is given the file descriptor it is associated with,
+ * a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT),
+ * and the data pointer that was originally supplied.
+ *
+ * Implementations should return 1 to continue receiving callbacks, or 0
+ * to have this file descriptor and callback unregistered from the looper.
+ */
+typedef int (*ALooper_callbackFunc)(int fd, int events, void* data);
+
+/**
+ * Waits for events to be available, with optional timeout in milliseconds.
+ * Invokes callbacks for all file descriptors on which an event occurred.
+ *
+ * If the timeout is zero, returns immediately without blocking.
+ * If the timeout is negative, waits indefinitely until an event appears.
+ *
+ * Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before
+ * the timeout expired and no callbacks were invoked and no other file
+ * descriptors were ready.
+ *
+ * Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.
+ *
+ * Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
+ * timeout expired.
+ *
+ * Returns ALOOPER_POLL_ERROR if an error occurred.
+ *
+ * Returns a value >= 0 containing an identifier if its file descriptor has data
+ * and it has no callback function (requiring the caller here to handle it).
+ * In this (and only this) case outFd, outEvents and outData will contain the poll
+ * events and data associated with the fd, otherwise they will be set to NULL.
+ *
+ * This method does not return until it has finished invoking the appropriate callbacks
+ * for all file descriptors that were signalled.
+ */
+int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData);
+
+/**
+ * Like ALooper_pollOnce(), but performs all pending callbacks until all
+ * data has been consumed or a file descriptor is available with no callback.
+ * This function will never return ALOOPER_POLL_CALLBACK.
+ */
+int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData);
+
+/**
+ * Wakes the poll asynchronously.
+ *
+ * This method can be called on any thread.
+ * This method returns immediately.
+ */
+void ALooper_wake(ALooper* looper);
+
+/**
+ * Adds a new file descriptor to be polled by the looper.
+ * If the same file descriptor was previously added, it is replaced.
+ *
+ * "fd" is the file descriptor to be added.
+ * "ident" is an identifier for this event, which is returned from ALooper_pollOnce().
+ * The identifier must be >= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback.
+ * "events" are the poll events to wake up on. Typically this is ALOOPER_EVENT_INPUT.
+ * "callback" is the function to call when there is an event on the file descriptor.
+ * "data" is a private data pointer to supply to the callback.
+ *
+ * There are two main uses of this function:
+ *
+ * (1) If "callback" is non-NULL, then this function will be called when there is
+ * data on the file descriptor. It should execute any events it has pending,
+ * appropriately reading from the file descriptor. The 'ident' is ignored in this case.
+ *
+ * (2) If "callback" is NULL, the 'ident' will be returned by ALooper_pollOnce
+ * when its file descriptor has data available, requiring the caller to take
+ * care of processing it.
+ *
+ * Returns 1 if the file descriptor was added or -1 if an error occurred.
+ *
+ * This method can be called on any thread.
+ * This method may block briefly if it needs to wake the poll.
+ */
+int ALooper_addFd(ALooper* looper, int fd, int ident, int events,
+ ALooper_callbackFunc callback, void* data);
+
+/**
+ * Removes a previously added file descriptor from the looper.
+ *
+ * When this method returns, it is safe to close the file descriptor since the looper
+ * will no longer have a reference to it. However, it is possible for the callback to
+ * already be running or for it to run one last time if the file descriptor was already
+ * signalled. Calling code is responsible for ensuring that this case is safely handled.
+ * For example, if the callback takes care of removing itself during its own execution either
+ * by returning 0 or by calling this method, then it can be guaranteed to not be invoked
+ * again at any later time unless registered anew.
+ *
+ * Returns 1 if the file descriptor was removed, 0 if none was previously registered
+ * or -1 if an error occurred.
+ *
+ * This method can be called on any thread.
+ * This method may block briefly if it needs to wake the poll.
+ */
+int ALooper_removeFd(ALooper* looper, int fd);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/native_activity.h b/6/platforms/android-9/arch-arm/usr/include/android/native_activity.h
new file mode 100644
index 0000000..d89bc8b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/native_activity.h
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_NATIVE_ACTIVITY_H
+#define ANDROID_NATIVE_ACTIVITY_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <jni.h>
+
+#include <android/asset_manager.h>
+#include <android/input.h>
+#include <android/native_window.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ANativeActivityCallbacks;
+
+/**
+ * This structure defines the native side of an android.app.NativeActivity.
+ * It is created by the framework, and handed to the application's native
+ * code as it is being launched.
+ */
+typedef struct ANativeActivity {
+ /**
+ * Pointer to the callback function table of the native application.
+ * You can set the functions here to your own callbacks. The callbacks
+ * pointer itself here should not be changed; it is allocated and managed
+ * for you by the framework.
+ */
+ struct ANativeActivityCallbacks* callbacks;
+
+ /**
+ * The global handle on the process's Java VM.
+ */
+ JavaVM* vm;
+
+ /**
+ * JNI context for the main thread of the app. Note that this field
+ * can ONLY be used from the main thread of the process; that is, the
+ * thread that calls into the ANativeActivityCallbacks.
+ */
+ JNIEnv* env;
+
+ /**
+ * The NativeActivity Java class.
+ */
+ jobject clazz;
+
+ /**
+ * Path to this application's internal data directory.
+ */
+ const char* internalDataPath;
+
+ /**
+ * Path to this application's external (removable/mountable) data directory.
+ */
+ const char* externalDataPath;
+
+ /**
+ * The platform's SDK version code.
+ */
+ int32_t sdkVersion;
+
+ /**
+ * This is the native instance of the application. It is not used by
+ * the framework, but can be set by the application to its own instance
+ * state.
+ */
+ void* instance;
+
+ /**
+ * Pointer to the Asset Manager instance for the application. The application
+ * uses this to access binary assets bundled inside its own .apk file.
+ */
+ AAssetManager* assetManager;
+} ANativeActivity;
+
+/**
+ * These are the callbacks the framework makes into a native application.
+ * All of these callbacks happen on the main thread of the application.
+ * By default, all callbacks are NULL; set to a pointer to your own function
+ * to have it called.
+ */
+typedef struct ANativeActivityCallbacks {
+ /**
+ * NativeActivity has started. See Java documentation for Activity.onStart()
+ * for more information.
+ */
+ void (*onStart)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity has resumed. See Java documentation for Activity.onResume()
+ * for more information.
+ */
+ void (*onResume)(ANativeActivity* activity);
+
+ /**
+ * Framework is asking NativeActivity to save its current instance state.
+ * See Java documentation for Activity.onSaveInstanceState() for more
+ * information. The returned pointer needs to be created with malloc();
+ * the framework will call free() on it for you. You also must fill in
+ * outSize with the number of bytes in the allocation. Note that the
+ * saved state will be persisted, so it can not contain any active
+ * entities (pointers to memory, file descriptors, etc).
+ */
+ void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize);
+
+ /**
+ * NativeActivity has paused. See Java documentation for Activity.onPause()
+ * for more information.
+ */
+ void (*onPause)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity has stopped. See Java documentation for Activity.onStop()
+ * for more information.
+ */
+ void (*onStop)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity is being destroyed. See Java documentation for Activity.onDestroy()
+ * for more information.
+ */
+ void (*onDestroy)(ANativeActivity* activity);
+
+ /**
+ * Focus has changed in this NativeActivity's window. This is often used,
+ * for example, to pause a game when it loses input focus.
+ */
+ void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus);
+
+ /**
+ * The drawing window for this native activity has been created. You
+ * can use the given native window object to start drawing.
+ */
+ void (*onNativeWindowCreated)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity has been resized. You should
+ * retrieve the new size from the window and ensure that your rendering in
+ * it now matches.
+ */
+ void (*onNativeWindowResized)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity needs to be redrawn. To avoid
+ * transient artifacts during screen changes (such resizing after rotation),
+ * applications should not return from this function until they have finished
+ * drawing their window in its current state.
+ */
+ void (*onNativeWindowRedrawNeeded)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity is going to be destroyed.
+ * You MUST ensure that you do not touch the window object after returning
+ * from this function: in the common case of drawing to the window from
+ * another thread, that means the implementation of this callback must
+ * properly synchronize with the other thread to stop its drawing before
+ * returning from here.
+ */
+ void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The input queue for this native activity's window has been created.
+ * You can use the given input queue to start retrieving input events.
+ */
+ void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue);
+
+ /**
+ * The input queue for this native activity's window is being destroyed.
+ * You should no longer try to reference this object upon returning from this
+ * function.
+ */
+ void (*onInputQueueDestroyed)(ANativeActivity* activity, AInputQueue* queue);
+
+ /**
+ * The rectangle in the window in which content should be placed has changed.
+ */
+ void (*onContentRectChanged)(ANativeActivity* activity, const ARect* rect);
+
+ /**
+ * The current device AConfiguration has changed. The new configuration can
+ * be retrieved from assetManager.
+ */
+ void (*onConfigurationChanged)(ANativeActivity* activity);
+
+ /**
+ * The system is running low on memory. Use this callback to release
+ * resources you do not need, to help the system avoid killing more
+ * important processes.
+ */
+ void (*onLowMemory)(ANativeActivity* activity);
+} ANativeActivityCallbacks;
+
+/**
+ * This is the function that must be in the native code to instantiate the
+ * application's native activity. It is called with the activity instance (see
+ * above); if the code is being instantiated from a previously saved instance,
+ * the savedState will be non-NULL and point to the saved data. You must make
+ * any copy of this data you need -- it will be released after you return from
+ * this function.
+ */
+typedef void ANativeActivity_createFunc(ANativeActivity* activity,
+ void* savedState, size_t savedStateSize);
+
+/**
+ * The name of the function that NativeInstance looks for when launching its
+ * native code. This is the default function that is used, you can specify
+ * "android.app.func_name" string meta-data in your manifest to use a different
+ * function.
+ */
+extern ANativeActivity_createFunc ANativeActivity_onCreate;
+
+/**
+ * Finish the given activity. Its finish() method will be called, causing it
+ * to be stopped and destroyed. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_finish(ANativeActivity* activity);
+
+/**
+ * Change the window format of the given activity. Calls getWindow().setFormat()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
+
+/**
+ * Change the window flags of the given activity. Calls getWindow().setFlags()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place. See window.h for flag constants.
+ */
+void ANativeActivity_setWindowFlags(ANativeActivity* activity,
+ uint32_t addFlags, uint32_t removeFlags);
+
+/**
+ * Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+ ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001,
+ ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
+};
+
+/**
+ * Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
+
+/**
+ * Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+ ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
+ ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
+};
+
+/**
+ * Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_ACTIVITY_H
+
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/native_window.h b/6/platforms/android-9/arch-arm/usr/include/android/native_window.h
new file mode 100644
index 0000000..f3d7550
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/native_window.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_H
+#define ANDROID_NATIVE_WINDOW_H
+
+#include <android/rect.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Pixel formats that a window can use.
+ */
+enum {
+ WINDOW_FORMAT_RGBA_8888 = 1,
+ WINDOW_FORMAT_RGBX_8888 = 2,
+ WINDOW_FORMAT_RGB_565 = 4,
+};
+
+struct ANativeWindow;
+typedef struct ANativeWindow ANativeWindow;
+
+typedef struct ANativeWindow_Buffer {
+ // The number of pixels that are show horizontally.
+ int32_t width;
+
+ // The number of pixels that are shown vertically.
+ int32_t height;
+
+ // The number of *pixels* that a line in the buffer takes in
+ // memory. This may be >= width.
+ int32_t stride;
+
+ // The format of the buffer. One of WINDOW_FORMAT_*
+ int32_t format;
+
+ // The actual bits.
+ void* bits;
+
+ // Do not touch.
+ uint32_t reserved[6];
+} ANativeWindow_Buffer;
+
+/**
+ * Acquire a reference on the given ANativeWindow object. This prevents the object
+ * from being deleted until the reference is removed.
+ */
+void ANativeWindow_acquire(ANativeWindow* window);
+
+/**
+ * Remove a reference that was previously acquired with ANativeWindow_acquire().
+ */
+void ANativeWindow_release(ANativeWindow* window);
+
+/*
+ * Return the current width in pixels of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getWidth(ANativeWindow* window);
+
+/*
+ * Return the current height in pixels of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getHeight(ANativeWindow* window);
+
+/*
+ * Return the current pixel format of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getFormat(ANativeWindow* window);
+
+/*
+ * Change the format and size of the window buffers.
+ *
+ * The width and height control the number of pixels in the buffers, not the
+ * dimensions of the window on screen. If these are different than the
+ * window's physical size, then it buffer will be scaled to match that size
+ * when compositing it to the screen.
+ *
+ * For all of these parameters, if 0 is supplied then the window's base
+ * value will come back in force.
+ */
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format);
+
+/**
+ * Lock the window's next drawing surface for writing.
+ */
+int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
+ ARect* inOutDirtyBounds);
+
+/**
+ * Unlock the window's drawing surface after previously locking it,
+ * posting the new buffer to the display.
+ */
+int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/native_window_jni.h b/6/platforms/android-9/arch-arm/usr/include/android/native_window_jni.h
new file mode 100644
index 0000000..b9e72ef
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/native_window_jni.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_JNI_H
+#define ANDROID_NATIVE_WINDOW_JNI_H
+
+#include <android/native_window.h>
+
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Return the ANativeWindow associated with a Java Surface object,
+ * for interacting with it through native code. This acquires a reference
+ * on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
+ * when done with it so that it doesn't leak.
+ */
+ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/obb.h b/6/platforms/android-9/arch-arm/usr/include/android/obb.h
new file mode 100644
index 0000000..65e9b2a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/obb.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_OBB_H
+#define ANDROID_OBB_H
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AObbInfo;
+typedef struct AObbInfo AObbInfo;
+
+enum {
+ AOBBINFO_OVERLAY = 0x0001,
+};
+
+/**
+ * Scan an OBB and get information about it.
+ */
+AObbInfo* AObbScanner_getObbInfo(const char* filename);
+
+/**
+ * Destroy the AObbInfo object. You must call this when finished with the object.
+ */
+void AObbInfo_delete(AObbInfo* obbInfo);
+
+/**
+ * Get the package name for the OBB.
+ */
+const char* AObbInfo_getPackageName(AObbInfo* obbInfo);
+
+/**
+ * Get the version of an OBB file.
+ */
+int32_t AObbInfo_getVersion(AObbInfo* obbInfo);
+
+/**
+ * Get the flags of an OBB file.
+ */
+int32_t AObbInfo_getFlags(AObbInfo* obbInfo);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_OBB_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/rect.h b/6/platforms/android-9/arch-arm/usr/include/android/rect.h
new file mode 100644
index 0000000..3e81f53
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/rect.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_RECT_H
+#define ANDROID_RECT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct ARect {
+ int32_t left;
+ int32_t top;
+ int32_t right;
+ int32_t bottom;
+} ARect;
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_RECT_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/sensor.h b/6/platforms/android-9/arch-arm/usr/include/android/sensor.h
new file mode 100644
index 0000000..f163f18
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/sensor.h
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_SENSOR_H
+#define ANDROID_SENSOR_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process sensor events in
+ * native code.
+ *
+ */
+
+#include <sys/types.h>
+
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Sensor types
+ * (keep in sync with hardware/sensor.h)
+ */
+
+enum {
+ ASENSOR_TYPE_ACCELEROMETER = 1,
+ ASENSOR_TYPE_MAGNETIC_FIELD = 2,
+ ASENSOR_TYPE_GYROSCOPE = 4,
+ ASENSOR_TYPE_LIGHT = 5,
+ ASENSOR_TYPE_PROXIMITY = 8
+};
+
+/*
+ * Sensor accuracy measure
+ */
+enum {
+ ASENSOR_STATUS_UNRELIABLE = 0,
+ ASENSOR_STATUS_ACCURACY_LOW = 1,
+ ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
+ ASENSOR_STATUS_ACCURACY_HIGH = 3
+};
+
+/*
+ * A few useful constants
+ */
+
+/* Earth's gravity in m/s^2 */
+#define ASENSOR_STANDARD_GRAVITY (9.80665f)
+/* Maximum magnetic field on Earth's surface in uT */
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX (60.0f)
+/* Minimum magnetic field on Earth's surface in uT*/
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN (30.0f)
+
+/*
+ * A sensor event.
+ */
+
+/* NOTE: Must match hardware/sensors.h */
+typedef struct ASensorVector {
+ union {
+ float v[3];
+ struct {
+ float x;
+ float y;
+ float z;
+ };
+ struct {
+ float azimuth;
+ float pitch;
+ float roll;
+ };
+ };
+ int8_t status;
+ uint8_t reserved[3];
+} ASensorVector;
+
+/* NOTE: Must match hardware/sensors.h */
+typedef struct ASensorEvent {
+ int32_t version; /* sizeof(struct ASensorEvent) */
+ int32_t sensor;
+ int32_t type;
+ int32_t reserved0;
+ int64_t timestamp;
+ union {
+ float data[16];
+ ASensorVector vector;
+ ASensorVector acceleration;
+ ASensorVector magnetic;
+ float temperature;
+ float distance;
+ float light;
+ float pressure;
+ };
+ int32_t reserved1[4];
+} ASensorEvent;
+
+
+struct ASensorManager;
+typedef struct ASensorManager ASensorManager;
+
+struct ASensorEventQueue;
+typedef struct ASensorEventQueue ASensorEventQueue;
+
+struct ASensor;
+typedef struct ASensor ASensor;
+typedef ASensor const* ASensorRef;
+typedef ASensorRef const* ASensorList;
+
+/*****************************************************************************/
+
+/*
+ * Get a reference to the sensor manager. ASensorManager is a singleton.
+ *
+ * Example:
+ *
+ * ASensorManager* sensorManager = ASensorManager_getInstance();
+ *
+ */
+ASensorManager* ASensorManager_getInstance();
+
+
+/*
+ * Returns the list of available sensors.
+ */
+int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
+
+/*
+ * Returns the default sensor for the given type, or NULL if no sensor
+ * of that type exist.
+ */
+ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
+
+/*
+ * Creates a new sensor event queue and associate it with a looper.
+ */
+ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
+ ALooper* looper, int ident, ALooper_callbackFunc callback, void* data);
+
+/*
+ * Destroys the event queue and free all resources associated to it.
+ */
+int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue);
+
+
+/*****************************************************************************/
+
+/*
+ * Enable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor);
+
+/*
+ * Disable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor);
+
+/*
+ * Sets the delivery rate of events in microseconds for the given sensor.
+ * Note that this is a hint only, generally event will arrive at a higher
+ * rate. It is an error to set a rate inferior to the value returned by
+ * ASensor_getMinDelay().
+ * Returns a negative error code on failure.
+ */
+int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec);
+
+/*
+ * Returns true if there are one or more events available in the
+ * sensor queue. Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
+
+/*
+ * Returns the next available events from the queue. Returns a negative
+ * value if no events are available or an error has occurred, otherwise
+ * the number of events returned.
+ *
+ * Examples:
+ * ASensorEvent event;
+ * ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);
+ *
+ * ASensorEvent eventBuffer[8];
+ * ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8);
+ *
+ */
+ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
+ ASensorEvent* events, size_t count);
+
+
+/*****************************************************************************/
+
+/*
+ * Returns this sensor's name (non localized)
+ */
+const char* ASensor_getName(ASensor const* sensor);
+
+/*
+ * Returns this sensor's vendor's name (non localized)
+ */
+const char* ASensor_getVendor(ASensor const* sensor);
+
+/*
+ * Return this sensor's type
+ */
+int ASensor_getType(ASensor const* sensor);
+
+/*
+ * Returns this sensors's resolution
+ */
+float ASensor_getResolution(ASensor const* sensor);
+
+/*
+ * Returns the minimum delay allowed between events in microseconds.
+ * A value of zero means that this sensor doesn't report events at a
+ * constant rate, but rather only when a new data is available.
+ */
+int ASensor_getMinDelay(ASensor const* sensor);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_SENSOR_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/storage_manager.h b/6/platforms/android-9/arch-arm/usr/include/android/storage_manager.h
new file mode 100644
index 0000000..bad2491
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/storage_manager.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_STORAGE_MANAGER_H
+#define ANDROID_STORAGE_MANAGER_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AStorageManager;
+typedef struct AStorageManager AStorageManager;
+
+enum {
+ /*
+ * The OBB container is now mounted and ready for use. Can be returned
+ * as the status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_MOUNTED = 1,
+
+ /*
+ * The OBB container is now unmounted and not usable. Can be returned
+ * as the status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_UNMOUNTED = 2,
+
+ /*
+ * There was an internal system error encountered while trying to
+ * mount the OBB. Can be returned as the status for callbacks made
+ * during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_INTERNAL = 20,
+
+ /*
+ * The OBB could not be mounted by the system. Can be returned as the
+ * status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_COULD_NOT_MOUNT = 21,
+
+ /*
+ * The OBB could not be unmounted. This most likely indicates that a
+ * file is in use on the OBB. Can be returned as the status for
+ * callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_COULD_NOT_UNMOUNT = 22,
+
+ /*
+ * A call was made to unmount the OBB when it was not mounted. Can be
+ * returned as the status for callbacks made during asynchronous OBB
+ * actions.
+ */
+ AOBB_STATE_ERROR_NOT_MOUNTED = 23,
+
+ /*
+ * The OBB has already been mounted. Can be returned as the status for
+ * callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_ALREADY_MOUNTED = 24,
+
+ /*
+ * The current application does not have permission to use this OBB.
+ * This could be because the OBB indicates it's owned by a different
+ * package. Can be returned as the status for callbacks made during
+ * asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_PERMISSION_DENIED = 25,
+};
+
+/**
+ * Obtains a new instance of AStorageManager.
+ */
+AStorageManager* AStorageManager_new();
+
+/**
+ * Release AStorageManager instance.
+ */
+void AStorageManager_delete(AStorageManager* mgr);
+
+/**
+ * Callback function for asynchronous calls made on OBB files.
+ */
+typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data);
+
+/**
+ * Attempts to mount an OBB file. This is an asynchronous operation.
+ */
+void AStorageManager_mountObb(AStorageManager* mgr, const char* filename, const char* key,
+ AStorageManager_obbCallbackFunc cb, void* data);
+
+/**
+ * Attempts to unmount an OBB file. This is an asynchronous operation.
+ */
+void AStorageManager_unmountObb(AStorageManager* mgr, const char* filename, const int force,
+ AStorageManager_obbCallbackFunc cb, void* data);
+
+/**
+ * Check whether an OBB is mounted.
+ */
+int AStorageManager_isObbMounted(AStorageManager* mgr, const char* filename);
+
+/**
+ * Get the mounted path for an OBB.
+ */
+const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char* filename);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_STORAGE_MANAGER_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/android/window.h b/6/platforms/android-9/arch-arm/usr/include/android/window.h
new file mode 100644
index 0000000..2ab192b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/android/window.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_WINDOW_H
+#define ANDROID_WINDOW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Window flags, as per the Java API at android.view.WindowManager.LayoutParams.
+ */
+enum {
+ AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001,
+ AWINDOW_FLAG_DIM_BEHIND = 0x00000002,
+ AWINDOW_FLAG_BLUR_BEHIND = 0x00000004,
+ AWINDOW_FLAG_NOT_FOCUSABLE = 0x00000008,
+ AWINDOW_FLAG_NOT_TOUCHABLE = 0x00000010,
+ AWINDOW_FLAG_NOT_TOUCH_MODAL = 0x00000020,
+ AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
+ AWINDOW_FLAG_KEEP_SCREEN_ON = 0x00000080,
+ AWINDOW_FLAG_LAYOUT_IN_SCREEN = 0x00000100,
+ AWINDOW_FLAG_LAYOUT_NO_LIMITS = 0x00000200,
+ AWINDOW_FLAG_FULLSCREEN = 0x00000400,
+ AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 0x00000800,
+ AWINDOW_FLAG_DITHER = 0x00001000,
+ AWINDOW_FLAG_SECURE = 0x00002000,
+ AWINDOW_FLAG_SCALED = 0x00004000,
+ AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 0x00008000,
+ AWINDOW_FLAG_LAYOUT_INSET_DECOR = 0x00010000,
+ AWINDOW_FLAG_ALT_FOCUSABLE_IM = 0x00020000,
+ AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
+ AWINDOW_FLAG_SHOW_WHEN_LOCKED = 0x00080000,
+ AWINDOW_FLAG_SHOW_WALLPAPER = 0x00100000,
+ AWINDOW_FLAG_TURN_SCREEN_ON = 0x00200000,
+ AWINDOW_FLAG_DISMISS_KEYGUARD = 0x00400000,
+};
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_WINDOW_H
diff --git a/6/platforms/android-9/arch-arm/usr/include/arpa/inet.h b/6/platforms/android-9/arch-arm/usr/include/arpa/inet.h
new file mode 120000
index 0000000..891f586
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/arpa/nameser.h b/6/platforms/android-9/arch-arm/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..afd02cb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/arpa/telnet.h b/6/platforms/android-9/arch-arm/usr/include/arpa/telnet.h
new file mode 100644
index 0000000..d318e08
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/arpa/telnet.h
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)telnet.h 8.2 (Berkeley) 12/15/93
+ */
+
+#ifndef _ARPA_TELNET_H
+#define _ARPA_TELNET_H 1
+
+/*
+ * Definitions for the TELNET protocol.
+ */
+#define IAC 255 /* interpret as command: */
+#define DONT 254 /* you are not to use option */
+#define DO 253 /* please, you use option */
+#define WONT 252 /* I won't use option */
+#define WILL 251 /* I will use option */
+#define SB 250 /* interpret as subnegotiation */
+#define GA 249 /* you may reverse the line */
+#define EL 248 /* erase the current line */
+#define EC 247 /* erase the current character */
+#define AYT 246 /* are you there */
+#define AO 245 /* abort output--but let prog finish */
+#define IP 244 /* interrupt process--permanently */
+#define BREAK 243 /* break */
+#define DM 242 /* data mark--for connect. cleaning */
+#define NOP 241 /* nop */
+#define SE 240 /* end sub negotiation */
+#define EOR 239 /* end of record (transparent mode) */
+#define ABORT 238 /* Abort process */
+#define SUSP 237 /* Suspend process */
+#define xEOF 236 /* End of file: EOF is already used... */
+
+#define SYNCH 242 /* for telfunc calls */
+
+#ifdef TELCMDS
+char *telcmds[] = {
+ "EOF", "SUSP", "ABORT", "EOR",
+ "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
+ "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
+};
+#else
+extern char *telcmds[];
+#endif
+
+#define TELCMD_FIRST xEOF
+#define TELCMD_LAST IAC
+#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
+ (unsigned int)(x) >= TELCMD_FIRST)
+#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
+
+/* telnet options */
+#define TELOPT_BINARY 0 /* 8-bit data path */
+#define TELOPT_ECHO 1 /* echo */
+#define TELOPT_RCP 2 /* prepare to reconnect */
+#define TELOPT_SGA 3 /* suppress go ahead */
+#define TELOPT_NAMS 4 /* approximate message size */
+#define TELOPT_STATUS 5 /* give status */
+#define TELOPT_TM 6 /* timing mark */
+#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
+#define TELOPT_NAOL 8 /* negotiate about output line width */
+#define TELOPT_NAOP 9 /* negotiate about output page size */
+#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
+#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
+#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
+#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
+#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
+#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
+#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
+#define TELOPT_XASCII 17 /* extended ascii character set */
+#define TELOPT_LOGOUT 18 /* force logout */
+#define TELOPT_BM 19 /* byte macro */
+#define TELOPT_DET 20 /* data entry terminal */
+#define TELOPT_SUPDUP 21 /* supdup protocol */
+#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
+#define TELOPT_SNDLOC 23 /* send location */
+#define TELOPT_TTYPE 24 /* terminal type */
+#define TELOPT_EOR 25 /* end or record */
+#define TELOPT_TUID 26 /* TACACS user identification */
+#define TELOPT_OUTMRK 27 /* output marking */
+#define TELOPT_TTYLOC 28 /* terminal location number */
+#define TELOPT_3270REGIME 29 /* 3270 regime */
+#define TELOPT_X3PAD 30 /* X.3 PAD */
+#define TELOPT_NAWS 31 /* window size */
+#define TELOPT_TSPEED 32 /* terminal speed */
+#define TELOPT_LFLOW 33 /* remote flow control */
+#define TELOPT_LINEMODE 34 /* Linemode option */
+#define TELOPT_XDISPLOC 35 /* X Display Location */
+#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
+#define TELOPT_AUTHENTICATION 37/* Authenticate */
+#define TELOPT_ENCRYPT 38 /* Encryption option */
+#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
+#define TELOPT_EXOPL 255 /* extended-options-list */
+
+
+#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
+#ifdef TELOPTS
+const char *telopts[NTELOPTS+1] = {
+ "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
+ "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
+ "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
+ "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
+ "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
+ "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
+ "TACACS UID", "OUTPUT MARKING", "TTYLOC",
+ "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
+ "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
+ "ENCRYPT", "NEW-ENVIRON",
+ 0,
+};
+#define TELOPT_FIRST TELOPT_BINARY
+#define TELOPT_LAST TELOPT_NEW_ENVIRON
+#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
+#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
+#endif
+
+/* sub-option qualifiers */
+#define TELQUAL_IS 0 /* option is... */
+#define TELQUAL_SEND 1 /* send option */
+#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
+#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
+#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
+
+#define LFLOW_OFF 0 /* Disable remote flow control */
+#define LFLOW_ON 1 /* Enable remote flow control */
+#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
+#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
+
+/*
+ * LINEMODE suboptions
+ */
+
+#define LM_MODE 1
+#define LM_FORWARDMASK 2
+#define LM_SLC 3
+
+#define MODE_EDIT 0x01
+#define MODE_TRAPSIG 0x02
+#define MODE_ACK 0x04
+#define MODE_SOFT_TAB 0x08
+#define MODE_LIT_ECHO 0x10
+
+#define MODE_MASK 0x1f
+
+/* Not part of protocol, but needed to simplify things... */
+#define MODE_FLOW 0x0100
+#define MODE_ECHO 0x0200
+#define MODE_INBIN 0x0400
+#define MODE_OUTBIN 0x0800
+#define MODE_FORCE 0x1000
+
+#define SLC_SYNCH 1
+#define SLC_BRK 2
+#define SLC_IP 3
+#define SLC_AO 4
+#define SLC_AYT 5
+#define SLC_EOR 6
+#define SLC_ABORT 7
+#define SLC_EOF 8
+#define SLC_SUSP 9
+#define SLC_EC 10
+#define SLC_EL 11
+#define SLC_EW 12
+#define SLC_RP 13
+#define SLC_LNEXT 14
+#define SLC_XON 15
+#define SLC_XOFF 16
+#define SLC_FORW1 17
+#define SLC_FORW2 18
+
+#define NSLC 18
+
+/*
+ * For backwards compatibility, we define SLC_NAMES to be the
+ * list of names if SLC_NAMES is not defined.
+ */
+#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
+ "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
+ "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
+#ifdef SLC_NAMES
+const char *slc_names[] = {
+ SLC_NAMELIST
+};
+#else
+extern char *slc_names[];
+#define SLC_NAMES SLC_NAMELIST
+#endif
+
+#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
+#define SLC_NAME(x) slc_names[x]
+
+#define SLC_NOSUPPORT 0
+#define SLC_CANTCHANGE 1
+#define SLC_VARIABLE 2
+#define SLC_DEFAULT 3
+#define SLC_LEVELBITS 0x03
+
+#define SLC_FUNC 0
+#define SLC_FLAGS 1
+#define SLC_VALUE 2
+
+#define SLC_ACK 0x80
+#define SLC_FLUSHIN 0x40
+#define SLC_FLUSHOUT 0x20
+
+#define OLD_ENV_VAR 1
+#define OLD_ENV_VALUE 0
+#define NEW_ENV_VAR 0
+#define NEW_ENV_VALUE 1
+#define ENV_ESC 2
+#define ENV_USERVAR 3
+
+/*
+ * AUTHENTICATION suboptions
+ */
+
+/*
+ * Who is authenticating who ...
+ */
+#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
+#define AUTH_WHO_SERVER 1 /* Server authenticating client */
+#define AUTH_WHO_MASK 1
+
+/*
+ * amount of authentication done
+ */
+#define AUTH_HOW_ONE_WAY 0
+#define AUTH_HOW_MUTUAL 2
+#define AUTH_HOW_MASK 2
+
+#define AUTHTYPE_NULL 0
+#define AUTHTYPE_KERBEROS_V4 1
+#define AUTHTYPE_KERBEROS_V5 2
+#define AUTHTYPE_SPX 3
+#define AUTHTYPE_MINK 4
+#define AUTHTYPE_CNT 5
+
+#define AUTHTYPE_TEST 99
+
+#ifdef AUTH_NAMES
+const char *authtype_names[] = {
+ "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
+};
+#else
+extern char *authtype_names[];
+#endif
+
+#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
+#define AUTHTYPE_NAME(x) authtype_names[x]
+
+/*
+ * ENCRYPTion suboptions
+ */
+#define ENCRYPT_IS 0 /* I pick encryption type ... */
+#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
+#define ENCRYPT_REPLY 2 /* Initial setup response */
+#define ENCRYPT_START 3 /* Am starting to send encrypted */
+#define ENCRYPT_END 4 /* Am ending encrypted */
+#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
+#define ENCRYPT_REQEND 6 /* Request you send encrypting */
+#define ENCRYPT_ENC_KEYID 7
+#define ENCRYPT_DEC_KEYID 8
+#define ENCRYPT_CNT 9
+
+#define ENCTYPE_ANY 0
+#define ENCTYPE_DES_CFB64 1
+#define ENCTYPE_DES_OFB64 2
+#define ENCTYPE_CNT 3
+
+#ifdef ENCRYPT_NAMES
+const char *encrypt_names[] = {
+ "IS", "SUPPORT", "REPLY", "START", "END",
+ "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
+ 0,
+};
+const char *enctype_names[] = {
+ "ANY", "DES_CFB64", "DES_OFB64", 0,
+};
+#else
+extern const char *encrypt_names[];
+extern const char *enctype_names[];
+#endif
+
+
+#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
+#define ENCRYPT_NAME(x) encrypt_names[x]
+
+#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
+#define ENCTYPE_NAME(x) enctype_names[x]
+
+#endif /* arpa/telnet.h */
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..cd76d6b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..129bd2e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..f668fba
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..461a886
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..e8a2de8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/find.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..31f7b96
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..ee267a2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..890c979
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/le.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..04385f2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..0a5d77b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/bug.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..9e4d2ee
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/cputime.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..6d26736
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..c044833
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno-base.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..b2c2351
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..c2f3f72
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/fcntl.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..e9a6a62
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/futex.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..0fa81b7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/ioctl.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..195b48b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/ipc.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..39e4b10
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/local.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..05b53dd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/memory_model.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..b1458ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/mman.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..d3419f0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..6ffa1b5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/percpu.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..389256f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..23853af
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..a9da8e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/poll.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..d46cd30
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/resource.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..cc9d911
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/sections.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..28c3ef6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..3e07bb5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/signal.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..baed6cc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/tlb.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..0efe0e1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/topology.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..4b68f60
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm-generic/xor.h b/6/platforms/android-9/arch-arm/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..16a702b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/a.out.h b/6/platforms/android-9/arch-arm/usr/include/asm/a.out.h
new file mode 120000
index 0000000..5400adf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/board-perseus2.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/board-perseus2.h
new file mode 120000
index 0000000..6f06b4b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/board-perseus2.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/board-perseus2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/board.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/board.h
new file mode 120000
index 0000000..b09eb75
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/board.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/board.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/cpu.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/cpu.h
new file mode 120000
index 0000000..5ab8c2a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/cpu.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/dma.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/dma.h
new file mode 120000
index 0000000..eb914fd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/dma.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/dma.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/fpga.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/fpga.h
new file mode 120000
index 0000000..19771c5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/fpga.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/fpga.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio-switch.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio-switch.h
new file mode 120000
index 0000000..3989382
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio-switch.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/gpio-switch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio.h
new file mode 120000
index 0000000..b80447a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/gpio.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/gpio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/hardware.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/hardware.h
new file mode 120000
index 0000000..4126835
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/hardware.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/io.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/io.h
new file mode 120000
index 0000000..d8ea694
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/io.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/io.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/irqs.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/irqs.h
new file mode 120000
index 0000000..96b3264
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/irqs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/irqs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/mcbsp.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mcbsp.h
new file mode 120000
index 0000000..70f7586
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mcbsp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/mcbsp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/memory.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/memory.h
new file mode 120000
index 0000000..4f622f2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/memory.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/memory.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/mtd-xip.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mtd-xip.h
new file mode 120000
index 0000000..ed3c589
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/mux.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mux.h
new file mode 120000
index 0000000..f3ae1c8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/mux.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/mux.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/omap24xx.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/omap24xx.h
new file mode 120000
index 0000000..b2645ad
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/omap24xx.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/omap24xx.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/serial.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/serial.h
new file mode 120000
index 0000000..2e7ad41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/serial.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/serial.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/timex.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/timex.h
new file mode 120000
index 0000000..565cb2f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/timex.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/timex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/arch/vmalloc.h b/6/platforms/android-9/arch-arm/usr/include/asm/arch/vmalloc.h
new file mode 120000
index 0000000..2f8fb7a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/arch/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/asm/arch/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/atomic.h b/6/platforms/android-9/arch-arm/usr/include/asm/atomic.h
new file mode 120000
index 0000000..613aa73
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/atomic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/auxvec.h b/6/platforms/android-9/arch-arm/usr/include/asm/auxvec.h
new file mode 120000
index 0000000..e73253d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/bitops.h b/6/platforms/android-9/arch-arm/usr/include/asm/bitops.h
new file mode 120000
index 0000000..801c62d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/byteorder.h b/6/platforms/android-9/arch-arm/usr/include/asm/byteorder.h
new file mode 120000
index 0000000..d44ebfd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/byteorder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/byteorder.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/cache.h b/6/platforms/android-9/arch-arm/usr/include/asm/cache.h
new file mode 120000
index 0000000..269171b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/cache.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/cacheflush.h b/6/platforms/android-9/arch-arm/usr/include/asm/cacheflush.h
new file mode 120000
index 0000000..f496366
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/cacheflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/cacheflush.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/cputime.h b/6/platforms/android-9/arch-arm/usr/include/asm/cputime.h
new file mode 120000
index 0000000..be50a15
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/delay.h b/6/platforms/android-9/arch-arm/usr/include/asm/delay.h
new file mode 120000
index 0000000..64325be
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/delay.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/div64.h b/6/platforms/android-9/arch-arm/usr/include/asm/div64.h
new file mode 120000
index 0000000..cf616f2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/div64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/div64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/dma-mapping.h b/6/platforms/android-9/arch-arm/usr/include/asm/dma-mapping.h
new file mode 120000
index 0000000..53393e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/dma.h b/6/platforms/android-9/arch-arm/usr/include/asm/dma.h
new file mode 120000
index 0000000..330356e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/dma.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/dma.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/domain.h b/6/platforms/android-9/arch-arm/usr/include/asm/domain.h
new file mode 120000
index 0000000..2ca2553
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/domain.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/domain.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/dyntick.h b/6/platforms/android-9/arch-arm/usr/include/asm/dyntick.h
new file mode 120000
index 0000000..15afa38
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/dyntick.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/dyntick.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/elf.h b/6/platforms/android-9/arch-arm/usr/include/asm/elf.h
new file mode 120000
index 0000000..25dff54
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/errno.h b/6/platforms/android-9/arch-arm/usr/include/asm/errno.h
new file mode 120000
index 0000000..7f372e4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/fcntl.h b/6/platforms/android-9/arch-arm/usr/include/asm/fcntl.h
new file mode 120000
index 0000000..855268e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/fpstate.h b/6/platforms/android-9/arch-arm/usr/include/asm/fpstate.h
new file mode 120000
index 0000000..0a15a14
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/fpstate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/fpstate.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/glue.h b/6/platforms/android-9/arch-arm/usr/include/asm/glue.h
new file mode 120000
index 0000000..37f7525
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/glue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/glue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/hardirq.h b/6/platforms/android-9/arch-arm/usr/include/asm/hardirq.h
new file mode 120000
index 0000000..2300661
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/hardware.h b/6/platforms/android-9/arch-arm/usr/include/asm/hardware.h
new file mode 120000
index 0000000..7c72691
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/hardware.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/hardware.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/hw_irq.h b/6/platforms/android-9/arch-arm/usr/include/asm/hw_irq.h
new file mode 120000
index 0000000..45fd304
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/hw_irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/hw_irq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/ide.h b/6/platforms/android-9/arch-arm/usr/include/asm/ide.h
new file mode 120000
index 0000000..a3f4db6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/ide.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/ide.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/io.h b/6/platforms/android-9/arch-arm/usr/include/asm/io.h
new file mode 120000
index 0000000..1145385
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/io.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/io.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/ioctl.h b/6/platforms/android-9/arch-arm/usr/include/asm/ioctl.h
new file mode 120000
index 0000000..8d1ed6b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/ioctls.h b/6/platforms/android-9/arch-arm/usr/include/asm/ioctls.h
new file mode 120000
index 0000000..7d19b54
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/ioctls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/ioctls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/ipcbuf.h b/6/platforms/android-9/arch-arm/usr/include/asm/ipcbuf.h
new file mode 120000
index 0000000..d8a1fa8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/ipcbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/ipcbuf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/irq.h b/6/platforms/android-9/arch-arm/usr/include/asm/irq.h
new file mode 120000
index 0000000..bf8dffa
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/irq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/linkage.h b/6/platforms/android-9/arch-arm/usr/include/asm/linkage.h
new file mode 120000
index 0000000..52beb40
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/local.h b/6/platforms/android-9/arch-arm/usr/include/asm/local.h
new file mode 120000
index 0000000..19b3121
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/local.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/locks.h b/6/platforms/android-9/arch-arm/usr/include/asm/locks.h
new file mode 120000
index 0000000..3240b59
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/locks.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/mc146818rtc.h b/6/platforms/android-9/arch-arm/usr/include/asm/mc146818rtc.h
new file mode 120000
index 0000000..319dab8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/memory.h b/6/platforms/android-9/arch-arm/usr/include/asm/memory.h
new file mode 120000
index 0000000..c44e0d2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/memory.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/memory.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/mman.h b/6/platforms/android-9/arch-arm/usr/include/asm/mman.h
new file mode 120000
index 0000000..6d8a2be
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/mman.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/module.h b/6/platforms/android-9/arch-arm/usr/include/asm/module.h
new file mode 120000
index 0000000..44961d3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/module.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/msgbuf.h b/6/platforms/android-9/arch-arm/usr/include/asm/msgbuf.h
new file mode 120000
index 0000000..0b8b768
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/msgbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/msgbuf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/mtd-xip.h b/6/platforms/android-9/arch-arm/usr/include/asm/mtd-xip.h
new file mode 120000
index 0000000..8ef00b1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/mtd-xip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/mtd-xip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/page.h b/6/platforms/android-9/arch-arm/usr/include/asm/page.h
new file mode 120000
index 0000000..b347209
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/page.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/page.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/param.h b/6/platforms/android-9/arch-arm/usr/include/asm/param.h
new file mode 120000
index 0000000..73b5256
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/param.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/percpu.h b/6/platforms/android-9/arch-arm/usr/include/asm/percpu.h
new file mode 120000
index 0000000..6b621b5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/pgalloc.h b/6/platforms/android-9/arch-arm/usr/include/asm/pgalloc.h
new file mode 120000
index 0000000..014d060
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/pgalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/pgalloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/pgtable-hwdef.h b/6/platforms/android-9/arch-arm/usr/include/asm/pgtable-hwdef.h
new file mode 120000
index 0000000..b8079b1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/pgtable-hwdef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/pgtable-hwdef.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/pgtable.h b/6/platforms/android-9/arch-arm/usr/include/asm/pgtable.h
new file mode 120000
index 0000000..e5d81c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/poll.h b/6/platforms/android-9/arch-arm/usr/include/asm/poll.h
new file mode 120000
index 0000000..d9fcd39
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/posix_types.h b/6/platforms/android-9/arch-arm/usr/include/asm/posix_types.h
new file mode 120000
index 0000000..9ed0229
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/proc-fns.h b/6/platforms/android-9/arch-arm/usr/include/asm/proc-fns.h
new file mode 120000
index 0000000..6ba1c64
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/proc-fns.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/proc-fns.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/processor.h b/6/platforms/android-9/arch-arm/usr/include/asm/processor.h
new file mode 120000
index 0000000..da130f7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/processor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/processor.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/procinfo.h b/6/platforms/android-9/arch-arm/usr/include/asm/procinfo.h
new file mode 120000
index 0000000..13c736c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/procinfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/procinfo.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/ptrace.h b/6/platforms/android-9/arch-arm/usr/include/asm/ptrace.h
new file mode 120000
index 0000000..09b028d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/resource.h b/6/platforms/android-9/arch-arm/usr/include/asm/resource.h
new file mode 120000
index 0000000..1802d19
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/scatterlist.h b/6/platforms/android-9/arch-arm/usr/include/asm/scatterlist.h
new file mode 120000
index 0000000..751ecdc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/scatterlist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/scatterlist.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/semaphore.h b/6/platforms/android-9/arch-arm/usr/include/asm/semaphore.h
new file mode 120000
index 0000000..debc9d6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/semaphore.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/sembuf.h b/6/platforms/android-9/arch-arm/usr/include/asm/sembuf.h
new file mode 120000
index 0000000..1244a66
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/sembuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/sembuf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/shmbuf.h b/6/platforms/android-9/arch-arm/usr/include/asm/shmbuf.h
new file mode 120000
index 0000000..bb57f23
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/shmbuf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/shmbuf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/shmparam.h b/6/platforms/android-9/arch-arm/usr/include/asm/shmparam.h
new file mode 120000
index 0000000..b4b6b4a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/shmparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/shmparam.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/sigcontext.h b/6/platforms/android-9/arch-arm/usr/include/asm/sigcontext.h
new file mode 120000
index 0000000..6b20407
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/sigcontext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/sigcontext.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/siginfo.h b/6/platforms/android-9/arch-arm/usr/include/asm/siginfo.h
new file mode 120000
index 0000000..2a3a60a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/signal.h b/6/platforms/android-9/arch-arm/usr/include/asm/signal.h
new file mode 120000
index 0000000..64d7fe0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/sizes.h b/6/platforms/android-9/arch-arm/usr/include/asm/sizes.h
new file mode 120000
index 0000000..8d33941
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/sizes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/sizes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/smp.h b/6/platforms/android-9/arch-arm/usr/include/asm/smp.h
new file mode 120000
index 0000000..6938e59
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/smp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/socket.h b/6/platforms/android-9/arch-arm/usr/include/asm/socket.h
new file mode 120000
index 0000000..a4346c1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/socket.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/sockios.h b/6/platforms/android-9/arch-arm/usr/include/asm/sockios.h
new file mode 120000
index 0000000..151da06
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/spinlock.h b/6/platforms/android-9/arch-arm/usr/include/asm/spinlock.h
new file mode 120000
index 0000000..54c79e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/spinlock_types.h b/6/platforms/android-9/arch-arm/usr/include/asm/spinlock_types.h
new file mode 120000
index 0000000..ebd28e1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/stat.h b/6/platforms/android-9/arch-arm/usr/include/asm/stat.h
new file mode 120000
index 0000000..46b476a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/statfs.h b/6/platforms/android-9/arch-arm/usr/include/asm/statfs.h
new file mode 120000
index 0000000..6836107
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/suspend.h b/6/platforms/android-9/arch-arm/usr/include/asm/suspend.h
new file mode 120000
index 0000000..84cba41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/suspend.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/suspend.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/system.h b/6/platforms/android-9/arch-arm/usr/include/asm/system.h
new file mode 120000
index 0000000..44646c3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/system.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/system.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/termbits.h b/6/platforms/android-9/arch-arm/usr/include/asm/termbits.h
new file mode 120000
index 0000000..f818482
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/termbits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/termbits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/termios.h b/6/platforms/android-9/arch-arm/usr/include/asm/termios.h
new file mode 120000
index 0000000..ffa080e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/termios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/thread_info.h b/6/platforms/android-9/arch-arm/usr/include/asm/thread_info.h
new file mode 120000
index 0000000..4c422d3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/timex.h b/6/platforms/android-9/arch-arm/usr/include/asm/timex.h
new file mode 120000
index 0000000..345629a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/timex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/tlbflush.h b/6/platforms/android-9/arch-arm/usr/include/asm/tlbflush.h
new file mode 120000
index 0000000..00f9dd2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/tlbflush.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/tlbflush.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/topology.h b/6/platforms/android-9/arch-arm/usr/include/asm/topology.h
new file mode 120000
index 0000000..2176aa1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/topology.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/types.h b/6/platforms/android-9/arch-arm/usr/include/asm/types.h
new file mode 120000
index 0000000..a17cfb1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/uaccess.h b/6/platforms/android-9/arch-arm/usr/include/asm/uaccess.h
new file mode 120000
index 0000000..6eb8849
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/uaccess.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/uaccess.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/unaligned.h b/6/platforms/android-9/arch-arm/usr/include/asm/unaligned.h
new file mode 120000
index 0000000..9d1e8c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/unaligned.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/unaligned.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/unistd.h b/6/platforms/android-9/arch-arm/usr/include/asm/unistd.h
new file mode 120000
index 0000000..2ccefc7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/user.h b/6/platforms/android-9/arch-arm/usr/include/asm/user.h
new file mode 120000
index 0000000..7659029
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/user.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/asm/vga.h b/6/platforms/android-9/arch-arm/usr/include/asm/vga.h
new file mode 120000
index 0000000..8fd8cc5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/asm/vga.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/asm/vga.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/assert.h b/6/platforms/android-9/arch-arm/usr/include/assert.h
new file mode 120000
index 0000000..28d7d0c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/byteswap.h b/6/platforms/android-9/arch-arm/usr/include/byteswap.h
new file mode 120000
index 0000000..0de8f84
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/ctype.h b/6/platforms/android-9/arch-arm/usr/include/ctype.h
new file mode 120000
index 0000000..0e5d5e4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/dirent.h b/6/platforms/android-9/arch-arm/usr/include/dirent.h
new file mode 120000
index 0000000..a61aa94
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/dlfcn.h b/6/platforms/android-9/arch-arm/usr/include/dlfcn.h
new file mode 120000
index 0000000..2e22571
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/elf.h b/6/platforms/android-9/arch-arm/usr/include/elf.h
new file mode 120000
index 0000000..276005d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/endian.h b/6/platforms/android-9/arch-arm/usr/include/endian.h
new file mode 120000
index 0000000..d9201d4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/endian.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/err.h b/6/platforms/android-9/arch-arm/usr/include/err.h
new file mode 120000
index 0000000..b3a3fe7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/errno.h b/6/platforms/android-9/arch-arm/usr/include/errno.h
new file mode 120000
index 0000000..85352de
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/fcntl.h b/6/platforms/android-9/arch-arm/usr/include/fcntl.h
new file mode 120000
index 0000000..43cb961
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/features.h b/6/platforms/android-9/arch-arm/usr/include/features.h
new file mode 120000
index 0000000..f40d6ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/fenv.h b/6/platforms/android-9/arch-arm/usr/include/fenv.h
new file mode 120000
index 0000000..48f6d67
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/fenv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/fenv.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/fnmatch.h b/6/platforms/android-9/arch-arm/usr/include/fnmatch.h
new file mode 120000
index 0000000..8b5242e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/fts.h b/6/platforms/android-9/arch-arm/usr/include/fts.h
new file mode 120000
index 0000000..113f7c6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/fts.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/fts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/getopt.h b/6/platforms/android-9/arch-arm/usr/include/getopt.h
new file mode 120000
index 0000000..b9ad50a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/grp.h b/6/platforms/android-9/arch-arm/usr/include/grp.h
new file mode 120000
index 0000000..575e356
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/inttypes.h b/6/platforms/android-9/arch-arm/usr/include/inttypes.h
new file mode 120000
index 0000000..3b85492
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/jni.h b/6/platforms/android-9/arch-arm/usr/include/jni.h
new file mode 120000
index 0000000..6834c49
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/lastlog.h b/6/platforms/android-9/arch-arm/usr/include/lastlog.h
new file mode 120000
index 0000000..42af16c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/libgen.h b/6/platforms/android-9/arch-arm/usr/include/libgen.h
new file mode 120000
index 0000000..2644c9f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/limits.h b/6/platforms/android-9/arch-arm/usr/include/limits.h
new file mode 120000
index 0000000..6f0fdf4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/a.out.h b/6/platforms/android-9/arch-arm/usr/include/linux/a.out.h
new file mode 120000
index 0000000..d2e9f07
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/aio_abi.h b/6/platforms/android-9/arch-arm/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..fc7ed40
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/akm8976.h b/6/platforms/android-9/arch-arm/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..8dc74e4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/android_alarm.h b/6/platforms/android-9/arch-arm/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..51112c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/android_pmem.h b/6/platforms/android-9/arch-arm/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..e4d8b33
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/android_power.h b/6/platforms/android-9/arch-arm/usr/include/linux/android_power.h
new file mode 120000
index 0000000..26a2b4f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/apm_bios.h b/6/platforms/android-9/arch-arm/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..2ffa07b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ashmem.h b/6/platforms/android-9/arch-arm/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..9a1c4ed
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ata.h b/6/platforms/android-9/arch-arm/usr/include/linux/ata.h
new file mode 120000
index 0000000..002c320
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atm.h b/6/platforms/android-9/arch-arm/usr/include/linux/atm.h
new file mode 120000
index 0000000..b79f7d0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atmapi.h b/6/platforms/android-9/arch-arm/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..e4cdd9b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atmdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..1d3249f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atmioc.h b/6/platforms/android-9/arch-arm/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..47db044
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atmppp.h b/6/platforms/android-9/arch-arm/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..1886559
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/atmsap.h b/6/platforms/android-9/arch-arm/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..1c2c724
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/attribute_container.h b/6/platforms/android-9/arch-arm/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..f6ea900
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/auto_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..7976edc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/autoconf.h b/6/platforms/android-9/arch-arm/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..3669aef
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/auxvec.h b/6/platforms/android-9/arch-arm/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..f441829
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/backing-dev.h b/6/platforms/android-9/arch-arm/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..c34a105
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/binder.h b/6/platforms/android-9/arch-arm/usr/include/linux/binder.h
new file mode 120000
index 0000000..21fbc39
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/binfmts.h b/6/platforms/android-9/arch-arm/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..9cbc10a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/bio.h b/6/platforms/android-9/arch-arm/usr/include/linux/bio.h
new file mode 120000
index 0000000..c2d299b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/bitmap.h b/6/platforms/android-9/arch-arm/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..4877469
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/bitops.h b/6/platforms/android-9/arch-arm/usr/include/linux/bitops.h
new file mode 120000
index 0000000..8ef6796
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/blkdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..fac8dd5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/blkpg.h b/6/platforms/android-9/arch-arm/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..736efd1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/blockgroup_lock.h b/6/platforms/android-9/arch-arm/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..657fcd2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..3a039d5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/generic.h b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..6da2276
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..6adca05
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swab.h b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..80592f4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swabb.h b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..8c9e616
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/cache.h b/6/platforms/android-9/arch-arm/usr/include/linux/cache.h
new file mode 120000
index 0000000..127f44b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/calc64.h b/6/platforms/android-9/arch-arm/usr/include/linux/calc64.h
new file mode 120000
index 0000000..c2b841d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/capability.h b/6/platforms/android-9/arch-arm/usr/include/linux/capability.h
new file mode 120000
index 0000000..34593ff
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/capi.h b/6/platforms/android-9/arch-arm/usr/include/linux/capi.h
new file mode 120000
index 0000000..2504502
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/cdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/cdev.h
new file mode 120000
index 0000000..c7c8511
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/cdrom.h b/6/platforms/android-9/arch-arm/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..f202914
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/circ_buf.h b/6/platforms/android-9/arch-arm/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..a560e25
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/clk.h b/6/platforms/android-9/arch-arm/usr/include/linux/clk.h
new file mode 120000
index 0000000..c11057e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/coda.h b/6/platforms/android-9/arch-arm/usr/include/linux/coda.h
new file mode 120000
index 0000000..8eadcb4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/coda_fs_i.h b/6/platforms/android-9/arch-arm/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..3a94327
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/compat.h b/6/platforms/android-9/arch-arm/usr/include/linux/compat.h
new file mode 120000
index 0000000..55c7d64
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/compiler-gcc.h b/6/platforms/android-9/arch-arm/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..d46e2ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/compiler.h b/6/platforms/android-9/arch-arm/usr/include/linux/compiler.h
new file mode 120000
index 0000000..fd67818
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/completion.h b/6/platforms/android-9/arch-arm/usr/include/linux/completion.h
new file mode 120000
index 0000000..933c0c8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/config.h b/6/platforms/android-9/arch-arm/usr/include/linux/config.h
new file mode 120000
index 0000000..ac3786e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/console_struct.h b/6/platforms/android-9/arch-arm/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..9eac424
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/cpu.h b/6/platforms/android-9/arch-arm/usr/include/linux/cpu.h
new file mode 120000
index 0000000..9e20fd9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/cpumask.h b/6/platforms/android-9/arch-arm/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..0e70781
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ctype.h b/6/platforms/android-9/arch-arm/usr/include/linux/ctype.h
new file mode 120000
index 0000000..f56ffaa
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/dccp.h b/6/platforms/android-9/arch-arm/usr/include/linux/dccp.h
new file mode 120000
index 0000000..5c7bfb5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/debug_locks.h b/6/platforms/android-9/arch-arm/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..75cac82
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/delay.h b/6/platforms/android-9/arch-arm/usr/include/linux/delay.h
new file mode 120000
index 0000000..dbcec1a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/device.h b/6/platforms/android-9/arch-arm/usr/include/linux/device.h
new file mode 120000
index 0000000..f5583ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/dirent.h b/6/platforms/android-9/arch-arm/usr/include/linux/dirent.h
new file mode 120000
index 0000000..07bc850
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/dm-ioctl.h b/6/platforms/android-9/arch-arm/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..e4f65ef
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/dma-mapping.h b/6/platforms/android-9/arch-arm/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..5d76203
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/dmaengine.h b/6/platforms/android-9/arch-arm/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..f069da8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/efs_dir.h b/6/platforms/android-9/arch-arm/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..8dc701b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_i.h b/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..4bc9da8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_sb.h b/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..1e02ff1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/elevator.h b/6/platforms/android-9/arch-arm/usr/include/linux/elevator.h
new file mode 120000
index 0000000..3c91997
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/elf-em.h b/6/platforms/android-9/arch-arm/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..ffd4a72
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/elf.h b/6/platforms/android-9/arch-arm/usr/include/linux/elf.h
new file mode 120000
index 0000000..ec25035
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/err.h b/6/platforms/android-9/arch-arm/usr/include/linux/err.h
new file mode 120000
index 0000000..1d46137
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/errno.h b/6/platforms/android-9/arch-arm/usr/include/linux/errno.h
new file mode 120000
index 0000000..a47a636
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/errqueue.h b/6/platforms/android-9/arch-arm/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..a964ed1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/etherdevice.h b/6/platforms/android-9/arch-arm/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..9cb4966
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ext2_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..5d7e767
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ext3_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..2b24077
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/fadvise.h b/6/platforms/android-9/arch-arm/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..314057e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/fb.h b/6/platforms/android-9/arch-arm/usr/include/linux/fb.h
new file mode 120000
index 0000000..7f50757
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/fcntl.h b/6/platforms/android-9/arch-arm/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..595ba88
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/fd.h b/6/platforms/android-9/arch-arm/usr/include/linux/fd.h
new file mode 120000
index 0000000..da442e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/file.h b/6/platforms/android-9/arch-arm/usr/include/linux/file.h
new file mode 120000
index 0000000..af2a1c0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/filter.h b/6/platforms/android-9/arch-arm/usr/include/linux/filter.h
new file mode 120000
index 0000000..c259f75
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/fs.h
new file mode 120000
index 0000000..fb52c1e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ftape.h b/6/platforms/android-9/arch-arm/usr/include/linux/ftape.h
new file mode 120000
index 0000000..832d273
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/futex.h b/6/platforms/android-9/arch-arm/usr/include/linux/futex.h
new file mode 120000
index 0000000..1d8907e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/genhd.h b/6/platforms/android-9/arch-arm/usr/include/linux/genhd.h
new file mode 120000
index 0000000..5c0ffab
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/gfp.h b/6/platforms/android-9/arch-arm/usr/include/linux/gfp.h
new file mode 120000
index 0000000..237e632
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/hardirq.h b/6/platforms/android-9/arch-arm/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..28b7baf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-9/arch-arm/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..c1acf9e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/hdreg.h b/6/platforms/android-9/arch-arm/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..4dc87b6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/hdsmart.h b/6/platforms/android-9/arch-arm/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..09e37c4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/highmem.h b/6/platforms/android-9/arch-arm/usr/include/linux/highmem.h
new file mode 120000
index 0000000..6091a06
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/hil.h b/6/platforms/android-9/arch-arm/usr/include/linux/hil.h
new file mode 120000
index 0000000..337306e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/i2c.h b/6/platforms/android-9/arch-arm/usr/include/linux/i2c.h
new file mode 120000
index 0000000..bd773da
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/icmp.h b/6/platforms/android-9/arch-arm/usr/include/linux/icmp.h
new file mode 120000
index 0000000..e45af01
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if.h b/6/platforms/android-9/arch-arm/usr/include/linux/if.h
new file mode 120000
index 0000000..0111270
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_arcnet.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..af1869f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_arp.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..ad3d087
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_bridge.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..8cc7808
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_ether.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..f7c3e27
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_fc.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..32a827d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_fddi.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..2b7834b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_hippi.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..9785777
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_packet.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..9535969
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_ppp.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..8614591
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_tr.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..6afba1e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_tun.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..49d841e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/if_vlan.h b/6/platforms/android-9/arch-arm/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..5d2a42d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/in.h b/6/platforms/android-9/arch-arm/usr/include/linux/in.h
new file mode 120000
index 0000000..46b5624
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/in6.h b/6/platforms/android-9/arch-arm/usr/include/linux/in6.h
new file mode 120000
index 0000000..98707e3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/init.h b/6/platforms/android-9/arch-arm/usr/include/linux/init.h
new file mode 120000
index 0000000..7628a43
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/inotify.h b/6/platforms/android-9/arch-arm/usr/include/linux/inotify.h
new file mode 120000
index 0000000..141a19d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/input.h b/6/platforms/android-9/arch-arm/usr/include/linux/input.h
new file mode 120000
index 0000000..6306421
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/interrupt.h b/6/platforms/android-9/arch-arm/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..d546413
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ioctl.h b/6/platforms/android-9/arch-arm/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..5b5577e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ioport.h b/6/platforms/android-9/arch-arm/usr/include/linux/ioport.h
new file mode 120000
index 0000000..225eb83
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ioprio.h b/6/platforms/android-9/arch-arm/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..a82fa0c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ip.h b/6/platforms/android-9/arch-arm/usr/include/linux/ip.h
new file mode 120000
index 0000000..1ff1de6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ipc.h b/6/platforms/android-9/arch-arm/usr/include/linux/ipc.h
new file mode 120000
index 0000000..d17a177
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..0c98a09
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_smi.h b/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..9984d10
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ipx.h b/6/platforms/android-9/arch-arm/usr/include/linux/ipx.h
new file mode 120000
index 0000000..1cb738b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/irq.h b/6/platforms/android-9/arch-arm/usr/include/linux/irq.h
new file mode 120000
index 0000000..ab441ef
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/irq_cpustat.h b/6/platforms/android-9/arch-arm/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..415e181
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/irqflags.h b/6/platforms/android-9/arch-arm/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..3436fe1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/irqreturn.h b/6/platforms/android-9/arch-arm/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..9dbb961
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/jbd.h b/6/platforms/android-9/arch-arm/usr/include/linux/jbd.h
new file mode 120000
index 0000000..88b613b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/jiffies.h b/6/platforms/android-9/arch-arm/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..9c26c5d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kd.h b/6/platforms/android-9/arch-arm/usr/include/linux/kd.h
new file mode 120000
index 0000000..b987287
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kdev_t.h b/6/platforms/android-9/arch-arm/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..463eb9c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kernel.h b/6/platforms/android-9/arch-arm/usr/include/linux/kernel.h
new file mode 120000
index 0000000..0b8835f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kernel_stat.h b/6/platforms/android-9/arch-arm/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..1de1ca8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kernelcapi.h b/6/platforms/android-9/arch-arm/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..ad12a0f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kexec.h b/6/platforms/android-9/arch-arm/usr/include/linux/kexec.h
new file mode 120000
index 0000000..101a3ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/key.h b/6/platforms/android-9/arch-arm/usr/include/linux/key.h
new file mode 120000
index 0000000..7030139
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/keyboard.h b/6/platforms/android-9/arch-arm/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..58d97e3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/keychord.h b/6/platforms/android-9/arch-arm/usr/include/linux/keychord.h
new file mode 120000
index 0000000..3b42ced
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/klist.h b/6/platforms/android-9/arch-arm/usr/include/linux/klist.h
new file mode 120000
index 0000000..b60cae2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kmod.h b/6/platforms/android-9/arch-arm/usr/include/linux/kmod.h
new file mode 120000
index 0000000..5dc7a93
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kobject.h b/6/platforms/android-9/arch-arm/usr/include/linux/kobject.h
new file mode 120000
index 0000000..864ae1e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/kref.h b/6/platforms/android-9/arch-arm/usr/include/linux/kref.h
new file mode 120000
index 0000000..419159a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ktime.h b/6/platforms/android-9/arch-arm/usr/include/linux/ktime.h
new file mode 120000
index 0000000..9a02c01
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/limits.h b/6/platforms/android-9/arch-arm/usr/include/linux/limits.h
new file mode 120000
index 0000000..18bb8ef
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/linkage.h b/6/platforms/android-9/arch-arm/usr/include/linux/linkage.h
new file mode 120000
index 0000000..d2684d7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/list.h b/6/platforms/android-9/arch-arm/usr/include/linux/list.h
new file mode 120000
index 0000000..e7daf84
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/lockd/nlm.h b/6/platforms/android-9/arch-arm/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..3099d2f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/lockd/xdr.h b/6/platforms/android-9/arch-arm/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..f059a86
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/lockdep.h b/6/platforms/android-9/arch-arm/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..834c278
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/loop.h b/6/platforms/android-9/arch-arm/usr/include/linux/loop.h
new file mode 120000
index 0000000..fcb2527
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/magic.h b/6/platforms/android-9/arch-arm/usr/include/linux/magic.h
new file mode 120000
index 0000000..1a809af
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/major.h b/6/platforms/android-9/arch-arm/usr/include/linux/major.h
new file mode 120000
index 0000000..59d626a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mc146818rtc.h b/6/platforms/android-9/arch-arm/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..ee39edc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mca.h b/6/platforms/android-9/arch-arm/usr/include/linux/mca.h
new file mode 120000
index 0000000..a2a6064
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mempolicy.h b/6/platforms/android-9/arch-arm/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..b590278
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mempool.h b/6/platforms/android-9/arch-arm/usr/include/linux/mempool.h
new file mode 120000
index 0000000..85e6b9e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/miscdevice.h b/6/platforms/android-9/arch-arm/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..07ac467
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mm.h b/6/platforms/android-9/arch-arm/usr/include/linux/mm.h
new file mode 120000
index 0000000..24edf41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mmc/card.h b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..c44dc06
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mmc/host.h b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..9a236eb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mmc/mmc.h b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..738db2c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mmzone.h b/6/platforms/android-9/arch-arm/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..92f0711
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mod_devicetable.h b/6/platforms/android-9/arch-arm/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..f75c866
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/module.h b/6/platforms/android-9/arch-arm/usr/include/linux/module.h
new file mode 120000
index 0000000..2640dfb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/moduleparam.h b/6/platforms/android-9/arch-arm/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..57a90fd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mount.h b/6/platforms/android-9/arch-arm/usr/include/linux/mount.h
new file mode 120000
index 0000000..d218a15
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/msdos_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..f8f5789
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/msg.h b/6/platforms/android-9/arch-arm/usr/include/linux/msg.h
new file mode 120000
index 0000000..59ea75b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/msm_adsp.h b/6/platforms/android-9/arch-arm/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..fdf4a4a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/msm_audio.h b/6/platforms/android-9/arch-arm/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..e6a069a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/msm_mdp.h b/6/platforms/android-9/arch-arm/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..58dd973
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mt9t013.h b/6/platforms/android-9/arch-arm/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..c19cda6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/bbm.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..e6cd98b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/blktrans.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..ba26f8e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..320c27f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..5610fc7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/compatmac.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..6871850
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/flashchip.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..52379ed
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/map.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..1258173
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/mtd.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..0956683
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..1dab241
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..a04b597
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nftl.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..0843e24
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..4aa01f9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtd/partitions.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..55a6f17
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mtio.h b/6/platforms/android-9/arch-arm/usr/include/linux/mtio.h
new file mode 120000
index 0000000..3556225
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mutex-debug.h b/6/platforms/android-9/arch-arm/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..03132f1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/mutex.h b/6/platforms/android-9/arch-arm/usr/include/linux/mutex.h
new file mode 120000
index 0000000..5aa20a7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ncp.h b/6/platforms/android-9/arch-arm/usr/include/linux/ncp.h
new file mode 120000
index 0000000..f902753
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ncp_mount.h b/6/platforms/android-9/arch-arm/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..a3e7688
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ncp_no.h b/6/platforms/android-9/arch-arm/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..d742d61
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/net.h b/6/platforms/android-9/arch-arm/usr/include/linux/net.h
new file mode 120000
index 0000000..05e59ee
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netdevice.h b/6/platforms/android-9/arch-arm/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..d3b68c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..633d82e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..8d9bb90
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..75608ea
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..ac63736
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..5b9b60e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..71e5c1b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..df86a35
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..05acacf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..446d72b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..2e918e4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..0ba99d1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..be93f08
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..27677ff
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..47b895d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..ddcd4d1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..0caab76
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..34682c1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..d5a0892
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..68b56a2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..e1ddb57
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..faf7a74
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..5f740b8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..a74f8b7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..dbbc577
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..eee8536
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..ccb5da6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..1c657b8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..fe5a1a7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..338dd63
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..1330aa0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..577f709
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..292b445
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..14e9fce
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..fc6f86e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..4a29d1b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_bridge.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..d0178c9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..a004249
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..8c3d941
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..f982cf4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..b53ae2f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..888dbd5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..65f980c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..290ec9d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..7f48603
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..cf90553
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..e35385d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..55756a8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..5f70a76
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..0747952
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..599977e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..6ab14db
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..8b44a43
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..0ff7c43
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..14a1414
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..c29467d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..3b4a8dd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..d90809a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..1c35d56
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..d358270
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..ed26c8c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..9bf51e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..041e4c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..38f6236
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..e0347f3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..eae43ea
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..a8ffbdb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..093acd2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..c5edadf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..bbd7f8e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..03eda26
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..7236f5e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..db38dfd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..b83d276
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..3e033e8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..b7676bc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..3436b86
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..7392107
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..4365338
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..21cb850
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..11cecd4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..0aec932
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..69f9e20
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..ac29116
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..423a7b6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..8939e5a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..a32e0cb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..6e747d2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..52136a4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/netlink.h b/6/platforms/android-9/arch-arm/usr/include/linux/netlink.h
new file mode 120000
index 0000000..fec7574
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfs.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfs.h
new file mode 120000
index 0000000..21c0e4e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfs2.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..0779af6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfs3.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..f4dd543
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfs4.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..07c1621
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfs_xdr.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..7097774
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsacl.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..83fde68
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/auth.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..2d33e8f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/const.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..93a9d83
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/debug.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..800f6f4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/export.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..2f18c21
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/interface.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..21ea76c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..e19efda
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/stats.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..9a550e4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/xdr.h b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..1ab8221
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/node.h b/6/platforms/android-9/arch-arm/usr/include/linux/node.h
new file mode 120000
index 0000000..6836427
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nodemask.h b/6/platforms/android-9/arch-arm/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..df344db
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/notifier.h b/6/platforms/android-9/arch-arm/usr/include/linux/notifier.h
new file mode 120000
index 0000000..3815cbe
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/numa.h b/6/platforms/android-9/arch-arm/usr/include/linux/numa.h
new file mode 120000
index 0000000..db3b823
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/nvram.h b/6/platforms/android-9/arch-arm/usr/include/linux/nvram.h
new file mode 120000
index 0000000..d1cd018
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/omap_csmi.h b/6/platforms/android-9/arch-arm/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..11d30d4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pagemap.h b/6/platforms/android-9/arch-arm/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..1028b61
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/param.h b/6/platforms/android-9/arch-arm/usr/include/linux/param.h
new file mode 120000
index 0000000..a23eaaf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/patchkey.h b/6/platforms/android-9/arch-arm/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..36e0c06
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pci.h b/6/platforms/android-9/arch-arm/usr/include/linux/pci.h
new file mode 120000
index 0000000..d11c64e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pci_ids.h b/6/platforms/android-9/arch-arm/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..1a78f91
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pci_regs.h b/6/platforms/android-9/arch-arm/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..ad29599
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/percpu.h b/6/platforms/android-9/arch-arm/usr/include/linux/percpu.h
new file mode 120000
index 0000000..fe3e727
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/percpu_counter.h b/6/platforms/android-9/arch-arm/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..120025a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/personality.h b/6/platforms/android-9/arch-arm/usr/include/linux/personality.h
new file mode 120000
index 0000000..45b684d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pfkeyv2.h b/6/platforms/android-9/arch-arm/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..134c9cc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pkt_cls.h b/6/platforms/android-9/arch-arm/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..2126f14
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pkt_sched.h b/6/platforms/android-9/arch-arm/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..dbc467a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/platform_device.h b/6/platforms/android-9/arch-arm/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..1521b8b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/plist.h b/6/platforms/android-9/arch-arm/usr/include/linux/plist.h
new file mode 120000
index 0000000..d376953
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pm.h b/6/platforms/android-9/arch-arm/usr/include/linux/pm.h
new file mode 120000
index 0000000..bc5f682
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/pnp.h b/6/platforms/android-9/arch-arm/usr/include/linux/pnp.h
new file mode 120000
index 0000000..3fc2127
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/poll.h b/6/platforms/android-9/arch-arm/usr/include/linux/poll.h
new file mode 120000
index 0000000..f4bbf88
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/posix_acl.h b/6/platforms/android-9/arch-arm/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..37683ae
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/posix_types.h b/6/platforms/android-9/arch-arm/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..a5aceb9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ppdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..b3ae2d8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ppp_defs.h b/6/platforms/android-9/arch-arm/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..51e3467
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/prctl.h b/6/platforms/android-9/arch-arm/usr/include/linux/prctl.h
new file mode 120000
index 0000000..f75fa27
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/preempt.h b/6/platforms/android-9/arch-arm/usr/include/linux/preempt.h
new file mode 120000
index 0000000..921d811
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/proc_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..8e8f814
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ptrace.h b/6/platforms/android-9/arch-arm/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..5541b35
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/qic117.h b/6/platforms/android-9/arch-arm/usr/include/linux/qic117.h
new file mode 120000
index 0000000..45ea8f8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/qnxtypes.h b/6/platforms/android-9/arch-arm/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..0e35285
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/quota.h b/6/platforms/android-9/arch-arm/usr/include/linux/quota.h
new file mode 120000
index 0000000..bb067fa
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/raid/md.h b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..6bb30ca
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_k.h b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..f3d6219
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_p.h b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..9405ce5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_u.h b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..c35e03d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/raid/xor.h b/6/platforms/android-9/arch-arm/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..b5b10dc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/random.h b/6/platforms/android-9/arch-arm/usr/include/linux/random.h
new file mode 120000
index 0000000..dda28b9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/rbtree.h b/6/platforms/android-9/arch-arm/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..057788a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/rcupdate.h b/6/platforms/android-9/arch-arm/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..e54de78
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/reboot.h b/6/platforms/android-9/arch-arm/usr/include/linux/reboot.h
new file mode 120000
index 0000000..e5fccc9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/relay.h b/6/platforms/android-9/arch-arm/usr/include/linux/relay.h
new file mode 120000
index 0000000..9718c73
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/resource.h b/6/platforms/android-9/arch-arm/usr/include/linux/resource.h
new file mode 120000
index 0000000..bb925e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/route.h b/6/platforms/android-9/arch-arm/usr/include/linux/route.h
new file mode 120000
index 0000000..70d993f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/rtc.h b/6/platforms/android-9/arch-arm/usr/include/linux/rtc.h
new file mode 120000
index 0000000..f7a2daf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/rtnetlink.h b/6/platforms/android-9/arch-arm/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..e9d3b79
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/rwsem.h b/6/platforms/android-9/arch-arm/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..427d052
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sched.h b/6/platforms/android-9/arch-arm/usr/include/linux/sched.h
new file mode 120000
index 0000000..2fe1ef2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sem.h b/6/platforms/android-9/arch-arm/usr/include/linux/sem.h
new file mode 120000
index 0000000..ea8fa14
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/seq_file.h b/6/platforms/android-9/arch-arm/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..ca2c043
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/seqlock.h b/6/platforms/android-9/arch-arm/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..50b26b5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/serial_core.h b/6/platforms/android-9/arch-arm/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..8853fe9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/serial_reg.h b/6/platforms/android-9/arch-arm/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..aeecc0d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/serio.h b/6/platforms/android-9/arch-arm/usr/include/linux/serio.h
new file mode 120000
index 0000000..0e18c99
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/shm.h b/6/platforms/android-9/arch-arm/usr/include/linux/shm.h
new file mode 120000
index 0000000..d763d80
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/signal.h b/6/platforms/android-9/arch-arm/usr/include/linux/signal.h
new file mode 120000
index 0000000..15c8aa3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/skbuff.h b/6/platforms/android-9/arch-arm/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..706dfa2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/slab.h b/6/platforms/android-9/arch-arm/usr/include/linux/slab.h
new file mode 120000
index 0000000..84f66c1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/smb.h b/6/platforms/android-9/arch-arm/usr/include/linux/smb.h
new file mode 120000
index 0000000..2634a78
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/smp.h b/6/platforms/android-9/arch-arm/usr/include/linux/smp.h
new file mode 120000
index 0000000..7d56d68
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/smp_lock.h b/6/platforms/android-9/arch-arm/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..1cf1dbd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/socket.h b/6/platforms/android-9/arch-arm/usr/include/linux/socket.h
new file mode 120000
index 0000000..992307f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sockios.h b/6/platforms/android-9/arch-arm/usr/include/linux/sockios.h
new file mode 120000
index 0000000..3bc72c6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/soundcard.h b/6/platforms/android-9/arch-arm/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..addbdde
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..2397260
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..47361d2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_up.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..c4b185f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..619fdc6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types_up.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..8b7de8e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_up.h b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..c7afec1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/stacktrace.h b/6/platforms/android-9/arch-arm/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..9716690
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/stat.h b/6/platforms/android-9/arch-arm/usr/include/linux/stat.h
new file mode 120000
index 0000000..5bfa679
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/statfs.h b/6/platforms/android-9/arch-arm/usr/include/linux/statfs.h
new file mode 120000
index 0000000..ed999af
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/stddef.h b/6/platforms/android-9/arch-arm/usr/include/linux/stddef.h
new file mode 120000
index 0000000..6f04dab
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/string.h b/6/platforms/android-9/arch-arm/usr/include/linux/string.h
new file mode 120000
index 0000000..4af98b3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/stringify.h b/6/platforms/android-9/arch-arm/usr/include/linux/stringify.h
new file mode 120000
index 0000000..72e4e20
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..55c1fae
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..43d1369
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..7d77dd2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/debug.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..7a23ca1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..fda48c0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..5a06c2c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..3db3c62
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..74b4de1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/sched.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..0d86d41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/stats.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..e7123ad
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svc.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..9fbec67
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..15508ab
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/timer.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..3b1e0f2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/types.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..0b08e11
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..fb8fbda
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..e962c75
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-arm/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/swap.h b/6/platforms/android-9/arch-arm/usr/include/linux/swap.h
new file mode 120000
index 0000000..41961b9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sysctl.h b/6/platforms/android-9/arch-arm/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..001b10d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sysdev.h b/6/platforms/android-9/arch-arm/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..393e986
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/sysfs.h b/6/platforms/android-9/arch-arm/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..2bd2c48
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/taskstats.h b/6/platforms/android-9/arch-arm/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..04640ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/taskstats_kern.h b/6/platforms/android-9/arch-arm/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..b232638
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/tcp.h b/6/platforms/android-9/arch-arm/usr/include/linux/tcp.h
new file mode 120000
index 0000000..857624e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/telephony.h b/6/platforms/android-9/arch-arm/usr/include/linux/telephony.h
new file mode 120000
index 0000000..5d7757a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/termios.h b/6/platforms/android-9/arch-arm/usr/include/linux/termios.h
new file mode 120000
index 0000000..11abfed
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/textsearch.h b/6/platforms/android-9/arch-arm/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..34d24f4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/thread_info.h b/6/platforms/android-9/arch-arm/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..328a3f9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/threads.h b/6/platforms/android-9/arch-arm/usr/include/linux/threads.h
new file mode 120000
index 0000000..8bfc29b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/time.h b/6/platforms/android-9/arch-arm/usr/include/linux/time.h
new file mode 120000
index 0000000..35db5a7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/timer.h b/6/platforms/android-9/arch-arm/usr/include/linux/timer.h
new file mode 120000
index 0000000..26b22f0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/times.h b/6/platforms/android-9/arch-arm/usr/include/linux/times.h
new file mode 120000
index 0000000..66831cc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/timex.h b/6/platforms/android-9/arch-arm/usr/include/linux/timex.h
new file mode 120000
index 0000000..9b3c2e0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/tiocl.h b/6/platforms/android-9/arch-arm/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..b2bf312
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/transport_class.h b/6/platforms/android-9/arch-arm/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..7047d67
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/tty.h b/6/platforms/android-9/arch-arm/usr/include/linux/tty.h
new file mode 120000
index 0000000..575921a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/types.h b/6/platforms/android-9/arch-arm/usr/include/linux/types.h
new file mode 120000
index 0000000..2e54712
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/udp.h b/6/platforms/android-9/arch-arm/usr/include/linux/udp.h
new file mode 120000
index 0000000..7bdd7c8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_i.h b/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..d5c7b53
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..58e1ef7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/uio.h b/6/platforms/android-9/arch-arm/usr/include/linux/uio.h
new file mode 120000
index 0000000..b6106be
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/un.h b/6/platforms/android-9/arch-arm/usr/include/linux/un.h
new file mode 120000
index 0000000..f0372c2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/unistd.h b/6/platforms/android-9/arch-arm/usr/include/linux/unistd.h
new file mode 120000
index 0000000..a2ae422
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/usb.h b/6/platforms/android-9/arch-arm/usr/include/linux/usb.h
new file mode 120000
index 0000000..0eeb670
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/usb_ch9.h b/6/platforms/android-9/arch-arm/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..b06f2e3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/usbdevice_fs.h b/6/platforms/android-9/arch-arm/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..a191937
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/user.h b/6/platforms/android-9/arch-arm/usr/include/linux/user.h
new file mode 120000
index 0000000..2f6d858
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/utime.h b/6/platforms/android-9/arch-arm/usr/include/linux/utime.h
new file mode 120000
index 0000000..f2213ab
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/utsname.h b/6/platforms/android-9/arch-arm/usr/include/linux/utsname.h
new file mode 120000
index 0000000..8e3f7ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/version.h b/6/platforms/android-9/arch-arm/usr/include/linux/version.h
new file mode 120000
index 0000000..762d9bb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/vfs.h b/6/platforms/android-9/arch-arm/usr/include/linux/vfs.h
new file mode 120000
index 0000000..21f0439
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/videodev.h b/6/platforms/android-9/arch-arm/usr/include/linux/videodev.h
new file mode 120000
index 0000000..a0e4aaf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/videodev2.h b/6/platforms/android-9/arch-arm/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..df16a63
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/vmalloc.h b/6/platforms/android-9/arch-arm/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..0fa10f4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/vt.h b/6/platforms/android-9/arch-arm/usr/include/linux/vt.h
new file mode 120000
index 0000000..63c807a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/vt_buffer.h b/6/platforms/android-9/arch-arm/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..37b98c6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/wait.h b/6/platforms/android-9/arch-arm/usr/include/linux/wait.h
new file mode 120000
index 0000000..44e5f19
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/wanrouter.h b/6/platforms/android-9/arch-arm/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..dbef819
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/wireless.h b/6/platforms/android-9/arch-arm/usr/include/linux/wireless.h
new file mode 120000
index 0000000..11a0df0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/workqueue.h b/6/platforms/android-9/arch-arm/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..a4286eb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/xattr.h b/6/platforms/android-9/arch-arm/usr/include/linux/xattr.h
new file mode 120000
index 0000000..b1fc1ba
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/zconf.h b/6/platforms/android-9/arch-arm/usr/include/linux/zconf.h
new file mode 120000
index 0000000..b51b871
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/zlib.h b/6/platforms/android-9/arch-arm/usr/include/linux/zlib.h
new file mode 120000
index 0000000..8a4788d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/linux/zorro_ids.h b/6/platforms/android-9/arch-arm/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..a8d39b2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/locale.h b/6/platforms/android-9/arch-arm/usr/include/locale.h
new file mode 120000
index 0000000..552f158
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/_types.h b/6/platforms/android-9/arch-arm/usr/include/machine/_types.h
new file mode 120000
index 0000000..1299c44
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/asm.h b/6/platforms/android-9/arch-arm/usr/include/machine/asm.h
new file mode 120000
index 0000000..a03f47e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/asm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/asm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/cdefs.h b/6/platforms/android-9/arch-arm/usr/include/machine/cdefs.h
new file mode 120000
index 0000000..68b8f2e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/cdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/cdefs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/cpu-features.h b/6/platforms/android-9/arch-arm/usr/include/machine/cpu-features.h
new file mode 120000
index 0000000..68a016e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/cpu-features.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/cpu-features.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/exec.h b/6/platforms/android-9/arch-arm/usr/include/machine/exec.h
new file mode 120000
index 0000000..67c960a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/exec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/exec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/ieee.h b/6/platforms/android-9/arch-arm/usr/include/machine/ieee.h
new file mode 120000
index 0000000..0d0bcfc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/ieee.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/ieee.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/internal_types.h b/6/platforms/android-9/arch-arm/usr/include/machine/internal_types.h
new file mode 120000
index 0000000..91d2259
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/internal_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/internal_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/kernel.h b/6/platforms/android-9/arch-arm/usr/include/machine/kernel.h
new file mode 120000
index 0000000..1f9a226
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/limits.h b/6/platforms/android-9/arch-arm/usr/include/machine/limits.h
new file mode 120000
index 0000000..aaf698e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/machine/setjmp.h b/6/platforms/android-9/arch-arm/usr/include/machine/setjmp.h
new file mode 120000
index 0000000..1b42ab2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/machine/setjmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/machine/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/malloc.h b/6/platforms/android-9/arch-arm/usr/include/malloc.h
new file mode 120000
index 0000000..5c8e790
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/math.h b/6/platforms/android-9/arch-arm/usr/include/math.h
new file mode 100644
index 0000000..3b5660f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/math.h
@@ -0,0 +1,493 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
+ */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#define __pure2
+
+/*
+ * ANSI/POSIX
+ */
+extern const union __infinity_un {
+ unsigned char __uc[8];
+ double __ud;
+} __infinity;
+
+extern const union __nan_un {
+ unsigned char __uc[sizeof(float)];
+ float __uf;
+} __nan;
+
+/* #if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) */
+#if 1
+#define __MATH_BUILTIN_CONSTANTS
+#endif
+
+/* #if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER) */
+#if 1
+#define __MATH_BUILTIN_RELOPS
+#endif
+
+/* #ifdef __MATH_BUILTIN_CONSTANTS */
+#if 1
+#define HUGE_VAL __builtin_huge_val()
+#else
+#define HUGE_VAL (__infinity.__ud)
+#endif
+
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+#define FP_ILOGB0 (-__INT_MAX)
+#define FP_ILOGBNAN __INT_MAX
+#else
+#define FP_ILOGB0 (-INT_MAX)
+#define FP_ILOGBNAN INT_MAX
+#endif
+
+#ifdef __MATH_BUILTIN_CONSTANTS
+#define HUGE_VALF __builtin_huge_valf()
+#define HUGE_VALL __builtin_huge_vall()
+#define INFINITY __builtin_inf()
+#define NAN __builtin_nan("")
+#else
+#define HUGE_VALF (float)HUGE_VAL
+#define HUGE_VALL (long double)HUGE_VAL
+#define INFINITY HUGE_VALF
+#define NAN (__nan.__uf)
+#endif /* __MATH_BUILTIN_CONSTANTS */
+
+#define MATH_ERRNO 1
+#define MATH_ERREXCEPT 2
+#define math_errhandling MATH_ERREXCEPT
+
+/* XXX We need a <machine/math.h>. */
+#if defined(__ia64__) || defined(__sparc64__)
+#define FP_FAST_FMA
+#endif
+#ifdef __ia64__
+#define FP_FAST_FMAL
+#endif
+#define FP_FAST_FMAF
+
+/* Symbolic constants to classify floating point numbers. */
+#define FP_INFINITE 0x01
+#define FP_NAN 0x02
+#define FP_NORMAL 0x04
+#define FP_SUBNORMAL 0x08
+#define FP_ZERO 0x10
+#define fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
+ : __fpclassifyl(x))
+
+#define isfinite(x) \
+ ((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
+ : (sizeof (x) == sizeof (double)) ? __isfinite(x) \
+ : __isfinitel(x))
+#define isinf(x) \
+ ((sizeof (x) == sizeof (float)) ? __isinff(x) \
+ : (sizeof (x) == sizeof (double)) ? __isinf(x) \
+ : __isinfl(x))
+#define isnan(x) \
+ ((sizeof (x) == sizeof (float)) ? isnanf(x) \
+ : (sizeof (x) == sizeof (double)) ? isnan(x) \
+ : __isnanl(x))
+#define isnormal(x) \
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
+ : __isnormall(x))
+
+#ifdef __MATH_BUILTIN_RELOPS
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+#else
+#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
+#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
+#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
+#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
+#define islessgreater(x, y) (!isunordered((x), (y)) && \
+ ((x) > (y) || (y) > (x)))
+#define isunordered(x, y) (isnan(x) || isnan(y))
+#endif /* __MATH_BUILTIN_RELOPS */
+
+#define signbit(x) \
+ ((sizeof (x) == sizeof (float)) ? __signbitf(x) \
+ : (sizeof (x) == sizeof (double)) ? __signbit(x) \
+ : __signbitl(x))
+
+#if 0
+typedef __double_t double_t;
+typedef __float_t float_t;
+#endif
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+
+/*
+ * XOPEN/SVID
+ */
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log 2e */
+#define M_LOG10E 0.43429448190325182765 /* log 10e */
+#define M_LN2 0.69314718055994530942 /* log e2 */
+#define M_LN10 2.30258509299404568402 /* log e10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define MAXFLOAT ((float)3.40282346638528860e+38)
+extern int signgam;
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+#if __BSD_VISIBLE
+#if 0
+/* Old value from 4.4BSD-Lite math.h; this is probably better. */
+#define HUGE HUGE_VAL
+#else
+#define HUGE MAXFLOAT
+#endif
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Most of these functions depend on the rounding mode and have the side
+ * effect of raising floating-point exceptions, so they are not declared
+ * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
+ */
+__BEGIN_DECLS
+/*
+ * ANSI/POSIX
+ */
+int __fpclassifyd(double) __pure2;
+int __fpclassifyf(float) __pure2;
+int __fpclassifyl(long double) __pure2;
+int __isfinitef(float) __pure2;
+int __isfinite(double) __pure2;
+int __isfinitel(long double) __pure2;
+int __isinff(float) __pure2;
+int __isinf(double) __pure2;
+int __isinfl(long double) __pure2;
+int __isnanl(long double) __pure2;
+int __isnormalf(float) __pure2;
+int __isnormal(double) __pure2;
+int __isnormall(long double) __pure2;
+int __signbit(double) __pure2;
+int __signbitf(float) __pure2;
+int __signbitl(long double) __pure2;
+
+double acos(double);
+double asin(double);
+double atan(double);
+double atan2(double, double);
+double cos(double);
+double sin(double);
+double tan(double);
+
+double cosh(double);
+double sinh(double);
+double tanh(double);
+
+double exp(double);
+double frexp(double, int *); /* fundamentally !__pure2 */
+double ldexp(double, int);
+double log(double);
+double log10(double);
+double modf(double, double *); /* fundamentally !__pure2 */
+
+double pow(double, double);
+double sqrt(double);
+
+double ceil(double);
+double fabs(double) __pure2;
+double floor(double);
+double fmod(double, double);
+
+/*
+ * These functions are not in C90.
+ */
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+double acosh(double);
+double asinh(double);
+double atanh(double);
+double cbrt(double);
+double erf(double);
+double erfc(double);
+double exp2(double);
+double expm1(double);
+double fma(double, double, double);
+double hypot(double, double);
+int ilogb(double) __pure2;
+/* int (isinf)(double) __pure2; */
+int (isnan)(double) __pure2;
+double lgamma(double);
+long long llrint(double);
+long long llround(double);
+double log1p(double);
+double logb(double);
+long lrint(double);
+long lround(double);
+double nextafter(double, double);
+double remainder(double, double);
+double remquo(double, double, int *);
+double rint(double);
+/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+double j0(double);
+double j1(double);
+double jn(int, double);
+double scalb(double, double);
+double y0(double);
+double y1(double);
+double yn(int, double);
+
+/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
+double gamma(double);
+/* #endif */
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
+double copysign(double, double) __pure2;
+double fdim(double, double);
+double fmax(double, double) __pure2;
+double fmin(double, double) __pure2;
+double nearbyint(double);
+double round(double);
+double scalbln(double, long);
+double scalbn(double, int);
+double tgamma(double);
+double trunc(double);
+/* #endif */
+
+/*
+ * BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+double drem(double, double);
+int finite(double) __pure2;
+int isnanf(float) __pure2;
+
+/*
+ * Reentrant version of gamma & lgamma; passes signgam back by reference
+ * as the second argument; user must allocate space for signgam.
+ */
+double gamma_r(double, int *);
+double lgamma_r(double, int *);
+
+/*
+ * IEEE Test Vector
+ */
+double significand(double);
+/* #endif */ /* __BSD_VISIBLE */
+
+/* float versions of ANSI/POSIX functions */
+/*#if __ISO_C_VISIBLE >= 1999 */
+float acosf(float);
+float asinf(float);
+float atanf(float);
+float atan2f(float, float);
+float cosf(float);
+float sinf(float);
+float tanf(float);
+
+float coshf(float);
+float sinhf(float);
+float tanhf(float);
+
+float exp2f(float);
+float expf(float);
+float expm1f(float);
+float frexpf(float, int *); /* fundamentally !__pure2 */
+int ilogbf(float) __pure2;
+float ldexpf(float, int);
+float log10f(float);
+float log1pf(float);
+float logf(float);
+float modff(float, float *); /* fundamentally !__pure2 */
+
+float powf(float, float);
+float sqrtf(float);
+
+float ceilf(float);
+float fabsf(float) __pure2;
+float floorf(float);
+float fmodf(float, float);
+float roundf(float);
+
+float erff(float);
+float erfcf(float);
+float hypotf(float, float);
+float lgammaf(float);
+
+float acoshf(float);
+float asinhf(float);
+float atanhf(float);
+float cbrtf(float);
+float logbf(float);
+float copysignf(float, float) __pure2;
+long long llrintf(float);
+long long llroundf(float);
+long lrintf(float);
+long lroundf(float);
+float nearbyintf(float);
+float nextafterf(float, float);
+float remainderf(float, float);
+float remquof(float, float, int *);
+float rintf(float);
+float scalblnf(float, long);
+float scalbnf(float, int);
+float truncf(float);
+
+float fdimf(float, float);
+float fmaf(float, float, float);
+float fmaxf(float, float) __pure2;
+float fminf(float, float) __pure2;
+/* #endif */
+
+/*
+ * float versions of BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+float dremf(float, float);
+int finitef(float) __pure2;
+float gammaf(float);
+float j0f(float);
+float j1f(float);
+float jnf(int, float);
+float scalbf(float, float);
+float y0f(float);
+float y1f(float);
+float ynf(int, float);
+
+/*
+ * Float versions of reentrant version of gamma & lgamma; passes
+ * signgam back by reference as the second argument; user must
+ * allocate space for signgam.
+ */
+float gammaf_r(float, int *);
+float lgammaf_r(float, int *);
+
+/*
+ * float version of IEEE Test Vector
+ */
+float significandf(float);
+/* #endif */ /* __BSD_VISIBLE */
+
+/*
+ * long double versions of ISO/POSIX math functions
+ */
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+long double acoshl(long double);
+long double acosl(long double);
+long double asinhl(long double);
+long double asinl(long double);
+long double atan2l(long double, long double);
+long double atanhl(long double);
+long double atanl(long double);
+long double cbrtl(long double);
+#endif
+long double ceill(long double);
+long double copysignl(long double, long double) __pure2;
+#if 0
+long double coshl(long double);
+long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
+long double exp2l(long double);
+long double expl(long double);
+long double expm1l(long double);
+#endif
+long double fabsl(long double) __pure2;
+long double fdiml(long double, long double);
+long double floorl(long double);
+long double fmal(long double, long double, long double);
+long double fmaxl(long double, long double) __pure2;
+long double fminl(long double, long double) __pure2;
+#if 0
+long double fmodl(long double, long double);
+#endif
+long double frexpl(long double value, int *); /* fundamentally !__pure2 */
+#if 0
+long double hypotl(long double, long double);
+#endif
+int ilogbl(long double) __pure2;
+long double ldexpl(long double, int);
+#if 0
+long double lgammal(long double);
+long long llrintl(long double);
+#endif
+long long llroundl(long double);
+#if 0
+long double log10l(long double);
+long double log1pl(long double);
+long double log2l(long double);
+long double logbl(long double);
+long double logl(long double);
+long lrintl(long double);
+#endif
+long lroundl(long double);
+#if 0
+long double modfl(long double, long double *); /* fundamentally !__pure2 */
+long double nanl(const char *) __pure2;
+long double nearbyintl(long double);
+#endif
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+#if 0
+long double powl(long double, long double);
+long double remainderl(long double, long double);
+long double remquol(long double, long double, int *);
+long double rintl(long double);
+#endif
+long double roundl(long double);
+long double scalblnl(long double, long);
+long double scalbnl(long double, int);
+#if 0
+long double sinhl(long double);
+long double sinl(long double);
+long double sqrtl(long double);
+long double tanhl(long double);
+long double tanl(long double);
+long double tgammal(long double);
+#endif
+long double truncl(long double);
+
+/* BIONIC: GLibc compatibility - required by the ARM toolchain */
+#ifdef _GNU_SOURCE
+void sincos(double x, double *sin, double *cos);
+void sincosf(float x, float *sin, float *cos);
+void sincosl(long double x, long double *sin, long double *cos);
+#endif
+
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+__END_DECLS
+
+#endif /* !_MATH_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/memory.h b/6/platforms/android-9/arch-arm/usr/include/memory.h
new file mode 120000
index 0000000..e64931b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/mntent.h b/6/platforms/android-9/arch-arm/usr/include/mntent.h
new file mode 120000
index 0000000..56e5f49
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-abi.h b/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..4e35b7e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-user.h b/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..bc72bba
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/ethertypes.h b/6/platforms/android-9/arch-arm/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..f9212c1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if.h b/6/platforms/android-9/arch-arm/usr/include/net/if.h
new file mode 120000
index 0000000..540a4d7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_arp.h b/6/platforms/android-9/arch-arm/usr/include/net/if_arp.h
new file mode 120000
index 0000000..6da83dc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_dl.h b/6/platforms/android-9/arch-arm/usr/include/net/if_dl.h
new file mode 120000
index 0000000..28f9c2a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_ether.h b/6/platforms/android-9/arch-arm/usr/include/net/if_ether.h
new file mode 120000
index 0000000..c8e1dee
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_ieee1394.h b/6/platforms/android-9/arch-arm/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..f847c52
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_packet.h b/6/platforms/android-9/arch-arm/usr/include/net/if_packet.h
new file mode 120000
index 0000000..9be8df1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/if_types.h b/6/platforms/android-9/arch-arm/usr/include/net/if_types.h
new file mode 120000
index 0000000..d2169a0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/net/route.h b/6/platforms/android-9/arch-arm/usr/include/net/route.h
new file mode 120000
index 0000000..92cdc85
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netdb.h b/6/platforms/android-9/arch-arm/usr/include/netdb.h
new file mode 120000
index 0000000..f365341
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/ether.h b/6/platforms/android-9/arch-arm/usr/include/netinet/ether.h
new file mode 120000
index 0000000..09121cd
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/if_ether.h b/6/platforms/android-9/arch-arm/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..6d5885f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/in.h b/6/platforms/android-9/arch-arm/usr/include/netinet/in.h
new file mode 120000
index 0000000..cabc7e5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/in6.h b/6/platforms/android-9/arch-arm/usr/include/netinet/in6.h
new file mode 120000
index 0000000..c630b36
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/in_systm.h b/6/platforms/android-9/arch-arm/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..d857ffc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/ip.h b/6/platforms/android-9/arch-arm/usr/include/netinet/ip.h
new file mode 120000
index 0000000..08d287c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/ip_icmp.h b/6/platforms/android-9/arch-arm/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..357bbdc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/tcp.h b/6/platforms/android-9/arch-arm/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..dcb7cb7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netinet/udp.h b/6/platforms/android-9/arch-arm/usr/include/netinet/udp.h
new file mode 120000
index 0000000..48be2c4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/netpacket/packet.h b/6/platforms/android-9/arch-arm/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..d29ad3a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/nsswitch.h b/6/platforms/android-9/arch-arm/usr/include/nsswitch.h
new file mode 120000
index 0000000..90df0aa
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/pathconf.h b/6/platforms/android-9/arch-arm/usr/include/pathconf.h
new file mode 120000
index 0000000..e627181
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/paths.h b/6/platforms/android-9/arch-arm/usr/include/paths.h
new file mode 120000
index 0000000..187ed0e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/poll.h b/6/platforms/android-9/arch-arm/usr/include/poll.h
new file mode 120000
index 0000000..928d08c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/pthread.h b/6/platforms/android-9/arch-arm/usr/include/pthread.h
new file mode 100644
index 0000000..5e87043
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/pthread.h
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+#if 0 /* MISSING FROM BIONIC */
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+#endif /* MISSING */
+
+int pthread_condattr_init(pthread_condattr_t *attr);
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared);
+int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared);
+int pthread_condattr_destroy(pthread_condattr_t *attr);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+/* read-write lock support */
+
+typedef int pthread_rwlockattr_t;
+
+typedef struct {
+ pthread_mutex_t lock;
+ pthread_cond_t cond;
+ int numLocks;
+ int writerThreadId;
+ int pendingReaders;
+ int pendingWriters;
+ void* reserved[4]; /* for future extensibility */
+} pthread_rwlock_t;
+
+#define PTHREAD_RWLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0, 0, { NULL, NULL, NULL, NULL } }
+
+int pthread_rwlockattr_init(pthread_rwlockattr_t *attr);
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);
+int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *attr, int *pshared);
+
+int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
+int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
+
+int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
+
+int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
+
+int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);
+
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+int pthread_setname_np(pthread_t thid, const char *thname);
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-9/arch-arm/usr/include/pwd.h b/6/platforms/android-9/arch-arm/usr/include/pwd.h
new file mode 120000
index 0000000..f66986a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/regex.h b/6/platforms/android-9/arch-arm/usr/include/regex.h
new file mode 120000
index 0000000..38d7c56
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/regex.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/regex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/resolv.h b/6/platforms/android-9/arch-arm/usr/include/resolv.h
new file mode 120000
index 0000000..a071a41
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sched.h b/6/platforms/android-9/arch-arm/usr/include/sched.h
new file mode 100644
index 0000000..e702470
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sched.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#ifdef _GNU_SOURCE
+extern int clone(int (*fn)(void *), void *child_stack, int flags, void* arg, ...);
+#endif
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/semaphore.h b/6/platforms/android-9/arch-arm/usr/include/semaphore.h
new file mode 120000
index 0000000..e1577fb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/setjmp.h b/6/platforms/android-9/arch-arm/usr/include/setjmp.h
new file mode 120000
index 0000000..7d07fd8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sgtty.h b/6/platforms/android-9/arch-arm/usr/include/sgtty.h
new file mode 120000
index 0000000..c3610e7
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sha1.h b/6/platforms/android-9/arch-arm/usr/include/sha1.h
new file mode 120000
index 0000000..22aa784
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/signal.h b/6/platforms/android-9/arch-arm/usr/include/signal.h
new file mode 120000
index 0000000..0be0753
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/stdint.h b/6/platforms/android-9/arch-arm/usr/include/stdint.h
new file mode 120000
index 0000000..41ad791
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/stdio.h b/6/platforms/android-9/arch-arm/usr/include/stdio.h
new file mode 120000
index 0000000..c997bc3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/stdlib.h b/6/platforms/android-9/arch-arm/usr/include/stdlib.h
new file mode 100644
index 0000000..97d8e46
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+extern int clearenv(void);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern int ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd __attribute((unused)))
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/string.h b/6/platforms/android-9/arch-arm/usr/include/string.h
new file mode 120000
index 0000000..e89743b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/strings.h b/6/platforms/android-9/arch-arm/usr/include/strings.h
new file mode 100644
index 0000000..fee7dc4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/strings.h
@@ -0,0 +1,56 @@
+/* $NetBSD: strings.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int bcmp(const void *, const void *, size_t);
+void bcopy(const void *, void *, size_t);
+void bzero(void *, size_t);
+int ffs(int);
+char *index(const char *, int);
+char *rindex(const char *, int);
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+__END_DECLS
+
+#endif /* !defined(_STRINGS_H_) */
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/_errdefs.h b/6/platforms/android-9/arch-arm/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..c3b15ca
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/_sigdefs.h b/6/platforms/android-9/arch-arm/usr/include/sys/_sigdefs.h
new file mode 100644
index 0000000..6822c25
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/_sigdefs.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * this header is used to define signal constants and names;
+ * it might be included several times
+ */
+
+#ifndef __BIONIC_SIGDEF
+#error __BIONIC_SIGDEF not defined
+#endif
+
+__BIONIC_SIGDEF(HUP,1,"Hangup")
+__BIONIC_SIGDEF(INT,2,"Interrupt")
+__BIONIC_SIGDEF(QUIT,3,"Quit")
+__BIONIC_SIGDEF(ILL,4,"Illegal instruction")
+__BIONIC_SIGDEF(TRAP,5,"Trap")
+__BIONIC_SIGDEF(ABRT,6,"Aborted")
+__BIONIC_SIGDEF(BUS,7,"Bus error")
+__BIONIC_SIGDEF(FPE,8,"Floating point exception")
+__BIONIC_SIGDEF(KILL,9,"Killed")
+__BIONIC_SIGDEF(USR1,10,"User signal 1")
+__BIONIC_SIGDEF(SEGV,11,"Segmentation fault")
+__BIONIC_SIGDEF(USR2,12,"User signal 2")
+__BIONIC_SIGDEF(PIPE,13,"Broken pipe")
+__BIONIC_SIGDEF(ALRM,14,"Alarm clock")
+__BIONIC_SIGDEF(TERM,15,"Terminated")
+__BIONIC_SIGDEF(STKFLT,16,"Stack fault")
+__BIONIC_SIGDEF(CHLD,17,"Child exited")
+__BIONIC_SIGDEF(CONT,18,"Continue")
+__BIONIC_SIGDEF(STOP,19,"Stopped (signal)")
+__BIONIC_SIGDEF(TSTP,20,"Stopped")
+__BIONIC_SIGDEF(TTIN,21,"Stopped (tty input)")
+__BIONIC_SIGDEF(TTOU,22,"Stopper (tty output)")
+__BIONIC_SIGDEF(URG,23,"Urgent I/O condition")
+__BIONIC_SIGDEF(XCPU,24,"CPU time limit exceeded")
+__BIONIC_SIGDEF(XFSZ,25,"File size limit exceeded")
+__BIONIC_SIGDEF(VTALRM,26,"Virtual timer expired")
+__BIONIC_SIGDEF(PROF,27,"Profiling timer expired")
+__BIONIC_SIGDEF(WINCH,28,"Window size changed")
+__BIONIC_SIGDEF(IO,29,"I/O possible")
+__BIONIC_SIGDEF(PWR,30,"Power failure")
+__BIONIC_SIGDEF(SYS,31,"Bad system call")
+
+#undef __BIONIC_SIGDEF
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/_system_properties.h b/6/platforms/android-9/arch-arm/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..8f87ebc
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/_types.h b/6/platforms/android-9/arch-arm/usr/include/sys/_types.h
new file mode 120000
index 0000000..6040bd2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/atomics.h b/6/platforms/android-9/arch-arm/usr/include/sys/atomics.h
new file mode 120000
index 0000000..9cbba15
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/atomics.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/atomics.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/cdefs.h b/6/platforms/android-9/arch-arm/usr/include/sys/cdefs.h
new file mode 100644
index 0000000..849e2b8
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/cdefs.h
@@ -0,0 +1,501 @@
+/* $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Berkeley Software Design, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
+ */
+
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
+/*
+ * Macro to test if we're using a GNU C compiler of a specific vintage
+ * or later, for e.g. features that appeared in a particular version
+ * of GNU C. Usage:
+ *
+ * #if __GNUC_PREREQ__(major, minor)
+ * ...cool feature...
+ * #else
+ * ...delete feature...
+ * #endif
+ */
+#ifdef __GNUC__
+#define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
+#else
+#define __GNUC_PREREQ__(x, y) 0
+#endif
+
+#include <sys/cdefs_elf.h>
+
+#if defined(__cplusplus)
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS }
+#define __static_cast(x,y) static_cast<x>(y)
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#define __static_cast(x,y) (x)y
+#endif
+
+/*
+ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
+ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
+ * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
+ * in between its arguments. __CONCAT can also concatenate double-quoted
+ * strings produced by the __STRING macro, but this only works with ANSI C.
+ */
+
+#define ___STRING(x) __STRING(x)
+#define ___CONCAT(x,y) __CONCAT(x,y)
+
+#if __STDC__ || defined(__cplusplus)
+#define __P(protos) protos /* full-blown ANSI C */
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#define __const const /* define reserved names to standard */
+#define __signed signed
+#define __volatile volatile
+#if defined(__cplusplus)
+#define __inline inline /* convert to C++ keyword */
+#else
+#if !defined(__GNUC__) && !defined(__lint__)
+#define __inline /* delete GCC keyword */
+#endif /* !__GNUC__ && !__lint__ */
+#endif /* !__cplusplus */
+
+#else /* !(__STDC__ || __cplusplus) */
+#define __P(protos) () /* traditional C preprocessor */
+#define __CONCAT(x,y) x/**/y
+#define __STRING(x) "x"
+
+#ifndef __GNUC__
+#define __const /* delete pseudo-ANSI C keywords */
+#define __inline
+#define __signed
+#define __volatile
+#endif /* !__GNUC__ */
+
+/*
+ * In non-ANSI C environments, new programs will want ANSI-only C keywords
+ * deleted from the program and old programs will want them left alone.
+ * Programs using the ANSI C keywords const, inline etc. as normal
+ * identifiers should define -DNO_ANSI_KEYWORDS.
+ */
+#ifndef NO_ANSI_KEYWORDS
+#define const __const /* convert ANSI C keywords */
+#define inline __inline
+#define signed __signed
+#define volatile __volatile
+#endif /* !NO_ANSI_KEYWORDS */
+#endif /* !(__STDC__ || __cplusplus) */
+
+/*
+ * Used for internal auditing of the NetBSD source tree.
+ */
+#ifdef __AUDIT__
+#define __aconst __const
+#else
+#define __aconst
+#endif
+
+/*
+ * The following macro is used to remove const cast-away warnings
+ * from gcc -Wcast-qual; it should be used with caution because it
+ * can hide valid errors; in particular most valid uses are in
+ * situations where the API requires it, not to cast away string
+ * constants. We don't use *intptr_t on purpose here and we are
+ * explicit about unsigned long so that we don't have additional
+ * dependencies.
+ */
+#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+
+/*
+ * GCC2 provides __extension__ to suppress warnings for various GNU C
+ * language extensions under "-ansi -pedantic".
+ */
+#if !__GNUC_PREREQ__(2, 0)
+#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
+#endif
+
+/*
+ * GCC1 and some versions of GCC2 declare dead (non-returning) and
+ * pure (no side effects) functions using "volatile" and "const";
+ * unfortunately, these then cause warnings under "-ansi -pedantic".
+ * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
+ * these work for GNU C++ (modulo a slight glitch in the C++ grammar
+ * in the distribution version of 2.5.5).
+ */
+#if !__GNUC_PREREQ__(2, 5)
+#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __dead __volatile
+#define __pure __const
+#endif
+#endif
+
+/* Delete pseudo-keywords wherever they are not available or needed. */
+#ifndef __dead
+#define __dead
+#define __pure
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __unused __attribute__((__unused__))
+#else
+#define __unused /* delete */
+#endif
+
+#if __GNUC_PREREQ__(3, 1)
+#define __used __attribute__((__used__))
+#else
+#define __used /* delete */
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __packed __attribute__((__packed__))
+#define __aligned(x) __attribute__((__aligned__(x)))
+#define __section(x) __attribute__((__section__(x)))
+#elif defined(__lint__)
+#define __packed /* delete */
+#define __aligned(x) /* delete */
+#define __section(x) /* delete */
+#else
+#define __packed error: no __packed for this compiler
+#define __aligned(x) error: no __aligned for this compiler
+#define __section(x) error: no __section for this compiler
+#endif
+
+#if !__GNUC_PREREQ__(2, 8)
+#define __extension__
+#endif
+
+#if __GNUC_PREREQ__(2, 8)
+#define __statement(x) __extension__(x)
+#elif defined(lint)
+#define __statement(x) (0)
+#else
+#define __statement(x) (x)
+#endif
+
+/*
+ * C99 defines the restrict type qualifier keyword, which was made available
+ * in GCC 2.92.
+ */
+#if __STDC_VERSION__ >= 199901L
+#define __restrict restrict
+#else
+#if !__GNUC_PREREQ__(2, 92)
+#define __restrict /* delete __restrict when not supported */
+#endif
+#endif
+
+/*
+ * C99 defines __func__ predefined identifier, which was made available
+ * in GCC 2.95.
+ */
+#if !(__STDC_VERSION__ >= 199901L)
+#if __GNUC_PREREQ__(2, 6)
+#define __func__ __PRETTY_FUNCTION__
+#elif __GNUC_PREREQ__(2, 4)
+#define __func__ __FUNCTION__
+#else
+#define __func__ ""
+#endif
+#endif /* !(__STDC_VERSION__ >= 199901L) */
+
+#if defined(_KERNEL)
+#if defined(NO_KERNEL_RCSIDS)
+#undef __KERNEL_RCSID
+#define __KERNEL_RCSID(_n, _s) /* nothing */
+#endif /* NO_KERNEL_RCSIDS */
+#endif /* _KERNEL */
+
+#if !defined(_STANDALONE) && !defined(_KERNEL)
+#ifdef __GNUC__
+#define __RENAME(x) ___RENAME(x)
+#else
+#ifdef __lint__
+#define __RENAME(x) __symbolrename(x)
+#else
+#error "No function renaming possible"
+#endif /* __lint__ */
+#endif /* __GNUC__ */
+#else /* _STANDALONE || _KERNEL */
+#define __RENAME(x) no renaming in kernel or standalone environment
+#endif
+
+/*
+ * A barrier to stop the optimizer from moving code or assume live
+ * register values. This is gcc specific, the version is more or less
+ * arbitrary, might work with older compilers.
+ */
+#if __GNUC_PREREQ__(2, 95)
+#define __insn_barrier() __asm __volatile("":::"memory")
+#else
+#define __insn_barrier() /* */
+#endif
+
+/*
+ * GNU C version 2.96 adds explicit branch prediction so that
+ * the CPU back-end can hint the processor and also so that
+ * code blocks can be reordered such that the predicted path
+ * sees a more linear flow, thus improving cache behavior, etc.
+ *
+ * The following two macros provide us with a way to use this
+ * compiler feature. Use __predict_true() if you expect the expression
+ * to evaluate to true, and __predict_false() if you expect the
+ * expression to evaluate to false.
+ *
+ * A few notes about usage:
+ *
+ * * Generally, __predict_false() error condition checks (unless
+ * you have some _strong_ reason to do otherwise, in which case
+ * document it), and/or __predict_true() `no-error' condition
+ * checks, assuming you want to optimize for the no-error case.
+ *
+ * * Other than that, if you don't know the likelihood of a test
+ * succeeding from empirical or other `hard' evidence, don't
+ * make predictions.
+ *
+ * * These are meant to be used in places that are run `a lot'.
+ * It is wasteful to make predictions in code that is run
+ * seldomly (e.g. at subsystem initialization time) as the
+ * basic block reordering that this affects can often generate
+ * larger code.
+ */
+#if __GNUC_PREREQ__(2, 96)
+#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
+#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#else
+#define __predict_true(exp) (exp)
+#define __predict_false(exp) (exp)
+#endif
+
+#if __GNUC_PREREQ__(2, 96)
+#define __noreturn __attribute__((__noreturn__))
+#define __mallocfunc __attribute__((malloc))
+#else
+#define __noreturn
+#define __mallocfunc
+#endif
+
+/*
+ * Macros for manipulating "link sets". Link sets are arrays of pointers
+ * to objects, which are gathered up by the linker.
+ *
+ * Object format-specific code has provided us with the following macros:
+ *
+ * __link_set_add_text(set, sym)
+ * Add a reference to the .text symbol `sym' to `set'.
+ *
+ * __link_set_add_rodata(set, sym)
+ * Add a reference to the .rodata symbol `sym' to `set'.
+ *
+ * __link_set_add_data(set, sym)
+ * Add a reference to the .data symbol `sym' to `set'.
+ *
+ * __link_set_add_bss(set, sym)
+ * Add a reference to the .bss symbol `sym' to `set'.
+ *
+ * __link_set_decl(set, ptype)
+ * Provide an extern declaration of the set `set', which
+ * contains an array of the pointer type `ptype'. This
+ * macro must be used by any code which wishes to reference
+ * the elements of a link set.
+ *
+ * __link_set_start(set)
+ * This points to the first slot in the link set.
+ *
+ * __link_set_end(set)
+ * This points to the (non-existent) slot after the last
+ * entry in the link set.
+ *
+ * __link_set_count(set)
+ * Count the number of entries in link set `set'.
+ *
+ * In addition, we provide the following macros for accessing link sets:
+ *
+ * __link_set_foreach(pvar, set)
+ * Iterate over the link set `set'. Because a link set is
+ * an array of pointers, pvar must be declared as "type **pvar",
+ * and the actual entry accessed as "*pvar".
+ *
+ * __link_set_entry(set, idx)
+ * Access the link set entry at index `idx' from set `set'.
+ */
+#define __link_set_foreach(pvar, set) \
+ for (pvar = __link_set_start(set); pvar < __link_set_end(set); pvar++)
+
+#define __link_set_entry(set, idx) (__link_set_begin(set)[idx])
+
+/*
+ * Some of the recend FreeBSD sources used in Bionic need this.
+ * Originally, this is used to embed the rcs versions of each source file
+ * in the generated binary. We certainly don't want this in Bionic.
+ */
+#define __FBSDID(s) struct __hack
+
+/*-
+ * The following definitions are an extension of the behavior originally
+ * implemented in <sys/_posix.h>, but with a different level of granularity.
+ * POSIX.1 requires that the macros we test be defined before any standard
+ * header file is included.
+ *
+ * Here's a quick run-down of the versions:
+ * defined(_POSIX_SOURCE) 1003.1-1988
+ * _POSIX_C_SOURCE == 1 1003.1-1990
+ * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
+ * _POSIX_C_SOURCE == 199309 1003.1b-1993
+ * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ * _POSIX_C_SOURCE == 200112 1003.1-2001
+ * _POSIX_C_SOURCE == 200809 1003.1-2008
+ *
+ * In addition, the X/Open Portability Guide, which is now the Single UNIX
+ * Specification, defines a feature-test macro which indicates the version of
+ * that specification, and which subsumes _POSIX_C_SOURCE.
+ *
+ * Our macros begin with two underscores to avoid namespace screwage.
+ */
+
+/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
+#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
+#define _POSIX_C_SOURCE 199009
+#endif
+
+/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199209
+#endif
+
+/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
+#ifdef _XOPEN_SOURCE
+#if _XOPEN_SOURCE - 0 >= 700
+#define __XSI_VISIBLE 700
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809
+#elif _XOPEN_SOURCE - 0 >= 600
+#define __XSI_VISIBLE 600
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112
+#elif _XOPEN_SOURCE - 0 >= 500
+#define __XSI_VISIBLE 500
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199506
+#endif
+#endif
+
+/*
+ * Deal with all versions of POSIX. The ordering relative to the tests above is
+ * important.
+ */
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 198808
+#endif
+#ifdef _POSIX_C_SOURCE
+#if _POSIX_C_SOURCE >= 200809
+#define __POSIX_VISIBLE 200809
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 200112
+#define __POSIX_VISIBLE 200112
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 199506
+#define __POSIX_VISIBLE 199506
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199309
+#define __POSIX_VISIBLE 199309
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199209
+#define __POSIX_VISIBLE 199209
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199009
+#define __POSIX_VISIBLE 199009
+#define __ISO_C_VISIBLE 1990
+#else
+#define __POSIX_VISIBLE 198808
+#define __ISO_C_VISIBLE 0
+#endif /* _POSIX_C_SOURCE */
+#else
+/*-
+ * Deal with _ANSI_SOURCE:
+ * If it is defined, and no other compilation environment is explicitly
+ * requested, then define our internal feature-test macros to zero. This
+ * makes no difference to the preprocessor (undefined symbols in preprocessing
+ * expressions are defined to have value zero), but makes it more convenient for
+ * a test program to print out the values.
+ *
+ * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
+ * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
+ * environment (and in fact we will never get here).
+ */
+#if defined(_ANSI_SOURCE) /* Hide almost everything. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1990
+#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1999
+#else /* Default environment: show everything. */
+#define __POSIX_VISIBLE 200809
+#define __XSI_VISIBLE 700
+#define __BSD_VISIBLE 1
+#define __ISO_C_VISIBLE 1999
+#endif
+#endif
+
+/*
+ * Default values.
+ */
+#ifndef __XPG_VISIBLE
+# define __XPG_VISIBLE 700
+#endif
+#ifndef __POSIX_VISIBLE
+# define __POSIX_VISIBLE 200809
+#endif
+#ifndef __ISO_C_VISIBLE
+# define __ISO_C_VISIBLE 1999
+#endif
+#ifndef __BSD_VISIBLE
+# define __BSD_VISIBLE 1
+#endif
+
+#define __BIONIC__ 1
+
+#endif /* !_SYS_CDEFS_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h b/6/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..dd40f94
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/dirent.h b/6/platforms/android-9/arch-arm/usr/include/sys/dirent.h
new file mode 120000
index 0000000..0c52a9f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/endian.h b/6/platforms/android-9/arch-arm/usr/include/sys/endian.h
new file mode 120000
index 0000000..43fdfe0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/epoll.h b/6/platforms/android-9/arch-arm/usr/include/sys/epoll.h
new file mode 120000
index 0000000..e3bc8d9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/errno.h b/6/platforms/android-9/arch-arm/usr/include/sys/errno.h
new file mode 120000
index 0000000..93f0050
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/exec_elf.h b/6/platforms/android-9/arch-arm/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..c091db2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/file.h b/6/platforms/android-9/arch-arm/usr/include/sys/file.h
new file mode 120000
index 0000000..a34594b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/fsuid.h b/6/platforms/android-9/arch-arm/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..c38ad94
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/inotify.h b/6/platforms/android-9/arch-arm/usr/include/sys/inotify.h
new file mode 120000
index 0000000..8facb3e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ioctl.h b/6/platforms/android-9/arch-arm/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..2b3269e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ioctl_compat.h b/6/platforms/android-9/arch-arm/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..09acbfb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ipc.h b/6/platforms/android-9/arch-arm/usr/include/sys/ipc.h
new file mode 120000
index 0000000..eaef82e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/klog.h b/6/platforms/android-9/arch-arm/usr/include/sys/klog.h
new file mode 120000
index 0000000..888ac0d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/limits.h b/6/platforms/android-9/arch-arm/usr/include/sys/limits.h
new file mode 120000
index 0000000..bb369b9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/linux-syscalls.h b/6/platforms/android-9/arch-arm/usr/include/sys/linux-syscalls.h
new file mode 100644
index 0000000..9702a7a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/linux-syscalls.h
@@ -0,0 +1,292 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_SYSCALLS_H_
+
+#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H
+#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__
+ # define __NR_SYSCALL_BASE 0x900000
+ #else
+ # define __NR_SYSCALL_BASE 0
+ #endif
+
+#define __NR_exit (__NR_SYSCALL_BASE + 1)
+#define __NR_fork (__NR_SYSCALL_BASE + 2)
+#define __NR_clone (__NR_SYSCALL_BASE + 120)
+#define __NR_execve (__NR_SYSCALL_BASE + 11)
+#define __NR_setuid32 (__NR_SYSCALL_BASE + 213)
+#define __NR_getuid32 (__NR_SYSCALL_BASE + 199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE + 200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE + 202)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211)
+#define __NR_gettid (__NR_SYSCALL_BASE + 224)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205)
+#define __NR_getpgid (__NR_SYSCALL_BASE + 132)
+#define __NR_getppid (__NR_SYSCALL_BASE + 64)
+#define __NR_setsid (__NR_SYSCALL_BASE + 66)
+#define __NR_setgid32 (__NR_SYSCALL_BASE + 214)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210)
+#define __NR_brk (__NR_SYSCALL_BASE + 45)
+#define __NR_ptrace (__NR_SYSCALL_BASE + 26)
+#define __NR_getpriority (__NR_SYSCALL_BASE + 96)
+#define __NR_setpriority (__NR_SYSCALL_BASE + 97)
+#define __NR_setrlimit (__NR_SYSCALL_BASE + 75)
+#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191)
+#define __NR_getrusage (__NR_SYSCALL_BASE + 77)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206)
+#define __NR_setpgid (__NR_SYSCALL_BASE + 57)
+#define __NR_setregid32 (__NR_SYSCALL_BASE + 204)
+#define __NR_chroot (__NR_SYSCALL_BASE + 61)
+#define __NR_prctl (__NR_SYSCALL_BASE + 172)
+#define __NR_capget (__NR_SYSCALL_BASE + 184)
+#define __NR_capset (__NR_SYSCALL_BASE + 185)
+#define __NR_sigaltstack (__NR_SYSCALL_BASE + 186)
+#define __NR_acct (__NR_SYSCALL_BASE + 51)
+#define __NR_read (__NR_SYSCALL_BASE + 3)
+#define __NR_write (__NR_SYSCALL_BASE + 4)
+#define __NR_pread64 (__NR_SYSCALL_BASE + 180)
+#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181)
+#define __NR_open (__NR_SYSCALL_BASE + 5)
+#define __NR_close (__NR_SYSCALL_BASE + 6)
+#define __NR_lseek (__NR_SYSCALL_BASE + 19)
+#define __NR__llseek (__NR_SYSCALL_BASE + 140)
+#define __NR_getpid (__NR_SYSCALL_BASE + 20)
+#define __NR_mmap2 (__NR_SYSCALL_BASE + 192)
+#define __NR_munmap (__NR_SYSCALL_BASE + 91)
+#define __NR_mremap (__NR_SYSCALL_BASE + 163)
+#define __NR_msync (__NR_SYSCALL_BASE + 144)
+#define __NR_mprotect (__NR_SYSCALL_BASE + 125)
+#define __NR_mlock (__NR_SYSCALL_BASE + 150)
+#define __NR_munlock (__NR_SYSCALL_BASE + 151)
+#define __NR_ioctl (__NR_SYSCALL_BASE + 54)
+#define __NR_readv (__NR_SYSCALL_BASE + 145)
+#define __NR_writev (__NR_SYSCALL_BASE + 146)
+#define __NR_fcntl (__NR_SYSCALL_BASE + 55)
+#define __NR_flock (__NR_SYSCALL_BASE + 143)
+#define __NR_fchmod (__NR_SYSCALL_BASE + 94)
+#define __NR_dup (__NR_SYSCALL_BASE + 41)
+#define __NR_pipe (__NR_SYSCALL_BASE + 42)
+#define __NR_dup2 (__NR_SYSCALL_BASE + 63)
+#define __NR__newselect (__NR_SYSCALL_BASE + 142)
+#define __NR_ftruncate (__NR_SYSCALL_BASE + 93)
+#define __NR_fsync (__NR_SYSCALL_BASE + 118)
+#define __NR_fdatasync (__NR_SYSCALL_BASE + 148)
+#define __NR_fchown32 (__NR_SYSCALL_BASE + 207)
+#define __NR_sync (__NR_SYSCALL_BASE + 36)
+#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)
+#define __NR_sendfile (__NR_SYSCALL_BASE + 187)
+#define __NR_link (__NR_SYSCALL_BASE + 9)
+#define __NR_unlink (__NR_SYSCALL_BASE + 10)
+#define __NR_chdir (__NR_SYSCALL_BASE + 12)
+#define __NR_mknod (__NR_SYSCALL_BASE + 14)
+#define __NR_chmod (__NR_SYSCALL_BASE + 15)
+#define __NR_chown32 (__NR_SYSCALL_BASE + 212)
+#define __NR_lchown32 (__NR_SYSCALL_BASE + 198)
+#define __NR_mount (__NR_SYSCALL_BASE + 21)
+#define __NR_umount2 (__NR_SYSCALL_BASE + 52)
+#define __NR_fstat64 (__NR_SYSCALL_BASE + 197)
+#define __NR_stat64 (__NR_SYSCALL_BASE + 195)
+#define __NR_lstat64 (__NR_SYSCALL_BASE + 196)
+#define __NR_mkdir (__NR_SYSCALL_BASE + 39)
+#define __NR_readlink (__NR_SYSCALL_BASE + 85)
+#define __NR_rmdir (__NR_SYSCALL_BASE + 40)
+#define __NR_rename (__NR_SYSCALL_BASE + 38)
+#define __NR_getcwd (__NR_SYSCALL_BASE + 183)
+#define __NR_access (__NR_SYSCALL_BASE + 33)
+#define __NR_symlink (__NR_SYSCALL_BASE + 83)
+#define __NR_fchdir (__NR_SYSCALL_BASE + 133)
+#define __NR_truncate (__NR_SYSCALL_BASE + 92)
+#define __NR_pause (__NR_SYSCALL_BASE + 29)
+#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78)
+#define __NR_settimeofday (__NR_SYSCALL_BASE + 79)
+#define __NR_times (__NR_SYSCALL_BASE + 43)
+#define __NR_nanosleep (__NR_SYSCALL_BASE + 162)
+#define __NR_getitimer (__NR_SYSCALL_BASE + 105)
+#define __NR_setitimer (__NR_SYSCALL_BASE + 104)
+#define __NR_sigaction (__NR_SYSCALL_BASE + 67)
+#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126)
+#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72)
+#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174)
+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175)
+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177)
+#define __NR_sigpending (__NR_SYSCALL_BASE + 73)
+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156)
+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157)
+#define __NR_sched_yield (__NR_SYSCALL_BASE + 158)
+#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154)
+#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155)
+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159)
+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160)
+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161)
+#define __NR_uname (__NR_SYSCALL_BASE + 122)
+#define __NR_wait4 (__NR_SYSCALL_BASE + 114)
+#define __NR_umask (__NR_SYSCALL_BASE + 60)
+#define __NR_reboot (__NR_SYSCALL_BASE + 88)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_init_module (__NR_SYSCALL_BASE + 128)
+#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_sysinfo (__NR_SYSCALL_BASE + 116)
+#define __NR_futex (__NR_SYSCALL_BASE + 240)
+#define __NR_poll (__NR_SYSCALL_BASE + 168)
+
+#ifdef __arm__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
+#define __NR_waitid (__NR_SYSCALL_BASE + 280)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 322)
+#define __NR_madvise (__NR_SYSCALL_BASE + 220)
+#define __NR_mincore (__NR_SYSCALL_BASE + 219)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 359)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 323)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 325)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 333)
+#define __NR_renameat (__NR_SYSCALL_BASE + 329)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 328)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 262)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 261)
+#define __NR_utimes (__NR_SYSCALL_BASE + 269)
+#define __NR_socket (__NR_SYSCALL_BASE + 281)
+#define __NR_socketpair (__NR_SYSCALL_BASE + 288)
+#define __NR_bind (__NR_SYSCALL_BASE + 282)
+#define __NR_connect (__NR_SYSCALL_BASE + 283)
+#define __NR_listen (__NR_SYSCALL_BASE + 284)
+#define __NR_accept (__NR_SYSCALL_BASE + 285)
+#define __NR_getsockname (__NR_SYSCALL_BASE + 286)
+#define __NR_getpeername (__NR_SYSCALL_BASE + 287)
+#define __NR_sendto (__NR_SYSCALL_BASE + 290)
+#define __NR_recvfrom (__NR_SYSCALL_BASE + 292)
+#define __NR_shutdown (__NR_SYSCALL_BASE + 293)
+#define __NR_setsockopt (__NR_SYSCALL_BASE + 294)
+#define __NR_getsockopt (__NR_SYSCALL_BASE + 295)
+#define __NR_sendmsg (__NR_SYSCALL_BASE + 296)
+#define __NR_recvmsg (__NR_SYSCALL_BASE + 297)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 250)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 316)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 356)
+#define __NR_ARM_set_tls (__NR_SYSCALL_BASE + 983045)
+#define __NR_ARM_cacheflush (__NR_SYSCALL_BASE + 983042)
+#endif
+
+#ifdef __i386__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 289)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 290)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
+#endif
+
+#if defined(__SH3__) || defined(__SH4__)
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR___socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 288)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 289)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 290)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
+#endif
+
+#endif
+
+#endif /* _BIONIC_LINUX_SYSCALLS_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/linux-unistd.h b/6/platforms/android-9/arch-arm/usr/include/sys/linux-unistd.h
new file mode 100644
index 0000000..23853da
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/linux-unistd.h
@@ -0,0 +1,212 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_UNISTD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void _exit (int);
+void _exit_thread (int);
+pid_t __fork (void);
+pid_t _waitpid (pid_t, int*, int, struct rusage*);
+int __waitid (int, pid_t, struct siginfo_t*, int,void*);
+pid_t __sys_clone (int, void*, int*, void*, int*);
+int execve (const char*, char* const*, char* const*);
+int __setuid (uid_t);
+uid_t getuid (void);
+gid_t getgid (void);
+uid_t geteuid (void);
+gid_t getegid (void);
+uid_t getresuid (void);
+gid_t getresgid (void);
+pid_t gettid (void);
+int getgroups (int, gid_t *);
+pid_t getpgid (pid_t);
+pid_t getppid (void);
+pid_t setsid (void);
+int setgid (gid_t);
+int seteuid (uid_t);
+int __setreuid (uid_t, uid_t);
+int __setresuid (uid_t, uid_t, uid_t);
+int setresgid (gid_t, gid_t, gid_t);
+void* __brk (void*);
+int kill (pid_t, int);
+int tkill (pid_t tid, int sig);
+int __ptrace (int request, int pid, void* addr, void* data);
+int __set_thread_area (void* user_desc);
+int __getpriority (int, int);
+int setpriority (int, int, int);
+int setrlimit (int resource, const struct rlimit *rlp);
+int getrlimit (int resource, struct rlimit *rlp);
+int getrusage (int who, struct rusage* r_usage);
+int setgroups (int, const gid_t *);
+pid_t getpgrp (void);
+int setpgid (pid_t, pid_t);
+pid_t vfork (void);
+int setregid (gid_t, gid_t);
+int chroot (const char *);
+int prctl (int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5);
+int capget (cap_user_header_t header, cap_user_data_t data);
+int capset (cap_user_header_t header, const cap_user_data_t data);
+int sigaltstack (const stack_t*, stack_t*);
+int acct (const char* filepath);
+ssize_t read (int, void*, size_t);
+ssize_t write (int, const void*, size_t);
+ssize_t __pread64 (int, void *, size_t, off_t, off_t);
+ssize_t __pwrite64 (int, void *, size_t, off_t, off_t);
+int __open (const char*, int, mode_t);
+int __openat (int, const char*, int, mode_t);
+int close (int);
+int creat (const char*, mode_t);
+off_t lseek (int, off_t, int);
+int __llseek (int, unsigned long, unsigned long, loff_t*, int);
+pid_t getpid (void);
+void * mmap (void *, size_t, int, int, int, long);
+void * __mmap2 (void*, size_t, int, int, int, long);
+int munmap (void *, size_t);
+void * mremap (void *, size_t, size_t, unsigned long);
+int msync (const void *, size_t, int);
+int mprotect (const void *, size_t, int);
+int madvise (const void *, size_t, int);
+int mlock (const void *addr, size_t len);
+int munlock (const void *addr, size_t len);
+int mincore (void* start, size_t length, unsigned char* vec);
+int __ioctl (int, int, void *);
+int readv (int, const struct iovec *, int);
+int writev (int, const struct iovec *, int);
+int __fcntl (int, int, void*);
+int flock (int, int);
+int fchmod (int, mode_t);
+int dup (int);
+int pipe (int *);
+int pipe2 (int *, int);
+int dup2 (int, int);
+int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
+int ftruncate (int, off_t);
+int getdents (unsigned int, struct dirent *, unsigned int);
+int fsync (int);
+int fdatasync (int);
+int fchown (int, uid_t, gid_t);
+void sync (void);
+int __fcntl64 (int, int, void *);
+int __fstatfs64 (int, size_t, struct statfs *);
+ssize_t sendfile (int out_fd, int in_fd, off_t *offset, size_t count);
+int fstatat (int dirfd, const char *path, struct stat *buf, int flags);
+int mkdirat (int dirfd, const char *pathname, mode_t mode);
+int fchownat (int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+int fchmodat (int dirfd, const char *path, mode_t mode, int flags);
+int renameat (int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+int link (const char*, const char*);
+int unlink (const char*);
+int unlinkat (int, const char *, int);
+int chdir (const char*);
+int mknod (const char*, mode_t, dev_t);
+int chmod (const char*,mode_t);
+int chown (const char *, uid_t, gid_t);
+int lchown (const char*, uid_t, gid_t);
+int mount (const char*, const char*, const char*, unsigned long, const void*);
+int umount (const char*);
+int umount2 (const char*, int);
+int fstat (int, struct stat*);
+int stat (const char *, struct stat *);
+int lstat (const char *, struct stat *);
+int mkdir (const char *, mode_t);
+int readlink (const char *, char *, size_t);
+int rmdir (const char *);
+int rename (const char *, const char *);
+int __getcwd (char * buf, size_t size);
+int access (const char *, int);
+int symlink (const char *, const char *);
+int fchdir (int);
+int truncate (const char*, off_t);
+int __statfs64 (const char *, size_t, struct statfs *);
+int pause (void);
+int gettimeofday (struct timeval*, struct timezone*);
+int settimeofday (const struct timeval*, const struct timezone*);
+clock_t times (struct tms *);
+int nanosleep (const struct timespec *, struct timespec *);
+int clock_gettime (clockid_t clk_id, struct timespec *tp);
+int clock_settime (clockid_t clk_id, const struct timespec *tp);
+int clock_getres (clockid_t clk_id, struct timespec *res);
+int clock_nanosleep (const struct timespec *req, struct timespec *rem);
+int getitimer (int, const struct itimerval *);
+int setitimer (int, const struct itimerval *, struct itimerval *);
+int __timer_create (clockid_t clockid, struct sigevent *evp, timer_t *timerid);
+int __timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*);
+int __timer_gettime (timer_t, struct itimerspec*);
+int __timer_getoverrun (timer_t);
+int __timer_delete (timer_t);
+int utimes (const char*, const struct timeval tvp[2]);
+int sigaction (int, const struct sigaction *, struct sigaction *);
+int sigprocmask (int, const sigset_t *, sigset_t *);
+int __sigsuspend (int unused1, int unused2, unsigned mask);
+int __rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize);
+int __rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize);
+int __rt_sigtimedwait (const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size);
+int sigpending (sigset_t *);
+int socket (int, int, int);
+int socketpair (int, int, int, int*);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int socket (int, int, int);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int socketpair (int, int, int, int*);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int __socketcall (int, unsigned long*);
+int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param);
+int sched_getscheduler (pid_t pid);
+int sched_yield (void);
+int sched_setparam (pid_t pid, const struct sched_param *param);
+int sched_getparam (pid_t pid, struct sched_param *param);
+int sched_get_priority_max (int policy);
+int sched_get_priority_min (int policy);
+int sched_rr_get_interval (pid_t pid, struct timespec *interval);
+int ioprio_set (int which, int who, int ioprio);
+int ioprio_get (int which, int who);
+int uname (struct utsname *);
+pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
+mode_t umask (mode_t);
+int __reboot (int, int, int, void *);
+int __syslog (int, char *, int);
+int init_module (void *, unsigned long, const char *);
+int delete_module (const char*, unsigned int);
+int klogctl (int, char *, int);
+int sysinfo (struct sysinfo *);
+int futex (void *, int, int, void *, void *, int);
+int epoll_create (int size);
+int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait (int epfd, struct epoll_event *events, int max, int timeout);
+int inotify_init (void);
+int inotify_add_watch (int, const char *, unsigned int);
+int inotify_rm_watch (int, unsigned int);
+int poll (struct pollfd *, unsigned int, long);
+int eventfd (unsigned int, int);
+int __set_tls (void*);
+int cacheflush (long start, long end, long flags);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BIONIC_LINUX_UNISTD_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/mman.h b/6/platforms/android-9/arch-arm/usr/include/sys/mman.h
new file mode 120000
index 0000000..0637a68
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/mount.h b/6/platforms/android-9/arch-arm/usr/include/sys/mount.h
new file mode 120000
index 0000000..2cd1b00
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/param.h b/6/platforms/android-9/arch-arm/usr/include/sys/param.h
new file mode 120000
index 0000000..c089e43
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/poll.h b/6/platforms/android-9/arch-arm/usr/include/sys/poll.h
new file mode 120000
index 0000000..2ff8610
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/prctl.h b/6/platforms/android-9/arch-arm/usr/include/sys/prctl.h
new file mode 120000
index 0000000..9fd48a1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ptrace.h b/6/platforms/android-9/arch-arm/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..4d0e0fe
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/queue.h b/6/platforms/android-9/arch-arm/usr/include/sys/queue.h
new file mode 120000
index 0000000..0a25cc6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/reboot.h b/6/platforms/android-9/arch-arm/usr/include/sys/reboot.h
new file mode 120000
index 0000000..1affcf9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/resource.h b/6/platforms/android-9/arch-arm/usr/include/sys/resource.h
new file mode 120000
index 0000000..93361fe
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/select.h b/6/platforms/android-9/arch-arm/usr/include/sys/select.h
new file mode 120000
index 0000000..9890acf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/sendfile.h b/6/platforms/android-9/arch-arm/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..e278d87
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/socket.h b/6/platforms/android-9/arch-arm/usr/include/sys/socket.h
new file mode 120000
index 0000000..f83cae5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/socketcalls.h b/6/platforms/android-9/arch-arm/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..e84c0d1
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/stat.h b/6/platforms/android-9/arch-arm/usr/include/sys/stat.h
new file mode 120000
index 0000000..91b2642
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/statfs.h b/6/platforms/android-9/arch-arm/usr/include/sys/statfs.h
new file mode 120000
index 0000000..de30529
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/syscall.h b/6/platforms/android-9/arch-arm/usr/include/sys/syscall.h
new file mode 120000
index 0000000..382edca
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/sysconf.h b/6/platforms/android-9/arch-arm/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..4635d0e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/sysinfo.h b/6/platforms/android-9/arch-arm/usr/include/sys/sysinfo.h
new file mode 100644
index 0000000..c7e46e6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/sysinfo.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSINFO_H_
+#define _SYS_SYSINFO_H_
+
+#include <sys/cdefs.h>
+#include <linux/kernel.h>
+
+__BEGIN_DECLS
+
+extern int sysinfo (struct sysinfo *info);
+
+__END_DECLS
+
+#endif /* _SYS_SYSINFO_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/syslimits.h b/6/platforms/android-9/arch-arm/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..528d4a6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h b/6/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..bebebde
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/system_properties.h b/6/platforms/android-9/arch-arm/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..40de5a5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/time.h b/6/platforms/android-9/arch-arm/usr/include/sys/time.h
new file mode 120000
index 0000000..a8b9514
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/timeb.h b/6/platforms/android-9/arch-arm/usr/include/sys/timeb.h
new file mode 120000
index 0000000..14b7c89
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/times.h b/6/platforms/android-9/arch-arm/usr/include/sys/times.h
new file mode 120000
index 0000000..36ee090
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ttychars.h b/6/platforms/android-9/arch-arm/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..b808b72
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/ttydev.h b/6/platforms/android-9/arch-arm/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..06e8b6e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/types.h b/6/platforms/android-9/arch-arm/usr/include/sys/types.h
new file mode 120000
index 0000000..3c8eef9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/uio.h b/6/platforms/android-9/arch-arm/usr/include/sys/uio.h
new file mode 120000
index 0000000..8637859
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/un.h b/6/platforms/android-9/arch-arm/usr/include/sys/un.h
new file mode 120000
index 0000000..051e1ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/utime.h b/6/platforms/android-9/arch-arm/usr/include/sys/utime.h
new file mode 120000
index 0000000..597fd52
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/utsname.h b/6/platforms/android-9/arch-arm/usr/include/sys/utsname.h
new file mode 120000
index 0000000..865b5ac
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/vfs.h b/6/platforms/android-9/arch-arm/usr/include/sys/vfs.h
new file mode 120000
index 0000000..2f373f6
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/vt.h b/6/platforms/android-9/arch-arm/usr/include/sys/vt.h
new file mode 120000
index 0000000..76998bf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-arm/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/sys/wait.h b/6/platforms/android-9/arch-arm/usr/include/sys/wait.h
new file mode 100644
index 0000000..b30b7ec
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/sys/wait.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/resource.h>
+#include <linux/wait.h>
+#include <signal.h>
+
+__BEGIN_DECLS
+
+#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
+#define WCOREDUMP(s) ((s) & 0x80)
+#define WTERMSIG(s) ((s) & 0x7f)
+#define WSTOPSIG(s) WEXITSTATUS(s)
+
+#define WIFEXITED(s) (WTERMSIG(s) == 0)
+#define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f)
+#define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2)
+
+extern pid_t wait(int *);
+extern pid_t waitpid(pid_t, int *, int);
+extern pid_t wait3(int *, int, struct rusage *);
+extern pid_t wait4(pid_t, int *, int, struct rusage *);
+
+/* Posix states that idtype_t should be an enumeration type, but
+ * the kernel headers define P_ALL, P_PID and P_PGID as constant macros
+ * instead.
+ */
+typedef int idtype_t;
+
+extern int waitid(idtype_t which, id_t id, siginfo_t *info, int options);
+
+__END_DECLS
+
+#endif /* _SYS_WAIT_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/syslog.h b/6/platforms/android-9/arch-arm/usr/include/syslog.h
new file mode 120000
index 0000000..2249a7f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/termio.h b/6/platforms/android-9/arch-arm/usr/include/termio.h
new file mode 120000
index 0000000..19b516e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/termios.h b/6/platforms/android-9/arch-arm/usr/include/termios.h
new file mode 120000
index 0000000..edb2e52
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/thread_db.h b/6/platforms/android-9/arch-arm/usr/include/thread_db.h
new file mode 100644
index 0000000..1b36cb2
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/thread_db.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ */
+
+#ifndef _LIBTHREAD_DB__THREAD_DB_H
+#define _LIBTHREAD_DB__THREAD_DB_H
+
+#include <pthread.h>
+#include <signal.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+typedef void *psaddr_t;
+typedef pid_t lwpid_t;
+
+#define TD_THR_ANY_USER_FLAGS 0xffffffff
+#define TD_THR_LOWEST_PRIORITY -20
+#define TD_SIGNO_MASK NULL
+
+/* td_err_e values */
+enum {
+ TD_OK,
+ TD_ERR,
+ TD_NOTHR,
+ TD_NOSV,
+ TD_NOLWP,
+ TD_BADPH,
+ TD_BADTH,
+ TD_BADSH,
+ TD_BADTA,
+ TD_BADKEY,
+ TD_NOMSG,
+ TD_NOFPREGS,
+ TD_NOLIBTHREAD,
+ TD_NOEVENT,
+ TD_NOCAPAB,
+ TD_DBERR,
+ TD_NOAPLIC,
+ TD_NOTSD,
+ TD_MALLOC,
+ TD_PARTIALREG,
+ TD_NOXREGS,
+ TD_VERSION
+};
+
+/*
+ * td_event_e values
+ * NOTE: There is a max of 32 events
+ */
+enum {
+ TD_CREATE,
+ TD_DEATH
+};
+
+/* td_thr_state_e values */
+enum {
+ TD_THR_ANY_STATE,
+ TD_THR_UNKNOWN,
+ TD_THR_SLEEP,
+ TD_THR_ZOMBIE
+};
+
+typedef int32_t td_err_e;
+typedef uint32_t td_event_e;
+typedef uint32_t td_notify_e;
+typedef uint32_t td_thr_state_e;
+typedef pthread_t thread_t;
+
+typedef struct
+{
+ pid_t pid;
+ struct ps_prochandle *ph;
+} td_thragent_t;
+
+typedef struct
+{
+ pid_t pid;
+ pid_t tid;
+} td_thrhandle_t;
+
+typedef struct
+{
+ td_event_e event;
+ td_thrhandle_t const * th_p;
+ union {
+ void * data;
+ } msg;
+} td_event_msg_t;
+
+typedef struct
+{
+ uint32_t events;
+} td_thr_events_t;
+
+typedef struct
+{
+ union {
+ void * bptaddr;
+ } u;
+} td_notify_t;
+
+typedef struct
+{
+ td_thr_state_e ti_state;
+ thread_t ti_tid; // pthread's id for the thread
+ int32_t ti_lid; // the kernel's id for the thread
+} td_thrinfo_t;
+
+
+#define td_event_emptyset(set) \
+ (set)->events = 0
+
+#define td_event_fillset(set) \
+ (set)->events = 0xffffffff
+
+#define td_event_addset(set, n) \
+ (set)->events |= (1 << n)
+
+
+typedef int td_thr_iter_f(td_thrhandle_t const *, void *);
+
+
+struct ps_prochandle;
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+extern td_err_e td_ta_new(struct ps_prochandle * proc_handle, td_thragent_t ** thread_agent);
+
+extern td_err_e td_ta_delete(td_thragent_t * ta);
+
+extern td_err_e td_ta_set_event(td_thragent_t const * agent, td_thr_events_t * event);
+
+extern td_err_e td_ta_event_addr(td_thragent_t const * agent, td_event_e event, td_notify_t * notify);
+
+extern td_err_e td_ta_clear_event(const td_thragent_t * ta_arg,
+ td_thr_events_t * event);
+
+extern td_err_e td_ta_event_getmsg(td_thragent_t const * agent, td_event_msg_t * event);
+
+extern td_err_e td_ta_map_lwp2thr(td_thragent_t const * agent, lwpid_t lwpid,
+ td_thrhandle_t *th);
+
+extern td_err_e td_thr_get_info(td_thrhandle_t const * handle,
+ td_thrinfo_t * info);
+
+extern td_err_e td_thr_event_enable(td_thrhandle_t const * handle,
+ td_event_e event);
+
+extern td_err_e td_ta_thr_iter(td_thragent_t const * agent, td_thr_iter_f * func, void * cookie,
+ td_thr_state_e state, int32_t prio, sigset_t * sigmask, uint32_t user_flags);
+
+extern char const ** td_symbol_list(void);
+
+extern td_err_e td_thr_tls_get_addr(const td_thrhandle_t * th,
+ psaddr_t map_address, size_t offset,
+ psaddr_t * address);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-arm/usr/include/time.h b/6/platforms/android-9/arch-arm/usr/include/time.h
new file mode 120000
index 0000000..b0ca018
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/time64.h b/6/platforms/android-9/arch-arm/usr/include/time64.h
new file mode 120000
index 0000000..c576ba0
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/unistd.h b/6/platforms/android-9/arch-arm/usr/include/unistd.h
new file mode 100644
index 0000000..21154ad
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/unistd.h
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+#ifdef _GNU_SOURCE /* GLibc compatibility */
+extern int pipe2(int *, int);
+#endif
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int fdatasync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern int usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+extern int ttyname_r(int, char*, size_t);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int getlogin_r(char* name, size_t namesize);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/util.h b/6/platforms/android-9/arch-arm/usr/include/util.h
new file mode 120000
index 0000000..22b335a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/utime.h b/6/platforms/android-9/arch-arm/usr/include/utime.h
new file mode 120000
index 0000000..775b543
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/utmp.h b/6/platforms/android-9/arch-arm/usr/include/utmp.h
new file mode 120000
index 0000000..1d772a4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/wchar.h b/6/platforms/android-9/arch-arm/usr/include/wchar.h
new file mode 100644
index 0000000..9b744a5
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/wchar.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX INT_MAX
+#define WCHAR_MIN INT_MIN
+#define WEOF ((wint_t)(-1))
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-9/arch-arm/usr/include/wctype.h b/6/platforms/android-9/arch-arm/usr/include/wctype.h
new file mode 120000
index 0000000..35235b4
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/zconf.h b/6/platforms/android-9/arch-arm/usr/include/zconf.h
new file mode 120000
index 0000000..3be0825
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/include/zlib.h b/6/platforms/android-9/arch-arm/usr/include/zlib.h
new file mode 120000
index 0000000..e535e8e
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o
new file mode 120000
index 0000000..723e72b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_dynamic.o
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/crtbegin_dynamic.o \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/crtbegin_so.o b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_so.o
new file mode 100644
index 0000000..5230178
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_so.o
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o
new file mode 120000
index 0000000..aabb4d9
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/crtbegin_static.o
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/crtbegin_static.o \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/crtend_android.o b/6/platforms/android-9/arch-arm/usr/lib/crtend_android.o
new file mode 120000
index 0000000..998ec7c
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/crtend_android.o
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/crtend_android.o \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/crtend_so.o b/6/platforms/android-9/arch-arm/usr/lib/crtend_so.o
new file mode 100644
index 0000000..c54db97
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/crtend_so.o
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libEGL.so b/6/platforms/android-9/arch-arm/usr/lib/libEGL.so
new file mode 100644
index 0000000..3d8c151
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libEGL.so
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libGLESv1_CM.so b/6/platforms/android-9/arch-arm/usr/lib/libGLESv1_CM.so
new file mode 120000
index 0000000..cbea31d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libGLESv1_CM.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libGLESv1_CM.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libGLESv2.so b/6/platforms/android-9/arch-arm/usr/lib/libGLESv2.so
new file mode 120000
index 0000000..396b7d3
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libGLESv2.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libGLESv2.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libOpenSLES.so b/6/platforms/android-9/arch-arm/usr/lib/libOpenSLES.so
new file mode 100755
index 0000000..3f2ae90
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libOpenSLES.so
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libandroid.so b/6/platforms/android-9/arch-arm/usr/lib/libandroid.so
new file mode 100644
index 0000000..32d907b
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libandroid.so
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libc.a b/6/platforms/android-9/arch-arm/usr/lib/libc.a
new file mode 120000
index 0000000..a1e3f79
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libc.a
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libc.a \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libc.so b/6/platforms/android-9/arch-arm/usr/lib/libc.so
new file mode 100644
index 0000000..5b3ba75
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libc.so
Binary files differ
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libdl.so b/6/platforms/android-9/arch-arm/usr/lib/libdl.so
new file mode 120000
index 0000000..6d38707
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libdl.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libdl.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libjnigraphics.so b/6/platforms/android-9/arch-arm/usr/lib/libjnigraphics.so
new file mode 120000
index 0000000..75f44cf
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libjnigraphics.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libjnigraphics.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/liblog.so b/6/platforms/android-9/arch-arm/usr/lib/liblog.so
new file mode 120000
index 0000000..49ffc94
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/liblog.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/liblog.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libm.a b/6/platforms/android-9/arch-arm/usr/lib/libm.a
new file mode 120000
index 0000000..8f2d75d
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libm.a
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libm.a \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libm.so b/6/platforms/android-9/arch-arm/usr/lib/libm.so
new file mode 120000
index 0000000..1b41bfb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libm.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libm.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libstdc++.a b/6/platforms/android-9/arch-arm/usr/lib/libstdc++.a
new file mode 120000
index 0000000..bff056a
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libstdc++.a
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libstdc++.a \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libstdc++.so b/6/platforms/android-9/arch-arm/usr/lib/libstdc++.so
new file mode 120000
index 0000000..a6f3577
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libstdc++.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libstdc++.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libthread_db.a b/6/platforms/android-9/arch-arm/usr/lib/libthread_db.a
new file mode 120000
index 0000000..4cf1c5f
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libthread_db.a
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libthread_db.a \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libthread_db.so b/6/platforms/android-9/arch-arm/usr/lib/libthread_db.so
new file mode 120000
index 0000000..e438e90
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libthread_db.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libthread_db.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-arm/usr/lib/libz.so b/6/platforms/android-9/arch-arm/usr/lib/libz.so
new file mode 120000
index 0000000..d2779fb
--- /dev/null
+++ b/6/platforms/android-9/arch-arm/usr/lib/libz.so
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-arm/usr/lib/libz.so \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/EGL/egl.h b/6/platforms/android-9/arch-x86/usr/include/EGL/egl.h
new file mode 100644
index 0000000..99ea342
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/EGL/egl.h
@@ -0,0 +1,329 @@
+/* -*- mode: c; tab-width: 8; -*- */
+/* vi: set sw=4 ts=8: */
+/* Reference version of egl.h for EGL 1.4.
+ * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
+ */
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#ifndef __egl_h_
+#define __egl_h_
+
+/* All platform-dependent types and macro boilerplate (such as EGLAPI
+ * and EGLAPIENTRY) should go in eglplatform.h.
+ */
+#include <EGL/eglplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* EGL Types */
+/* EGLint is defined in eglplatform.h */
+typedef unsigned int EGLBoolean;
+typedef unsigned int EGLenum;
+typedef void *EGLConfig;
+typedef void *EGLContext;
+typedef void *EGLDisplay;
+typedef void *EGLSurface;
+typedef void *EGLClientBuffer;
+
+/* EGL Versioning */
+#define EGL_VERSION_1_0 1
+#define EGL_VERSION_1_1 1
+#define EGL_VERSION_1_2 1
+#define EGL_VERSION_1_3 1
+#define EGL_VERSION_1_4 1
+
+/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
+ * enums are assigned unique values starting at 0x3000.
+ */
+
+/* EGL aliases */
+#define EGL_FALSE 0
+#define EGL_TRUE 1
+
+/* Out-of-band handle values */
+#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0)
+#define EGL_NO_CONTEXT ((EGLContext)0)
+#define EGL_NO_DISPLAY ((EGLDisplay)0)
+#define EGL_NO_SURFACE ((EGLSurface)0)
+
+/* Out-of-band attribute value */
+#define EGL_DONT_CARE ((EGLint)-1)
+
+/* Errors / GetError return values */
+#define EGL_SUCCESS 0x3000
+#define EGL_NOT_INITIALIZED 0x3001
+#define EGL_BAD_ACCESS 0x3002
+#define EGL_BAD_ALLOC 0x3003
+#define EGL_BAD_ATTRIBUTE 0x3004
+#define EGL_BAD_CONFIG 0x3005
+#define EGL_BAD_CONTEXT 0x3006
+#define EGL_BAD_CURRENT_SURFACE 0x3007
+#define EGL_BAD_DISPLAY 0x3008
+#define EGL_BAD_MATCH 0x3009
+#define EGL_BAD_NATIVE_PIXMAP 0x300A
+#define EGL_BAD_NATIVE_WINDOW 0x300B
+#define EGL_BAD_PARAMETER 0x300C
+#define EGL_BAD_SURFACE 0x300D
+#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */
+
+/* Reserved 0x300F-0x301F for additional errors */
+
+/* Config attributes */
+#define EGL_BUFFER_SIZE 0x3020
+#define EGL_ALPHA_SIZE 0x3021
+#define EGL_BLUE_SIZE 0x3022
+#define EGL_GREEN_SIZE 0x3023
+#define EGL_RED_SIZE 0x3024
+#define EGL_DEPTH_SIZE 0x3025
+#define EGL_STENCIL_SIZE 0x3026
+#define EGL_CONFIG_CAVEAT 0x3027
+#define EGL_CONFIG_ID 0x3028
+#define EGL_LEVEL 0x3029
+#define EGL_MAX_PBUFFER_HEIGHT 0x302A
+#define EGL_MAX_PBUFFER_PIXELS 0x302B
+#define EGL_MAX_PBUFFER_WIDTH 0x302C
+#define EGL_NATIVE_RENDERABLE 0x302D
+#define EGL_NATIVE_VISUAL_ID 0x302E
+#define EGL_NATIVE_VISUAL_TYPE 0x302F
+#define EGL_SAMPLES 0x3031
+#define EGL_SAMPLE_BUFFERS 0x3032
+#define EGL_SURFACE_TYPE 0x3033
+#define EGL_TRANSPARENT_TYPE 0x3034
+#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
+#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
+#define EGL_TRANSPARENT_RED_VALUE 0x3037
+#define EGL_NONE 0x3038 /* Attrib list terminator */
+#define EGL_BIND_TO_TEXTURE_RGB 0x3039
+#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
+#define EGL_MIN_SWAP_INTERVAL 0x303B
+#define EGL_MAX_SWAP_INTERVAL 0x303C
+#define EGL_LUMINANCE_SIZE 0x303D
+#define EGL_ALPHA_MASK_SIZE 0x303E
+#define EGL_COLOR_BUFFER_TYPE 0x303F
+#define EGL_RENDERABLE_TYPE 0x3040
+#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */
+#define EGL_CONFORMANT 0x3042
+
+/* Reserved 0x3041-0x304F for additional config attributes */
+
+/* Config attribute values */
+#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
+#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */
+#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
+#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */
+#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */
+
+/* More config attribute values, for EGL_TEXTURE_FORMAT */
+#define EGL_NO_TEXTURE 0x305C
+#define EGL_TEXTURE_RGB 0x305D
+#define EGL_TEXTURE_RGBA 0x305E
+#define EGL_TEXTURE_2D 0x305F
+
+/* Config attribute mask bits */
+#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
+
+#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */
+
+/* QueryString targets */
+#define EGL_VENDOR 0x3053
+#define EGL_VERSION 0x3054
+#define EGL_EXTENSIONS 0x3055
+#define EGL_CLIENT_APIS 0x308D
+
+/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
+#define EGL_HEIGHT 0x3056
+#define EGL_WIDTH 0x3057
+#define EGL_LARGEST_PBUFFER 0x3058
+#define EGL_TEXTURE_FORMAT 0x3080
+#define EGL_TEXTURE_TARGET 0x3081
+#define EGL_MIPMAP_TEXTURE 0x3082
+#define EGL_MIPMAP_LEVEL 0x3083
+#define EGL_RENDER_BUFFER 0x3086
+#define EGL_VG_COLORSPACE 0x3087
+#define EGL_VG_ALPHA_FORMAT 0x3088
+#define EGL_HORIZONTAL_RESOLUTION 0x3090
+#define EGL_VERTICAL_RESOLUTION 0x3091
+#define EGL_PIXEL_ASPECT_RATIO 0x3092
+#define EGL_SWAP_BEHAVIOR 0x3093
+#define EGL_MULTISAMPLE_RESOLVE 0x3099
+
+/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
+#define EGL_BACK_BUFFER 0x3084
+#define EGL_SINGLE_BUFFER 0x3085
+
+/* OpenVG color spaces */
+#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */
+#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */
+
+/* OpenVG alpha formats */
+#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */
+#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */
+
+/* Constant scale factor by which fractional display resolutions &
+ * aspect ratio are scaled when queried as integer values.
+ */
+#define EGL_DISPLAY_SCALING 10000
+
+/* Unknown display resolution/aspect ratio */
+#define EGL_UNKNOWN ((EGLint)-1)
+
+/* Back buffer swap behaviors */
+#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */
+#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */
+
+/* CreatePbufferFromClientBuffer buffer types */
+#define EGL_OPENVG_IMAGE 0x3096
+
+/* QueryContext targets */
+#define EGL_CONTEXT_CLIENT_TYPE 0x3097
+
+/* CreateContext attributes */
+#define EGL_CONTEXT_CLIENT_VERSION 0x3098
+
+/* Multisample resolution behaviors */
+#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
+#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */
+
+/* BindAPI/QueryAPI targets */
+#define EGL_OPENGL_ES_API 0x30A0
+#define EGL_OPENVG_API 0x30A1
+#define EGL_OPENGL_API 0x30A2
+
+/* GetCurrentSurface targets */
+#define EGL_DRAW 0x3059
+#define EGL_READ 0x305A
+
+/* WaitNative engines */
+#define EGL_CORE_NATIVE_ENGINE 0x305B
+
+/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
+#define EGL_COLORSPACE EGL_VG_COLORSPACE
+#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT
+#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB
+#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR
+#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE
+#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE
+
+/* EGL extensions must request enum blocks from the Khronos
+ * API Registrar, who maintains the enumerant registry. Submit
+ * a bug in Khronos Bugzilla against task "Registry".
+ */
+
+
+
+/* EGL Functions */
+
+EGLAPI EGLint EGLAPIENTRY eglGetError(void);
+
+EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
+EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
+EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
+
+EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
+ EGLint config_size, EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
+ EGLConfig *configs, EGLint config_size,
+ EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
+ EGLNativeWindowType win,
+ const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
+ const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
+ EGLNativePixmapType pixmap,
+ const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
+EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
+ EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
+ EGLConfig config, const EGLint *attrib_list);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
+ EGLint attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
+
+
+EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
+ EGLContext share_context,
+ const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
+EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
+ EGLSurface read, EGLContext ctx);
+
+EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
+EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
+ EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
+ EGLNativePixmapType target);
+
+/* This is a generic function pointer type, whose name indicates it must
+ * be cast to the proper type *and calling convention* before use.
+ */
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+
+/* Now, define eglGetProcAddress using the generic function ptr. type */
+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
+ eglGetProcAddress(const char *procname);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __egl_h_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/EGL/eglext.h b/6/platforms/android-9/arch-x86/usr/include/EGL/eglext.h
new file mode 100644
index 0000000..1ffcd56
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/EGL/eglext.h
@@ -0,0 +1,244 @@
+#ifndef __eglext_h_
+#define __eglext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2010 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#include <EGL/eglplatform.h>
+
+/*************************************************************/
+
+/* Header file version number */
+/* Current version at http://www.khronos.org/registry/egl/ */
+/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */
+#define EGL_EGLEXT_VERSION 5
+
+#ifndef EGL_KHR_config_attribs
+#define EGL_KHR_config_attribs 1
+#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
+#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
+#endif
+
+#ifndef EGL_KHR_lock_surface
+#define EGL_KHR_lock_surface 1
+#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
+#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
+#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
+#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
+#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
+#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
+#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
+#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
+#endif
+
+#ifndef EGL_KHR_image
+#define EGL_KHR_image 1
+#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
+typedef void *EGLImageKHR;
+#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
+#endif
+
+#ifndef EGL_KHR_vg_parent_image
+#define EGL_KHR_vg_parent_image 1
+#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_2D_image
+#define EGL_KHR_gl_texture_2D_image 1
+#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_texture_cubemap_image
+#define EGL_KHR_gl_texture_cubemap_image 1
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_3D_image
+#define EGL_KHR_gl_texture_3D_image 1
+#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_renderbuffer_image
+#define EGL_KHR_gl_renderbuffer_image 1
+#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+
+typedef void* EGLSyncKHR;
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+
+#define EGL_SYNC_STATUS_KHR 0x30F1
+#define EGL_SIGNALED_KHR 0x30F2
+#define EGL_UNSIGNALED_KHR 0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
+#define EGL_CONDITION_SATISFIED_KHR 0x30F6
+#define EGL_SYNC_TYPE_KHR 0x30F7
+#define EGL_SYNC_REUSABLE_KHR 0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
+#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_image_base
+#define EGL_KHR_image_base 1
+/* Most interfaces defined by EGL_KHR_image_pixmap above */
+#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_image_pixmap
+#define EGL_KHR_image_pixmap 1
+/* Interfaces defined by EGL_KHR_image above */
+#endif
+
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
+#endif
+
+#ifndef EGL_NV_coverage_sample
+#define EGL_NV_coverage_sample 1
+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#endif
+
+#ifndef EGL_NV_depth_nonlinear
+#define EGL_NV_depth_nonlinear 1
+#define EGL_DEPTH_ENCODING_NV 0x30E2
+#define EGL_DEPTH_ENCODING_NONE_NV 0
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#endif
+
+#ifndef EGL_NV_sync
+#define EGL_NV_sync 1
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
+#define EGL_SYNC_STATUS_NV 0x30E7
+#define EGL_SIGNALED_NV 0x30E8
+#define EGL_UNSIGNALED_NV 0x30E9
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
+#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
+#define EGL_ALREADY_SIGNALED_NV 0x30EA
+#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
+#define EGL_CONDITION_SATISFIED_NV 0x30EC
+#define EGL_SYNC_TYPE_NV 0x30ED
+#define EGL_SYNC_CONDITION_NV 0x30EE
+#define EGL_SYNC_FENCE_NV 0x30EF
+#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
+typedef void* EGLSyncNV;
+typedef unsigned long long EGLTimeNV;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
+EGLBoolean eglFenceNV (EGLSyncNV sync);
+EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
+#define EGL_SYNC_CONDITION_KHR 0x30F8
+#define EGL_SYNC_FENCE_KHR 0x30F9
+#endif
+
+#ifndef EGL_ANDROID_image_native_buffer
+#define EGL_ANDROID_image_native_buffer 1
+struct android_native_buffer_t;
+#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_ANDROID_swap_rectangle
+#define EGL_ANDROID_swap_rectangle 1
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSetSwapRectangleANDROID (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/EGL/eglplatform.h b/6/platforms/android-9/arch-x86/usr/include/EGL/eglplatform.h
new file mode 100644
index 0000000..bfac71b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/EGL/eglplatform.h
@@ -0,0 +1,120 @@
+#ifndef __eglplatform_h_
+#define __eglplatform_h_
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions for egl.h
+ * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file. Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "EGL" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+/* Macros used in EGL function prototype declarations.
+ *
+ * EGL functions should be prototyped as:
+ *
+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
+ *
+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
+ */
+
+#ifndef EGLAPI
+#define EGLAPI KHRONOS_APICALL
+#endif
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY KHRONOS_APIENTRY
+#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
+
+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
+ * are aliases of window-system-dependent types, such as X Display * or
+ * Windows Device Context. They must be defined in platform-specific
+ * code below. The EGL-prefixed versions of Native*Type are the same
+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ */
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+
+typedef HDC EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+typedef HWND EGLNativeWindowType;
+
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
+
+typedef int EGLNativeDisplayType;
+typedef void *EGLNativeWindowType;
+typedef void *EGLNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+#include <android/native_window.h>
+
+struct egl_native_pixmap_t;
+
+typedef struct ANativeWindow* EGLNativeWindowType;
+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
+typedef void* EGLNativeDisplayType;
+
+#elif defined(__unix__)
+
+/* X11 (tentative) */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap EGLNativePixmapType;
+typedef Window EGLNativeWindowType;
+
+#else
+#error "Platform not recognized"
+#endif
+
+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
+typedef EGLNativeDisplayType NativeDisplayType;
+typedef EGLNativePixmapType NativePixmapType;
+typedef EGLNativeWindowType NativeWindowType;
+
+
+/* Define EGLint. This must be a signed integral type large enough to contain
+ * all legal attribute names and values passed into and out of EGL, whether
+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
+ * handle, or other. While in general a 32-bit integer will suffice, if
+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
+ * integer type.
+ */
+typedef khronos_int32_t EGLint;
+
+#endif /* __eglplatform_h */
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES/gl.h b/6/platforms/android-9/arch-x86/usr/include/GLES/gl.h
new file mode 120000
index 0000000..775df9c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES/gl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES/gl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES/glext.h b/6/platforms/android-9/arch-x86/usr/include/GLES/glext.h
new file mode 120000
index 0000000..e70ab5f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES/glext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES/glext.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES/glplatform.h b/6/platforms/android-9/arch-x86/usr/include/GLES/glplatform.h
new file mode 120000
index 0000000..ebb78c1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES/glplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES/glplatform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2.h b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2.h
new file mode 120000
index 0000000..57b70c9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES2/gl2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2ext.h b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2ext.h
new file mode 120000
index 0000000..2c4f1e2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2ext.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES2/gl2ext.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2platform.h b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2platform.h
new file mode 120000
index 0000000..12fc090
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/GLES2/gl2platform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/GLES2/gl2platform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/KHR/khrplatform.h b/6/platforms/android-9/arch-x86/usr/include/KHR/khrplatform.h
new file mode 120000
index 0000000..8522127
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/KHR/khrplatform.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/KHR/khrplatform.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES.h b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES.h
new file mode 100644
index 0000000..16496f9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES.h
@@ -0,0 +1,2774 @@
+/*
+ * Copyright (c) 2007-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and /or associated documentation files (the "Materials "), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * 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 Materials.
+ *
+ * THE MATERIALS ARE 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
+ * AUTHORS OR COPYRIGHT HOLDERS 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 MATERIALS OR THE USE OR OTHER DEALINGS IN THE
+ * MATERIALS.
+ *
+ * OpenSLES.h - OpenSL ES version 1.0.1
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file is a standard OpenSL ES header file and should not be */
+/* modified in any way. */
+/****************************************************************************/
+
+#ifndef OPENSL_ES_H_
+#define OPENSL_ES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "OpenSLES_Platform.h"
+
+
+/*****************************************************************************/
+/* Common types, structures, and defines */
+/*****************************************************************************/
+
+#ifndef _KHRONOS_KEYS_
+#define _KHRONOS_KEYS_
+
+#define KHRONOS_TITLE "KhronosTitle"
+#define KHRONOS_ALBUM "KhronosAlbum"
+#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
+#define KHRONOS_ARTIST "KhronosArtist"
+#define KHRONOS_GENRE "KhronosGenre"
+#define KHRONOS_YEAR "KhronosYear"
+#define KHRONOS_COMMENT "KhronosComment"
+#define KHRONOS_ARTIST_URL "KhronosArtistURL"
+#define KHRONOS_CONTENT_URL "KhronosContentURL"
+#define KHRONOS_RATING "KhronosRating"
+#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
+#define KHRONOS_COPYRIGHT "KhronosCopyright"
+
+#endif
+
+
+/* remap common types to SL types for clarity */
+typedef sl_int8_t SLint8; /* 8 bit signed integer */
+typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
+typedef sl_int16_t SLint16; /* 16 bit signed integer */
+typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
+typedef sl_int32_t SLint32; /* 32 bit signed integer */
+typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
+
+typedef SLuint32 SLboolean;
+#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
+#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
+
+typedef SLuint8 SLchar; /* UTF-8 is to be used */
+typedef SLint16 SLmillibel;
+typedef SLuint32 SLmillisecond;
+typedef SLuint32 SLmilliHertz;
+typedef SLint32 SLmillimeter;
+typedef SLint32 SLmillidegree;
+typedef SLint16 SLpermille;
+typedef SLuint32 SLmicrosecond;
+typedef SLuint32 SLresult;
+
+#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
+#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
+
+#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
+#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
+
+/** Interface ID defined as a UUID */
+typedef const struct SLInterfaceID_ {
+ SLuint32 time_low;
+ SLuint16 time_mid;
+ SLuint16 time_hi_and_version;
+ SLuint16 clock_seq;
+ SLuint8 node[6];
+} * SLInterfaceID;
+
+/* Forward declaration for the object interface */
+struct SLObjectItf_;
+
+typedef const struct SLObjectItf_ * const * SLObjectItf;
+
+/* Objects ID's */
+
+#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
+#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
+#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
+#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
+#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
+#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
+#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
+#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
+#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
+#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
+
+
+/* SL Profiles */
+
+#define SL_PROFILES_PHONE ((SLuint16) 0x0001)
+#define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
+#define SL_PROFILES_GAME ((SLuint16) 0x0004)
+
+/* Types of voices supported by the system */
+
+#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
+#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
+#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
+#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
+
+/* Convenient macros representing various different priority levels, for use with the SetPriority method */
+
+#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
+#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
+#define SL_PRIORITY_LOW ((SLint32) -0x40000000)
+#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
+#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
+#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
+#define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
+#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
+#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
+
+
+/** These macros list the various sample formats that are possible on audio input and output devices. */
+
+#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
+#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
+#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
+#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
+#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
+#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
+
+
+/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
+
+#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
+#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
+#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
+#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
+#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
+#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
+#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
+#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
+#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
+#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
+#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
+#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
+#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
+
+#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
+#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
+#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
+#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
+#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
+#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
+#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
+#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
+#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
+#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
+#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
+#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
+#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
+#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
+#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
+#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
+#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
+#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
+
+
+/*****************************************************************************/
+/* Errors */
+/* */
+/*****************************************************************************/
+
+#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
+#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
+#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
+#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
+#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
+#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
+#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
+#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
+#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
+#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
+#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
+#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
+#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
+#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
+#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
+#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
+#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
+
+
+/* Object state definitions */
+
+#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
+#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
+#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
+
+/* Object event definitions */
+
+#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
+#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
+#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
+#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
+
+
+/*****************************************************************************/
+/* Interface definitions */
+/*****************************************************************************/
+
+/** NULL Interface */
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_NULL;
+
+/*---------------------------------------------------------------------------*/
+/* Data Source and Data Sink Structures */
+/*---------------------------------------------------------------------------*/
+
+/** Data locator macros */
+#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
+#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
+#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
+#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
+#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
+#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
+#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
+#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
+
+
+
+/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
+typedef struct SLDataLocator_URI_ {
+ SLuint32 locatorType;
+ SLchar * URI;
+} SLDataLocator_URI;
+
+/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
+typedef struct SLDataLocator_Address_ {
+ SLuint32 locatorType;
+ void *pAddress;
+ SLuint32 length;
+} SLDataLocator_Address;
+
+/** IODevice-types */
+#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
+#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
+#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
+#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
+#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
+
+/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
+typedef struct SLDataLocator_IODevice_ {
+ SLuint32 locatorType;
+ SLuint32 deviceType;
+ SLuint32 deviceID;
+ SLObjectItf device;
+} SLDataLocator_IODevice;
+
+/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
+typedef struct SLDataLocator_OutputMix {
+ SLuint32 locatorType;
+ SLObjectItf outputMix;
+} SLDataLocator_OutputMix;
+
+
+/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
+typedef struct SLDataLocator_BufferQueue {
+ SLuint32 locatorType;
+ SLuint32 numBuffers;
+} SLDataLocator_BufferQueue;
+
+/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
+typedef struct SLDataLocator_MIDIBufferQueue {
+ SLuint32 locatorType;
+ SLuint32 tpqn;
+ SLuint32 numBuffers;
+} SLDataLocator_MIDIBufferQueue;
+
+/** Data format defines */
+#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
+#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
+#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
+
+
+/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
+typedef struct SLDataFormat_MIME_ {
+ SLuint32 formatType;
+ SLchar * mimeType;
+ SLuint32 containerType;
+} SLDataFormat_MIME;
+
+/* Byte order of a block of 16- or 32-bit data */
+#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
+#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
+
+/* Container type */
+#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
+#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
+#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
+#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
+#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
+#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
+#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
+#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
+#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
+#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
+#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
+#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
+#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
+#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
+#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
+#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
+#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
+#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
+#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
+#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
+#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
+#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
+#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
+#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
+#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
+#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
+#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
+#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
+
+
+/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
+typedef struct SLDataFormat_PCM_ {
+ SLuint32 formatType;
+ SLuint32 numChannels;
+ SLuint32 samplesPerSec;
+ SLuint32 bitsPerSample;
+ SLuint32 containerSize;
+ SLuint32 channelMask;
+ SLuint32 endianness;
+} SLDataFormat_PCM;
+
+typedef struct SLDataSource_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSource;
+
+
+typedef struct SLDataSink_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSink;
+
+
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Standard Object Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_OBJECT;
+
+/** Object callback */
+
+
+typedef void (/*SLAPIENTRY*/ *slObjectCallback) (
+ SLObjectItf caller,
+ const void * pContext,
+ SLuint32 event,
+ SLresult result,
+ SLuint32 param,
+ void *pInterface
+);
+
+
+struct SLObjectItf_ {
+ SLresult (*Realize) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*Resume) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*GetState) (
+ SLObjectItf self,
+ SLuint32 * pState
+ );
+ SLresult (*GetInterface) (
+ SLObjectItf self,
+ const SLInterfaceID iid,
+ void * pInterface
+ );
+ SLresult (*RegisterCallback) (
+ SLObjectItf self,
+ slObjectCallback callback,
+ void * pContext
+ );
+ void (*AbortAsyncOperation) (
+ SLObjectItf self
+ );
+ void (*Destroy) (
+ SLObjectItf self
+ );
+ SLresult (*SetPriority) (
+ SLObjectItf self,
+ SLint32 priority,
+ SLboolean preemptable
+ );
+ SLresult (*GetPriority) (
+ SLObjectItf self,
+ SLint32 *pPriority,
+ SLboolean *pPreemptable
+ );
+ SLresult (*SetLossOfControlInterfaces) (
+ SLObjectItf self,
+ SLint16 numInterfaces,
+ SLInterfaceID * pInterfaceIDs,
+ SLboolean enabled
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio IO Device capabilities interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
+#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
+#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
+#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
+#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
+
+
+#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
+#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
+#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
+#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
+
+
+#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
+#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
+#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
+#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
+#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
+/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
+#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
+
+
+#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
+#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
+#define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
+
+
+typedef struct SLAudioInputDescriptor_ {
+ SLchar *deviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioInputDescriptor;
+
+
+typedef struct SLAudioOutputDescriptor_ {
+ SLchar *pDeviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioOutputDescriptor;
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
+
+struct SLAudioIODeviceCapabilitiesItf_;
+typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
+
+
+typedef void (/*SLAPIENTRY*/ *slAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numInputs,
+ SLboolean isNew
+);
+
+
+typedef void (/*SLAPIENTRY*/ *slAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numOutputs,
+ SLboolean isNew
+);
+
+typedef void (/*SLAPIENTRY*/ *slDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLboolean isOutput,
+ SLint32 numDevices
+);
+
+
+struct SLAudioIODeviceCapabilitiesItf_ {
+ SLresult (*GetAvailableAudioInputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumInputs,
+ SLuint32 *pInputDeviceIDs
+ );
+ SLresult (*QueryAudioInputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioInputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioInputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAvailableAudioOutputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumOutputs,
+ SLuint32 *pOutputDeviceIDs
+ );
+ SLresult (*QueryAudioOutputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioOutputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioOutputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slDefaultDeviceIDMapChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAssociatedAudioInputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioInputs,
+ SLuint32 *pAudioInputDeviceIDs
+ );
+ SLresult (*GetAssociatedAudioOutputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioOutputs,
+ SLuint32 *pAudioOutputDeviceIDs
+ );
+ SLresult (*GetDefaultAudioDevices) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 defaultDeviceID,
+ SLint32 *pNumAudioDevices,
+ SLuint32 *pAudioDeviceIDs
+ );
+ SLresult (*QuerySampleFormatsSupported)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLmilliHertz samplingRate,
+ SLint32 *pSampleFormats,
+ SLint32 *pNumOfSampleFormats
+ );
+};
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the LED array IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLLEDDescriptor_ {
+ SLuint8 ledCount;
+ SLuint8 primaryLED;
+ SLuint32 colorMask;
+} SLLEDDescriptor;
+
+
+/*---------------------------------------------------------------------------*/
+/* LED Array interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLHSL_ {
+ SLmillidegree hue;
+ SLpermille saturation;
+ SLpermille lightness;
+} SLHSL;
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_LED;
+
+struct SLLEDArrayItf_;
+typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
+
+struct SLLEDArrayItf_ {
+ SLresult (*ActivateLEDArray) (
+ SLLEDArrayItf self,
+ SLuint32 lightMask
+ );
+ SLresult (*IsLEDArrayActivated) (
+ SLLEDArrayItf self,
+ SLuint32 *lightMask
+ );
+ SLresult (*SetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ const SLHSL *color
+ );
+ SLresult (*GetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ SLHSL *color
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the Vibra IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVibraDescriptor_ {
+ SLboolean supportsFrequency;
+ SLboolean supportsIntensity;
+ SLmilliHertz minFrequency;
+ SLmilliHertz maxFrequency;
+} SLVibraDescriptor;
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Vibra interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VIBRA;
+
+
+struct SLVibraItf_;
+typedef const struct SLVibraItf_ * const * SLVibraItf;
+
+struct SLVibraItf_ {
+ SLresult (*Vibrate) (
+ SLVibraItf self,
+ SLboolean vibrate
+ );
+ SLresult (*IsVibrating) (
+ SLVibraItf self,
+ SLboolean *pVibrating
+ );
+ SLresult (*SetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz frequency
+ );
+ SLresult (*GetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz *pFrequency
+ );
+ SLresult (*SetIntensity) (
+ SLVibraItf self,
+ SLpermille intensity
+ );
+ SLresult (*GetIntensity) (
+ SLVibraItf self,
+ SLpermille *pIntensity
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data extraction related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
+#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
+#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
+#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
+#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
+#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
+#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
+#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
+#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
+#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
+#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
+#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
+#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
+#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
+#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
+#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
+#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
+#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
+#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
+#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
+#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
+#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
+#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
+#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
+#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
+#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
+#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
+#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
+#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
+#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
+#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
+#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
+
+
+#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
+#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
+#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
+
+
+typedef struct SLMetadataInfo_ {
+ SLuint32 size;
+ SLuint32 encoding;
+ SLchar langCountry[16];
+ SLuint8 data[1];
+} SLMetadataInfo;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_METADATAEXTRACTION;
+
+struct SLMetadataExtractionItf_;
+typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
+
+
+struct SLMetadataExtractionItf_ {
+ SLresult (*GetItemCount) (
+ SLMetadataExtractionItf self,
+ SLuint32 *pItemCount
+ );
+ SLresult (*GetKeySize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pKeySize
+ );
+ SLresult (*GetKey) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 keySize,
+ SLMetadataInfo *pKey
+ );
+ SLresult (*GetValueSize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pValueSize
+ );
+ SLresult (*GetValue) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 valueSize,
+ SLMetadataInfo *pValue
+ );
+ SLresult (*AddKeyFilter) (
+ SLMetadataExtractionItf self,
+ SLuint32 keySize,
+ const void *pKey,
+ SLuint32 keyEncoding,
+ const SLchar *pValueLangCountry,
+ SLuint32 valueEncoding,
+ SLuint8 filterMask
+ );
+ SLresult (*ClearKeyFilter) (
+ SLMetadataExtractionItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data traversal related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
+#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
+
+
+#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
+#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
+#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
+
+#define SL_NODE_PARENT 0xFFFFFFFF
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_METADATATRAVERSAL;
+
+struct SLMetadataTraversalItf_;
+typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
+
+struct SLMetadataTraversalItf_ {
+ SLresult (*SetMode) (
+ SLMetadataTraversalItf self,
+ SLuint32 mode
+ );
+ SLresult (*GetChildCount) (
+ SLMetadataTraversalItf self,
+ SLuint32 *pCount
+ );
+ SLresult (*GetChildMIMETypeSize) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLuint32 *pSize
+ );
+ SLresult (*GetChildInfo) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLint32 *pNodeID,
+ SLuint32 *pType,
+ SLuint32 size,
+ SLchar *pMimeType
+ );
+ SLresult (*SetActiveNode) (
+ SLMetadataTraversalItf self,
+ SLuint32 index
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Source types and interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DYNAMICSOURCE;
+
+struct SLDynamicSourceItf_;
+typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
+
+struct SLDynamicSourceItf_ {
+ SLresult (*SetSource) (
+ SLDynamicSourceItf self,
+ SLDataSource *pDataSource
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Output Mix interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_OUTPUTMIX;
+
+struct SLOutputMixItf_;
+typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
+
+typedef void (/*SLAPIENTRY*/ *slMixDeviceChangeCallback) (
+ SLOutputMixItf caller,
+ void *pContext
+);
+
+
+struct SLOutputMixItf_ {
+ SLresult (*GetDestinationOutputDeviceIDs) (
+ SLOutputMixItf self,
+ SLint32 *pNumDevices,
+ SLuint32 *pDeviceIDs
+ );
+ SLresult (*RegisterDeviceChangeCallback) (
+ SLOutputMixItf self,
+ slMixDeviceChangeCallback callback,
+ void *pContext
+ );
+ SLresult (*ReRoute)(
+ SLOutputMixItf self,
+ SLint32 numOutputDevices,
+ SLuint32 *pOutputDeviceIDs
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Playback interface */
+/*---------------------------------------------------------------------------*/
+
+/** Playback states */
+#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
+
+/** Play events **/
+#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
+#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+
+#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PLAY;
+
+/** Playback interface methods */
+
+struct SLPlayItf_;
+typedef const struct SLPlayItf_ * const * SLPlayItf;
+
+typedef void (/*SLAPIENTRY*/ *slPlayCallback) (
+ SLPlayItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPlayItf_ {
+ SLresult (*SetPlayState) (
+ SLPlayItf self,
+ SLuint32 state
+ );
+ SLresult (*GetPlayState) (
+ SLPlayItf self,
+ SLuint32 *pState
+ );
+ SLresult (*GetDuration) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*GetPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLPlayItf self,
+ slPlayCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLPlayItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Prefetch status interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
+#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
+
+#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
+#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
+#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PREFETCHSTATUS;
+
+
+/** Prefetch status interface methods */
+
+struct SLPrefetchStatusItf_;
+typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
+
+typedef void (/*SLAPIENTRY*/ *slPrefetchCallback) (
+ SLPrefetchStatusItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPrefetchStatusItf_ {
+ SLresult (*GetPrefetchStatus) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pStatus
+ );
+ SLresult (*GetFillLevel) (
+ SLPrefetchStatusItf self,
+ SLpermille *pLevel
+ );
+ SLresult (*RegisterCallback) (
+ SLPrefetchStatusItf self,
+ slPrefetchCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille period
+ );
+ SLresult (*GetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille *pPeriod
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Playback Rate interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
+#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
+#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
+#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
+#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
+#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PLAYBACKRATE;
+
+struct SLPlaybackRateItf_;
+typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
+
+struct SLPlaybackRateItf_ {
+ SLresult (*SetRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate)(
+ SLPlaybackRateItf self,
+ SLpermille *pRate
+ );
+ SLresult (*SetPropertyConstraints)(
+ SLPlaybackRateItf self,
+ SLuint32 constraints
+ );
+ SLresult (*GetProperties)(
+ SLPlaybackRateItf self,
+ SLuint32 *pProperties
+ );
+ SLresult (*GetCapabilitiesOfRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate,
+ SLuint32 *pCapabilities
+ );
+ SLresult (*GetRateRange) (
+ SLPlaybackRateItf self,
+ SLuint8 index,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate,
+ SLpermille *pStepSize,
+ SLuint32 *pCapabilities
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Seek Interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
+#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_SEEK;
+
+struct SLSeekItf_;
+typedef const struct SLSeekItf_ * const * SLSeekItf;
+
+struct SLSeekItf_ {
+ SLresult (*SetPosition)(
+ SLSeekItf self,
+ SLmillisecond pos,
+ SLuint32 seekMode
+ );
+ SLresult (*SetLoop)(
+ SLSeekItf self,
+ SLboolean loopEnable,
+ SLmillisecond startPos,
+ SLmillisecond endPos
+ );
+ SLresult (*GetLoop)(
+ SLSeekItf self,
+ SLboolean *pLoopEnabled,
+ SLmillisecond *pStartPos,
+ SLmillisecond *pEndPos
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Standard Recording Interface */
+/*---------------------------------------------------------------------------*/
+
+/** Recording states */
+#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
+
+
+/** Record event **/
+#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
+#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
+#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
+#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_RECORD;
+
+struct SLRecordItf_;
+typedef const struct SLRecordItf_ * const * SLRecordItf;
+
+typedef void (/*SLAPIENTRY*/ *slRecordCallback) (
+ SLRecordItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+/** Recording interface methods */
+struct SLRecordItf_ {
+ SLresult (*SetRecordState) (
+ SLRecordItf self,
+ SLuint32 state
+ );
+ SLresult (*GetRecordState) (
+ SLRecordItf self,
+ SLuint32 *pState
+ );
+ SLresult (*SetDurationLimit) (
+ SLRecordItf self,
+ SLmillisecond msec
+ );
+ SLresult (*GetPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLRecordItf self,
+ slRecordCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLRecordItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Equalizer interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_EQUALIZER;
+
+struct SLEqualizerItf_;
+typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
+
+struct SLEqualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLEqualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLEqualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*GetNumberOfBands)(
+ SLEqualizerItf self,
+ SLuint16 *pAmount
+ );
+ SLresult (*GetBandLevelRange)(
+ SLEqualizerItf self,
+ SLmillibel *pMin,
+ SLmillibel *pMax
+ );
+ SLresult (*SetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel level
+ );
+ SLresult (*GetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetCenterFreq)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pCenter
+ );
+ SLresult (*GetBandFreqRange)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pMin,
+ SLmilliHertz *pMax
+ );
+ SLresult (*GetBand)(
+ SLEqualizerItf self,
+ SLmilliHertz frequency,
+ SLuint16 *pBand
+ );
+ SLresult (*GetCurrentPreset)(
+ SLEqualizerItf self,
+ SLuint16 *pPreset
+ );
+ SLresult (*UsePreset)(
+ SLEqualizerItf self,
+ SLuint16 index
+ );
+ SLresult (*GetNumberOfPresets)(
+ SLEqualizerItf self,
+ SLuint16 *pNumPresets
+ );
+ SLresult (*GetPresetName)(
+ SLEqualizerItf self,
+ SLuint16 index,
+ const SLchar ** ppName
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VOLUME;
+
+struct SLVolumeItf_;
+typedef const struct SLVolumeItf_ * const * SLVolumeItf;
+
+struct SLVolumeItf_ {
+ SLresult (*SetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel level
+ );
+ SLresult (*GetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetMaxVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pMaxLevel
+ );
+ SLresult (*SetMute) (
+ SLVolumeItf self,
+ SLboolean mute
+ );
+ SLresult (*GetMute) (
+ SLVolumeItf self,
+ SLboolean *pMute
+ );
+ SLresult (*EnableStereoPosition) (
+ SLVolumeItf self,
+ SLboolean enable
+ );
+ SLresult (*IsEnabledStereoPosition) (
+ SLVolumeItf self,
+ SLboolean *pEnable
+ );
+ SLresult (*SetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille stereoPosition
+ );
+ SLresult (*GetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille *pStereoPosition
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Device Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DEVICEVOLUME;
+
+struct SLDeviceVolumeItf_;
+typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
+
+struct SLDeviceVolumeItf_ {
+ SLresult (*GetVolumeScale) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pMinValue,
+ SLint32 *pMaxValue,
+ SLboolean *pIsMillibelScale
+ );
+ SLresult (*SetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 volume
+ );
+ SLresult (*GetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pVolume
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_BUFFERQUEUE;
+
+struct SLBufferQueueItf_;
+typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
+
+typedef void (/*SLAPIENTRY*/ *slBufferQueueCallback)(
+ SLBufferQueueItf caller,
+ void *pContext
+);
+
+/** Buffer queue state **/
+
+typedef struct SLBufferQueueState_ {
+ SLuint32 count;
+ SLuint32 playIndex;
+} SLBufferQueueState;
+
+
+struct SLBufferQueueItf_ {
+ SLresult (*Enqueue) (
+ SLBufferQueueItf self,
+ const void *pBuffer,
+ SLuint32 size
+ );
+ SLresult (*Clear) (
+ SLBufferQueueItf self
+ );
+ SLresult (*GetState) (
+ SLBufferQueueItf self,
+ SLBufferQueueState *pState
+ );
+ SLresult (*RegisterCallback) (
+ SLBufferQueueItf self,
+ slBufferQueueCallback callback,
+ void* pContext
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* PresetReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
+#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
+#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
+#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
+#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
+#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
+#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PRESETREVERB;
+
+struct SLPresetReverbItf_;
+typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
+
+struct SLPresetReverbItf_ {
+ SLresult (*SetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 preset
+ );
+ SLresult (*GetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 *pPreset
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* EnvironmentalReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
+ { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
+ { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
+ { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
+ { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
+ { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
+ { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
+ { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
+ { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
+ { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
+ { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
+ { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
+ { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
+ { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
+ { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
+ { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
+ { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
+ { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
+ { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
+ { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
+ { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
+ { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
+ { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
+ { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
+ { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
+ { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
+ { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
+ { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
+ { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
+ { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
+ { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
+
+
+typedef struct SLEnvironmentalReverbSettings_ {
+ SLmillibel roomLevel;
+ SLmillibel roomHFLevel;
+ SLmillisecond decayTime;
+ SLpermille decayHFRatio;
+ SLmillibel reflectionsLevel;
+ SLmillisecond reflectionsDelay;
+ SLmillibel reverbLevel;
+ SLmillisecond reverbDelay;
+ SLpermille diffusion;
+ SLpermille density;
+} SLEnvironmentalReverbSettings;
+
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
+
+
+struct SLEnvironmentalReverbItf_;
+typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
+
+struct SLEnvironmentalReverbItf_ {
+ SLresult (*SetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel room
+ );
+ SLresult (*GetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoom
+ );
+ SLresult (*SetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel roomHF
+ );
+ SLresult (*GetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoomHF
+ );
+ SLresult (*SetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond decayTime
+ );
+ SLresult (*GetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pDecayTime
+ );
+ SLresult (*SetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille decayHFRatio
+ );
+ SLresult (*GetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDecayHFRatio
+ );
+ SLresult (*SetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reflectionsLevel
+ );
+ SLresult (*GetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReflectionsLevel
+ );
+ SLresult (*SetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reflectionsDelay
+ );
+ SLresult (*GetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReflectionsDelay
+ );
+ SLresult (*SetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reverbLevel
+ );
+ SLresult (*GetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReverbLevel
+ );
+ SLresult (*SetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reverbDelay
+ );
+ SLresult (*GetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReverbDelay
+ );
+ SLresult (*SetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille diffusion
+ );
+ SLresult (*GetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDiffusion
+ );
+ SLresult (*SetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille density
+ );
+ SLresult (*GetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDensity
+ );
+ SLresult (*SetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ const SLEnvironmentalReverbSettings *pProperties
+ );
+ SLresult (*GetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ SLEnvironmentalReverbSettings *pProperties
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Effects Send Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_EFFECTSEND;
+
+struct SLEffectSendItf_;
+typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
+
+struct SLEffectSendItf_ {
+ SLresult (*EnableEffectSend) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLboolean enable,
+ SLmillibel initialLevel
+ );
+ SLresult (*IsEnabled) (
+ SLEffectSendItf self,
+ const void * pAuxEffect,
+ SLboolean *pEnable
+ );
+ SLresult (*SetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel directLevel
+ );
+ SLresult (*GetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel *pDirectLevel
+ );
+ SLresult (*SetSendLevel) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel sendLevel
+ );
+ SLresult (*GetSendLevel)(
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel *pSendLevel
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Grouping Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DGROUPING;
+
+
+struct SL3DGroupingItf_ ;
+typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
+
+struct SL3DGroupingItf_ {
+ SLresult (*Set3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf group
+ );
+ SLresult (*Get3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf *pGroup
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Commit Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DCOMMIT;
+
+struct SL3DCommitItf_;
+typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
+
+struct SL3DCommitItf_ {
+ SLresult (*Commit) (
+ SL3DCommitItf self
+ );
+ SLresult (*SetDeferred) (
+ SL3DCommitItf self,
+ SLboolean deferred
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Location Interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVec3D_ {
+ SLint32 x;
+ SLint32 y;
+ SLint32 z;
+} SLVec3D;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DLOCATION;
+
+struct SL3DLocationItf_;
+typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
+
+struct SL3DLocationItf_ {
+ SLresult (*SetLocationCartesian) (
+ SL3DLocationItf self,
+ const SLVec3D *pLocation
+ );
+ SLresult (*SetLocationSpherical) (
+ SL3DLocationItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter distance
+ );
+ SLresult (*Move) (
+ SL3DLocationItf self,
+ const SLVec3D *pMovement
+ );
+ SLresult (*GetLocationCartesian) (
+ SL3DLocationItf self,
+ SLVec3D *pLocation
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DLocationItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DLocationItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*Rotate) (
+ SL3DLocationItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DLocationItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Doppler Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DDOPPLER;
+
+struct SL3DDopplerItf_;
+typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
+
+struct SL3DDopplerItf_ {
+ SLresult (*SetVelocityCartesian) (
+ SL3DDopplerItf self,
+ const SLVec3D *pVelocity
+ );
+ SLresult (*SetVelocitySpherical) (
+ SL3DDopplerItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter speed
+ );
+ SLresult (*GetVelocityCartesian) (
+ SL3DDopplerItf self,
+ SLVec3D *pVelocity
+ );
+ SLresult (*SetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille dopplerFactor
+ );
+ SLresult (*GetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille *pDopplerFactor
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Source Interface and associated defines */
+/* --------------------------------------------------------------------------*/
+
+#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
+#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DSOURCE;
+
+struct SL3DSourceItf_;
+typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
+
+struct SL3DSourceItf_ {
+ SLresult (*SetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean headRelative
+ );
+ SLresult (*GetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean *pHeadRelative
+ );
+ SLresult (*SetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter minDistance,
+ SLmillimeter maxDistance
+ );
+ SLresult (*GetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter *pMinDistance,
+ SLmillimeter *pMaxDistance
+ );
+ SLresult (*SetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean mute
+ );
+ SLresult (*GetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean *pMute
+ );
+ SLresult (*SetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille rolloffFactor
+ );
+ SLresult (*GetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRolloffFactor
+ );
+ SLresult (*SetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille roomRolloffFactor
+ );
+ SLresult (*GetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRoomRolloffFactor
+ );
+ SLresult (*SetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 model
+ );
+ SLresult (*GetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 *pModel
+ );
+ SLresult (*SetCone) (
+ SL3DSourceItf self,
+ SLmillidegree innerAngle,
+ SLmillidegree outerAngle,
+ SLmillibel outerLevel
+ );
+ SLresult (*GetCone) (
+ SL3DSourceItf self,
+ SLmillidegree *pInnerAngle,
+ SLmillidegree *pOuterAngle,
+ SLmillibel *pOuterLevel
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Macroscopic Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_3DMACROSCOPIC;
+
+struct SL3DMacroscopicItf_;
+typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
+
+struct SL3DMacroscopicItf_ {
+ SLresult (*SetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter width,
+ SLmillimeter height,
+ SLmillimeter depth
+ );
+ SLresult (*GetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter *pWidth,
+ SLmillimeter *pHeight,
+ SLmillimeter *pDepth
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DMacroscopicItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*Rotate) (
+ SL3DMacroscopicItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Mute Solo Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MUTESOLO;
+
+struct SLMuteSoloItf_;
+typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
+
+struct SLMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pSolo
+ );
+ SLresult (*GetNumChannels) (
+ SLMuteSoloItf self,
+ SLuint8 *pNumChannels
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Interface Management Interface and associated types and macros */
+/* --------------------------------------------------------------------------*/
+
+#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
+
+
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
+
+struct SLDynamicInterfaceManagementItf_;
+typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
+
+typedef void (/*SLAPIENTRY*/ *slDynamicInterfaceManagementCallback) (
+ SLDynamicInterfaceManagementItf caller,
+ void * pContext,
+ SLuint32 event,
+ SLresult result,
+ const SLInterfaceID iid
+);
+
+
+struct SLDynamicInterfaceManagementItf_ {
+ SLresult (*AddInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RemoveInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid
+ );
+ SLresult (*ResumeInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RegisterCallback) (
+ SLDynamicInterfaceManagementItf self,
+ slDynamicInterfaceManagementCallback callback,
+ void * pContext
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Midi Message Interface and associated types */
+/* --------------------------------------------------------------------------*/
+
+#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
+#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
+#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
+#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
+#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
+#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
+#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDIMESSAGE;
+
+struct SLMIDIMessageItf_;
+typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
+
+typedef void (/*SLAPIENTRY*/ *slMetaEventCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 type,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+typedef void (/*SLAPIENTRY*/ *slMIDIMessageCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 statusByte,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+struct SLMIDIMessageItf_ {
+ SLresult (*SendMessage) (
+ SLMIDIMessageItf self,
+ const SLuint8 *data,
+ SLuint32 length
+ );
+ SLresult (*RegisterMetaEventCallback) (
+ SLMIDIMessageItf self,
+ slMetaEventCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterMIDIMessageCallback) (
+ SLMIDIMessageItf self,
+ slMIDIMessageCallback callback,
+ void *pContext
+ );
+ SLresult (*AddMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self,
+ SLuint32 messageType
+ );
+ SLresult (*ClearMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Mute Solo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDIMUTESOLO;
+
+struct SLMIDIMuteSoloItf_;
+typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
+
+struct SLMIDIMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pSolo
+ );
+ SLresult (*GetTrackCount) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 *pCount
+ );
+ SLresult (*SetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean mute
+ );
+ SLresult (*GetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pMute
+ );
+ SLresult (*SetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean solo
+ );
+ SLresult (*GetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pSolo
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Tempo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDITEMPO;
+
+struct SLMIDITempoItf_;
+typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
+
+struct SLMIDITempoItf_ {
+ SLresult (*SetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 tpqn
+ );
+ SLresult (*GetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 *pTpqn
+ );
+ SLresult (*SetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond uspqn
+ );
+ SLresult (*GetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond *uspqn
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Time interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_MIDITIME;
+
+struct SLMIDITimeItf_;
+typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
+
+struct SLMIDITimeItf_ {
+ SLresult (*GetDuration) (
+ SLMIDITimeItf self,
+ SLuint32 *pDuration
+ );
+ SLresult (*SetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 position
+ );
+ SLresult (*GetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 *pPosition
+ );
+ SLresult (*SetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 startTick,
+ SLuint32 numTicks
+ );
+ SLresult (*GetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 *pStartTick,
+ SLuint32 *pNumTicks
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Decoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/*Audio Codec related defines*/
+
+#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
+#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
+
+#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
+#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
+#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
+#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
+#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
+#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
+#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
+#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
+
+#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
+#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
+#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
+#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
+
+#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
+
+#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
+
+#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
+#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
+#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
+
+#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
+#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
+
+#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
+#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
+
+#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
+
+typedef struct SLAudioCodecDescriptor_ {
+ SLuint32 maxChannels;
+ SLuint32 minBitsPerSample;
+ SLuint32 maxBitsPerSample;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *pSampleRatesSupported;
+ SLuint32 numSampleRatesSupported;
+ SLuint32 minBitRate;
+ SLuint32 maxBitRate;
+ SLboolean isBitrateRangeContinuous;
+ SLuint32 *pBitratesSupported;
+ SLuint32 numBitratesSupported;
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecDescriptor;
+
+/*Structure used to retrieve the profile and level settings supported by an audio encoder */
+
+typedef struct SLAudioCodecProfileMode_ {
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecProfileMode;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
+
+struct SLAudioDecoderCapabilitiesItf_;
+typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
+
+struct SLAudioDecoderCapabilitiesItf_ {
+ SLresult (*GetAudioDecoders) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 * pNumDecoders ,
+ SLuint32 *pDecoderIds
+ );
+ SLresult (*GetAudioDecoderCapabilities) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 decoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor *pDescriptor
+ );
+};
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/* Structure used when setting audio encoding parameters */
+
+typedef struct SLAudioEncoderSettings_ {
+ SLuint32 encoderId;
+ SLuint32 channelsIn;
+ SLuint32 channelsOut;
+ SLmilliHertz sampleRate;
+ SLuint32 bitRate;
+ SLuint32 bitsPerSample;
+ SLuint32 rateControl;
+ SLuint32 profileSetting;
+ SLuint32 levelSetting;
+ SLuint32 channelMode;
+ SLuint32 streamFormat;
+ SLuint32 encodeOptions;
+ SLuint32 blockAlignment;
+} SLAudioEncoderSettings;
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
+
+struct SLAudioEncoderCapabilitiesItf_;
+typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
+
+struct SLAudioEncoderCapabilitiesItf_ {
+ SLresult (*GetAudioEncoders) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 *pNumEncoders ,
+ SLuint32 *pEncoderIds
+ );
+ SLresult (*GetAudioEncoderCapabilities) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 encoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor * pDescriptor
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_AUDIOENCODER;
+
+struct SLAudioEncoderItf_;
+typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
+
+struct SLAudioEncoderItf_ {
+ SLresult (*SetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+ SLresult (*GetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Bass Boost Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_BASSBOOST;
+
+struct SLBassBoostItf_;
+typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
+
+struct SLBassBoostItf_ {
+ SLresult (*SetEnabled)(
+ SLBassBoostItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLBassBoostItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLBassBoostItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLBassBoostItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLBassBoostItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Pitch Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_PITCH;
+
+struct SLPitchItf_;
+typedef const struct SLPitchItf_ * const * SLPitchItf;
+
+struct SLPitchItf_ {
+ SLresult (*SetPitch) (
+ SLPitchItf self,
+ SLpermille pitch
+ );
+ SLresult (*GetPitch) (
+ SLPitchItf self,
+ SLpermille *pPitch
+ );
+ SLresult (*GetPitchCapabilities) (
+ SLPitchItf self,
+ SLpermille *pMinPitch,
+ SLpermille *pMaxPitch
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Rate Pitch Interface */
+/* RatePitchItf is an interface for controlling the rate a sound is played */
+/* back. A change in rate will cause a change in pitch. */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_RATEPITCH;
+
+struct SLRatePitchItf_;
+typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
+
+struct SLRatePitchItf_ {
+ SLresult (*SetRate) (
+ SLRatePitchItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate) (
+ SLRatePitchItf self,
+ SLpermille *pRate
+ );
+ SLresult (*GetRatePitchCapabilities) (
+ SLRatePitchItf self,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Virtualizer Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VIRTUALIZER;
+
+struct SLVirtualizerItf_;
+typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
+
+struct SLVirtualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLVirtualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLVirtualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLVirtualizerItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLVirtualizerItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLVirtualizerItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Visualization Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_VISUALIZATION;
+
+struct SLVisualizationItf_;
+typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
+
+typedef void (/*SLAPIENTRY*/ *slVisualizationCallback) (
+ void *pContext,
+ const SLuint8 waveform[],
+ const SLuint8 fft[],
+ SLmilliHertz samplerate
+);
+
+struct SLVisualizationItf_{
+ SLresult (*RegisterVisualizationCallback)(
+ SLVisualizationItf self,
+ slVisualizationCallback callback,
+ void *pContext,
+ SLmilliHertz rate
+ );
+ SLresult (*GetMaxRate)(
+ SLVisualizationItf self,
+ SLmilliHertz* pRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENGINE;
+
+struct SLEngineItf_;
+typedef const struct SLEngineItf_ * const * SLEngineItf;
+
+
+struct SLEngineItf_ {
+
+ SLresult (*CreateLEDDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateVibraDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioRecorder) (
+ SLEngineItf self,
+ SLObjectItf * pRecorder,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMidiPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pMIDISrc,
+ SLDataSource *pBankSrc,
+ SLDataSink *pAudioOutput,
+ SLDataSink *pVibra,
+ SLDataSink *pLEDArray,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateListener) (
+ SLEngineItf self,
+ SLObjectItf * pListener,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*Create3DGroup) (
+ SLEngineItf self,
+ SLObjectItf * pGroup,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateOutputMix) (
+ SLEngineItf self,
+ SLObjectItf * pMix,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMetadataExtractor) (
+ SLEngineItf self,
+ SLObjectItf * pMetadataExtractor,
+ SLDataSource * pDataSource,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateExtensionObject) (
+ SLEngineItf self,
+ SLObjectItf * pObject,
+ void * pParameters,
+ SLuint32 objectID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*QueryNumSupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 * pNumSupportedInterfaces
+ );
+ SLresult (*QuerySupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+ );
+ SLresult (*QueryNumSupportedExtensions) (
+ SLEngineItf self,
+ SLuint32 * pNumExtensions
+ );
+ SLresult (*QuerySupportedExtension) (
+ SLEngineItf self,
+ SLuint32 index,
+ SLchar * pExtensionName,
+ SLint16 * pNameLength
+ );
+ SLresult (*IsExtensionSupported) (
+ SLEngineItf self,
+ const SLchar * pExtensionName,
+ SLboolean * pSupported
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ENGINECAPABILITIES;
+
+struct SLEngineCapabilitiesItf_;
+typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
+
+struct SLEngineCapabilitiesItf_ {
+ SLresult (*QuerySupportedProfiles) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 *pProfilesSupported
+ );
+ SLresult (*QueryAvailableVoices) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 voiceType,
+ SLint16 *pNumMaxVoices,
+ SLboolean *pIsAbsoluteMax,
+ SLint16 *pNumFreeVoices
+ );
+ SLresult (*QueryNumberOfMIDISynthesizers) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pNumMIDIsynthesizers
+ );
+ SLresult (*QueryAPIVersion) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pMajor,
+ SLint16 *pMinor,
+ SLint16 *pStep
+ );
+ SLresult (*QueryLEDCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pLEDDeviceID,
+ SLLEDDescriptor *pDescriptor
+ );
+ SLresult (*QueryVibraCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pVibraDeviceID,
+ SLVibraDescriptor *pDescriptor
+ );
+ SLresult (*IsThreadSafe) (
+ SLEngineCapabilitiesItf self,
+ SLboolean *pIsThreadSafe
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Thread Sync Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_THREADSYNC;
+
+struct SLThreadSyncItf_;
+typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
+
+
+struct SLThreadSyncItf_ {
+ SLresult (*EnterCriticalSection) (
+ SLThreadSyncItf self
+ );
+ SLresult (*ExitCriticalSection) (
+ SLThreadSyncItf self
+ );
+};
+
+
+/*****************************************************************************/
+/* SL engine constructor */
+/*****************************************************************************/
+
+#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
+#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
+
+typedef struct SLEngineOption_ {
+ SLuint32 feature;
+ SLuint32 data;
+} SLEngineOption;
+
+
+SLresult SLAPIENTRY slCreateEngine(
+ SLObjectItf *pEngine,
+ SLuint32 numOptions,
+ const SLEngineOption *pEngineOptions,
+ SLuint32 numInterfaces,
+ const SLInterfaceID *pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+);
+
+SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
+ SLuint32 * pNumSupportedInterfaces
+);
+
+SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* OPENSL_ES_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Android.h b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Android.h
new file mode 100644
index 0000000..829df68
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Android.h
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPENSL_ES_ANDROID_H_
+#define OPENSL_ES_ANDROID_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Android common types */
+/*---------------------------------------------------------------------------*/
+
+typedef sl_int64_t SLAint64; /* 64 bit signed integer */
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECT;
+
+/** Android Effect interface methods */
+
+struct SLAndroidEffectItf_;
+typedef const struct SLAndroidEffectItf_ * const * SLAndroidEffectItf;
+
+struct SLAndroidEffectItf_ {
+
+ SLresult (*CreateEffect) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId);
+
+ SLresult (*ReleaseEffect) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId);
+
+ SLresult (*SetEnabled) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean enabled);
+
+ SLresult (*IsEnabled) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean *pEnabled);
+
+ SLresult (*SendCommand) (SLAndroidEffectItf self,
+ SLInterfaceID effectImplementationId,
+ SLuint32 command,
+ SLuint32 commandSize,
+ void *pCommandData,
+ SLuint32 *replySize,
+ void *pReplyData);
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect Send interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECTSEND;
+
+/** Android Effect Send interface methods */
+
+struct SLAndroidEffectSendItf_;
+typedef const struct SLAndroidEffectSendItf_ * const * SLAndroidEffectSendItf;
+
+struct SLAndroidEffectSendItf_ {
+ SLresult (*EnableEffectSend) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean enable,
+ SLmillibel initialLevel
+ );
+ SLresult (*IsEnabled) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLboolean *pEnable
+ );
+ SLresult (*SetDirectLevel) (
+ SLAndroidEffectSendItf self,
+ SLmillibel directLevel
+ );
+ SLresult (*GetDirectLevel) (
+ SLAndroidEffectSendItf self,
+ SLmillibel *pDirectLevel
+ );
+ SLresult (*SetSendLevel) (
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLmillibel sendLevel
+ );
+ SLresult (*GetSendLevel)(
+ SLAndroidEffectSendItf self,
+ SLInterfaceID effectImplementationId,
+ SLmillibel *pSendLevel
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Effect Capabilities interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDEFFECTCAPABILITIES;
+
+/** Android Effect Capabilities interface methods */
+
+struct SLAndroidEffectCapabilitiesItf_;
+typedef const struct SLAndroidEffectCapabilitiesItf_ * const * SLAndroidEffectCapabilitiesItf;
+
+struct SLAndroidEffectCapabilitiesItf_ {
+
+ SLresult (*QueryNumEffects) (SLAndroidEffectCapabilitiesItf self,
+ SLuint32 *pNumSupportedEffects);
+
+
+ SLresult (*QueryEffect) (SLAndroidEffectCapabilitiesItf self,
+ SLuint32 index,
+ SLInterfaceID *pEffectType,
+ SLInterfaceID *pEffectImplementation,
+ SLchar *pName,
+ SLuint16 *pNameSize);
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Configuration interface */
+/*---------------------------------------------------------------------------*/
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDCONFIGURATION;
+
+/** Android Configuration interface methods */
+
+struct SLAndroidConfigurationItf_;
+typedef const struct SLAndroidConfigurationItf_ * const * SLAndroidConfigurationItf;
+
+struct SLAndroidConfigurationItf_ {
+
+ SLresult (*SetConfiguration) (SLAndroidConfigurationItf self,
+ const SLchar *configKey,
+ const void *pConfigValue,
+ SLuint32 valueSize);
+
+ SLresult (*GetConfiguration) (SLAndroidConfigurationItf self,
+ const SLchar *configKey,
+ SLuint32 *pValueSize,
+ void *pConfigValue
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Simple Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SLAPIENTRY const SLInterfaceID SL_IID_ANDROIDSIMPLEBUFFERQUEUE;
+
+struct SLAndroidSimpleBufferQueueItf_;
+typedef const struct SLAndroidSimpleBufferQueueItf_ * const * SLAndroidSimpleBufferQueueItf;
+
+typedef void (/*SLAPIENTRY*/ *slAndroidSimpleBufferQueueCallback)(
+ SLAndroidSimpleBufferQueueItf caller,
+ void *pContext
+);
+
+/** Android simple buffer queue state **/
+
+typedef struct SLAndroidSimpleBufferQueueState_ {
+ SLuint32 count;
+ SLuint32 index;
+} SLAndroidSimpleBufferQueueState;
+
+
+struct SLAndroidSimpleBufferQueueItf_ {
+ SLresult (*Enqueue) (
+ SLAndroidSimpleBufferQueueItf self,
+ const void *pBuffer,
+ SLuint32 size
+ );
+ SLresult (*Clear) (
+ SLAndroidSimpleBufferQueueItf self
+ );
+ SLresult (*GetState) (
+ SLAndroidSimpleBufferQueueItf self,
+ SLAndroidSimpleBufferQueueState *pState
+ );
+ SLresult (*RegisterCallback) (
+ SLAndroidSimpleBufferQueueItf self,
+ slAndroidSimpleBufferQueueCallback callback,
+ void* pContext
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android File Descriptor Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define SL_DATALOCATOR_ANDROIDFD ((SLuint32) 0x800007BC)
+
+#define SL_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE ((SLAint64) 0xFFFFFFFFFFFFFFFFll)
+
+/** File Descriptor-based data locator definition, locatorType must be SL_DATALOCATOR_ANDROIDFD */
+typedef struct SLDataLocator_AndroidFD_ {
+ SLuint32 locatorType;
+ SLint32 fd;
+ SLAint64 offset;
+ SLAint64 length;
+} SLDataLocator_AndroidFD;
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Android Simple Buffer Queue Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE ((SLuint32) 0x800007BD)
+
+/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE*/
+typedef struct SLDataLocator_AndroidSimpleBufferQueue {
+ SLuint32 locatorType;
+ SLuint32 numBuffers;
+} SLDataLocator_AndroidSimpleBufferQueue;
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROID_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_AndroidConfiguration.h b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_AndroidConfiguration.h
new file mode 100644
index 0000000..bff6410
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_AndroidConfiguration.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_
+#define OPENSL_ES_ANDROIDCONFIGURATION_H_
+
+#ifdef __cplusplus
+extern "C" {
+
+/*---------------------------------------------------------------------------*/
+/* Android AudioRecorder configuration */
+/*---------------------------------------------------------------------------*/
+
+/** Audio recording preset */
+/** Audio recording preset key */
+#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
+/** Audio recording preset values */
+/** preset "none" cannot be set, it is used to indicate the current settings
+ * do not match any of the presets. */
+#define SL_ANDROID_RECORDING_PRESET_NONE ((SLuint32) 0x00000000)
+/** generic recording configuration on the platform */
+#define SL_ANDROID_RECORDING_PRESET_GENERIC ((SLuint32) 0x00000001)
+/** uses the microphone audio source with the same orientation as the camera
+ * if available, the main device microphone otherwise */
+#define SL_ANDROID_RECORDING_PRESET_CAMCORDER ((SLuint32) 0x00000002)
+/** uses the main microphone tuned for voice recognition */
+#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003)
+
+/*---------------------------------------------------------------------------*/
+/* Android AudioPlayer configuration */
+/*---------------------------------------------------------------------------*/
+
+/** Audio playback stream type */
+/** Audio playback stream type key */
+#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
+
+/** Audio playback stream type values */
+/* same as android.media.AudioManager.STREAM_VOICE_CALL */
+#define SL_ANDROID_STREAM_VOICE ((SLint32) 0x00000000)
+/* same as android.media.AudioManager.STREAM_SYSTEM */
+#define SL_ANDROID_STREAM_SYSTEM ((SLint32) 0x00000001)
+/* same as android.media.AudioManager.STREAM_RING */
+#define SL_ANDROID_STREAM_RING ((SLint32) 0x00000002)
+/* same as android.media.AudioManager.STREAM_MUSIC */
+#define SL_ANDROID_STREAM_MEDIA ((SLint32) 0x00000003)
+/* same as android.media.AudioManager.STREAM_ALARM */
+#define SL_ANDROID_STREAM_ALARM ((SLint32) 0x00000004)
+/* same as android.media.AudioManager.STREAM_NOTIFICATION */
+#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
+
+
+
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Platform.h b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Platform.h
new file mode 100644
index 0000000..ea401a7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/SLES/OpenSLES_Platform.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and /or associated documentation files (the "Materials "), to
+ * deal in the Materials without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Materials, and to permit persons to whom the Materials are
+ * 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 Materials.
+ *
+ * THE MATERIALS ARE 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
+ * AUTHORS OR COPYRIGHT HOLDERS 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 MATERIALS OR THE USE OR OTHER DEALINGS IN THE
+ * MATERIALS.
+ *
+ * OpenSLES_Platform.h - OpenSL ES version 1.0
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file contains definitions for the base types and the */
+/* SLAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */
+/* the correct definitions specific to the platform being used. */
+/****************************************************************************/
+
+#ifndef _OPENSLES_PLATFORM_H_
+#define _OPENSLES_PLATFORM_H_
+
+typedef unsigned char sl_uint8_t;
+typedef signed char sl_int8_t;
+typedef unsigned short sl_uint16_t;
+typedef signed short sl_int16_t;
+typedef unsigned long sl_uint32_t;
+typedef signed long sl_int32_t;
+typedef long long sl_int64_t;
+
+#ifndef SLAPIENTRY
+#ifdef __GNUC__
+#define SLAPIENTRY /* override per-platform */
+#else
+#define SLAPIENTRY __declspec(dllimport)
+#endif
+#endif
+
+#endif /* _OPENSLES_PLATFORM_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/alloca.h b/6/platforms/android-9/arch-x86/usr/include/alloca.h
new file mode 120000
index 0000000..d46967c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/alloca.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/alloca.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/api-level.h b/6/platforms/android-9/arch-x86/usr/include/android/api-level.h
new file mode 100644
index 0000000..a644a66
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/api-level.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef ANDROID_API_LEVEL_H
+#define ANDROID_API_LEVEL_H
+
+#define __ANDROID_API__ 9
+
+#endif /* ANDROID_API_LEVEL_H */
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/asset_manager.h b/6/platforms/android-9/arch-x86/usr/include/android/asset_manager.h
new file mode 100644
index 0000000..4fa0ef3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/asset_manager.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_ASSET_MANAGER_H
+#define ANDROID_ASSET_MANAGER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AAssetManager;
+typedef struct AAssetManager AAssetManager;
+
+struct AAssetDir;
+typedef struct AAssetDir AAssetDir;
+
+struct AAsset;
+typedef struct AAsset AAsset;
+
+/* Available modes for opening assets */
+enum {
+ AASSET_MODE_UNKNOWN = 0,
+ AASSET_MODE_RANDOM = 1,
+ AASSET_MODE_STREAMING = 2,
+ AASSET_MODE_BUFFER = 3
+};
+
+
+/**
+ * Open the named directory within the asset hierarchy. The directory can then
+ * be inspected with the AAssetDir functions. To open the top-level directory,
+ * pass in "" as the dirName.
+ *
+ * The object returned here should be freed by calling AAssetDir_close().
+ */
+AAssetDir* AAssetManager_openDir(AAssetManager* mgr, const char* dirName);
+
+/**
+ * Open an asset.
+ *
+ * The object returned here should be freed by calling AAsset_close().
+ */
+AAsset* AAssetManager_open(AAssetManager* mgr, const char* filename, int mode);
+
+/**
+ * Iterate over the files in an asset directory. A NULL string is returned
+ * when all the file names have been returned.
+ *
+ * The returned file name is suitable for passing to AAssetManager_open().
+ *
+ * The string returned here is owned by the AssetDir implementation and is not
+ * guaranteed to remain valid if any other calls are made on this AAssetDir
+ * instance.
+ */
+const char* AAssetDir_getNextFileName(AAssetDir* assetDir);
+
+/**
+ * Reset the iteration state of AAssetDir_getNextFileName() to the beginning.
+ */
+void AAssetDir_rewind(AAssetDir* assetDir);
+
+/**
+ * Close an opened AAssetDir, freeing any related resources.
+ */
+void AAssetDir_close(AAssetDir* assetDir);
+
+/**
+ * Attempt to read 'count' bytes of data from the current offset.
+ *
+ * Returns the number of bytes read, zero on EOF, or < 0 on error.
+ */
+int AAsset_read(AAsset* asset, void* buf, size_t count);
+
+/**
+ * Seek to the specified offset within the asset data. 'whence' uses the
+ * same constants as lseek()/fseek().
+ *
+ * Returns the new position on success, or (off_t) -1 on error.
+ */
+off_t AAsset_seek(AAsset* asset, off_t offset, int whence);
+
+/**
+ * Close the asset, freeing all associated resources.
+ */
+void AAsset_close(AAsset* asset);
+
+/**
+ * Get a pointer to a buffer holding the entire contents of the assset.
+ *
+ * Returns NULL on failure.
+ */
+const void* AAsset_getBuffer(AAsset* asset);
+
+/**
+ * Report the total size of the asset data.
+ */
+off_t AAsset_getLength(AAsset* asset);
+
+/**
+ * Report the total amount of asset data that can be read from the current position.
+ */
+off_t AAsset_getRemainingLength(AAsset* asset);
+
+/**
+ * Open a new file descriptor that can be used to read the asset data.
+ *
+ * Returns < 0 if direct fd access is not possible (for example, if the asset is
+ * compressed).
+ */
+int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
+
+/**
+ * Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
+ * mmapped).
+ */
+int AAsset_isAllocated(AAsset* asset);
+
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_ASSET_MANAGER_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/asset_manager_jni.h b/6/platforms/android-9/arch-x86/usr/include/android/asset_manager_jni.h
new file mode 100644
index 0000000..aec2d3c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/asset_manager_jni.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_ASSET_MANAGER_JNI_H
+#define ANDROID_ASSET_MANAGER_JNI_H
+
+#include <android/asset_manager.h>
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager
+ * object. Note that the caller is responsible for obtaining and holding a VM reference
+ * to the jobject to prevent its being garbage collected while the native object is
+ * in use.
+ */
+AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_ASSET_MANAGER_JNI_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/bitmap.h b/6/platforms/android-9/arch-x86/usr/include/android/bitmap.h
new file mode 100644
index 0000000..160e34a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/bitmap.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_BITMAP_H
+#define ANDROID_BITMAP_H
+
+#include <sys/cdefs.h>
+#include <stdint.h>
+#include <jni.h>
+
+__BEGIN_DECLS
+
+#define ANDROID_BITMAP_RESUT_SUCCESS 0
+#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1
+#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2
+#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3
+
+enum AndroidBitmapFormat {
+ ANDROID_BITMAP_FORMAT_NONE = 0,
+ ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
+ ANDROID_BITMAP_FORMAT_RGB_565 = 4,
+ ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
+ ANDROID_BITMAP_FORMAT_A_8 = 8,
+};
+
+typedef struct {
+ uint32_t width;
+ uint32_t height;
+ uint32_t stride;
+ int32_t format;
+ uint32_t flags; // 0 for now
+} AndroidBitmapInfo;
+
+/**
+ * Given a java bitmap object, fill out the AndroidBitmap struct for it.
+ * If the call fails, the info parameter will be ignored
+ */
+int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
+ AndroidBitmapInfo* info);
+
+/**
+ * Given a java bitmap object, attempt to lock the pixel address.
+ * Locking will ensure that the memory for the pixels will not move
+ * until the unlockPixels call, and ensure that, if the pixels had been
+ * previously purged, they will have been restored.
+ *
+ * If this call succeeds, it must be balanced by a call to
+ * AndroidBitmap_unlockPixels, after which time the address of the pixels should
+ * no longer be used.
+ *
+ * If this succeeds, *addrPtr will be set to the pixel address. If the call
+ * fails, addrPtr will be ignored.
+ */
+int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
+
+/**
+ * Call this to balanace a successful call to AndroidBitmap_lockPixels
+ */
+int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
+
+__END_DECLS
+
+#endif /* ANDROID_BITMAP_H */
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/configuration.h b/6/platforms/android-9/arch-x86/usr/include/android/configuration.h
new file mode 100644
index 0000000..99e8f97
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/configuration.h
@@ -0,0 +1,319 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_CONFIGURATION_H
+#define ANDROID_CONFIGURATION_H
+
+#include <android/asset_manager.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AConfiguration;
+typedef struct AConfiguration AConfiguration;
+
+enum {
+ ACONFIGURATION_ORIENTATION_ANY = 0x0000,
+ ACONFIGURATION_ORIENTATION_PORT = 0x0001,
+ ACONFIGURATION_ORIENTATION_LAND = 0x0002,
+ ACONFIGURATION_ORIENTATION_SQUARE = 0x0003,
+
+ ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000,
+ ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001,
+ ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002,
+ ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003,
+
+ ACONFIGURATION_DENSITY_DEFAULT = 0,
+ ACONFIGURATION_DENSITY_LOW = 120,
+ ACONFIGURATION_DENSITY_MEDIUM = 160,
+ ACONFIGURATION_DENSITY_HIGH = 240,
+ ACONFIGURATION_DENSITY_NONE = 0xffff,
+
+ ACONFIGURATION_KEYBOARD_ANY = 0x0000,
+ ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001,
+ ACONFIGURATION_KEYBOARD_QWERTY = 0x0002,
+ ACONFIGURATION_KEYBOARD_12KEY = 0x0003,
+
+ ACONFIGURATION_NAVIGATION_ANY = 0x0000,
+ ACONFIGURATION_NAVIGATION_NONAV = 0x0001,
+ ACONFIGURATION_NAVIGATION_DPAD = 0x0002,
+ ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003,
+ ACONFIGURATION_NAVIGATION_WHEEL = 0x0004,
+
+ ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000,
+ ACONFIGURATION_KEYSHIDDEN_NO = 0x0001,
+ ACONFIGURATION_KEYSHIDDEN_YES = 0x0002,
+ ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003,
+
+ ACONFIGURATION_NAVHIDDEN_ANY = 0x0000,
+ ACONFIGURATION_NAVHIDDEN_NO = 0x0001,
+ ACONFIGURATION_NAVHIDDEN_YES = 0x0002,
+
+ ACONFIGURATION_SCREENSIZE_ANY = 0x00,
+ ACONFIGURATION_SCREENSIZE_SMALL = 0x01,
+ ACONFIGURATION_SCREENSIZE_NORMAL = 0x02,
+ ACONFIGURATION_SCREENSIZE_LARGE = 0x03,
+ ACONFIGURATION_SCREENSIZE_XLARGE = 0x04,
+
+ ACONFIGURATION_SCREENLONG_ANY = 0x00,
+ ACONFIGURATION_SCREENLONG_NO = 0x1,
+ ACONFIGURATION_SCREENLONG_YES = 0x2,
+
+ ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00,
+ ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
+ ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
+ ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
+
+ ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
+ ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
+ ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2,
+
+ ACONFIGURATION_MCC = 0x0001,
+ ACONFIGURATION_MNC = 0x0002,
+ ACONFIGURATION_LOCALE = 0x0004,
+ ACONFIGURATION_TOUCHSCREEN = 0x0008,
+ ACONFIGURATION_KEYBOARD = 0x0010,
+ ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020,
+ ACONFIGURATION_NAVIGATION = 0x0040,
+ ACONFIGURATION_ORIENTATION = 0x0080,
+ ACONFIGURATION_DENSITY = 0x0100,
+ ACONFIGURATION_SCREEN_SIZE = 0x0200,
+ ACONFIGURATION_VERSION = 0x0400,
+ ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
+ ACONFIGURATION_UI_MODE = 0x1000,
+};
+
+/**
+ * Create a new AConfiguration, initialized with no values set.
+ */
+AConfiguration* AConfiguration_new();
+
+/**
+ * Free an AConfiguration that was previously created with
+ * AConfiguration_new().
+ */
+void AConfiguration_delete(AConfiguration* config);
+
+/**
+ * Create and return a new AConfiguration based on the current configuration in
+ * use in the given AssetManager.
+ */
+void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am);
+
+/**
+ * Copy the contents of 'src' to 'dest'.
+ */
+void AConfiguration_copy(AConfiguration* dest, AConfiguration* src);
+
+/**
+ * Return the current MCC set in the configuration. 0 if not set.
+ */
+int32_t AConfiguration_getMcc(AConfiguration* config);
+
+/**
+ * Set the current MCC in the configuration. 0 to clear.
+ */
+void AConfiguration_setMcc(AConfiguration* config, int32_t mcc);
+
+/**
+ * Return the current MNC set in the configuration. 0 if not set.
+ */
+int32_t AConfiguration_getMnc(AConfiguration* config);
+
+/**
+ * Set the current MNC in the configuration. 0 to clear.
+ */
+void AConfiguration_setMnc(AConfiguration* config, int32_t mnc);
+
+/**
+ * Return the current language code set in the configuration. The output will
+ * be filled with an array of two characters. They are not 0-terminated. If
+ * a language is not set, they will be 0.
+ */
+void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage);
+
+/**
+ * Set the current language code in the configuration, from the first two
+ * characters in the string.
+ */
+void AConfiguration_setLanguage(AConfiguration* config, const char* language);
+
+/**
+ * Return the current country code set in the configuration. The output will
+ * be filled with an array of two characters. They are not 0-terminated. If
+ * a country is not set, they will be 0.
+ */
+void AConfiguration_getCountry(AConfiguration* config, char* outCountry);
+
+/**
+ * Set the current country code in the configuration, from the first two
+ * characters in the string.
+ */
+void AConfiguration_setCountry(AConfiguration* config, const char* country);
+
+/**
+ * Return the current ACONFIGURATION_ORIENTATION_* set in the configuration.
+ */
+int32_t AConfiguration_getOrientation(AConfiguration* config);
+
+/**
+ * Set the current orientation in the configuration.
+ */
+void AConfiguration_setOrientation(AConfiguration* config, int32_t orientation);
+
+/**
+ * Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration.
+ */
+int32_t AConfiguration_getTouchscreen(AConfiguration* config);
+
+/**
+ * Set the current touchscreen in the configuration.
+ */
+void AConfiguration_setTouchscreen(AConfiguration* config, int32_t touchscreen);
+
+/**
+ * Return the current ACONFIGURATION_DENSITY_* set in the configuration.
+ */
+int32_t AConfiguration_getDensity(AConfiguration* config);
+
+/**
+ * Set the current density in the configuration.
+ */
+void AConfiguration_setDensity(AConfiguration* config, int32_t density);
+
+/**
+ * Return the current ACONFIGURATION_KEYBOARD_* set in the configuration.
+ */
+int32_t AConfiguration_getKeyboard(AConfiguration* config);
+
+/**
+ * Set the current keyboard in the configuration.
+ */
+void AConfiguration_setKeyboard(AConfiguration* config, int32_t keyboard);
+
+/**
+ * Return the current ACONFIGURATION_NAVIGATION_* set in the configuration.
+ */
+int32_t AConfiguration_getNavigation(AConfiguration* config);
+
+/**
+ * Set the current navigation in the configuration.
+ */
+void AConfiguration_setNavigation(AConfiguration* config, int32_t navigation);
+
+/**
+ * Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration.
+ */
+int32_t AConfiguration_getKeysHidden(AConfiguration* config);
+
+/**
+ * Set the current keys hidden in the configuration.
+ */
+void AConfiguration_setKeysHidden(AConfiguration* config, int32_t keysHidden);
+
+/**
+ * Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration.
+ */
+int32_t AConfiguration_getNavHidden(AConfiguration* config);
+
+/**
+ * Set the current nav hidden in the configuration.
+ */
+void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden);
+
+/**
+ * Return the current SDK (API) version set in the configuration.
+ */
+int32_t AConfiguration_getSdkVersion(AConfiguration* config);
+
+/**
+ * Set the current SDK version in the configuration.
+ */
+void AConfiguration_setSdkVersion(AConfiguration* config, int32_t sdkVersion);
+
+/**
+ * Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration.
+ */
+int32_t AConfiguration_getScreenSize(AConfiguration* config);
+
+/**
+ * Set the current screen size in the configuration.
+ */
+void AConfiguration_setScreenSize(AConfiguration* config, int32_t screenSize);
+
+/**
+ * Return the current ACONFIGURATION_SCREENLONG_* set in the configuration.
+ */
+int32_t AConfiguration_getScreenLong(AConfiguration* config);
+
+/**
+ * Set the current screen long in the configuration.
+ */
+void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong);
+
+/**
+ * Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration.
+ */
+int32_t AConfiguration_getUiModeType(AConfiguration* config);
+
+/**
+ * Set the current UI mode type in the configuration.
+ */
+void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType);
+
+/**
+ * Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration.
+ */
+int32_t AConfiguration_getUiModeNight(AConfiguration* config);
+
+/**
+ * Set the current UI mode night in the configuration.
+ */
+void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight);
+
+/**
+ * Perform a diff between two configurations. Returns a bit mask of
+ * ACONFIGURATION_* constants, each bit set meaning that configuration element
+ * is different between them.
+ */
+int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2);
+
+/**
+ * Determine whether 'base' is a valid configuration for use within the
+ * environment 'requested'. Returns 0 if there are any values in 'base'
+ * that conflict with 'requested'. Returns 1 if it does not conflict.
+ */
+int32_t AConfiguration_match(AConfiguration* base, AConfiguration* requested);
+
+/**
+ * Determine whether the configuration in 'test' is better than the existing
+ * configuration in 'base'. If 'requested' is non-NULL, this decision is based
+ * on the overall configuration given there. If it is NULL, this decision is
+ * simply based on which configuration is more specific. Returns non-0 if
+ * 'test' is better than 'base'.
+ *
+ * This assumes you have already filtered the configurations with
+ * AConfiguration_match().
+ */
+int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test,
+ AConfiguration* requested);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_CONFIGURATION_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/input.h b/6/platforms/android-9/arch-x86/usr/include/android/input.h
new file mode 100644
index 0000000..9449574
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/input.h
@@ -0,0 +1,688 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_INPUT_H
+#define _ANDROID_INPUT_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process input events in
+ * native code.
+ *
+ * NOTE: These functions MUST be implemented by /system/lib/libui.so
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <android/keycodes.h>
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key states (may be returned by queries about the current state of a
+ * particular key code, scan code or switch).
+ */
+enum {
+ /* The key state is unknown or the requested key itself is not supported. */
+ AKEY_STATE_UNKNOWN = -1,
+
+ /* The key is up. */
+ AKEY_STATE_UP = 0,
+
+ /* The key is down. */
+ AKEY_STATE_DOWN = 1,
+
+ /* The key is down but is a virtual key press that is being emulated by the system. */
+ AKEY_STATE_VIRTUAL = 2
+};
+
+/*
+ * Meta key / modifer state.
+ */
+enum {
+ /* No meta keys are pressed. */
+ AMETA_NONE = 0,
+
+ /* This mask is used to check whether one of the ALT meta keys is pressed. */
+ AMETA_ALT_ON = 0x02,
+
+ /* This mask is used to check whether the left ALT meta key is pressed. */
+ AMETA_ALT_LEFT_ON = 0x10,
+
+ /* This mask is used to check whether the right ALT meta key is pressed. */
+ AMETA_ALT_RIGHT_ON = 0x20,
+
+ /* This mask is used to check whether one of the SHIFT meta keys is pressed. */
+ AMETA_SHIFT_ON = 0x01,
+
+ /* This mask is used to check whether the left SHIFT meta key is pressed. */
+ AMETA_SHIFT_LEFT_ON = 0x40,
+
+ /* This mask is used to check whether the right SHIFT meta key is pressed. */
+ AMETA_SHIFT_RIGHT_ON = 0x80,
+
+ /* This mask is used to check whether the SYM meta key is pressed. */
+ AMETA_SYM_ON = 0x04
+};
+
+/*
+ * Input events.
+ *
+ * Input events are opaque structures. Use the provided accessors functions to
+ * read their properties.
+ */
+struct AInputEvent;
+typedef struct AInputEvent AInputEvent;
+
+/*
+ * Input event types.
+ */
+enum {
+ /* Indicates that the input event is a key event. */
+ AINPUT_EVENT_TYPE_KEY = 1,
+
+ /* Indicates that the input event is a motion event. */
+ AINPUT_EVENT_TYPE_MOTION = 2
+};
+
+/*
+ * Key event actions.
+ */
+enum {
+ /* The key has been pressed down. */
+ AKEY_EVENT_ACTION_DOWN = 0,
+
+ /* The key has been released. */
+ AKEY_EVENT_ACTION_UP = 1,
+
+ /* Multiple duplicate key events have occurred in a row, or a complex string is
+ * being delivered. The repeat_count property of the key event contains the number
+ * of times the given key code should be executed.
+ */
+ AKEY_EVENT_ACTION_MULTIPLE = 2
+};
+
+/*
+ * Key event flags.
+ */
+enum {
+ /* This mask is set if the device woke because of this key event. */
+ AKEY_EVENT_FLAG_WOKE_HERE = 0x1,
+
+ /* This mask is set if the key event was generated by a software keyboard. */
+ AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2,
+
+ /* This mask is set if we don't want the key event to cause us to leave touch mode. */
+ AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4,
+
+ /* This mask is set if an event was known to come from a trusted part
+ * of the system. That is, the event is known to come from the user,
+ * and could not have been spoofed by a third party component. */
+ AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8,
+
+ /* This mask is used for compatibility, to identify enter keys that are
+ * coming from an IME whose enter key has been auto-labelled "next" or
+ * "done". This allows TextView to dispatch these as normal enter keys
+ * for old applications, but still do the appropriate action when
+ * receiving them. */
+ AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10,
+
+ /* When associated with up key events, this indicates that the key press
+ * has been canceled. Typically this is used with virtual touch screen
+ * keys, where the user can slide from the virtual key area on to the
+ * display: in that case, the application will receive a canceled up
+ * event and should not perform the action normally associated with the
+ * key. Note that for this to work, the application can not perform an
+ * action for a key until it receives an up or the long press timeout has
+ * expired. */
+ AKEY_EVENT_FLAG_CANCELED = 0x20,
+
+ /* This key event was generated by a virtual (on-screen) hard key area.
+ * Typically this is an area of the touchscreen, outside of the regular
+ * display, dedicated to "hardware" buttons. */
+ AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40,
+
+ /* This flag is set for the first key repeat that occurs after the
+ * long press timeout. */
+ AKEY_EVENT_FLAG_LONG_PRESS = 0x80,
+
+ /* Set when a key event has AKEY_EVENT_FLAG_CANCELED set because a long
+ * press action was executed while it was down. */
+ AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100,
+
+ /* Set for AKEY_EVENT_ACTION_UP when this event's key code is still being
+ * tracked from its initial down. That is, somebody requested that tracking
+ * started on the key down and a long press has not caused
+ * the tracking to be canceled. */
+ AKEY_EVENT_FLAG_TRACKING = 0x200
+};
+
+/*
+ * Motion event actions.
+ */
+
+/* Bit shift for the action bits holding the pointer index as
+ * defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
+ */
+#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8
+
+enum {
+ /* Bit mask of the parts of the action code that are the action itself.
+ */
+ AMOTION_EVENT_ACTION_MASK = 0xff,
+
+ /* Bits in the action code that represent a pointer index, used with
+ * AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting
+ * down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer
+ * index where the data for the pointer going up or down can be found.
+ */
+ AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00,
+
+ /* A pressed gesture has started, the motion contains the initial starting location.
+ */
+ AMOTION_EVENT_ACTION_DOWN = 0,
+
+ /* A pressed gesture has finished, the motion contains the final release location
+ * as well as any intermediate points since the last down or move event.
+ */
+ AMOTION_EVENT_ACTION_UP = 1,
+
+ /* A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and
+ * AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as
+ * any intermediate points since the last down or move event.
+ */
+ AMOTION_EVENT_ACTION_MOVE = 2,
+
+ /* The current gesture has been aborted.
+ * You will not receive any more points in it. You should treat this as
+ * an up event, but not perform any action that you normally would.
+ */
+ AMOTION_EVENT_ACTION_CANCEL = 3,
+
+ /* A movement has happened outside of the normal bounds of the UI element.
+ * This does not provide a full gesture, but only the initial location of the movement/touch.
+ */
+ AMOTION_EVENT_ACTION_OUTSIDE = 4,
+
+ /* A non-primary pointer has gone down.
+ * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+ */
+ AMOTION_EVENT_ACTION_POINTER_DOWN = 5,
+
+ /* A non-primary pointer has gone up.
+ * The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
+ */
+ AMOTION_EVENT_ACTION_POINTER_UP = 6
+};
+
+/*
+ * Motion event flags.
+ */
+enum {
+ /* This flag indicates that the window that received this motion event is partly
+ * or wholly obscured by another visible window above it. This flag is set to true
+ * even if the event did not directly pass through the obscured area.
+ * A security sensitive application can check this flag to identify situations in which
+ * a malicious application may have covered up part of its content for the purpose
+ * of misleading the user or hijacking touches. An appropriate response might be
+ * to drop the suspect touches or to take additional precautions to confirm the user's
+ * actual intent.
+ */
+ AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1,
+};
+
+/*
+ * Motion event edge touch flags.
+ */
+enum {
+ /* No edges intersected */
+ AMOTION_EVENT_EDGE_FLAG_NONE = 0,
+
+ /* Flag indicating the motion event intersected the top edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_TOP = 0x01,
+
+ /* Flag indicating the motion event intersected the bottom edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02,
+
+ /* Flag indicating the motion event intersected the left edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04,
+
+ /* Flag indicating the motion event intersected the right edge of the screen. */
+ AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08
+};
+
+/*
+ * Input sources.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details about input sources
+ * and their correct interpretation.
+ */
+enum {
+ AINPUT_SOURCE_CLASS_MASK = 0x000000ff,
+
+ AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
+ AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
+ AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
+ AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
+};
+
+enum {
+ AINPUT_SOURCE_UNKNOWN = 0x00000000,
+
+ AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
+ AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
+
+ AINPUT_SOURCE_ANY = 0xffffff00,
+};
+
+/*
+ * Keyboard types.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details.
+ */
+enum {
+ AINPUT_KEYBOARD_TYPE_NONE = 0,
+ AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC = 1,
+ AINPUT_KEYBOARD_TYPE_ALPHABETIC = 2,
+};
+
+/*
+ * Constants used to retrieve information about the range of motion for a particular
+ * coordinate of a motion event.
+ *
+ * Refer to the documentation on android.view.InputDevice for more details about input sources
+ * and their correct interpretation.
+ */
+enum {
+ AINPUT_MOTION_RANGE_X = 0,
+ AINPUT_MOTION_RANGE_Y = 1,
+ AINPUT_MOTION_RANGE_PRESSURE = 2,
+ AINPUT_MOTION_RANGE_SIZE = 3,
+ AINPUT_MOTION_RANGE_TOUCH_MAJOR = 4,
+ AINPUT_MOTION_RANGE_TOUCH_MINOR = 5,
+ AINPUT_MOTION_RANGE_TOOL_MAJOR = 6,
+ AINPUT_MOTION_RANGE_TOOL_MINOR = 7,
+ AINPUT_MOTION_RANGE_ORIENTATION = 8,
+};
+
+
+/*
+ * Input event accessors.
+ *
+ * Note that most functions can only be used on input events that are of a given type.
+ * Calling these functions on input events of other types will yield undefined behavior.
+ */
+
+/*** Accessors for all input events. ***/
+
+/* Get the input event type. */
+int32_t AInputEvent_getType(const AInputEvent* event);
+
+/* Get the id for the device that an input event came from.
+ *
+ * Input events can be generated by multiple different input devices.
+ * Use the input device id to obtain information about the input
+ * device that was responsible for generating a particular event.
+ *
+ * An input device id of 0 indicates that the event didn't come from a physical device;
+ * other numbers are arbitrary and you shouldn't depend on the values.
+ * Use the provided input device query API to obtain information about input devices.
+ */
+int32_t AInputEvent_getDeviceId(const AInputEvent* event);
+
+/* Get the input event source. */
+int32_t AInputEvent_getSource(const AInputEvent* event);
+
+/*** Accessors for key events only. ***/
+
+/* Get the key event action. */
+int32_t AKeyEvent_getAction(const AInputEvent* key_event);
+
+/* Get the key event flags. */
+int32_t AKeyEvent_getFlags(const AInputEvent* key_event);
+
+/* Get the key code of the key event.
+ * This is the physical key that was pressed, not the Unicode character. */
+int32_t AKeyEvent_getKeyCode(const AInputEvent* key_event);
+
+/* Get the hardware key id of this key event.
+ * These values are not reliable and vary from device to device. */
+int32_t AKeyEvent_getScanCode(const AInputEvent* key_event);
+
+/* Get the meta key state. */
+int32_t AKeyEvent_getMetaState(const AInputEvent* key_event);
+
+/* Get the repeat count of the event.
+ * For both key up an key down events, this is the number of times the key has
+ * repeated with the first down starting at 0 and counting up from there. For
+ * multiple key events, this is the number of down/up pairs that have occurred. */
+int32_t AKeyEvent_getRepeatCount(const AInputEvent* key_event);
+
+/* Get the time of the most recent key down event, in the
+ * java.lang.System.nanoTime() time base. If this is a down event,
+ * this will be the same as eventTime.
+ * Note that when chording keys, this value is the down time of the most recently
+ * pressed key, which may not be the same physical key of this event. */
+int64_t AKeyEvent_getDownTime(const AInputEvent* key_event);
+
+/* Get the time this event occurred, in the
+ * java.lang.System.nanoTime() time base. */
+int64_t AKeyEvent_getEventTime(const AInputEvent* key_event);
+
+/*** Accessors for motion events only. ***/
+
+/* Get the combined motion event action code and pointer index. */
+int32_t AMotionEvent_getAction(const AInputEvent* motion_event);
+
+/* Get the motion event flags. */
+int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
+
+/* Get the state of any meta / modifier keys that were in effect when the
+ * event was generated. */
+int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
+
+/* Get a bitfield indicating which edges, if any, were touched by this motion event.
+ * For touch events, clients can use this to determine if the user's finger was
+ * touching the edge of the display. */
+int32_t AMotionEvent_getEdgeFlags(const AInputEvent* motion_event);
+
+/* Get the time when the user originally pressed down to start a stream of
+ * position events, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getDownTime(const AInputEvent* motion_event);
+
+/* Get the time when this specific event was generated,
+ * in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
+
+/* Get the X coordinate offset.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getXOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * For touch events on the screen, this is the delta that was added to the raw
+ * screen coordinates to adjust for the absolute position of the containing windows
+ * and views. */
+float AMotionEvent_getYOffset(const AInputEvent* motion_event);
+
+/* Get the precision of the X coordinates being reported.
+ * You can multiply this number with an X coordinate sample to find the
+ * actual hardware value of the X coordinate. */
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
+
+/* Get the precision of the Y coordinates being reported.
+ * You can multiply this number with a Y coordinate sample to find the
+ * actual hardware value of the Y coordinate. */
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
+
+/* Get the number of pointers of data contained in this event.
+ * Always >= 1. */
+size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
+
+/* Get the pointer identifier associated with a particular pointer
+ * data index is this event. The identifier tells you the actual pointer
+ * number associated with the data, accounting for individual pointers
+ * going up and down since the start of the current gesture. */
+int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the original raw X coordinate of this event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views. */
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current X coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current Y coordinate of this event for the given pointer index.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current pressure of this event for the given pointer index.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * although values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1. The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index. */
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the current orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation. A positive angle
+ * indicates that the major axis of contact is oriented to the right. A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
+
+/* Get the number of historical points in this event. These are movements that
+ * have occurred between this event and the previous event. This only applies
+ * to AMOTION_EVENT_ACTION_MOVE events -- all other actions will have a size of 0.
+ * Historical samples are indexed from oldest to newest. */
+size_t AMotionEvent_getHistorySize(const AInputEvent* motion_event);
+
+/* Get the time that a historical movement occurred between this event and
+ * the previous event, in the java.lang.System.nanoTime() time base. */
+int64_t AMotionEvent_getHistoricalEventTime(AInputEvent* motion_event,
+ size_t history_index);
+
+/* Get the historical raw X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical raw Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * For touch events on the screen, this is the original location of the event
+ * on the screen, before it had been adjusted for the containing window
+ * and views.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical X coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalX(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical Y coordinate of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * Whole numbers are pixels; the value may have a fraction for input devices
+ * that are sub-pixel precise. */
+float AMotionEvent_getHistoricalY(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical pressure of this event for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
+ * although values higher than 1 may be generated depending on the calibration of
+ * the input device. */
+float AMotionEvent_getHistoricalPressure(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the current scaled value of the approximate size for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * This represents some approximation of the area of the screen being
+ * pressed; the actual value in pixels corresponding to the
+ * touch is normalized with the device specific range of values
+ * and scaled to a value between 0 and 1. The value of size can be used to
+ * determine fat touch events. */
+float AMotionEvent_getHistoricalSize(AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the touch area
+ * at the point of contact for the given pointer index that
+ * occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the major axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical length of the minor axis of an ellipse that describes the size
+ * of the approaching tool for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * The tool area represents the estimated size of the finger or pen that is
+ * touching the device independent of its actual touch area at the point of contact. */
+float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+/* Get the historical orientation of the touch area and tool area in radians clockwise from
+ * vertical for the given pointer index that
+ * occurred between this event and the previous motion event.
+ * An angle of 0 degrees indicates that the major axis of contact is oriented
+ * upwards, is perfectly circular or is of unknown orientation. A positive angle
+ * indicates that the major axis of contact is oriented to the right. A negative angle
+ * indicates that the major axis of contact is oriented to the left.
+ * The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
+ * (finger pointing fully right). */
+float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
+ size_t history_index);
+
+
+/*
+ * Input queue
+ *
+ * An input queue is the facility through which you retrieve input
+ * events.
+ */
+struct AInputQueue;
+typedef struct AInputQueue AInputQueue;
+
+/*
+ * Add this input queue to a looper for processing. See
+ * ALooper_addFd() for information on the ident, callback, and data params.
+ */
+void AInputQueue_attachLooper(AInputQueue* queue, ALooper* looper,
+ int ident, ALooper_callbackFunc callback, void* data);
+
+/*
+ * Remove the input queue from the looper it is currently attached to.
+ */
+void AInputQueue_detachLooper(AInputQueue* queue);
+
+/*
+ * Returns true if there are one or more events available in the
+ * input queue. Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int32_t AInputQueue_hasEvents(AInputQueue* queue);
+
+/*
+ * Returns the next available event from the queue. Returns a negative
+ * value if no events are available or an error has occurred.
+ */
+int32_t AInputQueue_getEvent(AInputQueue* queue, AInputEvent** outEvent);
+
+/*
+ * Sends the key for standard pre-dispatching -- that is, possibly deliver
+ * it to the current IME to be consumed before the app. Returns 0 if it
+ * was not pre-dispatched, meaning you can process it right now. If non-zero
+ * is returned, you must abandon the current event processing and allow the
+ * event to appear again in the event queue (if it does not get consumed during
+ * pre-dispatching).
+ */
+int32_t AInputQueue_preDispatchEvent(AInputQueue* queue, AInputEvent* event);
+
+/*
+ * Report that dispatching has finished with the given event.
+ * This must be called after receiving an event with AInputQueue_get_event().
+ */
+void AInputQueue_finishEvent(AInputQueue* queue, AInputEvent* event, int handled);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_INPUT_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/keycodes.h b/6/platforms/android-9/arch-x86/usr/include/android/keycodes.h
new file mode 100644
index 0000000..496eccc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/keycodes.h
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ANDROID_KEYCODES_H
+#define _ANDROID_KEYCODES_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Key codes.
+ */
+enum {
+ AKEYCODE_UNKNOWN = 0,
+ AKEYCODE_SOFT_LEFT = 1,
+ AKEYCODE_SOFT_RIGHT = 2,
+ AKEYCODE_HOME = 3,
+ AKEYCODE_BACK = 4,
+ AKEYCODE_CALL = 5,
+ AKEYCODE_ENDCALL = 6,
+ AKEYCODE_0 = 7,
+ AKEYCODE_1 = 8,
+ AKEYCODE_2 = 9,
+ AKEYCODE_3 = 10,
+ AKEYCODE_4 = 11,
+ AKEYCODE_5 = 12,
+ AKEYCODE_6 = 13,
+ AKEYCODE_7 = 14,
+ AKEYCODE_8 = 15,
+ AKEYCODE_9 = 16,
+ AKEYCODE_STAR = 17,
+ AKEYCODE_POUND = 18,
+ AKEYCODE_DPAD_UP = 19,
+ AKEYCODE_DPAD_DOWN = 20,
+ AKEYCODE_DPAD_LEFT = 21,
+ AKEYCODE_DPAD_RIGHT = 22,
+ AKEYCODE_DPAD_CENTER = 23,
+ AKEYCODE_VOLUME_UP = 24,
+ AKEYCODE_VOLUME_DOWN = 25,
+ AKEYCODE_POWER = 26,
+ AKEYCODE_CAMERA = 27,
+ AKEYCODE_CLEAR = 28,
+ AKEYCODE_A = 29,
+ AKEYCODE_B = 30,
+ AKEYCODE_C = 31,
+ AKEYCODE_D = 32,
+ AKEYCODE_E = 33,
+ AKEYCODE_F = 34,
+ AKEYCODE_G = 35,
+ AKEYCODE_H = 36,
+ AKEYCODE_I = 37,
+ AKEYCODE_J = 38,
+ AKEYCODE_K = 39,
+ AKEYCODE_L = 40,
+ AKEYCODE_M = 41,
+ AKEYCODE_N = 42,
+ AKEYCODE_O = 43,
+ AKEYCODE_P = 44,
+ AKEYCODE_Q = 45,
+ AKEYCODE_R = 46,
+ AKEYCODE_S = 47,
+ AKEYCODE_T = 48,
+ AKEYCODE_U = 49,
+ AKEYCODE_V = 50,
+ AKEYCODE_W = 51,
+ AKEYCODE_X = 52,
+ AKEYCODE_Y = 53,
+ AKEYCODE_Z = 54,
+ AKEYCODE_COMMA = 55,
+ AKEYCODE_PERIOD = 56,
+ AKEYCODE_ALT_LEFT = 57,
+ AKEYCODE_ALT_RIGHT = 58,
+ AKEYCODE_SHIFT_LEFT = 59,
+ AKEYCODE_SHIFT_RIGHT = 60,
+ AKEYCODE_TAB = 61,
+ AKEYCODE_SPACE = 62,
+ AKEYCODE_SYM = 63,
+ AKEYCODE_EXPLORER = 64,
+ AKEYCODE_ENVELOPE = 65,
+ AKEYCODE_ENTER = 66,
+ AKEYCODE_DEL = 67,
+ AKEYCODE_GRAVE = 68,
+ AKEYCODE_MINUS = 69,
+ AKEYCODE_EQUALS = 70,
+ AKEYCODE_LEFT_BRACKET = 71,
+ AKEYCODE_RIGHT_BRACKET = 72,
+ AKEYCODE_BACKSLASH = 73,
+ AKEYCODE_SEMICOLON = 74,
+ AKEYCODE_APOSTROPHE = 75,
+ AKEYCODE_SLASH = 76,
+ AKEYCODE_AT = 77,
+ AKEYCODE_NUM = 78,
+ AKEYCODE_HEADSETHOOK = 79,
+ AKEYCODE_FOCUS = 80, // *Camera* focus
+ AKEYCODE_PLUS = 81,
+ AKEYCODE_MENU = 82,
+ AKEYCODE_NOTIFICATION = 83,
+ AKEYCODE_SEARCH = 84,
+ AKEYCODE_MEDIA_PLAY_PAUSE= 85,
+ AKEYCODE_MEDIA_STOP = 86,
+ AKEYCODE_MEDIA_NEXT = 87,
+ AKEYCODE_MEDIA_PREVIOUS = 88,
+ AKEYCODE_MEDIA_REWIND = 89,
+ AKEYCODE_MEDIA_FAST_FORWARD = 90,
+ AKEYCODE_MUTE = 91,
+ AKEYCODE_PAGE_UP = 92,
+ AKEYCODE_PAGE_DOWN = 93,
+ AKEYCODE_PICTSYMBOLS = 94,
+ AKEYCODE_SWITCH_CHARSET = 95,
+ AKEYCODE_BUTTON_A = 96,
+ AKEYCODE_BUTTON_B = 97,
+ AKEYCODE_BUTTON_C = 98,
+ AKEYCODE_BUTTON_X = 99,
+ AKEYCODE_BUTTON_Y = 100,
+ AKEYCODE_BUTTON_Z = 101,
+ AKEYCODE_BUTTON_L1 = 102,
+ AKEYCODE_BUTTON_R1 = 103,
+ AKEYCODE_BUTTON_L2 = 104,
+ AKEYCODE_BUTTON_R2 = 105,
+ AKEYCODE_BUTTON_THUMBL = 106,
+ AKEYCODE_BUTTON_THUMBR = 107,
+ AKEYCODE_BUTTON_START = 108,
+ AKEYCODE_BUTTON_SELECT = 109,
+ AKEYCODE_BUTTON_MODE = 110,
+
+ // NOTE: If you add a new keycode here you must also add it to several other files.
+ // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ANDROID_KEYCODES_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/log.h b/6/platforms/android-9/arch-x86/usr/include/android/log.h
new file mode 120000
index 0000000..111df79
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/log.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/android/log.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/looper.h b/6/platforms/android-9/arch-x86/usr/include/android/looper.h
new file mode 100644
index 0000000..a9d8426
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/looper.h
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_LOOPER_H
+#define ANDROID_LOOPER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ALooper
+ *
+ * A looper is the state tracking an event loop for a thread.
+ * Loopers do not define event structures or other such things; rather
+ * they are a lower-level facility to attach one or more discrete objects
+ * listening for an event. An "event" here is simply data available on
+ * a file descriptor: each attached object has an associated file descriptor,
+ * and waiting for "events" means (internally) polling on all of these file
+ * descriptors until one or more of them have data available.
+ *
+ * A thread can have only one ALooper associated with it.
+ */
+struct ALooper;
+typedef struct ALooper ALooper;
+
+/**
+ * Returns the looper associated with the calling thread, or NULL if
+ * there is not one.
+ */
+ALooper* ALooper_forThread();
+
+enum {
+ /**
+ * Option for ALooper_prepare: this looper will accept calls to
+ * ALooper_addFd() that do not have a callback (that is provide NULL
+ * for the callback). In this case the caller of ALooper_pollOnce()
+ * or ALooper_pollAll() MUST check the return from these functions to
+ * discover when data is available on such fds and process it.
+ */
+ ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0
+};
+
+/**
+ * Prepares a looper associated with the calling thread, and returns it.
+ * If the thread already has a looper, it is returned. Otherwise, a new
+ * one is created, associated with the thread, and returned.
+ *
+ * The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0.
+ */
+ALooper* ALooper_prepare(int opts);
+
+enum {
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * The poll was awoken using wake() before the timeout expired
+ * and no callbacks were executed and no other file descriptors were ready.
+ */
+ ALOOPER_POLL_WAKE = -1,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * One or more callbacks were executed.
+ */
+ ALOOPER_POLL_CALLBACK = -2,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * The timeout expired.
+ */
+ ALOOPER_POLL_TIMEOUT = -3,
+
+ /**
+ * Result from ALooper_pollOnce() and ALooper_pollAll():
+ * An error occurred.
+ */
+ ALOOPER_POLL_ERROR = -4,
+};
+
+/**
+ * Acquire a reference on the given ALooper object. This prevents the object
+ * from being deleted until the reference is removed. This is only needed
+ * to safely hand an ALooper from one thread to another.
+ */
+void ALooper_acquire(ALooper* looper);
+
+/**
+ * Remove a reference that was previously acquired with ALooper_acquire().
+ */
+void ALooper_release(ALooper* looper);
+
+/**
+ * Flags for file descriptor events that a looper can monitor.
+ *
+ * These flag bits can be combined to monitor multiple events at once.
+ */
+enum {
+ /**
+ * The file descriptor is available for read operations.
+ */
+ ALOOPER_EVENT_INPUT = 1 << 0,
+
+ /**
+ * The file descriptor is available for write operations.
+ */
+ ALOOPER_EVENT_OUTPUT = 1 << 1,
+
+ /**
+ * The file descriptor has encountered an error condition.
+ *
+ * The looper always sends notifications about errors; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_ERROR = 1 << 2,
+
+ /**
+ * The file descriptor was hung up.
+ * For example, indicates that the remote end of a pipe or socket was closed.
+ *
+ * The looper always sends notifications about hangups; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_HANGUP = 1 << 3,
+
+ /**
+ * The file descriptor is invalid.
+ * For example, the file descriptor was closed prematurely.
+ *
+ * The looper always sends notifications about invalid file descriptors; it is not necessary
+ * to specify this event flag in the requested event set.
+ */
+ ALOOPER_EVENT_INVALID = 1 << 4,
+};
+
+/**
+ * For callback-based event loops, this is the prototype of the function
+ * that is called. It is given the file descriptor it is associated with,
+ * a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT),
+ * and the data pointer that was originally supplied.
+ *
+ * Implementations should return 1 to continue receiving callbacks, or 0
+ * to have this file descriptor and callback unregistered from the looper.
+ */
+typedef int (*ALooper_callbackFunc)(int fd, int events, void* data);
+
+/**
+ * Waits for events to be available, with optional timeout in milliseconds.
+ * Invokes callbacks for all file descriptors on which an event occurred.
+ *
+ * If the timeout is zero, returns immediately without blocking.
+ * If the timeout is negative, waits indefinitely until an event appears.
+ *
+ * Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before
+ * the timeout expired and no callbacks were invoked and no other file
+ * descriptors were ready.
+ *
+ * Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.
+ *
+ * Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
+ * timeout expired.
+ *
+ * Returns ALOOPER_POLL_ERROR if an error occurred.
+ *
+ * Returns a value >= 0 containing an identifier if its file descriptor has data
+ * and it has no callback function (requiring the caller here to handle it).
+ * In this (and only this) case outFd, outEvents and outData will contain the poll
+ * events and data associated with the fd, otherwise they will be set to NULL.
+ *
+ * This method does not return until it has finished invoking the appropriate callbacks
+ * for all file descriptors that were signalled.
+ */
+int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData);
+
+/**
+ * Like ALooper_pollOnce(), but performs all pending callbacks until all
+ * data has been consumed or a file descriptor is available with no callback.
+ * This function will never return ALOOPER_POLL_CALLBACK.
+ */
+int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData);
+
+/**
+ * Wakes the poll asynchronously.
+ *
+ * This method can be called on any thread.
+ * This method returns immediately.
+ */
+void ALooper_wake(ALooper* looper);
+
+/**
+ * Adds a new file descriptor to be polled by the looper.
+ * If the same file descriptor was previously added, it is replaced.
+ *
+ * "fd" is the file descriptor to be added.
+ * "ident" is an identifier for this event, which is returned from ALooper_pollOnce().
+ * The identifier must be >= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback.
+ * "events" are the poll events to wake up on. Typically this is ALOOPER_EVENT_INPUT.
+ * "callback" is the function to call when there is an event on the file descriptor.
+ * "data" is a private data pointer to supply to the callback.
+ *
+ * There are two main uses of this function:
+ *
+ * (1) If "callback" is non-NULL, then this function will be called when there is
+ * data on the file descriptor. It should execute any events it has pending,
+ * appropriately reading from the file descriptor. The 'ident' is ignored in this case.
+ *
+ * (2) If "callback" is NULL, the 'ident' will be returned by ALooper_pollOnce
+ * when its file descriptor has data available, requiring the caller to take
+ * care of processing it.
+ *
+ * Returns 1 if the file descriptor was added or -1 if an error occurred.
+ *
+ * This method can be called on any thread.
+ * This method may block briefly if it needs to wake the poll.
+ */
+int ALooper_addFd(ALooper* looper, int fd, int ident, int events,
+ ALooper_callbackFunc callback, void* data);
+
+/**
+ * Removes a previously added file descriptor from the looper.
+ *
+ * When this method returns, it is safe to close the file descriptor since the looper
+ * will no longer have a reference to it. However, it is possible for the callback to
+ * already be running or for it to run one last time if the file descriptor was already
+ * signalled. Calling code is responsible for ensuring that this case is safely handled.
+ * For example, if the callback takes care of removing itself during its own execution either
+ * by returning 0 or by calling this method, then it can be guaranteed to not be invoked
+ * again at any later time unless registered anew.
+ *
+ * Returns 1 if the file descriptor was removed, 0 if none was previously registered
+ * or -1 if an error occurred.
+ *
+ * This method can be called on any thread.
+ * This method may block briefly if it needs to wake the poll.
+ */
+int ALooper_removeFd(ALooper* looper, int fd);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/native_activity.h b/6/platforms/android-9/arch-x86/usr/include/android/native_activity.h
new file mode 100644
index 0000000..d89bc8b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/native_activity.h
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_NATIVE_ACTIVITY_H
+#define ANDROID_NATIVE_ACTIVITY_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <jni.h>
+
+#include <android/asset_manager.h>
+#include <android/input.h>
+#include <android/native_window.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct ANativeActivityCallbacks;
+
+/**
+ * This structure defines the native side of an android.app.NativeActivity.
+ * It is created by the framework, and handed to the application's native
+ * code as it is being launched.
+ */
+typedef struct ANativeActivity {
+ /**
+ * Pointer to the callback function table of the native application.
+ * You can set the functions here to your own callbacks. The callbacks
+ * pointer itself here should not be changed; it is allocated and managed
+ * for you by the framework.
+ */
+ struct ANativeActivityCallbacks* callbacks;
+
+ /**
+ * The global handle on the process's Java VM.
+ */
+ JavaVM* vm;
+
+ /**
+ * JNI context for the main thread of the app. Note that this field
+ * can ONLY be used from the main thread of the process; that is, the
+ * thread that calls into the ANativeActivityCallbacks.
+ */
+ JNIEnv* env;
+
+ /**
+ * The NativeActivity Java class.
+ */
+ jobject clazz;
+
+ /**
+ * Path to this application's internal data directory.
+ */
+ const char* internalDataPath;
+
+ /**
+ * Path to this application's external (removable/mountable) data directory.
+ */
+ const char* externalDataPath;
+
+ /**
+ * The platform's SDK version code.
+ */
+ int32_t sdkVersion;
+
+ /**
+ * This is the native instance of the application. It is not used by
+ * the framework, but can be set by the application to its own instance
+ * state.
+ */
+ void* instance;
+
+ /**
+ * Pointer to the Asset Manager instance for the application. The application
+ * uses this to access binary assets bundled inside its own .apk file.
+ */
+ AAssetManager* assetManager;
+} ANativeActivity;
+
+/**
+ * These are the callbacks the framework makes into a native application.
+ * All of these callbacks happen on the main thread of the application.
+ * By default, all callbacks are NULL; set to a pointer to your own function
+ * to have it called.
+ */
+typedef struct ANativeActivityCallbacks {
+ /**
+ * NativeActivity has started. See Java documentation for Activity.onStart()
+ * for more information.
+ */
+ void (*onStart)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity has resumed. See Java documentation for Activity.onResume()
+ * for more information.
+ */
+ void (*onResume)(ANativeActivity* activity);
+
+ /**
+ * Framework is asking NativeActivity to save its current instance state.
+ * See Java documentation for Activity.onSaveInstanceState() for more
+ * information. The returned pointer needs to be created with malloc();
+ * the framework will call free() on it for you. You also must fill in
+ * outSize with the number of bytes in the allocation. Note that the
+ * saved state will be persisted, so it can not contain any active
+ * entities (pointers to memory, file descriptors, etc).
+ */
+ void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize);
+
+ /**
+ * NativeActivity has paused. See Java documentation for Activity.onPause()
+ * for more information.
+ */
+ void (*onPause)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity has stopped. See Java documentation for Activity.onStop()
+ * for more information.
+ */
+ void (*onStop)(ANativeActivity* activity);
+
+ /**
+ * NativeActivity is being destroyed. See Java documentation for Activity.onDestroy()
+ * for more information.
+ */
+ void (*onDestroy)(ANativeActivity* activity);
+
+ /**
+ * Focus has changed in this NativeActivity's window. This is often used,
+ * for example, to pause a game when it loses input focus.
+ */
+ void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus);
+
+ /**
+ * The drawing window for this native activity has been created. You
+ * can use the given native window object to start drawing.
+ */
+ void (*onNativeWindowCreated)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity has been resized. You should
+ * retrieve the new size from the window and ensure that your rendering in
+ * it now matches.
+ */
+ void (*onNativeWindowResized)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity needs to be redrawn. To avoid
+ * transient artifacts during screen changes (such resizing after rotation),
+ * applications should not return from this function until they have finished
+ * drawing their window in its current state.
+ */
+ void (*onNativeWindowRedrawNeeded)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The drawing window for this native activity is going to be destroyed.
+ * You MUST ensure that you do not touch the window object after returning
+ * from this function: in the common case of drawing to the window from
+ * another thread, that means the implementation of this callback must
+ * properly synchronize with the other thread to stop its drawing before
+ * returning from here.
+ */
+ void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window);
+
+ /**
+ * The input queue for this native activity's window has been created.
+ * You can use the given input queue to start retrieving input events.
+ */
+ void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue);
+
+ /**
+ * The input queue for this native activity's window is being destroyed.
+ * You should no longer try to reference this object upon returning from this
+ * function.
+ */
+ void (*onInputQueueDestroyed)(ANativeActivity* activity, AInputQueue* queue);
+
+ /**
+ * The rectangle in the window in which content should be placed has changed.
+ */
+ void (*onContentRectChanged)(ANativeActivity* activity, const ARect* rect);
+
+ /**
+ * The current device AConfiguration has changed. The new configuration can
+ * be retrieved from assetManager.
+ */
+ void (*onConfigurationChanged)(ANativeActivity* activity);
+
+ /**
+ * The system is running low on memory. Use this callback to release
+ * resources you do not need, to help the system avoid killing more
+ * important processes.
+ */
+ void (*onLowMemory)(ANativeActivity* activity);
+} ANativeActivityCallbacks;
+
+/**
+ * This is the function that must be in the native code to instantiate the
+ * application's native activity. It is called with the activity instance (see
+ * above); if the code is being instantiated from a previously saved instance,
+ * the savedState will be non-NULL and point to the saved data. You must make
+ * any copy of this data you need -- it will be released after you return from
+ * this function.
+ */
+typedef void ANativeActivity_createFunc(ANativeActivity* activity,
+ void* savedState, size_t savedStateSize);
+
+/**
+ * The name of the function that NativeInstance looks for when launching its
+ * native code. This is the default function that is used, you can specify
+ * "android.app.func_name" string meta-data in your manifest to use a different
+ * function.
+ */
+extern ANativeActivity_createFunc ANativeActivity_onCreate;
+
+/**
+ * Finish the given activity. Its finish() method will be called, causing it
+ * to be stopped and destroyed. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_finish(ANativeActivity* activity);
+
+/**
+ * Change the window format of the given activity. Calls getWindow().setFormat()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
+
+/**
+ * Change the window flags of the given activity. Calls getWindow().setFlags()
+ * of the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place. See window.h for flag constants.
+ */
+void ANativeActivity_setWindowFlags(ANativeActivity* activity,
+ uint32_t addFlags, uint32_t removeFlags);
+
+/**
+ * Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+ ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001,
+ ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
+};
+
+/**
+ * Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
+
+/**
+ * Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
+ * API for documentation.
+ */
+enum {
+ ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
+ ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
+};
+
+/**
+ * Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
+ * for the given activity. Note that this method can be called from
+ * *any* thread; it will send a message to the main thread of the process
+ * where the Java finish call will take place.
+ */
+void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_ACTIVITY_H
+
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/native_window.h b/6/platforms/android-9/arch-x86/usr/include/android/native_window.h
new file mode 100644
index 0000000..f3d7550
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/native_window.h
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_H
+#define ANDROID_NATIVE_WINDOW_H
+
+#include <android/rect.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Pixel formats that a window can use.
+ */
+enum {
+ WINDOW_FORMAT_RGBA_8888 = 1,
+ WINDOW_FORMAT_RGBX_8888 = 2,
+ WINDOW_FORMAT_RGB_565 = 4,
+};
+
+struct ANativeWindow;
+typedef struct ANativeWindow ANativeWindow;
+
+typedef struct ANativeWindow_Buffer {
+ // The number of pixels that are show horizontally.
+ int32_t width;
+
+ // The number of pixels that are shown vertically.
+ int32_t height;
+
+ // The number of *pixels* that a line in the buffer takes in
+ // memory. This may be >= width.
+ int32_t stride;
+
+ // The format of the buffer. One of WINDOW_FORMAT_*
+ int32_t format;
+
+ // The actual bits.
+ void* bits;
+
+ // Do not touch.
+ uint32_t reserved[6];
+} ANativeWindow_Buffer;
+
+/**
+ * Acquire a reference on the given ANativeWindow object. This prevents the object
+ * from being deleted until the reference is removed.
+ */
+void ANativeWindow_acquire(ANativeWindow* window);
+
+/**
+ * Remove a reference that was previously acquired with ANativeWindow_acquire().
+ */
+void ANativeWindow_release(ANativeWindow* window);
+
+/*
+ * Return the current width in pixels of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getWidth(ANativeWindow* window);
+
+/*
+ * Return the current height in pixels of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getHeight(ANativeWindow* window);
+
+/*
+ * Return the current pixel format of the window surface. Returns a
+ * negative value on error.
+ */
+int32_t ANativeWindow_getFormat(ANativeWindow* window);
+
+/*
+ * Change the format and size of the window buffers.
+ *
+ * The width and height control the number of pixels in the buffers, not the
+ * dimensions of the window on screen. If these are different than the
+ * window's physical size, then it buffer will be scaled to match that size
+ * when compositing it to the screen.
+ *
+ * For all of these parameters, if 0 is supplied then the window's base
+ * value will come back in force.
+ */
+int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window, int32_t width, int32_t height, int32_t format);
+
+/**
+ * Lock the window's next drawing surface for writing.
+ */
+int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
+ ARect* inOutDirtyBounds);
+
+/**
+ * Unlock the window's drawing surface after previously locking it,
+ * posting the new buffer to the display.
+ */
+int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/native_window_jni.h b/6/platforms/android-9/arch-x86/usr/include/android/native_window_jni.h
new file mode 100644
index 0000000..b9e72ef
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/native_window_jni.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_NATIVE_WINDOW_JNI_H
+#define ANDROID_NATIVE_WINDOW_JNI_H
+
+#include <android/native_window.h>
+
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Return the ANativeWindow associated with a Java Surface object,
+ * for interacting with it through native code. This acquires a reference
+ * on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
+ * when done with it so that it doesn't leak.
+ */
+ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_NATIVE_WINDOW_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/obb.h b/6/platforms/android-9/arch-x86/usr/include/android/obb.h
new file mode 100644
index 0000000..65e9b2a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/obb.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_OBB_H
+#define ANDROID_OBB_H
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AObbInfo;
+typedef struct AObbInfo AObbInfo;
+
+enum {
+ AOBBINFO_OVERLAY = 0x0001,
+};
+
+/**
+ * Scan an OBB and get information about it.
+ */
+AObbInfo* AObbScanner_getObbInfo(const char* filename);
+
+/**
+ * Destroy the AObbInfo object. You must call this when finished with the object.
+ */
+void AObbInfo_delete(AObbInfo* obbInfo);
+
+/**
+ * Get the package name for the OBB.
+ */
+const char* AObbInfo_getPackageName(AObbInfo* obbInfo);
+
+/**
+ * Get the version of an OBB file.
+ */
+int32_t AObbInfo_getVersion(AObbInfo* obbInfo);
+
+/**
+ * Get the flags of an OBB file.
+ */
+int32_t AObbInfo_getFlags(AObbInfo* obbInfo);
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_OBB_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/rect.h b/6/platforms/android-9/arch-x86/usr/include/android/rect.h
new file mode 100644
index 0000000..3e81f53
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/rect.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_RECT_H
+#define ANDROID_RECT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct ARect {
+ int32_t left;
+ int32_t top;
+ int32_t right;
+ int32_t bottom;
+} ARect;
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_RECT_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/sensor.h b/6/platforms/android-9/arch-x86/usr/include/android/sensor.h
new file mode 100644
index 0000000..f163f18
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/sensor.h
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_SENSOR_H
+#define ANDROID_SENSOR_H
+
+/******************************************************************
+ *
+ * IMPORTANT NOTICE:
+ *
+ * This file is part of Android's set of stable system headers
+ * exposed by the Android NDK (Native Development Kit).
+ *
+ * Third-party source AND binary code relies on the definitions
+ * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
+ *
+ * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
+ * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
+ * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
+ * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
+ */
+
+/*
+ * Structures and functions to receive and process sensor events in
+ * native code.
+ *
+ */
+
+#include <sys/types.h>
+
+#include <android/looper.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Sensor types
+ * (keep in sync with hardware/sensor.h)
+ */
+
+enum {
+ ASENSOR_TYPE_ACCELEROMETER = 1,
+ ASENSOR_TYPE_MAGNETIC_FIELD = 2,
+ ASENSOR_TYPE_GYROSCOPE = 4,
+ ASENSOR_TYPE_LIGHT = 5,
+ ASENSOR_TYPE_PROXIMITY = 8
+};
+
+/*
+ * Sensor accuracy measure
+ */
+enum {
+ ASENSOR_STATUS_UNRELIABLE = 0,
+ ASENSOR_STATUS_ACCURACY_LOW = 1,
+ ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
+ ASENSOR_STATUS_ACCURACY_HIGH = 3
+};
+
+/*
+ * A few useful constants
+ */
+
+/* Earth's gravity in m/s^2 */
+#define ASENSOR_STANDARD_GRAVITY (9.80665f)
+/* Maximum magnetic field on Earth's surface in uT */
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX (60.0f)
+/* Minimum magnetic field on Earth's surface in uT*/
+#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN (30.0f)
+
+/*
+ * A sensor event.
+ */
+
+/* NOTE: Must match hardware/sensors.h */
+typedef struct ASensorVector {
+ union {
+ float v[3];
+ struct {
+ float x;
+ float y;
+ float z;
+ };
+ struct {
+ float azimuth;
+ float pitch;
+ float roll;
+ };
+ };
+ int8_t status;
+ uint8_t reserved[3];
+} ASensorVector;
+
+/* NOTE: Must match hardware/sensors.h */
+typedef struct ASensorEvent {
+ int32_t version; /* sizeof(struct ASensorEvent) */
+ int32_t sensor;
+ int32_t type;
+ int32_t reserved0;
+ int64_t timestamp;
+ union {
+ float data[16];
+ ASensorVector vector;
+ ASensorVector acceleration;
+ ASensorVector magnetic;
+ float temperature;
+ float distance;
+ float light;
+ float pressure;
+ };
+ int32_t reserved1[4];
+} ASensorEvent;
+
+
+struct ASensorManager;
+typedef struct ASensorManager ASensorManager;
+
+struct ASensorEventQueue;
+typedef struct ASensorEventQueue ASensorEventQueue;
+
+struct ASensor;
+typedef struct ASensor ASensor;
+typedef ASensor const* ASensorRef;
+typedef ASensorRef const* ASensorList;
+
+/*****************************************************************************/
+
+/*
+ * Get a reference to the sensor manager. ASensorManager is a singleton.
+ *
+ * Example:
+ *
+ * ASensorManager* sensorManager = ASensorManager_getInstance();
+ *
+ */
+ASensorManager* ASensorManager_getInstance();
+
+
+/*
+ * Returns the list of available sensors.
+ */
+int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
+
+/*
+ * Returns the default sensor for the given type, or NULL if no sensor
+ * of that type exist.
+ */
+ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
+
+/*
+ * Creates a new sensor event queue and associate it with a looper.
+ */
+ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
+ ALooper* looper, int ident, ALooper_callbackFunc callback, void* data);
+
+/*
+ * Destroys the event queue and free all resources associated to it.
+ */
+int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue);
+
+
+/*****************************************************************************/
+
+/*
+ * Enable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor);
+
+/*
+ * Disable the selected sensor. Returns a negative error code on failure.
+ */
+int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor);
+
+/*
+ * Sets the delivery rate of events in microseconds for the given sensor.
+ * Note that this is a hint only, generally event will arrive at a higher
+ * rate. It is an error to set a rate inferior to the value returned by
+ * ASensor_getMinDelay().
+ * Returns a negative error code on failure.
+ */
+int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec);
+
+/*
+ * Returns true if there are one or more events available in the
+ * sensor queue. Returns 1 if the queue has events; 0 if
+ * it does not have events; and a negative value if there is an error.
+ */
+int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
+
+/*
+ * Returns the next available events from the queue. Returns a negative
+ * value if no events are available or an error has occurred, otherwise
+ * the number of events returned.
+ *
+ * Examples:
+ * ASensorEvent event;
+ * ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);
+ *
+ * ASensorEvent eventBuffer[8];
+ * ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8);
+ *
+ */
+ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
+ ASensorEvent* events, size_t count);
+
+
+/*****************************************************************************/
+
+/*
+ * Returns this sensor's name (non localized)
+ */
+const char* ASensor_getName(ASensor const* sensor);
+
+/*
+ * Returns this sensor's vendor's name (non localized)
+ */
+const char* ASensor_getVendor(ASensor const* sensor);
+
+/*
+ * Return this sensor's type
+ */
+int ASensor_getType(ASensor const* sensor);
+
+/*
+ * Returns this sensors's resolution
+ */
+float ASensor_getResolution(ASensor const* sensor);
+
+/*
+ * Returns the minimum delay allowed between events in microseconds.
+ * A value of zero means that this sensor doesn't report events at a
+ * constant rate, but rather only when a new data is available.
+ */
+int ASensor_getMinDelay(ASensor const* sensor);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_SENSOR_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/storage_manager.h b/6/platforms/android-9/arch-x86/usr/include/android/storage_manager.h
new file mode 100644
index 0000000..bad2491
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/storage_manager.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_STORAGE_MANAGER_H
+#define ANDROID_STORAGE_MANAGER_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct AStorageManager;
+typedef struct AStorageManager AStorageManager;
+
+enum {
+ /*
+ * The OBB container is now mounted and ready for use. Can be returned
+ * as the status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_MOUNTED = 1,
+
+ /*
+ * The OBB container is now unmounted and not usable. Can be returned
+ * as the status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_UNMOUNTED = 2,
+
+ /*
+ * There was an internal system error encountered while trying to
+ * mount the OBB. Can be returned as the status for callbacks made
+ * during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_INTERNAL = 20,
+
+ /*
+ * The OBB could not be mounted by the system. Can be returned as the
+ * status for callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_COULD_NOT_MOUNT = 21,
+
+ /*
+ * The OBB could not be unmounted. This most likely indicates that a
+ * file is in use on the OBB. Can be returned as the status for
+ * callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_COULD_NOT_UNMOUNT = 22,
+
+ /*
+ * A call was made to unmount the OBB when it was not mounted. Can be
+ * returned as the status for callbacks made during asynchronous OBB
+ * actions.
+ */
+ AOBB_STATE_ERROR_NOT_MOUNTED = 23,
+
+ /*
+ * The OBB has already been mounted. Can be returned as the status for
+ * callbacks made during asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_ALREADY_MOUNTED = 24,
+
+ /*
+ * The current application does not have permission to use this OBB.
+ * This could be because the OBB indicates it's owned by a different
+ * package. Can be returned as the status for callbacks made during
+ * asynchronous OBB actions.
+ */
+ AOBB_STATE_ERROR_PERMISSION_DENIED = 25,
+};
+
+/**
+ * Obtains a new instance of AStorageManager.
+ */
+AStorageManager* AStorageManager_new();
+
+/**
+ * Release AStorageManager instance.
+ */
+void AStorageManager_delete(AStorageManager* mgr);
+
+/**
+ * Callback function for asynchronous calls made on OBB files.
+ */
+typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data);
+
+/**
+ * Attempts to mount an OBB file. This is an asynchronous operation.
+ */
+void AStorageManager_mountObb(AStorageManager* mgr, const char* filename, const char* key,
+ AStorageManager_obbCallbackFunc cb, void* data);
+
+/**
+ * Attempts to unmount an OBB file. This is an asynchronous operation.
+ */
+void AStorageManager_unmountObb(AStorageManager* mgr, const char* filename, const int force,
+ AStorageManager_obbCallbackFunc cb, void* data);
+
+/**
+ * Check whether an OBB is mounted.
+ */
+int AStorageManager_isObbMounted(AStorageManager* mgr, const char* filename);
+
+/**
+ * Get the mounted path for an OBB.
+ */
+const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char* filename);
+
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_STORAGE_MANAGER_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/android/window.h b/6/platforms/android-9/arch-x86/usr/include/android/window.h
new file mode 100644
index 0000000..2ab192b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/android/window.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_WINDOW_H
+#define ANDROID_WINDOW_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Window flags, as per the Java API at android.view.WindowManager.LayoutParams.
+ */
+enum {
+ AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001,
+ AWINDOW_FLAG_DIM_BEHIND = 0x00000002,
+ AWINDOW_FLAG_BLUR_BEHIND = 0x00000004,
+ AWINDOW_FLAG_NOT_FOCUSABLE = 0x00000008,
+ AWINDOW_FLAG_NOT_TOUCHABLE = 0x00000010,
+ AWINDOW_FLAG_NOT_TOUCH_MODAL = 0x00000020,
+ AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
+ AWINDOW_FLAG_KEEP_SCREEN_ON = 0x00000080,
+ AWINDOW_FLAG_LAYOUT_IN_SCREEN = 0x00000100,
+ AWINDOW_FLAG_LAYOUT_NO_LIMITS = 0x00000200,
+ AWINDOW_FLAG_FULLSCREEN = 0x00000400,
+ AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 0x00000800,
+ AWINDOW_FLAG_DITHER = 0x00001000,
+ AWINDOW_FLAG_SECURE = 0x00002000,
+ AWINDOW_FLAG_SCALED = 0x00004000,
+ AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 0x00008000,
+ AWINDOW_FLAG_LAYOUT_INSET_DECOR = 0x00010000,
+ AWINDOW_FLAG_ALT_FOCUSABLE_IM = 0x00020000,
+ AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
+ AWINDOW_FLAG_SHOW_WHEN_LOCKED = 0x00080000,
+ AWINDOW_FLAG_SHOW_WALLPAPER = 0x00100000,
+ AWINDOW_FLAG_TURN_SCREEN_ON = 0x00200000,
+ AWINDOW_FLAG_DISMISS_KEYGUARD = 0x00400000,
+};
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif // ANDROID_WINDOW_H
diff --git a/6/platforms/android-9/arch-x86/usr/include/arpa/inet.h b/6/platforms/android-9/arch-x86/usr/include/arpa/inet.h
new file mode 120000
index 0000000..cc37d8d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/arpa/inet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/arpa/inet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/arpa/nameser.h b/6/platforms/android-9/arch-x86/usr/include/arpa/nameser.h
new file mode 120000
index 0000000..7e6ab12
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/arpa/nameser.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/arpa/nameser.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/arpa/telnet.h b/6/platforms/android-9/arch-x86/usr/include/arpa/telnet.h
new file mode 100644
index 0000000..d318e08
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/arpa/telnet.h
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)telnet.h 8.2 (Berkeley) 12/15/93
+ */
+
+#ifndef _ARPA_TELNET_H
+#define _ARPA_TELNET_H 1
+
+/*
+ * Definitions for the TELNET protocol.
+ */
+#define IAC 255 /* interpret as command: */
+#define DONT 254 /* you are not to use option */
+#define DO 253 /* please, you use option */
+#define WONT 252 /* I won't use option */
+#define WILL 251 /* I will use option */
+#define SB 250 /* interpret as subnegotiation */
+#define GA 249 /* you may reverse the line */
+#define EL 248 /* erase the current line */
+#define EC 247 /* erase the current character */
+#define AYT 246 /* are you there */
+#define AO 245 /* abort output--but let prog finish */
+#define IP 244 /* interrupt process--permanently */
+#define BREAK 243 /* break */
+#define DM 242 /* data mark--for connect. cleaning */
+#define NOP 241 /* nop */
+#define SE 240 /* end sub negotiation */
+#define EOR 239 /* end of record (transparent mode) */
+#define ABORT 238 /* Abort process */
+#define SUSP 237 /* Suspend process */
+#define xEOF 236 /* End of file: EOF is already used... */
+
+#define SYNCH 242 /* for telfunc calls */
+
+#ifdef TELCMDS
+char *telcmds[] = {
+ "EOF", "SUSP", "ABORT", "EOR",
+ "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
+ "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
+};
+#else
+extern char *telcmds[];
+#endif
+
+#define TELCMD_FIRST xEOF
+#define TELCMD_LAST IAC
+#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
+ (unsigned int)(x) >= TELCMD_FIRST)
+#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
+
+/* telnet options */
+#define TELOPT_BINARY 0 /* 8-bit data path */
+#define TELOPT_ECHO 1 /* echo */
+#define TELOPT_RCP 2 /* prepare to reconnect */
+#define TELOPT_SGA 3 /* suppress go ahead */
+#define TELOPT_NAMS 4 /* approximate message size */
+#define TELOPT_STATUS 5 /* give status */
+#define TELOPT_TM 6 /* timing mark */
+#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
+#define TELOPT_NAOL 8 /* negotiate about output line width */
+#define TELOPT_NAOP 9 /* negotiate about output page size */
+#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
+#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
+#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
+#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
+#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
+#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
+#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
+#define TELOPT_XASCII 17 /* extended ascii character set */
+#define TELOPT_LOGOUT 18 /* force logout */
+#define TELOPT_BM 19 /* byte macro */
+#define TELOPT_DET 20 /* data entry terminal */
+#define TELOPT_SUPDUP 21 /* supdup protocol */
+#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
+#define TELOPT_SNDLOC 23 /* send location */
+#define TELOPT_TTYPE 24 /* terminal type */
+#define TELOPT_EOR 25 /* end or record */
+#define TELOPT_TUID 26 /* TACACS user identification */
+#define TELOPT_OUTMRK 27 /* output marking */
+#define TELOPT_TTYLOC 28 /* terminal location number */
+#define TELOPT_3270REGIME 29 /* 3270 regime */
+#define TELOPT_X3PAD 30 /* X.3 PAD */
+#define TELOPT_NAWS 31 /* window size */
+#define TELOPT_TSPEED 32 /* terminal speed */
+#define TELOPT_LFLOW 33 /* remote flow control */
+#define TELOPT_LINEMODE 34 /* Linemode option */
+#define TELOPT_XDISPLOC 35 /* X Display Location */
+#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
+#define TELOPT_AUTHENTICATION 37/* Authenticate */
+#define TELOPT_ENCRYPT 38 /* Encryption option */
+#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
+#define TELOPT_EXOPL 255 /* extended-options-list */
+
+
+#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
+#ifdef TELOPTS
+const char *telopts[NTELOPTS+1] = {
+ "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
+ "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
+ "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
+ "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
+ "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
+ "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
+ "TACACS UID", "OUTPUT MARKING", "TTYLOC",
+ "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
+ "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
+ "ENCRYPT", "NEW-ENVIRON",
+ 0,
+};
+#define TELOPT_FIRST TELOPT_BINARY
+#define TELOPT_LAST TELOPT_NEW_ENVIRON
+#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
+#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
+#endif
+
+/* sub-option qualifiers */
+#define TELQUAL_IS 0 /* option is... */
+#define TELQUAL_SEND 1 /* send option */
+#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
+#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
+#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
+
+#define LFLOW_OFF 0 /* Disable remote flow control */
+#define LFLOW_ON 1 /* Enable remote flow control */
+#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
+#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
+
+/*
+ * LINEMODE suboptions
+ */
+
+#define LM_MODE 1
+#define LM_FORWARDMASK 2
+#define LM_SLC 3
+
+#define MODE_EDIT 0x01
+#define MODE_TRAPSIG 0x02
+#define MODE_ACK 0x04
+#define MODE_SOFT_TAB 0x08
+#define MODE_LIT_ECHO 0x10
+
+#define MODE_MASK 0x1f
+
+/* Not part of protocol, but needed to simplify things... */
+#define MODE_FLOW 0x0100
+#define MODE_ECHO 0x0200
+#define MODE_INBIN 0x0400
+#define MODE_OUTBIN 0x0800
+#define MODE_FORCE 0x1000
+
+#define SLC_SYNCH 1
+#define SLC_BRK 2
+#define SLC_IP 3
+#define SLC_AO 4
+#define SLC_AYT 5
+#define SLC_EOR 6
+#define SLC_ABORT 7
+#define SLC_EOF 8
+#define SLC_SUSP 9
+#define SLC_EC 10
+#define SLC_EL 11
+#define SLC_EW 12
+#define SLC_RP 13
+#define SLC_LNEXT 14
+#define SLC_XON 15
+#define SLC_XOFF 16
+#define SLC_FORW1 17
+#define SLC_FORW2 18
+
+#define NSLC 18
+
+/*
+ * For backwards compatibility, we define SLC_NAMES to be the
+ * list of names if SLC_NAMES is not defined.
+ */
+#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
+ "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
+ "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
+#ifdef SLC_NAMES
+const char *slc_names[] = {
+ SLC_NAMELIST
+};
+#else
+extern char *slc_names[];
+#define SLC_NAMES SLC_NAMELIST
+#endif
+
+#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
+#define SLC_NAME(x) slc_names[x]
+
+#define SLC_NOSUPPORT 0
+#define SLC_CANTCHANGE 1
+#define SLC_VARIABLE 2
+#define SLC_DEFAULT 3
+#define SLC_LEVELBITS 0x03
+
+#define SLC_FUNC 0
+#define SLC_FLAGS 1
+#define SLC_VALUE 2
+
+#define SLC_ACK 0x80
+#define SLC_FLUSHIN 0x40
+#define SLC_FLUSHOUT 0x20
+
+#define OLD_ENV_VAR 1
+#define OLD_ENV_VALUE 0
+#define NEW_ENV_VAR 0
+#define NEW_ENV_VALUE 1
+#define ENV_ESC 2
+#define ENV_USERVAR 3
+
+/*
+ * AUTHENTICATION suboptions
+ */
+
+/*
+ * Who is authenticating who ...
+ */
+#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
+#define AUTH_WHO_SERVER 1 /* Server authenticating client */
+#define AUTH_WHO_MASK 1
+
+/*
+ * amount of authentication done
+ */
+#define AUTH_HOW_ONE_WAY 0
+#define AUTH_HOW_MUTUAL 2
+#define AUTH_HOW_MASK 2
+
+#define AUTHTYPE_NULL 0
+#define AUTHTYPE_KERBEROS_V4 1
+#define AUTHTYPE_KERBEROS_V5 2
+#define AUTHTYPE_SPX 3
+#define AUTHTYPE_MINK 4
+#define AUTHTYPE_CNT 5
+
+#define AUTHTYPE_TEST 99
+
+#ifdef AUTH_NAMES
+const char *authtype_names[] = {
+ "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
+};
+#else
+extern char *authtype_names[];
+#endif
+
+#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
+#define AUTHTYPE_NAME(x) authtype_names[x]
+
+/*
+ * ENCRYPTion suboptions
+ */
+#define ENCRYPT_IS 0 /* I pick encryption type ... */
+#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
+#define ENCRYPT_REPLY 2 /* Initial setup response */
+#define ENCRYPT_START 3 /* Am starting to send encrypted */
+#define ENCRYPT_END 4 /* Am ending encrypted */
+#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
+#define ENCRYPT_REQEND 6 /* Request you send encrypting */
+#define ENCRYPT_ENC_KEYID 7
+#define ENCRYPT_DEC_KEYID 8
+#define ENCRYPT_CNT 9
+
+#define ENCTYPE_ANY 0
+#define ENCTYPE_DES_CFB64 1
+#define ENCTYPE_DES_OFB64 2
+#define ENCTYPE_CNT 3
+
+#ifdef ENCRYPT_NAMES
+const char *encrypt_names[] = {
+ "IS", "SUPPORT", "REPLY", "START", "END",
+ "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
+ 0,
+};
+const char *enctype_names[] = {
+ "ANY", "DES_CFB64", "DES_OFB64", 0,
+};
+#else
+extern const char *encrypt_names[];
+extern const char *enctype_names[];
+#endif
+
+
+#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
+#define ENCRYPT_NAME(x) encrypt_names[x]
+
+#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
+#define ENCTYPE_NAME(x) enctype_names[x]
+
+#endif /* arpa/telnet.h */
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/4level-fixup.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/4level-fixup.h
new file mode 120000
index 0000000..ac60204
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/4level-fixup.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/4level-fixup.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/audit_dir_write.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/audit_dir_write.h
new file mode 120000
index 0000000..8f07fe6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/audit_dir_write.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/audit_dir_write.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/__ffs.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/__ffs.h
new file mode 120000
index 0000000..c2639f6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/__ffs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/__ffs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/atomic.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/atomic.h
new file mode 120000
index 0000000..522e63b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/atomic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/ffz.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/ffz.h
new file mode 120000
index 0000000..9ad3984
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/ffz.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/ffz.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/find.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/find.h
new file mode 120000
index 0000000..002a54f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/find.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/find.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls.h
new file mode 120000
index 0000000..d3349c9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls64.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls64.h
new file mode 120000
index 0000000..553d0f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/fls64.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/fls64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/le.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/le.h
new file mode 120000
index 0000000..ccdd317
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/le.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/le.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/non-atomic.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
new file mode 120000
index 0000000..d5363fb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bitops/non-atomic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bitops/non-atomic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/bug.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bug.h
new file mode 120000
index 0000000..e195118
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/bug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/bug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/cputime.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/cputime.h
new file mode 120000
index 0000000..6494420
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/cputime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/cputime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/emergency-restart.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/emergency-restart.h
new file mode 120000
index 0000000..0bfb469
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/emergency-restart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/emergency-restart.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h
new file mode 120000
index 0000000..661f02f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno-base.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/errno-base.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h
new file mode 120000
index 0000000..c2ce479
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h
new file mode 120000
index 0000000..d899986
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/futex.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/futex.h
new file mode 120000
index 0000000..65a5384
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/futex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/ioctl.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/ioctl.h
new file mode 120000
index 0000000..f39f568
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/ipc.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/ipc.h
new file mode 120000
index 0000000..373abd9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/local.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/local.h
new file mode 120000
index 0000000..d5bfb8f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/local.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/local.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/memory_model.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/memory_model.h
new file mode 120000
index 0000000..33ec1d1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/memory_model.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/memory_model.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/mman.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/mman.h
new file mode 120000
index 0000000..a59c902
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/mman.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/mutex-xchg.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/mutex-xchg.h
new file mode 120000
index 0000000..5ce7367
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/mutex-xchg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/mutex-xchg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/percpu.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/percpu.h
new file mode 120000
index 0000000..5a3de1c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable-nopud.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable-nopud.h
new file mode 120000
index 0000000..1d490f1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable-nopud.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/pgtable-nopud.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable.h
new file mode 120000
index 0000000..1759d89
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/pgtable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/pgtable.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/poll.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/poll.h
new file mode 120000
index 0000000..1c71c14
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h
new file mode 120000
index 0000000..3118460
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/sections.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/sections.h
new file mode 120000
index 0000000..2cff235
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/sections.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/sections.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h
new file mode 120000
index 0000000..4eb7816
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/siginfo.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/siginfo.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h
new file mode 120000
index 0000000..147734c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/tlb.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/tlb.h
new file mode 120000
index 0000000..e0fbabd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/tlb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/tlb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/topology.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/topology.h
new file mode 120000
index 0000000..73784ba
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/topology.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/topology.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm-generic/xor.h b/6/platforms/android-9/arch-x86/usr/include/asm-generic/xor.h
new file mode 120000
index 0000000..6df63bc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm-generic/xor.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/asm-generic/xor.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/a.out.h b/6/platforms/android-9/arch-x86/usr/include/asm/a.out.h
new file mode 100644
index 0000000..6aecff7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/a.out.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_A_OUT_H
+#define _ASM_X86_A_OUT_H
+
+struct exec
+{
+ unsigned int a_info;
+ unsigned a_text;
+ unsigned a_data;
+ unsigned a_bss;
+ unsigned a_syms;
+ unsigned a_entry;
+ unsigned a_trsize;
+ unsigned a_drsize;
+};
+
+#define N_TRSIZE(a) ((a).a_trsize)
+#define N_DRSIZE(a) ((a).a_drsize)
+#define N_SYMSIZE(a) ((a).a_syms)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/acpi.h b/6/platforms/android-9/arch-x86/usr/include/asm/acpi.h
new file mode 100644
index 0000000..0115ce9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/acpi.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_ACPI_H
+#define _ASM_X86_ACPI_H
+
+#include "acpi_64.h"
+
+#include <asm/processor.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/acpi_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/acpi_32.h
new file mode 100644
index 0000000..fe0043c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/acpi_32.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_ACPI_H
+#define _ASM_ACPI_H
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/alternative.h b/6/platforms/android-9/arch-x86/usr/include/asm/alternative.h
new file mode 100644
index 0000000..17c1dc5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/alternative.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "alternative_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/alternative_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/alternative_32.h
new file mode 100644
index 0000000..ef13111
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/alternative_32.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_ALTERNATIVE_H
+#define _I386_ALTERNATIVE_H
+
+#include <asm/types.h>
+#include <linux/stddef.h>
+#include <linux/types.h>
+
+struct alt_instr {
+ u8 *instr;
+ u8 *replacement;
+ u8 cpuid;
+ u8 instrlen;
+ u8 replacementlen;
+ u8 pad;
+};
+
+struct module;
+#define alternative(oldinstr, newinstr, feature) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature) : "memory")
+#define alternative_input(oldinstr, newinstr, feature, input...) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature), ##input)
+#define alternative_io(oldinstr, newinstr, feature, output, input...) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c[feat]\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" : output : [feat] "i" (feature), ##input)
+#define ASM_OUTPUT2(a, b) a, b
+#define LOCK_PREFIX ""
+
+#define __parainstructions NULL
+#define __parainstructions_end NULL
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/apic.h b/6/platforms/android-9/arch-x86/usr/include/asm/apic.h
new file mode 100644
index 0000000..5cb7181
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/apic.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "apic_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/apic_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/apic_32.h
new file mode 100644
index 0000000..02c9d9b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/apic_32.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_APIC_H
+#define __ASM_APIC_H
+
+#include <linux/pm.h>
+#include <linux/delay.h>
+#include <asm/fixmap.h>
+#include <asm/apicdef.h>
+#include <asm/processor.h>
+#include <asm/system.h>
+
+#define Dprintk(x...)
+
+#define APIC_QUIET 0
+#define APIC_VERBOSE 1
+#define APIC_DEBUG 2
+
+#define apic_printk(v, s, a...) do { if ((v) <= apic_verbosity) printk(s, ##a); } while (0)
+
+#define local_apic_timer_c2_ok 1
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/apicdef.h b/6/platforms/android-9/arch-x86/usr/include/asm/apicdef.h
new file mode 100644
index 0000000..bd19f5a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/apicdef.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "apicdef_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/apicdef_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/apicdef_32.h
new file mode 100644
index 0000000..a4a5edb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/apicdef_32.h
@@ -0,0 +1,372 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_APICDEF_H
+#define __ASM_APICDEF_H
+
+#define APIC_DEFAULT_PHYS_BASE 0xfee00000
+
+#define APIC_ID 0x20
+#define APIC_LVR 0x30
+#define APIC_LVR_MASK 0xFF00FF
+#define GET_APIC_VERSION(x) ((x)&0xFF)
+#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF)
+#define APIC_INTEGRATED(x) ((x)&0xF0)
+#define APIC_XAPIC(x) ((x) >= 0x14)
+#define APIC_TASKPRI 0x80
+#define APIC_TPRI_MASK 0xFF
+#define APIC_ARBPRI 0x90
+#define APIC_ARBPRI_MASK 0xFF
+#define APIC_PROCPRI 0xA0
+#define APIC_EOI 0xB0
+#define APIC_EIO_ACK 0x0
+#define APIC_RRR 0xC0
+#define APIC_LDR 0xD0
+#define APIC_LDR_MASK (0xFF<<24)
+#define GET_APIC_LOGICAL_ID(x) (((x)>>24)&0xFF)
+#define SET_APIC_LOGICAL_ID(x) (((x)<<24))
+#define APIC_ALL_CPUS 0xFF
+#define APIC_DFR 0xE0
+#define APIC_DFR_CLUSTER 0x0FFFFFFFul
+#define APIC_DFR_FLAT 0xFFFFFFFFul
+#define APIC_SPIV 0xF0
+#define APIC_SPIV_FOCUS_DISABLED (1<<9)
+#define APIC_SPIV_APIC_ENABLED (1<<8)
+#define APIC_ISR 0x100
+#define APIC_ISR_NR 0x8
+#define APIC_TMR 0x180
+#define APIC_IRR 0x200
+#define APIC_ESR 0x280
+#define APIC_ESR_SEND_CS 0x00001
+#define APIC_ESR_RECV_CS 0x00002
+#define APIC_ESR_SEND_ACC 0x00004
+#define APIC_ESR_RECV_ACC 0x00008
+#define APIC_ESR_SENDILL 0x00020
+#define APIC_ESR_RECVILL 0x00040
+#define APIC_ESR_ILLREGA 0x00080
+#define APIC_ICR 0x300
+#define APIC_DEST_SELF 0x40000
+#define APIC_DEST_ALLINC 0x80000
+#define APIC_DEST_ALLBUT 0xC0000
+#define APIC_ICR_RR_MASK 0x30000
+#define APIC_ICR_RR_INVALID 0x00000
+#define APIC_ICR_RR_INPROG 0x10000
+#define APIC_ICR_RR_VALID 0x20000
+#define APIC_INT_LEVELTRIG 0x08000
+#define APIC_INT_ASSERT 0x04000
+#define APIC_ICR_BUSY 0x01000
+#define APIC_DEST_LOGICAL 0x00800
+#define APIC_DM_FIXED 0x00000
+#define APIC_DM_LOWEST 0x00100
+#define APIC_DM_SMI 0x00200
+#define APIC_DM_REMRD 0x00300
+#define APIC_DM_NMI 0x00400
+#define APIC_DM_INIT 0x00500
+#define APIC_DM_STARTUP 0x00600
+#define APIC_DM_EXTINT 0x00700
+#define APIC_VECTOR_MASK 0x000FF
+#define APIC_ICR2 0x310
+#define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF)
+#define SET_APIC_DEST_FIELD(x) ((x)<<24)
+#define APIC_LVTT 0x320
+#define APIC_LVTTHMR 0x330
+#define APIC_LVTPC 0x340
+#define APIC_LVT0 0x350
+#define APIC_LVT_TIMER_BASE_MASK (0x3<<18)
+#define GET_APIC_TIMER_BASE(x) (((x)>>18)&0x3)
+#define SET_APIC_TIMER_BASE(x) (((x)<<18))
+#define APIC_TIMER_BASE_CLKIN 0x0
+#define APIC_TIMER_BASE_TMBASE 0x1
+#define APIC_TIMER_BASE_DIV 0x2
+#define APIC_LVT_TIMER_PERIODIC (1<<17)
+#define APIC_LVT_MASKED (1<<16)
+#define APIC_LVT_LEVEL_TRIGGER (1<<15)
+#define APIC_LVT_REMOTE_IRR (1<<14)
+#define APIC_INPUT_POLARITY (1<<13)
+#define APIC_SEND_PENDING (1<<12)
+#define APIC_MODE_MASK 0x700
+#define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7)
+#define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8))
+#define APIC_MODE_FIXED 0x0
+#define APIC_MODE_NMI 0x4
+#define APIC_MODE_EXTINT 0x7
+#define APIC_LVT1 0x360
+#define APIC_LVTERR 0x370
+#define APIC_TMICT 0x380
+#define APIC_TMCCT 0x390
+#define APIC_TDCR 0x3E0
+#define APIC_TDR_DIV_TMBASE (1<<2)
+#define APIC_TDR_DIV_1 0xB
+#define APIC_TDR_DIV_2 0x0
+#define APIC_TDR_DIV_4 0x1
+#define APIC_TDR_DIV_8 0x2
+#define APIC_TDR_DIV_16 0x3
+#define APIC_TDR_DIV_32 0x8
+#define APIC_TDR_DIV_64 0x9
+#define APIC_TDR_DIV_128 0xA
+
+#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
+
+#define MAX_IO_APICS 64
+
+#define u32 unsigned int
+
+struct local_apic {
+
+ struct { u32 __reserved[4]; } __reserved_01;
+
+ struct { u32 __reserved[4]; } __reserved_02;
+
+ struct {
+ u32 __reserved_1 : 24,
+ phys_apic_id : 4,
+ __reserved_2 : 4;
+ u32 __reserved[3];
+ } id;
+
+ const
+ struct {
+ u32 version : 8,
+ __reserved_1 : 8,
+ max_lvt : 8,
+ __reserved_2 : 8;
+ u32 __reserved[3];
+ } version;
+
+ struct { u32 __reserved[4]; } __reserved_03;
+
+ struct { u32 __reserved[4]; } __reserved_04;
+
+ struct { u32 __reserved[4]; } __reserved_05;
+
+ struct { u32 __reserved[4]; } __reserved_06;
+
+ struct {
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } tpr;
+
+ const
+ struct {
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } apr;
+
+ const
+ struct {
+ u32 priority : 8,
+ __reserved_1 : 24;
+ u32 __reserved_2[3];
+ } ppr;
+
+ struct {
+ u32 eoi;
+ u32 __reserved[3];
+ } eoi;
+
+ struct { u32 __reserved[4]; } __reserved_07;
+
+ struct {
+ u32 __reserved_1 : 24,
+ logical_dest : 8;
+ u32 __reserved_2[3];
+ } ldr;
+
+ struct {
+ u32 __reserved_1 : 28,
+ model : 4;
+ u32 __reserved_2[3];
+ } dfr;
+
+ struct {
+ u32 spurious_vector : 8,
+ apic_enabled : 1,
+ focus_cpu : 1,
+ __reserved_2 : 22;
+ u32 __reserved_3[3];
+ } svr;
+
+ struct {
+ u32 bitfield;
+ u32 __reserved[3];
+ } isr [8];
+
+ struct {
+ u32 bitfield;
+ u32 __reserved[3];
+ } tmr [8];
+
+ struct {
+ u32 bitfield;
+ u32 __reserved[3];
+ } irr [8];
+
+ union {
+ struct {
+ u32 send_cs_error : 1,
+ receive_cs_error : 1,
+ send_accept_error : 1,
+ receive_accept_error : 1,
+ __reserved_1 : 1,
+ send_illegal_vector : 1,
+ receive_illegal_vector : 1,
+ illegal_register_address : 1,
+ __reserved_2 : 24;
+ u32 __reserved_3[3];
+ } error_bits;
+ struct {
+ u32 errors;
+ u32 __reserved_3[3];
+ } all_errors;
+ } esr;
+
+ struct { u32 __reserved[4]; } __reserved_08;
+
+ struct { u32 __reserved[4]; } __reserved_09;
+
+ struct { u32 __reserved[4]; } __reserved_10;
+
+ struct { u32 __reserved[4]; } __reserved_11;
+
+ struct { u32 __reserved[4]; } __reserved_12;
+
+ struct { u32 __reserved[4]; } __reserved_13;
+
+ struct { u32 __reserved[4]; } __reserved_14;
+
+ struct {
+ u32 vector : 8,
+ delivery_mode : 3,
+ destination_mode : 1,
+ delivery_status : 1,
+ __reserved_1 : 1,
+ level : 1,
+ trigger : 1,
+ __reserved_2 : 2,
+ shorthand : 2,
+ __reserved_3 : 12;
+ u32 __reserved_4[3];
+ } icr1;
+
+ struct {
+ union {
+ u32 __reserved_1 : 24,
+ phys_dest : 4,
+ __reserved_2 : 4;
+ u32 __reserved_3 : 24,
+ logical_dest : 8;
+ } dest;
+ u32 __reserved_4[3];
+ } icr2;
+
+ struct {
+ u32 vector : 8,
+ __reserved_1 : 4,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ timer_mode : 1,
+ __reserved_3 : 14;
+ u32 __reserved_4[3];
+ } lvt_timer;
+
+ struct {
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ __reserved_3 : 15;
+ u32 __reserved_4[3];
+ } lvt_thermal;
+
+ struct {
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ __reserved_3 : 15;
+ u32 __reserved_4[3];
+ } lvt_pc;
+
+ struct {
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ polarity : 1,
+ remote_irr : 1,
+ trigger : 1,
+ mask : 1,
+ __reserved_2 : 15;
+ u32 __reserved_3[3];
+ } lvt_lint0;
+
+ struct {
+ u32 vector : 8,
+ delivery_mode : 3,
+ __reserved_1 : 1,
+ delivery_status : 1,
+ polarity : 1,
+ remote_irr : 1,
+ trigger : 1,
+ mask : 1,
+ __reserved_2 : 15;
+ u32 __reserved_3[3];
+ } lvt_lint1;
+
+ struct {
+ u32 vector : 8,
+ __reserved_1 : 4,
+ delivery_status : 1,
+ __reserved_2 : 3,
+ mask : 1,
+ __reserved_3 : 15;
+ u32 __reserved_4[3];
+ } lvt_error;
+
+ struct {
+ u32 initial_count;
+ u32 __reserved_2[3];
+ } timer_icr;
+
+ const
+ struct {
+ u32 curr_count;
+ u32 __reserved_2[3];
+ } timer_ccr;
+
+ struct { u32 __reserved[4]; } __reserved_16;
+
+ struct { u32 __reserved[4]; } __reserved_17;
+
+ struct { u32 __reserved[4]; } __reserved_18;
+
+ struct { u32 __reserved[4]; } __reserved_19;
+
+ struct {
+ u32 divisor : 4,
+ __reserved_1 : 28;
+ u32 __reserved_2[3];
+ } timer_dcr;
+
+ struct { u32 __reserved[4]; } __reserved_20;
+
+} __attribute__ ((packed));
+
+#undef u32
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/atomic.h b/6/platforms/android-9/arch-x86/usr/include/asm/atomic.h
new file mode 100644
index 0000000..00289cf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/atomic.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "atomic_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/atomic_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/atomic_32.h
new file mode 100644
index 0000000..677aac8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/atomic_32.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_I386_ATOMIC__
+#define __ARCH_I386_ATOMIC__
+
+#include <linux/compiler.h>
+#include <asm/processor.h>
+#include <asm/cmpxchg.h>
+
+typedef struct { int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#define atomic_read(v) ((v)->counter)
+
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), (new)))
+#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+#define atomic_inc_return(v) (atomic_add_return(1,v))
+#define atomic_dec_return(v) (atomic_sub_return(1,v))
+#define atomic_clear_mask(mask, addr) __asm__ __volatile__(LOCK_PREFIX "andl %0,%1" : : "r" (~(mask)),"m" (*addr) : "memory")
+#define atomic_set_mask(mask, addr) __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" : : "r" (mask),"m" (*(addr)) : "memory")
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+#include <asm-generic/atomic.h>
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/auxvec.h b/6/platforms/android-9/arch-x86/usr/include/asm/auxvec.h
new file mode 100644
index 0000000..f065eb1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/auxvec.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_AUXVEC_H
+#define _ASM_X86_AUXVEC_H
+
+#ifdef __i386__
+#define AT_SYSINFO 32
+#endif
+#define AT_SYSINFO_EHDR 33
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/bitops.h b/6/platforms/android-9/arch-x86/usr/include/asm/bitops.h
new file mode 100644
index 0000000..3b58565
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/bitops.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "bitops_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/bitops_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/bitops_32.h
new file mode 100644
index 0000000..fa77fe2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/bitops_32.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_BITOPS_H
+#define _I386_BITOPS_H
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
+#include <linux/compiler.h>
+#include <asm/alternative.h>
+
+#define ADDR (*(volatile long *) addr)
+
+#define smp_mb__before_clear_bit() barrier()
+#define smp_mb__after_clear_bit() barrier()
+#define test_bit(nr,addr) (__builtin_constant_p(nr) ? constant_test_bit((nr),(addr)) : variable_test_bit((nr),(addr)))
+#undef ADDR
+
+#include <asm-generic/bitops/fls64.h>
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/bug.h b/6/platforms/android-9/arch-x86/usr/include/asm/bug.h
new file mode 100644
index 0000000..9247022
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/bug.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_BUG_H
+#define _ASM_X86_BUG_H
+
+#include <asm-generic/bug.h>
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/byteorder.h b/6/platforms/android-9/arch-x86/usr/include/asm/byteorder.h
new file mode 100644
index 0000000..a839798
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/byteorder.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_BYTEORDER_H
+#define _ASM_X86_BYTEORDER_H
+
+#include <asm/types.h>
+#include <linux/compiler.h>
+
+#ifdef __GNUC__
+
+#ifdef __i386__
+
+static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
+{
+ __asm__("xchgb %b0,%h0\n\t"
+ "rorl $16,%0\n\t"
+ "xchgb %b0,%h0"
+ :"=q" (x)
+ : "0" (x));
+ return x;
+}
+
+static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 val)
+{
+ union {
+ struct { __u32 a,b; } s;
+ __u64 u;
+ } v;
+ v.u = val;
+ v.s.a = ___arch__swab32(v.s.a);
+ v.s.b = ___arch__swab32(v.s.b);
+ __asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
+ return v.u;
+}
+
+#else
+
+static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
+{
+ __asm__("bswapq %0" : "=r" (x) : "0" (x));
+ return x;
+}
+
+static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
+{
+ __asm__("bswapl %0" : "=r" (x) : "0" (x));
+ return x;
+}
+
+#endif
+
+#define __arch__swab64(x) ___arch__swab64(x)
+#define __arch__swab32(x) ___arch__swab32(x)
+
+#define __BYTEORDER_HAS_U64__
+
+#endif
+
+#include <linux/byteorder/little_endian.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cache.h b/6/platforms/android-9/arch-x86/usr/include/asm/cache.h
new file mode 100644
index 0000000..2766a71
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cache.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARCH_X86_CACHE_H
+#define _ARCH_X86_CACHE_H
+
+#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
+#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
+
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cacheflush.h b/6/platforms/android-9/arch-x86/usr/include/asm/cacheflush.h
new file mode 100644
index 0000000..028277b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cacheflush.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_CACHEFLUSH_H
+#define _ASM_X86_CACHEFLUSH_H
+
+#include <linux/mm.h>
+
+#define flush_cache_all() do { } while (0)
+#define flush_cache_mm(mm) do { } while (0)
+#define flush_cache_dup_mm(mm) do { } while (0)
+#define flush_cache_range(vma, start, end) do { } while (0)
+#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
+#define flush_dcache_page(page) do { } while (0)
+#define flush_dcache_mmap_lock(mapping) do { } while (0)
+#define flush_dcache_mmap_unlock(mapping) do { } while (0)
+#define flush_icache_range(start, end) do { } while (0)
+#define flush_icache_page(vma,pg) do { } while (0)
+#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
+#define flush_cache_vmap(start, end) do { } while (0)
+#define flush_cache_vunmap(start, end) do { } while (0)
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg.h b/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg.h
new file mode 100644
index 0000000..de059a2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "cmpxchg_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg_32.h
new file mode 100644
index 0000000..3632f4c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cmpxchg_32.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_CMPXCHG_H
+#define __ASM_CMPXCHG_H
+
+#include <linux/bitops.h>
+
+#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
+
+struct __xchg_dummy { unsigned long a[100]; };
+#define __xg(x) ((struct __xchg_dummy *)(x))
+
+#define ll_low(x) *(((unsigned int*)&(x))+0)
+#define ll_high(x) *(((unsigned int*)&(x))+1)
+#define set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit_constant(ptr, value) : __set_64bit_var(ptr, value) )
+#define _set_64bit(ptr,value) (__builtin_constant_p(value) ? __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : __set_64bit(ptr, ll_low(value), ll_high(value)) )
+
+#define cmpxchg(ptr,o,n) ({ __typeof__(*(ptr)) __ret; if (likely(boot_cpu_data.x86 > 3)) __ret = __cmpxchg((ptr), (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr))); else __ret = cmpxchg_386((ptr), (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr))); __ret; })
+#define cmpxchg_local(ptr,o,n) ({ __typeof__(*(ptr)) __ret; if (likely(boot_cpu_data.x86 > 3)) __ret = __cmpxchg_local((ptr), (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr))); else __ret = cmpxchg_386((ptr), (unsigned long)(o), (unsigned long)(n), sizeof(*(ptr))); __ret; })
+#define cmpxchg64(ptr,o,n) ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o), (unsigned long long)(n)))
+#define cmpxchg64_local(ptr,o,n) ((__typeof__(*(ptr)))__cmpxchg64_local((ptr),(unsigned long long)(o), (unsigned long long)(n)))
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature.h b/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature.h
new file mode 100644
index 0000000..47af457
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "cpufeature_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature_32.h
new file mode 100644
index 0000000..a8ebc40
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cpufeature_32.h
@@ -0,0 +1,151 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I386_CPUFEATURE_H
+#define __ASM_I386_CPUFEATURE_H
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+#include <asm/required-features.h>
+
+#define NCAPINTS 8
+
+#define X86_FEATURE_FPU (0*32+ 0)
+#define X86_FEATURE_VME (0*32+ 1)
+#define X86_FEATURE_DE (0*32+ 2)
+#define X86_FEATURE_PSE (0*32+ 3)
+#define X86_FEATURE_TSC (0*32+ 4)
+#define X86_FEATURE_MSR (0*32+ 5)
+#define X86_FEATURE_PAE (0*32+ 6)
+#define X86_FEATURE_MCE (0*32+ 7)
+#define X86_FEATURE_CX8 (0*32+ 8)
+#define X86_FEATURE_APIC (0*32+ 9)
+#define X86_FEATURE_SEP (0*32+11)
+#define X86_FEATURE_MTRR (0*32+12)
+#define X86_FEATURE_PGE (0*32+13)
+#define X86_FEATURE_MCA (0*32+14)
+#define X86_FEATURE_CMOV (0*32+15)
+#define X86_FEATURE_PAT (0*32+16)
+#define X86_FEATURE_PSE36 (0*32+17)
+#define X86_FEATURE_PN (0*32+18)
+#define X86_FEATURE_CLFLSH (0*32+19)
+#define X86_FEATURE_DS (0*32+21)
+#define X86_FEATURE_ACPI (0*32+22)
+#define X86_FEATURE_MMX (0*32+23)
+#define X86_FEATURE_FXSR (0*32+24)
+
+#define X86_FEATURE_XMM (0*32+25)
+#define X86_FEATURE_XMM2 (0*32+26)
+#define X86_FEATURE_SELFSNOOP (0*32+27)
+#define X86_FEATURE_HT (0*32+28)
+#define X86_FEATURE_ACC (0*32+29)
+#define X86_FEATURE_IA64 (0*32+30)
+
+#define X86_FEATURE_SYSCALL (1*32+11)
+#define X86_FEATURE_MP (1*32+19)
+#define X86_FEATURE_NX (1*32+20)
+#define X86_FEATURE_MMXEXT (1*32+22)
+#define X86_FEATURE_RDTSCP (1*32+27)
+#define X86_FEATURE_LM (1*32+29)
+#define X86_FEATURE_3DNOWEXT (1*32+30)
+#define X86_FEATURE_3DNOW (1*32+31)
+
+#define X86_FEATURE_RECOVERY (2*32+ 0)
+#define X86_FEATURE_LONGRUN (2*32+ 1)
+#define X86_FEATURE_LRTI (2*32+ 3)
+
+#define X86_FEATURE_CXMMX (3*32+ 0)
+#define X86_FEATURE_K6_MTRR (3*32+ 1)
+#define X86_FEATURE_CYRIX_ARR (3*32+ 2)
+#define X86_FEATURE_CENTAUR_MCR (3*32+ 3)
+
+#define X86_FEATURE_K8 (3*32+ 4)
+#define X86_FEATURE_K7 (3*32+ 5)
+#define X86_FEATURE_P3 (3*32+ 6)
+#define X86_FEATURE_P4 (3*32+ 7)
+#define X86_FEATURE_CONSTANT_TSC (3*32+ 8)
+#define X86_FEATURE_UP (3*32+ 9)
+#define X86_FEATURE_FXSAVE_LEAK (3*32+10)
+#define X86_FEATURE_ARCH_PERFMON (3*32+11)
+#define X86_FEATURE_PEBS (3*32+12)
+#define X86_FEATURE_BTS (3*32+13)
+
+#define X86_FEATURE_SYNC_RDTSC (3*32+15)
+#define X86_FEATURE_REP_GOOD (3*32+16)
+
+#define X86_FEATURE_XMM3 (4*32+ 0)
+#define X86_FEATURE_MWAIT (4*32+ 3)
+#define X86_FEATURE_DSCPL (4*32+ 4)
+#define X86_FEATURE_EST (4*32+ 7)
+#define X86_FEATURE_TM2 (4*32+ 8)
+#define X86_FEATURE_CID (4*32+10)
+#define X86_FEATURE_CX16 (4*32+13)
+#define X86_FEATURE_XTPR (4*32+14)
+#define X86_FEATURE_DCA (4*32+18)
+
+#define X86_FEATURE_XSTORE (5*32+ 2)
+#define X86_FEATURE_XSTORE_EN (5*32+ 3)
+#define X86_FEATURE_XCRYPT (5*32+ 6)
+#define X86_FEATURE_XCRYPT_EN (5*32+ 7)
+#define X86_FEATURE_ACE2 (5*32+ 8)
+#define X86_FEATURE_ACE2_EN (5*32+ 9)
+#define X86_FEATURE_PHE (5*32+ 10)
+#define X86_FEATURE_PHE_EN (5*32+ 11)
+#define X86_FEATURE_PMM (5*32+ 12)
+#define X86_FEATURE_PMM_EN (5*32+ 13)
+
+#define X86_FEATURE_LAHF_LM (6*32+ 0)
+#define X86_FEATURE_CMP_LEGACY (6*32+ 1)
+
+#define X86_FEATURE_IDA (7*32+ 0)
+
+#define cpu_has(c, bit) (__builtin_constant_p(bit) && ( (((bit)>>5)==0 && (1UL<<((bit)&31) & REQUIRED_MASK0)) || (((bit)>>5)==1 && (1UL<<((bit)&31) & REQUIRED_MASK1)) || (((bit)>>5)==2 && (1UL<<((bit)&31) & REQUIRED_MASK2)) || (((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) || (((bit)>>5)==4 && (1UL<<((bit)&31) & REQUIRED_MASK4)) || (((bit)>>5)==5 && (1UL<<((bit)&31) & REQUIRED_MASK5)) || (((bit)>>5)==6 && (1UL<<((bit)&31) & REQUIRED_MASK6)) || (((bit)>>5)==7 && (1UL<<((bit)&31) & REQUIRED_MASK7)) ) ? 1 : test_bit(bit, (c)->x86_capability))
+#define boot_cpu_has(bit) cpu_has(&boot_cpu_data, bit)
+
+#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
+#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)
+#define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
+#define cpu_has_pse boot_cpu_has(X86_FEATURE_PSE)
+#define cpu_has_tsc boot_cpu_has(X86_FEATURE_TSC)
+#define cpu_has_pae boot_cpu_has(X86_FEATURE_PAE)
+#define cpu_has_pge boot_cpu_has(X86_FEATURE_PGE)
+#define cpu_has_apic boot_cpu_has(X86_FEATURE_APIC)
+#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP)
+#define cpu_has_mtrr boot_cpu_has(X86_FEATURE_MTRR)
+#define cpu_has_mmx boot_cpu_has(X86_FEATURE_MMX)
+#define cpu_has_fxsr boot_cpu_has(X86_FEATURE_FXSR)
+#define cpu_has_xmm boot_cpu_has(X86_FEATURE_XMM)
+#define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2)
+#define cpu_has_xmm3 boot_cpu_has(X86_FEATURE_XMM3)
+#define cpu_has_ht boot_cpu_has(X86_FEATURE_HT)
+#define cpu_has_mp boot_cpu_has(X86_FEATURE_MP)
+#define cpu_has_nx boot_cpu_has(X86_FEATURE_NX)
+#define cpu_has_k6_mtrr boot_cpu_has(X86_FEATURE_K6_MTRR)
+#define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR)
+#define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
+#define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE)
+#define cpu_has_xstore_enabled boot_cpu_has(X86_FEATURE_XSTORE_EN)
+#define cpu_has_xcrypt boot_cpu_has(X86_FEATURE_XCRYPT)
+#define cpu_has_xcrypt_enabled boot_cpu_has(X86_FEATURE_XCRYPT_EN)
+#define cpu_has_ace2 boot_cpu_has(X86_FEATURE_ACE2)
+#define cpu_has_ace2_enabled boot_cpu_has(X86_FEATURE_ACE2_EN)
+#define cpu_has_phe boot_cpu_has(X86_FEATURE_PHE)
+#define cpu_has_phe_enabled boot_cpu_has(X86_FEATURE_PHE_EN)
+#define cpu_has_pmm boot_cpu_has(X86_FEATURE_PMM)
+#define cpu_has_pmm_enabled boot_cpu_has(X86_FEATURE_PMM_EN)
+#define cpu_has_ds boot_cpu_has(X86_FEATURE_DS)
+#define cpu_has_pebs boot_cpu_has(X86_FEATURE_PEBS)
+#define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLSH)
+#define cpu_has_bts boot_cpu_has(X86_FEATURE_BTS)
+
+#endif
+
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/cputime.h b/6/platforms/android-9/arch-x86/usr/include/asm/cputime.h
new file mode 100644
index 0000000..0e79e0b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/cputime.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/cputime.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/current.h b/6/platforms/android-9/arch-x86/usr/include/asm/current.h
new file mode 100644
index 0000000..b53c6fe
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/current.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "current_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/current_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/current_32.h
new file mode 100644
index 0000000..f74b371
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/current_32.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_CURRENT_H
+#define _I386_CURRENT_H
+
+#include <linux/compiler.h>
+#include <asm/percpu.h>
+
+struct task_struct;
+
+#define current get_current()
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/delay.h b/6/platforms/android-9/arch-x86/usr/include/asm/delay.h
new file mode 100644
index 0000000..7cb5f74
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/delay.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_DELAY_H
+#define _ASM_X86_DELAY_H
+
+#define udelay(n) (__builtin_constant_p(n) ? ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : __udelay(n))
+
+#define ndelay(n) (__builtin_constant_p(n) ? ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : __ndelay(n))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/desc.h b/6/platforms/android-9/arch-x86/usr/include/asm/desc.h
new file mode 100644
index 0000000..e9d448b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/desc.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "desc_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/desc_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/desc_32.h
new file mode 100644
index 0000000..f53191c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/desc_32.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
+
+#include <asm/ldt.h>
+#include <asm/segment.h>
+
+#ifndef __ASSEMBLY__
+
+#include <linux/preempt.h>
+#include <linux/smp.h>
+#include <linux/percpu.h>
+
+#include <asm/mmu.h>
+
+struct Xgt_desc_struct {
+ unsigned short size;
+ unsigned long address __attribute__((packed));
+ unsigned short pad;
+} __attribute__ ((packed));
+
+struct gdt_page
+{
+ struct desc_struct gdt[GDT_ENTRIES];
+} __attribute__((aligned(PAGE_SIZE)));
+
+#define DESCTYPE_LDT 0x82
+#define DESCTYPE_TSS 0x89
+#define DESCTYPE_TASK 0x85
+#define DESCTYPE_INT 0x8e
+#define DESCTYPE_TRAP 0x8f
+#define DESCTYPE_DPL3 0x60
+#define DESCTYPE_S 0x10
+#define load_TR_desc() native_load_tr_desc()
+#define load_gdt(dtr) native_load_gdt(dtr)
+#define load_idt(dtr) native_load_idt(dtr)
+#define load_tr(tr) __asm__ __volatile("ltr %0"::"m" (tr))
+#define load_ldt(ldt) __asm__ __volatile("lldt %0"::"m" (ldt))
+#define store_gdt(dtr) native_store_gdt(dtr)
+#define store_idt(dtr) native_store_idt(dtr)
+#define store_tr(tr) (tr = native_store_tr())
+#define store_ldt(ldt) __asm__ ("sldt %0":"=m" (ldt))
+#define load_TLS(t, cpu) native_load_tls(t, cpu)
+#define set_ldt native_set_ldt
+#define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b)
+#define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)
+#define LDT_entry_a(info) ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff))
+#define LDT_entry_b(info) (((info)->base_addr & 0xff000000) | (((info)->base_addr & 0x00ff0000) >> 16) | ((info)->limit & 0xf0000) | (((info)->read_exec_only ^ 1) << 9) | ((info)->contents << 10) | (((info)->seg_not_present ^ 1) << 15) | ((info)->seg_32bit << 22) | ((info)->limit_in_pages << 23) | ((info)->useable << 20) | 0x7000)
+#define LDT_empty(info) ( (info)->base_addr == 0 && (info)->limit == 0 && (info)->contents == 0 && (info)->read_exec_only == 1 && (info)->seg_32bit == 0 && (info)->limit_in_pages == 0 && (info)->seg_not_present == 1 && (info)->useable == 0 )
+#else
+#define GET_DESC_BASE(idx, gdt, base, lo_w, lo_b, hi_b) movb idx*8+4(gdt), lo_b; movb idx*8+7(gdt), hi_b; shll $16, base; movw idx*8+2(gdt), lo_w;
+#endif
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/desc_defs.h b/6/platforms/android-9/arch-x86/usr/include/asm/desc_defs.h
new file mode 100644
index 0000000..bf6de4a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/desc_defs.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_DESC_DEFS_H
+#define __ARCH_DESC_DEFS_H
+
+#ifndef __ASSEMBLY__
+
+#include <linux/types.h>
+
+struct desc_struct {
+ u16 limit0;
+ u16 base0;
+ unsigned base1 : 8, type : 4, s : 1, dpl : 2, p : 1;
+ unsigned limit : 4, avl : 1, l : 1, d : 1, g : 1, base2 : 8;
+} __attribute__((packed));
+
+struct n_desc_struct {
+ unsigned int a,b;
+};
+
+enum {
+ GATE_INTERRUPT = 0xE,
+ GATE_TRAP = 0xF,
+ GATE_CALL = 0xC,
+};
+
+struct gate_struct {
+ u16 offset_low;
+ u16 segment;
+ unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1;
+ u16 offset_middle;
+ u32 offset_high;
+ u32 zero1;
+} __attribute__((packed));
+
+#define PTR_LOW(x) ((unsigned long)(x) & 0xFFFF)
+#define PTR_MIDDLE(x) (((unsigned long)(x) >> 16) & 0xFFFF)
+#define PTR_HIGH(x) ((unsigned long)(x) >> 32)
+
+enum {
+ DESC_TSS = 0x9,
+ DESC_LDT = 0x2,
+};
+
+struct ldttss_desc {
+ u16 limit0;
+ u16 base0;
+ unsigned base1 : 8, type : 5, dpl : 2, p : 1;
+ unsigned limit1 : 4, zero0 : 3, g : 1, base2 : 8;
+ u32 base3;
+ u32 zero1;
+} __attribute__((packed));
+
+struct desc_ptr {
+ unsigned short size;
+ unsigned long address;
+} __attribute__((packed)) ;
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/div64.h b/6/platforms/android-9/arch-x86/usr/include/asm/div64.h
new file mode 100644
index 0000000..3fef43e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/div64.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_DIV64_H
+#define _ASM_X86_DIV64_H
+
+#include <asm-generic/div64.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping.h b/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping.h
new file mode 100644
index 0000000..3da1da6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "dma-mapping_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping_32.h
new file mode 100644
index 0000000..974a60b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dma-mapping_32.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_I386_DMA_MAPPING_H
+#define _ASM_I386_DMA_MAPPING_H
+
+#include <linux/mm.h>
+#include <linux/scatterlist.h>
+
+#include <asm/cache.h>
+#include <asm/io.h>
+#include <asm/bug.h>
+
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+
+#define dma_is_consistent(d, h) (1)
+#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dma.h b/6/platforms/android-9/arch-x86/usr/include/asm/dma.h
new file mode 100644
index 0000000..ae51e02
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dma.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "dma_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dma_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/dma_32.h
new file mode 100644
index 0000000..9c24f5e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dma_32.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_DMA_H
+#define _ASM_DMA_H
+
+#include <linux/spinlock.h>
+#include <asm/io.h>
+#include <linux/delay.h>
+
+#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
+#define dma_outb outb_p
+#else
+#define dma_outb outb
+#endif
+
+#define dma_inb inb
+
+#define MAX_DMA_CHANNELS 8
+
+#define MAX_DMA_ADDRESS (PAGE_OFFSET+0x1000000)
+
+#define IO_DMA1_BASE 0x00
+#define IO_DMA2_BASE 0xC0
+
+#define DMA1_CMD_REG 0x08
+#define DMA1_STAT_REG 0x08
+#define DMA1_REQ_REG 0x09
+#define DMA1_MASK_REG 0x0A
+#define DMA1_MODE_REG 0x0B
+#define DMA1_CLEAR_FF_REG 0x0C
+#define DMA1_TEMP_REG 0x0D
+#define DMA1_RESET_REG 0x0D
+#define DMA1_CLR_MASK_REG 0x0E
+#define DMA1_MASK_ALL_REG 0x0F
+
+#define DMA2_CMD_REG 0xD0
+#define DMA2_STAT_REG 0xD0
+#define DMA2_REQ_REG 0xD2
+#define DMA2_MASK_REG 0xD4
+#define DMA2_MODE_REG 0xD6
+#define DMA2_CLEAR_FF_REG 0xD8
+#define DMA2_TEMP_REG 0xDA
+#define DMA2_RESET_REG 0xDA
+#define DMA2_CLR_MASK_REG 0xDC
+#define DMA2_MASK_ALL_REG 0xDE
+
+#define DMA_ADDR_0 0x00
+#define DMA_ADDR_1 0x02
+#define DMA_ADDR_2 0x04
+#define DMA_ADDR_3 0x06
+#define DMA_ADDR_4 0xC0
+#define DMA_ADDR_5 0xC4
+#define DMA_ADDR_6 0xC8
+#define DMA_ADDR_7 0xCC
+
+#define DMA_CNT_0 0x01
+#define DMA_CNT_1 0x03
+#define DMA_CNT_2 0x05
+#define DMA_CNT_3 0x07
+#define DMA_CNT_4 0xC2
+#define DMA_CNT_5 0xC6
+#define DMA_CNT_6 0xCA
+#define DMA_CNT_7 0xCE
+
+#define DMA_PAGE_0 0x87
+#define DMA_PAGE_1 0x83
+#define DMA_PAGE_2 0x81
+#define DMA_PAGE_3 0x82
+#define DMA_PAGE_5 0x8B
+#define DMA_PAGE_6 0x89
+#define DMA_PAGE_7 0x8A
+
+#define DMA_MODE_READ 0x44
+#define DMA_MODE_WRITE 0x48
+#define DMA_MODE_CASCADE 0xC0
+
+#define DMA_AUTOINIT 0x10
+
+#define isa_dma_bridge_buggy (0)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2.h b/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2.h
new file mode 100644
index 0000000..c937591
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "dwarf2_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2_32.h
new file mode 100644
index 0000000..a2dc3f1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/dwarf2_32.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _DWARF2_H
+#define _DWARF2_H
+
+#ifndef __ASSEMBLY__
+#warning "asm/dwarf2.h should be only included in pure assembly files"
+#endif
+
+#define CFI_STARTPROC ignore
+#define CFI_ENDPROC ignore
+#define CFI_DEF_CFA ignore
+#define CFI_DEF_CFA_REGISTER ignore
+#define CFI_DEF_CFA_OFFSET ignore
+#define CFI_ADJUST_CFA_OFFSET ignore
+#define CFI_OFFSET ignore
+#define CFI_REL_OFFSET ignore
+#define CFI_REGISTER ignore
+#define CFI_RESTORE ignore
+#define CFI_REMEMBER_STATE ignore
+#define CFI_RESTORE_STATE ignore
+#define CFI_UNDEFINED ignore
+#define CFI_SIGNAL_FRAME ignore
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/e820.h b/6/platforms/android-9/arch-x86/usr/include/asm/e820.h
new file mode 100644
index 0000000..8a88ff0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/e820.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_E820_H
+#define __ASM_E820_H
+#define E820MAP 0x2d0
+#define E820MAX 128
+#define E820NR 0x1e8
+
+#define E820_RAM 1
+#define E820_RESERVED 2
+#define E820_ACPI 3
+#define E820_NVS 4
+
+#ifndef __ASSEMBLY__
+struct e820entry {
+ __u64 addr;
+ __u64 size;
+ __u32 type;
+} __attribute__((packed));
+
+struct e820map {
+ __u32 nr_map;
+ struct e820entry map[E820MAX];
+};
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/elf.h b/6/platforms/android-9/arch-x86/usr/include/asm/elf.h
new file mode 100644
index 0000000..6c6fbbf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/elf.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_ELF_H
+#define _ASM_X86_ELF_H
+
+#include <asm/ptrace.h>
+#include <asm/user.h>
+#include <asm/auxvec.h>
+
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_i387_struct elf_fpregset_t;
+
+#ifdef __i386__
+
+typedef struct user_fxsr_struct elf_fpxregset_t;
+
+#define R_386_NONE 0
+#define R_386_32 1
+#define R_386_PC32 2
+#define R_386_GOT32 3
+#define R_386_PLT32 4
+#define R_386_COPY 5
+#define R_386_GLOB_DAT 6
+#define R_386_JMP_SLOT 7
+#define R_386_RELATIVE 8
+#define R_386_GOTOFF 9
+#define R_386_GOTPC 10
+#define R_386_NUM 11
+
+#define ELF_CLASS ELFCLASS32
+#define ELF_DATA ELFDATA2LSB
+#define ELF_ARCH EM_386
+
+#else
+
+#define R_X86_64_NONE 0
+#define R_X86_64_64 1
+#define R_X86_64_PC32 2
+#define R_X86_64_GOT32 3
+#define R_X86_64_PLT32 4
+#define R_X86_64_COPY 5
+#define R_X86_64_GLOB_DAT 6
+#define R_X86_64_JUMP_SLOT 7
+#define R_X86_64_RELATIVE 8
+#define R_X86_64_GOTPCREL 9
+#define R_X86_64_32 10
+#define R_X86_64_32S 11
+#define R_X86_64_16 12
+#define R_X86_64_PC16 13
+#define R_X86_64_8 14
+#define R_X86_64_PC8 15
+
+#define R_X86_64_NUM 16
+
+#define ELF_CLASS ELFCLASS64
+#define ELF_DATA ELFDATA2LSB
+#define ELF_ARCH EM_X86_64
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/errno.h b/6/platforms/android-9/arch-x86/usr/include/asm/errno.h
new file mode 100644
index 0000000..e8f7425
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/errno.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/errno.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/fcntl.h b/6/platforms/android-9/arch-x86/usr/include/asm/fcntl.h
new file mode 100644
index 0000000..00630ad
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/fcntl.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/fcntl.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/fixmap.h b/6/platforms/android-9/arch-x86/usr/include/asm/fixmap.h
new file mode 100644
index 0000000..19b9cc8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/fixmap.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "fixmap_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/fixmap_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/fixmap_32.h
new file mode 100644
index 0000000..95de8a0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/fixmap_32.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_FIXMAP_H
+#define _ASM_FIXMAP_H
+
+#define FIXADDR_USER_START __fix_to_virt(FIX_VDSO)
+#define FIXADDR_USER_END __fix_to_virt(FIX_VDSO - 1)
+
+#ifndef __ASSEMBLY__
+#include <linux/kernel.h>
+#include <asm/acpi.h>
+#include <asm/apicdef.h>
+#include <asm/page.h>
+
+enum fixed_addresses {
+ FIX_HOLE,
+ FIX_VDSO,
+ FIX_DBGP_BASE,
+ FIX_EARLYCON_MEM_BASE,
+ __end_of_permanent_fixed_addresses,
+
+#define NR_FIX_BTMAPS 16
+ FIX_BTMAP_END = __end_of_permanent_fixed_addresses,
+ FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1,
+ FIX_WP_TEST,
+ __end_of_fixed_addresses
+};
+
+#define set_fixmap(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL)
+
+#define set_fixmap_nocache(idx, phys) __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
+
+#define clear_fixmap(idx) __set_fixmap(idx, 0, __pgprot(0))
+
+#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP)
+
+#define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT)
+#define __FIXADDR_BOOT_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)
+#define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE)
+#define FIXADDR_BOOT_START (FIXADDR_TOP - __FIXADDR_BOOT_SIZE)
+
+#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
+#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
+
+#endif
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/genapic.h b/6/platforms/android-9/arch-x86/usr/include/asm/genapic.h
new file mode 100644
index 0000000..84e687e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/genapic.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "genapic_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/genapic_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/genapic_32.h
new file mode 100644
index 0000000..07801ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/genapic_32.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENAPIC_H
+#define _ASM_GENAPIC_H 1
+
+#include <asm/mpspec.h>
+
+struct mpc_config_translation;
+struct mpc_config_bus;
+struct mp_config_table;
+struct mpc_config_processor;
+
+struct genapic {
+ char *name;
+ int (*probe)(void);
+
+ int (*apic_id_registered)(void);
+ cpumask_t (*target_cpus)(void);
+ int int_delivery_mode;
+ int int_dest_mode;
+ int ESR_DISABLE;
+ int apic_destination_logical;
+ unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
+ unsigned long (*check_apicid_present)(int apicid);
+ int no_balance_irq;
+ int no_ioapic_check;
+ void (*init_apic_ldr)(void);
+ physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
+
+ void (*setup_apic_routing)(void);
+ int (*multi_timer_check)(int apic, int irq);
+ int (*apicid_to_node)(int logical_apicid);
+ int (*cpu_to_logical_apicid)(int cpu);
+ int (*cpu_present_to_apicid)(int mps_cpu);
+ physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
+ int (*mpc_apic_id)(struct mpc_config_processor *m,
+ struct mpc_config_translation *t);
+ void (*setup_portio_remap)(void);
+ int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
+ void (*enable_apic_mode)(void);
+ u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
+
+ void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *,
+ struct mpc_config_translation *);
+ void (*mpc_oem_pci_bus)(struct mpc_config_bus *,
+ struct mpc_config_translation *);
+
+ int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
+ char *productid);
+ int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
+
+ unsigned (*get_apic_id)(unsigned long x);
+ unsigned long apic_id_mask;
+ unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
+
+};
+
+#define APICFUNC(x) .x = x,
+
+#define IPIFUNC(x)
+
+#define APIC_INIT(aname, aprobe) { .name = aname, .probe = aprobe, .int_delivery_mode = INT_DELIVERY_MODE, .int_dest_mode = INT_DEST_MODE, .no_balance_irq = NO_BALANCE_IRQ, .ESR_DISABLE = esr_disable, .apic_destination_logical = APIC_DEST_LOGICAL, APICFUNC(apic_id_registered) APICFUNC(target_cpus) APICFUNC(check_apicid_used) APICFUNC(check_apicid_present) APICFUNC(init_apic_ldr) APICFUNC(ioapic_phys_id_map) APICFUNC(setup_apic_routing) APICFUNC(multi_timer_check) APICFUNC(apicid_to_node) APICFUNC(cpu_to_logical_apicid) APICFUNC(cpu_present_to_apicid) APICFUNC(apicid_to_cpu_present) APICFUNC(mpc_apic_id) APICFUNC(setup_portio_remap) APICFUNC(check_phys_apicid_present) APICFUNC(mpc_oem_bus_info) APICFUNC(mpc_oem_pci_bus) APICFUNC(mps_oem_check) APICFUNC(get_apic_id) .apic_id_mask = APIC_ID_MASK, APICFUNC(cpu_mask_to_apicid) APICFUNC(acpi_madt_oem_check) IPIFUNC(send_IPI_mask) IPIFUNC(send_IPI_allbutself) IPIFUNC(send_IPI_all) APICFUNC(enable_apic_mode) APICFUNC(phys_pkg_id) }
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/hardirq.h b/6/platforms/android-9/arch-x86/usr/include/asm/hardirq.h
new file mode 100644
index 0000000..ee224f1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/hardirq.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "hardirq_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/hardirq_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/hardirq_32.h
new file mode 100644
index 0000000..b682f66
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/hardirq_32.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_HARDIRQ_H
+#define __ASM_HARDIRQ_H
+
+#include <linux/threads.h>
+#include <linux/irq.h>
+
+typedef struct {
+ unsigned int __softirq_pending;
+ unsigned long idle_timestamp;
+ unsigned int __nmi_count;
+ unsigned int apic_timer_irqs;
+ unsigned int irq0_irqs;
+ unsigned int irq_resched_count;
+ unsigned int irq_call_count;
+ unsigned int irq_tlb_count;
+ unsigned int irq_thermal_count;
+ unsigned int irq_spurious_count;
+} ____cacheline_aligned irq_cpustat_t;
+
+#define __ARCH_IRQ_STAT
+#define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)
+
+#include <linux/irq_cpustat.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/highmem.h b/6/platforms/android-9/arch-x86/usr/include/asm/highmem.h
new file mode 100644
index 0000000..f738851
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/highmem.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_HIGHMEM_H
+#define _ASM_HIGHMEM_H
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq.h b/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq.h
new file mode 100644
index 0000000..ed937c7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "hw_irq_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq_32.h
new file mode 100644
index 0000000..6f584fc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/hw_irq_32.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_HW_IRQ_H
+#define _ASM_HW_IRQ_H
+
+#include <linux/profile.h>
+#include <asm/atomic.h>
+#include <asm/irq.h>
+#include <asm/sections.h>
+
+#define NMI_VECTOR 0x02
+
+#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/i387.h b/6/platforms/android-9/arch-x86/usr/include/asm/i387.h
new file mode 100644
index 0000000..2692557
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/i387.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "i387_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/i387_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/i387_32.h
new file mode 100644
index 0000000..8563fb9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/i387_32.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I386_I387_H
+#define __ASM_I386_I387_H
+
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+#include <asm/processor.h>
+#include <asm/sigcontext.h>
+#include <asm/user.h>
+
+#define restore_fpu(tsk) alternative_input( "nop ; frstor %1", "fxrstor %1", X86_FEATURE_FXSR, "m" ((tsk)->thread.i387.fxsave))
+
+#define kernel_fpu_end() do { stts(); preempt_enable(); } while(0)
+
+#define safe_address (kstat_cpu(0).cpustat.user)
+
+#define __unlazy_fpu( tsk ) do { if (task_thread_info(tsk)->status & TS_USEDFPU) { __save_init_fpu(tsk); stts(); } else tsk->fpu_counter = 0; } while (0)
+#define __clear_fpu( tsk ) do { if (task_thread_info(tsk)->status & TS_USEDFPU) { asm volatile("fnclex ; fwait"); task_thread_info(tsk)->status &= ~TS_USEDFPU; stts(); } } while (0)
+#define unlazy_fpu( tsk ) do { preempt_disable(); __unlazy_fpu(tsk); preempt_enable(); } while (0)
+#define clear_fpu( tsk ) do { preempt_disable(); __clear_fpu( tsk ); preempt_enable(); } while (0)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/i8253.h b/6/platforms/android-9/arch-x86/usr/include/asm/i8253.h
new file mode 100644
index 0000000..93b1d1a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/i8253.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I8253_H__
+#define __ASM_I8253_H__
+
+#define PIT_MODE 0x43
+#define PIT_CH0 0x40
+#define PIT_CH2 0x42
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/i8259.h b/6/platforms/android-9/arch-x86/usr/include/asm/i8259.h
new file mode 100644
index 0000000..c2366ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/i8259.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I8259_H__
+#define __ASM_I8259_H__
+
+#define __byte(x,y) (((unsigned char *) &(y))[x])
+#define cached_master_mask (__byte(0, cached_irq_mask))
+#define cached_slave_mask (__byte(1, cached_irq_mask))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ia32_unistd.h b/6/platforms/android-9/arch-x86/usr/include/asm/ia32_unistd.h
new file mode 100644
index 0000000..848d228
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ia32_unistd.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_64_IA32_UNISTD_H_
+#define _ASM_X86_64_IA32_UNISTD_H_
+
+#define __NR_ia32_restart_syscall 0
+#define __NR_ia32_exit 1
+#define __NR_ia32_read 3
+#define __NR_ia32_write 4
+#define __NR_ia32_sigreturn 119
+#define __NR_ia32_rt_sigreturn 173
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/io.h b/6/platforms/android-9/arch-x86/usr/include/asm/io.h
new file mode 100644
index 0000000..ea52e66
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/io.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "io_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/io_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/io_32.h
new file mode 100644
index 0000000..f7e0025
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/io_32.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_IO_H
+#define _ASM_IO_H
+
+#include <linux/string.h>
+#include <linux/compiler.h>
+
+#define IO_SPACE_LIMIT 0xffff
+
+#define XQUAD_PORTIO_BASE 0xfe400000
+#define XQUAD_PORTIO_QUAD 0x40000
+
+#ifdef REALLY_SLOW_IO
+#endif
+#define __BUILDIO(bwl,bw,type) static inline void out##bwl(unsigned type value, int port) { out##bwl##_local(value, port); } static inline unsigned type in##bwl(int port) { return in##bwl##_local(port); }
+#define BUILDIO(bwl,bw,type) static inline void out##bwl##_local(unsigned type value, int port) { __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); } static inline unsigned type in##bwl##_local(int port) { unsigned type value; __asm__ __volatile__("in" #bwl " %w1, %" #bw "0" : "=a"(value) : "Nd"(port)); return value; } static inline void out##bwl##_local_p(unsigned type value, int port) { out##bwl##_local(value, port); slow_down_io(); } static inline unsigned type in##bwl##_local_p(int port) { unsigned type value = in##bwl##_local(port); slow_down_io(); return value; } __BUILDIO(bwl,bw,type) static inline void out##bwl##_p(unsigned type value, int port) { out##bwl(value, port); slow_down_io(); } static inline unsigned type in##bwl##_p(int port) { unsigned type value = in##bwl(port); slow_down_io(); return value; } static inline void outs##bwl(int port, const void *addr, unsigned long count) { __asm__ __volatile__("rep; outs" #bwl : "+S"(addr), "+c"(count) : "d"(port)); } static inline void ins##bwl(int port, void *addr, unsigned long count) { __asm__ __volatile__("rep; ins" #bwl : "+D"(addr), "+c"(count) : "d"(port)); }
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/io_apic.h b/6/platforms/android-9/arch-x86/usr/include/asm/io_apic.h
new file mode 100644
index 0000000..ed608d3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/io_apic.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "io_apic_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/io_apic_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/io_apic_32.h
new file mode 100644
index 0000000..cc858a3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/io_apic_32.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_IO_APIC_H
+#define __ASM_IO_APIC_H
+
+#include <asm/types.h>
+#include <asm/mpspec.h>
+#include <asm/apicdef.h>
+
+union IO_APIC_reg_00 {
+ u32 raw;
+ struct {
+ u32 __reserved_2 : 14,
+ LTS : 1,
+ delivery_type : 1,
+ __reserved_1 : 8,
+ ID : 8;
+ } __attribute__ ((packed)) bits;
+};
+
+union IO_APIC_reg_01 {
+ u32 raw;
+ struct {
+ u32 version : 8,
+ __reserved_2 : 7,
+ PRQ : 1,
+ entries : 8,
+ __reserved_1 : 8;
+ } __attribute__ ((packed)) bits;
+};
+
+union IO_APIC_reg_02 {
+ u32 raw;
+ struct {
+ u32 __reserved_2 : 24,
+ arbitration : 4,
+ __reserved_1 : 4;
+ } __attribute__ ((packed)) bits;
+};
+
+union IO_APIC_reg_03 {
+ u32 raw;
+ struct {
+ u32 boot_DT : 1,
+ __reserved_1 : 31;
+ } __attribute__ ((packed)) bits;
+};
+
+enum ioapic_irq_destination_types {
+ dest_Fixed = 0,
+ dest_LowestPrio = 1,
+ dest_SMI = 2,
+ dest__reserved_1 = 3,
+ dest_NMI = 4,
+ dest_INIT = 5,
+ dest__reserved_2 = 6,
+ dest_ExtINT = 7
+};
+
+struct IO_APIC_route_entry {
+ __u32 vector : 8,
+ delivery_mode : 3,
+ dest_mode : 1,
+ delivery_status : 1,
+ polarity : 1,
+ irr : 1,
+ trigger : 1,
+ mask : 1,
+ __reserved_2 : 15;
+
+ union { struct { __u32
+ __reserved_1 : 24,
+ physical_dest : 4,
+ __reserved_2 : 4;
+ } physical;
+
+ struct { __u32
+ __reserved_1 : 24,
+ logical_dest : 8;
+ } logical;
+ } dest;
+
+} __attribute__ ((packed));
+
+#define io_apic_assign_pci_irqs 0
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ioctl.h b/6/platforms/android-9/arch-x86/usr/include/asm/ioctl.h
new file mode 100644
index 0000000..6e446b6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ioctl.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/ioctl.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ioctls.h b/6/platforms/android-9/arch-x86/usr/include/asm/ioctls.h
new file mode 100644
index 0000000..3aedc04
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ioctls.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_IOCTLS_H
+#define _ASM_X86_IOCTLS_H
+
+#include <asm/ioctl.h>
+
+#define TCGETS 0x5401
+#define TCSETS 0x5402
+#define TCSETSW 0x5403
+#define TCSETSF 0x5404
+#define TCGETA 0x5405
+#define TCSETA 0x5406
+#define TCSETAW 0x5407
+#define TCSETAF 0x5408
+#define TCSBRK 0x5409
+#define TCXONC 0x540A
+#define TCFLSH 0x540B
+#define TIOCEXCL 0x540C
+#define TIOCNXCL 0x540D
+#define TIOCSCTTY 0x540E
+#define TIOCGPGRP 0x540F
+#define TIOCSPGRP 0x5410
+#define TIOCOUTQ 0x5411
+#define TIOCSTI 0x5412
+#define TIOCGWINSZ 0x5413
+#define TIOCSWINSZ 0x5414
+#define TIOCMGET 0x5415
+#define TIOCMBIS 0x5416
+#define TIOCMBIC 0x5417
+#define TIOCMSET 0x5418
+#define TIOCGSOFTCAR 0x5419
+#define TIOCSSOFTCAR 0x541A
+#define FIONREAD 0x541B
+#define TIOCINQ FIONREAD
+#define TIOCLINUX 0x541C
+#define TIOCCONS 0x541D
+#define TIOCGSERIAL 0x541E
+#define TIOCSSERIAL 0x541F
+#define TIOCPKT 0x5420
+#define FIONBIO 0x5421
+#define TIOCNOTTY 0x5422
+#define TIOCSETD 0x5423
+#define TIOCGETD 0x5424
+#define TCSBRKP 0x5425
+
+#define TIOCSBRK 0x5427
+#define TIOCCBRK 0x5428
+#define TIOCGSID 0x5429
+#define TCGETS2 _IOR('T',0x2A, struct termios2)
+#define TCSETS2 _IOW('T',0x2B, struct termios2)
+#define TCSETSW2 _IOW('T',0x2C, struct termios2)
+#define TCSETSF2 _IOW('T',0x2D, struct termios2)
+#define TIOCGPTN _IOR('T',0x30, unsigned int)
+#define TIOCSPTLCK _IOW('T',0x31, int)
+
+#define FIONCLEX 0x5450
+#define FIOCLEX 0x5451
+#define FIOASYNC 0x5452
+#define TIOCSERCONFIG 0x5453
+#define TIOCSERGWILD 0x5454
+#define TIOCSERSWILD 0x5455
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458
+#define TIOCSERGETLSR 0x5459
+#define TIOCSERGETMULTI 0x545A
+#define TIOCSERSETMULTI 0x545B
+
+#define TIOCMIWAIT 0x545C
+#define TIOCGICOUNT 0x545D
+#define TIOCGHAYESESP 0x545E
+#define TIOCSHAYESESP 0x545F
+#define FIOQSIZE 0x5460
+
+#define TIOCPKT_DATA 0
+#define TIOCPKT_FLUSHREAD 1
+#define TIOCPKT_FLUSHWRITE 2
+#define TIOCPKT_STOP 4
+#define TIOCPKT_START 8
+#define TIOCPKT_NOSTOP 16
+#define TIOCPKT_DOSTOP 32
+
+#define TIOCSER_TEMT 0x01
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ipcbuf.h b/6/platforms/android-9/arch-x86/usr/include/asm/ipcbuf.h
new file mode 100644
index 0000000..32342c1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ipcbuf.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_IPCBUF_H
+#define _ASM_X86_IPCBUF_H
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid32_t uid;
+ __kernel_gid32_t gid;
+ __kernel_uid32_t cuid;
+ __kernel_gid32_t cgid;
+ __kernel_mode_t mode;
+ unsigned short __pad1;
+ unsigned short seq;
+ unsigned short __pad2;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/irq.h b/6/platforms/android-9/arch-x86/usr/include/asm/irq.h
new file mode 100644
index 0000000..07a331d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/irq.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "irq_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/irq_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/irq_32.h
new file mode 100644
index 0000000..3141071
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/irq_32.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_IRQ_H
+#define _ASM_IRQ_H
+
+#include <linux/sched.h>
+
+#include "irq_vectors.h"
+#include <asm/thread_info.h>
+
+#define irq_ctx_init(cpu) do { } while (0)
+#define irq_ctx_exit(cpu) do { } while (0)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/irqflags.h b/6/platforms/android-9/arch-x86/usr/include/asm/irqflags.h
new file mode 100644
index 0000000..4f84662
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/irqflags.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "irqflags_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/irqflags_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/irqflags_32.h
new file mode 100644
index 0000000..9002e44
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/irqflags_32.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_IRQFLAGS_H
+#define _ASM_IRQFLAGS_H
+#include <asm/processor-flags.h>
+
+#ifndef __ASSEMBLY__
+#endif
+#ifndef __ASSEMBLY__
+#else
+#define DISABLE_INTERRUPTS(clobbers) cli
+#define ENABLE_INTERRUPTS(clobbers) sti
+#define ENABLE_INTERRUPTS_SYSEXIT sti; sysexit
+#define INTERRUPT_RETURN iret
+#define GET_CR0_INTO_EAX movl %cr0, %eax
+#endif
+#ifndef __ASSEMBLY__
+#define raw_local_save_flags(flags) do { (flags) = __raw_local_save_flags(); } while (0)
+#define raw_local_irq_save(flags) do { (flags) = __raw_local_irq_save(); } while (0)
+#endif
+#define TRACE_IRQS_ON
+#define TRACE_IRQS_OFF
+#define LOCKDEP_SYS_EXIT
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ist.h b/6/platforms/android-9/arch-x86/usr/include/asm/ist.h
new file mode 100644
index 0000000..0abab19
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ist.h
@@ -0,0 +1,24 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_IST_H
+#define _ASM_IST_H
+
+#include <linux/types.h>
+
+struct ist_info {
+ __u32 signature;
+ __u32 command;
+ __u32 event;
+ __u32 perf_level;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/kmap_types.h b/6/platforms/android-9/arch-x86/usr/include/asm/kmap_types.h
new file mode 100644
index 0000000..c2313ee
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/kmap_types.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_KMAP_TYPES_H
+#define _ASM_X86_KMAP_TYPES_H
+
+#define D(n)
+
+enum km_type {
+D(0) KM_BOUNCE_READ,
+D(1) KM_SKB_SUNRPC_DATA,
+D(2) KM_SKB_DATA_SOFTIRQ,
+D(3) KM_USER0,
+D(4) KM_USER1,
+D(5) KM_BIO_SRC_IRQ,
+D(6) KM_BIO_DST_IRQ,
+D(7) KM_PTE0,
+D(8) KM_PTE1,
+D(9) KM_IRQ0,
+D(10) KM_IRQ1,
+D(11) KM_SOFTIRQ0,
+D(12) KM_SOFTIRQ1,
+D(13) KM_TYPE_NR
+};
+
+#undef D
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ldt.h b/6/platforms/android-9/arch-x86/usr/include/asm/ldt.h
new file mode 100644
index 0000000..19b91ab
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ldt.h
@@ -0,0 +1,41 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_LDT_H
+#define _ASM_X86_LDT_H
+
+#define LDT_ENTRIES 8192
+
+#define LDT_ENTRY_SIZE 8
+
+#ifndef __ASSEMBLY__
+
+struct user_desc {
+ unsigned int entry_number;
+ unsigned int base_addr;
+ unsigned int limit;
+ unsigned int seg_32bit:1;
+ unsigned int contents:2;
+ unsigned int read_exec_only:1;
+ unsigned int limit_in_pages:1;
+ unsigned int seg_not_present:1;
+ unsigned int useable:1;
+#ifdef __x86_64__
+ unsigned int lm:1;
+#endif
+};
+
+#define MODIFY_LDT_CONTENTS_DATA 0
+#define MODIFY_LDT_CONTENTS_STACK 1
+#define MODIFY_LDT_CONTENTS_CODE 2
+
+#endif
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/linkage.h b/6/platforms/android-9/arch-x86/usr/include/asm/linkage.h
new file mode 100644
index 0000000..f149e4d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/linkage.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "linkage_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/linkage_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/linkage_32.h
new file mode 100644
index 0000000..6db10ee
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/linkage_32.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
+
+#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
+#define FASTCALL(x) x __attribute__((regparm(3)))
+#define fastcall __attribute__((regparm(3)))
+
+#define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/local.h b/6/platforms/android-9/arch-x86/usr/include/asm/local.h
new file mode 100644
index 0000000..85080b8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/local.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "local_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/local_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/local_32.h
new file mode 100644
index 0000000..fcad753
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/local_32.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ARCH_I386_LOCAL_H
+#define _ARCH_I386_LOCAL_H
+
+#include <linux/percpu.h>
+#include <asm/system.h>
+#include <asm/atomic.h>
+
+typedef struct
+{
+ atomic_long_t a;
+} local_t;
+
+#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
+
+#define local_read(l) atomic_long_read(&(l)->a)
+#define local_set(l,i) atomic_long_set(&(l)->a, (i))
+
+#define local_inc_return(l) (local_add_return(1,l))
+#define local_dec_return(l) (local_sub_return(1,l))
+#define local_cmpxchg(l, o, n) (cmpxchg_local(&((l)->a.counter), (o), (n)))
+#define local_xchg(l, n) (xchg(&((l)->a.counter), (n)))
+#define local_add_unless(l, a, u) ({ long c, old; c = local_read(l); for (;;) { if (unlikely(c == (u))) break; old = local_cmpxchg((l), c, c + (a)); if (likely(old == c)) break; c = old; } c != (u); })
+#define local_inc_not_zero(l) local_add_unless((l), 1, 0)
+#define __local_inc(l) local_inc(l)
+#define __local_dec(l) local_dec(l)
+#define __local_add(i,l) local_add((i),(l))
+#define __local_sub(i,l) local_sub((i),(l))
+#define cpu_local_wrap_v(l) ({ local_t res__; preempt_disable(); res__ = (l); preempt_enable(); res__; })
+#define cpu_local_wrap(l) ({ preempt_disable(); l; preempt_enable(); })
+#define cpu_local_read(l) cpu_local_wrap_v(local_read(&__get_cpu_var(l)))
+#define cpu_local_set(l, i) cpu_local_wrap(local_set(&__get_cpu_var(l), (i)))
+#define cpu_local_inc(l) cpu_local_wrap(local_inc(&__get_cpu_var(l)))
+#define cpu_local_dec(l) cpu_local_wrap(local_dec(&__get_cpu_var(l)))
+#define cpu_local_add(i, l) cpu_local_wrap(local_add((i), &__get_cpu_var(l)))
+#define cpu_local_sub(i, l) cpu_local_wrap(local_sub((i), &__get_cpu_var(l)))
+#define __cpu_local_inc(l) cpu_local_inc(l)
+#define __cpu_local_dec(l) cpu_local_dec(l)
+#define __cpu_local_add(i, l) cpu_local_add((i), (l))
+#define __cpu_local_sub(i, l) cpu_local_sub((i), (l))
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/math_emu.h b/6/platforms/android-9/arch-x86/usr/include/asm/math_emu.h
new file mode 100644
index 0000000..9380d19
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/math_emu.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_MATH_EMU_H
+#define _I386_MATH_EMU_H
+
+#include <asm/sigcontext.h>
+
+struct info {
+ long ___orig_eip;
+ long ___ebx;
+ long ___ecx;
+ long ___edx;
+ long ___esi;
+ long ___edi;
+ long ___ebp;
+ long ___eax;
+ long ___ds;
+ long ___es;
+ long ___fs;
+ long ___orig_eax;
+ long ___eip;
+ long ___cs;
+ long ___eflags;
+ long ___esp;
+ long ___ss;
+ long ___vm86_es;
+ long ___vm86_ds;
+ long ___vm86_fs;
+ long ___vm86_gs;
+};
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc.h b/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc.h
new file mode 100644
index 0000000..8497877
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "mc146818rtc_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc_32.h
new file mode 100644
index 0000000..899d608
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mc146818rtc_32.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_MC146818RTC_H
+#define _ASM_MC146818RTC_H
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/processor.h>
+#include <linux/mc146818rtc.h>
+
+#ifndef RTC_PORT
+#define RTC_PORT(x) (0x70 + (x))
+#define RTC_ALWAYS_BCD 1
+#endif
+
+#ifdef __HAVE_ARCH_CMPXCHG
+
+#include <linux/smp.h>
+
+#define lock_cmos_prefix(reg) do { unsigned long cmos_flags; local_irq_save(cmos_flags); lock_cmos(reg)
+#define lock_cmos_suffix(reg) unlock_cmos(); local_irq_restore(cmos_flags); } while (0)
+#else
+#define lock_cmos_prefix(reg) do {} while (0)
+#define lock_cmos_suffix(reg) do {} while (0)
+#define lock_cmos(reg)
+#define unlock_cmos()
+#define do_i_have_lock_cmos() 0
+#define current_lock_cmos_reg() 0
+#endif
+#define CMOS_READ(addr) rtc_cmos_read(addr)
+#define CMOS_WRITE(val, addr) rtc_cmos_write(val, addr)
+
+#define RTC_IRQ 8
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mman.h b/6/platforms/android-9/arch-x86/usr/include/asm/mman.h
new file mode 100644
index 0000000..7eda319
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mman.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_MMAN_H
+#define _ASM_X86_MMAN_H
+
+#include <asm-generic/mman.h>
+
+#define MAP_32BIT 0x40
+
+#define MAP_GROWSDOWN 0x0100
+#define MAP_DENYWRITE 0x0800
+#define MAP_EXECUTABLE 0x1000
+#define MAP_LOCKED 0x2000
+#define MAP_NORESERVE 0x4000
+#define MAP_POPULATE 0x8000
+#define MAP_NONBLOCK 0x10000
+
+#define MCL_CURRENT 1
+#define MCL_FUTURE 2
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mmsegment.h b/6/platforms/android-9/arch-x86/usr/include/asm/mmsegment.h
new file mode 100644
index 0000000..76045c7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mmsegment.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_MMSEGMENT_H
+#define _ASM_MMSEGMENT_H 1
+
+typedef struct {
+ unsigned long seg;
+} mm_segment_t;
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mmu.h b/6/platforms/android-9/arch-x86/usr/include/asm/mmu.h
new file mode 100644
index 0000000..30db10a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mmu.h
@@ -0,0 +1,25 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_MMU_H
+#define _ASM_X86_MMU_H
+
+#include <linux/spinlock.h>
+#include <linux/mutex.h>
+
+typedef struct {
+ void *ldt;
+ int size;
+ struct mutex lock;
+ void *vdso;
+} mm_context_t;
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/module.h b/6/platforms/android-9/arch-x86/usr/include/asm/module.h
new file mode 100644
index 0000000..ff292d4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/module.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "module_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/module_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/module_32.h
new file mode 100644
index 0000000..2e26729
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/module_32.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_I386_MODULE_H
+#define _ASM_I386_MODULE_H
+
+struct mod_arch_specific
+{
+};
+
+#define Elf_Shdr Elf32_Shdr
+#define Elf_Sym Elf32_Sym
+#define Elf_Ehdr Elf32_Ehdr
+
+#error unknown processor family
+
+#define MODULE_STACKSIZE ""
+
+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_STACKSIZE
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mpspec.h b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec.h
new file mode 100644
index 0000000..2336504
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "mpspec_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_32.h
new file mode 100644
index 0000000..7acbe8a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_32.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MPSPEC_H
+#define __ASM_MPSPEC_H
+
+#include <linux/cpumask.h>
+#include <asm/mpspec_def.h>
+#include <mach_mpspec.h>
+
+#define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS)
+
+struct physid_mask
+{
+ unsigned long mask[PHYSID_ARRAY_SIZE];
+};
+
+typedef struct physid_mask physid_mask_t;
+
+#define physid_set(physid, map) set_bit(physid, (map).mask)
+#define physid_clear(physid, map) clear_bit(physid, (map).mask)
+#define physid_isset(physid, map) test_bit(physid, (map).mask)
+#define physid_test_and_set(physid, map) test_and_set_bit(physid, (map).mask)
+
+#define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
+#define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_APICS)
+#define physids_clear(map) bitmap_zero((map).mask, MAX_APICS)
+#define physids_complement(dst, src) bitmap_complement((dst).mask,(src).mask, MAX_APICS)
+#define physids_empty(map) bitmap_empty((map).mask, MAX_APICS)
+#define physids_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, MAX_APICS)
+#define physids_weight(map) bitmap_weight((map).mask, MAX_APICS)
+#define physids_shift_right(d, s, n) bitmap_shift_right((d).mask, (s).mask, n, MAX_APICS)
+#define physids_shift_left(d, s, n) bitmap_shift_left((d).mask, (s).mask, n, MAX_APICS)
+#define physids_coerce(map) ((map).mask[0])
+
+#define physids_promote(physids) ({ physid_mask_t __physid_mask = PHYSID_MASK_NONE; __physid_mask.mask[0] = physids; __physid_mask; })
+
+#define physid_mask_of_physid(physid) ({ physid_mask_t __physid_mask = PHYSID_MASK_NONE; physid_set(physid, __physid_mask); __physid_mask; })
+
+#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
+#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
+
+#endif
+
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_def.h b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_def.h
new file mode 100644
index 0000000..1f15363
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/mpspec_def.h
@@ -0,0 +1,171 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MPSPEC_DEF_H
+#define __ASM_MPSPEC_DEF_H
+
+#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
+
+#define MAX_MPC_ENTRY 1024
+#define MAX_APICS 256
+
+struct intel_mp_floating
+{
+ char mpf_signature[4];
+ unsigned long mpf_physptr;
+ unsigned char mpf_length;
+ unsigned char mpf_specification;
+ unsigned char mpf_checksum;
+ unsigned char mpf_feature1;
+ unsigned char mpf_feature2;
+ unsigned char mpf_feature3;
+ unsigned char mpf_feature4;
+ unsigned char mpf_feature5;
+};
+
+struct mp_config_table
+{
+ char mpc_signature[4];
+#define MPC_SIGNATURE "PCMP"
+ unsigned short mpc_length;
+ char mpc_spec;
+ char mpc_checksum;
+ char mpc_oem[8];
+ char mpc_productid[12];
+ unsigned long mpc_oemptr;
+ unsigned short mpc_oemsize;
+ unsigned short mpc_oemcount;
+ unsigned long mpc_lapic;
+ unsigned long reserved;
+};
+
+#define MP_PROCESSOR 0
+#define MP_BUS 1
+#define MP_IOAPIC 2
+#define MP_INTSRC 3
+#define MP_LINTSRC 4
+#define MP_TRANSLATION 192
+
+struct mpc_config_processor
+{
+ unsigned char mpc_type;
+ unsigned char mpc_apicid;
+ unsigned char mpc_apicver;
+ unsigned char mpc_cpuflag;
+#define CPU_ENABLED 1
+#define CPU_BOOTPROCESSOR 2
+ unsigned long mpc_cpufeature;
+#define CPU_STEPPING_MASK 0x0F
+#define CPU_MODEL_MASK 0xF0
+#define CPU_FAMILY_MASK 0xF00
+ unsigned long mpc_featureflag;
+ unsigned long mpc_reserved[2];
+};
+
+struct mpc_config_bus
+{
+ unsigned char mpc_type;
+ unsigned char mpc_busid;
+ unsigned char mpc_bustype[6];
+};
+
+#define BUSTYPE_EISA "EISA"
+#define BUSTYPE_ISA "ISA"
+#define BUSTYPE_INTERN "INTERN"
+#define BUSTYPE_MCA "MCA"
+#define BUSTYPE_VL "VL"
+#define BUSTYPE_PCI "PCI"
+#define BUSTYPE_PCMCIA "PCMCIA"
+#define BUSTYPE_CBUS "CBUS"
+#define BUSTYPE_CBUSII "CBUSII"
+#define BUSTYPE_FUTURE "FUTURE"
+#define BUSTYPE_MBI "MBI"
+#define BUSTYPE_MBII "MBII"
+#define BUSTYPE_MPI "MPI"
+#define BUSTYPE_MPSA "MPSA"
+#define BUSTYPE_NUBUS "NUBUS"
+#define BUSTYPE_TC "TC"
+#define BUSTYPE_VME "VME"
+#define BUSTYPE_XPRESS "XPRESS"
+
+struct mpc_config_ioapic
+{
+ unsigned char mpc_type;
+ unsigned char mpc_apicid;
+ unsigned char mpc_apicver;
+ unsigned char mpc_flags;
+#define MPC_APIC_USABLE 0x01
+ unsigned long mpc_apicaddr;
+};
+
+struct mpc_config_intsrc
+{
+ unsigned char mpc_type;
+ unsigned char mpc_irqtype;
+ unsigned short mpc_irqflag;
+ unsigned char mpc_srcbus;
+ unsigned char mpc_srcbusirq;
+ unsigned char mpc_dstapic;
+ unsigned char mpc_dstirq;
+};
+
+enum mp_irq_source_types {
+ mp_INT = 0,
+ mp_NMI = 1,
+ mp_SMI = 2,
+ mp_ExtINT = 3
+};
+
+#define MP_IRQDIR_DEFAULT 0
+#define MP_IRQDIR_HIGH 1
+#define MP_IRQDIR_LOW 3
+
+struct mpc_config_lintsrc
+{
+ unsigned char mpc_type;
+ unsigned char mpc_irqtype;
+ unsigned short mpc_irqflag;
+ unsigned char mpc_srcbusid;
+ unsigned char mpc_srcbusirq;
+ unsigned char mpc_destapic;
+#define MP_APIC_ALL 0xFF
+ unsigned char mpc_destapiclint;
+};
+
+struct mp_config_oemtable
+{
+ char oem_signature[4];
+#define MPC_OEM_SIGNATURE "_OEM"
+ unsigned short oem_length;
+ char oem_rev;
+ char oem_checksum;
+ char mpc_oem[8];
+};
+
+struct mpc_config_translation
+{
+ unsigned char mpc_type;
+ unsigned char trans_len;
+ unsigned char trans_type;
+ unsigned char trans_quad;
+ unsigned char trans_global;
+ unsigned char trans_local;
+ unsigned short trans_reserved;
+};
+
+enum mp_bustype {
+ MP_BUS_ISA = 1,
+ MP_BUS_EISA,
+ MP_BUS_PCI,
+ MP_BUS_MCA,
+};
+#endif
+
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/msgbuf.h b/6/platforms/android-9/arch-x86/usr/include/asm/msgbuf.h
new file mode 100644
index 0000000..8843e78
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/msgbuf.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_MSGBUF_H
+#define _ASM_X86_MSGBUF_H
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime;
+#ifdef __i386__
+ unsigned long __unused1;
+#endif
+ __kernel_time_t msg_rtime;
+#ifdef __i386__
+ unsigned long __unused2;
+#endif
+ __kernel_time_t msg_ctime;
+#ifdef __i386__
+ unsigned long __unused3;
+#endif
+ unsigned long msg_cbytes;
+ unsigned long msg_qnum;
+ unsigned long msg_qbytes;
+ __kernel_pid_t msg_lspid;
+ __kernel_pid_t msg_lrpid;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/msr-index.h b/6/platforms/android-9/arch-x86/usr/include/asm/msr-index.h
new file mode 100644
index 0000000..8ea204e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/msr-index.h
@@ -0,0 +1,283 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_MSR_INDEX_H
+#define __ASM_MSR_INDEX_H
+
+#define MSR_EFER 0xc0000080
+#define MSR_STAR 0xc0000081
+#define MSR_LSTAR 0xc0000082
+#define MSR_CSTAR 0xc0000083
+#define MSR_SYSCALL_MASK 0xc0000084
+#define MSR_FS_BASE 0xc0000100
+#define MSR_GS_BASE 0xc0000101
+#define MSR_KERNEL_GS_BASE 0xc0000102
+
+#define _EFER_SCE 0
+#define _EFER_LME 8
+#define _EFER_LMA 10
+#define _EFER_NX 11
+
+#define EFER_SCE (1<<_EFER_SCE)
+#define EFER_LME (1<<_EFER_LME)
+#define EFER_LMA (1<<_EFER_LMA)
+#define EFER_NX (1<<_EFER_NX)
+
+#define MSR_IA32_PERFCTR0 0x000000c1
+#define MSR_IA32_PERFCTR1 0x000000c2
+#define MSR_FSB_FREQ 0x000000cd
+
+#define MSR_MTRRcap 0x000000fe
+#define MSR_IA32_BBL_CR_CTL 0x00000119
+
+#define MSR_IA32_SYSENTER_CS 0x00000174
+#define MSR_IA32_SYSENTER_ESP 0x00000175
+#define MSR_IA32_SYSENTER_EIP 0x00000176
+
+#define MSR_IA32_MCG_CAP 0x00000179
+#define MSR_IA32_MCG_STATUS 0x0000017a
+#define MSR_IA32_MCG_CTL 0x0000017b
+
+#define MSR_IA32_PEBS_ENABLE 0x000003f1
+#define MSR_IA32_DS_AREA 0x00000600
+#define MSR_IA32_PERF_CAPABILITIES 0x00000345
+
+#define MSR_MTRRfix64K_00000 0x00000250
+#define MSR_MTRRfix16K_80000 0x00000258
+#define MSR_MTRRfix16K_A0000 0x00000259
+#define MSR_MTRRfix4K_C0000 0x00000268
+#define MSR_MTRRfix4K_C8000 0x00000269
+#define MSR_MTRRfix4K_D0000 0x0000026a
+#define MSR_MTRRfix4K_D8000 0x0000026b
+#define MSR_MTRRfix4K_E0000 0x0000026c
+#define MSR_MTRRfix4K_E8000 0x0000026d
+#define MSR_MTRRfix4K_F0000 0x0000026e
+#define MSR_MTRRfix4K_F8000 0x0000026f
+#define MSR_MTRRdefType 0x000002ff
+
+#define MSR_IA32_DEBUGCTLMSR 0x000001d9
+#define MSR_IA32_LASTBRANCHFROMIP 0x000001db
+#define MSR_IA32_LASTBRANCHTOIP 0x000001dc
+#define MSR_IA32_LASTINTFROMIP 0x000001dd
+#define MSR_IA32_LASTINTTOIP 0x000001de
+
+#define MSR_IA32_MC0_CTL 0x00000400
+#define MSR_IA32_MC0_STATUS 0x00000401
+#define MSR_IA32_MC0_ADDR 0x00000402
+#define MSR_IA32_MC0_MISC 0x00000403
+
+#define MSR_P6_PERFCTR0 0x000000c1
+#define MSR_P6_PERFCTR1 0x000000c2
+#define MSR_P6_EVNTSEL0 0x00000186
+#define MSR_P6_EVNTSEL1 0x00000187
+
+#define MSR_AMD64_IBSFETCHCTL 0xc0011030
+#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
+#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032
+#define MSR_AMD64_IBSOPCTL 0xc0011033
+#define MSR_AMD64_IBSOPRIP 0xc0011034
+#define MSR_AMD64_IBSOPDATA 0xc0011035
+#define MSR_AMD64_IBSOPDATA2 0xc0011036
+#define MSR_AMD64_IBSOPDATA3 0xc0011037
+#define MSR_AMD64_IBSDCLINAD 0xc0011038
+#define MSR_AMD64_IBSDCPHYSAD 0xc0011039
+#define MSR_AMD64_IBSCTL 0xc001103a
+
+#define MSR_K8_TOP_MEM1 0xc001001a
+#define MSR_K8_TOP_MEM2 0xc001001d
+#define MSR_K8_SYSCFG 0xc0010010
+#define MSR_K8_HWCR 0xc0010015
+#define MSR_K8_ENABLE_C1E 0xc0010055
+#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000
+#define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000
+#define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818
+
+#define MSR_K7_EVNTSEL0 0xc0010000
+#define MSR_K7_PERFCTR0 0xc0010004
+#define MSR_K7_EVNTSEL1 0xc0010001
+#define MSR_K7_PERFCTR1 0xc0010005
+#define MSR_K7_EVNTSEL2 0xc0010002
+#define MSR_K7_PERFCTR2 0xc0010006
+#define MSR_K7_EVNTSEL3 0xc0010003
+#define MSR_K7_PERFCTR3 0xc0010007
+#define MSR_K7_CLK_CTL 0xc001001b
+#define MSR_K7_HWCR 0xc0010015
+#define MSR_K7_FID_VID_CTL 0xc0010041
+#define MSR_K7_FID_VID_STATUS 0xc0010042
+
+#define MSR_K6_EFER 0xc0000080
+#define MSR_K6_STAR 0xc0000081
+#define MSR_K6_WHCR 0xc0000082
+#define MSR_K6_UWCCR 0xc0000085
+#define MSR_K6_EPMR 0xc0000086
+#define MSR_K6_PSOR 0xc0000087
+#define MSR_K6_PFIR 0xc0000088
+
+#define MSR_IDT_FCR1 0x00000107
+#define MSR_IDT_FCR2 0x00000108
+#define MSR_IDT_FCR3 0x00000109
+#define MSR_IDT_FCR4 0x0000010a
+
+#define MSR_IDT_MCR0 0x00000110
+#define MSR_IDT_MCR1 0x00000111
+#define MSR_IDT_MCR2 0x00000112
+#define MSR_IDT_MCR3 0x00000113
+#define MSR_IDT_MCR4 0x00000114
+#define MSR_IDT_MCR5 0x00000115
+#define MSR_IDT_MCR6 0x00000116
+#define MSR_IDT_MCR7 0x00000117
+#define MSR_IDT_MCR_CTRL 0x00000120
+
+#define MSR_VIA_FCR 0x00001107
+#define MSR_VIA_LONGHAUL 0x0000110a
+#define MSR_VIA_RNG 0x0000110b
+#define MSR_VIA_BCR2 0x00001147
+
+#define MSR_TMTA_LONGRUN_CTRL 0x80868010
+#define MSR_TMTA_LONGRUN_FLAGS 0x80868011
+#define MSR_TMTA_LRTI_READOUT 0x80868018
+#define MSR_TMTA_LRTI_VOLT_MHZ 0x8086801a
+
+#define MSR_IA32_P5_MC_ADDR 0x00000000
+#define MSR_IA32_P5_MC_TYPE 0x00000001
+#define MSR_IA32_TSC 0x00000010
+#define MSR_IA32_PLATFORM_ID 0x00000017
+#define MSR_IA32_EBL_CR_POWERON 0x0000002a
+
+#define MSR_IA32_APICBASE 0x0000001b
+#define MSR_IA32_APICBASE_BSP (1<<8)
+#define MSR_IA32_APICBASE_ENABLE (1<<11)
+#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
+
+#define MSR_IA32_UCODE_WRITE 0x00000079
+#define MSR_IA32_UCODE_REV 0x0000008b
+
+#define MSR_IA32_PERF_STATUS 0x00000198
+#define MSR_IA32_PERF_CTL 0x00000199
+
+#define MSR_IA32_MPERF 0x000000e7
+#define MSR_IA32_APERF 0x000000e8
+
+#define MSR_IA32_THERM_CONTROL 0x0000019a
+#define MSR_IA32_THERM_INTERRUPT 0x0000019b
+#define MSR_IA32_THERM_STATUS 0x0000019c
+#define MSR_IA32_MISC_ENABLE 0x000001a0
+
+#define MSR_P6_EVNTSEL0 0x00000186
+#define MSR_P6_EVNTSEL1 0x00000187
+
+#define MSR_IA32_MCG_EAX 0x00000180
+#define MSR_IA32_MCG_EBX 0x00000181
+#define MSR_IA32_MCG_ECX 0x00000182
+#define MSR_IA32_MCG_EDX 0x00000183
+#define MSR_IA32_MCG_ESI 0x00000184
+#define MSR_IA32_MCG_EDI 0x00000185
+#define MSR_IA32_MCG_EBP 0x00000186
+#define MSR_IA32_MCG_ESP 0x00000187
+#define MSR_IA32_MCG_EFLAGS 0x00000188
+#define MSR_IA32_MCG_EIP 0x00000189
+#define MSR_IA32_MCG_RESERVED 0x0000018a
+
+#define MSR_P4_BPU_PERFCTR0 0x00000300
+#define MSR_P4_BPU_PERFCTR1 0x00000301
+#define MSR_P4_BPU_PERFCTR2 0x00000302
+#define MSR_P4_BPU_PERFCTR3 0x00000303
+#define MSR_P4_MS_PERFCTR0 0x00000304
+#define MSR_P4_MS_PERFCTR1 0x00000305
+#define MSR_P4_MS_PERFCTR2 0x00000306
+#define MSR_P4_MS_PERFCTR3 0x00000307
+#define MSR_P4_FLAME_PERFCTR0 0x00000308
+#define MSR_P4_FLAME_PERFCTR1 0x00000309
+#define MSR_P4_FLAME_PERFCTR2 0x0000030a
+#define MSR_P4_FLAME_PERFCTR3 0x0000030b
+#define MSR_P4_IQ_PERFCTR0 0x0000030c
+#define MSR_P4_IQ_PERFCTR1 0x0000030d
+#define MSR_P4_IQ_PERFCTR2 0x0000030e
+#define MSR_P4_IQ_PERFCTR3 0x0000030f
+#define MSR_P4_IQ_PERFCTR4 0x00000310
+#define MSR_P4_IQ_PERFCTR5 0x00000311
+#define MSR_P4_BPU_CCCR0 0x00000360
+#define MSR_P4_BPU_CCCR1 0x00000361
+#define MSR_P4_BPU_CCCR2 0x00000362
+#define MSR_P4_BPU_CCCR3 0x00000363
+#define MSR_P4_MS_CCCR0 0x00000364
+#define MSR_P4_MS_CCCR1 0x00000365
+#define MSR_P4_MS_CCCR2 0x00000366
+#define MSR_P4_MS_CCCR3 0x00000367
+#define MSR_P4_FLAME_CCCR0 0x00000368
+#define MSR_P4_FLAME_CCCR1 0x00000369
+#define MSR_P4_FLAME_CCCR2 0x0000036a
+#define MSR_P4_FLAME_CCCR3 0x0000036b
+#define MSR_P4_IQ_CCCR0 0x0000036c
+#define MSR_P4_IQ_CCCR1 0x0000036d
+#define MSR_P4_IQ_CCCR2 0x0000036e
+#define MSR_P4_IQ_CCCR3 0x0000036f
+#define MSR_P4_IQ_CCCR4 0x00000370
+#define MSR_P4_IQ_CCCR5 0x00000371
+#define MSR_P4_ALF_ESCR0 0x000003ca
+#define MSR_P4_ALF_ESCR1 0x000003cb
+#define MSR_P4_BPU_ESCR0 0x000003b2
+#define MSR_P4_BPU_ESCR1 0x000003b3
+#define MSR_P4_BSU_ESCR0 0x000003a0
+#define MSR_P4_BSU_ESCR1 0x000003a1
+#define MSR_P4_CRU_ESCR0 0x000003b8
+#define MSR_P4_CRU_ESCR1 0x000003b9
+#define MSR_P4_CRU_ESCR2 0x000003cc
+#define MSR_P4_CRU_ESCR3 0x000003cd
+#define MSR_P4_CRU_ESCR4 0x000003e0
+#define MSR_P4_CRU_ESCR5 0x000003e1
+#define MSR_P4_DAC_ESCR0 0x000003a8
+#define MSR_P4_DAC_ESCR1 0x000003a9
+#define MSR_P4_FIRM_ESCR0 0x000003a4
+#define MSR_P4_FIRM_ESCR1 0x000003a5
+#define MSR_P4_FLAME_ESCR0 0x000003a6
+#define MSR_P4_FLAME_ESCR1 0x000003a7
+#define MSR_P4_FSB_ESCR0 0x000003a2
+#define MSR_P4_FSB_ESCR1 0x000003a3
+#define MSR_P4_IQ_ESCR0 0x000003ba
+#define MSR_P4_IQ_ESCR1 0x000003bb
+#define MSR_P4_IS_ESCR0 0x000003b4
+#define MSR_P4_IS_ESCR1 0x000003b5
+#define MSR_P4_ITLB_ESCR0 0x000003b6
+#define MSR_P4_ITLB_ESCR1 0x000003b7
+#define MSR_P4_IX_ESCR0 0x000003c8
+#define MSR_P4_IX_ESCR1 0x000003c9
+#define MSR_P4_MOB_ESCR0 0x000003aa
+#define MSR_P4_MOB_ESCR1 0x000003ab
+#define MSR_P4_MS_ESCR0 0x000003c0
+#define MSR_P4_MS_ESCR1 0x000003c1
+#define MSR_P4_PMH_ESCR0 0x000003ac
+#define MSR_P4_PMH_ESCR1 0x000003ad
+#define MSR_P4_RAT_ESCR0 0x000003bc
+#define MSR_P4_RAT_ESCR1 0x000003bd
+#define MSR_P4_SAAT_ESCR0 0x000003ae
+#define MSR_P4_SAAT_ESCR1 0x000003af
+#define MSR_P4_SSU_ESCR0 0x000003be
+#define MSR_P4_SSU_ESCR1 0x000003bf
+
+#define MSR_P4_TBPU_ESCR0 0x000003c2
+#define MSR_P4_TBPU_ESCR1 0x000003c3
+#define MSR_P4_TC_ESCR0 0x000003c4
+#define MSR_P4_TC_ESCR1 0x000003c5
+#define MSR_P4_U2L_ESCR0 0x000003b0
+#define MSR_P4_U2L_ESCR1 0x000003b1
+
+#define MSR_CORE_PERF_FIXED_CTR0 0x00000309
+#define MSR_CORE_PERF_FIXED_CTR1 0x0000030a
+#define MSR_CORE_PERF_FIXED_CTR2 0x0000030b
+#define MSR_CORE_PERF_FIXED_CTR_CTRL 0x0000038d
+#define MSR_CORE_PERF_GLOBAL_STATUS 0x0000038e
+#define MSR_CORE_PERF_GLOBAL_CTRL 0x0000038f
+#define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x00000390
+
+#define MSR_GEODE_BUSCONT_CONF0 0x00001900
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/msr.h b/6/platforms/android-9/arch-x86/usr/include/asm/msr.h
new file mode 100644
index 0000000..f1da917
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/msr.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_X86_MSR_H_
+#define __ASM_X86_MSR_H_
+
+#include <asm/msr-index.h>
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#endif
+
+#ifdef __i386__
+
+#else
+
+#ifndef __ASSEMBLY__
+#include <linux/errno.h>
+
+#define rdmsr(msr,val1,val2) __asm__ __volatile__("rdmsr" : "=a" (val1), "=d" (val2) : "c" (msr))
+
+#define rdmsrl(msr,val) do { unsigned long a__,b__; __asm__ __volatile__("rdmsr" : "=a" (a__), "=d" (b__) : "c" (msr)); val = a__ | (b__<<32); } while(0)
+
+#define wrmsr(msr,val1,val2) __asm__ __volatile__("wrmsr" : : "c" (msr), "a" (val1), "d" (val2))
+
+#define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32)
+
+#define rdtsc(low,high) __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
+
+#define rdtscl(low) __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
+
+#define rdtscp(low,high,aux) __asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (low), "=d" (high), "=c" (aux))
+
+#define rdtscll(val) do { unsigned int __a,__d; __asm__ __volatile__("rdtsc" : "=a" (__a), "=d" (__d)); (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); } while(0)
+
+#define rdtscpll(val, aux) do { unsigned long __a, __d; __asm__ __volatile__ (".byte 0x0f,0x01,0xf9" : "=a" (__a), "=d" (__d), "=c" (aux)); (val) = (__d << 32) | __a; } while (0)
+
+#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
+
+#define write_rdtscp_aux(val) wrmsr(0xc0000103, val, 0)
+
+#define rdpmc(counter,low,high) __asm__ __volatile__("rdpmc" : "=a" (low), "=d" (high) : "c" (counter))
+
+#endif
+#endif
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/page.h b/6/platforms/android-9/arch-x86/usr/include/asm/page.h
new file mode 100644
index 0000000..e6dcf27
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/page.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifdef __i386__
+#include "page_32.h"
+#else
+#include "page_64.h"
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/page_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/page_32.h
new file mode 100644
index 0000000..718cf95
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/page_32.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_PAGE_H
+#define _I386_PAGE_H
+
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
+
+#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
+#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/param.h b/6/platforms/android-9/arch-x86/usr/include/asm/param.h
new file mode 100644
index 0000000..3fafd55
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/param.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_PARAM_H
+#define _ASM_X86_PARAM_H
+
+#ifndef HZ
+#define HZ 100
+#endif
+
+#define EXEC_PAGESIZE 4096
+
+#ifndef NOGROUP
+#define NOGROUP (-1)
+#endif
+
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/paravirt.h b/6/platforms/android-9/arch-x86/usr/include/asm/paravirt.h
new file mode 100644
index 0000000..ab0d08e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/paravirt.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_PARAVIRT_H
+#define __ASM_PARAVIRT_H
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pda.h b/6/platforms/android-9/arch-x86/usr/include/asm/pda.h
new file mode 100644
index 0000000..6711224
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pda.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef X86_64_PDA_H
+#define X86_64_PDA_H
+
+#ifndef __ASSEMBLY__
+#include <linux/stddef.h>
+#include <linux/types.h>
+#include <linux/cache.h>
+#include <asm/page.h>
+
+struct x8664_pda {
+ struct task_struct *pcurrent;
+ unsigned long data_offset;
+ unsigned long kernelstack;
+ unsigned long oldrsp;
+ int irqcount;
+ int cpunumber;
+ char *irqstackptr;
+ int nodenumber;
+ unsigned int __softirq_pending;
+ unsigned int __nmi_count;
+ short mmu_state;
+ short isidle;
+ struct mm_struct *active_mm;
+ unsigned apic_timer_irqs;
+ unsigned irq0_irqs;
+ unsigned irq_resched_count;
+ unsigned irq_call_count;
+ unsigned irq_tlb_count;
+ unsigned irq_thermal_count;
+ unsigned irq_threshold_count;
+ unsigned irq_spurious_count;
+} ____cacheline_aligned_in_smp;
+
+#define cpu_pda(i) (_cpu_pda[i])
+
+#define pda_offset(field) offsetof(struct x8664_pda, field)
+
+#define pda_to_op(op,field,val) do { typedef typeof(_proxy_pda.field) T__; if (0) { T__ tmp__; tmp__ = (val); } switch (sizeof(_proxy_pda.field)) { case 2: asm(op "w %1,%%gs:%c2" : "+m" (_proxy_pda.field) : "ri" ((T__)val), "i"(pda_offset(field))); break; case 4: asm(op "l %1,%%gs:%c2" : "+m" (_proxy_pda.field) : "ri" ((T__)val), "i" (pda_offset(field))); break; case 8: asm(op "q %1,%%gs:%c2": "+m" (_proxy_pda.field) : "ri" ((T__)val), "i"(pda_offset(field))); break; default: __bad_pda_field(); } } while (0)
+
+#define pda_from_op(op,field) ({ typeof(_proxy_pda.field) ret__; switch (sizeof(_proxy_pda.field)) { case 2: asm(op "w %%gs:%c1,%0" : "=r" (ret__) : "i" (pda_offset(field)), "m" (_proxy_pda.field)); break; case 4: asm(op "l %%gs:%c1,%0": "=r" (ret__): "i" (pda_offset(field)), "m" (_proxy_pda.field)); break; case 8: asm(op "q %%gs:%c1,%0": "=r" (ret__) : "i" (pda_offset(field)), "m" (_proxy_pda.field)); break; default: __bad_pda_field(); } ret__; })
+
+#define read_pda(field) pda_from_op("mov",field)
+#define write_pda(field,val) pda_to_op("mov",field,val)
+#define add_pda(field,val) pda_to_op("add",field,val)
+#define sub_pda(field,val) pda_to_op("sub",field,val)
+#define or_pda(field,val) pda_to_op("or",field,val)
+
+#define test_and_clear_bit_pda(bit,field) ({ int old__; asm volatile("btr %2,%%gs:%c3\n\tsbbl %0,%0" : "=r" (old__), "+m" (_proxy_pda.field) : "dIr" (bit), "i" (pda_offset(field)) : "memory"); old__; })
+
+#endif
+
+#define PDA_STACKOFFSET (5*8)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/percpu.h b/6/platforms/android-9/arch-x86/usr/include/asm/percpu.h
new file mode 100644
index 0000000..7740e67
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/percpu.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "percpu_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/percpu_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/percpu_32.h
new file mode 100644
index 0000000..21135d6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/percpu_32.h
@@ -0,0 +1,36 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_I386_PERCPU__
+#define __ARCH_I386_PERCPU__
+
+#ifdef __ASSEMBLY__
+
+#define PER_CPU(var, reg) movl $per_cpu__##var, reg
+#define PER_CPU_VAR(var) per_cpu__##var
+
+#else
+
+#include <asm-generic/percpu.h>
+#define __percpu_seg ""
+
+#define percpu_to_op(op,var,val) do { typedef typeof(var) T__; if (0) { T__ tmp__; tmp__ = (val); } switch (sizeof(var)) { case 1: asm(op "b %1,"__percpu_seg"%0" : "+m" (var) :"ri" ((T__)val)); break; case 2: asm(op "w %1,"__percpu_seg"%0" : "+m" (var) :"ri" ((T__)val)); break; case 4: asm(op "l %1,"__percpu_seg"%0" : "+m" (var) :"ri" ((T__)val)); break; default: __bad_percpu_size(); } } while (0)
+
+#define percpu_from_op(op,var) ({ typeof(var) ret__; switch (sizeof(var)) { case 1: asm(op "b "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; case 2: asm(op "w "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; case 4: asm(op "l "__percpu_seg"%1,%0" : "=r" (ret__) : "m" (var)); break; default: __bad_percpu_size(); } ret__; })
+
+#define x86_read_percpu(var) percpu_from_op("mov", per_cpu__##var)
+#define x86_write_percpu(var,val) percpu_to_op("mov", per_cpu__##var, val)
+#define x86_add_percpu(var,val) percpu_to_op("add", per_cpu__##var, val)
+#define x86_sub_percpu(var,val) percpu_to_op("sub", per_cpu__##var, val)
+#define x86_or_percpu(var,val) percpu_to_op("or", per_cpu__##var, val)
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc.h
new file mode 100644
index 0000000..d5a032b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "pgalloc_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc_32.h
new file mode 100644
index 0000000..bc0f884
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgalloc_32.h
@@ -0,0 +1,30 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_PGALLOC_H
+#define _I386_PGALLOC_H
+
+#include <linux/threads.h>
+#include <linux/mm.h>
+
+#define paravirt_alloc_pt(mm, pfn) do { } while (0)
+#define paravirt_alloc_pd(pfn) do { } while (0)
+#define paravirt_alloc_pd(pfn) do { } while (0)
+#define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0)
+#define paravirt_release_pt(pfn) do { } while (0)
+#define paravirt_release_pd(pfn) do { } while (0)
+
+#define pmd_populate_kernel(mm, pmd, pte) do { paravirt_alloc_pt(mm, __pa(pte) >> PAGE_SHIFT); set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))); } while (0)
+
+#define pmd_populate(mm, pmd, pte) do { paravirt_alloc_pt(mm, page_to_pfn(pte)); set_pmd(pmd, __pmd(_PAGE_TABLE + ((unsigned long long)page_to_pfn(pte) << (unsigned long long) PAGE_SHIFT))); } while (0)
+
+#define __pte_free_tlb(tlb,pte) do { paravirt_release_pt(page_to_pfn(pte)); tlb_remove_page((tlb),(pte)); } while (0)
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level-defs.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level-defs.h
new file mode 100644
index 0000000..9edc6c5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level-defs.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+#define _I386_PGTABLE_2LEVEL_DEFS_H
+
+#define SHARED_KERNEL_PMD 0
+
+#define PGDIR_SHIFT 22
+#define PTRS_PER_PGD 1024
+
+#define PTRS_PER_PTE 1024
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level.h
new file mode 100644
index 0000000..7ade4ed
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable-2level.h
@@ -0,0 +1,39 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_PGTABLE_2LEVEL_H
+#define _I386_PGTABLE_2LEVEL_H
+
+#define pte_ERROR(e) printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low)
+#define pgd_ERROR(e) printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
+
+#define set_pte(pteptr, pteval) native_set_pte(pteptr, pteval)
+#define set_pte_at(mm,addr,ptep,pteval) native_set_pte_at(mm, addr, ptep, pteval)
+#define set_pmd(pmdptr, pmdval) native_set_pmd(pmdptr, pmdval)
+#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
+#define set_pte_present(mm,addr,ptep,pteval) set_pte_at(mm,addr,ptep,pteval)
+#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
+#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
+#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp)
+#define pte_page(x) pfn_to_page(pte_pfn(x))
+#define pte_none(x) (!(x).pte_low)
+#define pte_pfn(x) (pte_val(x) >> PAGE_SHIFT)
+#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#define PTE_FILE_MAX_BITS 29
+#define pte_to_pgoff(pte) ((((pte).pte_low >> 1) & 0x1f ) + (((pte).pte_low >> 8) << 5 ))
+#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x1f) << 1) + (((off) >> 5) << 8) + _PAGE_FILE })
+#define __swp_type(x) (((x).val >> 1) & 0x1f)
+#define __swp_offset(x) ((x).val >> 8)
+#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low })
+#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgtable.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable.h
new file mode 100644
index 0000000..797e473
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "pgtable_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/pgtable_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable_32.h
new file mode 100644
index 0000000..c63ba93
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/pgtable_32.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_PGTABLE_H
+#define _I386_PGTABLE_H
+
+#ifndef __ASSEMBLY__
+#include <asm/processor.h>
+#include <asm/fixmap.h>
+#include <linux/threads.h>
+#include <asm/paravirt.h>
+
+#include <linux/bitops.h>
+#include <linux/slab.h>
+#include <linux/list.h>
+#include <linux/spinlock.h>
+
+struct mm_struct;
+struct vm_area_struct;
+
+#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
+
+#include <asm/pgtable-2level-defs.h>
+
+#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
+#define PGDIR_MASK (~(PGDIR_SIZE-1))
+
+#define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE)
+#define FIRST_USER_ADDRESS 0
+
+#define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT)
+#define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS)
+
+#define TWOLEVEL_PGDIR_SHIFT 22
+#define BOOT_USER_PGD_PTRS (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT)
+#define BOOT_KERNEL_PGD_PTRS (1024-BOOT_USER_PGD_PTRS)
+
+#define VMALLOC_OFFSET (8*1024*1024)
+#define VMALLOC_START (((unsigned long) high_memory + 2*VMALLOC_OFFSET-1) & ~(VMALLOC_OFFSET-1))
+#define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
+
+#define _PAGE_BIT_PRESENT 0
+#define _PAGE_BIT_RW 1
+#define _PAGE_BIT_USER 2
+#define _PAGE_BIT_PWT 3
+#define _PAGE_BIT_PCD 4
+#define _PAGE_BIT_ACCESSED 5
+#define _PAGE_BIT_DIRTY 6
+#define _PAGE_BIT_PSE 7
+#define _PAGE_BIT_GLOBAL 8
+#define _PAGE_BIT_UNUSED1 9
+#define _PAGE_BIT_UNUSED2 10
+#define _PAGE_BIT_UNUSED3 11
+#define _PAGE_BIT_NX 63
+
+#define _PAGE_PRESENT 0x001
+#define _PAGE_RW 0x002
+#define _PAGE_USER 0x004
+#define _PAGE_PWT 0x008
+#define _PAGE_PCD 0x010
+#define _PAGE_ACCESSED 0x020
+#define _PAGE_DIRTY 0x040
+#define _PAGE_PSE 0x080
+#define _PAGE_GLOBAL 0x100
+#define _PAGE_UNUSED1 0x200
+#define _PAGE_UNUSED2 0x400
+#define _PAGE_UNUSED3 0x800
+
+#define _PAGE_FILE 0x040
+#define _PAGE_PROTNONE 0x080
+#define _PAGE_NX 0
+
+#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
+#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
+
+#define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
+#define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+#define PAGE_COPY PAGE_COPY_NOEXEC
+#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
+#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
+
+#define _PAGE_KERNEL (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_NX)
+#define _PAGE_KERNEL_EXEC (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
+
+#define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
+#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
+#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD)
+#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
+#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
+
+#define PAGE_KERNEL __pgprot(__PAGE_KERNEL)
+#define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO)
+#define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC)
+#define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX)
+#define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE)
+#define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE)
+#define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC)
+
+#define __P000 PAGE_NONE
+#define __P001 PAGE_READONLY
+#define __P010 PAGE_COPY
+#define __P011 PAGE_COPY
+#define __P100 PAGE_READONLY_EXEC
+#define __P101 PAGE_READONLY_EXEC
+#define __P110 PAGE_COPY_EXEC
+#define __P111 PAGE_COPY_EXEC
+
+#define __S000 PAGE_NONE
+#define __S001 PAGE_READONLY
+#define __S010 PAGE_SHARED
+#define __S011 PAGE_SHARED
+#define __S100 PAGE_READONLY_EXEC
+#define __S101 PAGE_READONLY_EXEC
+#define __S110 PAGE_SHARED_EXEC
+#define __S111 PAGE_SHARED_EXEC
+
+#undef TEST_ACCESS_OK
+
+#define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE))
+
+#define pmd_none(x) (!(unsigned long)pmd_val(x))
+#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
+#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
+
+#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
+
+#include <asm/pgtable-2level.h>
+#define pte_update(mm, addr, ptep) do { } while (0)
+#define pte_update_defer(mm, addr, ptep) do { } while (0)
+#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
+#define ptep_set_access_flags(vma, address, ptep, entry, dirty) ({ int __changed = !pte_same(*(ptep), entry); if (__changed && dirty) { (ptep)->pte_low = (entry).pte_low; pte_update_defer((vma)->vm_mm, (address), (ptep)); flush_tlb_page(vma, address); } __changed; })
+#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
+#define ptep_test_and_clear_young(vma, addr, ptep) ({ int __ret = 0; if (pte_young(*(ptep))) __ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, &(ptep)->pte_low); if (__ret) pte_update((vma)->vm_mm, addr, ptep); __ret; })
+#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
+#define ptep_clear_flush_young(vma, address, ptep) ({ int __young; __young = ptep_test_and_clear_young((vma), (address), (ptep)); if (__young) flush_tlb_page(vma, address); __young; })
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
+#define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
+#define __HAVE_ARCH_PTEP_SET_WRPROTECT
+#define pgprot_noncached(prot) ((boot_cpu_data.x86 > 3) ? (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)) : (prot))
+#define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot))
+#define pmd_large(pmd) ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT))
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index_k(addr) pgd_index(addr)
+#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
+#define pgd_offset_k(address) pgd_offset(&init_mm, address)
+#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
+#define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
+#define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(address))
+#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
+#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
+
+ #define pte_offset_map(dir, address) ((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
+#define pte_offset_map_nested(dir, address) pte_offset_map(dir, address)
+#define pte_unmap(pte) do { } while (0)
+#define pte_unmap_nested(pte) do { } while (0)
+#define kpte_clear_flush(ptep, vaddr) do { pte_clear(&init_mm, vaddr, ptep); __flush_tlb_one(vaddr); } while (0)
+#define update_mmu_cache(vma,address,pte) do { } while (0)
+
+#endif
+#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) remap_pfn_range(vma, vaddr, pfn, size, prot)
+#include <asm-generic/pgtable.h>
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/poll.h b/6/platforms/android-9/arch-x86/usr/include/asm/poll.h
new file mode 100644
index 0000000..5b16673
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/poll.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/poll.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/posix_types.h b/6/platforms/android-9/arch-x86/usr/include/asm/posix_types.h
new file mode 100644
index 0000000..79bb490
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/posix_types.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifdef __i386__
+#include "posix_types_32.h"
+#else
+#include "posix_types_64.h"
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h
new file mode 100644
index 0000000..97a8b69
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/posix_types_32.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ARCH_I386_POSIX_TYPES_H
+#define __ARCH_I386_POSIX_TYPES_H
+
+typedef unsigned long __kernel_ino_t;
+typedef unsigned short __kernel_mode_t;
+typedef unsigned short __kernel_nlink_t;
+typedef long __kernel_off_t;
+typedef int __kernel_pid_t;
+typedef unsigned short __kernel_ipc_pid_t;
+typedef unsigned short __kernel_uid_t;
+typedef unsigned short __kernel_gid_t;
+typedef unsigned int __kernel_size_t;
+typedef int __kernel_ssize_t;
+typedef int __kernel_ptrdiff_t;
+typedef long __kernel_time_t;
+typedef long __kernel_suseconds_t;
+typedef long __kernel_clock_t;
+typedef int __kernel_timer_t;
+typedef int __kernel_clockid_t;
+typedef int __kernel_daddr_t;
+typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+typedef unsigned short __kernel_old_uid_t;
+typedef unsigned short __kernel_old_gid_t;
+typedef unsigned short __kernel_old_dev_t;
+
+#ifdef __GNUC__
+typedef long long __kernel_loff_t;
+#endif
+
+typedef struct {
+#ifdef __USE_ALL
+ int val[2];
+#else
+ int __val[2];
+#endif
+} __kernel_fsid_t;
+
+#if !defined(__GLIBC__) || __GLIBC__ < 2
+
+#undef __FD_SET
+#define __FD_SET(fd,fdsetp) __asm__ __volatile__("btsl %1,%0": "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
+
+#undef __FD_CLR
+#define __FD_CLR(fd,fdsetp) __asm__ __volatile__("btrl %1,%0": "+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
+
+#undef __FD_ISSET
+#define __FD_ISSET(fd,fdsetp) (__extension__ ({ unsigned char __result; __asm__ __volatile__("btl %1,%2 ; setb %0" :"=q" (__result) :"r" ((int) (fd)), "m" (*(__kernel_fd_set *) (fdsetp))); __result; }))
+
+#undef __FD_ZERO
+#define __FD_ZERO(fdsetp) do { int __d0, __d1; __asm__ __volatile__("cld ; rep ; stosl" :"=m" (*(__kernel_fd_set *) (fdsetp)), "=&c" (__d0), "=&D" (__d1) :"a" (0), "1" (__FDSET_LONGS), "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); } while (0)
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/prctl.h b/6/platforms/android-9/arch-x86/usr/include/asm/prctl.h
new file mode 100644
index 0000000..8852ca7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/prctl.h
@@ -0,0 +1,20 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef X86_64_PRCTL_H
+#define X86_64_PRCTL_H 1
+
+#define ARCH_SET_GS 0x1001
+#define ARCH_SET_FS 0x1002
+#define ARCH_GET_FS 0x1003
+#define ARCH_GET_GS 0x1004
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/processor-flags.h b/6/platforms/android-9/arch-x86/usr/include/asm/processor-flags.h
new file mode 100644
index 0000000..79e8f7d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/processor-flags.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I386_PROCESSOR_FLAGS_H
+#define __ASM_I386_PROCESSOR_FLAGS_H
+
+#define X86_EFLAGS_CF 0x00000001
+#define X86_EFLAGS_PF 0x00000004
+#define X86_EFLAGS_AF 0x00000010
+#define X86_EFLAGS_ZF 0x00000040
+#define X86_EFLAGS_SF 0x00000080
+#define X86_EFLAGS_TF 0x00000100
+#define X86_EFLAGS_IF 0x00000200
+#define X86_EFLAGS_DF 0x00000400
+#define X86_EFLAGS_OF 0x00000800
+#define X86_EFLAGS_IOPL 0x00003000
+#define X86_EFLAGS_NT 0x00004000
+#define X86_EFLAGS_RF 0x00010000
+#define X86_EFLAGS_VM 0x00020000
+#define X86_EFLAGS_AC 0x00040000
+#define X86_EFLAGS_VIF 0x00080000
+#define X86_EFLAGS_VIP 0x00100000
+#define X86_EFLAGS_ID 0x00200000
+
+#define X86_CR0_PE 0x00000001
+#define X86_CR0_MP 0x00000002
+#define X86_CR0_EM 0x00000004
+#define X86_CR0_TS 0x00000008
+#define X86_CR0_ET 0x00000010
+#define X86_CR0_NE 0x00000020
+#define X86_CR0_WP 0x00010000
+#define X86_CR0_AM 0x00040000
+#define X86_CR0_NW 0x20000000
+#define X86_CR0_CD 0x40000000
+#define X86_CR0_PG 0x80000000
+
+#define X86_CR3_PWT 0x00000008
+#define X86_CR3_PCD 0x00000010
+
+#define X86_CR4_VME 0x00000001
+#define X86_CR4_PVI 0x00000002
+#define X86_CR4_TSD 0x00000004
+#define X86_CR4_DE 0x00000008
+#define X86_CR4_PSE 0x00000010
+#define X86_CR4_PAE 0x00000020
+#define X86_CR4_MCE 0x00000040
+#define X86_CR4_PGE 0x00000080
+#define X86_CR4_PCE 0x00000100
+#define X86_CR4_OSFXSR 0x00000200
+#define X86_CR4_OSXMMEXCPT 0x00000400
+#define X86_CR4_VMXE 0x00002000
+
+#define X86_CR8_TPR 0x0000000F
+
+#define CX86_PCR0 0x20
+#define CX86_GCR 0xb8
+#define CX86_CCR0 0xc0
+#define CX86_CCR1 0xc1
+#define CX86_CCR2 0xc2
+#define CX86_CCR3 0xc3
+#define CX86_CCR4 0xe8
+#define CX86_CCR5 0xe9
+#define CX86_CCR6 0xea
+#define CX86_CCR7 0xeb
+#define CX86_PCR1 0xf0
+#define CX86_DIR0 0xfe
+#define CX86_DIR1 0xff
+#define CX86_ARR_BASE 0xc4
+#define CX86_RCR_BASE 0xdc
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/processor.h b/6/platforms/android-9/arch-x86/usr/include/asm/processor.h
new file mode 100644
index 0000000..7d47749
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/processor.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "processor_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/processor_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/processor_32.h
new file mode 100644
index 0000000..539edd1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/processor_32.h
@@ -0,0 +1,324 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_I386_PROCESSOR_H
+#define __ASM_I386_PROCESSOR_H
+
+#include <asm/vm86.h>
+#include <asm/math_emu.h>
+#include <asm/segment.h>
+#include <asm/page.h>
+#include <asm/types.h>
+#include <asm/sigcontext.h>
+#include <asm/cpufeature.h>
+#include <asm/msr.h>
+#include <asm/system.h>
+#include <linux/cache.h>
+#include <linux/threads.h>
+#include <asm/percpu.h>
+#include <linux/cpumask.h>
+#include <linux/init.h>
+#include <asm/processor-flags.h>
+
+struct desc_struct {
+ unsigned long a,b;
+};
+
+#define desc_empty(desc) (!((desc)->a | (desc)->b))
+
+#define desc_equal(desc1, desc2) (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b))
+
+#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
+
+struct cpuinfo_x86 {
+ __u8 x86;
+ __u8 x86_vendor;
+ __u8 x86_model;
+ __u8 x86_mask;
+ char wp_works_ok;
+ char hlt_works_ok;
+ char hard_math;
+ char rfu;
+ int cpuid_level;
+ unsigned long x86_capability[NCAPINTS];
+ char x86_vendor_id[16];
+ char x86_model_id[64];
+ int x86_cache_size;
+ int x86_cache_alignment;
+ char fdiv_bug;
+ char f00f_bug;
+ char coma_bug;
+ char pad0;
+ int x86_power;
+ unsigned long loops_per_jiffy;
+ unsigned char x86_max_cores;
+ unsigned char apicid;
+ unsigned short x86_clflush_size;
+} __attribute__((__aligned__(SMP_CACHE_BYTES)));
+
+#define X86_VENDOR_INTEL 0
+#define X86_VENDOR_CYRIX 1
+#define X86_VENDOR_AMD 2
+#define X86_VENDOR_UMC 3
+#define X86_VENDOR_NEXGEN 4
+#define X86_VENDOR_CENTAUR 5
+#define X86_VENDOR_TRANSMETA 7
+#define X86_VENDOR_NSC 8
+#define X86_VENDOR_NUM 9
+#define X86_VENDOR_UNKNOWN 0xff
+
+#define cpu_data(cpu) boot_cpu_data
+#define current_cpu_data boot_cpu_data
+
+#define load_cr3(pgdir) write_cr3(__pa(pgdir))
+
+#define TASK_SIZE (PAGE_OFFSET)
+
+#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
+
+#define HAVE_ARCH_PICK_MMAP_LAYOUT
+
+#define IO_BITMAP_BITS 65536
+#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
+#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
+#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
+#define INVALID_IO_BITMAP_OFFSET 0x8000
+#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
+
+struct i387_fsave_struct {
+ long cwd;
+ long swd;
+ long twd;
+ long fip;
+ long fcs;
+ long foo;
+ long fos;
+ long st_space[20];
+ long status;
+};
+
+struct i387_fxsave_struct {
+ unsigned short cwd;
+ unsigned short swd;
+ unsigned short twd;
+ unsigned short fop;
+ long fip;
+ long fcs;
+ long foo;
+ long fos;
+ long mxcsr;
+ long mxcsr_mask;
+ long st_space[32];
+ long xmm_space[32];
+ long padding[56];
+} __attribute__ ((aligned (16)));
+
+struct i387_soft_struct {
+ long cwd;
+ long swd;
+ long twd;
+ long fip;
+ long fcs;
+ long foo;
+ long fos;
+ long st_space[20];
+ unsigned char ftop, changed, lookahead, no_update, rm, alimit;
+ struct info *info;
+ unsigned long entry_eip;
+};
+
+union i387_union {
+ struct i387_fsave_struct fsave;
+ struct i387_fxsave_struct fxsave;
+ struct i387_soft_struct soft;
+};
+
+typedef struct {
+ unsigned long seg;
+} mm_segment_t;
+
+struct thread_struct;
+
+struct i386_hw_tss {
+ unsigned short back_link,__blh;
+ unsigned long esp0;
+ unsigned short ss0,__ss0h;
+ unsigned long esp1;
+ unsigned short ss1,__ss1h;
+ unsigned long esp2;
+ unsigned short ss2,__ss2h;
+ unsigned long __cr3;
+ unsigned long eip;
+ unsigned long eflags;
+ unsigned long eax,ecx,edx,ebx;
+ unsigned long esp;
+ unsigned long ebp;
+ unsigned long esi;
+ unsigned long edi;
+ unsigned short es, __esh;
+ unsigned short cs, __csh;
+ unsigned short ss, __ssh;
+ unsigned short ds, __dsh;
+ unsigned short fs, __fsh;
+ unsigned short gs, __gsh;
+ unsigned short ldt, __ldth;
+ unsigned short trace, io_bitmap_base;
+} __attribute__((packed));
+
+struct tss_struct {
+ struct i386_hw_tss x86_tss;
+
+ unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
+
+ unsigned long io_bitmap_max;
+ struct thread_struct *io_bitmap_owner;
+
+ unsigned long __cacheline_filler[35];
+
+ unsigned long stack[64];
+} __attribute__((packed));
+
+#define ARCH_MIN_TASKALIGN 16
+
+struct thread_struct {
+
+ struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
+ unsigned long esp0;
+ unsigned long sysenter_cs;
+ unsigned long eip;
+ unsigned long esp;
+ unsigned long fs;
+ unsigned long gs;
+
+ unsigned long debugreg[8];
+
+ unsigned long cr2, trap_no, error_code;
+
+ union i387_union i387;
+
+ struct vm86_struct __user * vm86_info;
+ unsigned long screen_bitmap;
+ unsigned long v86flags, v86mask, saved_esp0;
+ unsigned int saved_fs, saved_gs;
+
+ unsigned long *io_bitmap_ptr;
+ unsigned long iopl;
+
+ unsigned long io_bitmap_max;
+};
+
+#define INIT_THREAD { .esp0 = sizeof(init_stack) + (long)&init_stack, .vm86_info = NULL, .sysenter_cs = __KERNEL_CS, .io_bitmap_ptr = NULL, .fs = __KERNEL_PERCPU, }
+
+#define INIT_TSS { .x86_tss = { .esp0 = sizeof(init_stack) + (long)&init_stack, .ss0 = __KERNEL_DS, .ss1 = __KERNEL_CS, .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, }, .io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, }
+
+#define start_thread(regs, new_eip, new_esp) do { __asm__("movl %0,%%gs": :"r" (0)); regs->xfs = 0; set_fs(USER_DS); regs->xds = __USER_DS; regs->xes = __USER_DS; regs->xss = __USER_DS; regs->xcs = __USER_CS; regs->eip = new_eip; regs->esp = new_esp; } while (0)
+
+struct task_struct;
+struct mm_struct;
+
+#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
+#define KSTK_TOP(info) ({ unsigned long *__ptr = (unsigned long *)(info); (unsigned long)(&__ptr[THREAD_SIZE_LONGS]); })
+
+#define task_pt_regs(task) ({ struct pt_regs *__regs__; __regs__ = (struct pt_regs *)(KSTK_TOP(task_stack_page(task))-8); __regs__ - 1; })
+
+#define KSTK_EIP(task) (task_pt_regs(task)->eip)
+#define KSTK_ESP(task) (task_pt_regs(task)->esp)
+
+struct microcode_header {
+ unsigned int hdrver;
+ unsigned int rev;
+ unsigned int date;
+ unsigned int sig;
+ unsigned int cksum;
+ unsigned int ldrver;
+ unsigned int pf;
+ unsigned int datasize;
+ unsigned int totalsize;
+ unsigned int reserved[3];
+};
+
+struct microcode {
+ struct microcode_header hdr;
+ unsigned int bits[0];
+};
+
+typedef struct microcode microcode_t;
+typedef struct microcode_header microcode_header_t;
+
+struct extended_signature {
+ unsigned int sig;
+ unsigned int pf;
+ unsigned int cksum;
+};
+
+struct extended_sigtable {
+ unsigned int count;
+ unsigned int cksum;
+ unsigned int reserved[3];
+ struct extended_signature sigs[0];
+};
+
+#define cpu_relax() rep_nop()
+#define paravirt_enabled() 0
+#define __cpuid native_cpuid
+#define get_debugreg(var, register) (var) = native_get_debugreg(register)
+#define set_debugreg(value, register) native_set_debugreg(register, value)
+#define set_iopl_mask native_set_iopl_mask
+#define GENERIC_NOP1 ".byte 0x90\n"
+#define GENERIC_NOP2 ".byte 0x89,0xf6\n"
+#define GENERIC_NOP3 ".byte 0x8d,0x76,0x00\n"
+#define GENERIC_NOP4 ".byte 0x8d,0x74,0x26,0x00\n"
+#define GENERIC_NOP5 GENERIC_NOP1 GENERIC_NOP4
+#define GENERIC_NOP6 ".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n"
+#define GENERIC_NOP7 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n"
+#define GENERIC_NOP8 GENERIC_NOP1 GENERIC_NOP7
+#define K8_NOP1 GENERIC_NOP1
+#define K8_NOP2 ".byte 0x66,0x90\n"
+#define K8_NOP3 ".byte 0x66,0x66,0x90\n"
+#define K8_NOP4 ".byte 0x66,0x66,0x66,0x90\n"
+#define K8_NOP5 K8_NOP3 K8_NOP2
+#define K8_NOP6 K8_NOP3 K8_NOP3
+#define K8_NOP7 K8_NOP4 K8_NOP3
+#define K8_NOP8 K8_NOP4 K8_NOP4
+#define K7_NOP1 GENERIC_NOP1
+#define K7_NOP2 ".byte 0x8b,0xc0\n"
+#define K7_NOP3 ".byte 0x8d,0x04,0x20\n"
+#define K7_NOP4 ".byte 0x8d,0x44,0x20,0x00\n"
+#define K7_NOP5 K7_NOP4 ASM_NOP1
+#define K7_NOP6 ".byte 0x8d,0x80,0,0,0,0\n"
+#define K7_NOP7 ".byte 0x8D,0x04,0x05,0,0,0,0\n"
+#define K7_NOP8 K7_NOP7 ASM_NOP1
+#define P6_NOP1 GENERIC_NOP1
+#define P6_NOP2 ".byte 0x66,0x90\n"
+#define P6_NOP3 ".byte 0x0f,0x1f,0x00\n"
+#define P6_NOP4 ".byte 0x0f,0x1f,0x40,0\n"
+#define P6_NOP5 ".byte 0x0f,0x1f,0x44,0x00,0\n"
+#define P6_NOP6 ".byte 0x66,0x0f,0x1f,0x44,0x00,0\n"
+#define P6_NOP7 ".byte 0x0f,0x1f,0x80,0,0,0,0\n"
+#define P6_NOP8 ".byte 0x0f,0x1f,0x84,0x00,0,0,0,0\n"
+#define ASM_NOP1 GENERIC_NOP1
+#define ASM_NOP2 GENERIC_NOP2
+#define ASM_NOP3 GENERIC_NOP3
+#define ASM_NOP4 GENERIC_NOP4
+#define ASM_NOP5 GENERIC_NOP5
+#define ASM_NOP6 GENERIC_NOP6
+#define ASM_NOP7 GENERIC_NOP7
+#define ASM_NOP8 GENERIC_NOP8
+#define ASM_NOP_MAX 8
+#define ARCH_HAS_PREFETCH
+#define ARCH_HAS_PREFETCH
+#define ARCH_HAS_PREFETCHW
+#define ARCH_HAS_SPINLOCK_PREFETCH
+#define spin_lock_prefetch(x) prefetchw(x)
+
+#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h b/6/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h
new file mode 100644
index 0000000..3e6ea08
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ptrace-abi.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_PTRACE_ABI_H
+#define _ASM_X86_PTRACE_ABI_H
+
+#ifdef __i386__
+
+#define EBX 0
+#define ECX 1
+#define EDX 2
+#define ESI 3
+#define EDI 4
+#define EBP 5
+#define EAX 6
+#define DS 7
+#define ES 8
+#define FS 9
+#define GS 10
+#define ORIG_EAX 11
+#define EIP 12
+#define CS 13
+#define EFL 14
+#define UESP 15
+#define SS 16
+#define FRAME_SIZE 17
+
+#else
+
+#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
+#define R15 0
+#define R14 8
+#define R13 16
+#define R12 24
+#define RBP 32
+#define RBX 40
+
+#define R11 48
+#define R10 56
+#define R9 64
+#define R8 72
+#define RAX 80
+#define RCX 88
+#define RDX 96
+#define RSI 104
+#define RDI 112
+#define ORIG_RAX 120
+
+#define RIP 128
+#define CS 136
+#define EFLAGS 144
+#define RSP 152
+#define SS 160
+#define ARGOFFSET R11
+#endif
+
+#define FRAME_SIZE 168
+
+#endif
+
+#define PTRACE_GETREGS 12
+#define PTRACE_SETREGS 13
+#define PTRACE_GETFPREGS 14
+#define PTRACE_SETFPREGS 15
+#define PTRACE_GETFPXREGS 18
+#define PTRACE_SETFPXREGS 19
+
+#define PTRACE_OLDSETOPTIONS 21
+
+#define PTRACE_GET_THREAD_AREA 25
+#define PTRACE_SET_THREAD_AREA 26
+
+#ifdef __x86_64__
+#define PTRACE_ARCH_PRCTL 30
+#else
+#define PTRACE_SYSEMU 31
+#define PTRACE_SYSEMU_SINGLESTEP 32
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/ptrace.h b/6/platforms/android-9/arch-x86/usr/include/asm/ptrace.h
new file mode 100644
index 0000000..4743e0f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/ptrace.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_PTRACE_H
+#define _ASM_X86_PTRACE_H
+
+#include <linux/compiler.h>
+#include <asm/ptrace-abi.h>
+
+#ifndef __ASSEMBLY__
+
+#ifdef __i386__
+
+struct pt_regs {
+ long ebx;
+ long ecx;
+ long edx;
+ long esi;
+ long edi;
+ long ebp;
+ long eax;
+ int xds;
+ int xes;
+ int xfs;
+
+ long orig_eax;
+ long eip;
+ int xcs;
+ long eflags;
+ long esp;
+ int xss;
+};
+
+#else
+
+struct pt_regs {
+ unsigned long r15;
+ unsigned long r14;
+ unsigned long r13;
+ unsigned long r12;
+ unsigned long rbp;
+ unsigned long rbx;
+
+ unsigned long r11;
+ unsigned long r10;
+ unsigned long r9;
+ unsigned long r8;
+ unsigned long rax;
+ unsigned long rcx;
+ unsigned long rdx;
+ unsigned long rsi;
+ unsigned long rdi;
+ unsigned long orig_rax;
+
+ unsigned long rip;
+ unsigned long cs;
+ unsigned long eflags;
+ unsigned long rsp;
+ unsigned long ss;
+
+};
+
+#endif
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/required-features.h b/6/platforms/android-9/arch-x86/usr/include/asm/required-features.h
new file mode 100644
index 0000000..a96517a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/required-features.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_REQUIRED_FEATURES_H
+#define _ASM_REQUIRED_FEATURES_H 1
+
+#define NEED_FPU (1<<(X86_FEATURE_FPU & 31))
+
+#define NEED_PAE 0
+#define NEED_CX8 0
+
+#define NEED_CMOV 0
+
+#define NEED_3DNOW 0
+
+#define NEED_PSE 0
+#define NEED_MSR 0
+#define NEED_PGE 0
+#define NEED_FXSR 0
+#define NEED_XMM 0
+#define NEED_XMM2 0
+#define NEED_LM 0
+
+#define REQUIRED_MASK0 (NEED_FPU|NEED_PSE|NEED_MSR|NEED_PAE| NEED_CX8|NEED_PGE|NEED_FXSR|NEED_CMOV| NEED_XMM|NEED_XMM2)
+#define SSE_MASK (NEED_XMM|NEED_XMM2)
+
+#define REQUIRED_MASK1 (NEED_LM|NEED_3DNOW)
+
+#define REQUIRED_MASK2 0
+#define REQUIRED_MASK3 0
+#define REQUIRED_MASK4 0
+#define REQUIRED_MASK5 0
+#define REQUIRED_MASK6 0
+#define REQUIRED_MASK7 0
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/resource.h b/6/platforms/android-9/arch-x86/usr/include/asm/resource.h
new file mode 100644
index 0000000..29d9e12
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/resource.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/resource.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/rwlock.h b/6/platforms/android-9/arch-x86/usr/include/asm/rwlock.h
new file mode 100644
index 0000000..3693542
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/rwlock.h
@@ -0,0 +1,18 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_RWLOCK_H
+#define _ASM_X86_RWLOCK_H
+
+#define RW_LOCK_BIAS 0x01000000
+#define RW_LOCK_BIAS_STR "0x01000000"
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist.h b/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist.h
new file mode 100644
index 0000000..fa4d0cc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "scatterlist_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist_32.h
new file mode 100644
index 0000000..29044c3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/scatterlist_32.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_SCATTERLIST_H
+#define _I386_SCATTERLIST_H
+
+#include <asm/types.h>
+
+struct scatterlist {
+ unsigned long page_link;
+ unsigned int offset;
+ dma_addr_t dma_address;
+ unsigned int length;
+};
+
+#define ARCH_HAS_SG_CHAIN
+
+#define sg_dma_address(sg) ((sg)->dma_address)
+#define sg_dma_len(sg) ((sg)->length)
+
+#define ISA_DMA_THRESHOLD (0x00ffffff)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/sections.h b/6/platforms/android-9/arch-x86/usr/include/asm/sections.h
new file mode 100644
index 0000000..a21da3e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/sections.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/sections.h>
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/segment.h b/6/platforms/android-9/arch-x86/usr/include/asm/segment.h
new file mode 100644
index 0000000..6877a80
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/segment.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "segment_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/segment_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/segment_32.h
new file mode 100644
index 0000000..54b312b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/segment_32.h
@@ -0,0 +1,89 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_SEGMENT_H
+#define _ASM_SEGMENT_H
+
+#define GDT_ENTRY_TLS_ENTRIES 3
+#define GDT_ENTRY_TLS_MIN 6
+#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
+
+#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
+
+#define GDT_ENTRY_DEFAULT_USER_CS 14
+#define __USER_CS (GDT_ENTRY_DEFAULT_USER_CS * 8 + 3)
+
+#define GDT_ENTRY_DEFAULT_USER_DS 15
+#define __USER_DS (GDT_ENTRY_DEFAULT_USER_DS * 8 + 3)
+
+#define GDT_ENTRY_KERNEL_BASE 12
+
+#define GDT_ENTRY_KERNEL_CS (GDT_ENTRY_KERNEL_BASE + 0)
+#define __KERNEL_CS (GDT_ENTRY_KERNEL_CS * 8)
+
+#define GDT_ENTRY_KERNEL_DS (GDT_ENTRY_KERNEL_BASE + 1)
+#define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
+
+#define GDT_ENTRY_TSS (GDT_ENTRY_KERNEL_BASE + 4)
+#define GDT_ENTRY_LDT (GDT_ENTRY_KERNEL_BASE + 5)
+
+#define GDT_ENTRY_PNPBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 6)
+#define GDT_ENTRY_APMBIOS_BASE (GDT_ENTRY_KERNEL_BASE + 11)
+
+#define GDT_ENTRY_ESPFIX_SS (GDT_ENTRY_KERNEL_BASE + 14)
+#define __ESPFIX_SS (GDT_ENTRY_ESPFIX_SS * 8)
+
+#define GDT_ENTRY_PERCPU (GDT_ENTRY_KERNEL_BASE + 15)
+#define __KERNEL_PERCPU 0
+
+#define GDT_ENTRY_DOUBLEFAULT_TSS 31
+
+#define GDT_ENTRIES 32
+#define GDT_SIZE (GDT_ENTRIES * 8)
+
+#define GDT_ENTRY_BOOT_CS 2
+#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
+
+#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
+#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
+
+#define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0)
+#define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1)
+#define GDT_ENTRY_PNPBIOS_DS (GDT_ENTRY_PNPBIOS_BASE + 2)
+#define GDT_ENTRY_PNPBIOS_TS1 (GDT_ENTRY_PNPBIOS_BASE + 3)
+#define GDT_ENTRY_PNPBIOS_TS2 (GDT_ENTRY_PNPBIOS_BASE + 4)
+
+#define PNP_CS32 (GDT_ENTRY_PNPBIOS_CS32 * 8)
+#define PNP_CS16 (GDT_ENTRY_PNPBIOS_CS16 * 8)
+#define PNP_DS (GDT_ENTRY_PNPBIOS_DS * 8)
+#define PNP_TS1 (GDT_ENTRY_PNPBIOS_TS1 * 8)
+#define PNP_TS2 (GDT_ENTRY_PNPBIOS_TS2 * 8)
+
+#define IDT_ENTRIES 256
+
+#define SEGMENT_RPL_MASK 0x3
+
+#define SEGMENT_TI_MASK 0x4
+
+#define USER_RPL 0x3
+
+#define SEGMENT_LDT 0x4
+#define SEGMENT_GDT 0x0
+
+#define get_kernel_rpl() 0
+
+#define SEGMENT_IS_KERNEL_CODE(x) (((x) & 0xfc) == GDT_ENTRY_KERNEL_CS * 8)
+
+#define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8)
+
+#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/semaphore.h b/6/platforms/android-9/arch-x86/usr/include/asm/semaphore.h
new file mode 100644
index 0000000..8b4c595
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/semaphore.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "semaphore_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/semaphore_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/semaphore_32.h
new file mode 100644
index 0000000..babe779
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/semaphore_32.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_SEMAPHORE_H
+#define _I386_SEMAPHORE_H
+
+#include <linux/linkage.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/sembuf.h b/6/platforms/android-9/arch-x86/usr/include/asm/sembuf.h
new file mode 100644
index 0000000..1695208
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/sembuf.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SEMBUF_H
+#define _ASM_X86_SEMBUF_H
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm;
+ __kernel_time_t sem_otime;
+ unsigned long __unused1;
+ __kernel_time_t sem_ctime;
+ unsigned long __unused2;
+ unsigned long sem_nsems;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/setup.h b/6/platforms/android-9/arch-x86/usr/include/asm/setup.h
new file mode 100644
index 0000000..696ed97
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/setup.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SETUP_H
+#define _ASM_X86_SETUP_H
+
+#define COMMAND_LINE_SIZE 2048
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/shmbuf.h b/6/platforms/android-9/arch-x86/usr/include/asm/shmbuf.h
new file mode 100644
index 0000000..314ccb7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/shmbuf.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SHMBUF_H
+#define _ASM_X86_SHMBUF_H
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm;
+ size_t shm_segsz;
+ __kernel_time_t shm_atime;
+#ifdef __i386__
+ unsigned long __unused1;
+#endif
+ __kernel_time_t shm_dtime;
+#ifdef __i386__
+ unsigned long __unused2;
+#endif
+ __kernel_time_t shm_ctime;
+#ifdef __i386__
+ unsigned long __unused3;
+#endif
+ __kernel_pid_t shm_cpid;
+ __kernel_pid_t shm_lpid;
+ unsigned long shm_nattch;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/shmparam.h b/6/platforms/android-9/arch-x86/usr/include/asm/shmparam.h
new file mode 100644
index 0000000..e667ba1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/shmparam.h
@@ -0,0 +1,17 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SHMPARAM_H
+#define _ASM_X86_SHMPARAM_H
+
+#define SHMLBA PAGE_SIZE
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h b/6/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h
new file mode 100644
index 0000000..a8f76f0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/sigcontext.h
@@ -0,0 +1,132 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SIGCONTEXT_H
+#define _ASM_X86_SIGCONTEXT_H
+
+#include <linux/compiler.h>
+#include <asm/types.h>
+
+#ifdef __i386__
+
+struct _fpreg {
+ unsigned short significand[4];
+ unsigned short exponent;
+};
+
+struct _fpxreg {
+ unsigned short significand[4];
+ unsigned short exponent;
+ unsigned short padding[3];
+};
+
+struct _xmmreg {
+ unsigned long element[4];
+};
+
+struct _fpstate {
+
+ unsigned long cw;
+ unsigned long sw;
+ unsigned long tag;
+ unsigned long ipoff;
+ unsigned long cssel;
+ unsigned long dataoff;
+ unsigned long datasel;
+ struct _fpreg _st[8];
+ unsigned short status;
+ unsigned short magic;
+
+ unsigned long _fxsr_env[6];
+ unsigned long mxcsr;
+ unsigned long reserved;
+ struct _fpxreg _fxsr_st[8];
+ struct _xmmreg _xmm[8];
+ unsigned long padding[56];
+};
+
+#define X86_FXSR_MAGIC 0x0000
+
+struct sigcontext {
+ unsigned short gs, __gsh;
+ unsigned short fs, __fsh;
+ unsigned short es, __esh;
+ unsigned short ds, __dsh;
+ unsigned long edi;
+ unsigned long esi;
+ unsigned long ebp;
+ unsigned long esp;
+ unsigned long ebx;
+ unsigned long edx;
+ unsigned long ecx;
+ unsigned long eax;
+ unsigned long trapno;
+ unsigned long err;
+ unsigned long eip;
+ unsigned short cs, __csh;
+ unsigned long eflags;
+ unsigned long esp_at_signal;
+ unsigned short ss, __ssh;
+ struct _fpstate __user * fpstate;
+ unsigned long oldmask;
+ unsigned long cr2;
+};
+
+#else
+
+struct _fpstate {
+ __u16 cwd;
+ __u16 swd;
+ __u16 twd;
+ __u16 fop;
+ __u64 rip;
+ __u64 rdp;
+ __u32 mxcsr;
+ __u32 mxcsr_mask;
+ __u32 st_space[32];
+ __u32 xmm_space[64];
+ __u32 reserved2[24];
+};
+
+struct sigcontext {
+ unsigned long r8;
+ unsigned long r9;
+ unsigned long r10;
+ unsigned long r11;
+ unsigned long r12;
+ unsigned long r13;
+ unsigned long r14;
+ unsigned long r15;
+ unsigned long rdi;
+ unsigned long rsi;
+ unsigned long rbp;
+ unsigned long rbx;
+ unsigned long rdx;
+ unsigned long rax;
+ unsigned long rcx;
+ unsigned long rsp;
+ unsigned long rip;
+ unsigned long eflags;
+ unsigned short cs;
+ unsigned short gs;
+ unsigned short fs;
+ unsigned short __pad0;
+ unsigned long err;
+ unsigned long trapno;
+ unsigned long oldmask;
+ unsigned long cr2;
+ struct _fpstate __user *fpstate;
+ unsigned long reserved1[8];
+};
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/siginfo.h b/6/platforms/android-9/arch-x86/usr/include/asm/siginfo.h
new file mode 100644
index 0000000..0d21d22
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/siginfo.h
@@ -0,0 +1,21 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SIGINFO_H
+#define _ASM_X86_SIGINFO_H
+
+#ifdef __x86_64__
+#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
+#endif
+
+#include <asm-generic/siginfo.h>
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/signal.h b/6/platforms/android-9/arch-x86/usr/include/asm/signal.h
new file mode 100644
index 0000000..6d84eab
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/signal.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SIGNAL_H
+#define _ASM_X86_SIGNAL_H
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#include <linux/time.h>
+#include <linux/compiler.h>
+
+struct siginfo;
+
+#define NSIG 32
+typedef unsigned long sigset_t;
+
+#endif
+
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGIOT 6
+#define SIGBUS 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGUSR1 10
+#define SIGSEGV 11
+#define SIGUSR2 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGSTKFLT 16
+#define SIGCHLD 17
+#define SIGCONT 18
+#define SIGSTOP 19
+#define SIGTSTP 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGURG 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGIO 29
+#define SIGPOLL SIGIO
+
+#define SIGPWR 30
+#define SIGSYS 31
+#define SIGUNUSED 31
+
+#define SIGRTMIN 32
+#define SIGRTMAX _NSIG
+
+#define SA_NOCLDSTOP 0x00000001u
+#define SA_NOCLDWAIT 0x00000002u
+#define SA_SIGINFO 0x00000004u
+#define SA_ONSTACK 0x08000000u
+#define SA_RESTART 0x10000000u
+#define SA_NODEFER 0x40000000u
+#define SA_RESETHAND 0x80000000u
+
+#define SA_NOMASK SA_NODEFER
+#define SA_ONESHOT SA_RESETHAND
+
+#define SA_RESTORER 0x04000000
+
+#define SS_ONSTACK 1
+#define SS_DISABLE 2
+
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
+
+#include <asm-generic/signal.h>
+
+#ifndef __ASSEMBLY__
+
+#ifdef __i386__
+
+struct sigaction {
+ union {
+ __sighandler_t _sa_handler;
+ void (*_sa_sigaction)(int, struct siginfo *, void *);
+ } _u;
+ sigset_t sa_mask;
+ unsigned long sa_flags;
+ void (*sa_restorer)(void);
+};
+
+#define sa_handler _u._sa_handler
+#define sa_sigaction _u._sa_sigaction
+
+#else
+
+struct sigaction {
+ __sighandler_t sa_handler;
+ unsigned long sa_flags;
+ __sigrestore_t sa_restorer;
+ sigset_t sa_mask;
+};
+
+struct k_sigaction {
+ struct sigaction sa;
+};
+
+#endif
+
+typedef struct sigaltstack {
+ void __user *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+} stack_t;
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/smp.h b/6/platforms/android-9/arch-x86/usr/include/asm/smp.h
new file mode 100644
index 0000000..40d4601
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/smp.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "smp_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/smp_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/smp_32.h
new file mode 100644
index 0000000..f093a24
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/smp_32.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SMP_H
+#define __ASM_SMP_H
+
+#ifndef __ASSEMBLY__
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/cpumask.h>
+#endif
+
+#define BAD_APICID 0xFFu
+
+#define safe_smp_processor_id() 0
+#define cpu_physical_id(cpu) boot_cpu_physical_apicid
+
+#define NO_PROC_ID 0xFF
+
+#ifndef __ASSEMBLY__
+
+#define hard_smp_processor_id() 0
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/socket.h b/6/platforms/android-9/arch-x86/usr/include/asm/socket.h
new file mode 100644
index 0000000..27d243f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/socket.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_SOCKET_H
+#define _ASM_SOCKET_H
+
+#include <asm/sockios.h>
+
+#define SOL_SOCKET 1
+
+#define SO_DEBUG 1
+#define SO_REUSEADDR 2
+#define SO_TYPE 3
+#define SO_ERROR 4
+#define SO_DONTROUTE 5
+#define SO_BROADCAST 6
+#define SO_SNDBUF 7
+#define SO_RCVBUF 8
+#define SO_SNDBUFFORCE 32
+#define SO_RCVBUFFORCE 33
+#define SO_KEEPALIVE 9
+#define SO_OOBINLINE 10
+#define SO_NO_CHECK 11
+#define SO_PRIORITY 12
+#define SO_LINGER 13
+#define SO_BSDCOMPAT 14
+
+#define SO_PASSCRED 16
+#define SO_PEERCRED 17
+#define SO_RCVLOWAT 18
+#define SO_SNDLOWAT 19
+#define SO_RCVTIMEO 20
+#define SO_SNDTIMEO 21
+
+#define SO_SECURITY_AUTHENTICATION 22
+#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
+#define SO_SECURITY_ENCRYPTION_NETWORK 24
+
+#define SO_BINDTODEVICE 25
+
+#define SO_ATTACH_FILTER 26
+#define SO_DETACH_FILTER 27
+
+#define SO_PEERNAME 28
+#define SO_TIMESTAMP 29
+#define SCM_TIMESTAMP SO_TIMESTAMP
+
+#define SO_ACCEPTCONN 30
+
+#define SO_PEERSEC 31
+#define SO_PASSSEC 34
+#define SO_TIMESTAMPNS 35
+#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/sockios.h b/6/platforms/android-9/arch-x86/usr/include/asm/sockios.h
new file mode 100644
index 0000000..ebdfa98
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/sockios.h
@@ -0,0 +1,23 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SOCKIOS_H
+#define _ASM_X86_SOCKIOS_H
+
+#define FIOSETOWN 0x8901
+#define SIOCSPGRP 0x8902
+#define FIOGETOWN 0x8903
+#define SIOCGPGRP 0x8904
+#define SIOCATMARK 0x8905
+#define SIOCGSTAMP 0x8906
+#define SIOCGSTAMPNS 0x8907
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/spinlock.h b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock.h
new file mode 100644
index 0000000..10d123a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "spinlock_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_32.h
new file mode 100644
index 0000000..171783e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_32.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SPINLOCK_H
+#define __ASM_SPINLOCK_H
+
+#include <asm/atomic.h>
+#include <asm/rwlock.h>
+#include <asm/page.h>
+#include <asm/processor.h>
+#include <linux/compiler.h>
+
+#define CLI_STRING "cli"
+#define STI_STRING "sti"
+#define CLI_STI_CLOBBERS
+#define CLI_STI_INPUT_ARGS
+
+#define _raw_spin_relax(lock) cpu_relax()
+#define _raw_read_relax(lock) cpu_relax()
+#define _raw_write_relax(lock) cpu_relax()
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_types.h b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_types.h
new file mode 100644
index 0000000..ab914c4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/spinlock_types.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SPINLOCK_TYPES_H
+#define __ASM_SPINLOCK_TYPES_H
+
+#ifndef __LINUX_SPINLOCK_TYPES_H
+#error "please don't include this file directly"
+#endif
+
+typedef struct {
+ unsigned int slock;
+} raw_spinlock_t;
+
+#define __RAW_SPIN_LOCK_UNLOCKED { 1 }
+
+typedef struct {
+ unsigned int lock;
+} raw_rwlock_t;
+
+#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/stat.h b/6/platforms/android-9/arch-x86/usr/include/asm/stat.h
new file mode 100644
index 0000000..837d716
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/stat.h
@@ -0,0 +1,120 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_STAT_H
+#define _ASM_X86_STAT_H
+
+#define STAT_HAVE_NSEC 1
+
+#ifdef __i386__
+struct stat {
+ unsigned long st_dev;
+ unsigned long st_ino;
+ unsigned short st_mode;
+ unsigned short st_nlink;
+ unsigned short st_uid;
+ unsigned short st_gid;
+ unsigned long st_rdev;
+ unsigned long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ unsigned long __unused4;
+ unsigned long __unused5;
+};
+
+#define STAT64_HAS_BROKEN_ST_INO 1
+
+struct stat64 {
+ unsigned long long st_dev;
+ unsigned char __pad0[4];
+
+ unsigned long __st_ino;
+
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned long st_uid;
+ unsigned long st_gid;
+
+ unsigned long long st_rdev;
+ unsigned char __pad3[4];
+
+ long long st_size;
+ unsigned long st_blksize;
+
+ unsigned long long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+
+ unsigned long st_mtime;
+ unsigned int st_mtime_nsec;
+
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+
+ unsigned long long st_ino;
+};
+
+#else
+
+struct stat {
+ unsigned long st_dev;
+ unsigned long st_ino;
+ unsigned long st_nlink;
+
+ unsigned int st_mode;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned int __pad0;
+ unsigned long st_rdev;
+ long st_size;
+ long st_blksize;
+ long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ long __unused[3];
+};
+#endif
+
+struct __old_kernel_stat {
+ unsigned short st_dev;
+ unsigned short st_ino;
+ unsigned short st_mode;
+ unsigned short st_nlink;
+ unsigned short st_uid;
+ unsigned short st_gid;
+ unsigned short st_rdev;
+#ifdef __i386__
+ unsigned long st_size;
+ unsigned long st_atime;
+ unsigned long st_mtime;
+ unsigned long st_ctime;
+#else
+ unsigned int st_size;
+ unsigned int st_atime;
+ unsigned int st_mtime;
+ unsigned int st_ctime;
+#endif
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/statfs.h b/6/platforms/android-9/arch-x86/usr/include/asm/statfs.h
new file mode 100644
index 0000000..592d864
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/statfs.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_STATFS_H
+#define _ASM_X86_STATFS_H
+
+#ifdef __i386__
+#include <asm-generic/statfs.h>
+#else
+
+struct statfs {
+ long f_type;
+ long f_bsize;
+ long f_blocks;
+ long f_bfree;
+ long f_bavail;
+ long f_files;
+ long f_ffree;
+ __kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_frsize;
+ long f_spare[5];
+};
+
+struct statfs64 {
+ long f_type;
+ long f_bsize;
+ long f_blocks;
+ long f_bfree;
+ long f_bavail;
+ long f_files;
+ long f_ffree;
+ __kernel_fsid_t f_fsid;
+ long f_namelen;
+ long f_frsize;
+ long f_spare[5];
+};
+
+struct compat_statfs64 {
+ __u32 f_type;
+ __u32 f_bsize;
+ __u64 f_blocks;
+ __u64 f_bfree;
+ __u64 f_bavail;
+ __u64 f_files;
+ __u64 f_ffree;
+ __kernel_fsid_t f_fsid;
+ __u32 f_namelen;
+ __u32 f_frsize;
+ __u32 f_spare[5];
+} __attribute__((packed));
+
+#endif
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/string.h b/6/platforms/android-9/arch-x86/usr/include/asm/string.h
new file mode 100644
index 0000000..92fa291
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/string.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "string_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/string_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/string_32.h
new file mode 100644
index 0000000..58a72d7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/string_32.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_STRING_H_
+#define _I386_STRING_H_
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/swiotlb.h b/6/platforms/android-9/arch-x86/usr/include/asm/swiotlb.h
new file mode 100644
index 0000000..5ee37b3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/swiotlb.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_SWIOTLB_H
+#define _ASM_SWIOTLB_H 1
+
+#include <asm/dma-mapping.h>
+
+#define swiotlb 0
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/system.h b/6/platforms/android-9/arch-x86/usr/include/asm/system.h
new file mode 100644
index 0000000..834193b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/system.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "system_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/system_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/system_32.h
new file mode 100644
index 0000000..d799ae6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/system_32.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_SYSTEM_H
+#define __ASM_SYSTEM_H
+
+#include <linux/kernel.h>
+#include <asm/segment.h>
+#include <asm/cpufeature.h>
+#include <asm/cmpxchg.h>
+
+#define nop() __asm__ __volatile__ ("nop")
+#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
+#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
+#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
+#define read_barrier_depends() do { } while(0)
+#define smp_mb() barrier()
+#define smp_rmb() barrier()
+#define smp_wmb() barrier()
+#define smp_read_barrier_depends() do { } while(0)
+#define set_mb(var, value) do { var = value; barrier(); } while (0)
+#include <linux/irqflags.h>
+#define HAVE_DISABLE_HLT
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/termbits.h b/6/platforms/android-9/arch-x86/usr/include/asm/termbits.h
new file mode 100644
index 0000000..6d7c5e8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/termbits.h
@@ -0,0 +1,201 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_TERMBITS_H
+#define _ASM_X86_TERMBITS_H
+
+#include <linux/posix_types.h>
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 19
+struct termios {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ cc_t c_line;
+ cc_t c_cc[NCCS];
+};
+
+struct termios2 {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ cc_t c_line;
+ cc_t c_cc[NCCS];
+ speed_t c_ispeed;
+ speed_t c_ospeed;
+};
+
+struct ktermios {
+ tcflag_t c_iflag;
+ tcflag_t c_oflag;
+ tcflag_t c_cflag;
+ tcflag_t c_lflag;
+ cc_t c_line;
+ cc_t c_cc[NCCS];
+ speed_t c_ispeed;
+ speed_t c_ospeed;
+};
+
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+#define VSWTC 7
+#define VSTART 8
+#define VSTOP 9
+#define VSUSP 10
+#define VEOL 11
+#define VREPRINT 12
+#define VDISCARD 13
+#define VWERASE 14
+#define VLNEXT 15
+#define VEOL2 16
+
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IUCLC 0001000
+#define IXON 0002000
+#define IXANY 0004000
+#define IXOFF 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000
+
+#define OPOST 0000001
+#define OLCUC 0000002
+#define ONLCR 0000004
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+#define NLDLY 0000400
+#define NL0 0000000
+#define NL1 0000400
+#define CRDLY 0003000
+#define CR0 0000000
+#define CR1 0001000
+#define CR2 0002000
+#define CR3 0003000
+#define TABDLY 0014000
+#define TAB0 0000000
+#define TAB1 0004000
+#define TAB2 0010000
+#define TAB3 0014000
+#define XTABS 0014000
+#define BSDLY 0020000
+#define BS0 0000000
+#define BS1 0020000
+#define VTDLY 0040000
+#define VT0 0000000
+#define VT1 0040000
+#define FFDLY 0100000
+#define FF0 0000000
+#define FF1 0100000
+
+#define CBAUD 0010017
+#define B0 0000000
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE 0000060
+#define CS5 0000000
+#define CS6 0000020
+#define CS7 0000040
+#define CS8 0000060
+#define CSTOPB 0000100
+#define CREAD 0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL 0002000
+#define CLOCAL 0004000
+#define CBAUDEX 0010000
+#define BOTHER 0010000
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+#define B500000 0010005
+#define B576000 0010006
+#define B921600 0010007
+#define B1000000 0010010
+#define B1152000 0010011
+#define B1500000 0010012
+#define B2000000 0010013
+#define B2500000 0010014
+#define B3000000 0010015
+#define B3500000 0010016
+#define B4000000 0010017
+#define CIBAUD 002003600000
+#define CMSPAR 010000000000
+#define CRTSCTS 020000000000
+
+#define IBSHIFT 16
+
+#define ISIG 0000001
+#define ICANON 0000002
+#define XCASE 0000004
+#define ECHO 0000010
+#define ECHOE 0000020
+#define ECHOK 0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0000400
+#define ECHOCTL 0001000
+#define ECHOPRT 0002000
+#define ECHOKE 0004000
+#define FLUSHO 0010000
+#define PENDIN 0040000
+#define IEXTEN 0100000
+
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/termios.h b/6/platforms/android-9/arch-x86/usr/include/asm/termios.h
new file mode 100644
index 0000000..6542c78
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/termios.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_TERMIOS_H
+#define _ASM_X86_TERMIOS_H
+
+#include <asm/termbits.h>
+#include <asm/ioctls.h>
+
+struct winsize {
+ unsigned short ws_row;
+ unsigned short ws_col;
+ unsigned short ws_xpixel;
+ unsigned short ws_ypixel;
+};
+
+#define NCC 8
+struct termio {
+ unsigned short c_iflag;
+ unsigned short c_oflag;
+ unsigned short c_cflag;
+ unsigned short c_lflag;
+ unsigned char c_line;
+ unsigned char c_cc[NCC];
+};
+
+#define TIOCM_LE 0x001
+#define TIOCM_DTR 0x002
+#define TIOCM_RTS 0x004
+#define TIOCM_ST 0x008
+#define TIOCM_SR 0x010
+#define TIOCM_CTS 0x020
+#define TIOCM_CAR 0x040
+#define TIOCM_RNG 0x080
+#define TIOCM_DSR 0x100
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_OUT1 0x2000
+#define TIOCM_OUT2 0x4000
+#define TIOCM_LOOP 0x8000
+
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6
+#define N_6PACK 7
+#define N_MASC 8
+#define N_R3964 9
+#define N_PROFIBUS_FDL 10
+#define N_IRDA 11
+#define N_SMSBLOCK 12
+#define N_HDLC 13
+#define N_SYNC_PPP 14
+#define N_HCI 15
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/thread_info.h b/6/platforms/android-9/arch-x86/usr/include/asm/thread_info.h
new file mode 100644
index 0000000..ff46b08
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/thread_info.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "thread_info_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/thread_info_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/thread_info_32.h
new file mode 100644
index 0000000..5664ef8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/thread_info_32.h
@@ -0,0 +1,15 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_THREAD_INFO_H
+#define _ASM_THREAD_INFO_H
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush.h b/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush.h
new file mode 100644
index 0000000..fd6b226
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "tlbflush_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush_32.h
new file mode 100644
index 0000000..8ebff80
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/tlbflush_32.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_TLBFLUSH_H
+#define _I386_TLBFLUSH_H
+
+#include <linux/mm.h>
+#include <asm/processor.h>
+
+#define __flush_tlb() __native_flush_tlb()
+#define __flush_tlb_global() __native_flush_tlb_global()
+#define __flush_tlb_single(addr) __native_flush_tlb_single(addr)
+
+#define __native_flush_tlb() do { unsigned int tmpreg; __asm__ __volatile__( "movl %%cr3, %0; \n" "movl %0, %%cr3; # flush TLB \n" : "=r" (tmpreg) :: "memory"); } while (0)
+
+#define __native_flush_tlb_global() do { unsigned int tmpreg, cr4, cr4_orig; __asm__ __volatile__( "movl %%cr4, %2; # turn off PGE \n" "movl %2, %1; \n" "andl %3, %1; \n" "movl %1, %%cr4; \n" "movl %%cr3, %0; \n" "movl %0, %%cr3; # flush TLB \n" "movl %2, %%cr4; # turn PGE back on \n" : "=&r" (tmpreg), "=&r" (cr4), "=&r" (cr4_orig) : "i" (~X86_CR4_PGE) : "memory"); } while (0)
+
+#define __native_flush_tlb_single(addr) __asm__ __volatile__("invlpg (%0)" ::"r" (addr) : "memory")
+
+#define __flush_tlb_all() do { if (cpu_has_pge) __flush_tlb_global(); else __flush_tlb(); } while (0)
+
+#define cpu_has_invlpg (boot_cpu_data.x86 > 3)
+
+#define __flush_tlb_one(addr) do { if (cpu_has_invlpg) __flush_tlb_single(addr); else __flush_tlb(); } while (0)
+
+#define TLB_FLUSH_ALL 0xffffffff
+
+#include <linux/sched.h>
+
+#define flush_tlb() __flush_tlb()
+#define flush_tlb_all() __flush_tlb_all()
+#define local_flush_tlb() __flush_tlb()
+
+#define flush_tlb_others(mask, mm, va) native_flush_tlb_others(&mask, mm, va)
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/tsc.h b/6/platforms/android-9/arch-x86/usr/include/asm/tsc.h
new file mode 100644
index 0000000..2528cd1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/tsc.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_TSC_H
+#define _ASM_X86_TSC_H
+
+#include <asm/processor.h>
+
+#define NS_SCALE 10
+#define US_SCALE 32
+
+typedef unsigned long long cycles_t;
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/types.h b/6/platforms/android-9/arch-x86/usr/include/asm/types.h
new file mode 100644
index 0000000..4af92b0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/types.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_TYPES_H
+#define _ASM_X86_TYPES_H
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned short umode_t;
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#ifdef __i386__
+#ifdef __GNUC__
+__extension__ typedef __signed__ long long __s64;
+__extension__ typedef unsigned long long __u64;
+#endif
+#else
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#endif
+
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/uaccess.h b/6/platforms/android-9/arch-x86/usr/include/asm/uaccess.h
new file mode 100644
index 0000000..b2bec69
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/uaccess.h
@@ -0,0 +1,12 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include "uaccess_64.h"
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/uaccess_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/uaccess_32.h
new file mode 100644
index 0000000..9827fc4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/uaccess_32.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __i386_UACCESS_H
+#define __i386_UACCESS_H
+
+#include <linux/errno.h>
+#include <linux/thread_info.h>
+#include <linux/prefetch.h>
+#include <linux/string.h>
+#include <asm/page.h>
+
+#define VERIFY_READ 0
+#define VERIFY_WRITE 1
+
+#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
+
+#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFFUL)
+#define USER_DS MAKE_MM_SEG(PAGE_OFFSET)
+
+#define get_ds() (KERNEL_DS)
+#define get_fs() (current_thread_info()->addr_limit)
+#define set_fs(x) (current_thread_info()->addr_limit = (x))
+
+#define segment_eq(a,b) ((a).seg == (b).seg)
+
+#define __addr_ok(addr) ((unsigned long __force)(addr) < (current_thread_info()->addr_limit.seg))
+
+#define __range_ok(addr,size) ({ unsigned long flag,roksum; __chk_user_ptr(addr); asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" :"=&r" (flag), "=r" (roksum) :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); flag; })
+
+#define access_ok(type,addr,size) (likely(__range_ok(addr,size) == 0))
+
+struct exception_table_entry
+{
+ unsigned long insn, fixup;
+};
+
+#define __get_user_x(size,ret,x,ptr) __asm__ __volatile__("call __get_user_" #size :"=a" (ret),"=d" (x) :"0" (ptr))
+
+#define get_user(x,ptr) ({ int __ret_gu; unsigned long __val_gu; __chk_user_ptr(ptr); switch(sizeof (*(ptr))) { case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; } (x) = (__typeof__(*(ptr)))__val_gu; __ret_gu; })
+
+#define __put_user_1(x, ptr) __asm__ __volatile__("call __put_user_1":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
+#define __put_user_2(x, ptr) __asm__ __volatile__("call __put_user_2":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
+#define __put_user_4(x, ptr) __asm__ __volatile__("call __put_user_4":"=a" (__ret_pu):"0" ((typeof(*(ptr)))(x)), "c" (ptr))
+#define __put_user_8(x, ptr) __asm__ __volatile__("call __put_user_8":"=a" (__ret_pu):"A" ((typeof(*(ptr)))(x)), "c" (ptr))
+#define __put_user_X(x, ptr) __asm__ __volatile__("call __put_user_X":"=a" (__ret_pu):"c" (ptr))
+
+#define put_user(x,ptr) ({ int __ret_pu; __typeof__(*(ptr)) __pus_tmp = x; __ret_pu=0; if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, sizeof(*(ptr))) != 0)) __ret_pu=-EFAULT; __ret_pu; })
+
+#define __get_user(x,ptr) __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
+
+#define __put_user(x,ptr) __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
+
+#define __put_user_nocheck(x,ptr,size) ({ long __pu_err; __put_user_size((x),(ptr),(size),__pu_err,-EFAULT); __pu_err; })
+
+#define __put_user_u64(x, addr, err) __asm__ __volatile__( "1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" ".section __ex_table,\"a\"\n" " .align 4\n" " .long 1b,4b\n" " .long 2b,4b\n" ".previous" : "=r"(err) : "A" (x), "r" (addr), "i"(-EFAULT), "0"(err))
+
+#define __put_user_size(x,ptr,size,retval,errret) do { __typeof__(*(ptr)) __pus_tmp = x; retval = 0; if(unlikely(__copy_to_user_ll(ptr, &__pus_tmp, size) != 0)) retval = errret; } while (0)
+
+struct __large_struct { unsigned long buf[100]; };
+#define __m(x) (*(struct __large_struct __user *)(x))
+
+#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) __asm__ __volatile__( "1: mov"itype" %"rtype"1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " jmp 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" " .align 4\n" " .long 1b,3b\n" ".previous" : "=r"(err) : ltype (x), "m"(__m(addr)), "i"(errret), "0"(err))
+
+#define __get_user_nocheck(x,ptr,size) ({ long __gu_err; unsigned long __gu_val; __get_user_size(__gu_val,(ptr),(size),__gu_err,-EFAULT); (x) = (__typeof__(*(ptr)))__gu_val; __gu_err; })
+
+#define __get_user_size(x,ptr,size,retval,errret) do { retval = 0; __chk_user_ptr(ptr); switch (size) { case 1: __get_user_asm(x,ptr,retval,"b","b","=q",errret);break; case 2: __get_user_asm(x,ptr,retval,"w","w","=r",errret);break; case 4: __get_user_asm(x,ptr,retval,"l","","=r",errret);break; default: (x) = __get_user_bad(); } } while (0)
+
+#define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) __asm__ __volatile__( "1: mov"itype" %2,%"rtype"1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: movl %3,%0\n" " xor"itype" %"rtype"1,%"rtype"1\n" " jmp 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" " .align 4\n" " .long 1b,3b\n" ".previous" : "=r"(err), ltype (x) : "m"(__m(addr)), "i"(errret), "0"(err))
+
+#define ARCH_HAS_NOCACHE_UACCESS
+
+#define strlen_user(str) strnlen_user(str, LONG_MAX)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/unaligned.h b/6/platforms/android-9/arch-x86/usr/include/asm/unaligned.h
new file mode 100644
index 0000000..ce7a8a7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/unaligned.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_UNALIGNED_H
+#define _ASM_X86_UNALIGNED_H
+
+#define get_unaligned(ptr) (*(ptr))
+
+#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/unistd.h b/6/platforms/android-9/arch-x86/usr/include/asm/unistd.h
new file mode 100644
index 0000000..769f836
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/unistd.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifdef __i386__
+#include "unistd_32.h"
+#else
+#include "unistd_64.h"
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/unistd_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/unistd_32.h
new file mode 100644
index 0000000..b3d8b19
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/unistd_32.h
@@ -0,0 +1,341 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_I386_UNISTD_H_
+#define _ASM_I386_UNISTD_H_
+
+#define __NR_restart_syscall 0
+#define __NR_exit 1
+#define __NR_fork 2
+#define __NR_read 3
+#define __NR_write 4
+#define __NR_open 5
+#define __NR_close 6
+#define __NR_waitpid 7
+#define __NR_creat 8
+#define __NR_link 9
+#define __NR_unlink 10
+#define __NR_execve 11
+#define __NR_chdir 12
+#define __NR_time 13
+#define __NR_mknod 14
+#define __NR_chmod 15
+#define __NR_lchown 16
+#define __NR_break 17
+#define __NR_oldstat 18
+#define __NR_lseek 19
+#define __NR_getpid 20
+#define __NR_mount 21
+#define __NR_umount 22
+#define __NR_setuid 23
+#define __NR_getuid 24
+#define __NR_stime 25
+#define __NR_ptrace 26
+#define __NR_alarm 27
+#define __NR_oldfstat 28
+#define __NR_pause 29
+#define __NR_utime 30
+#define __NR_stty 31
+#define __NR_gtty 32
+#define __NR_access 33
+#define __NR_nice 34
+#define __NR_ftime 35
+#define __NR_sync 36
+#define __NR_kill 37
+#define __NR_rename 38
+#define __NR_mkdir 39
+#define __NR_rmdir 40
+#define __NR_dup 41
+#define __NR_pipe 42
+#define __NR_times 43
+#define __NR_prof 44
+#define __NR_brk 45
+#define __NR_setgid 46
+#define __NR_getgid 47
+#define __NR_signal 48
+#define __NR_geteuid 49
+#define __NR_getegid 50
+#define __NR_acct 51
+#define __NR_umount2 52
+#define __NR_lock 53
+#define __NR_ioctl 54
+#define __NR_fcntl 55
+#define __NR_mpx 56
+#define __NR_setpgid 57
+#define __NR_ulimit 58
+#define __NR_oldolduname 59
+#define __NR_umask 60
+#define __NR_chroot 61
+#define __NR_ustat 62
+#define __NR_dup2 63
+#define __NR_getppid 64
+#define __NR_getpgrp 65
+#define __NR_setsid 66
+#define __NR_sigaction 67
+#define __NR_sgetmask 68
+#define __NR_ssetmask 69
+#define __NR_setreuid 70
+#define __NR_setregid 71
+#define __NR_sigsuspend 72
+#define __NR_sigpending 73
+#define __NR_sethostname 74
+#define __NR_setrlimit 75
+#define __NR_getrlimit 76
+#define __NR_getrusage 77
+#define __NR_gettimeofday 78
+#define __NR_settimeofday 79
+#define __NR_getgroups 80
+#define __NR_setgroups 81
+#define __NR_select 82
+#define __NR_symlink 83
+#define __NR_oldlstat 84
+#define __NR_readlink 85
+#define __NR_uselib 86
+#define __NR_swapon 87
+#define __NR_reboot 88
+#define __NR_readdir 89
+#define __NR_mmap 90
+#define __NR_munmap 91
+#define __NR_truncate 92
+#define __NR_ftruncate 93
+#define __NR_fchmod 94
+#define __NR_fchown 95
+#define __NR_getpriority 96
+#define __NR_setpriority 97
+#define __NR_profil 98
+#define __NR_statfs 99
+#define __NR_fstatfs 100
+#define __NR_ioperm 101
+#define __NR_socketcall 102
+#define __NR_syslog 103
+#define __NR_setitimer 104
+#define __NR_getitimer 105
+#define __NR_stat 106
+#define __NR_lstat 107
+#define __NR_fstat 108
+#define __NR_olduname 109
+#define __NR_iopl 110
+#define __NR_vhangup 111
+#define __NR_idle 112
+#define __NR_vm86old 113
+#define __NR_wait4 114
+#define __NR_swapoff 115
+#define __NR_sysinfo 116
+#define __NR_ipc 117
+#define __NR_fsync 118
+#define __NR_sigreturn 119
+#define __NR_clone 120
+#define __NR_setdomainname 121
+#define __NR_uname 122
+#define __NR_modify_ldt 123
+#define __NR_adjtimex 124
+#define __NR_mprotect 125
+#define __NR_sigprocmask 126
+#define __NR_create_module 127
+#define __NR_init_module 128
+#define __NR_delete_module 129
+#define __NR_get_kernel_syms 130
+#define __NR_quotactl 131
+#define __NR_getpgid 132
+#define __NR_fchdir 133
+#define __NR_bdflush 134
+#define __NR_sysfs 135
+#define __NR_personality 136
+#define __NR_afs_syscall 137
+#define __NR_setfsuid 138
+#define __NR_setfsgid 139
+#define __NR__llseek 140
+#define __NR_getdents 141
+#define __NR__newselect 142
+#define __NR_flock 143
+#define __NR_msync 144
+#define __NR_readv 145
+#define __NR_writev 146
+#define __NR_getsid 147
+#define __NR_fdatasync 148
+#define __NR__sysctl 149
+#define __NR_mlock 150
+#define __NR_munlock 151
+#define __NR_mlockall 152
+#define __NR_munlockall 153
+#define __NR_sched_setparam 154
+#define __NR_sched_getparam 155
+#define __NR_sched_setscheduler 156
+#define __NR_sched_getscheduler 157
+#define __NR_sched_yield 158
+#define __NR_sched_get_priority_max 159
+#define __NR_sched_get_priority_min 160
+#define __NR_sched_rr_get_interval 161
+#define __NR_nanosleep 162
+#define __NR_mremap 163
+#define __NR_setresuid 164
+#define __NR_getresuid 165
+#define __NR_vm86 166
+#define __NR_query_module 167
+#define __NR_poll 168
+#define __NR_nfsservctl 169
+#define __NR_setresgid 170
+#define __NR_getresgid 171
+#define __NR_prctl 172
+#define __NR_rt_sigreturn 173
+#define __NR_rt_sigaction 174
+#define __NR_rt_sigprocmask 175
+#define __NR_rt_sigpending 176
+#define __NR_rt_sigtimedwait 177
+#define __NR_rt_sigqueueinfo 178
+#define __NR_rt_sigsuspend 179
+#define __NR_pread64 180
+#define __NR_pwrite64 181
+#define __NR_chown 182
+#define __NR_getcwd 183
+#define __NR_capget 184
+#define __NR_capset 185
+#define __NR_sigaltstack 186
+#define __NR_sendfile 187
+#define __NR_getpmsg 188
+#define __NR_putpmsg 189
+#define __NR_vfork 190
+#define __NR_ugetrlimit 191
+#define __NR_mmap2 192
+#define __NR_truncate64 193
+#define __NR_ftruncate64 194
+#define __NR_stat64 195
+#define __NR_lstat64 196
+#define __NR_fstat64 197
+#define __NR_lchown32 198
+#define __NR_getuid32 199
+#define __NR_getgid32 200
+#define __NR_geteuid32 201
+#define __NR_getegid32 202
+#define __NR_setreuid32 203
+#define __NR_setregid32 204
+#define __NR_getgroups32 205
+#define __NR_setgroups32 206
+#define __NR_fchown32 207
+#define __NR_setresuid32 208
+#define __NR_getresuid32 209
+#define __NR_setresgid32 210
+#define __NR_getresgid32 211
+#define __NR_chown32 212
+#define __NR_setuid32 213
+#define __NR_setgid32 214
+#define __NR_setfsuid32 215
+#define __NR_setfsgid32 216
+#define __NR_pivot_root 217
+#define __NR_mincore 218
+#define __NR_madvise 219
+#define __NR_madvise1 219
+#define __NR_getdents64 220
+#define __NR_fcntl64 221
+
+#define __NR_gettid 224
+#define __NR_readahead 225
+#define __NR_setxattr 226
+#define __NR_lsetxattr 227
+#define __NR_fsetxattr 228
+#define __NR_getxattr 229
+#define __NR_lgetxattr 230
+#define __NR_fgetxattr 231
+#define __NR_listxattr 232
+#define __NR_llistxattr 233
+#define __NR_flistxattr 234
+#define __NR_removexattr 235
+#define __NR_lremovexattr 236
+#define __NR_fremovexattr 237
+#define __NR_tkill 238
+#define __NR_sendfile64 239
+#define __NR_futex 240
+#define __NR_sched_setaffinity 241
+#define __NR_sched_getaffinity 242
+#define __NR_set_thread_area 243
+#define __NR_get_thread_area 244
+#define __NR_io_setup 245
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_submit 248
+#define __NR_io_cancel 249
+#define __NR_fadvise64 250
+
+#define __NR_exit_group 252
+#define __NR_lookup_dcookie 253
+#define __NR_epoll_create 254
+#define __NR_epoll_ctl 255
+#define __NR_epoll_wait 256
+#define __NR_remap_file_pages 257
+#define __NR_set_tid_address 258
+#define __NR_timer_create 259
+#define __NR_timer_settime (__NR_timer_create+1)
+#define __NR_timer_gettime (__NR_timer_create+2)
+#define __NR_timer_getoverrun (__NR_timer_create+3)
+#define __NR_timer_delete (__NR_timer_create+4)
+#define __NR_clock_settime (__NR_timer_create+5)
+#define __NR_clock_gettime (__NR_timer_create+6)
+#define __NR_clock_getres (__NR_timer_create+7)
+#define __NR_clock_nanosleep (__NR_timer_create+8)
+#define __NR_statfs64 268
+#define __NR_fstatfs64 269
+#define __NR_tgkill 270
+#define __NR_utimes 271
+#define __NR_fadvise64_64 272
+#define __NR_vserver 273
+#define __NR_mbind 274
+#define __NR_get_mempolicy 275
+#define __NR_set_mempolicy 276
+#define __NR_mq_open 277
+#define __NR_mq_unlink (__NR_mq_open+1)
+#define __NR_mq_timedsend (__NR_mq_open+2)
+#define __NR_mq_timedreceive (__NR_mq_open+3)
+#define __NR_mq_notify (__NR_mq_open+4)
+#define __NR_mq_getsetattr (__NR_mq_open+5)
+#define __NR_kexec_load 283
+#define __NR_waitid 284
+
+#define __NR_add_key 286
+#define __NR_request_key 287
+#define __NR_keyctl 288
+#define __NR_ioprio_set 289
+#define __NR_ioprio_get 290
+#define __NR_inotify_init 291
+#define __NR_inotify_add_watch 292
+#define __NR_inotify_rm_watch 293
+#define __NR_migrate_pages 294
+#define __NR_openat 295
+#define __NR_mkdirat 296
+#define __NR_mknodat 297
+#define __NR_fchownat 298
+#define __NR_futimesat 299
+#define __NR_fstatat64 300
+#define __NR_unlinkat 301
+#define __NR_renameat 302
+#define __NR_linkat 303
+#define __NR_symlinkat 304
+#define __NR_readlinkat 305
+#define __NR_fchmodat 306
+#define __NR_faccessat 307
+#define __NR_pselect6 308
+#define __NR_ppoll 309
+#define __NR_unshare 310
+#define __NR_set_robust_list 311
+#define __NR_get_robust_list 312
+#define __NR_splice 313
+#define __NR_sync_file_range 314
+#define __NR_tee 315
+#define __NR_vmsplice 316
+#define __NR_move_pages 317
+#define __NR_getcpu 318
+#define __NR_epoll_pwait 319
+#define __NR_utimensat 320
+#define __NR_signalfd 321
+#define __NR_timerfd 322
+#define __NR_eventfd 323
+#define __NR_fallocate 324
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/user.h b/6/platforms/android-9/arch-x86/usr/include/asm/user.h
new file mode 100644
index 0000000..980b0aa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/user.h
@@ -0,0 +1,16 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifdef __i386__
+#include "user_32.h"
+#else
+#include "user_64.h"
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/user32.h b/6/platforms/android-9/arch-x86/usr/include/asm/user32.h
new file mode 100644
index 0000000..89eabb1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/user32.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef USER32_H
+#define USER32_H 1
+
+struct user_i387_ia32_struct {
+ u32 cwd;
+ u32 swd;
+ u32 twd;
+ u32 fip;
+ u32 fcs;
+ u32 foo;
+ u32 fos;
+ u32 st_space[20];
+};
+
+struct user32_fxsr_struct {
+ unsigned short cwd;
+ unsigned short swd;
+ unsigned short twd;
+ unsigned short fop;
+ int fip;
+ int fcs;
+ int foo;
+ int fos;
+ int mxcsr;
+ int reserved;
+ int st_space[32];
+ int xmm_space[32];
+ int padding[56];
+};
+
+struct user_regs_struct32 {
+ __u32 ebx, ecx, edx, esi, edi, ebp, eax;
+ unsigned short ds, __ds, es, __es;
+ unsigned short fs, __fs, gs, __gs;
+ __u32 orig_eax, eip;
+ unsigned short cs, __cs;
+ __u32 eflags, esp;
+ unsigned short ss, __ss;
+};
+
+struct user32 {
+ struct user_regs_struct32 regs;
+ int u_fpvalid;
+
+ struct user_i387_ia32_struct i387;
+
+ __u32 u_tsize;
+ __u32 u_dsize;
+ __u32 u_ssize;
+ __u32 start_code;
+ __u32 start_stack;
+ __u32 signal;
+ int reserved;
+ __u32 u_ar0;
+
+ __u32 u_fpstate;
+ __u32 magic;
+ char u_comm[32];
+ int u_debugreg[8];
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/user_32.h b/6/platforms/android-9/arch-x86/usr/include/asm/user_32.h
new file mode 100644
index 0000000..8e0296c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/user_32.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _I386_USER_H
+#define _I386_USER_H
+
+#include <asm/page.h>
+
+struct user_i387_struct {
+ long cwd;
+ long swd;
+ long twd;
+ long fip;
+ long fcs;
+ long foo;
+ long fos;
+ long st_space[20];
+};
+
+struct user_fxsr_struct {
+ unsigned short cwd;
+ unsigned short swd;
+ unsigned short twd;
+ unsigned short fop;
+ long fip;
+ long fcs;
+ long foo;
+ long fos;
+ long mxcsr;
+ long reserved;
+ long st_space[32];
+ long xmm_space[32];
+ long padding[56];
+};
+
+struct user_regs_struct {
+ long ebx, ecx, edx, esi, edi, ebp, eax;
+ unsigned short ds, __ds, es, __es;
+ unsigned short fs, __fs, gs, __gs;
+ long orig_eax, eip;
+ unsigned short cs, __cs;
+ long eflags, esp;
+ unsigned short ss, __ss;
+};
+
+struct user{
+
+ struct user_regs_struct regs;
+
+ int u_fpvalid;
+
+ struct user_i387_struct i387;
+
+ unsigned long int u_tsize;
+ unsigned long int u_dsize;
+ unsigned long int u_ssize;
+ unsigned long start_code;
+ unsigned long start_stack;
+ long int signal;
+ int reserved;
+ struct user_pt_regs * u_ar0;
+
+ struct user_i387_struct* u_fpstate;
+ unsigned long magic;
+ char u_comm[32];
+ int u_debugreg[8];
+};
+#define NBPG PAGE_SIZE
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/vm86.h b/6/platforms/android-9/arch-x86/usr/include/asm/vm86.h
new file mode 100644
index 0000000..d0e71f1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/vm86.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_VM86_H
+#define _LINUX_VM86_H
+
+#define TF_MASK 0x00000100
+#define IF_MASK 0x00000200
+#define IOPL_MASK 0x00003000
+#define NT_MASK 0x00004000
+#define VM_MASK 0
+#define AC_MASK 0x00040000
+#define VIF_MASK 0x00080000
+#define VIP_MASK 0x00100000
+#define ID_MASK 0x00200000
+
+#define BIOSSEG 0x0f000
+
+#define CPU_086 0
+#define CPU_186 1
+#define CPU_286 2
+#define CPU_386 3
+#define CPU_486 4
+#define CPU_586 5
+
+#define VM86_TYPE(retval) ((retval) & 0xff)
+#define VM86_ARG(retval) ((retval) >> 8)
+
+#define VM86_SIGNAL 0
+#define VM86_UNKNOWN 1
+#define VM86_INTx 2
+#define VM86_STI 3
+
+#define VM86_PICRETURN 4
+#define VM86_TRAP 6
+
+#define VM86_PLUS_INSTALL_CHECK 0
+#define VM86_ENTER 1
+#define VM86_ENTER_NO_BYPASS 2
+#define VM86_REQUEST_IRQ 3
+#define VM86_FREE_IRQ 4
+#define VM86_GET_IRQ_BITS 5
+#define VM86_GET_AND_RESET_IRQ 6
+
+struct vm86_regs {
+
+ long ebx;
+ long ecx;
+ long edx;
+ long esi;
+ long edi;
+ long ebp;
+ long eax;
+ long __null_ds;
+ long __null_es;
+ long __null_fs;
+ long __null_gs;
+ long orig_eax;
+ long eip;
+ unsigned short cs, __csh;
+ long eflags;
+ long esp;
+ unsigned short ss, __ssh;
+
+ unsigned short es, __esh;
+ unsigned short ds, __dsh;
+ unsigned short fs, __fsh;
+ unsigned short gs, __gsh;
+};
+
+struct revectored_struct {
+ unsigned long __map[8];
+};
+
+struct vm86_struct {
+ struct vm86_regs regs;
+ unsigned long flags;
+ unsigned long screen_bitmap;
+ unsigned long cpu_type;
+ struct revectored_struct int_revectored;
+ struct revectored_struct int21_revectored;
+};
+
+#define VM86_SCREEN_BITMAP 0x0001
+
+struct vm86plus_info_struct {
+ unsigned long force_return_for_pic:1;
+ unsigned long vm86dbg_active:1;
+ unsigned long vm86dbg_TFpendig:1;
+ unsigned long unused:28;
+ unsigned long is_vm86pus:1;
+ unsigned char vm86dbg_intxxtab[32];
+};
+
+struct vm86plus_struct {
+ struct vm86_regs regs;
+ unsigned long flags;
+ unsigned long screen_bitmap;
+ unsigned long cpu_type;
+ struct revectored_struct int_revectored;
+ struct revectored_struct int21_revectored;
+ struct vm86plus_info_struct vm86plus;
+};
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/voyager.h b/6/platforms/android-9/arch-x86/usr/include/asm/voyager.h
new file mode 100644
index 0000000..c6f50a9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/voyager.h
@@ -0,0 +1,437 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#undef VOYAGER_DEBUG
+#undef VOYAGER_CAT_DEBUG
+
+#ifdef VOYAGER_DEBUG
+#define VDEBUG(x) printk x
+#else
+#define VDEBUG(x)
+#endif
+
+#define VOYAGER_LEVEL5_AND_ABOVE 0x3435
+#define VOYAGER_LEVEL4 0x3360
+
+#define VOYAGER_DINO 0x43
+
+#define VOYAGER_MC_SETUP 0x96
+
+#define VOYAGER_CAT_CONFIG_PORT 0x97
+#define VOYAGER_CAT_DESELECT 0xff
+#define VOYAGER_SSPB_RELOCATION_PORT 0x98
+
+#define VOYAGER_CAT_IRCYC 0x01
+
+#define VOYAGER_CAT_DRCYC 0x02
+
+#define VOYAGER_CAT_RUN 0x0F
+
+#define VOYAGER_CAT_END 0x80
+
+#define VOYAGER_CAT_HOLD 0x90
+
+#define VOYAGER_CAT_STEP 0xE0
+
+#define VOYAGER_CAT_CLEMSON 0xFF
+
+#define VOYAGER_CAT_HEADER 0x7F
+
+#define VOYAGER_MIN_MODULE 0x10
+#define VOYAGER_MAX_MODULE 0x1f
+
+#define VOYAGER_ASIC_ID_REG 0x00
+#define VOYAGER_ASIC_TYPE_REG 0x01
+
+#define VOYAGER_AUTO_INC_REG 0x02
+#define VOYAGER_AUTO_INC 0x04
+#define VOYAGER_NO_AUTO_INC 0xfb
+#define VOYAGER_SUBADDRDATA 0x03
+#define VOYAGER_SCANPATH 0x05
+#define VOYAGER_CONNECT_ASIC 0x01
+#define VOYAGER_DISCONNECT_ASIC 0xfe
+#define VOYAGER_SUBADDRLO 0x06
+#define VOYAGER_SUBADDRHI 0x07
+#define VOYAGER_SUBMODSELECT 0x08
+#define VOYAGER_SUBMODPRESENT 0x09
+
+#define VOYAGER_SUBADDR_LO 0xff
+#define VOYAGER_SUBADDR_HI 0xffff
+
+#define VOYAGER_MAX_SCAN_PATH 0x100
+
+#define VOYAGER_MAX_REG_SIZE 4
+
+#define VOYAGER_MAX_MODULES 16
+
+#define VOYAGER_MAX_ASICS_PER_MODULE 7
+
+#define VOYAGER_CAT_ID 0
+#define VOYAGER_PSI 0x1a
+
+#define VOYAGER_READ_CONFIG 0x1
+#define VOYAGER_WRITE_CONFIG 0x2
+#define VOYAGER_BYPASS 0xff
+
+typedef struct voyager_asic
+{
+ __u8 asic_addr;
+ __u8 asic_type;
+ __u8 asic_id;
+ __u8 jtag_id[4];
+ __u8 asic_location;
+ __u8 bit_location;
+ __u8 ireg_length;
+ __u16 subaddr;
+ struct voyager_asic *next;
+} voyager_asic_t;
+
+typedef struct voyager_module {
+ __u8 module_addr;
+ __u8 scan_path_connected;
+ __u16 ee_size;
+ __u16 num_asics;
+ __u16 inst_bits;
+ __u16 largest_reg;
+ __u16 smallest_reg;
+ voyager_asic_t *asic;
+ struct voyager_module *submodule;
+ struct voyager_module *next;
+} voyager_module_t;
+
+typedef struct voyager_eeprom_hdr {
+ __u8 module_id[4];
+ __u8 version_id;
+ __u8 config_id;
+ __u16 boundry_id;
+ __u16 ee_size;
+ __u8 assembly[11];
+ __u8 assembly_rev;
+ __u8 tracer[4];
+ __u16 assembly_cksum;
+ __u16 power_consump;
+ __u16 num_asics;
+ __u16 bist_time;
+ __u16 err_log_offset;
+ __u16 scan_path_offset;
+ __u16 cct_offset;
+ __u16 log_length;
+ __u16 xsum_end;
+ __u8 reserved[4];
+ __u8 sflag;
+ __u8 part_number[13];
+ __u8 version[10];
+ __u8 signature[8];
+ __u16 eeprom_chksum;
+ __u32 data_stamp_offset;
+ __u8 eflag ;
+} __attribute__((packed)) voyager_eprom_hdr_t;
+
+#define VOYAGER_EPROM_SIZE_OFFSET ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size)))
+#define VOYAGER_XSUM_END_OFFSET 0x2a
+
+typedef struct voyager_sp_table {
+ __u8 asic_id;
+ __u8 bypass_flag;
+ __u16 asic_data_offset;
+ __u16 config_data_offset;
+} __attribute__((packed)) voyager_sp_table_t;
+
+typedef struct voyager_jtag_table {
+ __u8 icode[4];
+ __u8 runbist[4];
+ __u8 intest[4];
+ __u8 samp_preld[4];
+ __u8 ireg_len;
+} __attribute__((packed)) voyager_jtt_t;
+
+typedef struct voyager_asic_data_table {
+ __u8 jtag_id[4];
+ __u16 length_bsr;
+ __u16 length_bist_reg;
+ __u32 bist_clk;
+ __u16 subaddr_bits;
+ __u16 seed_bits;
+ __u16 sig_bits;
+ __u16 jtag_offset;
+} __attribute__((packed)) voyager_at_t;
+
+#define VOYAGER_WCBIC0 0x41
+#define VOYAGER_WCBIC1 0x49
+#define VOYAGER_WCBIC2 0x51
+#define VOYAGER_WCBIC3 0x59
+#define VOYAGER_WCBIC4 0x61
+#define VOYAGER_WCBIC5 0x69
+#define VOYAGER_WCBIC6 0x71
+#define VOYAGER_WCBIC7 0x79
+
+#define VOYAGER_WCBIC_TOM_L 0x4
+#define VOYAGER_WCBIC_TOM_H 0x5
+
+#define VOYAGER_VMC1 0x81
+#define VOYAGER_VMC2 0x91
+#define VOYAGER_VMC3 0xa1
+#define VOYAGER_VMC4 0xb1
+
+#define VOYAGER_VMC_MEMORY_SETUP 0x9
+#define VMC_Interleaving 0x01
+#define VMC_4Way 0x02
+#define VMC_EvenCacheLines 0x04
+#define VMC_HighLine 0x08
+#define VMC_Start0_Enable 0x20
+#define VMC_Start1_Enable 0x40
+#define VMC_Vremap 0x80
+#define VOYAGER_VMC_BANK_DENSITY 0xa
+#define VMC_BANK_EMPTY 0
+#define VMC_BANK_4MB 1
+#define VMC_BANK_16MB 2
+#define VMC_BANK_64MB 3
+#define VMC_BANK0_MASK 0x03
+#define VMC_BANK1_MASK 0x0C
+#define VMC_BANK2_MASK 0x30
+#define VMC_BANK3_MASK 0xC0
+
+#define VOYAGER_MMC_ASIC_ID 1
+
+#define VOYAGER_MMC_MEMORY0_MODULE 0x14
+#define VOYAGER_MMC_MEMORY1_MODULE 0x15
+
+#define VOYAGER_MMA_ASIC_ID 2
+
+#define VOYAGER_QUAD_BASEBOARD 1
+
+#define VOYAGER_QUAD_QDATA0 1
+#define VOYAGER_QUAD_QDATA1 2
+#define VOYAGER_QUAD_QABC 3
+
+#define VOYAGER_PROCESSOR_PRESENT_MASK 0x88a
+#define VOYAGER_MEMORY_CLICKMAP 0xa23
+#define VOYAGER_DUMP_LOCATION 0xb1a
+
+#define VOYAGER_SUS_IN_CONTROL_PORT 0x3ff
+#define VOYAGER_IN_CONTROL_FLAG 0x80
+
+#define VOYAGER_PSI_STATUS_REG 0x08
+#define PSI_DC_FAIL 0x01
+#define PSI_MON 0x02
+#define PSI_FAULT 0x04
+#define PSI_ALARM 0x08
+#define PSI_CURRENT 0x10
+#define PSI_DVM 0x20
+#define PSI_PSCFAULT 0x40
+#define PSI_STAT_CHG 0x80
+
+#define VOYAGER_PSI_SUPPLY_REG 0x8000
+
+#define PSI_FAIL_DC 0x01
+#define PSI_FAIL_AC 0x02
+#define PSI_MON_INT 0x04
+#define PSI_SWITCH_OFF 0x08
+#define PSI_HX_OFF 0x10
+#define PSI_SECURITY 0x20
+#define PSI_CMOS_BATT_LOW 0x40
+#define PSI_CMOS_BATT_FAIL 0x80
+
+#define PSI_CLR_SWITCH_OFF 0x13
+#define PSI_CLR_HX_OFF 0x14
+#define PSI_CLR_CMOS_BATT_FAIL 0x17
+
+#define VOYAGER_PSI_MASK 0x8001
+#define PSI_MASK_MASK 0x10
+
+#define VOYAGER_PSI_AC_FAIL_REG 0x8004
+#define AC_FAIL_STAT_CHANGE 0x80
+
+#define VOYAGER_PSI_GENERAL_REG 0x8007
+
+#define PSI_SWITCH_ON 0x01
+#define PSI_SWITCH_ENABLED 0x02
+#define PSI_ALARM_ENABLED 0x08
+#define PSI_SECURE_ENABLED 0x10
+#define PSI_COLD_RESET 0x20
+#define PSI_COLD_START 0x80
+
+#define PSI_POWER_DOWN 0x10
+#define PSI_SWITCH_DISABLE 0x01
+#define PSI_SWITCH_ENABLE 0x11
+#define PSI_CLEAR 0x12
+#define PSI_ALARM_DISABLE 0x03
+#define PSI_ALARM_ENABLE 0x13
+#define PSI_CLEAR_COLD_RESET 0x05
+#define PSI_SET_COLD_RESET 0x15
+#define PSI_CLEAR_COLD_START 0x07
+#define PSI_SET_COLD_START 0x17
+
+struct voyager_bios_info {
+ __u8 len;
+ __u8 major;
+ __u8 minor;
+ __u8 debug;
+ __u8 num_classes;
+ __u8 class_1;
+ __u8 class_2;
+};
+
+#define NUMBER_OF_MC_BUSSES 2
+#define SLOTS_PER_MC_BUS 8
+#define MAX_CPUS 16
+#define MAX_PROCESSOR_BOARDS 4
+#define MAX_CACHE_LEVELS 4
+#define MAX_SHARED_CPUS 4
+#define NUMBER_OF_POS_REGS 8
+
+typedef struct {
+ __u8 MC_Slot;
+ __u8 POS_Values[NUMBER_OF_POS_REGS];
+} __attribute__((packed)) MC_SlotInformation_t;
+
+struct QuadDescription {
+ __u8 Type;
+ __u8 StructureVersion;
+ __u32 CPI_BaseAddress;
+ __u32 LARC_BankSize;
+ __u32 LocalMemoryStateBits;
+ __u8 Slot;
+} __attribute__((packed));
+
+struct ProcBoardInfo {
+ __u8 Type;
+ __u8 StructureVersion;
+ __u8 NumberOfBoards;
+ struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS];
+} __attribute__((packed));
+
+struct CacheDescription {
+ __u8 Level;
+ __u32 TotalSize;
+ __u16 LineSize;
+ __u8 Associativity;
+ __u8 CacheType;
+ __u8 WriteType;
+ __u8 Number_CPUs_SharedBy;
+ __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS];
+
+} __attribute__((packed));
+
+struct CPU_Description {
+ __u8 CPU_HardwareId;
+ char *FRU_String;
+ __u8 NumberOfCacheLevels;
+ struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS];
+} __attribute__((packed));
+
+struct CPU_Info {
+ __u8 Type;
+ __u8 StructureVersion;
+ __u8 NumberOf_CPUs;
+ struct CPU_Description CPU_Data[MAX_CPUS];
+} __attribute__((packed));
+
+typedef struct {
+ __u8 Mailbox_SUS;
+ __u8 Mailbox_OS;
+ __u8 SUS_MailboxVersion;
+ __u8 OS_MailboxVersion;
+ __u32 OS_Flags;
+ __u32 SUS_Flags;
+ __u32 WatchDogPeriod;
+ __u32 WatchDogCount;
+ __u32 MemoryFor_SUS_ErrorLog;
+ MC_SlotInformation_t MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS];
+
+ struct ProcBoardInfo *BoardData;
+ struct CPU_Info *CPU_Data;
+
+} Voyager_KernelSUS_Mbox_t;
+
+struct voyager_qic_cpi {
+
+ struct {
+ __u32 pad1[3];
+ __u32 cpi;
+ __u32 pad2[4];
+ } qic_cpi[8];
+};
+
+struct voyager_status {
+ __u32 power_fail:1;
+ __u32 switch_off:1;
+ __u32 request_from_kernel:1;
+};
+
+struct voyager_psi_regs {
+ __u8 cat_id;
+ __u8 cat_dev;
+ __u8 cat_control;
+ __u8 subaddr;
+ __u8 dummy4;
+ __u8 checkbit;
+ __u8 subaddr_low;
+ __u8 subaddr_high;
+ __u8 intstatus;
+ __u8 stat1;
+ __u8 stat3;
+ __u8 fault;
+ __u8 tms;
+ __u8 gen;
+ __u8 sysconf;
+ __u8 dummy15;
+};
+
+struct voyager_psi_subregs {
+ __u8 supply;
+ __u8 mask;
+ __u8 present;
+ __u8 DCfail;
+ __u8 ACfail;
+ __u8 fail;
+ __u8 UPSfail;
+ __u8 genstatus;
+};
+
+struct voyager_psi {
+ struct voyager_psi_regs regs;
+ struct voyager_psi_subregs subregs;
+};
+
+struct voyager_SUS {
+#define VOYAGER_DUMP_BUTTON_NMI 0x1
+#define VOYAGER_SUS_VALID 0x2
+#define VOYAGER_SYSINT_COMPLETE 0x3
+ __u8 SUS_mbox;
+#define VOYAGER_NO_COMMAND 0x0
+#define VOYAGER_IGNORE_DUMP 0x1
+#define VOYAGER_DO_DUMP 0x2
+#define VOYAGER_SYSINT_HANDSHAKE 0x3
+#define VOYAGER_DO_MEM_DUMP 0x4
+#define VOYAGER_SYSINT_WAS_RECOVERED 0x5
+ __u8 kernel_mbox;
+#define VOYAGER_MAILBOX_VERSION 0x10
+ __u8 SUS_version;
+ __u8 kernel_version;
+#define VOYAGER_OS_HAS_SYSINT 0x1
+#define VOYAGER_OS_IN_PROGRESS 0x2
+#define VOYAGER_UPDATING_WDPERIOD 0x4
+ __u32 kernel_flags;
+#define VOYAGER_SUS_BOOTING 0x1
+#define VOYAGER_SUS_IN_PROGRESS 0x2
+ __u32 SUS_flags;
+ __u32 watchdog_period;
+ __u32 watchdog_count;
+ __u32 SUS_errorlog;
+
+};
+
+#define VOYAGER_PSI_READ 0
+#define VOYAGER_PSI_WRITE 1
+#define VOYAGER_PSI_SUBREAD 2
+#define VOYAGER_PSI_SUBWRITE 3
+
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/vsyscall.h b/6/platforms/android-9/arch-x86/usr/include/asm/vsyscall.h
new file mode 100644
index 0000000..a7bee3b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/vsyscall.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_64_VSYSCALL_H_
+#define _ASM_X86_64_VSYSCALL_H_
+
+enum vsyscall_num {
+ __NR_vgettimeofday,
+ __NR_vtime,
+ __NR_vgetcpu,
+};
+
+#define VSYSCALL_START (-10UL << 20)
+#define VSYSCALL_SIZE 1024
+#define VSYSCALL_END (-2UL << 20)
+#define VSYSCALL_MAPPED_PAGES 1
+#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/asm/xen/hypercall.h b/6/platforms/android-9/arch-x86/usr/include/asm/xen/hypercall.h
new file mode 100644
index 0000000..3c523a8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/asm/xen/hypercall.h
@@ -0,0 +1,34 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __HYPERCALL_H__
+#define __HYPERCALL_H__
+
+#include <linux/errno.h>
+#include <linux/string.h>
+
+#include <xen/interface/xen.h>
+#include <xen/interface/sched.h>
+#include <xen/interface/physdev.h>
+
+#define _hypercall0(type, name) ({ long __res; asm volatile ( "call %[call]" : "=a" (__res) : [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#define _hypercall1(type, name, a1) ({ long __res, __ign1; asm volatile ( "call %[call]" : "=a" (__res), "=b" (__ign1) : "1" ((long)(a1)), [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#define _hypercall2(type, name, a1, a2) ({ long __res, __ign1, __ign2; asm volatile ( "call %[call]" : "=a" (__res), "=b" (__ign1), "=c" (__ign2) : "1" ((long)(a1)), "2" ((long)(a2)), [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#define _hypercall3(type, name, a1, a2, a3) ({ long __res, __ign1, __ign2, __ign3; asm volatile ( "call %[call]" : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3) : "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)), [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#define _hypercall4(type, name, a1, a2, a3, a4) ({ long __res, __ign1, __ign2, __ign3, __ign4; asm volatile ( "call %[call]" : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3), "=S" (__ign4) : "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)), "4" ((long)(a4)), [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#define _hypercall5(type, name, a1, a2, a3, a4, a5) ({ long __res, __ign1, __ign2, __ign3, __ign4, __ign5; asm volatile ( "call %[call]" : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3), "=S" (__ign4), "=D" (__ign5) : "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)), "4" ((long)(a4)), "5" ((long)(a5)), [call] "m" (hypercall_page[__HYPERVISOR_##name]) : "memory" ); (type)__res; })
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/assert.h b/6/platforms/android-9/arch-x86/usr/include/assert.h
new file mode 120000
index 0000000..eb0a5ff
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/assert.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/assert.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/byteswap.h b/6/platforms/android-9/arch-x86/usr/include/byteswap.h
new file mode 120000
index 0000000..b902c2b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/byteswap.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/byteswap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/ctype.h b/6/platforms/android-9/arch-x86/usr/include/ctype.h
new file mode 120000
index 0000000..2cadc69
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/ctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/dirent.h b/6/platforms/android-9/arch-x86/usr/include/dirent.h
new file mode 120000
index 0000000..fd4be69
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/dirent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/dlfcn.h b/6/platforms/android-9/arch-x86/usr/include/dlfcn.h
new file mode 120000
index 0000000..679b2c5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/dlfcn.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/dlfcn.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/elf.h b/6/platforms/android-9/arch-x86/usr/include/elf.h
new file mode 120000
index 0000000..6442768
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/elf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/endian.h b/6/platforms/android-9/arch-x86/usr/include/endian.h
new file mode 100644
index 0000000..4a70536
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/endian.h
@@ -0,0 +1,70 @@
+/* $OpenBSD: endian.h,v 1.14 2005/12/13 00:35:23 millert Exp $ */
+
+/*-
+ * Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _I386_ENDIAN_H_
+#define _I386_ENDIAN_H_
+
+#ifdef __GNUC__
+
+#if defined(_KERNEL) && !defined(I386_CPU)
+#define __swap32md(x) ({ \
+ uint32_t __swap32md_x = (x); \
+ \
+ __asm ("bswap %1" : "+r" (__swap32md_x)); \
+ __swap32md_x; \
+})
+#else
+#define __swap32md(x) ({ \
+ uint32_t __swap32md_x = (x); \
+ \
+ __asm ("rorw $8, %w1; rorl $16, %1; rorw $8, %w1" : \
+ "+r" (__swap32md_x)); \
+ __swap32md_x; \
+})
+#endif /* _KERNEL && !I386_CPU */
+
+#define __swap64md(x) ({ \
+ uint64_t __swap64md_x = (x); \
+ \
+ (uint64_t)__swap32md(__swap64md_x >> 32) | \
+ (uint64_t)__swap32md(__swap64md_x & 0xffffffff) << 32; \
+})
+#define __swap16md(x) ({ \
+ uint16_t __swap16md_x = (x); \
+ \
+ __asm ("rorw $8, %w1" : "+r" (__swap16md_x)); \
+ __swap16md_x; \
+})
+
+/* Tell sys/endian.h we have MD variants of the swap macros. */
+#define MD_SWAP
+
+#endif /* __GNUC__ */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <sys/endian.h>
+
+#endif /* _I386_ENDIAN_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/err.h b/6/platforms/android-9/arch-x86/usr/include/err.h
new file mode 120000
index 0000000..0894f1e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/err.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/errno.h b/6/platforms/android-9/arch-x86/usr/include/errno.h
new file mode 120000
index 0000000..fd9f7df
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/errno.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/fcntl.h b/6/platforms/android-9/arch-x86/usr/include/fcntl.h
new file mode 120000
index 0000000..28ee420
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/fcntl.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/features.h b/6/platforms/android-9/arch-x86/usr/include/features.h
new file mode 120000
index 0000000..1c3e36e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/features.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/features.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/fenv.h b/6/platforms/android-9/arch-x86/usr/include/fenv.h
new file mode 100644
index 0000000..5fe64e2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/fenv.h
@@ -0,0 +1,242 @@
+/*-
+ * Copyright (c) 2004-2005 David Schultz <das@FreeBSD.ORG>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/msun/i387/fenv.h,v 1.4 2005/03/17 22:21:46 das Exp $
+ */
+
+#ifndef _FENV_H_
+#define _FENV_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+/*
+ * To preserve binary compatibility with FreeBSD 5.3, we pack the
+ * mxcsr into some reserved fields, rather than changing sizeof(fenv_t).
+ */
+typedef struct {
+ __uint16_t __control;
+ __uint16_t __mxcsr_hi;
+ __uint16_t __status;
+ __uint16_t __mxcsr_lo;
+ __uint32_t __tag;
+ char __other[16];
+} fenv_t;
+
+#define __get_mxcsr(env) (((env).__mxcsr_hi << 16) | \
+ ((env).__mxcsr_lo))
+#define __set_mxcsr(env, x) do { \
+ (env).__mxcsr_hi = (__uint32_t)(x) >> 16; \
+ (env).__mxcsr_lo = (__uint16_t)(x); \
+} while (0)
+
+typedef __uint16_t fexcept_t;
+
+/* Exception flags */
+#define FE_INVALID 0x01
+#define FE_DENORMAL 0x02
+#define FE_DIVBYZERO 0x04
+#define FE_OVERFLOW 0x08
+#define FE_UNDERFLOW 0x10
+#define FE_INEXACT 0x20
+#define FE_ALL_EXCEPT (FE_DIVBYZERO | FE_DENORMAL | FE_INEXACT | \
+ FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
+
+/* Rounding modes */
+#define FE_TONEAREST 0x0000
+#define FE_DOWNWARD 0x0400
+#define FE_UPWARD 0x0800
+#define FE_TOWARDZERO 0x0c00
+#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
+ FE_UPWARD | FE_TOWARDZERO)
+
+/*
+ * As compared to the x87 control word, the SSE unit's control word
+ * has the rounding control bits offset by 3 and the exception mask
+ * bits offset by 7.
+ */
+#define _SSE_ROUND_SHIFT 3
+#define _SSE_EMASK_SHIFT 7
+
+/* After testing for SSE support once, we cache the result in __has_sse. */
+enum __sse_support { __SSE_YES, __SSE_NO, __SSE_UNK };
+extern enum __sse_support __has_sse;
+int __test_sse(void);
+#ifdef __SSE__
+#define __HAS_SSE() 1
+#else
+#define __HAS_SSE() (__has_sse == __SSE_YES || \
+ (__has_sse == __SSE_UNK && __test_sse()))
+#endif
+
+__BEGIN_DECLS
+
+/* Default floating-point environment */
+extern const fenv_t __fe_dfl_env;
+#define FE_DFL_ENV (&__fe_dfl_env)
+
+#define __fldcw(__cw) __asm __volatile("fldcw %0" : : "m" (__cw))
+#define __fldenv(__env) __asm __volatile("fldenv %0" : : "m" (__env))
+#define __fnclex() __asm __volatile("fnclex")
+#define __fnstenv(__env) __asm __volatile("fnstenv %0" : "=m" (*(__env)))
+#define __fnstcw(__cw) __asm __volatile("fnstcw %0" : "=m" (*(__cw)))
+#define __fnstsw(__sw) __asm __volatile("fnstsw %0" : "=a" (*(__sw)))
+#define __fwait() __asm __volatile("fwait")
+#define __ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr))
+#define __stmxcsr(__csr) __asm __volatile("stmxcsr %0" : "=m" (*(__csr)))
+
+static __inline int
+feclearexcept(int __excepts)
+{
+ fenv_t __env;
+ int __mxcsr;
+
+ if (__excepts == FE_ALL_EXCEPT) {
+ __fnclex();
+ } else {
+ __fnstenv(&__env);
+ __env.__status &= ~__excepts;
+ __fldenv(__env);
+ }
+ if (__HAS_SSE()) {
+ __stmxcsr(&__mxcsr);
+ __mxcsr &= ~__excepts;
+ __ldmxcsr(__mxcsr);
+ }
+ return (0);
+}
+
+static __inline int
+fegetexceptflag(fexcept_t *__flagp, int __excepts)
+{
+ int __mxcsr;
+ short __status;
+
+ __fnstsw(&__status);
+ if (__HAS_SSE())
+ __stmxcsr(&__mxcsr);
+ else
+ __mxcsr = 0;
+ *__flagp = (__mxcsr | __status) & __excepts;
+ return (0);
+}
+
+int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
+int feraiseexcept(int __excepts);
+
+static __inline int
+fetestexcept(int __excepts)
+{
+ int __mxcsr;
+ short __status;
+
+ __fnstsw(&__status);
+ if (__HAS_SSE())
+ __stmxcsr(&__mxcsr);
+ else
+ __mxcsr = 0;
+ return ((__status | __mxcsr) & __excepts);
+}
+
+static __inline int
+fegetround(void)
+{
+ int __control;
+
+ /*
+ * We assume that the x87 and the SSE unit agree on the
+ * rounding mode. Reading the control word on the x87 turns
+ * out to be about 5 times faster than reading it on the SSE
+ * unit on an Opteron 244.
+ */
+ __fnstcw(&__control);
+ return (__control & _ROUND_MASK);
+}
+
+static __inline int
+fesetround(int __round)
+{
+ int __mxcsr, __control;
+
+ if (__round & ~_ROUND_MASK)
+ return (-1);
+
+ __fnstcw(&__control);
+ __control &= ~_ROUND_MASK;
+ __control |= __round;
+ __fldcw(__control);
+
+ if (__HAS_SSE()) {
+ __stmxcsr(&__mxcsr);
+ __mxcsr &= ~(_ROUND_MASK << _SSE_ROUND_SHIFT);
+ __mxcsr |= __round << _SSE_ROUND_SHIFT;
+ __ldmxcsr(__mxcsr);
+ }
+
+ return (0);
+}
+
+int fegetenv(fenv_t *__envp);
+int feholdexcept(fenv_t *__envp);
+
+static __inline int
+fesetenv(const fenv_t *__envp)
+{
+ fenv_t __env = *__envp;
+ int __mxcsr;
+
+ __mxcsr = __get_mxcsr(__env);
+ __set_mxcsr(__env, 0xffffffff);
+ __fldenv(__env);
+ if (__HAS_SSE())
+ __ldmxcsr(__mxcsr);
+ return (0);
+}
+
+int feupdateenv(const fenv_t *__envp);
+
+#if __BSD_VISIBLE
+
+int feenableexcept(int __mask);
+int fedisableexcept(int __mask);
+
+static __inline int
+fegetexcept(void)
+{
+ int __control;
+
+ /*
+ * We assume that the masks for the x87 and the SSE unit are
+ * the same.
+ */
+ __fnstcw(&__control);
+ return (~__control & FE_ALL_EXCEPT);
+}
+
+#endif /* __BSD_VISIBLE */
+
+__END_DECLS
+
+#endif /* !_FENV_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/fnmatch.h b/6/platforms/android-9/arch-x86/usr/include/fnmatch.h
new file mode 120000
index 0000000..201f0ac
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/fnmatch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/fnmatch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/fts.h b/6/platforms/android-9/arch-x86/usr/include/fts.h
new file mode 120000
index 0000000..35eae48
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/fts.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/fts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/getopt.h b/6/platforms/android-9/arch-x86/usr/include/getopt.h
new file mode 120000
index 0000000..da7369e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/getopt.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/getopt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/grp.h b/6/platforms/android-9/arch-x86/usr/include/grp.h
new file mode 120000
index 0000000..3cb118e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/grp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/grp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/inttypes.h b/6/platforms/android-9/arch-x86/usr/include/inttypes.h
new file mode 120000
index 0000000..90b04c1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/inttypes.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/inttypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/jni.h b/6/platforms/android-9/arch-x86/usr/include/jni.h
new file mode 120000
index 0000000..11dcde8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/jni.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/jni.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/lastlog.h b/6/platforms/android-9/arch-x86/usr/include/lastlog.h
new file mode 120000
index 0000000..739d52d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/lastlog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/lastlog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/libgen.h b/6/platforms/android-9/arch-x86/usr/include/libgen.h
new file mode 120000
index 0000000..8e5ef6b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/libgen.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/libgen.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/limits.h b/6/platforms/android-9/arch-x86/usr/include/limits.h
new file mode 120000
index 0000000..c21444d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/limits.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/a.out.h b/6/platforms/android-9/arch-x86/usr/include/linux/a.out.h
new file mode 120000
index 0000000..37f0ff9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/a.out.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/a.out.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/aio_abi.h b/6/platforms/android-9/arch-x86/usr/include/linux/aio_abi.h
new file mode 120000
index 0000000..1a2d346
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/aio_abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/aio_abi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/akm8976.h b/6/platforms/android-9/arch-x86/usr/include/linux/akm8976.h
new file mode 120000
index 0000000..3fcd8be
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/akm8976.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/akm8976.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/android_alarm.h b/6/platforms/android-9/arch-x86/usr/include/linux/android_alarm.h
new file mode 120000
index 0000000..482f8b7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/android_alarm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/android_alarm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/android_pmem.h b/6/platforms/android-9/arch-x86/usr/include/linux/android_pmem.h
new file mode 120000
index 0000000..54c7025
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/android_pmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/android_pmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/android_power.h b/6/platforms/android-9/arch-x86/usr/include/linux/android_power.h
new file mode 120000
index 0000000..3e26e17
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/android_power.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/android_power.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/apm_bios.h b/6/platforms/android-9/arch-x86/usr/include/linux/apm_bios.h
new file mode 120000
index 0000000..140eb9f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/apm_bios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/apm_bios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ashmem.h b/6/platforms/android-9/arch-x86/usr/include/linux/ashmem.h
new file mode 120000
index 0000000..5289688
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ashmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ashmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ata.h b/6/platforms/android-9/arch-x86/usr/include/linux/ata.h
new file mode 120000
index 0000000..d1f1a58
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ata.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ata.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atm.h b/6/platforms/android-9/arch-x86/usr/include/linux/atm.h
new file mode 120000
index 0000000..938ddce
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atmapi.h b/6/platforms/android-9/arch-x86/usr/include/linux/atmapi.h
new file mode 120000
index 0000000..eb2b3b2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atmapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atmapi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atmdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/atmdev.h
new file mode 120000
index 0000000..271dc51
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atmdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atmdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atmioc.h b/6/platforms/android-9/arch-x86/usr/include/linux/atmioc.h
new file mode 120000
index 0000000..d1424fb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atmioc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atmioc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atmppp.h b/6/platforms/android-9/arch-x86/usr/include/linux/atmppp.h
new file mode 120000
index 0000000..0ae48b1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atmppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atmppp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/atmsap.h b/6/platforms/android-9/arch-x86/usr/include/linux/atmsap.h
new file mode 120000
index 0000000..6883980
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/atmsap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/atmsap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/attribute_container.h b/6/platforms/android-9/arch-x86/usr/include/linux/attribute_container.h
new file mode 120000
index 0000000..bc68a9f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/attribute_container.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/attribute_container.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/auto_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/auto_fs.h
new file mode 120000
index 0000000..e648490
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/auto_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/auto_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/autoconf.h b/6/platforms/android-9/arch-x86/usr/include/linux/autoconf.h
new file mode 120000
index 0000000..1141098
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/autoconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/autoconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/auxvec.h b/6/platforms/android-9/arch-x86/usr/include/linux/auxvec.h
new file mode 120000
index 0000000..9929ad6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/auxvec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/auxvec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/backing-dev.h b/6/platforms/android-9/arch-x86/usr/include/linux/backing-dev.h
new file mode 120000
index 0000000..c82844f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/backing-dev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/backing-dev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/binder.h b/6/platforms/android-9/arch-x86/usr/include/linux/binder.h
new file mode 120000
index 0000000..d649835
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/binder.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/binder.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/binfmts.h b/6/platforms/android-9/arch-x86/usr/include/linux/binfmts.h
new file mode 120000
index 0000000..ed8a8f7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/binfmts.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/binfmts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/bio.h b/6/platforms/android-9/arch-x86/usr/include/linux/bio.h
new file mode 120000
index 0000000..cf7afa2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/bio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/bio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/bitmap.h b/6/platforms/android-9/arch-x86/usr/include/linux/bitmap.h
new file mode 120000
index 0000000..f5c160f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/bitmap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/bitmap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/bitops.h b/6/platforms/android-9/arch-x86/usr/include/linux/bitops.h
new file mode 120000
index 0000000..ce2bb9b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/bitops.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/bitops.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/blkdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/blkdev.h
new file mode 120000
index 0000000..df3a64d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/blkdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/blkdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/blkpg.h b/6/platforms/android-9/arch-x86/usr/include/linux/blkpg.h
new file mode 120000
index 0000000..9f9a2bb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/blkpg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/blkpg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/blockgroup_lock.h b/6/platforms/android-9/arch-x86/usr/include/linux/blockgroup_lock.h
new file mode 120000
index 0000000..36fb28a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/blockgroup_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/blockgroup_lock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/big_endian.h b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/big_endian.h
new file mode 120000
index 0000000..eb0b412
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/big_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/byteorder/big_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/generic.h b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/generic.h
new file mode 120000
index 0000000..56ff7b8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/generic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/byteorder/generic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/little_endian.h b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/little_endian.h
new file mode 120000
index 0000000..c72c23b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/byteorder/little_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swab.h b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swab.h
new file mode 120000
index 0000000..e6cb3f3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swab.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/byteorder/swab.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swabb.h b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swabb.h
new file mode 120000
index 0000000..66e625c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/byteorder/swabb.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/byteorder/swabb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/cache.h b/6/platforms/android-9/arch-x86/usr/include/linux/cache.h
new file mode 120000
index 0000000..e3f9edc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/cache.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/cache.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/calc64.h b/6/platforms/android-9/arch-x86/usr/include/linux/calc64.h
new file mode 120000
index 0000000..f5a9421
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/calc64.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/calc64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/capability.h b/6/platforms/android-9/arch-x86/usr/include/linux/capability.h
new file mode 120000
index 0000000..41bb032
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/capability.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/capability.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/capi.h b/6/platforms/android-9/arch-x86/usr/include/linux/capi.h
new file mode 120000
index 0000000..adb0874
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/capi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/capi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/cdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/cdev.h
new file mode 120000
index 0000000..f8e1dc4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/cdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/cdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/cdrom.h b/6/platforms/android-9/arch-x86/usr/include/linux/cdrom.h
new file mode 120000
index 0000000..edb5e19
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/cdrom.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/cdrom.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/circ_buf.h b/6/platforms/android-9/arch-x86/usr/include/linux/circ_buf.h
new file mode 120000
index 0000000..55c61f0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/circ_buf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/circ_buf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/clk.h b/6/platforms/android-9/arch-x86/usr/include/linux/clk.h
new file mode 120000
index 0000000..1dfb866
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/clk.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/clk.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/coda.h b/6/platforms/android-9/arch-x86/usr/include/linux/coda.h
new file mode 120000
index 0000000..1882985
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/coda.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/coda.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/coda_fs_i.h b/6/platforms/android-9/arch-x86/usr/include/linux/coda_fs_i.h
new file mode 120000
index 0000000..342a445
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/coda_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/coda_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/compat.h b/6/platforms/android-9/arch-x86/usr/include/linux/compat.h
new file mode 120000
index 0000000..83d0463
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/compat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/compiler-gcc.h b/6/platforms/android-9/arch-x86/usr/include/linux/compiler-gcc.h
new file mode 120000
index 0000000..e126cc9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/compiler-gcc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/compiler-gcc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/compiler.h b/6/platforms/android-9/arch-x86/usr/include/linux/compiler.h
new file mode 120000
index 0000000..cecc6f6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/compiler.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/compiler.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/completion.h b/6/platforms/android-9/arch-x86/usr/include/linux/completion.h
new file mode 120000
index 0000000..ea6e4d0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/completion.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/completion.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/config.h b/6/platforms/android-9/arch-x86/usr/include/linux/config.h
new file mode 120000
index 0000000..12e512e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/config.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/config.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/console_struct.h b/6/platforms/android-9/arch-x86/usr/include/linux/console_struct.h
new file mode 120000
index 0000000..596b5de
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/console_struct.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/console_struct.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/cpu.h b/6/platforms/android-9/arch-x86/usr/include/linux/cpu.h
new file mode 120000
index 0000000..fd2a88f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/cpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/cpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/cpumask.h b/6/platforms/android-9/arch-x86/usr/include/linux/cpumask.h
new file mode 120000
index 0000000..7acad62
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/cpumask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/cpumask.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ctype.h b/6/platforms/android-9/arch-x86/usr/include/linux/ctype.h
new file mode 120000
index 0000000..4367c09
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ctype.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/dccp.h b/6/platforms/android-9/arch-x86/usr/include/linux/dccp.h
new file mode 120000
index 0000000..4577375
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/dccp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/debug_locks.h b/6/platforms/android-9/arch-x86/usr/include/linux/debug_locks.h
new file mode 120000
index 0000000..ca8e904
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/debug_locks.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/debug_locks.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/delay.h b/6/platforms/android-9/arch-x86/usr/include/linux/delay.h
new file mode 120000
index 0000000..a364350
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/delay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/delay.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/device.h b/6/platforms/android-9/arch-x86/usr/include/linux/device.h
new file mode 120000
index 0000000..8028998
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/device.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/dirent.h b/6/platforms/android-9/arch-x86/usr/include/linux/dirent.h
new file mode 120000
index 0000000..996ab5b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/dm-ioctl.h b/6/platforms/android-9/arch-x86/usr/include/linux/dm-ioctl.h
new file mode 120000
index 0000000..23fa7b2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/dm-ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/dm-ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/dma-mapping.h b/6/platforms/android-9/arch-x86/usr/include/linux/dma-mapping.h
new file mode 120000
index 0000000..c53fdb2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/dma-mapping.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/dma-mapping.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/dmaengine.h b/6/platforms/android-9/arch-x86/usr/include/linux/dmaengine.h
new file mode 120000
index 0000000..dbb1a61
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/dmaengine.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/dmaengine.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/efs_dir.h b/6/platforms/android-9/arch-x86/usr/include/linux/efs_dir.h
new file mode 120000
index 0000000..0853dbc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/efs_dir.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/efs_dir.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_i.h b/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_i.h
new file mode 120000
index 0000000..33fb43e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/efs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_sb.h b/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_sb.h
new file mode 120000
index 0000000..d9a9816
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/efs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/efs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/elevator.h b/6/platforms/android-9/arch-x86/usr/include/linux/elevator.h
new file mode 120000
index 0000000..822cd6c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/elevator.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/elevator.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/elf-em.h b/6/platforms/android-9/arch-x86/usr/include/linux/elf-em.h
new file mode 120000
index 0000000..eb55f2e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/elf-em.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/elf-em.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/elf.h b/6/platforms/android-9/arch-x86/usr/include/linux/elf.h
new file mode 120000
index 0000000..dedbf3e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/err.h b/6/platforms/android-9/arch-x86/usr/include/linux/err.h
new file mode 120000
index 0000000..0c95bd6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/err.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/errno.h b/6/platforms/android-9/arch-x86/usr/include/linux/errno.h
new file mode 120000
index 0000000..939347c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/errqueue.h b/6/platforms/android-9/arch-x86/usr/include/linux/errqueue.h
new file mode 120000
index 0000000..ca6d9e7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/errqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/errqueue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/etherdevice.h b/6/platforms/android-9/arch-x86/usr/include/linux/etherdevice.h
new file mode 120000
index 0000000..07b748f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/etherdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/etherdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ext2_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/ext2_fs.h
new file mode 120000
index 0000000..00ec53d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ext2_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ext2_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ext3_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/ext3_fs.h
new file mode 120000
index 0000000..993500f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ext3_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ext3_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/fadvise.h b/6/platforms/android-9/arch-x86/usr/include/linux/fadvise.h
new file mode 120000
index 0000000..ff7c41f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/fadvise.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/fadvise.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/fb.h b/6/platforms/android-9/arch-x86/usr/include/linux/fb.h
new file mode 120000
index 0000000..7a87592
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/fb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/fb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/fcntl.h b/6/platforms/android-9/arch-x86/usr/include/linux/fcntl.h
new file mode 120000
index 0000000..dae8add
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/fcntl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/fcntl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/fd.h b/6/platforms/android-9/arch-x86/usr/include/linux/fd.h
new file mode 120000
index 0000000..a3327ef
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/fd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/fd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/file.h b/6/platforms/android-9/arch-x86/usr/include/linux/file.h
new file mode 120000
index 0000000..4845a92
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/filter.h b/6/platforms/android-9/arch-x86/usr/include/linux/filter.h
new file mode 120000
index 0000000..8a08a97
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/filter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/filter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/fs.h
new file mode 120000
index 0000000..0d0fd2e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ftape.h b/6/platforms/android-9/arch-x86/usr/include/linux/ftape.h
new file mode 120000
index 0000000..bdd9f8e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ftape.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ftape.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/futex.h b/6/platforms/android-9/arch-x86/usr/include/linux/futex.h
new file mode 120000
index 0000000..4745412
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/futex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/futex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/genhd.h b/6/platforms/android-9/arch-x86/usr/include/linux/genhd.h
new file mode 120000
index 0000000..af0c7b4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/genhd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/genhd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/gfp.h b/6/platforms/android-9/arch-x86/usr/include/linux/gfp.h
new file mode 120000
index 0000000..3a22e49
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/gfp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/gfp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/hardirq.h b/6/platforms/android-9/arch-x86/usr/include/linux/hardirq.h
new file mode 120000
index 0000000..4e7dd01
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/hardirq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/hardirq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/hdlc/ioctl.h b/6/platforms/android-9/arch-x86/usr/include/linux/hdlc/ioctl.h
new file mode 120000
index 0000000..b8a9617
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/hdlc/ioctl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/hdlc/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/hdreg.h b/6/platforms/android-9/arch-x86/usr/include/linux/hdreg.h
new file mode 120000
index 0000000..7a405d5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/hdreg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/hdreg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/hdsmart.h b/6/platforms/android-9/arch-x86/usr/include/linux/hdsmart.h
new file mode 120000
index 0000000..277542c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/hdsmart.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/hdsmart.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/highmem.h b/6/platforms/android-9/arch-x86/usr/include/linux/highmem.h
new file mode 120000
index 0000000..d8c8d59
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/highmem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/highmem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/hil.h b/6/platforms/android-9/arch-x86/usr/include/linux/hil.h
new file mode 120000
index 0000000..52094ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/hil.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/hil.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/i2c.h b/6/platforms/android-9/arch-x86/usr/include/linux/i2c.h
new file mode 120000
index 0000000..4b7bbc4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/i2c.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/i2c.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/icmp.h b/6/platforms/android-9/arch-x86/usr/include/linux/icmp.h
new file mode 120000
index 0000000..278bd3d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/icmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if.h b/6/platforms/android-9/arch-x86/usr/include/linux/if.h
new file mode 120000
index 0000000..eee8a63
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_arcnet.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_arcnet.h
new file mode 120000
index 0000000..90de0e1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_arcnet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_arcnet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_arp.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_arp.h
new file mode 120000
index 0000000..3e5e0ad
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_bridge.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_bridge.h
new file mode 120000
index 0000000..7da5ec6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_ether.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_ether.h
new file mode 120000
index 0000000..4c62fba
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_fc.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_fc.h
new file mode 120000
index 0000000..a0fd185
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_fc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_fc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_fddi.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_fddi.h
new file mode 120000
index 0000000..7a8a65b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_fddi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_fddi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_hippi.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_hippi.h
new file mode 120000
index 0000000..822ec9a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_hippi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_hippi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_packet.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_packet.h
new file mode 120000
index 0000000..37172f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_ppp.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_ppp.h
new file mode 120000
index 0000000..4569a62
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_ppp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_ppp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_tr.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_tr.h
new file mode 120000
index 0000000..6178f60
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_tr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_tr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_tun.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_tun.h
new file mode 120000
index 0000000..a63047d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_tun.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_tun.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/if_vlan.h b/6/platforms/android-9/arch-x86/usr/include/linux/if_vlan.h
new file mode 120000
index 0000000..ae37152
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/if_vlan.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/if_vlan.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/in.h b/6/platforms/android-9/arch-x86/usr/include/linux/in.h
new file mode 120000
index 0000000..aba7e9b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/in.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/in6.h b/6/platforms/android-9/arch-x86/usr/include/linux/in6.h
new file mode 120000
index 0000000..4eccfe2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/in6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/init.h b/6/platforms/android-9/arch-x86/usr/include/linux/init.h
new file mode 120000
index 0000000..602a61f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/init.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/init.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/inotify.h b/6/platforms/android-9/arch-x86/usr/include/linux/inotify.h
new file mode 120000
index 0000000..2f6a8ac
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/input.h b/6/platforms/android-9/arch-x86/usr/include/linux/input.h
new file mode 120000
index 0000000..817e29d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/input.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/input.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/interrupt.h b/6/platforms/android-9/arch-x86/usr/include/linux/interrupt.h
new file mode 120000
index 0000000..c348a8b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/interrupt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/interrupt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ioctl.h b/6/platforms/android-9/arch-x86/usr/include/linux/ioctl.h
new file mode 120000
index 0000000..43e7ea9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ioport.h b/6/platforms/android-9/arch-x86/usr/include/linux/ioport.h
new file mode 120000
index 0000000..e5a47a8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ioport.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ioport.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ioprio.h b/6/platforms/android-9/arch-x86/usr/include/linux/ioprio.h
new file mode 120000
index 0000000..96f30f4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ioprio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ioprio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ip.h b/6/platforms/android-9/arch-x86/usr/include/linux/ip.h
new file mode 120000
index 0000000..70c2395
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ipc.h b/6/platforms/android-9/arch-x86/usr/include/linux/ipc.h
new file mode 120000
index 0000000..717ece3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_msgdefs.h b/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_msgdefs.h
new file mode 120000
index 0000000..ad76977
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_msgdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ipmi_msgdefs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_smi.h b/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_smi.h
new file mode 120000
index 0000000..e489b0a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ipmi_smi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ipmi_smi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ipx.h b/6/platforms/android-9/arch-x86/usr/include/linux/ipx.h
new file mode 120000
index 0000000..0bcf26b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ipx.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ipx.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/irq.h b/6/platforms/android-9/arch-x86/usr/include/linux/irq.h
new file mode 120000
index 0000000..0a6a2bd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/irq.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/irq.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/irq_cpustat.h b/6/platforms/android-9/arch-x86/usr/include/linux/irq_cpustat.h
new file mode 120000
index 0000000..fb9de5f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/irq_cpustat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/irq_cpustat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/irqflags.h b/6/platforms/android-9/arch-x86/usr/include/linux/irqflags.h
new file mode 120000
index 0000000..e43fd99
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/irqflags.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/irqflags.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/irqreturn.h b/6/platforms/android-9/arch-x86/usr/include/linux/irqreturn.h
new file mode 120000
index 0000000..699ca7f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/irqreturn.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/irqreturn.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/jbd.h b/6/platforms/android-9/arch-x86/usr/include/linux/jbd.h
new file mode 120000
index 0000000..861f0ee
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/jbd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/jbd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/jiffies.h b/6/platforms/android-9/arch-x86/usr/include/linux/jiffies.h
new file mode 120000
index 0000000..b26c618
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/jiffies.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/jiffies.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kd.h b/6/platforms/android-9/arch-x86/usr/include/linux/kd.h
new file mode 120000
index 0000000..a5e08ee
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kdev_t.h b/6/platforms/android-9/arch-x86/usr/include/linux/kdev_t.h
new file mode 120000
index 0000000..6e84584
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kdev_t.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kdev_t.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kernel.h b/6/platforms/android-9/arch-x86/usr/include/linux/kernel.h
new file mode 120000
index 0000000..8e2b3c6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kernel.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kernel.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kernel_stat.h b/6/platforms/android-9/arch-x86/usr/include/linux/kernel_stat.h
new file mode 120000
index 0000000..94b4fb3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kernel_stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kernel_stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kernelcapi.h b/6/platforms/android-9/arch-x86/usr/include/linux/kernelcapi.h
new file mode 120000
index 0000000..ff861f6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kernelcapi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kernelcapi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kexec.h b/6/platforms/android-9/arch-x86/usr/include/linux/kexec.h
new file mode 120000
index 0000000..4157ded
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kexec.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kexec.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/key.h b/6/platforms/android-9/arch-x86/usr/include/linux/key.h
new file mode 120000
index 0000000..82fc996
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/key.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/key.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/keyboard.h b/6/platforms/android-9/arch-x86/usr/include/linux/keyboard.h
new file mode 120000
index 0000000..70d78eb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/keyboard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/keyboard.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/keychord.h b/6/platforms/android-9/arch-x86/usr/include/linux/keychord.h
new file mode 120000
index 0000000..b994bd9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/keychord.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/keychord.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/klist.h b/6/platforms/android-9/arch-x86/usr/include/linux/klist.h
new file mode 120000
index 0000000..68bbe58
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/klist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/klist.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kmod.h b/6/platforms/android-9/arch-x86/usr/include/linux/kmod.h
new file mode 120000
index 0000000..0f5abd6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kmod.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kmod.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kobject.h b/6/platforms/android-9/arch-x86/usr/include/linux/kobject.h
new file mode 120000
index 0000000..fc5285a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kobject.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kobject.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/kref.h b/6/platforms/android-9/arch-x86/usr/include/linux/kref.h
new file mode 120000
index 0000000..9932b28
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/kref.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/kref.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ktime.h b/6/platforms/android-9/arch-x86/usr/include/linux/ktime.h
new file mode 120000
index 0000000..1e8474c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ktime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ktime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/limits.h b/6/platforms/android-9/arch-x86/usr/include/linux/limits.h
new file mode 120000
index 0000000..546554e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/linkage.h b/6/platforms/android-9/arch-x86/usr/include/linux/linkage.h
new file mode 120000
index 0000000..1b5385b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/linkage.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/linkage.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/list.h b/6/platforms/android-9/arch-x86/usr/include/linux/list.h
new file mode 120000
index 0000000..4914458
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/list.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/list.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/lockd/nlm.h b/6/platforms/android-9/arch-x86/usr/include/linux/lockd/nlm.h
new file mode 120000
index 0000000..48a4805
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/lockd/nlm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/lockd/nlm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/lockd/xdr.h b/6/platforms/android-9/arch-x86/usr/include/linux/lockd/xdr.h
new file mode 120000
index 0000000..35f9ef1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/lockd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/lockd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/lockdep.h b/6/platforms/android-9/arch-x86/usr/include/linux/lockdep.h
new file mode 120000
index 0000000..8616248
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/lockdep.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/lockdep.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/loop.h b/6/platforms/android-9/arch-x86/usr/include/linux/loop.h
new file mode 120000
index 0000000..5270bb8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/loop.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/loop.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/magic.h b/6/platforms/android-9/arch-x86/usr/include/linux/magic.h
new file mode 120000
index 0000000..262f0c3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/magic.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/magic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/major.h b/6/platforms/android-9/arch-x86/usr/include/linux/major.h
new file mode 120000
index 0000000..a5924d1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/major.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/major.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mc146818rtc.h b/6/platforms/android-9/arch-x86/usr/include/linux/mc146818rtc.h
new file mode 120000
index 0000000..4cb6e54
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mc146818rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mc146818rtc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mca.h b/6/platforms/android-9/arch-x86/usr/include/linux/mca.h
new file mode 120000
index 0000000..f9ebb5c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mca.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mca.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mempolicy.h b/6/platforms/android-9/arch-x86/usr/include/linux/mempolicy.h
new file mode 120000
index 0000000..494bf99
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mempolicy.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mempolicy.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mempool.h b/6/platforms/android-9/arch-x86/usr/include/linux/mempool.h
new file mode 120000
index 0000000..664f9a4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mempool.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mempool.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/miscdevice.h b/6/platforms/android-9/arch-x86/usr/include/linux/miscdevice.h
new file mode 120000
index 0000000..3d8e146
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/miscdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/miscdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mm.h b/6/platforms/android-9/arch-x86/usr/include/linux/mm.h
new file mode 120000
index 0000000..bd2dff4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mmc/card.h b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/card.h
new file mode 120000
index 0000000..ff6c26a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/card.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mmc/card.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mmc/host.h b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/host.h
new file mode 120000
index 0000000..5d1f4f7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/host.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mmc/host.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mmc/mmc.h b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/mmc.h
new file mode 120000
index 0000000..30970da
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mmc/mmc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mmc/mmc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mmzone.h b/6/platforms/android-9/arch-x86/usr/include/linux/mmzone.h
new file mode 120000
index 0000000..2718549
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mmzone.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mmzone.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mod_devicetable.h b/6/platforms/android-9/arch-x86/usr/include/linux/mod_devicetable.h
new file mode 120000
index 0000000..4ce6b91
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mod_devicetable.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/module.h b/6/platforms/android-9/arch-x86/usr/include/linux/module.h
new file mode 120000
index 0000000..ffeab05
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/module.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/module.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/moduleparam.h b/6/platforms/android-9/arch-x86/usr/include/linux/moduleparam.h
new file mode 120000
index 0000000..9052fec
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/moduleparam.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/moduleparam.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mount.h b/6/platforms/android-9/arch-x86/usr/include/linux/mount.h
new file mode 120000
index 0000000..094d39f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/msdos_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/msdos_fs.h
new file mode 120000
index 0000000..1ed129b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/msdos_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/msdos_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/msg.h b/6/platforms/android-9/arch-x86/usr/include/linux/msg.h
new file mode 120000
index 0000000..5df345b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/msg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/msg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/msm_adsp.h b/6/platforms/android-9/arch-x86/usr/include/linux/msm_adsp.h
new file mode 120000
index 0000000..7793ee2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/msm_adsp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/msm_adsp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/msm_audio.h b/6/platforms/android-9/arch-x86/usr/include/linux/msm_audio.h
new file mode 120000
index 0000000..96318c8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/msm_audio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/msm_audio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/msm_mdp.h b/6/platforms/android-9/arch-x86/usr/include/linux/msm_mdp.h
new file mode 120000
index 0000000..25d226e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/msm_mdp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/msm_mdp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mt9t013.h b/6/platforms/android-9/arch-x86/usr/include/linux/mt9t013.h
new file mode 120000
index 0000000..5316305
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mt9t013.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mt9t013.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/bbm.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/bbm.h
new file mode 120000
index 0000000..88a60f8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/bbm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/bbm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/blktrans.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/blktrans.h
new file mode 120000
index 0000000..8673e21
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/blktrans.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/blktrans.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi.h
new file mode 120000
index 0000000..d120643
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/cfi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi_endian.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi_endian.h
new file mode 120000
index 0000000..3416554
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/cfi_endian.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/cfi_endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/compatmac.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/compatmac.h
new file mode 120000
index 0000000..9600515
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/compatmac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/compatmac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/flashchip.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/flashchip.h
new file mode 120000
index 0000000..6e6850c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/flashchip.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/flashchip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/map.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/map.h
new file mode 120000
index 0000000..0c8b332
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/map.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/map.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/mtd.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/mtd.h
new file mode 120000
index 0000000..c70bdcb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/mtd.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/mtd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand.h
new file mode 120000
index 0000000..3bdbae7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/nand.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand_ecc.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand_ecc.h
new file mode 120000
index 0000000..7fa06e6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nand_ecc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/nand_ecc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nftl.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nftl.h
new file mode 120000
index 0000000..380067f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/nftl.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/nftl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/onenand_regs.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/onenand_regs.h
new file mode 120000
index 0000000..b9aeeaf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/onenand_regs.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/onenand_regs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtd/partitions.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/partitions.h
new file mode 120000
index 0000000..00eda26
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtd/partitions.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtd/partitions.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mtio.h b/6/platforms/android-9/arch-x86/usr/include/linux/mtio.h
new file mode 120000
index 0000000..fe2f080
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mtio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mtio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mutex-debug.h b/6/platforms/android-9/arch-x86/usr/include/linux/mutex-debug.h
new file mode 120000
index 0000000..2727ad2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mutex-debug.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mutex-debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/mutex.h b/6/platforms/android-9/arch-x86/usr/include/linux/mutex.h
new file mode 120000
index 0000000..6d3cb4e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/mutex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/mutex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ncp.h b/6/platforms/android-9/arch-x86/usr/include/linux/ncp.h
new file mode 120000
index 0000000..aaabbd5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ncp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ncp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ncp_mount.h b/6/platforms/android-9/arch-x86/usr/include/linux/ncp_mount.h
new file mode 120000
index 0000000..b02768e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ncp_mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ncp_mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ncp_no.h b/6/platforms/android-9/arch-x86/usr/include/linux/ncp_no.h
new file mode 120000
index 0000000..169dc7f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ncp_no.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ncp_no.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/net.h b/6/platforms/android-9/arch-x86/usr/include/linux/net.h
new file mode 120000
index 0000000..4691f38
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/net.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/net.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netdevice.h b/6/platforms/android-9/arch-x86/usr/include/linux/netdevice.h
new file mode 120000
index 0000000..8721d9b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netdevice.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netdevice.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter.h
new file mode 120000
index 0000000..3465771
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
new file mode 120000
index 0000000..aa8142e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_common.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
new file mode 120000
index 0000000..e05840d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_ftp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
new file mode 120000
index 0000000..7aa3b4d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
new file mode 120000
index 0000000..7b2932e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
new file mode 120000
index 0000000..73a8302
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nf_conntrack_tuple_common.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink.h
new file mode 120000
index 0000000..6f512f3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
new file mode 120000
index 0000000..738d054
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/nfnetlink_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/x_tables.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/x_tables.h
new file mode 120000
index 0000000..26f84ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/x_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/x_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
new file mode 120000
index 0000000..8d410dc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
new file mode 120000
index 0000000..8b3410c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_CONNSECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
new file mode 120000
index 0000000..71fb211
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
new file mode 120000
index 0000000..4173863
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_SECMARK.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_comment.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_comment.h
new file mode 120000
index 0000000..1d23af7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_connbytes.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
new file mode 120000
index 0000000..258c64b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_conntrack.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
new file mode 120000
index 0000000..3e2dd00
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_dccp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_dccp.h
new file mode 120000
index 0000000..42e73ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_esp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_esp.h
new file mode 120000
index 0000000..b0cfa14
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_helper.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_helper.h
new file mode 120000
index 0000000..8e5b473
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_length.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_length.h
new file mode 120000
index 0000000..e8c5fc9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_limit.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_limit.h
new file mode 120000
index 0000000..4217c3a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_limit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_limit.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_mac.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_mac.h
new file mode 120000
index 0000000..ca88d9d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_multiport.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_multiport.h
new file mode 120000
index 0000000..f7f53e6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_multiport.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_multiport.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_physdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_physdev.h
new file mode 120000
index 0000000..0f09aec
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_pkttype.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
new file mode 120000
index 0000000..e7e9f1d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_quota.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_quota.h
new file mode 120000
index 0000000..e97e033
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_quota.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_quota.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_realm.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_realm.h
new file mode 120000
index 0000000..e47cac5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_sctp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_sctp.h
new file mode 120000
index 0000000..9592b6c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_state.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_state.h
new file mode 120000
index 0000000..cd39808
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_state.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_statistic.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_statistic.h
new file mode 120000
index 0000000..25e79a9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_statistic.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_statistic.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_string.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_string.h
new file mode 120000
index 0000000..62e6f7f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
new file mode 120000
index 0000000..b54c308
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpmss.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
new file mode 120000
index 0000000..445110b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter/xt_tcpudp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp.h
new file mode 120000
index 0000000..c7852e7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
new file mode 120000
index 0000000..faaa7b5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_arp/arp_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_bridge.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_bridge.h
new file mode 120000
index 0000000..76ae265
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_bridge.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_bridge.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4.h
new file mode 120000
index 0000000..4779429
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
new file mode 120000
index 0000000..90d0612
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
new file mode 120000
index 0000000..8d3b172
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_conntrack_tuple.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
new file mode 120000
index 0000000..bd73549
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
new file mode 120000
index 0000000..0409b90
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_nat_rule.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
new file mode 120000
index 0000000..02224ef
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_queue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
new file mode 120000
index 0000000..a7810e3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ip_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
new file mode 120000
index 0000000..d6016a3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_CLASSIFY.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
new file mode 120000
index 0000000..a15261d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_DSCP.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
new file mode 120000
index 0000000..3940493
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ECN.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
new file mode 120000
index 0000000..a38de96
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
new file mode 120000
index 0000000..11b1d89
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_NFQUEUE.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
new file mode 120000
index 0000000..c43e7e9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
new file mode 120000
index 0000000..538776f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TCPMSS.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
new file mode 120000
index 0000000..3bd2709
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TOS.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
new file mode 120000
index 0000000..68e675b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_TTL.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
new file mode 120000
index 0000000..ca44f5c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ULOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
new file mode 120000
index 0000000..63cad05
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_addrtype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
new file mode 120000
index 0000000..b99db27
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_ah.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
new file mode 120000
index 0000000..b8f9b82
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_comment.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
new file mode 120000
index 0000000..cb389c3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_connbytes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
new file mode 120000
index 0000000..98d3976
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dccp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
new file mode 120000
index 0000000..3556e7b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_dscp_.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
new file mode 120000
index 0000000..424e141
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
new file mode 120000
index 0000000..01ccba4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_hashlimit.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
new file mode 120000
index 0000000..f359e98
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_helper.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
new file mode 120000
index 0000000..2f194e0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_iprange.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
new file mode 120000
index 0000000..585c7a7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
new file mode 120000
index 0000000..e20ddfe
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
new file mode 120000
index 0000000..82275b1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_owner.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
new file mode 120000
index 0000000..500fa08
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
new file mode 120000
index 0000000..1993a86
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_pkttype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
new file mode 120000
index 0000000..44c807a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_realm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
new file mode 120000
index 0000000..2509c81
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_recent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
new file mode 120000
index 0000000..482e474
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_sctp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
new file mode 120000
index 0000000..bf51faa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_state.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
new file mode 120000
index 0000000..8f8d607
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
new file mode 120000
index 0000000..71a780e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv4/ipt_tos_.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6.h
new file mode 120000
index 0000000..bc3e6aa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
new file mode 120000
index 0000000..b3e73de
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6_tables.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
new file mode 120000
index 0000000..f93633b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_LOG.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
new file mode 120000
index 0000000..9016eb5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_REJECT.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
new file mode 120000
index 0000000..afc83e2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ah.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
new file mode 120000
index 0000000..d04fb24
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_esp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
new file mode 120000
index 0000000..e6aa023
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_frag.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
new file mode 120000
index 0000000..4c2fa84
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_ipv6header.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
new file mode 120000
index 0000000..0ce9edf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_length.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
new file mode 120000
index 0000000..585b21a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_mac.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
new file mode 120000
index 0000000..ae7c1d7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_opts.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
new file mode 120000
index 0000000..a7bf7c6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_owner.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
new file mode 120000
index 0000000..50a1dfd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_physdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
new file mode 120000
index 0000000..ab1702a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/netfilter_ipv6/ip6t_rt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/netlink.h b/6/platforms/android-9/arch-x86/usr/include/linux/netlink.h
new file mode 120000
index 0000000..e8fe905
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/netlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/netlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfs.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfs.h
new file mode 120000
index 0000000..534c661
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfs2.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfs2.h
new file mode 120000
index 0000000..ed1259e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfs2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfs2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfs3.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfs3.h
new file mode 120000
index 0000000..d380c95
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfs3.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfs3.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfs4.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfs4.h
new file mode 120000
index 0000000..98302af
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfs4.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfs4.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfs_xdr.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfs_xdr.h
new file mode 120000
index 0000000..ec0022f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfs_xdr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfs_xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsacl.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsacl.h
new file mode 120000
index 0000000..0296158
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsacl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsacl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/auth.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/auth.h
new file mode 120000
index 0000000..37b1749
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/auth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/const.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/const.h
new file mode 120000
index 0000000..72a96a5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/const.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/const.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/debug.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/debug.h
new file mode 120000
index 0000000..ccd6b49
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/export.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/export.h
new file mode 120000
index 0000000..4b232cf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/export.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/export.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/interface.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/interface.h
new file mode 120000
index 0000000..1375d72
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/interface.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/interface.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/nfsfh.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/nfsfh.h
new file mode 120000
index 0000000..cb39c17
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/nfsfh.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/nfsfh.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/stats.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/stats.h
new file mode 120000
index 0000000..0c118f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/stats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/xdr.h b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/xdr.h
new file mode 120000
index 0000000..6b92e95
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nfsd/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/nfsd/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/node.h b/6/platforms/android-9/arch-x86/usr/include/linux/node.h
new file mode 120000
index 0000000..85c15dc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/node.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/node.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nodemask.h b/6/platforms/android-9/arch-x86/usr/include/linux/nodemask.h
new file mode 120000
index 0000000..4a33f32
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nodemask.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nodemask.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/notifier.h b/6/platforms/android-9/arch-x86/usr/include/linux/notifier.h
new file mode 120000
index 0000000..8fc07f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/notifier.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/notifier.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/numa.h b/6/platforms/android-9/arch-x86/usr/include/linux/numa.h
new file mode 120000
index 0000000..780dafc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/numa.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/numa.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/nvram.h b/6/platforms/android-9/arch-x86/usr/include/linux/nvram.h
new file mode 120000
index 0000000..0723650
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/nvram.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/nvram.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/omap_csmi.h b/6/platforms/android-9/arch-x86/usr/include/linux/omap_csmi.h
new file mode 120000
index 0000000..99bd44e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/omap_csmi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/omap_csmi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pagemap.h b/6/platforms/android-9/arch-x86/usr/include/linux/pagemap.h
new file mode 120000
index 0000000..9ce2c72
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pagemap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pagemap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/param.h b/6/platforms/android-9/arch-x86/usr/include/linux/param.h
new file mode 120000
index 0000000..b1c15d3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/param.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/patchkey.h b/6/platforms/android-9/arch-x86/usr/include/linux/patchkey.h
new file mode 120000
index 0000000..7c7b176
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/patchkey.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/patchkey.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pci.h b/6/platforms/android-9/arch-x86/usr/include/linux/pci.h
new file mode 120000
index 0000000..7434151
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pci.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pci.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pci_ids.h b/6/platforms/android-9/arch-x86/usr/include/linux/pci_ids.h
new file mode 120000
index 0000000..7e4e9ae
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pci_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pci_ids.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pci_regs.h b/6/platforms/android-9/arch-x86/usr/include/linux/pci_regs.h
new file mode 120000
index 0000000..1207e4d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pci_regs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pci_regs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/percpu.h b/6/platforms/android-9/arch-x86/usr/include/linux/percpu.h
new file mode 120000
index 0000000..c5fd029
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/percpu.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/percpu.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/percpu_counter.h b/6/platforms/android-9/arch-x86/usr/include/linux/percpu_counter.h
new file mode 120000
index 0000000..b9ebde4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/percpu_counter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/percpu_counter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/personality.h b/6/platforms/android-9/arch-x86/usr/include/linux/personality.h
new file mode 120000
index 0000000..e623655
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/personality.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/personality.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pfkeyv2.h b/6/platforms/android-9/arch-x86/usr/include/linux/pfkeyv2.h
new file mode 120000
index 0000000..54a118e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pfkeyv2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pfkeyv2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pkt_cls.h b/6/platforms/android-9/arch-x86/usr/include/linux/pkt_cls.h
new file mode 120000
index 0000000..77f5823
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pkt_cls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pkt_cls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pkt_sched.h b/6/platforms/android-9/arch-x86/usr/include/linux/pkt_sched.h
new file mode 120000
index 0000000..1ec60e1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pkt_sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pkt_sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/platform_device.h b/6/platforms/android-9/arch-x86/usr/include/linux/platform_device.h
new file mode 120000
index 0000000..ac8a47d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/platform_device.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/platform_device.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/plist.h b/6/platforms/android-9/arch-x86/usr/include/linux/plist.h
new file mode 120000
index 0000000..17b5224
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/plist.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/plist.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pm.h b/6/platforms/android-9/arch-x86/usr/include/linux/pm.h
new file mode 120000
index 0000000..b60bf40
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/pnp.h b/6/platforms/android-9/arch-x86/usr/include/linux/pnp.h
new file mode 120000
index 0000000..35cf144
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/pnp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/pnp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/poll.h b/6/platforms/android-9/arch-x86/usr/include/linux/poll.h
new file mode 120000
index 0000000..108a4dc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/posix_acl.h b/6/platforms/android-9/arch-x86/usr/include/linux/posix_acl.h
new file mode 120000
index 0000000..57bc6bb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/posix_acl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/posix_acl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/posix_types.h b/6/platforms/android-9/arch-x86/usr/include/linux/posix_types.h
new file mode 120000
index 0000000..ff23e63
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/posix_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/posix_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ppdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/ppdev.h
new file mode 120000
index 0000000..34d8cf5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ppdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ppdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ppp_defs.h b/6/platforms/android-9/arch-x86/usr/include/linux/ppp_defs.h
new file mode 120000
index 0000000..a385860
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ppp_defs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ppp_defs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/prctl.h b/6/platforms/android-9/arch-x86/usr/include/linux/prctl.h
new file mode 120000
index 0000000..b150a63
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/preempt.h b/6/platforms/android-9/arch-x86/usr/include/linux/preempt.h
new file mode 120000
index 0000000..92e633b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/preempt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/preempt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/proc_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/proc_fs.h
new file mode 120000
index 0000000..bcb4af9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/proc_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/proc_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ptrace.h b/6/platforms/android-9/arch-x86/usr/include/linux/ptrace.h
new file mode 120000
index 0000000..f6b7b1e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/qic117.h b/6/platforms/android-9/arch-x86/usr/include/linux/qic117.h
new file mode 120000
index 0000000..b01a21c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/qic117.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/qic117.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/qnxtypes.h b/6/platforms/android-9/arch-x86/usr/include/linux/qnxtypes.h
new file mode 120000
index 0000000..f1b14cc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/qnxtypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/qnxtypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/quota.h b/6/platforms/android-9/arch-x86/usr/include/linux/quota.h
new file mode 120000
index 0000000..e822ed0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/quota.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/quota.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/raid/md.h b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md.h
new file mode 120000
index 0000000..9a56d9a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/raid/md.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_k.h b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_k.h
new file mode 120000
index 0000000..e53a9ef
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_k.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/raid/md_k.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_p.h b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_p.h
new file mode 120000
index 0000000..1894bec
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_p.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/raid/md_p.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_u.h b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_u.h
new file mode 120000
index 0000000..42b400e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/raid/md_u.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/raid/md_u.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/raid/xor.h b/6/platforms/android-9/arch-x86/usr/include/linux/raid/xor.h
new file mode 120000
index 0000000..8e948a7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/raid/xor.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/raid/xor.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/random.h b/6/platforms/android-9/arch-x86/usr/include/linux/random.h
new file mode 120000
index 0000000..f24b458
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/random.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/random.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/rbtree.h b/6/platforms/android-9/arch-x86/usr/include/linux/rbtree.h
new file mode 120000
index 0000000..e82ff85
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/rbtree.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/rbtree.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/rcupdate.h b/6/platforms/android-9/arch-x86/usr/include/linux/rcupdate.h
new file mode 120000
index 0000000..b3b39f7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/rcupdate.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/rcupdate.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/reboot.h b/6/platforms/android-9/arch-x86/usr/include/linux/reboot.h
new file mode 120000
index 0000000..7799660
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/relay.h b/6/platforms/android-9/arch-x86/usr/include/linux/relay.h
new file mode 120000
index 0000000..5177d33
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/relay.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/relay.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/resource.h b/6/platforms/android-9/arch-x86/usr/include/linux/resource.h
new file mode 120000
index 0000000..f5af78e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/route.h b/6/platforms/android-9/arch-x86/usr/include/linux/route.h
new file mode 120000
index 0000000..2b0c217
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/route.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/rtc.h b/6/platforms/android-9/arch-x86/usr/include/linux/rtc.h
new file mode 120000
index 0000000..21ec9f5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/rtc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/rtc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/rtnetlink.h b/6/platforms/android-9/arch-x86/usr/include/linux/rtnetlink.h
new file mode 120000
index 0000000..473035e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/rtnetlink.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/rtnetlink.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/rwsem.h b/6/platforms/android-9/arch-x86/usr/include/linux/rwsem.h
new file mode 120000
index 0000000..0da2058
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/rwsem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/rwsem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sched.h b/6/platforms/android-9/arch-x86/usr/include/linux/sched.h
new file mode 120000
index 0000000..be4deb0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sched.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sem.h b/6/platforms/android-9/arch-x86/usr/include/linux/sem.h
new file mode 120000
index 0000000..98c7f13
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sem.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sem.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/seq_file.h b/6/platforms/android-9/arch-x86/usr/include/linux/seq_file.h
new file mode 120000
index 0000000..f73d7bf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/seq_file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/seq_file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/seqlock.h b/6/platforms/android-9/arch-x86/usr/include/linux/seqlock.h
new file mode 120000
index 0000000..11e21dc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/seqlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/seqlock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/serial_core.h b/6/platforms/android-9/arch-x86/usr/include/linux/serial_core.h
new file mode 120000
index 0000000..d52f6cf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/serial_core.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/serial_core.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/serial_reg.h b/6/platforms/android-9/arch-x86/usr/include/linux/serial_reg.h
new file mode 120000
index 0000000..d09c794
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/serial_reg.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/serial_reg.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/serio.h b/6/platforms/android-9/arch-x86/usr/include/linux/serio.h
new file mode 120000
index 0000000..e29dca6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/serio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/serio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/shm.h b/6/platforms/android-9/arch-x86/usr/include/linux/shm.h
new file mode 120000
index 0000000..a94bfb1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/shm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/shm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/signal.h b/6/platforms/android-9/arch-x86/usr/include/linux/signal.h
new file mode 120000
index 0000000..b5c09d4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/signal.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/skbuff.h b/6/platforms/android-9/arch-x86/usr/include/linux/skbuff.h
new file mode 120000
index 0000000..2fe9353
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/skbuff.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/skbuff.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/slab.h b/6/platforms/android-9/arch-x86/usr/include/linux/slab.h
new file mode 120000
index 0000000..72c4399
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/slab.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/slab.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/smb.h b/6/platforms/android-9/arch-x86/usr/include/linux/smb.h
new file mode 120000
index 0000000..d2b9e60
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/smb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/smb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/smp.h b/6/platforms/android-9/arch-x86/usr/include/linux/smp.h
new file mode 120000
index 0000000..052952b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/smp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/smp_lock.h b/6/platforms/android-9/arch-x86/usr/include/linux/smp_lock.h
new file mode 120000
index 0000000..9bc1240
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/smp_lock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/smp_lock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/socket.h b/6/platforms/android-9/arch-x86/usr/include/linux/socket.h
new file mode 120000
index 0000000..7435dfb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/socket.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sockios.h b/6/platforms/android-9/arch-x86/usr/include/linux/sockios.h
new file mode 120000
index 0000000..00d279f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sockios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sockios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/soundcard.h b/6/platforms/android-9/arch-x86/usr/include/linux/soundcard.h
new file mode 120000
index 0000000..ba2b9ea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/soundcard.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/soundcard.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock.h
new file mode 120000
index 0000000..747ebad
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_smp.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_smp.h
new file mode 120000
index 0000000..be8aecd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_smp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock_api_smp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_up.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_up.h
new file mode 120000
index 0000000..05b80fc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_api_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock_api_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types.h
new file mode 120000
index 0000000..def73ce
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types_up.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types_up.h
new file mode 120000
index 0000000..e56ad9d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_types_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock_types_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_up.h b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_up.h
new file mode 120000
index 0000000..bf7d165
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/spinlock_up.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/spinlock_up.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/stacktrace.h b/6/platforms/android-9/arch-x86/usr/include/linux/stacktrace.h
new file mode 120000
index 0000000..a0966c2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/stacktrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/stacktrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/stat.h b/6/platforms/android-9/arch-x86/usr/include/linux/stat.h
new file mode 120000
index 0000000..e2d8e1a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/statfs.h b/6/platforms/android-9/arch-x86/usr/include/linux/statfs.h
new file mode 120000
index 0000000..a937b6c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/stddef.h b/6/platforms/android-9/arch-x86/usr/include/linux/stddef.h
new file mode 120000
index 0000000..269df80
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/stddef.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/stddef.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/string.h b/6/platforms/android-9/arch-x86/usr/include/linux/string.h
new file mode 120000
index 0000000..e08a226
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/string.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/stringify.h b/6/platforms/android-9/arch-x86/usr/include/linux/stringify.h
new file mode 120000
index 0000000..fb0a43a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/stringify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/stringify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth.h
new file mode 120000
index 0000000..238a69d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth_gss.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth_gss.h
new file mode 120000
index 0000000..a352c99
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/auth_gss.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/auth_gss.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/clnt.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/clnt.h
new file mode 120000
index 0000000..27b72e5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/clnt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/clnt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/debug.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/debug.h
new file mode 120000
index 0000000..eac2662
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/debug.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/debug.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_api.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_api.h
new file mode 120000
index 0000000..4221681
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_api.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_api.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_asn1.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
new file mode 120000
index 0000000..8ec1821
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_asn1.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_asn1.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_err.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_err.h
new file mode 120000
index 0000000..d405d29
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/gss_err.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/gss_err.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/msg_prot.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/msg_prot.h
new file mode 120000
index 0000000..b4a8a41
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/msg_prot.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/msg_prot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/sched.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/sched.h
new file mode 120000
index 0000000..66aac99
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/sched.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/sched.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/stats.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/stats.h
new file mode 120000
index 0000000..c88c180
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/stats.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/stats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svc.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svc.h
new file mode 120000
index 0000000..a8655c2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svc.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/svc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svcauth.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svcauth.h
new file mode 120000
index 0000000..571a383
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/svcauth.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/svcauth.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/timer.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/timer.h
new file mode 120000
index 0000000..f96340e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/timer.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/timer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/types.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/types.h
new file mode 120000
index 0000000..6119423
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/types.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xdr.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xdr.h
new file mode 120000
index 0000000..08c6dd8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xdr.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/xdr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xprt.h b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xprt.h
new file mode 120000
index 0000000..84fff8b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sunrpc/xprt.h
@@ -0,0 +1 @@
+../../../../../../../platforms/android-8/arch-x86/usr/include/linux/sunrpc/xprt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/swap.h b/6/platforms/android-9/arch-x86/usr/include/linux/swap.h
new file mode 120000
index 0000000..898267d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/swap.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/swap.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sysctl.h b/6/platforms/android-9/arch-x86/usr/include/linux/sysctl.h
new file mode 120000
index 0000000..127a4c6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sysctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sysctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sysdev.h b/6/platforms/android-9/arch-x86/usr/include/linux/sysdev.h
new file mode 120000
index 0000000..2529d54
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sysdev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sysdev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/sysfs.h b/6/platforms/android-9/arch-x86/usr/include/linux/sysfs.h
new file mode 120000
index 0000000..a5d9b16
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/sysfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/sysfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/taskstats.h b/6/platforms/android-9/arch-x86/usr/include/linux/taskstats.h
new file mode 120000
index 0000000..6f107c9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/taskstats.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/taskstats.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/taskstats_kern.h b/6/platforms/android-9/arch-x86/usr/include/linux/taskstats_kern.h
new file mode 120000
index 0000000..a049645
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/taskstats_kern.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/taskstats_kern.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/tcp.h b/6/platforms/android-9/arch-x86/usr/include/linux/tcp.h
new file mode 120000
index 0000000..5f79a9e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/telephony.h b/6/platforms/android-9/arch-x86/usr/include/linux/telephony.h
new file mode 120000
index 0000000..ac3d35b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/telephony.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/telephony.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/termios.h b/6/platforms/android-9/arch-x86/usr/include/linux/termios.h
new file mode 120000
index 0000000..8042902
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/termios.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/termios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/textsearch.h b/6/platforms/android-9/arch-x86/usr/include/linux/textsearch.h
new file mode 120000
index 0000000..0c7b4a1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/textsearch.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/textsearch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/thread_info.h b/6/platforms/android-9/arch-x86/usr/include/linux/thread_info.h
new file mode 120000
index 0000000..27f37a3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/thread_info.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/thread_info.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/threads.h b/6/platforms/android-9/arch-x86/usr/include/linux/threads.h
new file mode 120000
index 0000000..cd130b8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/threads.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/threads.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/time.h b/6/platforms/android-9/arch-x86/usr/include/linux/time.h
new file mode 120000
index 0000000..a9dc69e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/timer.h b/6/platforms/android-9/arch-x86/usr/include/linux/timer.h
new file mode 120000
index 0000000..0c64158
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/timer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/timer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/times.h b/6/platforms/android-9/arch-x86/usr/include/linux/times.h
new file mode 120000
index 0000000..71f4a1a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/times.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/timex.h b/6/platforms/android-9/arch-x86/usr/include/linux/timex.h
new file mode 120000
index 0000000..1ae2b22
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/timex.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/timex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/tiocl.h b/6/platforms/android-9/arch-x86/usr/include/linux/tiocl.h
new file mode 120000
index 0000000..be04446
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/tiocl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/tiocl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/transport_class.h b/6/platforms/android-9/arch-x86/usr/include/linux/transport_class.h
new file mode 120000
index 0000000..c127592
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/transport_class.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/transport_class.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/tty.h b/6/platforms/android-9/arch-x86/usr/include/linux/tty.h
new file mode 120000
index 0000000..46b82c2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/tty.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/tty.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/types.h b/6/platforms/android-9/arch-x86/usr/include/linux/types.h
new file mode 120000
index 0000000..c2eeb70
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/udp.h b/6/platforms/android-9/arch-x86/usr/include/linux/udp.h
new file mode 120000
index 0000000..8f66905
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/udp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_i.h b/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_i.h
new file mode 120000
index 0000000..17ff0f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_i.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ufs_fs_i.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_sb.h b/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_sb.h
new file mode 120000
index 0000000..72d708d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/ufs_fs_sb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/ufs_fs_sb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/uio.h b/6/platforms/android-9/arch-x86/usr/include/linux/uio.h
new file mode 120000
index 0000000..3cfd6e3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/uio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/un.h b/6/platforms/android-9/arch-x86/usr/include/linux/un.h
new file mode 120000
index 0000000..b828ba6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/un.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/unistd.h b/6/platforms/android-9/arch-x86/usr/include/linux/unistd.h
new file mode 120000
index 0000000..19621af
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/unistd.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/unistd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/usb.h b/6/platforms/android-9/arch-x86/usr/include/linux/usb.h
new file mode 120000
index 0000000..1d641af
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/usb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/usb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/usb_ch9.h b/6/platforms/android-9/arch-x86/usr/include/linux/usb_ch9.h
new file mode 120000
index 0000000..6d27255
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/usb_ch9.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/usb_ch9.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/usbdevice_fs.h b/6/platforms/android-9/arch-x86/usr/include/linux/usbdevice_fs.h
new file mode 120000
index 0000000..472606d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/usbdevice_fs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/user.h b/6/platforms/android-9/arch-x86/usr/include/linux/user.h
new file mode 120000
index 0000000..8d956ff
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/user.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/utime.h b/6/platforms/android-9/arch-x86/usr/include/linux/utime.h
new file mode 120000
index 0000000..3cd4cb4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/utsname.h b/6/platforms/android-9/arch-x86/usr/include/linux/utsname.h
new file mode 120000
index 0000000..e6b8dee
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/version.h b/6/platforms/android-9/arch-x86/usr/include/linux/version.h
new file mode 120000
index 0000000..5075b8e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/version.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/version.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/vfs.h b/6/platforms/android-9/arch-x86/usr/include/linux/vfs.h
new file mode 120000
index 0000000..44bffda
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/videodev.h b/6/platforms/android-9/arch-x86/usr/include/linux/videodev.h
new file mode 120000
index 0000000..cca1252
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/videodev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/videodev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/videodev2.h b/6/platforms/android-9/arch-x86/usr/include/linux/videodev2.h
new file mode 120000
index 0000000..28e03b7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/videodev2.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/videodev2.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/vmalloc.h b/6/platforms/android-9/arch-x86/usr/include/linux/vmalloc.h
new file mode 120000
index 0000000..c66546f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/vmalloc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/vmalloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/vt.h b/6/platforms/android-9/arch-x86/usr/include/linux/vt.h
new file mode 120000
index 0000000..0a5b139
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/vt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/vt_buffer.h b/6/platforms/android-9/arch-x86/usr/include/linux/vt_buffer.h
new file mode 120000
index 0000000..239bac1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/vt_buffer.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/vt_buffer.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/wait.h b/6/platforms/android-9/arch-x86/usr/include/linux/wait.h
new file mode 120000
index 0000000..a7028d6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/wait.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/wait.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/wanrouter.h b/6/platforms/android-9/arch-x86/usr/include/linux/wanrouter.h
new file mode 120000
index 0000000..98715f3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/wanrouter.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/wanrouter.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/wireless.h b/6/platforms/android-9/arch-x86/usr/include/linux/wireless.h
new file mode 120000
index 0000000..f404a79
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/wireless.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/wireless.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/workqueue.h b/6/platforms/android-9/arch-x86/usr/include/linux/workqueue.h
new file mode 120000
index 0000000..d01f407
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/workqueue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/workqueue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/xattr.h b/6/platforms/android-9/arch-x86/usr/include/linux/xattr.h
new file mode 120000
index 0000000..cfab62a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/xattr.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/xattr.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/zconf.h b/6/platforms/android-9/arch-x86/usr/include/linux/zconf.h
new file mode 120000
index 0000000..164e145
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/zconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/zlib.h b/6/platforms/android-9/arch-x86/usr/include/linux/zlib.h
new file mode 120000
index 0000000..6c82b5f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/zlib.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/linux/zorro_ids.h b/6/platforms/android-9/arch-x86/usr/include/linux/zorro_ids.h
new file mode 120000
index 0000000..9500706
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/linux/zorro_ids.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/linux/zorro_ids.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/locale.h b/6/platforms/android-9/arch-x86/usr/include/locale.h
new file mode 120000
index 0000000..040d187
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/locale.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/locale.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/_types.h b/6/platforms/android-9/arch-x86/usr/include/machine/_types.h
new file mode 100644
index 0000000..65892a1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/_types.h
@@ -0,0 +1,137 @@
+/* $OpenBSD: _types.h,v 1.2 2006/01/13 17:50:06 millert Exp $ */
+
+/*-
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)types.h 8.3 (Berkeley) 1/5/94
+ * @(#)ansi.h 8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _I386__TYPES_H_
+#define _I386__TYPES_H_
+
+/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
+#ifndef _SIZE_T_DEFINED_
+# define _SIZE_T_DEFINED_
+# ifdef __ANDROID__
+ typedef unsigned int size_t;
+# else
+ typedef unsigned long size_t;
+# endif
+#endif
+#if !defined(_SSIZE_T) && !defined(_SSIZE_T_DEFINED_)
+#define _SSIZE_T
+#define _SSIZE_T_DEFINED_
+typedef long int ssize_t;
+#endif
+#ifndef _PTRDIFF_T
+#define _PTRDIFF_T
+# ifdef __ANDROID__
+ typedef int ptrdiff_t;
+# else
+ typedef long ptrdiff_t;
+# endif
+#endif
+
+#include <linux/types.h>
+
+/* 7.18.1.1 Exact-width integer types */
+typedef __signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef short __int16_t;
+typedef unsigned short __uint16_t;
+typedef int __int32_t;
+typedef unsigned int __uint32_t;
+/* LONGLONG */
+typedef long long __int64_t;
+/* LONGLONG */
+typedef unsigned long long __uint64_t;
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef __int8_t __int_least8_t;
+typedef __uint8_t __uint_least8_t;
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types */
+typedef __int32_t __int_fast8_t;
+typedef __uint32_t __uint_fast8_t;
+typedef __int32_t __int_fast16_t;
+typedef __uint32_t __uint_fast16_t;
+typedef __int32_t __int_fast32_t;
+typedef __uint32_t __uint_fast32_t;
+typedef __int64_t __int_fast64_t;
+typedef __uint64_t __uint_fast64_t;
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+typedef int __intptr_t;
+typedef unsigned int __uintptr_t;
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef __int64_t __intmax_t;
+typedef __uint64_t __uintmax_t;
+
+/* Register size */
+typedef __int32_t __register_t;
+
+/* VM system types */
+typedef unsigned long __vaddr_t;
+typedef unsigned long __paddr_t;
+typedef unsigned long __vsize_t;
+typedef unsigned long __psize_t;
+
+/* Standard system types */
+typedef int __clock_t;
+typedef int __clockid_t;
+typedef long __ptrdiff_t;
+typedef int __time_t;
+typedef int __timer_t;
+#if defined(__GNUC__) && __GNUC__ >= 3
+typedef __builtin_va_list __va_list;
+#else
+typedef char * __va_list;
+#endif
+
+/* Wide character support types */
+#ifndef __cplusplus
+typedef int __wchar_t;
+#endif
+typedef int __wint_t;
+typedef int __rune_t;
+typedef void * __wctrans_t;
+typedef void * __wctype_t;
+
+/* Feature test macros */
+#define __HAVE_CPUINFO
+#define __HAVE_MUTEX
+
+#endif /* _I386__TYPES_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/asm.h b/6/platforms/android-9/arch-x86/usr/include/machine/asm.h
new file mode 100644
index 0000000..7a23060
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/asm.h
@@ -0,0 +1,124 @@
+/* $OpenBSD: asm.h,v 1.8 2004/06/13 21:49:16 niklas Exp $ */
+/* $NetBSD: asm.h,v 1.7 1994/10/27 04:15:56 cgd Exp $ */
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)asm.h 5.5 (Berkeley) 5/7/91
+ */
+
+#ifndef _I386_ASM_H_
+#define _I386_ASM_H_
+
+/* This is borrowed from FreeBSD /src/sys/i386/include/asmacros.h v1.27 */
+/*
+ * CNAME and HIDENAME manage the relationship between symbol names in C
+ * and the equivalent assembly language names. CNAME is given a name as
+ * it would be used in a C program. It expands to the equivalent assembly
+ * language name. HIDENAME is given an assembly-language name, and expands
+ * to a possibly-modified form that will be invisible to C programs.
+ */
+#define CNAME(csym) csym
+#define HIDENAME(asmsym) .asmsym
+
+#ifdef PIC
+#define PIC_PROLOGUE \
+ pushl %ebx; \
+ call 666f; \
+666: \
+ popl %ebx; \
+ addl $_C_LABEL(_GLOBAL_OFFSET_TABLE_)+[.-666b], %ebx
+#define PIC_EPILOGUE \
+ popl %ebx
+#define PIC_PLT(x) x@PLT
+#define PIC_GOT(x) x@GOT(%ebx)
+#define PIC_GOTOFF(x) x@GOTOFF(%ebx)
+#else
+#define PIC_PROLOGUE
+#define PIC_EPILOGUE
+#define PIC_PLT(x) x
+#define PIC_GOT(x) x
+#define PIC_GOTOFF(x) x
+#endif
+
+#define _C_LABEL(name) name
+#define _ASM_LABEL(x) x
+
+#define CVAROFF(x, y) _C_LABEL(x) + y
+
+#ifdef __STDC__
+# define __CONCAT(x,y) x ## y
+# define __STRING(x) #x
+#else
+# define __CONCAT(x,y) x/**/y
+# define __STRING(x) "x"
+#endif
+
+/*
+ * WEAK ALIAS: create a weak alias
+ */
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; \
+ alias = sym
+
+/*
+ * WARN_REFERENCES: create a warning if the specified symbol is referenced
+ */
+#define WARN_REFERENCES(_sym,_msg) \
+ .section .gnu.warning. ## _sym ; .ascii _msg ; .text
+
+/* let kernels and others override entrypoint alignment */
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 2, 0x90
+#endif
+
+#define _ENTRY(x) \
+ .text; _ALIGN_TEXT; .globl x; .type x,@function; x:
+
+#ifdef GPROF
+# define _PROF_PROLOGUE \
+ pushl %ebp; movl %esp,%ebp; call PIC_PLT(mcount); popl %ebp
+#else
+# define _PROF_PROLOGUE
+#endif
+
+#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
+#define NENTRY(y) _ENTRY(_C_LABEL(y))
+#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
+
+#define ALTENTRY(name) .globl _C_LABEL(name); _C_LABEL(name):
+
+#define ASMSTR .asciz
+
+#define RCSID(x) .text; .asciz x
+#define __FBSDID(x) RCSID(x)
+
+#endif /* !_I386_ASM_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/cdefs.h b/6/platforms/android-9/arch-x86/usr/include/machine/cdefs.h
new file mode 100644
index 0000000..6efee6a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/cdefs.h
@@ -0,0 +1,24 @@
+/* $OpenBSD: cdefs.h,v 1.9 2005/11/24 20:46:45 deraadt Exp $ */
+
+/*
+ * Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
+ * Public domain.
+ */
+
+#ifndef _MACHINE_CDEFS_H_
+#define _MACHINE_CDEFS_H_
+
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " \
+ __STRING(alias) " = " __STRING(sym));
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text");
+#endif
+
+#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/exec.h b/6/platforms/android-9/arch-x86/usr/include/machine/exec.h
new file mode 100644
index 0000000..d091741
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/exec.h
@@ -0,0 +1,51 @@
+/* $OpenBSD: exec.h,v 1.9 2003/04/17 03:42:14 drahn Exp $ */
+/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _I386_EXEC_H_
+#define _I386_EXEC_H_
+
+#define __LDPGSZ 4096
+
+#define NATIVE_EXEC_ELF
+
+#define ARCH_ELFSIZE 32
+
+#define ELF_TARG_CLASS ELFCLASS32
+#define ELF_TARG_DATA ELFDATA2LSB
+#define ELF_TARG_MACH EM_386 /* XXX - EM_486 is currently unused
+ by all OSs/compilers/linkers */
+
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#define _KERN_DO_ELF
+
+#endif /* _I386_EXEC_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/ieee.h b/6/platforms/android-9/arch-x86/usr/include/machine/ieee.h
new file mode 100644
index 0000000..55b3703
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/ieee.h
@@ -0,0 +1,133 @@
+/* $OpenBSD: ieee.h,v 1.2 2003/06/02 23:27:47 millert Exp $ */
+/* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ieee.h 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * ieee.h defines the machine-dependent layout of the machine's IEEE
+ * floating point. It does *not* define (yet?) any of the rounding
+ * mode bits, exceptions, and so forth.
+ */
+
+/*
+ * Define the number of bits in each fraction and exponent.
+ *
+ * k k+1
+ * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented
+ *
+ * (-exp_bias+1)
+ * as fractions that look like 0.fffff x 2 . This means that
+ *
+ * -126
+ * the number 0.10000 x 2 , for instance, is the same as the normalized
+ *
+ * -127 -128
+ * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero
+ *
+ * -129
+ * in the fraction; to represent 2 , we need two, and so on. This
+ *
+ * (-exp_bias-fracbits+1)
+ * implies that the smallest denormalized number is 2
+ *
+ * for whichever format we are talking about: for single precision, for
+ *
+ * -126 -149
+ * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and
+ *
+ * -149 == -127 - 23 + 1.
+ */
+#define SNG_EXPBITS 8
+#define SNG_FRACBITS 23
+
+#define DBL_EXPBITS 11
+#define DBL_FRACBITS 52
+
+#define EXT_EXPBITS 15
+#define EXT_FRACBITS 112
+
+struct ieee_single {
+ u_int sng_frac:23;
+ u_int sng_exp:8;
+ u_int sng_sign:1;
+};
+
+struct ieee_double {
+ u_int dbl_fracl;
+ u_int dbl_frach:20;
+ u_int dbl_exp:11;
+ u_int dbl_sign:1;
+};
+
+struct ieee_ext {
+ u_int ext_fracl;
+ u_int ext_fraclm;
+ u_int ext_frachm;
+ u_int ext_frach:16;
+ u_int ext_exp:15;
+ u_int ext_sign:1;
+};
+
+/*
+ * Floats whose exponent is in [1..INFNAN) (of whatever type) are
+ * `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
+ * Floats whose exponent is zero are either zero (iff all fraction
+ * bits are zero) or subnormal values.
+ *
+ * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
+ * high fraction; if the bit is set, it is a `quiet NaN'.
+ */
+#define SNG_EXP_INFNAN 255
+#define DBL_EXP_INFNAN 2047
+#define EXT_EXP_INFNAN 32767
+
+#if 0
+#define SNG_QUIETNAN (1 << 22)
+#define DBL_QUIETNAN (1 << 19)
+#define EXT_QUIETNAN (1 << 15)
+#endif
+
+/*
+ * Exponent biases.
+ */
+#define SNG_EXP_BIAS 127
+#define DBL_EXP_BIAS 1023
+#define EXT_EXP_BIAS 16383
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/internal_types.h b/6/platforms/android-9/arch-x86/usr/include/machine/internal_types.h
new file mode 100644
index 0000000..4d1833c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/kernel.h b/6/platforms/android-9/arch-x86/usr/include/machine/kernel.h
new file mode 100644
index 0000000..19d1577
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/kernel.h
@@ -0,0 +1,41 @@
+/* bionic/arch-arm/include/machine/kernel.h
+**
+** Copyright 2006-2008, The Android Open Source Project
+**
+** Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in the
+** documentation and/or other materials provided with the distribution.
+** * Neither the name of Google Inc. nor the names of its contributors may
+** be used to endorse or promote products derived from this software
+** without specific prior written permission.
+**
+** THIS SOFTWARE IS PROVIDED BY Google Inc. ``AS IS'' AND ANY EXPRESS OR
+** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+** EVENT SHALL Google Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+#ifndef _ARCH_X86_KERNEL_H
+#define _ARCH_X86_KERNEL_H
+
+/* this file contains kernel-specific definitions that were optimized out of
+ our processed kernel headers, but still useful nonetheless... */
+
+typedef unsigned long __kernel_blkcnt_t;
+typedef unsigned long __kernel_blksize_t;
+
+/* these aren't really defined by the kernel headers though... */
+typedef unsigned long __kernel_fsblkcnt_t;
+typedef unsigned long __kernel_fsfilcnt_t;
+typedef unsigned int __kernel_id_t;
+
+#endif /* _ARCH_X86_KERNEL_H */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/limits.h b/6/platforms/android-9/arch-x86/usr/include/machine/limits.h
new file mode 100644
index 0000000..86fd854
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/limits.h
@@ -0,0 +1,63 @@
+/* $OpenBSD: limits.h,v 1.11 2006/01/06 22:48:47 millert Exp $ */
+/* $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ */
+
+/*
+ * Copyright (c) 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)limits.h 7.2 (Berkeley) 6/28/90
+ */
+
+#ifndef _MACHINE_LIMITS_H_
+#define _MACHINE_LIMITS_H_
+
+#include <sys/cdefs.h>
+
+#define MB_LEN_MAX 1 /* no multibyte characters */
+
+#ifndef SIZE_MAX
+#define SIZE_MAX UINT_MAX /* max value for a size_t */
+#endif
+#ifndef SSIZE_MAX
+#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
+#endif
+
+#if __BSD_VISIBLE
+#define SIZE_T_MAX UINT_MAX /* max value for a size_t (historic) */
+
+#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
+#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
+#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
+
+#endif /* __BSD_VISIBLE */
+
+#define LONGLONG_BIT 64
+#define LONGLONG_MIN (-9223372036854775807LL-1)
+#define LONGLONG_MAX 9223372036854775807LL
+#define ULONGLONG_MAX 18446744073709551615ULL
+
+#endif /* _MACHINE_LIMITS_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/machine/setjmp.h b/6/platforms/android-9/arch-x86/usr/include/machine/setjmp.h
new file mode 100644
index 0000000..ded095d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/machine/setjmp.h
@@ -0,0 +1,8 @@
+/* $OpenBSD: setjmp.h,v 1.2 2000/08/05 22:07:32 niklas Exp $ */
+/* $NetBSD: setjmp.h,v 1.1 1994/12/20 10:36:43 cgd Exp $ */
+
+/*
+ * machine/setjmp.h: machine dependent setjmp-related information.
+ */
+
+#define _JBLEN 10 /* size, in longs, of a jmp_buf */
diff --git a/6/platforms/android-9/arch-x86/usr/include/malloc.h b/6/platforms/android-9/arch-x86/usr/include/malloc.h
new file mode 120000
index 0000000..fc562be
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/malloc.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/malloc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/math.h b/6/platforms/android-9/arch-x86/usr/include/math.h
new file mode 100644
index 0000000..3b5660f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/math.h
@@ -0,0 +1,493 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.61 2005/04/16 21:12:47 das Exp $
+ */
+
+#ifndef _MATH_H_
+#define _MATH_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <limits.h>
+
+#define __pure2
+
+/*
+ * ANSI/POSIX
+ */
+extern const union __infinity_un {
+ unsigned char __uc[8];
+ double __ud;
+} __infinity;
+
+extern const union __nan_un {
+ unsigned char __uc[sizeof(float)];
+ float __uf;
+} __nan;
+
+/* #if __GNUC_PREREQ__(3, 3) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800) */
+#if 1
+#define __MATH_BUILTIN_CONSTANTS
+#endif
+
+/* #if __GNUC_PREREQ__(3, 0) && !defined(__INTEL_COMPILER) */
+#if 1
+#define __MATH_BUILTIN_RELOPS
+#endif
+
+/* #ifdef __MATH_BUILTIN_CONSTANTS */
+#if 1
+#define HUGE_VAL __builtin_huge_val()
+#else
+#define HUGE_VAL (__infinity.__ud)
+#endif
+
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+#define FP_ILOGB0 (-__INT_MAX)
+#define FP_ILOGBNAN __INT_MAX
+#else
+#define FP_ILOGB0 (-INT_MAX)
+#define FP_ILOGBNAN INT_MAX
+#endif
+
+#ifdef __MATH_BUILTIN_CONSTANTS
+#define HUGE_VALF __builtin_huge_valf()
+#define HUGE_VALL __builtin_huge_vall()
+#define INFINITY __builtin_inf()
+#define NAN __builtin_nan("")
+#else
+#define HUGE_VALF (float)HUGE_VAL
+#define HUGE_VALL (long double)HUGE_VAL
+#define INFINITY HUGE_VALF
+#define NAN (__nan.__uf)
+#endif /* __MATH_BUILTIN_CONSTANTS */
+
+#define MATH_ERRNO 1
+#define MATH_ERREXCEPT 2
+#define math_errhandling MATH_ERREXCEPT
+
+/* XXX We need a <machine/math.h>. */
+#if defined(__ia64__) || defined(__sparc64__)
+#define FP_FAST_FMA
+#endif
+#ifdef __ia64__
+#define FP_FAST_FMAL
+#endif
+#define FP_FAST_FMAF
+
+/* Symbolic constants to classify floating point numbers. */
+#define FP_INFINITE 0x01
+#define FP_NAN 0x02
+#define FP_NORMAL 0x04
+#define FP_SUBNORMAL 0x08
+#define FP_ZERO 0x10
+#define fpclassify(x) \
+ ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
+ : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
+ : __fpclassifyl(x))
+
+#define isfinite(x) \
+ ((sizeof (x) == sizeof (float)) ? __isfinitef(x) \
+ : (sizeof (x) == sizeof (double)) ? __isfinite(x) \
+ : __isfinitel(x))
+#define isinf(x) \
+ ((sizeof (x) == sizeof (float)) ? __isinff(x) \
+ : (sizeof (x) == sizeof (double)) ? __isinf(x) \
+ : __isinfl(x))
+#define isnan(x) \
+ ((sizeof (x) == sizeof (float)) ? isnanf(x) \
+ : (sizeof (x) == sizeof (double)) ? isnan(x) \
+ : __isnanl(x))
+#define isnormal(x) \
+ ((sizeof (x) == sizeof (float)) ? __isnormalf(x) \
+ : (sizeof (x) == sizeof (double)) ? __isnormal(x) \
+ : __isnormall(x))
+
+#ifdef __MATH_BUILTIN_RELOPS
+#define isgreater(x, y) __builtin_isgreater((x), (y))
+#define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
+#define isless(x, y) __builtin_isless((x), (y))
+#define islessequal(x, y) __builtin_islessequal((x), (y))
+#define islessgreater(x, y) __builtin_islessgreater((x), (y))
+#define isunordered(x, y) __builtin_isunordered((x), (y))
+#else
+#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))
+#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))
+#define isless(x, y) (!isunordered((x), (y)) && (x) < (y))
+#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))
+#define islessgreater(x, y) (!isunordered((x), (y)) && \
+ ((x) > (y) || (y) > (x)))
+#define isunordered(x, y) (isnan(x) || isnan(y))
+#endif /* __MATH_BUILTIN_RELOPS */
+
+#define signbit(x) \
+ ((sizeof (x) == sizeof (float)) ? __signbitf(x) \
+ : (sizeof (x) == sizeof (double)) ? __signbit(x) \
+ : __signbitl(x))
+
+#if 0
+typedef __double_t double_t;
+typedef __float_t float_t;
+#endif
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+
+/*
+ * XOPEN/SVID
+ */
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+#define M_E 2.7182818284590452354 /* e */
+#define M_LOG2E 1.4426950408889634074 /* log 2e */
+#define M_LOG10E 0.43429448190325182765 /* log 10e */
+#define M_LN2 0.69314718055994530942 /* log e2 */
+#define M_LN10 2.30258509299404568402 /* log e10 */
+#define M_PI 3.14159265358979323846 /* pi */
+#define M_PI_2 1.57079632679489661923 /* pi/2 */
+#define M_PI_4 0.78539816339744830962 /* pi/4 */
+#define M_1_PI 0.31830988618379067154 /* 1/pi */
+#define M_2_PI 0.63661977236758134308 /* 2/pi */
+#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define MAXFLOAT ((float)3.40282346638528860e+38)
+extern int signgam;
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+#if __BSD_VISIBLE
+#if 0
+/* Old value from 4.4BSD-Lite math.h; this is probably better. */
+#define HUGE HUGE_VAL
+#else
+#define HUGE MAXFLOAT
+#endif
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Most of these functions depend on the rounding mode and have the side
+ * effect of raising floating-point exceptions, so they are not declared
+ * as __pure2. In C99, FENV_ACCESS affects the purity of these functions.
+ */
+__BEGIN_DECLS
+/*
+ * ANSI/POSIX
+ */
+int __fpclassifyd(double) __pure2;
+int __fpclassifyf(float) __pure2;
+int __fpclassifyl(long double) __pure2;
+int __isfinitef(float) __pure2;
+int __isfinite(double) __pure2;
+int __isfinitel(long double) __pure2;
+int __isinff(float) __pure2;
+int __isinf(double) __pure2;
+int __isinfl(long double) __pure2;
+int __isnanl(long double) __pure2;
+int __isnormalf(float) __pure2;
+int __isnormal(double) __pure2;
+int __isnormall(long double) __pure2;
+int __signbit(double) __pure2;
+int __signbitf(float) __pure2;
+int __signbitl(long double) __pure2;
+
+double acos(double);
+double asin(double);
+double atan(double);
+double atan2(double, double);
+double cos(double);
+double sin(double);
+double tan(double);
+
+double cosh(double);
+double sinh(double);
+double tanh(double);
+
+double exp(double);
+double frexp(double, int *); /* fundamentally !__pure2 */
+double ldexp(double, int);
+double log(double);
+double log10(double);
+double modf(double, double *); /* fundamentally !__pure2 */
+
+double pow(double, double);
+double sqrt(double);
+
+double ceil(double);
+double fabs(double) __pure2;
+double floor(double);
+double fmod(double, double);
+
+/*
+ * These functions are not in C90.
+ */
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+double acosh(double);
+double asinh(double);
+double atanh(double);
+double cbrt(double);
+double erf(double);
+double erfc(double);
+double exp2(double);
+double expm1(double);
+double fma(double, double, double);
+double hypot(double, double);
+int ilogb(double) __pure2;
+/* int (isinf)(double) __pure2; */
+int (isnan)(double) __pure2;
+double lgamma(double);
+long long llrint(double);
+long long llround(double);
+double log1p(double);
+double logb(double);
+long lrint(double);
+long lround(double);
+double nextafter(double, double);
+double remainder(double, double);
+double remquo(double, double, int *);
+double rint(double);
+/* #endif */ /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __XSI_VISIBLE */
+double j0(double);
+double j1(double);
+double jn(int, double);
+double scalb(double, double);
+double y0(double);
+double y1(double);
+double yn(int, double);
+
+/* #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE */
+double gamma(double);
+/* #endif */
+/* #endif */ /* __BSD_VISIBLE || __XSI_VISIBLE */
+
+/* #if __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 */
+double copysign(double, double) __pure2;
+double fdim(double, double);
+double fmax(double, double) __pure2;
+double fmin(double, double) __pure2;
+double nearbyint(double);
+double round(double);
+double scalbln(double, long);
+double scalbn(double, int);
+double tgamma(double);
+double trunc(double);
+/* #endif */
+
+/*
+ * BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+double drem(double, double);
+int finite(double) __pure2;
+int isnanf(float) __pure2;
+
+/*
+ * Reentrant version of gamma & lgamma; passes signgam back by reference
+ * as the second argument; user must allocate space for signgam.
+ */
+double gamma_r(double, int *);
+double lgamma_r(double, int *);
+
+/*
+ * IEEE Test Vector
+ */
+double significand(double);
+/* #endif */ /* __BSD_VISIBLE */
+
+/* float versions of ANSI/POSIX functions */
+/*#if __ISO_C_VISIBLE >= 1999 */
+float acosf(float);
+float asinf(float);
+float atanf(float);
+float atan2f(float, float);
+float cosf(float);
+float sinf(float);
+float tanf(float);
+
+float coshf(float);
+float sinhf(float);
+float tanhf(float);
+
+float exp2f(float);
+float expf(float);
+float expm1f(float);
+float frexpf(float, int *); /* fundamentally !__pure2 */
+int ilogbf(float) __pure2;
+float ldexpf(float, int);
+float log10f(float);
+float log1pf(float);
+float logf(float);
+float modff(float, float *); /* fundamentally !__pure2 */
+
+float powf(float, float);
+float sqrtf(float);
+
+float ceilf(float);
+float fabsf(float) __pure2;
+float floorf(float);
+float fmodf(float, float);
+float roundf(float);
+
+float erff(float);
+float erfcf(float);
+float hypotf(float, float);
+float lgammaf(float);
+
+float acoshf(float);
+float asinhf(float);
+float atanhf(float);
+float cbrtf(float);
+float logbf(float);
+float copysignf(float, float) __pure2;
+long long llrintf(float);
+long long llroundf(float);
+long lrintf(float);
+long lroundf(float);
+float nearbyintf(float);
+float nextafterf(float, float);
+float remainderf(float, float);
+float remquof(float, float, int *);
+float rintf(float);
+float scalblnf(float, long);
+float scalbnf(float, int);
+float truncf(float);
+
+float fdimf(float, float);
+float fmaf(float, float, float);
+float fmaxf(float, float) __pure2;
+float fminf(float, float) __pure2;
+/* #endif */
+
+/*
+ * float versions of BSD math library entry points
+ */
+/* #if __BSD_VISIBLE */
+float dremf(float, float);
+int finitef(float) __pure2;
+float gammaf(float);
+float j0f(float);
+float j1f(float);
+float jnf(int, float);
+float scalbf(float, float);
+float y0f(float);
+float y1f(float);
+float ynf(int, float);
+
+/*
+ * Float versions of reentrant version of gamma & lgamma; passes
+ * signgam back by reference as the second argument; user must
+ * allocate space for signgam.
+ */
+float gammaf_r(float, int *);
+float lgammaf_r(float, int *);
+
+/*
+ * float version of IEEE Test Vector
+ */
+float significandf(float);
+/* #endif */ /* __BSD_VISIBLE */
+
+/*
+ * long double versions of ISO/POSIX math functions
+ */
+/* #if __ISO_C_VISIBLE >= 1999 */
+#if 0
+long double acoshl(long double);
+long double acosl(long double);
+long double asinhl(long double);
+long double asinl(long double);
+long double atan2l(long double, long double);
+long double atanhl(long double);
+long double atanl(long double);
+long double cbrtl(long double);
+#endif
+long double ceill(long double);
+long double copysignl(long double, long double) __pure2;
+#if 0
+long double coshl(long double);
+long double cosl(long double);
+long double erfcl(long double);
+long double erfl(long double);
+long double exp2l(long double);
+long double expl(long double);
+long double expm1l(long double);
+#endif
+long double fabsl(long double) __pure2;
+long double fdiml(long double, long double);
+long double floorl(long double);
+long double fmal(long double, long double, long double);
+long double fmaxl(long double, long double) __pure2;
+long double fminl(long double, long double) __pure2;
+#if 0
+long double fmodl(long double, long double);
+#endif
+long double frexpl(long double value, int *); /* fundamentally !__pure2 */
+#if 0
+long double hypotl(long double, long double);
+#endif
+int ilogbl(long double) __pure2;
+long double ldexpl(long double, int);
+#if 0
+long double lgammal(long double);
+long long llrintl(long double);
+#endif
+long long llroundl(long double);
+#if 0
+long double log10l(long double);
+long double log1pl(long double);
+long double log2l(long double);
+long double logbl(long double);
+long double logl(long double);
+long lrintl(long double);
+#endif
+long lroundl(long double);
+#if 0
+long double modfl(long double, long double *); /* fundamentally !__pure2 */
+long double nanl(const char *) __pure2;
+long double nearbyintl(long double);
+#endif
+long double nextafterl(long double, long double);
+double nexttoward(double, long double);
+float nexttowardf(float, long double);
+long double nexttowardl(long double, long double);
+#if 0
+long double powl(long double, long double);
+long double remainderl(long double, long double);
+long double remquol(long double, long double, int *);
+long double rintl(long double);
+#endif
+long double roundl(long double);
+long double scalblnl(long double, long);
+long double scalbnl(long double, int);
+#if 0
+long double sinhl(long double);
+long double sinl(long double);
+long double sqrtl(long double);
+long double tanhl(long double);
+long double tanl(long double);
+long double tgammal(long double);
+#endif
+long double truncl(long double);
+
+/* BIONIC: GLibc compatibility - required by the ARM toolchain */
+#ifdef _GNU_SOURCE
+void sincos(double x, double *sin, double *cos);
+void sincosf(float x, float *sin, float *cos);
+void sincosl(long double x, long double *sin, long double *cos);
+#endif
+
+/* #endif */ /* __ISO_C_VISIBLE >= 1999 */
+__END_DECLS
+
+#endif /* !_MATH_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/memory.h b/6/platforms/android-9/arch-x86/usr/include/memory.h
new file mode 120000
index 0000000..8dbbcfb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/memory.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/memory.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/mntent.h b/6/platforms/android-9/arch-x86/usr/include/mntent.h
new file mode 120000
index 0000000..8965663
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/mntent.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/mntent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-abi.h b/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-abi.h
new file mode 120000
index 0000000..bf678e0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-abi.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/mtd/mtd-abi.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-user.h b/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-user.h
new file mode 120000
index 0000000..da2e5ab
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/mtd/mtd-user.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/mtd/mtd-user.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/ethertypes.h b/6/platforms/android-9/arch-x86/usr/include/net/ethertypes.h
new file mode 120000
index 0000000..1717e9b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/ethertypes.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/ethertypes.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if.h b/6/platforms/android-9/arch-x86/usr/include/net/if.h
new file mode 120000
index 0000000..d78c2fd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_arp.h b/6/platforms/android-9/arch-x86/usr/include/net/if_arp.h
new file mode 120000
index 0000000..275ccba
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_arp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_arp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_dl.h b/6/platforms/android-9/arch-x86/usr/include/net/if_dl.h
new file mode 120000
index 0000000..3c91466
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_dl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_dl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_ether.h b/6/platforms/android-9/arch-x86/usr/include/net/if_ether.h
new file mode 120000
index 0000000..0bea627
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_ieee1394.h b/6/platforms/android-9/arch-x86/usr/include/net/if_ieee1394.h
new file mode 120000
index 0000000..09fa4e7
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_ieee1394.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_ieee1394.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_packet.h b/6/platforms/android-9/arch-x86/usr/include/net/if_packet.h
new file mode 120000
index 0000000..6906c91
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/if_types.h b/6/platforms/android-9/arch-x86/usr/include/net/if_types.h
new file mode 120000
index 0000000..9a3afdf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/if_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/if_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/net/route.h b/6/platforms/android-9/arch-x86/usr/include/net/route.h
new file mode 120000
index 0000000..609d1cd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/net/route.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/net/route.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netdb.h b/6/platforms/android-9/arch-x86/usr/include/netdb.h
new file mode 120000
index 0000000..7471c10
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netdb.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/netdb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/ether.h b/6/platforms/android-9/arch-x86/usr/include/netinet/ether.h
new file mode 120000
index 0000000..b6adee2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/if_ether.h b/6/platforms/android-9/arch-x86/usr/include/netinet/if_ether.h
new file mode 120000
index 0000000..c89efb1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/if_ether.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/if_ether.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/in.h b/6/platforms/android-9/arch-x86/usr/include/netinet/in.h
new file mode 120000
index 0000000..fb26ce3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/in.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/in.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/in6.h b/6/platforms/android-9/arch-x86/usr/include/netinet/in6.h
new file mode 120000
index 0000000..dc99f71
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/in6.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/in6.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/in_systm.h b/6/platforms/android-9/arch-x86/usr/include/netinet/in_systm.h
new file mode 120000
index 0000000..8cea54a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/in_systm.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/in_systm.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/ip.h b/6/platforms/android-9/arch-x86/usr/include/netinet/ip.h
new file mode 120000
index 0000000..45c6bf3
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/ip.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/ip.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/ip_icmp.h b/6/platforms/android-9/arch-x86/usr/include/netinet/ip_icmp.h
new file mode 120000
index 0000000..bba2b97
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/ip_icmp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/ip_icmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/tcp.h b/6/platforms/android-9/arch-x86/usr/include/netinet/tcp.h
new file mode 120000
index 0000000..540c9ae
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/tcp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/tcp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netinet/udp.h b/6/platforms/android-9/arch-x86/usr/include/netinet/udp.h
new file mode 120000
index 0000000..e0d3773
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netinet/udp.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netinet/udp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/netpacket/packet.h b/6/platforms/android-9/arch-x86/usr/include/netpacket/packet.h
new file mode 120000
index 0000000..d195f2e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/netpacket/packet.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/netpacket/packet.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/nsswitch.h b/6/platforms/android-9/arch-x86/usr/include/nsswitch.h
new file mode 120000
index 0000000..335a589
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/nsswitch.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/nsswitch.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/pathconf.h b/6/platforms/android-9/arch-x86/usr/include/pathconf.h
new file mode 120000
index 0000000..a3faa16
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/pathconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/pathconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/paths.h b/6/platforms/android-9/arch-x86/usr/include/paths.h
new file mode 120000
index 0000000..ac4195b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/paths.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/paths.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/poll.h b/6/platforms/android-9/arch-x86/usr/include/poll.h
new file mode 120000
index 0000000..11a0caf
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/poll.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/pthread.h b/6/platforms/android-9/arch-x86/usr/include/pthread.h
new file mode 100644
index 0000000..5e87043
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/pthread.h
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _PTHREAD_H_
+#define _PTHREAD_H_
+
+#include <time.h>
+#include <signal.h>
+#include <sched.h>
+#include <limits.h>
+#include <sys/types.h>
+
+/*
+ * Types
+ */
+typedef struct
+{
+ int volatile value;
+} pthread_mutex_t;
+
+#define PTHREAD_MUTEX_INITIALIZER {0}
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {0x4000}
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {0x8000}
+
+enum {
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
+
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+};
+
+
+
+typedef struct
+{
+ int volatile value;
+} pthread_cond_t;
+
+typedef struct
+{
+ uint32_t flags;
+ void * stack_base;
+ size_t stack_size;
+ size_t guard_size;
+ int32_t sched_policy;
+ int32_t sched_priority;
+} pthread_attr_t;
+
+typedef long pthread_mutexattr_t;
+typedef long pthread_condattr_t;
+
+typedef int pthread_key_t;
+typedef long pthread_t;
+
+typedef volatile int pthread_once_t;
+
+/*
+ * Defines
+ */
+#define PTHREAD_COND_INITIALIZER {0}
+
+#define PTHREAD_STACK_MIN (2 * PAGE_SIZE)
+
+#define PTHREAD_CREATE_DETACHED 0x00000001
+#define PTHREAD_CREATE_JOINABLE 0x00000000
+
+#define PTHREAD_ONCE_INIT 0
+
+#define PTHREAD_PROCESS_PRIVATE 0
+#define PTHREAD_PROCESS_SHARED 1
+
+#define PTHREAD_SCOPE_SYSTEM 0
+#define PTHREAD_SCOPE_PROCESS 1
+
+/*
+ * Prototypes
+ */
+#if __cplusplus
+extern "C" {
+#endif
+
+int pthread_attr_init(pthread_attr_t * attr);
+int pthread_attr_destroy(pthread_attr_t * attr);
+
+int pthread_attr_setdetachstate(pthread_attr_t * attr, int state);
+int pthread_attr_getdetachstate(pthread_attr_t const * attr, int * state);
+
+int pthread_attr_setschedpolicy(pthread_attr_t * attr, int policy);
+int pthread_attr_getschedpolicy(pthread_attr_t const * attr, int * policy);
+
+int pthread_attr_setschedparam(pthread_attr_t * attr, struct sched_param const * param);
+int pthread_attr_getschedparam(pthread_attr_t const * attr, struct sched_param * param);
+
+int pthread_attr_setstacksize(pthread_attr_t * attr, size_t stack_size);
+int pthread_attr_getstacksize(pthread_attr_t const * attr, size_t * stack_size);
+
+int pthread_attr_setstackaddr(pthread_attr_t * attr, void * stackaddr);
+int pthread_attr_getstackaddr(pthread_attr_t const * attr, void ** stackaddr);
+
+int pthread_attr_setstack(pthread_attr_t * attr, void * stackaddr, size_t stack_size);
+int pthread_attr_getstack(pthread_attr_t const * attr, void ** stackaddr, size_t * stack_size);
+
+int pthread_attr_setguardsize(pthread_attr_t * attr, size_t guard_size);
+int pthread_attr_getguardsize(pthread_attr_t const * attr, size_t * guard_size);
+
+int pthread_attr_setscope(pthread_attr_t *attr, int scope);
+int pthread_attr_getscope(pthread_attr_t const *attr);
+
+int pthread_getattr_np(pthread_t thid, pthread_attr_t * attr);
+
+int pthread_create(pthread_t *thread, pthread_attr_t const * attr,
+ void *(*start_routine)(void *), void * arg);
+void pthread_exit(void * retval);
+int pthread_join(pthread_t thid, void ** ret_val);
+int pthread_detach(pthread_t thid);
+
+pthread_t pthread_self(void);
+int pthread_equal(pthread_t one, pthread_t two);
+
+int pthread_getschedparam(pthread_t thid, int * policy,
+ struct sched_param * param);
+int pthread_setschedparam(pthread_t thid, int poilcy,
+ struct sched_param const * param);
+
+int pthread_mutexattr_init(pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared);
+
+int pthread_mutex_init(pthread_mutex_t *mutex,
+ const pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(pthread_mutex_t *mutex);
+int pthread_mutex_lock(pthread_mutex_t *mutex);
+int pthread_mutex_unlock(pthread_mutex_t *mutex);
+int pthread_mutex_trylock(pthread_mutex_t *mutex);
+#if 0 /* MISSING FROM BIONIC */
+int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+#endif /* MISSING */
+
+int pthread_condattr_init(pthread_condattr_t *attr);
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared);
+int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared);
+int pthread_condattr_destroy(pthread_condattr_t *attr);
+
+int pthread_cond_init(pthread_cond_t *cond,
+ const pthread_condattr_t *attr);
+int pthread_cond_destroy(pthread_cond_t *cond);
+int pthread_cond_broadcast(pthread_cond_t *cond);
+int pthread_cond_signal(pthread_cond_t *cond);
+int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
+int pthread_cond_timedwait(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'abstime' given refers
+ * to the CLOCK_MONOTONIC clock instead, to avoid any problems when
+ * the wall-clock time is changed brutally
+ */
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np()
+ * unfortunately pthread_cond_timedwait_monotonic has shipped already
+ */
+int pthread_cond_timedwait_monotonic(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
+
+/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers
+ * is relative to the current time.
+ */
+int pthread_cond_timedwait_relative_np(pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *reltime);
+
+#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1
+
+
+
+int pthread_cond_timeout_np(pthread_cond_t *cond,
+ pthread_mutex_t * mutex,
+ unsigned msecs);
+
+/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds
+ * before returning. same return values than pthread_mutex_trylock though, i.e.
+ * returns EBUSY if the lock could not be acquired after the timeout
+ * expired.
+ */
+int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs);
+
+/* read-write lock support */
+
+typedef int pthread_rwlockattr_t;
+
+typedef struct {
+ pthread_mutex_t lock;
+ pthread_cond_t cond;
+ int numLocks;
+ int writerThreadId;
+ int pendingReaders;
+ int pendingWriters;
+ void* reserved[4]; /* for future extensibility */
+} pthread_rwlock_t;
+
+#define PTHREAD_RWLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0, 0, { NULL, NULL, NULL, NULL } }
+
+int pthread_rwlockattr_init(pthread_rwlockattr_t *attr);
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr);
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);
+int pthread_rwlockattr_getpshared(pthread_rwlockattr_t *attr, int *pshared);
+
+int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
+int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
+
+int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_timedrdlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
+
+int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t *rwlock, const struct timespec *abs_timeout);
+
+int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);
+
+
+int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *));
+int pthread_key_delete (pthread_key_t);
+int pthread_setspecific(pthread_key_t key, const void *value);
+void *pthread_getspecific(pthread_key_t key);
+
+int pthread_kill(pthread_t tid, int sig);
+int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+
+int pthread_getcpuclockid(pthread_t tid, clockid_t *clockid);
+
+int pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
+
+int pthread_setname_np(pthread_t thid, const char *thname);
+
+typedef void (*__pthread_cleanup_func_t)(void*);
+
+typedef struct __pthread_cleanup_t {
+ struct __pthread_cleanup_t* __cleanup_prev;
+ __pthread_cleanup_func_t __cleanup_routine;
+ void* __cleanup_arg;
+} __pthread_cleanup_t;
+
+extern void __pthread_cleanup_push(__pthread_cleanup_t* c,
+ __pthread_cleanup_func_t routine,
+ void* arg);
+
+extern void __pthread_cleanup_pop(__pthread_cleanup_t* c,
+ int execute);
+
+/* Believe or not, the definitions of pthread_cleanup_push and
+ * pthread_cleanup_pop below are correct. Posix states that these
+ * can be implemented as macros that might introduce opening and
+ * closing braces, and that using setjmp/longjmp/return/break/continue
+ * between them results in undefined behaviour.
+ *
+ * And indeed, GLibc and other C libraries use a similar definition
+ */
+#define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_t __cleanup; \
+ __pthread_cleanup_push( &__cleanup, (routine), (arg) ); \
+
+#define pthread_cleanup_pop(execute) \
+ __pthread_cleanup_pop( &__cleanup, (execute)); \
+ } while (0);
+
+#if __cplusplus
+} /* extern "C" */
+#endif
+
+/************ TO FIX ************/
+
+#define LONG_LONG_MAX __LONG_LONG_MAX__
+#define LONG_LONG_MIN (-__LONG_LONG_MAX__ - 1)
+
+#endif // _PTHREAD_H_
diff --git a/6/platforms/android-9/arch-x86/usr/include/pwd.h b/6/platforms/android-9/arch-x86/usr/include/pwd.h
new file mode 120000
index 0000000..8650260
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/pwd.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/pwd.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/regex.h b/6/platforms/android-9/arch-x86/usr/include/regex.h
new file mode 120000
index 0000000..c1496af
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/regex.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/regex.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/resolv.h b/6/platforms/android-9/arch-x86/usr/include/resolv.h
new file mode 120000
index 0000000..c0beb99
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/resolv.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/resolv.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sched.h b/6/platforms/android-9/arch-x86/usr/include/sched.h
new file mode 100644
index 0000000..e702470
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sched.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SCHED_H_
+#define _SCHED_H_
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+#define SCHED_NORMAL 0
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority;
+};
+
+extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+extern int sched_getscheduler(pid_t);
+extern int sched_yield(void);
+extern int sched_get_priority_max(int policy);
+extern int sched_get_priority_min(int policy);
+extern int sched_setparam(pid_t, const struct sched_param *);
+extern int sched_getparam(pid_t, struct sched_param *);
+extern int sched_rr_get_interval(pid_t pid, struct timespec *tp);
+
+#define CLONE_VM 0x00000100
+#define CLONE_FS 0x00000200
+#define CLONE_FILES 0x00000400
+#define CLONE_SIGHAND 0x00000800
+#define CLONE_PTRACE 0x00002000
+#define CLONE_VFORK 0x00004000
+#define CLONE_PARENT 0x00008000
+#define CLONE_THREAD 0x00010000
+#define CLONE_NEWNS 0x00020000
+#define CLONE_SYSVSEM 0x00040000
+#define CLONE_SETTLS 0x00080000
+#define CLONE_PARENT_SETTID 0x00100000
+#define CLONE_CHILD_CLEARTID 0x00200000
+#define CLONE_DETACHED 0x00400000
+#define CLONE_UNTRACED 0x00800000
+#define CLONE_CHILD_SETTID 0x01000000
+#define CLONE_STOPPED 0x02000000
+
+#ifdef _GNU_SOURCE
+extern int clone(int (*fn)(void *), void *child_stack, int flags, void* arg, ...);
+#endif
+
+__END_DECLS
+
+#endif /* _SCHED_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/semaphore.h b/6/platforms/android-9/arch-x86/usr/include/semaphore.h
new file mode 120000
index 0000000..77ba42f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/semaphore.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/semaphore.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/setjmp.h b/6/platforms/android-9/arch-x86/usr/include/setjmp.h
new file mode 120000
index 0000000..cb13e06
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/setjmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/setjmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sgtty.h b/6/platforms/android-9/arch-x86/usr/include/sgtty.h
new file mode 120000
index 0000000..9d22dea
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sgtty.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/sgtty.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sha1.h b/6/platforms/android-9/arch-x86/usr/include/sha1.h
new file mode 120000
index 0000000..7114c0b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sha1.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/sha1.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/signal.h b/6/platforms/android-9/arch-x86/usr/include/signal.h
new file mode 120000
index 0000000..7a5a96b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/signal.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/signal.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/stdint.h b/6/platforms/android-9/arch-x86/usr/include/stdint.h
new file mode 120000
index 0000000..1e0a29d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/stdint.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/stdint.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/stdio.h b/6/platforms/android-9/arch-x86/usr/include/stdio.h
new file mode 120000
index 0000000..f06c71b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/stdio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/stdio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/stdlib.h b/6/platforms/android-9/arch-x86/usr/include/stdlib.h
new file mode 100644
index 0000000..97d8e46
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/stdlib.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _STDLIB_H_
+#define _STDLIB_H_
+
+#include <sys/cdefs.h>
+
+/* wchar_t is required in stdlib.h according to POSIX.
+ * note that defining __need_wchar_t prevents stddef.h
+ * to define all other symbols it does normally */
+#define __need_wchar_t
+#include <stddef.h>
+
+#include <stddef.h>
+#include <string.h>
+#include <alloca.h>
+#include <strings.h>
+#include <memory.h>
+
+__BEGIN_DECLS
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+extern __noreturn void exit(int);
+extern __noreturn void abort(void);
+extern int atexit(void (*)(void));
+
+extern char *getenv(const char *);
+extern int putenv(const char *);
+extern int setenv(const char *, const char *, int);
+extern int unsetenv(const char *);
+extern int clearenv(void);
+
+extern char *mktemp (char *);
+extern int mkstemp (char *);
+
+extern long strtol(const char *, char **, int);
+extern long long strtoll(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+extern unsigned long long strtoull(const char *, char **, int);
+extern double strtod(const char *nptr, char **endptr);
+
+static __inline__ float strtof(const char *nptr, char **endptr)
+{
+ return (float)strtod(nptr, endptr);
+}
+
+extern int atoi(const char *);
+extern long atol(const char *);
+extern long long atoll(const char *);
+
+static __inline__ double atof(const char *nptr)
+{
+ return (strtod(nptr, NULL));
+}
+
+static __inline__ int abs(int __n) {
+ return (__n < 0) ? -__n : __n;
+}
+
+static __inline__ long labs(long __n) {
+ return (__n < 0L) ? -__n : __n;
+}
+
+static __inline__ long long llabs(long long __n) {
+ return (__n < 0LL) ? -__n : __n;
+}
+
+extern char * realpath(const char *path, char *resolved);
+extern int system(const char * string);
+
+extern void * bsearch(const void *key, const void *base0,
+ size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *));
+
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+extern long jrand48(unsigned short *);
+extern long mrand48(void);
+extern long nrand48(unsigned short *);
+extern long lrand48(void);
+extern unsigned short *seed48(unsigned short*);
+extern double erand48(unsigned short xsubi[3]);
+extern double drand48(void);
+extern void srand48(long);
+extern unsigned int arc4random(void);
+extern void arc4random_stir(void);
+extern void arc4random_addrandom(unsigned char *, int);
+
+#define RAND_MAX 0x7fffffff
+static __inline__ int rand(void) {
+ return (int)lrand48();
+}
+static __inline__ void srand(unsigned int __s) {
+ srand48(__s);
+}
+static __inline__ long random(void)
+{
+ return lrand48();
+}
+static __inline__ void srandom(unsigned int __s)
+{
+ srand48(__s);
+}
+
+/* Basic PTY functions. These only work if devpts is mounted! */
+
+extern int unlockpt(int);
+extern char* ptsname(int);
+extern int ptsname_r(int, char*, size_t);
+extern int getpt(void);
+
+static __inline__ int grantpt(int __fd __attribute((unused)))
+{
+ (void)__fd;
+ return 0; /* devpts does this all for us! */
+}
+
+typedef struct {
+ int quot;
+ int rem;
+} div_t;
+
+extern div_t div(int, int);
+
+typedef struct {
+ long int quot;
+ long int rem;
+} ldiv_t;
+
+extern ldiv_t ldiv(long, long);
+
+typedef struct {
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+
+extern lldiv_t lldiv(long long, long long);
+
+#if 1 /* MISSING FROM BIONIC - ENABLED FOR STLPort and libstdc++-v3 */
+/* make STLPort happy */
+extern int mblen(const char *, size_t);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern int mbtowc(wchar_t *, const char *, size_t);
+
+/* Likewise, make libstdc++-v3 happy. */
+extern int wctomb(char *, wchar_t);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+#endif /* MISSING */
+
+#define MB_CUR_MAX 1
+
+#if 0 /* MISSING FROM BIONIC */
+extern int on_exit(void (*)(int, void *), void *);
+#endif /* MISSING */
+
+__END_DECLS
+
+#endif /* _STDLIB_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/string.h b/6/platforms/android-9/arch-x86/usr/include/string.h
new file mode 120000
index 0000000..ae7352c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/string.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/string.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/strings.h b/6/platforms/android-9/arch-x86/usr/include/strings.h
new file mode 100644
index 0000000..fee7dc4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/strings.h
@@ -0,0 +1,56 @@
+/* $NetBSD: strings.h,v 1.10 2005/02/03 04:39:32 perry Exp $ */
+
+/*-
+ * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _STRINGS_H_
+#define _STRINGS_H_
+
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int bcmp(const void *, const void *, size_t);
+void bcopy(const void *, void *, size_t);
+void bzero(void *, size_t);
+int ffs(int);
+char *index(const char *, int);
+char *rindex(const char *, int);
+int strcasecmp(const char *, const char *);
+int strncasecmp(const char *, const char *, size_t);
+__END_DECLS
+
+#endif /* !defined(_STRINGS_H_) */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/_errdefs.h b/6/platforms/android-9/arch-x86/usr/include/sys/_errdefs.h
new file mode 120000
index 0000000..34bc322
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/_errdefs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/_errdefs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/_sigdefs.h b/6/platforms/android-9/arch-x86/usr/include/sys/_sigdefs.h
new file mode 100644
index 0000000..6822c25
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/_sigdefs.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * this header is used to define signal constants and names;
+ * it might be included several times
+ */
+
+#ifndef __BIONIC_SIGDEF
+#error __BIONIC_SIGDEF not defined
+#endif
+
+__BIONIC_SIGDEF(HUP,1,"Hangup")
+__BIONIC_SIGDEF(INT,2,"Interrupt")
+__BIONIC_SIGDEF(QUIT,3,"Quit")
+__BIONIC_SIGDEF(ILL,4,"Illegal instruction")
+__BIONIC_SIGDEF(TRAP,5,"Trap")
+__BIONIC_SIGDEF(ABRT,6,"Aborted")
+__BIONIC_SIGDEF(BUS,7,"Bus error")
+__BIONIC_SIGDEF(FPE,8,"Floating point exception")
+__BIONIC_SIGDEF(KILL,9,"Killed")
+__BIONIC_SIGDEF(USR1,10,"User signal 1")
+__BIONIC_SIGDEF(SEGV,11,"Segmentation fault")
+__BIONIC_SIGDEF(USR2,12,"User signal 2")
+__BIONIC_SIGDEF(PIPE,13,"Broken pipe")
+__BIONIC_SIGDEF(ALRM,14,"Alarm clock")
+__BIONIC_SIGDEF(TERM,15,"Terminated")
+__BIONIC_SIGDEF(STKFLT,16,"Stack fault")
+__BIONIC_SIGDEF(CHLD,17,"Child exited")
+__BIONIC_SIGDEF(CONT,18,"Continue")
+__BIONIC_SIGDEF(STOP,19,"Stopped (signal)")
+__BIONIC_SIGDEF(TSTP,20,"Stopped")
+__BIONIC_SIGDEF(TTIN,21,"Stopped (tty input)")
+__BIONIC_SIGDEF(TTOU,22,"Stopper (tty output)")
+__BIONIC_SIGDEF(URG,23,"Urgent I/O condition")
+__BIONIC_SIGDEF(XCPU,24,"CPU time limit exceeded")
+__BIONIC_SIGDEF(XFSZ,25,"File size limit exceeded")
+__BIONIC_SIGDEF(VTALRM,26,"Virtual timer expired")
+__BIONIC_SIGDEF(PROF,27,"Profiling timer expired")
+__BIONIC_SIGDEF(WINCH,28,"Window size changed")
+__BIONIC_SIGDEF(IO,29,"I/O possible")
+__BIONIC_SIGDEF(PWR,30,"Power failure")
+__BIONIC_SIGDEF(SYS,31,"Bad system call")
+
+#undef __BIONIC_SIGDEF
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/_system_properties.h b/6/platforms/android-9/arch-x86/usr/include/sys/_system_properties.h
new file mode 120000
index 0000000..2dccb68
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/_system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/_system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/_types.h b/6/platforms/android-9/arch-x86/usr/include/sys/_types.h
new file mode 120000
index 0000000..3878362
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/_types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/_types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/atomics.h b/6/platforms/android-9/arch-x86/usr/include/sys/atomics.h
new file mode 100644
index 0000000..7aed3ae
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/atomics.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_ATOMICS_H
+#define _SYS_ATOMICS_H
+
+#include <sys/cdefs.h>
+#include <sys/time.h>
+
+__BEGIN_DECLS
+
+static inline __attribute__((always_inline)) int
+__atomic_cmpxchg(int old, int _new, volatile int *ptr)
+{
+ return !__sync_bool_compare_and_swap (ptr, old, _new);
+}
+
+static inline __attribute__((always_inline)) int
+__atomic_swap(int _new, volatile int *ptr)
+{
+ return __sync_lock_test_and_set(ptr, _new);
+}
+
+static inline __attribute__((always_inline)) int
+__atomic_dec(volatile int *ptr)
+{
+ return __sync_fetch_and_sub (ptr, 1);
+}
+
+static inline __attribute__((always_inline)) int
+__atomic_inc(volatile int *ptr)
+{
+ return __sync_fetch_and_add (ptr, 1);
+}
+
+int __futex_wait(volatile void *ftx, int val, const struct timespec *timeout);
+int __futex_wake(volatile void *ftx, int count);
+
+__END_DECLS
+
+#endif /* _SYS_ATOMICS_H */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/cdefs.h b/6/platforms/android-9/arch-x86/usr/include/sys/cdefs.h
new file mode 100644
index 0000000..849e2b8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/cdefs.h
@@ -0,0 +1,501 @@
+/* $NetBSD: cdefs.h,v 1.58 2004/12/11 05:59:00 christos Exp $ */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Berkeley Software Design, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
+ */
+
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
+/*
+ * Macro to test if we're using a GNU C compiler of a specific vintage
+ * or later, for e.g. features that appeared in a particular version
+ * of GNU C. Usage:
+ *
+ * #if __GNUC_PREREQ__(major, minor)
+ * ...cool feature...
+ * #else
+ * ...delete feature...
+ * #endif
+ */
+#ifdef __GNUC__
+#define __GNUC_PREREQ__(x, y) \
+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
+ (__GNUC__ > (x)))
+#else
+#define __GNUC_PREREQ__(x, y) 0
+#endif
+
+#include <sys/cdefs_elf.h>
+
+#if defined(__cplusplus)
+#define __BEGIN_DECLS extern "C" {
+#define __END_DECLS }
+#define __static_cast(x,y) static_cast<x>(y)
+#else
+#define __BEGIN_DECLS
+#define __END_DECLS
+#define __static_cast(x,y) (x)y
+#endif
+
+/*
+ * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
+ * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
+ * The __CONCAT macro is a bit tricky -- make sure you don't put spaces
+ * in between its arguments. __CONCAT can also concatenate double-quoted
+ * strings produced by the __STRING macro, but this only works with ANSI C.
+ */
+
+#define ___STRING(x) __STRING(x)
+#define ___CONCAT(x,y) __CONCAT(x,y)
+
+#if __STDC__ || defined(__cplusplus)
+#define __P(protos) protos /* full-blown ANSI C */
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#define __const const /* define reserved names to standard */
+#define __signed signed
+#define __volatile volatile
+#if defined(__cplusplus)
+#define __inline inline /* convert to C++ keyword */
+#else
+#if !defined(__GNUC__) && !defined(__lint__)
+#define __inline /* delete GCC keyword */
+#endif /* !__GNUC__ && !__lint__ */
+#endif /* !__cplusplus */
+
+#else /* !(__STDC__ || __cplusplus) */
+#define __P(protos) () /* traditional C preprocessor */
+#define __CONCAT(x,y) x/**/y
+#define __STRING(x) "x"
+
+#ifndef __GNUC__
+#define __const /* delete pseudo-ANSI C keywords */
+#define __inline
+#define __signed
+#define __volatile
+#endif /* !__GNUC__ */
+
+/*
+ * In non-ANSI C environments, new programs will want ANSI-only C keywords
+ * deleted from the program and old programs will want them left alone.
+ * Programs using the ANSI C keywords const, inline etc. as normal
+ * identifiers should define -DNO_ANSI_KEYWORDS.
+ */
+#ifndef NO_ANSI_KEYWORDS
+#define const __const /* convert ANSI C keywords */
+#define inline __inline
+#define signed __signed
+#define volatile __volatile
+#endif /* !NO_ANSI_KEYWORDS */
+#endif /* !(__STDC__ || __cplusplus) */
+
+/*
+ * Used for internal auditing of the NetBSD source tree.
+ */
+#ifdef __AUDIT__
+#define __aconst __const
+#else
+#define __aconst
+#endif
+
+/*
+ * The following macro is used to remove const cast-away warnings
+ * from gcc -Wcast-qual; it should be used with caution because it
+ * can hide valid errors; in particular most valid uses are in
+ * situations where the API requires it, not to cast away string
+ * constants. We don't use *intptr_t on purpose here and we are
+ * explicit about unsigned long so that we don't have additional
+ * dependencies.
+ */
+#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
+
+/*
+ * GCC2 provides __extension__ to suppress warnings for various GNU C
+ * language extensions under "-ansi -pedantic".
+ */
+#if !__GNUC_PREREQ__(2, 0)
+#define __extension__ /* delete __extension__ if non-gcc or gcc1 */
+#endif
+
+/*
+ * GCC1 and some versions of GCC2 declare dead (non-returning) and
+ * pure (no side effects) functions using "volatile" and "const";
+ * unfortunately, these then cause warnings under "-ansi -pedantic".
+ * GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
+ * these work for GNU C++ (modulo a slight glitch in the C++ grammar
+ * in the distribution version of 2.5.5).
+ */
+#if !__GNUC_PREREQ__(2, 5)
+#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __dead __volatile
+#define __pure __const
+#endif
+#endif
+
+/* Delete pseudo-keywords wherever they are not available or needed. */
+#ifndef __dead
+#define __dead
+#define __pure
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __unused __attribute__((__unused__))
+#else
+#define __unused /* delete */
+#endif
+
+#if __GNUC_PREREQ__(3, 1)
+#define __used __attribute__((__used__))
+#else
+#define __used /* delete */
+#endif
+
+#if __GNUC_PREREQ__(2, 7)
+#define __packed __attribute__((__packed__))
+#define __aligned(x) __attribute__((__aligned__(x)))
+#define __section(x) __attribute__((__section__(x)))
+#elif defined(__lint__)
+#define __packed /* delete */
+#define __aligned(x) /* delete */
+#define __section(x) /* delete */
+#else
+#define __packed error: no __packed for this compiler
+#define __aligned(x) error: no __aligned for this compiler
+#define __section(x) error: no __section for this compiler
+#endif
+
+#if !__GNUC_PREREQ__(2, 8)
+#define __extension__
+#endif
+
+#if __GNUC_PREREQ__(2, 8)
+#define __statement(x) __extension__(x)
+#elif defined(lint)
+#define __statement(x) (0)
+#else
+#define __statement(x) (x)
+#endif
+
+/*
+ * C99 defines the restrict type qualifier keyword, which was made available
+ * in GCC 2.92.
+ */
+#if __STDC_VERSION__ >= 199901L
+#define __restrict restrict
+#else
+#if !__GNUC_PREREQ__(2, 92)
+#define __restrict /* delete __restrict when not supported */
+#endif
+#endif
+
+/*
+ * C99 defines __func__ predefined identifier, which was made available
+ * in GCC 2.95.
+ */
+#if !(__STDC_VERSION__ >= 199901L)
+#if __GNUC_PREREQ__(2, 6)
+#define __func__ __PRETTY_FUNCTION__
+#elif __GNUC_PREREQ__(2, 4)
+#define __func__ __FUNCTION__
+#else
+#define __func__ ""
+#endif
+#endif /* !(__STDC_VERSION__ >= 199901L) */
+
+#if defined(_KERNEL)
+#if defined(NO_KERNEL_RCSIDS)
+#undef __KERNEL_RCSID
+#define __KERNEL_RCSID(_n, _s) /* nothing */
+#endif /* NO_KERNEL_RCSIDS */
+#endif /* _KERNEL */
+
+#if !defined(_STANDALONE) && !defined(_KERNEL)
+#ifdef __GNUC__
+#define __RENAME(x) ___RENAME(x)
+#else
+#ifdef __lint__
+#define __RENAME(x) __symbolrename(x)
+#else
+#error "No function renaming possible"
+#endif /* __lint__ */
+#endif /* __GNUC__ */
+#else /* _STANDALONE || _KERNEL */
+#define __RENAME(x) no renaming in kernel or standalone environment
+#endif
+
+/*
+ * A barrier to stop the optimizer from moving code or assume live
+ * register values. This is gcc specific, the version is more or less
+ * arbitrary, might work with older compilers.
+ */
+#if __GNUC_PREREQ__(2, 95)
+#define __insn_barrier() __asm __volatile("":::"memory")
+#else
+#define __insn_barrier() /* */
+#endif
+
+/*
+ * GNU C version 2.96 adds explicit branch prediction so that
+ * the CPU back-end can hint the processor and also so that
+ * code blocks can be reordered such that the predicted path
+ * sees a more linear flow, thus improving cache behavior, etc.
+ *
+ * The following two macros provide us with a way to use this
+ * compiler feature. Use __predict_true() if you expect the expression
+ * to evaluate to true, and __predict_false() if you expect the
+ * expression to evaluate to false.
+ *
+ * A few notes about usage:
+ *
+ * * Generally, __predict_false() error condition checks (unless
+ * you have some _strong_ reason to do otherwise, in which case
+ * document it), and/or __predict_true() `no-error' condition
+ * checks, assuming you want to optimize for the no-error case.
+ *
+ * * Other than that, if you don't know the likelihood of a test
+ * succeeding from empirical or other `hard' evidence, don't
+ * make predictions.
+ *
+ * * These are meant to be used in places that are run `a lot'.
+ * It is wasteful to make predictions in code that is run
+ * seldomly (e.g. at subsystem initialization time) as the
+ * basic block reordering that this affects can often generate
+ * larger code.
+ */
+#if __GNUC_PREREQ__(2, 96)
+#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
+#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#else
+#define __predict_true(exp) (exp)
+#define __predict_false(exp) (exp)
+#endif
+
+#if __GNUC_PREREQ__(2, 96)
+#define __noreturn __attribute__((__noreturn__))
+#define __mallocfunc __attribute__((malloc))
+#else
+#define __noreturn
+#define __mallocfunc
+#endif
+
+/*
+ * Macros for manipulating "link sets". Link sets are arrays of pointers
+ * to objects, which are gathered up by the linker.
+ *
+ * Object format-specific code has provided us with the following macros:
+ *
+ * __link_set_add_text(set, sym)
+ * Add a reference to the .text symbol `sym' to `set'.
+ *
+ * __link_set_add_rodata(set, sym)
+ * Add a reference to the .rodata symbol `sym' to `set'.
+ *
+ * __link_set_add_data(set, sym)
+ * Add a reference to the .data symbol `sym' to `set'.
+ *
+ * __link_set_add_bss(set, sym)
+ * Add a reference to the .bss symbol `sym' to `set'.
+ *
+ * __link_set_decl(set, ptype)
+ * Provide an extern declaration of the set `set', which
+ * contains an array of the pointer type `ptype'. This
+ * macro must be used by any code which wishes to reference
+ * the elements of a link set.
+ *
+ * __link_set_start(set)
+ * This points to the first slot in the link set.
+ *
+ * __link_set_end(set)
+ * This points to the (non-existent) slot after the last
+ * entry in the link set.
+ *
+ * __link_set_count(set)
+ * Count the number of entries in link set `set'.
+ *
+ * In addition, we provide the following macros for accessing link sets:
+ *
+ * __link_set_foreach(pvar, set)
+ * Iterate over the link set `set'. Because a link set is
+ * an array of pointers, pvar must be declared as "type **pvar",
+ * and the actual entry accessed as "*pvar".
+ *
+ * __link_set_entry(set, idx)
+ * Access the link set entry at index `idx' from set `set'.
+ */
+#define __link_set_foreach(pvar, set) \
+ for (pvar = __link_set_start(set); pvar < __link_set_end(set); pvar++)
+
+#define __link_set_entry(set, idx) (__link_set_begin(set)[idx])
+
+/*
+ * Some of the recend FreeBSD sources used in Bionic need this.
+ * Originally, this is used to embed the rcs versions of each source file
+ * in the generated binary. We certainly don't want this in Bionic.
+ */
+#define __FBSDID(s) struct __hack
+
+/*-
+ * The following definitions are an extension of the behavior originally
+ * implemented in <sys/_posix.h>, but with a different level of granularity.
+ * POSIX.1 requires that the macros we test be defined before any standard
+ * header file is included.
+ *
+ * Here's a quick run-down of the versions:
+ * defined(_POSIX_SOURCE) 1003.1-1988
+ * _POSIX_C_SOURCE == 1 1003.1-1990
+ * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
+ * _POSIX_C_SOURCE == 199309 1003.1b-1993
+ * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
+ * and the omnibus ISO/IEC 9945-1: 1996
+ * _POSIX_C_SOURCE == 200112 1003.1-2001
+ * _POSIX_C_SOURCE == 200809 1003.1-2008
+ *
+ * In addition, the X/Open Portability Guide, which is now the Single UNIX
+ * Specification, defines a feature-test macro which indicates the version of
+ * that specification, and which subsumes _POSIX_C_SOURCE.
+ *
+ * Our macros begin with two underscores to avoid namespace screwage.
+ */
+
+/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
+#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
+#define _POSIX_C_SOURCE 199009
+#endif
+
+/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199209
+#endif
+
+/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
+#ifdef _XOPEN_SOURCE
+#if _XOPEN_SOURCE - 0 >= 700
+#define __XSI_VISIBLE 700
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809
+#elif _XOPEN_SOURCE - 0 >= 600
+#define __XSI_VISIBLE 600
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112
+#elif _XOPEN_SOURCE - 0 >= 500
+#define __XSI_VISIBLE 500
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 199506
+#endif
+#endif
+
+/*
+ * Deal with all versions of POSIX. The ordering relative to the tests above is
+ * important.
+ */
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 198808
+#endif
+#ifdef _POSIX_C_SOURCE
+#if _POSIX_C_SOURCE >= 200809
+#define __POSIX_VISIBLE 200809
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 200112
+#define __POSIX_VISIBLE 200112
+#define __ISO_C_VISIBLE 1999
+#elif _POSIX_C_SOURCE >= 199506
+#define __POSIX_VISIBLE 199506
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199309
+#define __POSIX_VISIBLE 199309
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199209
+#define __POSIX_VISIBLE 199209
+#define __ISO_C_VISIBLE 1990
+#elif _POSIX_C_SOURCE >= 199009
+#define __POSIX_VISIBLE 199009
+#define __ISO_C_VISIBLE 1990
+#else
+#define __POSIX_VISIBLE 198808
+#define __ISO_C_VISIBLE 0
+#endif /* _POSIX_C_SOURCE */
+#else
+/*-
+ * Deal with _ANSI_SOURCE:
+ * If it is defined, and no other compilation environment is explicitly
+ * requested, then define our internal feature-test macros to zero. This
+ * makes no difference to the preprocessor (undefined symbols in preprocessing
+ * expressions are defined to have value zero), but makes it more convenient for
+ * a test program to print out the values.
+ *
+ * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
+ * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
+ * environment (and in fact we will never get here).
+ */
+#if defined(_ANSI_SOURCE) /* Hide almost everything. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1990
+#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
+#define __POSIX_VISIBLE 0
+#define __XSI_VISIBLE 0
+#define __BSD_VISIBLE 0
+#define __ISO_C_VISIBLE 1999
+#else /* Default environment: show everything. */
+#define __POSIX_VISIBLE 200809
+#define __XSI_VISIBLE 700
+#define __BSD_VISIBLE 1
+#define __ISO_C_VISIBLE 1999
+#endif
+#endif
+
+/*
+ * Default values.
+ */
+#ifndef __XPG_VISIBLE
+# define __XPG_VISIBLE 700
+#endif
+#ifndef __POSIX_VISIBLE
+# define __POSIX_VISIBLE 200809
+#endif
+#ifndef __ISO_C_VISIBLE
+# define __ISO_C_VISIBLE 1999
+#endif
+#ifndef __BSD_VISIBLE
+# define __BSD_VISIBLE 1
+#endif
+
+#define __BIONIC__ 1
+
+#endif /* !_SYS_CDEFS_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h b/6/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h
new file mode 120000
index 0000000..c8af6aa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/cdefs_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/cdefs_elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/dirent.h b/6/platforms/android-9/arch-x86/usr/include/sys/dirent.h
new file mode 120000
index 0000000..ddabb1f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/dirent.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/dirent.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/endian.h b/6/platforms/android-9/arch-x86/usr/include/sys/endian.h
new file mode 120000
index 0000000..fc54639
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/endian.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/endian.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/epoll.h b/6/platforms/android-9/arch-x86/usr/include/sys/epoll.h
new file mode 120000
index 0000000..39c128d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/epoll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/epoll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/errno.h b/6/platforms/android-9/arch-x86/usr/include/sys/errno.h
new file mode 120000
index 0000000..a4807d1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/errno.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/errno.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/exec_elf.h b/6/platforms/android-9/arch-x86/usr/include/sys/exec_elf.h
new file mode 120000
index 0000000..56ac944
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/exec_elf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/exec_elf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/file.h b/6/platforms/android-9/arch-x86/usr/include/sys/file.h
new file mode 120000
index 0000000..688819e
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/file.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/file.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/fsuid.h b/6/platforms/android-9/arch-x86/usr/include/sys/fsuid.h
new file mode 120000
index 0000000..05d078c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/fsuid.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/fsuid.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/inotify.h b/6/platforms/android-9/arch-x86/usr/include/sys/inotify.h
new file mode 120000
index 0000000..7e90309
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/inotify.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/inotify.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ioctl.h b/6/platforms/android-9/arch-x86/usr/include/sys/ioctl.h
new file mode 120000
index 0000000..1155421
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ioctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ioctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ioctl_compat.h b/6/platforms/android-9/arch-x86/usr/include/sys/ioctl_compat.h
new file mode 120000
index 0000000..173ee79
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ioctl_compat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ioctl_compat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ipc.h b/6/platforms/android-9/arch-x86/usr/include/sys/ipc.h
new file mode 120000
index 0000000..bc81302
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ipc.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ipc.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/klog.h b/6/platforms/android-9/arch-x86/usr/include/sys/klog.h
new file mode 120000
index 0000000..ab064fa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/klog.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/klog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/limits.h b/6/platforms/android-9/arch-x86/usr/include/sys/limits.h
new file mode 120000
index 0000000..8bcf820
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/limits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/limits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/linux-syscalls.h b/6/platforms/android-9/arch-x86/usr/include/sys/linux-syscalls.h
new file mode 100644
index 0000000..9702a7a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/linux-syscalls.h
@@ -0,0 +1,292 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_SYSCALLS_H_
+
+#if !defined __ASM_ARM_UNISTD_H && !defined __ASM_I386_UNISTD_H
+#if defined __arm__ && !defined __ARM_EABI__ && !defined __thumb__
+ # define __NR_SYSCALL_BASE 0x900000
+ #else
+ # define __NR_SYSCALL_BASE 0
+ #endif
+
+#define __NR_exit (__NR_SYSCALL_BASE + 1)
+#define __NR_fork (__NR_SYSCALL_BASE + 2)
+#define __NR_clone (__NR_SYSCALL_BASE + 120)
+#define __NR_execve (__NR_SYSCALL_BASE + 11)
+#define __NR_setuid32 (__NR_SYSCALL_BASE + 213)
+#define __NR_getuid32 (__NR_SYSCALL_BASE + 199)
+#define __NR_getgid32 (__NR_SYSCALL_BASE + 200)
+#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201)
+#define __NR_getegid32 (__NR_SYSCALL_BASE + 202)
+#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209)
+#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211)
+#define __NR_gettid (__NR_SYSCALL_BASE + 224)
+#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205)
+#define __NR_getpgid (__NR_SYSCALL_BASE + 132)
+#define __NR_getppid (__NR_SYSCALL_BASE + 64)
+#define __NR_setsid (__NR_SYSCALL_BASE + 66)
+#define __NR_setgid32 (__NR_SYSCALL_BASE + 214)
+#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203)
+#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208)
+#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210)
+#define __NR_brk (__NR_SYSCALL_BASE + 45)
+#define __NR_ptrace (__NR_SYSCALL_BASE + 26)
+#define __NR_getpriority (__NR_SYSCALL_BASE + 96)
+#define __NR_setpriority (__NR_SYSCALL_BASE + 97)
+#define __NR_setrlimit (__NR_SYSCALL_BASE + 75)
+#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191)
+#define __NR_getrusage (__NR_SYSCALL_BASE + 77)
+#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206)
+#define __NR_setpgid (__NR_SYSCALL_BASE + 57)
+#define __NR_setregid32 (__NR_SYSCALL_BASE + 204)
+#define __NR_chroot (__NR_SYSCALL_BASE + 61)
+#define __NR_prctl (__NR_SYSCALL_BASE + 172)
+#define __NR_capget (__NR_SYSCALL_BASE + 184)
+#define __NR_capset (__NR_SYSCALL_BASE + 185)
+#define __NR_sigaltstack (__NR_SYSCALL_BASE + 186)
+#define __NR_acct (__NR_SYSCALL_BASE + 51)
+#define __NR_read (__NR_SYSCALL_BASE + 3)
+#define __NR_write (__NR_SYSCALL_BASE + 4)
+#define __NR_pread64 (__NR_SYSCALL_BASE + 180)
+#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181)
+#define __NR_open (__NR_SYSCALL_BASE + 5)
+#define __NR_close (__NR_SYSCALL_BASE + 6)
+#define __NR_lseek (__NR_SYSCALL_BASE + 19)
+#define __NR__llseek (__NR_SYSCALL_BASE + 140)
+#define __NR_getpid (__NR_SYSCALL_BASE + 20)
+#define __NR_mmap2 (__NR_SYSCALL_BASE + 192)
+#define __NR_munmap (__NR_SYSCALL_BASE + 91)
+#define __NR_mremap (__NR_SYSCALL_BASE + 163)
+#define __NR_msync (__NR_SYSCALL_BASE + 144)
+#define __NR_mprotect (__NR_SYSCALL_BASE + 125)
+#define __NR_mlock (__NR_SYSCALL_BASE + 150)
+#define __NR_munlock (__NR_SYSCALL_BASE + 151)
+#define __NR_ioctl (__NR_SYSCALL_BASE + 54)
+#define __NR_readv (__NR_SYSCALL_BASE + 145)
+#define __NR_writev (__NR_SYSCALL_BASE + 146)
+#define __NR_fcntl (__NR_SYSCALL_BASE + 55)
+#define __NR_flock (__NR_SYSCALL_BASE + 143)
+#define __NR_fchmod (__NR_SYSCALL_BASE + 94)
+#define __NR_dup (__NR_SYSCALL_BASE + 41)
+#define __NR_pipe (__NR_SYSCALL_BASE + 42)
+#define __NR_dup2 (__NR_SYSCALL_BASE + 63)
+#define __NR__newselect (__NR_SYSCALL_BASE + 142)
+#define __NR_ftruncate (__NR_SYSCALL_BASE + 93)
+#define __NR_fsync (__NR_SYSCALL_BASE + 118)
+#define __NR_fdatasync (__NR_SYSCALL_BASE + 148)
+#define __NR_fchown32 (__NR_SYSCALL_BASE + 207)
+#define __NR_sync (__NR_SYSCALL_BASE + 36)
+#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)
+#define __NR_sendfile (__NR_SYSCALL_BASE + 187)
+#define __NR_link (__NR_SYSCALL_BASE + 9)
+#define __NR_unlink (__NR_SYSCALL_BASE + 10)
+#define __NR_chdir (__NR_SYSCALL_BASE + 12)
+#define __NR_mknod (__NR_SYSCALL_BASE + 14)
+#define __NR_chmod (__NR_SYSCALL_BASE + 15)
+#define __NR_chown32 (__NR_SYSCALL_BASE + 212)
+#define __NR_lchown32 (__NR_SYSCALL_BASE + 198)
+#define __NR_mount (__NR_SYSCALL_BASE + 21)
+#define __NR_umount2 (__NR_SYSCALL_BASE + 52)
+#define __NR_fstat64 (__NR_SYSCALL_BASE + 197)
+#define __NR_stat64 (__NR_SYSCALL_BASE + 195)
+#define __NR_lstat64 (__NR_SYSCALL_BASE + 196)
+#define __NR_mkdir (__NR_SYSCALL_BASE + 39)
+#define __NR_readlink (__NR_SYSCALL_BASE + 85)
+#define __NR_rmdir (__NR_SYSCALL_BASE + 40)
+#define __NR_rename (__NR_SYSCALL_BASE + 38)
+#define __NR_getcwd (__NR_SYSCALL_BASE + 183)
+#define __NR_access (__NR_SYSCALL_BASE + 33)
+#define __NR_symlink (__NR_SYSCALL_BASE + 83)
+#define __NR_fchdir (__NR_SYSCALL_BASE + 133)
+#define __NR_truncate (__NR_SYSCALL_BASE + 92)
+#define __NR_pause (__NR_SYSCALL_BASE + 29)
+#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78)
+#define __NR_settimeofday (__NR_SYSCALL_BASE + 79)
+#define __NR_times (__NR_SYSCALL_BASE + 43)
+#define __NR_nanosleep (__NR_SYSCALL_BASE + 162)
+#define __NR_getitimer (__NR_SYSCALL_BASE + 105)
+#define __NR_setitimer (__NR_SYSCALL_BASE + 104)
+#define __NR_sigaction (__NR_SYSCALL_BASE + 67)
+#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126)
+#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72)
+#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174)
+#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175)
+#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177)
+#define __NR_sigpending (__NR_SYSCALL_BASE + 73)
+#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156)
+#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157)
+#define __NR_sched_yield (__NR_SYSCALL_BASE + 158)
+#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154)
+#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155)
+#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159)
+#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160)
+#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161)
+#define __NR_uname (__NR_SYSCALL_BASE + 122)
+#define __NR_wait4 (__NR_SYSCALL_BASE + 114)
+#define __NR_umask (__NR_SYSCALL_BASE + 60)
+#define __NR_reboot (__NR_SYSCALL_BASE + 88)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_init_module (__NR_SYSCALL_BASE + 128)
+#define __NR_delete_module (__NR_SYSCALL_BASE + 129)
+#define __NR_syslog (__NR_SYSCALL_BASE + 103)
+#define __NR_sysinfo (__NR_SYSCALL_BASE + 116)
+#define __NR_futex (__NR_SYSCALL_BASE + 240)
+#define __NR_poll (__NR_SYSCALL_BASE + 168)
+
+#ifdef __arm__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 248)
+#define __NR_waitid (__NR_SYSCALL_BASE + 280)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 322)
+#define __NR_madvise (__NR_SYSCALL_BASE + 220)
+#define __NR_mincore (__NR_SYSCALL_BASE + 219)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 359)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 217)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 323)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 325)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 333)
+#define __NR_renameat (__NR_SYSCALL_BASE + 329)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 328)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 262)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 257)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 258)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 261)
+#define __NR_utimes (__NR_SYSCALL_BASE + 269)
+#define __NR_socket (__NR_SYSCALL_BASE + 281)
+#define __NR_socketpair (__NR_SYSCALL_BASE + 288)
+#define __NR_bind (__NR_SYSCALL_BASE + 282)
+#define __NR_connect (__NR_SYSCALL_BASE + 283)
+#define __NR_listen (__NR_SYSCALL_BASE + 284)
+#define __NR_accept (__NR_SYSCALL_BASE + 285)
+#define __NR_getsockname (__NR_SYSCALL_BASE + 286)
+#define __NR_getpeername (__NR_SYSCALL_BASE + 287)
+#define __NR_sendto (__NR_SYSCALL_BASE + 290)
+#define __NR_recvfrom (__NR_SYSCALL_BASE + 292)
+#define __NR_shutdown (__NR_SYSCALL_BASE + 293)
+#define __NR_setsockopt (__NR_SYSCALL_BASE + 294)
+#define __NR_getsockopt (__NR_SYSCALL_BASE + 295)
+#define __NR_sendmsg (__NR_SYSCALL_BASE + 296)
+#define __NR_recvmsg (__NR_SYSCALL_BASE + 297)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 250)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 316)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 356)
+#define __NR_ARM_set_tls (__NR_SYSCALL_BASE + 983045)
+#define __NR_ARM_cacheflush (__NR_SYSCALL_BASE + 983042)
+#endif
+
+#ifdef __i386__
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 289)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 290)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 293)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
+#endif
+
+#if defined(__SH3__) || defined(__SH4__)
+#define __NR_exit_group (__NR_SYSCALL_BASE + 252)
+#define __NR_waitpid (__NR_SYSCALL_BASE + 7)
+#define __NR_waitid (__NR_SYSCALL_BASE + 284)
+#define __NR_kill (__NR_SYSCALL_BASE + 37)
+#define __NR_tkill (__NR_SYSCALL_BASE + 238)
+#define __NR_set_thread_area (__NR_SYSCALL_BASE + 243)
+#define __NR_vfork (__NR_SYSCALL_BASE + 190)
+#define __NR_openat (__NR_SYSCALL_BASE + 295)
+#define __NR_madvise (__NR_SYSCALL_BASE + 219)
+#define __NR_mincore (__NR_SYSCALL_BASE + 218)
+#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
+#define __NR_getdents64 (__NR_SYSCALL_BASE + 220)
+#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 269)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE + 300)
+#define __NR_mkdirat (__NR_SYSCALL_BASE + 296)
+#define __NR_fchownat (__NR_SYSCALL_BASE + 298)
+#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
+#define __NR_renameat (__NR_SYSCALL_BASE + 302)
+#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
+#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
+#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
+#define __NR_clock_getres (__NR_SYSCALL_BASE + 266)
+#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 267)
+#define __NR_timer_create (__NR_SYSCALL_BASE + 259)
+#define __NR_timer_settime (__NR_SYSCALL_BASE + 260)
+#define __NR_timer_gettime (__NR_SYSCALL_BASE + 261)
+#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 262)
+#define __NR_timer_delete (__NR_SYSCALL_BASE + 263)
+#define __NR_utimes (__NR_SYSCALL_BASE + 271)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR___socketcall (__NR_SYSCALL_BASE + 102)
+#define __NR_ioprio_set (__NR_SYSCALL_BASE + 288)
+#define __NR_ioprio_get (__NR_SYSCALL_BASE + 289)
+#define __NR_epoll_create (__NR_SYSCALL_BASE + 254)
+#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 255)
+#define __NR_epoll_wait (__NR_SYSCALL_BASE + 256)
+#define __NR_inotify_init (__NR_SYSCALL_BASE + 290)
+#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 291)
+#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 292)
+#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
+#endif
+
+#endif
+
+#endif /* _BIONIC_LINUX_SYSCALLS_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/linux-unistd.h b/6/platforms/android-9/arch-x86/usr/include/sys/linux-unistd.h
new file mode 100644
index 0000000..23853da
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/linux-unistd.h
@@ -0,0 +1,212 @@
+/* auto-generated by gensyscalls.py, do not touch */
+#ifndef _BIONIC_LINUX_UNISTD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void _exit (int);
+void _exit_thread (int);
+pid_t __fork (void);
+pid_t _waitpid (pid_t, int*, int, struct rusage*);
+int __waitid (int, pid_t, struct siginfo_t*, int,void*);
+pid_t __sys_clone (int, void*, int*, void*, int*);
+int execve (const char*, char* const*, char* const*);
+int __setuid (uid_t);
+uid_t getuid (void);
+gid_t getgid (void);
+uid_t geteuid (void);
+gid_t getegid (void);
+uid_t getresuid (void);
+gid_t getresgid (void);
+pid_t gettid (void);
+int getgroups (int, gid_t *);
+pid_t getpgid (pid_t);
+pid_t getppid (void);
+pid_t setsid (void);
+int setgid (gid_t);
+int seteuid (uid_t);
+int __setreuid (uid_t, uid_t);
+int __setresuid (uid_t, uid_t, uid_t);
+int setresgid (gid_t, gid_t, gid_t);
+void* __brk (void*);
+int kill (pid_t, int);
+int tkill (pid_t tid, int sig);
+int __ptrace (int request, int pid, void* addr, void* data);
+int __set_thread_area (void* user_desc);
+int __getpriority (int, int);
+int setpriority (int, int, int);
+int setrlimit (int resource, const struct rlimit *rlp);
+int getrlimit (int resource, struct rlimit *rlp);
+int getrusage (int who, struct rusage* r_usage);
+int setgroups (int, const gid_t *);
+pid_t getpgrp (void);
+int setpgid (pid_t, pid_t);
+pid_t vfork (void);
+int setregid (gid_t, gid_t);
+int chroot (const char *);
+int prctl (int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5);
+int capget (cap_user_header_t header, cap_user_data_t data);
+int capset (cap_user_header_t header, const cap_user_data_t data);
+int sigaltstack (const stack_t*, stack_t*);
+int acct (const char* filepath);
+ssize_t read (int, void*, size_t);
+ssize_t write (int, const void*, size_t);
+ssize_t __pread64 (int, void *, size_t, off_t, off_t);
+ssize_t __pwrite64 (int, void *, size_t, off_t, off_t);
+int __open (const char*, int, mode_t);
+int __openat (int, const char*, int, mode_t);
+int close (int);
+int creat (const char*, mode_t);
+off_t lseek (int, off_t, int);
+int __llseek (int, unsigned long, unsigned long, loff_t*, int);
+pid_t getpid (void);
+void * mmap (void *, size_t, int, int, int, long);
+void * __mmap2 (void*, size_t, int, int, int, long);
+int munmap (void *, size_t);
+void * mremap (void *, size_t, size_t, unsigned long);
+int msync (const void *, size_t, int);
+int mprotect (const void *, size_t, int);
+int madvise (const void *, size_t, int);
+int mlock (const void *addr, size_t len);
+int munlock (const void *addr, size_t len);
+int mincore (void* start, size_t length, unsigned char* vec);
+int __ioctl (int, int, void *);
+int readv (int, const struct iovec *, int);
+int writev (int, const struct iovec *, int);
+int __fcntl (int, int, void*);
+int flock (int, int);
+int fchmod (int, mode_t);
+int dup (int);
+int pipe (int *);
+int pipe2 (int *, int);
+int dup2 (int, int);
+int select (int, struct fd_set *, struct fd_set *, struct fd_set *, struct timeval *);
+int ftruncate (int, off_t);
+int getdents (unsigned int, struct dirent *, unsigned int);
+int fsync (int);
+int fdatasync (int);
+int fchown (int, uid_t, gid_t);
+void sync (void);
+int __fcntl64 (int, int, void *);
+int __fstatfs64 (int, size_t, struct statfs *);
+ssize_t sendfile (int out_fd, int in_fd, off_t *offset, size_t count);
+int fstatat (int dirfd, const char *path, struct stat *buf, int flags);
+int mkdirat (int dirfd, const char *pathname, mode_t mode);
+int fchownat (int dirfd, const char *path, uid_t owner, gid_t group, int flags);
+int fchmodat (int dirfd, const char *path, mode_t mode, int flags);
+int renameat (int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
+int link (const char*, const char*);
+int unlink (const char*);
+int unlinkat (int, const char *, int);
+int chdir (const char*);
+int mknod (const char*, mode_t, dev_t);
+int chmod (const char*,mode_t);
+int chown (const char *, uid_t, gid_t);
+int lchown (const char*, uid_t, gid_t);
+int mount (const char*, const char*, const char*, unsigned long, const void*);
+int umount (const char*);
+int umount2 (const char*, int);
+int fstat (int, struct stat*);
+int stat (const char *, struct stat *);
+int lstat (const char *, struct stat *);
+int mkdir (const char *, mode_t);
+int readlink (const char *, char *, size_t);
+int rmdir (const char *);
+int rename (const char *, const char *);
+int __getcwd (char * buf, size_t size);
+int access (const char *, int);
+int symlink (const char *, const char *);
+int fchdir (int);
+int truncate (const char*, off_t);
+int __statfs64 (const char *, size_t, struct statfs *);
+int pause (void);
+int gettimeofday (struct timeval*, struct timezone*);
+int settimeofday (const struct timeval*, const struct timezone*);
+clock_t times (struct tms *);
+int nanosleep (const struct timespec *, struct timespec *);
+int clock_gettime (clockid_t clk_id, struct timespec *tp);
+int clock_settime (clockid_t clk_id, const struct timespec *tp);
+int clock_getres (clockid_t clk_id, struct timespec *res);
+int clock_nanosleep (const struct timespec *req, struct timespec *rem);
+int getitimer (int, const struct itimerval *);
+int setitimer (int, const struct itimerval *, struct itimerval *);
+int __timer_create (clockid_t clockid, struct sigevent *evp, timer_t *timerid);
+int __timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*);
+int __timer_gettime (timer_t, struct itimerspec*);
+int __timer_getoverrun (timer_t);
+int __timer_delete (timer_t);
+int utimes (const char*, const struct timeval tvp[2]);
+int sigaction (int, const struct sigaction *, struct sigaction *);
+int sigprocmask (int, const sigset_t *, sigset_t *);
+int __sigsuspend (int unused1, int unused2, unsigned mask);
+int __rt_sigaction (int sig, const struct sigaction *act, struct sigaction *oact, size_t sigsetsize);
+int __rt_sigprocmask (int how, const sigset_t *set, sigset_t *oset, size_t sigsetsize);
+int __rt_sigtimedwait (const sigset_t *set, struct siginfo_t *info, struct timespec_t *timeout, size_t sigset_size);
+int sigpending (sigset_t *);
+int socket (int, int, int);
+int socketpair (int, int, int, int*);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int socket (int, int, int);
+int bind (int, struct sockaddr *, int);
+int connect (int, struct sockaddr *, socklen_t);
+int listen (int, int);
+int accept (int, struct sockaddr *, socklen_t *);
+int getsockname (int, struct sockaddr *, socklen_t *);
+int getpeername (int, struct sockaddr *, socklen_t *);
+int socketpair (int, int, int, int*);
+int sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
+int recvfrom (int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *);
+int shutdown (int, int);
+int setsockopt (int, int, int, const void *, socklen_t);
+int getsockopt (int, int, int, void *, socklen_t *);
+int sendmsg (int, const struct msghdr *, unsigned int);
+int recvmsg (int, struct msghdr *, unsigned int);
+int __socketcall (int, unsigned long*);
+int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param);
+int sched_getscheduler (pid_t pid);
+int sched_yield (void);
+int sched_setparam (pid_t pid, const struct sched_param *param);
+int sched_getparam (pid_t pid, struct sched_param *param);
+int sched_get_priority_max (int policy);
+int sched_get_priority_min (int policy);
+int sched_rr_get_interval (pid_t pid, struct timespec *interval);
+int ioprio_set (int which, int who, int ioprio);
+int ioprio_get (int which, int who);
+int uname (struct utsname *);
+pid_t __wait4 (pid_t pid, int *status, int options, struct rusage *rusage);
+mode_t umask (mode_t);
+int __reboot (int, int, int, void *);
+int __syslog (int, char *, int);
+int init_module (void *, unsigned long, const char *);
+int delete_module (const char*, unsigned int);
+int klogctl (int, char *, int);
+int sysinfo (struct sysinfo *);
+int futex (void *, int, int, void *, void *, int);
+int epoll_create (int size);
+int epoll_ctl (int epfd, int op, int fd, struct epoll_event *event);
+int epoll_wait (int epfd, struct epoll_event *events, int max, int timeout);
+int inotify_init (void);
+int inotify_add_watch (int, const char *, unsigned int);
+int inotify_rm_watch (int, unsigned int);
+int poll (struct pollfd *, unsigned int, long);
+int eventfd (unsigned int, int);
+int __set_tls (void*);
+int cacheflush (long start, long end, long flags);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BIONIC_LINUX_UNISTD_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/mman.h b/6/platforms/android-9/arch-x86/usr/include/sys/mman.h
new file mode 120000
index 0000000..dfb2209
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/mman.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/mman.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/mount.h b/6/platforms/android-9/arch-x86/usr/include/sys/mount.h
new file mode 120000
index 0000000..97b0def
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/mount.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/mount.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/param.h b/6/platforms/android-9/arch-x86/usr/include/sys/param.h
new file mode 120000
index 0000000..bab6006
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/param.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/param.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/poll.h b/6/platforms/android-9/arch-x86/usr/include/sys/poll.h
new file mode 120000
index 0000000..e12fec5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/poll.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/poll.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/prctl.h b/6/platforms/android-9/arch-x86/usr/include/sys/prctl.h
new file mode 120000
index 0000000..82d7468
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/prctl.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/prctl.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ptrace.h b/6/platforms/android-9/arch-x86/usr/include/sys/ptrace.h
new file mode 120000
index 0000000..48fe0da
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ptrace.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ptrace.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/queue.h b/6/platforms/android-9/arch-x86/usr/include/sys/queue.h
new file mode 120000
index 0000000..eb53482
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/queue.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/queue.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/reboot.h b/6/platforms/android-9/arch-x86/usr/include/sys/reboot.h
new file mode 120000
index 0000000..5f51363
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/reboot.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/reboot.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/resource.h b/6/platforms/android-9/arch-x86/usr/include/sys/resource.h
new file mode 120000
index 0000000..7841965
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/resource.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/resource.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/select.h b/6/platforms/android-9/arch-x86/usr/include/sys/select.h
new file mode 120000
index 0000000..024dfdc
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/select.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/select.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/sendfile.h b/6/platforms/android-9/arch-x86/usr/include/sys/sendfile.h
new file mode 120000
index 0000000..64a12c8
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/sendfile.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/sendfile.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/socket.h b/6/platforms/android-9/arch-x86/usr/include/sys/socket.h
new file mode 120000
index 0000000..8fed753
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/socket.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/socket.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/socketcalls.h b/6/platforms/android-9/arch-x86/usr/include/sys/socketcalls.h
new file mode 120000
index 0000000..d9e93fd
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/socketcalls.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/socketcalls.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/stat.h b/6/platforms/android-9/arch-x86/usr/include/sys/stat.h
new file mode 120000
index 0000000..ce68ce9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/stat.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/stat.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/statfs.h b/6/platforms/android-9/arch-x86/usr/include/sys/statfs.h
new file mode 120000
index 0000000..02a757d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/statfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/statfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/syscall.h b/6/platforms/android-9/arch-x86/usr/include/sys/syscall.h
new file mode 120000
index 0000000..afb4ea9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/syscall.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/syscall.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/sysconf.h b/6/platforms/android-9/arch-x86/usr/include/sys/sysconf.h
new file mode 120000
index 0000000..ce630e1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/sysconf.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/sysconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/sysinfo.h b/6/platforms/android-9/arch-x86/usr/include/sys/sysinfo.h
new file mode 100644
index 0000000..c7e46e6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/sysinfo.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_SYSINFO_H_
+#define _SYS_SYSINFO_H_
+
+#include <sys/cdefs.h>
+#include <linux/kernel.h>
+
+__BEGIN_DECLS
+
+extern int sysinfo (struct sysinfo *info);
+
+__END_DECLS
+
+#endif /* _SYS_SYSINFO_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/syslimits.h b/6/platforms/android-9/arch-x86/usr/include/sys/syslimits.h
new file mode 120000
index 0000000..2020c65
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/syslimits.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/syslimits.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h b/6/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h
new file mode 120000
index 0000000..cf761c4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/sysmacros.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/sysmacros.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/system_properties.h b/6/platforms/android-9/arch-x86/usr/include/sys/system_properties.h
new file mode 120000
index 0000000..633e037
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/system_properties.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/system_properties.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/time.h b/6/platforms/android-9/arch-x86/usr/include/sys/time.h
new file mode 120000
index 0000000..34003f2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/time.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/timeb.h b/6/platforms/android-9/arch-x86/usr/include/sys/timeb.h
new file mode 120000
index 0000000..b4e8d4b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/timeb.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/timeb.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/times.h b/6/platforms/android-9/arch-x86/usr/include/sys/times.h
new file mode 120000
index 0000000..c243fba
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/times.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/times.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ttychars.h b/6/platforms/android-9/arch-x86/usr/include/sys/ttychars.h
new file mode 120000
index 0000000..2161cd6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ttychars.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ttychars.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/ttydev.h b/6/platforms/android-9/arch-x86/usr/include/sys/ttydev.h
new file mode 120000
index 0000000..9ccb17b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/ttydev.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/ttydev.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/types.h b/6/platforms/android-9/arch-x86/usr/include/sys/types.h
new file mode 120000
index 0000000..335d345
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/types.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/types.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/uio.h b/6/platforms/android-9/arch-x86/usr/include/sys/uio.h
new file mode 120000
index 0000000..a9814ab
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/uio.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/uio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/un.h b/6/platforms/android-9/arch-x86/usr/include/sys/un.h
new file mode 120000
index 0000000..e239785
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/un.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/un.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/utime.h b/6/platforms/android-9/arch-x86/usr/include/sys/utime.h
new file mode 120000
index 0000000..867130a
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/utime.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/utsname.h b/6/platforms/android-9/arch-x86/usr/include/sys/utsname.h
new file mode 120000
index 0000000..b5df6f9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/utsname.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/utsname.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/vfs.h b/6/platforms/android-9/arch-x86/usr/include/sys/vfs.h
new file mode 120000
index 0000000..bdbfdb5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/vfs.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/vfs.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/vt.h b/6/platforms/android-9/arch-x86/usr/include/sys/vt.h
new file mode 120000
index 0000000..8876e4f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/vt.h
@@ -0,0 +1 @@
+../../../../../../platforms/android-8/arch-x86/usr/include/sys/vt.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/sys/wait.h b/6/platforms/android-9/arch-x86/usr/include/sys/wait.h
new file mode 100644
index 0000000..b30b7ec
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/sys/wait.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _SYS_WAIT_H_
+#define _SYS_WAIT_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/resource.h>
+#include <linux/wait.h>
+#include <signal.h>
+
+__BEGIN_DECLS
+
+#define WEXITSTATUS(s) (((s) & 0xff00) >> 8)
+#define WCOREDUMP(s) ((s) & 0x80)
+#define WTERMSIG(s) ((s) & 0x7f)
+#define WSTOPSIG(s) WEXITSTATUS(s)
+
+#define WIFEXITED(s) (WTERMSIG(s) == 0)
+#define WIFSTOPPED(s) (WTERMSIG(s) == 0x7f)
+#define WIFSIGNALED(s) (WTERMSIG((s)+1) >= 2)
+
+extern pid_t wait(int *);
+extern pid_t waitpid(pid_t, int *, int);
+extern pid_t wait3(int *, int, struct rusage *);
+extern pid_t wait4(pid_t, int *, int, struct rusage *);
+
+/* Posix states that idtype_t should be an enumeration type, but
+ * the kernel headers define P_ALL, P_PID and P_PGID as constant macros
+ * instead.
+ */
+typedef int idtype_t;
+
+extern int waitid(idtype_t which, id_t id, siginfo_t *info, int options);
+
+__END_DECLS
+
+#endif /* _SYS_WAIT_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/syslog.h b/6/platforms/android-9/arch-x86/usr/include/syslog.h
new file mode 120000
index 0000000..c765aa1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/syslog.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/syslog.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/termio.h b/6/platforms/android-9/arch-x86/usr/include/termio.h
new file mode 120000
index 0000000..5936a4d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/termio.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/termio.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/termios.h b/6/platforms/android-9/arch-x86/usr/include/termios.h
new file mode 120000
index 0000000..6f9c639
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/termios.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/termios.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/thread_db.h b/6/platforms/android-9/arch-x86/usr/include/thread_db.h
new file mode 100644
index 0000000..1b36cb2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/thread_db.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ */
+
+#ifndef _LIBTHREAD_DB__THREAD_DB_H
+#define _LIBTHREAD_DB__THREAD_DB_H
+
+#include <pthread.h>
+#include <signal.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+typedef void *psaddr_t;
+typedef pid_t lwpid_t;
+
+#define TD_THR_ANY_USER_FLAGS 0xffffffff
+#define TD_THR_LOWEST_PRIORITY -20
+#define TD_SIGNO_MASK NULL
+
+/* td_err_e values */
+enum {
+ TD_OK,
+ TD_ERR,
+ TD_NOTHR,
+ TD_NOSV,
+ TD_NOLWP,
+ TD_BADPH,
+ TD_BADTH,
+ TD_BADSH,
+ TD_BADTA,
+ TD_BADKEY,
+ TD_NOMSG,
+ TD_NOFPREGS,
+ TD_NOLIBTHREAD,
+ TD_NOEVENT,
+ TD_NOCAPAB,
+ TD_DBERR,
+ TD_NOAPLIC,
+ TD_NOTSD,
+ TD_MALLOC,
+ TD_PARTIALREG,
+ TD_NOXREGS,
+ TD_VERSION
+};
+
+/*
+ * td_event_e values
+ * NOTE: There is a max of 32 events
+ */
+enum {
+ TD_CREATE,
+ TD_DEATH
+};
+
+/* td_thr_state_e values */
+enum {
+ TD_THR_ANY_STATE,
+ TD_THR_UNKNOWN,
+ TD_THR_SLEEP,
+ TD_THR_ZOMBIE
+};
+
+typedef int32_t td_err_e;
+typedef uint32_t td_event_e;
+typedef uint32_t td_notify_e;
+typedef uint32_t td_thr_state_e;
+typedef pthread_t thread_t;
+
+typedef struct
+{
+ pid_t pid;
+ struct ps_prochandle *ph;
+} td_thragent_t;
+
+typedef struct
+{
+ pid_t pid;
+ pid_t tid;
+} td_thrhandle_t;
+
+typedef struct
+{
+ td_event_e event;
+ td_thrhandle_t const * th_p;
+ union {
+ void * data;
+ } msg;
+} td_event_msg_t;
+
+typedef struct
+{
+ uint32_t events;
+} td_thr_events_t;
+
+typedef struct
+{
+ union {
+ void * bptaddr;
+ } u;
+} td_notify_t;
+
+typedef struct
+{
+ td_thr_state_e ti_state;
+ thread_t ti_tid; // pthread's id for the thread
+ int32_t ti_lid; // the kernel's id for the thread
+} td_thrinfo_t;
+
+
+#define td_event_emptyset(set) \
+ (set)->events = 0
+
+#define td_event_fillset(set) \
+ (set)->events = 0xffffffff
+
+#define td_event_addset(set, n) \
+ (set)->events |= (1 << n)
+
+
+typedef int td_thr_iter_f(td_thrhandle_t const *, void *);
+
+
+struct ps_prochandle;
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+extern td_err_e td_ta_new(struct ps_prochandle * proc_handle, td_thragent_t ** thread_agent);
+
+extern td_err_e td_ta_delete(td_thragent_t * ta);
+
+extern td_err_e td_ta_set_event(td_thragent_t const * agent, td_thr_events_t * event);
+
+extern td_err_e td_ta_event_addr(td_thragent_t const * agent, td_event_e event, td_notify_t * notify);
+
+extern td_err_e td_ta_clear_event(const td_thragent_t * ta_arg,
+ td_thr_events_t * event);
+
+extern td_err_e td_ta_event_getmsg(td_thragent_t const * agent, td_event_msg_t * event);
+
+extern td_err_e td_ta_map_lwp2thr(td_thragent_t const * agent, lwpid_t lwpid,
+ td_thrhandle_t *th);
+
+extern td_err_e td_thr_get_info(td_thrhandle_t const * handle,
+ td_thrinfo_t * info);
+
+extern td_err_e td_thr_event_enable(td_thrhandle_t const * handle,
+ td_event_e event);
+
+extern td_err_e td_ta_thr_iter(td_thragent_t const * agent, td_thr_iter_f * func, void * cookie,
+ td_thr_state_e state, int32_t prio, sigset_t * sigmask, uint32_t user_flags);
+
+extern char const ** td_symbol_list(void);
+
+extern td_err_e td_thr_tls_get_addr(const td_thrhandle_t * th,
+ psaddr_t map_address, size_t offset,
+ psaddr_t * address);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/6/platforms/android-9/arch-x86/usr/include/time.h b/6/platforms/android-9/arch-x86/usr/include/time.h
new file mode 120000
index 0000000..e07bf78
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/time.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/time.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/time64.h b/6/platforms/android-9/arch-x86/usr/include/time64.h
new file mode 120000
index 0000000..2af1910
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/time64.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/time64.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/unistd.h b/6/platforms/android-9/arch-x86/usr/include/unistd.h
new file mode 100644
index 0000000..21154ad
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/unistd.h
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _UNISTD_H_
+#define _UNISTD_H_
+
+#include <stddef.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/sysconf.h>
+#include <linux/capability.h>
+#include <pathconf.h>
+
+__BEGIN_DECLS
+
+/* Standard file descriptor numbers. */
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* Values for whence in fseek and lseek */
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+extern char **environ;
+extern __noreturn void _exit(int);
+
+extern pid_t fork(void);
+extern pid_t vfork(void);
+extern pid_t getpid(void);
+extern pid_t gettid(void);
+extern pid_t getpgid(pid_t);
+extern int setpgid(pid_t, pid_t);
+extern pid_t getppid(void);
+extern pid_t getpgrp(void);
+extern int setpgrp(void);
+extern pid_t setsid(void);
+
+extern int execv(const char *, char * const *);
+extern int execvp(const char *, char * const *);
+extern int execve(const char *, char * const *, char * const *);
+extern int execl(const char *, const char *, ...);
+extern int execlp(const char *, const char *, ...);
+extern int execle(const char *, const char *, ...);
+extern int capget(cap_user_header_t hdrp, cap_user_data_t datap);
+extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+extern int prctl(int option, unsigned long arg2, unsigned long arg3,
+ unsigned long arg4, unsigned long arg5);
+
+extern int nice(int);
+
+extern int setuid(uid_t);
+extern uid_t getuid(void);
+extern int seteuid(uid_t);
+extern uid_t geteuid(void);
+extern int setgid(gid_t);
+extern gid_t getgid(void);
+extern int setegid(gid_t);
+extern gid_t getegid(void);
+extern int getgroups(int, gid_t *);
+extern int setgroups(size_t, const gid_t *);
+extern int setreuid(uid_t, uid_t);
+extern int setregid(gid_t, gid_t);
+extern int setresuid(uid_t, uid_t, uid_t);
+extern int setresgid(gid_t, gid_t, gid_t);
+extern int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
+extern int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
+extern int issetugid(void);
+extern char* getlogin(void);
+extern char* getusershell(void);
+extern void setusershell(void);
+extern void endusershell(void);
+
+
+
+/* Macros for access() */
+#define R_OK 4 /* Read */
+#define W_OK 2 /* Write */
+#define X_OK 1 /* Execute */
+#define F_OK 0 /* Existence */
+
+extern int access(const char *, int);
+extern int link(const char *, const char *);
+extern int unlink(const char *);
+extern int chdir(const char *);
+extern int fchdir(int);
+extern int rmdir(const char *);
+extern int pipe(int *);
+#ifdef _GNU_SOURCE /* GLibc compatibility */
+extern int pipe2(int *, int);
+#endif
+extern int chroot(const char *);
+extern int symlink(const char *, const char *);
+extern int readlink(const char *, char *, size_t);
+extern int chown(const char *, uid_t, gid_t);
+extern int fchown(int, uid_t, gid_t);
+extern int lchown(const char *, uid_t, gid_t);
+extern int truncate(const char *, off_t);
+extern char *getcwd(char *, size_t);
+
+extern int sync(void);
+
+extern int close(int);
+extern off_t lseek(int, off_t, int);
+extern loff_t lseek64(int, loff_t, int);
+
+extern ssize_t read(int, void *, size_t);
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t pread(int, void *, size_t, off_t);
+extern ssize_t pwrite(int, const void *, size_t, off_t);
+
+extern int dup(int);
+extern int dup2(int, int);
+extern int fcntl(int, int, ...);
+extern int ioctl(int, int, ...);
+extern int flock(int, int);
+extern int fsync(int);
+extern int fdatasync(int);
+extern int ftruncate(int, off_t);
+
+extern int pause(void);
+extern unsigned int alarm(unsigned int);
+extern unsigned int sleep(unsigned int);
+extern int usleep(unsigned long);
+
+extern int gethostname(char *, size_t);
+
+extern int getdtablesize(void);
+
+extern void *__brk(void *);
+extern int brk(void *);
+extern void *sbrk(ptrdiff_t);
+
+extern int getopt(int, char * const *, const char *);
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+extern int isatty(int);
+extern char* ttyname(int);
+extern int ttyname_r(int, char*, size_t);
+
+extern int acct(const char* filepath);
+
+static __inline__ int getpagesize(void) {
+ extern unsigned int __page_size;
+ return __page_size;
+}
+static __inline__ int __getpageshift(void) {
+ extern unsigned int __page_shift;
+ return __page_shift;
+}
+
+extern int sysconf(int name);
+
+extern int daemon(int, int);
+
+/* A special syscall that is only available on the ARM, not x86 function. */
+extern int cacheflush(long start, long end, long flags);
+
+extern pid_t tcgetpgrp(int fd);
+extern int tcsetpgrp(int fd, pid_t _pid);
+
+#if 0 /* MISSING FROM BIONIC */
+extern pid_t getsid(pid_t);
+extern int execvpe(const char *, char * const *, char * const *);
+extern int execlpe(const char *, const char *, ...);
+extern int getfsuid(uid_t);
+extern int setfsuid(uid_t);
+extern int getlogin_r(char* name, size_t namesize);
+extern int sethostname(const char *, size_t);
+extern int getdomainname(char *, size_t);
+extern int setdomainname(const char *, size_t);
+#endif /* MISSING */
+
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+
+__END_DECLS
+
+#endif /* _UNISTD_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/util.h b/6/platforms/android-9/arch-x86/usr/include/util.h
new file mode 120000
index 0000000..5faca63
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/util.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/util.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/utime.h b/6/platforms/android-9/arch-x86/usr/include/utime.h
new file mode 120000
index 0000000..c1634d6
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/utime.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/utime.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/utmp.h b/6/platforms/android-9/arch-x86/usr/include/utmp.h
new file mode 120000
index 0000000..f194565
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/utmp.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/utmp.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/wchar.h b/6/platforms/android-9/arch-x86/usr/include/wchar.h
new file mode 100644
index 0000000..9b744a5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/wchar.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _WCHAR_H_
+#define _WCHAR_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+/* wchar_t is required in stdlib.h according to POSIX */
+#define __need___wchar_t
+#include <stddef.h>
+
+#include <stdarg.h>
+#include <time.h>
+#include <malloc.h>
+
+#include <stddef.h>
+
+/* IMPORTANT: Any code that relies on wide character support is essentially
+ * non-portable and/or broken. the only reason this header exist
+ * is because I'm really a nice guy. However, I'm not nice enough
+ * to provide you with a real implementation. instead wchar_t == char
+ * and all wc functions are stubs to their "normal" equivalent...
+ */
+
+__BEGIN_DECLS
+
+typedef int wint_t;
+typedef struct { int dummy; } mbstate_t;
+
+typedef enum {
+ WC_TYPE_INVALID = 0,
+ WC_TYPE_ALNUM,
+ WC_TYPE_ALPHA,
+ WC_TYPE_BLANK,
+ WC_TYPE_CNTRL,
+ WC_TYPE_DIGIT,
+ WC_TYPE_GRAPH,
+ WC_TYPE_LOWER,
+ WC_TYPE_PRINT,
+ WC_TYPE_PUNCT,
+ WC_TYPE_SPACE,
+ WC_TYPE_UPPER,
+ WC_TYPE_XDIGIT,
+ WC_TYPE_MAX
+} wctype_t;
+
+#define WCHAR_MAX INT_MAX
+#define WCHAR_MIN INT_MIN
+#define WEOF ((wint_t)(-1))
+
+extern wint_t btowc(int);
+extern int fwprintf(FILE *, const wchar_t *, ...);
+extern int fwscanf(FILE *, const wchar_t *, ...);
+extern int iswalnum(wint_t);
+extern int iswalpha(wint_t);
+extern int iswcntrl(wint_t);
+extern int iswdigit(wint_t);
+extern int iswgraph(wint_t);
+extern int iswlower(wint_t);
+extern int iswprint(wint_t);
+extern int iswpunct(wint_t);
+extern int iswspace(wint_t);
+extern int iswupper(wint_t);
+extern int iswxdigit(wint_t);
+extern int iswctype(wint_t, wctype_t);
+extern wint_t fgetwc(FILE *);
+extern wchar_t *fgetws(wchar_t *, int, FILE *);
+extern wint_t fputwc(wchar_t, FILE *);
+extern int fputws(const wchar_t *, FILE *);
+extern int fwide(FILE *, int);
+extern wint_t getwc(FILE *);
+extern wint_t getwchar(void);
+extern int mbsinit(const mbstate_t *);
+extern size_t mbrlen(const char *, size_t, mbstate_t *);
+extern size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
+extern size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
+extern size_t mbstowcs(wchar_t *, const char *, size_t);
+extern wint_t putwc(wchar_t, FILE *);
+extern wint_t putwchar(wchar_t);
+extern int swprintf(wchar_t *, size_t, const wchar_t *, ...);
+extern int swscanf(const wchar_t *, const wchar_t *, ...);
+extern wint_t towlower(wint_t);
+extern wint_t towupper(wint_t);
+extern wint_t ungetwc(wint_t, FILE *);
+extern int vfwprintf(FILE *, const wchar_t *, va_list);
+extern int vwprintf(const wchar_t *, va_list);
+extern int vswprintf(wchar_t *, size_t, const wchar_t *, va_list);
+extern size_t wcrtomb(char *, wchar_t, mbstate_t *);
+extern wchar_t *wcscat(wchar_t *, const wchar_t *);
+extern wchar_t *wcschr(const wchar_t *, wchar_t);
+extern int wcscmp(const wchar_t *, const wchar_t *);
+extern int wcscoll(const wchar_t *, const wchar_t *);
+extern wchar_t *wcscpy(wchar_t *, const wchar_t *);
+extern size_t wcscspn(const wchar_t *, const wchar_t *);
+extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
+extern size_t wcslen(const wchar_t *);
+extern wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
+extern int wcsncmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsrchr(const wchar_t *, wchar_t);
+extern size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
+extern size_t wcsspn(const wchar_t *, const wchar_t *);
+extern wchar_t *wcsstr(const wchar_t *, const wchar_t *);
+extern double wcstod(const wchar_t *, wchar_t **);
+extern wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **);
+extern long int wcstol(const wchar_t *, wchar_t **, int);
+extern size_t wcstombs(char *, const wchar_t *, size_t);
+extern unsigned long int wcstoul(const wchar_t *, wchar_t **, int);
+extern wchar_t *wcswcs(const wchar_t *, const wchar_t *);
+extern int wcswidth(const wchar_t *, size_t);
+extern size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
+extern int wctob(wint_t);
+extern wctype_t wctype(const char *);
+extern int wcwidth(wchar_t);
+extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
+extern int wmemcmp(const wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
+extern wchar_t *wmemset(wchar_t *, wchar_t, size_t);
+extern int wprintf(const wchar_t *, ...);
+extern int wscanf(const wchar_t *, ...);
+
+/* No really supported. These are just for making libstdc++-v3 happy. */
+typedef void *wctrans_t;
+extern wint_t towctrans(wint_t, wctrans_t);
+extern wctrans_t wctrans (const char *);
+
+__END_DECLS
+
+#endif /* _WCHAR_H_ */
diff --git a/6/platforms/android-9/arch-x86/usr/include/wctype.h b/6/platforms/android-9/arch-x86/usr/include/wctype.h
new file mode 120000
index 0000000..55c2a0c
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/wctype.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/wctype.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/zconf.h b/6/platforms/android-9/arch-x86/usr/include/zconf.h
new file mode 120000
index 0000000..db092cb
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/zconf.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/zconf.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/include/zlib.h b/6/platforms/android-9/arch-x86/usr/include/zlib.h
new file mode 120000
index 0000000..15dd29b
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/include/zlib.h
@@ -0,0 +1 @@
+../../../../../platforms/android-8/arch-x86/usr/include/zlib.h \ No newline at end of file
diff --git a/6/platforms/android-9/arch-x86/usr/lib/crtbegin_dynamic.o b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_dynamic.o
new file mode 100644
index 0000000..17704f5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_dynamic.o
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/crtbegin_so.o b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_so.o
new file mode 100644
index 0000000..cf50f1d
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_so.o
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/crtbegin_static.o b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_static.o
new file mode 100644
index 0000000..17704f5
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/crtbegin_static.o
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/crtend_android.o b/6/platforms/android-9/arch-x86/usr/lib/crtend_android.o
new file mode 100644
index 0000000..87716a0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/crtend_android.o
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/crtend_so.o b/6/platforms/android-9/arch-x86/usr/lib/crtend_so.o
new file mode 100644
index 0000000..4c4460f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/crtend_so.o
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libEGL.so b/6/platforms/android-9/arch-x86/usr/lib/libEGL.so
new file mode 100755
index 0000000..49020a9
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libEGL.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libGLESv1_CM.so b/6/platforms/android-9/arch-x86/usr/lib/libGLESv1_CM.so
new file mode 100755
index 0000000..83ddd59
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libGLESv1_CM.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libGLESv2.so b/6/platforms/android-9/arch-x86/usr/lib/libGLESv2.so
new file mode 100755
index 0000000..7c72567
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libGLESv2.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libOpenSLES.so b/6/platforms/android-9/arch-x86/usr/lib/libOpenSLES.so
new file mode 100755
index 0000000..de81e57
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libOpenSLES.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libandroid.so b/6/platforms/android-9/arch-x86/usr/lib/libandroid.so
new file mode 100755
index 0000000..419d414
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libandroid.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libc.a b/6/platforms/android-9/arch-x86/usr/lib/libc.a
new file mode 100644
index 0000000..90220b0
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libc.a
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libc.so b/6/platforms/android-9/arch-x86/usr/lib/libc.so
new file mode 100755
index 0000000..fd6c188
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libc.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libdl.so b/6/platforms/android-9/arch-x86/usr/lib/libdl.so
new file mode 100755
index 0000000..c31fd46
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libdl.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libjnigraphics.so b/6/platforms/android-9/arch-x86/usr/lib/libjnigraphics.so
new file mode 100755
index 0000000..2a0494f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libjnigraphics.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/liblog.so b/6/platforms/android-9/arch-x86/usr/lib/liblog.so
new file mode 100755
index 0000000..6ab1fd2
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/liblog.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libm.a b/6/platforms/android-9/arch-x86/usr/lib/libm.a
new file mode 100644
index 0000000..34f3c1f
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libm.a
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libm.so b/6/platforms/android-9/arch-x86/usr/lib/libm.so
new file mode 100755
index 0000000..78c3def
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libm.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libstdc++.a b/6/platforms/android-9/arch-x86/usr/lib/libstdc++.a
new file mode 100644
index 0000000..336bcfa
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libstdc++.a
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libstdc++.so b/6/platforms/android-9/arch-x86/usr/lib/libstdc++.so
new file mode 100755
index 0000000..248dc48
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libstdc++.so
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libthread_db.a b/6/platforms/android-9/arch-x86/usr/lib/libthread_db.a
new file mode 100644
index 0000000..9525ff1
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libthread_db.a
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libz.a b/6/platforms/android-9/arch-x86/usr/lib/libz.a
new file mode 100644
index 0000000..5c91867
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libz.a
Binary files differ
diff --git a/6/platforms/android-9/arch-x86/usr/lib/libz.so b/6/platforms/android-9/arch-x86/usr/lib/libz.so
new file mode 100755
index 0000000..384e8c4
--- /dev/null
+++ b/6/platforms/android-9/arch-x86/usr/lib/libz.so
Binary files differ
diff --git a/6/sources/cxx-stl/gnu-libstdc++/README b/6/sources/cxx-stl/gnu-libstdc++/README
new file mode 100644
index 0000000..c513208
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/README
@@ -0,0 +1,10 @@
+This directory contains the headers and prebuilt binaries for the
+GNU libstdc++-v3 C++ Standard Template Library implementation.
+
+These are generated from the toolchain sources by the rebuild-all-prebuilt.sh
+script under build/tools.
+
+To use it, define APP_STL to 'gnustl_static' in your Application.mk.
+See docs/CPLUSPLUS-SUPPORT.html for more details.
+
+This implementation fully supports C++ exceptions and RTTI.
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/algorithm b/6/sources/cxx-stl/gnu-libstdc++/include/algorithm
new file mode 100644
index 0000000..cb8488c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/algorithm
@@ -0,0 +1,68 @@
+// <algorithm> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/algorithm
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ALGORITHM
+#define _GLIBCXX_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/stl_algo.h>
+
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algorithm>
+#endif
+
+#endif /* _GLIBCXX_ALGORITHM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/array b/6/sources/cxx-stl/gnu-libstdc++/include/array
new file mode 100644
index 0000000..70e7756
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/array
@@ -0,0 +1,60 @@
+// <array> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/array
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ARRAY
+#define _GLIBCXX_ARRAY 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <bits/stl_algobase.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/array>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/array>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_ARRAY
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/auto_ptr.h b/6/sources/cxx-stl/gnu-libstdc++/include/backward/auto_ptr.h
new file mode 100644
index 0000000..4554d7a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/auto_ptr.h
@@ -0,0 +1,292 @@
+// auto_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file backward/auto_ptr.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_AUTO_PTR_H
+#define _STL_AUTO_PTR_H 1
+
+#include <bits/c++config.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * A wrapper class to provide auto_ptr with reference semantics.
+ * For example, an auto_ptr can be assigned (or constructed from)
+ * the result of a function which returns an auto_ptr by value.
+ *
+ * All the auto_ptr_ref stuff should happen behind the scenes.
+ */
+ template<typename _Tp1>
+ struct auto_ptr_ref
+ {
+ _Tp1* _M_ptr;
+
+ explicit
+ auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+
+ /**
+ * @brief A simple smart pointer providing strict ownership semantics.
+ *
+ * The Standard says:
+ * <pre>
+ * An @c auto_ptr owns the object it holds a pointer to. Copying
+ * an @c auto_ptr copies the pointer and transfers ownership to the
+ * destination. If more than one @c auto_ptr owns the same object
+ * at the same time the behavior of the program is undefined.
+ *
+ * The uses of @c auto_ptr include providing temporary
+ * exception-safety for dynamically allocated memory, passing
+ * ownership of dynamically allocated memory to a function, and
+ * returning dynamically allocated memory from a function. @c
+ * auto_ptr does not meet the CopyConstructible and Assignable
+ * requirements for Standard Library <a
+ * href="tables.html#65">container</a> elements and thus
+ * instantiating a Standard Library container with an @c auto_ptr
+ * results in undefined behavior.
+ * </pre>
+ * Quoted from [20.4.5]/3.
+ *
+ * Good examples of what can and cannot be done with auto_ptr can
+ * be found in the libstdc++ testsuite.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * 127. auto_ptr<> conversion issues
+ * These resolutions have all been incorporated.
+ */
+ template<typename _Tp>
+ class auto_ptr
+ {
+ private:
+ _Tp* _M_ptr;
+
+ public:
+ /// The pointed-to type.
+ typedef _Tp element_type;
+
+ /**
+ * @brief An %auto_ptr is usually constructed from a raw pointer.
+ * @param p A pointer (defaults to NULL).
+ *
+ * This object now @e owns the object pointed to by @a p.
+ */
+ explicit
+ auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
+
+ /**
+ * @brief An %auto_ptr can be constructed from another %auto_ptr.
+ * @param a Another %auto_ptr of the same type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership.
+ */
+ auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
+
+ /**
+ * @brief An %auto_ptr can be constructed from another %auto_ptr.
+ * @param a Another %auto_ptr of a different but related type.
+ *
+ * A pointer-to-Tp1 must be convertible to a
+ * pointer-to-Tp/element_type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership.
+ */
+ template<typename _Tp1>
+ auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
+
+ /**
+ * @brief %auto_ptr assignment operator.
+ * @param a Another %auto_ptr of the same type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership. The object that this one @e
+ * used to own and track has been deleted.
+ */
+ auto_ptr&
+ operator=(auto_ptr& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+
+ /**
+ * @brief %auto_ptr assignment operator.
+ * @param a Another %auto_ptr of a different but related type.
+ *
+ * A pointer-to-Tp1 must be convertible to a pointer-to-Tp/element_type.
+ *
+ * This object now @e owns the object previously owned by @a a,
+ * which has given up ownership. The object that this one @e
+ * used to own and track has been deleted.
+ */
+ template<typename _Tp1>
+ auto_ptr&
+ operator=(auto_ptr<_Tp1>& __a) throw()
+ {
+ reset(__a.release());
+ return *this;
+ }
+
+ /**
+ * When the %auto_ptr goes out of scope, the object it owns is
+ * deleted. If it no longer owns anything (i.e., @c get() is
+ * @c NULL), then this has no effect.
+ *
+ * The C++ standard says there is supposed to be an empty throw
+ * specification here, but omitting it is standard conforming. Its
+ * presence can be detected only if _Tp::~_Tp() throws, but this is
+ * prohibited. [17.4.3.6]/2
+ */
+ ~auto_ptr() { delete _M_ptr; }
+
+ /**
+ * @brief Smart pointer dereferencing.
+ *
+ * If this %auto_ptr no longer owns anything, then this
+ * operation will crash. (For a smart pointer, "no longer owns
+ * anything" is the same as being a null pointer, and you know
+ * what happens when you dereference one of those...)
+ */
+ element_type&
+ operator*() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
+
+ /**
+ * @brief Smart pointer dereferencing.
+ *
+ * This returns the pointer itself, which the language then will
+ * automatically cause to be dereferenced.
+ */
+ element_type*
+ operator->() const throw()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
+
+ /**
+ * @brief Bypassing the smart pointer.
+ * @return The raw pointer being managed.
+ *
+ * You can get a copy of the pointer that this object owns, for
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
+ *
+ * @note This %auto_ptr still owns the memory.
+ */
+ element_type*
+ get() const throw() { return _M_ptr; }
+
+ /**
+ * @brief Bypassing the smart pointer.
+ * @return The raw pointer being managed.
+ *
+ * You can get a copy of the pointer that this object owns, for
+ * situations such as passing to a function which only accepts
+ * a raw pointer.
+ *
+ * @note This %auto_ptr no longer owns the memory. When this object
+ * goes out of scope, nothing will happen.
+ */
+ element_type*
+ release() throw()
+ {
+ element_type* __tmp = _M_ptr;
+ _M_ptr = 0;
+ return __tmp;
+ }
+
+ /**
+ * @brief Forcibly deletes the managed object.
+ * @param p A pointer (defaults to NULL).
+ *
+ * This object now @e owns the object pointed to by @a p. The
+ * previous object has been deleted.
+ */
+ void
+ reset(element_type* __p = 0) throw()
+ {
+ if (__p != _M_ptr)
+ {
+ delete _M_ptr;
+ _M_ptr = __p;
+ }
+ }
+
+ /**
+ * @brief Automatic conversions
+ *
+ * These operations convert an %auto_ptr into and from an auto_ptr_ref
+ * automatically as needed. This allows constructs such as
+ * @code
+ * auto_ptr<Derived> func_returning_auto_ptr(.....);
+ * ...
+ * auto_ptr<Base> ptr = func_returning_auto_ptr(.....);
+ * @endcode
+ */
+ auto_ptr(auto_ptr_ref<element_type> __ref) throw()
+ : _M_ptr(__ref._M_ptr) { }
+
+ auto_ptr&
+ operator=(auto_ptr_ref<element_type> __ref) throw()
+ {
+ if (__ref._M_ptr != this->get())
+ {
+ delete _M_ptr;
+ _M_ptr = __ref._M_ptr;
+ }
+ return *this;
+ }
+
+ template<typename _Tp1>
+ operator auto_ptr_ref<_Tp1>() throw()
+ { return auto_ptr_ref<_Tp1>(this->release()); }
+
+ template<typename _Tp1>
+ operator auto_ptr<_Tp1>() throw()
+ { return auto_ptr<_Tp1>(this->release()); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 541. shared_ptr template assignment and void
+ template<>
+ class auto_ptr<void>
+ {
+ public:
+ typedef void element_type;
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_AUTO_PTR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/backward_warning.h b/6/sources/cxx-stl/gnu-libstdc++/include/backward/backward_warning.h
new file mode 100644
index 0000000..53df521
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/backward_warning.h
@@ -0,0 +1,56 @@
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef _BACKWARD_BACKWARD_WARNING_H
+#define _BACKWARD_BACKWARD_WARNING_H 1
+
+#ifdef __DEPRECATED
+#warning \
+ This file includes at least one deprecated or antiquated header which \
+ may be removed without further notice at a future date. Please use a \
+ non-deprecated interface with equivalent functionality instead. For a \
+ listing of replacement headers and interfaces, consult the file \
+ backward_warning.h. To disable this warning use -Wno-deprecated.
+
+/*
+ A list of valid replacements is as follows:
+
+ Use: Instead of:
+ <sstream>, basic_stringbuf <strstream>, strstreambuf
+ <sstream>, basic_istringstream <strstream>, istrstream
+ <sstream>, basic_ostringstream <strstream>, ostrstream
+ <sstream>, basic_stringstream <strstream>, strstream
+ <unordered_set>, unordered_set <ext/hash_set>, hash_set
+ <unordered_set>, unordered_multiset <ext/hash_set>, hash_multiset
+ <unordered_map>, unordered_map <ext/hash_map>, hash_map
+ <unordered_map>, unordered_multimap <ext/hash_map>, hash_multimap
+ <functional>, bind <functional>, binder1st
+ <functional>, bind <functional>, binder2nd
+ <functional>, bind <functional>, bind1st
+ <functional>, bind <functional>, bind2nd
+ <memory>, unique_ptr <memory>, auto_ptr
+*/
+
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/binders.h b/6/sources/cxx-stl/gnu-libstdc++/include/backward/binders.h
new file mode 100644
index 0000000..9b059ce
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/binders.h
@@ -0,0 +1,168 @@
+// Functor implementations -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file backward/binders.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BINDERS_H
+#define _GLIBCXX_BINDERS_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 20.3.6 binders
+ /** @defgroup binders Binder Classes
+ * @ingroup functors
+ *
+ * Binders turn functions/functors with two arguments into functors with
+ * a single argument, storing an argument to be applied later. For
+ * example, a variable @c B of type @c binder1st is constructed from a
+ * functor @c f and an argument @c x. Later, B's @c operator() is called
+ * with a single argument @c y. The return value is the value of @c f(x,y).
+ * @c B can be "called" with various arguments (y1, y2, ...) and will in
+ * turn call @c f(x,y1), @c f(x,y2), ...
+ *
+ * The function @c bind1st is provided to save some typing. It takes the
+ * function and an argument as parameters, and returns an instance of
+ * @c binder1st.
+ *
+ * The type @c binder2nd and its creator function @c bind2nd do the same
+ * thing, but the stored argument is passed as the second parameter instead
+ * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
+ * functor whose @c operator() accepts a floating-point number, subtracts
+ * 1.3 from it, and returns the result. (If @c bind1st had been used,
+ * the functor would perform "1.3 - x" instead.
+ *
+ * Creator-wrapper functions like @c bind1st are intended to be used in
+ * calling algorithms. Their return values will be temporary objects.
+ * (The goal is to not require you to type names like
+ * @c std::binder1st<std::plus<int>> for declaring a variable to hold the
+ * return value from @c bind1st(std::plus<int>,5).
+ *
+ * These become more useful when combined with the composition functions.
+ *
+ * @{
+ */
+ /// One of the @link binders binder functors@endlink.
+ template<typename _Operation>
+ class binder1st
+ : public unary_function<typename _Operation::second_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::first_argument_type value;
+
+ public:
+ binder1st(const _Operation& __x,
+ const typename _Operation::first_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ typename _Operation::result_type
+ operator()(const typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::second_argument_type& __x) const
+ { return op(value, __x); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ /// One of the @link binders binder functors@endlink.
+ template<typename _Operation, typename _Tp>
+ inline binder1st<_Operation>
+ bind1st(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::first_argument_type _Arg1_type;
+ return binder1st<_Operation>(__fn, _Arg1_type(__x));
+ }
+
+ /// One of the @link binders binder functors@endlink.
+ template<typename _Operation>
+ class binder2nd
+ : public unary_function<typename _Operation::first_argument_type,
+ typename _Operation::result_type>
+ {
+ protected:
+ _Operation op;
+ typename _Operation::second_argument_type value;
+
+ public:
+ binder2nd(const _Operation& __x,
+ const typename _Operation::second_argument_type& __y)
+ : op(__x), value(__y) { }
+
+ typename _Operation::result_type
+ operator()(const typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 109. Missing binders for non-const sequence elements
+ typename _Operation::result_type
+ operator()(typename _Operation::first_argument_type& __x) const
+ { return op(__x, value); }
+ } _GLIBCXX_DEPRECATED_ATTR;
+
+ /// One of the @link binders binder functors@endlink.
+ template<typename _Operation, typename _Tp>
+ inline binder2nd<_Operation>
+ bind2nd(const _Operation& __fn, const _Tp& __x)
+ {
+ typedef typename _Operation::second_argument_type _Arg2_type;
+ return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+ }
+ /** @} */
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_BINDERS_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_fun.h b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_fun.h
new file mode 100644
index 0000000..8cc7a42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_fun.h
@@ -0,0 +1,167 @@
+// 'struct hash' from SGI -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996-1998
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hash_fun.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_FUN_H
+#define _HASH_FUN_H 1
+
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+
+ template<class _Key>
+ struct hash { };
+
+ inline size_t
+ __stl_hash_string(const char* __s)
+ {
+ unsigned long __h = 0;
+ for ( ; *__s; ++__s)
+ __h = 5 * __h + *__s;
+ return size_t(__h);
+ }
+
+ template<>
+ struct hash<char*>
+ {
+ size_t
+ operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<>
+ struct hash<const char*>
+ {
+ size_t
+ operator()(const char* __s) const
+ { return __stl_hash_string(__s); }
+ };
+
+ template<>
+ struct hash<char>
+ {
+ size_t
+ operator()(char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned char>
+ {
+ size_t
+ operator()(unsigned char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<signed char>
+ {
+ size_t
+ operator()(unsigned char __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<short>
+ {
+ size_t
+ operator()(short __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned short>
+ {
+ size_t
+ operator()(unsigned short __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<int>
+ {
+ size_t
+ operator()(int __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned int>
+ {
+ size_t
+ operator()(unsigned int __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<long>
+ {
+ size_t
+ operator()(long __x) const
+ { return __x; }
+ };
+
+ template<>
+ struct hash<unsigned long>
+ {
+ size_t
+ operator()(unsigned long __x) const
+ { return __x; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_map b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_map
new file mode 100644
index 0000000..7f5c2c5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_map
@@ -0,0 +1,593 @@
+// Hashing map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hash_map
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_MAP
+#define _HASH_MAP 1
+
+#ifndef _GLIBCXX_PERMIT_BACKWARD_HASH
+#include "backward_warning.h"
+#endif
+
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Select1st;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp, class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
+ class hash_map
+ {
+ private:
+ typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >,
+ _EqualKey, _Alloc> _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_map()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_map(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_map& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_unique_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ _Tp&
+ operator[](const key_type& __key)
+ { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator==(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator!=(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp,
+ class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>,
+ class _Alloc = allocator<_Tp> >
+ class hash_multimap
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFn, size_t, _Key, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
+ _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multimap()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multimap(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multimap& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_map
+ // and hash_multimap.
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++() { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_set b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_set
new file mode 100644
index 0000000..8e365bd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hash_set
@@ -0,0 +1,561 @@
+// Hashing set implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hash_set
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_SET
+#define _HASH_SET 1
+
+#ifndef _GLIBCXX_PERMIT_BACKWARD_HASH
+#include "backward_warning.h"
+#endif
+
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Identity;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value, class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_set
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_set()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_set(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_set& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_set<_Val, _HF, _EqK, _Al>&,
+ const hash_set<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p = _M_ht.insert_unique(__obj);
+ return pair<iterator,bool>(__p.first, __p.second);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p
+ = _M_ht.insert_unique_noresize(__obj);
+ return pair<iterator, bool>(__p.first, __p.second);
+ }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value,
+ class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_multiset
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multiset()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multiset(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multiset& hs)
+ { _M_ht.swap(hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multiset<_Val, _HF, _EqK, _Al>&,
+ const hash_multiset<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_set
+ // and hash_multiset.
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int) { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/hashtable.h b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hashtable.h
new file mode 100644
index 0000000..4d74eaf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/hashtable.h
@@ -0,0 +1,1147 @@
+// Hashtable implementation used by containers -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hashtable.h
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
+
+#include <vector>
+#include <iterator>
+#include <algorithm>
+#include <bits/stl_function.h>
+#include <backward/hash_fun.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+ using std::forward_iterator_tag;
+ using std::input_iterator_tag;
+ using std::_Construct;
+ using std::_Destroy;
+ using std::distance;
+ using std::vector;
+ using std::pair;
+ using std::__iterator_category;
+
+ template<class _Val>
+ struct _Hashtable_node
+ {
+ _Hashtable_node* _M_next;
+ _Val _M_val;
+ };
+
+ template<class _Val, class _Key, class _HashFcn, class _ExtractKey,
+ class _EqualKey, class _Alloc = std::allocator<_Val> >
+ class hashtable;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_iterator;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_const_iterator;
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_iterator
+ {
+ typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _Val& reference;
+ typedef _Val* pointer;
+
+ _Node* _M_cur;
+ _Hashtable* _M_ht;
+
+ _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) { }
+
+ _Hashtable_iterator()
+ : _M_cur(0), _M_ht(0) { }
+
+ reference
+ operator*() const
+ { return _M_cur->_M_val; }
+
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ iterator&
+ operator++();
+
+ iterator
+ operator++(int);
+
+ bool
+ operator==(const iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+
+ bool
+ operator!=(const iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+ };
+
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ struct _Hashtable_const_iterator
+ {
+ typedef hashtable<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>
+ _Hashtable;
+ typedef _Hashtable_iterator<_Val,_Key,_HashFcn,
+ _ExtractKey,_EqualKey,_Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn,
+ _ExtractKey, _EqualKey, _Alloc>
+ const_iterator;
+ typedef _Hashtable_node<_Val> _Node;
+
+ typedef forward_iterator_tag iterator_category;
+ typedef _Val value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef const _Val& reference;
+ typedef const _Val* pointer;
+
+ const _Node* _M_cur;
+ const _Hashtable* _M_ht;
+
+ _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+ : _M_cur(__n), _M_ht(__tab) { }
+
+ _Hashtable_const_iterator() { }
+
+ _Hashtable_const_iterator(const iterator& __it)
+ : _M_cur(__it._M_cur), _M_ht(__it._M_ht) { }
+
+ reference
+ operator*() const
+ { return _M_cur->_M_val; }
+
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ const_iterator&
+ operator++();
+
+ const_iterator
+ operator++(int);
+
+ bool
+ operator==(const const_iterator& __it) const
+ { return _M_cur == __it._M_cur; }
+
+ bool
+ operator!=(const const_iterator& __it) const
+ { return _M_cur != __it._M_cur; }
+ };
+
+ // Note: assumes long is at least 32 bits.
+ enum { _S_num_primes = 29 };
+
+ static const unsigned long __stl_prime_list[_S_num_primes] =
+ {
+ 5ul, 53ul, 97ul, 193ul, 389ul,
+ 769ul, 1543ul, 3079ul, 6151ul, 12289ul,
+ 24593ul, 49157ul, 98317ul, 196613ul, 393241ul,
+ 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul,
+ 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul,
+ 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul
+ };
+
+ inline unsigned long
+ __stl_next_prime(unsigned long __n)
+ {
+ const unsigned long* __first = __stl_prime_list;
+ const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+ const unsigned long* pos = std::lower_bound(__first, __last, __n);
+ return pos == __last ? *(__last - 1) : *pos;
+ }
+
+ // Forward declaration of operator==.
+ template<class _Val, class _Key, class _HF, class _Ex,
+ class _Eq, class _All>
+ class hashtable;
+
+ template<class _Val, class _Key, class _HF, class _Ex,
+ class _Eq, class _All>
+ bool
+ operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2);
+
+ // Hashtables handle allocators a bit differently than other
+ // containers do. If we're using standard-conforming allocators, then
+ // a hashtable unconditionally has a member variable to hold its
+ // allocator, even if it so happens that all instances of the
+ // allocator type are identical. This is because, for hashtables,
+ // this extra storage is negligible. Additionally, a base class
+ // wouldn't serve any other purposes; it wouldn't, for example,
+ // simplify the exception-handling code.
+ template<class _Val, class _Key, class _HashFcn,
+ class _ExtractKey, class _EqualKey, class _Alloc>
+ class hashtable
+ {
+ public:
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef _HashFcn hasher;
+ typedef _EqualKey key_equal;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ hasher
+ hash_funct() const
+ { return _M_hash; }
+
+ key_equal
+ key_eq() const
+ { return _M_equals; }
+
+ private:
+ typedef _Hashtable_node<_Val> _Node;
+
+ public:
+ typedef typename _Alloc::template rebind<value_type>::other allocator_type;
+ allocator_type
+ get_allocator() const
+ { return _M_node_allocator; }
+
+ private:
+ typedef typename _Alloc::template rebind<_Node>::other _Node_Alloc;
+ typedef typename _Alloc::template rebind<_Node*>::other _Nodeptr_Alloc;
+ typedef vector<_Node*, _Nodeptr_Alloc> _Vector_type;
+
+ _Node_Alloc _M_node_allocator;
+
+ _Node*
+ _M_get_node()
+ { return _M_node_allocator.allocate(1); }
+
+ void
+ _M_put_node(_Node* __p)
+ { _M_node_allocator.deallocate(__p, 1); }
+
+ private:
+ hasher _M_hash;
+ key_equal _M_equals;
+ _ExtractKey _M_get_key;
+ _Vector_type _M_buckets;
+ size_type _M_num_elements;
+
+ public:
+ typedef _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>
+ iterator;
+ typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>
+ const_iterator;
+
+ friend struct
+ _Hashtable_iterator<_Val, _Key, _HashFcn, _ExtractKey, _EqualKey, _Alloc>;
+
+ friend struct
+ _Hashtable_const_iterator<_Val, _Key, _HashFcn, _ExtractKey,
+ _EqualKey, _Alloc>;
+
+ public:
+ hashtable(size_type __n, const _HashFcn& __hf,
+ const _EqualKey& __eql, const _ExtractKey& __ext,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+ _M_get_key(__ext), _M_buckets(__a), _M_num_elements(0)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(size_type __n, const _HashFcn& __hf,
+ const _EqualKey& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_node_allocator(__a), _M_hash(__hf), _M_equals(__eql),
+ _M_get_key(_ExtractKey()), _M_buckets(__a), _M_num_elements(0)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(const hashtable& __ht)
+ : _M_node_allocator(__ht.get_allocator()), _M_hash(__ht._M_hash),
+ _M_equals(__ht._M_equals), _M_get_key(__ht._M_get_key),
+ _M_buckets(__ht.get_allocator()), _M_num_elements(0)
+ { _M_copy_from(__ht); }
+
+ hashtable&
+ operator= (const hashtable& __ht)
+ {
+ if (&__ht != this)
+ {
+ clear();
+ _M_hash = __ht._M_hash;
+ _M_equals = __ht._M_equals;
+ _M_get_key = __ht._M_get_key;
+ _M_copy_from(__ht);
+ }
+ return *this;
+ }
+
+ ~hashtable()
+ { clear(); }
+
+ size_type
+ size() const
+ { return _M_num_elements; }
+
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ bool
+ empty() const
+ { return size() == 0; }
+
+ void
+ swap(hashtable& __ht)
+ {
+ std::swap(_M_hash, __ht._M_hash);
+ std::swap(_M_equals, __ht._M_equals);
+ std::swap(_M_get_key, __ht._M_get_key);
+ _M_buckets.swap(__ht._M_buckets);
+ std::swap(_M_num_elements, __ht._M_num_elements);
+ }
+
+ iterator
+ begin()
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ iterator
+ end()
+ { return iterator(0, this); }
+
+ const_iterator
+ begin() const
+ {
+ for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+ if (_M_buckets[__n])
+ return const_iterator(_M_buckets[__n], this);
+ return end();
+ }
+
+ const_iterator
+ end() const
+ { return const_iterator(0, this); }
+
+ template<class _Vl, class _Ky, class _HF, class _Ex, class _Eq,
+ class _Al>
+ friend bool
+ operator==(const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+ const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+
+ public:
+ size_type
+ bucket_count() const
+ { return _M_buckets.size(); }
+
+ size_type
+ max_bucket_count() const
+ { return __stl_prime_list[(int)_S_num_primes - 1]; }
+
+ size_type
+ elems_in_bucket(size_type __bucket) const
+ {
+ size_type __result = 0;
+ for (_Node* __n = _M_buckets[__bucket]; __n; __n = __n->_M_next)
+ __result += 1;
+ return __result;
+ }
+
+ pair<iterator, bool>
+ insert_unique(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_unique_noresize(__obj);
+ }
+
+ iterator
+ insert_equal(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+ return insert_equal_noresize(__obj);
+ }
+
+ pair<iterator, bool>
+ insert_unique_noresize(const value_type& __obj);
+
+ iterator
+ insert_equal_noresize(const value_type& __obj);
+
+ template<class _InputIterator>
+ void
+ insert_unique(_InputIterator __f, _InputIterator __l)
+ { insert_unique(__f, __l, __iterator_category(__f)); }
+
+ template<class _InputIterator>
+ void
+ insert_equal(_InputIterator __f, _InputIterator __l)
+ { insert_equal(__f, __l, __iterator_category(__f)); }
+
+ template<class _InputIterator>
+ void
+ insert_unique(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_unique(*__f);
+ }
+
+ template<class _InputIterator>
+ void
+ insert_equal(_InputIterator __f, _InputIterator __l,
+ input_iterator_tag)
+ {
+ for ( ; __f != __l; ++__f)
+ insert_equal(*__f);
+ }
+
+ template<class _ForwardIterator>
+ void
+ insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ template<class _ForwardIterator>
+ void
+ insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+ forward_iterator_tag)
+ {
+ size_type __n = distance(__f, __l);
+ resize(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+
+ reference
+ find_or_insert(const value_type& __obj);
+
+ iterator
+ find(const key_type& __key)
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ _Node* __first;
+ for (__first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ { }
+ return iterator(__first, this);
+ }
+
+ const_iterator
+ find(const key_type& __key) const
+ {
+ size_type __n = _M_bkt_num_key(__key);
+ const _Node* __first;
+ for (__first = _M_buckets[__n];
+ __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+ __first = __first->_M_next)
+ { }
+ return const_iterator(__first, this);
+ }
+
+ size_type
+ count(const key_type& __key) const
+ {
+ const size_type __n = _M_bkt_num_key(__key);
+ size_type __result = 0;
+
+ for (const _Node* __cur = _M_buckets[__n]; __cur;
+ __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), __key))
+ ++__result;
+ return __result;
+ }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key);
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const;
+
+ size_type
+ erase(const key_type& __key);
+
+ void
+ erase(const iterator& __it);
+
+ void
+ erase(iterator __first, iterator __last);
+
+ void
+ erase(const const_iterator& __it);
+
+ void
+ erase(const_iterator __first, const_iterator __last);
+
+ void
+ resize(size_type __num_elements_hint);
+
+ void
+ clear();
+
+ private:
+ size_type
+ _M_next_size(size_type __n) const
+ { return __stl_next_prime(__n); }
+
+ void
+ _M_initialize_buckets(size_type __n)
+ {
+ const size_type __n_buckets = _M_next_size(__n);
+ _M_buckets.reserve(__n_buckets);
+ _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+ _M_num_elements = 0;
+ }
+
+ size_type
+ _M_bkt_num_key(const key_type& __key) const
+ { return _M_bkt_num_key(__key, _M_buckets.size()); }
+
+ size_type
+ _M_bkt_num(const value_type& __obj) const
+ { return _M_bkt_num_key(_M_get_key(__obj)); }
+
+ size_type
+ _M_bkt_num_key(const key_type& __key, size_t __n) const
+ { return _M_hash(__key) % __n; }
+
+ size_type
+ _M_bkt_num(const value_type& __obj, size_t __n) const
+ { return _M_bkt_num_key(_M_get_key(__obj), __n); }
+
+ _Node*
+ _M_new_node(const value_type& __obj)
+ {
+ _Node* __n = _M_get_node();
+ __n->_M_next = 0;
+ __try
+ {
+ this->get_allocator().construct(&__n->_M_val, __obj);
+ return __n;
+ }
+ __catch(...)
+ {
+ _M_put_node(__n);
+ __throw_exception_again;
+ }
+ }
+
+ void
+ _M_delete_node(_Node* __n)
+ {
+ this->get_allocator().destroy(&__n->_M_val);
+ _M_put_node(__n);
+ }
+
+ void
+ _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+
+ void
+ _M_erase_bucket(const size_type __n, _Node* __last);
+
+ void
+ _M_copy_from(const hashtable& __ht);
+ };
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++()
+ {
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur)
+ {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ inline _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+ _Hashtable_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++(int)
+ {
+ iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>&
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++()
+ {
+ const _Node* __old = _M_cur;
+ _M_cur = _M_cur->_M_next;
+ if (!_M_cur)
+ {
+ size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+ while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+ _M_cur = _M_ht->_M_buckets[__bucket];
+ }
+ return *this;
+ }
+
+ template<class _Val, class _Key, class _HF, class _ExK, class _EqK,
+ class _All>
+ inline _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>
+ _Hashtable_const_iterator<_Val, _Key, _HF, _ExK, _EqK, _All>::
+ operator++(int)
+ {
+ const_iterator __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ bool
+ operator==(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+ {
+ typedef typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::_Node _Node;
+
+ if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+ return false;
+
+ for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n)
+ {
+ _Node* __cur1 = __ht1._M_buckets[__n];
+ _Node* __cur2 = __ht2._M_buckets[__n];
+ // Check same length of lists
+ for (; __cur1 && __cur2;
+ __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+ { }
+ if (__cur1 || __cur2)
+ return false;
+ // Now check one's elements are in the other
+ for (__cur1 = __ht1._M_buckets[__n] ; __cur1;
+ __cur1 = __cur1->_M_next)
+ {
+ bool _found__cur1 = false;
+ for (__cur2 = __ht2._M_buckets[__n];
+ __cur2; __cur2 = __cur2->_M_next)
+ {
+ if (__cur1->_M_val == __cur2->_M_val)
+ {
+ _found__cur1 = true;
+ break;
+ }
+ }
+ if (!_found__cur1)
+ return false;
+ }
+ }
+ return true;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline bool
+ operator!=(const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht1,
+ const hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>& __ht2)
+ { return !(__ht1 == __ht2); }
+
+ template<class _Val, class _Key, class _HF, class _Extract, class _EqKey,
+ class _All>
+ inline void
+ swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+ hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2)
+ { __ht1.swap(__ht2); }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator, bool>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ insert_unique_noresize(const value_type& __obj)
+ {
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return pair<iterator, bool>(iterator(__cur, this), false);
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return pair<iterator, bool>(iterator(__tmp, this), true);
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ insert_equal_noresize(const value_type& __obj)
+ {
+ const size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ {
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __cur->_M_next;
+ __cur->_M_next = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+ }
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return iterator(__tmp, this);
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::reference
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ find_or_insert(const value_type& __obj)
+ {
+ resize(_M_num_elements + 1);
+
+ size_type __n = _M_bkt_num(__obj);
+ _Node* __first = _M_buckets[__n];
+
+ for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+ if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+ return __cur->_M_val;
+
+ _Node* __tmp = _M_new_node(__obj);
+ __tmp->_M_next = __first;
+ _M_buckets[__n] = __tmp;
+ ++_M_num_elements;
+ return __tmp->_M_val;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator,
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::iterator>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ equal_range(const key_type& __key)
+ {
+ typedef pair<iterator, iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (_Node* __first = _M_buckets[__n]; __first;
+ __first = __first->_M_next)
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ for (_Node* __cur = __first->_M_next; __cur;
+ __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(iterator(__first, this), iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(iterator(__first, this),
+ iterator(_M_buckets[__m], this));
+ return _Pii(iterator(__first, this), end());
+ }
+ return _Pii(end(), end());
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ pair<typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator,
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::const_iterator>
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ equal_range(const key_type& __key) const
+ {
+ typedef pair<const_iterator, const_iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (const _Node* __first = _M_buckets[__n]; __first;
+ __first = __first->_M_next)
+ {
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ for (const _Node* __cur = __first->_M_next; __cur;
+ __cur = __cur->_M_next)
+ if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+ return _Pii(const_iterator(__first, this),
+ const_iterator(__cur, this));
+ for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+ if (_M_buckets[__m])
+ return _Pii(const_iterator(__first, this),
+ const_iterator(_M_buckets[__m], this));
+ return _Pii(const_iterator(__first, this), end());
+ }
+ }
+ return _Pii(end(), end());
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ typename hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::size_type
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const key_type& __key)
+ {
+ const size_type __n = _M_bkt_num_key(__key);
+ _Node* __first = _M_buckets[__n];
+ _Node* __saved_slot = 0;
+ size_type __erased = 0;
+
+ if (__first)
+ {
+ _Node* __cur = __first;
+ _Node* __next = __cur->_M_next;
+ while (__next)
+ {
+ if (_M_equals(_M_get_key(__next->_M_val), __key))
+ {
+ if (&_M_get_key(__next->_M_val) != &__key)
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ ++__erased;
+ --_M_num_elements;
+ }
+ else
+ {
+ __saved_slot = __cur;
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ else
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ if (_M_equals(_M_get_key(__first->_M_val), __key))
+ {
+ _M_buckets[__n] = __first->_M_next;
+ _M_delete_node(__first);
+ ++__erased;
+ --_M_num_elements;
+ }
+ if (__saved_slot)
+ {
+ __next = __saved_slot->_M_next;
+ __saved_slot->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ ++__erased;
+ --_M_num_elements;
+ }
+ }
+ return __erased;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const iterator& __it)
+ {
+ _Node* __p = __it._M_cur;
+ if (__p)
+ {
+ const size_type __n = _M_bkt_num(__p->_M_val);
+ _Node* __cur = _M_buckets[__n];
+
+ if (__cur == __p)
+ {
+ _M_buckets[__n] = __cur->_M_next;
+ _M_delete_node(__cur);
+ --_M_num_elements;
+ }
+ else
+ {
+ _Node* __next = __cur->_M_next;
+ while (__next)
+ {
+ if (__next == __p)
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ --_M_num_elements;
+ break;
+ }
+ else
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ }
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(iterator __first, iterator __last)
+ {
+ size_type __f_bucket = __first._M_cur ? _M_bkt_num(__first._M_cur->_M_val)
+ : _M_buckets.size();
+
+ size_type __l_bucket = __last._M_cur ? _M_bkt_num(__last._M_cur->_M_val)
+ : _M_buckets.size();
+
+ if (__first._M_cur == __last._M_cur)
+ return;
+ else if (__f_bucket == __l_bucket)
+ _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+ else
+ {
+ _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+ for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+ _M_erase_bucket(__n, 0);
+ if (__l_bucket != _M_buckets.size())
+ _M_erase_bucket(__l_bucket, __last._M_cur);
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const_iterator __first, const_iterator __last)
+ {
+ erase(iterator(const_cast<_Node*>(__first._M_cur),
+ const_cast<hashtable*>(__first._M_ht)),
+ iterator(const_cast<_Node*>(__last._M_cur),
+ const_cast<hashtable*>(__last._M_ht)));
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ inline void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ erase(const const_iterator& __it)
+ { erase(iterator(const_cast<_Node*>(__it._M_cur),
+ const_cast<hashtable*>(__it._M_ht))); }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ resize(size_type __num_elements_hint)
+ {
+ const size_type __old_n = _M_buckets.size();
+ if (__num_elements_hint > __old_n)
+ {
+ const size_type __n = _M_next_size(__num_elements_hint);
+ if (__n > __old_n)
+ {
+ _Vector_type __tmp(__n, (_Node*)(0), _M_buckets.get_allocator());
+ __try
+ {
+ for (size_type __bucket = 0; __bucket < __old_n; ++__bucket)
+ {
+ _Node* __first = _M_buckets[__bucket];
+ while (__first)
+ {
+ size_type __new_bucket = _M_bkt_num(__first->_M_val,
+ __n);
+ _M_buckets[__bucket] = __first->_M_next;
+ __first->_M_next = __tmp[__new_bucket];
+ __tmp[__new_bucket] = __first;
+ __first = _M_buckets[__bucket];
+ }
+ }
+ _M_buckets.swap(__tmp);
+ }
+ __catch(...)
+ {
+ for (size_type __bucket = 0; __bucket < __tmp.size();
+ ++__bucket)
+ {
+ while (__tmp[__bucket])
+ {
+ _Node* __next = __tmp[__bucket]->_M_next;
+ _M_delete_node(__tmp[__bucket]);
+ __tmp[__bucket] = __next;
+ }
+ }
+ __throw_exception_again;
+ }
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+ {
+ _Node* __cur = _M_buckets[__n];
+ if (__cur == __first)
+ _M_erase_bucket(__n, __last);
+ else
+ {
+ _Node* __next;
+ for (__next = __cur->_M_next;
+ __next != __first;
+ __cur = __next, __next = __cur->_M_next)
+ ;
+ while (__next != __last)
+ {
+ __cur->_M_next = __next->_M_next;
+ _M_delete_node(__next);
+ __next = __cur->_M_next;
+ --_M_num_elements;
+ }
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_erase_bucket(const size_type __n, _Node* __last)
+ {
+ _Node* __cur = _M_buckets[__n];
+ while (__cur != __last)
+ {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ _M_buckets[__n] = __cur;
+ --_M_num_elements;
+ }
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ clear()
+ {
+ if (_M_num_elements == 0)
+ return;
+
+ for (size_type __i = 0; __i < _M_buckets.size(); ++__i)
+ {
+ _Node* __cur = _M_buckets[__i];
+ while (__cur != 0)
+ {
+ _Node* __next = __cur->_M_next;
+ _M_delete_node(__cur);
+ __cur = __next;
+ }
+ _M_buckets[__i] = 0;
+ }
+ _M_num_elements = 0;
+ }
+
+ template<class _Val, class _Key, class _HF, class _Ex, class _Eq, class _All>
+ void
+ hashtable<_Val, _Key, _HF, _Ex, _Eq, _All>::
+ _M_copy_from(const hashtable& __ht)
+ {
+ _M_buckets.clear();
+ _M_buckets.reserve(__ht._M_buckets.size());
+ _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+ __try
+ {
+ for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+ const _Node* __cur = __ht._M_buckets[__i];
+ if (__cur)
+ {
+ _Node* __local_copy = _M_new_node(__cur->_M_val);
+ _M_buckets[__i] = __local_copy;
+
+ for (_Node* __next = __cur->_M_next;
+ __next;
+ __cur = __next, __next = __cur->_M_next)
+ {
+ __local_copy->_M_next = _M_new_node(__next->_M_val);
+ __local_copy = __local_copy->_M_next;
+ }
+ }
+ }
+ _M_num_elements = __ht._M_num_elements;
+ }
+ __catch(...)
+ {
+ clear();
+ __throw_exception_again;
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/backward/strstream b/6/sources/cxx-stl/gnu-libstdc++/include/backward/strstream
new file mode 100644
index 0000000..a643e8b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/backward/strstream
@@ -0,0 +1,176 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1998
+ * 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.
+ */
+
+// WARNING: The classes defined in this header are DEPRECATED. This
+// header is defined in section D.7.1 of the C++ standard, and it
+// MAY BE REMOVED in a future standard revision. One should use the
+// header <sstream> instead.
+
+#ifndef _GLIBCXX_STRSTREAM
+#define _GLIBCXX_STRSTREAM
+
+#include "backward_warning.h"
+#include <iosfwd>
+#include <ios>
+#include <istream>
+#include <ostream>
+#include <string>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Class strstreambuf, a streambuf class that manages an array of char.
+ // Note that this class is not a template.
+ class strstreambuf : public basic_streambuf<char, char_traits<char> >
+ {
+ public:
+ // Types.
+ typedef char_traits<char> _Traits;
+ typedef basic_streambuf<char, _Traits> _Base;
+
+ public:
+ // Constructor, destructor
+ explicit strstreambuf(streamsize __initial_capacity = 0);
+ strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
+
+ strstreambuf(char* __get, streamsize __n, char* __put = 0);
+ strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
+ strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
+
+ strstreambuf(const char* __get, streamsize __n);
+ strstreambuf(const signed char* __get, streamsize __n);
+ strstreambuf(const unsigned char* __get, streamsize __n);
+
+ virtual ~strstreambuf();
+
+ public:
+ void freeze(bool = true);
+ char* str();
+ int pcount() const;
+
+ protected:
+ virtual int_type overflow(int_type __c = _Traits::eof());
+ virtual int_type pbackfail(int_type __c = _Traits::eof());
+ virtual int_type underflow();
+ virtual _Base* setbuf(char* __buf, streamsize __n);
+ virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
+ ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+ virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+
+ private:
+ strstreambuf&
+ operator=(const strstreambuf&);
+
+ strstreambuf(const strstreambuf&);
+
+ // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
+ char* _M_alloc(size_t);
+ void _M_free(char*);
+
+ // Helper function used in constructors.
+ void _M_setup(char* __get, char* __put, streamsize __n);
+
+ private:
+ // Data members.
+ void* (*_M_alloc_fun)(size_t);
+ void (*_M_free_fun)(void*);
+
+ bool _M_dynamic : 1;
+ bool _M_frozen : 1;
+ bool _M_constant : 1;
+ };
+
+ // Class istrstream, an istream that manages a strstreambuf.
+ class istrstream : public basic_istream<char>
+ {
+ public:
+ explicit istrstream(char*);
+ explicit istrstream(const char*);
+ istrstream(char* , streamsize);
+ istrstream(const char*, streamsize);
+ virtual ~istrstream();
+
+ strstreambuf* rdbuf() const;
+ char* str();
+
+ private:
+ strstreambuf _M_buf;
+ };
+
+ // Class ostrstream
+ class ostrstream : public basic_ostream<char>
+ {
+ public:
+ ostrstream();
+ ostrstream(char*, int, ios_base::openmode = ios_base::out);
+ virtual ~ostrstream();
+
+ strstreambuf* rdbuf() const;
+ void freeze(bool = true);
+ char* str();
+ int pcount() const;
+
+ private:
+ strstreambuf _M_buf;
+ };
+
+ // Class strstream
+ class strstream : public basic_iostream<char>
+ {
+ public:
+ typedef char char_type;
+ typedef char_traits<char>::int_type int_type;
+ typedef char_traits<char>::pos_type pos_type;
+ typedef char_traits<char>::off_type off_type;
+
+ strstream();
+ strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
+ virtual ~strstream();
+
+ strstreambuf* rdbuf() const;
+ void freeze(bool = true);
+ int pcount() const;
+ char* str();
+
+ private:
+ strstreambuf _M_buf;
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/algorithmfwd.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/algorithmfwd.h
new file mode 100644
index 0000000..e33a14c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/algorithmfwd.h
@@ -0,0 +1,805 @@
+// <algorithm> declarations -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/algorithmfwd.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ALGORITHMFWD_H
+#define _GLIBCXX_ALGORITHMFWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /*
+ adjacent_find
+ all_of (C++0x)
+ any_of (C++0x)
+ binary_search
+ copy
+ copy_backward
+ copy_if (C++0x)
+ copy_n (C++0x)
+ count
+ count_if
+ equal
+ equal_range
+ fill
+ fill_n
+ find
+ find_end
+ find_first_of
+ find_if
+ find_if_not (C++0x)
+ for_each
+ generate
+ generate_n
+ includes
+ inplace_merge
+ is_heap (C++0x)
+ is_heap_until (C++0x)
+ is_partitioned (C++0x)
+ is_sorted (C++0x)
+ is_sorted_until (C++0x)
+ iter_swap
+ lexicographical_compare
+ lower_bound
+ make_heap
+ max
+ max_element
+ merge
+ min
+ min_element
+ minmax (C++0x)
+ minmax_element (C++0x)
+ mismatch
+ next_permutation
+ none_of (C++0x)
+ nth_element
+ partial_sort
+ partial_sort_copy
+ partition
+ partition_copy (C++0x)
+ partition_point (C++0x)
+ pop_heap
+ prev_permutation
+ push_heap
+ random_shuffle
+ remove
+ remove_copy
+ remove_copy_if
+ remove_if
+ replace
+ replace_copy
+ replace_copy_if
+ replace_if
+ reverse
+ reverse_copy
+ rotate
+ rotate_copy
+ search
+ search_n
+ set_difference
+ set_intersection
+ set_symmetric_difference
+ set_union
+ sort
+ sort_heap
+ stable_partition
+ stable_sort
+ swap
+ swap_ranges
+ transform
+ unique
+ unique_copy
+ upper_bound
+ */
+
+ /**
+ * @defgroup algorithms Algorithms
+ *
+ * Components for performing algorithmic operations. Includes
+ * non-modifying sequence, modifying (mutating) sequence, sorting,
+ * searching, merge, partition, heap, set, minima, maxima, and
+ * permutation operations.
+ */
+
+ /**
+ * @defgroup mutating_algorithms Mutating Algorithms
+ * @ingroup algorithms
+ */
+
+ /**
+ * @defgroup non_mutating_algorithms Non-Mutating Algorithms
+ * @ingroup algorithms
+ */
+
+ /**
+ * @defgroup sorting_algorithms Sorting Algorithms
+ * @ingroup algorithms
+ */
+
+ /**
+ * @defgroup set_algorithms Set Operation Algorithms
+ * @ingroup sorting_algorithms
+ *
+ * These algorithms are common set operations performed on sequences
+ * that are already sorted. The number of comparisons will be
+ * linear.
+ */
+
+ /**
+ * @defgroup binary_search_algorithms Binary Search Algorithms
+ * @ingroup sorting_algorithms
+ *
+ * These algorithms are variations of a classic binary search, and
+ * all assume that the sequence being searched is already sorted.
+ *
+ * The number of comparisons will be logarithmic (and as few as
+ * possible). The number of steps through the sequence will be
+ * logarithmic for random-access iterators (e.g., pointers), and
+ * linear otherwise.
+ *
+ * The LWG has passed Defect Report 270, which notes: <em>The
+ * proposed resolution reinterprets binary search. Instead of
+ * thinking about searching for a value in a sorted range, we view
+ * that as an important special case of a more general algorithm:
+ * searching for the partition point in a partitioned range. We
+ * also add a guarantee that the old wording did not: we ensure that
+ * the upper bound is no earlier than the lower bound, that the pair
+ * returned by equal_range is a valid range, and that the first part
+ * of that pair is the lower bound.</em>
+ *
+ * The actual effect of the first sentence is that a comparison
+ * functor passed by the user doesn't necessarily need to induce a
+ * strict weak ordering relation. Rather, it partitions the range.
+ */
+
+ // adjacent_find
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _IIter, typename _Predicate>
+ bool
+ all_of(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter, typename _Predicate>
+ bool
+ any_of(_IIter, _IIter, _Predicate);
+#endif
+
+ template<typename _FIter, typename _Tp>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ bool
+ binary_search(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ copy(_IIter, _IIter, _OIter);
+
+ template<typename _BIter1, typename _BIter2>
+ _BIter2
+ copy_backward(_BIter1, _BIter1, _BIter2);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+ template<typename _IIter, typename _Size, typename _OIter>
+ _OIter
+ copy_n(_IIter, _Size, _OIter);
+#endif
+
+ // count
+ // count_if
+
+ template<typename _FIter, typename _Tp>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ pair<_FIter, _FIter>
+ equal_range(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _FIter, typename _Tp>
+ void
+ fill(_FIter, _FIter, const _Tp&);
+
+/*
+ XXX NB: return type different from ISO C++.
+ template<typename _OIter, typename _Size, typename _Tp>
+ void
+ fill_n(_OIter, _Size, const _Tp&);
+*/
+
+ template<typename _OIter, typename _Size, typename _Tp>
+ _OIter
+ fill_n(_OIter, _Size, const _Tp&);
+
+ // find
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ // find_first_of
+ // find_if
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if_not(_IIter, _IIter, _Predicate);
+#endif
+
+ // for_each
+ // generate
+ // generate_n
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+ template<typename _BIter>
+ void
+ inplace_merge(_BIter, _BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ void
+ inplace_merge(_BIter, _BIter, _BIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _RAIter>
+ bool
+ is_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ bool
+ is_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ _RAIter
+ is_heap_until(_RAIter, _RAIter, _Compare);
+
+ template<typename _IIter, typename _Predicate>
+ bool
+ is_partitioned(_IIter, _IIter, _Predicate);
+
+ template<typename _FIter>
+ bool
+ is_sorted(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ bool
+ is_sorted(_FIter, _FIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ is_sorted_until(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ is_sorted_until(_FIter, _FIter, _Compare);
+#endif
+
+ template<typename _FIter1, typename _FIter2>
+ void
+ iter_swap(_FIter1, _FIter2);
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ lower_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+ template<typename _RAIter>
+ void
+ make_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ make_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _Tp>
+ const _Tp&
+ max(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ max(const _Tp&, const _Tp&, _Compare);
+
+ // max_element
+ // merge
+
+ template<typename _Tp>
+ const _Tp&
+ min(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ const _Tp&
+ min(const _Tp&, const _Tp&, _Compare);
+
+ // min_element
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&);
+
+ template<typename _Tp, typename _Compare>
+ pair<const _Tp&, const _Tp&>
+ minmax(const _Tp&, const _Tp&, _Compare);
+
+ template<typename _FIter>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ pair<_FIter, _FIter>
+ minmax_element(_FIter, _FIter, _Compare);
+
+ template<typename _Tp>
+ _Tp
+ min(initializer_list<_Tp>);
+
+ template<typename _Tp, typename _Compare>
+ _Tp
+ min(initializer_list<_Tp>, _Compare);
+
+ template<typename _Tp>
+ _Tp
+ max(initializer_list<_Tp>);
+
+ template<typename _Tp, typename _Compare>
+ _Tp
+ max(initializer_list<_Tp>, _Compare);
+
+ template<typename _Tp>
+ pair<_Tp, _Tp>
+ minmax(initializer_list<_Tp>);
+
+ template<typename _Tp, typename _Compare>
+ pair<_Tp, _Tp>
+ minmax(initializer_list<_Tp>, _Compare);
+#endif
+
+ // mismatch
+
+ template<typename _BIter>
+ bool
+ next_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ next_permutation(_BIter, _BIter, _Compare);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _IIter, typename _Predicate>
+ bool
+ none_of(_IIter, _IIter, _Predicate);
+#endif
+
+ // nth_element
+ // partial_sort
+
+ template<typename _IIter, typename _RAIter>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter);
+
+ template<typename _IIter, typename _RAIter, typename _Compare>
+ _RAIter
+ partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare);
+
+ // partition
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _IIter, typename _OIter1,
+ typename _OIter2, typename _Predicate>
+ pair<_OIter1, _OIter2>
+ partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate);
+
+ template<typename _FIter, typename _Predicate>
+ _FIter
+ partition_point(_FIter, _FIter, _Predicate);
+#endif
+
+ template<typename _RAIter>
+ void
+ pop_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ pop_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _BIter>
+ bool
+ prev_permutation(_BIter, _BIter);
+
+ template<typename _BIter, typename _Compare>
+ bool
+ prev_permutation(_BIter, _BIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ push_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ push_heap(_RAIter, _RAIter, _Compare);
+
+ // random_shuffle
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ remove(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Predicate>
+ _FIter
+ remove_if(_FIter, _FIter, _Predicate);
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ remove_copy(_IIter, _IIter, _OIter, const _Tp&);
+
+ template<typename _IIter, typename _OIter, typename _Predicate>
+ _OIter
+ remove_copy_if(_IIter, _IIter, _OIter, _Predicate);
+
+ // replace
+
+ template<typename _IIter, typename _OIter, typename _Tp>
+ _OIter
+ replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&);
+
+ template<typename _Iter, typename _OIter, typename _Predicate, typename _Tp>
+ _OIter
+ replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&);
+
+ // replace_if
+
+ template<typename _BIter>
+ void
+ reverse(_BIter, _BIter);
+
+ template<typename _BIter, typename _OIter>
+ _OIter
+ reverse_copy(_BIter, _BIter, _OIter);
+
+ template<typename _FIter>
+ void
+ rotate(_FIter, _FIter, _FIter);
+
+ template<typename _FIter, typename _OIter>
+ _OIter
+ rotate_copy(_FIter, _FIter, _FIter, _OIter);
+
+ // search
+ // search_n
+ // set_difference
+ // set_intersection
+ // set_symmetric_difference
+ // set_union
+
+ template<typename _RAIter>
+ void
+ sort_heap(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort_heap(_RAIter, _RAIter, _Compare);
+
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ stable_partition(_BIter, _BIter, _Predicate);
+
+ template<typename _Tp>
+ void
+ swap(_Tp&, _Tp&);
+
+ template<typename _Tp, size_t _Nm>
+ void
+ swap(_Tp (&)[_Nm], _Tp (&)[_Nm]);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter2
+ swap_ranges(_FIter1, _FIter1, _FIter2);
+
+ // transform
+
+ template<typename _FIter>
+ _FIter
+ unique(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ unique(_FIter, _FIter, _BinaryPredicate);
+
+ // unique_copy
+
+ template<typename _FIter, typename _Tp>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&);
+
+ template<typename _FIter, typename _Tp, typename _Compare>
+ _FIter
+ upper_bound(_FIter, _FIter, const _Tp&, _Compare);
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ template<typename _FIter>
+ _FIter
+ adjacent_find(_FIter, _FIter);
+
+ template<typename _FIter, typename _BinaryPredicate>
+ _FIter
+ adjacent_find(_FIter, _FIter, _BinaryPredicate);
+
+ template<typename _IIter, typename _Tp>
+ typename iterator_traits<_IIter>::difference_type
+ count(_IIter, _IIter, const _Tp&);
+
+ template<typename _IIter, typename _Predicate>
+ typename iterator_traits<_IIter>::difference_type
+ count_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ equal(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ bool
+ equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _IIter, typename _Tp>
+ _IIter
+ find(_IIter, _IIter, const _Tp&);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _IIter, typename _Predicate>
+ _IIter
+ find_if(_IIter, _IIter, _Predicate);
+
+ template<typename _IIter, typename _Funct>
+ _Funct
+ for_each(_IIter, _IIter, _Funct);
+
+ template<typename _FIter, typename _Generator>
+ void
+ generate(_FIter, _FIter, _Generator);
+
+/*
+ XXX NB: return type different from ISO C++.
+ template<typename _OIter, typename _Size, typename _Tp>
+ void
+ generate_n(_OIter, _Size, _Generator);
+*/
+
+ template<typename _OIter, typename _Size, typename _Generator>
+ _OIter
+ generate_n(_OIter, _Size, _Generator);
+
+ template<typename _IIter1, typename _IIter2>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _Compare>
+ bool
+ lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ max_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ max_element(_FIter, _FIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _FIter>
+ _FIter
+ min_element(_FIter, _FIter);
+
+ template<typename _FIter, typename _Compare>
+ _FIter
+ min_element(_FIter, _FIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2);
+
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ pair<_IIter1, _IIter2>
+ mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate);
+
+ template<typename _RAIter>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ nth_element(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ partial_sort(_RAIter, _RAIter, _RAIter, _Compare);
+
+ template<typename _BIter, typename _Predicate>
+ _BIter
+ partition(_BIter, _BIter, _Predicate);
+
+ template<typename _RAIter>
+ void
+ random_shuffle(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Generator>
+ void
+ random_shuffle(_RAIter, _RAIter, _Generator&);
+
+ template<typename _FIter, typename _Tp>
+ void
+ replace(_FIter, _FIter, const _Tp&, const _Tp&);
+
+ template<typename _FIter, typename _Predicate, typename _Tp>
+ void
+ replace_if(_FIter, _FIter, _Predicate, const _Tp&);
+
+ template<typename _FIter1, typename _FIter2>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2);
+
+ template<typename _FIter1, typename _FIter2, typename _BinaryPredicate>
+ _FIter1
+ search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate);
+
+ template<typename _FIter, typename _Size, typename _Tp>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&);
+
+ template<typename _FIter, typename _Size, typename _Tp,
+ typename _BinaryPredicate>
+ _FIter
+ search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2,
+ _OIter, _Compare);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _Compare>
+ _OIter
+ set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _RAIter>
+ void
+ stable_sort(_RAIter, _RAIter);
+
+ template<typename _RAIter, typename _Compare>
+ void
+ stable_sort(_RAIter, _RAIter, _Compare);
+
+ template<typename _IIter, typename _OIter, typename _UnaryOperation>
+ _OIter
+ transform(_IIter, _IIter, _OIter, _UnaryOperation);
+
+ template<typename _IIter1, typename _IIter2, typename _OIter,
+ typename _BinaryOperation>
+ _OIter
+ transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation);
+
+ template<typename _IIter, typename _OIter>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter);
+
+ template<typename _IIter, typename _OIter, typename _BinaryPredicate>
+ _OIter
+ unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate);
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#ifdef _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# include <parallel/algorithmfwd.h>
+#endif
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/allocator.h
new file mode 100644
index 0000000..334fee5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/allocator.h
@@ -0,0 +1,181 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * 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.
+ */
+
+/** @file allocator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _ALLOCATOR_H
+#define _ALLOCATOR_H 1
+
+// Define the base class to std::allocator.
+#include <bits/c++allocator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @defgroup allocators Allocators
+ * @ingroup memory
+ *
+ * Classes encapsulating memory operations.
+ */
+
+ template<typename _Tp>
+ class allocator;
+
+ /// allocator<void> specialization.
+ template<>
+ class allocator<void>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef allocator<_Tp1> other; };
+ };
+
+ /**
+ * @brief The "standard" allocator, as per [20.4].
+ * @ingroup allocators
+ *
+ * Further details:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html
+ */
+ template<typename _Tp>
+ class allocator: public __glibcxx_base_allocator<_Tp>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef allocator<_Tp1> other; };
+
+ allocator() throw() { }
+
+ allocator(const allocator& __a) throw()
+ : __glibcxx_base_allocator<_Tp>(__a) { }
+
+ template<typename _Tp1>
+ allocator(const allocator<_Tp1>&) throw() { }
+
+ ~allocator() throw() { }
+
+ // Inherit everything else.
+ };
+
+ template<typename _T1, typename _T2>
+ inline bool
+ operator==(const allocator<_T1>&, const allocator<_T2>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator==(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return true; }
+
+ template<typename _T1, typename _T2>
+ inline bool
+ operator!=(const allocator<_T1>&, const allocator<_T2>&)
+ { return false; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
+ { return false; }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class allocator<char>;
+ extern template class allocator<wchar_t>;
+#endif
+
+ // Undefine.
+#undef __glibcxx_base_allocator
+
+ // To implement Option 3 of DR 431.
+ template<typename _Alloc, bool = __is_empty(_Alloc)>
+ struct __alloc_swap
+ { static void _S_do_it(_Alloc&, _Alloc&) { } };
+
+ template<typename _Alloc>
+ struct __alloc_swap<_Alloc, false>
+ {
+ static void
+ _S_do_it(_Alloc& __one, _Alloc& __two)
+ {
+ // Precondition: swappable allocators.
+ if (__one != __two)
+ swap(__one, __two);
+ }
+ };
+
+ // Optimize for stateless allocators.
+ template<typename _Alloc, bool = __is_empty(_Alloc)>
+ struct __alloc_neq
+ {
+ static bool
+ _S_do_it(const _Alloc&, const _Alloc&)
+ { return false; }
+ };
+
+ template<typename _Alloc>
+ struct __alloc_neq<_Alloc, false>
+ {
+ static bool
+ _S_do_it(const _Alloc& __one, const _Alloc& __two)
+ { return __one != __two; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_0.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_0.h
new file mode 100644
index 0000000..0caffaf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_0.h
@@ -0,0 +1,464 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_0.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_0_H
+#define _GLIBCXX_ATOMIC_0_H 1
+
+#pragma GCC system_header
+
+// _GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 0 == __atomic0 == Never lock-free
+namespace __atomic0
+{
+ struct atomic_flag;
+
+ // Implementation specific defines.
+#define _ATOMIC_LOAD_(__a, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __r = *__p; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+#define _ATOMIC_STORE_(__a, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__m) __v = (__m); \
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ *__p = __v; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __v; })
+
+#define _ATOMIC_MODIFY_(__a, __o, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__m) __v = (__m); \
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __r = *__p; \
+ *__p __o __v; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__e) __q = (__e); \
+ __typeof__(__m) __v = (__m); \
+ bool __r; \
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __t__ = *__p; \
+ if (__t__ == *__q) { *__p = __v; __r = true; } \
+ else { *__q = __t__; __r = false; } \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+ /// atomic_flag
+ struct atomic_flag : public __atomic_flag_base
+ {
+ atomic_flag() = default;
+ ~atomic_flag() = default;
+ atomic_flag(const atomic_flag&) = delete;
+ atomic_flag& operator=(const atomic_flag&) = delete;
+
+ // Conversion to ATOMIC_FLAG_INIT.
+ atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
+
+ bool
+ test_and_set(memory_order __m = memory_order_seq_cst) volatile;
+
+ void
+ clear(memory_order __m = memory_order_seq_cst) volatile;
+ };
+
+ /// 29.4.2, address types
+ struct atomic_address
+ {
+ private:
+ void* _M_i;
+
+ public:
+ atomic_address() = default;
+ ~atomic_address() = default;
+ atomic_address(const atomic_address&) = delete;
+ atomic_address& operator=(const atomic_address&) = delete;
+
+ atomic_address(void* __v) { _M_i = __v; }
+
+ bool
+ is_lock_free() const volatile
+ { return false; }
+
+ void
+ store(void* __v, memory_order __m = memory_order_seq_cst) volatile
+ {
+ __glibcxx_assert(__m != memory_order_acquire);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ __glibcxx_assert(__m != memory_order_consume);
+ _ATOMIC_STORE_(this, __v, __m);
+ }
+
+ void*
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ {
+ __glibcxx_assert(__m != memory_order_release);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ return _ATOMIC_LOAD_(this, __m);
+ }
+
+ void*
+ exchange(void* __v, memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, =, __v, __m); }
+
+ bool
+ compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
+ memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+ return _ATOMIC_CMPEXCHNG_(this, &__v1, __v2, __m1);
+ }
+
+ bool
+ compare_exchange_weak(void*& __v1, void* __v2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_weak(__v1, __v2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ bool
+ compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
+ memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+ return _ATOMIC_CMPEXCHNG_(this, &__v1, __v2, __m1);
+ }
+
+ bool
+ compare_exchange_strong(void*& __v1, void* __v2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_strong(__v1, __v2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ void*
+ fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+ {
+ void* volatile* __p = &(_M_i);
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+ __atomic_flag_wait_explicit(__g, __m);
+ void* __r = *__p;
+ *__p = (void*)((char*)(*__p) + __d);
+ atomic_flag_clear_explicit(__g, __m);
+ return __r;
+ }
+
+ void*
+ fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+ {
+ void* volatile* __p = &(_M_i);
+ volatile __atomic_flag_base* __g = __atomic_flag_for_address(__p);
+ __atomic_flag_wait_explicit(__g, __m);
+ void* __r = *__p;
+ *__p = (void*)((char*)(*__p) - __d);
+ atomic_flag_clear_explicit(__g, __m);
+ return __r;
+ }
+
+ operator void*() const volatile
+ { return load(); }
+
+ void*
+ operator=(void* __v) // XXX volatile
+ {
+ store(__v);
+ return __v;
+ }
+
+ void*
+ operator+=(ptrdiff_t __d) volatile
+ { return fetch_add(__d) + __d; }
+
+ void*
+ operator-=(ptrdiff_t __d) volatile
+ { return fetch_sub(__d) - __d; }
+ };
+
+
+ // 29.3.1 atomic integral types
+ // For each of the integral types, define atomic_[integral type] struct
+ //
+ // atomic_bool bool
+ // atomic_char char
+ // atomic_schar signed char
+ // atomic_uchar unsigned char
+ // atomic_short short
+ // atomic_ushort unsigned short
+ // atomic_int int
+ // atomic_uint unsigned int
+ // atomic_long long
+ // atomic_ulong unsigned long
+ // atomic_llong long long
+ // atomic_ullong unsigned long long
+ // atomic_char16_t char16_t
+ // atomic_char32_t char32_t
+ // atomic_wchar_t wchar_t
+
+ // Base type.
+ // NB: Assuming _ITp is an integral scalar type that is 1, 2, 4, or 8 bytes,
+ // since that is what GCC built-in functions for atomic memory access work on.
+ template<typename _ITp>
+ struct __atomic_base
+ {
+ private:
+ typedef _ITp __integral_type;
+
+ __integral_type _M_i;
+
+ public:
+ __atomic_base() = default;
+ ~__atomic_base() = default;
+ __atomic_base(const __atomic_base&) = delete;
+ __atomic_base& operator=(const __atomic_base&) = delete;
+
+ // Requires __integral_type convertible to _M_base._M_i.
+ __atomic_base(__integral_type __i) { _M_i = __i; }
+
+ operator __integral_type() const volatile
+ { return load(); }
+
+ __integral_type
+ operator=(__integral_type __i) // XXX volatile
+ {
+ store(__i);
+ return __i;
+ }
+
+ __integral_type
+ operator++(int) volatile
+ { return fetch_add(1); }
+
+ __integral_type
+ operator--(int) volatile
+ { return fetch_sub(1); }
+
+ __integral_type
+ operator++() volatile
+ { return fetch_add(1) + 1; }
+
+ __integral_type
+ operator--() volatile
+ { return fetch_sub(1) - 1; }
+
+ __integral_type
+ operator+=(__integral_type __i) volatile
+ { return fetch_add(__i) + __i; }
+
+ __integral_type
+ operator-=(__integral_type __i) volatile
+ { return fetch_sub(__i) - __i; }
+
+ __integral_type
+ operator&=(__integral_type __i) volatile
+ { return fetch_and(__i) & __i; }
+
+ __integral_type
+ operator|=(__integral_type __i) volatile
+ { return fetch_or(__i) | __i; }
+
+ __integral_type
+ operator^=(__integral_type __i) volatile
+ { return fetch_xor(__i) ^ __i; }
+
+ bool
+ is_lock_free() const volatile
+ { return false; }
+
+ void
+ store(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ __glibcxx_assert(__m != memory_order_acquire);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ __glibcxx_assert(__m != memory_order_consume);
+ _ATOMIC_STORE_(this, __i, __m);
+ }
+
+ __integral_type
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ {
+ __glibcxx_assert(__m != memory_order_release);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ return _ATOMIC_LOAD_(this, __m);
+ }
+
+ __integral_type
+ exchange(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, =, __i, __m); }
+
+ bool
+ compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+ memory_order __m1, memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+ return _ATOMIC_CMPEXCHNG_(this, &__i1, __i2, __m1);
+ }
+
+ bool
+ compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_weak(__i1, __i2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ bool
+ compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+ memory_order __m1, memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+ return _ATOMIC_CMPEXCHNG_(this, &__i1, __i2, __m1);
+ }
+
+ bool
+ compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_strong(__i1, __i2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ __integral_type
+ fetch_add(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, +=, __i, __m); }
+
+ __integral_type
+ fetch_sub(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, -=, __i, __m); }
+
+ __integral_type
+ fetch_and(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, &=, __i, __m); }
+
+ __integral_type
+ fetch_or(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, |=, __i, __m); }
+
+ __integral_type
+ fetch_xor(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _ATOMIC_MODIFY_(this, ^=, __i, __m); }
+ };
+
+
+ /// atomic_bool
+ // NB: No operators or fetch-operations for this type.
+ struct atomic_bool
+ {
+ private:
+ __atomic_base<bool> _M_base;
+
+ public:
+ atomic_bool() = default;
+ ~atomic_bool() = default;
+ atomic_bool(const atomic_bool&) = delete;
+ atomic_bool& operator=(const atomic_bool&) = delete;
+
+ atomic_bool(bool __i) : _M_base(__i) { }
+
+ bool
+ operator=(bool __i) // XXX volatile
+ { return _M_base.operator=(__i); }
+
+ operator bool() const volatile
+ { return _M_base.load(); }
+
+ bool
+ is_lock_free() const volatile
+ { return _M_base.is_lock_free(); }
+
+ void
+ store(bool __i, memory_order __m = memory_order_seq_cst) volatile
+ { _M_base.store(__i, __m); }
+
+ bool
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ { return _M_base.load(__m); }
+
+ bool
+ exchange(bool __i, memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.exchange(__i, __m); }
+
+ bool
+ compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
+ memory_order __m2) volatile
+ { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
+
+ bool
+ compare_exchange_weak(bool& __i1, bool __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
+
+ bool
+ compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
+ memory_order __m2) volatile
+ { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+
+ bool
+ compare_exchange_strong(bool& __i1, bool __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
+ };
+
+#undef _ATOMIC_LOAD_
+#undef _ATOMIC_STORE_
+#undef _ATOMIC_MODIFY_
+#undef _ATOMIC_CMPEXCHNG_
+} // namespace __atomic0
+
+// _GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_2.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_2.h
new file mode 100644
index 0000000..2815d59
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomic_2.h
@@ -0,0 +1,454 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomic_2.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_2_H
+#define _GLIBCXX_ATOMIC_2_H 1
+
+#pragma GCC system_header
+
+// _GLIBCXX_BEGIN_NAMESPACE(std)
+
+// 2 == __atomic2 == Always lock-free
+// Assumed:
+// _GLIBCXX_ATOMIC_BUILTINS_1
+// _GLIBCXX_ATOMIC_BUILTINS_2
+// _GLIBCXX_ATOMIC_BUILTINS_4
+// _GLIBCXX_ATOMIC_BUILTINS_8
+namespace __atomic2
+{
+ /// atomic_flag
+ struct atomic_flag : public __atomic_flag_base
+ {
+ atomic_flag() = default;
+ ~atomic_flag() = default;
+ atomic_flag(const atomic_flag&) = delete;
+ atomic_flag& operator=(const atomic_flag&) = delete;
+
+ // Conversion to ATOMIC_FLAG_INIT.
+ atomic_flag(bool __i): __atomic_flag_base({ __i }) { }
+
+ bool
+ test_and_set(memory_order __m = memory_order_seq_cst) volatile
+ {
+ // Redundant synchronize if built-in for lock is a full barrier.
+ if (__m != memory_order_acquire && __m != memory_order_acq_rel)
+ __sync_synchronize();
+ return __sync_lock_test_and_set(&_M_i, 1);
+ }
+
+ void
+ clear(memory_order __m = memory_order_seq_cst) volatile
+ {
+ __glibcxx_assert(__m != memory_order_consume);
+ __glibcxx_assert(__m != memory_order_acquire);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+
+ __sync_lock_release(&_M_i);
+ if (__m != memory_order_acquire && __m != memory_order_acq_rel)
+ __sync_synchronize();
+ }
+ };
+
+
+ /// 29.4.2, address types
+ struct atomic_address
+ {
+ private:
+ void* _M_i;
+
+ public:
+ atomic_address() = default;
+ ~atomic_address() = default;
+ atomic_address(const atomic_address&) = delete;
+ atomic_address& operator=(const atomic_address&) = delete;
+
+ atomic_address(void* __v) { _M_i = __v; }
+
+ bool
+ is_lock_free() const volatile
+ { return true; }
+
+ void
+ store(void* __v, memory_order __m = memory_order_seq_cst) volatile
+ {
+ __glibcxx_assert(__m != memory_order_acquire);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ __glibcxx_assert(__m != memory_order_consume);
+
+ if (__m == memory_order_relaxed)
+ _M_i = __v;
+ else
+ {
+ // write_mem_barrier();
+ _M_i = __v;
+ if (__m == memory_order_seq_cst)
+ __sync_synchronize();
+ }
+ }
+
+ void*
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ {
+ __glibcxx_assert(__m != memory_order_release);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+
+ __sync_synchronize();
+ void* __ret = _M_i;
+ __sync_synchronize();
+ return __ret;
+ }
+
+ void*
+ exchange(void* __v, memory_order __m = memory_order_seq_cst) volatile
+ {
+ // XXX built-in assumes memory_order_acquire.
+ return __sync_lock_test_and_set(&_M_i, __v);
+ }
+
+ bool
+ compare_exchange_weak(void*& __v1, void* __v2, memory_order __m1,
+ memory_order __m2) volatile
+ { return compare_exchange_strong(__v1, __v2, __m1, __m2); }
+
+ bool
+ compare_exchange_weak(void*& __v1, void* __v2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_weak(__v1, __v2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ bool
+ compare_exchange_strong(void*& __v1, void* __v2, memory_order __m1,
+ memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+
+ void* __v1o = __v1;
+ void* __v1n = __sync_val_compare_and_swap(&_M_i, __v1o, __v2);
+
+ // Assume extra stores (of same value) allowed in true case.
+ __v1 = __v1n;
+ return __v1o == __v1n;
+ }
+
+ bool
+ compare_exchange_strong(void*& __v1, void* __v2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_strong(__v1, __v2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ void*
+ fetch_add(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_add(&_M_i, __d); }
+
+ void*
+ fetch_sub(ptrdiff_t __d, memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_sub(&_M_i, __d); }
+
+ operator void*() const volatile
+ { return load(); }
+
+ void*
+ operator=(void* __v) // XXX volatile
+ {
+ store(__v);
+ return __v;
+ }
+
+ void*
+ operator+=(ptrdiff_t __d) volatile
+ { return __sync_add_and_fetch(&_M_i, __d); }
+
+ void*
+ operator-=(ptrdiff_t __d) volatile
+ { return __sync_sub_and_fetch(&_M_i, __d); }
+ };
+
+ // 29.3.1 atomic integral types
+ // For each of the integral types, define atomic_[integral type] struct
+ //
+ // atomic_bool bool
+ // atomic_char char
+ // atomic_schar signed char
+ // atomic_uchar unsigned char
+ // atomic_short short
+ // atomic_ushort unsigned short
+ // atomic_int int
+ // atomic_uint unsigned int
+ // atomic_long long
+ // atomic_ulong unsigned long
+ // atomic_llong long long
+ // atomic_ullong unsigned long long
+ // atomic_char16_t char16_t
+ // atomic_char32_t char32_t
+ // atomic_wchar_t wchar_t
+
+ // Base type.
+ // NB: Assuming _ITp is an integral scalar type that is 1, 2, 4, or 8 bytes,
+ // since that is what GCC built-in functions for atomic memory access work on.
+ template<typename _ITp>
+ struct __atomic_base
+ {
+ private:
+ typedef _ITp __integral_type;
+
+ __integral_type _M_i;
+
+ public:
+ __atomic_base() = default;
+ ~__atomic_base() = default;
+ __atomic_base(const __atomic_base&) = delete;
+ __atomic_base& operator=(const __atomic_base&) = delete;
+
+ // Requires __integral_type convertible to _M_base._M_i.
+ __atomic_base(__integral_type __i) { _M_i = __i; }
+
+ operator __integral_type() const volatile
+ { return load(); }
+
+ __integral_type
+ operator=(__integral_type __i) // XXX volatile
+ {
+ store(__i);
+ return __i;
+ }
+
+ __integral_type
+ operator++(int) volatile
+ { return fetch_add(1); }
+
+ __integral_type
+ operator--(int) volatile
+ { return fetch_sub(1); }
+
+ __integral_type
+ operator++() volatile
+ { return __sync_add_and_fetch(&_M_i, 1); }
+
+ __integral_type
+ operator--() volatile
+ { return __sync_sub_and_fetch(&_M_i, 1); }
+
+ __integral_type
+ operator+=(__integral_type __i) volatile
+ { return __sync_add_and_fetch(&_M_i, __i); }
+
+ __integral_type
+ operator-=(__integral_type __i) volatile
+ { return __sync_sub_and_fetch(&_M_i, __i); }
+
+ __integral_type
+ operator&=(__integral_type __i) volatile
+ { return __sync_and_and_fetch(&_M_i, __i); }
+
+ __integral_type
+ operator|=(__integral_type __i) volatile
+ { return __sync_or_and_fetch(&_M_i, __i); }
+
+ __integral_type
+ operator^=(__integral_type __i) volatile
+ { return __sync_xor_and_fetch(&_M_i, __i); }
+
+ bool
+ is_lock_free() const volatile
+ { return true; }
+
+ void
+ store(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ __glibcxx_assert(__m != memory_order_acquire);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+ __glibcxx_assert(__m != memory_order_consume);
+
+ if (__m == memory_order_relaxed)
+ _M_i = __i;
+ else
+ {
+ // write_mem_barrier();
+ _M_i = __i;
+ if (__m == memory_order_seq_cst)
+ __sync_synchronize();
+ }
+ }
+
+ __integral_type
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ {
+ __glibcxx_assert(__m != memory_order_release);
+ __glibcxx_assert(__m != memory_order_acq_rel);
+
+ __sync_synchronize();
+ __integral_type __ret = _M_i;
+ __sync_synchronize();
+ return __ret;
+ }
+
+ __integral_type
+ exchange(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ // XXX built-in assumes memory_order_acquire.
+ return __sync_lock_test_and_set(&_M_i, __i);
+ }
+
+ bool
+ compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+ memory_order __m1, memory_order __m2) volatile
+ { return compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+ bool
+ compare_exchange_weak(__integral_type& __i1, __integral_type __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_weak(__i1, __i2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ bool
+ compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+ memory_order __m1, memory_order __m2) volatile
+ {
+ __glibcxx_assert(__m2 != memory_order_release);
+ __glibcxx_assert(__m2 != memory_order_acq_rel);
+ __glibcxx_assert(__m2 <= __m1);
+
+ __integral_type __i1o = __i1;
+ __integral_type __i1n = __sync_val_compare_and_swap(&_M_i, __i1o, __i2);
+
+ // Assume extra stores (of same value) allowed in true case.
+ __i1 = __i1n;
+ return __i1o == __i1n;
+ }
+
+ bool
+ compare_exchange_strong(__integral_type& __i1, __integral_type __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ {
+ return compare_exchange_strong(__i1, __i2, __m,
+ __calculate_memory_order(__m));
+ }
+
+ __integral_type
+ fetch_add(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_add(&_M_i, __i); }
+
+ __integral_type
+ fetch_sub(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_sub(&_M_i, __i); }
+
+ __integral_type
+ fetch_and(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_and(&_M_i, __i); }
+
+ __integral_type
+ fetch_or(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_or(&_M_i, __i); }
+
+ __integral_type
+ fetch_xor(__integral_type __i,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return __sync_fetch_and_xor(&_M_i, __i); }
+ };
+
+
+ /// atomic_bool
+ // NB: No operators or fetch-operations for this type.
+ struct atomic_bool
+ {
+ private:
+ __atomic_base<bool> _M_base;
+
+ public:
+ atomic_bool() = default;
+ ~atomic_bool() = default;
+ atomic_bool(const atomic_bool&) = delete;
+ atomic_bool& operator=(const atomic_bool&) = delete;
+
+ atomic_bool(bool __i) : _M_base(__i) { }
+
+ bool
+ operator=(bool __i) // XXX volatile
+ { return _M_base.operator=(__i); }
+
+ operator bool() const volatile
+ { return _M_base.load(); }
+
+ bool
+ is_lock_free() const volatile
+ { return _M_base.is_lock_free(); }
+
+ void
+ store(bool __i, memory_order __m = memory_order_seq_cst) volatile
+ { _M_base.store(__i, __m); }
+
+ bool
+ load(memory_order __m = memory_order_seq_cst) const volatile
+ { return _M_base.load(__m); }
+
+ bool
+ exchange(bool __i, memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.exchange(__i, __m); }
+
+ bool
+ compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1,
+ memory_order __m2) volatile
+ { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); }
+
+ bool
+ compare_exchange_weak(bool& __i1, bool __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.compare_exchange_weak(__i1, __i2, __m); }
+
+ bool
+ compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1,
+ memory_order __m2) volatile
+ { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); }
+
+
+ bool
+ compare_exchange_strong(bool& __i1, bool __i2,
+ memory_order __m = memory_order_seq_cst) volatile
+ { return _M_base.compare_exchange_strong(__i1, __i2, __m); }
+ };
+} // namespace __atomic2
+
+// _GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_c.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_c.h
new file mode 100644
index 0000000..0841843
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_c.h
@@ -0,0 +1,174 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomicfwd_c.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// "C" only bits.
+
+#define _ATOMIC_MEMBER_ ((__a)->_M_i)
+
+ // POD base classes for atomic intgral types.
+ struct __atomic_bool_base
+ {
+ bool _M_i;
+ };
+
+ struct __atomic_char_base
+ {
+ char _M_i;
+ };
+
+ struct __atomic_schar_base
+ {
+ signed char _M_i;
+ };
+
+ struct __atomic_uchar_base
+ {
+ unsigned char _M_i;
+ };
+
+ struct __atomic_short_base
+ {
+ short _M_i;
+ };
+
+ struct __atomic_ushort_base
+ {
+ unsigned short _M_i;
+ };
+
+ struct __atomic_int_base
+ {
+ int _M_i;
+ };
+
+ struct __atomic_uint_base
+ {
+ unsigned int _M_i;
+ };
+
+ struct __atomic_long_base
+ {
+ long _M_i;
+ };
+
+ struct __atomic_ulong_base
+ {
+ unsigned long _M_i;
+ };
+
+ struct __atomic_llong_base
+ {
+ long long _M_i;
+ };
+
+ struct __atomic_ullong_base
+ {
+ unsigned long long _M_i;
+ };
+
+ struct __atomic_wchar_t_base
+ {
+ wchar_t _M_i;
+ };
+
+ typedef struct __atomic_flag_base atomic_flag;
+ typedef struct __atomic_address_base atomic_address;
+ typedef struct __atomic_bool_base atomic_bool;
+ typedef struct __atomic_char_base atomic_char;
+ typedef struct __atomic_schar_base atomic_schar;
+ typedef struct __atomic_uchar_base atomic_uchar;
+ typedef struct __atomic_short_base atomic_short;
+ typedef struct __atomic_ushort_base atomic_ushort;
+ typedef struct __atomic_int_base atomic_int;
+ typedef struct __atomic_uint_base atomic_uint;
+ typedef struct __atomic_long_base atomic_long;
+ typedef struct __atomic_ulong_base atomic_ulong;
+ typedef struct __atomic_llong_base atomic_llong;
+ typedef struct __atomic_ullong_base atomic_ullong;
+ typedef struct __atomic_wchar_t_base atomic_wchar_t;
+ typedef struct __atomic_short_base atomic_char16_t;
+ typedef struct __atomic_int_base atomic_char32_t;
+
+#define atomic_is_lock_free(__a) \
+ false
+
+#define atomic_load_explicit(__a, __x) \
+ _ATOMIC_LOAD_(__a, __x)
+
+#define atomic_load(__a) \
+ atomic_load_explicit(__a, memory_order_seq_cst)
+
+#define atomic_store_explicit(__a, __m, __x) \
+ _ATOMIC_STORE_(__a, __m, __x)
+
+#define atomic_store(__a, __m) \
+ atomic_store_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_exchange_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, =, __m, __x)
+
+#define atomic_exchange(__a, __m) \
+ atomic_exchange_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_compare_exchange_explicit(__a, __e, __m, __x, __y) \
+ _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x)
+
+#define atomic_compare_exchange(__a, __e, __m) \
+ _ATOMIC_CMPEXCHNG_(__a, __e, __m, memory_order_seq_cst)
+
+#define atomic_fetch_add_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, +=, __m, __x)
+
+#define atomic_fetch_add(__a, __m) \
+ atomic_fetch_add_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_sub_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, -=, __m, __x)
+
+#define atomic_fetch_sub(__a, __m) \
+ atomic_fetch_sub_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_and_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, &=, __m, __x)
+
+#define atomic_fetch_and(__a, __m) \
+ atomic_fetch_and_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_or_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, |=, __m, __x)
+
+#define atomic_fetch_or(__a, __m) \
+ atomic_fetch_or_explicit(__a, __m, memory_order_seq_cst)
+
+#define atomic_fetch_xor_explicit(__a, __m, __x) \
+ _ATOMIC_MODIFY_(__a, ^=, __m, __x)
+
+#define atomic_fetch_xor(__a, __m) \
+ atomic_fetch_xor_explicit(__a, __m, memory_order_seq_cst)
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_cxx.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_cxx.h
new file mode 100644
index 0000000..8b67635
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/atomicfwd_cxx.h
@@ -0,0 +1,109 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/atomicfwd_cxx.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// "C++" only bits.
+
+#define _ATOMIC_MEMBER_ _M_i
+
+_GLIBCXX_END_EXTERN_C
+
+ namespace __atomic0
+ {
+ template<typename _IntTp>
+ struct __atomic_base;
+
+ struct atomic_flag;
+ struct atomic_address;
+ struct atomic_bool;
+ }
+
+ namespace __atomic2
+ {
+ template<typename _IntTp>
+ struct __atomic_base;
+
+ struct atomic_flag;
+ struct atomic_address;
+ struct atomic_bool;
+ }
+
+ namespace __atomic1
+ {
+ using __atomic2::atomic_flag;
+ using __atomic2::atomic_bool;
+ using __atomic0::atomic_address;
+ using __atomic0::__atomic_base;
+ }
+
+ /// atomic_char
+ typedef __atomic_base<char> atomic_char;
+
+ /// atomic_schar
+ typedef __atomic_base<signed char> atomic_schar;
+
+ /// atomic_uchar
+ typedef __atomic_base<unsigned char> atomic_uchar;
+
+ /// atomic_short
+ typedef __atomic_base<short> atomic_short;
+
+ /// atomic_ushort
+ typedef __atomic_base<unsigned short> atomic_ushort;
+
+ /// atomic_int
+ typedef __atomic_base<int> atomic_int;
+
+ /// atomic_uint
+ typedef __atomic_base<unsigned int> atomic_uint;
+
+ /// atomic_long
+ typedef __atomic_base<long> atomic_long;
+
+ /// atomic_ulong
+ typedef __atomic_base<unsigned long> atomic_ulong;
+
+ /// atomic_llong
+ typedef __atomic_base<long long> atomic_llong;
+
+ /// atomic_ullong
+ typedef __atomic_base<unsigned long long> atomic_ullong;
+
+ /// atomic_wchar_t
+ typedef __atomic_base<wchar_t> atomic_wchar_t;
+
+ /// atomic_char16_t
+ typedef __atomic_base<char16_t> atomic_char16_t;
+
+ /// atomic_char32_t
+ typedef __atomic_base<char32_t> atomic_char32_t;
+
+ template<typename _Tp>
+ struct atomic;
+_GLIBCXX_BEGIN_EXTERN_C
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.h
new file mode 100644
index 0000000..ee1b646
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.h
@@ -0,0 +1,474 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_ios.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _BASIC_IOS_H
+#define _BASIC_IOS_H 1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <bits/locale_classes.h>
+#include <bits/locale_facets.h>
+#include <bits/streambuf_iterator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Facet>
+ inline const _Facet&
+ __check_facet(const _Facet* __f)
+ {
+ if (!__f)
+ __throw_bad_cast();
+ return *__f;
+ }
+
+ // 27.4.5 Template class basic_ios
+ /**
+ * @brief Virtual base class for all stream classes.
+ * @ingroup io
+ *
+ * Most of the member functions called dispatched on stream objects
+ * (e.g., @c std::cout.foo(bar);) are consolidated in this class.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_ios : public ios_base
+ {
+ public:
+ //@{
+ /**
+ * These are standard types. They permit a standardized way of
+ * referring to names of (or names dependant on) the template
+ * parameters, which are specific to the implementation.
+ */
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+ //@}
+
+ //@{
+ /**
+ * These are non-standard types.
+ */
+ typedef ctype<_CharT> __ctype_type;
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+ __num_put_type;
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+ __num_get_type;
+ //@}
+
+ // Data members:
+ protected:
+ basic_ostream<_CharT, _Traits>* _M_tie;
+ mutable char_type _M_fill;
+ mutable bool _M_fill_init;
+ basic_streambuf<_CharT, _Traits>* _M_streambuf;
+
+ // Cached use_facet<ctype>, which is based on the current locale info.
+ const __ctype_type* _M_ctype;
+ // For ostream.
+ const __num_put_type* _M_num_put;
+ // For istream.
+ const __num_get_type* _M_num_get;
+
+ public:
+ //@{
+ /**
+ * @brief The quick-and-easy status check.
+ *
+ * This allows you to write constructs such as
+ * "if (!a_stream) ..." and "while (a_stream) ..."
+ */
+ operator void*() const
+ { return this->fail() ? 0 : const_cast<basic_ios*>(this); }
+
+ bool
+ operator!() const
+ { return this->fail(); }
+ //@}
+
+ /**
+ * @brief Returns the error state of the stream buffer.
+ * @return A bit pattern (well, isn't everything?)
+ *
+ * See std::ios_base::iostate for the possible bit values. Most
+ * users will call one of the interpreting wrappers, e.g., good().
+ */
+ iostate
+ rdstate() const
+ { return _M_streambuf_state; }
+
+ /**
+ * @brief [Re]sets the error state.
+ * @param state The new state flag(s) to set.
+ *
+ * See std::ios_base::iostate for the possible bit values. Most
+ * users will not need to pass an argument.
+ */
+ void
+ clear(iostate __state = goodbit);
+
+ /**
+ * @brief Sets additional flags in the error state.
+ * @param state The additional state flag(s) to set.
+ *
+ * See std::ios_base::iostate for the possible bit values.
+ */
+ void
+ setstate(iostate __state)
+ { this->clear(this->rdstate() | __state); }
+
+ // Flip the internal state on for the proper state bits, then re
+ // throws the propagated exception if bit also set in
+ // exceptions().
+ void
+ _M_setstate(iostate __state)
+ {
+ // 27.6.1.2.1 Common requirements.
+ // Turn this on without causing an ios::failure to be thrown.
+ _M_streambuf_state |= __state;
+ if (this->exceptions() & __state)
+ __throw_exception_again;
+ }
+
+ /**
+ * @brief Fast error checking.
+ * @return True if no error flags are set.
+ *
+ * A wrapper around rdstate.
+ */
+ bool
+ good() const
+ { return this->rdstate() == 0; }
+
+ /**
+ * @brief Fast error checking.
+ * @return True if the eofbit is set.
+ *
+ * Note that other iostate flags may also be set.
+ */
+ bool
+ eof() const
+ { return (this->rdstate() & eofbit) != 0; }
+
+ /**
+ * @brief Fast error checking.
+ * @return True if either the badbit or the failbit is set.
+ *
+ * Checking the badbit in fail() is historical practice.
+ * Note that other iostate flags may also be set.
+ */
+ bool
+ fail() const
+ { return (this->rdstate() & (badbit | failbit)) != 0; }
+
+ /**
+ * @brief Fast error checking.
+ * @return True if the badbit is set.
+ *
+ * Note that other iostate flags may also be set.
+ */
+ bool
+ bad() const
+ { return (this->rdstate() & badbit) != 0; }
+
+ /**
+ * @brief Throwing exceptions on errors.
+ * @return The current exceptions mask.
+ *
+ * This changes nothing in the stream. See the one-argument version
+ * of exceptions(iostate) for the meaning of the return value.
+ */
+ iostate
+ exceptions() const
+ { return _M_exception; }
+
+ /**
+ * @brief Throwing exceptions on errors.
+ * @param except The new exceptions mask.
+ *
+ * By default, error flags are set silently. You can set an
+ * exceptions mask for each stream; if a bit in the mask becomes set
+ * in the error flags, then an exception of type
+ * std::ios_base::failure is thrown.
+ *
+ * If the error flag is already set when the exceptions mask is
+ * added, the exception is immediately thrown. Try running the
+ * following under GCC 3.1 or later:
+ * @code
+ * #include <iostream>
+ * #include <fstream>
+ * #include <exception>
+ *
+ * int main()
+ * {
+ * std::set_terminate (__gnu_cxx::__verbose_terminate_handler);
+ *
+ * std::ifstream f ("/etc/motd");
+ *
+ * std::cerr << "Setting badbit\n";
+ * f.setstate (std::ios_base::badbit);
+ *
+ * std::cerr << "Setting exception mask\n";
+ * f.exceptions (std::ios_base::badbit);
+ * }
+ * @endcode
+ */
+ void
+ exceptions(iostate __except)
+ {
+ _M_exception = __except;
+ this->clear(_M_streambuf_state);
+ }
+
+ // Constructor/destructor:
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * The parameter is passed by derived streams.
+ */
+ explicit
+ basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
+ : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
+ _M_ctype(0), _M_num_put(0), _M_num_get(0)
+ { this->init(__sb); }
+
+ /**
+ * @brief Empty.
+ *
+ * The destructor does nothing. More specifically, it does not
+ * destroy the streambuf held by rdbuf().
+ */
+ virtual
+ ~basic_ios() { }
+
+ // Members:
+ /**
+ * @brief Fetches the current @e tied stream.
+ * @return A pointer to the tied stream, or NULL if the stream is
+ * not tied.
+ *
+ * A stream may be @e tied (or synchronized) to a second output
+ * stream. When this stream performs any I/O, the tied stream is
+ * first flushed. For example, @c std::cin is tied to @c std::cout.
+ */
+ basic_ostream<_CharT, _Traits>*
+ tie() const
+ { return _M_tie; }
+
+ /**
+ * @brief Ties this stream to an output stream.
+ * @param tiestr The output stream.
+ * @return The previously tied output stream, or NULL if the stream
+ * was not tied.
+ *
+ * This sets up a new tie; see tie() for more.
+ */
+ basic_ostream<_CharT, _Traits>*
+ tie(basic_ostream<_CharT, _Traits>* __tiestr)
+ {
+ basic_ostream<_CharT, _Traits>* __old = _M_tie;
+ _M_tie = __tiestr;
+ return __old;
+ }
+
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current stream buffer.
+ *
+ * This does not change the state of the stream.
+ */
+ basic_streambuf<_CharT, _Traits>*
+ rdbuf() const
+ { return _M_streambuf; }
+
+ /**
+ * @brief Changing the underlying buffer.
+ * @param sb The new stream buffer.
+ * @return The previous stream buffer.
+ *
+ * Associates a new buffer with the current stream, and clears the
+ * error state.
+ *
+ * Due to historical accidents which the LWG refuses to correct, the
+ * I/O library suffers from a design error: this function is hidden
+ * in derived classes by overrides of the zero-argument @c rdbuf(),
+ * which is non-virtual for hysterical raisins. As a result, you
+ * must use explicit qualifications to access this function via any
+ * derived class. For example:
+ *
+ * @code
+ * std::fstream foo; // or some other derived type
+ * std::streambuf* p = .....;
+ *
+ * foo.ios::rdbuf(p); // ios == basic_ios<char>
+ * @endcode
+ */
+ basic_streambuf<_CharT, _Traits>*
+ rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
+
+ /**
+ * @brief Copies fields of __rhs into this.
+ * @param __rhs The source values for the copies.
+ * @return Reference to this object.
+ *
+ * All fields of __rhs are copied into this object except that rdbuf()
+ * and rdstate() remain unchanged. All values in the pword and iword
+ * arrays are copied. Before copying, each callback is invoked with
+ * erase_event. After copying, each (new) callback is invoked with
+ * copyfmt_event. The final step is to copy exceptions().
+ */
+ basic_ios&
+ copyfmt(const basic_ios& __rhs);
+
+ /**
+ * @brief Retrieves the "empty" character.
+ * @return The current fill character.
+ *
+ * It defaults to a space (' ') in the current locale.
+ */
+ char_type
+ fill() const
+ {
+ if (!_M_fill_init)
+ {
+ _M_fill = this->widen(' ');
+ _M_fill_init = true;
+ }
+ return _M_fill;
+ }
+
+ /**
+ * @brief Sets a new "empty" character.
+ * @param ch The new character.
+ * @return The previous fill character.
+ *
+ * The fill character is used to fill out space when P+ characters
+ * have been requested (e.g., via setw), Q characters are actually
+ * used, and Q<P. It defaults to a space (' ') in the current locale.
+ */
+ char_type
+ fill(char_type __ch)
+ {
+ char_type __old = this->fill();
+ _M_fill = __ch;
+ return __old;
+ }
+
+ // Locales:
+ /**
+ * @brief Moves to a new locale.
+ * @param loc The new locale.
+ * @return The previous locale.
+ *
+ * Calls @c ios_base::imbue(loc), and if a stream buffer is associated
+ * with this stream, calls that buffer's @c pubimbue(loc).
+ *
+ * Additional l10n notes are at
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+ */
+ locale
+ imbue(const locale& __loc);
+
+ /**
+ * @brief Squeezes characters.
+ * @param c The character to narrow.
+ * @param dfault The character to narrow.
+ * @return The narrowed character.
+ *
+ * Maps a character of @c char_type to a character of @c char,
+ * if possible.
+ *
+ * Returns the result of
+ * @code
+ * std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault)
+ * @endcode
+ *
+ * Additional l10n notes are at
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+ */
+ char
+ narrow(char_type __c, char __dfault) const
+ { return __check_facet(_M_ctype).narrow(__c, __dfault); }
+
+ /**
+ * @brief Widens characters.
+ * @param c The character to widen.
+ * @return The widened character.
+ *
+ * Maps a character of @c char to a character of @c char_type.
+ *
+ * Returns the result of
+ * @code
+ * std::use_facet<ctype<char_type> >(getloc()).widen(c)
+ * @endcode
+ *
+ * Additional l10n notes are at
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html
+ */
+ char_type
+ widen(char __c) const
+ { return __check_facet(_M_ctype).widen(__c); }
+
+ protected:
+ // 27.4.5.1 basic_ios constructors
+ /**
+ * @brief Empty.
+ *
+ * The default constructor does nothing and is not normally
+ * accessible to users.
+ */
+ basic_ios()
+ : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
+ _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
+ { }
+
+ /**
+ * @brief All setup is performed here.
+ *
+ * This is called from the public constructor. It is not virtual and
+ * cannot be redefined.
+ */
+ void
+ init(basic_streambuf<_CharT, _Traits>* __sb);
+
+ void
+ _M_cache_locale(const locale& __loc);
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+#include <bits/basic_ios.tcc>
+#endif
+
+#endif /* _BASIC_IOS_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.tcc
new file mode 100644
index 0000000..a0dc67e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_ios.tcc
@@ -0,0 +1,187 @@
+// basic_ios member functions -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+// 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_ios.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _BASIC_IOS_TCC
+#define _BASIC_IOS_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_ios<_CharT, _Traits>::clear(iostate __state)
+ {
+ if (this->rdbuf())
+ _M_streambuf_state = __state;
+ else
+ _M_streambuf_state = __state | badbit;
+ if (this->exceptions() & this->rdstate())
+ __throw_ios_failure(__N("basic_ios::clear"));
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_streambuf<_CharT, _Traits>*
+ basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
+ {
+ basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
+ _M_streambuf = __sb;
+ this->clear();
+ return __old;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ios<_CharT, _Traits>&
+ basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 292. effects of a.copyfmt (a)
+ if (this != &__rhs)
+ {
+ // Per 27.1.1, do not call imbue, yet must trash all caches
+ // associated with imbue()
+
+ // Alloc any new word array first, so if it fails we have "rollback".
+ _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
+ _M_local_word : new _Words[__rhs._M_word_size];
+
+ // Bump refs before doing callbacks, for safety.
+ _Callback_list* __cb = __rhs._M_callbacks;
+ if (__cb)
+ __cb->_M_add_reference();
+ _M_call_callbacks(erase_event);
+ if (_M_word != _M_local_word)
+ {
+ delete [] _M_word;
+ _M_word = 0;
+ }
+ _M_dispose_callbacks();
+
+ // NB: Don't want any added during above.
+ _M_callbacks = __cb;
+ for (int __i = 0; __i < __rhs._M_word_size; ++__i)
+ __words[__i] = __rhs._M_word[__i];
+ _M_word = __words;
+ _M_word_size = __rhs._M_word_size;
+
+ this->flags(__rhs.flags());
+ this->width(__rhs.width());
+ this->precision(__rhs.precision());
+ this->tie(__rhs.tie());
+ this->fill(__rhs.fill());
+ _M_ios_locale = __rhs.getloc();
+ _M_cache_locale(_M_ios_locale);
+
+ _M_call_callbacks(copyfmt_event);
+
+ // The next is required to be the last assignment.
+ this->exceptions(__rhs.exceptions());
+ }
+ return *this;
+ }
+
+ // Locales:
+ template<typename _CharT, typename _Traits>
+ locale
+ basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
+ {
+ locale __old(this->getloc());
+ ios_base::imbue(__loc);
+ _M_cache_locale(__loc);
+ if (this->rdbuf() != 0)
+ this->rdbuf()->pubimbue(__loc);
+ return __old;
+ }
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
+ {
+ // NB: This may be called more than once on the same object.
+ ios_base::_M_init();
+
+ // Cache locale data and specific facets used by iostreams.
+ _M_cache_locale(_M_ios_locale);
+
+ // NB: The 27.4.4.1 Postconditions Table specifies requirements
+ // after basic_ios::init() has been called. As part of this,
+ // fill() must return widen(' ') any time after init() has been
+ // called, which needs an imbued ctype facet of char_type to
+ // return without throwing an exception. Unfortunately,
+ // ctype<char_type> is not necessarily a required facet, so
+ // streams with char_type != [char, wchar_t] will not have it by
+ // default. Because of this, the correct value for _M_fill is
+ // constructed on the first call of fill(). That way,
+ // unformatted input and output with non-required basic_ios
+ // instantiations is possible even without imbuing the expected
+ // ctype<char_type> facet.
+ _M_fill = _CharT();
+ _M_fill_init = false;
+
+ _M_tie = 0;
+ _M_exception = goodbit;
+ _M_streambuf = __sb;
+ _M_streambuf_state = __sb ? goodbit : badbit;
+ }
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc)
+ {
+ if (__builtin_expect(has_facet<__ctype_type>(__loc), true))
+ _M_ctype = &use_facet<__ctype_type>(__loc);
+ else
+ _M_ctype = 0;
+
+ if (__builtin_expect(has_facet<__num_put_type>(__loc), true))
+ _M_num_put = &use_facet<__num_put_type>(__loc);
+ else
+ _M_num_put = 0;
+
+ if (__builtin_expect(has_facet<__num_get_type>(__loc), true))
+ _M_num_get = &use_facet<__num_get_type>(__loc);
+ else
+ _M_num_get = 0;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_ios<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_ios<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.h
new file mode 100644
index 0000000..1e8300d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.h
@@ -0,0 +1,2692 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_string.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+#ifndef _BASIC_STRING_H
+#define _BASIC_STRING_H 1
+
+#pragma GCC system_header
+
+#include <ext/atomicity.h>
+#include <debug/debug.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @class basic_string basic_string.h <string>
+ * @brief Managing sequences of characters and character-like objects.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and a
+ * <a href="tables.html#67">sequence</a>. Of the
+ * <a href="tables.html#68">optional sequence requirements</a>, only
+ * @c push_back, @c at, and array access are supported.
+ *
+ * @doctodo
+ *
+ *
+ * Documentation? What's that?
+ * Nathan Myers <ncm@cantrip.org>.
+ *
+ * A string looks like this:
+ *
+ * @code
+ * [_Rep]
+ * _M_length
+ * [basic_string<char_type>] _M_capacity
+ * _M_dataplus _M_refcount
+ * _M_p ----------------> unnamed array of char_type
+ * @endcode
+ *
+ * Where the _M_p points to the first character in the string, and
+ * you cast it to a pointer-to-_Rep and subtract 1 to get a
+ * pointer to the header.
+ *
+ * This approach has the enormous advantage that a string object
+ * requires only one allocation. All the ugliness is confined
+ * within a single pair of inline functions, which each compile to
+ * a single "add" instruction: _Rep::_M_data(), and
+ * string::_M_rep(); and the allocation function which gets a
+ * block of raw bytes and with room enough and constructs a _Rep
+ * object at the front.
+ *
+ * The reason you want _M_data pointing to the character array and
+ * not the _Rep is so that the debugger can see the string
+ * contents. (Probably we should add a non-inline member to get
+ * the _Rep for the debugger to use, so users can check the actual
+ * string length.)
+ *
+ * Note that the _Rep object is a POD so that you can have a
+ * static "empty string" _Rep object already "constructed" before
+ * static constructors have run. The reference-count encoding is
+ * chosen so that a 0 indicates one reference, so you never try to
+ * destroy the empty-string _Rep object.
+ *
+ * All but the last paragraph is considered pretty conventional
+ * for a C++ string implementation.
+ */
+ // 21.3 Template class basic_string
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class basic_string
+ {
+ typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
+
+ // Types:
+ public:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Alloc allocator_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+ typedef typename _CharT_alloc_type::difference_type difference_type;
+ typedef typename _CharT_alloc_type::reference reference;
+ typedef typename _CharT_alloc_type::const_reference const_reference;
+ typedef typename _CharT_alloc_type::pointer pointer;
+ typedef typename _CharT_alloc_type::const_pointer const_pointer;
+ typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator;
+ typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string>
+ const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+
+ private:
+ // _Rep: string representation
+ // Invariants:
+ // 1. String really contains _M_length + 1 characters: due to 21.3.4
+ // must be kept null-terminated.
+ // 2. _M_capacity >= _M_length
+ // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT).
+ // 3. _M_refcount has three states:
+ // -1: leaked, one reference, no ref-copies allowed, non-const.
+ // 0: one reference, non-const.
+ // n>0: n + 1 references, operations require a lock, const.
+ // 4. All fields==0 is an empty string, given the extra storage
+ // beyond-the-end for a null terminator; thus, the shared
+ // empty string representation needs no constructor.
+
+ struct _Rep_base
+ {
+ size_type _M_length;
+ size_type _M_capacity;
+ _Atomic_word _M_refcount;
+ };
+
+ struct _Rep : _Rep_base
+ {
+ // Types:
+ typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc;
+
+ // (Public) Data members:
+
+ // The maximum number of individual char_type elements of an
+ // individual string is determined by _S_max_size. This is the
+ // value that will be returned by max_size(). (Whereas npos
+ // is the maximum number of bytes the allocator can allocate.)
+ // If one was to divvy up the theoretical largest size string,
+ // with a terminating character and m _CharT elements, it'd
+ // look like this:
+ // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)
+ // Solving for m:
+ // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1
+ // In addition, this implementation quarters this amount.
+ static const size_type _S_max_size;
+ static const _CharT _S_terminal;
+
+ // The following storage is init'd to 0 by the linker, resulting
+ // (carefully) in an empty string with one reference.
+ static size_type _S_empty_rep_storage[];
+
+ static _Rep&
+ _S_empty_rep()
+ {
+ // NB: Mild hack to avoid strict-aliasing warnings. Note that
+ // _S_empty_rep_storage is never modified and the punning should
+ // be reasonably safe in this case.
+ void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
+ return *reinterpret_cast<_Rep*>(__p);
+ }
+
+ bool
+ _M_is_leaked() const
+ { return this->_M_refcount < 0; }
+
+ bool
+ _M_is_shared() const
+ { return this->_M_refcount > 0; }
+
+ void
+ _M_set_leaked()
+ { this->_M_refcount = -1; }
+
+ void
+ _M_set_sharable()
+ { this->_M_refcount = 0; }
+
+ void
+ _M_set_length_and_sharable(size_type __n)
+ {
+ this->_M_set_sharable(); // One reference.
+ this->_M_length = __n;
+ traits_type::assign(this->_M_refdata()[__n], _S_terminal);
+ // grrr. (per 21.3.4)
+ // You cannot leave those LWG people alone for a second.
+ }
+
+ _CharT*
+ _M_refdata() throw()
+ { return reinterpret_cast<_CharT*>(this + 1); }
+
+ _CharT*
+ _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
+ {
+ return (!_M_is_leaked() && __alloc1 == __alloc2)
+ ? _M_refcopy() : _M_clone(__alloc1);
+ }
+
+ // Create & Destroy
+ static _Rep*
+ _S_create(size_type, size_type, const _Alloc&);
+
+ void
+ _M_dispose(const _Alloc& __a)
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (__builtin_expect(this != &_S_empty_rep(), false))
+#endif
+ if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
+ -1) <= 0)
+ _M_destroy(__a);
+ } // XXX MT
+
+ void
+ _M_destroy(const _Alloc&) throw();
+
+ _CharT*
+ _M_refcopy() throw()
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (__builtin_expect(this != &_S_empty_rep(), false))
+#endif
+ __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
+ return _M_refdata();
+ } // XXX MT
+
+ _CharT*
+ _M_clone(const _Alloc&, size_type __res = 0);
+ };
+
+ // Use empty-base optimization: http://www.cantrip.org/emptyopt.html
+ struct _Alloc_hider : _Alloc
+ {
+ _Alloc_hider(_CharT* __dat, const _Alloc& __a)
+ : _Alloc(__a), _M_p(__dat) { }
+
+ _CharT* _M_p; // The actual data.
+ };
+
+ public:
+ // Data Members (public):
+ // NB: This is an unsigned type, and thus represents the maximum
+ // size that the allocator can hold.
+ /// Value returned by various member functions when they fail.
+ static const size_type npos = static_cast<size_type>(-1);
+
+ private:
+ // Data Members (private):
+ mutable _Alloc_hider _M_dataplus;
+
+ _CharT*
+ _M_data() const
+ { return _M_dataplus._M_p; }
+
+ _CharT*
+ _M_data(_CharT* __p)
+ { return (_M_dataplus._M_p = __p); }
+
+ _Rep*
+ _M_rep() const
+ { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
+
+ // For the internal use we have functions similar to `begin'/`end'
+ // but they do not call _M_leak.
+ iterator
+ _M_ibegin() const
+ { return iterator(_M_data()); }
+
+ iterator
+ _M_iend() const
+ { return iterator(_M_data() + this->size()); }
+
+ void
+ _M_leak() // for use in begin() & non-const op[]
+ {
+ if (!_M_rep()->_M_is_leaked())
+ _M_leak_hard();
+ }
+
+ size_type
+ _M_check(size_type __pos, const char* __s) const
+ {
+ if (__pos > this->size())
+ __throw_out_of_range(__N(__s));
+ return __pos;
+ }
+
+ void
+ _M_check_length(size_type __n1, size_type __n2, const char* __s) const
+ {
+ if (this->max_size() - (this->size() - __n1) < __n2)
+ __throw_length_error(__N(__s));
+ }
+
+ // NB: _M_limit doesn't check for a bad __pos value.
+ size_type
+ _M_limit(size_type __pos, size_type __off) const
+ {
+ const bool __testoff = __off < this->size() - __pos;
+ return __testoff ? __off : this->size() - __pos;
+ }
+
+ // True if _Rep and source do not overlap.
+ bool
+ _M_disjunct(const _CharT* __s) const
+ {
+ return (less<const _CharT*>()(__s, _M_data())
+ || less<const _CharT*>()(_M_data() + this->size(), __s));
+ }
+
+ // When __n = 1 way faster than the general multichar
+ // traits_type::copy/move/assign.
+ static void
+ _M_copy(_CharT* __d, const _CharT* __s, size_type __n)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, *__s);
+ else
+ traits_type::copy(__d, __s, __n);
+ }
+
+ static void
+ _M_move(_CharT* __d, const _CharT* __s, size_type __n)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, *__s);
+ else
+ traits_type::move(__d, __s, __n);
+ }
+
+ static void
+ _M_assign(_CharT* __d, size_type __n, _CharT __c)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, __c);
+ else
+ traits_type::assign(__d, __n, __c);
+ }
+
+ // _S_copy_chars is a separate template to permit specialization
+ // to optimize for the common case of pointers as iterators.
+ template<class _Iterator>
+ static void
+ _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
+ {
+ for (; __k1 != __k2; ++__k1, ++__p)
+ traits_type::assign(*__p, *__k1); // These types are off.
+ }
+
+ static void
+ _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
+ { _M_copy(__p, __k1, __k2 - __k1); }
+
+ static void
+ _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
+ { _M_copy(__p, __k1, __k2 - __k1); }
+
+ static int
+ _S_compare(size_type __n1, size_type __n2)
+ {
+ const difference_type __d = difference_type(__n1 - __n2);
+
+ if (__d > __gnu_cxx::__numeric_traits<int>::__max)
+ return __gnu_cxx::__numeric_traits<int>::__max;
+ else if (__d < __gnu_cxx::__numeric_traits<int>::__min)
+ return __gnu_cxx::__numeric_traits<int>::__min;
+ else
+ return int(__d);
+ }
+
+ void
+ _M_mutate(size_type __pos, size_type __len1, size_type __len2);
+
+ void
+ _M_leak_hard();
+
+ static _Rep&
+ _S_empty_rep()
+ { return _Rep::_S_empty_rep(); }
+
+ public:
+ // Construct/copy/destroy:
+ // NB: We overload ctors in some cases instead of using default
+ // arguments, per 17.4.4.4 para. 2 item 2.
+
+ /**
+ * @brief Default constructor creates an empty string.
+ */
+ inline
+ basic_string();
+
+ /**
+ * @brief Construct an empty string using allocator @a a.
+ */
+ explicit
+ basic_string(const _Alloc& __a);
+
+ // NB: per LWG issue 42, semantics different from IS:
+ /**
+ * @brief Construct string with copy of value of @a str.
+ * @param str Source string.
+ */
+ basic_string(const basic_string& __str);
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param str Source string.
+ * @param pos Index of first character to copy from.
+ * @param n Number of characters to copy (default remainder).
+ */
+ basic_string(const basic_string& __str, size_type __pos,
+ size_type __n = npos);
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param str Source string.
+ * @param pos Index of first character to copy from.
+ * @param n Number of characters to copy.
+ * @param a Allocator to use.
+ */
+ basic_string(const basic_string& __str, size_type __pos,
+ size_type __n, const _Alloc& __a);
+
+ /**
+ * @brief Construct string initialized by a character array.
+ * @param s Source character array.
+ * @param n Number of characters to copy.
+ * @param a Allocator to use (default is default allocator).
+ *
+ * NB: @a s must have at least @a n characters, '\\0' has no special
+ * meaning.
+ */
+ basic_string(const _CharT* __s, size_type __n,
+ const _Alloc& __a = _Alloc());
+ /**
+ * @brief Construct string as copy of a C string.
+ * @param s Source C string.
+ * @param a Allocator to use (default is default allocator).
+ */
+ basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+ /**
+ * @brief Construct string as multiple characters.
+ * @param n Number of characters.
+ * @param c Character to use.
+ * @param a Allocator to use (default is default allocator).
+ */
+ basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Construct string from an initializer list.
+ * @param l std::initializer_list of characters.
+ * @param a Allocator to use (default is default allocator).
+ */
+ basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc());
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Construct string as copy of a range.
+ * @param beg Start of range.
+ * @param end End of range.
+ * @param a Allocator to use (default is default allocator).
+ */
+ template<class _InputIterator>
+ basic_string(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a = _Alloc());
+
+ /**
+ * @brief Destroy the string instance.
+ */
+ ~basic_string()
+ { _M_rep()->_M_dispose(this->get_allocator()); }
+
+ /**
+ * @brief Assign the value of @a str to this string.
+ * @param str Source string.
+ */
+ basic_string&
+ operator=(const basic_string& __str)
+ { return this->assign(__str); }
+
+ /**
+ * @brief Copy contents of @a s into this string.
+ * @param s Source null-terminated string.
+ */
+ basic_string&
+ operator=(const _CharT* __s)
+ { return this->assign(__s); }
+
+ /**
+ * @brief Set value to string of length 1.
+ * @param c Source character.
+ *
+ * Assigning to a character makes this string length 1 and
+ * (*this)[0] == @a c.
+ */
+ basic_string&
+ operator=(_CharT __c)
+ {
+ this->assign(1, __c);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Set value to string constructed from initializer list.
+ * @param l std::initializer_list.
+ */
+ basic_string&
+ operator=(initializer_list<_CharT> __l)
+ {
+ this->assign (__l.begin(), __l.end());
+ return *this;
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ // Iterators:
+ /**
+ * Returns a read/write iterator that points to the first character in
+ * the %string. Unshares the string.
+ */
+ iterator
+ begin()
+ {
+ _M_leak();
+ return iterator(_M_data());
+ }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * character in the %string.
+ */
+ const_iterator
+ begin() const
+ { return const_iterator(_M_data()); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * character in the %string. Unshares the string.
+ */
+ iterator
+ end()
+ {
+ _M_leak();
+ return iterator(_M_data() + this->size());
+ }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the
+ * last character in the %string.
+ */
+ const_iterator
+ end() const
+ { return const_iterator(_M_data() + this->size()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last
+ * character in the %string. Iteration is done in reverse element
+ * order. Unshares the string.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last character in the %string. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first character in the %string. Iteration is done in reverse
+ * element order. Unshares the string.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(this->begin()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first character in the %string. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->begin()); }
+
+ public:
+ // Capacity:
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
+ size_type
+ size() const
+ { return _M_rep()->_M_length; }
+
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
+ size_type
+ length() const
+ { return _M_rep()->_M_length; }
+
+ /// Returns the size() of the largest possible %string.
+ size_type
+ max_size() const
+ { return _Rep::_S_max_size; }
+
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param n Number of characters the %string should contain.
+ * @param c Character to fill any new elements.
+ *
+ * This function will %resize the %string to the specified
+ * number of characters. If the number is smaller than the
+ * %string's current size the %string is truncated, otherwise
+ * the %string is extended and new elements are set to @a c.
+ */
+ void
+ resize(size_type __n, _CharT __c);
+
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param n Number of characters the %string should contain.
+ *
+ * This function will resize the %string to the specified length. If
+ * the new size is smaller than the %string's current size the %string
+ * is truncated, otherwise the %string is extended and new characters
+ * are default-constructed. For basic types such as char, this means
+ * setting them to 0.
+ */
+ void
+ resize(size_type __n)
+ { this->resize(__n, _CharT()); }
+
+ /**
+ * Returns the total number of characters that the %string can hold
+ * before needing to allocate more memory.
+ */
+ size_type
+ capacity() const
+ { return _M_rep()->_M_capacity; }
+
+ /**
+ * @brief Attempt to preallocate enough memory for specified number of
+ * characters.
+ * @param res_arg Number of characters required.
+ * @throw std::length_error If @a res_arg exceeds @c max_size().
+ *
+ * This function attempts to reserve enough memory for the
+ * %string to hold the specified number of characters. If the
+ * number requested is more than max_size(), length_error is
+ * thrown.
+ *
+ * The advantage of this function is that if optimal code is a
+ * necessity and the user can determine the string length that will be
+ * required, the user can reserve the memory in %advance, and thus
+ * prevent a possible reallocation of memory and copying of %string
+ * data.
+ */
+ void
+ reserve(size_type __res_arg = 0);
+
+ /**
+ * Erases the string, making it empty.
+ */
+ void
+ clear()
+ { _M_mutate(0, this->size(), 0); }
+
+ /**
+ * Returns true if the %string is empty. Equivalent to *this == "".
+ */
+ bool
+ empty() const
+ { return this->size() == 0; }
+
+ // Element access:
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param pos The index of the character to access.
+ * @return Read-only (constant) reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ */
+ const_reference
+ operator[] (size_type __pos) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(__pos <= size());
+ return _M_data()[__pos];
+ }
+
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param pos The index of the character to access.
+ * @return Read/write reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().) Unshares the string.
+ */
+ reference
+ operator[](size_type __pos)
+ {
+ // allow pos == size() as v3 extension:
+ _GLIBCXX_DEBUG_ASSERT(__pos <= size());
+ // but be strict in pedantic mode:
+ _GLIBCXX_DEBUG_PEDASSERT(__pos < size());
+ _M_leak();
+ return _M_data()[__pos];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read-only (const) reference to the character.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is
+ * first checked that it is in the range of the string. The function
+ * throws out_of_range if the check fails.
+ */
+ const_reference
+ at(size_type __n) const
+ {
+ if (__n >= this->size())
+ __throw_out_of_range(__N("basic_string::at"));
+ return _M_data()[__n];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param n The index of the character to access.
+ * @return Read/write reference to the character.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is
+ * first checked that it is in the range of the string. The function
+ * throws out_of_range if the check fails. Success results in
+ * unsharing the string.
+ */
+ reference
+ at(size_type __n)
+ {
+ if (__n >= size())
+ __throw_out_of_range(__N("basic_string::at"));
+ _M_leak();
+ return _M_data()[__n];
+ }
+
+ // Modifiers:
+ /**
+ * @brief Append a string to this string.
+ * @param str The string to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ operator+=(const basic_string& __str)
+ { return this->append(__str); }
+
+ /**
+ * @brief Append a C string.
+ * @param s The C string to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ operator+=(const _CharT* __s)
+ { return this->append(__s); }
+
+ /**
+ * @brief Append a character.
+ * @param c The character to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ operator+=(_CharT __c)
+ {
+ this->push_back(__c);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Append an initializer_list of characters.
+ * @param l The initializer_list of characters to be appended.
+ * @return Reference to this string.
+ */
+ basic_string&
+ operator+=(initializer_list<_CharT> __l)
+ { return this->append(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Append a string to this string.
+ * @param str The string to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ append(const basic_string& __str);
+
+ /**
+ * @brief Append a substring.
+ * @param str The string to append.
+ * @param pos Index of the first character of str to append.
+ * @param n The number of characters to append.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a pos is not a valid index.
+ *
+ * This function appends @a n characters from @a str starting at @a pos
+ * to this string. If @a n is is larger than the number of available
+ * characters in @a str, the remainder of @a str is appended.
+ */
+ basic_string&
+ append(const basic_string& __str, size_type __pos, size_type __n);
+
+ /**
+ * @brief Append a C substring.
+ * @param s The C string to append.
+ * @param n The number of characters to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ append(const _CharT* __s, size_type __n);
+
+ /**
+ * @brief Append a C string.
+ * @param s The C string to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ append(const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->append(__s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Append multiple characters.
+ * @param n The number of characters to append.
+ * @param c The character to use.
+ * @return Reference to this string.
+ *
+ * Appends n copies of c to this string.
+ */
+ basic_string&
+ append(size_type __n, _CharT __c);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Append an initializer_list of characters.
+ * @param l The initializer_list of characters to append.
+ * @return Reference to this string.
+ */
+ basic_string&
+ append(initializer_list<_CharT> __l)
+ { return this->append(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Append a range of characters.
+ * @param first Iterator referencing the first character to append.
+ * @param last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Appends characters in the range [first,last) to this string.
+ */
+ template<class _InputIterator>
+ basic_string&
+ append(_InputIterator __first, _InputIterator __last)
+ { return this->replace(_M_iend(), _M_iend(), __first, __last); }
+
+ /**
+ * @brief Append a single character.
+ * @param c Character to append.
+ */
+ void
+ push_back(_CharT __c)
+ {
+ const size_type __len = 1 + this->size();
+ if (__len > this->capacity() || _M_rep()->_M_is_shared())
+ this->reserve(__len);
+ traits_type::assign(_M_data()[this->size()], __c);
+ _M_rep()->_M_set_length_and_sharable(__len);
+ }
+
+ /**
+ * @brief Set value to contents of another string.
+ * @param str Source string to use.
+ * @return Reference to this string.
+ */
+ basic_string&
+ assign(const basic_string& __str);
+
+ /**
+ * @brief Set value to a substring of a string.
+ * @param str The string to use.
+ * @param pos Index of the first character of str.
+ * @param n Number of characters to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a pos is not a valid index.
+ *
+ * This function sets this string to the substring of @a str consisting
+ * of @a n characters at @a pos. If @a n is is larger than the number
+ * of available characters in @a str, the remainder of @a str is used.
+ */
+ basic_string&
+ assign(const basic_string& __str, size_type __pos, size_type __n)
+ { return this->assign(__str._M_data()
+ + __str._M_check(__pos, "basic_string::assign"),
+ __str._M_limit(__pos, __n)); }
+
+ /**
+ * @brief Set value to a C substring.
+ * @param s The C string to use.
+ * @param n Number of characters to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the first @a n
+ * characters of @a s. If @a n is is larger than the number of
+ * available characters in @a s, the remainder of @a s is used.
+ */
+ basic_string&
+ assign(const _CharT* __s, size_type __n);
+
+ /**
+ * @brief Set value to contents of a C string.
+ * @param s The C string to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the value of @a s.
+ * The data is copied, so there is no dependence on @a s once the
+ * function returns.
+ */
+ basic_string&
+ assign(const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->assign(__s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Set value to multiple characters.
+ * @param n Length of the resulting string.
+ * @param c The character to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to @a n copies of
+ * character @a c.
+ */
+ basic_string&
+ assign(size_type __n, _CharT __c)
+ { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
+
+ /**
+ * @brief Set value to a range of characters.
+ * @param first Iterator referencing the first character to append.
+ * @param last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Sets value of string to characters in the range [first,last).
+ */
+ template<class _InputIterator>
+ basic_string&
+ assign(_InputIterator __first, _InputIterator __last)
+ { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Set value to an initializer_list of characters.
+ * @param l The initializer_list of characters to assign.
+ * @return Reference to this string.
+ */
+ basic_string&
+ assign(initializer_list<_CharT> __l)
+ { return this->assign(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Insert multiple characters.
+ * @param p Iterator referencing location in string to insert at.
+ * @param n Number of characters to insert
+ * @param c The character to insert.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts @a n copies of character @a c starting at the position
+ * referenced by iterator @a p. If adding characters causes the length
+ * to exceed max_size(), length_error is thrown. The value of the
+ * string doesn't change if an error is thrown.
+ */
+ void
+ insert(iterator __p, size_type __n, _CharT __c)
+ { this->replace(__p, __p, __n, __c); }
+
+ /**
+ * @brief Insert a range of characters.
+ * @param p Iterator referencing location in string to insert at.
+ * @param beg Start of range.
+ * @param end End of range.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts characters in range [beg,end). If adding characters causes
+ * the length to exceed max_size(), length_error is thrown. The value
+ * of the string doesn't change if an error is thrown.
+ */
+ template<class _InputIterator>
+ void
+ insert(iterator __p, _InputIterator __beg, _InputIterator __end)
+ { this->replace(__p, __p, __beg, __end); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Insert an initializer_list of characters.
+ * @param p Iterator referencing location in string to insert at.
+ * @param l The initializer_list of characters to insert.
+ * @throw std::length_error If new length exceeds @c max_size().
+ */
+ void
+ insert(iterator __p, initializer_list<_CharT> __l)
+ { this->insert(__p, __l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Insert value of a string.
+ * @param pos1 Iterator referencing location in string to insert at.
+ * @param str The string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts value of @a str starting at @a pos1. If adding characters
+ * causes the length to exceed max_size(), length_error is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str)
+ { return this->insert(__pos1, __str, size_type(0), __str.size()); }
+
+ /**
+ * @brief Insert a substring.
+ * @param pos1 Iterator referencing location in string to insert at.
+ * @param str The string to insert.
+ * @param pos2 Start of characters in str to insert.
+ * @param n Number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos1 > size() or
+ * @a pos2 > @a str.size().
+ *
+ * Starting at @a pos1, insert @a n character of @a str beginning with
+ * @a pos2. If adding characters causes the length to exceed
+ * max_size(), length_error is thrown. If @a pos1 is beyond the end of
+ * this string or @a pos2 is beyond the end of @a str, out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str,
+ size_type __pos2, size_type __n)
+ { return this->insert(__pos1, __str._M_data()
+ + __str._M_check(__pos2, "basic_string::insert"),
+ __str._M_limit(__pos2, __n)); }
+
+ /**
+ * @brief Insert a C substring.
+ * @param pos Iterator referencing location in string to insert at.
+ * @param s The C string to insert.
+ * @param n The number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a n characters of @a s starting at @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos is beyond end(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
+ basic_string&
+ insert(size_type __pos, const _CharT* __s, size_type __n);
+
+ /**
+ * @brief Insert a C string.
+ * @param pos Iterator referencing location in string to insert at.
+ * @param s The C string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a n characters of @a s starting at @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos is beyond end(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
+ basic_string&
+ insert(size_type __pos, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->insert(__pos, __s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Insert multiple characters.
+ * @param pos Index in string to insert at.
+ * @param n Number of characters to insert
+ * @param c The character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Inserts @a n copies of character @a c starting at index @a pos. If
+ * adding characters causes the length to exceed max_size(),
+ * length_error is thrown. If @a pos > length(), out_of_range is
+ * thrown. The value of the string doesn't change if an error is
+ * thrown.
+ */
+ basic_string&
+ insert(size_type __pos, size_type __n, _CharT __c)
+ { return _M_replace_aux(_M_check(__pos, "basic_string::insert"),
+ size_type(0), __n, __c); }
+
+ /**
+ * @brief Insert one character.
+ * @param p Iterator referencing position in string to insert at.
+ * @param c The character to insert.
+ * @return Iterator referencing newly inserted char.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts character @a c at position referenced by @a p. If adding
+ * character causes the length to exceed max_size(), length_error is
+ * thrown. If @a p is beyond end of string, out_of_range is thrown.
+ * The value of the string doesn't change if an error is thrown.
+ */
+ iterator
+ insert(iterator __p, _CharT __c)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
+ const size_type __pos = __p - _M_ibegin();
+ _M_replace_aux(__pos, size_type(0), size_type(1), __c);
+ _M_rep()->_M_set_leaked();
+ return iterator(_M_data() + __pos);
+ }
+
+ /**
+ * @brief Remove characters.
+ * @param pos Index of first character to remove (default 0).
+ * @param n Number of characters to remove (default remainder).
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ *
+ * Removes @a n characters from this string starting at @a pos. The
+ * length of the string is reduced by @a n. If there are < @a n
+ * characters to remove, the remainder of the string is truncated. If
+ * @a p is beyond end of string, out_of_range is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
+ basic_string&
+ erase(size_type __pos = 0, size_type __n = npos)
+ {
+ _M_mutate(_M_check(__pos, "basic_string::erase"),
+ _M_limit(__pos, __n), size_type(0));
+ return *this;
+ }
+
+ /**
+ * @brief Remove one character.
+ * @param position Iterator referencing the character to remove.
+ * @return iterator referencing same location after removal.
+ *
+ * Removes the character at @a position from this string. The value
+ * of the string doesn't change if an error is thrown.
+ */
+ iterator
+ erase(iterator __position)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()
+ && __position < _M_iend());
+ const size_type __pos = __position - _M_ibegin();
+ _M_mutate(__pos, size_type(1), size_type(0));
+ _M_rep()->_M_set_leaked();
+ return iterator(_M_data() + __pos);
+ }
+
+ /**
+ * @brief Remove a range of characters.
+ * @param first Iterator referencing the first character to remove.
+ * @param last Iterator referencing the end of the range.
+ * @return Iterator referencing location of first after removal.
+ *
+ * Removes the characters in the range [first,last) from this string.
+ * The value of the string doesn't change if an error is thrown.
+ */
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last
+ && __last <= _M_iend());
+ const size_type __pos = __first - _M_ibegin();
+ _M_mutate(__pos, __last - __first, size_type(0));
+ _M_rep()->_M_set_leaked();
+ return iterator(_M_data() + __pos);
+ }
+
+ /**
+ * @brief Replace characters with value from another string.
+ * @param pos Index of first character to replace.
+ * @param n Number of characters to be replaced.
+ * @param str String to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos is beyond the end of this
+ * string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos+n) from this string.
+ * In place, the value of @a str is inserted. If @a pos is beyond end
+ * of string, out_of_range is thrown. If the length of the result
+ * exceeds max_size(), length_error is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
+ basic_string&
+ replace(size_type __pos, size_type __n, const basic_string& __str)
+ { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+
+ /**
+ * @brief Replace characters with value from another string.
+ * @param pos1 Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param str String to insert.
+ * @param pos2 Index of first character of str to use.
+ * @param n2 Number of characters from str to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos1 > size() or @a pos2 >
+ * str.size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos1,pos1 + n) from this
+ * string. In place, the value of @a str is inserted. If @a pos is
+ * beyond end of string, out_of_range is thrown. If the length of the
+ * result exceeds max_size(), length_error is thrown. The value of the
+ * string doesn't change if an error is thrown.
+ */
+ basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2)
+ { return this->replace(__pos1, __n1, __str._M_data()
+ + __str._M_check(__pos2, "basic_string::replace"),
+ __str._M_limit(__pos2, __n2)); }
+
+ /**
+ * @brief Replace characters with value of a C substring.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param s C string to insert.
+ * @param n2 Number of characters from @a s to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos1 > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, the first @a n2 characters of @a s are inserted, or all
+ * of @a s if @a n2 is too large. If @a pos is beyond end of string,
+ * out_of_range is thrown. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2);
+
+ /**
+ * @brief Replace characters with value of a C string.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param s C string to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, the first @a n characters of @a s are inserted. If @a
+ * pos is beyond end of string, out_of_range is thrown. If the length
+ * of result exceeds max_size(), length_error is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__pos, __n1, __s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Replace characters with multiple characters.
+ * @param pos Index of first character to replace.
+ * @param n1 Number of characters to be replaced.
+ * @param n2 Number of characters to insert.
+ * @param c Character to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this string.
+ * In place, @a n2 copies of @a c are inserted. If @a pos is beyond
+ * end of string, out_of_range is thrown. If the length of result
+ * exceeds max_size(), length_error is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
+ basic_string&
+ replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+ { return _M_replace_aux(_M_check(__pos, "basic_string::replace"),
+ _M_limit(__pos, __n1), __n2, __c); }
+
+ /**
+ * @brief Replace range of characters with string.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param str String value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the value of
+ * @a str is inserted. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
+ basic_string&
+ replace(iterator __i1, iterator __i2, const basic_string& __str)
+ { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+
+ /**
+ * @brief Replace range of characters with C substring.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param s C string value to insert.
+ * @param n Number of characters from s to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the first @a
+ * n characters of @a s are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+ }
+
+ /**
+ * @brief Replace range of characters with C string.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param s C string value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the
+ * characters of @a s are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__i1, __i2, __s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Replace range of characters with multiple characters
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param n Number of characters to insert.
+ * @param c Character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, @a n copies
+ * of @a c are inserted. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't change if
+ * an error is thrown.
+ */
+ basic_string&
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
+ }
+
+ /**
+ * @brief Replace range of characters with range.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param k1 Iterator referencing start of range to insert.
+ * @param k2 Iterator referencing end of range to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, characters
+ * in the range [k1,k2) are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ template<class _InputIterator>
+ basic_string&
+ replace(iterator __i1, iterator __i2,
+ _InputIterator __k1, _InputIterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
+ }
+
+ // Specializations for the common case of pointer and iterator:
+ // useful to avoid the overhead of temporary buffering in _M_replace.
+ basic_string&
+ replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2,
+ const _CharT* __k1, const _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1.base(), __k2 - __k1);
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2,
+ const_iterator __k1, const_iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1.base(), __k2 - __k1);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Replace range of characters with initializer_list.
+ * @param i1 Iterator referencing start of range to replace.
+ * @param i2 Iterator referencing end of range to replace.
+ * @param l The initializer_list of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, characters
+ * in the range [k1,k2) are inserted. If the length of result exceeds
+ * max_size(), length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ basic_string& replace(iterator __i1, iterator __i2,
+ initializer_list<_CharT> __l)
+ { return this->replace(__i1, __i2, __l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ private:
+ template<class _Integer>
+ basic_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
+ _Integer __val, __true_type)
+ { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
+
+ template<class _InputIterator>
+ basic_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, __false_type);
+
+ basic_string&
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c);
+
+ basic_string&
+ _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+ size_type __n2);
+
+ // _S_construct_aux is used to implement the 21.3.1 para 15 which
+ // requires special behaviour if _InIter is an integral type
+ template<class _InIterator>
+ static _CharT*
+ _S_construct_aux(_InIterator __beg, _InIterator __end,
+ const _Alloc& __a, __false_type)
+ {
+ typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
+ return _S_construct(__beg, __end, __a, _Tag());
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<class _Integer>
+ static _CharT*
+ _S_construct_aux(_Integer __beg, _Integer __end,
+ const _Alloc& __a, __true_type)
+ { return _S_construct(static_cast<size_type>(__beg), __end, __a); }
+
+ template<class _InIterator>
+ static _CharT*
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
+ {
+ typedef typename std::__is_integer<_InIterator>::__type _Integral;
+ return _S_construct_aux(__beg, __end, __a, _Integral());
+ }
+
+ // For Input Iterators, used in istreambuf_iterators, etc.
+ template<class _InIterator>
+ static _CharT*
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ input_iterator_tag);
+
+ // For forward_iterators up to random_access_iterators, used for
+ // string::iterator, _CharT*, etc.
+ template<class _FwdIterator>
+ static _CharT*
+ _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
+ forward_iterator_tag);
+
+ static _CharT*
+ _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
+
+ public:
+
+ /**
+ * @brief Copy substring into C string.
+ * @param s C string to copy value into.
+ * @param n Number of characters to copy.
+ * @param pos Index of first character to copy.
+ * @return Number of characters actually copied
+ * @throw std::out_of_range If pos > size().
+ *
+ * Copies up to @a n characters starting at @a pos into the C string @a
+ * s. If @a pos is greater than size(), out_of_range is thrown.
+ */
+ size_type
+ copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+
+ /**
+ * @brief Swap contents with another string.
+ * @param s String to swap with.
+ *
+ * Exchanges the contents of this string with that of @a s in constant
+ * time.
+ */
+ void
+ swap(basic_string& __s);
+
+ // String operations:
+ /**
+ * @brief Return const pointer to null-terminated contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
+ const _CharT*
+ c_str() const
+ { return _M_data(); }
+
+ /**
+ * @brief Return const pointer to contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
+ const _CharT*
+ data() const
+ { return _M_data(); }
+
+ /**
+ * @brief Return copy of allocator used to construct this string.
+ */
+ allocator_type
+ get_allocator() const
+ { return _M_dataplus; }
+
+ /**
+ * @brief Find position of a C substring.
+ * @param s C string to locate.
+ * @param pos Index of character to search from.
+ * @param n Number of characters from @a s to search for.
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the first @a n characters
+ * in @a s within this string. If found, returns the index where it
+ * begins. If not found, returns npos.
+ */
+ size_type
+ find(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find position of a string.
+ * @param str String to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for value of @a str within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
+ size_type
+ find(const basic_string& __str, size_type __pos = 0) const
+ { return this->find(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a C string.
+ * @param s C string to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the value of @a s within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
+ size_type
+ find(_CharT __c, size_type __pos = 0) const;
+
+ /**
+ * @brief Find last position of a string.
+ * @param str String to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for value of @a str within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
+ size_type
+ rfind(const basic_string& __str, size_type __pos = npos) const
+ { return this->rfind(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a C substring.
+ * @param s C string to locate.
+ * @param pos Index of character to search back from.
+ * @param n Number of characters from s to search for.
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for the first @a n
+ * characters in @a s within this string. If found, returns the index
+ * where it begins. If not found, returns npos.
+ */
+ size_type
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find last position of a C string.
+ * @param s C string to locate.
+ * @param pos Index of character to start search at (default end).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a pos, searches backward for the value of @a s within
+ * this string. If found, returns the index where it begins. If not
+ * found, returns npos.
+ */
+ size_type
+ rfind(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->rfind(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
+ size_type
+ rfind(_CharT __c, size_type __pos = npos) const;
+
+ /**
+ * @brief Find position of a character of string.
+ * @param str String containing characters to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the characters of
+ * @a str within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_first_of(const basic_string& __str, size_type __pos = 0) const
+ { return this->find_first_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a character of C substring.
+ * @param s String containing characters to locate.
+ * @param pos Index of character to search from.
+ * @param n Number of characters from s to search for.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the first @a n
+ * characters of @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find position of a character of C string.
+ * @param s String containing characters to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for one of the characters of
+ * @a s within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for the character @a c within
+ * this string. If found, returns the index where it was found. If
+ * not found, returns npos.
+ *
+ * Note: equivalent to find(c, pos).
+ */
+ size_type
+ find_first_of(_CharT __c, size_type __pos = 0) const
+ { return this->find(__c, __pos); }
+
+ /**
+ * @brief Find last position of a character of string.
+ * @param str String containing characters to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the characters of
+ * @a str within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_last_of(const basic_string& __str, size_type __pos = npos) const
+ { return this->find_last_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a character of C substring.
+ * @param s C string containing characters to locate.
+ * @param pos Index of character to search back from.
+ * @param n Number of characters from s to search for.
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the first @a n
+ * characters of @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find last position of a character of C string.
+ * @param s C string containing characters to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for one of the characters of
+ * @a s within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a character.
+ * @param c Character to locate.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for @a c within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ *
+ * Note: equivalent to rfind(c, pos).
+ */
+ size_type
+ find_last_of(_CharT __c, size_type __pos = npos) const
+ { return this->rfind(__c, __pos); }
+
+ /**
+ * @brief Find position of a character not in string.
+ * @param str String containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in @a str within this string. If found, returns the index where it
+ * was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+ { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a character not in C substring.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from.
+ * @param n Number of characters from s to consider.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in the first @a n characters of @a s within this string. If found,
+ * returns the index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+
+ /**
+ * @brief Find position of a character not in C string.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character not contained
+ * in @a s within this string. If found, returns the index where it
+ * was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_not_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a different character.
+ * @param c Character to avoid.
+ * @param pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a pos, searches forward for a character other than @a c
+ * within this string. If found, returns the index where it was found.
+ * If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(_CharT __c, size_type __pos = 0) const;
+
+ /**
+ * @brief Find last position of a character not in string.
+ * @param str String containing characters to avoid.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in @a str within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
+ size_type
+ find_last_not_of(const basic_string& __str, size_type __pos = npos) const
+ { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a character not in C substring.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search back from.
+ * @param n Number of characters from s to consider.
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in the first @a n characters of @a s within this string.
+ * If found, returns the index where it was found. If not found,
+ * returns npos.
+ */
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+ /**
+ * @brief Find last position of a character not in C string.
+ * @param s C string containing characters to avoid.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for a character not
+ * contained in @a s within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ */
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_not_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a different character.
+ * @param c Character to avoid.
+ * @param pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a pos, searches backward for a character other than
+ * @a c within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_last_not_of(_CharT __c, size_type __pos = npos) const;
+
+ /**
+ * @brief Get a substring.
+ * @param pos Index of first character (default 0).
+ * @param n Number of characters in substring (default remainder).
+ * @return The new string.
+ * @throw std::out_of_range If pos > size().
+ *
+ * Construct and return a new string using the @a n characters starting
+ * at @a pos. If the string is too short, use the remainder of the
+ * characters. If @a pos is beyond the end of the string, out_of_range
+ * is thrown.
+ */
+ basic_string
+ substr(size_type __pos = 0, size_type __n = npos) const
+ { return basic_string(*this,
+ _M_check(__pos, "basic_string::substr"), __n); }
+
+ /**
+ * @brief Compare to a string.
+ * @param str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a str, 0 if
+ * their values are equivalent, or > 0 if this string is ordered after
+ * @a str. Determines the effective length rlen of the strings to
+ * compare as the smallest of size() and str.size(). The function
+ * then compares the two strings by calling traits::compare(data(),
+ * str.data(),rlen). If the result of the comparison is nonzero returns
+ * it, otherwise the shorter one is ordered first.
+ */
+ int
+ compare(const basic_string& __str) const
+ {
+ const size_type __size = this->size();
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__size, __osize);
+
+ int __r = traits_type::compare(_M_data(), __str.data(), __len);
+ if (!__r)
+ __r = _S_compare(__size, __osize);
+ return __r;
+ }
+
+ /**
+ * @brief Compare substring to a string.
+ * @param pos Index of first character of substring.
+ * @param n Number of characters in substring.
+ * @param str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n characters starting
+ * at @a pos. Returns an integer < 0 if the substring is ordered
+ * before @a str, 0 if their values are equivalent, or > 0 if the
+ * substring is ordered after @a str. Determines the effective length
+ * rlen of the strings to compare as the smallest of the length of the
+ * substring and @a str.size(). The function then compares the two
+ * strings by calling traits::compare(substring.data(),str.data(),rlen).
+ * If the result of the comparison is nonzero returns it, otherwise the
+ * shorter one is ordered first.
+ */
+ int
+ compare(size_type __pos, size_type __n, const basic_string& __str) const;
+
+ /**
+ * @brief Compare substring to a substring.
+ * @param pos1 Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param str String to compare against.
+ * @param pos2 Index of first character of substring of str.
+ * @param n2 Number of characters in substring of str.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos1. Form the substring of @a str from the @a n2 characters
+ * starting at @a pos2. Returns an integer < 0 if this substring is
+ * ordered before the substring of @a str, 0 if their values are
+ * equivalent, or > 0 if this substring is ordered after the substring
+ * of @a str. Determines the effective length rlen of the strings
+ * to compare as the smallest of the lengths of the substrings. The
+ * function then compares the two strings by calling
+ * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).
+ * If the result of the comparison is nonzero returns it, otherwise the
+ * shorter one is ordered first.
+ */
+ int
+ compare(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2) const;
+
+ /**
+ * @brief Compare to a C string.
+ * @param s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a s, 0 if
+ * their values are equivalent, or > 0 if this string is ordered after
+ * @a s. Determines the effective length rlen of the strings to
+ * compare as the smallest of size() and the length of a string
+ * constructed from @a s. The function then compares the two strings
+ * by calling traits::compare(data(),s,rlen). If the result of the
+ * comparison is nonzero returns it, otherwise the shorter one is
+ * ordered first.
+ */
+ int
+ compare(const _CharT* __s) const;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5 String::compare specification questionable
+ /**
+ * @brief Compare substring to a C string.
+ * @param pos Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos. Returns an integer < 0 if the substring is ordered
+ * before @a s, 0 if their values are equivalent, or > 0 if the
+ * substring is ordered after @a s. Determines the effective length
+ * rlen of the strings to compare as the smallest of the length of the
+ * substring and the length of a string constructed from @a s. The
+ * function then compares the two string by calling
+ * traits::compare(substring.data(),s,rlen). If the result of the
+ * comparison is nonzero returns it, otherwise the shorter one is
+ * ordered first.
+ */
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+
+ /**
+ * @brief Compare substring against a character array.
+ * @param pos1 Index of first character of substring.
+ * @param n1 Number of characters in substring.
+ * @param s character array to compare against.
+ * @param n2 Number of characters of s.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a n1 characters starting
+ * at @a pos1. Form a string from the first @a n2 characters of @a s.
+ * Returns an integer < 0 if this substring is ordered before the string
+ * from @a s, 0 if their values are equivalent, or > 0 if this substring
+ * is ordered after the string from @a s. Determines the effective
+ * length rlen of the strings to compare as the smallest of the length
+ * of the substring and @a n2. The function then compares the two
+ * strings by calling traits::compare(substring.data(),s,rlen). If the
+ * result of the comparison is nonzero returns it, otherwise the shorter
+ * one is ordered first.
+ *
+ * NB: s must have at least n2 characters, '\\0' has no special
+ * meaning.
+ */
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2) const;
+ };
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline basic_string<_CharT, _Traits, _Alloc>::
+ basic_string()
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { }
+#else
+ : _M_dataplus(_S_construct(size_type(), _CharT(), _Alloc()), _Alloc()) { }
+#endif
+
+ // operator+
+ /**
+ * @brief Concatenate two strings.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with value of @a lhs followed by @a rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>
+ operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ {
+ basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ /**
+ * @brief Concatenate C string and string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with value of @a lhs followed by @a rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT,_Traits,_Alloc>
+ operator+(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+ /**
+ * @brief Concatenate character and string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT,_Traits,_Alloc>
+ operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+ /**
+ * @brief Concatenate string and C string.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline basic_string<_CharT, _Traits, _Alloc>
+ operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ {
+ basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ /**
+ * @brief Concatenate string and character.
+ * @param lhs First string.
+ * @param rhs Last string.
+ * @return New string with @a lhs followed by @a rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline basic_string<_CharT, _Traits, _Alloc>
+ operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
+ {
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ __string_type __str(__lhs);
+ __str.append(__size_type(1), __rhs);
+ return __str;
+ }
+
+ // operator ==
+ /**
+ * @brief Test equivalence of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs.compare(@a rhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __lhs.compare(__rhs) == 0; }
+
+ template<typename _CharT>
+ inline
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type
+ operator==(const basic_string<_CharT>& __lhs,
+ const basic_string<_CharT>& __rhs)
+ { return (__lhs.size() == __rhs.size()
+ && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(),
+ __lhs.size())); }
+
+ /**
+ * @brief Test equivalence of C string and string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a rhs.compare(@a lhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator==(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __rhs.compare(__lhs) == 0; }
+
+ /**
+ * @brief Test equivalence of string and C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs.compare(@a rhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) == 0; }
+
+ // operator !=
+ /**
+ * @brief Test difference of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs.compare(@a rhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * @brief Test difference of C string and string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a rhs.compare(@a lhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator!=(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * @brief Test difference of string and C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs.compare(@a rhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return !(__lhs == __rhs); }
+
+ // operator <
+ /**
+ * @brief Test if string precedes string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __lhs.compare(__rhs) < 0; }
+
+ /**
+ * @brief Test if string precedes C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) < 0; }
+
+ /**
+ * @brief Test if C string precedes string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs precedes @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __rhs.compare(__lhs) > 0; }
+
+ // operator >
+ /**
+ * @brief Test if string follows string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __lhs.compare(__rhs) > 0; }
+
+ /**
+ * @brief Test if string follows C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) > 0; }
+
+ /**
+ * @brief Test if C string follows string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs follows @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __rhs.compare(__lhs) < 0; }
+
+ // operator <=
+ /**
+ * @brief Test if string doesn't follow string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __lhs.compare(__rhs) <= 0; }
+
+ /**
+ * @brief Test if string doesn't follow C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) <= 0; }
+
+ /**
+ * @brief Test if C string doesn't follow string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs doesn't follow @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator<=(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __rhs.compare(__lhs) >= 0; }
+
+ // operator >=
+ /**
+ * @brief Test if string doesn't precede string.
+ * @param lhs First string.
+ * @param rhs Second string.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __lhs.compare(__rhs) >= 0; }
+
+ /**
+ * @brief Test if string doesn't precede C string.
+ * @param lhs String.
+ * @param rhs C string.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) >= 0; }
+
+ /**
+ * @brief Test if C string doesn't precede string.
+ * @param lhs C string.
+ * @param rhs String.
+ * @return True if @a lhs doesn't precede @a rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline bool
+ operator>=(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { return __rhs.compare(__lhs) <= 0; }
+
+ /**
+ * @brief Swap contents of two strings.
+ * @param lhs First string.
+ * @param rhs Second string.
+ *
+ * Exchanges the contents of @a lhs and @a rhs in constant time.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline void
+ swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
+ basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ /**
+ * @brief Read stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a is into @a str until whitespace is found, the
+ * end of the stream is encountered, or str.max_size() is reached. If
+ * is.width() is non-zero, that is the limit on the number of characters
+ * stored into @a str. Any previous contents of @a str are erased.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT, _Traits, _Alloc>& __str);
+
+ template<>
+ basic_istream<char>&
+ operator>>(basic_istream<char>& __is, basic_string<char>& __str);
+
+ /**
+ * @brief Write string to a stream.
+ * @param os Output stream.
+ * @param str String to write out.
+ * @return Reference to the output stream.
+ *
+ * Output characters of @a str into os following the same rules as for
+ * writing a C string.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const basic_string<_CharT, _Traits, _Alloc>& __str)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 586. string inserter not a formatted function
+ return __ostream_insert(__os, __str.data(), __str.size());
+ }
+
+ /**
+ * @brief Read a line from stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @param delim Character marking end of line.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a is into @a str until @a delim is found, the
+ * end of the stream is encountered, or str.max_size() is reached. If
+ * is.width() is non-zero, that is the limit on the number of characters
+ * stored into @a str. Any previous contents of @a str are erased. If @a
+ * delim was encountered, it is extracted but not stored into @a str.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
+
+ /**
+ * @brief Read a line from stream into a string.
+ * @param is Input stream.
+ * @param str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from is into @a str until '\n' is found, the end of
+ * the stream is encountered, or str.max_size() is reached. If is.width()
+ * is non-zero, that is the limit on the number of characters stored into
+ * @a str. Any previous contents of @a str are erased. If end of line was
+ * encountered, it is extracted but not stored into @a str.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ inline basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT, _Traits, _Alloc>& __str)
+ { return getline(__is, __str, __is.widen('\n')); }
+
+ template<>
+ basic_istream<char>&
+ getline(basic_istream<char>& __in, basic_string<char>& __str,
+ char __delim);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ basic_istream<wchar_t>&
+ getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str,
+ wchar_t __delim);
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \
+ && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
+
+#include <ext/string_conversions.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 21.4 Numeric Conversions [string.conversions].
+ inline int
+ stoi(const string& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
+ __idx, __base); }
+
+ inline long
+ stol(const string& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long
+ stoul(const string& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
+ __idx, __base); }
+
+ inline long long
+ stoll(const string& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long long
+ stoull(const string& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
+ __idx, __base); }
+
+ // NB: strtof vs strtod.
+ inline float
+ stof(const string& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
+
+ inline double
+ stod(const string& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
+
+ inline long double
+ stold(const string& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
+
+ // NB: (v)snprintf vs sprintf.
+ inline string
+ to_string(long long __val)
+ { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+ 4 * sizeof(long long),
+ "%lld", __val); }
+
+ inline string
+ to_string(unsigned long long __val)
+ { return __gnu_cxx::__to_xstring<string>(&std::vsnprintf,
+ 4 * sizeof(unsigned long long),
+ "%llu", __val); }
+
+ inline string
+ to_string(long double __val)
+ {
+ const int __n =
+ __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;
+ return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n,
+ "%Lf", __val);
+ }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ inline int
+ stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
+ __idx, __base); }
+
+ inline long
+ stol(const wstring& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long
+ stoul(const wstring& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),
+ __idx, __base); }
+
+ inline long long
+ stoll(const wstring& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long long
+ stoull(const wstring& __str, size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
+ __idx, __base); }
+
+ // NB: wcstof vs wcstod.
+ inline float
+ stof(const wstring& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
+
+ inline double
+ stod(const wstring& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
+
+ inline long double
+ stold(const wstring& __str, size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
+
+ inline wstring
+ to_wstring(long long __val)
+ { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+ 4 * sizeof(long long),
+ L"%lld", __val); }
+
+ inline wstring
+ to_wstring(unsigned long long __val)
+ { return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf,
+ 4 * sizeof(unsigned long long),
+ L"%llu", __val); }
+
+ inline wstring
+ to_wstring(long double __val)
+ {
+ const int __n =
+ __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 20;
+ return __gnu_cxx::__to_xstring<wstring>(&std::vswprintf, __n,
+ L"%Lf", __val);
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#endif /* _BASIC_STRING_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.tcc
new file mode 100644
index 0000000..a5553c6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/basic_string.tcc
@@ -0,0 +1,1144 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file basic_string.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+// Written by Jason Merrill based upon the specification by Takanori Adachi
+// in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers to ISO-14882.
+
+#ifndef _BASIC_STRING_TCC
+#define _BASIC_STRING_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4;
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ const _CharT
+ basic_string<_CharT, _Traits, _Alloc>::
+ _Rep::_S_terminal = _CharT();
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::npos;
+
+ // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string)
+ // at static init time (before static ctors are run).
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[
+ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) /
+ sizeof(size_type)];
+
+ // NB: This is the special case for Input Iterators, used in
+ // istreambuf_iterators, etc.
+ // Input Iterators have a cost structure very different from
+ // pointers, calling for a different coding style.
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InIterator>
+ _CharT*
+ basic_string<_CharT, _Traits, _Alloc>::
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ input_iterator_tag)
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (__beg == __end && __a == _Alloc())
+ return _S_empty_rep()._M_refdata();
+#endif
+ // Avoid reallocation for common case.
+ _CharT __buf[128];
+ size_type __len = 0;
+ while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
+ {
+ __buf[__len++] = *__beg;
+ ++__beg;
+ }
+ _Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
+ _M_copy(__r->_M_refdata(), __buf, __len);
+ __try
+ {
+ while (__beg != __end)
+ {
+ if (__len == __r->_M_capacity)
+ {
+ // Allocate more space.
+ _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
+ _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
+ __r->_M_destroy(__a);
+ __r = __another;
+ }
+ __r->_M_refdata()[__len++] = *__beg;
+ ++__beg;
+ }
+ }
+ __catch(...)
+ {
+ __r->_M_destroy(__a);
+ __throw_exception_again;
+ }
+ __r->_M_set_length_and_sharable(__len);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template <typename _InIterator>
+ _CharT*
+ basic_string<_CharT, _Traits, _Alloc>::
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ forward_iterator_tag)
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (__beg == __end && __a == _Alloc())
+ return _S_empty_rep()._M_refdata();
+#endif
+ // NB: Not required, but considered best practice.
+ if (__builtin_expect(__gnu_cxx::__is_null_pointer(__beg)
+ && __beg != __end, 0))
+ __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
+
+ const size_type __dnew = static_cast<size_type>(std::distance(__beg,
+ __end));
+ // Check for out_of_range and length_error exceptions.
+ _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
+ __try
+ { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
+ __catch(...)
+ {
+ __r->_M_destroy(__a);
+ __throw_exception_again;
+ }
+ __r->_M_set_length_and_sharable(__dnew);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ _CharT*
+ basic_string<_CharT, _Traits, _Alloc>::
+ _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (__n == 0 && __a == _Alloc())
+ return _S_empty_rep()._M_refdata();
+#endif
+ // Check for out_of_range and length_error exceptions.
+ _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
+ if (__n)
+ _M_assign(__r->_M_refdata(), __n, __c);
+
+ __r->_M_set_length_and_sharable(__n);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const basic_string& __str)
+ : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()),
+ __str.get_allocator()),
+ __str.get_allocator())
+ { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const _Alloc& __a)
+ : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
+ { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const basic_string& __str, size_type __pos, size_type __n)
+ : _M_dataplus(_S_construct(__str._M_data()
+ + __str._M_check(__pos,
+ "basic_string::basic_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, _Alloc()), _Alloc())
+ { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const basic_string& __str, size_type __pos,
+ size_type __n, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__str._M_data()
+ + __str._M_check(__pos,
+ "basic_string::basic_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, __a), __a)
+ { }
+
+ // TBD: DPG annotate
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
+ { }
+
+ // TBD: DPG annotate
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(const _CharT* __s, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) :
+ __s + npos, __a), __a)
+ { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(size_type __n, _CharT __c, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__n, __c, __a), __a)
+ { }
+
+ // TBD: DPG annotate
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InputIterator>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__beg, __end, __a), __a)
+ { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>::
+ basic_string(initializer_list<_CharT> __l, const _Alloc& __a)
+ : _M_dataplus(_S_construct(__l.begin(), __l.end(), __a), __a)
+ { }
+#endif
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ assign(const basic_string& __str)
+ {
+ if (_M_rep() != __str._M_rep())
+ {
+ // XXX MT
+ const allocator_type __a = this->get_allocator();
+ _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
+ _M_rep()->_M_dispose(__a);
+ _M_data(__tmp);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ assign(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ _M_check_length(this->size(), __n, "basic_string::assign");
+ if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+ return _M_replace_safe(size_type(0), this->size(), __s, __n);
+ else
+ {
+ // Work in-place.
+ const size_type __pos = __s - _M_data();
+ if (__pos >= __n)
+ _M_copy(_M_data(), __s, __n);
+ else if (__pos)
+ _M_move(_M_data(), __s, __n);
+ _M_rep()->_M_set_length_and_sharable(__n);
+ return *this;
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ append(size_type __n, _CharT __c)
+ {
+ if (__n)
+ {
+ _M_check_length(size_type(0), __n, "basic_string::append");
+ const size_type __len = __n + this->size();
+ if (__len > this->capacity() || _M_rep()->_M_is_shared())
+ this->reserve(__len);
+ _M_assign(_M_data() + this->size(), __n, __c);
+ _M_rep()->_M_set_length_and_sharable(__len);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ append(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ if (__n)
+ {
+ _M_check_length(size_type(0), __n, "basic_string::append");
+ const size_type __len = __n + this->size();
+ if (__len > this->capacity() || _M_rep()->_M_is_shared())
+ {
+ if (_M_disjunct(__s))
+ this->reserve(__len);
+ else
+ {
+ const size_type __off = __s - _M_data();
+ this->reserve(__len);
+ __s = _M_data() + __off;
+ }
+ }
+ _M_copy(_M_data() + this->size(), __s, __n);
+ _M_rep()->_M_set_length_and_sharable(__len);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ append(const basic_string& __str)
+ {
+ const size_type __size = __str.size();
+ if (__size)
+ {
+ const size_type __len = __size + this->size();
+ if (__len > this->capacity() || _M_rep()->_M_is_shared())
+ this->reserve(__len);
+ _M_copy(_M_data() + this->size(), __str._M_data(), __size);
+ _M_rep()->_M_set_length_and_sharable(__len);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ append(const basic_string& __str, size_type __pos, size_type __n)
+ {
+ __str._M_check(__pos, "basic_string::append");
+ __n = __str._M_limit(__pos, __n);
+ if (__n)
+ {
+ const size_type __len = __n + this->size();
+ if (__len > this->capacity() || _M_rep()->_M_is_shared())
+ this->reserve(__len);
+ _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n);
+ _M_rep()->_M_set_length_and_sharable(__len);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ insert(size_type __pos, const _CharT* __s, size_type __n)
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ _M_check(__pos, "basic_string::insert");
+ _M_check_length(size_type(0), __n, "basic_string::insert");
+ if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+ return _M_replace_safe(__pos, size_type(0), __s, __n);
+ else
+ {
+ // Work in-place.
+ const size_type __off = __s - _M_data();
+ _M_mutate(__pos, 0, __n);
+ __s = _M_data() + __off;
+ _CharT* __p = _M_data() + __pos;
+ if (__s + __n <= __p)
+ _M_copy(__p, __s, __n);
+ else if (__s >= __p)
+ _M_copy(__p, __s + __n, __n);
+ else
+ {
+ const size_type __nleft = __p - __s;
+ _M_copy(__p, __s, __nleft);
+ _M_copy(__p + __nleft, __p + __n, __n - __nleft);
+ }
+ return *this;
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ __glibcxx_requires_string_len(__s, __n2);
+ _M_check(__pos, "basic_string::replace");
+ __n1 = _M_limit(__pos, __n1);
+ _M_check_length(__n1, __n2, "basic_string::replace");
+ bool __left;
+ if (_M_disjunct(__s) || _M_rep()->_M_is_shared())
+ return _M_replace_safe(__pos, __n1, __s, __n2);
+ else if ((__left = __s + __n2 <= _M_data() + __pos)
+ || _M_data() + __pos + __n1 <= __s)
+ {
+ // Work in-place: non-overlapping case.
+ size_type __off = __s - _M_data();
+ __left ? __off : (__off += __n2 - __n1);
+ _M_mutate(__pos, __n1, __n2);
+ _M_copy(_M_data() + __pos, _M_data() + __off, __n2);
+ return *this;
+ }
+ else
+ {
+ // Todo: overlapping case.
+ const basic_string __tmp(__s, __n2);
+ return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2);
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::_Rep::
+ _M_destroy(const _Alloc& __a) throw ()
+ {
+ const size_type __size = sizeof(_Rep_base) +
+ (this->_M_capacity + 1) * sizeof(_CharT);
+ _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_leak_hard()
+ {
+#ifndef _GLIBCXX_FULLY_DYNAMIC_STRING
+ if (_M_rep() == &_S_empty_rep())
+ return;
+#endif
+ if (_M_rep()->_M_is_shared())
+ _M_mutate(0, 0, 0);
+ _M_rep()->_M_set_leaked();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_mutate(size_type __pos, size_type __len1, size_type __len2)
+ {
+ const size_type __old_size = this->size();
+ const size_type __new_size = __old_size + __len2 - __len1;
+ const size_type __how_much = __old_size - __pos - __len1;
+
+ if (__new_size > this->capacity() || _M_rep()->_M_is_shared())
+ {
+ // Must reallocate.
+ const allocator_type __a = get_allocator();
+ _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a);
+
+ if (__pos)
+ _M_copy(__r->_M_refdata(), _M_data(), __pos);
+ if (__how_much)
+ _M_copy(__r->_M_refdata() + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
+
+ _M_rep()->_M_dispose(__a);
+ _M_data(__r->_M_refdata());
+ }
+ else if (__how_much && __len1 != __len2)
+ {
+ // Work in-place.
+ _M_move(_M_data() + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
+ }
+ _M_rep()->_M_set_length_and_sharable(__new_size);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::
+ reserve(size_type __res)
+ {
+ if (__res != this->capacity() || _M_rep()->_M_is_shared())
+ {
+ // Make sure we don't shrink below the current size
+ if (__res < this->size())
+ __res = this->size();
+ const allocator_type __a = get_allocator();
+ _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
+ _M_rep()->_M_dispose(__a);
+ _M_data(__tmp);
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::
+ swap(basic_string& __s)
+ {
+ if (_M_rep()->_M_is_leaked())
+ _M_rep()->_M_set_sharable();
+ if (__s._M_rep()->_M_is_leaked())
+ __s._M_rep()->_M_set_sharable();
+ if (this->get_allocator() == __s.get_allocator())
+ {
+ _CharT* __tmp = _M_data();
+ _M_data(__s._M_data());
+ __s._M_data(__tmp);
+ }
+ // The code below can usually be optimized away.
+ else
+ {
+ const basic_string __tmp1(_M_ibegin(), _M_iend(),
+ __s.get_allocator());
+ const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(),
+ this->get_allocator());
+ *this = __tmp2;
+ __s = __tmp1;
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
+ basic_string<_CharT, _Traits, _Alloc>::_Rep::
+ _S_create(size_type __capacity, size_type __old_capacity,
+ const _Alloc& __alloc)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 83. String::npos vs. string::max_size()
+ if (__capacity > _S_max_size)
+ __throw_length_error(__N("basic_string::_S_create"));
+
+ // The standard places no restriction on allocating more memory
+ // than is strictly needed within this layer at the moment or as
+ // requested by an explicit application call to reserve().
+
+ // Many malloc implementations perform quite poorly when an
+ // application attempts to allocate memory in a stepwise fashion
+ // growing each allocation size by only 1 char. Additionally,
+ // it makes little sense to allocate less linear memory than the
+ // natural blocking size of the malloc implementation.
+ // Unfortunately, we would need a somewhat low-level calculation
+ // with tuned parameters to get this perfect for any particular
+ // malloc implementation. Fortunately, generalizations about
+ // common features seen among implementations seems to suffice.
+
+ // __pagesize need not match the actual VM page size for good
+ // results in practice, thus we pick a common value on the low
+ // side. __malloc_header_size is an estimate of the amount of
+ // overhead per memory allocation (in practice seen N * sizeof
+ // (void*) where N is 0, 2 or 4). According to folklore,
+ // picking this value on the high side is better than
+ // low-balling it (especially when this algorithm is used with
+ // malloc implementations that allocate memory blocks rounded up
+ // to a size which is a power of 2).
+ const size_type __pagesize = 4096;
+ const size_type __malloc_header_size = 4 * sizeof(void*);
+
+ // The below implements an exponential growth policy, necessary to
+ // meet amortized linear time requirements of the library: see
+ // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+ // It's active for allocations requiring an amount of memory above
+ // system pagesize. This is consistent with the requirements of the
+ // standard: http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html
+ if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
+ __capacity = 2 * __old_capacity;
+
+ // NB: Need an array of char_type[__capacity], plus a terminating
+ // null char_type() element, plus enough for the _Rep data structure.
+ // Whew. Seemingly so needy, yet so elemental.
+ size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+
+ const size_type __adj_size = __size + __malloc_header_size;
+ if (__adj_size > __pagesize && __capacity > __old_capacity)
+ {
+ const size_type __extra = __pagesize - __adj_size % __pagesize;
+ __capacity += __extra / sizeof(_CharT);
+ // Never allocate a string bigger than _S_max_size.
+ if (__capacity > _S_max_size)
+ __capacity = _S_max_size;
+ __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+ }
+
+ // NB: Might throw, but no worries about a leak, mate: _Rep()
+ // does not throw.
+ void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
+ _Rep *__p = new (__place) _Rep;
+ __p->_M_capacity = __capacity;
+ // ABI compatibility - 3.4.x set in _S_create both
+ // _M_refcount and _M_length. All callers of _S_create
+ // in basic_string.tcc then set just _M_length.
+ // In 4.0.x and later both _M_refcount and _M_length
+ // are initialized in the callers, unfortunately we can
+ // have 3.4.x compiled code with _S_create callers inlined
+ // calling 4.0.x+ _S_create.
+ __p->_M_set_sharable();
+ return __p;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ _CharT*
+ basic_string<_CharT, _Traits, _Alloc>::_Rep::
+ _M_clone(const _Alloc& __alloc, size_type __res)
+ {
+ // Requested capacity of the clone.
+ const size_type __requested_cap = this->_M_length + __res;
+ _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity,
+ __alloc);
+ if (this->_M_length)
+ _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length);
+
+ __r->_M_set_length_and_sharable(this->_M_length);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ basic_string<_CharT, _Traits, _Alloc>::
+ resize(size_type __n, _CharT __c)
+ {
+ const size_type __size = this->size();
+ _M_check_length(__size, __n, "basic_string::resize");
+ if (__size < __n)
+ this->append(__n - __size, __c);
+ else if (__n < __size)
+ this->erase(__n);
+ // else nothing (in particular, avoid calling _M_mutate() unnecessarily.)
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InputIterator>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, __false_type)
+ {
+ const basic_string __s(__k1, __k2);
+ const size_type __n1 = __i2 - __i1;
+ _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch");
+ return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(),
+ __s.size());
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c)
+ {
+ _M_check_length(__n1, __n2, "basic_string::_M_replace_aux");
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2)
+ _M_assign(_M_data() + __pos1, __n2, __c);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>&
+ basic_string<_CharT, _Traits, _Alloc>::
+ _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ _M_mutate(__pos1, __n1, __n2);
+ if (__n2)
+ _M_copy(_M_data() + __pos1, __s, __n2);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>
+ operator+(const _CharT* __lhs,
+ const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ {
+ __glibcxx_requires_string(__lhs);
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ const __size_type __len = _Traits::length(__lhs);
+ __string_type __str;
+ __str.reserve(__len + __rhs.size());
+ __str.append(__lhs, __len);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_string<_CharT, _Traits, _Alloc>
+ operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+ {
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ __string_type __str;
+ const __size_type __len = __rhs.size();
+ __str.reserve(__len + 1);
+ __str.append(__size_type(1), __lhs);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ copy(_CharT* __s, size_type __n, size_type __pos) const
+ {
+ _M_check(__pos, "basic_string::copy");
+ __n = _M_limit(__pos, __n);
+ __glibcxx_requires_string_len(__s, __n);
+ if (__n)
+ _M_copy(__s, _M_data() + __pos, __n);
+ // 21.3.5.7 par 3: do not append null. (good.)
+ return __n;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
+ const _CharT* __data = _M_data();
+
+ if (__n == 0)
+ return __pos <= __size ? __pos : npos;
+
+ if (__n <= __size)
+ {
+ for (; __pos <= __size - __n; ++__pos)
+ if (traits_type::eq(__data[__pos], __s[0])
+ && traits_type::compare(__data + __pos + 1,
+ __s + 1, __n - 1) == 0)
+ return __pos;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find(_CharT __c, size_type __pos) const
+ {
+ size_type __ret = npos;
+ const size_type __size = this->size();
+ if (__pos < __size)
+ {
+ const _CharT* __data = _M_data();
+ const size_type __n = __size - __pos;
+ const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
+ if (__p)
+ __ret = __p - __data;
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
+ if (__n <= __size)
+ {
+ __pos = std::min(size_type(__size - __n), __pos);
+ const _CharT* __data = _M_data();
+ do
+ {
+ if (traits_type::compare(__data + __pos, __s, __n) == 0)
+ return __pos;
+ }
+ while (__pos-- > 0);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ rfind(_CharT __c, size_type __pos) const
+ {
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ for (++__size; __size-- > 0; )
+ if (traits_type::eq(_M_data()[__size], __c))
+ return __size;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ for (; __n && __pos < this->size(); ++__pos)
+ {
+ const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
+ if (__p)
+ return __pos;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ size_type __size = this->size();
+ if (__size && __n)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (traits_type::find(__s, __n, _M_data()[__size]))
+ return __size;
+ }
+ while (__size-- != 0);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::find(__s, __n, _M_data()[__pos]))
+ return __pos;
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_first_not_of(_CharT __c, size_type __pos) const
+ {
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::eq(_M_data()[__pos], __c))
+ return __pos;
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (!traits_type::find(__s, __n, _M_data()[__size]))
+ return __size;
+ }
+ while (__size--);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename basic_string<_CharT, _Traits, _Alloc>::size_type
+ basic_string<_CharT, _Traits, _Alloc>::
+ find_last_not_of(_CharT __c, size_type __pos) const
+ {
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (!traits_type::eq(_M_data()[__size], __c))
+ return __size;
+ }
+ while (__size--);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ int
+ basic_string<_CharT, _Traits, _Alloc>::
+ compare(size_type __pos, size_type __n, const basic_string& __str) const
+ {
+ _M_check(__pos, "basic_string::compare");
+ __n = _M_limit(__pos, __n);
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__n, __osize);
+ int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
+ if (!__r)
+ __r = _S_compare(__n, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ int
+ basic_string<_CharT, _Traits, _Alloc>::
+ compare(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2) const
+ {
+ _M_check(__pos1, "basic_string::compare");
+ __str._M_check(__pos2, "basic_string::compare");
+ __n1 = _M_limit(__pos1, __n1);
+ __n2 = __str._M_limit(__pos2, __n2);
+ const size_type __len = std::min(__n1, __n2);
+ int __r = traits_type::compare(_M_data() + __pos1,
+ __str.data() + __pos2, __len);
+ if (!__r)
+ __r = _S_compare(__n1, __n2);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ int
+ basic_string<_CharT, _Traits, _Alloc>::
+ compare(const _CharT* __s) const
+ {
+ __glibcxx_requires_string(__s);
+ const size_type __size = this->size();
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__size, __osize);
+ int __r = traits_type::compare(_M_data(), __s, __len);
+ if (!__r)
+ __r = _S_compare(__size, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ int
+ basic_string <_CharT, _Traits, _Alloc>::
+ compare(size_type __pos, size_type __n1, const _CharT* __s) const
+ {
+ __glibcxx_requires_string(__s);
+ _M_check(__pos, "basic_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__n1, __osize);
+ int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+ if (!__r)
+ __r = _S_compare(__n1, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ int
+ basic_string <_CharT, _Traits, _Alloc>::
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2) const
+ {
+ __glibcxx_requires_string_len(__s, __n2);
+ _M_check(__pos, "basic_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __len = std::min(__n1, __n2);
+ int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+ if (!__r)
+ __r = _S_compare(__n1, __n2);
+ return __r;
+ }
+
+ // 21.3.7.9 basic_string::getline and operators
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in,
+ basic_string<_CharT, _Traits, _Alloc>& __str)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __istream_type::ios_base __ios_base;
+ typedef typename __istream_type::int_type __int_type;
+ typedef typename __string_type::size_type __size_type;
+ typedef ctype<_CharT> __ctype_type;
+ typedef typename __ctype_type::ctype_base __ctype_base;
+
+ __size_type __extracted = 0;
+ typename __ios_base::iostate __err = __ios_base::goodbit;
+ typename __istream_type::sentry __cerb(__in, false);
+ if (__cerb)
+ {
+ __try
+ {
+ // Avoid reallocation for common case.
+ __str.erase();
+ _CharT __buf[128];
+ __size_type __len = 0;
+ const streamsize __w = __in.width();
+ const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
+ : __str.max_size();
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+ const __int_type __eof = _Traits::eof();
+ __int_type __c = __in.rdbuf()->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !__ct.is(__ctype_base::space,
+ _Traits::to_char_type(__c)))
+ {
+ if (__len == sizeof(__buf) / sizeof(_CharT))
+ {
+ __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+ __len = 0;
+ }
+ __buf[__len++] = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __in.rdbuf()->snextc();
+ }
+ __str.append(__buf, __len);
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= __ios_base::eofbit;
+ __in.width(0);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(__ios_base::badbit);
+ }
+ }
+ // 211. operator>>(istream&, string&) doesn't set failbit
+ if (!__extracted)
+ __err |= __ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
+ return __in;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __in,
+ basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef typename __istream_type::ios_base __ios_base;
+ typedef typename __istream_type::int_type __int_type;
+ typedef typename __string_type::size_type __size_type;
+
+ __size_type __extracted = 0;
+ const __size_type __n = __str.max_size();
+ typename __ios_base::iostate __err = __ios_base::goodbit;
+ typename __istream_type::sentry __cerb(__in, true);
+ if (__cerb)
+ {
+ __try
+ {
+ __str.erase();
+ const __int_type __idelim = _Traits::to_int_type(__delim);
+ const __int_type __eof = _Traits::eof();
+ __int_type __c = __in.rdbuf()->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !_Traits::eq_int_type(__c, __idelim))
+ {
+ __str += _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __in.rdbuf()->snextc();
+ }
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= __ios_base::eofbit;
+ else if (_Traits::eq_int_type(__c, __idelim))
+ {
+ ++__extracted;
+ __in.rdbuf()->sbumpc();
+ }
+ else
+ __err |= __ios_base::failbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(__ios_base::badbit);
+ }
+ }
+ if (!__extracted)
+ __err |= __ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
+ return __in;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE > 0
+ extern template class basic_string<char>;
+ extern template
+ basic_istream<char>&
+ operator>>(basic_istream<char>&, string&);
+ extern template
+ basic_ostream<char>&
+ operator<<(basic_ostream<char>&, const string&);
+ extern template
+ basic_istream<char>&
+ getline(basic_istream<char>&, string&, char);
+ extern template
+ basic_istream<char>&
+ getline(basic_istream<char>&, string&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_string<wchar_t>;
+ extern template
+ basic_istream<wchar_t>&
+ operator>>(basic_istream<wchar_t>&, wstring&);
+ extern template
+ basic_ostream<wchar_t>&
+ operator<<(basic_ostream<wchar_t>&, const wstring&);
+ extern template
+ basic_istream<wchar_t>&
+ getline(basic_istream<wchar_t>&, wstring&, wchar_t);
+ extern template
+ basic_istream<wchar_t>&
+ getline(basic_istream<wchar_t>&, wstring&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/boost_concept_check.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/boost_concept_check.h
new file mode 100644
index 0000000..054fcf2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/boost_concept_check.h
@@ -0,0 +1,787 @@
+// -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+
+/** @file boost_concept_check.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// GCC Note: based on version 1.12.0 of the Boost library.
+
+#ifndef _BOOST_CONCEPT_CHECK_H
+#define _BOOST_CONCEPT_CHECK_H 1
+
+#pragma GCC system_header
+
+#include <cstddef> // for ptrdiff_t, used next
+#include <bits/stl_iterator_base_types.h> // for traits and tags
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#define _IsUnused __attribute__ ((__unused__))
+
+// When the C-C code is in use, we would like this function to do as little
+// as possible at runtime, use as few resources as possible, and hopefully
+// be elided out of existence... hmmm.
+template <class _Concept>
+inline void __function_requires()
+{
+ void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
+}
+
+// No definition: if this is referenced, there's a problem with
+// the instantiating type not being one of the required integer types.
+// Unfortunately, this results in a link-time error, not a compile-time error.
+void __error_type_must_be_an_integer_type();
+void __error_type_must_be_an_unsigned_integer_type();
+void __error_type_must_be_a_signed_integer_type();
+
+// ??? Should the "concept_checking*" structs begin with more than _ ?
+#define _GLIBCXX_CLASS_REQUIRES(_type_var, _ns, _concept) \
+ typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
+ template <_func##_type_var##_concept _Tp1> \
+ struct _concept_checking##_type_var##_concept { }; \
+ typedef _concept_checking##_type_var##_concept< \
+ &_ns::_concept <_type_var>::__constraints> \
+ _concept_checking_typedef##_type_var##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
+ typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
+ template <_func##_type_var1##_type_var2##_concept _Tp1> \
+ struct _concept_checking##_type_var1##_type_var2##_concept { }; \
+ typedef _concept_checking##_type_var1##_type_var2##_concept< \
+ &_ns::_concept <_type_var1,_type_var2>::__constraints> \
+ _concept_checking_typedef##_type_var1##_type_var2##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
+ typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
+ template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
+ struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
+ typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
+ &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints> \
+ _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
+
+#define _GLIBCXX_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
+ typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
+ template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
+ struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
+ typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
+ &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
+ _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
+
+
+template <class _Tp1, class _Tp2>
+struct _Aux_require_same { };
+
+template <class _Tp>
+struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
+
+ template <class _Tp1, class _Tp2>
+ struct _SameTypeConcept
+ {
+ void __constraints() {
+ typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
+ }
+ };
+
+ template <class _Tp>
+ struct _IntegerConcept {
+ void __constraints() {
+ __error_type_must_be_an_integer_type();
+ }
+ };
+ template <> struct _IntegerConcept<short> { void __constraints() {} };
+ template <> struct _IntegerConcept<unsigned short> { void __constraints(){} };
+ template <> struct _IntegerConcept<int> { void __constraints() {} };
+ template <> struct _IntegerConcept<unsigned int> { void __constraints() {} };
+ template <> struct _IntegerConcept<long> { void __constraints() {} };
+ template <> struct _IntegerConcept<unsigned long> { void __constraints() {} };
+ template <> struct _IntegerConcept<long long> { void __constraints() {} };
+ template <> struct _IntegerConcept<unsigned long long>
+ { void __constraints() {} };
+
+ template <class _Tp>
+ struct _SignedIntegerConcept {
+ void __constraints() {
+ __error_type_must_be_a_signed_integer_type();
+ }
+ };
+ template <> struct _SignedIntegerConcept<short> { void __constraints() {} };
+ template <> struct _SignedIntegerConcept<int> { void __constraints() {} };
+ template <> struct _SignedIntegerConcept<long> { void __constraints() {} };
+ template <> struct _SignedIntegerConcept<long long> { void __constraints(){}};
+
+ template <class _Tp>
+ struct _UnsignedIntegerConcept {
+ void __constraints() {
+ __error_type_must_be_an_unsigned_integer_type();
+ }
+ };
+ template <> struct _UnsignedIntegerConcept<unsigned short>
+ { void __constraints() {} };
+ template <> struct _UnsignedIntegerConcept<unsigned int>
+ { void __constraints() {} };
+ template <> struct _UnsignedIntegerConcept<unsigned long>
+ { void __constraints() {} };
+ template <> struct _UnsignedIntegerConcept<unsigned long long>
+ { void __constraints() {} };
+
+ //===========================================================================
+ // Basic Concepts
+
+ template <class _Tp>
+ struct _DefaultConstructibleConcept
+ {
+ void __constraints() {
+ _Tp __a _IsUnused; // require default constructor
+ }
+ };
+
+ template <class _Tp>
+ struct _AssignableConcept
+ {
+ void __constraints() {
+ __a = __a; // require assignment operator
+ __const_constraints(__a);
+ }
+ void __const_constraints(const _Tp& __b) {
+ __a = __b; // const required for argument to assignment
+ }
+ _Tp __a;
+ // possibly should be "Tp* a;" and then dereference "a" in constraint
+ // functions? present way would require a default ctor, i think...
+ };
+
+ template <class _Tp>
+ struct _CopyConstructibleConcept
+ {
+ void __constraints() {
+ _Tp __a(__b); // require copy constructor
+ _Tp* __ptr _IsUnused = &__a; // require address of operator
+ __const_constraints(__a);
+ }
+ void __const_constraints(const _Tp& __a) {
+ _Tp __c _IsUnused(__a); // require const copy constructor
+ const _Tp* __ptr _IsUnused = &__a; // require const address of operator
+ }
+ _Tp __b;
+ };
+
+ // The SGI STL version of Assignable requires copy constructor and operator=
+ template <class _Tp>
+ struct _SGIAssignableConcept
+ {
+ void __constraints() {
+ _Tp __b _IsUnused(__a);
+ __a = __a; // require assignment operator
+ __const_constraints(__a);
+ }
+ void __const_constraints(const _Tp& __b) {
+ _Tp __c _IsUnused(__b);
+ __a = __b; // const required for argument to assignment
+ }
+ _Tp __a;
+ };
+
+ template <class _From, class _To>
+ struct _ConvertibleConcept
+ {
+ void __constraints() {
+ _To __y _IsUnused = __x;
+ }
+ _From __x;
+ };
+
+ // The C++ standard requirements for many concepts talk about return
+ // types that must be "convertible to bool". The problem with this
+ // requirement is that it leaves the door open for evil proxies that
+ // define things like operator|| with strange return types. Two
+ // possible solutions are:
+ // 1) require the return type to be exactly bool
+ // 2) stay with convertible to bool, and also
+ // specify stuff about all the logical operators.
+ // For now we just test for convertible to bool.
+ template <class _Tp>
+ void __aux_require_boolean_expr(const _Tp& __t) {
+ bool __x _IsUnused = __t;
+ }
+
+// FIXME
+ template <class _Tp>
+ struct _EqualityComparableConcept
+ {
+ void __constraints() {
+ __aux_require_boolean_expr(__a == __b);
+ }
+ _Tp __a, __b;
+ };
+
+ template <class _Tp>
+ struct _LessThanComparableConcept
+ {
+ void __constraints() {
+ __aux_require_boolean_expr(__a < __b);
+ }
+ _Tp __a, __b;
+ };
+
+ // This is equivalent to SGI STL's LessThanComparable.
+ template <class _Tp>
+ struct _ComparableConcept
+ {
+ void __constraints() {
+ __aux_require_boolean_expr(__a < __b);
+ __aux_require_boolean_expr(__a > __b);
+ __aux_require_boolean_expr(__a <= __b);
+ __aux_require_boolean_expr(__a >= __b);
+ }
+ _Tp __a, __b;
+ };
+
+#define _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
+ template <class _First, class _Second> \
+ struct _NAME { \
+ void __constraints() { (void)__constraints_(); } \
+ bool __constraints_() { \
+ return __a _OP __b; \
+ } \
+ _First __a; \
+ _Second __b; \
+ }
+
+#define _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
+ template <class _Ret, class _First, class _Second> \
+ struct _NAME { \
+ void __constraints() { (void)__constraints_(); } \
+ _Ret __constraints_() { \
+ return __a _OP __b; \
+ } \
+ _First __a; \
+ _Second __b; \
+ }
+
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
+ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
+
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
+ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
+
+#undef _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
+#undef _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT
+
+ //===========================================================================
+ // Function Object Concepts
+
+ template <class _Func, class _Return>
+ struct _GeneratorConcept
+ {
+ void __constraints() {
+ const _Return& __r _IsUnused = __f();// require operator() member function
+ }
+ _Func __f;
+ };
+
+
+ template <class _Func>
+ struct _GeneratorConcept<_Func,void>
+ {
+ void __constraints() {
+ __f(); // require operator() member function
+ }
+ _Func __f;
+ };
+
+ template <class _Func, class _Return, class _Arg>
+ struct _UnaryFunctionConcept
+ {
+ void __constraints() {
+ __r = __f(__arg); // require operator()
+ }
+ _Func __f;
+ _Arg __arg;
+ _Return __r;
+ };
+
+ template <class _Func, class _Arg>
+ struct _UnaryFunctionConcept<_Func, void, _Arg> {
+ void __constraints() {
+ __f(__arg); // require operator()
+ }
+ _Func __f;
+ _Arg __arg;
+ };
+
+ template <class _Func, class _Return, class _First, class _Second>
+ struct _BinaryFunctionConcept
+ {
+ void __constraints() {
+ __r = __f(__first, __second); // require operator()
+ }
+ _Func __f;
+ _First __first;
+ _Second __second;
+ _Return __r;
+ };
+
+ template <class _Func, class _First, class _Second>
+ struct _BinaryFunctionConcept<_Func, void, _First, _Second>
+ {
+ void __constraints() {
+ __f(__first, __second); // require operator()
+ }
+ _Func __f;
+ _First __first;
+ _Second __second;
+ };
+
+ template <class _Func, class _Arg>
+ struct _UnaryPredicateConcept
+ {
+ void __constraints() {
+ __aux_require_boolean_expr(__f(__arg)); // require op() returning bool
+ }
+ _Func __f;
+ _Arg __arg;
+ };
+
+ template <class _Func, class _First, class _Second>
+ struct _BinaryPredicateConcept
+ {
+ void __constraints() {
+ __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool
+ }
+ _Func __f;
+ _First __a;
+ _Second __b;
+ };
+
+ // use this when functor is used inside a container class like std::set
+ template <class _Func, class _First, class _Second>
+ struct _Const_BinaryPredicateConcept {
+ void __constraints() {
+ __const_constraints(__f);
+ }
+ void __const_constraints(const _Func& __fun) {
+ __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
+ // operator() must be a const member function
+ __aux_require_boolean_expr(__fun(__a, __b));
+ }
+ _Func __f;
+ _First __a;
+ _Second __b;
+ };
+
+ //===========================================================================
+ // Iterator Concepts
+
+ template <class _Tp>
+ struct _TrivialIteratorConcept
+ {
+ void __constraints() {
+// __function_requires< _DefaultConstructibleConcept<_Tp> >();
+ __function_requires< _AssignableConcept<_Tp> >();
+ __function_requires< _EqualityComparableConcept<_Tp> >();
+// typedef typename std::iterator_traits<_Tp>::value_type _V;
+ (void)*__i; // require dereference operator
+ }
+ _Tp __i;
+ };
+
+ template <class _Tp>
+ struct _Mutable_TrivialIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _TrivialIteratorConcept<_Tp> >();
+ *__i = *__j; // require dereference and assignment
+ }
+ _Tp __i, __j;
+ };
+
+ template <class _Tp>
+ struct _InputIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _TrivialIteratorConcept<_Tp> >();
+ // require iterator_traits typedef's
+ typedef typename std::iterator_traits<_Tp>::difference_type _Diff;
+// __function_requires< _SignedIntegerConcept<_Diff> >();
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
+ typedef typename std::iterator_traits<_Tp>::pointer _Pt;
+ typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
+ __function_requires< _ConvertibleConcept<
+ typename std::iterator_traits<_Tp>::iterator_category,
+ std::input_iterator_tag> >();
+ ++__i; // require preincrement operator
+ __i++; // require postincrement operator
+ }
+ _Tp __i;
+ };
+
+ template <class _Tp, class _ValueT>
+ struct _OutputIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _AssignableConcept<_Tp> >();
+ ++__i; // require preincrement operator
+ __i++; // require postincrement operator
+ *__i++ = __t; // require postincrement and assignment
+ }
+ _Tp __i;
+ _ValueT __t;
+ };
+
+ template <class _Tp>
+ struct _ForwardIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _InputIteratorConcept<_Tp> >();
+ __function_requires< _DefaultConstructibleConcept<_Tp> >();
+ __function_requires< _ConvertibleConcept<
+ typename std::iterator_traits<_Tp>::iterator_category,
+ std::forward_iterator_tag> >();
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
+ _Ref __r _IsUnused = *__i;
+ }
+ _Tp __i;
+ };
+
+ template <class _Tp>
+ struct _Mutable_ForwardIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _ForwardIteratorConcept<_Tp> >();
+ *__i++ = *__i; // require postincrement and assignment
+ }
+ _Tp __i;
+ };
+
+ template <class _Tp>
+ struct _BidirectionalIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _ForwardIteratorConcept<_Tp> >();
+ __function_requires< _ConvertibleConcept<
+ typename std::iterator_traits<_Tp>::iterator_category,
+ std::bidirectional_iterator_tag> >();
+ --__i; // require predecrement operator
+ __i--; // require postdecrement operator
+ }
+ _Tp __i;
+ };
+
+ template <class _Tp>
+ struct _Mutable_BidirectionalIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+ __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
+ *__i-- = *__i; // require postdecrement and assignment
+ }
+ _Tp __i;
+ };
+
+
+ template <class _Tp>
+ struct _RandomAccessIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+ __function_requires< _ComparableConcept<_Tp> >();
+ __function_requires< _ConvertibleConcept<
+ typename std::iterator_traits<_Tp>::iterator_category,
+ std::random_access_iterator_tag> >();
+ // ??? We don't use _Ref, are we just checking for "referenceability"?
+ typedef typename std::iterator_traits<_Tp>::reference _Ref;
+
+ __i += __n; // require assignment addition operator
+ __i = __i + __n; __i = __n + __i; // require addition with difference type
+ __i -= __n; // require assignment subtraction op
+ __i = __i - __n; // require subtraction with
+ // difference type
+ __n = __i - __j; // require difference operator
+ (void)__i[__n]; // require element access operator
+ }
+ _Tp __a, __b;
+ _Tp __i, __j;
+ typename std::iterator_traits<_Tp>::difference_type __n;
+ };
+
+ template <class _Tp>
+ struct _Mutable_RandomAccessIteratorConcept
+ {
+ void __constraints() {
+ __function_requires< _RandomAccessIteratorConcept<_Tp> >();
+ __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
+ __i[__n] = *__i; // require element access and assignment
+ }
+ _Tp __i;
+ typename std::iterator_traits<_Tp>::difference_type __n;
+ };
+
+ //===========================================================================
+ // Container Concepts
+
+ template <class _Container>
+ struct _ContainerConcept
+ {
+ typedef typename _Container::value_type _Value_type;
+ typedef typename _Container::difference_type _Difference_type;
+ typedef typename _Container::size_type _Size_type;
+ typedef typename _Container::const_reference _Const_reference;
+ typedef typename _Container::const_pointer _Const_pointer;
+ typedef typename _Container::const_iterator _Const_iterator;
+
+ void __constraints() {
+ __function_requires< _InputIteratorConcept<_Const_iterator> >();
+ __function_requires< _AssignableConcept<_Container> >();
+ const _Container __c;
+ __i = __c.begin();
+ __i = __c.end();
+ __n = __c.size();
+ __n = __c.max_size();
+ __b = __c.empty();
+ }
+ bool __b;
+ _Const_iterator __i;
+ _Size_type __n;
+ };
+
+ template <class _Container>
+ struct _Mutable_ContainerConcept
+ {
+ typedef typename _Container::value_type _Value_type;
+ typedef typename _Container::reference _Reference;
+ typedef typename _Container::iterator _Iterator;
+ typedef typename _Container::pointer _Pointer;
+
+ void __constraints() {
+ __function_requires< _ContainerConcept<_Container> >();
+ __function_requires< _AssignableConcept<_Value_type> >();
+ __function_requires< _InputIteratorConcept<_Iterator> >();
+
+ __i = __c.begin();
+ __i = __c.end();
+ __c.swap(__c2);
+ }
+ _Iterator __i;
+ _Container __c, __c2;
+ };
+
+ template <class _ForwardContainer>
+ struct _ForwardContainerConcept
+ {
+ void __constraints() {
+ __function_requires< _ContainerConcept<_ForwardContainer> >();
+ typedef typename _ForwardContainer::const_iterator _Const_iterator;
+ __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
+ }
+ };
+
+ template <class _ForwardContainer>
+ struct _Mutable_ForwardContainerConcept
+ {
+ void __constraints() {
+ __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
+ __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
+ typedef typename _ForwardContainer::iterator _Iterator;
+ __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
+ }
+ };
+
+ template <class _ReversibleContainer>
+ struct _ReversibleContainerConcept
+ {
+ typedef typename _ReversibleContainer::const_iterator _Const_iterator;
+ typedef typename _ReversibleContainer::const_reverse_iterator
+ _Const_reverse_iterator;
+
+ void __constraints() {
+ __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
+ __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
+ __function_requires<
+ _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
+
+ const _ReversibleContainer __c;
+ _Const_reverse_iterator __i = __c.rbegin();
+ __i = __c.rend();
+ }
+ };
+
+ template <class _ReversibleContainer>
+ struct _Mutable_ReversibleContainerConcept
+ {
+ typedef typename _ReversibleContainer::iterator _Iterator;
+ typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
+
+ void __constraints() {
+ __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
+ __function_requires<
+ _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
+ __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
+ __function_requires<
+ _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
+
+ _Reverse_iterator __i = __c.rbegin();
+ __i = __c.rend();
+ }
+ _ReversibleContainer __c;
+ };
+
+ template <class _RandomAccessContainer>
+ struct _RandomAccessContainerConcept
+ {
+ typedef typename _RandomAccessContainer::size_type _Size_type;
+ typedef typename _RandomAccessContainer::const_reference _Const_reference;
+ typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
+ typedef typename _RandomAccessContainer::const_reverse_iterator
+ _Const_reverse_iterator;
+
+ void __constraints() {
+ __function_requires<
+ _ReversibleContainerConcept<_RandomAccessContainer> >();
+ __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
+ __function_requires<
+ _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
+
+ const _RandomAccessContainer __c;
+ _Const_reference __r _IsUnused = __c[__n];
+ }
+ _Size_type __n;
+ };
+
+ template <class _RandomAccessContainer>
+ struct _Mutable_RandomAccessContainerConcept
+ {
+ typedef typename _RandomAccessContainer::size_type _Size_type;
+ typedef typename _RandomAccessContainer::reference _Reference;
+ typedef typename _RandomAccessContainer::iterator _Iterator;
+ typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
+
+ void __constraints() {
+ __function_requires<
+ _RandomAccessContainerConcept<_RandomAccessContainer> >();
+ __function_requires<
+ _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
+ __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
+ __function_requires<
+ _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
+
+ _Reference __r _IsUnused = __c[__i];
+ }
+ _Size_type __i;
+ _RandomAccessContainer __c;
+ };
+
+ // A Sequence is inherently mutable
+ template <class _Sequence>
+ struct _SequenceConcept
+ {
+ typedef typename _Sequence::reference _Reference;
+ typedef typename _Sequence::const_reference _Const_reference;
+
+ void __constraints() {
+ // Matt Austern's book puts DefaultConstructible here, the C++
+ // standard places it in Container
+ // function_requires< DefaultConstructible<Sequence> >();
+ __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
+ __function_requires< _DefaultConstructibleConcept<_Sequence> >();
+
+ _Sequence
+ __c _IsUnused(__n, __t),
+ __c2 _IsUnused(__first, __last);
+
+ __c.insert(__p, __t);
+ __c.insert(__p, __n, __t);
+ __c.insert(__p, __first, __last);
+
+ __c.erase(__p);
+ __c.erase(__p, __q);
+
+ _Reference __r _IsUnused = __c.front();
+
+ __const_constraints(__c);
+ }
+ void __const_constraints(const _Sequence& __c) {
+ _Const_reference __r _IsUnused = __c.front();
+ }
+ typename _Sequence::value_type __t;
+ typename _Sequence::size_type __n;
+ typename _Sequence::value_type *__first, *__last;
+ typename _Sequence::iterator __p, __q;
+ };
+
+ template <class _FrontInsertionSequence>
+ struct _FrontInsertionSequenceConcept
+ {
+ void __constraints() {
+ __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
+
+ __c.push_front(__t);
+ __c.pop_front();
+ }
+ _FrontInsertionSequence __c;
+ typename _FrontInsertionSequence::value_type __t;
+ };
+
+ template <class _BackInsertionSequence>
+ struct _BackInsertionSequenceConcept
+ {
+ typedef typename _BackInsertionSequence::reference _Reference;
+ typedef typename _BackInsertionSequence::const_reference _Const_reference;
+
+ void __constraints() {
+ __function_requires< _SequenceConcept<_BackInsertionSequence> >();
+
+ __c.push_back(__t);
+ __c.pop_back();
+ _Reference __r _IsUnused = __c.back();
+ }
+ void __const_constraints(const _BackInsertionSequence& __c) {
+ _Const_reference __r _IsUnused = __c.back();
+ };
+ _BackInsertionSequence __c;
+ typename _BackInsertionSequence::value_type __t;
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#undef _IsUnused
+
+#endif // _GLIBCXX_BOOST_CONCEPT_CHECK
+
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/char_traits.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/char_traits.h
new file mode 100644
index 0000000..5e52c75
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/char_traits.h
@@ -0,0 +1,575 @@
+// Character Traits for use by standard string and iostream -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file char_traits.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+#ifndef _CHAR_TRAITS_H
+#define _CHAR_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h> // std::copy, std::fill_n
+#include <bits/postypes.h> // For streampos
+#include <cwchar> // For WEOF, wmemmove, wmemset, etc.
+
+#ifndef _GLIBCXX_STDIO_MACROS
+# include <cstdio> // For EOF
+# define _CHAR_TRAITS_EOF EOF
+#else
+# define _CHAR_TRAITS_EOF (-1)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @brief Mapping from character type to associated types.
+ *
+ * @note This is an implementation class for the generic version
+ * of char_traits. It defines int_type, off_type, pos_type, and
+ * state_type. By default these are unsigned long, streamoff,
+ * streampos, and mbstate_t. Users who need a different set of
+ * types, but who don't need to change the definitions of any function
+ * defined in char_traits, can specialize __gnu_cxx::_Char_types
+ * while leaving __gnu_cxx::char_traits alone. */
+ template<typename _CharT>
+ struct _Char_types
+ {
+ typedef unsigned long int_type;
+ typedef std::streampos pos_type;
+ typedef std::streamoff off_type;
+ typedef std::mbstate_t state_type;
+ };
+
+
+ /**
+ * @brief Base class used to implement std::char_traits.
+ *
+ * @note For any given actual character type, this definition is
+ * probably wrong. (Most of the member functions are likely to be
+ * right, but the int_type and state_type typedefs, and the eof()
+ * member function, are likely to be wrong.) The reason this class
+ * exists is so users can specialize it. Classes in namespace std
+ * may not be specialized for fundamental types, but classes in
+ * namespace __gnu_cxx may be.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
+ * for advice on how to make use of this class for "unusual" character
+ * types. Also, check out include/ext/pod_char_traits.h.
+ */
+ template<typename _CharT>
+ struct char_traits
+ {
+ typedef _CharT char_type;
+ typedef typename _Char_types<_CharT>::int_type int_type;
+ typedef typename _Char_types<_CharT>::pos_type pos_type;
+ typedef typename _Char_types<_CharT>::off_type off_type;
+ typedef typename _Char_types<_CharT>::state_type state_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
+
+ static std::size_t
+ length(const char_type* __s);
+
+ static const char_type*
+ find(const char_type* __s, std::size_t __n, const char_type& __a);
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, std::size_t __n);
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, std::size_t __n);
+
+ static char_type*
+ assign(char_type* __s, std::size_t __n, char_type __a);
+
+ static char_type
+ to_char_type(const int_type& __c)
+ { return static_cast<char_type>(__c); }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return static_cast<int_type>(__c); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); }
+ };
+
+ template<typename _CharT>
+ int
+ char_traits<_CharT>::
+ compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ for (std::size_t __i = 0; __i < __n; ++__i)
+ if (lt(__s1[__i], __s2[__i]))
+ return -1;
+ else if (lt(__s2[__i], __s1[__i]))
+ return 1;
+ return 0;
+ }
+
+ template<typename _CharT>
+ std::size_t
+ char_traits<_CharT>::
+ length(const char_type* __p)
+ {
+ std::size_t __i = 0;
+ while (!eq(__p[__i], char_type()))
+ ++__i;
+ return __i;
+ }
+
+ template<typename _CharT>
+ const typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ find(const char_type* __s, std::size_t __n, const char_type& __a)
+ {
+ for (std::size_t __i = 0; __i < __n; ++__i)
+ if (eq(__s[__i], __a))
+ return __s + __i;
+ return 0;
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ move(char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ return static_cast<_CharT*>(__builtin_memmove(__s1, __s2,
+ __n * sizeof(char_type)));
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ copy(char_type* __s1, const char_type* __s2, std::size_t __n)
+ {
+ // NB: Inline std::copy so no recursive dependencies.
+ std::copy(__s2, __s2 + __n, __s1);
+ return __s1;
+ }
+
+ template<typename _CharT>
+ typename char_traits<_CharT>::char_type*
+ char_traits<_CharT>::
+ assign(char_type* __s, std::size_t __n, char_type __a)
+ {
+ // NB: Inline std::fill_n so no recursive dependencies.
+ std::fill_n(__s, __n, __a);
+ return __s;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 21.1
+ /**
+ * @brief Basis for explicit traits specializations.
+ *
+ * @note For any given actual character type, this definition is
+ * probably wrong. Since this is just a thin wrapper around
+ * __gnu_cxx::char_traits, it is possible to achieve a more
+ * appropriate definition by specializing __gnu_cxx::char_traits.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html
+ * for advice on how to make use of this class for "unusual" character
+ * types. Also, check out include/ext/pod_char_traits.h.
+ */
+ template<class _CharT>
+ struct char_traits : public __gnu_cxx::char_traits<_CharT>
+ { };
+
+
+ /// 21.1.3.1 char_traits specializations
+ template<>
+ struct char_traits<char>
+ {
+ typedef char char_type;
+ typedef int int_type;
+ typedef streampos pos_type;
+ typedef streamoff off_type;
+ typedef mbstate_t state_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ { return __builtin_memcmp(__s1, __s2, __n); }
+
+ static size_t
+ length(const char_type* __s)
+ { return __builtin_strlen(__s); }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ { return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ { return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ { return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ { return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); }
+
+ static char_type
+ to_char_type(const int_type& __c)
+ { return static_cast<char_type>(__c); }
+
+ // To keep both the byte 0xff and the eof symbol 0xffffffff
+ // from ending up as 0xffffffff.
+ static int_type
+ to_int_type(const char_type& __c)
+ { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ { return static_cast<int_type>(_CHAR_TRAITS_EOF); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return (__c == eof()) ? 0 : __c; }
+ };
+
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /// 21.1.3.2 char_traits specializations
+ template<>
+ struct char_traits<wchar_t>
+ {
+ typedef wchar_t char_type;
+ typedef wint_t int_type;
+ typedef streamoff off_type;
+ typedef wstreampos pos_type;
+ typedef mbstate_t state_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ { return wmemcmp(__s1, __s2, __n); }
+
+ static size_t
+ length(const char_type* __s)
+ { return wcslen(__s); }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ { return wmemchr(__s, __a, __n); }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ { return wmemmove(__s1, __s2, __n); }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ { return wmemcpy(__s1, __s2, __n); }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ { return wmemset(__s, __a, __n); }
+
+ static char_type
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ { return static_cast<int_type>(WEOF); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? 0 : __c; }
+ };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_END_NAMESPACE
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+ && defined(_GLIBCXX_USE_C99_STDINT_TR1))
+
+#include <cstdint>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<>
+ struct char_traits<char16_t>
+ {
+ typedef char16_t char_type;
+ typedef uint_least16_t int_type;
+ typedef streamoff off_type;
+ typedef u16streampos pos_type;
+ typedef mbstate_t state_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (lt(__s1[__i], __s2[__i]))
+ return -1;
+ else if (lt(__s2[__i], __s1[__i]))
+ return 1;
+ return 0;
+ }
+
+ static size_t
+ length(const char_type* __s)
+ {
+ size_t __i = 0;
+ while (!eq(__s[__i], char_type()))
+ ++__i;
+ return __i;
+ }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (eq(__s[__i], __a))
+ return __s + __i;
+ return 0;
+ }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ return (static_cast<char_type*>
+ (__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
+ }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ return (static_cast<char_type*>
+ (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
+ }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ assign(__s[__i], __a);
+ return __s;
+ }
+
+ static char_type
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ { return static_cast<int_type>(-1); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? 0 : __c; }
+ };
+
+ template<>
+ struct char_traits<char32_t>
+ {
+ typedef char32_t char_type;
+ typedef uint_least32_t int_type;
+ typedef streamoff off_type;
+ typedef u32streampos pos_type;
+ typedef mbstate_t state_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (lt(__s1[__i], __s2[__i]))
+ return -1;
+ else if (lt(__s2[__i], __s1[__i]))
+ return 1;
+ return 0;
+ }
+
+ static size_t
+ length(const char_type* __s)
+ {
+ size_t __i = 0;
+ while (!eq(__s[__i], char_type()))
+ ++__i;
+ return __i;
+ }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (eq(__s[__i], __a))
+ return __s + __i;
+ return 0;
+ }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ return (static_cast<char_type*>
+ (__builtin_memmove(__s1, __s2, __n * sizeof(char_type))));
+ }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ return (static_cast<char_type*>
+ (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type))));
+ }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ assign(__s[__i], __a);
+ return __s;
+ }
+
+ static char_type
+ to_char_type(const int_type& __c)
+ { return char_type(__c); }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return int_type(__c); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ { return static_cast<int_type>(-1); }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? 0 : __c; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#undef _CHAR_TRAITS_EOF
+
+#endif // _CHAR_TRAITS_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/cmath.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/cmath.tcc
new file mode 100644
index 0000000..9f4c853
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/cmath.tcc
@@ -0,0 +1,55 @@
+// -*- C++ -*- C math library.
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// This file was written by Gabriel Dos Reis <gdr@codesourcery.com>
+
+/** @file cmath.tcc
+ * This is a Standard C++ Library file.
+ */
+
+#ifndef _GLIBCXX_CMATH_TCC
+#define _GLIBCXX_CMATH_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Tp>
+ inline _Tp
+ __cmath_power(_Tp __x, unsigned int __n)
+ {
+ _Tp __y = __n % 2 ? __x : _Tp(1);
+
+ while (__n >>= 1)
+ {
+ __x = __x * __x;
+ if (__n % 2)
+ __y = __y * __x;
+ }
+
+ return __y;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/codecvt.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/codecvt.h
new file mode 100644
index 0000000..2dbb498
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/codecvt.h
@@ -0,0 +1,497 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+// 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/codecvt.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.1.5 Template class codecvt
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _CODECVT_H
+#define _CODECVT_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// Empty base class for codecvt facet [22.2.1.5].
+ class codecvt_base
+ {
+ public:
+ enum result
+ {
+ ok,
+ partial,
+ error,
+ noconv
+ };
+ };
+
+ /**
+ * @brief Common base for codecvt functions.
+ *
+ * This template class provides implementations of the public functions
+ * that forward to the protected virtual functions.
+ *
+ * This template also provides abstract stubs for the protected virtual
+ * functions.
+ */
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class __codecvt_abstract_base
+ : public locale::facet, public codecvt_base
+ {
+ public:
+ // Types:
+ typedef codecvt_base::result result;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+
+ // 22.2.1.5.1 codecvt members
+ /**
+ * @brief Convert from internal to external character set.
+ *
+ * Converts input string of intern_type to output string of
+ * extern_type. This is analogous to wcsrtombs. It does this by
+ * calling codecvt::do_out.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The characters in [from,from_end) are converted and written to
+ * [to,to_end). from_next and to_next are set to point to the
+ * character following the last successfully converted character,
+ * respectively. If the result needed no conversion, from_next and
+ * to_next are not affected.
+ *
+ * The @a state argument should be initialized if the input is at the
+ * beginning and carried from a previous call if continuing
+ * conversion. There are no guarantees about how @a state is used.
+ *
+ * The result returned is a member of codecvt_base::result. If
+ * all the input is converted, returns codecvt_base::ok. If no
+ * conversion is necessary, returns codecvt_base::noconv. If
+ * the input ends early or there is insufficient space in the
+ * output, returns codecvt_base::partial. Otherwise the
+ * conversion failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param from Start of input.
+ * @param from_end End of input.
+ * @param from_next Returns start of unconverted data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
+ result
+ out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
+ {
+ return this->do_out(__state, __from, __from_end, __from_next,
+ __to, __to_end, __to_next);
+ }
+
+ /**
+ * @brief Reset conversion state.
+ *
+ * Writes characters to output that would restore @a state to initial
+ * conditions. The idea is that if a partial conversion occurs, then
+ * the converting the characters written by this function would leave
+ * the state in initial conditions, rather than partial conversion
+ * state. It does this by calling codecvt::do_unshift().
+ *
+ * For example, if 4 external characters always converted to 1 internal
+ * character, and input to in() had 6 external characters with state
+ * saved, this function would write two characters to the output and
+ * set the state to initialized conditions.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The result returned is a member of codecvt_base::result. If the
+ * state could be reset and data written, returns codecvt_base::ok. If
+ * no conversion is necessary, returns codecvt_base::noconv. If the
+ * output has insufficient space, returns codecvt_base::partial.
+ * Otherwise the reset failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
+ result
+ unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
+ { return this->do_unshift(__state, __to,__to_end,__to_next); }
+
+ /**
+ * @brief Convert from external to internal character set.
+ *
+ * Converts input string of extern_type to output string of
+ * intern_type. This is analogous to mbsrtowcs. It does this by
+ * calling codecvt::do_in.
+ *
+ * The source and destination character sets are determined by the
+ * facet's locale, internal and external types.
+ *
+ * The characters in [from,from_end) are converted and written to
+ * [to,to_end). from_next and to_next are set to point to the
+ * character following the last successfully converted character,
+ * respectively. If the result needed no conversion, from_next and
+ * to_next are not affected.
+ *
+ * The @a state argument should be initialized if the input is at the
+ * beginning and carried from a previous call if continuing
+ * conversion. There are no guarantees about how @a state is used.
+ *
+ * The result returned is a member of codecvt_base::result. If
+ * all the input is converted, returns codecvt_base::ok. If no
+ * conversion is necessary, returns codecvt_base::noconv. If
+ * the input ends early or there is insufficient space in the
+ * output, returns codecvt_base::partial. Otherwise the
+ * conversion failed and codecvt_base::error is returned.
+ *
+ * @param state Persistent conversion state data.
+ * @param from Start of input.
+ * @param from_end End of input.
+ * @param from_next Returns start of unconverted data.
+ * @param to Start of output buffer.
+ * @param to_end End of output buffer.
+ * @param to_next Returns start of unused output area.
+ * @return codecvt_base::result.
+ */
+ result
+ in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const
+ {
+ return this->do_in(__state, __from, __from_end, __from_next,
+ __to, __to_end, __to_next);
+ }
+
+ int
+ encoding() const throw()
+ { return this->do_encoding(); }
+
+ bool
+ always_noconv() const throw()
+ { return this->do_always_noconv(); }
+
+ int
+ length(state_type& __state, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
+ { return this->do_length(__state, __from, __end, __max); }
+
+ int
+ max_length() const throw()
+ { return this->do_max_length(); }
+
+ protected:
+ explicit
+ __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
+
+ virtual
+ ~__codecvt_abstract_base() { }
+
+ /**
+ * @brief Convert from internal to external character set.
+ *
+ * Converts input string of intern_type to output string of
+ * extern_type. This function is a hook for derived classes to change
+ * the value returned. @see out for more information.
+ */
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const = 0;
+
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const = 0;
+
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const = 0;
+
+ virtual int
+ do_encoding() const throw() = 0;
+
+ virtual bool
+ do_always_noconv() const throw() = 0;
+
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const = 0;
+
+ virtual int
+ do_max_length() const throw() = 0;
+ };
+
+ /// @brief class codecvt [22.2.1.5].
+ /// NB: Generic, mostly useless implementation.
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt
+ : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
+ {
+ public:
+ // Types:
+ typedef codecvt_base::result result;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
+
+ public:
+ static locale::id id;
+
+ explicit
+ codecvt(size_t __refs = 0)
+ : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { }
+
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~codecvt() { }
+
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const;
+
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+
+ virtual int
+ do_encoding() const throw();
+
+ virtual bool
+ do_always_noconv() const throw();
+
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+
+ virtual int
+ do_max_length() const throw();
+ };
+
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ locale::id codecvt<_InternT, _ExternT, _StateT>::id;
+
+ /// class codecvt<char, char, mbstate_t> specialization.
+ template<>
+ class codecvt<char, char, mbstate_t>
+ : public __codecvt_abstract_base<char, char, mbstate_t>
+ {
+ public:
+ // Types:
+ typedef char intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
+
+ public:
+ static locale::id id;
+
+ explicit
+ codecvt(size_t __refs = 0);
+
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~codecvt();
+
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const;
+
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+
+ virtual int
+ do_encoding() const throw();
+
+ virtual bool
+ do_always_noconv() const throw();
+
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+
+ virtual int
+ do_max_length() const throw();
+ };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /// class codecvt<wchar_t, char, mbstate_t> specialization.
+ template<>
+ class codecvt<wchar_t, char, mbstate_t>
+ : public __codecvt_abstract_base<wchar_t, char, mbstate_t>
+ {
+ public:
+ // Types:
+ typedef wchar_t intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ protected:
+ __c_locale _M_c_locale_codecvt;
+
+ public:
+ static locale::id id;
+
+ explicit
+ codecvt(size_t __refs = 0);
+
+ explicit
+ codecvt(__c_locale __cloc, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~codecvt();
+
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+
+ virtual result
+ do_unshift(state_type& __state,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+
+ virtual result
+ do_in(state_type& __state,
+ const extern_type* __from, const extern_type* __from_end,
+ const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+
+ virtual
+ int do_encoding() const throw();
+
+ virtual
+ bool do_always_noconv() const throw();
+
+ virtual
+ int do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+
+ virtual int
+ do_max_length() const throw();
+ };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+ /// class codecvt_byname [22.2.1.6].
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
+ {
+ public:
+ explicit
+ codecvt_byname(const char* __s, size_t __refs = 0)
+ : codecvt<_InternT, _ExternT, _StateT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
+ this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
+ }
+ }
+
+ protected:
+ virtual
+ ~codecvt_byname() { }
+ };
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class codecvt_byname<char, char, mbstate_t>;
+
+ extern template
+ const codecvt<char, char, mbstate_t>&
+ use_facet<codecvt<char, char, mbstate_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<codecvt<char, char, mbstate_t> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class codecvt_byname<wchar_t, char, mbstate_t>;
+
+ extern template
+ const codecvt<wchar_t, char, mbstate_t>&
+ use_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _CODECVT_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/concept_check.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/concept_check.h
new file mode 100644
index 0000000..6d45e26
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/concept_check.h
@@ -0,0 +1,80 @@
+// Concept-checking control -*- C++ -*-
+
+// Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file concept_check.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _CONCEPT_CHECK_H
+#define _CONCEPT_CHECK_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+// All places in libstdc++-v3 where these are used, or /might/ be used, or
+// don't need to be used, or perhaps /should/ be used, are commented with
+// "concept requirements" (and maybe some more text). So grep like crazy
+// if you're looking for additional places to use these.
+
+// Concept-checking code is off by default unless users turn it on via
+// configure options or editing c++config.h.
+
+#ifndef _GLIBCXX_CONCEPT_CHECKS
+
+#define __glibcxx_function_requires(...)
+#define __glibcxx_class_requires(_a,_b)
+#define __glibcxx_class_requires2(_a,_b,_c)
+#define __glibcxx_class_requires3(_a,_b,_c,_d)
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_e)
+
+#else // the checks are on
+
+#include <bits/boost_concept_check.h>
+
+// Note that the obvious and elegant approach of
+//
+//#define glibcxx_function_requires(C) boost::function_requires< boost::C >()
+//
+// won't work due to concept templates with more than one parameter, e.g.,
+// BinaryPredicateConcept. The preprocessor tries to split things up on
+// the commas in the template argument list. We can't use an inner pair of
+// parenthesis to hide the commas, because "boost::(Temp<Foo,Bar>)" isn't
+// a valid instantiation pattern. Thus, we steal a feature from C99.
+
+#define __glibcxx_function_requires(...) \
+ __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
+#define __glibcxx_class_requires(_a,_C) \
+ _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C);
+#define __glibcxx_class_requires2(_a,_b,_C) \
+ _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
+#define __glibcxx_class_requires3(_a,_b,_c,_C) \
+ _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
+#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \
+ _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
+
+#endif // enable/disable
+
+#endif // _GLIBCXX_CONCEPT_CHECK
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/cpp_type_traits.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/cpp_type_traits.h
new file mode 100644
index 0000000..afb0049
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/cpp_type_traits.h
@@ -0,0 +1,419 @@
+// The -*- C++ -*- type traits classes for internal use in libstdc++
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpp_type_traits.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
+
+#ifndef _CPP_TYPE_TRAITS_H
+#define _CPP_TYPE_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+//
+// This file provides some compile-time information about various types.
+// These representations were designed, on purpose, to be constant-expressions
+// and not types as found in <bits/type_traits.h>. In particular, they
+// can be used in control structures and the optimizer hopefully will do
+// the obvious thing.
+//
+// Why integral expressions, and not functions nor types?
+// Firstly, these compile-time entities are used as template-arguments
+// so function return values won't work: We need compile-time entities.
+// We're left with types and constant integral expressions.
+// Secondly, from the point of view of ease of use, type-based compile-time
+// information is -not- *that* convenient. On has to write lots of
+// overloaded functions and to hope that the compiler will select the right
+// one. As a net effect, the overall structure isn't very clear at first
+// glance.
+// Thirdly, partial ordering and overload resolution (of function templates)
+// is highly costly in terms of compiler-resource. It is a Good Thing to
+// keep these resource consumption as least as possible.
+//
+// See valarray_array.h for a case use.
+//
+// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06.
+//
+// Update 2005: types are also provided and <bits/type_traits.h> has been
+// removed.
+//
+
+// Forward declaration hack, should really include this from somewhere.
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _Iterator, typename _Container>
+ class __normal_iterator;
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ struct __true_type { };
+ struct __false_type { };
+
+ template<bool>
+ struct __truth_type
+ { typedef __false_type __type; };
+
+ template<>
+ struct __truth_type<true>
+ { typedef __true_type __type; };
+
+ // N.B. The conversions to bool are needed due to the issue
+ // explained in c++/19404.
+ template<class _Sp, class _Tp>
+ struct __traitor
+ {
+ enum { __value = bool(_Sp::__value) || bool(_Tp::__value) };
+ typedef typename __truth_type<__value>::__type __type;
+ };
+
+ // Compare for equality of types.
+ template<typename, typename>
+ struct __are_same
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<typename _Tp>
+ struct __are_same<_Tp, _Tp>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ // Holds if the template-argument is a void type.
+ template<typename _Tp>
+ struct __is_void
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<>
+ struct __is_void<void>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Integer types
+ //
+ template<typename _Tp>
+ struct __is_integer
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ // Thirteen specializations (yes there are eleven standard integer
+ // types; 'long long' and 'unsigned long long' are supported as
+ // extensions)
+ template<>
+ struct __is_integer<bool>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<signed char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<unsigned char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+# ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ struct __is_integer<wchar_t>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+# endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<>
+ struct __is_integer<char16_t>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<char32_t>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+#endif
+
+ template<>
+ struct __is_integer<short>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<unsigned short>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<int>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<unsigned int>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<long>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<unsigned long>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<long long>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_integer<unsigned long long>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Floating point types
+ //
+ template<typename _Tp>
+ struct __is_floating
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ // three specializations (float, double and 'long double')
+ template<>
+ struct __is_floating<float>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_floating<double>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_floating<long double>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Pointer types
+ //
+ template<typename _Tp>
+ struct __is_pointer
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<typename _Tp>
+ struct __is_pointer<_Tp*>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Normal iterator type
+ //
+ template<typename _Tp>
+ struct __is_normal_iterator
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<typename _Iterator, typename _Container>
+ struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator,
+ _Container> >
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // An arithmetic type is an integer type or a floating point type
+ //
+ template<typename _Tp>
+ struct __is_arithmetic
+ : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> >
+ { };
+
+ //
+ // A fundamental type is `void' or and arithmetic type
+ //
+ template<typename _Tp>
+ struct __is_fundamental
+ : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> >
+ { };
+
+ //
+ // A scalar type is an arithmetic type or a pointer type
+ //
+ template<typename _Tp>
+ struct __is_scalar
+ : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> >
+ { };
+
+ //
+ // For use in std::copy and std::find overloads for streambuf iterators.
+ //
+ template<typename _Tp>
+ struct __is_char
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<>
+ struct __is_char<char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ struct __is_char<wchar_t>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+#endif
+
+ template<typename _Tp>
+ struct __is_byte
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+ template<>
+ struct __is_byte<char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_byte<signed char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ template<>
+ struct __is_byte<unsigned char>
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+
+ //
+ // Move iterator type
+ //
+ template<typename _Tp>
+ struct __is_move_iterator
+ {
+ enum { __value = 0 };
+ typedef __false_type __type;
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Iterator>
+ class move_iterator;
+
+ template<typename _Iterator>
+ struct __is_move_iterator< move_iterator<_Iterator> >
+ {
+ enum { __value = 1 };
+ typedef __true_type __type;
+ };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif //_CPP_TYPE_TRAITS_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc
new file mode 100644
index 0000000..aac0d59
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc
@@ -0,0 +1,863 @@
+// Deque implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 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.
+ */
+
+/** @file deque.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _DEQUE_TCC
+#define _DEQUE_TCC 1
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ template <typename _Tp, typename _Alloc>
+ deque<_Tp, _Alloc>&
+ deque<_Tp, _Alloc>::
+ operator=(const deque& __x)
+ {
+ const size_type __len = size();
+ if (&__x != this)
+ {
+ if (__len >= __x.size())
+ _M_erase_at_end(std::copy(__x.begin(), __x.end(),
+ this->_M_impl._M_start));
+ else
+ {
+ const_iterator __mid = __x.begin() + difference_type(__len);
+ std::copy(__x.begin(), __mid, this->_M_impl._M_start);
+ insert(this->_M_impl._M_finish, __mid, __x.end());
+ }
+ }
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ emplace_front(_Args&&... __args)
+ {
+ if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+ {
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1,
+ std::forward<_Args>(__args)...);
+ --this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_push_front_aux(std::forward<_Args>(__args)...);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ emplace_back(_Args&&... __args)
+ {
+ if (this->_M_impl._M_finish._M_cur
+ != this->_M_impl._M_finish._M_last - 1)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux(std::forward<_Args>(__args)...);
+ }
+#endif
+
+ template <typename _Tp, typename _Alloc>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ insert(iterator __position, const value_type& __x)
+ {
+ if (__position._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ push_front(__x);
+ return this->_M_impl._M_start;
+ }
+ else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ push_back(__x);
+ iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return __tmp;
+ }
+ else
+ return _M_insert_aux(__position, __x);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ if (__position._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ push_front(std::forward<_Args>(__args)...);
+ return this->_M_impl._M_start;
+ }
+ else if (__position._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ push_back(std::forward<_Args>(__args)...);
+ iterator __tmp = this->_M_impl._M_finish;
+ --__tmp;
+ return __tmp;
+ }
+ else
+ return _M_insert_aux(__position, std::forward<_Args>(__args)...);
+ }
+#endif
+
+ template <typename _Tp, typename _Alloc>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ erase(iterator __position)
+ {
+ iterator __next = __position;
+ ++__next;
+ const difference_type __index = __position - begin();
+ if (static_cast<size_type>(__index) < (size() >> 1))
+ {
+ if (__position != begin())
+ _GLIBCXX_MOVE_BACKWARD3(begin(), __position, __next);
+ pop_front();
+ }
+ else
+ {
+ if (__next != end())
+ _GLIBCXX_MOVE3(__next, end(), __position);
+ pop_back();
+ }
+ return begin() + __index;
+ }
+
+ template <typename _Tp, typename _Alloc>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ erase(iterator __first, iterator __last)
+ {
+ if (__first == begin() && __last == end())
+ {
+ clear();
+ return end();
+ }
+ else
+ {
+ const difference_type __n = __last - __first;
+ const difference_type __elems_before = __first - begin();
+ if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
+ {
+ if (__first != begin())
+ _GLIBCXX_MOVE_BACKWARD3(begin(), __first, __last);
+ _M_erase_at_begin(begin() + __n);
+ }
+ else
+ {
+ if (__last != end())
+ _GLIBCXX_MOVE3(__last, end(), __first);
+ _M_erase_at_end(end() - __n);
+ }
+ return begin() + __elems_before;
+ }
+ }
+
+ template <typename _Tp, class _Alloc>
+ template <typename _InputIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ {
+ iterator __cur = begin();
+ for (; __first != __last && __cur != end(); ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ _M_erase_at_end(__cur);
+ else
+ insert(end(), __first, __last);
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_fill_insert(iterator __pos, size_type __n, const value_type& __x)
+ {
+ if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __try
+ {
+ std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start,
+ __x, _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node,
+ this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ __try
+ {
+ std::__uninitialized_fill_a(this->_M_impl._M_finish,
+ __new_finish, __x,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
+ else
+ _M_insert_aux(__pos, __n, __x);
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_fill_initialize(const value_type& __value)
+ {
+ _Map_pointer __cur;
+ __try
+ {
+ for (__cur = this->_M_impl._M_start._M_node;
+ __cur < this->_M_impl._M_finish._M_node;
+ ++__cur)
+ std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(),
+ __value, _M_get_Tp_allocator());
+ std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
+ this->_M_impl._M_finish._M_cur,
+ __value, _M_get_Tp_allocator());
+ }
+ __catch(...)
+ {
+ std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
+ _M_get_Tp_allocator());
+ __throw_exception_again;
+ }
+ }
+
+ template <typename _Tp, typename _Alloc>
+ template <typename _InputIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ {
+ this->_M_initialize_map(0);
+ __try
+ {
+ for (; __first != __last; ++__first)
+ push_back(*__first);
+ }
+ __catch(...)
+ {
+ clear();
+ __throw_exception_again;
+ }
+ }
+
+ template <typename _Tp, typename _Alloc>
+ template <typename _ForwardIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __n = std::distance(__first, __last);
+ this->_M_initialize_map(__n);
+
+ _Map_pointer __cur_node;
+ __try
+ {
+ for (__cur_node = this->_M_impl._M_start._M_node;
+ __cur_node < this->_M_impl._M_finish._M_node;
+ ++__cur_node)
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, _S_buffer_size());
+ std::__uninitialized_copy_a(__first, __mid, *__cur_node,
+ _M_get_Tp_allocator());
+ __first = __mid;
+ }
+ std::__uninitialized_copy_a(__first, __last,
+ this->_M_impl._M_finish._M_first,
+ _M_get_Tp_allocator());
+ }
+ __catch(...)
+ {
+ std::_Destroy(this->_M_impl._M_start,
+ iterator(*__cur_node, __cur_node),
+ _M_get_Tp_allocator());
+ __throw_exception_again;
+ }
+ }
+
+ // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_last - 1.
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_back_aux(_Args&&... __args)
+#else
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_back_aux(const value_type& __t)
+#endif
+ {
+ _M_reserve_map_at_back();
+ *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node();
+ __try
+ {
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+ std::forward<_Args>(__args)...);
+#else
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t);
+#endif
+ this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node
+ + 1);
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first;
+ }
+ __catch(...)
+ {
+ _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1));
+ __throw_exception_again;
+ }
+ }
+
+ // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_first.
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_front_aux(_Args&&... __args)
+#else
+ void
+ deque<_Tp, _Alloc>::
+ _M_push_front_aux(const value_type& __t)
+#endif
+ {
+ _M_reserve_map_at_front();
+ *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node();
+ __try
+ {
+ this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node
+ - 1);
+ this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1;
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur,
+ std::forward<_Args>(__args)...);
+#else
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t);
+#endif
+ }
+ __catch(...)
+ {
+ ++this->_M_impl._M_start;
+ _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1));
+ __throw_exception_again;
+ }
+ }
+
+ // Called only if _M_impl._M_finish._M_cur == _M_impl._M_finish._M_first.
+ template <typename _Tp, typename _Alloc>
+ void deque<_Tp, _Alloc>::
+ _M_pop_back_aux()
+ {
+ _M_deallocate_node(this->_M_impl._M_finish._M_first);
+ this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1);
+ this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1;
+ this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
+ }
+
+ // Called only if _M_impl._M_start._M_cur == _M_impl._M_start._M_last - 1.
+ // Note that if the deque has at least one element (a precondition for this
+ // member function), and if
+ // _M_impl._M_start._M_cur == _M_impl._M_start._M_last,
+ // then the deque must have at least two nodes.
+ template <typename _Tp, typename _Alloc>
+ void deque<_Tp, _Alloc>::
+ _M_pop_front_aux()
+ {
+ this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
+ _M_deallocate_node(this->_M_impl._M_start._M_first);
+ this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1);
+ this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first;
+ }
+
+ template <typename _Tp, typename _Alloc>
+ template <typename _InputIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_range_insert_aux(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ { std::copy(__first, __last, std::inserter(*this, __pos)); }
+
+ template <typename _Tp, typename _Alloc>
+ template <typename _ForwardIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_range_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __n = std::distance(__first, __last);
+ if (__pos._M_cur == this->_M_impl._M_start._M_cur)
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __try
+ {
+ std::__uninitialized_copy_a(__first, __last, __new_start,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node,
+ this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else if (__pos._M_cur == this->_M_impl._M_finish._M_cur)
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ __try
+ {
+ std::__uninitialized_copy_a(__first, __last,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
+ else
+ _M_insert_aux(__pos, __first, __last, __n);
+ }
+
+ template<typename _Tp, typename _Alloc>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, _Args&&... __args)
+ {
+ value_type __x_copy(std::forward<_Args>(__args)...); // XXX copy
+#else
+ typename deque<_Tp, _Alloc>::iterator
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, const value_type& __x)
+ {
+ value_type __x_copy = __x; // XXX copy
+#endif
+ difference_type __index = __pos - this->_M_impl._M_start;
+ if (static_cast<size_type>(__index) < size() / 2)
+ {
+ push_front(_GLIBCXX_MOVE(front()));
+ iterator __front1 = this->_M_impl._M_start;
+ ++__front1;
+ iterator __front2 = __front1;
+ ++__front2;
+ __pos = this->_M_impl._M_start + __index;
+ iterator __pos1 = __pos;
+ ++__pos1;
+ _GLIBCXX_MOVE3(__front2, __pos1, __front1);
+ }
+ else
+ {
+ push_back(_GLIBCXX_MOVE(back()));
+ iterator __back1 = this->_M_impl._M_finish;
+ --__back1;
+ iterator __back2 = __back1;
+ --__back2;
+ __pos = this->_M_impl._M_start + __index;
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __back2, __back1);
+ }
+ *__pos = _GLIBCXX_MOVE(__x_copy);
+ return __pos;
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos, size_type __n, const value_type& __x)
+ {
+ const difference_type __elems_before = __pos - this->_M_impl._M_start;
+ const size_type __length = this->size();
+ value_type __x_copy = __x;
+ if (__elems_before < difference_type(__length / 2))
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_impl._M_start;
+ __pos = this->_M_impl._M_start + __elems_before;
+ __try
+ {
+ if (__elems_before >= difference_type(__n))
+ {
+ iterator __start_n = (this->_M_impl._M_start
+ + difference_type(__n));
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __start_n, __new_start,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
+ std::fill(__pos - difference_type(__n), __pos, __x_copy);
+ }
+ else
+ {
+ std::__uninitialized_move_fill(this->_M_impl._M_start,
+ __pos, __new_start,
+ this->_M_impl._M_start,
+ __x_copy,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ std::fill(__old_start, __pos, __x_copy);
+ }
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node,
+ this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_impl._M_finish;
+ const difference_type __elems_after =
+ difference_type(__length) - __elems_before;
+ __pos = this->_M_impl._M_finish - __elems_after;
+ __try
+ {
+ if (__elems_after > difference_type(__n))
+ {
+ iterator __finish_n = (this->_M_impl._M_finish
+ - difference_type(__n));
+ std::__uninitialized_move_a(__finish_n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
+ std::fill(__pos, __pos + difference_type(__n), __x_copy);
+ }
+ else
+ {
+ std::__uninitialized_fill_move(this->_M_impl._M_finish,
+ __pos + difference_type(__n),
+ __x_copy, __pos,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ std::fill(__pos, __old_finish, __x_copy);
+ }
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
+ }
+
+ template <typename _Tp, typename _Alloc>
+ template <typename _ForwardIterator>
+ void
+ deque<_Tp, _Alloc>::
+ _M_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n)
+ {
+ const difference_type __elemsbefore = __pos - this->_M_impl._M_start;
+ const size_type __length = size();
+ if (static_cast<size_type>(__elemsbefore) < __length / 2)
+ {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_impl._M_start;
+ __pos = this->_M_impl._M_start + __elemsbefore;
+ __try
+ {
+ if (__elemsbefore >= difference_type(__n))
+ {
+ iterator __start_n = (this->_M_impl._M_start
+ + difference_type(__n));
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __start_n, __new_start,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ _GLIBCXX_MOVE3(__start_n, __pos, __old_start);
+ std::copy(__first, __last, __pos - difference_type(__n));
+ }
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, difference_type(__n) - __elemsbefore);
+ std::__uninitialized_move_copy(this->_M_impl._M_start,
+ __pos, __first, __mid,
+ __new_start,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_start = __new_start;
+ std::copy(__mid, __last, __old_start);
+ }
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(__new_start._M_node,
+ this->_M_impl._M_start._M_node);
+ __throw_exception_again;
+ }
+ }
+ else
+ {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_impl._M_finish;
+ const difference_type __elemsafter =
+ difference_type(__length) - __elemsbefore;
+ __pos = this->_M_impl._M_finish - __elemsafter;
+ __try
+ {
+ if (__elemsafter > difference_type(__n))
+ {
+ iterator __finish_n = (this->_M_impl._M_finish
+ - difference_type(__n));
+ std::__uninitialized_move_a(__finish_n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ _GLIBCXX_MOVE_BACKWARD3(__pos, __finish_n, __old_finish);
+ std::copy(__first, __last, __pos);
+ }
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, __elemsafter);
+ std::__uninitialized_copy_move(__mid, __last, __pos,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __new_finish;
+ std::copy(__first, __mid, __pos);
+ }
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1,
+ __new_finish._M_node + 1);
+ __throw_exception_again;
+ }
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_destroy_data_aux(iterator __first, iterator __last)
+ {
+ for (_Map_pointer __node = __first._M_node + 1;
+ __node < __last._M_node; ++__node)
+ std::_Destroy(*__node, *__node + _S_buffer_size(),
+ _M_get_Tp_allocator());
+
+ if (__first._M_node != __last._M_node)
+ {
+ std::_Destroy(__first._M_cur, __first._M_last,
+ _M_get_Tp_allocator());
+ std::_Destroy(__last._M_first, __last._M_cur,
+ _M_get_Tp_allocator());
+ }
+ else
+ std::_Destroy(__first._M_cur, __last._M_cur,
+ _M_get_Tp_allocator());
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_new_elements_at_front(size_type __new_elems)
+ {
+ if (this->max_size() - this->size() < __new_elems)
+ __throw_length_error(__N("deque::_M_new_elements_at_front"));
+
+ const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
+ / _S_buffer_size());
+ _M_reserve_map_at_front(__new_nodes);
+ size_type __i;
+ __try
+ {
+ for (__i = 1; __i <= __new_nodes; ++__i)
+ *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node();
+ }
+ __catch(...)
+ {
+ for (size_type __j = 1; __j < __i; ++__j)
+ _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j));
+ __throw_exception_again;
+ }
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_new_elements_at_back(size_type __new_elems)
+ {
+ if (this->max_size() - this->size() < __new_elems)
+ __throw_length_error(__N("deque::_M_new_elements_at_back"));
+
+ const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1)
+ / _S_buffer_size());
+ _M_reserve_map_at_back(__new_nodes);
+ size_type __i;
+ __try
+ {
+ for (__i = 1; __i <= __new_nodes; ++__i)
+ *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node();
+ }
+ __catch(...)
+ {
+ for (size_type __j = 1; __j < __i; ++__j)
+ _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j));
+ __throw_exception_again;
+ }
+ }
+
+ template <typename _Tp, typename _Alloc>
+ void
+ deque<_Tp, _Alloc>::
+ _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front)
+ {
+ const size_type __old_num_nodes
+ = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1;
+ const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
+
+ _Map_pointer __new_nstart;
+ if (this->_M_impl._M_map_size > 2 * __new_num_nodes)
+ {
+ __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size
+ - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ if (__new_nstart < this->_M_impl._M_start._M_node)
+ std::copy(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart);
+ else
+ std::copy_backward(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart + __old_num_nodes);
+ }
+ else
+ {
+ size_type __new_map_size = this->_M_impl._M_map_size
+ + std::max(this->_M_impl._M_map_size,
+ __nodes_to_add) + 2;
+
+ _Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
+ __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ std::copy(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1,
+ __new_nstart);
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+
+ this->_M_impl._M_map = __new_map;
+ this->_M_impl._M_map_size = __new_map_size;
+ }
+
+ this->_M_impl._M_start._M_set_node(__new_nstart);
+ this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+ }
+
+ // Overload for deque::iterators, exploiting the "segmented-iterator
+ // optimization". NB: leave const_iterators alone!
+ template<typename _Tp>
+ void
+ fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
+ const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value)
+ {
+ typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self;
+
+ for (typename _Self::_Map_pointer __node = __first._M_node + 1;
+ __node < __last._M_node; ++__node)
+ std::fill(*__node, *__node + _Self::_S_buffer_size(), __value);
+
+ if (__first._M_node != __last._M_node)
+ {
+ std::fill(__first._M_cur, __first._M_last, __value);
+ std::fill(__last._M_first, __last._M_cur, __value);
+ }
+ else
+ std::fill(__first._M_cur, __last._M_cur, __value);
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.h
new file mode 100644
index 0000000..d49eb4a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.h
@@ -0,0 +1,1306 @@
+// <forward_list.h> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file forward_list.h
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _FORWARD_LIST_H
+#define _FORWARD_LIST_H 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <memory>
+#include <initializer_list>
+#include <ext/cast.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using __gnu_cxx::__static_pointer_cast;
+ using __gnu_cxx::__const_pointer_cast;
+
+ /**
+ * @brief A helper basic node class for %forward_list.
+ * This is just a linked list with nothing inside it.
+ * There are purely list shuffling utility methods here.
+ */
+ template<typename _Alloc>
+ struct _Fwd_list_node_base
+ {
+ // The type allocated by _Alloc cannot be this type, so we rebind
+ typedef typename _Alloc::template rebind<_Fwd_list_node_base<_Alloc> >
+ ::other::pointer _Pointer;
+ typedef typename _Alloc::template rebind<_Fwd_list_node_base<_Alloc> >
+ ::other::const_pointer _Const_pointer;
+
+ _Pointer _M_next;
+
+ _Fwd_list_node_base() : _M_next(0) { }
+
+ static void
+ swap(_Fwd_list_node_base& __x, _Fwd_list_node_base& __y)
+ { std::swap(__x._M_next, __y._M_next); }
+
+ void
+ _M_transfer_after(_Pointer __bbegin);
+
+ void
+ _M_transfer_after(_Pointer __bbegin, _Pointer __bend);
+
+ void
+ _M_reverse_after();
+ };
+
+ /**
+ * @brief A helper node class for %forward_list.
+ * This is just a linked list with a data value in each node.
+ * There is a sorting utility method.
+ */
+ template<typename _Tp, typename _Alloc>
+ struct _Fwd_list_node : public _Fwd_list_node_base<_Alloc>
+ {
+ typedef typename _Alloc::template rebind<_Fwd_list_node<_Tp, _Alloc> >
+ ::other::pointer _Pointer;
+
+ template<typename... _Args>
+ _Fwd_list_node(_Args&&... __args)
+ : _Fwd_list_node_base<_Alloc>(),
+ _M_value(std::forward<_Args>(__args)...) { }
+
+ template<typename _Comp>
+ void
+ _M_sort_after(_Comp __comp);
+
+ _Tp _M_value;
+ };
+
+ /**
+ * @brief A forward_list::iterator.
+ *
+ * All the functions are op overloads.
+ */
+ template<typename _Tp, typename _Alloc>
+ struct _Fwd_list_iterator
+ {
+ typedef _Fwd_list_iterator<_Tp, _Alloc> _Self;
+ typedef _Fwd_list_node<_Tp, _Alloc> _Node;
+ typedef _Fwd_list_node_base<_Alloc> _Node_base;
+
+ typedef _Tp value_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::difference_type difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Fwd_list_iterator() : _M_node() { }
+
+ explicit
+ _Fwd_list_iterator(typename _Node_base::_Pointer __n)
+ : _M_node(__n) { }
+
+ reference
+ operator*() const
+ { return __static_pointer_cast<_Node*>(_M_node)->_M_value; }
+
+ pointer
+ operator->() const
+ { return &__static_pointer_cast<_Node*>(_M_node)->_M_value; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp(*this);
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ _Self
+ _M_next() const
+ {
+ if (_M_node)
+ return _Fwd_list_iterator(_M_node->_M_next);
+ else
+ return _Fwd_list_iterator(0);
+ }
+
+ typename _Node_base::_Pointer _M_node;
+ };
+
+ /**
+ * @brief A forward_list::const_iterator.
+ *
+ * All the functions are op overloads.
+ */
+ template<typename _Tp, typename _Alloc>
+ struct _Fwd_list_const_iterator
+ {
+ typedef _Fwd_list_const_iterator<_Tp, _Alloc> _Self;
+ typedef const _Fwd_list_node<_Tp, _Alloc> _Node;
+ typedef const _Fwd_list_node_base<_Alloc> _Node_base;
+ typedef _Fwd_list_iterator<_Tp, _Alloc> iterator;
+
+ typedef _Tp value_type;
+ typedef typename _Alloc::const_pointer pointer;
+ typedef typename _Alloc::const_reference reference;
+ typedef typename _Alloc::difference_type difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Fwd_list_const_iterator() : _M_node() { }
+
+ explicit
+ _Fwd_list_const_iterator(typename _Node_base::_Const_pointer __n)
+ : _M_node(__n) { }
+
+ _Fwd_list_const_iterator(const iterator& __iter)
+ : _M_node(__iter._M_node) { }
+
+ reference
+ operator*() const
+ { return __static_pointer_cast<_Node*>(_M_node)->_M_value; }
+
+ pointer
+ operator->() const
+ { return &__static_pointer_cast<_Node*>(_M_node)->_M_value; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp(*this);
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ _Self
+ _M_next() const
+ {
+ if (this->_M_node)
+ return _Fwd_list_const_iterator(_M_node->_M_next);
+ else
+ return _Fwd_list_const_iterator(0);
+ }
+
+ typename _Node_base::_Const_pointer _M_node;
+ };
+
+ /**
+ * @brief Forward list iterator equality comparison.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const _Fwd_list_iterator<_Tp, _Alloc>& __x,
+ const _Fwd_list_const_iterator<_Tp, _Alloc>& __y)
+ { return __x._M_node == __y._M_node; }
+
+ /**
+ * @brief Forward list iterator inequality comparison.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const _Fwd_list_iterator<_Tp, _Alloc>& __x,
+ const _Fwd_list_const_iterator<_Tp, _Alloc>& __y)
+ { return __x._M_node != __y._M_node; }
+
+ /**
+ * @brief Base class for %forward_list.
+ */
+ template<typename _Tp, typename _Alloc>
+ struct _Fwd_list_base
+ {
+ protected:
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+ typedef typename _Alloc::template
+ rebind<_Fwd_list_node<_Tp, _Tp_alloc_type>>::other _Node_alloc_type;
+
+ struct _Fwd_list_impl
+ : public _Node_alloc_type
+ {
+ _Fwd_list_node_base<_Tp_alloc_type> _M_head;
+
+ _Fwd_list_impl()
+ : _Node_alloc_type(), _M_head()
+ { }
+
+ _Fwd_list_impl(const _Node_alloc_type& __a)
+ : _Node_alloc_type(__a), _M_head()
+ { }
+ };
+
+ _Fwd_list_impl _M_impl;
+
+ public:
+ typedef _Fwd_list_iterator<_Tp, _Tp_alloc_type> iterator;
+ typedef _Fwd_list_const_iterator<_Tp, _Tp_alloc_type> const_iterator;
+
+ typedef _Fwd_list_node<_Tp, _Tp_alloc_type> _Node;
+ typedef _Fwd_list_node_base<_Tp_alloc_type> _Node_base;
+
+ _Node_alloc_type&
+ _M_get_Node_allocator()
+ { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
+
+ const _Node_alloc_type&
+ _M_get_Node_allocator() const
+ { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+
+ _Fwd_list_base()
+ : _M_impl()
+ { this->_M_impl._M_head._M_next = 0; }
+
+ _Fwd_list_base(const _Alloc& __a)
+ : _M_impl(__a)
+ { this->_M_impl._M_head._M_next = 0; }
+
+ _Fwd_list_base(const _Fwd_list_base& __lst, const _Alloc& __a);
+
+ _Fwd_list_base(_Fwd_list_base&& __lst, const _Alloc& __a)
+ : _M_impl(__a)
+ { _Node_base::swap(this->_M_impl._M_head,
+ __lst._M_impl._M_head); }
+
+ _Fwd_list_base(_Fwd_list_base&& __lst)
+ : _M_impl(__lst._M_get_Node_allocator())
+ { _Node_base::swap(this->_M_impl._M_head,
+ __lst._M_impl._M_head); }
+
+ ~_Fwd_list_base()
+ { _M_erase_after(&_M_impl._M_head, 0); }
+
+ protected:
+
+ typename _Node::_Pointer
+ _M_get_node()
+ { return _M_get_Node_allocator().allocate(1); }
+
+ template<typename... _Args>
+ typename _Node::_Pointer
+ _M_create_node(_Args&&... __args)
+ {
+ typename _Node::_Pointer __node = this->_M_get_node();
+ __try
+ {
+ _M_get_Node_allocator().construct(__node,
+ std::forward<_Args>(__args)...);
+ __node->_M_next = 0;
+ }
+ __catch(...)
+ {
+ this->_M_put_node(__node);
+ __throw_exception_again;
+ }
+ return __node;
+ }
+
+ template<typename... _Args>
+ typename _Node_base::_Pointer
+ _M_insert_after(const_iterator __pos, _Args&&... __args);
+
+ void
+ _M_put_node(typename _Node::_Pointer __p)
+ { _M_get_Node_allocator().deallocate(__p, 1); }
+
+ typename _Node_base::_Pointer
+ _M_erase_after(typename _Node_base::_Pointer __pos);
+
+ typename _Node_base::_Pointer
+ _M_erase_after(typename _Node_base::_Pointer __pos,
+ typename _Node_base::_Pointer __last);
+ };
+
+ /**
+ * @brief A standard container with linear time access to elements,
+ * and fixed time insertion/deletion at any point in the sequence.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#67">sequence</a>, including the
+ * <a href="tables.html#68">optional sequence requirements</a> with the
+ * %exception of @c at and @c operator[].
+ *
+ * This is a @e singly @e linked %list. Traversal up the
+ * %list requires linear time, but adding and removing elements (or
+ * @e nodes) is done in constant time, regardless of where the
+ * change takes place. Unlike std::vector and std::deque,
+ * random-access iterators are not provided, so subscripting ( @c
+ * [] ) access is not allowed. For algorithms which only need
+ * sequential access, this lack makes no difference.
+ *
+ * Also unlike the other standard containers, std::forward_list provides
+ * specialized algorithms %unique to linked lists, such as
+ * splicing, sorting, and in-place reversal.
+ *
+ * A couple points on memory allocation for forward_list<Tp>:
+ *
+ * First, we never actually allocate a Tp, we allocate
+ * Fwd_list_node<Tp>'s and trust [20.1.5]/4 to DTRT. This is to ensure
+ * that after elements from %forward_list<X,Alloc1> are spliced into
+ * %forward_list<X,Alloc2>, destroying the memory of the second %list is a
+ * valid operation, i.e., Alloc1 giveth and Alloc2 taketh away.
+ */
+ template<typename _Tp, typename _Alloc = allocator<_Tp> >
+ class forward_list : private _Fwd_list_base<_Tp, _Alloc>
+ {
+ private:
+ typedef _Fwd_list_base<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Node _Node;
+ typedef typename _Base::_Node_base _Node_base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+
+ public:
+ // types:
+ typedef _Tp value_type;
+ typedef typename _Tp_alloc_type::pointer pointer;
+ typedef typename _Tp_alloc_type::const_pointer const_pointer;
+ typedef typename _Tp_alloc_type::reference reference;
+ typedef typename _Tp_alloc_type::const_reference const_reference;
+
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef _Alloc allocator_type;
+
+ // 23.2.3.1 construct/copy/destroy:
+
+ /**
+ * @brief Creates a %forward_list with no elements.
+ * @param al An allocator object.
+ */
+ explicit
+ forward_list(const _Alloc& __al = _Alloc())
+ : _Base(__al)
+ { }
+
+ /**
+ * @brief Copy constructor with allocator argument.
+ * @param list Input list to copy.
+ * @param al An allocator object.
+ */
+ forward_list(const forward_list& __list, const _Alloc& __al)
+ : _Base(__list, __al)
+ { }
+
+ /**
+ * @brief Move constructor with allocator argument.
+ * @param list Input list to move.
+ * @param al An allocator object.
+ */
+ forward_list(forward_list&& __list, const _Alloc& __al)
+ : _Base(std::forward<_Base>(__list), __al)
+ { }
+
+ /**
+ * @brief Creates a %forward_list with copies of the default element
+ * type.
+ * @param n The number of elements to initially create.
+ *
+ * This constructor fills the %forward_list with @a n copies of
+ * the default value.
+ */
+ explicit
+ forward_list(size_type __n)
+ : _Base()
+ { _M_fill_initialize(__n, value_type()); }
+
+ /**
+ * @brief Creates a %forward_list with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ * @param al An allocator object.
+ *
+ * This constructor fills the %forward_list with @a n copies of @a
+ * value.
+ */
+ forward_list(size_type __n, const _Tp& __value,
+ const _Alloc& __al = _Alloc())
+ : _Base(__al)
+ { _M_fill_initialize(__n, __value); }
+
+ /**
+ * @brief Builds a %forward_list from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param al An allocator object.
+ *
+ * Create a %forward_list consisting of copies of the elements from
+ * [@a first,@a last). This is linear in N (where N is
+ * distance(@a first,@a last)).
+ */
+ template<typename _InputIterator>
+ forward_list(_InputIterator __first, _InputIterator __last,
+ const _Alloc& __al = _Alloc())
+ : _Base(__al)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ /**
+ * @brief The %forward_list copy constructor.
+ * @param list A %forward_list of identical element and allocator
+ * types.
+ *
+ * The newly-created %forward_list uses a copy of the allocation
+ * object used by @a list.
+ */
+ forward_list(const forward_list& __list)
+ : _Base(__list.get_allocator())
+ { _M_initialize_dispatch(__list.begin(), __list.end(), __false_type()); }
+
+ /**
+ * @brief The %forward_list move constructor.
+ * @param list A %forward_list of identical element and allocator
+ * types.
+ *
+ * The newly-created %forward_list contains the exact contents of @a
+ * forward_list. The contents of @a list are a valid, but unspecified
+ * %forward_list.
+ */
+ forward_list(forward_list&& __list)
+ : _Base(std::forward<_Base>(__list)) { }
+
+ /**
+ * @brief Builds a %forward_list from an initializer_list
+ * @param il An initializer_list of value_type.
+ * @param al An allocator object.
+ *
+ * Create a %forward_list consisting of copies of the elements
+ * in the initializer_list @a il. This is linear in il.size().
+ */
+ forward_list(std::initializer_list<_Tp> __il,
+ const _Alloc& __al = _Alloc())
+ : _Base(__al)
+ { _M_initialize_dispatch(__il.begin(), __il.end(), __false_type()); }
+
+ /**
+ * @brief The forward_list dtor.
+ */
+ ~forward_list()
+ { _M_erase_after(&this->_M_impl._M_head, 0); }
+
+ /**
+ * @brief The %forward_list assignment operator.
+ * @param list A %forward_list of identical element and allocator
+ * types.
+ *
+ * All the elements of @a list are copied, but unlike the copy
+ * constructor, the allocator object is not copied.
+ */
+ forward_list&
+ operator=(const forward_list& __list);
+
+ /**
+ * @brief The %forward_list move assignment operator.
+ * @param list A %forward_list of identical element and allocator
+ * types.
+ *
+ * The contents of @a list are moved into this %forward_list
+ * (without copying). @a list is a valid, but unspecified
+ * %forward_list
+ */
+ forward_list&
+ operator=(forward_list&& __list)
+ {
+ if (&__list != this)
+ {
+ this->clear();
+ this->swap(__list);
+ }
+ return *this;
+ }
+
+ /**
+ * @brief The %forward_list initializer list assignment operator.
+ * @param il An initializer_list of value_type.
+ *
+ * Replace the contents of the %forward_list with copies of the
+ * elements in the initializer_list @a il. This is linear in
+ * il.size().
+ */
+ forward_list&
+ operator=(std::initializer_list<_Tp> __il)
+ {
+ assign(__il);
+ return *this;
+ }
+
+ /**
+ * @brief Assigns a range to a %forward_list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %forward_list with copies of the elements
+ * in the range [@a first,@a last).
+ *
+ * Note that the assignment completely changes the %forward_list and
+ * that the resulting %forward_list's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ clear();
+ insert_after(cbefore_begin(), __first, __last);
+ }
+
+ /**
+ * @brief Assigns a given value to a %forward_list.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %forward_list with @a n copies of the given
+ * value. Note that the assignment completely changes the
+ * %forward_list and that the resulting %forward_list's size is the
+ * same as the number of elements assigned. Old data may be lost.
+ */
+ void
+ assign(size_type __n, const _Tp& __val)
+ {
+ clear();
+ insert_after(cbefore_begin(), __n, __val);
+ }
+
+ /**
+ * @brief Assigns an initializer_list to a %forward_list.
+ * @param il An initializer_list of value_type.
+ *
+ * Replace the contents of the %forward_list with copies of the
+ * elements in the initializer_list @a il. This is linear in
+ * il.size().
+ */
+ void
+ assign(std::initializer_list<_Tp> __il)
+ {
+ clear();
+ insert_after(cbefore_begin(), __il);
+ }
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return this->_M_get_Node_allocator(); }
+
+ // 23.2.3.2 iterators:
+
+ /**
+ * Returns a read/write iterator that points before the first element
+ * in the %forward_list. Iteration is done in ordinary element order.
+ */
+ iterator
+ before_begin()
+ { return iterator(&this->_M_impl._M_head); }
+
+ /**
+ * Returns a read-only (constant) iterator that points before the
+ * first element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ before_begin() const
+ { return const_iterator(&this->_M_impl._M_head); }
+
+ /**
+ * Returns a read/write iterator that points to the first element
+ * in the %forward_list. Iteration is done in ordinary element order.
+ */
+ iterator
+ begin()
+ { return iterator(this->_M_impl._M_head._M_next); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_impl._M_head._M_next); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ iterator
+ end()
+ { return iterator(0); }
+
+ /**
+ * Returns a read-only iterator that points one past the last
+ * element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ end() const
+ { return const_iterator(0); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_impl._M_head._M_next); }
+
+ /**
+ * Returns a read-only (constant) iterator that points before the
+ * first element in the %forward_list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbefore_begin() const
+ { return const_iterator(&this->_M_impl._M_head); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %forward_list. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(0); }
+
+ /**
+ * Returns true if the %forward_list is empty. (Thus begin() would
+ * equal end().)
+ */
+ bool
+ empty() const
+ { return this->_M_impl._M_head._M_next == 0; }
+
+ /**
+ * Returns the largest possible size of %forward_list.
+ */
+ size_type
+ max_size() const
+ { return this->_M_get_Node_allocator().max_size(); }
+
+ // 23.2.3.3 element access:
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %forward_list.
+ */
+ reference
+ front()
+ {
+ _Node* __front =
+ __static_pointer_cast<_Node*>(this->_M_impl._M_head._M_next);
+ return __front->_M_value;
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %forward_list.
+ */
+ const_reference
+ front() const
+ {
+ _Node* __front =
+ __static_pointer_cast<_Node*>(this->_M_impl._M_head._M_next);
+ return __front->_M_value;
+ }
+
+ // 23.2.3.4 modifiers:
+
+ /**
+ * @brief Constructs object in %forward_list at the front of the
+ * list.
+ * @param args Arguments.
+ *
+ * This function will insert an object of type Tp constructed
+ * with Tp(std::forward<Args>(args)...) at the front of the list
+ * Due to the nature of a %forward_list this operation can
+ * be done in constant time, and does not invalidate iterators
+ * and references.
+ */
+ template<typename... _Args>
+ void
+ emplace_front(_Args&&... __args)
+ { this->_M_insert_after(cbefore_begin(),
+ std::forward<_Args>(__args)...); }
+
+ /**
+ * @brief Add data to the front of the %forward_list.
+ * @param val Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the front of the %forward_list and assigns the given
+ * data to it. Due to the nature of a %forward_list this operation
+ * can be done in constant time, and does not invalidate iterators
+ * and references.
+ */
+ void
+ push_front(const _Tp& __val)
+ { this->_M_insert_after(cbefore_begin(), __val); }
+
+ /**
+ *
+ */
+ void
+ push_front(_Tp&& __val)
+ { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical stack operation. It shrinks the %forward_list
+ * by one. Due to the nature of a %forward_list this operation can
+ * be done in constant time, and only invalidates iterators/references
+ * to the element being removed.
+ *
+ * Note that no data is returned, and if the first element's data
+ * is needed, it should be retrieved before pop_front() is
+ * called.
+ */
+ void
+ pop_front()
+ { this->_M_erase_after(&this->_M_impl._M_head); }
+
+ /**
+ * @brief Constructs object in %forward_list after the specified
+ * iterator.
+ * @param pos A const_iterator into the %forward_list.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) after the specified
+ * location. Due to the nature of a %forward_list this operation can
+ * be done in constant time, and does not invalidate iterators
+ * and references.
+ */
+ template<typename... _Args>
+ iterator
+ emplace_after(const_iterator __pos, _Args&&... __args)
+ { return iterator(this->_M_insert_after(__pos,
+ std::forward<_Args>(__args)...)); }
+
+ /**
+ * @brief Inserts given value into %forward_list after specified
+ * iterator.
+ * @param pos An iterator into the %forward_list.
+ * @param val Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value after
+ * the specified location. Due to the nature of a %forward_list this
+ * operation can be done in constant time, and does not
+ * invalidate iterators and references.
+ */
+ iterator
+ insert_after(const_iterator __pos, const _Tp& __val)
+ { return iterator(this->_M_insert_after(__pos, __val)); }
+
+ /**
+ *
+ */
+ iterator
+ insert_after(const_iterator __pos, _Tp&& __val)
+ { return iterator(this->_M_insert_after(__pos, std::move(__val))); }
+
+ /**
+ * @brief Inserts a number of copies of given data into the
+ * %forward_list.
+ * @param pos An iterator into the %forward_list.
+ * @param n Number of elements to be inserted.
+ * @param val Data to be inserted.
+ *
+ * This function will insert a specified number of copies of the
+ * given data after the location specified by @a pos.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ void
+ insert_after(const_iterator __pos, size_type __n, const _Tp& __val)
+ {
+ forward_list __tmp(__n, __val, this->get_allocator());
+ this->splice_after(__pos, std::move(__tmp));
+ }
+
+ /**
+ * @brief Inserts a range into the %forward_list.
+ * @param position An iterator into the %forward_list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range [@a
+ * first,@a last) into the %forward_list after the location specified
+ * by @a pos.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ template<typename _InputIterator>
+ void
+ insert_after(const_iterator __pos,
+ _InputIterator __first, _InputIterator __last)
+ {
+ forward_list __tmp(__first, __last, this->get_allocator());
+ this->splice_after(__pos, std::move(__tmp));
+ }
+
+ /**
+ * @brief Inserts the contents of an initializer_list into
+ * %forward_list after the specified iterator.
+ * @param pos An iterator into the %forward_list.
+ * @param il An initializer_list of value_type.
+ *
+ * This function will insert copies of the data in the
+ * initializer_list @a il into the %forward_list before the location
+ * specified by @a pos.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ void
+ insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
+ {
+ forward_list __tmp(__il, this->get_allocator());
+ this->splice_after(__pos, std::move(__tmp));
+ }
+
+ /**
+ * @brief Removes the element pointed to by the iterator following
+ * @c pos.
+ * @param pos Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and
+ * thus shorten the %forward_list by one.
+ *
+ * Due to the nature of a %forward_list this operation can be done
+ * in constant time, and only invalidates iterators/references to
+ * the element being removed. The user is also cautioned that
+ * this function only erases the element, and that if the element
+ * is itself a pointer, the pointed-to memory is not touched in
+ * any way. Managing the pointer is the user's responsibility.
+ */
+ iterator
+ erase_after(const_iterator __pos)
+ {
+ _Node_base* __tmp = __const_pointer_cast<_Node_base*>(__pos._M_node);
+ if (__tmp)
+ return iterator(this->_M_erase_after(__tmp));
+ else
+ return end();
+ }
+
+ /**
+ * @brief Remove a range of elements.
+ * @param pos Iterator pointing before the first element to be
+ * erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range @a
+ * (pos,last) and shorten the %forward_list accordingly.
+ *
+ * This operation is linear time in the size of the range and only
+ * invalidates iterators/references to the element being removed.
+ * The user is also cautioned that this function only erases the
+ * elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibility.
+ */
+ iterator
+ erase_after(const_iterator __pos, iterator __last)
+ {
+ _Node_base* __tmp = __const_pointer_cast<_Node_base*>(__pos._M_node);
+ return iterator(this->_M_erase_after(__tmp, &*__last._M_node));
+ }
+
+ /**
+ * @brief Swaps data with another %forward_list.
+ * @param list A %forward_list of the same element and allocator
+ * types.
+ *
+ * This exchanges the elements between two lists in constant
+ * time. Note that the global std::swap() function is
+ * specialized such that std::swap(l1,l2) will feed to this
+ * function.
+ */
+ void
+ swap(forward_list&& __list)
+ { _Node_base::swap(this->_M_impl._M_head, __list._M_impl._M_head); }
+
+ /**
+ * @brief Resizes the %forward_list to the specified number of
+ * elements.
+ * @param sz Number of elements the %forward_list should contain.
+ *
+ * This function will %resize the %forward_list to the specified
+ * number of elements. If the number is smaller than the
+ * %forward_list's current size the %forward_list is truncated,
+ * otherwise the %forward_list is extended and new elements are
+ * populated with given data.
+ */
+ void
+ resize(size_type __sz)
+ { resize(__sz, _Tp()); }
+
+ /**
+ * @brief Resizes the %forward_list to the specified number of
+ * elements.
+ * @param sz Number of elements the %forward_list should contain.
+ * @param val Data with which new elements should be populated.
+ *
+ * This function will %resize the %forward_list to the specified
+ * number of elements. If the number is smaller than the
+ * %forward_list's current size the %forward_list is truncated,
+ * otherwise the %forward_list is extended and new elements are
+ * populated with given data.
+ */
+ void
+ resize(size_type __sz, value_type __val);
+
+ /**
+ * @brief Erases all the elements.
+ *
+ * Note that this function only erases
+ * the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ void
+ clear()
+ { this->_M_erase_after(&this->_M_impl._M_head, 0); }
+
+ // 23.2.3.5 forward_list operations:
+
+ /**
+ * @brief Insert contents of another %forward_list.
+ * @param pos Iterator referencing the element to insert after.
+ * @param list Source list.
+ *
+ * The elements of @a list are inserted in constant time after
+ * the element referenced by @a pos. @a list becomes an empty
+ * list.
+ *
+ * Requires this != @a x.
+ */
+ void
+ splice_after(const_iterator __pos, forward_list&& __list);
+
+ /**
+ * @brief Insert element from another %forward_list.
+ * @param pos Iterator referencing the element to insert after.
+ * @param list Source list.
+ * @param it Iterator referencing the element before the element
+ * to move.
+ *
+ * Removes the element in list @a list referenced by @a i and
+ * inserts it into the current list after @a pos.
+ */
+ void
+ splice_after(const_iterator __pos, forward_list&& __list,
+ const_iterator __it)
+ { this->splice_after(__pos, __list, __it, __it._M_next()); }
+
+ /**
+ * @brief Insert range from another %forward_list.
+ * @param pos Iterator referencing the element to insert after.
+ * @param list Source list.
+ * @param before Iterator referencing before the start of range
+ * in list.
+ * @param last Iterator referencing the end of range in list.
+ *
+ * Removes elements in the range (before,last) and inserts them
+ * after @a pos in constant time.
+ *
+ * Undefined if @a pos is in (before,last).
+ */
+ void
+ splice_after(const_iterator __pos, forward_list&& __list,
+ const_iterator __before, const_iterator __last);
+
+ /**
+ * @brief Remove all elements equal to value.
+ * @param val The value to remove.
+ *
+ * Removes every element in the list equal to @a value.
+ * Remaining elements stay in list order. Note that this
+ * function only erases the elements, and that if the elements
+ * themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ void
+ remove(const _Tp& __val);
+
+ /**
+ * @brief Remove all elements satisfying a predicate.
+ * @param pred Unary predicate function or object.
+ *
+ * Removes every element in the list for which the predicate
+ * returns true. Remaining elements stay in list order. Note
+ * that this function only erases the elements, and that if the
+ * elements themselves are pointers, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ template<typename _Pred>
+ void
+ remove_if(_Pred __pred);
+
+ /**
+ * @brief Remove consecutive duplicate elements.
+ *
+ * For each consecutive set of elements with the same value,
+ * remove all but the first one. Remaining elements stay in
+ * list order. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing
+ * the pointer is the user's responsibility.
+ */
+ void
+ unique()
+ { this->unique(std::equal_to<_Tp>()); }
+
+ /**
+ * @brief Remove consecutive elements satisfying a predicate.
+ * @param binary_pred Binary predicate function or object.
+ *
+ * For each consecutive set of elements [first,last) that
+ * satisfy predicate(first,i) where i is an iterator in
+ * [first,last), remove all but the first one. Remaining
+ * elements stay in list order. Note that this function only
+ * erases the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ template<typename _BinPred>
+ void
+ unique(_BinPred __binary_pred);
+
+ /**
+ * @brief Merge sorted lists.
+ * @param list Sorted list to merge.
+ *
+ * Assumes that both @a list and this list are sorted according to
+ * operator<(). Merges elements of @a list into this list in
+ * sorted order, leaving @a list empty when complete. Elements in
+ * this list precede elements in @a list that are equal.
+ */
+ void
+ merge(forward_list&& __list)
+ { this->merge(__list, std::less<_Tp>()); }
+
+ /**
+ * @brief Merge sorted lists according to comparison function.
+ * @param list Sorted list to merge.
+ * @param comp Comparison function defining sort order.
+ *
+ * Assumes that both @a list and this list are sorted according to
+ * comp. Merges elements of @a list into this list
+ * in sorted order, leaving @a list empty when complete. Elements
+ * in this list precede elements in @a list that are equivalent
+ * according to comp().
+ */
+ template<typename _Comp>
+ void
+ merge(forward_list&& __list, _Comp __comp);
+
+ /**
+ * @brief Sort the elements of the list.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
+ void
+ sort()
+ {
+ _Node* __tmp = __static_pointer_cast<_Node*>(&this->_M_impl._M_head);
+ __tmp->_M_sort_after(std::less<_Tp>());
+ }
+
+ /**
+ * @brief Sort the forward_list using a comparison function.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
+ template<typename _Comp>
+ void
+ sort(_Comp __comp)
+ {
+ _Node* __tmp = __static_pointer_cast<_Node*>(&this->_M_impl._M_head);
+ __tmp->_M_sort_after(__comp);
+ }
+
+ /**
+ * @brief Reverse the elements in list.
+ *
+ * Reverse the order of elements in the list in linear time.
+ */
+ void
+ reverse()
+ { this->_M_impl._M_head._M_reverse_after(); }
+
+ private:
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ { _M_fill_initialize(static_cast<size_type>(__n), __x); }
+
+ // Called by the range constructor to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type);
+
+ // Called by forward_list(n,v,a), and the range constructor when it
+ // turns out to be the same thing.
+ void
+ _M_fill_initialize(size_type __n, const value_type& __value);
+ };
+
+ /**
+ * @brief Forward list equality comparison.
+ * @param lx A %forward_list
+ * @param ly A %forward_list of the same type as @a lx.
+ * @return True iff the size and elements of the forward lists are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * forward lists. Deques are considered equivalent if corresponding
+ * elements compare equal.
+ */
+ template<typename _Tp, typename _Alloc>
+ bool
+ operator==(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly);
+
+ /**
+ * @brief Forward list ordering relation.
+ * @param lx A %forward_list.
+ * @param ly A %forward_list of the same type as @a lx.
+ * @return True iff @a lx is lexicographically less than @a ly.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * forward lists. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(),
+ __ly.cbegin(), __ly.cend()); }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ { return !(__lx == __ly); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ { return (__ly < __lx); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ { return !(__lx < __ly); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ { return !(__ly < __lx); }
+
+ /// See std::forward_list::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(forward_list<_Tp, _Alloc>& __lx,
+ forward_list<_Tp, _Alloc>& __ly)
+ { __lx.swap(__ly); }
+
+ /// See std::forward_list::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(forward_list<_Tp, _Alloc>&& __lx,
+ forward_list<_Tp, _Alloc>& __ly)
+ { __lx.swap(__ly); }
+
+ /// See std::forward_list::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(forward_list<_Tp, _Alloc>& __lx,
+ forward_list<_Tp, _Alloc>&& __ly)
+ { __lx.swap(__ly); }
+
+_GLIBCXX_END_NAMESPACE // namespace std
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _FORWARD_LIST_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.tcc
new file mode 100644
index 0000000..8458e7e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/forward_list.tcc
@@ -0,0 +1,478 @@
+// <forward_list.tcc> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file forward_list.tcc
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _FORWARD_LIST_TCC
+#define _FORWARD_LIST_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_transfer_after(_Pointer __bbegin)
+ {
+ _Pointer __bend = __bbegin;
+ while (__bend && __bend->_M_next)
+ __bend = __bend->_M_next;
+ _M_transfer_after(__bbegin, __bend);
+ }
+
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_transfer_after(_Pointer __bbegin, _Pointer __bend)
+ {
+ _Pointer __keep = __bbegin->_M_next;
+ if (__bend)
+ {
+ __bbegin->_M_next = __bend->_M_next;
+ __bend->_M_next = _M_next;
+ }
+ else
+ __bbegin->_M_next = 0;
+ _M_next = __keep;
+ }
+
+ template<typename _Alloc>
+ void
+ _Fwd_list_node_base<_Alloc>::
+ _M_reverse_after()
+ {
+ _Pointer __tail = _M_next;
+ if (!__tail)
+ return;
+ while (_Pointer __temp = __tail->_M_next)
+ {
+ _Pointer __keep = _M_next;
+ _M_next = __temp;
+ __tail->_M_next = __temp->_M_next;
+ _M_next->_M_next = __keep;
+ }
+ }
+
+ /**
+ * @brief Sort the singly linked list starting after this node.
+ * This node is assumed to be an empty head node (of type
+ * _Fwd_list_node_base).
+ */
+ template<typename _Tp, class _Alloc>
+ template<typename _Comp>
+ void
+ _Fwd_list_node<_Tp, _Alloc>::
+ _M_sort_after(_Comp __comp)
+ {
+ // If `next' is 0, return immediately.
+ _Pointer __list = __static_pointer_cast<_Pointer>(this->_M_next);
+ if (!__list)
+ return;
+
+ unsigned long __insize = 1;
+
+ while (1)
+ {
+ _Pointer __p = __list;
+ __list = 0;
+ _Pointer __tail = 0;
+
+ // Count number of merges we do in this pass.
+ unsigned long __nmerges = 0;
+
+ while (__p)
+ {
+ ++__nmerges;
+ // There exists a merge to be done.
+ // Step `insize' places along from p.
+ _Pointer __q = __p;
+ unsigned long __psize = 0;
+ for (unsigned long __i = 0; __i < __insize; ++__i)
+ {
+ ++__psize;
+ __q = __static_pointer_cast<_Pointer>(__q->_M_next);
+ if (!__q)
+ break;
+ }
+
+ // If q hasn't fallen off end, we have two lists to merge.
+ unsigned long __qsize = __insize;
+
+ // Now we have two lists; merge them.
+ while (__psize > 0 || (__qsize > 0 && __q))
+ {
+ // Decide whether next node of merge comes from p or q.
+ _Pointer __e;
+ if (__psize == 0)
+ {
+ // p is empty; e must come from q.
+ __e = __q;
+ __q = __static_pointer_cast<_Pointer>(__q->_M_next);
+ --__qsize;
+ }
+ else if (__qsize == 0 || !__q)
+ {
+ // q is empty; e must come from p.
+ __e = __p;
+ __p = __static_pointer_cast<_Pointer>(__p->_M_next);
+ --__psize;
+ }
+ else if (__comp(__p->_M_value, __q->_M_value))
+ {
+ // First node of p is lower; e must come from p.
+ __e = __p;
+ __p = __static_pointer_cast<_Pointer>(__p->_M_next);
+ --__psize;
+ }
+ else
+ {
+ // First node of q is lower; e must come from q.
+ __e = __q;
+ __q = __static_pointer_cast<_Pointer>(__q->_M_next);
+ --__qsize;
+ }
+
+ // Add the next node to the merged list.
+ if (__tail)
+ __tail->_M_next = __e;
+ else
+ __list = __e;
+ __tail = __e;
+ }
+
+ // Now p has stepped `insize' places along, and q has too.
+ __p = __q;
+ }
+ __tail->_M_next = 0;
+
+ // If we have done only one merge, we're finished.
+ // Allow for nmerges == 0, the empty list case.
+ if (__nmerges <= 1)
+ {
+ this->_M_next = __list;
+ return;
+ }
+
+ // Otherwise repeat, merging lists twice the size.
+ __insize *= 2;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ _Fwd_list_base<_Tp, _Alloc>::
+ _Fwd_list_base(const _Fwd_list_base& __lst, const _Alloc& __a)
+ : _M_impl(__a)
+ {
+ this->_M_impl._M_head._M_next = 0;
+ typename _Node_base::_Pointer __to = &this->_M_impl._M_head;
+ typename _Node::_Pointer __curr
+ = __static_pointer_cast<typename _Node::_Pointer>
+ (__lst._M_impl._M_head._M_next);
+ while (__curr)
+ {
+ __to->_M_next = _M_create_node(__curr->_M_value);
+ __to = __to->_M_next;
+ __curr = __static_pointer_cast<typename _Node::_Pointer>
+ (__curr->_M_next);
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename _Fwd_list_base<_Tp, _Alloc>::_Node_base::_Pointer
+ _Fwd_list_base<_Tp, _Alloc>::
+ _M_insert_after(const_iterator __pos, _Args&&... __args)
+ {
+ typename _Node_base::_Pointer __to
+ = __const_pointer_cast<typename _Node_base::_Pointer>
+ (__pos._M_node);
+ typename _Node::_Pointer __thing
+ = __static_pointer_cast<typename _Node::_Pointer>(
+ _M_create_node(std::forward<_Args>(__args)...) );
+ __thing->_M_next = __to->_M_next;
+ __to->_M_next = __thing;
+ return __static_pointer_cast<typename _Node_base::_Pointer>
+ (__to->_M_next);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ typename _Fwd_list_base<_Tp, _Alloc>::_Node_base::_Pointer
+ _Fwd_list_base<_Tp, _Alloc>::
+ _M_erase_after(typename _Node_base::_Pointer __pos)
+ {
+ typename _Node::_Pointer __curr
+ = __static_pointer_cast<typename _Node::_Pointer>(__pos->_M_next);
+ if (__curr)
+ {
+ typename _Node_base::_Pointer __next = __curr->_M_next;
+ __pos->_M_next = __next;
+ _M_get_Node_allocator().destroy(__curr);
+ _M_put_node(__curr);
+ }
+ return __pos;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ typename _Fwd_list_base<_Tp, _Alloc>::_Node_base::_Pointer
+ _Fwd_list_base<_Tp, _Alloc>::
+ _M_erase_after(typename _Node_base::_Pointer __pos,
+ typename _Node_base::_Pointer __last)
+ {
+ typename _Node::_Pointer __curr
+ = __static_pointer_cast<typename _Node::_Pointer>(__pos->_M_next);
+ while (__curr)
+ {
+ typename _Node::_Pointer __temp = __curr;
+ __curr = __static_pointer_cast<typename _Node::_Pointer>
+ (__curr->_M_next);
+ _M_get_Node_allocator().destroy(__temp);
+ _M_put_node(__temp);
+ __pos->_M_next = __curr;
+ if (__temp == __last)
+ break;
+ }
+ return __pos;
+ }
+
+ // Called by the range constructor to implement [23.1.1]/9
+ template<typename _Tp, typename _Alloc>
+ template<typename _InputIterator>
+ void
+ forward_list<_Tp, _Alloc>::
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typename _Node_base::_Pointer __to = &this->_M_impl._M_head;
+ for (; __first != __last; ++__first)
+ {
+ __to->_M_next = this->_M_create_node(*__first);
+ __to = __to->_M_next;
+ }
+ }
+
+ // Called by forward_list(n,v,a), and the range constructor
+ // when it turns out to be the same thing.
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
+ _M_fill_initialize(size_type __n, const value_type& __value)
+ {
+ typename _Node_base::_Pointer __to = &this->_M_impl._M_head;
+ for (; __n > 0; --__n)
+ {
+ __to->_M_next = this->_M_create_node(__value);
+ __to = __to->_M_next;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ forward_list<_Tp, _Alloc>&
+ forward_list<_Tp, _Alloc>::
+ operator=(const forward_list& __list)
+ {
+ if (&__list != this)
+ {
+ iterator __prev1 = before_begin();
+ iterator __curr1 = begin();
+ iterator __last1 = end();
+ const_iterator __first2 = __list.cbegin();
+ const_iterator __last2 = __list.cend();
+ while (__curr1 != __last1 && __first2 != __last2)
+ {
+ *__curr1 = *__first2;
+ ++__prev1;
+ ++__curr1;
+ ++__first2;
+ }
+ if (__first2 == __last2)
+ erase_after(__prev1, __last1);
+ else
+ insert_after(__prev1, __first2, __last2);
+ }
+ return *this;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
+ resize(size_type __sz, value_type __val)
+ {
+ iterator __k = before_begin();
+
+ size_type __len = 0;
+ while (__k._M_next() != end() && __len < __sz)
+ {
+ ++__k;
+ ++__len;
+ }
+ if (__len == __sz)
+ erase_after(__k, end());
+ else
+ insert_after(__k, __sz - __len, __val);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
+ splice_after(const_iterator __pos, forward_list&& __list)
+ {
+ if (!__list.empty() && &__list != this)
+ {
+ typename _Node_base::_Pointer __tmp
+ = __const_pointer_cast<typename _Node_base::_Pointer>
+ (__pos._M_node);
+ const_iterator __before = __list.cbefore_begin();
+ __tmp->_M_transfer_after(__const_pointer_cast
+ <typename _Node_base::_Pointer>
+ (__before._M_node));
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
+ splice_after(const_iterator __pos, forward_list&& __list,
+ const_iterator __before, const_iterator __last)
+ {
+ typename _Node_base::_Pointer __tmp
+ = __const_pointer_cast<typename _Node_base::_Pointer>(__pos._M_node);
+ __tmp->_M_transfer_after(__const_pointer_cast
+ <typename _Node_base::_Pointer>
+ (__before._M_node),
+ __const_pointer_cast
+ <typename _Node_base::_Pointer>
+ (__last._M_node));
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ forward_list<_Tp, _Alloc>::
+ remove(const _Tp& __val)
+ {
+ typename _Node::_Pointer __curr
+ = __static_pointer_cast<typename _Node::_Pointer>
+ (&this->_M_impl._M_head);
+ while (typename _Node::_Pointer __temp =
+ __static_pointer_cast<typename _Node::_Pointer>(__curr->_M_next))
+ {
+ if (__temp->_M_value == __val)
+ this->_M_erase_after(__curr);
+ else
+ __curr = __static_pointer_cast<typename _Node::_Pointer>
+ (__curr->_M_next);
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _Pred>
+ void
+ forward_list<_Tp, _Alloc>::
+ remove_if(_Pred __pred)
+ {
+ typename _Node::_Pointer __curr
+ = __static_pointer_cast<typename _Node::_Pointer>
+ (&this->_M_impl._M_head);
+ while (typename _Node::_Pointer __temp =
+ __static_pointer_cast<typename _Node::_Pointer>(__curr->_M_next))
+ {
+ if (__pred(__temp->_M_value))
+ this->_M_erase_after(__curr);
+ else
+ __curr = __static_pointer_cast<typename _Node::_Pointer>
+ (__curr->_M_next);
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _BinPred>
+ void
+ forward_list<_Tp, _Alloc>::
+ unique(_BinPred __binary_pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ erase_after(__first);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _Comp>
+ void
+ forward_list<_Tp, _Alloc>::
+ merge(forward_list&& __list, _Comp __comp)
+ {
+ typename _Node_base::_Pointer __node = &this->_M_impl._M_head;
+ while (__node->_M_next && __list._M_impl._M_head._M_next)
+ {
+ if (__comp(__static_pointer_cast<typename _Node::_Pointer>
+ (__list._M_impl._M_head._M_next)->_M_value,
+ __static_pointer_cast<typename _Node::_Pointer>
+ (__node->_M_next)->_M_value))
+ __node->_M_transfer_after(&__list._M_impl._M_head,
+ __list._M_impl._M_head._M_next);
+ __node = __node->_M_next;
+ }
+ if (__list._M_impl._M_head._M_next)
+ {
+ __node->_M_next = __list._M_impl._M_head._M_next;
+ __list._M_impl._M_head._M_next = 0;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ bool
+ operator==(const forward_list<_Tp, _Alloc>& __lx,
+ const forward_list<_Tp, _Alloc>& __ly)
+ {
+ // We don't have size() so we need to walk through both lists
+ // making sure both iterators are valid.
+ auto __ix = __lx.cbegin();
+ auto __iy = __ly.cbegin();
+ while (__ix != __lx.cend() && __iy != __ly.cend())
+ {
+ if (*__ix != *__iy)
+ return false;
+ ++__ix;
+ ++__iy;
+ }
+ if (__ix == __lx.cend() && __iy == __ly.cend())
+ return true;
+ else
+ return false;
+ }
+
+_GLIBCXX_END_NAMESPACE // namespace std
+
+#endif /* _FORWARD_LIST_TCC */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/fstream.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/fstream.tcc
new file mode 100644
index 0000000..c5f7f8c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/fstream.tcc
@@ -0,0 +1,926 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+// 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file fstream.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.8 File-based streams
+//
+
+#ifndef _FSTREAM_TCC
+#define _FSTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_filebuf<_CharT, _Traits>::
+ _M_allocate_internal_buffer()
+ {
+ // Allocate internal buffer only if one doesn't already exist
+ // (either allocated or provided by the user via setbuf).
+ if (!_M_buf_allocated && !_M_buf)
+ {
+ _M_buf = new char_type[_M_buf_size];
+ _M_buf_allocated = true;
+ }
+ }
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_filebuf<_CharT, _Traits>::
+ _M_destroy_internal_buffer() throw()
+ {
+ if (_M_buf_allocated)
+ {
+ delete [] _M_buf;
+ _M_buf = NULL;
+ _M_buf_allocated = false;
+ }
+ delete [] _M_ext_buf;
+ _M_ext_buf = NULL;
+ _M_ext_buf_size = 0;
+ _M_ext_next = NULL;
+ _M_ext_end = NULL;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_filebuf<_CharT, _Traits>::
+ basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
+ _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
+ _M_state_last(), _M_buf(NULL), _M_buf_size(BUFSIZ),
+ _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(),
+ _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
+ _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
+ _M_ext_end(0)
+ {
+ if (has_facet<__codecvt_type>(this->_M_buf_locale))
+ _M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale);
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+ basic_filebuf<_CharT, _Traits>::
+ open(const char* __s, ios_base::openmode __mode)
+ {
+ __filebuf_type *__ret = NULL;
+ if (!this->is_open())
+ {
+ _M_file.open(__s, __mode);
+ if (this->is_open())
+ {
+ _M_allocate_internal_buffer();
+ _M_mode = __mode;
+
+ // Setup initial buffer to 'uncommitted' mode.
+ _M_reading = false;
+ _M_writing = false;
+ _M_set_buffer(-1);
+
+ // Reset to initial state.
+ _M_state_last = _M_state_cur = _M_state_beg;
+
+ // 27.8.1.3,4
+ if ((__mode & ios_base::ate)
+ && this->seekoff(0, ios_base::end, __mode)
+ == pos_type(off_type(-1)))
+ this->close();
+ else
+ __ret = this;
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
+ basic_filebuf<_CharT, _Traits>::
+ close()
+ {
+ if (!this->is_open())
+ return NULL;
+
+ bool __testfail = false;
+ {
+ // NB: Do this here so that re-opened filebufs will be cool...
+ struct __close_sentry
+ {
+ basic_filebuf *__fb;
+ __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { }
+ ~__close_sentry ()
+ {
+ __fb->_M_mode = ios_base::openmode(0);
+ __fb->_M_pback_init = false;
+ __fb->_M_destroy_internal_buffer();
+ __fb->_M_reading = false;
+ __fb->_M_writing = false;
+ __fb->_M_set_buffer(-1);
+ __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg;
+ }
+ } __cs (this);
+
+ __try
+ {
+ if (!_M_terminate_output())
+ __testfail = true;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ _M_file.close();
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __testfail = true; }
+ }
+
+ if (!_M_file.close())
+ __testfail = true;
+
+ if (__testfail)
+ return NULL;
+ else
+ return this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_filebuf<_CharT, _Traits>::
+ showmanyc()
+ {
+ streamsize __ret = -1;
+ const bool __testin = _M_mode & ios_base::in;
+ if (__testin && this->is_open())
+ {
+ // For a stateful encoding (-1) the pending sequence might be just
+ // shift and unshift prefixes with no actual character.
+ __ret = this->egptr() - this->gptr();
+
+#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM
+ // About this workaround, see libstdc++/20806.
+ const bool __testbinary = _M_mode & ios_base::binary;
+ if (__check_facet(_M_codecvt).encoding() >= 0
+ && __testbinary)
+#else
+ if (__check_facet(_M_codecvt).encoding() >= 0)
+#endif
+ __ret += _M_file.showmanyc() / _M_codecvt->max_length();
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::
+ underflow()
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = _M_mode & ios_base::in;
+ if (__testin && !_M_writing)
+ {
+ // Check for pback madness, and if so switch back to the
+ // normal buffers and jet outta here before expensive
+ // fileops happen...
+ _M_destroy_pback();
+
+ if (this->gptr() < this->egptr())
+ return traits_type::to_int_type(*this->gptr());
+
+ // Get and convert input sequence.
+ const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
+
+ // Will be set to true if ::read() returns 0 indicating EOF.
+ bool __got_eof = false;
+ // Number of internal characters produced.
+ streamsize __ilen = 0;
+ codecvt_base::result __r = codecvt_base::ok;
+ if (__check_facet(_M_codecvt).always_noconv())
+ {
+ __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()),
+ __buflen);
+ if (__ilen == 0)
+ __got_eof = true;
+ }
+ else
+ {
+ // Worst-case number of external bytes.
+ // XXX Not done encoding() == -1.
+ const int __enc = _M_codecvt->encoding();
+ streamsize __blen; // Minimum buffer size.
+ streamsize __rlen; // Number of chars to read.
+ if (__enc > 0)
+ __blen = __rlen = __buflen * __enc;
+ else
+ {
+ __blen = __buflen + _M_codecvt->max_length() - 1;
+ __rlen = __buflen;
+ }
+ const streamsize __remainder = _M_ext_end - _M_ext_next;
+ __rlen = __rlen > __remainder ? __rlen - __remainder : 0;
+
+ // An imbue in 'read' mode implies first converting the external
+ // chars already present.
+ if (_M_reading && this->egptr() == this->eback() && __remainder)
+ __rlen = 0;
+
+ // Allocate buffer if necessary and move unconverted
+ // bytes to front.
+ if (_M_ext_buf_size < __blen)
+ {
+ char* __buf = new char[__blen];
+ if (__remainder)
+ __builtin_memcpy(__buf, _M_ext_next, __remainder);
+
+ delete [] _M_ext_buf;
+ _M_ext_buf = __buf;
+ _M_ext_buf_size = __blen;
+ }
+ else if (__remainder)
+ __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+ _M_ext_next = _M_ext_buf;
+ _M_ext_end = _M_ext_buf + __remainder;
+ _M_state_last = _M_state_cur;
+
+ do
+ {
+ if (__rlen > 0)
+ {
+ // Sanity check!
+ // This may fail if the return value of
+ // codecvt::max_length() is bogus.
+ if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
+ {
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "codecvt::max_length() "
+ "is not valid"));
+ }
+ streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen);
+ if (__elen == 0)
+ __got_eof = true;
+ else if (__elen == -1)
+ break;
+ _M_ext_end += __elen;
+ }
+
+ char_type* __iend = this->eback();
+ if (_M_ext_next < _M_ext_end)
+ __r = _M_codecvt->in(_M_state_cur, _M_ext_next,
+ _M_ext_end, _M_ext_next,
+ this->eback(),
+ this->eback() + __buflen, __iend);
+ if (__r == codecvt_base::noconv)
+ {
+ size_t __avail = _M_ext_end - _M_ext_buf;
+ __ilen = std::min(__avail, __buflen);
+ traits_type::copy(this->eback(),
+ reinterpret_cast<char_type*>
+ (_M_ext_buf), __ilen);
+ _M_ext_next = _M_ext_buf + __ilen;
+ }
+ else
+ __ilen = __iend - this->eback();
+
+ // _M_codecvt->in may return error while __ilen > 0: this is
+ // ok, and actually occurs in case of mixed encodings (e.g.,
+ // XML files).
+ if (__r == codecvt_base::error)
+ break;
+
+ __rlen = 1;
+ }
+ while (__ilen == 0 && !__got_eof);
+ }
+
+ if (__ilen > 0)
+ {
+ _M_set_buffer(__ilen);
+ _M_reading = true;
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ else if (__got_eof)
+ {
+ // If the actual end of file is reached, set 'uncommitted'
+ // mode, thus allowing an immediate write without an
+ // intervening seek.
+ _M_set_buffer(-1);
+ _M_reading = false;
+ // However, reaching it while looping on partial means that
+ // the file has got an incomplete character.
+ if (__r == codecvt_base::partial)
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "incomplete character in file"));
+ }
+ else if (__r == codecvt_base::error)
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "invalid byte sequence in file"));
+ else
+ __throw_ios_failure(__N("basic_filebuf::underflow "
+ "error reading the file"));
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::
+ pbackfail(int_type __i)
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = _M_mode & ios_base::in;
+ if (__testin && !_M_writing)
+ {
+ // Remember whether the pback buffer is active, otherwise below
+ // we may try to store in it a second char (libstdc++/9761).
+ const bool __testpb = _M_pback_init;
+ const bool __testeof = traits_type::eq_int_type(__i, __ret);
+ int_type __tmp;
+ if (this->eback() < this->gptr())
+ {
+ this->gbump(-1);
+ __tmp = traits_type::to_int_type(*this->gptr());
+ }
+ else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1)))
+ {
+ __tmp = this->underflow();
+ if (traits_type::eq_int_type(__tmp, __ret))
+ return __ret;
+ }
+ else
+ {
+ // At the beginning of the buffer, need to make a
+ // putback position available. But the seek may fail
+ // (f.i., at the beginning of a file, see
+ // libstdc++/9439) and in that case we return
+ // traits_type::eof().
+ return __ret;
+ }
+
+ // Try to put back __i into input sequence in one of three ways.
+ // Order these tests done in is unspecified by the standard.
+ if (!__testeof && traits_type::eq_int_type(__i, __tmp))
+ __ret = __i;
+ else if (__testeof)
+ __ret = traits_type::not_eof(__i);
+ else if (!__testpb)
+ {
+ _M_create_pback();
+ _M_reading = true;
+ *this->gptr() = traits_type::to_char_type(__i);
+ __ret = __i;
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::int_type
+ basic_filebuf<_CharT, _Traits>::
+ overflow(int_type __c)
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testeof = traits_type::eq_int_type(__c, __ret);
+ const bool __testout = _M_mode & ios_base::out;
+ if (__testout && !_M_reading)
+ {
+ if (this->pbase() < this->pptr())
+ {
+ // If appropriate, append the overflow char.
+ if (!__testeof)
+ {
+ *this->pptr() = traits_type::to_char_type(__c);
+ this->pbump(1);
+ }
+
+ // Convert pending sequence to external representation,
+ // and output.
+ if (_M_convert_to_external(this->pbase(),
+ this->pptr() - this->pbase()))
+ {
+ _M_set_buffer(0);
+ __ret = traits_type::not_eof(__c);
+ }
+ }
+ else if (_M_buf_size > 1)
+ {
+ // Overflow in 'uncommitted' mode: set _M_writing, set
+ // the buffer to the initial 'write' mode, and put __c
+ // into the buffer.
+ _M_set_buffer(0);
+ _M_writing = true;
+ if (!__testeof)
+ {
+ *this->pptr() = traits_type::to_char_type(__c);
+ this->pbump(1);
+ }
+ __ret = traits_type::not_eof(__c);
+ }
+ else
+ {
+ // Unbuffered.
+ char_type __conv = traits_type::to_char_type(__c);
+ if (__testeof || _M_convert_to_external(&__conv, 1))
+ {
+ _M_writing = true;
+ __ret = traits_type::not_eof(__c);
+ }
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ bool
+ basic_filebuf<_CharT, _Traits>::
+ _M_convert_to_external(_CharT* __ibuf, streamsize __ilen)
+ {
+ // Sizes of external and pending output.
+ streamsize __elen;
+ streamsize __plen;
+ if (__check_facet(_M_codecvt).always_noconv())
+ {
+ __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
+ __plen = __ilen;
+ }
+ else
+ {
+ // Worst-case number of external bytes needed.
+ // XXX Not done encoding() == -1.
+ streamsize __blen = __ilen * _M_codecvt->max_length();
+ char* __buf = static_cast<char*>(__builtin_alloca(__blen));
+
+ char* __bend;
+ const char_type* __iend;
+ codecvt_base::result __r;
+ __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen,
+ __iend, __buf, __buf + __blen, __bend);
+
+ if (__r == codecvt_base::ok || __r == codecvt_base::partial)
+ __blen = __bend - __buf;
+ else if (__r == codecvt_base::noconv)
+ {
+ // Same as the always_noconv case above.
+ __buf = reinterpret_cast<char*>(__ibuf);
+ __blen = __ilen;
+ }
+ else
+ __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+ "conversion error"));
+
+ __elen = _M_file.xsputn(__buf, __blen);
+ __plen = __blen;
+
+ // Try once more for partial conversions.
+ if (__r == codecvt_base::partial && __elen == __plen)
+ {
+ const char_type* __iresume = __iend;
+ streamsize __rlen = this->pptr() - __iend;
+ __r = _M_codecvt->out(_M_state_cur, __iresume,
+ __iresume + __rlen, __iend, __buf,
+ __buf + __blen, __bend);
+ if (__r != codecvt_base::error)
+ {
+ __rlen = __bend - __buf;
+ __elen = _M_file.xsputn(__buf, __rlen);
+ __plen = __rlen;
+ }
+ else
+ __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
+ "conversion error"));
+ }
+ }
+ return __elen == __plen;
+ }
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_filebuf<_CharT, _Traits>::
+ xsgetn(_CharT* __s, streamsize __n)
+ {
+ // Clear out pback buffer before going on to the real deal...
+ streamsize __ret = 0;
+ if (_M_pback_init)
+ {
+ if (__n > 0 && this->gptr() == this->eback())
+ {
+ *__s++ = *this->gptr();
+ this->gbump(1);
+ __ret = 1;
+ --__n;
+ }
+ _M_destroy_pback();
+ }
+
+ // Optimization in the always_noconv() case, to be generalized in the
+ // future: when __n > __buflen we read directly instead of using the
+ // buffer repeatedly.
+ const bool __testin = _M_mode & ios_base::in;
+ const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
+
+ if (__n > __buflen && __check_facet(_M_codecvt).always_noconv()
+ && __testin && !_M_writing)
+ {
+ // First, copy the chars already present in the buffer.
+ const streamsize __avail = this->egptr() - this->gptr();
+ if (__avail != 0)
+ {
+ if (__avail == 1)
+ *__s = *this->gptr();
+ else
+ traits_type::copy(__s, this->gptr(), __avail);
+ __s += __avail;
+ this->gbump(__avail);
+ __ret += __avail;
+ __n -= __avail;
+ }
+
+ // Need to loop in case of short reads (relatively common
+ // with pipes).
+ streamsize __len;
+ for (;;)
+ {
+ __len = _M_file.xsgetn(reinterpret_cast<char*>(__s),
+ __n);
+ if (__len == -1)
+ __throw_ios_failure(__N("basic_filebuf::xsgetn "
+ "error reading the file"));
+ if (__len == 0)
+ break;
+
+ __n -= __len;
+ __ret += __len;
+ if (__n == 0)
+ break;
+
+ __s += __len;
+ }
+
+ if (__n == 0)
+ {
+ _M_set_buffer(0);
+ _M_reading = true;
+ }
+ else if (__len == 0)
+ {
+ // If end of file is reached, set 'uncommitted'
+ // mode, thus allowing an immediate write without
+ // an intervening seek.
+ _M_set_buffer(-1);
+ _M_reading = false;
+ }
+ }
+ else
+ __ret += __streambuf_type::xsgetn(__s, __n);
+
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_filebuf<_CharT, _Traits>::
+ xsputn(const _CharT* __s, streamsize __n)
+ {
+ // Optimization in the always_noconv() case, to be generalized in the
+ // future: when __n is sufficiently large we write directly instead of
+ // using the buffer.
+ streamsize __ret = 0;
+ const bool __testout = _M_mode & ios_base::out;
+ if (__check_facet(_M_codecvt).always_noconv()
+ && __testout && !_M_reading)
+ {
+ // Measurement would reveal the best choice.
+ const streamsize __chunk = 1ul << 10;
+ streamsize __bufavail = this->epptr() - this->pptr();
+
+ // Don't mistake 'uncommitted' mode buffered with unbuffered.
+ if (!_M_writing && _M_buf_size > 1)
+ __bufavail = _M_buf_size - 1;
+
+ const streamsize __limit = std::min(__chunk, __bufavail);
+ if (__n >= __limit)
+ {
+ const streamsize __buffill = this->pptr() - this->pbase();
+ const char* __buf = reinterpret_cast<const char*>(this->pbase());
+ __ret = _M_file.xsputn_2(__buf, __buffill,
+ reinterpret_cast<const char*>(__s),
+ __n);
+ if (__ret == __buffill + __n)
+ {
+ _M_set_buffer(0);
+ _M_writing = true;
+ }
+ if (__ret > __buffill)
+ __ret -= __buffill;
+ else
+ __ret = 0;
+ }
+ else
+ __ret = __streambuf_type::xsputn(__s, __n);
+ }
+ else
+ __ret = __streambuf_type::xsputn(__s, __n);
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::__streambuf_type*
+ basic_filebuf<_CharT, _Traits>::
+ setbuf(char_type* __s, streamsize __n)
+ {
+ if (!this->is_open())
+ {
+ if (__s == 0 && __n == 0)
+ _M_buf_size = 1;
+ else if (__s && __n > 0)
+ {
+ // This is implementation-defined behavior, and assumes that
+ // an external char_type array of length __n exists and has
+ // been pre-allocated. If this is not the case, things will
+ // quickly blow up. When __n > 1, __n - 1 positions will be
+ // used for the get area, __n - 1 for the put area and 1
+ // position to host the overflow char of a full put area.
+ // When __n == 1, 1 position will be used for the get area
+ // and 0 for the put area, as in the unbuffered case above.
+ _M_buf = __s;
+ _M_buf_size = __n;
+ }
+ }
+ return this;
+ }
+
+
+ // According to 27.8.1.4 p11 - 13, seekoff should ignore the last
+ // argument (of type openmode).
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::pos_type
+ basic_filebuf<_CharT, _Traits>::
+ seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode)
+ {
+ int __width = 0;
+ if (_M_codecvt)
+ __width = _M_codecvt->encoding();
+ if (__width < 0)
+ __width = 0;
+
+ pos_type __ret = pos_type(off_type(-1));
+ const bool __testfail = __off != 0 && __width <= 0;
+ if (this->is_open() && !__testfail)
+ {
+ // Ditch any pback buffers to avoid confusion.
+ _M_destroy_pback();
+
+ // Correct state at destination. Note that this is the correct
+ // state for the current position during output, because
+ // codecvt::unshift() returns the state to the initial state.
+ // This is also the correct state at the end of the file because
+ // an unshift sequence should have been written at the end.
+ __state_type __state = _M_state_beg;
+ off_type __computed_off = __off * __width;
+ if (_M_reading && __way == ios_base::cur)
+ {
+ if (_M_codecvt->always_noconv())
+ __computed_off += this->gptr() - this->egptr();
+ else
+ {
+ // Calculate offset from _M_ext_buf that corresponds
+ // to gptr(). Note: uses _M_state_last, which
+ // corresponds to eback().
+ const int __gptr_off =
+ _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+ this->gptr() - this->eback());
+ __computed_off += _M_ext_buf + __gptr_off - _M_ext_end;
+
+ // _M_state_last is modified by codecvt::length() so
+ // it now corresponds to gptr().
+ __state = _M_state_last;
+ }
+ }
+ __ret = _M_seek(__computed_off, __way, __state);
+ }
+ return __ret;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 171. Strange seekpos() semantics due to joint position
+ // According to the resolution of DR 171, seekpos should ignore the last
+ // argument (of type openmode).
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::pos_type
+ basic_filebuf<_CharT, _Traits>::
+ seekpos(pos_type __pos, ios_base::openmode)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ if (this->is_open())
+ {
+ // Ditch any pback buffers to avoid confusion.
+ _M_destroy_pback();
+ __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state());
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_filebuf<_CharT, _Traits>::pos_type
+ basic_filebuf<_CharT, _Traits>::
+ _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ if (_M_terminate_output())
+ {
+ // Returns pos_type(off_type(-1)) in case of failure.
+ __ret = pos_type(_M_file.seekoff(__off, __way));
+ if (__ret != pos_type(off_type(-1)))
+ {
+ _M_reading = false;
+ _M_writing = false;
+ _M_ext_next = _M_ext_end = _M_ext_buf;
+ _M_set_buffer(-1);
+ _M_state_cur = __state;
+ __ret.state(_M_state_cur);
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ bool
+ basic_filebuf<_CharT, _Traits>::
+ _M_terminate_output()
+ {
+ // Part one: update the output sequence.
+ bool __testvalid = true;
+ if (this->pbase() < this->pptr())
+ {
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __testvalid = false;
+ }
+
+ // Part two: output unshift sequence.
+ if (_M_writing && !__check_facet(_M_codecvt).always_noconv()
+ && __testvalid)
+ {
+ // Note: this value is arbitrary, since there is no way to
+ // get the length of the unshift sequence from codecvt,
+ // without calling unshift.
+ const size_t __blen = 128;
+ char __buf[__blen];
+ codecvt_base::result __r;
+ streamsize __ilen = 0;
+
+ do
+ {
+ char* __next;
+ __r = _M_codecvt->unshift(_M_state_cur, __buf,
+ __buf + __blen, __next);
+ if (__r == codecvt_base::error)
+ __testvalid = false;
+ else if (__r == codecvt_base::ok ||
+ __r == codecvt_base::partial)
+ {
+ __ilen = __next - __buf;
+ if (__ilen > 0)
+ {
+ const streamsize __elen = _M_file.xsputn(__buf, __ilen);
+ if (__elen != __ilen)
+ __testvalid = false;
+ }
+ }
+ }
+ while (__r == codecvt_base::partial && __ilen > 0 && __testvalid);
+
+ if (__testvalid)
+ {
+ // This second call to overflow() is required by the standard,
+ // but it's not clear why it's needed, since the output buffer
+ // should be empty by this point (it should have been emptied
+ // in the first call to overflow()).
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __testvalid = false;
+ }
+ }
+ return __testvalid;
+ }
+
+ template<typename _CharT, typename _Traits>
+ int
+ basic_filebuf<_CharT, _Traits>::
+ sync()
+ {
+ // Make sure that the internal buffer resyncs its idea of
+ // the file position with the external file.
+ int __ret = 0;
+ if (this->pbase() < this->pptr())
+ {
+ const int_type __tmp = this->overflow();
+ if (traits_type::eq_int_type(__tmp, traits_type::eof()))
+ __ret = -1;
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ void
+ basic_filebuf<_CharT, _Traits>::
+ imbue(const locale& __loc)
+ {
+ bool __testvalid = true;
+
+ const __codecvt_type* _M_codecvt_tmp = 0;
+ if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))
+ _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);
+
+ if (this->is_open())
+ {
+ // encoding() == -1 is ok only at the beginning.
+ if ((_M_reading || _M_writing)
+ && __check_facet(_M_codecvt).encoding() == -1)
+ __testvalid = false;
+ else
+ {
+ if (_M_reading)
+ {
+ if (__check_facet(_M_codecvt).always_noconv())
+ {
+ if (_M_codecvt_tmp
+ && !__check_facet(_M_codecvt_tmp).always_noconv())
+ __testvalid = this->seekoff(0, ios_base::cur, _M_mode)
+ != pos_type(off_type(-1));
+ }
+ else
+ {
+ // External position corresponding to gptr().
+ _M_ext_next = _M_ext_buf
+ + _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next,
+ this->gptr() - this->eback());
+ const streamsize __remainder = _M_ext_end - _M_ext_next;
+ if (__remainder)
+ __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
+
+ _M_ext_next = _M_ext_buf;
+ _M_ext_end = _M_ext_buf + __remainder;
+ _M_set_buffer(-1);
+ _M_state_last = _M_state_cur = _M_state_beg;
+ }
+ }
+ else if (_M_writing && (__testvalid = _M_terminate_output()))
+ _M_set_buffer(-1);
+ }
+ }
+
+ if (__testvalid)
+ _M_codecvt = _M_codecvt_tmp;
+ else
+ _M_codecvt = 0;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_filebuf<char>;
+ extern template class basic_ifstream<char>;
+ extern template class basic_ofstream<char>;
+ extern template class basic_fstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_filebuf<wchar_t>;
+ extern template class basic_ifstream<wchar_t>;
+ extern template class basic_ofstream<wchar_t>;
+ extern template class basic_fstream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/functexcept.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/functexcept.h
new file mode 100644
index 0000000..9315d34
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/functexcept.h
@@ -0,0 +1,93 @@
+// Function-Based Exception Support -*- C++ -*-
+
+// Copyright (C) 2001, 2004, 2005, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file functexcept.h
+ * This header provides support for -fno-exceptions.
+ */
+
+//
+// ISO C++ 14882: 19.1 Exception classes
+//
+
+#ifndef _FUNCTEXCEPT_H
+#define _FUNCTEXCEPT_H 1
+
+#include <bits/c++config.h>
+#include <exception_defines.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Helper for exception objects in <except>
+ void
+ __throw_bad_exception(void) __attribute__((__noreturn__));
+
+ // Helper for exception objects in <new>
+ void
+ __throw_bad_alloc(void) __attribute__((__noreturn__));
+
+ // Helper for exception objects in <typeinfo>
+ void
+ __throw_bad_cast(void) __attribute__((__noreturn__));
+
+ void
+ __throw_bad_typeid(void) __attribute__((__noreturn__));
+
+ // Helpers for exception objects in <stdexcept>
+ void
+ __throw_logic_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_domain_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_invalid_argument(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_length_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_out_of_range(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_runtime_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_range_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_overflow_error(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_underflow_error(const char*) __attribute__((__noreturn__));
+
+ // Helpers for exception objects in <ios>
+ void
+ __throw_ios_failure(const char*) __attribute__((__noreturn__));
+
+ void
+ __throw_system_error(int) __attribute__((__noreturn__));
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/functional_hash.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/functional_hash.h
new file mode 100644
index 0000000..892fcfa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/functional_hash.h
@@ -0,0 +1,68 @@
+// functional_hash.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/functional_hash.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _FUNCTIONAL_HASH_H
+#define _FUNCTIONAL_HASH_H 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/functional_hash.h>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/functional_hash.h>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+
+namespace std
+{
+ struct error_code;
+
+ template<>
+ size_t
+ hash<error_code>::operator()(error_code) const;
+}
+
+#endif // _FUNCTIONAL_HASH_H
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice.h
new file mode 100644
index 0000000..29ba46a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice.h
@@ -0,0 +1,182 @@
+// The template and inlines for the -*- C++ -*- gslice class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file gslice.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _GSLICE_H
+#define _GSLICE_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ /**
+ * @brief Class defining multi-dimensional subset of an array.
+ *
+ * The slice class represents a multi-dimensional subset of an array,
+ * specified by three parameter sets: start offset, size array, and stride
+ * array. The start offset is the index of the first element of the array
+ * that is part of the subset. The size and stride array describe each
+ * dimension of the slice. Size is the number of elements in that
+ * dimension, and stride is the distance in the array between successive
+ * elements in that dimension. Each dimension's size and stride is taken
+ * to begin at an array element described by the previous dimension. The
+ * size array and stride array must be the same size.
+ *
+ * For example, if you have offset==3, stride[0]==11, size[1]==3,
+ * stride[1]==3, then slice[0,0]==array[3], slice[0,1]==array[6],
+ * slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17],
+ * slice[1,2]==array[20].
+ */
+ class gslice
+ {
+ public:
+ /// Construct an empty slice.
+ gslice();
+
+ /**
+ * @brief Construct a slice.
+ *
+ * Constructs a slice with as many dimensions as the length of the @a l
+ * and @a s arrays.
+ *
+ * @param o Offset in array of first element.
+ * @param l Array of dimension lengths.
+ * @param s Array of dimension strides between array elements.
+ */
+ gslice(size_t, const valarray<size_t>&, const valarray<size_t>&);
+
+ // XXX: the IS says the copy-ctor and copy-assignment operators are
+ // synthesized by the compiler but they are just unsuitable
+ // for a ref-counted semantic
+ /// Copy constructor.
+ gslice(const gslice&);
+
+ /// Destructor.
+ ~gslice();
+
+ // XXX: See the note above.
+ /// Assignment operator.
+ gslice& operator=(const gslice&);
+
+ /// Return array offset of first slice element.
+ size_t start() const;
+
+ /// Return array of sizes of slice dimensions.
+ valarray<size_t> size() const;
+
+ /// Return array of array strides for each dimension.
+ valarray<size_t> stride() const;
+
+ private:
+ struct _Indexer
+ {
+ size_t _M_count;
+ size_t _M_start;
+ valarray<size_t> _M_size;
+ valarray<size_t> _M_stride;
+ valarray<size_t> _M_index; // Linear array of referenced indices
+
+ _Indexer()
+ : _M_count(1), _M_start(0), _M_size(), _M_stride(), _M_index() {}
+
+ _Indexer(size_t, const valarray<size_t>&,
+ const valarray<size_t>&);
+
+ void
+ _M_increment_use()
+ { ++_M_count; }
+
+ size_t
+ _M_decrement_use()
+ { return --_M_count; }
+ };
+
+ _Indexer* _M_index;
+
+ template<typename _Tp> friend class valarray;
+ };
+
+ inline size_t
+ gslice::start() const
+ { return _M_index ? _M_index->_M_start : 0; }
+
+ inline valarray<size_t>
+ gslice::size() const
+ { return _M_index ? _M_index->_M_size : valarray<size_t>(); }
+
+ inline valarray<size_t>
+ gslice::stride() const
+ { return _M_index ? _M_index->_M_stride : valarray<size_t>(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 543. valarray slice default constructor
+ inline
+ gslice::gslice()
+ : _M_index(new gslice::_Indexer()) {}
+
+ inline
+ gslice::gslice(size_t __o, const valarray<size_t>& __l,
+ const valarray<size_t>& __s)
+ : _M_index(new gslice::_Indexer(__o, __l, __s)) {}
+
+ inline
+ gslice::gslice(const gslice& __g)
+ : _M_index(__g._M_index)
+ { if (_M_index) _M_index->_M_increment_use(); }
+
+ inline
+ gslice::~gslice()
+ {
+ if (_M_index && _M_index->_M_decrement_use() == 0)
+ delete _M_index;
+ }
+
+ inline gslice&
+ gslice::operator=(const gslice& __g)
+ {
+ if (__g._M_index)
+ __g._M_index->_M_increment_use();
+ if (_M_index && _M_index->_M_decrement_use() == 0)
+ delete _M_index;
+ _M_index = __g._M_index;
+ return *this;
+ }
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GSLICE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice_array.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice_array.h
new file mode 100644
index 0000000..745a5a8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/gslice_array.h
@@ -0,0 +1,216 @@
+// The template and inlines for the -*- C++ -*- gslice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2005, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file gslice_array.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _GSLICE_ARRAY_H
+#define _GSLICE_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ /**
+ * @brief Reference to multi-dimensional subset of an array.
+ *
+ * A gslice_array is a reference to the actual elements of an array
+ * specified by a gslice. The way to get a gslice_array is to call
+ * operator[](gslice) on a valarray. The returned gslice_array then
+ * permits carrying operations out on the referenced subset of elements in
+ * the original valarray. For example, operator+=(valarray) will add
+ * values to the subset of elements in the underlying valarray this
+ * gslice_array refers to.
+ *
+ * @param Tp Element type.
+ */
+ template<typename _Tp>
+ class gslice_array
+ {
+ public:
+ typedef _Tp value_type;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ gslice_array(const gslice_array&);
+
+ /// Assignment operator. Assigns slice elements to corresponding
+ /// elements of @a a.
+ gslice_array& operator=(const gslice_array&);
+
+ /// Assign slice elements to corresponding elements of @a v.
+ void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
+ void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
+ void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
+ void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
+ void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
+ void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
+ void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
+ void operator=(const _Tp&) const;
+
+ template<class _Dom>
+ void operator=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator*=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator/=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator%=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator+=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator-=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator^=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator&=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator|=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator<<=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+ private:
+ _Array<_Tp> _M_array;
+ const valarray<size_t>& _M_index;
+
+ friend class valarray<_Tp>;
+
+ gslice_array(_Array<_Tp>, const valarray<size_t>&);
+
+ // not implemented
+ gslice_array();
+ };
+
+ template<typename _Tp>
+ inline
+ gslice_array<_Tp>::gslice_array(_Array<_Tp> __a,
+ const valarray<size_t>& __i)
+ : _M_array(__a), _M_index(__i) {}
+
+ template<typename _Tp>
+ inline
+ gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a)
+ : _M_array(__a._M_array), _M_index(__a._M_index) {}
+
+ template<typename _Tp>
+ inline gslice_array<_Tp>&
+ gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a)
+ {
+ std::__valarray_copy(_Array<_Tp>(__a._M_array),
+ _Array<size_t>(__a._M_index), _M_index.size(),
+ _M_array, _Array<size_t>(_M_index));
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline void
+ gslice_array<_Tp>::operator=(const _Tp& __t) const
+ {
+ std::__valarray_fill(_M_array, _Array<size_t>(_M_index),
+ _M_index.size(), __t);
+ }
+
+ template<typename _Tp>
+ inline void
+ gslice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+ {
+ std::__valarray_copy(_Array<_Tp>(__v), __v.size(),
+ _M_array, _Array<size_t>(_M_index));
+ }
+
+ template<typename _Tp>
+ template<class _Dom>
+ inline void
+ gslice_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
+ {
+ std::__valarray_copy (__e, _M_index.size(), _M_array,
+ _Array<size_t>(_M_index));
+ }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
+ template<typename _Tp> \
+ inline void \
+ gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
+ { \
+ _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), \
+ _Array<_Tp>(__v), __v.size()); \
+ } \
+ \
+ template<typename _Tp> \
+ template<class _Dom> \
+ inline void \
+ gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
+ { \
+ _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
+ _M_index.size()); \
+ }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GSLICE_ARRAY_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/hashtable.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/hashtable.h
new file mode 100644
index 0000000..cdfa8af
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/hashtable.h
@@ -0,0 +1,58 @@
+// hashtable.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file bits/hashtable.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _HASHTABLE_H
+#define _HASHTABLE_H 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/hashtable>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/hashtable>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // _HASHTABLE_H
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/indirect_array.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/indirect_array.h
new file mode 100644
index 0000000..4920394
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/indirect_array.h
@@ -0,0 +1,210 @@
+// The template and inlines for the -*- C++ -*- indirect_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file indirect_array.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _INDIRECT_ARRAY_H
+#define _INDIRECT_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ /**
+ * @brief Reference to arbitrary subset of an array.
+ *
+ * An indirect_array is a reference to the actual elements of an array
+ * specified by an ordered array of indices. The way to get an
+ * indirect_array is to call operator[](valarray<size_t>) on a valarray.
+ * The returned indirect_array then permits carrying operations out on the
+ * referenced subset of elements in the original valarray.
+ *
+ * For example, if an indirect_array is obtained using the array (4,2,0) as
+ * an argument, and then assigned to an array containing (1,2,3), then the
+ * underlying array will have array[0]==3, array[2]==2, and array[4]==1.
+ *
+ * @param Tp Element type.
+ */
+ template <class _Tp>
+ class indirect_array
+ {
+ public:
+ typedef _Tp value_type;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ indirect_array(const indirect_array&);
+
+ /// Assignment operator. Assigns elements to corresponding elements
+ /// of @a a.
+ indirect_array& operator=(const indirect_array&);
+
+ /// Assign slice elements to corresponding elements of @a v.
+ void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
+ void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
+ void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
+ void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
+ void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
+ void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
+ void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
+ void operator= (const _Tp&) const;
+ // ~indirect_array();
+
+ template<class _Dom>
+ void operator=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator*=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator/=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator%=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator+=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator-=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator^=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator&=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator|=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator<<=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+ private:
+ /// Copy constructor. Both slices refer to the same underlying array.
+ indirect_array(_Array<_Tp>, size_t, _Array<size_t>);
+
+ friend class valarray<_Tp>;
+ friend class gslice_array<_Tp>;
+
+ const size_t _M_sz;
+ const _Array<size_t> _M_index;
+ const _Array<_Tp> _M_array;
+
+ // not implemented
+ indirect_array();
+ };
+
+ template<typename _Tp>
+ inline
+ indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
+ : _M_sz(__a._M_sz), _M_index(__a._M_index), _M_array(__a._M_array) {}
+
+ template<typename _Tp>
+ inline
+ indirect_array<_Tp>::indirect_array(_Array<_Tp> __a, size_t __s,
+ _Array<size_t> __i)
+ : _M_sz(__s), _M_index(__i), _M_array(__a) {}
+
+ template<typename _Tp>
+ inline indirect_array<_Tp>&
+ indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a)
+ {
+ std::__valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array,
+ _M_index);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline void
+ indirect_array<_Tp>::operator=(const _Tp& __t) const
+ { std::__valarray_fill(_M_array, _M_index, _M_sz, __t); }
+
+ template<typename _Tp>
+ inline void
+ indirect_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+ { std::__valarray_copy(_Array<_Tp>(__v), _M_sz, _M_array, _M_index); }
+
+ template<typename _Tp>
+ template<class _Dom>
+ inline void
+ indirect_array<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e) const
+ { std::__valarray_copy(__e, _M_sz, _M_array, _M_index); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
+ template<typename _Tp> \
+ inline void \
+ indirect_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const\
+ { \
+ _Array_augmented_##_Name(_M_array, _M_index, _Array<_Tp>(__v), _M_sz); \
+ } \
+ \
+ template<typename _Tp> \
+ template<class _Dom> \
+ inline void \
+ indirect_array<_Tp>::operator _Op##=(const _Expr<_Dom,_Tp>& __e) const\
+ { \
+ _Array_augmented_##_Name(_M_array, _M_index, __e, _M_sz); \
+ }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _INDIRECT_ARRAY_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/ios_base.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ios_base.h
new file mode 100644
index 0000000..8dde100
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ios_base.h
@@ -0,0 +1,982 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ios_base.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.4 Iostreams base classes
+//
+
+#ifndef _IOS_BASE_H
+#define _IOS_BASE_H 1
+
+#pragma GCC system_header
+
+#include <ext/atomicity.h>
+#include <bits/localefwd.h>
+#include <bits/locale_classes.h>
+
+#ifndef _GLIBCXX_STDIO_MACROS
+# include <cstdio> // For SEEK_CUR, SEEK_END
+# define _IOS_BASE_SEEK_CUR SEEK_CUR
+# define _IOS_BASE_SEEK_END SEEK_END
+#else
+# define _IOS_BASE_SEEK_CUR 1
+# define _IOS_BASE_SEEK_END 2
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // The following definitions of bitmask types are enums, not ints,
+ // as permitted (but not required) in the standard, in order to provide
+ // better type safety in iostream calls. A side effect is that
+ // expressions involving them are no longer compile-time constants.
+ enum _Ios_Fmtflags
+ {
+ _S_boolalpha = 1L << 0,
+ _S_dec = 1L << 1,
+ _S_fixed = 1L << 2,
+ _S_hex = 1L << 3,
+ _S_internal = 1L << 4,
+ _S_left = 1L << 5,
+ _S_oct = 1L << 6,
+ _S_right = 1L << 7,
+ _S_scientific = 1L << 8,
+ _S_showbase = 1L << 9,
+ _S_showpoint = 1L << 10,
+ _S_showpos = 1L << 11,
+ _S_skipws = 1L << 12,
+ _S_unitbuf = 1L << 13,
+ _S_uppercase = 1L << 14,
+ _S_adjustfield = _S_left | _S_right | _S_internal,
+ _S_basefield = _S_dec | _S_oct | _S_hex,
+ _S_floatfield = _S_scientific | _S_fixed,
+ _S_ios_fmtflags_end = 1L << 16
+ };
+
+ inline _Ios_Fmtflags
+ operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+ inline _Ios_Fmtflags
+ operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+ inline _Ios_Fmtflags
+ operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+ { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+ inline _Ios_Fmtflags&
+ operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+ { return __a = __a | __b; }
+
+ inline _Ios_Fmtflags&
+ operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+ { return __a = __a & __b; }
+
+ inline _Ios_Fmtflags&
+ operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+ { return __a = __a ^ __b; }
+
+ inline _Ios_Fmtflags
+ operator~(_Ios_Fmtflags __a)
+ { return _Ios_Fmtflags(~static_cast<int>(__a)); }
+
+
+ enum _Ios_Openmode
+ {
+ _S_app = 1L << 0,
+ _S_ate = 1L << 1,
+ _S_bin = 1L << 2,
+ _S_in = 1L << 3,
+ _S_out = 1L << 4,
+ _S_trunc = 1L << 5,
+ _S_ios_openmode_end = 1L << 16
+ };
+
+ inline _Ios_Openmode
+ operator&(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+ inline _Ios_Openmode
+ operator|(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+ inline _Ios_Openmode
+ operator^(_Ios_Openmode __a, _Ios_Openmode __b)
+ { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+ inline _Ios_Openmode&
+ operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
+ { return __a = __a | __b; }
+
+ inline _Ios_Openmode&
+ operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
+ { return __a = __a & __b; }
+
+ inline _Ios_Openmode&
+ operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
+ { return __a = __a ^ __b; }
+
+ inline _Ios_Openmode
+ operator~(_Ios_Openmode __a)
+ { return _Ios_Openmode(~static_cast<int>(__a)); }
+
+
+ enum _Ios_Iostate
+ {
+ _S_goodbit = 0,
+ _S_badbit = 1L << 0,
+ _S_eofbit = 1L << 1,
+ _S_failbit = 1L << 2,
+ _S_ios_iostate_end = 1L << 16
+ };
+
+ inline _Ios_Iostate
+ operator&(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); }
+
+ inline _Ios_Iostate
+ operator|(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); }
+
+ inline _Ios_Iostate
+ operator^(_Ios_Iostate __a, _Ios_Iostate __b)
+ { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); }
+
+ inline _Ios_Iostate&
+ operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
+ { return __a = __a | __b; }
+
+ inline _Ios_Iostate&
+ operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
+ { return __a = __a & __b; }
+
+ inline _Ios_Iostate&
+ operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
+ { return __a = __a ^ __b; }
+
+ inline _Ios_Iostate
+ operator~(_Ios_Iostate __a)
+ { return _Ios_Iostate(~static_cast<int>(__a)); }
+
+ enum _Ios_Seekdir
+ {
+ _S_beg = 0,
+ _S_cur = _IOS_BASE_SEEK_CUR,
+ _S_end = _IOS_BASE_SEEK_END,
+ _S_ios_seekdir_end = 1L << 16
+ };
+
+ // 27.4.2 Class ios_base
+ /**
+ * @brief The base of the I/O class hierarchy.
+ * @ingroup io
+ *
+ * This class defines everything that can be defined about I/O that does
+ * not depend on the type of characters being input or output. Most
+ * people will only see @c ios_base when they need to specify the full
+ * name of the various I/O flags (e.g., the openmodes).
+ */
+ class ios_base
+ {
+ public:
+
+ /**
+ * @brief These are thrown to indicate problems with io.
+ * @ingroup exceptions
+ *
+ * 27.4.2.1.1 Class ios_base::failure
+ */
+ class failure : public exception
+ {
+ public:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 48. Use of non-existent exception constructor
+ explicit
+ failure(const string& __str) throw();
+
+ // This declaration is not useless:
+ // http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Vague-Linkage.html
+ virtual
+ ~failure() throw();
+
+ virtual const char*
+ what() const throw();
+
+ private:
+ string _M_msg;
+ };
+
+ // 27.4.2.1.2 Type ios_base::fmtflags
+ /**
+ * @brief This is a bitmask type.
+ *
+ * @c "_Ios_Fmtflags" is implementation-defined, but it is valid to
+ * perform bitwise operations on these values and expect the Right
+ * Thing to happen. Defined objects of type fmtflags are:
+ * - boolalpha
+ * - dec
+ * - fixed
+ * - hex
+ * - internal
+ * - left
+ * - oct
+ * - right
+ * - scientific
+ * - showbase
+ * - showpoint
+ * - showpos
+ * - skipws
+ * - unitbuf
+ * - uppercase
+ * - adjustfield
+ * - basefield
+ * - floatfield
+ */
+ typedef _Ios_Fmtflags fmtflags;
+
+ /// Insert/extract @c bool in alphabetic rather than numeric format.
+ static const fmtflags boolalpha = _S_boolalpha;
+
+ /// Converts integer input or generates integer output in decimal base.
+ static const fmtflags dec = _S_dec;
+
+ /// Generate floating-point output in fixed-point notation.
+ static const fmtflags fixed = _S_fixed;
+
+ /// Converts integer input or generates integer output in hexadecimal base.
+ static const fmtflags hex = _S_hex;
+
+ /// Adds fill characters at a designated internal point in certain
+ /// generated output, or identical to @c right if no such point is
+ /// designated.
+ static const fmtflags internal = _S_internal;
+
+ /// Adds fill characters on the right (final positions) of certain
+ /// generated output. (I.e., the thing you print is flush left.)
+ static const fmtflags left = _S_left;
+
+ /// Converts integer input or generates integer output in octal base.
+ static const fmtflags oct = _S_oct;
+
+ /// Adds fill characters on the left (initial positions) of certain
+ /// generated output. (I.e., the thing you print is flush right.)
+ static const fmtflags right = _S_right;
+
+ /// Generates floating-point output in scientific notation.
+ static const fmtflags scientific = _S_scientific;
+
+ /// Generates a prefix indicating the numeric base of generated integer
+ /// output.
+ static const fmtflags showbase = _S_showbase;
+
+ /// Generates a decimal-point character unconditionally in generated
+ /// floating-point output.
+ static const fmtflags showpoint = _S_showpoint;
+
+ /// Generates a + sign in non-negative generated numeric output.
+ static const fmtflags showpos = _S_showpos;
+
+ /// Skips leading white space before certain input operations.
+ static const fmtflags skipws = _S_skipws;
+
+ /// Flushes output after each output operation.
+ static const fmtflags unitbuf = _S_unitbuf;
+
+ /// Replaces certain lowercase letters with their uppercase equivalents
+ /// in generated output.
+ static const fmtflags uppercase = _S_uppercase;
+
+ /// A mask of left|right|internal. Useful for the 2-arg form of @c setf.
+ static const fmtflags adjustfield = _S_adjustfield;
+
+ /// A mask of dec|oct|hex. Useful for the 2-arg form of @c setf.
+ static const fmtflags basefield = _S_basefield;
+
+ /// A mask of scientific|fixed. Useful for the 2-arg form of @c setf.
+ static const fmtflags floatfield = _S_floatfield;
+
+ // 27.4.2.1.3 Type ios_base::iostate
+ /**
+ * @brief This is a bitmask type.
+ *
+ * @c "_Ios_Iostate" is implementation-defined, but it is valid to
+ * perform bitwise operations on these values and expect the Right
+ * Thing to happen. Defined objects of type iostate are:
+ * - badbit
+ * - eofbit
+ * - failbit
+ * - goodbit
+ */
+ typedef _Ios_Iostate iostate;
+
+ /// Indicates a loss of integrity in an input or output sequence (such
+ /// as an irrecoverable read error from a file).
+ static const iostate badbit = _S_badbit;
+
+ /// Indicates that an input operation reached the end of an input sequence.
+ static const iostate eofbit = _S_eofbit;
+
+ /// Indicates that an input operation failed to read the expected
+ /// characters, or that an output operation failed to generate the
+ /// desired characters.
+ static const iostate failbit = _S_failbit;
+
+ /// Indicates all is well.
+ static const iostate goodbit = _S_goodbit;
+
+ // 27.4.2.1.4 Type ios_base::openmode
+ /**
+ * @brief This is a bitmask type.
+ *
+ * @c "_Ios_Openmode" is implementation-defined, but it is valid to
+ * perform bitwise operations on these values and expect the Right
+ * Thing to happen. Defined objects of type openmode are:
+ * - app
+ * - ate
+ * - binary
+ * - in
+ * - out
+ * - trunc
+ */
+ typedef _Ios_Openmode openmode;
+
+ /// Seek to end before each write.
+ static const openmode app = _S_app;
+
+ /// Open and seek to end immediately after opening.
+ static const openmode ate = _S_ate;
+
+ /// Perform input and output in binary mode (as opposed to text mode).
+ /// This is probably not what you think it is; see
+ /// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch27s02.html
+ static const openmode binary = _S_bin;
+
+ /// Open for input. Default for @c ifstream and fstream.
+ static const openmode in = _S_in;
+
+ /// Open for output. Default for @c ofstream and fstream.
+ static const openmode out = _S_out;
+
+ /// Open for input. Default for @c ofstream.
+ static const openmode trunc = _S_trunc;
+
+ // 27.4.2.1.5 Type ios_base::seekdir
+ /**
+ * @brief This is an enumerated type.
+ *
+ * @c "_Ios_Seekdir" is implementation-defined. Defined values
+ * of type seekdir are:
+ * - beg
+ * - cur, equivalent to @c SEEK_CUR in the C standard library.
+ * - end, equivalent to @c SEEK_END in the C standard library.
+ */
+ typedef _Ios_Seekdir seekdir;
+
+ /// Request a seek relative to the beginning of the stream.
+ static const seekdir beg = _S_beg;
+
+ /// Request a seek relative to the current position within the sequence.
+ static const seekdir cur = _S_cur;
+
+ /// Request a seek relative to the current end of the sequence.
+ static const seekdir end = _S_end;
+
+ // Annex D.6
+ typedef int io_state;
+ typedef int open_mode;
+ typedef int seek_dir;
+
+ typedef std::streampos streampos;
+ typedef std::streamoff streamoff;
+
+ // Callbacks;
+ /**
+ * @brief The set of events that may be passed to an event callback.
+ *
+ * erase_event is used during ~ios() and copyfmt(). imbue_event is used
+ * during imbue(). copyfmt_event is used during copyfmt().
+ */
+ enum event
+ {
+ erase_event,
+ imbue_event,
+ copyfmt_event
+ };
+
+ /**
+ * @brief The type of an event callback function.
+ * @param event One of the members of the event enum.
+ * @param ios_base Reference to the ios_base object.
+ * @param int The integer provided when the callback was registered.
+ *
+ * Event callbacks are user defined functions that get called during
+ * several ios_base and basic_ios functions, specifically imbue(),
+ * copyfmt(), and ~ios().
+ */
+ typedef void (*event_callback) (event, ios_base&, int);
+
+ /**
+ * @brief Add the callback __fn with parameter __index.
+ * @param __fn The function to add.
+ * @param __index The integer to pass to the function when invoked.
+ *
+ * Registers a function as an event callback with an integer parameter to
+ * be passed to the function when invoked. Multiple copies of the
+ * function are allowed. If there are multiple callbacks, they are
+ * invoked in the order they were registered.
+ */
+ void
+ register_callback(event_callback __fn, int __index);
+
+ protected:
+ //@{
+ /**
+ * ios_base data members (doc me)
+ */
+ streamsize _M_precision;
+ streamsize _M_width;
+ fmtflags _M_flags;
+ iostate _M_exception;
+ iostate _M_streambuf_state;
+ //@}
+
+ // 27.4.2.6 Members for callbacks
+ // 27.4.2.6 ios_base callbacks
+ struct _Callback_list
+ {
+ // Data Members
+ _Callback_list* _M_next;
+ ios_base::event_callback _M_fn;
+ int _M_index;
+ _Atomic_word _M_refcount; // 0 means one reference.
+
+ _Callback_list(ios_base::event_callback __fn, int __index,
+ _Callback_list* __cb)
+ : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
+
+ void
+ _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+ // 0 => OK to delete.
+ int
+ _M_remove_reference()
+ { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); }
+ };
+
+ _Callback_list* _M_callbacks;
+
+ void
+ _M_call_callbacks(event __ev) throw();
+
+ void
+ _M_dispose_callbacks(void);
+
+ // 27.4.2.5 Members for iword/pword storage
+ struct _Words
+ {
+ void* _M_pword;
+ long _M_iword;
+ _Words() : _M_pword(0), _M_iword(0) { }
+ };
+
+ // Only for failed iword/pword calls.
+ _Words _M_word_zero;
+
+ // Guaranteed storage.
+ // The first 5 iword and pword slots are reserved for internal use.
+ enum { _S_local_word_size = 8 };
+ _Words _M_local_word[_S_local_word_size];
+
+ // Allocated storage.
+ int _M_word_size;
+ _Words* _M_word;
+
+ _Words&
+ _M_grow_words(int __index, bool __iword);
+
+ // Members for locale and locale caching.
+ locale _M_ios_locale;
+
+ void
+ _M_init();
+
+ public:
+
+ // 27.4.2.1.6 Class ios_base::Init
+ // Used to initialize standard streams. In theory, g++ could use
+ // -finit-priority to order this stuff correctly without going
+ // through these machinations.
+ class Init
+ {
+ friend class ios_base;
+ public:
+ Init();
+ ~Init();
+
+ private:
+ static _Atomic_word _S_refcount;
+ static bool _S_synced_with_stdio;
+ };
+
+ // [27.4.2.2] fmtflags state functions
+ /**
+ * @brief Access to format flags.
+ * @return The format control flags for both input and output.
+ */
+ fmtflags
+ flags() const
+ { return _M_flags; }
+
+ /**
+ * @brief Setting new format flags all at once.
+ * @param fmtfl The new flags to set.
+ * @return The previous format control flags.
+ *
+ * This function overwrites all the format flags with @a fmtfl.
+ */
+ fmtflags
+ flags(fmtflags __fmtfl)
+ {
+ fmtflags __old = _M_flags;
+ _M_flags = __fmtfl;
+ return __old;
+ }
+
+ /**
+ * @brief Setting new format flags.
+ * @param fmtfl Additional flags to set.
+ * @return The previous format control flags.
+ *
+ * This function sets additional flags in format control. Flags that
+ * were previously set remain set.
+ */
+ fmtflags
+ setf(fmtflags __fmtfl)
+ {
+ fmtflags __old = _M_flags;
+ _M_flags |= __fmtfl;
+ return __old;
+ }
+
+ /**
+ * @brief Setting new format flags.
+ * @param fmtfl Additional flags to set.
+ * @param mask The flags mask for @a fmtfl.
+ * @return The previous format control flags.
+ *
+ * This function clears @a mask in the format flags, then sets
+ * @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield.
+ */
+ fmtflags
+ setf(fmtflags __fmtfl, fmtflags __mask)
+ {
+ fmtflags __old = _M_flags;
+ _M_flags &= ~__mask;
+ _M_flags |= (__fmtfl & __mask);
+ return __old;
+ }
+
+ /**
+ * @brief Clearing format flags.
+ * @param mask The flags to unset.
+ *
+ * This function clears @a mask in the format flags.
+ */
+ void
+ unsetf(fmtflags __mask)
+ { _M_flags &= ~__mask; }
+
+ /**
+ * @brief Flags access.
+ * @return The precision to generate on certain output operations.
+ *
+ * Be careful if you try to give a definition of "precision" here; see
+ * DR 189.
+ */
+ streamsize
+ precision() const
+ { return _M_precision; }
+
+ /**
+ * @brief Changing flags.
+ * @param prec The new precision value.
+ * @return The previous value of precision().
+ */
+ streamsize
+ precision(streamsize __prec)
+ {
+ streamsize __old = _M_precision;
+ _M_precision = __prec;
+ return __old;
+ }
+
+ /**
+ * @brief Flags access.
+ * @return The minimum field width to generate on output operations.
+ *
+ * "Minimum field width" refers to the number of characters.
+ */
+ streamsize
+ width() const
+ { return _M_width; }
+
+ /**
+ * @brief Changing flags.
+ * @param wide The new width value.
+ * @return The previous value of width().
+ */
+ streamsize
+ width(streamsize __wide)
+ {
+ streamsize __old = _M_width;
+ _M_width = __wide;
+ return __old;
+ }
+
+ // [27.4.2.4] ios_base static members
+ /**
+ * @brief Interaction with the standard C I/O objects.
+ * @param sync Whether to synchronize or not.
+ * @return True if the standard streams were previously synchronized.
+ *
+ * The synchronization referred to is @e only that between the standard
+ * C facilities (e.g., stdout) and the standard C++ objects (e.g.,
+ * cout). User-declared streams are unaffected. See
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch28s02.html
+ */
+ static bool
+ sync_with_stdio(bool __sync = true);
+
+ // [27.4.2.3] ios_base locale functions
+ /**
+ * @brief Setting a new locale.
+ * @param loc The new locale.
+ * @return The previous locale.
+ *
+ * Sets the new locale for this stream, and then invokes each callback
+ * with imbue_event.
+ */
+ locale
+ imbue(const locale& __loc);
+
+ /**
+ * @brief Locale access
+ * @return A copy of the current locale.
+ *
+ * If @c imbue(loc) has previously been called, then this function
+ * returns @c loc. Otherwise, it returns a copy of @c std::locale(),
+ * the global C++ locale.
+ */
+ locale
+ getloc() const
+ { return _M_ios_locale; }
+
+ /**
+ * @brief Locale access
+ * @return A reference to the current locale.
+ *
+ * Like getloc above, but returns a reference instead of
+ * generating a copy.
+ */
+ const locale&
+ _M_getloc() const
+ { return _M_ios_locale; }
+
+ // [27.4.2.5] ios_base storage functions
+ /**
+ * @brief Access to unique indices.
+ * @return An integer different from all previous calls.
+ *
+ * This function returns a unique integer every time it is called. It
+ * can be used for any purpose, but is primarily intended to be a unique
+ * index for the iword and pword functions. The expectation is that an
+ * application calls xalloc in order to obtain an index in the iword and
+ * pword arrays that can be used without fear of conflict.
+ *
+ * The implementation maintains a static variable that is incremented and
+ * returned on each invocation. xalloc is guaranteed to return an index
+ * that is safe to use in the iword and pword arrays.
+ */
+ static int
+ xalloc() throw();
+
+ /**
+ * @brief Access to integer array.
+ * @param __ix Index into the array.
+ * @return A reference to an integer associated with the index.
+ *
+ * The iword function provides access to an array of integers that can be
+ * used for any purpose. The array grows as required to hold the
+ * supplied index. All integers in the array are initialized to 0.
+ *
+ * The implementation reserves several indices. You should use xalloc to
+ * obtain an index that is safe to use. Also note that since the array
+ * can grow dynamically, it is not safe to hold onto the reference.
+ */
+ long&
+ iword(int __ix)
+ {
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, true);
+ return __word._M_iword;
+ }
+
+ /**
+ * @brief Access to void pointer array.
+ * @param __ix Index into the array.
+ * @return A reference to a void* associated with the index.
+ *
+ * The pword function provides access to an array of pointers that can be
+ * used for any purpose. The array grows as required to hold the
+ * supplied index. All pointers in the array are initialized to 0.
+ *
+ * The implementation reserves several indices. You should use xalloc to
+ * obtain an index that is safe to use. Also note that since the array
+ * can grow dynamically, it is not safe to hold onto the reference.
+ */
+ void*&
+ pword(int __ix)
+ {
+ _Words& __word = (__ix < _M_word_size)
+ ? _M_word[__ix] : _M_grow_words(__ix, false);
+ return __word._M_pword;
+ }
+
+ // Destructor
+ /**
+ * Invokes each callback with erase_event. Destroys local storage.
+ *
+ * Note that the ios_base object for the standard streams never gets
+ * destroyed. As a result, any callbacks registered with the standard
+ * streams will not get invoked with erase_event (unless copyfmt is
+ * used).
+ */
+ virtual ~ios_base();
+
+ protected:
+ ios_base();
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 50. Copy constructor and assignment operator of ios_base
+ private:
+ ios_base(const ios_base&);
+
+ ios_base&
+ operator=(const ios_base&);
+ };
+
+ // [27.4.5.1] fmtflags manipulators
+ /// Calls base.setf(ios_base::boolalpha).
+ inline ios_base&
+ boolalpha(ios_base& __base)
+ {
+ __base.setf(ios_base::boolalpha);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::boolalpha).
+ inline ios_base&
+ noboolalpha(ios_base& __base)
+ {
+ __base.unsetf(ios_base::boolalpha);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::showbase).
+ inline ios_base&
+ showbase(ios_base& __base)
+ {
+ __base.setf(ios_base::showbase);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::showbase).
+ inline ios_base&
+ noshowbase(ios_base& __base)
+ {
+ __base.unsetf(ios_base::showbase);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::showpoint).
+ inline ios_base&
+ showpoint(ios_base& __base)
+ {
+ __base.setf(ios_base::showpoint);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::showpoint).
+ inline ios_base&
+ noshowpoint(ios_base& __base)
+ {
+ __base.unsetf(ios_base::showpoint);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::showpos).
+ inline ios_base&
+ showpos(ios_base& __base)
+ {
+ __base.setf(ios_base::showpos);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::showpos).
+ inline ios_base&
+ noshowpos(ios_base& __base)
+ {
+ __base.unsetf(ios_base::showpos);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::skipws).
+ inline ios_base&
+ skipws(ios_base& __base)
+ {
+ __base.setf(ios_base::skipws);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::skipws).
+ inline ios_base&
+ noskipws(ios_base& __base)
+ {
+ __base.unsetf(ios_base::skipws);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::uppercase).
+ inline ios_base&
+ uppercase(ios_base& __base)
+ {
+ __base.setf(ios_base::uppercase);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::uppercase).
+ inline ios_base&
+ nouppercase(ios_base& __base)
+ {
+ __base.unsetf(ios_base::uppercase);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::unitbuf).
+ inline ios_base&
+ unitbuf(ios_base& __base)
+ {
+ __base.setf(ios_base::unitbuf);
+ return __base;
+ }
+
+ /// Calls base.unsetf(ios_base::unitbuf).
+ inline ios_base&
+ nounitbuf(ios_base& __base)
+ {
+ __base.unsetf(ios_base::unitbuf);
+ return __base;
+ }
+
+ // [27.4.5.2] adjustfield manipulators
+ /// Calls base.setf(ios_base::internal, ios_base::adjustfield).
+ inline ios_base&
+ internal(ios_base& __base)
+ {
+ __base.setf(ios_base::internal, ios_base::adjustfield);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::left, ios_base::adjustfield).
+ inline ios_base&
+ left(ios_base& __base)
+ {
+ __base.setf(ios_base::left, ios_base::adjustfield);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::right, ios_base::adjustfield).
+ inline ios_base&
+ right(ios_base& __base)
+ {
+ __base.setf(ios_base::right, ios_base::adjustfield);
+ return __base;
+ }
+
+ // [27.4.5.3] basefield manipulators
+ /// Calls base.setf(ios_base::dec, ios_base::basefield).
+ inline ios_base&
+ dec(ios_base& __base)
+ {
+ __base.setf(ios_base::dec, ios_base::basefield);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::hex, ios_base::basefield).
+ inline ios_base&
+ hex(ios_base& __base)
+ {
+ __base.setf(ios_base::hex, ios_base::basefield);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::oct, ios_base::basefield).
+ inline ios_base&
+ oct(ios_base& __base)
+ {
+ __base.setf(ios_base::oct, ios_base::basefield);
+ return __base;
+ }
+
+ // [27.4.5.4] floatfield manipulators
+ /// Calls base.setf(ios_base::fixed, ios_base::floatfield).
+ inline ios_base&
+ fixed(ios_base& __base)
+ {
+ __base.setf(ios_base::fixed, ios_base::floatfield);
+ return __base;
+ }
+
+ /// Calls base.setf(ios_base::scientific, ios_base::floatfield).
+ inline ios_base&
+ scientific(ios_base& __base)
+ {
+ __base.setf(ios_base::scientific, ios_base::floatfield);
+ return __base;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#undef _IOS_BASE_SEEK_CUR
+#undef _IOS_BASE_SEEK_END
+
+#endif /* _IOS_BASE_H */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/istream.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/istream.tcc
new file mode 100644
index 0000000..5d60791
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/istream.tcc
@@ -0,0 +1,1022 @@
+// istream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file istream.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.6.1 Input streams
+//
+
+#ifndef _ISTREAM_TCC
+#define _ISTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>::sentry::
+ sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ if (__in.good())
+ {
+ if (__in.tie())
+ __in.tie()->flush();
+ if (!__noskip && bool(__in.flags() & ios_base::skipws))
+ {
+ const __int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ __int_type __c = __sb->sgetc();
+
+ const __ctype_type& __ct = __check_facet(__in._M_ctype);
+ while (!traits_type::eq_int_type(__c, __eof)
+ && __ct.is(ctype_base::space,
+ traits_type::to_char_type(__c)))
+ __c = __sb->snextc();
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 195. Should basic_istream::sentry's constructor ever
+ // set eofbit?
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ }
+ }
+
+ if (__in.good() && __err == ios_base::goodbit)
+ _M_ok = true;
+ else
+ {
+ __err |= ios_base::failbit;
+ __in.setstate(__err);
+ }
+ }
+
+ template<typename _CharT, typename _Traits>
+ template<typename _ValueT>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ _M_extract(_ValueT& __v)
+ {
+ sentry __cerb(*this, false);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const __num_get_type& __ng = __check_facet(this->_M_num_get);
+ __ng.get(*this, 0, *this, __err, __v);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ operator>>(short& __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 118. basic_istream uses nonexistent num_get member functions.
+ long __l;
+ _M_extract(__l);
+ if (!this->fail())
+ {
+ if (__gnu_cxx::__numeric_traits<short>::__min <= __l
+ && __l <= __gnu_cxx::__numeric_traits<short>::__max)
+ __n = short(__l);
+ else
+ this->setstate(ios_base::failbit);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ operator>>(int& __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 118. basic_istream uses nonexistent num_get member functions.
+ long __l;
+ _M_extract(__l);
+ if (!this->fail())
+ {
+ if (__gnu_cxx::__numeric_traits<int>::__min <= __l
+ && __l <= __gnu_cxx::__numeric_traits<int>::__max)
+ __n = int(__l);
+ else
+ this->setstate(ios_base::failbit);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ operator>>(__streambuf_type* __sbout)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, false);
+ if (__cerb && __sbout)
+ {
+ __try
+ {
+ bool __ineof;
+ if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof))
+ __err |= ios_base::failbit;
+ if (__ineof)
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::failbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::failbit); }
+ }
+ else if (!__sbout)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_istream<_CharT, _Traits>::int_type
+ basic_istream<_CharT, _Traits>::
+ get(void)
+ {
+ const int_type __eof = traits_type::eof();
+ int_type __c = __eof;
+ _M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ __try
+ {
+ __c = this->rdbuf()->sbumpc();
+ // 27.6.1.1 paragraph 3
+ if (!traits_type::eq_int_type(__c, __eof))
+ _M_gcount = 1;
+ else
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return __c;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ get(char_type& __c)
+ {
+ _M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ __try
+ {
+ const int_type __cb = this->rdbuf()->sbumpc();
+ // 27.6.1.1 paragraph 3
+ if (!traits_type::eq_int_type(__cb, traits_type::eof()))
+ {
+ _M_gcount = 1;
+ __c = traits_type::to_char_type(__cb);
+ }
+ else
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ get(char_type* __s, streamsize __n, char_type __delim)
+ {
+ _M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ __try
+ {
+ const int_type __idelim = traits_type::to_int_type(__delim);
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ int_type __c = __sb->sgetc();
+
+ while (_M_gcount + 1 < __n
+ && !traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __idelim))
+ {
+ *__s++ = traits_type::to_char_type(__c);
+ ++_M_gcount;
+ __c = __sb->snextc();
+ }
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 243. get and getline when sentry reports failure.
+ if (__n > 0)
+ *__s = char_type();
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ get(__streambuf_type& __sb, char_type __delim)
+ {
+ _M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ __try
+ {
+ const int_type __idelim = traits_type::to_int_type(__delim);
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __this_sb = this->rdbuf();
+ int_type __c = __this_sb->sgetc();
+ char_type __c2 = traits_type::to_char_type(__c);
+
+ while (!traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __idelim)
+ && !traits_type::eq_int_type(__sb.sputc(__c2), __eof))
+ {
+ ++_M_gcount;
+ __c = __this_sb->snextc();
+ __c2 = traits_type::to_char_type(__c);
+ }
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ getline(char_type* __s, streamsize __n, char_type __delim)
+ {
+ _M_gcount = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ __try
+ {
+ const int_type __idelim = traits_type::to_int_type(__delim);
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ int_type __c = __sb->sgetc();
+
+ while (_M_gcount + 1 < __n
+ && !traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __idelim))
+ {
+ *__s++ = traits_type::to_char_type(__c);
+ __c = __sb->snextc();
+ ++_M_gcount;
+ }
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ else
+ {
+ if (traits_type::eq_int_type(__c, __idelim))
+ {
+ __sb->sbumpc();
+ ++_M_gcount;
+ }
+ else
+ __err |= ios_base::failbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 243. get and getline when sentry reports failure.
+ if (__n > 0)
+ *__s = char_type();
+ if (!_M_gcount)
+ __err |= ios_base::failbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ // We provide three overloads, since the first two are much simpler
+ // than the general case. Also, the latter two can thus adopt the
+ // same "batchy" strategy used by getline above.
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ ignore(void)
+ {
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+
+ if (traits_type::eq_int_type(__sb->sbumpc(), __eof))
+ __err |= ios_base::eofbit;
+ else
+ _M_gcount = 1;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ ignore(streamsize __n)
+ {
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb && __n > 0)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ int_type __c = __sb->sgetc();
+
+ // N.B. On LFS-enabled platforms streamsize is still 32 bits
+ // wide: if we want to implement the standard mandated behavior
+ // for n == max() (see 27.6.1.3/24) we are at risk of signed
+ // integer overflow: thus these contortions. Also note that,
+ // by definition, when more than 2G chars are actually ignored,
+ // _M_gcount (the return value of gcount, that is) cannot be
+ // really correct, being unavoidably too small.
+ bool __large_ignore = false;
+ while (true)
+ {
+ while (_M_gcount < __n
+ && !traits_type::eq_int_type(__c, __eof))
+ {
+ ++_M_gcount;
+ __c = __sb->snextc();
+ }
+ if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
+ && !traits_type::eq_int_type(__c, __eof))
+ {
+ _M_gcount =
+ __gnu_cxx::__numeric_traits<streamsize>::__min;
+ __large_ignore = true;
+ }
+ else
+ break;
+ }
+
+ if (__large_ignore)
+ _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ ignore(streamsize __n, int_type __delim)
+ {
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb && __n > 0)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ int_type __c = __sb->sgetc();
+
+ // See comment above.
+ bool __large_ignore = false;
+ while (true)
+ {
+ while (_M_gcount < __n
+ && !traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __delim))
+ {
+ ++_M_gcount;
+ __c = __sb->snextc();
+ }
+ if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max
+ && !traits_type::eq_int_type(__c, __eof)
+ && !traits_type::eq_int_type(__c, __delim))
+ {
+ _M_gcount =
+ __gnu_cxx::__numeric_traits<streamsize>::__min;
+ __large_ignore = true;
+ }
+ else
+ break;
+ }
+
+ if (__large_ignore)
+ _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+ if (traits_type::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+ else if (traits_type::eq_int_type(__c, __delim))
+ {
+ if (_M_gcount
+ < __gnu_cxx::__numeric_traits<streamsize>::__max)
+ ++_M_gcount;
+ __sb->sbumpc();
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_istream<_CharT, _Traits>::int_type
+ basic_istream<_CharT, _Traits>::
+ peek(void)
+ {
+ int_type __c = traits_type::eof();
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ __c = this->rdbuf()->sgetc();
+ if (traits_type::eq_int_type(__c, traits_type::eof()))
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return __c;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ read(char_type* __s, streamsize __n)
+ {
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ _M_gcount = this->rdbuf()->sgetn(__s, __n);
+ if (_M_gcount != __n)
+ __err |= (ios_base::eofbit | ios_base::failbit);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_istream<_CharT, _Traits>::
+ readsome(char_type* __s, streamsize __n)
+ {
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ // Cannot compare int_type with streamsize generically.
+ const streamsize __num = this->rdbuf()->in_avail();
+ if (__num > 0)
+ _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n));
+ else if (__num == -1)
+ __err |= ios_base::eofbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return _M_gcount;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ putback(char_type __c)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 60. What is a formatted input function?
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ if (!__sb
+ || traits_type::eq_int_type(__sb->sputbackc(__c), __eof))
+ __err |= ios_base::badbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ unget(void)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 60. What is a formatted input function?
+ _M_gcount = 0;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __eof = traits_type::eof();
+ __streambuf_type* __sb = this->rdbuf();
+ if (!__sb
+ || traits_type::eq_int_type(__sb->sungetc(), __eof))
+ __err |= ios_base::badbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ int
+ basic_istream<_CharT, _Traits>::
+ sync(void)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR60. Do not change _M_gcount.
+ int __ret = -1;
+ sentry __cerb(*this, true);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ __streambuf_type* __sb = this->rdbuf();
+ if (__sb)
+ {
+ if (__sb->pubsync() == -1)
+ __err |= ios_base::badbit;
+ else
+ __ret = 0;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_istream<_CharT, _Traits>::pos_type
+ basic_istream<_CharT, _Traits>::
+ tellg(void)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR60. Do not change _M_gcount.
+ pos_type __ret = pos_type(-1);
+ __try
+ {
+ if (!this->fail())
+ __ret = this->rdbuf()->pubseekoff(0, ios_base::cur,
+ ios_base::in);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ seekg(pos_type __pos)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR60. Do not change _M_gcount.
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ if (!this->fail())
+ {
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+ ios_base::in);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ basic_istream<_CharT, _Traits>::
+ seekg(off_type __off, ios_base::seekdir __dir)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR60. Do not change _M_gcount.
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ if (!this->fail())
+ {
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+ ios_base::in);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ // 27.6.1.2.3 Character extraction templates
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::int_type __int_type;
+
+ typename __istream_type::sentry __cerb(__in, false);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const __int_type __cb = __in.rdbuf()->sbumpc();
+ if (!_Traits::eq_int_type(__cb, _Traits::eof()))
+ __c = _Traits::to_char_type(__cb);
+ else
+ __err |= (ios_base::eofbit | ios_base::failbit);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __in._M_setstate(ios_base::badbit); }
+ if (__err)
+ __in.setstate(__err);
+ }
+ return __in;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef typename _Traits::int_type int_type;
+ typedef _CharT char_type;
+ typedef ctype<_CharT> __ctype_type;
+
+ streamsize __extracted = 0;
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ typename __istream_type::sentry __cerb(__in, false);
+ if (__cerb)
+ {
+ __try
+ {
+ // Figure out how many characters to extract.
+ streamsize __num = __in.width();
+ if (__num <= 0)
+ __num = __gnu_cxx::__numeric_traits<streamsize>::__max;
+
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+
+ const int_type __eof = _Traits::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ int_type __c = __sb->sgetc();
+
+ while (__extracted < __num - 1
+ && !_Traits::eq_int_type(__c, __eof)
+ && !__ct.is(ctype_base::space,
+ _Traits::to_char_type(__c)))
+ {
+ *__s++ = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __sb->snextc();
+ }
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= ios_base::eofbit;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 68. Extractors for char* should store null at end
+ *__s = char_type();
+ __in.width(0);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __in._M_setstate(ios_base::badbit); }
+ }
+ if (!__extracted)
+ __err |= ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
+ return __in;
+ }
+
+ // 27.6.1.4 Standard basic_istream manipulators
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ ws(basic_istream<_CharT, _Traits>& __in)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef typename __istream_type::int_type __int_type;
+ typedef ctype<_CharT> __ctype_type;
+
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+ const __int_type __eof = _Traits::eof();
+ __streambuf_type* __sb = __in.rdbuf();
+ __int_type __c = __sb->sgetc();
+
+ while (!_Traits::eq_int_type(__c, __eof)
+ && __ct.is(ctype_base::space, _Traits::to_char_type(__c)))
+ __c = __sb->snextc();
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __in.setstate(ios_base::eofbit);
+ return __in;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_istream<char>;
+ extern template istream& ws(istream&);
+ extern template istream& operator>>(istream&, char&);
+ extern template istream& operator>>(istream&, char*);
+ extern template istream& operator>>(istream&, unsigned char&);
+ extern template istream& operator>>(istream&, signed char&);
+ extern template istream& operator>>(istream&, unsigned char*);
+ extern template istream& operator>>(istream&, signed char*);
+
+ extern template istream& istream::_M_extract(unsigned short&);
+ extern template istream& istream::_M_extract(unsigned int&);
+ extern template istream& istream::_M_extract(long&);
+ extern template istream& istream::_M_extract(unsigned long&);
+ extern template istream& istream::_M_extract(bool&);
+#ifdef _GLIBCXX_USE_LONG_LONG
+ extern template istream& istream::_M_extract(long long&);
+ extern template istream& istream::_M_extract(unsigned long long&);
+#endif
+ extern template istream& istream::_M_extract(float&);
+ extern template istream& istream::_M_extract(double&);
+ extern template istream& istream::_M_extract(long double&);
+ extern template istream& istream::_M_extract(void*&);
+
+ extern template class basic_iostream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_istream<wchar_t>;
+ extern template wistream& ws(wistream&);
+ extern template wistream& operator>>(wistream&, wchar_t&);
+ extern template wistream& operator>>(wistream&, wchar_t*);
+
+ extern template wistream& wistream::_M_extract(unsigned short&);
+ extern template wistream& wistream::_M_extract(unsigned int&);
+ extern template wistream& wistream::_M_extract(long&);
+ extern template wistream& wistream::_M_extract(unsigned long&);
+ extern template wistream& wistream::_M_extract(bool&);
+#ifdef _GLIBCXX_USE_LONG_LONG
+ extern template wistream& wistream::_M_extract(long long&);
+ extern template wistream& wistream::_M_extract(unsigned long long&);
+#endif
+ extern template wistream& wistream::_M_extract(float&);
+ extern template wistream& wistream::_M_extract(double&);
+ extern template wistream& wistream::_M_extract(long double&);
+ extern template wistream& wistream::_M_extract(void*&);
+
+ extern template class basic_iostream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/list.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/list.tcc
new file mode 100644
index 0000000..899b418
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/list.tcc
@@ -0,0 +1,416 @@
+// List implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file list.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _LIST_TCC
+#define _LIST_TCC 1
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ template<typename _Tp, typename _Alloc>
+ void
+ _List_base<_Tp, _Alloc>::
+ _M_clear()
+ {
+ typedef _List_node<_Tp> _Node;
+ _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next);
+ while (__cur != &this->_M_impl._M_node)
+ {
+ _Node* __tmp = __cur;
+ __cur = static_cast<_Node*>(__cur->_M_next);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _M_get_Node_allocator().destroy(__tmp);
+#else
+ _M_get_Tp_allocator().destroy(&__tmp->_M_data);
+#endif
+ _M_put_node(__tmp);
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename list<_Tp, _Alloc>::iterator
+ list<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+ __tmp->hook(__position._M_node);
+ return iterator(__tmp);
+ }
+#endif
+
+ template<typename _Tp, typename _Alloc>
+ typename list<_Tp, _Alloc>::iterator
+ list<_Tp, _Alloc>::
+ insert(iterator __position, const value_type& __x)
+ {
+ _Node* __tmp = _M_create_node(__x);
+ __tmp->hook(__position._M_node);
+ return iterator(__tmp);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ typename list<_Tp, _Alloc>::iterator
+ list<_Tp, _Alloc>::
+ erase(iterator __position)
+ {
+ iterator __ret = iterator(__position._M_node->_M_next);
+ _M_erase(__position);
+ return __ret;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+ resize(size_type __new_size, value_type __x)
+ {
+ iterator __i = begin();
+ size_type __len = 0;
+ for (; __i != end() && __len < __new_size; ++__i, ++__len)
+ ;
+ if (__len == __new_size)
+ erase(__i, end());
+ else // __i == end()
+ insert(end(), __new_size - __len, __x);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ list<_Tp, _Alloc>&
+ list<_Tp, _Alloc>::
+ operator=(const list& __x)
+ {
+ if (this != &__x)
+ {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ const_iterator __first2 = __x.begin();
+ const_iterator __last2 = __x.end();
+ for (; __first1 != __last1 && __first2 != __last2;
+ ++__first1, ++__first2)
+ *__first1 = *__first2;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
+ return *this;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+ _M_fill_assign(size_type __n, const value_type& __val)
+ {
+ iterator __i = begin();
+ for (; __i != end() && __n > 0; ++__i, --__n)
+ *__i = __val;
+ if (__n > 0)
+ insert(end(), __n, __val);
+ else
+ erase(__i, end());
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template <typename _InputIterator>
+ void
+ list<_Tp, _Alloc>::
+ _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
+ __false_type)
+ {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ for (; __first1 != __last1 && __first2 != __last2;
+ ++__first1, ++__first2)
+ *__first1 = *__first2;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+ remove(const value_type& __value)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ iterator __extra = __last;
+ while (__first != __last)
+ {
+ iterator __next = __first;
+ ++__next;
+ if (*__first == __value)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 526. Is it undefined if a function in the standard changes
+ // in parameters?
+ if (&*__first != &__value)
+ _M_erase(__first);
+ else
+ __extra = __first;
+ }
+ __first = __next;
+ }
+ if (__extra != __last)
+ _M_erase(__extra);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+ unique()
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (*__first == *__next)
+ _M_erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x)
+#else
+ merge(list& __x)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ _M_check_equal_allocators(__x);
+
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ iterator __first2 = __x.begin();
+ iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first2 < *__first1)
+ {
+ iterator __next = __first2;
+ _M_transfer(__first1, __first2, ++__next);
+ __first2 = __next;
+ }
+ else
+ ++__first1;
+ if (__first2 != __last2)
+ _M_transfer(__last1, __first2, __last2);
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template <typename _StrictWeakOrdering>
+ void
+ list<_Tp, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x, _StrictWeakOrdering __comp)
+#else
+ merge(list& __x, _StrictWeakOrdering __comp)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ _M_check_equal_allocators(__x);
+
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ iterator __first2 = __x.begin();
+ iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__comp(*__first2, *__first1))
+ {
+ iterator __next = __first2;
+ _M_transfer(__first1, __first2, ++__next);
+ __first2 = __next;
+ }
+ else
+ ++__first1;
+ if (__first2 != __last2)
+ _M_transfer(__last1, __first2, __last2);
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ list<_Tp, _Alloc>::
+ sort()
+ {
+ // Do nothing if the list has length 0 or 1.
+ if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+ && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
+ {
+ list __carry;
+ list __tmp[64];
+ list * __fill = &__tmp[0];
+ list * __counter;
+
+ do
+ {
+ __carry.splice(__carry.begin(), *this, begin());
+
+ for(__counter = &__tmp[0];
+ __counter != __fill && !__counter->empty();
+ ++__counter)
+ {
+ __counter->merge(__carry);
+ __carry.swap(*__counter);
+ }
+ __carry.swap(*__counter);
+ if (__counter == __fill)
+ ++__fill;
+ }
+ while ( !empty() );
+
+ for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+ __counter->merge(*(__counter - 1));
+ swap( *(__fill - 1) );
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template <typename _Predicate>
+ void
+ list<_Tp, _Alloc>::
+ remove_if(_Predicate __pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ while (__first != __last)
+ {
+ iterator __next = __first;
+ ++__next;
+ if (__pred(*__first))
+ _M_erase(__first);
+ __first = __next;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template <typename _BinaryPredicate>
+ void
+ list<_Tp, _Alloc>::
+ unique(_BinaryPredicate __binary_pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ _M_erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template <typename _StrictWeakOrdering>
+ void
+ list<_Tp, _Alloc>::
+ sort(_StrictWeakOrdering __comp)
+ {
+ // Do nothing if the list has length 0 or 1.
+ if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node
+ && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node)
+ {
+ list __carry;
+ list __tmp[64];
+ list * __fill = &__tmp[0];
+ list * __counter;
+
+ do
+ {
+ __carry.splice(__carry.begin(), *this, begin());
+
+ for(__counter = &__tmp[0];
+ __counter != __fill && !__counter->empty();
+ ++__counter)
+ {
+ __counter->merge(__carry, __comp);
+ __carry.swap(*__counter);
+ }
+ __carry.swap(*__counter);
+ if (__counter == __fill)
+ ++__fill;
+ }
+ while ( !empty() );
+
+ for (__counter = &__tmp[1]; __counter != __fill; ++__counter)
+ __counter->merge(*(__counter - 1), __comp);
+ swap(*(__fill - 1));
+ }
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _LIST_TCC */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.h
new file mode 100644
index 0000000..4a64693
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.h
@@ -0,0 +1,812 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_classes.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#ifndef _LOCALE_CLASSES_H
+#define _LOCALE_CLASSES_H 1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <string>
+#include <ext/atomicity.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 22.1.1 Class locale
+ /**
+ * @brief Container class for localization functionality.
+ *
+ * The locale class is first a class wrapper for C library locales. It is
+ * also an extensible container for user-defined localization. A locale is
+ * a collection of facets that implement various localization features such
+ * as money, time, and number printing.
+ *
+ * Constructing C++ locales does not change the C library locale.
+ *
+ * This library supports efficient construction and copying of locales
+ * through a reference counting implementation of the locale class.
+ */
+ class locale
+ {
+ public:
+ // Types:
+ /// Definition of locale::category.
+ typedef int category;
+
+ // Forward decls and friends:
+ class facet;
+ class id;
+ class _Impl;
+
+ friend class facet;
+ friend class _Impl;
+
+ template<typename _Facet>
+ friend bool
+ has_facet(const locale&) throw();
+
+ template<typename _Facet>
+ friend const _Facet&
+ use_facet(const locale&);
+
+ template<typename _Cache>
+ friend struct __use_cache;
+
+ //@{
+ /**
+ * @brief Category values.
+ *
+ * The standard category values are none, ctype, numeric, collate, time,
+ * monetary, and messages. They form a bitmask that supports union and
+ * intersection. The category all is the union of these values.
+ *
+ * NB: Order must match _S_facet_categories definition in locale.cc
+ */
+ static const category none = 0;
+ static const category ctype = 1L << 0;
+ static const category numeric = 1L << 1;
+ static const category collate = 1L << 2;
+ static const category time = 1L << 3;
+ static const category monetary = 1L << 4;
+ static const category messages = 1L << 5;
+ static const category all = (ctype | numeric | collate |
+ time | monetary | messages);
+ //@}
+
+ // Construct/copy/destroy:
+
+ /**
+ * @brief Default constructor.
+ *
+ * Constructs a copy of the global locale. If no locale has been
+ * explicitly set, this is the "C" locale.
+ */
+ locale() throw();
+
+ /**
+ * @brief Copy constructor.
+ *
+ * Constructs a copy of @a other.
+ *
+ * @param other The locale to copy.
+ */
+ locale(const locale& __other) throw();
+
+ /**
+ * @brief Named locale constructor.
+ *
+ * Constructs a copy of the named C library locale.
+ *
+ * @param s Name of the locale to construct.
+ * @throw std::runtime_error if s is null or an undefined locale.
+ */
+ explicit
+ locale(const char* __s);
+
+ /**
+ * @brief Construct locale with facets from another locale.
+ *
+ * Constructs a copy of the locale @a base. The facets specified by @a
+ * cat are replaced with those from the locale named by @a s. If base is
+ * named, this locale instance will also be named.
+ *
+ * @param base The locale to copy.
+ * @param s Name of the locale to use facets from.
+ * @param cat Set of categories defining the facets to use from s.
+ * @throw std::runtime_error if s is null or an undefined locale.
+ */
+ locale(const locale& __base, const char* __s, category __cat);
+
+ /**
+ * @brief Construct locale with facets from another locale.
+ *
+ * Constructs a copy of the locale @a base. The facets specified by @a
+ * cat are replaced with those from the locale @a add. If @a base and @a
+ * add are named, this locale instance will also be named.
+ *
+ * @param base The locale to copy.
+ * @param add The locale to use facets from.
+ * @param cat Set of categories defining the facets to use from add.
+ */
+ locale(const locale& __base, const locale& __add, category __cat);
+
+ /**
+ * @brief Construct locale with another facet.
+ *
+ * Constructs a copy of the locale @a other. The facet @f is added to
+ * @other, replacing an existing facet of type Facet if there is one. If
+ * @f is null, this locale is a copy of @a other.
+ *
+ * @param other The locale to copy.
+ * @param f The facet to add in.
+ */
+ template<typename _Facet>
+ locale(const locale& __other, _Facet* __f);
+
+ /// Locale destructor.
+ ~locale() throw();
+
+ /**
+ * @brief Assignment operator.
+ *
+ * Set this locale to be a copy of @a other.
+ *
+ * @param other The locale to copy.
+ * @return A reference to this locale.
+ */
+ const locale&
+ operator=(const locale& __other) throw();
+
+ /**
+ * @brief Construct locale with another facet.
+ *
+ * Constructs and returns a new copy of this locale. Adds or replaces an
+ * existing facet of type Facet from the locale @a other into the new
+ * locale.
+ *
+ * @param Facet The facet type to copy from other
+ * @param other The locale to copy from.
+ * @return Newly constructed locale.
+ * @throw std::runtime_error if other has no facet of type Facet.
+ */
+ template<typename _Facet>
+ locale
+ combine(const locale& __other) const;
+
+ // Locale operations:
+ /**
+ * @brief Return locale name.
+ * @return Locale name or "*" if unnamed.
+ */
+ string
+ name() const;
+
+ /**
+ * @brief Locale equality.
+ *
+ * @param other The locale to compare against.
+ * @return True if other and this refer to the same locale instance, are
+ * copies, or have the same name. False otherwise.
+ */
+ bool
+ operator==(const locale& __other) const throw ();
+
+ /**
+ * @brief Locale inequality.
+ *
+ * @param other The locale to compare against.
+ * @return ! (*this == other)
+ */
+ bool
+ operator!=(const locale& __other) const throw ()
+ { return !(this->operator==(__other)); }
+
+ /**
+ * @brief Compare two strings according to collate.
+ *
+ * Template operator to compare two strings using the compare function of
+ * the collate facet in this locale. One use is to provide the locale to
+ * the sort function. For example, a vector v of strings could be sorted
+ * according to locale loc by doing:
+ * @code
+ * std::sort(v.begin(), v.end(), loc);
+ * @endcode
+ *
+ * @param s1 First string to compare.
+ * @param s2 Second string to compare.
+ * @return True if collate<Char> facet compares s1 < s2, else false.
+ */
+ template<typename _Char, typename _Traits, typename _Alloc>
+ bool
+ operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
+ const basic_string<_Char, _Traits, _Alloc>& __s2) const;
+
+ // Global locale objects:
+ /**
+ * @brief Set global locale
+ *
+ * This function sets the global locale to the argument and returns a
+ * copy of the previous global locale. If the argument has a name, it
+ * will also call std::setlocale(LC_ALL, loc.name()).
+ *
+ * @param locale The new locale to make global.
+ * @return Copy of the old global locale.
+ */
+ static locale
+ global(const locale&);
+
+ /**
+ * @brief Return reference to the "C" locale.
+ */
+ static const locale&
+ classic();
+
+ private:
+ // The (shared) implementation
+ _Impl* _M_impl;
+
+ // The "C" reference locale
+ static _Impl* _S_classic;
+
+ // Current global locale
+ static _Impl* _S_global;
+
+ // Names of underlying locale categories.
+ // NB: locale::global() has to know how to modify all the
+ // underlying categories, not just the ones required by the C++
+ // standard.
+ static const char* const* const _S_categories;
+
+ // Number of standard categories. For C++, these categories are
+ // collate, ctype, monetary, numeric, time, and messages. These
+ // directly correspond to ISO C99 macros LC_COLLATE, LC_CTYPE,
+ // LC_MONETARY, LC_NUMERIC, and LC_TIME. In addition, POSIX (IEEE
+ // 1003.1-2001) specifies LC_MESSAGES.
+ // In addition to the standard categories, the underlying
+ // operating system is allowed to define extra LC_*
+ // macros. For GNU systems, the following are also valid:
+ // LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT,
+ // and LC_IDENTIFICATION.
+ enum { _S_categories_size = 6 + _GLIBCXX_NUM_CATEGORIES };
+
+#ifdef __GTHREADS
+ static __gthread_once_t _S_once;
+#endif
+
+ explicit
+ locale(_Impl*) throw();
+
+ static void
+ _S_initialize();
+
+ static void
+ _S_initialize_once();
+
+ static category
+ _S_normalize_category(category);
+
+ void
+ _M_coalesce(const locale& __base, const locale& __add, category __cat);
+ };
+
+
+ // 22.1.1.1.2 Class locale::facet
+ /**
+ * @brief Localization functionality base class.
+ *
+ * The facet class is the base class for a localization feature, such as
+ * money, time, and number printing. It provides common support for facets
+ * and reference management.
+ *
+ * Facets may not be copied or assigned.
+ */
+ class locale::facet
+ {
+ private:
+ friend class locale;
+ friend class locale::_Impl;
+
+ mutable _Atomic_word _M_refcount;
+
+ // Contains data from the underlying "C" library for the classic locale.
+ static __c_locale _S_c_locale;
+
+ // String literal for the name of the classic locale.
+ static const char _S_c_name[2];
+
+#ifdef __GTHREADS
+ static __gthread_once_t _S_once;
+#endif
+
+ static void
+ _S_initialize_once();
+
+ protected:
+ /**
+ * @brief Facet constructor.
+ *
+ * This is the constructor provided by the standard. If refs is 0, the
+ * facet is destroyed when the last referencing locale is destroyed.
+ * Otherwise the facet will never be destroyed.
+ *
+ * @param refs The initial value for reference count.
+ */
+ explicit
+ facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0)
+ { }
+
+ /// Facet destructor.
+ virtual
+ ~facet();
+
+ static void
+ _S_create_c_locale(__c_locale& __cloc, const char* __s,
+ __c_locale __old = 0);
+
+ static __c_locale
+ _S_clone_c_locale(__c_locale& __cloc);
+
+ static void
+ _S_destroy_c_locale(__c_locale& __cloc);
+
+ // Returns data from the underlying "C" library data for the
+ // classic locale.
+ static __c_locale
+ _S_get_c_locale();
+
+ static const char*
+ _S_get_c_name();
+
+ private:
+ void
+ _M_add_reference() const throw()
+ { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+ void
+ _M_remove_reference() const throw()
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
+ {
+ __try
+ { delete this; }
+ __catch(...)
+ { }
+ }
+ }
+
+ facet(const facet&); // Not defined.
+
+ facet&
+ operator=(const facet&); // Not defined.
+ };
+
+
+ // 22.1.1.1.3 Class locale::id
+ /**
+ * @brief Facet ID class.
+ *
+ * The ID class provides facets with an index used to identify them.
+ * Every facet class must define a public static member locale::id, or be
+ * derived from a facet that provides this member, otherwise the facet
+ * cannot be used in a locale. The locale::id ensures that each class
+ * type gets a unique identifier.
+ */
+ class locale::id
+ {
+ private:
+ friend class locale;
+ friend class locale::_Impl;
+
+ template<typename _Facet>
+ friend const _Facet&
+ use_facet(const locale&);
+
+ template<typename _Facet>
+ friend bool
+ has_facet(const locale&) throw ();
+
+ // NB: There is no accessor for _M_index because it may be used
+ // before the constructor is run; the effect of calling a member
+ // function (even an inline) would be undefined.
+ mutable size_t _M_index;
+
+ // Last id number assigned.
+ static _Atomic_word _S_refcount;
+
+ void
+ operator=(const id&); // Not defined.
+
+ id(const id&); // Not defined.
+
+ public:
+ // NB: This class is always a static data member, and thus can be
+ // counted on to be zero-initialized.
+ /// Constructor.
+ id() { }
+
+ size_t
+ _M_id() const;
+ };
+
+
+ // Implementation object for locale.
+ class locale::_Impl
+ {
+ public:
+ // Friends.
+ friend class locale;
+ friend class locale::facet;
+
+ template<typename _Facet>
+ friend bool
+ has_facet(const locale&) throw();
+
+ template<typename _Facet>
+ friend const _Facet&
+ use_facet(const locale&);
+
+ template<typename _Cache>
+ friend struct __use_cache;
+
+ private:
+ // Data Members.
+ _Atomic_word _M_refcount;
+ const facet** _M_facets;
+ size_t _M_facets_size;
+ const facet** _M_caches;
+ char** _M_names;
+ static const locale::id* const _S_id_ctype[];
+ static const locale::id* const _S_id_numeric[];
+ static const locale::id* const _S_id_collate[];
+ static const locale::id* const _S_id_time[];
+ static const locale::id* const _S_id_monetary[];
+ static const locale::id* const _S_id_messages[];
+ static const locale::id* const* const _S_facet_categories[];
+
+ void
+ _M_add_reference() throw()
+ { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
+
+ void
+ _M_remove_reference() throw()
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
+ {
+ __try
+ { delete this; }
+ __catch(...)
+ { }
+ }
+ }
+
+ _Impl(const _Impl&, size_t);
+ _Impl(const char*, size_t);
+ _Impl(size_t) throw();
+
+ ~_Impl() throw();
+
+ _Impl(const _Impl&); // Not defined.
+
+ void
+ operator=(const _Impl&); // Not defined.
+
+ bool
+ _M_check_same_name()
+ {
+ bool __ret = true;
+ if (_M_names[1])
+ // We must actually compare all the _M_names: can be all equal!
+ for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i)
+ __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0;
+ return __ret;
+ }
+
+ void
+ _M_replace_categories(const _Impl*, category);
+
+ void
+ _M_replace_category(const _Impl*, const locale::id* const*);
+
+ void
+ _M_replace_facet(const _Impl*, const locale::id*);
+
+ void
+ _M_install_facet(const locale::id*, const facet*);
+
+ template<typename _Facet>
+ void
+ _M_init_facet(_Facet* __facet)
+ { _M_install_facet(&_Facet::id, __facet); }
+
+ void
+ _M_install_cache(const facet*, size_t);
+ };
+
+
+ /**
+ * @brief Test for the presence of a facet.
+ *
+ * has_facet tests the locale argument for the presence of the facet type
+ * provided as the template parameter. Facets derived from the facet
+ * parameter will also return true.
+ *
+ * @param Facet The facet type to test the presence of.
+ * @param locale The locale to test.
+ * @return true if locale contains a facet of type Facet, else false.
+ */
+ template<typename _Facet>
+ bool
+ has_facet(const locale& __loc) throw();
+
+ /**
+ * @brief Return a facet.
+ *
+ * use_facet looks for and returns a reference to a facet of type Facet
+ * where Facet is the template parameter. If has_facet(locale) is true,
+ * there is a suitable facet to return. It throws std::bad_cast if the
+ * locale doesn't contain a facet of type Facet.
+ *
+ * @param Facet The facet type to access.
+ * @param locale The locale to use.
+ * @return Reference to facet of type Facet.
+ * @throw std::bad_cast if locale doesn't contain a facet of type Facet.
+ */
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale& __loc);
+
+
+ /**
+ * @brief Facet for localized string comparison.
+ *
+ * This facet encapsulates the code to compare strings in a localized
+ * manner.
+ *
+ * The collate template uses protected virtual functions to provide
+ * the actual results. The public accessors forward the call to
+ * the virtual functions. These virtual functions are hooks for
+ * developers to implement the behavior they require from the
+ * collate facet.
+ */
+ template<typename _CharT>
+ class collate : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ protected:
+ // Underlying "C" library locale information saved from
+ // initialization, needed by collate_byname as well.
+ __c_locale _M_c_locale_collate;
+
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ collate(size_t __refs = 0)
+ : facet(__refs), _M_c_locale_collate(_S_get_c_locale())
+ { }
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ collate(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc))
+ { }
+
+ /**
+ * @brief Compare two strings.
+ *
+ * This function compares two strings and returns the result by calling
+ * collate::do_compare().
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ int
+ compare(const _CharT* __lo1, const _CharT* __hi1,
+ const _CharT* __lo2, const _CharT* __hi2) const
+ { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
+
+ /**
+ * @brief Transform string to comparable form.
+ *
+ * This function is a wrapper for strxfrm functionality. It takes the
+ * input string and returns a modified string that can be directly
+ * compared to other transformed strings. In the "C" locale, this
+ * function just returns a copy of the input string. In some other
+ * locales, it may replace two chars with one, change a char for
+ * another, etc. It does so by returning collate::do_transform().
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Transformed string_type.
+ */
+ string_type
+ transform(const _CharT* __lo, const _CharT* __hi) const
+ { return this->do_transform(__lo, __hi); }
+
+ /**
+ * @brief Return hash of a string.
+ *
+ * This function computes and returns a hash on the input string. It
+ * does so by returning collate::do_hash().
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Hash value.
+ */
+ long
+ hash(const _CharT* __lo, const _CharT* __hi) const
+ { return this->do_hash(__lo, __hi); }
+
+ // Used to abstract out _CharT bits in virtual member functions, below.
+ int
+ _M_compare(const _CharT*, const _CharT*) const;
+
+ size_t
+ _M_transform(_CharT*, const _CharT*, size_t) const;
+
+ protected:
+ /// Destructor.
+ virtual
+ ~collate()
+ { _S_destroy_c_locale(_M_c_locale_collate); }
+
+ /**
+ * @brief Compare two strings.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see compare().
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ virtual int
+ do_compare(const _CharT* __lo1, const _CharT* __hi1,
+ const _CharT* __lo2, const _CharT* __hi2) const;
+
+ /**
+ * @brief Transform string to comparable form.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned.
+ *
+ * @param lo1 Start of string 1.
+ * @param hi1 End of string 1.
+ * @param lo2 Start of string 2.
+ * @param hi2 End of string 2.
+ * @return 1 if string1 > string2, -1 if string1 < string2, else 0.
+ */
+ virtual string_type
+ do_transform(const _CharT* __lo, const _CharT* __hi) const;
+
+ /**
+ * @brief Return hash of a string.
+ *
+ * This function computes and returns a hash on the input string. This
+ * function is a hook for derived classes to change the value returned.
+ *
+ * @param lo Start of string.
+ * @param hi End of string.
+ * @return Hash value.
+ */
+ virtual long
+ do_hash(const _CharT* __lo, const _CharT* __hi) const;
+ };
+
+ template<typename _CharT>
+ locale::id collate<_CharT>::id;
+
+ // Specializations.
+ template<>
+ int
+ collate<char>::_M_compare(const char*, const char*) const;
+
+ template<>
+ size_t
+ collate<char>::_M_transform(char*, const char*, size_t) const;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ int
+ collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const;
+
+ template<>
+ size_t
+ collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const;
+#endif
+
+ /// class collate_byname [22.2.4.2].
+ template<typename _CharT>
+ class collate_byname : public collate<_CharT>
+ {
+ public:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ explicit
+ collate_byname(const char* __s, size_t __refs = 0)
+ : collate<_CharT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_collate);
+ this->_S_create_c_locale(this->_M_c_locale_collate, __s);
+ }
+ }
+
+ protected:
+ virtual
+ ~collate_byname() { }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_classes.tcc>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.tcc
new file mode 100644
index 0000000..c97e555
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_classes.tcc
@@ -0,0 +1,271 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_classes.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#ifndef _LOCALE_CLASSES_TCC
+#define _LOCALE_CLASSES_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Facet>
+ locale::
+ locale(const locale& __other, _Facet* __f)
+ {
+ _M_impl = new _Impl(*__other._M_impl, 1);
+
+ __try
+ { _M_impl->_M_install_facet(&_Facet::id, __f); }
+ __catch(...)
+ {
+ _M_impl->_M_remove_reference();
+ __throw_exception_again;
+ }
+ delete [] _M_impl->_M_names[0];
+ _M_impl->_M_names[0] = 0; // Unnamed.
+ }
+
+ template<typename _Facet>
+ locale
+ locale::
+ combine(const locale& __other) const
+ {
+ _Impl* __tmp = new _Impl(*_M_impl, 1);
+ __try
+ {
+ __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+ }
+ __catch(...)
+ {
+ __tmp->_M_remove_reference();
+ __throw_exception_again;
+ }
+ return locale(__tmp);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ bool
+ locale::
+ operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
+ const basic_string<_CharT, _Traits, _Alloc>& __s2) const
+ {
+ typedef std::collate<_CharT> __collate_type;
+ const __collate_type& __collate = use_facet<__collate_type>(*this);
+ return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
+ __s2.data(), __s2.data() + __s2.length()) < 0);
+ }
+
+
+ template<typename _Facet>
+ bool
+ has_facet(const locale& __loc) throw()
+ {
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
+ return (__i < __loc._M_impl->_M_facets_size
+#ifdef __GXX_RTTI
+ && dynamic_cast<const _Facet*>(__facets[__i]));
+#else
+ && static_cast<const _Facet*>(__facets[__i]));
+#endif
+ }
+
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale& __loc)
+ {
+ const size_t __i = _Facet::id._M_id();
+ const locale::facet** __facets = __loc._M_impl->_M_facets;
+ if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i])
+ __throw_bad_cast();
+#ifdef __GXX_RTTI
+ return dynamic_cast<const _Facet&>(*__facets[__i]);
+#else
+ return static_cast<const _Facet&>(*__facets[__i]);
+#endif
+ }
+
+
+ // Generic version does nothing.
+ template<typename _CharT>
+ int
+ collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const
+ { return 0; }
+
+ // Generic version does nothing.
+ template<typename _CharT>
+ size_t
+ collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const
+ { return 0; }
+
+ template<typename _CharT>
+ int
+ collate<_CharT>::
+ do_compare(const _CharT* __lo1, const _CharT* __hi1,
+ const _CharT* __lo2, const _CharT* __hi2) const
+ {
+ // strcoll assumes zero-terminated strings so we make a copy
+ // and then put a zero at the end.
+ const string_type __one(__lo1, __hi1);
+ const string_type __two(__lo2, __hi2);
+
+ const _CharT* __p = __one.c_str();
+ const _CharT* __pend = __one.data() + __one.length();
+ const _CharT* __q = __two.c_str();
+ const _CharT* __qend = __two.data() + __two.length();
+
+ // strcoll stops when it sees a nul character so we break
+ // the strings into zero-terminated substrings and pass those
+ // to strcoll.
+ for (;;)
+ {
+ const int __res = _M_compare(__p, __q);
+ if (__res)
+ return __res;
+
+ __p += char_traits<_CharT>::length(__p);
+ __q += char_traits<_CharT>::length(__q);
+ if (__p == __pend && __q == __qend)
+ return 0;
+ else if (__p == __pend)
+ return -1;
+ else if (__q == __qend)
+ return 1;
+
+ __p++;
+ __q++;
+ }
+ }
+
+ template<typename _CharT>
+ typename collate<_CharT>::string_type
+ collate<_CharT>::
+ do_transform(const _CharT* __lo, const _CharT* __hi) const
+ {
+ string_type __ret;
+
+ // strxfrm assumes zero-terminated strings so we make a copy
+ const string_type __str(__lo, __hi);
+
+ const _CharT* __p = __str.c_str();
+ const _CharT* __pend = __str.data() + __str.length();
+
+ size_t __len = (__hi - __lo) * 2;
+
+ _CharT* __c = new _CharT[__len];
+
+ __try
+ {
+ // strxfrm stops when it sees a nul character so we break
+ // the string into zero-terminated substrings and pass those
+ // to strxfrm.
+ for (;;)
+ {
+ // First try a buffer perhaps big enough.
+ size_t __res = _M_transform(__c, __p, __len);
+ // If the buffer was not large enough, try again with the
+ // correct size.
+ if (__res >= __len)
+ {
+ __len = __res + 1;
+ delete [] __c, __c = 0;
+ __c = new _CharT[__len];
+ __res = _M_transform(__c, __p, __len);
+ }
+
+ __ret.append(__c, __res);
+ __p += char_traits<_CharT>::length(__p);
+ if (__p == __pend)
+ break;
+
+ __p++;
+ __ret.push_back(_CharT());
+ }
+ }
+ __catch(...)
+ {
+ delete [] __c;
+ __throw_exception_again;
+ }
+
+ delete [] __c;
+
+ return __ret;
+ }
+
+ template<typename _CharT>
+ long
+ collate<_CharT>::
+ do_hash(const _CharT* __lo, const _CharT* __hi) const
+ {
+ unsigned long __val = 0;
+ for (; __lo < __hi; ++__lo)
+ __val =
+ *__lo + ((__val << 7)
+ | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>::
+ __digits - 7)));
+ return static_cast<long>(__val);
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class collate<char>;
+ extern template class collate_byname<char>;
+
+ extern template
+ const collate<char>&
+ use_facet<collate<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<collate<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class collate<wchar_t>;
+ extern template class collate_byname<wchar_t>;
+
+ extern template
+ const collate<wchar_t>&
+ use_facet<collate<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<collate<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.h
new file mode 100644
index 0000000..beed6f1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.h
@@ -0,0 +1,2602 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#ifndef _LOCALE_FACETS_H
+#define _LOCALE_FACETS_H 1
+
+#pragma GCC system_header
+
+#include <cwctype> // For wctype_t
+#include <cctype>
+#include <bits/ctype_base.h>
+#include <iosfwd>
+#include <bits/ios_base.h> // For ios_base, ios_base::iostate
+#include <streambuf>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/streambuf_iterator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // NB: Don't instantiate required wchar_t facets if no wchar_t support.
+#ifdef _GLIBCXX_USE_WCHAR_T
+# define _GLIBCXX_NUM_FACETS 28
+#else
+# define _GLIBCXX_NUM_FACETS 14
+#endif
+
+ // Convert string to numeric value of type _Tv and store results.
+ // NB: This is specialized for all required types, there is no
+ // generic definition.
+ template<typename _Tv>
+ void
+ __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err,
+ const __c_locale& __cloc);
+
+ // Explicit specializations for required types.
+ template<>
+ void
+ __convert_to_v(const char*, float&, ios_base::iostate&,
+ const __c_locale&);
+
+ template<>
+ void
+ __convert_to_v(const char*, double&, ios_base::iostate&,
+ const __c_locale&);
+
+ template<>
+ void
+ __convert_to_v(const char*, long double&, ios_base::iostate&,
+ const __c_locale&);
+
+ // NB: __pad is a struct, rather than a function, so it can be
+ // partially-specialized.
+ template<typename _CharT, typename _Traits>
+ struct __pad
+ {
+ static void
+ _S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
+ const _CharT* __olds, streamsize __newlen, streamsize __oldlen);
+ };
+
+ // Used by both numeric and monetary facets.
+ // Inserts "group separator" characters into an array of characters.
+ // It's recursive, one iteration per group. It moves the characters
+ // in the buffer this way: "xxxx12345" -> "12,345xxx". Call this
+ // only with __gsize != 0.
+ template<typename _CharT>
+ _CharT*
+ __add_grouping(_CharT* __s, _CharT __sep,
+ const char* __gbeg, size_t __gsize,
+ const _CharT* __first, const _CharT* __last);
+
+ // This template permits specializing facet output code for
+ // ostreambuf_iterator. For ostreambuf_iterator, sputn is
+ // significantly more efficient than incrementing iterators.
+ template<typename _CharT>
+ inline
+ ostreambuf_iterator<_CharT>
+ __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
+ {
+ __s._M_put(__ws, __len);
+ return __s;
+ }
+
+ // This is the unspecialized form of the template.
+ template<typename _CharT, typename _OutIter>
+ inline
+ _OutIter
+ __write(_OutIter __s, const _CharT* __ws, int __len)
+ {
+ for (int __j = 0; __j < __len; __j++, ++__s)
+ *__s = __ws[__j];
+ return __s;
+ }
+
+
+ // 22.2.1.1 Template class ctype
+ // Include host and configuration specific ctype enums for ctype_base.
+
+ // Common base for ctype<_CharT>.
+ /**
+ * @brief Common base for ctype facet
+ *
+ * This template class provides implementations of the public functions
+ * that forward to the protected virtual functions.
+ *
+ * This template also provides abstract stubs for the protected virtual
+ * functions.
+ */
+ template<typename _CharT>
+ class __ctype_abstract_base : public locale::facet, public ctype_base
+ {
+ public:
+ // Types:
+ /// Typedef for the template parameter
+ typedef _CharT char_type;
+
+ /**
+ * @brief Test char_type classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ * It does so by returning the value of ctype<char_type>::do_is().
+ *
+ * @param c The char_type to compare the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ bool
+ is(mask __m, char_type __c) const
+ { return this->do_is(__m, __c); }
+
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char_type in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the char array. It does so by returning the value of
+ * ctype<char_type>::do_is().
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
+ const char_type*
+ is(const char_type *__lo, const char_type *__hi, mask *__vec) const
+ { return this->do_is(__lo, __hi, __vec); }
+
+ /**
+ * @brief Find char_type matching a mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is true. It does so by returning
+ * ctype<char_type>::do_scan_is().
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to matching char_type if found, else @a hi.
+ */
+ const char_type*
+ scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+ { return this->do_scan_is(__m, __lo, __hi); }
+
+ /**
+ * @brief Find char_type not matching a mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is false. It does so by returning
+ * ctype<char_type>::do_scan_not().
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to non-matching char if found, else @a hi.
+ */
+ const char_type*
+ scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+ { return this->do_scan_not(__m, __lo, __hi); }
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This function converts the argument to uppercase if possible.
+ * If not possible (for example, '2'), returns the argument. It does
+ * so by returning ctype<char_type>::do_toupper().
+ *
+ * @param c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a c.
+ */
+ char_type
+ toupper(char_type __c) const
+ { return this->do_toupper(__c); }
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This function converts each char_type in the range [lo,hi) to
+ * uppercase if possible. Other elements remain untouched. It does so
+ * by returning ctype<char_type>:: do_toupper(lo, hi).
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This function converts the argument to lowercase if possible. If
+ * not possible (for example, '2'), returns the argument. It does so
+ * by returning ctype<char_type>::do_tolower(c).
+ *
+ * @param c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a c.
+ */
+ char_type
+ tolower(char_type __c) const
+ { return this->do_tolower(__c); }
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This function converts each char_type in the range [lo,hi) to
+ * lowercase if possible. Other elements remain untouched. It does so
+ * by returning ctype<char_type>:: do_tolower(lo, hi).
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
+
+ /**
+ * @brief Widen char to char_type
+ *
+ * This function converts the char argument to char_type using the
+ * simplest reasonable transformation. It does so by returning
+ * ctype<char_type>::do_widen(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted char_type.
+ */
+ char_type
+ widen(char __c) const
+ { return this->do_widen(__c); }
+
+ /**
+ * @brief Widen array to char_type
+ *
+ * This function converts each char in the input to char_type using the
+ * simplest reasonable transformation. It does so by returning
+ * ctype<char_type>::do_widen(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char*
+ widen(const char* __lo, const char* __hi, char_type* __to) const
+ { return this->do_widen(__lo, __hi, __to); }
+
+ /**
+ * @brief Narrow char_type to char
+ *
+ * This function converts the char_type to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. It does so by returning
+ * ctype<char_type>::do_narrow(c).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char_type to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ char
+ narrow(char_type __c, char __dfault) const
+ { return this->do_narrow(__c, __dfault); }
+
+ /**
+ * @brief Narrow array to char array
+ *
+ * This function converts each char_type in the input to char using the
+ * simplest reasonable transformation and writes the results to the
+ * destination array. For any char_type in the input that cannot be
+ * converted, @a dfault is used instead. It does so by returning
+ * ctype<char_type>::do_narrow(lo, hi, dfault, to).
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char_type*
+ narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char *__to) const
+ { return this->do_narrow(__lo, __hi, __dfault, __to); }
+
+ protected:
+ explicit
+ __ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
+
+ virtual
+ ~__ctype_abstract_base() { }
+
+ /**
+ * @brief Test char_type classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param c The char_type to find the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ virtual bool
+ do_is(mask __m, char_type __c) const = 0;
+
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char_type in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the input.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi,
+ mask* __vec) const = 0;
+
+ /**
+ * @brief Find char_type matching mask
+ *
+ * This function searches for and returns the first char_type c in
+ * [lo,hi) for which is(m,c) is true.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching char_type if found, else @a hi.
+ */
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo,
+ const char_type* __hi) const = 0;
+
+ /**
+ * @brief Find char_type not matching mask
+ *
+ * This function searches for and returns a pointer to the first
+ * char_type c of [lo,hi) for which is(m,c) is false.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching char_type if found, else @a hi.
+ */
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const = 0;
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the char_type argument to uppercase
+ * if possible. If not possible (for example, '2'), returns the
+ * argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a c.
+ */
+ virtual char_type
+ do_toupper(char_type) const = 0;
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each char_type in the range [lo,hi)
+ * to uppercase if possible. Other elements remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const = 0;
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a c.
+ */
+ virtual char_type
+ do_tolower(char_type) const = 0;
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each char_type in the range [lo,hi)
+ * to lowercase if possible. Other elements remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const = 0;
+
+ /**
+ * @brief Widen char
+ *
+ * This virtual function converts the char to char_type using the
+ * simplest reasonable transformation.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted char_type
+ */
+ virtual char_type
+ do_widen(char) const = 0;
+
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the input to char_type using the
+ * simplest reasonable transformation.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi,
+ char_type* __dest) const = 0;
+
+ /**
+ * @brief Narrow char_type to char
+ *
+ * This virtual function converts the argument to char using the
+ * simplest reasonable transformation. If the conversion fails, dfault
+ * is returned instead.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char_type to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
+ do_narrow(char_type, char __dfault) const = 0;
+
+ /**
+ * @brief Narrow char_type array to char
+ *
+ * This virtual function converts each char_type in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any element in the input that
+ * cannot be converted, @a dfault is used instead.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char* __dest) const = 0;
+ };
+
+ // NB: Generic, mostly useless implementation.
+ /**
+ * @brief Template ctype facet
+ *
+ * This template class defines classification and conversion functions for
+ * character sets. It wraps <cctype> functionality. Ctype gets used by
+ * streams for many I/O operations.
+ *
+ * This template provides the protected virtual functions the developer
+ * will have to replace in a derived class or specialization to make a
+ * working facet. The public functions that access them are defined in
+ * __ctype_abstract_base, to allow for implementation flexibility. See
+ * ctype<wchar_t> for an example. The functions are documented in
+ * __ctype_abstract_base.
+ *
+ * Note: implementations are provided for all the protected virtual
+ * functions, but will likely not be useful.
+ */
+ template<typename _CharT>
+ class ctype : public __ctype_abstract_base<_CharT>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef typename __ctype_abstract_base<_CharT>::mask mask;
+
+ /// The facet id for ctype<char_type>
+ static locale::id id;
+
+ explicit
+ ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
+
+ protected:
+ virtual
+ ~ctype();
+
+ virtual bool
+ do_is(mask __m, char_type __c) const;
+
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const;
+
+ virtual char_type
+ do_toupper(char_type __c) const;
+
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const;
+
+ virtual char_type
+ do_tolower(char_type __c) const;
+
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const;
+
+ virtual char_type
+ do_widen(char __c) const;
+
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+ virtual char
+ do_narrow(char_type, char __dfault) const;
+
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char* __dest) const;
+ };
+
+ template<typename _CharT>
+ locale::id ctype<_CharT>::id;
+
+ // 22.2.1.3 ctype<char> specialization.
+ /**
+ * @brief The ctype<char> specialization.
+ *
+ * This class defines classification and conversion functions for
+ * the char type. It gets used by char streams for many I/O
+ * operations. The char specialization provides a number of
+ * optimizations as well.
+ */
+ template<>
+ class ctype<char> : public locale::facet, public ctype_base
+ {
+ public:
+ // Types:
+ /// Typedef for the template parameter char.
+ typedef char char_type;
+
+ protected:
+ // Data Members:
+ __c_locale _M_c_locale_ctype;
+ bool _M_del;
+ __to_type _M_toupper;
+ __to_type _M_tolower;
+ const mask* _M_table;
+ mutable char _M_widen_ok;
+ mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
+ mutable char _M_narrow_ok; // 0 uninitialized, 1 init,
+ // 2 memcpy can't be used
+
+ public:
+ /// The facet id for ctype<char>
+ static locale::id id;
+ /// The size of the mask table. It is SCHAR_MAX + 1.
+ static const size_t table_size = 1 + static_cast<unsigned char>(-1);
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param table If non-zero, table is used as the per-char mask.
+ * Else classic_table() is used.
+ * @param del If true, passes ownership of table to this facet.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
+
+ /**
+ * @brief Constructor performs static initialization.
+ *
+ * This constructor is used to construct the initial C locale facet.
+ *
+ * @param cloc Handle to C locale data.
+ * @param table If non-zero, table is used as the per-char mask.
+ * @param del If true, passes ownership of table to this facet.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
+ size_t __refs = 0);
+
+ /**
+ * @brief Test char classification.
+ *
+ * This function compares the mask table[c] to @a m.
+ *
+ * @param c The char to compare the mask of.
+ * @param m The mask to compare against.
+ * @return True if m & table[c] is true, false otherwise.
+ */
+ inline bool
+ is(mask __m, char __c) const;
+
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each char in the range [lo, hi) and
+ * successively writes it to vec. vec must have as many elements as
+ * the char array.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
+ inline const char*
+ is(const char* __lo, const char* __hi, mask* __vec) const;
+
+ /**
+ * @brief Find char matching a mask
+ *
+ * This function searches for and returns the first char in [lo,hi) for
+ * which is(m,char) is true.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching char if found, else @a hi.
+ */
+ inline const char*
+ scan_is(mask __m, const char* __lo, const char* __hi) const;
+
+ /**
+ * @brief Find char not matching a mask
+ *
+ * This function searches for and returns a pointer to the first char
+ * in [lo,hi) for which is(m,char) is false.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching char if found, else @a hi.
+ */
+ inline const char*
+ scan_not(mask __m, const char* __lo, const char* __hi) const;
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This function converts the char argument to uppercase if possible.
+ * If not possible (for example, '2'), returns the argument.
+ *
+ * toupper() acts as if it returns ctype<char>::do_toupper(c).
+ * do_toupper() must always return the same result for the same input.
+ *
+ * @param c The char to convert.
+ * @return The uppercase char if convertible, else @a c.
+ */
+ char_type
+ toupper(char_type __c) const
+ { return this->do_toupper(__c); }
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This function converts each char in the range [lo,hi) to uppercase
+ * if possible. Other chars remain untouched.
+ *
+ * toupper() acts as if it returns ctype<char>:: do_toupper(lo, hi).
+ * do_toupper() must always return the same result for the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ toupper(char_type *__lo, const char_type* __hi) const
+ { return this->do_toupper(__lo, __hi); }
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This function converts the char argument to lowercase if possible.
+ * If not possible (for example, '2'), returns the argument.
+ *
+ * tolower() acts as if it returns ctype<char>::do_tolower(c).
+ * do_tolower() must always return the same result for the same input.
+ *
+ * @param c The char to convert.
+ * @return The lowercase char if convertible, else @a c.
+ */
+ char_type
+ tolower(char_type __c) const
+ { return this->do_tolower(__c); }
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This function converts each char in the range [lo,hi) to lowercase
+ * if possible. Other chars remain untouched.
+ *
+ * tolower() acts as if it returns ctype<char>:: do_tolower(lo, hi).
+ * do_tolower() must always return the same result for the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ const char_type*
+ tolower(char_type* __lo, const char_type* __hi) const
+ { return this->do_tolower(__lo, __hi); }
+
+ /**
+ * @brief Widen char
+ *
+ * This function converts the char to char_type using the simplest
+ * reasonable transformation. For an underived ctype<char> facet, the
+ * argument will be returned unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_widen(c).
+ * do_widen() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted character.
+ */
+ char_type
+ widen(char __c) const
+ {
+ if (_M_widen_ok)
+ return _M_widen[static_cast<unsigned char>(__c)];
+ this->_M_widen_init();
+ return this->do_widen(__c);
+ }
+
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the input to char using the
+ * simplest reasonable transformation. For an underived ctype<char>
+ * facet, the argument will be copied unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_widen(c).
+ * do_widen() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char*
+ widen(const char* __lo, const char* __hi, char_type* __to) const
+ {
+ if (_M_widen_ok == 1)
+ {
+ __builtin_memcpy(__to, __lo, __hi - __lo);
+ return __hi;
+ }
+ if (!_M_widen_ok)
+ _M_widen_init();
+ return this->do_widen(__lo, __hi, __to);
+ }
+
+ /**
+ * @brief Narrow char
+ *
+ * This function converts the char to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. For an underived ctype<char> facet, @a c
+ * will be returned unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_narrow(c).
+ * do_narrow() must always return the same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted character.
+ */
+ char
+ narrow(char_type __c, char __dfault) const
+ {
+ if (_M_narrow[static_cast<unsigned char>(__c)])
+ return _M_narrow[static_cast<unsigned char>(__c)];
+ const char __t = do_narrow(__c, __dfault);
+ if (__t != __dfault)
+ _M_narrow[static_cast<unsigned char>(__c)] = __t;
+ return __t;
+ }
+
+ /**
+ * @brief Narrow char array
+ *
+ * This function converts each char in the input to char using the
+ * simplest reasonable transformation and writes the results to the
+ * destination array. For any char in the input that cannot be
+ * converted, @a dfault is used instead. For an underived ctype<char>
+ * facet, the argument will be copied unchanged.
+ *
+ * This function works as if it returns ctype<char>::do_narrow(lo, hi,
+ * dfault, to). do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ const char_type*
+ narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char *__to) const
+ {
+ if (__builtin_expect(_M_narrow_ok == 1, true))
+ {
+ __builtin_memcpy(__to, __lo, __hi - __lo);
+ return __hi;
+ }
+ if (!_M_narrow_ok)
+ _M_narrow_init();
+ return this->do_narrow(__lo, __hi, __dfault, __to);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 695. ctype<char>::classic_table() not accessible.
+ /// Returns a pointer to the mask table provided to the constructor, or
+ /// the default from classic_table() if none was provided.
+ const mask*
+ table() const throw()
+ { return _M_table; }
+
+ /// Returns a pointer to the C locale mask table.
+ static const mask*
+ classic_table() throw();
+ protected:
+
+ /**
+ * @brief Destructor.
+ *
+ * This function deletes table() if @a del was true in the
+ * constructor.
+ */
+ virtual
+ ~ctype();
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the char argument to uppercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The char to convert.
+ * @return The uppercase char if convertible, else @a c.
+ */
+ virtual char_type
+ do_toupper(char_type) const;
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * uppercase if possible. Other chars remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const;
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the char argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The char to convert.
+ * @return The lowercase char if convertible, else @a c.
+ */
+ virtual char_type
+ do_tolower(char_type) const;
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * lowercase if possible. Other chars remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to first char in range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const;
+
+ /**
+ * @brief Widen char
+ *
+ * This virtual function converts the char to char using the simplest
+ * reasonable transformation. For an underived ctype<char> facet, the
+ * argument will be returned unchanged.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted character.
+ */
+ virtual char_type
+ do_widen(char __c) const
+ { return __c; }
+
+ /**
+ * @brief Widen char array
+ *
+ * This function converts each char in the range [lo,hi) to char using
+ * the simplest reasonable transformation. For an underived
+ * ctype<char> facet, the argument will be copied unchanged.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ {
+ __builtin_memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+
+ /**
+ * @brief Narrow char
+ *
+ * This virtual function converts the char to char using the simplest
+ * reasonable transformation. If the conversion fails, dfault is
+ * returned instead. For an underived ctype<char> facet, @a c will be
+ * returned unchanged.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
+ do_narrow(char_type __c, char) const
+ { return __c; }
+
+ /**
+ * @brief Narrow char array to char array
+ *
+ * This virtual function converts each char in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any char in the input that
+ * cannot be converted, @a dfault is used instead. For an underived
+ * ctype<char> facet, the argument will be copied unchanged.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char, char* __dest) const
+ {
+ __builtin_memcpy(__dest, __lo, __hi - __lo);
+ return __hi;
+ }
+
+ private:
+ void _M_narrow_init() const;
+ void _M_widen_init() const;
+ };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ // 22.2.1.3 ctype<wchar_t> specialization
+ /**
+ * @brief The ctype<wchar_t> specialization.
+ *
+ * This class defines classification and conversion functions for the
+ * wchar_t type. It gets used by wchar_t streams for many I/O operations.
+ * The wchar_t specialization provides a number of optimizations as well.
+ *
+ * ctype<wchar_t> inherits its public methods from
+ * __ctype_abstract_base<wchar_t>.
+ */
+ template<>
+ class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
+ {
+ public:
+ // Types:
+ /// Typedef for the template parameter wchar_t.
+ typedef wchar_t char_type;
+ typedef wctype_t __wmask_type;
+
+ protected:
+ __c_locale _M_c_locale_ctype;
+
+ // Pre-computed narrowed and widened chars.
+ bool _M_narrow_ok;
+ char _M_narrow[128];
+ wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
+
+ // Pre-computed elements for do_is.
+ mask _M_bit[16];
+ __wmask_type _M_wmask[16];
+
+ public:
+ // Data Members:
+ /// The facet id for ctype<wchar_t>
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ ctype(size_t __refs = 0);
+
+ /**
+ * @brief Constructor performs static initialization.
+ *
+ * This constructor is used to construct the initial C locale facet.
+ *
+ * @param cloc Handle to C locale data.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ ctype(__c_locale __cloc, size_t __refs = 0);
+
+ protected:
+ __wmask_type
+ _M_convert_to_wmask(const mask __m) const;
+
+ /// Destructor
+ virtual
+ ~ctype();
+
+ /**
+ * @brief Test wchar_t classification.
+ *
+ * This function finds a mask M for @a c and compares it to mask @a m.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param c The wchar_t to find the mask of.
+ * @param m The mask to compare against.
+ * @return (M & m) != 0.
+ */
+ virtual bool
+ do_is(mask __m, char_type __c) const;
+
+ /**
+ * @brief Return a mask array.
+ *
+ * This function finds the mask for each wchar_t in the range [lo,hi)
+ * and successively writes it to vec. vec must have as many elements
+ * as the input.
+ *
+ * do_is() is a hook for a derived facet to change the behavior of
+ * classifying. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param vec Pointer to an array of mask storage.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+ /**
+ * @brief Find wchar_t matching mask
+ *
+ * This function searches for and returns the first wchar_t c in
+ * [lo,hi) for which is(m,c) is true.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a matching wchar_t if found, else @a hi.
+ */
+ virtual const char_type*
+ do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+ /**
+ * @brief Find wchar_t not matching mask
+ *
+ * This function searches for and returns a pointer to the first
+ * wchar_t c of [lo,hi) for which is(m,c) is false.
+ *
+ * do_scan_is() is a hook for a derived facet to change the behavior of
+ * match searching. do_is() must always return the same result for the
+ * same input.
+ *
+ * @param m The mask to compare against.
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return Pointer to a non-matching wchar_t if found, else @a hi.
+ */
+ virtual const char_type*
+ do_scan_not(mask __m, const char_type* __lo,
+ const char_type* __hi) const;
+
+ /**
+ * @brief Convert to uppercase.
+ *
+ * This virtual function converts the wchar_t argument to uppercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param c The wchar_t to convert.
+ * @return The uppercase wchar_t if convertible, else @a c.
+ */
+ virtual char_type
+ do_toupper(char_type) const;
+
+ /**
+ * @brief Convert array to uppercase.
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * uppercase if possible. Other elements remain untouched.
+ *
+ * do_toupper() is a hook for a derived facet to change the behavior of
+ * uppercasing. do_toupper() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_toupper(char_type* __lo, const char_type* __hi) const;
+
+ /**
+ * @brief Convert to lowercase.
+ *
+ * This virtual function converts the argument to lowercase if
+ * possible. If not possible (for example, '2'), returns the argument.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param c The wchar_t to convert.
+ * @return The lowercase wchar_t if convertible, else @a c.
+ */
+ virtual char_type
+ do_tolower(char_type) const;
+
+ /**
+ * @brief Convert array to lowercase.
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * lowercase if possible. Other elements remain untouched.
+ *
+ * do_tolower() is a hook for a derived facet to change the behavior of
+ * lowercasing. do_tolower() must always return the same result for
+ * the same input.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_tolower(char_type* __lo, const char_type* __hi) const;
+
+ /**
+ * @brief Widen char to wchar_t
+ *
+ * This virtual function converts the char to wchar_t using the
+ * simplest reasonable transformation. For an underived ctype<wchar_t>
+ * facet, the argument will be cast to wchar_t.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The char to convert.
+ * @return The converted wchar_t.
+ */
+ virtual char_type
+ do_widen(char) const;
+
+ /**
+ * @brief Widen char array to wchar_t array
+ *
+ * This function converts each char in the input to wchar_t using the
+ * simplest reasonable transformation. For an underived ctype<wchar_t>
+ * facet, the argument will be copied, casting each element to wchar_t.
+ *
+ * do_widen() is a hook for a derived facet to change the behavior of
+ * widening. do_widen() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start range.
+ * @param hi Pointer to end of range.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char*
+ do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+ /**
+ * @brief Narrow wchar_t to char
+ *
+ * This virtual function converts the argument to char using
+ * the simplest reasonable transformation. If the conversion
+ * fails, dfault is returned instead. For an underived
+ * ctype<wchar_t> facet, @a c will be cast to char and
+ * returned.
+ *
+ * do_narrow() is a hook for a derived facet to change the
+ * behavior of narrowing. do_narrow() must always return the
+ * same result for the same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param c The wchar_t to convert.
+ * @param dfault Char to return if conversion fails.
+ * @return The converted char.
+ */
+ virtual char
+ do_narrow(char_type, char __dfault) const;
+
+ /**
+ * @brief Narrow wchar_t array to char array
+ *
+ * This virtual function converts each wchar_t in the range [lo,hi) to
+ * char using the simplest reasonable transformation and writes the
+ * results to the destination array. For any wchar_t in the input that
+ * cannot be converted, @a dfault is used instead. For an underived
+ * ctype<wchar_t> facet, the argument will be copied, casting each
+ * element to char.
+ *
+ * do_narrow() is a hook for a derived facet to change the behavior of
+ * narrowing. do_narrow() must always return the same result for the
+ * same input.
+ *
+ * Note: this is not what you want for codepage conversions. See
+ * codecvt for that.
+ *
+ * @param lo Pointer to start of range.
+ * @param hi Pointer to end of range.
+ * @param dfault Char to use if conversion fails.
+ * @param to Pointer to the destination array.
+ * @return @a hi.
+ */
+ virtual const char_type*
+ do_narrow(const char_type* __lo, const char_type* __hi,
+ char __dfault, char* __dest) const;
+
+ // For use at construction time only.
+ void
+ _M_initialize_ctype();
+ };
+#endif //_GLIBCXX_USE_WCHAR_T
+
+ /// class ctype_byname [22.2.1.2].
+ template<typename _CharT>
+ class ctype_byname : public ctype<_CharT>
+ {
+ public:
+ typedef typename ctype<_CharT>::mask mask;
+
+ explicit
+ ctype_byname(const char* __s, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~ctype_byname() { };
+ };
+
+ /// 22.2.1.4 Class ctype_byname specializations.
+ template<>
+ class ctype_byname<char> : public ctype<char>
+ {
+ public:
+ explicit
+ ctype_byname(const char* __s, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~ctype_byname();
+ };
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ class ctype_byname<wchar_t> : public ctype<wchar_t>
+ {
+ public:
+ explicit
+ ctype_byname(const char* __s, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~ctype_byname();
+ };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+// Include host and configuration specific ctype inlines.
+#include <bits/ctype_inline.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 22.2.2 The numeric category.
+ class __num_base
+ {
+ public:
+ // NB: Code depends on the order of _S_atoms_out elements.
+ // Below are the indices into _S_atoms_out.
+ enum
+ {
+ _S_ominus,
+ _S_oplus,
+ _S_ox,
+ _S_oX,
+ _S_odigits,
+ _S_odigits_end = _S_odigits + 16,
+ _S_oudigits = _S_odigits_end,
+ _S_oudigits_end = _S_oudigits + 16,
+ _S_oe = _S_odigits + 14, // For scientific notation, 'e'
+ _S_oE = _S_oudigits + 14, // For scientific notation, 'E'
+ _S_oend = _S_oudigits_end
+ };
+
+ // A list of valid numeric literals for output. This array
+ // contains chars that will be passed through the current locale's
+ // ctype<_CharT>.widen() and then used to render numbers.
+ // For the standard "C" locale, this is
+ // "-+xX0123456789abcdef0123456789ABCDEF".
+ static const char* _S_atoms_out;
+
+ // String literal of acceptable (narrow) input, for num_get.
+ // "-+xX0123456789abcdefABCDEF"
+ static const char* _S_atoms_in;
+
+ enum
+ {
+ _S_iminus,
+ _S_iplus,
+ _S_ix,
+ _S_iX,
+ _S_izero,
+ _S_ie = _S_izero + 14,
+ _S_iE = _S_izero + 20,
+ _S_iend = 26
+ };
+
+ // num_put
+ // Construct and return valid scanf format for floating point types.
+ static void
+ _S_format_float(const ios_base& __io, char* __fptr, char __mod);
+ };
+
+ template<typename _CharT>
+ struct __numpunct_cache : public locale::facet
+ {
+ const char* _M_grouping;
+ size_t _M_grouping_size;
+ bool _M_use_grouping;
+ const _CharT* _M_truename;
+ size_t _M_truename_size;
+ const _CharT* _M_falsename;
+ size_t _M_falsename_size;
+ _CharT _M_decimal_point;
+ _CharT _M_thousands_sep;
+
+ // A list of valid numeric literals for output: in the standard
+ // "C" locale, this is "-+xX0123456789abcdef0123456789ABCDEF".
+ // This array contains the chars after having been passed
+ // through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms_out[__num_base::_S_oend];
+
+ // A list of valid numeric literals for input: in the standard
+ // "C" locale, this is "-+xX0123456789abcdefABCDEF"
+ // This array contains the chars after having been passed
+ // through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms_in[__num_base::_S_iend];
+
+ bool _M_allocated;
+
+ __numpunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+ _M_truename(NULL), _M_truename_size(0), _M_falsename(NULL),
+ _M_falsename_size(0), _M_decimal_point(_CharT()),
+ _M_thousands_sep(_CharT()), _M_allocated(false)
+ { }
+
+ ~__numpunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __numpunct_cache&
+ operator=(const __numpunct_cache&);
+
+ explicit
+ __numpunct_cache(const __numpunct_cache&);
+ };
+
+ template<typename _CharT>
+ __numpunct_cache<_CharT>::~__numpunct_cache()
+ {
+ if (_M_allocated)
+ {
+ delete [] _M_grouping;
+ delete [] _M_truename;
+ delete [] _M_falsename;
+ }
+ }
+
+ /**
+ * @brief Numpunct facet.
+ *
+ * This facet stores several pieces of information related to printing and
+ * scanning numbers, such as the decimal point character. It takes a
+ * template parameter specifying the char type. The numpunct facet is
+ * used by streams for many I/O operations involving numbers.
+ *
+ * The numpunct template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from a numpunct facet.
+ */
+ template<typename _CharT>
+ class numpunct : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+ typedef __numpunct_cache<_CharT> __cache_type;
+
+ protected:
+ __cache_type* _M_data;
+
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Numpunct constructor.
+ *
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+ { _M_initialize_numpunct(); }
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up the
+ * predefined locale facets.
+ *
+ * @param cache __numpunct_cache object.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
+ { _M_initialize_numpunct(); }
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ numpunct(__c_locale __cloc, size_t __refs = 0)
+ : facet(__refs), _M_data(NULL)
+ { _M_initialize_numpunct(__cloc); }
+
+ /**
+ * @brief Return decimal point character.
+ *
+ * This function returns a char_type to use as a decimal point. It
+ * does so by returning returning
+ * numpunct<char_type>::do_decimal_point().
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ char_type
+ decimal_point() const
+ { return this->do_decimal_point(); }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * This function returns a char_type to use as a thousands
+ * separator. It does so by returning returning
+ * numpunct<char_type>::do_thousands_sep().
+ *
+ * @return char_type representing a thousands separator.
+ */
+ char_type
+ thousands_sep() const
+ { return this->do_thousands_sep(); }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * This function returns a string representing groupings for the
+ * integer part of a number. Groupings indicate where thousands
+ * separators should be inserted in the integer part of a number.
+ *
+ * Each char in the return string is interpret as an integer
+ * rather than a character. These numbers represent the number
+ * of digits in a group. The first char in the string
+ * represents the number of digits in the least significant
+ * group. If a char is negative, it indicates an unlimited
+ * number of digits for the group. If more chars from the
+ * string are required to group a number, the last char is used
+ * repeatedly.
+ *
+ * For example, if the grouping() returns "\003\002" and is
+ * applied to the number 123456789, this corresponds to
+ * 12,34,56,789. Note that if the string was "32", this would
+ * put more than 50 digits into the least significant group if
+ * the character set is ASCII.
+ *
+ * The string is returned by calling
+ * numpunct<char_type>::do_grouping().
+ *
+ * @return string representing grouping specification.
+ */
+ string
+ grouping() const
+ { return this->do_grouping(); }
+
+ /**
+ * @brief Return string representation of bool true.
+ *
+ * This function returns a string_type containing the text
+ * representation for true bool variables. It does so by calling
+ * numpunct<char_type>::do_truename().
+ *
+ * @return string_type representing printed form of true.
+ */
+ string_type
+ truename() const
+ { return this->do_truename(); }
+
+ /**
+ * @brief Return string representation of bool false.
+ *
+ * This function returns a string_type containing the text
+ * representation for false bool variables. It does so by calling
+ * numpunct<char_type>::do_falsename().
+ *
+ * @return string_type representing printed form of false.
+ */
+ string_type
+ falsename() const
+ { return this->do_falsename(); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~numpunct();
+
+ /**
+ * @brief Return decimal point character.
+ *
+ * Returns a char_type to use as a decimal point. This function is a
+ * hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ virtual char_type
+ do_decimal_point() const
+ { return _M_data->_M_decimal_point; }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * Returns a char_type to use as a thousands separator. This function
+ * is a hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a thousands separator.
+ */
+ virtual char_type
+ do_thousands_sep() const
+ { return _M_data->_M_thousands_sep; }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * Returns a string representing groupings for the integer part of a
+ * number. This function is a hook for derived classes to change the
+ * value returned. @see grouping() for details.
+ *
+ * @return String representing grouping specification.
+ */
+ virtual string
+ do_grouping() const
+ { return _M_data->_M_grouping; }
+
+ /**
+ * @brief Return string representation of bool true.
+ *
+ * Returns a string_type containing the text representation for true
+ * bool variables. This function is a hook for derived classes to
+ * change the value returned.
+ *
+ * @return string_type representing printed form of true.
+ */
+ virtual string_type
+ do_truename() const
+ { return _M_data->_M_truename; }
+
+ /**
+ * @brief Return string representation of bool false.
+ *
+ * Returns a string_type containing the text representation for false
+ * bool variables. This function is a hook for derived classes to
+ * change the value returned.
+ *
+ * @return string_type representing printed form of false.
+ */
+ virtual string_type
+ do_falsename() const
+ { return _M_data->_M_falsename; }
+
+ // For use at construction time only.
+ void
+ _M_initialize_numpunct(__c_locale __cloc = NULL);
+ };
+
+ template<typename _CharT>
+ locale::id numpunct<_CharT>::id;
+
+ template<>
+ numpunct<char>::~numpunct();
+
+ template<>
+ void
+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ numpunct<wchar_t>::~numpunct();
+
+ template<>
+ void
+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
+#endif
+
+ /// class numpunct_byname [22.2.3.2].
+ template<typename _CharT>
+ class numpunct_byname : public numpunct<_CharT>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+
+ explicit
+ numpunct_byname(const char* __s, size_t __refs = 0)
+ : numpunct<_CharT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ __c_locale __tmp;
+ this->_S_create_c_locale(__tmp, __s);
+ this->_M_initialize_numpunct(__tmp);
+ this->_S_destroy_c_locale(__tmp);
+ }
+ }
+
+ protected:
+ virtual
+ ~numpunct_byname() { }
+ };
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+ /**
+ * @brief Facet for parsing number strings.
+ *
+ * This facet encapsulates the code to parse and return a number
+ * from a string. It is used by the istream numeric extraction
+ * operators.
+ *
+ * The num_get template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the num_get facet.
+ */
+ template<typename _CharT, typename _InIter>
+ class num_get : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ num_get(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the bool @a v. It does so by calling
+ * num_get::do_get().
+ *
+ * If ios_base::boolalpha is set, attempts to read
+ * ctype<CharT>::truename() or ctype<CharT>::falsename(). Sets
+ * @a v to true or false if successful. Sets err to
+ * ios_base::failbit if reading the string fails. Sets err to
+ * ios_base::eofbit if the stream is emptied.
+ *
+ * If ios_base::boolalpha is not set, proceeds as with reading a long,
+ * except if the value is 1, sets @a v to true, if the value is 0, sets
+ * @a v to false, and otherwise set err to ios_base::failbit.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, bool& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the integral variable @a v. It does so
+ * by calling num_get::do_get().
+ *
+ * Parsing is affected by the flag settings in @a io.
+ *
+ * The basic parse is affected by the value of io.flags() &
+ * ios_base::basefield. If equal to ios_base::oct, parses like the
+ * scanf %o specifier. Else if equal to ios_base::hex, parses like %X
+ * specifier. Else if basefield equal to 0, parses like the %i
+ * specifier. Otherwise, parses like %d for signed and %u for unsigned
+ * types. The matching type length modifier is also used.
+ *
+ * Digit grouping is interpreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned short& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned int& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned long& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long long& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned long long& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+#endif
+ //@}
+
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the integral variable @a v. It does so
+ * by calling num_get::do_get().
+ *
+ * The input characters are parsed like the scanf %g specifier. The
+ * matching type length modifier is also used.
+ *
+ * The decimal point character used is numpunct::decimal_point().
+ * Digit grouping is interpreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, float& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, double& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long double& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+ //@}
+
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the pointer variable @a v. It does so
+ * by calling num_get::do_get().
+ *
+ * The input characters are parsed like the scanf %p specifier.
+ *
+ * Digit grouping is interpreted according to numpunct::grouping() and
+ * numpunct::thousands_sep(). If the pattern of digit groups isn't
+ * consistent, sets err to ios_base::failbit.
+ *
+ * Note that the digit grouping effect for pointers is a bit ambiguous
+ * in the standard and shouldn't be relied on. See DR 344.
+ *
+ * If parsing the string yields a valid value for @a v, @a v is set.
+ * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
+ * Sets err to ios_base::eofbit if the stream is emptied.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ iter_type
+ get(iter_type __in, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, void*& __v) const
+ { return this->do_get(__in, __end, __io, __err, __v); }
+
+ protected:
+ /// Destructor.
+ virtual ~num_get() { }
+
+ iter_type
+ _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ string&) const;
+
+ template<typename _ValueT>
+ iter_type
+ _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ _ValueT&) const;
+
+ template<typename _CharT2>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type
+ _M_find(const _CharT2*, size_t __len, _CharT2 __c) const
+ {
+ int __ret = -1;
+ if (__len <= 10)
+ {
+ if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len))
+ __ret = __c - _CharT2('0');
+ }
+ else
+ {
+ if (__c >= _CharT2('0') && __c <= _CharT2('9'))
+ __ret = __c - _CharT2('0');
+ else if (__c >= _CharT2('a') && __c <= _CharT2('f'))
+ __ret = 10 + (__c - _CharT2('a'));
+ else if (__c >= _CharT2('A') && __c <= _CharT2('F'))
+ __ret = 10 + (__c - _CharT2('A'));
+ }
+ return __ret;
+ }
+
+ template<typename _CharT2>
+ typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
+ int>::__type
+ _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
+ {
+ int __ret = -1;
+ const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
+ if (__q)
+ {
+ __ret = __q - __zero;
+ if (__ret > 15)
+ __ret -= 6;
+ }
+ return __ret;
+ }
+
+ //@{
+ /**
+ * @brief Numeric parsing.
+ *
+ * Parses the input stream into the variable @a v. This function is a
+ * hook for derived classes to change the value returned. @see get()
+ * for more details.
+ *
+ * @param in Start of input stream.
+ * @param end End of input stream.
+ * @param io Source of locale and flags.
+ * @param err Error flags to set.
+ * @param v Value to format and insert.
+ * @return Iterator after reading.
+ */
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
+
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned short& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned int& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned long& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long long& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+
+ virtual iter_type
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, unsigned long long& __v) const
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
+#endif
+
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ float&) const;
+
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ double&) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ double&) const;
+#else
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ long double&) const;
+#endif
+
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ void*&) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ long double&) const;
+#endif
+ //@}
+ };
+
+ template<typename _CharT, typename _InIter>
+ locale::id num_get<_CharT, _InIter>::id;
+
+
+ /**
+ * @brief Facet for converting numbers to strings.
+ *
+ * This facet encapsulates the code to convert a number to a string. It is
+ * used by the ostream numeric insertion operators.
+ *
+ * The num_put template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the num_put facet.
+ */
+ template<typename _CharT, typename _OutIter>
+ class num_put : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ num_put(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the boolean @a v and inserts it into a stream. It does so
+ * by calling num_put::do_put().
+ *
+ * If ios_base::boolalpha is set, writes ctype<CharT>::truename() or
+ * ctype<CharT>::falsename(). Otherwise formats @a v as an int.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the integral value @a v and inserts it into a
+ * stream. It does so by calling num_put::do_put().
+ *
+ * Formatting is affected by the flag settings in @a io.
+ *
+ * The basic format is affected by the value of io.flags() &
+ * ios_base::basefield. If equal to ios_base::oct, formats like the
+ * printf %o specifier. Else if equal to ios_base::hex, formats like
+ * %x or %X with ios_base::uppercase unset or set respectively.
+ * Otherwise, formats like %d, %ld, %lld for signed and %u, %lu, %llu
+ * for unsigned values. Note that if both oct and hex are set, neither
+ * will take effect.
+ *
+ * If ios_base::showpos is set, '+' is output before positive values.
+ * If ios_base::showbase is set, '0' precedes octal values (except 0)
+ * and '0[xX]' precedes hex values.
+ *
+ * Thousands separators are inserted according to numpunct::grouping()
+ * and numpunct::thousands_sep(). The decimal point character used is
+ * numpunct::decimal_point().
+ *
+ * If io.width() is non-zero, enough @a fill characters are inserted to
+ * make the result at least that wide. If
+ * (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+ * padded at the end. If ios_base::internal, then padding occurs
+ * immediately after either a '+' or '-' or after '0x' or '0X'.
+ * Otherwise, padding occurs at the beginning.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned long long __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+#endif
+ //@}
+
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the floating point value @a v and inserts it into a stream.
+ * It does so by calling num_put::do_put().
+ *
+ * Formatting is affected by the flag settings in @a io.
+ *
+ * The basic format is affected by the value of io.flags() &
+ * ios_base::floatfield. If equal to ios_base::fixed, formats like the
+ * printf %f specifier. Else if equal to ios_base::scientific, formats
+ * like %e or %E with ios_base::uppercase unset or set respectively.
+ * Otherwise, formats like %g or %G depending on uppercase. Note that
+ * if both fixed and scientific are set, the effect will also be like
+ * %g or %G.
+ *
+ * The output precision is given by io.precision(). This precision is
+ * capped at numeric_limits::digits10 + 2 (different for double and
+ * long double). The default precision is 6.
+ *
+ * If ios_base::showpos is set, '+' is output before positive values.
+ * If ios_base::showpoint is set, a decimal point will always be
+ * output.
+ *
+ * Thousands separators are inserted according to numpunct::grouping()
+ * and numpunct::thousands_sep(). The decimal point character used is
+ * numpunct::decimal_point().
+ *
+ * If io.width() is non-zero, enough @a fill characters are inserted to
+ * make the result at least that wide. If
+ * (io.flags() & ios_base::adjustfield) == ios_base::left, result is
+ * padded at the end. If ios_base::internal, then padding occurs
+ * immediately after either a '+' or '-' or after '0x' or '0X'.
+ * Otherwise, padding occurs at the beginning.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ long double __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+ //@}
+
+ /**
+ * @brief Numeric formatting.
+ *
+ * Formats the pointer value @a v and inserts it into a stream. It
+ * does so by calling num_put::do_put().
+ *
+ * This function formats @a v as an unsigned long with ios_base::hex
+ * and ios_base::showbase set.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __f, char_type __fill,
+ const void* __v) const
+ { return this->do_put(__s, __f, __fill, __v); }
+
+ protected:
+ template<typename _ValueT>
+ iter_type
+ _M_insert_float(iter_type, ios_base& __io, char_type __fill,
+ char __mod, _ValueT __v) const;
+
+ void
+ _M_group_float(const char* __grouping, size_t __grouping_size,
+ char_type __sep, const char_type* __p, char_type* __new,
+ char_type* __cs, int& __len) const;
+
+ template<typename _ValueT>
+ iter_type
+ _M_insert_int(iter_type, ios_base& __io, char_type __fill,
+ _ValueT __v) const;
+
+ void
+ _M_group_int(const char* __grouping, size_t __grouping_size,
+ char_type __sep, ios_base& __io, char_type* __new,
+ char_type* __cs, int& __len) const;
+
+ void
+ _M_pad(char_type __fill, streamsize __w, ios_base& __io,
+ char_type* __new, const char_type* __cs, int& __len) const;
+
+ /// Destructor.
+ virtual
+ ~num_put() { };
+
+ //@{
+ /**
+ * @brief Numeric formatting.
+ *
+ * These functions do the work of formatting numeric values and
+ * inserting them into a stream. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @param s Stream to write to.
+ * @param io Source of locale and flags.
+ * @param fill Char_type to use for filling.
+ * @param v Value to format and insert.
+ * @return Iterator after writing.
+ */
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
+
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
+ { return _M_insert_int(__s, __io, __fill, __v); }
+
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
+ unsigned long __v) const
+ { return _M_insert_int(__s, __io, __fill, __v); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
+ long long __v) const
+ { return _M_insert_int(__s, __io, __fill, __v); }
+
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
+ unsigned long long __v) const
+ { return _M_insert_int(__s, __io, __fill, __v); }
+#endif
+
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+#else
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
+
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
+ //@}
+ };
+
+ template <typename _CharT, typename _OutIter>
+ locale::id num_put<_CharT, _OutIter>::id;
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+ // Subclause convenience interfaces, inlines.
+ // NB: These are inline because, when used in a loop, some compilers
+ // can hoist the body out of the loop; then it's just as fast as the
+ // C is*() function.
+
+ /// Convenience interface to ctype.is(ctype_base::space, __c).
+ template<typename _CharT>
+ inline bool
+ isspace(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::print, __c).
+ template<typename _CharT>
+ inline bool
+ isprint(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::cntrl, __c).
+ template<typename _CharT>
+ inline bool
+ iscntrl(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::upper, __c).
+ template<typename _CharT>
+ inline bool
+ isupper(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::lower, __c).
+ template<typename _CharT>
+ inline bool
+ islower(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::alpha, __c).
+ template<typename _CharT>
+ inline bool
+ isalpha(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::digit, __c).
+ template<typename _CharT>
+ inline bool
+ isdigit(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::punct, __c).
+ template<typename _CharT>
+ inline bool
+ ispunct(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::xdigit, __c).
+ template<typename _CharT>
+ inline bool
+ isxdigit(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::alnum, __c).
+ template<typename _CharT>
+ inline bool
+ isalnum(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); }
+
+ /// Convenience interface to ctype.is(ctype_base::graph, __c).
+ template<typename _CharT>
+ inline bool
+ isgraph(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); }
+
+ /// Convenience interface to ctype.toupper(__c).
+ template<typename _CharT>
+ inline _CharT
+ toupper(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).toupper(__c); }
+
+ /// Convenience interface to ctype.tolower(__c).
+ template<typename _CharT>
+ inline _CharT
+ tolower(_CharT __c, const locale& __loc)
+ { return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_facets.tcc>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.tcc
new file mode 100644
index 0000000..ba8f398
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets.tcc
@@ -0,0 +1,1345 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _LOCALE_FACETS_TCC
+#define _LOCALE_FACETS_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Routine to access a cache for the facet. If the cache didn't
+ // exist before, it gets constructed on the fly.
+ template<typename _Facet>
+ struct __use_cache
+ {
+ const _Facet*
+ operator() (const locale& __loc) const;
+ };
+
+ // Specializations.
+ template<typename _CharT>
+ struct __use_cache<__numpunct_cache<_CharT> >
+ {
+ const __numpunct_cache<_CharT>*
+ operator() (const locale& __loc) const
+ {
+ const size_t __i = numpunct<_CharT>::id._M_id();
+ const locale::facet** __caches = __loc._M_impl->_M_caches;
+ if (!__caches[__i])
+ {
+ __numpunct_cache<_CharT>* __tmp = NULL;
+ __try
+ {
+ __tmp = new __numpunct_cache<_CharT>;
+ __tmp->_M_cache(__loc);
+ }
+ __catch(...)
+ {
+ delete __tmp;
+ __throw_exception_again;
+ }
+ __loc._M_impl->_M_install_cache(__tmp, __i);
+ }
+ return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]);
+ }
+ };
+
+ template<typename _CharT>
+ void
+ __numpunct_cache<_CharT>::_M_cache(const locale& __loc)
+ {
+ _M_allocated = true;
+
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+
+ _M_grouping_size = __np.grouping().size();
+ char* __grouping = new char[_M_grouping_size];
+ __np.grouping().copy(__grouping, _M_grouping_size);
+ _M_grouping = __grouping;
+ _M_use_grouping = (_M_grouping_size
+ && static_cast<signed char>(_M_grouping[0]) > 0
+ && (_M_grouping[0]
+ != __gnu_cxx::__numeric_traits<char>::__max));
+
+ _M_truename_size = __np.truename().size();
+ _CharT* __truename = new _CharT[_M_truename_size];
+ __np.truename().copy(__truename, _M_truename_size);
+ _M_truename = __truename;
+
+ _M_falsename_size = __np.falsename().size();
+ _CharT* __falsename = new _CharT[_M_falsename_size];
+ __np.falsename().copy(__falsename, _M_falsename_size);
+ _M_falsename = __falsename;
+
+ _M_decimal_point = __np.decimal_point();
+ _M_thousands_sep = __np.thousands_sep();
+
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+ __ct.widen(__num_base::_S_atoms_out,
+ __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out);
+ __ct.widen(__num_base::_S_atoms_in,
+ __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in);
+ }
+
+ // Used by both numeric and monetary facets.
+ // Check to make sure that the __grouping_tmp string constructed in
+ // money_get or num_get matches the canonical grouping for a given
+ // locale.
+ // __grouping_tmp is parsed L to R
+ // 1,222,444 == __grouping_tmp of "\1\3\3"
+ // __grouping is parsed R to L
+ // 1,222,444 == __grouping of "\3" == "\3\3\3"
+ bool
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp);
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
+ ios_base::iostate& __err, string& __xtrc) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_in;
+ char_type __c = char_type();
+
+ // True if __beg becomes equal to __end.
+ bool __testeof = __beg == __end;
+
+ // First check for sign.
+ if (!__testeof)
+ {
+ __c = *__beg;
+ const bool __plus = __c == __lit[__num_base::_S_iplus];
+ if ((__plus || __c == __lit[__num_base::_S_iminus])
+ && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ && !(__c == __lc->_M_decimal_point))
+ {
+ __xtrc += __plus ? '+' : '-';
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+ }
+
+ // Next, look for leading zeros.
+ bool __found_mantissa = false;
+ int __sep_pos = 0;
+ while (!__testeof)
+ {
+ if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ || __c == __lc->_M_decimal_point)
+ break;
+ else if (__c == __lit[__num_base::_S_izero])
+ {
+ if (!__found_mantissa)
+ {
+ __xtrc += '0';
+ __found_mantissa = true;
+ }
+ ++__sep_pos;
+
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+ else
+ break;
+ }
+
+ // Only need acceptable digits for floating point numbers.
+ bool __found_dec = false;
+ bool __found_sci = false;
+ string __found_grouping;
+ if (__lc->_M_use_grouping)
+ __found_grouping.reserve(32);
+ const char_type* __lit_zero = __lit + __num_base::_S_izero;
+
+ if (!__lc->_M_allocated)
+ // "C" locale
+ while (!__testeof)
+ {
+ const int __digit = _M_find(__lit_zero, 10, __c);
+ if (__digit != -1)
+ {
+ __xtrc += '0' + __digit;
+ __found_mantissa = true;
+ }
+ else if (__c == __lc->_M_decimal_point
+ && !__found_dec && !__found_sci)
+ {
+ __xtrc += '.';
+ __found_dec = true;
+ }
+ else if ((__c == __lit[__num_base::_S_ie]
+ || __c == __lit[__num_base::_S_iE])
+ && !__found_sci && __found_mantissa)
+ {
+ // Scientific notation.
+ __xtrc += 'e';
+ __found_sci = true;
+
+ // Remove optional plus or minus sign, if they exist.
+ if (++__beg != __end)
+ {
+ __c = *__beg;
+ const bool __plus = __c == __lit[__num_base::_S_iplus];
+ if (__plus || __c == __lit[__num_base::_S_iminus])
+ __xtrc += __plus ? '+' : '-';
+ else
+ continue;
+ }
+ else
+ {
+ __testeof = true;
+ break;
+ }
+ }
+ else
+ break;
+
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+ else
+ while (!__testeof)
+ {
+ // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+ // and decimal_point.
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ {
+ if (!__found_dec && !__found_sci)
+ {
+ // NB: Thousands separator at the beginning of a string
+ // is a no-no, as is two consecutive thousands separators.
+ if (__sep_pos)
+ {
+ __found_grouping += static_cast<char>(__sep_pos);
+ __sep_pos = 0;
+ }
+ else
+ {
+ // NB: __convert_to_v will not assign __v and will
+ // set the failbit.
+ __xtrc.clear();
+ break;
+ }
+ }
+ else
+ break;
+ }
+ else if (__c == __lc->_M_decimal_point)
+ {
+ if (!__found_dec && !__found_sci)
+ {
+ // If no grouping chars are seen, no grouping check
+ // is applied. Therefore __found_grouping is adjusted
+ // only if decimal_point comes after some thousands_sep.
+ if (__found_grouping.size())
+ __found_grouping += static_cast<char>(__sep_pos);
+ __xtrc += '.';
+ __found_dec = true;
+ }
+ else
+ break;
+ }
+ else
+ {
+ const char_type* __q =
+ __traits_type::find(__lit_zero, 10, __c);
+ if (__q)
+ {
+ __xtrc += '0' + (__q - __lit_zero);
+ __found_mantissa = true;
+ ++__sep_pos;
+ }
+ else if ((__c == __lit[__num_base::_S_ie]
+ || __c == __lit[__num_base::_S_iE])
+ && !__found_sci && __found_mantissa)
+ {
+ // Scientific notation.
+ if (__found_grouping.size() && !__found_dec)
+ __found_grouping += static_cast<char>(__sep_pos);
+ __xtrc += 'e';
+ __found_sci = true;
+
+ // Remove optional plus or minus sign, if they exist.
+ if (++__beg != __end)
+ {
+ __c = *__beg;
+ const bool __plus = __c == __lit[__num_base::_S_iplus];
+ if ((__plus || __c == __lit[__num_base::_S_iminus])
+ && !(__lc->_M_use_grouping
+ && __c == __lc->_M_thousands_sep)
+ && !(__c == __lc->_M_decimal_point))
+ __xtrc += __plus ? '+' : '-';
+ else
+ continue;
+ }
+ else
+ {
+ __testeof = true;
+ break;
+ }
+ }
+ else
+ break;
+ }
+
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+
+ // Digit grouping is checked. If grouping and found_grouping don't
+ // match, then get very very upset, and set failbit.
+ if (__found_grouping.size())
+ {
+ // Add the ending grouping if a decimal or 'e'/'E' wasn't found.
+ if (!__found_dec && !__found_sci)
+ __found_grouping += static_cast<char>(__sep_pos);
+
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __found_grouping))
+ __err = ios_base::failbit;
+ }
+
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ template<typename _ValueT>
+ _InIter
+ num_get<_CharT, _InIter>::
+ _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
+ ios_base::iostate& __err, _ValueT& __v) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ using __gnu_cxx::__add_unsigned;
+ typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_in;
+ char_type __c = char_type();
+
+ // NB: Iff __basefield == 0, __base can change based on contents.
+ const ios_base::fmtflags __basefield = __io.flags()
+ & ios_base::basefield;
+ const bool __oct = __basefield == ios_base::oct;
+ int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10);
+
+ // True if __beg becomes equal to __end.
+ bool __testeof = __beg == __end;
+
+ // First check for sign.
+ bool __negative = false;
+ if (!__testeof)
+ {
+ __c = *__beg;
+ __negative = __c == __lit[__num_base::_S_iminus];
+ if ((__negative || __c == __lit[__num_base::_S_iplus])
+ && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ && !(__c == __lc->_M_decimal_point))
+ {
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+ }
+
+ // Next, look for leading zeros and check required digits
+ // for base formats.
+ bool __found_zero = false;
+ int __sep_pos = 0;
+ while (!__testeof)
+ {
+ if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ || __c == __lc->_M_decimal_point)
+ break;
+ else if (__c == __lit[__num_base::_S_izero]
+ && (!__found_zero || __base == 10))
+ {
+ __found_zero = true;
+ ++__sep_pos;
+ if (__basefield == 0)
+ __base = 8;
+ if (__base == 8)
+ __sep_pos = 0;
+ }
+ else if (__found_zero
+ && (__c == __lit[__num_base::_S_ix]
+ || __c == __lit[__num_base::_S_iX]))
+ {
+ if (__basefield == 0)
+ __base = 16;
+ if (__base == 16)
+ {
+ __found_zero = false;
+ __sep_pos = 0;
+ }
+ else
+ break;
+ }
+ else
+ break;
+
+ if (++__beg != __end)
+ {
+ __c = *__beg;
+ if (!__found_zero)
+ break;
+ }
+ else
+ __testeof = true;
+ }
+
+ // At this point, base is determined. If not hex, only allow
+ // base digits as valid input.
+ const size_t __len = (__base == 16 ? __num_base::_S_iend
+ - __num_base::_S_izero : __base);
+
+ // Extract.
+ string __found_grouping;
+ if (__lc->_M_use_grouping)
+ __found_grouping.reserve(32);
+ bool __testfail = false;
+ bool __testoverflow = false;
+ const __unsigned_type __max =
+ (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+ ? -__gnu_cxx::__numeric_traits<_ValueT>::__min
+ : __gnu_cxx::__numeric_traits<_ValueT>::__max;
+ const __unsigned_type __smax = __max / __base;
+ __unsigned_type __result = 0;
+ int __digit = 0;
+ const char_type* __lit_zero = __lit + __num_base::_S_izero;
+
+ if (!__lc->_M_allocated)
+ // "C" locale
+ while (!__testeof)
+ {
+ __digit = _M_find(__lit_zero, __len, __c);
+ if (__digit == -1)
+ break;
+
+ if (__result > __smax)
+ __testoverflow = true;
+ else
+ {
+ __result *= __base;
+ __testoverflow |= __result > __max - __digit;
+ __result += __digit;
+ ++__sep_pos;
+ }
+
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+ else
+ while (!__testeof)
+ {
+ // According to 22.2.2.1.2, p8-9, first look for thousands_sep
+ // and decimal_point.
+ if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
+ {
+ // NB: Thousands separator at the beginning of a string
+ // is a no-no, as is two consecutive thousands separators.
+ if (__sep_pos)
+ {
+ __found_grouping += static_cast<char>(__sep_pos);
+ __sep_pos = 0;
+ }
+ else
+ {
+ __testfail = true;
+ break;
+ }
+ }
+ else if (__c == __lc->_M_decimal_point)
+ break;
+ else
+ {
+ const char_type* __q =
+ __traits_type::find(__lit_zero, __len, __c);
+ if (!__q)
+ break;
+
+ __digit = __q - __lit_zero;
+ if (__digit > 15)
+ __digit -= 6;
+ if (__result > __smax)
+ __testoverflow = true;
+ else
+ {
+ __result *= __base;
+ __testoverflow |= __result > __max - __digit;
+ __result += __digit;
+ ++__sep_pos;
+ }
+ }
+
+ if (++__beg != __end)
+ __c = *__beg;
+ else
+ __testeof = true;
+ }
+
+ // Digit grouping is checked. If grouping and found_grouping don't
+ // match, then get very very upset, and set failbit.
+ if (__found_grouping.size())
+ {
+ // Add the ending grouping.
+ __found_grouping += static_cast<char>(__sep_pos);
+
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __found_grouping))
+ __err = ios_base::failbit;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 23. Num_get overflow result.
+ if ((!__sep_pos && !__found_zero && !__found_grouping.size())
+ || __testfail)
+ {
+ __v = 0;
+ __err = ios_base::failbit;
+ }
+ else if (__testoverflow)
+ {
+ if (__negative
+ && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+ __v = __gnu_cxx::__numeric_traits<_ValueT>::__min;
+ else
+ __v = __gnu_cxx::__numeric_traits<_ValueT>::__max;
+ __err = ios_base::failbit;
+ }
+ else
+ __v = __negative ? -__result : __result;
+
+ if (__testeof)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 17. Bad bool parsing
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, bool& __v) const
+ {
+ if (!(__io.flags() & ios_base::boolalpha))
+ {
+ // Parse bool values as long.
+ // NB: We can't just call do_get(long) here, as it might
+ // refer to a derived class.
+ long __l = -1;
+ __beg = _M_extract_int(__beg, __end, __io, __err, __l);
+ if (__l == 0 || __l == 1)
+ __v = bool(__l);
+ else
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 23. Num_get overflow result.
+ __v = true;
+ __err = ios_base::failbit;
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ }
+ }
+ else
+ {
+ // Parse bool values as alphanumeric.
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+
+ bool __testf = true;
+ bool __testt = true;
+ bool __donef = __lc->_M_falsename_size == 0;
+ bool __donet = __lc->_M_truename_size == 0;
+ bool __testeof = false;
+ size_t __n = 0;
+ while (!__donef || !__donet)
+ {
+ if (__beg == __end)
+ {
+ __testeof = true;
+ break;
+ }
+
+ const char_type __c = *__beg;
+
+ if (!__donef)
+ __testf = __c == __lc->_M_falsename[__n];
+
+ if (!__testf && __donet)
+ break;
+
+ if (!__donet)
+ __testt = __c == __lc->_M_truename[__n];
+
+ if (!__testt && __donef)
+ break;
+
+ if (!__testt && !__testf)
+ break;
+
+ ++__n;
+ ++__beg;
+
+ __donef = !__testf || __n >= __lc->_M_falsename_size;
+ __donet = !__testt || __n >= __lc->_M_truename_size;
+ }
+ if (__testf && __n == __lc->_M_falsename_size && __n)
+ {
+ __v = false;
+ if (__testt && __n == __lc->_M_truename_size)
+ __err = ios_base::failbit;
+ else
+ __err = __testeof ? ios_base::eofbit : ios_base::goodbit;
+ }
+ else if (__testt && __n == __lc->_M_truename_size && __n)
+ {
+ __v = true;
+ __err = __testeof ? ios_base::eofbit : ios_base::goodbit;
+ }
+ else
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 23. Num_get overflow result.
+ __v = false;
+ __err = ios_base::failbit;
+ if (__testeof)
+ __err |= ios_base::eofbit;
+ }
+ }
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, float& __v) const
+ {
+ string __xtrc;
+ __xtrc.reserve(32);
+ __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, double& __v) const
+ {
+ string __xtrc;
+ __xtrc.reserve(32);
+ __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ __do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, double& __v) const
+ {
+ string __xtrc;
+ __xtrc.reserve(32);
+ __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+#endif
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, long double& __v) const
+ {
+ string __xtrc;
+ __xtrc.reserve(32);
+ __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, void*& __v) const
+ {
+ // Prepare for hex formatted input.
+ typedef ios_base::fmtflags fmtflags;
+ const fmtflags __fmt = __io.flags();
+ __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex);
+
+ typedef __gnu_cxx::__conditional_type<(sizeof(void*)
+ <= sizeof(unsigned long)),
+ unsigned long, unsigned long long>::__type _UIntPtrType;
+
+ _UIntPtrType __ul;
+ __beg = _M_extract_int(__beg, __end, __io, __err, __ul);
+
+ // Reset from hex formatted input.
+ __io.flags(__fmt);
+
+ __v = reinterpret_cast<void*>(__ul);
+ return __beg;
+ }
+
+ // For use by integer and floating-point types after they have been
+ // converted into a char_type string.
+ template<typename _CharT, typename _OutIter>
+ void
+ num_put<_CharT, _OutIter>::
+ _M_pad(_CharT __fill, streamsize __w, ios_base& __io,
+ _CharT* __new, const _CharT* __cs, int& __len) const
+ {
+ // [22.2.2.2.2] Stage 3.
+ // If necessary, pad.
+ __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new,
+ __cs, __w, __len);
+ __len = static_cast<int>(__w);
+ }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+ template<typename _CharT, typename _ValueT>
+ int
+ __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit,
+ ios_base::fmtflags __flags, bool __dec)
+ {
+ _CharT* __buf = __bufend;
+ if (__builtin_expect(__dec, true))
+ {
+ // Decimal.
+ do
+ {
+ *--__buf = __lit[(__v % 10) + __num_base::_S_odigits];
+ __v /= 10;
+ }
+ while (__v != 0);
+ }
+ else if ((__flags & ios_base::basefield) == ios_base::oct)
+ {
+ // Octal.
+ do
+ {
+ *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits];
+ __v >>= 3;
+ }
+ while (__v != 0);
+ }
+ else
+ {
+ // Hex.
+ const bool __uppercase = __flags & ios_base::uppercase;
+ const int __case_offset = __uppercase ? __num_base::_S_oudigits
+ : __num_base::_S_odigits;
+ do
+ {
+ *--__buf = __lit[(__v & 0xf) + __case_offset];
+ __v >>= 4;
+ }
+ while (__v != 0);
+ }
+ return __bufend - __buf;
+ }
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+ template<typename _CharT, typename _OutIter>
+ void
+ num_put<_CharT, _OutIter>::
+ _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep,
+ ios_base&, _CharT* __new, _CharT* __cs, int& __len) const
+ {
+ _CharT* __p = std::__add_grouping(__new, __sep, __grouping,
+ __grouping_size, __cs, __cs + __len);
+ __len = __p - __new;
+ }
+
+ template<typename _CharT, typename _OutIter>
+ template<typename _ValueT>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill,
+ _ValueT __v) const
+ {
+ using __gnu_cxx::__add_unsigned;
+ typedef typename __add_unsigned<_ValueT>::__type __unsigned_type;
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+ const _CharT* __lit = __lc->_M_atoms_out;
+ const ios_base::fmtflags __flags = __io.flags();
+
+ // Long enough to hold hex, dec, and octal representations.
+ const int __ilen = 5 * sizeof(_ValueT);
+ _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __ilen));
+
+ // [22.2.2.2.2] Stage 1, numeric conversion to character.
+ // Result is returned right-justified in the buffer.
+ const ios_base::fmtflags __basefield = __flags & ios_base::basefield;
+ const bool __dec = (__basefield != ios_base::oct
+ && __basefield != ios_base::hex);
+ const __unsigned_type __u = ((__v > 0 || !__dec)
+ ? __unsigned_type(__v)
+ : -__unsigned_type(__v));
+ int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec);
+ __cs += __ilen - __len;
+
+ // Add grouping, if necessary.
+ if (__lc->_M_use_grouping)
+ {
+ // Grouping can add (almost) as many separators as the number
+ // of digits + space is reserved for numeric base or sign.
+ _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * (__len + 1)
+ * 2));
+ _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size,
+ __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len);
+ __cs = __cs2 + 2;
+ }
+
+ // Complete Stage 1, prepend numeric base or sign.
+ if (__builtin_expect(__dec, true))
+ {
+ // Decimal.
+ if (__v >= 0)
+ {
+ if (bool(__flags & ios_base::showpos)
+ && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
+ *--__cs = __lit[__num_base::_S_oplus], ++__len;
+ }
+ else
+ *--__cs = __lit[__num_base::_S_ominus], ++__len;
+ }
+ else if (bool(__flags & ios_base::showbase) && __v)
+ {
+ if (__basefield == ios_base::oct)
+ *--__cs = __lit[__num_base::_S_odigits], ++__len;
+ else
+ {
+ // 'x' or 'X'
+ const bool __uppercase = __flags & ios_base::uppercase;
+ *--__cs = __lit[__num_base::_S_ox + __uppercase];
+ // '0'
+ *--__cs = __lit[__num_base::_S_odigits];
+ __len += 2;
+ }
+ }
+
+ // Pad.
+ const streamsize __w = __io.width();
+ if (__w > static_cast<streamsize>(__len))
+ {
+ _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
+ _M_pad(__fill, __w, __io, __cs3, __cs, __len);
+ __cs = __cs3;
+ }
+ __io.width(0);
+
+ // [22.2.2.2.2] Stage 4.
+ // Write resulting, fully-formatted string to output iterator.
+ return std::__write(__s, __cs, __len);
+ }
+
+ template<typename _CharT, typename _OutIter>
+ void
+ num_put<_CharT, _OutIter>::
+ _M_group_float(const char* __grouping, size_t __grouping_size,
+ _CharT __sep, const _CharT* __p, _CharT* __new,
+ _CharT* __cs, int& __len) const
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 282. What types does numpunct grouping refer to?
+ // Add grouping, if necessary.
+ const int __declen = __p ? __p - __cs : __len;
+ _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping,
+ __grouping_size,
+ __cs, __cs + __declen);
+
+ // Tack on decimal part.
+ int __newlen = __p2 - __new;
+ if (__p)
+ {
+ char_traits<_CharT>::copy(__p2, __p, __len - __declen);
+ __newlen += __len - __declen;
+ }
+ __len = __newlen;
+ }
+
+ // The following code uses vsnprintf (or vsprintf(), when
+ // _GLIBCXX_USE_C99 is not defined) to convert floating point values
+ // for insertion into a stream. An optimization would be to replace
+ // them with code that works directly on a wide buffer and then use
+ // __pad to do the padding. It would be good to replace them anyway
+ // to gain back the efficiency that C++ provides by knowing up front
+ // the type of the values to insert. Also, sprintf is dangerous
+ // since may lead to accidental buffer overruns. This
+ // implementation follows the C++ standard fairly directly as
+ // outlined in 22.2.2.2 [lib.locale.num.put]
+ template<typename _CharT, typename _OutIter>
+ template<typename _ValueT>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
+ _ValueT __v) const
+ {
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+
+ // Use default precision if out of range.
+ const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision();
+
+ const int __max_digits =
+ __gnu_cxx::__numeric_traits<_ValueT>::__digits10;
+
+ // [22.2.2.2.2] Stage 1, numeric conversion to character.
+ int __len;
+ // Long enough for the max format spec.
+ char __fbuf[16];
+ __num_base::_S_format_float(__io, __fbuf, __mod);
+
+#ifdef _GLIBCXX_USE_C99
+ // First try a buffer perhaps big enough (most probably sufficient
+ // for non-ios_base::fixed outputs)
+ int __cs_size = __max_digits * 3;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ __fbuf, __prec, __v);
+
+ // If the buffer was not large enough, try again with the correct size.
+ if (__len >= __cs_size)
+ {
+ __cs_size = __len + 1;
+ __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ __fbuf, __prec, __v);
+ }
+#else
+ // Consider the possibility of long ios_base::fixed outputs
+ const bool __fixed = __io.flags() & ios_base::fixed;
+ const int __max_exp =
+ __gnu_cxx::__numeric_traits<_ValueT>::__max_exponent10;
+
+ // The size of the output string is computed as follows.
+ // ios_base::fixed outputs may need up to __max_exp + 1 chars
+ // for the integer part + __prec chars for the fractional part
+ // + 3 chars for sign, decimal point, '\0'. On the other hand,
+ // for non-fixed outputs __max_digits * 2 + __prec chars are
+ // largely sufficient.
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
+ __prec, __v);
+#endif
+
+ // [22.2.2.2.2] Stage 2, convert to char_type, using correct
+ // numpunct.decimal_point() values for '.' and adding grouping.
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __len));
+ __ctype.widen(__cs, __cs + __len, __ws);
+
+ // Replace decimal point.
+ _CharT* __wp = 0;
+ const char* __p = char_traits<char>::find(__cs, __len, '.');
+ if (__p)
+ {
+ __wp = __ws + (__p - __cs);
+ *__wp = __lc->_M_decimal_point;
+ }
+
+ // Add grouping, if necessary.
+ // N.B. Make sure to not group things like 2e20, i.e., no decimal
+ // point, scientific notation.
+ if (__lc->_M_use_grouping
+ && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9'
+ && __cs[1] >= '0' && __cs[2] >= '0')))
+ {
+ // Grouping can add (almost) as many separators as the
+ // number of digits, but no more.
+ _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __len * 2));
+
+ streamsize __off = 0;
+ if (__cs[0] == '-' || __cs[0] == '+')
+ {
+ __off = 1;
+ __ws2[0] = __ws[0];
+ __len -= 1;
+ }
+
+ _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size,
+ __lc->_M_thousands_sep, __wp, __ws2 + __off,
+ __ws + __off, __len);
+ __len += __off;
+
+ __ws = __ws2;
+ }
+
+ // Pad.
+ const streamsize __w = __io.width();
+ if (__w > static_cast<streamsize>(__len))
+ {
+ _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __w));
+ _M_pad(__fill, __w, __io, __ws3, __ws, __len);
+ __ws = __ws3;
+ }
+ __io.width(0);
+
+ // [22.2.2.2.2] Stage 4.
+ // Write resulting, fully-formatted string to output iterator.
+ return std::__write(__s, __ws, __len);
+ }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
+ {
+ const ios_base::fmtflags __flags = __io.flags();
+ if ((__flags & ios_base::boolalpha) == 0)
+ {
+ const long __l = __v;
+ __s = _M_insert_int(__s, __io, __fill, __l);
+ }
+ else
+ {
+ typedef __numpunct_cache<_CharT> __cache_type;
+ __use_cache<__cache_type> __uc;
+ const locale& __loc = __io._M_getloc();
+ const __cache_type* __lc = __uc(__loc);
+
+ const _CharT* __name = __v ? __lc->_M_truename
+ : __lc->_M_falsename;
+ int __len = __v ? __lc->_M_truename_size
+ : __lc->_M_falsename_size;
+
+ const streamsize __w = __io.width();
+ if (__w > static_cast<streamsize>(__len))
+ {
+ const streamsize __plen = __w - __len;
+ _CharT* __ps
+ = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __plen));
+
+ char_traits<_CharT>::assign(__ps, __plen, __fill);
+ __io.width(0);
+
+ if ((__flags & ios_base::adjustfield) == ios_base::left)
+ {
+ __s = std::__write(__s, __name, __len);
+ __s = std::__write(__s, __ps, __plen);
+ }
+ else
+ {
+ __s = std::__write(__s, __ps, __plen);
+ __s = std::__write(__s, __name, __len);
+ }
+ return __s;
+ }
+ __io.width(0);
+ __s = std::__write(__s, __name, __len);
+ }
+ return __s;
+ }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+ { return _M_insert_float(__s, __io, __fill, char(), __v); }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+ { return _M_insert_float(__s, __io, __fill, char(), __v); }
+#endif
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
+ long double __v) const
+ { return _M_insert_float(__s, __io, __fill, 'L', __v); }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type __fill,
+ const void* __v) const
+ {
+ const ios_base::fmtflags __flags = __io.flags();
+ const ios_base::fmtflags __fmt = ~(ios_base::basefield
+ | ios_base::uppercase);
+ __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase));
+
+ typedef __gnu_cxx::__conditional_type<(sizeof(const void*)
+ <= sizeof(unsigned long)),
+ unsigned long, unsigned long long>::__type _UIntPtrType;
+
+ __s = _M_insert_int(__s, __io, __fill,
+ reinterpret_cast<_UIntPtrType>(__v));
+ __io.flags(__flags);
+ return __s;
+ }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+ // Construct correctly padded string, as per 22.2.2.2.2
+ // Assumes
+ // __newlen > __oldlen
+ // __news is allocated for __newlen size
+
+ // NB: Of the two parameters, _CharT can be deduced from the
+ // function arguments. The other (_Traits) has to be explicitly specified.
+ template<typename _CharT, typename _Traits>
+ void
+ __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill,
+ _CharT* __news, const _CharT* __olds,
+ streamsize __newlen, streamsize __oldlen)
+ {
+ const size_t __plen = static_cast<size_t>(__newlen - __oldlen);
+ const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
+
+ // Padding last.
+ if (__adjust == ios_base::left)
+ {
+ _Traits::copy(__news, __olds, __oldlen);
+ _Traits::assign(__news + __oldlen, __plen, __fill);
+ return;
+ }
+
+ size_t __mod = 0;
+ if (__adjust == ios_base::internal)
+ {
+ // Pad after the sign, if there is one.
+ // Pad after 0[xX], if there is one.
+ // Who came up with these rules, anyway? Jeeze.
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ if (__ctype.widen('-') == __olds[0]
+ || __ctype.widen('+') == __olds[0])
+ {
+ __news[0] = __olds[0];
+ __mod = 1;
+ ++__news;
+ }
+ else if (__ctype.widen('0') == __olds[0]
+ && __oldlen > 1
+ && (__ctype.widen('x') == __olds[1]
+ || __ctype.widen('X') == __olds[1]))
+ {
+ __news[0] = __olds[0];
+ __news[1] = __olds[1];
+ __mod = 2;
+ __news += 2;
+ }
+ // else Padding first.
+ }
+ _Traits::assign(__news, __plen, __fill);
+ _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod);
+ }
+
+ template<typename _CharT>
+ _CharT*
+ __add_grouping(_CharT* __s, _CharT __sep,
+ const char* __gbeg, size_t __gsize,
+ const _CharT* __first, const _CharT* __last)
+ {
+ size_t __idx = 0;
+ size_t __ctr = 0;
+
+ while (__last - __first > __gbeg[__idx]
+ && static_cast<signed char>(__gbeg[__idx]) > 0
+ && __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max)
+ {
+ __last -= __gbeg[__idx];
+ __idx < __gsize - 1 ? ++__idx : ++__ctr;
+ }
+
+ while (__first != __last)
+ *__s++ = *__first++;
+
+ while (__ctr--)
+ {
+ *__s++ = __sep;
+ for (char __i = __gbeg[__idx]; __i > 0; --__i)
+ *__s++ = *__first++;
+ }
+
+ while (__idx--)
+ {
+ *__s++ = __sep;
+ for (char __i = __gbeg[__idx]; __i > 0; --__i)
+ *__s++ = *__first++;
+ }
+
+ return __s;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class numpunct<char>;
+ extern template class numpunct_byname<char>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE num_get<char>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE num_put<char>;
+ extern template class ctype_byname<char>;
+
+ extern template
+ const ctype<char>&
+ use_facet<ctype<char> >(const locale&);
+
+ extern template
+ const numpunct<char>&
+ use_facet<numpunct<char> >(const locale&);
+
+ extern template
+ const num_put<char>&
+ use_facet<num_put<char> >(const locale&);
+
+ extern template
+ const num_get<char>&
+ use_facet<num_get<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<ctype<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<numpunct<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<num_put<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<num_get<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class numpunct<wchar_t>;
+ extern template class numpunct_byname<wchar_t>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE num_get<wchar_t>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE num_put<wchar_t>;
+ extern template class ctype_byname<wchar_t>;
+
+ extern template
+ const ctype<wchar_t>&
+ use_facet<ctype<wchar_t> >(const locale&);
+
+ extern template
+ const numpunct<wchar_t>&
+ use_facet<numpunct<wchar_t> >(const locale&);
+
+ extern template
+ const num_put<wchar_t>&
+ use_facet<num_put<wchar_t> >(const locale&);
+
+ extern template
+ const num_get<wchar_t>&
+ use_facet<num_get<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<ctype<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<numpunct<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<num_put<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<num_get<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.h
new file mode 100644
index 0000000..aba96d6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.h
@@ -0,0 +1,1914 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets_nonio.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#ifndef _LOCALE_FACETS_NONIO_H
+#define _LOCALE_FACETS_NONIO_H 1
+
+#pragma GCC system_header
+
+#include <ctime> // For struct tm
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Time format ordering data.
+ *
+ * This class provides an enum representing different orderings of day,
+ * month, and year.
+ */
+ class time_base
+ {
+ public:
+ enum dateorder { no_order, dmy, mdy, ymd, ydm };
+ };
+
+ template<typename _CharT>
+ struct __timepunct_cache : public locale::facet
+ {
+ // List of all known timezones, with GMT first.
+ static const _CharT* _S_timezones[14];
+
+ const _CharT* _M_date_format;
+ const _CharT* _M_date_era_format;
+ const _CharT* _M_time_format;
+ const _CharT* _M_time_era_format;
+ const _CharT* _M_date_time_format;
+ const _CharT* _M_date_time_era_format;
+ const _CharT* _M_am;
+ const _CharT* _M_pm;
+ const _CharT* _M_am_pm_format;
+
+ // Day names, starting with "C"'s Sunday.
+ const _CharT* _M_day1;
+ const _CharT* _M_day2;
+ const _CharT* _M_day3;
+ const _CharT* _M_day4;
+ const _CharT* _M_day5;
+ const _CharT* _M_day6;
+ const _CharT* _M_day7;
+
+ // Abbreviated day names, starting with "C"'s Sun.
+ const _CharT* _M_aday1;
+ const _CharT* _M_aday2;
+ const _CharT* _M_aday3;
+ const _CharT* _M_aday4;
+ const _CharT* _M_aday5;
+ const _CharT* _M_aday6;
+ const _CharT* _M_aday7;
+
+ // Month names, starting with "C"'s January.
+ const _CharT* _M_month01;
+ const _CharT* _M_month02;
+ const _CharT* _M_month03;
+ const _CharT* _M_month04;
+ const _CharT* _M_month05;
+ const _CharT* _M_month06;
+ const _CharT* _M_month07;
+ const _CharT* _M_month08;
+ const _CharT* _M_month09;
+ const _CharT* _M_month10;
+ const _CharT* _M_month11;
+ const _CharT* _M_month12;
+
+ // Abbreviated month names, starting with "C"'s Jan.
+ const _CharT* _M_amonth01;
+ const _CharT* _M_amonth02;
+ const _CharT* _M_amonth03;
+ const _CharT* _M_amonth04;
+ const _CharT* _M_amonth05;
+ const _CharT* _M_amonth06;
+ const _CharT* _M_amonth07;
+ const _CharT* _M_amonth08;
+ const _CharT* _M_amonth09;
+ const _CharT* _M_amonth10;
+ const _CharT* _M_amonth11;
+ const _CharT* _M_amonth12;
+
+ bool _M_allocated;
+
+ __timepunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_date_format(NULL), _M_date_era_format(NULL), _M_time_format(NULL),
+ _M_time_era_format(NULL), _M_date_time_format(NULL),
+ _M_date_time_era_format(NULL), _M_am(NULL), _M_pm(NULL),
+ _M_am_pm_format(NULL), _M_day1(NULL), _M_day2(NULL), _M_day3(NULL),
+ _M_day4(NULL), _M_day5(NULL), _M_day6(NULL), _M_day7(NULL),
+ _M_aday1(NULL), _M_aday2(NULL), _M_aday3(NULL), _M_aday4(NULL),
+ _M_aday5(NULL), _M_aday6(NULL), _M_aday7(NULL), _M_month01(NULL),
+ _M_month02(NULL), _M_month03(NULL), _M_month04(NULL), _M_month05(NULL),
+ _M_month06(NULL), _M_month07(NULL), _M_month08(NULL), _M_month09(NULL),
+ _M_month10(NULL), _M_month11(NULL), _M_month12(NULL), _M_amonth01(NULL),
+ _M_amonth02(NULL), _M_amonth03(NULL), _M_amonth04(NULL),
+ _M_amonth05(NULL), _M_amonth06(NULL), _M_amonth07(NULL),
+ _M_amonth08(NULL), _M_amonth09(NULL), _M_amonth10(NULL),
+ _M_amonth11(NULL), _M_amonth12(NULL), _M_allocated(false)
+ { }
+
+ ~__timepunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __timepunct_cache&
+ operator=(const __timepunct_cache&);
+
+ explicit
+ __timepunct_cache(const __timepunct_cache&);
+ };
+
+ template<typename _CharT>
+ __timepunct_cache<_CharT>::~__timepunct_cache()
+ {
+ if (_M_allocated)
+ {
+ // Unused.
+ }
+ }
+
+ // Specializations.
+ template<>
+ const char*
+ __timepunct_cache<char>::_S_timezones[14];
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ const wchar_t*
+ __timepunct_cache<wchar_t>::_S_timezones[14];
+#endif
+
+ // Generic.
+ template<typename _CharT>
+ const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];
+
+ template<typename _CharT>
+ class __timepunct : public locale::facet
+ {
+ public:
+ // Types:
+ typedef _CharT __char_type;
+ typedef basic_string<_CharT> __string_type;
+ typedef __timepunct_cache<_CharT> __cache_type;
+
+ protected:
+ __cache_type* _M_data;
+ __c_locale _M_c_locale_timepunct;
+ const char* _M_name_timepunct;
+
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ explicit
+ __timepunct(size_t __refs = 0);
+
+ explicit
+ __timepunct(__cache_type* __cache, size_t __refs = 0);
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0);
+
+ // FIXME: for error checking purposes _M_put should return the return
+ // value of strftime/wcsftime.
+ void
+ _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format,
+ const tm* __tm) const;
+
+ void
+ _M_date_formats(const _CharT** __date) const
+ {
+ // Always have default first.
+ __date[0] = _M_data->_M_date_format;
+ __date[1] = _M_data->_M_date_era_format;
+ }
+
+ void
+ _M_time_formats(const _CharT** __time) const
+ {
+ // Always have default first.
+ __time[0] = _M_data->_M_time_format;
+ __time[1] = _M_data->_M_time_era_format;
+ }
+
+ void
+ _M_date_time_formats(const _CharT** __dt) const
+ {
+ // Always have default first.
+ __dt[0] = _M_data->_M_date_time_format;
+ __dt[1] = _M_data->_M_date_time_era_format;
+ }
+
+ void
+ _M_am_pm_format(const _CharT* __ampm) const
+ { __ampm = _M_data->_M_am_pm_format; }
+
+ void
+ _M_am_pm(const _CharT** __ampm) const
+ {
+ __ampm[0] = _M_data->_M_am;
+ __ampm[1] = _M_data->_M_pm;
+ }
+
+ void
+ _M_days(const _CharT** __days) const
+ {
+ __days[0] = _M_data->_M_day1;
+ __days[1] = _M_data->_M_day2;
+ __days[2] = _M_data->_M_day3;
+ __days[3] = _M_data->_M_day4;
+ __days[4] = _M_data->_M_day5;
+ __days[5] = _M_data->_M_day6;
+ __days[6] = _M_data->_M_day7;
+ }
+
+ void
+ _M_days_abbreviated(const _CharT** __days) const
+ {
+ __days[0] = _M_data->_M_aday1;
+ __days[1] = _M_data->_M_aday2;
+ __days[2] = _M_data->_M_aday3;
+ __days[3] = _M_data->_M_aday4;
+ __days[4] = _M_data->_M_aday5;
+ __days[5] = _M_data->_M_aday6;
+ __days[6] = _M_data->_M_aday7;
+ }
+
+ void
+ _M_months(const _CharT** __months) const
+ {
+ __months[0] = _M_data->_M_month01;
+ __months[1] = _M_data->_M_month02;
+ __months[2] = _M_data->_M_month03;
+ __months[3] = _M_data->_M_month04;
+ __months[4] = _M_data->_M_month05;
+ __months[5] = _M_data->_M_month06;
+ __months[6] = _M_data->_M_month07;
+ __months[7] = _M_data->_M_month08;
+ __months[8] = _M_data->_M_month09;
+ __months[9] = _M_data->_M_month10;
+ __months[10] = _M_data->_M_month11;
+ __months[11] = _M_data->_M_month12;
+ }
+
+ void
+ _M_months_abbreviated(const _CharT** __months) const
+ {
+ __months[0] = _M_data->_M_amonth01;
+ __months[1] = _M_data->_M_amonth02;
+ __months[2] = _M_data->_M_amonth03;
+ __months[3] = _M_data->_M_amonth04;
+ __months[4] = _M_data->_M_amonth05;
+ __months[5] = _M_data->_M_amonth06;
+ __months[6] = _M_data->_M_amonth07;
+ __months[7] = _M_data->_M_amonth08;
+ __months[8] = _M_data->_M_amonth09;
+ __months[9] = _M_data->_M_amonth10;
+ __months[10] = _M_data->_M_amonth11;
+ __months[11] = _M_data->_M_amonth12;
+ }
+
+ protected:
+ virtual
+ ~__timepunct();
+
+ // For use at construction time only.
+ void
+ _M_initialize_timepunct(__c_locale __cloc = NULL);
+ };
+
+ template<typename _CharT>
+ locale::id __timepunct<_CharT>::id;
+
+ // Specializations.
+ template<>
+ void
+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc);
+
+ template<>
+ void
+ __timepunct<char>::_M_put(char*, size_t, const char*, const tm*) const;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ void
+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc);
+
+ template<>
+ void
+ __timepunct<wchar_t>::_M_put(wchar_t*, size_t, const wchar_t*,
+ const tm*) const;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+ // Include host and configuration specific timepunct functions.
+ #include <bits/time_members.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Facet for parsing dates and times.
+ *
+ * This facet encapsulates the code to parse and return a date or
+ * time from a string. It is used by the istream numeric
+ * extraction operators.
+ *
+ * The time_get template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the time_get facet.
+ */
+ template<typename _CharT, typename _InIter>
+ class time_get : public locale::facet, public time_base
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ //@}
+ typedef basic_string<_CharT> __string_type;
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ time_get(size_t __refs = 0)
+ : facet (__refs) { }
+
+ /**
+ * @brief Return preferred order of month, day, and year.
+ *
+ * This function returns an enum from timebase::dateorder giving the
+ * preferred ordering if the format "x" given to time_put::put() only
+ * uses month, day, and year. If the format "x" for the associated
+ * locale uses other fields, this function returns
+ * timebase::dateorder::noorder.
+ *
+ * NOTE: The library always returns noorder at the moment.
+ *
+ * @return A member of timebase::dateorder.
+ */
+ dateorder
+ date_order() const
+ { return this->do_date_order(); }
+
+ /**
+ * @brief Parse input time string.
+ *
+ * This function parses a time according to the format "x" and puts the
+ * results into a user-supplied struct tm. The result is returned by
+ * calling time_get::do_get_time().
+ *
+ * If there is a valid time string according to format "x", @a tm will
+ * be filled in accordingly and the returned iterator will point to the
+ * first character beyond the time string. If an error occurs before
+ * the end, err |= ios_base::failbit. If parsing reads all the
+ * characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond time string.
+ */
+ iter_type
+ get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_time(__beg, __end, __io, __err, __tm); }
+
+ /**
+ * @brief Parse input date string.
+ *
+ * This function parses a date according to the format "X" and puts the
+ * results into a user-supplied struct tm. The result is returned by
+ * calling time_get::do_get_date().
+ *
+ * If there is a valid date string according to format "X", @a tm will
+ * be filled in accordingly and the returned iterator will point to the
+ * first character beyond the date string. If an error occurs before
+ * the end, err |= ios_base::failbit. If parsing reads all the
+ * characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond date string.
+ */
+ iter_type
+ get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_date(__beg, __end, __io, __err, __tm); }
+
+ /**
+ * @brief Parse input weekday string.
+ *
+ * This function parses a weekday name and puts the results into a
+ * user-supplied struct tm. The result is returned by calling
+ * time_get::do_get_weekday().
+ *
+ * Parsing starts by parsing an abbreviated weekday name. If a valid
+ * abbreviation is followed by a character that would lead to the full
+ * weekday name, parsing continues until the full name is found or an
+ * error occurs. Otherwise parsing finishes at the end of the
+ * abbreviated name.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond weekday name.
+ */
+ iter_type
+ get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
+
+ /**
+ * @brief Parse input month string.
+ *
+ * This function parses a month name and puts the results into a
+ * user-supplied struct tm. The result is returned by calling
+ * time_get::do_get_monthname().
+ *
+ * Parsing starts by parsing an abbreviated month name. If a valid
+ * abbreviation is followed by a character that would lead to the full
+ * month name, parsing continues until the full name is found or an
+ * error occurs. Otherwise parsing finishes at the end of the
+ * abbreviated name.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |=
+ * ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond month name.
+ */
+ iter_type
+ get_monthname(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
+
+ /**
+ * @brief Parse input year string.
+ *
+ * This function reads up to 4 characters to parse a year string and
+ * puts the results into a user-supplied struct tm. The result is
+ * returned by calling time_get::do_get_year().
+ *
+ * 4 consecutive digits are interpreted as a full year. If there are
+ * exactly 2 consecutive digits, the library interprets this as the
+ * number of years since 1900.
+ *
+ * If an error occurs before the end, err |= ios_base::failbit. If
+ * parsing reads all the characters, err |= ios_base::eofbit.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond year.
+ */
+ iter_type
+ get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ { return this->do_get_year(__beg, __end, __io, __err, __tm); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~time_get() { }
+
+ /**
+ * @brief Return preferred order of month, day, and year.
+ *
+ * This function returns an enum from timebase::dateorder giving the
+ * preferred ordering if the format "x" given to time_put::put() only
+ * uses month, day, and year. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @return A member of timebase::dateorder.
+ */
+ virtual dateorder
+ do_date_order() const;
+
+ /**
+ * @brief Parse input time string.
+ *
+ * This function parses a time according to the format "x" and puts the
+ * results into a user-supplied struct tm. This function is a hook for
+ * derived classes to change the value returned. @see get_time() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond time string.
+ */
+ virtual iter_type
+ do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+
+ /**
+ * @brief Parse input date string.
+ *
+ * This function parses a date according to the format "X" and puts the
+ * results into a user-supplied struct tm. This function is a hook for
+ * derived classes to change the value returned. @see get_date() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond date string.
+ */
+ virtual iter_type
+ do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+
+ /**
+ * @brief Parse input weekday string.
+ *
+ * This function parses a weekday name and puts the results into a
+ * user-supplied struct tm. This function is a hook for derived
+ * classes to change the value returned. @see get_weekday() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond weekday name.
+ */
+ virtual iter_type
+ do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
+ ios_base::iostate& __err, tm* __tm) const;
+
+ /**
+ * @brief Parse input month string.
+ *
+ * This function parses a month name and puts the results into a
+ * user-supplied struct tm. This function is a hook for derived
+ * classes to change the value returned. @see get_monthname() for
+ * details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond month name.
+ */
+ virtual iter_type
+ do_get_monthname(iter_type __beg, iter_type __end, ios_base&,
+ ios_base::iostate& __err, tm* __tm) const;
+
+ /**
+ * @brief Parse input year string.
+ *
+ * This function reads up to 4 characters to parse a year string and
+ * puts the results into a user-supplied struct tm. This function is a
+ * hook for derived classes to change the value returned. @see
+ * get_year() for details.
+ *
+ * @param beg Start of string to parse.
+ * @param end End of string to parse.
+ * @param io Source of the locale.
+ * @param err Error flags to set.
+ * @param tm Pointer to struct tm to fill in.
+ * @return Iterator to first char beyond year.
+ */
+ virtual iter_type
+ do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const;
+
+ // Extract numeric component of length __len.
+ iter_type
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+ int __min, int __max, size_t __len,
+ ios_base& __io, ios_base::iostate& __err) const;
+
+ // Extract day or month name, or any unique array of string
+ // literals in a const _CharT* array.
+ iter_type
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const;
+
+ // Extract on a component-by-component basis, via __format argument.
+ iter_type
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
+ const _CharT* __format) const;
+ };
+
+ template<typename _CharT, typename _InIter>
+ locale::id time_get<_CharT, _InIter>::id;
+
+ /// class time_get_byname [22.2.5.2].
+ template<typename _CharT, typename _InIter>
+ class time_get_byname : public time_get<_CharT, _InIter>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+
+ explicit
+ time_get_byname(const char*, size_t __refs = 0)
+ : time_get<_CharT, _InIter>(__refs) { }
+
+ protected:
+ virtual
+ ~time_get_byname() { }
+ };
+
+ /**
+ * @brief Facet for outputting dates and times.
+ *
+ * This facet encapsulates the code to format and output dates and times
+ * according to formats used by strftime().
+ *
+ * The time_put template uses protected virtual functions to provide the
+ * actual results. The public accessors forward the call to the virtual
+ * functions. These virtual functions are hooks for developers to
+ * implement the behavior they require from the time_put facet.
+ */
+ template<typename _CharT, typename _OutIter>
+ class time_put : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ time_put(size_t __refs = 0)
+ : facet(__refs) { }
+
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format string. The format string is interpreted as by
+ * strftime().
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param beg Start of format string.
+ * @param end End of format string.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ const _CharT* __beg, const _CharT* __end) const;
+
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format char and optional modifier. The format and modifier
+ * are interpreted as by strftime(). It does so by returning
+ * time_put::do_put().
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param format Format char.
+ * @param mod Optional modifier char.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, ios_base& __io, char_type __fill,
+ const tm* __tm, char __format, char __mod = 0) const
+ { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~time_put()
+ { }
+
+ /**
+ * @brief Format and output a time or date.
+ *
+ * This function formats the data in struct tm according to the
+ * provided format char and optional modifier. This function is a hook
+ * for derived classes to change the value returned. @see put() for
+ * more details.
+ *
+ * @param s The stream to write to.
+ * @param io Source of locale.
+ * @param fill char_type to use for padding.
+ * @param tm Struct tm with date and time info to format.
+ * @param format Format char.
+ * @param mod Optional modifier char.
+ * @return Iterator after writing.
+ */
+ virtual iter_type
+ do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ char __format, char __mod) const;
+ };
+
+ template<typename _CharT, typename _OutIter>
+ locale::id time_put<_CharT, _OutIter>::id;
+
+ /// class time_put_byname [22.2.5.4].
+ template<typename _CharT, typename _OutIter>
+ class time_put_byname : public time_put<_CharT, _OutIter>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+
+ explicit
+ time_put_byname(const char*, size_t __refs = 0)
+ : time_put<_CharT, _OutIter>(__refs)
+ { };
+
+ protected:
+ virtual
+ ~time_put_byname() { }
+ };
+
+
+ /**
+ * @brief Money format ordering data.
+ *
+ * This class contains an ordered array of 4 fields to represent the
+ * pattern for formatting a money amount. Each field may contain one entry
+ * from the part enum. symbol, sign, and value must be present and the
+ * remaining field must contain either none or space. @see
+ * moneypunct::pos_format() and moneypunct::neg_format() for details of how
+ * these fields are interpreted.
+ */
+ class money_base
+ {
+ public:
+ enum part { none, space, symbol, sign, value };
+ struct pattern { char field[4]; };
+
+ static const pattern _S_default_pattern;
+
+ enum
+ {
+ _S_minus,
+ _S_zero,
+ _S_end = 11
+ };
+
+ // String literal of acceptable (narrow) input/output, for
+ // money_get/money_put. "-0123456789"
+ static const char* _S_atoms;
+
+ // Construct and return valid pattern consisting of some combination of:
+ // space none symbol sign value
+ static pattern
+ _S_construct_pattern(char __precedes, char __space, char __posn);
+ };
+
+ template<typename _CharT, bool _Intl>
+ struct __moneypunct_cache : public locale::facet
+ {
+ const char* _M_grouping;
+ size_t _M_grouping_size;
+ bool _M_use_grouping;
+ _CharT _M_decimal_point;
+ _CharT _M_thousands_sep;
+ const _CharT* _M_curr_symbol;
+ size_t _M_curr_symbol_size;
+ const _CharT* _M_positive_sign;
+ size_t _M_positive_sign_size;
+ const _CharT* _M_negative_sign;
+ size_t _M_negative_sign_size;
+ int _M_frac_digits;
+ money_base::pattern _M_pos_format;
+ money_base::pattern _M_neg_format;
+
+ // A list of valid numeric literals for input and output: in the standard
+ // "C" locale, this is "-0123456789". This array contains the chars after
+ // having been passed through the current locale's ctype<_CharT>.widen().
+ _CharT _M_atoms[money_base::_S_end];
+
+ bool _M_allocated;
+
+ __moneypunct_cache(size_t __refs = 0) : facet(__refs),
+ _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
+ _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()),
+ _M_curr_symbol(NULL), _M_curr_symbol_size(0),
+ _M_positive_sign(NULL), _M_positive_sign_size(0),
+ _M_negative_sign(NULL), _M_negative_sign_size(0),
+ _M_frac_digits(0),
+ _M_pos_format(money_base::pattern()),
+ _M_neg_format(money_base::pattern()), _M_allocated(false)
+ { }
+
+ ~__moneypunct_cache();
+
+ void
+ _M_cache(const locale& __loc);
+
+ private:
+ __moneypunct_cache&
+ operator=(const __moneypunct_cache&);
+
+ explicit
+ __moneypunct_cache(const __moneypunct_cache&);
+ };
+
+ template<typename _CharT, bool _Intl>
+ __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache()
+ {
+ if (_M_allocated)
+ {
+ delete [] _M_grouping;
+ delete [] _M_curr_symbol;
+ delete [] _M_positive_sign;
+ delete [] _M_negative_sign;
+ }
+ }
+
+ /**
+ * @brief Facet for formatting data for money amounts.
+ *
+ * This facet encapsulates the punctuation, grouping and other formatting
+ * features of money amount string representations.
+ */
+ template<typename _CharT, bool _Intl>
+ class moneypunct : public locale::facet, public money_base
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+
+ private:
+ __cache_type* _M_data;
+
+ public:
+ /// This value is provided by the standard, but no reason for its
+ /// existence.
+ static const bool intl = _Intl;
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+ { _M_initialize_moneypunct(); }
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is an internal constructor.
+ *
+ * @param cache Cache for optimization.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(__cache_type* __cache, size_t __refs = 0)
+ : facet(__refs), _M_data(__cache)
+ { _M_initialize_moneypunct(); }
+
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0)
+ : facet(__refs), _M_data(NULL)
+ { _M_initialize_moneypunct(__cloc, __s); }
+
+ /**
+ * @brief Return decimal point character.
+ *
+ * This function returns a char_type to use as a decimal point. It
+ * does so by returning returning
+ * moneypunct<char_type>::do_decimal_point().
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ char_type
+ decimal_point() const
+ { return this->do_decimal_point(); }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * This function returns a char_type to use as a thousands
+ * separator. It does so by returning returning
+ * moneypunct<char_type>::do_thousands_sep().
+ *
+ * @return char_type representing a thousands separator.
+ */
+ char_type
+ thousands_sep() const
+ { return this->do_thousands_sep(); }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * This function returns a string representing groupings for the
+ * integer part of an amount. Groupings indicate where thousands
+ * separators should be inserted.
+ *
+ * Each char in the return string is interpret as an integer rather
+ * than a character. These numbers represent the number of digits in a
+ * group. The first char in the string represents the number of digits
+ * in the least significant group. If a char is negative, it indicates
+ * an unlimited number of digits for the group. If more chars from the
+ * string are required to group a number, the last char is used
+ * repeatedly.
+ *
+ * For example, if the grouping() returns "\003\002" and is applied to
+ * the number 123456789, this corresponds to 12,34,56,789. Note that
+ * if the string was "32", this would put more than 50 digits into the
+ * least significant group if the character set is ASCII.
+ *
+ * The string is returned by calling
+ * moneypunct<char_type>::do_grouping().
+ *
+ * @return string representing grouping specification.
+ */
+ string
+ grouping() const
+ { return this->do_grouping(); }
+
+ /**
+ * @brief Return currency symbol string.
+ *
+ * This function returns a string_type to use as a currency symbol. It
+ * does so by returning returning
+ * moneypunct<char_type>::do_curr_symbol().
+ *
+ * @return @a string_type representing a currency symbol.
+ */
+ string_type
+ curr_symbol() const
+ { return this->do_curr_symbol(); }
+
+ /**
+ * @brief Return positive sign string.
+ *
+ * This function returns a string_type to use as a sign for positive
+ * amounts. It does so by returning returning
+ * moneypunct<char_type>::do_positive_sign().
+ *
+ * If the return value contains more than one character, the first
+ * character appears in the position indicated by pos_format() and the
+ * remainder appear at the end of the formatted string.
+ *
+ * @return @a string_type representing a positive sign.
+ */
+ string_type
+ positive_sign() const
+ { return this->do_positive_sign(); }
+
+ /**
+ * @brief Return negative sign string.
+ *
+ * This function returns a string_type to use as a sign for negative
+ * amounts. It does so by returning returning
+ * moneypunct<char_type>::do_negative_sign().
+ *
+ * If the return value contains more than one character, the first
+ * character appears in the position indicated by neg_format() and the
+ * remainder appear at the end of the formatted string.
+ *
+ * @return @a string_type representing a negative sign.
+ */
+ string_type
+ negative_sign() const
+ { return this->do_negative_sign(); }
+
+ /**
+ * @brief Return number of digits in fraction.
+ *
+ * This function returns the exact number of digits that make up the
+ * fractional part of a money amount. It does so by returning
+ * returning moneypunct<char_type>::do_frac_digits().
+ *
+ * The fractional part of a money amount is optional. But if it is
+ * present, there must be frac_digits() digits.
+ *
+ * @return Number of digits in amount fraction.
+ */
+ int
+ frac_digits() const
+ { return this->do_frac_digits(); }
+
+ //@{
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * positive or negative valued money amount. It does so by returning
+ * returning moneypunct<char_type>::do_pos_format() or
+ * moneypunct<char_type>::do_neg_format().
+ *
+ * The pattern has 4 fields describing the ordering of symbol, sign,
+ * value, and none or space. There must be one of each in the pattern.
+ * The none and space enums may not appear in the first field and space
+ * may not appear in the final field.
+ *
+ * The parts of a money string must appear in the order indicated by
+ * the fields of the pattern. The symbol field indicates that the
+ * value of curr_symbol() may be present. The sign field indicates
+ * that the value of positive_sign() or negative_sign() must be
+ * present. The value field indicates that the absolute value of the
+ * money amount is present. none indicates 0 or more whitespace
+ * characters, except at the end, where it permits no whitespace.
+ * space indicates that 1 or more whitespace characters must be
+ * present.
+ *
+ * For example, for the US locale and pos_format() pattern
+ * {symbol,sign,value,none}, curr_symbol() == '$' positive_sign() ==
+ * '+', and value 10.01, and options set to force the symbol, the
+ * corresponding string is "$+10.01".
+ *
+ * @return Pattern for money values.
+ */
+ pattern
+ pos_format() const
+ { return this->do_pos_format(); }
+
+ pattern
+ neg_format() const
+ { return this->do_neg_format(); }
+ //@}
+
+ protected:
+ /// Destructor.
+ virtual
+ ~moneypunct();
+
+ /**
+ * @brief Return decimal point character.
+ *
+ * Returns a char_type to use as a decimal point. This function is a
+ * hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a decimal point.
+ */
+ virtual char_type
+ do_decimal_point() const
+ { return _M_data->_M_decimal_point; }
+
+ /**
+ * @brief Return thousands separator character.
+ *
+ * Returns a char_type to use as a thousands separator. This function
+ * is a hook for derived classes to change the value returned.
+ *
+ * @return @a char_type representing a thousands separator.
+ */
+ virtual char_type
+ do_thousands_sep() const
+ { return _M_data->_M_thousands_sep; }
+
+ /**
+ * @brief Return grouping specification.
+ *
+ * Returns a string representing groupings for the integer part of a
+ * number. This function is a hook for derived classes to change the
+ * value returned. @see grouping() for details.
+ *
+ * @return String representing grouping specification.
+ */
+ virtual string
+ do_grouping() const
+ { return _M_data->_M_grouping; }
+
+ /**
+ * @brief Return currency symbol string.
+ *
+ * This function returns a string_type to use as a currency symbol.
+ * This function is a hook for derived classes to change the value
+ * returned. @see curr_symbol() for details.
+ *
+ * @return @a string_type representing a currency symbol.
+ */
+ virtual string_type
+ do_curr_symbol() const
+ { return _M_data->_M_curr_symbol; }
+
+ /**
+ * @brief Return positive sign string.
+ *
+ * This function returns a string_type to use as a sign for positive
+ * amounts. This function is a hook for derived classes to change the
+ * value returned. @see positive_sign() for details.
+ *
+ * @return @a string_type representing a positive sign.
+ */
+ virtual string_type
+ do_positive_sign() const
+ { return _M_data->_M_positive_sign; }
+
+ /**
+ * @brief Return negative sign string.
+ *
+ * This function returns a string_type to use as a sign for negative
+ * amounts. This function is a hook for derived classes to change the
+ * value returned. @see negative_sign() for details.
+ *
+ * @return @a string_type representing a negative sign.
+ */
+ virtual string_type
+ do_negative_sign() const
+ { return _M_data->_M_negative_sign; }
+
+ /**
+ * @brief Return number of digits in fraction.
+ *
+ * This function returns the exact number of digits that make up the
+ * fractional part of a money amount. This function is a hook for
+ * derived classes to change the value returned. @see frac_digits()
+ * for details.
+ *
+ * @return Number of digits in amount fraction.
+ */
+ virtual int
+ do_frac_digits() const
+ { return _M_data->_M_frac_digits; }
+
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * positive valued money amount. This function is a hook for derived
+ * classes to change the value returned. @see pos_format() for
+ * details.
+ *
+ * @return Pattern for money values.
+ */
+ virtual pattern
+ do_pos_format() const
+ { return _M_data->_M_pos_format; }
+
+ /**
+ * @brief Return pattern for money values.
+ *
+ * This function returns a pattern describing the formatting of a
+ * negative valued money amount. This function is a hook for derived
+ * classes to change the value returned. @see neg_format() for
+ * details.
+ *
+ * @return Pattern for money values.
+ */
+ virtual pattern
+ do_neg_format() const
+ { return _M_data->_M_neg_format; }
+
+ // For use at construction time only.
+ void
+ _M_initialize_moneypunct(__c_locale __cloc = NULL,
+ const char* __name = NULL);
+ };
+
+ template<typename _CharT, bool _Intl>
+ locale::id moneypunct<_CharT, _Intl>::id;
+
+ template<typename _CharT, bool _Intl>
+ const bool moneypunct<_CharT, _Intl>::intl;
+
+ template<>
+ moneypunct<char, true>::~moneypunct();
+
+ template<>
+ moneypunct<char, false>::~moneypunct();
+
+ template<>
+ void
+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale, const char*);
+
+ template<>
+ void
+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale, const char*);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ moneypunct<wchar_t, true>::~moneypunct();
+
+ template<>
+ moneypunct<wchar_t, false>::~moneypunct();
+
+ template<>
+ void
+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale,
+ const char*);
+
+ template<>
+ void
+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale,
+ const char*);
+#endif
+
+ /// class moneypunct_byname [22.2.6.4].
+ template<typename _CharT, bool _Intl>
+ class moneypunct_byname : public moneypunct<_CharT, _Intl>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+
+ static const bool intl = _Intl;
+
+ explicit
+ moneypunct_byname(const char* __s, size_t __refs = 0)
+ : moneypunct<_CharT, _Intl>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ __c_locale __tmp;
+ this->_S_create_c_locale(__tmp, __s);
+ this->_M_initialize_moneypunct(__tmp);
+ this->_S_destroy_c_locale(__tmp);
+ }
+ }
+
+ protected:
+ virtual
+ ~moneypunct_byname() { }
+ };
+
+ template<typename _CharT, bool _Intl>
+ const bool moneypunct_byname<_CharT, _Intl>::intl;
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+ /**
+ * @brief Facet for parsing monetary amounts.
+ *
+ * This facet encapsulates the code to parse and return a monetary
+ * amount from a string.
+ *
+ * The money_get template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the money_get facet.
+ */
+ template<typename _CharT, typename _InIter>
+ class money_get : public locale::facet
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _InIter iter_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ money_get(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads characters from @a s, interprets them as a
+ * monetary value according to moneypunct and ctype facets retrieved
+ * from io.getloc(), and returns the result in @a units as an integral
+ * value moneypunct::frac_digits() * the actual amount. For example,
+ * the string $10.01 in a US locale would store 1001 in @a units.
+ *
+ * Any characters not part of a valid money amount are not consumed.
+ *
+ * If a money value cannot be parsed from the input stream, sets
+ * err=(err|io.failbit). If the stream is consumed before finishing
+ * parsing, sets err=(err|io.failbit|io.eofbit). @a units is
+ * unchanged if parsing fails.
+ *
+ * This function works by returning the result of do_get().
+ *
+ * @param s Start of characters to parse.
+ * @param end End of characters to parse.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param err Error field to set if parsing fails.
+ * @param units Place to store result of parsing.
+ * @return Iterator referencing first character beyond valid money
+ * amount.
+ */
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const
+ { return this->do_get(__s, __end, __intl, __io, __err, __units); }
+
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads characters from @a s, interprets them as a
+ * monetary value according to moneypunct and ctype facets retrieved
+ * from io.getloc(), and returns the result in @a digits. For example,
+ * the string $10.01 in a US locale would store "1001" in @a digits.
+ *
+ * Any characters not part of a valid money amount are not consumed.
+ *
+ * If a money value cannot be parsed from the input stream, sets
+ * err=(err|io.failbit). If the stream is consumed before finishing
+ * parsing, sets err=(err|io.failbit|io.eofbit).
+ *
+ * This function works by returning the result of do_get().
+ *
+ * @param s Start of characters to parse.
+ * @param end End of characters to parse.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param err Error field to set if parsing fails.
+ * @param digits Place to store result of parsing.
+ * @return Iterator referencing first character beyond valid money
+ * amount.
+ */
+ iter_type
+ get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const
+ { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~money_get() { }
+
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads and parses characters representing a monetary
+ * value. This function is a hook for derived classes to change the
+ * value returned. @see get() for details.
+ */
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, double& __units) const;
+#else
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const;
+#endif
+
+ /**
+ * @brief Read and parse a monetary value.
+ *
+ * This function reads and parses characters representing a monetary
+ * value. This function is a hook for derived classes to change the
+ * value returned. @see get() for details.
+ */
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const;
+#endif
+
+ template<bool _Intl>
+ iter_type
+ _M_extract(iter_type __s, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __digits) const;
+ };
+
+ template<typename _CharT, typename _InIter>
+ locale::id money_get<_CharT, _InIter>::id;
+
+ /**
+ * @brief Facet for outputting monetary amounts.
+ *
+ * This facet encapsulates the code to format and output a monetary
+ * amount.
+ *
+ * The money_put template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the money_put facet.
+ */
+ template<typename _CharT, typename _OutIter>
+ class money_put : public locale::facet
+ {
+ public:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _OutIter iter_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ money_put(size_t __refs = 0) : facet(__refs) { }
+
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a units as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the value 1001 in a
+ * US locale would write "$10.01" to @a s.
+ *
+ * This function works by returning the result of do_put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, bool __intl, ios_base& __io,
+ char_type __fill, long double __units) const
+ { return this->do_put(__s, __intl, __io, __fill, __units); }
+
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a digits as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the string "1001" in
+ * a US locale would write "$10.01" to @a s.
+ *
+ * This function works by returning the result of do_put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ iter_type
+ put(iter_type __s, bool __intl, ios_base& __io,
+ char_type __fill, const string_type& __digits) const
+ { return this->do_put(__s, __intl, __io, __fill, __digits); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~money_put() { }
+
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a units as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the value 1001 in a
+ * US locale would write "$10.01" to @a s.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ double __units) const;
+#else
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const;
+#endif
+
+ /**
+ * @brief Format and output a monetary value.
+ *
+ * This function formats @a digits as a monetary value according to
+ * moneypunct and ctype facets retrieved from io.getloc(), and writes
+ * the resulting characters to @a s. For example, the string "1001" in
+ * a US locale would write "$10.01" to @a s.
+ *
+ * This function is a hook for derived classes to change the value
+ * returned. @see put().
+ *
+ * @param s The stream to write to.
+ * @param intl Parameter to use_facet<moneypunct<CharT,intl> >.
+ * @param io Source of facets and io state.
+ * @param fill char_type to use for padding.
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
+
+ // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const;
+#endif
+
+ template<bool _Intl>
+ iter_type
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
+ };
+
+ template<typename _CharT, typename _OutIter>
+ locale::id money_put<_CharT, _OutIter>::id;
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+ /**
+ * @brief Messages facet base class providing catalog typedef.
+ */
+ struct messages_base
+ {
+ typedef int catalog;
+ };
+
+ /**
+ * @brief Facet for handling message catalogs
+ *
+ * This facet encapsulates the code to retrieve messages from
+ * message catalogs. The only thing defined by the standard for this facet
+ * is the interface. All underlying functionality is
+ * implementation-defined.
+ *
+ * This library currently implements 3 versions of the message facet. The
+ * first version (gnu) is a wrapper around gettext, provided by libintl.
+ * The second version (ieee) is a wrapper around catgets. The final
+ * version (default) does no actual translation. These implementations are
+ * only provided for char and wchar_t instantiations.
+ *
+ * The messages template uses protected virtual functions to
+ * provide the actual results. The public accessors forward the
+ * call to the virtual functions. These virtual functions are
+ * hooks for developers to implement the behavior they require from
+ * the messages facet.
+ */
+ template<typename _CharT>
+ class messages : public locale::facet, public messages_base
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+ //@}
+
+ protected:
+ // Underlying "C" library locale information saved from
+ // initialization, needed by messages_byname as well.
+ __c_locale _M_c_locale_messages;
+ const char* _M_name_messages;
+
+ public:
+ /// Numpunct facet id.
+ static locale::id id;
+
+ /**
+ * @brief Constructor performs initialization.
+ *
+ * This is the constructor provided by the standard.
+ *
+ * @param refs Passed to the base facet class.
+ */
+ explicit
+ messages(size_t __refs = 0);
+
+ // Non-standard.
+ /**
+ * @brief Internal constructor. Not for general use.
+ *
+ * This is a constructor for use by the library itself to set up new
+ * locales.
+ *
+ * @param cloc The "C" locale.
+ * @param s The name of a locale.
+ * @param refs Refcount to pass to the base class.
+ */
+ explicit
+ messages(__c_locale __cloc, const char* __s, size_t __refs = 0);
+
+ /*
+ * @brief Open a message catalog.
+ *
+ * This function opens and returns a handle to a message catalog by
+ * returning do_open(s, loc).
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @return Handle to the catalog or value < 0 if open fails.
+ */
+ catalog
+ open(const basic_string<char>& __s, const locale& __loc) const
+ { return this->do_open(__s, __loc); }
+
+ // Non-standard and unorthodox, yet effective.
+ /*
+ * @brief Open a message catalog.
+ *
+ * This non-standard function opens and returns a handle to a message
+ * catalog by returning do_open(s, loc). The third argument provides a
+ * message catalog root directory for gnu gettext and is ignored
+ * otherwise.
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @param dir Message catalog root directory.
+ * @return Handle to the catalog or value < 0 if open fails.
+ */
+ catalog
+ open(const basic_string<char>&, const locale&, const char*) const;
+
+ /*
+ * @brief Look up a string in a message catalog.
+ *
+ * This function retrieves and returns a message from a catalog by
+ * returning do_get(c, set, msgid, s).
+ *
+ * For gnu, @a set and @a msgid are ignored. Returns gettext(s).
+ * For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+ *
+ * @param c The catalog to access.
+ * @param set Implementation-defined.
+ * @param msgid Implementation-defined.
+ * @param s Default return value if retrieval fails.
+ * @return Retrieved message or @a s if get fails.
+ */
+ string_type
+ get(catalog __c, int __set, int __msgid, const string_type& __s) const
+ { return this->do_get(__c, __set, __msgid, __s); }
+
+ /*
+ * @brief Close a message catalog.
+ *
+ * Closes catalog @a c by calling do_close(c).
+ *
+ * @param c The catalog to close.
+ */
+ void
+ close(catalog __c) const
+ { return this->do_close(__c); }
+
+ protected:
+ /// Destructor.
+ virtual
+ ~messages();
+
+ /*
+ * @brief Open a message catalog.
+ *
+ * This function opens and returns a handle to a message catalog in an
+ * implementation-defined manner. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * @param s The catalog to open.
+ * @param loc Locale to use for character set conversions.
+ * @return Handle to the opened catalog, value < 0 if open failed.
+ */
+ virtual catalog
+ do_open(const basic_string<char>&, const locale&) const;
+
+ /*
+ * @brief Look up a string in a message catalog.
+ *
+ * This function retrieves and returns a message from a catalog in an
+ * implementation-defined manner. This function is a hook for derived
+ * classes to change the value returned.
+ *
+ * For gnu, @a set and @a msgid are ignored. Returns gettext(s).
+ * For default, returns s. For ieee, returns catgets(c,set,msgid,s).
+ *
+ * @param c The catalog to access.
+ * @param set Implementation-defined.
+ * @param msgid Implementation-defined.
+ * @param s Default return value if retrieval fails.
+ * @return Retrieved message or @a s if get fails.
+ */
+ virtual string_type
+ do_get(catalog, int, int, const string_type& __dfault) const;
+
+ /*
+ * @brief Close a message catalog.
+ *
+ * @param c The catalog to close.
+ */
+ virtual void
+ do_close(catalog) const;
+
+ // Returns a locale and codeset-converted string, given a char* message.
+ char*
+ _M_convert_to_char(const string_type& __msg) const
+ {
+ // XXX
+ return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
+ }
+
+ // Returns a locale and codeset-converted string, given a char* message.
+ string_type
+ _M_convert_from_char(char*) const
+ {
+#if 0
+ // Length of message string without terminating null.
+ size_t __len = char_traits<char>::length(__msg) - 1;
+
+ // "everybody can easily convert the string using
+ // mbsrtowcs/wcsrtombs or with iconv()"
+
+ // Convert char* to _CharT in locale used to open catalog.
+ // XXX need additional template parameter on messages class for this..
+ // typedef typename codecvt<char, _CharT, _StateT> __codecvt_type;
+ typedef typename codecvt<char, _CharT, mbstate_t> __codecvt_type;
+
+ __codecvt_type::state_type __state;
+ // XXX may need to initialize state.
+ //initialize_state(__state._M_init());
+
+ char* __from_next;
+ // XXX what size for this string?
+ _CharT* __to = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+ const __codecvt_type& __cvt = use_facet<__codecvt_type>(_M_locale_conv);
+ __cvt.out(__state, __msg, __msg + __len, __from_next,
+ __to, __to + __len + 1, __to_next);
+ return string_type(__to);
+#endif
+#if 0
+ typedef ctype<_CharT> __ctype_type;
+ // const __ctype_type& __cvt = use_facet<__ctype_type>(_M_locale_msg);
+ const __ctype_type& __cvt = use_facet<__ctype_type>(locale());
+ // XXX Again, proper length of converted string an issue here.
+ // For now, assume the converted length is not larger.
+ _CharT* __dest = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+ __cvt.widen(__msg, __msg + __len, __dest);
+ return basic_string<_CharT>(__dest);
+#endif
+ return string_type();
+ }
+ };
+
+ template<typename _CharT>
+ locale::id messages<_CharT>::id;
+
+ // Specializations for required instantiations.
+ template<>
+ string
+ messages<char>::do_get(catalog, int, int, const string&) const;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ wstring
+ messages<wchar_t>::do_get(catalog, int, int, const wstring&) const;
+#endif
+
+ /// class messages_byname [22.2.7.2].
+ template<typename _CharT>
+ class messages_byname : public messages<_CharT>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef basic_string<_CharT> string_type;
+
+ explicit
+ messages_byname(const char* __s, size_t __refs = 0);
+
+ protected:
+ virtual
+ ~messages_byname()
+ { }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+// Include host and configuration specific messages functions.
+#include <bits/messages_members.h>
+
+// 22.2.1.5 Template class codecvt
+#include <bits/codecvt.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/locale_facets_nonio.tcc>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.tcc
new file mode 100644
index 0000000..06bbfcf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/locale_facets_nonio.tcc
@@ -0,0 +1,1330 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file locale_facets_nonio.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _LOCALE_FACETS_NONIO_TCC
+#define _LOCALE_FACETS_NONIO_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, bool _Intl>
+ struct __use_cache<__moneypunct_cache<_CharT, _Intl> >
+ {
+ const __moneypunct_cache<_CharT, _Intl>*
+ operator() (const locale& __loc) const
+ {
+ const size_t __i = moneypunct<_CharT, _Intl>::id._M_id();
+ const locale::facet** __caches = __loc._M_impl->_M_caches;
+ if (!__caches[__i])
+ {
+ __moneypunct_cache<_CharT, _Intl>* __tmp = NULL;
+ __try
+ {
+ __tmp = new __moneypunct_cache<_CharT, _Intl>;
+ __tmp->_M_cache(__loc);
+ }
+ __catch(...)
+ {
+ delete __tmp;
+ __throw_exception_again;
+ }
+ __loc._M_impl->_M_install_cache(__tmp, __i);
+ }
+ return static_cast<
+ const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]);
+ }
+ };
+
+ template<typename _CharT, bool _Intl>
+ void
+ __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc)
+ {
+ _M_allocated = true;
+
+ const moneypunct<_CharT, _Intl>& __mp =
+ use_facet<moneypunct<_CharT, _Intl> >(__loc);
+
+ _M_grouping_size = __mp.grouping().size();
+ char* __grouping = new char[_M_grouping_size];
+ __mp.grouping().copy(__grouping, _M_grouping_size);
+ _M_grouping = __grouping;
+ _M_use_grouping = (_M_grouping_size
+ && static_cast<signed char>(_M_grouping[0]) > 0
+ && (_M_grouping[0]
+ != __gnu_cxx::__numeric_traits<char>::__max));
+
+ _M_decimal_point = __mp.decimal_point();
+ _M_thousands_sep = __mp.thousands_sep();
+ _M_frac_digits = __mp.frac_digits();
+
+ _M_curr_symbol_size = __mp.curr_symbol().size();
+ _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size];
+ __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size);
+ _M_curr_symbol = __curr_symbol;
+
+ _M_positive_sign_size = __mp.positive_sign().size();
+ _CharT* __positive_sign = new _CharT[_M_positive_sign_size];
+ __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size);
+ _M_positive_sign = __positive_sign;
+
+ _M_negative_sign_size = __mp.negative_sign().size();
+ _CharT* __negative_sign = new _CharT[_M_negative_sign_size];
+ __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size);
+ _M_negative_sign = __negative_sign;
+
+ _M_pos_format = __mp.pos_format();
+ _M_neg_format = __mp.neg_format();
+
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc);
+ __ct.widen(money_base::_S_atoms,
+ money_base::_S_atoms + money_base::_S_end, _M_atoms);
+ }
+
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
+ template<typename _CharT, typename _InIter>
+ template<bool _Intl>
+ _InIter
+ money_get<_CharT, _InIter>::
+ _M_extract(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, string& __units) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+
+ // Deduced sign.
+ bool __negative = false;
+ // Sign size.
+ size_type __sign_size = 0;
+ // True if sign is mandatory.
+ const bool __mandatory_sign = (__lc->_M_positive_sign_size
+ && __lc->_M_negative_sign_size);
+ // String of grouping info from thousands_sep plucked from __units.
+ string __grouping_tmp;
+ if (__lc->_M_use_grouping)
+ __grouping_tmp.reserve(32);
+ // Last position before the decimal point.
+ int __last_pos = 0;
+ // Separator positions, then, possibly, fractional digits.
+ int __n = 0;
+ // If input iterator is in a valid state.
+ bool __testvalid = true;
+ // Flag marking when a decimal point is found.
+ bool __testdecfound = false;
+
+ // The tentative returned string is stored here.
+ string __res;
+ __res.reserve(32);
+
+ const char_type* __lit_zero = __lit + money_base::_S_zero;
+ const money_base::pattern __p = __lc->_M_neg_format;
+ for (int __i = 0; __i < 4 && __testvalid; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ // According to 22.2.6.1.2, p2, symbol is required
+ // if (__io.flags() & ios_base::showbase), otherwise
+ // is optional and consumed only if other characters
+ // are needed to complete the format.
+ if (__io.flags() & ios_base::showbase || __sign_size > 1
+ || __i == 0
+ || (__i == 1 && (__mandatory_sign
+ || (static_cast<part>(__p.field[0])
+ == money_base::sign)
+ || (static_cast<part>(__p.field[2])
+ == money_base::space)))
+ || (__i == 2 && ((static_cast<part>(__p.field[3])
+ == money_base::value)
+ || (__mandatory_sign
+ && (static_cast<part>(__p.field[3])
+ == money_base::sign)))))
+ {
+ const size_type __len = __lc->_M_curr_symbol_size;
+ size_type __j = 0;
+ for (; __beg != __end && __j < __len
+ && *__beg == __lc->_M_curr_symbol[__j];
+ ++__beg, ++__j);
+ if (__j != __len
+ && (__j || __io.flags() & ios_base::showbase))
+ __testvalid = false;
+ }
+ break;
+ case money_base::sign:
+ // Sign might not exist, or be more than one character long.
+ if (__lc->_M_positive_sign_size && __beg != __end
+ && *__beg == __lc->_M_positive_sign[0])
+ {
+ __sign_size = __lc->_M_positive_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_negative_sign_size && __beg != __end
+ && *__beg == __lc->_M_negative_sign[0])
+ {
+ __negative = true;
+ __sign_size = __lc->_M_negative_sign_size;
+ ++__beg;
+ }
+ else if (__lc->_M_positive_sign_size
+ && !__lc->_M_negative_sign_size)
+ // "... if no sign is detected, the result is given the sign
+ // that corresponds to the source of the empty string"
+ __negative = true;
+ else if (__mandatory_sign)
+ __testvalid = false;
+ break;
+ case money_base::value:
+ // Extract digits, remove and stash away the
+ // grouping of found thousands separators.
+ for (; __beg != __end; ++__beg)
+ {
+ const char_type __c = *__beg;
+ const char_type* __q = __traits_type::find(__lit_zero,
+ 10, __c);
+ if (__q != 0)
+ {
+ __res += money_base::_S_atoms[__q - __lit];
+ ++__n;
+ }
+ else if (__c == __lc->_M_decimal_point
+ && !__testdecfound)
+ {
+ if (__lc->_M_frac_digits <= 0)
+ break;
+
+ __last_pos = __n;
+ __n = 0;
+ __testdecfound = true;
+ }
+ else if (__lc->_M_use_grouping
+ && __c == __lc->_M_thousands_sep
+ && !__testdecfound)
+ {
+ if (__n)
+ {
+ // Mark position for later analysis.
+ __grouping_tmp += static_cast<char>(__n);
+ __n = 0;
+ }
+ else
+ {
+ __testvalid = false;
+ break;
+ }
+ }
+ else
+ break;
+ }
+ if (__res.empty())
+ __testvalid = false;
+ break;
+ case money_base::space:
+ // At least one space is required.
+ if (__beg != __end && __ctype.is(ctype_base::space, *__beg))
+ ++__beg;
+ else
+ __testvalid = false;
+ case money_base::none:
+ // Only if not at the end of the pattern.
+ if (__i != 3)
+ for (; __beg != __end
+ && __ctype.is(ctype_base::space, *__beg); ++__beg);
+ break;
+ }
+ }
+
+ // Need to get the rest of the sign characters, if they exist.
+ if (__sign_size > 1 && __testvalid)
+ {
+ const char_type* __sign = __negative ? __lc->_M_negative_sign
+ : __lc->_M_positive_sign;
+ size_type __i = 1;
+ for (; __beg != __end && __i < __sign_size
+ && *__beg == __sign[__i]; ++__beg, ++__i);
+
+ if (__i != __sign_size)
+ __testvalid = false;
+ }
+
+ if (__testvalid)
+ {
+ // Strip leading zeros.
+ if (__res.size() > 1)
+ {
+ const size_type __first = __res.find_first_not_of('0');
+ const bool __only_zeros = __first == string::npos;
+ if (__first)
+ __res.erase(0, __only_zeros ? __res.size() - 1 : __first);
+ }
+
+ // 22.2.6.1.2, p4
+ if (__negative && __res[0] != '0')
+ __res.insert(__res.begin(), '-');
+
+ // Test for grouping fidelity.
+ if (__grouping_tmp.size())
+ {
+ // Add the ending grouping.
+ __grouping_tmp += static_cast<char>(__testdecfound ? __last_pos
+ : __n);
+ if (!std::__verify_grouping(__lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __grouping_tmp))
+ __err |= ios_base::failbit;
+ }
+
+ // Iff not enough digits were supplied after the decimal-point.
+ if (__testdecfound && __n != __lc->_M_frac_digits)
+ __testvalid = false;
+ }
+
+ // Iff valid sequence is not recognized.
+ if (!__testvalid)
+ __err |= ios_base::failbit;
+ else
+ __units.swap(__res);
+
+ // Iff no more characters are available.
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, double& __units) const
+ {
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+ return __beg;
+ }
+#endif
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const
+ {
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+ do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const
+ {
+ typedef typename string::size_type size_type;
+
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ string __str;
+ __beg = __intl ? _M_extract<true>(__beg, __end, __io, __err, __str)
+ : _M_extract<false>(__beg, __end, __io, __err, __str);
+ const size_type __len = __str.size();
+ if (__len)
+ {
+ __digits.resize(__len);
+ __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]);
+ }
+ return __beg;
+ }
+
+ template<typename _CharT, typename _OutIter>
+ template<bool _Intl>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+ const string_type& __digits) const
+ {
+ typedef typename string_type::size_type size_type;
+ typedef money_base::part part;
+ typedef __moneypunct_cache<_CharT, _Intl> __cache_type;
+
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ __use_cache<__cache_type> __uc;
+ const __cache_type* __lc = __uc(__loc);
+ const char_type* __lit = __lc->_M_atoms;
+
+ // Determine if negative or positive formats are to be used, and
+ // discard leading negative_sign if it is present.
+ const char_type* __beg = __digits.data();
+
+ money_base::pattern __p;
+ const char_type* __sign;
+ size_type __sign_size;
+ if (!(*__beg == __lit[money_base::_S_minus]))
+ {
+ __p = __lc->_M_pos_format;
+ __sign = __lc->_M_positive_sign;
+ __sign_size = __lc->_M_positive_sign_size;
+ }
+ else
+ {
+ __p = __lc->_M_neg_format;
+ __sign = __lc->_M_negative_sign;
+ __sign_size = __lc->_M_negative_sign_size;
+ if (__digits.size())
+ ++__beg;
+ }
+
+ // Look for valid numbers in the ctype facet within input digits.
+ size_type __len = __ctype.scan_not(ctype_base::digit, __beg,
+ __beg + __digits.size()) - __beg;
+ if (__len)
+ {
+ // Assume valid input, and attempt to format.
+ // Break down input numbers into base components, as follows:
+ // final_value = grouped units + (decimal point) + (digits)
+ string_type __value;
+ __value.reserve(2 * __len);
+
+ // Add thousands separators to non-decimal digits, per
+ // grouping rules.
+ long __paddec = __len - __lc->_M_frac_digits;
+ if (__paddec > 0)
+ {
+ if (__lc->_M_frac_digits < 0)
+ __paddec = __len;
+ if (__lc->_M_grouping_size)
+ {
+ __value.assign(2 * __paddec, char_type());
+ _CharT* __vend =
+ std::__add_grouping(&__value[0], __lc->_M_thousands_sep,
+ __lc->_M_grouping,
+ __lc->_M_grouping_size,
+ __beg, __beg + __paddec);
+ __value.erase(__vend - &__value[0]);
+ }
+ else
+ __value.assign(__beg, __paddec);
+ }
+
+ // Deal with decimal point, decimal digits.
+ if (__lc->_M_frac_digits > 0)
+ {
+ __value += __lc->_M_decimal_point;
+ if (__paddec >= 0)
+ __value.append(__beg + __paddec, __lc->_M_frac_digits);
+ else
+ {
+ // Have to pad zeros in the decimal position.
+ __value.append(-__paddec, __lit[money_base::_S_zero]);
+ __value.append(__beg, __len);
+ }
+ }
+
+ // Calculate length of resulting string.
+ const ios_base::fmtflags __f = __io.flags()
+ & ios_base::adjustfield;
+ __len = __value.size() + __sign_size;
+ __len += ((__io.flags() & ios_base::showbase)
+ ? __lc->_M_curr_symbol_size : 0);
+
+ string_type __res;
+ __res.reserve(2 * __len);
+
+ const size_type __width = static_cast<size_type>(__io.width());
+ const bool __testipad = (__f == ios_base::internal
+ && __len < __width);
+ // Fit formatted digits into the required pattern.
+ for (int __i = 0; __i < 4; ++__i)
+ {
+ const part __which = static_cast<part>(__p.field[__i]);
+ switch (__which)
+ {
+ case money_base::symbol:
+ if (__io.flags() & ios_base::showbase)
+ __res.append(__lc->_M_curr_symbol,
+ __lc->_M_curr_symbol_size);
+ break;
+ case money_base::sign:
+ // Sign might not exist, or be more than one
+ // character long. In that case, add in the rest
+ // below.
+ if (__sign_size)
+ __res += __sign[0];
+ break;
+ case money_base::value:
+ __res += __value;
+ break;
+ case money_base::space:
+ // At least one space is required, but if internal
+ // formatting is required, an arbitrary number of
+ // fill spaces will be necessary.
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ else
+ __res += __fill;
+ break;
+ case money_base::none:
+ if (__testipad)
+ __res.append(__width - __len, __fill);
+ break;
+ }
+ }
+
+ // Special case of multi-part sign parts.
+ if (__sign_size > 1)
+ __res.append(__sign + 1, __sign_size - 1);
+
+ // Pad, if still necessary.
+ __len = __res.size();
+ if (__width > __len)
+ {
+ if (__f == ios_base::left)
+ // After.
+ __res.append(__width - __len, __fill);
+ else
+ // Before.
+ __res.insert(0, __width - __len, __fill);
+ __len = __width;
+ }
+
+ // Write resulting, fully-formatted string to output iterator.
+ __s = std::__write(__s, __res.data(), __len);
+ }
+ __io.width(0);
+ return __s;
+ }
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ double __units) const
+ { return this->do_put(__s, __intl, __io, __fill, (long double) __units); }
+#endif
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const
+ {
+ const locale __loc = __io.getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+#ifdef _GLIBCXX_USE_C99
+ // First try a buffer perhaps big enough.
+ int __cs_size = 64;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 328. Bad sprintf format modifier in money_put<>::do_put()
+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ "%.*Lf", 0, __units);
+ // If the buffer was not large enough, try again with the correct size.
+ if (__len >= __cs_size)
+ {
+ __cs_size = __len + 1;
+ __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size,
+ "%.*Lf", 0, __units);
+ }
+#else
+ // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
+ const int __cs_size =
+ __gnu_cxx::__numeric_traits<long double>::__max_exponent10 + 3;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
+ 0, __units);
+#endif
+ string_type __digits(__len, char_type());
+ __ctype.widen(__cs, __cs + __len, &__digits[0]);
+ return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits);
+ }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ const string_type& __digits) const
+ { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits); }
+
+_GLIBCXX_END_LDBL_NAMESPACE
+
+ // NB: Not especially useful. Without an ios_base object or some
+ // kind of locale reference, we are left clawing at the air where
+ // the side of the mountain used to be...
+ template<typename _CharT, typename _InIter>
+ time_base::dateorder
+ time_get<_CharT, _InIter>::do_date_order() const
+ { return time_base::no_order; }
+
+ // Expand a strftime format string and parse it. E.g., do_get_date() may
+ // pass %m/%d/%Y => extracted characters.
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm,
+ const _CharT* __format) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const size_t __len = char_traits<_CharT>::length(__format);
+
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i)
+ {
+ if (__ctype.narrow(__format[__i], 0) == '%')
+ {
+ // Verify valid formatting code, attempt to extract.
+ char __c = __ctype.narrow(__format[++__i], 0);
+ int __mem = 0;
+ if (__c == 'E' || __c == 'O')
+ __c = __ctype.narrow(__format[++__i], 0);
+ switch (__c)
+ {
+ const char* __cs;
+ _CharT __wcs[10];
+ case 'a':
+ // Abbreviated weekday name [tm_wday]
+ const char_type* __days1[7];
+ __tp._M_days_abbreviated(__days1);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1,
+ 7, __io, __tmperr);
+ break;
+ case 'A':
+ // Weekday name [tm_wday].
+ const char_type* __days2[7];
+ __tp._M_days(__days2);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2,
+ 7, __io, __tmperr);
+ break;
+ case 'h':
+ case 'b':
+ // Abbreviated month name [tm_mon]
+ const char_type* __months1[12];
+ __tp._M_months_abbreviated(__months1);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months1, 12, __io, __tmperr);
+ break;
+ case 'B':
+ // Month name [tm_mon].
+ const char_type* __months2[12];
+ __tp._M_months(__months2);
+ __beg = _M_extract_name(__beg, __end, __tm->tm_mon,
+ __months2, 12, __io, __tmperr);
+ break;
+ case 'c':
+ // Default time and date representation.
+ const char_type* __dt[2];
+ __tp._M_date_time_formats(__dt);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __dt[0]);
+ break;
+ case 'd':
+ // Day [01, 31]. [tm_mday]
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2,
+ __io, __tmperr);
+ break;
+ case 'e':
+ // Day [1, 31], with single digits preceded by
+ // space. [tm_mday]
+ if (__ctype.is(ctype_base::space, *__beg))
+ __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9,
+ 1, __io, __tmperr);
+ else
+ __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31,
+ 2, __io, __tmperr);
+ break;
+ case 'D':
+ // Equivalent to %m/%d/%y.[tm_mon, tm_mday, tm_year]
+ __cs = "%m/%d/%y";
+ __ctype.widen(__cs, __cs + 9, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'H':
+ // Hour [00, 23]. [tm_hour]
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
+ __io, __tmperr);
+ break;
+ case 'I':
+ // Hour [01, 12]. [tm_hour]
+ __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2,
+ __io, __tmperr);
+ break;
+ case 'm':
+ // Month [01, 12]. [tm_mon]
+ __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_mon = __mem - 1;
+ break;
+ case 'M':
+ // Minute [00, 59]. [tm_min]
+ __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
+ __io, __tmperr);
+ break;
+ case 'n':
+ if (__ctype.narrow(*__beg, 0) == '\n')
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ case 'R':
+ // Equivalent to (%H:%M).
+ __cs = "%H:%M";
+ __ctype.widen(__cs, __cs + 6, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'S':
+ // Seconds. [tm_sec]
+ // [00, 60] in C99 (one leap-second), [00, 61] in C89.
+#ifdef _GLIBCXX_USE_C99
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2,
+#else
+ __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 61, 2,
+#endif
+ __io, __tmperr);
+ break;
+ case 't':
+ if (__ctype.narrow(*__beg, 0) == '\t')
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ case 'T':
+ // Equivalent to (%H:%M:%S).
+ __cs = "%H:%M:%S";
+ __ctype.widen(__cs, __cs + 9, __wcs);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __wcs);
+ break;
+ case 'x':
+ // Locale's date.
+ const char_type* __dates[2];
+ __tp._M_date_formats(__dates);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __dates[0]);
+ break;
+ case 'X':
+ // Locale's time.
+ const char_type* __times[2];
+ __tp._M_time_formats(__times);
+ __beg = _M_extract_via_format(__beg, __end, __io, __tmperr,
+ __tm, __times[0]);
+ break;
+ case 'y':
+ case 'C': // C99
+ // Two digit year. [tm_year]
+ __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2,
+ __io, __tmperr);
+ break;
+ case 'Y':
+ // Year [1900). [tm_year]
+ __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4,
+ __io, __tmperr);
+ if (!__tmperr)
+ __tm->tm_year = __mem - 1900;
+ break;
+ case 'Z':
+ // Timezone info.
+ if (__ctype.is(ctype_base::upper, *__beg))
+ {
+ int __tmp;
+ __beg = _M_extract_name(__beg, __end, __tmp,
+ __timepunct_cache<_CharT>::_S_timezones,
+ 14, __io, __tmperr);
+
+ // GMT requires special effort.
+ if (__beg != __end && !__tmperr && __tmp == 0
+ && (*__beg == __ctype.widen('-')
+ || *__beg == __ctype.widen('+')))
+ {
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
+ __io, __tmperr);
+ __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
+ __io, __tmperr);
+ }
+ }
+ else
+ __tmperr |= ios_base::failbit;
+ break;
+ default:
+ // Not recognized.
+ __tmperr |= ios_base::failbit;
+ }
+ }
+ else
+ {
+ // Verify format and input match, extract and discard.
+ if (__format[__i] == *__beg)
+ ++__beg;
+ else
+ __tmperr |= ios_base::failbit;
+ }
+ }
+
+ if (__tmperr)
+ __err |= ios_base::failbit;
+
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_num(iter_type __beg, iter_type __end, int& __member,
+ int __min, int __max, size_t __len,
+ ios_base& __io, ios_base::iostate& __err) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ // As-is works for __len = 1, 2, 4, the values actually used.
+ int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1);
+
+ ++__min;
+ size_t __i = 0;
+ int __value = 0;
+ for (; __beg != __end && __i < __len; ++__beg, ++__i)
+ {
+ const char __c = __ctype.narrow(*__beg, '*');
+ if (__c >= '0' && __c <= '9')
+ {
+ __value = __value * 10 + (__c - '0');
+ const int __valuec = __value * __mult;
+ if (__valuec > __max || __valuec + __mult < __min)
+ break;
+ __mult /= 10;
+ }
+ else
+ break;
+ }
+ if (__i == __len)
+ __member = __value;
+ else
+ __err |= ios_base::failbit;
+
+ return __beg;
+ }
+
+ // Assumptions:
+ // All elements in __names are unique.
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ _M_extract_name(iter_type __beg, iter_type __end, int& __member,
+ const _CharT** __names, size_t __indexlen,
+ ios_base& __io, ios_base::iostate& __err) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ int* __matches = static_cast<int*>(__builtin_alloca(sizeof(int)
+ * __indexlen));
+ size_t __nmatches = 0;
+ size_t __pos = 0;
+ bool __testvalid = true;
+ const char_type* __name;
+
+ // Look for initial matches.
+ // NB: Some of the locale data is in the form of all lowercase
+ // names, and some is in the form of initially-capitalized
+ // names. Look for both.
+ if (__beg != __end)
+ {
+ const char_type __c = *__beg;
+ for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
+ if (__c == __names[__i1][0]
+ || __c == __ctype.toupper(__names[__i1][0]))
+ __matches[__nmatches++] = __i1;
+ }
+
+ while (__nmatches > 1)
+ {
+ // Find smallest matching string.
+ size_t __minlen = __traits_type::length(__names[__matches[0]]);
+ for (size_t __i2 = 1; __i2 < __nmatches; ++__i2)
+ __minlen = std::min(__minlen,
+ __traits_type::length(__names[__matches[__i2]]));
+ ++__beg, ++__pos;
+ if (__pos < __minlen && __beg != __end)
+ for (size_t __i3 = 0; __i3 < __nmatches;)
+ {
+ __name = __names[__matches[__i3]];
+ if (!(__name[__pos] == *__beg))
+ __matches[__i3] = __matches[--__nmatches];
+ else
+ ++__i3;
+ }
+ else
+ break;
+ }
+
+ if (__nmatches == 1)
+ {
+ // Make sure found name is completely extracted.
+ ++__beg, ++__pos;
+ __name = __names[__matches[0]];
+ const size_t __len = __traits_type::length(__name);
+ while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
+ ++__beg, ++__pos;
+
+ if (__len == __pos)
+ __member = __matches[0];
+ else
+ __testvalid = false;
+ }
+ else
+ __testvalid = false;
+ if (!__testvalid)
+ __err |= ios_base::failbit;
+
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __times[2];
+ __tp._M_time_formats(__times);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __times[0]);
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const char_type* __dates[2];
+ __tp._M_date_formats(__dates);
+ __beg = _M_extract_via_format(__beg, __end, __io, __err,
+ __tm, __dates[0]);
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const char_type* __days[7];
+ __tp._M_days_abbreviated(__days);
+ int __tmpwday;
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7,
+ __io, __tmperr);
+
+ // Check to see if non-abbreviated name exists, and extract.
+ // NB: Assumes both _M_days and _M_days_abbreviated organized in
+ // exact same order, first to last, such that the resulting
+ // __days array with the same index points to a day, and that
+ // day's abbreviated form.
+ // NB: Also assumes that an abbreviated name is a subset of the name.
+ if (!__tmperr && __beg != __end)
+ {
+ size_t __pos = __traits_type::length(__days[__tmpwday]);
+ __tp._M_days(__days);
+ const char_type* __name = __days[__tmpwday];
+ if (__name[__pos] == *__beg)
+ {
+ // Extract the rest of it.
+ const size_t __len = __traits_type::length(__name);
+ while (__pos < __len && __beg != __end
+ && __name[__pos] == *__beg)
+ ++__beg, ++__pos;
+ if (__len != __pos)
+ __tmperr |= ios_base::failbit;
+ }
+ }
+ if (!__tmperr)
+ __tm->tm_wday = __tmpwday;
+ else
+ __err |= ios_base::failbit;
+
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_monthname(iter_type __beg, iter_type __end,
+ ios_base& __io, ios_base::iostate& __err, tm* __tm) const
+ {
+ typedef char_traits<_CharT> __traits_type;
+ const locale& __loc = __io._M_getloc();
+ const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc);
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+ const char_type* __months[12];
+ __tp._M_months_abbreviated(__months);
+ int __tmpmon;
+ ios_base::iostate __tmperr = ios_base::goodbit;
+ __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12,
+ __io, __tmperr);
+
+ // Check to see if non-abbreviated name exists, and extract.
+ // NB: Assumes both _M_months and _M_months_abbreviated organized in
+ // exact same order, first to last, such that the resulting
+ // __months array with the same index points to a month, and that
+ // month's abbreviated form.
+ // NB: Also assumes that an abbreviated name is a subset of the name.
+ if (!__tmperr && __beg != __end)
+ {
+ size_t __pos = __traits_type::length(__months[__tmpmon]);
+ __tp._M_months(__months);
+ const char_type* __name = __months[__tmpmon];
+ if (__name[__pos] == *__beg)
+ {
+ // Extract the rest of it.
+ const size_t __len = __traits_type::length(__name);
+ while (__pos < __len && __beg != __end
+ && __name[__pos] == *__beg)
+ ++__beg, ++__pos;
+ if (__len != __pos)
+ __tmperr |= ios_base::failbit;
+ }
+ }
+ if (!__tmperr)
+ __tm->tm_mon = __tmpmon;
+ else
+ __err |= ios_base::failbit;
+
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _InIter>
+ _InIter
+ time_get<_CharT, _InIter>::
+ do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+ ios_base::iostate& __err, tm* __tm) const
+ {
+ const locale& __loc = __io._M_getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+ size_t __i = 0;
+ int __value = 0;
+ for (; __beg != __end && __i < 4; ++__beg, ++__i)
+ {
+ const char __c = __ctype.narrow(*__beg, '*');
+ if (__c >= '0' && __c <= '9')
+ __value = __value * 10 + (__c - '0');
+ else
+ break;
+ }
+ if (__i == 2 || __i == 4)
+ __tm->tm_year = __i == 2 ? __value : __value - 1900;
+ else
+ __err |= ios_base::failbit;
+
+ if (__beg == __end)
+ __err |= ios_base::eofbit;
+ return __beg;
+ }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ time_put<_CharT, _OutIter>::
+ put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm,
+ const _CharT* __beg, const _CharT* __end) const
+ {
+ const locale& __loc = __io._M_getloc();
+ ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+ for (; __beg != __end; ++__beg)
+ if (__ctype.narrow(*__beg, 0) != '%')
+ {
+ *__s = *__beg;
+ ++__s;
+ }
+ else if (++__beg != __end)
+ {
+ char __format;
+ char __mod = 0;
+ const char __c = __ctype.narrow(*__beg, 0);
+ if (__c != 'E' && __c != 'O')
+ __format = __c;
+ else if (++__beg != __end)
+ {
+ __mod = __c;
+ __format = __ctype.narrow(*__beg, 0);
+ }
+ else
+ break;
+ __s = this->do_put(__s, __io, __fill, __tm, __format, __mod);
+ }
+ else
+ break;
+ return __s;
+ }
+
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ time_put<_CharT, _OutIter>::
+ do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm,
+ char __format, char __mod) const
+ {
+ const locale& __loc = __io._M_getloc();
+ ctype<_CharT> const& __ctype = use_facet<ctype<_CharT> >(__loc);
+ __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+
+ // NB: This size is arbitrary. Should this be a data member,
+ // initialized at construction?
+ const size_t __maxlen = 128;
+ char_type* __res =
+ static_cast<char_type*>(__builtin_alloca(sizeof(char_type) * __maxlen));
+
+ // NB: In IEE 1003.1-200x, and perhaps other locale models, it
+ // is possible that the format character will be longer than one
+ // character. Possibilities include 'E' or 'O' followed by a
+ // format character: if __mod is not the default argument, assume
+ // it's a valid modifier.
+ char_type __fmt[4];
+ __fmt[0] = __ctype.widen('%');
+ if (!__mod)
+ {
+ __fmt[1] = __format;
+ __fmt[2] = char_type();
+ }
+ else
+ {
+ __fmt[1] = __mod;
+ __fmt[2] = __format;
+ __fmt[3] = char_type();
+ }
+
+ __tp._M_put(__res, __maxlen, __fmt, __tm);
+
+ // Write resulting, fully-formatted string to output iterator.
+ return std::__write(__s, __res, char_traits<char_type>::length(__res));
+ }
+
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class moneypunct<char, false>;
+ extern template class moneypunct<char, true>;
+ extern template class moneypunct_byname<char, false>;
+ extern template class moneypunct_byname<char, true>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE money_get<char>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE money_put<char>;
+ extern template class __timepunct<char>;
+ extern template class time_put<char>;
+ extern template class time_put_byname<char>;
+ extern template class time_get<char>;
+ extern template class time_get_byname<char>;
+ extern template class messages<char>;
+ extern template class messages_byname<char>;
+
+ extern template
+ const moneypunct<char, true>&
+ use_facet<moneypunct<char, true> >(const locale&);
+
+ extern template
+ const moneypunct<char, false>&
+ use_facet<moneypunct<char, false> >(const locale&);
+
+ extern template
+ const money_put<char>&
+ use_facet<money_put<char> >(const locale&);
+
+ extern template
+ const money_get<char>&
+ use_facet<money_get<char> >(const locale&);
+
+ extern template
+ const __timepunct<char>&
+ use_facet<__timepunct<char> >(const locale&);
+
+ extern template
+ const time_put<char>&
+ use_facet<time_put<char> >(const locale&);
+
+ extern template
+ const time_get<char>&
+ use_facet<time_get<char> >(const locale&);
+
+ extern template
+ const messages<char>&
+ use_facet<messages<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<moneypunct<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<money_put<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<money_get<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<__timepunct<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<time_put<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<time_get<char> >(const locale&);
+
+ extern template
+ bool
+ has_facet<messages<char> >(const locale&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class moneypunct<wchar_t, false>;
+ extern template class moneypunct<wchar_t, true>;
+ extern template class moneypunct_byname<wchar_t, false>;
+ extern template class moneypunct_byname<wchar_t, true>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE money_get<wchar_t>;
+ extern template class _GLIBCXX_LDBL_NAMESPACE money_put<wchar_t>;
+ extern template class __timepunct<wchar_t>;
+ extern template class time_put<wchar_t>;
+ extern template class time_put_byname<wchar_t>;
+ extern template class time_get<wchar_t>;
+ extern template class time_get_byname<wchar_t>;
+ extern template class messages<wchar_t>;
+ extern template class messages_byname<wchar_t>;
+
+ extern template
+ const moneypunct<wchar_t, true>&
+ use_facet<moneypunct<wchar_t, true> >(const locale&);
+
+ extern template
+ const moneypunct<wchar_t, false>&
+ use_facet<moneypunct<wchar_t, false> >(const locale&);
+
+ extern template
+ const money_put<wchar_t>&
+ use_facet<money_put<wchar_t> >(const locale&);
+
+ extern template
+ const money_get<wchar_t>&
+ use_facet<money_get<wchar_t> >(const locale&);
+
+ extern template
+ const __timepunct<wchar_t>&
+ use_facet<__timepunct<wchar_t> >(const locale&);
+
+ extern template
+ const time_put<wchar_t>&
+ use_facet<time_put<wchar_t> >(const locale&);
+
+ extern template
+ const time_get<wchar_t>&
+ use_facet<time_get<wchar_t> >(const locale&);
+
+ extern template
+ const messages<wchar_t>&
+ use_facet<messages<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<moneypunct<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<money_put<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<money_get<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<__timepunct<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<time_put<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<time_get<wchar_t> >(const locale&);
+
+ extern template
+ bool
+ has_facet<messages<wchar_t> >(const locale&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/localefwd.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/localefwd.h
new file mode 100644
index 0000000..909df1e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/localefwd.h
@@ -0,0 +1,183 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file localefwd.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+#ifndef _LOCALE_FWD_H
+#define _LOCALE_FWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++locale.h> // Defines __c_locale, config-specific include
+#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
+#include <cctype>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 22.1.1 Locale
+ class locale;
+
+ template<typename _Facet>
+ bool
+ has_facet(const locale&) throw();
+
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale&);
+
+ // 22.1.3 Convenience interfaces
+ template<typename _CharT>
+ bool
+ isspace(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isprint(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ iscntrl(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isupper(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ islower(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isalpha(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isdigit(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ ispunct(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isxdigit(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isalnum(_CharT, const locale&);
+
+ template<typename _CharT>
+ bool
+ isgraph(_CharT, const locale&);
+
+ template<typename _CharT>
+ _CharT
+ toupper(_CharT, const locale&);
+
+ template<typename _CharT>
+ _CharT
+ tolower(_CharT, const locale&);
+
+ // 22.2.1 and 22.2.1.3 ctype
+ class ctype_base;
+ template<typename _CharT>
+ class ctype;
+ template<> class ctype<char>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<> class ctype<wchar_t>;
+#endif
+ template<typename _CharT>
+ class ctype_byname;
+ // NB: Specialized for char and wchar_t in locale_facets.h.
+
+ class codecvt_base;
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt;
+ template<> class codecvt<char, char, mbstate_t>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<> class codecvt<wchar_t, char, mbstate_t>;
+#endif
+ template<typename _InternT, typename _ExternT, typename _StateT>
+ class codecvt_byname;
+
+ // 22.2.2 and 22.2.3 numeric
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class num_get;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class num_put;
+_GLIBCXX_END_LDBL_NAMESPACE
+ template<typename _CharT> class numpunct;
+ template<typename _CharT> class numpunct_byname;
+
+ // 22.2.4 collation
+ template<typename _CharT>
+ class collate;
+ template<typename _CharT> class
+ collate_byname;
+
+ // 22.2.5 date and time
+ class time_base;
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class time_get;
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class time_get_byname;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class time_put;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class time_put_byname;
+
+ // 22.2.6 money
+ class money_base;
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class money_get;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class money_put;
+_GLIBCXX_END_LDBL_NAMESPACE
+ template<typename _CharT, bool _Intl = false>
+ class moneypunct;
+ template<typename _CharT, bool _Intl = false>
+ class moneypunct_byname;
+
+ // 22.2.7 message retrieval
+ class messages_base;
+ template<typename _CharT>
+ class messages;
+ template<typename _CharT>
+ class messages_byname;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/mask_array.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/mask_array.h
new file mode 100644
index 0000000..f915dd9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/mask_array.h
@@ -0,0 +1,206 @@
+// The template and inlines for the -*- C++ -*- mask_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file mask_array.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _MASK_ARRAY_H
+#define _MASK_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ /**
+ * @brief Reference to selected subset of an array.
+ *
+ * A mask_array is a reference to the actual elements of an array specified
+ * by a bitmask in the form of an array of bool. The way to get a
+ * mask_array is to call operator[](valarray<bool>) on a valarray. The
+ * returned mask_array then permits carrying operations out on the
+ * referenced subset of elements in the original valarray.
+ *
+ * For example, if a mask_array is obtained using the array (false, true,
+ * false, true) as an argument, the mask array has two elements referring
+ * to array[1] and array[3] in the underlying array.
+ *
+ * @param Tp Element type.
+ */
+ template <class _Tp>
+ class mask_array
+ {
+ public:
+ typedef _Tp value_type;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ mask_array (const mask_array&);
+
+ /// Assignment operator. Assigns elements to corresponding elements
+ /// of @a a.
+ mask_array& operator=(const mask_array&);
+
+ void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
+ void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
+ void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
+ void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
+ void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
+ void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
+ void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
+ void operator=(const _Tp&) const;
+
+ // ~mask_array ();
+
+ template<class _Dom>
+ void operator=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator*=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator/=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator%=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator+=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator-=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator^=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator&=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator|=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator<<=(const _Expr<_Dom,_Tp>&) const;
+ template<class _Dom>
+ void operator>>=(const _Expr<_Dom,_Tp>&) const;
+
+ private:
+ mask_array(_Array<_Tp>, size_t, _Array<bool>);
+ friend class valarray<_Tp>;
+
+ const size_t _M_sz;
+ const _Array<bool> _M_mask;
+ const _Array<_Tp> _M_array;
+
+ // not implemented
+ mask_array();
+ };
+
+ template<typename _Tp>
+ inline mask_array<_Tp>::mask_array(const mask_array<_Tp>& a)
+ : _M_sz(a._M_sz), _M_mask(a._M_mask), _M_array(a._M_array) {}
+
+ template<typename _Tp>
+ inline
+ mask_array<_Tp>::mask_array(_Array<_Tp> __a, size_t __s, _Array<bool> __m)
+ : _M_sz(__s), _M_mask(__m), _M_array(__a) {}
+
+ template<typename _Tp>
+ inline mask_array<_Tp>&
+ mask_array<_Tp>::operator=(const mask_array<_Tp>& __a)
+ {
+ std::__valarray_copy(__a._M_array, __a._M_mask,
+ _M_sz, _M_array, _M_mask);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline void
+ mask_array<_Tp>::operator=(const _Tp& __t) const
+ { std::__valarray_fill(_M_array, _M_sz, _M_mask, __t); }
+
+ template<typename _Tp>
+ inline void
+ mask_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+ { std::__valarray_copy(_Array<_Tp>(__v), __v.size(), _M_array, _M_mask); }
+
+ template<typename _Tp>
+ template<class _Ex>
+ inline void
+ mask_array<_Tp>::operator=(const _Expr<_Ex, _Tp>& __e) const
+ { std::__valarray_copy(__e, __e.size(), _M_array, _M_mask); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
+ template<typename _Tp> \
+ inline void \
+ mask_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
+ { \
+ _Array_augmented_##_Name(_M_array, _M_mask, \
+ _Array<_Tp>(__v), __v.size()); \
+ } \
+ \
+ template<typename _Tp> \
+ template<class _Dom> \
+ inline void \
+ mask_array<_Tp>::operator _Op##=(const _Expr<_Dom, _Tp>& __e) const\
+ { \
+ _Array_augmented_##_Name(_M_array, _M_mask, __e, __e.size()); \
+ }
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _MASK_ARRAY_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/move.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/move.h
new file mode 100644
index 0000000..ef86c4d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/move.h
@@ -0,0 +1,98 @@
+// Move, forward and identity for C++0x + swap -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file move.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _MOVE_H
+#define _MOVE_H 1
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/concept_check.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <type_traits>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 20.2.2, forward/move
+ template<typename _Tp>
+ struct identity
+ {
+ typedef _Tp type;
+ };
+
+ template<typename _Tp>
+ inline _Tp&&
+ forward(typename std::identity<_Tp>::type&& __t)
+ { return __t; }
+
+ template<typename _Tp>
+ inline typename std::remove_reference<_Tp>::type&&
+ move(_Tp&& __t)
+ { return __t; }
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MOVE(_Tp) std::move(_Tp)
+#else
+#define _GLIBCXX_MOVE(_Tp) (_Tp)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Swaps two values.
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return Nothing.
+ */
+ template<typename _Tp>
+ inline void
+ swap(_Tp& __a, _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
+
+ _Tp __tmp = _GLIBCXX_MOVE(__a);
+ __a = _GLIBCXX_MOVE(__b);
+ __b = _GLIBCXX_MOVE(__tmp);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 809. std::swap should be overloaded for array types.
+ template<typename _Tp, size_t _Nm>
+ inline void
+ swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
+ {
+ for (size_t __n = 0; __n < _Nm; ++__n)
+ swap(__a[__n], __b[__n]);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _MOVE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream.tcc
new file mode 100644
index 0000000..e2cbb58
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream.tcc
@@ -0,0 +1,407 @@
+// ostream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ostream.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.6.2 Output streams
+//
+
+#ifndef _OSTREAM_TCC
+#define _OSTREAM_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>::sentry::
+ sentry(basic_ostream<_CharT, _Traits>& __os)
+ : _M_ok(false), _M_os(__os)
+ {
+ // XXX MT
+ if (__os.tie() && __os.good())
+ __os.tie()->flush();
+
+ if (__os.good())
+ _M_ok = true;
+ else
+ __os.setstate(ios_base::failbit);
+ }
+
+ template<typename _CharT, typename _Traits>
+ template<typename _ValueT>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ _M_insert(_ValueT __v)
+ {
+ sentry __cerb(*this);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const __num_put_type& __np = __check_facet(this->_M_num_put);
+ if (__np.put(*this, *this, this->fill(), __v).failed())
+ __err |= ios_base::badbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(short __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 117. basic_ostream uses nonexistent num_put member functions.
+ const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+ if (__fmt == ios_base::oct || __fmt == ios_base::hex)
+ return _M_insert(static_cast<long>(static_cast<unsigned short>(__n)));
+ else
+ return _M_insert(static_cast<long>(__n));
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(int __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 117. basic_ostream uses nonexistent num_put member functions.
+ const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+ if (__fmt == ios_base::oct || __fmt == ios_base::hex)
+ return _M_insert(static_cast<long>(static_cast<unsigned int>(__n)));
+ else
+ return _M_insert(static_cast<long>(__n));
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ operator<<(__streambuf_type* __sbin)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ sentry __cerb(*this);
+ if (__cerb && __sbin)
+ {
+ __try
+ {
+ if (!__copy_streambufs(__sbin, this->rdbuf()))
+ __err |= ios_base::failbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::failbit); }
+ }
+ else if (!__sbin)
+ __err |= ios_base::badbit;
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ put(char_type __c)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::put(char_type) is an unformatted output function.
+ // DR 63. Exception-handling policy for unformatted output.
+ // Unformatted output functions should catch exceptions thrown
+ // from streambuf members.
+ sentry __cerb(*this);
+ if (__cerb)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ const int_type __put = this->rdbuf()->sputc(__c);
+ if (traits_type::eq_int_type(__put, traits_type::eof()))
+ __err |= ios_base::badbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ write(const _CharT* __s, streamsize __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::write(const char_type*, streamsize) is an
+ // unformatted output function.
+ // DR 63. Exception-handling policy for unformatted output.
+ // Unformatted output functions should catch exceptions thrown
+ // from streambuf members.
+ sentry __cerb(*this);
+ if (__cerb)
+ {
+ __try
+ { _M_write(__s, __n); }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ }
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ flush()
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // basic_ostream::flush() is *not* an unformatted output function.
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
+ __err |= ios_base::badbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ typename basic_ostream<_CharT, _Traits>::pos_type
+ basic_ostream<_CharT, _Traits>::
+ tellp()
+ {
+ pos_type __ret = pos_type(-1);
+ __try
+ {
+ if (!this->fail())
+ __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ seekp(pos_type __pos)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ if (!this->fail())
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekpos(__pos,
+ ios_base::out);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ basic_ostream<_CharT, _Traits>::
+ seekp(off_type __off, ios_base::seekdir __dir)
+ {
+ ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+ __try
+ {
+ if (!this->fail())
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 136. seekp, seekg setting wrong streams?
+ const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir,
+ ios_base::out);
+
+ // 129. Need error indication from seekp() and seekg()
+ if (__p == pos_type(off_type(-1)))
+ __err |= ios_base::failbit;
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ this->_M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { this->_M_setstate(ios_base::badbit); }
+ if (__err)
+ this->setstate(__err);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
+ {
+ if (!__s)
+ __out.setstate(ios_base::badbit);
+ else
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 167. Improper use of traits_type::length()
+ const size_t __clen = char_traits<char>::length(__s);
+ __try
+ {
+ struct __ptr_guard
+ {
+ _CharT *__p;
+ __ptr_guard (_CharT *__ip): __p(__ip) { }
+ ~__ptr_guard() { delete[] __p; }
+ _CharT* __get() { return __p; }
+ } __pg (new _CharT[__clen]);
+
+ _CharT *__ws = __pg.__get();
+ for (size_t __i = 0; __i < __clen; ++__i)
+ __ws[__i] = __out.widen(__s[__i]);
+ __ostream_insert(__out, __ws, __clen);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __out._M_setstate(ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __out._M_setstate(ios_base::badbit); }
+ }
+ return __out;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_ostream<char>;
+ extern template ostream& endl(ostream&);
+ extern template ostream& ends(ostream&);
+ extern template ostream& flush(ostream&);
+ extern template ostream& operator<<(ostream&, char);
+ extern template ostream& operator<<(ostream&, unsigned char);
+ extern template ostream& operator<<(ostream&, signed char);
+ extern template ostream& operator<<(ostream&, const char*);
+ extern template ostream& operator<<(ostream&, const unsigned char*);
+ extern template ostream& operator<<(ostream&, const signed char*);
+
+ extern template ostream& ostream::_M_insert(long);
+ extern template ostream& ostream::_M_insert(unsigned long);
+ extern template ostream& ostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+ extern template ostream& ostream::_M_insert(long long);
+ extern template ostream& ostream::_M_insert(unsigned long long);
+#endif
+ extern template ostream& ostream::_M_insert(double);
+ extern template ostream& ostream::_M_insert(long double);
+ extern template ostream& ostream::_M_insert(const void*);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_ostream<wchar_t>;
+ extern template wostream& endl(wostream&);
+ extern template wostream& ends(wostream&);
+ extern template wostream& flush(wostream&);
+ extern template wostream& operator<<(wostream&, wchar_t);
+ extern template wostream& operator<<(wostream&, char);
+ extern template wostream& operator<<(wostream&, const wchar_t*);
+ extern template wostream& operator<<(wostream&, const char*);
+
+ extern template wostream& wostream::_M_insert(long);
+ extern template wostream& wostream::_M_insert(unsigned long);
+ extern template wostream& wostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+ extern template wostream& wostream::_M_insert(long long);
+ extern template wostream& wostream::_M_insert(unsigned long long);
+#endif
+ extern template wostream& wostream::_M_insert(double);
+ extern template wostream& wostream::_M_insert(long double);
+ extern template wostream& wostream::_M_insert(const void*);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream_insert.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream_insert.h
new file mode 100644
index 0000000..e0017ee
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/ostream_insert.h
@@ -0,0 +1,127 @@
+// Helpers for ostream inserters -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ostream_insert.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _OSTREAM_INSERT_H
+#define _OSTREAM_INSERT_H 1
+
+#pragma GCC system_header
+
+#include <iosfwd>
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ inline void
+ __ostream_write(basic_ostream<_CharT, _Traits>& __out,
+ const _CharT* __s, streamsize __n)
+ {
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const streamsize __put = __out.rdbuf()->sputn(__s, __n);
+ if (__put != __n)
+ __out.setstate(__ios_base::badbit);
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline void
+ __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n)
+ {
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const _CharT __c = __out.fill();
+ for (; __n > 0; --__n)
+ {
+ const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c);
+ if (_Traits::eq_int_type(__put, _Traits::eof()))
+ {
+ __out.setstate(__ios_base::badbit);
+ break;
+ }
+ }
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ __ostream_insert(basic_ostream<_CharT, _Traits>& __out,
+ const _CharT* __s, streamsize __n)
+ {
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ typename __ostream_type::sentry __cerb(__out);
+ if (__cerb)
+ {
+ __try
+ {
+ const streamsize __w = __out.width();
+ if (__w > __n)
+ {
+ const bool __left = ((__out.flags()
+ & __ios_base::adjustfield)
+ == __ios_base::left);
+ if (!__left)
+ __ostream_fill(__out, __w - __n);
+ if (__out.good())
+ __ostream_write(__out, __s, __n);
+ if (__left && __out.good())
+ __ostream_fill(__out, __w - __n);
+ }
+ else
+ __ostream_write(__out, __s, __n);
+ __out.width(0);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __out._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __out._M_setstate(__ios_base::badbit); }
+ }
+ return __out;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template wostream& __ostream_insert(wostream&, const wchar_t*,
+ streamsize);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _OSTREAM_INSERT_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/postypes.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/postypes.h
new file mode 100644
index 0000000..8066d9b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/postypes.h
@@ -0,0 +1,241 @@
+// Position types -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file postypes.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.4.1 - Types
+// ISO C++ 14882: 27.4.3 - Template class fpos
+//
+
+#ifndef _GLIBCXX_POSTYPES_H
+#define _GLIBCXX_POSTYPES_H 1
+
+#pragma GCC system_header
+
+#include <cwchar> // For mbstate_t
+
+// XXX If <stdint.h> is really needed, make sure to define the macros
+// before including it, in order not to break <tr1/cstdint> (and <cstdint>
+// in C++0x). Reconsider all this as soon as possible...
+#if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \
+ && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG))
+
+#ifndef __STDC_LIMIT_MACROS
+# define _UNDEF__STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+#endif
+#ifndef __STDC_CONSTANT_MACROS
+# define _UNDEF__STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+#endif
+#include <stdint.h> // For int64_t
+#ifdef _UNDEF__STDC_LIMIT_MACROS
+# undef __STDC_LIMIT_MACROS
+# undef _UNDEF__STDC_LIMIT_MACROS
+#endif
+#ifdef _UNDEF__STDC_CONSTANT_MACROS
+# undef __STDC_CONSTANT_MACROS
+# undef _UNDEF__STDC_CONSTANT_MACROS
+#endif
+
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // The types streamoff, streampos and wstreampos and the class
+ // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2,
+ // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the
+ // behaviour of these types is mostly implementation defined or
+ // unspecified. The behaviour in this implementation is as noted
+ // below.
+
+ /**
+ * @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>.
+ *
+ * In clauses 21.1.3.1 and 27.4.1 streamoff is described as an
+ * implementation defined type.
+ * Note: In versions of GCC up to and including GCC 3.3, streamoff
+ * was typedef long.
+ */
+#ifdef _GLIBCXX_HAVE_INT64_T_LONG
+ typedef long streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
+ typedef long long streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T)
+ typedef int64_t streamoff;
+#else
+ typedef long long streamoff;
+#endif
+
+ /// Integral type for I/O operation counts and buffer sizes.
+ typedef ptrdiff_t streamsize; // Signed integral type
+
+ /**
+ * @brief Class representing stream positions.
+ *
+ * The standard places no requirements upon the template parameter StateT.
+ * In this implementation StateT must be DefaultConstructible,
+ * CopyConstructible and Assignable. The standard only requires that fpos
+ * should contain a member of type StateT. In this implementation it also
+ * contains an offset stored as a signed integer.
+ *
+ * @param StateT Type passed to and returned from state().
+ */
+ template<typename _StateT>
+ class fpos
+ {
+ private:
+ streamoff _M_off;
+ _StateT _M_state;
+
+ public:
+ // The standard doesn't require that fpos objects can be default
+ // constructed. This implementation provides a default
+ // constructor that initializes the offset to 0 and default
+ // constructs the state.
+ fpos()
+ : _M_off(0), _M_state() { }
+
+ // The standard requires that fpos objects can be constructed
+ // from streamoff objects using the constructor syntax, and
+ // fails to give any meaningful semantics. In this
+ // implementation implicit conversion is also allowed, and this
+ // constructor stores the streamoff as the offset and default
+ // constructs the state.
+ /// Construct position from offset.
+ fpos(streamoff __off)
+ : _M_off(__off), _M_state() { }
+
+ /// Convert to streamoff.
+ operator streamoff() const { return _M_off; }
+
+ /// Remember the value of @a st.
+ void
+ state(_StateT __st)
+ { _M_state = __st; }
+
+ /// Return the last set value of @a st.
+ _StateT
+ state() const
+ { return _M_state; }
+
+ // The standard requires that this operator must be defined, but
+ // gives no semantics. In this implementation it just adds its
+ // argument to the stored offset and returns *this.
+ /// Add offset to this position.
+ fpos&
+ operator+=(streamoff __off)
+ {
+ _M_off += __off;
+ return *this;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // gives no semantics. In this implementation it just subtracts
+ // its argument from the stored offset and returns *this.
+ /// Subtract offset from this position.
+ fpos&
+ operator-=(streamoff __off)
+ {
+ _M_off -= __off;
+ return *this;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines its semantics only in terms of operator-. In this
+ // implementation it constructs a copy of *this, adds the
+ // argument to that copy using operator+= and then returns the
+ // copy.
+ /// Add position and offset.
+ fpos
+ operator+(streamoff __off) const
+ {
+ fpos __pos(*this);
+ __pos += __off;
+ return __pos;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines its semantics only in terms of operator+. In this
+ // implementation it constructs a copy of *this, subtracts the
+ // argument from that copy using operator-= and then returns the
+ // copy.
+ /// Subtract offset from position.
+ fpos
+ operator-(streamoff __off) const
+ {
+ fpos __pos(*this);
+ __pos -= __off;
+ return __pos;
+ }
+
+ // The standard requires that this operator must be defined, but
+ // defines its semantics only in terms of operator+. In this
+ // implementation it returns the difference between the offset
+ // stored in *this and in the argument.
+ /// Subtract position to return offset.
+ streamoff
+ operator-(const fpos& __other) const
+ { return _M_off - __other._M_off; }
+ };
+
+ // The standard only requires that operator== must be an
+ // equivalence relation. In this implementation two fpos<StateT>
+ // objects belong to the same equivalence class if the contained
+ // offsets compare equal.
+ /// Test if equivalent to another position.
+ template<typename _StateT>
+ inline bool
+ operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
+ { return streamoff(__lhs) == streamoff(__rhs); }
+
+ template<typename _StateT>
+ inline bool
+ operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
+ { return streamoff(__lhs) != streamoff(__rhs); }
+
+ // Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos
+ // as implementation defined types, but clause 27.2 requires that
+ // they must both be typedefs for fpos<mbstate_t>
+ /// File position for char streams.
+ typedef fpos<mbstate_t> streampos;
+ /// File position for wchar_t streams.
+ typedef fpos<mbstate_t> wstreampos;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// File position for char16_t streams.
+ typedef fpos<mbstate_t> u16streampos;
+ /// File position for char32_t streams.
+ typedef fpos<mbstate_t> u32streampos;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/shared_ptr.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/shared_ptr.h
new file mode 100644
index 0000000..a378ae0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/shared_ptr.h
@@ -0,0 +1,1591 @@
+// shared_ptr and weak_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file bits/shared_ptr.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _SHARED_PTR_H
+#define _SHARED_PTR_H 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup pointer_abstractions
+ * @{
+ */
+
+ // counted ptr with no deleter or allocator support
+ template<typename _Ptr, _Lock_policy _Lp>
+ class _Sp_counted_ptr
+ : public _Sp_counted_base<_Lp>
+ {
+ public:
+ _Sp_counted_ptr(_Ptr __p)
+ : _M_ptr(__p) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { delete _M_ptr; }
+
+ virtual void
+ _M_destroy() // nothrow
+ { delete this; }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return 0; }
+
+ _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
+ _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
+
+ protected:
+ _Ptr _M_ptr; // copy constructor must not throw
+ };
+
+ // support for custom deleter and/or allocator
+ template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_deleter
+ : public _Sp_counted_ptr<_Ptr, _Lp>
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_deleter>::other _My_alloc_type;
+
+ // Helper class that stores the Deleter and also acts as an allocator.
+ // Used to dispose of the owned pointer and the internal refcount
+ // Requires that copies of _Alloc can free each other's memory.
+ struct _My_Deleter
+ : public _My_alloc_type // copy constructor must not throw
+ {
+ _Deleter _M_del; // copy constructor must not throw
+ _My_Deleter(_Deleter __d, const _Alloc& __a)
+ : _My_alloc_type(__a), _M_del(__d) { }
+ };
+
+ protected:
+ typedef _Sp_counted_ptr<_Ptr, _Lp> _Base_type;
+
+ public:
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d)
+ : _Base_type(__p), _M_del(__d, _Alloc()) { }
+
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a)
+ : _Base_type(__p), _M_del(__d, __a) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { _M_del._M_del(_Base_type::_M_ptr); }
+
+ virtual void
+ _M_destroy() // nothrow
+ {
+ _My_alloc_type __a(_M_del);
+ this->~_Sp_counted_deleter();
+ __a.deallocate(this, 1);
+ }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; }
+
+ protected:
+ _My_Deleter _M_del; // copy constructor must not throw
+ };
+
+ // helpers for make_shared / allocate_shared
+
+ template<typename _Tp>
+ struct _Sp_destroy_inplace
+ {
+ void operator()(_Tp* __p) const { if (__p) __p->~_Tp(); }
+ };
+
+ struct _Sp_make_shared_tag { };
+
+ template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_ptr_inplace
+ : public _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ {
+ typedef _Sp_counted_deleter<_Tp*, _Sp_destroy_inplace<_Tp>, _Alloc, _Lp>
+ _Base_type;
+
+ public:
+ _Sp_counted_ptr_inplace(_Alloc __a)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ template<typename... _Args>
+ _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
+ : _Base_type(static_cast<_Tp*>(0), _Sp_destroy_inplace<_Tp>(), __a)
+ , _M_storage()
+ {
+ void* __p = &_M_storage;
+ ::new (__p) _Tp(std::forward<_Args>(__args)...); // might throw
+ _Base_type::_Base_type::_M_ptr = static_cast<_Tp*>(__p);
+ }
+
+ // override because the allocator needs to know the dynamic type
+ virtual void
+ _M_destroy() // nothrow
+ {
+ typedef typename _Alloc::template
+ rebind<_Sp_counted_ptr_inplace>::other _My_alloc_type;
+ _My_alloc_type __a(_Base_type::_M_del);
+ this->~_Sp_counted_ptr_inplace();
+ __a.deallocate(this, 1);
+ }
+
+ // sneaky trick so __shared_ptr can get the managed pointer
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ {
+ return __ti == typeid(_Sp_make_shared_tag)
+ ? static_cast<void*>(&_M_storage)
+ : _Base_type::_M_get_deleter(__ti);
+ }
+
+ private:
+ typename aligned_storage<sizeof(_Tp), alignment_of<_Tp>::value>::type
+ _M_storage;
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __weak_count;
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __shared_count
+ {
+ public:
+ __shared_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ template<typename _Ptr>
+ __shared_count(_Ptr __p) : _M_pi(0)
+ {
+ __try
+ {
+ _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
+ }
+ __catch(...)
+ {
+ delete __p;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter>
+ __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+ {
+ // allocator's value_type doesn't matter, will rebind it anyway
+ typedef std::allocator<int> _Alloc;
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef std::allocator<_Sp_cd_type> _Alloc2;
+ _Alloc2 __a2;
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d);
+ }
+ __catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter, typename _Alloc>
+ __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
+ {
+ typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
+ typedef typename _Alloc::template rebind<_Sp_cd_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cd_type(__p, __d, __a);
+ }
+ __catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cd_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ __shared_count(_Sp_make_shared_tag, _Tp*, _Alloc __a, _Args&&... __args)
+ : _M_pi(0)
+ {
+ typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
+ typedef typename _Alloc::template rebind<_Sp_cp_type>::other _Alloc2;
+ _Alloc2 __a2(__a);
+ __try
+ {
+ _M_pi = __a2.allocate(1);
+ ::new(static_cast<void*>(_M_pi)) _Sp_cp_type(__a,
+ std::forward<_Args>(__args)...);
+ }
+ __catch(...)
+ {
+ if (_M_pi)
+ __a2.deallocate(static_cast<_Sp_cp_type*>(_M_pi), 1);
+ __throw_exception_again;
+ }
+ }
+
+#if _GLIBCXX_DEPRECATED
+ // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+ template<typename _Tp>
+ explicit
+ __shared_count(std::auto_ptr<_Tp>&& __r)
+ : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get()))
+ { __r.release(); }
+#endif
+
+ // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
+ template<typename _Tp, typename _Del>
+ explicit
+ __shared_count(std::unique_ptr<_Tp, _Del>&& __r)
+ : _M_pi(_S_create_from_up(std::move(__r)))
+ { __r.release(); }
+
+ // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+ explicit
+ __shared_count(const __weak_count<_Lp>& __r);
+
+ ~__shared_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ }
+
+ __shared_count(const __shared_count& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_copy();
+ }
+
+ __shared_count&
+ operator=(const __shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != _M_pi)
+ {
+ if (__tmp != 0)
+ __tmp->_M_add_ref_copy();
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ _M_pi = __tmp;
+ }
+ return *this;
+ }
+
+ void
+ _M_swap(__shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_unique() const // nothrow
+ { return this->_M_get_use_count() == 1; }
+
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+ bool
+ _M_less(const __shared_count& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ bool
+ _M_less(const __weak_count<_Lp>& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ // friend function injected into enclosing namespace and found by ADL
+ friend inline bool
+ operator==(const __shared_count& __a, const __shared_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ private:
+ friend class __weak_count<_Lp>;
+
+ template<typename _Tp, typename _Del>
+ static _Sp_counted_base<_Lp>*
+ _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+ typename std::enable_if<!std::is_reference<_Del>::value>::type* = 0)
+ {
+ return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>,
+ _Lp>(__r.get(), __r.get_deleter());
+ }
+
+ template<typename _Tp, typename _Del>
+ static _Sp_counted_base<_Lp>*
+ _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r,
+ typename std::enable_if<std::is_reference<_Del>::value>::type* = 0)
+ {
+ typedef typename std::remove_reference<_Del>::type _Del1;
+ typedef std::reference_wrapper<_Del1> _Del2;
+ return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>,
+ _Lp>(__r.get(), std::ref(__r.get_deleter()));
+ }
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+
+ template<_Lock_policy _Lp>
+ class __weak_count
+ {
+ public:
+ __weak_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ __weak_count(const __shared_count<_Lp>& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ __weak_count(const __weak_count<_Lp>& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ ~__weak_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __shared_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ void
+ _M_swap(__weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_less(const __weak_count& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ bool
+ _M_less(const __shared_count<_Lp>& __rhs) const
+ { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
+
+ // friend function injected into enclosing namespace and found by ADL
+ friend inline bool
+ operator==(const __weak_count& __a, const __weak_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ private:
+ friend class __shared_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+ // now that __weak_count is defined we can define this constructor:
+ template<_Lock_policy _Lp>
+ inline
+ __shared_count<_Lp>::
+ __shared_count(const __weak_count<_Lp>& __r)
+ : _M_pi(__r._M_pi)
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_lock();
+ else
+ __throw_bad_weak_ptr();
+ }
+
+ // Forward declarations.
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __shared_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __weak_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __enable_shared_from_this;
+
+ template<typename _Tp>
+ class shared_ptr;
+
+ template<typename _Tp>
+ class weak_ptr;
+
+ template<typename _Tp>
+ class enable_shared_from_this;
+
+ // Support for enable_shared_from_this.
+
+ // Friend of __enable_shared_from_this.
+ template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&,
+ const __enable_shared_from_this<_Tp1,
+ _Lp>*, const _Tp2*);
+
+ // Friend of enable_shared_from_this.
+ template<typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<>&,
+ const enable_shared_from_this<_Tp1>*,
+ const _Tp2*);
+
+ template<_Lock_policy _Lp>
+ inline void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
+ { }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ /** @brief Construct an empty %__shared_ptr.
+ * @post use_count()==0 && get()==0
+ */
+ __shared_ptr()
+ : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p.
+ * @param __p A pointer that is convertible to element_type*.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @c delete @a __p is called.
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(_Tp1* __p)
+ : _M_ptr(__p), _M_refcount(__p)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ //
+ // Requirements: _Deleter's copy constructor and destructor must
+ // not throw
+ //
+ // __shared_ptr will release __p by calling __d(__p)
+ //
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ * and the deleter @a __d.
+ * @param __p A pointer.
+ * @param __d A deleter.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @a __d(__p) is called.
+ */
+ template<typename _Tp1, typename _Deleter>
+ __shared_ptr(_Tp1* __p, _Deleter __d)
+ : _M_ptr(__p), _M_refcount(__p, __d)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ //
+ // Requirements: _Deleter's copy constructor and destructor must
+ // not throw _Alloc's copy constructor and destructor must not
+ // throw.
+ //
+ // __shared_ptr will release __p by calling __d(__p)
+ //
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ * and the deleter @a __d.
+ * @param __p A pointer.
+ * @param __d A deleter.
+ * @param __a An allocator.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @a __d(__p) is called.
+ */
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ __shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : _M_ptr(__p), _M_refcount(__p, __d, __a)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ /** @brief Constructs a %__shared_ptr instance that stores @a __p
+ * and shares ownership with @a __r.
+ * @param __r A %__shared_ptr.
+ * @param __p A pointer that will remain valid while @a *__r is valid.
+ * @post get() == __p && use_count() == __r.use_count()
+ *
+ * This can be used to construct a @c shared_ptr to a sub-object
+ * of an object managed by an existing @c shared_ptr.
+ *
+ * @code
+ * shared_ptr< pair<int,int> > pii(new pair<int,int>());
+ * shared_ptr<int> pi(pii, &pii->first);
+ * assert(pii.use_count() == 2);
+ * @endcode
+ */
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p)
+ : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
+ { }
+
+ // generated copy constructor, assignment, destructor are fine.
+
+ /** @brief If @a __r is empty, constructs an empty %__shared_ptr;
+ * otherwise construct a %__shared_ptr that shares ownership
+ * with @a __r.
+ * @param __r A %__shared_ptr.
+ * @post get() == __r.get() && use_count() == __r.use_count()
+ */
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ /** @brief Move-constructs a %__shared_ptr instance from @a __r.
+ * @param __r A %__shared_ptr rvalue.
+ * @post *this contains the old value of @a __r, @a __r is empty.
+ */
+ __shared_ptr(__shared_ptr&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+
+ /** @brief Move-constructs a %__shared_ptr instance from @a __r.
+ * @param __r A %__shared_ptr rvalue.
+ * @post *this contains the old value of @a __r, @a __r is empty.
+ */
+ template<typename _Tp1>
+ __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount() // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_refcount._M_swap(__r._M_refcount);
+ __r._M_ptr = 0;
+ }
+
+ /** @brief Constructs a %__shared_ptr that shares ownership with @a __r
+ * and stores a copy of the pointer stored in @a __r.
+ * @param __r A weak_ptr.
+ * @post use_count() == __r.use_count()
+ * @throw bad_weak_ptr when __r.expired(),
+ * in which case the constructor has no effect.
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // may throw
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // It is now safe to copy __r._M_ptr, as _M_refcount(__r._M_refcount)
+ // did not throw.
+ _M_ptr = __r._M_ptr;
+ }
+
+ template<typename _Tp1, typename _Del>
+ explicit
+ __shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
+
+ /**
+ * If an exception is thrown this constructor has no effect.
+ */
+ template<typename _Tp1, typename _Del>
+ explicit
+ __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : _M_ptr(__r.get()), _M_refcount()
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _Tp1* __tmp = __r.get();
+ _M_refcount = __shared_count<_Lp>(std::move(__r));
+ __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+ }
+
+#if _GLIBCXX_DEPRECATED
+ /**
+ * @post use_count() == 1 and __r.get() == 0
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : _M_ptr(__r.get()), _M_refcount()
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Tp1 is complete, delete __r.release() well-formed
+ _Tp1* __tmp = __r.get();
+ _M_refcount = __shared_count<_Lp>(std::move(__r));
+ __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+ }
+#endif
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
+ return *this;
+ }
+
+#if _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+#endif
+
+ __shared_ptr&
+ operator=(__shared_ptr&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ template<class _Tp1>
+ __shared_ptr&
+ operator=(__shared_ptr<_Tp1, _Lp>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ template<typename _Tp1, typename _Del>
+ __shared_ptr&
+ operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
+
+ template<typename _Tp1, typename _Del>
+ __shared_ptr&
+ operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+ {
+ __shared_ptr(std::move(__r)).swap(*this);
+ return *this;
+ }
+
+ void
+ reset() // never throws
+ { __shared_ptr().swap(*this); }
+
+ template<typename _Tp1>
+ void
+ reset(_Tp1* __p) // _Tp1 must be complete.
+ {
+ // Catch self-reset errors.
+ _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr);
+ __shared_ptr(__p).swap(*this);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ void
+ reset(_Tp1* __p, _Deleter __d)
+ { __shared_ptr(__p, __d).swap(*this); }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ void
+ reset(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ { __shared_ptr(__p, __d, __a).swap(*this); }
+
+ // Allow class instantiation when _Tp is [cv-qual] void.
+ typename std::add_lvalue_reference<_Tp>::type
+ operator*() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
+
+ _Tp*
+ operator->() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
+
+ _Tp*
+ get() const // never throws
+ { return _M_ptr; }
+
+ // Implicit conversion to "bool"
+ private:
+ typedef _Tp* __shared_ptr::*__unspecified_bool_type;
+
+ public:
+ operator __unspecified_bool_type() const // never throws
+ { return _M_ptr == 0 ? 0 : &__shared_ptr::_M_ptr; }
+
+ bool
+ unique() const // never throws
+ { return _M_refcount._M_unique(); }
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ void
+ swap(__shared_ptr<_Tp, _Lp>&& __other) // never throws
+ {
+ std::swap(_M_ptr, __other._M_ptr);
+ _M_refcount._M_swap(__other._M_refcount);
+ }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ protected:
+ // This constructor is non-standard, it is used by allocate_shared.
+ template<typename _Alloc, typename... _Args>
+ __shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+ std::forward<_Args>(__args)...)
+ {
+ // _M_ptr needs to point to the newly constructed object.
+ // This relies on _Sp_counted_ptr_inplace::_M_get_deleter.
+ void* __p = _M_refcount._M_get_deleter(typeid(__tag));
+ _M_ptr = static_cast<_Tp*>(__p);
+ __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
+ }
+
+ template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
+ typename... _Args>
+ friend __shared_ptr<_Tp1, _Lp1>
+ __allocate_shared(_Alloc __a, _Args&&... __args);
+
+ private:
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_refcount._M_get_deleter(__ti); }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+
+ template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
+
+ _Tp* _M_ptr; // Contained pointer.
+ __shared_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+ // 20.8.13.2.7 shared_ptr comparisons
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator==(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() == __b.get(); }
+
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() != __b.get(); }
+
+ template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
+ inline bool
+ operator<(const __shared_ptr<_Tp1, _Lp>& __a,
+ const __shared_ptr<_Tp2, _Lp>& __b)
+ { return __a.get() < __b.get(); }
+
+ template<typename _Sp>
+ struct _Sp_less : public binary_function<_Sp, _Sp, bool>
+ {
+ bool
+ operator()(const _Sp& __lhs, const _Sp& __rhs) const
+ {
+ return std::less<typename _Sp::element_type*>()(__lhs.get(),
+ __rhs.get());
+ }
+ };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct less<__shared_ptr<_Tp, _Lp>>
+ : public _Sp_less<__shared_ptr<_Tp, _Lp>>
+ { };
+
+ // XXX LessThanComparable<_Tp> concept should provide >, >= and <=
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator>(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() > __b.get(); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator>=(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() >= __b.get(); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline bool
+ operator<=(const __shared_ptr<_Tp, _Lp>& __a,
+ const __shared_ptr<_Tp, _Lp>& __b)
+ { return __a.get() <= __b.get(); }
+
+ // 2.2.3.8 shared_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__shared_ptr<_Tp, _Lp>&& __a, __shared_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>&& __b)
+ { __a.swap(__b); }
+
+ // 2.2.3.9 shared_ptr casts
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); }
+
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); }
+
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ {
+ if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+ return __shared_ptr<_Tp, _Lp>(__r, __p);
+ return __shared_ptr<_Tp, _Lp>();
+ }
+
+ // 2.2.3.7 shared_ptr I/O
+ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
+ std::basic_ostream<_Ch, _Tr>&
+ operator<<(std::basic_ostream<_Ch, _Tr>& __os,
+ const __shared_ptr<_Tp, _Lp>& __p)
+ {
+ __os << __p.get();
+ return __os;
+ }
+
+ // 2.2.3.10 shared_ptr get_deleter (experimental)
+ template<typename _Del, typename _Tp, _Lock_policy _Lp>
+ inline _Del*
+ get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
+ { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __weak_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ __weak_ptr()
+ : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ // Generated copy constructor, assignment, destructor are fine.
+
+ // The "obvious" converting constructor implementation:
+ //
+ // template<typename _Tp1>
+ // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ // { }
+ //
+ // has a serious problem.
+ //
+ // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
+ // conversion may require access to *__r._M_ptr (virtual inheritance).
+ //
+ // It is not possible to avoid spurious access violations since
+ // in multithreaded programs __r._M_ptr may be invalidated at any point.
+ template<typename _Tp1>
+ __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_ptr = __r.lock().get();
+ }
+
+ template<typename _Tp1>
+ __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r.lock().get();
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ __shared_ptr<_Tp, _Lp>
+ lock() const // never throws
+ {
+#ifdef __GTHREADS
+ // Optimization: avoid throw overhead.
+ if (expired())
+ return __shared_ptr<element_type, _Lp>();
+
+ __try
+ {
+ return __shared_ptr<element_type, _Lp>(*this);
+ }
+ __catch(const bad_weak_ptr&)
+ {
+ // Q: How can we get here?
+ // A: Another thread may have invalidated r after the
+ // use_count test above.
+ return __shared_ptr<element_type, _Lp>();
+ }
+
+#else
+ // Optimization: avoid try/catch overhead when single threaded.
+ return expired() ? __shared_ptr<element_type, _Lp>()
+ : __shared_ptr<element_type, _Lp>(*this);
+
+#endif
+ } // XXX MT
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ bool
+ expired() const // never throws
+ { return _M_refcount._M_get_use_count() == 0; }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ template<typename _Tp1>
+ bool
+ owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const
+ { return _M_refcount._M_less(__rhs._M_refcount); }
+
+ void
+ reset() // never throws
+ { __weak_ptr().swap(*this); }
+
+ void
+ swap(__weak_ptr& __s) // never throws
+ {
+ std::swap(_M_ptr, __s._M_ptr);
+ _M_refcount._M_swap(__s._M_refcount);
+ }
+
+ // comparisons
+ template<typename _Tp1>
+ bool operator<(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+ template<typename _Tp1>
+ bool operator<=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+ template<typename _Tp1>
+ bool operator>(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+ template<typename _Tp1>
+ bool operator>=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
+
+ private:
+ // Used by __enable_shared_from_this.
+ void
+ _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
+ {
+ _M_ptr = __ptr;
+ _M_refcount = __refcount;
+ }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ friend class __enable_shared_from_this<_Tp, _Lp>;
+ friend class enable_shared_from_this<_Tp>;
+
+ _Tp* _M_ptr; // Contained pointer.
+ __weak_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+ // 20.8.13.3.7 weak_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ /// owner_less
+ template<typename _Tp> struct owner_less;
+
+ template<typename _Tp, typename _Tp1>
+ struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __lhs, const _Tp& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+ bool
+ operator()(const _Tp& __lhs, const _Tp1& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+ bool
+ operator()(const _Tp1& __lhs, const _Tp& __rhs) const
+ { return __lhs.owner_before(__rhs); }
+ };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct owner_less<__shared_ptr<_Tp, _Lp>>
+ : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
+ { };
+
+ template<typename _Tp, _Lock_policy _Lp>
+ struct owner_less<__weak_ptr<_Tp, _Lp>>
+ : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
+ {
+ };
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __enable_shared_from_this
+ {
+ protected:
+ __enable_shared_from_this() { }
+
+ __enable_shared_from_this(const __enable_shared_from_this&) { }
+
+ __enable_shared_from_this&
+ operator=(const __enable_shared_from_this&)
+ { return *this; }
+
+ ~__enable_shared_from_this() { }
+
+ public:
+ __shared_ptr<_Tp, _Lp>
+ shared_from_this()
+ { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
+
+ __shared_ptr<const _Tp, _Lp>
+ shared_from_this() const
+ { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
+ const __enable_shared_from_this* __pe,
+ const _Tp1* __px)
+ {
+ if (__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
+ };
+
+ /**
+ * @brief A smart pointer with reference-counted copy semantics.
+ *
+ * The object pointed to is deleted when the last shared_ptr pointing to
+ * it is destroyed or reset.
+ */
+ template<typename _Tp>
+ class shared_ptr
+ : public __shared_ptr<_Tp>
+ {
+ public:
+ shared_ptr()
+ : __shared_ptr<_Tp>() { }
+
+ template<typename _Tp1>
+ explicit
+ shared_ptr(_Tp1* __p)
+ : __shared_ptr<_Tp>(__p) { }
+
+ template<typename _Tp1, typename _Deleter>
+ shared_ptr(_Tp1* __p, _Deleter __d)
+ : __shared_ptr<_Tp>(__p, __d) { }
+
+ template<typename _Tp1, typename _Deleter, typename _Alloc>
+ shared_ptr(_Tp1* __p, _Deleter __d, const _Alloc& __a)
+ : __shared_ptr<_Tp>(__p, __d, __a) { }
+
+ // Aliasing constructor
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p)
+ : __shared_ptr<_Tp>(__r, __p) { }
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r)
+ : __shared_ptr<_Tp>(__r) { }
+
+ shared_ptr(shared_ptr&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+
+ template<typename _Tp1>
+ shared_ptr(shared_ptr<_Tp1>&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+
+ template<typename _Tp1>
+ explicit
+ shared_ptr(const weak_ptr<_Tp1>& __r)
+ : __shared_ptr<_Tp>(__r) { }
+
+#if _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ explicit
+ shared_ptr(std::auto_ptr<_Tp1>&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+#endif
+
+ template<typename _Tp1, typename _Del>
+ explicit
+ shared_ptr(const std::unique_ptr<_Tp1, _Del>&) = delete;
+
+ template<typename _Tp1, typename _Del>
+ explicit
+ shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r)
+ : __shared_ptr<_Tp>(std::move(__r)) { }
+
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
+ this->__shared_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+#if _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(std::auto_ptr<_Tp1>&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+#endif
+
+ shared_ptr&
+ operator=(shared_ptr&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+
+ template<class _Tp1>
+ shared_ptr&
+ operator=(shared_ptr<_Tp1>&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+
+ template<typename _Tp1, typename _Del>
+ shared_ptr&
+ operator=(const std::unique_ptr<_Tp1, _Del>& __r) = delete;
+
+ template<typename _Tp1, typename _Del>
+ shared_ptr&
+ operator=(std::unique_ptr<_Tp1, _Del>&& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(std::move(__r));
+ return *this;
+ }
+
+ private:
+ // This constructor is non-standard, it is used by allocate_shared.
+ template<typename _Alloc, typename... _Args>
+ shared_ptr(_Sp_make_shared_tag __tag, _Alloc __a, _Args&&... __args)
+ : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
+ { }
+
+ template<typename _Tp1, typename _Alloc, typename... _Args>
+ friend shared_ptr<_Tp1>
+ allocate_shared(_Alloc __a, _Args&&... __args);
+ };
+
+ // 20.8.13.2.7 shared_ptr comparisons
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator==(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+ { return __a.get() == __b.get(); }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator!=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+ { return __a.get() != __b.get(); }
+
+ template<typename _Tp1, typename _Tp2>
+ inline bool
+ operator<(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
+ { return __a.get() < __b.get(); }
+
+ template<typename _Tp>
+ struct less<shared_ptr<_Tp>>
+ : public _Sp_less<shared_ptr<_Tp>>
+ { };
+
+ // 20.8.13.2.9 shared_ptr specialized algorithms.
+ template<typename _Tp>
+ inline void
+ swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp>
+ inline void
+ swap(shared_ptr<_Tp>&& __a, shared_ptr<_Tp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp>
+ inline void
+ swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>&& __b)
+ { __a.swap(__b); }
+
+ // 20.8.13.2.10 shared_ptr casts.
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ static_pointer_cast(const shared_ptr<_Tp1>& __r)
+ { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ const_pointer_cast(const shared_ptr<_Tp1>& __r)
+ { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
+ {
+ if (_Tp* __p = dynamic_cast<_Tp*>(__r.get()))
+ return shared_ptr<_Tp>(__r, __p);
+ return shared_ptr<_Tp>();
+ }
+
+
+ /**
+ * @brief A smart pointer with weak semantics.
+ *
+ * With forwarding constructors and assignment operators.
+ */
+ template<typename _Tp>
+ class weak_ptr
+ : public __weak_ptr<_Tp>
+ {
+ public:
+ weak_ptr()
+ : __weak_ptr<_Tp>() { }
+
+ template<typename _Tp1>
+ weak_ptr(const weak_ptr<_Tp1>& __r)
+ : __weak_ptr<_Tp>(__r) { }
+
+ template<typename _Tp1>
+ weak_ptr(const shared_ptr<_Tp1>& __r)
+ : __weak_ptr<_Tp>(__r) { }
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const weak_ptr<_Tp1>& __r) // never throws
+ {
+ this->__weak_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
+ this->__weak_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+ shared_ptr<_Tp>
+ lock() const // never throws
+ {
+#ifdef __GTHREADS
+ if (this->expired())
+ return shared_ptr<_Tp>();
+
+ __try
+ {
+ return shared_ptr<_Tp>(*this);
+ }
+ __catch(const bad_weak_ptr&)
+ {
+ return shared_ptr<_Tp>();
+ }
+#else
+ return this->expired() ? shared_ptr<_Tp>()
+ : shared_ptr<_Tp>(*this);
+#endif
+ }
+
+ // comparisons
+ template<typename _Tp1>
+ bool operator<(const weak_ptr<_Tp1>&) const = delete;
+ template<typename _Tp1>
+ bool operator<=(const weak_ptr<_Tp1>&) const = delete;
+ template<typename _Tp1>
+ bool operator>(const weak_ptr<_Tp1>&) const = delete;
+ template<typename _Tp1>
+ bool operator>=(const weak_ptr<_Tp1>&) const = delete;
+ };
+
+ // 20.8.13.3.7 weak_ptr specialized algorithms.
+ template<typename _Tp>
+ inline void
+ swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b)
+ { __a.swap(__b); }
+
+ /// owner_less
+ template<typename _Tp>
+ struct owner_less<shared_ptr<_Tp>>
+ : public _Sp_owner_less<shared_ptr<_Tp>, weak_ptr<_Tp>>
+ { };
+
+ template<typename _Tp>
+ struct owner_less<weak_ptr<_Tp>>
+ : public _Sp_owner_less<weak_ptr<_Tp>, shared_ptr<_Tp>>
+ { };
+
+ /**
+ * @brief Base class allowing use of member function shared_from_this.
+ */
+ template<typename _Tp>
+ class enable_shared_from_this
+ {
+ protected:
+ enable_shared_from_this() { }
+
+ enable_shared_from_this(const enable_shared_from_this&) { }
+
+ enable_shared_from_this&
+ operator=(const enable_shared_from_this&)
+ { return *this; }
+
+ ~enable_shared_from_this() { }
+
+ public:
+ shared_ptr<_Tp>
+ shared_from_this()
+ { return shared_ptr<_Tp>(this->_M_weak_this); }
+
+ shared_ptr<const _Tp>
+ shared_from_this() const
+ { return shared_ptr<const _Tp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<>& __pn,
+ const enable_shared_from_this* __pe,
+ const _Tp1* __px)
+ {
+ if (__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable weak_ptr<_Tp> _M_weak_this;
+ };
+
+ template<typename _Tp, _Lock_policy _Lp, typename _Alloc, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __allocate_shared(_Alloc __a, _Args&&... __args)
+ {
+ return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(),
+ std::forward<_Alloc>(__a), std::forward<_Args>(__args)...);
+ }
+
+ template<typename _Tp, _Lock_policy _Lp, typename... _Args>
+ inline __shared_ptr<_Tp, _Lp>
+ __make_shared(_Args&&... __args)
+ {
+ typedef typename std::remove_const<_Tp>::type _Tp_nc;
+ return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
+ }
+
+ /** @brief Create an object that is owned by a shared_ptr.
+ * @param __a An allocator.
+ * @param __args Arguments for the @a _Tp object's constructor.
+ * @return A shared_ptr that owns the newly created object.
+ * @throw An exception thrown from @a _Alloc::allocate or from the
+ * constructor of @a _Tp.
+ *
+ * A copy of @a __a will be used to allocate memory for the shared_ptr
+ * and the new object.
+ */
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ inline shared_ptr<_Tp>
+ allocate_shared(_Alloc __a, _Args&&... __args)
+ {
+ return shared_ptr<_Tp>(_Sp_make_shared_tag(), std::forward<_Alloc>(__a),
+ std::forward<_Args>(__args)...);
+ }
+
+ /** @brief Create an object that is owned by a shared_ptr.
+ * @param __args Arguments for the @a _Tp object's constructor.
+ * @return A shared_ptr that owns the newly created object.
+ * @throw std::bad_alloc, or an exception thrown from the
+ * constructor of @a _Tp.
+ */
+ template<typename _Tp, typename... _Args>
+ inline shared_ptr<_Tp>
+ make_shared(_Args&&... __args)
+ {
+ typedef typename std::remove_const<_Tp>::type _Tp_nc;
+ return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
+ }
+
+ // @} group pointer_abstractions
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _SHARED_PTR_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/slice_array.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/slice_array.h
new file mode 100644
index 0000000..566c764
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/slice_array.h
@@ -0,0 +1,272 @@
+// The template and inlines for the -*- C++ -*- slice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file slice_array.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _SLICE_ARRAY_H
+#define _SLICE_ARRAY_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ /**
+ * @brief Class defining one-dimensional subset of an array.
+ *
+ * The slice class represents a one-dimensional subset of an array,
+ * specified by three parameters: start offset, size, and stride. The
+ * start offset is the index of the first element of the array that is part
+ * of the subset. The size is the total number of elements in the subset.
+ * Stride is the distance between each successive array element to include
+ * in the subset.
+ *
+ * For example, with an array of size 10, and a slice with offset 1, size 3
+ * and stride 2, the subset consists of array elements 1, 3, and 5.
+ */
+ class slice
+ {
+ public:
+ /// Construct an empty slice.
+ slice();
+
+ /**
+ * @brief Construct a slice.
+ *
+ * @param o Offset in array of first element.
+ * @param d Number of elements in slice.
+ * @param s Stride between array elements.
+ */
+ slice(size_t, size_t, size_t);
+
+ /// Return array offset of first slice element.
+ size_t start() const;
+ /// Return size of slice.
+ size_t size() const;
+ /// Return array stride of slice.
+ size_t stride() const;
+
+ private:
+ size_t _M_off; // offset
+ size_t _M_sz; // size
+ size_t _M_st; // stride unit
+ };
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 543. valarray slice default constructor
+ inline
+ slice::slice()
+ : _M_off(0), _M_sz(0), _M_st(0) {}
+
+ inline
+ slice::slice(size_t __o, size_t __d, size_t __s)
+ : _M_off(__o), _M_sz(__d), _M_st(__s) {}
+
+ inline size_t
+ slice::start() const
+ { return _M_off; }
+
+ inline size_t
+ slice::size() const
+ { return _M_sz; }
+
+ inline size_t
+ slice::stride() const
+ { return _M_st; }
+
+ /**
+ * @brief Reference to one-dimensional subset of an array.
+ *
+ * A slice_array is a reference to the actual elements of an array
+ * specified by a slice. The way to get a slice_array is to call
+ * operator[](slice) on a valarray. The returned slice_array then permits
+ * carrying operations out on the referenced subset of elements in the
+ * original valarray. For example, operator+=(valarray) will add values
+ * to the subset of elements in the underlying valarray this slice_array
+ * refers to.
+ *
+ * @param Tp Element type.
+ */
+ template<typename _Tp>
+ class slice_array
+ {
+ public:
+ typedef _Tp value_type;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 253. valarray helper functions are almost entirely useless
+
+ /// Copy constructor. Both slices refer to the same underlying array.
+ slice_array(const slice_array&);
+
+ /// Assignment operator. Assigns slice elements to corresponding
+ /// elements of @a a.
+ slice_array& operator=(const slice_array&);
+
+ /// Assign slice elements to corresponding elements of @a v.
+ void operator=(const valarray<_Tp>&) const;
+ /// Multiply slice elements by corresponding elements of @a v.
+ void operator*=(const valarray<_Tp>&) const;
+ /// Divide slice elements by corresponding elements of @a v.
+ void operator/=(const valarray<_Tp>&) const;
+ /// Modulo slice elements by corresponding elements of @a v.
+ void operator%=(const valarray<_Tp>&) const;
+ /// Add corresponding elements of @a v to slice elements.
+ void operator+=(const valarray<_Tp>&) const;
+ /// Subtract corresponding elements of @a v from slice elements.
+ void operator-=(const valarray<_Tp>&) const;
+ /// Logical xor slice elements with corresponding elements of @a v.
+ void operator^=(const valarray<_Tp>&) const;
+ /// Logical and slice elements with corresponding elements of @a v.
+ void operator&=(const valarray<_Tp>&) const;
+ /// Logical or slice elements with corresponding elements of @a v.
+ void operator|=(const valarray<_Tp>&) const;
+ /// Left shift slice elements by corresponding elements of @a v.
+ void operator<<=(const valarray<_Tp>&) const;
+ /// Right shift slice elements by corresponding elements of @a v.
+ void operator>>=(const valarray<_Tp>&) const;
+ /// Assign all slice elements to @a t.
+ void operator=(const _Tp &) const;
+ // ~slice_array ();
+
+ template<class _Dom>
+ void operator=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator*=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator/=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator%=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator+=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator-=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator^=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator&=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator|=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator<<=(const _Expr<_Dom, _Tp>&) const;
+ template<class _Dom>
+ void operator>>=(const _Expr<_Dom, _Tp>&) const;
+
+ private:
+ friend class valarray<_Tp>;
+ slice_array(_Array<_Tp>, const slice&);
+
+ const size_t _M_sz;
+ const size_t _M_stride;
+ const _Array<_Tp> _M_array;
+
+ // not implemented
+ slice_array();
+ };
+
+ template<typename _Tp>
+ inline
+ slice_array<_Tp>::slice_array(_Array<_Tp> __a, const slice& __s)
+ : _M_sz(__s.size()), _M_stride(__s.stride()),
+ _M_array(__a.begin() + __s.start()) {}
+
+ template<typename _Tp>
+ inline
+ slice_array<_Tp>::slice_array(const slice_array<_Tp>& a)
+ : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {}
+
+ // template<typename _Tp>
+ // inline slice_array<_Tp>::~slice_array () {}
+
+ template<typename _Tp>
+ inline slice_array<_Tp>&
+ slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
+ {
+ std::__valarray_copy(__a._M_array, __a._M_sz, __a._M_stride,
+ _M_array, _M_stride);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline void
+ slice_array<_Tp>::operator=(const _Tp& __t) const
+ { std::__valarray_fill(_M_array, _M_sz, _M_stride, __t); }
+
+ template<typename _Tp>
+ inline void
+ slice_array<_Tp>::operator=(const valarray<_Tp>& __v) const
+ { std::__valarray_copy(_Array<_Tp>(__v), _M_array, _M_sz, _M_stride); }
+
+ template<typename _Tp>
+ template<class _Dom>
+ inline void
+ slice_array<_Tp>::operator=(const _Expr<_Dom,_Tp>& __e) const
+ { std::__valarray_copy(__e, _M_sz, _M_array, _M_stride); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(_Op,_Name) \
+ template<typename _Tp> \
+ inline void \
+ slice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
+ { \
+ _Array_augmented_##_Name(_M_array, _M_sz, _M_stride, _Array<_Tp>(__v));\
+ } \
+ \
+ template<typename _Tp> \
+ template<class _Dom> \
+ inline void \
+ slice_array<_Tp>::operator _Op##=(const _Expr<_Dom,_Tp>& __e) const\
+ { \
+ _Array_augmented_##_Name(_M_array, _M_stride, __e, _M_sz); \
+ }
+
+
+_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, __divides)
+_DEFINE_VALARRAY_OPERATOR(%, __modulus)
+_DEFINE_VALARRAY_OPERATOR(+, __plus)
+_DEFINE_VALARRAY_OPERATOR(-, __minus)
+_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
+_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
+_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
+_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _SLICE_ARRAY_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/sstream.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/sstream.tcc
new file mode 100644
index 0000000..0f9db8e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/sstream.tcc
@@ -0,0 +1,273 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file sstream.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.7 String-based streams
+//
+
+#ifndef _SSTREAM_TCC
+#define _SSTREAM_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ pbackfail(int_type __c)
+ {
+ int_type __ret = traits_type::eof();
+ if (this->eback() < this->gptr())
+ {
+ // Try to put back __c into input sequence in one of three ways.
+ // Order these tests done in is unspecified by the standard.
+ const bool __testeof = traits_type::eq_int_type(__c, __ret);
+ if (!__testeof)
+ {
+ const bool __testeq = traits_type::eq(traits_type::
+ to_char_type(__c),
+ this->gptr()[-1]);
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__testeq || __testout)
+ {
+ this->gbump(-1);
+ if (!__testeq)
+ *this->gptr() = traits_type::to_char_type(__c);
+ __ret = __c;
+ }
+ }
+ else
+ {
+ this->gbump(-1);
+ __ret = traits_type::not_eof(__c);
+ }
+ }
+ return __ret;
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ overflow(int_type __c)
+ {
+ const bool __testout = this->_M_mode & ios_base::out;
+ if (__builtin_expect(!__testout, false))
+ return traits_type::eof();
+
+ const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
+ if (__builtin_expect(__testeof, false))
+ return traits_type::not_eof(__c);
+
+ const __size_type __capacity = _M_string.capacity();
+ const __size_type __max_size = _M_string.max_size();
+ const bool __testput = this->pptr() < this->epptr();
+ if (__builtin_expect(!__testput && __capacity == __max_size, false))
+ return traits_type::eof();
+
+ // Try to append __c into output sequence in one of two ways.
+ // Order these tests done in is unspecified by the standard.
+ const char_type __conv = traits_type::to_char_type(__c);
+ if (!__testput)
+ {
+ // NB: Start ostringstream buffers at 512 chars. This is an
+ // experimental value (pronounced "arbitrary" in some of the
+ // hipper English-speaking countries), and can be changed to
+ // suit particular needs.
+ //
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 169. Bad efficiency of overflow() mandated
+ // 432. stringbuf::overflow() makes only one write position
+ // available
+ const __size_type __opt_len = std::max(__size_type(2 * __capacity),
+ __size_type(512));
+ const __size_type __len = std::min(__opt_len, __max_size);
+ __string_type __tmp;
+ __tmp.reserve(__len);
+ if (this->pbase())
+ __tmp.assign(this->pbase(), this->epptr() - this->pbase());
+ __tmp.push_back(__conv);
+ _M_string.swap(__tmp);
+ _M_sync(const_cast<char_type*>(_M_string.data()),
+ this->gptr() - this->eback(), this->pptr() - this->pbase());
+ }
+ else
+ *this->pptr() = __conv;
+ this->pbump(1);
+ return __c;
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ underflow()
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testin = this->_M_mode & ios_base::in;
+ if (__testin)
+ {
+ // Update egptr() to match the actual string end.
+ _M_update_egptr();
+
+ if (this->gptr() < this->egptr())
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ return __ret;
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+ const bool __testboth = __testin && __testout && __way != ios_base::cur;
+ __testin &= !(__mode & ios_base::out);
+ __testout &= !(__mode & ios_base::in);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 453. basic_stringbuf::seekoff need not always fail for an empty stream.
+ const char_type* __beg = __testin ? this->eback() : this->pbase();
+ if ((__beg || !__off) && (__testin || __testout || __testboth))
+ {
+ _M_update_egptr();
+
+ off_type __newoffi = __off;
+ off_type __newoffo = __newoffi;
+ if (__way == ios_base::cur)
+ {
+ __newoffi += this->gptr() - __beg;
+ __newoffo += this->pptr() - __beg;
+ }
+ else if (__way == ios_base::end)
+ __newoffo = __newoffi += this->egptr() - __beg;
+
+ if ((__testin || __testboth)
+ && __newoffi >= 0
+ && this->egptr() - __beg >= __newoffi)
+ {
+ this->gbump((__beg + __newoffi) - this->gptr());
+ __ret = pos_type(__newoffi);
+ }
+ if ((__testout || __testboth)
+ && __newoffo >= 0
+ && this->egptr() - __beg >= __newoffo)
+ {
+ this->pbump((__beg + __newoffo) - this->pptr());
+ __ret = pos_type(__newoffo);
+ }
+ }
+ return __ret;
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ seekpos(pos_type __sp, ios_base::openmode __mode)
+ {
+ pos_type __ret = pos_type(off_type(-1));
+ const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
+ const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
+
+ const char_type* __beg = __testin ? this->eback() : this->pbase();
+ if ((__beg || !off_type(__sp)) && (__testin || __testout))
+ {
+ _M_update_egptr();
+
+ const off_type __pos(__sp);
+ const bool __testpos = (0 <= __pos
+ && __pos <= this->egptr() - __beg);
+ if (__testpos)
+ {
+ if (__testin)
+ this->gbump((__beg + __pos) - this->gptr());
+ if (__testout)
+ this->pbump((__beg + __pos) - this->pptr());
+ __ret = __sp;
+ }
+ }
+ return __ret;
+ }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ void
+ basic_stringbuf<_CharT, _Traits, _Alloc>::
+ _M_sync(char_type* __base, __size_type __i, __size_type __o)
+ {
+ const bool __testin = _M_mode & ios_base::in;
+ const bool __testout = _M_mode & ios_base::out;
+ char_type* __endg = __base + _M_string.size();
+ char_type* __endp = __base + _M_string.capacity();
+
+ if (__base != _M_string.data())
+ {
+ // setbuf: __i == size of buffer area (_M_string.size() == 0).
+ __endg += __i;
+ __i = 0;
+ __endp = __endg;
+ }
+
+ if (__testin)
+ this->setg(__base, __base + __i, __endg);
+ if (__testout)
+ {
+ this->setp(__base, __endp);
+ this->pbump(__o);
+ // egptr() always tracks the string end. When !__testin,
+ // for the correct functioning of the streambuf inlines
+ // the other get area pointers are identical.
+ if (!__testin)
+ this->setg(__endg, __endg, __endg);
+ }
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_stringbuf<char>;
+ extern template class basic_istringstream<char>;
+ extern template class basic_ostringstream<char>;
+ extern template class basic_stringstream<char>;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_stringbuf<wchar_t>;
+ extern template class basic_istringstream<wchar_t>;
+ extern template class basic_ostringstream<wchar_t>;
+ extern template class basic_stringstream<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algo.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algo.h
new file mode 100644
index 0000000..d4b04d1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algo.h
@@ -0,0 +1,6138 @@
+// Algorithm implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file stl_algo.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_ALGO_H
+#define _STL_ALGO_H 1
+
+#include <cstdlib> // for rand
+#include <bits/algorithmfwd.h>
+#include <bits/stl_heap.h>
+#include <bits/stl_tempbuf.h> // for _Temporary_buffer
+#include <debug/debug.h>
+#include <initializer_list>
+
+// See concept_check.h for the __glibcxx_*_requires macros.
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+// Local modification: if __google_stl_debug_compare is defined to
+// non-zero value, check sort predicate for strict weak ordering.
+// See http://b/1731200.
+#if __google_stl_debug_compare
+ template<typename _Compare>
+ struct _CheckedCompare {
+ _Compare _M_compare;
+
+ _CheckedCompare(const _Compare & __comp): _M_compare(__comp) { }
+
+ template <typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) {
+ if (_M_compare(__x, __x))
+ __throw_runtime_error("strict weak ordering: (__x LT __x) != false");
+ if (_M_compare(__y, __y))
+ __throw_runtime_error("strict weak ordering: (__y LT __y) != false");
+ bool lt = _M_compare(__x, __y);
+ if (lt && _M_compare(__y, __x))
+ __throw_runtime_error("strict weak ordering: ((__x LT __y) && (__y LT __x)) != false");
+ return lt;
+ }
+
+ // Different types; can't perform any checks.
+ // When building //indexterm/internal:indexterm,
+ // indexterm/internal/numericterms.cc
+ // fails without this.
+ template <typename _Tp1, typename _Tp2>
+ bool operator()(const _Tp1& __x, const _Tp2& __y) {
+ return _M_compare(__x, __y);
+ }
+ };
+# define __CheckedCompare(__comp) _CheckedCompare<__typeof__(__comp)>(__comp)
+#else
+# define __CheckedCompare(__comp) __comp
+#endif
+
+ /**
+ * @brief Find the median of three values.
+ * @param a A value.
+ * @param b A value.
+ * @param c A value.
+ * @return One of @p a, @p b or @p c.
+ *
+ * If @c {l,m,n} is some convolution of @p {a,b,c} such that @c l<=m<=n
+ * then the value returned will be @c m.
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ */
+ template<typename _Tp>
+ inline const _Tp&
+ __median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ if (__a < __b)
+ if (__b < __c)
+ return __b;
+ else if (__a < __c)
+ return __c;
+ else
+ return __a;
+ else if (__a < __c)
+ return __a;
+ else if (__b < __c)
+ return __c;
+ else
+ return __b;
+ }
+
+ /**
+ * @brief Find the median of three values using a predicate for comparison.
+ * @param a A value.
+ * @param b A value.
+ * @param c A value.
+ * @param comp A binary predicate.
+ * @return One of @p a, @p b or @p c.
+ *
+ * If @c {l,m,n} is some convolution of @p {a,b,c} such that @p comp(l,m)
+ * and @p comp(m,n) are both true then the value returned will be @c m.
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ */
+ template<typename _Tp, typename _Compare>
+ inline const _Tp&
+ __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BinaryFunctionConcept<_Compare, bool,
+ _Tp, _Tp>)
+ if (__comp(__a, __b))
+ if (__comp(__b, __c))
+ return __b;
+ else if (__comp(__a, __c))
+ return __c;
+ else
+ return __a;
+ else if (__comp(__a, __c))
+ return __a;
+ else if (__comp(__b, __c))
+ return __c;
+ else
+ return __b;
+ }
+
+ // for_each
+
+ /// This is an overload used by find() for the Input Iterator case.
+ template<typename _InputIterator, typename _Tp>
+ inline _InputIterator
+ __find(_InputIterator __first, _InputIterator __last,
+ const _Tp& __val, input_iterator_tag)
+ {
+ while (__first != __last && !(*__first == __val))
+ ++__first;
+ return __first;
+ }
+
+ /// This is an overload used by find_if() for the Input Iterator case.
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ __find_if(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred, input_iterator_tag)
+ {
+ while (__first != __last && !bool(__pred(*__first)))
+ ++__first;
+ return __first;
+ }
+
+ /// This is an overload used by find() for the RAI case.
+ template<typename _RandomAccessIterator, typename _Tp>
+ _RandomAccessIterator
+ __find(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ const _Tp& __val, random_access_iterator_tag)
+ {
+ typename iterator_traits<_RandomAccessIterator>::difference_type
+ __trip_count = (__last - __first) >> 2;
+
+ for (; __trip_count > 0; --__trip_count)
+ {
+ if (*__first == __val)
+ return __first;
+ ++__first;
+
+ if (*__first == __val)
+ return __first;
+ ++__first;
+
+ if (*__first == __val)
+ return __first;
+ ++__first;
+
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ }
+
+ switch (__last - __first)
+ {
+ case 3:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 2:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 1:
+ if (*__first == __val)
+ return __first;
+ ++__first;
+ case 0:
+ default:
+ return __last;
+ }
+ }
+
+ /// This is an overload used by find_if() for the RAI case.
+ template<typename _RandomAccessIterator, typename _Predicate>
+ _RandomAccessIterator
+ __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Predicate __pred, random_access_iterator_tag)
+ {
+ typename iterator_traits<_RandomAccessIterator>::difference_type
+ __trip_count = (__last - __first) >> 2;
+
+ for (; __trip_count > 0; --__trip_count)
+ {
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ }
+
+ switch (__last - __first)
+ {
+ case 3:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 2:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 1:
+ if (__pred(*__first))
+ return __first;
+ ++__first;
+ case 0:
+ default:
+ return __last;
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// This is an overload used by find_if_not() for the Input Iterator case.
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ __find_if_not(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred, input_iterator_tag)
+ {
+ while (__first != __last && bool(__pred(*__first)))
+ ++__first;
+ return __first;
+ }
+
+ /// This is an overload used by find_if_not() for the RAI case.
+ template<typename _RandomAccessIterator, typename _Predicate>
+ _RandomAccessIterator
+ __find_if_not(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Predicate __pred, random_access_iterator_tag)
+ {
+ typename iterator_traits<_RandomAccessIterator>::difference_type
+ __trip_count = (__last - __first) >> 2;
+
+ for (; __trip_count > 0; --__trip_count)
+ {
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+ }
+
+ switch (__last - __first)
+ {
+ case 3:
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+ case 2:
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+ case 1:
+ if (!bool(__pred(*__first)))
+ return __first;
+ ++__first;
+ case 0:
+ default:
+ return __last;
+ }
+ }
+#endif
+
+ // set_difference
+ // set_intersection
+ // set_symmetric_difference
+ // set_union
+ // for_each
+ // find
+ // find_if
+ // find_first_of
+ // adjacent_find
+ // count
+ // count_if
+ // search
+
+ /**
+ * This is an uglified
+ * search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
+ * overloaded for forward iterators.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp>
+ _ForwardIterator
+ __search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val,
+ std::forward_iterator_tag)
+ {
+ __first = _GLIBCXX_STD_P::find(__first, __last, __val);
+ while (__first != __last)
+ {
+ typename iterator_traits<_ForwardIterator>::difference_type
+ __n = __count;
+ _ForwardIterator __i = __first;
+ ++__i;
+ while (__i != __last && __n != 1 && *__i == __val)
+ {
+ ++__i;
+ --__n;
+ }
+ if (__n == 1)
+ return __first;
+ if (__i == __last)
+ return __last;
+ __first = _GLIBCXX_STD_P::find(++__i, __last, __val);
+ }
+ return __last;
+ }
+
+ /**
+ * This is an uglified
+ * search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&)
+ * overloaded for random access iterators.
+ */
+ template<typename _RandomAccessIter, typename _Integer, typename _Tp>
+ _RandomAccessIter
+ __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
+ _Integer __count, const _Tp& __val,
+ std::random_access_iterator_tag)
+ {
+
+ typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
+ _DistanceType;
+
+ _DistanceType __tailSize = __last - __first;
+ const _DistanceType __pattSize = __count;
+
+ if (__tailSize < __pattSize)
+ return __last;
+
+ const _DistanceType __skipOffset = __pattSize - 1;
+ _RandomAccessIter __lookAhead = __first + __skipOffset;
+ __tailSize -= __pattSize;
+
+ while (1) // the main loop...
+ {
+ // __lookAhead here is always pointing to the last element of next
+ // possible match.
+ while (!(*__lookAhead == __val)) // the skip loop...
+ {
+ if (__tailSize < __pattSize)
+ return __last; // Failure
+ __lookAhead += __pattSize;
+ __tailSize -= __pattSize;
+ }
+ _DistanceType __remainder = __skipOffset;
+ for (_RandomAccessIter __backTrack = __lookAhead - 1;
+ *__backTrack == __val; --__backTrack)
+ {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset); // Success
+ }
+ if (__remainder > __tailSize)
+ return __last; // Failure
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+ }
+ }
+
+ // search_n
+
+ /**
+ * This is an uglified
+ * search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
+ * _BinaryPredicate)
+ * overloaded for forward iterators.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ __search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val,
+ _BinaryPredicate __binary_pred, std::forward_iterator_tag)
+ {
+ while (__first != __last && !bool(__binary_pred(*__first, __val)))
+ ++__first;
+
+ while (__first != __last)
+ {
+ typename iterator_traits<_ForwardIterator>::difference_type
+ __n = __count;
+ _ForwardIterator __i = __first;
+ ++__i;
+ while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val)))
+ {
+ ++__i;
+ --__n;
+ }
+ if (__n == 1)
+ return __first;
+ if (__i == __last)
+ return __last;
+ __first = ++__i;
+ while (__first != __last
+ && !bool(__binary_pred(*__first, __val)))
+ ++__first;
+ }
+ return __last;
+ }
+
+ /**
+ * This is an uglified
+ * search_n(_ForwardIterator, _ForwardIterator, _Integer, const _Tp&,
+ * _BinaryPredicate)
+ * overloaded for random access iterators.
+ */
+ template<typename _RandomAccessIter, typename _Integer, typename _Tp,
+ typename _BinaryPredicate>
+ _RandomAccessIter
+ __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
+ _Integer __count, const _Tp& __val,
+ _BinaryPredicate __binary_pred, std::random_access_iterator_tag)
+ {
+
+ typedef typename std::iterator_traits<_RandomAccessIter>::difference_type
+ _DistanceType;
+
+ _DistanceType __tailSize = __last - __first;
+ const _DistanceType __pattSize = __count;
+
+ if (__tailSize < __pattSize)
+ return __last;
+
+ const _DistanceType __skipOffset = __pattSize - 1;
+ _RandomAccessIter __lookAhead = __first + __skipOffset;
+ __tailSize -= __pattSize;
+
+ while (1) // the main loop...
+ {
+ // __lookAhead here is always pointing to the last element of next
+ // possible match.
+ while (!bool(__binary_pred(*__lookAhead, __val))) // the skip loop...
+ {
+ if (__tailSize < __pattSize)
+ return __last; // Failure
+ __lookAhead += __pattSize;
+ __tailSize -= __pattSize;
+ }
+ _DistanceType __remainder = __skipOffset;
+ for (_RandomAccessIter __backTrack = __lookAhead - 1;
+ __binary_pred(*__backTrack, __val); --__backTrack)
+ {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset); // Success
+ }
+ if (__remainder > __tailSize)
+ return __last; // Failure
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+ }
+ }
+
+ // find_end for forward iterators.
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator1
+ __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ forward_iterator_tag, forward_iterator_tag)
+ {
+ if (__first2 == __last2)
+ return __last1;
+ else
+ {
+ _ForwardIterator1 __result = __last1;
+ while (1)
+ {
+ _ForwardIterator1 __new_result
+ = _GLIBCXX_STD_P::search(__first1, __last1, __first2, __last2);
+ if (__new_result == __last1)
+ return __result;
+ else
+ {
+ __result = __new_result;
+ __first1 = __new_result;
+ ++__first1;
+ }
+ }
+ }
+ }
+
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
+ typename _BinaryPredicate>
+ _ForwardIterator1
+ __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ forward_iterator_tag, forward_iterator_tag,
+ _BinaryPredicate __comp)
+ {
+ if (__first2 == __last2)
+ return __last1;
+ else
+ {
+ _ForwardIterator1 __result = __last1;
+ while (1)
+ {
+ _ForwardIterator1 __new_result
+ = _GLIBCXX_STD_P::search(__first1, __last1, __first2,
+ __last2, __comp);
+ if (__new_result == __last1)
+ return __result;
+ else
+ {
+ __result = __new_result;
+ __first1 = __new_result;
+ ++__first1;
+ }
+ }
+ }
+ }
+
+ // find_end for bidirectional iterators (much faster).
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2>
+ _BidirectionalIterator1
+ __find_end(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ bidirectional_iterator_tag, bidirectional_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator1>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator2>)
+
+ typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+ typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
+
+ _RevIterator1 __rlast1(__first1);
+ _RevIterator2 __rlast2(__first2);
+ _RevIterator1 __rresult = _GLIBCXX_STD_P::search(_RevIterator1(__last1),
+ __rlast1,
+ _RevIterator2(__last2),
+ __rlast2);
+
+ if (__rresult == __rlast1)
+ return __last1;
+ else
+ {
+ _BidirectionalIterator1 __result = __rresult.base();
+ std::advance(__result, -std::distance(__first2, __last2));
+ return __result;
+ }
+ }
+
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _BinaryPredicate>
+ _BidirectionalIterator1
+ __find_end(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ bidirectional_iterator_tag, bidirectional_iterator_tag,
+ _BinaryPredicate __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator1>)
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator2>)
+
+ typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1;
+ typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2;
+
+ _RevIterator1 __rlast1(__first1);
+ _RevIterator2 __rlast2(__first2);
+ _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1,
+ _RevIterator2(__last2), __rlast2,
+ __comp);
+
+ if (__rresult == __rlast1)
+ return __last1;
+ else
+ {
+ _BidirectionalIterator1 __result = __rresult.base();
+ std::advance(__result, -std::distance(__first2, __last2));
+ return __result;
+ }
+ }
+
+ /**
+ * @brief Find last matching subsequence in a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of sequence to match.
+ * @param last2 End of sequence to match.
+ * @return The last iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+ * for each @c N in the range @p [0,last2-first2), or @p last1 if no
+ * such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) and
+ * returns an iterator to the first element of the sub-sequence, or
+ * @p last1 if the sub-sequence is not found. The sub-sequence will be the
+ * last such subsequence contained in [first,last1).
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ inline _ForwardIterator1
+ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ return std::__find_end(__first1, __last1, __first2, __last2,
+ std::__iterator_category(__first1),
+ std::__iterator_category(__first2));
+ }
+
+ /**
+ * @brief Find last matching subsequence in a sequence using a predicate.
+ * @ingroup non_mutating_algorithms
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of sequence to match.
+ * @param last2 End of sequence to match.
+ * @param comp The predicate to use.
+ * @return The last iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c predicate(*(i+N), @p
+ * (first2+N)) is true for each @c N in the range @p [0,last2-first2), or
+ * @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) using
+ * comp as a predicate and returns an iterator to the first element of the
+ * sub-sequence, or @p last1 if the sub-sequence is not found. The
+ * sub-sequence will be the last such subsequence contained in
+ * [first,last1).
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
+ typename _BinaryPredicate>
+ inline _ForwardIterator1
+ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ _BinaryPredicate __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ return std::__find_end(__first1, __last1, __first2, __last2,
+ std::__iterator_category(__first1),
+ std::__iterator_category(__first2),
+ __comp);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Checks that a predicate is true for all the elements
+ * of a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return True if the check is true, false otherwise.
+ *
+ * Returns true if @p pred is true for each element in the range
+ * @p [first,last), and false otherwise.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ { return __last == std::find_if_not(__first, __last, __pred); }
+
+ /**
+ * @brief Checks that a predicate is false for all the elements
+ * of a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return True if the check is true, false otherwise.
+ *
+ * Returns true if @p pred is false for each element in the range
+ * @p [first,last), and false otherwise.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ { return __last == _GLIBCXX_STD_P::find_if(__first, __last, __pred); }
+
+ /**
+ * @brief Checks that a predicate is false for at least an element
+ * of a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return True if the check is true, false otherwise.
+ *
+ * Returns true if an element exists in the range @p [first,last) such that
+ * @p pred is true, and false otherwise.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ { return !std::none_of(__first, __last, __pred); }
+
+ /**
+ * @brief Find the first element in a sequence for which a
+ * predicate is false.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return The first iterator @c i in the range @p [first,last)
+ * such that @p pred(*i) is false, or @p last if no such iterator exists.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ find_if_not(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::__find_if_not(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Checks whether the sequence is partitioned.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return True if the range @p [first,last) is partioned by @p pred,
+ * i.e. if all elements that satisfy @p pred appear before those that
+ * do not.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ is_partitioned(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred)
+ {
+ __first = std::find_if_not(__first, __last, __pred);
+ return std::none_of(__first, __last, __pred);
+ }
+
+ /**
+ * @brief Find the partition point of a partitioned range.
+ * @ingroup mutating_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param pred A predicate.
+ * @return An iterator @p mid such that @p all_of(first, mid, pred)
+ * and @p none_of(mid, last, pred) are both true.
+ */
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ partition_point(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+
+ // A specific debug-mode test will be necessary...
+ __glibcxx_requires_valid_range(__first, __last);
+
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__pred(*__middle))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+#endif
+
+
+ /**
+ * @brief Copy a sequence, removing elements of a given value.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param value The value to be removed.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) not equal to @p value
+ * to the range beginning at @p result.
+ * remove_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ */
+ template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+ _OutputIterator
+ remove_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (!(*__first == __value))
+ {
+ *__result = *__first;
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * @brief Copy a sequence, removing elements for which a predicate is true.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param pred A predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) for which
+ * @p pred returns false to the range beginning at @p result.
+ *
+ * remove_copy_if() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate>
+ _OutputIterator
+ remove_copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (!bool(__pred(*__first)))
+ {
+ *__result = *__first;
+ ++__result;
+ }
+ return __result;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Copy the elements of a sequence for which a predicate is true.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param pred A predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) for which
+ * @p pred returns true to the range beginning at @p result.
+ *
+ * copy_if() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate>
+ _OutputIterator
+ copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ {
+ *__result = *__first;
+ ++__result;
+ }
+ return __result;
+ }
+
+
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ _OutputIterator
+ __copy_n(_InputIterator __first, _Size __n,
+ _OutputIterator __result, input_iterator_tag)
+ {
+ for (; __n > 0; --__n)
+ {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
+ return __result;
+ }
+
+ template<typename _RandomAccessIterator, typename _Size,
+ typename _OutputIterator>
+ inline _OutputIterator
+ __copy_n(_RandomAccessIterator __first, _Size __n,
+ _OutputIterator __result, random_access_iterator_tag)
+ { return std::copy(__first, __first + __n, __result); }
+
+ /**
+ * @brief Copies the range [first,first+n) into [result,result+n).
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param n The number of elements to copy.
+ * @param result An output iterator.
+ * @return result+n.
+ *
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling).
+ */
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ inline _OutputIterator
+ copy_n(_InputIterator __first, _Size __n, _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+
+ return std::__copy_n(__first, __n, __result,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Copy the elements of a sequence to separate output sequences
+ * depending on the truth value of a predicate.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param out_true An output iterator.
+ * @param out_false An output iterator.
+ * @param pred A predicate.
+ * @return A pair designating the ends of the resulting sequences.
+ *
+ * Copies each element in the range @p [first,last) for which
+ * @p pred returns true to the range beginning at @p out_true
+ * and each element for which @p pred returns false to @p out_false.
+ */
+ template<typename _InputIterator, typename _OutputIterator1,
+ typename _OutputIterator2, typename _Predicate>
+ pair<_OutputIterator1, _OutputIterator2>
+ partition_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator1 __out_true, _OutputIterator2 __out_false,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator1,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator2,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ {
+ *__out_true = *__first;
+ ++__out_true;
+ }
+ else
+ {
+ *__out_false = *__first;
+ ++__out_false;
+ }
+
+ return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false);
+ }
+#endif
+
+ /**
+ * @brief Remove elements from a sequence.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param value The value to be removed.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * All elements equal to @p value are removed from the range
+ * @p [first,last).
+ *
+ * remove() is stable, so the relative order of elements that are
+ * not removed is unchanged.
+ *
+ * Elements between the end of the resulting sequence and @p last
+ * are still present, but their value is unspecified.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ remove(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ __first = _GLIBCXX_STD_P::find(__first, __last, __value);
+ if(__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ ++__first;
+ for(; __first != __last; ++__first)
+ if(!(*__first == __value))
+ {
+ *__result = _GLIBCXX_MOVE(*__first);
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * @brief Remove elements from a sequence using a predicate.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * All elements for which @p pred returns true are removed from the range
+ * @p [first,last).
+ *
+ * remove_if() is stable, so the relative order of elements that are
+ * not removed is unchanged.
+ *
+ * Elements between the end of the resulting sequence and @p last
+ * are still present, but their value is unspecified.
+ */
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ remove_if(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ __first = _GLIBCXX_STD_P::find_if(__first, __last, __pred);
+ if(__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ ++__first;
+ for(; __first != __last; ++__first)
+ if(!bool(__pred(*__first)))
+ {
+ *__result = _GLIBCXX_MOVE(*__first);
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * @brief Remove consecutive duplicate values from a sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Removes all but the first element from each group of consecutive
+ * values that compare equal.
+ * unique() is stable, so the relative order of elements that are
+ * not removed is unchanged.
+ * Elements between the end of the resulting sequence and @p last
+ * are still present, but their value is unspecified.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ unique(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ // Skip the beginning, if already unique.
+ __first = _GLIBCXX_STD_P::adjacent_find(__first, __last);
+ if (__first == __last)
+ return __last;
+
+ // Do the real copy work.
+ _ForwardIterator __dest = __first;
+ ++__first;
+ while (++__first != __last)
+ if (!(*__dest == *__first))
+ *++__dest = _GLIBCXX_MOVE(*__first);
+ return ++__dest;
+ }
+
+ /**
+ * @brief Remove consecutive values from a sequence using a predicate.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param binary_pred A binary predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Removes all but the first element from each group of consecutive
+ * values for which @p binary_pred returns true.
+ * unique() is stable, so the relative order of elements that are
+ * not removed is unchanged.
+ * Elements between the end of the resulting sequence and @p last
+ * are still present, but their value is unspecified.
+ */
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ unique(_ForwardIterator __first, _ForwardIterator __last,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ // Skip the beginning, if already unique.
+ __first = _GLIBCXX_STD_P::adjacent_find(__first, __last, __binary_pred);
+ if (__first == __last)
+ return __last;
+
+ // Do the real copy work.
+ _ForwardIterator __dest = __first;
+ ++__first;
+ while (++__first != __last)
+ if (!bool(__binary_pred(*__dest, *__first)))
+ *++__dest = _GLIBCXX_MOVE(*__first);
+ return ++__dest;
+ }
+
+ /**
+ * This is an uglified unique_copy(_InputIterator, _InputIterator,
+ * _OutputIterator)
+ * overloaded for forward iterators and output iterator as result.
+ */
+ template<typename _ForwardIterator, typename _OutputIterator>
+ _OutputIterator
+ __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __result,
+ forward_iterator_tag, output_iterator_tag)
+ {
+ // concept requirements -- taken care of in dispatching function
+ _ForwardIterator __next = __first;
+ *__result = *__first;
+ while (++__next != __last)
+ if (!(*__first == *__next))
+ {
+ __first = __next;
+ *++__result = *__first;
+ }
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified unique_copy(_InputIterator, _InputIterator,
+ * _OutputIterator)
+ * overloaded for input iterators and output iterator as result.
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ _OutputIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ input_iterator_tag, output_iterator_tag)
+ {
+ // concept requirements -- taken care of in dispatching function
+ typename iterator_traits<_InputIterator>::value_type __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ if (!(__value == *__first))
+ {
+ __value = *__first;
+ *++__result = __value;
+ }
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified unique_copy(_InputIterator, _InputIterator,
+ * _OutputIterator)
+ * overloaded for input iterators and forward iterator as result.
+ */
+ template<typename _InputIterator, typename _ForwardIterator>
+ _ForwardIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result,
+ input_iterator_tag, forward_iterator_tag)
+ {
+ // concept requirements -- taken care of in dispatching function
+ *__result = *__first;
+ while (++__first != __last)
+ if (!(*__result == *__first))
+ *++__result = *__first;
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified
+ * unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ * _BinaryPredicate)
+ * overloaded for forward iterators and output iterator as result.
+ */
+ template<typename _ForwardIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ _OutputIterator
+ __unique_copy(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __result, _BinaryPredicate __binary_pred,
+ forward_iterator_tag, output_iterator_tag)
+ {
+ // concept requirements -- iterators already checked
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+
+ _ForwardIterator __next = __first;
+ *__result = *__first;
+ while (++__next != __last)
+ if (!bool(__binary_pred(*__first, *__next)))
+ {
+ __first = __next;
+ *++__result = *__first;
+ }
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified
+ * unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ * _BinaryPredicate)
+ * overloaded for input iterators and output iterator as result.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ _OutputIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _BinaryPredicate __binary_pred,
+ input_iterator_tag, output_iterator_tag)
+ {
+ // concept requirements -- iterators already checked
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_InputIterator>::value_type>)
+
+ typename iterator_traits<_InputIterator>::value_type __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ if (!bool(__binary_pred(__value, *__first)))
+ {
+ __value = *__first;
+ *++__result = __value;
+ }
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified
+ * unique_copy(_InputIterator, _InputIterator, _OutputIterator,
+ * _BinaryPredicate)
+ * overloaded for input iterators and forward iterator as result.
+ */
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ __unique_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result, _BinaryPredicate __binary_pred,
+ input_iterator_tag, forward_iterator_tag)
+ {
+ // concept requirements -- iterators already checked
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_InputIterator>::value_type>)
+
+ *__result = *__first;
+ while (++__first != __last)
+ if (!bool(__binary_pred(*__result, *__first)))
+ *++__result = *__first;
+ return ++__result;
+ }
+
+ /**
+ * This is an uglified reverse(_BidirectionalIterator,
+ * _BidirectionalIterator)
+ * overloaded for bidirectional iterators.
+ */
+ template<typename _BidirectionalIterator>
+ void
+ __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last,
+ bidirectional_iterator_tag)
+ {
+ while (true)
+ if (__first == __last || __first == --__last)
+ return;
+ else
+ {
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
+ }
+
+ /**
+ * This is an uglified reverse(_BidirectionalIterator,
+ * _BidirectionalIterator)
+ * overloaded for random access iterators.
+ */
+ template<typename _RandomAccessIterator>
+ void
+ __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ random_access_iterator_tag)
+ {
+ if (__first == __last)
+ return;
+ --__last;
+ while (__first < __last)
+ {
+ std::iter_swap(__first, __last);
+ ++__first;
+ --__last;
+ }
+ }
+
+ /**
+ * @brief Reverse a sequence.
+ * @ingroup mutating_algorithms
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @return reverse() returns no value.
+ *
+ * Reverses the order of the elements in the range @p [first,last),
+ * so that the first element becomes the last etc.
+ * For every @c i such that @p 0<=i<=(last-first)/2), @p reverse()
+ * swaps @p *(first+i) and @p *(last-(i+1))
+ */
+ template<typename _BidirectionalIterator>
+ inline void
+ reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ std::__reverse(__first, __last, std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Copy a sequence, reversing its elements.
+ * @ingroup mutating_algorithms
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @param result An output iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies the elements in the range @p [first,last) to the range
+ * @p [result,result+(last-first)) such that the order of the
+ * elements is reversed.
+ * For every @c i such that @p 0<=i<=(last-first), @p reverse_copy()
+ * performs the assignment @p *(result+(last-first)-i) = *(first+i).
+ * The ranges @p [first,last) and @p [result,result+(last-first))
+ * must not overlap.
+ */
+ template<typename _BidirectionalIterator, typename _OutputIterator>
+ _OutputIterator
+ reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last,
+ _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ while (__first != __last)
+ {
+ --__last;
+ *__result = *__last;
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * This is a helper function for the rotate algorithm specialized on RAIs.
+ * It returns the greatest common divisor of two integer values.
+ */
+ template<typename _EuclideanRingElement>
+ _EuclideanRingElement
+ __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
+ {
+ while (__n != 0)
+ {
+ _EuclideanRingElement __t = __m % __n;
+ __m = __n;
+ __n = __t;
+ }
+ return __m;
+ }
+
+ /// This is a helper function for the rotate algorithm.
+ template<typename _ForwardIterator>
+ void
+ __rotate(_ForwardIterator __first,
+ _ForwardIterator __middle,
+ _ForwardIterator __last,
+ forward_iterator_tag)
+ {
+ if (__first == __middle || __last == __middle)
+ return;
+
+ _ForwardIterator __first2 = __middle;
+ do
+ {
+ std::iter_swap(__first, __first2);
+ ++__first;
+ ++__first2;
+ if (__first == __middle)
+ __middle = __first2;
+ }
+ while (__first2 != __last);
+
+ __first2 = __middle;
+
+ while (__first2 != __last)
+ {
+ std::iter_swap(__first, __first2);
+ ++__first;
+ ++__first2;
+ if (__first == __middle)
+ __middle = __first2;
+ else if (__first2 == __last)
+ __first2 = __middle;
+ }
+ }
+
+ /// This is a helper function for the rotate algorithm.
+ template<typename _BidirectionalIterator>
+ void
+ __rotate(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ bidirectional_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+
+ if (__first == __middle || __last == __middle)
+ return;
+
+ std::__reverse(__first, __middle, bidirectional_iterator_tag());
+ std::__reverse(__middle, __last, bidirectional_iterator_tag());
+
+ while (__first != __middle && __middle != __last)
+ {
+ std::iter_swap(__first, --__last);
+ ++__first;
+ }
+
+ if (__first == __middle)
+ std::__reverse(__middle, __last, bidirectional_iterator_tag());
+ else
+ std::__reverse(__first, __middle, bidirectional_iterator_tag());
+ }
+
+ /// This is a helper function for the rotate algorithm.
+ template<typename _RandomAccessIterator>
+ void
+ __rotate(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
+ random_access_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+
+ if (__first == __middle || __last == __middle)
+ return;
+
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ const _Distance __n = __last - __first;
+ const _Distance __k = __middle - __first;
+ const _Distance __l = __n - __k;
+
+ if (__k == __l)
+ {
+ std::swap_ranges(__first, __middle, __middle);
+ return;
+ }
+
+ const _Distance __d = std::__gcd(__n, __k);
+
+ for (_Distance __i = 0; __i < __d; __i++)
+ {
+ _ValueType __tmp = _GLIBCXX_MOVE(*__first);
+ _RandomAccessIterator __p = __first;
+
+ if (__k < __l)
+ {
+ for (_Distance __j = 0; __j < __l / __d; __j++)
+ {
+ if (__p > __first + __l)
+ {
+ *__p = _GLIBCXX_MOVE(*(__p - __l));
+ __p -= __l;
+ }
+
+ *__p = _GLIBCXX_MOVE(*(__p + __k));
+ __p += __k;
+ }
+ }
+ else
+ {
+ for (_Distance __j = 0; __j < __k / __d - 1; __j ++)
+ {
+ if (__p < __last - __k)
+ {
+ *__p = _GLIBCXX_MOVE(*(__p + __k));
+ __p += __k;
+ }
+ *__p = _GLIBCXX_MOVE(*(__p - __l));
+ __p -= __l;
+ }
+ }
+
+ *__p = _GLIBCXX_MOVE(__tmp);
+ ++__first;
+ }
+ }
+
+ /**
+ * @brief Rotate the elements of a sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param middle A forward iterator.
+ * @param last A forward iterator.
+ * @return Nothing.
+ *
+ * Rotates the elements of the range @p [first,last) by @p (middle-first)
+ * positions so that the element at @p middle is moved to @p first, the
+ * element at @p middle+1 is moved to @first+1 and so on for each element
+ * in the range @p [first,last).
+ *
+ * This effectively swaps the ranges @p [first,middle) and
+ * @p [middle,last).
+ *
+ * Performs @p *(first+(n+(last-middle))%(last-first))=*(first+n) for
+ * each @p n in the range @p [0,last-first).
+ */
+ template<typename _ForwardIterator>
+ inline void
+ rotate(_ForwardIterator __first, _ForwardIterator __middle,
+ _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ typedef typename iterator_traits<_ForwardIterator>::iterator_category
+ _IterType;
+ std::__rotate(__first, __middle, __last, _IterType());
+ }
+
+ /**
+ * @brief Copy a sequence, rotating its elements.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param middle A forward iterator.
+ * @param last A forward iterator.
+ * @param result An output iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies the elements of the range @p [first,last) to the range
+ * beginning at @result, rotating the copied elements by @p (middle-first)
+ * positions so that the element at @p middle is moved to @p result, the
+ * element at @p middle+1 is moved to @result+1 and so on for each element
+ * in the range @p [first,last).
+ *
+ * Performs @p *(result+(n+(last-middle))%(last-first))=*(first+n) for
+ * each @p n in the range @p [0,last-first).
+ */
+ template<typename _ForwardIterator, typename _OutputIterator>
+ _OutputIterator
+ rotate_copy(_ForwardIterator __first, _ForwardIterator __middle,
+ _ForwardIterator __last, _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ return std::copy(__first, __middle,
+ std::copy(__middle, __last, __result));
+ }
+
+ /// This is a helper function...
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ __partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred, forward_iterator_tag)
+ {
+ if (__first == __last)
+ return __first;
+
+ while (__pred(*__first))
+ if (++__first == __last)
+ return __first;
+
+ _ForwardIterator __next = __first;
+
+ while (++__next != __last)
+ if (__pred(*__next))
+ {
+ std::iter_swap(__first, __next);
+ ++__first;
+ }
+
+ return __first;
+ }
+
+ /// This is a helper function...
+ template<typename _BidirectionalIterator, typename _Predicate>
+ _BidirectionalIterator
+ __partition(_BidirectionalIterator __first, _BidirectionalIterator __last,
+ _Predicate __pred, bidirectional_iterator_tag)
+ {
+ while (true)
+ {
+ while (true)
+ if (__first == __last)
+ return __first;
+ else if (__pred(*__first))
+ ++__first;
+ else
+ break;
+ --__last;
+ while (true)
+ if (__first == __last)
+ return __first;
+ else if (!bool(__pred(*__last)))
+ --__last;
+ else
+ break;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
+ }
+
+ // partition
+
+ /// This is a helper function...
+ template<typename _ForwardIterator, typename _Predicate, typename _Distance>
+ _ForwardIterator
+ __inplace_stable_partition(_ForwardIterator __first,
+ _ForwardIterator __last,
+ _Predicate __pred, _Distance __len)
+ {
+ if (__len == 1)
+ return __pred(*__first) ? __last : __first;
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin = std::__inplace_stable_partition(__first,
+ __middle,
+ __pred,
+ __len / 2);
+ _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last,
+ __pred,
+ __len
+ - __len / 2);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
+ return __begin;
+ }
+
+ /// This is a helper function...
+ template<typename _ForwardIterator, typename _Pointer, typename _Predicate,
+ typename _Distance>
+ _ForwardIterator
+ __stable_partition_adaptive(_ForwardIterator __first,
+ _ForwardIterator __last,
+ _Predicate __pred, _Distance __len,
+ _Pointer __buffer,
+ _Distance __buffer_size)
+ {
+ if (__len <= __buffer_size)
+ {
+ _ForwardIterator __result1 = __first;
+ _Pointer __result2 = __buffer;
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ {
+ *__result1 = *__first;
+ ++__result1;
+ }
+ else
+ {
+ *__result2 = *__first;
+ ++__result2;
+ }
+ std::copy(__buffer, __result2, __result1);
+ return __result1;
+ }
+ else
+ {
+ _ForwardIterator __middle = __first;
+ std::advance(__middle, __len / 2);
+ _ForwardIterator __begin =
+ std::__stable_partition_adaptive(__first, __middle, __pred,
+ __len / 2, __buffer,
+ __buffer_size);
+ _ForwardIterator __end =
+ std::__stable_partition_adaptive(__middle, __last, __pred,
+ __len - __len / 2,
+ __buffer, __buffer_size);
+ std::rotate(__begin, __middle, __end);
+ std::advance(__begin, std::distance(__middle, __end));
+ return __begin;
+ }
+ }
+
+ /**
+ * @brief Move elements for which a predicate is true to the beginning
+ * of a sequence, preserving relative ordering.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate functor.
+ * @return An iterator @p middle such that @p pred(i) is true for each
+ * iterator @p i in the range @p [first,middle) and false for each @p i
+ * in the range @p [middle,last).
+ *
+ * Performs the same function as @p partition() with the additional
+ * guarantee that the relative ordering of elements in each group is
+ * preserved, so any two elements @p x and @p y in the range
+ * @p [first,last) such that @p pred(x)==pred(y) will have the same
+ * relative ordering after calling @p stable_partition().
+ */
+ template<typename _ForwardIterator, typename _Predicate>
+ _ForwardIterator
+ stable_partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __first;
+ else
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.size() > 0)
+ return
+ std::__stable_partition_adaptive(__first, __last, __pred,
+ _DistanceType(__buf.requested_size()),
+ __buf.begin(),
+ _DistanceType(__buf.size()));
+ else
+ return
+ std::__inplace_stable_partition(__first, __last, __pred,
+ _DistanceType(__buf.requested_size()));
+ }
+ }
+
+ /// This is a helper function for the sort routines.
+ template<typename _RandomAccessIterator>
+ void
+ __heap_select(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last)
+ {
+ std::make_heap(__first, __middle);
+ for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
+ if (*__i < *__first)
+ std::__pop_heap(__first, __middle, __i);
+ }
+
+ /// This is a helper function for the sort routines.
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __heap_select(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ std::make_heap(__first, __middle, __comp);
+ for (_RandomAccessIterator __i = __middle; __i < __last; ++__i)
+ if (__comp(*__i, *__first))
+ std::__pop_heap(__first, __middle, __i, __comp);
+ }
+
+ // partial_sort
+
+ /**
+ * @brief Copy the smallest elements of a sequence.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param result_first A random-access iterator.
+ * @param result_last Another random-access iterator.
+ * @return An iterator indicating the end of the resulting sequence.
+ *
+ * Copies and sorts the smallest N values from the range @p [first,last)
+ * to the range beginning at @p result_first, where the number of
+ * elements to be copied, @p N, is the smaller of @p (last-first) and
+ * @p (result_last-result_first).
+ * After the sort if @p i and @j are iterators in the range
+ * @p [result_first,result_first+N) such that @i precedes @j then
+ * @p *j<*i is false.
+ * The value returned is @p result_first+N.
+ */
+ template<typename _InputIterator, typename _RandomAccessIterator>
+ _RandomAccessIterator
+ partial_sort_copy(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __result_first,
+ _RandomAccessIterator __result_last)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _InputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _OutputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+ _OutputValueType>)
+ __glibcxx_function_requires(_LessThanOpConcept<_InputValueType,
+ _OutputValueType>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_OutputValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__result_first, __result_last);
+
+ if (__result_first == __result_last)
+ return __result_last;
+ _RandomAccessIterator __result_real_last = __result_first;
+ while(__first != __last && __result_real_last != __result_last)
+ {
+ *__result_real_last = *__first;
+ ++__result_real_last;
+ ++__first;
+ }
+ std::make_heap(__result_first, __result_real_last);
+ while (__first != __last)
+ {
+ if (*__first < *__result_first)
+ std::__adjust_heap(__result_first, _DistanceType(0),
+ _DistanceType(__result_real_last
+ - __result_first),
+ _InputValueType(*__first));
+ ++__first;
+ }
+ std::sort_heap(__result_first, __result_real_last);
+ return __result_real_last;
+ }
+
+ /**
+ * @brief Copy the smallest elements of a sequence using a predicate for
+ * comparison.
+ * @ingroup sorting_algorithms
+ * @param first An input iterator.
+ * @param last Another input iterator.
+ * @param result_first A random-access iterator.
+ * @param result_last Another random-access iterator.
+ * @param comp A comparison functor.
+ * @return An iterator indicating the end of the resulting sequence.
+ *
+ * Copies and sorts the smallest N values from the range @p [first,last)
+ * to the range beginning at @p result_first, where the number of
+ * elements to be copied, @p N, is the smaller of @p (last-first) and
+ * @p (result_last-result_first).
+ * After the sort if @p i and @j are iterators in the range
+ * @p [result_first,result_first+N) such that @i precedes @j then
+ * @p comp(*j,*i) is false.
+ * The value returned is @p result_first+N.
+ */
+ template<typename _InputIterator, typename _RandomAccessIterator, typename _Compare>
+ _RandomAccessIterator
+ partial_sort_copy(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __result_first,
+ _RandomAccessIterator __result_last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _InputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _OutputValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
+ _OutputValueType>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _InputValueType, _OutputValueType>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _OutputValueType, _OutputValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__result_first, __result_last);
+
+ if (__result_first == __result_last)
+ return __result_last;
+ _RandomAccessIterator __result_real_last = __result_first;
+ while(__first != __last && __result_real_last != __result_last)
+ {
+ *__result_real_last = *__first;
+ ++__result_real_last;
+ ++__first;
+ }
+ std::make_heap(__result_first, __result_real_last,
+ __CheckedCompare(__comp));
+ while (__first != __last)
+ {
+ if (__CheckedCompare(__comp)(*__first, *__result_first))
+ std::__adjust_heap(__result_first, _DistanceType(0),
+ _DistanceType(__result_real_last
+ - __result_first),
+ _InputValueType(*__first),
+ __CheckedCompare(__comp));
+ ++__first;
+ }
+ std::sort_heap(__result_first, __result_real_last,
+ __CheckedCompare(__comp));
+ return __result_real_last;
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Tp>
+ void
+ __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val)
+ {
+ _RandomAccessIterator __next = __last;
+ --__next;
+ while (__val < *__next)
+ {
+ *__last = *__next;
+ __last = __next;
+ --__next;
+ }
+ *__last = __val;
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
+ void
+ __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val,
+ _Compare __comp)
+ {
+ _RandomAccessIterator __next = __last;
+ --__next;
+ while (__comp(__val, *__next))
+ {
+ *__last = *__next;
+ __last = __next;
+ --__next;
+ }
+ *__last = __val;
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator>
+ void
+ __insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
+ {
+ if (__first == __last)
+ return;
+
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ {
+ typename iterator_traits<_RandomAccessIterator>::value_type
+ __val = *__i;
+ if (__val < *__first)
+ {
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = __val;
+ }
+ else
+ std::__unguarded_linear_insert(__i, __val);
+ }
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ if (__first == __last) return;
+
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ {
+ typename iterator_traits<_RandomAccessIterator>::value_type
+ __val = *__i;
+ if (__comp(__val, *__first))
+ {
+ std::copy_backward(__first, __i, __i + 1);
+ *__first = __val;
+ }
+ else
+ std::__unguarded_linear_insert(__i, __val, __comp);
+ }
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator>
+ inline void
+ __unguarded_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+ std::__unguarded_linear_insert(__i, _ValueType(*__i));
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ __unguarded_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ for (_RandomAccessIterator __i = __first; __i != __last; ++__i)
+ std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp);
+ }
+
+ /**
+ * @doctodo
+ * This controls some aspect of the sort routines.
+ */
+ enum { _S_threshold = 16 };
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator>
+ void
+ __final_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
+ {
+ if (__last - __first > int(_S_threshold))
+ {
+ std::__insertion_sort(__first, __first + int(_S_threshold));
+ std::__unguarded_insertion_sort(__first + int(_S_threshold), __last);
+ }
+ else
+ std::__insertion_sort(__first, __last);
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __final_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ if (__last - __first > int(_S_threshold))
+ {
+ std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
+ std::__unguarded_insertion_sort(__first + int(_S_threshold), __last,
+ __comp);
+ }
+ else
+ std::__insertion_sort(__first, __last, __comp);
+ }
+
+ /// This is a helper function...
+ template<typename _RandomAccessIterator, typename _Tp>
+ _RandomAccessIterator
+ __unguarded_partition(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Tp __pivot)
+ {
+ while (true)
+ {
+ while (*__first < __pivot)
+ ++__first;
+ --__last;
+ while (__pivot < *__last)
+ --__last;
+ if (!(__first < __last))
+ return __first;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
+ }
+
+ /// This is a helper function...
+ template<typename _RandomAccessIterator, typename _Tp, typename _Compare>
+ _RandomAccessIterator
+ __unguarded_partition(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Tp __pivot, _Compare __comp)
+ {
+ while (true)
+ {
+ while (__comp(*__first, __pivot))
+ ++__first;
+ --__last;
+ while (__comp(__pivot, *__last))
+ --__last;
+ if (!(__first < __last))
+ return __first;
+ std::iter_swap(__first, __last);
+ ++__first;
+ }
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Size>
+ void
+ __introsort_loop(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Size __depth_limit)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > int(_S_threshold))
+ {
+ if (__depth_limit == 0)
+ {
+ _GLIBCXX_STD_P::partial_sort(__first, __last, __last);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last
+ - 1))));
+ std::__introsort_loop(__cut, __last, __depth_limit);
+ __last = __cut;
+ }
+ }
+
+ /// This is a helper function for the sort routine.
+ template<typename _RandomAccessIterator, typename _Size, typename _Compare>
+ void
+ __introsort_loop(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Size __depth_limit, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > int(_S_threshold))
+ {
+ if (__depth_limit == 0)
+ {
+ _GLIBCXX_STD_P::partial_sort(__first, __last, __last, __comp);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last - 1),
+ __comp)),
+ __comp);
+ std::__introsort_loop(__cut, __last, __depth_limit, __comp);
+ __last = __cut;
+ }
+ }
+
+ /// This is a helper function for the sort routines. Precondition: __n > 0.
+ template<typename _Size>
+ inline _Size
+ __lg(_Size __n)
+ {
+ _Size __k;
+ for (__k = 0; __n != 0; __n >>= 1)
+ ++__k;
+ return __k - 1;
+ }
+
+ inline int
+ __lg(int __n)
+ { return sizeof(int) * __CHAR_BIT__ - 1 - __builtin_clz(__n); }
+
+ inline long
+ __lg(long __n)
+ { return sizeof(long) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); }
+
+ inline long long
+ __lg(long long __n)
+ { return sizeof(long long) * __CHAR_BIT__ - 1 - __builtin_clzll(__n); }
+
+ // sort
+
+ template<typename _RandomAccessIterator, typename _Size>
+ void
+ __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last, _Size __depth_limit)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > 3)
+ {
+ if (__depth_limit == 0)
+ {
+ std::__heap_select(__first, __nth + 1, __last);
+
+ // Place the nth largest element in its final position.
+ std::iter_swap(__first, __nth);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last
+ - 1))));
+ if (__cut <= __nth)
+ __first = __cut;
+ else
+ __last = __cut;
+ }
+ std::__insertion_sort(__first, __last);
+ }
+
+ template<typename _RandomAccessIterator, typename _Size, typename _Compare>
+ void
+ __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last, _Size __depth_limit,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ while (__last - __first > 3)
+ {
+ if (__depth_limit == 0)
+ {
+ std::__heap_select(__first, __nth + 1, __last, __comp);
+ // Place the nth largest element in its final position.
+ std::iter_swap(__first, __nth);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIterator __cut =
+ std::__unguarded_partition(__first, __last,
+ _ValueType(std::__median(*__first,
+ *(__first
+ + (__last
+ - __first)
+ / 2),
+ *(__last - 1),
+ __comp)),
+ __comp);
+ if (__cut <= __nth)
+ __first = __cut;
+ else
+ __last = __cut;
+ }
+ std::__insertion_sort(__first, __last, __comp);
+ }
+
+ // nth_element
+
+ /**
+ * @brief Finds the first position in which @a val could be inserted
+ * without changing the ordering.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val, or end() if every element is less than
+ * @a val.
+ * @ingroup binary_search_algorithms
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+
+ /**
+ * @brief Finds the first position in which @a val could be inserted
+ * without changing the ordering.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return An iterator pointing to the first element "not less than" @a val,
+ * or end() if every element is less than @a val.
+ * @ingroup binary_search_algorithms
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ _ForwardIterator
+ lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val, _Compare __comp)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _Tp>)
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__CheckedCompare(__comp)(*__middle, __val))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+
+ /**
+ * @brief Finds the last position in which @a val could be inserted
+ * without changing the ordering.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return An iterator pointing to the first element greater than @a val,
+ * or end() if no elements are greater than @a val.
+ * @ingroup binary_search_algorithms
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ _ForwardIterator
+ upper_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__val < *__middle)
+ __len = __half;
+ else
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ }
+ return __first;
+ }
+
+ /**
+ * @brief Finds the last position in which @a val could be inserted
+ * without changing the ordering.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return An iterator pointing to the first element greater than @a val,
+ * or end() if no elements are greater than @a val.
+ * @ingroup binary_search_algorithms
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ _ForwardIterator
+ upper_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val, _Compare __comp)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _Tp, _ValueType>)
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__CheckedCompare(__comp)(__val, *__middle))
+ __len = __half;
+ else
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ }
+ return __first;
+ }
+
+ /**
+ * @brief Finds the largest subrange in which @a val could be inserted
+ * at any place in it without changing the ordering.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return An pair of iterators defining the subrange.
+ * @ingroup binary_search_algorithms
+ *
+ * This is equivalent to
+ * @code
+ * std::make_pair(lower_bound(first, last, val),
+ * upper_bound(first, last, val))
+ * @endcode
+ * but does not actually call those functions.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ pair<_ForwardIterator, _ForwardIterator>
+ equal_range(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType, _Tp>)
+ __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle, __left, __right;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else if (__val < *__middle)
+ __len = __half;
+ else
+ {
+ __left = std::lower_bound(__first, __middle, __val);
+ std::advance(__first, __len);
+ __right = std::upper_bound(++__middle, __first, __val);
+ return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+ }
+ }
+ return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+ }
+
+ /**
+ * @brief Finds the largest subrange in which @a val could be inserted
+ * at any place in it without changing the ordering.
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return An pair of iterators defining the subrange.
+ * @ingroup binary_search_algorithms
+ *
+ * This is equivalent to
+ * @code
+ * std::make_pair(lower_bound(first, last, val, comp),
+ * upper_bound(first, last, val, comp))
+ * @endcode
+ * but does not actually call those functions.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ pair<_ForwardIterator, _ForwardIterator>
+ equal_range(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _Tp>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _Tp, _ValueType>)
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
+
+ _DistanceType __len = std::distance(__first, __last);
+ _DistanceType __half;
+ _ForwardIterator __middle, __left, __right;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ std::advance(__middle, __half);
+ if (__CheckedCompare(__comp)(*__middle, __val))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else if (__CheckedCompare(__comp)(__val, *__middle))
+ __len = __half;
+ else
+ {
+ __left = std::lower_bound(__first, __middle, __val,
+ __CheckedCompare(__comp));
+ std::advance(__first, __len);
+ __right = std::upper_bound(++__middle, __first, __val,
+ __CheckedCompare(__comp));
+ return pair<_ForwardIterator, _ForwardIterator>(__left, __right);
+ }
+ }
+ return pair<_ForwardIterator, _ForwardIterator>(__first, __first);
+ }
+
+ /**
+ * @brief Determines whether an element exists in a range.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @return True if @a val (or its equivalent) is in [@a first,@a last ].
+ *
+ * Note that this does not actually return an iterator to @a val. For
+ * that, use std::find or a container's specialized find member functions.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ bool
+ binary_search(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanOpConcept<_Tp, _ValueType>)
+ __glibcxx_requires_partitioned_lower(__first, __last, __val);
+ __glibcxx_requires_partitioned_upper(__first, __last, __val);
+
+ _ForwardIterator __i = std::lower_bound(__first, __last, __val);
+ return __i != __last && !(__val < *__i);
+ }
+
+ /**
+ * @brief Determines whether an element exists in a range.
+ * @ingroup binary_search_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param val The search term.
+ * @param comp A functor to use for comparisons.
+ * @return True if @a val (or its equivalent) is in [@a first,@a last ].
+ *
+ * Note that this does not actually return an iterator to @a val. For
+ * that, use std::find or a container's specialized find member functions.
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ bool
+ binary_search(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val, _Compare __comp)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _Tp, _ValueType>)
+ __glibcxx_requires_partitioned_lower_pred(__first, __last,
+ __val, __comp);
+ __glibcxx_requires_partitioned_upper_pred(__first, __last,
+ __val, __comp);
+
+ _ForwardIterator __i = std::lower_bound(__first, __last, __val,
+ __CheckedCompare(__comp));
+ return __i != __last && !bool(__CheckedCompare(__comp)(__val, *__i));
+ }
+
+ // merge
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _BidirectionalIterator3>
+ _BidirectionalIterator3
+ __merge_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result)
+ {
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, __last2, __result);
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, __last1, __result);
+ --__last1;
+ --__last2;
+ while (true)
+ {
+ if (*__last2 < *__last1)
+ {
+ *--__result = *__last1;
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, ++__last2, __result);
+ --__last1;
+ }
+ else
+ {
+ *--__result = *__last2;
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, ++__last1, __result);
+ --__last2;
+ }
+ }
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _BidirectionalIterator3, typename _Compare>
+ _BidirectionalIterator3
+ __merge_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result,
+ _Compare __comp)
+ {
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, __last2, __result);
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, __last1, __result);
+ --__last1;
+ --__last2;
+ while (true)
+ {
+ if (__comp(*__last2, *__last1))
+ {
+ *--__result = *__last1;
+ if (__first1 == __last1)
+ return std::copy_backward(__first2, ++__last2, __result);
+ --__last1;
+ }
+ else
+ {
+ *--__result = *__last2;
+ if (__first2 == __last2)
+ return std::copy_backward(__first1, ++__last1, __result);
+ --__last2;
+ }
+ }
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
+ typename _Distance>
+ _BidirectionalIterator1
+ __rotate_adaptive(_BidirectionalIterator1 __first,
+ _BidirectionalIterator1 __middle,
+ _BidirectionalIterator1 __last,
+ _Distance __len1, _Distance __len2,
+ _BidirectionalIterator2 __buffer,
+ _Distance __buffer_size)
+ {
+ _BidirectionalIterator2 __buffer_end;
+ if (__len1 > __len2 && __len2 <= __buffer_size)
+ {
+ __buffer_end = std::copy(__middle, __last, __buffer);
+ std::copy_backward(__first, __middle, __last);
+ return std::copy(__buffer, __buffer_end, __first);
+ }
+ else if (__len1 <= __buffer_size)
+ {
+ __buffer_end = std::copy(__first, __middle, __buffer);
+ std::copy(__middle, __last, __first);
+ return std::copy_backward(__buffer, __buffer_end, __last);
+ }
+ else
+ {
+ std::rotate(__first, __middle, __last);
+ std::advance(__first, std::distance(__middle, __last));
+ return __first;
+ }
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Pointer>
+ void
+ __merge_adaptive(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2,
+ _Pointer __buffer, _Distance __buffer_size)
+ {
+ if (__len1 <= __len2 && __len1 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
+ _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ __first);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
+ std::__merge_backward(__first, __middle, __buffer,
+ __buffer_end, __last);
+ }
+ else
+ {
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last,
+ *__first_cut);
+ __len22 = std::distance(__middle, __second_cut);
+ }
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle,
+ *__second_cut);
+ __len11 = std::distance(__first, __first_cut);
+ }
+ _BidirectionalIterator __new_middle =
+ std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+ __len1 - __len11, __len22, __buffer,
+ __buffer_size);
+ std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+ __len22, __buffer, __buffer_size);
+ std::__merge_adaptive(__new_middle, __second_cut, __last,
+ __len1 - __len11,
+ __len2 - __len22, __buffer, __buffer_size);
+ }
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Pointer, typename _Compare>
+ void
+ __merge_adaptive(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2,
+ _Pointer __buffer, _Distance __buffer_size,
+ _Compare __comp)
+ {
+ if (__len1 <= __len2 && __len1 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__first, __middle, __buffer);
+ _GLIBCXX_STD_P::merge(__buffer, __buffer_end, __middle, __last,
+ __first, __comp);
+ }
+ else if (__len2 <= __buffer_size)
+ {
+ _Pointer __buffer_end = std::copy(__middle, __last, __buffer);
+ std::__merge_backward(__first, __middle, __buffer, __buffer_end,
+ __last, __comp);
+ }
+ else
+ {
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+ __comp);
+ __len22 = std::distance(__middle, __second_cut);
+ }
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+ __comp);
+ __len11 = std::distance(__first, __first_cut);
+ }
+ _BidirectionalIterator __new_middle =
+ std::__rotate_adaptive(__first_cut, __middle, __second_cut,
+ __len1 - __len11, __len22, __buffer,
+ __buffer_size);
+ std::__merge_adaptive(__first, __first_cut, __new_middle, __len11,
+ __len22, __buffer, __buffer_size, __comp);
+ std::__merge_adaptive(__new_middle, __second_cut, __last,
+ __len1 - __len11,
+ __len2 - __len22, __buffer,
+ __buffer_size, __comp);
+ }
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator, typename _Distance>
+ void
+ __merge_without_buffer(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2)
+ {
+ if (__len1 == 0 || __len2 == 0)
+ return;
+ if (__len1 + __len2 == 2)
+ {
+ if (*__middle < *__first)
+ std::iter_swap(__first, __middle);
+ return;
+ }
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut);
+ __len22 = std::distance(__middle, __second_cut);
+ }
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut);
+ __len11 = std::distance(__first, __first_cut);
+ }
+ std::rotate(__first_cut, __middle, __second_cut);
+ _BidirectionalIterator __new_middle = __first_cut;
+ std::advance(__new_middle, std::distance(__middle, __second_cut));
+ std::__merge_without_buffer(__first, __first_cut, __new_middle,
+ __len11, __len22);
+ std::__merge_without_buffer(__new_middle, __second_cut, __last,
+ __len1 - __len11, __len2 - __len22);
+ }
+
+ /// This is a helper function for the merge routines.
+ template<typename _BidirectionalIterator, typename _Distance,
+ typename _Compare>
+ void
+ __merge_without_buffer(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Distance __len1, _Distance __len2,
+ _Compare __comp)
+ {
+ if (__len1 == 0 || __len2 == 0)
+ return;
+ if (__len1 + __len2 == 2)
+ {
+ if (__comp(*__middle, *__first))
+ std::iter_swap(__first, __middle);
+ return;
+ }
+ _BidirectionalIterator __first_cut = __first;
+ _BidirectionalIterator __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2)
+ {
+ __len11 = __len1 / 2;
+ std::advance(__first_cut, __len11);
+ __second_cut = std::lower_bound(__middle, __last, *__first_cut,
+ __comp);
+ __len22 = std::distance(__middle, __second_cut);
+ }
+ else
+ {
+ __len22 = __len2 / 2;
+ std::advance(__second_cut, __len22);
+ __first_cut = std::upper_bound(__first, __middle, *__second_cut,
+ __comp);
+ __len11 = std::distance(__first, __first_cut);
+ }
+ std::rotate(__first_cut, __middle, __second_cut);
+ _BidirectionalIterator __new_middle = __first_cut;
+ std::advance(__new_middle, std::distance(__middle, __second_cut));
+ std::__merge_without_buffer(__first, __first_cut, __new_middle,
+ __len11, __len22, __comp);
+ std::__merge_without_buffer(__new_middle, __second_cut, __last,
+ __len1 - __len11, __len2 - __len22, __comp);
+ }
+
+ /**
+ * @brief Merges two sorted ranges in place.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Merges two sorted and consecutive ranges, [first,middle) and
+ * [middle,last), and puts the result in [first,last). The output will
+ * be sorted. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ *
+ * If enough additional memory is available, this takes (last-first)-1
+ * comparisons. Otherwise an NlogN algorithm is used, where N is
+ * distance(first,last).
+ */
+ template<typename _BidirectionalIterator>
+ void
+ inplace_merge(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last)
+ {
+ typedef typename iterator_traits<_BidirectionalIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_BidirectionalIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_sorted(__first, __middle);
+ __glibcxx_requires_sorted(__middle, __last);
+
+ if (__first == __middle || __middle == __last)
+ return;
+
+ _DistanceType __len1 = std::distance(__first, __middle);
+ _DistanceType __len2 = std::distance(__middle, __last);
+
+ _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__merge_without_buffer(__first, __middle, __last, __len1, __len2);
+ else
+ std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+ __buf.begin(), _DistanceType(__buf.size()));
+ }
+
+ /**
+ * @brief Merges two sorted ranges in place.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @param comp A functor to use for comparisons.
+ * @return Nothing.
+ *
+ * Merges two sorted and consecutive ranges, [first,middle) and
+ * [middle,last), and puts the result in [first,last). The output will
+ * be sorted. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ *
+ * If enough additional memory is available, this takes (last-first)-1
+ * comparisons. Otherwise an NlogN algorithm is used, where N is
+ * distance(first,last).
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
+ void
+ inplace_merge(_BidirectionalIterator __first,
+ _BidirectionalIterator __middle,
+ _BidirectionalIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_BidirectionalIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_BidirectionalIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_sorted_pred(__first, __middle, __comp);
+ __glibcxx_requires_sorted_pred(__middle, __last, __comp);
+
+ if (__first == __middle || __middle == __last)
+ return;
+
+ const _DistanceType __len1 = std::distance(__first, __middle);
+ const _DistanceType __len2 = std::distance(__middle, __last);
+
+ _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__merge_without_buffer(__first, __middle, __last, __len1,
+ __len2, __CheckedCompare(__comp));
+ else
+ std::__merge_adaptive(__first, __middle, __last, __len1, __len2,
+ __buf.begin(), _DistanceType(__buf.size()),
+ __CheckedCompare(__comp));
+ }
+
+ template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+ typename _Distance>
+ void
+ __merge_sort_loop(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _RandomAccessIterator2 __result,
+ _Distance __step_size)
+ {
+ const _Distance __two_step = 2 * __step_size;
+
+ while (__last - __first >= __two_step)
+ {
+ __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size,
+ __first + __two_step,
+ __result);
+ __first += __two_step;
+ }
+
+ __step_size = std::min(_Distance(__last - __first), __step_size);
+ _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size, __last,
+ __result);
+ }
+
+ template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
+ typename _Distance, typename _Compare>
+ void
+ __merge_sort_loop(_RandomAccessIterator1 __first,
+ _RandomAccessIterator1 __last,
+ _RandomAccessIterator2 __result, _Distance __step_size,
+ _Compare __comp)
+ {
+ const _Distance __two_step = 2 * __step_size;
+
+ while (__last - __first >= __two_step)
+ {
+ __result = _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size, __first + __two_step,
+ __result,
+ __comp);
+ __first += __two_step;
+ }
+ __step_size = std::min(_Distance(__last - __first), __step_size);
+
+ _GLIBCXX_STD_P::merge(__first, __first + __step_size,
+ __first + __step_size, __last, __result, __comp);
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance>
+ void
+ __chunk_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Distance __chunk_size)
+ {
+ while (__last - __first >= __chunk_size)
+ {
+ std::__insertion_sort(__first, __first + __chunk_size);
+ __first += __chunk_size;
+ }
+ std::__insertion_sort(__first, __last);
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance,
+ typename _Compare>
+ void
+ __chunk_insertion_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Distance __chunk_size, _Compare __comp)
+ {
+ while (__last - __first >= __chunk_size)
+ {
+ std::__insertion_sort(__first, __first + __chunk_size, __comp);
+ __first += __chunk_size;
+ }
+ std::__insertion_sort(__first, __last, __comp);
+ }
+
+ enum { _S_chunk_size = 7 };
+
+ template<typename _RandomAccessIterator, typename _Pointer>
+ void
+ __merge_sort_with_buffer(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+
+ const _Distance __len = __last - __first;
+ const _Pointer __buffer_last = __buffer + __len;
+
+ _Distance __step_size = _S_chunk_size;
+ std::__chunk_insertion_sort(__first, __last, __step_size);
+
+ while (__step_size < __len)
+ {
+ std::__merge_sort_loop(__first, __last, __buffer, __step_size);
+ __step_size *= 2;
+ std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
+ __step_size *= 2;
+ }
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer, typename _Compare>
+ void
+ __merge_sort_with_buffer(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _Distance;
+
+ const _Distance __len = __last - __first;
+ const _Pointer __buffer_last = __buffer + __len;
+
+ _Distance __step_size = _S_chunk_size;
+ std::__chunk_insertion_sort(__first, __last, __step_size, __comp);
+
+ while (__step_size < __len)
+ {
+ std::__merge_sort_loop(__first, __last, __buffer,
+ __step_size, __comp);
+ __step_size *= 2;
+ std::__merge_sort_loop(__buffer, __buffer_last, __first,
+ __step_size, __comp);
+ __step_size *= 2;
+ }
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer,
+ typename _Distance>
+ void
+ __stable_sort_adaptive(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Distance __buffer_size)
+ {
+ const _Distance __len = (__last - __first + 1) / 2;
+ const _RandomAccessIterator __middle = __first + __len;
+ if (__len > __buffer_size)
+ {
+ std::__stable_sort_adaptive(__first, __middle,
+ __buffer, __buffer_size);
+ std::__stable_sort_adaptive(__middle, __last,
+ __buffer, __buffer_size);
+ }
+ else
+ {
+ std::__merge_sort_with_buffer(__first, __middle, __buffer);
+ std::__merge_sort_with_buffer(__middle, __last, __buffer);
+ }
+ std::__merge_adaptive(__first, __middle, __last,
+ _Distance(__middle - __first),
+ _Distance(__last - __middle),
+ __buffer, __buffer_size);
+ }
+
+ template<typename _RandomAccessIterator, typename _Pointer,
+ typename _Distance, typename _Compare>
+ void
+ __stable_sort_adaptive(_RandomAccessIterator __first,
+ _RandomAccessIterator __last,
+ _Pointer __buffer, _Distance __buffer_size,
+ _Compare __comp)
+ {
+ const _Distance __len = (__last - __first + 1) / 2;
+ const _RandomAccessIterator __middle = __first + __len;
+ if (__len > __buffer_size)
+ {
+ std::__stable_sort_adaptive(__first, __middle, __buffer,
+ __buffer_size, __comp);
+ std::__stable_sort_adaptive(__middle, __last, __buffer,
+ __buffer_size, __comp);
+ }
+ else
+ {
+ std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
+ std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
+ }
+ std::__merge_adaptive(__first, __middle, __last,
+ _Distance(__middle - __first),
+ _Distance(__last - __middle),
+ __buffer, __buffer_size,
+ __comp);
+ }
+
+ /// This is a helper function for the stable sorting routines.
+ template<typename _RandomAccessIterator>
+ void
+ __inplace_stable_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last)
+ {
+ if (__last - __first < 15)
+ {
+ std::__insertion_sort(__first, __last);
+ return;
+ }
+ _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+ std::__inplace_stable_sort(__first, __middle);
+ std::__inplace_stable_sort(__middle, __last);
+ std::__merge_without_buffer(__first, __middle, __last,
+ __middle - __first,
+ __last - __middle);
+ }
+
+ /// This is a helper function for the stable sorting routines.
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ __inplace_stable_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ if (__last - __first < 15)
+ {
+ std::__insertion_sort(__first, __last, __comp);
+ return;
+ }
+ _RandomAccessIterator __middle = __first + (__last - __first) / 2;
+ std::__inplace_stable_sort(__first, __middle, __comp);
+ std::__inplace_stable_sort(__middle, __last, __comp);
+ std::__merge_without_buffer(__first, __middle, __last,
+ __middle - __first,
+ __last - __middle,
+ __comp);
+ }
+
+ // stable_sort
+
+ // Set algorithms: includes, set_union, set_intersection, set_difference,
+ // set_symmetric_difference. All of these algorithms have the precondition
+ // that their input ranges are sorted and the postcondition that their output
+ // ranges are sorted.
+
+ /**
+ * @brief Determines whether all elements of a sequence exists in a range.
+ * @param first1 Start of search range.
+ * @param last1 End of search range.
+ * @param first2 Start of sequence
+ * @param last2 End of sequence.
+ * @return True if each element in [first2,last2) is contained in order
+ * within [first1,last1). False otherwise.
+ * @ingroup set_algorithms
+ *
+ * This operation expects both [first1,last1) and [first2,last2) to be
+ * sorted. Searches for the presence of each element in [first2,last2)
+ * within [first1,last1). The iterators over each range only move forward,
+ * so this is a linear algorithm. If an element in [first2,last2) is not
+ * found before the search iterator reaches @a last2, false is returned.
+ */
+ template<typename _InputIterator1, typename _InputIterator2>
+ bool
+ includes(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first2 < *__first1)
+ return false;
+ else if(*__first1 < *__first2)
+ ++__first1;
+ else
+ ++__first1, ++__first2;
+
+ return __first2 == __last2;
+ }
+
+ /**
+ * @brief Determines whether all elements of a sequence exists in a range
+ * using comparison.
+ * @ingroup set_algorithms
+ * @param first1 Start of search range.
+ * @param last1 End of search range.
+ * @param first2 Start of sequence
+ * @param last2 End of sequence.
+ * @param comp Comparison function to use.
+ * @return True if each element in [first2,last2) is contained in order
+ * within [first1,last1) according to comp. False otherwise.
+ * @ingroup set_algorithms
+ *
+ * This operation expects both [first1,last1) and [first2,last2) to be
+ * sorted. Searches for the presence of each element in [first2,last2)
+ * within [first1,last1), using comp to decide. The iterators over each
+ * range only move forward, so this is a linear algorithm. If an element
+ * in [first2,last2) is not found before the search iterator reaches @a
+ * last2, false is returned.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Compare>
+ bool
+ includes(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__CheckedCompare(__comp)(*__first2, *__first1))
+ return false;
+ else if(__CheckedCompare(__comp)(*__first1, *__first2))
+ ++__first1;
+ else
+ ++__first1, ++__first2;
+
+ return __first2 == __last2;
+ }
+
+ // nth_element
+ // merge
+ // set_difference
+ // set_intersection
+ // set_union
+ // stable_sort
+ // set_symmetric_difference
+ // min_element
+ // max_element
+
+ /**
+ * @brief Permute range into the next "dictionary" ordering.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the next one of this set.
+ * Returns true if there are more sequences to generate. If the sequence
+ * is the largest of the set, the smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator>
+ bool
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__i < *__ii)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*__i < *--__j))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the next "dictionary" ordering using
+ * comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp A comparison functor.
+ * @return False if wrapped to first permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the next one of this set. Returns true if there are more
+ * sequences to generate. If the sequence is the largest of the set, the
+ * smallest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
+ bool
+ next_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__CheckedCompare(__comp)(*__i, *__ii))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!bool(__CheckedCompare(__comp)(*__i, *--__j)))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the previous "dictionary" ordering.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range as a set of "dictionary" sorted
+ * sequences. Permutes the current sequence into the previous one of this
+ * set. Returns true if there are more sequences to generate. If the
+ * sequence is the smallest of the set, the largest is generated and false
+ * returned.
+ */
+ template<typename _BidirectionalIterator>
+ bool
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (*__ii < *__i)
+ {
+ _BidirectionalIterator __j = __last;
+ while (!(*--__j < *__i))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ /**
+ * @brief Permute range into the previous "dictionary" ordering using
+ * comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp A comparison functor.
+ * @return False if wrapped to last permutation, true otherwise.
+ *
+ * Treats all permutations of the range [first,last) as a set of
+ * "dictionary" sorted sequences ordered by @a comp. Permutes the current
+ * sequence into the previous one of this set. Returns true if there are
+ * more sequences to generate. If the sequence is the smallest of the set,
+ * the largest is generated and false returned.
+ */
+ template<typename _BidirectionalIterator, typename _Compare>
+ bool
+ prev_permutation(_BidirectionalIterator __first,
+ _BidirectionalIterator __last, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_BidirectionalIterator>::value_type,
+ typename iterator_traits<_BidirectionalIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return false;
+ _BidirectionalIterator __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;)
+ {
+ _BidirectionalIterator __ii = __i;
+ --__i;
+ if (__CheckedCompare(__comp)(*__ii, *__i))
+ {
+ _BidirectionalIterator __j = __last;
+ while (!bool(__CheckedCompare(__comp)(*--__j, *__i)))
+ {}
+ std::iter_swap(__i, __j);
+ std::reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first)
+ {
+ std::reverse(__first, __last);
+ return false;
+ }
+ }
+ }
+
+ // replace
+ // replace_if
+
+ /**
+ * @brief Copy a sequence, replacing each element of one value with another
+ * value.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param old_value The value to be replaced.
+ * @param new_value The replacement value.
+ * @return The end of the output sequence, @p result+(last-first).
+ *
+ * Copies each element in the input range @p [first,last) to the
+ * output range @p [result,result+(last-first)) replacing elements
+ * equal to @p old_value with @p new_value.
+ */
+ template<typename _InputIterator, typename _OutputIterator, typename _Tp>
+ _OutputIterator
+ replace_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ const _Tp& __old_value, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ if (*__first == __old_value)
+ *__result = __new_value;
+ else
+ *__result = *__first;
+ return __result;
+ }
+
+ /**
+ * @brief Copy a sequence, replacing each value for which a predicate
+ * returns true with another value.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param pred A predicate.
+ * @param new_value The replacement value.
+ * @return The end of the output sequence, @p result+(last-first).
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * @p [result,result+(last-first)) replacing elements for which
+ * @p pred returns true with @p new_value.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _Predicate, typename _Tp>
+ _OutputIterator
+ replace_copy_if(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ _Predicate __pred, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ if (__pred(*__first))
+ *__result = __new_value;
+ else
+ *__result = *__first;
+ return __result;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Determines whether the elements of a sequence are sorted.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return True if the elements are sorted, false otherwise.
+ */
+ template<typename _ForwardIterator>
+ inline bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last)
+ { return std::is_sorted_until(__first, __last) == __last; }
+
+ /**
+ * @brief Determines whether the elements of a sequence are sorted
+ * according to a comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return True if the elements are sorted, false otherwise.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ inline bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ { return std::is_sorted_until(__first, __last, __comp) == __last; }
+
+ /**
+ * @brief Determines the end of a sorted sequence.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return An iterator pointing to the last iterator i in [first, last)
+ * for which the range [first, i) is sorted.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __last;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (*__next < *__first)
+ return __next;
+ return __next;
+ }
+
+ /**
+ * @brief Determines the end of a sorted sequence using comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return An iterator pointing to the last iterator i in [first, last)
+ * for which the range [first, i) is sorted.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ is_sorted_until(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __last;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (__CheckedCompare(__comp)(*__next, *__first))
+ return __next;
+ return __next;
+ }
+
+ /**
+ * @brief Determines min and max at once as an ordered pair.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+ */
+ template<typename _Tp>
+ inline pair<const _Tp&, const _Tp&>
+ minmax(const _Tp& __a, const _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+
+ return __b < __a ? pair<const _Tp&, const _Tp&>(__b, __a)
+ : pair<const _Tp&, const _Tp&>(__a, __b);
+ }
+
+ /**
+ * @brief Determines min and max at once as an ordered pair.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @param comp A @link comparison_functor comparison functor@endlink.
+ * @return A pair(b, a) if b is smaller than a, pair(a, b) otherwise.
+ */
+ template<typename _Tp, typename _Compare>
+ inline pair<const _Tp&, const _Tp&>
+ minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
+ {
+ return __CheckedCompare(__comp)(__b, __a)
+ ? pair<const _Tp&, const _Tp&>(__b, __a)
+ : pair<const _Tp&, const _Tp&>(__a, __b);
+ }
+
+ /**
+ * @brief Return a pair of iterators pointing to the minimum and maximum
+ * elements in a range.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @return make_pair(m, M), where m is the first iterator i in
+ * [first, last) such that no other element in the range is
+ * smaller, and where M is the last iterator i in [first, last)
+ * such that no other element in the range is larger.
+ */
+ template<typename _ForwardIterator>
+ pair<_ForwardIterator, _ForwardIterator>
+ minmax_element(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _ForwardIterator __next = __first;
+ if (__first == __last
+ || ++__next == __last)
+ return std::make_pair(__first, __first);
+
+ _ForwardIterator __min, __max;
+ if (*__next < *__first)
+ {
+ __min = __next;
+ __max = __first;
+ }
+ else
+ {
+ __min = __first;
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+
+ while (__first != __last)
+ {
+ __next = __first;
+ if (++__next == __last)
+ {
+ if (*__first < *__min)
+ __min = __first;
+ else if (!(*__first < *__max))
+ __max = __first;
+ break;
+ }
+
+ if (*__next < *__first)
+ {
+ if (*__next < *__min)
+ __min = __next;
+ if (!(*__first < *__max))
+ __max = __first;
+ }
+ else
+ {
+ if (*__first < *__min)
+ __min = __first;
+ if (!(*__next < *__max))
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+ }
+
+ return std::make_pair(__min, __max);
+ }
+
+ /**
+ * @brief Return a pair of iterators pointing to the minimum and maximum
+ * elements in a range.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return make_pair(m, M), where m is the first iterator i in
+ * [first, last) such that no other element in the range is
+ * smaller, and where M is the last iterator i in [first, last)
+ * such that no other element in the range is larger.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ pair<_ForwardIterator, _ForwardIterator>
+ minmax_element(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _ForwardIterator __next = __first;
+ if (__first == __last
+ || ++__next == __last)
+ return std::make_pair(__first, __first);
+
+ _ForwardIterator __min, __max;
+ if (__CheckedCompare(__comp)(*__next, *__first))
+ {
+ __min = __next;
+ __max = __first;
+ }
+ else
+ {
+ __min = __first;
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+
+ while (__first != __last)
+ {
+ __next = __first;
+ if (++__next == __last)
+ {
+ if (__CheckedCompare(__comp)(*__first, *__min))
+ __min = __first;
+ else if (!__CheckedCompare(__comp)(*__first, *__max))
+ __max = __first;
+ break;
+ }
+
+ if (__CheckedCompare(__comp)(*__next, *__first))
+ {
+ if (__CheckedCompare(__comp)(*__next, *__min))
+ __min = __next;
+ if (!__CheckedCompare(__comp)(*__first, *__max))
+ __max = __first;
+ }
+ else
+ {
+ if (__CheckedCompare(__comp)(*__first, *__min))
+ __min = __first;
+ if (!__CheckedCompare(__comp)(*__next, *__max))
+ __max = __next;
+ }
+
+ __first = __next;
+ ++__first;
+ }
+
+ return std::make_pair(__min, __max);
+ }
+
+ // N2722 + fixes.
+ template<typename _Tp>
+ inline _Tp
+ min(initializer_list<_Tp> __l)
+ { return *std::min_element(__l.begin(), __l.end()); }
+
+ template<typename _Tp, typename _Compare>
+ inline _Tp
+ min(initializer_list<_Tp> __l, _Compare __comp)
+ { return *std::min_element(__l.begin(), __l.end(), __comp); }
+
+ template<typename _Tp>
+ inline _Tp
+ max(initializer_list<_Tp> __l)
+ { return *std::max_element(__l.begin(), __l.end()); }
+
+ template<typename _Tp, typename _Compare>
+ inline _Tp
+ max(initializer_list<_Tp> __l, _Compare __comp)
+ { return *std::max_element(__l.begin(), __l.end(), __comp); }
+
+ template<typename _Tp>
+ inline pair<_Tp, _Tp>
+ minmax(initializer_list<_Tp> __l)
+ {
+ pair<const _Tp*, const _Tp*> __p =
+ std::minmax_element(__l.begin(), __l.end());
+ return std::make_pair(*__p.first, *__p.second);
+ }
+
+ template<typename _Tp, typename _Compare>
+ inline pair<_Tp, _Tp>
+ minmax(initializer_list<_Tp> __l, _Compare __comp)
+ {
+ pair<const _Tp*, const _Tp*> __p =
+ std::minmax_element(__l.begin(), __l.end(), __comp);
+ return std::make_pair(*__p.first, *__p.second);
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ /**
+ * @brief Apply a function to every element of a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param f A unary function object.
+ * @return @p f.
+ *
+ * Applies the function object @p f to each element in the range
+ * @p [first,last). @p f must not modify the order of the sequence.
+ * If @p f has a return value it is ignored.
+ */
+ template<typename _InputIterator, typename _Function>
+ _Function
+ for_each(_InputIterator __first, _InputIterator __last, _Function __f)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ for (; __first != __last; ++__first)
+ __f(*__first);
+ return __f;
+ }
+
+ /**
+ * @brief Find the first occurrence of a value in a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param val The value to find.
+ * @return The first iterator @c i in the range @p [first,last)
+ * such that @c *i == @p val, or @p last if no such iterator exists.
+ */
+ template<typename _InputIterator, typename _Tp>
+ inline _InputIterator
+ find(_InputIterator __first, _InputIterator __last,
+ const _Tp& __val)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::__find(__first, __last, __val,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Find the first element in a sequence for which a
+ * predicate is true.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return The first iterator @c i in the range @p [first,last)
+ * such that @p pred(*i) is true, or @p last if no such iterator exists.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ find_if(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ return std::__find_if(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+
+ /**
+ * @brief Find element from a set in a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c *i == @p *(i2) such that i2 is an
+ * iterator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for an element that is equal to
+ * some element in the range [first2,last2). If found, returns an iterator
+ * in the range [first1,last1), otherwise returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ for (; __first1 != __last1; ++__first1)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+ if (*__first1 == *__iter)
+ return __first1;
+ return __last1;
+ }
+
+ /**
+ * @brief Find element from a set in a sequence using a predicate.
+ * @ingroup non_mutating_algorithms
+ * @param first1 Start of range to search.
+ * @param last1 End of range to search.
+ * @param first2 Start of match candidates.
+ * @param last2 End of match candidates.
+ * @param comp Predicate to use.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1) such that @c comp(*i, @p *(i2)) is true and i2 is an
+ * iterator in [first2,last2), or @p last1 if no such iterator exists.
+ *
+
+ * Searches the range @p [first1,last1) for an element that is
+ * equal to some element in the range [first2,last2). If found,
+ * returns an iterator in the range [first1,last1), otherwise
+ * returns @p last1.
+ */
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _BinaryPredicate>
+ _InputIterator
+ find_first_of(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2, _ForwardIterator __last2,
+ _BinaryPredicate __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_InputIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ for (; __first1 != __last1; ++__first1)
+ for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter)
+ if (__comp(*__first1, *__iter))
+ return __first1;
+ return __last1;
+ }
+
+ /**
+ * @brief Find two adjacent values in a sequence that are equal.
+ * @ingroup non_mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @return The first iterator @c i such that @c i and @c i+1 are both
+ * valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
+ * or @p last if no such iterator exists.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ if (__first == __last)
+ return __last;
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (*__first == *__next)
+ return __first;
+ __first = __next;
+ }
+ return __last;
+ }
+
+ /**
+ * @brief Find two adjacent values in a sequence using a predicate.
+ * @ingroup non_mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param binary_pred A binary predicate.
+ * @return The first iterator @c i such that @c i and @c i+1 are both
+ * valid iterators in @p [first,last) and such that
+ * @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
+ * exists.
+ */
+ template<typename _ForwardIterator, typename _BinaryPredicate>
+ _ForwardIterator
+ adjacent_find(_ForwardIterator __first, _ForwardIterator __last,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ if (__first == __last)
+ return __last;
+ _ForwardIterator __next = __first;
+ while(++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ return __first;
+ __first = __next;
+ }
+ return __last;
+ }
+
+ /**
+ * @brief Count the number of copies of a value in a sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param value The value to be counted.
+ * @return The number of iterators @c i in the range @p [first,last)
+ * for which @c *i == @p value
+ */
+ template<typename _InputIterator, typename _Tp>
+ typename iterator_traits<_InputIterator>::difference_type
+ count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ for (; __first != __last; ++__first)
+ if (*__first == __value)
+ ++__n;
+ return __n;
+ }
+
+ /**
+ * @brief Count the elements of a sequence for which a predicate is true.
+ * @ingroup non_mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param pred A predicate.
+ * @return The number of iterators @c i in the range @p [first,last)
+ * for which @p pred(*i) is true.
+ */
+ template<typename _InputIterator, typename _Predicate>
+ typename iterator_traits<_InputIterator>::difference_type
+ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ ++__n;
+ return __n;
+ }
+
+ /**
+ * @brief Search a sequence for a matching sub-sequence.
+ * @ingroup non_mutating_algorithms
+ * @param first1 A forward iterator.
+ * @param last1 A forward iterator.
+ * @param first2 A forward iterator.
+ * @param last2 A forward iterator.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+ * for each @c N in the range @p [0,last2-first2), or @p last1 if no
+ * such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2) and
+ * returns an iterator to the first element of the sub-sequence, or
+ * @p last1 if the sub-sequence is not found.
+ *
+ * Because the sub-sequence must lie completely within the range
+ * @p [first1,last1) it must start at a position less than
+ * @p last1-(last2-first2) where @p last2-first2 is the length of the
+ * sub-sequence.
+ * This means that the returned iterator @c i will be in the range
+ * @p [first1,last1-(last2-first2))
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIterator2 __p1(__first2);
+ if (++__p1 == __last2)
+ return _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+
+ // General case.
+ _ForwardIterator2 __p;
+ _ForwardIterator1 __current = __first1;
+
+ for (;;)
+ {
+ __first1 = _GLIBCXX_STD_P::find(__first1, __last1, *__first2);
+ if (__first1 == __last1)
+ return __last1;
+
+ __p = __p1;
+ __current = __first1;
+ if (++__current == __last1)
+ return __last1;
+
+ while (*__current == *__p)
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
+ return __first1;
+ }
+
+ /**
+ * @brief Search a sequence for a matching sub-sequence using a predicate.
+ * @ingroup non_mutating_algorithms
+ * @param first1 A forward iterator.
+ * @param last1 A forward iterator.
+ * @param first2 A forward iterator.
+ * @param last2 A forward iterator.
+ * @param predicate A binary predicate.
+ * @return The first iterator @c i in the range
+ * @p [first1,last1-(last2-first2)) such that
+ * @p predicate(*(i+N),*(first2+N)) is true for each @c N in the range
+ * @p [0,last2-first2), or @p last1 if no such iterator exists.
+ *
+ * Searches the range @p [first1,last1) for a sub-sequence that compares
+ * equal value-by-value with the sequence given by @p [first2,last2),
+ * using @p predicate to determine equality, and returns an iterator
+ * to the first element of the sub-sequence, or @p last1 if no such
+ * iterator exists.
+ *
+ * @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2,
+ typename _BinaryPredicate>
+ _ForwardIterator1
+ search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2, _ForwardIterator2 __last2,
+ _BinaryPredicate __predicate)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator1>)
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator1>::value_type,
+ typename iterator_traits<_ForwardIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIterator2 __p1(__first2);
+ if (++__p1 == __last2)
+ {
+ while (__first1 != __last1
+ && !bool(__predicate(*__first1, *__first2)))
+ ++__first1;
+ return __first1;
+ }
+
+ // General case.
+ _ForwardIterator2 __p;
+ _ForwardIterator1 __current = __first1;
+
+ for (;;)
+ {
+ while (__first1 != __last1
+ && !bool(__predicate(*__first1, *__first2)))
+ ++__first1;
+ if (__first1 == __last1)
+ return __last1;
+
+ __p = __p1;
+ __current = __first1;
+ if (++__current == __last1)
+ return __last1;
+
+ while (__predicate(*__current, *__p))
+ {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
+ return __first1;
+ }
+
+
+ /**
+ * @brief Search a sequence for a number of consecutive values.
+ * @ingroup non_mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param count The number of consecutive values.
+ * @param val The value to find.
+ * @return The first iterator @c i in the range @p [first,last-count)
+ * such that @c *(i+N) == @p val for each @c N in the range @p [0,count),
+ * or @p last if no such iterator exists.
+ *
+ * Searches the range @p [first,last) for @p count consecutive elements
+ * equal to @p val.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__count <= 0)
+ return __first;
+ if (__count == 1)
+ return _GLIBCXX_STD_P::find(__first, __last, __val);
+ return std::__search_n(__first, __last, __count, __val,
+ std::__iterator_category(__first));
+ }
+
+
+ /**
+ * @brief Search a sequence for a number of consecutive values using a
+ * predicate.
+ * @ingroup non_mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param count The number of consecutive values.
+ * @param val The value to find.
+ * @param binary_pred A binary predicate.
+ * @return The first iterator @c i in the range @p [first,last-count)
+ * such that @p binary_pred(*(i+N),val) is true for each @c N in the
+ * range @p [0,count), or @p last if no such iterator exists.
+ *
+ * Searches the range @p [first,last) for @p count consecutive elements
+ * for which the predicate returns true.
+ */
+ template<typename _ForwardIterator, typename _Integer, typename _Tp,
+ typename _BinaryPredicate>
+ _ForwardIterator
+ search_n(_ForwardIterator __first, _ForwardIterator __last,
+ _Integer __count, const _Tp& __val,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__count <= 0)
+ return __first;
+ if (__count == 1)
+ {
+ while (__first != __last && !bool(__binary_pred(*__first, __val)))
+ ++__first;
+ return __first;
+ }
+ return std::__search_n(__first, __last, __count, __val, __binary_pred,
+ std::__iterator_category(__first));
+ }
+
+
+ /**
+ * @brief Perform an operation on a sequence.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param unary_op A unary operator.
+ * @return An output iterator equal to @p result+(last-first).
+ *
+ * Applies the operator to each element in the input range and assigns
+ * the results to successive elements of the output sequence.
+ * Evaluates @p *(result+N)=unary_op(*(first+N)) for each @c N in the
+ * range @p [0,last-first).
+ *
+ * @p unary_op must not alter its argument.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _UnaryOperation>
+ _OutputIterator
+ transform(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _UnaryOperation __unary_op)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _UnaryOperation"
+ __typeof__(__unary_op(*__first))>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first, ++__result)
+ *__result = __unary_op(*__first);
+ return __result;
+ }
+
+ /**
+ * @brief Perform an operation on corresponding elements of two sequences.
+ * @ingroup mutating_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param result An output iterator.
+ * @param binary_op A binary operator.
+ * @return An output iterator equal to @p result+(last-first).
+ *
+ * Applies the operator to the corresponding elements in the two
+ * input ranges and assigns the results to successive elements of the
+ * output sequence.
+ * Evaluates @p *(result+N)=binary_op(*(first1+N),*(first2+N)) for each
+ * @c N in the range @p [0,last1-first1).
+ *
+ * @p binary_op must not alter either of its arguments.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _BinaryOperation>
+ _OutputIterator
+ transform(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _OutputIterator __result,
+ _BinaryOperation __binary_op)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _BinaryOperation"
+ __typeof__(__binary_op(*__first1,*__first2))>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2, ++__result)
+ *__result = __binary_op(*__first1, *__first2);
+ return __result;
+ }
+
+ /**
+ * @brief Replace each occurrence of one value in a sequence with another
+ * value.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param old_value The value to be replaced.
+ * @param new_value The replacement value.
+ * @return replace() returns no value.
+ *
+ * For each iterator @c i in the range @p [first,last) if @c *i ==
+ * @p old_value then the assignment @c *i = @p new_value is performed.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ void
+ replace(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __old_value, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_ForwardIterator>::value_type, _Tp>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (*__first == __old_value)
+ *__first = __new_value;
+ }
+
+ /**
+ * @brief Replace each value in a sequence for which a predicate returns
+ * true with another value.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate.
+ * @param new_value The replacement value.
+ * @return replace_if() returns no value.
+ *
+ * For each iterator @c i in the range @p [first,last) if @p pred(*i)
+ * is true then the assignment @c *i = @p new_value is performed.
+ */
+ template<typename _ForwardIterator, typename _Predicate, typename _Tp>
+ void
+ replace_if(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred, const _Tp& __new_value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ if (__pred(*__first))
+ *__first = __new_value;
+ }
+
+ /**
+ * @brief Assign the result of a function object to each value in a
+ * sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param gen A function object taking no arguments and returning
+ * std::iterator_traits<_ForwardIterator>::value_type
+ * @return generate() returns no value.
+ *
+ * Performs the assignment @c *i = @p gen() for each @c i in the range
+ * @p [first,last).
+ */
+ template<typename _ForwardIterator, typename _Generator>
+ void
+ generate(_ForwardIterator __first, _ForwardIterator __last,
+ _Generator __gen)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_GeneratorConcept<_Generator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ *__first = __gen();
+ }
+
+ /**
+ * @brief Assign the result of a function object to each value in a
+ * sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param n The length of the sequence.
+ * @param gen A function object taking no arguments and returning
+ * std::iterator_traits<_ForwardIterator>::value_type
+ * @return The end of the sequence, @p first+n
+ *
+ * Performs the assignment @c *i = @p gen() for each @c i in the range
+ * @p [first,first+n).
+ */
+ template<typename _OutputIterator, typename _Size, typename _Generator>
+ _OutputIterator
+ generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ // "the type returned by a _Generator"
+ __typeof__(__gen())>)
+
+ for (; __n > 0; --__n, ++__first)
+ *__first = __gen();
+ return __first;
+ }
+
+
+ /**
+ * @brief Copy a sequence, removing consecutive duplicate values.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * beginning at @p result, except that only the first element is copied
+ * from groups of consecutive elements that compare equal.
+ * unique_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 241. Does unique_copy() require CopyConstructible and Assignable?
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 538. 241 again: Does unique_copy() require CopyConstructible and
+ * Assignable?
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ return std::__unique_copy(__first, __last, __result,
+ std::__iterator_category(__first),
+ std::__iterator_category(__result));
+ }
+
+ /**
+ * @brief Copy a sequence, removing consecutive values using a predicate.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @param binary_pred A binary predicate.
+ * @return An iterator designating the end of the resulting sequence.
+ *
+ * Copies each element in the range @p [first,last) to the range
+ * beginning at @p result, except that only the first element is copied
+ * from groups of consecutive elements for which @p binary_pred returns
+ * true.
+ * unique_copy() is stable, so the relative order of elements that are
+ * copied is unchanged.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS
+ * DR 241. Does unique_copy() require CopyConstructible and Assignable?
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryPredicate>
+ inline _OutputIterator
+ unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ _BinaryPredicate __binary_pred)
+ {
+ // concept requirements -- predicates checked later
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ return std::__unique_copy(__first, __last, __result, __binary_pred,
+ std::__iterator_category(__first),
+ std::__iterator_category(__result));
+ }
+
+
+ /**
+ * @brief Randomly shuffle the elements of a sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @return Nothing.
+ *
+ * Reorder the elements in the range @p [first,last) using a random
+ * distribution, so that every possible ordering of the sequence is
+ * equally likely.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
+ }
+
+ /**
+ * @brief Shuffle the elements of a sequence using a random number
+ * generator.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param rand The RNG functor or function.
+ * @return Nothing.
+ *
+ * Reorders the elements in the range @p [first,last) using @p rand to
+ * provide a random distribution. Calling @p rand(N) for a positive
+ * integer @p N should return a randomly chosen integer from the
+ * range [0,N).
+ */
+ template<typename _RandomAccessIterator, typename _RandomNumberGenerator>
+ void
+ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomNumberGenerator& __rand)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return;
+ for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
+ std::iter_swap(__i, __first + __rand((__i - __first) + 1));
+ }
+
+
+ /**
+ * @brief Move elements for which a predicate is true to the beginning
+ * of a sequence.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param pred A predicate functor.
+ * @return An iterator @p middle such that @p pred(i) is true for each
+ * iterator @p i in the range @p [first,middle) and false for each @p i
+ * in the range @p [middle,last).
+ *
+ * @p pred must not modify its operand. @p partition() does not preserve
+ * the relative ordering of elements in each group, use
+ * @p stable_partition() if this is needed.
+ */
+ template<typename _ForwardIterator, typename _Predicate>
+ inline _ForwardIterator
+ partition(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return std::__partition(__first, __last, __pred,
+ std::__iterator_category(__first));
+ }
+
+
+
+ /**
+ * @brief Sort the smallest elements of a sequence.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the smallest @p (middle-first) elements in the range
+ * @p [first,last) and moves them to the range @p [first,middle). The
+ * order of the remaining elements in the range @p [middle,last) is
+ * undefined.
+ * After the sort if @p i and @j are iterators in the range
+ * @p [first,middle) such that @i precedes @j and @k is an iterator in
+ * the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ std::__heap_select(__first, __middle, __last);
+ std::sort_heap(__first, __middle);
+ }
+
+ /**
+ * @brief Sort the smallest elements of a sequence using a predicate
+ * for comparison.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param middle Another iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the smallest @p (middle-first) elements in the range
+ * @p [first,last) and moves them to the range @p [first,middle). The
+ * order of the remaining elements in the range @p [middle,last) is
+ * undefined.
+ * After the sort if @p i and @j are iterators in the range
+ * @p [first,middle) such that @i precedes @j and @k is an iterator in
+ * the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
+ * are both false.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ partial_sort(_RandomAccessIterator __first,
+ _RandomAccessIterator __middle,
+ _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __middle);
+ __glibcxx_requires_valid_range(__middle, __last);
+
+ std::__heap_select(__first, __middle, __last, __CheckedCompare(__comp));
+ std::sort_heap(__first, __middle, __CheckedCompare(__comp));
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted.
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p *j<*i is false.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ if (__first == __last || __nth == __last)
+ return;
+
+ std::__introselect(__first, __nth, __last,
+ std::__lg(__last - __first) * 2);
+ }
+
+ /**
+ * @brief Sort a sequence just enough to find a particular position
+ * using a predicate for comparison.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param nth Another iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Rearranges the elements in the range @p [first,last) so that @p *nth
+ * is the same element that would have been in that position had the
+ * whole sequence been sorted. The elements either side of @p *nth are
+ * not completely sorted, but for any iterator @i in the range
+ * @p [first,nth) and any iterator @j in the range @p [nth,last) it
+ * holds that @p comp(*j,*i) is false.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType, _ValueType>)
+ __glibcxx_requires_valid_range(__first, __nth);
+ __glibcxx_requires_valid_range(__nth, __last);
+
+ if (__first == __last || __nth == __last)
+ return;
+
+ std::__introselect(__first, __nth, __last,
+ std::__lg(__last - __first) * 2,
+ __CheckedCompare(__comp));
+ }
+
+
+ /**
+ * @brief Sort the elements of a sequence.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last,
+ std::__lg(__last - __first) * 2);
+ std::__final_insertion_sort(__first, __last);
+ }
+ }
+
+ /**
+ * @brief Sort the elements of a sequence using a predicate for comparison.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for every iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is not preserved, use
+ * @p stable_sort() if this is needed.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare, _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first != __last)
+ {
+ std::__introsort_loop(__first, __last,
+ std::__lg(__last - __first) * 2,
+ __CheckedCompare(__comp));
+ std::__final_insertion_sort(__first, __last,
+ __CheckedCompare(__comp));
+ }
+ }
+
+ /**
+ * @brief Merges two sorted ranges.
+ * @ingroup sorting_algorithms
+ * @param first1 An iterator.
+ * @param first2 Another iterator.
+ * @param last1 Another iterator.
+ * @param last2 Another iterator.
+ * @param result An iterator pointing to the end of the merged range.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val.
+ *
+ * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+ * [result, result + (last1-first1) + (last2-first2)). Both input ranges
+ * must be sorted, and the output range must not overlap with either of
+ * the input ranges. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+ /**
+ * @brief Merges two sorted ranges.
+ * @ingroup sorting_algorithms
+ * @param first1 An iterator.
+ * @param first2 Another iterator.
+ * @param last1 Another iterator.
+ * @param last2 Another iterator.
+ * @param result An iterator pointing to the end of the merged range.
+ * @param comp A functor to use for comparisons.
+ * @return An iterator pointing to the first element "not less
+ * than" @a val.
+ *
+ * Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+ * [result, result + (last1-first1) + (last2-first2)). Both input ranges
+ * must be sorted, and the output range must not overlap with either of
+ * the input ranges. The sort is @e stable, that is, for equivalent
+ * elements in the two ranges, elements from the first range will always
+ * come before elements from the second.
+ *
+ * The comparison function should have the same effects on ordering as
+ * the function used for the initial sort.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__CheckedCompare(__comp)(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+
+ /**
+ * @brief Sort the elements of a sequence, preserving the relative order
+ * of equivalent elements.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p *(i+1)<*i is false for each iterator @p i in the range
+ * @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p x<y is false and @p y<x is false will have the same relative
+ * ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last);
+ else
+ std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+ _DistanceType(__buf.size()));
+ }
+
+ /**
+ * @brief Sort the elements of a sequence using a predicate for comparison,
+ * preserving the relative order of equivalent elements.
+ * @ingroup sorting_algorithms
+ * @param first An iterator.
+ * @param last Another iterator.
+ * @param comp A comparison functor.
+ * @return Nothing.
+ *
+ * Sorts the elements in the range @p [first,last) in ascending order,
+ * such that @p comp(*(i+1),*i) is false for each iterator @p i in the
+ * range @p [first,last-1).
+ *
+ * The relative ordering of equivalent elements is preserved, so any two
+ * elements @p x and @p y in the range @p [first,last) such that
+ * @p comp(x,y) is false and @p comp(y,x) is false will have the same
+ * relative ordering after calling @p stable_sort().
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first,
+ __last);
+ if (__buf.begin() == 0)
+ std::__inplace_stable_sort(__first, __last, __CheckedCompare(__comp));
+ else
+ std::__stable_sort_adaptive(__first, __last, __buf.begin(),
+ _DistanceType(__buf.size()),
+ __CheckedCompare(__comp));
+ }
+
+
+ /**
+ * @brief Return the union of two sorted ranges.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * each range in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other,
+ * that element is copied and the iterator advanced. If an element is
+ * contained in both ranges, the element from the first range is copied and
+ * both ranges advance. The output range may not overlap either input
+ * range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ else if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+ /**
+ * @brief Return the union of two sorted ranges using a comparison functor.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * each range in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other
+ * according to @a comp, that element is copied and the iterator advanced.
+ * If an equivalent element according to @a comp is contained in both
+ * ranges, the element from the first range is copied and both ranges
+ * advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_union(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__CheckedCompare(__comp)(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ }
+ else if (__CheckedCompare(__comp)(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ }
+ ++__result;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1, __last1,
+ __result));
+ }
+
+ /**
+ * @brief Return the intersection of two sorted ranges.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * both ranges in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other,
+ * that iterator advances. If an element is contained in both ranges, the
+ * element from the first range is copied and both ranges advance. The
+ * output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first1 < *__first2)
+ ++__first1;
+ else if (*__first2 < *__first1)
+ ++__first2;
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * @brief Return the intersection of two sorted ranges using comparison
+ * functor.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * both ranges in order to the output range. Iterators increment for each
+ * range. When the current element of one range is less than the other
+ * according to @a comp, that iterator advances. If an element is
+ * contained in both ranges according to @a comp, the element from the
+ * first range is copied and both ranges advance. The output range may not
+ * overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__CheckedCompare(__comp)(*__first1, *__first2))
+ ++__first1;
+ else if (__CheckedCompare(__comp)(*__first2, *__first1))
+ ++__first2;
+ else
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ ++__result;
+ }
+ return __result;
+ }
+
+ /**
+ * @brief Return the difference of two sorted ranges.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * the first range but not the second in order to the output range.
+ * Iterators increment for each range. When the current element of the
+ * first range is less than the second, that element is copied and the
+ * iterator advances. If the current element of the second range is less,
+ * the iterator advances, but no element is copied. If an element is
+ * contained in both ranges, no elements are copied and both ranges
+ * advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (*__first2 < *__first1)
+ ++__first2;
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first1, __last1, __result);
+ }
+
+ /**
+ * @brief Return the difference of two sorted ranges using comparison
+ * functor.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * the first range but not the second in order to the output range.
+ * Iterators increment for each range. When the current element of the
+ * first range is less than the second according to @a comp, that element
+ * is copied and the iterator advances. If the current element of the
+ * second range is less, no element is copied and the iterator advances.
+ * If an element is contained in both ranges according to @a comp, no
+ * elements are copied and both ranges advance. The output range may not
+ * overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__CheckedCompare(__comp)(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (__CheckedCompare(__comp)(*__first2, *__first1))
+ ++__first2;
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first1, __last1, __result);
+ }
+
+ /**
+ * @brief Return the symmetric difference of two sorted ranges.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * one range but not the other in order to the output range. Iterators
+ * increment for each range. When the current element of one range is less
+ * than the other, that element is copied and the iterator advances. If an
+ * element is contained in both ranges, no elements are copied and both
+ * ranges advance. The output range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set(__first1, __last1, __first2);
+ __glibcxx_requires_sorted_set(__first2, __last2, __first1);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (*__first1 < *__first2)
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (*__first2 < *__first1)
+ {
+ *__result = *__first2;
+ ++__first2;
+ ++__result;
+ }
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first2, __last2, std::copy(__first1,
+ __last1, __result));
+ }
+
+ /**
+ * @brief Return the symmetric difference of two sorted ranges using
+ * comparison functor.
+ * @ingroup set_algorithms
+ * @param first1 Start of first range.
+ * @param last1 End of first range.
+ * @param first2 Start of second range.
+ * @param last2 End of second range.
+ * @param comp The comparison functor.
+ * @return End of the output range.
+ * @ingroup set_algorithms
+ *
+ * This operation iterates over both ranges, copying elements present in
+ * one range but not the other in order to the output range. Iterators
+ * increment for each range. When the current element of one range is less
+ * than the other according to @a comp, that element is copied and the
+ * iterator advances. If an element is contained in both ranges according
+ * to @a comp, no elements are copied and both ranges advance. The output
+ * range may not overlap either input range.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType1>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ _ValueType2, _ValueType1>)
+ __glibcxx_requires_sorted_set_pred(__first1, __last1, __first2, __comp);
+ __glibcxx_requires_sorted_set_pred(__first2, __last2, __first1, __comp);
+
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__CheckedCompare(__comp)(*__first1, *__first2))
+ {
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (__CheckedCompare(__comp)(*__first2, *__first1))
+ {
+ *__result = *__first2;
+ ++__first2;
+ ++__result;
+ }
+ else
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return std::copy(__first2, __last2,
+ std::copy(__first1, __last1, __result));
+ }
+
+
+ /**
+ * @brief Return the minimum element in a range.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @return Iterator referencing the first instance of the smallest value.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ min_element(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ while (++__first != __last)
+ if (*__first < *__result)
+ __result = __first;
+ return __result;
+ }
+
+ /**
+ * @brief Return the minimum element in a range using comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return Iterator referencing the first instance of the smallest value
+ * according to comp.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ min_element(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ while (++__first != __last)
+ if (__CheckedCompare(__comp)(*__first, *__result))
+ __result = __first;
+ return __result;
+ }
+
+ /**
+ * @brief Return the maximum element in a range.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @return Iterator referencing the first instance of the largest value.
+ */
+ template<typename _ForwardIterator>
+ _ForwardIterator
+ max_element(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __first;
+ _ForwardIterator __result = __first;
+ while (++__first != __last)
+ if (*__result < *__first)
+ __result = __first;
+ return __result;
+ }
+
+ /**
+ * @brief Return the maximum element in a range using comparison functor.
+ * @ingroup sorting_algorithms
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor.
+ * @return Iterator referencing the first instance of the largest value
+ * according to comp.
+ */
+ template<typename _ForwardIterator, typename _Compare>
+ _ForwardIterator
+ max_element(_ForwardIterator __first, _ForwardIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_Compare,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last) return __first;
+ _ForwardIterator __result = __first;
+ while (++__first != __last)
+ if (__CheckedCompare(__comp)(*__result, *__first))
+ __result = __first;
+ return __result;
+ }
+
+#undef __CheckedCompare
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_ALGO_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algobase.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algobase.h
new file mode 100644
index 0000000..2cef923
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_algobase.h
@@ -0,0 +1,1153 @@
+// Core algorithmic facilities -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file stl_algobase.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_ALGOBASE_H
+#define _STL_ALGOBASE_H 1
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/functexcept.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/stl_pair.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+#include <bits/move.h> // For std::swap and _GLIBCXX_MOVE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a
+ // nutshell, we are partially implementing the resolution of DR 187,
+ // when it's safe, i.e., the value_types are equal.
+ template<bool _BoolType>
+ struct __iter_swap
+ {
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ static void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ typedef typename iterator_traits<_ForwardIterator1>::value_type
+ _ValueType1;
+ _ValueType1 __tmp = _GLIBCXX_MOVE(*__a);
+ *__a = _GLIBCXX_MOVE(*__b);
+ *__b = _GLIBCXX_MOVE(__tmp);
+ }
+ };
+
+ template<>
+ struct __iter_swap<true>
+ {
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ static void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ swap(*__a, *__b);
+ }
+ };
+
+ /**
+ * @brief Swaps the contents of two iterators.
+ * @ingroup mutating_algorithms
+ * @param a An iterator.
+ * @param b Another iterator.
+ * @return Nothing.
+ *
+ * This function swaps the values pointed to by two iterators, not the
+ * iterators themselves.
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ inline void
+ iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
+ {
+ typedef typename iterator_traits<_ForwardIterator1>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_ForwardIterator2>::value_type
+ _ValueType2;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator1>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator2>)
+ __glibcxx_function_requires(_ConvertibleConcept<_ValueType1,
+ _ValueType2>)
+ __glibcxx_function_requires(_ConvertibleConcept<_ValueType2,
+ _ValueType1>)
+
+ typedef typename iterator_traits<_ForwardIterator1>::reference
+ _ReferenceType1;
+ typedef typename iterator_traits<_ForwardIterator2>::reference
+ _ReferenceType2;
+ std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value
+ && __are_same<_ValueType1&, _ReferenceType1>::__value
+ && __are_same<_ValueType2&, _ReferenceType2>::__value>::
+ iter_swap(__a, __b);
+ }
+
+ /**
+ * @brief Swap the elements of two sequences.
+ * @ingroup mutating_algorithms
+ * @param first1 A forward iterator.
+ * @param last1 A forward iterator.
+ * @param first2 A forward iterator.
+ * @return An iterator equal to @p first2+(last1-first1).
+ *
+ * Swaps each element in the range @p [first1,last1) with the
+ * corresponding element in the range @p [first2,(last1-first1)).
+ * The ranges must not overlap.
+ */
+ template<typename _ForwardIterator1, typename _ForwardIterator2>
+ _ForwardIterator2
+ swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
+ _ForwardIterator2 __first2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator1>)
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2)
+ std::iter_swap(__first1, __first2);
+ return __first2;
+ }
+
+ /**
+ * @brief This does what you think it does.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return The lesser of the parameters.
+ *
+ * This is the simple classic generic implementation. It will work on
+ * temporary expressions, since they are only evaluated once, unlike a
+ * preprocessor macro.
+ */
+ template<typename _Tp>
+ inline const _Tp&
+ min(const _Tp& __a, const _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ //return __b < __a ? __b : __a;
+ if (__b < __a)
+ return __b;
+ return __a;
+ }
+
+ /**
+ * @brief This does what you think it does.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @return The greater of the parameters.
+ *
+ * This is the simple classic generic implementation. It will work on
+ * temporary expressions, since they are only evaluated once, unlike a
+ * preprocessor macro.
+ */
+ template<typename _Tp>
+ inline const _Tp&
+ max(const _Tp& __a, const _Tp& __b)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_LessThanComparableConcept<_Tp>)
+ //return __a < __b ? __b : __a;
+ if (__a < __b)
+ return __b;
+ return __a;
+ }
+
+ /**
+ * @brief This does what you think it does.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @param comp A @link comparison_functors comparison functor@endlink.
+ * @return The lesser of the parameters.
+ *
+ * This will work on temporary expressions, since they are only evaluated
+ * once, unlike a preprocessor macro.
+ */
+ template<typename _Tp, typename _Compare>
+ inline const _Tp&
+ min(const _Tp& __a, const _Tp& __b, _Compare __comp)
+ {
+ //return __comp(__b, __a) ? __b : __a;
+ if (__comp(__b, __a))
+ return __b;
+ return __a;
+ }
+
+ /**
+ * @brief This does what you think it does.
+ * @ingroup sorting_algorithms
+ * @param a A thing of arbitrary type.
+ * @param b Another thing of arbitrary type.
+ * @param comp A @link comparison_functors comparison functor@endlink.
+ * @return The greater of the parameters.
+ *
+ * This will work on temporary expressions, since they are only evaluated
+ * once, unlike a preprocessor macro.
+ */
+ template<typename _Tp, typename _Compare>
+ inline const _Tp&
+ max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+ {
+ //return __comp(__a, __b) ? __b : __a;
+ if (__comp(__a, __b))
+ return __b;
+ return __a;
+ }
+
+
+ // If _Iterator is a __normal_iterator return its base (a plain pointer,
+ // normally) otherwise return it untouched. See copy, fill, ...
+ template<typename _Iterator,
+ bool _IsNormal = __is_normal_iterator<_Iterator>::__value>
+ struct __niter_base
+ {
+ static _Iterator
+ __b(_Iterator __it)
+ { return __it; }
+ };
+
+ template<typename _Iterator>
+ struct __niter_base<_Iterator, true>
+ {
+ static typename _Iterator::iterator_type
+ __b(_Iterator __it)
+ { return __it.base(); }
+ };
+
+ // Likewise, for move_iterator.
+ template<typename _Iterator,
+ bool _IsMove = __is_move_iterator<_Iterator>::__value>
+ struct __miter_base
+ {
+ static _Iterator
+ __b(_Iterator __it)
+ { return __it; }
+ };
+
+ template<typename _Iterator>
+ struct __miter_base<_Iterator, true>
+ {
+ static typename _Iterator::iterator_type
+ __b(_Iterator __it)
+ { return __it.base(); }
+ };
+
+ // All of these auxiliary structs serve two purposes. (1) Replace
+ // calls to copy with memmove whenever possible. (Memmove, not memcpy,
+ // because the input and output ranges are permitted to overlap.)
+ // (2) If we're using random access iterators, then write the loop as
+ // a for loop with an explicit count.
+
+ template<bool, bool, typename>
+ struct __copy_move
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ for (; __first != __last; ++__result, ++__first)
+ *__result = *__first;
+ return __result;
+ }
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Category>
+ struct __copy_move<true, false, _Category>
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ for (; __first != __last; ++__result, ++__first)
+ *__result = std::move(*__first);
+ return __result;
+ }
+ };
+#endif
+
+ template<>
+ struct __copy_move<false, false, random_access_iterator_tag>
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ typedef typename iterator_traits<_II>::difference_type _Distance;
+ for(_Distance __n = __last - __first; __n > 0; --__n)
+ {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
+ return __result;
+ }
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<>
+ struct __copy_move<true, false, random_access_iterator_tag>
+ {
+ template<typename _II, typename _OI>
+ static _OI
+ __copy_m(_II __first, _II __last, _OI __result)
+ {
+ typedef typename iterator_traits<_II>::difference_type _Distance;
+ for(_Distance __n = __last - __first; __n > 0; --__n)
+ {
+ *__result = std::move(*__first);
+ ++__first;
+ ++__result;
+ }
+ return __result;
+ }
+ };
+#endif
+
+ template<bool _IsMove>
+ struct __copy_move<_IsMove, true, random_access_iterator_tag>
+ {
+ template<typename _Tp>
+ static _Tp*
+ __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
+ {
+ __builtin_memmove(__result, __first,
+ sizeof(_Tp) * (__last - __first));
+ return __result + (__last - __first);
+ }
+ };
+
+ template<bool _IsMove, typename _II, typename _OI>
+ inline _OI
+ __copy_move_a(_II __first, _II __last, _OI __result)
+ {
+ typedef typename iterator_traits<_II>::value_type _ValueTypeI;
+ typedef typename iterator_traits<_OI>::value_type _ValueTypeO;
+ typedef typename iterator_traits<_II>::iterator_category _Category;
+ const bool __simple = (__is_pod(_ValueTypeI)
+ && __is_pointer<_II>::__value
+ && __is_pointer<_OI>::__value
+ && __are_same<_ValueTypeI, _ValueTypeO>::__value);
+
+ return std::__copy_move<_IsMove, __simple,
+ _Category>::__copy_m(__first, __last, __result);
+ }
+
+ // Helpers for streambuf iterators (either istream or ostream).
+ // NB: avoid including <iosfwd>, relatively large.
+ template<typename _CharT>
+ struct char_traits;
+
+ template<typename _CharT, typename _Traits>
+ class istreambuf_iterator;
+
+ template<typename _CharT, typename _Traits>
+ class ostreambuf_iterator;
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+ __copy_move_a2(_CharT*, _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type
+ __copy_move_a2(const _CharT*, const _CharT*,
+ ostreambuf_iterator<_CharT, char_traits<_CharT> >);
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ _CharT*>::__type
+ __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >,
+ istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*);
+
+ template<bool _IsMove, typename _II, typename _OI>
+ inline _OI
+ __copy_move_a2(_II __first, _II __last, _OI __result)
+ {
+ return _OI(std::__copy_move_a<_IsMove>
+ (std::__niter_base<_II>::__b(__first),
+ std::__niter_base<_II>::__b(__last),
+ std::__niter_base<_OI>::__b(__result)));
+ }
+
+ /**
+ * @brief Copies the range [first,last) into result.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return result + (first - last)
+ *
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling). Result may not be contained within
+ * [first,last); the copy_backward function should be used instead.
+ *
+ * Note that the end of the output range is permitted to be contained
+ * within [first,last).
+ */
+ template<typename _II, typename _OI>
+ inline _OI
+ copy(_II __first, _II __last, _OI __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_II>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OI,
+ typename iterator_traits<_II>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
+ (std::__miter_base<_II>::__b(__first),
+ std::__miter_base<_II>::__b(__last), __result));
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Moves the range [first,last) into result.
+ * @ingroup mutating_algorithms
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return result + (first - last)
+ *
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling). Result may not be contained within
+ * [first,last); the move_backward function should be used instead.
+ *
+ * Note that the end of the output range is permitted to be contained
+ * within [first,last).
+ */
+ template<typename _II, typename _OI>
+ inline _OI
+ move(_II __first, _II __last, _OI __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_II>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OI,
+ typename iterator_traits<_II>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return (std::__copy_move_a2<true>
+ (std::__miter_base<_II>::__b(__first),
+ std::__miter_base<_II>::__b(__last), __result));
+ }
+
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::move(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE3(_Tp, _Up, _Vp) std::copy(_Tp, _Up, _Vp)
+#endif
+
+ template<bool, bool, typename>
+ struct __copy_move_backward
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ while (__first != __last)
+ *--__result = *--__last;
+ return __result;
+ }
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Category>
+ struct __copy_move_backward<true, false, _Category>
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ while (__first != __last)
+ *--__result = std::move(*--__last);
+ return __result;
+ }
+ };
+#endif
+
+ template<>
+ struct __copy_move_backward<false, false, random_access_iterator_tag>
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ typename iterator_traits<_BI1>::difference_type __n;
+ for (__n = __last - __first; __n > 0; --__n)
+ *--__result = *--__last;
+ return __result;
+ }
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<>
+ struct __copy_move_backward<true, false, random_access_iterator_tag>
+ {
+ template<typename _BI1, typename _BI2>
+ static _BI2
+ __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ typename iterator_traits<_BI1>::difference_type __n;
+ for (__n = __last - __first; __n > 0; --__n)
+ *--__result = std::move(*--__last);
+ return __result;
+ }
+ };
+#endif
+
+ template<bool _IsMove>
+ struct __copy_move_backward<_IsMove, true, random_access_iterator_tag>
+ {
+ template<typename _Tp>
+ static _Tp*
+ __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result)
+ {
+ const ptrdiff_t _Num = __last - __first;
+ __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
+ return __result - _Num;
+ }
+ };
+
+ template<bool _IsMove, typename _BI1, typename _BI2>
+ inline _BI2
+ __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ typedef typename iterator_traits<_BI1>::value_type _ValueType1;
+ typedef typename iterator_traits<_BI2>::value_type _ValueType2;
+ typedef typename iterator_traits<_BI1>::iterator_category _Category;
+ const bool __simple = (__is_pod(_ValueType1)
+ && __is_pointer<_BI1>::__value
+ && __is_pointer<_BI2>::__value
+ && __are_same<_ValueType1, _ValueType2>::__value);
+
+ return std::__copy_move_backward<_IsMove, __simple,
+ _Category>::__copy_move_b(__first,
+ __last,
+ __result);
+ }
+
+ template<bool _IsMove, typename _BI1, typename _BI2>
+ inline _BI2
+ __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ return _BI2(std::__copy_move_backward_a<_IsMove>
+ (std::__niter_base<_BI1>::__b(__first),
+ std::__niter_base<_BI1>::__b(__last),
+ std::__niter_base<_BI2>::__b(__result)));
+ }
+
+ /**
+ * @brief Copies the range [first,last) into result.
+ * @ingroup mutating_algorithms
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @param result A bidirectional iterator.
+ * @return result - (first - last)
+ *
+ * The function has the same effect as copy, but starts at the end of the
+ * range and works its way to the start, returning the start of the result.
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling).
+ *
+ * Result may not be in the range [first,last). Use copy instead. Note
+ * that the start of the output range may overlap [first,last).
+ */
+ template<typename _BI1, typename _BI2>
+ inline _BI2
+ copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+ __glibcxx_function_requires(_ConvertibleConcept<
+ typename iterator_traits<_BI1>::value_type,
+ typename iterator_traits<_BI2>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value>
+ (std::__miter_base<_BI1>::__b(__first),
+ std::__miter_base<_BI1>::__b(__last), __result));
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Moves the range [first,last) into result.
+ * @ingroup mutating_algorithms
+ * @param first A bidirectional iterator.
+ * @param last A bidirectional iterator.
+ * @param result A bidirectional iterator.
+ * @return result - (first - last)
+ *
+ * The function has the same effect as move, but starts at the end of the
+ * range and works its way to the start, returning the start of the result.
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling).
+ *
+ * Result may not be in the range [first,last). Use move instead. Note
+ * that the start of the output range may overlap [first,last).
+ */
+ template<typename _BI1, typename _BI2>
+ inline _BI2
+ move_backward(_BI1 __first, _BI1 __last, _BI2 __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<_BI1>)
+ __glibcxx_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+ __glibcxx_function_requires(_ConvertibleConcept<
+ typename iterator_traits<_BI1>::value_type,
+ typename iterator_traits<_BI2>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return (std::__copy_move_backward_a2<true>
+ (std::__miter_base<_BI1>::__b(__first),
+ std::__miter_base<_BI1>::__b(__last), __result));
+ }
+
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::move_backward(_Tp, _Up, _Vp)
+#else
+#define _GLIBCXX_MOVE_BACKWARD3(_Tp, _Up, _Vp) std::copy_backward(_Tp, _Up, _Vp)
+#endif
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type
+ __fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value)
+ {
+ for (; __first != __last; ++__first)
+ *__first = __value;
+ }
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type
+ __fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __value)
+ {
+ const _Tp __tmp = __value;
+ for (; __first != __last; ++__first)
+ *__first = __tmp;
+ }
+
+ // Specialization: for char types we can use memset.
+ template<typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type
+ __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c)
+ {
+ const _Tp __tmp = __c;
+ __builtin_memset(__first, static_cast<unsigned char>(__tmp),
+ __last - __first);
+ }
+
+ /**
+ * @brief Fills the range [first,last) with copies of value.
+ * @ingroup mutating_algorithms
+ * @param first A forward iterator.
+ * @param last A forward iterator.
+ * @param value A reference-to-const of arbitrary type.
+ * @return Nothing.
+ *
+ * This function fills a range with copies of the same value. For char
+ * types filling contiguous areas of memory, this becomes an inline call
+ * to @c memset or @c wmemset.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first),
+ std::__niter_base<_ForwardIterator>::__b(__last), __value);
+ }
+
+ template<typename _OutputIterator, typename _Size, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type
+ __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
+ {
+ for (; __n > 0; --__n, ++__first)
+ *__first = __value;
+ return __first;
+ }
+
+ template<typename _OutputIterator, typename _Size, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type
+ __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value)
+ {
+ const _Tp __tmp = __value;
+ for (; __n > 0; --__n, ++__first)
+ *__first = __tmp;
+ return __first;
+ }
+
+ template<typename _Size, typename _Tp>
+ inline typename
+ __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type
+ __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c)
+ {
+ std::__fill_a(__first, __first + __n, __c);
+ return __first + __n;
+ }
+
+ /**
+ * @brief Fills the range [first,first+n) with copies of value.
+ * @ingroup mutating_algorithms
+ * @param first An output iterator.
+ * @param n The count of copies to perform.
+ * @param value A reference-to-const of arbitrary type.
+ * @return The iterator at first+n.
+ *
+ * This function fills a range with copies of the same value. For char
+ * types filling contiguous areas of memory, this becomes an inline call
+ * to @c memset or @ wmemset.
+ */
+ template<typename _OI, typename _Size, typename _Tp>
+ inline _OI
+ fill_n(_OI __first, _Size __n, const _Tp& __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_OutputIteratorConcept<_OI, _Tp>)
+
+ return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first),
+ __n, __value));
+ }
+
+ template<bool _BoolType>
+ struct __equal
+ {
+ template<typename _II1, typename _II2>
+ static bool
+ equal(_II1 __first1, _II1 __last1, _II2 __first2)
+ {
+ for (; __first1 != __last1; ++__first1, ++__first2)
+ if (!(*__first1 == *__first2))
+ return false;
+ return true;
+ }
+ };
+
+ template<>
+ struct __equal<true>
+ {
+ template<typename _Tp>
+ static bool
+ equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2)
+ {
+ return !__builtin_memcmp(__first1, __first2, sizeof(_Tp)
+ * (__last1 - __first1));
+ }
+ };
+
+ template<typename _II1, typename _II2>
+ inline bool
+ __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)
+ {
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ const bool __simple = (__is_integer<_ValueType1>::__value
+ && __is_pointer<_II1>::__value
+ && __is_pointer<_II2>::__value
+ && __are_same<_ValueType1, _ValueType2>::__value);
+
+ return std::__equal<__simple>::equal(__first1, __last1, __first2);
+ }
+
+
+ template<typename, typename>
+ struct __lc_rai
+ {
+ template<typename _II1, typename _II2>
+ static _II1
+ __newlast1(_II1, _II1 __last1, _II2, _II2)
+ { return __last1; }
+
+ template<typename _II>
+ static bool
+ __cnd2(_II __first, _II __last)
+ { return __first != __last; }
+ };
+
+ template<>
+ struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag>
+ {
+ template<typename _RAI1, typename _RAI2>
+ static _RAI1
+ __newlast1(_RAI1 __first1, _RAI1 __last1,
+ _RAI2 __first2, _RAI2 __last2)
+ {
+ const typename iterator_traits<_RAI1>::difference_type
+ __diff1 = __last1 - __first1;
+ const typename iterator_traits<_RAI2>::difference_type
+ __diff2 = __last2 - __first2;
+ return __diff2 < __diff1 ? __first1 + __diff2 : __last1;
+ }
+
+ template<typename _RAI>
+ static bool
+ __cnd2(_RAI, _RAI)
+ { return true; }
+ };
+
+ template<bool _BoolType>
+ struct __lexicographical_compare
+ {
+ template<typename _II1, typename _II2>
+ static bool __lc(_II1, _II1, _II2, _II2);
+ };
+
+ template<bool _BoolType>
+ template<typename _II1, typename _II2>
+ bool
+ __lexicographical_compare<_BoolType>::
+ __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
+ {
+ typedef typename iterator_traits<_II1>::iterator_category _Category1;
+ typedef typename iterator_traits<_II2>::iterator_category _Category2;
+ typedef std::__lc_rai<_Category1, _Category2> __rai_type;
+
+ __last1 = __rai_type::__newlast1(__first1, __last1,
+ __first2, __last2);
+ for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
+ ++__first1, ++__first2)
+ {
+ if (*__first1 < *__first2)
+ return true;
+ if (*__first2 < *__first1)
+ return false;
+ }
+ return __first1 == __last1 && __first2 != __last2;
+ }
+
+ template<>
+ struct __lexicographical_compare<true>
+ {
+ template<typename _Tp, typename _Up>
+ static bool
+ __lc(const _Tp* __first1, const _Tp* __last1,
+ const _Up* __first2, const _Up* __last2)
+ {
+ const size_t __len1 = __last1 - __first1;
+ const size_t __len2 = __last2 - __first2;
+ const int __result = __builtin_memcmp(__first1, __first2,
+ std::min(__len1, __len2));
+ return __result != 0 ? __result < 0 : __len1 < __len2;
+ }
+ };
+
+ template<typename _II1, typename _II2>
+ inline bool
+ __lexicographical_compare_aux(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2)
+ {
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ const bool __simple =
+ (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value
+ && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
+ && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed
+ && __is_pointer<_II1>::__value
+ && __is_pointer<_II2>::__value);
+
+ return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
+ __first2, __last2);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ /**
+ * @brief Tests a range for element-wise equality.
+ * @ingroup non_mutating_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @return A boolean true or false.
+ *
+ * This compares the elements of two ranges using @c == and returns true or
+ * false depending on whether all of the corresponding elements of the
+ * ranges are equal.
+ */
+ template<typename _II1, typename _II2>
+ inline bool
+ equal(_II1 __first1, _II1 __last1, _II2 __first2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_II1>::value_type,
+ typename iterator_traits<_II2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ return std::__equal_aux(std::__niter_base<_II1>::__b(__first1),
+ std::__niter_base<_II1>::__b(__last1),
+ std::__niter_base<_II2>::__b(__first2));
+ }
+
+ /**
+ * @brief Tests a range for element-wise equality.
+ * @ingroup non_mutating_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param binary_pred A binary predicate @link functors
+ * functor@endlink.
+ * @return A boolean true or false.
+ *
+ * This compares the elements of two ranges using the binary_pred
+ * parameter, and returns true or
+ * false depending on whether all of the corresponding elements of the
+ * ranges are equal.
+ */
+ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
+ inline bool
+ equal(_IIter1 __first1, _IIter1 __last1,
+ _IIter2 __first2, _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2)
+ if (!bool(__binary_pred(*__first1, *__first2)))
+ return false;
+ return true;
+ }
+
+ /**
+ * @brief Performs "dictionary" comparison on ranges.
+ * @ingroup sorting_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param last2 An input iterator.
+ * @return A boolean true or false.
+ *
+ * "Returns true if the sequence of elements defined by the range
+ * [first1,last1) is lexicographically less than the sequence of elements
+ * defined by the range [first2,last2). Returns false otherwise."
+ * (Quoted from [25.3.8]/1.) If the iterators are all character pointers,
+ * then this is an inline call to @c memcmp.
+ */
+ template<typename _II1, typename _II2>
+ inline bool
+ lexicographical_compare(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2)
+ {
+ // concept requirements
+ typedef typename iterator_traits<_II1>::value_type _ValueType1;
+ typedef typename iterator_traits<_II2>::value_type _ValueType2;
+ __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType1, _ValueType2>)
+ __glibcxx_function_requires(_LessThanOpConcept<_ValueType2, _ValueType1>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ return std::__lexicographical_compare_aux
+ (std::__niter_base<_II1>::__b(__first1),
+ std::__niter_base<_II1>::__b(__last1),
+ std::__niter_base<_II2>::__b(__first2),
+ std::__niter_base<_II2>::__b(__last2));
+ }
+
+ /**
+ * @brief Performs "dictionary" comparison on ranges.
+ * @ingroup sorting_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param last2 An input iterator.
+ * @param comp A @link comparison_functors comparison functor@endlink.
+ * @return A boolean true or false.
+ *
+ * The same as the four-parameter @c lexicographical_compare, but uses the
+ * comp parameter instead of @c <.
+ */
+ template<typename _II1, typename _II2, typename _Compare>
+ bool
+ lexicographical_compare(_II1 __first1, _II1 __last1,
+ _II2 __first2, _II2 __last2, _Compare __comp)
+ {
+ typedef typename iterator_traits<_II1>::iterator_category _Category1;
+ typedef typename iterator_traits<_II2>::iterator_category _Category2;
+ typedef std::__lc_rai<_Category1, _Category2> __rai_type;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_II1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_II2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2);
+ for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2);
+ ++__first1, ++__first2)
+ {
+ if (__comp(*__first1, *__first2))
+ return true;
+ if (__comp(*__first2, *__first1))
+ return false;
+ }
+ return __first1 == __last1 && __first2 != __last2;
+ }
+
+ /**
+ * @brief Finds the places in ranges which don't match.
+ * @ingroup non_mutating_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @return A pair of iterators pointing to the first mismatch.
+ *
+ * This compares the elements of two ranges using @c == and returns a pair
+ * of iterators. The first iterator points into the first range, the
+ * second iterator points into the second range, and the elements pointed
+ * to by the iterators are not equal.
+ */
+ template<typename _InputIterator1, typename _InputIterator2>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_EqualOpConcept<
+ typename iterator_traits<_InputIterator1>::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ while (__first1 != __last1 && *__first1 == *__first2)
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+ }
+
+ /**
+ * @brief Finds the places in ranges which don't match.
+ * @ingroup non_mutating_algorithms
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param binary_pred A binary predicate @link functors
+ * functor@endlink.
+ * @return A pair of iterators pointing to the first mismatch.
+ *
+ * This compares the elements of two ranges using the binary_pred
+ * parameter, and returns a pair
+ * of iterators. The first iterator points into the first range, the
+ * second iterator points into the second range, and the elements pointed
+ * to by the iterators are not equal.
+ */
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _BinaryPredicate>
+ pair<_InputIterator1, _InputIterator2>
+ mismatch(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _BinaryPredicate __binary_pred)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2)))
+ {
+ ++__first1;
+ ++__first2;
+ }
+ return pair<_InputIterator1, _InputIterator2>(__first1, __first2);
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+// NB: This file is included within many other C++ includes, as a way
+// of getting the base algorithms. So, make sure that parallel bits
+// come in too if requested.
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/algobase.h>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_bvector.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_bvector.h
new file mode 100644
index 0000000..0e60b7f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_bvector.h
@@ -0,0 +1,1024 @@
+// vector<bool> specialization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1999
+ * 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.
+ */
+
+/** @file stl_bvector.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_BVECTOR_H
+#define _STL_BVECTOR_H 1
+
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ typedef unsigned long _Bit_type;
+ enum { _S_word_bit = int(__CHAR_BIT__ * sizeof(_Bit_type)) };
+
+ struct _Bit_reference
+ {
+ _Bit_type * _M_p;
+ _Bit_type _M_mask;
+
+ _Bit_reference(_Bit_type * __x, _Bit_type __y)
+ : _M_p(__x), _M_mask(__y) { }
+
+ _Bit_reference() : _M_p(0), _M_mask(0) { }
+
+ operator bool() const
+ { return !!(*_M_p & _M_mask); }
+
+ _Bit_reference&
+ operator=(bool __x)
+ {
+ if (__x)
+ *_M_p |= _M_mask;
+ else
+ *_M_p &= ~_M_mask;
+ return *this;
+ }
+
+ _Bit_reference&
+ operator=(const _Bit_reference& __x)
+ { return *this = bool(__x); }
+
+ bool
+ operator==(const _Bit_reference& __x) const
+ { return bool(*this) == bool(__x); }
+
+ bool
+ operator<(const _Bit_reference& __x) const
+ { return !bool(*this) && bool(__x); }
+
+ void
+ flip()
+ { *_M_p ^= _M_mask; }
+ };
+
+ struct _Bit_iterator_base
+ : public std::iterator<std::random_access_iterator_tag, bool>
+ {
+ _Bit_type * _M_p;
+ unsigned int _M_offset;
+
+ _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
+ : _M_p(__x), _M_offset(__y) { }
+
+ void
+ _M_bump_up()
+ {
+ if (_M_offset++ == int(_S_word_bit) - 1)
+ {
+ _M_offset = 0;
+ ++_M_p;
+ }
+ }
+
+ void
+ _M_bump_down()
+ {
+ if (_M_offset-- == 0)
+ {
+ _M_offset = int(_S_word_bit) - 1;
+ --_M_p;
+ }
+ }
+
+ void
+ _M_incr(ptrdiff_t __i)
+ {
+ difference_type __n = __i + _M_offset;
+ _M_p += __n / int(_S_word_bit);
+ __n = __n % int(_S_word_bit);
+ if (__n < 0)
+ {
+ __n += int(_S_word_bit);
+ --_M_p;
+ }
+ _M_offset = static_cast<unsigned int>(__n);
+ }
+
+ bool
+ operator==(const _Bit_iterator_base& __i) const
+ { return _M_p == __i._M_p && _M_offset == __i._M_offset; }
+
+ bool
+ operator<(const _Bit_iterator_base& __i) const
+ {
+ return _M_p < __i._M_p
+ || (_M_p == __i._M_p && _M_offset < __i._M_offset);
+ }
+
+ bool
+ operator!=(const _Bit_iterator_base& __i) const
+ { return !(*this == __i); }
+
+ bool
+ operator>(const _Bit_iterator_base& __i) const
+ { return __i < *this; }
+
+ bool
+ operator<=(const _Bit_iterator_base& __i) const
+ { return !(__i < *this); }
+
+ bool
+ operator>=(const _Bit_iterator_base& __i) const
+ { return !(*this < __i); }
+ };
+
+ inline ptrdiff_t
+ operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
+ {
+ return (int(_S_word_bit) * (__x._M_p - __y._M_p)
+ + __x._M_offset - __y._M_offset);
+ }
+
+ struct _Bit_iterator : public _Bit_iterator_base
+ {
+ typedef _Bit_reference reference;
+ typedef _Bit_reference* pointer;
+ typedef _Bit_iterator iterator;
+
+ _Bit_iterator() : _Bit_iterator_base(0, 0) { }
+
+ _Bit_iterator(_Bit_type * __x, unsigned int __y)
+ : _Bit_iterator_base(__x, __y) { }
+
+ reference
+ operator*() const
+ { return reference(_M_p, 1UL << _M_offset); }
+
+ iterator&
+ operator++()
+ {
+ _M_bump_up();
+ return *this;
+ }
+
+ iterator
+ operator++(int)
+ {
+ iterator __tmp = *this;
+ _M_bump_up();
+ return __tmp;
+ }
+
+ iterator&
+ operator--()
+ {
+ _M_bump_down();
+ return *this;
+ }
+
+ iterator
+ operator--(int)
+ {
+ iterator __tmp = *this;
+ _M_bump_down();
+ return __tmp;
+ }
+
+ iterator&
+ operator+=(difference_type __i)
+ {
+ _M_incr(__i);
+ return *this;
+ }
+
+ iterator&
+ operator-=(difference_type __i)
+ {
+ *this += -__i;
+ return *this;
+ }
+
+ iterator
+ operator+(difference_type __i) const
+ {
+ iterator __tmp = *this;
+ return __tmp += __i;
+ }
+
+ iterator
+ operator-(difference_type __i) const
+ {
+ iterator __tmp = *this;
+ return __tmp -= __i;
+ }
+
+ reference
+ operator[](difference_type __i) const
+ { return *(*this + __i); }
+ };
+
+ inline _Bit_iterator
+ operator+(ptrdiff_t __n, const _Bit_iterator& __x)
+ { return __x + __n; }
+
+ struct _Bit_const_iterator : public _Bit_iterator_base
+ {
+ typedef bool reference;
+ typedef bool const_reference;
+ typedef const bool* pointer;
+ typedef _Bit_const_iterator const_iterator;
+
+ _Bit_const_iterator() : _Bit_iterator_base(0, 0) { }
+
+ _Bit_const_iterator(_Bit_type * __x, unsigned int __y)
+ : _Bit_iterator_base(__x, __y) { }
+
+ _Bit_const_iterator(const _Bit_iterator& __x)
+ : _Bit_iterator_base(__x._M_p, __x._M_offset) { }
+
+ const_reference
+ operator*() const
+ { return _Bit_reference(_M_p, 1UL << _M_offset); }
+
+ const_iterator&
+ operator++()
+ {
+ _M_bump_up();
+ return *this;
+ }
+
+ const_iterator
+ operator++(int)
+ {
+ const_iterator __tmp = *this;
+ _M_bump_up();
+ return __tmp;
+ }
+
+ const_iterator&
+ operator--()
+ {
+ _M_bump_down();
+ return *this;
+ }
+
+ const_iterator
+ operator--(int)
+ {
+ const_iterator __tmp = *this;
+ _M_bump_down();
+ return __tmp;
+ }
+
+ const_iterator&
+ operator+=(difference_type __i)
+ {
+ _M_incr(__i);
+ return *this;
+ }
+
+ const_iterator&
+ operator-=(difference_type __i)
+ {
+ *this += -__i;
+ return *this;
+ }
+
+ const_iterator
+ operator+(difference_type __i) const
+ {
+ const_iterator __tmp = *this;
+ return __tmp += __i;
+ }
+
+ const_iterator
+ operator-(difference_type __i) const
+ {
+ const_iterator __tmp = *this;
+ return __tmp -= __i;
+ }
+
+ const_reference
+ operator[](difference_type __i) const
+ { return *(*this + __i); }
+ };
+
+ inline _Bit_const_iterator
+ operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
+ { return __x + __n; }
+
+ inline void
+ __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x)
+ {
+ for (; __first != __last; ++__first)
+ *__first = __x;
+ }
+
+ inline void
+ fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x)
+ {
+ if (__first._M_p != __last._M_p)
+ {
+ std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0);
+ __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x);
+ __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x);
+ }
+ else
+ __fill_bvector(__first, __last, __x);
+ }
+
+ template<typename _Alloc>
+ struct _Bvector_base
+ {
+ typedef typename _Alloc::template rebind<_Bit_type>::other
+ _Bit_alloc_type;
+
+ struct _Bvector_impl
+ : public _Bit_alloc_type
+ {
+ _Bit_iterator _M_start;
+ _Bit_iterator _M_finish;
+ _Bit_type* _M_end_of_storage;
+
+ _Bvector_impl()
+ : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0)
+ { }
+
+ _Bvector_impl(const _Bit_alloc_type& __a)
+ : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0)
+ { }
+ };
+
+ public:
+ typedef _Alloc allocator_type;
+
+ _Bit_alloc_type&
+ _M_get_Bit_allocator()
+ { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); }
+
+ const _Bit_alloc_type&
+ _M_get_Bit_allocator() const
+ { return *static_cast<const _Bit_alloc_type*>(&this->_M_impl); }
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Bit_allocator()); }
+
+ _Bvector_base()
+ : _M_impl() { }
+
+ _Bvector_base(const allocator_type& __a)
+ : _M_impl(__a) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Bvector_base(_Bvector_base&& __x)
+ : _M_impl(__x._M_get_Bit_allocator())
+ {
+ this->_M_impl._M_start = __x._M_impl._M_start;
+ this->_M_impl._M_finish = __x._M_impl._M_finish;
+ this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
+ __x._M_impl._M_start = _Bit_iterator();
+ __x._M_impl._M_finish = _Bit_iterator();
+ __x._M_impl._M_end_of_storage = 0;
+ }
+#endif
+
+ ~_Bvector_base()
+ { this->_M_deallocate(); }
+
+ protected:
+ _Bvector_impl _M_impl;
+
+ _Bit_type*
+ _M_allocate(size_t __n)
+ { return _M_impl.allocate((__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit)); }
+
+ void
+ _M_deallocate()
+ {
+ if (_M_impl._M_start._M_p)
+ _M_impl.deallocate(_M_impl._M_start._M_p,
+ _M_impl._M_end_of_storage - _M_impl._M_start._M_p);
+ }
+ };
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+// Declare a partial specialization of vector<T, Alloc>.
+#include <bits/stl_vector.h>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief A specialization of vector for booleans which offers fixed time
+ * access to individual elements in any order.
+ *
+ * Note that vector<bool> does not actually meet the requirements for being
+ * a container. This is because the reference and pointer types are not
+ * really references and pointers to bool. See DR96 for details. @see
+ * vector for function documentation.
+ *
+ * @ingroup sequences
+ *
+ * In some terminology a %vector can be described as a dynamic
+ * C-style array, it offers fast and efficient access to individual
+ * elements in any order and saves the user from worrying about
+ * memory and size allocation. Subscripting ( @c [] ) access is
+ * also provided as with C-style arrays.
+ */
+template<typename _Alloc>
+ class vector<bool, _Alloc> : protected _Bvector_base<_Alloc>
+ {
+ typedef _Bvector_base<_Alloc> _Base;
+
+ public:
+ typedef bool value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Bit_reference reference;
+ typedef bool const_reference;
+ typedef _Bit_reference* pointer;
+ typedef const bool* const_pointer;
+ typedef _Bit_iterator iterator;
+ typedef _Bit_const_iterator const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef _Alloc allocator_type;
+
+ allocator_type get_allocator() const
+ { return _Base::get_allocator(); }
+
+ protected:
+ using _Base::_M_allocate;
+ using _Base::_M_deallocate;
+ using _Base::_M_get_Bit_allocator;
+
+ public:
+ vector()
+ : _Base() { }
+
+ explicit
+ vector(const allocator_type& __a)
+ : _Base(__a) { }
+
+ explicit
+ vector(size_type __n, const bool& __value = bool(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _M_initialize(__n);
+ std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage,
+ __value ? ~0 : 0);
+ }
+
+ vector(const vector& __x)
+ : _Base(__x._M_get_Bit_allocator())
+ {
+ _M_initialize(__x.size());
+ _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector(vector&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ vector(initializer_list<bool> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _M_initialize_range(__l.begin(), __l.end(),
+ random_access_iterator_tag());
+ }
+#endif
+
+ template<typename _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ ~vector() { }
+
+ vector&
+ operator=(const vector& __x)
+ {
+ if (&__x == this)
+ return *this;
+ if (__x.size() > capacity())
+ {
+ this->_M_deallocate();
+ _M_initialize(__x.size());
+ }
+ this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(),
+ begin());
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ vector&
+ operator=(initializer_list<bool> __l)
+ {
+ this->assign (__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+ void
+ assign(size_type __n, const bool& __x)
+ { _M_fill_assign(__n, __x); }
+
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ assign(initializer_list<bool> __l)
+ { this->assign(__l.begin(), __l.end()); }
+#endif
+
+ iterator
+ begin()
+ { return this->_M_impl._M_start; }
+
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_start; }
+
+ iterator
+ end()
+ { return this->_M_impl._M_finish; }
+
+ const_iterator
+ end() const
+ { return this->_M_impl._M_finish; }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return this->_M_impl._M_start; }
+
+ const_iterator
+ cend() const
+ { return this->_M_impl._M_finish; }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ size_type
+ size() const
+ { return size_type(end() - begin()); }
+
+ size_type
+ max_size() const
+ {
+ const size_type __isize =
+ __gnu_cxx::__numeric_traits<difference_type>::__max
+ - int(_S_word_bit) + 1;
+ const size_type __asize = _M_get_Bit_allocator().max_size();
+ return (__asize <= __isize / int(_S_word_bit)
+ ? __asize * int(_S_word_bit) : __isize);
+ }
+
+ size_type
+ capacity() const
+ { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0)
+ - begin()); }
+
+ bool
+ empty() const
+ { return begin() == end(); }
+
+ reference
+ operator[](size_type __n)
+ {
+ return *iterator(this->_M_impl._M_start._M_p
+ + __n / int(_S_word_bit), __n % int(_S_word_bit));
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ return *const_iterator(this->_M_impl._M_start._M_p
+ + __n / int(_S_word_bit), __n % int(_S_word_bit));
+ }
+
+ protected:
+ void
+ _M_range_check(size_type __n) const
+ {
+ if (__n >= this->size())
+ __throw_out_of_range(__N("vector<bool>::_M_range_check"));
+ }
+
+ public:
+ reference
+ at(size_type __n)
+ { _M_range_check(__n); return (*this)[__n]; }
+
+ const_reference
+ at(size_type __n) const
+ { _M_range_check(__n); return (*this)[__n]; }
+
+ void
+ reserve(size_type __n);
+
+ reference
+ front()
+ { return *begin(); }
+
+ const_reference
+ front() const
+ { return *begin(); }
+
+ reference
+ back()
+ { return *(end() - 1); }
+
+ const_reference
+ back() const
+ { return *(end() - 1); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ // N.B. DR 464 says nothing about vector<bool> but we need something
+ // here due to the way we are implementing DR 464 in the debug-mode
+ // vector class.
+ void
+ data() { }
+
+ void
+ push_back(bool __x)
+ {
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
+ *this->_M_impl._M_finish++ = __x;
+ else
+ _M_insert_aux(end(), __x);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
+ swap(vector& __x)
+#endif
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_end_of_storage,
+ __x._M_impl._M_end_of_storage);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<typename _Base::_Bit_alloc_type>::
+ _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator());
+ }
+
+ // [23.2.5]/1, third-to-last entry in synopsis listing
+ static void
+ swap(reference __x, reference __y)
+ {
+ bool __tmp = __x;
+ __x = __y;
+ __y = __tmp;
+ }
+
+ iterator
+ insert(iterator __position, const bool& __x = bool())
+ {
+ const difference_type __n = __position - begin();
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage
+ && __position == end())
+ *this->_M_impl._M_finish++ = __x;
+ else
+ _M_insert_aux(__position, __x);
+ return begin() + __n;
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+
+ void
+ insert(iterator __position, size_type __n, const bool& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void insert(iterator __p, initializer_list<bool> __l)
+ { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+ void
+ pop_back()
+ { --this->_M_impl._M_finish; }
+
+ iterator
+ erase(iterator __position)
+ {
+ if (__position + 1 != end())
+ std::copy(__position + 1, end(), __position);
+ --this->_M_impl._M_finish;
+ return __position;
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ _M_erase_at_end(std::copy(__last, end(), __first));
+ return __first;
+ }
+
+ void
+ resize(size_type __new_size, bool __x = bool())
+ {
+ if (__new_size < size())
+ _M_erase_at_end(begin() + difference_type(__new_size));
+ else
+ insert(end(), __new_size - size(), __x);
+ }
+
+ void
+ flip()
+ {
+ for (_Bit_type * __p = this->_M_impl._M_start._M_p;
+ __p != this->_M_impl._M_end_of_storage; ++__p)
+ *__p = ~*__p;
+ }
+
+ void
+ clear()
+ { _M_erase_at_end(begin()); }
+
+
+ protected:
+ // Precondition: __first._M_offset == 0 && __result._M_offset == 0.
+ iterator
+ _M_copy_aligned(const_iterator __first, const_iterator __last,
+ iterator __result)
+ {
+ _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p);
+ return std::copy(const_iterator(__last._M_p, 0), __last,
+ iterator(__q, 0));
+ }
+
+ void
+ _M_initialize(size_type __n)
+ {
+ _Bit_type* __q = this->_M_allocate(__n);
+ this->_M_impl._M_end_of_storage = (__q
+ + ((__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
+ }
+
+ // Check whether it's an integral type. If so, it's not an iterator.
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ {
+ _M_initialize(static_cast<size_type>(__n));
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+ }
+
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ { _M_initialize_range(__first, __last,
+ std::__iterator_category(__first)); }
+
+ template<typename _InputIterator>
+ void
+ _M_initialize_range(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ {
+ for (; __first != __last; ++__first)
+ push_back(*__first);
+ }
+
+ template<typename _ForwardIterator>
+ void
+ _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __n = std::distance(__first, __last);
+ _M_initialize(__n);
+ std::copy(__first, __last, this->_M_impl._M_start);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ { _M_fill_assign(__n, __val); }
+
+ template<class _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
+
+ void
+ _M_fill_assign(size_t __n, bool __x)
+ {
+ if (__n > size())
+ {
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+ insert(end(), __n - size(), __x);
+ }
+ else
+ {
+ _M_erase_at_end(begin() + __n);
+ std::fill(this->_M_impl._M_start._M_p,
+ this->_M_impl._M_end_of_storage, __x ? ~0 : 0);
+ }
+ }
+
+ template<typename _InputIterator>
+ void
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ {
+ iterator __cur = begin();
+ for (; __first != __last && __cur != end(); ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ _M_erase_at_end(__cur);
+ else
+ insert(end(), __first, __last);
+ }
+
+ template<typename _ForwardIterator>
+ void
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __len = std::distance(__first, __last);
+ if (__len < size())
+ _M_erase_at_end(std::copy(__first, __last, begin()));
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ }
+
+ // Check whether it's an integral type. If so, it's not an iterator.
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ __true_type)
+ { _M_fill_insert(__pos, __n, __x); }
+
+ template<typename _InputIterator>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ __false_type)
+ { _M_insert_range(__pos, __first, __last,
+ std::__iterator_category(__first)); }
+
+ void
+ _M_fill_insert(iterator __position, size_type __n, bool __x);
+
+ template<typename _InputIterator>
+ void
+ _M_insert_range(iterator __pos, _InputIterator __first,
+ _InputIterator __last, std::input_iterator_tag)
+ {
+ for (; __first != __last; ++__first)
+ {
+ __pos = insert(__pos, *__first);
+ ++__pos;
+ }
+ }
+
+ template<typename _ForwardIterator>
+ void
+ _M_insert_range(iterator __position, _ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag);
+
+ void
+ _M_insert_aux(iterator __position, bool __x);
+
+ size_type
+ _M_check_len(size_type __n, const char* __s) const
+ {
+ if (max_size() - size() < __n)
+ __throw_length_error(__N(__s));
+
+ const size_type __len = size() + std::max(size(), __n);
+ return (__len < size() || __len > max_size()) ? max_size() : __len;
+ }
+
+ void
+ _M_erase_at_end(iterator __pos)
+ { this->_M_impl._M_finish = __pos; }
+ };
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_construct.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_construct.h
new file mode 100644
index 0000000..9df37fe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_construct.h
@@ -0,0 +1,148 @@
+// nonstandard construct and destroy functions -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_construct.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_CONSTRUCT_H
+#define _STL_CONSTRUCT_H 1
+
+#include <new>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * Constructs an object in existing memory by invoking an allocated
+ * object's constructor with an initializer.
+ */
+ template<typename _T1, typename _T2>
+ inline void
+ _Construct(_T1* __p, const _T2& __value)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_]allocator::construct
+ ::new(static_cast<void*>(__p)) _T1(__value);
+ }
+
+ /**
+ * Destroy the object pointed to by a pointer type.
+ */
+ template<typename _Tp>
+ inline void
+ _Destroy(_Tp* __pointer)
+ { __pointer->~_Tp(); }
+
+ template<bool>
+ struct _Destroy_aux
+ {
+ template<typename _ForwardIterator>
+ static void
+ __destroy(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ for (; __first != __last; ++__first)
+ std::_Destroy(&*__first);
+ }
+ };
+
+ template<>
+ struct _Destroy_aux<true>
+ {
+ template<typename _ForwardIterator>
+ static void
+ __destroy(_ForwardIterator, _ForwardIterator) { }
+ };
+
+ /**
+ * Destroy a range of objects. If the value_type of the object has
+ * a trivial destructor, the compiler should optimize all of this
+ * away, otherwise the objects' destructors must be invoked.
+ */
+ template<typename _ForwardIterator>
+ inline void
+ _Destroy(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _Value_type;
+ std::_Destroy_aux<__has_trivial_destructor(_Value_type)>::
+ __destroy(__first, __last);
+ }
+
+ /**
+ * Destroy a range of objects using the supplied allocator. For
+ * nondefault allocators we do not optimize away invocation of
+ * destroy() even if _Tp has a trivial destructor.
+ */
+
+ template <typename _Tp> class allocator;
+
+ template<typename _ForwardIterator, typename _Allocator>
+ void
+ _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+ _Allocator& __alloc)
+ {
+ for (; __first != __last; ++__first)
+ __alloc.destroy(&*__first);
+ }
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ _Destroy(_ForwardIterator __first, _ForwardIterator __last,
+ allocator<_Tp>&)
+ {
+ _Destroy(__first, __last);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_CONSTRUCT_H */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h
new file mode 100644
index 0000000..1c20e27
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h
@@ -0,0 +1,1819 @@
+// Deque implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 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.
+ */
+
+/** @file stl_deque.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_DEQUE_H
+#define _STL_DEQUE_H 1
+
+#include <bits/concept_check.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief This function controls the size of memory nodes.
+ * @param size The size of an element.
+ * @return The number (not byte size) of elements per node.
+ *
+ * This function started off as a compiler kludge from SGI, but seems to
+ * be a useful wrapper around a repeated constant expression. The '512' is
+ * tunable (and no other code needs to change), but no investigation has
+ * been done since inheriting the SGI code.
+ */
+ inline size_t
+ __deque_buf_size(size_t __size)
+ { return __size < 512 ? size_t(512 / __size) : size_t(1); }
+
+
+ /**
+ * @brief A deque::iterator.
+ *
+ * Quite a bit of intelligence here. Much of the functionality of
+ * deque is actually passed off to this class. A deque holds two
+ * of these internally, marking its valid range. Access to
+ * elements is done as offsets of either of those two, relying on
+ * operator overloading in this class.
+ *
+ * All the functions are op overloads except for _M_set_node.
+ */
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ struct _Deque_iterator
+ {
+ typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
+ typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+ static size_t _S_buffer_size()
+ { return __deque_buf_size(sizeof(_Tp)); }
+
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Ptr pointer;
+ typedef _Ref reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp** _Map_pointer;
+ typedef _Deque_iterator _Self;
+
+ _Tp* _M_cur;
+ _Tp* _M_first;
+ _Tp* _M_last;
+ _Map_pointer _M_node;
+
+ _Deque_iterator(_Tp* __x, _Map_pointer __y)
+ : _M_cur(__x), _M_first(*__y),
+ _M_last(*__y + _S_buffer_size()), _M_node(__y) { }
+
+ _Deque_iterator()
+ : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { }
+
+ _Deque_iterator(const iterator& __x)
+ : _M_cur(__x._M_cur), _M_first(__x._M_first),
+ _M_last(__x._M_last), _M_node(__x._M_node) { }
+
+ reference
+ operator*() const
+ { return *_M_cur; }
+
+ pointer
+ operator->() const
+ { return _M_cur; }
+
+ _Self&
+ operator++()
+ {
+ ++_M_cur;
+ if (_M_cur == _M_last)
+ {
+ _M_set_node(_M_node + 1);
+ _M_cur = _M_first;
+ }
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ if (_M_cur == _M_first)
+ {
+ _M_set_node(_M_node - 1);
+ _M_cur = _M_last;
+ }
+ --_M_cur;
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ --*this;
+ return __tmp;
+ }
+
+ _Self&
+ operator+=(difference_type __n)
+ {
+ const difference_type __offset = __n + (_M_cur - _M_first);
+ if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
+ _M_cur += __n;
+ else
+ {
+ const difference_type __node_offset =
+ __offset > 0 ? __offset / difference_type(_S_buffer_size())
+ : -difference_type((-__offset - 1)
+ / _S_buffer_size()) - 1;
+ _M_set_node(_M_node + __node_offset);
+ _M_cur = _M_first + (__offset - __node_offset
+ * difference_type(_S_buffer_size()));
+ }
+ return *this;
+ }
+
+ _Self
+ operator+(difference_type __n) const
+ {
+ _Self __tmp = *this;
+ return __tmp += __n;
+ }
+
+ _Self&
+ operator-=(difference_type __n)
+ { return *this += -__n; }
+
+ _Self
+ operator-(difference_type __n) const
+ {
+ _Self __tmp = *this;
+ return __tmp -= __n;
+ }
+
+ reference
+ operator[](difference_type __n) const
+ { return *(*this + __n); }
+
+ /**
+ * Prepares to traverse new_node. Sets everything except
+ * _M_cur, which should therefore be set by the caller
+ * immediately afterwards, based on _M_first and _M_last.
+ */
+ void
+ _M_set_node(_Map_pointer __new_node)
+ {
+ _M_node = __new_node;
+ _M_first = *__new_node;
+ _M_last = _M_first + difference_type(_S_buffer_size());
+ }
+ };
+
+ // Note: we also provide overloads whose operands are of the same type in
+ // order to avoid ambiguous overload resolution when std::rel_ops operators
+ // are in scope (for additional details, see libstdc++/3628)
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return __x._M_cur == __y._M_cur; }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return __x._M_cur == __y._M_cur; }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+ : (__x._M_node < __y._M_node); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur)
+ : (__x._M_node < __y._M_node); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return __y < __x; }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return __y < __x; }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline bool
+ operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ { return !(__x < __y); }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline bool
+ operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ { return !(__x < __y); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // According to the resolution of DR179 not only the various comparison
+ // operators but also operator- must accept mixed iterator/const_iterator
+ // parameters.
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
+ operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
+ const _Deque_iterator<_Tp, _Ref, _Ptr>& __y)
+ {
+ return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type
+ (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size())
+ * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+ + (__y._M_last - __y._M_cur);
+ }
+
+ template<typename _Tp, typename _RefL, typename _PtrL,
+ typename _RefR, typename _PtrR>
+ inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+ operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
+ const _Deque_iterator<_Tp, _RefR, _PtrR>& __y)
+ {
+ return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type
+ (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size())
+ * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first)
+ + (__y._M_last - __y._M_cur);
+ }
+
+ template<typename _Tp, typename _Ref, typename _Ptr>
+ inline _Deque_iterator<_Tp, _Ref, _Ptr>
+ operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
+ { return __x + __n; }
+
+ template<typename _Tp>
+ void
+ fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first,
+ const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value);
+
+ /**
+ * Deque base class. This class provides the unified face for %deque's
+ * allocation. This class's constructor and destructor allocate and
+ * deallocate (but do not initialize) storage. This makes %exception
+ * safety easier.
+ *
+ * Nothing in this class ever constructs or destroys an actual Tp element.
+ * (Deque handles that itself.) Only/All memory management is performed
+ * here.
+ */
+ template<typename _Tp, typename _Alloc>
+ class _Deque_base
+ {
+ public:
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Tp_allocator()); }
+
+ typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator;
+ typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+ _Deque_base()
+ : _M_impl()
+ { _M_initialize_map(0); }
+
+ _Deque_base(const allocator_type& __a, size_t __num_elements)
+ : _M_impl(__a)
+ { _M_initialize_map(__num_elements); }
+
+ _Deque_base(const allocator_type& __a)
+ : _M_impl(__a)
+ { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Deque_base(_Deque_base&& __x)
+ : _M_impl(__x._M_get_Tp_allocator())
+ {
+ _M_initialize_map(0);
+ if (__x._M_impl._M_map)
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+ std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
+ }
+ }
+#endif
+
+ ~_Deque_base();
+
+ protected:
+ //This struct encapsulates the implementation of the std::deque
+ //standard container and at the same time makes use of the EBO
+ //for empty allocators.
+ typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type;
+
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+ struct _Deque_impl
+ : public _Tp_alloc_type
+ {
+ _Tp** _M_map;
+ size_t _M_map_size;
+ iterator _M_start;
+ iterator _M_finish;
+
+ _Deque_impl()
+ : _Tp_alloc_type(), _M_map(0), _M_map_size(0),
+ _M_start(), _M_finish()
+ { }
+
+ _Deque_impl(const _Tp_alloc_type& __a)
+ : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0),
+ _M_start(), _M_finish()
+ { }
+ };
+
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+
+ const _Tp_alloc_type&
+ _M_get_Tp_allocator() const
+ { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+
+ _Map_alloc_type
+ _M_get_map_allocator() const
+ { return _Map_alloc_type(_M_get_Tp_allocator()); }
+
+ _Tp*
+ _M_allocate_node()
+ {
+ return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
+ }
+
+ void
+ _M_deallocate_node(_Tp* __p)
+ {
+ _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
+ }
+
+ _Tp**
+ _M_allocate_map(size_t __n)
+ { return _M_get_map_allocator().allocate(__n); }
+
+ void
+ _M_deallocate_map(_Tp** __p, size_t __n)
+ { _M_get_map_allocator().deallocate(__p, __n); }
+
+ protected:
+ void _M_initialize_map(size_t);
+ void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
+ void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
+ enum { _S_initial_map_size = 8 };
+
+ _Deque_impl _M_impl;
+ };
+
+ template<typename _Tp, typename _Alloc>
+ _Deque_base<_Tp, _Alloc>::
+ ~_Deque_base()
+ {
+ if (this->_M_impl._M_map)
+ {
+ _M_destroy_nodes(this->_M_impl._M_start._M_node,
+ this->_M_impl._M_finish._M_node + 1);
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+ }
+ }
+
+ /**
+ * @brief Layout storage.
+ * @param num_elements The count of T's for which to allocate space
+ * at first.
+ * @return Nothing.
+ *
+ * The initial underlying memory layout is a bit complicated...
+ */
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp, _Alloc>::
+ _M_initialize_map(size_t __num_elements)
+ {
+ const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp))
+ + 1);
+
+ this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size,
+ size_t(__num_nodes + 2));
+ this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size);
+
+ // For "small" maps (needing less than _M_map_size nodes), allocation
+ // starts in the middle elements and grows outwards. So nstart may be
+ // the beginning of _M_map, but for small maps it may be as far in as
+ // _M_map+3.
+
+ _Tp** __nstart = (this->_M_impl._M_map
+ + (this->_M_impl._M_map_size - __num_nodes) / 2);
+ _Tp** __nfinish = __nstart + __num_nodes;
+
+ __try
+ { _M_create_nodes(__nstart, __nfinish); }
+ __catch(...)
+ {
+ _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size);
+ this->_M_impl._M_map = 0;
+ this->_M_impl._M_map_size = 0;
+ __throw_exception_again;
+ }
+
+ this->_M_impl._M_start._M_set_node(__nstart);
+ this->_M_impl._M_finish._M_set_node(__nfinish - 1);
+ this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first;
+ this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first
+ + __num_elements
+ % __deque_buf_size(sizeof(_Tp)));
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp, _Alloc>::
+ _M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
+ {
+ _Tp** __cur;
+ __try
+ {
+ for (__cur = __nstart; __cur < __nfinish; ++__cur)
+ *__cur = this->_M_allocate_node();
+ }
+ __catch(...)
+ {
+ _M_destroy_nodes(__nstart, __cur);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ _Deque_base<_Tp, _Alloc>::
+ _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
+ {
+ for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
+ _M_deallocate_node(*__n);
+ }
+
+ /**
+ * @brief A standard container using fixed-size memory allocation and
+ * constant-time manipulation of elements at either end.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and a
+ * <a href="tables.html#67">sequence</a>, including the
+ * <a href="tables.html#68">optional sequence requirements</a>.
+ *
+ * In previous HP/SGI versions of deque, there was an extra template
+ * parameter so users could control the node size. This extension turned
+ * out to violate the C++ standard (it can be detected using template
+ * template parameters), and it was removed.
+ *
+ * Here's how a deque<Tp> manages memory. Each deque has 4 members:
+ *
+ * - Tp** _M_map
+ * - size_t _M_map_size
+ * - iterator _M_start, _M_finish
+ *
+ * map_size is at least 8. %map is an array of map_size
+ * pointers-to-"nodes". (The name %map has nothing to do with the
+ * std::map class, and "nodes" should not be confused with
+ * std::list's usage of "node".)
+ *
+ * A "node" has no specific type name as such, but it is referred
+ * to as "node" in this file. It is a simple array-of-Tp. If Tp
+ * is very large, there will be one Tp element per node (i.e., an
+ * "array" of one). For non-huge Tp's, node size is inversely
+ * related to Tp size: the larger the Tp, the fewer Tp's will fit
+ * in a node. The goal here is to keep the total size of a node
+ * relatively small and constant over different Tp's, to improve
+ * allocator efficiency.
+ *
+ * Not every pointer in the %map array will point to a node. If
+ * the initial number of elements in the deque is small, the
+ * /middle/ %map pointers will be valid, and the ones at the edges
+ * will be unused. This same situation will arise as the %map
+ * grows: available %map pointers, if any, will be on the ends. As
+ * new nodes are created, only a subset of the %map's pointers need
+ * to be copied "outward".
+ *
+ * Class invariants:
+ * - For any nonsingular iterator i:
+ * - i.node points to a member of the %map array. (Yes, you read that
+ * correctly: i.node does not actually point to a node.) The member of
+ * the %map array is what actually points to the node.
+ * - i.first == *(i.node) (This points to the node (first Tp element).)
+ * - i.last == i.first + node_size
+ * - i.cur is a pointer in the range [i.first, i.last). NOTE:
+ * the implication of this is that i.cur is always a dereferenceable
+ * pointer, even if i is a past-the-end iterator.
+ * - Start and Finish are always nonsingular iterators. NOTE: this
+ * means that an empty deque must have one node, a deque with <N
+ * elements (where N is the node buffer size) must have one node, a
+ * deque with N through (2N-1) elements must have two nodes, etc.
+ * - For every node other than start.node and finish.node, every
+ * element in the node is an initialized object. If start.node ==
+ * finish.node, then [start.cur, finish.cur) are initialized
+ * objects, and the elements outside that range are uninitialized
+ * storage. Otherwise, [start.cur, start.last) and [finish.first,
+ * finish.cur) are initialized objects, and [start.first, start.cur)
+ * and [finish.cur, finish.last) are uninitialized storage.
+ * - [%map, %map + map_size) is a valid, non-empty range.
+ * - [start.node, finish.node] is a valid range contained within
+ * [%map, %map + map_size).
+ * - A pointer in the range [%map, %map + map_size) points to an allocated
+ * node if and only if the pointer is in the range
+ * [start.node, finish.node].
+ *
+ * Here's the magic: nothing in deque is "aware" of the discontiguous
+ * storage!
+ *
+ * The memory setup and layout occurs in the parent, _Base, and the iterator
+ * class is entirely responsible for "leaping" from one node to the next.
+ * All the implementation routines for deque itself work only through the
+ * start and finish iterators. This keeps the routines simple and sane,
+ * and we can use other standard algorithms as well.
+ */
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ class deque : protected _Deque_base<_Tp, _Alloc>
+ {
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
+
+ typedef _Deque_base<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+
+ public:
+ typedef _Tp value_type;
+ typedef typename _Tp_alloc_type::pointer pointer;
+ typedef typename _Tp_alloc_type::const_pointer const_pointer;
+ typedef typename _Tp_alloc_type::reference reference;
+ typedef typename _Tp_alloc_type::const_reference const_reference;
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Alloc allocator_type;
+
+ protected:
+ typedef pointer* _Map_pointer;
+
+ static size_t _S_buffer_size()
+ { return __deque_buf_size(sizeof(_Tp)); }
+
+ // Functions controlling memory layout, and nothing else.
+ using _Base::_M_initialize_map;
+ using _Base::_M_create_nodes;
+ using _Base::_M_destroy_nodes;
+ using _Base::_M_allocate_node;
+ using _Base::_M_deallocate_node;
+ using _Base::_M_allocate_map;
+ using _Base::_M_deallocate_map;
+ using _Base::_M_get_Tp_allocator;
+
+ /**
+ * A total of four data members accumulated down the hierarchy.
+ * May be accessed via _M_impl.*
+ */
+ using _Base::_M_impl;
+
+ public:
+ // [23.2.1.1] construct/copy/destroy
+ // (assign() and get_allocator() are also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ deque()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %deque with no elements.
+ * @param a An allocator object.
+ */
+ explicit
+ deque(const allocator_type& __a)
+ : _Base(__a, 0) { }
+
+ /**
+ * @brief Creates a %deque with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ * @param a An allocator.
+ *
+ * This constructor fills the %deque with @a n copies of @a value.
+ */
+ explicit
+ deque(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__a, __n)
+ { _M_fill_initialize(__value); }
+
+ /**
+ * @brief %Deque copy constructor.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The newly-created %deque uses a copy of the allocation object used
+ * by @a x.
+ */
+ deque(const deque& __x)
+ : _Base(__x._M_get_Tp_allocator(), __x.size())
+ { std::__uninitialized_copy_a(__x.begin(), __x.end(),
+ this->_M_impl._M_start,
+ _M_get_Tp_allocator()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Deque move constructor.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The newly-created %deque contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %deque.
+ */
+ deque(deque&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ /**
+ * @brief Builds a %deque from an initializer list.
+ * @param l An initializer_list.
+ * @param a An allocator object.
+ *
+ * Create a %deque consisting of copies of the elements in the
+ * initializer_list @a l.
+ *
+ * This will call the element type's copy constructor N times
+ * (where N is l.size()) and do no memory reallocation.
+ */
+ deque(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _M_range_initialize(__l.begin(), __l.end(),
+ random_access_iterator_tag());
+ }
+#endif
+
+ /**
+ * @brief Builds a %deque from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param a An allocator object.
+ *
+ * Create a %deque consisting of copies of the elements from [first,
+ * last).
+ *
+ * If the iterators are forward, bidirectional, or random-access, then
+ * this will call the elements' copy constructor N times (where N is
+ * distance(first,last)) and do no memory reallocation. But if only
+ * input iterators are used, then this will do at most 2N calls to the
+ * copy constructor, and logN memory reallocations.
+ */
+ template<typename _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibility.
+ */
+ ~deque()
+ { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); }
+
+ /**
+ * @brief %Deque assignment operator.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ deque&
+ operator=(const deque& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Deque move assignment operator.
+ * @param x A %deque of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this deque (without copying).
+ * @a x is a valid, but unspecified %deque.
+ */
+ deque&
+ operator=(deque&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief Assigns an initializer list to a %deque.
+ * @param l An initializer_list.
+ *
+ * This function fills a %deque with copies of the elements in the
+ * initializer_list @a l.
+ *
+ * Note that the assignment completely changes the %deque and that the
+ * resulting %deque's size is the same as the number of elements
+ * assigned. Old data may be lost.
+ */
+ deque&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->assign(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /**
+ * @brief Assigns a given value to a %deque.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %deque with @a n copies of the given
+ * value. Note that the assignment completely changes the
+ * %deque and that the resulting %deque's size is the same as
+ * the number of elements assigned. Old data may be lost.
+ */
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+
+ /**
+ * @brief Assigns a range to a %deque.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %deque with copies of the elements in the
+ * range [first,last).
+ *
+ * Note that the assignment completely changes the %deque and that the
+ * resulting %deque's size is the same as the number of elements
+ * assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Assigns an initializer list to a %deque.
+ * @param l An initializer_list.
+ *
+ * This function fills a %deque with copies of the elements in the
+ * initializer_list @a l.
+ *
+ * Note that the assignment completely changes the %deque and that the
+ * resulting %deque's size is the same as the number of elements
+ * assigned. Old data may be lost.
+ */
+ void
+ assign(initializer_list<value_type> __l)
+ { this->assign(__l.begin(), __l.end()); }
+#endif
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %deque. Iteration is done in ordinary element order.
+ */
+ iterator
+ begin()
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %deque. Iteration is done in ordinary element order.
+ */
+ const_iterator
+ begin() const
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * element in the %deque. Iteration is done in ordinary
+ * element order.
+ */
+ iterator
+ end()
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %deque. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ end() const
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read/write reverse iterator that points to the
+ * last element in the %deque. Iteration is done in reverse
+ * element order.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %deque. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one
+ * before the first element in the %deque. Iteration is done
+ * in reverse element order.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %deque. Iteration is
+ * done in reverse element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->_M_impl._M_start); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %deque. Iteration is done in ordinary element order.
+ */
+ const_iterator
+ cbegin() const
+ { return this->_M_impl._M_start; }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %deque. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ cend() const
+ { return this->_M_impl._M_finish; }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %deque. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %deque. Iteration is
+ * done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(this->_M_impl._M_start); }
+#endif
+
+ // [23.2.1.2] capacity
+ /** Returns the number of elements in the %deque. */
+ size_type
+ size() const
+ { return this->_M_impl._M_finish - this->_M_impl._M_start; }
+
+ /** Returns the size() of the largest possible %deque. */
+ size_type
+ max_size() const
+ { return _M_get_Tp_allocator().max_size(); }
+
+ /**
+ * @brief Resizes the %deque to the specified number of elements.
+ * @param new_size Number of elements the %deque should contain.
+ * @param x Data with which new elements should be populated.
+ *
+ * This function will %resize the %deque to the specified
+ * number of elements. If the number is smaller than the
+ * %deque's current size the %deque is truncated, otherwise the
+ * %deque is extended and new elements are populated with given
+ * data.
+ */
+ void
+ resize(size_type __new_size, value_type __x = value_type())
+ {
+ const size_type __len = size();
+ if (__new_size < __len)
+ _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size));
+ else
+ insert(this->_M_impl._M_finish, __new_size - __len, __x);
+ }
+
+ /**
+ * Returns true if the %deque is empty. (Thus begin() would
+ * equal end().)
+ */
+ bool
+ empty() const
+ { return this->_M_impl._M_finish == this->_M_impl._M_start; }
+
+ // element access
+ /**
+ * @brief Subscript access to the data contained in the %deque.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read/write reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ */
+ reference
+ operator[](size_type __n)
+ { return this->_M_impl._M_start[difference_type(__n)]; }
+
+ /**
+ * @brief Subscript access to the data contained in the %deque.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read-only (constant) reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ */
+ const_reference
+ operator[](size_type __n) const
+ { return this->_M_impl._M_start[difference_type(__n)]; }
+
+ protected:
+ /// Safety check used only from at().
+ void
+ _M_range_check(size_type __n) const
+ {
+ if (__n >= this->size())
+ __throw_out_of_range(__N("deque::_M_range_check"));
+ }
+
+ public:
+ /**
+ * @brief Provides access to the data contained in the %deque.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read/write reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the deque. The
+ * function throws out_of_range if the check fails.
+ */
+ reference
+ at(size_type __n)
+ {
+ _M_range_check(__n);
+ return (*this)[__n];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %deque.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read-only (constant) reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter is first
+ * checked that it is in the range of the deque. The function throws
+ * out_of_range if the check fails.
+ */
+ const_reference
+ at(size_type __n) const
+ {
+ _M_range_check(__n);
+ return (*this)[__n];
+ }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %deque.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %deque.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last element of the
+ * %deque.
+ */
+ reference
+ back()
+ {
+ iterator __tmp = end();
+ --__tmp;
+ return *__tmp;
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %deque.
+ */
+ const_reference
+ back() const
+ {
+ const_iterator __tmp = end();
+ --__tmp;
+ return *__tmp;
+ }
+
+ // [23.2.1.2] modifiers
+ /**
+ * @brief Add data to the front of the %deque.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the front of the %deque and assigns the given
+ * data to it. Due to the nature of a %deque this operation
+ * can be done in constant time.
+ */
+ void
+ push_front(const value_type& __x)
+ {
+ if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+ {
+ this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x);
+ --this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_push_front_aux(__x);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_front(value_type&& __x)
+ { emplace_front(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_front(_Args&&... __args);
+#endif
+
+ /**
+ * @brief Add data to the end of the %deque.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the end of the %deque and assigns the given data
+ * to it. Due to the nature of a %deque this operation can be
+ * done in constant time.
+ */
+ void
+ push_back(const value_type& __x)
+ {
+ if (this->_M_impl._M_finish._M_cur
+ != this->_M_impl._M_finish._M_last - 1)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x);
+ ++this->_M_impl._M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux(__x);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_back(value_type&& __x)
+ { emplace_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args);
+#endif
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical stack operation. It shrinks the %deque by one.
+ *
+ * Note that no data is returned, and if the first element's data is
+ * needed, it should be retrieved before pop_front() is called.
+ */
+ void
+ pop_front()
+ {
+ if (this->_M_impl._M_start._M_cur
+ != this->_M_impl._M_start._M_last - 1)
+ {
+ this->_M_impl.destroy(this->_M_impl._M_start._M_cur);
+ ++this->_M_impl._M_start._M_cur;
+ }
+ else
+ _M_pop_front_aux();
+ }
+
+ /**
+ * @brief Removes last element.
+ *
+ * This is a typical stack operation. It shrinks the %deque by one.
+ *
+ * Note that no data is returned, and if the last element's data is
+ * needed, it should be retrieved before pop_back() is called.
+ */
+ void
+ pop_back()
+ {
+ if (this->_M_impl._M_finish._M_cur
+ != this->_M_impl._M_finish._M_first)
+ {
+ --this->_M_impl._M_finish._M_cur;
+ this->_M_impl.destroy(this->_M_impl._M_finish._M_cur);
+ }
+ else
+ _M_pop_back_aux();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts an object in %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified location.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
+ /**
+ * @brief Inserts given value into %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value before the
+ * specified location.
+ */
+ iterator
+ insert(iterator __position, const value_type& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %deque before specified iterator.
+ * @param position An iterator into the %deque.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before the
+ * specified location.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ /**
+ * @brief Inserts an initializer list into the %deque.
+ * @param p An iterator into the %deque.
+ * @param l An initializer_list.
+ *
+ * This function will insert copies of the data in the
+ * initializer_list @a l into the %deque before the location
+ * specified by @a p. This is known as "list insert."
+ */
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Inserts a number of copies of given data into the %deque.
+ * @param position An iterator into the %deque.
+ * @param n Number of elements to be inserted.
+ * @param x Data to be inserted.
+ *
+ * This function will insert a specified number of copies of the given
+ * data before the location specified by @a position.
+ */
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+ /**
+ * @brief Inserts a range into the %deque.
+ * @param position An iterator into the %deque.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range
+ * [first,last) into the %deque before the location specified
+ * by @a pos. This is known as "range insert."
+ */
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+
+ /**
+ * @brief Remove element at given position.
+ * @param position Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and thus
+ * shorten the %deque by one.
+ *
+ * The user is cautioned that
+ * this function only erases the element, and that if the element is
+ * itself a pointer, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ iterator
+ erase(iterator __position);
+
+ /**
+ * @brief Remove a range of elements.
+ * @param first Iterator pointing to the first element to be erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range [first,last) and
+ * shorten the %deque accordingly.
+ *
+ * The user is cautioned that
+ * this function only erases the elements, and that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibility.
+ */
+ iterator
+ erase(iterator __first, iterator __last);
+
+ /**
+ * @brief Swaps data with another %deque.
+ * @param x A %deque of the same element and allocator types.
+ *
+ * This exchanges the elements between two deques in constant time.
+ * (Four pointers, so it should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(d1,d2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(deque&& __x)
+#else
+ swap(deque& __x)
+#endif
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_map, __x._M_impl._M_map);
+ std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
+ __x._M_get_Tp_allocator());
+ }
+
+ /**
+ * Erases all the elements. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibility.
+ */
+ void
+ clear()
+ { _M_erase_at_end(begin()); }
+
+ protected:
+ // Internal constructor functions follow.
+
+ // called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ {
+ _M_initialize_map(static_cast<size_type>(__n));
+ _M_fill_initialize(__x);
+ }
+
+ // called by the range constructor to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_range_initialize(__first, __last, _IterCategory());
+ }
+
+ // called by the second initialize_dispatch above
+ //@{
+ /**
+ * @brief Fills the deque with whatever is in [first,last).
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @return Nothing.
+ *
+ * If the iterators are actually forward iterators (or better), then the
+ * memory layout can be done all at once. Else we move forward using
+ * push_back on each value from the iterator.
+ */
+ template<typename _InputIterator>
+ void
+ _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag);
+
+ // called by the second initialize_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag);
+ //@}
+
+ /**
+ * @brief Fills the %deque with copies of value.
+ * @param value Initial value.
+ * @return Nothing.
+ * @pre _M_start and _M_finish have already been initialized,
+ * but none of the %deque's elements have yet been constructed.
+ *
+ * This function is called only when the user provides an explicit size
+ * (with or without an explicit exemplar value).
+ */
+ void
+ _M_fill_initialize(const value_type& __value);
+
+ // Internal assign functions follow. The *_aux functions do the actual
+ // assignment work for the range versions.
+
+ // called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ { _M_fill_assign(__n, __val); }
+
+ // called by the range assign to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_assign_aux(__first, __last, _IterCategory());
+ }
+
+ // called by the second assign_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag);
+
+ // called by the second assign_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __len = std::distance(__first, __last);
+ if (__len > size())
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ else
+ _M_erase_at_end(std::copy(__first, __last, begin()));
+ }
+
+ // Called by assign(n,t), and the range assign when it turns out
+ // to be the same thing.
+ void
+ _M_fill_assign(size_type __n, const value_type& __val)
+ {
+ if (__n > size())
+ {
+ std::fill(begin(), end(), __val);
+ insert(end(), __n - size(), __val);
+ }
+ else
+ {
+ _M_erase_at_end(begin() + difference_type(__n));
+ std::fill(begin(), end(), __val);
+ }
+ }
+
+ //@{
+ /// Helper functions for push_* and pop_*.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ void _M_push_back_aux(const value_type&);
+
+ void _M_push_front_aux(const value_type&);
+#else
+ template<typename... _Args>
+ void _M_push_back_aux(_Args&&... __args);
+
+ template<typename... _Args>
+ void _M_push_front_aux(_Args&&... __args);
+#endif
+
+ void _M_pop_back_aux();
+
+ void _M_pop_front_aux();
+ //@}
+
+ // Internal insert functions follow. The *_aux functions do the actual
+ // insertion work when all shortcuts fail.
+
+ // called by the range insert to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _Integer __n, _Integer __x, __true_type)
+ { _M_fill_insert(__pos, __n, __x); }
+
+ // called by the range insert to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_range_insert_aux(__pos, __first, __last, _IterCategory());
+ }
+
+ // called by the second insert_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_range_insert_aux(iterator __pos, _InputIterator __first,
+ _InputIterator __last, std::input_iterator_tag);
+
+ // called by the second insert_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_insert_aux(iterator __pos, _ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag);
+
+ // Called by insert(p,n,x), and the range insert when it turns out to be
+ // the same thing. Can use fill functions in optimal situations,
+ // otherwise passes off to insert_aux(p,n,x).
+ void
+ _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
+
+ // called by insert(p,x)
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ _M_insert_aux(iterator __pos, const value_type& __x);
+#else
+ template<typename... _Args>
+ iterator
+ _M_insert_aux(iterator __pos, _Args&&... __args);
+#endif
+
+ // called by insert(p,n,x) via fill_insert
+ void
+ _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
+
+ // called by range_insert_aux for forward iterators
+ template<typename _ForwardIterator>
+ void
+ _M_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n);
+
+
+ // Internal erase functions follow.
+
+ void
+ _M_destroy_data_aux(iterator __first, iterator __last);
+
+ // Called by ~deque().
+ // NB: Doesn't deallocate the nodes.
+ template<typename _Alloc1>
+ void
+ _M_destroy_data(iterator __first, iterator __last, const _Alloc1&)
+ { _M_destroy_data_aux(__first, __last); }
+
+ void
+ _M_destroy_data(iterator __first, iterator __last,
+ const std::allocator<_Tp>&)
+ {
+ if (!__has_trivial_destructor(value_type))
+ _M_destroy_data_aux(__first, __last);
+ }
+
+ // Called by erase(q1, q2).
+ void
+ _M_erase_at_begin(iterator __pos)
+ {
+ _M_destroy_data(begin(), __pos, _M_get_Tp_allocator());
+ _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node);
+ this->_M_impl._M_start = __pos;
+ }
+
+ // Called by erase(q1, q2), resize(), clear(), _M_assign_aux,
+ // _M_fill_assign, operator=.
+ void
+ _M_erase_at_end(iterator __pos)
+ {
+ _M_destroy_data(__pos, end(), _M_get_Tp_allocator());
+ _M_destroy_nodes(__pos._M_node + 1,
+ this->_M_impl._M_finish._M_node + 1);
+ this->_M_impl._M_finish = __pos;
+ }
+
+ //@{
+ /// Memory-handling helpers for the previous internal insert functions.
+ iterator
+ _M_reserve_elements_at_front(size_type __n)
+ {
+ const size_type __vacancies = this->_M_impl._M_start._M_cur
+ - this->_M_impl._M_start._M_first;
+ if (__n > __vacancies)
+ _M_new_elements_at_front(__n - __vacancies);
+ return this->_M_impl._M_start - difference_type(__n);
+ }
+
+ iterator
+ _M_reserve_elements_at_back(size_type __n)
+ {
+ const size_type __vacancies = (this->_M_impl._M_finish._M_last
+ - this->_M_impl._M_finish._M_cur) - 1;
+ if (__n > __vacancies)
+ _M_new_elements_at_back(__n - __vacancies);
+ return this->_M_impl._M_finish + difference_type(__n);
+ }
+
+ void
+ _M_new_elements_at_front(size_type __new_elements);
+
+ void
+ _M_new_elements_at_back(size_type __new_elements);
+ //@}
+
+
+ //@{
+ /**
+ * @brief Memory-handling helpers for the major %map.
+ *
+ * Makes sure the _M_map has space for new nodes. Does not
+ * actually add the nodes. Can invalidate _M_map pointers.
+ * (And consequently, %deque iterators.)
+ */
+ void
+ _M_reserve_map_at_back(size_type __nodes_to_add = 1)
+ {
+ if (__nodes_to_add + 1 > this->_M_impl._M_map_size
+ - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map))
+ _M_reallocate_map(__nodes_to_add, false);
+ }
+
+ void
+ _M_reserve_map_at_front(size_type __nodes_to_add = 1)
+ {
+ if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node
+ - this->_M_impl._M_map))
+ _M_reallocate_map(__nodes_to_add, true);
+ }
+
+ void
+ _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
+ //@}
+ };
+
+
+ /**
+ * @brief Deque equality comparison.
+ * @param x A %deque.
+ * @param y A %deque of the same type as @a x.
+ * @return True iff the size and elements of the deques are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * deques. Deques are considered equivalent if their sizes are equal,
+ * and if corresponding elements compare equal.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return __x.size() == __y.size()
+ && std::equal(__x.begin(), __x.end(), __y.begin()); }
+
+ /**
+ * @brief Deque ordering relation.
+ * @param x A %deque.
+ * @param y A %deque of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * deques. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()); }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const deque<_Tp, _Alloc>& __x,
+ const deque<_Tp, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::deque::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>&& __x, deque<_Tp,_Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_DEQUE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_function.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_function.h
new file mode 100644
index 0000000..b2569d5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_function.h
@@ -0,0 +1,715 @@
+// Functor implementations -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file stl_function.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_FUNCTION_H
+#define _STL_FUNCTION_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 20.3.1 base classes
+ /** @defgroup functors Function Objects
+ * @ingroup utilities
+ *
+ * Function objects, or @e functors, are objects with an @c operator()
+ * defined and accessible. They can be passed as arguments to algorithm
+ * templates and used in place of a function pointer. Not only is the
+ * resulting expressiveness of the library increased, but the generated
+ * code can be more efficient than what you might write by hand. When we
+ * refer to "functors," then, generally we include function pointers in
+ * the description as well.
+ *
+ * Often, functors are only created as temporaries passed to algorithm
+ * calls, rather than being created as named variables.
+ *
+ * Two examples taken from the standard itself follow. To perform a
+ * by-element addition of two vectors @c a and @c b containing @c double,
+ * and put the result in @c a, use
+ * \code
+ * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>());
+ * \endcode
+ * To negate every element in @c a, use
+ * \code
+ * transform(a.begin(), a.end(), a.begin(), negate<double>());
+ * \endcode
+ * The addition and negation functions will be inlined directly.
+ *
+ * The standard functors are derived from structs named @c unary_function
+ * and @c binary_function. These two classes contain nothing but typedefs,
+ * to aid in generic (template) programming. If you write your own
+ * functors, you might consider doing the same.
+ *
+ * @{
+ */
+ /**
+ * This is one of the @link functors functor base classes@endlink.
+ */
+ template<typename _Arg, typename _Result>
+ struct unary_function
+ {
+ typedef _Arg argument_type; ///< @c argument_type is the type of the
+ /// argument (no surprises here)
+
+ typedef _Result result_type; ///< @c result_type is the return type
+ };
+
+ /**
+ * This is one of the @link functors functor base classes@endlink.
+ */
+ template<typename _Arg1, typename _Arg2, typename _Result>
+ struct binary_function
+ {
+ typedef _Arg1 first_argument_type; ///< the type of the first argument
+ /// (no surprises here)
+
+ typedef _Arg2 second_argument_type; ///< the type of the second argument
+ typedef _Result result_type; ///< type of the return type
+ };
+ /** @} */
+
+ // 20.3.2 arithmetic
+ /** @defgroup arithmetic_functors Arithmetic Classes
+ * @ingroup functors
+ *
+ * Because basic math often needs to be done during an algorithm,
+ * the library provides functors for those operations. See the
+ * documentation for @link functors the base classes@endlink
+ * for examples of their use.
+ *
+ * @{
+ */
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct plus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x + __y; }
+ };
+
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct minus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x - __y; }
+ };
+
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct multiplies : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x * __y; }
+ };
+
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct divides : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x / __y; }
+ };
+
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct modulus : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x % __y; }
+ };
+
+ /// One of the @link arithmetic_functors math functors@endlink.
+ template<typename _Tp>
+ struct negate : public unary_function<_Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x) const
+ { return -__x; }
+ };
+ /** @} */
+
+ // 20.3.3 comparisons
+ /** @defgroup comparison_functors Comparison Classes
+ * @ingroup functors
+ *
+ * The library provides six wrapper functors for all the basic comparisons
+ * in C++, like @c <.
+ *
+ * @{
+ */
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct equal_to : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x == __y; }
+ };
+
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct not_equal_to : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x != __y; }
+ };
+
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct greater : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x > __y; }
+ };
+
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct less : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x < __y; }
+ };
+
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct greater_equal : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >= __y; }
+ };
+
+ /// One of the @link comparison_functors comparison functors@endlink.
+ template<typename _Tp>
+ struct less_equal : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x <= __y; }
+ };
+ /** @} */
+
+ // 20.3.4 logical operations
+ /** @defgroup logical_functors Boolean Operations Classes
+ * @ingroup functors
+ *
+ * Here are wrapper functors for Boolean operations: @c &&, @c ||,
+ * and @c !.
+ *
+ * @{
+ */
+ /// One of the @link logical_functors Boolean operations functors@endlink.
+ template<typename _Tp>
+ struct logical_and : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x && __y; }
+ };
+
+ /// One of the @link logical_functors Boolean operations functors@endlink.
+ template<typename _Tp>
+ struct logical_or : public binary_function<_Tp, _Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x || __y; }
+ };
+
+ /// One of the @link logical_functors Boolean operations functors@endlink.
+ template<typename _Tp>
+ struct logical_not : public unary_function<_Tp, bool>
+ {
+ bool
+ operator()(const _Tp& __x) const
+ { return !__x; }
+ };
+ /** @} */
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 660. Missing Bitwise Operations.
+ template<typename _Tp>
+ struct bit_and : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x & __y; }
+ };
+
+ template<typename _Tp>
+ struct bit_or : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x | __y; }
+ };
+
+ template<typename _Tp>
+ struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
+ {
+ _Tp
+ operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x ^ __y; }
+ };
+
+ // 20.3.5 negators
+ /** @defgroup negators Negators
+ * @ingroup functors
+ *
+ * The functions @c not1 and @c not2 each take a predicate functor
+ * and return an instance of @c unary_negate or
+ * @c binary_negate, respectively. These classes are functors whose
+ * @c operator() performs the stored predicate function and then returns
+ * the negation of the result.
+ *
+ * For example, given a vector of integers and a trivial predicate,
+ * \code
+ * struct IntGreaterThanThree
+ * : public std::unary_function<int, bool>
+ * {
+ * bool operator() (int x) { return x > 3; }
+ * };
+ *
+ * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
+ * \endcode
+ * The call to @c find_if will locate the first index (i) of @c v for which
+ * "!(v[i] > 3)" is true.
+ *
+ * The not1/unary_negate combination works on predicates taking a single
+ * argument. The not2/binary_negate combination works on predicates which
+ * take two arguments.
+ *
+ * @{
+ */
+ /// One of the @link negators negation functors@endlink.
+ template<typename _Predicate>
+ class unary_negate
+ : public unary_function<typename _Predicate::argument_type, bool>
+ {
+ protected:
+ _Predicate _M_pred;
+
+ public:
+ explicit
+ unary_negate(const _Predicate& __x) : _M_pred(__x) { }
+
+ bool
+ operator()(const typename _Predicate::argument_type& __x) const
+ { return !_M_pred(__x); }
+ };
+
+ /// One of the @link negators negation functors@endlink.
+ template<typename _Predicate>
+ inline unary_negate<_Predicate>
+ not1(const _Predicate& __pred)
+ { return unary_negate<_Predicate>(__pred); }
+
+ /// One of the @link negators negation functors@endlink.
+ template<typename _Predicate>
+ class binary_negate
+ : public binary_function<typename _Predicate::first_argument_type,
+ typename _Predicate::second_argument_type, bool>
+ {
+ protected:
+ _Predicate _M_pred;
+
+ public:
+ explicit
+ binary_negate(const _Predicate& __x) : _M_pred(__x) { }
+
+ bool
+ operator()(const typename _Predicate::first_argument_type& __x,
+ const typename _Predicate::second_argument_type& __y) const
+ { return !_M_pred(__x, __y); }
+ };
+
+ /// One of the @link negators negation functors@endlink.
+ template<typename _Predicate>
+ inline binary_negate<_Predicate>
+ not2(const _Predicate& __pred)
+ { return binary_negate<_Predicate>(__pred); }
+ /** @} */
+
+ // 20.3.7 adaptors pointers functions
+ /** @defgroup pointer_adaptors Adaptors for pointers to functions
+ * @ingroup functors
+ *
+ * The advantage of function objects over pointers to functions is that
+ * the objects in the standard library declare nested typedefs describing
+ * their argument and result types with uniform names (e.g., @c result_type
+ * from the base classes @c unary_function and @c binary_function).
+ * Sometimes those typedefs are required, not just optional.
+ *
+ * Adaptors are provided to turn pointers to unary (single-argument) and
+ * binary (double-argument) functions into function objects. The
+ * long-winded functor @c pointer_to_unary_function is constructed with a
+ * function pointer @c f, and its @c operator() called with argument @c x
+ * returns @c f(x). The functor @c pointer_to_binary_function does the same
+ * thing, but with a double-argument @c f and @c operator().
+ *
+ * The function @c ptr_fun takes a pointer-to-function @c f and constructs
+ * an instance of the appropriate functor.
+ *
+ * @{
+ */
+ /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+ template<typename _Arg, typename _Result>
+ class pointer_to_unary_function : public unary_function<_Arg, _Result>
+ {
+ protected:
+ _Result (*_M_ptr)(_Arg);
+
+ public:
+ pointer_to_unary_function() { }
+
+ explicit
+ pointer_to_unary_function(_Result (*__x)(_Arg))
+ : _M_ptr(__x) { }
+
+ _Result
+ operator()(_Arg __x) const
+ { return _M_ptr(__x); }
+ };
+
+ /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+ template<typename _Arg, typename _Result>
+ inline pointer_to_unary_function<_Arg, _Result>
+ ptr_fun(_Result (*__x)(_Arg))
+ { return pointer_to_unary_function<_Arg, _Result>(__x); }
+
+ /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+ template<typename _Arg1, typename _Arg2, typename _Result>
+ class pointer_to_binary_function
+ : public binary_function<_Arg1, _Arg2, _Result>
+ {
+ protected:
+ _Result (*_M_ptr)(_Arg1, _Arg2);
+
+ public:
+ pointer_to_binary_function() { }
+
+ explicit
+ pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
+ : _M_ptr(__x) { }
+
+ _Result
+ operator()(_Arg1 __x, _Arg2 __y) const
+ { return _M_ptr(__x, __y); }
+ };
+
+ /// One of the @link pointer_adaptors adaptors for function pointers@endlink.
+ template<typename _Arg1, typename _Arg2, typename _Result>
+ inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
+ ptr_fun(_Result (*__x)(_Arg1, _Arg2))
+ { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
+ /** @} */
+
+ template<typename _Tp>
+ struct _Identity : public unary_function<_Tp,_Tp>
+ {
+ _Tp&
+ operator()(_Tp& __x) const
+ { return __x; }
+
+ const _Tp&
+ operator()(const _Tp& __x) const
+ { return __x; }
+ };
+
+ template<typename _Pair>
+ struct _Select1st : public unary_function<_Pair,
+ typename _Pair::first_type>
+ {
+ typename _Pair::first_type&
+ operator()(_Pair& __x) const
+ { return __x.first; }
+
+ const typename _Pair::first_type&
+ operator()(const _Pair& __x) const
+ { return __x.first; }
+ };
+
+ template<typename _Pair>
+ struct _Select2nd : public unary_function<_Pair,
+ typename _Pair::second_type>
+ {
+ typename _Pair::second_type&
+ operator()(_Pair& __x) const
+ { return __x.second; }
+
+ const typename _Pair::second_type&
+ operator()(const _Pair& __x) const
+ { return __x.second; }
+ };
+
+ // 20.3.8 adaptors pointers members
+ /** @defgroup memory_adaptors Adaptors for pointers to members
+ * @ingroup functors
+ *
+ * There are a total of 8 = 2^3 function objects in this family.
+ * (1) Member functions taking no arguments vs member functions taking
+ * one argument.
+ * (2) Call through pointer vs call through reference.
+ * (3) Const vs non-const member function.
+ *
+ * All of this complexity is in the function objects themselves. You can
+ * ignore it by using the helper function mem_fun and mem_fun_ref,
+ * which create whichever type of adaptor is appropriate.
+ *
+ * @{
+ */
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
+ class mem_fun_t : public unary_function<_Tp*, _Ret>
+ {
+ public:
+ explicit
+ mem_fun_t(_Ret (_Tp::*__pf)())
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(_Tp* __p) const
+ { return (__p->*_M_f)(); }
+
+ private:
+ _Ret (_Tp::*_M_f)();
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
+ class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun_t(_Ret (_Tp::*__pf)() const)
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(const _Tp* __p) const
+ { return (__p->*_M_f)(); }
+
+ private:
+ _Ret (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
+ class mem_fun_ref_t : public unary_function<_Tp, _Ret>
+ {
+ public:
+ explicit
+ mem_fun_ref_t(_Ret (_Tp::*__pf)())
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(_Tp& __r) const
+ { return (__r.*_M_f)(); }
+
+ private:
+ _Ret (_Tp::*_M_f)();
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp>
+ class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(const _Tp& __r) const
+ { return (__r.*_M_f)(); }
+
+ private:
+ _Ret (_Tp::*_M_f)() const;
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
+ class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
+ {
+ public:
+ explicit
+ mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(_Tp* __p, _Arg __x) const
+ { return (__p->*_M_f)(__x); }
+
+ private:
+ _Ret (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
+ class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(const _Tp* __p, _Arg __x) const
+ { return (__p->*_M_f)(__x); }
+
+ private:
+ _Ret (_Tp::*_M_f)(_Arg) const;
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
+ class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+ {
+ public:
+ explicit
+ mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(_Tp& __r, _Arg __x) const
+ { return (__r.*_M_f)(__x); }
+
+ private:
+ _Ret (_Tp::*_M_f)(_Arg);
+ };
+
+ /// One of the @link memory_adaptors adaptors for member
+ /// pointers@endlink.
+ template<typename _Ret, typename _Tp, typename _Arg>
+ class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
+ {
+ public:
+ explicit
+ const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
+ : _M_f(__pf) { }
+
+ _Ret
+ operator()(const _Tp& __r, _Arg __x) const
+ { return (__r.*_M_f)(__x); }
+
+ private:
+ _Ret (_Tp::*_M_f)(_Arg) const;
+ };
+
+ // Mem_fun adaptor helper functions. There are only two:
+ // mem_fun and mem_fun_ref.
+ template<typename _Ret, typename _Tp>
+ inline mem_fun_t<_Ret, _Tp>
+ mem_fun(_Ret (_Tp::*__f)())
+ { return mem_fun_t<_Ret, _Tp>(__f); }
+
+ template<typename _Ret, typename _Tp>
+ inline const_mem_fun_t<_Ret, _Tp>
+ mem_fun(_Ret (_Tp::*__f)() const)
+ { return const_mem_fun_t<_Ret, _Tp>(__f); }
+
+ template<typename _Ret, typename _Tp>
+ inline mem_fun_ref_t<_Ret, _Tp>
+ mem_fun_ref(_Ret (_Tp::*__f)())
+ { return mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+ template<typename _Ret, typename _Tp>
+ inline const_mem_fun_ref_t<_Ret, _Tp>
+ mem_fun_ref(_Ret (_Tp::*__f)() const)
+ { return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
+
+ template<typename _Ret, typename _Tp, typename _Arg>
+ inline mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template<typename _Ret, typename _Tp, typename _Arg>
+ inline const_mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template<typename _Ret, typename _Tp, typename _Arg>
+ inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+ template<typename _Ret, typename _Tp, typename _Arg>
+ inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+ /** @} */
+
+_GLIBCXX_END_NAMESPACE
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+# include <backward/binders.h>
+#endif
+
+#endif /* _STL_FUNCTION_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_heap.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_heap.h
new file mode 100644
index 0000000..9348fe9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_heap.h
@@ -0,0 +1,578 @@
+// Heap implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ * Copyright (c) 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.
+ */
+
+/** @file stl_heap.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_HEAP_H
+#define _STL_HEAP_H 1
+
+#include <debug/debug.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @defgroup heap_algorithms Heap Algorithms
+ * @ingroup sorting_algorithms
+ */
+
+ template<typename _RandomAccessIterator, typename _Distance>
+ _Distance
+ __is_heap_until(_RandomAccessIterator __first, _Distance __n)
+ {
+ _Distance __parent = 0;
+ for (_Distance __child = 1; __child < __n; ++__child)
+ {
+ if (__first[__parent] < __first[__child])
+ return __child;
+ if ((__child & 1) == 0)
+ ++__parent;
+ }
+ return __n;
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance,
+ typename _Compare>
+ _Distance
+ __is_heap_until(_RandomAccessIterator __first, _Distance __n,
+ _Compare __comp)
+ {
+ _Distance __parent = 0;
+ for (_Distance __child = 1; __child < __n; ++__child)
+ {
+ if (__comp(__first[__parent], __first[__child]))
+ return __child;
+ if ((__child & 1) == 0)
+ ++__parent;
+ }
+ return __n;
+ }
+
+ // __is_heap, a predicate testing whether or not a range is a heap.
+ // This function is an extension, not part of the C++ standard.
+ template<typename _RandomAccessIterator, typename _Distance>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _Distance __n)
+ { return std::__is_heap_until(__first, __n) == __n; }
+
+ template<typename _RandomAccessIterator, typename _Compare,
+ typename _Distance>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n)
+ { return std::__is_heap_until(__first, __n, __comp) == __n; }
+
+ template<typename _RandomAccessIterator>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ { return std::__is_heap(__first, std::distance(__first, __last)); }
+
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline bool
+ __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ { return std::__is_heap(__first, __comp, std::distance(__first, __last)); }
+
+ // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap,
+ // + is_heap and is_heap_until in C++0x.
+
+ template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
+ void
+ __push_heap(_RandomAccessIterator __first,
+ _Distance __holeIndex, _Distance __topIndex, _Tp __value)
+ {
+ _Distance __parent = (__holeIndex - 1) / 2;
+ while (__holeIndex > __topIndex && *(__first + __parent) < __value)
+ {
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
+ }
+
+ /**
+ * @brief Push an element onto a heap.
+ * @param first Start of heap.
+ * @param last End of heap + element.
+ * @ingroup heap_algorithms
+ *
+ * This operation pushes the element at last-1 onto the valid heap over the
+ * range [first,last-1). After completion, [first,last) is a valid heap.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap(__first, __last - 1);
+
+ _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), _GLIBCXX_MOVE(__value));
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance, typename _Tp,
+ typename _Compare>
+ void
+ __push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __topIndex, _Tp __value, _Compare __comp)
+ {
+ _Distance __parent = (__holeIndex - 1) / 2;
+ while (__holeIndex > __topIndex
+ && __comp(*(__first + __parent), __value))
+ {
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __parent));
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(__value);
+ }
+
+ /**
+ * @brief Push an element onto a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap + element.
+ * @param comp Comparison functor.
+ * @ingroup heap_algorithms
+ *
+ * This operation pushes the element at last-1 onto the valid heap over the
+ * range [first,last-1). After completion, [first,last) is a valid heap.
+ * Compare operations are performed using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last - 1, __comp);
+
+ _ValueType __value = _GLIBCXX_MOVE(*(__last - 1));
+ std::__push_heap(__first, _DistanceType((__last - __first) - 1),
+ _DistanceType(0), _GLIBCXX_MOVE(__value), __comp);
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance, typename _Tp>
+ void
+ __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __value)
+ {
+ const _Distance __topIndex = __holeIndex;
+ _Distance __secondChild = __holeIndex;
+ while (__secondChild < (__len - 1) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
+ __secondChild--;
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
+ __holeIndex = __secondChild;
+ }
+ if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+ + (__secondChild - 1)));
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ _GLIBCXX_MOVE(__value));
+ }
+
+ template<typename _RandomAccessIterator>
+ inline void
+ __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomAccessIterator __result)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ _ValueType __value = _GLIBCXX_MOVE(*__result);
+ *__result = _GLIBCXX_MOVE(*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ _GLIBCXX_MOVE(__value));
+ }
+
+ /**
+ * @brief Pop an element off a heap.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap_algorithms
+ *
+ * This operation pops the top of the heap. The elements first and last-1
+ * are swapped and [first,last-1) is made into a heap.
+ */
+ template<typename _RandomAccessIterator>
+ inline void
+ pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap(__first, __last);
+
+ --__last;
+ std::__pop_heap(__first, __last, __last);
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance,
+ typename _Tp, typename _Compare>
+ void
+ __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __value, _Compare __comp)
+ {
+ const _Distance __topIndex = __holeIndex;
+ _Distance __secondChild = __holeIndex;
+ while (__secondChild < (__len - 1) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ if (__comp(*(__first + __secondChild),
+ *(__first + (__secondChild - 1))))
+ __secondChild--;
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first + __secondChild));
+ __holeIndex = __secondChild;
+ }
+ if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2)
+ {
+ __secondChild = 2 * (__secondChild + 1);
+ *(__first + __holeIndex) = _GLIBCXX_MOVE(*(__first
+ + (__secondChild - 1)));
+ __holeIndex = __secondChild - 1;
+ }
+ std::__push_heap(__first, __holeIndex, __topIndex,
+ _GLIBCXX_MOVE(__value), __comp);
+ }
+
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomAccessIterator __result, _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ _ValueType __value = _GLIBCXX_MOVE(*__result);
+ *__result = _GLIBCXX_MOVE(*__first);
+ std::__adjust_heap(__first, _DistanceType(0),
+ _DistanceType(__last - __first),
+ _GLIBCXX_MOVE(__value), __comp);
+ }
+
+ /**
+ * @brief Pop an element off a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap_algorithms
+ *
+ * This operation pops the top of the heap. The elements first and last-1
+ * are swapped and [first,last-1) is made into a heap. Comparisons are
+ * made using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline void
+ pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last, __comp);
+
+ --__last;
+ std::__pop_heap(__first, __last, __last, __comp);
+ }
+
+ /**
+ * @brief Construct a heap over a range.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap_algorithms
+ *
+ * This operation makes the elements in [first,last) into a heap.
+ */
+ template<typename _RandomAccessIterator>
+ void
+ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<_ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__last - __first < 2)
+ return;
+
+ const _DistanceType __len = __last - __first;
+ _DistanceType __parent = (__len - 2) / 2;
+ while (true)
+ {
+ _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value));
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
+ }
+
+ /**
+ * @brief Construct a heap over a range using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap_algorithms
+ *
+ * This operation makes the elements in [first,last) into a heap.
+ * Comparisons are made using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ typedef typename iterator_traits<_RandomAccessIterator>::value_type
+ _ValueType;
+ typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+ _DistanceType;
+
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__last - __first < 2)
+ return;
+
+ const _DistanceType __len = __last - __first;
+ _DistanceType __parent = (__len - 2) / 2;
+ while (true)
+ {
+ _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
+ std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value),
+ __comp);
+ if (__parent == 0)
+ return;
+ __parent--;
+ }
+ }
+
+ /**
+ * @brief Sort a heap.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @ingroup heap_algorithms
+ *
+ * This operation sorts the valid heap in the range [first,last).
+ */
+ template<typename _RandomAccessIterator>
+ void
+ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap(__first, __last);
+
+ while (__last - __first > 1)
+ {
+ --__last;
+ std::__pop_heap(__first, __last, __last);
+ }
+ }
+
+ /**
+ * @brief Sort a heap using comparison functor.
+ * @param first Start of heap.
+ * @param last End of heap.
+ * @param comp Comparison functor to use.
+ * @ingroup heap_algorithms
+ *
+ * This operation sorts the valid heap in the range [first,last).
+ * Comparisons are made using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ void
+ sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_heap_pred(__first, __last, __comp);
+
+ while (__last - __first > 1)
+ {
+ --__last;
+ std::__pop_heap(__first, __last, __last, __comp);
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Search the end of a heap.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return An iterator pointing to the first element not in the heap.
+ * @ingroup heap_algorithms
+ *
+ * This operation returns the last iterator i in [first, last) for which
+ * the range [first, i) is a heap.
+ */
+ template<typename _RandomAccessIterator>
+ inline _RandomAccessIterator
+ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return __first + std::__is_heap_until(__first, std::distance(__first,
+ __last));
+ }
+
+ /**
+ * @brief Search the end of a heap using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor to use.
+ * @return An iterator pointing to the first element not in the heap.
+ * @ingroup heap_algorithms
+ *
+ * This operation returns the last iterator i in [first, last) for which
+ * the range [first, i) is a heap. Comparisons are made using comp.
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline _RandomAccessIterator
+ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return __first + std::__is_heap_until(__first, std::distance(__first,
+ __last),
+ __comp);
+ }
+
+ /**
+ * @brief Determines whether a range is a heap.
+ * @param first Start of range.
+ * @param last End of range.
+ * @return True if range is a heap, false otherwise.
+ * @ingroup heap_algorithms
+ */
+ template<typename _RandomAccessIterator>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ { return std::is_heap_until(__first, __last) == __last; }
+
+ /**
+ * @brief Determines whether a range is a heap using comparison functor.
+ * @param first Start of range.
+ * @param last End of range.
+ * @param comp Comparison functor to use.
+ * @return True if range is a heap, false otherwise.
+ * @ingroup heap_algorithms
+ */
+ template<typename _RandomAccessIterator, typename _Compare>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+ { return std::is_heap_until(__first, __last, __comp) == __last; }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_HEAP_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator.h
new file mode 100644
index 0000000..129552f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator.h
@@ -0,0 +1,1041 @@
+// Iterators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file stl_iterator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ *
+ * This file implements reverse_iterator, back_insert_iterator,
+ * front_insert_iterator, insert_iterator, __normal_iterator, and their
+ * supporting functions and overloaded operators.
+ */
+
+#ifndef _STL_ITERATOR_H
+#define _STL_ITERATOR_H 1
+
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 24.4.1 Reverse iterators
+ /**
+ * "Bidirectional and random access iterators have corresponding reverse
+ * %iterator adaptors that iterate through the data structure in the
+ * opposite direction. They have the same signatures as the corresponding
+ * iterators. The fundamental relation between a reverse %iterator and its
+ * corresponding %iterator @c i is established by the identity:
+ * @code
+ * &*(reverse_iterator(i)) == &*(i - 1)
+ * @endcode
+ *
+ * This mapping is dictated by the fact that while there is always a
+ * pointer past the end of an array, there might not be a valid pointer
+ * before the beginning of an array." [24.4.1]/1,2
+ *
+ * Reverse iterators can be tricky and surprising at first. Their
+ * semantics make sense, however, and the trickiness is a side effect of
+ * the requirement that the iterators must be safe.
+ */
+ template<typename _Iterator>
+ class reverse_iterator
+ : public iterator<typename iterator_traits<_Iterator>::iterator_category,
+ typename iterator_traits<_Iterator>::value_type,
+ typename iterator_traits<_Iterator>::difference_type,
+ typename iterator_traits<_Iterator>::pointer,
+ typename iterator_traits<_Iterator>::reference>
+ {
+ protected:
+ _Iterator current;
+
+ public:
+ typedef _Iterator iterator_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
+ typedef typename iterator_traits<_Iterator>::reference reference;
+ typedef typename iterator_traits<_Iterator>::pointer pointer;
+
+ public:
+ /**
+ * The default constructor default-initializes member @p current.
+ * If it is a pointer, that means it is zero-initialized.
+ */
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 235 No specification of default ctor for reverse_iterator
+ reverse_iterator() : current() { }
+
+ /**
+ * This %iterator will move in the opposite direction that @p x does.
+ */
+ explicit
+ reverse_iterator(iterator_type __x) : current(__x) { }
+
+ /**
+ * The copy constructor is normal.
+ */
+ reverse_iterator(const reverse_iterator& __x)
+ : current(__x.current) { }
+
+ /**
+ * A reverse_iterator across other types can be copied in the normal
+ * fashion.
+ */
+ template<typename _Iter>
+ reverse_iterator(const reverse_iterator<_Iter>& __x)
+ : current(__x.base()) { }
+
+ /**
+ * @return @c current, the %iterator used for underlying work.
+ */
+ iterator_type
+ base() const
+ { return current; }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reference
+ operator*() const
+ {
+ _Iterator __tmp = current;
+ return *--__tmp;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator&
+ operator++()
+ {
+ --current;
+ return *this;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator
+ operator++(int)
+ {
+ reverse_iterator __tmp = *this;
+ --current;
+ return __tmp;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator&
+ operator--()
+ {
+ ++current;
+ return *this;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator
+ operator--(int)
+ {
+ reverse_iterator __tmp = *this;
+ ++current;
+ return __tmp;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator
+ operator+(difference_type __n) const
+ { return reverse_iterator(current - __n); }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator&
+ operator+=(difference_type __n)
+ {
+ current -= __n;
+ return *this;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator
+ operator-(difference_type __n) const
+ { return reverse_iterator(current + __n); }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reverse_iterator&
+ operator-=(difference_type __n)
+ {
+ current += __n;
+ return *this;
+ }
+
+ /**
+ * @return TODO
+ *
+ * @doctodo
+ */
+ reference
+ operator[](difference_type __n) const
+ { return *(*this + __n); }
+ };
+
+ //@{
+ /**
+ * @param x A %reverse_iterator.
+ * @param y A %reverse_iterator.
+ * @return A simple bool.
+ *
+ * Reverse iterators forward many operations to their underlying base()
+ * iterators. Others are implemented in terms of one another.
+ *
+ */
+ template<typename _Iterator>
+ inline bool
+ operator==(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return __x.base() == __y.base(); }
+
+ template<typename _Iterator>
+ inline bool
+ operator<(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return __y.base() < __x.base(); }
+
+ template<typename _Iterator>
+ inline bool
+ operator!=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Iterator>
+ inline bool
+ operator>(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return __y < __x; }
+
+ template<typename _Iterator>
+ inline bool
+ operator<=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Iterator>
+ inline bool
+ operator>=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return !(__x < __y); }
+
+ template<typename _Iterator>
+ inline typename reverse_iterator<_Iterator>::difference_type
+ operator-(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+ { return __y.base() - __x.base(); }
+
+ template<typename _Iterator>
+ inline reverse_iterator<_Iterator>
+ operator+(typename reverse_iterator<_Iterator>::difference_type __n,
+ const reverse_iterator<_Iterator>& __x)
+ { return reverse_iterator<_Iterator>(__x.base() - __n); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 280. Comparison of reverse_iterator to const reverse_iterator.
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator==(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return __x.base() == __y.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return __y.base() < __x.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator!=(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return !(__x == __y); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return __y < __x; }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<=(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return !(__y < __x); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>=(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ { return !(__x < __y); }
+
+ template<typename _IteratorL, typename _IteratorR>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // DR 685.
+ inline auto
+ operator-(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+ -> decltype(__y.base() - __x.base())
+#else
+ inline typename reverse_iterator<_IteratorL>::difference_type
+ operator-(const reverse_iterator<_IteratorL>& __x,
+ const reverse_iterator<_IteratorR>& __y)
+#endif
+ { return __y.base() - __x.base(); }
+ //@}
+
+ // 24.4.2.2.1 back_insert_iterator
+ /**
+ * @brief Turns assignment into insertion.
+ *
+ * These are output iterators, constructed from a container-of-T.
+ * Assigning a T to the iterator appends it to the container using
+ * push_back.
+ *
+ * Tip: Using the back_inserter function to create these iterators can
+ * save typing.
+ */
+ template<typename _Container>
+ class back_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _Container* container;
+
+ public:
+ /// A nested typedef for the type of whatever container you used.
+ typedef _Container container_type;
+
+ /// The only way to create this %iterator is with a container.
+ explicit
+ back_insert_iterator(_Container& __x) : container(&__x) { }
+
+ /**
+ * @param value An instance of whatever type
+ * container_type::const_reference is; presumably a
+ * reference-to-const T for container<T>.
+ * @return This %iterator, for chained operations.
+ *
+ * This kind of %iterator doesn't really have a "position" in the
+ * container (you can think of the position as being permanently at
+ * the end, if you like). Assigning a value to the %iterator will
+ * always append the value to the end of the container.
+ */
+ back_insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ container->push_back(__value);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ back_insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ container->push_back(std::move(__value));
+ return *this;
+ }
+#endif
+
+ /// Simply returns *this.
+ back_insert_iterator&
+ operator*()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ back_insert_iterator&
+ operator++()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ back_insert_iterator
+ operator++(int)
+ { return *this; }
+ };
+
+ /**
+ * @param x A container of arbitrary type.
+ * @return An instance of back_insert_iterator working on @p x.
+ *
+ * This wrapper function helps in creating back_insert_iterator instances.
+ * Typing the name of the %iterator requires knowing the precise full
+ * type of the container, which can be tedious and impedes generic
+ * programming. Using this function lets you take advantage of automatic
+ * template parameter deduction, making the compiler match the correct
+ * types for you.
+ */
+ template<typename _Container>
+ inline back_insert_iterator<_Container>
+ back_inserter(_Container& __x)
+ { return back_insert_iterator<_Container>(__x); }
+
+ /**
+ * @brief Turns assignment into insertion.
+ *
+ * These are output iterators, constructed from a container-of-T.
+ * Assigning a T to the iterator prepends it to the container using
+ * push_front.
+ *
+ * Tip: Using the front_inserter function to create these iterators can
+ * save typing.
+ */
+ template<typename _Container>
+ class front_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _Container* container;
+
+ public:
+ /// A nested typedef for the type of whatever container you used.
+ typedef _Container container_type;
+
+ /// The only way to create this %iterator is with a container.
+ explicit front_insert_iterator(_Container& __x) : container(&__x) { }
+
+ /**
+ * @param value An instance of whatever type
+ * container_type::const_reference is; presumably a
+ * reference-to-const T for container<T>.
+ * @return This %iterator, for chained operations.
+ *
+ * This kind of %iterator doesn't really have a "position" in the
+ * container (you can think of the position as being permanently at
+ * the front, if you like). Assigning a value to the %iterator will
+ * always prepend the value to the front of the container.
+ */
+ front_insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ container->push_front(__value);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ front_insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ container->push_front(std::move(__value));
+ return *this;
+ }
+#endif
+
+ /// Simply returns *this.
+ front_insert_iterator&
+ operator*()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ front_insert_iterator&
+ operator++()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ front_insert_iterator
+ operator++(int)
+ { return *this; }
+ };
+
+ /**
+ * @param x A container of arbitrary type.
+ * @return An instance of front_insert_iterator working on @p x.
+ *
+ * This wrapper function helps in creating front_insert_iterator instances.
+ * Typing the name of the %iterator requires knowing the precise full
+ * type of the container, which can be tedious and impedes generic
+ * programming. Using this function lets you take advantage of automatic
+ * template parameter deduction, making the compiler match the correct
+ * types for you.
+ */
+ template<typename _Container>
+ inline front_insert_iterator<_Container>
+ front_inserter(_Container& __x)
+ { return front_insert_iterator<_Container>(__x); }
+
+ /**
+ * @brief Turns assignment into insertion.
+ *
+ * These are output iterators, constructed from a container-of-T.
+ * Assigning a T to the iterator inserts it in the container at the
+ * %iterator's position, rather than overwriting the value at that
+ * position.
+ *
+ * (Sequences will actually insert a @e copy of the value before the
+ * %iterator's position.)
+ *
+ * Tip: Using the inserter function to create these iterators can
+ * save typing.
+ */
+ template<typename _Container>
+ class insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ /// A nested typedef for the type of whatever container you used.
+ typedef _Container container_type;
+
+ /**
+ * The only way to create this %iterator is with a container and an
+ * initial position (a normal %iterator into the container).
+ */
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
+ : container(&__x), iter(__i) {}
+
+ /**
+ * @param value An instance of whatever type
+ * container_type::const_reference is; presumably a
+ * reference-to-const T for container<T>.
+ * @return This %iterator, for chained operations.
+ *
+ * This kind of %iterator maintains its own position in the
+ * container. Assigning a value to the %iterator will insert the
+ * value into the container at the place before the %iterator.
+ *
+ * The position is maintained such that subsequent assignments will
+ * insert values immediately after one another. For example,
+ * @code
+ * // vector v contains A and Z
+ *
+ * insert_iterator i (v, ++v.begin());
+ * i = 1;
+ * i = 2;
+ * i = 3;
+ *
+ * // vector v contains A, 1, 2, 3, and Z
+ * @endcode
+ */
+ insert_iterator&
+ operator=(typename _Container::const_reference __value)
+ {
+ iter = container->insert(iter, __value);
+ ++iter;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ insert_iterator&
+ operator=(typename _Container::value_type&& __value)
+ {
+ iter = container->insert(iter, std::move(__value));
+ ++iter;
+ return *this;
+ }
+#endif
+
+ /// Simply returns *this.
+ insert_iterator&
+ operator*()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ insert_iterator&
+ operator++()
+ { return *this; }
+
+ /// Simply returns *this. (This %iterator does not "move".)
+ insert_iterator&
+ operator++(int)
+ { return *this; }
+ };
+
+ /**
+ * @param x A container of arbitrary type.
+ * @return An instance of insert_iterator working on @p x.
+ *
+ * This wrapper function helps in creating insert_iterator instances.
+ * Typing the name of the %iterator requires knowing the precise full
+ * type of the container, which can be tedious and impedes generic
+ * programming. Using this function lets you take advantage of automatic
+ * template parameter deduction, making the compiler match the correct
+ * types for you.
+ */
+ template<typename _Container, typename _Iterator>
+ inline insert_iterator<_Container>
+ inserter(_Container& __x, _Iterator __i)
+ {
+ return insert_iterator<_Container>(__x,
+ typename _Container::iterator(__i));
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // This iterator adapter is 'normal' in the sense that it does not
+ // change the semantics of any of the operators of its iterator
+ // parameter. Its primary purpose is to convert an iterator that is
+ // not a class, e.g. a pointer, into an iterator that is a class.
+ // The _Container parameter exists solely so that different containers
+ // using this template can instantiate different types, even if the
+ // _Iterator parameter is the same.
+ using std::iterator_traits;
+ using std::iterator;
+ template<typename _Iterator, typename _Container>
+ class __normal_iterator
+ {
+ protected:
+ _Iterator _M_current;
+
+ public:
+ typedef _Iterator iterator_type;
+ typedef typename iterator_traits<_Iterator>::iterator_category
+ iterator_category;
+ typedef typename iterator_traits<_Iterator>::value_type value_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
+ typedef typename iterator_traits<_Iterator>::reference reference;
+ typedef typename iterator_traits<_Iterator>::pointer pointer;
+
+ __normal_iterator() : _M_current(_Iterator()) { }
+
+ explicit
+ __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
+
+ // Allow iterator to const_iterator conversion
+ template<typename _Iter>
+ __normal_iterator(const __normal_iterator<_Iter,
+ typename __enable_if<
+ (std::__are_same<_Iter, typename _Container::pointer>::__value),
+ _Container>::__type>& __i)
+ : _M_current(__i.base()) { }
+
+ // Forward iterator requirements
+ reference
+ operator*() const
+ { return *_M_current; }
+
+ pointer
+ operator->() const
+ { return _M_current; }
+
+ __normal_iterator&
+ operator++()
+ {
+ ++_M_current;
+ return *this;
+ }
+
+ __normal_iterator
+ operator++(int)
+ { return __normal_iterator(_M_current++); }
+
+ // Bidirectional iterator requirements
+ __normal_iterator&
+ operator--()
+ {
+ --_M_current;
+ return *this;
+ }
+
+ __normal_iterator
+ operator--(int)
+ { return __normal_iterator(_M_current--); }
+
+ // Random access iterator requirements
+ reference
+ operator[](const difference_type& __n) const
+ { return _M_current[__n]; }
+
+ __normal_iterator&
+ operator+=(const difference_type& __n)
+ { _M_current += __n; return *this; }
+
+ __normal_iterator
+ operator+(const difference_type& __n) const
+ { return __normal_iterator(_M_current + __n); }
+
+ __normal_iterator&
+ operator-=(const difference_type& __n)
+ { _M_current -= __n; return *this; }
+
+ __normal_iterator
+ operator-(const difference_type& __n) const
+ { return __normal_iterator(_M_current - __n); }
+
+ const _Iterator&
+ base() const
+ { return _M_current; }
+ };
+
+ // Note: In what follows, the left- and right-hand-side iterators are
+ // allowed to vary in types (conceptually in cv-qualification) so that
+ // comparison between cv-qualified and non-cv-qualified iterators be
+ // valid. However, the greedy and unfriendly operators in std::rel_ops
+ // will make overload resolution ambiguous (when in scope) if we don't
+ // provide overloads whose operands are of the same type. Can someone
+ // remind me what generic programming is about? -- Gaby
+
+ // Forward iterator requirements
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() == __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() == __rhs.base(); }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() != __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() != __rhs.base(); }
+
+ // Random access iterator requirements
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() < __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() < __rhs.base(); }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() > __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() > __rhs.base(); }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() <= __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() <= __rhs.base(); }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+ inline bool
+ operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ { return __lhs.base() >= __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline bool
+ operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() >= __rhs.base(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // According to the resolution of DR179 not only the various comparison
+ // operators but also operator- must accept mixed iterator/const_iterator
+ // parameters.
+ template<typename _IteratorL, typename _IteratorR, typename _Container>
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // DR 685.
+ inline auto
+ operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+ -> decltype(__lhs.base() - __rhs.base())
+#else
+ inline typename __normal_iterator<_IteratorL, _Container>::difference_type
+ operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
+ const __normal_iterator<_IteratorR, _Container>& __rhs)
+#endif
+ { return __lhs.base() - __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline typename __normal_iterator<_Iterator, _Container>::difference_type
+ operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
+ const __normal_iterator<_Iterator, _Container>& __rhs)
+ { return __lhs.base() - __rhs.base(); }
+
+ template<typename _Iterator, typename _Container>
+ inline __normal_iterator<_Iterator, _Container>
+ operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
+ __n, const __normal_iterator<_Iterator, _Container>& __i)
+ { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 24.4.3 Move iterators
+ /**
+ * Class template move_iterator is an iterator adapter with the same
+ * behavior as the underlying iterator except that its dereference
+ * operator implicitly converts the value returned by the underlying
+ * iterator's dereference operator to an rvalue reference. Some
+ * generic algorithms can be called with move iterators to replace
+ * copying with moving.
+ */
+ template<typename _Iterator>
+ class move_iterator
+ {
+ protected:
+ _Iterator _M_current;
+
+ public:
+ typedef _Iterator iterator_type;
+ typedef typename iterator_traits<_Iterator>::difference_type
+ difference_type;
+ // NB: DR 680.
+ typedef _Iterator pointer;
+ typedef typename iterator_traits<_Iterator>::value_type value_type;
+ typedef typename iterator_traits<_Iterator>::iterator_category
+ iterator_category;
+ typedef value_type&& reference;
+
+ public:
+ move_iterator()
+ : _M_current() { }
+
+ explicit
+ move_iterator(iterator_type __i)
+ : _M_current(__i) { }
+
+ template<typename _Iter>
+ move_iterator(const move_iterator<_Iter>& __i)
+ : _M_current(__i.base()) { }
+
+ iterator_type
+ base() const
+ { return _M_current; }
+
+ reference
+ operator*() const
+ { return *_M_current; }
+
+ pointer
+ operator->() const
+ { return _M_current; }
+
+ move_iterator&
+ operator++()
+ {
+ ++_M_current;
+ return *this;
+ }
+
+ move_iterator
+ operator++(int)
+ {
+ move_iterator __tmp = *this;
+ ++_M_current;
+ return __tmp;
+ }
+
+ move_iterator&
+ operator--()
+ {
+ --_M_current;
+ return *this;
+ }
+
+ move_iterator
+ operator--(int)
+ {
+ move_iterator __tmp = *this;
+ --_M_current;
+ return __tmp;
+ }
+
+ move_iterator
+ operator+(difference_type __n) const
+ { return move_iterator(_M_current + __n); }
+
+ move_iterator&
+ operator+=(difference_type __n)
+ {
+ _M_current += __n;
+ return *this;
+ }
+
+ move_iterator
+ operator-(difference_type __n) const
+ { return move_iterator(_M_current - __n); }
+
+ move_iterator&
+ operator-=(difference_type __n)
+ {
+ _M_current -= __n;
+ return *this;
+ }
+
+ reference
+ operator[](difference_type __n) const
+ { return _M_current[__n]; }
+ };
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator==(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __x.base() == __y.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator!=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__x == __y); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __x.base() < __y.base(); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator<=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__y < __x); }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return __y < __x; }
+
+ template<typename _IteratorL, typename _IteratorR>
+ inline bool
+ operator>=(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ { return !(__x < __y); }
+
+ // DR 685.
+ template<typename _IteratorL, typename _IteratorR>
+ inline auto
+ operator-(const move_iterator<_IteratorL>& __x,
+ const move_iterator<_IteratorR>& __y)
+ -> decltype(__x.base() - __y.base())
+ { return __x.base() - __y.base(); }
+
+ template<typename _Iterator>
+ inline move_iterator<_Iterator>
+ operator+(typename move_iterator<_Iterator>::difference_type __n,
+ const move_iterator<_Iterator>& __x)
+ { return __x + __n; }
+
+ template<typename _Iterator>
+ inline move_iterator<_Iterator>
+ make_move_iterator(const _Iterator& __i)
+ { return move_iterator<_Iterator>(__i); }
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
+#else
+#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_funcs.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_funcs.h
new file mode 100644
index 0000000..0a854fa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_funcs.h
@@ -0,0 +1,197 @@
+// Functions used by iterators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file stl_iterator_base_funcs.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ *
+ * This file contains all of the general iterator-related utility
+ * functions, such as distance() and advance().
+ */
+
+#ifndef _STL_ITERATOR_BASE_FUNCS_H
+#define _STL_ITERATOR_BASE_FUNCS_H 1
+
+#pragma GCC system_header
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _InputIterator>
+ inline typename iterator_traits<_InputIterator>::difference_type
+ __distance(_InputIterator __first, _InputIterator __last,
+ input_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+
+ typename iterator_traits<_InputIterator>::difference_type __n = 0;
+ while (__first != __last)
+ {
+ ++__first;
+ ++__n;
+ }
+ return __n;
+ }
+
+ template<typename _RandomAccessIterator>
+ inline typename iterator_traits<_RandomAccessIterator>::difference_type
+ __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ random_access_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ return __last - __first;
+ }
+
+ /**
+ * @brief A generalization of pointer arithmetic.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @return The distance between them.
+ *
+ * Returns @c n such that first + n == last. This requires that @p last
+ * must be reachable from @p first. Note that @c n may be negative.
+ *
+ * For random access iterators, this uses their @c + and @c - operations
+ * and are constant time. For other %iterator classes they are linear time.
+ */
+ template<typename _InputIterator>
+ inline typename iterator_traits<_InputIterator>::difference_type
+ distance(_InputIterator __first, _InputIterator __last)
+ {
+ // concept requirements -- taken care of in __distance
+ return std::__distance(__first, __last,
+ std::__iterator_category(__first));
+ }
+
+ template<typename _InputIterator, typename _Distance>
+ inline void
+ __advance(_InputIterator& __i, _Distance __n, input_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ while (__n--)
+ ++__i;
+ }
+
+ template<typename _BidirectionalIterator, typename _Distance>
+ inline void
+ __advance(_BidirectionalIterator& __i, _Distance __n,
+ bidirectional_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_BidirectionalIteratorConcept<
+ _BidirectionalIterator>)
+ if (__n > 0)
+ while (__n--)
+ ++__i;
+ else
+ while (__n++)
+ --__i;
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance>
+ inline void
+ __advance(_RandomAccessIterator& __i, _Distance __n,
+ random_access_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __i += __n;
+ }
+
+ /**
+ * @brief A generalization of pointer arithmetic.
+ * @param i An input iterator.
+ * @param n The "delta" by which to change @p i.
+ * @return Nothing.
+ *
+ * This increments @p i by @p n. For bidirectional and random access
+ * iterators, @p n may be negative, in which case @p i is decremented.
+ *
+ * For random access iterators, this uses their @c + and @c - operations
+ * and are constant time. For other %iterator classes they are linear time.
+ */
+ template<typename _InputIterator, typename _Distance>
+ inline void
+ advance(_InputIterator& __i, _Distance __n)
+ {
+ // concept requirements -- taken care of in __advance
+ typename iterator_traits<_InputIterator>::difference_type __d = __n;
+ std::__advance(__i, __d, std::__iterator_category(__i));
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _InputIterator>
+ inline _InputIterator
+ next(_InputIterator __x, typename
+ iterator_traits<_InputIterator>::difference_type __n = 1)
+ {
+ std::advance(__x, __n);
+ return __x;
+ }
+
+ template<typename _BidirectionalIterator>
+ inline _BidirectionalIterator
+ prev(_BidirectionalIterator __x, typename
+ iterator_traits<_BidirectionalIterator>::difference_type __n = 1)
+ {
+ std::advance(__x, -__n);
+ return __x;
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_ITERATOR_BASE_FUNCS_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_types.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_types.h
new file mode 100644
index 0000000..6dc0d78
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_iterator_base_types.h
@@ -0,0 +1,168 @@
+// Types used in iterator implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file stl_iterator_base_types.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ *
+ * This file contains all of the general iterator-related utility types,
+ * such as iterator_traits and struct iterator.
+ */
+
+#ifndef _STL_ITERATOR_BASE_TYPES_H
+#define _STL_ITERATOR_BASE_TYPES_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @defgroup iterators Iterators
+ * These are empty types, used to distinguish different iterators. The
+ * distinction is not made by what they contain, but simply by what they
+ * are. Different underlying algorithms can then be used based on the
+ * different operations supported by different iterator types.
+ */
+ //@{
+ /// Marking input iterators.
+ struct input_iterator_tag { };
+ /// Marking output iterators.
+ struct output_iterator_tag { };
+ /// Forward iterators support a superset of input iterator operations.
+ struct forward_iterator_tag : public input_iterator_tag { };
+ /// Bidirectional iterators support a superset of forward iterator
+ /// operations.
+ struct bidirectional_iterator_tag : public forward_iterator_tag { };
+ /// Random-access iterators support a superset of bidirectional iterator
+ /// operations.
+ struct random_access_iterator_tag : public bidirectional_iterator_tag { };
+
+
+ /**
+ * @brief Common %iterator class.
+ *
+ * This class does nothing but define nested typedefs. %Iterator classes
+ * can inherit from this class to save some work. The typedefs are then
+ * used in specializations and overloading.
+ *
+ * In particular, there are no default implementations of requirements
+ * such as @c operator++ and the like. (How could there be?)
+ */
+ template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
+ typename _Pointer = _Tp*, typename _Reference = _Tp&>
+ struct iterator
+ {
+ /// One of the @link iterator_tags tag types@endlink.
+ typedef _Category iterator_category;
+ /// The type "pointed to" by the iterator.
+ typedef _Tp value_type;
+ /// Distance between iterators is represented as this type.
+ typedef _Distance difference_type;
+ /// This type represents a pointer-to-value_type.
+ typedef _Pointer pointer;
+ /// This type represents a reference-to-value_type.
+ typedef _Reference reference;
+ };
+
+ /**
+ * This class does nothing but define nested typedefs. The general
+ * version simply "forwards" the nested typedefs from the Iterator
+ * argument. Specialized versions for pointers and pointers-to-const
+ * provide tighter, more correct semantics.
+ */
+ template<typename _Iterator>
+ struct iterator_traits
+ {
+ typedef typename _Iterator::iterator_category iterator_category;
+ typedef typename _Iterator::value_type value_type;
+ typedef typename _Iterator::difference_type difference_type;
+ typedef typename _Iterator::pointer pointer;
+ typedef typename _Iterator::reference reference;
+ };
+
+ template<typename _Tp>
+ struct iterator_traits<_Tp*>
+ {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+ };
+
+ template<typename _Tp>
+ struct iterator_traits<const _Tp*>
+ {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+ };
+
+ /**
+ * This function is not a part of the C++ standard but is syntactic
+ * sugar for internal library use only.
+ */
+ template<typename _Iter>
+ inline typename iterator_traits<_Iter>::iterator_category
+ __iterator_category(const _Iter&)
+ { return typename iterator_traits<_Iter>::iterator_category(); }
+
+ //@}
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_ITERATOR_BASE_TYPES_H */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_list.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_list.h
new file mode 100644
index 0000000..66a50b8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_list.h
@@ -0,0 +1,1533 @@
+// List implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_list.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_LIST_H
+#define _STL_LIST_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ // Supporting structures are split into common and templated types; the
+ // latter publicly inherits from the former in an effort to reduce code
+ // duplication. This results in some "needless" static_cast'ing later on,
+ // but it's all safe downcasting.
+
+ /// Common part of a node in the %list.
+ struct _List_node_base
+ {
+ _List_node_base* _M_next;
+ _List_node_base* _M_prev;
+
+ static void
+ swap(_List_node_base& __x, _List_node_base& __y);
+
+ void
+ transfer(_List_node_base * const __first,
+ _List_node_base * const __last);
+
+ void
+ reverse();
+
+ void
+ hook(_List_node_base * const __position);
+
+ void
+ unhook();
+ };
+
+ /// An actual node in the %list.
+ template<typename _Tp>
+ struct _List_node : public _List_node_base
+ {
+ ///< User's data.
+ _Tp _M_data;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ _List_node(_Args&&... __args)
+ : _List_node_base(), _M_data(std::forward<_Args>(__args)...) { }
+#endif
+ };
+
+ /**
+ * @brief A list::iterator.
+ *
+ * All the functions are op overloads.
+ */
+ template<typename _Tp>
+ struct _List_iterator
+ {
+ typedef _List_iterator<_Tp> _Self;
+ typedef _List_node<_Tp> _Node;
+
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+
+ _List_iterator()
+ : _M_node() { }
+
+ explicit
+ _List_iterator(_List_node_base* __x)
+ : _M_node(__x) { }
+
+ // Must downcast from List_node_base to _List_node to get to _M_data.
+ reference
+ operator*() const
+ { return static_cast<_Node*>(_M_node)->_M_data; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _M_node->_M_prev;
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_prev;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ // The only member points to the %list element.
+ _List_node_base* _M_node;
+ };
+
+ /**
+ * @brief A list::const_iterator.
+ *
+ * All the functions are op overloads.
+ */
+ template<typename _Tp>
+ struct _List_const_iterator
+ {
+ typedef _List_const_iterator<_Tp> _Self;
+ typedef const _List_node<_Tp> _Node;
+ typedef _List_iterator<_Tp> iterator;
+
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+
+ _List_const_iterator()
+ : _M_node() { }
+
+ explicit
+ _List_const_iterator(const _List_node_base* __x)
+ : _M_node(__x) { }
+
+ _List_const_iterator(const iterator& __x)
+ : _M_node(__x._M_node) { }
+
+ // Must downcast from List_node_base to _List_node to get to
+ // _M_data.
+ reference
+ operator*() const
+ { return static_cast<_Node*>(_M_node)->_M_data; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Node*>(_M_node)->_M_data; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _M_node->_M_next;
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_next;
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _M_node->_M_prev;
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _M_node->_M_prev;
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ // The only member points to the %list element.
+ const _List_node_base* _M_node;
+ };
+
+ template<typename _Val>
+ inline bool
+ operator==(const _List_iterator<_Val>& __x,
+ const _List_const_iterator<_Val>& __y)
+ { return __x._M_node == __y._M_node; }
+
+ template<typename _Val>
+ inline bool
+ operator!=(const _List_iterator<_Val>& __x,
+ const _List_const_iterator<_Val>& __y)
+ { return __x._M_node != __y._M_node; }
+
+
+ /// See bits/stl_deque.h's _Deque_base for an explanation.
+ template<typename _Tp, typename _Alloc>
+ class _List_base
+ {
+ protected:
+ // NOTA BENE
+ // The stored instance is not actually of "allocator_type"'s
+ // type. Instead we rebind the type to
+ // Allocator<List_node<Tp>>, which according to [20.1.5]/4
+ // should probably be the same. List_node<Tp> is not the same
+ // size as Tp (it's two pointers larger), and specializations on
+ // Tp may go unused because List_node<Tp> is being bound
+ // instead.
+ //
+ // We put this to the test in the constructors and in
+ // get_allocator, where we use conversions between
+ // allocator_type and _Node_alloc_type. The conversion is
+ // required by table 32 in [20.1.5].
+ typedef typename _Alloc::template rebind<_List_node<_Tp> >::other
+ _Node_alloc_type;
+
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+ struct _List_impl
+ : public _Node_alloc_type
+ {
+ _List_node_base _M_node;
+
+ _List_impl()
+ : _Node_alloc_type(), _M_node()
+ { }
+
+ _List_impl(const _Node_alloc_type& __a)
+ : _Node_alloc_type(__a), _M_node()
+ { }
+ };
+
+ _List_impl _M_impl;
+
+ _List_node<_Tp>*
+ _M_get_node()
+ { return _M_impl._Node_alloc_type::allocate(1); }
+
+ void
+ _M_put_node(_List_node<_Tp>* __p)
+ { _M_impl._Node_alloc_type::deallocate(__p, 1); }
+
+ public:
+ typedef _Alloc allocator_type;
+
+ _Node_alloc_type&
+ _M_get_Node_allocator()
+ { return *static_cast<_Node_alloc_type*>(&this->_M_impl); }
+
+ const _Node_alloc_type&
+ _M_get_Node_allocator() const
+ { return *static_cast<const _Node_alloc_type*>(&this->_M_impl); }
+
+ _Tp_alloc_type
+ _M_get_Tp_allocator() const
+ { return _Tp_alloc_type(_M_get_Node_allocator()); }
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Node_allocator()); }
+
+ _List_base()
+ : _M_impl()
+ { _M_init(); }
+
+ _List_base(const allocator_type& __a)
+ : _M_impl(__a)
+ { _M_init(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _List_base(_List_base&& __x)
+ : _M_impl(__x._M_get_Node_allocator())
+ {
+ _M_init();
+ _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
+ }
+#endif
+
+ // This is what actually destroys the list.
+ ~_List_base()
+ { _M_clear(); }
+
+ void
+ _M_clear();
+
+ void
+ _M_init()
+ {
+ this->_M_impl._M_node._M_next = &this->_M_impl._M_node;
+ this->_M_impl._M_node._M_prev = &this->_M_impl._M_node;
+ }
+ };
+
+ /**
+ * @brief A standard container with linear time access to elements,
+ * and fixed time insertion/deletion at any point in the sequence.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and a
+ * <a href="tables.html#67">sequence</a>, including the
+ * <a href="tables.html#68">optional sequence requirements</a> with the
+ * %exception of @c at and @c operator[].
+ *
+ * This is a @e doubly @e linked %list. Traversal up and down the
+ * %list requires linear time, but adding and removing elements (or
+ * @e nodes) is done in constant time, regardless of where the
+ * change takes place. Unlike std::vector and std::deque,
+ * random-access iterators are not provided, so subscripting ( @c
+ * [] ) access is not allowed. For algorithms which only need
+ * sequential access, this lack makes no difference.
+ *
+ * Also unlike the other standard containers, std::list provides
+ * specialized algorithms %unique to linked lists, such as
+ * splicing, sorting, and in-place reversal.
+ *
+ * A couple points on memory allocation for list<Tp>:
+ *
+ * First, we never actually allocate a Tp, we allocate
+ * List_node<Tp>'s and trust [20.1.5]/4 to DTRT. This is to ensure
+ * that after elements from %list<X,Alloc1> are spliced into
+ * %list<X,Alloc2>, destroying the memory of the second %list is a
+ * valid operation, i.e., Alloc1 giveth and Alloc2 taketh away.
+ *
+ * Second, a %list conceptually represented as
+ * @code
+ * A <---> B <---> C <---> D
+ * @endcode
+ * is actually circular; a link exists between A and D. The %list
+ * class holds (as its only data member) a private list::iterator
+ * pointing to @e D, not to @e A! To get to the head of the %list,
+ * we start at the tail and move forward by one. When this member
+ * iterator's next/previous pointers refer to itself, the %list is
+ * %empty.
+ */
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ class list : protected _List_base<_Tp, _Alloc>
+ {
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
+
+ typedef _List_base<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+
+ public:
+ typedef _Tp value_type;
+ typedef typename _Tp_alloc_type::pointer pointer;
+ typedef typename _Tp_alloc_type::const_pointer const_pointer;
+ typedef typename _Tp_alloc_type::reference reference;
+ typedef typename _Tp_alloc_type::const_reference const_reference;
+ typedef _List_iterator<_Tp> iterator;
+ typedef _List_const_iterator<_Tp> const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Alloc allocator_type;
+
+ protected:
+ // Note that pointers-to-_Node's can be ctor-converted to
+ // iterator types.
+ typedef _List_node<_Tp> _Node;
+
+ using _Base::_M_impl;
+ using _Base::_M_put_node;
+ using _Base::_M_get_node;
+ using _Base::_M_get_Tp_allocator;
+ using _Base::_M_get_Node_allocator;
+
+ /**
+ * @param x An instance of user data.
+ *
+ * Allocates space for a new node and constructs a copy of @a x in it.
+ */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ _Node*
+ _M_create_node(const value_type& __x)
+ {
+ _Node* __p = this->_M_get_node();
+ __try
+ {
+ _M_get_Tp_allocator().construct(&__p->_M_data, __x);
+ }
+ __catch(...)
+ {
+ _M_put_node(__p);
+ __throw_exception_again;
+ }
+ return __p;
+ }
+#else
+ template<typename... _Args>
+ _Node*
+ _M_create_node(_Args&&... __args)
+ {
+ _Node* __p = this->_M_get_node();
+ __try
+ {
+ _M_get_Node_allocator().construct(__p,
+ std::forward<_Args>(__args)...);
+ }
+ __catch(...)
+ {
+ _M_put_node(__p);
+ __throw_exception_again;
+ }
+ return __p;
+ }
+#endif
+
+ public:
+ // [23.2.2.1] construct/copy/destroy
+ // (assign() and get_allocator() are also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ list()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %list with no elements.
+ * @param a An allocator object.
+ */
+ explicit
+ list(const allocator_type& __a)
+ : _Base(__a) { }
+
+ /**
+ * @brief Creates a %list with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ * @param a An allocator object.
+ *
+ * This constructor fills the %list with @a n copies of @a value.
+ */
+ explicit
+ list(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { _M_fill_initialize(__n, __value); }
+
+ /**
+ * @brief %List copy constructor.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The newly-created %list uses a copy of the allocation object used
+ * by @a x.
+ */
+ list(const list& __x)
+ : _Base(__x._M_get_Node_allocator())
+ { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %List move constructor.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The newly-created %list contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %list.
+ */
+ list(list&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ /**
+ * @brief Builds a %list from an initializer_list
+ * @param l An initializer_list of value_type.
+ * @param a An allocator object.
+ *
+ * Create a %list consisting of copies of the elements in the
+ * initializer_list @a l. This is linear in l.size().
+ */
+ list(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); }
+#endif
+
+ /**
+ * @brief Builds a %list from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param a An allocator object.
+ *
+ * Create a %list consisting of copies of the elements from
+ * [@a first,@a last). This is linear in N (where N is
+ * distance(@a first,@a last)).
+ */
+ template<typename _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ /**
+ * No explicit dtor needed as the _Base dtor takes care of
+ * things. The _Base dtor only erases the elements, and note
+ * that if the elements themselves are pointers, the pointed-to
+ * memory is not touched in any way. Managing the pointer is
+ * the user's responsibility.
+ */
+
+ /**
+ * @brief %List assignment operator.
+ * @param x A %list of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy
+ * constructor, the allocator object is not copied.
+ */
+ list&
+ operator=(const list& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %List move assignment operator.
+ * @param x A %list of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %list (without copying).
+ * @a x is a valid, but unspecified %list
+ */
+ list&
+ operator=(list&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %List initializer list assignment operator.
+ * @param l An initializer_list of value_type.
+ *
+ * Replace the contents of the %list with copies of the elements
+ * in the initializer_list @a l. This is linear in l.size().
+ */
+ list&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->assign(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /**
+ * @brief Assigns a given value to a %list.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %list with @a n copies of the given
+ * value. Note that the assignment completely changes the %list
+ * and that the resulting %list's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+
+ /**
+ * @brief Assigns a range to a %list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %list with copies of the elements in the
+ * range [@a first,@a last).
+ *
+ * Note that the assignment completely changes the %list and
+ * that the resulting %list's size is the same as the number of
+ * elements assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Assigns an initializer_list to a %list.
+ * @param l An initializer_list of value_type.
+ *
+ * Replace the contents of the %list with copies of the elements
+ * in the initializer_list @a l. This is linear in l.size().
+ */
+ void
+ assign(initializer_list<value_type> __l)
+ { this->assign(__l.begin(), __l.end()); }
+#endif
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first element in the
+ * %list. Iteration is done in ordinary element order.
+ */
+ iterator
+ begin()
+ { return iterator(this->_M_impl._M_node._M_next); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_impl._M_node._M_next); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * element in the %list. Iteration is done in ordinary element
+ * order.
+ */
+ iterator
+ end()
+ { return iterator(&this->_M_impl._M_node); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ end() const
+ { return const_iterator(&this->_M_impl._M_node); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last
+ * element in the %list. Iteration is done in reverse element
+ * order.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to
+ * the last element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in
+ * reverse element order.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_impl._M_node._M_next); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %list. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(&this->_M_impl._M_node); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to
+ * the last element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first element in the %list. Iteration is done in reverse
+ * element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // [23.2.2.2] capacity
+ /**
+ * Returns true if the %list is empty. (Thus begin() would equal
+ * end().)
+ */
+ bool
+ empty() const
+ { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; }
+
+ /** Returns the number of elements in the %list. */
+ size_type
+ size() const
+ { return std::distance(begin(), end()); }
+
+ /** Returns the size() of the largest possible %list. */
+ size_type
+ max_size() const
+ { return _M_get_Node_allocator().max_size(); }
+
+ /**
+ * @brief Resizes the %list to the specified number of elements.
+ * @param new_size Number of elements the %list should contain.
+ * @param x Data with which new elements should be populated.
+ *
+ * This function will %resize the %list to the specified number
+ * of elements. If the number is smaller than the %list's
+ * current size the %list is truncated, otherwise the %list is
+ * extended and new elements are populated with given data.
+ */
+ void
+ resize(size_type __new_size, value_type __x = value_type());
+
+ // element access
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %list.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %list.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last element
+ * of the %list.
+ */
+ reference
+ back()
+ {
+ iterator __tmp = end();
+ --__tmp;
+ return *__tmp;
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %list.
+ */
+ const_reference
+ back() const
+ {
+ const_iterator __tmp = end();
+ --__tmp;
+ return *__tmp;
+ }
+
+ // [23.2.2.3] modifiers
+ /**
+ * @brief Add data to the front of the %list.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the front of the %list and assigns the given data
+ * to it. Due to the nature of a %list this operation can be
+ * done in constant time, and does not invalidate iterators and
+ * references.
+ */
+ void
+ push_front(const value_type& __x)
+ { this->_M_insert(begin(), __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_front(value_type&& __x)
+ { this->_M_insert(begin(), std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_front(_Args&&... __args)
+ { this->_M_insert(begin(), std::forward<_Args>(__args)...); }
+#endif
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical stack operation. It shrinks the %list by
+ * one. Due to the nature of a %list this operation can be done
+ * in constant time, and only invalidates iterators/references to
+ * the element being removed.
+ *
+ * Note that no data is returned, and if the first element's data
+ * is needed, it should be retrieved before pop_front() is
+ * called.
+ */
+ void
+ pop_front()
+ { this->_M_erase(begin()); }
+
+ /**
+ * @brief Add data to the end of the %list.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the end of the %list and assigns the given data to
+ * it. Due to the nature of a %list this operation can be done
+ * in constant time, and does not invalidate iterators and
+ * references.
+ */
+ void
+ push_back(const value_type& __x)
+ { this->_M_insert(end(), __x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_back(value_type&& __x)
+ { this->_M_insert(end(), std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args)
+ { this->_M_insert(end(), std::forward<_Args>(__args)...); }
+#endif
+
+ /**
+ * @brief Removes last element.
+ *
+ * This is a typical stack operation. It shrinks the %list by
+ * one. Due to the nature of a %list this operation can be done
+ * in constant time, and only invalidates iterators/references to
+ * the element being removed.
+ *
+ * Note that no data is returned, and if the last element's data
+ * is needed, it should be retrieved before pop_back() is called.
+ */
+ void
+ pop_back()
+ { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Constructs object in %list before specified iterator.
+ * @param position A const_iterator into the %list.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified
+ * location. Due to the nature of a %list this operation can
+ * be done in constant time, and does not invalidate iterators
+ * and references.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
+ /**
+ * @brief Inserts given value into %list before specified iterator.
+ * @param position An iterator into the %list.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value before
+ * the specified location. Due to the nature of a %list this
+ * operation can be done in constant time, and does not
+ * invalidate iterators and references.
+ */
+ iterator
+ insert(iterator __position, const value_type& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %list before specified iterator.
+ * @param position An iterator into the %list.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before
+ * the specified location. Due to the nature of a %list this
+ * operation can be done in constant time, and does not
+ * invalidate iterators and references.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ /**
+ * @brief Inserts the contents of an initializer_list into %list
+ * before specified iterator.
+ * @param p An iterator into the %list.
+ * @param l An initializer_list of value_type.
+ *
+ * This function will insert copies of the data in the
+ * initializer_list @a l into the %list before the location
+ * specified by @a p.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ { this->insert(__p, __l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Inserts a number of copies of given data into the %list.
+ * @param position An iterator into the %list.
+ * @param n Number of elements to be inserted.
+ * @param x Data to be inserted.
+ *
+ * This function will insert a specified number of copies of the
+ * given data before the location specified by @a position.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ {
+ list __tmp(__n, __x, _M_get_Node_allocator());
+ splice(__position, __tmp);
+ }
+
+ /**
+ * @brief Inserts a range into the %list.
+ * @param position An iterator into the %list.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range [@a
+ * first,@a last) into the %list before the location specified by
+ * @a position.
+ *
+ * This operation is linear in the number of elements inserted and
+ * does not invalidate iterators and references.
+ */
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ list __tmp(__first, __last, _M_get_Node_allocator());
+ splice(__position, __tmp);
+ }
+
+ /**
+ * @brief Remove element at given position.
+ * @param position Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and thus
+ * shorten the %list by one.
+ *
+ * Due to the nature of a %list this operation can be done in
+ * constant time, and only invalidates iterators/references to
+ * the element being removed. The user is also cautioned that
+ * this function only erases the element, and that if the element
+ * is itself a pointer, the pointed-to memory is not touched in
+ * any way. Managing the pointer is the user's responsibility.
+ */
+ iterator
+ erase(iterator __position);
+
+ /**
+ * @brief Remove a range of elements.
+ * @param first Iterator pointing to the first element to be erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range @a
+ * [first,last) and shorten the %list accordingly.
+ *
+ * This operation is linear time in the size of the range and only
+ * invalidates iterators/references to the element being removed.
+ * The user is also cautioned that this function only erases the
+ * elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibility.
+ */
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ while (__first != __last)
+ __first = erase(__first);
+ return __last;
+ }
+
+ /**
+ * @brief Swaps data with another %list.
+ * @param x A %list of the same element and allocator types.
+ *
+ * This exchanges the elements between two lists in constant
+ * time. Note that the global std::swap() function is
+ * specialized such that std::swap(l1,l2) will feed to this
+ * function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(list&& __x)
+#else
+ swap(list& __x)
+#endif
+ {
+ _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<typename _Base::_Node_alloc_type>::
+ _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator());
+ }
+
+ /**
+ * Erases all the elements. Note that this function only erases
+ * the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ void
+ clear()
+ {
+ _Base::_M_clear();
+ _Base::_M_init();
+ }
+
+ // [23.2.2.4] list operations
+ /**
+ * @brief Insert contents of another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ *
+ * The elements of @a x are inserted in constant time in front of
+ * the element referenced by @a position. @a x becomes an empty
+ * list.
+ *
+ * Requires this != @a x.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x)
+#else
+ splice(iterator __position, list& __x)
+#endif
+ {
+ if (!__x.empty())
+ {
+ _M_check_equal_allocators(__x);
+
+ this->_M_transfer(__position, __x.begin(), __x.end());
+ }
+ }
+
+ /**
+ * @brief Insert element from another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ * @param i Iterator referencing the element to move.
+ *
+ * Removes the element in list @a x referenced by @a i and
+ * inserts it into the current list before @a position.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __i)
+#else
+ splice(iterator __position, list& __x, iterator __i)
+#endif
+ {
+ iterator __j = __i;
+ ++__j;
+ if (__position == __i || __position == __j)
+ return;
+
+ if (this != &__x)
+ _M_check_equal_allocators(__x);
+
+ this->_M_transfer(__position, __i, __j);
+ }
+
+ /**
+ * @brief Insert range from another %list.
+ * @param position Iterator referencing the element to insert before.
+ * @param x Source list.
+ * @param first Iterator referencing the start of range in x.
+ * @param last Iterator referencing the end of range in x.
+ *
+ * Removes elements in the range [first,last) and inserts them
+ * before @a position in constant time.
+ *
+ * Undefined if @a position is in [first,last).
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __first,
+ iterator __last)
+#else
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+#endif
+ {
+ if (__first != __last)
+ {
+ if (this != &__x)
+ _M_check_equal_allocators(__x);
+
+ this->_M_transfer(__position, __first, __last);
+ }
+ }
+
+ /**
+ * @brief Remove all elements equal to value.
+ * @param value The value to remove.
+ *
+ * Removes every element in the list equal to @a value.
+ * Remaining elements stay in list order. Note that this
+ * function only erases the elements, and that if the elements
+ * themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ void
+ remove(const _Tp& __value);
+
+ /**
+ * @brief Remove all elements satisfying a predicate.
+ * @param Predicate Unary predicate function or object.
+ *
+ * Removes every element in the list for which the predicate
+ * returns true. Remaining elements stay in list order. Note
+ * that this function only erases the elements, and that if the
+ * elements themselves are pointers, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ template<typename _Predicate>
+ void
+ remove_if(_Predicate);
+
+ /**
+ * @brief Remove consecutive duplicate elements.
+ *
+ * For each consecutive set of elements with the same value,
+ * remove all but the first one. Remaining elements stay in
+ * list order. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing
+ * the pointer is the user's responsibility.
+ */
+ void
+ unique();
+
+ /**
+ * @brief Remove consecutive elements satisfying a predicate.
+ * @param BinaryPredicate Binary predicate function or object.
+ *
+ * For each consecutive set of elements [first,last) that
+ * satisfy predicate(first,i) where i is an iterator in
+ * [first,last), remove all but the first one. Remaining
+ * elements stay in list order. Note that this function only
+ * erases the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ template<typename _BinaryPredicate>
+ void
+ unique(_BinaryPredicate);
+
+ /**
+ * @brief Merge sorted lists.
+ * @param x Sorted list to merge.
+ *
+ * Assumes that both @a x and this list are sorted according to
+ * operator<(). Merges elements of @a x into this list in
+ * sorted order, leaving @a x empty when complete. Elements in
+ * this list precede elements in @a x that are equal.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x);
+#else
+ merge(list& __x);
+#endif
+
+ /**
+ * @brief Merge sorted lists according to comparison function.
+ * @param x Sorted list to merge.
+ * @param StrictWeakOrdering Comparison function defining
+ * sort order.
+ *
+ * Assumes that both @a x and this list are sorted according to
+ * StrictWeakOrdering. Merges elements of @a x into this list
+ * in sorted order, leaving @a x empty when complete. Elements
+ * in this list precede elements in @a x that are equivalent
+ * according to StrictWeakOrdering().
+ */
+ template<typename _StrictWeakOrdering>
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&&, _StrictWeakOrdering);
+#else
+ merge(list&, _StrictWeakOrdering);
+#endif
+
+ /**
+ * @brief Reverse the elements in list.
+ *
+ * Reverse the order of elements in the list in linear time.
+ */
+ void
+ reverse()
+ { this->_M_impl._M_node.reverse(); }
+
+ /**
+ * @brief Sort the elements.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
+ void
+ sort();
+
+ /**
+ * @brief Sort the elements according to comparison function.
+ *
+ * Sorts the elements of this list in NlogN time. Equivalent
+ * elements remain in list order.
+ */
+ template<typename _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering);
+
+ protected:
+ // Internal constructor functions follow.
+
+ // Called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+ { _M_fill_initialize(static_cast<size_type>(__n), __x); }
+
+ // Called by the range constructor to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ for (; __first != __last; ++__first)
+ push_back(*__first);
+ }
+
+ // Called by list(n,v,a), and the range constructor when it turns out
+ // to be the same thing.
+ void
+ _M_fill_initialize(size_type __n, const value_type& __x)
+ {
+ for (; __n > 0; --__n)
+ push_back(__x);
+ }
+
+
+ // Internal assign functions follow.
+
+ // Called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ { _M_fill_assign(__n, __val); }
+
+ // Called by the range assign to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type);
+
+ // Called by assign(n,t), and the range assign when it turns out
+ // to be the same thing.
+ void
+ _M_fill_assign(size_type __n, const value_type& __val);
+
+
+ // Moves the elements from [first,last) before position.
+ void
+ _M_transfer(iterator __position, iterator __first, iterator __last)
+ { __position._M_node->transfer(__first._M_node, __last._M_node); }
+
+ // Inserts new element at position given and with value given.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ _M_insert(iterator __position, const value_type& __x)
+ {
+ _Node* __tmp = _M_create_node(__x);
+ __tmp->hook(__position._M_node);
+ }
+#else
+ template<typename... _Args>
+ void
+ _M_insert(iterator __position, _Args&&... __args)
+ {
+ _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
+ __tmp->hook(__position._M_node);
+ }
+#endif
+
+ // Erases element at position given.
+ void
+ _M_erase(iterator __position)
+ {
+ __position._M_node->unhook();
+ _Node* __n = static_cast<_Node*>(__position._M_node);
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _M_get_Node_allocator().destroy(__n);
+#else
+ _M_get_Tp_allocator().destroy(&__n->_M_data);
+#endif
+ _M_put_node(__n);
+ }
+
+ // To implement the splice (and merge) bits of N1599.
+ void
+ _M_check_equal_allocators(list& __x)
+ {
+ if (std::__alloc_neq<typename _Base::_Node_alloc_type>::
+ _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()))
+ __throw_runtime_error(__N("list::_M_check_equal_allocators"));
+ }
+ };
+
+ /**
+ * @brief List equality comparison.
+ * @param x A %list.
+ * @param y A %list of the same type as @a x.
+ * @return True iff the size and elements of the lists are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of
+ * the lists. Lists are considered equivalent if their sizes are
+ * equal, and if corresponding elements compare equal.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ {
+ typedef typename list<_Tp, _Alloc>::const_iterator const_iterator;
+ const_iterator __end1 = __x.end();
+ const_iterator __end2 = __y.end();
+
+ const_iterator __i1 = __x.begin();
+ const_iterator __i2 = __y.begin();
+ while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
+ {
+ ++__i1;
+ ++__i2;
+ }
+ return __i1 == __end1 && __i2 == __end2;
+ }
+
+ /**
+ * @brief List ordering relation.
+ * @param x A %list.
+ * @param y A %list of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * lists. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ { return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()); }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::list::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>&& __x, list<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_LIST_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_map.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_map.h
new file mode 100644
index 0000000..90e5239
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_map.h
@@ -0,0 +1,871 @@
+// Map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_map.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MAP_H
+#define _STL_MAP_H 1
+
+#include <bits/functexcept.h>
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief A standard container made up of (key,value) pairs, which can be
+ * retrieved based on a key, in logarithmic time.
+ *
+ * @ingroup associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using unique keys).
+ * For a @c map<Key,T> the key_type is Key, the mapped_type is T, and the
+ * value_type is std::pair<const Key,T>.
+ *
+ * Maps support bidirectional iterators.
+ *
+ * The private tree data is declared exactly the same way for map and
+ * multimap; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ */
+ template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+ class map
+ {
+ public:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Alloc allocator_type;
+
+ private:
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+ __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
+
+ public:
+ class value_compare
+ : public std::binary_function<value_type, value_type, bool>
+ {
+ friend class map<_Key, _Tp, _Compare, _Alloc>;
+ protected:
+ _Compare comp;
+
+ value_compare(_Compare __c)
+ : comp(__c) { }
+
+ public:
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
+ };
+
+ private:
+ /// This turns a red-black tree into a [multi]map.
+ typedef typename _Alloc::template rebind<value_type>::other
+ _Pair_alloc_type;
+
+ typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
+ key_compare, _Pair_alloc_type> _Rep_type;
+
+ /// The actual tree structure.
+ _Rep_type _M_t;
+
+ public:
+ // many of these are specified differently in ISO, but the following are
+ // "functionally equivalent"
+ typedef typename _Pair_alloc_type::pointer pointer;
+ typedef typename _Pair_alloc_type::const_pointer const_pointer;
+ typedef typename _Pair_alloc_type::reference reference;
+ typedef typename _Pair_alloc_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+ // [23.3.1.1] construct/copy/destroy
+ // (get_allocator() is normally listed in this section, but seems to have
+ // been accidentally omitted in the printed standard)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ map()
+ : _M_t() { }
+
+ /**
+ * @brief Creates a %map with no elements.
+ * @param comp A comparison object.
+ * @param a An allocator object.
+ */
+ explicit
+ map(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+ /**
+ * @brief %Map copy constructor.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The newly-created %map uses a copy of the allocation object
+ * used by @a x.
+ */
+ map(const map& __x)
+ : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Map move constructor.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The newly-created %map contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %map.
+ */
+ map(map&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+ /**
+ * @brief Builds a %map from an initializer_list.
+ * @param l An initializer_list.
+ * @param comp A comparison object.
+ * @param a An allocator object.
+ *
+ * Create a %map consisting of copies of the elements in the
+ * initializer_list @a l.
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is @a l.size()).
+ */
+ map(initializer_list<value_type> __l,
+ const _Compare& __c = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _M_t(__c, __a)
+ { _M_t._M_insert_unique(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Builds a %map from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %map consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_unique(__first, __last); }
+
+ /**
+ * @brief Builds a %map from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %map consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_unique(__first, __last); }
+
+ // FIXME There is no dtor declared, but we should have something
+ // generated by Doxygen. I don't know what tags to add to this
+ // paragraph to make that happen:
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibility.
+ */
+
+ /**
+ * @brief %Map assignment operator.
+ * @param x A %map of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ map&
+ operator=(const map& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Map move assignment operator.
+ * @param x A %map of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this map (without copying).
+ * @a x is a valid, but unspecified %map.
+ */
+ map&
+ operator=(map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %Map list assignment operator.
+ * @param l An initializer_list.
+ *
+ * This function fills a %map with copies of the elements in the
+ * initializer list @a l.
+ *
+ * Note that the assignment completely changes the %map and
+ * that the resulting %map's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first pair in the
+ * %map.
+ * Iteration is done in ascending order according to the keys.
+ */
+ iterator
+ begin()
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %map. Iteration is done in ascending order according to the
+ * keys.
+ */
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * pair in the %map. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ end()
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %map. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last pair in
+ * the %map. Iteration is done in descending order according to the
+ * keys.
+ */
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %map. Iteration is done in descending
+ * order according to the keys.
+ */
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %map. Iteration is done in ascending order according to the
+ * keys.
+ */
+ const_iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %map. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %map. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %map. Iteration is done in descending
+ * order according to the keys.
+ */
+ const_reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
+ // capacity
+ /** Returns true if the %map is empty. (Thus begin() would equal
+ * end().)
+ */
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /** Returns the size of the %map. */
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /** Returns the maximum size of the %map. */
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ // [23.3.1.2] element access
+ /**
+ * @brief Subscript ( @c [] ) access to %map data.
+ * @param k The key for which data should be retrieved.
+ * @return A reference to the data of the (key,data) %pair.
+ *
+ * Allows for easy lookup with the subscript ( @c [] )
+ * operator. Returns data associated with the key specified in
+ * subscript. If the key does not exist, a pair with that key
+ * is created using default values, which is then returned.
+ *
+ * Lookup requires logarithmic time.
+ */
+ mapped_type&
+ operator[](const key_type& __k)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_DefaultConstructibleConcept<mapped_type>)
+
+ iterator __i = lower_bound(__k);
+ // __i->first is greater than or equivalent to __k.
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __i = insert(__i, value_type(__k, mapped_type()));
+ return (*__i).second;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ /**
+ * @brief Access to %map data.
+ * @param k The key for which data should be retrieved.
+ * @return A reference to the data whose key is equivalent to @a k, if
+ * such a data is present in the %map.
+ * @throw std::out_of_range If no such data is present.
+ */
+ mapped_type&
+ at(const key_type& __k)
+ {
+ iterator __i = lower_bound(__k);
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __throw_out_of_range(__N("map::at"));
+ return (*__i).second;
+ }
+
+ const mapped_type&
+ at(const key_type& __k) const
+ {
+ const_iterator __i = lower_bound(__k);
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __throw_out_of_range(__N("map::at"));
+ return (*__i).second;
+ }
+
+ // modifiers
+ /**
+ * @brief Attempts to insert a std::pair into the %map.
+
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+
+ * @return A pair, of which the first element is an iterator that
+ * points to the possibly inserted pair, and the second is
+ * a bool that is true if the pair was actually inserted.
+ *
+ * This function attempts to insert a (key, value) %pair into the %map.
+ * A %map relies on unique keys and thus a %pair is only inserted if its
+ * first element (the key) is not already present in the %map.
+ *
+ * Insertion requires logarithmic time.
+ */
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ { return _M_t._M_insert_unique(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Attempts to insert a list of std::pairs into the %map.
+ * @param list A std::initializer_list<value_type> of pairs to be
+ * inserted.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ void
+ insert(std::initializer_list<value_type> __list)
+ { insert (__list.begin(), __list.end()); }
+#endif
+
+ /**
+ * @brief Attempts to insert a std::pair into the %map.
+ * @param position An iterator that serves as a hint as to where the
+ * pair should be inserted.
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+ * @return An iterator that points to the element with key of @a x (may
+ * or may not be the %pair passed in).
+ *
+
+ * This function is not concerned about whether the insertion
+ * took place, and thus does not return a boolean like the
+ * single-argument insert() does. Note that the first
+ * parameter is only a hint and can potentially improve the
+ * performance of the insertion process. A bad hint would
+ * cause no gains in efficiency.
+ *
+ * See
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_unique_(__position, __x); }
+
+ /**
+ * @brief Template function that attempts to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_unique(__first, __last); }
+
+ /**
+ * @brief Erases an element from a %map.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given
+ * iterator, from a %map. Note that this function only erases
+ * the element, and that if the element is itself a pointer,
+ * the pointed-to memory is not touched in any way. Managing
+ * the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all the elements located by the given key from
+ * a %map.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %map.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %map.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * @brief Swaps data with another %map.
+ * @param x A %map of the same element and allocator types.
+ *
+ * This exchanges the elements between two maps in constant
+ * time. (It is only swapping a pointer, an integer, and an
+ * instance of the @c Compare type (which itself is often
+ * stateless and empty), so it should be quite fast.) Note
+ * that the global std::swap() function is specialized such
+ * that std::swap(m1,m2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(map&& __x)
+#else
+ swap(map& __x)
+#endif
+ { _M_t.swap(__x._M_t); }
+
+ /**
+ * Erases all elements in a %map. Note that this function only
+ * erases the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // observers
+ /**
+ * Returns the key comparison object out of which the %map was
+ * constructed.
+ */
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+
+ /**
+ * Returns a value comparison object, built from the key comparison
+ * object out of which the %map was constructed.
+ */
+ value_compare
+ value_comp() const
+ { return value_compare(_M_t.key_comp()); }
+
+ // [23.3.1.3] map operations
+ /**
+ * @brief Tries to locate an element in a %map.
+ * @param x Key of (key, value) %pair to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after %pair. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Tries to locate an element in a %map.
+ * @param x Key of (key, value) %pair to be located.
+ * @return Read-only (constant) iterator pointing to sought-after
+ * element, or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns a constant
+ * iterator pointing to the sought after %pair. If unsuccessful it
+ * returns the past-the-end ( @c end() ) iterator.
+ */
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Number of elements with specified key.
+ *
+ * This function only makes sense for multimaps; for map the result will
+ * either be 0 (not present) or 1 (present).
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first element
+ * equal to or greater than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first iterator
+ * greater than key, or end().
+ */
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multimaps.
+ */
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of read-only (constant) iterators that possibly points
+ * to the subsequence matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multimaps.
+ */
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator==(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
+
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator<(const map<_K1, _T1, _C1, _A1>&,
+ const map<_K1, _T1, _C1, _A1>&);
+ };
+
+ /**
+ * @brief Map equality comparison.
+ * @param x A %map.
+ * @param y A %map of the same type as @a x.
+ * @return True iff the size and elements of the maps are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * maps. Maps are considered equivalent if their sizes are equal,
+ * and if corresponding elements compare equal.
+ */
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Map ordering relation.
+ * @param x A %map.
+ * @param y A %map of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * maps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Based on operator==
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
+ const map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::map::swap().
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
+ map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Alloc>&& __x,
+ map<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Alloc>& __x,
+ map<_Key, _Tp, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MAP_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multimap.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multimap.h
new file mode 100644
index 0000000..484537c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multimap.h
@@ -0,0 +1,800 @@
+// Multimap implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_multimap.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MULTIMAP_H
+#define _STL_MULTIMAP_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief A standard container made up of (key,value) pairs, which can be
+ * retrieved based on a key, in logarithmic time.
+ *
+ * @ingroup associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using equivalent
+ * keys). For a @c multimap<Key,T> the key_type is Key, the mapped_type
+ * is T, and the value_type is std::pair<const Key,T>.
+ *
+ * Multimaps support bidirectional iterators.
+ *
+ * The private tree data is declared exactly the same way for map and
+ * multimap; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ */
+ template <typename _Key, typename _Tp,
+ typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+ class multimap
+ {
+ public:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Alloc allocator_type;
+
+ private:
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+ __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
+
+ public:
+ class value_compare
+ : public std::binary_function<value_type, value_type, bool>
+ {
+ friend class multimap<_Key, _Tp, _Compare, _Alloc>;
+ protected:
+ _Compare comp;
+
+ value_compare(_Compare __c)
+ : comp(__c) { }
+
+ public:
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
+ };
+
+ private:
+ /// This turns a red-black tree into a [multi]map.
+ typedef typename _Alloc::template rebind<value_type>::other
+ _Pair_alloc_type;
+
+ typedef _Rb_tree<key_type, value_type, _Select1st<value_type>,
+ key_compare, _Pair_alloc_type> _Rep_type;
+ /// The actual tree structure.
+ _Rep_type _M_t;
+
+ public:
+ // many of these are specified differently in ISO, but the following are
+ // "functionally equivalent"
+ typedef typename _Pair_alloc_type::pointer pointer;
+ typedef typename _Pair_alloc_type::const_pointer const_pointer;
+ typedef typename _Pair_alloc_type::reference reference;
+ typedef typename _Pair_alloc_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+
+ // [23.3.2] construct/copy/destroy
+ // (get_allocator() is also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ multimap()
+ : _M_t() { }
+
+ /**
+ * @brief Creates a %multimap with no elements.
+ * @param comp A comparison object.
+ * @param a An allocator object.
+ */
+ explicit
+ multimap(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+ /**
+ * @brief %Multimap copy constructor.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The newly-created %multimap uses a copy of the allocation object
+ * used by @a x.
+ */
+ multimap(const multimap& __x)
+ : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multimap move constructor.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The newly-created %multimap contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %multimap.
+ */
+ multimap(multimap&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+ /**
+ * @brief Builds a %multimap from an initializer_list.
+ * @param l An initializer_list.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multimap consisting of copies of the elements from
+ * the initializer_list. This is linear in N if the list is already
+ * sorted, and NlogN otherwise (where N is @a __l.size()).
+ */
+ multimap(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Builds a %multimap from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %multimap consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_equal(__first, __last); }
+
+ /**
+ * @brief Builds a %multimap from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multimap consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__first, __last); }
+
+ // FIXME There is no dtor declared, but we should have something generated
+ // by Doxygen. I don't know what tags to add to this paragraph to make
+ // that happen:
+ /**
+ * The dtor only erases the elements, and note that if the elements
+ * themselves are pointers, the pointed-to memory is not touched in any
+ * way. Managing the pointer is the user's responsibility.
+ */
+
+ /**
+ * @brief %Multimap assignment operator.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ multimap&
+ operator=(const multimap& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multimap move assignment operator.
+ * @param x A %multimap of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this multimap (without copying).
+ * @a x is a valid, but unspecified multimap.
+ */
+ multimap&
+ operator=(multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %Multimap list assignment operator.
+ * @param l An initializer_list.
+ *
+ * This function fills a %multimap with copies of the elements
+ * in the initializer list @a l.
+ *
+ * Note that the assignment completely changes the %multimap and
+ * that the resulting %multimap's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /// Get a copy of the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first pair in the
+ * %multimap. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ begin()
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %multimap. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read/write iterator that points one past the last pair in
+ * the %multimap. Iteration is done in ascending order according to the
+ * keys.
+ */
+ iterator
+ end()
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %multimap. Iteration is done in ascending order according
+ * to the keys.
+ */
+ const_iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last pair in
+ * the %multimap. Iteration is done in descending order according to the
+ * keys.
+ */
+ reverse_iterator
+ rbegin()
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend()
+ { return _M_t.rend(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %multimap. Iteration is done in
+ * descending order according to the keys.
+ */
+ const_reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first pair
+ * in the %multimap. Iteration is done in ascending order according to
+ * the keys.
+ */
+ const_iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * pair in the %multimap. Iteration is done in ascending order according
+ * to the keys.
+ */
+ const_iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %multimap. Iteration is done in descending order
+ * according to the keys.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to one
+ * before the first pair in the %multimap. Iteration is done in
+ * descending order according to the keys.
+ */
+ const_reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
+ // capacity
+ /** Returns true if the %multimap is empty. */
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /** Returns the size of the %multimap. */
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /** Returns the maximum size of the %multimap. */
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ // modifiers
+ /**
+ * @brief Inserts a std::pair into the %multimap.
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+ * @return An iterator that points to the inserted (key,value) pair.
+ *
+ * This function inserts a (key, value) pair into the %multimap.
+ * Contrary to a std::map the %multimap does not rely on unique keys and
+ * thus multiple pairs with the same key can be inserted.
+ *
+ * Insertion requires logarithmic time.
+ */
+ iterator
+ insert(const value_type& __x)
+ { return _M_t._M_insert_equal(__x); }
+
+ /**
+ * @brief Inserts a std::pair into the %multimap.
+ * @param position An iterator that serves as a hint as to where the
+ * pair should be inserted.
+ * @param x Pair to be inserted (see std::make_pair for easy creation
+ * of pairs).
+ * @return An iterator that points to the inserted (key,value) pair.
+ *
+ * This function inserts a (key, value) pair into the %multimap.
+ * Contrary to a std::map the %multimap does not rely on unique keys and
+ * thus multiple pairs with the same key can be inserted.
+ * Note that the first parameter is only a hint and can potentially
+ * improve the performance of the insertion process. A bad hint would
+ * cause no gains in efficiency.
+ *
+ * For more on "hinting," see:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_equal_(__position, __x); }
+
+ /**
+ * @brief A template function that attempts to insert a range
+ * of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_equal(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Attempts to insert a list of std::pairs into the %multimap.
+ * @param list A std::initializer_list<value_type> of pairs to be
+ * inserted.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ void
+ insert(initializer_list<value_type> __l)
+ { this->insert(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Erases an element from a %multimap.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %multimap. Note that this function only erases the element,
+ * and that if the element is itself a pointer, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all elements located by the given key from a
+ * %multimap.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %multimap.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %multimap.
+ * Note that this function only erases the elements, and that if
+ * the elements themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * @brief Swaps data with another %multimap.
+ * @param x A %multimap of the same element and allocator types.
+ *
+ * This exchanges the elements between two multimaps in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of
+ * the @c Compare type (which itself is often stateless and empty), so it
+ * should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(m1,m2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multimap&& __x)
+#else
+ swap(multimap& __x)
+#endif
+ { _M_t.swap(__x._M_t); }
+
+ /**
+ * Erases all elements in a %multimap. Note that this function only
+ * erases the elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibility.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // observers
+ /**
+ * Returns the key comparison object out of which the %multimap
+ * was constructed.
+ */
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+
+ /**
+ * Returns a value comparison object, built from the key comparison
+ * object out of which the %multimap was constructed.
+ */
+ value_compare
+ value_comp() const
+ { return value_compare(_M_t.key_comp()); }
+
+ // multimap operations
+ /**
+ * @brief Tries to locate an element in a %multimap.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to sought-after element,
+ * or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after %pair. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Tries to locate an element in a %multimap.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to sought-after
+ * element, or end() if not found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns a constant
+ * iterator pointing to the sought after %pair. If unsuccessful it
+ * returns the past-the-end ( @c end() ) iterator.
+ */
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Number of elements with specified key.
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.count(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first element
+ * equal to or greater than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful the iterator will point
+ * to the next greatest element or, if no such greater element exists, to
+ * end().
+ */
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key of (key, value) pair to be located.
+ * @return Read-only (constant) iterator pointing to first iterator
+ * greater than key, or end().
+ */
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ */
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key of (key, value) pairs to be located.
+ * @return Pair of read-only (constant) iterators that possibly points
+ * to the subsequence matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ */
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator==(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
+
+ template<typename _K1, typename _T1, typename _C1, typename _A1>
+ friend bool
+ operator<(const multimap<_K1, _T1, _C1, _A1>&,
+ const multimap<_K1, _T1, _C1, _A1>&);
+ };
+
+ /**
+ * @brief Multimap equality comparison.
+ * @param x A %multimap.
+ * @param y A %multimap of the same type as @a x.
+ * @return True iff the size and elements of the maps are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * multimaps. Multimaps are considered equivalent if their sizes are equal,
+ * and if corresponding elements compare equal.
+ */
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Multimap ordering relation.
+ * @param x A %multimap.
+ * @param y A %multimap of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * multimaps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Based on operator==
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline bool
+ operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ const multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::multimap::swap().
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Alloc>&& __x,
+ multimap<_Key, _Tp, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Compare, typename _Alloc>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x,
+ multimap<_Key, _Tp, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MULTIMAP_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multiset.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multiset.h
new file mode 100644
index 0000000..b5c710f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_multiset.h
@@ -0,0 +1,697 @@
+// Multiset implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file stl_multiset.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_MULTISET_H
+#define _STL_MULTISET_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief A standard container made up of elements, which can be retrieved
+ * in logarithmic time.
+ *
+ * @ingroup associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using equivalent
+ * keys). For a @c multiset<Key> the key_type and value_type are Key.
+ *
+ * Multisets support bidirectional iterators.
+ *
+ * The private tree data is declared exactly the same way for set and
+ * multiset; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ */
+ template <typename _Key, typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class multiset
+ {
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+ __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)
+
+ public:
+ // typedefs:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Alloc allocator_type;
+
+ private:
+ /// This turns a red-black tree into a [multi]set.
+ typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
+
+ typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
+ key_compare, _Key_alloc_type> _Rep_type;
+ /// The actual tree structure.
+ _Rep_type _M_t;
+
+ public:
+ typedef typename _Key_alloc_type::pointer pointer;
+ typedef typename _Key_alloc_type::const_pointer const_pointer;
+ typedef typename _Key_alloc_type::reference reference;
+ typedef typename _Key_alloc_type::const_reference const_reference;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 103. set::iterator is required to be modifiable,
+ // but this allows modification of keys.
+ typedef typename _Rep_type::const_iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+
+ // allocation/deallocation
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ multiset()
+ : _M_t() { }
+
+ /**
+ * @brief Creates a %multiset with no elements.
+ * @param comp Comparator to use.
+ * @param a An allocator object.
+ */
+ explicit
+ multiset(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+ /**
+ * @brief Builds a %multiset from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %multiset consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_equal(__first, __last); }
+
+ /**
+ * @brief Builds a %multiset from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multiset consisting of copies of the elements from
+ * [first,last). This is linear in N if the range is already sorted,
+ * and NlogN otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__first, __last); }
+
+ /**
+ * @brief %Multiset copy constructor.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The newly-created %multiset uses a copy of the allocation object used
+ * by @a x.
+ */
+ multiset(const multiset& __x)
+ : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multiset move constructor.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The newly-created %multiset contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %multiset.
+ */
+ multiset(multiset&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+ /**
+ * @brief Builds a %multiset from an initializer_list.
+ * @param l An initializer_list.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %multiset consisting of copies of the elements from
+ * the list. This is linear in N if the list is already sorted,
+ * and NlogN otherwise (where N is @a l.size()).
+ */
+ multiset(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_equal(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief %Multiset assignment operator.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ multiset&
+ operator=(const multiset& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Multiset move assignment operator.
+ * @param x A %multiset of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %multiset (without copying).
+ * @a x is a valid, but unspecified %multiset.
+ */
+ multiset&
+ operator=(multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %Multiset list assignment operator.
+ * @param l An initializer_list.
+ *
+ * This function fills a %multiset with copies of the elements in the
+ * initializer list @a l.
+ *
+ * Note that the assignment completely changes the %multiset and
+ * that the resulting %multiset's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ // accessors:
+
+ /// Returns the comparison object.
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the comparison object.
+ value_compare
+ value_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the memory allocation object.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %multiset. Iteration is done in ascending order
+ * according to the keys.
+ */
+ iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last element in the %multiset. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
+ /// Returns true if the %set is empty.
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /// Returns the size of the %set.
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /// Returns the maximum size of the %set.
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ /**
+ * @brief Swaps data with another %multiset.
+ * @param x A %multiset of the same element and allocator types.
+ *
+ * This exchanges the elements between two multisets in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of the @c
+ * Compare type (which itself is often stateless and empty), so it should
+ * be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multiset&& __x)
+#else
+ swap(multiset& __x)
+#endif
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+ /**
+ * @brief Inserts an element into the %multiset.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the inserted element.
+ *
+ * This function inserts an element into the %multiset. Contrary
+ * to a std::set the %multiset does not rely on unique keys and thus
+ * multiple copies of the same element can be inserted.
+ *
+ * Insertion requires logarithmic time.
+ */
+ iterator
+ insert(const value_type& __x)
+ { return _M_t._M_insert_equal(__x); }
+
+ /**
+ * @brief Inserts an element into the %multiset.
+ * @param position An iterator that serves as a hint as to where the
+ * element should be inserted.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the inserted element.
+ *
+ * This function inserts an element into the %multiset. Contrary
+ * to a std::set the %multiset does not rely on unique keys and thus
+ * multiple copies of the same element can be inserted.
+ *
+ * Note that the first parameter is only a hint and can potentially
+ * improve the performance of the insertion process. A bad hint would
+ * cause no gains in efficiency.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+ * for more on "hinting".
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_equal_(__position, __x); }
+
+ /**
+ * @brief A template function that attempts to insert a range of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_equal(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Attempts to insert a list of elements into the %multiset.
+ * @param list A std::initializer_list<value_type> of elements
+ * to be inserted.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ void
+ insert(initializer_list<value_type> __l)
+ { this->insert(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Erases an element from a %multiset.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %multiset. Note that this function only erases the element,
+ * and that if the element is itself a pointer, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all elements located by the given key from a
+ * %multiset.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %multiset.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %multiset.
+ * Note that this function only erases the elements, and that if
+ * the elements themselves are pointers, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * Erases all elements in a %multiset. Note that this function only
+ * erases the elements, and that if the elements themselves are pointers,
+ * the pointed-to memory is not touched in any way. Managing the pointer
+ * is the user's responsibility.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // multiset operations:
+
+ /**
+ * @brief Finds the number of elements with given key.
+ * @param x Key of elements to be located.
+ * @return Number of elements with specified key.
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.count(__x); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ //@{
+ /**
+ * @brief Tries to locate an element in a %set.
+ * @param x Element to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after element. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multisets.
+ */
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+
+ template<typename _K1, typename _C1, typename _A1>
+ friend bool
+ operator==(const multiset<_K1, _C1, _A1>&,
+ const multiset<_K1, _C1, _A1>&);
+
+ template<typename _K1, typename _C1, typename _A1>
+ friend bool
+ operator< (const multiset<_K1, _C1, _A1>&,
+ const multiset<_K1, _C1, _A1>&);
+ };
+
+ /**
+ * @brief Multiset equality comparison.
+ * @param x A %multiset.
+ * @param y A %multiset of the same type as @a x.
+ * @return True iff the size and elements of the multisets are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * multisets.
+ * Multisets are considered equivalent if their sizes are equal, and if
+ * corresponding elements compare equal.
+ */
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator==(const multiset<_Key, _Compare, _Alloc>& __x,
+ const multiset<_Key, _Compare, _Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Multiset ordering relation.
+ * @param x A %multiset.
+ * @param y A %multiset of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * maps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator<(const multiset<_Key, _Compare, _Alloc>& __x,
+ const multiset<_Key, _Compare, _Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Returns !(x == y).
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator!=(const multiset<_Key, _Compare, _Alloc>& __x,
+ const multiset<_Key, _Compare, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Returns y < x.
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator>(const multiset<_Key,_Compare,_Alloc>& __x,
+ const multiset<_Key,_Compare,_Alloc>& __y)
+ { return __y < __x; }
+
+ /// Returns !(y < x)
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator<=(const multiset<_Key, _Compare, _Alloc>& __x,
+ const multiset<_Key, _Compare, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Returns !(x < y)
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator>=(const multiset<_Key, _Compare, _Alloc>& __x,
+ const multiset<_Key, _Compare, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::multiset::swap().
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(multiset<_Key, _Compare, _Alloc>& __x,
+ multiset<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(multiset<_Key, _Compare, _Alloc>&& __x,
+ multiset<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(multiset<_Key, _Compare, _Alloc>& __x,
+ multiset<_Key, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_MULTISET_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_numeric.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_numeric.h
new file mode 100644
index 0000000..5edf2bc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_numeric.h
@@ -0,0 +1,373 @@
+// Numeric functions implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_numeric.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_NUMERIC_H
+#define _STL_NUMERIC_H 1
+
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Create a range of sequentially increasing values.
+ *
+ * For each element in the range @p [first,last) assigns @p value and
+ * increments @p value as if by @p ++value.
+ *
+ * @param first Start of range.
+ * @param last End of range.
+ * @param value Starting value.
+ * @return Nothing.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ void
+ iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<
+ _ForwardIterator>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ {
+ *__first = __value;
+ ++__value;
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_P)
+
+ /**
+ * @brief Accumulate values in a range.
+ *
+ * Accumulates the values in the range [first,last) using operator+(). The
+ * initial value is @a init. The values are processed in order.
+ *
+ * @param first Start of range.
+ * @param last End of range.
+ * @param init Starting value to add other values to.
+ * @return The final sum.
+ */
+ template<typename _InputIterator, typename _Tp>
+ inline _Tp
+ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ __init = __init + *__first;
+ return __init;
+ }
+
+ /**
+ * @brief Accumulate values in a range with operation.
+ *
+ * Accumulates the values in the range [first,last) using the function
+ * object @a binary_op. The initial value is @a init. The values are
+ * processed in order.
+ *
+ * @param first Start of range.
+ * @param last End of range.
+ * @param init Starting value to add other values to.
+ * @param binary_op Function object to accumulate with.
+ * @return The final sum.
+ */
+ template<typename _InputIterator, typename _Tp, typename _BinaryOperation>
+ inline _Tp
+ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
+ _BinaryOperation __binary_op)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for (; __first != __last; ++__first)
+ __init = __binary_op(__init, *__first);
+ return __init;
+ }
+
+ /**
+ * @brief Compute inner product of two ranges.
+ *
+ * Starting with an initial value of @a init, multiplies successive
+ * elements from the two ranges and adds each product into the accumulated
+ * value using operator+(). The values in the ranges are processed in
+ * order.
+ *
+ * @param first1 Start of range 1.
+ * @param last1 End of range 1.
+ * @param first2 Start of range 2.
+ * @param init Starting value to add other values to.
+ * @return The final inner product.
+ */
+ template<typename _InputIterator1, typename _InputIterator2, typename _Tp>
+ inline _Tp
+ inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _Tp __init)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2)
+ __init = __init + (*__first1 * *__first2);
+ return __init;
+ }
+
+ /**
+ * @brief Compute inner product of two ranges.
+ *
+ * Starting with an initial value of @a init, applies @a binary_op2 to
+ * successive elements from the two ranges and accumulates each result into
+ * the accumulated value using @a binary_op1. The values in the ranges are
+ * processed in order.
+ *
+ * @param first1 Start of range 1.
+ * @param last1 End of range 1.
+ * @param first2 Start of range 2.
+ * @param init Starting value to add other values to.
+ * @param binary_op1 Function object to accumulate with.
+ * @param binary_op2 Function object to apply to pairs of input values.
+ * @return The final inner product.
+ */
+ template<typename _InputIterator1, typename _InputIterator2, typename _Tp,
+ typename _BinaryOperation1, typename _BinaryOperation2>
+ inline _Tp
+ inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _Tp __init,
+ _BinaryOperation1 __binary_op1,
+ _BinaryOperation2 __binary_op2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+
+ for (; __first1 != __last1; ++__first1, ++__first2)
+ __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
+ return __init;
+ }
+
+ /**
+ * @brief Return list of partial sums
+ *
+ * Accumulates the values in the range [first,last) using operator+().
+ * As each successive input value is added into the total, that partial sum
+ * is written to @a result. Therefore, the first value in result is the
+ * first value of the input, the second value in result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ _OutputIterator
+ partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ _ValueType __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ {
+ __value = __value + *__first;
+ *++__result = __value;
+ }
+ return ++__result;
+ }
+
+ /**
+ * @brief Return list of partial sums
+ *
+ * Accumulates the values in the range [first,last) using operator+().
+ * As each successive input value is added into the total, that partial sum
+ * is written to @a result. Therefore, the first value in result is the
+ * first value of the input, the second value in result is the sum of the
+ * first and second input values, and so on.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryOperation>
+ _OutputIterator
+ partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _BinaryOperation __binary_op)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ _ValueType __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ {
+ __value = __binary_op(__value, *__first);
+ *++__result = __value;
+ }
+ return ++__result;
+ }
+
+ /**
+ * @brief Return differences between adjacent values.
+ *
+ * Computes the difference between adjacent values in the range
+ * [first,last) using operator-() and writes the result to @a result.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
+ template<typename _InputIterator, typename _OutputIterator>
+ _OutputIterator
+ adjacent_difference(_InputIterator __first,
+ _InputIterator __last, _OutputIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ _ValueType __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ {
+ _ValueType __tmp = *__first;
+ *++__result = __tmp - __value;
+ __value = __tmp;
+ }
+ return ++__result;
+ }
+
+ /**
+ * @brief Return differences between adjacent values.
+ *
+ * Computes the difference between adjacent values in the range
+ * [first,last) using the function object @a binary_op and writes the
+ * result to @a result.
+ *
+ * @param first Start of input range.
+ * @param last End of input range.
+ * @param result Output to write sums to.
+ * @return Iterator pointing just beyond the values written to result.
+ */
+ template<typename _InputIterator, typename _OutputIterator,
+ typename _BinaryOperation>
+ _OutputIterator
+ adjacent_difference(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _BinaryOperation __binary_op)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ _ValueType>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return __result;
+ _ValueType __value = *__first;
+ *__result = __value;
+ while (++__first != __last)
+ {
+ _ValueType __tmp = *__first;
+ *++__result = __binary_op(__tmp, __value);
+ __value = __tmp;
+ }
+ return ++__result;
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_NUMERIC_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_pair.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_pair.h
new file mode 100644
index 0000000..fd395ad
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_pair.h
@@ -0,0 +1,261 @@
+// Pair implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_pair.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_PAIR_H
+#define _STL_PAIR_H 1
+
+#include <bits/move.h> // for std::move / std::forward, std::decay, and
+ // std::swap
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// pair holds two objects of arbitrary type.
+ template<class _T1, class _T2>
+ struct pair
+ {
+ typedef _T1 first_type; ///< @c first_type is the first bound type
+ typedef _T2 second_type; ///< @c second_type is the second bound type
+
+ _T1 first; ///< @c first is a copy of the first object
+ _T2 second; ///< @c second is a copy of the second object
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 265. std::pair::pair() effects overly restrictive
+ /** The default constructor creates @c first and @c second using their
+ * respective default constructors. */
+ pair()
+ : first(), second() { }
+
+ /** Two objects may be passed to a @c pair constructor to be copied. */
+ pair(const _T1& __a, const _T2& __b)
+ : first(__a), second(__b) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<class _U1, class _U2>
+ pair(_U1&& __x, _U2&& __y)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_U2>(__y)) { }
+
+ pair(pair&& __p)
+ : first(std::move(__p.first)),
+ second(std::move(__p.second)) { }
+#endif
+
+ /** There is also a templated copy ctor for the @c pair class itself. */
+ template<class _U1, class _U2>
+ pair(const pair<_U1, _U2>& __p)
+ : first(__p.first),
+ second(__p.second) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<class _U1, class _U2>
+ pair(pair<_U1, _U2>&& __p)
+ : first(std::move(__p.first)),
+ second(std::move(__p.second)) { }
+
+ // http://gcc.gnu.org/ml/libstdc++/2007-08/msg00052.html
+ template<class _U1, class _Arg0, class... _Args>
+ pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_Arg0>(__arg0),
+ std::forward<_Args>(__args)...) { }
+
+ pair&
+ operator=(pair&& __p)
+ {
+ first = std::move(__p.first);
+ second = std::move(__p.second);
+ return *this;
+ }
+
+ template<class _U1, class _U2>
+ pair&
+ operator=(pair<_U1, _U2>&& __p)
+ {
+ first = std::move(__p.first);
+ second = std::move(__p.second);
+ return *this;
+ }
+
+ void
+ swap(pair&& __p)
+ {
+ using std::swap;
+ swap(first, __p.first);
+ swap(second, __p.second);
+ }
+#endif
+ };
+
+ /// Two pairs of the same type are equal iff their members are equal.
+ template<class _T1, class _T2>
+ inline bool
+ operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __x.first == __y.first && __x.second == __y.second; }
+
+ /// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html>
+ template<class _T1, class _T2>
+ inline bool
+ operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __x.first < __y.first
+ || (!(__y.first < __x.first) && __x.second < __y.second); }
+
+ /// Uses @c operator== to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x == __y); }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return __y < __x; }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__y < __x); }
+
+ /// Uses @c operator< to find the result.
+ template<class _T1, class _T2>
+ inline bool
+ operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+ { return !(__x < __y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// See std::pair::swap().
+ // Note: no std::swap overloads in C++03 mode, this has performance
+ // implications, see, eg, libstdc++/38466.
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
+ { __x.swap(__y); }
+
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>&& __x, pair<_T1, _T2>& __y)
+ { __x.swap(__y); }
+
+ template<class _T1, class _T2>
+ inline void
+ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>&& __y)
+ { __x.swap(__y); }
+#endif
+
+ /**
+ * @brief A convenience wrapper for creating a pair from two objects.
+ * @param x The first object.
+ * @param y The second object.
+ * @return A newly-constructed pair<> object of the appropriate type.
+ *
+ * The standard requires that the objects be passed by reference-to-const,
+ * but LWG issue #181 says they should be passed by const value. We follow
+ * the LWG by default.
+ */
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 181. make_pair() unintended behavior
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ template<class _T1, class _T2>
+ inline pair<_T1, _T2>
+ make_pair(_T1 __x, _T2 __y)
+ { return pair<_T1, _T2>(__x, __y); }
+#else
+ template<typename _Tp>
+ class reference_wrapper;
+
+ // Helper which adds a reference to a type when given a reference_wrapper
+ template<typename _Tp>
+ struct __strip_reference_wrapper
+ {
+ typedef _Tp __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __decay_and_strip
+ {
+ typedef typename __strip_reference_wrapper<
+ typename decay<_Tp>::type>::__type __type;
+ };
+
+ // NB: DR 706.
+ template<class _T1, class _T2>
+ inline pair<typename __decay_and_strip<_T1>::__type,
+ typename __decay_and_strip<_T2>::__type>
+ make_pair(_T1&& __x, _T2&& __y)
+ {
+ return pair<typename __decay_and_strip<_T1>::__type,
+ typename __decay_and_strip<_T2>::__type>
+ (std::forward<_T1>(__x), std::forward<_T2>(__y));
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_PAIR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_queue.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_queue.h
new file mode 100644
index 0000000..7479469
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_queue.h
@@ -0,0 +1,586 @@
+// Queue implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_queue.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_QUEUE_H
+#define _STL_QUEUE_H 1
+
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief A standard container giving FIFO behavior.
+ *
+ * @ingroup sequences
+ *
+ * Meets many of the requirements of a
+ * <a href="tables.html#65">container</a>,
+ * but does not define anything to do with iterators. Very few of the
+ * other standard container interfaces are defined.
+ *
+ * This is not a true container, but an @e adaptor. It holds another
+ * container, and provides a wrapper interface to that container. The
+ * wrapper is what enforces strict first-in-first-out %queue behavior.
+ *
+ * The second template parameter defines the type of the underlying
+ * sequence/container. It defaults to std::deque, but it can be any type
+ * that supports @c front, @c back, @c push_back, and @c pop_front,
+ * such as std::list or an appropriate user-defined type.
+ *
+ * Members not found in "normal" containers are @c container_type,
+ * which is a typedef for the second Sequence parameter, and @c push and
+ * @c pop, which are standard %queue/FIFO operations.
+ */
+ template<typename _Tp, typename _Sequence = deque<_Tp> >
+ class queue
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _FrontInsertionSequenceConcept)
+ __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ /**
+ * 'c' is the underlying container. Maintainers wondering why
+ * this isn't uglified as per style guidelines should note that
+ * this name is specified in the standard, [23.2.3.1]. (Why?
+ * Presumably for the same reason that it's protected instead
+ * of private: to allow derivation. But none of the other
+ * containers allow for derivation. Odd.)
+ */
+ _Sequence c;
+
+ public:
+ /**
+ * @brief Default constructor creates no elements.
+ */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ explicit
+ queue(const _Sequence& __c = _Sequence())
+ : c(__c) { }
+#else
+ explicit
+ queue(const _Sequence& __c)
+ : c(__c) { }
+
+ explicit
+ queue(_Sequence&& __c = _Sequence())
+ : c(std::move(__c)) { }
+
+ queue(queue&& __q)
+ : c(std::move(__q.c)) { }
+
+ queue&
+ operator=(queue&& __q)
+ {
+ c = std::move(__q.c);
+ return *this;
+ }
+#endif
+
+ /**
+ * Returns true if the %queue is empty.
+ */
+ bool
+ empty() const
+ { return c.empty(); }
+
+ /** Returns the number of elements in the %queue. */
+ size_type
+ size() const
+ { return c.size(); }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %queue.
+ */
+ reference
+ front()
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %queue.
+ */
+ const_reference
+ front() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
+ }
+
+ /**
+ * Returns a read/write reference to the data at the last
+ * element of the %queue.
+ */
+ reference
+ back()
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the last
+ * element of the %queue.
+ */
+ const_reference
+ back() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * @brief Add data to the end of the %queue.
+ * @param x Data to be added.
+ *
+ * This is a typical %queue operation. The function creates an
+ * element at the end of the %queue and assigns the given data
+ * to it. The time complexity of the operation depends on the
+ * underlying sequence.
+ */
+ void
+ push(const value_type& __x)
+ { c.push_back(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push(value_type&& __x)
+ { c.push_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace(_Args&&... __args)
+ { c.emplace_back(std::forward<_Args>(__args)...); }
+#endif
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %queue operation. It shrinks the %queue by one.
+ * The time complexity of the operation depends on the underlying
+ * sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ c.pop_front();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(queue&& __q)
+ { c.swap(__q.c); }
+#endif
+ };
+
+ /**
+ * @brief Queue equality comparison.
+ * @param x A %queue.
+ * @param y A %queue of the same type as @a x.
+ * @return True iff the size and elements of the queues are equal.
+ *
+ * This is an equivalence relation. Complexity and semantics depend on the
+ * underlying sequence type, but the expected rules are: this relation is
+ * linear in the size of the sequences, and queues are considered equivalent
+ * if their sequences compare equal.
+ */
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return __x.c == __y.c; }
+
+ /**
+ * @brief Queue ordering relation.
+ * @param x A %queue.
+ * @param y A %queue of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is an total ordering relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, the
+ * elements must be comparable with @c <, and
+ * std::lexicographical_compare() is usually used to make the
+ * determination.
+ */
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return __x.c < __y.c; }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
+ { return !(__x < __y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>&& __x, queue<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>&& __y)
+ { __x.swap(__y); }
+#endif
+
+ /**
+ * @brief A standard container automatically sorting its contents.
+ *
+ * @ingroup sequences
+ *
+ * This is not a true container, but an @e adaptor. It holds
+ * another container, and provides a wrapper interface to that
+ * container. The wrapper is what enforces priority-based sorting
+ * and %queue behavior. Very few of the standard container/sequence
+ * interface requirements are met (e.g., iterators).
+ *
+ * The second template parameter defines the type of the underlying
+ * sequence/container. It defaults to std::vector, but it can be
+ * any type that supports @c front(), @c push_back, @c pop_back,
+ * and random-access iterators, such as std::deque or an
+ * appropriate user-defined type.
+ *
+ * The third template parameter supplies the means of making
+ * priority comparisons. It defaults to @c less<value_type> but
+ * can be anything defining a strict weak ordering.
+ *
+ * Members not found in "normal" containers are @c container_type,
+ * which is a typedef for the second Sequence parameter, and @c
+ * push, @c pop, and @c top, which are standard %queue operations.
+ *
+ * @note No equality/comparison operators are provided for
+ * %priority_queue.
+ *
+ * @note Sorting of the elements takes place as they are added to,
+ * and removed from, the %priority_queue using the
+ * %priority_queue's member functions. If you access the elements
+ * by other means, and change their data such that the sorting
+ * order would be different, the %priority_queue will not re-sort
+ * the elements for you. (How could it know to do so?)
+ */
+ template<typename _Tp, typename _Sequence = vector<_Tp>,
+ typename _Compare = less<typename _Sequence::value_type> >
+ class priority_queue
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _SequenceConcept)
+ __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp,
+ _BinaryFunctionConcept)
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ // See queue::c for notes on these names.
+ _Sequence c;
+ _Compare comp;
+
+ public:
+ /**
+ * @brief Default constructor creates no elements.
+ */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ explicit
+ priority_queue(const _Compare& __x = _Compare(),
+ const _Sequence& __s = _Sequence())
+ : c(__s), comp(__x)
+ { std::make_heap(c.begin(), c.end(), comp); }
+#else
+ explicit
+ priority_queue(const _Compare& __x,
+ const _Sequence& __s)
+ : c(__s), comp(__x)
+ { std::make_heap(c.begin(), c.end(), comp); }
+
+ explicit
+ priority_queue(const _Compare& __x = _Compare(),
+ _Sequence&& __s = _Sequence())
+ : c(std::move(__s)), comp(__x)
+ { std::make_heap(c.begin(), c.end(), comp); }
+#endif
+
+ /**
+ * @brief Builds a %queue from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param x A comparison functor describing a strict weak ordering.
+ * @param s An initial sequence with which to start.
+ *
+ * Begins by copying @a s, inserting a copy of the elements
+ * from @a [first,last) into the copy of @a s, then ordering
+ * the copy according to @a x.
+ *
+ * For more information on function objects, see the
+ * documentation on @link functors functor base
+ * classes@endlink.
+ */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x = _Compare(),
+ const _Sequence& __s = _Sequence())
+ : c(__s), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+#else
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x,
+ const _Sequence& __s)
+ : c(__s), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+
+ template<typename _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x = _Compare(),
+ _Sequence&& __s = _Sequence())
+ : c(std::move(__s)), comp(__x)
+ {
+ __glibcxx_requires_valid_range(__first, __last);
+ c.insert(c.end(), __first, __last);
+ std::make_heap(c.begin(), c.end(), comp);
+ }
+
+ priority_queue(priority_queue&& __pq)
+ : c(std::move(__pq.c)), comp(std::move(__pq.comp)) { }
+
+ priority_queue&
+ operator=(priority_queue&& __pq)
+ {
+ c = std::move(__pq.c);
+ comp = std::move(__pq.comp);
+ return *this;
+ }
+#endif
+
+ /**
+ * Returns true if the %queue is empty.
+ */
+ bool
+ empty() const
+ { return c.empty(); }
+
+ /** Returns the number of elements in the %queue. */
+ size_type
+ size() const
+ { return c.size(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %queue.
+ */
+ const_reference
+ top() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.front();
+ }
+
+ /**
+ * @brief Add data to the %queue.
+ * @param x Data to be added.
+ *
+ * This is a typical %queue operation.
+ * The time complexity of the operation depends on the underlying
+ * sequence.
+ */
+ void
+ push(const value_type& __x)
+ {
+ c.push_back(__x);
+ std::push_heap(c.begin(), c.end(), comp);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push(value_type&& __x)
+ {
+ c.push_back(std::move(__x));
+ std::push_heap(c.begin(), c.end(), comp);
+ }
+
+ template<typename... _Args>
+ void
+ emplace(_Args&&... __args)
+ {
+ c.emplace_back(std::forward<_Args>(__args)...);
+ std::push_heap(c.begin(), c.end(), comp);
+ }
+#endif
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %queue operation. It shrinks the %queue
+ * by one. The time complexity of the operation depends on the
+ * underlying sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ std::pop_heap(c.begin(), c.end(), comp);
+ c.pop_back();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(priority_queue&& __pq)
+ {
+ using std::swap;
+ c.swap(__pq.c);
+ swap(comp, __pq.comp);
+ }
+#endif
+ };
+
+ // No equality/comparison operators are provided for priority_queue.
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
+ priority_queue<_Tp, _Sequence, _Compare>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>&& __x,
+ priority_queue<_Tp, _Sequence, _Compare>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Sequence, typename _Compare>
+ inline void
+ swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
+ priority_queue<_Tp, _Sequence, _Compare>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_QUEUE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_raw_storage_iter.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_raw_storage_iter.h
new file mode 100644
index 0000000..de6cad9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_raw_storage_iter.h
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file stl_raw_storage_iter.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_RAW_STORAGE_ITERATOR_H
+#define _STL_RAW_STORAGE_ITERATOR_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * This iterator class lets algorithms store their results into
+ * uninitialized memory.
+ */
+ template <class _OutputIterator, class _Tp>
+ class raw_storage_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ protected:
+ _OutputIterator _M_iter;
+
+ public:
+ explicit
+ raw_storage_iterator(_OutputIterator __x)
+ : _M_iter(__x) {}
+
+ raw_storage_iterator&
+ operator*() { return *this; }
+
+ raw_storage_iterator&
+ operator=(const _Tp& __element)
+ {
+ std::_Construct(&*_M_iter, __element);
+ return *this;
+ }
+
+ raw_storage_iterator<_OutputIterator, _Tp>&
+ operator++()
+ {
+ ++_M_iter;
+ return *this;
+ }
+
+ raw_storage_iterator<_OutputIterator, _Tp>
+ operator++(int)
+ {
+ raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this;
+ ++_M_iter;
+ return __tmp;
+ }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_relops.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_relops.h
new file mode 100644
index 0000000..4377c5f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_relops.h
@@ -0,0 +1,131 @@
+// std::rel_ops implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2008 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the, 2009 Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics
+ *
+ * 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.
+ *
+ */
+
+/** @file stl_relops.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ *
+ * Inclusion of this file has been removed from
+ * all of the other STL headers for safety reasons, except std_utility.h.
+ * For more information, see the thread of about twenty messages starting
+ * with http://gcc.gnu.org/ml/libstdc++/2001-01/msg00223.html, or
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.ambiguous_overloads
+ *
+ * Short summary: the rel_ops operators should be avoided for the present.
+ */
+
+#ifndef _STL_RELOPS_H
+#define _STL_RELOPS_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ namespace rel_ops
+ {
+ /** @namespace std::rel_ops
+ * @brief The generated relational operators are sequestered here.
+ */
+
+ /**
+ * @brief Defines @c != for arbitrary types, in terms of @c ==.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x != y
+ *
+ * This function uses @c == to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator!=(const _Tp& __x, const _Tp& __y)
+ { return !(__x == __y); }
+
+ /**
+ * @brief Defines @c > for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x > y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator>(const _Tp& __x, const _Tp& __y)
+ { return __y < __x; }
+
+ /**
+ * @brief Defines @c <= for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x <= y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator<=(const _Tp& __x, const _Tp& __y)
+ { return !(__y < __x); }
+
+ /**
+ * @brief Defines @c >= for arbitrary types, in terms of @c <.
+ * @param x A thing.
+ * @param y Another thing.
+ * @return x >= y
+ *
+ * This function uses @c < to determine its result.
+ */
+ template <class _Tp>
+ inline bool
+ operator>=(const _Tp& __x, const _Tp& __y)
+ { return !(__x < __y); }
+
+ } // namespace rel_ops
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_RELOPS_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_set.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_set.h
new file mode 100644
index 0000000..f06fe03
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_set.h
@@ -0,0 +1,708 @@
+// Set implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_set.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_SET_H
+#define _STL_SET_H 1
+
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * @brief A standard container made up of unique keys, which can be
+ * retrieved in logarithmic time.
+ *
+ * @ingroup associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and an
+ * <a href="tables.html#69">associative container</a> (using unique keys).
+ *
+ * Sets support bidirectional iterators.
+ *
+ * @param Key Type of key objects.
+ * @param Compare Comparison function object type, defaults to less<Key>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ *
+ * The private tree data is declared exactly the same way for set and
+ * multiset; the distinction is made entirely in how the tree functions are
+ * called (*_unique versus *_equal, same as the standard).
+ */
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class set
+ {
+ // concept requirements
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
+ _BinaryFunctionConcept)
+ __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)
+
+ public:
+ // typedefs:
+ //@{
+ /// Public typedefs.
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Alloc allocator_type;
+ //@}
+
+ private:
+ typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type;
+
+ typedef _Rb_tree<key_type, value_type, _Identity<value_type>,
+ key_compare, _Key_alloc_type> _Rep_type;
+ _Rep_type _M_t; // Red-black tree representing set.
+
+ public:
+ //@{
+ /// Iterator-related typedefs.
+ typedef typename _Key_alloc_type::pointer pointer;
+ typedef typename _Key_alloc_type::const_pointer const_pointer;
+ typedef typename _Key_alloc_type::reference reference;
+ typedef typename _Key_alloc_type::const_reference const_reference;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 103. set::iterator is required to be modifiable,
+ // but this allows modification of keys.
+ typedef typename _Rep_type::const_iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ //@}
+
+ // allocation/deallocation
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ set()
+ : _M_t() { }
+
+ /**
+ * @brief Creates a %set with no elements.
+ * @param comp Comparator to use.
+ * @param a An allocator object.
+ */
+ explicit
+ set(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+ /**
+ * @brief Builds a %set from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * Create a %set consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last)
+ : _M_t()
+ { _M_t._M_insert_unique(__first, __last); }
+
+ /**
+ * @brief Builds a %set from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %set consisting of copies of the elements from [first,last).
+ * This is linear in N if the range is already sorted, and NlogN
+ * otherwise (where N is distance(first,last)).
+ */
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_unique(__first, __last); }
+
+ /**
+ * @brief %Set copy constructor.
+ * @param x A %set of identical element and allocator types.
+ *
+ * The newly-created %set uses a copy of the allocation object used
+ * by @a x.
+ */
+ set(const set& __x)
+ : _M_t(__x._M_t) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Set move constructor
+ * @param x A %set of identical element and allocator types.
+ *
+ * The newly-created %set contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %set.
+ */
+ set(set&& __x)
+ : _M_t(std::forward<_Rep_type>(__x._M_t)) { }
+
+ /**
+ * @brief Builds a %set from an initializer_list.
+ * @param l An initializer_list.
+ * @param comp A comparison functor.
+ * @param a An allocator object.
+ *
+ * Create a %set consisting of copies of the elements in the list.
+ * This is linear in N if the list is already sorted, and NlogN
+ * otherwise (where N is @a l.size()).
+ */
+ set(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a)
+ { _M_t._M_insert_unique(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief %Set assignment operator.
+ * @param x A %set of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but unlike the copy constructor,
+ * the allocator object is not copied.
+ */
+ set&
+ operator=(const set& __x)
+ {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Set move assignment operator.
+ * @param x A %set of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %set (without copying).
+ * @a x is a valid, but unspecified %set.
+ */
+ set&
+ operator=(set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %Set list assignment operator.
+ * @param l An initializer_list.
+ *
+ * This function fills a %set with copies of the elements in the
+ * initializer list @a l.
+ *
+ * Note that the assignment completely changes the %set and
+ * that the resulting %set's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ // accessors:
+
+ /// Returns the comparison object with which the %set was constructed.
+ key_compare
+ key_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the comparison object with which the %set was constructed.
+ value_compare
+ value_comp() const
+ { return _M_t.key_comp(); }
+ /// Returns the allocator object with which the %set was constructed.
+ allocator_type
+ get_allocator() const
+ { return _M_t.get_allocator(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ begin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ end() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the last
+ * element in the %set. Iteration is done in descending order according
+ * to the keys.
+ */
+ reverse_iterator
+ rbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %set. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ rend() const
+ { return _M_t.rend(); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ cbegin() const
+ { return _M_t.begin(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the last
+ * element in the %set. Iteration is done in ascending order according
+ * to the keys.
+ */
+ iterator
+ cend() const
+ { return _M_t.end(); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the last
+ * element in the %set. Iteration is done in descending order according
+ * to the keys.
+ */
+ reverse_iterator
+ crbegin() const
+ { return _M_t.rbegin(); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points to the
+ * last pair in the %set. Iteration is done in descending order
+ * according to the keys.
+ */
+ reverse_iterator
+ crend() const
+ { return _M_t.rend(); }
+#endif
+
+ /// Returns true if the %set is empty.
+ bool
+ empty() const
+ { return _M_t.empty(); }
+
+ /// Returns the size of the %set.
+ size_type
+ size() const
+ { return _M_t.size(); }
+
+ /// Returns the maximum size of the %set.
+ size_type
+ max_size() const
+ { return _M_t.max_size(); }
+
+ /**
+ * @brief Swaps data with another %set.
+ * @param x A %set of the same element and allocator types.
+ *
+ * This exchanges the elements between two sets in constant time.
+ * (It is only swapping a pointer, an integer, and an instance of
+ * the @c Compare type (which itself is often stateless and empty), so it
+ * should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(s1,s2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(set&& __x)
+#else
+ swap(set& __x)
+#endif
+ { _M_t.swap(__x._M_t); }
+
+ // insert/erase
+ /**
+ * @brief Attempts to insert an element into the %set.
+ * @param x Element to be inserted.
+ * @return A pair, of which the first element is an iterator that points
+ * to the possibly inserted element, and the second is a bool
+ * that is true if the element was actually inserted.
+ *
+ * This function attempts to insert an element into the %set. A %set
+ * relies on unique keys and thus an element is only inserted if it is
+ * not already present in the %set.
+ *
+ * Insertion requires logarithmic time.
+ */
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ std::pair<typename _Rep_type::iterator, bool> __p =
+ _M_t._M_insert_unique(__x);
+ return std::pair<iterator, bool>(__p.first, __p.second);
+ }
+
+ /**
+ * @brief Attempts to insert an element into the %set.
+ * @param position An iterator that serves as a hint as to where the
+ * element should be inserted.
+ * @param x Element to be inserted.
+ * @return An iterator that points to the element with key of @a x (may
+ * or may not be the element passed in).
+ *
+ * This function is not concerned about whether the insertion took place,
+ * and thus does not return a boolean like the single-argument insert()
+ * does. Note that the first parameter is only a hint and can
+ * potentially improve the performance of the insertion process. A bad
+ * hint would cause no gains in efficiency.
+ *
+ * For more on "hinting", see:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
+ *
+ * Insertion requires logarithmic time (if the hint is not taken).
+ */
+ iterator
+ insert(iterator __position, const value_type& __x)
+ { return _M_t._M_insert_unique_(__position, __x); }
+
+ /**
+ * @brief A template function that attempts to insert a range
+ * of elements.
+ * @param first Iterator pointing to the start of the range to be
+ * inserted.
+ * @param last Iterator pointing to the end of the range.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ { _M_t._M_insert_unique(__first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Attempts to insert a list of elements into the %set.
+ * @param list A std::initializer_list<value_type> of elements
+ * to be inserted.
+ *
+ * Complexity similar to that of the range constructor.
+ */
+ void
+ insert(initializer_list<value_type> __l)
+ { this->insert(__l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Erases an element from a %set.
+ * @param position An iterator pointing to the element to be erased.
+ *
+ * This function erases an element, pointed to by the given iterator,
+ * from a %set. Note that this function only erases the element, and
+ * that if the element is itself a pointer, the pointed-to memory is not
+ * touched in any way. Managing the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __position)
+ { _M_t.erase(__position); }
+
+ /**
+ * @brief Erases elements according to the provided key.
+ * @param x Key of element to be erased.
+ * @return The number of elements erased.
+ *
+ * This function erases all the elements located by the given key from
+ * a %set.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ size_type
+ erase(const key_type& __x)
+ { return _M_t.erase(__x); }
+
+ /**
+ * @brief Erases a [first,last) range of elements from a %set.
+ * @param first Iterator pointing to the start of the range to be
+ * erased.
+ * @param last Iterator pointing to the end of the range to be erased.
+ *
+ * This function erases a sequence of elements from a %set.
+ * Note that this function only erases the element, and that if
+ * the element is itself a pointer, the pointed-to memory is not touched
+ * in any way. Managing the pointer is the user's responsibility.
+ */
+ void
+ erase(iterator __first, iterator __last)
+ { _M_t.erase(__first, __last); }
+
+ /**
+ * Erases all elements in a %set. Note that this function only erases
+ * the elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibility.
+ */
+ void
+ clear()
+ { _M_t.clear(); }
+
+ // set operations:
+
+ /**
+ * @brief Finds the number of elements.
+ * @param x Element to located.
+ * @return Number of elements with specified key.
+ *
+ * This function only makes sense for multisets; for set the result will
+ * either be 0 (not present) or 1 (present).
+ */
+ size_type
+ count(const key_type& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ //@{
+ /**
+ * @brief Tries to locate an element in a %set.
+ * @param x Element to be located.
+ * @return Iterator pointing to sought-after element, or end() if not
+ * found.
+ *
+ * This function takes a key and tries to locate the element with which
+ * the key matches. If successful the function returns an iterator
+ * pointing to the sought after element. If unsuccessful it returns the
+ * past-the-end ( @c end() ) iterator.
+ */
+ iterator
+ find(const key_type& __x)
+ { return _M_t.find(__x); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return _M_t.find(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the beginning of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to first element equal to or greater
+ * than key, or end().
+ *
+ * This function returns the first element of a subsequence of elements
+ * that matches the given key. If unsuccessful it returns an iterator
+ * pointing to the first element that has a greater value than given key
+ * or end() if no such element exists.
+ */
+ iterator
+ lower_bound(const key_type& __x)
+ { return _M_t.lower_bound(__x); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return _M_t.lower_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds the end of a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Iterator pointing to the first element
+ * greater than key, or end().
+ */
+ iterator
+ upper_bound(const key_type& __x)
+ { return _M_t.upper_bound(__x); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return _M_t.upper_bound(__x); }
+ //@}
+
+ //@{
+ /**
+ * @brief Finds a subsequence matching given key.
+ * @param x Key to be located.
+ * @return Pair of iterators that possibly points to the subsequence
+ * matching given key.
+ *
+ * This function is equivalent to
+ * @code
+ * std::make_pair(c.lower_bound(val),
+ * c.upper_bound(val))
+ * @endcode
+ * (but is faster than making the calls separately).
+ *
+ * This function probably only makes sense for multisets.
+ */
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __x)
+ { return _M_t.equal_range(__x); }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __x) const
+ { return _M_t.equal_range(__x); }
+ //@}
+
+ template<typename _K1, typename _C1, typename _A1>
+ friend bool
+ operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
+
+ template<typename _K1, typename _C1, typename _A1>
+ friend bool
+ operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
+ };
+
+
+ /**
+ * @brief Set equality comparison.
+ * @param x A %set.
+ * @param y A %set of the same type as @a x.
+ * @return True iff the size and elements of the sets are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the sets.
+ * Sets are considered equivalent if their sizes are equal, and if
+ * corresponding elements compare equal.
+ */
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator==(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return __x._M_t == __y._M_t; }
+
+ /**
+ * @brief Set ordering relation.
+ * @param x A %set.
+ * @param y A %set of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * maps. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator<(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return __x._M_t < __y._M_t; }
+
+ /// Returns !(x == y).
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator!=(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Returns y < x.
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator>(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Returns !(y < x)
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator<=(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Returns !(x < y)
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline bool
+ operator>=(const set<_Key, _Compare, _Alloc>& __x,
+ const set<_Key, _Compare, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::set::swap().
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(set<_Key, _Compare, _Alloc>&& __x, set<_Key, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Alloc>
+ inline void
+ swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_SET_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_stack.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_stack.h
new file mode 100644
index 0000000..da301d4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_stack.h
@@ -0,0 +1,299 @@
+// Stack implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_stack.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_STACK_H
+#define _STL_STACK_H 1
+
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief A standard container giving FILO behavior.
+ *
+ * @ingroup sequences
+ *
+ * Meets many of the requirements of a
+ * <a href="tables.html#65">container</a>,
+ * but does not define anything to do with iterators. Very few of the
+ * other standard container interfaces are defined.
+ *
+ * This is not a true container, but an @e adaptor. It holds
+ * another container, and provides a wrapper interface to that
+ * container. The wrapper is what enforces strict
+ * first-in-last-out %stack behavior.
+ *
+ * The second template parameter defines the type of the underlying
+ * sequence/container. It defaults to std::deque, but it can be
+ * any type that supports @c back, @c push_back, and @c pop_front,
+ * such as std::list, std::vector, or an appropriate user-defined
+ * type.
+ *
+ * Members not found in "normal" containers are @c container_type,
+ * which is a typedef for the second Sequence parameter, and @c
+ * push, @c pop, and @c top, which are standard %stack/FILO
+ * operations.
+ */
+ template<typename _Tp, typename _Sequence = deque<_Tp> >
+ class stack
+ {
+ // concept requirements
+ typedef typename _Sequence::value_type _Sequence_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
+ __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
+
+ template<typename _Tp1, typename _Seq1>
+ friend bool
+ operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
+
+ public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ protected:
+ // See queue::c for notes on this name.
+ _Sequence c;
+
+ public:
+ // XXX removed old def ctor, added def arg to this one to match 14882
+ /**
+ * @brief Default constructor creates no elements.
+ */
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ explicit
+ stack(const _Sequence& __c = _Sequence())
+ : c(__c) { }
+#else
+ explicit
+ stack(const _Sequence& __c)
+ : c(__c) { }
+
+ explicit
+ stack(_Sequence&& __c = _Sequence())
+ : c(std::move(__c)) { }
+#endif
+
+ /**
+ * Returns true if the %stack is empty.
+ */
+ bool
+ empty() const
+ { return c.empty(); }
+
+ /** Returns the number of elements in the %stack. */
+ size_type
+ size() const
+ { return c.size(); }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %stack.
+ */
+ reference
+ top()
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %stack.
+ */
+ const_reference
+ top() const
+ {
+ __glibcxx_requires_nonempty();
+ return c.back();
+ }
+
+ /**
+ * @brief Add data to the top of the %stack.
+ * @param x Data to be added.
+ *
+ * This is a typical %stack operation. The function creates an
+ * element at the top of the %stack and assigns the given data
+ * to it. The time complexity of the operation depends on the
+ * underlying sequence.
+ */
+ void
+ push(const value_type& __x)
+ { c.push_back(__x); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push(value_type&& __x)
+ { c.push_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace(_Args&&... __args)
+ { c.emplace_back(std::forward<_Args>(__args)...); }
+#endif
+
+ /**
+ * @brief Removes first element.
+ *
+ * This is a typical %stack operation. It shrinks the %stack
+ * by one. The time complexity of the operation depends on the
+ * underlying sequence.
+ *
+ * Note that no data is returned, and if the first element's
+ * data is needed, it should be retrieved before pop() is
+ * called.
+ */
+ void
+ pop()
+ {
+ __glibcxx_requires_nonempty();
+ c.pop_back();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ swap(stack&& __s)
+ { c.swap(__s.c); }
+#endif
+ };
+
+ /**
+ * @brief Stack equality comparison.
+ * @param x A %stack.
+ * @param y A %stack of the same type as @a x.
+ * @return True iff the size and elements of the stacks are equal.
+ *
+ * This is an equivalence relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, and
+ * stacks are considered equivalent if their sequences compare
+ * equal.
+ */
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return __x.c == __y.c; }
+
+ /**
+ * @brief Stack ordering relation.
+ * @param x A %stack.
+ * @param y A %stack of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is an total ordering relation. Complexity and semantics
+ * depend on the underlying sequence type, but the expected rules
+ * are: this relation is linear in the size of the sequences, the
+ * elements must be comparable with @c <, and
+ * std::lexicographical_compare() is usually used to make the
+ * determination.
+ */
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return __x.c < __y.c; }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Seq>
+ inline bool
+ operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
+ { return !(__x < __y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>&& __x, stack<_Tp, _Seq>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Seq>
+ inline void
+ swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_STACK_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tempbuf.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tempbuf.h
new file mode 100644
index 0000000..a3b0810
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tempbuf.h
@@ -0,0 +1,206 @@
+// Temporary buffer implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_tempbuf.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_TEMPBUF_H
+#define _STL_TEMPBUF_H 1
+
+#include <bits/stl_algobase.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Allocates a temporary buffer.
+ * @param len The number of objects of type Tp.
+ * @return See full description.
+ *
+ * Reinventing the wheel, but this time with prettier spokes!
+ *
+ * This function tries to obtain storage for @c len adjacent Tp
+ * objects. The objects themselves are not constructed, of course.
+ * A pair<> is returned containing "the buffer s address and
+ * capacity (in the units of sizeof(Tp)), or a pair of 0 values if
+ * no storage can be obtained." Note that the capacity obtained
+ * may be less than that requested if the memory is unavailable;
+ * you should compare len with the .second return value.
+ *
+ * Provides the nothrow exception guarantee.
+ */
+ template<typename _Tp>
+ pair<_Tp*, ptrdiff_t>
+ get_temporary_buffer(ptrdiff_t __len)
+ {
+ const ptrdiff_t __max =
+ __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
+ if (__len > __max)
+ __len = __max;
+
+ while (__len > 0)
+ {
+ _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
+ std::nothrow));
+ if (__tmp != 0)
+ return std::pair<_Tp*, ptrdiff_t>(__tmp, __len);
+ __len /= 2;
+ }
+ return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
+ }
+
+ /**
+ * @brief The companion to get_temporary_buffer().
+ * @param p A buffer previously allocated by get_temporary_buffer.
+ * @return None.
+ *
+ * Frees the memory pointed to by p.
+ */
+ template<typename _Tp>
+ inline void
+ return_temporary_buffer(_Tp* __p)
+ { ::operator delete(__p, std::nothrow); }
+
+
+ /**
+ * This class is used in two places: stl_algo.h and ext/memory,
+ * where it is wrapped as the temporary_buffer class. See
+ * temporary_buffer docs for more notes.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ class _Temporary_buffer
+ {
+ // concept requirements
+ __glibcxx_class_requires(_ForwardIterator, _ForwardIteratorConcept)
+
+ public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef pointer iterator;
+ typedef ptrdiff_t size_type;
+
+ protected:
+ size_type _M_original_len;
+ size_type _M_len;
+ pointer _M_buffer;
+
+ public:
+ /// As per Table mumble.
+ size_type
+ size() const
+ { return _M_len; }
+
+ /// Returns the size requested by the constructor; may be >size().
+ size_type
+ requested_size() const
+ { return _M_original_len; }
+
+ /// As per Table mumble.
+ iterator
+ begin()
+ { return _M_buffer; }
+
+ /// As per Table mumble.
+ iterator
+ end()
+ { return _M_buffer + _M_len; }
+
+ /**
+ * Constructs a temporary buffer of a size somewhere between
+ * zero and the size of the given range.
+ */
+ _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last);
+
+ ~_Temporary_buffer()
+ {
+ std::_Destroy(_M_buffer, _M_buffer + _M_len);
+ std::return_temporary_buffer(_M_buffer);
+ }
+
+ private:
+ // Disable copy constructor and assignment operator.
+ _Temporary_buffer(const _Temporary_buffer&);
+
+ void
+ operator=(const _Temporary_buffer&);
+ };
+
+ template<typename _ForwardIterator, typename _Tp>
+ _Temporary_buffer<_ForwardIterator, _Tp>::
+ _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
+ : _M_original_len(std::distance(__first, __last)),
+ _M_len(0), _M_buffer(0)
+ {
+ __try
+ {
+ std::pair<pointer, size_type> __p(std::get_temporary_buffer<
+ value_type>(_M_original_len));
+ _M_buffer = __p.first;
+ _M_len = __p.second;
+ if (!__is_pod(_Tp) && _M_len > 0)
+ std::uninitialized_fill_n(_M_buffer, _M_len, *__first);
+ }
+ __catch(...)
+ {
+ std::return_temporary_buffer(_M_buffer);
+ _M_buffer = 0;
+ _M_len = 0;
+ __throw_exception_again;
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_TEMPBUF_H */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tree.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tree.h
new file mode 100644
index 0000000..e2cc151
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_tree.h
@@ -0,0 +1,1535 @@
+// RB tree implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * 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) 1994
+ * 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.
+ *
+ *
+ */
+
+/** @file stl_tree.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_TREE_H
+#define _STL_TREE_H 1
+
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_function.h>
+#include <bits/cpp_type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Red-black tree class, designed for use in implementing STL
+ // associative containers (set, multiset, map, and multimap). The
+ // insertion and deletion algorithms are based on those in Cormen,
+ // Leiserson, and Rivest, Introduction to Algorithms (MIT Press,
+ // 1990), except that
+ //
+ // (1) the header cell is maintained with links not only to the root
+ // but also to the leftmost node of the tree, to enable constant
+ // time begin(), and to the rightmost node of the tree, to enable
+ // linear time performance when used with the generic set algorithms
+ // (set_union, etc.)
+ //
+ // (2) when a node being deleted has two children its successor node
+ // is relinked into its place, rather than copied, so that the only
+ // iterators invalidated are those referring to the deleted node.
+
+ enum _Rb_tree_color { _S_red = false, _S_black = true };
+
+ struct _Rb_tree_node_base
+ {
+ typedef _Rb_tree_node_base* _Base_ptr;
+ typedef const _Rb_tree_node_base* _Const_Base_ptr;
+
+ _Rb_tree_color _M_color;
+ _Base_ptr _M_parent;
+ _Base_ptr _M_left;
+ _Base_ptr _M_right;
+
+ static _Base_ptr
+ _S_minimum(_Base_ptr __x)
+ {
+ while (__x->_M_left != 0) __x = __x->_M_left;
+ return __x;
+ }
+
+ static _Const_Base_ptr
+ _S_minimum(_Const_Base_ptr __x)
+ {
+ while (__x->_M_left != 0) __x = __x->_M_left;
+ return __x;
+ }
+
+ static _Base_ptr
+ _S_maximum(_Base_ptr __x)
+ {
+ while (__x->_M_right != 0) __x = __x->_M_right;
+ return __x;
+ }
+
+ static _Const_Base_ptr
+ _S_maximum(_Const_Base_ptr __x)
+ {
+ while (__x->_M_right != 0) __x = __x->_M_right;
+ return __x;
+ }
+ };
+
+ template<typename _Val>
+ struct _Rb_tree_node : public _Rb_tree_node_base
+ {
+ typedef _Rb_tree_node<_Val>* _Link_type;
+ _Val _M_value_field;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ _Rb_tree_node(_Args&&... __args)
+ : _Rb_tree_node_base(),
+ _M_value_field(std::forward<_Args>(__args)...) { }
+#endif
+ };
+
+ _Rb_tree_node_base*
+ _Rb_tree_increment(_Rb_tree_node_base* __x);
+
+ const _Rb_tree_node_base*
+ _Rb_tree_increment(const _Rb_tree_node_base* __x);
+
+ _Rb_tree_node_base*
+ _Rb_tree_decrement(_Rb_tree_node_base* __x);
+
+ const _Rb_tree_node_base*
+ _Rb_tree_decrement(const _Rb_tree_node_base* __x);
+
+ template<typename _Tp>
+ struct _Rb_tree_iterator
+ {
+ typedef _Tp value_type;
+ typedef _Tp& reference;
+ typedef _Tp* pointer;
+
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+
+ typedef _Rb_tree_iterator<_Tp> _Self;
+ typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
+ typedef _Rb_tree_node<_Tp>* _Link_type;
+
+ _Rb_tree_iterator()
+ : _M_node() { }
+
+ explicit
+ _Rb_tree_iterator(_Link_type __x)
+ : _M_node(__x) { }
+
+ reference
+ operator*() const
+ { return static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _Rb_tree_increment(_M_node);
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_increment(_M_node);
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _Rb_tree_decrement(_M_node);
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_decrement(_M_node);
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ _Base_ptr _M_node;
+ };
+
+ template<typename _Tp>
+ struct _Rb_tree_const_iterator
+ {
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
+
+ typedef _Rb_tree_iterator<_Tp> iterator;
+
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+
+ typedef _Rb_tree_const_iterator<_Tp> _Self;
+ typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
+ typedef const _Rb_tree_node<_Tp>* _Link_type;
+
+ _Rb_tree_const_iterator()
+ : _M_node() { }
+
+ explicit
+ _Rb_tree_const_iterator(_Link_type __x)
+ : _M_node(__x) { }
+
+ _Rb_tree_const_iterator(const iterator& __it)
+ : _M_node(__it._M_node) { }
+
+ reference
+ operator*() const
+ { return static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ pointer
+ operator->() const
+ { return &static_cast<_Link_type>(_M_node)->_M_value_field; }
+
+ _Self&
+ operator++()
+ {
+ _M_node = _Rb_tree_increment(_M_node);
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_increment(_M_node);
+ return __tmp;
+ }
+
+ _Self&
+ operator--()
+ {
+ _M_node = _Rb_tree_decrement(_M_node);
+ return *this;
+ }
+
+ _Self
+ operator--(int)
+ {
+ _Self __tmp = *this;
+ _M_node = _Rb_tree_decrement(_M_node);
+ return __tmp;
+ }
+
+ bool
+ operator==(const _Self& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Self& __x) const
+ { return _M_node != __x._M_node; }
+
+ _Base_ptr _M_node;
+ };
+
+ template<typename _Val>
+ inline bool
+ operator==(const _Rb_tree_iterator<_Val>& __x,
+ const _Rb_tree_const_iterator<_Val>& __y)
+ { return __x._M_node == __y._M_node; }
+
+ template<typename _Val>
+ inline bool
+ operator!=(const _Rb_tree_iterator<_Val>& __x,
+ const _Rb_tree_const_iterator<_Val>& __y)
+ { return __x._M_node != __y._M_node; }
+
+ void
+ _Rb_tree_insert_and_rebalance(const bool __insert_left,
+ _Rb_tree_node_base* __x,
+ _Rb_tree_node_base* __p,
+ _Rb_tree_node_base& __header);
+
+ _Rb_tree_node_base*
+ _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
+ _Rb_tree_node_base& __header);
+
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc = allocator<_Val> >
+ class _Rb_tree
+ {
+ typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other
+ _Node_allocator;
+
+ protected:
+ typedef _Rb_tree_node_base* _Base_ptr;
+ typedef const _Rb_tree_node_base* _Const_Base_ptr;
+
+ public:
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef _Rb_tree_node<_Val>* _Link_type;
+ typedef const _Rb_tree_node<_Val>* _Const_Link_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Alloc allocator_type;
+
+ _Node_allocator&
+ _M_get_Node_allocator()
+ { return *static_cast<_Node_allocator*>(&this->_M_impl); }
+
+ const _Node_allocator&
+ _M_get_Node_allocator() const
+ { return *static_cast<const _Node_allocator*>(&this->_M_impl); }
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Node_allocator()); }
+
+ protected:
+ _Link_type
+ _M_get_node()
+ { return _M_impl._Node_allocator::allocate(1); }
+
+ void
+ _M_put_node(_Link_type __p)
+ { _M_impl._Node_allocator::deallocate(__p, 1); }
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ _Link_type
+ _M_create_node(const value_type& __x)
+ {
+ _Link_type __tmp = _M_get_node();
+ __try
+ { get_allocator().construct(&__tmp->_M_value_field, __x); }
+ __catch(...)
+ {
+ _M_put_node(__tmp);
+ __throw_exception_again;
+ }
+ return __tmp;
+ }
+
+ void
+ _M_destroy_node(_Link_type __p)
+ {
+ get_allocator().destroy(&__p->_M_value_field);
+ _M_put_node(__p);
+ }
+#else
+ template<typename... _Args>
+ _Link_type
+ _M_create_node(_Args&&... __args)
+ {
+ _Link_type __tmp = _M_get_node();
+ __try
+ {
+ _M_get_Node_allocator().construct(__tmp,
+ std::forward<_Args>(__args)...);
+ }
+ __catch(...)
+ {
+ _M_put_node(__tmp);
+ __throw_exception_again;
+ }
+ return __tmp;
+ }
+
+ void
+ _M_destroy_node(_Link_type __p)
+ {
+ _M_get_Node_allocator().destroy(__p);
+ _M_put_node(__p);
+ }
+#endif
+
+ _Link_type
+ _M_clone_node(_Const_Link_type __x)
+ {
+ _Link_type __tmp = _M_create_node(__x->_M_value_field);
+ __tmp->_M_color = __x->_M_color;
+ __tmp->_M_left = 0;
+ __tmp->_M_right = 0;
+ return __tmp;
+ }
+
+ protected:
+ template<typename _Key_compare,
+ bool _Is_pod_comparator = __is_pod(_Key_compare)>
+ struct _Rb_tree_impl : public _Node_allocator
+ {
+ _Key_compare _M_key_compare;
+ _Rb_tree_node_base _M_header;
+ size_type _M_node_count; // Keeps track of size of tree.
+
+ _Rb_tree_impl()
+ : _Node_allocator(), _M_key_compare(), _M_header(),
+ _M_node_count(0)
+ { _M_initialize(); }
+
+ _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a)
+ : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
+ _M_node_count(0)
+ { _M_initialize(); }
+
+ private:
+ void
+ _M_initialize()
+ {
+ this->_M_header._M_color = _S_red;
+ this->_M_header._M_parent = 0;
+ this->_M_header._M_left = &this->_M_header;
+ this->_M_header._M_right = &this->_M_header;
+ }
+ };
+
+ // Local modification: if __google_stl_debug_rbtree is defined to
+ // non-zero value, check sort predicate for strict weak ordering.
+ // See http://b/1731200.
+#if __google_stl_debug_rbtree
+ template<typename _KeyCompare>
+ struct _CheckedCompare {
+ _KeyCompare _M_key_compare;
+
+ _CheckedCompare(): _M_key_compare() { }
+ _CheckedCompare(const _KeyCompare & __comp): _M_key_compare(__comp) { }
+
+ // Template arg required to avoid duplicating code in the two op()
+ // operators below. User-provided _M_key_compare may not be const,
+ // but needs to be callable from our const op().
+ // See http://b/1731200 for details.
+ template <typename _KeyCompareT>
+ static bool _M_compare_with(_KeyCompareT& __comp, const _Key& __x, const _Key& __y) {
+ if (__comp(__x, __x))
+ __throw_runtime_error("strict weak ordering: (__x LT __x) != false");
+ if (__comp(__y, __y))
+ __throw_runtime_error("strict weak ordering: (__y LT __y) != false");
+ bool lt = __comp(__x, __y);
+ if (lt && __comp(__y, __x))
+ __throw_runtime_error("strict weak ordering: ((__x LT __y) && (__y LT __x)) != false");
+ return lt;
+ }
+ bool operator()(const _Key& __x, const _Key& __y) const {
+ return _M_compare_with(_M_key_compare, __x, __y);
+ }
+
+ bool operator()(const _Key& __x, const _Key& __y) {
+ return _M_compare_with(_M_key_compare, __x, __y);
+ }
+
+ operator _KeyCompare() const { return _M_key_compare; }
+ };
+
+ _Rb_tree_impl<_CheckedCompare<_Compare> > _M_impl;
+#else
+ _Rb_tree_impl<_Compare> _M_impl;
+#endif
+
+ protected:
+ _Base_ptr&
+ _M_root()
+ { return this->_M_impl._M_header._M_parent; }
+
+ _Const_Base_ptr
+ _M_root() const
+ { return this->_M_impl._M_header._M_parent; }
+
+ _Base_ptr&
+ _M_leftmost()
+ { return this->_M_impl._M_header._M_left; }
+
+ _Const_Base_ptr
+ _M_leftmost() const
+ { return this->_M_impl._M_header._M_left; }
+
+ _Base_ptr&
+ _M_rightmost()
+ { return this->_M_impl._M_header._M_right; }
+
+ _Const_Base_ptr
+ _M_rightmost() const
+ { return this->_M_impl._M_header._M_right; }
+
+ _Link_type
+ _M_begin()
+ { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); }
+
+ _Const_Link_type
+ _M_begin() const
+ {
+ return static_cast<_Const_Link_type>
+ (this->_M_impl._M_header._M_parent);
+ }
+
+ _Link_type
+ _M_end()
+ { return static_cast<_Link_type>(&this->_M_impl._M_header); }
+
+ _Const_Link_type
+ _M_end() const
+ { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
+
+ static const_reference
+ _S_value(_Const_Link_type __x)
+ { return __x->_M_value_field; }
+
+ static const _Key&
+ _S_key(_Const_Link_type __x)
+ { return _KeyOfValue()(_S_value(__x)); }
+
+ static _Link_type
+ _S_left(_Base_ptr __x)
+ { return static_cast<_Link_type>(__x->_M_left); }
+
+ static _Const_Link_type
+ _S_left(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x->_M_left); }
+
+ static _Link_type
+ _S_right(_Base_ptr __x)
+ { return static_cast<_Link_type>(__x->_M_right); }
+
+ static _Const_Link_type
+ _S_right(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x->_M_right); }
+
+ static const_reference
+ _S_value(_Const_Base_ptr __x)
+ { return static_cast<_Const_Link_type>(__x)->_M_value_field; }
+
+ static const _Key&
+ _S_key(_Const_Base_ptr __x)
+ { return _KeyOfValue()(_S_value(__x)); }
+
+ static _Base_ptr
+ _S_minimum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_minimum(__x); }
+
+ static _Const_Base_ptr
+ _S_minimum(_Const_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_minimum(__x); }
+
+ static _Base_ptr
+ _S_maximum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_maximum(__x); }
+
+ static _Const_Base_ptr
+ _S_maximum(_Const_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_maximum(__x); }
+
+ public:
+ typedef _Rb_tree_iterator<value_type> iterator;
+ typedef _Rb_tree_const_iterator<value_type> const_iterator;
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ private:
+ iterator
+ _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y,
+ const value_type& __v);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 233. Insertion hints in associative containers.
+ iterator
+ _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+
+ iterator
+ _M_insert_equal_lower(const value_type& __x);
+
+ _Link_type
+ _M_copy(_Const_Link_type __x, _Link_type __p);
+
+ void
+ _M_erase(_Link_type __x);
+
+ iterator
+ _M_lower_bound(_Link_type __x, _Link_type __y,
+ const _Key& __k);
+
+ const_iterator
+ _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
+ const _Key& __k) const;
+
+ iterator
+ _M_upper_bound(_Link_type __x, _Link_type __y,
+ const _Key& __k);
+
+ const_iterator
+ _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
+ const _Key& __k) const;
+
+ public:
+ // allocation/deallocation
+ _Rb_tree() { }
+
+ _Rb_tree(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__comp, __a) { }
+
+ _Rb_tree(const _Rb_tree& __x)
+ : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
+ {
+ if (__x._M_root() != 0)
+ {
+ _M_root() = _M_copy(__x._M_begin(), _M_end());
+ _M_leftmost() = _S_minimum(_M_root());
+ _M_rightmost() = _S_maximum(_M_root());
+ _M_impl._M_node_count = __x._M_impl._M_node_count;
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Rb_tree(_Rb_tree&& __x);
+#endif
+
+ ~_Rb_tree()
+ { _M_erase(_M_begin()); }
+
+ _Rb_tree&
+ operator=(const _Rb_tree& __x);
+
+ // Accessors.
+ _Compare
+ key_comp() const
+ { return _M_impl._M_key_compare; }
+
+ iterator
+ begin()
+ {
+ return iterator(static_cast<_Link_type>
+ (this->_M_impl._M_header._M_left));
+ }
+
+ const_iterator
+ begin() const
+ {
+ return const_iterator(static_cast<_Const_Link_type>
+ (this->_M_impl._M_header._M_left));
+ }
+
+ iterator
+ end()
+ { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
+
+ const_iterator
+ end() const
+ {
+ return const_iterator(static_cast<_Const_Link_type>
+ (&this->_M_impl._M_header));
+ }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ bool
+ empty() const
+ { return _M_impl._M_node_count == 0; }
+
+ size_type
+ size() const
+ { return _M_impl._M_node_count; }
+
+ size_type
+ max_size() const
+ { return _M_get_Node_allocator().max_size(); }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(_Rb_tree&& __t);
+#else
+ swap(_Rb_tree& __t);
+#endif
+
+ // Insert/erase.
+ pair<iterator, bool>
+ _M_insert_unique(const value_type& __x);
+
+ iterator
+ _M_insert_equal(const value_type& __x);
+
+ iterator
+ _M_insert_unique_(const_iterator __position, const value_type& __x);
+
+ iterator
+ _M_insert_equal_(const_iterator __position, const value_type& __x);
+
+ template<typename _InputIterator>
+ void
+ _M_insert_unique(_InputIterator __first, _InputIterator __last);
+
+ template<typename _InputIterator>
+ void
+ _M_insert_equal(_InputIterator __first, _InputIterator __last);
+
+ void
+ erase(iterator __position);
+
+ void
+ erase(const_iterator __position);
+
+ size_type
+ erase(const key_type& __x);
+
+ void
+ erase(iterator __first, iterator __last);
+
+ void
+ erase(const_iterator __first, const_iterator __last);
+
+ void
+ erase(const key_type* __first, const key_type* __last);
+
+ void
+ clear()
+ {
+ _M_erase(_M_begin());
+ _M_leftmost() = _M_end();
+ _M_root() = 0;
+ _M_rightmost() = _M_end();
+ _M_impl._M_node_count = 0;
+ }
+
+ // Set operations.
+ iterator
+ find(const key_type& __k);
+
+ const_iterator
+ find(const key_type& __k) const;
+
+ size_type
+ count(const key_type& __k) const;
+
+ iterator
+ lower_bound(const key_type& __k)
+ { return _M_lower_bound(_M_begin(), _M_end(), __k); }
+
+ const_iterator
+ lower_bound(const key_type& __k) const
+ { return _M_lower_bound(_M_begin(), _M_end(), __k); }
+
+ iterator
+ upper_bound(const key_type& __k)
+ { return _M_upper_bound(_M_begin(), _M_end(), __k); }
+
+ const_iterator
+ upper_bound(const key_type& __k) const
+ { return _M_upper_bound(_M_begin(), _M_end(), __k); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __k);
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __k) const;
+
+ // Debugging.
+ bool
+ __rb_verify() const;
+ };
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ {
+ return __x.size() == __y.size()
+ && std::equal(__x.begin(), __x.end(), __y.begin());
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ {
+ return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end());
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ { return __y < __x; }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline bool
+ operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline void
+ swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x)
+ : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
+ {
+ if (__x._M_root() != 0)
+ {
+ _M_root() = __x._M_root();
+ _M_leftmost() = __x._M_leftmost();
+ _M_rightmost() = __x._M_rightmost();
+ _M_root()->_M_parent = _M_end();
+
+ __x._M_root() = 0;
+ __x._M_leftmost() = __x._M_end();
+ __x._M_rightmost() = __x._M_end();
+
+ this->_M_impl._M_node_count = __x._M_impl._M_node_count;
+ __x._M_impl._M_node_count = 0;
+ }
+ }
+#endif
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x)
+ {
+ if (this != &__x)
+ {
+ // Note that _Key may be a constant type.
+ clear();
+ _M_impl._M_key_compare = __x._M_impl._M_key_compare;
+ if (__x._M_root() != 0)
+ {
+ _M_root() = _M_copy(__x._M_begin(), _M_end());
+ _M_leftmost() = _S_minimum(_M_root());
+ _M_rightmost() = _S_maximum(_M_root());
+ _M_impl._M_node_count = __x._M_impl._M_node_count;
+ }
+ }
+ return *this;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v)
+ {
+ bool __insert_left = (__x != 0 || __p == _M_end()
+ || _M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__p)));
+
+ _Link_type __z = _M_create_node(__v);
+
+ _Rb_tree_insert_and_rebalance(__insert_left, __z,
+ const_cast<_Base_ptr>(__p),
+ this->_M_impl._M_header);
+ ++_M_impl._M_node_count;
+ return iterator(__z);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v)
+ {
+ bool __insert_left = (__x != 0 || __p == _M_end()
+ || !_M_impl._M_key_compare(_S_key(__p),
+ _KeyOfValue()(__v)));
+
+ _Link_type __z = _M_create_node(__v);
+
+ _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
+ this->_M_impl._M_header);
+ ++_M_impl._M_node_count;
+ return iterator(__z);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_equal_lower(const _Val& __v)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ while (__x != 0)
+ {
+ __y = __x;
+ __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ?
+ _S_left(__x) : _S_right(__x);
+ }
+ return _M_insert_lower(__x, __y, __v);
+ }
+
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type
+ _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::
+ _M_copy(_Const_Link_type __x, _Link_type __p)
+ {
+ // Structural copy. __x and __p must be non-null.
+ _Link_type __top = _M_clone_node(__x);
+ __top->_M_parent = __p;
+
+ __try
+ {
+ if (__x->_M_right)
+ __top->_M_right = _M_copy(_S_right(__x), __top);
+ __p = __top;
+ __x = _S_left(__x);
+
+ while (__x != 0)
+ {
+ _Link_type __y = _M_clone_node(__x);
+ __p->_M_left = __y;
+ __y->_M_parent = __p;
+ if (__x->_M_right)
+ __y->_M_right = _M_copy(_S_right(__x), __y);
+ __p = __y;
+ __x = _S_left(__x);
+ }
+ }
+ __catch(...)
+ {
+ _M_erase(__top);
+ __throw_exception_again;
+ }
+ return __top;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_erase(_Link_type __x)
+ {
+ // Erase without rebalancing.
+ while (__x != 0)
+ {
+ _M_erase(_S_right(__x));
+ _Link_type __y = _S_left(__x);
+ _M_destroy_node(__x);
+ __x = __y;
+ }
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_lower_bound(_Link_type __x, _Link_type __y,
+ const _Key& __k)
+ {
+ while (__x != 0)
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+ return iterator(__y);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::const_iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
+ const _Key& __k) const
+ {
+ while (__x != 0)
+ if (!_M_impl._M_key_compare(_S_key(__x), __k))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+ return const_iterator(__y);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_upper_bound(_Link_type __x, _Link_type __y,
+ const _Key& __k)
+ {
+ while (__x != 0)
+ if (_M_impl._M_key_compare(__k, _S_key(__x)))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+ return iterator(__y);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::const_iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
+ const _Key& __k) const
+ {
+ while (__x != 0)
+ if (_M_impl._M_key_compare(__k, _S_key(__x)))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+ return const_iterator(__y);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator,
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ equal_range(const _Key& __k)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ while (__x != 0)
+ {
+ if (_M_impl._M_key_compare(_S_key(__x), __k))
+ __x = _S_right(__x);
+ else if (_M_impl._M_key_compare(__k, _S_key(__x)))
+ __y = __x, __x = _S_left(__x);
+ else
+ {
+ _Link_type __xu(__x), __yu(__y);
+ __y = __x, __x = _S_left(__x);
+ __xu = _S_right(__xu);
+ return pair<iterator,
+ iterator>(_M_lower_bound(__x, __y, __k),
+ _M_upper_bound(__xu, __yu, __k));
+ }
+ }
+ return pair<iterator, iterator>(iterator(__y),
+ iterator(__y));
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::const_iterator,
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::const_iterator>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ equal_range(const _Key& __k) const
+ {
+ _Const_Link_type __x = _M_begin();
+ _Const_Link_type __y = _M_end();
+ while (__x != 0)
+ {
+ if (_M_impl._M_key_compare(_S_key(__x), __k))
+ __x = _S_right(__x);
+ else if (_M_impl._M_key_compare(__k, _S_key(__x)))
+ __y = __x, __x = _S_left(__x);
+ else
+ {
+ _Const_Link_type __xu(__x), __yu(__y);
+ __y = __x, __x = _S_left(__x);
+ __xu = _S_right(__xu);
+ return pair<const_iterator,
+ const_iterator>(_M_lower_bound(__x, __y, __k),
+ _M_upper_bound(__xu, __yu, __k));
+ }
+ }
+ return pair<const_iterator, const_iterator>(const_iterator(__y),
+ const_iterator(__y));
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __t)
+#else
+ swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
+#endif
+ {
+ if (_M_root() == 0)
+ {
+ if (__t._M_root() != 0)
+ {
+ _M_root() = __t._M_root();
+ _M_leftmost() = __t._M_leftmost();
+ _M_rightmost() = __t._M_rightmost();
+ _M_root()->_M_parent = _M_end();
+
+ __t._M_root() = 0;
+ __t._M_leftmost() = __t._M_end();
+ __t._M_rightmost() = __t._M_end();
+ }
+ }
+ else if (__t._M_root() == 0)
+ {
+ __t._M_root() = _M_root();
+ __t._M_leftmost() = _M_leftmost();
+ __t._M_rightmost() = _M_rightmost();
+ __t._M_root()->_M_parent = __t._M_end();
+
+ _M_root() = 0;
+ _M_leftmost() = _M_end();
+ _M_rightmost() = _M_end();
+ }
+ else
+ {
+ std::swap(_M_root(),__t._M_root());
+ std::swap(_M_leftmost(),__t._M_leftmost());
+ std::swap(_M_rightmost(),__t._M_rightmost());
+
+ _M_root()->_M_parent = _M_end();
+ __t._M_root()->_M_parent = __t._M_end();
+ }
+ // No need to swap header's color as it does not change.
+ std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count);
+ std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<_Node_allocator>::
+ _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator());
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ pair<typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator, bool>
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_unique(const _Val& __v)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ bool __comp = true;
+ while (__x != 0)
+ {
+ __y = __x;
+ __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x));
+ __x = __comp ? _S_left(__x) : _S_right(__x);
+ }
+ iterator __j = iterator(__y);
+ if (__comp)
+ {
+ if (__j == begin())
+ return pair<iterator, bool>(_M_insert_(__x, __y, __v), true);
+ else
+ --__j;
+ }
+ if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
+ return pair<iterator, bool>(_M_insert_(__x, __y, __v), true);
+ return pair<iterator, bool>(__j, false);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_equal(const _Val& __v)
+ {
+ _Link_type __x = _M_begin();
+ _Link_type __y = _M_end();
+ while (__x != 0)
+ {
+ __y = __x;
+ __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ?
+ _S_left(__x) : _S_right(__x);
+ }
+ return _M_insert_(__x, __y, __v);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_unique_(const_iterator __position, const _Val& __v)
+ {
+ // end()
+ if (__position._M_node == _M_end())
+ {
+ if (size() > 0
+ && _M_impl._M_key_compare(_S_key(_M_rightmost()),
+ _KeyOfValue()(__v)))
+ return _M_insert_(0, _M_rightmost(), __v);
+ else
+ return _M_insert_unique(__v).first;
+ }
+ else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(__position._M_node)))
+ {
+ // First, try before...
+ const_iterator __before = __position;
+ if (__position._M_node == _M_leftmost()) // begin()
+ return _M_insert_(_M_leftmost(), _M_leftmost(), __v);
+ else if (_M_impl._M_key_compare(_S_key((--__before)._M_node),
+ _KeyOfValue()(__v)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert_(0, __before._M_node, __v);
+ else
+ return _M_insert_(__position._M_node,
+ __position._M_node, __v);
+ }
+ else
+ return _M_insert_unique(__v).first;
+ }
+ else if (_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ {
+ // ... then try after.
+ const_iterator __after = __position;
+ if (__position._M_node == _M_rightmost())
+ return _M_insert_(0, _M_rightmost(), __v);
+ else if (_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key((++__after)._M_node)))
+ {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert_(0, __position._M_node, __v);
+ else
+ return _M_insert_(__after._M_node, __after._M_node, __v);
+ }
+ else
+ return _M_insert_unique(__v).first;
+ }
+ else
+ // Equivalent keys.
+ return iterator(static_cast<_Link_type>
+ (const_cast<_Base_ptr>(__position._M_node)));
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ _M_insert_equal_(const_iterator __position, const _Val& __v)
+ {
+ // end()
+ if (__position._M_node == _M_end())
+ {
+ if (size() > 0
+ && !_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key(_M_rightmost())))
+ return _M_insert_(0, _M_rightmost(), __v);
+ else
+ return _M_insert_equal(__v);
+ }
+ else if (!_M_impl._M_key_compare(_S_key(__position._M_node),
+ _KeyOfValue()(__v)))
+ {
+ // First, try before...
+ const_iterator __before = __position;
+ if (__position._M_node == _M_leftmost()) // begin()
+ return _M_insert_(_M_leftmost(), _M_leftmost(), __v);
+ else if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
+ _S_key((--__before)._M_node)))
+ {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert_(0, __before._M_node, __v);
+ else
+ return _M_insert_(__position._M_node,
+ __position._M_node, __v);
+ }
+ else
+ return _M_insert_equal(__v);
+ }
+ else
+ {
+ // ... then try after.
+ const_iterator __after = __position;
+ if (__position._M_node == _M_rightmost())
+ return _M_insert_(0, _M_rightmost(), __v);
+ else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node),
+ _KeyOfValue()(__v)))
+ {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert_(0, __position._M_node, __v);
+ else
+ return _M_insert_(__after._M_node, __after._M_node, __v);
+ }
+ else
+ return _M_insert_equal_lower(__v);
+ }
+ }
+
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Cmp, typename _Alloc>
+ template<class _II>
+ void
+ _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>::
+ _M_insert_unique(_II __first, _II __last)
+ {
+ for (; __first != __last; ++__first)
+ _M_insert_unique_(end(), *__first);
+ }
+
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Cmp, typename _Alloc>
+ template<class _II>
+ void
+ _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>::
+ _M_insert_equal(_II __first, _II __last)
+ {
+ for (; __first != __last; ++__first)
+ _M_insert_equal_(end(), *__first);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(iterator __position)
+ {
+ _Link_type __y =
+ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase
+ (__position._M_node,
+ this->_M_impl._M_header));
+ _M_destroy_node(__y);
+ --_M_impl._M_node_count;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ inline void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(const_iterator __position)
+ {
+ _Link_type __y =
+ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase
+ (const_cast<_Base_ptr>(__position._M_node),
+ this->_M_impl._M_header));
+ _M_destroy_node(__y);
+ --_M_impl._M_node_count;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(const _Key& __x)
+ {
+ pair<iterator, iterator> __p = equal_range(__x);
+ const size_type __old_size = size();
+ erase(__p.first, __p.second);
+ return __old_size - size();
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(iterator __first, iterator __last)
+ {
+ if (__first == begin() && __last == end())
+ clear();
+ else
+ while (__first != __last)
+ erase(__first++);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(const_iterator __first, const_iterator __last)
+ {
+ if (__first == begin() && __last == end())
+ clear();
+ else
+ while (__first != __last)
+ erase(__first++);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ erase(const _Key* __first, const _Key* __last)
+ {
+ while (__first != __last)
+ erase(*__first++);
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ find(const _Key& __k)
+ {
+ iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
+ return (__j == end()
+ || _M_impl._M_key_compare(__k,
+ _S_key(__j._M_node))) ? end() : __j;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue,
+ _Compare, _Alloc>::const_iterator
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ find(const _Key& __k) const
+ {
+ const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
+ return (__j == end()
+ || _M_impl._M_key_compare(__k,
+ _S_key(__j._M_node))) ? end() : __j;
+ }
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type
+ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+ count(const _Key& __k) const
+ {
+ pair<const_iterator, const_iterator> __p = equal_range(__k);
+ const size_type __n = std::distance(__p.first, __p.second);
+ return __n;
+ }
+
+ unsigned int
+ _Rb_tree_black_count(const _Rb_tree_node_base* __node,
+ const _Rb_tree_node_base* __root);
+
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ bool
+ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
+ {
+ if (_M_impl._M_node_count == 0 || begin() == end())
+ return _M_impl._M_node_count == 0 && begin() == end()
+ && this->_M_impl._M_header._M_left == _M_end()
+ && this->_M_impl._M_header._M_right == _M_end();
+
+ unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root());
+ for (const_iterator __it = begin(); __it != end(); ++__it)
+ {
+ _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node);
+ _Const_Link_type __L = _S_left(__x);
+ _Const_Link_type __R = _S_right(__x);
+
+ if (__x->_M_color == _S_red)
+ if ((__L && __L->_M_color == _S_red)
+ || (__R && __R->_M_color == _S_red))
+ return false;
+
+ if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L)))
+ return false;
+ if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x)))
+ return false;
+
+ if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len)
+ return false;
+ }
+
+ if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
+ return false;
+ if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
+ return false;
+ return true;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_uninitialized.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_uninitialized.h
new file mode 100644
index 0000000..11a66c7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_uninitialized.h
@@ -0,0 +1,478 @@
+// Raw memory manipulators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file stl_uninitialized.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_UNINITIALIZED_H
+#define _STL_UNINITIALIZED_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<bool>
+ struct __uninitialized_copy
+ {
+ template<typename _InputIterator, typename _ForwardIterator>
+ static _ForwardIterator
+ uninitialized_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result)
+ {
+ _ForwardIterator __cur = __result;
+ __try
+ {
+ for (; __first != __last; ++__first, ++__cur)
+ ::new(static_cast<void*>(&*__cur)) typename
+ iterator_traits<_ForwardIterator>::value_type(*__first);
+ return __cur;
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
+ }
+ }
+ };
+
+ template<>
+ struct __uninitialized_copy<true>
+ {
+ template<typename _InputIterator, typename _ForwardIterator>
+ static _ForwardIterator
+ uninitialized_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result)
+ { return std::copy(__first, __last, __result); }
+ };
+
+ /**
+ * @brief Copies the range [first,last) into result.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return result + (first - last)
+ *
+ * Like copy(), but does not require an initialized output range.
+ */
+ template<typename _InputIterator, typename _ForwardIterator>
+ inline _ForwardIterator
+ uninitialized_copy(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result)
+ {
+ typedef typename iterator_traits<_InputIterator>::value_type
+ _ValueType1;
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType2;
+
+ return std::__uninitialized_copy<(__is_pod(_ValueType1)
+ && __is_pod(_ValueType2))>::
+ uninitialized_copy(__first, __last, __result);
+ }
+
+
+ template<bool>
+ struct __uninitialized_fill
+ {
+ template<typename _ForwardIterator, typename _Tp>
+ static void
+ uninitialized_fill(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __x)
+ {
+ _ForwardIterator __cur = __first;
+ __try
+ {
+ for (; __cur != __last; ++__cur)
+ std::_Construct(&*__cur, __x);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__first, __cur);
+ __throw_exception_again;
+ }
+ }
+ };
+
+ template<>
+ struct __uninitialized_fill<true>
+ {
+ template<typename _ForwardIterator, typename _Tp>
+ static void
+ uninitialized_fill(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __x)
+ { std::fill(__first, __last, __x); }
+ };
+
+ /**
+ * @brief Copies the value x into the range [first,last).
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param x The source value.
+ * @return Nothing.
+ *
+ * Like fill(), but does not require an initialized output range.
+ */
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __x)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+
+ std::__uninitialized_fill<__is_pod(_ValueType)>::
+ uninitialized_fill(__first, __last, __x);
+ }
+
+
+ template<bool>
+ struct __uninitialized_fill_n
+ {
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ static void
+ uninitialized_fill_n(_ForwardIterator __first, _Size __n,
+ const _Tp& __x)
+ {
+ _ForwardIterator __cur = __first;
+ __try
+ {
+ for (; __n > 0; --__n, ++__cur)
+ std::_Construct(&*__cur, __x);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__first, __cur);
+ __throw_exception_again;
+ }
+ }
+ };
+
+ template<>
+ struct __uninitialized_fill_n<true>
+ {
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ static void
+ uninitialized_fill_n(_ForwardIterator __first, _Size __n,
+ const _Tp& __x)
+ { std::fill_n(__first, __n, __x); }
+ };
+
+ /**
+ * @brief Copies the value x into the range [first,first+n).
+ * @param first An input iterator.
+ * @param n The number of copies to make.
+ * @param x The source value.
+ * @return Nothing.
+ *
+ * Like fill_n(), but does not require an initialized output range.
+ */
+ template<typename _ForwardIterator, typename _Size, typename _Tp>
+ inline void
+ uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
+ {
+ typedef typename iterator_traits<_ForwardIterator>::value_type
+ _ValueType;
+
+ std::__uninitialized_fill_n<__is_pod(_ValueType)>::
+ uninitialized_fill_n(__first, __n, __x);
+ }
+
+ // Extensions: versions of uninitialized_copy, uninitialized_fill,
+ // and uninitialized_fill_n that take an allocator parameter.
+ // We dispatch back to the standard versions when we're given the
+ // default allocator. For nondefault allocators we do not use
+ // any of the POD optimizations.
+
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _Allocator>
+ _ForwardIterator
+ __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result, _Allocator& __alloc)
+ {
+ _ForwardIterator __cur = __result;
+ __try
+ {
+ for (; __first != __last; ++__first, ++__cur)
+ __alloc.construct(&*__cur, *__first);
+ return __cur;
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __cur, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
+ inline _ForwardIterator
+ __uninitialized_copy_a(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result, allocator<_Tp>&)
+ { return std::uninitialized_copy(__first, __last, __result); }
+
+ template<typename _InputIterator, typename _ForwardIterator,
+ typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_move_a(_InputIterator __first, _InputIterator __last,
+ _ForwardIterator __result, _Allocator& __alloc)
+ {
+ return std::__uninitialized_copy_a(_GLIBCXX_MAKE_MOVE_ITERATOR(__first),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(__last),
+ __result, __alloc);
+ }
+
+ template<typename _ForwardIterator, typename _Tp, typename _Allocator>
+ void
+ __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __x, _Allocator& __alloc)
+ {
+ _ForwardIterator __cur = __first;
+ __try
+ {
+ for (; __cur != __last; ++__cur)
+ __alloc.construct(&*__cur, __x);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__first, __cur, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _ForwardIterator, typename _Tp, typename _Tp2>
+ inline void
+ __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __x, allocator<_Tp2>&)
+ { std::uninitialized_fill(__first, __last, __x); }
+
+ template<typename _ForwardIterator, typename _Size, typename _Tp,
+ typename _Allocator>
+ void
+ __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
+ const _Tp& __x, _Allocator& __alloc)
+ {
+ _ForwardIterator __cur = __first;
+ __try
+ {
+ for (; __n > 0; --__n, ++__cur)
+ __alloc.construct(&*__cur, __x);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__first, __cur, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _ForwardIterator, typename _Size, typename _Tp,
+ typename _Tp2>
+ inline void
+ __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n,
+ const _Tp& __x, allocator<_Tp2>&)
+ { std::uninitialized_fill_n(__first, __n, __x); }
+
+
+ // Extensions: __uninitialized_copy_move, __uninitialized_move_copy,
+ // __uninitialized_fill_move, __uninitialized_move_fill.
+ // All of these algorithms take a user-supplied allocator, which is used
+ // for construction and destruction.
+
+ // __uninitialized_copy_move
+ // Copies [first1, last1) into [result, result + (last1 - first1)), and
+ // move [first2, last2) into
+ // [result, result + (last1 - first1) + (last2 - first2)).
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _ForwardIterator, typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_copy_move(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _ForwardIterator __result,
+ _Allocator& __alloc)
+ {
+ _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1,
+ __result,
+ __alloc);
+ __try
+ {
+ return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ // __uninitialized_move_copy
+ // Moves [first1, last1) into [result, result + (last1 - first1)), and
+ // copies [first2, last2) into
+ // [result, result + (last1 - first1) + (last2 - first2)).
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _ForwardIterator, typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_move_copy(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2,
+ _ForwardIterator __result,
+ _Allocator& __alloc)
+ {
+ _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1,
+ __result,
+ __alloc);
+ __try
+ {
+ return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ // __uninitialized_fill_move
+ // Fills [result, mid) with x, and moves [first, last) into
+ // [mid, mid + (last - first)).
+ template<typename _ForwardIterator, typename _Tp, typename _InputIterator,
+ typename _Allocator>
+ inline _ForwardIterator
+ __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid,
+ const _Tp& __x, _InputIterator __first,
+ _InputIterator __last, _Allocator& __alloc)
+ {
+ std::__uninitialized_fill_a(__result, __mid, __x, __alloc);
+ __try
+ {
+ return std::__uninitialized_move_a(__first, __last, __mid, __alloc);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __mid, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ // __uninitialized_move_fill
+ // Moves [first1, last1) into [first2, first2 + (last1 - first1)), and
+ // fills [first2 + (last1 - first1), last2) with x.
+ template<typename _InputIterator, typename _ForwardIterator, typename _Tp,
+ typename _Allocator>
+ inline void
+ __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1,
+ _ForwardIterator __first2,
+ _ForwardIterator __last2, const _Tp& __x,
+ _Allocator& __alloc)
+ {
+ _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1,
+ __first2,
+ __alloc);
+ __try
+ {
+ std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__first2, __mid2, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _InputIterator, typename _Size,
+ typename _ForwardIterator>
+ _ForwardIterator
+ __uninitialized_copy_n(_InputIterator __first, _Size __n,
+ _ForwardIterator __result, input_iterator_tag)
+ {
+ _ForwardIterator __cur = __result;
+ __try
+ {
+ for (; __n > 0; --__n, ++__first, ++__cur)
+ ::new(static_cast<void*>(&*__cur)) typename
+ iterator_traits<_ForwardIterator>::value_type(*__first);
+ return __cur;
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _RandomAccessIterator, typename _Size,
+ typename _ForwardIterator>
+ inline _ForwardIterator
+ __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n,
+ _ForwardIterator __result,
+ random_access_iterator_tag)
+ { return std::uninitialized_copy(__first, __first + __n, __result); }
+
+ /**
+ * @brief Copies the range [first,first+n) into result.
+ * @param first An input iterator.
+ * @param n The number of elements to copy.
+ * @param result An output iterator.
+ * @return result + n
+ *
+ * Like copy_n(), but does not require an initialized output range.
+ */
+ template<typename _InputIterator, typename _Size, typename _ForwardIterator>
+ inline _ForwardIterator
+ uninitialized_copy_n(_InputIterator __first, _Size __n,
+ _ForwardIterator __result)
+ { return std::__uninitialized_copy_n(__first, __n, __result,
+ std::__iterator_category(__first)); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _STL_UNINITIALIZED_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_vector.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_vector.h
new file mode 100644
index 0000000..6871bb0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stl_vector.h
@@ -0,0 +1,1249 @@
+// Vector implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file stl_vector.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STL_VECTOR_H
+#define _STL_VECTOR_H 1
+
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/functexcept.h>
+#include <bits/concept_check.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /// See bits/stl_deque.h's _Deque_base for an explanation.
+ template<typename _Tp, typename _Alloc>
+ struct _Vector_base
+ {
+ typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type;
+
+ struct _Vector_impl
+ : public _Tp_alloc_type
+ {
+ typename _Tp_alloc_type::pointer _M_start;
+ typename _Tp_alloc_type::pointer _M_finish;
+ typename _Tp_alloc_type::pointer _M_end_of_storage;
+
+ _Vector_impl()
+ : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0)
+ { }
+
+ _Vector_impl(_Tp_alloc_type const& __a)
+ : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
+ { }
+ };
+
+ public:
+ typedef _Alloc allocator_type;
+
+ _Tp_alloc_type&
+ _M_get_Tp_allocator()
+ { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); }
+
+ const _Tp_alloc_type&
+ _M_get_Tp_allocator() const
+ { return *static_cast<const _Tp_alloc_type*>(&this->_M_impl); }
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_get_Tp_allocator()); }
+
+ _Vector_base()
+ : _M_impl() { }
+
+ _Vector_base(const allocator_type& __a)
+ : _M_impl(__a) { }
+
+ _Vector_base(size_t __n, const allocator_type& __a)
+ : _M_impl(__a)
+ {
+ this->_M_impl._M_start = this->_M_allocate(__n);
+ this->_M_impl._M_finish = this->_M_impl._M_start;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ _Vector_base(_Vector_base&& __x)
+ : _M_impl(__x._M_get_Tp_allocator())
+ {
+ this->_M_impl._M_start = __x._M_impl._M_start;
+ this->_M_impl._M_finish = __x._M_impl._M_finish;
+ this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage;
+ __x._M_impl._M_start = 0;
+ __x._M_impl._M_finish = 0;
+ __x._M_impl._M_end_of_storage = 0;
+ }
+#endif
+
+ ~_Vector_base()
+ { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start); }
+
+ public:
+ _Vector_impl _M_impl;
+
+ typename _Tp_alloc_type::pointer
+ _M_allocate(size_t __n)
+ { return __n != 0 ? _M_impl.allocate(__n) : 0; }
+
+ void
+ _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n)
+ {
+ if (__p)
+ _M_impl.deallocate(__p, __n);
+ }
+ };
+
+
+ /**
+ * @brief A standard container which offers fixed time access to
+ * individual elements in any order.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and a
+ * <a href="tables.html#67">sequence</a>, including the
+ * <a href="tables.html#68">optional sequence requirements</a> with the
+ * %exception of @c push_front and @c pop_front.
+ *
+ * In some terminology a %vector can be described as a dynamic
+ * C-style array, it offers fast and efficient access to individual
+ * elements in any order and saves the user from worrying about
+ * memory and size allocation. Subscripting ( @c [] ) access is
+ * also provided as with C-style arrays.
+ */
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ class vector : protected _Vector_base<_Tp, _Alloc>
+ {
+ // Concept requirements.
+ typedef typename _Alloc::value_type _Alloc_value_type;
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
+
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+
+ public:
+ typedef _Tp value_type;
+ typedef typename _Tp_alloc_type::pointer pointer;
+ typedef typename _Tp_alloc_type::const_pointer const_pointer;
+ typedef typename _Tp_alloc_type::reference reference;
+ typedef typename _Tp_alloc_type::const_reference const_reference;
+ typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
+ typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
+ const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Alloc allocator_type;
+
+ protected:
+ using _Base::_M_allocate;
+ using _Base::_M_deallocate;
+ using _Base::_M_impl;
+ using _Base::_M_get_Tp_allocator;
+
+ public:
+ // [23.2.4.1] construct/copy/destroy
+ // (assign() and get_allocator() are also listed in this section)
+ /**
+ * @brief Default constructor creates no elements.
+ */
+ vector()
+ : _Base() { }
+
+ /**
+ * @brief Creates a %vector with no elements.
+ * @param a An allocator object.
+ */
+ explicit
+ vector(const allocator_type& __a)
+ : _Base(__a) { }
+
+ /**
+ * @brief Creates a %vector with copies of an exemplar element.
+ * @param n The number of elements to initially create.
+ * @param value An element to copy.
+ * @param a An allocator.
+ *
+ * This constructor fills the %vector with @a n copies of @a value.
+ */
+ explicit
+ vector(size_type __n, const value_type& __value = value_type(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __a)
+ { _M_fill_initialize(__n, __value); }
+
+ /**
+ * @brief %Vector copy constructor.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * The newly-created %vector uses a copy of the allocation
+ * object used by @a x. All the elements of @a x are copied,
+ * but any extra memory in
+ * @a x (for fast expansion) will not be copied.
+ */
+ vector(const vector& __x)
+ : _Base(__x.size(), __x._M_get_Tp_allocator())
+ { this->_M_impl._M_finish =
+ std::__uninitialized_copy_a(__x.begin(), __x.end(),
+ this->_M_impl._M_start,
+ _M_get_Tp_allocator());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Vector move constructor.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * The newly-created %vector contains the exact contents of @a x.
+ * The contents of @a x are a valid, but unspecified %vector.
+ */
+ vector(vector&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ /**
+ * @brief Builds a %vector from an initializer list.
+ * @param l An initializer_list.
+ * @param a An allocator.
+ *
+ * Create a %vector consisting of copies of the elements in the
+ * initializer_list @a l.
+ *
+ * This will call the element type's copy constructor N times
+ * (where N is @a l.size()) and do no memory reallocation.
+ */
+ vector(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _M_range_initialize(__l.begin(), __l.end(),
+ random_access_iterator_tag());
+ }
+#endif
+
+ /**
+ * @brief Builds a %vector from a range.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param a An allocator.
+ *
+ * Create a %vector consisting of copies of the elements from
+ * [first,last).
+ *
+ * If the iterators are forward, bidirectional, or
+ * random-access, then this will call the elements' copy
+ * constructor N times (where N is distance(first,last)) and do
+ * no memory reallocation. But if only input iterators are
+ * used, then this will do at most 2N calls to the copy
+ * constructor, and logN memory reallocations.
+ */
+ template<typename _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+ /**
+ * The dtor only erases the elements, and note that if the
+ * elements themselves are pointers, the pointed-to memory is
+ * not touched in any way. Managing the pointer is the user's
+ * responsibility.
+ */
+ ~vector()
+ { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator()); }
+
+ /**
+ * @brief %Vector assignment operator.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * All the elements of @a x are copied, but any extra memory in
+ * @a x (for fast expansion) will not be copied. Unlike the
+ * copy constructor, the allocator object is not copied.
+ */
+ vector&
+ operator=(const vector& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief %Vector move assignment operator.
+ * @param x A %vector of identical element and allocator types.
+ *
+ * The contents of @a x are moved into this %vector (without copying).
+ * @a x is a valid, but unspecified %vector.
+ */
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ /**
+ * @brief %Vector list assignment operator.
+ * @param l An initializer_list.
+ *
+ * This function fills a %vector with copies of the elements in the
+ * initializer list @a l.
+ *
+ * Note that the assignment completely changes the %vector and
+ * that the resulting %vector's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ vector&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->assign(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /**
+ * @brief Assigns a given value to a %vector.
+ * @param n Number of elements to be assigned.
+ * @param val Value to be assigned.
+ *
+ * This function fills a %vector with @a n copies of the given
+ * value. Note that the assignment completely changes the
+ * %vector and that the resulting %vector's size is the same as
+ * the number of elements assigned. Old data may be lost.
+ */
+ void
+ assign(size_type __n, const value_type& __val)
+ { _M_fill_assign(__n, __val); }
+
+ /**
+ * @brief Assigns a range to a %vector.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function fills a %vector with copies of the elements in the
+ * range [first,last).
+ *
+ * Note that the assignment completely changes the %vector and
+ * that the resulting %vector's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Assigns an initializer list to a %vector.
+ * @param l An initializer_list.
+ *
+ * This function fills a %vector with copies of the elements in the
+ * initializer list @a l.
+ *
+ * Note that the assignment completely changes the %vector and
+ * that the resulting %vector's size is the same as the number
+ * of elements assigned. Old data may be lost.
+ */
+ void
+ assign(initializer_list<value_type> __l)
+ { this->assign(__l.begin(), __l.end()); }
+#endif
+
+ /// Get a copy of the memory allocation object.
+ using _Base::get_allocator;
+
+ // iterators
+ /**
+ * Returns a read/write iterator that points to the first
+ * element in the %vector. Iteration is done in ordinary
+ * element order.
+ */
+ iterator
+ begin()
+ { return iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %vector. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * element in the %vector. Iteration is done in ordinary
+ * element order.
+ */
+ iterator
+ end()
+ { return iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %vector. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ end() const
+ { return const_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the
+ * last element in the %vector. Iteration is done in reverse
+ * element order.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %vector. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one
+ * before the first element in the %vector. Iteration is done
+ * in reverse element order.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %vector. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the
+ * first element in the %vector. Iteration is done in ordinary
+ * element order.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_impl._M_start); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past
+ * the last element in the %vector. Iteration is done in
+ * ordinary element order.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(this->_M_impl._M_finish); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last element in the %vector. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first element in the %vector. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // [23.2.4.2] capacity
+ /** Returns the number of elements in the %vector. */
+ size_type
+ size() const
+ { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
+
+ /** Returns the size() of the largest possible %vector. */
+ size_type
+ max_size() const
+ { return _M_get_Tp_allocator().max_size(); }
+
+ /**
+ * @brief Resizes the %vector to the specified number of elements.
+ * @param new_size Number of elements the %vector should contain.
+ * @param x Data with which new elements should be populated.
+ *
+ * This function will %resize the %vector to the specified
+ * number of elements. If the number is smaller than the
+ * %vector's current size the %vector is truncated, otherwise
+ * the %vector is extended and new elements are populated with
+ * given data.
+ */
+ void
+ resize(size_type __new_size, value_type __x = value_type())
+ {
+ if (__new_size < size())
+ _M_erase_at_end(this->_M_impl._M_start + __new_size);
+ else
+ insert(end(), __new_size - size(), __x);
+ }
+
+ /**
+ * Returns the total number of elements that the %vector can
+ * hold before needing to allocate more memory.
+ */
+ size_type
+ capacity() const
+ { return size_type(this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start); }
+
+ /**
+ * Returns true if the %vector is empty. (Thus begin() would
+ * equal end().)
+ */
+ bool
+ empty() const
+ { return begin() == end(); }
+
+ /**
+ * @brief Attempt to preallocate enough memory for specified number of
+ * elements.
+ * @param n Number of elements required.
+ * @throw std::length_error If @a n exceeds @c max_size().
+ *
+ * This function attempts to reserve enough memory for the
+ * %vector to hold the specified number of elements. If the
+ * number requested is more than max_size(), length_error is
+ * thrown.
+ *
+ * The advantage of this function is that if optimal code is a
+ * necessity and the user can determine the number of elements
+ * that will be required, the user can reserve the memory in
+ * %advance, and thus prevent a possible reallocation of memory
+ * and copying of %vector data.
+ */
+ void
+ reserve(size_type __n);
+
+ // element access
+ /**
+ * @brief Subscript access to the data contained in the %vector.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read/write reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ *
+ * Local modification: range checks are performed if
+ * __google_stl_debug_vector is defined to non-zero.
+ */
+ reference
+ operator[](size_type __n)
+ {
+#if __google_stl_debug_vector
+ _M_range_check(__n);
+#endif
+ return *(this->_M_impl._M_start + __n);
+ }
+
+ /**
+ * @brief Subscript access to the data contained in the %vector.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read-only (constant) reference to data.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ *
+ * Local modification: range checks are performed if
+ * __google_stl_debug_vector is defined to non-zero.
+ */
+ const_reference
+ operator[](size_type __n) const
+ {
+#if __google_stl_debug_vector
+ _M_range_check(__n);
+#endif
+ return *(this->_M_impl._M_start + __n);
+ }
+
+ protected:
+ /// Safety check used only from at().
+ void
+ _M_range_check(size_type __n) const
+ {
+ if (__n >= this->size())
+ __throw_out_of_range(__N("vector::_M_range_check"));
+ }
+
+ public:
+ /**
+ * @brief Provides access to the data contained in the %vector.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read/write reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the vector. The
+ * function throws out_of_range if the check fails.
+ */
+ reference
+ at(size_type __n)
+ {
+ _M_range_check(__n);
+ return (*this)[__n];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %vector.
+ * @param n The index of the element for which data should be
+ * accessed.
+ * @return Read-only (constant) reference to data.
+ * @throw std::out_of_range If @a n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the vector. The
+ * function throws out_of_range if the check fails.
+ */
+ const_reference
+ at(size_type __n) const
+ {
+ _M_range_check(__n);
+ return (*this)[__n];
+ }
+
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %vector.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %vector.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last
+ * element of the %vector.
+ */
+ reference
+ back()
+ { return *(end() - 1); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the
+ * last element of the %vector.
+ */
+ const_reference
+ back() const
+ { return *(end() - 1); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ // data access
+ /**
+ * Returns a pointer such that [data(), data() + size()) is a valid
+ * range. For a non-empty %vector, data() == &front().
+ */
+ pointer
+ data()
+ { return pointer(this->_M_impl._M_start); }
+
+ const_pointer
+ data() const
+ { return const_pointer(this->_M_impl._M_start); }
+
+ // [23.2.4.3] modifiers
+ /**
+ * @brief Add data to the end of the %vector.
+ * @param x Data to be added.
+ *
+ * This is a typical stack operation. The function creates an
+ * element at the end of the %vector and assigns the given data
+ * to it. Due to the nature of a %vector this operation can be
+ * done in constant time if the %vector has preallocated space
+ * available.
+ */
+ void
+ push_back(const value_type& __x)
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(end(), __x);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_back(value_type&& __x)
+ { emplace_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args);
+#endif
+
+ /**
+ * @brief Removes last element.
+ *
+ * This is a typical stack operation. It shrinks the %vector by one.
+ *
+ * Note that no data is returned, and if the last element's
+ * data is needed, it should be retrieved before pop_back() is
+ * called.
+ */
+ void
+ pop_back()
+ {
+ --this->_M_impl._M_finish;
+ this->_M_impl.destroy(this->_M_impl._M_finish);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts an object in %vector before specified iterator.
+ * @param position An iterator into the %vector.
+ * @param args Arguments.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert an object of type T constructed
+ * with T(std::forward<Args>(args)...) before the specified location.
+ * Note that this kind of operation could be expensive for a %vector
+ * and if it is frequently used the user should consider using
+ * std::list.
+ */
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args);
+#endif
+
+ /**
+ * @brief Inserts given value into %vector before specified iterator.
+ * @param position An iterator into the %vector.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given value before
+ * the specified location. Note that this kind of operation
+ * could be expensive for a %vector and if it is frequently
+ * used the user should consider using std::list.
+ */
+ iterator
+ insert(iterator __position, const value_type& __x);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Inserts given rvalue into %vector before specified iterator.
+ * @param position An iterator into the %vector.
+ * @param x Data to be inserted.
+ * @return An iterator that points to the inserted data.
+ *
+ * This function will insert a copy of the given rvalue before
+ * the specified location. Note that this kind of operation
+ * could be expensive for a %vector and if it is frequently
+ * used the user should consider using std::list.
+ */
+ iterator
+ insert(iterator __position, value_type&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ /**
+ * @brief Inserts an initializer_list into the %vector.
+ * @param position An iterator into the %vector.
+ * @param l An initializer_list.
+ *
+ * This function will insert copies of the data in the
+ * initializer_list @a l into the %vector before the location
+ * specified by @a position.
+ *
+ * Note that this kind of operation could be expensive for a
+ * %vector and if it is frequently used the user should
+ * consider using std::list.
+ */
+ void
+ insert(iterator __position, initializer_list<value_type> __l)
+ { this->insert(__position, __l.begin(), __l.end()); }
+#endif
+
+ /**
+ * @brief Inserts a number of copies of given data into the %vector.
+ * @param position An iterator into the %vector.
+ * @param n Number of elements to be inserted.
+ * @param x Data to be inserted.
+ *
+ * This function will insert a specified number of copies of
+ * the given data before the location specified by @a position.
+ *
+ * Note that this kind of operation could be expensive for a
+ * %vector and if it is frequently used the user should
+ * consider using std::list.
+ */
+ void
+ insert(iterator __position, size_type __n, const value_type& __x)
+ { _M_fill_insert(__position, __n, __x); }
+
+ /**
+ * @brief Inserts a range into the %vector.
+ * @param position An iterator into the %vector.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ *
+ * This function will insert copies of the data in the range
+ * [first,last) into the %vector before the location specified
+ * by @a pos.
+ *
+ * Note that this kind of operation could be expensive for a
+ * %vector and if it is frequently used the user should
+ * consider using std::list.
+ */
+ template<typename _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+
+ /**
+ * @brief Remove element at given position.
+ * @param position Iterator pointing to element to be erased.
+ * @return An iterator pointing to the next element (or end()).
+ *
+ * This function will erase the element at the given position and thus
+ * shorten the %vector by one.
+ *
+ * Note This operation could be expensive and if it is
+ * frequently used the user should consider using std::list.
+ * The user is also cautioned that this function only erases
+ * the element, and that if the element is itself a pointer,
+ * the pointed-to memory is not touched in any way. Managing
+ * the pointer is the user's responsibility.
+ */
+ iterator
+ erase(iterator __position);
+
+ /**
+ * @brief Remove a range of elements.
+ * @param first Iterator pointing to the first element to be erased.
+ * @param last Iterator pointing to one past the last element to be
+ * erased.
+ * @return An iterator pointing to the element pointed to by @a last
+ * prior to erasing (or end()).
+ *
+ * This function will erase the elements in the range [first,last) and
+ * shorten the %vector accordingly.
+ *
+ * Note This operation could be expensive and if it is
+ * frequently used the user should consider using std::list.
+ * The user is also cautioned that this function only erases
+ * the elements, and that if the elements themselves are
+ * pointers, the pointed-to memory is not touched in any way.
+ * Managing the pointer is the user's responsibility.
+ */
+ iterator
+ erase(iterator __first, iterator __last);
+
+ /**
+ * @brief Swaps data with another %vector.
+ * @param x A %vector of the same element and allocator types.
+ *
+ * This exchanges the elements between two vectors in constant time.
+ * (Three pointers, so it should be quite fast.)
+ * Note that the global std::swap() function is specialized such that
+ * std::swap(v1,v2) will feed to this function.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
+ swap(vector& __x)
+#endif
+ {
+ std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
+ std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
+ std::swap(this->_M_impl._M_end_of_storage,
+ __x._M_impl._M_end_of_storage);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(),
+ __x._M_get_Tp_allocator());
+ }
+
+ /**
+ * Erases all the elements. Note that this function only erases the
+ * elements, and that if the elements themselves are pointers, the
+ * pointed-to memory is not touched in any way. Managing the pointer is
+ * the user's responsibility.
+ */
+ void
+ clear()
+ { _M_erase_at_end(this->_M_impl._M_start); }
+
+ protected:
+ /**
+ * Memory expansion handler. Uses the member allocation function to
+ * obtain @a n bytes of memory, and then copies [first,last) into it.
+ */
+ template<typename _ForwardIterator>
+ pointer
+ _M_allocate_and_copy(size_type __n,
+ _ForwardIterator __first, _ForwardIterator __last)
+ {
+ pointer __result = this->_M_allocate(__n);
+ __try
+ {
+ std::__uninitialized_copy_a(__first, __last, __result,
+ _M_get_Tp_allocator());
+ return __result;
+ }
+ __catch(...)
+ {
+ _M_deallocate(__result, __n);
+ __throw_exception_again;
+ }
+ }
+
+
+ // Internal constructor functions follow.
+
+ // Called by the range constructor to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
+ {
+ this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
+ this->_M_impl._M_end_of_storage =
+ this->_M_impl._M_start + static_cast<size_type>(__n);
+ _M_fill_initialize(static_cast<size_type>(__n), __value);
+ }
+
+ // Called by the range constructor to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_range_initialize(__first, __last, _IterCategory());
+ }
+
+ // Called by the second initialize_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_range_initialize(_InputIterator __first,
+ _InputIterator __last, std::input_iterator_tag)
+ {
+ for (; __first != __last; ++__first)
+ push_back(*__first);
+ }
+
+ // Called by the second initialize_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_initialize(_ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag)
+ {
+ const size_type __n = std::distance(__first, __last);
+ this->_M_impl._M_start = this->_M_allocate(__n);
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+ this->_M_impl._M_finish =
+ std::__uninitialized_copy_a(__first, __last,
+ this->_M_impl._M_start,
+ _M_get_Tp_allocator());
+ }
+
+ // Called by the first initialize_dispatch above and by the
+ // vector(n,value,a) constructor.
+ void
+ _M_fill_initialize(size_type __n, const value_type& __value)
+ {
+ std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish = this->_M_impl._M_end_of_storage;
+ }
+
+
+ // Internal assign functions follow. The *_aux functions do the actual
+ // assignment work for the range versions.
+
+ // Called by the range assign to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ { _M_fill_assign(__n, __val); }
+
+ // Called by the range assign to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_assign_aux(__first, __last, _IterCategory());
+ }
+
+ // Called by the second assign_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag);
+
+ // Called by the second assign_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag);
+
+ // Called by assign(n,t), and the range assign when it turns out
+ // to be the same thing.
+ void
+ _M_fill_assign(size_type __n, const value_type& __val);
+
+
+ // Internal insert functions follow.
+
+ // Called by the range insert to implement [23.1.1]/9
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ __true_type)
+ { _M_fill_insert(__pos, __n, __val); }
+
+ // Called by the range insert to implement [23.1.1]/9
+ template<typename _InputIterator>
+ void
+ _M_insert_dispatch(iterator __pos, _InputIterator __first,
+ _InputIterator __last, __false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::
+ iterator_category _IterCategory;
+ _M_range_insert(__pos, __first, __last, _IterCategory());
+ }
+
+ // Called by the second insert_dispatch above
+ template<typename _InputIterator>
+ void
+ _M_range_insert(iterator __pos, _InputIterator __first,
+ _InputIterator __last, std::input_iterator_tag);
+
+ // Called by the second insert_dispatch above
+ template<typename _ForwardIterator>
+ void
+ _M_range_insert(iterator __pos, _ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag);
+
+ // Called by insert(p,n,x), and the range insert when it turns out to be
+ // the same thing.
+ void
+ _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
+
+ // Called by insert(p,x)
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ _M_insert_aux(iterator __position, const value_type& __x);
+#else
+ template<typename... _Args>
+ void
+ _M_insert_aux(iterator __position, _Args&&... __args);
+#endif
+
+ // Called by the latter.
+ size_type
+ _M_check_len(size_type __n, const char* __s) const
+ {
+ if (max_size() - size() < __n)
+ __throw_length_error(__N(__s));
+
+ const size_type __len = size() + std::max(size(), __n);
+ return (__len < size() || __len > max_size()) ? max_size() : __len;
+ }
+
+ // Internal erase functions follow.
+
+ // Called by erase(q1,q2), clear(), resize(), _M_fill_assign,
+ // _M_assign_aux.
+ void
+ _M_erase_at_end(pointer __pos)
+ {
+ std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator());
+ this->_M_impl._M_finish = __pos;
+ }
+ };
+
+
+ /**
+ * @brief Vector equality comparison.
+ * @param x A %vector.
+ * @param y A %vector of the same type as @a x.
+ * @return True iff the size and elements of the vectors are equal.
+ *
+ * This is an equivalence relation. It is linear in the size of the
+ * vectors. Vectors are considered equivalent if their sizes are equal,
+ * and if corresponding elements compare equal.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return (__x.size() == __y.size()
+ && std::equal(__x.begin(), __x.end(), __y.begin())); }
+
+ /**
+ * @brief Vector ordering relation.
+ * @param x A %vector.
+ * @param y A %vector of the same type as @a x.
+ * @return True iff @a x is lexicographically less than @a y.
+ *
+ * This is a total ordering relation. It is linear in the size of the
+ * vectors. The elements must be comparable with @c <.
+ *
+ * See std::lexicographical_compare() for how the determination is made.
+ */
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return std::lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()); }
+
+ /// Based on operator==
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return __y < __x; }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ /// Based on operator<
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ /// See std::vector::swap().
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>&& __x, vector<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _STL_VECTOR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stream_iterator.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stream_iterator.h
new file mode 100644
index 0000000..fce6c26
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stream_iterator.h
@@ -0,0 +1,211 @@
+// Stream iterators
+
+// Copyright (C) 2001, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stream_iterator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STREAM_ITERATOR_H
+#define _STREAM_ITERATOR_H 1
+
+#pragma GCC system_header
+
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// Provides input iterator semantics for streams.
+ template<typename _Tp, typename _CharT = char,
+ typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
+ class istream_iterator
+ : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
+ {
+ public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef basic_istream<_CharT, _Traits> istream_type;
+
+ private:
+ istream_type* _M_stream;
+ _Tp _M_value;
+ bool _M_ok;
+
+ public:
+ /// Construct end of input stream iterator.
+ istream_iterator()
+ : _M_stream(0), _M_value(), _M_ok(false) {}
+
+ /// Construct start of input stream iterator.
+ istream_iterator(istream_type& __s)
+ : _M_stream(&__s)
+ { _M_read(); }
+
+ istream_iterator(const istream_iterator& __obj)
+ : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
+ _M_ok(__obj._M_ok)
+ { }
+
+ const _Tp&
+ operator*() const
+ {
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_deref_istream)
+ ._M_iterator(*this));
+ return _M_value;
+ }
+
+ const _Tp*
+ operator->() const { return &(operator*()); }
+
+ istream_iterator&
+ operator++()
+ {
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_inc_istream)
+ ._M_iterator(*this));
+ _M_read();
+ return *this;
+ }
+
+ istream_iterator
+ operator++(int)
+ {
+ __glibcxx_requires_cond(_M_ok,
+ _M_message(__gnu_debug::__msg_inc_istream)
+ ._M_iterator(*this));
+ istream_iterator __tmp = *this;
+ _M_read();
+ return __tmp;
+ }
+
+ bool
+ _M_equal(const istream_iterator& __x) const
+ { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
+
+ private:
+ void
+ _M_read()
+ {
+ _M_ok = (_M_stream && *_M_stream) ? true : false;
+ if (_M_ok)
+ {
+ *_M_stream >> _M_value;
+ _M_ok = *_M_stream ? true : false;
+ }
+ }
+ };
+
+ /// Return true if x and y are both end or not end, or x and y are the same.
+ template<typename _Tp, typename _CharT, typename _Traits, typename _Dist>
+ inline bool
+ operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
+ const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
+ { return __x._M_equal(__y); }
+
+ /// Return false if x and y are both end or not end, or x and y are the same.
+ template <class _Tp, class _CharT, class _Traits, class _Dist>
+ inline bool
+ operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
+ const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y)
+ { return !__x._M_equal(__y); }
+
+ /**
+ * @brief Provides output iterator semantics for streams.
+ *
+ * This class provides an iterator to write to an ostream. The type Tp is
+ * the only type written by this iterator and there must be an
+ * operator<<(Tp) defined.
+ *
+ * @param Tp The type to write to the ostream.
+ * @param CharT The ostream char_type.
+ * @param Traits The ostream char_traits.
+ */
+ template<typename _Tp, typename _CharT = char,
+ typename _Traits = char_traits<_CharT> >
+ class ostream_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ public:
+ //@{
+ /// Public typedef
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef basic_ostream<_CharT, _Traits> ostream_type;
+ //@}
+
+ private:
+ ostream_type* _M_stream;
+ const _CharT* _M_string;
+
+ public:
+ /// Construct from an ostream.
+ ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
+
+ /**
+ * Construct from an ostream.
+ *
+ * The delimiter string @a c is written to the stream after every Tp
+ * written to the stream. The delimiter is not copied, and thus must
+ * not be destroyed while this iterator is in use.
+ *
+ * @param s Underlying ostream to write to.
+ * @param c CharT delimiter string to insert.
+ */
+ ostream_iterator(ostream_type& __s, const _CharT* __c)
+ : _M_stream(&__s), _M_string(__c) { }
+
+ /// Copy constructor.
+ ostream_iterator(const ostream_iterator& __obj)
+ : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
+
+ /// Writes @a value to underlying ostream using operator<<. If
+ /// constructed with delimiter string, writes delimiter to ostream.
+ ostream_iterator&
+ operator=(const _Tp& __value)
+ {
+ __glibcxx_requires_cond(_M_stream != 0,
+ _M_message(__gnu_debug::__msg_output_ostream)
+ ._M_iterator(*this));
+ *_M_stream << __value;
+ if (_M_string) *_M_stream << _M_string;
+ return *this;
+ }
+
+ ostream_iterator&
+ operator*()
+ { return *this; }
+
+ ostream_iterator&
+ operator++()
+ { return *this; }
+
+ ostream_iterator&
+ operator++(int)
+ { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf.tcc
new file mode 100644
index 0000000..f3e6ce7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf.tcc
@@ -0,0 +1,174 @@
+// Stream buffer classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file streambuf.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 27.5 Stream buffers
+//
+
+#ifndef _STREAMBUF_TCC
+#define _STREAMBUF_TCC 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_streambuf<_CharT, _Traits>::
+ xsgetn(char_type* __s, streamsize __n)
+ {
+ streamsize __ret = 0;
+ while (__ret < __n)
+ {
+ const streamsize __buf_len = this->egptr() - this->gptr();
+ if (__buf_len)
+ {
+ const streamsize __remaining = __n - __ret;
+ const streamsize __len = std::min(__buf_len, __remaining);
+ traits_type::copy(__s, this->gptr(), __len);
+ __ret += __len;
+ __s += __len;
+ this->gbump(__len);
+ }
+
+ if (__ret < __n)
+ {
+ const int_type __c = this->uflow();
+ if (!traits_type::eq_int_type(__c, traits_type::eof()))
+ {
+ traits_type::assign(*__s++, traits_type::to_char_type(__c));
+ ++__ret;
+ }
+ else
+ break;
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ basic_streambuf<_CharT, _Traits>::
+ xsputn(const char_type* __s, streamsize __n)
+ {
+ streamsize __ret = 0;
+ while (__ret < __n)
+ {
+ const streamsize __buf_len = this->epptr() - this->pptr();
+ if (__buf_len)
+ {
+ const streamsize __remaining = __n - __ret;
+ const streamsize __len = std::min(__buf_len, __remaining);
+ traits_type::copy(this->pptr(), __s, __len);
+ __ret += __len;
+ __s += __len;
+ this->pbump(__len);
+ }
+
+ if (__ret < __n)
+ {
+ int_type __c = this->overflow(traits_type::to_int_type(*__s));
+ if (!traits_type::eq_int_type(__c, traits_type::eof()))
+ {
+ ++__ret;
+ ++__s;
+ }
+ else
+ break;
+ }
+ }
+ return __ret;
+ }
+
+ // Conceivably, this could be used to implement buffer-to-buffer
+ // copies, if this was ever desired in an un-ambiguous way by the
+ // standard.
+ template<typename _CharT, typename _Traits>
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin,
+ basic_streambuf<_CharT, _Traits>* __sbout,
+ bool& __ineof)
+ {
+ streamsize __ret = 0;
+ __ineof = true;
+ typename _Traits::int_type __c = __sbin->sgetc();
+ while (!_Traits::eq_int_type(__c, _Traits::eof()))
+ {
+ __c = __sbout->sputc(_Traits::to_char_type(__c));
+ if (_Traits::eq_int_type(__c, _Traits::eof()))
+ {
+ __ineof = false;
+ break;
+ }
+ ++__ret;
+ __c = __sbin->snextc();
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline streamsize
+ __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
+ basic_streambuf<_CharT, _Traits>* __sbout)
+ {
+ bool __ineof;
+ return __copy_streambufs_eof(__sbin, __sbout, __ineof);
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class basic_streambuf<char>;
+ extern template
+ streamsize
+ __copy_streambufs(basic_streambuf<char>*,
+ basic_streambuf<char>*);
+ extern template
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<char>*,
+ basic_streambuf<char>*, bool&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class basic_streambuf<wchar_t>;
+ extern template
+ streamsize
+ __copy_streambufs(basic_streambuf<wchar_t>*,
+ basic_streambuf<wchar_t>*);
+ extern template
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<wchar_t>*,
+ basic_streambuf<wchar_t>*, bool&);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf_iterator.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf_iterator.h
new file mode 100644
index 0000000..d02b555
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/streambuf_iterator.h
@@ -0,0 +1,392 @@
+// Streambuf iterators
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file streambuf_iterator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STREAMBUF_ITERATOR_H
+#define _STREAMBUF_ITERATOR_H 1
+
+#pragma GCC system_header
+
+#include <streambuf>
+#include <debug/debug.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // 24.5.3 Template class istreambuf_iterator
+ /// Provides input iterator semantics for streambufs.
+ template<typename _CharT, typename _Traits>
+ class istreambuf_iterator
+ : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
+ _CharT*, _CharT&>
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename _Traits::int_type int_type;
+ typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+ typedef basic_istream<_CharT, _Traits> istream_type;
+ //@}
+
+ template<typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ ostreambuf_iterator<_CharT2> >::__type
+ copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
+ ostreambuf_iterator<_CharT2>);
+
+ template<bool _IsMove, typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ _CharT2*>::__type
+ __copy_move_a2(istreambuf_iterator<_CharT2>,
+ istreambuf_iterator<_CharT2>, _CharT2*);
+
+ template<typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ istreambuf_iterator<_CharT2> >::__type
+ find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
+ const _CharT2&);
+
+ private:
+ // 24.5.3 istreambuf_iterator
+ // p 1
+ // If the end of stream is reached (streambuf_type::sgetc()
+ // returns traits_type::eof()), the iterator becomes equal to
+ // the "end of stream" iterator value.
+ // NB: This implementation assumes the "end of stream" value
+ // is EOF, or -1.
+ mutable streambuf_type* _M_sbuf;
+ mutable int_type _M_c;
+
+ public:
+ /// Construct end of input stream iterator.
+ istreambuf_iterator() throw()
+ : _M_sbuf(0), _M_c(traits_type::eof()) { }
+
+ /// Construct start of input stream iterator.
+ istreambuf_iterator(istream_type& __s) throw()
+ : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
+
+ /// Construct start of streambuf iterator.
+ istreambuf_iterator(streambuf_type* __s) throw()
+ : _M_sbuf(__s), _M_c(traits_type::eof()) { }
+
+ /// Return the current character pointed to by iterator. This returns
+ /// streambuf.sgetc(). It cannot be assigned. NB: The result of
+ /// operator*() on an end of stream is undefined.
+ char_type
+ operator*() const
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ // Dereferencing a past-the-end istreambuf_iterator is a
+ // libstdc++ extension
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_deref_istreambuf)
+ ._M_iterator(*this));
+#endif
+ return traits_type::to_char_type(_M_get());
+ }
+
+ /// Advance the iterator. Calls streambuf.sbumpc().
+ istreambuf_iterator&
+ operator++()
+ {
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_inc_istreambuf)
+ ._M_iterator(*this));
+ if (_M_sbuf)
+ {
+ _M_sbuf->sbumpc();
+ _M_c = traits_type::eof();
+ }
+ return *this;
+ }
+
+ /// Advance the iterator. Calls streambuf.sbumpc().
+ istreambuf_iterator
+ operator++(int)
+ {
+ __glibcxx_requires_cond(!_M_at_eof(),
+ _M_message(__gnu_debug::__msg_inc_istreambuf)
+ ._M_iterator(*this));
+
+ istreambuf_iterator __old = *this;
+ if (_M_sbuf)
+ {
+ __old._M_c = _M_sbuf->sbumpc();
+ _M_c = traits_type::eof();
+ }
+ return __old;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 110 istreambuf_iterator::equal not const
+ // NB: there is also number 111 (NAD, Future) pending on this function.
+ /// Return true both iterators are end or both are not end.
+ bool
+ equal(const istreambuf_iterator& __b) const
+ { return _M_at_eof() == __b._M_at_eof(); }
+
+ private:
+ int_type
+ _M_get() const
+ {
+ const int_type __eof = traits_type::eof();
+ int_type __ret = __eof;
+ if (_M_sbuf)
+ {
+ if (!traits_type::eq_int_type(_M_c, __eof))
+ __ret = _M_c;
+ else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()),
+ __eof))
+ _M_c = __ret;
+ else
+ _M_sbuf = 0;
+ }
+ return __ret;
+ }
+
+ bool
+ _M_at_eof() const
+ {
+ const int_type __eof = traits_type::eof();
+ return traits_type::eq_int_type(_M_get(), __eof);
+ }
+ };
+
+ template<typename _CharT, typename _Traits>
+ inline bool
+ operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
+ const istreambuf_iterator<_CharT, _Traits>& __b)
+ { return __a.equal(__b); }
+
+ template<typename _CharT, typename _Traits>
+ inline bool
+ operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
+ const istreambuf_iterator<_CharT, _Traits>& __b)
+ { return !__a.equal(__b); }
+
+ /// Provides output iterator semantics for streambufs.
+ template<typename _CharT, typename _Traits>
+ class ostreambuf_iterator
+ : public iterator<output_iterator_tag, void, void, void, void>
+ {
+ public:
+ // Types:
+ //@{
+ /// Public typedefs
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+ typedef basic_ostream<_CharT, _Traits> ostream_type;
+ //@}
+
+ template<typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ ostreambuf_iterator<_CharT2> >::__type
+ copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
+ ostreambuf_iterator<_CharT2>);
+
+ private:
+ streambuf_type* _M_sbuf;
+ bool _M_failed;
+
+ public:
+ /// Construct output iterator from ostream.
+ ostreambuf_iterator(ostream_type& __s) throw ()
+ : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
+
+ /// Construct output iterator from streambuf.
+ ostreambuf_iterator(streambuf_type* __s) throw ()
+ : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
+
+ /// Write character to streambuf. Calls streambuf.sputc().
+ ostreambuf_iterator&
+ operator=(_CharT __c)
+ {
+ if (!_M_failed &&
+ _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
+ _M_failed = true;
+ return *this;
+ }
+
+ /// Return *this.
+ ostreambuf_iterator&
+ operator*()
+ { return *this; }
+
+ /// Return *this.
+ ostreambuf_iterator&
+ operator++(int)
+ { return *this; }
+
+ /// Return *this.
+ ostreambuf_iterator&
+ operator++()
+ { return *this; }
+
+ /// Return true if previous operator=() failed.
+ bool
+ failed() const throw()
+ { return _M_failed; }
+
+ ostreambuf_iterator&
+ _M_put(const _CharT* __ws, streamsize __len)
+ {
+ if (__builtin_expect(!_M_failed, true)
+ && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
+ false))
+ _M_failed = true;
+ return *this;
+ }
+ };
+
+ // Overloads for streambuf iterators.
+ template<typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ ostreambuf_iterator<_CharT> >::__type
+ copy(istreambuf_iterator<_CharT> __first,
+ istreambuf_iterator<_CharT> __last,
+ ostreambuf_iterator<_CharT> __result)
+ {
+ if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
+ {
+ bool __ineof;
+ __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
+ if (!__ineof)
+ __result._M_failed = true;
+ }
+ return __result;
+ }
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ ostreambuf_iterator<_CharT> >::__type
+ __copy_move_a2(_CharT* __first, _CharT* __last,
+ ostreambuf_iterator<_CharT> __result)
+ {
+ const streamsize __num = __last - __first;
+ if (__num > 0)
+ __result._M_put(__first, __num);
+ return __result;
+ }
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ ostreambuf_iterator<_CharT> >::__type
+ __copy_move_a2(const _CharT* __first, const _CharT* __last,
+ ostreambuf_iterator<_CharT> __result)
+ {
+ const streamsize __num = __last - __first;
+ if (__num > 0)
+ __result._M_put(__first, __num);
+ return __result;
+ }
+
+ template<bool _IsMove, typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ _CharT*>::__type
+ __copy_move_a2(istreambuf_iterator<_CharT> __first,
+ istreambuf_iterator<_CharT> __last, _CharT* __result)
+ {
+ typedef istreambuf_iterator<_CharT> __is_iterator_type;
+ typedef typename __is_iterator_type::traits_type traits_type;
+ typedef typename __is_iterator_type::streambuf_type streambuf_type;
+ typedef typename traits_type::int_type int_type;
+
+ if (__first._M_sbuf && !__last._M_sbuf)
+ {
+ streambuf_type* __sb = __first._M_sbuf;
+ int_type __c = __sb->sgetc();
+ while (!traits_type::eq_int_type(__c, traits_type::eof()))
+ {
+ const streamsize __n = __sb->egptr() - __sb->gptr();
+ if (__n > 1)
+ {
+ traits_type::copy(__result, __sb->gptr(), __n);
+ __sb->gbump(__n);
+ __result += __n;
+ __c = __sb->underflow();
+ }
+ else
+ {
+ *__result++ = traits_type::to_char_type(__c);
+ __c = __sb->snextc();
+ }
+ }
+ }
+ return __result;
+ }
+
+ template<typename _CharT>
+ typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
+ istreambuf_iterator<_CharT> >::__type
+ find(istreambuf_iterator<_CharT> __first,
+ istreambuf_iterator<_CharT> __last, const _CharT& __val)
+ {
+ typedef istreambuf_iterator<_CharT> __is_iterator_type;
+ typedef typename __is_iterator_type::traits_type traits_type;
+ typedef typename __is_iterator_type::streambuf_type streambuf_type;
+ typedef typename traits_type::int_type int_type;
+
+ if (__first._M_sbuf && !__last._M_sbuf)
+ {
+ const int_type __ival = traits_type::to_int_type(__val);
+ streambuf_type* __sb = __first._M_sbuf;
+ int_type __c = __sb->sgetc();
+ while (!traits_type::eq_int_type(__c, traits_type::eof())
+ && !traits_type::eq_int_type(__c, __ival))
+ {
+ streamsize __n = __sb->egptr() - __sb->gptr();
+ if (__n > 1)
+ {
+ const _CharT* __p = traits_type::find(__sb->gptr(),
+ __n, __val);
+ if (__p)
+ __n = __p - __sb->gptr();
+ __sb->gbump(__n);
+ __c = __sb->sgetc();
+ }
+ else
+ __c = __sb->snextc();
+ }
+
+ if (!traits_type::eq_int_type(__c, traits_type::eof()))
+ __first._M_c = __c;
+ else
+ __first._M_sbuf = 0;
+ }
+ return __first;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/stringfwd.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stringfwd.h
new file mode 100644
index 0000000..c63e777
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/stringfwd.h
@@ -0,0 +1,77 @@
+// String support -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stringfwd.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+#ifndef _STRINGFWD_H
+#define _STRINGFWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Alloc>
+ class allocator;
+
+ template<class _CharT>
+ struct char_traits;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_string;
+
+ template<> struct char_traits<char>;
+
+ typedef basic_string<char> string;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<> struct char_traits<wchar_t>;
+
+ typedef basic_string<wchar_t> wstring;
+#endif
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+ && defined(_GLIBCXX_USE_C99_STDINT_TR1))
+
+ template<> struct char_traits<char16_t>;
+ template<> struct char_traits<char32_t>;
+
+ typedef basic_string<char16_t> u16string;
+ typedef basic_string<char32_t> u32string;
+
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _STRINGFWD_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/unique_ptr.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/unique_ptr.h
new file mode 100644
index 0000000..b686d11
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/unique_ptr.h
@@ -0,0 +1,450 @@
+// unique_ptr implementation -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file unique_ptr.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _UNIQUE_PTR_H
+#define _UNIQUE_PTR_H 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#include <bits/c++config.h>
+#include <debug/debug.h>
+#include <type_traits>
+#include <utility>
+#include <tuple>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup pointer_abstractions
+ * @{
+ */
+
+ /// Primary template, default_delete.
+ template<typename _Tp>
+ struct default_delete
+ {
+ default_delete() { }
+
+ template<typename _Up>
+ default_delete(const default_delete<_Up>&) { }
+
+ void
+ operator()(_Tp* __ptr) const
+ {
+ static_assert(sizeof(_Tp)>0,
+ "can't delete pointer to incomplete type");
+ delete __ptr;
+ }
+ };
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 740 - omit specialization for array objects with a compile time length
+ /// Specialization, default_delete.
+ template<typename _Tp>
+ struct default_delete<_Tp[]>
+ {
+ void
+ operator()(_Tp* __ptr) const
+ {
+ static_assert(sizeof(_Tp)>0,
+ "can't delete pointer to incomplete type");
+ delete [] __ptr;
+ }
+ };
+
+ /// 20.7.12.2 unique_ptr for single objects.
+ template <typename _Tp, typename _Tp_Deleter = default_delete<_Tp> >
+ class unique_ptr
+ {
+ typedef std::tuple<_Tp*, _Tp_Deleter> __tuple_type;
+ typedef __tuple_type unique_ptr::* __unspecified_bool_type;
+ typedef _Tp* unique_ptr::* __unspecified_pointer_type;
+
+ public:
+ typedef _Tp* pointer;
+ typedef _Tp element_type;
+ typedef _Tp_Deleter deleter_type;
+
+ // Constructors.
+ unique_ptr()
+ : _M_t(pointer(), deleter_type())
+ { static_assert(!std::is_pointer<deleter_type>::value,
+ "constructed with null function pointer deleter"); }
+
+ explicit
+ unique_ptr(pointer __p)
+ : _M_t(__p, deleter_type())
+ { static_assert(!std::is_pointer<deleter_type>::value,
+ "constructed with null function pointer deleter"); }
+
+ unique_ptr(pointer __p,
+ typename std::conditional<std::is_reference<deleter_type>::value,
+ deleter_type, const deleter_type&>::type __d)
+ : _M_t(__p, __d) { }
+
+ unique_ptr(pointer __p,
+ typename std::remove_reference<deleter_type>::type&& __d)
+ : _M_t(std::move(__p), std::move(__d))
+ { static_assert(!std::is_reference<deleter_type>::value,
+ "rvalue deleter bound to reference"); }
+
+ // Move constructors.
+ unique_ptr(unique_ptr&& __u)
+ : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { }
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr(unique_ptr<_Up, _Up_Deleter>&& __u)
+ : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
+ { }
+
+ // Destructor.
+ ~unique_ptr() { reset(); }
+
+ // Assignment.
+ unique_ptr&
+ operator=(unique_ptr&& __u)
+ {
+ reset(__u.release());
+ get_deleter() = std::move(__u.get_deleter());
+ return *this;
+ }
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr&
+ operator=(unique_ptr<_Up, _Up_Deleter>&& __u)
+ {
+ reset(__u.release());
+ get_deleter() = std::move(__u.get_deleter());
+ return *this;
+ }
+
+ unique_ptr&
+ operator=(__unspecified_pointer_type)
+ {
+ reset();
+ return *this;
+ }
+
+ // Observers.
+ typename std::add_lvalue_reference<element_type>::type operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(get() != 0);
+ return *get();
+ }
+
+ pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(get() != 0);
+ return get();
+ }
+
+ pointer
+ get() const
+ { return std::get<0>(_M_t); }
+
+ typename std::add_lvalue_reference<deleter_type>::type
+ get_deleter()
+ { return std::get<1>(_M_t); }
+
+ typename std::add_lvalue_reference<
+ typename std::add_const<deleter_type>::type
+ >::type
+ get_deleter() const
+ { return std::get<1>(_M_t); }
+
+ operator __unspecified_bool_type () const
+ { return get() == 0 ? 0 : &unique_ptr::_M_t; }
+
+ // Modifiers.
+ pointer
+ release()
+ {
+ pointer __p = get();
+ std::get<0>(_M_t) = 0;
+ return __p;
+ }
+
+ void
+ reset(pointer __p = pointer())
+ {
+ if (__p != get())
+ {
+ get_deleter()(get());
+ std::get<0>(_M_t) = __p;
+ }
+ }
+
+ void
+ swap(unique_ptr&& __u)
+ {
+ using std::swap;
+ swap(_M_t, __u._M_t);
+ }
+
+ // Disable copy from lvalue.
+ unique_ptr(const unique_ptr&) = delete;
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr(const unique_ptr<_Up, _Up_Deleter>&) = delete;
+
+ unique_ptr& operator=(const unique_ptr&) = delete;
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr& operator=(const unique_ptr<_Up, _Up_Deleter>&) = delete;
+
+ private:
+ __tuple_type _M_t;
+ };
+
+ /// 20.7.12.3 unique_ptr for array objects with a runtime length
+ // [unique.ptr.runtime]
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 740 - omit specialization for array objects with a compile time length
+ template<typename _Tp, typename _Tp_Deleter>
+ class unique_ptr<_Tp[], _Tp_Deleter>
+ {
+ typedef std::tuple<_Tp*, _Tp_Deleter> __tuple_type;
+ typedef __tuple_type unique_ptr::* __unspecified_bool_type;
+ typedef _Tp* unique_ptr::* __unspecified_pointer_type;
+
+ public:
+ typedef _Tp* pointer;
+ typedef _Tp element_type;
+ typedef _Tp_Deleter deleter_type;
+
+ // Constructors.
+ unique_ptr()
+ : _M_t(pointer(), deleter_type())
+ { static_assert(!std::is_pointer<deleter_type>::value,
+ "constructed with null function pointer deleter"); }
+
+ explicit
+ unique_ptr(pointer __p)
+ : _M_t(__p, deleter_type())
+ { static_assert(!std::is_pointer<deleter_type>::value,
+ "constructed with null function pointer deleter"); }
+
+ unique_ptr(pointer __p,
+ typename std::conditional<std::is_reference<deleter_type>::value,
+ deleter_type, const deleter_type&>::type __d)
+ : _M_t(__p, __d) { }
+
+ unique_ptr(pointer __p,
+ typename std::remove_reference<deleter_type>::type && __d)
+ : _M_t(std::move(__p), std::move(__d))
+ { static_assert(!std::is_reference<deleter_type>::value,
+ "rvalue deleter bound to reference"); }
+
+ // Move constructors.
+ unique_ptr(unique_ptr&& __u)
+ : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter())) { }
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr(unique_ptr<_Up, _Up_Deleter>&& __u)
+ : _M_t(__u.release(), std::forward<deleter_type>(__u.get_deleter()))
+ { }
+
+ // Destructor.
+ ~unique_ptr() { reset(); }
+
+ // Assignment.
+ unique_ptr&
+ operator=(unique_ptr&& __u)
+ {
+ reset(__u.release());
+ get_deleter() = std::move(__u.get_deleter());
+ return *this;
+ }
+
+ template<typename _Up, typename _Up_Deleter>
+ unique_ptr&
+ operator=(unique_ptr<_Up, _Up_Deleter>&& __u)
+ {
+ reset(__u.release());
+ get_deleter() = std::move(__u.get_deleter());
+ return *this;
+ }
+
+ unique_ptr&
+ operator=(__unspecified_pointer_type)
+ {
+ reset();
+ return *this;
+ }
+
+ // Observers.
+ typename std::add_lvalue_reference<element_type>::type
+ operator[](size_t __i) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(get() != 0);
+ return get()[__i];
+ }
+
+ pointer
+ get() const
+ { return std::get<0>(_M_t); }
+
+ typename std::add_lvalue_reference<deleter_type>::type
+ get_deleter()
+ { return std::get<1>(_M_t); }
+
+ typename std::add_lvalue_reference<
+ typename std::add_const<deleter_type>::type
+ >::type
+ get_deleter() const
+ { return std::get<1>(_M_t); }
+
+ operator __unspecified_bool_type () const
+ { return get() == 0 ? 0 : &unique_ptr::_M_t; }
+
+ // Modifiers.
+ pointer
+ release()
+ {
+ pointer __p = get();
+ std::get<0>(_M_t) = 0;
+ return __p;
+ }
+
+ void
+ reset(pointer __p = pointer())
+ {
+ if (__p != get())
+ {
+ get_deleter()(get());
+ std::get<0>(_M_t) = __p;
+ }
+ }
+
+ // DR 821.
+ template<typename _Up>
+ void reset(_Up) = delete;
+
+ void
+ swap(unique_ptr&& __u)
+ {
+ using std::swap;
+ swap(_M_t, __u._M_t);
+ }
+
+ // Disable copy from lvalue.
+ unique_ptr(const unique_ptr&) = delete;
+ unique_ptr& operator=(const unique_ptr&) = delete;
+
+ // Disable construction from convertible pointer types.
+ // (N2315 - 20.6.5.3.1)
+ template<typename _Up>
+ unique_ptr(_Up*, typename
+ std::conditional<std::is_reference<deleter_type>::value,
+ deleter_type, const deleter_type&>::type,
+ typename std::enable_if<std::is_convertible<_Up*,
+ pointer>::value>::type* = 0) = delete;
+
+ template<typename _Up>
+ unique_ptr(_Up*, typename std::remove_reference<deleter_type>::type&&,
+ typename std::enable_if<std::is_convertible<_Up*,
+ pointer>::value>::type* = 0) = delete;
+
+ template<typename _Up>
+ explicit
+ unique_ptr(_Up*, typename std::enable_if<std::is_convertible<_Up*,
+ pointer>::value>::type* = 0) = delete;
+
+ private:
+ __tuple_type _M_t;
+ };
+
+ template<typename _Tp, typename _Tp_Deleter>
+ inline void
+ swap(unique_ptr<_Tp, _Tp_Deleter>& __x,
+ unique_ptr<_Tp, _Tp_Deleter>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Tp_Deleter>
+ inline void
+ swap(unique_ptr<_Tp, _Tp_Deleter>&& __x,
+ unique_ptr<_Tp, _Tp_Deleter>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Tp_Deleter>
+ inline void
+ swap(unique_ptr<_Tp, _Tp_Deleter>& __x,
+ unique_ptr<_Tp, _Tp_Deleter>&& __y)
+ { __x.swap(__y); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator==(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return __x.get() == __y.get(); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator!=(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return !(__x.get() == __y.get()); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator<(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return __x.get() < __y.get(); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator<=(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return !(__y.get() < __x.get()); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator>(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return __y.get() < __x.get(); }
+
+ template<typename _Tp, typename _Tp_Deleter,
+ typename _Up, typename _Up_Deleter>
+ inline bool
+ operator>=(const unique_ptr<_Tp, _Tp_Deleter>& __x,
+ const unique_ptr<_Up, _Up_Deleter>& __y)
+ { return !(__x.get() < __y.get()); }
+
+ // @} group pointer_abstractions
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _UNIQUE_PTR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_after.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_after.h
new file mode 100644
index 0000000..e4093f1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_after.h
@@ -0,0 +1,549 @@
+// The template and inlines for the -*- C++ -*- internal _Meta class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file valarray_after.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
+
+#ifndef _VALARRAY_AFTER_H
+#define _VALARRAY_AFTER_H 1
+
+#pragma GCC system_header
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ //
+ // gslice_array closure.
+ //
+ template<class _Dom>
+ class _GBase
+ {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _GBase (const _Dom& __e, const valarray<size_t>& __i)
+ : _M_expr (__e), _M_index(__i) {}
+
+ value_type
+ operator[] (size_t __i) const
+ { return _M_expr[_M_index[__i]]; }
+
+ size_t
+ size () const
+ { return _M_index.size(); }
+
+ private:
+ const _Dom& _M_expr;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<typename _Tp>
+ class _GBase<_Array<_Tp> >
+ {
+ public:
+ typedef _Tp value_type;
+
+ _GBase (_Array<_Tp> __a, const valarray<size_t>& __i)
+ : _M_array (__a), _M_index(__i) {}
+
+ value_type
+ operator[] (size_t __i) const
+ { return _M_array._M_data[_M_index[__i]]; }
+
+ size_t
+ size () const
+ { return _M_index.size(); }
+
+ private:
+ const _Array<_Tp> _M_array;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<class _Dom>
+ struct _GClos<_Expr, _Dom>
+ : _GBase<_Dom>
+ {
+ typedef _GBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _GClos (const _Dom& __e, const valarray<size_t>& __i)
+ : _Base (__e, __i) {}
+ };
+
+ template<typename _Tp>
+ struct _GClos<_ValArray, _Tp>
+ : _GBase<_Array<_Tp> >
+ {
+ typedef _GBase<_Array<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _GClos (_Array<_Tp> __a, const valarray<size_t>& __i)
+ : _Base (__a, __i) {}
+ };
+
+ //
+ // indirect_array closure
+ //
+ template<class _Dom>
+ class _IBase
+ {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _IBase (const _Dom& __e, const valarray<size_t>& __i)
+ : _M_expr (__e), _M_index (__i) {}
+
+ value_type
+ operator[] (size_t __i) const
+ { return _M_expr[_M_index[__i]]; }
+
+ size_t
+ size() const
+ { return _M_index.size(); }
+
+ private:
+ const _Dom& _M_expr;
+ const valarray<size_t>& _M_index;
+ };
+
+ template<class _Dom>
+ struct _IClos<_Expr, _Dom>
+ : _IBase<_Dom>
+ {
+ typedef _IBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _IClos (const _Dom& __e, const valarray<size_t>& __i)
+ : _Base (__e, __i) {}
+ };
+
+ template<typename _Tp>
+ struct _IClos<_ValArray, _Tp>
+ : _IBase<valarray<_Tp> >
+ {
+ typedef _IBase<valarray<_Tp> > _Base;
+ typedef _Tp value_type;
+
+ _IClos (const valarray<_Tp>& __a, const valarray<size_t>& __i)
+ : _Base (__a, __i) {}
+ };
+
+ //
+ // class _Expr
+ //
+ template<class _Clos, typename _Tp>
+ class _Expr
+ {
+ public:
+ typedef _Tp value_type;
+
+ _Expr(const _Clos&);
+
+ const _Clos& operator()() const;
+
+ value_type operator[](size_t) const;
+ valarray<value_type> operator[](slice) const;
+ valarray<value_type> operator[](const gslice&) const;
+ valarray<value_type> operator[](const valarray<bool>&) const;
+ valarray<value_type> operator[](const valarray<size_t>&) const;
+
+ _Expr<_UnClos<__unary_plus, std::_Expr, _Clos>, value_type>
+ operator+() const;
+
+ _Expr<_UnClos<__negate, std::_Expr, _Clos>, value_type>
+ operator-() const;
+
+ _Expr<_UnClos<__bitwise_not, std::_Expr, _Clos>, value_type>
+ operator~() const;
+
+ _Expr<_UnClos<__logical_not, std::_Expr, _Clos>, bool>
+ operator!() const;
+
+ size_t size() const;
+ value_type sum() const;
+
+ valarray<value_type> shift(int) const;
+ valarray<value_type> cshift(int) const;
+
+ value_type min() const;
+ value_type max() const;
+
+ valarray<value_type> apply(value_type (*)(const value_type&)) const;
+ valarray<value_type> apply(value_type (*)(value_type)) const;
+
+ private:
+ const _Clos _M_closure;
+ };
+
+ template<class _Clos, typename _Tp>
+ inline
+ _Expr<_Clos, _Tp>::_Expr(const _Clos& __c) : _M_closure(__c) {}
+
+ template<class _Clos, typename _Tp>
+ inline const _Clos&
+ _Expr<_Clos, _Tp>::operator()() const
+ { return _M_closure; }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::operator[](size_t __i) const
+ { return _M_closure[__i]; }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::operator[](slice __s) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this)[__s];
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::operator[](const gslice& __gs) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this)[__gs];
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::operator[](const valarray<bool>& __m) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this)[__m];
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::operator[](const valarray<size_t>& __i) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this)[__i];
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline size_t
+ _Expr<_Clos, _Tp>::size() const
+ { return _M_closure.size(); }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::shift(int __n) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this).shift(__n);
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::cshift(int __n) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this).cshift(__n);
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
+ return __v;
+ }
+
+ template<class _Clos, typename _Tp>
+ inline valarray<_Tp>
+ _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const
+ {
+ valarray<_Tp> __v = valarray<_Tp>(*this).apply(__f);
+ return __v;
+ }
+
+ // XXX: replace this with a more robust summation algorithm.
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::sum() const
+ {
+ size_t __n = _M_closure.size();
+ if (__n == 0)
+ return _Tp();
+ else
+ {
+ _Tp __s = _M_closure[--__n];
+ while (__n != 0)
+ __s += _M_closure[--__n];
+ return __s;
+ }
+ }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::min() const
+ { return __valarray_min(_M_closure); }
+
+ template<class _Clos, typename _Tp>
+ inline _Tp
+ _Expr<_Clos, _Tp>::max() const
+ { return __valarray_max(_M_closure); }
+
+ template<class _Dom, typename _Tp>
+ inline _Expr<_UnClos<__logical_not, _Expr, _Dom>, bool>
+ _Expr<_Dom, _Tp>::operator!() const
+ {
+ typedef _UnClos<__logical_not, std::_Expr, _Dom> _Closure;
+ return _Expr<_Closure, bool>(_Closure(this->_M_closure));
+ }
+
+#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name) \
+ template<class _Dom, typename _Tp> \
+ inline _Expr<_UnClos<_Name, std::_Expr, _Dom>, _Tp> \
+ _Expr<_Dom, _Tp>::operator _Op() const \
+ { \
+ typedef _UnClos<_Name, std::_Expr, _Dom> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(this->_M_closure)); \
+ }
+
+ _DEFINE_EXPR_UNARY_OPERATOR(+, __unary_plus)
+ _DEFINE_EXPR_UNARY_OPERATOR(-, __negate)
+ _DEFINE_EXPR_UNARY_OPERATOR(~, __bitwise_not)
+
+#undef _DEFINE_EXPR_UNARY_OPERATOR
+
+#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name) \
+ template<class _Dom1, class _Dom2> \
+ inline _Expr<_BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2>, \
+ typename __fun<_Name, typename _Dom1::value_type>::result_type> \
+ operator _Op(const _Expr<_Dom1, typename _Dom1::value_type>& __v, \
+ const _Expr<_Dom2, typename _Dom2::value_type>& __w) \
+ { \
+ typedef typename _Dom1::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
+ return _Expr<_Closure, _Value>(_Closure(__v(), __w())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<_Name, _Expr, _Constant, _Dom, \
+ typename _Dom::value_type>, \
+ typename __fun<_Name, typename _Dom::value_type>::result_type> \
+ operator _Op(const _Expr<_Dom, typename _Dom::value_type>& __v, \
+ const typename _Dom::value_type& __t) \
+ { \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name, _Expr, _Constant, _Dom, _Arg> _Closure; \
+ return _Expr<_Closure, _Value>(_Closure(__v(), __t)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<_Name, _Constant, _Expr, \
+ typename _Dom::value_type, _Dom>, \
+ typename __fun<_Name, typename _Dom::value_type>::result_type> \
+ operator _Op(const typename _Dom::value_type& __t, \
+ const _Expr<_Dom, typename _Dom::value_type>& __v) \
+ { \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name, _Constant, _Expr, _Arg, _Dom> _Closure; \
+ return _Expr<_Closure, _Value>(_Closure(__t, __v())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<_Name, _Expr, _ValArray, \
+ _Dom, typename _Dom::value_type>, \
+ typename __fun<_Name, typename _Dom::value_type>::result_type> \
+ operator _Op(const _Expr<_Dom,typename _Dom::value_type>& __e, \
+ const valarray<typename _Dom::value_type>& __v) \
+ { \
+ typedef typename _Dom::value_type _Arg; \
+ typedef typename __fun<_Name, _Arg>::result_type _Value; \
+ typedef _BinClos<_Name, _Expr, _ValArray, _Dom, _Arg> _Closure; \
+ return _Expr<_Closure, _Value>(_Closure(__e(), __v)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<_Name, _ValArray, _Expr, \
+ typename _Dom::value_type, _Dom>, \
+ typename __fun<_Name, typename _Dom::value_type>::result_type> \
+ operator _Op(const valarray<typename _Dom::value_type>& __v, \
+ const _Expr<_Dom, typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef typename __fun<_Name, _Tp>::result_type _Value; \
+ typedef _BinClos<_Name, _ValArray, _Expr, _Tp, _Dom> _Closure; \
+ return _Expr<_Closure, _Value>(_Closure(__v, __e ())); \
+ }
+
+ _DEFINE_EXPR_BINARY_OPERATOR(+, __plus)
+ _DEFINE_EXPR_BINARY_OPERATOR(-, __minus)
+ _DEFINE_EXPR_BINARY_OPERATOR(*, __multiplies)
+ _DEFINE_EXPR_BINARY_OPERATOR(/, __divides)
+ _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
+ _DEFINE_EXPR_BINARY_OPERATOR(^, __bitwise_xor)
+ _DEFINE_EXPR_BINARY_OPERATOR(&, __bitwise_and)
+ _DEFINE_EXPR_BINARY_OPERATOR(|, __bitwise_or)
+ _DEFINE_EXPR_BINARY_OPERATOR(<<, __shift_left)
+ _DEFINE_EXPR_BINARY_OPERATOR(>>, __shift_right)
+ _DEFINE_EXPR_BINARY_OPERATOR(&&, __logical_and)
+ _DEFINE_EXPR_BINARY_OPERATOR(||, __logical_or)
+ _DEFINE_EXPR_BINARY_OPERATOR(==, __equal_to)
+ _DEFINE_EXPR_BINARY_OPERATOR(!=, __not_equal_to)
+ _DEFINE_EXPR_BINARY_OPERATOR(<, __less)
+ _DEFINE_EXPR_BINARY_OPERATOR(>, __greater)
+ _DEFINE_EXPR_BINARY_OPERATOR(<=, __less_equal)
+ _DEFINE_EXPR_BINARY_OPERATOR(>=, __greater_equal)
+
+#undef _DEFINE_EXPR_BINARY_OPERATOR
+
+#define _DEFINE_EXPR_UNARY_FUNCTION(_Name) \
+ template<class _Dom> \
+ inline _Expr<_UnClos<__##_Name, _Expr, _Dom>, \
+ typename _Dom::value_type> \
+ _Name(const _Expr<_Dom, typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _UnClos<__##_Name, _Expr, _Dom> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__e())); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_UnClos<__##_Name, _ValArray, _Tp>, _Tp> \
+ _Name(const valarray<_Tp>& __v) \
+ { \
+ typedef _UnClos<__##_Name, _ValArray, _Tp> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__v)); \
+ }
+
+ _DEFINE_EXPR_UNARY_FUNCTION(abs)
+ _DEFINE_EXPR_UNARY_FUNCTION(cos)
+ _DEFINE_EXPR_UNARY_FUNCTION(acos)
+ _DEFINE_EXPR_UNARY_FUNCTION(cosh)
+ _DEFINE_EXPR_UNARY_FUNCTION(sin)
+ _DEFINE_EXPR_UNARY_FUNCTION(asin)
+ _DEFINE_EXPR_UNARY_FUNCTION(sinh)
+ _DEFINE_EXPR_UNARY_FUNCTION(tan)
+ _DEFINE_EXPR_UNARY_FUNCTION(tanh)
+ _DEFINE_EXPR_UNARY_FUNCTION(atan)
+ _DEFINE_EXPR_UNARY_FUNCTION(exp)
+ _DEFINE_EXPR_UNARY_FUNCTION(log)
+ _DEFINE_EXPR_UNARY_FUNCTION(log10)
+ _DEFINE_EXPR_UNARY_FUNCTION(sqrt)
+
+#undef _DEFINE_EXPR_UNARY_FUNCTION
+
+#define _DEFINE_EXPR_BINARY_FUNCTION(_Fun) \
+ template<class _Dom1, class _Dom2> \
+ inline _Expr<_BinClos<__##_Fun, _Expr, _Expr, _Dom1, _Dom2>, \
+ typename _Dom1::value_type> \
+ _Fun(const _Expr<_Dom1, typename _Dom1::value_type>& __e1, \
+ const _Expr<_Dom2, typename _Dom2::value_type>& __e2) \
+ { \
+ typedef typename _Dom1::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Expr, _Expr, _Dom1, _Dom2> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__e1(), __e2())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _Expr, _ValArray, _Dom, \
+ typename _Dom::value_type>, \
+ typename _Dom::value_type> \
+ _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
+ const valarray<typename _Dom::value_type>& __v) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Expr, _ValArray, _Dom, _Tp> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__e(), __v)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _ValArray, _Expr, \
+ typename _Dom::value_type, _Dom>, \
+ typename _Dom::value_type> \
+ _Fun(const valarray<typename _Dom::valarray>& __v, \
+ const _Expr<_Dom, typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _ValArray, _Expr, _Tp, _Dom> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__v, __e())); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _Expr, _Constant, _Dom, \
+ typename _Dom::value_type>, \
+ typename _Dom::value_type> \
+ _Fun(const _Expr<_Dom, typename _Dom::value_type>& __e, \
+ const typename _Dom::value_type& __t) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Expr, _Constant, _Dom, _Tp> _Closure;\
+ return _Expr<_Closure, _Tp>(_Closure(__e(), __t)); \
+ } \
+ \
+ template<class _Dom> \
+ inline _Expr<_BinClos<__##_Fun, _Constant, _Expr, \
+ typename _Dom::value_type, _Dom>, \
+ typename _Dom::value_type> \
+ _Fun(const typename _Dom::value_type& __t, \
+ const _Expr<_Dom, typename _Dom::value_type>& __e) \
+ { \
+ typedef typename _Dom::value_type _Tp; \
+ typedef _BinClos<__##_Fun, _Constant, _Expr, _Tp, _Dom> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__t, __e())); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun, _ValArray, _ValArray, _Tp, _Tp>, _Tp> \
+ _Fun(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
+ { \
+ typedef _BinClos<__##_Fun, _ValArray, _ValArray, _Tp, _Tp> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__v, __w)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun, _ValArray, _Constant, _Tp, _Tp>, _Tp> \
+ _Fun(const valarray<_Tp>& __v, const _Tp& __t) \
+ { \
+ typedef _BinClos<__##_Fun, _ValArray, _Constant, _Tp, _Tp> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__v, __t)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<__##_Fun, _Constant, _ValArray, _Tp, _Tp>, _Tp> \
+ _Fun(const _Tp& __t, const valarray<_Tp>& __v) \
+ { \
+ typedef _BinClos<__##_Fun, _Constant, _ValArray, _Tp, _Tp> _Closure; \
+ return _Expr<_Closure, _Tp>(_Closure(__t, __v)); \
+ }
+
+_DEFINE_EXPR_BINARY_FUNCTION(atan2)
+_DEFINE_EXPR_BINARY_FUNCTION(pow)
+
+#undef _DEFINE_EXPR_BINARY_FUNCTION
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _CPP_VALARRAY_AFTER_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.h
new file mode 100644
index 0000000..492891b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.h
@@ -0,0 +1,699 @@
+// The template and inlines for the -*- C++ -*- internal _Array helper class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file valarray_array.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _VALARRAY_ARRAY_H
+#define _VALARRAY_ARRAY_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+#include <cstdlib>
+#include <new>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ //
+ // Helper functions on raw pointers
+ //
+
+ // We get memory by the old fashion way
+ inline void*
+ __valarray_get_memory(size_t __n)
+ { return operator new(__n); }
+
+ template<typename _Tp>
+ inline _Tp*__restrict__
+ __valarray_get_storage(size_t __n)
+ {
+ return static_cast<_Tp*__restrict__>
+ (std::__valarray_get_memory(__n * sizeof(_Tp)));
+ }
+
+ // Return memory to the system
+ inline void
+ __valarray_release_memory(void* __p)
+ { operator delete(__p); }
+
+ // Turn a raw-memory into an array of _Tp filled with _Tp()
+ // This is required in 'valarray<T> v(n);'
+ template<typename _Tp, bool>
+ struct _Array_default_ctor
+ {
+ // Please note that this isn't exception safe. But
+ // valarrays aren't required to be exception safe.
+ inline static void
+ _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+ {
+ while (__b != __e)
+ new(__b++) _Tp();
+ }
+ };
+
+ template<typename _Tp>
+ struct _Array_default_ctor<_Tp, true>
+ {
+ // For fundamental types, it suffices to say 'memset()'
+ inline static void
+ _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+ { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); }
+ };
+
+ template<typename _Tp>
+ inline void
+ __valarray_default_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+ {
+ _Array_default_ctor<_Tp, __is_scalar<_Tp>::__value>::_S_do_it(__b, __e);
+ }
+
+ // Turn a raw-memory into an array of _Tp filled with __t
+ // This is the required in valarray<T> v(n, t). Also
+ // used in valarray<>::resize().
+ template<typename _Tp, bool>
+ struct _Array_init_ctor
+ {
+ // Please note that this isn't exception safe. But
+ // valarrays aren't required to be exception safe.
+ inline static void
+ _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t)
+ {
+ while (__b != __e)
+ new(__b++) _Tp(__t);
+ }
+ };
+
+ template<typename _Tp>
+ struct _Array_init_ctor<_Tp, true>
+ {
+ inline static void
+ _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t)
+ {
+ while (__b != __e)
+ *__b++ = __t;
+ }
+ };
+
+ template<typename _Tp>
+ inline void
+ __valarray_fill_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e,
+ const _Tp __t)
+ {
+ _Array_init_ctor<_Tp, __is_pod(_Tp)>::_S_do_it(__b, __e, __t);
+ }
+
+ //
+ // copy-construct raw array [__o, *) from plain array [__b, __e)
+ // We can't just say 'memcpy()'
+ //
+ template<typename _Tp, bool>
+ struct _Array_copy_ctor
+ {
+ // Please note that this isn't exception safe. But
+ // valarrays aren't required to be exception safe.
+ inline static void
+ _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
+ _Tp* __restrict__ __o)
+ {
+ while (__b != __e)
+ new(__o++) _Tp(*__b++);
+ }
+ };
+
+ template<typename _Tp>
+ struct _Array_copy_ctor<_Tp, true>
+ {
+ inline static void
+ _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
+ _Tp* __restrict__ __o)
+ { __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); }
+ };
+
+ template<typename _Tp>
+ inline void
+ __valarray_copy_construct(const _Tp* __restrict__ __b,
+ const _Tp* __restrict__ __e,
+ _Tp* __restrict__ __o)
+ {
+ _Array_copy_ctor<_Tp, __is_pod(_Tp)>::_S_do_it(__b, __e, __o);
+ }
+
+ // copy-construct raw array [__o, *) from strided array __a[<__n : __s>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n,
+ size_t __s, _Tp* __restrict__ __o)
+ {
+ if (__is_pod(_Tp))
+ while (__n--)
+ {
+ *__o++ = *__a;
+ __a += __s;
+ }
+ else
+ while (__n--)
+ {
+ new(__o++) _Tp(*__a);
+ __a += __s;
+ }
+ }
+
+ // copy-construct raw array [__o, *) from indexed array __a[__i[<__n>]]
+ template<typename _Tp>
+ inline void
+ __valarray_copy_construct (const _Tp* __restrict__ __a,
+ const size_t* __restrict__ __i,
+ _Tp* __restrict__ __o, size_t __n)
+ {
+ if (__is_pod(_Tp))
+ while (__n--)
+ *__o++ = __a[*__i++];
+ else
+ while (__n--)
+ new (__o++) _Tp(__a[*__i++]);
+ }
+
+ // Do the necessary cleanup when we're done with arrays.
+ template<typename _Tp>
+ inline void
+ __valarray_destroy_elements(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+ {
+ if (!__is_pod(_Tp))
+ while (__b != __e)
+ {
+ __b->~_Tp();
+ ++__b;
+ }
+ }
+
+ // Fill a plain array __a[<__n>] with __t
+ template<typename _Tp>
+ inline void
+ __valarray_fill(_Tp* __restrict__ __a, size_t __n, const _Tp& __t)
+ {
+ while (__n--)
+ *__a++ = __t;
+ }
+
+ // fill strided array __a[<__n-1 : __s>] with __t
+ template<typename _Tp>
+ inline void
+ __valarray_fill(_Tp* __restrict__ __a, size_t __n,
+ size_t __s, const _Tp& __t)
+ {
+ for (size_t __i = 0; __i < __n; ++__i, __a += __s)
+ *__a = __t;
+ }
+
+ // fill indirect array __a[__i[<__n>]] with __i
+ template<typename _Tp>
+ inline void
+ __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
+ size_t __n, const _Tp& __t)
+ {
+ for (size_t __j = 0; __j < __n; ++__j, ++__i)
+ __a[*__i] = __t;
+ }
+
+ // copy plain array __a[<__n>] in __b[<__n>]
+ // For non-fundamental types, it is wrong to say 'memcpy()'
+ template<typename _Tp, bool>
+ struct _Array_copier
+ {
+ inline static void
+ _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
+ {
+ while(__n--)
+ *__b++ = *__a++;
+ }
+ };
+
+ template<typename _Tp>
+ struct _Array_copier<_Tp, true>
+ {
+ inline static void
+ _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
+ { __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); }
+ };
+
+ // Copy a plain array __a[<__n>] into a play array __b[<>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
+ _Tp* __restrict__ __b)
+ {
+ _Array_copier<_Tp, __is_pod(_Tp)>::_S_do_it(__a, __n, __b);
+ }
+
+ // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s,
+ _Tp* __restrict__ __b)
+ {
+ for (size_t __i = 0; __i < __n; ++__i, ++__b, __a += __s)
+ *__b = *__a;
+ }
+
+ // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b,
+ size_t __n, size_t __s)
+ {
+ for (size_t __i = 0; __i < __n; ++__i, ++__a, __b += __s)
+ *__b = *__a;
+ }
+
+ // Copy strided array __src[<__n : __s1>] into another
+ // strided array __dst[< : __s2>]. Their sizes must match.
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1,
+ _Tp* __restrict__ __dst, size_t __s2)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ __dst[__i * __s2] = __src[__i * __s1];
+ }
+
+ // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __a,
+ const size_t* __restrict__ __i,
+ _Tp* __restrict__ __b, size_t __n)
+ {
+ for (size_t __j = 0; __j < __n; ++__j, ++__b, ++__i)
+ *__b = __a[*__i];
+ }
+
+ // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
+ _Tp* __restrict__ __b, const size_t* __restrict__ __i)
+ {
+ for (size_t __j = 0; __j < __n; ++__j, ++__a, ++__i)
+ __b[*__i] = *__a;
+ }
+
+ // Copy the __n first elements of an indexed array __src[<__i>] into
+ // another indexed array __dst[<__j>].
+ template<typename _Tp>
+ inline void
+ __valarray_copy(const _Tp* __restrict__ __src, size_t __n,
+ const size_t* __restrict__ __i,
+ _Tp* __restrict__ __dst, const size_t* __restrict__ __j)
+ {
+ for (size_t __k = 0; __k < __n; ++__k)
+ __dst[*__j++] = __src[*__i++];
+ }
+
+ //
+ // Compute the sum of elements in range [__f, __l)
+ // This is a naive algorithm. It suffers from cancelling.
+ // In the future try to specialize
+ // for _Tp = float, double, long double using a more accurate
+ // algorithm.
+ //
+ template<typename _Tp>
+ inline _Tp
+ __valarray_sum(const _Tp* __restrict__ __f, const _Tp* __restrict__ __l)
+ {
+ _Tp __r = _Tp();
+ while (__f != __l)
+ __r += *__f++;
+ return __r;
+ }
+
+ // Compute the product of all elements in range [__f, __l)
+ template<typename _Tp>
+ inline _Tp
+ __valarray_product(const _Tp* __restrict__ __f,
+ const _Tp* __restrict__ __l)
+ {
+ _Tp __r = _Tp(1);
+ while (__f != __l)
+ __r = __r * *__f++;
+ return __r;
+ }
+
+ // Compute the min/max of an array-expression
+ template<typename _Ta>
+ inline typename _Ta::value_type
+ __valarray_min(const _Ta& __a)
+ {
+ size_t __s = __a.size();
+ typedef typename _Ta::value_type _Value_type;
+ _Value_type __r = __s == 0 ? _Value_type() : __a[0];
+ for (size_t __i = 1; __i < __s; ++__i)
+ {
+ _Value_type __t = __a[__i];
+ if (__t < __r)
+ __r = __t;
+ }
+ return __r;
+ }
+
+ template<typename _Ta>
+ inline typename _Ta::value_type
+ __valarray_max(const _Ta& __a)
+ {
+ size_t __s = __a.size();
+ typedef typename _Ta::value_type _Value_type;
+ _Value_type __r = __s == 0 ? _Value_type() : __a[0];
+ for (size_t __i = 1; __i < __s; ++__i)
+ {
+ _Value_type __t = __a[__i];
+ if (__t > __r)
+ __r = __t;
+ }
+ return __r;
+ }
+
+ //
+ // Helper class _Array, first layer of valarray abstraction.
+ // All operations on valarray should be forwarded to this class
+ // whenever possible. -- gdr
+ //
+
+ template<typename _Tp>
+ struct _Array
+ {
+ explicit _Array(size_t);
+ explicit _Array(_Tp* const __restrict__);
+ explicit _Array(const valarray<_Tp>&);
+ _Array(const _Tp* __restrict__, size_t);
+
+ _Tp* begin() const;
+
+ _Tp* const __restrict__ _M_data;
+ };
+
+
+ // Copy-construct plain array __b[<__n>] from indexed array __a[__i[<__n>]]
+ template<typename _Tp>
+ inline void
+ __valarray_copy_construct(_Array<_Tp> __a, _Array<size_t> __i,
+ _Array<_Tp> __b, size_t __n)
+ { std::__valarray_copy_construct(__a._M_data, __i._M_data,
+ __b._M_data, __n); }
+
+ // Copy-construct plain array __b[<__n>] from strided array __a[<__n : __s>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy_construct(_Array<_Tp> __a, size_t __n, size_t __s,
+ _Array<_Tp> __b)
+ { std::__valarray_copy_construct(__a._M_data, __n, __s, __b._M_data); }
+
+ template<typename _Tp>
+ inline void
+ __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t)
+ { std::__valarray_fill(__a._M_data, __n, __t); }
+
+ template<typename _Tp>
+ inline void
+ __valarray_fill(_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t)
+ { std::__valarray_fill(__a._M_data, __n, __s, __t); }
+
+ template<typename _Tp>
+ inline void
+ __valarray_fill(_Array<_Tp> __a, _Array<size_t> __i,
+ size_t __n, const _Tp& __t)
+ { std::__valarray_fill(__a._M_data, __i._M_data, __n, __t); }
+
+ // Copy a plain array __a[<__n>] into a play array __b[<>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)
+ { std::__valarray_copy(__a._M_data, __n, __b._M_data); }
+
+ // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b)
+ { std::__valarray_copy(__a._M_data, __n, __s, __b._M_data); }
+
+ // Copy a plain array __a[<__n>] into a strided array __b[<__n : __s>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s)
+ { __valarray_copy(__a._M_data, __b._M_data, __n, __s); }
+
+ // Copy strided array __src[<__n : __s1>] into another
+ // strided array __dst[< : __s2>]. Their sizes must match.
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1,
+ _Array<_Tp> __b, size_t __s2)
+ { std::__valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
+
+ // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, _Array<size_t> __i,
+ _Array<_Tp> __b, size_t __n)
+ { std::__valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); }
+
+ // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
+ _Array<size_t> __i)
+ { std::__valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); }
+
+ // Copy the __n first elements of an indexed array __src[<__i>] into
+ // another indexed array __dst[<__j>].
+ template<typename _Tp>
+ inline void
+ __valarray_copy(_Array<_Tp> __src, size_t __n, _Array<size_t> __i,
+ _Array<_Tp> __dst, _Array<size_t> __j)
+ {
+ std::__valarray_copy(__src._M_data, __n, __i._M_data,
+ __dst._M_data, __j._M_data);
+ }
+
+ template<typename _Tp>
+ inline
+ _Array<_Tp>::_Array(size_t __n)
+ : _M_data(__valarray_get_storage<_Tp>(__n))
+ { std::__valarray_default_construct(_M_data, _M_data + __n); }
+
+ template<typename _Tp>
+ inline
+ _Array<_Tp>::_Array(_Tp* const __restrict__ __p)
+ : _M_data (__p) {}
+
+ template<typename _Tp>
+ inline
+ _Array<_Tp>::_Array(const valarray<_Tp>& __v)
+ : _M_data (__v._M_data) {}
+
+ template<typename _Tp>
+ inline
+ _Array<_Tp>::_Array(const _Tp* __restrict__ __b, size_t __s)
+ : _M_data(__valarray_get_storage<_Tp>(__s))
+ { std::__valarray_copy_construct(__b, __s, _M_data); }
+
+ template<typename _Tp>
+ inline _Tp*
+ _Array<_Tp>::begin () const
+ { return _M_data; }
+
+#define _DEFINE_ARRAY_FUNCTION(_Op, _Name) \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, const _Tp& __t) \
+ { \
+ for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; ++__p) \
+ *__p _Op##= __t; \
+ } \
+ \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) \
+ { \
+ _Tp* __p = __a._M_data; \
+ for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; ++__p, ++__q) \
+ *__p _Op##= *__q; \
+ } \
+ \
+ template<typename _Tp, class _Dom> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, \
+ const _Expr<_Dom, _Tp>& __e, size_t __n) \
+ { \
+ _Tp* __p(__a._M_data); \
+ for (size_t __i = 0; __i < __n; ++__i, ++__p) \
+ *__p _Op##= __e[__i]; \
+ } \
+ \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, size_t __s, \
+ _Array<_Tp> __b) \
+ { \
+ _Tp* __q(__b._M_data); \
+ for (_Tp* __p = __a._M_data; __p < __a._M_data + __s * __n; \
+ __p += __s, ++__q) \
+ *__p _Op##= *__q; \
+ } \
+ \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, _Array<_Tp> __b, \
+ size_t __n, size_t __s) \
+ { \
+ _Tp* __q(__b._M_data); \
+ for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
+ ++__p, __q += __s) \
+ *__p _Op##= *__q; \
+ } \
+ \
+ template<typename _Tp, class _Dom> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __s, \
+ const _Expr<_Dom, _Tp>& __e, size_t __n) \
+ { \
+ _Tp* __p(__a._M_data); \
+ for (size_t __i = 0; __i < __n; ++__i, __p += __s) \
+ *__p _Op##= __e[__i]; \
+ } \
+ \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
+ _Array<_Tp> __b, size_t __n) \
+ { \
+ _Tp* __q(__b._M_data); \
+ for (size_t* __j = __i._M_data; __j < __i._M_data + __n; \
+ ++__j, ++__q) \
+ __a._M_data[*__j] _Op##= *__q; \
+ } \
+ \
+ template<typename _Tp> \
+ inline void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
+ _Array<_Tp> __b, _Array<size_t> __i) \
+ { \
+ _Tp* __p(__a._M_data); \
+ for (size_t* __j = __i._M_data; __j<__i._M_data + __n; \
+ ++__j, ++__p) \
+ *__p _Op##= __b._M_data[*__j]; \
+ } \
+ \
+ template<typename _Tp, class _Dom> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, _Array<size_t> __i, \
+ const _Expr<_Dom, _Tp>& __e, size_t __n) \
+ { \
+ size_t* __j(__i._M_data); \
+ for (size_t __k = 0; __k<__n; ++__k, ++__j) \
+ __a._M_data[*__j] _Op##= __e[__k]; \
+ } \
+ \
+ template<typename _Tp> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
+ _Array<_Tp> __b, size_t __n) \
+ { \
+ bool* __ok(__m._M_data); \
+ _Tp* __p(__a._M_data); \
+ for (_Tp* __q = __b._M_data; __q < __b._M_data + __n; \
+ ++__q, ++__ok, ++__p) \
+ { \
+ while (! *__ok) \
+ { \
+ ++__ok; \
+ ++__p; \
+ } \
+ *__p _Op##= *__q; \
+ } \
+ } \
+ \
+ template<typename _Tp> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, size_t __n, \
+ _Array<_Tp> __b, _Array<bool> __m) \
+ { \
+ bool* __ok(__m._M_data); \
+ _Tp* __q(__b._M_data); \
+ for (_Tp* __p = __a._M_data; __p < __a._M_data + __n; \
+ ++__p, ++__ok, ++__q) \
+ { \
+ while (! *__ok) \
+ { \
+ ++__ok; \
+ ++__q; \
+ } \
+ *__p _Op##= *__q; \
+ } \
+ } \
+ \
+ template<typename _Tp, class _Dom> \
+ void \
+ _Array_augmented_##_Name(_Array<_Tp> __a, _Array<bool> __m, \
+ const _Expr<_Dom, _Tp>& __e, size_t __n) \
+ { \
+ bool* __ok(__m._M_data); \
+ _Tp* __p(__a._M_data); \
+ for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p) \
+ { \
+ while (! *__ok) \
+ { \
+ ++__ok; \
+ ++__p; \
+ } \
+ *__p _Op##= __e[__i]; \
+ } \
+ }
+
+ _DEFINE_ARRAY_FUNCTION(+, __plus)
+ _DEFINE_ARRAY_FUNCTION(-, __minus)
+ _DEFINE_ARRAY_FUNCTION(*, __multiplies)
+ _DEFINE_ARRAY_FUNCTION(/, __divides)
+ _DEFINE_ARRAY_FUNCTION(%, __modulus)
+ _DEFINE_ARRAY_FUNCTION(^, __bitwise_xor)
+ _DEFINE_ARRAY_FUNCTION(|, __bitwise_or)
+ _DEFINE_ARRAY_FUNCTION(&, __bitwise_and)
+ _DEFINE_ARRAY_FUNCTION(<<, __shift_left)
+ _DEFINE_ARRAY_FUNCTION(>>, __shift_right)
+
+#undef _DEFINE_ARRAY_FUNCTION
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/valarray_array.tcc>
+#endif
+
+#endif /* _ARRAY_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.tcc
new file mode 100644
index 0000000..15cb7b1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_array.tcc
@@ -0,0 +1,241 @@
+// The template and inlines for the -*- C++ -*- internal _Array helper class.
+
+// Copyright (C) 1997, 1998, 1999, 2003, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file valarray_array.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _VALARRAY_ARRAY_TCC
+#define _VALARRAY_ARRAY_TCC 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Tp>
+ void
+ __valarray_fill(_Array<_Tp> __a, size_t __n, _Array<bool> __m,
+ const _Tp& __t)
+ {
+ _Tp* __p = __a._M_data;
+ bool* __ok (__m._M_data);
+ for (size_t __i=0; __i < __n; ++__i, ++__ok, ++__p)
+ {
+ while (!*__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__p = __t;
+ }
+ }
+
+ // Copy n elements of a into consecutive elements of b. When m is
+ // false, the corresponding element of a is skipped. m must contain
+ // at least n true elements. a must contain at least n elements and
+ // enough elements to match up with m through the nth true element
+ // of m. I.e. if n is 10, m has 15 elements with 5 false followed
+ // by 10 true, a must have 15 elements.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, _Array<_Tp> __b,
+ size_t __n)
+ {
+ _Tp* __p (__a._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __q = __b._M_data; __q < __b._M_data + __n;
+ ++__q, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__q = *__p;
+ }
+ }
+
+ // Copy n consecutive elements from a into elements of b. Elements
+ // of b are skipped if the corresponding element of m is false. m
+ // must contain at least n true elements. b must have at least as
+ // many elements as the index of the nth true element of m. I.e. if
+ // m has 15 elements with 5 false followed by 10 true, b must have
+ // at least 15 elements.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b,
+ _Array<bool> __m)
+ {
+ _Tp* __q (__b._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __p = __a._M_data; __p < __a._M_data+__n;
+ ++__p, ++__ok, ++__q)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__q;
+ }
+ *__q = *__p;
+ }
+ }
+
+ // Copy n elements from a into elements of b. Elements of a are
+ // skipped if the corresponding element of m is false. Elements of
+ // b are skipped if the corresponding element of k is false. m and
+ // k must contain at least n true elements. a and b must have at
+ // least as many elements as the index of the nth true element of m.
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __a, _Array<bool> __m, size_t __n,
+ _Array<_Tp> __b, _Array<bool> __k)
+ {
+ _Tp* __p (__a._M_data);
+ _Tp* __q (__b._M_data);
+ bool* __srcok (__m._M_data);
+ bool* __dstok (__k._M_data);
+ for (size_t __i = 0; __i < __n;
+ ++__srcok, ++__p, ++__dstok, ++__q, ++__i)
+ {
+ while (! *__srcok)
+ {
+ ++__srcok;
+ ++__p;
+ }
+ while (! *__dstok)
+ {
+ ++__dstok;
+ ++__q;
+ }
+ *__q = *__p;
+ }
+ }
+
+ // Copy n consecutive elements of e into consecutive elements of a.
+ // I.e. a[i] = e[i].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__p)
+ *__p = __e[__i];
+ }
+
+ // Copy n consecutive elements of e into elements of a using stride
+ // s. I.e., a[0] = e[0], a[s] = e[1], a[2*s] = e[2].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, size_t __s)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, __p += __s)
+ *__p = __e[__i];
+ }
+
+ // Copy n consecutive elements of e into elements of a indexed by
+ // contents of i. I.e., a[i[0]] = e[0].
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, _Array<size_t> __i)
+ {
+ size_t* __j (__i._M_data);
+ for (size_t __k = 0; __k < __n; ++__k, ++__j)
+ __a._M_data[*__j] = __e[__k];
+ }
+
+ // Copy n elements of e indexed by contents of f into elements of a
+ // indexed by contents of i. I.e., a[i[0]] = e[f[0]].
+ template<typename _Tp>
+ void
+ __valarray_copy(_Array<_Tp> __e, _Array<size_t> __f,
+ size_t __n,
+ _Array<_Tp> __a, _Array<size_t> __i)
+ {
+ size_t* __g (__f._M_data);
+ size_t* __j (__i._M_data);
+ for (size_t __k = 0; __k < __n; ++__k, ++__j, ++__g)
+ __a._M_data[*__j] = __e._M_data[*__g];
+ }
+
+ // Copy n consecutive elements of e into elements of a. Elements of
+ // a are skipped if the corresponding element of m is false. m must
+ // have at least n true elements and a must have at least as many
+ // elements as the index of the nth true element of m. I.e. if m
+ // has 5 false followed by 10 true elements and n == 10, a must have
+ // at least 15 elements.
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a, _Array<bool> __m)
+ {
+ bool* __ok (__m._M_data);
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ *__p = __e[__i];
+ }
+ }
+
+
+ template<typename _Tp, class _Dom>
+ void
+ __valarray_copy_construct(const _Expr<_Dom, _Tp>& __e, size_t __n,
+ _Array<_Tp> __a)
+ {
+ _Tp* __p (__a._M_data);
+ for (size_t __i = 0; __i < __n; ++__i, ++__p)
+ new (__p) _Tp(__e[__i]);
+ }
+
+
+ template<typename _Tp>
+ void
+ __valarray_copy_construct(_Array<_Tp> __a, _Array<bool> __m,
+ _Array<_Tp> __b, size_t __n)
+ {
+ _Tp* __p (__a._M_data);
+ bool* __ok (__m._M_data);
+ for (_Tp* __q = __b._M_data; __q < __b._M_data+__n; ++__q, ++__ok, ++__p)
+ {
+ while (! *__ok)
+ {
+ ++__ok;
+ ++__p;
+ }
+ new (__q) _Tp(*__p);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _VALARRAY_ARRAY_TCC */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_before.h b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_before.h
new file mode 100644
index 0000000..444129b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/valarray_before.h
@@ -0,0 +1,730 @@
+// The template and inlines for the -*- C++ -*- internal _Meta class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file valarray_before.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
+
+#ifndef _VALARRAY_BEFORE_H
+#define _VALARRAY_BEFORE_H 1
+
+#pragma GCC system_header
+
+#include <bits/slice_array.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ //
+ // Implementing a loosened valarray return value is tricky.
+ // First we need to meet 26.3.1/3: we should not add more than
+ // two levels of template nesting. Therefore we resort to template
+ // template to "flatten" loosened return value types.
+ // At some point we use partial specialization to remove one level
+ // template nesting due to _Expr<>
+ //
+
+ // This class is NOT defined. It doesn't need to.
+ template<typename _Tp1, typename _Tp2> class _Constant;
+
+ // Implementations of unary functions applied to valarray<>s.
+ // I use hard-coded object functions here instead of a generic
+ // approach like pointers to function:
+ // 1) correctness: some functions take references, others values.
+ // we can't deduce the correct type afterwards.
+ // 2) efficiency -- object functions can be easily inlined
+ // 3) be Koenig-lookup-friendly
+
+ struct __abs
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return abs(__t); }
+ };
+
+ struct __cos
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return cos(__t); }
+ };
+
+ struct __acos
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return acos(__t); }
+ };
+
+ struct __cosh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return cosh(__t); }
+ };
+
+ struct __sin
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return sin(__t); }
+ };
+
+ struct __asin
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return asin(__t); }
+ };
+
+ struct __sinh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return sinh(__t); }
+ };
+
+ struct __tan
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return tan(__t); }
+ };
+
+ struct __atan
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return atan(__t); }
+ };
+
+ struct __tanh
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return tanh(__t); }
+ };
+
+ struct __exp
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return exp(__t); }
+ };
+
+ struct __log
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return log(__t); }
+ };
+
+ struct __log10
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return log10(__t); }
+ };
+
+ struct __sqrt
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return sqrt(__t); }
+ };
+
+ // In the past, we used to tailor operator applications semantics
+ // to the specialization of standard function objects (i.e. plus<>, etc.)
+ // That is incorrect. Therefore we provide our own surrogates.
+
+ struct __unary_plus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return +__t; }
+ };
+
+ struct __negate
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return -__t; }
+ };
+
+ struct __bitwise_not
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __t) const
+ { return ~__t; }
+ };
+
+ struct __plus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x + __y; }
+ };
+
+ struct __minus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x - __y; }
+ };
+
+ struct __multiplies
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x * __y; }
+ };
+
+ struct __divides
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x / __y; }
+ };
+
+ struct __modulus
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x % __y; }
+ };
+
+ struct __bitwise_xor
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x ^ __y; }
+ };
+
+ struct __bitwise_and
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x & __y; }
+ };
+
+ struct __bitwise_or
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x | __y; }
+ };
+
+ struct __shift_left
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x << __y; }
+ };
+
+ struct __shift_right
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >> __y; }
+ };
+
+ struct __logical_and
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x && __y; }
+ };
+
+ struct __logical_or
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x || __y; }
+ };
+
+ struct __logical_not
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x) const { return !__x; }
+ };
+
+ struct __equal_to
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x == __y; }
+ };
+
+ struct __not_equal_to
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x != __y; }
+ };
+
+ struct __less
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x < __y; }
+ };
+
+ struct __greater
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x > __y; }
+ };
+
+ struct __less_equal
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x <= __y; }
+ };
+
+ struct __greater_equal
+ {
+ template<typename _Tp>
+ bool operator()(const _Tp& __x, const _Tp& __y) const
+ { return __x >= __y; }
+ };
+
+ // The few binary functions we miss.
+ struct __atan2
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return atan2(__x, __y); }
+ };
+
+ struct __pow
+ {
+ template<typename _Tp>
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const
+ { return pow(__x, __y); }
+ };
+
+
+ // We need these bits in order to recover the return type of
+ // some functions/operators now that we're no longer using
+ // function templates.
+ template<typename, typename _Tp>
+ struct __fun
+ {
+ typedef _Tp result_type;
+ };
+
+ // several specializations for relational operators.
+ template<typename _Tp>
+ struct __fun<__logical_not, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__logical_and, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__logical_or, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__less, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__greater, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__less_equal, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__greater_equal, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__equal_to, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ template<typename _Tp>
+ struct __fun<__not_equal_to, _Tp>
+ {
+ typedef bool result_type;
+ };
+
+ //
+ // Apply function taking a value/const reference closure
+ //
+
+ template<typename _Dom, typename _Arg>
+ class _FunBase
+ {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _FunBase(const _Dom& __e, value_type __f(_Arg))
+ : _M_expr(__e), _M_func(__f) {}
+
+ value_type operator[](size_t __i) const
+ { return _M_func (_M_expr[__i]); }
+
+ size_t size() const { return _M_expr.size ();}
+
+ private:
+ const _Dom& _M_expr;
+ value_type (*_M_func)(_Arg);
+ };
+
+ template<class _Dom>
+ struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type>
+ {
+ typedef _FunBase<_Dom, typename _Dom::value_type> _Base;
+ typedef typename _Base::value_type value_type;
+ typedef value_type _Tp;
+
+ _ValFunClos(const _Dom& __e, _Tp __f(_Tp)) : _Base(__e, __f) {}
+ };
+
+ template<typename _Tp>
+ struct _ValFunClos<_ValArray,_Tp> : _FunBase<valarray<_Tp>, _Tp>
+ {
+ typedef _FunBase<valarray<_Tp>, _Tp> _Base;
+ typedef _Tp value_type;
+
+ _ValFunClos(const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base(__v, __f) {}
+ };
+
+ template<class _Dom>
+ struct _RefFunClos<_Expr, _Dom>
+ : _FunBase<_Dom, const typename _Dom::value_type&>
+ {
+ typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base;
+ typedef typename _Base::value_type value_type;
+ typedef value_type _Tp;
+
+ _RefFunClos(const _Dom& __e, _Tp __f(const _Tp&))
+ : _Base(__e, __f) {}
+ };
+
+ template<typename _Tp>
+ struct _RefFunClos<_ValArray, _Tp>
+ : _FunBase<valarray<_Tp>, const _Tp&>
+ {
+ typedef _FunBase<valarray<_Tp>, const _Tp&> _Base;
+ typedef _Tp value_type;
+
+ _RefFunClos(const valarray<_Tp>& __v, _Tp __f(const _Tp&))
+ : _Base(__v, __f) {}
+ };
+
+ //
+ // Unary expression closure.
+ //
+
+ template<class _Oper, class _Arg>
+ class _UnBase
+ {
+ public:
+ typedef typename _Arg::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _UnBase(const _Arg& __e) : _M_expr(__e) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr[__i]); }
+
+ size_t size() const { return _M_expr.size(); }
+
+ private:
+ const _Arg& _M_expr;
+ };
+
+ template<class _Oper, class _Dom>
+ struct _UnClos<_Oper, _Expr, _Dom>
+ : _UnBase<_Oper, _Dom>
+ {
+ typedef _Dom _Arg;
+ typedef _UnBase<_Oper, _Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _UnClos(const _Arg& __e) : _Base(__e) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _UnClos<_Oper, _ValArray, _Tp>
+ : _UnBase<_Oper, valarray<_Tp> >
+ {
+ typedef valarray<_Tp> _Arg;
+ typedef _UnBase<_Oper, valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _UnClos(const _Arg& __e) : _Base(__e) {}
+ };
+
+
+ //
+ // Binary expression closure.
+ //
+
+ template<class _Oper, class _FirstArg, class _SecondArg>
+ class _BinBase
+ {
+ public:
+ typedef typename _FirstArg::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase(const _FirstArg& __e1, const _SecondArg& __e2)
+ : _M_expr1(__e1), _M_expr2(__e2) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1[__i], _M_expr2[__i]); }
+
+ size_t size() const { return _M_expr1.size(); }
+
+ private:
+ const _FirstArg& _M_expr1;
+ const _SecondArg& _M_expr2;
+ };
+
+
+ template<class _Oper, class _Clos>
+ class _BinBase2
+ {
+ public:
+ typedef typename _Clos::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase2(const _Clos& __e, const _Vt& __t)
+ : _M_expr1(__e), _M_expr2(__t) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1[__i], _M_expr2); }
+
+ size_t size() const { return _M_expr1.size(); }
+
+ private:
+ const _Clos& _M_expr1;
+ const _Vt& _M_expr2;
+ };
+
+ template<class _Oper, class _Clos>
+ class _BinBase1
+ {
+ public:
+ typedef typename _Clos::value_type _Vt;
+ typedef typename __fun<_Oper, _Vt>::result_type value_type;
+
+ _BinBase1(const _Vt& __t, const _Clos& __e)
+ : _M_expr1(__t), _M_expr2(__e) {}
+
+ value_type operator[](size_t __i) const
+ { return _Oper()(_M_expr1, _M_expr2[__i]); }
+
+ size_t size() const { return _M_expr2.size(); }
+
+ private:
+ const _Vt& _M_expr1;
+ const _Clos& _M_expr2;
+ };
+
+ template<class _Oper, class _Dom1, class _Dom2>
+ struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2>
+ : _BinBase<_Oper, _Dom1, _Dom2>
+ {
+ typedef _BinBase<_Oper, _Dom1, _Dom2> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper,_ValArray, _ValArray, _Tp, _Tp>
+ : _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> >
+ {
+ typedef _BinBase<_Oper, valarray<_Tp>, valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const valarray<_Tp>& __v, const valarray<_Tp>& __w)
+ : _Base(__v, __w) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper, _Expr, _ValArray, _Dom, typename _Dom::value_type>
+ : _BinBase<_Oper, _Dom, valarray<typename _Dom::value_type> >
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2)
+ : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper, _ValArray, _Expr, typename _Dom::value_type, _Dom>
+ : _BinBase<_Oper, valarray<typename _Dom::value_type>,_Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase<_Oper, valarray<_Tp>, _Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const valarray<_Tp>& __e1, const _Dom& __e2)
+ : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper, _Expr, _Constant, _Dom, typename _Dom::value_type>
+ : _BinBase2<_Oper, _Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase2<_Oper,_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Dom& __e1, const _Tp& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, class _Dom>
+ struct _BinClos<_Oper, _Constant, _Expr, typename _Dom::value_type, _Dom>
+ : _BinBase1<_Oper, _Dom>
+ {
+ typedef typename _Dom::value_type _Tp;
+ typedef _BinBase1<_Oper, _Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Tp& __e1, const _Dom& __e2) : _Base(__e1, __e2) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper, _ValArray, _Constant, _Tp, _Tp>
+ : _BinBase2<_Oper, valarray<_Tp> >
+ {
+ typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const valarray<_Tp>& __v, const _Tp& __t) : _Base(__v, __t) {}
+ };
+
+ template<class _Oper, typename _Tp>
+ struct _BinClos<_Oper, _Constant, _ValArray, _Tp, _Tp>
+ : _BinBase1<_Oper, valarray<_Tp> >
+ {
+ typedef _BinBase1<_Oper, valarray<_Tp> > _Base;
+ typedef typename _Base::value_type value_type;
+
+ _BinClos(const _Tp& __t, const valarray<_Tp>& __v) : _Base(__t, __v) {}
+ };
+
+ //
+ // slice_array closure.
+ //
+ template<typename _Dom>
+ class _SBase
+ {
+ public:
+ typedef typename _Dom::value_type value_type;
+
+ _SBase (const _Dom& __e, const slice& __s)
+ : _M_expr (__e), _M_slice (__s) {}
+
+ value_type
+ operator[] (size_t __i) const
+ { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; }
+
+ size_t
+ size() const
+ { return _M_slice.size (); }
+
+ private:
+ const _Dom& _M_expr;
+ const slice& _M_slice;
+ };
+
+ template<typename _Tp>
+ class _SBase<_Array<_Tp> >
+ {
+ public:
+ typedef _Tp value_type;
+
+ _SBase (_Array<_Tp> __a, const slice& __s)
+ : _M_array (__a._M_data+__s.start()), _M_size (__s.size()),
+ _M_stride (__s.stride()) {}
+
+ value_type
+ operator[] (size_t __i) const
+ { return _M_array._M_data[__i * _M_stride]; }
+
+ size_t
+ size() const
+ { return _M_size; }
+
+ private:
+ const _Array<_Tp> _M_array;
+ const size_t _M_size;
+ const size_t _M_stride;
+ };
+
+ template<class _Dom>
+ struct _SClos<_Expr, _Dom>
+ : _SBase<_Dom>
+ {
+ typedef _SBase<_Dom> _Base;
+ typedef typename _Base::value_type value_type;
+
+ _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {}
+ };
+
+ template<typename _Tp>
+ struct _SClos<_ValArray, _Tp>
+ : _SBase<_Array<_Tp> >
+ {
+ typedef _SBase<_Array<_Tp> > _Base;
+ typedef _Tp value_type;
+
+ _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {}
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _CPP_VALARRAY_BEFORE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bits/vector.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/bits/vector.tcc
new file mode 100644
index 0000000..8f67493
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bits/vector.tcc
@@ -0,0 +1,681 @@
+// Vector implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file vector.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VECTOR_TCC
+#define _VECTOR_TCC 1
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ template<typename _Tp, typename _Alloc>
+ void
+ vector<_Tp, _Alloc>::
+ reserve(size_type __n)
+ {
+ if (__n > this->max_size())
+ __throw_length_error(__N("vector::reserve"));
+ if (this->capacity() < __n)
+ {
+ const size_type __old_size = size();
+ pointer __tmp = _M_allocate_and_copy(__n,
+ _GLIBCXX_MAKE_MOVE_ITERATOR(this->_M_impl._M_start),
+ _GLIBCXX_MAKE_MOVE_ITERATOR(this->_M_impl._M_finish));
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_finish = __tmp + __old_size;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ void
+ vector<_Tp, _Alloc>::
+ emplace_back(_Args&&... __args)
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(end(), std::forward<_Args>(__args)...);
+ }
+#endif
+
+ template<typename _Tp, typename _Alloc>
+ typename vector<_Tp, _Alloc>::iterator
+ vector<_Tp, _Alloc>::
+ insert(iterator __position, const value_type& __x)
+ {
+ const size_type __n = __position - begin();
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
+ && __position == end())
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish, __x);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ {
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ _Tp __x_copy = __x;
+ _M_insert_aux(__position, std::move(__x_copy));
+ }
+ else
+#endif
+ _M_insert_aux(__position, __x);
+ }
+ return iterator(this->_M_impl._M_start + __n);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ typename vector<_Tp, _Alloc>::iterator
+ vector<_Tp, _Alloc>::
+ erase(iterator __position)
+ {
+ if (__position + 1 != end())
+ _GLIBCXX_MOVE3(__position + 1, end(), __position);
+ --this->_M_impl._M_finish;
+ this->_M_impl.destroy(this->_M_impl._M_finish);
+ return __position;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ typename vector<_Tp, _Alloc>::iterator
+ vector<_Tp, _Alloc>::
+ erase(iterator __first, iterator __last)
+ {
+ if (__last != end())
+ _GLIBCXX_MOVE3(__last, end(), __first);
+ _M_erase_at_end(__first.base() + (end() - __last));
+ return __first;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ vector<_Tp, _Alloc>&
+ vector<_Tp, _Alloc>::
+ operator=(const vector<_Tp, _Alloc>& __x)
+ {
+ if (&__x != this)
+ {
+ const size_type __xlen = __x.size();
+ if (__xlen > capacity())
+ {
+ pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
+ __x.end());
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
+ }
+ else if (size() >= __xlen)
+ {
+ std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
+ end(), _M_get_Tp_allocator());
+ }
+ else
+ {
+ std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
+ this->_M_impl._M_start);
+ std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
+ __x._M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ }
+ this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
+ }
+ return *this;
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ vector<_Tp, _Alloc>::
+ _M_fill_assign(size_t __n, const value_type& __val)
+ {
+ if (__n > capacity())
+ {
+ vector __tmp(__n, __val, _M_get_Tp_allocator());
+ __tmp.swap(*this);
+ }
+ else if (__n > size())
+ {
+ std::fill(begin(), end(), __val);
+ std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
+ __n - size(), __val,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __n - size();
+ }
+ else
+ _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _InputIterator>
+ void
+ vector<_Tp, _Alloc>::
+ _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ std::input_iterator_tag)
+ {
+ pointer __cur(this->_M_impl._M_start);
+ for (; __first != __last && __cur != this->_M_impl._M_finish;
+ ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ _M_erase_at_end(__cur);
+ else
+ insert(end(), __first, __last);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _ForwardIterator>
+ void
+ vector<_Tp, _Alloc>::
+ _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ const size_type __len = std::distance(__first, __last);
+
+ if (__len > capacity())
+ {
+ pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __tmp;
+ this->_M_impl._M_finish = this->_M_impl._M_start + __len;
+ this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
+ }
+ else if (size() >= __len)
+ _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, size());
+ std::copy(__first, __mid, this->_M_impl._M_start);
+ this->_M_impl._M_finish =
+ std::__uninitialized_copy_a(__mid, __last,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ }
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ typename vector<_Tp, _Alloc>::iterator
+ vector<_Tp, _Alloc>::
+ emplace(iterator __position, _Args&&... __args)
+ {
+ const size_type __n = __position - begin();
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage
+ && __position == end())
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ std::forward<_Args>(__args)...);
+ ++this->_M_impl._M_finish;
+ }
+ else
+ _M_insert_aux(__position, std::forward<_Args>(__args)...);
+ return iterator(this->_M_impl._M_start + __n);
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename... _Args>
+ void
+ vector<_Tp, _Alloc>::
+ _M_insert_aux(iterator __position, _Args&&... __args)
+#else
+ template<typename _Tp, typename _Alloc>
+ void
+ vector<_Tp, _Alloc>::
+ _M_insert_aux(iterator __position, const _Tp& __x)
+#endif
+ {
+ if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+ {
+ this->_M_impl.construct(this->_M_impl._M_finish,
+ _GLIBCXX_MOVE(*(this->_M_impl._M_finish
+ - 1)));
+ ++this->_M_impl._M_finish;
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ _Tp __x_copy = __x;
+#endif
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ this->_M_impl._M_finish - 2,
+ this->_M_impl._M_finish - 1);
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ *__position = __x_copy;
+#else
+ *__position = _Tp(std::forward<_Args>(__args)...);
+#endif
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(size_type(1), "vector::_M_insert_aux");
+ const size_type __elems_before = __position - begin();
+ pointer __new_start(this->_M_allocate(__len));
+ pointer __new_finish(__new_start);
+ __try
+ {
+ // The order of the three operations is dictated by the C++0x
+ // case, where the moves could alter a new element belonging
+ // to the existing vector. This is an issue only for callers
+ // taking the element by const lvalue ref (see 23.1/13).
+ this->_M_impl.construct(__new_start + __elems_before,
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ std::forward<_Args>(__args)...);
+#else
+ __x);
+#endif
+ __new_finish = 0;
+
+ __new_finish =
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __position.base(), __new_start,
+ _M_get_Tp_allocator());
+ ++__new_finish;
+
+ __new_finish =
+ std::__uninitialized_move_a(__position.base(),
+ this->_M_impl._M_finish,
+ __new_finish,
+ _M_get_Tp_allocator());
+ }
+ __catch(...)
+ {
+ if (!__new_finish)
+ this->_M_impl.destroy(__new_start + __elems_before);
+ else
+ std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
+ _M_deallocate(__new_start, __len);
+ __throw_exception_again;
+ }
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start;
+ this->_M_impl._M_finish = __new_finish;
+ this->_M_impl._M_end_of_storage = __new_start + __len;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ void
+ vector<_Tp, _Alloc>::
+ _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
+ {
+ if (__n != 0)
+ {
+ if (size_type(this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_finish) >= __n)
+ {
+ value_type __x_copy = __x;
+ const size_type __elems_after = end() - __position;
+ pointer __old_finish(this->_M_impl._M_finish);
+ if (__elems_after > __n)
+ {
+ std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __n;
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ __old_finish - __n, __old_finish);
+ std::fill(__position.base(), __position.base() + __n,
+ __x_copy);
+ }
+ else
+ {
+ std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
+ __n - __elems_after,
+ __x_copy,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __n - __elems_after;
+ std::__uninitialized_move_a(__position.base(), __old_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __elems_after;
+ std::fill(__position.base(), __old_finish, __x_copy);
+ }
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(__n, "vector::_M_fill_insert");
+ const size_type __elems_before = __position - begin();
+ pointer __new_start(this->_M_allocate(__len));
+ pointer __new_finish(__new_start);
+ __try
+ {
+ // See _M_insert_aux above.
+ std::__uninitialized_fill_n_a(__new_start + __elems_before,
+ __n, __x,
+ _M_get_Tp_allocator());
+ __new_finish = 0;
+
+ __new_finish =
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __position.base(),
+ __new_start,
+ _M_get_Tp_allocator());
+ __new_finish += __n;
+
+ __new_finish =
+ std::__uninitialized_move_a(__position.base(),
+ this->_M_impl._M_finish,
+ __new_finish,
+ _M_get_Tp_allocator());
+ }
+ __catch(...)
+ {
+ if (!__new_finish)
+ std::_Destroy(__new_start + __elems_before,
+ __new_start + __elems_before + __n,
+ _M_get_Tp_allocator());
+ else
+ std::_Destroy(__new_start, __new_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(__new_start, __len);
+ __throw_exception_again;
+ }
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start;
+ this->_M_impl._M_finish = __new_finish;
+ this->_M_impl._M_end_of_storage = __new_start + __len;
+ }
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _InputIterator>
+ void
+ vector<_Tp, _Alloc>::
+ _M_range_insert(iterator __pos, _InputIterator __first,
+ _InputIterator __last, std::input_iterator_tag)
+ {
+ for (; __first != __last; ++__first)
+ {
+ __pos = insert(__pos, *__first);
+ ++__pos;
+ }
+ }
+
+ template<typename _Tp, typename _Alloc>
+ template<typename _ForwardIterator>
+ void
+ vector<_Tp, _Alloc>::
+ _M_range_insert(iterator __position, _ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag)
+ {
+ if (__first != __last)
+ {
+ const size_type __n = std::distance(__first, __last);
+ if (size_type(this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_finish) >= __n)
+ {
+ const size_type __elems_after = end() - __position;
+ pointer __old_finish(this->_M_impl._M_finish);
+ if (__elems_after > __n)
+ {
+ std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
+ this->_M_impl._M_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __n;
+ _GLIBCXX_MOVE_BACKWARD3(__position.base(),
+ __old_finish - __n, __old_finish);
+ std::copy(__first, __last, __position);
+ }
+ else
+ {
+ _ForwardIterator __mid = __first;
+ std::advance(__mid, __elems_after);
+ std::__uninitialized_copy_a(__mid, __last,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __n - __elems_after;
+ std::__uninitialized_move_a(__position.base(),
+ __old_finish,
+ this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ this->_M_impl._M_finish += __elems_after;
+ std::copy(__first, __mid, __position);
+ }
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(__n, "vector::_M_range_insert");
+ pointer __new_start(this->_M_allocate(__len));
+ pointer __new_finish(__new_start);
+ __try
+ {
+ __new_finish =
+ std::__uninitialized_move_a(this->_M_impl._M_start,
+ __position.base(),
+ __new_start,
+ _M_get_Tp_allocator());
+ __new_finish =
+ std::__uninitialized_copy_a(__first, __last,
+ __new_finish,
+ _M_get_Tp_allocator());
+ __new_finish =
+ std::__uninitialized_move_a(__position.base(),
+ this->_M_impl._M_finish,
+ __new_finish,
+ _M_get_Tp_allocator());
+ }
+ __catch(...)
+ {
+ std::_Destroy(__new_start, __new_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(__new_start, __len);
+ __throw_exception_again;
+ }
+ std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ _M_deallocate(this->_M_impl._M_start,
+ this->_M_impl._M_end_of_storage
+ - this->_M_impl._M_start);
+ this->_M_impl._M_start = __new_start;
+ this->_M_impl._M_finish = __new_finish;
+ this->_M_impl._M_end_of_storage = __new_start + __len;
+ }
+ }
+ }
+
+
+ // vector<bool>
+
+ template<typename _Alloc>
+ void
+ vector<bool, _Alloc>::
+ reserve(size_type __n)
+ {
+ if (__n > this->max_size())
+ __throw_length_error(__N("vector::reserve"));
+ if (this->capacity() < __n)
+ {
+ _Bit_type* __q = this->_M_allocate(__n);
+ this->_M_impl._M_finish = _M_copy_aligned(begin(), end(),
+ iterator(__q, 0));
+ this->_M_deallocate();
+ this->_M_impl._M_start = iterator(__q, 0);
+ this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
+ / int(_S_word_bit));
+ }
+ }
+
+ template<typename _Alloc>
+ void
+ vector<bool, _Alloc>::
+ _M_fill_insert(iterator __position, size_type __n, bool __x)
+ {
+ if (__n == 0)
+ return;
+ if (capacity() - size() >= __n)
+ {
+ std::copy_backward(__position, end(),
+ this->_M_impl._M_finish + difference_type(__n));
+ std::fill(__position, __position + difference_type(__n), __x);
+ this->_M_impl._M_finish += difference_type(__n);
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(__n, "vector<bool>::_M_fill_insert");
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = _M_copy_aligned(begin(), __position,
+ iterator(__q, 0));
+ std::fill(__i, __i + difference_type(__n), __x);
+ this->_M_impl._M_finish = std::copy(__position, end(),
+ __i + difference_type(__n));
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = (__q + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+
+ template<typename _Alloc>
+ template<typename _ForwardIterator>
+ void
+ vector<bool, _Alloc>::
+ _M_insert_range(iterator __position, _ForwardIterator __first,
+ _ForwardIterator __last, std::forward_iterator_tag)
+ {
+ if (__first != __last)
+ {
+ size_type __n = std::distance(__first, __last);
+ if (capacity() - size() >= __n)
+ {
+ std::copy_backward(__position, end(),
+ this->_M_impl._M_finish
+ + difference_type(__n));
+ std::copy(__first, __last, __position);
+ this->_M_impl._M_finish += difference_type(__n);
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(__n, "vector<bool>::_M_insert_range");
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = _M_copy_aligned(begin(), __position,
+ iterator(__q, 0));
+ __i = std::copy(__first, __last, __i);
+ this->_M_impl._M_finish = std::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = (__q
+ + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+ }
+
+ template<typename _Alloc>
+ void
+ vector<bool, _Alloc>::
+ _M_insert_aux(iterator __position, bool __x)
+ {
+ if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage)
+ {
+ std::copy_backward(__position, this->_M_impl._M_finish,
+ this->_M_impl._M_finish + 1);
+ *__position = __x;
+ ++this->_M_impl._M_finish;
+ }
+ else
+ {
+ const size_type __len =
+ _M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
+ _Bit_type * __q = this->_M_allocate(__len);
+ iterator __i = _M_copy_aligned(begin(), __position,
+ iterator(__q, 0));
+ *__i++ = __x;
+ this->_M_impl._M_finish = std::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_impl._M_end_of_storage = (__q + ((__len
+ + int(_S_word_bit) - 1)
+ / int(_S_word_bit)));
+ this->_M_impl._M_start = iterator(__q, 0);
+ }
+ }
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#endif /* _VECTOR_TCC */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/bitset b/6/sources/cxx-stl/gnu-libstdc++/include/bitset
new file mode 100644
index 0000000..5ca4429
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/bitset
@@ -0,0 +1,1396 @@
+// <bitset> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1998
+ * 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.
+ */
+
+/** @file include/bitset
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_BITSET
+#define _GLIBCXX_BITSET 1
+
+#pragma GCC system_header
+
+#include <cstddef> // For size_t
+#include <string>
+#include <bits/functexcept.h> // For invalid_argument, out_of_range,
+ // overflow_error
+#include <iosfwd>
+#include <cxxabi-forced.h>
+
+#define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * sizeof(unsigned long))
+#define _GLIBCXX_BITSET_WORDS(__n) \
+ ((__n) < 1 ? 0 : ((__n) + _GLIBCXX_BITSET_BITS_PER_WORD - 1) \
+ / _GLIBCXX_BITSET_BITS_PER_WORD)
+
+_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
+
+ /**
+ * Base class, general case. It is a class invariant that _Nw will be
+ * nonnegative.
+ *
+ * See documentation for bitset.
+ */
+ template<size_t _Nw>
+ struct _Base_bitset
+ {
+ typedef unsigned long _WordT;
+
+ /// 0 is the least significant word.
+ _WordT _M_w[_Nw];
+
+ _Base_bitset()
+ { _M_do_reset(); }
+
+ _Base_bitset(unsigned long __val)
+ {
+ _M_do_reset();
+ _M_w[0] = __val;
+ }
+
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
+
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+ _WordT&
+ _M_getword(size_t __pos)
+ { return _M_w[_S_whichword(__pos)]; }
+
+ _WordT
+ _M_getword(size_t __pos) const
+ { return _M_w[_S_whichword(__pos)]; }
+
+ _WordT&
+ _M_hiword()
+ { return _M_w[_Nw - 1]; }
+
+ _WordT
+ _M_hiword() const
+ { return _M_w[_Nw - 1]; }
+
+ void
+ _M_do_and(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] &= __x._M_w[__i];
+ }
+
+ void
+ _M_do_or(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] |= __x._M_w[__i];
+ }
+
+ void
+ _M_do_xor(const _Base_bitset<_Nw>& __x)
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] ^= __x._M_w[__i];
+ }
+
+ void
+ _M_do_left_shift(size_t __shift);
+
+ void
+ _M_do_right_shift(size_t __shift);
+
+ void
+ _M_do_flip()
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] = ~_M_w[__i];
+ }
+
+ void
+ _M_do_set()
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ _M_w[__i] = ~static_cast<_WordT>(0);
+ }
+
+ void
+ _M_do_reset()
+ { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); }
+
+ bool
+ _M_is_equal(const _Base_bitset<_Nw>& __x) const
+ {
+ for (size_t __i = 0; __i < _Nw; ++__i)
+ if (_M_w[__i] != __x._M_w[__i])
+ return false;
+ return true;
+ }
+
+ size_t
+ _M_are_all_aux() const
+ {
+ for (size_t __i = 0; __i < _Nw - 1; __i++)
+ if (_M_w[__i] != ~static_cast<_WordT>(0))
+ return 0;
+ return ((_Nw - 1) * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_popcountl(_M_hiword()));
+ }
+
+ bool
+ _M_is_any() const
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ if (_M_w[__i] != static_cast<_WordT>(0))
+ return true;
+ return false;
+ }
+
+ size_t
+ _M_do_count() const
+ {
+ size_t __result = 0;
+ for (size_t __i = 0; __i < _Nw; __i++)
+ __result += __builtin_popcountl(_M_w[__i]);
+ return __result;
+ }
+
+ unsigned long
+ _M_do_to_ulong() const;
+
+ // find first "on" bit
+ size_t
+ _M_do_find_first(size_t __not_found) const;
+
+ // find the next "on" bit that follows "prev"
+ size_t
+ _M_do_find_next(size_t __prev, size_t __not_found) const;
+ };
+
+ // Definitions of non-inline functions from _Base_bitset.
+ template<size_t _Nw>
+ void
+ _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift)
+ {
+ if (__builtin_expect(__shift != 0, 1))
+ {
+ const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
+ const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
+
+ if (__offset == 0)
+ for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
+ _M_w[__n] = _M_w[__n - __wshift];
+ else
+ {
+ const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
+ - __offset);
+ for (size_t __n = _Nw - 1; __n > __wshift; --__n)
+ _M_w[__n] = ((_M_w[__n - __wshift] << __offset)
+ | (_M_w[__n - __wshift - 1] >> __sub_offset));
+ _M_w[__wshift] = _M_w[0] << __offset;
+ }
+
+ std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
+ }
+ }
+
+ template<size_t _Nw>
+ void
+ _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift)
+ {
+ if (__builtin_expect(__shift != 0, 1))
+ {
+ const size_t __wshift = __shift / _GLIBCXX_BITSET_BITS_PER_WORD;
+ const size_t __offset = __shift % _GLIBCXX_BITSET_BITS_PER_WORD;
+ const size_t __limit = _Nw - __wshift - 1;
+
+ if (__offset == 0)
+ for (size_t __n = 0; __n <= __limit; ++__n)
+ _M_w[__n] = _M_w[__n + __wshift];
+ else
+ {
+ const size_t __sub_offset = (_GLIBCXX_BITSET_BITS_PER_WORD
+ - __offset);
+ for (size_t __n = 0; __n < __limit; ++__n)
+ _M_w[__n] = ((_M_w[__n + __wshift] >> __offset)
+ | (_M_w[__n + __wshift + 1] << __sub_offset));
+ _M_w[__limit] = _M_w[_Nw-1] >> __offset;
+ }
+
+ std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
+ }
+ }
+
+ template<size_t _Nw>
+ unsigned long
+ _Base_bitset<_Nw>::_M_do_to_ulong() const
+ {
+ for (size_t __i = 1; __i < _Nw; ++__i)
+ if (_M_w[__i])
+ __throw_overflow_error(__N("_Base_bitset::_M_do_to_ulong"));
+ return _M_w[0];
+ }
+
+ template<size_t _Nw>
+ size_t
+ _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
+ {
+ for (size_t __i = 0; __i < _Nw; __i++)
+ {
+ _WordT __thisword = _M_w[__i];
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword));
+ }
+ // not found, so return an indication of failure.
+ return __not_found;
+ }
+
+ template<size_t _Nw>
+ size_t
+ _Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
+ {
+ // make bound inclusive
+ ++__prev;
+
+ // check out of bounds
+ if (__prev >= _Nw * _GLIBCXX_BITSET_BITS_PER_WORD)
+ return __not_found;
+
+ // search first word
+ size_t __i = _S_whichword(__prev);
+ _WordT __thisword = _M_w[__i];
+
+ // mask off bits below bound
+ __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
+
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword));
+
+ // check subsequent words
+ __i++;
+ for (; __i < _Nw; __i++)
+ {
+ __thisword = _M_w[__i];
+ if (__thisword != static_cast<_WordT>(0))
+ return (__i * _GLIBCXX_BITSET_BITS_PER_WORD
+ + __builtin_ctzl(__thisword));
+ }
+ // not found, so return an indication of failure.
+ return __not_found;
+ } // end _M_do_find_next
+
+ /**
+ * Base class, specialization for a single word.
+ *
+ * See documentation for bitset.
+ */
+ template<>
+ struct _Base_bitset<1>
+ {
+ typedef unsigned long _WordT;
+ _WordT _M_w;
+
+ _Base_bitset(void)
+ : _M_w(0)
+ { }
+
+ _Base_bitset(unsigned long __val)
+ : _M_w(__val)
+ { }
+
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
+
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+ _WordT&
+ _M_getword(size_t)
+ { return _M_w; }
+
+ _WordT
+ _M_getword(size_t) const
+ { return _M_w; }
+
+ _WordT&
+ _M_hiword()
+ { return _M_w; }
+
+ _WordT
+ _M_hiword() const
+ { return _M_w; }
+
+ void
+ _M_do_and(const _Base_bitset<1>& __x)
+ { _M_w &= __x._M_w; }
+
+ void
+ _M_do_or(const _Base_bitset<1>& __x)
+ { _M_w |= __x._M_w; }
+
+ void
+ _M_do_xor(const _Base_bitset<1>& __x)
+ { _M_w ^= __x._M_w; }
+
+ void
+ _M_do_left_shift(size_t __shift)
+ { _M_w <<= __shift; }
+
+ void
+ _M_do_right_shift(size_t __shift)
+ { _M_w >>= __shift; }
+
+ void
+ _M_do_flip()
+ { _M_w = ~_M_w; }
+
+ void
+ _M_do_set()
+ { _M_w = ~static_cast<_WordT>(0); }
+
+ void
+ _M_do_reset()
+ { _M_w = 0; }
+
+ bool
+ _M_is_equal(const _Base_bitset<1>& __x) const
+ { return _M_w == __x._M_w; }
+
+ size_t
+ _M_are_all_aux() const
+ { return __builtin_popcountl(_M_w); }
+
+ bool
+ _M_is_any() const
+ { return _M_w != 0; }
+
+ size_t
+ _M_do_count() const
+ { return __builtin_popcountl(_M_w); }
+
+ unsigned long
+ _M_do_to_ulong() const
+ { return _M_w; }
+
+ size_t
+ _M_do_find_first(size_t __not_found) const
+ {
+ if (_M_w != 0)
+ return __builtin_ctzl(_M_w);
+ else
+ return __not_found;
+ }
+
+ // find the next "on" bit that follows "prev"
+ size_t
+ _M_do_find_next(size_t __prev, size_t __not_found) const
+ {
+ ++__prev;
+ if (__prev >= ((size_t) _GLIBCXX_BITSET_BITS_PER_WORD))
+ return __not_found;
+
+ _WordT __x = _M_w >> __prev;
+ if (__x != 0)
+ return __builtin_ctzl(__x) + __prev;
+ else
+ return __not_found;
+ }
+ };
+
+ /**
+ * Base class, specialization for no storage (zero-length %bitset).
+ *
+ * See documentation for bitset.
+ */
+ template<>
+ struct _Base_bitset<0>
+ {
+ typedef unsigned long _WordT;
+
+ _Base_bitset()
+ { }
+
+ _Base_bitset(unsigned long)
+ { }
+
+ static size_t
+ _S_whichword(size_t __pos )
+ { return __pos / _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static size_t
+ _S_whichbyte(size_t __pos )
+ { return (__pos % _GLIBCXX_BITSET_BITS_PER_WORD) / __CHAR_BIT__; }
+
+ static size_t
+ _S_whichbit(size_t __pos )
+ { return __pos % _GLIBCXX_BITSET_BITS_PER_WORD; }
+
+ static _WordT
+ _S_maskbit(size_t __pos )
+ { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+ // This would normally give access to the data. The bounds-checking
+ // in the bitset class will prevent the user from getting this far,
+ // but (1) it must still return an lvalue to compile, and (2) the
+ // user might call _Unchecked_set directly, in which case this /needs/
+ // to fail. Let's not penalize zero-length users unless they actually
+ // make an unchecked call; all the memory ugliness is therefore
+ // localized to this single should-never-get-this-far function.
+ _WordT&
+ _M_getword(size_t) const
+ {
+ __throw_out_of_range(__N("_Base_bitset::_M_getword"));
+ return *new _WordT;
+ }
+
+ _WordT
+ _M_hiword() const
+ { return 0; }
+
+ void
+ _M_do_and(const _Base_bitset<0>&)
+ { }
+
+ void
+ _M_do_or(const _Base_bitset<0>&)
+ { }
+
+ void
+ _M_do_xor(const _Base_bitset<0>&)
+ { }
+
+ void
+ _M_do_left_shift(size_t)
+ { }
+
+ void
+ _M_do_right_shift(size_t)
+ { }
+
+ void
+ _M_do_flip()
+ { }
+
+ void
+ _M_do_set()
+ { }
+
+ void
+ _M_do_reset()
+ { }
+
+ // Are all empty bitsets equal to each other? Are they equal to
+ // themselves? How to compare a thing which has no state? What is
+ // the sound of one zero-length bitset clapping?
+ bool
+ _M_is_equal(const _Base_bitset<0>&) const
+ { return true; }
+
+ size_t
+ _M_are_all_aux() const
+ { return 0; }
+
+ bool
+ _M_is_any() const
+ { return false; }
+
+ size_t
+ _M_do_count() const
+ { return 0; }
+
+ unsigned long
+ _M_do_to_ulong() const
+ { return 0; }
+
+ // Normally "not found" is the size, but that could also be
+ // misinterpreted as an index in this corner case. Oh well.
+ size_t
+ _M_do_find_first(size_t) const
+ { return 0; }
+
+ size_t
+ _M_do_find_next(size_t, size_t) const
+ { return 0; }
+ };
+
+
+ // Helper class to zero out the unused high-order bits in the highest word.
+ template<size_t _Extrabits>
+ struct _Sanitize
+ {
+ static void _S_do_sanitize(unsigned long& __val)
+ { __val &= ~((~static_cast<unsigned long>(0)) << _Extrabits); }
+ };
+
+ template<>
+ struct _Sanitize<0>
+ { static void _S_do_sanitize(unsigned long) {} };
+
+ /**
+ * @brief The %bitset class represents a @e fixed-size sequence of bits.
+ *
+ * @ingroup containers
+ *
+ * (Note that %bitset does @e not meet the formal requirements of a
+ * <a href="tables.html#65">container</a>. Mainly, it lacks iterators.)
+ *
+ * The template argument, @a Nb, may be any non-negative number,
+ * specifying the number of bits (e.g., "0", "12", "1024*1024").
+ *
+ * In the general unoptimized case, storage is allocated in word-sized
+ * blocks. Let B be the number of bits in a word, then (Nb+(B-1))/B
+ * words will be used for storage. B - Nb%B bits are unused. (They are
+ * the high-order bits in the highest word.) It is a class invariant
+ * that those unused bits are always zero.
+ *
+ * If you think of %bitset as "a simple array of bits," be aware that
+ * your mental picture is reversed: a %bitset behaves the same way as
+ * bits in integers do, with the bit at index 0 in the "least significant
+ * / right-hand" position, and the bit at index Nb-1 in the "most
+ * significant / left-hand" position. Thus, unlike other containers, a
+ * %bitset's index "counts from right to left," to put it very loosely.
+ *
+ * This behavior is preserved when translating to and from strings. For
+ * example, the first line of the following program probably prints
+ * "b('a') is 0001100001" on a modern ASCII system.
+ *
+ * @code
+ * #include <bitset>
+ * #include <iostream>
+ * #include <sstream>
+ *
+ * using namespace std;
+ *
+ * int main()
+ * {
+ * long a = 'a';
+ * bitset<10> b(a);
+ *
+ * cout << "b('a') is " << b << endl;
+ *
+ * ostringstream s;
+ * s << b;
+ * string str = s.str();
+ * cout << "index 3 in the string is " << str[3] << " but\n"
+ * << "index 3 in the bitset is " << b[3] << endl;
+ * }
+ * @endcode
+ *
+ * Also see:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch33s02.html
+ * for a description of extensions.
+ *
+ * Most of the actual code isn't contained in %bitset<> itself, but in the
+ * base class _Base_bitset. The base class works with whole words, not with
+ * individual bits. This allows us to specialize _Base_bitset for the
+ * important special case where the %bitset is only a single word.
+ *
+ * Extra confusion can result due to the fact that the storage for
+ * _Base_bitset @e is a regular array, and is indexed as such. This is
+ * carefully encapsulated.
+ */
+ template<size_t _Nb>
+ class bitset
+ : private _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)>
+ {
+ private:
+ typedef _Base_bitset<_GLIBCXX_BITSET_WORDS(_Nb)> _Base;
+ typedef unsigned long _WordT;
+
+ void
+ _M_do_sanitize()
+ {
+ _Sanitize<_Nb % _GLIBCXX_BITSET_BITS_PER_WORD>::
+ _S_do_sanitize(this->_M_hiword());
+ }
+
+ public:
+ /**
+ * This encapsulates the concept of a single bit. An instance of this
+ * class is a proxy for an actual bit; this way the individual bit
+ * operations are done as faster word-size bitwise instructions.
+ *
+ * Most users will never need to use this class directly; conversions
+ * to and from bool are automatic and should be transparent. Overloaded
+ * operators help to preserve the illusion.
+ *
+ * (On a typical system, this "bit %reference" is 64 times the size of
+ * an actual bit. Ha.)
+ */
+ class reference
+ {
+ friend class bitset;
+
+ _WordT *_M_wp;
+ size_t _M_bpos;
+
+ // left undefined
+ reference();
+
+ public:
+ reference(bitset& __b, size_t __pos)
+ {
+ _M_wp = &__b._M_getword(__pos);
+ _M_bpos = _Base::_S_whichbit(__pos);
+ }
+
+ ~reference()
+ { }
+
+ // For b[i] = __x;
+ reference&
+ operator=(bool __x)
+ {
+ if (__x)
+ *_M_wp |= _Base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+
+ // For b[i] = b[__j];
+ reference&
+ operator=(const reference& __j)
+ {
+ if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)))
+ *_M_wp |= _Base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+
+ // Flips the bit
+ bool
+ operator~() const
+ { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
+
+ // For __x = b[i];
+ operator bool() const
+ { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
+
+ // For b[i].flip();
+ reference&
+ flip()
+ {
+ *_M_wp ^= _Base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+ };
+ friend class reference;
+
+ // 23.3.5.1 constructors:
+ /// All bits set to zero.
+ bitset()
+ { }
+
+ /// Initial bits bitwise-copied from a single word (others set to zero).
+ bitset(unsigned long __val)
+ : _Base(__val)
+ { _M_do_sanitize(); }
+
+ /**
+ * @brief Use a subset of a string.
+ * @param s A string of '0' and '1' characters.
+ * @param position Index of the first character in @a s to use;
+ * defaults to zero.
+ * @throw std::out_of_range If @a pos is bigger the size of @a s.
+ * @throw std::invalid_argument If a character appears in the string
+ * which is neither '0' nor '1'.
+ */
+ template<class _CharT, class _Traits, class _Alloc>
+ explicit
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position = 0)
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(__N("bitset::bitset initial position "
+ "not valid"));
+ _M_copy_from_string(__s, __position,
+ std::basic_string<_CharT, _Traits, _Alloc>::npos,
+ _CharT('0'), _CharT('1'));
+ }
+
+ /**
+ * @brief Use a subset of a string.
+ * @param s A string of '0' and '1' characters.
+ * @param position Index of the first character in @a s to use.
+ * @param n The number of characters to copy.
+ * @throw std::out_of_range If @a pos is bigger the size of @a s.
+ * @throw std::invalid_argument If a character appears in the string
+ * which is neither '0' nor '1'.
+ */
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position, size_t __n)
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(__N("bitset::bitset initial position "
+ "not valid"));
+ _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1'));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __position, size_t __n,
+ _CharT __zero, _CharT __one = _CharT('1'))
+ : _Base()
+ {
+ if (__position > __s.size())
+ __throw_out_of_range(__N("bitset::bitset initial position "
+ "not valid"));
+ _M_copy_from_string(__s, __position, __n, __zero, __one);
+ }
+
+ // 23.3.5.2 bitset operations:
+ //@{
+ /**
+ * @brief Operations on bitsets.
+ * @param rhs A same-sized bitset.
+ *
+ * These should be self-explanatory.
+ */
+ bitset<_Nb>&
+ operator&=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_and(__rhs);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator|=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_or(__rhs);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator^=(const bitset<_Nb>& __rhs)
+ {
+ this->_M_do_xor(__rhs);
+ return *this;
+ }
+ //@}
+
+ //@{
+ /**
+ * @brief Operations on bitsets.
+ * @param position The number of places to shift.
+ *
+ * These should be self-explanatory.
+ */
+ bitset<_Nb>&
+ operator<<=(size_t __position)
+ {
+ if (__builtin_expect(__position < _Nb, 1))
+ {
+ this->_M_do_left_shift(__position);
+ this->_M_do_sanitize();
+ }
+ else
+ this->_M_do_reset();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator>>=(size_t __position)
+ {
+ if (__builtin_expect(__position < _Nb, 1))
+ {
+ this->_M_do_right_shift(__position);
+ this->_M_do_sanitize();
+ }
+ else
+ this->_M_do_reset();
+ return *this;
+ }
+ //@}
+
+ //@{
+ /**
+ * These versions of single-bit set, reset, flip, and test are
+ * extensions from the SGI version. They do no range checking.
+ * @ingroup SGIextensions
+ */
+ bitset<_Nb>&
+ _Unchecked_set(size_t __pos)
+ {
+ this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ _Unchecked_set(size_t __pos, int __val)
+ {
+ if (__val)
+ this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+ else
+ this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ _Unchecked_reset(size_t __pos)
+ {
+ this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ _Unchecked_flip(size_t __pos)
+ {
+ this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
+ return *this;
+ }
+
+ bool
+ _Unchecked_test(size_t __pos) const
+ { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
+ != static_cast<_WordT>(0)); }
+ //@}
+
+ // Set, reset, and flip.
+ /**
+ * @brief Sets every bit to true.
+ */
+ bitset<_Nb>&
+ set()
+ {
+ this->_M_do_set();
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ /**
+ * @brief Sets a given bit to a particular value.
+ * @param position The index of the bit.
+ * @param val Either true or false, defaults to true.
+ * @throw std::out_of_range If @a pos is bigger the size of the %set.
+ */
+ bitset<_Nb>&
+ set(size_t __position, bool __val = true)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::set"));
+ return _Unchecked_set(__position, __val);
+ }
+
+ /**
+ * @brief Sets every bit to false.
+ */
+ bitset<_Nb>&
+ reset()
+ {
+ this->_M_do_reset();
+ return *this;
+ }
+
+ /**
+ * @brief Sets a given bit to false.
+ * @param position The index of the bit.
+ * @throw std::out_of_range If @a pos is bigger the size of the %set.
+ *
+ * Same as writing @c set(pos,false).
+ */
+ bitset<_Nb>&
+ reset(size_t __position)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::reset"));
+ return _Unchecked_reset(__position);
+ }
+
+ /**
+ * @brief Toggles every bit to its opposite value.
+ */
+ bitset<_Nb>&
+ flip()
+ {
+ this->_M_do_flip();
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ /**
+ * @brief Toggles a given bit to its opposite value.
+ * @param position The index of the bit.
+ * @throw std::out_of_range If @a pos is bigger the size of the %set.
+ */
+ bitset<_Nb>&
+ flip(size_t __position)
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::flip"));
+ return _Unchecked_flip(__position);
+ }
+
+ /// See the no-argument flip().
+ bitset<_Nb>
+ operator~() const
+ { return bitset<_Nb>(*this).flip(); }
+
+ //@{
+ /**
+ * @brief Array-indexing support.
+ * @param position Index into the %bitset.
+ * @return A bool for a 'const %bitset'. For non-const bitsets, an
+ * instance of the reference proxy class.
+ * @note These operators do no range checking and throw no exceptions,
+ * as required by DR 11 to the standard.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS Note that this implementation already
+ * resolves DR 11 (items 1 and 2), but does not do the range-checking
+ * required by that DR's resolution. -pme
+ * The DR has since been changed: range-checking is a precondition
+ * (users' responsibility), and these functions must not throw. -pme
+ */
+ reference
+ operator[](size_t __position)
+ { return reference(*this,__position); }
+
+ bool
+ operator[](size_t __position) const
+ { return _Unchecked_test(__position); }
+ //@}
+
+ /**
+ * @brief Returns a numerical interpretation of the %bitset.
+ * @return The integral equivalent of the bits.
+ * @throw std::overflow_error If there are too many bits to be
+ * represented in an @c unsigned @c long.
+ */
+ unsigned long
+ to_ulong() const
+ { return this->_M_do_to_ulong(); }
+
+ /**
+ * @brief Returns a character interpretation of the %bitset.
+ * @return The string equivalent of the bits.
+ *
+ * Note the ordering of the bits: decreasing character positions
+ * correspond to increasing bit positions (see the main class notes for
+ * an example).
+ */
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string() const
+ {
+ std::basic_string<_CharT, _Traits, _Alloc> __result;
+ _M_copy_to_string(__result, _CharT('0'), _CharT('1'));
+ return __result;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ std::basic_string<_CharT, _Traits, _Alloc> __result;
+ _M_copy_to_string(__result, __zero, __one);
+ return __result;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 434. bitset::to_string() hard to use.
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string() const
+ { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 853. to_string needs updating with zero and one.
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ { return to_string<_CharT, _Traits,
+ std::allocator<_CharT> >(__zero, __one); }
+
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string() const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >();
+ }
+
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >(__zero, __one);
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string() const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >();
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string(char __zero, char __one = '1') const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >(__zero, __one);
+ }
+
+ // Helper functions for string operations.
+ template<class _CharT, class _Traits>
+ void
+ _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t,
+ _CharT, _CharT);
+
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_from_string(const std::basic_string<_CharT,
+ _Traits, _Alloc>& __s, size_t __pos, size_t __n,
+ _CharT __zero, _CharT __one)
+ { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n,
+ __zero, __one); }
+
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&,
+ _CharT, _CharT) const;
+
+ // NB: Backward compat.
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_from_string(const std::basic_string<_CharT,
+ _Traits, _Alloc>& __s, size_t __pos, size_t __n)
+ { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); }
+
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const
+ { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); }
+
+ /// Returns the number of bits which are set.
+ size_t
+ count() const
+ { return this->_M_do_count(); }
+
+ /// Returns the total number of bits.
+ size_t
+ size() const
+ { return _Nb; }
+
+ //@{
+ /// These comparisons for equality/inequality are, well, @e bitwise.
+ bool
+ operator==(const bitset<_Nb>& __rhs) const
+ { return this->_M_is_equal(__rhs); }
+
+ bool
+ operator!=(const bitset<_Nb>& __rhs) const
+ { return !this->_M_is_equal(__rhs); }
+ //@}
+
+ /**
+ * @brief Tests the value of a bit.
+ * @param position The index of a bit.
+ * @return The value at @a pos.
+ * @throw std::out_of_range If @a pos is bigger the size of the %set.
+ */
+ bool
+ test(size_t __position) const
+ {
+ if (__position >= _Nb)
+ __throw_out_of_range(__N("bitset::test"));
+ return _Unchecked_test(__position);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 693. std::bitset::all() missing.
+ /**
+ * @brief Tests whether all the bits are on.
+ * @return True if all the bits are set.
+ */
+ bool
+ all() const
+ { return this->_M_are_all_aux() == _Nb; }
+
+ /**
+ * @brief Tests whether any of the bits are on.
+ * @return True if at least one bit is set.
+ */
+ bool
+ any() const
+ { return this->_M_is_any(); }
+
+ /**
+ * @brief Tests whether any of the bits are on.
+ * @return True if none of the bits are set.
+ */
+ bool
+ none() const
+ { return !this->_M_is_any(); }
+
+ //@{
+ /// Self-explanatory.
+ bitset<_Nb>
+ operator<<(size_t __position) const
+ { return bitset<_Nb>(*this) <<= __position; }
+
+ bitset<_Nb>
+ operator>>(size_t __position) const
+ { return bitset<_Nb>(*this) >>= __position; }
+ //@}
+
+ /**
+ * @brief Finds the index of the first "on" bit.
+ * @return The index of the first bit set, or size() if not found.
+ * @ingroup SGIextensions
+ * @sa _Find_next
+ */
+ size_t
+ _Find_first() const
+ { return this->_M_do_find_first(_Nb); }
+
+ /**
+ * @brief Finds the index of the next "on" bit after prev.
+ * @return The index of the next bit set, or size() if not found.
+ * @param prev Where to start searching.
+ * @ingroup SGIextensions
+ * @sa _Find_first
+ */
+ size_t
+ _Find_next(size_t __prev ) const
+ { return this->_M_do_find_next(__prev, _Nb); }
+ };
+
+ // Definitions of non-inline member functions.
+ template<size_t _Nb>
+ template<class _CharT, class _Traits>
+ void
+ bitset<_Nb>::
+ _M_copy_from_ptr(const _CharT* __s, size_t __len,
+ size_t __pos, size_t __n, _CharT __zero, _CharT __one)
+ {
+ reset();
+ const size_t __nbits = std::min(_Nb, std::min(__n, __len - __pos));
+ for (size_t __i = __nbits; __i > 0; --__i)
+ {
+ const _CharT __c = __s[__pos + __nbits - __i];
+ if (_Traits::eq(__c, __zero))
+ ;
+ else if (_Traits::eq(__c, __one))
+ _Unchecked_set(__i - 1);
+ else
+ __throw_invalid_argument(__N("bitset::_M_copy_from_ptr"));
+ }
+ }
+
+ template<size_t _Nb>
+ template<class _CharT, class _Traits, class _Alloc>
+ void
+ bitset<_Nb>::
+ _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s,
+ _CharT __zero, _CharT __one) const
+ {
+ __s.assign(_Nb, __zero);
+ for (size_t __i = _Nb; __i > 0; --__i)
+ if (_Unchecked_test(__i - 1))
+ _Traits::assign(__s[_Nb - __i], __one);
+ }
+
+ // 23.3.5.3 bitset operations:
+ //@{
+ /**
+ * @brief Global bitwise operations on bitsets.
+ * @param x A bitset.
+ * @param y A bitset of the same size as @a x.
+ * @return A new bitset.
+ *
+ * These should be self-explanatory.
+ */
+ template<size_t _Nb>
+ inline bitset<_Nb>
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result &= __y;
+ return __result;
+ }
+
+ template<size_t _Nb>
+ inline bitset<_Nb>
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result |= __y;
+ return __result;
+ }
+
+ template <size_t _Nb>
+ inline bitset<_Nb>
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ {
+ bitset<_Nb> __result(__x);
+ __result ^= __y;
+ return __result;
+ }
+ //@}
+
+ //@{
+ /**
+ * @brief Global I/O operators for bitsets.
+ *
+ * Direct I/O between streams and bitsets is supported. Output is
+ * straightforward. Input will skip whitespace, only accept '0' and '1'
+ * characters, and will only extract as many digits as the %bitset will
+ * hold.
+ */
+ template<class _CharT, class _Traits, size_t _Nb>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+ {
+ typedef typename _Traits::char_type char_type;
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ std::basic_string<_CharT, _Traits> __tmp;
+ __tmp.reserve(_Nb);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 303. Bitset input operator underspecified
+ const char_type __zero = __is.widen('0');
+ const char_type __one = __is.widen('1');
+
+ typename __ios_base::iostate __state = __ios_base::goodbit;
+ typename __istream_type::sentry __sentry(__is);
+ if (__sentry)
+ {
+ __try
+ {
+ for (size_t __i = _Nb; __i > 0; --__i)
+ {
+ static typename _Traits::int_type __eof = _Traits::eof();
+
+ typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof))
+ {
+ __state |= __ios_base::eofbit;
+ break;
+ }
+ else
+ {
+ const char_type __c2 = _Traits::to_char_type(__c1);
+ if (_Traits::eq(__c2, __zero))
+ __tmp.push_back(__zero);
+ else if (_Traits::eq(__c2, __one))
+ __tmp.push_back(__one);
+ else if (_Traits::
+ eq_int_type(__is.rdbuf()->sputbackc(__c2),
+ __eof))
+ {
+ __state |= __ios_base::failbit;
+ break;
+ }
+ }
+ }
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __is._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ { __is._M_setstate(__ios_base::badbit); }
+ }
+
+ if (__tmp.empty() && _Nb)
+ __state |= __ios_base::failbit;
+ else
+ __x._M_copy_from_string(__tmp, static_cast<size_t>(0), _Nb,
+ __zero, __one);
+ if (__state)
+ __is.setstate(__state);
+ return __is;
+ }
+
+ template <class _CharT, class _Traits, size_t _Nb>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x)
+ {
+ std::basic_string<_CharT, _Traits> __tmp;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__os.getloc());
+ __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1'));
+ return __os << __tmp;
+ }
+ //@}
+
+_GLIBCXX_END_NESTED_NAMESPACE
+
+#undef _GLIBCXX_BITSET_WORDS
+#undef _GLIBCXX_BITSET_BITS_PER_WORD
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/bitset>
+#endif
+
+#endif /* _GLIBCXX_BITSET */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/c++0x_warning.h b/6/sources/cxx-stl/gnu-libstdc++/include/c++0x_warning.h
new file mode 100644
index 0000000..b74f339
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/c++0x_warning.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/c++0x_warning.h
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _CXX0X_WARNING_H
+#define _CXX0X_WARNING_H 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#error This file requires compiler and library support for the upcoming \
+ISO C++ standard, C++0x. This support is currently experimental, and must be \
+enabled with the -std=c++0x or -std=gnu++0x compiler options.
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cassert b/6/sources/cxx-stl/gnu-libstdc++/include/cassert
new file mode 100644
index 0000000..186de0f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cassert
@@ -0,0 +1,45 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cassert
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c assert.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 19.2 Assertions
+//
+
+// No include guards on this header...
+
+#pragma GCC system_header
+
+#include <assert.h>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ccomplex b/6/sources/cxx-stl/gnu-libstdc++/include/ccomplex
new file mode 100644
index 0000000..e347e17
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ccomplex
@@ -0,0 +1,44 @@
+// <ccomplex> -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/ccomplex
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CCOMPLEX
+#define _GLIBCXX_CCOMPLEX 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <complex>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cctype b/6/sources/cxx-stl/gnu-libstdc++/include/cctype
new file mode 100644
index 0000000..44ef4d4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cctype
@@ -0,0 +1,101 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cctype
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c ctype.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: <ccytpe>
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <ctype.h>
+
+#ifndef _GLIBCXX_CCTYPE
+#define _GLIBCXX_CCTYPE 1
+
+// Get rid of those macros defined in <ctype.h> in lieu of real functions.
+#undef isalnum
+#undef isalpha
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef tolower
+#undef toupper
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::isalnum;
+ using ::isalpha;
+ using ::iscntrl;
+ using ::isdigit;
+ using ::isgraph;
+ using ::islower;
+ using ::isprint;
+ using ::ispunct;
+ using ::isspace;
+ using ::isupper;
+ using ::isxdigit;
+ using ::tolower;
+ using ::toupper;
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cctype>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cctype>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cerrno b/6/sources/cxx-stl/gnu-libstdc++/include/cerrno
new file mode 100644
index 0000000..3716429
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cerrno
@@ -0,0 +1,53 @@
+// The -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cerrno
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c errno.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 19.3 Error numbers
+//
+
+#pragma GCC system_header
+
+#include <errno.h>
+
+#ifndef _GLIBCXX_CERRNO
+#define _GLIBCXX_CERRNO 1
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef errno
+#define errno errno
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cfenv b/6/sources/cxx-stl/gnu-libstdc++/include/cfenv
new file mode 100644
index 0000000..9b02c8c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cfenv
@@ -0,0 +1,61 @@
+// <cfenv> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cfenv
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_CFENV
+#define _GLIBCXX_CFENV 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <bits/c++config.h>
+#if _GLIBCXX_HAVE_FENV_H
+# include <fenv.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cfenv>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cfenv>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // _GLIBCXX_CFENV
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cfloat b/6/sources/cxx-stl/gnu-libstdc++/include/cfloat
new file mode 100644
index 0000000..54eb778
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cfloat
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cfloat
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c float.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include <float.h>
+
+#ifndef _GLIBCXX_CFLOAT
+#define _GLIBCXX_CFLOAT 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# ifndef DECIMAL_DIG
+# define DECIMAL_DIG __DECIMAL_DIG__
+# endif
+# ifndef FLT_EVAL_METHOD
+# define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/chrono b/6/sources/cxx-stl/gnu-libstdc++/include/chrono
new file mode 100644
index 0000000..aaa9646
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/chrono
@@ -0,0 +1,672 @@
+// <chrono> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/chrono
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_CHRONO
+#define _GLIBCXX_CHRONO 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#ifdef _GLIBCXX_INCLUDE_AS_TR1
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <ratio>
+#include <type_traits>
+#include <limits>
+#include <ctime>
+
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+
+namespace std
+{
+ /**
+ * @defgroup chrono Time
+ * @ingroup utilities
+ *
+ * Classes and functions for time.
+ * @{
+ */
+
+ /** @namespace std::chrono
+ * @brief ISO C++ 0x entities sub namespace for time and date.
+ */
+ namespace chrono
+ {
+ template<typename _Rep, typename _Period = ratio<1>>
+ struct duration;
+
+ template<typename _Clock, typename _Duration = typename _Clock::duration>
+ struct time_point;
+ }
+
+ // 20.8.2.3 specialization of common_type (for duration)
+ template<typename _Rep1, typename _Period1, typename _Rep2, typename _Period2>
+ struct common_type<chrono::duration<_Rep1, _Period1>,
+ chrono::duration<_Rep2, _Period2>>
+ {
+ typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
+ ratio<__static_gcd<_Period1::num, _Period2::num>::value,
+ (_Period1::den / __static_gcd<_Period1::den, _Period2::den>::value)
+ * _Period2::den>> type;
+ };
+
+ // 20.8.2.3 specialization of common_type (for time_point)
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ struct common_type<chrono::time_point<_Clock, _Duration1>,
+ chrono::time_point<_Clock, _Duration2>>
+ {
+ typedef chrono::time_point<_Clock,
+ typename common_type<_Duration1, _Duration2>::type> type;
+ };
+
+ namespace chrono
+ {
+ // Primary template for duration_cast impl.
+ template<typename _ToDuration, typename _CF, typename _CR,
+ bool _NumIsOne = false, bool _DenIsOne = false>
+ struct __duration_cast_impl
+ {
+ template<typename _Rep, typename _Period>
+ static _ToDuration __cast(const duration<_Rep, _Period>& __d)
+ {
+ return _ToDuration(static_cast<
+ typename _ToDuration::rep>(static_cast<_CR>(__d.count())
+ * static_cast<_CR>(_CF::num)
+ / static_cast<_CR>(_CF::den)));
+ }
+ };
+
+ template<typename _ToDuration, typename _CF, typename _CR>
+ struct __duration_cast_impl<_ToDuration, _CF, _CR, true, true>
+ {
+ template<typename _Rep, typename _Period>
+ static _ToDuration __cast(const duration<_Rep, _Period>& __d)
+ {
+ return _ToDuration(
+ static_cast<typename _ToDuration::rep>(__d.count()));
+ }
+ };
+
+ template<typename _ToDuration, typename _CF, typename _CR>
+ struct __duration_cast_impl<_ToDuration, _CF, _CR, true, false>
+ {
+ template<typename _Rep, typename _Period>
+ static _ToDuration __cast(const duration<_Rep, _Period>& __d)
+ {
+ return _ToDuration(static_cast<typename _ToDuration::rep>(
+ static_cast<_CR>(__d.count()) / static_cast<_CR>(_CF::den)));
+ }
+ };
+
+ template<typename _ToDuration, typename _CF, typename _CR>
+ struct __duration_cast_impl<_ToDuration, _CF, _CR, false, true>
+ {
+ template<typename _Rep, typename _Period>
+ static _ToDuration __cast(const duration<_Rep, _Period>& __d)
+ {
+ return _ToDuration(static_cast<typename _ToDuration::rep>(
+ static_cast<_CR>(__d.count()) * static_cast<_CR>(_CF::num)));
+ }
+ };
+
+ /// duration_cast
+ template<typename _ToDuration, typename _Rep, typename _Period>
+ inline _ToDuration
+ duration_cast(const duration<_Rep, _Period>& __d)
+ {
+ typedef typename
+ ratio_divide<_Period, typename _ToDuration::period>::type __cf;
+ typedef typename
+ common_type<typename _ToDuration::rep, _Rep, intmax_t>::type __cr;
+
+ return __duration_cast_impl<_ToDuration, __cf, __cr,
+ __cf::num == 1, __cf::den == 1>::__cast(__d);
+ }
+
+ /// treat_as_floating_point
+ template<typename _Rep>
+ struct treat_as_floating_point
+ : is_floating_point<_Rep>
+ { };
+
+ /// duration_values
+ template<typename _Rep>
+ struct duration_values
+ {
+ static const _Rep
+ zero()
+ { return _Rep(0); }
+
+ static const _Rep
+ max()
+ { return numeric_limits<_Rep>::max(); }
+
+ static const _Rep
+ min()
+ { return numeric_limits<_Rep>::min(); }
+ };
+
+ template<typename _Tp>
+ struct __is_duration
+ : std::false_type
+ { };
+
+ template<typename _Rep, typename _Period>
+ struct __is_duration<duration<_Rep, _Period>>
+ : std::true_type
+ { };
+
+ template<typename T>
+ struct __is_ratio
+ : std::false_type
+ { };
+
+ template<intmax_t _Num, intmax_t _Den>
+ struct __is_ratio<ratio<_Num, _Den>>
+ : std::true_type
+ { };
+
+ /// duration
+ template<typename _Rep, typename _Period>
+ struct duration
+ {
+ static_assert(!__is_duration<_Rep>::value, "rep cannot be a duration");
+ static_assert(__is_ratio<_Period>::value,
+ "period must be a specialization of ratio");
+ static_assert(_Period::num > 0, "period must be positive");
+
+ typedef _Rep rep;
+ typedef _Period period;
+
+ // 20.8.3.1 construction / copy / destroy
+ duration() = default;
+
+ template<typename _Rep2>
+ explicit duration(_Rep2 const& __rep)
+ : __r(static_cast<rep>(__rep))
+ {
+ static_assert(is_convertible<_Rep2,rep>::value
+ && (treat_as_floating_point<rep>::value
+ || !treat_as_floating_point<_Rep2>::value),
+ "cannot construct integral duration with floating point type");
+ }
+
+ template<typename _Rep2, typename _Period2>
+ duration(const duration<_Rep2, _Period2>& __d)
+ : __r(duration_cast<duration>(__d).count())
+ {
+ static_assert(treat_as_floating_point<rep>::value == true
+ || ratio_divide<_Period2, period>::type::den == 1,
+ "the resulting duration is not exactly representable");
+ }
+
+ ~duration() = default;
+ duration(const duration&) = default;
+ duration& operator=(const duration&) = default;
+
+ // 20.8.3.2 observer
+ rep
+ count() const
+ { return __r; }
+
+ // 20.8.3.3 arithmetic
+ duration
+ operator+() const
+ { return *this; }
+
+ duration
+ operator-() const
+ { return duration(-__r); }
+
+ duration&
+ operator++()
+ {
+ ++__r;
+ return *this;
+ }
+
+ duration
+ operator++(int)
+ { return duration(__r++); }
+
+ duration&
+ operator--()
+ {
+ --__r;
+ return *this;
+ }
+
+ duration
+ operator--(int)
+ { return duration(__r--); }
+
+ duration&
+ operator+=(const duration& __d)
+ {
+ __r += __d.count();
+ return *this;
+ }
+
+ duration&
+ operator-=(const duration& __d)
+ {
+ __r -= __d.count();
+ return *this;
+ }
+
+ duration&
+ operator*=(const rep& __rhs)
+ {
+ __r *= __rhs;
+ return *this;
+ }
+
+ duration&
+ operator/=(const rep& __rhs)
+ {
+ __r /= __rhs;
+ return *this;
+ }
+
+ // 20.8.3.4 special values
+ // TODO: These should be constexprs.
+ static const duration
+ zero()
+ { return duration(duration_values<rep>::zero()); }
+
+ static const duration
+ min()
+ { return duration(duration_values<rep>::min()); }
+
+ static const duration
+ max()
+ { return duration(duration_values<rep>::max()); }
+
+ private:
+ rep __r;
+ };
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type
+ operator+(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ {
+ typedef typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type __ct;
+ return __ct(__lhs) += __rhs;
+ }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type
+ operator-(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ {
+ typedef typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type __ct;
+ return __ct(__lhs) -= __rhs;
+ }
+
+ template<typename _Rep1, typename _Period, typename _Rep2>
+ inline duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+ operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
+ {
+ typedef typename common_type<_Rep1, _Rep2>::type __cr;
+ return duration<__cr, _Period>(__d) *= __s;
+ }
+
+ template<typename _Rep1, typename _Period, typename _Rep2>
+ inline duration<typename common_type<_Rep1, _Rep2>::type, _Period>
+ operator*(const _Rep2& __s, const duration<_Rep1, _Period>& __d)
+ { return __d * __s; }
+
+ template<typename _Tp, typename _Up, typename _Ep = void>
+ struct __division_impl;
+
+ template<typename _Rep1, typename _Period, typename _Rep2>
+ struct __division_impl<duration<_Rep1, _Period>, _Rep2,
+ typename enable_if<!__is_duration<_Rep2>::value>::type>
+ {
+ typedef typename common_type<_Rep1, _Rep2>::type __cr;
+ typedef
+ duration<typename common_type<_Rep1, _Rep2>::type, _Period> __rt;
+
+ static __rt
+ __divide(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
+ { return duration<__cr, _Period>(__d) /= __s; }
+ };
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ struct __division_impl<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>
+ {
+ typedef typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type __ct;
+ typedef typename common_type<_Rep1, _Rep2>::type __rt;
+
+ static __rt
+ __divide(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return __ct(__lhs).count() / __ct(__rhs).count(); }
+ };
+
+ template<typename _Rep, typename _Period, typename _Up>
+ inline typename __division_impl<duration<_Rep, _Period>, _Up>::__rt
+ operator/(const duration<_Rep, _Period>& __d, const _Up& __u)
+ {
+ return
+ __division_impl<duration<_Rep, _Period>, _Up>::__divide(__d, __u);
+ }
+
+ // comparisons
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator==(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ {
+ typedef typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type __ct;
+ return __ct(__lhs).count() == __ct(__rhs).count();
+ }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator<(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ {
+ typedef typename common_type<duration<_Rep1, _Period1>,
+ duration<_Rep2, _Period2>>::type __ct;
+ return __ct(__lhs).count() < __ct(__rhs).count();
+ }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator!=(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator<=(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return !(__rhs < __lhs); }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator>(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return __rhs < __lhs; }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Rep2, typename _Period2>
+ inline bool
+ operator>=(const duration<_Rep1, _Period1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return !(__lhs < __rhs); }
+
+ /// nanoseconds
+ typedef duration<int64_t, nano> nanoseconds;
+
+ /// microseconds
+ typedef duration<int64_t, micro> microseconds;
+
+ /// milliseconds
+ typedef duration<int64_t, milli> milliseconds;
+
+ /// seconds
+ typedef duration<int64_t > seconds;
+
+ /// minutes
+ typedef duration<int, ratio< 60>> minutes;
+
+ /// hours
+ typedef duration<int, ratio<3600>> hours;
+
+ /// time_point
+ template<typename _Clock, typename _Duration>
+ struct time_point
+ {
+ typedef _Clock clock;
+ typedef _Duration duration;
+ typedef typename duration::rep rep;
+ typedef typename duration::period period;
+
+ time_point() : __d(duration::zero())
+ { }
+
+ explicit time_point(const duration& __dur)
+ : __d(duration::zero() + __dur)
+ { }
+
+ // conversions
+ template<typename _Duration2>
+ time_point(const time_point<clock, _Duration2>& __t)
+ : __d(__t.time_since_epoch())
+ { }
+
+ // observer
+ duration
+ time_since_epoch() const
+ { return __d; }
+
+ // arithmetic
+ time_point&
+ operator+=(const duration& __dur)
+ {
+ __d += __dur;
+ return *this;
+ }
+
+ time_point&
+ operator-=(const duration& __dur)
+ {
+ __d -= __dur;
+ return *this;
+ }
+
+ // special values
+ // TODO: These should be constexprs.
+ static const time_point
+ min()
+ { return time_point(duration::min()); }
+
+ static const time_point
+ max()
+ { return time_point(duration::max()); }
+
+ private:
+ duration __d;
+ };
+
+ /// time_point_cast
+ template<typename _ToDuration, typename _Clock, typename _Duration>
+ inline time_point<_Clock, _ToDuration>
+ time_point_cast(const time_point<_Clock, _Duration>& __t)
+ {
+ return time_point<_Clock, _ToDuration>(
+ duration_cast<_ToDuration>(__t.time_since_epoch()));
+ }
+
+ template<typename _Clock, typename _Duration1,
+ typename _Rep2, typename _Period2>
+ inline time_point<_Clock,
+ typename common_type<_Duration1, duration<_Rep2, _Period2>>::type>
+ operator+(const time_point<_Clock, _Duration1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ {
+ typedef time_point<_Clock,
+ typename common_type<_Duration1,
+ duration<_Rep2, _Period2>>::type> __ct;
+ return __ct(__lhs) += __rhs;
+ }
+
+ template<typename _Rep1, typename _Period1,
+ typename _Clock, typename _Duration2>
+ inline time_point<_Clock,
+ typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
+ operator+(const duration<_Rep1, _Period1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return __rhs + __lhs; }
+
+ template<typename _Clock, typename _Duration1,
+ typename _Rep2, typename _Period2>
+ inline time_point<_Clock,
+ typename common_type<_Duration1, duration<_Rep2, _Period2>>::type>
+ operator-(const time_point<_Clock, _Duration1>& __lhs,
+ const duration<_Rep2, _Period2>& __rhs)
+ { return __lhs + (-__rhs); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline typename common_type<_Duration1, _Duration2>::type
+ operator-(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return __lhs.time_since_epoch() - __rhs.time_since_epoch(); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator==(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return __lhs.time_since_epoch() == __rhs.time_since_epoch(); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator!=(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator<(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return __lhs.time_since_epoch() < __rhs.time_since_epoch(); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator<=(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return !(__rhs < __lhs); }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator>(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return __rhs < __lhs; }
+
+ template<typename _Clock, typename _Duration1, typename _Duration2>
+ inline bool
+ operator>=(const time_point<_Clock, _Duration1>& __lhs,
+ const time_point<_Clock, _Duration2>& __rhs)
+ { return !(__lhs < __rhs); }
+
+ /// system_clock
+ struct system_clock
+ {
+#ifdef _GLIBCXX_USE_CLOCK_REALTIME
+ typedef chrono::nanoseconds duration;
+#elif defined(_GLIBCXX_USE_GETTIMEOFDAY)
+ typedef chrono::microseconds duration;
+#else
+ typedef chrono::seconds duration;
+#endif
+
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<system_clock, duration> time_point;
+
+ static const bool is_monotonic = false;
+
+ static time_point
+ now();
+
+ // Map to C API
+ static std::time_t
+ to_time_t(const time_point& __t)
+ {
+ return std::time_t(
+ duration_cast<chrono::seconds>(__t.time_since_epoch()).count());
+ }
+
+ static time_point
+ from_time_t(std::time_t __t)
+ {
+ return time_point_cast<system_clock::duration>(
+ chrono::time_point<system_clock, chrono::seconds>(
+ chrono::seconds(__t)));
+ }
+
+ // TODO: requires constexpr
+ /*
+ static_assert(
+ system_clock::duration::min() <
+ system_clock::duration::zero(),
+ "a clock's minimum duration cannot be less than its epoch");
+ */
+ };
+
+#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
+ /// monotonic_clock
+ struct monotonic_clock
+ {
+ typedef chrono::nanoseconds duration;
+ typedef duration::rep rep;
+ typedef duration::period period;
+ typedef chrono::time_point<monotonic_clock, duration> time_point;
+
+ static const bool is_monotonic = true;
+
+ static time_point
+ now();
+ };
+#else
+ typedef system_clock monotonic_clock;
+#endif
+
+ typedef system_clock high_resolution_clock;
+ } // namespace chrono
+
+ // @} group chrono
+} // namespace std
+
+#endif //_GLIBCXX_USE_C99_STDINT_TR1
+
+#endif //__GXX_EXPERIMENTAL_CXX0X__
+
+#endif //_GLIBCXX_CHRONO
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cinttypes b/6/sources/cxx-stl/gnu-libstdc++/include/cinttypes
new file mode 100644
index 0000000..5ed1a21
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cinttypes
@@ -0,0 +1,71 @@
+// <cinttypes> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cinttypes
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_CINTTYPES
+#define _GLIBCXX_CINTTYPES 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <cstdint>
+
+// For 8.11.1/1 (see C99, Note 184)
+#if _GLIBCXX_HAVE_INTTYPES_H
+# ifndef __STDC_FORMAT_MACROS
+# define _UNDEF__STDC_FORMAT_MACROS
+# define __STDC_FORMAT_MACROS
+# endif
+# include <inttypes.h>
+# ifdef _UNDEF__STDC_FORMAT_MACROS
+# undef __STDC_FORMAT_MACROS
+# undef _UNDEF__STDC_FORMAT_MACROS
+# endif
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cinttypes>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cinttypes>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // _GLIBCXX_CINTTYPES
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ciso646 b/6/sources/cxx-stl/gnu-libstdc++/include/ciso646
new file mode 100644
index 0000000..a3c3f9b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ciso646
@@ -0,0 +1,33 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ciso646
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c iso646.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/climits b/6/sources/cxx-stl/gnu-libstdc++/include/climits
new file mode 100644
index 0000000..943d69e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/climits
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/climits
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c limits.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include <limits.h>
+
+#ifndef _GLIBCXX_CLIMITS
+#define _GLIBCXX_CLIMITS 1
+
+#ifndef LLONG_MIN
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1)
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX __LONG_LONG_MAX__
+#endif
+
+#ifndef ULLONG_MAX
+#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/clocale b/6/sources/cxx-stl/gnu-libstdc++/include/clocale
new file mode 100644
index 0000000..eb955c9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/clocale
@@ -0,0 +1,61 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file clocale
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c locale.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <locale.h>
+
+#ifndef _GLIBCXX_CLOCALE
+#define _GLIBCXX_CLOCALE 1
+
+// Get rid of those macros defined in <locale.h> in lieu of real functions.
+#undef setlocale
+#undef localeconv
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::lconv;
+ using ::setlocale;
+ using ::localeconv;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cmath b/6/sources/cxx-stl/gnu-libstdc++/include/cmath
new file mode 100644
index 0000000..9a63a01
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cmath
@@ -0,0 +1,631 @@
+// -*- C++ -*- C forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cmath
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c math.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 26.5 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <math.h>
+
+#ifndef _GLIBCXX_CMATH
+#define _GLIBCXX_CMATH 1
+
+// Get rid of those macros defined in <math.h> in lieu of real functions.
+#undef abs
+#undef div
+#undef acos
+#undef asin
+#undef atan
+#undef atan2
+#undef ceil
+#undef cos
+#undef cosh
+#undef exp
+#undef fabs
+#undef floor
+#undef fmod
+#undef frexp
+#undef ldexp
+#undef log
+#undef log10
+#undef modf
+#undef pow
+#undef sin
+#undef sinh
+#undef sqrt
+#undef tan
+#undef tanh
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Forward declaration of a helper function. This really should be
+ // an `exported' forward declaration.
+ template<typename _Tp>
+ _Tp __cmath_power(_Tp, unsigned int);
+
+ template<typename _Tp>
+ inline _Tp
+ __pow_helper(_Tp __x, int __n)
+ {
+ return __n < 0
+ ? _Tp(1)/__cmath_power(__x, -__n)
+ : __cmath_power(__x, __n);
+ }
+
+ inline double
+ abs(double __x)
+ { return __builtin_fabs(__x); }
+
+ inline float
+ abs(float __x)
+ { return __builtin_fabsf(__x); }
+
+ inline long double
+ abs(long double __x)
+ { return __builtin_fabsl(__x); }
+
+ using ::acos;
+
+ inline float
+ acos(float __x)
+ { return __builtin_acosf(__x); }
+
+ inline long double
+ acos(long double __x)
+ { return __builtin_acosl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ acos(_Tp __x)
+ { return __builtin_acos(__x); }
+
+ using ::asin;
+
+ inline float
+ asin(float __x)
+ { return __builtin_asinf(__x); }
+
+ inline long double
+ asin(long double __x)
+ { return __builtin_asinl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ asin(_Tp __x)
+ { return __builtin_asin(__x); }
+
+ using ::atan;
+
+ inline float
+ atan(float __x)
+ { return __builtin_atanf(__x); }
+
+ inline long double
+ atan(long double __x)
+ { return __builtin_atanl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ atan(_Tp __x)
+ { return __builtin_atan(__x); }
+
+ using ::atan2;
+
+ inline float
+ atan2(float __y, float __x)
+ { return __builtin_atan2f(__y, __x); }
+
+ inline long double
+ atan2(long double __y, long double __x)
+ { return __builtin_atan2l(__y, __x); }
+
+ template<typename _Tp, typename _Up>
+ inline
+ typename __gnu_cxx::__promote_2<
+ typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+ && __is_arithmetic<_Up>::__value,
+ _Tp>::__type, _Up>::__type
+ atan2(_Tp __y, _Up __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return atan2(__type(__y), __type(__x));
+ }
+
+ using ::ceil;
+
+ inline float
+ ceil(float __x)
+ { return __builtin_ceilf(__x); }
+
+ inline long double
+ ceil(long double __x)
+ { return __builtin_ceill(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ceil(_Tp __x)
+ { return __builtin_ceil(__x); }
+
+ using ::cos;
+
+ inline float
+ cos(float __x)
+ { return __builtin_cosf(__x); }
+
+ inline long double
+ cos(long double __x)
+ { return __builtin_cosl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cos(_Tp __x)
+ { return __builtin_cos(__x); }
+
+ using ::cosh;
+
+ inline float
+ cosh(float __x)
+ { return __builtin_coshf(__x); }
+
+ inline long double
+ cosh(long double __x)
+ { return __builtin_coshl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ cosh(_Tp __x)
+ { return __builtin_cosh(__x); }
+
+ using ::exp;
+
+ inline float
+ exp(float __x)
+ { return __builtin_expf(__x); }
+
+ inline long double
+ exp(long double __x)
+ { return __builtin_expl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ exp(_Tp __x)
+ { return __builtin_exp(__x); }
+
+ using ::fabs;
+
+ inline float
+ fabs(float __x)
+ { return __builtin_fabsf(__x); }
+
+ inline long double
+ fabs(long double __x)
+ { return __builtin_fabsl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ fabs(_Tp __x)
+ { return __builtin_fabs(__x); }
+
+ using ::floor;
+
+ inline float
+ floor(float __x)
+ { return __builtin_floorf(__x); }
+
+ inline long double
+ floor(long double __x)
+ { return __builtin_floorl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ floor(_Tp __x)
+ { return __builtin_floor(__x); }
+
+ using ::fmod;
+
+ inline float
+ fmod(float __x, float __y)
+ { return __builtin_fmodf(__x, __y); }
+
+ inline long double
+ fmod(long double __x, long double __y)
+ { return __builtin_fmodl(__x, __y); }
+
+ using ::frexp;
+
+ inline float
+ frexp(float __x, int* __exp)
+ { return __builtin_frexpf(__x, __exp); }
+
+ inline long double
+ frexp(long double __x, int* __exp)
+ { return __builtin_frexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ frexp(_Tp __x, int* __exp)
+ { return __builtin_frexp(__x, __exp); }
+
+ using ::ldexp;
+
+ inline float
+ ldexp(float __x, int __exp)
+ { return __builtin_ldexpf(__x, __exp); }
+
+ inline long double
+ ldexp(long double __x, int __exp)
+ { return __builtin_ldexpl(__x, __exp); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ ldexp(_Tp __x, int __exp)
+ { return __builtin_ldexp(__x, __exp); }
+
+ using ::log;
+
+ inline float
+ log(float __x)
+ { return __builtin_logf(__x); }
+
+ inline long double
+ log(long double __x)
+ { return __builtin_logl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ log(_Tp __x)
+ { return __builtin_log(__x); }
+
+ using ::log10;
+
+ inline float
+ log10(float __x)
+ { return __builtin_log10f(__x); }
+
+ inline long double
+ log10(long double __x)
+ { return __builtin_log10l(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ log10(_Tp __x)
+ { return __builtin_log10(__x); }
+
+ using ::modf;
+
+ inline float
+ modf(float __x, float* __iptr)
+ { return __builtin_modff(__x, __iptr); }
+
+ inline long double
+ modf(long double __x, long double* __iptr)
+ { return __builtin_modfl(__x, __iptr); }
+
+ using ::pow;
+
+ inline float
+ pow(float __x, float __y)
+ { return __builtin_powf(__x, __y); }
+
+ inline long double
+ pow(long double __x, long double __y)
+ { return __builtin_powl(__x, __y); }
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 550. What should the return type of pow(float,int) be?
+ inline double
+ pow(double __x, int __i)
+ { return __builtin_powi(__x, __i); }
+
+ inline float
+ pow(float __x, int __n)
+ { return __builtin_powif(__x, __n); }
+
+ inline long double
+ pow(long double __x, int __n)
+ { return __builtin_powil(__x, __n); }
+#endif
+
+ template<typename _Tp, typename _Up>
+ inline
+ typename __gnu_cxx::__promote_2<
+ typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
+ && __is_arithmetic<_Up>::__value,
+ _Tp>::__type, _Up>::__type
+ pow(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return pow(__type(__x), __type(__y));
+ }
+
+ using ::sin;
+
+ inline float
+ sin(float __x)
+ { return __builtin_sinf(__x); }
+
+ inline long double
+ sin(long double __x)
+ { return __builtin_sinl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sin(_Tp __x)
+ { return __builtin_sin(__x); }
+
+ using ::sinh;
+
+ inline float
+ sinh(float __x)
+ { return __builtin_sinhf(__x); }
+
+ inline long double
+ sinh(long double __x)
+ { return __builtin_sinhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sinh(_Tp __x)
+ { return __builtin_sinh(__x); }
+
+ using ::sqrt;
+
+ inline float
+ sqrt(float __x)
+ { return __builtin_sqrtf(__x); }
+
+ inline long double
+ sqrt(long double __x)
+ { return __builtin_sqrtl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ sqrt(_Tp __x)
+ { return __builtin_sqrt(__x); }
+
+ using ::tan;
+
+ inline float
+ tan(float __x)
+ { return __builtin_tanf(__x); }
+
+ inline long double
+ tan(long double __x)
+ { return __builtin_tanl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tan(_Tp __x)
+ { return __builtin_tan(__x); }
+
+ using ::tanh;
+
+ inline float
+ tanh(float __x)
+ { return __builtin_tanhf(__x); }
+
+ inline long double
+ tanh(long double __x)
+ { return __builtin_tanhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value,
+ double>::__type
+ tanh(_Tp __x)
+ { return __builtin_tanh(__x); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99_MATH
+#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+
+// These are possible macros imported from C99-land.
+#undef fpclassify
+#undef isfinite
+#undef isinf
+#undef isnan
+#undef isnormal
+#undef signbit
+#undef isgreater
+#undef isgreaterequal
+#undef isless
+#undef islessequal
+#undef islessgreater
+#undef isunordered
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ fpclassify(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL,
+ FP_SUBNORMAL, FP_ZERO, __type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isfinite(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isfinite(__type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isinf(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isinf(__type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnan(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnan(__type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isnormal(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isnormal(__type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ signbit(_Tp __f)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_signbit(__type(__f));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isgreater(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreater(__type(__f1), __type(__f2));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isgreaterequal(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isgreaterequal(__type(__f1), __type(__f2));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isless(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isless(__type(__f1), __type(__f2));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ islessequal(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessequal(__type(__f1), __type(__f2));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ islessgreater(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_islessgreater(__type(__f1), __type(__f2));
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value,
+ int>::__type
+ isunordered(_Tp __f1, _Tp __f2)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __builtin_isunordered(__type(__f1), __type(__f2));
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
+#endif
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/cmath.tcc>
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cmath>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cmath>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/complex b/6/sources/cxx-stl/gnu-libstdc++/include/complex
new file mode 100644
index 0000000..4c0d3fb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/complex
@@ -0,0 +1,1587 @@
+// The template and inlines for the -*- C++ -*- complex number classes.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/complex
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 26.2 Complex Numbers
+// Note: this is not a conforming implementation.
+// Initially implemented by Ulrich Drepper <drepper@cygnus.com>
+// Improved by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
+//
+
+#ifndef _GLIBCXX_COMPLEX
+#define _GLIBCXX_COMPLEX 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+#include <cmath>
+#include <sstream>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @defgroup complex_numbers Complex Numbers
+ * @ingroup numerics
+ *
+ * Classes and functions for complex numbers.
+ * @{
+ */
+
+ // Forward declarations.
+ template<typename _Tp> class complex;
+ template<> class complex<float>;
+ template<> class complex<double>;
+ template<> class complex<long double>;
+
+ /// Return magnitude of @a z.
+ template<typename _Tp> _Tp abs(const complex<_Tp>&);
+ /// Return phase angle of @a z.
+ template<typename _Tp> _Tp arg(const complex<_Tp>&);
+ /// Return @a z magnitude squared.
+ template<typename _Tp> _Tp norm(const complex<_Tp>&);
+
+ /// Return complex conjugate of @a z.
+ template<typename _Tp> complex<_Tp> conj(const complex<_Tp>&);
+ /// Return complex with magnitude @a rho and angle @a theta.
+ template<typename _Tp> complex<_Tp> polar(const _Tp&, const _Tp& = 0);
+
+ // Transcendentals:
+ /// Return complex cosine of @a z.
+ template<typename _Tp> complex<_Tp> cos(const complex<_Tp>&);
+ /// Return complex hyperbolic cosine of @a z.
+ template<typename _Tp> complex<_Tp> cosh(const complex<_Tp>&);
+ /// Return complex base e exponential of @a z.
+ template<typename _Tp> complex<_Tp> exp(const complex<_Tp>&);
+ /// Return complex natural logarithm of @a z.
+ template<typename _Tp> complex<_Tp> log(const complex<_Tp>&);
+ /// Return complex base 10 logarithm of @a z.
+ template<typename _Tp> complex<_Tp> log10(const complex<_Tp>&);
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ // DR 844.
+ /// Return @a x to the @a y'th power.
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, int);
+#endif
+ /// Return @a x to the @a y'th power.
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
+ /// Return @a x to the @a y'th power.
+ template<typename _Tp> complex<_Tp> pow(const complex<_Tp>&,
+ const complex<_Tp>&);
+ /// Return @a x to the @a y'th power.
+ template<typename _Tp> complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
+ /// Return complex sine of @a z.
+ template<typename _Tp> complex<_Tp> sin(const complex<_Tp>&);
+ /// Return complex hyperbolic sine of @a z.
+ template<typename _Tp> complex<_Tp> sinh(const complex<_Tp>&);
+ /// Return complex square root of @a z.
+ template<typename _Tp> complex<_Tp> sqrt(const complex<_Tp>&);
+ /// Return complex tangent of @a z.
+ template<typename _Tp> complex<_Tp> tan(const complex<_Tp>&);
+ /// Return complex hyperbolic tangent of @a z.
+ template<typename _Tp> complex<_Tp> tanh(const complex<_Tp>&);
+
+
+ // 26.2.2 Primary template class complex
+ /**
+ * Template to represent complex numbers.
+ *
+ * Specializations for float, double, and long double are part of the
+ * library. Results with any other type are not guaranteed.
+ *
+ * @param Tp Type of real and imaginary values.
+ */
+ template<typename _Tp>
+ struct complex
+ {
+ /// Value typedef.
+ typedef _Tp value_type;
+
+ /// Default constructor. First parameter is x, second parameter is y.
+ /// Unspecified parameters default to 0.
+ complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp())
+ : _M_real(__r), _M_imag(__i) { }
+
+ // Lets the compiler synthesize the copy constructor
+ // complex (const complex<_Tp>&);
+ /// Copy constructor.
+ template<typename _Up>
+ complex(const complex<_Up>& __z)
+ : _M_real(__z.real()), _M_imag(__z.imag()) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ _Tp real() const
+ { return _M_real; }
+
+ _Tp imag() const
+ { return _M_imag; }
+#else
+ /// Return real part of complex number.
+ _Tp& real()
+ { return _M_real; }
+
+ /// Return real part of complex number.
+ const _Tp& real() const
+ { return _M_real; }
+
+ /// Return imaginary part of complex number.
+ _Tp& imag()
+ { return _M_imag; }
+
+ /// Return imaginary part of complex number.
+ const _Tp& imag() const
+ { return _M_imag; }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ void real(_Tp __val)
+ { _M_real = __val; }
+
+ void imag(_Tp __val)
+ { _M_imag = __val; }
+
+ /// Assign this complex number to scalar @a t.
+ complex<_Tp>& operator=(const _Tp&);
+
+ /// Add @a t to this complex number.
+ // 26.2.5/1
+ complex<_Tp>&
+ operator+=(const _Tp& __t)
+ {
+ _M_real += __t;
+ return *this;
+ }
+
+ /// Subtract @a t from this complex number.
+ // 26.2.5/3
+ complex<_Tp>&
+ operator-=(const _Tp& __t)
+ {
+ _M_real -= __t;
+ return *this;
+ }
+
+ /// Multiply this complex number by @a t.
+ complex<_Tp>& operator*=(const _Tp&);
+ /// Divide this complex number by @a t.
+ complex<_Tp>& operator/=(const _Tp&);
+
+ // Lets the compiler synthesize the
+ // copy and assignment operator
+ // complex<_Tp>& operator= (const complex<_Tp>&);
+ /// Assign this complex number to complex @a z.
+ template<typename _Up>
+ complex<_Tp>& operator=(const complex<_Up>&);
+ /// Add @a z to this complex number.
+ template<typename _Up>
+ complex<_Tp>& operator+=(const complex<_Up>&);
+ /// Subtract @a z from this complex number.
+ template<typename _Up>
+ complex<_Tp>& operator-=(const complex<_Up>&);
+ /// Multiply this complex number by @a z.
+ template<typename _Up>
+ complex<_Tp>& operator*=(const complex<_Up>&);
+ /// Divide this complex number by @a z.
+ template<typename _Up>
+ complex<_Tp>& operator/=(const complex<_Up>&);
+
+ const complex& __rep() const
+ { return *this; }
+
+ private:
+ _Tp _M_real;
+ _Tp _M_imag;
+ };
+
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator=(const _Tp& __t)
+ {
+ _M_real = __t;
+ _M_imag = _Tp();
+ return *this;
+ }
+
+ // 26.2.5/5
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator*=(const _Tp& __t)
+ {
+ _M_real *= __t;
+ _M_imag *= __t;
+ return *this;
+ }
+
+ // 26.2.5/7
+ template<typename _Tp>
+ complex<_Tp>&
+ complex<_Tp>::operator/=(const _Tp& __t)
+ {
+ _M_real /= __t;
+ _M_imag /= __t;
+ return *this;
+ }
+
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator=(const complex<_Up>& __z)
+ {
+ _M_real = __z.real();
+ _M_imag = __z.imag();
+ return *this;
+ }
+
+ // 26.2.5/9
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator+=(const complex<_Up>& __z)
+ {
+ _M_real += __z.real();
+ _M_imag += __z.imag();
+ return *this;
+ }
+
+ // 26.2.5/11
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator-=(const complex<_Up>& __z)
+ {
+ _M_real -= __z.real();
+ _M_imag -= __z.imag();
+ return *this;
+ }
+
+ // 26.2.5/13
+ // XXX: This is a grammar school implementation.
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator*=(const complex<_Up>& __z)
+ {
+ const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
+ _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
+ _M_real = __r;
+ return *this;
+ }
+
+ // 26.2.5/15
+ // XXX: This is a grammar school implementation.
+ template<typename _Tp>
+ template<typename _Up>
+ complex<_Tp>&
+ complex<_Tp>::operator/=(const complex<_Up>& __z)
+ {
+ const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag();
+ const _Tp __n = std::norm(__z);
+ _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
+ _M_real = __r / __n;
+ return *this;
+ }
+
+ // Operators:
+ //@{
+ /// Return new complex value @a x plus @a y.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r += __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r += __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __y;
+ __r += __x;
+ return __r;
+ }
+ //@}
+
+ //@{
+ /// Return new complex value @a x minus @a y.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r -= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r -= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r(__x, -__y.imag());
+ __r -= __y.real();
+ return __r;
+ }
+ //@}
+
+ //@{
+ /// Return new complex value @a x times @a y.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r *= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator*(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __y;
+ __r *= __x;
+ return __r;
+ }
+ //@}
+
+ //@{
+ /// Return new complex value @a x divided by @a y.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const complex<_Tp>& __x, const _Tp& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator/(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ complex<_Tp> __r = __x;
+ __r /= __y;
+ return __r;
+ }
+ //@}
+
+ /// Return @a x.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator+(const complex<_Tp>& __x)
+ { return __x; }
+
+ /// Return complex negation of @a x.
+ template<typename _Tp>
+ inline complex<_Tp>
+ operator-(const complex<_Tp>& __x)
+ { return complex<_Tp>(-__x.real(), -__x.imag()); }
+
+ //@{
+ /// Return true if @a x is equal to @a y.
+ template<typename _Tp>
+ inline bool
+ operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
+
+ template<typename _Tp>
+ inline bool
+ operator==(const complex<_Tp>& __x, const _Tp& __y)
+ { return __x.real() == __y && __x.imag() == _Tp(); }
+
+ template<typename _Tp>
+ inline bool
+ operator==(const _Tp& __x, const complex<_Tp>& __y)
+ { return __x == __y.real() && _Tp() == __y.imag(); }
+ //@}
+
+ //@{
+ /// Return false if @a x is equal to @a y.
+ template<typename _Tp>
+ inline bool
+ operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const complex<_Tp>& __x, const _Tp& __y)
+ { return __x.real() != __y || __x.imag() != _Tp(); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const _Tp& __x, const complex<_Tp>& __y)
+ { return __x != __y.real() || _Tp() != __y.imag(); }
+ //@}
+
+ /// Extraction operator for complex values.
+ template<typename _Tp, typename _CharT, class _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
+ {
+ _Tp __re_x, __im_x;
+ _CharT __ch;
+ __is >> __ch;
+ if (__ch == '(')
+ {
+ __is >> __re_x >> __ch;
+ if (__ch == ',')
+ {
+ __is >> __im_x >> __ch;
+ if (__ch == ')')
+ __x = complex<_Tp>(__re_x, __im_x);
+ else
+ __is.setstate(ios_base::failbit);
+ }
+ else if (__ch == ')')
+ __x = __re_x;
+ else
+ __is.setstate(ios_base::failbit);
+ }
+ else
+ {
+ __is.putback(__ch);
+ __is >> __re_x;
+ __x = __re_x;
+ }
+ return __is;
+ }
+
+ /// Insertion operator for complex values.
+ template<typename _Tp, typename _CharT, class _Traits>
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
+ {
+ basic_ostringstream<_CharT, _Traits> __s;
+ __s.flags(__os.flags());
+ __s.imbue(__os.getloc());
+ __s.precision(__os.precision());
+ __s << '(' << __x.real() << ',' << __x.imag() << ')';
+ return __os << __s.str();
+ }
+
+ // Values
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ inline _Tp
+ real(const complex<_Tp>& __z)
+ { return __z.real(); }
+
+ template<typename _Tp>
+ inline _Tp
+ imag(const complex<_Tp>& __z)
+ { return __z.imag(); }
+#else
+ template<typename _Tp>
+ inline _Tp&
+ real(complex<_Tp>& __z)
+ { return __z.real(); }
+
+ template<typename _Tp>
+ inline const _Tp&
+ real(const complex<_Tp>& __z)
+ { return __z.real(); }
+
+ template<typename _Tp>
+ inline _Tp&
+ imag(complex<_Tp>& __z)
+ { return __z.imag(); }
+
+ template<typename _Tp>
+ inline const _Tp&
+ imag(const complex<_Tp>& __z)
+ { return __z.imag(); }
+#endif
+
+ // 26.2.7/3 abs(__z): Returns the magnitude of __z.
+ template<typename _Tp>
+ inline _Tp
+ __complex_abs(const complex<_Tp>& __z)
+ {
+ _Tp __x = __z.real();
+ _Tp __y = __z.imag();
+ const _Tp __s = std::max(abs(__x), abs(__y));
+ if (__s == _Tp()) // well ...
+ return __s;
+ __x /= __s;
+ __y /= __s;
+ return __s * sqrt(__x * __x + __y * __y);
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline float
+ __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
+
+ inline double
+ __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); }
+
+ inline long double
+ __complex_abs(const __complex__ long double& __z)
+ { return __builtin_cabsl(__z); }
+
+ template<typename _Tp>
+ inline _Tp
+ abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline _Tp
+ abs(const complex<_Tp>& __z) { return __complex_abs(__z); }
+#endif
+
+
+ // 26.2.7/4: arg(__z): Returns the phase angle of __z.
+ template<typename _Tp>
+ inline _Tp
+ __complex_arg(const complex<_Tp>& __z)
+ { return atan2(__z.imag(), __z.real()); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline float
+ __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
+
+ inline double
+ __complex_arg(__complex__ double __z) { return __builtin_carg(__z); }
+
+ inline long double
+ __complex_arg(const __complex__ long double& __z)
+ { return __builtin_cargl(__z); }
+
+ template<typename _Tp>
+ inline _Tp
+ arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline _Tp
+ arg(const complex<_Tp>& __z) { return __complex_arg(__z); }
+#endif
+
+ // 26.2.7/5: norm(__z) returns the squared magnitude of __z.
+ // As defined, norm() is -not- a norm is the common mathematical
+ // sens used in numerics. The helper class _Norm_helper<> tries to
+ // distinguish between builtin floating point and the rest, so as
+ // to deliver an answer as close as possible to the real value.
+ template<bool>
+ struct _Norm_helper
+ {
+ template<typename _Tp>
+ static inline _Tp _S_do_it(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return __x * __x + __y * __y;
+ }
+ };
+
+ template<>
+ struct _Norm_helper<true>
+ {
+ template<typename _Tp>
+ static inline _Tp _S_do_it(const complex<_Tp>& __z)
+ {
+ _Tp __res = std::abs(__z);
+ return __res * __res;
+ }
+ };
+
+ template<typename _Tp>
+ inline _Tp
+ norm(const complex<_Tp>& __z)
+ {
+ return _Norm_helper<__is_floating<_Tp>::__value
+ && !_GLIBCXX_FAST_MATH>::_S_do_it(__z);
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ polar(const _Tp& __rho, const _Tp& __theta)
+ { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ conj(const complex<_Tp>& __z)
+ { return complex<_Tp>(__z.real(), -__z.imag()); }
+
+ // Transcendentals
+
+ // 26.2.8/1 cos(__z): Returns the cosine of __z.
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_cos(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); }
+
+ inline __complex__ double
+ __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); }
+
+ inline __complex__ long double
+ __complex_cos(const __complex__ long double& __z)
+ { return __builtin_ccosl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ cos(const complex<_Tp>& __z) { return __complex_cos(__z); }
+#endif
+
+ // 26.2.8/2 cosh(__z): Returns the hyperbolic cosine of __z.
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_cosh(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); }
+
+ inline __complex__ double
+ __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); }
+
+ inline __complex__ long double
+ __complex_cosh(const __complex__ long double& __z)
+ { return __builtin_ccoshl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ cosh(const complex<_Tp>& __z) { return __complex_cosh(__z); }
+#endif
+
+ // 26.2.8/3 exp(__z): Returns the complex base e exponential of x
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_exp(const complex<_Tp>& __z)
+ { return std::polar(exp(__z.real()), __z.imag()); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); }
+
+ inline __complex__ double
+ __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); }
+
+ inline __complex__ long double
+ __complex_exp(const __complex__ long double& __z)
+ { return __builtin_cexpl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ exp(const complex<_Tp>& __z) { return __complex_exp(__z); }
+#endif
+
+ // 26.2.8/5 log(__z): Returns the natural complex logarithm of __z.
+ // The branch cut is along the negative axis.
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_log(const complex<_Tp>& __z)
+ { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_log(__complex__ float __z) { return __builtin_clogf(__z); }
+
+ inline __complex__ double
+ __complex_log(__complex__ double __z) { return __builtin_clog(__z); }
+
+ inline __complex__ long double
+ __complex_log(const __complex__ long double& __z)
+ { return __builtin_clogl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ log(const complex<_Tp>& __z) { return __complex_log(__z); }
+#endif
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ log10(const complex<_Tp>& __z)
+ { return std::log(__z) / log(_Tp(10.0)); }
+
+ // 26.2.8/10 sin(__z): Returns the sine of __z.
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_sin(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); }
+
+ inline __complex__ double
+ __complex_sin(__complex__ double __z) { return __builtin_csin(__z); }
+
+ inline __complex__ long double
+ __complex_sin(const __complex__ long double& __z)
+ { return __builtin_csinl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ sin(const complex<_Tp>& __z) { return __complex_sin(__z); }
+#endif
+
+ // 26.2.8/11 sinh(__z): Returns the hyperbolic sine of __z.
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_sinh(const complex<_Tp>& __z)
+ {
+ const _Tp __x = __z.real();
+ const _Tp __y = __z.imag();
+ return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); }
+
+ inline __complex__ double
+ __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); }
+
+ inline __complex__ long double
+ __complex_sinh(const __complex__ long double& __z)
+ { return __builtin_csinhl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ sinh(const complex<_Tp>& __z) { return __complex_sinh(__z); }
+#endif
+
+ // 26.2.8/13 sqrt(__z): Returns the complex square root of __z.
+ // The branch cut is on the negative axis.
+ template<typename _Tp>
+ complex<_Tp>
+ __complex_sqrt(const complex<_Tp>& __z)
+ {
+ _Tp __x = __z.real();
+ _Tp __y = __z.imag();
+
+ if (__x == _Tp())
+ {
+ _Tp __t = sqrt(abs(__y) / 2);
+ return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
+ }
+ else
+ {
+ _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x)));
+ _Tp __u = __t / 2;
+ return __x > _Tp()
+ ? complex<_Tp>(__u, __y / __t)
+ : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
+ }
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); }
+
+ inline __complex__ double
+ __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); }
+
+ inline __complex__ long double
+ __complex_sqrt(const __complex__ long double& __z)
+ { return __builtin_csqrtl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z); }
+#endif
+
+ // 26.2.8/14 tan(__z): Return the complex tangent of __z.
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_tan(const complex<_Tp>& __z)
+ { return std::sin(__z) / std::cos(__z); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); }
+
+ inline __complex__ double
+ __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); }
+
+ inline __complex__ long double
+ __complex_tan(const __complex__ long double& __z)
+ { return __builtin_ctanl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ tan(const complex<_Tp>& __z) { return __complex_tan(__z); }
+#endif
+
+
+ // 26.2.8/15 tanh(__z): Returns the hyperbolic tangent of __z.
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_tanh(const complex<_Tp>& __z)
+ { return std::sinh(__z) / std::cosh(__z); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); }
+
+ inline __complex__ double
+ __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); }
+
+ inline __complex__ long double
+ __complex_tanh(const __complex__ long double& __z)
+ { return __builtin_ctanhl(__z); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ tanh(const complex<_Tp>& __z) { return __complex_tanh(__z); }
+#endif
+
+
+ // 26.2.8/9 pow(__x, __y): Returns the complex power base of __x
+ // raised to the __y-th power. The branch
+ // cut is on the negative axis.
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 844. complex pow return type is ambiguous.
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __z, int __n)
+ { return std::__pow_helper(__z, __n); }
+#endif
+
+ template<typename _Tp>
+ complex<_Tp>
+ pow(const complex<_Tp>& __x, const _Tp& __y)
+ {
+#ifndef _GLIBCXX_USE_C99_COMPLEX
+ if (__x == _Tp())
+ return _Tp();
+#endif
+ if (__x.imag() == _Tp() && __x.real() > _Tp())
+ return pow(__x.real(), __y);
+
+ complex<_Tp> __t = std::log(__x);
+ return std::polar(exp(__y * __t.real()), __y * __t.imag());
+ }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_pow(__complex__ float __x, __complex__ float __y)
+ { return __builtin_cpowf(__x, __y); }
+
+ inline __complex__ double
+ __complex_pow(__complex__ double __x, __complex__ double __y)
+ { return __builtin_cpow(__x, __y); }
+
+ inline __complex__ long double
+ __complex_pow(const __complex__ long double& __x,
+ const __complex__ long double& __y)
+ { return __builtin_cpowl(__x, __y); }
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __complex_pow(__x.__rep(), __y.__rep()); }
+#else
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+ { return __complex_pow(__x, __y); }
+#endif
+
+ template<typename _Tp>
+ inline complex<_Tp>
+ pow(const _Tp& __x, const complex<_Tp>& __y)
+ {
+ return __x > _Tp() ? std::polar(pow(__x, __y.real()),
+ __y.imag() * log(__x))
+ : std::pow(complex<_Tp>(__x), __y);
+ }
+
+ // 26.2.3 complex specializations
+ // complex<float> specialization
+ template<>
+ struct complex<float>
+ {
+ typedef float value_type;
+ typedef __complex__ float _ComplexT;
+
+ complex(_ComplexT __z) : _M_value(__z) { }
+
+ complex(float __r = 0.0f, float __i = 0.0f)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+
+ explicit complex(const complex<double>&);
+ explicit complex(const complex<long double>&);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ float real() const
+ { return __real__ _M_value; }
+
+ float imag() const
+ { return __imag__ _M_value; }
+#else
+ float& real()
+ { return __real__ _M_value; }
+
+ const float& real() const
+ { return __real__ _M_value; }
+
+ float& imag()
+ { return __imag__ _M_value; }
+
+ const float& imag() const
+ { return __imag__ _M_value; }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ void real(float __val)
+ { __real__ _M_value = __val; }
+
+ void imag(float __val)
+ { __imag__ _M_value = __val; }
+
+ complex<float>&
+ operator=(float __f)
+ {
+ __real__ _M_value = __f;
+ __imag__ _M_value = 0.0f;
+ return *this;
+ }
+
+ complex<float>&
+ operator+=(float __f)
+ {
+ __real__ _M_value += __f;
+ return *this;
+ }
+
+ complex<float>&
+ operator-=(float __f)
+ {
+ __real__ _M_value -= __f;
+ return *this;
+ }
+
+ complex<float>&
+ operator*=(float __f)
+ {
+ _M_value *= __f;
+ return *this;
+ }
+
+ complex<float>&
+ operator/=(float __f)
+ {
+ _M_value /= __f;
+ return *this;
+ }
+
+ // Let the compiler synthesize the copy and assignment
+ // operator. It always does a pretty good job.
+ // complex& operator=(const complex&);
+
+ template<typename _Tp>
+ complex<float>&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<float>&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+
+ template<class _Tp>
+ complex<float>&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+
+ template<class _Tp>
+ complex<float>&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+
+ template<class _Tp>
+ complex<float>&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+
+ const _ComplexT& __rep() const { return _M_value; }
+
+ private:
+ _ComplexT _M_value;
+ };
+
+ // 26.2.3 complex specializations
+ // complex<double> specialization
+ template<>
+ struct complex<double>
+ {
+ typedef double value_type;
+ typedef __complex__ double _ComplexT;
+
+ complex(_ComplexT __z) : _M_value(__z) { }
+
+ complex(double __r = 0.0, double __i = 0.0)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+
+ complex(const complex<float>& __z)
+ : _M_value(__z.__rep()) { }
+
+ explicit complex(const complex<long double>&);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ double real() const
+ { return __real__ _M_value; }
+
+ double imag() const
+ { return __imag__ _M_value; }
+#else
+ double& real()
+ { return __real__ _M_value; }
+
+ const double& real() const
+ { return __real__ _M_value; }
+
+ double& imag()
+ { return __imag__ _M_value; }
+
+ const double& imag() const
+ { return __imag__ _M_value; }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ void real(double __val)
+ { __real__ _M_value = __val; }
+
+ void imag(double __val)
+ { __imag__ _M_value = __val; }
+
+ complex<double>&
+ operator=(double __d)
+ {
+ __real__ _M_value = __d;
+ __imag__ _M_value = 0.0;
+ return *this;
+ }
+
+ complex<double>&
+ operator+=(double __d)
+ {
+ __real__ _M_value += __d;
+ return *this;
+ }
+
+ complex<double>&
+ operator-=(double __d)
+ {
+ __real__ _M_value -= __d;
+ return *this;
+ }
+
+ complex<double>&
+ operator*=(double __d)
+ {
+ _M_value *= __d;
+ return *this;
+ }
+
+ complex<double>&
+ operator/=(double __d)
+ {
+ _M_value /= __d;
+ return *this;
+ }
+
+ // The compiler will synthesize this, efficiently.
+ // complex& operator=(const complex&);
+
+ template<typename _Tp>
+ complex<double>&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<double>&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<double>&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<double>&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<double>&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+
+ const _ComplexT& __rep() const { return _M_value; }
+
+ private:
+ _ComplexT _M_value;
+ };
+
+ // 26.2.3 complex specializations
+ // complex<long double> specialization
+ template<>
+ struct complex<long double>
+ {
+ typedef long double value_type;
+ typedef __complex__ long double _ComplexT;
+
+ complex(_ComplexT __z) : _M_value(__z) { }
+
+ complex(long double __r = 0.0L, long double __i = 0.0L)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = __i;
+ }
+
+ complex(const complex<float>& __z)
+ : _M_value(__z.__rep()) { }
+
+ complex(const complex<double>& __z)
+ : _M_value(__z.__rep()) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ long double real() const
+ { return __real__ _M_value; }
+
+ long double imag() const
+ { return __imag__ _M_value; }
+#else
+ long double& real()
+ { return __real__ _M_value; }
+
+ const long double& real() const
+ { return __real__ _M_value; }
+
+ long double& imag()
+ { return __imag__ _M_value; }
+
+ const long double& imag() const
+ { return __imag__ _M_value; }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 387. std::complex over-encapsulated.
+ void real(long double __val)
+ { __real__ _M_value = __val; }
+
+ void imag(long double __val)
+ { __imag__ _M_value = __val; }
+
+ complex<long double>&
+ operator=(long double __r)
+ {
+ __real__ _M_value = __r;
+ __imag__ _M_value = 0.0L;
+ return *this;
+ }
+
+ complex<long double>&
+ operator+=(long double __r)
+ {
+ __real__ _M_value += __r;
+ return *this;
+ }
+
+ complex<long double>&
+ operator-=(long double __r)
+ {
+ __real__ _M_value -= __r;
+ return *this;
+ }
+
+ complex<long double>&
+ operator*=(long double __r)
+ {
+ _M_value *= __r;
+ return *this;
+ }
+
+ complex<long double>&
+ operator/=(long double __r)
+ {
+ _M_value /= __r;
+ return *this;
+ }
+
+ // The compiler knows how to do this efficiently
+ // complex& operator=(const complex&);
+
+ template<typename _Tp>
+ complex<long double>&
+ operator=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value = __z.real();
+ __imag__ _M_value = __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<long double>&
+ operator+=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value += __z.real();
+ __imag__ _M_value += __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<long double>&
+ operator-=(const complex<_Tp>& __z)
+ {
+ __real__ _M_value -= __z.real();
+ __imag__ _M_value -= __z.imag();
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<long double>&
+ operator*=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value *= __t;
+ return *this;
+ }
+
+ template<typename _Tp>
+ complex<long double>&
+ operator/=(const complex<_Tp>& __z)
+ {
+ _ComplexT __t;
+ __real__ __t = __z.real();
+ __imag__ __t = __z.imag();
+ _M_value /= __t;
+ return *this;
+ }
+
+ const _ComplexT& __rep() const { return _M_value; }
+
+ private:
+ _ComplexT _M_value;
+ };
+
+ // These bits have to be at the end of this file, so that the
+ // specializations have all been defined.
+ inline
+ complex<float>::complex(const complex<double>& __z)
+ : _M_value(__z.__rep()) { }
+
+ inline
+ complex<float>::complex(const complex<long double>& __z)
+ : _M_value(__z.__rep()) { }
+
+ inline
+ complex<double>::complex(const complex<long double>& __z)
+ : _M_value(__z.__rep()) { }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template istream& operator>>(istream&, complex<float>&);
+ extern template ostream& operator<<(ostream&, const complex<float>&);
+ extern template istream& operator>>(istream&, complex<double>&);
+ extern template ostream& operator<<(ostream&, const complex<double>&);
+ extern template istream& operator>>(istream&, complex<long double>&);
+ extern template ostream& operator<<(ostream&, const complex<long double>&);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template wistream& operator>>(wistream&, complex<float>&);
+ extern template wostream& operator<<(wostream&, const complex<float>&);
+ extern template wistream& operator>>(wistream&, complex<double>&);
+ extern template wostream& operator<<(wostream&, const complex<double>&);
+ extern template wistream& operator>>(wistream&, complex<long double>&);
+ extern template wostream& operator<<(wostream&, const complex<long double>&);
+#endif
+#endif
+
+ // @} group complex_numbers
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // See ext/type_traits.h for the primary template.
+ template<typename _Tp, typename _Up>
+ struct __promote_2<std::complex<_Tp>, _Up>
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+
+ template<typename _Tp, typename _Up>
+ struct __promote_2<_Tp, std::complex<_Up> >
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+
+ template<typename _Tp, typename _Up>
+ struct __promote_2<std::complex<_Tp>, std::complex<_Up> >
+ {
+ public:
+ typedef std::complex<typename __promote_2<_Tp, _Up>::__type> __type;
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/complex>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/complex>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Forward declarations.
+ // DR 781.
+ template<typename _Tp> std::complex<_Tp> proj(const std::complex<_Tp>&);
+
+ template<typename _Tp>
+ std::complex<_Tp>
+ __complex_proj(const std::complex<_Tp>& __z)
+ {
+ const _Tp __den = (__z.real() * __z.real()
+ + __z.imag() * __z.imag() + _Tp(1.0));
+
+ return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den,
+ (_Tp(2.0) * __z.imag()) / __den);
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX
+ inline __complex__ float
+ __complex_proj(__complex__ float __z)
+ { return __builtin_cprojf(__z); }
+
+ inline __complex__ double
+ __complex_proj(__complex__ double __z)
+ { return __builtin_cproj(__z); }
+
+ inline __complex__ long double
+ __complex_proj(const __complex__ long double& __z)
+ { return __builtin_cprojl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ proj(const std::complex<_Tp>& __z)
+ { return __complex_proj(__z.__rep()); }
+#else
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ proj(const std::complex<_Tp>& __z)
+ { return __complex_proj(__z); }
+#endif
+
+ template<typename _Tp>
+ inline std::complex<typename __gnu_cxx::__promote<_Tp>::__type>
+ proj(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return std::proj(std::complex<__type>(__x));
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#endif /* _GLIBCXX_COMPLEX */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/complex.h b/6/sources/cxx-stl/gnu-libstdc++/include/complex.h
new file mode 100644
index 0000000..7dc5926
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/complex.h
@@ -0,0 +1,42 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file complex.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <bits/c++config.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <ccomplex>
+#else
+# if _GLIBCXX_HAVE_COMPLEX_H
+# include_next <complex.h>
+# endif
+#endif
+
+#ifndef _GLIBCXX_COMPLEX_H
+#define _GLIBCXX_COMPLEX_H 1
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/condition_variable b/6/sources/cxx-stl/gnu-libstdc++/include/condition_variable
new file mode 100644
index 0000000..64f2bb7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/condition_variable
@@ -0,0 +1,225 @@
+// <condition_variable> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file condition_variable
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_CONDITION_VARIABLE
+#define _GLIBCXX_CONDITION_VARIABLE 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <chrono>
+#include <mutex> // unique_lock
+
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+
+namespace std
+{
+ /**
+ * @defgroup condition_variables Condition Variables
+ * @ingroup concurrency
+ *
+ * Classes for condition_variable support.
+ * @{
+ */
+
+ /// condition_variable
+ class condition_variable
+ {
+ typedef chrono::system_clock __clock_t;
+ typedef __gthread_cond_t __native_type;
+ __native_type _M_cond;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ condition_variable();
+ ~condition_variable();
+
+ condition_variable(const condition_variable&) = delete;
+ condition_variable& operator=(const condition_variable&) = delete;
+
+ void
+ notify_one();
+
+ void
+ notify_all();
+
+ void
+ wait(unique_lock<mutex>& __lock);
+
+ template<typename _Predicate>
+ void
+ wait(unique_lock<mutex>& __lock, _Predicate __p)
+ {
+ while (!__p())
+ wait(__lock);
+ }
+
+ template<typename _Duration>
+ bool
+ wait_until(unique_lock<mutex>& __lock,
+ const chrono::time_point<__clock_t, _Duration>& __atime)
+ { return __wait_until_impl(__lock, __atime); }
+
+ template<typename _Clock, typename _Duration>
+ bool
+ wait_until(unique_lock<mutex>& __lock,
+ const chrono::time_point<_Clock, _Duration>& __atime)
+ {
+ // DR 887 - Sync unknown clock to known clock.
+ typename _Clock::time_point __c_entry = _Clock::now();
+ __clock_t::time_point __s_entry = __clock_t::now();
+ chrono::nanoseconds __delta = __atime - __c_entry;
+ __clock_t::time_point __s_atime = __s_entry + __delta;
+
+ return __wait_until_impl(__lock, __s_atime);
+ }
+
+ template<typename _Clock, typename _Duration, typename _Predicate>
+ bool
+ wait_until(unique_lock<mutex>& __lock,
+ const chrono::time_point<_Clock, _Duration>& __atime,
+ _Predicate __p)
+ {
+ while (!__p())
+ if (!wait_until(__lock, __atime))
+ return __p();
+
+ return true;
+ }
+
+ template<typename _Rep, typename _Period>
+ bool
+ wait_for(unique_lock<mutex>& __lock,
+ const chrono::duration<_Rep, _Period>& __rtime)
+ { return wait_until(__lock, __clock_t::now() + __rtime); }
+
+ template<typename _Rep, typename _Period, typename _Predicate>
+ bool
+ wait_for(unique_lock<mutex>& __lock,
+ const chrono::duration<_Rep, _Period>& __rtime,
+ _Predicate __p)
+ { return wait_until(__lock, __clock_t::now() + __rtime, std::move(__p)); }
+
+ native_handle_type
+ native_handle()
+ { return &_M_cond; }
+
+ private:
+ template<typename _Clock, typename _Duration>
+ bool
+ __wait_until_impl(unique_lock<mutex>& __lock,
+ const chrono::time_point<_Clock, _Duration>& __atime)
+ {
+ chrono::time_point<__clock_t, chrono::seconds> __s =
+ chrono::time_point_cast<chrono::seconds>(__atime);
+
+ chrono::nanoseconds __ns =
+ chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
+
+ __gthread_time_t __ts =
+ {
+ static_cast<std::time_t>(__s.time_since_epoch().count()),
+ static_cast<long>(__ns.count())
+ };
+
+ __gthread_cond_timedwait(&_M_cond, __lock.mutex()->native_handle(),
+ &__ts);
+
+ return _Clock::now() < __atime;
+ }
+ };
+
+ /// condition_variable_any
+ // Like above, only mutex may not have try_lock.
+ class condition_variable_any
+ {
+ typedef __gthread_cond_t __native_type;
+ __native_type _M_cond;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ condition_variable_any();
+ ~condition_variable_any();
+
+ condition_variable_any(const condition_variable_any&) = delete;
+ condition_variable_any& operator=(const condition_variable_any&) = delete;
+
+ void
+ notify_one();
+
+ void
+ notify_all();
+
+ template<typename _Lock>
+ void
+ wait(_Lock& __lock);
+
+ template<typename _Lock, typename _Predicate>
+ void
+ wait(_Lock& __lock, _Predicate __p);
+
+ template<typename _Lock, typename _Clock, typename _Duration>
+ bool
+ wait_until(_Lock& __lock,
+ const chrono::time_point<_Clock, _Duration>& __atime);
+
+ template<typename _Lock, typename _Clock,
+ typename _Duration, typename _Predicate>
+ bool
+ wait_until(_Lock& __lock,
+ const chrono::time_point<_Clock, _Duration>& __atime,
+ _Predicate __p);
+
+ template<typename _Lock, typename _Rep, typename _Period>
+ bool
+ wait_for(_Lock& __lock, const chrono::duration<_Rep, _Period>& __rtime);
+
+ template<typename _Lock, typename _Rep,
+ typename _Period, typename _Predicate>
+ bool
+ wait_for(_Lock& __lock,
+ const chrono::duration<_Rep, _Period>& __rtime, _Predicate __p);
+
+ native_handle_type
+ native_handle()
+ { return &_M_cond; }
+ };
+
+ // @} group condition_variables
+}
+
+#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_CONDITION_VARIABLE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/csetjmp b/6/sources/cxx-stl/gnu-libstdc++/include/csetjmp
new file mode 100644
index 0000000..6d7ecab
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/csetjmp
@@ -0,0 +1,64 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file csetjmp
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c setjmp.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <setjmp.h>
+
+#ifndef _GLIBCXX_CSETJMP
+#define _GLIBCXX_CSETJMP 1
+
+// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
+#undef longjmp
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef setjmp
+#define setjmp(env) setjmp (env)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::jmp_buf;
+ using ::longjmp;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/csignal b/6/sources/cxx-stl/gnu-libstdc++/include/csignal
new file mode 100644
index 0000000..41af5e6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/csignal
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file csignal
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c signal.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <signal.h>
+
+#ifndef _GLIBCXX_CSIGNAL
+#define _GLIBCXX_CSIGNAL 1
+
+// Get rid of those macros defined in <signal.h> in lieu of real functions.
+#undef raise
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::sig_atomic_t;
+ using ::signal;
+ using ::raise;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdarg b/6/sources/cxx-stl/gnu-libstdc++/include/cstdarg
new file mode 100644
index 0000000..73327b1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdarg
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdarg
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdarg.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <stdarg.h>
+
+#ifndef _GLIBCXX_CSTDARG
+#define _GLIBCXX_CSTDARG 1
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef va_end
+#define va_end(ap) va_end (ap)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::va_list;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdatomic b/6/sources/cxx-stl/gnu-libstdc++/include/cstdatomic
new file mode 100644
index 0000000..7489d97
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdatomic
@@ -0,0 +1,848 @@
+// -*- C++ -*- header.
+
+// Copyright (C) 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cstdatomic
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdatomic.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+// Based on "C++ Atomic Types and Operations" by Hans Boehm and Lawrence Crowl.
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
+
+#ifndef _GLIBCXX_STDATOMIC
+#define _GLIBCXX_STDATOMIC 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#include <stdatomic.h>
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup atomics
+ * @{
+ */
+
+ /// kill_dependency
+ template<typename _Tp>
+ inline _Tp
+ kill_dependency(_Tp __y)
+ {
+ _Tp ret(__y);
+ return ret;
+ }
+
+ inline memory_order
+ __calculate_memory_order(memory_order __m)
+ {
+ const bool __cond1 = __m == memory_order_release;
+ const bool __cond2 = __m == memory_order_acq_rel;
+ memory_order __mo1(__cond1 ? memory_order_relaxed : __m);
+ memory_order __mo2(__cond2 ? memory_order_acquire : __mo1);
+ return __mo2;
+ }
+
+ //
+ // Three nested namespaces for atomic implementation details.
+ //
+ // The nested namespace inlined into std:: is determined by the value
+ // of the _GLIBCXX_ATOMIC_PROPERTY macro and the resulting
+ // ATOMIC_*_LOCK_FREE macros. See file stdatomic.h.
+ //
+ // 0 == __atomic0 == Never lock-free
+ // 1 == __atomic1 == Best available, sometimes lock-free
+ // 2 == __atomic2 == Always lock-free
+#include <bits/atomic_0.h>
+#include <bits/atomic_2.h>
+
+ /// atomic
+ /// 29.4.3, Generic atomic type, primary class template.
+ template<typename _Tp>
+ struct atomic
+ {
+ private:
+ _Tp _M_i;
+
+ public:
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(_Tp __i) : _M_i(__i) { }
+
+ operator _Tp() const volatile;
+
+ _Tp
+ operator=(_Tp __i) volatile { store(__i); return __i; }
+
+ bool
+ is_lock_free() const volatile;
+
+ void
+ store(_Tp, memory_order = memory_order_seq_cst) volatile;
+
+ _Tp
+ load(memory_order = memory_order_seq_cst) const volatile;
+
+ _Tp
+ exchange(_Tp __i, memory_order = memory_order_seq_cst) volatile;
+
+ bool
+ compare_exchange_weak(_Tp&, _Tp, memory_order, memory_order) volatile;
+
+ bool
+ compare_exchange_strong(_Tp&, _Tp, memory_order, memory_order) volatile;
+
+ bool
+ compare_exchange_weak(_Tp&, _Tp,
+ memory_order = memory_order_seq_cst) volatile;
+
+ bool
+ compare_exchange_strong(_Tp&, _Tp,
+ memory_order = memory_order_seq_cst) volatile;
+ };
+
+
+ /// Partial specialization for pointer types.
+ template<typename _Tp>
+ struct atomic<_Tp*> : atomic_address
+ {
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(_Tp* __v) : atomic_address(__v) { }
+
+ void
+ store(_Tp*, memory_order = memory_order_seq_cst) volatile;
+
+ _Tp*
+ load(memory_order = memory_order_seq_cst) const volatile;
+
+ _Tp*
+ exchange(_Tp*, memory_order = memory_order_seq_cst) volatile;
+
+ bool
+ compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order) volatile;
+
+ bool
+ compare_exchange_strong(_Tp*&, _Tp*, memory_order, memory_order) volatile;
+
+ bool
+ compare_exchange_weak(_Tp*&, _Tp*,
+ memory_order = memory_order_seq_cst) volatile;
+
+ bool
+ compare_exchange_strong(_Tp*&, _Tp*,
+ memory_order = memory_order_seq_cst) volatile;
+
+ _Tp*
+ fetch_add(ptrdiff_t, memory_order = memory_order_seq_cst) volatile;
+
+ _Tp*
+ fetch_sub(ptrdiff_t, memory_order = memory_order_seq_cst) volatile;
+
+ operator _Tp*() const volatile
+ { return load(); }
+
+ _Tp*
+ operator=(_Tp* __v) volatile
+ {
+ store(__v);
+ return __v;
+ }
+
+ _Tp*
+ operator++(int) volatile { return fetch_add(1); }
+
+ _Tp*
+ operator--(int) volatile { return fetch_sub(1); }
+
+ _Tp*
+ operator++() volatile { return fetch_add(1) + 1; }
+
+ _Tp*
+ operator--() volatile { return fetch_sub(1) - 1; }
+
+ _Tp*
+ operator+=(ptrdiff_t __d) volatile
+ { return fetch_add(__d) + __d; }
+
+ _Tp*
+ operator-=(ptrdiff_t __d) volatile
+ { return fetch_sub(__d) - __d; }
+ };
+
+
+ /// Explicit specialization for void*
+ template<>
+ struct atomic<void*> : public atomic_address
+ {
+ typedef void* __integral_type;
+ typedef atomic_address __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for bool.
+ template<>
+ struct atomic<bool> : public atomic_bool
+ {
+ typedef bool __integral_type;
+ typedef atomic_bool __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for char.
+ template<>
+ struct atomic<char> : public atomic_char
+ {
+ typedef char __integral_type;
+ typedef atomic_char __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for signed char.
+ template<>
+ struct atomic<signed char> : public atomic_schar
+ {
+ typedef signed char __integral_type;
+ typedef atomic_schar __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for unsigned char.
+ template<>
+ struct atomic<unsigned char> : public atomic_uchar
+ {
+ typedef unsigned char __integral_type;
+ typedef atomic_uchar __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for short.
+ template<>
+ struct atomic<short> : public atomic_short
+ {
+ typedef short __integral_type;
+ typedef atomic_short __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for unsigned short.
+ template<>
+ struct atomic<unsigned short> : public atomic_ushort
+ {
+ typedef unsigned short __integral_type;
+ typedef atomic_ushort __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for int.
+ template<>
+ struct atomic<int> : atomic_int
+ {
+ typedef int __integral_type;
+ typedef atomic_int __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for unsigned int.
+ template<>
+ struct atomic<unsigned int> : public atomic_uint
+ {
+ typedef unsigned int __integral_type;
+ typedef atomic_uint __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for long.
+ template<>
+ struct atomic<long> : public atomic_long
+ {
+ typedef long __integral_type;
+ typedef atomic_long __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for unsigned long.
+ template<>
+ struct atomic<unsigned long> : public atomic_ulong
+ {
+ typedef unsigned long __integral_type;
+ typedef atomic_ulong __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for long long.
+ template<>
+ struct atomic<long long> : public atomic_llong
+ {
+ typedef long long __integral_type;
+ typedef atomic_llong __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for unsigned long long.
+ template<>
+ struct atomic<unsigned long long> : public atomic_ullong
+ {
+ typedef unsigned long long __integral_type;
+ typedef atomic_ullong __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for wchar_t.
+ template<>
+ struct atomic<wchar_t> : public atomic_wchar_t
+ {
+ typedef wchar_t __integral_type;
+ typedef atomic_wchar_t __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for char16_t.
+ template<>
+ struct atomic<char16_t> : public atomic_char16_t
+ {
+ typedef char16_t __integral_type;
+ typedef atomic_char16_t __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+ /// Explicit specialization for char32_t.
+ template<>
+ struct atomic<char32_t> : public atomic_char32_t
+ {
+ typedef char32_t __integral_type;
+ typedef atomic_char32_t __base_type;
+
+ atomic() = default;
+ ~atomic() = default;
+ atomic(const atomic&) = delete;
+ atomic& operator=(const atomic&) = delete;
+
+ atomic(__integral_type __i) : __base_type(__i) { }
+
+ using __base_type::operator __integral_type;
+ using __base_type::operator=;
+ };
+
+
+ template<typename _Tp>
+ _Tp*
+ atomic<_Tp*>::load(memory_order __m) const volatile
+ { return static_cast<_Tp*>(atomic_address::load(__m)); }
+
+ template<typename _Tp>
+ _Tp*
+ atomic<_Tp*>::exchange(_Tp* __v, memory_order __m) volatile
+ { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); }
+
+ template<typename _Tp>
+ bool
+ atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1,
+ memory_order __m2) volatile
+ {
+ void** __vr = reinterpret_cast<void**>(&__r);
+ void* __vv = static_cast<void*>(__v);
+ return atomic_address::compare_exchange_weak(*__vr, __vv, __m1, __m2);
+ }
+
+ template<typename _Tp>
+ bool
+ atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
+ memory_order __m1,
+ memory_order __m2) volatile
+ {
+ void** __vr = reinterpret_cast<void**>(&__r);
+ void* __vv = static_cast<void*>(__v);
+ return atomic_address::compare_exchange_strong(*__vr, __vv, __m1, __m2);
+ }
+
+ template<typename _Tp>
+ bool
+ atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v,
+ memory_order __m) volatile
+ {
+ return compare_exchange_weak(__r, __v, __m,
+ __calculate_memory_order(__m));
+ }
+
+ template<typename _Tp>
+ bool
+ atomic<_Tp*>::compare_exchange_strong(_Tp*& __r, _Tp* __v,
+ memory_order __m) volatile
+ {
+ return compare_exchange_strong(__r, __v, __m,
+ __calculate_memory_order(__m));
+ }
+
+ template<typename _Tp>
+ _Tp*
+ atomic<_Tp*>::fetch_add(ptrdiff_t __d, memory_order __m) volatile
+ {
+ void* __p = atomic_fetch_add_explicit(this, sizeof(_Tp) * __d, __m);
+ return static_cast<_Tp*>(__p);
+ }
+
+ template<typename _Tp>
+ _Tp*
+ atomic<_Tp*>::fetch_sub(ptrdiff_t __d, memory_order __m) volatile
+ {
+ void* __p = atomic_fetch_sub_explicit(this, sizeof(_Tp) * __d, __m);
+ return static_cast<_Tp*>(__p);
+ }
+
+ // Convenience function definitions, atomic_flag.
+ inline bool
+ atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, memory_order __m)
+ { return __a->test_and_set(__m); }
+
+ inline void
+ atomic_flag_clear_explicit(volatile atomic_flag* __a, memory_order __m)
+ { return __a->clear(__m); }
+
+
+ // Convenience function definitions, atomic_address.
+ inline bool
+ atomic_is_lock_free(const volatile atomic_address* __a)
+ { return __a->is_lock_free(); }
+
+ inline void
+ atomic_store(volatile atomic_address* __a, void* __v)
+ { __a->store(__v); }
+
+ inline void
+ atomic_store_explicit(volatile atomic_address* __a, void* __v,
+ memory_order __m)
+ { __a->store(__v, __m); }
+
+ inline void*
+ atomic_load(const volatile atomic_address* __a)
+ { return __a->load(); }
+
+ inline void*
+ atomic_load_explicit(const volatile atomic_address* __a, memory_order __m)
+ { return __a->load(__m); }
+
+ inline void*
+ atomic_exchange(volatile atomic_address* __a, void* __v)
+ { return __a->exchange(__v); }
+
+ inline void*
+ atomic_exchange_explicit(volatile atomic_address* __a, void* __v,
+ memory_order __m)
+ { return __a->exchange(__v, __m); }
+
+ inline bool
+ atomic_compare_exchange_weak(volatile atomic_address* __a,
+ void** __v1, void* __v2)
+ {
+ return __a->compare_exchange_weak(*__v1, __v2, memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ inline bool
+ atomic_compare_exchange_strong(volatile atomic_address* __a,
+ void** __v1, void* __v2)
+ {
+ return __a->compare_exchange_strong(*__v1, __v2, memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ inline bool
+ atomic_compare_exchange_weak_explicit(volatile atomic_address* __a,
+ void** __v1, void* __v2,
+ memory_order __m1, memory_order __m2)
+ { return __a->compare_exchange_weak(*__v1, __v2, __m1, __m2); }
+
+ inline bool
+ atomic_compare_exchange_strong_explicit(volatile atomic_address* __a,
+ void** __v1, void* __v2,
+ memory_order __m1, memory_order __m2)
+ { return __a->compare_exchange_strong(*__v1, __v2, __m1, __m2); }
+
+ inline void*
+ atomic_fetch_add_explicit(volatile atomic_address* __a, ptrdiff_t __d,
+ memory_order __m)
+ { return __a->fetch_add(__d, __m); }
+
+ inline void*
+ atomic_fetch_add(volatile atomic_address* __a, ptrdiff_t __d)
+ { return __a->fetch_add(__d); }
+
+ inline void*
+ atomic_fetch_sub_explicit(volatile atomic_address* __a, ptrdiff_t __d,
+ memory_order __m)
+ { return __a->fetch_sub(__d, __m); }
+
+ inline void*
+ atomic_fetch_sub(volatile atomic_address* __a, ptrdiff_t __d)
+ { return __a->fetch_sub(__d); }
+
+
+ // Convenience function definitions, atomic_bool.
+ inline bool
+ atomic_is_lock_free(const volatile atomic_bool* __a)
+ { return __a->is_lock_free(); }
+
+ inline void
+ atomic_store(volatile atomic_bool* __a, bool __i)
+ { __a->store(__i); }
+
+ inline void
+ atomic_store_explicit(volatile atomic_bool* __a, bool __i, memory_order __m)
+ { __a->store(__i, __m); }
+
+ inline bool
+ atomic_load(const volatile atomic_bool* __a)
+ { return __a->load(); }
+
+ inline bool
+ atomic_load_explicit(const volatile atomic_bool* __a, memory_order __m)
+ { return __a->load(__m); }
+
+ inline bool
+ atomic_exchange(volatile atomic_bool* __a, bool __i)
+ { return __a->exchange(__i); }
+
+ inline bool
+ atomic_exchange_explicit(volatile atomic_bool* __a, bool __i,
+ memory_order __m)
+ { return __a->exchange(__i, __m); }
+
+ inline bool
+ atomic_compare_exchange_weak(volatile atomic_bool* __a, bool* __i1, bool __i2)
+ {
+ return __a->compare_exchange_weak(*__i1, __i2, memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ inline bool
+ atomic_compare_exchange_strong(volatile atomic_bool* __a,
+ bool* __i1, bool __i2)
+ {
+ return __a->compare_exchange_strong(*__i1, __i2, memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ inline bool
+ atomic_compare_exchange_weak_explicit(volatile atomic_bool* __a, bool* __i1,
+ bool __i2, memory_order __m1,
+ memory_order __m2)
+ { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
+
+ inline bool
+ atomic_compare_exchange_strong_explicit(volatile atomic_bool* __a,
+ bool* __i1, bool __i2,
+ memory_order __m1, memory_order __m2)
+ { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
+
+
+
+ // Free standing functions. Template argument should be constricted
+ // to intergral types as specified in the standard.
+ template<typename _ITp>
+ inline void
+ atomic_store_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { __a->store(__i, __m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_load_explicit(const volatile __atomic_base<_ITp>* __a,
+ memory_order __m)
+ { return __a->load(__m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_exchange_explicit(volatile __atomic_base<_ITp>* __a,
+ _ITp __i, memory_order __m)
+ { return __a->exchange(__i, __m); }
+
+ template<typename _ITp>
+ inline bool
+ atomic_compare_exchange_weak_explicit(volatile __atomic_base<_ITp>* __a,
+ _ITp* __i1, _ITp __i2,
+ memory_order __m1, memory_order __m2)
+ { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); }
+
+ template<typename _ITp>
+ inline bool
+ atomic_compare_exchange_strong_explicit(volatile __atomic_base<_ITp>* __a,
+ _ITp* __i1, _ITp __i2,
+ memory_order __m1,
+ memory_order __m2)
+ { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { return __a->fetch_add(__i, __m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { return __a->fetch_sub(__i, __m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { return __a->fetch_and(__i, __m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { return __a->fetch_or(__i, __m); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i,
+ memory_order __m)
+ { return __a->fetch_xor(__i, __m); }
+
+ template<typename _ITp>
+ inline bool
+ atomic_is_lock_free(const volatile __atomic_base<_ITp>* __a)
+ { return __a->is_lock_free(); }
+
+ template<typename _ITp>
+ inline void
+ atomic_store(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { atomic_store_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_load(const volatile __atomic_base<_ITp>* __a)
+ { return atomic_load_explicit(__a, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_exchange(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline bool
+ atomic_compare_exchange_weak(volatile __atomic_base<_ITp>* __a,
+ _ITp* __i1, _ITp __i2)
+ {
+ return atomic_compare_exchange_weak_explicit(__a, __i1, __i2,
+ memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ template<typename _ITp>
+ inline bool
+ atomic_compare_exchange_strong(volatile __atomic_base<_ITp>* __a,
+ _ITp* __i1, _ITp __i2)
+ {
+ return atomic_compare_exchange_strong_explicit(__a, __i1, __i2,
+ memory_order_seq_cst,
+ memory_order_seq_cst);
+ }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); }
+
+ template<typename _ITp>
+ inline _ITp
+ atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i)
+ { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); }
+
+ // @} group atomics
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdbool b/6/sources/cxx-stl/gnu-libstdc++/include/cstdbool
new file mode 100644
index 0000000..3012c46
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdbool
@@ -0,0 +1,44 @@
+// <cstdbool> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdbool
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CSTDBOOL
+#define _GLIBCXX_CSTDBOOL 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+# include <bits/c++config.h>
+# if _GLIBCXX_HAVE_STDBOOL_H
+# include <stdbool.h>
+# endif
+#endif
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstddef b/6/sources/cxx-stl/gnu-libstdc++/include/cstddef
new file mode 100644
index 0000000..bb16e75
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstddef
@@ -0,0 +1,56 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cstddef
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stddef.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 18.1 Types
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <stddef.h>
+
+#ifndef _GLIBCXX_CSTDDEF
+#define _GLIBCXX_CSTDDEF 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::ptrdiff_t;
+ using ::size_t;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdint b/6/sources/cxx-stl/gnu-libstdc++/include/cstdint
new file mode 100644
index 0000000..0927f8a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdint
@@ -0,0 +1,79 @@
+// <cstdint> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdint
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_CSTDINT
+#define _GLIBCXX_CSTDINT 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <bits/c++config.h>
+
+// For 8.22.1/1 (see C99, Notes 219, 220, 222)
+#if _GLIBCXX_HAVE_STDINT_H
+# ifndef __STDC_LIMIT_MACROS
+# define _UNDEF__STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+# endif
+# ifndef __STDC_CONSTANT_MACROS
+# define _UNDEF__STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+# endif
+# include <stdint.h>
+# ifdef _UNDEF__STDC_LIMIT_MACROS
+# undef __STDC_LIMIT_MACROS
+# undef _UNDEF__STDC_LIMIT_MACROS
+# endif
+# ifdef _UNDEF__STDC_CONSTANT_MACROS
+# undef __STDC_CONSTANT_MACROS
+# undef _UNDEF__STDC_CONSTANT_MACROS
+# endif
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cstdint>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cstdint>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // _GLIBCXX_CSTDINT
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdio b/6/sources/cxx-stl/gnu-libstdc++/include/cstdio
new file mode 100644
index 0000000..b4826e2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdio
@@ -0,0 +1,205 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdio
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdio.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 27.8.2 C Library files
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <stdio.h>
+
+#ifndef _GLIBCXX_CSTDIO
+#define _GLIBCXX_CSTDIO 1
+
+// Get rid of those macros defined in <stdio.h> in lieu of real functions.
+#undef clearerr
+#undef fclose
+#undef feof
+#undef ferror
+#undef fflush
+#undef fgetc
+#undef fgetpos
+#undef fgets
+#undef fopen
+#undef fprintf
+#undef fputc
+#undef fputs
+#undef fread
+#undef freopen
+#undef fscanf
+#undef fseek
+#undef fsetpos
+#undef ftell
+#undef fwrite
+#undef getc
+#undef getchar
+#undef gets
+#undef perror
+#undef printf
+#undef putc
+#undef putchar
+#undef puts
+#undef remove
+#undef rename
+#undef rewind
+#undef scanf
+#undef setbuf
+#undef setvbuf
+#undef sprintf
+#undef sscanf
+#undef tmpfile
+#undef tmpnam
+#undef ungetc
+#undef vfprintf
+#undef vprintf
+#undef vsprintf
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::FILE;
+ using ::fpos_t;
+
+ using ::clearerr;
+ using ::fclose;
+ using ::feof;
+ using ::ferror;
+ using ::fflush;
+ using ::fgetc;
+ using ::fgetpos;
+ using ::fgets;
+ using ::fopen;
+ using ::fprintf;
+ using ::fputc;
+ using ::fputs;
+ using ::fread;
+ using ::freopen;
+ using ::fscanf;
+ using ::fseek;
+ using ::fsetpos;
+ using ::ftell;
+ using ::fwrite;
+ using ::getc;
+ using ::getchar;
+ using ::gets;
+ using ::perror;
+ using ::printf;
+ using ::putc;
+ using ::putchar;
+ using ::puts;
+ using ::remove;
+ using ::rename;
+ using ::rewind;
+ using ::scanf;
+ using ::setbuf;
+ using ::setvbuf;
+ using ::sprintf;
+ using ::sscanf;
+ using ::tmpfile;
+ using ::tmpnam;
+ using ::ungetc;
+ using ::vfprintf;
+ using ::vprintf;
+ using ::vsprintf;
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef snprintf
+#undef vfscanf
+#undef vscanf
+#undef vsnprintf
+#undef vsscanf
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" int
+ (snprintf)(char * restrict, size_t, const char * restrict, ...);
+ extern "C" int
+ (vfscanf)(FILE * restrict, const char * restrict, __gnuc_va_list);
+ extern "C" int (vscanf)(const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsnprintf)(char * restrict, size_t, const char * restrict, __gnuc_va_list);
+ extern "C" int
+ (vsscanf)(const char * restrict, const char * restrict, __gnuc_va_list);
+#endif
+
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::snprintf;
+ using ::vfscanf;
+ using ::vscanf;
+ using ::vsnprintf;
+ using ::vsscanf;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::__gnu_cxx::snprintf;
+ using ::__gnu_cxx::vfscanf;
+ using ::__gnu_cxx::vscanf;
+ using ::__gnu_cxx::vsnprintf;
+ using ::__gnu_cxx::vsscanf;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _GLIBCXX_USE_C99
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cstdio>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cstdio>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstdlib b/6/sources/cxx-stl/gnu-libstdc++/include/cstdlib
new file mode 100644
index 0000000..a29031e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstdlib
@@ -0,0 +1,242 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cstdlib
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c stdlib.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+
+#ifndef _GLIBCXX_CSTDLIB
+#define _GLIBCXX_CSTDLIB 1
+
+#if !_GLIBCXX_HOSTED
+// The C standard does not require a freestanding implementation to
+// provide <stdlib.h>. However, the C++ standard does still require
+// <cstdlib> -- but only the functionality mentioned in
+// [lib.support.start.term].
+
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ extern "C" void abort(void);
+ extern "C" int atexit(void (*)());
+ extern "C" void exit(int);
+
+_GLIBCXX_END_NAMESPACE
+
+#else
+
+#include <stdlib.h>
+
+// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
+#undef abort
+#undef abs
+#undef atexit
+#undef atof
+#undef atoi
+#undef atol
+#undef bsearch
+#undef calloc
+#undef div
+#undef exit
+#undef free
+#undef getenv
+#undef labs
+#undef ldiv
+#undef malloc
+#undef mblen
+#undef mbstowcs
+#undef mbtowc
+#undef qsort
+#undef rand
+#undef realloc
+#undef srand
+#undef strtod
+#undef strtol
+#undef strtoul
+#undef system
+#undef wcstombs
+#undef wctomb
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::div_t;
+ using ::ldiv_t;
+
+ using ::abort;
+ using ::abs;
+ using ::atexit;
+ using ::atof;
+ using ::atoi;
+ using ::atol;
+ using ::bsearch;
+ using ::calloc;
+ using ::div;
+ using ::exit;
+ using ::free;
+ using ::getenv;
+ using ::labs;
+ using ::ldiv;
+ using ::malloc;
+#ifdef _GLIBCXX_HAVE_MBSTATE_T
+ using ::mblen;
+ using ::mbstowcs;
+ using ::mbtowc;
+#endif // _GLIBCXX_HAVE_MBSTATE_T
+ using ::qsort;
+ using ::rand;
+ using ::realloc;
+ using ::srand;
+ using ::strtod;
+ using ::strtol;
+ using ::strtoul;
+ using ::system;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ using ::wcstombs;
+ using ::wctomb;
+#endif // _GLIBCXX_USE_WCHAR_T
+
+ inline long
+ abs(long __i) { return labs(__i); }
+
+ inline ldiv_t
+ div(long __i, long __j) { return ldiv(__i, __j); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef _Exit
+#undef llabs
+#undef lldiv
+#undef atoll
+#undef strtoll
+#undef strtoull
+#undef strtof
+#undef strtold
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::lldiv_t;
+#endif
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" void (_Exit)(int);
+#endif
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::_Exit;
+#endif
+
+ inline long long
+ abs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::llabs;
+
+ inline lldiv_t
+ div(long long __n, long long __d)
+ { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+ using ::lldiv;
+#endif
+
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int (atoll)(const char *);
+ extern "C" long long int
+ (strtoll)(const char * restrict, char ** restrict, int);
+ extern "C" unsigned long long int
+ (strtoull)(const char * restrict, char ** restrict, int);
+#endif
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::atoll;
+ using ::strtoll;
+ using ::strtoull;
+#endif
+ using ::strtof;
+ using ::strtold;
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::__gnu_cxx::lldiv_t;
+#endif
+ using ::__gnu_cxx::_Exit;
+ using ::__gnu_cxx::abs;
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::__gnu_cxx::llabs;
+ using ::__gnu_cxx::div;
+ using ::__gnu_cxx::lldiv;
+#endif
+ using ::__gnu_cxx::atoll;
+ using ::__gnu_cxx::strtof;
+ using ::__gnu_cxx::strtoll;
+ using ::__gnu_cxx::strtoull;
+ using ::__gnu_cxx::strtold;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _GLIBCXX_USE_C99
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cstdlib>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cstdlib>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif // !_GLIBCXX_HOSTED
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cstring b/6/sources/cxx-stl/gnu-libstdc++/include/cstring
new file mode 100644
index 0000000..de0ce24
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cstring
@@ -0,0 +1,123 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cstring
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c string.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <string.h>
+
+#ifndef _GLIBCXX_CSTRING
+#define _GLIBCXX_CSTRING 1
+
+// Get rid of those macros defined in <string.h> in lieu of real functions.
+#undef memchr
+#undef memcmp
+#undef memcpy
+#undef memmove
+#undef memset
+#undef strcat
+#undef strchr
+#undef strcmp
+#undef strcoll
+#undef strcpy
+#undef strcspn
+#undef strerror
+#undef strlen
+#undef strncat
+#undef strncmp
+#undef strncpy
+#undef strpbrk
+#undef strrchr
+#undef strspn
+#undef strstr
+#undef strtok
+#undef strxfrm
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::memchr;
+ using ::memcmp;
+ using ::memcpy;
+ using ::memmove;
+ using ::memset;
+ using ::strcat;
+ using ::strcmp;
+ using ::strcoll;
+ using ::strcpy;
+ using ::strcspn;
+ using ::strerror;
+ using ::strlen;
+ using ::strncat;
+ using ::strncmp;
+ using ::strncpy;
+ using ::strspn;
+ using ::strtok;
+ using ::strxfrm;
+ using ::strchr;
+ using ::strpbrk;
+ using ::strrchr;
+ using ::strstr;
+
+#ifndef __CORRECT_ISO_CPP_STRING_H_PROTO
+ inline void*
+ memchr(void* __p, int __c, size_t __n)
+ { return memchr(const_cast<const void*>(__p), __c, __n); }
+
+ inline char*
+ strchr(char* __s1, int __n)
+ { return __builtin_strchr(const_cast<const char*>(__s1), __n); }
+
+ inline char*
+ strpbrk(char* __s1, const char* __s2)
+ { return __builtin_strpbrk(const_cast<const char*>(__s1), __s2); }
+
+ inline char*
+ strrchr(char* __s1, int __n)
+ { return __builtin_strrchr(const_cast<const char*>(__s1), __n); }
+
+ inline char*
+ strstr(char* __s1, const char* __s2)
+ { return __builtin_strstr(const_cast<const char*>(__s1), __s2); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ctgmath b/6/sources/cxx-stl/gnu-libstdc++/include/ctgmath
new file mode 100644
index 0000000..3c6fcf7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ctgmath
@@ -0,0 +1,41 @@
+// <ctgmath> -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/ctgmath
+ * This is a Standard C++ Library header.
+ */
+
+#pragma GCC system_header
+
+#ifndef _GLIBCXX_CTGMATH
+#define _GLIBCXX_CTGMATH 1
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+# include <cmath>
+#endif
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ctime b/6/sources/cxx-stl/gnu-libstdc++/include/ctime
new file mode 100644
index 0000000..e236cf4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ctime
@@ -0,0 +1,78 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/ctime
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c time.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 20.5 Date and time
+//
+
+#pragma GCC system_header
+
+#include <cstddef>
+#include <time.h>
+
+#ifndef _GLIBCXX_CTIME
+#define _GLIBCXX_CTIME 1
+
+// Get rid of those macros defined in <time.h> in lieu of real functions.
+#undef clock
+#undef difftime
+#undef mktime
+#undef time
+#undef asctime
+#undef ctime
+#undef gmtime
+#undef localtime
+#undef strftime
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::clock_t;
+ using ::time_t;
+ using ::tm;
+
+ using ::clock;
+ using ::difftime;
+ using ::mktime;
+ using ::time;
+ using ::asctime;
+ using ::ctime;
+ using ::gmtime;
+ using ::localtime;
+ using ::strftime;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cwchar b/6/sources/cxx-stl/gnu-libstdc++/include/cwchar
new file mode 100644
index 0000000..e5ea07e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cwchar
@@ -0,0 +1,291 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cwchar
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c wchar.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: 21.4
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+
+#if _GLIBCXX_HAVE_WCHAR_H
+#include <wchar.h>
+#endif
+
+#ifndef _GLIBCXX_CWCHAR
+#define _GLIBCXX_CWCHAR 1
+
+// Need to do a bit of trickery here with mbstate_t as char_traits
+// assumes it is in wchar.h, regardless of wchar_t specializations.
+#ifndef _GLIBCXX_HAVE_MBSTATE_T
+extern "C"
+{
+ typedef struct
+ {
+ int __fill[6];
+ } mbstate_t;
+}
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::mbstate_t;
+
+_GLIBCXX_END_NAMESPACE
+
+// Get rid of those macros defined in <wchar.h> in lieu of real functions.
+#undef btowc
+#undef fgetwc
+#undef fgetws
+#undef fputwc
+#undef fputws
+#undef fwide
+#undef fwprintf
+#undef fwscanf
+#undef getwc
+#undef getwchar
+#undef mbrlen
+#undef mbrtowc
+#undef mbsinit
+#undef mbsrtowcs
+#undef putwc
+#undef putwchar
+#undef swprintf
+#undef swscanf
+#undef ungetwc
+#undef vfwprintf
+#if _GLIBCXX_HAVE_VFWSCANF
+# undef vfwscanf
+#endif
+#undef vswprintf
+#if _GLIBCXX_HAVE_VSWSCANF
+# undef vswscanf
+#endif
+#undef vwprintf
+#if _GLIBCXX_HAVE_VWSCANF
+# undef vwscanf
+#endif
+#undef wcrtomb
+#undef wcscat
+#undef wcschr
+#undef wcscmp
+#undef wcscoll
+#undef wcscpy
+#undef wcscspn
+#undef wcsftime
+#undef wcslen
+#undef wcsncat
+#undef wcsncmp
+#undef wcsncpy
+#undef wcspbrk
+#undef wcsrchr
+#undef wcsrtombs
+#undef wcsspn
+#undef wcsstr
+#undef wcstod
+#if _GLIBCXX_HAVE_WCSTOF
+# undef wcstof
+#endif
+#undef wcstok
+#undef wcstol
+#undef wcstoul
+#undef wcsxfrm
+#undef wctob
+#undef wmemchr
+#undef wmemcmp
+#undef wmemcpy
+#undef wmemmove
+#undef wmemset
+#undef wprintf
+#undef wscanf
+
+#if _GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::wint_t;
+
+ using ::btowc;
+ using ::fgetwc;
+ using ::fgetws;
+ using ::fputwc;
+ using ::fputws;
+ using ::fwide;
+ using ::fwprintf;
+ using ::fwscanf;
+ using ::getwc;
+ using ::getwchar;
+ using ::mbrlen;
+ using ::mbrtowc;
+ using ::mbsinit;
+ using ::mbsrtowcs;
+ using ::putwc;
+ using ::putwchar;
+ using ::swprintf;
+ using ::swscanf;
+ using ::ungetwc;
+ using ::vfwprintf;
+#if _GLIBCXX_HAVE_VFWSCANF
+ using ::vfwscanf;
+#endif
+ using ::vswprintf;
+#if _GLIBCXX_HAVE_VSWSCANF
+ using ::vswscanf;
+#endif
+ using ::vwprintf;
+#if _GLIBCXX_HAVE_VWSCANF
+ using ::vwscanf;
+#endif
+ using ::wcrtomb;
+ using ::wcscat;
+ using ::wcscmp;
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
+ using ::wcsftime;
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
+ using ::wcsncpy;
+ using ::wcsrtombs;
+ using ::wcsspn;
+ using ::wcstod;
+#if _GLIBCXX_HAVE_WCSTOF
+ using ::wcstof;
+#endif
+ using ::wcstok;
+ using ::wcstol;
+ using ::wcstoul;
+ using ::wcsxfrm;
+ using ::wctob;
+ using ::wmemcmp;
+ using ::wmemcpy;
+ using ::wmemmove;
+ using ::wmemset;
+ using ::wprintf;
+ using ::wscanf;
+ using ::wcschr;
+ using ::wcspbrk;
+ using ::wcsrchr;
+ using ::wcsstr;
+ using ::wmemchr;
+
+#ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO
+ inline wchar_t*
+ wcschr(wchar_t* __p, wchar_t __c)
+ { return wcschr(const_cast<const wchar_t*>(__p), __c); }
+
+ inline wchar_t*
+ wcspbrk(wchar_t* __s1, const wchar_t* __s2)
+ { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); }
+
+ inline wchar_t*
+ wcsrchr(wchar_t* __p, wchar_t __c)
+ { return wcsrchr(const_cast<const wchar_t*>(__p), __c); }
+
+ inline wchar_t*
+ wcsstr(wchar_t* __s1, const wchar_t* __s2)
+ { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); }
+
+ inline wchar_t*
+ wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
+ { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#if _GLIBCXX_USE_C99
+
+#undef wcstold
+#undef wcstoll
+#undef wcstoull
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
+ extern "C" long double
+ (wcstold)(const wchar_t * restrict, wchar_t ** restrict);
+#endif
+#if !_GLIBCXX_USE_C99_DYNAMIC
+ using ::wcstold;
+#endif
+#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ extern "C" long long int
+ (wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
+ extern "C" unsigned long long int
+ (wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
+#endif
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using ::wcstoll;
+ using ::wcstoull;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::__gnu_cxx::wcstold;
+ using ::__gnu_cxx::wcstoll;
+ using ::__gnu_cxx::wcstoull;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#endif //_GLIBCXX_USE_WCHAR_T
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cwchar>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cwchar>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cwctype b/6/sources/cxx-stl/gnu-libstdc++/include/cwctype
new file mode 100644
index 0000000..4e94fec
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cwctype
@@ -0,0 +1,126 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/cwctype
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c wctype.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std (except for names which are defined
+ * as macros in C).
+ */
+
+//
+// ISO C++ 14882: <cwctype>
+//
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+#if _GLIBCXX_HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+#ifndef _GLIBCXX_CWCTYPE
+#define _GLIBCXX_CWCTYPE 1
+
+// Get rid of those macros defined in <wctype.h> in lieu of real functions.
+#undef iswalnum
+#undef iswalpha
+#if _GLIBCXX_HAVE_ISWBLANK
+# undef iswblank
+#endif
+#undef iswcntrl
+#undef iswctype
+#undef iswdigit
+#undef iswgraph
+#undef iswlower
+#undef iswprint
+#undef iswpunct
+#undef iswspace
+#undef iswupper
+#undef iswxdigit
+#undef towctrans
+#undef towlower
+#undef towupper
+#undef wctrans
+#undef wctype
+
+#if _GLIBCXX_USE_WCHAR_T
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using ::wctrans_t;
+ using ::wctype_t;
+ using ::wint_t;
+
+ using ::iswalnum;
+ using ::iswalpha;
+#if _GLIBCXX_HAVE_ISWBLANK
+ using ::iswblank;
+#endif
+ using ::iswcntrl;
+ using ::iswctype;
+ using ::iswdigit;
+ using ::iswgraph;
+ using ::iswlower;
+ using ::iswprint;
+ using ::iswpunct;
+ using ::iswspace;
+ using ::iswupper;
+ using ::iswxdigit;
+ using ::towctrans;
+ using ::towlower;
+ using ::towupper;
+ using ::wctrans;
+ using ::wctype;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif //_GLIBCXX_USE_WCHAR_T
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cwctype>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cwctype>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi-forced.h b/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi-forced.h
new file mode 100644
index 0000000..e0cf1d0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi-forced.h
@@ -0,0 +1,51 @@
+// cxxabi.h subset for inclusion by other library headers -*- C++ -*-
+
+// Copyright (C) 2007, 2009 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef _CXXABI_FORCED_H
+#define _CXXABI_FORCED_H 1
+
+#pragma GCC visibility push(default)
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ /**
+ * @brief Thrown as part of forced unwinding.
+ * @ingroup exceptions
+ *
+ * A magic placeholder class that can be caught by reference to
+ * recognize forced unwinding.
+ */
+ class __forced_unwind
+ {
+ virtual ~__forced_unwind() throw();
+ virtual void __pure_dummy() = 0; // prevent catch by value
+ };
+}
+#endif // __cplusplus
+
+#pragma GCC visibility pop
+
+#endif // __CXXABI_FORCED_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi.h b/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi.h
new file mode 100644
index 0000000..bfdd8e5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/cxxabi.h
@@ -0,0 +1,608 @@
+// new abi support -*- C++ -*-
+
+// Copyright (C) 2000, 2002, 2003, 2004, 2006, 2007, 2009
+// 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Written by Nathan Sidwell, Codesourcery LLC, <nathan@codesourcery.com>
+
+/* This file declares the new abi entry points into the runtime. It is not
+ normally necessary for user programs to include this header, or use the
+ entry points directly. However, this header is available should that be
+ needed.
+
+ Some of the entry points are intended for both C and C++, thus this header
+ is includable from both C and C++. Though the C++ specific parts are not
+ available in C, naturally enough. */
+
+/** @file cxxabi.h
+ * The header provides an interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_H
+#define _CXXABI_H 1
+
+#pragma GCC visibility push(default)
+
+#include <stddef.h>
+#include <bits/cxxabi_tweaks.h>
+#include <cxxabi-forced.h>
+
+#ifdef __cplusplus
+#define _GLIBCXX_NOTHROW throw()
+#else
+#define _GLIBCXX_NOTHROW __attribute__((nothrow))
+#endif
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ extern "C"
+ {
+#endif
+
+ typedef __cxa_cdtor_return_type (*__cxa_cdtor_type)(void *);
+
+ // Allocate array.
+ void*
+ __cxa_vec_new(size_t __element_count, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type constructor,
+ __cxa_cdtor_type destructor);
+
+ void*
+ __cxa_vec_new2(size_t __element_count, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type constructor,
+ __cxa_cdtor_type destructor, void *(*__alloc) (size_t),
+ void (*__dealloc) (void*));
+
+ void*
+ __cxa_vec_new3(size_t __element_count, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type constructor,
+ __cxa_cdtor_type destructor, void *(*__alloc) (size_t),
+ void (*__dealloc) (void*, size_t));
+
+ // Construct array.
+ __cxa_vec_ctor_return_type
+ __cxa_vec_ctor(void* __array_address, size_t __element_count,
+ size_t __element_size, __cxa_cdtor_type constructor,
+ __cxa_cdtor_type destructor);
+
+ __cxa_vec_ctor_return_type
+ __cxa_vec_cctor(void* dest_array, void* src_array, size_t element_count,
+ size_t element_size,
+ __cxa_cdtor_return_type (*constructor) (void*, void*),
+ __cxa_cdtor_type destructor);
+
+ // Destruct array.
+ void
+ __cxa_vec_dtor(void* __array_address, size_t __element_count,
+ size_t __element_size, __cxa_cdtor_type destructor);
+
+ void
+ __cxa_vec_cleanup(void* __array_address, size_t __element_count,
+ size_t __element_size, __cxa_cdtor_type destructor);
+
+ // Destruct and release array.
+ void
+ __cxa_vec_delete(void* __array_address, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type destructor);
+
+ void
+ __cxa_vec_delete2(void* __array_address, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type destructor,
+ void (*__dealloc) (void*));
+
+ void
+ __cxa_vec_delete3(void* __array_address, size_t __element_size,
+ size_t __padding_size, __cxa_cdtor_type destructor,
+ void (*__dealloc) (void*, size_t));
+
+ int
+ __cxa_guard_acquire(__guard*);
+
+ void
+ __cxa_guard_release(__guard*);
+
+ void
+ __cxa_guard_abort(__guard*);
+
+ // Pure virtual functions.
+ void
+ __cxa_pure_virtual(void);
+
+ // Exception handling.
+ void
+ __cxa_bad_cast();
+
+ void
+ __cxa_bad_typeid();
+
+ // DSO destruction.
+ int
+ __cxa_atexit(void (*)(void*), void*, void*) _GLIBCXX_NOTHROW;
+
+ int
+ __cxa_finalize(void*);
+
+
+ /**
+ * @brief Demangling routine.
+ * ABI-mandated entry point in the C++ runtime library for demangling.
+ *
+ * @param __mangled_name A NUL-terminated character string
+ * containing the name to be demangled.
+ *
+ * @param __output_buffer A region of memory, allocated with
+ * malloc, of @a *__length bytes, into which the demangled name is
+ * stored. If @a __output_buffer is not long enough, it is
+ * expanded using realloc. @a __output_buffer may instead be NULL;
+ * in that case, the demangled name is placed in a region of memory
+ * allocated with malloc.
+ *
+ * @param __length If @a __length is non-NULL, the length of the
+ * buffer containing the demangled name is placed in @a *__length.
+ *
+ * @param __status @a *__status is set to one of the following values:
+ * 0: The demangling operation succeeded.
+ * -1: A memory allocation failiure occurred.
+ * -2: @a mangled_name is not a valid name under the C++ ABI mangling rules.
+ * -3: One of the arguments is invalid.
+ *
+ * @return A pointer to the start of the NUL-terminated demangled
+ * name, or NULL if the demangling fails. The caller is
+ * responsible for deallocating this memory using @c free.
+ *
+ * The demangling is performed using the C++ ABI mangling rules,
+ * with GNU extensions. For example, this function is used in
+ * __gnu_cxx::__verbose_terminate_handler.
+ *
+ * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch39.html
+ * for other examples of use.
+ *
+ * @note The same demangling functionality is available via
+ * libiberty (@c <libiberty/demangle.h> and @c libiberty.a) in GCC
+ * 3.1 and later, but that requires explicit installation (@c
+ * --enable-install-libiberty) and uses a different API, although
+ * the ABI is unchanged.
+ */
+ char*
+ __cxa_demangle(const char* __mangled_name, char* __output_buffer,
+ size_t* __length, int* __status);
+#ifdef __cplusplus
+ }
+} // namespace __cxxabiv1
+#endif
+
+#ifdef __cplusplus
+
+#include <typeinfo>
+
+namespace __cxxabiv1
+{
+ // Type information for int, float etc.
+ class __fundamental_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __fundamental_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__fundamental_type_info();
+ };
+
+ // Type information for array objects.
+ class __array_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __array_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__array_type_info();
+ };
+
+ // Type information for functions (both member and non-member).
+ class __function_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __function_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__function_type_info();
+
+ protected:
+ // Implementation defined member function.
+ virtual bool
+ __is_function_p() const;
+ };
+
+ // Type information for enumerations.
+ class __enum_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __enum_type_info(const char* __n) : std::type_info(__n) { }
+
+ virtual
+ ~__enum_type_info();
+ };
+
+ // Common type information for simple pointers and pointers to member.
+ class __pbase_type_info : public std::type_info
+ {
+ public:
+ unsigned int __flags; // Qualification of the target object.
+ const std::type_info* __pointee; // Type of pointed to object.
+
+ explicit
+ __pbase_type_info(const char* __n, int __quals,
+ const std::type_info* __type)
+ : std::type_info(__n), __flags(__quals), __pointee(__type)
+ { }
+
+ virtual
+ ~__pbase_type_info();
+
+ // Implementation defined type.
+ enum __masks
+ {
+ __const_mask = 0x1,
+ __volatile_mask = 0x2,
+ __restrict_mask = 0x4,
+ __incomplete_mask = 0x8,
+ __incomplete_class_mask = 0x10
+ };
+
+ protected:
+ __pbase_type_info(const __pbase_type_info&);
+
+ __pbase_type_info&
+ operator=(const __pbase_type_info&);
+
+ // Implementation defined member functions.
+ virtual bool
+ __do_catch(const std::type_info* __thr_type, void** __thr_obj,
+ unsigned int __outer) const;
+
+ inline virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+ };
+
+ // Type information for simple pointers.
+ class __pointer_type_info : public __pbase_type_info
+ {
+ public:
+ explicit
+ __pointer_type_info(const char* __n, int __quals,
+ const std::type_info* __type)
+ : __pbase_type_info (__n, __quals, __type) { }
+
+
+ virtual
+ ~__pointer_type_info();
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __is_pointer_p() const;
+
+ virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+ };
+
+ class __class_type_info;
+
+ // Type information for a pointer to member variable.
+ class __pointer_to_member_type_info : public __pbase_type_info
+ {
+ public:
+ __class_type_info* __context; // Class of the member.
+
+ explicit
+ __pointer_to_member_type_info(const char* __n, int __quals,
+ const std::type_info* __type,
+ __class_type_info* __klass)
+ : __pbase_type_info(__n, __quals, __type), __context(__klass) { }
+
+ virtual
+ ~__pointer_to_member_type_info();
+
+ protected:
+ __pointer_to_member_type_info(const __pointer_to_member_type_info&);
+
+ __pointer_to_member_type_info&
+ operator=(const __pointer_to_member_type_info&);
+
+ // Implementation defined member function.
+ virtual bool
+ __pointer_catch(const __pbase_type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+ };
+
+ // Helper class for __vmi_class_type.
+ class __base_class_type_info
+ {
+ public:
+ const __class_type_info* __base_type; // Base class type.
+ long __offset_flags; // Offset and info.
+
+ enum __offset_flags_masks
+ {
+ __virtual_mask = 0x1,
+ __public_mask = 0x2,
+ __hwm_bit = 2,
+ __offset_shift = 8 // Bits to shift offset.
+ };
+
+ // Implementation defined member functions.
+ bool
+ __is_virtual_p() const
+ { return __offset_flags & __virtual_mask; }
+
+ bool
+ __is_public_p() const
+ { return __offset_flags & __public_mask; }
+
+ ptrdiff_t
+ __offset() const
+ {
+ // This shift, being of a signed type, is implementation
+ // defined. GCC implements such shifts as arithmetic, which is
+ // what we want.
+ return static_cast<ptrdiff_t>(__offset_flags) >> __offset_shift;
+ }
+ };
+
+ // Type information for a class.
+ class __class_type_info : public std::type_info
+ {
+ public:
+ explicit
+ __class_type_info (const char *__n) : type_info(__n) { }
+
+ virtual
+ ~__class_type_info ();
+
+ // Implementation defined types.
+ // The type sub_kind tells us about how a base object is contained
+ // within a derived object. We often do this lazily, hence the
+ // UNKNOWN value. At other times we may use NOT_CONTAINED to mean
+ // not publicly contained.
+ enum __sub_kind
+ {
+ // We have no idea.
+ __unknown = 0,
+
+ // Not contained within us (in some circumstances this might
+ // mean not contained publicly)
+ __not_contained,
+
+ // Contained ambiguously.
+ __contained_ambig,
+
+ // Via a virtual path.
+ __contained_virtual_mask = __base_class_type_info::__virtual_mask,
+
+ // Via a public path.
+ __contained_public_mask = __base_class_type_info::__public_mask,
+
+ // Contained within us.
+ __contained_mask = 1 << __base_class_type_info::__hwm_bit,
+
+ __contained_private = __contained_mask,
+ __contained_public = __contained_mask | __contained_public_mask
+ };
+
+ struct __upcast_result;
+ struct __dyncast_result;
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __do_upcast(const __class_type_info* __dst_type, void**__obj_ptr) const;
+
+ virtual bool
+ __do_catch(const type_info* __thr_type, void** __thr_obj,
+ unsigned __outer) const;
+
+ public:
+ // Helper for upcast. See if DST is us, or one of our bases.
+ // Return false if not found, true if found.
+ virtual bool
+ __do_upcast(const __class_type_info* __dst, const void* __obj,
+ __upcast_result& __restrict __result) const;
+
+ // Indicate whether SRC_PTR of type SRC_TYPE is contained publicly
+ // within OBJ_PTR. OBJ_PTR points to a base object of our type,
+ // which is the destination type. SRC2DST indicates how SRC
+ // objects might be contained within this type. If SRC_PTR is one
+ // of our SRC_TYPE bases, indicate the virtuality. Returns
+ // not_contained for non containment or private containment.
+ inline __sub_kind
+ __find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+
+ // Helper for dynamic cast. ACCESS_PATH gives the access from the
+ // most derived object to this base. DST_TYPE indicates the
+ // desired type we want. OBJ_PTR points to a base of our type
+ // within the complete object. SRC_TYPE indicates the static type
+ // started from and SRC_PTR points to that base within the most
+ // derived object. Fill in RESULT with what we find. Return true
+ // if we have located an ambiguous match.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
+
+ // Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE
+ // bases are inherited by the type started from -- which is not
+ // necessarily the current type. The current type will be a base
+ // of the destination type. OBJ_PTR points to the current base.
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+ };
+
+ // Type information for a class with a single non-virtual base.
+ class __si_class_type_info : public __class_type_info
+ {
+ public:
+ const __class_type_info* __base_type;
+
+ explicit
+ __si_class_type_info(const char *__n, const __class_type_info *__base)
+ : __class_type_info(__n), __base_type(__base) { }
+
+ virtual
+ ~__si_class_type_info();
+
+ protected:
+ __si_class_type_info(const __si_class_type_info&);
+
+ __si_class_type_info&
+ operator=(const __si_class_type_info&);
+
+ // Implementation defined member functions.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
+
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __sub_ptr) const;
+
+ virtual bool
+ __do_upcast(const __class_type_info*__dst, const void*__obj,
+ __upcast_result& __restrict __result) const;
+ };
+
+ // Type information for a class with multiple and/or virtual bases.
+ class __vmi_class_type_info : public __class_type_info
+ {
+ public:
+ unsigned int __flags; // Details about the class hierarchy.
+ unsigned int __base_count; // Number of direct bases.
+
+ // The array of bases uses the trailing array struct hack so this
+ // class is not constructable with a normal constructor. It is
+ // internally generated by the compiler.
+ __base_class_type_info __base_info[1]; // Array of bases.
+
+ explicit
+ __vmi_class_type_info(const char* __n, int ___flags)
+ : __class_type_info(__n), __flags(___flags), __base_count(0) { }
+
+ virtual
+ ~__vmi_class_type_info();
+
+ // Implementation defined types.
+ enum __flags_masks
+ {
+ __non_diamond_repeat_mask = 0x1, // Distinct instance of repeated base.
+ __diamond_shaped_mask = 0x2, // Diamond shaped multiple inheritance.
+ __flags_unknown_mask = 0x10
+ };
+
+ protected:
+ // Implementation defined member functions.
+ virtual bool
+ __do_dyncast(ptrdiff_t __src2dst, __sub_kind __access_path,
+ const __class_type_info* __dst_type, const void* __obj_ptr,
+ const __class_type_info* __src_type, const void* __src_ptr,
+ __dyncast_result& __result) const;
+
+ virtual __sub_kind
+ __do_find_public_src(ptrdiff_t __src2dst, const void* __obj_ptr,
+ const __class_type_info* __src_type,
+ const void* __src_ptr) const;
+
+ virtual bool
+ __do_upcast(const __class_type_info* __dst, const void* __obj,
+ __upcast_result& __restrict __result) const;
+ };
+
+ // Dynamic cast runtime.
+ // src2dst has the following possible values
+ // >-1: src_type is a unique public non-virtual base of dst_type
+ // dst_ptr + src2dst == src_ptr
+ // -1: unspecified relationship
+ // -2: src_type is not a public base of dst_type
+ // -3: src_type is a multiple public non-virtual base of dst_type
+ extern "C" void*
+ __dynamic_cast(const void* __src_ptr, // Starting object.
+ const __class_type_info* __src_type, // Static type of object.
+ const __class_type_info* __dst_type, // Desired target type.
+ ptrdiff_t __src2dst); // How src and dst are related.
+
+
+ // Returns the type_info for the currently handled exception [15.3/8], or
+ // null if there is none.
+ extern "C" std::type_info*
+ __cxa_current_exception_type();
+
+ // A magic placeholder class that can be caught by reference
+ // to recognize foreign exceptions.
+ class __foreign_exception
+ {
+ virtual ~__foreign_exception() throw();
+ virtual void __pure_dummy() = 0; // prevent catch by value
+ };
+
+} // namespace __cxxabiv1
+
+/** @namespace abi
+ * @brief The cross-vendor C++ Application Binary Interface. A
+ * namespace alias to __cxxabiv1, but user programs should use the
+ * alias `abi'.
+ *
+ * A brief overview of an ABI is given in the libstdc++ FAQ, question
+ * 5.8 (you may have a copy of the FAQ locally, or you can view the online
+ * version at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_8).
+ *
+ * GCC subscribes to a cross-vendor ABI for C++, sometimes
+ * called the IA64 ABI because it happens to be the native ABI for that
+ * platform. It is summarized at http://www.codesourcery.com/cxx-abi/
+ * along with the current specification.
+ *
+ * For users of GCC greater than or equal to 3.x, entry points are
+ * available in <cxxabi.h>, which notes, <em>"It is not normally
+ * necessary for user programs to include this header, or use the
+ * entry points directly. However, this header is available should
+ * that be needed."</em>
+*/
+namespace abi = __cxxabiv1;
+
+#endif // __cplusplus
+
+#pragma GCC visibility pop
+
+#endif // __CXXABI_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/bitset b/6/sources/cxx-stl/gnu-libstdc++/include/debug/bitset
new file mode 100644
index 0000000..b493442
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/bitset
@@ -0,0 +1,369 @@
+// Debugging bitset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/bitset
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_BITSET
+#define _GLIBCXX_DEBUG_BITSET
+
+#include <bitset>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace std
+{
+namespace __debug
+{
+ template<size_t _Nb>
+ class bitset
+ : public _GLIBCXX_STD_D::bitset<_Nb>,
+ public __gnu_debug::_Safe_sequence_base
+ {
+ typedef _GLIBCXX_STD_D::bitset<_Nb> _Base;
+ typedef __gnu_debug::_Safe_sequence_base _Safe_base;
+
+ public:
+ // bit reference:
+ class reference
+ : private _Base::reference, public __gnu_debug::_Safe_iterator_base
+ {
+ typedef typename _Base::reference _Base_ref;
+
+ friend class bitset;
+ reference();
+
+ reference(const _Base_ref& __base, bitset* __seq)
+ : _Base_ref(__base), _Safe_iterator_base(__seq, false)
+ { }
+
+ public:
+ reference(const reference& __x)
+ : _Base_ref(__x), _Safe_iterator_base(__x, false)
+ { }
+
+ reference&
+ operator=(bool __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_write)
+ ._M_iterator(*this));
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ reference&
+ operator=(const reference& __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __x._M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(__x));
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_write)
+ ._M_iterator(*this));
+ *static_cast<_Base_ref*>(this) = __x;
+ return *this;
+ }
+
+ bool
+ operator~() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(*this));
+ return ~(*static_cast<const _Base_ref*>(this));
+ }
+
+ operator bool() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_read)
+ ._M_iterator(*this));
+ return *static_cast<const _Base_ref*>(this);
+ }
+
+ reference&
+ flip()
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__gnu_debug::__msg_bad_bitset_flip)
+ ._M_iterator(*this));
+ _Base_ref::flip();
+ return *this;
+ }
+ };
+
+ // 23.3.5.1 constructors:
+ bitset() : _Base() { }
+
+ bitset(unsigned long __val) : _Base(__val) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ explicit
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __str,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __pos = 0,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __n = (std::basic_string<_CharT, _Traits, _Alloc>::npos))
+ : _Base(__str, __pos, __n) { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __str,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __pos,
+ typename std::basic_string<_CharT, _Traits, _Alloc>::size_type
+ __n,
+ _CharT __zero, _CharT __one = _CharT('1'))
+ : _Base(__str, __pos, __n, __zero, __one) { }
+
+ bitset(const _Base& __x) : _Base(__x), _Safe_base() { }
+
+ // 23.3.5.2 bitset operations:
+ bitset<_Nb>&
+ operator&=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() &= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator|=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() |= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator^=(const bitset<_Nb>& __rhs)
+ {
+ _M_base() ^= __rhs;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator<<=(size_t __pos)
+ {
+ _M_base() <<= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ operator>>=(size_t __pos)
+ {
+ _M_base() >>= __pos;
+ return *this;
+ }
+
+ bitset<_Nb>&
+ set()
+ {
+ _Base::set();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 186. bitset::set() second parameter should be bool
+ bitset<_Nb>&
+ set(size_t __pos, bool __val = true)
+ {
+ _Base::set(__pos, __val);
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset()
+ {
+ _Base::reset();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ reset(size_t __pos)
+ {
+ _Base::reset(__pos);
+ return *this;
+ }
+
+ bitset<_Nb> operator~() const { return bitset(~_M_base()); }
+
+ bitset<_Nb>&
+ flip()
+ {
+ _Base::flip();
+ return *this;
+ }
+
+ bitset<_Nb>&
+ flip(size_t __pos)
+ {
+ _Base::flip(__pos);
+ return *this;
+ }
+
+ // element access:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ reference
+ operator[](size_t __pos)
+ {
+ __glibcxx_check_subscript(__pos);
+ return reference(_M_base()[__pos], this);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 11. Bitset minor problems
+ bool
+ operator[](size_t __pos) const
+ {
+ __glibcxx_check_subscript(__pos);
+ return _M_base()[__pos];
+ }
+
+ using _Base::to_ulong;
+
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string() const
+ { return _M_base().template to_string<_CharT, _Traits, _Alloc>(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 396. what are characters zero and one.
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_string<_CharT, _Traits, _Alloc>
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return _M_base().template
+ to_string<_CharT, _Traits, _Alloc>(__zero, __one);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 434. bitset::to_string() hard to use.
+ template<typename _CharT, typename _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string() const
+ { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 853. to_string needs updating with zero and one.
+ template<class _CharT, class _Traits>
+ std::basic_string<_CharT, _Traits, std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ { return to_string<_CharT, _Traits,
+ std::allocator<_CharT> >(__zero, __one); }
+
+ template<typename _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string() const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >();
+ }
+
+ template<class _CharT>
+ std::basic_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >
+ to_string(_CharT __zero, _CharT __one = _CharT('1')) const
+ {
+ return to_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT> >(__zero, __one);
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string() const
+ {
+ return to_string<char,std::char_traits<char>,std::allocator<char> >();
+ }
+
+ std::basic_string<char, std::char_traits<char>, std::allocator<char> >
+ to_string(char __zero, char __one = '1') const
+ {
+ return to_string<char, std::char_traits<char>,
+ std::allocator<char> >(__zero, __one);
+ }
+
+ using _Base::count;
+ using _Base::size;
+
+ bool
+ operator==(const bitset<_Nb>& __rhs) const
+ { return _M_base() == __rhs; }
+
+ bool
+ operator!=(const bitset<_Nb>& __rhs) const
+ { return _M_base() != __rhs; }
+
+ using _Base::test;
+ using _Base::all;
+ using _Base::any;
+ using _Base::none;
+
+ bitset<_Nb>
+ operator<<(size_t __pos) const
+ { return bitset<_Nb>(_M_base() << __pos); }
+
+ bitset<_Nb>
+ operator>>(size_t __pos) const
+ { return bitset<_Nb>(_M_base() >> __pos); }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) &= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) |= __y; }
+
+ template<size_t _Nb>
+ bitset<_Nb>
+ operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+ { return bitset<_Nb>(__x) ^= __y; }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+ { return __is >> __x._M_base(); }
+
+ template<typename _CharT, typename _Traits, size_t _Nb>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x)
+ { return __os << __x._M_base(); }
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/debug.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/debug.h
new file mode 100644
index 0000000..305299b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/debug.h
@@ -0,0 +1,130 @@
+// Debugging support implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/debug.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MACRO_SWITCH_H
+#define _GLIBCXX_DEBUG_MACRO_SWITCH_H 1
+
+/** Macros and namespaces used by the implementation outside of debug
+ * wrappers to verify certain properties. The __glibcxx_requires_xxx
+ * macros are merely wrappers around the __glibcxx_check_xxx wrappers
+ * when we are compiling with debug mode, but disappear when we are
+ * in release mode so that there is no checking performed in, e.g.,
+ * the standard library algorithms.
+*/
+
+// Debug mode namespaces.
+
+/**
+ * @namespace std::__debug
+ * @brief GNU debug code, replaces standard behavior with debug behavior.
+ */
+namespace std
+{
+ namespace __debug { }
+}
+
+/** @namespace __gnu_debug
+ * @brief GNU debug classes for public use.
+*/
+namespace __gnu_debug
+{
+ using namespace std::__debug;
+}
+
+#ifndef _GLIBCXX_DEBUG
+
+# define _GLIBCXX_DEBUG_ASSERT(_Condition)
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
+# define _GLIBCXX_DEBUG_ONLY(_Statement) ;
+# define __glibcxx_requires_cond(_Cond,_Msg)
+# define __glibcxx_requires_valid_range(_First,_Last)
+# define __glibcxx_requires_sorted(_First,_Last)
+# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2)
+# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred)
+# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_heap(_First,_Last)
+# define __glibcxx_requires_heap_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_nonempty()
+# define __glibcxx_requires_string(_String)
+# define __glibcxx_requires_string_len(_String,_Len)
+# define __glibcxx_requires_subscript(_N)
+
+#else
+
+# include <debug/macros.h>
+
+#define _GLIBCXX_DEBUG_ASSERT(_Condition) __glibcxx_assert(_Condition)
+
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition)
+#else
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
+#endif
+
+# define _GLIBCXX_DEBUG_ONLY(_Statement) _Statement
+
+# define __glibcxx_requires_cond(_Cond,_Msg) _GLIBCXX_DEBUG_VERIFY(_Cond,_Msg)
+# define __glibcxx_requires_valid_range(_First,_Last) \
+ __glibcxx_check_valid_range(_First,_Last)
+# define __glibcxx_requires_sorted(_First,_Last) \
+ __glibcxx_check_sorted(_First,_Last)
+# define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) \
+ __glibcxx_check_sorted_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) \
+ __glibcxx_check_sorted_set(_First1,_Last1,_First2)
+# define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) \
+ __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred)
+# define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) \
+ __glibcxx_check_partitioned_lower(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) \
+ __glibcxx_check_partitioned_upper(_First,_Last,_Value)
+# define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
+ __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
+ __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred)
+# define __glibcxx_requires_heap(_First,_Last) \
+ __glibcxx_check_heap(_First,_Last)
+# define __glibcxx_requires_heap_pred(_First,_Last,_Pred) \
+ __glibcxx_check_heap_pred(_First,_Last,_Pred)
+# define __glibcxx_requires_nonempty() __glibcxx_check_nonempty()
+# define __glibcxx_requires_string(_String) __glibcxx_check_string(_String)
+# define __glibcxx_requires_string_len(_String,_Len) \
+ __glibcxx_check_string_len(_String,_Len)
+# define __glibcxx_requires_subscript(_N) __glibcxx_check_subscript(_N)
+
+# include <debug/functions.h>
+# include <debug/formatter.h>
+
+#endif
+
+#endif // _GLIBCXX_DEBUG_MACRO_SWITCH_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/deque b/6/sources/cxx-stl/gnu-libstdc++/include/debug/deque
new file mode 100644
index 0000000..b481fd1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/deque
@@ -0,0 +1,515 @@
+// Debugging deque implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/deque
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_DEQUE
+#define _GLIBCXX_DEBUG_DEQUE 1
+
+#include <deque>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class deque
+ : public _GLIBCXX_STD_D::deque<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<deque<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::deque<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<deque> _Safe_base;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,deque>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,deque>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.1.1 construct/copy/destroy:
+ explicit deque(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit deque(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+ { }
+
+ deque(const deque& __x)
+ : _Base(__x), _Safe_base() { }
+
+ deque(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque(deque&& __x)
+ : _Base(std::forward<deque>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ deque(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a), _Safe_base() { }
+#endif
+
+ ~deque() { }
+
+ deque&
+ operator=(const deque& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ deque&
+ operator=(deque&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ deque&
+ operator=(initializer_list<value_type> __l)
+ {
+ *static_cast<_Base*>(this) = __l;
+ this->_M_invalidate_all();
+ return *this;
+ }
+#endif
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ this->_M_invalidate_all();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ assign(initializer_list<value_type> __l)
+ {
+ _Base::assign(__l);
+ this->_M_invalidate_all();
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // 23.2.1.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
+
+ bool __invalidate_all = __sz > this->size();
+ if (__sz < this->size())
+ this->_M_invalidate_if(_After_nth(__sz, _M_base().begin()));
+
+ _Base::resize(__sz, __c);
+
+ if (__invalidate_all)
+ this->_M_invalidate_all();
+ }
+
+ using _Base::empty;
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // 23.2.1.3 modifiers:
+ void
+ push_front(const _Tp& __x)
+ {
+ _Base::push_front(__x);
+ this->_M_invalidate_all();
+ }
+
+ void
+ push_back(const _Tp& __x)
+ {
+ _Base::push_back(__x);
+ this->_M_invalidate_all();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ push_front(_Tp&& __x)
+ { emplace_front(std::move(__x)); }
+
+ void
+ push_back(_Tp&& __x)
+ { emplace_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_front(_Args&&... __args)
+ {
+ _Base::emplace_front(std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args)
+ {
+ _Base::emplace_back(std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ }
+
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ typename _Base::iterator __res = _Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ typename _Base::iterator __res = _Base::insert(__position.base(), __x);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ {
+ _Base::insert(__p, __l);
+ this->_M_invalidate_all();
+ }
+#endif
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ _Base::insert(__position.base(), __n, __x);
+ this->_M_invalidate_all();
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+ _Base::insert(__position.base(), __first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ pop_front()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = begin();
+ __victim._M_invalidate();
+ _Base::pop_front();
+ }
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end();
+ --__victim;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ if (__position == begin() || __position == end()-1)
+ {
+ __position._M_invalidate();
+ return iterator(_Base::erase(__position.base()), this);
+ }
+ else
+ {
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ if (__first == begin() || __last == end())
+ {
+ this->_M_detach_singular();
+ for (iterator __position = __first; __position != __last; )
+ {
+ iterator __victim = __position++;
+ __victim._M_invalidate();
+ }
+ __try
+ {
+ return iterator(_Base::erase(__first.base(), __last.base()),
+ this);
+ }
+ __catch(...)
+ {
+ this->_M_revalidate_singular();
+ __throw_exception_again;
+ }
+ }
+ else
+ {
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(deque&& __x)
+#else
+ swap(deque& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const deque<_Tp, _Alloc>& __lhs,
+ const deque<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>&& __lhs, deque<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(deque<_Tp, _Alloc>& __lhs, deque<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/formatter.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/formatter.h
new file mode 100644
index 0000000..0538edb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/formatter.h
@@ -0,0 +1,392 @@
+// Debug-mode error formatting implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/formatter.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_FORMATTER_H
+#define _GLIBCXX_DEBUG_FORMATTER_H 1
+
+#include <typeinfo>
+#include <debug/debug.h>
+
+namespace __gnu_debug
+{
+ using std::type_info;
+
+ /** Determine if the two types are the same. */
+ template<typename _Type1, typename _Type2>
+ struct __is_same
+ {
+ static const bool value = false;
+ };
+
+ template<typename _Type>
+ struct __is_same<_Type, _Type>
+ {
+ static const bool value = true;
+ };
+
+ template<bool> struct __truth { };
+
+ class _Safe_sequence_base;
+
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ template<typename _Sequence>
+ class _Safe_sequence;
+
+ enum _Debug_msg_id
+ {
+ // General checks
+ __msg_valid_range,
+ __msg_insert_singular,
+ __msg_insert_different,
+ __msg_erase_bad,
+ __msg_erase_different,
+ __msg_subscript_oob,
+ __msg_empty,
+ __msg_unpartitioned,
+ __msg_unpartitioned_pred,
+ __msg_unsorted,
+ __msg_unsorted_pred,
+ __msg_not_heap,
+ __msg_not_heap_pred,
+ // std::bitset checks
+ __msg_bad_bitset_write,
+ __msg_bad_bitset_read,
+ __msg_bad_bitset_flip,
+ // std::list checks
+ __msg_self_splice,
+ __msg_splice_alloc,
+ __msg_splice_bad,
+ __msg_splice_other,
+ __msg_splice_overlap,
+ // iterator checks
+ __msg_init_singular,
+ __msg_init_copy_singular,
+ __msg_init_const_singular,
+ __msg_copy_singular,
+ __msg_bad_deref,
+ __msg_bad_inc,
+ __msg_bad_dec,
+ __msg_iter_subscript_oob,
+ __msg_advance_oob,
+ __msg_retreat_oob,
+ __msg_iter_compare_bad,
+ __msg_compare_different,
+ __msg_iter_order_bad,
+ __msg_order_different,
+ __msg_distance_bad,
+ __msg_distance_different,
+ // istream_iterator
+ __msg_deref_istream,
+ __msg_inc_istream,
+ // ostream_iterator
+ __msg_output_ostream,
+ // istreambuf_iterator
+ __msg_deref_istreambuf,
+ __msg_inc_istreambuf
+ };
+
+ class _Error_formatter
+ {
+ /// Whether an iterator is constant, mutable, or unknown
+ enum _Constness
+ {
+ __unknown_constness,
+ __const_iterator,
+ __mutable_iterator,
+ __last_constness
+ };
+
+ // The state of the iterator (fine-grained), if we know it.
+ enum _Iterator_state
+ {
+ __unknown_state,
+ __singular, // singular, may still be attached to a sequence
+ __begin, // dereferenceable, and at the beginning
+ __middle, // dereferenceable, not at the beginning
+ __end, // past-the-end, may be at beginning if sequence empty
+ __last_state
+ };
+
+ // Tags denoting the type of parameter for construction
+ struct _Is_iterator { };
+ struct _Is_sequence { };
+
+ // A parameter that may be referenced by an error message
+ struct _Parameter
+ {
+ enum
+ {
+ __unused_param,
+ __iterator,
+ __sequence,
+ __integer,
+ __string
+ } _M_kind;
+
+ union
+ {
+ // When _M_kind == __iterator
+ struct
+ {
+ const char* _M_name;
+ const void* _M_address;
+ const type_info* _M_type;
+ _Constness _M_constness;
+ _Iterator_state _M_state;
+ const void* _M_sequence;
+ const type_info* _M_seq_type;
+ } _M_iterator;
+
+ // When _M_kind == __sequence
+ struct
+ {
+ const char* _M_name;
+ const void* _M_address;
+ const type_info* _M_type;
+ } _M_sequence;
+
+ // When _M_kind == __integer
+ struct
+ {
+ const char* _M_name;
+ long _M_value;
+ } _M_integer;
+
+ // When _M_kind == __string
+ struct
+ {
+ const char* _M_name;
+ const char* _M_value;
+ } _M_string;
+ } _M_variant;
+
+ _Parameter() : _M_kind(__unused_param), _M_variant() { }
+
+ _Parameter(long __value, const char* __name)
+ : _M_kind(__integer), _M_variant()
+ {
+ _M_variant._M_integer._M_name = __name;
+ _M_variant._M_integer._M_value = __value;
+ }
+
+ _Parameter(const char* __value, const char* __name)
+ : _M_kind(__string), _M_variant()
+ {
+ _M_variant._M_string._M_name = __name;
+ _M_variant._M_string._M_value = __value;
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ _Parameter(const _Safe_iterator<_Iterator, _Sequence>& __it,
+ const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness =
+ __is_same<_Safe_iterator<_Iterator, _Sequence>,
+ typename _Sequence::iterator>::
+ value? __mutable_iterator : __const_iterator;
+ _M_variant._M_iterator._M_sequence = __it._M_get_sequence();
+ _M_variant._M_iterator._M_seq_type = &typeid(_Sequence);
+
+ if (__it._M_singular())
+ _M_variant._M_iterator._M_state = __singular;
+ else
+ {
+ bool __is_begin = __it._M_is_begin();
+ bool __is_end = __it._M_is_end();
+ if (__is_end)
+ _M_variant._M_iterator._M_state = __end;
+ else if (__is_begin)
+ _M_variant._M_iterator._M_state = __begin;
+ else
+ _M_variant._M_iterator._M_state = __middle;
+ }
+ }
+
+ template<typename _Type>
+ _Parameter(const _Type*& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __mutable_iterator;
+ _M_variant._M_iterator._M_state = __it? __unknown_state : __singular;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Type>
+ _Parameter(_Type*& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __const_iterator;
+ _M_variant._M_iterator._M_state = __it? __unknown_state : __singular;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Iterator>
+ _Parameter(const _Iterator& __it, const char* __name, _Is_iterator)
+ : _M_kind(__iterator), _M_variant()
+ {
+ _M_variant._M_iterator._M_name = __name;
+ _M_variant._M_iterator._M_address = &__it;
+ _M_variant._M_iterator._M_type = &typeid(__it);
+ _M_variant._M_iterator._M_constness = __unknown_constness;
+ _M_variant._M_iterator._M_state =
+ __gnu_debug::__check_singular(__it)? __singular : __unknown_state;
+ _M_variant._M_iterator._M_sequence = 0;
+ _M_variant._M_iterator._M_seq_type = 0;
+ }
+
+ template<typename _Sequence>
+ _Parameter(const _Safe_sequence<_Sequence>& __seq,
+ const char* __name, _Is_sequence)
+ : _M_kind(__sequence), _M_variant()
+ {
+ _M_variant._M_sequence._M_name = __name;
+ _M_variant._M_sequence._M_address =
+ static_cast<const _Sequence*>(&__seq);
+ _M_variant._M_sequence._M_type = &typeid(_Sequence);
+ }
+
+ template<typename _Sequence>
+ _Parameter(const _Sequence& __seq, const char* __name, _Is_sequence)
+ : _M_kind(__sequence), _M_variant()
+ {
+ _M_variant._M_sequence._M_name = __name;
+ _M_variant._M_sequence._M_address = &__seq;
+ _M_variant._M_sequence._M_type = &typeid(_Sequence);
+ }
+
+ void
+ _M_print_field(const _Error_formatter* __formatter,
+ const char* __name) const;
+
+ void
+ _M_print_description(const _Error_formatter* __formatter) const;
+ };
+
+ friend struct _Parameter;
+
+ public:
+ template<typename _Iterator>
+ const _Error_formatter&
+ _M_iterator(const _Iterator& __it, const char* __name = 0) const
+ {
+ if (_M_num_parameters < size_t(__max_parameters))
+ _M_parameters[_M_num_parameters++] = _Parameter(__it, __name,
+ _Is_iterator());
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_integer(long __value, const char* __name = 0) const
+ {
+ if (_M_num_parameters < size_t(__max_parameters))
+ _M_parameters[_M_num_parameters++] = _Parameter(__value, __name);
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_string(const char* __value, const char* __name = 0) const
+ {
+ if (_M_num_parameters < size_t(__max_parameters))
+ _M_parameters[_M_num_parameters++] = _Parameter(__value, __name);
+ return *this;
+ }
+
+ template<typename _Sequence>
+ const _Error_formatter&
+ _M_sequence(const _Sequence& __seq, const char* __name = 0) const
+ {
+ if (_M_num_parameters < size_t(__max_parameters))
+ _M_parameters[_M_num_parameters++] = _Parameter(__seq, __name,
+ _Is_sequence());
+ return *this;
+ }
+
+ const _Error_formatter&
+ _M_message(const char* __text) const
+ { _M_text = __text; return *this; }
+
+ const _Error_formatter&
+ _M_message(_Debug_msg_id __id) const;
+
+ void
+ _M_error() const;
+
+ private:
+ _Error_formatter(const char* __file, size_t __line)
+ : _M_file(__file), _M_line(__line), _M_num_parameters(0), _M_text(0),
+ _M_max_length(78), _M_column(1), _M_first_line(true), _M_wordwrap(false)
+ { _M_get_max_length(); }
+
+ template<typename _Tp>
+ void
+ _M_format_word(char*, int, const char*, _Tp) const;
+
+ void
+ _M_print_word(const char* __word) const;
+
+ void
+ _M_print_string(const char* __string) const;
+
+ void
+ _M_get_max_length() const;
+
+ enum { __max_parameters = 9 };
+
+ const char* _M_file;
+ size_t _M_line;
+ mutable _Parameter _M_parameters[__max_parameters];
+ mutable size_t _M_num_parameters;
+ mutable const char* _M_text;
+ mutable size_t _M_max_length;
+ enum { _M_indent = 4 } ;
+ mutable size_t _M_column;
+ mutable bool _M_first_line;
+ mutable bool _M_wordwrap;
+
+ public:
+ static _Error_formatter
+ _M_at(const char* __file, size_t __line)
+ { return _Error_formatter(__file, __line); }
+ };
+} // namespace __gnu_debug
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/functions.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/functions.h
new file mode 100644
index 0000000..a4b1d78
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/functions.h
@@ -0,0 +1,383 @@
+// Debugging support implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/functions.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_FUNCTIONS_H
+#define _GLIBCXX_DEBUG_FUNCTIONS_H 1
+
+#include <bits/c++config.h>
+#include <cstddef> // for ptrdiff_t
+#include <bits/stl_iterator_base_types.h> // for iterator_traits, categories
+#include <bits/cpp_type_traits.h> // for __is_integer
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ // An arbitrary iterator pointer is not singular.
+ inline bool
+ __check_singular_aux(const void*) { return false; }
+
+ // We may have an iterator that derives from _Safe_iterator_base but isn't
+ // a _Safe_iterator.
+ template<typename _Iterator>
+ inline bool
+ __check_singular(_Iterator& __x)
+ { return __check_singular_aux(&__x); }
+
+ /** Non-NULL pointers are nonsingular. */
+ template<typename _Tp>
+ inline bool
+ __check_singular(const _Tp* __ptr)
+ { return __ptr == 0; }
+
+ /** Safe iterators know if they are singular. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __check_singular(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ { return __x._M_singular(); }
+
+ /** Assume that some arbitrary iterator is dereferenceable, because we
+ can't prove that it isn't. */
+ template<typename _Iterator>
+ inline bool
+ __check_dereferenceable(_Iterator&)
+ { return true; }
+
+ /** Non-NULL pointers are dereferenceable. */
+ template<typename _Tp>
+ inline bool
+ __check_dereferenceable(const _Tp* __ptr)
+ { return __ptr; }
+
+ /** Safe iterators know if they are singular. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __check_dereferenceable(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ { return __x._M_dereferenceable(); }
+
+ /** If the distance between two random access iterators is
+ * nonnegative, assume the range is valid.
+ */
+ template<typename _RandomAccessIterator>
+ inline bool
+ __valid_range_aux2(const _RandomAccessIterator& __first,
+ const _RandomAccessIterator& __last,
+ std::random_access_iterator_tag)
+ { return __last - __first >= 0; }
+
+ /** Can't test for a valid range with input iterators, because
+ * iteration may be destructive. So we just assume that the range
+ * is valid.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range_aux2(const _InputIterator&, const _InputIterator&,
+ std::input_iterator_tag)
+ { return true; }
+
+ /** We say that integral types for a valid range, and defer to other
+ * routines to realize what to do with integral types instead of
+ * iterators.
+ */
+ template<typename _Integral>
+ inline bool
+ __valid_range_aux(const _Integral&, const _Integral&, std::__true_type)
+ { return true; }
+
+ /** We have iterators, so figure out what kind of iterators that are
+ * to see if we can check the range ahead of time.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range_aux(const _InputIterator& __first,
+ const _InputIterator& __last, std::__false_type)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+ return __valid_range_aux2(__first, __last, _Category());
+ }
+
+ /** Don't know what these iterators are, or if they are even
+ * iterators (we may get an integral type for InputIterator), so
+ * see if they are integral and pass them on to the next phase
+ * otherwise.
+ */
+ template<typename _InputIterator>
+ inline bool
+ __valid_range(const _InputIterator& __first, const _InputIterator& __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ return __valid_range_aux(__first, __last, _Integral());
+ }
+
+ /** Safe iterators know how to check if they form a valid range. */
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ __valid_range(const _Safe_iterator<_Iterator, _Sequence>& __first,
+ const _Safe_iterator<_Iterator, _Sequence>& __last)
+ { return __first._M_valid_range(__last); }
+
+ /* Checks that [first, last) is a valid range, and then returns
+ * __first. This routine is useful when we can't use a separate
+ * assertion statement because, e.g., we are in a constructor.
+ */
+ template<typename _InputIterator>
+ inline _InputIterator
+ __check_valid_range(const _InputIterator& __first,
+ const _InputIterator& __last
+ __attribute__((__unused__)))
+ {
+ _GLIBCXX_DEBUG_ASSERT(__valid_range(__first, __last));
+ return __first;
+ }
+
+ /** Checks that __s is non-NULL or __n == 0, and then returns __s. */
+ template<typename _CharT, typename _Integer>
+ inline const _CharT*
+ __check_string(const _CharT* __s,
+ const _Integer& __n __attribute__((__unused__)))
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ _GLIBCXX_DEBUG_ASSERT(__s != 0 || __n == 0);
+#endif
+ return __s;
+ }
+
+ /** Checks that __s is non-NULL and then returns __s. */
+ template<typename _CharT>
+ inline const _CharT*
+ __check_string(const _CharT* __s)
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ _GLIBCXX_DEBUG_ASSERT(__s != 0);
+#endif
+ return __s;
+ }
+
+ // Can't check if an input iterator sequence is sorted, because we
+ // can't step through the sequence.
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted_aux(const _InputIterator&, const _InputIterator&,
+ std::input_iterator_tag)
+ { return true; }
+
+ // Can verify if a forward iterator sequence is in fact sorted using
+ // std::__is_sorted
+ template<typename _ForwardIterator>
+ inline bool
+ __check_sorted_aux(_ForwardIterator __first, _ForwardIterator __last,
+ std::forward_iterator_tag)
+ {
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (*__next < *__first)
+ return false;
+
+ return true;
+ }
+
+ // Can't check if an input iterator sequence is sorted, because we can't step
+ // through the sequence.
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted_aux(const _InputIterator&, const _InputIterator&,
+ _Predicate, std::input_iterator_tag)
+ { return true; }
+
+ // Can verify if a forward iterator sequence is in fact sorted using
+ // std::__is_sorted
+ template<typename _ForwardIterator, typename _Predicate>
+ inline bool
+ __check_sorted_aux(_ForwardIterator __first, _ForwardIterator __last,
+ _Predicate __pred, std::forward_iterator_tag)
+ {
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (__pred(*__next, *__first))
+ return false;
+
+ return true;
+ }
+
+ // Determine if a sequence is sorted.
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted(const _InputIterator& __first, const _InputIterator& __last)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+
+ // Verify that the < operator for elements in the sequence is a
+ // StrictWeakOrdering by checking that it is irreflexive.
+ _GLIBCXX_DEBUG_ASSERT(__first == __last || !(*__first < *__first));
+
+ return __check_sorted_aux(__first, __last, _Category());
+ }
+
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted(const _InputIterator& __first, const _InputIterator& __last,
+ _Predicate __pred)
+ {
+ typedef typename std::iterator_traits<_InputIterator>::iterator_category
+ _Category;
+
+ // Verify that the predicate is StrictWeakOrdering by checking that it
+ // is irreflexive.
+ _GLIBCXX_DEBUG_ASSERT(__first == __last || !__pred(*__first, *__first));
+
+ return __check_sorted_aux(__first, __last, __pred, _Category());
+ }
+
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator& __first,
+ const _InputIterator& __last,
+ std::__true_type)
+ { return __check_sorted(__first, __last); }
+
+ template<typename _InputIterator>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator&,
+ const _InputIterator&,
+ std::__false_type)
+ { return true; }
+
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator& __first,
+ const _InputIterator& __last,
+ _Predicate __pred, std::__true_type)
+ { return __check_sorted(__first, __last, __pred); }
+
+ template<typename _InputIterator, typename _Predicate>
+ inline bool
+ __check_sorted_set_aux(const _InputIterator&,
+ const _InputIterator&, _Predicate,
+ std::__false_type)
+ { return true; }
+
+ // ... special variant used in std::merge, std::includes, std::set_*.
+ template<typename _InputIterator1, typename _InputIterator2>
+ inline bool
+ __check_sorted_set(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&)
+ {
+ typedef typename std::iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename std::iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ typedef typename std::__are_same<_ValueType1, _ValueType2>::__type
+ _SameType;
+ return __check_sorted_set_aux(__first, __last, _SameType());
+ }
+
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _Predicate>
+ inline bool
+ __check_sorted_set(const _InputIterator1& __first,
+ const _InputIterator1& __last,
+ const _InputIterator2&, _Predicate __pred)
+ {
+ typedef typename std::iterator_traits<_InputIterator1>::value_type
+ _ValueType1;
+ typedef typename std::iterator_traits<_InputIterator2>::value_type
+ _ValueType2;
+
+ typedef typename std::__are_same<_ValueType1, _ValueType2>::__type
+ _SameType;
+ return __check_sorted_set_aux(__first, __last, __pred, _SameType());
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 270. Binary search requirements overly strict
+ // Determine if a sequence is partitioned w.r.t. this element.
+ template<typename _ForwardIterator, typename _Tp>
+ inline bool
+ __check_partitioned_lower(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value)
+ {
+ while (__first != __last && *__first < __value)
+ ++__first;
+ while (__first != __last && !(*__first < __value))
+ ++__first;
+ return __first == __last;
+ }
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline bool
+ __check_partitioned_upper(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value)
+ {
+ while (__first != __last && !(__value < *__first))
+ ++__first;
+ while (__first != __last && __value < *__first)
+ ++__first;
+ return __first == __last;
+ }
+
+ // Determine if a sequence is partitioned w.r.t. this element.
+ template<typename _ForwardIterator, typename _Tp, typename _Pred>
+ inline bool
+ __check_partitioned_lower(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value,
+ _Pred __pred)
+ {
+ while (__first != __last && bool(__pred(*__first, __value)))
+ ++__first;
+ while (__first != __last && !bool(__pred(*__first, __value)))
+ ++__first;
+ return __first == __last;
+ }
+
+ template<typename _ForwardIterator, typename _Tp, typename _Pred>
+ inline bool
+ __check_partitioned_upper(_ForwardIterator __first,
+ _ForwardIterator __last, const _Tp& __value,
+ _Pred __pred)
+ {
+ while (__first != __last && !bool(__pred(__value, *__first)))
+ ++__first;
+ while (__first != __last && bool(__pred(__value, *__first)))
+ ++__first;
+ return __first == __last;
+ }
+} // namespace __gnu_debug
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/list b/6/sources/cxx-stl/gnu-libstdc++/include/debug/list
new file mode 100644
index 0000000..39f763a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/list
@@ -0,0 +1,653 @@
+// Debugging list implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/list
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_LIST
+#define _GLIBCXX_DEBUG_LIST 1
+
+#include <list>
+#include <bits/stl_algo.h>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
+ class list
+ : public _GLIBCXX_STD_D::list<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<list<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::list<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<list> _Safe_base;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, list>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, list>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.2.1 construct/copy/destroy:
+ explicit list(const _Allocator& __a = _Allocator())
+ : _Base(__a) { }
+
+ explicit list(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a) { }
+
+ template<class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last, __a)
+ { }
+
+
+ list(const list& __x)
+ : _Base(__x), _Safe_base() { }
+
+ list(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list(list&& __x)
+ : _Base(std::forward<list>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ list(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a), _Safe_base() { }
+#endif
+
+ ~list() { }
+
+ list&
+ operator=(const list& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ list&
+ operator=(list&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ list&
+ operator=(initializer_list<value_type> __l)
+ {
+ static_cast<_Base&>(*this) = __l;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ void
+ assign(initializer_list<value_type> __l)
+ {
+ _Base::assign(__l);
+ this->_M_invalidate_all();
+ }
+#endif
+
+ template<class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __t)
+ {
+ _Base::assign(__n, __t);
+ this->_M_invalidate_all();
+ }
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // 23.2.2.2 capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ this->_M_detach_singular();
+
+ // if __sz < size(), invalidate all iterators in [begin+__sz, end())
+ iterator __victim = begin();
+ iterator __end = end();
+ for (size_type __i = __sz; __victim != __end && __i > 0; --__i)
+ ++__victim;
+
+ while (__victim != __end)
+ {
+ iterator __real_victim = __victim++;
+ __real_victim._M_invalidate();
+ }
+
+ __try
+ {
+ _Base::resize(__sz, __c);
+ }
+ __catch(...)
+ {
+ this->_M_revalidate_singular();
+ __throw_exception_again;
+ }
+ }
+
+ // element access:
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // 23.2.2.3 modifiers:
+ using _Base::push_front;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using _Base::emplace_front;
+#endif
+
+ void
+ pop_front()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = begin();
+ __victim._M_invalidate();
+ _Base::pop_front();
+ }
+
+ using _Base::push_back;
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using _Base::emplace_back;
+#endif
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end();
+ --__victim;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...), this);
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ iterator
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ void
+ insert(iterator __p, initializer_list<value_type> __l)
+ {
+ __glibcxx_check_insert(__p);
+ _Base::insert(__p, __l);
+ }
+#endif
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ _Base::insert(__position.base(), __n, __x);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position, _InputIterator __first,
+ _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+ _Base::insert(__position.base(), __first, __last);
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ return iterator(_Base::erase(__position.base()), this);
+ }
+
+ iterator
+ erase(iterator __position, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__position, __last);
+ for (iterator __victim = __position; __victim != __last; )
+ {
+ iterator __old = __victim;
+ ++__victim;
+ __old._M_invalidate();
+ }
+ return iterator(_Base::erase(__position.base(), __last.base()), this);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(list&& __x)
+#else
+ swap(list& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ // 23.2.2.4 list operations:
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x)
+#else
+ splice(iterator __position, list& __x)
+#endif
+ {
+ _GLIBCXX_DEBUG_VERIFY(&__x != this,
+ _M_message(__gnu_debug::__msg_self_splice)
+ ._M_sequence(*this, "this"));
+ this->splice(__position, _GLIBCXX_MOVE(__x), __x.begin(), __x.end());
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __i)
+#else
+ splice(iterator __position, list& __x, iterator __i)
+#endif
+ {
+ __glibcxx_check_insert(__position);
+
+ // We used to perform the splice_alloc check: not anymore, redundant
+ // after implementing the relevant bits of N1599.
+
+ _GLIBCXX_DEBUG_VERIFY(__i._M_dereferenceable(),
+ _M_message(__gnu_debug::__msg_splice_bad)
+ ._M_iterator(__i, "__i"));
+ _GLIBCXX_DEBUG_VERIFY(__i._M_attached_to(&__x),
+ _M_message(__gnu_debug::__msg_splice_other)
+ ._M_iterator(__i, "__i")._M_sequence(__x, "__x"));
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 250. splicing invalidates iterators
+ this->_M_transfer_iter(__i);
+ _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+ __i.base());
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ splice(iterator __position, list&& __x, iterator __first,
+ iterator __last)
+#else
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+#endif
+ {
+ __glibcxx_check_insert(__position);
+ __glibcxx_check_valid_range(__first, __last);
+ _GLIBCXX_DEBUG_VERIFY(__first._M_attached_to(&__x),
+ _M_message(__gnu_debug::__msg_splice_other)
+ ._M_sequence(__x, "x")
+ ._M_iterator(__first, "first"));
+
+ // We used to perform the splice_alloc check: not anymore, redundant
+ // after implementing the relevant bits of N1599.
+
+ for (iterator __tmp = __first; __tmp != __last; )
+ {
+ _GLIBCXX_DEBUG_VERIFY(&__x != this || __tmp != __position,
+ _M_message(__gnu_debug::__msg_splice_overlap)
+ ._M_iterator(__tmp, "position")
+ ._M_iterator(__first, "first")
+ ._M_iterator(__last, "last"));
+ iterator __victim = __tmp++;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 250. splicing invalidates iterators
+ this->_M_transfer_iter(__victim);
+ }
+
+ _Base::splice(__position.base(), _GLIBCXX_MOVE(__x._M_base()),
+ __first.base(), __last.base());
+ }
+
+ void
+ remove(const _Tp& __value)
+ {
+ for (iterator __x = begin(); __x.base() != _Base::end(); )
+ {
+ if (*__x == __value)
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ template<class _Predicate>
+ void
+ remove_if(_Predicate __pred)
+ {
+ for (iterator __x = begin(); __x.base() != _Base::end(); )
+ {
+ if (__pred(*__x))
+ __x = erase(__x);
+ else
+ ++__x;
+ }
+ }
+
+ void
+ unique()
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (*__first == *__next)
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template<class _BinaryPredicate>
+ void
+ unique(_BinaryPredicate __binary_pred)
+ {
+ iterator __first = begin();
+ iterator __last = end();
+ if (__first == __last)
+ return;
+ iterator __next = __first;
+ while (++__next != __last)
+ {
+ if (__binary_pred(*__first, *__next))
+ erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x)
+#else
+ merge(list& __x)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ __glibcxx_check_sorted(_Base::begin(), _Base::end());
+ __glibcxx_check_sorted(__x.begin().base(), __x.end().base());
+ for (iterator __tmp = __x.begin(); __tmp != __x.end();)
+ {
+ iterator __victim = __tmp++;
+ this->_M_transfer_iter(__victim);
+ }
+ _Base::merge(_GLIBCXX_MOVE(__x._M_base()));
+ }
+ }
+
+ template<class _Compare>
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ merge(list&& __x, _Compare __comp)
+#else
+ merge(list& __x, _Compare __comp)
+#endif
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 300. list::merge() specification incomplete
+ if (this != &__x)
+ {
+ __glibcxx_check_sorted_pred(_Base::begin(), _Base::end(),
+ __comp);
+ __glibcxx_check_sorted_pred(__x.begin().base(), __x.end().base(),
+ __comp);
+ for (iterator __tmp = __x.begin(); __tmp != __x.end();)
+ {
+ iterator __victim = __tmp++;
+ this->_M_transfer_iter(__victim);
+ }
+ _Base::merge(_GLIBCXX_MOVE(__x._M_base()), __comp);
+ }
+ }
+
+ void
+ sort() { _Base::sort(); }
+
+ template<typename _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering __pred) { _Base::sort(__pred); }
+
+ using _Base::reverse;
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const list<_Tp, _Alloc>& __lhs,
+ const list<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>&& __lhs, list<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(list<_Tp, _Alloc>& __lhs, list<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/macros.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/macros.h
new file mode 100644
index 0000000..1a8ce69
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/macros.h
@@ -0,0 +1,246 @@
+// Debugging support implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/macros.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MACROS_H
+#define _GLIBCXX_DEBUG_MACROS_H 1
+
+/**
+ * Macros used by the implementation to verify certain
+ * properties. These macros may only be used directly by the debug
+ * wrappers. Note that these are macros (instead of the more obviously
+ * "correct" choice of making them functions) because we need line and
+ * file information at the call site, to minimize the distance between
+ * the user error and where the error is reported.
+ *
+ */
+#define _GLIBCXX_DEBUG_VERIFY(_Condition,_ErrorMessage) \
+ do \
+ { \
+ if (! (_Condition)) \
+ __gnu_debug::_Error_formatter::_M_at(__FILE__, __LINE__) \
+ ._ErrorMessage._M_error(); \
+ } while (false)
+
+// Verify that [_First, _Last) forms a valid iterator range.
+#define __glibcxx_check_valid_range(_First,_Last) \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__valid_range(_First, _Last), \
+ _M_message(__gnu_debug::__msg_valid_range) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that we can insert into *this with the iterator _Position.
+ * Insertion into a container at a specific position requires that
+ * the iterator be nonsingular (i.e., either dereferenceable or
+ * past-the-end) and that it reference the sequence we are inserting
+ * into. Note that this macro is only valid when the container is a
+ * _Safe_sequence and the iterator is a _Safe_iterator.
+*/
+#define __glibcxx_check_insert(_Position) \
+_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(), \
+ _M_message(__gnu_debug::__msg_insert_singular) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(__gnu_debug::__msg_insert_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can insert the values in the iterator range
+ * [_First, _Last) into *this with the iterator _Position. Insertion
+ * into a container at a specific position requires that the iterator
+ * be nonsingular (i.e., either dereferenceable or past-the-end),
+ * that it reference the sequence we are inserting into, and that the
+ * iterator range [_First, Last) is a valid (possibly empty)
+ * range. Note that this macro is only valid when the container is a
+ * _Safe_sequence and the iterator is a _Safe_iterator.
+ *
+ * @tbd We would like to be able to check for noninterference of
+ * _Position and the range [_First, _Last), but that can't (in
+ * general) be done.
+*/
+#define __glibcxx_check_insert_range(_Position,_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(!_Position._M_singular(), \
+ _M_message(__gnu_debug::__msg_insert_singular) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(__gnu_debug::__msg_insert_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can erase the element referenced by the iterator
+ * _Position. We can erase the element if the _Position iterator is
+ * dereferenceable and references this sequence.
+*/
+#define __glibcxx_check_erase(_Position) \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_dereferenceable(), \
+ _M_message(__gnu_debug::__msg_erase_bad) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position)); \
+_GLIBCXX_DEBUG_VERIFY(_Position._M_attached_to(this), \
+ _M_message(__gnu_debug::__msg_erase_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_Position, #_Position))
+
+/** Verify that we can erase the elements in the iterator range
+ * [_First, _Last). We can erase the elements if [_First, _Last) is a
+ * valid iterator range within this sequence.
+*/
+#define __glibcxx_check_erase_range(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(_First._M_attached_to(this), \
+ _M_message(__gnu_debug::__msg_erase_different) \
+ ._M_sequence(*this, "this") \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+// Verify that the subscript _N is less than the container's size.
+#define __glibcxx_check_subscript(_N) \
+_GLIBCXX_DEBUG_VERIFY(_N < this->size(), \
+ _M_message(__gnu_debug::__msg_subscript_oob) \
+ ._M_sequence(*this, "this") \
+ ._M_integer(_N, #_N) \
+ ._M_integer(this->size(), "size"))
+
+// Verify that the container is nonempty
+#define __glibcxx_check_nonempty() \
+_GLIBCXX_DEBUG_VERIFY(! this->empty(), \
+ _M_message(__gnu_debug::__msg_empty) \
+ ._M_sequence(*this, "this"))
+
+// Verify that the iterator range [_First, _Last) is sorted
+#define __glibcxx_check_sorted(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_sorted(_First, _Last), \
+ _M_message(__gnu_debug::__msg_unsorted) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that the iterator range [_First, _Last) is sorted by the
+ predicate _Pred. */
+#define __glibcxx_check_sorted_pred(_First,_Last,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_sorted(_First, _Last, _Pred), \
+ _M_message(__gnu_debug::__msg_unsorted_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred))
+
+// Special variant for std::merge, std::includes, std::set_*
+#define __glibcxx_check_sorted_set(_First1,_Last1,_First2) \
+__glibcxx_check_valid_range(_First1,_Last1); \
+_GLIBCXX_DEBUG_VERIFY( \
+ __gnu_debug::__check_sorted_set(_First1, _Last1, _First2), \
+ _M_message(__gnu_debug::__msg_unsorted) \
+ ._M_iterator(_First1, #_First1) \
+ ._M_iterator(_Last1, #_Last1))
+
+// Likewise with a _Pred.
+#define __glibcxx_check_sorted_set_pred(_First1,_Last1,_First2,_Pred) \
+__glibcxx_check_valid_range(_First1,_Last1); \
+_GLIBCXX_DEBUG_VERIFY( \
+ __gnu_debug::__check_sorted_set(_First1, _Last1, _First2, _Pred), \
+ _M_message(__gnu_debug::__msg_unsorted_pred) \
+ ._M_iterator(_First1, #_First1) \
+ ._M_iterator(_Last1, #_Last1) \
+ ._M_string(#_Pred))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value. */
+#define __glibcxx_check_partitioned_lower(_First,_Last,_Value) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
+ _Value), \
+ _M_message(__gnu_debug::__msg_unpartitioned) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Value))
+
+#define __glibcxx_check_partitioned_upper(_First,_Last,_Value) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
+ _Value), \
+ _M_message(__gnu_debug::__msg_unpartitioned) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Value))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value and predicate _Pred. */
+#define __glibcxx_check_partitioned_lower_pred(_First,_Last,_Value,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_lower(_First, _Last, \
+ _Value, _Pred), \
+ _M_message(__gnu_debug::__msg_unpartitioned_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred) \
+ ._M_string(#_Value))
+
+/** Verify that the iterator range [_First, _Last) is partitioned
+ w.r.t. the value _Value and predicate _Pred. */
+#define __glibcxx_check_partitioned_upper_pred(_First,_Last,_Value,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(__gnu_debug::__check_partitioned_upper(_First, _Last, \
+ _Value, _Pred), \
+ _M_message(__gnu_debug::__msg_unpartitioned_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred) \
+ ._M_string(#_Value))
+
+// Verify that the iterator range [_First, _Last) is a heap
+#define __glibcxx_check_heap(_First,_Last) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last), \
+ _M_message(__gnu_debug::__msg_not_heap) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last))
+
+/** Verify that the iterator range [_First, _Last) is a heap
+ w.r.t. the predicate _Pred. */
+#define __glibcxx_check_heap_pred(_First,_Last,_Pred) \
+__glibcxx_check_valid_range(_First,_Last); \
+_GLIBCXX_DEBUG_VERIFY(std::__is_heap(_First, _Last, _Pred), \
+ _M_message(__gnu_debug::__msg_not_heap_pred) \
+ ._M_iterator(_First, #_First) \
+ ._M_iterator(_Last, #_Last) \
+ ._M_string(#_Pred))
+
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+# define __glibcxx_check_string(_String) _GLIBCXX_DEBUG_ASSERT(_String != 0)
+# define __glibcxx_check_string_len(_String,_Len) \
+ _GLIBCXX_DEBUG_ASSERT(_String != 0 || _Len == 0)
+#else
+# define __glibcxx_check_string(_String)
+# define __glibcxx_check_string_len(_String,_Len)
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/map b/6/sources/cxx-stl/gnu-libstdc++/include/debug/map
new file mode 100644
index 0000000..2d16b71
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/map
@@ -0,0 +1,37 @@
+// Debugging map/multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/map
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MAP
+#define _GLIBCXX_DEBUG_MAP 1
+
+#include <map>
+#include <debug/map.h>
+#include <debug/multimap.h>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/map.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/map.h
new file mode 100644
index 0000000..de1e5a5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/map.h
@@ -0,0 +1,412 @@
+// Debugging map implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/map.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MAP_H
+#define _GLIBCXX_DEBUG_MAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class map
+ : public _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<map<_Key, _Tp, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::map<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<map> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, map>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, map>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit map(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ map(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a), _Safe_base() { }
+
+ map(const map& __x)
+ : _Base(__x), _Safe_base() { }
+
+ map(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map(map&& __x)
+ : _Base(std::forward<map>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ map(initializer_list<value_type> __l,
+ const _Compare& __c = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __c, __a), _Safe_base() { }
+#endif
+
+ ~map() { }
+
+ map&
+ operator=(const map& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ map&
+ operator=(map&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 133. map missing get_allocator()
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // 23.3.1.2 element access:
+ using _Base::operator[];
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ using _Base::at;
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first, this),
+ __res.second);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(std::initializer_list<value_type> __list)
+ { _Base::insert(__list); }
+#endif
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(map&& __x)
+#else
+ swap(map& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 map operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Allocator>&& __lhs,
+ map<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(map<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ map<_Key, _Tp, _Compare, _Allocator>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/multimap.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/multimap.h
new file mode 100644
index 0000000..42741da
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/multimap.h
@@ -0,0 +1,400 @@
+// Debugging multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/multimap.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MULTIMAP_H
+#define _GLIBCXX_DEBUG_MULTIMAP_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<std::pair<const _Key, _Tp> > >
+ class multimap
+ : public _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<multimap<_Key, _Tp,
+ _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::multimap<_Key, _Tp, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<multimap> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Tp mapped_type;
+ typedef std::pair<const _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multimap>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ multimap> const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::value_compare;
+
+ // 23.3.1.1 construct/copy/destroy:
+ explicit multimap(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ multimap(const multimap& __x)
+ : _Base(__x), _Safe_base() { }
+
+ multimap(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap(multimap&& __x)
+ : _Base(std::forward<multimap>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ multimap(initializer_list<value_type> __l,
+ const _Compare& __c = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __c, __a), _Safe_base() { }
+#endif
+
+ ~multimap() { }
+
+ multimap&
+ operator=(const multimap& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multimap&
+ operator=(multimap&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x), this); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(std::initializer_list<value_type> __list)
+ { _Base::insert(__list); }
+#endif
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multimap&& __x)
+#else
+ swap(multimap& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // 23.3.1.3 multimap operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ std::pair<_Base_const_iterator, _Base_const_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ const multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Allocator>&& __lhs,
+ multimap<_Key, _Tp, _Compare, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Key, typename _Tp,
+ typename _Compare, typename _Allocator>
+ inline void
+ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
+ multimap<_Key, _Tp, _Compare, _Allocator>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/multiset.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/multiset.h
new file mode 100644
index 0000000..3e4ee86
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/multiset.h
@@ -0,0 +1,396 @@
+// Debugging multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/multiset.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_MULTISET_H
+#define _GLIBCXX_DEBUG_MULTISET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class multiset
+ : public _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator>,
+ public __gnu_debug::_Safe_sequence<multiset<_Key, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::multiset<_Key, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<multiset> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, multiset>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ multiset> const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit multiset(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ multiset(const multiset& __x)
+ : _Base(__x), _Safe_base() { }
+
+ multiset(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset(multiset&& __x)
+ : _Base(std::forward<multiset>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ multiset(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __comp, __a), _Safe_base() { }
+#endif
+
+ ~multiset() { }
+
+ multiset&
+ operator=(const multiset& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ multiset&
+ operator=(multiset&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ iterator
+ insert(const value_type& __x)
+ { return iterator(_Base::insert(__x), this); }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+#endif
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ std::pair<iterator, iterator> __victims = this->equal_range(__x);
+ size_type __count = 0;
+ while (__victims.first != __victims.second)
+ {
+ iterator __victim = __victims.first++;
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ ++__count;
+ }
+ return __count;
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(multiset&& __x)
+#else
+ swap(multiset& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // multiset operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const multiset<_Key, _Compare, _Allocator>& __lhs,
+ const multiset<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>& __x,
+ multiset<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>&& __x,
+ multiset<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(multiset<_Key, _Compare, _Allocator>& __x,
+ multiset<_Key, _Compare, _Allocator>&& __y)
+ { return __x.swap(__y); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_base.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_base.h
new file mode 100644
index 0000000..1bef5e7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_base.h
@@ -0,0 +1,220 @@
+// Safe sequence/iterator base implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/safe_base.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_BASE_H
+#define _GLIBCXX_DEBUG_SAFE_BASE_H 1
+
+#include <ext/concurrence.h>
+
+namespace __gnu_debug
+{
+ class _Safe_sequence_base;
+
+ /** \brief Basic functionality for a "safe" iterator.
+ *
+ * The %_Safe_iterator_base base class implements the functionality
+ * of a safe iterator that is not specific to a particular iterator
+ * type. It contains a pointer back to the sequence it references
+ * along with iterator version information and pointers to form a
+ * doubly-linked list of iterators referenced by the container.
+ *
+ * This class must not perform any operations that can throw an
+ * exception, or the exception guarantees of derived iterators will
+ * be broken.
+ */
+ class _Safe_iterator_base
+ {
+ public:
+ /** The sequence this iterator references; may be NULL to indicate
+ a singular iterator. */
+ _Safe_sequence_base* _M_sequence;
+
+ /** The version number of this iterator. The sentinel value 0 is
+ * used to indicate an invalidated iterator (i.e., one that is
+ * singular because of an operation on the container). This
+ * version number must equal the version number in the sequence
+ * referenced by _M_sequence for the iterator to be
+ * non-singular.
+ */
+ unsigned int _M_version;
+
+ /** Pointer to the previous iterator in the sequence's list of
+ iterators. Only valid when _M_sequence != NULL. */
+ _Safe_iterator_base* _M_prior;
+
+ /** Pointer to the next iterator in the sequence's list of
+ iterators. Only valid when _M_sequence != NULL. */
+ _Safe_iterator_base* _M_next;
+
+ protected:
+ /** Initializes the iterator and makes it singular. */
+ _Safe_iterator_base()
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { }
+
+ /** Initialize the iterator to reference the sequence pointed to
+ * by @p__seq. @p __constant is true when we are initializing a
+ * constant iterator, and false if it is a mutable iterator. Note
+ * that @p __seq may be NULL, in which case the iterator will be
+ * singular. Otherwise, the iterator will reference @p __seq and
+ * be nonsingular.
+ */
+ _Safe_iterator_base(const _Safe_sequence_base* __seq, bool __constant)
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { this->_M_attach(const_cast<_Safe_sequence_base*>(__seq), __constant); }
+
+ /** Initializes the iterator to reference the same sequence that
+ @p __x does. @p __constant is true if this is a constant
+ iterator, and false if it is mutable. */
+ _Safe_iterator_base(const _Safe_iterator_base& __x, bool __constant)
+ : _M_sequence(0), _M_version(0), _M_prior(0), _M_next(0)
+ { this->_M_attach(__x._M_sequence, __constant); }
+
+ _Safe_iterator_base&
+ operator=(const _Safe_iterator_base&);
+
+ explicit
+ _Safe_iterator_base(const _Safe_iterator_base&);
+
+ ~_Safe_iterator_base() { this->_M_detach(); }
+
+ /** For use in _Safe_iterator. */
+ __gnu_cxx::__mutex& _M_get_mutex();
+
+ public:
+ /** Attaches this iterator to the given sequence, detaching it
+ * from whatever sequence it was attached to originally. If the
+ * new sequence is the NULL pointer, the iterator is left
+ * unattached.
+ */
+ void _M_attach(_Safe_sequence_base* __seq, bool __constant);
+
+ /** Likewise, but not thread-safe. */
+ void _M_attach_single(_Safe_sequence_base* __seq, bool __constant);
+
+ /** Detach the iterator for whatever sequence it is attached to,
+ * if any.
+ */
+ void _M_detach();
+
+ /** Likewise, but not thread-safe. */
+ void _M_detach_single();
+
+ /** Determines if we are attached to the given sequence. */
+ bool _M_attached_to(const _Safe_sequence_base* __seq) const
+ { return _M_sequence == __seq; }
+
+ /** Is this iterator singular? */
+ bool _M_singular() const;
+
+ /** Can we compare this iterator to the given iterator @p __x?
+ Returns true if both iterators are nonsingular and reference
+ the same sequence. */
+ bool _M_can_compare(const _Safe_iterator_base& __x) const;
+ };
+
+ /**
+ * @brief Base class that supports tracking of iterators that
+ * reference a sequence.
+ *
+ * The %_Safe_sequence_base class provides basic support for
+ * tracking iterators into a sequence. Sequences that track
+ * iterators must derived from %_Safe_sequence_base publicly, so
+ * that safe iterators (which inherit _Safe_iterator_base) can
+ * attach to them. This class contains two linked lists of
+ * iterators, one for constant iterators and one for mutable
+ * iterators, and a version number that allows very fast
+ * invalidation of all iterators that reference the container.
+ *
+ * This class must ensure that no operation on it may throw an
+ * exception, otherwise "safe" sequences may fail to provide the
+ * exception-safety guarantees required by the C++ standard.
+ */
+ class _Safe_sequence_base
+ {
+ public:
+ /// The list of mutable iterators that reference this container
+ _Safe_iterator_base* _M_iterators;
+
+ /// The list of constant iterators that reference this container
+ _Safe_iterator_base* _M_const_iterators;
+
+ /// The container version number. This number may never be 0.
+ mutable unsigned int _M_version;
+
+ protected:
+ // Initialize with a version number of 1 and no iterators
+ _Safe_sequence_base()
+ : _M_iterators(0), _M_const_iterators(0), _M_version(1)
+ { }
+
+ /** Notify all iterators that reference this sequence that the
+ sequence is being destroyed. */
+ ~_Safe_sequence_base()
+ { this->_M_detach_all(); }
+
+ /** Detach all iterators, leaving them singular. */
+ void
+ _M_detach_all();
+
+ /** Detach all singular iterators.
+ * @post for all iterators i attached to this sequence,
+ * i->_M_version == _M_version.
+ */
+ void
+ _M_detach_singular();
+
+ /** Revalidates all attached singular iterators. This method may
+ * be used to validate iterators that were invalidated before
+ * (but for some reason, such as an exception, need to become
+ * valid again).
+ */
+ void
+ _M_revalidate_singular();
+
+ /** Swap this sequence with the given sequence. This operation
+ * also swaps ownership of the iterators, so that when the
+ * operation is complete all iterators that originally referenced
+ * one container now reference the other container.
+ */
+ void
+ _M_swap(_Safe_sequence_base& __x);
+
+ /** For use in _Safe_sequence. */
+ __gnu_cxx::__mutex& _M_get_mutex();
+
+ public:
+ /** Invalidates all iterators. */
+ void
+ _M_invalidate_all() const
+ { if (++_M_version == 0) _M_version = 1; }
+ };
+} // namespace __gnu_debug
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.h
new file mode 100644
index 0000000..dbdb32e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.h
@@ -0,0 +1,643 @@
+// Safe iterator implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/safe_iterator.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_H
+#define _GLIBCXX_DEBUG_SAFE_ITERATOR_H 1
+
+#include <debug/debug.h>
+#include <debug/macros.h>
+#include <debug/functions.h>
+#include <debug/formatter.h>
+#include <debug/safe_base.h>
+#include <bits/stl_pair.h>
+#include <ext/type_traits.h>
+
+namespace __gnu_debug
+{
+ /** Iterators that derive from _Safe_iterator_base but that aren't
+ * _Safe_iterators can be determined singular or non-singular via
+ * _Safe_iterator_base.
+ */
+ inline bool
+ __check_singular_aux(const _Safe_iterator_base* __x)
+ { return __x->_M_singular(); }
+
+ /** \brief Safe iterator wrapper.
+ *
+ * The class template %_Safe_iterator is a wrapper around an
+ * iterator that tracks the iterator's movement among sequences and
+ * checks that operations performed on the "safe" iterator are
+ * legal. In additional to the basic iterator operations (which are
+ * validated, and then passed to the underlying iterator),
+ * %_Safe_iterator has member functions for iterator invalidation,
+ * attaching/detaching the iterator from sequences, and querying
+ * the iterator's state.
+ */
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator : public _Safe_iterator_base
+ {
+ typedef _Safe_iterator _Self;
+
+ /** The precision to which we can calculate the distance between
+ * two iterators.
+ */
+ enum _Distance_precision
+ {
+ __dp_equality, //< Can compare iterator equality, only
+ __dp_sign, //< Can determine equality and ordering
+ __dp_exact //< Can determine distance precisely
+ };
+
+ /// The underlying iterator
+ _Iterator _M_current;
+
+ /// Determine if this is a constant iterator.
+ bool
+ _M_constant() const
+ {
+ typedef typename _Sequence::const_iterator const_iterator;
+ return __is_same<const_iterator, _Safe_iterator>::value;
+ }
+
+ typedef std::iterator_traits<_Iterator> _Traits;
+
+ public:
+ typedef _Iterator _Base_iterator;
+ typedef typename _Traits::iterator_category iterator_category;
+ typedef typename _Traits::value_type value_type;
+ typedef typename _Traits::difference_type difference_type;
+ typedef typename _Traits::reference reference;
+ typedef typename _Traits::pointer pointer;
+
+ /// @post the iterator is singular and unattached
+ _Safe_iterator() : _M_current() { }
+
+ /**
+ * @brief Safe iterator construction from an unsafe iterator and
+ * its sequence.
+ *
+ * @pre @p seq is not NULL
+ * @post this is not singular
+ */
+ _Safe_iterator(const _Iterator& __i, const _Sequence* __seq)
+ : _Safe_iterator_base(__seq, _M_constant()), _M_current(__i)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! this->_M_singular(),
+ _M_message(__msg_init_singular)
+ ._M_iterator(*this, "this"));
+ }
+
+ /**
+ * @brief Copy construction.
+ * @pre @p x is not singular
+ */
+ _Safe_iterator(const _Safe_iterator& __x)
+ : _Safe_iterator_base(__x, _M_constant()), _M_current(__x._M_current)
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_init_copy_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ }
+
+ /**
+ * @brief Converting constructor from a mutable iterator to a
+ * constant iterator.
+ *
+ * @pre @p x is not singular
+ */
+ template<typename _MutableIterator>
+ _Safe_iterator(
+ const _Safe_iterator<_MutableIterator,
+ typename __gnu_cxx::__enable_if<(std::__are_same<_MutableIterator,
+ typename _Sequence::iterator::_Base_iterator>::__value),
+ _Sequence>::__type>& __x)
+ : _Safe_iterator_base(__x, _M_constant()), _M_current(__x.base())
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_init_const_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ }
+
+ /**
+ * @brief Copy assignment.
+ * @pre @p x is not singular
+ */
+ _Safe_iterator&
+ operator=(const _Safe_iterator& __x)
+ {
+ _GLIBCXX_DEBUG_VERIFY(!__x._M_singular(),
+ _M_message(__msg_copy_singular)
+ ._M_iterator(*this, "this")
+ ._M_iterator(__x, "other"));
+ _M_current = __x._M_current;
+ this->_M_attach(static_cast<_Sequence*>(__x._M_sequence));
+ return *this;
+ }
+
+ /**
+ * @brief Iterator dereference.
+ * @pre iterator is dereferenceable
+ */
+ reference
+ operator*() const
+ {
+
+ _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(),
+ _M_message(__msg_bad_deref)
+ ._M_iterator(*this, "this"));
+ return *_M_current;
+ }
+
+ /**
+ * @brief Iterator dereference.
+ * @pre iterator is dereferenceable
+ * @todo Make this correct w.r.t. iterators that return proxies
+ * @todo Use addressof() instead of & operator
+ */
+ pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_dereferenceable(),
+ _M_message(__msg_bad_deref)
+ ._M_iterator(*this, "this"));
+ return &*_M_current;
+ }
+
+ // ------ Input iterator requirements ------
+ /**
+ * @brief Iterator preincrement
+ * @pre iterator is incrementable
+ */
+ _Safe_iterator&
+ operator++()
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_incrementable(),
+ _M_message(__msg_bad_inc)
+ ._M_iterator(*this, "this"));
+ ++_M_current;
+ return *this;
+ }
+
+ /**
+ * @brief Iterator postincrement
+ * @pre iterator is incrementable
+ */
+ _Safe_iterator
+ operator++(int)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_incrementable(),
+ _M_message(__msg_bad_inc)
+ ._M_iterator(*this, "this"));
+ _Safe_iterator __tmp(*this);
+ ++_M_current;
+ return __tmp;
+ }
+
+ // ------ Bidirectional iterator requirements ------
+ /**
+ * @brief Iterator predecrement
+ * @pre iterator is decrementable
+ */
+ _Safe_iterator&
+ operator--()
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
+ _M_message(__msg_bad_dec)
+ ._M_iterator(*this, "this"));
+ --_M_current;
+ return *this;
+ }
+
+ /**
+ * @brief Iterator postdecrement
+ * @pre iterator is decrementable
+ */
+ _Safe_iterator
+ operator--(int)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_decrementable(),
+ _M_message(__msg_bad_dec)
+ ._M_iterator(*this, "this"));
+ _Safe_iterator __tmp(*this);
+ --_M_current;
+ return __tmp;
+ }
+
+ // ------ Random access iterator requirements ------
+ reference
+ operator[](const difference_type& __n) const
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n)
+ && this->_M_can_advance(__n+1),
+ _M_message(__msg_iter_subscript_oob)
+ ._M_iterator(*this)._M_integer(__n));
+
+ return _M_current[__n];
+ }
+
+ _Safe_iterator&
+ operator+=(const difference_type& __n)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(__n),
+ _M_message(__msg_advance_oob)
+ ._M_iterator(*this)._M_integer(__n));
+ _M_current += __n;
+ return *this;
+ }
+
+ _Safe_iterator
+ operator+(const difference_type& __n) const
+ {
+ _Safe_iterator __tmp(*this);
+ __tmp += __n;
+ return __tmp;
+ }
+
+ _Safe_iterator&
+ operator-=(const difference_type& __n)
+ {
+ _GLIBCXX_DEBUG_VERIFY(this->_M_can_advance(-__n),
+ _M_message(__msg_retreat_oob)
+ ._M_iterator(*this)._M_integer(__n));
+ _M_current += -__n;
+ return *this;
+ }
+
+ _Safe_iterator
+ operator-(const difference_type& __n) const
+ {
+ _Safe_iterator __tmp(*this);
+ __tmp -= __n;
+ return __tmp;
+ }
+
+ // ------ Utilities ------
+ /**
+ * @brief Return the underlying iterator
+ */
+ _Iterator
+ base() const { return _M_current; }
+
+ /**
+ * @brief Conversion to underlying non-debug iterator to allow
+ * better interaction with non-debug containers.
+ */
+ operator _Iterator() const { return _M_current; }
+
+ /** Attach iterator to the given sequence. */
+ void
+ _M_attach(const _Sequence* __seq)
+ {
+ _Safe_iterator_base::_M_attach(const_cast<_Sequence*>(__seq),
+ _M_constant());
+ }
+
+ /** Likewise, but not thread-safe. */
+ void
+ _M_attach_single(const _Sequence* __seq)
+ {
+ _Safe_iterator_base::_M_attach_single(const_cast<_Sequence*>(__seq),
+ _M_constant());
+ }
+
+ /** Invalidate the iterator, making it singular. */
+ void
+ _M_invalidate();
+
+ /** Likewise, but not thread-safe. */
+ void
+ _M_invalidate_single();
+
+ /// Is the iterator dereferenceable?
+ bool
+ _M_dereferenceable() const
+ { return !this->_M_singular() && !_M_is_end(); }
+
+ /// Is the iterator incrementable?
+ bool
+ _M_incrementable() const { return this->_M_dereferenceable(); }
+
+ // Is the iterator decrementable?
+ bool
+ _M_decrementable() const { return !_M_singular() && !_M_is_begin(); }
+
+ // Can we advance the iterator @p __n steps (@p __n may be negative)
+ bool
+ _M_can_advance(const difference_type& __n) const;
+
+ // Is the iterator range [*this, __rhs) valid?
+ template<typename _Other>
+ bool
+ _M_valid_range(const _Safe_iterator<_Other, _Sequence>& __rhs) const;
+
+ // The sequence this iterator references.
+ const _Sequence*
+ _M_get_sequence() const
+ { return static_cast<const _Sequence*>(_M_sequence); }
+
+ /** Determine the distance between two iterators with some known
+ * precision.
+ */
+ template<typename _Iterator1, typename _Iterator2>
+ static std::pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs)
+ {
+ typedef typename std::iterator_traits<_Iterator1>::iterator_category
+ _Category;
+ return _M_get_distance(__lhs, __rhs, _Category());
+ }
+
+ template<typename _Iterator1, typename _Iterator2>
+ static std::pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs,
+ std::random_access_iterator_tag)
+ {
+ return std::make_pair(__rhs.base() - __lhs.base(), __dp_exact);
+ }
+
+ template<typename _Iterator1, typename _Iterator2>
+ static std::pair<difference_type, _Distance_precision>
+ _M_get_distance(const _Iterator1& __lhs, const _Iterator2& __rhs,
+ std::forward_iterator_tag)
+ {
+ return std::make_pair(__lhs.base() == __rhs.base()? 0 : 1,
+ __dp_equality);
+ }
+
+ /// Is this iterator equal to the sequence's begin() iterator?
+ bool _M_is_begin() const
+ { return *this == static_cast<const _Sequence*>(_M_sequence)->begin(); }
+
+ /// Is this iterator equal to the sequence's end() iterator?
+ bool _M_is_end() const
+ { return *this == static_cast<const _Sequence*>(_M_sequence)->end(); }
+ };
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator==(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() == __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator==(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() == __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator!=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() != __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator!=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_compare_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_compare_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() != __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator<(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() < __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator<(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() < __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator<=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() <= __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator<=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() <= __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator>(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() > __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator>(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() > __rhs.base();
+ }
+
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline bool
+ operator>=(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() >= __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline bool
+ operator>=(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_iter_order_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_order_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() >= __rhs.base();
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // According to the resolution of DR179 not only the various comparison
+ // operators but also operator- must accept mixed iterator/const_iterator
+ // parameters.
+ template<typename _IteratorL, typename _IteratorR, typename _Sequence>
+ inline typename _Safe_iterator<_IteratorL, _Sequence>::difference_type
+ operator-(const _Safe_iterator<_IteratorL, _Sequence>& __lhs,
+ const _Safe_iterator<_IteratorR, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_distance_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_distance_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() - __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline typename _Safe_iterator<_Iterator, _Sequence>::difference_type
+ operator-(const _Safe_iterator<_Iterator, _Sequence>& __lhs,
+ const _Safe_iterator<_Iterator, _Sequence>& __rhs)
+ {
+ _GLIBCXX_DEBUG_VERIFY(! __lhs._M_singular() && ! __rhs._M_singular(),
+ _M_message(__msg_distance_bad)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ _GLIBCXX_DEBUG_VERIFY(__lhs._M_can_compare(__rhs),
+ _M_message(__msg_distance_different)
+ ._M_iterator(__lhs, "lhs")
+ ._M_iterator(__rhs, "rhs"));
+ return __lhs.base() - __rhs.base();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ inline _Safe_iterator<_Iterator, _Sequence>
+ operator+(typename _Safe_iterator<_Iterator,_Sequence>::difference_type __n,
+ const _Safe_iterator<_Iterator, _Sequence>& __i)
+ { return __i + __n; }
+} // namespace __gnu_debug
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <debug/safe_iterator.tcc>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.tcc
new file mode 100644
index 0000000..d4f2aee
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_iterator.tcc
@@ -0,0 +1,143 @@
+// Debugging iterator implementation (out of line) -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/safe_iterator.tcc
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC
+#define _GLIBCXX_DEBUG_SAFE_ITERATOR_TCC 1
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ bool
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_can_advance(const difference_type& __n) const
+ {
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ if (this->_M_singular())
+ return false;
+ if (__n == 0)
+ return true;
+ if (__n < 0)
+ {
+ const_iterator __begin =
+ static_cast<const _Sequence*>(_M_sequence)->begin();
+ std::pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(__begin, *this);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
+ return __ok;
+ }
+ else
+ {
+ const_iterator __end =
+ static_cast<const _Sequence*>(_M_sequence)->end();
+ std::pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(*this, __end);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
+ return __ok;
+ }
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ template<typename _Other>
+ bool
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_valid_range(const _Safe_iterator<_Other, _Sequence>& __rhs) const
+ {
+ if (!_M_can_compare(__rhs))
+ return false;
+
+ /* Determine if we can order the iterators without the help of
+ the container */
+ std::pair<difference_type, _Distance_precision> __dist =
+ this->_M_get_distance(*this, __rhs);
+ switch (__dist.second) {
+ case __dp_equality:
+ if (__dist.first == 0)
+ return true;
+ break;
+
+ case __dp_sign:
+ case __dp_exact:
+ return __dist.first >= 0;
+ }
+
+ /* We can only test for equality, but check if one of the
+ iterators is at an extreme. */
+ if (_M_is_begin() || __rhs._M_is_end())
+ return true;
+ else if (_M_is_end() || __rhs._M_is_begin())
+ return false;
+
+ // Assume that this is a valid range; we can't check anything else
+ return true;
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ void
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_invalidate()
+ {
+ __gnu_cxx::__scoped_lock sentry(this->_M_get_mutex());
+ _M_invalidate_single();
+ }
+
+ template<typename _Iterator, typename _Sequence>
+ void
+ _Safe_iterator<_Iterator, _Sequence>::
+ _M_invalidate_single()
+ {
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ if (!this->_M_singular())
+ {
+ for (_Safe_iterator_base* __iter = _M_sequence->_M_iterators;
+ __iter; __iter = __iter->_M_next)
+ {
+ iterator* __victim = static_cast<iterator*>(__iter);
+ if (this->base() == __victim->base())
+ __victim->_M_version = 0;
+ }
+
+ for (_Safe_iterator_base* __iter2 = _M_sequence->_M_const_iterators;
+ __iter2; __iter2 = __iter2->_M_next)
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(__iter2);
+ if (__victim->base() == this->base())
+ __victim->_M_version = 0;
+ }
+ _M_version = 0;
+ }
+ }
+} // namespace __gnu_debug
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_sequence.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_sequence.h
new file mode 100644
index 0000000..bbeac1d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/safe_sequence.h
@@ -0,0 +1,183 @@
+// Safe sequence implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/safe_sequence.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SAFE_SEQUENCE_H
+#define _GLIBCXX_DEBUG_SAFE_SEQUENCE_H 1
+
+#include <debug/debug.h>
+#include <debug/macros.h>
+#include <debug/functions.h>
+#include <debug/safe_base.h>
+
+namespace __gnu_debug
+{
+ template<typename _Iterator, typename _Sequence>
+ class _Safe_iterator;
+
+ /** A simple function object that returns true if the passed-in
+ * value is not equal to the stored value. It saves typing over
+ * using both bind1st and not_equal.
+ */
+ template<typename _Type>
+ class _Not_equal_to
+ {
+ _Type __value;
+
+ public:
+ explicit _Not_equal_to(const _Type& __v) : __value(__v) { }
+
+ bool
+ operator()(const _Type& __x) const
+ { return __value != __x; }
+ };
+
+ /** A function object that returns true when the given random access
+ iterator is at least @c n steps away from the given iterator. */
+ template<typename _Iterator>
+ class _After_nth_from
+ {
+ typedef typename std::iterator_traits<_Iterator>::difference_type
+ difference_type;
+
+ _Iterator _M_base;
+ difference_type _M_n;
+
+ public:
+ _After_nth_from(const difference_type& __n, const _Iterator& __base)
+ : _M_base(__base), _M_n(__n) { }
+
+ bool
+ operator()(const _Iterator& __x) const
+ { return __x - _M_base >= _M_n; }
+ };
+
+ /**
+ * @brief Base class for constructing a "safe" sequence type that
+ * tracks iterators that reference it.
+ *
+ * The class template %_Safe_sequence simplifies the construction of
+ * "safe" sequences that track the iterators that reference the
+ * sequence, so that the iterators are notified of changes in the
+ * sequence that may affect their operation, e.g., if the container
+ * invalidates its iterators or is destructed. This class template
+ * may only be used by deriving from it and passing the name of the
+ * derived class as its template parameter via the curiously
+ * recurring template pattern. The derived class must have @c
+ * iterator and @const_iterator types that are instantiations of
+ * class template _Safe_iterator for this sequence. Iterators will
+ * then be tracked automatically.
+ */
+ template<typename _Sequence>
+ class _Safe_sequence : public _Safe_sequence_base
+ {
+ public:
+ /** Invalidates all iterators @c x that reference this sequence,
+ are not singular, and for which @c pred(x) returns @c
+ true. The user of this routine should be careful not to make
+ copies of the iterators passed to @p pred, as the copies may
+ interfere with the invalidation. */
+ template<typename _Predicate>
+ void
+ _M_invalidate_if(_Predicate __pred);
+
+ /** Transfers all iterators that reference this memory location
+ to this sequence from whatever sequence they are attached
+ to. */
+ template<typename _Iterator>
+ void
+ _M_transfer_iter(const _Safe_iterator<_Iterator, _Sequence>& __x);
+ };
+
+ template<typename _Sequence>
+ template<typename _Predicate>
+ void
+ _Safe_sequence<_Sequence>::
+ _M_invalidate_if(_Predicate __pred)
+ {
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ __gnu_cxx::__scoped_lock sentry(this->_M_get_mutex());
+ for (_Safe_iterator_base* __iter = _M_iterators; __iter;)
+ {
+ iterator* __victim = static_cast<iterator*>(__iter);
+ __iter = __iter->_M_next;
+ if (!__victim->_M_singular())
+ {
+ if (__pred(__victim->base()))
+ __victim->_M_invalidate_single();
+ }
+ }
+
+ for (_Safe_iterator_base* __iter2 = _M_const_iterators; __iter2;)
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(__iter2);
+ __iter2 = __iter2->_M_next;
+ if (!__victim->_M_singular())
+ {
+ if (__pred(__victim->base()))
+ __victim->_M_invalidate_single();
+ }
+ }
+ }
+
+ template<typename _Sequence>
+ template<typename _Iterator>
+ void
+ _Safe_sequence<_Sequence>::
+ _M_transfer_iter(const _Safe_iterator<_Iterator, _Sequence>& __x)
+ {
+ _Safe_sequence_base* __from = __x._M_sequence;
+ if (!__from)
+ return;
+
+ typedef typename _Sequence::iterator iterator;
+ typedef typename _Sequence::const_iterator const_iterator;
+
+ __gnu_cxx::__scoped_lock sentry(this->_M_get_mutex());
+ for (_Safe_iterator_base* __iter = __from->_M_iterators; __iter;)
+ {
+ iterator* __victim = static_cast<iterator*>(__iter);
+ __iter = __iter->_M_next;
+ if (!__victim->_M_singular() && __victim->base() == __x.base())
+ __victim->_M_attach_single(static_cast<_Sequence*>(this));
+ }
+
+ for (_Safe_iterator_base* __iter2 = __from->_M_const_iterators;
+ __iter2;)
+ {
+ const_iterator* __victim = static_cast<const_iterator*>(__iter2);
+ __iter2 = __iter2->_M_next;
+ if (!__victim->_M_singular() && __victim->base() == __x.base())
+ __victim->_M_attach_single(static_cast<_Sequence*>(this));
+ }
+ }
+} // namespace __gnu_debug
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/set b/6/sources/cxx-stl/gnu-libstdc++/include/debug/set
new file mode 100644
index 0000000..34f3ea5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/set
@@ -0,0 +1,37 @@
+// Debugging set/multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/set
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SET
+#define _GLIBCXX_DEBUG_SET 1
+
+#include <set>
+#include <debug/set.h>
+#include <debug/multiset.h>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/set.h b/6/sources/cxx-stl/gnu-libstdc++/include/debug/set.h
new file mode 100644
index 0000000..a025b3d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/set.h
@@ -0,0 +1,401 @@
+// Debugging set implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/set.h
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_SET_H
+#define _GLIBCXX_DEBUG_SET_H 1
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <utility>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Compare = std::less<_Key>,
+ typename _Allocator = std::allocator<_Key> >
+ class set
+ : public _GLIBCXX_STD_D::set<_Key,_Compare,_Allocator>,
+ public __gnu_debug::_Safe_sequence<set<_Key, _Compare, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::set<_Key, _Compare, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<set> _Safe_base;
+
+ public:
+ // types:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, set>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator, set>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.3.3.1 construct/copy/destroy:
+ explicit set(const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__comp, __a) { }
+
+ template<typename _InputIterator>
+ set(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp = _Compare(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last), __last,
+ __comp, __a) { }
+
+ set(const set& __x)
+ : _Base(__x), _Safe_base() { }
+
+ set(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set(set&& __x)
+ : _Base(std::forward<set>(__x)), _Safe_base()
+ { this->_M_swap(__x); }
+
+ set(initializer_list<value_type> __l,
+ const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __comp, __a), _Safe_base() { }
+#endif
+
+ ~set() { }
+
+ set&
+ operator=(const set& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ set&
+ operator=(set&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // capacity:
+ using _Base::empty;
+ using _Base::size;
+ using _Base::max_size;
+
+ // modifiers:
+ std::pair<iterator, bool>
+ insert(const value_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, bool> __res = _Base::insert(__x);
+ return std::pair<iterator, bool>(iterator(__res.first, this),
+ __res.second);
+ }
+
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
+ __glibcxx_check_insert(__position);
+ return iterator(_Base::insert(__position.base(), __x), this);
+ }
+
+ template <typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+#endif
+
+ void
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ __position._M_invalidate();
+ _Base::erase(__position.base());
+ }
+
+ size_type
+ erase(const key_type& __x)
+ {
+ iterator __victim = find(__x);
+ if (__victim == end())
+ return 0;
+ else
+ {
+ __victim._M_invalidate();
+ _Base::erase(__victim.base());
+ return 1;
+ }
+ }
+
+ void
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+
+ while (__first != __last)
+ this->erase(__first++);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(set&& __x)
+#else
+ swap(set& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ }
+
+ void
+ clear()
+ { this->erase(begin(), end()); }
+
+ // observers:
+ using _Base::key_comp;
+ using _Base::value_comp;
+
+ // set operations:
+ iterator
+ find(const key_type& __x)
+ { return iterator(_Base::find(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ find(const key_type& __x) const
+ { return const_iterator(_Base::find(__x), this); }
+
+ using _Base::count;
+
+ iterator
+ lower_bound(const key_type& __x)
+ { return iterator(_Base::lower_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ lower_bound(const key_type& __x) const
+ { return const_iterator(_Base::lower_bound(__x), this); }
+
+ iterator
+ upper_bound(const key_type& __x)
+ { return iterator(_Base::upper_bound(__x), this); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ const_iterator
+ upper_bound(const key_type& __x) const
+ { return const_iterator(_Base::upper_bound(__x), this); }
+
+ std::pair<iterator,iterator>
+ equal_range(const key_type& __x)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 214. set::find() missing const overload
+ std::pair<const_iterator,const_iterator>
+ equal_range(const key_type& __x) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ std::pair<_Base_iterator, _Base_iterator> __res =
+ _Base::equal_range(__x);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator==(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator!=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator<=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>=(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ inline bool
+ operator>(const set<_Key, _Compare, _Allocator>& __lhs,
+ const set<_Key, _Compare, _Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>& __x,
+ set<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>&& __x,
+ set<_Key, _Compare, _Allocator>& __y)
+ { return __x.swap(__y); }
+
+ template<typename _Key, typename _Compare, typename _Allocator>
+ void
+ swap(set<_Key, _Compare, _Allocator>& __x,
+ set<_Key, _Compare, _Allocator>&& __y)
+ { return __x.swap(__y); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/string b/6/sources/cxx-stl/gnu-libstdc++/include/debug/string
new file mode 100644
index 0000000..d88989a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/string
@@ -0,0 +1,1074 @@
+// Debugging string implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/string
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_STRING
+#define _GLIBCXX_DEBUG_STRING 1
+
+#include <string>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace __gnu_debug
+{
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
+ typename _Allocator = std::allocator<_CharT> >
+ class basic_string
+ : public std::basic_string<_CharT, _Traits, _Allocator>,
+ public __gnu_debug::_Safe_sequence<basic_string<_CharT, _Traits,
+ _Allocator> >
+ {
+ typedef std::basic_string<_CharT, _Traits, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<basic_string> _Safe_base;
+
+ public:
+ // types:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator, basic_string>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ basic_string> const_iterator;
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ using _Base::npos;
+
+ // 21.3.1 construct/copy/destroy:
+ explicit basic_string(const _Allocator& __a = _Allocator())
+ : _Base(__a)
+ { }
+
+ // Provides conversion from a release-mode string to a debug-mode string
+ basic_string(const _Base& __base) : _Base(__base), _Safe_base() { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 42. string ctors specify wrong default allocator
+ basic_string(const basic_string& __str)
+ : _Base(__str, 0, _Base::npos, __str.get_allocator()), _Safe_base()
+ { }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 42. string ctors specify wrong default allocator
+ basic_string(const basic_string& __str, size_type __pos,
+ size_type __n = _Base::npos,
+ const _Allocator& __a = _Allocator())
+ : _Base(__str, __pos, __n, __a)
+ { }
+
+ basic_string(const _CharT* __s, size_type __n,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_string(__s, __n), __n, __a)
+ { }
+
+ basic_string(const _CharT* __s, const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_string(__s), __a)
+ { this->assign(__s); }
+
+ basic_string(size_type __n, _CharT __c,
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __c, __a)
+ { }
+
+ template<typename _InputIterator>
+ basic_string(_InputIterator __begin, _InputIterator __end,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__begin, __end), __end, __a)
+ { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
+ : _Base(__l, __a)
+ { }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ ~basic_string() { }
+
+ basic_string&
+ operator=(const basic_string& __str)
+ {
+ *static_cast<_Base*>(this) = __str;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator=(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ *static_cast<_Base*>(this) = __s;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator=(_CharT __c)
+ {
+ *static_cast<_Base*>(this) = __c;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ basic_string&
+ operator=(initializer_list<_CharT> __l)
+ {
+ *static_cast<_Base*>(this) = __l;
+ this->_M_invalidate_all();
+ return *this;
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ // 21.3.2 iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ // 21.3.3 capacity:
+ using _Base::size;
+ using _Base::length;
+ using _Base::max_size;
+
+ void
+ resize(size_type __n, _CharT __c)
+ {
+ _Base::resize(__n, __c);
+ this->_M_invalidate_all();
+ }
+
+ void
+ resize(size_type __n)
+ { this->resize(__n, _CharT()); }
+
+ using _Base::capacity;
+ using _Base::reserve;
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ using _Base::empty;
+
+ // 21.3.4 element access:
+ const_reference
+ operator[](size_type __pos) const
+ {
+ _GLIBCXX_DEBUG_VERIFY(__pos <= this->size(),
+ _M_message(__gnu_debug::__msg_subscript_oob)
+ ._M_sequence(*this, "this")
+ ._M_integer(__pos, "__pos")
+ ._M_integer(this->size(), "size"));
+ return _M_base()[__pos];
+ }
+
+ reference
+ operator[](size_type __pos)
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ __glibcxx_check_subscript(__pos);
+#else
+ // as an extension v3 allows s[s.size()] when s is non-const.
+ _GLIBCXX_DEBUG_VERIFY(__pos <= this->size(),
+ _M_message(__gnu_debug::__msg_subscript_oob)
+ ._M_sequence(*this, "this")
+ ._M_integer(__pos, "__pos")
+ ._M_integer(this->size(), "size"));
+#endif
+ return _M_base()[__pos];
+ }
+
+ using _Base::at;
+
+ // 21.3.5 modifiers:
+ basic_string&
+ operator+=(const basic_string& __str)
+ {
+ _M_base() += __str;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator+=(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _M_base() += __s;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ operator+=(_CharT __c)
+ {
+ _M_base() += __c;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ basic_string&
+ operator+=(initializer_list<_CharT> __l)
+ {
+ _M_base() += __l;
+ this->_M_invalidate_all();
+ return *this;
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ basic_string&
+ append(const basic_string& __str)
+ {
+ _Base::append(__str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const basic_string& __str, size_type __pos, size_type __n)
+ {
+ _Base::append(__str, __pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string_len(__s, __n);
+ _Base::append(__s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::append(__s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ append(size_type __n, _CharT __c)
+ {
+ _Base::append(__n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ append(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::append(__first, __last);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 7. string clause minor problems
+ void
+ push_back(_CharT __c)
+ {
+ _Base::push_back(__c);
+ this->_M_invalidate_all();
+ }
+
+ basic_string&
+ assign(const basic_string& __x)
+ {
+ _Base::assign(__x);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const basic_string& __str, size_type __pos, size_type __n)
+ {
+ _Base::assign(__str, __pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string_len(__s, __n);
+ _Base::assign(__s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::assign(__s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ assign(size_type __n, _CharT __c)
+ {
+ _Base::assign(__n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ basic_string&
+ assign(initializer_list<_CharT> __l)
+ {
+ _Base::assign(__l);
+ this->_M_invalidate_all();
+ return *this;
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str)
+ {
+ _Base::insert(__pos1, __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos1, const basic_string& __str,
+ size_type __pos2, size_type __n)
+ {
+ _Base::insert(__pos1, __str, __pos2, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_string(__s);
+ _Base::insert(__pos, __s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::insert(__pos, __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ insert(size_type __pos, size_type __n, _CharT __c)
+ {
+ _Base::insert(__pos, __n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ iterator
+ insert(iterator __p, _CharT __c)
+ {
+ __glibcxx_check_insert(__p);
+ typename _Base::iterator __res = _Base::insert(__p.base(), __c);
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ void
+ insert(iterator __p, size_type __n, _CharT __c)
+ {
+ __glibcxx_check_insert(__p);
+ _Base::insert(__p.base(), __n, __c);
+ this->_M_invalidate_all();
+ }
+
+ template<typename _InputIterator>
+ void
+ insert(iterator __p, _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__p, __first, __last);
+ _Base::insert(__p.base(), __first, __last);
+ this->_M_invalidate_all();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ insert(iterator __p, initializer_list<_CharT> __l)
+ {
+ _Base::insert(__p, __l);
+ this->_M_invalidate_all();
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ basic_string&
+ erase(size_type __pos = 0, size_type __n = _Base::npos)
+ {
+ _Base::erase(__pos, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_all();
+ return iterator(__res, this);
+ }
+
+ basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str)
+ {
+ _Base::replace(__pos1, __n1, __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2)
+ {
+ _Base::replace(__pos1, __n1, __str, __pos2, __n2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ __glibcxx_check_string_len(__s, __n2);
+ _Base::replace(__pos, __n1, __s, __n2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {
+ __glibcxx_check_string(__s);
+ _Base::replace(__pos, __n1, __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+ {
+ _Base::replace(__pos, __n1, __n2, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const basic_string& __str)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ _Base::replace(__i1.base(), __i2.base(), __str);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_string_len(__s, __n);
+ _Base::replace(__i1.base(), __i2.base(), __s, __n);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_string(__s);
+ _Base::replace(__i1.base(), __i2.base(), __s);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ basic_string&
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ _Base::replace(__i1.base(), __i2.base(), __n, __c);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ template<typename _InputIterator>
+ basic_string&
+ replace(iterator __i1, iterator __i2,
+ _InputIterator __j1, _InputIterator __j2)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ __glibcxx_check_valid_range(__j1, __j2);
+ _Base::replace(__i1.base(), __i2.base(), __j1, __j2);
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ basic_string& replace(iterator __i1, iterator __i2,
+ initializer_list<_CharT> __l)
+ {
+ __glibcxx_check_erase_range(__i1, __i2);
+ _Base::replace(__i1.base(), __i2.base(), __l);
+ this->_M_invalidate_all();
+ return *this;
+ }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ size_type
+ copy(_CharT* __s, size_type __n, size_type __pos = 0) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::copy(__s, __n, __pos);
+ }
+
+ void
+ swap(basic_string<_CharT,_Traits,_Allocator>& __x)
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ this->_M_invalidate_all();
+ __x._M_invalidate_all();
+ }
+
+ // 21.3.6 string operations:
+ const _CharT*
+ c_str() const
+ {
+ const _CharT* __res = _Base::c_str();
+ this->_M_invalidate_all();
+ return __res;
+ }
+
+ const _CharT*
+ data() const
+ {
+ const _CharT* __res = _Base::data();
+ this->_M_invalidate_all();
+ return __res;
+ }
+
+ using _Base::get_allocator;
+
+ size_type
+ find(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find(__str, __pos); }
+
+ size_type
+ find(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find(__s, __pos, __n);
+ }
+
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find(__s, __pos);
+ }
+
+ size_type
+ find(_CharT __c, size_type __pos = 0) const
+ { return _Base::find(__c, __pos); }
+
+ size_type
+ rfind(const basic_string& __str, size_type __pos = _Base::npos) const
+ { return _Base::rfind(__str, __pos); }
+
+ size_type
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::rfind(__s, __pos, __n);
+ }
+
+ size_type
+ rfind(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::rfind(__s, __pos);
+ }
+
+ size_type
+ rfind(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::rfind(__c, __pos); }
+
+ size_type
+ find_first_of(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find_first_of(__str, __pos); }
+
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_of(__s, __pos);
+ }
+
+ size_type
+ find_first_of(_CharT __c, size_type __pos = 0) const
+ { return _Base::find_first_of(__c, __pos); }
+
+ size_type
+ find_last_of(const basic_string& __str,
+ size_type __pos = _Base::npos) const
+ { return _Base::find_last_of(__str, __pos); }
+
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_of(__s, __pos);
+ }
+
+ size_type
+ find_last_of(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::find_last_of(__c, __pos); }
+
+ size_type
+ find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+ { return _Base::find_first_not_of(__str, __pos); }
+
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string_len(__s, __n);
+ return _Base::find_first_not_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_first_not_of(__s, __pos);
+ }
+
+ size_type
+ find_first_not_of(_CharT __c, size_type __pos = 0) const
+ { return _Base::find_first_not_of(__c, __pos); }
+
+ size_type
+ find_last_not_of(const basic_string& __str,
+ size_type __pos = _Base::npos) const
+ { return _Base::find_last_not_of(__str, __pos); }
+
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_not_of(__s, __pos, __n);
+ }
+
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos = _Base::npos) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::find_last_not_of(__s, __pos);
+ }
+
+ size_type
+ find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const
+ { return _Base::find_last_not_of(__c, __pos); }
+
+ basic_string
+ substr(size_type __pos = 0, size_type __n = _Base::npos) const
+ { return basic_string(_Base::substr(__pos, __n)); }
+
+ int
+ compare(const basic_string& __str) const
+ { return _Base::compare(__str); }
+
+ int
+ compare(size_type __pos1, size_type __n1,
+ const basic_string& __str) const
+ { return _Base::compare(__pos1, __n1, __str); }
+
+ int
+ compare(size_type __pos1, size_type __n1, const basic_string& __str,
+ size_type __pos2, size_type __n2) const
+ { return _Base::compare(__pos1, __n1, __str, __pos2, __n2); }
+
+ int
+ compare(const _CharT* __s) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::compare(__s);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5. string::compare specification questionable
+ int
+ compare(size_type __pos1, size_type __n1, const _CharT* __s) const
+ {
+ __glibcxx_check_string(__s);
+ return _Base::compare(__pos1, __n1, __s);
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5. string::compare specification questionable
+ int
+ compare(size_type __pos1, size_type __n1,const _CharT* __s,
+ size_type __n2) const
+ {
+ __glibcxx_check_string_len(__s, __n2);
+ return _Base::compare(__pos1, __n1, __s, __n2);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ using _Safe_base::_M_invalidate_all;
+ };
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(_CharT __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(1, __lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline basic_string<_CharT,_Traits,_Allocator>
+ operator+(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ _CharT __rhs)
+ { return basic_string<_CharT,_Traits,_Allocator>(__lhs) += __rhs; }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs == __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() == __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs != __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() != __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs < __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() < __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs <= __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator<=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() <= __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs >= __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() >= __rhs;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const _CharT* __lhs,
+ const basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ {
+ __glibcxx_check_string(__lhs);
+ return __lhs > __rhs._M_base();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline bool
+ operator>(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_check_string(__rhs);
+ return __lhs._M_base() > __rhs;
+ }
+
+ // 21.3.7.8:
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ inline void
+ swap(basic_string<_CharT,_Traits,_Allocator>& __lhs,
+ basic_string<_CharT,_Traits,_Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const basic_string<_CharT, _Traits, _Allocator>& __str)
+ { return __os << __str._M_base(); }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ operator>>(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = __is >> __str._M_base();
+ __str._M_invalidate_all();
+ return __res;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ getline(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str, _CharT __delim)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = getline(__is,
+ __str._M_base(),
+ __delim);
+ __str._M_invalidate_all();
+ return __res;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Allocator>
+ std::basic_istream<_CharT,_Traits>&
+ getline(std::basic_istream<_CharT,_Traits>& __is,
+ basic_string<_CharT,_Traits,_Allocator>& __str)
+ {
+ std::basic_istream<_CharT,_Traits>& __res = getline(__is,
+ __str._M_base());
+ __str._M_invalidate_all();
+ return __res;
+ }
+
+ typedef basic_string<char> string;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef basic_string<wchar_t> wstring;
+#endif
+
+} // namespace __gnu_debug
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_map b/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_map
new file mode 100644
index 0000000..fd7c31e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_map
@@ -0,0 +1,608 @@
+// Debugging unordered_map/unordered_multimap implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/unordered_map
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_MAP
+#define _GLIBCXX_DEBUG_UNORDERED_MAP 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_map>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <initializer_list>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Key, typename _Tp,
+ typename _Hash = std::hash<_Key>,
+ typename _Pred = std::equal_to<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class unordered_map
+ : public _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_map<_Key, _Tp, _Hash,
+ _Pred, _Alloc> >
+ {
+ typedef _GLIBCXX_STD_D::unordered_map<_Key, _Tp, _Hash,
+ _Pred, _Alloc> _Base;
+ typedef __gnu_debug::_Safe_sequence<unordered_map> _Safe_base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_map> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_map> const_iterator;
+
+ explicit
+ unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_map(const unordered_map& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_map(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_map(unordered_map&& __x)
+ : _Base(std::forward<unordered_map>(__x)), _Safe_base() { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
+
+ unordered_map&
+ operator=(const unordered_map& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ unordered_map&
+ operator=(unordered_map&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ unordered_map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ void
+ swap(unordered_map&& __x)
+ {
+ _Base::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return iterator(__res.first, this);
+ }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return const_iterator(__res.first, this);
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+
+ template<typename _Key, typename _Tp,
+ typename _Hash = std::hash<_Key>,
+ typename _Pred = std::equal_to<_Key>,
+ typename _Alloc = std::allocator<_Key> >
+ class unordered_multimap
+ : public _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc> >
+ {
+ typedef _GLIBCXX_STD_D::unordered_multimap<_Key, _Tp, _Hash,
+ _Pred, _Alloc> _Base;
+ typedef __gnu_debug::_Safe_sequence<unordered_multimap> _Safe_base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_multimap> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_multimap> const_iterator;
+
+ explicit
+ unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multimap(const unordered_multimap& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multimap(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multimap(unordered_multimap&& __x)
+ : _Base(std::forward<unordered_multimap>(__x)), _Safe_base() { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multimap&
+ operator=(const unordered_multimap& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ unordered_multimap&
+ operator=(unordered_multimap&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ unordered_multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ void
+ swap(unordered_multimap&& __x)
+ {
+ _Base::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ { return const_iterator(_Base::insert(__obj), this); }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Key, typename _Tp, typename _Hash,
+ typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_set b/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_set
new file mode 100644
index 0000000..d340442
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/unordered_set
@@ -0,0 +1,601 @@
+// Debugging unordered_set/unordered_multiset implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/unordered_set
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_UNORDERED_SET
+#define _GLIBCXX_DEBUG_UNORDERED_SET 1
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <unordered_set>
+#else
+# include <c++0x_warning.h>
+#endif
+
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+#include <initializer_list>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Value,
+ typename _Hash = std::hash<_Value>,
+ typename _Pred = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class unordered_set
+ : public _GLIBCXX_STD_D::unordered_set<_Value, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_set<_Value, _Hash,
+ _Pred, _Alloc> >
+ {
+ typedef _GLIBCXX_STD_D::unordered_set<_Value, _Hash,
+ _Pred, _Alloc> _Base;
+ typedef __gnu_debug::_Safe_sequence<unordered_set> _Safe_base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_set> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_set> const_iterator;
+
+ explicit
+ unordered_set(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_set(const unordered_set& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_set(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_set(unordered_set&& __x)
+ : _Base(std::forward<unordered_set>(__x)), _Safe_base() { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
+
+ unordered_set&
+ operator=(const unordered_set& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ unordered_set&
+ operator=(unordered_set&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ unordered_set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ void
+ swap(unordered_set&& __x)
+ {
+ _Base::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ std::pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return std::make_pair(iterator(__res.first, this), __res.second);
+ }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return iterator(__res.first, this);
+ }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ {
+ typedef std::pair<typename _Base::iterator, bool> __pair_type;
+ __pair_type __res = _Base::insert(__obj);
+ return const_iterator(__res.first, this);
+ }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+
+ template<typename _Value,
+ typename _Hash = std::hash<_Value>,
+ typename _Pred = std::equal_to<_Value>,
+ typename _Alloc = std::allocator<_Value> >
+ class unordered_multiset
+ : public _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash, _Pred, _Alloc>,
+ public __gnu_debug::_Safe_sequence<unordered_multiset<_Value, _Hash,
+ _Pred, _Alloc> >
+ {
+ typedef _GLIBCXX_STD_D::unordered_multiset<_Value, _Hash,
+ _Pred, _Alloc> _Base;
+ typedef __gnu_debug::_Safe_sequence<unordered_multiset> _Safe_base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef typename _Base::key_type key_type;
+ typedef typename _Base::value_type value_type;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,
+ unordered_multiset> iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,
+ unordered_multiset> const_iterator;
+
+ explicit
+ unordered_multiset(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a) { }
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__gnu_debug::__check_valid_range(__f, __l), __l, __n,
+ __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multiset(const unordered_multiset& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multiset(const _Base& __x)
+ : _Base(__x), _Safe_base() { }
+
+ unordered_multiset(unordered_multiset&& __x)
+ : _Base(std::forward<unordered_multiset>(__x)), _Safe_base() { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { }
+
+ unordered_multiset&
+ operator=(const unordered_multiset& __x)
+ {
+ *static_cast<_Base*>(this) = __x;
+ this->_M_invalidate_all();
+ return *this;
+ }
+
+ unordered_multiset&
+ operator=(unordered_multiset&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ unordered_multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l);
+ return *this;
+ }
+
+ void
+ swap(unordered_multiset&& __x)
+ {
+ _Base::swap(__x);
+ _Safe_base::_M_swap(__x);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ }
+
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ // local versions
+ using _Base::begin;
+ using _Base::end;
+ using _Base::cbegin;
+ using _Base::cend;
+
+ iterator
+ insert(const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ iterator
+ insert(iterator, const value_type& __obj)
+ { return iterator(_Base::insert(__obj), this); }
+
+ const_iterator
+ insert(const_iterator, const value_type& __obj)
+ { return const_iterator(_Base::insert(__obj), this); }
+
+ void
+ insert(std::initializer_list<value_type> __l)
+ { _Base::insert(__l); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::insert(__first, __last);
+ }
+
+ iterator
+ find(const key_type& __key)
+ { return iterator(_Base::find(__key), this); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return const_iterator(_Base::find(__key), this); }
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ {
+ typedef typename _Base::iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(iterator(__res.first, this),
+ iterator(__res.second, this));
+ }
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ {
+ typedef typename _Base::const_iterator _Base_iterator;
+ typedef std::pair<_Base_iterator, _Base_iterator> __pair_type;
+ __pair_type __res = _Base::equal_range(__key);
+ return std::make_pair(const_iterator(__res.first, this),
+ const_iterator(__res.second, this));
+ }
+
+ size_type
+ erase(const key_type& __key)
+ {
+ size_type __ret(0);
+ iterator __victim(_Base::find(__key), this);
+ if (__victim != end())
+ {
+ this->erase(__victim);
+ __ret = 1;
+ }
+ return __ret;
+ }
+
+ iterator
+ erase(iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return iterator(_Base::erase(__it.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __it)
+ {
+ __glibcxx_check_erase(__it);
+ __it._M_invalidate();
+ return const_iterator(_Base::erase(__it.base()), this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (iterator __tmp = __first; __tmp != __last;)
+ {
+ iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ const_iterator
+ erase(const_iterator __first, const_iterator __last)
+ {
+ __glibcxx_check_erase_range(__first, __last);
+ for (const_iterator __tmp = __first; __tmp != __last;)
+ {
+ const_iterator __victim = __tmp++;
+ __victim._M_invalidate();
+ }
+ return const_iterator(_Base::erase(__first.base(),
+ __last.base()), this);
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ void
+ _M_invalidate_all()
+ {
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_Not_equal_to<_Base_const_iterator> _Not_equal;
+ this->_M_invalidate_if(_Not_equal(_M_base().end()));
+ }
+ };
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Value, typename _Hash, typename _Pred, typename _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/debug/vector b/6/sources/cxx-stl/gnu-libstdc++/include/debug/vector
new file mode 100644
index 0000000..97ab7bf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/debug/vector
@@ -0,0 +1,551 @@
+// Debugging vector implementation -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file debug/vector
+ * This file is a GNU debug extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_DEBUG_VECTOR
+#define _GLIBCXX_DEBUG_VECTOR 1
+
+#include <vector>
+#include <utility>
+#include <debug/safe_sequence.h>
+#include <debug/safe_iterator.h>
+
+namespace std
+{
+namespace __debug
+{
+ template<typename _Tp,
+ typename _Allocator = std::allocator<_Tp> >
+ class vector
+ : public _GLIBCXX_STD_D::vector<_Tp, _Allocator>,
+ public __gnu_debug::_Safe_sequence<vector<_Tp, _Allocator> >
+ {
+ typedef _GLIBCXX_STD_D::vector<_Tp, _Allocator> _Base;
+ typedef __gnu_debug::_Safe_sequence<vector> _Safe_base;
+
+ typedef typename _Base::const_iterator _Base_const_iterator;
+ typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
+
+ public:
+ typedef typename _Base::reference reference;
+ typedef typename _Base::const_reference const_reference;
+
+ typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,vector>
+ iterator;
+ typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,vector>
+ const_iterator;
+
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::difference_type difference_type;
+
+ typedef _Tp value_type;
+ typedef _Allocator allocator_type;
+ typedef typename _Base::pointer pointer;
+ typedef typename _Base::const_pointer const_pointer;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // 23.2.4.1 construct/copy/destroy:
+ explicit vector(const _Allocator& __a = _Allocator())
+ : _Base(__a), _M_guaranteed_capacity(0) { }
+
+ explicit vector(size_type __n, const _Tp& __value = _Tp(),
+ const _Allocator& __a = _Allocator())
+ : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
+
+ template<class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const _Allocator& __a = _Allocator())
+ : _Base(__gnu_debug::__check_valid_range(__first, __last),
+ __last, __a),
+ _M_guaranteed_capacity(0)
+ { _M_update_guaranteed_capacity(); }
+
+ vector(const vector& __x)
+ : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
+
+ /// Construction from a release-mode vector
+ vector(const _Base& __x)
+ : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector(vector&& __x)
+ : _Base(std::forward<vector>(__x)), _Safe_base(),
+ _M_guaranteed_capacity(this->size())
+ {
+ this->_M_swap(__x);
+ __x._M_guaranteed_capacity = 0;
+ }
+
+ vector(initializer_list<value_type> __l,
+ const allocator_type& __a = allocator_type())
+ : _Base(__l, __a), _Safe_base(),
+ _M_guaranteed_capacity(__l.size()) { }
+#endif
+
+ ~vector() { }
+
+ vector&
+ operator=(const vector& __x)
+ {
+ static_cast<_Base&>(*this) = __x;
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ vector&
+ operator=(vector&& __x)
+ {
+ // NB: DR 675.
+ clear();
+ swap(__x);
+ return *this;
+ }
+
+ vector&
+ operator=(initializer_list<value_type> __l)
+ {
+ static_cast<_Base&>(*this) = __l;
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ return *this;
+ }
+#endif
+
+ template<typename _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_valid_range(__first, __last);
+ _Base::assign(__first, __last);
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+ void
+ assign(size_type __n, const _Tp& __u)
+ {
+ _Base::assign(__n, __u);
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ assign(initializer_list<value_type> __l)
+ {
+ _Base::assign(__l);
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+#endif
+
+ using _Base::get_allocator;
+
+ // iterators:
+ iterator
+ begin()
+ { return iterator(_Base::begin(), this); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ iterator
+ end()
+ { return iterator(_Base::end(), this); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_Base::end(), this); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ const_iterator
+ cbegin() const
+ { return const_iterator(_Base::begin(), this); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_Base::end(), this); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // 23.2.4.2 capacity:
+ using _Base::size;
+ using _Base::max_size;
+
+ void
+ resize(size_type __sz, _Tp __c = _Tp())
+ {
+ bool __realloc = _M_requires_reallocation(__sz);
+ if (__sz < this->size())
+ this->_M_invalidate_if(_After_nth(__sz, _M_base().begin()));
+ _Base::resize(__sz, __c);
+ if (__realloc)
+ this->_M_invalidate_all();
+ }
+
+ size_type
+ capacity() const
+ {
+#ifdef _GLIBCXX_DEBUG_PEDANTIC
+ return _M_guaranteed_capacity;
+#else
+ return _Base::capacity();
+#endif
+ }
+
+ using _Base::empty;
+
+ void
+ reserve(size_type __n)
+ {
+ bool __realloc = _M_requires_reallocation(__n);
+ _Base::reserve(__n);
+ if (__n > _M_guaranteed_capacity)
+ _M_guaranteed_capacity = __n;
+ if (__realloc)
+ this->_M_invalidate_all();
+ }
+
+ // element access:
+ reference
+ operator[](size_type __n)
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ const_reference
+ operator[](size_type __n) const
+ {
+ __glibcxx_check_subscript(__n);
+ return _M_base()[__n];
+ }
+
+ using _Base::at;
+
+ reference
+ front()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ const_reference
+ front() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::front();
+ }
+
+ reference
+ back()
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ const_reference
+ back() const
+ {
+ __glibcxx_check_nonempty();
+ return _Base::back();
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 464. Suggestion for new member functions in standard containers.
+ using _Base::data;
+
+ // 23.2.4.3 modifiers:
+ void
+ push_back(const _Tp& __x)
+ {
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ _Base::push_back(__x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Up = _Tp>
+ typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
+ void>::__type
+ push_back(_Tp&& __x)
+ { emplace_back(std::move(__x)); }
+
+ template<typename... _Args>
+ void
+ emplace_back(_Args&&... __args)
+ {
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ _Base::emplace_back(std::forward<_Args>(__args)...);
+ if (__realloc)
+ this->_M_invalidate_all();
+ _M_update_guaranteed_capacity();
+ }
+#endif
+
+ void
+ pop_back()
+ {
+ __glibcxx_check_nonempty();
+ iterator __victim = end() - 1;
+ __victim._M_invalidate();
+ _Base::pop_back();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ iterator
+ emplace(iterator __position, _Args&&... __args)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::emplace(__position.base(),
+ std::forward<_Args>(__args)...);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ return iterator(__res, this);
+ }
+#endif
+
+ iterator
+ insert(iterator __position, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + 1);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::insert(__position.base(),__x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ return iterator(__res, this);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Up = _Tp>
+ typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
+ iterator>::__type
+ insert(iterator __position, _Tp&& __x)
+ { return emplace(__position, std::move(__x)); }
+
+ void
+ insert(iterator __position, initializer_list<value_type> __l)
+ { this->insert(__position, __l.begin(), __l.end()); }
+#endif
+
+ void
+ insert(iterator __position, size_type __n, const _Tp& __x)
+ {
+ __glibcxx_check_insert(__position);
+ bool __realloc = _M_requires_reallocation(this->size() + __n);
+ difference_type __offset = __position - begin();
+ _Base::insert(__position.base(), __n, __x);
+ if (__realloc)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ }
+
+ template<class _InputIterator>
+ void
+ insert(iterator __position,
+ _InputIterator __first, _InputIterator __last)
+ {
+ __glibcxx_check_insert_range(__position, __first, __last);
+
+ /* Hard to guess if invalidation will occur, because __last
+ - __first can't be calculated in all cases, so we just
+ punt here by checking if it did occur. */
+ typename _Base::iterator __old_begin = _M_base().begin();
+ difference_type __offset = __position - begin();
+ _Base::insert(__position.base(), __first, __last);
+
+ if (_M_base().begin() != __old_begin)
+ this->_M_invalidate_all();
+ else
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ _M_update_guaranteed_capacity();
+ }
+
+ iterator
+ erase(iterator __position)
+ {
+ __glibcxx_check_erase(__position);
+ difference_type __offset = __position - begin();
+ typename _Base::iterator __res = _Base::erase(__position.base());
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ return iterator(__res, this);
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 151. can't currently clear() empty container
+ __glibcxx_check_erase_range(__first, __last);
+
+ difference_type __offset = __first - begin();
+ typename _Base::iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
+ return iterator(__res, this);
+ }
+
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(vector&& __x)
+#else
+ swap(vector& __x)
+#endif
+ {
+ _Base::swap(__x);
+ this->_M_swap(__x);
+ std::swap(_M_guaranteed_capacity, __x._M_guaranteed_capacity);
+ }
+
+ void
+ clear()
+ {
+ _Base::clear();
+ this->_M_invalidate_all();
+ _M_guaranteed_capacity = 0;
+ }
+
+ _Base&
+ _M_base() { return *this; }
+
+ const _Base&
+ _M_base() const { return *this; }
+
+ private:
+ size_type _M_guaranteed_capacity;
+
+ bool
+ _M_requires_reallocation(size_type __elements)
+ { return __elements > this->capacity(); }
+
+ void
+ _M_update_guaranteed_capacity()
+ {
+ if (this->size() > _M_guaranteed_capacity)
+ _M_guaranteed_capacity = this->size();
+ }
+ };
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator==(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() == __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator!=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() != __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() < __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator<=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() <= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>=(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() >= __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline bool
+ operator>(const vector<_Tp, _Alloc>& __lhs,
+ const vector<_Tp, _Alloc>& __rhs)
+ { return __lhs._M_base() > __rhs._M_base(); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>&& __lhs, vector<_Tp, _Alloc>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _Tp, typename _Alloc>
+ inline void
+ swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+} // namespace __debug
+} // namespace std
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/deque b/6/sources/cxx-stl/gnu-libstdc++/include/deque
new file mode 100644
index 0000000..8f64b00
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/deque
@@ -0,0 +1,75 @@
+// <deque> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 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.
+ */
+
+/** @file include/deque
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_DEQUE
+#define _GLIBCXX_DEQUE 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_deque.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/deque.tcc>
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/deque>
+#endif
+
+#endif /* _GLIBCXX_DEQUE */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/exception b/6/sources/cxx-stl/gnu-libstdc++/include/exception
new file mode 100644
index 0000000..7fa929b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/exception
@@ -0,0 +1,151 @@
+// Exception Handling support header for -*- C++ -*-
+
+// Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+// 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation
+//
+// 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file exception
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef __EXCEPTION__
+#define __EXCEPTION__
+
+#pragma GCC visibility push(default)
+
+#include <bits/c++config.h>
+
+extern "C++" {
+
+namespace std
+{
+ /**
+ * @defgroup exceptions Exceptions
+ * @ingroup diagnostics
+ *
+ * Classes and functions for reporting errors via exception classes.
+ * @{
+ */
+
+ /**
+ * @brief Base class for all library exceptions.
+ *
+ * This is the base class for all exceptions thrown by the standard
+ * library, and by certain language expressions. You are free to derive
+ * your own %exception classes, or use a different hierarchy, or to
+ * throw non-class data (e.g., fundamental types).
+ */
+ class exception
+ {
+ public:
+ exception() throw() { }
+ virtual ~exception() throw();
+
+ /** Returns a C-style character string describing the general cause
+ * of the current error. */
+ virtual const char* what() const throw();
+ };
+
+ /** If an %exception is thrown which is not listed in a function's
+ * %exception specification, one of these may be thrown. */
+ class bad_exception : public exception
+ {
+ public:
+ bad_exception() throw() { }
+
+ // This declaration is not useless:
+ // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+ virtual ~bad_exception() throw();
+
+ // See comment in eh_exception.cc.
+ virtual const char* what() const throw();
+ };
+
+ /// If you write a replacement %terminate handler, it must be of this type.
+ typedef void (*terminate_handler) ();
+
+ /// If you write a replacement %unexpected handler, it must be of this type.
+ typedef void (*unexpected_handler) ();
+
+ /// Takes a new handler function as an argument, returns the old function.
+ terminate_handler set_terminate(terminate_handler) throw();
+
+ /** The runtime will call this function if %exception handling must be
+ * abandoned for any reason. It can also be called by the user. */
+ void terminate() __attribute__ ((__noreturn__));
+
+ /// Takes a new handler function as an argument, returns the old function.
+ unexpected_handler set_unexpected(unexpected_handler) throw();
+
+ /** The runtime will call this function if an %exception is thrown which
+ * violates the function's %exception specification. */
+ void unexpected() __attribute__ ((__noreturn__));
+
+ /** [18.6.4]/1: "Returns true after completing evaluation of a
+ * throw-expression until either completing initialization of the
+ * exception-declaration in the matching handler or entering @c unexpected()
+ * due to the throw; or after entering @c terminate() for any reason
+ * other than an explicit call to @c terminate(). [Note: This includes
+ * stack unwinding [15.2]. end note]"
+ *
+ * 2: "When @c uncaught_exception() is true, throwing an %exception can
+ * result in a call of @c terminate() (15.5.1)."
+ */
+ bool uncaught_exception() throw();
+
+ // @} group exceptions
+} // namespace std
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @brief A replacement for the standard terminate_handler which
+ * prints more information about the terminating exception (if any)
+ * on stderr.
+ *
+ * @ingroup exceptions
+ *
+ * Call
+ * @code
+ * std::set_terminate(__gnu_cxx::__verbose_terminate_handler)
+ * @endcode
+ * to use. For more info, see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt02ch06s02.html
+ *
+ * In 3.4 and later, this is on by default.
+ */
+ void __verbose_terminate_handler();
+
+_GLIBCXX_END_NAMESPACE
+
+} // extern "C++"
+
+#pragma GCC visibility pop
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+ && defined(_GLIBCXX_ATOMIC_BUILTINS_4))
+#include <exception_ptr.h>
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/exception_defines.h b/6/sources/cxx-stl/gnu-libstdc++/include/exception_defines.h
new file mode 100644
index 0000000..951d96f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/exception_defines.h
@@ -0,0 +1,49 @@
+// -fno-exceptions Support -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 19.1 Exception classes
+//
+
+/** @file exception_defines.h
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _EXCEPTION_DEFINES_H
+#define _EXCEPTION_DEFINES_H 1
+
+#ifndef __EXCEPTIONS
+// Iff -fno-exceptions, transform error handling code to work without it.
+# define __try if (true)
+# define __catch(X) if (false)
+# define __throw_exception_again
+#else
+// Else proceed normally.
+# define __try try
+# define __catch(X) catch(X)
+# define __throw_exception_again throw
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/exception_ptr.h b/6/sources/cxx-stl/gnu-libstdc++/include/exception_ptr.h
new file mode 100644
index 0000000..b24ec21
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/exception_ptr.h
@@ -0,0 +1,171 @@
+// Exception Handling support header (exception_ptr class) for -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation
+//
+// 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file exception_ptr.h
+ * This is an internal header file, included by other headers and the
+ * implementation. You should not attempt to use it directly.
+ */
+
+#ifndef _EXCEPTION_PTR_H
+#define _EXCEPTION_PTR_H
+
+#pragma GCC visibility push(default)
+
+#include <bits/c++config.h>
+#include <exception_defines.h>
+
+#if !defined(_GLIBCXX_ATOMIC_BUILTINS_4)
+# error This platform does not support exception propagation.
+#endif
+
+extern "C++" {
+
+namespace std
+{
+ /**
+ * @addtogroup exceptions
+ * @{
+ */
+
+ // Hide the free operators from other types
+ namespace __exception_ptr
+ {
+ /**
+ * @brief An opaque pointer to an arbitrary exception.
+ */
+ class exception_ptr;
+ }
+
+ using __exception_ptr::exception_ptr;
+
+ /** Obtain an %exception_ptr to the currently handled exception. If there
+ * is none, or the currently handled exception is foreign, return the null
+ * value.
+ */
+ exception_ptr current_exception() throw();
+
+ /// Throw the object pointed to by the %exception_ptr.
+ void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__));
+
+ /// Obtain an %exception_ptr pointing to a copy of the supplied object.
+ template<typename _Ex>
+ exception_ptr
+ copy_exception(_Ex __ex) throw();
+
+ namespace __exception_ptr
+ {
+ bool
+ operator==(const exception_ptr&, const exception_ptr&) throw();
+
+ bool
+ operator!=(const exception_ptr&, const exception_ptr&) throw();
+
+ class exception_ptr
+ {
+ void* _M_exception_object;
+
+ explicit exception_ptr(void* __e) throw();
+
+ void _M_addref() throw();
+ void _M_release() throw();
+
+ void *_M_get() const throw();
+
+ void _M_safe_bool_dummy();
+
+ friend exception_ptr std::current_exception() throw();
+ friend void std::rethrow_exception(exception_ptr);
+
+ public:
+ exception_ptr() throw();
+
+ typedef void (exception_ptr::*__safe_bool)();
+
+ // For construction from nullptr or 0.
+ exception_ptr(__safe_bool) throw();
+
+ exception_ptr(const exception_ptr&) throw();
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ exception_ptr(exception_ptr&& __o) throw()
+ : _M_exception_object(__o._M_exception_object)
+ { __o._M_exception_object = 0; }
+#endif
+
+ exception_ptr&
+ operator=(const exception_ptr&) throw();
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ exception_ptr&
+ operator=(exception_ptr&& __o) throw()
+ {
+ exception_ptr(static_cast<exception_ptr&&>(__o)).swap(*this);
+ return *this;
+ }
+#endif
+
+ ~exception_ptr() throw();
+
+ void
+ swap(exception_ptr&) throw();
+
+#ifdef _GLIBCXX_EH_PTR_COMPAT
+ // Retained for compatibility with CXXABI_1.3.
+ bool operator!() const throw();
+ operator __safe_bool() const throw();
+#endif
+
+ friend bool
+ operator==(const exception_ptr&, const exception_ptr&) throw();
+
+ const type_info*
+ __cxa_exception_type() const throw();
+ };
+
+ } // namespace __exception_ptr
+
+
+ template<typename _Ex>
+ exception_ptr
+ copy_exception(_Ex __ex) throw()
+ {
+ __try
+ {
+ throw __ex;
+ }
+ __catch(...)
+ {
+ return current_exception ();
+ }
+ }
+
+ // @} group exceptions
+} // namespace std
+
+} // extern "C++"
+
+#pragma GCC visibility pop
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/algorithm b/6/sources/cxx-stl/gnu-libstdc++/include/ext/algorithm
new file mode 100644
index 0000000..3337d6c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/algorithm
@@ -0,0 +1,524 @@
+// Algorithm extensions -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file ext/algorithm
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _EXT_ALGORITHM
+#define _EXT_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include <algorithm>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::ptrdiff_t;
+ using std::min;
+ using std::pair;
+ using std::input_iterator_tag;
+ using std::random_access_iterator_tag;
+ using std::iterator_traits;
+
+ //--------------------------------------------------
+ // copy_n (not part of the C++ standard)
+
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ pair<_InputIterator, _OutputIterator>
+ __copy_n(_InputIterator __first, _Size __count,
+ _OutputIterator __result,
+ input_iterator_tag)
+ {
+ for ( ; __count > 0; --__count)
+ {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
+ return pair<_InputIterator, _OutputIterator>(__first, __result);
+ }
+
+ template<typename _RAIterator, typename _Size, typename _OutputIterator>
+ inline pair<_RAIterator, _OutputIterator>
+ __copy_n(_RAIterator __first, _Size __count,
+ _OutputIterator __result,
+ random_access_iterator_tag)
+ {
+ _RAIterator __last = __first + __count;
+ return pair<_RAIterator, _OutputIterator>(__last, std::copy(__first,
+ __last,
+ __result));
+ }
+
+ /**
+ * @brief Copies the range [first,first+count) into [result,result+count).
+ * @param first An input iterator.
+ * @param count The number of elements to copy.
+ * @param result An output iterator.
+ * @return A std::pair composed of first+count and result+count.
+ *
+ * This is an SGI extension.
+ * This inline function will boil down to a call to @c memmove whenever
+ * possible. Failing that, if random access iterators are passed, then the
+ * loop count will be known (and therefore a candidate for compiler
+ * optimizations such as unrolling).
+ * @ingroup SGIextensions
+ */
+ template<typename _InputIterator, typename _Size, typename _OutputIterator>
+ inline pair<_InputIterator, _OutputIterator>
+ copy_n(_InputIterator __first, _Size __count, _OutputIterator __result)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_InputIterator>::value_type>)
+
+ return __copy_n(__first, __count, __result,
+ std::__iterator_category(__first));
+ }
+
+ template<typename _InputIterator1, typename _InputIterator2>
+ int
+ __lexicographical_compare_3way(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2)
+ {
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first1 < *__first2)
+ return -1;
+ if (*__first2 < *__first1)
+ return 1;
+ ++__first1;
+ ++__first2;
+ }
+ if (__first2 == __last2)
+ return !(__first1 == __last1);
+ else
+ return -1;
+ }
+
+ inline int
+ __lexicographical_compare_3way(const unsigned char* __first1,
+ const unsigned char* __last1,
+ const unsigned char* __first2,
+ const unsigned char* __last2)
+ {
+ const ptrdiff_t __len1 = __last1 - __first1;
+ const ptrdiff_t __len2 = __last2 - __first2;
+ const int __result = __builtin_memcmp(__first1, __first2,
+ min(__len1, __len2));
+ return __result != 0 ? __result
+ : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
+ }
+
+ inline int
+ __lexicographical_compare_3way(const char* __first1, const char* __last1,
+ const char* __first2, const char* __last2)
+ {
+#if CHAR_MAX == SCHAR_MAX
+ return __lexicographical_compare_3way((const signed char*) __first1,
+ (const signed char*) __last1,
+ (const signed char*) __first2,
+ (const signed char*) __last2);
+#else
+ return __lexicographical_compare_3way((const unsigned char*) __first1,
+ (const unsigned char*) __last1,
+ (const unsigned char*) __first2,
+ (const unsigned char*) __last2);
+#endif
+ }
+
+ /**
+ * @brief @c memcmp on steroids.
+ * @param first1 An input iterator.
+ * @param last1 An input iterator.
+ * @param first2 An input iterator.
+ * @param last2 An input iterator.
+ * @return An int, as with @c memcmp.
+ *
+ * The return value will be less than zero if the first range is
+ * "lexigraphically less than" the second, greater than zero if the second
+ * range is "lexigraphically less than" the first, and zero otherwise.
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ */
+ template<typename _InputIterator1, typename _InputIterator2>
+ int
+ lexicographical_compare_3way(_InputIterator1 __first1,
+ _InputIterator1 __last1,
+ _InputIterator2 __first2,
+ _InputIterator2 __last2)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator1>)
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator2>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator1>::value_type>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_InputIterator2>::value_type>)
+ __glibcxx_requires_valid_range(__first1, __last1);
+ __glibcxx_requires_valid_range(__first2, __last2);
+
+ return __lexicographical_compare_3way(__first1, __last1, __first2,
+ __last2);
+ }
+
+ // count and count_if: this version, whose return type is void, was present
+ // in the HP STL, and is retained as an extension for backward compatibility.
+ template<typename _InputIterator, typename _Tp, typename _Size>
+ void
+ count(_InputIterator __first, _InputIterator __last,
+ const _Tp& __value,
+ _Size& __n)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_EqualityComparableConcept<
+ typename iterator_traits<_InputIterator>::value_type >)
+ __glibcxx_function_requires(_EqualityComparableConcept<_Tp>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for ( ; __first != __last; ++__first)
+ if (*__first == __value)
+ ++__n;
+ }
+
+ template<typename _InputIterator, typename _Predicate, typename _Size>
+ void
+ count_if(_InputIterator __first, _InputIterator __last,
+ _Predicate __pred,
+ _Size& __n)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
+ typename iterator_traits<_InputIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ for ( ; __first != __last; ++__first)
+ if (__pred(*__first))
+ ++__n;
+ }
+
+ // random_sample and random_sample_n (extensions, not part of the standard).
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _ForwardIterator, typename _OutputIterator,
+ typename _Distance>
+ _OutputIterator
+ random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __out, const _Distance __n)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Distance __remaining = std::distance(__first, __last);
+ _Distance __m = min(__n, __remaining);
+
+ while (__m > 0)
+ {
+ if ((std::rand() % __remaining) < __m)
+ {
+ *__out = *__first;
+ ++__out;
+ --__m;
+ }
+ --__remaining;
+ ++__first;
+ }
+ return __out;
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _ForwardIterator, typename _OutputIterator,
+ typename _Distance, typename _RandomNumberGenerator>
+ _OutputIterator
+ random_sample_n(_ForwardIterator __first, _ForwardIterator __last,
+ _OutputIterator __out, const _Distance __n,
+ _RandomNumberGenerator& __rand)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_OutputIteratorConcept<_OutputIterator,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_function_requires(_UnaryFunctionConcept<
+ _RandomNumberGenerator, _Distance, _Distance>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ _Distance __remaining = std::distance(__first, __last);
+ _Distance __m = min(__n, __remaining);
+
+ while (__m > 0)
+ {
+ if (__rand(__remaining) < __m)
+ {
+ *__out = *__first;
+ ++__out;
+ --__m;
+ }
+ --__remaining;
+ ++__first;
+ }
+ return __out;
+ }
+
+ template<typename _InputIterator, typename _RandomAccessIterator,
+ typename _Distance>
+ _RandomAccessIterator
+ __random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out,
+ const _Distance __n)
+ {
+ _Distance __m = 0;
+ _Distance __t = __n;
+ for ( ; __first != __last && __m < __n; ++__m, ++__first)
+ __out[__m] = *__first;
+
+ while (__first != __last)
+ {
+ ++__t;
+ _Distance __M = std::rand() % (__t);
+ if (__M < __n)
+ __out[__M] = *__first;
+ ++__first;
+ }
+ return __out + __m;
+ }
+
+ template<typename _InputIterator, typename _RandomAccessIterator,
+ typename _RandomNumberGenerator, typename _Distance>
+ _RandomAccessIterator
+ __random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out,
+ _RandomNumberGenerator& __rand,
+ const _Distance __n)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_UnaryFunctionConcept<
+ _RandomNumberGenerator, _Distance, _Distance>)
+
+ _Distance __m = 0;
+ _Distance __t = __n;
+ for ( ; __first != __last && __m < __n; ++__m, ++__first)
+ __out[__m] = *__first;
+
+ while (__first != __last)
+ {
+ ++__t;
+ _Distance __M = __rand(__t);
+ if (__M < __n)
+ __out[__M] = *__first;
+ ++__first;
+ }
+ return __out + __m;
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _InputIterator, typename _RandomAccessIterator>
+ inline _RandomAccessIterator
+ random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out_first,
+ _RandomAccessIterator __out_last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__out_first, __out_last);
+
+ return __random_sample(__first, __last,
+ __out_first, __out_last - __out_first);
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _InputIterator, typename _RandomAccessIterator,
+ typename _RandomNumberGenerator>
+ inline _RandomAccessIterator
+ random_sample(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __out_first,
+ _RandomAccessIterator __out_last,
+ _RandomNumberGenerator& __rand)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ __glibcxx_function_requires(_Mutable_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_requires_valid_range(__first, __last);
+ __glibcxx_requires_valid_range(__out_first, __out_last);
+
+ return __random_sample(__first, __last,
+ __out_first, __rand,
+ __out_last - __out_first);
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _RandomAccessIterator>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return std::__is_heap(__first, __last - __first);
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _RandomAccessIterator, typename _StrictWeakOrdering>
+ inline bool
+ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _StrictWeakOrdering __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+ typename iterator_traits<_RandomAccessIterator>::value_type,
+ typename iterator_traits<_RandomAccessIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ return std::__is_heap(__first, __comp, __last - __first);
+ }
+
+ // is_sorted, a predicated testing whether a range is sorted in
+ // nondescending order. This is an extension, not part of the C++
+ // standard.
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _ForwardIterator>
+ bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_LessThanComparableConcept<
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (*__next < *__first)
+ return false;
+ return true;
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _ForwardIterator, typename _StrictWeakOrdering>
+ bool
+ is_sorted(_ForwardIterator __first, _ForwardIterator __last,
+ _StrictWeakOrdering __comp)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_ForwardIteratorConcept<_ForwardIterator>)
+ __glibcxx_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+ typename iterator_traits<_ForwardIterator>::value_type,
+ typename iterator_traits<_ForwardIterator>::value_type>)
+ __glibcxx_requires_valid_range(__first, __last);
+
+ if (__first == __last)
+ return true;
+
+ _ForwardIterator __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next)
+ if (__comp(*__next, *__first))
+ return false;
+ return true;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _EXT_ALGORITHM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/array_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/array_allocator.h
new file mode 100644
index 0000000..f36f273
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/array_allocator.h
@@ -0,0 +1,154 @@
+// array allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/array_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _ARRAY_ALLOCATOR_H
+#define _ARRAY_ALLOCATOR_H 1
+
+#include <cstddef>
+#include <new>
+#include <bits/functexcept.h>
+#include <tr1/array>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ /// Base class.
+ template<typename _Tp>
+ class array_allocator_base
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ void
+ deallocate(pointer, size_type)
+ {
+ // Does nothing.
+ }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) value_type(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ /**
+ * @brief An allocator that uses previously allocated memory.
+ * This memory can be externally, globally, or otherwise allocated.
+ * @ingroup allocators
+ */
+ template<typename _Tp, typename _Array = std::tr1::array<_Tp, 1> >
+ class array_allocator : public array_allocator_base<_Tp>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+ typedef _Array array_type;
+
+ private:
+ array_type* _M_array;
+ size_type _M_used;
+
+ public:
+ template<typename _Tp1, typename _Array1 = _Array>
+ struct rebind
+ { typedef array_allocator<_Tp1, _Array1> other; };
+
+ array_allocator(array_type* __array = NULL) throw()
+ : _M_array(__array), _M_used(size_type()) { }
+
+ array_allocator(const array_allocator& __o) throw()
+ : _M_array(__o._M_array), _M_used(__o._M_used) { }
+
+ template<typename _Tp1, typename _Array1>
+ array_allocator(const array_allocator<_Tp1, _Array1>&) throw()
+ : _M_array(NULL), _M_used(size_type()) { }
+
+ ~array_allocator() throw() { }
+
+ pointer
+ allocate(size_type __n, const void* = 0)
+ {
+ if (_M_array == 0 || _M_used + __n > _M_array->size())
+ std::__throw_bad_alloc();
+ pointer __ret = _M_array->begin() + _M_used;
+ _M_used += __n;
+ return __ret;
+ }
+ };
+
+ template<typename _Tp, typename _Array>
+ inline bool
+ operator==(const array_allocator<_Tp, _Array>&,
+ const array_allocator<_Tp, _Array>&)
+ { return true; }
+
+ template<typename _Tp, typename _Array>
+ inline bool
+ operator!=(const array_allocator<_Tp, _Array>&,
+ const array_allocator<_Tp, _Array>&)
+ { return false; }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/atomicity.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/atomicity.h
new file mode 100644
index 0000000..bb891e8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/atomicity.h
@@ -0,0 +1,113 @@
+// Support for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomicity.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ATOMICITY_H
+#define _GLIBCXX_ATOMICITY_H 1
+
+#include <bits/c++config.h>
+#include <bits/gthr.h>
+#include <bits/atomic_word.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Functions for portable atomic access.
+ // To abstract locking primitives across all thread policies, use:
+ // __exchange_and_add_dispatch
+ // __atomic_add_dispatch
+#ifdef _GLIBCXX_ATOMIC_BUILTINS_4
+ static inline _Atomic_word
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ { return __sync_fetch_and_add(__mem, __val); }
+
+ static inline void
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __sync_fetch_and_add(__mem, __val); }
+#else
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add(volatile _Atomic_word*, int);
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add(volatile _Atomic_word*, int);
+#endif
+
+ static inline _Atomic_word
+ __exchange_and_add_single(_Atomic_word* __mem, int __val)
+ {
+ _Atomic_word __result = *__mem;
+ *__mem += __val;
+ return __result;
+ }
+
+ static inline void
+ __atomic_add_single(_Atomic_word* __mem, int __val)
+ { *__mem += __val; }
+
+ static inline _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add_dispatch(_Atomic_word* __mem, int __val)
+ {
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ return __exchange_and_add(__mem, __val);
+ else
+ return __exchange_and_add_single(__mem, __val);
+#else
+ return __exchange_and_add_single(__mem, __val);
+#endif
+ }
+
+ static inline void
+ __attribute__ ((__unused__))
+ __atomic_add_dispatch(_Atomic_word* __mem, int __val)
+ {
+#ifdef __GTHREADS
+ if (__gthread_active_p())
+ __atomic_add(__mem, __val);
+ else
+ __atomic_add_single(__mem, __val);
+#else
+ __atomic_add_single(__mem, __val);
+#endif
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+// Even if the CPU doesn't need a memory barrier, we need to ensure
+// that the compiler doesn't reorder memory accesses across the
+// barriers.
+#ifndef _GLIBCXX_READ_MEM_BARRIER
+#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+#endif
+#ifndef _GLIBCXX_WRITE_MEM_BARRIER
+#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/bitmap_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/bitmap_allocator.h
new file mode 100644
index 0000000..3ad08fb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/bitmap_allocator.h
@@ -0,0 +1,1145 @@
+// Bitmap Allocator. -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/bitmap_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _BITMAP_ALLOCATOR_H
+#define _BITMAP_ALLOCATOR_H 1
+
+#include <cstddef> // For std::size_t, and ptrdiff_t.
+#include <bits/functexcept.h> // For __throw_bad_alloc().
+#include <utility> // For std::pair.
+#include <functional> // For greater_equal, and less_equal.
+#include <new> // For operator new.
+#include <debug/debug.h> // _GLIBCXX_DEBUG_ASSERT
+#include <ext/concurrence.h>
+#include <bits/move.h>
+
+/** @brief The constant in the expression below is the alignment
+ * required in bytes.
+ */
+#define _BALLOC_ALIGN_BYTES 8
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ namespace __detail
+ {
+ /** @class __mini_vector bitmap_allocator.h bitmap_allocator.h
+ *
+ * @brief __mini_vector<> is a stripped down version of the
+ * full-fledged std::vector<>.
+ *
+ * It is to be used only for built-in types or PODs. Notable
+ * differences are:
+ *
+ * @detail
+ * 1. Not all accessor functions are present.
+ * 2. Used ONLY for PODs.
+ * 3. No Allocator template argument. Uses ::operator new() to get
+ * memory, and ::operator delete() to free it.
+ * Caveat: The dtor does NOT free the memory allocated, so this a
+ * memory-leaking vector!
+ */
+ template<typename _Tp>
+ class __mini_vector
+ {
+ __mini_vector(const __mini_vector&);
+ __mini_vector& operator=(const __mini_vector&);
+
+ public:
+ typedef _Tp value_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef pointer iterator;
+
+ private:
+ pointer _M_start;
+ pointer _M_finish;
+ pointer _M_end_of_storage;
+
+ size_type
+ _M_space_left() const throw()
+ { return _M_end_of_storage - _M_finish; }
+
+ pointer
+ allocate(size_type __n)
+ { return static_cast<pointer>(::operator new(__n * sizeof(_Tp))); }
+
+ void
+ deallocate(pointer __p, size_type)
+ { ::operator delete(__p); }
+
+ public:
+ // Members used: size(), push_back(), pop_back(),
+ // insert(iterator, const_reference), erase(iterator),
+ // begin(), end(), back(), operator[].
+
+ __mini_vector() : _M_start(0), _M_finish(0),
+ _M_end_of_storage(0)
+ { }
+
+#if 0
+ ~__mini_vector()
+ {
+ if (this->_M_start)
+ {
+ this->deallocate(this->_M_start, this->_M_end_of_storage
+ - this->_M_start);
+ }
+ }
+#endif
+
+ size_type
+ size() const throw()
+ { return _M_finish - _M_start; }
+
+ iterator
+ begin() const throw()
+ { return this->_M_start; }
+
+ iterator
+ end() const throw()
+ { return this->_M_finish; }
+
+ reference
+ back() const throw()
+ { return *(this->end() - 1); }
+
+ reference
+ operator[](const size_type __pos) const throw()
+ { return this->_M_start[__pos]; }
+
+ void
+ insert(iterator __pos, const_reference __x);
+
+ void
+ push_back(const_reference __x)
+ {
+ if (this->_M_space_left())
+ {
+ *this->end() = __x;
+ ++this->_M_finish;
+ }
+ else
+ this->insert(this->end(), __x);
+ }
+
+ void
+ pop_back() throw()
+ { --this->_M_finish; }
+
+ void
+ erase(iterator __pos) throw();
+
+ void
+ clear() throw()
+ { this->_M_finish = this->_M_start; }
+ };
+
+ // Out of line function definitions.
+ template<typename _Tp>
+ void __mini_vector<_Tp>::
+ insert(iterator __pos, const_reference __x)
+ {
+ if (this->_M_space_left())
+ {
+ size_type __to_move = this->_M_finish - __pos;
+ iterator __dest = this->end();
+ iterator __src = this->end() - 1;
+
+ ++this->_M_finish;
+ while (__to_move)
+ {
+ *__dest = *__src;
+ --__dest; --__src; --__to_move;
+ }
+ *__pos = __x;
+ }
+ else
+ {
+ size_type __new_size = this->size() ? this->size() * 2 : 1;
+ iterator __new_start = this->allocate(__new_size);
+ iterator __first = this->begin();
+ iterator __start = __new_start;
+ while (__first != __pos)
+ {
+ *__start = *__first;
+ ++__start; ++__first;
+ }
+ *__start = __x;
+ ++__start;
+ while (__first != this->end())
+ {
+ *__start = *__first;
+ ++__start; ++__first;
+ }
+ if (this->_M_start)
+ this->deallocate(this->_M_start, this->size());
+
+ this->_M_start = __new_start;
+ this->_M_finish = __start;
+ this->_M_end_of_storage = this->_M_start + __new_size;
+ }
+ }
+
+ template<typename _Tp>
+ void __mini_vector<_Tp>::
+ erase(iterator __pos) throw()
+ {
+ while (__pos + 1 != this->end())
+ {
+ *__pos = __pos[1];
+ ++__pos;
+ }
+ --this->_M_finish;
+ }
+
+
+ template<typename _Tp>
+ struct __mv_iter_traits
+ {
+ typedef typename _Tp::value_type value_type;
+ typedef typename _Tp::difference_type difference_type;
+ };
+
+ template<typename _Tp>
+ struct __mv_iter_traits<_Tp*>
+ {
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ };
+
+ enum
+ {
+ bits_per_byte = 8,
+ bits_per_block = sizeof(size_t) * size_t(bits_per_byte)
+ };
+
+ template<typename _ForwardIterator, typename _Tp, typename _Compare>
+ _ForwardIterator
+ __lower_bound(_ForwardIterator __first, _ForwardIterator __last,
+ const _Tp& __val, _Compare __comp)
+ {
+ typedef typename __mv_iter_traits<_ForwardIterator>::value_type
+ _ValueType;
+ typedef typename __mv_iter_traits<_ForwardIterator>::difference_type
+ _DistanceType;
+
+ _DistanceType __len = __last - __first;
+ _DistanceType __half;
+ _ForwardIterator __middle;
+
+ while (__len > 0)
+ {
+ __half = __len >> 1;
+ __middle = __first;
+ __middle += __half;
+ if (__comp(*__middle, __val))
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+
+ template<typename _InputIterator, typename _Predicate>
+ inline _InputIterator
+ __find_if(_InputIterator __first, _InputIterator __last, _Predicate __p)
+ {
+ while (__first != __last && !__p(*__first))
+ ++__first;
+ return __first;
+ }
+
+ /** @brief The number of Blocks pointed to by the address pair
+ * passed to the function.
+ */
+ template<typename _AddrPair>
+ inline size_t
+ __num_blocks(_AddrPair __ap)
+ { return (__ap.second - __ap.first) + 1; }
+
+ /** @brief The number of Bit-maps pointed to by the address pair
+ * passed to the function.
+ */
+ template<typename _AddrPair>
+ inline size_t
+ __num_bitmaps(_AddrPair __ap)
+ { return __num_blocks(__ap) / size_t(bits_per_block); }
+
+ // _Tp should be a pointer type.
+ template<typename _Tp>
+ class _Inclusive_between
+ : public std::unary_function<typename std::pair<_Tp, _Tp>, bool>
+ {
+ typedef _Tp pointer;
+ pointer _M_ptr_value;
+ typedef typename std::pair<_Tp, _Tp> _Block_pair;
+
+ public:
+ _Inclusive_between(pointer __ptr) : _M_ptr_value(__ptr)
+ { }
+
+ bool
+ operator()(_Block_pair __bp) const throw()
+ {
+ if (std::less_equal<pointer>()(_M_ptr_value, __bp.second)
+ && std::greater_equal<pointer>()(_M_ptr_value, __bp.first))
+ return true;
+ else
+ return false;
+ }
+ };
+
+ // Used to pass a Functor to functions by reference.
+ template<typename _Functor>
+ class _Functor_Ref
+ : public std::unary_function<typename _Functor::argument_type,
+ typename _Functor::result_type>
+ {
+ _Functor& _M_fref;
+
+ public:
+ typedef typename _Functor::argument_type argument_type;
+ typedef typename _Functor::result_type result_type;
+
+ _Functor_Ref(_Functor& __fref) : _M_fref(__fref)
+ { }
+
+ result_type
+ operator()(argument_type __arg)
+ { return _M_fref(__arg); }
+ };
+
+ /** @class _Ffit_finder bitmap_allocator.h bitmap_allocator.h
+ *
+ * @brief The class which acts as a predicate for applying the
+ * first-fit memory allocation policy for the bitmap allocator.
+ */
+ // _Tp should be a pointer type, and _Alloc is the Allocator for
+ // the vector.
+ template<typename _Tp>
+ class _Ffit_finder
+ : public std::unary_function<typename std::pair<_Tp, _Tp>, bool>
+ {
+ typedef typename std::pair<_Tp, _Tp> _Block_pair;
+ typedef typename __detail::__mini_vector<_Block_pair> _BPVector;
+ typedef typename _BPVector::difference_type _Counter_type;
+
+ size_t* _M_pbitmap;
+ _Counter_type _M_data_offset;
+
+ public:
+ _Ffit_finder() : _M_pbitmap(0), _M_data_offset(0)
+ { }
+
+ bool
+ operator()(_Block_pair __bp) throw()
+ {
+ // Set the _rover to the last physical location bitmap,
+ // which is the bitmap which belongs to the first free
+ // block. Thus, the bitmaps are in exact reverse order of
+ // the actual memory layout. So, we count down the bitmaps,
+ // which is the same as moving up the memory.
+
+ // If the used count stored at the start of the Bit Map headers
+ // is equal to the number of Objects that the current Block can
+ // store, then there is definitely no space for another single
+ // object, so just return false.
+ _Counter_type __diff =
+ __gnu_cxx::__detail::__num_bitmaps(__bp);
+
+ if (*(reinterpret_cast<size_t*>
+ (__bp.first) - (__diff + 1))
+ == __gnu_cxx::__detail::__num_blocks(__bp))
+ return false;
+
+ size_t* __rover = reinterpret_cast<size_t*>(__bp.first) - 1;
+
+ for (_Counter_type __i = 0; __i < __diff; ++__i)
+ {
+ _M_data_offset = __i;
+ if (*__rover)
+ {
+ _M_pbitmap = __rover;
+ return true;
+ }
+ --__rover;
+ }
+ return false;
+ }
+
+
+ size_t*
+ _M_get() const throw()
+ { return _M_pbitmap; }
+
+ _Counter_type
+ _M_offset() const throw()
+ { return _M_data_offset * size_t(bits_per_block); }
+ };
+
+
+ /** @class _Bitmap_counter bitmap_allocator.h bitmap_allocator.h
+ *
+ * @brief The bitmap counter which acts as the bitmap
+ * manipulator, and manages the bit-manipulation functions and
+ * the searching and identification functions on the bit-map.
+ */
+ // _Tp should be a pointer type.
+ template<typename _Tp>
+ class _Bitmap_counter
+ {
+ typedef typename __detail::__mini_vector<typename std::pair<_Tp, _Tp> >
+ _BPVector;
+ typedef typename _BPVector::size_type _Index_type;
+ typedef _Tp pointer;
+
+ _BPVector& _M_vbp;
+ size_t* _M_curr_bmap;
+ size_t* _M_last_bmap_in_block;
+ _Index_type _M_curr_index;
+
+ public:
+ // Use the 2nd parameter with care. Make sure that such an
+ // entry exists in the vector before passing that particular
+ // index to this ctor.
+ _Bitmap_counter(_BPVector& Rvbp, long __index = -1) : _M_vbp(Rvbp)
+ { this->_M_reset(__index); }
+
+ void
+ _M_reset(long __index = -1) throw()
+ {
+ if (__index == -1)
+ {
+ _M_curr_bmap = 0;
+ _M_curr_index = static_cast<_Index_type>(-1);
+ return;
+ }
+
+ _M_curr_index = __index;
+ _M_curr_bmap = reinterpret_cast<size_t*>
+ (_M_vbp[_M_curr_index].first) - 1;
+
+ _GLIBCXX_DEBUG_ASSERT(__index <= (long)_M_vbp.size() - 1);
+
+ _M_last_bmap_in_block = _M_curr_bmap
+ - ((_M_vbp[_M_curr_index].second
+ - _M_vbp[_M_curr_index].first + 1)
+ / size_t(bits_per_block) - 1);
+ }
+
+ // Dangerous Function! Use with extreme care. Pass to this
+ // function ONLY those values that are known to be correct,
+ // otherwise this will mess up big time.
+ void
+ _M_set_internal_bitmap(size_t* __new_internal_marker) throw()
+ { _M_curr_bmap = __new_internal_marker; }
+
+ bool
+ _M_finished() const throw()
+ { return(_M_curr_bmap == 0); }
+
+ _Bitmap_counter&
+ operator++() throw()
+ {
+ if (_M_curr_bmap == _M_last_bmap_in_block)
+ {
+ if (++_M_curr_index == _M_vbp.size())
+ _M_curr_bmap = 0;
+ else
+ this->_M_reset(_M_curr_index);
+ }
+ else
+ --_M_curr_bmap;
+ return *this;
+ }
+
+ size_t*
+ _M_get() const throw()
+ { return _M_curr_bmap; }
+
+ pointer
+ _M_base() const throw()
+ { return _M_vbp[_M_curr_index].first; }
+
+ _Index_type
+ _M_offset() const throw()
+ {
+ return size_t(bits_per_block)
+ * ((reinterpret_cast<size_t*>(this->_M_base())
+ - _M_curr_bmap) - 1);
+ }
+
+ _Index_type
+ _M_where() const throw()
+ { return _M_curr_index; }
+ };
+
+ /** @brief Mark a memory address as allocated by re-setting the
+ * corresponding bit in the bit-map.
+ */
+ inline void
+ __bit_allocate(size_t* __pbmap, size_t __pos) throw()
+ {
+ size_t __mask = 1 << __pos;
+ __mask = ~__mask;
+ *__pbmap &= __mask;
+ }
+
+ /** @brief Mark a memory address as free by setting the
+ * corresponding bit in the bit-map.
+ */
+ inline void
+ __bit_free(size_t* __pbmap, size_t __pos) throw()
+ {
+ size_t __mask = 1 << __pos;
+ *__pbmap |= __mask;
+ }
+ } // namespace __detail
+
+ /** @brief Generic Version of the bsf instruction.
+ */
+ inline size_t
+ _Bit_scan_forward(size_t __num)
+ { return static_cast<size_t>(__builtin_ctzl(__num)); }
+
+ /** @class free_list bitmap_allocator.h bitmap_allocator.h
+ *
+ * @brief The free list class for managing chunks of memory to be
+ * given to and returned by the bitmap_allocator.
+ */
+ class free_list
+ {
+ typedef size_t* value_type;
+ typedef __detail::__mini_vector<value_type> vector_type;
+ typedef vector_type::iterator iterator;
+ typedef __mutex __mutex_type;
+
+ struct _LT_pointer_compare
+ {
+ bool
+ operator()(const size_t* __pui,
+ const size_t __cui) const throw()
+ { return *__pui < __cui; }
+ };
+
+#if defined __GTHREADS
+ __mutex_type&
+ _M_get_mutex()
+ {
+ static __mutex_type _S_mutex;
+ return _S_mutex;
+ }
+#endif
+
+ vector_type&
+ _M_get_free_list()
+ {
+ static vector_type _S_free_list;
+ return _S_free_list;
+ }
+
+ /** @brief Performs validation of memory based on their size.
+ *
+ * @param __addr The pointer to the memory block to be
+ * validated.
+ *
+ * @detail Validates the memory block passed to this function and
+ * appropriately performs the action of managing the free list of
+ * blocks by adding this block to the free list or deleting this
+ * or larger blocks from the free list.
+ */
+ void
+ _M_validate(size_t* __addr) throw()
+ {
+ vector_type& __free_list = _M_get_free_list();
+ const vector_type::size_type __max_size = 64;
+ if (__free_list.size() >= __max_size)
+ {
+ // Ok, the threshold value has been reached. We determine
+ // which block to remove from the list of free blocks.
+ if (*__addr >= *__free_list.back())
+ {
+ // Ok, the new block is greater than or equal to the
+ // last block in the list of free blocks. We just free
+ // the new block.
+ ::operator delete(static_cast<void*>(__addr));
+ return;
+ }
+ else
+ {
+ // Deallocate the last block in the list of free lists,
+ // and insert the new one in its correct position.
+ ::operator delete(static_cast<void*>(__free_list.back()));
+ __free_list.pop_back();
+ }
+ }
+
+ // Just add the block to the list of free lists unconditionally.
+ iterator __temp = __gnu_cxx::__detail::__lower_bound
+ (__free_list.begin(), __free_list.end(),
+ *__addr, _LT_pointer_compare());
+
+ // We may insert the new free list before _temp;
+ __free_list.insert(__temp, __addr);
+ }
+
+ /** @brief Decides whether the wastage of memory is acceptable for
+ * the current memory request and returns accordingly.
+ *
+ * @param __block_size The size of the block available in the free
+ * list.
+ *
+ * @param __required_size The required size of the memory block.
+ *
+ * @return true if the wastage incurred is acceptable, else returns
+ * false.
+ */
+ bool
+ _M_should_i_give(size_t __block_size,
+ size_t __required_size) throw()
+ {
+ const size_t __max_wastage_percentage = 36;
+ if (__block_size >= __required_size &&
+ (((__block_size - __required_size) * 100 / __block_size)
+ < __max_wastage_percentage))
+ return true;
+ else
+ return false;
+ }
+
+ public:
+ /** @brief This function returns the block of memory to the
+ * internal free list.
+ *
+ * @param __addr The pointer to the memory block that was given
+ * by a call to the _M_get function.
+ */
+ inline void
+ _M_insert(size_t* __addr) throw()
+ {
+#if defined __GTHREADS
+ __gnu_cxx::__scoped_lock __bfl_lock(_M_get_mutex());
+#endif
+ // Call _M_validate to decide what should be done with
+ // this particular free list.
+ this->_M_validate(reinterpret_cast<size_t*>(__addr) - 1);
+ // See discussion as to why this is 1!
+ }
+
+ /** @brief This function gets a block of memory of the specified
+ * size from the free list.
+ *
+ * @param __sz The size in bytes of the memory required.
+ *
+ * @return A pointer to the new memory block of size at least
+ * equal to that requested.
+ */
+ size_t*
+ _M_get(size_t __sz) throw(std::bad_alloc);
+
+ /** @brief This function just clears the internal Free List, and
+ * gives back all the memory to the OS.
+ */
+ void
+ _M_clear();
+ };
+
+
+ // Forward declare the class.
+ template<typename _Tp>
+ class bitmap_allocator;
+
+ // Specialize for void:
+ template<>
+ class bitmap_allocator<void>
+ {
+ public:
+ typedef void* pointer;
+ typedef const void* const_pointer;
+
+ // Reference-to-void members are impossible.
+ typedef void value_type;
+ template<typename _Tp1>
+ struct rebind
+ {
+ typedef bitmap_allocator<_Tp1> other;
+ };
+ };
+
+ /**
+ * @brief Bitmap Allocator, primary template.
+ * @ingroup allocators
+ */
+ template<typename _Tp>
+ class bitmap_allocator : private free_list
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+ typedef free_list::__mutex_type __mutex_type;
+
+ template<typename _Tp1>
+ struct rebind
+ {
+ typedef bitmap_allocator<_Tp1> other;
+ };
+
+ private:
+ template<size_t _BSize, size_t _AlignSize>
+ struct aligned_size
+ {
+ enum
+ {
+ modulus = _BSize % _AlignSize,
+ value = _BSize + (modulus ? _AlignSize - (modulus) : 0)
+ };
+ };
+
+ struct _Alloc_block
+ {
+ char __M_unused[aligned_size<sizeof(value_type),
+ _BALLOC_ALIGN_BYTES>::value];
+ };
+
+
+ typedef typename std::pair<_Alloc_block*, _Alloc_block*> _Block_pair;
+
+ typedef typename
+ __detail::__mini_vector<_Block_pair> _BPVector;
+
+#if defined _GLIBCXX_DEBUG
+ // Complexity: O(lg(N)). Where, N is the number of block of size
+ // sizeof(value_type).
+ void
+ _S_check_for_free_blocks() throw()
+ {
+ typedef typename
+ __gnu_cxx::__detail::_Ffit_finder<_Alloc_block*> _FFF;
+ _FFF __fff;
+ typedef typename _BPVector::iterator _BPiter;
+ _BPiter __bpi =
+ __gnu_cxx::__detail::__find_if
+ (_S_mem_blocks.begin(), _S_mem_blocks.end(),
+ __gnu_cxx::__detail::_Functor_Ref<_FFF>(__fff));
+
+ _GLIBCXX_DEBUG_ASSERT(__bpi == _S_mem_blocks.end());
+ }
+#endif
+
+ /** @brief Responsible for exponentially growing the internal
+ * memory pool.
+ *
+ * @throw std::bad_alloc. If memory can not be allocated.
+ *
+ * @detail Complexity: O(1), but internally depends upon the
+ * complexity of the function free_list::_M_get. The part where
+ * the bitmap headers are written has complexity: O(X),where X
+ * is the number of blocks of size sizeof(value_type) within
+ * the newly acquired block. Having a tight bound.
+ */
+ void
+ _S_refill_pool() throw(std::bad_alloc)
+ {
+#if defined _GLIBCXX_DEBUG
+ _S_check_for_free_blocks();
+#endif
+
+ const size_t __num_bitmaps = (_S_block_size
+ / size_t(__detail::bits_per_block));
+ const size_t __size_to_allocate = sizeof(size_t)
+ + _S_block_size * sizeof(_Alloc_block)
+ + __num_bitmaps * sizeof(size_t);
+
+ size_t* __temp =
+ reinterpret_cast<size_t*>
+ (this->_M_get(__size_to_allocate));
+ *__temp = 0;
+ ++__temp;
+
+ // The Header information goes at the Beginning of the Block.
+ _Block_pair __bp =
+ std::make_pair(reinterpret_cast<_Alloc_block*>
+ (__temp + __num_bitmaps),
+ reinterpret_cast<_Alloc_block*>
+ (__temp + __num_bitmaps)
+ + _S_block_size - 1);
+
+ // Fill the Vector with this information.
+ _S_mem_blocks.push_back(__bp);
+
+ size_t __bit_mask = 0; // 0 Indicates all Allocated.
+ __bit_mask = ~__bit_mask; // 1 Indicates all Free.
+
+ for (size_t __i = 0; __i < __num_bitmaps; ++__i)
+ __temp[__i] = __bit_mask;
+
+ _S_block_size *= 2;
+ }
+
+
+ static _BPVector _S_mem_blocks;
+ static size_t _S_block_size;
+ static __gnu_cxx::__detail::
+ _Bitmap_counter<_Alloc_block*> _S_last_request;
+ static typename _BPVector::size_type _S_last_dealloc_index;
+#if defined __GTHREADS
+ static __mutex_type _S_mut;
+#endif
+
+ public:
+
+ /** @brief Allocates memory for a single object of size
+ * sizeof(_Tp).
+ *
+ * @throw std::bad_alloc. If memory can not be allocated.
+ *
+ * @detail Complexity: Worst case complexity is O(N), but that
+ * is hardly ever hit. If and when this particular case is
+ * encountered, the next few cases are guaranteed to have a
+ * worst case complexity of O(1)! That's why this function
+ * performs very well on average. You can consider this
+ * function to have a complexity referred to commonly as:
+ * Amortized Constant time.
+ */
+ pointer
+ _M_allocate_single_object() throw(std::bad_alloc)
+ {
+#if defined __GTHREADS
+ __gnu_cxx::__scoped_lock __bit_lock(_S_mut);
+#endif
+
+ // The algorithm is something like this: The last_request
+ // variable points to the last accessed Bit Map. When such a
+ // condition occurs, we try to find a free block in the
+ // current bitmap, or succeeding bitmaps until the last bitmap
+ // is reached. If no free block turns up, we resort to First
+ // Fit method.
+
+ // WARNING: Do not re-order the condition in the while
+ // statement below, because it relies on C++'s short-circuit
+ // evaluation. The return from _S_last_request->_M_get() will
+ // NOT be dereference able if _S_last_request->_M_finished()
+ // returns true. This would inevitably lead to a NULL pointer
+ // dereference if tinkered with.
+ while (_S_last_request._M_finished() == false
+ && (*(_S_last_request._M_get()) == 0))
+ {
+ _S_last_request.operator++();
+ }
+
+ if (__builtin_expect(_S_last_request._M_finished() == true, false))
+ {
+ // Fall Back to First Fit algorithm.
+ typedef typename
+ __gnu_cxx::__detail::_Ffit_finder<_Alloc_block*> _FFF;
+ _FFF __fff;
+ typedef typename _BPVector::iterator _BPiter;
+ _BPiter __bpi =
+ __gnu_cxx::__detail::__find_if
+ (_S_mem_blocks.begin(), _S_mem_blocks.end(),
+ __gnu_cxx::__detail::_Functor_Ref<_FFF>(__fff));
+
+ if (__bpi != _S_mem_blocks.end())
+ {
+ // Search was successful. Ok, now mark the first bit from
+ // the right as 0, meaning Allocated. This bit is obtained
+ // by calling _M_get() on __fff.
+ size_t __nz_bit = _Bit_scan_forward(*__fff._M_get());
+ __detail::__bit_allocate(__fff._M_get(), __nz_bit);
+
+ _S_last_request._M_reset(__bpi - _S_mem_blocks.begin());
+
+ // Now, get the address of the bit we marked as allocated.
+ pointer __ret = reinterpret_cast<pointer>
+ (__bpi->first + __fff._M_offset() + __nz_bit);
+ size_t* __puse_count =
+ reinterpret_cast<size_t*>
+ (__bpi->first)
+ - (__gnu_cxx::__detail::__num_bitmaps(*__bpi) + 1);
+
+ ++(*__puse_count);
+ return __ret;
+ }
+ else
+ {
+ // Search was unsuccessful. We Add more memory to the
+ // pool by calling _S_refill_pool().
+ _S_refill_pool();
+
+ // _M_Reset the _S_last_request structure to the first
+ // free block's bit map.
+ _S_last_request._M_reset(_S_mem_blocks.size() - 1);
+
+ // Now, mark that bit as allocated.
+ }
+ }
+
+ // _S_last_request holds a pointer to a valid bit map, that
+ // points to a free block in memory.
+ size_t __nz_bit = _Bit_scan_forward(*_S_last_request._M_get());
+ __detail::__bit_allocate(_S_last_request._M_get(), __nz_bit);
+
+ pointer __ret = reinterpret_cast<pointer>
+ (_S_last_request._M_base() + _S_last_request._M_offset() + __nz_bit);
+
+ size_t* __puse_count = reinterpret_cast<size_t*>
+ (_S_mem_blocks[_S_last_request._M_where()].first)
+ - (__gnu_cxx::__detail::
+ __num_bitmaps(_S_mem_blocks[_S_last_request._M_where()]) + 1);
+
+ ++(*__puse_count);
+ return __ret;
+ }
+
+ /** @brief Deallocates memory that belongs to a single object of
+ * size sizeof(_Tp).
+ *
+ * @detail Complexity: O(lg(N)), but the worst case is not hit
+ * often! This is because containers usually deallocate memory
+ * close to each other and this case is handled in O(1) time by
+ * the deallocate function.
+ */
+ void
+ _M_deallocate_single_object(pointer __p) throw()
+ {
+#if defined __GTHREADS
+ __gnu_cxx::__scoped_lock __bit_lock(_S_mut);
+#endif
+ _Alloc_block* __real_p = reinterpret_cast<_Alloc_block*>(__p);
+
+ typedef typename _BPVector::iterator _Iterator;
+ typedef typename _BPVector::difference_type _Difference_type;
+
+ _Difference_type __diff;
+ long __displacement;
+
+ _GLIBCXX_DEBUG_ASSERT(_S_last_dealloc_index >= 0);
+
+
+ if (__gnu_cxx::__detail::_Inclusive_between<_Alloc_block*>
+ (__real_p) (_S_mem_blocks[_S_last_dealloc_index]))
+ {
+ _GLIBCXX_DEBUG_ASSERT(_S_last_dealloc_index
+ <= _S_mem_blocks.size() - 1);
+
+ // Initial Assumption was correct!
+ __diff = _S_last_dealloc_index;
+ __displacement = __real_p - _S_mem_blocks[__diff].first;
+ }
+ else
+ {
+ _Iterator _iter = __gnu_cxx::__detail::
+ __find_if(_S_mem_blocks.begin(),
+ _S_mem_blocks.end(),
+ __gnu_cxx::__detail::
+ _Inclusive_between<_Alloc_block*>(__real_p));
+
+ _GLIBCXX_DEBUG_ASSERT(_iter != _S_mem_blocks.end());
+
+ __diff = _iter - _S_mem_blocks.begin();
+ __displacement = __real_p - _S_mem_blocks[__diff].first;
+ _S_last_dealloc_index = __diff;
+ }
+
+ // Get the position of the iterator that has been found.
+ const size_t __rotate = (__displacement
+ % size_t(__detail::bits_per_block));
+ size_t* __bitmapC =
+ reinterpret_cast<size_t*>
+ (_S_mem_blocks[__diff].first) - 1;
+ __bitmapC -= (__displacement / size_t(__detail::bits_per_block));
+
+ __detail::__bit_free(__bitmapC, __rotate);
+ size_t* __puse_count = reinterpret_cast<size_t*>
+ (_S_mem_blocks[__diff].first)
+ - (__gnu_cxx::__detail::__num_bitmaps(_S_mem_blocks[__diff]) + 1);
+
+ _GLIBCXX_DEBUG_ASSERT(*__puse_count != 0);
+
+ --(*__puse_count);
+
+ if (__builtin_expect(*__puse_count == 0, false))
+ {
+ _S_block_size /= 2;
+
+ // We can safely remove this block.
+ // _Block_pair __bp = _S_mem_blocks[__diff];
+ this->_M_insert(__puse_count);
+ _S_mem_blocks.erase(_S_mem_blocks.begin() + __diff);
+
+ // Reset the _S_last_request variable to reflect the
+ // erased block. We do this to protect future requests
+ // after the last block has been removed from a particular
+ // memory Chunk, which in turn has been returned to the
+ // free list, and hence had been erased from the vector,
+ // so the size of the vector gets reduced by 1.
+ if ((_Difference_type)_S_last_request._M_where() >= __diff--)
+ _S_last_request._M_reset(__diff);
+
+ // If the Index into the vector of the region of memory
+ // that might hold the next address that will be passed to
+ // deallocated may have been invalidated due to the above
+ // erase procedure being called on the vector, hence we
+ // try to restore this invariant too.
+ if (_S_last_dealloc_index >= _S_mem_blocks.size())
+ {
+ _S_last_dealloc_index =(__diff != -1 ? __diff : 0);
+ _GLIBCXX_DEBUG_ASSERT(_S_last_dealloc_index >= 0);
+ }
+ }
+ }
+
+ public:
+ bitmap_allocator() throw()
+ { }
+
+ bitmap_allocator(const bitmap_allocator&)
+ { }
+
+ template<typename _Tp1>
+ bitmap_allocator(const bitmap_allocator<_Tp1>&) throw()
+ { }
+
+ ~bitmap_allocator() throw()
+ { }
+
+ pointer
+ allocate(size_type __n)
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ if (__builtin_expect(__n == 1, true))
+ return this->_M_allocate_single_object();
+ else
+ {
+ const size_type __b = __n * sizeof(value_type);
+ return reinterpret_cast<pointer>(::operator new(__b));
+ }
+ }
+
+ pointer
+ allocate(size_type __n, typename bitmap_allocator<void>::const_pointer)
+ { return allocate(__n); }
+
+ void
+ deallocate(pointer __p, size_type __n) throw()
+ {
+ if (__builtin_expect(__p != 0, true))
+ {
+ if (__builtin_expect(__n == 1, true))
+ this->_M_deallocate_single_object(__p);
+ else
+ ::operator delete(__p);
+ }
+ }
+
+ pointer
+ address(reference __r) const
+ { return &__r; }
+
+ const_pointer
+ address(const_reference __r) const
+ { return &__r; }
+
+ size_type
+ max_size() const throw()
+ { return size_type(-1) / sizeof(value_type); }
+
+ void
+ construct(pointer __p, const_reference __data)
+ { ::new((void *)__p) value_type(__data); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p)
+ { __p->~value_type(); }
+ };
+
+ template<typename _Tp1, typename _Tp2>
+ bool
+ operator==(const bitmap_allocator<_Tp1>&,
+ const bitmap_allocator<_Tp2>&) throw()
+ { return true; }
+
+ template<typename _Tp1, typename _Tp2>
+ bool
+ operator!=(const bitmap_allocator<_Tp1>&,
+ const bitmap_allocator<_Tp2>&) throw()
+ { return false; }
+
+ // Static member definitions.
+ template<typename _Tp>
+ typename bitmap_allocator<_Tp>::_BPVector
+ bitmap_allocator<_Tp>::_S_mem_blocks;
+
+ template<typename _Tp>
+ size_t bitmap_allocator<_Tp>::_S_block_size =
+ 2 * size_t(__detail::bits_per_block);
+
+ template<typename _Tp>
+ typename __gnu_cxx::bitmap_allocator<_Tp>::_BPVector::size_type
+ bitmap_allocator<_Tp>::_S_last_dealloc_index = 0;
+
+ template<typename _Tp>
+ __gnu_cxx::__detail::_Bitmap_counter
+ <typename bitmap_allocator<_Tp>::_Alloc_block*>
+ bitmap_allocator<_Tp>::_S_last_request(_S_mem_blocks);
+
+#if defined __GTHREADS
+ template<typename _Tp>
+ typename bitmap_allocator<_Tp>::__mutex_type
+ bitmap_allocator<_Tp>::_S_mut;
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/cast.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/cast.h
new file mode 100644
index 0000000..3ffad7c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/cast.h
@@ -0,0 +1,113 @@
+// <cast.h> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef _CAST_H
+#define _CAST_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx);
+
+ /**
+ * These functions are here to allow containers to support non standard
+ * pointer types. For normal pointers, these resolve to the use of the
+ * standard cast operation. For other types the functions will perform
+ * the apprpriate cast to/from the custom pointer class so long as that
+ * class meets the following conditions:
+ * 1) has a typedef element_type which names tehe type it points to.
+ * 2) has a get() const method which returns element_type*.
+ * 3) has a constructor which can take one element_type* argument.
+ */
+
+ /**
+ * This type supports the semantics of the pointer cast operators (below.)
+ */
+ template<typename _ToType>
+ struct _Caster
+ { typedef typename _ToType::element_type* type; };
+
+ template<typename _ToType>
+ struct _Caster<_ToType*>
+ { typedef _ToType* type; };
+
+ /**
+ * Casting operations for cases where _FromType is not a standard pointer.
+ * _ToType can be a standard or non-standard pointer. Given that _FromType
+ * is not a pointer, it must have a get() method that returns the standard
+ * pointer equivalent of the address it points to, and must have an
+ * element_type typedef which names the type it points to.
+ */
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __static_pointer_cast(const _FromType& __arg)
+ { return _ToType(static_cast<typename _Caster<_ToType>::
+ type>(__arg.get())); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __dynamic_pointer_cast(const _FromType& __arg)
+ { return _ToType(dynamic_cast<typename _Caster<_ToType>::
+ type>(__arg.get())); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __const_pointer_cast(const _FromType& __arg)
+ { return _ToType(const_cast<typename _Caster<_ToType>::
+ type>(__arg.get())); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __reinterpret_pointer_cast(const _FromType& __arg)
+ { return _ToType(reinterpret_cast<typename _Caster<_ToType>::
+ type>(__arg.get())); }
+
+ /**
+ * Casting operations for cases where _FromType is a standard pointer.
+ * _ToType can be a standard or non-standard pointer.
+ */
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __static_pointer_cast(_FromType* __arg)
+ { return _ToType(static_cast<typename _Caster<_ToType>::
+ type>(__arg)); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __dynamic_pointer_cast(_FromType* __arg)
+ { return _ToType(dynamic_cast<typename _Caster<_ToType>::
+ type>(__arg)); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __const_pointer_cast(_FromType* __arg)
+ { return _ToType(const_cast<typename _Caster<_ToType>::
+ type>(__arg)); }
+
+ template<typename _ToType, typename _FromType>
+ inline _ToType
+ __reinterpret_pointer_cast(_FromType* __arg)
+ { return _ToType(reinterpret_cast<typename _Caster<_ToType>::
+ type>(__arg)); }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _CAST_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/codecvt_specializations.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/codecvt_specializations.h
new file mode 100644
index 0000000..89adb3f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/codecvt_specializations.h
@@ -0,0 +1,507 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.2.1.5 Template class codecvt
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+/** @file ext/codecvt_specializations.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _EXT_CODECVT_SPECIALIZATIONS_H
+#define _EXT_CODECVT_SPECIALIZATIONS_H 1
+
+#include <bits/c++config.h>
+#include <locale>
+#include <iconv.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /// Extension to use iconv for dealing with character encodings.
+ // This includes conversions and comparisons between various character
+ // sets. This object encapsulates data that may need to be shared between
+ // char_traits, codecvt and ctype.
+ class encoding_state
+ {
+ public:
+ // Types:
+ // NB: A conversion descriptor subsumes and enhances the
+ // functionality of a simple state type such as mbstate_t.
+ typedef iconv_t descriptor_type;
+
+ protected:
+ // Name of internal character set encoding.
+ std::string _M_int_enc;
+
+ // Name of external character set encoding.
+ std::string _M_ext_enc;
+
+ // Conversion descriptor between external encoding to internal encoding.
+ descriptor_type _M_in_desc;
+
+ // Conversion descriptor between internal encoding to external encoding.
+ descriptor_type _M_out_desc;
+
+ // The byte-order marker for the external encoding, if necessary.
+ int _M_ext_bom;
+
+ // The byte-order marker for the internal encoding, if necessary.
+ int _M_int_bom;
+
+ // Number of external bytes needed to construct one complete
+ // character in the internal encoding.
+ // NB: -1 indicates variable, or stateful, encodings.
+ int _M_bytes;
+
+ public:
+ explicit
+ encoding_state()
+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0), _M_bytes(0)
+ { }
+
+ explicit
+ encoding_state(const char* __int, const char* __ext,
+ int __ibom = 0, int __ebom = 0, int __bytes = 1)
+ : _M_int_enc(__int), _M_ext_enc(__ext), _M_in_desc(0), _M_out_desc(0),
+ _M_ext_bom(__ebom), _M_int_bom(__ibom), _M_bytes(__bytes)
+ { init(); }
+
+ // 21.1.2 traits typedefs
+ // p4
+ // typedef STATE_T state_type
+ // requires: state_type shall meet the requirements of
+ // CopyConstructible types (20.1.3)
+ // NB: This does not preserve the actual state of the conversion
+ // descriptor member, but it does duplicate the encoding
+ // information.
+ encoding_state(const encoding_state& __obj) : _M_in_desc(0), _M_out_desc(0)
+ { construct(__obj); }
+
+ // Need assignment operator as well.
+ encoding_state&
+ operator=(const encoding_state& __obj)
+ {
+ construct(__obj);
+ return *this;
+ }
+
+ ~encoding_state()
+ { destroy(); }
+
+ bool
+ good() const throw()
+ {
+ const descriptor_type __err = (iconv_t)(-1);
+ bool __test = _M_in_desc && _M_in_desc != __err;
+ __test &= _M_out_desc && _M_out_desc != __err;
+ return __test;
+ }
+
+ int
+ character_ratio() const
+ { return _M_bytes; }
+
+ const std::string
+ internal_encoding() const
+ { return _M_int_enc; }
+
+ int
+ internal_bom() const
+ { return _M_int_bom; }
+
+ const std::string
+ external_encoding() const
+ { return _M_ext_enc; }
+
+ int
+ external_bom() const
+ { return _M_ext_bom; }
+
+ const descriptor_type&
+ in_descriptor() const
+ { return _M_in_desc; }
+
+ const descriptor_type&
+ out_descriptor() const
+ { return _M_out_desc; }
+
+ protected:
+ void
+ init()
+ {
+ const descriptor_type __err = (iconv_t)(-1);
+ const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size();
+ if (!_M_in_desc && __have_encodings)
+ {
+ _M_in_desc = iconv_open(_M_int_enc.c_str(), _M_ext_enc.c_str());
+ if (_M_in_desc == __err)
+ std::__throw_runtime_error(__N("encoding_state::_M_init "
+ "creating iconv input descriptor failed"));
+ }
+ if (!_M_out_desc && __have_encodings)
+ {
+ _M_out_desc = iconv_open(_M_ext_enc.c_str(), _M_int_enc.c_str());
+ if (_M_out_desc == __err)
+ std::__throw_runtime_error(__N("encoding_state::_M_init "
+ "creating iconv output descriptor failed"));
+ }
+ }
+
+ void
+ construct(const encoding_state& __obj)
+ {
+ destroy();
+ _M_int_enc = __obj._M_int_enc;
+ _M_ext_enc = __obj._M_ext_enc;
+ _M_ext_bom = __obj._M_ext_bom;
+ _M_int_bom = __obj._M_int_bom;
+ _M_bytes = __obj._M_bytes;
+ init();
+ }
+
+ void
+ destroy() throw()
+ {
+ const descriptor_type __err = (iconv_t)(-1);
+ if (_M_in_desc && _M_in_desc != __err)
+ {
+ iconv_close(_M_in_desc);
+ _M_in_desc = 0;
+ }
+ if (_M_out_desc && _M_out_desc != __err)
+ {
+ iconv_close(_M_out_desc);
+ _M_out_desc = 0;
+ }
+ }
+ };
+
+ /// encoding_char_traits
+ // Custom traits type with encoding_state for the state type, and the
+ // associated fpos<encoding_state> for the position type, all other
+ // bits equivalent to the required char_traits instantiations.
+ template<typename _CharT>
+ struct encoding_char_traits : public std::char_traits<_CharT>
+ {
+ typedef encoding_state state_type;
+ typedef typename std::fpos<state_type> pos_type;
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ using __gnu_cxx::encoding_state;
+
+ /// codecvt<InternT, _ExternT, encoding_state> specialization.
+ // This partial specialization takes advantage of iconv to provide
+ // code conversions between a large number of character encodings.
+ template<typename _InternT, typename _ExternT>
+ class codecvt<_InternT, _ExternT, encoding_state>
+ : public __codecvt_abstract_base<_InternT, _ExternT, encoding_state>
+ {
+ public:
+ // Types:
+ typedef codecvt_base::result result;
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef __gnu_cxx::encoding_state state_type;
+ typedef state_type::descriptor_type descriptor_type;
+
+ // Data Members:
+ static locale::id id;
+
+ explicit
+ codecvt(size_t __refs = 0)
+ : __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
+ { }
+
+ explicit
+ codecvt(state_type& __enc, size_t __refs = 0)
+ : __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
+ { }
+
+ protected:
+ virtual
+ ~codecvt() { }
+
+ virtual result
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const;
+
+ virtual result
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const;
+
+ virtual result
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const;
+
+ virtual int
+ do_encoding() const throw();
+
+ virtual bool
+ do_always_noconv() const throw();
+
+ virtual int
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const;
+
+ virtual int
+ do_max_length() const throw();
+ };
+
+ template<typename _InternT, typename _ExternT>
+ locale::id
+ codecvt<_InternT, _ExternT, encoding_state>::id;
+
+ // This adaptor works around the signature problems of the second
+ // argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
+ // uses 'char**', which matches the POSIX 1003.1-2001 standard.
+ // Using this adaptor, g++ will do the work for us.
+ template<typename _Tp>
+ inline size_t
+ __iconv_adaptor(size_t(*__func)(iconv_t, _Tp, size_t*, char**, size_t*),
+ iconv_t __cd, char** __inbuf, size_t* __inbytes,
+ char** __outbuf, size_t* __outbytes)
+ { return __func(__cd, (_Tp)__inbuf, __inbytes, __outbuf, __outbytes); }
+
+ template<typename _InternT, typename _ExternT>
+ codecvt_base::result
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_out(state_type& __state, const intern_type* __from,
+ const intern_type* __from_end, const intern_type*& __from_next,
+ extern_type* __to, extern_type* __to_end,
+ extern_type*& __to_next) const
+ {
+ result __ret = codecvt_base::error;
+ if (__state.good())
+ {
+ const descriptor_type& __desc = __state.out_descriptor();
+ const size_t __fmultiple = sizeof(intern_type);
+ size_t __fbytes = __fmultiple * (__from_end - __from);
+ const size_t __tmultiple = sizeof(extern_type);
+ size_t __tbytes = __tmultiple * (__to_end - __to);
+
+ // Argument list for iconv specifies a byte sequence. Thus,
+ // all to/from arrays must be brutally casted to char*.
+ char* __cto = reinterpret_cast<char*>(__to);
+ char* __cfrom;
+ size_t __conv;
+
+ // Some encodings need a byte order marker as the first item
+ // in the byte stream, to designate endian-ness. The default
+ // value for the byte order marker is NULL, so if this is
+ // the case, it's not necessary and we can just go on our
+ // merry way.
+ int __int_bom = __state.internal_bom();
+ if (__int_bom)
+ {
+ size_t __size = __from_end - __from;
+ intern_type* __cfixed = static_cast<intern_type*>
+ (__builtin_alloca(sizeof(intern_type) * (__size + 1)));
+ __cfixed[0] = static_cast<intern_type>(__int_bom);
+ char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
+ __cfrom = reinterpret_cast<char*>(__cfixed);
+ __conv = __iconv_adaptor(iconv, __desc, &__cfrom,
+ &__fbytes, &__cto, &__tbytes);
+ }
+ else
+ {
+ intern_type* __cfixed = const_cast<intern_type*>(__from);
+ __cfrom = reinterpret_cast<char*>(__cfixed);
+ __conv = __iconv_adaptor(iconv, __desc, &__cfrom, &__fbytes,
+ &__cto, &__tbytes);
+ }
+
+ if (__conv != size_t(-1))
+ {
+ __from_next = reinterpret_cast<const intern_type*>(__cfrom);
+ __to_next = reinterpret_cast<extern_type*>(__cto);
+ __ret = codecvt_base::ok;
+ }
+ else
+ {
+ if (__fbytes < __fmultiple * (__from_end - __from))
+ {
+ __from_next = reinterpret_cast<const intern_type*>(__cfrom);
+ __to_next = reinterpret_cast<extern_type*>(__cto);
+ __ret = codecvt_base::partial;
+ }
+ else
+ __ret = codecvt_base::error;
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _InternT, typename _ExternT>
+ codecvt_base::result
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_unshift(state_type& __state, extern_type* __to,
+ extern_type* __to_end, extern_type*& __to_next) const
+ {
+ result __ret = codecvt_base::error;
+ if (__state.good())
+ {
+ const descriptor_type& __desc = __state.in_descriptor();
+ const size_t __tmultiple = sizeof(intern_type);
+ size_t __tlen = __tmultiple * (__to_end - __to);
+
+ // Argument list for iconv specifies a byte sequence. Thus,
+ // all to/from arrays must be brutally casted to char*.
+ char* __cto = reinterpret_cast<char*>(__to);
+ size_t __conv = __iconv_adaptor(iconv,__desc, NULL, NULL,
+ &__cto, &__tlen);
+
+ if (__conv != size_t(-1))
+ {
+ __to_next = reinterpret_cast<extern_type*>(__cto);
+ if (__tlen == __tmultiple * (__to_end - __to))
+ __ret = codecvt_base::noconv;
+ else if (__tlen == 0)
+ __ret = codecvt_base::ok;
+ else
+ __ret = codecvt_base::partial;
+ }
+ else
+ __ret = codecvt_base::error;
+ }
+ return __ret;
+ }
+
+ template<typename _InternT, typename _ExternT>
+ codecvt_base::result
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_in(state_type& __state, const extern_type* __from,
+ const extern_type* __from_end, const extern_type*& __from_next,
+ intern_type* __to, intern_type* __to_end,
+ intern_type*& __to_next) const
+ {
+ result __ret = codecvt_base::error;
+ if (__state.good())
+ {
+ const descriptor_type& __desc = __state.in_descriptor();
+ const size_t __fmultiple = sizeof(extern_type);
+ size_t __flen = __fmultiple * (__from_end - __from);
+ const size_t __tmultiple = sizeof(intern_type);
+ size_t __tlen = __tmultiple * (__to_end - __to);
+
+ // Argument list for iconv specifies a byte sequence. Thus,
+ // all to/from arrays must be brutally casted to char*.
+ char* __cto = reinterpret_cast<char*>(__to);
+ char* __cfrom;
+ size_t __conv;
+
+ // Some encodings need a byte order marker as the first item
+ // in the byte stream, to designate endian-ness. The default
+ // value for the byte order marker is NULL, so if this is
+ // the case, it's not necessary and we can just go on our
+ // merry way.
+ int __ext_bom = __state.external_bom();
+ if (__ext_bom)
+ {
+ size_t __size = __from_end - __from;
+ extern_type* __cfixed = static_cast<extern_type*>
+ (__builtin_alloca(sizeof(extern_type) * (__size + 1)));
+ __cfixed[0] = static_cast<extern_type>(__ext_bom);
+ char_traits<extern_type>::copy(__cfixed + 1, __from, __size);
+ __cfrom = reinterpret_cast<char*>(__cfixed);
+ __conv = __iconv_adaptor(iconv, __desc, &__cfrom,
+ &__flen, &__cto, &__tlen);
+ }
+ else
+ {
+ extern_type* __cfixed = const_cast<extern_type*>(__from);
+ __cfrom = reinterpret_cast<char*>(__cfixed);
+ __conv = __iconv_adaptor(iconv, __desc, &__cfrom,
+ &__flen, &__cto, &__tlen);
+ }
+
+
+ if (__conv != size_t(-1))
+ {
+ __from_next = reinterpret_cast<const extern_type*>(__cfrom);
+ __to_next = reinterpret_cast<intern_type*>(__cto);
+ __ret = codecvt_base::ok;
+ }
+ else
+ {
+ if (__flen < static_cast<size_t>(__from_end - __from))
+ {
+ __from_next = reinterpret_cast<const extern_type*>(__cfrom);
+ __to_next = reinterpret_cast<intern_type*>(__cto);
+ __ret = codecvt_base::partial;
+ }
+ else
+ __ret = codecvt_base::error;
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _InternT, typename _ExternT>
+ int
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_encoding() const throw()
+ {
+ int __ret = 0;
+ if (sizeof(_ExternT) <= sizeof(_InternT))
+ __ret = sizeof(_InternT) / sizeof(_ExternT);
+ return __ret;
+ }
+
+ template<typename _InternT, typename _ExternT>
+ bool
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_always_noconv() const throw()
+ { return false; }
+
+ template<typename _InternT, typename _ExternT>
+ int
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_length(state_type&, const extern_type* __from,
+ const extern_type* __end, size_t __max) const
+ { return std::min(__max, static_cast<size_t>(__end - __from)); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 74. Garbled text for codecvt::do_max_length
+ template<typename _InternT, typename _ExternT>
+ int
+ codecvt<_InternT, _ExternT, encoding_state>::
+ do_max_length() const throw()
+ { return 1; }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/concurrence.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/concurrence.h
new file mode 100644
index 0000000..71f8cd0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/concurrence.h
@@ -0,0 +1,322 @@
+// Support for concurrent programing -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file concurrence.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _CONCURRENCE_H
+#define _CONCURRENCE_H 1
+
+#include <exception>
+#include <bits/gthr.h>
+#include <bits/functexcept.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Available locking policies:
+ // _S_single single-threaded code that doesn't need to be locked.
+ // _S_mutex multi-threaded code that requires additional support
+ // from gthr.h or abstraction layers in concurrence.h.
+ // _S_atomic multi-threaded code using atomic operations.
+ enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
+
+ // Compile time constant that indicates prefered locking policy in
+ // the current configuration.
+ static const _Lock_policy __default_lock_policy =
+#ifdef __GTHREADS
+#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \
+ && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4))
+ _S_atomic;
+#else
+ _S_mutex;
+#endif
+#else
+ _S_single;
+#endif
+
+ // NB: As this is used in libsupc++, need to only depend on
+ // exception. No stdexception classes, no use of std::string.
+ class __concurrence_lock_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_lock_error"; }
+ };
+
+ class __concurrence_unlock_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_unlock_error"; }
+ };
+
+ class __concurrence_broadcast_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_broadcast_error"; }
+ };
+
+ class __concurrence_wait_error : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+ { return "__gnu_cxx::__concurrence_wait_error"; }
+ };
+
+ // Substitute for concurrence_error object in the case of -fno-exceptions.
+ inline void
+ __throw_concurrence_lock_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_lock_error();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ inline void
+ __throw_concurrence_unlock_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_unlock_error();
+#else
+ __builtin_abort();
+#endif
+ }
+
+#ifdef __GTHREAD_HAS_COND
+ inline void
+ __throw_concurrence_broadcast_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_broadcast_error();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ inline void
+ __throw_concurrence_wait_error()
+ {
+#if __EXCEPTIONS
+ throw __concurrence_wait_error();
+#else
+ __builtin_abort();
+#endif
+ }
+#endif
+
+ class __mutex
+ {
+ private:
+ __gthread_mutex_t _M_mutex;
+
+ __mutex(const __mutex&);
+ __mutex& operator=(const __mutex&);
+
+ public:
+ __mutex()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+#if defined __GTHREAD_MUTEX_INIT
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+#endif
+ }
+
+ void lock()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_mutex_lock(&_M_mutex) != 0)
+ __throw_concurrence_lock_error();
+ }
+#endif
+ }
+
+ void unlock()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_mutex_unlock(&_M_mutex) != 0)
+ __throw_concurrence_unlock_error();
+ }
+#endif
+ }
+
+ __gthread_mutex_t* gthread_mutex(void)
+ { return &_M_mutex; }
+ };
+
+ class __recursive_mutex
+ {
+ private:
+ __gthread_recursive_mutex_t _M_mutex;
+
+ __recursive_mutex(const __recursive_mutex&);
+ __recursive_mutex& operator=(const __recursive_mutex&);
+
+ public:
+ __recursive_mutex()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+#if defined __GTHREAD_RECURSIVE_MUTEX_INIT
+ __gthread_recursive_mutex_t __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+#endif
+ }
+
+ void lock()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_recursive_mutex_lock(&_M_mutex) != 0)
+ __throw_concurrence_lock_error();
+ }
+#endif
+ }
+
+ void unlock()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0)
+ __throw_concurrence_unlock_error();
+ }
+#endif
+ }
+
+ __gthread_recursive_mutex_t* gthread_recursive_mutex(void)
+ { return &_M_mutex; }
+ };
+
+ /// Scoped lock idiom.
+ // Acquire the mutex here with a constructor call, then release with
+ // the destructor call in accordance with RAII style.
+ class __scoped_lock
+ {
+ public:
+ typedef __mutex __mutex_type;
+
+ private:
+ __mutex_type& _M_device;
+
+ __scoped_lock(const __scoped_lock&);
+ __scoped_lock& operator=(const __scoped_lock&);
+
+ public:
+ explicit __scoped_lock(__mutex_type& __name) : _M_device(__name)
+ { _M_device.lock(); }
+
+ ~__scoped_lock() throw()
+ { _M_device.unlock(); }
+ };
+
+#ifdef __GTHREAD_HAS_COND
+ class __cond
+ {
+ private:
+ __gthread_cond_t _M_cond;
+
+ __cond(const __cond&);
+ __cond& operator=(const __cond&);
+
+ public:
+ __cond()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+#if defined __GTHREAD_COND_INIT
+ __gthread_cond_t __tmp = __GTHREAD_COND_INIT;
+ _M_cond = __tmp;
+#else
+ __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
+#endif
+ }
+#endif
+ }
+
+ void broadcast()
+ {
+#if __GTHREADS
+ if (__gthread_active_p())
+ {
+ if (__gthread_cond_broadcast(&_M_cond) != 0)
+ __throw_concurrence_broadcast_error();
+ }
+#endif
+ }
+
+ void wait(__mutex *mutex)
+ {
+#if __GTHREADS
+ {
+ if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0)
+ __throw_concurrence_wait_error();
+ }
+#endif
+ }
+
+ void wait_recursive(__recursive_mutex *mutex)
+ {
+#if __GTHREADS
+ {
+ if (__gthread_cond_wait_recursive(&_M_cond,
+ mutex->gthread_recursive_mutex())
+ != 0)
+ __throw_concurrence_wait_error();
+ }
+#endif
+ }
+ };
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/debug_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/debug_allocator.h
new file mode 100644
index 0000000..18d8049
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/debug_allocator.h
@@ -0,0 +1,124 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * 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.
+ */
+
+/** @file ext/debug_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * You should only include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _DEBUG_ALLOCATOR_H
+#define _DEBUG_ALLOCATOR_H 1
+
+#include <stdexcept>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+
+ /**
+ * @brief A meta-allocator with debugging bits, as per [20.4].
+ * @ingroup allocators
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls operator new
+ * - all deallocation calls operator delete
+ */
+ template<typename _Alloc>
+ class debug_allocator
+ {
+ public:
+ typedef typename _Alloc::size_type size_type;
+ typedef typename _Alloc::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ typedef typename _Alloc::value_type value_type;
+
+ private:
+ // _M_extra is the number of objects that correspond to the
+ // extra space where debug information is stored.
+ size_type _M_extra;
+
+ _Alloc _M_allocator;
+
+ public:
+ debug_allocator()
+ {
+ const size_t __obj_size = sizeof(value_type);
+ _M_extra = (sizeof(size_type) + __obj_size - 1) / __obj_size;
+ }
+
+ pointer
+ allocate(size_type __n)
+ {
+ pointer __res = _M_allocator.allocate(__n + _M_extra);
+ size_type* __ps = reinterpret_cast<size_type*>(__res);
+ *__ps = __n;
+ return __res + _M_extra;
+ }
+
+ pointer
+ allocate(size_type __n, const void* __hint)
+ {
+ pointer __res = _M_allocator.allocate(__n + _M_extra, __hint);
+ size_type* __ps = reinterpret_cast<size_type*>(__res);
+ *__ps = __n;
+ return __res + _M_extra;
+ }
+
+ void
+ deallocate(pointer __p, size_type __n)
+ {
+ if (__p)
+ {
+ pointer __real_p = __p - _M_extra;
+ if (*reinterpret_cast<size_type*>(__real_p) != __n)
+ {
+ throw std::runtime_error("debug_allocator::deallocate"
+ " wrong size");
+ }
+ _M_allocator.deallocate(__real_p, __n + _M_extra);
+ }
+ else
+ throw std::runtime_error("debug_allocator::deallocate null pointer");
+ }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/enc_filebuf.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/enc_filebuf.h
new file mode 100644
index 0000000..4f83567
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/enc_filebuf.h
@@ -0,0 +1,62 @@
+// filebuf with encoding state type -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/enc_filebuf.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _EXT_ENC_FILEBUF_H
+#define _EXT_ENC_FILEBUF_H 1
+
+#include <fstream>
+#include <locale>
+#include <ext/codecvt_specializations.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /// class enc_filebuf.
+ template<typename _CharT>
+ class enc_filebuf
+ : public std::basic_filebuf<_CharT, encoding_char_traits<_CharT> >
+ {
+ public:
+ typedef encoding_char_traits<_CharT> traits_type;
+ typedef typename traits_type::state_type state_type;
+ typedef typename traits_type::pos_type pos_type;
+
+ enc_filebuf(state_type& __state)
+ : std::basic_filebuf<_CharT, encoding_char_traits<_CharT> >()
+ { this->_M_state_beg = __state; }
+
+ private:
+ // concept requirements:
+ // Set state type to something useful.
+ // Something more than copyconstructible is needed here, so
+ // require default and copy constructible + assignment operator.
+ __glibcxx_class_requires(state_type, _SGIAssignableConcept)
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/extptr_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/extptr_allocator.h
new file mode 100644
index 0000000..fab6b1d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/extptr_allocator.h
@@ -0,0 +1,176 @@
+// <extptr_allocator.h> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file ext/extptr_allocator.h
+ * @author Bob Walters
+ *
+ * An example allocator which uses an alternative pointer type from
+ * bits/pointer.h. Supports test cases which confirm container support
+ * for alternative pointers.
+ */
+
+#ifndef _EXTPTR_ALLOCATOR_H
+#define _EXTPTR_ALLOCATOR_H 1
+
+#include <memory>
+#include <limits>
+#include <ext/pointer.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @brief An example allocator which uses a non-standard pointer type.
+ * @ingroup allocators
+ *
+ * This allocator specifies that containers use a 'relative pointer' as it's
+ * pointer type. (See ext/pointer.h) Memory allocation in this example
+ * is still performed using std::allocator.
+ */
+ template<typename _Tp>
+ class _ExtPtr_allocator
+ {
+ public:
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ // Note the non-standard pointer types.
+ typedef _Pointer_adapter<_Relative_pointer_impl<_Tp> > pointer;
+ typedef _Pointer_adapter<_Relative_pointer_impl<const _Tp> >
+ const_pointer;
+
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Up>
+ struct rebind
+ { typedef _ExtPtr_allocator<_Up> other; };
+
+ _ExtPtr_allocator() throw()
+ : _M_real_alloc() { }
+
+ _ExtPtr_allocator(const _ExtPtr_allocator &__rarg) throw()
+ : _M_real_alloc(__rarg._M_real_alloc) { }
+
+ template<typename _Up>
+ _ExtPtr_allocator(const _ExtPtr_allocator<_Up>& __rarg) throw()
+ : _M_real_alloc(__rarg._M_getUnderlyingImp()) { }
+
+ ~_ExtPtr_allocator() throw()
+ { }
+
+ pointer address(reference __x) const
+ { return &__x; }
+
+ const_pointer address(const_reference __x) const
+ { return &__x; }
+
+ pointer allocate(size_type __n, void* __hint = 0)
+ { return _M_real_alloc.allocate(__n,__hint); }
+
+ void deallocate(pointer __p, size_type __n)
+ { _M_real_alloc.deallocate(__p.get(), __n); }
+
+ size_type max_size() const throw()
+ { return std::numeric_limits<size_type>::max() / sizeof(_Tp); }
+
+ void construct(pointer __p, const _Tp& __val)
+ { ::new(__p.get()) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new(__p.get()) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void destroy(pointer __p)
+ { __p->~_Tp(); }
+
+ template<typename _Up>
+ inline bool
+ operator==(const _ExtPtr_allocator<_Up>& __rarg)
+ { return _M_real_alloc == __rarg._M_getUnderlyingImp(); }
+
+ inline bool
+ operator==(const _ExtPtr_allocator& __rarg)
+ { return _M_real_alloc == __rarg._M_real_alloc; }
+
+ template<typename _Up>
+ inline bool
+ operator!=(const _ExtPtr_allocator<_Up>& __rarg)
+ { return _M_real_alloc != __rarg._M_getUnderlyingImp(); }
+
+ inline bool
+ operator!=(const _ExtPtr_allocator& __rarg)
+ { return _M_real_alloc != __rarg._M_real_alloc; }
+
+ template<typename _Up>
+ inline friend void
+ swap(_ExtPtr_allocator<_Up>&, _ExtPtr_allocator<_Up>&);
+
+ // A method specific to this implementation.
+ const std::allocator<_Tp>&
+ _M_getUnderlyingImp() const
+ { return _M_real_alloc; }
+
+ private:
+ std::allocator<_Tp> _M_real_alloc;
+ };
+
+ // _ExtPtr_allocator<void> specialization.
+ template<>
+ class _ExtPtr_allocator<void>
+ {
+ public:
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void value_type;
+
+ // Note the non-standard pointer types
+ typedef _Pointer_adapter<_Relative_pointer_impl<void> > pointer;
+ typedef _Pointer_adapter<_Relative_pointer_impl<const void> >
+ const_pointer;
+
+ template<typename _Up>
+ struct rebind
+ { typedef _ExtPtr_allocator<_Up> other; };
+
+ private:
+ std::allocator<void> _M_real_alloc;
+ };
+
+ template<typename _Tp>
+ inline void
+ swap(_ExtPtr_allocator<_Tp>& __larg, _ExtPtr_allocator<_Tp>& __rarg)
+ {
+ std::allocator<_Tp> __tmp( __rarg._M_real_alloc );
+ __rarg._M_real_alloc = __larg._M_real_alloc;
+ __larg._M_real_alloc = __tmp;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _EXTPTR_ALLOCATOR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/functional b/6/sources/cxx-stl/gnu-libstdc++/include/ext/functional
new file mode 100644
index 0000000..30afd58
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/functional
@@ -0,0 +1,425 @@
+// Functional extensions -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file ext/functional
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _EXT_FUNCTIONAL
+#define _EXT_FUNCTIONAL 1
+
+#pragma GCC system_header
+
+#include <functional>
+#include <cstddef>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::unary_function;
+ using std::binary_function;
+ using std::mem_fun1_t;
+ using std::const_mem_fun1_t;
+ using std::mem_fun1_ref_t;
+ using std::const_mem_fun1_ref_t;
+
+ /** The @c identity_element functions are not part of the C++
+ * standard; SGI provided them as an extension. Its argument is an
+ * operation, and its return value is the identity element for that
+ * operation. It is overloaded for addition and multiplication,
+ * and you can overload it for your own nefarious operations.
+ *
+ * @addtogroup SGIextensions
+ * @{
+ */
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Tp>
+ inline _Tp
+ identity_element(std::plus<_Tp>)
+ { return _Tp(0); }
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Tp>
+ inline _Tp
+ identity_element(std::multiplies<_Tp>)
+ { return _Tp(1); }
+ /** @} */
+
+ /** As an extension to the binders, SGI provided composition functors and
+ * wrapper functions to aid in their creation. The @c unary_compose
+ * functor is constructed from two functions/functors, @c f and @c g.
+ * Calling @c operator() with a single argument @c x returns @c f(g(x)).
+ * The function @c compose1 takes the two functions and constructs a
+ * @c unary_compose variable for you.
+ *
+ * @c binary_compose is constructed from three functors, @c f, @c g1,
+ * and @c g2. Its @c operator() returns @c f(g1(x),g2(x)). The function
+ * @compose2 takes f, g1, and g2, and constructs the @c binary_compose
+ * instance for you. For example, if @c f returns an int, then
+ * \code
+ * int answer = (compose2(f,g1,g2))(x);
+ * \endcode
+ * is equivalent to
+ * \code
+ * int temp1 = g1(x);
+ * int temp2 = g2(x);
+ * int answer = f(temp1,temp2);
+ * \endcode
+ * But the first form is more compact, and can be passed around as a
+ * functor to other algorithms.
+ *
+ * @addtogroup SGIextensions
+ * @{
+ */
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Operation1, class _Operation2>
+ class unary_compose
+ : public unary_function<typename _Operation2::argument_type,
+ typename _Operation1::result_type>
+ {
+ protected:
+ _Operation1 _M_fn1;
+ _Operation2 _M_fn2;
+
+ public:
+ unary_compose(const _Operation1& __x, const _Operation2& __y)
+ : _M_fn1(__x), _M_fn2(__y) {}
+
+ typename _Operation1::result_type
+ operator()(const typename _Operation2::argument_type& __x) const
+ { return _M_fn1(_M_fn2(__x)); }
+ };
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Operation1, class _Operation2>
+ inline unary_compose<_Operation1, _Operation2>
+ compose1(const _Operation1& __fn1, const _Operation2& __fn2)
+ { return unary_compose<_Operation1,_Operation2>(__fn1, __fn2); }
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Operation1, class _Operation2, class _Operation3>
+ class binary_compose
+ : public unary_function<typename _Operation2::argument_type,
+ typename _Operation1::result_type>
+ {
+ protected:
+ _Operation1 _M_fn1;
+ _Operation2 _M_fn2;
+ _Operation3 _M_fn3;
+
+ public:
+ binary_compose(const _Operation1& __x, const _Operation2& __y,
+ const _Operation3& __z)
+ : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
+
+ typename _Operation1::result_type
+ operator()(const typename _Operation2::argument_type& __x) const
+ { return _M_fn1(_M_fn2(__x), _M_fn3(__x)); }
+ };
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Operation1, class _Operation2, class _Operation3>
+ inline binary_compose<_Operation1, _Operation2, _Operation3>
+ compose2(const _Operation1& __fn1, const _Operation2& __fn2,
+ const _Operation3& __fn3)
+ { return binary_compose<_Operation1, _Operation2, _Operation3>
+ (__fn1, __fn2, __fn3); }
+ /** @} */
+
+ /** As an extension, SGI provided a functor called @c identity. When a
+ * functor is required but no operations are desired, this can be used as a
+ * pass-through. Its @c operator() returns its argument unchanged.
+ *
+ * @addtogroup SGIextensions
+ */
+ template <class _Tp>
+ struct identity : public std::_Identity<_Tp> {};
+
+ /** @c select1st and @c select2nd are extensions provided by SGI. Their
+ * @c operator()s
+ * take a @c std::pair as an argument, and return either the first member
+ * or the second member, respectively. They can be used (especially with
+ * the composition functors) to "strip" data from a sequence before
+ * performing the remainder of an algorithm.
+ *
+ * @addtogroup SGIextensions
+ * @{
+ */
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Pair>
+ struct select1st : public std::_Select1st<_Pair> {};
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Pair>
+ struct select2nd : public std::_Select2nd<_Pair> {};
+ /** @} */
+
+ // extension documented next
+ template <class _Arg1, class _Arg2>
+ struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1>
+ {
+ _Arg1
+ operator()(const _Arg1& __x, const _Arg2&) const
+ { return __x; }
+ };
+
+ template <class _Arg1, class _Arg2>
+ struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2>
+ {
+ _Arg2
+ operator()(const _Arg1&, const _Arg2& __y) const
+ { return __y; }
+ };
+
+ /** The @c operator() of the @c project1st functor takes two arbitrary
+ * arguments and returns the first one, while @c project2nd returns the
+ * second one. They are extensions provided by SGI.
+ *
+ * @addtogroup SGIextensions
+ * @{
+ */
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Arg1, class _Arg2>
+ struct project1st : public _Project1st<_Arg1, _Arg2> {};
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Arg1, class _Arg2>
+ struct project2nd : public _Project2nd<_Arg1, _Arg2> {};
+ /** @} */
+
+ // extension documented next
+ template <class _Result>
+ struct _Constant_void_fun
+ {
+ typedef _Result result_type;
+ result_type _M_val;
+
+ _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
+
+ const result_type&
+ operator()() const
+ { return _M_val; }
+ };
+
+ template <class _Result, class _Argument>
+ struct _Constant_unary_fun
+ {
+ typedef _Argument argument_type;
+ typedef _Result result_type;
+ result_type _M_val;
+
+ _Constant_unary_fun(const result_type& __v) : _M_val(__v) {}
+
+ const result_type&
+ operator()(const _Argument&) const
+ { return _M_val; }
+ };
+
+ template <class _Result, class _Arg1, class _Arg2>
+ struct _Constant_binary_fun
+ {
+ typedef _Arg1 first_argument_type;
+ typedef _Arg2 second_argument_type;
+ typedef _Result result_type;
+ _Result _M_val;
+
+ _Constant_binary_fun(const _Result& __v) : _M_val(__v) {}
+
+ const result_type&
+ operator()(const _Arg1&, const _Arg2&) const
+ { return _M_val; }
+ };
+
+ /** These three functors are each constructed from a single arbitrary
+ * variable/value. Later, their @c operator()s completely ignore any
+ * arguments passed, and return the stored value.
+ * - @c constant_void_fun's @c operator() takes no arguments
+ * - @c constant_unary_fun's @c operator() takes one argument (ignored)
+ * - @c constant_binary_fun's @c operator() takes two arguments (ignored)
+ *
+ * The helper creator functions @c constant0, @c constant1, and
+ * @c constant2 each take a "result" argument and construct variables of
+ * the appropriate functor type.
+ *
+ * @addtogroup SGIextensions
+ * @{
+ */
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result>
+ struct constant_void_fun
+ : public _Constant_void_fun<_Result>
+ {
+ constant_void_fun(const _Result& __v)
+ : _Constant_void_fun<_Result>(__v) {}
+ };
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result, class _Argument = _Result>
+ struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument>
+ {
+ constant_unary_fun(const _Result& __v)
+ : _Constant_unary_fun<_Result, _Argument>(__v) {}
+ };
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result, class _Arg1 = _Result, class _Arg2 = _Arg1>
+ struct constant_binary_fun
+ : public _Constant_binary_fun<_Result, _Arg1, _Arg2>
+ {
+ constant_binary_fun(const _Result& __v)
+ : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
+ };
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result>
+ inline constant_void_fun<_Result>
+ constant0(const _Result& __val)
+ { return constant_void_fun<_Result>(__val); }
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result>
+ inline constant_unary_fun<_Result, _Result>
+ constant1(const _Result& __val)
+ { return constant_unary_fun<_Result, _Result>(__val); }
+
+ /// An \link SGIextensions SGI extension \endlink.
+ template <class _Result>
+ inline constant_binary_fun<_Result,_Result,_Result>
+ constant2(const _Result& __val)
+ { return constant_binary_fun<_Result, _Result, _Result>(__val); }
+ /** @} */
+
+ /** The @c subtractive_rng class is documented on
+ * <a href="http://www.sgi.com/tech/stl/">SGI's site</a>.
+ * Note that this code assumes that @c int is 32 bits.
+ *
+ * @ingroup SGIextensions
+ */
+ class subtractive_rng
+ : public unary_function<unsigned int, unsigned int>
+ {
+ private:
+ unsigned int _M_table[55];
+ size_t _M_index1;
+ size_t _M_index2;
+
+ public:
+ /// Returns a number less than the argument.
+ unsigned int
+ operator()(unsigned int __limit)
+ {
+ _M_index1 = (_M_index1 + 1) % 55;
+ _M_index2 = (_M_index2 + 1) % 55;
+ _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
+ return _M_table[_M_index1] % __limit;
+ }
+
+ void
+ _M_initialize(unsigned int __seed)
+ {
+ unsigned int __k = 1;
+ _M_table[54] = __seed;
+ size_t __i;
+ for (__i = 0; __i < 54; __i++)
+ {
+ size_t __ii = (21 * (__i + 1) % 55) - 1;
+ _M_table[__ii] = __k;
+ __k = __seed - __k;
+ __seed = _M_table[__ii];
+ }
+ for (int __loop = 0; __loop < 4; __loop++)
+ {
+ for (__i = 0; __i < 55; __i++)
+ _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
+ }
+ _M_index1 = 0;
+ _M_index2 = 31;
+ }
+
+ /// Ctor allowing you to initialize the seed.
+ subtractive_rng(unsigned int __seed)
+ { _M_initialize(__seed); }
+
+ /// Default ctor; initializes its state with some number you don't see.
+ subtractive_rng()
+ { _M_initialize(161803398u); }
+ };
+
+ // Mem_fun adaptor helper functions mem_fun1 and mem_fun1_ref,
+ // provided for backward compatibility, they are no longer part of
+ // the C++ standard.
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun1(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline const_mem_fun1_t<_Ret, _Tp, _Arg>
+ mem_fun1(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun1_ref(_Ret (_Tp::*__f)(_Arg))
+ { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+ template <class _Ret, class _Tp, class _Arg>
+ inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
+ mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
+ { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_map b/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_map
new file mode 100644
index 0000000..7f5c2c5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_map
@@ -0,0 +1,593 @@
+// Hashing map implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hash_map
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_MAP
+#define _HASH_MAP 1
+
+#ifndef _GLIBCXX_PERMIT_BACKWARD_HASH
+#include "backward_warning.h"
+#endif
+
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Select1st;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp, class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
+ class hash_map
+ {
+ private:
+ typedef hashtable<pair<const _Key, _Tp>,_Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >,
+ _EqualKey, _Alloc> _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_map()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_map(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_map& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_unique_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ _Tp&
+ operator[](const key_type& __key)
+ { return _M_ht.find_or_insert(value_type(__key, _Tp())).second; }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator==(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline bool
+ operator!=(const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ const hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_map<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Key, class _Tp,
+ class _HashFn = hash<_Key>,
+ class _EqualKey = equal_to<_Key>,
+ class _Alloc = allocator<_Tp> >
+ class hash_multimap
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Key, _SGIAssignableConcept)
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFn, size_t, _Key, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFn,
+ _Select1st<pair<const _Key, _Tp> >, _EqualKey, _Alloc>
+ _Ht;
+
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multimap()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multimap(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multimap& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _K1, class _T1, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
+ const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
+
+ iterator
+ begin()
+ { return _M_ht.begin(); }
+
+ iterator
+ end()
+ { return _M_ht.end(); }
+
+ const_iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ const_iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key)
+ { return _M_ht.find(__key); }
+
+ const_iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key)
+ { return _M_ht.equal_range(__key); }
+
+ pair<const_iterator, const_iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator==(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return __hm1._M_ht == __hm2._M_ht; }
+
+ template<class _Key, class _Tp, class _HF, class _EqKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm1,
+ const hash_multimap<_Key, _Tp, _HF, _EqKey, _Alloc>& __hm2)
+ { return !(__hm1 == __hm2); }
+
+ template<class _Key, class _Tp, class _HashFn, class _EqlKey, class _Alloc>
+ inline void
+ swap(hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm1,
+ hash_multimap<_Key, _Tp, _HashFn, _EqlKey, _Alloc>& __hm2)
+ { __hm1.swap(__hm2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_map
+ // and hash_multimap.
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++() { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn,
+ _EqKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_set b/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_set
new file mode 100644
index 0000000..8e365bd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/hash_set
@@ -0,0 +1,561 @@
+// Hashing set implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1996
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/** @file backward/hash_set
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _HASH_SET
+#define _HASH_SET 1
+
+#ifndef _GLIBCXX_PERMIT_BACKWARD_HASH
+#include "backward_warning.h"
+#endif
+
+#include <bits/c++config.h>
+#include <backward/hashtable.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::equal_to;
+ using std::allocator;
+ using std::pair;
+ using std::_Identity;
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value, class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_set
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_set()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_set(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+
+ template<class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_set& __hs)
+ { _M_ht.swap(__hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_set<_Val, _HF, _EqK, _Al>&,
+ const hash_set<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ pair<iterator, bool>
+ insert(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p = _M_ht.insert_unique(__obj);
+ return pair<iterator,bool>(__p.first, __p.second);
+ }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+
+ pair<iterator, bool>
+ insert_noresize(const value_type& __obj)
+ {
+ pair<typename _Ht::iterator, bool> __p
+ = _M_ht.insert_unique_noresize(__obj);
+ return pair<iterator, bool>(__p.first, __p.second);
+ }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ {return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_set<_Value, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_set<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<class _Value,
+ class _HashFcn = hash<_Value>,
+ class _EqualKey = equal_to<_Value>,
+ class _Alloc = allocator<_Value> >
+ class hash_multiset
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Value, _SGIAssignableConcept)
+ __glibcxx_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept)
+ __glibcxx_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept)
+
+ private:
+ typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>,
+ _EqualKey, _Alloc> _Ht;
+ _Ht _M_ht;
+
+ public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::const_pointer const_pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+
+ typedef typename _Ht::const_iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher
+ hash_funct() const
+ { return _M_ht.hash_funct(); }
+
+ key_equal
+ key_eq() const
+ { return _M_ht.key_eq(); }
+
+ allocator_type
+ get_allocator() const
+ { return _M_ht.get_allocator(); }
+
+ hash_multiset()
+ : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+
+ explicit
+ hash_multiset(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l)
+ : _M_ht(100, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template<class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ size_type
+ size() const
+ { return _M_ht.size(); }
+
+ size_type
+ max_size() const
+ { return _M_ht.max_size(); }
+
+ bool
+ empty() const
+ { return _M_ht.empty(); }
+
+ void
+ swap(hash_multiset& hs)
+ { _M_ht.swap(hs._M_ht); }
+
+ template<class _Val, class _HF, class _EqK, class _Al>
+ friend bool
+ operator==(const hash_multiset<_Val, _HF, _EqK, _Al>&,
+ const hash_multiset<_Val, _HF, _EqK, _Al>&);
+
+ iterator
+ begin() const
+ { return _M_ht.begin(); }
+
+ iterator
+ end() const
+ { return _M_ht.end(); }
+
+ iterator
+ insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+
+ template<class _InputIterator>
+ void
+ insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+
+ iterator
+ insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ iterator
+ find(const key_type& __key) const
+ { return _M_ht.find(__key); }
+
+ size_type
+ count(const key_type& __key) const
+ { return _M_ht.count(__key); }
+
+ pair<iterator, iterator>
+ equal_range(const key_type& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type
+ erase(const key_type& __key)
+ { return _M_ht.erase(__key); }
+
+ void
+ erase(iterator __it)
+ { _M_ht.erase(__it); }
+
+ void
+ erase(iterator __f, iterator __l)
+ { _M_ht.erase(__f, __l); }
+
+ void
+ clear()
+ { _M_ht.clear(); }
+
+ void
+ resize(size_type __hint)
+ { _M_ht.resize(__hint); }
+
+ size_type
+ bucket_count() const
+ { return _M_ht.bucket_count(); }
+
+ size_type
+ max_bucket_count() const
+ { return _M_ht.max_bucket_count(); }
+
+ size_type
+ elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+ };
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator==(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return __hs1._M_ht == __hs2._M_ht; }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline bool
+ operator!=(const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ const hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { return !(__hs1 == __hs2); }
+
+ template<class _Val, class _HashFcn, class _EqualKey, class _Alloc>
+ inline void
+ swap(hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs1,
+ hash_multiset<_Val, _HashFcn, _EqualKey, _Alloc>& __hs2)
+ { __hs1.swap(__hs2); }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that it will work for hash_set
+ // and hash_multiset.
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+ template<class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+ class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn,
+ _EqualKey, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>
+ _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x)
+ : container(&__x) {}
+
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ container->insert(__value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int) { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/iterator b/6/sources/cxx-stl/gnu-libstdc++/include/ext/iterator
new file mode 100644
index 0000000..83b4b57
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/iterator
@@ -0,0 +1,113 @@
+// HP/SGI iterator extensions -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * 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.
+ */
+
+/** @file ext/iterator
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _EXT_ITERATOR
+#define _EXT_ITERATOR 1
+
+#pragma GCC system_header
+
+#include <bits/concept_check.h>
+#include <iterator>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // There are two signatures for distance. In addition to the one
+ // taking two iterators and returning a result, there is another
+ // taking two iterators and a reference-to-result variable, and
+ // returning nothing. The latter seems to be an SGI extension.
+ // -- pedwards
+ template<typename _InputIterator, typename _Distance>
+ inline void
+ __distance(_InputIterator __first, _InputIterator __last,
+ _Distance& __n, std::input_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
+ while (__first != __last)
+ {
+ ++__first;
+ ++__n;
+ }
+ }
+
+ template<typename _RandomAccessIterator, typename _Distance>
+ inline void
+ __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Distance& __n, std::random_access_iterator_tag)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_RandomAccessIteratorConcept<
+ _RandomAccessIterator>)
+ __n += __last - __first;
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _InputIterator, typename _Distance>
+ inline void
+ distance(_InputIterator __first, _InputIterator __last,
+ _Distance& __n)
+ {
+ // concept requirements -- taken care of in __distance
+ __distance(__first, __last, __n, std::__iterator_category(__first));
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/malloc_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/malloc_allocator.h
new file mode 100644
index 0000000..4c4a72a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/malloc_allocator.h
@@ -0,0 +1,134 @@
+// Allocator that wraps "C" malloc -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/malloc_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _MALLOC_ALLOCATOR_H
+#define _MALLOC_ALLOCATOR_H 1
+
+#include <cstdlib>
+#include <new>
+#include <bits/functexcept.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ /**
+ * @brief An allocator that uses malloc.
+ * @ingroup allocators
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls malloc
+ * - all deallocation calls free
+ */
+ template<typename _Tp>
+ class malloc_allocator
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef malloc_allocator<_Tp1> other; };
+
+ malloc_allocator() throw() { }
+
+ malloc_allocator(const malloc_allocator&) throw() { }
+
+ template<typename _Tp1>
+ malloc_allocator(const malloc_allocator<_Tp1>&) throw() { }
+
+ ~malloc_allocator() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ // NB: __n is permitted to be 0. The C++ standard says nothing
+ // about what the return value is when __n == 0.
+ pointer
+ allocate(size_type __n, const void* = 0)
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ pointer __ret = static_cast<_Tp*>(std::malloc(__n * sizeof(_Tp)));
+ if (!__ret)
+ std::__throw_bad_alloc();
+ return __ret;
+ }
+
+ // __p is not permitted to be a null pointer.
+ void
+ deallocate(pointer __p, size_type)
+ { std::free(static_cast<void*>(__p)); }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) value_type(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const malloc_allocator<_Tp>&, const malloc_allocator<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const malloc_allocator<_Tp>&, const malloc_allocator<_Tp>&)
+ { return false; }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/memory b/6/sources/cxx-stl/gnu-libstdc++/include/ext/memory
new file mode 100644
index 0000000..7776d73
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/memory
@@ -0,0 +1,195 @@
+// Memory extensions -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file ext/memory
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _EXT_MEMORY
+#define _EXT_MEMORY 1
+
+#pragma GCC system_header
+
+#include <memory>
+#include <bits/stl_tempbuf.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::ptrdiff_t;
+ using std::pair;
+ using std::__iterator_category;
+ using std::_Temporary_buffer;
+
+ template<typename _InputIter, typename _Size, typename _ForwardIter>
+ pair<_InputIter, _ForwardIter>
+ __uninitialized_copy_n(_InputIter __first, _Size __count,
+ _ForwardIter __result, std::input_iterator_tag)
+ {
+ _ForwardIter __cur = __result;
+ __try
+ {
+ for (; __count > 0 ; --__count, ++__first, ++__cur)
+ std::_Construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __cur);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
+ inline pair<_RandomAccessIter, _ForwardIter>
+ __uninitialized_copy_n(_RandomAccessIter __first, _Size __count,
+ _ForwardIter __result,
+ std::random_access_iterator_tag)
+ {
+ _RandomAccessIter __last = __first + __count;
+ return (pair<_RandomAccessIter, _ForwardIter>
+ (__last, std::uninitialized_copy(__first, __last, __result)));
+ }
+
+ template<typename _InputIter, typename _Size, typename _ForwardIter>
+ inline pair<_InputIter, _ForwardIter>
+ __uninitialized_copy_n(_InputIter __first, _Size __count,
+ _ForwardIter __result)
+ { return __gnu_cxx::__uninitialized_copy_n(__first, __count, __result,
+ __iterator_category(__first)); }
+
+ /**
+ * @brief Copies the range [first,last) into result.
+ * @param first An input iterator.
+ * @param last An input iterator.
+ * @param result An output iterator.
+ * @return result + (first - last)
+ * @ingroup SGIextensions
+ *
+ * Like copy(), but does not require an initialized output range.
+ */
+ template<typename _InputIter, typename _Size, typename _ForwardIter>
+ inline pair<_InputIter, _ForwardIter>
+ uninitialized_copy_n(_InputIter __first, _Size __count,
+ _ForwardIter __result)
+ { return __gnu_cxx::__uninitialized_copy_n(__first, __count, __result,
+ __iterator_category(__first)); }
+
+
+ // An alternative version of uninitialized_copy_n that constructs
+ // and destroys objects with a user-provided allocator.
+ template<typename _InputIter, typename _Size, typename _ForwardIter,
+ typename _Allocator>
+ pair<_InputIter, _ForwardIter>
+ __uninitialized_copy_n_a(_InputIter __first, _Size __count,
+ _ForwardIter __result,
+ _Allocator __alloc)
+ {
+ _ForwardIter __cur = __result;
+ __try
+ {
+ for (; __count > 0 ; --__count, ++__first, ++__cur)
+ __alloc.construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
+ __catch(...)
+ {
+ std::_Destroy(__result, __cur, __alloc);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _InputIter, typename _Size, typename _ForwardIter,
+ typename _Tp>
+ inline pair<_InputIter, _ForwardIter>
+ __uninitialized_copy_n_a(_InputIter __first, _Size __count,
+ _ForwardIter __result,
+ std::allocator<_Tp>)
+ {
+ return __gnu_cxx::uninitialized_copy_n(__first, __count, __result);
+ }
+
+ /**
+ * This class provides similar behavior and semantics of the standard
+ * functions get_temporary_buffer() and return_temporary_buffer(), but
+ * encapsulated in a type vaguely resembling a standard container.
+ *
+ * By default, a temporary_buffer<Iter> stores space for objects of
+ * whatever type the Iter iterator points to. It is constructed from a
+ * typical [first,last) range, and provides the begin(), end(), size()
+ * functions, as well as requested_size(). For non-trivial types, copies
+ * of *first will be used to initialize the storage.
+ *
+ * @c malloc is used to obtain underlying storage.
+ *
+ * Like get_temporary_buffer(), not all the requested memory may be
+ * available. Ideally, the created buffer will be large enough to hold a
+ * copy of [first,last), but if size() is less than requested_size(),
+ * then this didn't happen.
+ *
+ * @ingroup SGIextensions
+ */
+ template <class _ForwardIterator, class _Tp
+ = typename std::iterator_traits<_ForwardIterator>::value_type >
+ struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
+ {
+ /// Requests storage large enough to hold a copy of [first,last).
+ temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
+ : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) { }
+
+ /// Destroys objects and frees storage.
+ ~temporary_buffer() { }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/mt_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/mt_allocator.h
new file mode 100644
index 0000000..f03f3a6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/mt_allocator.h
@@ -0,0 +1,751 @@
+// MT-optimized allocator -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/mt_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _MT_ALLOCATOR_H
+#define _MT_ALLOCATOR_H 1
+
+#include <new>
+#include <cstdlib>
+#include <bits/functexcept.h>
+#include <ext/atomicity.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ typedef void (*__destroy_handler)(void*);
+
+ /// Base class for pool object.
+ struct __pool_base
+ {
+ // Using short int as type for the binmap implies we are never
+ // caching blocks larger than 32768 with this allocator.
+ typedef unsigned short int _Binmap_type;
+
+ // Variables used to configure the behavior of the allocator,
+ // assigned and explained in detail below.
+ struct _Tune
+ {
+ // Compile time constants for the default _Tune values.
+ enum { _S_align = 8 };
+ enum { _S_max_bytes = 128 };
+ enum { _S_min_bin = 8 };
+ enum { _S_chunk_size = 4096 - 4 * sizeof(void*) };
+ enum { _S_max_threads = 4096 };
+ enum { _S_freelist_headroom = 10 };
+
+ // Alignment needed.
+ // NB: In any case must be >= sizeof(_Block_record), that
+ // is 4 on 32 bit machines and 8 on 64 bit machines.
+ size_t _M_align;
+
+ // Allocation requests (after round-up to power of 2) below
+ // this value will be handled by the allocator. A raw new/
+ // call will be used for requests larger than this value.
+ // NB: Must be much smaller than _M_chunk_size and in any
+ // case <= 32768.
+ size_t _M_max_bytes;
+
+ // Size in bytes of the smallest bin.
+ // NB: Must be a power of 2 and >= _M_align (and of course
+ // much smaller than _M_max_bytes).
+ size_t _M_min_bin;
+
+ // In order to avoid fragmenting and minimize the number of
+ // new() calls we always request new memory using this
+ // value. Based on previous discussions on the libstdc++
+ // mailing list we have chosen the value below.
+ // See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html
+ // NB: At least one order of magnitude > _M_max_bytes.
+ size_t _M_chunk_size;
+
+ // The maximum number of supported threads. For
+ // single-threaded operation, use one. Maximum values will
+ // vary depending on details of the underlying system. (For
+ // instance, Linux 2.4.18 reports 4070 in
+ // /proc/sys/kernel/threads-max, while Linux 2.6.6 reports
+ // 65534)
+ size_t _M_max_threads;
+
+ // Each time a deallocation occurs in a threaded application
+ // we make sure that there are no more than
+ // _M_freelist_headroom % of used memory on the freelist. If
+ // the number of additional records is more than
+ // _M_freelist_headroom % of the freelist, we move these
+ // records back to the global pool.
+ size_t _M_freelist_headroom;
+
+ // Set to true forces all allocations to use new().
+ bool _M_force_new;
+
+ explicit
+ _Tune()
+ : _M_align(_S_align), _M_max_bytes(_S_max_bytes), _M_min_bin(_S_min_bin),
+ _M_chunk_size(_S_chunk_size), _M_max_threads(_S_max_threads),
+ _M_freelist_headroom(_S_freelist_headroom),
+ _M_force_new(std::getenv("GLIBCXX_FORCE_NEW") ? true : false)
+ { }
+
+ explicit
+ _Tune(size_t __align, size_t __maxb, size_t __minbin, size_t __chunk,
+ size_t __maxthreads, size_t __headroom, bool __force)
+ : _M_align(__align), _M_max_bytes(__maxb), _M_min_bin(__minbin),
+ _M_chunk_size(__chunk), _M_max_threads(__maxthreads),
+ _M_freelist_headroom(__headroom), _M_force_new(__force)
+ { }
+ };
+
+ struct _Block_address
+ {
+ void* _M_initial;
+ _Block_address* _M_next;
+ };
+
+ const _Tune&
+ _M_get_options() const
+ { return _M_options; }
+
+ void
+ _M_set_options(_Tune __t)
+ {
+ if (!_M_init)
+ _M_options = __t;
+ }
+
+ bool
+ _M_check_threshold(size_t __bytes)
+ { return __bytes > _M_options._M_max_bytes || _M_options._M_force_new; }
+
+ size_t
+ _M_get_binmap(size_t __bytes)
+ { return _M_binmap[__bytes]; }
+
+ size_t
+ _M_get_align()
+ { return _M_options._M_align; }
+
+ explicit
+ __pool_base()
+ : _M_options(_Tune()), _M_binmap(NULL), _M_init(false) { }
+
+ explicit
+ __pool_base(const _Tune& __options)
+ : _M_options(__options), _M_binmap(NULL), _M_init(false) { }
+
+ private:
+ explicit
+ __pool_base(const __pool_base&);
+
+ __pool_base&
+ operator=(const __pool_base&);
+
+ protected:
+ // Configuration options.
+ _Tune _M_options;
+
+ _Binmap_type* _M_binmap;
+
+ // Configuration of the pool object via _M_options can happen
+ // after construction but before initialization. After
+ // initialization is complete, this variable is set to true.
+ bool _M_init;
+ };
+
+
+ /**
+ * @brief Data describing the underlying memory pool, parameterized on
+ * threading support.
+ */
+ template<bool _Thread>
+ class __pool;
+
+ /// Specialization for single thread.
+ template<>
+ class __pool<false> : public __pool_base
+ {
+ public:
+ union _Block_record
+ {
+ // Points to the block_record of the next free block.
+ _Block_record* _M_next;
+ };
+
+ struct _Bin_record
+ {
+ // An "array" of pointers to the first free block.
+ _Block_record** _M_first;
+
+ // A list of the initial addresses of all allocated blocks.
+ _Block_address* _M_address;
+ };
+
+ void
+ _M_initialize_once()
+ {
+ if (__builtin_expect(_M_init == false, false))
+ _M_initialize();
+ }
+
+ void
+ _M_destroy() throw();
+
+ char*
+ _M_reserve_block(size_t __bytes, const size_t __thread_id);
+
+ void
+ _M_reclaim_block(char* __p, size_t __bytes);
+
+ size_t
+ _M_get_thread_id() { return 0; }
+
+ const _Bin_record&
+ _M_get_bin(size_t __which)
+ { return _M_bin[__which]; }
+
+ void
+ _M_adjust_freelist(const _Bin_record&, _Block_record*, size_t)
+ { }
+
+ explicit __pool()
+ : _M_bin(NULL), _M_bin_size(1) { }
+
+ explicit __pool(const __pool_base::_Tune& __tune)
+ : __pool_base(__tune), _M_bin(NULL), _M_bin_size(1) { }
+
+ private:
+ // An "array" of bin_records each of which represents a specific
+ // power of 2 size. Memory to this "array" is allocated in
+ // _M_initialize().
+ _Bin_record* _M_bin;
+
+ // Actual value calculated in _M_initialize().
+ size_t _M_bin_size;
+
+ void
+ _M_initialize();
+ };
+
+#ifdef __GTHREADS
+ /// Specialization for thread enabled, via gthreads.h.
+ template<>
+ class __pool<true> : public __pool_base
+ {
+ public:
+ // Each requesting thread is assigned an id ranging from 1 to
+ // _S_max_threads. Thread id 0 is used as a global memory pool.
+ // In order to get constant performance on the thread assignment
+ // routine, we keep a list of free ids. When a thread first
+ // requests memory we remove the first record in this list and
+ // stores the address in a __gthread_key. When initializing the
+ // __gthread_key we specify a destructor. When this destructor
+ // (i.e. the thread dies) is called, we return the thread id to
+ // the front of this list.
+ struct _Thread_record
+ {
+ // Points to next free thread id record. NULL if last record in list.
+ _Thread_record* _M_next;
+
+ // Thread id ranging from 1 to _S_max_threads.
+ size_t _M_id;
+ };
+
+ union _Block_record
+ {
+ // Points to the block_record of the next free block.
+ _Block_record* _M_next;
+
+ // The thread id of the thread which has requested this block.
+ size_t _M_thread_id;
+ };
+
+ struct _Bin_record
+ {
+ // An "array" of pointers to the first free block for each
+ // thread id. Memory to this "array" is allocated in
+ // _S_initialize() for _S_max_threads + global pool 0.
+ _Block_record** _M_first;
+
+ // A list of the initial addresses of all allocated blocks.
+ _Block_address* _M_address;
+
+ // An "array" of counters used to keep track of the amount of
+ // blocks that are on the freelist/used for each thread id.
+ // - Note that the second part of the allocated _M_used "array"
+ // actually hosts (atomic) counters of reclaimed blocks: in
+ // _M_reserve_block and in _M_reclaim_block those numbers are
+ // subtracted from the first ones to obtain the actual size
+ // of the "working set" of the given thread.
+ // - Memory to these "arrays" is allocated in _S_initialize()
+ // for _S_max_threads + global pool 0.
+ size_t* _M_free;
+ size_t* _M_used;
+
+ // Each bin has its own mutex which is used to ensure data
+ // integrity while changing "ownership" on a block. The mutex
+ // is initialized in _S_initialize().
+ __gthread_mutex_t* _M_mutex;
+ };
+
+ // XXX GLIBCXX_ABI Deprecated
+ void
+ _M_initialize(__destroy_handler);
+
+ void
+ _M_initialize_once()
+ {
+ if (__builtin_expect(_M_init == false, false))
+ _M_initialize();
+ }
+
+ void
+ _M_destroy() throw();
+
+ char*
+ _M_reserve_block(size_t __bytes, const size_t __thread_id);
+
+ void
+ _M_reclaim_block(char* __p, size_t __bytes);
+
+ const _Bin_record&
+ _M_get_bin(size_t __which)
+ { return _M_bin[__which]; }
+
+ void
+ _M_adjust_freelist(const _Bin_record& __bin, _Block_record* __block,
+ size_t __thread_id)
+ {
+ if (__gthread_active_p())
+ {
+ __block->_M_thread_id = __thread_id;
+ --__bin._M_free[__thread_id];
+ ++__bin._M_used[__thread_id];
+ }
+ }
+
+ // XXX GLIBCXX_ABI Deprecated
+ void
+ _M_destroy_thread_key(void*);
+
+ size_t
+ _M_get_thread_id();
+
+ explicit __pool()
+ : _M_bin(NULL), _M_bin_size(1), _M_thread_freelist(NULL)
+ { }
+
+ explicit __pool(const __pool_base::_Tune& __tune)
+ : __pool_base(__tune), _M_bin(NULL), _M_bin_size(1),
+ _M_thread_freelist(NULL)
+ { }
+
+ private:
+ // An "array" of bin_records each of which represents a specific
+ // power of 2 size. Memory to this "array" is allocated in
+ // _M_initialize().
+ _Bin_record* _M_bin;
+
+ // Actual value calculated in _M_initialize().
+ size_t _M_bin_size;
+
+ _Thread_record* _M_thread_freelist;
+ void* _M_thread_freelist_initial;
+
+ void
+ _M_initialize();
+ };
+#endif
+
+ template<template <bool> class _PoolTp, bool _Thread>
+ struct __common_pool
+ {
+ typedef _PoolTp<_Thread> pool_type;
+
+ static pool_type&
+ _S_get_pool()
+ {
+ static pool_type _S_pool;
+ return _S_pool;
+ }
+ };
+
+ template<template <bool> class _PoolTp, bool _Thread>
+ struct __common_pool_base;
+
+ template<template <bool> class _PoolTp>
+ struct __common_pool_base<_PoolTp, false>
+ : public __common_pool<_PoolTp, false>
+ {
+ using __common_pool<_PoolTp, false>::_S_get_pool;
+
+ static void
+ _S_initialize_once()
+ {
+ static bool __init;
+ if (__builtin_expect(__init == false, false))
+ {
+ _S_get_pool()._M_initialize_once();
+ __init = true;
+ }
+ }
+ };
+
+#ifdef __GTHREADS
+ template<template <bool> class _PoolTp>
+ struct __common_pool_base<_PoolTp, true>
+ : public __common_pool<_PoolTp, true>
+ {
+ using __common_pool<_PoolTp, true>::_S_get_pool;
+
+ static void
+ _S_initialize()
+ { _S_get_pool()._M_initialize_once(); }
+
+ static void
+ _S_initialize_once()
+ {
+ static bool __init;
+ if (__builtin_expect(__init == false, false))
+ {
+ if (__gthread_active_p())
+ {
+ // On some platforms, __gthread_once_t is an aggregate.
+ static __gthread_once_t __once = __GTHREAD_ONCE_INIT;
+ __gthread_once(&__once, _S_initialize);
+ }
+
+ // Double check initialization. May be necessary on some
+ // systems for proper construction when not compiling with
+ // thread flags.
+ _S_get_pool()._M_initialize_once();
+ __init = true;
+ }
+ }
+ };
+#endif
+
+ /// Policy for shared __pool objects.
+ template<template <bool> class _PoolTp, bool _Thread>
+ struct __common_pool_policy : public __common_pool_base<_PoolTp, _Thread>
+ {
+ template<typename _Tp1, template <bool> class _PoolTp1 = _PoolTp,
+ bool _Thread1 = _Thread>
+ struct _M_rebind
+ { typedef __common_pool_policy<_PoolTp1, _Thread1> other; };
+
+ using __common_pool_base<_PoolTp, _Thread>::_S_get_pool;
+ using __common_pool_base<_PoolTp, _Thread>::_S_initialize_once;
+ };
+
+
+ template<typename _Tp, template <bool> class _PoolTp, bool _Thread>
+ struct __per_type_pool
+ {
+ typedef _Tp value_type;
+ typedef _PoolTp<_Thread> pool_type;
+
+ static pool_type&
+ _S_get_pool()
+ {
+ // Sane defaults for the _PoolTp.
+ typedef typename pool_type::_Block_record _Block_record;
+ const static size_t __a = (__alignof__(_Tp) >= sizeof(_Block_record)
+ ? __alignof__(_Tp) : sizeof(_Block_record));
+
+ typedef typename __pool_base::_Tune _Tune;
+ static _Tune _S_tune(__a, sizeof(_Tp) * 64,
+ sizeof(_Tp) * 2 >= __a ? sizeof(_Tp) * 2 : __a,
+ sizeof(_Tp) * size_t(_Tune::_S_chunk_size),
+ _Tune::_S_max_threads,
+ _Tune::_S_freelist_headroom,
+ std::getenv("GLIBCXX_FORCE_NEW") ? true : false);
+ static pool_type _S_pool(_S_tune);
+ return _S_pool;
+ }
+ };
+
+ template<typename _Tp, template <bool> class _PoolTp, bool _Thread>
+ struct __per_type_pool_base;
+
+ template<typename _Tp, template <bool> class _PoolTp>
+ struct __per_type_pool_base<_Tp, _PoolTp, false>
+ : public __per_type_pool<_Tp, _PoolTp, false>
+ {
+ using __per_type_pool<_Tp, _PoolTp, false>::_S_get_pool;
+
+ static void
+ _S_initialize_once()
+ {
+ static bool __init;
+ if (__builtin_expect(__init == false, false))
+ {
+ _S_get_pool()._M_initialize_once();
+ __init = true;
+ }
+ }
+ };
+
+ #ifdef __GTHREADS
+ template<typename _Tp, template <bool> class _PoolTp>
+ struct __per_type_pool_base<_Tp, _PoolTp, true>
+ : public __per_type_pool<_Tp, _PoolTp, true>
+ {
+ using __per_type_pool<_Tp, _PoolTp, true>::_S_get_pool;
+
+ static void
+ _S_initialize()
+ { _S_get_pool()._M_initialize_once(); }
+
+ static void
+ _S_initialize_once()
+ {
+ static bool __init;
+ if (__builtin_expect(__init == false, false))
+ {
+ if (__gthread_active_p())
+ {
+ // On some platforms, __gthread_once_t is an aggregate.
+ static __gthread_once_t __once = __GTHREAD_ONCE_INIT;
+ __gthread_once(&__once, _S_initialize);
+ }
+
+ // Double check initialization. May be necessary on some
+ // systems for proper construction when not compiling with
+ // thread flags.
+ _S_get_pool()._M_initialize_once();
+ __init = true;
+ }
+ }
+ };
+#endif
+
+ /// Policy for individual __pool objects.
+ template<typename _Tp, template <bool> class _PoolTp, bool _Thread>
+ struct __per_type_pool_policy
+ : public __per_type_pool_base<_Tp, _PoolTp, _Thread>
+ {
+ template<typename _Tp1, template <bool> class _PoolTp1 = _PoolTp,
+ bool _Thread1 = _Thread>
+ struct _M_rebind
+ { typedef __per_type_pool_policy<_Tp1, _PoolTp1, _Thread1> other; };
+
+ using __per_type_pool_base<_Tp, _PoolTp, _Thread>::_S_get_pool;
+ using __per_type_pool_base<_Tp, _PoolTp, _Thread>::_S_initialize_once;
+ };
+
+
+ /// Base class for _Tp dependent member functions.
+ template<typename _Tp>
+ class __mt_alloc_base
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ pointer
+ address(reference __x) const
+ { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const
+ { return &__x; }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+#ifdef __GTHREADS
+#define __thread_default true
+#else
+#define __thread_default false
+#endif
+
+ /**
+ * @brief This is a fixed size (power of 2) allocator which - when
+ * compiled with thread support - will maintain one freelist per
+ * size per thread plus a "global" one. Steps are taken to limit
+ * the per thread freelist sizes (by returning excess back to
+ * the "global" list).
+ * @ingroup allocators
+ *
+ * Further details:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch32.html
+ */
+ template<typename _Tp,
+ typename _Poolp = __common_pool_policy<__pool, __thread_default> >
+ class __mt_alloc : public __mt_alloc_base<_Tp>
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+ typedef _Poolp __policy_type;
+ typedef typename _Poolp::pool_type __pool_type;
+
+ template<typename _Tp1, typename _Poolp1 = _Poolp>
+ struct rebind
+ {
+ typedef typename _Poolp1::template _M_rebind<_Tp1>::other pol_type;
+ typedef __mt_alloc<_Tp1, pol_type> other;
+ };
+
+ __mt_alloc() throw() { }
+
+ __mt_alloc(const __mt_alloc&) throw() { }
+
+ template<typename _Tp1, typename _Poolp1>
+ __mt_alloc(const __mt_alloc<_Tp1, _Poolp1>&) throw() { }
+
+ ~__mt_alloc() throw() { }
+
+ pointer
+ allocate(size_type __n, const void* = 0);
+
+ void
+ deallocate(pointer __p, size_type __n);
+
+ const __pool_base::_Tune
+ _M_get_options()
+ {
+ // Return a copy, not a reference, for external consumption.
+ return __policy_type::_S_get_pool()._M_get_options();
+ }
+
+ void
+ _M_set_options(__pool_base::_Tune __t)
+ { __policy_type::_S_get_pool()._M_set_options(__t); }
+ };
+
+ template<typename _Tp, typename _Poolp>
+ typename __mt_alloc<_Tp, _Poolp>::pointer
+ __mt_alloc<_Tp, _Poolp>::
+ allocate(size_type __n, const void*)
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ __policy_type::_S_initialize_once();
+
+ // Requests larger than _M_max_bytes are handled by operator
+ // new/delete directly.
+ __pool_type& __pool = __policy_type::_S_get_pool();
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__pool._M_check_threshold(__bytes))
+ {
+ void* __ret = ::operator new(__bytes);
+ return static_cast<_Tp*>(__ret);
+ }
+
+ // Round up to power of 2 and figure out which bin to use.
+ const size_t __which = __pool._M_get_binmap(__bytes);
+ const size_t __thread_id = __pool._M_get_thread_id();
+
+ // Find out if we have blocks on our freelist. If so, go ahead
+ // and use them directly without having to lock anything.
+ char* __c;
+ typedef typename __pool_type::_Bin_record _Bin_record;
+ const _Bin_record& __bin = __pool._M_get_bin(__which);
+ if (__bin._M_first[__thread_id])
+ {
+ // Already reserved.
+ typedef typename __pool_type::_Block_record _Block_record;
+ _Block_record* __block = __bin._M_first[__thread_id];
+ __bin._M_first[__thread_id] = __block->_M_next;
+
+ __pool._M_adjust_freelist(__bin, __block, __thread_id);
+ __c = reinterpret_cast<char*>(__block) + __pool._M_get_align();
+ }
+ else
+ {
+ // Null, reserve.
+ __c = __pool._M_reserve_block(__bytes, __thread_id);
+ }
+ return static_cast<_Tp*>(static_cast<void*>(__c));
+ }
+
+ template<typename _Tp, typename _Poolp>
+ void
+ __mt_alloc<_Tp, _Poolp>::
+ deallocate(pointer __p, size_type __n)
+ {
+ if (__builtin_expect(__p != 0, true))
+ {
+ // Requests larger than _M_max_bytes are handled by
+ // operators new/delete directly.
+ __pool_type& __pool = __policy_type::_S_get_pool();
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__pool._M_check_threshold(__bytes))
+ ::operator delete(__p);
+ else
+ __pool._M_reclaim_block(reinterpret_cast<char*>(__p), __bytes);
+ }
+ }
+
+ template<typename _Tp, typename _Poolp>
+ inline bool
+ operator==(const __mt_alloc<_Tp, _Poolp>&, const __mt_alloc<_Tp, _Poolp>&)
+ { return true; }
+
+ template<typename _Tp, typename _Poolp>
+ inline bool
+ operator!=(const __mt_alloc<_Tp, _Poolp>&, const __mt_alloc<_Tp, _Poolp>&)
+ { return false; }
+
+#undef __thread_default
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h
new file mode 100644
index 0000000..290c73a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h
@@ -0,0 +1,130 @@
+// Allocator that wraps operator new -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/new_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _NEW_ALLOCATOR_H
+#define _NEW_ALLOCATOR_H 1
+
+#include <new>
+#include <bits/functexcept.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ /**
+ * @brief An allocator that uses global new, as per [20.4].
+ * @ingroup allocators
+ *
+ * This is precisely the allocator defined in the C++ Standard.
+ * - all allocation calls operator new
+ * - all deallocation calls operator delete
+ */
+ template<typename _Tp>
+ class new_allocator
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef new_allocator<_Tp1> other; };
+
+ new_allocator() throw() { }
+
+ new_allocator(const new_allocator&) throw() { }
+
+ template<typename _Tp1>
+ new_allocator(const new_allocator<_Tp1>&) throw() { }
+
+ ~new_allocator() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ // NB: __n is permitted to be 0. The C++ standard says nothing
+ // about what the return value is when __n == 0.
+ pointer
+ allocate(size_type __n, const void* = 0)
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
+ }
+
+ // __p is not permitted to be a null pointer.
+ void
+ deallocate(pointer __p, size_type)
+ { ::operator delete(__p); }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
+ { return false; }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric b/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric
new file mode 100644
index 0000000..5df5ee2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric
@@ -0,0 +1,146 @@
+// Numeric extensions -*- C++ -*-
+
+// Copyright (C) 2002, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file ext/numeric
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _EXT_NUMERIC
+#define _EXT_NUMERIC 1
+
+#pragma GCC system_header
+
+#include <bits/concept_check.h>
+#include <numeric>
+
+#include <ext/functional> // For identity_element
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Returns __x ** __n, where __n >= 0. _Note that "multiplication"
+ // is required to be associative, but not necessarily commutative.
+ template<typename _Tp, typename _Integer, typename _MonoidOperation>
+ _Tp
+ __power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
+ {
+ if (__n == 0)
+ return identity_element(__monoid_op);
+ else
+ {
+ while ((__n & 1) == 0)
+ {
+ __n >>= 1;
+ __x = __monoid_op(__x, __x);
+ }
+
+ _Tp __result = __x;
+ __n >>= 1;
+ while (__n != 0)
+ {
+ __x = __monoid_op(__x, __x);
+ if ((__n & 1) != 0)
+ __result = __monoid_op(__result, __x);
+ __n >>= 1;
+ }
+ return __result;
+ }
+ }
+
+ template<typename _Tp, typename _Integer>
+ inline _Tp
+ __power(_Tp __x, _Integer __n)
+ { return __power(__x, __n, std::multiplies<_Tp>()); }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ // Alias for the internal name __power. Note that power is an extension,
+ // not part of the C++ standard.
+ template<typename _Tp, typename _Integer, typename _MonoidOperation>
+ inline _Tp
+ power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
+ { return __power(__x, __n, __monoid_op); }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template<typename _Tp, typename _Integer>
+ inline _Tp
+ power(_Tp __x, _Integer __n)
+ { return __power(__x, __n); }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ // iota is not part of the C++ standard. It is an extension.
+ template<typename _ForwardIter, typename _Tp>
+ void
+ iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
+ {
+ // concept requirements
+ __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp,
+ typename std::iterator_traits<_ForwardIter>::value_type>)
+
+ while (__first != __last)
+ *__first++ = __value++;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric_traits.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric_traits.h
new file mode 100644
index 0000000..57fcf9c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/numeric_traits.h
@@ -0,0 +1,135 @@
+// -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/numeric_traits.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _EXT_NUMERIC_TRAITS
+#define _EXT_NUMERIC_TRAITS 1
+
+#pragma GCC system_header
+
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Compile time constants for builtin types.
+ // Sadly std::numeric_limits member functions cannot be used for this.
+#define __glibcxx_signed(_Tp) ((_Tp)(-1) < 0)
+#define __glibcxx_digits(_Tp) \
+ (sizeof(_Tp) * __CHAR_BIT__ - __glibcxx_signed(_Tp))
+
+#define __glibcxx_min(_Tp) \
+ (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0)
+
+#define __glibcxx_max(_Tp) \
+ (__glibcxx_signed(_Tp) ? \
+ (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0)
+
+ template<typename _Value>
+ struct __numeric_traits_integer
+ {
+ // Only integers for initialization of member constant.
+ static const _Value __min = __glibcxx_min(_Value);
+ static const _Value __max = __glibcxx_max(_Value);
+
+ // NB: these two also available in std::numeric_limits as compile
+ // time constants, but <limits> is big and we avoid including it.
+ static const bool __is_signed = __glibcxx_signed(_Value);
+ static const int __digits = __glibcxx_digits(_Value);
+ };
+
+ template<typename _Value>
+ const _Value __numeric_traits_integer<_Value>::__min;
+
+ template<typename _Value>
+ const _Value __numeric_traits_integer<_Value>::__max;
+
+ template<typename _Value>
+ const bool __numeric_traits_integer<_Value>::__is_signed;
+
+ template<typename _Value>
+ const int __numeric_traits_integer<_Value>::__digits;
+
+#undef __glibcxx_signed
+#undef __glibcxx_digits
+#undef __glibcxx_min
+#undef __glibcxx_max
+
+#define __glibcxx_floating(_Tp, _Fval, _Dval, _LDval) \
+ (std::__are_same<_Tp, float>::__value ? _Fval \
+ : std::__are_same<_Tp, double>::__value ? _Dval : _LDval)
+
+#define __glibcxx_max_digits10(_Tp) \
+ (2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, \
+ __LDBL_MANT_DIG__) * 3010 / 10000)
+
+#define __glibcxx_digits10(_Tp) \
+ __glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__)
+
+#define __glibcxx_max_exponent10(_Tp) \
+ __glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, \
+ __LDBL_MAX_10_EXP__)
+
+ template<typename _Value>
+ struct __numeric_traits_floating
+ {
+ // Only floating point types. See N1822.
+ static const int __max_digits10 = __glibcxx_max_digits10(_Value);
+
+ // See above comment...
+ static const bool __is_signed = true;
+ static const int __digits10 = __glibcxx_digits10(_Value);
+ static const int __max_exponent10 = __glibcxx_max_exponent10(_Value);
+ };
+
+ template<typename _Value>
+ const int __numeric_traits_floating<_Value>::__max_digits10;
+
+ template<typename _Value>
+ const bool __numeric_traits_floating<_Value>::__is_signed;
+
+ template<typename _Value>
+ const int __numeric_traits_floating<_Value>::__digits10;
+
+ template<typename _Value>
+ const int __numeric_traits_floating<_Value>::__max_exponent10;
+
+ template<typename _Value>
+ struct __numeric_traits
+ : public __conditional_type<std::__is_integer<_Value>::__value,
+ __numeric_traits_integer<_Value>,
+ __numeric_traits_floating<_Value> >::__type
+ { };
+
+_GLIBCXX_END_NAMESPACE
+
+#undef __glibcxx_floating
+#undef __glibcxx_max_digits10
+#undef __glibcxx_digits10
+#undef __glibcxx_max_exponent10
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/assoc_container.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/assoc_container.hpp
new file mode 100644
index 0000000..7bccb88
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/assoc_container.hpp
@@ -0,0 +1,683 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file assoc_container.hpp
+ * Contains associative containers.
+ */
+
+#ifndef PB_DS_ASSOC_CNTNR_HPP
+#define PB_DS_ASSOC_CNTNR_HPP
+
+#include <ext/typelist.h>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/standard_policies.hpp>
+#include <ext/pb_ds/detail/container_base_dispatch.hpp>
+#include <ext/pb_ds/detail/basic_tree_policy/traits.hpp>
+
+namespace __gnu_pbds
+{
+#define PB_DS_BASE_C_DEC \
+ detail::container_base_dispatch<Key, Mapped, Tag, Policy_Tl, Allocator>::type
+
+ // An abstract basic associative container.
+ template<typename Key,
+ typename Mapped,
+ typename Tag,
+ typename Policy_Tl,
+ typename Allocator>
+ class container_base : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef typename PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Tag container_category;
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+ typedef typename allocator_type::difference_type difference_type;
+
+ // key_type
+ typedef typename allocator_type::template rebind<Key>::other::value_type key_type;
+ typedef typename allocator_type::template rebind<key_type>::other key_rebind;
+ typedef typename key_rebind::reference key_reference;
+ typedef typename key_rebind::const_reference const_key_reference;
+ typedef typename key_rebind::pointer key_pointer;
+ typedef typename key_rebind::const_pointer const_key_pointer;
+
+ // mapped_type
+ typedef Mapped mapped_type;
+ typedef typename allocator_type::template rebind<mapped_type>::other mapped_rebind;
+ typedef typename mapped_rebind::reference mapped_reference;
+ typedef typename mapped_rebind::const_reference const_mapped_reference;
+ typedef typename mapped_rebind::pointer mapped_pointer;
+ typedef typename mapped_rebind::const_pointer const_mapped_pointer;
+
+ // value_type
+ typedef typename base_type::value_type value_type;
+ typedef typename allocator_type::template rebind<value_type>::other value_rebind;
+ typedef typename value_rebind::reference reference;
+ typedef typename value_rebind::const_reference const_reference;
+ typedef typename value_rebind::pointer pointer;
+ typedef typename value_rebind::const_pointer const_pointer;
+
+ // iterators
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::point_iterator point_iterator;
+ typedef typename base_type::const_point_iterator const_point_iterator;
+
+ virtual
+ ~container_base() { }
+
+ protected:
+#define PB_DS_CLASS_NAME container_base
+#include <ext/pb_ds/detail/constructors_destructor_fn_imps.hpp>
+#undef PB_DS_CLASS_NAME
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+
+#define PB_DS_BASE_C_DEC \
+ container_base<Key, Mapped, Tag, typename __gnu_cxx::typelist::append< \
+ typename __gnu_cxx::typelist::create4<Hash_Fn, Eq_Fn, Resize_Policy, detail::integral_constant<int, Store_Hash> >::type, Policy_TL>::type, Allocator>
+
+ // An abstract basic hash-based associative container.
+ template<typename Key,
+ typename Mapped,
+ typename Hash_Fn,
+ typename Eq_Fn,
+ typename Resize_Policy,
+ bool Store_Hash,
+ typename Tag,
+ typename Policy_TL,
+ typename Allocator>
+ class basic_hash_table : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ virtual
+ ~basic_hash_table() { }
+
+ protected:
+#define PB_DS_CLASS_NAME basic_hash_table
+#include <ext/pb_ds/detail/constructors_destructor_fn_imps.hpp>
+#undef PB_DS_CLASS_NAME
+
+ private:
+ basic_hash_table&
+ operator=(const base_type&);
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+
+#define PB_DS_BASE_C_DEC \
+ basic_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, \
+ cc_hash_tag, \
+ typename __gnu_cxx::typelist::create1<Comb_Hash_Fn>::type, Allocator>
+
+ // A concrete collision-chaining hash-based associative container.
+ template<typename Key,
+ typename Mapped,
+ typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
+ typename Eq_Fn = typename detail::default_eq_fn<Key>::type,
+ typename Comb_Hash_Fn = detail::default_comb_hash_fn::type,
+ typename Resize_Policy = typename detail::default_resize_policy<Comb_Hash_Fn>::type,
+ bool Store_Hash = detail::default_store_hash,
+ typename Allocator = std::allocator<char> >
+ class cc_hash_table : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Hash_Fn hash_fn;
+ typedef Eq_Fn eq_fn;
+ typedef Resize_Policy resize_policy;
+ typedef Comb_Hash_Fn comb_hash_fn;
+
+ // Default constructor.
+ cc_hash_table() { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the Hash_Fn object of the container object.
+ cc_hash_table(const hash_fn& h)
+ : base_type(h) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, and
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object.
+ cc_hash_table(const hash_fn& h, const eq_fn& e)
+ : base_type(h, e) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, r_eq_fn
+ // will be copied by the eq_fn object of the container object, and
+ // r_comb_hash_fn will be copied by the comb_hash_fn object of the
+ // container object.
+ cc_hash_table(const hash_fn& h, const eq_fn& e, const comb_hash_fn& ch)
+ : base_type(h, e, ch) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, r_eq_fn
+ // will be copied by the eq_fn object of the container object,
+ // r_comb_hash_fn will be copied by the comb_hash_fn object of the
+ // container object, and r_resize_policy will be copied by the
+ // resize_policy object of the container object.
+ cc_hash_table(const hash_fn& h, const eq_fn& e, const comb_hash_fn& ch,
+ const resize_policy& rp)
+ : base_type(h, e, ch, rp) { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ cc_hash_table(It first, It last)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object.
+ template<typename It>
+ cc_hash_table(It first, It last, const hash_fn& h)
+ : base_type(h)
+ { copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // and r_eq_fn will be copied by the eq_fn object of the container
+ // object.
+ template<typename It>
+ cc_hash_table(It first, It last, const hash_fn& h, const eq_fn& e)
+ : base_type(h, e)
+ { copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object, and r_comb_hash_fn will be copied by the comb_hash_fn
+ // object of the container object.
+ template<typename It>
+ cc_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
+ const comb_hash_fn& ch)
+ : base_type(h, e, ch)
+ { copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object, r_comb_hash_fn will be copied by the comb_hash_fn
+ // object of the container object, and r_resize_policy will be
+ // copied by the resize_policy object of the container object.
+ template<typename It>
+ cc_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
+ const comb_hash_fn& ch, const resize_policy& rp)
+ : base_type(h, e, ch, rp)
+ { copy_from_range(first, last); }
+
+ cc_hash_table(const cc_hash_table& other)
+ : base_type((const base_type&)other)
+ { }
+
+ virtual
+ ~cc_hash_table() { }
+
+ cc_hash_table&
+ operator=(const cc_hash_table& other)
+ {
+ if (this != &other)
+ {
+ cc_hash_table tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(cc_hash_table& other)
+ { base_type::swap(other); }
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+
+#define PB_DS_BASE_C_DEC \
+ basic_hash_table<Key, Mapped, Hash_Fn, Eq_Fn, Resize_Policy, Store_Hash, \
+ gp_hash_tag, \
+ typename __gnu_cxx::typelist::create2<Comb_Probe_Fn, Probe_Fn>::type, Allocator>
+
+ // A concrete general-probing hash-based associative container.
+ template<typename Key,
+ typename Mapped,
+ typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
+ typename Eq_Fn = typename detail::default_eq_fn<Key>::type,
+ typename Comb_Probe_Fn = detail::default_comb_hash_fn::type,
+ typename Probe_Fn = typename detail::default_probe_fn<Comb_Probe_Fn>::type,
+ typename Resize_Policy = typename detail::default_resize_policy<Comb_Probe_Fn>::type,
+ bool Store_Hash = detail::default_store_hash,
+ typename Allocator = std::allocator<char> >
+ class gp_hash_table : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Hash_Fn hash_fn;
+ typedef Eq_Fn eq_fn;
+ typedef Comb_Probe_Fn comb_probe_fn;
+ typedef Probe_Fn probe_fn;
+ typedef Resize_Policy resize_policy;
+
+ // Default constructor.
+ gp_hash_table() { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object.
+ gp_hash_table(const hash_fn& h)
+ : base_type(h) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, and
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object.
+ gp_hash_table(const hash_fn& h, const eq_fn& e)
+ : base_type(h, e) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, r_eq_fn
+ // will be copied by the eq_fn object of the container object, and
+ // r_comb_probe_fn will be copied by the comb_probe_fn object of
+ // the container object.
+ gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp)
+ : base_type(h, e, cp) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, r_eq_fn
+ // will be copied by the eq_fn object of the container object,
+ // r_comb_probe_fn will be copied by the comb_probe_fn object of
+ // the container object, and r_probe_fn will be copied by the
+ // probe_fn object of the container object.
+ gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp,
+ const probe_fn& p)
+ : base_type(h, e, cp, p) { }
+
+ // Constructor taking some policy objects. r_hash_fn will be
+ // copied by the hash_fn object of the container object, r_eq_fn
+ // will be copied by the eq_fn object of the container object,
+ // r_comb_probe_fn will be copied by the comb_probe_fn object of
+ // the container object, r_probe_fn will be copied by the probe_fn
+ // object of the container object, and r_resize_policy will be
+ // copied by the Resize_Policy object of the container object.
+ gp_hash_table(const hash_fn& h, const eq_fn& e, const comb_probe_fn& cp,
+ const probe_fn& p, const resize_policy& rp)
+ : base_type(h, e, cp, p, rp) { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ gp_hash_table(It first, It last)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object.
+ template<typename It>
+ gp_hash_table(It first, It last, const hash_fn& h)
+ : base_type(h)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // and r_eq_fn will be copied by the eq_fn object of the container
+ // object.
+ template<typename It>
+ gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e)
+ : base_type(h, e)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object, and r_comb_probe_fn will be copied by the comb_probe_fn
+ // object of the container object.
+ template<typename It>
+ gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
+ const comb_probe_fn& cp)
+ : base_type(h, e, cp)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object, r_comb_probe_fn will be copied by the comb_probe_fn
+ // object of the container object, and r_probe_fn will be copied
+ // by the probe_fn object of the container object.
+ template<typename It>
+ gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
+ const comb_probe_fn& cp, const probe_fn& p)
+ : base_type(h, e, cp, p)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object. r_hash_fn
+ // will be copied by the hash_fn object of the container object,
+ // r_eq_fn will be copied by the eq_fn object of the container
+ // object, r_comb_probe_fn will be copied by the comb_probe_fn
+ // object of the container object, r_probe_fn will be copied by
+ // the probe_fn object of the container object, and
+ // r_resize_policy will be copied by the resize_policy object of
+ // the container object.
+ template<typename It>
+ gp_hash_table(It first, It last, const hash_fn& h, const eq_fn& e,
+ const comb_probe_fn& cp, const probe_fn& p,
+ const resize_policy& rp)
+ : base_type(h, e, cp, p, rp)
+ { base_type::copy_from_range(first, last); }
+
+ gp_hash_table(const gp_hash_table& other)
+ : base_type((const base_type&)other)
+ { }
+
+ virtual
+ ~gp_hash_table() { }
+
+ gp_hash_table&
+ operator=(const gp_hash_table& other)
+ {
+ if (this != &other)
+ {
+ gp_hash_table tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(gp_hash_table& other)
+ { base_type::swap(other); }
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+
+#define PB_DS_BASE_C_DEC \
+ container_base<Key, Mapped, Tag, Policy_Tl, Allocator>
+
+ // An abstract basic tree-like (tree, trie) associative container.
+ template<typename Key, typename Mapped, typename Tag,
+ typename Node_Update, typename Policy_Tl, typename Allocator>
+ class basic_tree : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Node_Update node_update;
+
+ virtual
+ ~basic_tree() { }
+
+ protected:
+#define PB_DS_CLASS_NAME basic_tree
+#include <ext/pb_ds/detail/constructors_destructor_fn_imps.hpp>
+#undef PB_DS_CLASS_NAME
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+
+#define PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC \
+ detail::tree_traits<Key, Mapped,Cmp_Fn,Node_Update,Tag, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ basic_tree<Key,Mapped,Tag,typename PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC::node_update, \
+ typename __gnu_cxx::typelist::create2<Cmp_Fn, PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC >::type, Allocator>
+
+ // A concrete basic tree-based associative container.
+ template<typename Key, typename Mapped, typename Cmp_Fn = std::less<Key>,
+ typename Tag = rb_tree_tag,
+ template<typename Const_Node_Iterator, typename Node_Iterator, typename Cmp_Fn_, typename Allocator_>
+ class Node_Update = __gnu_pbds::null_tree_node_update,
+ typename Allocator = std::allocator<char> >
+ class tree : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ // Comparison functor type.
+ typedef Cmp_Fn cmp_fn;
+
+ tree() { }
+
+ // Constructor taking some policy objects. r_cmp_fn will be copied
+ // by the Cmp_Fn object of the container object.
+ tree(const cmp_fn& c)
+ : base_type(c) { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ tree(It first, It last)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects The value_types between first_it and
+ // last_it will be inserted into the container object. r_cmp_fn
+ // will be copied by the cmp_fn object of the container object.
+ template<typename It>
+ tree(It first, It last, const cmp_fn& c)
+ : base_type(c)
+ { base_type::copy_from_range(first, last); }
+
+ tree(const tree& other)
+ : base_type((const base_type&)other) { }
+
+ virtual
+ ~tree() { }
+
+ tree&
+ operator=(const tree& other)
+ {
+ if (this != &other)
+ {
+ tree tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(tree& other)
+ { base_type::swap(other); }
+ };
+
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC
+
+
+#define PB_DS_TRIE_NODE_AND_ITS_TRAITS \
+ detail::trie_traits<Key,Mapped,E_Access_Traits,Node_Update,Tag,Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ basic_tree<Key,Mapped,Tag, typename PB_DS_TRIE_NODE_AND_ITS_TRAITS::node_update, \
+ typename __gnu_cxx::typelist::create2<E_Access_Traits, PB_DS_TRIE_NODE_AND_ITS_TRAITS >::type, Allocator>
+
+ // A concrete basic trie-based associative container.
+ template<typename Key,
+ typename Mapped,
+ typename E_Access_Traits = typename detail::default_trie_e_access_traits<Key>::type,
+ typename Tag = pat_trie_tag,
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename E_Access_Traits_,
+ typename Allocator_>
+ class Node_Update = null_trie_node_update,
+ typename Allocator = std::allocator<char> >
+ class trie : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ // Element access traits type.
+ typedef E_Access_Traits e_access_traits;
+
+ trie() { }
+
+ // Constructor taking some policy objects. r_e_access_traits will
+ // be copied by the E_Access_Traits object of the container
+ // object.
+ trie(const e_access_traits& t)
+ : base_type(t) { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ trie(It first, It last)
+ { base_type::copy_from_range(first, last); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects. The value_types between first_it and
+ // last_it will be inserted into the container object.
+ template<typename It>
+ trie(It first, It last, const e_access_traits& t)
+ : base_type(t)
+ { base_type::copy_from_range(first, last); }
+
+ trie(const trie& other)
+ : base_type((const base_type&)other) { }
+
+ virtual
+ ~trie() { }
+
+ trie&
+ operator=(const trie& other)
+ {
+ if (this != &other)
+ {
+ trie tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(trie& other)
+ { base_type::swap(other); }
+ };
+
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_TRIE_NODE_AND_ITS_TRAITS
+
+
+#define PB_DS_BASE_C_DEC \
+ container_base<Key, Mapped, list_update_tag, \
+ typename __gnu_cxx::typelist::create2<Eq_Fn, Update_Policy>::type, Allocator>
+
+ // A list-update based associative container.
+ template<typename Key,
+ typename Mapped,
+ class Eq_Fn = typename detail::default_eq_fn<Key>::type,
+ class Update_Policy = detail::default_update_policy::type,
+ class Allocator = std::allocator<char> >
+ class list_update : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Eq_Fn eq_fn;
+ typedef Update_Policy update_policy;
+ typedef Allocator allocator;
+
+ list_update() { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ list_update(It first, It last)
+ { base_type::copy_from_range(first, last); }
+
+ list_update(const list_update& other)
+ : base_type((const base_type&)other) { }
+
+ virtual
+ ~list_update() { }
+
+ list_update&
+ operator=(const list_update& other)
+ {
+ if (this !=& other)
+ {
+ list_update tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(list_update& other)
+ { base_type::swap(other); }
+ };
+
+#undef PB_DS_BASE_C_DEC
+
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
new file mode 100644
index 0000000..0ca90db
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
@@ -0,0 +1,173 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file basic_tree_policy_base.hpp
+ * Contains a base class for tree_like policies.
+ */
+
+#ifndef PB_DS_TREE_LIKE_POLICY_BASE_HPP
+#define PB_DS_TREE_LIKE_POLICY_BASE_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_C_DEC \
+ basic_tree_policy_base< \
+ Const_Node_Iterator, \
+ Node_Iterator, \
+ Allocator>
+
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename Allocator>
+ struct basic_tree_policy_base
+ {
+ protected:
+ typedef typename Node_Iterator::value_type it_type;
+
+ typedef typename std::iterator_traits< it_type>::value_type value_type;
+
+ typedef typename value_type::first_type key_type;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ key_type>::type>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::const_pointer
+ const_pointer;
+
+ static inline const_key_reference
+ extract_key(const_reference r_val)
+ {
+ return (r_val.first);
+ }
+
+ virtual it_type
+ end() = 0;
+
+ it_type
+ end_iterator() const
+ {
+ return (const_cast<PB_DS_CLASS_C_DEC* >(this)->end());
+ }
+
+ virtual
+ ~basic_tree_policy_base()
+ { }
+ };
+
+ template<typename Const_Node_Iterator, typename Allocator>
+ struct basic_tree_policy_base<
+ Const_Node_Iterator,
+ Const_Node_Iterator,
+ Allocator>
+ {
+ protected:
+ typedef typename Const_Node_Iterator::value_type it_type;
+
+ typedef typename std::iterator_traits< it_type>::value_type value_type;
+
+ typedef value_type key_type;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ key_type>::type>::other::const_reference
+ const_key_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ value_type>::type>::other::const_pointer
+ const_pointer;
+
+ static inline const_key_reference
+ extract_key(const_reference r_val)
+ {
+ return (r_val);
+ }
+
+ virtual it_type
+ end() const = 0;
+
+ it_type
+ end_iterator() const
+ {
+ return (end());
+ }
+
+ virtual
+ ~basic_tree_policy_base()
+ { }
+ };
+
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_TREE_LIKE_POLICY_BASE_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
new file mode 100644
index 0000000..757b909
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file null_node_metadata.hpp
+ * Contains an implementation class for tree-like classes.
+ */
+
+#ifndef PB_DS_NULL_NODE_METADATA_HPP
+#define PB_DS_NULL_NODE_METADATA_HPP
+
+#include <ext/pb_ds/detail/types_traits.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, class Data, class Allocator>
+ struct dumconst_node_iterator
+ {
+ private:
+ typedef typename types_traits<Key, Data, Allocator, false>::pointer const_iterator;
+
+ public:
+ typedef const_iterator value_type;
+ typedef const_iterator const_reference;
+ typedef const_reference reference;
+ };
+
+ struct null_node_metadata
+ { };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
new file mode 100644
index 0000000..b30829a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation class for tree-like classes.
+ */
+
+#ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/traits.hpp>
+#include <ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp>
+#include <ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator>
+ class Node_Update,
+ class Tag,
+ class Allocator>
+ struct tree_traits;
+
+ template<typename Key,
+ typename Data,
+ class E_Access_Traits,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class E_Access_Traits_,
+ class Allocator>
+ class Node_Update,
+ class Tag,
+ class Allocator>
+ struct trie_traits;
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#include <ext/pb_ds/detail/rb_tree_map_/traits.hpp>
+#include <ext/pb_ds/detail/splay_tree_/traits.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/traits.hpp>
+#include <ext/pb_ds/detail/pat_trie_/traits.hpp>
+
+#endif // #ifndef PB_DS_NODE_AND_IT_TRAITS_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_types.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_types.hpp
new file mode 100644
index 0000000..aac1397
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/basic_types.hpp
@@ -0,0 +1,211 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file basic_types.hpp
+ * Contains basic types used by containers.
+ */
+
+#ifndef PB_DS_BASIC_TYPES_HPP
+#define PB_DS_BASIC_TYPES_HPP
+
+#include <algorithm>
+#include <utility>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, typename Mapped, typename Allocator, bool Store_Hash>
+ struct value_type_base;
+
+ /**
+ * Specialization of value_type_base for the case where the hash value
+ * is not stored alongside each value.
+ **/
+ template<typename Key, typename Mapped, typename Allocator>
+ struct value_type_base<Key, Mapped, Allocator, false>
+ {
+ typedef typename Allocator::template rebind<Mapped>::other mapped_type_allocator;
+ typedef typename mapped_type_allocator::value_type mapped_type;
+ typedef typename mapped_type_allocator::pointer mapped_pointer;
+ typedef typename mapped_type_allocator::const_pointer const_mapped_pointer;
+ typedef typename mapped_type_allocator::reference mapped_reference;
+ typedef typename mapped_type_allocator::const_reference const_mapped_reference;
+
+ typedef typename Allocator::template rebind<std::pair<const Key, Mapped> >::other value_type_allocator;
+ typedef typename value_type_allocator::value_type value_type;
+ typedef typename value_type_allocator::pointer pointer;
+ typedef typename value_type_allocator::const_pointer const_pointer;
+ typedef typename value_type_allocator::reference reference;
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ struct stored_value_type
+ {
+ value_type m_value;
+ };
+ };
+
+ /**
+ * Specialization of value_type_base for the case where the hash value
+ * is stored alongside each value.
+ **/
+ template<typename Key, typename Mapped, typename Allocator>
+ struct value_type_base<Key, Mapped, Allocator, true>
+ {
+ typedef typename Allocator::template rebind<Mapped>::other mapped_type_allocator;
+ typedef typename mapped_type_allocator::value_type mapped_type;
+ typedef typename mapped_type_allocator::pointer mapped_pointer;
+ typedef typename mapped_type_allocator::const_pointer const_mapped_pointer;
+ typedef typename mapped_type_allocator::reference mapped_reference;
+ typedef typename mapped_type_allocator::const_reference const_mapped_reference;
+
+ typedef typename Allocator::template rebind<std::pair<const Key, Mapped> >::other value_type_allocator;
+ typedef typename value_type_allocator::value_type value_type;
+ typedef typename value_type_allocator::pointer pointer;
+ typedef typename value_type_allocator::const_pointer const_pointer;
+ typedef typename value_type_allocator::reference reference;
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ struct stored_value_type
+ {
+ value_type m_value;
+ typename Allocator::size_type m_hash;
+ };
+ };
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ value_type_base<Key, null_mapped_type, Allocator, false>
+
+ /**
+ * Specialization of value_type_base for the case where the hash value
+ * is not stored alongside each value.
+ **/
+ template<typename Key, typename Allocator>
+ struct value_type_base<Key, null_mapped_type, Allocator, false>
+ {
+ typedef typename Allocator::template rebind<null_mapped_type>::other mapped_type_allocator;
+ typedef typename mapped_type_allocator::value_type mapped_type;
+ typedef typename mapped_type_allocator::pointer mapped_pointer;
+ typedef typename mapped_type_allocator::const_pointer const_mapped_pointer;
+ typedef typename mapped_type_allocator::reference mapped_reference;
+ typedef typename mapped_type_allocator::const_reference const_mapped_reference;
+
+ typedef Key value_type;
+
+ typedef typename Allocator::template rebind<value_type>::other value_type_allocator;
+ typedef typename value_type_allocator::pointer pointer;
+ typedef typename value_type_allocator::const_pointer const_pointer;
+ typedef typename value_type_allocator::reference reference;
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ struct stored_value_type
+ {
+ value_type m_value;
+ };
+
+ static null_mapped_type s_null_mapped;
+ };
+
+ PB_DS_CLASS_T_DEC
+ null_mapped_type PB_DS_CLASS_C_DEC::s_null_mapped;
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ value_type_base<Key, null_mapped_type, Allocator, true>
+
+ /**
+ * Specialization of value_type_base for the case where the hash value
+ * is stored alongside each value.
+ **/
+ template<typename Key, typename Allocator>
+ struct value_type_base<Key, null_mapped_type, Allocator, true>
+ {
+ typedef typename Allocator::template rebind<null_mapped_type>::other mapped_type_allocator;
+ typedef typename mapped_type_allocator::value_type mapped_type;
+ typedef typename mapped_type_allocator::pointer mapped_pointer;
+ typedef typename mapped_type_allocator::const_pointer const_mapped_pointer;
+ typedef typename mapped_type_allocator::reference mapped_reference;
+ typedef typename mapped_type_allocator::const_reference const_mapped_reference;
+
+ typedef Key value_type;
+
+ typedef typename Allocator::template rebind<value_type>::other value_type_allocator;
+ typedef typename value_type_allocator::pointer pointer;
+ typedef typename value_type_allocator::const_pointer const_pointer;
+ typedef typename value_type_allocator::reference reference;
+ typedef typename value_type_allocator::const_reference const_reference;
+
+ struct stored_value_type
+ {
+ value_type m_value;
+ typename Allocator::size_type m_hash;
+ };
+
+ static null_mapped_type s_null_mapped;
+ };
+
+ PB_DS_CLASS_T_DEC
+ null_mapped_type PB_DS_CLASS_C_DEC::s_null_mapped;
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ template<typename Key, typename Mapped>
+ struct no_throw_copies
+ {
+ typedef integral_constant<int, is_simple<Key>::value && is_simple<Mapped>::value> indicator;
+ };
+
+ template<typename Key>
+ struct no_throw_copies<Key, null_mapped_type>
+ {
+ typedef integral_constant<int, is_simple<Key>::value> indicator;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
new file mode 100644
index 0000000..7315d95
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp
@@ -0,0 +1,497 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file bin_search_tree_.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+/*
+ * This implementation uses an idea from the SGI STL (using a "header" node
+ * which is needed for efficient iteration).
+ */
+
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/tree_trace_base.hpp>
+#include <utility>
+#include <functional>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, class Cmp_Fn, \
+ class Node_And_It_Traits, class Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME \
+ bin_search_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME \
+ bin_search_tree_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME< \
+ Key, \
+ Mapped, \
+ Cmp_Fn, \
+ Node_And_It_Traits, \
+ Allocator>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits< \
+ Key, \
+ Mapped, \
+ Allocator, \
+ false>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, Cmp_Fn>, \
+ typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+#ifdef PB_DS_TREE_TRACE
+#define PB_DS_TREE_TRACE_BASE_C_DEC \
+ tree_trace_base< \
+ typename Node_And_It_Traits::const_node_iterator, \
+ typename Node_And_It_Traits::node_iterator, \
+ Cmp_Fn, \
+ true, \
+ Allocator>
+#endif
+
+ /**
+ * class description = "8i|\|4ree $34rc|-| 7r33 74813.">
+ **/
+ template<typename Key,
+ typename Mapped,
+ class Cmp_Fn,
+ class Node_And_It_Traits,
+ class Allocator>
+ class PB_DS_CLASS_NAME :
+#ifdef _GLIBCXX_DEBUG
+ public PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+#ifdef PB_DS_TREE_TRACE
+ public PB_DS_TREE_TRACE_BASE_C_DEC,
+#endif
+ public Cmp_Fn,
+ public PB_DS_TYPES_TRAITS_C_DEC,
+ public Node_And_It_Traits::node_update
+ {
+
+ protected:
+ typedef
+ typename Allocator::template rebind<
+ typename Node_And_It_Traits::node>::other
+ node_allocator;
+
+ typedef typename node_allocator::value_type node;
+
+ typedef typename node_allocator::pointer node_pointer;
+
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+
+ typedef
+ typename Node_And_It_Traits::null_node_update_pointer
+ null_node_update_pointer;
+
+ private:
+ typedef cond_dealtor< node, Allocator> cond_dealtor_t;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::key_type key_type;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::key_pointer key_pointer;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::const_key_pointer
+ const_key_pointer;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::key_reference key_reference;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::const_key_reference
+ const_key_reference;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::mapped_type mapped_type;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::mapped_pointer
+ mapped_pointer;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::const_mapped_pointer
+ const_mapped_pointer;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::mapped_reference
+ mapped_reference;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::const_mapped_reference
+ const_mapped_reference;
+#endif
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::value_type value_type;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::pointer pointer;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::const_pointer const_pointer;
+
+ typedef typename PB_DS_TYPES_TRAITS_C_DEC::reference reference;
+
+ typedef
+ typename PB_DS_TYPES_TRAITS_C_DEC::const_reference
+ const_reference;
+
+ typedef
+ typename Node_And_It_Traits::const_point_iterator
+ const_point_iterator;
+
+ typedef const_point_iterator const_iterator;
+
+ typedef typename Node_And_It_Traits::point_iterator point_iterator;
+
+ typedef point_iterator iterator;
+
+ typedef
+ typename Node_And_It_Traits::const_reverse_iterator
+ const_reverse_iterator;
+
+ typedef typename Node_And_It_Traits::reverse_iterator reverse_iterator;
+
+ typedef
+ typename Node_And_It_Traits::const_node_iterator
+ const_node_iterator;
+
+ typedef typename Node_And_It_Traits::node_iterator node_iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+ typedef typename Node_And_It_Traits::node_update node_update;
+
+ public:
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn);
+
+ PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const node_update& r_update);
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~PB_DS_CLASS_NAME();
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+ inline point_iterator
+ lower_bound(const_key_reference r_key);
+
+ inline const_point_iterator
+ lower_bound(const_key_reference r_key) const;
+
+ inline point_iterator
+ upper_bound(const_key_reference r_key);
+
+ inline const_point_iterator
+ upper_bound(const_key_reference r_key) const;
+
+ inline point_iterator
+ find(const_key_reference r_key);
+
+ inline const_point_iterator
+ find(const_key_reference r_key) const;
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ inline reverse_iterator
+ rbegin();
+
+ inline const_reverse_iterator
+ rbegin() const;
+
+ inline reverse_iterator
+ rend();
+
+ inline const_reverse_iterator
+ rend() const;
+
+ inline const_node_iterator
+ node_begin() const;
+
+ inline node_iterator
+ node_begin();
+
+ inline const_node_iterator
+ node_end() const;
+
+ inline node_iterator
+ node_end();
+
+ void
+ clear();
+
+ protected:
+
+ void
+ value_swap(PB_DS_CLASS_C_DEC& other);
+
+ void
+ initialize_min_max();
+
+ inline iterator
+ insert_imp_empty(const_reference r_value);
+
+ inline iterator
+ insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd);
+
+ inline node_pointer
+ get_new_node_for_leaf_insert(const_reference r_val, false_type);
+
+ inline node_pointer
+ get_new_node_for_leaf_insert(const_reference r_val, true_type);
+
+ inline void
+ actual_erase_node(node_pointer p_nd);
+
+ inline std::pair<node_pointer, bool>
+ erase(node_pointer p_nd);
+
+ inline void
+ update_min_max_for_erased_node(node_pointer p_nd);
+
+ static void
+ clear_imp(node_pointer p_nd);
+
+ inline std::pair<
+ point_iterator,
+ bool>
+ insert_leaf(const_reference r_value);
+
+ inline void
+ rotate_left(node_pointer p_x);
+
+ inline void
+ rotate_right(node_pointer p_y);
+
+ inline void
+ rotate_parent(node_pointer p_nd);
+
+ inline void
+ apply_update(node_pointer p_nd, null_node_update_pointer);
+
+ template<typename Node_Update_>
+ inline void
+ apply_update(node_pointer p_nd, Node_Update_* p_update);
+
+ inline void
+ update_to_top(node_pointer p_nd, null_node_update_pointer);
+
+ template<typename Node_Update_>
+ inline void
+ update_to_top(node_pointer p_nd, Node_Update_* p_update);
+
+ bool
+ join_prep(PB_DS_CLASS_C_DEC& other);
+
+ void
+ join_finish(PB_DS_CLASS_C_DEC& other);
+
+ bool
+ split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other);
+
+ void
+ split_finish(PB_DS_CLASS_C_DEC& other);
+
+ size_type
+ recursive_count(node_pointer p_nd) const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ structure_only_assert_valid() const;
+
+ void
+ assert_node_consistent(const node_pointer p_nd) const;
+#endif
+
+ private:
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_iterators() const;
+
+ void
+ assert_consistent_with_debug_base() const;
+
+ void
+ assert_node_consistent_with_left(const node_pointer p_nd) const;
+
+ void
+ assert_node_consistent_with_right(const node_pointer p_nd) const;
+
+ void
+ assert_consistent_with_debug_base(const node_pointer p_nd) const;
+
+ void
+ assert_min() const;
+
+ void
+ assert_min_imp(const node_pointer p_nd) const;
+
+ void
+ assert_max() const;
+
+ void
+ assert_max_imp(const node_pointer p_nd) const;
+
+ void
+ assert_size() const;
+
+ typedef std::pair< const_pointer, const_pointer> node_consistent_t;
+
+ node_consistent_t
+ assert_node_consistent_(const node_pointer p_nd) const;
+#endif
+
+ void
+ initialize();
+
+ node_pointer
+ recursive_copy_node(const node_pointer p_nd);
+
+ protected:
+ node_pointer m_p_head;
+
+ size_type m_size;
+
+ static node_allocator s_node_allocator;
+ };
+
+#include <ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+
+#undef PB_DS_CLASS_T_DEC
+
+#undef PB_DS_CLASS_NAME
+
+#undef PB_DS_TYPES_TRAITS_C_DEC
+
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+
+#ifdef PB_DS_TREE_TRACE
+#undef PB_DS_TREE_TRACE_BASE_C_DEC
+#endif
+
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
new file mode 100644
index 0000000..370574c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_dtor_entry_dealtor.hpp
@@ -0,0 +1,70 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_dtor_entry_dealtor.hpp
+ * Contains a binary tree container conditional deallocator
+ */
+
+class bin_search_tree_cond_dtor_entry_dealtor_
+{
+public:
+ inline
+ bin_search_tree_cond_dtor_entry_dealtor_(node_pointer p_nd) : m_p_nd(p_nd),
+ m_no_action_dtor(false)
+ { }
+
+ inline void
+ set_no_action_dtor()
+ {
+ m_no_action_dtor = true;
+ }
+
+ inline
+ ~bin_search_tree_cond_dtor_entry_dealtor_()
+ {
+ if (m_no_action_dtor)
+ return;
+
+ typename Allocator::template rebind<Node>::other().
+ deallocate(m_p_nd, 1);
+ }
+
+protected:
+ node_pointer m_p_nd;
+
+ bool m_no_action_dtor;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
new file mode 100644
index 0000000..612eceb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/cond_key_dtor_entry_dealtor.hpp
@@ -0,0 +1,81 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_key_dtor_entry_dealtor.hpp
+ * Contains a binary tree container conditional deallocator
+ */
+
+class bin_seach_tree_cond_key_dtor_entry_dealtor_
+{
+public:
+ inline
+ bin_seach_tree_cond_key_dtor_entry_dealtor_(node_pointer p_nd) : m_p_nd(p_nd),
+ m_no_action_dtor(false),
+ m_key_destruct(false)
+ { }
+
+ inline void
+ set_no_action_dtor()
+ {
+ m_no_action_dtor = true;
+ }
+
+ inline void
+ set_key_destruct()
+ {
+ m_key_destruct = true;
+ }
+
+ inline
+ ~bin_seach_tree_cond_key_dtor_entry_dealtor_()
+ {
+ if (m_no_action_dtor)
+ return;
+
+ if (m_key_destruct)
+ m_p_nd->m_value.first.~Key();
+
+ bin_tree_base::s_alloc.deallocate(m_p_nd, 1);
+ }
+
+protected:
+ node_pointer m_p_nd;
+
+ bool m_no_action_dtor;
+
+ bool m_key_destruct;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..925d204
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,218 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_allocator
+PB_DS_CLASS_C_DEC::s_node_allocator;
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME() : m_p_head(s_node_allocator.allocate(1)), m_size(0)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ Cmp_Fn(r_cmp_fn), m_p_head(s_node_allocator.allocate(1)), m_size(0)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const node_update& r_node_update) :
+ Cmp_Fn(r_cmp_fn),
+ node_update(r_node_update),
+ m_p_head(s_node_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(other),
+#endif
+#ifdef PB_DS_TREE_TRACE
+ PB_DS_TREE_TRACE_BASE_C_DEC(other),
+#endif
+ Cmp_Fn(other),
+ node_update(other),
+ m_p_head(s_node_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+ m_size = other.m_size;
+ _GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
+
+ __try
+ {
+ m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
+ if (m_p_head->m_p_parent != NULL)
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+ m_size = other.m_size;
+ initialize_min_max();
+ }
+ __catch(...)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+ s_node_allocator.deallocate(m_p_head, 1);
+ __throw_exception_again;
+ }
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
+ value_swap(other);
+ std::swap((Cmp_Fn& )(*this), (Cmp_Fn& )other);
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.structure_only_assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+value_swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
+ std::swap(m_p_head, other.m_p_head);
+ std::swap(m_size, other.m_size);
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_CLASS_NAME()
+{
+ clear();
+ s_node_allocator.deallocate(m_p_head, 1);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{
+ m_p_head->m_p_parent = NULL;
+ m_p_head->m_p_left = m_p_head;
+ m_p_head->m_p_right = m_p_head;
+ m_size = 0;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+recursive_copy_node(const node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return (NULL);
+
+ node_pointer p_ret = s_node_allocator.allocate(1);
+ __try
+ {
+ new (p_ret) node(*p_nd);
+ }
+ __catch(...)
+ {
+ s_node_allocator.deallocate(p_ret, 1);
+ __throw_exception_again;
+ }
+
+ p_ret->m_p_left = p_ret->m_p_right = NULL;
+
+ __try
+ {
+ p_ret->m_p_left = recursive_copy_node(p_nd->m_p_left);
+ p_ret->m_p_right = recursive_copy_node(p_nd->m_p_right);
+ }
+ __catch(...)
+ {
+ clear_imp(p_ret);
+ __throw_exception_again;
+ }
+
+ if (p_ret->m_p_left != NULL)
+ p_ret->m_p_left->m_p_parent = p_ret;
+
+ if (p_ret->m_p_right != NULL)
+ p_ret->m_p_right->m_p_parent = p_ret;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_ret);)
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize_min_max()
+{
+ if (m_p_head->m_p_parent == NULL)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+ return;
+ }
+
+ {
+ node_pointer p_min = m_p_head->m_p_parent;
+ while (p_min->m_p_left != NULL)
+ p_min = p_min->m_p_left;
+ m_p_head->m_p_left = p_min;
+ }
+
+ {
+ node_pointer p_max = m_p_head->m_p_parent;
+ while (p_max->m_p_right != NULL)
+ p_max = p_max->m_p_right;
+ m_p_head->m_p_right = p_max;
+ }
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
new file mode 100644
index 0000000..e3447bd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp
@@ -0,0 +1,272 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ structure_only_assert_valid();
+ assert_consistent_with_debug_base();
+ assert_size();
+ assert_iterators();
+ if (m_p_head->m_p_parent == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_size == 0);
+ }
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+structure_only_assert_valid() const
+{
+ _GLIBCXX_DEBUG_ASSERT(m_p_head != NULL);
+ if (m_p_head->m_p_parent == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_left == m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_right == m_p_head);
+ }
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_parent->m_p_parent == m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_left != m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_right != m_p_head);
+ }
+
+ if (m_p_head->m_p_parent != NULL)
+ assert_node_consistent(m_p_head->m_p_parent);
+ assert_min();
+ assert_max();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent(const node_pointer p_nd) const
+{
+ assert_node_consistent_(p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_consistent_t
+PB_DS_CLASS_C_DEC::
+assert_node_consistent_(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return (std::make_pair((const_pointer)NULL,(const_pointer)NULL));
+
+ assert_node_consistent_with_left(p_nd);
+ assert_node_consistent_with_right(p_nd);
+
+ const std::pair<const_pointer, const_pointer>
+ l_range = assert_node_consistent_(p_nd->m_p_left);
+
+ if (l_range.second != NULL)
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(PB_DS_V2F(*l_range.second),
+ PB_DS_V2F(p_nd->m_value)));
+
+ const std::pair<const_pointer, const_pointer>
+ r_range = assert_node_consistent_(p_nd->m_p_right);
+
+ if (r_range.first != NULL)
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value),
+ PB_DS_V2F(*r_range.first)));
+
+ return (std::make_pair((l_range.first != NULL)? l_range.first :& p_nd->m_value,(r_range.second != NULL)? r_range.second :& p_nd->m_value));
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent_with_left(const node_pointer p_nd) const
+{
+ if (p_nd->m_p_left == NULL)
+ return;
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_left->m_p_parent == p_nd);
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value),
+ PB_DS_V2F(p_nd->m_p_left->m_value)));
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent_with_right(const node_pointer p_nd) const
+{
+ if (p_nd->m_p_right == NULL)
+ return;
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_right->m_p_parent == p_nd);
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_p_right->m_value),
+ PB_DS_V2F(p_nd->m_value)));
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_min() const
+{
+ assert_min_imp(m_p_head->m_p_parent);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_min_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_left == m_p_head);
+ return;
+ }
+
+ if (p_nd->m_p_left == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd == m_p_head->m_p_left);
+ return;
+ }
+ assert_min_imp(p_nd->m_p_left);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_max() const
+{
+ assert_max_imp(m_p_head->m_p_parent);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_max_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_right == m_p_head);
+ return;
+ }
+
+ if (p_nd->m_p_right == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd == m_p_head->m_p_right);
+ return;
+ }
+
+ assert_max_imp(p_nd->m_p_right);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_iterators() const
+{
+ size_type iterated_num = 0;
+ const_iterator prev_it = end();
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ ++iterated_num;
+ _GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)).m_p_nd == it.m_p_nd);
+ const_iterator upper_bound_it = upper_bound(PB_DS_V2F(*it));
+ --upper_bound_it;
+ _GLIBCXX_DEBUG_ASSERT(upper_bound_it.m_p_nd == it.m_p_nd);
+
+ if (prev_it != end())
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(PB_DS_V2F(*prev_it),
+ PB_DS_V2F(*it)));
+ prev_it = it;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(iterated_num == m_size);
+ size_type reverse_iterated_num = 0;
+ const_reverse_iterator reverse_prev_it = rend();
+ for (const_reverse_iterator reverse_it = rbegin(); reverse_it != rend();
+ ++reverse_it)
+ {
+ ++reverse_iterated_num;
+ _GLIBCXX_DEBUG_ASSERT(lower_bound(
+ PB_DS_V2F(*reverse_it)).m_p_nd == reverse_it.m_p_nd);
+
+ const_iterator upper_bound_it = upper_bound(PB_DS_V2F(*reverse_it));
+ --upper_bound_it;
+ _GLIBCXX_DEBUG_ASSERT(upper_bound_it.m_p_nd == reverse_it.m_p_nd);
+ if (reverse_prev_it != rend())
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(PB_DS_V2F(*reverse_prev_it),
+ PB_DS_V2F(*reverse_it)));
+ reverse_prev_it = reverse_it;
+ }
+ _GLIBCXX_DEBUG_ASSERT(reverse_iterated_num == m_size);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_consistent_with_debug_base() const
+{
+ debug_base::check_size(m_size);
+ assert_consistent_with_debug_base(m_p_head->m_p_parent);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_consistent_with_debug_base(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return;
+ debug_base::check_key_exists(PB_DS_V2F(p_nd->m_value));
+ assert_consistent_with_debug_base(p_nd->m_p_left);
+ assert_consistent_with_debug_base(p_nd->m_p_right);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_size() const
+{
+ _GLIBCXX_DEBUG_ASSERT(recursive_count(m_p_head->m_p_parent) == m_size);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
new file mode 100644
index 0000000..a000c74
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+actual_erase_node(node_pointer p_z)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+
+ _GLIBCXX_DEBUG_ONLY(erase_existing(PB_DS_V2F(p_z->m_value)));
+
+ p_z->~node();
+
+ s_node_allocator.deallocate(p_z, 1);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_min_max_for_erased_node(node_pointer p_z)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+
+ return;
+ }
+
+ if (m_p_head->m_p_left == p_z)
+ {
+ iterator it(p_z);
+
+ ++it;
+
+ m_p_head->m_p_left = it.m_p_nd;
+ }
+ else if (m_p_head->m_p_right == p_z)
+ {
+ iterator it(p_z);
+
+ --it;
+
+ m_p_head->m_p_right = it.m_p_nd;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ clear_imp(m_p_head->m_p_parent);
+
+ m_size = 0;
+
+ initialize();
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return;
+
+ clear_imp(p_nd->m_p_left);
+
+ clear_imp(p_nd->m_p_right);
+
+ p_nd->~node();
+
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp
new file mode 100644
index 0000000..413304b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp
@@ -0,0 +1,182 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+lower_bound(const_key_reference r_key) const
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(
+ PB_DS_V2F(p_nd->m_value),
+ r_key))
+ p_nd = p_nd->m_p_right;
+ else
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+
+ return (iterator(p_pot));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+lower_bound(const_key_reference r_key)
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(
+ PB_DS_V2F(p_nd->m_value),
+ r_key))
+ p_nd = p_nd->m_p_right;
+ else
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+
+ return (iterator(p_pot));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+upper_bound(const_key_reference r_key) const
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(r_key,
+ PB_DS_V2F(p_nd->m_value)))
+ {
+ p_pot = p_nd,
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (const_iterator(p_pot));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+upper_bound(const_key_reference r_key)
+{
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (Cmp_Fn::operator()(r_key,
+ PB_DS_V2F(p_nd->m_value)))
+ {
+ p_pot = p_nd,
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return (point_iterator(p_pot));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return point_iterator((p_pot != m_p_head&& Cmp_Fn::operator()(
+ r_key,
+ PB_DS_V2F(p_pot->m_value)))?
+ m_p_head : p_pot);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ node_pointer p_pot = m_p_head;
+ node_pointer p_nd = m_p_head->m_p_parent;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ return const_point_iterator((p_pot != m_p_head&& Cmp_Fn::operator()(
+ r_key,
+ PB_DS_V2F(p_pot->m_value)))?
+ m_p_head : p_pot);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp
new file mode 100644
index 0000000..b3e4611
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{
+ return (m_size == 0);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{
+ return (m_size);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{
+ return (s_node_allocator.max_size());
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
new file mode 100644
index 0000000..3abf0a0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
@@ -0,0 +1,211 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_leaf(const_reference r_value)
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ if (m_size == 0)
+ return (std::make_pair(
+ insert_imp_empty(r_value),
+ true));
+
+ node_pointer p_nd = m_p_head->m_p_parent;
+ node_pointer p_pot = m_p_head;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(
+ PB_DS_V2F(p_nd->m_value),
+ PB_DS_V2F(r_value)))
+ {
+ p_pot = p_nd;
+
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ if (p_pot == m_p_head)
+ return (std::make_pair(
+ insert_leaf_new(r_value, m_p_head->m_p_right, false),
+ true));
+
+ if (!Cmp_Fn::operator()(
+ PB_DS_V2F(r_value),
+ PB_DS_V2F(p_pot->m_value)))
+ {
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(
+ PB_DS_V2F(r_value)));
+
+ return (std::make_pair(p_pot, false));
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
+ PB_DS_V2F(r_value)));
+
+ p_nd = p_pot->m_p_left;
+ if (p_nd == NULL)
+ return (std::make_pair(
+ insert_leaf_new(r_value, p_pot, true),
+ true));
+
+ while (p_nd->m_p_right != NULL)
+ p_nd = p_nd->m_p_right;
+
+ return (std::make_pair(
+ insert_leaf_new(r_value, p_nd, false),
+ true));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd)
+{
+ node_pointer p_new_nd =
+ get_new_node_for_leaf_insert( r_value, traits_base::m_no_throw_copies_indicator);
+
+ if (left_nd)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_left == NULL);
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(
+ PB_DS_V2F(r_value),
+ PB_DS_V2F(p_nd->m_value)));
+
+ p_nd->m_p_left = p_new_nd;
+
+ if (m_p_head->m_p_left == p_nd)
+ m_p_head->m_p_left = p_new_nd;
+ }
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_right == NULL);
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(
+ PB_DS_V2F(p_nd->m_value),
+ PB_DS_V2F(r_value)));
+
+ p_nd->m_p_right = p_new_nd;
+
+ if (m_p_head->m_p_right == p_nd)
+ m_p_head->m_p_right = p_new_nd;
+ }
+
+ p_new_nd->m_p_parent = p_nd;
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_nd));
+
+ update_to_top(p_new_nd, (node_update* )this);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
+ PB_DS_V2F(r_value)));
+
+ return (iterator(p_new_nd));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+insert_imp_empty(const_reference r_value)
+{
+ node_pointer p_new_node =
+ get_new_node_for_leaf_insert( r_value, traits_base::m_no_throw_copies_indicator);
+
+ m_p_head->m_p_left = m_p_head->m_p_right =
+ m_p_head->m_p_parent = p_new_node;
+
+ p_new_node->m_p_parent = m_p_head;
+
+ p_new_node->m_p_left = p_new_node->m_p_right = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(
+ PB_DS_V2F(r_value)));
+
+ update_to_top(m_p_head->m_p_parent, (node_update* )this);
+
+ return (iterator(p_new_node));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+get_new_node_for_leaf_insert(const_reference r_val, false_type)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ cond_dealtor_t cond(p_new_nd);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename node::value_type(r_val);
+
+ cond.set_no_action();
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+get_new_node_for_leaf_insert(const_reference r_val, true_type)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename node::value_type(r_val);
+
+ p_new_nd->m_p_left = p_new_nd->m_p_right = NULL;
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..ed7f1b1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp
@@ -0,0 +1,136 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ return (iterator(m_p_head->m_p_left));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ return (const_iterator(m_p_head->m_p_left));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{
+ return (iterator(m_p_head));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{
+ return (const_iterator(m_p_head));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
+PB_DS_CLASS_C_DEC::
+rbegin() const
+{
+ return (const_reverse_iterator(m_p_head->m_p_right));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+rbegin()
+{
+ return (reverse_iterator(m_p_head->m_p_right));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+rend()
+{
+ return (reverse_iterator(m_p_head));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
+PB_DS_CLASS_C_DEC::
+rend() const
+{
+ return (const_reverse_iterator(m_p_head));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin() const
+{
+ return (const_node_iterator(m_p_head->m_p_parent));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin()
+{
+ return (node_iterator(m_p_head->m_p_parent));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_end() const
+{
+ return (const_node_iterator(NULL));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_end()
+{
+ return (node_iterator(NULL));
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp
new file mode 100644
index 0000000..365f02b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp
@@ -0,0 +1,237 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_iterators.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP
+#define PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC \
+ bin_search_tree_const_node_it_< \
+ Node, \
+ Const_Iterator, \
+ Iterator, \
+ Allocator>
+
+ // Const node iterator.
+ template<typename Node,
+ class Const_Iterator,
+ class Iterator,
+ class Allocator>
+ class bin_search_tree_const_node_it_
+ {
+ private:
+
+ private:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ public:
+
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // __Iterator's value type.
+ typedef Const_Iterator value_type;
+
+ // __Iterator's reference type.
+ typedef Const_Iterator reference;
+
+ // __Iterator's __const reference type.
+ typedef Const_Iterator const_reference;
+
+ // Metadata type.
+ typedef typename Node::metadata_type metadata_type;
+
+ // Const metadata reference type.
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::const_reference
+ const_metadata_reference;
+
+ public:
+
+ // Default constructor.
+ /*
+ inline
+ bin_search_tree_const_node_it_()
+ */
+
+ inline
+ bin_search_tree_const_node_it_(const node_pointer p_nd = NULL) : m_p_nd(const_cast<node_pointer>(p_nd))
+ { }
+
+ // Access.
+ inline const_reference
+ operator*() const
+ {
+ return (Const_Iterator(m_p_nd));
+ }
+
+ // Metadata access.
+ inline const_metadata_reference
+ get_metadata() const
+ {
+ return (m_p_nd->get_metadata());
+ }
+
+ // Returns the __const node iterator associated with the left node.
+ inline PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
+ get_l_child() const
+ {
+ return (PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_left));
+ }
+
+ // Returns the __const node iterator associated with the right node.
+ inline PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
+ get_r_child() const
+ {
+ return (PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(m_p_nd->m_p_right));
+ }
+
+ // Compares to a different iterator object.
+ inline bool
+ operator==(const PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other) const
+ {
+ return (m_p_nd == other.m_p_nd);
+ }
+
+ // Compares (negatively) to a different iterator object.
+ inline bool
+ operator!=(const PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC& other) const
+ {
+ return (m_p_nd != other.m_p_nd);
+ }
+
+ public:
+ node_pointer m_p_nd;
+ };
+
+#define PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC \
+ bin_search_tree_node_it_< \
+ Node, \
+ Const_Iterator, \
+ Iterator, \
+ Allocator>
+
+ // Node iterator.
+ template<typename Node,
+ class Const_Iterator,
+ class Iterator,
+ class Allocator>
+ class bin_search_tree_node_it_ :
+ public PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
+
+ {
+
+ private:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ public:
+
+ // __Iterator's value type.
+ typedef Iterator value_type;
+
+ // __Iterator's reference type.
+ typedef Iterator reference;
+
+ // __Iterator's __const reference type.
+ typedef Iterator const_reference;
+
+ public:
+
+ // Default constructor.
+ /*
+ inline
+ bin_search_tree_node_it_();
+ */
+
+ inline
+ bin_search_tree_node_it_(const node_pointer p_nd = NULL) : PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC(
+ const_cast<node_pointer>(p_nd))
+ { }
+
+ // Access.
+ inline Iterator
+ operator*() const
+ {
+ return (Iterator(PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd));
+ }
+
+ // Returns the node iterator associated with the left node.
+ inline PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
+ get_l_child() const
+ {
+ return (PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(
+ PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_left));
+ }
+
+ // Returns the node iterator associated with the right node.
+ inline PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
+ get_r_child() const
+ {
+ return (PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC(
+ PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC::m_p_nd->m_p_right));
+ }
+
+ };
+
+#undef PB_DS_TREE_CONST_NODE_ITERATOR_CLASS_C_DEC
+
+#undef PB_DS_TREE_NODE_ITERATOR_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_ITERATORS_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp
new file mode 100644
index 0000000..bb249e0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp
@@ -0,0 +1,381 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file point_iterators.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#ifndef PB_DS_BIN_SEARCH_TREE_FIND_ITERATORS_HPP
+#define PB_DS_BIN_SEARCH_TREE_FIND_ITERATORS_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_TREE_CONST_IT_C_DEC \
+ bin_search_tree_const_it_< \
+ Node_Pointer, \
+ Value_Type, \
+ Pointer, \
+ Const_Pointer, \
+ Reference, \
+ Const_Reference, \
+ Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_TREE_CONST_ODIR_IT_C_DEC \
+ bin_search_tree_const_it_< \
+ Node_Pointer, \
+ Value_Type, \
+ Pointer, \
+ Const_Pointer, \
+ Reference, \
+ Const_Reference, \
+ !Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_TREE_IT_C_DEC \
+ bin_search_tree_it_< \
+ Node_Pointer, \
+ Value_Type, \
+ Pointer, \
+ Const_Pointer, \
+ Reference, \
+ Const_Reference, \
+ Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_TREE_ODIR_IT_C_DEC \
+ bin_search_tree_it_< \
+ Node_Pointer, \
+ Value_Type, \
+ Pointer, \
+ Const_Pointer, \
+ Reference, \
+ Const_Reference, \
+ !Is_Forward_Iterator, \
+ Allocator>
+
+ // Const iterator.
+ template<typename Node_Pointer,
+ typename Value_Type,
+ typename Pointer,
+ typename Const_Pointer,
+ typename Reference,
+ typename Const_Reference,
+ bool Is_Forward_Iterator,
+ class Allocator>
+ class bin_search_tree_const_it_
+ {
+
+ public:
+
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef Pointer pointer;
+
+ typedef Const_Pointer const_pointer;
+
+ typedef Reference reference;
+
+ typedef Const_Reference const_reference;
+
+ public:
+
+ inline
+ bin_search_tree_const_it_(const Node_Pointer p_nd = NULL)
+ : m_p_nd(const_cast<Node_Pointer>(p_nd))
+ { }
+
+ inline
+ bin_search_tree_const_it_(const PB_DS_TREE_CONST_ODIR_IT_C_DEC& other)
+ : m_p_nd(other.m_p_nd)
+ { }
+
+ inline
+ PB_DS_TREE_CONST_IT_C_DEC&
+ operator=(const PB_DS_TREE_CONST_IT_C_DEC& other)
+ {
+ m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline
+ PB_DS_TREE_CONST_IT_C_DEC&
+ operator=(const PB_DS_TREE_CONST_ODIR_IT_C_DEC& other)
+ {
+ m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline const_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
+ return &m_p_nd->m_value;
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
+ return m_p_nd->m_value;
+ }
+
+ inline bool
+ operator==(const PB_DS_TREE_CONST_IT_C_DEC & other) const
+ { return m_p_nd == other.m_p_nd; }
+
+ inline bool
+ operator==(const PB_DS_TREE_CONST_ODIR_IT_C_DEC & other) const
+ { return m_p_nd == other.m_p_nd; }
+
+ inline bool
+ operator!=(const PB_DS_TREE_CONST_IT_C_DEC& other) const
+ { return m_p_nd != other.m_p_nd; }
+
+ inline bool
+ operator!=(const PB_DS_TREE_CONST_ODIR_IT_C_DEC& other) const
+ { return m_p_nd != other.m_p_nd; }
+
+ inline PB_DS_TREE_CONST_IT_C_DEC&
+ operator++()
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
+ inc(integral_constant<int,Is_Forward_Iterator>());
+ return *this;
+ }
+
+ inline PB_DS_TREE_CONST_IT_C_DEC
+ operator++(int)
+ {
+ PB_DS_TREE_CONST_IT_C_DEC ret_it(m_p_nd);
+ operator++();
+ return ret_it;
+ }
+
+ inline PB_DS_TREE_CONST_IT_C_DEC&
+ operator--()
+ {
+ dec(integral_constant<int,Is_Forward_Iterator>());
+ return *this;
+ }
+
+ inline PB_DS_TREE_CONST_IT_C_DEC
+ operator--(int)
+ {
+ PB_DS_TREE_CONST_IT_C_DEC ret_it(m_p_nd);
+ operator--();
+ return ret_it;
+ }
+
+ protected:
+ inline void
+ inc(false_type)
+ { dec(true_type()); }
+
+ void
+ inc(true_type)
+ {
+ if (m_p_nd->special()&&
+ m_p_nd->m_p_parent->m_p_parent == m_p_nd)
+ {
+ m_p_nd = m_p_nd->m_p_left;
+ return;
+ }
+
+ if (m_p_nd->m_p_right != NULL)
+ {
+ m_p_nd = m_p_nd->m_p_right;
+ while (m_p_nd->m_p_left != NULL)
+ m_p_nd = m_p_nd->m_p_left;
+ return;
+ }
+
+ Node_Pointer p_y = m_p_nd->m_p_parent;
+ while (m_p_nd == p_y->m_p_right)
+ {
+ m_p_nd = p_y;
+ p_y = p_y->m_p_parent;
+ }
+
+ if (m_p_nd->m_p_right != p_y)
+ m_p_nd = p_y;
+ }
+
+ inline void
+ dec(false_type)
+ { inc(true_type()); }
+
+ void
+ dec(true_type)
+ {
+ if (m_p_nd->special() && m_p_nd->m_p_parent->m_p_parent == m_p_nd)
+ {
+ m_p_nd = m_p_nd->m_p_right;
+ return;
+ }
+
+ if (m_p_nd->m_p_left != NULL)
+ {
+ Node_Pointer p_y = m_p_nd->m_p_left;
+ while (p_y->m_p_right != NULL)
+ p_y = p_y->m_p_right;
+ m_p_nd = p_y;
+ return;
+ }
+
+ Node_Pointer p_y = m_p_nd->m_p_parent;
+ while (m_p_nd == p_y->m_p_left)
+ {
+ m_p_nd = p_y;
+ p_y = p_y->m_p_parent;
+ }
+ if (m_p_nd->m_p_left != p_y)
+ m_p_nd = p_y;
+ }
+
+ public:
+ Node_Pointer m_p_nd;
+ };
+
+ // Iterator.
+ template<typename Node_Pointer,
+ typename Value_Type,
+ typename Pointer,
+ typename Const_Pointer,
+ typename Reference,
+ typename Const_Reference,
+ bool Is_Forward_Iterator,
+ class Allocator>
+ class bin_search_tree_it_ :
+ public PB_DS_TREE_CONST_IT_C_DEC
+
+ {
+
+ public:
+
+ inline
+ bin_search_tree_it_(const Node_Pointer p_nd = NULL)
+ : PB_DS_TREE_CONST_IT_C_DEC((Node_Pointer)p_nd)
+ { }
+
+ inline
+ bin_search_tree_it_(const PB_DS_TREE_ODIR_IT_C_DEC& other)
+ : PB_DS_TREE_CONST_IT_C_DEC(other.m_p_nd)
+ { }
+
+ inline
+ PB_DS_TREE_IT_C_DEC&
+ operator=(const PB_DS_TREE_IT_C_DEC& other)
+ {
+ base_it_type::m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline
+ PB_DS_TREE_IT_C_DEC&
+ operator=(const PB_DS_TREE_ODIR_IT_C_DEC& other)
+ {
+ base_it_type::m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline typename PB_DS_TREE_CONST_IT_C_DEC::pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_it_type::m_p_nd != NULL);
+ return &base_it_type::m_p_nd->m_value;
+ }
+
+ inline typename PB_DS_TREE_CONST_IT_C_DEC::reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_it_type::m_p_nd != NULL);
+ return base_it_type::m_p_nd->m_value;
+ }
+
+ inline PB_DS_TREE_IT_C_DEC&
+ operator++()
+ {
+ PB_DS_TREE_CONST_IT_C_DEC:: operator++();
+ return *this;
+ }
+
+ inline PB_DS_TREE_IT_C_DEC
+ operator++(int)
+ {
+ PB_DS_TREE_IT_C_DEC ret_it(base_it_type::m_p_nd);
+ operator++();
+ return ret_it;
+ }
+
+ inline PB_DS_TREE_IT_C_DEC&
+ operator--()
+ {
+ PB_DS_TREE_CONST_IT_C_DEC:: operator--();
+ return *this;
+ }
+
+ inline PB_DS_TREE_IT_C_DEC
+ operator--(int)
+ {
+ PB_DS_TREE_IT_C_DEC ret_it(base_it_type::m_p_nd);
+ operator--();
+ return ret_it;
+ }
+
+ protected:
+ typedef PB_DS_TREE_CONST_IT_C_DEC base_it_type;
+ };
+
+#undef PB_DS_TREE_CONST_IT_C_DEC
+#undef PB_DS_TREE_CONST_ODIR_IT_C_DEC
+#undef PB_DS_TREE_IT_C_DEC
+#undef PB_DS_TREE_ODIR_IT_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..63f307d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn()
+{
+ return (*this);
+}
+
+PB_DS_CLASS_T_DEC
+const Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn() const
+{
+ return (*this);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
new file mode 100644
index 0000000..667ef84
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file r_erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+actual_erase_node(node_pointer p_z)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+
+ _GLIBCXX_DEBUG_ONLY(erase_existing(PB_DS_V2F(p_z->m_value)));
+
+ p_z->~node();
+
+ s_node_allocator.deallocate(p_z, 1);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_min_max_for_erased_node(node_pointer p_z)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+
+ return;
+ }
+
+ if (m_p_head->m_p_left == p_z)
+ {
+ iterator it(p_z);
+
+ ++it;
+
+ m_p_head->m_p_left = it.m_p_nd;
+ }
+ else if (m_p_head->m_p_right == p_z)
+ {
+ iterator it(p_z);
+
+ --it;
+
+ m_p_head->m_p_right = it.m_p_nd;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+
+ clear_imp(m_p_head->m_p_parent);
+
+ m_size = 0;
+
+ initialize();
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+
+ _GLIBCXX_DEBUG_ONLY(structure_only_assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return;
+
+ clear_imp(p_nd->m_p_left);
+
+ clear_imp(p_nd->m_p_right);
+
+ p_nd->~Node();
+
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp
new file mode 100644
index 0000000..0598657
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp
@@ -0,0 +1,156 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file rotate_fn_imps.hpp
+ * Contains imps for rotating nodes.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_left(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_right;
+
+ p_x->m_p_right = p_y->m_p_left;
+
+ if (p_y->m_p_left != NULL)
+ p_y->m_p_left->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_left)
+ p_x->m_p_parent->m_p_left = p_y;
+ else
+ p_x->m_p_parent->m_p_right = p_y;
+
+ p_y->m_p_left = p_x;
+ p_x->m_p_parent = p_y;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_x);)
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (node_update* )this);
+ apply_update(p_x->m_p_parent, (node_update* )this);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_right(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_left;
+
+ p_x->m_p_left = p_y->m_p_right;
+
+ if (p_y->m_p_right != NULL)
+ p_y->m_p_right->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_right)
+ p_x->m_p_parent->m_p_right = p_y;
+ else
+ p_x->m_p_parent->m_p_left = p_y;
+
+ p_y->m_p_right = p_x;
+ p_x->m_p_parent = p_y;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_x);)
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (node_update* )this);
+ apply_update(p_x->m_p_parent, (node_update* )this);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_parent(node_pointer p_nd)
+{
+ node_pointer p_parent = p_nd->m_p_parent;
+
+ if (p_nd == p_parent->m_p_left)
+ rotate_right(p_parent);
+ else
+ rotate_left(p_parent);
+
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_parent = p_nd);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_left == p_parent ||
+ p_nd->m_p_right == p_parent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer /*p_nd*/, null_node_update_pointer /*p_update*/)
+{ }
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer p_nd, Node_Update_* /*p_update*/)
+{
+ node_update::operator()(
+ node_iterator(p_nd),
+ const_node_iterator(static_cast<node_pointer>(NULL)));
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+inline void
+PB_DS_CLASS_C_DEC::
+update_to_top(node_pointer p_nd, Node_Update_* p_update)
+{
+ while (p_nd != m_p_head)
+ {
+ apply_update(p_nd, p_update);
+
+ p_nd = p_nd->m_p_parent;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_to_top(node_pointer /*p_nd*/, null_node_update_pointer /*p_update*/)
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..9d2bd6d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/split_join_fn_imps.hpp
@@ -0,0 +1,146 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+bool
+PB_DS_CLASS_C_DEC::
+join_prep(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ if (other.m_size == 0)
+ return false;
+
+ if (m_size == 0)
+ {
+ value_swap(other);
+ return false;
+ }
+
+ const bool greater = Cmp_Fn::operator()(PB_DS_V2F(m_p_head->m_p_right->m_value), PB_DS_V2F(other.m_p_head->m_p_left->m_value));
+
+ const bool lesser = Cmp_Fn::operator()(PB_DS_V2F(other.m_p_head->m_p_right->m_value), PB_DS_V2F(m_p_head->m_p_left->m_value));
+
+ if (!greater && !lesser)
+ __throw_join_error();
+
+ if (lesser)
+ value_swap(other);
+
+ m_size += other.m_size;
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+join_finish(PB_DS_CLASS_C_DEC& other)
+{
+ initialize_min_max();
+ other.initialize();
+}
+
+PB_DS_CLASS_T_DEC
+bool
+PB_DS_CLASS_C_DEC::
+split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ other.clear();
+
+ if (m_size == 0)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return false;
+ }
+
+ if (Cmp_Fn::operator()(r_key, PB_DS_V2F(m_p_head->m_p_left->m_value)))
+ {
+ value_swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return false;
+ }
+
+ if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(m_p_head->m_p_right->m_value)))
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return false;
+ }
+
+ if (m_size == 1)
+ {
+ value_swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return false;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split_finish(PB_DS_CLASS_C_DEC& other)
+{
+ other.initialize_min_max();
+ other.m_size = std::distance(other.begin(), other.end());
+ m_size -= other.m_size;
+ initialize_min_max();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+recursive_count(node_pointer p) const
+{
+ if (p == NULL)
+ return 0;
+ return 1 + recursive_count(p->m_p_left) + recursive_count(p->m_p_right);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
new file mode 100644
index 0000000..58c30c3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
@@ -0,0 +1,250 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation for bin_search_tree_.
+ */
+
+#ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Key,
+ typename Mapped,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn,
+ class Allocator>
+ class Node_Update,
+ class Node,
+ class Allocator>
+ struct bin_search_tree_traits
+ {
+ private:
+ typedef
+ types_traits<
+ Key,
+ Mapped,
+ Allocator,
+ false>
+ type_traits;
+
+ public:
+ typedef Node node;
+
+ typedef
+ bin_search_tree_const_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ true,
+ Allocator>
+ const_point_iterator;
+
+ typedef
+ bin_search_tree_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ true,
+ Allocator>
+ point_iterator;
+
+ typedef
+ bin_search_tree_const_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ false,
+ Allocator>
+ const_reverse_iterator;
+
+ typedef
+ bin_search_tree_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ false,
+ Allocator>
+ reverse_iterator;
+
+ typedef
+ bin_search_tree_const_node_it_<
+ Node,
+ const_point_iterator,
+ point_iterator,
+ Allocator>
+ const_node_iterator;
+
+ typedef
+ bin_search_tree_node_it_<
+ Node,
+ const_point_iterator,
+ point_iterator,
+ Allocator>
+ node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_tree_node_update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ template<typename Key,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn,
+ class Allocator>
+ class Node_Update,
+ class Node,
+ class Allocator>
+ struct bin_search_tree_traits<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ Node,
+ Allocator>
+ {
+ private:
+ typedef
+ types_traits<
+ Key,
+ null_mapped_type,
+ Allocator,
+ false>
+ type_traits;
+
+ public:
+ typedef Node node;
+
+ typedef
+ bin_search_tree_const_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ true,
+ Allocator>
+ const_point_iterator;
+
+ typedef const_point_iterator point_iterator;
+
+ typedef
+ bin_search_tree_const_it_<
+ typename Allocator::template rebind<
+ node>::other::pointer,
+ typename type_traits::value_type,
+ typename type_traits::pointer,
+ typename type_traits::const_pointer,
+ typename type_traits::reference,
+ typename type_traits::const_reference,
+ false,
+ Allocator>
+ const_reverse_iterator;
+
+ typedef const_reverse_iterator reverse_iterator;
+
+ typedef
+ bin_search_tree_const_node_it_<
+ Node,
+ const_point_iterator,
+ point_iterator,
+ Allocator>
+ const_node_iterator;
+
+ typedef const_node_iterator node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_tree_node_update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_BIN_SEARCH_TREE_NODE_AND_IT_TRAITS_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
new file mode 100644
index 0000000..576cba2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp
@@ -0,0 +1,357 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file binary_heap_.hpp
+ * Contains an implementation class for a binary heap.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_HPP
+#define PB_DS_BINARY_HEAP_HPP
+
+/*
+ * Based on CLRS.
+ */
+
+#include <queue>
+#include <algorithm>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/binary_heap_/entry_cmp.hpp>
+#include <ext/pb_ds/detail/binary_heap_/entry_pred.hpp>
+#include <ext/pb_ds/detail/binary_heap_/resize_policy.hpp>
+#include <ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp>
+#include <ext/pb_ds/detail/binary_heap_/const_iterator.hpp>
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+#include <iostream>
+#endif
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ binary_heap_<Value_Type, Cmp_Fn, Allocator>
+
+#define PB_DS_ENTRY_CMP_DEC \
+ entry_cmp<Value_Type, Cmp_Fn, is_simple<Value_Type>::value, Allocator>::type
+
+#define PB_DS_RESIZE_POLICY_DEC \
+ __gnu_pbds::detail::resize_policy<typename Allocator::size_type>
+
+ /**
+ * class description = "Base class for some types of h3ap$">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class binary_heap_ : public PB_DS_ENTRY_CMP_DEC,
+ public PB_DS_RESIZE_POLICY_DEC
+ {
+
+ private:
+ enum
+ {
+ simple_value = is_simple<Value_Type>::value
+ };
+
+ typedef integral_constant<int, simple_value> no_throw_copies_t;
+
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other
+ value_allocator;
+
+ typedef
+ typename __conditional_type<
+ simple_value,
+ Value_Type,
+ typename value_allocator::pointer>::__type
+ entry;
+
+ typedef
+ typename Allocator::template rebind<
+ entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ typedef typename PB_DS_ENTRY_CMP_DEC entry_cmp;
+
+ typedef PB_DS_RESIZE_POLICY_DEC resize_policy;
+
+ typedef
+ cond_dealtor<
+ Value_Type,
+ Allocator>
+ cond_dealtor_t;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ binary_heap_const_point_iterator_<
+ value_type,
+ entry,
+ simple_value,
+ Allocator>
+ const_point_iterator;
+
+ typedef const_point_iterator point_iterator;
+
+ typedef
+ binary_heap_const_iterator_<
+ value_type,
+ entry,
+ simple_value,
+ Allocator>
+ const_iterator;
+
+ typedef const_iterator iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+ public:
+
+ binary_heap_();
+
+ binary_heap_(const Cmp_Fn& r_cmp_fn);
+
+ binary_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~binary_heap_();
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+ inline point_iterator
+ push(const_reference r_val);
+
+ void
+ modify(point_iterator it, const_reference r_new_val);
+
+ inline const_reference
+ top() const;
+
+ inline void
+ pop();
+
+ inline void
+ erase(point_iterator it);
+
+ template<typename Pred>
+ typename PB_DS_CLASS_C_DEC::size_type
+ erase_if(Pred pred);
+
+ inline static void
+ erase_at(entry_pointer a_entries, size_type size, false_type);
+
+ inline static void
+ erase_at(entry_pointer a_entries, size_type size, true_type);
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ void
+ clear();
+
+ template<typename Pred>
+ void
+ split(Pred pred, PB_DS_CLASS_C_DEC& other);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ protected:
+
+ template<typename It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ private:
+
+ void
+ value_swap(PB_DS_CLASS_C_DEC& other);
+
+ inline void
+ insert_value(const_reference r_val, false_type);
+
+ inline void
+ insert_value(value_type val, true_type);
+
+ inline void
+ insert_entry(entry e);
+
+ inline void
+ resize_for_insert_if_needed();
+
+ inline void
+ swap_value_imp(entry_pointer p_e, value_type new_val, true_type);
+
+ inline void
+ swap_value_imp(entry_pointer p_e, const_reference r_new_val, false_type);
+
+ void
+ fix(entry_pointer p_e);
+
+ inline const_reference
+ top_imp(true_type) const;
+
+ inline const_reference
+ top_imp(false_type) const;
+
+ inline static size_type
+ left_child(size_type i);
+
+ inline static size_type
+ right_child(size_type i);
+
+ inline static size_type
+ parent(size_type i);
+
+ inline void
+ resize_for_erase_if_needed();
+
+ template<typename Pred>
+ size_type
+ partition(Pred pred);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+ void
+ trace_entry(const entry& r_e, false_type) const;
+
+ void
+ trace_entry(const entry& r_e, true_type) const;
+#endif
+
+ private:
+ static entry_allocator s_entry_allocator;
+
+ static value_allocator s_value_allocator;
+
+ static no_throw_copies_t s_no_throw_copies_ind;
+
+ size_type m_size;
+
+ size_type m_actual_size;
+
+ entry_pointer m_a_entries;
+ };
+
+#include <ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp>
+#include <ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_ENTRY_CMP_DEC
+#undef PB_DS_RESIZE_POLICY_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp
new file mode 100644
index 0000000..9cb13f9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_iterator.hpp
+ * Contains an iterator class returned by the table's const find and insert
+ * methods.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_CONST_ITERATOR_HPP
+#define PB_DS_BINARY_HEAP_CONST_ITERATOR_HPP
+
+#include <ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_C_DEC \
+ binary_heap_const_iterator_<Value_Type, Entry, Simple, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ binary_heap_const_point_iterator_<Value_Type, Entry, Simple, Allocator>
+
+ // Const point-type iterator.
+ template<typename Value_Type,
+ typename Entry,
+ bool Simple,
+ class Allocator>
+ class binary_heap_const_iterator_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef typename PB_DS_BASE_C_DEC::entry_pointer entry_pointer;
+
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+
+ // Category.
+ typedef std::forward_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef typename Allocator::difference_type difference_type;
+
+ // Iterator's value type.
+ typedef typename base_type::value_type value_type;
+
+ // Iterator's pointer type.
+ typedef typename base_type::pointer pointer;
+
+ // Iterator's const pointer type.
+ typedef typename base_type::const_pointer const_pointer;
+
+ // Iterator's reference type.
+ typedef typename base_type::reference reference;
+
+ // Iterator's const reference type.
+ typedef typename base_type::const_reference const_reference;
+
+ public:
+
+ inline
+ binary_heap_const_iterator_(entry_pointer p_e) : base_type(p_e)
+ { }
+
+ // Default constructor.
+ inline
+ binary_heap_const_iterator_()
+ { }
+
+ // Copy constructor.
+ inline
+ binary_heap_const_iterator_(const PB_DS_CLASS_C_DEC& other) : base_type(other)
+ { }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const PB_DS_CLASS_C_DEC& other) const
+ {
+ return base_type::m_p_e == other.m_p_e;
+ }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const PB_DS_CLASS_C_DEC& other) const
+ {
+ return base_type::m_p_e != other.m_p_e;
+ }
+
+ inline PB_DS_CLASS_C_DEC&
+ operator++()
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_e != NULL);
+ inc();
+ return *this;
+ }
+
+ inline PB_DS_CLASS_C_DEC
+ operator++(int)
+ {
+ PB_DS_CLASS_C_DEC ret_it(base_type::m_p_e);
+ operator++();
+ return ret_it;
+ }
+
+ private:
+ void
+ inc()
+ { ++base_type::m_p_e; }
+ };
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp
new file mode 100644
index 0000000..d4013db
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp
@@ -0,0 +1,144 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_point_iterator.hpp
+ * Contains an iterator class returned by the table's const find and insert
+ * methods.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_CONST_FIND_ITERATOR_HPP
+#define PB_DS_BINARY_HEAP_CONST_FIND_ITERATOR_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ // Const point-type iterator.
+ template<typename Value_Type, typename Entry, bool Simple,
+ typename Allocator>
+ class binary_heap_const_point_iterator_
+ {
+ protected:
+ typedef typename Allocator::template rebind<Entry>::other::pointer entry_pointer;
+
+ public:
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // Iterator's value type.
+ typedef Value_Type value_type;
+
+ // Iterator's pointer type.
+ typedef typename Allocator::template rebind<value_type>::other::pointer
+ pointer;
+
+ // Iterator's const pointer type.
+ typedef
+ typename Allocator::template rebind<value_type>::other::const_pointer
+ const_pointer;
+
+ // Iterator's reference type.
+ typedef
+ typename Allocator::template rebind<value_type>::other::reference
+ reference;
+
+ // Iterator's const reference type.
+ typedef
+ typename Allocator::template rebind<value_type>::other::const_reference
+ const_reference;
+
+ inline
+ binary_heap_const_point_iterator_(entry_pointer p_e) : m_p_e(p_e)
+ { }
+
+ // Default constructor.
+ inline
+ binary_heap_const_point_iterator_() : m_p_e(NULL) { }
+
+ // Copy constructor.
+ inline
+ binary_heap_const_point_iterator_(const binary_heap_const_point_iterator_& other)
+ : m_p_e(other.m_p_e)
+ { }
+
+ // Access.
+ inline const_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_e != NULL);
+ return to_ptr(integral_constant<int, Simple>());
+ }
+
+ // Access.
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_e != NULL);
+ return *to_ptr(integral_constant<int, Simple>());
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const binary_heap_const_point_iterator_& other) const
+ { return m_p_e == other.m_p_e; }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const binary_heap_const_point_iterator_& other) const
+ { return m_p_e != other.m_p_e; }
+
+ private:
+ inline const_pointer
+ to_ptr(true_type) const
+ { return m_p_e; }
+
+ inline const_pointer
+ to_ptr(false_type) const
+ { return *m_p_e; }
+
+ public:
+ entry_pointer m_p_e;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..a77a025
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,159 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for binary_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::entry_allocator
+PB_DS_CLASS_C_DEC::s_entry_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::value_allocator
+PB_DS_CLASS_C_DEC::s_value_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::no_throw_copies_t
+PB_DS_CLASS_C_DEC::s_no_throw_copies_ind;
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ {
+ insert_value(*first_it, s_no_throw_copies_ind);
+ ++first_it;
+ }
+
+ std::make_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this));
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binary_heap_() :
+ m_size(0),
+ m_actual_size(resize_policy::min_size),
+ m_a_entries(s_entry_allocator.allocate(m_actual_size))
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binary_heap_(const Cmp_Fn& r_cmp_fn) :
+ entry_cmp(r_cmp_fn),
+ m_size(0),
+ m_actual_size(resize_policy::min_size),
+ m_a_entries(s_entry_allocator.allocate(m_actual_size))
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binary_heap_(const PB_DS_CLASS_C_DEC& other) :
+ entry_cmp(other),
+ resize_policy(other),
+ m_size(0),
+ m_actual_size(other.m_actual_size),
+ m_a_entries(s_entry_allocator.allocate(m_actual_size))
+{
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
+
+ const_iterator first_it = other.begin();
+ const_iterator last_it = other.end();
+
+ __try
+ {
+ while (first_it != last_it)
+ {
+ insert_value(*first_it, s_no_throw_copies_ind);
+ ++first_it;
+ }
+ }
+ __catch(...)
+ {
+ for (size_type i = 0; i < m_size; ++i)
+ erase_at(m_a_entries, i, s_no_throw_copies_ind);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+ __throw_exception_again;
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(m_a_entries != other.m_a_entries);
+
+ value_swap(other);
+ std::swap((entry_cmp& )(*this), (entry_cmp& )other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+value_swap(PB_DS_CLASS_C_DEC& other)
+{
+ std::swap(m_a_entries, other.m_a_entries);
+ std::swap(m_size, other.m_size);
+ std::swap(m_actual_size, other.m_actual_size);
+ static_cast<resize_policy*>(this)->swap(other);
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~binary_heap_()
+{
+ for (size_type i = 0; i < m_size; ++i)
+ erase_at(m_a_entries, i, s_no_throw_copies_ind);
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..fcfecfd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+#ifdef PB_DS_REGRESSION
+ s_entry_allocator.check_allocated(m_a_entries, m_actual_size);
+#endif
+
+ resize_policy::assert_valid();
+ _GLIBCXX_DEBUG_ASSERT(m_size <= m_actual_size);
+ for (size_type i = 0; i < m_size; ++i)
+ {
+#ifdef PB_DS_REGRESSION
+ s_value_allocator.check_allocated(m_a_entries[i], 1);
+#endif
+
+ if (left_child(i) < m_size)
+ _GLIBCXX_DEBUG_ASSERT(!entry_cmp::operator()(m_a_entries[i], m_a_entries[left_child(i)]));
+
+ _GLIBCXX_DEBUG_ASSERT(parent(left_child(i)) == i);
+
+ if (right_child(i) < m_size)
+ _GLIBCXX_DEBUG_ASSERT(!entry_cmp::operator()(m_a_entries[i], m_a_entries[right_child(i)]));
+
+ _GLIBCXX_DEBUG_ASSERT(parent(right_child(i)) == i);
+ }
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp
new file mode 100644
index 0000000..b0a9b5b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file entry_cmp.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
+#define PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Value_Type,
+ class Cmp_Fn,
+ bool No_Throw,
+ class Allocator>
+ struct entry_cmp
+ {
+ typedef Cmp_Fn type;
+ };
+
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ struct entry_cmp<
+ Value_Type,
+ Cmp_Fn,
+ false,
+ Allocator>
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::const_pointer
+ entry;
+
+ struct type : public Cmp_Fn
+ {
+ public:
+ inline
+ type()
+ { }
+
+ inline
+ type(const Cmp_Fn& other) : Cmp_Fn(other)
+ { }
+
+ inline bool
+ operator()(entry p_lhs, entry p_rhs) const
+ {
+ return Cmp_Fn::operator()(*p_lhs, * p_rhs);
+ }
+ };
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_BINARY_HEAP_ENTRY_CMP_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp
new file mode 100644
index 0000000..185529e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file entry_pred.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
+#define PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Value_Type,
+ class Pred,
+ bool No_Throw,
+ class Allocator>
+ struct entry_pred
+ {
+ typedef Pred type;
+ };
+
+ template<typename Value_Type, class Pred, class Allocator>
+ struct entry_pred<
+ Value_Type,
+ Pred,
+ false,
+ Allocator>
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::const_pointer
+ entry;
+
+ struct type : public Pred
+ {
+ public:
+ inline
+ type()
+ { }
+
+ inline
+ type(const Pred& other) : Pred(other)
+ { }
+
+ inline bool
+ operator()(entry p_v) const
+ {
+ return Pred::operator()(*p_v);
+ }
+ };
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_BINARY_HEAP_ENTRY_PRED_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp
new file mode 100644
index 0000000..30f3a48
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp
@@ -0,0 +1,246 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ for (size_type i = 0; i < m_size; ++i)
+ erase_at(m_a_entries, i, s_no_throw_copies_ind);
+
+ __try
+ {
+ const size_type actual_size = resize_policy::get_new_size_for_arbitrary(0);
+
+ entry_pointer a_entries = s_entry_allocator.allocate(actual_size);
+
+ resize_policy::notify_arbitrary(actual_size);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+
+ m_actual_size = actual_size;
+
+ m_a_entries = a_entries;
+ }
+ __catch(...)
+ { }
+
+ m_size = 0;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_at(entry_pointer a_entries, size_type i, false_type)
+{
+ a_entries[i]->~value_type();
+
+ s_value_allocator.deallocate(a_entries[i], 1);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_at(entry_pointer, size_type, true_type)
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+pop()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+
+ erase_at(m_a_entries, 0, s_no_throw_copies_ind);
+
+ std::pop_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this));
+
+ resize_for_erase_if_needed();
+
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ typedef
+ typename entry_pred<
+ value_type,
+ Pred,
+ simple_value,
+ Allocator>::type
+ pred_t;
+
+ const size_type left = partition(pred_t(pred));
+
+ _GLIBCXX_DEBUG_ASSERT(m_size >= left);
+
+ const size_type ersd = m_size - left;
+
+ for (size_type i = left; i < m_size; ++i)
+ erase_at(m_a_entries, i, s_no_throw_copies_ind);
+
+ __try
+ {
+ const size_type actual_size =
+ resize_policy::get_new_size_for_arbitrary(left);
+
+ entry_pointer a_entries = s_entry_allocator.allocate(actual_size);
+
+ std::copy(m_a_entries, m_a_entries + left, a_entries);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+
+ m_actual_size = actual_size;
+
+ resize_policy::notify_arbitrary(m_actual_size);
+ }
+ __catch(...)
+ { };
+
+ m_size = left;
+
+ std::make_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this));
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return ersd;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+erase(point_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+
+ const size_type fix_pos = it.m_p_e - m_a_entries;
+
+ std::swap(*it.m_p_e, m_a_entries[m_size - 1]);
+
+ erase_at(m_a_entries, m_size - 1, s_no_throw_copies_ind);
+
+ resize_for_erase_if_needed();
+
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+
+ _GLIBCXX_DEBUG_ASSERT(fix_pos <= m_size);
+
+ if (fix_pos != m_size)
+ fix(m_a_entries + fix_pos);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+resize_for_erase_if_needed()
+{
+ if (!resize_policy::resize_needed_for_shrink(m_size))
+ return;
+
+ __try
+ {
+ const size_type new_actual_size =
+ resize_policy::get_new_size_for_shrink();
+
+ entry_pointer a_new_entries = s_entry_allocator.allocate(new_actual_size);
+
+ resize_policy::notify_shrink_resize();
+
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ std::copy(m_a_entries, m_a_entries + m_size - 1, a_new_entries);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+
+ m_actual_size = new_actual_size;
+
+ m_a_entries = a_new_entries;
+ }
+ __catch(...)
+ { }
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+partition(Pred pred)
+{
+ size_type left = 0;
+ size_type right = m_size - 1;
+
+ while (right + 1 != left)
+ {
+ _GLIBCXX_DEBUG_ASSERT(left <= m_size);
+
+ if (!pred(m_a_entries[left]))
+ ++left;
+ else if (pred(m_a_entries[right]))
+ --right;
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(left < right);
+
+ std::swap(m_a_entries[left], m_a_entries[right]);
+
+ ++left;
+ --right;
+ }
+ }
+
+ return left;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp
new file mode 100644
index 0000000..28d4a8c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+
+ return top_imp(s_no_throw_copies_ind);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top_imp(true_type) const
+{
+ return* m_a_entries;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top_imp(false_type) const
+{
+ return** m_a_entries;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+left_child(size_type i)
+{
+ return i* 2 + 1;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+right_child(size_type i)
+{
+ return i* 2 + 2;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+parent(size_type i)
+{
+ return (i - 1) / 2;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp
new file mode 100644
index 0000000..d292793
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{
+ return (m_size == 0);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{
+ return (m_size);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{
+ return (s_entry_allocator.max_size());
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
new file mode 100644
index 0000000..f13a3cb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
@@ -0,0 +1,183 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+push(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ insert_value(r_val, s_no_throw_copies_ind);
+ std::push_heap(m_a_entries, m_a_entries + m_size,
+ static_cast<entry_cmp&>(*this));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return point_iterator(m_a_entries);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+insert_value(value_type val, true_type)
+{
+ resize_for_insert_if_needed();
+
+ m_a_entries[m_size++] = val;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+insert_value(const_reference r_val, false_type)
+{
+ resize_for_insert_if_needed();
+ pointer p_new = s_value_allocator.allocate(1);
+ cond_dealtor_t cond(p_new);
+ new (p_new) value_type(r_val);
+ cond.set_no_action();
+ m_a_entries[m_size++] = p_new;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+insert_entry(entry e)
+{
+ resize_for_insert_if_needed();
+ m_a_entries[m_size++] = e;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+resize_for_insert_if_needed()
+{
+ if (!resize_policy::resize_needed_for_grow(m_size))
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_size < m_actual_size);
+ return;
+ }
+
+ const size_type new_actual_size = resize_policy::get_new_size_for_grow();
+ entry_pointer a_new_entries = s_entry_allocator.allocate(new_actual_size);
+ resize_policy::notify_grow_resize();
+ std::copy(m_a_entries, m_a_entries + m_size, a_new_entries);
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+ m_actual_size = new_actual_size;
+ m_a_entries = a_new_entries;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+modify(point_iterator it, const_reference r_new_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ swap_value_imp(it.m_p_e, r_new_val, s_no_throw_copies_ind);
+ fix(it.m_p_e);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+fix(entry_pointer p_e)
+{
+ size_type i = p_e - m_a_entries;
+ if (i > 0 && entry_cmp::operator()(m_a_entries[parent(i)], m_a_entries[i]))
+ {
+ size_type parent_i = parent(i);
+ while (i > 0
+ && entry_cmp::operator()(m_a_entries[parent_i], m_a_entries[i]))
+ {
+ std::swap(m_a_entries[i], m_a_entries[parent_i]);
+ i = parent_i;
+ parent_i = parent(i);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return;
+ }
+
+ while (i < m_size)
+ {
+ const size_type left_child_i = left_child(i);
+ const size_type right_child_i = right_child(i);
+ _GLIBCXX_DEBUG_ASSERT(right_child_i > left_child_i);
+ const bool smaller_than_left_child = left_child_i < m_size &&
+ entry_cmp::operator()(m_a_entries[i], m_a_entries[left_child_i]);
+
+ const bool smaller_than_right_child = right_child_i < m_size &&
+ entry_cmp::operator()(m_a_entries[i], m_a_entries[right_child_i]);
+
+ const bool swap_with_r_child = smaller_than_right_child && (!smaller_than_left_child || entry_cmp::operator()(m_a_entries[left_child_i], m_a_entries[right_child_i]));
+
+ const bool swap_with_l_child = !swap_with_r_child && smaller_than_left_child;
+
+ if (swap_with_l_child)
+ {
+ std::swap(m_a_entries[i], m_a_entries[left_child_i]);
+ i = left_child_i;
+ }
+ else if (swap_with_r_child)
+ {
+ std::swap(m_a_entries[i], m_a_entries[right_child_i]);
+ i = right_child_i;
+ }
+ else
+ i = m_size;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap_value_imp(entry_pointer p_e, value_type new_val, true_type)
+{
+ * p_e = new_val;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap_value_imp(entry_pointer p_e, const_reference r_new_val, false_type)
+{
+ value_type tmp(r_new_val);
+ (*p_e)->swap(tmp);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..db0a64e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ return (iterator(m_a_entries));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ return (const_iterator(m_a_entries));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{
+ return (iterator(m_a_entries + m_size));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{
+ return (const_iterator(m_a_entries + m_size));
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..11a7b89
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn()
+{
+ return (*this);
+}
+
+PB_DS_CLASS_T_DEC
+const Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn() const
+{
+ return (*this);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
new file mode 100644
index 0000000..588fb3d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp
@@ -0,0 +1,253 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_policy.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+#ifndef PB_DS_BINARY_HEAP_RESIZE_POLICY_HPP
+#define PB_DS_BINARY_HEAP_RESIZE_POLICY_HPP
+
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+
+#define PB_DS_CLASS_C_DEC resize_policy<Size_Type>
+
+ template<typename Size_Type>
+ class resize_policy
+ {
+ public:
+ typedef Size_Type size_type;
+
+ enum
+ {
+ min_size = 16
+ };
+
+ public:
+ inline
+ resize_policy();
+
+ inline void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ inline bool
+ resize_needed_for_grow(size_type size) const;
+
+ inline bool
+ resize_needed_for_shrink(size_type size) const;
+
+ inline bool
+ grow_needed(size_type size) const;
+
+ inline bool
+ shrink_needed(size_type size) const;
+
+ inline size_type
+ get_new_size_for_grow() const;
+
+ inline size_type
+ get_new_size_for_shrink() const;
+
+ size_type
+ get_new_size_for_arbitrary(size_type size) const;
+
+ inline void
+ notify_grow_resize();
+
+ inline void
+ notify_shrink_resize();
+
+ void
+ notify_arbitrary(size_type actual_size);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+ enum
+ {
+ ratio = 8,
+ factor = 2
+ };
+
+ private:
+ size_type m_next_shrink_size;
+ size_type m_next_grow_size;
+ };
+
+ PB_DS_CLASS_T_DEC
+ inline
+ PB_DS_CLASS_C_DEC::
+ resize_policy() :
+ m_next_shrink_size(0),
+ m_next_grow_size(min_size)
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ std::swap(m_next_shrink_size, other.m_next_shrink_size);
+ std::swap(m_next_grow_size, other.m_next_grow_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline bool
+ PB_DS_CLASS_C_DEC::
+ resize_needed_for_grow(size_type size) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(size <= m_next_grow_size);
+ return size == m_next_grow_size;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline bool
+ PB_DS_CLASS_C_DEC::
+ resize_needed_for_shrink(size_type size) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(size <= m_next_grow_size);
+ return size == m_next_shrink_size;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_new_size_for_grow() const
+ { return m_next_grow_size* factor; }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_new_size_for_shrink() const
+ {
+ const size_type half_size = m_next_grow_size / factor;
+ return std::max(static_cast<size_type>(min_size), half_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_new_size_for_arbitrary(size_type size) const
+ {
+ size_type ret = min_size;
+ while (ret < size)
+ ret *= factor;
+ return ret;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ notify_grow_resize()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= min_size);
+ m_next_grow_size *= factor;
+ m_next_shrink_size = m_next_grow_size / ratio;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ notify_shrink_resize()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_next_shrink_size /= factor;
+ if (m_next_shrink_size == 1)
+ m_next_shrink_size = 0;
+
+ m_next_grow_size =
+ std::max(m_next_grow_size / factor, static_cast<size_type>(min_size));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ notify_arbitrary(size_type actual_size)
+ {
+ m_next_grow_size = actual_size;
+ m_next_shrink_size = m_next_grow_size / ratio;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ assert_valid() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_next_shrink_size == 0 ||
+ m_next_shrink_size* ratio == m_next_grow_size);
+
+ _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= min_size);
+ }
+#endif
+
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ trace() const
+ {
+ std::cerr << "shrink = " << m_next_shrink_size <<
+ " grow = " << m_next_grow_size << std::endl;
+ }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..04b7d54
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp
@@ -0,0 +1,172 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+void
+PB_DS_CLASS_C_DEC::
+split(Pred pred, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ typedef
+ typename entry_pred<
+ value_type,
+ Pred,
+ simple_value,
+ Allocator>::type
+ pred_t;
+
+ const size_type left = partition(pred_t(pred));
+
+ _GLIBCXX_DEBUG_ASSERT(m_size >= left);
+
+ const size_type ersd = m_size - left;
+
+ _GLIBCXX_DEBUG_ASSERT(m_size >= ersd);
+
+ const size_type actual_size =
+ resize_policy::get_new_size_for_arbitrary(left);
+
+ const size_type other_actual_size =
+ other.get_new_size_for_arbitrary(ersd);
+
+ entry_pointer a_entries = NULL;
+ entry_pointer a_other_entries = NULL;
+
+ __try
+ {
+ a_entries = s_entry_allocator.allocate(actual_size);
+
+ a_other_entries = s_entry_allocator.allocate(other_actual_size);
+ }
+ __catch(...)
+ {
+ if (a_entries != NULL)
+ s_entry_allocator.deallocate(a_entries, actual_size);
+
+ if (a_other_entries != NULL)
+ s_entry_allocator.deallocate(a_other_entries, other_actual_size);
+
+ __throw_exception_again;
+ };
+
+ for (size_type i = 0; i < other.m_size; ++i)
+ erase_at(other.m_a_entries, i, s_no_throw_copies_ind);
+
+ _GLIBCXX_DEBUG_ASSERT(actual_size >= left);
+ std::copy(m_a_entries, m_a_entries + left, a_entries);
+ std::copy(m_a_entries + left, m_a_entries + m_size, a_other_entries);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+ s_entry_allocator.deallocate(other.m_a_entries, other.m_actual_size);
+
+ m_actual_size = actual_size;
+ other.m_actual_size = other_actual_size;
+
+ m_size = left;
+ other.m_size = ersd;
+
+ m_a_entries = a_entries;
+ other.m_a_entries = a_other_entries;
+
+ std::make_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this));
+ std::make_heap(other.m_a_entries, other.m_a_entries + other.m_size, static_cast<entry_cmp& >(other));
+
+ resize_policy::notify_arbitrary(m_actual_size);
+ other.notify_arbitrary(other.m_actual_size);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ const size_type len = m_size + other.m_size;
+ const size_type actual_size = resize_policy::get_new_size_for_arbitrary(len);
+
+ entry_pointer a_entries = NULL;
+ entry_pointer a_other_entries = NULL;
+
+ __try
+ {
+ a_entries = s_entry_allocator.allocate(actual_size);
+ a_other_entries = s_entry_allocator.allocate(resize_policy::min_size);
+ }
+ __catch(...)
+ {
+ if (a_entries != NULL)
+ s_entry_allocator.deallocate(a_entries, actual_size);
+
+ if (a_other_entries != NULL)
+ s_entry_allocator.deallocate(a_other_entries, resize_policy::min_size);
+
+ __throw_exception_again;
+ }
+
+ std::copy(m_a_entries, m_a_entries + m_size, a_entries);
+ std::copy(other.m_a_entries, other.m_a_entries + other.m_size, a_entries + m_size);
+
+ s_entry_allocator.deallocate(m_a_entries, m_actual_size);
+ m_a_entries = a_entries;
+ m_size = len;
+ m_actual_size = actual_size;
+
+ resize_policy::notify_arbitrary(actual_size);
+
+ std::make_heap(m_a_entries, m_a_entries + m_size, static_cast<entry_cmp& >(*this));
+
+ s_entry_allocator.deallocate(other.m_a_entries, other.m_actual_size);
+ other.m_a_entries = a_other_entries;
+ other.m_size = 0;
+ other.m_actual_size = resize_policy::min_size;
+
+ other.notify_arbitrary(resize_policy::min_size);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp
new file mode 100644
index 0000000..36bd66f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp
@@ -0,0 +1,78 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains an implementation class for a binary_heap.
+ */
+
+#ifdef PB_DS_BINARY_HEAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << this << std::endl;
+
+ std::cerr << m_a_entries << std::endl;
+
+ for (size_type i = 0; i < m_size; ++i)
+ trace_entry(m_a_entries[i], s_no_throw_copies_ind);
+
+ std::cerr << std::endl;
+
+ std::cerr << "size = " << m_size << " " << "actual_size = " << m_actual_size << std::endl;
+
+ resize_policy::trace();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_entry(const entry& r_e, false_type) const
+{
+ std::cout << r_e << " " <<* r_e << std::endl;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_entry(const entry& r_e, true_type) const
+{
+ std::cout << r_e << std::endl;
+}
+
+#endif // #ifdef PB_DS_BINARY_HEAP_TRACE_
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
new file mode 100644
index 0000000..3b4d6e9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp
@@ -0,0 +1,116 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file binomial_heap_.hpp
+ * Contains an implementation class for a binomial heap.
+ */
+
+/*
+ * Binomial heap.
+ * Vuillemin J is the mastah.
+ * Modified from CLRS.
+ */
+
+#include <debug/debug.h>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ binomial_heap_<Value_Type, Cmp_Fn, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ binomial_heap_base_<Value_Type, Cmp_Fn, Allocator>
+
+ /**
+ * class description = "8y|\|0|\/|i41 h34p 74813">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class binomial_heap_ : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+ typedef typename base_type::node_pointer node_pointer;
+ typedef typename base_type::const_node_pointer const_node_pointer;
+
+ public:
+ typedef Value_Type value_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::const_pointer const_pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::const_point_iterator const_point_iterator;
+ typedef typename base_type::point_iterator point_iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::cmp_fn cmp_fn;
+ typedef typename base_type::allocator_type allocator_type;
+
+ binomial_heap_();
+
+ binomial_heap_(const Cmp_Fn& r_cmp_fn);
+
+ binomial_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ ~binomial_heap_();
+
+ protected:
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+ };
+
+#include <ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+
+#undef PB_DS_CLASS_T_DEC
+
+#undef PB_DS_BASE_C_DEC
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..ef0937e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation for binomial_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_(const Cmp_Fn& r_cmp_fn) :
+ PB_DS_BASE_C_DEC(r_cmp_fn)
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_(const PB_DS_CLASS_C_DEC& other) :
+ PB_DS_BASE_C_DEC(other)
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~binomial_heap_() { }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..10bec69
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation for binomial_heap_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{ base_type::assert_valid(true); }
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
new file mode 100644
index 0000000..1d66d1b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp
@@ -0,0 +1,234 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file binomial_heap_base_.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+#ifndef PB_DS_BINOMIAL_HEAP_BASE_HPP
+#define PB_DS_BINOMIAL_HEAP_BASE_HPP
+
+/*
+ * Binomial heap base.
+ * Vuillemin J is the mastah.
+ * Modified from CLRS.
+ */
+
+#include <debug/debug.h>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ binomial_heap_base_<Value_Type, Cmp_Fn, Allocator>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_<Value_Type, Cmp_Fn, \
+ typename Allocator::size_type, \
+ Allocator, false>
+#else
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_<Value_Type, Cmp_Fn, \
+ typename Allocator::size_type, Allocator>
+#endif
+
+ /**
+ * class description = "8y|\|0|\/|i41 h34p 74813">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class binomial_heap_base_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ protected:
+ typedef typename base_type::node node;
+
+ typedef typename base_type::node_pointer node_pointer;
+
+ typedef typename base_type::const_node_pointer const_node_pointer;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename PB_DS_BASE_C_DEC::const_point_iterator
+ const_point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::point_iterator point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::iterator iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+ public:
+
+ inline point_iterator
+ push(const_reference r_val);
+
+ void
+ modify(point_iterator it, const_reference r_new_val);
+
+ inline const_reference
+ top() const;
+
+ void
+ pop();
+
+ void
+ erase(point_iterator it);
+
+ inline void
+ clear();
+
+ template<typename Pred>
+ size_type
+ erase_if(Pred pred);
+
+ template<typename Pred>
+ void
+ split(Pred pred, PB_DS_CLASS_C_DEC& other);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+
+ binomial_heap_base_();
+
+ binomial_heap_base_(const Cmp_Fn& r_cmp_fn);
+
+ binomial_heap_base_(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~binomial_heap_base_();
+
+ template<typename It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ inline void
+ find_max();
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid(bool strictly_binomial) const;
+
+ void
+ assert_max() const;
+#endif
+
+ private:
+
+ inline node_pointer
+ fix(node_pointer p_nd) const;
+
+ inline void
+ insert_node(node_pointer p_nd);
+
+ inline void
+ remove_parentless_node(node_pointer p_nd);
+
+ inline node_pointer
+ join(node_pointer p_lhs, node_pointer p_rhs) const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_node_consistent(const_node_pointer, bool, bool) const;
+#endif
+
+ protected:
+ node_pointer m_p_max;
+ };
+
+#include <ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_BASE_C_DEC
+
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..274c933
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,97 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ push(*(first_it++));
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_base_() :
+ m_p_max(NULL)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_base_(const Cmp_Fn& r_cmp_fn) :
+ PB_DS_BASE_C_DEC(r_cmp_fn),
+ m_p_max(NULL)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+binomial_heap_base_(const PB_DS_CLASS_C_DEC& other) :
+ PB_DS_BASE_C_DEC(other),
+ m_p_max(NULL)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+
+ base_type::swap(other);
+
+ std::swap(m_p_max, other.m_p_max);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~binomial_heap_base_()
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp
new file mode 100644
index 0000000..9a07f0e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp
@@ -0,0 +1,98 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid(bool strictly_binomial) const
+{
+ base_type::assert_valid();
+ assert_node_consistent(base_type::m_p_root, strictly_binomial, true);
+ assert_max();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_max() const
+{
+ if (m_p_max == NULL)
+ return;
+ _GLIBCXX_DEBUG_ASSERT(base_type::parent(m_p_max) == NULL);
+ for (const_iterator it = base_type::begin(); it != base_type::end(); ++it)
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value,
+ it.m_p_nd->m_value));
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent(const_node_pointer p_nd, bool strictly_binomial,
+ bool increasing) const
+{
+ _GLIBCXX_DEBUG_ASSERT(increasing || strictly_binomial);
+ base_type::assert_node_consistent(p_nd, false);
+ if (p_nd == NULL)
+ return;
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata == base_type::degree(p_nd));
+ _GLIBCXX_DEBUG_ASSERT(base_type::size_under_node(p_nd) ==
+ static_cast<size_type>(1 << p_nd->m_metadata));
+ assert_node_consistent(p_nd->m_p_next_sibling, strictly_binomial, increasing);
+ assert_node_consistent(p_nd->m_p_l_child, true, false);
+ if (p_nd->m_p_next_sibling != NULL)
+ {
+ if (increasing)
+ {
+ if (strictly_binomial)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ < p_nd->m_p_next_sibling->m_metadata);
+ else
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ <= p_nd->m_p_next_sibling->m_metadata);
+ }
+ else
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata
+ > p_nd->m_p_next_sibling->m_metadata);
+ }
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp
new file mode 100644
index 0000000..a4cf90c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp
@@ -0,0 +1,192 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+pop()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ if (m_p_max == NULL)
+ find_max();
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_max != NULL);
+
+ node_pointer p_nd = m_p_max;
+
+ remove_parentless_node(m_p_max);
+
+ base_type::actual_erase_node(p_nd);
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+remove_parentless_node(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(base_type::parent(p_nd) == NULL);
+
+ node_pointer p_cur_root = p_nd == base_type::m_p_root?
+ p_nd->m_p_next_sibling :
+ base_type::m_p_root;
+
+ if (p_cur_root != NULL)
+ p_cur_root->m_p_prev_or_parent = NULL;
+
+ if (p_nd->m_p_prev_or_parent != NULL)
+ p_nd->m_p_prev_or_parent->m_p_next_sibling = p_nd->m_p_next_sibling;
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+
+ node_pointer p_child = p_nd->m_p_l_child;
+
+ if (p_child != NULL)
+ {
+ p_child->m_p_prev_or_parent = NULL;
+
+ while (p_child->m_p_next_sibling != NULL)
+ p_child = p_child->m_p_next_sibling;
+ }
+
+ m_p_max = NULL;
+
+ base_type::m_p_root = join(p_cur_root, p_child);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ base_type::clear();
+
+ m_p_max = NULL;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase(point_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ base_type::bubble_to_top(it.m_p_nd);
+
+ remove_parentless_node(it.m_p_nd);
+
+ base_type::actual_erase_node(it.m_p_nd);
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ }
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ return 0;
+ }
+
+ base_type::to_linked_list();
+
+ node_pointer p_out = base_type::prune(pred);
+
+ size_type ersd = 0;
+
+ while (p_out != NULL)
+ {
+ ++ersd;
+
+ node_pointer p_next = p_out->m_p_next_sibling;
+
+ base_type::actual_erase_node(p_out);
+
+ p_out = p_next;
+ }
+
+ node_pointer p_cur = base_type::m_p_root;
+
+ base_type::m_p_root = NULL;
+
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+
+ p_cur->m_p_l_child = p_cur->m_p_prev_or_parent = NULL;
+
+ p_cur->m_metadata = 0;
+
+ p_cur->m_p_next_sibling = base_type::m_p_root;
+
+ if (base_type::m_p_root != NULL)
+ base_type::m_p_root->m_p_prev_or_parent = p_cur;
+
+ base_type::m_p_root = p_cur;
+
+ base_type::m_p_root = fix(base_type::m_p_root);
+
+ p_cur = p_next;
+ }
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ return ersd;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp
new file mode 100644
index 0000000..ad7f651
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(false);)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ if (m_p_max == NULL)
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->find_max();
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_max != NULL);
+ return m_p_max->m_value;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+find_max()
+{
+ node_pointer p_cur = base_type::m_p_root;
+
+ m_p_max = p_cur;
+
+ while (p_cur != NULL)
+ {
+ if (Cmp_Fn::operator()(m_p_max->m_value, p_cur->m_value))
+ m_p_max = p_cur;
+
+ p_cur = p_cur->m_p_next_sibling;
+ }
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp
new file mode 100644
index 0000000..e67d0df
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp
@@ -0,0 +1,216 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+push(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ node_pointer p_nd = base_type::get_new_node_for_insert(r_val);
+
+ insert_node(p_nd);
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ return point_iterator(p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+insert_node(node_pointer p_nd)
+{
+ if (base_type::m_p_root == NULL)
+ {
+ p_nd->m_p_next_sibling = p_nd->m_p_prev_or_parent =
+ p_nd->m_p_l_child = NULL;
+
+ p_nd->m_metadata = 0;
+
+ base_type::m_p_root = p_nd;
+
+ return;
+ }
+
+ if (base_type::m_p_root->m_metadata > 0)
+ {
+ p_nd->m_p_prev_or_parent = p_nd->m_p_l_child = NULL;
+
+ p_nd->m_p_next_sibling = base_type::m_p_root;
+
+ base_type::m_p_root->m_p_prev_or_parent = p_nd;
+
+ base_type::m_p_root = p_nd;
+
+ p_nd->m_metadata = 0;
+
+ return;
+ }
+
+ if (Cmp_Fn::operator()(base_type::m_p_root->m_value, p_nd->m_value))
+ {
+ p_nd->m_p_next_sibling = base_type::m_p_root->m_p_next_sibling;
+
+ p_nd->m_p_prev_or_parent = NULL;
+
+ p_nd->m_metadata = 1;
+
+ p_nd->m_p_l_child = base_type::m_p_root;
+
+ base_type::m_p_root->m_p_prev_or_parent = p_nd;
+
+ base_type::m_p_root->m_p_next_sibling = NULL;
+
+ base_type::m_p_root = p_nd;
+ }
+ else
+ {
+ p_nd->m_p_next_sibling = NULL;
+
+ p_nd->m_p_l_child = NULL;
+
+ p_nd->m_p_prev_or_parent = base_type::m_p_root;
+
+ p_nd->m_metadata = 0;
+
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_root->m_p_l_child == 0);
+ base_type::m_p_root->m_p_l_child = p_nd;
+
+ base_type::m_p_root->m_metadata = 1;
+ }
+
+ base_type::m_p_root = fix(base_type::m_p_root);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+fix(node_pointer p_nd) const
+{
+ while (p_nd->m_p_next_sibling != NULL&&
+ p_nd->m_metadata == p_nd->m_p_next_sibling->m_metadata)
+ {
+ node_pointer p_next = p_nd->m_p_next_sibling;
+
+ if (Cmp_Fn::operator()(p_nd->m_value, p_next->m_value))
+ {
+ p_next->m_p_prev_or_parent =
+ p_nd->m_p_prev_or_parent;
+
+ if (p_nd->m_p_prev_or_parent != NULL)
+ p_nd->m_p_prev_or_parent->m_p_next_sibling = p_next;
+
+ base_type::make_child_of(p_nd, p_next);
+
+ ++p_next->m_metadata;
+
+ p_nd = p_next;
+ }
+ else
+ {
+ p_nd->m_p_next_sibling = p_next->m_p_next_sibling;
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_next->m_p_next_sibling = NULL;
+
+ base_type::make_child_of(p_next, p_nd);
+
+ ++p_nd->m_metadata;
+ }
+ }
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd;
+
+ return p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+modify(point_iterator it, const_reference r_new_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ node_pointer p_nd = it.m_p_nd;
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd, false);)
+
+ const bool bubble_up = Cmp_Fn::operator()(p_nd->m_value, r_new_val);
+
+ p_nd->m_value = r_new_val;
+
+ if (bubble_up)
+ {
+ node_pointer p_parent = base_type::parent(p_nd);
+
+ while (p_parent != NULL&&
+ Cmp_Fn::operator()(p_parent->m_value, p_nd->m_value))
+ {
+ base_type::swap_with_parent(p_nd, p_parent);
+
+ p_parent = base_type::parent(p_nd);
+ }
+
+ if (p_nd->m_p_prev_or_parent == NULL)
+ base_type::m_p_root = p_nd;
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+
+ return;
+ }
+
+ base_type::bubble_to_top(p_nd);
+
+ remove_parentless_node(p_nd);
+
+ insert_node(p_nd);
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..a701937
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/binomial_heap_base_/split_join_fn_imps.hpp
@@ -0,0 +1,232 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for a base of binomial heaps.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+void
+PB_DS_CLASS_C_DEC::
+split(Pred pred, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+
+ other.clear();
+
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+
+ return;
+ }
+
+ base_type::to_linked_list();
+
+ node_pointer p_out = base_type::prune(pred);
+
+ while (p_out != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_size > 0);
+ --base_type::m_size;
+
+ ++other.m_size;
+
+ node_pointer p_next = p_out->m_p_next_sibling;
+
+ p_out->m_p_l_child = p_out->m_p_prev_or_parent = NULL;
+
+ p_out->m_metadata = 0;
+
+ p_out->m_p_next_sibling = other.m_p_root;
+
+ if (other.m_p_root != NULL)
+ other.m_p_root->m_p_prev_or_parent = p_out;
+
+ other.m_p_root = p_out;
+
+ other.m_p_root = other.fix(other.m_p_root);
+
+ p_out = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+
+ node_pointer p_cur = base_type::m_p_root;
+
+ base_type::m_p_root = NULL;
+
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+
+ p_cur->m_p_l_child = p_cur->m_p_prev_or_parent = NULL;
+
+ p_cur->m_metadata = 0;
+
+ p_cur->m_p_next_sibling = base_type::m_p_root;
+
+ if (base_type::m_p_root != NULL)
+ base_type::m_p_root->m_p_prev_or_parent = p_cur;
+
+ base_type::m_p_root = p_cur;
+
+ base_type::m_p_root = fix(base_type::m_p_root);
+
+ p_cur = p_next;
+ }
+
+ m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+
+ node_pointer p_other = other.m_p_root;
+
+ if (p_other != NULL)
+ do
+ {
+ node_pointer p_next = p_other->m_p_next_sibling;
+
+ std::swap(p_other->m_p_next_sibling, p_other->m_p_prev_or_parent);
+
+ p_other = p_next;
+ }
+ while (p_other != NULL);
+
+ base_type::m_p_root = join(base_type::m_p_root, other.m_p_root);
+ base_type::m_size += other.m_size;
+ m_p_max = NULL;
+
+ other.m_p_root = NULL;
+ other.m_size = 0;
+ other.m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true);)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(true);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+join(node_pointer p_lhs, node_pointer p_rhs) const
+{
+ node_pointer p_ret = NULL;
+
+ node_pointer p_cur = NULL;
+
+ while (p_lhs != NULL || p_rhs != NULL)
+ {
+ if (p_rhs == NULL)
+ {
+ if (p_cur == NULL)
+ p_ret = p_cur = p_lhs;
+ else
+ {
+ p_cur->m_p_next_sibling = p_lhs;
+
+ p_lhs->m_p_prev_or_parent = p_cur;
+ }
+
+ p_cur = p_lhs = NULL;
+ }
+ else if (p_lhs == NULL || p_rhs->m_metadata < p_lhs->m_metadata)
+ {
+ if (p_cur == NULL)
+ {
+ p_ret = p_cur = p_rhs;
+
+ p_rhs = p_rhs->m_p_prev_or_parent;
+ }
+ else
+ {
+ p_cur->m_p_next_sibling = p_rhs;
+
+ p_rhs = p_rhs->m_p_prev_or_parent;
+
+ p_cur->m_p_next_sibling->m_p_prev_or_parent = p_cur;
+
+ p_cur = p_cur->m_p_next_sibling;
+ }
+ }
+ else if (p_lhs->m_metadata < p_rhs->m_metadata)
+ {
+ if (p_cur == NULL)
+ p_ret = p_cur = p_lhs;
+ else
+ {
+ p_cur->m_p_next_sibling = p_lhs;
+
+ p_lhs->m_p_prev_or_parent = p_cur;
+
+ p_cur = p_cur->m_p_next_sibling;
+ }
+
+ p_lhs = p_cur->m_p_next_sibling;
+ }
+ else
+ {
+ node_pointer p_next_rhs = p_rhs->m_p_prev_or_parent;
+
+ p_rhs->m_p_next_sibling = p_lhs;
+
+ p_lhs = fix(p_rhs);
+
+ p_rhs = p_next_rhs;
+ }
+ }
+
+ if (p_cur != NULL)
+ p_cur->m_p_next_sibling = NULL;
+
+ if (p_ret != NULL)
+ p_ret->m_p_prev_or_parent = NULL;
+
+ return p_ret;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
new file mode 100644
index 0000000..f5efabe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
@@ -0,0 +1,636 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cc_ht_map_.hpp
+ * Contains an implementation class for cc_ht_map_.
+ */
+
+#include <utility>
+#include <iterator>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
+#ifdef _GLIBCXX_DEBUG
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#endif
+#ifdef PB_DS_HT_MAP_TRACE_
+#include <iostream>
+#endif
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, typename Hash_Fn, \
+ typename Eq_Fn, typename Allocator, bool Store_Hash, \
+ typename Comb_Hash_Fn, typename Resize_Policy>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME cc_ht_map_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME cc_ht_map_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Hash_Fn, Eq_Fn, Allocator, \
+ Store_Hash, Comb_Hash_Fn, Resize_Policy>
+
+#define PB_DS_HASH_EQ_FN_C_DEC \
+ hash_eq_fn<Key, Eq_Fn, Allocator, Store_Hash>
+
+#define PB_DS_RANGED_HASH_FN_C_DEC \
+ ranged_hash_fn<Key, Hash_Fn, Allocator, Comb_Hash_Fn, Store_Hash>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits<Key, Mapped, Allocator, Store_Hash>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#endif
+
+ // <011i$i0|\|-<|-|4i|\|i|\|g |-|4$|-| 74813.
+ template<typename Key,
+ typename Mapped,
+ typename Hash_Fn,
+ typename Eq_Fn,
+ typename Allocator,
+ bool Store_Hash,
+ typename Comb_Hash_Fn,
+ typename Resize_Policy >
+ class PB_DS_CLASS_NAME:
+#ifdef _GLIBCXX_DEBUG
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+ public PB_DS_HASH_EQ_FN_C_DEC,
+ public Resize_Policy,
+ public PB_DS_RANGED_HASH_FN_C_DEC,
+ public PB_DS_TYPES_TRAITS_C_DEC
+ {
+ private:
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+ typedef typename traits_base::comp_hash comp_hash;
+ typedef typename traits_base::value_type value_type_;
+ typedef typename traits_base::pointer pointer_;
+ typedef typename traits_base::const_pointer const_pointer_;
+ typedef typename traits_base::reference reference_;
+ typedef typename traits_base::const_reference const_reference_;
+
+ struct entry : public traits_base::stored_value_type
+ {
+ typename Allocator::template rebind<entry>::other::pointer m_p_next;
+ };
+
+ typedef cond_dealtor<entry, Allocator> cond_dealtor_t;
+
+ typedef typename Allocator::template rebind<entry>::other entry_allocator;
+ typedef typename entry_allocator::pointer entry_pointer;
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+ typedef typename entry_allocator::reference entry_reference;
+ typedef typename entry_allocator::const_reference const_entry_reference;
+
+ typedef typename Allocator::template rebind<entry_pointer>::other entry_pointer_allocator;
+ typedef typename entry_pointer_allocator::pointer entry_pointer_array;
+
+ typedef PB_DS_RANGED_HASH_FN_C_DEC ranged_hash_fn_base;
+ typedef PB_DS_HASH_EQ_FN_C_DEC hash_eq_fn_base;
+ typedef Resize_Policy resize_base;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+#define PB_DS_GEN_POS std::pair<entry_pointer, typename Allocator::size_type>
+
+#include <ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_DS_GEN_POS
+
+ public:
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef Hash_Fn hash_fn;
+ typedef Eq_Fn eq_fn;
+ typedef Comb_Hash_Fn comb_hash_fn;
+ typedef Resize_Policy resize_policy;
+
+ enum
+ {
+ store_hash = Store_Hash
+ };
+
+ typedef typename traits_base::key_type key_type;
+ typedef typename traits_base::key_pointer key_pointer;
+ typedef typename traits_base::const_key_pointer const_key_pointer;
+ typedef typename traits_base::key_reference key_reference;
+ typedef typename traits_base::const_key_reference const_key_reference;
+ typedef typename traits_base::mapped_type mapped_type;
+ typedef typename traits_base::mapped_pointer mapped_pointer;
+ typedef typename traits_base::const_mapped_pointer const_mapped_pointer;
+ typedef typename traits_base::mapped_reference mapped_reference;
+ typedef typename traits_base::const_mapped_reference const_mapped_reference;
+ typedef typename traits_base::value_type value_type;
+ typedef typename traits_base::pointer pointer;
+ typedef typename traits_base::const_pointer const_pointer;
+ typedef typename traits_base::reference reference;
+ typedef typename traits_base::const_reference const_reference;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef point_iterator_ point_iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_point_iterator_ point_iterator;
+#endif
+
+ typedef const_point_iterator_ const_point_iterator;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef iterator_ iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_iterator_ iterator;
+#endif
+
+ typedef const_iterator_ const_iterator;
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const Hash_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Hash_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Hash_Fn&,
+ const Resize_Policy&);
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ virtual
+ ~PB_DS_CLASS_NAME();
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ void
+ initialize();
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ Hash_Fn&
+ get_hash_fn();
+
+ const Hash_Fn&
+ get_hash_fn() const;
+
+ Eq_Fn&
+ get_eq_fn();
+
+ const Eq_Fn&
+ get_eq_fn() const;
+
+ Comb_Hash_Fn&
+ get_comb_hash_fn();
+
+ const Comb_Hash_Fn&
+ get_comb_hash_fn() const;
+
+ Resize_Policy&
+ get_resize_policy();
+
+ const Resize_Policy&
+ get_resize_policy() const;
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference r_val)
+ { return insert_imp(r_val, traits_base::m_store_extra_indicator); }
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ return (subscript_imp(r_key, traits_base::m_store_extra_indicator));
+#else
+ insert(r_key);
+ return traits_base::s_null_mapped;
+#endif
+ }
+
+ inline point_iterator
+ find(const_key_reference);
+
+ inline const_point_iterator
+ find(const_key_reference) const;
+
+ inline point_iterator
+ find_end();
+
+ inline const_point_iterator
+ find_end() const;
+
+ inline bool
+ erase(const_key_reference);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_HT_MAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+ void
+ deallocate_all();
+
+ inline bool
+ do_resize_if_needed();
+
+ inline void
+ do_resize_if_needed_no_throw();
+
+ void
+ resize_imp(size_type new_size);
+
+ void
+ do_resize(size_type new_size);
+
+ void
+ resize_imp_no_exceptions(size_type, entry_pointer_array, size_type);
+
+ inline entry_pointer
+ resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, false_type);
+
+ inline entry_pointer
+ resize_imp_no_exceptions_reassign_pointer(entry_pointer, entry_pointer_array, true_type);
+
+ void
+ deallocate_links_in_list(entry_pointer);
+
+ inline entry_pointer
+ get_entry(const_reference, false_type);
+
+ inline entry_pointer
+ get_entry(const_reference, true_type);
+
+ inline void
+ rels_entry(entry_pointer);
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ inline mapped_reference
+ subscript_imp(const_key_reference r_key, false_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const size_type pos = ranged_hash_fn_base::operator()(r_key);
+ entry_pointer p_e = m_entries[pos];
+ resize_base::notify_insert_search_start();
+
+ while (p_e != NULL
+ && !hash_eq_fn_base::operator()(p_e->m_value.first, r_key))
+ {
+ resize_base::notify_insert_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_insert_search_end();
+ if (p_e != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return (p_e->m_value.second);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return insert_new_imp(value_type(r_key, mapped_type()), pos)->second;
+ }
+
+ inline mapped_reference
+ subscript_imp(const_key_reference r_key, true_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key);
+ entry_pointer p_e = m_entries[pos_hash_pair.first];
+ resize_base::notify_insert_search_start();
+ while (p_e != NULL &&
+ !hash_eq_fn_base::operator()(p_e->m_value.first, p_e->m_hash, r_key, pos_hash_pair.second))
+ {
+ resize_base::notify_insert_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_insert_search_end();
+ if (p_e != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return p_e->m_value.second;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return insert_new_imp(value_type(r_key, mapped_type()),
+ pos_hash_pair)->second;
+ }
+#endif
+
+ inline std::pair<point_iterator, bool>
+ insert_imp(const_reference, false_type);
+
+ inline std::pair<point_iterator, bool>
+ insert_imp(const_reference, true_type);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, size_type pos)
+ {
+ if (do_resize_if_needed())
+ pos = ranged_hash_fn_base::operator()(PB_DS_V2F(r_val));
+
+ // Following lines might throw an exception.
+ entry_pointer p_e = get_entry(r_val, traits_base::m_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+ p_e->m_p_next = m_entries[pos];
+ m_entries[pos] = p_e;
+ resize_base::notify_inserted(++m_num_used_e);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return &p_e->m_value;
+ }
+
+ inline pointer
+ insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair)
+ {
+ // Following lines might throw an exception.
+ if (do_resize_if_needed())
+ r_pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(r_val));
+
+ entry_pointer p_e = get_entry(r_val, traits_base::m_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+ p_e->m_hash = r_pos_hash_pair.second;
+ p_e->m_p_next = m_entries[r_pos_hash_pair.first];
+ m_entries[r_pos_hash_pair.first] = p_e;
+ resize_base::notify_inserted(++m_num_used_e);
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return &p_e->m_value;
+ }
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, false_type)
+ {
+ entry_pointer p_e = m_entries[ranged_hash_fn_base::operator()(r_key)];
+ resize_base::notify_find_search_start();
+ while (p_e != NULL &&
+ !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
+ {
+ resize_base::notify_find_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_find_search_end();
+
+#ifdef _GLIBCXX_DEBUG
+ if (p_e == NULL)
+ debug_base::check_key_does_not_exist(r_key);
+ else
+ debug_base::check_key_exists(r_key);
+#endif
+ return &p_e->m_value;
+ }
+
+ inline pointer
+ find_key_pointer(const_key_reference r_key, true_type)
+ {
+ comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(r_key);
+ entry_pointer p_e = m_entries[pos_hash_pair.first];
+ resize_base::notify_find_search_start();
+ while (p_e != NULL &&
+ !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value),
+ p_e->m_hash,
+ r_key, pos_hash_pair.second))
+ {
+ resize_base::notify_find_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_find_search_end();
+
+#ifdef _GLIBCXX_DEBUG
+ if (p_e == NULL)
+ debug_base::check_key_does_not_exist(r_key);
+ else
+ debug_base::check_key_exists(r_key);
+#endif
+ return &p_e->m_value;
+ }
+
+ inline bool
+ erase_in_pos_imp(const_key_reference, size_type);
+
+ inline bool
+ erase_in_pos_imp(const_key_reference, const comp_hash&);
+
+ inline void
+ erase_entry_pointer(entry_pointer&);
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ void
+ inc_it_state(pointer& r_p_value,
+ std::pair<entry_pointer, size_type>& r_pos) const
+ {
+ inc_it_state((const_mapped_pointer& )r_p_value, r_pos);
+ }
+#endif
+
+ void
+ inc_it_state(const_pointer& r_p_value,
+ std::pair<entry_pointer, size_type>& r_pos) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(r_p_value != NULL);
+ r_pos.first = r_pos.first->m_p_next;
+ if (r_pos.first != NULL)
+ {
+ r_p_value = &r_pos.first->m_value;
+ return;
+ }
+
+ for (++r_pos.second; r_pos.second < m_num_e; ++r_pos.second)
+ if (m_entries[r_pos.second] != NULL)
+ {
+ r_pos.first = m_entries[r_pos.second];
+ r_p_value = &r_pos.first->m_value;
+ return;
+ }
+ r_p_value = NULL;
+ }
+
+ void
+ get_start_it_state(pointer& r_p_value,
+ std::pair<entry_pointer, size_type>& r_pos) const
+ {
+ for (r_pos.second = 0; r_pos.second < m_num_e; ++r_pos.second)
+ if (m_entries[r_pos.second] != NULL)
+ {
+ r_pos.first = m_entries[r_pos.second];
+ r_p_value = &r_pos.first->m_value;
+ return;
+ }
+ r_p_value = NULL;
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_entry_pointer_array_valid(const entry_pointer_array) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer, true_type) const;
+
+ void
+ assert_entry_pointer_valid(const entry_pointer, false_type) const;
+#endif
+
+#ifdef PB_DS_HT_MAP_TRACE_
+ void
+ trace_list(const_entry_pointer) const;
+#endif
+
+ private:
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ friend class iterator_;
+#endif
+
+ friend class const_iterator_;
+
+ static entry_allocator s_entry_allocator;
+ static entry_pointer_allocator s_entry_pointer_allocator;
+ static iterator s_end_it;
+ static const_iterator s_const_end_it;
+ static point_iterator s_find_end_it;
+ static const_point_iterator s_const_find_end_it;
+
+ size_type m_num_e;
+ size_type m_num_used_e;
+ entry_pointer_array m_entries;
+
+ enum
+ {
+ store_hash_ok = !Store_Hash
+ || !is_same<Hash_Fn, __gnu_pbds::null_hash_fn>::value
+ };
+
+ PB_DS_STATIC_ASSERT(sth, store_hash_ok);
+ };
+
+#include <ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_HASH_EQ_FN_C_DEC
+#undef PB_DS_RANGED_HASH_FN_C_DEC
+#undef PB_DS_TYPES_TRAITS_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_V2F
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
new file mode 100644
index 0000000..1a61893
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cmp_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container comparison related
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Other_HT_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+operator==(const Other_HT_Map_Type& other) const
+{ return cmp_with_other(other); }
+
+PB_DS_CLASS_T_DEC
+template<typename Other_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+cmp_with_other(const Other_Map_Type& other) const
+{
+ if (size() != other.size())
+ return false;
+
+ for (typename Other_Map_Type::const_iterator it = other.begin();
+ it != other.end(); ++it)
+ {
+ const_key_reference r_key = const_key_reference(PB_DS_V2F(*it));
+
+ const_mapped_pointer p_mapped_value =
+ const_cast<PB_DS_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, traits_base::m_store_extra_indicator);
+
+ if (p_mapped_value == NULL)
+ return false;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ if (p_mapped_value->second != it->second)
+ return false;
+#endif
+ }
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Other_HT_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+operator!=(const Other_HT_Map_Type& other) const
+{ return !operator==(other); }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp
new file mode 100644
index 0000000..fa3f31d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp
@@ -0,0 +1,117 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_key_dtor_entry_dealtor.hpp
+ * Contains a conditional key destructor, used for exception handling.
+ */
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC template<typename HT_Map>
+#define PB_DS_CLASS_C_DEC PB_DS_CKDED_CLASS_NAME<HT_Map>
+
+ /**
+ * A conditional key destructor, used for exception handling.
+ **/
+ template<typename HT_Map>
+ class PB_DS_CKDED_CLASS_NAME
+ {
+ public:
+ typedef typename HT_Map::entry entry;
+ typedef typename HT_Map::entry_allocator entry_allocator;
+ typedef typename HT_Map::key_type key_type;
+
+ inline
+ PB_DS_CKDED_CLASS_NAME(entry_allocator* p_a, entry* p_e);
+
+ inline
+ ~PB_DS_CKDED_CLASS_NAME();
+
+ inline void
+ set_key_destruct();
+
+ inline void
+ set_no_action_destructor();
+
+ protected:
+ entry_allocator* const m_p_a;
+ entry* const m_p_e;
+
+ bool m_key_destruct;
+ bool m_no_action_destructor;
+ };
+
+ PB_DS_CLASS_T_DEC
+ inline
+ PB_DS_CLASS_C_DEC::
+ PB_DS_CKDED_CLASS_NAME(entry_allocator* p_a, entry* p_e)
+ : m_p_a(p_a), m_p_e(p_e), m_key_destruct(false),
+ m_no_action_destructor(false)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ set_key_destruct()
+ { m_key_destruct = true; }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ set_no_action_destructor()
+ { m_no_action_destructor = true; }
+
+ PB_DS_CLASS_T_DEC
+ inline
+ PB_DS_CLASS_C_DEC::
+ ~PB_DS_CKDED_CLASS_NAME()
+ {
+ if (m_no_action_destructor)
+ return;
+ if (m_key_destruct)
+ m_p_e->m_value.first.~key_type();
+ m_p_a->deallocate(m_p_e, 1);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 0000000..5711153
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,191 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::entry_allocator
+PB_DS_CLASS_C_DEC::s_entry_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::entry_pointer_allocator
+PB_DS_CLASS_C_DEC::s_entry_pointer_allocator;
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME() :
+ ranged_hash_fn_base(resize_base::get_nearest_larger_size(1)),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_pointer_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn) :
+ ranged_hash_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_pointer_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn) :
+ PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
+ ranged_hash_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_pointer_allocator.allocate(m_num_e))
+{
+ std::fill(m_entries, m_entries + m_num_e, (entry_pointer)NULL);
+ Resize_Policy::notify_cleared();
+ ranged_hash_fn_base::notify_resized(m_num_e);
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn) :
+ PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
+ ranged_hash_fn_base(resize_base::get_nearest_larger_size(1),
+ r_hash_fn, r_comb_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_pointer_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn, const Comb_Hash_Fn& r_comb_hash_fn, const Resize_Policy& r_resize_policy) :
+ PB_DS_HASH_EQ_FN_C_DEC(r_eq_fn),
+ Resize_Policy(r_resize_policy),
+ ranged_hash_fn_base(resize_base::get_nearest_larger_size(1),
+ r_hash_fn, r_comb_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_pointer_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(other),
+#endif
+ PB_DS_HASH_EQ_FN_C_DEC(other),
+ resize_base(other), ranged_hash_fn_base(other),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(m_entries = s_entry_pointer_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ __try
+ {
+ copy_from_range(other.begin(), other.end());
+ }
+ __catch(...)
+ {
+ deallocate_all();
+ __throw_exception_again;
+ }
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_CLASS_NAME()
+{ deallocate_all(); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+
+ std::swap(m_entries, other.m_entries);
+ std::swap(m_num_e, other.m_num_e);
+ std::swap(m_num_used_e, other.m_num_used_e);
+ ranged_hash_fn_base::swap(other);
+ hash_eq_fn_base::swap(other);
+ resize_base::swap(other);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+deallocate_all()
+{
+ clear();
+ s_entry_pointer_allocator.deallocate(m_entries, m_num_e);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{
+ std::fill(m_entries, m_entries + m_num_e, entry_pointer(NULL));
+ Resize_Policy::notify_resized(m_num_e);
+ Resize_Policy::notify_cleared();
+ ranged_hash_fn_base::notify_resized(m_num_e);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..4f1cce6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
+ false_type)
+{
+ // Following lines might throw an exception.
+ entry_pointer p = get_entry(r_val, traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+ p->m_p_next = m_entries[pos];
+ m_entries[pos] = p;
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..a2b6fa1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+constructor_insert_new_imp(const_reference r_val, size_type pos, true_type)
+{
+ // Following lines might throw an exception.
+ entry_pointer p = get_entry(r_val, traits_base::s_no_throw_copies_indicator);
+
+ // At this point no exceptions can be thrown.
+ p->m_p_next = m_entries[pos];
+ p->m_hash = ranged_hash_fn_base::operator()((const_key_reference)(PB_DS_V2F(p->m_value))).second;
+
+ m_entries[pos] = p;
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(r_key);)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
new file mode 100644
index 0000000..4219eef
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ debug_base::check_size(m_num_used_e);
+ assert_entry_pointer_array_valid(m_entries);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_entry_pointer_array_valid(const entry_pointer_array a_p_entries) const
+{
+ size_type iterated_num_used_e = 0;
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ entry_pointer p_e = a_p_entries[pos];
+ while (p_e != NULL)
+ {
+ ++iterated_num_used_e;
+ assert_entry_pointer_valid(p_e, traits_base::m_store_extra_indicator);
+ p_e = p_e->m_p_next;
+ }
+ }
+ _GLIBCXX_DEBUG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#include <ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..770bed3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_no_store_hash_fn_imps.hpp
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_entry_pointer_valid(const entry_pointer p, false_type) const
+{ debug_base::check_key_exists(PB_DS_V2F(p->m_value)); }
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..3d17671
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/debug_store_hash_fn_imps.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_entry_pointer_valid(const entry_pointer p_e, true_type) const
+{
+ debug_base::check_key_exists(PB_DS_V2F(p_e->m_value));
+ comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value));
+ _GLIBCXX_DEBUG_ASSERT(p_e->m_hash == pos_hash_pair.second);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp
new file mode 100644
index 0000000..fa09f73
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/entry_list_fn_imps.hpp
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file entry_list_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entry-list related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+deallocate_links_in_list(entry_pointer p_e)
+{
+ while (p_e != NULL)
+ {
+ entry_pointer p_dealloc_e = p_e;
+ p_e = p_e->m_p_next;
+ s_entry_allocator.deallocate(p_dealloc_e, 1);
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+get_entry(const_reference r_val, true_type)
+{
+ // Following line might throw an exception.
+ entry_pointer p_e = s_entry_allocator.allocate(1);
+
+ // Following lines* cannot* throw an exception.
+ new (&p_e->m_value) value_type(r_val);
+ return p_e;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+get_entry(const_reference r_val, false_type)
+{
+ // Following line might throw an exception.
+ entry_pointer p_e = s_entry_allocator.allocate(1);
+ cond_dealtor_t cond(p_e);
+
+ // Following lines might throw an exception.
+ new (&p_e->m_value) value_type(r_val);
+ cond.set_no_action();
+ return p_e;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rels_entry(entry_pointer p_e)
+{
+ // The following lines cannot throw exceptions (unless if key-data dtors do).
+ p_e->m_value.~value_type();
+ s_entry_allocator.deallocate(p_e, 1);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
new file mode 100644
index 0000000..9f9178b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+erase_entry_pointer(entry_pointer& r_p_e)
+{
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(r_p_e->m_value)));
+
+ entry_pointer p_e = r_p_e;
+ r_p_e = r_p_e->m_p_next;
+ rels_entry(p_e);
+ _GLIBCXX_DEBUG_ASSERT(m_num_used_e > 0);
+ resize_base::notify_erased(--m_num_used_e);
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ size_type num_ersd = 0;
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ while (m_entries[pos] != NULL && pred(m_entries[pos]->m_value))
+ {
+ ++num_ersd;
+ entry_pointer p_next_e = m_entries[pos]->m_p_next;
+ erase_entry_pointer(m_entries[pos]);
+ m_entries[pos] = p_next_e;
+ }
+
+ entry_pointer p_e = m_entries[pos];
+ while (p_e != NULL && p_e->m_p_next != NULL)
+ {
+ if (pred(p_e->m_p_next->m_value))
+ {
+ ++num_ersd;
+ erase_entry_pointer(p_e->m_p_next);
+ }
+ else
+ p_e = p_e->m_p_next;
+ }
+ }
+
+ do_resize_if_needed_no_throw();
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ while (m_entries[pos] != NULL)
+ erase_entry_pointer(m_entries[pos]);
+ do_resize_if_needed_no_throw();
+ resize_base::notify_cleared();
+}
+
+#include <ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp>
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..d24fc31
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_no_store_hash_fn_imps.hpp
@@ -0,0 +1,101 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions,
+ * when the hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return erase_in_pos_imp(r_key, ranged_hash_fn_base::operator()(r_key));
+}
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase_in_pos_imp(const_key_reference r_key, size_type pos)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ entry_pointer p_e = m_entries[pos];
+ resize_base::notify_erase_search_start();
+ if (p_e == NULL)
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return false;
+ }
+
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_exists(r_key);)
+ erase_entry_pointer(m_entries[pos]);
+ do_resize_if_needed_no_throw();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return true;
+ }
+
+ while (true)
+ {
+ entry_pointer p_next_e = p_e->m_p_next;
+ if (p_next_e == NULL)
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return false;
+ }
+
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_next_e->m_value), r_key))
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ erase_entry_pointer(p_e->m_p_next);
+ do_resize_if_needed_no_throw();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return true;
+ }
+ resize_base::notify_erase_search_collision();
+ p_e = p_next_e;
+ }
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..d72df69
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/erase_store_hash_fn_imps.hpp
@@ -0,0 +1,95 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s erase related functions,
+ * when the hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase_in_pos_imp(const_key_reference r_key, const comp_hash& r_pos_hash_pair)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ entry_pointer p_e = m_entries[r_pos_hash_pair.first];
+ resize_base::notify_erase_search_start();
+ if (p_e == NULL)
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base:: check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return false;
+ }
+
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), p_e->m_hash,
+ r_key, r_pos_hash_pair.second))
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ erase_entry_pointer(m_entries[r_pos_hash_pair.first]);
+ do_resize_if_needed_no_throw();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return true;
+ }
+
+ while (true)
+ {
+ entry_pointer p_next_e = p_e->m_p_next;
+ if (p_next_e == NULL)
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return false;
+ }
+
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_next_e->m_value),
+ p_next_e->m_hash, r_key,
+ r_pos_hash_pair.second))
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ erase_entry_pointer(p_e->m_p_next);
+ do_resize_if_needed_no_throw();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return true;
+ }
+ resize_base::notify_erase_search_collision();
+ p_e = p_next_e;
+ }
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp
new file mode 100644
index 0000000..6ca9a03
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s find related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return find_key_pointer(r_key, traits_base::m_store_extra_indicator);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return const_cast<PB_DS_CLASS_C_DEC& >(*this).find_key_pointer(r_key,
+ traits_base::m_store_extra_indicator);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find_end()
+{ return NULL; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find_end() const
+{ return NULL; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..1db51c9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/find_store_hash_fn_imps.hpp
@@ -0,0 +1,41 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s find related functions,
+ * when the hash value is stored.
+ */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
new file mode 100644
index 0000000..dc1519d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container info related
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{ return m_num_used_e; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return m_entry_allocator.max_size(); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return (size() == 0); }
+
+PB_DS_CLASS_T_DEC
+template<typename Other_HT_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+operator==(const Other_HT_Map_Type& other) const
+{ return cmp_with_other(other); }
+
+PB_DS_CLASS_T_DEC
+template<typename Other_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+cmp_with_other(const Other_Map_Type& other) const
+{
+ if (size() != other.size())
+ return false;
+
+ for (typename Other_Map_Type::const_iterator it = other.begin();
+ it != other.end(); ++it)
+ {
+ const_key_reference r_key =(const_key_reference)PB_DS_V2F(*it);
+ const_mapped_pointer p_mapped_value =
+ const_cast<PB_DS_CLASS_C_DEC& >(*this).
+ find_key_pointer(r_key, traits_base::m_store_extra_indicator);
+
+ if (p_mapped_value == NULL)
+ return false;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ if (p_mapped_value->second != it->second)
+ return false;
+#endif
+ }
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Other_HT_Map_Type>
+bool
+PB_DS_CLASS_C_DEC::
+operator!=(const Other_HT_Map_Type& other) const
+{ return !operator==(other); }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp
new file mode 100644
index 0000000..0679dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions.
+ */
+
+#include <ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp>
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..7215ccd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_no_store_hash_fn_imps.hpp
@@ -0,0 +1,70 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions,
+ * when the hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_imp(const_reference r_val, false_type)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const_key_reference r_key = PB_DS_V2F(r_val);
+ const size_type pos = ranged_hash_fn_base::operator()(r_key);
+ entry_pointer p_e = m_entries[pos];
+ resize_base::notify_insert_search_start();
+
+ while (p_e != NULL && !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value),
+ r_key))
+ {
+ resize_base::notify_insert_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_insert_search_end();
+ if (p_e != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return std::make_pair(&p_e->m_value, false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return std::make_pair(insert_new_imp(r_val, pos), true);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..fbc284f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/insert_store_hash_fn_imps.hpp
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s insert related functions,
+ * when the hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_imp(const_reference r_val, true_type)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const_key_reference key = PB_DS_V2F(r_val);
+ comp_hash pos_hash_pair = ranged_hash_fn_base::operator()(key);
+ entry_pointer p_e = m_entries[pos_hash_pair.first];
+ resize_base::notify_insert_search_start();
+
+ while (p_e != NULL && !hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value),
+ p_e->m_hash,
+ key, pos_hash_pair.second))
+ {
+ resize_base::notify_insert_search_collision();
+ p_e = p_e->m_p_next;
+ }
+
+ resize_base::notify_insert_search_end();
+ if (p_e != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
+ return std::make_pair(&p_e->m_value, false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
+ return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..a7592b7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/iterators_fn_imps.hpp
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s iterators related functions, e.g.,
+ * begin().
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::s_end_it;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::s_const_end_it;
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ pointer p_value;
+ std::pair<entry_pointer, size_type> pos;
+ get_start_it_state(p_value, pos);
+ return iterator(p_value, pos, this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{ return s_end_it; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ pointer p_value;
+ std::pair<entry_pointer, size_type> pos;
+ get_start_it_state(p_value, pos);
+ return const_iterator(p_value, pos, this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{ return s_const_end_it; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..9a661b3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s policy access
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_hash_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_hash_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Eq_Fn&
+PB_DS_CLASS_C_DEC::
+get_eq_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Eq_Fn&
+PB_DS_CLASS_C_DEC::
+get_eq_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Comb_Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_comb_hash_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Comb_Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_comb_hash_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Resize_Policy&
+PB_DS_CLASS_C_DEC::
+get_resize_policy()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Resize_Policy&
+PB_DS_CLASS_C_DEC::
+get_resize_policy() const
+{ return *this; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp
new file mode 100644
index 0000000..66333ec
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp
@@ -0,0 +1,133 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+do_resize_if_needed()
+{
+ if (!resize_base::is_resize_needed())
+ return false;
+ resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+do_resize(size_type len)
+{ resize_imp(resize_base::get_nearest_larger_size(len)); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+do_resize_if_needed_no_throw()
+{
+ if (!resize_base::is_resize_needed())
+ return;
+
+ __try
+ {
+ resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
+ }
+ __catch(...)
+ { }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+resize_imp(size_type new_size)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (new_size == m_num_e)
+ return;
+
+ const size_type old_size = m_num_e;
+ entry_pointer_array a_p_entries_resized;
+
+ // Following line might throw an exception.
+ ranged_hash_fn_base::notify_resized(new_size);
+
+ __try
+ {
+ // Following line might throw an exception.
+ a_p_entries_resized = s_entry_pointer_allocator.allocate(new_size);
+ m_num_e = new_size;
+ }
+ __catch(...)
+ {
+ ranged_hash_fn_base::notify_resized(old_size);
+ __throw_exception_again;
+ }
+
+ // At this point no exceptions can be thrown.
+ resize_imp_no_exceptions(new_size, a_p_entries_resized, old_size);
+ Resize_Policy::notify_resized(new_size);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+resize_imp_no_exceptions(size_type new_size, entry_pointer_array a_p_entries_resized, size_type old_size)
+{
+ std::fill(a_p_entries_resized, a_p_entries_resized + m_num_e,
+ entry_pointer(NULL));
+
+ for (size_type pos = 0; pos < old_size; ++pos)
+ {
+ entry_pointer p_e = m_entries[pos];
+ while (p_e != NULL)
+ p_e = resize_imp_no_exceptions_reassign_pointer(p_e, a_p_entries_resized, traits_base::m_store_extra_indicator);
+ }
+
+ m_num_e = new_size;
+ _GLIBCXX_DEBUG_ONLY(assert_entry_pointer_array_valid(a_p_entries_resized);)
+ s_entry_pointer_allocator.deallocate(m_entries, old_size);
+ m_entries = a_p_entries_resized;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+#include <ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp>
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..6577630
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_no_store_hash_fn_imps.hpp
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_no_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions, when the
+ * hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, false_type)
+{
+ const size_type hash_pos =
+ ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value));
+
+ entry_pointer const p_next_e = p_e->m_p_next;
+ p_e->m_p_next = a_p_entries_resized[hash_pos];
+ a_p_entries_resized[hash_pos] = p_e;
+ return p_next_e;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..c1adb61
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/resize_store_hash_fn_imps.hpp
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_store_hash_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s resize related functions, when the
+ * hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+resize_imp_no_exceptions_reassign_pointer(entry_pointer p_e, entry_pointer_array a_p_entries_resized, true_type)
+{
+ const comp_hash pos_hash_pair =
+ ranged_hash_fn_base::operator()(PB_DS_V2F(p_e->m_value), p_e->m_hash);
+
+ entry_pointer const p_next_e = p_e->m_p_next;
+ p_e->m_p_next = a_p_entries_resized[pos_hash_pair.first];
+ a_p_entries_resized[pos_hash_pair.first] = p_e;
+ return p_next_e;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp
new file mode 100644
index 0000000..0d5ec85
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file size_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s entire container size related
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{ return m_num_used_e; }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return (size() == 0); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return s_entry_allocator.max_size(); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp
new file mode 100644
index 0000000..b9c1ee2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp
@@ -0,0 +1,46 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file standard_policies.hpp
+ * Contains standard policies for cc_ht_map types.
+ */
+
+#ifndef PB_DS_CC_HT_MAP_STANDARD_POLICIES_HPP
+#define PB_DS_CC_HT_MAP_STANDARD_POLICIES_HPP
+
+#include <ext/pb_ds/detail/standard_policies.hpp>
+
+#endif // #ifndef PB_DS_CC_HT_MAP_STANDARD_POLICIES_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp
new file mode 100644
index 0000000..6fa5676
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s trace-mode functions.
+ */
+
+#ifdef PB_DS_HT_MAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << static_cast<unsigned long>(m_num_e) << " "
+ << static_cast<unsigned long>(m_num_used_e) << std::endl;
+
+ for (size_type i = 0; i < m_num_e; ++i)
+ {
+ std::cerr << static_cast<unsigned long>(i) << " ";
+ trace_list(m_entries[i]);
+ std::cerr << std::endl;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_list(const_entry_pointer p_l) const
+{
+ size_type iterated_num_used_e = 0;
+ while (p_l != NULL)
+ {
+ std::cerr << PB_DS_V2F(p_l->m_value) << " ";
+ p_l = p_l->m_p_next;
+ }
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cond_dealtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cond_dealtor.hpp
new file mode 100644
index 0000000..1ee48a2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/cond_dealtor.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_dealtor.hpp
+ * Contains a conditional deallocator.
+ */
+
+#ifndef PB_DS_COND_DEALTOR_HPP
+#define PB_DS_COND_DEALTOR_HPP
+
+namespace __gnu_pbds
+{
+
+ namespace detail
+ {
+
+#define PB_DS_COND_DEALTOR_CLASS_T_DEC \
+ template<typename Entry, class Allocator>
+
+#define PB_DS_COND_DEALTOR_CLASS_C_DEC \
+ cond_dealtor< \
+ Entry, \
+ Allocator>
+
+ template<typename Entry, class Allocator>
+ class cond_dealtor
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<Entry>::other
+ entry_allocator;
+
+ typedef typename entry_allocator::pointer entry_pointer;
+
+ public:
+ inline
+ cond_dealtor(entry_pointer p_e);
+
+ inline
+ ~cond_dealtor();
+
+ inline void
+ set_no_action();
+
+ private:
+ entry_pointer m_p_e;
+
+ bool m_no_action_destructor;
+
+ static entry_allocator s_alloc;
+ };
+
+ PB_DS_COND_DEALTOR_CLASS_T_DEC
+ typename PB_DS_COND_DEALTOR_CLASS_C_DEC::entry_allocator
+ PB_DS_COND_DEALTOR_CLASS_C_DEC::s_alloc;
+
+ PB_DS_COND_DEALTOR_CLASS_T_DEC
+ inline
+ PB_DS_COND_DEALTOR_CLASS_C_DEC::
+ cond_dealtor(entry_pointer p_e) :
+ m_p_e(p_e),
+ m_no_action_destructor(false)
+ { }
+
+ PB_DS_COND_DEALTOR_CLASS_T_DEC
+ inline void
+ PB_DS_COND_DEALTOR_CLASS_C_DEC::
+ set_no_action()
+ {
+ m_no_action_destructor = true;
+ }
+
+ PB_DS_COND_DEALTOR_CLASS_T_DEC
+ inline
+ PB_DS_COND_DEALTOR_CLASS_C_DEC::
+ ~cond_dealtor()
+ {
+ if (m_no_action_destructor)
+ return;
+
+ s_alloc.deallocate(m_p_e, 1);
+ }
+
+#undef PB_DS_COND_DEALTOR_CLASS_T_DEC
+#undef PB_DS_COND_DEALTOR_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_COND_DEALTOR_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..20c9988
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains constructors_destructor_fn_imps applicable to different containers.
+ */
+
+inline
+PB_DS_CLASS_NAME()
+{ }
+
+inline
+PB_DS_CLASS_NAME(const PB_DS_CLASS_NAME& other)
+: base_type((const base_type&)other)
+{ }
+
+template<typename T0>
+inline
+PB_DS_CLASS_NAME(T0 t0) : base_type(t0)
+{ }
+
+template<typename T0, typename T1>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1) : base_type(t0, t1)
+{ }
+
+template<typename T0, typename T1, typename T2>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2) : base_type(t0, t1, t2)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3)
+: base_type(t0, t1, t2, t3)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3, typename T4>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)
+: base_type(t0, t1, t2, t3, t4)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3, typename T4,
+ typename T5>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
+: base_type(t0, t1, t2, t3, t4, t5)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6)
+: base_type(t0, t1, t2, t3, t4, t5, t6)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7)
+: base_type(t0, t1, t2, t3, t4, t5, t6, t7)
+{ }
+
+template<typename T0, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+inline
+PB_DS_CLASS_NAME(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8)
+: base_type(t0, t1, t2, t3, t4, t5, t6, t7, t8)
+{ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/container_base_dispatch.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/container_base_dispatch.hpp
new file mode 100644
index 0000000..7f8d87a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/container_base_dispatch.hpp
@@ -0,0 +1,332 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file container_base_dispatch.hpp
+ * Contains an associative container dispatching base.
+ */
+
+#ifndef PB_DS_ASSOC_CNTNR_BASE_DS_DISPATCHER_HPP
+#define PB_DS_ASSOC_CNTNR_BASE_DS_DISPATCHER_HPP
+
+#include <ext/typelist.h>
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/list_update_map_/lu_map_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/list_update_map_/lu_map_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/splay_tree_/splay_tree_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/splay_tree_/splay_tree_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+#define PB_DS_DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
+#undef PB_DS_DATA_TRUE_INDICATOR
+
+#define PB_DS_DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/pat_trie_/pat_trie_.hpp>
+#undef PB_DS_DATA_FALSE_INDICATOR
+
+namespace __gnu_pbds
+{
+namespace detail
+{
+ // Primary template.
+ template<typename Key, typename Mapped, typename Data_Structure_Taq,
+ typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch;
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, list_update_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef lu_map_data_<Key, Mapped, at0t, Alloc, at1t> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, list_update_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef lu_map_no_data_<Key, null_mapped_type, at0t, Alloc, at1t> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, pat_trie_tag, Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef pat_trie_data_<Key, Mapped, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, pat_trie_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef pat_trie_no_data_<Key, null_mapped_type, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, rb_tree_tag, Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef rb_tree_data_<Key, Mapped, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, rb_tree_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef rb_tree_no_data_<Key, null_mapped_type, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, splay_tree_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef splay_tree_data_<Key, Mapped, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, splay_tree_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef splay_tree_no_data_<Key, null_mapped_type, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, ov_tree_tag, Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef ov_tree_data_<Key, Mapped, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, ov_tree_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+
+ public:
+ typedef ov_tree_no_data_<Key, null_mapped_type, at0t, at1t, Alloc> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, cc_hash_tag, Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 2> at2;
+ typedef typename at2::type at2t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 3> at3;
+ typedef typename at3::type at3t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 4> at4;
+ typedef typename at4::type at4t;
+
+ public:
+ typedef cc_ht_map_data_<Key, Mapped, at0t, at1t, Alloc, at3t::value,
+ at4t, at2t> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, cc_hash_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 2> at2;
+ typedef typename at2::type at2t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 3> at3;
+ typedef typename at3::type at3t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 4> at4;
+ typedef typename at4::type at4t;
+
+ public:
+ typedef cc_ht_map_no_data_<Key, null_mapped_type, at0t, at1t, Alloc,
+ at3t::value, at4t, at2t> type;
+ };
+
+ template<typename Key, typename Mapped, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, Mapped, gp_hash_tag, Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 2> at2;
+ typedef typename at2::type at2t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 3> at3;
+ typedef typename at3::type at3t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 4> at4;
+ typedef typename at4::type at4t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 5> at5;
+ typedef typename at5::type at5t;
+
+ public:
+ typedef gp_ht_map_data_<Key, Mapped, at0t, at1t, Alloc, at3t::value,
+ at4t, at5t, at2t> type;
+ };
+
+ template<typename Key, typename Policy_Tl, typename Alloc>
+ struct container_base_dispatch<Key, null_mapped_type, gp_hash_tag,
+ Policy_Tl, Alloc>
+ {
+ private:
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 0> at0;
+ typedef typename at0::type at0t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 1> at1;
+ typedef typename at1::type at1t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 2> at2;
+ typedef typename at2::type at2t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 3> at3;
+ typedef typename at3::type at3t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 4> at4;
+ typedef typename at4::type at4t;
+ typedef __gnu_cxx::typelist::at_index<Policy_Tl, 5> at5;
+ typedef typename at5::type at5t;
+
+ public:
+ typedef gp_ht_map_no_data_<Key, null_mapped_type, at0t, at1t, Alloc,
+ at3t::value, at4t, at5t, at2t> type;
+ };
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/debug_map_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/debug_map_base.hpp
new file mode 100644
index 0000000..6f2defb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/debug_map_base.hpp
@@ -0,0 +1,360 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_map_base.hpp
+ * Contains a debug-mode base for all maps.
+ */
+
+#ifndef PB_DS_DEBUG_MAP_BASE_HPP
+#define PB_DS_DEBUG_MAP_BASE_HPP
+
+#ifdef _GLIBCXX_DEBUG
+
+#include <list>
+#include <utility>
+#include <cstdlib>
+#include <iostream>
+#include <ext/throw_allocator.h>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ // Need std::pair ostream extractor.
+ template<typename _CharT, typename _Traits, typename _Tp1, typename _Tp2>
+ inline std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __out,
+ const std::pair<_Tp1, _Tp2>& p)
+ { return (__out << '(' << p.first << ',' << p.second << ')'); }
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, typename Const_Key_Reference>
+
+#define PB_DS_CLASS_C_DEC \
+ debug_map_base<Key, Eq_Fn, Const_Key_Reference>
+
+ template<typename Key, class Eq_Fn, typename Const_Key_Reference>
+ class debug_map_base
+ {
+ private:
+ typedef typename std::allocator< Key> key_allocator;
+
+ typedef typename key_allocator::size_type size_type;
+
+ typedef Const_Key_Reference const_key_reference;
+
+ protected:
+ debug_map_base();
+
+ debug_map_base(const PB_DS_CLASS_C_DEC& other);
+
+ ~debug_map_base();
+
+ inline void
+ insert_new(const_key_reference r_key);
+
+ inline void
+ erase_existing(const_key_reference r_key);
+
+ void
+ clear();
+
+ inline void
+ check_key_exists(const_key_reference r_key) const;
+
+ inline void
+ check_key_does_not_exist(const_key_reference r_key) const;
+
+ inline void
+ check_size(size_type size) const;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ template<typename Cmp_Fn>
+ void
+ split(const_key_reference, Cmp_Fn, PB_DS_CLASS_C_DEC&);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+ private:
+ typedef std::list< Key> key_set;
+ typedef typename key_set::iterator key_set_iterator;
+ typedef typename key_set::const_iterator const_key_set_iterator;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+ const_key_set_iterator
+ find(const_key_reference r_key) const;
+
+ key_set_iterator
+ find(const_key_reference r_key);
+
+ key_set m_key_set;
+ Eq_Fn m_eq;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ debug_map_base()
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ debug_map_base(const PB_DS_CLASS_C_DEC& other) : m_key_set(other.m_key_set)
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ~debug_map_base()
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ insert_new(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ if (find(r_key) != m_key_set.end())
+ {
+ std::cerr << "insert_new" << r_key << std::endl;
+ std::abort();
+ }
+
+ __try
+ {
+ m_key_set.push_back(r_key);
+ }
+ __catch(...)
+ {
+ std::cerr << "insert_new" << r_key << std::endl;
+ std::abort();
+ }
+ alloc.set_throw_prob(orig_throw_prob);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ erase_existing(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ key_set_iterator it = find(r_key);
+ if (it == m_key_set.end())
+ {
+ std::cerr << "erase_existing" << r_key << std::endl;
+ std::abort();
+ }
+ m_key_set.erase(it);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ clear()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_key_set.clear();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_key_exists(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (find(r_key) == m_key_set.end())
+ {
+ std::cerr << "check_key_exists" << r_key << std::endl;
+ std::abort();
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_key_does_not_exist(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (find(r_key) != m_key_set.end())
+ {
+ using std::cerr;
+ using std::endl;
+ cerr << "check_key_does_not_exist" << r_key << endl;
+ std::abort();
+ }
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ check_size(size_type size) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const size_type key_set_size = m_key_set.size();
+ if (size != key_set_size)
+ {
+ std::cerr << "check_size " << size
+ << " " << key_set_size << std::endl;
+ std::abort();
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_key_set.swap(other.m_key_set);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_key_set_iterator
+ PB_DS_CLASS_C_DEC::
+ find(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ typedef const_key_set_iterator iterator_type;
+ for (iterator_type it = m_key_set.begin(); it != m_key_set.end(); ++it)
+ if (m_eq(*it, r_key))
+ return it;
+ return m_key_set.end();
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::key_set_iterator
+ PB_DS_CLASS_C_DEC::
+ find(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ key_set_iterator it = m_key_set.begin();
+ while (it != m_key_set.end())
+ {
+ if (m_eq(*it, r_key))
+ return it;
+ ++it;
+ }
+ return it;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ assert_valid() const
+ {
+ const_key_set_iterator prime_it = m_key_set.begin();
+ while (prime_it != m_key_set.end())
+ {
+ const_key_set_iterator sec_it = prime_it;
+ ++sec_it;
+ while (sec_it != m_key_set.end())
+ {
+ _GLIBCXX_DEBUG_ASSERT(!m_eq(*sec_it, *prime_it));
+ _GLIBCXX_DEBUG_ASSERT(!m_eq(*prime_it, *sec_it));
+ ++sec_it;
+ }
+ ++prime_it;
+ }
+ }
+#endif
+
+ PB_DS_CLASS_T_DEC
+ template<typename Cmp_Fn>
+ void
+ PB_DS_CLASS_C_DEC::
+ split(const_key_reference r_key, Cmp_Fn cmp_fn, PB_DS_CLASS_C_DEC& other)
+ {
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ other.clear();
+ key_set_iterator it = m_key_set.begin();
+ while (it != m_key_set.end())
+ if (cmp_fn(r_key, * it))
+ {
+ other.insert_new(*it);
+ it = m_key_set.erase(it);
+ }
+ else
+ ++it;
+ alloc.set_throw_prob(orig_throw_prob);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ join(PB_DS_CLASS_C_DEC& other)
+ {
+ __gnu_cxx::throw_allocator<char> alloc;
+ const double orig_throw_prob = alloc.get_throw_prob();
+ alloc.set_throw_prob(0);
+ key_set_iterator it = other.m_key_set.begin();
+ while (it != other.m_key_set.end())
+ {
+ insert_new(*it);
+ it = other.m_key_set.erase(it);
+ }
+ _GLIBCXX_DEBUG_ASSERT(other.m_key_set.empty());
+ alloc.set_throw_prob(orig_throw_prob);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp
new file mode 100644
index 0000000..ec95bca
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp
@@ -0,0 +1,68 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file eq_by_less.hpp
+ * Contains an equivalence function.
+ */
+
+#ifndef PB_DS_EQ_BY_LESS_HPP
+#define PB_DS_EQ_BY_LESS_HPP
+
+#include <utility>
+#include <functional>
+#include <vector>
+#include <assert.h>
+#include <ext/pb_ds/detail/types_traits.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, class Cmp_Fn>
+ struct eq_by_less : private Cmp_Fn
+ {
+ bool
+ operator()(const Key& r_lhs, const Key& r_rhs) const
+ {
+ const bool l = Cmp_Fn::operator()(r_lhs, r_rhs);
+ const bool g = Cmp_Fn::operator()(r_rhs, r_lhs);
+ return !(l || g);
+ }
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_EQ_BY_LESS_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp
new file mode 100644
index 0000000..b21c252
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp
@@ -0,0 +1,179 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_eq_fn.hpp
+ * Contains 2 eqivalence functions, one employing a hash value,
+ * and one ignoring it.
+ */
+
+#ifndef PB_DS_HASH_EQ_FN_HPP
+#define PB_DS_HASH_EQ_FN_HPP
+
+#include <utility>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, class Eq_Fn, class Allocator, bool Store_Hash>
+ struct hash_eq_fn;
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ hash_eq_fn<Key, Eq_Fn, Allocator, false>
+
+ /**
+ * Specialization 1- The client requests that hash values not be stored.
+ **/
+ template<typename Key, class Eq_Fn, class Allocator>
+ struct hash_eq_fn<Key, Eq_Fn, Allocator, false> : public Eq_Fn
+ {
+ typedef Eq_Fn eq_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ hash_eq_fn();
+
+ hash_eq_fn(const Eq_Fn& r_eq_fn);
+
+ inline bool
+ operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const;
+
+ inline void
+ swap(const PB_DS_CLASS_C_DEC& other);
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ hash_eq_fn()
+ { }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ swap(const PB_DS_CLASS_C_DEC& other)
+ { std::swap((Eq_Fn& )(*this), (Eq_Fn& )other); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ hash_eq_fn(const Eq_Fn& r_eq_fn) :
+ Eq_Fn(r_eq_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ inline bool
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+ { return (eq_fn_base::operator()(r_lhs_key, r_rhs_key)); }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, class Eq_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ hash_eq_fn<Key, Eq_Fn, Allocator, true>
+
+ /**
+ * Specialization 2- The client requests that hash values be stored.
+ **/
+ template<typename Key, class Eq_Fn, class Allocator>
+ struct hash_eq_fn<Key, Eq_Fn, Allocator, true> :
+ public Eq_Fn
+ {
+ typedef typename Allocator::size_type size_type;
+
+ typedef Eq_Fn eq_fn_base;
+
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ hash_eq_fn();
+
+ hash_eq_fn(const Eq_Fn& r_eq_fn);
+
+ inline bool
+ operator()(const_key_reference r_lhs_key, size_type lhs_hash,
+ const_key_reference r_rhs_key, size_type rhs_hash) const;
+
+ inline void
+ swap(const PB_DS_CLASS_C_DEC& other);
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ hash_eq_fn()
+ { }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ hash_eq_fn(const Eq_Fn& r_eq_fn) :
+ Eq_Fn(r_eq_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ inline bool
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_lhs_key, size_type lhs_hash,
+ const_key_reference r_rhs_key, size_type rhs_hash) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(!eq_fn_base::operator()(r_lhs_key, r_rhs_key)
+ || lhs_hash == rhs_hash);
+
+ return (lhs_hash == rhs_hash &&
+ eq_fn_base::operator()(r_lhs_key, r_rhs_key));
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ swap(const PB_DS_CLASS_C_DEC& other)
+ { std::swap((Eq_Fn& )(*this), (Eq_Fn& )(other)); }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 0000000..4ac145d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,223 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::entry_allocator
+PB_DS_CLASS_C_DEC::s_entry_allocator;
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME()
+: ranged_probe_fn_base(resize_base::get_nearest_larger_size(1)),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn)
+: ranged_probe_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn)
+: hash_eq_fn_base(r_eq_fn),
+ ranged_probe_fn_base(resize_base::get_nearest_larger_size(1), r_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& r_comb_hash_fn)
+: hash_eq_fn_base(r_eq_fn),
+ ranged_probe_fn_base(resize_base::get_nearest_larger_size(1),
+ r_hash_fn, r_comb_hash_fn),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& comb_hash_fn, const Probe_Fn& prober)
+: hash_eq_fn_base(r_eq_fn),
+ ranged_probe_fn_base(resize_base::get_nearest_larger_size(1),
+ r_hash_fn, comb_hash_fn, prober),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Hash_Fn& r_hash_fn, const Eq_Fn& r_eq_fn,
+ const Comb_Probe_Fn& comb_hash_fn, const Probe_Fn& prober,
+ const Resize_Policy& r_resize_policy)
+: hash_eq_fn_base(r_eq_fn), resize_base(r_resize_policy),
+ ranged_probe_fn_base(resize_base::get_nearest_larger_size(1),
+ r_hash_fn, comb_hash_fn, prober),
+ m_num_e(resize_base::get_nearest_larger_size(1)), m_num_used_e(0),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(other),
+#endif
+ hash_eq_fn_base(other),
+ resize_base(other),
+ ranged_probe_fn_base(other),
+ m_num_e(other.m_num_e),
+ m_num_used_e(other.m_num_used_e),
+ m_entries(s_entry_allocator.allocate(m_num_e))
+{
+ for (size_type i = 0; i < m_num_e; ++i)
+ m_entries[i].m_stat = (entry_status)empty_entry_status;
+
+ __try
+ {
+ for (size_type i = 0; i < m_num_e; ++i)
+ {
+ m_entries[i].m_stat = other.m_entries[i].m_stat;
+ if (m_entries[i].m_stat == valid_entry_status)
+ new (m_entries + i) entry(other.m_entries[i]);
+ }
+ }
+ __catch(...)
+ {
+ deallocate_all();
+ __throw_exception_again;
+ }
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_CLASS_NAME()
+{ deallocate_all(); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+ std::swap(m_num_e, other.m_num_e);
+ std::swap(m_num_used_e, other.m_num_used_e);
+ std::swap(m_entries, other.m_entries);
+ ranged_probe_fn_base::swap(other);
+ hash_eq_fn_base::swap(other);
+ resize_base::swap(other);
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+deallocate_all()
+{
+ clear();
+ erase_all_valid_entries(m_entries, m_num_e);
+ s_entry_allocator.deallocate(m_entries, m_num_e);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_all_valid_entries(entry_array a_entries_resized, size_type len)
+{
+ for (size_type pos = 0; pos < len; ++pos)
+ {
+ entry_pointer p_e = &a_entries_resized[pos];
+ if (p_e->m_stat == valid_entry_status)
+ p_e->m_value.~value_type();
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{
+ Resize_Policy::notify_resized(m_num_e);
+ Resize_Policy::notify_cleared();
+ ranged_probe_fn_base::notify_resized(m_num_e);
+ for (size_type i = 0; i < m_num_e; ++i)
+ m_entries[i].m_stat = empty_entry_status;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..ec80698
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_no_store_hash_fn_imps.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
+ false_type)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_entries[pos].m_stat != valid_entry_status)k;
+ entry* const p_e = m_entries + pos;
+ new (&p_e->m_value) mapped_value_type(r_val);
+ p_e->m_stat = valid_entry_status;
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..5f30487
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_store_hash_fn_imps.hpp
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s constructors, destructor,
+ * and related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+constructor_insert_new_imp(const_mapped_reference r_val, size_type pos,
+ true_type)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_entries[pos].m_stat != valid_entry_status);
+ entry* const p_e = m_entries + pos;
+ new (&p_e->m_value) mapped_value_type(r_val);
+ p_e->m_hash = ranged_probe_fn_base::operator()(PB_DS_V2F(r_val)).second;
+ p_e->m_stat = valid_entry_status;
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(p_e->m_value.first);)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
new file mode 100644
index 0000000..d7018c6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ debug_base::check_size(m_num_used_e);
+ assert_entry_array_valid(m_entries, traits_base::m_store_extra_indicator);
+}
+
+#include <ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..86b4d7d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_no_store_hash_fn_imps.hpp
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_entry_array_valid(const entry_array a_entries, false_type) const
+{
+ size_type iterated_num_used_e = 0;
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ const_entry_pointer p_e = &a_entries[pos];
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ case erased_entry_status:
+ break;
+ case valid_entry_status:
+ {
+ const_key_reference r_key = PB_DS_V2F(p_e->m_value);
+ debug_base::check_key_exists(r_key);
+ ++iterated_num_used_e;
+ break;
+ }
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ }
+ _GLIBCXX_DEBUG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..961f143
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/debug_store_hash_fn_imps.hpp
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_entry_array_valid(const entry_array a_entries, true_type) const
+{
+ size_type iterated_num_used_e = 0;
+
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ const_entry_pointer p_e =& a_entries[pos];
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ case erased_entry_status:
+ break;
+ case valid_entry_status:
+ {
+ const_key_reference r_key = PB_DS_V2F(p_e->m_value);
+ debug_base::check_key_exists(r_key);
+
+ const comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key);
+
+ _GLIBCXX_DEBUG_ASSERT(p_e->m_hash == pos_hash_pair.second);
+ ++iterated_num_used_e;
+ break;
+ }
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(iterated_num_used_e == m_num_used_e);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
new file mode 100644
index 0000000..68878eb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+erase_entry(entry_pointer p_e)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_e->m_stat = valid_entry_status);
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_e->m_value));)
+ p_e->m_value.~value_type();
+ p_e->m_stat = erased_entry_status;
+ _GLIBCXX_DEBUG_ASSERT(m_num_used_e > 0);
+ resize_base::notify_erased(--m_num_used_e);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ entry_pointer p_e = &m_entries[pos];
+ if (p_e->m_stat == valid_entry_status)
+ erase_entry(p_e);
+ }
+ do_resize_if_needed_no_throw();
+ resize_base::notify_cleared();
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ size_type num_ersd = 0;
+ for (size_type pos = 0; pos < m_num_e; ++pos)
+ {
+ entry_pointer p_e = &m_entries[pos];
+ if (p_e->m_stat == valid_entry_status)
+ if (pred(p_e->m_value))
+ {
+ ++num_ersd;
+ erase_entry(p_e);
+ }
+ }
+
+ do_resize_if_needed_no_throw();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{ return erase_imp(r_key, traits_base::m_store_extra_indicator); }
+
+#include <ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..40d578e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_no_store_hash_fn_imps.hpp
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions,
+ * when the hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase_imp(const_key_reference r_key, false_type)
+{
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ size_type hash = ranged_probe_fn_base::operator()(r_key);
+ size_type i;
+ resize_base::notify_erase_search_start();
+
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
+ entry* const p_e = m_entries + pos;
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
+ r_key));
+ return false;
+ }
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
+ {
+ resize_base::notify_erase_search_end();
+ erase_entry(p_e);
+ do_resize_if_needed_no_throw();
+ return true;
+ }
+ break;
+ case erased_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ resize_base::notify_erase_search_collision();
+ }
+ resize_base::notify_erase_search_end();
+ return false;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..8155a52
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/erase_store_hash_fn_imps.hpp
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s erase related functions,
+ * when the hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase_imp(const_key_reference r_key, true_type)
+{
+ const comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key);
+ size_type i;
+ resize_base::notify_erase_search_start();
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_entries + pos;
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_erase_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(
+ r_key));
+ return false;
+ }
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), p_e->m_hash,
+ r_key, pos_hash_pair.second))
+ {
+ resize_base::notify_erase_search_end();
+ erase_entry(p_e);
+ do_resize_if_needed_no_throw();
+ return true;
+ }
+ break;
+ case erased_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+
+ resize_base::notify_erase_search_collision();
+ }
+ resize_base::notify_erase_search_end();
+ return false;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp
new file mode 100644
index 0000000..69d5376
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp
@@ -0,0 +1,70 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return find_key_pointer(r_key, traits_base::m_store_extra_indicator);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return const_cast<PB_DS_CLASS_C_DEC&>(*this).find_key_pointer(r_key, traits_base::m_store_extra_indicator);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find_end()
+{ return NULL; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find_end() const
+{ return NULL; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..298604c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_no_store_hash_fn_imps.hpp
@@ -0,0 +1,46 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions,
+ * when the hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::pointer
+PB_DS_CLASS_C_DEC::
+find_key_pointer(const_key_reference r_key, false_type)
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..a44b832
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/find_store_hash_fn_imps.hpp
@@ -0,0 +1,40 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions,
+ * when the hash value is stored.
+ */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
new file mode 100644
index 0000000..4741afe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
@@ -0,0 +1,677 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file gp_ht_map_.hpp
+ * Contains an implementation class for gp_ht_map_.
+ */
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp>
+#include <utility>
+#ifdef PB_DS_HT_MAP_TRACE_
+#include <iostream>
+#endif
+#ifdef _GLIBCXX_DEBUG
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#endif
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, typename Hash_Fn, typename Eq_Fn, \
+ typename Allocator, bool Store_Hash, typename Comb_Probe_Fn, \
+ typename Probe_Fn, typename Resize_Policy>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME gp_ht_map_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME gp_ht_map_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Hash_Fn, Eq_Fn, Allocator, \
+ Store_Hash, Comb_Probe_Fn, Probe_Fn, Resize_Policy>
+
+#define PB_DS_HASH_EQ_FN_C_DEC \
+ hash_eq_fn<Key, Eq_Fn, Allocator, Store_Hash>
+
+#define PB_DS_RANGED_PROBE_FN_C_DEC \
+ ranged_probe_fn<Key, Hash_Fn, Allocator, Comb_Probe_Fn, Probe_Fn, Store_Hash>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits<Key, Mapped, Allocator, Store_Hash>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped()
+#endif
+
+ template<typename Key,
+ typename Mapped,
+ typename Hash_Fn,
+ typename Eq_Fn,
+ typename Allocator,
+ bool Store_Hash,
+ typename Comb_Probe_Fn,
+ typename Probe_Fn,
+ typename Resize_Policy>
+ class PB_DS_CLASS_NAME :
+#ifdef _GLIBCXX_DEBUG
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+ public PB_DS_HASH_EQ_FN_C_DEC,
+ public Resize_Policy,
+ public PB_DS_RANGED_PROBE_FN_C_DEC,
+ public PB_DS_TYPES_TRAITS_C_DEC
+ {
+ private:
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+ typedef typename traits_base::value_type value_type_;
+ typedef typename traits_base::pointer pointer_;
+ typedef typename traits_base::const_pointer const_pointer_;
+ typedef typename traits_base::reference reference_;
+ typedef typename traits_base::const_reference const_reference_;
+ typedef typename traits_base::comp_hash comp_hash;
+
+ enum entry_status
+ {
+ empty_entry_status,
+ valid_entry_status,
+ erased_entry_status
+ } __attribute__ ((packed));
+
+ struct entry : public traits_base::stored_value_type
+ {
+ entry_status m_stat;
+ };
+
+ typedef typename Allocator::template rebind<entry>::other entry_allocator;
+ typedef typename entry_allocator::pointer entry_pointer;
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+ typedef typename entry_allocator::reference entry_reference;
+ typedef typename entry_allocator::const_reference const_entry_reference;
+ typedef typename entry_allocator::pointer entry_array;
+
+ typedef PB_DS_RANGED_PROBE_FN_C_DEC ranged_probe_fn_base;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+ typedef PB_DS_HASH_EQ_FN_C_DEC hash_eq_fn_base;
+ typedef Resize_Policy resize_base;
+
+#define PB_DS_GEN_POS typename Allocator::size_type
+
+#include <ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_DS_GEN_POS
+
+ public:
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef Hash_Fn hash_fn;
+ typedef Eq_Fn eq_fn;
+ typedef Probe_Fn probe_fn;
+ typedef Comb_Probe_Fn comb_probe_fn;
+ typedef Resize_Policy resize_policy;
+
+ enum
+ {
+ store_hash = Store_Hash
+ };
+
+ typedef typename traits_base::key_type key_type;
+ typedef typename traits_base::key_pointer key_pointer;
+ typedef typename traits_base::const_key_pointer const_key_pointer;
+ typedef typename traits_base::key_reference key_reference;
+ typedef typename traits_base::const_key_reference const_key_reference;
+ typedef typename traits_base::mapped_type mapped_type;
+ typedef typename traits_base::mapped_pointer mapped_pointer;
+ typedef typename traits_base::const_mapped_pointer const_mapped_pointer;
+ typedef typename traits_base::mapped_reference mapped_reference;
+ typedef typename traits_base::const_mapped_reference const_mapped_reference;
+ typedef typename traits_base::value_type value_type;
+ typedef typename traits_base::pointer pointer;
+ typedef typename traits_base::const_pointer const_pointer;
+ typedef typename traits_base::reference reference;
+ typedef typename traits_base::const_reference const_reference;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef point_iterator_ point_iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_point_iterator_ point_iterator;
+#endif
+
+ typedef const_point_iterator_ const_point_iterator;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef iterator_ iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_iterator_ iterator;
+#endif
+
+ typedef const_iterator_ const_iterator;
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Probe_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Probe_Fn&,
+ const Probe_Fn&);
+
+ PB_DS_CLASS_NAME(const Hash_Fn&, const Eq_Fn&, const Comb_Probe_Fn&,
+ const Probe_Fn&, const Resize_Policy&);
+
+ template<typename It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+ virtual
+ ~PB_DS_CLASS_NAME();
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ Hash_Fn&
+ get_hash_fn();
+
+ const Hash_Fn&
+ get_hash_fn() const;
+
+ Eq_Fn&
+ get_eq_fn();
+
+ const Eq_Fn&
+ get_eq_fn() const;
+
+ Probe_Fn&
+ get_probe_fn();
+
+ const Probe_Fn&
+ get_probe_fn() const;
+
+ Comb_Probe_Fn&
+ get_comb_probe_fn();
+
+ const Comb_Probe_Fn&
+ get_comb_probe_fn() const;
+
+ Resize_Policy&
+ get_resize_policy();
+
+ const Resize_Policy&
+ get_resize_policy() const;
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference r_val)
+ {
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ return insert_imp(r_val, traits_base::m_store_extra_indicator);
+ }
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ return subscript_imp(r_key, traits_base::m_store_extra_indicator);
+#else
+ insert(r_key);
+ return traits_base::s_null_mapped;
+#endif
+ }
+
+ inline point_iterator
+ find(const_key_reference r_key);
+
+ inline const_point_iterator
+ find(const_key_reference r_key) const;
+
+ inline point_iterator
+ find_end();
+
+ inline const_point_iterator
+ find_end() const;
+
+ inline bool
+ erase(const_key_reference r_key);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred prd);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_HT_MAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ friend class iterator_;
+#endif
+
+ friend class const_iterator_;
+
+ void
+ deallocate_all();
+
+ void
+ initialize();
+
+ void
+ erase_all_valid_entries(entry_array, size_type);
+
+ inline bool
+ do_resize_if_needed();
+
+ inline void
+ do_resize_if_needed_no_throw();
+
+ void
+ resize_imp(size_type);
+
+ virtual void
+ do_resize(size_type);
+
+ void
+ resize_imp(entry_array, size_type);
+
+ inline void
+ resize_imp_reassign(entry_pointer, entry_array, false_type);
+
+ inline void
+ resize_imp_reassign(entry_pointer, entry_array, true_type);
+
+ inline size_type
+ find_ins_pos(const_key_reference, false_type);
+
+ inline comp_hash
+ find_ins_pos(const_key_reference, true_type);
+
+ inline std::pair<point_iterator, bool>
+ insert_imp(const_reference, false_type);
+
+ inline std::pair<point_iterator, bool>
+ insert_imp(const_reference, true_type);
+
+ inline pointer
+ insert_new_imp(const_reference r_val, size_type pos)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_entries[pos].m_stat != valid_entry_status);
+
+ if (do_resize_if_needed())
+ pos = find_ins_pos(PB_DS_V2F(r_val),
+ traits_base::m_store_extra_indicator);
+
+ _GLIBCXX_DEBUG_ASSERT(m_entries[pos].m_stat != valid_entry_status);
+
+ entry* const p_e = m_entries + pos;
+ new (&p_e->m_value) value_type(r_val);
+ p_e->m_stat = valid_entry_status;
+ resize_base::notify_inserted(++m_num_used_e);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return &p_e->m_value;
+ }
+
+ inline pointer
+ insert_new_imp(const_reference r_val, comp_hash& r_pos_hash_pair)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_entries[r_pos_hash_pair.first].m_stat !=
+ valid_entry_status);
+
+ if (do_resize_if_needed())
+ r_pos_hash_pair = find_ins_pos(PB_DS_V2F(r_val),
+ traits_base::m_store_extra_indicator);
+
+ _GLIBCXX_DEBUG_ASSERT(m_entries[r_pos_hash_pair.first].m_stat !=
+ valid_entry_status);
+
+ entry* const p_e = m_entries + r_pos_hash_pair.first;
+ new (&p_e->m_value) value_type(r_val);
+ p_e->m_hash = r_pos_hash_pair.second;
+ p_e->m_stat = valid_entry_status;
+
+ resize_base::notify_inserted(++m_num_used_e);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(p_e->m_value));)
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return &p_e->m_value;
+ }
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ inline mapped_reference
+ subscript_imp(const_key_reference key, false_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ const size_type pos = find_ins_pos(key,
+ traits_base::m_store_extra_indicator);
+
+ entry_pointer p_e = &m_entries[pos];
+ if (p_e->m_stat != valid_entry_status)
+ return insert_new_imp(value_type(key, mapped_type()), pos)->second;
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
+ return p_e->m_value.second;
+ }
+
+ inline mapped_reference
+ subscript_imp(const_key_reference key, true_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ comp_hash pos_hash_pair =
+ find_ins_pos(key, traits_base::m_store_extra_indicator);
+
+ if (m_entries[pos_hash_pair.first].m_stat != valid_entry_status)
+ return insert_new_imp(value_type(key, mapped_type()),
+ pos_hash_pair)->second;
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key));
+ return (m_entries + pos_hash_pair.first)->m_value.second;
+ }
+#endif
+
+ inline pointer
+ find_key_pointer(const_key_reference key, false_type)
+ {
+ const size_type hash = ranged_probe_fn_base::operator()(key);
+ size_type i;
+ resize_base::notify_find_search_start();
+
+ // Loop until entry is found or until all possible entries accessed.
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(key, hash, i);
+
+ entry* const p_e = m_entries + pos;
+ switch (p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_find_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
+
+ return NULL;
+ }
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), key))
+ {
+ resize_base::notify_find_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
+
+ return pointer(&p_e->m_value);
+ }
+ break;
+ case erased_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+
+ resize_base::notify_find_search_collision();
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
+ resize_base::notify_find_search_end();
+ return NULL;
+ }
+
+ inline pointer
+ find_key_pointer(const_key_reference key, true_type)
+ {
+ comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(key);
+ size_type i;
+ resize_base::notify_find_search_start();
+
+ // Loop until entry is found or until all possible entries accessed.
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos =
+ ranged_probe_fn_base::operator()(key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_entries + pos;
+
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_find_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
+
+ return NULL;
+ }
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value),
+ p_e->m_hash,
+ key, pos_hash_pair.second))
+ {
+ resize_base::notify_find_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(key);)
+ return pointer(&p_e->m_value);
+ }
+ break;
+ case erased_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+
+ resize_base::notify_find_search_collision();
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(key);)
+ resize_base::notify_find_search_end();
+ return NULL;
+ }
+
+ inline bool
+ erase_imp(const_key_reference, true_type);
+
+ inline bool
+ erase_imp(const_key_reference, false_type);
+
+ inline void
+ erase_entry(entry_pointer p_e);
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ void
+ inc_it_state(pointer& r_p_value, size_type& r_pos) const
+ { inc_it_state((const_mapped_pointer& )r_p_value, r_pos); }
+#endif
+
+ void
+ inc_it_state(const_pointer& r_p_value, size_type& r_pos) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(r_p_value != NULL);
+ for (++r_pos; r_pos < m_num_e; ++r_pos)
+ {
+ const_entry_pointer p_e =& m_entries[r_pos];
+ if (p_e->m_stat == valid_entry_status)
+ {
+ r_p_value =& p_e->m_value;
+ return;
+ }
+ }
+ r_p_value = NULL;
+ }
+
+ void
+ get_start_it_state(const_pointer& r_p_value, size_type& r_pos) const
+ {
+ for (r_pos = 0; r_pos < m_num_e; ++r_pos)
+ {
+ const_entry_pointer p_e = &m_entries[r_pos];
+ if (p_e->m_stat == valid_entry_status)
+ {
+ r_p_value = &p_e->m_value;
+ return;
+ }
+ }
+ r_p_value = NULL;
+ }
+
+ void
+ get_start_it_state(pointer& r_p_value, size_type& r_pos)
+ {
+ for (r_pos = 0; r_pos < m_num_e; ++r_pos)
+ {
+ entry_pointer p_e = &m_entries[r_pos];
+ if (p_e->m_stat == valid_entry_status)
+ {
+ r_p_value = &p_e->m_value;
+ return;
+ }
+ }
+ r_p_value = NULL;
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_entry_array_valid(const entry_array, false_type) const;
+
+ void
+ assert_entry_array_valid(const entry_array, true_type) const;
+#endif
+
+ static entry_allocator s_entry_allocator;
+ static iterator s_end_it;
+ static const_iterator s_const_end_it;
+
+ size_type m_num_e;
+ size_type m_num_used_e;
+ entry_pointer m_entries;
+
+ enum
+ {
+ store_hash_ok = !Store_Hash
+ || !is_same<Hash_Fn, __gnu_pbds::null_hash_fn>::value
+ };
+
+ PB_DS_STATIC_ASSERT(sth, store_hash_ok);
+ };
+
+#include <ext/pb_ds/detail/gp_hash_table_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_HASH_EQ_FN_C_DEC
+#undef PB_DS_RANGED_PROBE_FN_C_DEC
+#undef PB_DS_TYPES_TRAITS_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_V2F
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp
new file mode 100644
index 0000000..423a928
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s entire container info related
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{ return m_num_used_e; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return s_entry_allocator.max_size(); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return (size() == 0); }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp
new file mode 100644
index 0000000..101ce8c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions.
+ */
+
+#include <ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp>
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..3227a4a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_no_store_hash_fn_imps.hpp
@@ -0,0 +1,111 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s insert related functions,
+ * when the hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+find_ins_pos(const_key_reference r_key, false_type)
+{
+ size_type hash = ranged_probe_fn_base::operator()(r_key);
+ size_type i;
+
+ /* The insertion position is initted to a non-legal value to indicate
+ * that it has not been initted yet.
+ */
+ size_type ins_pos = m_num_e;
+ resize_base::notify_insert_search_start();
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
+ _GLIBCXX_DEBUG_ASSERT(pos < m_num_e);
+ entry* const p_e = m_entries + pos;
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_insert_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return (ins_pos == m_num_e) ? pos : ins_pos;
+ }
+ break;
+ case erased_entry_status:
+ if (ins_pos == m_num_e)
+ ins_pos = pos;
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), r_key))
+ {
+ resize_base::notify_insert_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return pos;
+ }
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+
+ resize_base::notify_insert_search_collision();
+ }
+ resize_base::notify_insert_search_end();
+ if (ins_pos == m_num_e)
+ __throw_insert_error();
+ return ins_pos;
+}
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_imp(const_reference r_val, false_type)
+{
+ const_key_reference r_key = PB_DS_V2F(r_val);
+ const size_type pos = find_ins_pos(r_key,
+ traits_base::m_store_extra_indicator);
+
+ if (m_entries[pos].m_stat == valid_entry_status)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return std::make_pair(&(m_entries + pos)->m_value, false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return std::make_pair(insert_new_imp(r_val, pos), true);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..f4310b6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/insert_store_hash_fn_imps.hpp
@@ -0,0 +1,118 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s find related functions,
+ * when the hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::comp_hash
+PB_DS_CLASS_C_DEC::
+find_ins_pos(const_key_reference r_key, true_type)
+{
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ comp_hash pos_hash_pair = ranged_probe_fn_base::operator()(r_key);
+
+ size_type i;
+
+ /* The insertion position is initted to a non-legal value to indicate
+ * that it has not been initted yet.
+ */
+ size_type ins_pos = m_num_e;
+ resize_base::notify_insert_search_start();
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, pos_hash_pair.second, i);
+
+ entry* const p_e = m_entries + pos;
+ switch(p_e->m_stat)
+ {
+ case empty_entry_status:
+ {
+ resize_base::notify_insert_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+
+ return ((ins_pos == m_num_e) ?
+ std::make_pair(pos, pos_hash_pair.second) :
+ std::make_pair(ins_pos, pos_hash_pair.second));
+ }
+ break;
+ case erased_entry_status:
+ if (ins_pos == m_num_e)
+ ins_pos = pos;
+ break;
+ case valid_entry_status:
+ if (hash_eq_fn_base::operator()(PB_DS_V2F(p_e->m_value), p_e->m_hash,
+ r_key, pos_hash_pair.second))
+ {
+ resize_base::notify_insert_search_end();
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return std::make_pair(pos, pos_hash_pair.second);
+ }
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ resize_base::notify_insert_search_collision();
+ }
+ resize_base::notify_insert_search_end();
+ if (ins_pos == m_num_e)
+ __throw_insert_error();
+ return std::make_pair(ins_pos, pos_hash_pair.second);
+}
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_imp(const_reference r_val, true_type)
+{
+ const_key_reference r_key = PB_DS_V2F(r_val);
+ comp_hash pos_hash_pair = find_ins_pos(r_key,
+ traits_base::m_store_extra_indicator);
+
+ _GLIBCXX_DEBUG_ASSERT(pos_hash_pair.first < m_num_e);
+ entry_pointer p_e =& m_entries[pos_hash_pair.first];
+ if (p_e->m_stat == valid_entry_status)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return std::make_pair(&p_e->m_value, false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return std::make_pair(insert_new_imp(r_val, pos_hash_pair), true);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp
new file mode 100644
index 0000000..ff1f80f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/iterator_fn_imps.hpp
@@ -0,0 +1,83 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterator_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s iterators related functions, e.g.,
+ * begin().
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::s_end_it;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::s_const_end_it;
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ pointer_ p_value;
+ size_type pos;
+ get_start_it_state(p_value, pos);
+ return iterator(p_value, pos, this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{ return s_end_it; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ const_pointer_ p_value;
+ size_type pos;
+ get_start_it_state(p_value, pos);
+ return const_iterator(p_value, pos, this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{ return s_const_end_it; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..b1a3f7a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s policy agpess
+ * functions.
+ */
+
+PB_DS_CLASS_T_DEC
+Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_hash_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Hash_Fn&
+PB_DS_CLASS_C_DEC::
+get_hash_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Eq_Fn&
+PB_DS_CLASS_C_DEC::
+get_eq_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Eq_Fn&
+PB_DS_CLASS_C_DEC::
+get_eq_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Probe_Fn&
+PB_DS_CLASS_C_DEC::
+get_probe_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Probe_Fn&
+PB_DS_CLASS_C_DEC::
+get_probe_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Comb_Probe_Fn&
+PB_DS_CLASS_C_DEC::
+get_comb_probe_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Comb_Probe_Fn&
+PB_DS_CLASS_C_DEC::
+get_comb_probe_fn() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Resize_Policy&
+PB_DS_CLASS_C_DEC::
+get_resize_policy()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Resize_Policy&
+PB_DS_CLASS_C_DEC::
+get_resize_policy() const
+{ return *this; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp
new file mode 100644
index 0000000..82a8ab0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp
@@ -0,0 +1,137 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+do_resize_if_needed()
+{
+ if (!resize_base::is_resize_needed())
+ return false;
+ resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+do_resize(size_type n)
+{ resize_imp(resize_base::get_nearest_larger_size(n)); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+do_resize_if_needed_no_throw()
+{
+ if (!resize_base::is_resize_needed())
+ return;
+
+ __try
+ {
+ resize_imp(resize_base::get_new_size(m_num_e, m_num_used_e));
+ }
+ __catch(...)
+ { }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+resize_imp(size_type new_size)
+{
+#ifdef PB_DS_REGRESSION
+ typename Allocator::group_throw_prob_adjustor adjust(m_num_e);
+#endif
+
+ if (new_size == m_num_e)
+ return;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const size_type old_size = m_num_e;
+ entry_array a_entries_resized = NULL;
+
+ // Following line might throw an exception.
+ a_entries_resized = s_entry_allocator.allocate(new_size);
+
+ ranged_probe_fn_base::notify_resized(new_size);
+ m_num_e = new_size;
+
+ for (size_type i = 0; i < m_num_e; ++i)
+ a_entries_resized[i].m_stat = empty_entry_status;
+
+ __try
+ {
+ resize_imp(a_entries_resized, old_size);
+ }
+ __catch(...)
+ {
+ erase_all_valid_entries(a_entries_resized, new_size);
+ m_num_e = old_size;
+ s_entry_allocator.deallocate(a_entries_resized, new_size);
+ ranged_probe_fn_base::notify_resized(old_size);
+ __throw_exception_again;
+ }
+
+ // At this point no exceptions can be thrown.
+ _GLIBCXX_DEBUG_ONLY(assert_entry_array_valid(a_entries_resized, traits_base::m_store_extra_indicator);)
+
+ Resize_Policy::notify_resized(new_size);
+ erase_all_valid_entries(m_entries, old_size);
+ s_entry_allocator.deallocate(m_entries, old_size);
+ m_entries = a_entries_resized;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+resize_imp(entry_array a_entries_resized, size_type old_size)
+{
+ for (size_type pos = 0; pos < old_size; ++pos)
+ if (m_entries[pos].m_stat == valid_entry_status)
+ resize_imp_reassign(m_entries + pos, a_entries_resized,
+ traits_base::m_store_extra_indicator);
+}
+
+#include <ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp>
+#include <ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp>
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..1d2839e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_no_store_hash_fn_imps.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_no_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions, when the
+ * hash value is not stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized,
+ false_type)
+{
+ const_key_reference r_key = PB_DS_V2F(p_e->m_value);
+ size_type hash = ranged_probe_fn_base::operator()(r_key);
+ size_type i;
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
+ entry_pointer p_new_e = a_entries_resized + pos;
+ switch(p_new_e->m_stat)
+ {
+ case empty_entry_status:
+ new (&p_new_e->m_value) value_type(p_e->m_value);
+ p_new_e->m_stat = valid_entry_status;
+ return;
+ case erased_entry_status:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ break;
+ case valid_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ }
+ __throw_insert_error();
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp
new file mode 100644
index 0000000..765e962
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/resize_store_hash_fn_imps.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file resize_store_hash_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s resize related functions, when the
+ * hash value is stored.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+resize_imp_reassign(entry_pointer p_e, entry_array a_entries_resized,
+ true_type)
+{
+ const_key_reference r_key = PB_DS_V2F(p_e->m_value);
+ size_type hash = ranged_probe_fn_base::operator()(r_key, p_e->m_hash);
+
+ size_type i;
+ for (i = 0; i < m_num_e; ++i)
+ {
+ const size_type pos = ranged_probe_fn_base::operator()(r_key, hash, i);
+ entry_pointer p_new_e = a_entries_resized + pos;
+ switch(p_new_e->m_stat)
+ {
+ case empty_entry_status:
+ new (&p_new_e->m_value) value_type(p_e->m_value);
+ p_new_e->m_hash = hash;
+ p_new_e->m_stat = valid_entry_status;
+ return;
+ case erased_entry_status:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ break;
+ case valid_entry_status:
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+ }
+ __throw_insert_error();
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp
new file mode 100644
index 0000000..479725f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file standard_policies.hpp
+ * Contains standard policies for gp_ht_map types.
+ */
+
+#ifndef PB_DS_GP_HT_MAP_STANDARD_POLICIES_HPP
+#define PB_DS_GP_HT_MAP_STANDARD_POLICIES_HPP
+
+#include <ext/pb_ds/detail/standard_policies.hpp>
+#include <ext/pb_ds/ht_load_check_resize_trigger.hpp>
+#include <ext/pb_ds/linear_probe_fn.hpp>
+#include <ext/pb_ds/quadratic_probe_fn.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Comb_Probe_Fn>
+ struct default_probe_fn
+ {
+ private:
+ typedef typename Comb_Probe_Fn::size_type size_type;
+
+ public:
+ typedef
+ typename __conditional_type<
+ is_same<
+ __gnu_pbds::direct_mask_range_hashing<size_t>,
+ Comb_Probe_Fn>::value,
+ __gnu_pbds::linear_probe_fn<size_type>,
+ __gnu_pbds::quadratic_probe_fn<size_type> >::__type
+ type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp
new file mode 100644
index 0000000..c3fe13c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains implementations of gp_ht_map_'s trace-mode functions.
+ */
+
+#ifdef PB_DS_HT_MAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << static_cast<unsigned long>(m_num_e) << " " <<
+ static_cast<unsigned long>(m_num_used_e) << std::endl;
+
+ for (size_type i = 0; i < m_num_e; ++i)
+ {
+ std::cerr << static_cast<unsigned long>(i) << " ";
+
+ switch(m_entries[i].m_stat)
+ {
+ case empty_entry_status:
+ std::cerr << "<empty>";
+ break;
+ case erased_entry_status:
+ std::cerr << "<erased>";
+ break;
+ case valid_entry_status:
+ std::cerr << PB_DS_V2F(m_entries[i].m_value);
+ break;
+ default:
+ _GLIBCXX_DEBUG_ASSERT(0);
+ };
+
+ std::cerr << std::endl;
+ }
+}
+
+#endif // #ifdef PB_DS_HT_MAP_TRACE_
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp
new file mode 100644
index 0000000..caf7848
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file direct_mask_range_hashing_imp.hpp
+ * Contains a range-hashing policy implementation
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{ mask_based_base::swap(other); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_resized(size_type size)
+{ mask_based_base::notify_resized(size); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+operator()(size_type hash) const
+{ return mask_based_base::range_hash(hash); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp
new file mode 100644
index 0000000..17d57b2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file direct_mod_range_hashing_imp.hpp
+ * Contains a range-hashing policy implementation
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{ mod_based_base::swap(other); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_resized(size_type n)
+{ mod_based_base::notify_resized(n); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+operator()(size_type hash) const
+{ return mod_based_base::range_hash(hash); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp
new file mode 100644
index 0000000..e7b2644
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file linear_probe_fn_imp.hpp
+ * Contains a probe policy implementation
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{ }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+operator()(size_type i) const
+{
+ return (i);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp
new file mode 100644
index 0000000..936abbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp
@@ -0,0 +1,107 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file mask_based_range_hashing.hpp
+ * Contains a range hashing policy base.
+ */
+
+#ifndef PB_DS_MASK_BASED_RANGE_HASHING_HPP
+#define PB_DS_MASK_BASED_RANGE_HASHING_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC mask_based_range_hashing<Size_Type>
+
+ template<typename Size_Type>
+ class mask_based_range_hashing
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ void
+ swap(mask_based_range_hashing& other)
+ { std::swap(m_mask, other.m_mask); }
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ range_hash(size_type hash) const
+ { return size_type(hash & m_mask); }
+
+ private:
+ size_type m_mask;
+ const static size_type s_num_bits_in_size_type;
+ const static size_type s_highest_bit_1;
+ };
+
+ PB_DS_CLASS_T_DEC
+ const typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::s_num_bits_in_size_type =
+ sizeof(typename PB_DS_CLASS_C_DEC::size_type) << 3;
+
+ PB_DS_CLASS_T_DEC
+ const typename PB_DS_CLASS_C_DEC::size_type PB_DS_CLASS_C_DEC::s_highest_bit_1 = static_cast<typename PB_DS_CLASS_C_DEC::size_type>(1) << (s_num_bits_in_size_type - 1);
+
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ size_type i = 0;
+ while (size ^ s_highest_bit_1)
+ {
+ size <<= 1;
+ ++i;
+ }
+
+ m_mask = 1;
+ i += 2;
+ while (i++ < s_num_bits_in_size_type)
+ m_mask = (m_mask << 1) ^ 1;
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp
new file mode 100644
index 0000000..2610e04
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file mod_based_range_hashing.hpp
+ * Contains a range hashing policy base.
+ */
+
+#ifndef PB_DS_MOD_BASED_RANGE_HASHING_HPP
+#define PB_DS_MOD_BASED_RANGE_HASHING_HPP
+
+namespace __gnu_pbds
+{
+
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Size_Type>
+
+#define PB_DS_CLASS_C_DEC \
+ mod_based_range_hashing< \
+ Size_Type>
+
+ template<typename Size_Type>
+ class mod_based_range_hashing
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ void
+ notify_resized(size_type size);
+
+ inline size_type
+ range_hash(size_type hash) const;
+
+ private:
+ size_type m_size;
+ };
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ std::swap(m_size, other.m_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ {
+ m_size = size;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ range_hash(size_type hash) const
+ {
+ return (hash % m_size);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_MOD_BASED_RANGE_HASHING_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp
new file mode 100644
index 0000000..970cfc1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file probe_fn_base.hpp
+ * Contains a probe policy base.
+ */
+
+#ifndef PB_DS_PROBE_FN_BASE_HPP
+#define PB_DS_PROBE_FN_BASE_HPP
+
+#include <functional>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Allocator>
+ class probe_fn_base
+ {
+ protected:
+ ~probe_fn_base() { }
+ };
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp
new file mode 100644
index 0000000..4c7a6c4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file quadratic_probe_fn_imp.hpp
+ * Contains a probe policy implementation
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{ }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+operator()(size_type i) const
+{
+ return (i* i);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp
new file mode 100644
index 0000000..2489927
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp
@@ -0,0 +1,359 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file ranged_hash_fn.hpp
+ * Contains a unified ranged hash functor, allowing the hash tables
+ * to deal with a single class for ranged hashing.
+ */
+
+#ifndef PB_DS_RANGED_HASH_FN_HPP
+#define PB_DS_RANGED_HASH_FN_HPP
+
+#include <ext/pb_ds/detail/basic_types.hpp>
+#include <utility>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Hash_Fn, bool Store_Hash>
+ class ranged_hash_fn;
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Hash_Fn, typename Allocator, \
+ typename Comb_Hash_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_hash_fn<Key, Hash_Fn, Allocator, Comb_Hash_Fn, false>
+
+ /**
+ * Specialization 1
+ * The client supplies a hash function and a ranged hash function,
+ * and requests that hash values not be stored.
+ **/
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Hash_Fn>
+ class ranged_hash_fn< Key, Hash_Fn, Allocator, Comb_Hash_Fn, false>
+ : public Hash_Fn, public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef Hash_Fn hash_fn_base;
+ typedef Comb_Hash_Fn comb_hash_fn_base;
+ typedef typename Allocator::template rebind< Key>::other key_allocator;
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ ranged_hash_fn(size_type);
+
+ ranged_hash_fn(size_type, const Hash_Fn&);
+
+ ranged_hash_fn(size_type, const Hash_Fn&, const Comb_Hash_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ void
+ notify_resized(size_type);
+
+ inline size_type
+ operator()(const_key_reference) const;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn)
+ : Hash_Fn(r_hash_fn)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn)
+ : Hash_Fn(r_hash_fn), Comb_Hash_Fn(r_comb_hash_fn)
+ { comb_hash_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ comb_hash_fn_base::swap(other);
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )other);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ { comb_hash_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ { return (comb_hash_fn_base::operator()(hash_fn_base::operator()(r_key)));}
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Hash_Fn, typename Allocator, \
+ typename Comb_Hash_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_hash_fn<Key,Hash_Fn, Allocator, Comb_Hash_Fn, true>
+
+ /**
+ * Specialization 2
+ * The client supplies a hash function and a ranged hash function,
+ * and requests that hash values be stored.
+ **/
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Hash_Fn>
+ class ranged_hash_fn<Key, Hash_Fn, Allocator, Comb_Hash_Fn, true>
+ : public Hash_Fn, public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef std::pair<size_type, size_type> comp_hash;
+ typedef Hash_Fn hash_fn_base;
+ typedef Comb_Hash_Fn comb_hash_fn_base;
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ ranged_hash_fn(size_type);
+
+ ranged_hash_fn(size_type, const Hash_Fn&);
+
+ ranged_hash_fn(size_type, const Hash_Fn&, const Comb_Hash_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ void
+ notify_resized(size_type);
+
+ inline comp_hash
+ operator()(const_key_reference) const;
+
+ inline comp_hash
+ operator()(const_key_reference, size_type) const;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn) :
+ Hash_Fn(r_hash_fn)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn)
+ : Hash_Fn(r_hash_fn), Comb_Hash_Fn(r_comb_hash_fn)
+ { comb_hash_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ comb_hash_fn_base::swap(other);
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )other);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ { comb_hash_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::comp_hash
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ const size_type hash = hash_fn_base::operator()(r_key);
+ return std::make_pair(comb_hash_fn_base::operator()(hash), hash);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::comp_hash
+ PB_DS_CLASS_C_DEC::
+ operator()
+#ifdef _GLIBCXX_DEBUG
+ (const_key_reference r_key, size_type hash) const
+#else
+ (const_key_reference /*r_key*/, size_type hash) const
+#endif
+ {
+ _GLIBCXX_DEBUG_ASSERT(hash == hash_fn_base::operator()(r_key));
+ return std::make_pair(comb_hash_fn_base::operator()(hash), hash);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Allocator, typename Comb_Hash_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_hash_fn<Key, null_hash_fn, Allocator, Comb_Hash_Fn, false>
+
+ /**
+ * Specialization 3
+ * The client does not supply a hash function (by specifying
+ * null_hash_fn as the Hash_Fn parameter), and requests that hash
+ * values not be stored.
+ **/
+ template<typename Key, typename Allocator, typename Comb_Hash_Fn>
+ class ranged_hash_fn<Key, null_hash_fn, Allocator, Comb_Hash_Fn, false>
+ : public null_hash_fn, public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef Comb_Hash_Fn comb_hash_fn_base;
+
+ ranged_hash_fn(size_type);
+
+ ranged_hash_fn(size_type, const Comb_Hash_Fn&);
+
+ ranged_hash_fn(size_type, const null_hash_fn&, const Comb_Hash_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn) :
+ Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const null_hash_fn& r_null_hash_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn)
+ : Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ { comb_hash_fn_base::swap(other); }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Allocator, typename Comb_Hash_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_hash_fn<Key, null_hash_fn, Allocator, Comb_Hash_Fn, true>
+
+ /**
+ * Specialization 4
+ * The client does not supply a hash function (by specifying
+ * null_hash_fn as the Hash_Fn parameter), and requests that hash
+ * values be stored.
+ **/
+ template<typename Key, typename Allocator, typename Comb_Hash_Fn>
+ class ranged_hash_fn<Key, null_hash_fn, Allocator, Comb_Hash_Fn, true>
+ : public null_hash_fn, public Comb_Hash_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef Comb_Hash_Fn comb_hash_fn_base;
+
+ ranged_hash_fn(size_type);
+
+ ranged_hash_fn(size_type, const Comb_Hash_Fn&);
+
+ ranged_hash_fn(size_type, const null_hash_fn&, const Comb_Hash_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size)
+ { Comb_Hash_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const Comb_Hash_Fn& r_comb_hash_fn)
+ : Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_hash_fn(size_type size, const null_hash_fn& r_null_hash_fn,
+ const Comb_Hash_Fn& r_comb_hash_fn)
+ : Comb_Hash_Fn(r_comb_hash_fn)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ { comb_hash_fn_base::swap(other); }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp
new file mode 100644
index 0000000..ddfba9d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp
@@ -0,0 +1,327 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file ranged_probe_fn.hpp
+ * Contains a unified ranged probe functor, allowing the probe tables to deal with
+ * a single class for ranged probeing.
+ */
+
+#ifndef PB_DS_RANGED_PROBE_FN_HPP
+#define PB_DS_RANGED_PROBE_FN_HPP
+
+#include <ext/pb_ds/detail/basic_types.hpp>
+#include <utility>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Probe_Fn, typename Probe_Fn, bool Store_Hash>
+ class ranged_probe_fn;
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Hash_Fn, typename Allocator, \
+ typename Comb_Probe_Fn, typename Probe_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_probe_fn<Key, Hash_Fn, Allocator, Comb_Probe_Fn, Probe_Fn, false>
+
+ /**
+ * Specialization 1
+ * The client supplies a probe function and a ranged probe
+ * function, and requests that hash values not be stored.
+ **/
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Probe_Fn, typename Probe_Fn>
+ class ranged_probe_fn<Key, Hash_Fn, Allocator, Comb_Probe_Fn,
+ Probe_Fn, false>
+ : public Hash_Fn, public Comb_Probe_Fn, public Probe_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef Comb_Probe_Fn comb_probe_fn_base;
+ typedef Hash_Fn hash_fn_base;
+ typedef Probe_Fn probe_fn_base;
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ ranged_probe_fn(size_type);
+
+ ranged_probe_fn(size_type, const Hash_Fn&);
+
+ ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&);
+
+ ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&,
+ const Probe_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ void
+ notify_resized(size_type);
+
+ inline size_type
+ operator()(const_key_reference) const;
+
+ inline size_type
+ operator()(const_key_reference, size_type, size_type) const;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size)
+ { Comb_Probe_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn)
+ : Hash_Fn(r_hash_fn)
+ { Comb_Probe_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn)
+ : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn,
+ const Probe_Fn& r_probe_fn)
+ : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn), Probe_Fn(r_probe_fn)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ comb_probe_fn_base::swap(other);
+ std::swap((Hash_Fn& )(*this), (Hash_Fn&)other);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ { return comb_probe_fn_base::operator()(hash_fn_base::operator()(r_key)); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference, size_type hash, size_type i) const
+ {
+ return comb_probe_fn_base::operator()(hash + probe_fn_base::operator()(i));
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Hash_Fn, typename Allocator, \
+ typename Comb_Probe_Fn, typename Probe_Fn>
+
+#define PB_DS_CLASS_C_DEC \
+ ranged_probe_fn<Key, Hash_Fn, Allocator, Comb_Probe_Fn, Probe_Fn, true>
+
+ /**
+ * Specialization 2- The client supplies a probe function and a ranged
+ * probe function, and requests that hash values not be stored.
+ **/
+ template<typename Key, typename Hash_Fn, typename Allocator,
+ typename Comb_Probe_Fn, typename Probe_Fn>
+ class ranged_probe_fn<Key, Hash_Fn, Allocator, Comb_Probe_Fn,
+ Probe_Fn, true>
+ : public Hash_Fn, public Comb_Probe_Fn, public Probe_Fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef std::pair<size_type, size_type> comp_hash;
+ typedef Comb_Probe_Fn comb_probe_fn_base;
+ typedef Hash_Fn hash_fn_base;
+ typedef Probe_Fn probe_fn_base;
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ ranged_probe_fn(size_type);
+
+ ranged_probe_fn(size_type, const Hash_Fn&);
+
+ ranged_probe_fn(size_type, const Hash_Fn&,
+ const Comb_Probe_Fn&);
+
+ ranged_probe_fn(size_type, const Hash_Fn&, const Comb_Probe_Fn&,
+ const Probe_Fn&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ void
+ notify_resized(size_type);
+
+ inline comp_hash
+ operator()(const_key_reference) const;
+
+ inline size_type
+ operator()(const_key_reference, size_type, size_type) const;
+
+ inline size_type
+ operator()(const_key_reference, size_type) const;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size)
+ { Comb_Probe_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn)
+ : Hash_Fn(r_hash_fn)
+ { Comb_Probe_Fn::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn)
+ : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ranged_probe_fn(size_type size, const Hash_Fn& r_hash_fn,
+ const Comb_Probe_Fn& r_comb_probe_fn,
+ const Probe_Fn& r_probe_fn)
+ : Hash_Fn(r_hash_fn), Comb_Probe_Fn(r_comb_probe_fn), Probe_Fn(r_probe_fn)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ comb_probe_fn_base::swap(other);
+ std::swap((Hash_Fn& )(*this), (Hash_Fn& )other);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ notify_resized(size_type size)
+ { comb_probe_fn_base::notify_resized(size); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::comp_hash
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference r_key) const
+ {
+ const size_type hash = hash_fn_base::operator()(r_key);
+ return std::make_pair(comb_probe_fn_base::operator()(hash), hash);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ operator()(const_key_reference, size_type hash, size_type i) const
+ {
+ return comb_probe_fn_base::operator()(hash + probe_fn_base::operator()(i));
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ operator()
+#ifdef _GLIBCXX_DEBUG
+ (const_key_reference r_key, size_type hash) const
+#else
+ (const_key_reference /*r_key*/, size_type hash) const
+#endif
+ {
+ _GLIBCXX_DEBUG_ASSERT(hash == hash_fn_base::operator()(r_key));
+ return hash;
+ }
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ /**
+ * Specialization 3 and 4
+ * The client does not supply a hash function or probe function,
+ * and requests that hash values not be stored.
+ **/
+ template<typename Key, typename Allocator, typename Comb_Probe_Fn>
+ class ranged_probe_fn<Key, null_hash_fn, Allocator, Comb_Probe_Fn,
+ null_probe_fn, false>
+ : public Comb_Probe_Fn, public null_hash_fn, public null_probe_fn
+ {
+ protected:
+ typedef typename Allocator::size_type size_type;
+ typedef Comb_Probe_Fn comb_probe_fn_base;
+ typedef typename Allocator::template rebind<Key>::other key_allocator;
+ typedef typename key_allocator::const_reference const_key_reference;
+
+ ranged_probe_fn(size_type size)
+ { Comb_Probe_Fn::notify_resized(size); }
+
+ ranged_probe_fn(size_type, const Comb_Probe_Fn& r_comb_probe_fn)
+ : Comb_Probe_Fn(r_comb_probe_fn)
+ { }
+
+ ranged_probe_fn(size_type, const null_hash_fn&,
+ const Comb_Probe_Fn& r_comb_probe_fn,
+ const null_probe_fn&)
+ : Comb_Probe_Fn(r_comb_probe_fn)
+ { }
+
+ void
+ swap(ranged_probe_fn& other)
+ { comb_probe_fn_base::swap(other); }
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp
new file mode 100644
index 0000000..dad6451
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_probe_fn.hpp
+ * Contains a sample probe policy.
+ */
+
+#ifndef PB_DS_SAMPLE_PROBE_FN_HPP
+#define PB_DS_SAMPLE_PROBE_FN_HPP
+
+// A sample probe policy.
+class sample_probe_fn
+{
+
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+public:
+
+ // Default constructor.
+ sample_probe_fn();
+
+ // Copy constructor.
+ sample_probe_fn(const sample_probe_fn& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_probe_fn& other);
+
+protected:
+
+ // Returns the i-th offset from the hash value of some key r_key.
+ inline size_type
+ operator()(const_key_reference r_key, size_type i) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_PROBE_FN_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp
new file mode 100644
index 0000000..0912e7f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_range_hashing.hpp
+ * Contains a range hashing policy.
+ */
+
+#ifndef PB_DS_SAMPLE_RANGE_HASHING_HPP
+#define PB_DS_SAMPLE_RANGE_HASHING_HPP
+
+// A sample range-hashing functor.
+class sample_range_hashing
+{
+
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+public:
+
+ // Default constructor.
+ sample_range_hashing();
+
+ // Copy constructor.
+ sample_range_hashing(const sample_range_hashing& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_range_hashing& other);
+
+protected:
+
+ // Notifies the policy object that the container's __size has changed to size.
+ void
+ notify_resized(size_type size);
+
+ // Transforms the __hash value hash into a ranged-hash value.
+ inline size_type
+ operator()(size_type hash) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_RANGE_HASHING_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp
new file mode 100644
index 0000000..6120231
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_ranged_hash_fn.hpp
+ * Contains a ranged hash policy.
+ */
+
+#ifndef PB_DS_SAMPLE_RANGED_HASH_FN_HPP
+#define PB_DS_SAMPLE_RANGED_HASH_FN_HPP
+
+// A sample ranged-hash functor.
+class sample_ranged_hash_fn
+{
+
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+public:
+
+ // Default constructor.
+ sample_ranged_hash_fn();
+
+ // Copy constructor.
+ sample_ranged_hash_fn(const sample_ranged_hash_fn& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_ranged_hash_fn& other);
+
+protected:
+
+ // Notifies the policy object that the container's __size has changed to size.
+ void
+ notify_resized(size_type size);
+
+ // Transforms r_key into a position within the table.
+ inline size_type
+ operator()(const_key_reference r_key) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_RANGED_HASH_FN_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp
new file mode 100644
index 0000000..915f108
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp
@@ -0,0 +1,77 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_ranged_probe_fn.hpp
+ * Contains a ranged probe policy.
+ */
+
+#ifndef PB_DS_SAMPLE_RANGED_PROBE_FN_HPP
+#define PB_DS_SAMPLE_RANGED_PROBE_FN_HPP
+
+// A sample ranged-probe functor.
+class sample_ranged_probe_fn
+{
+
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+public:
+
+ // Default constructor.
+ sample_ranged_probe_fn();
+
+ // Copy constructor.
+ sample_ranged_probe_fn(const sample_ranged_probe_fn& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_ranged_probe_fn& other);
+
+protected:
+
+ // Notifies the policy object that the container's __size has changed to size.
+ void
+ notify_resized(size_type size);
+
+ // Transforms the const key reference r_key into the i-th position within the table. This method is called for each collision within the probe sequence.
+ inline size_type
+ operator()(const_key_reference r_key, size_t hash, size_type i) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_RANGED_PROBE_FN_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp
new file mode 100644
index 0000000..5955df1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp
@@ -0,0 +1,162 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_iterator.hpp
+ * Contains an iterator class returned by the table's const find and insert
+ * methods.
+ */
+
+#ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_ITERATOR_HPP
+#define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_ITERATOR_HPP
+
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_C_DEC \
+ left_child_next_sibling_heap_const_iterator_<Node, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_node_const_point_iterator_<Node, Allocator>
+
+ // Const point-type iterator.
+ template<typename Node, class Allocator>
+ class left_child_next_sibling_heap_const_iterator_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef typename PB_DS_BASE_C_DEC::node_pointer node_pointer;
+
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+
+ // Category.
+ typedef std::forward_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef typename Allocator::difference_type difference_type;
+
+ // Iterator's value type.
+ typedef typename base_type::value_type value_type;
+
+ // Iterator's pointer type.
+ typedef typename base_type::pointer pointer;
+
+ // Iterator's const pointer type.
+ typedef typename base_type::const_pointer const_pointer;
+
+ // Iterator's reference type.
+ typedef typename base_type::reference reference;
+
+ // Iterator's const reference type.
+ typedef typename base_type::const_reference const_reference;
+
+ public:
+
+ inline
+ left_child_next_sibling_heap_const_iterator_(node_pointer p_nd) : base_type(p_nd)
+ { }
+
+ // Default constructor.
+ inline
+ left_child_next_sibling_heap_const_iterator_()
+ { }
+
+ // Copy constructor.
+ inline
+ left_child_next_sibling_heap_const_iterator_(const PB_DS_CLASS_C_DEC& other) : base_type(other)
+ { }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const PB_DS_CLASS_C_DEC& other) const
+ { return (base_type::m_p_nd == other.m_p_nd); }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const PB_DS_CLASS_C_DEC& other) const
+ { return (base_type::m_p_nd != other.m_p_nd); }
+
+ inline PB_DS_CLASS_C_DEC&
+ operator++()
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_nd != NULL);
+ inc();
+ return (*this);
+ }
+
+ inline PB_DS_CLASS_C_DEC
+ operator++(int)
+ {
+ PB_DS_CLASS_C_DEC ret_it(base_type::m_p_nd);
+ operator++();
+ return (ret_it);
+ }
+
+ private:
+ void
+ inc()
+ {
+ if (base_type::m_p_nd->m_p_next_sibling != NULL)
+ {
+ base_type::m_p_nd = base_type::m_p_nd->m_p_next_sibling;
+ while (base_type::m_p_nd->m_p_l_child != NULL)
+ base_type::m_p_nd = base_type::m_p_nd->m_p_l_child;
+ return;
+ }
+
+ while (true)
+ {
+ node_pointer p_next = base_type::m_p_nd;
+ base_type::m_p_nd = base_type::m_p_nd->m_p_prev_or_parent;
+ if (base_type::m_p_nd == NULL || base_type::m_p_nd->m_p_l_child == p_next)
+ return;
+ }
+ }
+ };
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp
new file mode 100644
index 0000000..7d68252
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp
@@ -0,0 +1,154 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_point_iterator.hpp
+ * Contains an iterator class returned by the table's const find and insert
+ * methods.
+ */
+
+#ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP
+#define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_CONST_FIND_ITERATOR_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Node, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ left_child_next_sibling_heap_node_const_point_iterator_<Node, Allocator>
+
+ // Const point-type iterator.
+ template<typename Node, class Allocator>
+ class left_child_next_sibling_heap_node_const_point_iterator_
+ {
+
+ protected:
+ typedef typename Allocator::template rebind<Node>::other::pointer node_pointer;
+
+ public:
+
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // Iterator's value type.
+ typedef typename Node::value_type value_type;
+
+ // Iterator's pointer type.
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ // Iterator's const pointer type.
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ // Iterator's reference type.
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ // Iterator's const reference type.
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ public:
+
+ inline
+ left_child_next_sibling_heap_node_const_point_iterator_(node_pointer p_nd) : m_p_nd(p_nd)
+ { }
+
+ // Default constructor.
+ inline
+ left_child_next_sibling_heap_node_const_point_iterator_() : m_p_nd(NULL)
+ { }
+
+ // Copy constructor.
+ inline
+ left_child_next_sibling_heap_node_const_point_iterator_(const PB_DS_CLASS_C_DEC& other) : m_p_nd(other.m_p_nd)
+ { }
+
+ // Access.
+ inline const_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
+ return &m_p_nd->m_value;
+ }
+
+ // Access.
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd != NULL);
+ return m_p_nd->m_value;
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const PB_DS_CLASS_C_DEC& other) const
+ { return m_p_nd == other.m_p_nd; }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const PB_DS_CLASS_C_DEC& other) const
+ { return m_p_nd != other.m_p_nd; }
+
+ public:
+ node_pointer m_p_nd;
+ };
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..ea05725
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_allocator
+PB_DS_CLASS_C_DEC::s_node_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::no_throw_copies_t
+PB_DS_CLASS_C_DEC::s_no_throw_copies_ind;
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+left_child_next_sibling_heap_() :
+ m_p_root(NULL),
+ m_size(0)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+left_child_next_sibling_heap_(const Cmp_Fn& r_cmp_fn) :
+ Cmp_Fn(r_cmp_fn),
+ m_p_root(NULL),
+ m_size(0)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+left_child_next_sibling_heap_(const PB_DS_CLASS_C_DEC& other)
+: Cmp_Fn(other), m_p_root(NULL), m_size(0)
+{
+ m_size = other.m_size;
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ m_p_root = recursive_copy_node(other.m_p_root);
+ m_size = other.m_size;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ value_swap(other);
+ std::swap((Cmp_Fn& )(*this), (Cmp_Fn& )other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+value_swap(PB_DS_CLASS_C_DEC& other)
+{
+ std::swap(m_p_root, other.m_p_root);
+ std::swap(m_size, other.m_size);
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~left_child_next_sibling_heap_()
+{
+ clear();
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+recursive_copy_node(const_node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return (NULL);
+
+ node_pointer p_ret = s_node_allocator.allocate(1);
+
+ __try
+ {
+ new (p_ret) node(*p_nd);
+ }
+ __catch(...)
+ {
+ s_node_allocator.deallocate(p_ret, 1);
+ __throw_exception_again;
+ }
+
+ p_ret->m_p_l_child = p_ret->m_p_next_sibling =
+ p_ret->m_p_prev_or_parent = NULL;
+
+ __try
+ {
+ p_ret->m_p_l_child = recursive_copy_node(p_nd->m_p_l_child);
+ p_ret->m_p_next_sibling = recursive_copy_node(p_nd->m_p_next_sibling);
+ }
+ __catch(...)
+ {
+ clear_imp(p_ret);
+ __throw_exception_again;
+ }
+
+ if (p_ret->m_p_l_child != NULL)
+ p_ret->m_p_l_child->m_p_prev_or_parent = p_ret;
+
+ if (p_ret->m_p_next_sibling != NULL)
+ p_ret->m_p_next_sibling->m_p_prev_or_parent =
+ p_nd->m_p_next_sibling->m_p_prev_or_parent == p_nd ? p_ret : NULL;
+
+ return p_ret;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..86871ac
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp
@@ -0,0 +1,141 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ _GLIBCXX_DEBUG_ASSERT(m_p_root == NULL || m_p_root->m_p_prev_or_parent == NULL);
+
+ if (m_p_root != NULL)
+ assert_node_consistent(m_p_root, Single_Link_Roots);
+ assert_size();
+ assert_iterators();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent(const_node_pointer p_nd, bool single_link) const
+{
+ if (p_nd == NULL)
+ return;
+
+ assert_node_consistent(p_nd->m_p_l_child, false);
+ assert_node_consistent(p_nd->m_p_next_sibling, single_link);
+
+ if (single_link)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_prev_or_parent == NULL);
+ else if (p_nd->m_p_next_sibling != NULL)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_next_sibling->m_p_prev_or_parent == p_nd);
+
+ if (p_nd->m_p_l_child == NULL)
+ return;
+
+ const_node_pointer p_child = p_nd->m_p_l_child;
+ while (p_child != NULL)
+ {
+ const_node_pointer p_next_child = p_child->m_p_next_sibling;
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(p_nd->m_value, p_child->m_value));
+ p_child = p_next_child;
+ }
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_l_child->m_p_prev_or_parent == p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_iterators() const
+{
+ const size_type calc_size = std::distance(begin(), end());
+ if (calc_size == size())
+ return;
+ _GLIBCXX_DEBUG_ASSERT(0);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_size() const
+{
+ if (size_from_node(m_p_root) == m_size)
+ return;
+ _GLIBCXX_DEBUG_ASSERT(0);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size_under_node(const_node_pointer p_nd)
+{ return 1 + size_from_node(p_nd->m_p_l_child); }
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size_from_node(const_node_pointer p_nd)
+{
+ size_type ret = 0;
+ while (p_nd != NULL)
+ {
+ ret += 1 + size_from_node(p_nd->m_p_l_child);
+ p_nd = p_nd->m_p_next_sibling;
+ }
+ return ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+degree(const_node_pointer p_nd)
+{
+ size_type ret = 0;
+ const_node_pointer p_child = p_nd->m_p_l_child;
+ while (p_child != NULL)
+ {
+ ++ret;
+ p_child = p_child->m_p_next_sibling;
+ }
+ return ret;
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp
new file mode 100644
index 0000000..9fa09f4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ clear_imp(m_p_root);
+ _GLIBCXX_DEBUG_ASSERT(m_size == 0);
+ m_p_root = NULL;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+actual_erase_node(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+ p_nd->~node();
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ while (p_nd != NULL)
+ {
+ clear_imp(p_nd->m_p_l_child);
+ node_pointer p_next = p_nd->m_p_next_sibling;
+ actual_erase_node(p_nd);
+ p_nd = p_next;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+to_linked_list()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ node_pointer p_cur = m_p_root;
+ while (p_cur != NULL)
+ if (p_cur->m_p_l_child != NULL)
+ {
+ node_pointer p_child_next = p_cur->m_p_l_child->m_p_next_sibling;
+ p_cur->m_p_l_child->m_p_next_sibling = p_cur->m_p_next_sibling;
+ p_cur->m_p_next_sibling = p_cur->m_p_l_child;
+ p_cur->m_p_l_child = p_child_next;
+ }
+ else
+ p_cur = p_cur->m_p_next_sibling;
+
+#ifdef _GLIBCXX_DEBUG
+ const_node_pointer p_counter = m_p_root;
+ size_type count = 0;
+ while (p_counter != NULL)
+ {
+ ++count;
+ _GLIBCXX_DEBUG_ASSERT(p_counter->m_p_l_child == NULL);
+ p_counter = p_counter->m_p_next_sibling;
+ }
+ _GLIBCXX_DEBUG_ASSERT(count == m_size);
+#endif
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+prune(Pred pred)
+{
+ node_pointer p_cur = m_p_root;
+ m_p_root = NULL;
+ node_pointer p_out = NULL;
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+ if (pred(p_cur->m_value))
+ {
+ p_cur->m_p_next_sibling = p_out;
+ if (p_out != NULL)
+ p_out->m_p_prev_or_parent = p_cur;
+ p_out = p_cur;
+ }
+ else
+ {
+ p_cur->m_p_next_sibling = m_p_root;
+ if (m_p_root != NULL)
+ m_p_root->m_p_prev_or_parent = p_cur;
+ m_p_root = p_cur;
+ }
+ p_cur = p_next;
+ }
+ return p_out;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+bubble_to_top(node_pointer p_nd)
+{
+ node_pointer p_parent = parent(p_nd);
+ while (p_parent != NULL)
+ {
+ swap_with_parent(p_nd, p_parent);
+ p_parent = parent(p_nd);
+ }
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp
new file mode 100644
index 0000000..75e6561
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp
@@ -0,0 +1,64 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{
+ return (m_size == 0);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{
+ return (m_size);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{
+ return (s_node_allocator.max_size());
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp
new file mode 100644
index 0000000..926ccd3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp
@@ -0,0 +1,175 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+get_new_node_for_insert(const_reference r_val)
+{
+ return get_new_node_for_insert(r_val, s_no_throw_copies_ind);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+get_new_node_for_insert(const_reference r_val, false_type)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ cond_dealtor_t cond(p_new_nd);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename node::value_type(r_val);
+
+ cond.set_no_action();
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+get_new_node_for_insert(const_reference r_val, true_type)
+{
+ node_pointer p_new_nd = s_node_allocator.allocate(1);
+
+ new (const_cast<void* >(
+ static_cast<const void* >(&p_new_nd->m_value)))
+ typename node::value_type(r_val);
+
+ ++m_size;
+
+ return (p_new_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+make_child_of(node_pointer p_nd, node_pointer p_new_parent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_new_parent != NULL);
+
+ p_nd->m_p_next_sibling = p_new_parent->m_p_l_child;
+
+ if (p_new_parent->m_p_l_child != NULL)
+ p_new_parent->m_p_l_child->m_p_prev_or_parent = p_nd;
+
+ p_nd->m_p_prev_or_parent = p_new_parent;
+
+ p_new_parent->m_p_l_child = p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+parent(node_pointer p_nd)
+{
+ while (true)
+ {
+ node_pointer p_pot = p_nd->m_p_prev_or_parent;
+
+ if (p_pot == NULL || p_pot->m_p_l_child == p_nd)
+ return p_pot;
+
+ p_nd = p_pot;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap_with_parent(node_pointer p_nd, node_pointer p_parent)
+{
+ if (p_parent == m_p_root)
+ m_p_root = p_nd;
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_parent != NULL);
+ _GLIBCXX_DEBUG_ASSERT(parent(p_nd) == p_parent);
+
+ const bool nd_direct_child = p_parent->m_p_l_child == p_nd;
+ const bool parent_root = p_parent->m_p_prev_or_parent == NULL;
+ const bool parent_direct_child =
+ !parent_root&& p_parent->m_p_prev_or_parent->m_p_l_child == p_parent;
+
+ std::swap(p_parent->m_p_prev_or_parent, p_nd->m_p_prev_or_parent);
+ std::swap(p_parent->m_p_next_sibling, p_nd->m_p_next_sibling);
+ std::swap(p_parent->m_p_l_child, p_nd->m_p_l_child);
+ std::swap(p_parent->m_metadata, p_nd->m_metadata);
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_l_child != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_prev_or_parent != NULL);
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd;
+
+ if (p_parent->m_p_next_sibling != NULL)
+ p_parent->m_p_next_sibling->m_p_prev_or_parent = p_parent;
+
+ if (p_parent->m_p_l_child != NULL)
+ p_parent->m_p_l_child->m_p_prev_or_parent = p_parent;
+
+ if (parent_direct_child)
+ p_nd->m_p_prev_or_parent->m_p_l_child = p_nd;
+ else if (!parent_root)
+ p_nd->m_p_prev_or_parent->m_p_next_sibling = p_nd;
+
+ if (!nd_direct_child)
+ {
+ p_nd->m_p_l_child->m_p_prev_or_parent = p_nd;
+
+ p_parent->m_p_prev_or_parent->m_p_next_sibling = p_parent;
+ }
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_l_child == p_nd);
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_prev_or_parent == p_parent);
+
+ p_nd->m_p_l_child = p_parent;
+ p_parent->m_p_prev_or_parent = p_nd;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(parent(p_parent) == p_nd);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..dca70fd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ node_pointer p_nd = m_p_root;
+
+ if (p_nd == NULL)
+ return (iterator(NULL));
+
+ while (p_nd->m_p_l_child != NULL)
+ p_nd = p_nd->m_p_l_child;
+
+ return (iterator(p_nd));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ node_pointer p_nd = m_p_root;
+
+ if (p_nd == NULL)
+ return (const_iterator(NULL));
+
+ while (p_nd->m_p_l_child != NULL)
+ p_nd = p_nd->m_p_l_child;
+
+ return (const_iterator(p_nd));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{
+ return (iterator(NULL));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{
+ return (const_iterator(NULL));
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
new file mode 100644
index 0000000..34ad4be
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp
@@ -0,0 +1,349 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file left_child_next_sibling_heap_.hpp
+ * Contains an implementation class for a basic heap.
+ */
+
+#ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_HPP
+#define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_HPP
+
+/*
+ * Based on CLRS.
+ */
+
+#include <iterator>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/const_point_iterator.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/const_iterator.hpp>
+#ifdef PB_DS_LC_NS_HEAP_TRACE_
+#include <iostream>
+#endif
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_CLASS_T_DEC \
+ template< \
+ typename Value_Type, \
+ class Cmp_Fn, \
+ typename Node_Metadata, \
+ class Allocator, \
+ bool Single_Link_Roots>
+#else
+#define PB_DS_CLASS_T_DEC \
+ template< \
+ typename Value_Type, \
+ class Cmp_Fn, \
+ typename Node_Metadata, \
+ class Allocator>
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_CLASS_C_DEC \
+ left_child_next_sibling_heap_< \
+ Value_Type, \
+ Cmp_Fn, \
+ Node_Metadata, \
+ Allocator, \
+ Single_Link_Roots>
+#else
+#define PB_DS_CLASS_C_DEC \
+ left_child_next_sibling_heap_< \
+ Value_Type, \
+ Cmp_Fn, \
+ Node_Metadata, \
+ Allocator>
+#endif
+
+ /**
+ * class description = "Base class for some types of h3ap$">
+ **/
+#ifdef _GLIBCXX_DEBUG
+ template<typename Value_Type,
+ class Cmp_Fn,
+ typename Node_Metadata,
+ class Allocator,
+ bool Single_Link_Roots>
+#else
+ template<typename Value_Type,
+ class Cmp_Fn,
+ typename Node_Metadata,
+ class Allocator>
+#endif
+ class left_child_next_sibling_heap_ : public Cmp_Fn
+ {
+
+ protected:
+ typedef
+ typename Allocator::template rebind<
+ left_child_next_sibling_heap_node_<
+ Value_Type,
+ Node_Metadata,
+ Allocator> >::other
+ node_allocator;
+
+ typedef typename node_allocator::value_type node;
+
+ typedef typename node_allocator::pointer node_pointer;
+
+ typedef typename node_allocator::const_pointer const_node_pointer;
+
+ typedef Node_Metadata node_metadata;
+
+ typedef std::pair< node_pointer, node_pointer> node_pointer_pair;
+
+ private:
+ typedef cond_dealtor< node, Allocator> cond_dealtor_t;
+
+ enum
+ {
+ simple_value = is_simple<Value_Type>::value
+ };
+
+ typedef integral_constant<int, simple_value> no_throw_copies_t;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ left_child_next_sibling_heap_node_const_point_iterator_<
+ node,
+ Allocator>
+ const_point_iterator;
+
+ typedef const_point_iterator point_iterator;
+
+ typedef
+ left_child_next_sibling_heap_const_iterator_<
+ node,
+ Allocator>
+ const_iterator;
+
+ typedef const_iterator iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+ public:
+
+ left_child_next_sibling_heap_();
+
+ left_child_next_sibling_heap_(const Cmp_Fn& r_cmp_fn);
+
+ left_child_next_sibling_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~left_child_next_sibling_heap_();
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ void
+ clear();
+
+#ifdef PB_DS_LC_NS_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ protected:
+
+ inline node_pointer
+ get_new_node_for_insert(const_reference r_val);
+
+ inline static void
+ make_child_of(node_pointer p_nd, node_pointer p_new_parent);
+
+ void
+ value_swap(PB_DS_CLASS_C_DEC& other);
+
+ inline static node_pointer
+ parent(node_pointer p_nd);
+
+ inline void
+ swap_with_parent(node_pointer p_nd, node_pointer p_parent);
+
+ void
+ bubble_to_top(node_pointer p_nd);
+
+ inline void
+ actual_erase_node(node_pointer p_nd);
+
+ void
+ clear_imp(node_pointer p_nd);
+
+ void
+ to_linked_list();
+
+ template<typename Pred>
+ node_pointer
+ prune(Pred pred);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ assert_node_consistent(const_node_pointer p_nd, bool single_link) const;
+
+ static size_type
+ size_under_node(const_node_pointer p_nd);
+
+ static size_type
+ degree(const_node_pointer p_nd);
+#endif
+
+#ifdef PB_DS_LC_NS_HEAP_TRACE_
+ static void
+ trace_node(const_node_pointer, size_type level);
+#endif
+
+ protected:
+ node_pointer m_p_root;
+
+ size_type m_size;
+
+ private:
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_iterators() const;
+
+ void
+ assert_size() const;
+
+ static size_type
+ size_from_node(const_node_pointer p_nd);
+#endif
+
+ node_pointer
+ recursive_copy_node(const_node_pointer p_nd);
+
+ inline node_pointer
+ get_new_node_for_insert(const_reference r_val, false_type);
+
+ inline node_pointer
+ get_new_node_for_insert(const_reference r_val, true_type);
+
+#ifdef PB_DS_LC_NS_HEAP_TRACE_
+ template<typename Metadata_>
+ static void
+ trace_node_metadata(const_node_pointer p_nd, type_to_type<Metadata_>);
+
+ static void
+ trace_node_metadata(const_node_pointer, type_to_type<null_left_child_next_sibling_heap_node_metadata>);
+#endif
+
+ private:
+ static node_allocator s_node_allocator;
+
+ static no_throw_copies_t s_no_throw_copies_ind;
+ };
+
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp
new file mode 100644
index 0000000..1cdfe28
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp
@@ -0,0 +1,123 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node.hpp
+ * Contains an implementation struct for this type of heap's node.
+ */
+
+#ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NODE_HPP
+#define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NODE_HPP
+
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Value_Type, typename Metadata_Type, class Allocator>
+ struct left_child_next_sibling_heap_node_
+ {
+ private:
+ typedef
+ left_child_next_sibling_heap_node_<
+ Value_Type,
+ Metadata_Type,
+ Allocator>
+ this_type;
+
+ public:
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename Allocator::template rebind<
+ this_type>::other::pointer
+ node_pointer;
+
+ typedef Value_Type value_type;
+
+ typedef Metadata_Type metadata_type;
+
+ public:
+ value_type m_value;
+
+ metadata_type m_metadata;
+
+ node_pointer m_p_l_child;
+
+ node_pointer m_p_next_sibling;
+
+ node_pointer m_p_prev_or_parent;
+ };
+
+ template<typename Value_Type, class Allocator>
+ struct left_child_next_sibling_heap_node_<
+ Value_Type,
+ null_left_child_next_sibling_heap_node_metadata,
+ Allocator>
+ {
+ private:
+ typedef
+ left_child_next_sibling_heap_node_<
+ Value_Type,
+ null_left_child_next_sibling_heap_node_metadata,
+ Allocator>
+ this_type;
+
+ public:
+ typedef typename Allocator::size_type size_type;
+
+ typedef
+ typename Allocator::template rebind<
+ this_type>::other::pointer
+ node_pointer;
+
+ typedef Value_Type value_type;
+
+ public:
+ value_type m_value;
+
+ node_pointer m_p_l_child;
+
+ node_pointer m_p_next_sibling;
+
+ node_pointer m_p_prev_or_parent;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NODE_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp
new file mode 100644
index 0000000..040466e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file null_metadata.hpp
+ * Contains an implementation struct for this type of heap's node.
+ */
+
+#ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP
+#define PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ struct null_left_child_next_sibling_heap_node_metadata
+ { };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_LEFT_CHILD_NEXT_SIBLING_HEAP_NULL_METADATA_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..350b4d0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/policy_access_fn_imps.hpp
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn() const
+{ return *this; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp
new file mode 100644
index 0000000..2b90cfa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/left_child_next_sibling_heap_/trace_fn_imps.hpp
@@ -0,0 +1,95 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+#ifdef PB_DS_LC_NS_HEAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << std::endl;
+
+ trace_node(m_p_root, 0);
+
+ std::cerr << std::endl;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_node(const_node_pointer p_nd, size_type level)
+{
+ while (p_nd != NULL)
+ {
+ for (size_type i = 0; i < level; ++i)
+ std::cerr << ' ';
+
+ std::cerr << p_nd <<
+ " prev = " << p_nd->m_p_prev_or_parent <<
+ " next " << p_nd->m_p_next_sibling <<
+ " left = " << p_nd->m_p_l_child << " ";
+
+ trace_node_metadata(p_nd, type_to_type<node_metadata>());
+
+ std::cerr << p_nd->m_value << std::endl;
+
+ trace_node(p_nd->m_p_l_child, level + 1);
+
+ p_nd = p_nd->m_p_next_sibling;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Metadata_>
+void
+PB_DS_CLASS_C_DEC::
+trace_node_metadata(const_node_pointer p_nd, type_to_type<Metadata_>)
+{
+ std::cerr << "(" << p_nd->m_metadata << ") ";
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_node_metadata(const_node_pointer, type_to_type<null_left_child_next_sibling_heap_node_metadata>)
+{ }
+
+#endif // #ifdef PB_DS_LC_NS_HEAP_TRACE_
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
new file mode 100644
index 0000000..c998c3e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp
@@ -0,0 +1,141 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructor_destructor_fn_imps.hpp
+ * Contains implementations of PB_DS_CLASS_NAME.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::entry_allocator
+PB_DS_CLASS_C_DEC::s_entry_allocator;
+
+PB_DS_CLASS_T_DEC
+Eq_Fn PB_DS_CLASS_C_DEC::s_eq_fn;
+
+PB_DS_CLASS_T_DEC
+null_lu_metadata PB_DS_CLASS_C_DEC::s_null_lu_metadata;
+
+PB_DS_CLASS_T_DEC
+Update_Policy PB_DS_CLASS_C_DEC::s_update_policy;
+
+PB_DS_CLASS_T_DEC
+type_to_type<
+ typename PB_DS_CLASS_C_DEC::update_metadata> PB_DS_CLASS_C_DEC::s_metadata_type_indicator;
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME() : m_p_l(NULL)
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(It first_it, It last_it) : m_p_l(NULL)
+{
+ copy_from_range(first_it, last_it);
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(),
+#endif
+m_p_l(NULL)
+{
+ __try
+ {
+ for (const_iterator it = other.begin(); it != other.end(); ++it)
+ {
+ entry_pointer p_l = allocate_new_entry(*it,
+ PB_DS_TYPES_TRAITS_C_DEC::m_no_throw_copies_indicator);
+
+ p_l->m_p_next = m_p_l;
+ m_p_l = p_l;
+ }
+ }
+ __catch(...)
+ {
+ deallocate_all();
+ __throw_exception_again;
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
+ std::swap(m_p_l, other.m_p_l);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+deallocate_all()
+{
+ entry_pointer p_l = m_p_l;
+ while (p_l != NULL)
+ {
+ entry_pointer p_next_l = p_l->m_p_next;
+ actual_erase_entry(p_l);
+ p_l = p_next_l;
+ }
+ m_p_l = NULL;
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_CLASS_NAME()
+{ deallocate_all(); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
new file mode 100644
index 0000000..95e9e22
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains implementations of cc_ht_map_'s debug-mode functions.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ size_type calc_size = 0;
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ debug_base::check_key_exists(PB_DS_V2F(*it));
+ ++calc_size;
+ }
+ debug_base::check_size(calc_size);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp
new file mode 100644
index 0000000..021ef50
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file entry_metadata_base.hpp
+ * Contains an implementation for a list update map.
+ */
+
+#ifndef PB_DS_LU_MAP_ENTRY_METADATA_BASE_HPP
+#define PB_DS_LU_MAP_ENTRY_METADATA_BASE_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Metadata>
+ struct lu_map_entry_metadata_base
+ {
+ Metadata m_update_metadata;
+ };
+
+ template<>
+ struct lu_map_entry_metadata_base<null_lu_metadata>
+ { };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
new file mode 100644
index 0000000..cdc5920
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp
@@ -0,0 +1,135 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ if (m_p_l == NULL)
+ return false;
+
+ if (s_eq_fn(r_key, PB_DS_V2F(m_p_l->m_value)))
+ {
+ entry_pointer p_next = m_p_l->m_p_next;
+ actual_erase_entry(m_p_l);
+ m_p_l = p_next;
+ return true;
+ }
+
+ entry_pointer p_l = m_p_l;
+ while (p_l->m_p_next != NULL)
+ if (s_eq_fn(r_key, PB_DS_V2F(p_l->m_p_next->m_value)))
+ {
+ erase_next(p_l);
+ return true;
+ }
+ else
+ p_l = p_l->m_p_next;
+ return false;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ deallocate_all();
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ size_type num_ersd = 0;
+ while (m_p_l != NULL && pred(m_p_l->m_value))
+ {
+ entry_pointer p_next = m_p_l->m_p_next;
+ ++num_ersd;
+ actual_erase_entry(m_p_l);
+ m_p_l = p_next;
+ }
+
+ if (m_p_l == NULL)
+ return num_ersd;
+
+ entry_pointer p_l = m_p_l;
+ while (p_l->m_p_next != NULL)
+ {
+ if (pred(p_l->m_p_next->m_value))
+ {
+ ++num_ersd;
+ erase_next(p_l);
+ }
+ else
+ p_l = p_l->m_p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_next(entry_pointer p_l)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_l != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_l != m_p_l);
+ _GLIBCXX_DEBUG_ASSERT(p_l->m_p_next != NULL);
+ entry_pointer p_next_l = p_l->m_p_next->m_p_next;
+ actual_erase_entry(p_l->m_p_next);
+ p_l->m_p_next = p_next_l;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+actual_erase_entry(entry_pointer p_l)
+{
+ _GLIBCXX_DEBUG_ONLY(debug_base::erase_existing(PB_DS_V2F(p_l->m_value));)
+ p_l->~entry();
+ s_entry_allocator.deallocate(p_l, 1);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
new file mode 100644
index 0000000..50347ac
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+find_imp(const_key_reference r_key) const
+{
+ if (m_p_l == NULL)
+ return NULL;
+ if (s_eq_fn(r_key, PB_DS_V2F(m_p_l->m_value)))
+ {
+ apply_update(m_p_l, s_metadata_type_indicator);
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key);)
+ return m_p_l;
+ }
+
+ entry_pointer p_l = m_p_l;
+ while (p_l->m_p_next != NULL)
+ {
+ entry_pointer p_next = p_l->m_p_next;
+ if (s_eq_fn(r_key, PB_DS_V2F(p_next->m_value)))
+ {
+ if (apply_update(p_next, s_metadata_type_indicator))
+ {
+ p_l->m_p_next = p_next->m_p_next;
+ p_next->m_p_next = m_p_l;
+ m_p_l = p_next;
+ return m_p_l;
+ }
+ return p_next;
+ }
+ else
+ p_l = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return NULL;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Metadata>
+inline bool
+PB_DS_CLASS_C_DEC::
+apply_update(entry_pointer p_l, type_to_type<Metadata>)
+{ return s_update_policy(p_l->m_update_metadata); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+apply_update(entry_pointer, type_to_type<null_lu_metadata>)
+{ return s_update_policy(s_null_lu_metadata); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp
new file mode 100644
index 0000000..5ad3970
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp
@@ -0,0 +1,57 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{ return std::distance(begin(), end()); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return s_entry_allocator.max_size(); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return (m_p_l == NULL); }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
new file mode 100644
index 0000000..5efe2a1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<
+ typename PB_DS_CLASS_C_DEC::point_iterator,
+ bool>
+PB_DS_CLASS_C_DEC::
+insert(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ entry_pointer p_l = find_imp(PB_DS_V2F(r_val));
+
+ if (p_l != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val));)
+ return std::make_pair(point_iterator(&p_l->m_value), false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val));)
+
+ p_l = allocate_new_entry(r_val, traits_base::m_no_throw_copies_indicator);
+ p_l->m_p_next = m_p_l;
+ m_p_l = p_l;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return std::make_pair(point_iterator(&p_l->m_value), true);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+allocate_new_entry(const_reference r_val, false_type)
+{
+ entry_pointer p_l = s_entry_allocator.allocate(1);
+ cond_dealtor_t cond(p_l);
+ new (const_cast<void* >(static_cast<const void* >(&p_l->m_value)))
+ value_type(r_val);
+
+ cond.set_no_action();
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
+ init_entry_metadata(p_l, s_metadata_type_indicator);
+ return p_l;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::entry_pointer
+PB_DS_CLASS_C_DEC::
+allocate_new_entry(const_reference r_val, true_type)
+{
+ entry_pointer p_l = s_entry_allocator.allocate(1);
+ new (&p_l->m_value) value_type(r_val);
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
+ init_entry_metadata(p_l, s_metadata_type_indicator);
+ return p_l;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Metadata>
+inline void
+PB_DS_CLASS_C_DEC::
+init_entry_metadata(entry_pointer p_l, type_to_type<Metadata>)
+{ new (&p_l->m_update_metadata) Metadata(s_update_policy()); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+init_entry_metadata(entry_pointer, type_to_type<null_lu_metadata>)
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..e3247c5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp
@@ -0,0 +1,80 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{
+ if (m_p_l == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(empty());
+ return end();
+ }
+ return iterator(&m_p_l->m_value, m_p_l, this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{
+ if (m_p_l == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(empty());
+ return end();
+ }
+ return iterator(&m_p_l->m_value, m_p_l, const_cast<PB_DS_CLASS_C_DEC* >(this));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{ return iterator(NULL, NULL, this); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{
+ return const_iterator(NULL, NULL, const_cast<PB_DS_CLASS_C_DEC* const>(this));
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
new file mode 100644
index 0000000..0e9336b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp
@@ -0,0 +1,359 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file lu_map_.hpp
+ * Contains a list update map.
+ */
+
+#include <utility>
+#include <iterator>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/detail/list_update_map_/entry_metadata_base.hpp>
+#include <ext/pb_ds/exception.hpp>
+#ifdef _GLIBCXX_DEBUG
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#endif
+#ifdef PB_DS_LU_MAP_TRACE_
+#include <iostream>
+#endif
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, class Eq_Fn, \
+ class Allocator, class Update_Policy>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME lu_map_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME lu_map_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Eq_Fn, Allocator, Update_Policy>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits<Key, Mapped, Allocator, false>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, Eq_Fn, \
+ typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+ /* Skip to the lu, my darling. */
+ // list-based (with updates) associative container.
+ template<typename Key,
+ typename Mapped,
+ class Eq_Fn,
+ class Allocator,
+ class Update_Policy>
+ class PB_DS_CLASS_NAME :
+#ifdef _GLIBCXX_DEBUG
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+ public PB_DS_TYPES_TRAITS_C_DEC
+ {
+ private:
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+
+ struct entry
+ : public lu_map_entry_metadata_base<typename Update_Policy::metadata_type>
+ {
+ typename traits_base::value_type m_value;
+ typename Allocator::template rebind<entry>::other::pointer m_p_next;
+ };
+
+ typedef typename Allocator::template rebind<entry>::other entry_allocator;
+ typedef typename entry_allocator::pointer entry_pointer;
+ typedef typename entry_allocator::const_pointer const_entry_pointer;
+ typedef typename entry_allocator::reference entry_reference;
+ typedef typename entry_allocator::const_reference const_entry_reference;
+
+ typedef typename Allocator::template rebind<entry_pointer>::other entry_pointer_allocator;
+ typedef typename entry_pointer_allocator::pointer entry_pointer_array;
+
+ typedef typename traits_base::value_type value_type_;
+ typedef typename traits_base::pointer pointer_;
+ typedef typename traits_base::const_pointer const_pointer_;
+ typedef typename traits_base::reference reference_;
+ typedef typename traits_base::const_reference const_reference_;
+
+#define PB_DS_GEN_POS entry_pointer
+
+#include <ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/point_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/const_iterator.hpp>
+#include <ext/pb_ds/detail/unordered_iterator/iterator.hpp>
+
+#undef PB_DS_GEN_POS
+
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+ typedef cond_dealtor<entry, Allocator> cond_dealtor_t;
+
+ public:
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef Eq_Fn eq_fn;
+ typedef Update_Policy update_policy;
+ typedef typename Update_Policy::metadata_type update_metadata;
+ typedef typename traits_base::key_type key_type;
+ typedef typename traits_base::key_pointer key_pointer;
+ typedef typename traits_base::const_key_pointer const_key_pointer;
+ typedef typename traits_base::key_reference key_reference;
+ typedef typename traits_base::const_key_reference const_key_reference;
+ typedef typename traits_base::mapped_type mapped_type;
+ typedef typename traits_base::mapped_pointer mapped_pointer;
+ typedef typename traits_base::const_mapped_pointer const_mapped_pointer;
+ typedef typename traits_base::mapped_reference mapped_reference;
+ typedef typename traits_base::const_mapped_reference const_mapped_reference;
+ typedef typename traits_base::value_type value_type;
+ typedef typename traits_base::pointer pointer;
+ typedef typename traits_base::const_pointer const_pointer;
+ typedef typename traits_base::reference reference;
+ typedef typename traits_base::const_reference const_reference;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef point_iterator_ point_iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_point_iterator_ point_iterator;
+#endif
+
+ typedef const_point_iterator_ const_point_iterator;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef iterator_ iterator;
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+ typedef const_iterator_ iterator;
+#endif
+
+ typedef const_iterator_ const_iterator;
+
+ public:
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ virtual
+ ~PB_DS_CLASS_NAME();
+
+ template<typename It>
+ PB_DS_CLASS_NAME(It first_it, It last_it);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return insert(std::make_pair(r_key, mapped_type())).first->second;
+#else
+ insert(r_key);
+ return traits_base::s_null_mapped;
+#endif
+ }
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference);
+
+ inline point_iterator
+ find(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ entry_pointer p_e = find_imp(r_key);
+ return point_iterator(p_e == NULL ? NULL: &p_e->m_value);
+ }
+
+ inline const_point_iterator
+ find(const_key_reference r_key) const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ entry_pointer p_e = find_imp(r_key);
+ return const_point_iterator(p_e == NULL ? NULL: &p_e->m_value);
+ }
+
+ inline bool
+ erase(const_key_reference);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ void
+ clear();
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_LU_MAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ protected:
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ private:
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ friend class iterator_;
+#endif
+
+ friend class const_iterator_;
+
+ inline entry_pointer
+ allocate_new_entry(const_reference, false_type);
+
+ inline entry_pointer
+ allocate_new_entry(const_reference, true_type);
+
+ template<typename Metadata>
+ inline static void
+ init_entry_metadata(entry_pointer, type_to_type<Metadata>);
+
+ inline static void
+ init_entry_metadata(entry_pointer, type_to_type<null_lu_metadata>);
+
+ void
+ deallocate_all();
+
+ void
+ erase_next(entry_pointer);
+
+ void
+ actual_erase_entry(entry_pointer);
+
+ void
+ inc_it_state(const_pointer& r_p_value, entry_pointer& r_pos) const
+ {
+ r_pos = r_pos->m_p_next;
+ r_p_value = (r_pos == NULL) ? NULL : &r_pos->m_value;
+ }
+
+ template<typename Metadata>
+ inline static bool
+ apply_update(entry_pointer, type_to_type<Metadata>);
+
+ inline static bool
+ apply_update(entry_pointer, type_to_type<null_lu_metadata>);
+
+ inline entry_pointer
+ find_imp(const_key_reference) const;
+
+ static entry_allocator s_entry_allocator;
+ static Eq_Fn s_eq_fn;
+ static Update_Policy s_update_policy;
+ static type_to_type<update_metadata> s_metadata_type_indicator;
+ static null_lu_metadata s_null_lu_metadata;
+
+ mutable entry_pointer m_p_l;
+ };
+
+#include <ext/pb_ds/detail/list_update_map_/constructor_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_TYPES_TRAITS_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp
new file mode 100644
index 0000000..908aacc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp
@@ -0,0 +1,59 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains implementations of lu_map_.
+ */
+
+#ifdef PB_DS_LU_MAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << m_p_l << std::endl << std::endl;
+ const_entry_pointer p_l = m_p_l;
+ while (p_l != NULL)
+ {
+ std::cerr << PB_DS_V2F(p_l->m_value) << std::endl;
+ p_l = p_l->m_p_next;
+ }
+ std::cerr << std::endl;
+}
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
new file mode 100644
index 0000000..4ef7fe4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file counter_lu_metadata.hpp
+ * Contains implementation of a lu counter policy's metadata.
+ */
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Size_Type>
+ class counter_lu_policy_base;
+
+ // A list-update metadata type that moves elements to the front of
+ // the list based on the counter algorithm.
+ template<typename Size_Type = size_t>
+ class counter_lu_metadata
+ {
+ public:
+ typedef Size_Type size_type;
+
+ private:
+ counter_lu_metadata(size_type init_count) : m_count(init_count)
+ { }
+
+ friend class counter_lu_policy_base<size_type>;
+
+ mutable size_type m_count;
+ };
+
+ template<typename Size_Type>
+ class counter_lu_policy_base
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ counter_lu_metadata<size_type>
+ operator()(size_type max_size) const
+ { return counter_lu_metadata<Size_Type>(std::rand() % max_size); }
+
+ template<typename Metadata_Reference>
+ bool
+ operator()(Metadata_Reference r_data, size_type m_max_count) const
+ {
+ if (++r_data.m_count != m_max_count)
+ return false;
+ r_data.m_count = 0;
+ return true;
+ }
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp
new file mode 100644
index 0000000..f74a9fb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file counter_lu_policy_imp.hpp
+ * Contains a lu counter policy implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+detail::counter_lu_metadata<typename Allocator::size_type>
+PB_DS_CLASS_C_DEC::
+operator()() const
+{ return (base_type::operator()(max_count)); }
+
+PB_DS_CLASS_T_DEC
+bool
+PB_DS_CLASS_C_DEC::
+operator()(metadata_reference r_data) const
+{ return (base_type::operator()(r_data, max_count)); }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp
new file mode 100644
index 0000000..34426c5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file mtf_lu_policy_imp.hpp
+ * Contains a move-to-front policy implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+null_lu_metadata PB_DS_CLASS_C_DEC::s_metadata;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::metadata_type
+PB_DS_CLASS_C_DEC::
+operator()() const
+{ return s_metadata; }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+operator()(metadata_reference /*r_data*/) const
+{ return true; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp
new file mode 100644
index 0000000..c5da1e9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/list_update_policy/sample_update_policy.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_update_policy.hpp
+ * Contains a sample policy for list update containers.
+ */
+
+#ifndef PB_DS_SAMPLE_UPDATE_POLICY_HPP
+#define PB_DS_SAMPLE_UPDATE_POLICY_HPP
+
+// A sample list-update policy.
+struct sample_update_policy
+{
+ // Default constructor.
+ sample_update_policy();
+
+ // Copy constructor.
+ sample_update_policy(const sample_update_policy&);
+
+ // Swaps content.
+ inline void
+ swap(sample_update_policy& other);
+
+protected:
+ // Metadata on which this functor operates.
+ typedef some_metadata_type metadata_type;
+
+ // Creates a metadata object.
+ metadata_type
+ operator()() const;
+
+ // Decides whether a metadata object should be moved to the front of
+ // the list. A list-update based containers object will call this
+ // method to decide whether to move a node to the front of the
+ // list. The method shoule return true if the node should be moved
+ // to the front of the list.
+ bool
+ operator()(metadata_reference) const;
+};
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp
new file mode 100644
index 0000000..e2c4b9a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_dtor.hpp
+ * Contains a conditional destructor
+ */
+
+template<typename Size_Type>
+class cond_dtor
+{
+public:
+ cond_dtor(value_vector a_vec, iterator& r_last_it, Size_Type total_size)
+ : m_a_vec(a_vec), m_r_last_it(r_last_it), m_max_size(total_size),
+ m_no_action(false)
+ { }
+
+ ~cond_dtor()
+ {
+ if (m_no_action)
+ return;
+ iterator it = m_a_vec;
+ while (it != m_r_last_it)
+ {
+ it->~value_type();
+ ++it;
+ }
+
+ if (m_max_size > 0)
+ value_allocator().deallocate(m_a_vec, m_max_size);
+ }
+
+ inline void
+ set_no_action()
+ { m_no_action = true; }
+
+protected:
+ value_vector m_a_vec;
+ iterator& m_r_last_it;
+ const Size_Type m_max_size;
+ bool m_no_action;
+};
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..545b981
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,273 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::value_allocator
+PB_DS_CLASS_C_DEC::s_value_alloc;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::metadata_allocator
+PB_DS_CLASS_C_DEC::s_metadata_alloc;
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_OV_TREE_CLASS_NAME() :
+ m_a_values(NULL),
+ m_a_metadata(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ cmp_fn_base(r_cmp_fn),
+ m_a_values(NULL),
+ m_a_metadata(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_OV_TREE_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const node_update& r_node_update) :
+ cmp_fn_base(r_cmp_fn),
+ node_update(r_node_update),
+ m_a_values(NULL),
+ m_a_metadata(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_OV_TREE_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(other),
+#endif
+#ifdef PB_DS_TREE_TRACE
+ PB_DS_TREE_TRACE_BASE_C_DEC(other),
+#endif
+ cmp_fn_base(other),
+ node_update(other),
+ m_a_values(NULL),
+ m_a_metadata(NULL),
+ m_end_it(NULL),
+ m_size(0)
+{
+ copy_from_ordered_range(other.begin(), other.end());
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+inline void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef
+ std::map<
+ key_type,
+ mapped_type,
+ Cmp_Fn,
+ typename Allocator::template rebind<
+ value_type>::other>
+ map_type;
+#else
+ typedef
+ std::set<
+ key_type,
+ Cmp_Fn,
+ typename Allocator::template rebind<
+ Key>::other>
+ map_type;
+#endif
+
+ map_type m(first_it, last_it);
+ copy_from_ordered_range(m.begin(), m.end());
+}
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_ordered_range(It first_it, It last_it)
+{
+ const size_type len = std::distance(first_it, last_it);
+ if (len == 0)
+ return;
+
+ value_vector a_values = s_value_alloc.allocate(len);
+ iterator target_it = a_values;
+ It source_it = first_it;
+ It source_end_it = last_it;
+
+ cond_dtor<size_type> cd(a_values, target_it, len);
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+
+ ++target_it;
+ }
+
+ reallocate_metadata((node_update* )this, len);
+ cd.set_no_action();
+ m_a_values = a_values;
+ m_size = len;
+ m_end_it = m_a_values + m_size;
+ update(PB_DS_node_begin_imp(), (node_update* )this);
+
+#ifdef _GLIBCXX_DEBUG
+ const_iterator dbg_it = m_a_values;
+ while (dbg_it != m_end_it)
+ {
+ debug_base::insert_new(PB_DS_V2F(*dbg_it));
+ dbg_it++;
+ }
+ PB_DS_CLASS_C_DEC::assert_valid();
+#endif
+}
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_ordered_range(It first_it, It last_it, It other_first_it,
+ It other_last_it)
+{
+ clear();
+ const size_type len = std::distance(first_it, last_it)
+ + std::distance(other_first_it, other_last_it);
+
+ value_vector a_values = s_value_alloc.allocate(len);
+
+ iterator target_it = a_values;
+ It source_it = first_it;
+ It source_end_it = last_it;
+
+ cond_dtor<size_type> cd(a_values, target_it, len);
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+ ++target_it;
+ }
+
+ source_it = other_first_it;
+ source_end_it = other_last_it;
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+ ++target_it;
+ }
+
+ reallocate_metadata((node_update* )this, len);
+ cd.set_no_action();
+ m_a_values = a_values;
+ m_size = len;
+ m_end_it = m_a_values + m_size;
+ update(PB_DS_node_begin_imp(), (node_update* )this);
+
+#ifdef _GLIBCXX_DEBUG
+ const_iterator dbg_it = m_a_values;
+ while (dbg_it != m_end_it)
+ {
+ debug_base::insert_new(PB_DS_V2F(*dbg_it));
+ dbg_it++;
+ }
+ PB_DS_CLASS_C_DEC::assert_valid();
+#endif
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ value_swap(other);
+ std::swap((Cmp_Fn& )(*this), (Cmp_Fn& )other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+value_swap(PB_DS_CLASS_C_DEC& other)
+{
+ std::swap(m_a_values, other.m_a_values);
+ std::swap(m_a_metadata, other.m_a_metadata);
+ std::swap(m_size, other.m_size);
+ std::swap(m_end_it, other.m_end_it);
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_OV_TREE_CLASS_NAME()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ cond_dtor<size_type> cd(m_a_values, m_end_it, m_size);
+ reallocate_metadata((node_update* )this, 0);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update(node_iterator /*it*/, null_node_update_pointer)
+{ }
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update>
+void
+PB_DS_CLASS_C_DEC::
+update(node_iterator nd_it, Node_Update* p_update)
+{
+ const_node_iterator end_it = PB_DS_node_end_imp();
+ if (nd_it == end_it)
+ return;
+ update(nd_it.get_l_child(), p_update);
+ update(nd_it.get_r_child(), p_update);
+ node_update::operator()(nd_it, end_it);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
new file mode 100644
index 0000000..c32a8af
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp
@@ -0,0 +1,84 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ std::cout << "av1" << std::endl;
+
+ if (m_a_values == NULL || m_end_it == NULL || m_size == 0)
+ _GLIBCXX_DEBUG_ASSERT(m_a_values == NULL && m_end_it == NULL && m_size == 0);
+
+ std::cout << "av2" << std::endl;
+ assert_iterators();
+ std::cout << "av3" << std::endl;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_iterators() const
+{
+ debug_base::check_size(m_size);
+ size_type iterated_num = 0;
+ const_iterator prev_it = end();
+ _GLIBCXX_DEBUG_ASSERT( m_end_it == m_a_values + m_size);
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ ++iterated_num;
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(*it));)
+ _GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
+ const_iterator upper_bound_it = upper_bound(PB_DS_V2F(*it));
+ --upper_bound_it;
+ _GLIBCXX_DEBUG_ASSERT(upper_bound_it == it);
+ if (prev_it != end())
+ _GLIBCXX_DEBUG_ASSERT(Cmp_Fn::operator()(PB_DS_V2F(*prev_it),
+ PB_DS_V2F(*it)));
+ prev_it = it;
+ }
+ _GLIBCXX_DEBUG_ASSERT(iterated_num == m_size);
+}
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
new file mode 100644
index 0000000..618306d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp
@@ -0,0 +1,193 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (m_size == 0)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return;
+ }
+ else
+ {
+ reallocate_metadata((node_update* )this, 0);
+ cond_dtor<size_type> cd(m_a_values, m_end_it, m_size);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+ m_a_values = NULL;
+ m_size = 0;
+ m_end_it = m_a_values;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+#ifdef PB_DS_REGRESSION
+ typename Allocator::group_throw_prob_adjustor adjust(m_size);
+#endif
+
+ size_type new_size = 0;
+ size_type num_val_ersd = 0;
+ iterator source_it = m_a_values;
+ for (source_it = begin(); source_it != m_end_it; ++source_it)
+ if (!pred(*source_it))
+ ++new_size;
+ else
+ ++num_val_ersd;
+
+ if (new_size == 0)
+ {
+ clear();
+ return num_val_ersd;
+ }
+
+ value_vector a_new_values = s_value_alloc.allocate(new_size);
+ iterator target_it = a_new_values;
+ cond_dtor<size_type> cd(a_new_values, target_it, new_size);
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear());
+ for (source_it = begin(); source_it != m_end_it; ++source_it)
+ {
+ if (!pred(*source_it))
+ {
+ new (const_cast<void*>(static_cast<const void* >(target_it)))
+ value_type(*source_it);
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(*source_it)));
+ ++target_it;
+ }
+ }
+
+ reallocate_metadata((node_update* )this, new_size);
+ cd.set_no_action();
+
+ {
+ cond_dtor<size_type> cd1(m_a_values, m_end_it, m_size);
+ }
+
+ m_a_values = a_new_values;
+ m_size = new_size;
+ m_end_it = target_it;
+ update(node_begin(), (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return num_val_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+It
+PB_DS_CLASS_C_DEC::
+erase_imp(It it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (it == end())
+ return end();
+
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::check_key_exists(PB_DS_V2F(*it));)
+
+#ifdef PB_DS_REGRESSION
+ typename Allocator::group_throw_prob_adjustor adjust(m_size);
+#endif
+
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ value_vector a_values = s_value_alloc.allocate(m_size - 1);
+ iterator source_it = begin();
+ iterator source_end_it = end();
+ iterator target_it = a_values;
+ iterator ret_it = end();
+
+ cond_dtor<size_type> cd(a_values, target_it, m_size - 1);
+
+ _GLIBCXX_DEBUG_ONLY(size_type cnt = 0;)
+
+ while (source_it != source_end_it)
+ {
+ if (source_it != it)
+ {
+ _GLIBCXX_DEBUG_ONLY(++cnt;)
+ _GLIBCXX_DEBUG_ASSERT(cnt != m_size);
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it);
+
+ ++target_it;
+ }
+ else
+ ret_it = target_it;
+ ++source_it;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ reallocate_metadata((node_update* )this, m_size - 1);
+ cd.set_no_action();
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::erase_existing(PB_DS_V2F(*it));)
+ {
+ cond_dtor<size_type> cd1(m_a_values, m_end_it, m_size);
+ }
+
+ m_a_values = a_values;
+ --m_size;
+ m_end_it = m_a_values + m_size;
+ update(node_begin(), (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return It(ret_it);
+}
+
+PB_DS_CLASS_T_DEC
+bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ point_iterator it = find(r_key);
+ if (it == end())
+ return false;
+ erase(it);
+ return true;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp
new file mode 100644
index 0000000..c9421af
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp
@@ -0,0 +1,60 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return m_size;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return s_value_alloc.max_size(); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return size() == 0; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp
new file mode 100644
index 0000000..91d277b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+reallocate_metadata(null_node_update_pointer, size_type)
+{ }
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+void
+PB_DS_CLASS_C_DEC::
+reallocate_metadata(Node_Update_* , size_type new_size)
+{
+ metadata_pointer a_new_metadata_vec =(new_size == 0) ? NULL : s_metadata_alloc.allocate(new_size);
+
+ if (m_a_metadata != NULL)
+ {
+ for (size_type i = 0; i < m_size; ++i)
+ m_a_metadata[i].~metadata_type();
+ s_metadata_alloc.deallocate(m_a_metadata, m_size);
+ }
+ std::swap(m_a_metadata, a_new_metadata_vec);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..7652c4c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin() const
+{ return PB_DS_node_begin_imp(); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_end() const
+{ return PB_DS_node_end_imp(); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin()
+{ return PB_DS_node_begin_imp(); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_end()
+{ return PB_DS_node_end_imp(); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+PB_DS_node_begin_imp() const
+{
+ return const_node_iterator(const_cast<pointer>(mid_pointer(begin(), end())),
+ const_cast<pointer>(begin()),
+ const_cast<pointer>(end()),(m_a_metadata == NULL)?
+ NULL :
+ mid_pointer(m_a_metadata, m_a_metadata + m_size));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+PB_DS_node_end_imp() const
+{
+ return const_node_iterator(end(), end(), end(),
+ (m_a_metadata == NULL) ? NULL : m_a_metadata + m_size);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+PB_DS_node_begin_imp()
+{
+ return node_iterator(mid_pointer(begin(), end()), begin(), end(),
+ (m_a_metadata == NULL) ? NULL : mid_pointer(m_a_metadata, m_a_metadata + m_size));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+PB_DS_node_end_imp()
+{
+ return node_iterator(end(), end(),
+ end(),(m_a_metadata == NULL) ? NULL : m_a_metadata + m_size);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp
new file mode 100644
index 0000000..68fedc0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp
@@ -0,0 +1,292 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_iterators.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#ifndef PB_DS_OV_TREE_NODE_ITERATORS_HPP
+#define PB_DS_OV_TREE_NODE_ITERATORS_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC \
+ ov_tree_node_const_it_<Value_Type, Metadata_Type, Allocator>
+
+ // Const node reference.
+ template<typename Value_Type, typename Metadata_Type, class Allocator>
+ class ov_tree_node_const_it_
+ {
+
+ protected:
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Metadata_Type>::other::const_pointer
+ const_metadata_pointer;
+
+ typedef PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC this_type;
+
+ protected:
+
+ template<typename Ptr>
+ inline static Ptr
+ mid_pointer(Ptr p_begin, Ptr p_end)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_end >= p_begin);
+ return (p_begin + (p_end - p_begin) / 2);
+ }
+
+ public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::const_pointer
+ value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ Value_Type>::type>::other::const_pointer
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ Value_Type>::type>::other::const_pointer
+ const_reference;
+
+ typedef Metadata_Type metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::const_reference
+ const_metadata_reference;
+
+ public:
+ inline
+ ov_tree_node_const_it_(const_pointer p_nd = NULL, const_pointer p_begin_nd = NULL, const_pointer p_end_nd = NULL, const_metadata_pointer p_metadata = NULL) : m_p_value(const_cast<pointer>(p_nd)), m_p_begin_value(const_cast<pointer>(p_begin_nd)), m_p_end_value(const_cast<pointer>(p_end_nd)), m_p_metadata(p_metadata)
+ { }
+
+ inline const_reference
+ operator*() const
+ { return m_p_value; }
+
+ inline const_metadata_reference
+ get_metadata() const
+ {
+ enum
+ {
+ has_metadata = !is_same<Metadata_Type, null_node_metadata>::value
+ };
+
+ PB_DS_STATIC_ASSERT(should_have_metadata, has_metadata);
+ _GLIBCXX_DEBUG_ASSERT(m_p_metadata != NULL);
+ return *m_p_metadata;
+ }
+
+ inline this_type
+ get_l_child() const
+ {
+ if (m_p_begin_value == m_p_value)
+ return (this_type(m_p_begin_value, m_p_begin_value, m_p_begin_value));
+
+ const_metadata_pointer p_begin_metadata =
+ m_p_metadata - (m_p_value - m_p_begin_value);
+
+ return (this_type(mid_pointer(m_p_begin_value, m_p_value),
+ m_p_begin_value,
+ m_p_value,
+ mid_pointer(p_begin_metadata, m_p_metadata)));
+ }
+
+ inline this_type
+ get_r_child() const
+ {
+ if (m_p_value == m_p_end_value)
+ return (this_type(m_p_end_value, m_p_end_value, m_p_end_value));
+
+ const_metadata_pointer p_end_metadata =
+ m_p_metadata + (m_p_end_value - m_p_value);
+
+ return (this_type(mid_pointer(m_p_value + 1, m_p_end_value),
+ m_p_value + 1,
+ m_p_end_value,(m_p_metadata == NULL) ?
+ NULL : mid_pointer(m_p_metadata + 1, p_end_metadata)));
+ }
+
+ inline bool
+ operator==(const this_type& other) const
+ {
+ const bool is_end = m_p_begin_value == m_p_end_value;
+ const bool is_other_end = other.m_p_begin_value == other.m_p_end_value;
+
+ if (is_end)
+ return (is_other_end);
+
+ if (is_other_end)
+ return (is_end);
+
+ return m_p_value == other.m_p_value;
+ }
+
+ inline bool
+ operator!=(const this_type& other) const
+ { return !operator==(other); }
+
+ public:
+ pointer m_p_value;
+ pointer m_p_begin_value;
+ pointer m_p_end_value;
+
+ const_metadata_pointer m_p_metadata;
+ };
+
+#define PB_DS_OV_TREE_NODE_ITERATOR_C_DEC \
+ ov_tree_node_it_<Value_Type, Metadata_Type, Allocator>
+
+ // Node reference.
+ template<typename Value_Type, typename Metadata_Type, class Allocator>
+ class ov_tree_node_it_ : public PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC
+ {
+
+ private:
+ typedef PB_DS_OV_TREE_NODE_ITERATOR_C_DEC this_type;
+
+ typedef PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC base_type;
+
+ typedef typename base_type::pointer pointer;
+
+ typedef typename base_type::const_pointer const_pointer;
+
+ typedef
+ typename base_type::const_metadata_pointer
+ const_metadata_pointer;
+
+ public:
+
+ typedef trivial_iterator_tag iterator_category;
+
+ typedef trivial_iterator_difference_type difference_type;
+
+ typedef
+ typename Allocator::template rebind<
+ Value_Type>::other::pointer
+ value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ Value_Type>::type>::other::pointer
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ typename remove_const<
+ Value_Type>::type>::other::pointer
+ const_reference;
+
+ public:
+ inline
+ ov_tree_node_it_(const_pointer p_nd = NULL, const_pointer p_begin_nd = NULL, const_pointer p_end_nd = NULL, const_metadata_pointer p_metadata = NULL) : base_type(p_nd, p_begin_nd, p_end_nd, p_metadata)
+ { }
+
+ // Access.
+ inline reference
+ operator*() const
+ { return reference(base_type::m_p_value); }
+
+ // Returns the node reference associated with the left node.
+ inline ov_tree_node_it_
+ get_l_child() const
+ {
+ if (base_type::m_p_begin_value == base_type::m_p_value)
+ return (this_type(base_type::m_p_begin_value, base_type::m_p_begin_value, base_type::m_p_begin_value));
+
+ const_metadata_pointer p_begin_metadata =
+ base_type::m_p_metadata - (base_type::m_p_value - base_type::m_p_begin_value);
+
+ return (this_type(base_type::mid_pointer(base_type::m_p_begin_value, base_type::m_p_value),
+ base_type::m_p_begin_value,
+ base_type::m_p_value,
+ base_type::mid_pointer(p_begin_metadata, base_type::m_p_metadata)));
+ }
+
+ // Returns the node reference associated with the right node.
+ inline ov_tree_node_it_
+ get_r_child() const
+ {
+ if (base_type::m_p_value == base_type::m_p_end_value)
+ return (this_type(base_type::m_p_end_value, base_type::m_p_end_value, base_type::m_p_end_value));
+
+ const_metadata_pointer p_end_metadata =
+ base_type::m_p_metadata + (base_type::m_p_end_value - base_type::m_p_value);
+
+ return (this_type(base_type::mid_pointer(base_type::m_p_value + 1, base_type::m_p_end_value),
+ base_type::m_p_value + 1,
+ base_type::m_p_end_value,(base_type::m_p_metadata == NULL)?
+ NULL : base_type::mid_pointer(base_type::m_p_metadata + 1, p_end_metadata)));
+ }
+
+ };
+
+#undef PB_DS_OV_TREE_NODE_ITERATOR_C_DEC
+#undef PB_DS_OV_TREE_CONST_NODE_ITERATOR_C_DEC
+
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
new file mode 100644
index 0000000..f331f0f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp
@@ -0,0 +1,522 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file ov_tree_map_.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#include <map>
+#include <set>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/detail/tree_trace_base.hpp>
+#include <utility>
+#include <functional>
+#include <algorithm>
+#include <vector>
+#include <assert.h>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, class Cmp_Fn, \
+ class Node_And_It_Traits, class Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_OV_TREE_CLASS_NAME ov_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_OV_TREE_CLASS_NAME ov_tree_no_data_
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CONST_NODE_ITERATOR_NAME ov_tree_const_node_iterator_data_
+#else
+#define PB_DS_CONST_NODE_ITERATOR_NAME ov_tree_const_node_iterator_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_OV_TREE_CLASS_NAME<Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits<Key, Mapped, Allocator, false>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, Cmp_Fn>, \
+ typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+#ifdef PB_DS_TREE_TRACE
+#define PB_DS_TREE_TRACE_BASE_C_DEC \
+ tree_trace_base<typename Node_And_It_Traits::const_node_iterator, \
+ typename Node_And_It_Traits::node_iterator, \
+ Cmp_Fn, false, Allocator>
+#endif
+
+ // Ordered-vector tree associative-container.
+ template<typename Key, typename Mapped, class Cmp_Fn,
+ class Node_And_It_Traits, class Allocator>
+ class PB_DS_OV_TREE_CLASS_NAME :
+#ifdef _GLIBCXX_DEBUG
+ protected PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+#ifdef PB_DS_TREE_TRACE
+ public PB_DS_TREE_TRACE_BASE_C_DEC,
+#endif
+ public Cmp_Fn,
+ public Node_And_It_Traits::node_update,
+ public PB_DS_TYPES_TRAITS_C_DEC
+ {
+ private:
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+
+ typedef typename remove_const<typename traits_base::value_type>::type non_const_value_type;
+
+ typedef typename Allocator::template rebind<non_const_value_type>::other value_allocator;
+ typedef typename value_allocator::pointer value_vector;
+
+
+ typedef Cmp_Fn cmp_fn_base;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+ typedef typename traits_base::pointer mapped_pointer_;
+ typedef typename traits_base::const_pointer const_mapped_pointer_;
+
+ typedef typename Node_And_It_Traits::metadata_type metadata_type;
+
+ typedef typename Allocator::template rebind<metadata_type>::other metadata_allocator;
+ typedef typename metadata_allocator::pointer metadata_pointer;
+ typedef typename metadata_allocator::const_reference const_metadata_reference;
+ typedef typename metadata_allocator::reference metadata_reference;
+
+ typedef
+ typename Node_And_It_Traits::null_node_update_pointer
+ null_node_update_pointer;
+
+ public:
+
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef typename Node_And_It_Traits::node_update node_update;
+
+ typedef typename traits_base::key_type key_type;
+ typedef typename traits_base::key_pointer key_pointer;
+ typedef typename traits_base::const_key_pointer const_key_pointer;
+ typedef typename traits_base::key_reference key_reference;
+ typedef typename traits_base::const_key_reference const_key_reference;
+ typedef typename traits_base::mapped_type mapped_type;
+ typedef typename traits_base::mapped_pointer mapped_pointer;
+ typedef typename traits_base::const_mapped_pointer const_mapped_pointer;
+ typedef typename traits_base::mapped_reference mapped_reference;
+ typedef typename traits_base::const_mapped_reference const_mapped_reference;
+ typedef typename traits_base::value_type value_type;
+ typedef typename traits_base::pointer pointer;
+ typedef typename traits_base::const_pointer const_pointer;
+ typedef typename traits_base::reference reference;
+ typedef typename traits_base::const_reference const_reference;
+
+ typedef const_pointer const_point_iterator;
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ typedef pointer point_iterator;
+#else
+ typedef const_point_iterator point_iterator;
+#endif
+
+ typedef const_point_iterator const_iterator;
+
+ typedef point_iterator iterator;
+
+#include <ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp>
+
+ typedef
+ typename Node_And_It_Traits::const_node_iterator
+ const_node_iterator;
+
+ typedef typename Node_And_It_Traits::node_iterator node_iterator;
+
+ public:
+
+ PB_DS_OV_TREE_CLASS_NAME();
+
+ PB_DS_OV_TREE_CLASS_NAME(const Cmp_Fn&);
+
+ PB_DS_OV_TREE_CLASS_NAME(const Cmp_Fn&, const node_update&);
+
+ PB_DS_OV_TREE_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ ~PB_DS_OV_TREE_CLASS_NAME();
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ inline size_type
+ max_size() const;
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ Cmp_Fn&
+ get_cmp_fn();
+
+ const Cmp_Fn&
+ get_cmp_fn() const;
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ point_iterator it = lower_bound(r_key);
+ if (it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return it->second;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return (insert_new_val(it, std::make_pair(r_key, mapped_type()))->second);
+#else
+ insert(r_key);
+ return traits_base::s_null_mapped;
+#endif
+ }
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference r_value)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ const_key_reference r_key = PB_DS_V2F(r_value);
+ point_iterator it = lower_bound(r_key);
+
+ if (it != end()&& !Cmp_Fn::operator()(r_key, PB_DS_V2F(*it)))
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return std::make_pair(it, false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return std::make_pair(insert_new_val(it, r_value), true);
+ }
+
+ inline point_iterator
+ lower_bound(const_key_reference r_key)
+ {
+ pointer it = m_a_values;
+ pointer e_it = m_a_values + m_size;
+ while (it != e_it)
+ {
+ pointer mid_it = it + ((e_it - it) >> 1);
+ if (cmp_fn_base::operator()(PB_DS_V2F(*mid_it), r_key))
+ it = ++mid_it;
+ else
+ e_it = mid_it;
+ }
+ return it;
+ }
+
+ inline const_point_iterator
+ lower_bound(const_key_reference r_key) const
+ { return const_cast<PB_DS_CLASS_C_DEC& >(*this).lower_bound(r_key); }
+
+ inline point_iterator
+ upper_bound(const_key_reference r_key)
+ {
+ iterator pot_it = lower_bound(r_key);
+ if (pot_it != end()&& !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return ++pot_it;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return pot_it;
+ }
+
+ inline const_point_iterator
+ upper_bound(const_key_reference r_key) const
+ { return const_cast<PB_DS_CLASS_C_DEC&>(*this).upper_bound(r_key); }
+
+ inline point_iterator
+ find(const_key_reference r_key)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ iterator pot_it = lower_bound(r_key);
+ if (pot_it != end() && !Cmp_Fn::operator()(r_key, PB_DS_V2F(*pot_it)))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return pot_it;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return end();
+ }
+
+ inline const_point_iterator
+ find(const_key_reference r_key) const
+ { return (const_cast<PB_DS_CLASS_C_DEC& >(*this).find(r_key)); }
+
+ bool
+ erase(const_key_reference);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ inline iterator
+ erase(iterator it)
+ { return erase_imp<iterator>(it); }
+
+ void
+ clear();
+
+ void
+ join(PB_DS_CLASS_C_DEC&);
+
+ void
+ split(const_key_reference, PB_DS_CLASS_C_DEC&);
+
+ inline iterator
+ begin()
+ { return m_a_values; }
+
+ inline const_iterator
+ begin() const
+ { return m_a_values; }
+
+ inline iterator
+ end()
+ { return m_end_it; }
+
+ inline const_iterator
+ end() const
+ { return m_end_it; }
+
+ inline const_node_iterator
+ node_begin() const;
+
+ inline const_node_iterator
+ node_end() const;
+
+ inline node_iterator
+ node_begin();
+
+ inline node_iterator
+ node_end();
+
+ private:
+
+ inline void
+ update(node_iterator /*it*/, null_node_update_pointer);
+
+ template<typename Node_Update>
+ void
+ update(node_iterator, Node_Update*);
+
+ void
+ reallocate_metadata(null_node_update_pointer, size_type);
+
+ template<typename Node_Update_>
+ void
+ reallocate_metadata(Node_Update_*, size_type);
+
+ template<typename It>
+ void
+ copy_from_ordered_range(It, It);
+
+ void
+ value_swap(PB_DS_CLASS_C_DEC&);
+
+ template<typename It>
+ void
+ copy_from_ordered_range(It, It, It, It);
+
+ template<typename Ptr>
+ inline static Ptr
+ mid_pointer(Ptr p_begin, Ptr p_end)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_end >= p_begin);
+ return (p_begin + (p_end - p_begin) / 2);
+ }
+
+ inline iterator
+ insert_new_val(iterator it, const_reference r_value)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+#ifdef PB_DS_REGRESSION
+ typename Allocator::group_throw_prob_adjustor adjust(m_size);
+#endif
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_value)));
+
+ value_vector a_values = s_value_alloc.allocate(m_size + 1);
+
+ iterator source_it = begin();
+ iterator source_end_it = end();
+ iterator target_it = a_values;
+ iterator ret_it;
+
+ cond_dtor<size_type> cd(a_values, target_it, m_size + 1);
+ while (source_it != it)
+ {
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+ ++target_it;
+ }
+
+ new (const_cast<void* >(static_cast<const void* >(ret_it = target_it)))
+ value_type(r_value);
+ ++target_it;
+
+ while (source_it != source_end_it)
+ {
+ new (const_cast<void* >(static_cast<const void* >(target_it)))
+ value_type(*source_it++);
+ ++target_it;
+ }
+
+ reallocate_metadata((node_update* )this, m_size + 1);
+ cd.set_no_action();
+ if (m_size != 0)
+ {
+ cond_dtor<size_type> cd1(m_a_values, m_end_it, m_size);
+ }
+
+ ++m_size;
+ m_a_values = a_values;
+ m_end_it = m_a_values + m_size;
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_value)));
+ update(node_begin(), (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ return ret_it;
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ assert_iterators() const;
+#endif
+
+ template<typename It>
+ It
+ erase_imp(It it);
+
+ inline const_node_iterator
+ PB_DS_node_begin_imp() const;
+
+ inline const_node_iterator
+ PB_DS_node_end_imp() const;
+
+ inline node_iterator
+ PB_DS_node_begin_imp();
+
+ inline node_iterator
+ PB_DS_node_end_imp();
+
+ private:
+ static value_allocator s_value_alloc;
+ static metadata_allocator s_metadata_alloc;
+
+ value_vector m_a_values;
+ metadata_pointer m_a_metadata;
+ iterator m_end_it;
+ size_type m_size;
+ };
+
+#include <ext/pb_ds/detail/ov_tree_map_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp>
+#include <ext/pb_ds/detail/bin_search_tree_/policy_access_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_OV_TREE_CLASS_NAME
+#undef PB_DS_TYPES_TRAITS_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+#ifdef PB_DS_TREE_TRACE
+#undef PB_DS_TREE_TRACE_BASE_C_DEC
+#endif
+
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+#undef PB_DS_CONST_NODE_ITERATOR_NAME
+
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..c06d6f8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Cmp_Fn&
+PB_DS_CLASS_C_DEC::
+get_cmp_fn() const
+{ return *this; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..76bb6fa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp
@@ -0,0 +1,137 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ if (m_size == 0)
+ {
+ other.clear();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ if (Cmp_Fn::operator()(r_key, PB_DS_V2F(*begin())))
+ {
+ value_swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(*(end() - 1))))
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ if (m_size == 1)
+ {
+ value_swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
+ iterator it = upper_bound(r_key);
+ PB_DS_CLASS_C_DEC new_other(other, other);
+ new_other.copy_from_ordered_range(it, end());
+ PB_DS_CLASS_C_DEC new_this(*this, * this);
+ new_this.copy_from_ordered_range(begin(), it);
+
+ // No exceptions from this point.
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(Cmp_Fn& )(*this), other);)
+ other.update(other.node_begin(), (node_update* )(&other));
+ update(node_begin(), (node_update* )this);
+ other.value_swap(new_other);
+ value_swap(new_this);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ if (other.m_size == 0)
+ return;
+
+ if (m_size == 0)
+ {
+ value_swap(other);
+ return;
+ }
+
+ const bool greater = Cmp_Fn::operator()(PB_DS_V2F(*(end() - 1)),
+ PB_DS_V2F(*other.begin()));
+
+ const bool lesser = Cmp_Fn::operator()(PB_DS_V2F(*(other.end() - 1)),
+ PB_DS_V2F(*begin()));
+
+ if (!greater && !lesser)
+ __throw_join_error();
+
+ PB_DS_CLASS_C_DEC new_this(*this, *this);
+
+ if (greater)
+ new_this.copy_from_ordered_range(begin(), end(),
+ other.begin(), other.end());
+ else
+ new_this.copy_from_ordered_range(other.begin(), other.end(),
+ begin(), end());
+
+ // No exceptions from this point.
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
+ value_swap(new_this);
+ other.clear();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp
new file mode 100644
index 0000000..63cb0f7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/ov_tree_map_/traits.hpp
@@ -0,0 +1,183 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation class for ov_tree_.
+ */
+
+#ifndef PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Key,
+ typename Mapped,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_traits<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ ov_tree_tag,
+ Allocator>
+ {
+ private:
+ typedef
+ typename types_traits<
+ Key,
+ Mapped,
+ Allocator,
+ false>::value_type
+ value_type;
+
+ public:
+ typedef
+ typename tree_node_metadata_selector<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type
+ metadata_type;
+
+ typedef
+ ov_tree_node_const_it_<
+ value_type,
+ metadata_type,
+ Allocator>
+ const_node_iterator;
+
+ typedef
+ ov_tree_node_it_<
+ value_type,
+ metadata_type,
+ Allocator>
+ node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_tree_node_update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ template<typename Key,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_traits<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ ov_tree_tag,
+ Allocator>
+ {
+ private:
+ typedef
+ typename types_traits<
+ Key,
+ null_mapped_type,
+ Allocator,
+ false>::value_type
+ value_type;
+
+ public:
+ typedef
+ typename tree_node_metadata_selector<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type
+ metadata_type;
+
+ typedef
+ ov_tree_node_const_it_<
+ value_type,
+ metadata_type,
+ Allocator>
+ const_node_iterator;
+
+ typedef const_node_iterator node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ const_node_iterator,
+ Cmp_Fn,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_tree_node_update<
+ const_node_iterator,
+ node_iterator,
+ Cmp_Fn,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_OV_TREE_NODE_AND_IT_TRAITS_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..e292ed5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ push(*(first_it++));
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+pairing_heap_()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+pairing_heap_(const Cmp_Fn& r_cmp_fn) :
+ PB_DS_BASE_C_DEC(r_cmp_fn)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+pairing_heap_(const PB_DS_CLASS_C_DEC& other) :
+ PB_DS_BASE_C_DEC(other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ PB_DS_BASE_C_DEC::swap(other);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~pairing_heap_()
+{ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..7c9fc13
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_root == NULL
+ || base_type::m_p_root->m_p_next_sibling == NULL);
+ base_type::assert_valid();
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp
new file mode 100644
index 0000000..905be10
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp
@@ -0,0 +1,236 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+pop()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ node_pointer p_new_root = join_node_children(base_type::m_p_root);
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_new_root, false);)
+ if (p_new_root != NULL)
+ p_new_root->m_p_prev_or_parent = NULL;
+
+ base_type::actual_erase_node(base_type::m_p_root);
+ base_type::m_p_root = p_new_root;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase(point_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+ remove_node(it.m_p_nd);
+ base_type::actual_erase_node(it.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+remove_node(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+ node_pointer p_new_child = join_node_children(p_nd);
+
+#ifdef _GLIBCXX_DEBUG
+ if (p_new_child != NULL)
+ base_type::assert_node_consistent(p_new_child, false);
+#endif
+
+ if (p_nd == base_type::m_p_root)
+ {
+ if (p_new_child != NULL)
+ p_new_child->m_p_prev_or_parent = NULL;
+ base_type::m_p_root = p_new_child;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(base_type::m_p_root, false);)
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_prev_or_parent != NULL);
+ if (p_nd->m_p_prev_or_parent->m_p_l_child == p_nd)
+ {
+ if (p_new_child != NULL)
+ {
+ p_new_child->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ p_new_child->m_p_next_sibling = p_nd->m_p_next_sibling;
+ if (p_new_child->m_p_next_sibling != NULL)
+ p_new_child->m_p_next_sibling->m_p_prev_or_parent = p_new_child;
+ p_nd->m_p_prev_or_parent->m_p_l_child = p_new_child;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd->m_p_prev_or_parent, false);)
+ return;
+ }
+
+ p_nd->m_p_prev_or_parent->m_p_l_child = p_nd->m_p_next_sibling;
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd->m_p_prev_or_parent, false);)
+ return;
+ }
+
+ if (p_new_child != NULL)
+ {
+ p_new_child->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ p_new_child->m_p_next_sibling = p_nd->m_p_next_sibling;
+ if (p_new_child->m_p_next_sibling != NULL)
+ p_new_child->m_p_next_sibling->m_p_prev_or_parent = p_new_child;
+ p_new_child->m_p_prev_or_parent->m_p_next_sibling = p_new_child;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd->m_p_prev_or_parent, false);)
+ return;
+ }
+
+ p_nd->m_p_prev_or_parent->m_p_next_sibling = p_nd->m_p_next_sibling;
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd->m_p_prev_or_parent, false);)
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+join_node_children(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ node_pointer p_ret = p_nd->m_p_l_child;
+ if (p_ret == NULL)
+ return NULL;
+ while (p_ret->m_p_next_sibling != NULL)
+ p_ret = forward_join(p_ret, p_ret->m_p_next_sibling);
+ while (p_ret->m_p_prev_or_parent != p_nd)
+ p_ret = back_join(p_ret->m_p_prev_or_parent, p_ret);
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_ret, false);)
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+forward_join(node_pointer p_nd, node_pointer p_next)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_next_sibling == p_next);
+ if (Cmp_Fn::operator()(p_nd->m_value, p_next->m_value))
+ {
+ p_next->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ base_type::make_child_of(p_nd, p_next);
+ return p_next->m_p_next_sibling == NULL
+ ? p_next : p_next->m_p_next_sibling;
+ }
+
+ if (p_next->m_p_next_sibling != NULL)
+ {
+ p_next->m_p_next_sibling->m_p_prev_or_parent = p_nd;
+ p_nd->m_p_next_sibling = p_next->m_p_next_sibling;
+ base_type::make_child_of(p_next, p_nd);
+ return p_nd->m_p_next_sibling;
+ }
+
+ p_nd->m_p_next_sibling = NULL;
+ base_type::make_child_of(p_next, p_nd);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd, false));
+ return p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+back_join(node_pointer p_nd, node_pointer p_next)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_next->m_p_next_sibling == NULL);
+
+ if (Cmp_Fn::operator()(p_nd->m_value, p_next->m_value))
+ {
+ p_next->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+ base_type::make_child_of(p_nd, p_next);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_next, false));
+ return p_next;
+ }
+
+ p_nd->m_p_next_sibling = NULL;
+ base_type::make_child_of(p_next, p_nd);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd, false));
+ return p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return 0;
+ }
+ base_type::to_linked_list();
+ node_pointer p_out = base_type::prune(pred);
+ size_type ersd = 0;
+ while (p_out != NULL)
+ {
+ ++ersd;
+ node_pointer p_next = p_out->m_p_next_sibling;
+ base_type::actual_erase_node(p_out);
+ p_out = p_next;
+ }
+
+ node_pointer p_cur = base_type::m_p_root;
+ base_type::m_p_root = NULL;
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+ p_cur->m_p_l_child = p_cur->m_p_next_sibling = p_cur->m_p_prev_or_parent = NULL;
+
+ push_imp(p_cur);
+ p_cur = p_next;
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return ersd;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp
new file mode 100644
index 0000000..85efd70
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ return base_type::m_p_root->m_value;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp
new file mode 100644
index 0000000..b00e9d1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp
@@ -0,0 +1,101 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+push(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ node_pointer p_new_nd = base_type::get_new_node_for_insert(r_val);
+
+ push_imp(p_new_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return point_iterator(p_new_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+push_imp(node_pointer p_nd)
+{
+ p_nd->m_p_l_child = NULL;
+
+ if (base_type::m_p_root == NULL)
+ {
+ p_nd->m_p_next_sibling = p_nd->m_p_prev_or_parent = NULL;
+
+ base_type::m_p_root = p_nd;
+ }
+ else if (Cmp_Fn::operator()(base_type::m_p_root->m_value, p_nd->m_value))
+ {
+ p_nd->m_p_next_sibling = p_nd->m_p_prev_or_parent = NULL;
+
+ base_type::make_child_of(base_type::m_p_root, p_nd);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd, false));
+
+ base_type::m_p_root = p_nd;
+ }
+ else
+ {
+ base_type::make_child_of(p_nd, base_type::m_p_root);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(base_type::m_p_root, false));
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+modify(point_iterator it, const_reference r_new_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ remove_node(it.m_p_nd);
+
+ it.m_p_nd->m_value = r_new_val;
+
+ push_imp(it.m_p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
new file mode 100644
index 0000000..e19bcb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp
@@ -0,0 +1,216 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file pairing_heap_.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+/*
+ * Pairing heap:
+ * Michael L. Fredman, Robert Sedgewick, Daniel Dominic Sleator,
+ * and Robert Endre Tarjan, The Pairing Heap:
+ * A New Form of Self-Adjusting Heap, Algorithmica, 1(1):111-129, 1986.
+ */
+
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ pairing_heap_<Value_Type, Cmp_Fn, Allocator>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_< \
+ Value_Type, \
+ Cmp_Fn, \
+ null_left_child_next_sibling_heap_node_metadata, \
+ Allocator, \
+ false>
+#else
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_< \
+ Value_Type, \
+ Cmp_Fn, \
+ null_left_child_next_sibling_heap_node_metadata, \
+ Allocator>
+#endif
+
+ /**
+ * class description = "P4ri|\|g h3ap$">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class pairing_heap_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ typedef typename base_type::node_pointer node_pointer;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename PB_DS_BASE_C_DEC::const_point_iterator
+ const_point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::point_iterator point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::iterator iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+
+ pairing_heap_();
+
+ pairing_heap_(const Cmp_Fn& r_cmp_fn);
+
+ pairing_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~pairing_heap_();
+
+ inline point_iterator
+ push(const_reference r_val);
+
+ void
+ modify(point_iterator it, const_reference r_new_val);
+
+ inline const_reference
+ top() const;
+
+ void
+ pop();
+
+ void
+ erase(point_iterator it);
+
+ template<typename Pred>
+ size_type
+ erase_if(Pred pred);
+
+ template<typename Pred>
+ void
+ split(Pred pred, PB_DS_CLASS_C_DEC& other);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+
+ template<typename It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+ private:
+
+ inline void
+ push_imp(node_pointer p_nd);
+
+ node_pointer
+ join_node_children(node_pointer p_nd);
+
+ node_pointer
+ forward_join(node_pointer p_nd, node_pointer p_next);
+
+ node_pointer
+ back_join(node_pointer p_nd, node_pointer p_next);
+
+ void
+ remove_node(node_pointer p_nd);
+
+ };
+
+#include <ext/pb_ds/detail/pairing_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_BASE_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..85d4ddf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp
@@ -0,0 +1,140 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for a pairing heap.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+void
+PB_DS_CLASS_C_DEC::
+split(Pred pred, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ other.clear();
+
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ return;
+ }
+
+ base_type::to_linked_list();
+
+ node_pointer p_out = base_type::prune(pred);
+
+ while (p_out != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_size > 0);
+ --base_type::m_size;
+
+ ++other.m_size;
+
+ node_pointer p_next = p_out->m_p_next_sibling;
+
+ p_out->m_p_l_child = p_out->m_p_next_sibling = p_out->m_p_prev_or_parent = NULL;
+
+ other.push_imp(p_out);
+
+ p_out = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ node_pointer p_cur = base_type::m_p_root;
+
+ base_type::m_p_root = NULL;
+
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+
+ p_cur->m_p_l_child = p_cur->m_p_next_sibling = p_cur->m_p_prev_or_parent = NULL;
+
+ push_imp(p_cur);
+
+ p_cur = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ if (other.m_p_root == NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ return;
+ }
+
+ if (base_type::m_p_root == NULL)
+ base_type::m_p_root = other.m_p_root;
+ else if (Cmp_Fn::operator()(base_type::m_p_root->m_value, other.m_p_root->m_value))
+ {
+ base_type::make_child_of(base_type::m_p_root, other.m_p_root);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(other.m_p_root, false));
+
+ base_type::m_p_root = other.m_p_root;
+ }
+ else
+ {
+ base_type::make_child_of(other.m_p_root, base_type::m_p_root);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(base_type::m_p_root, false));
+ }
+
+ base_type::m_size += other.m_size;
+
+ other.m_p_root = NULL;
+ other.m_size = 0;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/child_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/child_iterator.hpp
new file mode 100644
index 0000000..15f349e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/child_iterator.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file child_iterator.hpp
+ * Contains a iterator for a patricia tree.
+ */
+
+struct iterator : public const_iterator
+{
+public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef typename Allocator::difference_type difference_type;
+ typedef node_pointer value_type;
+ typedef node_pointer_pointer pointer;
+ typedef node_pointer_reference reference;
+
+ inline
+ iterator(node_pointer_pointer p_p_cur = NULL,
+ node_pointer_pointer p_p_end = NULL)
+ : const_iterator(p_p_cur, p_p_end)
+ { }
+
+ inline bool
+ operator==(const iterator& other) const
+ { return const_iterator::m_p_p_cur == other.m_p_p_cur; }
+
+ inline bool
+ operator!=(const iterator& other) const
+ { return const_iterator::m_p_p_cur != other.m_p_p_cur; }
+
+ inline iterator&
+ operator++()
+ {
+ const_iterator::operator++();
+ return *this;
+ }
+
+ inline iterator
+ operator++(int)
+ {
+ iterator ret_it(*this);
+ operator++();
+ return ret_it;
+ }
+
+ node_pointer_pointer
+ operator->()
+ {
+ _GLIBCXX_DEBUG_ONLY(const_iterator::assert_referencible();)
+ return const_iterator::m_p_p_cur;
+ }
+
+ node_pointer
+ operator*()
+ {
+ _GLIBCXX_DEBUG_ONLY(const_iterator::assert_referencible();)
+ return *const_iterator::m_p_p_cur;
+ }
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp
new file mode 100644
index 0000000..184b986
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp
@@ -0,0 +1,79 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cond_dtor_entry_dealtor.hpp
+ * Contains a binary tree container conditional deallocator
+ */
+
+class cond_dealtor
+{
+public:
+ inline
+ cond_dealtor(leaf_pointer p_nd) : m_p_nd(p_nd),
+ m_no_action_dtor(false),
+ m_call_destructor(false)
+ { }
+
+ inline void
+ set_no_action_dtor()
+ {
+ m_no_action_dtor = true;
+ }
+
+ inline void
+ set_call_destructor()
+ {
+ m_call_destructor = true;
+ }
+
+ inline
+ ~cond_dealtor()
+ {
+ if (m_no_action_dtor)
+ return;
+
+ if (m_call_destructor)
+ m_p_nd->~leaf();
+
+ s_leaf_allocator.deallocate(m_p_nd, 1);
+ }
+
+protected:
+ leaf_pointer m_p_nd;
+ bool m_no_action_dtor;
+ bool m_call_destructor;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp
new file mode 100644
index 0000000..bc349cf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp
@@ -0,0 +1,111 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_child_iterator.hpp
+ * Contains a const_iterator for a patricia tree.
+ */
+
+struct const_iterator
+{
+public:
+ typedef std::forward_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef node_pointer value_type;
+
+ typedef node_pointer_pointer pointer;
+
+ typedef node_pointer_reference reference;
+
+public:
+ inline
+ const_iterator(node_pointer_pointer p_p_cur = NULL,
+ node_pointer_pointer p_p_end = NULL)
+ : m_p_p_cur(p_p_cur), m_p_p_end(p_p_end)
+ { }
+
+ inline bool
+ operator==(const const_iterator& other) const
+ { return m_p_p_cur == other.m_p_p_cur; }
+
+ inline bool
+ operator!=(const const_iterator& other) const
+ { return m_p_p_cur != other.m_p_p_cur; }
+
+ inline const_iterator&
+ operator++()
+ {
+ do
+ ++m_p_p_cur;
+ while (m_p_p_cur != m_p_p_end&& * m_p_p_cur == NULL);
+ return *this;
+ }
+
+ inline const_iterator
+ operator++(int)
+ {
+ const_iterator ret_it(*this);
+ operator++();
+ return ret_it;
+ }
+
+ const node_pointer_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_referencible();)
+ return (m_p_p_cur);
+ }
+
+ const_node_pointer
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_referencible();)
+ return (*m_p_p_cur);
+ }
+
+protected:
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_referencible() const
+ { _GLIBCXX_DEBUG_ASSERT(m_p_p_cur != m_p_p_end&& * m_p_p_cur != NULL); }
+#endif
+
+public:
+ node_pointer_pointer m_p_p_cur;
+ node_pointer_pointer m_p_p_end;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..ca38f93
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,214 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::head_allocator
+PB_DS_CLASS_C_DEC::s_head_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::internal_node_allocator
+PB_DS_CLASS_C_DEC::s_internal_node_allocator;
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::leaf_allocator
+PB_DS_CLASS_C_DEC::s_leaf_allocator;
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME() :
+ m_p_head(s_head_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const e_access_traits& r_e_access_traits) :
+ synth_e_access_traits(r_e_access_traits),
+ m_p_head(s_head_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+#ifdef _GLIBCXX_DEBUG
+ debug_base(other),
+#endif
+ synth_e_access_traits(other),
+ node_update(other),
+ m_p_head(s_head_allocator.allocate(1)),
+ m_size(0)
+{
+ initialize();
+ m_size = other.m_size;
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ if (other.m_p_head->m_p_parent == NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return;
+ }
+ __try
+ {
+ m_p_head->m_p_parent = recursive_copy_node(other.m_p_head->m_p_parent);
+ }
+ __catch(...)
+ {
+ s_head_allocator.deallocate(m_p_head, 1);
+ __throw_exception_again;
+ }
+
+ m_p_head->m_p_min = leftmost_descendant(m_p_head->m_p_parent);
+ m_p_head->m_p_max = rightmost_descendant(m_p_head->m_p_parent);
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ value_swap(other);
+ std::swap((e_access_traits& )(*this), (e_access_traits& )other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+value_swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(debug_base::swap(other);)
+ std::swap(m_p_head, other.m_p_head);
+ std::swap(m_size, other.m_size);
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~PB_DS_CLASS_NAME()
+{
+ clear();
+ s_head_allocator.deallocate(m_p_head, 1);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{
+ new (m_p_head) head();
+ m_p_head->m_p_parent = NULL;
+ m_p_head->m_p_min = m_p_head;
+ m_p_head->m_p_max = m_p_head;
+ m_size = 0;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+recursive_copy_node(const_node_pointer p_other_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_other_nd != NULL);
+ if (p_other_nd->m_type == pat_trie_leaf_node_type)
+ {
+ const_leaf_pointer p_other_leaf = static_cast<const_leaf_pointer>(p_other_nd);
+
+ leaf_pointer p_new_lf = s_leaf_allocator.allocate(1);
+ cond_dealtor cond(p_new_lf);
+ new (p_new_lf) leaf(p_other_leaf->value());
+ apply_update(p_new_lf, (node_update* )this);
+ cond.set_no_action_dtor();
+ return (p_new_lf);
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_other_nd->m_type == pat_trie_internal_node_type);
+ node_pointer a_p_children[internal_node::arr_size];
+ size_type child_i = 0;
+ const_internal_node_pointer p_other_internal_nd =
+ static_cast<const_internal_node_pointer>(p_other_nd);
+
+ typename internal_node::const_iterator child_it =
+ p_other_internal_nd->begin();
+
+ internal_node_pointer p_ret;
+ __try
+ {
+ while (child_it != p_other_internal_nd->end())
+ a_p_children[child_i++] = recursive_copy_node(*(child_it++));
+ p_ret = s_internal_node_allocator.allocate(1);
+ }
+ __catch(...)
+ {
+ while (child_i-- > 0)
+ clear_imp(a_p_children[child_i]);
+ __throw_exception_again;
+ }
+
+ new (p_ret) internal_node(p_other_internal_nd->get_e_ind(),
+ pref_begin(a_p_children[0]));
+
+ --child_i;
+ _GLIBCXX_DEBUG_ASSERT(child_i > 1);
+ do
+ p_ret->add_child(a_p_children[child_i], pref_begin(a_p_children[child_i]),
+ pref_end(a_p_children[child_i]), this);
+ while (child_i-- > 0);
+ apply_update(p_ret, (node_update* )this);
+ return p_ret;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
new file mode 100644
index 0000000..de75657
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp
@@ -0,0 +1,117 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ if (m_p_head->m_p_parent != NULL)
+ m_p_head->m_p_parent->assert_valid(this);
+ assert_iterators();
+ assert_reverse_iterators();
+ if (m_p_head->m_p_parent == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_min == m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_max == m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(empty());
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_min->m_type == pat_trie_leaf_node_type);
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_max->m_type == pat_trie_leaf_node_type);
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_iterators() const
+{
+ size_type calc_size = 0;
+ for (const_iterator it = begin(); it != end(); ++it)
+ {
+ ++calc_size;
+ debug_base::check_key_exists(PB_DS_V2F(*it));
+ _GLIBCXX_DEBUG_ASSERT(lower_bound(PB_DS_V2F(*it)) == it);
+ _GLIBCXX_DEBUG_ASSERT(--upper_bound(PB_DS_V2F(*it)) == it);
+ }
+ _GLIBCXX_DEBUG_ASSERT(calc_size == m_size);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_reverse_iterators() const
+{
+ size_type calc_size = 0;
+ for (const_reverse_iterator it = rbegin(); it != rend(); ++it)
+ {
+ ++calc_size;
+ const_node_pointer p_nd =
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->find_imp(PB_DS_V2F(*it));
+ _GLIBCXX_DEBUG_ASSERT(p_nd == it.m_p_nd);
+ }
+ _GLIBCXX_DEBUG_ASSERT(calc_size == m_size);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+recursive_count_leafs(const_node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return (0);
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return (1);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ size_type ret = 0;
+ for (typename internal_node::const_iterator it =
+ static_cast<const_internal_node_pointer>(p_nd)->begin();
+ it != static_cast<const_internal_node_pointer>(p_nd)->end();
+ ++it)
+ ret += recursive_count_leafs(*it);
+ return ret;
+}
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
new file mode 100644
index 0000000..9098818
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp
@@ -0,0 +1,319 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ node_pointer p_nd = find_imp(r_key);
+ if (p_nd == NULL || p_nd->m_type == pat_trie_internal_node_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return false;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_leaf_node_type);
+ if (!synth_e_access_traits::equal_keys(PB_DS_V2F(reinterpret_cast<leaf_pointer>(p_nd)->value()), r_key))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key));
+ return false;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ erase_leaf(static_cast<leaf_pointer>(p_nd));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_fixup(internal_node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(std::distance(p_nd->begin(), p_nd->end()) >= 1);
+ if (std::distance(p_nd->begin(), p_nd->end()) == 1)
+ {
+ node_pointer p_parent = p_nd->m_p_parent;
+ if (p_parent == m_p_head)
+ m_p_head->m_p_parent =* p_nd->begin();
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_type == pat_trie_internal_node_type);
+ node_pointer p_new_child =* p_nd->begin();
+ static_cast<internal_node_pointer>(p_parent)->replace_child(
+ p_new_child,
+ pref_begin(p_new_child),
+ pref_end(p_new_child),
+ this);
+ }
+ (*p_nd->begin())->m_p_parent = p_nd->m_p_parent;
+ p_nd->~internal_node();
+ s_internal_node_allocator.deallocate(p_nd, 1);
+
+ if (p_parent == m_p_head)
+ return;
+
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_type == pat_trie_internal_node_type);
+ p_nd = static_cast<internal_node_pointer>(p_parent);
+ }
+
+ while (true)
+ {
+ _GLIBCXX_DEBUG_ASSERT(std::distance(p_nd->begin(), p_nd->end()) > 1);
+ p_nd->update_prefixes(this);
+ apply_update(p_nd, (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(p_nd->assert_valid(this);)
+ if (p_nd->m_p_parent->m_type == pat_trie_head_node_type)
+ return;
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_parent->m_type ==
+ pat_trie_internal_node_type);
+
+ p_nd = static_cast<internal_node_pointer>(p_nd->m_p_parent);
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+actual_erase_leaf(leaf_pointer p_l)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+ _GLIBCXX_DEBUG_ONLY(erase_existing(PB_DS_V2F(p_l->value())));
+ p_l->~leaf();
+ s_leaf_allocator.deallocate(p_l, 1);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (empty())
+ return;
+
+ clear_imp(m_p_head->m_p_parent);
+ m_size = 0;
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_internal_node_type)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ for (typename internal_node::iterator it =
+ static_cast<internal_node_pointer>(p_nd)->begin();
+ it != static_cast<internal_node_pointer>(p_nd)->end();
+ ++it)
+ {
+ node_pointer p_child =* it;
+ clear_imp(p_child);
+ }
+ s_internal_node_allocator.deallocate(static_cast<internal_node_pointer>(p_nd), 1);
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_leaf_node_type);
+ static_cast<leaf_pointer>(p_nd)->~leaf();
+ s_leaf_allocator.deallocate(static_cast<leaf_pointer>(p_nd), 1);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+erase(const_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+
+ if (it == end())
+ return it;
+
+ const_iterator ret_it = it;
+ ++ret_it;
+ _GLIBCXX_DEBUG_ASSERT(it.m_p_nd->m_type == pat_trie_leaf_node_type);
+ erase_leaf(static_cast<leaf_pointer>(it.m_p_nd));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+erase(iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+
+ if (it == end())
+ return it;
+ iterator ret_it = it;
+ ++ret_it;
+ _GLIBCXX_DEBUG_ASSERT(it.m_p_nd->m_type == pat_trie_leaf_node_type);
+ erase_leaf(static_cast<leaf_pointer>(it.m_p_nd));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+#endif // #ifdef PB_DS_DATA_TRUE_INDICATOR
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
+PB_DS_CLASS_C_DEC::
+erase(const_reverse_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+
+ if (it.m_p_nd == m_p_head)
+ return it;
+ const_reverse_iterator ret_it = it;
+ ++ret_it;
+
+ _GLIBCXX_DEBUG_ASSERT(it.m_p_nd->m_type == pat_trie_leaf_node_type);
+ erase_leaf(static_cast<leaf_pointer>(it.m_p_nd));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+erase(reverse_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+
+ if (it.m_p_nd == m_p_head)
+ return it;
+ reverse_iterator ret_it = it;
+ ++ret_it;
+
+ _GLIBCXX_DEBUG_ASSERT(it.m_p_nd->m_type == pat_trie_leaf_node_type);
+ erase_leaf(static_cast<leaf_pointer>(it.m_p_nd));
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+#endif // #ifdef PB_DS_DATA_TRUE_INDICATOR
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ size_type num_ersd = 0;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ iterator it = begin();
+ while (it != end())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ if (pred(*it))
+ {
+ ++num_ersd;
+ it = erase(it);
+ }
+ else
+ ++it;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_leaf(leaf_pointer p_l)
+{
+ update_min_max_for_erased_leaf(p_l);
+ if (p_l->m_p_parent->m_type == pat_trie_head_node_type)
+ {
+ _GLIBCXX_DEBUG_ASSERT(size() == 1);
+ clear();
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(size() > 1);
+ _GLIBCXX_DEBUG_ASSERT(p_l->m_p_parent->m_type ==
+ pat_trie_internal_node_type);
+
+ internal_node_pointer p_parent =
+ static_cast<internal_node_pointer>(p_l->m_p_parent);
+
+ p_parent->remove_child(p_l);
+ erase_fixup(p_parent);
+ actual_erase_leaf(p_l);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+update_min_max_for_erased_leaf(leaf_pointer p_l)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_min = m_p_head;
+ m_p_head->m_p_max = m_p_head;
+ return;
+ }
+
+ if (p_l == static_cast<const_leaf_pointer>(m_p_head->m_p_min))
+ {
+ iterator it(p_l);
+ ++it;
+ m_p_head->m_p_min = it.m_p_nd;
+ return;
+ }
+
+ if (p_l == static_cast<const_leaf_pointer>(m_p_head->m_p_max))
+ {
+ iterator it(p_l);
+ --it;
+ m_p_head->m_p_max = it.m_p_nd;
+ }
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
new file mode 100644
index 0000000..2552ead
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp
@@ -0,0 +1,269 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ node_pointer p_nd = find_imp(r_key);
+
+ if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return end();
+ }
+
+ if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_nd)->value()), r_key))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return iterator(p_nd);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return end();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ const_node_pointer p_nd = const_cast<PB_DS_CLASS_C_DEC* >(this)->find_imp(r_key);
+
+ if (p_nd == NULL || p_nd->m_type != pat_trie_leaf_node_type)
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return end();
+ }
+
+ if (synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value()), r_key))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(r_key));
+ return const_iterator(const_cast<node_pointer>(p_nd));
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(r_key);)
+ return end();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+find_imp(const_key_reference r_key)
+{
+ if (empty())
+ return (NULL);
+
+ typename synth_e_access_traits::const_iterator b_it =
+ synth_e_access_traits::begin(r_key);
+ typename synth_e_access_traits::const_iterator e_it =
+ synth_e_access_traits::end(r_key);
+
+ node_pointer p_nd = m_p_head->m_p_parent;
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+
+ while (p_nd->m_type != pat_trie_leaf_node_type)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ node_pointer p_next_nd = static_cast<internal_node_pointer>(p_nd)->get_child_node(b_it, e_it, this);
+
+ if (p_next_nd == NULL)
+ return p_nd;
+ p_nd = p_next_nd;
+ }
+ return p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+lower_bound_imp(const_key_reference r_key)
+{
+ if (empty())
+ return (m_p_head);
+
+ node_pointer p_nd = m_p_head->m_p_parent;
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+
+ typename PB_DS_CLASS_C_DEC::const_e_iterator b_it =
+ synth_e_access_traits::begin(r_key);
+
+ typename PB_DS_CLASS_C_DEC::const_e_iterator e_it =
+ synth_e_access_traits::end(r_key);
+
+ size_type checked_ind = 0;
+ while (true)
+ {
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ {
+ if (!synth_e_access_traits::cmp_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value()), r_key))
+ return p_nd;
+ iterator it(p_nd);
+ ++it;
+ return it.m_p_nd;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ const size_type new_checked_ind =
+ static_cast<internal_node_pointer>(p_nd)->get_e_ind();
+
+ p_nd =
+ static_cast<internal_node_pointer>(p_nd)->get_lower_bound_child_node( b_it, e_it, checked_ind, this);
+ checked_ind = new_checked_ind;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+lower_bound(const_key_reference r_key)
+{ return point_iterator(lower_bound_imp(r_key)); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+lower_bound(const_key_reference r_key) const
+{
+ return const_point_iterator(const_cast<PB_DS_CLASS_C_DEC* >(this)->lower_bound_imp(r_key));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+upper_bound(const_key_reference r_key)
+{
+ point_iterator l_bound_it = lower_bound(r_key);
+
+ _GLIBCXX_DEBUG_ASSERT(l_bound_it == end() ||
+ !synth_e_access_traits::cmp_keys(PB_DS_V2F(*l_bound_it),
+ r_key));
+
+ if (l_bound_it == end() ||
+ synth_e_access_traits::cmp_keys(r_key, PB_DS_V2F(*l_bound_it)))
+ return l_bound_it;
+
+ return ++l_bound_it;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+upper_bound(const_key_reference r_key) const
+{
+ const_point_iterator l_bound_it = lower_bound(r_key);
+
+ _GLIBCXX_DEBUG_ASSERT(l_bound_it == end() ||
+ !synth_e_access_traits::cmp_keys(PB_DS_V2F(*l_bound_it),
+ r_key));
+
+ if (l_bound_it == end() ||
+ synth_e_access_traits::cmp_keys(r_key, PB_DS_V2F(*l_bound_it)))
+ return l_bound_it;
+ return ++l_bound_it;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_e_iterator
+PB_DS_CLASS_C_DEC::
+pref_begin(const_node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return (synth_e_access_traits::begin(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value())));
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ return static_cast<const_internal_node_pointer>(p_nd)->pref_b_it();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_e_iterator
+PB_DS_CLASS_C_DEC::
+pref_end(const_node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return (synth_e_access_traits::end(PB_DS_V2F(static_cast<const_leaf_pointer>(p_nd)->value())));
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ return static_cast<const_internal_node_pointer>(p_nd)->pref_e_it();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_leaf_pointer
+PB_DS_CLASS_C_DEC::
+leftmost_descendant(const_node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<const_leaf_pointer>(p_nd);
+ return static_cast<const_internal_node_pointer>(p_nd)->leftmost_descendant();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::leaf_pointer
+PB_DS_CLASS_C_DEC::
+leftmost_descendant(node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<leaf_pointer>(p_nd);
+ return static_cast<internal_node_pointer>(p_nd)->leftmost_descendant();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_leaf_pointer
+PB_DS_CLASS_C_DEC::
+rightmost_descendant(const_node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<const_leaf_pointer>(p_nd);
+ return static_cast<const_internal_node_pointer>(p_nd)->rightmost_descendant();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::leaf_pointer
+PB_DS_CLASS_C_DEC::
+rightmost_descendant(node_pointer p_nd)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<leaf_pointer>(p_nd);
+ return static_cast<internal_node_pointer>(p_nd)->rightmost_descendant();
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/head.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/head.hpp
new file mode 100644
index 0000000..0c73812
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/head.hpp
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file head.hpp
+ * Contains a leaf for a patricia tree.
+ */
+
+#ifndef PB_DS_PAT_TRIE_IHEAD_HPP
+#define PB_DS_PAT_TRIE_IHEAD_HPP
+
+#include <ext/pb_ds/detail/pat_trie_/node_base.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Type_Traits, typename E_Access_Traits, \
+ typename Metadata, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ pat_trie_head<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ pat_trie_node_base<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+ template<typename Type_Traits,
+ typename E_Access_Traits,
+ typename Metadata,
+ typename Allocator>
+ struct pat_trie_head : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef E_Access_Traits e_access_traits;
+
+ typedef
+ typename Allocator::template rebind<
+ e_access_traits>::other::const_pointer
+ const_e_access_traits_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ PB_DS_BASE_C_DEC>::other::pointer
+ node_pointer;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef
+ typename PB_DS_BASE_C_DEC::subtree_debug_info
+ subtree_debug_info;
+#endif
+
+ public:
+ pat_trie_head();
+
+#ifdef _GLIBCXX_DEBUG
+ virtual subtree_debug_info
+ assert_valid_imp(const_e_access_traits_pointer p_traits) const;
+#endif
+
+ public:
+ node_pointer m_p_min;
+
+ node_pointer m_p_max;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ pat_trie_head() : PB_DS_BASE_C_DEC(pat_trie_head_node_type)
+ { }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::subtree_debug_info
+ PB_DS_CLASS_C_DEC::
+ assert_valid_imp(const_e_access_traits_pointer /*p_traits*/) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(false);
+ return subtree_debug_info();
+ }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp
new file mode 100644
index 0000000..81d7096
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+empty() const
+{ return (m_size == 0); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+size() const
+{ return m_size; }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+max_size() const
+{ return s_internal_node_allocator.max_size(); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
new file mode 100644
index 0000000..e604974
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp
@@ -0,0 +1,465 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_join_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ split_join_branch_bag bag;
+ if (!join_prep(other, bag))
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ return;
+ }
+
+ m_p_head->m_p_parent = rec_join(m_p_head->m_p_parent,
+ other.m_p_head->m_p_parent, 0, bag);
+
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+ m_size += other.m_size;
+ other.initialize();
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ m_p_head->m_p_min = leftmost_descendant(m_p_head->m_p_parent);
+ m_p_head->m_p_max = rightmost_descendant(m_p_head->m_p_parent);
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+}
+
+PB_DS_CLASS_T_DEC
+bool
+PB_DS_CLASS_C_DEC::
+join_prep(PB_DS_CLASS_C_DEC& other, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ if (other.m_size == 0)
+ return false;
+
+ if (m_size == 0)
+ {
+ value_swap(other);
+ return false;
+ }
+
+ const bool greater = synth_e_access_traits::cmp_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(
+ m_p_head->m_p_max)->value()),PB_DS_V2F(static_cast<const_leaf_pointer>(
+ other.m_p_head->m_p_min)->value()));
+
+ const bool lesser = synth_e_access_traits::cmp_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(
+ other.m_p_head->m_p_max)->value()),PB_DS_V2F(static_cast<const_leaf_pointer>(m_p_head->m_p_min)->value()));
+
+ if (!greater && !lesser)
+ __throw_join_error();
+
+ rec_join_prep(m_p_head->m_p_parent, other.m_p_head->m_p_parent, r_bag);
+ _GLIBCXX_DEBUG_ONLY(debug_base::join(other);)
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+rec_join_prep(const_node_pointer p_l, const_node_pointer p_r, split_join_branch_bag& r_bag)
+{
+ if (p_l->m_type == pat_trie_leaf_node_type)
+ {
+ if (p_r->m_type == pat_trie_leaf_node_type)
+ {
+ rec_join_prep(static_cast<const_leaf_pointer>(p_l),
+ static_cast<const_leaf_pointer>(p_r), r_bag);
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
+ rec_join_prep(static_cast<const_leaf_pointer>(p_l),
+ static_cast<const_internal_node_pointer>(p_r), r_bag);
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_l->m_type == pat_trie_internal_node_type);
+ if (p_r->m_type == pat_trie_leaf_node_type)
+ {
+ rec_join_prep(static_cast<const_internal_node_pointer>(p_l),
+ static_cast<const_leaf_pointer>(p_r), r_bag);
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
+
+ rec_join_prep(static_cast<const_internal_node_pointer>(p_l),
+ static_cast<const_internal_node_pointer>(p_r), r_bag);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+rec_join_prep(const_leaf_pointer /*p_l*/, const_leaf_pointer /*p_r*/,
+ split_join_branch_bag& r_bag)
+{ r_bag.add_branch(); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+rec_join_prep(const_leaf_pointer /*p_l*/, const_internal_node_pointer /*p_r*/,
+ split_join_branch_bag& r_bag)
+{ r_bag.add_branch(); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+rec_join_prep(const_internal_node_pointer /*p_l*/, const_leaf_pointer /*p_r*/,
+ split_join_branch_bag& r_bag)
+{ r_bag.add_branch(); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+rec_join_prep(const_internal_node_pointer p_l, const_internal_node_pointer p_r,
+ split_join_branch_bag& r_bag)
+{
+ if (p_l->get_e_ind() == p_r->get_e_ind() &&
+ synth_e_access_traits::equal_prefixes(p_l->pref_b_it(), p_l->pref_e_it(),
+ p_r->pref_b_it(), p_r->pref_e_it()))
+ {
+ for (typename internal_node::const_iterator it = p_r->begin();
+ it != p_r->end(); ++ it)
+ {
+ const_node_pointer p_l_join_child = p_l->get_join_child(*it, this);
+ if (p_l_join_child != NULL)
+ rec_join_prep(p_l_join_child, * it, r_bag);
+ }
+ return;
+ }
+
+ if (p_r->get_e_ind() < p_l->get_e_ind() &&
+ p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
+ {
+ const_node_pointer p_r_join_child = p_r->get_join_child(p_l, this);
+ if (p_r_join_child != NULL)
+ rec_join_prep(p_r_join_child, p_l, r_bag);
+ return;
+ }
+
+ if (p_r->get_e_ind() < p_l->get_e_ind() &&
+ p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
+ {
+ const_node_pointer p_r_join_child = p_r->get_join_child(p_l, this);
+ if (p_r_join_child != NULL)
+ rec_join_prep(p_r_join_child, p_l, r_bag);
+ return;
+ }
+ r_bag.add_branch();
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_join(node_pointer p_l, node_pointer p_r, size_type checked_ind, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_r != NULL);
+ if (p_l == NULL)
+ {
+ apply_update(p_r, (node_update* )this);
+ return (p_r);
+ }
+
+ if (p_l->m_type == pat_trie_leaf_node_type)
+ {
+ if (p_r->m_type == pat_trie_leaf_node_type)
+ {
+ node_pointer p_ret = rec_join(static_cast<leaf_pointer>(p_l),
+ static_cast<leaf_pointer>(p_r), r_bag);
+ apply_update(p_ret, (node_update* )this);
+ return p_ret;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
+ node_pointer p_ret = rec_join(static_cast<leaf_pointer>(p_l),
+ static_cast<internal_node_pointer>(p_r),
+ checked_ind, r_bag);
+ apply_update(p_ret, (node_update* )this);
+ return p_ret;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_l->m_type == pat_trie_internal_node_type);
+ if (p_r->m_type == pat_trie_leaf_node_type)
+ {
+ node_pointer p_ret = rec_join(static_cast<internal_node_pointer>(p_l),
+ static_cast<leaf_pointer>(p_r),
+ checked_ind, r_bag);
+ apply_update(p_ret, (node_update* )this);
+ return p_ret;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_r->m_type == pat_trie_internal_node_type);
+ node_pointer p_ret = rec_join(static_cast<internal_node_pointer>(p_l),
+ static_cast<internal_node_pointer>(p_r),
+ r_bag);
+
+ apply_update(p_ret, (node_update* )this);
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_join(leaf_pointer p_l, leaf_pointer p_r, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_r != NULL);
+ if (p_l == NULL)
+ return (p_r);
+ node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_ret) == 2);
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_join(leaf_pointer p_l, internal_node_pointer p_r, size_type checked_ind,
+ split_join_branch_bag& r_bag)
+{
+#ifdef _GLIBCXX_DEBUG
+ const size_type lhs_leafs = recursive_count_leafs(p_l);
+ const size_type rhs_leafs = recursive_count_leafs(p_r);
+#endif
+
+ _GLIBCXX_DEBUG_ASSERT(p_r != NULL);
+ node_pointer p_ret = rec_join(p_r, p_l, checked_ind, r_bag);
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_ret) == lhs_leafs + rhs_leafs);
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_join(internal_node_pointer p_l, leaf_pointer p_r, size_type checked_ind, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_l != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_r != NULL);
+
+#ifdef _GLIBCXX_DEBUG
+ const size_type lhs_leafs = recursive_count_leafs(p_l);
+ const size_type rhs_leafs = recursive_count_leafs(p_r);
+#endif
+
+ if (!p_l->should_be_mine(pref_begin(p_r), pref_end(p_r), checked_ind, this))
+ {
+ node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
+ _GLIBCXX_DEBUG_ONLY(p_ret->assert_valid(this);)
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_ret) ==
+ lhs_leafs + rhs_leafs);
+ return p_ret;
+ }
+
+ node_pointer p_pot_child = p_l->add_child(p_r, pref_begin(p_r),
+ pref_end(p_r), this);
+ if (p_pot_child != p_r)
+ {
+ node_pointer p_new_child = rec_join(p_pot_child, p_r, p_l->get_e_ind(),
+ r_bag);
+
+ p_l->replace_child(p_new_child, pref_begin(p_new_child),
+ pref_end(p_new_child), this);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(p_l->assert_valid(this));
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_l) == lhs_leafs + rhs_leafs);
+ return p_l;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_join(internal_node_pointer p_l, internal_node_pointer p_r, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_l != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_r != NULL);
+
+#ifdef _GLIBCXX_DEBUG
+ const size_type lhs_leafs = recursive_count_leafs(p_l);
+ const size_type rhs_leafs = recursive_count_leafs(p_r);
+#endif
+
+ if (p_l->get_e_ind() == p_r->get_e_ind() &&
+ synth_e_access_traits::equal_prefixes(p_l->pref_b_it(), p_l->pref_e_it(),
+ p_r->pref_b_it(), p_r->pref_e_it()))
+ {
+ for (typename internal_node::iterator it = p_r->begin();
+ it != p_r->end(); ++ it)
+ {
+ node_pointer p_new_child = rec_join(p_l->get_join_child(*it, this),
+ * it, 0, r_bag);
+ p_l->replace_child(p_new_child, pref_begin(p_new_child),
+ pref_end(p_new_child), this);
+ }
+
+ p_r->~internal_node();
+ s_internal_node_allocator.deallocate(p_r, 1);
+ _GLIBCXX_DEBUG_ONLY(p_l->assert_valid(this);)
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_l) == lhs_leafs + rhs_leafs);
+ return p_l;
+ }
+
+ if (p_l->get_e_ind() < p_r->get_e_ind() &&
+ p_l->should_be_mine(p_r->pref_b_it(), p_r->pref_e_it(), 0, this))
+ {
+ node_pointer p_new_child = rec_join(p_l->get_join_child(p_r, this),
+ p_r, 0, r_bag);
+ p_l->replace_child(p_new_child, pref_begin(p_new_child),
+ pref_end(p_new_child), this);
+ _GLIBCXX_DEBUG_ONLY(p_l->assert_valid(this);)
+ return p_l;
+ }
+
+ if (p_r->get_e_ind() < p_l->get_e_ind() &&
+ p_r->should_be_mine(p_l->pref_b_it(), p_l->pref_e_it(), 0, this))
+ {
+ node_pointer p_new_child = rec_join(p_r->get_join_child(p_l, this), p_l,
+ 0, r_bag);
+
+ p_r->replace_child(p_new_child, pref_begin(p_new_child),
+ pref_end(p_new_child), this);
+
+ _GLIBCXX_DEBUG_ONLY(p_r->assert_valid(this);)
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_r) == lhs_leafs + rhs_leafs);
+ return p_r;
+ }
+
+ node_pointer p_ret = insert_branch(p_l, p_r, r_bag);
+ _GLIBCXX_DEBUG_ONLY(p_ret->assert_valid(this);)
+ _GLIBCXX_DEBUG_ASSERT(recursive_count_leafs(p_ret) == lhs_leafs + rhs_leafs);
+ return p_ret;
+}
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert(const_reference r_val)
+{
+ node_pointer p_lf = find_imp(PB_DS_V2F(r_val));
+ if (p_lf != NULL && p_lf->m_type == pat_trie_leaf_node_type &&
+ synth_e_access_traits::equal_keys(PB_DS_V2F(static_cast<leaf_pointer>(p_lf)->value()), PB_DS_V2F(r_val)))
+ {
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_exists(PB_DS_V2F(r_val)));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return std::make_pair(iterator(p_lf), false);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(debug_base::check_key_does_not_exist(PB_DS_V2F(r_val)));
+
+ leaf_pointer p_new_lf = s_leaf_allocator.allocate(1);
+ cond_dealtor cond(p_new_lf);
+
+ new (p_new_lf) leaf(r_val);
+ apply_update(p_new_lf, (node_update* )this);
+ cond.set_call_destructor();
+ split_join_branch_bag bag;
+ bag.add_branch();
+ m_p_head->m_p_parent = rec_join(m_p_head->m_p_parent, p_new_lf, 0, bag);
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+ cond.set_no_action_dtor();
+ ++m_size;
+ update_min_max_for_inserted_leaf(p_new_lf);
+ _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_val));)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return std::make_pair(point_iterator(p_new_lf), true);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+keys_diff_ind(typename e_access_traits::const_iterator b_l, typename e_access_traits::const_iterator e_l, typename e_access_traits::const_iterator b_r, typename e_access_traits::const_iterator e_r)
+{
+ size_type diff_pos = 0;
+ while (b_l != e_l)
+ {
+ if (b_r == e_r)
+ return (diff_pos);
+ if (e_access_traits::e_pos(*b_l) != e_access_traits::e_pos(*b_r))
+ return (diff_pos);
+ ++b_l;
+ ++b_r;
+ ++diff_pos;
+ }
+ _GLIBCXX_DEBUG_ASSERT(b_r != e_r);
+ return diff_pos;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::internal_node_pointer
+PB_DS_CLASS_C_DEC::
+insert_branch(node_pointer p_l, node_pointer p_r, split_join_branch_bag& r_bag)
+{
+ typename synth_e_access_traits::const_iterator left_b_it = pref_begin(p_l);
+ typename synth_e_access_traits::const_iterator left_e_it = pref_end(p_l);
+ typename synth_e_access_traits::const_iterator right_b_it = pref_begin(p_r);
+ typename synth_e_access_traits::const_iterator right_e_it = pref_end(p_r);
+
+ const size_type diff_ind = keys_diff_ind(left_b_it, left_e_it,
+ right_b_it, right_e_it);
+
+ internal_node_pointer p_new_nd = r_bag.get_branch();
+ new (p_new_nd) internal_node(diff_ind, left_b_it);
+ p_new_nd->add_child(p_l, left_b_it, left_e_it, this);
+ p_new_nd->add_child(p_r, right_b_it, right_e_it, this);
+ p_l->m_p_parent = p_new_nd;
+ p_r->m_p_parent = p_new_nd;
+ _GLIBCXX_DEBUG_ONLY(p_new_nd->assert_valid(this);)
+ return (p_new_nd);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+update_min_max_for_inserted_leaf(leaf_pointer p_new_lf)
+{
+ if (m_p_head->m_p_min == m_p_head ||
+ synth_e_access_traits::cmp_keys(PB_DS_V2F(p_new_lf->value()),
+ PB_DS_V2F(static_cast<const_leaf_pointer>(m_p_head->m_p_min)->value())))
+ m_p_head->m_p_min = p_new_lf;
+
+ if (m_p_head->m_p_max == m_p_head ||
+ synth_e_access_traits::cmp_keys(PB_DS_V2F(static_cast<const_leaf_pointer>(m_p_head->m_p_max)->value()), PB_DS_V2F(p_new_lf->value())))
+ m_p_head->m_p_max = p_new_lf;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
new file mode 100644
index 0000000..bf2f429
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/internal_node.hpp
@@ -0,0 +1,599 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file internal_node.hpp
+ * Contains an internal PB_DS_BASE_C_DEC for a patricia tree.
+ */
+
+#ifndef PB_DS_PAT_TRIE_INTERNAL_NODE_HPP
+#define PB_DS_PAT_TRIE_INTERNAL_NODE_HPP
+
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Type_Traits, typename E_Access_Traits, \
+ typename Metadata, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ pat_trie_internal_node<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ pat_trie_node_base<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+#define PB_DS_LEAF_C_DEC \
+ pat_trie_leaf<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+ template<typename Type_Traits,
+ typename E_Access_Traits,
+ typename Metadata,
+ typename Allocator>
+ struct pat_trie_internal_node : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+ typedef Type_Traits type_traits;
+ typedef typename type_traits::value_type value_type;
+ typedef typename Allocator::size_type size_type;
+
+ typedef E_Access_Traits e_access_traits;
+ typedef typename e_access_traits::const_iterator const_e_iterator;
+ typedef typename Allocator::template rebind<e_access_traits>::other access_rebind;
+ typedef typename access_rebind::const_pointer const_e_access_traits_pointer;
+
+ typedef typename Allocator::template rebind<base_type>::other base_rebind;
+ typedef typename base_rebind::pointer node_pointer;
+ typedef typename base_rebind::const_pointer const_node_pointer;
+
+ typedef PB_DS_LEAF_C_DEC leaf;
+ typedef typename Allocator::template rebind<leaf>::other leaf_rebind;
+ typedef typename leaf_rebind::pointer leaf_pointer;
+ typedef typename leaf_rebind::const_pointer const_leaf_pointer;
+
+ typedef typename Allocator::template rebind<pat_trie_internal_node>::other internal_node_rebind;
+ typedef typename internal_node_rebind::pointer internal_node_pointer;
+ typedef typename internal_node_rebind::const_pointer const_internal_node_pointer;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef typename base_type::subtree_debug_info subtree_debug_info;
+
+ virtual subtree_debug_info
+ assert_valid_imp(const_e_access_traits_pointer) const;
+#endif
+
+ inline size_type
+ get_pref_pos(const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer) const;
+
+ public:
+ typedef typename Allocator::template rebind<node_pointer>::other node_pointer_rebind;
+ typedef typename node_pointer_rebind::pointer node_pointer_pointer;
+ typedef typename node_pointer_rebind::reference node_pointer_reference;
+
+ enum
+ {
+ arr_size = E_Access_Traits::max_size + 1
+ };
+ PB_DS_STATIC_ASSERT(min_arr_size, arr_size >= 2);
+
+#include <ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp>
+#include <ext/pb_ds/detail/pat_trie_/child_iterator.hpp>
+
+ pat_trie_internal_node(size_type, const const_e_iterator);
+
+ void
+ update_prefixes(const_e_access_traits_pointer);
+
+ const_iterator
+ begin() const;
+
+ iterator
+ begin();
+
+ const_iterator
+ end() const;
+
+ iterator
+ end();
+
+ inline node_pointer
+ get_child_node(const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer);
+
+ inline const_node_pointer
+ get_child_node(const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer) const;
+
+ inline iterator
+ get_child_it(const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer);
+
+ inline node_pointer
+ get_lower_bound_child_node(const_e_iterator, const_e_iterator,
+ size_type, const_e_access_traits_pointer);
+
+ inline node_pointer
+ add_child(node_pointer, const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer);
+
+ inline const_node_pointer
+ get_join_child(const_node_pointer, const_e_access_traits_pointer) const;
+
+ inline node_pointer
+ get_join_child(node_pointer, const_e_access_traits_pointer);
+
+ void
+ remove_child(node_pointer p_nd);
+
+ iterator
+ remove_child(iterator it);
+
+ void
+ replace_child(node_pointer, const_e_iterator, const_e_iterator,
+ const_e_access_traits_pointer);
+
+ inline const_e_iterator
+ pref_b_it() const;
+
+ inline const_e_iterator
+ pref_e_it() const;
+
+ inline size_type
+ get_e_ind() const;
+
+ bool
+ should_be_mine(const_e_iterator, const_e_iterator, size_type,
+ const_e_access_traits_pointer) const;
+
+ leaf_pointer
+ leftmost_descendant();
+
+ const_leaf_pointer
+ leftmost_descendant() const;
+
+ leaf_pointer
+ rightmost_descendant();
+
+ const_leaf_pointer
+ rightmost_descendant() const;
+
+#ifdef _GLIBCXX_DEBUG
+ size_type
+ e_ind() const;
+#endif
+
+ private:
+ pat_trie_internal_node(const pat_trie_internal_node&);
+
+ size_type
+ get_begin_pos() const;
+
+ const size_type m_e_ind;
+ const_e_iterator m_pref_b_it;
+ const_e_iterator m_pref_e_it;
+ node_pointer m_a_p_children[arr_size];
+ static leaf_rebind s_leaf_alloc;
+ static internal_node_rebind s_internal_node_alloc;
+ };
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::leaf_rebind
+ PB_DS_CLASS_C_DEC::s_leaf_alloc;
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::internal_node_rebind
+ PB_DS_CLASS_C_DEC::s_internal_node_alloc;
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_pref_pos(const_e_iterator b_it, const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits) const
+ {
+ if (static_cast<size_t>(std::distance(b_it, e_it)) <= m_e_ind)
+ return 0;
+ std::advance(b_it, m_e_ind);
+ return 1 + p_traits->e_pos(*b_it);
+ }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ pat_trie_internal_node(size_type len, const const_e_iterator it) :
+ PB_DS_BASE_C_DEC(pat_trie_internal_node_type),
+ m_e_ind(len), m_pref_b_it(it), m_pref_e_it(it)
+ {
+ std::advance(m_pref_e_it, m_e_ind);
+ std::fill(m_a_p_children, m_a_p_children + arr_size,
+ static_cast<node_pointer>(NULL));
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ update_prefixes(const_e_access_traits_pointer p_traits)
+ {
+ node_pointer p_first = *begin();
+ if (p_first->m_type == pat_trie_leaf_node_type)
+ {
+ const_leaf_pointer p = static_cast<const_leaf_pointer>(p_first);
+ m_pref_b_it = p_traits->begin(e_access_traits::extract_key(p->value()));
+ }
+ else
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_first->m_type == pat_trie_internal_node_type);
+ m_pref_b_it = static_cast<internal_node_pointer>(p_first)->pref_b_it();
+ }
+ m_pref_e_it = m_pref_b_it;
+ std::advance(m_pref_e_it, m_e_ind);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_iterator
+ PB_DS_CLASS_C_DEC::
+ begin() const
+ {
+ typedef node_pointer_pointer pointer_type;
+ pointer_type p = const_cast<pointer_type>(m_a_p_children);
+ return const_iterator(p + get_begin_pos(), p + arr_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ begin()
+ {
+ return iterator(m_a_p_children + get_begin_pos(),
+ m_a_p_children + arr_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_iterator
+ PB_DS_CLASS_C_DEC::
+ end() const
+ {
+ typedef node_pointer_pointer pointer_type;
+ pointer_type p = const_cast<pointer_type>(m_a_p_children) + arr_size;
+ return const_iterator(p, p);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ end()
+ { return iterator(m_a_p_children + arr_size, m_a_p_children + arr_size); }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::node_pointer
+ PB_DS_CLASS_C_DEC::
+ get_child_node(const_e_iterator b_it, const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits)
+ {
+ const size_type i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+ return m_a_p_children[i];
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ get_child_it(const_e_iterator b_it, const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits)
+ {
+ const size_type i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+ _GLIBCXX_DEBUG_ASSERT(m_a_p_children[i] != NULL);
+ return iterator(m_a_p_children + i, m_a_p_children + i);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::const_node_pointer
+ PB_DS_CLASS_C_DEC::
+ get_child_node(const_e_iterator b_it, const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits) const
+ { return const_cast<node_pointer>(get_child_node(b_it, e_it, p_traits)); }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::node_pointer
+ PB_DS_CLASS_C_DEC::
+ get_lower_bound_child_node(const_e_iterator b_it, const_e_iterator e_it,
+ size_type checked_ind,
+ const_e_access_traits_pointer p_traits)
+ {
+ if (!should_be_mine(b_it, e_it, checked_ind, p_traits))
+ {
+ if (p_traits->cmp_prefixes(b_it, e_it, m_pref_b_it, m_pref_e_it, true))
+ return leftmost_descendant();
+ return rightmost_descendant();
+ }
+
+ size_type i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+
+ if (m_a_p_children[i] != NULL)
+ return m_a_p_children[i];
+
+ while (++i < arr_size)
+ if (m_a_p_children[i] != NULL)
+ {
+ if (m_a_p_children[i]->m_type == pat_trie_leaf_node_type)
+ return m_a_p_children[i];
+
+ _GLIBCXX_DEBUG_ASSERT(m_a_p_children[i]->m_type == pat_trie_internal_node_type);
+
+ return static_cast<internal_node_pointer>(m_a_p_children[i])->leftmost_descendant();
+ }
+
+ return rightmost_descendant();
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::node_pointer
+ PB_DS_CLASS_C_DEC::
+ add_child(node_pointer p_nd, const_e_iterator b_it, const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits)
+ {
+ const size_type i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+ if (m_a_p_children[i] == NULL)
+ {
+ m_a_p_children[i] = p_nd;
+ p_nd->m_p_parent = this;
+ return p_nd;
+ }
+ return m_a_p_children[i];
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_node_pointer
+ PB_DS_CLASS_C_DEC::
+ get_join_child(const_node_pointer p_nd, const_e_access_traits_pointer p_traits) const
+ {
+ node_pointer p = const_cast<node_pointer>(p_nd);
+ return const_cast<internal_node_pointer>(this)->get_join_child(p, p_traits);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::node_pointer
+ PB_DS_CLASS_C_DEC::
+ get_join_child(node_pointer p_nd, const_e_access_traits_pointer p_traits)
+ {
+ size_type i;
+ const_e_iterator b_it;
+ const_e_iterator e_it;
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ {
+ typename Type_Traits::const_key_reference r_key =
+ e_access_traits::extract_key(static_cast<const_leaf_pointer>(p_nd)->value());
+
+ b_it = p_traits->begin(r_key);
+ e_it = p_traits->end(r_key);
+ }
+ else
+ {
+ b_it = static_cast<internal_node_pointer>(p_nd)->pref_b_it();
+ e_it = static_cast<internal_node_pointer>(p_nd)->pref_e_it();
+ }
+ i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+ return m_a_p_children[i];
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ remove_child(node_pointer p_nd)
+ {
+ size_type i = 0;
+ for (; i < arr_size; ++i)
+ if (m_a_p_children[i] == p_nd)
+ {
+ m_a_p_children[i] = NULL;
+ return;
+ }
+ _GLIBCXX_DEBUG_ASSERT(i != arr_size);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ remove_child(iterator it)
+ {
+ iterator ret = it;
+ ++ret;
+ * it.m_p_p_cur = NULL;
+ return ret;
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ replace_child(node_pointer p_nd, const_e_iterator b_it,
+ const_e_iterator e_it,
+ const_e_access_traits_pointer p_traits)
+ {
+ const size_type i = get_pref_pos(b_it, e_it, p_traits);
+ _GLIBCXX_DEBUG_ASSERT(i < arr_size);
+ m_a_p_children[i] = p_nd;
+ p_nd->m_p_parent = this;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::const_e_iterator
+ PB_DS_CLASS_C_DEC::
+ pref_b_it() const
+ { return m_pref_b_it; }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::const_e_iterator
+ PB_DS_CLASS_C_DEC::
+ pref_e_it() const
+ { return m_pref_e_it; }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_e_ind() const
+ { return m_e_ind; }
+
+ PB_DS_CLASS_T_DEC
+ bool
+ PB_DS_CLASS_C_DEC::
+ should_be_mine(const_e_iterator b_it, const_e_iterator e_it,
+ size_type checked_ind,
+ const_e_access_traits_pointer p_traits) const
+ {
+ if (m_e_ind == 0)
+ return true;
+
+ const size_type num_es = std::distance(b_it, e_it);
+ if (num_es < m_e_ind)
+ return false;
+
+ const_e_iterator key_b_it = b_it;
+ std::advance(key_b_it, checked_ind);
+ const_e_iterator key_e_it = b_it;
+ std::advance(key_e_it, m_e_ind);
+
+ const_e_iterator value_b_it = m_pref_b_it;
+ std::advance(value_b_it, checked_ind);
+ const_e_iterator value_e_it = m_pref_b_it;
+ std::advance(value_e_it, m_e_ind);
+
+ return p_traits->equal_prefixes(key_b_it, key_e_it, value_b_it,
+ value_e_it);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::leaf_pointer
+ PB_DS_CLASS_C_DEC::
+ leftmost_descendant()
+ {
+ node_pointer p_pot =* begin();
+ if (p_pot->m_type == pat_trie_leaf_node_type)
+ return (static_cast<leaf_pointer>(p_pot));
+ _GLIBCXX_DEBUG_ASSERT(p_pot->m_type == pat_trie_internal_node_type);
+ return static_cast<internal_node_pointer>(p_pot)->leftmost_descendant();
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_leaf_pointer
+ PB_DS_CLASS_C_DEC::
+ leftmost_descendant() const
+ {
+ return const_cast<internal_node_pointer>(this)->leftmost_descendant();
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::leaf_pointer
+ PB_DS_CLASS_C_DEC::
+ rightmost_descendant()
+ {
+ const size_type num_children = std::distance(begin(), end());
+ _GLIBCXX_DEBUG_ASSERT(num_children >= 2);
+
+ iterator it = begin();
+ std::advance(it, num_children - 1);
+ node_pointer p_pot =* it;
+ if (p_pot->m_type == pat_trie_leaf_node_type)
+ return static_cast<leaf_pointer>(p_pot);
+ _GLIBCXX_DEBUG_ASSERT(p_pot->m_type == pat_trie_internal_node_type);
+ return static_cast<internal_node_pointer>(p_pot)->rightmost_descendant();
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::const_leaf_pointer
+ PB_DS_CLASS_C_DEC::
+ rightmost_descendant() const
+ {
+ return const_cast<internal_node_pointer>(this)->rightmost_descendant();
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ e_ind() const
+ { return m_e_ind; }
+#endif
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ get_begin_pos() const
+ {
+ size_type i;
+ for (i = 0; i < arr_size && m_a_p_children[i] == NULL; ++i)
+ ;
+ return i;
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::subtree_debug_info
+ PB_DS_CLASS_C_DEC::
+ assert_valid_imp(const_e_access_traits_pointer p_traits) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_type == pat_trie_internal_node_type);
+ _GLIBCXX_DEBUG_ASSERT(static_cast<size_type>(std::distance(pref_b_it(), pref_e_it())) == m_e_ind);
+ _GLIBCXX_DEBUG_ASSERT(std::distance(begin(), end()) >= 2);
+
+ for (typename pat_trie_internal_node::const_iterator it = begin();
+ it != end(); ++it)
+ {
+ const_node_pointer p_nd =* it;
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_parent == this);
+ subtree_debug_info child_ret = p_nd->assert_valid_imp(p_traits);
+
+ _GLIBCXX_DEBUG_ASSERT(static_cast<size_type>(std::distance(child_ret.first, child_ret.second)) >= m_e_ind);
+ _GLIBCXX_DEBUG_ASSERT(should_be_mine(child_ret.first, child_ret.second, 0, p_traits));
+ _GLIBCXX_DEBUG_ASSERT(get_pref_pos(child_ret.first, child_ret.second, p_traits) == static_cast<size_type>(it.m_p_p_cur - m_a_p_children));
+ }
+ return std::make_pair(pref_b_it(), pref_e_it());
+ }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_LEAF_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp
new file mode 100644
index 0000000..9902d96
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp
@@ -0,0 +1,120 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterators_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+begin()
+{ return iterator(m_p_head->m_p_min); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin() const
+{ return const_iterator(m_p_head->m_p_min); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+end()
+{ return iterator(m_p_head); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end() const
+{ return const_iterator(m_p_head); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
+PB_DS_CLASS_C_DEC::
+rbegin() const
+{
+ if (empty())
+ return rend();
+ return --end();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+rbegin()
+{
+ if (empty())
+ return rend();
+ return --end();
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+rend()
+{ return reverse_iterator(m_p_head); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reverse_iterator
+PB_DS_CLASS_C_DEC::
+rend() const
+{ return const_reverse_iterator(m_p_head); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin() const
+{ return const_node_iterator(m_p_head->m_p_parent, this); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_begin()
+{ return node_iterator(m_p_head->m_p_parent, this); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_node_iterator
+PB_DS_CLASS_C_DEC::
+node_end() const
+{ return const_node_iterator(NULL, this); }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+node_end()
+{ return node_iterator(NULL, this); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/leaf.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
new file mode 100644
index 0000000..91cf14f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/leaf.hpp
@@ -0,0 +1,171 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file leaf.hpp
+ * Contains a pat_trie_leaf for a patricia tree.
+ */
+
+#ifndef PB_DS_PAT_TRIE_LEAF_HPP
+#define PB_DS_PAT_TRIE_LEAF_HPP
+
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template< \
+ class Type_Traits, \
+ class E_Access_Traits, \
+ class Metadata, \
+ class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ pat_trie_leaf< \
+ Type_Traits, \
+ E_Access_Traits, \
+ Metadata, \
+ Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ pat_trie_node_base< \
+ Type_Traits, \
+ E_Access_Traits, \
+ Metadata, \
+ Allocator>
+
+#define PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC \
+ pat_trie_subtree_debug_info< \
+ Type_Traits, \
+ E_Access_Traits, \
+ Allocator>
+
+ template<typename Type_Traits,
+ class E_Access_Traits,
+ class Metadata,
+ class Allocator>
+ struct pat_trie_leaf : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef typename Type_Traits::value_type value_type;
+
+ typedef typename Type_Traits::const_reference const_reference;
+
+ typedef typename Type_Traits::reference reference;
+
+ typedef
+ typename Allocator::template rebind<
+ E_Access_Traits>::other::const_pointer
+ const_e_access_traits_pointer;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef
+ typename PB_DS_BASE_C_DEC::subtree_debug_info
+ subtree_debug_info;
+#endif
+
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ pat_trie_leaf(const_reference r_val);
+
+ inline reference
+ value();
+
+ inline const_reference
+ value() const;
+
+#ifdef _GLIBCXX_DEBUG
+ virtual subtree_debug_info
+ assert_valid_imp(const_e_access_traits_pointer p_traits) const;
+
+ virtual
+ ~pat_trie_leaf();
+#endif
+
+ private:
+ pat_trie_leaf(const PB_DS_CLASS_C_DEC& other);
+
+ value_type m_value;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ pat_trie_leaf(const_reference r_val) :
+ PB_DS_BASE_C_DEC(pat_trie_leaf_node_type), m_value(r_val)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::reference
+ PB_DS_CLASS_C_DEC::
+ value()
+ { return m_value; }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::const_reference
+ PB_DS_CLASS_C_DEC::
+ value() const
+ { return m_value; }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::subtree_debug_info
+ PB_DS_CLASS_C_DEC::
+ assert_valid_imp(const_e_access_traits_pointer p_traits) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_type == pat_trie_leaf_node_type);
+ subtree_debug_info ret;
+ const_reference r_val = value();
+ return std::make_pair(p_traits->begin(p_traits->extract_key(r_val)),
+ p_traits->end(p_traits->extract_key(r_val)));
+ }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ ~pat_trie_leaf() { }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_base.hpp
new file mode 100644
index 0000000..bb13068
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_base.hpp
@@ -0,0 +1,128 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_base.hpp
+ * Contains a pat_trie_node_base base for a patricia tree.
+ */
+
+#ifndef PB_DS_PAT_TRIE_NODE_BASE_HPP
+#define PB_DS_PAT_TRIE_NODE_BASE_HPP
+
+#include <ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Type_Traits, typename E_Access_Traits, \
+ typename Metadata, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ pat_trie_node_base<Type_Traits, E_Access_Traits, Metadata, Allocator>
+
+#define PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC \
+ pat_trie_subtree_debug_info<Type_Traits, E_Access_Traits, Allocator>
+
+ enum pat_trie_node_type
+ {
+ pat_trie_internal_node_type,
+ pat_trie_leaf_node_type,
+ pat_trie_head_node_type
+ };
+
+ template<typename Type_Traits,
+ typename E_Access_Traits,
+ typename Metadata,
+ typename Allocator>
+ struct pat_trie_node_base : public pat_trie_node_metadata_base<
+ Metadata,
+ Allocator>
+ {
+ public:
+ typedef
+ typename Allocator::template rebind<
+ pat_trie_node_base>::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ E_Access_Traits>::other::const_pointer
+ const_e_access_traits_pointer;
+
+#ifdef _GLIBCXX_DEBUG
+ typedef
+ std::pair<
+ typename E_Access_Traits::const_iterator,
+ typename E_Access_Traits::const_iterator>
+ subtree_debug_info;
+#endif
+
+ pat_trie_node_base(pat_trie_node_type type);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid(const_e_access_traits_pointer p_traits) const;
+
+ virtual subtree_debug_info
+ assert_valid_imp(const_e_access_traits_pointer p_traits) const = 0;
+#endif
+
+ node_pointer m_p_parent;
+ const pat_trie_node_type m_type;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ pat_trie_node_base(pat_trie_node_type type) : m_type(type)
+ { }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ assert_valid(const_e_access_traits_pointer p_traits) const
+ { assert_valid_imp(p_traits); }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_PAT_TRIE_SUBTREE_DEBUG_INFO_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp
new file mode 100644
index 0000000..3725009
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp
@@ -0,0 +1,338 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_iterators.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+#ifndef PB_DS_PAT_TRIE_NODE_ITERATORS_HPP
+#define PB_DS_PAT_TRIE_NODE_ITERATORS_HPP
+
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC \
+ pat_trie_const_node_it_< \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ Const_Iterator, \
+ Iterator, \
+ E_Access_Traits, \
+ Allocator>
+
+#define PB_DS_PAT_TRIE_NODE_ITERATOR_C_DEC \
+ pat_trie_node_it_< \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ Const_Iterator, \
+ Iterator, \
+ E_Access_Traits, \
+ Allocator>
+
+ // Const node iterator.
+ template<typename Node,
+ class Leaf,
+ class Head,
+ class Internal_Node,
+ class Const_Iterator,
+ class Iterator,
+ class E_Access_Traits,
+ class Allocator>
+ class pat_trie_const_node_it_
+ {
+ protected:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::const_pointer
+ const_leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::pointer
+ leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Internal_Node>::other::pointer
+ internal_node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Internal_Node>::other::const_pointer
+ const_internal_node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ E_Access_Traits>::other::const_pointer
+ const_e_access_traits_pointer;
+
+ private:
+ inline typename E_Access_Traits::const_iterator
+ pref_begin() const
+ {
+ if (m_p_nd->m_type == pat_trie_leaf_node_type)
+ return (m_p_traits->begin(
+ m_p_traits->extract_key(
+ static_cast<const_leaf_pointer>(m_p_nd)->value())));
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_internal_node_type);
+
+ return (static_cast<const_internal_node_pointer>(m_p_nd)->pref_b_it());
+ }
+
+ inline typename E_Access_Traits::const_iterator
+ pref_end() const
+ {
+ if (m_p_nd->m_type == pat_trie_leaf_node_type)
+ return (m_p_traits->end(
+ m_p_traits->extract_key(
+ static_cast<const_leaf_pointer>(m_p_nd)->value())));
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_internal_node_type);
+
+ return (static_cast<const_internal_node_pointer>(m_p_nd)->pref_e_it());
+ }
+
+ public:
+
+ // Size type.
+ typedef typename Allocator::size_type size_type;
+
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // __Iterator's value type.
+ typedef Const_Iterator value_type;
+
+ // __Iterator's reference type.
+ typedef value_type reference;
+
+ // __Iterator's __const reference type.
+ typedef value_type const_reference;
+
+ // Element access traits.
+ typedef E_Access_Traits e_access_traits;
+
+ // A key's element __const iterator.
+ typedef typename e_access_traits::const_iterator const_e_iterator;
+
+ // Metadata type.
+ typedef typename Node::metadata_type metadata_type;
+
+ // Const metadata reference type.
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::const_reference
+ const_metadata_reference;
+
+ // Default constructor.
+ /*
+ inline
+ pat_trie_const_node_it_()
+ */
+ inline
+ pat_trie_const_node_it_(node_pointer p_nd = NULL,
+ const_e_access_traits_pointer p_traits = NULL)
+ : m_p_nd(const_cast<node_pointer>(p_nd)), m_p_traits(p_traits)
+ { }
+
+ // Subtree valid prefix.
+ inline std::pair<const_e_iterator, const_e_iterator>
+ valid_prefix() const
+ { return std::make_pair(pref_begin(), pref_end()); }
+
+ // Const access; returns the __const iterator* associated with
+ // the current leaf.
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(num_children() == 0);
+ return Const_Iterator(m_p_nd);
+ }
+
+ // Metadata access.
+ inline const_metadata_reference
+ get_metadata() const
+ { return m_p_nd->get_metadata(); }
+
+ // Returns the number of children in the corresponding node.
+ inline size_type
+ num_children() const
+ {
+ if (m_p_nd->m_type == pat_trie_leaf_node_type)
+ return 0;
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_internal_node_type);
+ return std::distance(static_cast<internal_node_pointer>(m_p_nd)->begin(), static_cast<internal_node_pointer>(m_p_nd)->end());
+ }
+
+ // Returns a __const node __iterator to the corresponding node's
+ // i-th child.
+ PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC
+ get_child(size_type i) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_internal_node_type);
+ typename Internal_Node::iterator it =
+ static_cast<internal_node_pointer>(m_p_nd)->begin();
+
+ std::advance(it, i);
+ return PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC(*it, m_p_traits);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC& other) const
+ { return (m_p_nd == other.m_p_nd); }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC& other) const
+ { return m_p_nd != other.m_p_nd; }
+
+ private:
+
+ friend class PB_DS_CLASS_C_DEC;
+
+ public:
+ node_pointer m_p_nd;
+
+ const_e_access_traits_pointer m_p_traits;
+ };
+
+ // Node iterator.
+ template<typename Node,
+ class Leaf,
+ class Head,
+ class Internal_Node,
+ class Const_Iterator,
+ class Iterator,
+ class E_Access_Traits,
+ class Allocator>
+ class pat_trie_node_it_ :
+ public PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC
+
+ {
+ private:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ typedef Iterator iterator;
+
+ typedef PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC base_type;
+
+ typedef
+ typename base_type::const_e_access_traits_pointer
+ const_e_access_traits_pointer;
+
+ typedef typename base_type::internal_node_pointer internal_node_pointer;
+
+ public:
+
+ // Size type.
+ typedef
+ typename PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC::size_type
+ size_type;
+
+ // __Iterator's value type.
+ typedef Iterator value_type;
+
+ // __Iterator's reference type.
+ typedef value_type reference;
+
+ // __Iterator's __const reference type.
+ typedef value_type const_reference;
+
+ // Default constructor.
+ /*
+ inline
+ pat_trie_node_it_() ;
+ */
+
+ inline
+ pat_trie_node_it_(node_pointer p_nd = NULL, const_e_access_traits_pointer p_traits = NULL) : base_type(p_nd, p_traits)
+ { }
+
+ // Access; returns the iterator* associated with the current leaf.
+ inline reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::num_children() == 0);
+ return Iterator(base_type::m_p_nd);
+
+ }
+
+ // Returns a node __iterator to the corresponding node's i-th child.
+ PB_DS_PAT_TRIE_NODE_ITERATOR_C_DEC
+ get_child(size_type i) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_nd->m_type == pat_trie_internal_node_type);
+
+ typename Internal_Node::iterator it =
+ static_cast<internal_node_pointer>(base_type::m_p_nd)->begin();
+
+ std::advance(it, i);
+ return PB_DS_PAT_TRIE_NODE_ITERATOR_C_DEC(*it, base_type::m_p_traits);
+ }
+
+ private:
+ friend class PB_DS_CLASS_C_DEC;
+ };
+
+#undef PB_DS_PAT_TRIE_CONST_NODE_ITERATOR_C_DEC
+#undef PB_DS_PAT_TRIE_NODE_ITERATOR_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp
new file mode 100644
index 0000000..36272ed
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_metadata_base.hpp
+ * Contains an internal PB_DS_BASE_C_DEC for a patricia tree.
+ */
+
+#ifndef PB_DS_PAT_TRIE_NODE_METADATA_BASE_HPP
+#define PB_DS_PAT_TRIE_NODE_METADATA_BASE_HPP
+
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Metadata, class Allocator>
+ struct pat_trie_node_metadata_base
+ {
+ public:
+ typedef Metadata metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::const_reference
+ const_metadata_reference;
+
+ public:
+ inline const_metadata_reference
+ get_metadata() const
+ {
+ return (m_metadata);
+ }
+
+ public:
+ metadata_type m_metadata;
+ };
+
+ template<typename Allocator>
+ struct pat_trie_node_metadata_base<
+ null_node_metadata,
+ Allocator>
+ {
+ public:
+ typedef null_node_metadata metadata_type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_PAT_TRIE_NODE_BASE_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
new file mode 100644
index 0000000..f6f4209
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp
@@ -0,0 +1,515 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file pat_trie_.hpp
+ * Contains an implementation class for a patricia tree.
+ */
+
+/**
+ * This implementation loosely borrows ideas from:
+ * 1) "Fast Mergeable Integer Maps", Okasaki, Gill 1998
+ * 2) "Ptset: Sets of integers implemented as Patricia trees",
+ * Jean-Christophe Filliatr, 2000
+ **/
+
+#include <ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp>
+#include <ext/pb_ds/detail/pat_trie_/node_base.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/eq_fn/eq_by_less.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <iterator>
+#include <utility>
+#include <algorithm>
+#include <functional>
+#include <assert.h>
+#include <list>
+#ifdef _GLIBCXX_DEBUG
+#include <ext/pb_ds/detail/debug_map_base.hpp>
+#endif
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, typename Node_And_It_Traits, \
+ typename Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME pat_trie_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME pat_trie_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Node_And_It_Traits, Allocator>
+
+#define PB_DS_TYPES_TRAITS_C_DEC \
+ types_traits<Key, Mapped, Allocator, false>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_DEBUG_MAP_BASE_C_DEC \
+ debug_map_base<Key, eq_by_less<Key, \
+ std::less<Key> >, typename Allocator::template rebind<Key>::other::const_reference>
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+ /**
+ * class description = PATRICIA trie implementation.">
+ **/
+ template<typename Key,
+ typename Mapped,
+ typename Node_And_It_Traits,
+ typename Allocator>
+ class PB_DS_CLASS_NAME :
+#ifdef _GLIBCXX_DEBUG
+ public PB_DS_DEBUG_MAP_BASE_C_DEC,
+#endif
+ public Node_And_It_Traits::synth_e_access_traits,
+ public Node_And_It_Traits::node_update,
+ public PB_DS_TYPES_TRAITS_C_DEC
+ {
+ private:
+ typedef PB_DS_TYPES_TRAITS_C_DEC traits_base;
+
+ typedef typename Node_And_It_Traits::synth_e_access_traits synth_e_access_traits;
+ typedef typename Allocator::template rebind<synth_e_access_traits>::other::const_pointer const_e_access_traits_pointer;
+ typedef typename synth_e_access_traits::const_iterator const_e_iterator;
+
+ typedef typename Node_And_It_Traits::node node;
+ typedef typename Allocator::template rebind<node>::other::const_pointer const_node_pointer;
+
+ typedef typename Allocator::template rebind<node>::other::pointer node_pointer;
+
+ typedef typename Node_And_It_Traits::head head;
+ typedef typename Allocator::template rebind<head>::other head_allocator;
+ typedef typename head_allocator::pointer head_pointer;
+
+ typedef typename Node_And_It_Traits::leaf leaf;
+ typedef typename Allocator::template rebind<leaf>::other leaf_allocator;
+ typedef typename leaf_allocator::const_pointer const_leaf_pointer;
+ typedef typename leaf_allocator::pointer leaf_pointer;
+
+ typedef typename Node_And_It_Traits::internal_node internal_node;
+ typedef typename Allocator::template rebind<internal_node>::other internal_node_allocator;
+ typedef typename internal_node_allocator::const_pointer const_internal_node_pointer;
+ typedef typename internal_node_allocator::pointer internal_node_pointer;
+
+#include <ext/pb_ds/detail/pat_trie_/cond_dtor_entry_dealtor.hpp>
+
+#ifdef _GLIBCXX_DEBUG
+ typedef PB_DS_DEBUG_MAP_BASE_C_DEC debug_base;
+#endif
+
+#include <ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp>
+
+ typedef typename Node_And_It_Traits::null_node_update_pointer null_node_update_pointer;
+
+ public:
+ typedef pat_trie_tag container_category;
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef typename traits_base::key_type key_type;
+ typedef typename traits_base::key_pointer key_pointer;
+ typedef typename traits_base::const_key_pointer const_key_pointer;
+ typedef typename traits_base::key_reference key_reference;
+ typedef typename traits_base::const_key_reference const_key_reference;
+ typedef typename traits_base::mapped_type mapped_type;
+ typedef typename traits_base::mapped_pointer mapped_pointer;
+ typedef typename traits_base::const_mapped_pointer const_mapped_pointer;
+ typedef typename traits_base::mapped_reference mapped_reference;
+ typedef typename traits_base::const_mapped_reference const_mapped_reference;
+ typedef typename traits_base::value_type value_type;
+ typedef typename traits_base::pointer pointer;
+ typedef typename traits_base::const_pointer const_pointer;
+ typedef typename traits_base::reference reference;
+ typedef typename traits_base::const_reference const_reference;
+
+ typedef typename Node_And_It_Traits::const_iterator const_point_iterator;
+ typedef typename Node_And_It_Traits::iterator point_iterator;
+ typedef const_point_iterator const_iterator;
+ typedef point_iterator iterator;
+
+ typedef typename Node_And_It_Traits::const_reverse_iterator const_reverse_iterator;
+ typedef typename Node_And_It_Traits::reverse_iterator reverse_iterator;
+ typedef typename Node_And_It_Traits::const_node_iterator const_node_iterator;
+ typedef typename Node_And_It_Traits::node_iterator node_iterator;
+ typedef typename Node_And_It_Traits::e_access_traits e_access_traits;
+ typedef typename Node_And_It_Traits::node_update node_update;
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const e_access_traits&);
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ ~PB_DS_CLASS_NAME();
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ inline size_type
+ max_size() const;
+
+ e_access_traits&
+ get_e_access_traits();
+
+ const e_access_traits&
+ get_e_access_traits() const;
+
+ node_update&
+ get_node_update();
+
+ const node_update&
+ get_node_update() const;
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference);
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ return insert(std::make_pair(r_key, mapped_type())).first->second;
+#else
+ insert(r_key);
+ return traits_base::s_null_mapped;
+#endif
+ }
+
+ inline point_iterator
+ find(const_key_reference);
+
+ inline const_point_iterator
+ find(const_key_reference) const;
+
+ inline point_iterator
+ lower_bound(const_key_reference);
+
+ inline const_point_iterator
+ lower_bound(const_key_reference) const;
+
+ inline point_iterator
+ upper_bound(const_key_reference);
+
+ inline const_point_iterator
+ upper_bound(const_key_reference) const;
+
+ void
+ clear();
+
+ inline bool
+ erase(const_key_reference);
+
+ inline const_iterator
+ erase(const_iterator);
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ inline iterator
+ erase(iterator);
+#endif
+
+ inline const_reverse_iterator
+ erase(const_reverse_iterator);
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ inline reverse_iterator
+ erase(reverse_iterator);
+#endif
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ void
+ join(PB_DS_CLASS_C_DEC&);
+
+ void
+ split(const_key_reference, PB_DS_CLASS_C_DEC&);
+
+ inline iterator
+ begin();
+
+ inline const_iterator
+ begin() const;
+
+ inline iterator
+ end();
+
+ inline const_iterator
+ end() const;
+
+ inline reverse_iterator
+ rbegin();
+
+ inline const_reverse_iterator
+ rbegin() const;
+
+ inline reverse_iterator
+ rend();
+
+ inline const_reverse_iterator
+ rend() const;
+
+ inline const_node_iterator
+ node_begin() const;
+
+ inline node_iterator
+ node_begin();
+
+ inline const_node_iterator
+ node_end() const;
+
+ inline node_iterator
+ node_end();
+
+#ifdef PB_DS_PAT_TRIE_TRACE_
+ void
+ trace() const;
+#endif
+
+ protected:
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ void
+ value_swap(PB_DS_CLASS_C_DEC&);
+
+ node_pointer
+ recursive_copy_node(const_node_pointer);
+
+ private:
+
+ void
+ initialize();
+
+ inline void
+ apply_update(node_pointer, null_node_update_pointer);
+
+ template<typename Node_Update_>
+ inline void
+ apply_update(node_pointer, Node_Update_*);
+
+ bool
+ join_prep(PB_DS_CLASS_C_DEC&, split_join_branch_bag&);
+
+ void
+ rec_join_prep(const_node_pointer, const_node_pointer,
+ split_join_branch_bag&);
+
+ void
+ rec_join_prep(const_leaf_pointer, const_leaf_pointer,
+ split_join_branch_bag&);
+
+ void
+ rec_join_prep(const_leaf_pointer, const_internal_node_pointer,
+ split_join_branch_bag&);
+
+ void
+ rec_join_prep(const_internal_node_pointer, const_leaf_pointer,
+ split_join_branch_bag&);
+
+ void
+ rec_join_prep(const_internal_node_pointer, const_internal_node_pointer,
+ split_join_branch_bag&);
+
+ node_pointer
+ rec_join(node_pointer, node_pointer, size_type, split_join_branch_bag&);
+
+ node_pointer
+ rec_join(leaf_pointer, leaf_pointer, split_join_branch_bag&);
+
+ node_pointer
+ rec_join(leaf_pointer, internal_node_pointer, size_type,
+ split_join_branch_bag&);
+
+ node_pointer
+ rec_join(internal_node_pointer, leaf_pointer, size_type,
+ split_join_branch_bag&);
+
+ node_pointer
+ rec_join(internal_node_pointer, internal_node_pointer,
+ split_join_branch_bag&);
+
+ size_type
+ keys_diff_ind(typename e_access_traits::const_iterator, typename e_access_traits::const_iterator, typename e_access_traits::const_iterator, typename e_access_traits::const_iterator);
+
+ internal_node_pointer
+ insert_branch(node_pointer, node_pointer, split_join_branch_bag&);
+
+ void
+ update_min_max_for_inserted_leaf(leaf_pointer);
+
+ void
+ erase_leaf(leaf_pointer);
+
+ inline void
+ actual_erase_leaf(leaf_pointer);
+
+ void
+ clear_imp(node_pointer);
+
+ void
+ erase_fixup(internal_node_pointer);
+
+ void
+ update_min_max_for_erased_leaf(leaf_pointer);
+
+ static inline const_e_iterator
+ pref_begin(const_node_pointer);
+
+ static inline const_e_iterator
+ pref_end(const_node_pointer);
+
+ inline node_pointer
+ find_imp(const_key_reference);
+
+ inline node_pointer
+ lower_bound_imp(const_key_reference);
+
+ inline node_pointer
+ upper_bound_imp(const_key_reference);
+
+ inline static const_leaf_pointer
+ leftmost_descendant(const_node_pointer);
+
+ inline static leaf_pointer
+ leftmost_descendant(node_pointer);
+
+ inline static const_leaf_pointer
+ rightmost_descendant(const_node_pointer);
+
+ inline static leaf_pointer
+ rightmost_descendant(node_pointer);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ assert_iterators() const;
+
+ void
+ assert_reverse_iterators() const;
+
+ static size_type
+ recursive_count_leafs(const_node_pointer);
+#endif
+
+#ifdef PB_DS_PAT_TRIE_TRACE_
+ static void
+ trace_node(const_node_pointer, size_type);
+
+ template<typename Metadata_>
+ static void
+ trace_node_metadata(const_node_pointer, type_to_type<Metadata_>);
+
+ static void
+ trace_node_metadata(const_node_pointer, type_to_type<null_node_metadata>);
+#endif
+
+ leaf_pointer
+ split_prep(const_key_reference, PB_DS_CLASS_C_DEC&,
+ split_join_branch_bag&);
+
+ node_pointer
+ rec_split(node_pointer, const_e_iterator, const_e_iterator,
+ PB_DS_CLASS_C_DEC&, split_join_branch_bag&);
+
+ void
+ split_insert_branch(size_type, const_e_iterator,
+ typename internal_node::iterator,
+ size_type, split_join_branch_bag&);
+
+ static head_allocator s_head_allocator;
+ static internal_node_allocator s_internal_node_allocator;
+ static leaf_allocator s_leaf_allocator;
+
+ head_pointer m_p_head;
+ size_type m_size;
+ };
+
+#include <ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp>
+#include <ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_TYPES_TRAITS_C_DEC
+#undef PB_DS_DEBUG_MAP_BASE_C_DEC
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp
new file mode 100644
index 0000000..cada907
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp
@@ -0,0 +1,484 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file point_iterators.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+#ifndef PB_DS_PAT_TRIE_FIND_ITERATORS_HPP
+#define PB_DS_PAT_TRIE_FIND_ITERATORS_HPP
+
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CONST_IT_C_DEC \
+ pat_trie_const_it_< \
+ Type_Traits, \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_CONST_ODIR_IT_C_DEC \
+ pat_trie_const_it_< \
+ Type_Traits, \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ !Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_IT_C_DEC \
+ pat_trie_it_< \
+ Type_Traits, \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ Is_Forward_Iterator, \
+ Allocator>
+
+#define PB_DS_ODIR_IT_C_DEC \
+ pat_trie_it_< \
+ Type_Traits, \
+ Node, \
+ Leaf, \
+ Head, \
+ Internal_Node, \
+ !Is_Forward_Iterator, \
+ Allocator>
+
+
+ // Const iterator.
+ template<typename Type_Traits,
+ class Node,
+ class Leaf,
+ class Head,
+ class Internal_Node,
+ bool Is_Forward_Iterator,
+ class Allocator>
+ class pat_trie_const_it_
+ {
+
+ private:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::const_pointer
+ const_leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::pointer
+ leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Head>::other::pointer
+ head_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Internal_Node>::other::pointer
+ internal_node_pointer;
+
+ public:
+
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef typename Type_Traits::value_type value_type;
+
+ typedef typename Type_Traits::pointer pointer;
+
+ typedef typename Type_Traits::const_pointer const_pointer;
+
+ typedef typename Type_Traits::reference reference;
+
+ typedef typename Type_Traits::const_reference const_reference;
+
+ public:
+
+ inline
+ pat_trie_const_it_(node_pointer p_nd = NULL) : m_p_nd(p_nd)
+ { }
+
+ inline
+ pat_trie_const_it_(const PB_DS_CONST_ODIR_IT_C_DEC& other)
+ : m_p_nd(other.m_p_nd)
+ { }
+
+ inline
+ PB_DS_CONST_IT_C_DEC&
+ operator=(const PB_DS_CONST_IT_C_DEC& other)
+ {
+ m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline
+ PB_DS_CONST_IT_C_DEC&
+ operator=(const PB_DS_CONST_ODIR_IT_C_DEC& other)
+ {
+ m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline const_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_leaf_node_type);
+ return &static_cast<leaf_pointer>(m_p_nd)->value();
+ }
+
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_nd->m_type == pat_trie_leaf_node_type);
+ return static_cast<leaf_pointer>(m_p_nd)->value();
+ }
+
+ inline bool
+ operator==(const PB_DS_CONST_IT_C_DEC& other) const
+ { return (m_p_nd == other.m_p_nd); }
+
+ inline bool
+ operator==(const PB_DS_CONST_ODIR_IT_C_DEC& other) const
+ { return (m_p_nd == other.m_p_nd); }
+
+ inline bool
+ operator!=(const PB_DS_CONST_IT_C_DEC& other) const
+ { return (m_p_nd != other.m_p_nd); }
+
+ inline bool
+ operator!=(const PB_DS_CONST_ODIR_IT_C_DEC& other) const
+ { return (m_p_nd != other.m_p_nd); }
+
+ inline PB_DS_CONST_IT_C_DEC&
+ operator++()
+ {
+ inc(integral_constant<int,Is_Forward_Iterator>());
+ return *this;
+ }
+
+ inline PB_DS_CONST_IT_C_DEC
+ operator++(int)
+ {
+ PB_DS_CONST_IT_C_DEC ret_it(m_p_nd);
+ operator++();
+ return ret_it;
+ }
+
+ inline PB_DS_CONST_IT_C_DEC&
+ operator--()
+ {
+ dec(integral_constant<int,Is_Forward_Iterator>());
+ return *this;
+ }
+
+ inline PB_DS_CONST_IT_C_DEC
+ operator--(int)
+ {
+ PB_DS_CONST_IT_C_DEC ret_it(m_p_nd);
+ operator--();
+ return ret_it;
+ }
+
+ protected:
+ inline void
+ inc(false_type)
+ { dec(true_type()); }
+
+ void
+ inc(true_type)
+ {
+ if (m_p_nd->m_type == pat_trie_head_node_type)
+ {
+ m_p_nd = static_cast<head_pointer>(m_p_nd)->m_p_min;
+ return;
+ }
+
+ node_pointer p_y = m_p_nd->m_p_parent;
+ while (p_y->m_type != pat_trie_head_node_type &&
+ get_larger_sibling(m_p_nd) == NULL)
+ {
+ m_p_nd = p_y;
+ p_y = p_y->m_p_parent;
+ }
+
+ if (p_y->m_type == pat_trie_head_node_type)
+ {
+ m_p_nd = p_y;
+ return;
+ }
+ m_p_nd = leftmost_descendant(get_larger_sibling(m_p_nd));
+ }
+
+ inline void
+ dec(false_type)
+ { inc(true_type()); }
+
+ void
+ dec(true_type)
+ {
+ if (m_p_nd->m_type == pat_trie_head_node_type)
+ {
+ m_p_nd = static_cast<head_pointer>(m_p_nd)->m_p_max;
+ return;
+ }
+
+ node_pointer p_y = m_p_nd->m_p_parent;
+ while (p_y->m_type != pat_trie_head_node_type &&
+ get_smaller_sibling(m_p_nd) == NULL)
+ {
+ m_p_nd = p_y;
+ p_y = p_y->m_p_parent;
+ }
+
+ if (p_y->m_type == pat_trie_head_node_type)
+ {
+ m_p_nd = p_y;
+ return;
+ }
+ m_p_nd = rightmost_descendant(get_smaller_sibling(m_p_nd));
+ }
+
+ inline static node_pointer
+ get_larger_sibling(node_pointer p_nd)
+ {
+ internal_node_pointer p_parent =
+ static_cast<internal_node_pointer>(p_nd->m_p_parent);
+
+ typename Internal_Node::iterator it = p_parent->begin();
+ while (*it != p_nd)
+ ++it;
+
+ typename Internal_Node::iterator next_it = it;
+ ++next_it;
+ return ((next_it == p_parent->end())? NULL :* next_it);
+ }
+
+ inline static node_pointer
+ get_smaller_sibling(node_pointer p_nd)
+ {
+ internal_node_pointer p_parent =
+ static_cast<internal_node_pointer>(p_nd->m_p_parent);
+
+ typename Internal_Node::iterator it = p_parent->begin();
+
+ if (*it == p_nd)
+ return (NULL);
+ typename Internal_Node::iterator prev_it;
+ do
+ {
+ prev_it = it;
+ ++it;
+ if (*it == p_nd)
+ return (*prev_it);
+ }
+ while (true);
+
+ _GLIBCXX_DEBUG_ASSERT(false);
+ return (NULL);
+ }
+
+ inline static leaf_pointer
+ leftmost_descendant(node_pointer p_nd)
+ {
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<leaf_pointer>(p_nd);
+ return static_cast<internal_node_pointer>(p_nd)->leftmost_descendant();
+ }
+
+ inline static leaf_pointer
+ rightmost_descendant(node_pointer p_nd)
+ {
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ return static_cast<leaf_pointer>(p_nd);
+ return static_cast<internal_node_pointer>(p_nd)->rightmost_descendant();
+ }
+
+ public:
+ node_pointer m_p_nd;
+ };
+
+ // Iterator.
+ template<typename Type_Traits,
+ class Node,
+ class Leaf,
+ class Head,
+ class Internal_Node,
+ bool Is_Forward_Iterator,
+ class Allocator>
+ class pat_trie_it_ :
+ public PB_DS_CONST_IT_C_DEC
+
+ {
+ private:
+ typedef
+ typename Allocator::template rebind<
+ Node>::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::const_pointer
+ const_leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Leaf>::other::pointer
+ leaf_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Head>::other::pointer
+ head_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ Internal_Node>::other::pointer
+ internal_node_pointer;
+
+ public:
+ typedef typename Type_Traits::value_type value_type;
+
+ typedef typename Type_Traits::const_pointer const_pointer;
+
+ typedef typename Type_Traits::pointer pointer;
+
+ typedef typename Type_Traits::const_reference const_reference;
+
+ typedef typename Type_Traits::reference reference;
+
+ inline
+ pat_trie_it_(node_pointer p_nd = NULL) : PB_DS_CONST_IT_C_DEC((node_pointer)p_nd)
+ { }
+
+ inline
+ pat_trie_it_(const PB_DS_ODIR_IT_C_DEC& other) : PB_DS_CONST_IT_C_DEC(other.m_p_nd)
+ { }
+
+ inline
+ PB_DS_IT_C_DEC&
+ operator=(const PB_DS_IT_C_DEC& other)
+ {
+ base_it_type::m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline
+ PB_DS_IT_C_DEC&
+ operator=(const PB_DS_ODIR_IT_C_DEC& other)
+ {
+ base_it_type::m_p_nd = other.m_p_nd;
+ return *this;
+ }
+
+ inline pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_it_type::m_p_nd->m_type == pat_trie_leaf_node_type);
+
+ return &static_cast<leaf_pointer>(base_it_type::m_p_nd)->value();
+ }
+
+ inline reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_it_type::m_p_nd->m_type == pat_trie_leaf_node_type);
+ return static_cast<leaf_pointer>(base_it_type::m_p_nd)->value();
+ }
+
+ inline PB_DS_IT_C_DEC&
+ operator++()
+ {
+ PB_DS_CONST_IT_C_DEC::
+ operator++();
+ return *this;
+ }
+
+ inline PB_DS_IT_C_DEC
+ operator++(int)
+ {
+ PB_DS_IT_C_DEC ret_it(base_it_type::m_p_nd);
+ operator++();
+ return ret_it;
+ }
+
+ inline PB_DS_IT_C_DEC&
+ operator--()
+ {
+ PB_DS_CONST_IT_C_DEC::operator--();
+ return *this;
+ }
+
+ inline PB_DS_IT_C_DEC
+ operator--(int)
+ {
+ PB_DS_IT_C_DEC ret_it(base_it_type::m_p_nd);
+ operator--();
+ return ret_it;
+ }
+
+ protected:
+ typedef PB_DS_CONST_IT_C_DEC base_it_type;
+
+ friend class PB_DS_CLASS_C_DEC;
+ };
+
+#undef PB_DS_CONST_IT_C_DEC
+#undef PB_DS_CONST_ODIR_IT_C_DEC
+#undef PB_DS_IT_C_DEC
+#undef PB_DS_ODIR_IT_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp
new file mode 100644
index 0000000..79bfe42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp
@@ -0,0 +1,63 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file policy_access_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::e_access_traits&
+PB_DS_CLASS_C_DEC::
+get_e_access_traits()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const typename PB_DS_CLASS_C_DEC::e_access_traits&
+PB_DS_CLASS_C_DEC::
+get_e_access_traits() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_update&
+PB_DS_CLASS_C_DEC::
+get_node_update()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const typename PB_DS_CLASS_C_DEC::node_update&
+PB_DS_CLASS_C_DEC::
+get_node_update() const
+{ return *this; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
new file mode 100644
index 0000000..52edf25
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file r_erase_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+actual_erase_node(node_pointer p_z)
+{
+ _GLIBCXX_DEBUG_ASSERT(m_size > 0);
+ --m_size;
+ _GLIBCXX_DEBUG_ONLY(erase_existing(PB_DS_V2F(p_z->m_value)));
+ p_z->~node();
+ s_node_allocator.deallocate(p_z, 1);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_min_max_for_erased_node(node_pointer p_z)
+{
+ if (m_size == 1)
+ {
+ m_p_head->m_p_left = m_p_head->m_p_right = m_p_head;
+ return;
+ }
+
+ if (m_p_head->m_p_left == p_z)
+ {
+ iterator it(p_z);
+ ++it;
+ m_p_head->m_p_left = it.m_p_nd;
+ }
+ else if (m_p_head->m_p_right == p_z)
+ {
+ iterator it(p_z);
+ --it;
+ m_p_head->m_p_right = it.m_p_nd;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true, true);)
+ clear_imp(m_p_head->m_p_parent);
+ m_size = 0;
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(debug_base::clear();)
+ _GLIBCXX_DEBUG_ONLY(assert_valid(true, true);)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear_imp(node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return;
+ clear_imp(p_nd->m_p_left);
+ clear_imp(p_nd->m_p_right);
+ p_nd->~Node();
+ s_node_allocator.deallocate(p_nd, 1);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp
new file mode 100644
index 0000000..c0809fa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file rotate_fn_imps.hpp
+ * Contains imps for rotating nodes.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_left(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_right;
+ p_x->m_p_right = p_y->m_p_left;
+
+ if (p_y->m_p_left != NULL)
+ p_y->m_p_left->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_left)
+ p_x->m_p_parent->m_p_left = p_y;
+ else
+ p_x->m_p_parent->m_p_right = p_y;
+
+ p_y->m_p_left = p_x;
+ p_x->m_p_parent = p_y;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_x);)
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (Node_Update* )this);
+ apply_update(p_x->m_p_parent, (Node_Update* )this);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_right(node_pointer p_x)
+{
+ node_pointer p_y = p_x->m_p_left;
+ p_x->m_p_left = p_y->m_p_right;
+
+ if (p_y->m_p_right != NULL)
+ p_y->m_p_right->m_p_parent = p_x;
+
+ p_y->m_p_parent = p_x->m_p_parent;
+ if (p_x == m_p_head->m_p_parent)
+ m_p_head->m_p_parent = p_y;
+ else if (p_x == p_x->m_p_parent->m_p_right)
+ p_x->m_p_parent->m_p_right = p_y;
+ else
+ p_x->m_p_parent->m_p_left = p_y;
+
+ p_y->m_p_right = p_x;
+ p_x->m_p_parent = p_y;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_x);)
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y);)
+
+ apply_update(p_x, (Node_Update* )this);
+ apply_update(p_x->m_p_parent, (Node_Update* )this);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+rotate_parent(node_pointer p_nd)
+{
+ node_pointer p_parent = p_nd->m_p_parent;
+ if (p_nd == p_parent->m_p_left)
+ rotate_right(p_parent);
+ else
+ rotate_left(p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_parent = p_nd);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_left == p_parent || p_nd->m_p_right == p_parent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer /*p_nd*/, __gnu_pbds::null_node_update* /*p_update*/)
+{ }
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer p_nd, Node_Update_* p_update)
+{
+ p_update->operator()(& PB_DS_V2F(p_nd->m_value),(p_nd->m_p_left == NULL) ?
+ NULL :
+ & PB_DS_V2F(p_nd->m_p_left->m_value),(p_nd->m_p_right == NULL) ?
+ NULL :
+ & PB_DS_V2F(p_nd->m_p_right->m_value));
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+inline void
+PB_DS_CLASS_C_DEC::
+update_to_top(node_pointer p_nd, Node_Update_* p_update)
+{
+ while (p_nd != m_p_head)
+ {
+ apply_update(p_nd, p_update);
+ p_nd = p_nd->m_p_parent;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_to_top(node_pointer /*p_nd*/, __gnu_pbds::null_node_update* /*p_update*/)
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
new file mode 100644
index 0000000..9779a4b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp
@@ -0,0 +1,254 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_fn_imps.hpp
+ * Contains an implementation class for bin_search_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ split_join_branch_bag bag;
+ leaf_pointer p_split_lf = split_prep(r_key, other, bag);
+ if (p_split_lf == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(bag.empty());
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(!bag.empty());
+ other.clear();
+ m_p_head->m_p_parent = rec_split(m_p_head->m_p_parent,
+ pref_begin(p_split_lf),
+ pref_end(p_split_lf),
+ other,
+ bag);
+
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+
+ other.m_p_head->m_p_max = m_p_head->m_p_max;
+ m_p_head->m_p_max = rightmost_descendant(m_p_head->m_p_parent);
+ other.m_p_head->m_p_min =
+ other.leftmost_descendant(other.m_p_head->m_p_parent);
+
+ other.m_size = std::distance(other.PB_DS_CLASS_C_DEC::begin(),
+ other.PB_DS_CLASS_C_DEC::end());
+ m_size -= other.m_size;
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::leaf_pointer
+PB_DS_CLASS_C_DEC::
+split_prep(const_key_reference r_key, PB_DS_CLASS_C_DEC& other, split_join_branch_bag& r_bag)
+{
+ _GLIBCXX_DEBUG_ASSERT(r_bag.empty());
+ if (m_size == 0)
+ {
+ other.clear();
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ return (NULL);
+ }
+
+ if (synth_e_access_traits::cmp_keys(r_key,
+ PB_DS_V2F(static_cast<const_leaf_pointer>(m_p_head->m_p_min)->value())))
+ {
+ other.clear();
+ value_swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ return (NULL);
+ }
+
+ if (!synth_e_access_traits::cmp_keys(r_key,
+ PB_DS_V2F(static_cast<const_leaf_pointer>(m_p_head->m_p_max)->value())))
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid(););
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid(););
+ return (NULL);
+ }
+
+ iterator it = lower_bound(r_key);
+
+ if (!synth_e_access_traits::equal_keys(PB_DS_V2F(*it), r_key))
+ --it;
+
+ node_pointer p_nd = it.m_p_nd;
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_leaf_node_type);
+ leaf_pointer p_ret_l = static_cast<leaf_pointer>(p_nd);
+ while (p_nd->m_type != pat_trie_head_node_type)
+ {
+ r_bag.add_branch();
+ p_nd = p_nd->m_p_parent;
+ }
+ _GLIBCXX_DEBUG_ONLY(debug_base::split(r_key,(synth_e_access_traits& )(*this), other);)
+
+ return (p_ret_l);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+rec_split(node_pointer p_nd, const_e_iterator b_it, const_e_iterator e_it, PB_DS_CLASS_C_DEC& other, split_join_branch_bag& r_bag)
+{
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ {
+ _GLIBCXX_DEBUG_ASSERT(other.m_p_head->m_p_parent == NULL);
+ return (p_nd);
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_type == pat_trie_internal_node_type);
+ internal_node_pointer p_internal_nd = static_cast<internal_node_pointer>(p_nd);
+
+ node_pointer p_child_ret = rec_split(p_internal_nd->get_child_node(b_it, e_it, this), b_it, e_it, other, r_bag);
+
+ _GLIBCXX_DEBUG_ONLY(p_child_ret->assert_valid(this);)
+ p_internal_nd->replace_child(p_child_ret, b_it, e_it, this);
+ apply_update(p_internal_nd, (node_update* )this);
+
+ typename internal_node::iterator child_it =
+ p_internal_nd->get_child_it(b_it, e_it, this);
+
+ const size_type lhs_num_children =
+ std::distance(p_internal_nd->begin(), child_it) + 1;
+
+ _GLIBCXX_DEBUG_ASSERT(lhs_num_children > 0);
+
+ size_type rhs_num_children =
+ std::distance(p_internal_nd->begin(), p_internal_nd->end()) -
+ lhs_num_children;
+
+ if (rhs_num_children == 0)
+ {
+ apply_update(p_internal_nd, (node_update* )this);
+ return (p_internal_nd);
+ }
+
+ ++child_it;
+ other.split_insert_branch(p_internal_nd->get_e_ind(),
+ b_it, child_it, rhs_num_children, r_bag);
+
+ child_it = p_internal_nd->get_child_it(b_it, e_it, this);
+ ++child_it;
+ while (rhs_num_children != 0)
+ {
+ child_it = p_internal_nd->remove_child(child_it);
+ --rhs_num_children;
+ }
+
+ apply_update(p_internal_nd, (node_update* )this);
+ _GLIBCXX_DEBUG_ASSERT(std::distance(p_internal_nd->begin(),
+ p_internal_nd->end()) >= 1);
+
+ if (std::distance(p_internal_nd->begin(), p_internal_nd->end()) > 1)
+ {
+ p_internal_nd->update_prefixes(this);
+ _GLIBCXX_DEBUG_ONLY(p_internal_nd->assert_valid(this);)
+ apply_update(p_internal_nd, (node_update* )this);
+ return (p_internal_nd);
+ }
+
+ node_pointer p_ret =* p_internal_nd->begin();
+ p_internal_nd->~internal_node();
+ s_internal_node_allocator.deallocate(p_internal_nd, 1);
+ apply_update(p_ret, (node_update* )this);
+ return (p_ret);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split_insert_branch(size_type e_ind, const_e_iterator b_it, typename internal_node::iterator child_b_it, size_type num_children, split_join_branch_bag& r_bag)
+{
+#ifdef _GLIBCXX_DEBUG
+ if (m_p_head->m_p_parent != NULL)
+ m_p_head->m_p_parent->assert_valid(this);
+#endif
+
+ const size_type total_num_children =((m_p_head->m_p_parent == NULL)? 0 : 1) + num_children;
+
+ if (total_num_children == 0)
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_parent == NULL);
+ return;
+ }
+
+ if (total_num_children == 1)
+ {
+ if (m_p_head->m_p_parent != NULL)
+ {
+ _GLIBCXX_DEBUG_ONLY(m_p_head->m_p_parent->assert_valid(this);)
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_head->m_p_parent == NULL);
+ m_p_head->m_p_parent =* child_b_it;
+ m_p_head->m_p_parent->m_p_parent = m_p_head;
+ apply_update(m_p_head->m_p_parent, (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(m_p_head->m_p_parent->assert_valid(this);)
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(total_num_children > 1);
+ internal_node_pointer p_new_root = r_bag.get_branch();
+ new (p_new_root) internal_node(e_ind, b_it);
+ size_type num_inserted = 0;
+ while (num_inserted++ < num_children)
+ {
+ _GLIBCXX_DEBUG_ONLY((*child_b_it)->assert_valid(this);)
+ p_new_root->add_child(*child_b_it, pref_begin(*child_b_it),
+ pref_end(*child_b_it), this);
+ ++child_b_it;
+ }
+
+ if (m_p_head->m_p_parent != NULL)
+ p_new_root->add_child(m_p_head->m_p_parent,
+ pref_begin(m_p_head->m_p_parent),
+ pref_end(m_p_head->m_p_parent), this);
+
+ m_p_head->m_p_parent = p_new_root;
+ p_new_root->m_p_parent = m_p_head;
+ apply_update(m_p_head->m_p_parent, (node_update* )this);
+ _GLIBCXX_DEBUG_ONLY(m_p_head->m_p_parent->assert_valid(this);)
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp
new file mode 100644
index 0000000..9cecae5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_branch_bag.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+class split_join_branch_bag
+{
+private:
+ typedef
+ std::list<
+ internal_node_pointer,
+ typename Allocator::template rebind<
+ internal_node_pointer>::other>
+ bag_t;
+
+public:
+
+ void
+ add_branch()
+ {
+ internal_node_pointer p_nd = s_internal_node_allocator.allocate(1);
+ __try
+ {
+ m_bag.push_back(p_nd);
+ }
+ __catch(...)
+ {
+ s_internal_node_allocator.deallocate(p_nd, 1);
+ __throw_exception_again;
+ }
+ }
+
+ internal_node_pointer
+ get_branch()
+ {
+ _GLIBCXX_DEBUG_ASSERT(!m_bag.empty());
+ internal_node_pointer p_nd =* m_bag.begin();
+ m_bag.pop_front();
+ return p_nd;
+ }
+
+ ~split_join_branch_bag()
+ {
+ while (!m_bag.empty())
+ {
+ internal_node_pointer p_nd =* m_bag.begin();
+ s_internal_node_allocator.deallocate(p_nd, 1);
+ m_bag.pop_front();
+ }
+ }
+
+ inline bool
+ empty() const
+ { return m_bag.empty(); }
+
+private:
+ bag_t m_bag;
+};
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp
new file mode 100644
index 0000000..abf5f11
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp
@@ -0,0 +1,229 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file synth_e_access_traits.hpp
+ * Contains an implementation class for a patricia tree.
+ */
+
+#ifndef PB_DS_SYNTH_E_ACCESS_TRAITS_HPP
+#define PB_DS_SYNTH_E_ACCESS_TRAITS_HPP
+
+#include <ext/pb_ds/detail/type_utils.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC \
+ template<typename Type_Traits, bool Set, class E_Access_Traits>
+
+#define PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC \
+ synth_e_access_traits< \
+ Type_Traits, \
+ Set, \
+ E_Access_Traits>
+
+ template<typename Type_Traits, bool Set, class E_Access_Traits>
+ struct synth_e_access_traits : public E_Access_Traits
+ {
+
+ private:
+ typedef E_Access_Traits base_type;
+
+ typedef Type_Traits type_traits;
+
+ typedef typename type_traits::const_key_reference const_key_reference;
+
+ typedef typename type_traits::const_reference const_reference;
+
+ public:
+ synth_e_access_traits();
+
+ synth_e_access_traits(const E_Access_Traits& r_traits);
+
+ inline bool
+ equal_prefixes(typename base_type::const_iterator b_l, typename base_type::const_iterator e_l, typename base_type::const_iterator b_r, typename base_type::const_iterator e_r, bool compare_after = true) const;
+
+ bool
+ equal_keys(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const;
+
+ bool
+ cmp_prefixes(typename base_type::const_iterator b_l, typename base_type::const_iterator e_l, typename base_type::const_iterator b_r, typename base_type::const_iterator e_r, bool compare_after = false) const;
+
+ bool
+ cmp_keys(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const;
+
+ inline static const_key_reference
+ extract_key(const_reference r_val);
+
+#ifdef _GLIBCXX_DEBUG
+ bool
+ operator()(const_key_reference r_lhs, const_key_reference r_rhs);
+#endif
+
+ private:
+ inline static const_key_reference
+ extract_key(const_reference r_val, true_type);
+
+ inline static const_key_reference
+ extract_key(const_reference r_val, false_type);
+
+ private:
+ static integral_constant<int,Set> s_set_ind;
+ };
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ integral_constant<int,Set>
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::s_set_ind;
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ synth_e_access_traits()
+ { }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ synth_e_access_traits(const E_Access_Traits& r_traits) :
+ E_Access_Traits(r_traits)
+ { }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ inline bool
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ equal_prefixes(typename base_type::const_iterator b_l, typename base_type::const_iterator e_l, typename base_type::const_iterator b_r, typename base_type::const_iterator e_r, bool compare_after /*= false */) const
+ {
+ while (b_l != e_l)
+ {
+ if (b_r == e_r)
+ return (false);
+ if (base_type::e_pos(*b_l) != base_type::e_pos(*b_r))
+ return (false);
+ ++b_l;
+ ++b_r;
+ }
+ return (!compare_after || b_r == e_r);
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ bool
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ equal_keys(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+ {
+ return (equal_prefixes(base_type::begin(r_lhs_key),
+ base_type::end(r_lhs_key),
+ base_type::begin(r_rhs_key),
+ base_type::end(r_rhs_key),
+ true));
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ bool
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ cmp_prefixes(typename base_type::const_iterator b_l, typename base_type::const_iterator e_l, typename base_type::const_iterator b_r, typename base_type::const_iterator e_r, bool compare_after /* = false*/) const
+ {
+ while (b_l != e_l)
+ {
+ if (b_r == e_r)
+ return (false);
+ const typename base_type::size_type l_pos =
+ base_type::e_pos(*b_l);
+ const typename base_type::size_type r_pos =
+ base_type::e_pos(*b_r);
+ if (l_pos != r_pos)
+ return (l_pos < r_pos);
+ ++b_l;
+ ++b_r;
+ }
+
+ if (!compare_after)
+ return (false);
+ return (b_r != e_r);
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ bool
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ cmp_keys(const_key_reference r_lhs_key, const_key_reference r_rhs_key) const
+ {
+ return (cmp_prefixes(base_type::begin(r_lhs_key),
+ base_type::end(r_lhs_key),
+ base_type::begin(r_rhs_key),
+ base_type::end(r_rhs_key),
+ true));
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ inline typename PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::const_key_reference
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ extract_key(const_reference r_val)
+ {
+ return (extract_key(r_val, s_set_ind));
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ inline typename PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::const_key_reference
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ extract_key(const_reference r_val, true_type)
+ {
+ return (r_val);
+ }
+
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ inline typename PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::const_key_reference
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ extract_key(const_reference r_val, false_type)
+ {
+ return (r_val.first);
+ }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+ bool
+ PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC::
+ operator()(const_key_reference r_lhs, const_key_reference r_rhs)
+ {
+ return (cmp_keys(r_lhs, r_rhs));
+ }
+#endif
+
+#undef PB_DS_SYNTH_E_ACCESS_TRAITS_T_DEC
+#undef PB_DS_SYNTH_E_ACCESS_TRAITS_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp
new file mode 100644
index 0000000..e4b2094
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp
@@ -0,0 +1,113 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+#ifdef PB_DS_PAT_TRIE_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << std::endl;
+ if (m_p_head->m_p_parent == NULL)
+ return;
+ trace_node(m_p_head->m_p_parent, 0);
+ std::cerr << std::endl;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_node(const_node_pointer p_nd, size_type level)
+{
+ for (size_type i = 0; i < level; ++i)
+ std::cerr << ' ';
+ std::cerr << p_nd << " ";
+ std::cerr << ((p_nd->m_type == pat_trie_leaf_node_type) ? "l " : "i ");
+
+ trace_node_metadata(p_nd, type_to_type<typename node::metadata_type>());
+ typename e_access_traits::const_iterator el_it = pref_begin(p_nd);
+ while (el_it != pref_end(p_nd))
+ {
+ std::cerr <<* el_it;
+ ++el_it;
+ }
+
+ if (p_nd->m_type == pat_trie_leaf_node_type)
+ {
+ std::cerr << std::endl;
+ return;
+ }
+
+ const_internal_node_pointer p_internal =
+ static_cast<const_internal_node_pointer>(p_nd);
+
+ std::cerr << " " <<
+ static_cast<unsigned long>(p_internal->get_e_ind()) << std::endl;
+
+ const size_type num_children = std::distance(p_internal->begin(),
+ p_internal->end());
+
+ for (size_type child_i = 0; child_i < num_children; ++child_i)
+ {
+ typename internal_node::const_iterator child_it =
+ p_internal->begin();
+ std::advance(child_it, num_children - child_i - 1);
+ trace_node(*child_it, level + 1);
+ }
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Metadata_>
+void
+PB_DS_CLASS_C_DEC::
+trace_node_metadata(const_node_pointer p_nd, type_to_type<Metadata_>)
+{
+ std::cerr << "(" << static_cast<unsigned long>(p_nd->get_metadata()) << ") ";
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace_node_metadata(const_node_pointer, type_to_type<null_node_metadata>)
+{ }
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/traits.hpp
new file mode 100644
index 0000000..c8e7f58
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/traits.hpp
@@ -0,0 +1,350 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+#ifndef PB_DS_PAT_TRIE_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_PAT_TRIE_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/pat_trie_/node_base.hpp>
+#include <ext/pb_ds/detail/pat_trie_/head.hpp>
+#include <ext/pb_ds/detail/pat_trie_/leaf.hpp>
+#include <ext/pb_ds/detail/pat_trie_/internal_node.hpp>
+#include <ext/pb_ds/detail/pat_trie_/point_iterators.hpp>
+#include <ext/pb_ds/detail/pat_trie_/node_iterators.hpp>
+#include <ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Key,
+ typename Mapped,
+ class E_Access_Traits,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct trie_traits<
+ Key,
+ Mapped,
+ E_Access_Traits,
+ Node_Update,
+ pat_trie_tag,
+ Allocator>
+ {
+ private:
+ typedef types_traits< Key, Mapped, Allocator, false> type_traits;
+
+ public:
+ typedef
+ typename trie_node_metadata_selector<
+ Key,
+ Mapped,
+ E_Access_Traits,
+ Node_Update,
+ Allocator>::type
+ metadata_type;
+
+ typedef E_Access_Traits e_access_traits;
+
+ typedef
+ __gnu_pbds::detail::synth_e_access_traits<
+ type_traits,
+ false,
+ e_access_traits>
+ synth_e_access_traits;
+
+ typedef
+ pat_trie_node_base<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ node;
+
+ typedef
+ pat_trie_leaf<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ leaf;
+
+ typedef
+ pat_trie_head<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ head;
+
+ typedef
+ pat_trie_internal_node<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ internal_node;
+
+ typedef
+ pat_trie_const_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ true,
+ Allocator>
+ const_iterator;
+
+ typedef
+ pat_trie_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ true,
+ Allocator>
+ iterator;
+
+ typedef
+ pat_trie_const_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ false,
+ Allocator>
+ const_reverse_iterator;
+
+ typedef
+ pat_trie_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ false,
+ Allocator>
+ reverse_iterator;
+
+ typedef
+ pat_trie_const_node_it_<
+ node,
+ leaf,
+ head,
+ internal_node,
+ const_iterator,
+ iterator,
+ synth_e_access_traits,
+ Allocator>
+ const_node_iterator;
+
+ typedef
+ pat_trie_node_it_<
+ node,
+ leaf,
+ head,
+ internal_node,
+ const_iterator,
+ iterator,
+ synth_e_access_traits,
+ Allocator>
+ node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ node_iterator,
+ E_Access_Traits,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_trie_node_update<
+ const_node_iterator,
+ node_iterator,
+ E_Access_Traits,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ template<typename Key,
+ class E_Access_Traits,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct trie_traits<
+ Key,
+ null_mapped_type,
+ E_Access_Traits,
+ Node_Update,
+ pat_trie_tag,
+ Allocator>
+ {
+ private:
+ typedef
+ types_traits<
+ Key,
+ null_mapped_type,
+ Allocator,
+ false>
+ type_traits;
+
+ public:
+ typedef
+ typename trie_node_metadata_selector<
+ Key,
+ null_mapped_type,
+ E_Access_Traits,
+ Node_Update,
+ Allocator>::type
+ metadata_type;
+
+ typedef E_Access_Traits e_access_traits;
+
+ typedef
+ __gnu_pbds::detail::synth_e_access_traits<
+ type_traits,
+ true,
+ e_access_traits>
+ synth_e_access_traits;
+
+ typedef
+ pat_trie_node_base<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ node;
+
+ typedef
+ pat_trie_leaf<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ leaf;
+
+ typedef
+ pat_trie_head<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ head;
+
+ typedef
+ pat_trie_internal_node<
+ type_traits,
+ synth_e_access_traits,
+ metadata_type,
+ Allocator>
+ internal_node;
+
+ typedef
+ pat_trie_const_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ true,
+ Allocator>
+ const_iterator;
+
+ typedef const_iterator iterator;
+
+ typedef
+ pat_trie_const_it_<
+ type_traits,
+ node,
+ leaf,
+ head,
+ internal_node,
+ false,
+ Allocator>
+ const_reverse_iterator;
+
+ typedef const_reverse_iterator reverse_iterator;
+
+ typedef
+ pat_trie_const_node_it_<
+ node,
+ leaf,
+ head,
+ internal_node,
+ const_iterator,
+ iterator,
+ synth_e_access_traits,
+ Allocator>
+ const_node_iterator;
+
+ typedef const_node_iterator node_iterator;
+
+ typedef
+ Node_Update<
+ const_node_iterator,
+ node_iterator,
+ E_Access_Traits,
+ Allocator>
+ node_update;
+
+ typedef
+ __gnu_pbds::null_trie_node_update<
+ const_node_iterator,
+ const_node_iterator,
+ E_Access_Traits,
+ Allocator>*
+ null_node_update_pointer;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_PAT_TRIE_NODE_AND_IT_TRAITS_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp
new file mode 100644
index 0000000..6d275e7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file update_fn_imps.hpp
+ * Contains an implementation class for pat_trie_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer /*p_nd*/, null_node_update_pointer)
+{ }
+
+PB_DS_CLASS_T_DEC
+template<typename Node_Update_>
+inline void
+PB_DS_CLASS_C_DEC::
+apply_update(node_pointer p_nd, Node_Update_* /*p_update*/)
+{
+ Node_Update_::operator()(node_iterator(p_nd, this),
+ const_node_iterator(NULL, this));
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
new file mode 100644
index 0000000..ad05c4f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp
@@ -0,0 +1,91 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file priority_queue_base_dispatch.hpp
+ * Contains an pqiative container dispatching base.
+ */
+
+#ifndef PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
+#define PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
+
+#include <ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp>
+#include <ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp>
+#include <ext/pb_ds/detail/binary_heap_/binary_heap_.hpp>
+#include <ext/pb_ds/detail/thin_heap_/thin_heap_.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Value_Type, typename Cmp_Fn, typename Tag, typename Allocator>
+ struct priority_queue_base_dispatch;
+
+ template<typename Value_Type, typename Cmp_Fn, typename Allocator>
+ struct priority_queue_base_dispatch<Value_Type, Cmp_Fn, pairing_heap_tag, Allocator>
+ {
+ typedef pairing_heap_< Value_Type, Cmp_Fn, Allocator> type;
+ };
+
+ template<typename Value_Type, typename Cmp_Fn, typename Allocator>
+ struct priority_queue_base_dispatch<Value_Type, Cmp_Fn, binomial_heap_tag, Allocator>
+ {
+ typedef binomial_heap_< Value_Type, Cmp_Fn, Allocator> type;
+ };
+
+ template<typename Value_Type, typename Cmp_Fn, typename Allocator>
+ struct priority_queue_base_dispatch<Value_Type, Cmp_Fn, rc_binomial_heap_tag, Allocator>
+ {
+ typedef rc_binomial_heap_< Value_Type, Cmp_Fn, Allocator> type;
+ };
+
+ template<typename Value_Type, typename Cmp_Fn, typename Allocator>
+ struct priority_queue_base_dispatch<Value_Type, Cmp_Fn, binary_heap_tag, Allocator>
+ {
+ typedef binary_heap_< Value_Type, Cmp_Fn, Allocator> type;
+ };
+
+ template<typename Value_Type, typename Cmp_Fn, typename Allocator>
+ struct priority_queue_base_dispatch<Value_Type, Cmp_Fn, thin_heap_tag, Allocator>
+ {
+ typedef thin_heap_< Value_Type, Cmp_Fn, Allocator> type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_PRIORITY_QUEUE_BASE_DS_DISPATCHER_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..1abfe21
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,100 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME()
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ base_type(r_cmp_fn)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const node_update& r_node_update) :
+ base_type(r_cmp_fn, r_node_update)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+ base_type(other)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ base_type::swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{ base_type::m_p_head->m_red = true; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp
new file mode 100644
index 0000000..18ecc42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp
@@ -0,0 +1,78 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+assert_node_consistent(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return 1;
+
+ const size_type l_height = assert_node_consistent(p_nd->m_p_left);
+ const size_type r_height = assert_node_consistent(p_nd->m_p_right);
+ if (p_nd->m_red)
+ {
+ _GLIBCXX_DEBUG_ASSERT(is_effectively_black(p_nd->m_p_left));
+ _GLIBCXX_DEBUG_ASSERT(is_effectively_black(p_nd->m_p_right));
+ }
+ _GLIBCXX_DEBUG_ASSERT(l_height == r_height);
+ return (p_nd->m_red ? 0 : 1) + l_height;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ base_type::assert_valid();
+ const node_pointer p_head = base_type::m_p_head;
+ _GLIBCXX_DEBUG_ASSERT(p_head->m_red);
+ if (p_head->m_p_parent != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(!p_head->m_p_parent->m_red);
+ assert_node_consistent(p_head->m_p_parent);
+ }
+}
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp
new file mode 100644
index 0000000..685b8a5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp
@@ -0,0 +1,289 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ point_iterator it = find(r_key);
+ if (it == base_type::end())
+ return false;
+ erase(it);
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+erase(iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ if (it == base_type::end())
+ return it;
+
+ iterator ret_it = it;
+ ++ret_it;
+ erase_node(it.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+erase(reverse_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ if (it.m_p_nd == base_type::m_p_head)
+ return it;
+
+ reverse_iterator ret_it = it;
+ ++ret_it;
+ erase_node(it.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ size_type num_ersd = 0;
+ iterator it = base_type::begin();
+ while (it != base_type::end())
+ {
+ if (pred(*it))
+ {
+ ++num_ersd;
+ it = erase(it);
+ }
+ else
+ ++it;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_node(node_pointer p_nd)
+{
+ remove_node(p_nd);
+ base_type::actual_erase_node(p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+remove_node(node_pointer p_z)
+{
+ update_min_max_for_erased_node(p_z);
+ node_pointer p_y = p_z;
+ node_pointer p_x = NULL;
+ node_pointer p_new_x_parent = NULL;
+
+ if (p_y->m_p_left == NULL)
+ p_x = p_y->m_p_right;
+ else if (p_y->m_p_right == NULL)
+ p_x = p_y->m_p_left;
+ else
+ {
+ p_y = p_y->m_p_right;
+ while (p_y->m_p_left != NULL)
+ p_y = p_y->m_p_left;
+ p_x = p_y->m_p_right;
+ }
+
+ if (p_y == p_z)
+ {
+ p_new_x_parent = p_y->m_p_parent;
+ if (p_x != NULL)
+ p_x->m_p_parent = p_y->m_p_parent;
+
+ if (base_type::m_p_head->m_p_parent == p_z)
+ base_type::m_p_head->m_p_parent = p_x;
+ else if (p_z->m_p_parent->m_p_left == p_z)
+ {
+ p_y->m_p_left = p_z->m_p_parent;
+ p_z->m_p_parent->m_p_left = p_x;
+ }
+ else
+ {
+ p_y->m_p_left = NULL;
+ p_z->m_p_parent->m_p_right = p_x;
+ }
+ }
+ else
+ {
+ p_z->m_p_left->m_p_parent = p_y;
+ p_y->m_p_left = p_z->m_p_left;
+ if (p_y != p_z->m_p_right)
+ {
+ p_new_x_parent = p_y->m_p_parent;
+ if (p_x != NULL)
+ p_x->m_p_parent = p_y->m_p_parent;
+ p_y->m_p_parent->m_p_left = p_x;
+ p_y->m_p_right = p_z->m_p_right;
+ p_z->m_p_right->m_p_parent = p_y;
+ }
+ else
+ p_new_x_parent = p_y;
+
+ if (base_type::m_p_head->m_p_parent == p_z)
+ base_type::m_p_head->m_p_parent = p_y;
+ else if (p_z->m_p_parent->m_p_left == p_z)
+ p_z->m_p_parent->m_p_left = p_y;
+ else
+ p_z->m_p_parent->m_p_right = p_y;
+
+ p_y->m_p_parent = p_z->m_p_parent;
+ std::swap(p_y->m_red, p_z->m_red);
+ p_y = p_z;
+ }
+
+ update_to_top(p_new_x_parent, (node_update* )this);
+
+ if (p_y->m_red)
+ return;
+
+ remove_fixup(p_x, p_new_x_parent);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+remove_fixup(node_pointer p_x, node_pointer p_new_x_parent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_x == NULL || p_x->m_p_parent == p_new_x_parent);
+
+ while (p_x != base_type::m_p_head->m_p_parent && is_effectively_black(p_x))
+ if (p_x == p_new_x_parent->m_p_left)
+ {
+ node_pointer p_w = p_new_x_parent->m_p_right;
+ if (p_w->m_red)
+ {
+ p_w->m_red = false;
+ p_new_x_parent->m_red = true;
+ base_type::rotate_left(p_new_x_parent);
+ p_w = p_new_x_parent->m_p_right;
+ }
+
+ if (is_effectively_black(p_w->m_p_left)
+ && is_effectively_black(p_w->m_p_right))
+ {
+ p_w->m_red = true;
+ p_x = p_new_x_parent;
+ p_new_x_parent = p_new_x_parent->m_p_parent;
+ }
+ else
+ {
+ if (is_effectively_black(p_w->m_p_right))
+ {
+ if (p_w->m_p_left != NULL)
+ p_w->m_p_left->m_red = false;
+
+ p_w->m_red = true;
+ base_type::rotate_right(p_w);
+ p_w = p_new_x_parent->m_p_right;
+ }
+
+ p_w->m_red = p_new_x_parent->m_red;
+ p_new_x_parent->m_red = false;
+
+ if (p_w->m_p_right != NULL)
+ p_w->m_p_right->m_red = false;
+
+ base_type::rotate_left(p_new_x_parent);
+ update_to_top(p_new_x_parent, (node_update* )this);
+ break;
+ }
+ }
+ else
+ {
+ node_pointer p_w = p_new_x_parent->m_p_left;
+ if (p_w->m_red == true)
+ {
+ p_w->m_red = false;
+ p_new_x_parent->m_red = true;
+ base_type::rotate_right(p_new_x_parent);
+ p_w = p_new_x_parent->m_p_left;
+ }
+
+ if (is_effectively_black(p_w->m_p_right)
+ && is_effectively_black(p_w->m_p_left))
+ {
+ p_w->m_red = true;
+ p_x = p_new_x_parent;
+ p_new_x_parent = p_new_x_parent->m_p_parent;
+ }
+ else
+ {
+ if (is_effectively_black(p_w->m_p_left))
+ {
+ if (p_w->m_p_right != NULL)
+ p_w->m_p_right->m_red = false;
+
+ p_w->m_red = true;
+ base_type::rotate_left(p_w);
+ p_w = p_new_x_parent->m_p_left;
+ }
+
+ p_w->m_red = p_new_x_parent->m_red;
+ p_new_x_parent->m_red = false;
+
+ if (p_w->m_p_left != NULL)
+ p_w->m_p_left->m_red = false;
+
+ base_type::rotate_right(p_new_x_parent);
+ update_to_top(p_new_x_parent, (node_update* )this);
+ break;
+ }
+ }
+
+ if (p_x != NULL)
+ p_x->m_red = false;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp
new file mode 100644
index 0000000..9378e15
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp
new file mode 100644
index 0000000..6b43b1a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp
@@ -0,0 +1,46 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_effectively_black(const node_pointer p_nd)
+{ return (p_nd == NULL || !p_nd->m_red); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp
new file mode 100644
index 0000000..16a5d1e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp
@@ -0,0 +1,115 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert(const_reference r_value)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ std::pair<point_iterator, bool> ins_pair = base_type::insert_leaf(r_value);
+ if (ins_pair.second == true)
+ {
+ ins_pair.first.m_p_nd->m_red = true;
+ _GLIBCXX_DEBUG_ONLY(this->structure_only_assert_valid();)
+ insert_fixup(ins_pair.first.m_p_nd);
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return ins_pair;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+insert_fixup(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_red == true);
+ while (p_nd != base_type::m_p_head->m_p_parent && p_nd->m_p_parent->m_red)
+ {
+ if (p_nd->m_p_parent == p_nd->m_p_parent->m_p_parent->m_p_left)
+ {
+ node_pointer p_y = p_nd->m_p_parent->m_p_parent->m_p_right;
+ if (p_y != NULL && p_y->m_red)
+ {
+ p_nd->m_p_parent->m_red = false;
+ p_y->m_red = false;
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+ p_nd = p_nd->m_p_parent->m_p_parent;
+ }
+ else
+ {
+ if (p_nd == p_nd->m_p_parent->m_p_right)
+ {
+ p_nd = p_nd->m_p_parent;
+ base_type::rotate_left(p_nd);
+ }
+ p_nd->m_p_parent->m_red = false;
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+ base_type::rotate_right(p_nd->m_p_parent->m_p_parent);
+ }
+ }
+ else
+ {
+ node_pointer p_y = p_nd->m_p_parent->m_p_parent->m_p_left;
+ if (p_y != NULL && p_y->m_red)
+ {
+ p_nd->m_p_parent->m_red = false;
+ p_y->m_red = false;
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+ p_nd = p_nd->m_p_parent->m_p_parent;
+ }
+ else
+ {
+ if (p_nd == p_nd->m_p_parent->m_p_left)
+ {
+ p_nd = p_nd->m_p_parent;
+ base_type::rotate_right(p_nd);
+ }
+ p_nd->m_p_parent->m_red = false;
+ p_nd->m_p_parent->m_p_parent->m_red = true;
+ base_type::rotate_left(p_nd->m_p_parent->m_p_parent);
+ }
+ }
+ }
+
+ base_type::update_to_top(p_nd, (node_update* )this);
+ base_type::m_p_head->m_p_parent->m_red = false;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/node.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/node.hpp
new file mode 100644
index 0000000..3f24c76
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/node.hpp
@@ -0,0 +1,138 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+#ifndef PB_DS_RB_TREE_NODE_HPP
+#define PB_DS_RB_TREE_NODE_HPP
+
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Value_Type, class Metadata, class Allocator>
+ struct rb_tree_node_
+ {
+ public:
+ typedef Value_Type value_type;
+ typedef Metadata metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ rb_tree_node_<
+ Value_Type,
+ Metadata,
+ Allocator> >::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::reference
+ metadata_reference;
+
+ typedef
+ typename Allocator::template rebind<
+ metadata_type>::other::const_reference
+ const_metadata_reference;
+
+ inline bool
+ special() const
+ { return m_red; }
+
+ inline const_metadata_reference
+ get_metadata() const
+ { return m_metadata; }
+
+ inline metadata_reference
+ get_metadata()
+ { return m_metadata; }
+
+#ifdef PB_DS_BIN_SEARCH_TREE_TRACE_
+ void
+ trace() const
+ {
+ std::cout << PB_DS_V2F(m_value) <<(m_red? " <r> " : " <b> ")
+ << "(" << m_metadata << ")";
+ }
+#endif
+
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+ node_pointer m_p_parent;
+ value_type m_value;
+ bool m_red;
+ metadata_type m_metadata;
+ };
+
+ template<typename Value_Type, class Allocator>
+ struct rb_tree_node_<Value_Type, null_node_metadata, Allocator>
+ {
+ public:
+ typedef Value_Type value_type;
+ typedef null_node_metadata metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ rb_tree_node_<
+ Value_Type,
+ null_node_metadata,
+ Allocator> >::other::pointer
+ node_pointer;
+
+ inline bool
+ special() const
+ { return m_red; }
+
+#ifdef PB_DS_BIN_SEARCH_TREE_TRACE_
+ void
+ trace() const
+ { std::cout << PB_DS_V2F(m_value) <<(m_red? " <r> " : " <b> "); }
+#endif
+
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+ node_pointer m_p_parent;
+ value_type m_value;
+ bool m_red;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
new file mode 100644
index 0000000..9010def
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp
@@ -0,0 +1,280 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file rb_tree_.hpp
+ * Contains an implementation for rb_tree_.
+ */
+/*
+ * This implementation uses an idea from the SGI STL (using a "header" node
+ * which is needed for efficient iteration).
+ */
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#ifndef PB_DS_BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#define PB_DS_BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#ifndef PB_DS_BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#define PB_DS_BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif
+#endif
+
+#include <ext/pb_ds/detail/standard_policies.hpp>
+#include <ext/pb_ds/detail/basic_types.hpp>
+#include <utility>
+#include <vector>
+#include <assert.h>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, typename Cmp_Fn, \
+ typename Node_And_It_Traits, typename Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME rb_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_BASE_CLASS_NAME bin_search_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME rb_tree_no_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_BASE_CLASS_NAME bin_search_tree_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ PB_DS_BASE_CLASS_NAME<Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+ template<typename Key,
+ typename Mapped,
+ typename Cmp_Fn,
+ typename Node_And_It_Traits,
+ typename Allocator>
+ class PB_DS_CLASS_NAME : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+ typedef typename base_type::node_pointer node_pointer;
+
+ public:
+ typedef Cmp_Fn cmp_fn;
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::key_pointer key_pointer;
+ typedef typename base_type::const_key_pointer const_key_pointer;
+ typedef typename base_type::key_reference key_reference;
+ typedef typename base_type::const_key_reference const_key_reference;
+ typedef typename base_type::mapped_type mapped_type;
+ typedef typename base_type::mapped_pointer mapped_pointer;
+ typedef typename base_type::const_mapped_pointer const_mapped_pointer;
+ typedef typename base_type::mapped_reference mapped_reference;
+ typedef typename base_type::const_mapped_reference const_mapped_reference;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::const_pointer const_pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::point_iterator point_iterator;
+ typedef typename base_type::const_iterator const_point_iterator;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::reverse_iterator reverse_iterator;
+ typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename base_type::node_update node_update;
+
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const Cmp_Fn&);
+
+ PB_DS_CLASS_NAME(const Cmp_Fn&, const node_update&);
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference);
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ std::pair<point_iterator, bool> ins_pair =
+ base_type::insert_leaf(value_type(r_key, mapped_type()));
+
+ if (ins_pair.second == true)
+ {
+ ins_pair.first.m_p_nd->m_red = true;
+ _GLIBCXX_DEBUG_ONLY(this->structure_only_assert_valid();)
+ insert_fixup(ins_pair.first.m_p_nd);
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return ins_pair.first.m_p_nd->m_value.second;
+#else
+ insert(r_key);
+ return base_type::s_null_mapped;
+#endif
+ }
+
+ inline bool
+ erase(const_key_reference);
+
+ inline iterator
+ erase(iterator);
+
+ inline reverse_iterator
+ erase(reverse_iterator);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ void
+ join(PB_DS_CLASS_C_DEC&);
+
+ void
+ split(const_key_reference, PB_DS_CLASS_C_DEC&);
+
+ protected:
+
+ private:
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ size_type
+ assert_node_consistent(const node_pointer) const;
+#endif
+
+ inline static bool
+ is_effectively_black(const node_pointer);
+
+ void
+ initialize();
+
+ void
+ insert_fixup(node_pointer);
+
+ void
+ erase_node(node_pointer);
+
+ void
+ remove_node(node_pointer);
+
+ void
+ remove_fixup(node_pointer, node_pointer);
+
+ void
+ split_imp(node_pointer, PB_DS_CLASS_C_DEC&);
+
+ inline node_pointer
+ split_min();
+
+ std::pair<node_pointer, node_pointer>
+ split_min_imp();
+
+ void
+ join_imp(node_pointer, node_pointer);
+
+ std::pair<node_pointer, node_pointer>
+ find_join_pos_right(node_pointer, size_type, size_type);
+
+ std::pair<node_pointer, node_pointer>
+ find_join_pos_left(node_pointer, size_type, size_type);
+
+ inline size_type
+ black_height(node_pointer);
+
+ void
+ split_at_node(node_pointer, PB_DS_CLASS_C_DEC&);
+ };
+
+#include <ext/pb_ds/detail/rb_tree_map_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp>
+#include <ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_BASE_CLASS_NAME
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..9776a8d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp
@@ -0,0 +1,313 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.base_type::assert_valid();)
+ if (base_type::join_prep(other) == false)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ const node_pointer p_x = other.split_min();
+ join_imp(p_x, other.m_p_head->m_p_parent);
+ base_type::join_finish(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.base_type::assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+join_imp(node_pointer p_x, node_pointer p_r)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_x != NULL);
+ if (p_r != NULL)
+ p_r->m_red = false;
+
+ const size_type h = black_height(base_type::m_p_head->m_p_parent);
+ const size_type other_h = black_height(p_r);
+ node_pointer p_x_l;
+ node_pointer p_x_r;
+ std::pair<node_pointer, node_pointer> join_pos;
+ const bool right_join = h >= other_h;
+ if (right_join)
+ {
+ join_pos = find_join_pos_right(base_type::m_p_head->m_p_parent,
+ h, other_h);
+ p_x_l = join_pos.first;
+ p_x_r = p_r;
+ }
+ else
+ {
+ p_x_l = base_type::m_p_head->m_p_parent;
+ base_type::m_p_head->m_p_parent = p_r;
+ if (p_r != NULL)
+ p_r->m_p_parent = base_type::m_p_head;
+
+ join_pos = find_join_pos_left(base_type::m_p_head->m_p_parent,
+ h, other_h);
+ p_x_r = join_pos.first;
+ }
+
+ node_pointer p_parent = join_pos.second;
+ if (p_parent == base_type::m_p_head)
+ {
+ base_type::m_p_head->m_p_parent = p_x;
+ p_x->m_p_parent = base_type::m_p_head;
+ }
+ else
+ {
+ p_x->m_p_parent = p_parent;
+ if (right_join)
+ p_x->m_p_parent->m_p_right = p_x;
+ else
+ p_x->m_p_parent->m_p_left = p_x;
+ }
+
+ p_x->m_p_left = p_x_l;
+ if (p_x_l != NULL)
+ p_x_l->m_p_parent = p_x;
+
+ p_x->m_p_right = p_x_r;
+ if (p_x_r != NULL)
+ p_x_r->m_p_parent = p_x;
+
+ p_x->m_red = true;
+
+ base_type::initialize_min_max();
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid();)
+ base_type::update_to_top(p_x, (node_update* )this);
+ insert_fixup(p_x);
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid());
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+split_min()
+{
+ node_pointer p_min = base_type::m_p_head->m_p_left;
+
+#ifdef _GLIBCXX_DEBUG
+ const node_pointer p_head = base_type::m_p_head;
+ _GLIBCXX_DEBUG_ASSERT(p_min != p_head);
+#endif
+
+ remove_node(p_min);
+ return p_min;
+}
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::node_pointer,
+ typename PB_DS_CLASS_C_DEC::node_pointer>
+PB_DS_CLASS_C_DEC::
+find_join_pos_right(node_pointer p_l, size_type h_l, size_type h_r)
+{
+ _GLIBCXX_DEBUG_ASSERT(h_l >= h_r);
+
+ if (base_type::m_p_head->m_p_parent == NULL)
+ return (std::make_pair((node_pointer)NULL, base_type::m_p_head));
+
+ node_pointer p_l_parent = base_type::m_p_head;
+ while (h_l > h_r)
+ {
+ if (p_l->m_red == false)
+ {
+ _GLIBCXX_DEBUG_ASSERT(h_l > 0);
+ --h_l;
+ }
+
+ p_l_parent = p_l;
+ p_l = p_l->m_p_right;
+ }
+
+ if (!is_effectively_black(p_l))
+ {
+ p_l_parent = p_l;
+ p_l = p_l->m_p_right;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(is_effectively_black(p_l));
+ _GLIBCXX_DEBUG_ASSERT(black_height(p_l) == h_r);
+ _GLIBCXX_DEBUG_ASSERT(p_l == NULL || p_l->m_p_parent == p_l_parent);
+ return std::make_pair(p_l, p_l_parent);
+}
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::node_pointer,
+ typename PB_DS_CLASS_C_DEC::node_pointer>
+PB_DS_CLASS_C_DEC::
+find_join_pos_left(node_pointer p_r, size_type h_l, size_type h_r)
+{
+ _GLIBCXX_DEBUG_ASSERT(h_r > h_l);
+ if (base_type::m_p_head->m_p_parent == NULL)
+ return (std::make_pair((node_pointer)NULL,
+ base_type::m_p_head));
+ node_pointer p_r_parent = base_type::m_p_head;
+ while (h_r > h_l)
+ {
+ if (p_r->m_red == false)
+ {
+ _GLIBCXX_DEBUG_ASSERT(h_r > 0);
+ --h_r;
+ }
+
+ p_r_parent = p_r;
+ p_r = p_r->m_p_left;
+ }
+
+ if (!is_effectively_black(p_r))
+ {
+ p_r_parent = p_r;
+ p_r = p_r->m_p_left;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(is_effectively_black(p_r));
+ _GLIBCXX_DEBUG_ASSERT(black_height(p_r) == h_l);
+ _GLIBCXX_DEBUG_ASSERT(p_r == NULL || p_r->m_p_parent == p_r_parent);
+ return std::make_pair(p_r, p_r_parent);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+black_height(node_pointer p_nd)
+{
+ size_type h = 1;
+ while (p_nd != NULL)
+ {
+ if (p_nd->m_red == false)
+ ++h;
+ p_nd = p_nd->m_p_left;
+ }
+ return h;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_valid();)
+
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.base_type::assert_valid();)
+
+ if (base_type::split_prep(r_key, other) == false)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.base_type::structure_only_assert_valid();)
+ node_pointer p_nd = upper_bound(r_key).m_p_nd;
+ do
+ {
+ node_pointer p_next_nd = p_nd->m_p_parent;
+ if (Cmp_Fn::operator()(r_key, PB_DS_V2F(p_nd->m_value)))
+ split_at_node(p_nd, other);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.base_type::structure_only_assert_valid();)
+ p_nd = p_next_nd;
+ }
+ while (p_nd != base_type::m_p_head);
+
+ base_type::split_finish(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split_at_node(node_pointer p_nd, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+
+ node_pointer p_l = p_nd->m_p_left;
+ node_pointer p_r = p_nd->m_p_right;
+ node_pointer p_parent = p_nd->m_p_parent;
+ if (p_parent == base_type::m_p_head)
+ {
+ base_type::m_p_head->m_p_parent = p_l;
+ if (p_l != NULL)
+ {
+ p_l->m_p_parent = base_type::m_p_head;
+ p_l->m_red = false;
+ }
+ }
+ else
+ {
+ if (p_parent->m_p_left == p_nd)
+ p_parent->m_p_left = p_l;
+ else
+ p_parent->m_p_right = p_l;
+
+ if (p_l != NULL)
+ p_l->m_p_parent = p_parent;
+
+ update_to_top(p_parent, (node_update* )this);
+
+ if (!p_nd->m_red)
+ remove_fixup(p_l, p_parent);
+ }
+
+ base_type::initialize_min_max();
+ other.join_imp(p_nd, p_r);
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.base_type::structure_only_assert_valid());
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp
new file mode 100644
index 0000000..531d8e4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rb_tree_map_/traits.hpp
@@ -0,0 +1,124 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation for rb_tree_.
+ */
+
+#ifndef PB_DS_RB_TREE_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_RB_TREE_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/rb_tree_map_/node.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key,
+ typename Mapped,
+ typename Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ typename Allocator>
+ struct tree_traits<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ rb_tree_tag,
+ Allocator> : public bin_search_tree_traits<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ rb_tree_node_<
+ typename types_traits<
+ Key,
+ Mapped,
+ Allocator,
+ false>::value_type,
+ typename tree_node_metadata_selector<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type,
+ Allocator>,
+ Allocator>
+ { };
+
+ template<typename Key,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_traits<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ rb_tree_tag,
+ Allocator> : public bin_search_tree_traits<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ rb_tree_node_<
+ typename types_traits<
+ Key,
+ null_mapped_type,
+ Allocator,
+ false>::value_type,
+ typename tree_node_metadata_selector<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type,
+ Allocator>,
+ Allocator>
+ { };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..bf4dcfe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,88 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+rc_binomial_heap_()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+rc_binomial_heap_(const Cmp_Fn& r_cmp_fn) :
+ PB_DS_BASE_C_DEC(r_cmp_fn)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+rc_binomial_heap_(const PB_DS_CLASS_C_DEC& other) :
+ PB_DS_BASE_C_DEC(other)
+{
+ make_binomial_heap();
+
+ base_type::find_max();
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~rc_binomial_heap_()
+{ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ base_type::swap(other);
+
+ m_rc.swap(other.m_rc);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..0194905
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp
@@ -0,0 +1,121 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ base_type::assert_valid(false);
+ if (!base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_max != NULL);
+ base_type::assert_max();
+ }
+
+ m_rc.assert_valid();
+
+ if (m_rc.empty())
+ {
+ base_type::assert_valid(true);
+ _GLIBCXX_DEBUG_ASSERT(next_2_pointer(base_type::m_p_root) == NULL);
+ return;
+ }
+
+ const_node_pointer p_nd = next_2_pointer(base_type::m_p_root);
+ typename rc_t::const_iterator it = m_rc.end();
+ --it;
+
+ while (p_nd != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(*it == p_nd);
+ const_node_pointer p_next = p_nd->m_p_next_sibling;
+ _GLIBCXX_DEBUG_ASSERT(p_next != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata == p_next->m_metadata);
+ _GLIBCXX_DEBUG_ASSERT(p_next->m_p_next_sibling == NULL ||
+ p_next->m_metadata < p_next->m_p_next_sibling->m_metadata);
+
+ --it;
+ p_nd = next_2_pointer(next_after_0_pointer(p_nd));
+ }
+ _GLIBCXX_DEBUG_ASSERT(it + 1 == m_rc.begin());
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::const_node_pointer
+PB_DS_CLASS_C_DEC::
+next_2_pointer(const_node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return NULL;
+
+ node_pointer p_next = p_nd->m_p_next_sibling;
+
+ if (p_next == NULL)
+ return NULL;
+
+ if (p_nd->m_metadata == p_next->m_metadata)
+ return p_nd;
+
+ return next_2_pointer(p_next);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::const_node_pointer
+PB_DS_CLASS_C_DEC::
+next_after_0_pointer(const_node_pointer p_nd)
+{
+ if (p_nd == NULL)
+ return NULL;
+
+ node_pointer p_next = p_nd->m_p_next_sibling;
+
+ if (p_next == NULL)
+ return NULL;
+
+ if (p_nd->m_metadata < p_next->m_metadata)
+ return p_next;
+
+ return next_after_0_pointer(p_next);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp
new file mode 100644
index 0000000..1113ffa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp
@@ -0,0 +1,107 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+pop()
+{
+ make_binomial_heap();
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+ base_type::pop();
+ base_type::find_max();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ base_type::clear();
+ m_rc.clear();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+make_binomial_heap()
+{
+ node_pointer p_nd = base_type::m_p_root;
+ while (p_nd != NULL)
+ {
+ node_pointer p_next = p_nd->m_p_next_sibling;
+ if (p_next == NULL)
+ p_nd = p_next;
+ else if (p_nd->m_metadata == p_next->m_metadata)
+ p_nd = link_with_next_sibling(p_nd);
+ else if (p_nd->m_metadata < p_next->m_metadata)
+ p_nd = p_next;
+#ifdef _GLIBCXX_DEBUG
+ else
+ _GLIBCXX_DEBUG_ASSERT(0);
+#endif
+ }
+
+ m_rc.clear();
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ make_binomial_heap();
+ const size_type ersd = base_type::erase_if(pred);
+ base_type::find_max();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase(point_iterator it)
+{
+ make_binomial_heap();
+ base_type::erase(it);
+ base_type::find_max();
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp
new file mode 100644
index 0000000..aef4b92
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp
@@ -0,0 +1,154 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+push(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ make_0_exposed();
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ node_pointer p_nd = base_type::get_new_node_for_insert(r_val);
+
+ p_nd->m_p_l_child = p_nd->m_p_prev_or_parent = NULL;
+ p_nd->m_metadata = 0;
+
+ if (base_type::m_p_max == NULL || Cmp_Fn::operator()(base_type::m_p_max->m_value, r_val))
+ base_type::m_p_max = p_nd;
+
+ p_nd->m_p_next_sibling = base_type::m_p_root;
+
+ if (base_type::m_p_root != NULL)
+ base_type::m_p_root->m_p_prev_or_parent = p_nd;
+
+ base_type::m_p_root = p_nd;
+
+ if (p_nd->m_p_next_sibling != NULL&& p_nd->m_p_next_sibling->m_metadata == 0)
+ m_rc.push(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return point_iterator(p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+modify(point_iterator it, const_reference r_new_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ make_binomial_heap();
+
+ base_type::modify(it, r_new_val);
+
+ base_type::find_max();
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+link_with_next_sibling(node_pointer p_nd)
+{
+ node_pointer p_next = p_nd->m_p_next_sibling;
+
+ _GLIBCXX_DEBUG_ASSERT(p_next != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_next->m_p_prev_or_parent == p_nd);
+
+ if (Cmp_Fn::operator()(p_nd->m_value, p_next->m_value))
+ {
+ p_next->m_p_prev_or_parent = p_nd->m_p_prev_or_parent;
+
+ if (p_next->m_p_prev_or_parent == NULL)
+ base_type::m_p_root = p_next;
+ else
+ p_next->m_p_prev_or_parent->m_p_next_sibling = p_next;
+
+ if (base_type::m_p_max == p_nd)
+ base_type::m_p_max = p_next;
+
+ base_type::make_child_of(p_nd, p_next);
+
+ ++p_next->m_metadata;
+
+ return p_next;
+ }
+
+ p_nd->m_p_next_sibling = p_next->m_p_next_sibling;
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_nd;
+
+ if (base_type::m_p_max == p_next)
+ base_type::m_p_max = p_nd;
+
+ base_type::make_child_of(p_next, p_nd);
+
+ ++p_nd->m_metadata;
+
+ return p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+make_0_exposed()
+{
+ if (m_rc.empty())
+ return;
+
+ node_pointer p_nd = m_rc.top();
+
+ m_rc.pop();
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_next_sibling != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata == p_nd->m_p_next_sibling->m_metadata);
+
+ node_pointer p_res = link_with_next_sibling(p_nd);
+
+ if (p_res->m_p_next_sibling != NULL&& p_res->m_metadata == p_res->m_p_next_sibling->m_metadata)
+ m_rc.push(p_res);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
new file mode 100644
index 0000000..9b70acc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp
@@ -0,0 +1,262 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file rc.hpp
+ * Contains a redundant (binary counter).
+ */
+
+#ifndef PB_DS_RC_HPP
+#define PB_DS_RC_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Node, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ rc<Node, Allocator>
+
+ template<typename Node, class Allocator>
+ class rc
+ {
+ private:
+ typedef Allocator allocator_type;
+
+ typedef typename allocator_type::size_type size_type;
+
+ typedef Node node;
+
+ typedef
+ typename allocator_type::template rebind<
+ node>::other::pointer
+ node_pointer;
+
+ typedef
+ typename allocator_type::template rebind<
+ node_pointer>::other::pointer
+ entry_pointer;
+
+ typedef
+ typename allocator_type::template rebind<
+ node_pointer>::other::const_pointer
+ const_entry_pointer;
+
+ enum
+ {
+ max_entries = sizeof(size_type) << 3
+ };
+
+ public:
+ typedef node_pointer entry;
+
+ typedef const_entry_pointer const_iterator;
+
+ public:
+ rc();
+
+ rc(const PB_DS_CLASS_C_DEC& other);
+
+ inline void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ inline void
+ push(entry p_nd);
+
+ inline node_pointer
+ top() const;
+
+ inline void
+ pop();
+
+ inline bool
+ empty() const;
+
+ inline size_type
+ size() const;
+
+ void
+ clear();
+
+ const const_iterator
+ begin() const;
+
+ const const_iterator
+ end() const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_RC_BINOMIAL_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+ node_pointer m_a_entries[max_entries];
+
+ size_type m_over_top;
+ };
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ rc() : m_over_top(0)
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ PB_DS_CLASS_C_DEC::
+ rc(const PB_DS_CLASS_C_DEC& other) : m_over_top(0)
+ { _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ swap(PB_DS_CLASS_C_DEC& other)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ const size_type over_top = std::max(m_over_top, other.m_over_top);
+
+ for (size_type i = 0; i < over_top; ++i)
+ std::swap(m_a_entries[i], other.m_a_entries[i]);
+
+ std::swap(m_over_top, other.m_over_top);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ push(entry p_nd)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(m_over_top < max_entries);
+ m_a_entries[m_over_top++] = p_nd;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline void
+ PB_DS_CLASS_C_DEC::
+ pop()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+ --m_over_top;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::node_pointer
+ PB_DS_CLASS_C_DEC::
+ top() const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!empty());
+ return *(m_a_entries + m_over_top - 1);
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline bool
+ PB_DS_CLASS_C_DEC::
+ empty() const
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return m_over_top == 0;
+ }
+
+ PB_DS_CLASS_T_DEC
+ inline typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ size() const
+ { return m_over_top; }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ clear()
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ m_over_top = 0;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+ PB_DS_CLASS_T_DEC
+ const typename PB_DS_CLASS_C_DEC::const_iterator
+ PB_DS_CLASS_C_DEC::
+ begin() const
+ { return& m_a_entries[0]; }
+
+ PB_DS_CLASS_T_DEC
+ const typename PB_DS_CLASS_C_DEC::const_iterator
+ PB_DS_CLASS_C_DEC::
+ end() const
+ { return& m_a_entries[m_over_top]; }
+
+#ifdef _GLIBCXX_DEBUG
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ assert_valid() const
+ { _GLIBCXX_DEBUG_ASSERT(m_over_top < max_entries); }
+#endif
+
+#ifdef PB_DS_RC_BINOMIAL_HEAP_TRACE_
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ trace() const
+ {
+ std::cout << "rc" << std::endl;
+ for (size_type i = 0; i < m_over_top; ++i)
+ std::cerr << m_a_entries[i] << std::endl;
+ std::cout << std::endl;
+ }
+#endif
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
new file mode 100644
index 0000000..762e29b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/rc_binomial_heap_.hpp
@@ -0,0 +1,198 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file rc_binomial_heap_.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+/*
+ * Redundant-counter binomial heap.
+ */
+
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/rc.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ rc_binomial_heap_<Value_Type, Cmp_Fn, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ binomial_heap_base_<Value_Type, Cmp_Fn, Allocator>
+
+#define PB_DS_RC_C_DEC \
+ rc<typename PB_DS_BASE_C_DEC::node, Allocator>
+
+ /**
+ * class description = "8y|\|0|\/|i41 h34p 74813">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class rc_binomial_heap_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ typedef typename base_type::node_pointer node_pointer;
+
+ typedef typename base_type::const_node_pointer const_node_pointer;
+
+ typedef PB_DS_RC_C_DEC rc_t;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef typename base_type::pointer pointer;
+
+ typedef typename base_type::const_pointer const_pointer;
+
+ typedef typename base_type::reference reference;
+
+ typedef typename base_type::const_reference const_reference;
+
+ typedef typename base_type::const_point_iterator const_point_iterator;
+
+ typedef typename base_type::point_iterator point_iterator;
+
+ typedef typename base_type::const_iterator const_iterator;
+
+ typedef typename base_type::iterator iterator;
+
+ typedef typename base_type::cmp_fn cmp_fn;
+
+ typedef typename base_type::allocator_type allocator_type;
+
+ public:
+
+ rc_binomial_heap_();
+
+ rc_binomial_heap_(const Cmp_Fn& r_cmp_fn);
+
+ rc_binomial_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ ~rc_binomial_heap_();
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ inline point_iterator
+ push(const_reference r_val);
+
+ void
+ modify(point_iterator it, const_reference r_new_val);
+
+ inline void
+ pop();
+
+ void
+ erase(point_iterator it);
+
+ inline void
+ clear();
+
+ template<typename Pred>
+ size_type
+ erase_if(Pred pred);
+
+ template<typename Pred>
+ void
+ split(Pred pred, PB_DS_CLASS_C_DEC& other);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+#ifdef PB_DS_RC_BINOMIAL_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+
+ inline node_pointer
+ link_with_next_sibling(node_pointer p_nd);
+
+ void
+ make_0_exposed();
+
+ void
+ make_binomial_heap();
+
+#ifdef _GLIBCXX_DEBUG
+ static const_node_pointer
+ next_2_pointer(const_node_pointer p_nd);
+
+ static const_node_pointer
+ next_after_0_pointer(const_node_pointer p_nd);
+#endif
+
+ private:
+ rc_t m_rc;
+ };
+
+#include <ext/pb_ds/detail/rc_binomial_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+
+#undef PB_DS_CLASS_T_DEC
+
+#undef PB_DS_BASE_C_DEC
+
+#undef PB_DS_RC_C_DEC
+ } // namespace detail
+} // namespace __gnu_pbds
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..26965ae
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/split_join_fn_imps.hpp
@@ -0,0 +1,81 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+void
+PB_DS_CLASS_C_DEC::
+split(Pred pred, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ make_binomial_heap();
+ other.make_binomial_heap();
+
+ base_type::split(pred, other);
+
+ base_type::find_max();
+ other.find_max();
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ make_binomial_heap();
+ other.make_binomial_heap();
+
+ base_type::join(other);
+
+ base_type::find_max();
+ other.find_max();
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp
new file mode 100644
index 0000000..1fb3b8b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains an implementation for rc_binomial_heap_.
+ */
+
+#ifdef PB_DS_RC_BINOMIAL_HEAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ base_type::trace();
+
+ m_rc.trace();
+}
+
+#endif // #ifdef PB_DS_RC_BINOMIAL_HEAP_TRACE_
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp
new file mode 100644
index 0000000..94cd515
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp
@@ -0,0 +1,211 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file cc_hash_max_collision_check_resize_trigger_imp.hpp
+ * Contains a resize trigger implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+cc_hash_max_collision_check_resize_trigger(float load) :
+ m_load(load),
+ m_size(0),
+ m_num_col(0),
+ m_max_col(0),
+ m_resize_needed(false)
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_start()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_collision()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_end()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_start()
+{ m_num_col = 0; }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_collision()
+{ ++m_num_col; }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_end()
+{ calc_resize_needed(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_start()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_collision()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_end()
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_inserted(size_type)
+{ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erased(size_type)
+{ m_resize_needed = true; }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_cleared()
+{ m_resize_needed = false; }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_resize_needed() const
+{ return m_resize_needed; }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_grow_needed(size_type /*size*/, size_type /*num_used_e*/) const
+{ return m_num_col >= m_max_col; }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ m_size = new_size;
+
+#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
+ std::cerr << "chmccrt::notify_resized "
+ << static_cast<unsigned long>(new_size) << std::endl;
+#endif
+
+ calc_max_num_coll();
+ calc_resize_needed();
+ m_num_col = 0;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+calc_max_num_coll()
+{
+ // max_col <-- \sqrt{2 load \ln( 2 m \ln( m ) ) }
+ const double ln_arg = 2 * m_size * std::log(double(m_size));
+ m_max_col = size_type(std::ceil(std::sqrt(2 * m_load * std::log(ln_arg))));
+
+#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
+ std::cerr << "chmccrt::calc_max_num_coll "
+ << static_cast<unsigned long>(m_size) << " "
+ << static_cast<unsigned long>(m_max_col) << std::endl;
+#endif
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_externally_resized(size_type new_size)
+{ notify_resized(new_size); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ std::swap(m_load, other.m_load);
+ std::swap(m_size, other.m_size);
+ std::swap(m_num_col, other.m_num_col);
+ std::swap(m_max_col, other.m_max_col);
+ std::swap(m_resize_needed, other.m_resize_needed);
+}
+
+PB_DS_CLASS_T_DEC
+inline float
+PB_DS_CLASS_C_DEC::
+get_load() const
+{
+ PB_DS_STATIC_ASSERT(access, external_load_access);
+ return m_load;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+calc_resize_needed()
+{ m_resize_needed = m_resize_needed || m_num_col >= m_max_col; }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+set_load(float load)
+{
+ PB_DS_STATIC_ASSERT(access, external_load_access);
+ m_load = load;
+ calc_max_num_coll();
+ calc_resize_needed();
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp
new file mode 100644
index 0000000..b58f2ec
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_exponential_size_policy_imp.hpp
+ * Contains a resize size policy implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+hash_exponential_size_policy(size_type start_size, size_type grow_factor) :
+ m_start_size(start_size),
+ m_grow_factor(grow_factor)
+{ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ std::swap(m_start_size, other.m_start_size);
+ std::swap(m_grow_factor, other.m_grow_factor);
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_nearest_larger_size(size_type size) const
+{
+ size_type ret = m_start_size;
+ while (ret <= size)
+ {
+ const size_type next_ret = ret* m_grow_factor;
+ if (next_ret < ret)
+ __throw_insert_error();
+ ret = next_ret;
+ }
+ return ret;
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_nearest_smaller_size(size_type size) const
+{
+ size_type ret = m_start_size;
+ while (true)
+ {
+ const size_type next_ret = ret* m_grow_factor;
+ if (next_ret < ret)
+ __throw_resize_error();
+ if (next_ret >= size)
+ return (ret);
+ ret = next_ret;
+ }
+ return ret;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
new file mode 100644
index 0000000..3403b09
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp
@@ -0,0 +1,289 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_load_check_resize_trigger_imp.hpp
+ * Contains a resize trigger implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+hash_load_check_resize_trigger(float load_min, float load_max)
+: m_load_min(load_min), m_load_max(load_max), m_next_shrink_size(0),
+ m_next_grow_size(0), m_resize_needed(false)
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_start()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_collision()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_end()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_start()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_collision()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_end()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_start()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_collision()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_end()
+{ _GLIBCXX_DEBUG_ONLY(assert_valid();) }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_inserted(size_type num_entries)
+{
+ m_resize_needed = (num_entries >= m_next_grow_size);
+ size_base::set_size(num_entries);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erased(size_type num_entries)
+{
+ size_base::set_size(num_entries);
+ m_resize_needed = num_entries <= m_next_shrink_size;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_resize_needed() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return m_resize_needed;
+}
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_grow_needed(size_type /*size*/, size_type num_entries) const
+{
+ _GLIBCXX_DEBUG_ASSERT(m_resize_needed);
+ return num_entries >= m_next_grow_size;
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~hash_load_check_resize_trigger() { }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ m_resize_needed = false;
+ m_next_grow_size = size_type(m_load_max * new_size - 1);
+ m_next_shrink_size = size_type(m_load_min * new_size);
+
+#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
+ std::cerr << "hlcrt::notify_resized " <<
+ static_cast<unsigned long>(new_size) << " " <<
+ static_cast<unsigned long>(m_load_min) << " " <<
+ static_cast<unsigned long>(m_load_max) << " " <<
+ static_cast<unsigned long>(m_next_shrink_size) << " " <<
+ static_cast<unsigned long>(m_next_grow_size) << " " << std::endl;
+#endif
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_externally_resized(size_type new_size)
+{
+ m_resize_needed = false;
+ size_type new_grow_size = size_type(m_load_max * new_size - 1);
+ size_type new_shrink_size = size_type(m_load_min * new_size);
+ if (new_grow_size >= m_next_grow_size)
+ {
+ _GLIBCXX_DEBUG_ASSERT(new_shrink_size > m_next_shrink_size);
+ m_next_grow_size = new_grow_size;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
+ std::cerr << "hlcrt::notify_externally_resized1 " <<
+ static_cast<unsigned long>(new_size) << " " <<
+ static_cast<unsigned long>(m_load_min) << " " <<
+ static_cast<unsigned long>(m_load_max) << " " <<
+ static_cast<unsigned long>(m_next_shrink_size) << " " <<
+ static_cast<unsigned long>(m_next_grow_size) << " " << std::endl;
+#endif
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(new_shrink_size <= m_next_shrink_size);
+ m_next_shrink_size = new_shrink_size;
+
+#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
+ std::cerr << "hlcrt::notify_externally_resized2 " <<
+ static_cast<unsigned long>(new_size) << " " <<
+ static_cast<unsigned long>(m_load_min) << " " <<
+ static_cast<unsigned long>(m_load_max) << " " <<
+ static_cast<unsigned long>(m_next_shrink_size) << " " <<
+ static_cast<unsigned long>(m_next_grow_size) << " " << std::endl;
+#endif
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_cleared()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ size_base::set_size(0);
+ m_resize_needed = (0 < m_next_shrink_size);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ size_base::swap(other);
+ std::swap(m_load_min, other.m_load_min);
+ std::swap(m_load_max, other.m_load_max);
+ std::swap(m_resize_needed, other.m_resize_needed);
+ std::swap(m_next_grow_size, other.m_next_grow_size);
+ std::swap(m_next_shrink_size, other.m_next_shrink_size);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+inline std::pair<float, float>
+PB_DS_CLASS_C_DEC::
+get_loads() const
+{
+ PB_DS_STATIC_ASSERT(access, external_load_access);
+ return std::make_pair(m_load_min, m_load_max);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+set_loads(std::pair<float, float> load_pair)
+{
+ PB_DS_STATIC_ASSERT(access, external_load_access);
+ const float old_load_min = m_load_min;
+ const float old_load_max = m_load_max;
+ const size_type old_next_shrink_size = m_next_shrink_size;
+ const size_type old_next_grow_size = m_next_grow_size;
+ const bool old_resize_needed = m_resize_needed;
+
+ __try
+ {
+ m_load_min = load_pair.first;
+ m_load_max = load_pair.second;
+ do_resize(static_cast<size_type>(size_base::get_size() / ((m_load_min + m_load_max) / 2)));
+ }
+ __catch(...)
+ {
+ m_load_min = old_load_min;
+ m_load_max = old_load_max;
+ m_next_shrink_size = old_next_shrink_size;
+ m_next_grow_size = old_next_grow_size;
+ m_resize_needed = old_resize_needed;
+ __throw_exception_again;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+do_resize(size_type)
+{ std::abort(); }
+
+#ifdef _GLIBCXX_DEBUG
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ _GLIBCXX_DEBUG_ASSERT(m_load_max > m_load_min);
+ _GLIBCXX_DEBUG_ASSERT(m_next_grow_size >= m_next_shrink_size);
+}
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp
new file mode 100644
index 0000000..c29b3d5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp
@@ -0,0 +1,94 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_load_check_resize_trigger_size_base.hpp
+ * Contains an base holding size for some resize policies.
+ */
+
+#ifndef PB_DS_HASH_LOAD_CHECK_RESIZE_TRIGGER_SIZE_BASE_HPP
+#define PB_DS_HASH_LOAD_CHECK_RESIZE_TRIGGER_SIZE_BASE_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ // Primary template.
+ template<typename Size_Type, bool Hold_Size>
+ class hash_load_check_resize_trigger_size_base;
+
+ // Specializations.
+ template<typename Size_Type>
+ class hash_load_check_resize_trigger_size_base<Size_Type, true>
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ hash_load_check_resize_trigger_size_base(): m_size(0)
+ { }
+
+ inline void
+ swap(hash_load_check_resize_trigger_size_base& other)
+ { std::swap(m_size, other.m_size); }
+
+ inline void
+ set_size(size_type size)
+ { m_size = size; }
+
+ inline size_type
+ get_size() const
+ { return m_size; }
+
+ private:
+ size_type m_size;
+ };
+
+ template<typename Size_Type>
+ class hash_load_check_resize_trigger_size_base<Size_Type, false>
+ {
+ protected:
+ typedef Size_Type size_type;
+
+ protected:
+ inline void
+ swap(hash_load_check_resize_trigger_size_base& other) { }
+
+ inline void
+ set_size(size_type size) { }
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
new file mode 100644
index 0000000..a28f5ed
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp
@@ -0,0 +1,161 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_prime_size_policy_imp.hpp
+ * Contains a resize size policy implementation.
+ */
+
+#pragma GCC system_header
+
+namespace detail
+{
+ enum
+ {
+ num_distinct_sizes_32_bit = 30,
+ num_distinct_sizes_64_bit = 62,
+ num_distinct_sizes = sizeof(std::size_t) != 8 ?
+ num_distinct_sizes_32_bit : num_distinct_sizes_64_bit,
+ };
+
+ // Originally taken from the SGI implementation; acknowledged in the docs.
+ // Further modified (for 64 bits) from tr1's hashtable.
+ static const std::size_t g_a_sizes[num_distinct_sizes_64_bit] =
+ {
+ /* 0 */ 5ul,
+ /* 1 */ 11ul,
+ /* 2 */ 23ul,
+ /* 3 */ 47ul,
+ /* 4 */ 97ul,
+ /* 5 */ 199ul,
+ /* 6 */ 409ul,
+ /* 7 */ 823ul,
+ /* 8 */ 1741ul,
+ /* 9 */ 3469ul,
+ /* 10 */ 6949ul,
+ /* 11 */ 14033ul,
+ /* 12 */ 28411ul,
+ /* 13 */ 57557ul,
+ /* 14 */ 116731ul,
+ /* 15 */ 236897ul,
+ /* 16 */ 480881ul,
+ /* 17 */ 976369ul,
+ /* 18 */ 1982627ul,
+ /* 19 */ 4026031ul,
+ /* 20 */ 8175383ul,
+ /* 21 */ 16601593ul,
+ /* 22 */ 33712729ul,
+ /* 23 */ 68460391ul,
+ /* 24 */ 139022417ul,
+ /* 25 */ 282312799ul,
+ /* 26 */ 573292817ul,
+ /* 27 */ 1164186217ul,
+ /* 28 */ 2364114217ul,
+ /* 29 */ 4294967291ul,
+ /* 30 */ (std::size_t)8589934583ull,
+ /* 31 */ (std::size_t)17179869143ull,
+ /* 32 */ (std::size_t)34359738337ull,
+ /* 33 */ (std::size_t)68719476731ull,
+ /* 34 */ (std::size_t)137438953447ull,
+ /* 35 */ (std::size_t)274877906899ull,
+ /* 36 */ (std::size_t)549755813881ull,
+ /* 37 */ (std::size_t)1099511627689ull,
+ /* 38 */ (std::size_t)2199023255531ull,
+ /* 39 */ (std::size_t)4398046511093ull,
+ /* 40 */ (std::size_t)8796093022151ull,
+ /* 41 */ (std::size_t)17592186044399ull,
+ /* 42 */ (std::size_t)35184372088777ull,
+ /* 43 */ (std::size_t)70368744177643ull,
+ /* 44 */ (std::size_t)140737488355213ull,
+ /* 45 */ (std::size_t)281474976710597ull,
+ /* 46 */ (std::size_t)562949953421231ull,
+ /* 47 */ (std::size_t)1125899906842597ull,
+ /* 48 */ (std::size_t)2251799813685119ull,
+ /* 49 */ (std::size_t)4503599627370449ull,
+ /* 50 */ (std::size_t)9007199254740881ull,
+ /* 51 */ (std::size_t)18014398509481951ull,
+ /* 52 */ (std::size_t)36028797018963913ull,
+ /* 53 */ (std::size_t)72057594037927931ull,
+ /* 54 */ (std::size_t)144115188075855859ull,
+ /* 55 */ (std::size_t)288230376151711717ull,
+ /* 56 */ (std::size_t)576460752303423433ull,
+ /* 57 */ (std::size_t)1152921504606846883ull,
+ /* 58 */ (std::size_t)2305843009213693951ull,
+ /* 59 */ (std::size_t)4611686018427387847ull,
+ /* 60 */ (std::size_t)9223372036854775783ull,
+ /* 61 */ (std::size_t)18446744073709551557ull,
+ };
+
+} // namespace detail
+
+PB_DS_CLASS_T_DEC
+inline
+PB_DS_CLASS_C_DEC::
+hash_prime_size_policy(size_type n) : m_start_size(n)
+{ m_start_size = get_nearest_larger_size(n); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{ std::swap(m_start_size, other.m_start_size); }
+
+PB_DS_CLASS_T_DEC
+inline PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_nearest_larger_size(size_type n) const
+{
+ const std::size_t* const p_upper = std::upper_bound(detail::g_a_sizes,
+ detail::g_a_sizes + detail::num_distinct_sizes, n);
+
+ if (p_upper == detail::g_a_sizes + detail::num_distinct_sizes)
+ __throw_resize_error();
+ return *p_upper;
+}
+
+PB_DS_CLASS_T_DEC
+inline PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_nearest_smaller_size(size_type n) const
+{
+ const size_t* p_lower = std::lower_bound(detail::g_a_sizes,
+ detail::g_a_sizes + detail::num_distinct_sizes, n);
+
+ if (*p_lower >= n && p_lower != detail::g_a_sizes)
+ --p_lower;
+ if (*p_lower < m_start_size)
+ return m_start_size;
+ return *p_lower;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp
new file mode 100644
index 0000000..39cf7dc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp
@@ -0,0 +1,249 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_standard_resize_policy_imp.hpp
+ * Contains a resize policy implementation.
+ */
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+hash_standard_resize_policy()
+: m_size(Size_Policy::get_nearest_larger_size(1))
+{ trigger_policy_base::notify_externally_resized(m_size); }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+hash_standard_resize_policy(const Size_Policy& r_size_policy)
+: Size_Policy(r_size_policy), m_size(Size_Policy::get_nearest_larger_size(1))
+{ trigger_policy_base::notify_externally_resized(m_size); }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+hash_standard_resize_policy(const Size_Policy& r_size_policy,
+ const Trigger_Policy& r_trigger_policy)
+: Size_Policy(r_size_policy), Trigger_Policy(r_trigger_policy),
+ m_size(Size_Policy::get_nearest_larger_size(1))
+{ trigger_policy_base::notify_externally_resized(m_size); }
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~hash_standard_resize_policy()
+{ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ trigger_policy_base::swap(other);
+ size_policy_base::swap(other);
+ std::swap(m_size, other.m_size);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_start()
+{ trigger_policy_base::notify_find_search_start(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_collision()
+{ trigger_policy_base::notify_find_search_collision(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_find_search_end()
+{ trigger_policy_base::notify_find_search_end(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_start()
+{ trigger_policy_base::notify_insert_search_start(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_collision()
+{ trigger_policy_base::notify_insert_search_collision(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_insert_search_end()
+{ trigger_policy_base::notify_insert_search_end(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_start()
+{ trigger_policy_base::notify_erase_search_start(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_collision()
+{ trigger_policy_base::notify_erase_search_collision(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erase_search_end()
+{ trigger_policy_base::notify_erase_search_end(); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_inserted(size_type num_e)
+{ trigger_policy_base::notify_inserted(num_e); }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+notify_erased(size_type num_e)
+{ trigger_policy_base::notify_erased(num_e); }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_cleared()
+{ trigger_policy_base::notify_cleared(); }
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+is_resize_needed() const
+{ return trigger_policy_base::is_resize_needed(); }
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_new_size(size_type size, size_type num_used_e) const
+{
+ if (trigger_policy_base::is_grow_needed(size, num_used_e))
+ return size_policy_base::get_nearest_larger_size(size);
+ return size_policy_base::get_nearest_smaller_size(size);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+notify_resized(size_type new_size)
+{
+ trigger_policy_base::notify_resized(new_size);
+ m_size = new_size;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+get_actual_size() const
+{
+ PB_DS_STATIC_ASSERT(access, external_size_access);
+ return m_size;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+resize(size_type new_size)
+{
+ PB_DS_STATIC_ASSERT(access, external_size_access);
+ size_type actual_size = size_policy_base::get_nearest_larger_size(1);
+ while (actual_size < new_size)
+ {
+ const size_type pot = size_policy_base::get_nearest_larger_size(actual_size);
+
+ if (pot == actual_size && pot < new_size)
+ __throw_resize_error();
+ actual_size = pot;
+ }
+
+ if (actual_size > 0)
+ --actual_size;
+
+ const size_type old_size = m_size;
+ __try
+ {
+ do_resize(actual_size - 1);
+ }
+ __catch(insert_error& )
+ {
+ m_size = old_size;
+ __throw_resize_error();
+ }
+ __catch(...)
+ {
+ m_size = old_size;
+ __throw_exception_again;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+do_resize(size_type)
+{
+ // Do nothing
+}
+
+PB_DS_CLASS_T_DEC
+Trigger_Policy&
+PB_DS_CLASS_C_DEC::
+get_trigger_policy()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Trigger_Policy&
+PB_DS_CLASS_C_DEC::
+get_trigger_policy() const
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+Size_Policy&
+PB_DS_CLASS_C_DEC::
+get_size_policy()
+{ return *this; }
+
+PB_DS_CLASS_T_DEC
+const Size_Policy&
+PB_DS_CLASS_C_DEC::
+get_size_policy() const
+{ return *this; }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp
new file mode 100644
index 0000000..ed70b95
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_resize_policy.hpp
+ * Contains a sample resize policy for hash tables.
+ */
+
+#ifndef PB_DS_SAMPLE_RESIZE_POLICY_HPP
+#define PB_DS_SAMPLE_RESIZE_POLICY_HPP
+
+// A sample resize policy.
+class sample_resize_policy
+{
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+ // Default constructor.
+ sample_resize_policy();
+
+ // Copy constructor.
+ sample_range_hashing(const sample_resize_policy& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_resize_policy& other);
+
+protected:
+
+ // Notifies a search started.
+ inline void
+ notify_insert_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_insert_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_insert_search_end();
+
+ // Notifies a search started.
+ inline void
+ notify_find_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_find_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_find_search_end();
+
+ // Notifies a search started.
+ inline void
+ notify_erase_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_erase_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_erase_search_end();
+
+ // Notifies an element was inserted.
+ inline void
+ notify_inserted(size_type num_e);
+
+ // Notifies an element was erased.
+ inline void
+ notify_erased(size_type num_e);
+
+ // Notifies the table was cleared.
+ void
+ notify_cleared();
+
+ // Notifies the table was resized to new_size.
+ void
+ notify_resized(size_type new_size);
+
+ // Queries whether a resize is needed.
+ inline bool
+ is_resize_needed() const;
+
+ // Queries what the new size should be.
+ size_type
+ get_new_size(size_type size, size_type num_used_e) const;
+};
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp
new file mode 100644
index 0000000..a27dd94
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_resize_trigger.hpp
@@ -0,0 +1,137 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_resize_trigger.hpp
+ * Contains a sample resize trigger policy class.
+ */
+
+#ifndef PB_DS_SAMPLE_RESIZE_TRIGGER_HPP
+#define PB_DS_SAMPLE_RESIZE_TRIGGER_HPP
+
+// A sample resize trigger policy.
+class sample_resize_trigger
+{
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+ // Default constructor.
+ sample_resize_trigger();
+
+ // Copy constructor.
+ sample_range_hashing(const sample_resize_trigger& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_resize_trigger& other);
+
+protected:
+
+ // Notifies a search started.
+ inline void
+ notify_insert_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_insert_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_insert_search_end();
+
+ // Notifies a search started.
+ inline void
+ notify_find_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_find_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_find_search_end();
+
+ // Notifies a search started.
+ inline void
+ notify_erase_search_start();
+
+ // Notifies a search encountered a collision.
+ inline void
+ notify_erase_search_collision();
+
+ // Notifies a search ended.
+ inline void
+ notify_erase_search_end();
+
+ // Notifies an element was inserted. the total number of entries in
+ // the table is num_entries.
+ inline void
+ notify_inserted(size_type num_entries);
+
+ // Notifies an element was erased.
+ inline void
+ notify_erased(size_type num_entries);
+
+ // Notifies the table was cleared.
+ void
+ notify_cleared();
+
+ // Notifies the table was resized as a result of this object's
+ // signifying that a resize is needed.
+ void
+ notify_resized(size_type new_size);
+
+ // Notifies the table was resized externally.
+ void
+ notify_externally_resized(size_type new_size);
+
+ // Queries whether a resize is needed.
+ inline bool
+ is_resize_needed() const;
+
+ // Queries whether a grow is needed.
+ inline bool
+ is_grow_needed(size_type size, size_type num_entries) const;
+
+private:
+
+ // Resizes to new_size.
+ virtual void
+ do_resize(size_type new_size);
+};
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp
new file mode 100644
index 0000000..1f2d3a9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp
@@ -0,0 +1,73 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_size_policy.hpp
+ * Contains a sample size resize-policy.
+ */
+
+#ifndef PB_DS_SAMPLE_SIZE_POLICY_HPP
+#define PB_DS_SAMPLE_SIZE_POLICY_HPP
+
+// A sample size policy.
+class sample_size_policy
+{
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+ // Default constructor.
+ sample_size_policy();
+
+ // Copy constructor.
+ sample_range_hashing(const sample_size_policy& other);
+
+ // Swaps content.
+ inline void
+ swap(sample_size_policy& other);
+
+protected:
+
+ // Given a __size size, returns a __size that is larger.
+ inline size_type
+ get_nearest_larger_size(size_type size) const;
+
+ // Given a __size size, returns a __size that is smaller.
+ inline size_type
+ get_nearest_smaller_size(size_type size) const;
+};
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..2225895
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,102 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ insert(*(first_it++));
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME()
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn) :
+ base_type(r_cmp_fn)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const Cmp_Fn& r_cmp_fn, const node_update& r_node_update) :
+ base_type(r_cmp_fn, r_node_update)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC& other) :
+ base_type(other)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ base_type::swap(other);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{ base_type::m_p_head->m_special = true; }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp
new file mode 100644
index 0000000..084e25d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp
@@ -0,0 +1,74 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ base_type::assert_valid();
+ const node_pointer p_head = base_type::m_p_head;
+ assert_special_imp(p_head);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_special_imp(const node_pointer p_nd) const
+{
+ if (p_nd == NULL)
+ return;
+
+ if (p_nd == base_type::m_p_head)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_special);
+ assert_special_imp(p_nd->m_p_parent);
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(!p_nd->m_special);
+ assert_special_imp(p_nd->m_p_left);
+ assert_special_imp(p_nd->m_p_right);
+}
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp
new file mode 100644
index 0000000..508f586
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp
@@ -0,0 +1,157 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline bool
+PB_DS_CLASS_C_DEC::
+erase(const_key_reference r_key)
+{
+ point_iterator it = find(r_key);
+ if (it == base_type::end())
+ return false;
+ erase(it);
+ return true;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+erase(iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ if (it == base_type::end())
+ return it;
+ iterator ret_it = it;
+ ++ret_it;
+ erase_node(it.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::reverse_iterator
+PB_DS_CLASS_C_DEC::
+erase(reverse_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ if (it.m_p_nd == base_type::m_p_head)
+ return (it);
+ reverse_iterator ret_it = it;
+ ++ret_it;
+ erase_node(it.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ret_it;
+}
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ size_type num_ersd = 0;
+ iterator it = base_type::begin();
+ while (it != base_type::end())
+ {
+ if (pred(*it))
+ {
+ ++num_ersd;
+ it = erase(it);
+ }
+ else
+ ++it;
+ }
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return num_ersd;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase_node(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ splay(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(p_nd == this->m_p_head->m_p_parent);
+
+ node_pointer p_l = p_nd->m_p_left;
+ node_pointer p_r = p_nd->m_p_right;
+
+ base_type::update_min_max_for_erased_node(p_nd);
+ base_type::actual_erase_node(p_nd);
+ if (p_r == NULL)
+ {
+ base_type::m_p_head->m_p_parent = p_l;
+ if (p_l != NULL)
+ p_l->m_p_parent = base_type::m_p_head;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ return;
+ }
+
+ node_pointer p_target_r = leftmost(p_r);
+ _GLIBCXX_DEBUG_ASSERT(p_target_r != NULL);
+ p_r->m_p_parent = base_type::m_p_head;
+ base_type::m_p_head->m_p_parent = p_r;
+ splay(p_target_r);
+
+ _GLIBCXX_DEBUG_ONLY(p_target_r->m_p_left = NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_target_r->m_p_parent == this->m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(this->m_p_head->m_p_parent == p_target_r);
+
+ p_target_r->m_p_left = p_l;
+ if (p_l != NULL)
+ p_l->m_p_parent = p_target_r;
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ apply_update(p_target_r, (node_update* )this);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+leftmost(node_pointer p_nd)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ while (p_nd->m_p_left != NULL)
+ p_nd = p_nd->m_p_left;
+ return p_nd;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp
new file mode 100644
index 0000000..182425a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp
@@ -0,0 +1,99 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key)
+{
+ node_pointer p_found = find_imp(r_key);
+ if (p_found != base_type::m_p_head)
+ splay(p_found);
+ return point_iterator(p_found);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_point_iterator
+PB_DS_CLASS_C_DEC::
+find(const_key_reference r_key) const
+{
+ const node_pointer p_found = find_imp(r_key);
+ if (p_found != base_type::m_p_head)
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->splay(p_found);
+ return point_iterator(p_found);
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+find_imp(const_key_reference r_key)
+{
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid();)
+ node_pointer p_nd = base_type::m_p_head->m_p_parent;
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
+ {
+ if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(p_nd->m_value)))
+ return p_nd;
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+ return base_type::m_p_head;
+}
+
+PB_DS_CLASS_T_DEC
+inline const typename PB_DS_CLASS_C_DEC::node_pointer
+PB_DS_CLASS_C_DEC::
+find_imp(const_key_reference r_key) const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ node_pointer p_nd = base_type::m_p_head->m_p_parent;
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), r_key))
+ {
+ if (!Cmp_Fn::operator()(r_key, PB_DS_V2F(p_nd->m_value)))
+ return p_nd;
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+ return base_type::m_p_head;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp
new file mode 100644
index 0000000..636b9ab
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp
@@ -0,0 +1,39 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file info_fn_imps.hpp
+ * Contains an implementation.
+ */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp
new file mode 100644
index 0000000..e9ae987
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert(const_reference r_value)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ std::pair<point_iterator, bool> ins_pair = insert_leaf_imp(r_value);
+ ins_pair.first.m_p_nd->m_special = false;
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ splay(ins_pair.first.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ return ins_pair;
+}
+
+PB_DS_CLASS_T_DEC
+inline std::pair<typename PB_DS_CLASS_C_DEC::point_iterator, bool>
+PB_DS_CLASS_C_DEC::
+insert_leaf_imp(const_reference r_value)
+{
+ _GLIBCXX_DEBUG_ONLY(base_type::structure_only_assert_valid();)
+ if (base_type::m_size == 0)
+ return std::make_pair(base_type::insert_imp_empty(r_value), true);
+
+ node_pointer p_nd = base_type::m_p_head->m_p_parent;
+ node_pointer p_pot = base_type::m_p_head;
+
+ while (p_nd != NULL)
+ if (!Cmp_Fn::operator()(PB_DS_V2F(p_nd->m_value), PB_DS_V2F(r_value)))
+ {
+ if (!Cmp_Fn::operator()(PB_DS_V2F(r_value), PB_DS_V2F(p_nd->m_value)))
+ {
+ return std::make_pair(point_iterator(p_nd), false);
+ }
+ p_pot = p_nd;
+ p_nd = p_nd->m_p_left;
+ }
+ else
+ p_nd = p_nd->m_p_right;
+
+ if (p_pot == base_type::m_p_head)
+ return std::make_pair(base_type::insert_leaf_new(r_value, base_type::m_p_head->m_p_right, false), true);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::check_key_does_not_exist(PB_DS_V2F(r_value)));
+
+ p_nd = p_pot->m_p_left;
+ if (p_nd == NULL)
+ return (std::make_pair(base_type::insert_leaf_new(r_value, p_pot, true), true));
+
+ while (p_nd->m_p_right != NULL)
+ p_nd = p_nd->m_p_right;
+
+ return std::make_pair(insert_leaf_new(r_value, p_nd, false), true);
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/node.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/node.hpp
new file mode 100644
index 0000000..fbf398d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/node.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node.hpp
+ * Contains an implementation struct for splay_tree_'s node.
+ */
+
+#ifndef PB_DS_SPLAY_TREE_NODE_HPP
+#define PB_DS_SPLAY_TREE_NODE_HPP
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Value_Type, class Metadata, class Allocator>
+ struct splay_tree_node_
+ {
+ public:
+ typedef Value_Type value_type;
+ typedef Metadata metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ splay_tree_node_<Value_Type, Metadata, Allocator> >::other::pointer
+ node_pointer;
+
+ typedef
+ typename Allocator::template rebind<metadata_type>::other::reference
+ metadata_reference;
+
+ typedef
+ typename Allocator::template rebind<metadata_type>::other::const_reference
+ const_metadata_reference;
+
+#ifdef PB_DS_BIN_SEARCH_TREE_TRACE_
+ void
+ trace() const
+ { std::cout << PB_DS_V2F(m_value) << "(" << m_metadata << ")"; }
+#endif
+
+ inline bool
+ special() const
+ { return m_special; }
+
+ inline const_metadata_reference
+ get_metadata() const
+ { return m_metadata; }
+
+ inline metadata_reference
+ get_metadata()
+ { return m_metadata; }
+
+ value_type m_value;
+ bool m_special;
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+ node_pointer m_p_parent;
+ metadata_type m_metadata;
+ };
+
+ template<typename Value_Type, typename Allocator>
+ struct splay_tree_node_<Value_Type, null_node_metadata, Allocator>
+ {
+ public:
+ typedef Value_Type value_type;
+ typedef null_node_metadata metadata_type;
+
+ typedef
+ typename Allocator::template rebind<
+ splay_tree_node_<Value_Type, null_node_metadata, Allocator> >::other::pointer
+ node_pointer;
+
+ inline bool
+ special() const
+ { return m_special; }
+
+#ifdef PB_DS_BIN_SEARCH_TREE_TRACE_
+ void
+ trace() const
+ { std::cout << PB_DS_V2F(m_value); }
+#endif
+
+ node_pointer m_p_left;
+ node_pointer m_p_right;
+ node_pointer m_p_parent;
+ value_type m_value;
+ bool m_special;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp
new file mode 100644
index 0000000..e4f3556
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp
@@ -0,0 +1,283 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file splay_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+splay(node_pointer p_nd)
+{
+ while (p_nd->m_p_parent != base_type::m_p_head)
+ {
+#ifdef _GLIBCXX_DEBUG
+ {
+ node_pointer p_head = base_type::m_p_head;
+ assert_special_imp(p_head);
+ }
+#endif
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd);)
+
+ if (p_nd->m_p_parent->m_p_parent == base_type::m_p_head)
+ {
+ base_type::rotate_parent(p_nd);
+ _GLIBCXX_DEBUG_ASSERT(p_nd == this->m_p_head->m_p_parent);
+ }
+ else
+ {
+ const node_pointer p_parent = p_nd->m_p_parent;
+ const node_pointer p_grandparent = p_parent->m_p_parent;
+
+#ifdef _GLIBCXX_DEBUG
+ const size_type total =
+ base_type::recursive_count(p_grandparent);
+ _GLIBCXX_DEBUG_ASSERT(total >= 3);
+#endif
+
+ if (p_parent->m_p_left == p_nd &&
+ p_grandparent->m_p_right == p_parent)
+ splay_zig_zag_left(p_nd, p_parent, p_grandparent);
+ else if (p_parent->m_p_right == p_nd &&
+ p_grandparent->m_p_left == p_parent)
+ splay_zig_zag_right(p_nd, p_parent, p_grandparent);
+ else if (p_parent->m_p_left == p_nd &&
+ p_grandparent->m_p_left == p_parent)
+ splay_zig_zig_left(p_nd, p_parent, p_grandparent);
+ else
+ splay_zig_zig_right(p_nd, p_parent, p_grandparent);
+ _GLIBCXX_DEBUG_ASSERT(total ==this->recursive_count(p_nd));
+ }
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd);)
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zig_zag_left(node_pointer p_nd, node_pointer p_parent,
+ node_pointer p_grandparent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_parent == p_nd->m_p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_grandparent);)
+
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_left == p_nd &&
+ p_grandparent->m_p_right == p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_right;
+ node_pointer p_c = p_nd->m_p_left;
+
+ p_nd->m_p_right = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_nd->m_p_left = p_grandparent;
+ p_grandparent->m_p_parent = p_nd;
+
+ p_parent->m_p_left = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_right = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zig_zag_right(node_pointer p_nd, node_pointer p_parent,
+ node_pointer p_grandparent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_parent == p_nd->m_p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_grandparent);)
+
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_right == p_nd &&
+ p_grandparent->m_p_left == p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_left;
+ node_pointer p_c = p_nd->m_p_right;
+
+ p_nd->m_p_left = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_nd->m_p_right = p_grandparent;
+ p_grandparent->m_p_parent = p_nd;
+
+ p_parent->m_p_right = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_left = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zig_zig_left(node_pointer p_nd, node_pointer p_parent,
+ node_pointer p_grandparent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_parent == p_nd->m_p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_grandparent == p_parent->m_p_parent);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_grandparent);)
+
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_left == p_nd &&
+ p_nd->m_p_parent->m_p_parent->m_p_left == p_nd->m_p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_right;
+ node_pointer p_c = p_parent->m_p_right;
+
+ p_nd->m_p_right = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_parent->m_p_right = p_grandparent;
+ p_grandparent->m_p_parent = p_parent;
+
+ p_parent->m_p_left = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_left = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zig_zig_right(node_pointer p_nd, node_pointer p_parent,
+ node_pointer p_grandparent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_parent == p_nd->m_p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_grandparent == p_parent->m_p_parent);
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_grandparent);)
+ _GLIBCXX_DEBUG_ASSERT(p_parent->m_p_right == p_nd &&
+ p_nd->m_p_parent->m_p_parent->m_p_right == p_nd->m_p_parent);
+
+ splay_zz_start(p_nd, p_parent, p_grandparent);
+
+ node_pointer p_b = p_nd->m_p_left;
+ node_pointer p_c = p_parent->m_p_left;
+
+ p_nd->m_p_left = p_parent;
+ p_parent->m_p_parent = p_nd;
+
+ p_parent->m_p_left = p_grandparent;
+ p_grandparent->m_p_parent = p_parent;
+
+ p_parent->m_p_right = p_b;
+ if (p_b != NULL)
+ p_b->m_p_parent = p_parent;
+
+ p_grandparent->m_p_right = p_c;
+ if (p_c != NULL)
+ p_c->m_p_parent = p_grandparent;
+
+ base_type::update_to_top(p_grandparent, (node_update* )this);
+ splay_zz_end(p_nd, p_parent, p_grandparent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zz_start(node_pointer p_nd,
+#ifdef _GLIBCXX_DEBUG
+ node_pointer p_parent,
+#else
+ node_pointer /*p_parent*/,
+#endif
+ node_pointer p_grandparent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_parent != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_grandparent != NULL);
+
+ const bool grandparent_head = p_grandparent->m_p_parent == base_type::m_p_head;
+
+ if (grandparent_head)
+ {
+ base_type::m_p_head->m_p_parent = base_type::m_p_head->m_p_parent;
+ p_nd->m_p_parent = base_type::m_p_head;
+ return;
+ }
+
+ node_pointer p_greatgrandparent = p_grandparent->m_p_parent;
+
+ p_nd->m_p_parent = p_greatgrandparent;
+
+ if (p_grandparent == p_greatgrandparent->m_p_left)
+ p_greatgrandparent->m_p_left = p_nd;
+ else
+ p_greatgrandparent->m_p_right = p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+splay_zz_end(node_pointer p_nd, node_pointer p_parent,
+ node_pointer p_grandparent)
+{
+ if (p_nd->m_p_parent == base_type::m_p_head)
+ base_type::m_p_head->m_p_parent = p_nd;
+
+ apply_update(p_grandparent, (node_update* )this);
+ apply_update(p_parent, (node_update* )this);
+ apply_update(p_nd, (node_update* )this);
+
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_node_consistent(p_nd);)
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
new file mode 100644
index 0000000..959893e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp
@@ -0,0 +1,298 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file splay_tree_.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+/*
+ * This implementation uses an idea from the SGI STL (using a "header" node
+ * which is needed for efficient iteration). Following is the SGI STL
+ * copyright.
+ *
+ * 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) 1994
+ * 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.
+ *
+ *
+ */
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#ifndef PB_DS_BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#define PB_DS_BIN_SEARCH_TREE_HPP__DATA_TRUE_INDICATOR
+#include <ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#ifndef PB_DS_BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#define PB_DS_BIN_SEARCH_TREE_HPP__DATA_FALSE_INDICATOR
+#include <ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp>
+#endif
+#endif
+
+#include <utility>
+#include <vector>
+#include <assert.h>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+#define PB_DS_CLASS_T_DEC \
+ template<typename Key, typename Mapped, typename Cmp_Fn, \
+ typename Node_And_It_Traits, typename Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_CLASS_NAME splay_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_CLASS_NAME splay_tree_no_data_
+#endif
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_BASE_CLASS_NAME bin_search_tree_data_
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_BASE_CLASS_NAME bin_search_tree_no_data_
+#endif
+
+#define PB_DS_CLASS_C_DEC \
+ PB_DS_CLASS_NAME<Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ PB_DS_BASE_CLASS_NAME<Key, Mapped, Cmp_Fn, Node_And_It_Traits, Allocator>
+
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+#define PB_DS_V2F(X) (X).first
+#define PB_DS_V2S(X) (X).second
+#define PB_DS_EP2VP(X)& ((X)->m_value)
+#endif
+
+#ifdef PB_DS_DATA_FALSE_INDICATOR
+#define PB_DS_V2F(X) (X)
+#define PB_DS_V2S(X) Mapped_Data()
+#define PB_DS_EP2VP(X)& ((X)->m_value.first)
+#endif
+
+ // $p14y 7r33 7481.
+ template<typename Key, typename Mapped, typename Cmp_Fn,
+ typename Node_And_It_Traits, typename Allocator>
+ class PB_DS_CLASS_NAME : public PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+ typedef typename base_type::node_pointer node_pointer;
+
+ public:
+ typedef Allocator allocator_type;
+ typedef typename Allocator::size_type size_type;
+ typedef typename Allocator::difference_type difference_type;
+ typedef Cmp_Fn cmp_fn;
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::key_pointer key_pointer;
+ typedef typename base_type::const_key_pointer const_key_pointer;
+ typedef typename base_type::key_reference key_reference;
+ typedef typename base_type::const_key_reference const_key_reference;
+ typedef typename base_type::mapped_type mapped_type;
+ typedef typename base_type::mapped_pointer mapped_pointer;
+ typedef typename base_type::const_mapped_pointer const_mapped_pointer;
+ typedef typename base_type::mapped_reference mapped_reference;
+ typedef typename base_type::const_mapped_reference const_mapped_reference;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::pointer pointer;
+ typedef typename base_type::const_pointer const_pointer;
+ typedef typename base_type::reference reference;
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::point_iterator point_iterator;
+ typedef typename base_type::const_iterator const_point_iterator;
+ typedef typename base_type::iterator iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::reverse_iterator reverse_iterator;
+ typedef typename base_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename base_type::node_update node_update;
+
+ PB_DS_CLASS_NAME();
+
+ PB_DS_CLASS_NAME(const Cmp_Fn&);
+
+ PB_DS_CLASS_NAME(const Cmp_Fn&, const node_update&);
+
+ PB_DS_CLASS_NAME(const PB_DS_CLASS_C_DEC&);
+
+ void
+ swap(PB_DS_CLASS_C_DEC&);
+
+ template<typename It>
+ void
+ copy_from_range(It, It);
+
+ void
+ initialize();
+
+ inline std::pair<point_iterator, bool>
+ insert(const_reference r_value);
+
+ inline mapped_reference
+ operator[](const_key_reference r_key)
+ {
+#ifdef PB_DS_DATA_TRUE_INDICATOR
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ std::pair<point_iterator, bool> ins_pair =
+ insert_leaf_imp(value_type(r_key, mapped_type()));
+
+ ins_pair.first.m_p_nd->m_special = false;
+ _GLIBCXX_DEBUG_ONLY(base_type::assert_valid());
+ splay(ins_pair.first.m_p_nd);
+ _GLIBCXX_DEBUG_ONLY(PB_DS_CLASS_C_DEC::assert_valid();)
+ return ins_pair.first.m_p_nd->m_value.second;
+#else
+ insert(r_key);
+ return base_type::s_null_mapped;
+#endif
+ }
+
+ inline point_iterator
+ find(const_key_reference);
+
+ inline const_point_iterator
+ find(const_key_reference) const;
+
+ inline bool
+ erase(const_key_reference);
+
+ inline iterator
+ erase(iterator it);
+
+ inline reverse_iterator
+ erase(reverse_iterator);
+
+ template<typename Pred>
+ inline size_type
+ erase_if(Pred);
+
+ void
+ join(PB_DS_CLASS_C_DEC&);
+
+ void
+ split(const_key_reference, PB_DS_CLASS_C_DEC&);
+
+ private:
+ inline std::pair<point_iterator, bool>
+ insert_leaf_imp(const_reference);
+
+ inline node_pointer
+ find_imp(const_key_reference);
+
+ inline const node_pointer
+ find_imp(const_key_reference) const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ assert_special_imp(const node_pointer) const;
+#endif
+
+ void
+ splay(node_pointer);
+
+ inline void
+ splay_zig_zag_left(node_pointer, node_pointer, node_pointer);
+
+ inline void
+ splay_zig_zag_right(node_pointer, node_pointer, node_pointer);
+
+ inline void
+ splay_zig_zig_left(node_pointer, node_pointer, node_pointer);
+
+ inline void
+ splay_zig_zig_right(node_pointer, node_pointer, node_pointer);
+
+ inline void
+ splay_zz_start(node_pointer, node_pointer, node_pointer);
+
+ inline void
+ splay_zz_end(node_pointer, node_pointer, node_pointer);
+
+ inline node_pointer
+ leftmost(node_pointer);
+
+ void
+ erase_node(node_pointer);
+ };
+
+#include <ext/pb_ds/detail/splay_tree_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_NAME
+#undef PB_DS_BASE_CLASS_NAME
+#undef PB_DS_BASE_C_DEC
+#undef PB_DS_V2F
+#undef PB_DS_EP2VP
+#undef PB_DS_V2S
+ } // namespace detail
+} // namespace __gnu_pbds
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..7f0b2cb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation class for splay_tree_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ if (base_type::join_prep(other) == false)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ return;
+ }
+
+ node_pointer p_target_r = other.leftmost(other.m_p_head);
+ _GLIBCXX_DEBUG_ASSERT(p_target_r != NULL);
+ other.splay(p_target_r);
+
+ _GLIBCXX_DEBUG_ASSERT(p_target_r == other.m_p_head->m_p_parent);
+ _GLIBCXX_DEBUG_ASSERT(p_target_r->m_p_left == NULL);
+
+ p_target_r->m_p_left = base_type::m_p_head->m_p_parent;
+
+ _GLIBCXX_DEBUG_ASSERT(p_target_r->m_p_left != NULL);
+ p_target_r->m_p_left->m_p_parent = p_target_r;
+
+ base_type::m_p_head->m_p_parent = p_target_r;
+ p_target_r->m_p_parent = base_type::m_p_head;
+ apply_update(p_target_r, (node_update* )this);
+
+ base_type::join_finish(other);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+split(const_key_reference r_key, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+
+ if (base_type::split_prep(r_key, other) == false)
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+ return;
+ }
+
+ node_pointer p_upper_bound = upper_bound(r_key).m_p_nd;
+ _GLIBCXX_DEBUG_ASSERT(p_upper_bound != NULL);
+
+ splay(p_upper_bound);
+ _GLIBCXX_DEBUG_ASSERT(p_upper_bound->m_p_parent == this->m_p_head);
+
+ node_pointer p_new_root = p_upper_bound->m_p_left;
+ _GLIBCXX_DEBUG_ASSERT(p_new_root != NULL);
+
+ base_type::m_p_head->m_p_parent = p_new_root;
+ p_new_root->m_p_parent = base_type::m_p_head;
+ other.m_p_head->m_p_parent = p_upper_bound;
+ p_upper_bound->m_p_parent = other.m_p_head;
+ p_upper_bound->m_p_left = NULL;
+ apply_update(p_upper_bound, (node_update* )this);
+ base_type::split_finish(other);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid());
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid());
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/traits.hpp
new file mode 100644
index 0000000..cfedc35
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/splay_tree_/traits.hpp
@@ -0,0 +1,113 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file traits.hpp
+ * Contains an implementation for splay_tree_.
+ */
+
+#ifndef PB_DS_SPLAY_TREE_NODE_AND_IT_TRAITS_HPP
+#define PB_DS_SPLAY_TREE_NODE_AND_IT_TRAITS_HPP
+
+#include <ext/pb_ds/detail/splay_tree_/node.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Key,
+ typename Mapped,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_traits<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ splay_tree_tag,
+ Allocator> : public bin_search_tree_traits<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ splay_tree_node_<
+ typename types_traits<
+ Key,
+ Mapped,
+ Allocator,
+ false>::value_type,
+ typename tree_node_metadata_selector<
+ Key,
+ Mapped,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type,
+ Allocator>,
+ Allocator>
+ { };
+
+ template<typename Key,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_traits<Key, null_mapped_type, Cmp_Fn, Node_Update,
+ splay_tree_tag, Allocator>
+ : public bin_search_tree_traits<Key, null_mapped_type, Cmp_Fn,
+ Node_Update,
+ splay_tree_node_<typename types_traits<Key, null_mapped_type, Allocator, false>::value_type,
+ typename tree_node_metadata_selector<
+ Key,
+ null_mapped_type,
+ Cmp_Fn,
+ Node_Update,
+ Allocator>::type,
+ Allocator>,
+ Allocator>
+ { };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_SPLAY_TREE_NODE_AND_IT_TRAITS_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/standard_policies.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/standard_policies.hpp
new file mode 100644
index 0000000..cfbfbb0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/standard_policies.hpp
@@ -0,0 +1,136 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file standard_policies.hpp
+ * Contains standard policies for containers.
+ */
+
+#ifndef PB_DS_STANDARD_POLICIES_HPP
+#define PB_DS_STANDARD_POLICIES_HPP
+
+#include <memory>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <tr1/functional>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key>
+ struct default_hash_fn
+ {
+ typedef std::tr1::hash<Key> type;
+ };
+
+ template<typename Key>
+ struct default_eq_fn
+ {
+ typedef std::equal_to<Key> type;
+ };
+
+ enum
+ {
+ default_store_hash = false
+ };
+
+ struct default_comb_hash_fn
+ {
+ typedef __gnu_pbds::direct_mask_range_hashing<> type;
+ };
+
+ template<typename Comb_Hash_Fn>
+ struct default_resize_policy
+ {
+ private:
+ typedef typename Comb_Hash_Fn::size_type size_type;
+
+ typedef __gnu_pbds::direct_mask_range_hashing<size_type> default_fn;
+ typedef is_same<default_fn, Comb_Hash_Fn> same_type;
+ typedef __gnu_pbds::hash_exponential_size_policy<size_type> iftrue;
+ typedef __gnu_pbds::hash_prime_size_policy iffalse;
+ typedef __conditional_type<same_type::value, iftrue, iffalse> cond_type;
+ typedef typename cond_type::__type size_policy_type;
+
+ typedef __gnu_pbds::hash_load_check_resize_trigger<false, size_type> trigger;
+
+ public:
+ typedef __gnu_pbds::hash_standard_resize_policy<size_policy_type, trigger, false, size_type> type;
+ };
+
+ struct default_update_policy
+ {
+ typedef __gnu_pbds::move_to_front_lu_policy<> type;
+ };
+
+ template<typename Comb_Probe_Fn>
+ struct default_probe_fn
+ {
+ private:
+ typedef typename Comb_Probe_Fn::size_type size_type;
+
+ typedef __gnu_pbds::direct_mask_range_hashing<size_type> default_fn;
+ typedef is_same<default_fn, Comb_Probe_Fn> same_type;
+ typedef __gnu_pbds::linear_probe_fn<size_type> iftrue;
+ typedef __gnu_pbds::quadratic_probe_fn<size_type> iffalse;
+ typedef __conditional_type<same_type::value, iftrue, iffalse> cond_type;
+
+ public:
+ typedef typename cond_type::__type type;
+ };
+
+ template<typename Key>
+ struct default_trie_e_access_traits;
+
+ template<typename Char, class Char_Traits>
+ struct default_trie_e_access_traits<std::basic_string<Char, Char_Traits, std::allocator<char> > >
+ {
+ private:
+ typedef std::basic_string<Char, Char_Traits, std::allocator<char> > string_type;
+
+ public:
+ typedef __gnu_pbds::string_trie_e_access_traits<string_type> type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_STANDARD_POLICIES_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp
new file mode 100644
index 0000000..4d2c45c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp
@@ -0,0 +1,106 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file constructors_destructor_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename It>
+void
+PB_DS_CLASS_C_DEC::
+copy_from_range(It first_it, It last_it)
+{
+ while (first_it != last_it)
+ push(*(first_it++));
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+thin_heap_() :
+ m_p_max(NULL)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+thin_heap_(const Cmp_Fn& r_cmp_fn) :
+ PB_DS_BASE_C_DEC(r_cmp_fn),
+ m_p_max(NULL)
+{
+ initialize();
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+thin_heap_(const PB_DS_CLASS_C_DEC& other) :
+ PB_DS_BASE_C_DEC(other)
+{
+ initialize();
+ m_p_max = base_type::m_p_root;
+ for (node_pointer p_nd = base_type::m_p_root; p_nd != NULL; p_nd = p_nd->m_p_next_sibling)
+ if (Cmp_Fn::operator()(m_p_max->m_value, p_nd->m_value))
+ m_p_max = p_nd;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+swap(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ base_type::swap(other);
+ std::swap(m_p_max, other.m_p_max);
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~thin_heap_()
+{ }
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+initialize()
+{ std::fill(m_a_aux, m_a_aux + max_rank, static_cast<node_pointer>(NULL)); }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp
new file mode 100644
index 0000000..f7abe35
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file debug_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+#ifdef _GLIBCXX_DEBUG
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_valid() const
+{
+ base_type::assert_valid();
+ assert_node_consistent(base_type::m_p_root, true);
+ assert_max();
+ assert_aux_null();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_aux_null() const
+{
+ for (size_type i = 0; i < max_rank; ++i)
+ _GLIBCXX_DEBUG_ASSERT(m_a_aux[i] == NULL);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_max() const
+{
+ if (m_p_max == NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::empty());
+ return;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+ _GLIBCXX_DEBUG_ASSERT(base_type::parent(m_p_max) == NULL);
+ _GLIBCXX_DEBUG_ASSERT(m_p_max->m_p_prev_or_parent == NULL);
+ for (const_iterator it = base_type::begin(); it != base_type::end(); ++it)
+ _GLIBCXX_DEBUG_ASSERT(!Cmp_Fn::operator()(m_p_max->m_value, it.m_p_nd->m_value));
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+assert_node_consistent(const_node_pointer p_nd, bool root) const
+{
+ base_type::assert_node_consistent(p_nd, root);
+ if (p_nd == NULL)
+ return;
+
+ assert_node_consistent(p_nd->m_p_next_sibling, root);
+ assert_node_consistent(p_nd->m_p_l_child, false);
+ if (!root)
+ {
+ if (p_nd->m_metadata == 0)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_next_sibling == NULL);
+ else
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata == p_nd->m_p_next_sibling->m_metadata + 1);
+ }
+
+ if (p_nd->m_p_l_child != NULL)
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_p_l_child->m_metadata + 1 == base_type::degree(p_nd));
+
+ const bool unmarked_valid =(p_nd->m_p_l_child == NULL&& p_nd->m_metadata == 0) ||(p_nd->m_p_l_child != NULL&& p_nd->m_metadata == p_nd->m_p_l_child->m_metadata + 1);
+
+ const bool marked_valid =(p_nd->m_p_l_child == NULL&& p_nd->m_metadata == 1) ||(p_nd->m_p_l_child != NULL&& p_nd->m_metadata == p_nd->m_p_l_child->m_metadata + 2);
+
+ _GLIBCXX_DEBUG_ASSERT(unmarked_valid || marked_valid);
+ if (root)
+ _GLIBCXX_DEBUG_ASSERT(unmarked_valid);
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp
new file mode 100644
index 0000000..69afcd3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp
@@ -0,0 +1,296 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file erase_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+pop()
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_max != NULL);
+
+ node_pointer p_nd = m_p_max;
+
+ remove_max_node();
+
+ base_type::actual_erase_node(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+remove_max_node()
+{
+ to_aux_except_max();
+
+ make_from_aux();
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+to_aux_except_max()
+{
+ node_pointer p_add = base_type::m_p_root;
+
+ while (p_add != m_p_max)
+ {
+ node_pointer p_next_add = p_add->m_p_next_sibling;
+
+ add_to_aux(p_add);
+
+ p_add = p_next_add;
+ }
+
+ p_add = m_p_max->m_p_l_child;
+
+ while (p_add != NULL)
+ {
+ node_pointer p_next_add = p_add->m_p_next_sibling;
+
+ p_add->m_metadata = p_add->m_p_l_child == NULL?
+ 0 :
+ p_add->m_p_l_child->m_metadata + 1;
+
+ add_to_aux(p_add);
+
+ p_add = p_next_add;
+ }
+
+ p_add = m_p_max->m_p_next_sibling;
+
+ while (p_add != NULL)
+ {
+ node_pointer p_next_add = p_add->m_p_next_sibling;
+
+ add_to_aux(p_add);
+
+ p_add = p_next_add;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+add_to_aux(node_pointer p_nd)
+{
+ size_type r = p_nd->m_metadata;
+
+ while (m_a_aux[r] != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata < rank_bound());
+
+ if (Cmp_Fn::operator()(m_a_aux[r]->m_value, p_nd->m_value))
+ make_child_of(m_a_aux[r], p_nd);
+ else
+ {
+ make_child_of(p_nd, m_a_aux[r]);
+
+ p_nd = m_a_aux[r];
+ }
+
+ m_a_aux[r] = NULL;
+
+ ++r;
+ }
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata < rank_bound());
+
+ m_a_aux[r] = p_nd;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+make_child_of(node_pointer p_nd, node_pointer p_new_parent)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_nd->m_metadata == p_new_parent->m_metadata);
+ _GLIBCXX_DEBUG_ASSERT(m_a_aux[p_nd->m_metadata] == p_nd ||
+ m_a_aux[p_nd->m_metadata] == p_new_parent);
+
+ ++p_new_parent->m_metadata;
+
+ base_type::make_child_of(p_nd, p_new_parent);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+make_from_aux()
+{
+ base_type::m_p_root = m_p_max = NULL;
+
+ const size_type rnk_bnd = rank_bound();
+
+ size_type i = 0;
+
+ while (i < rnk_bnd)
+ {
+ if (m_a_aux[i] != NULL)
+ {
+ make_root_and_link(m_a_aux[i]);
+
+ m_a_aux[i] = NULL;
+ }
+
+ ++i;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_aux_null();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+remove_node(node_pointer p_nd)
+{
+ node_pointer p_parent = p_nd;
+ while (base_type::parent(p_parent) != NULL)
+ p_parent = base_type::parent(p_parent);
+
+ base_type::bubble_to_top(p_nd);
+
+ m_p_max = p_nd;
+
+ node_pointer p_fix = base_type::m_p_root;
+ while (p_fix != NULL&& p_fix->m_p_next_sibling != p_parent)
+ p_fix = p_fix->m_p_next_sibling;
+
+ if (p_fix != NULL)
+ p_fix->m_p_next_sibling = p_nd;
+
+ remove_max_node();
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+clear()
+{
+ base_type::clear();
+
+ m_p_max = NULL;
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+erase(point_iterator it)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ node_pointer p_nd = it.m_p_nd;
+
+ remove_node(p_nd);
+
+ base_type::actual_erase_node(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+erase_if(Pred pred)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return 0;
+ }
+
+ base_type::to_linked_list();
+
+ node_pointer p_out = base_type::prune(pred);
+
+ size_type ersd = 0;
+
+ while (p_out != NULL)
+ {
+ ++ersd;
+
+ node_pointer p_next = p_out->m_p_next_sibling;
+
+ base_type::actual_erase_node(p_out);
+
+ p_out = p_next;
+ }
+
+ node_pointer p_cur = base_type::m_p_root;
+
+ m_p_max = base_type::m_p_root = NULL;
+
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+
+ make_root_and_link(p_cur);
+
+ p_cur = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return ersd;
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+rank_bound()
+{
+ const std::size_t* const p_upper =
+ std::upper_bound( g_a_rank_bounds, g_a_rank_bounds + num_distinct_rank_bounds, base_type::m_size);
+
+ if (p_upper == g_a_rank_bounds + num_distinct_rank_bounds)
+ return max_rank;
+
+ return (p_upper - g_a_rank_bounds);
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp
new file mode 100644
index 0000000..52407e6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file find_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_reference
+PB_DS_CLASS_C_DEC::
+top() const
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ASSERT(!base_type::empty());
+
+ _GLIBCXX_DEBUG_ASSERT(m_p_max != NULL);
+ return m_p_max->m_value;
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp
new file mode 100644
index 0000000..7a6952f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp
@@ -0,0 +1,326 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file insert_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::point_iterator
+PB_DS_CLASS_C_DEC::
+push(const_reference r_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ node_pointer p_nd = base_type::get_new_node_for_insert(r_val);
+
+ p_nd->m_metadata = 0;
+
+ p_nd->m_p_prev_or_parent = p_nd->m_p_l_child = NULL;
+
+ if (base_type::m_p_root == NULL)
+ {
+ p_nd->m_p_next_sibling = NULL;
+
+ m_p_max = base_type::m_p_root = p_nd;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return point_iterator(p_nd);
+ }
+
+ p_nd->m_p_next_sibling = base_type::m_p_root;
+
+ base_type::m_p_root->m_p_prev_or_parent = NULL;
+
+ base_type::m_p_root = p_nd;
+
+ update_max(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return point_iterator(p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+make_root(node_pointer p_nd)
+{
+ p_nd->m_metadata =
+ p_nd->m_p_l_child == NULL?
+ 0 :
+ 1 + p_nd->m_p_l_child->m_metadata;
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+make_root_and_link(node_pointer p_nd)
+{
+ make_root(p_nd);
+
+ p_nd->m_p_prev_or_parent = NULL;
+
+ p_nd->m_p_next_sibling = base_type::m_p_root;
+
+ if (base_type::m_p_root != NULL)
+ base_type::m_p_root->m_p_prev_or_parent = NULL;
+
+ base_type::m_p_root = p_nd;
+
+ update_max(p_nd);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix(node_pointer p_y)
+{
+ while (true)
+ {
+ if (p_y->m_p_prev_or_parent == NULL)
+ {
+ fix_root(p_y);
+
+ return;
+ }
+ else if (p_y->m_metadata == 1&& p_y->m_p_next_sibling == NULL)
+ {
+ if (p_y->m_p_l_child != NULL)
+ {
+ fix_sibling_rank_1_unmarked(p_y);
+
+ return;
+ }
+
+ fix_sibling_rank_1_marked(p_y);
+
+ p_y = p_y->m_p_prev_or_parent;
+ }
+ else if (p_y->m_metadata > p_y->m_p_next_sibling->m_metadata + 1)
+ {
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_l_child != NULL);
+
+ if (p_y->m_metadata != p_y->m_p_l_child->m_metadata + 2)
+ {
+ fix_sibling_general_unmarked(p_y);
+
+ return;
+ }
+
+ fix_sibling_general_marked(p_y);
+
+ p_y = p_y->m_p_prev_or_parent;
+ }
+ else if ((p_y->m_p_l_child == NULL&&
+ p_y->m_metadata == 2) ||(p_y->m_p_l_child != NULL&&
+ p_y->m_metadata == p_y->m_p_l_child->m_metadata + 3))
+ {
+ node_pointer p_z = p_y->m_p_prev_or_parent;
+
+ fix_child(p_y);
+
+ p_y = p_z;
+ }
+ else
+ return;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_root(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent == NULL);
+
+ make_root(p_y);
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y, true);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_sibling_rank_1_unmarked(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent != NULL);
+
+ _GLIBCXX_DEBUG_ONLY(node_pointer p_w = p_y->m_p_l_child;)
+ _GLIBCXX_DEBUG_ASSERT(p_w != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_w->m_p_next_sibling == NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_next_sibling == NULL);
+
+ p_y->m_p_next_sibling = p_y->m_p_l_child;
+
+ p_y->m_p_next_sibling->m_p_prev_or_parent = p_y;
+
+ p_y->m_p_l_child = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y, false);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_sibling_rank_1_marked(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_l_child == NULL);
+
+ p_y->m_metadata = 0;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y, false);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_sibling_general_unmarked(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent != NULL);
+
+ node_pointer p_w = p_y->m_p_l_child;
+ _GLIBCXX_DEBUG_ASSERT(p_w != NULL);
+ _GLIBCXX_DEBUG_ASSERT(p_w->m_p_next_sibling != NULL);
+
+ p_y->m_p_l_child = p_w->m_p_next_sibling;
+ p_w->m_p_next_sibling->m_p_prev_or_parent = p_y;
+
+ p_w->m_p_next_sibling = p_y->m_p_next_sibling;
+ _GLIBCXX_DEBUG_ASSERT(p_w->m_p_next_sibling != NULL);
+ p_w->m_p_next_sibling->m_p_prev_or_parent = p_w;
+
+ p_y->m_p_next_sibling = p_w;
+ p_w->m_p_prev_or_parent = p_y;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y, false);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_sibling_general_marked(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent != NULL);
+
+ --p_y->m_metadata;
+
+ _GLIBCXX_DEBUG_ONLY(assert_node_consistent(p_y, false);)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+fix_child(node_pointer p_y)
+{
+ _GLIBCXX_DEBUG_ASSERT(p_y->m_p_prev_or_parent != NULL);
+
+ if (p_y->m_p_next_sibling != NULL)
+ p_y->m_p_next_sibling->m_p_prev_or_parent = p_y->m_p_prev_or_parent;
+
+ if (p_y->m_p_prev_or_parent->m_p_l_child == p_y)
+ p_y->m_p_prev_or_parent->m_p_l_child = p_y->m_p_next_sibling;
+ else
+ p_y->m_p_prev_or_parent->m_p_next_sibling = p_y->m_p_next_sibling;
+
+ make_root_and_link(p_y);
+}
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+modify(point_iterator it, const_reference r_new_val)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ node_pointer p_nd = it.m_p_nd;
+
+ _GLIBCXX_DEBUG_ASSERT(p_nd != NULL);
+
+ const bool smaller = Cmp_Fn::operator()(r_new_val, p_nd->m_value);
+
+ p_nd->m_value = r_new_val;
+
+ if (smaller)
+ {
+ remove_node(p_nd);
+
+ p_nd->m_p_l_child = NULL;
+
+ make_root_and_link(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return;
+ }
+
+ if (p_nd->m_p_prev_or_parent == NULL)
+ {
+ update_max(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+
+ return;
+ }
+
+ node_pointer p_y = p_nd->m_p_prev_or_parent;
+ _GLIBCXX_DEBUG_ASSERT(p_y != NULL);
+
+ if (p_nd->m_p_next_sibling != NULL)
+ p_nd->m_p_next_sibling->m_p_prev_or_parent = p_y;
+
+ if (p_y->m_p_l_child == p_nd)
+ p_y->m_p_l_child = p_nd->m_p_next_sibling;
+ else
+ p_y->m_p_next_sibling = p_nd->m_p_next_sibling;
+
+ fix(p_y);
+
+ make_root_and_link(p_nd);
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+update_max(node_pointer p_nd)
+{
+ if (m_p_max == NULL || Cmp_Fn::operator()(m_p_max->m_value, p_nd->m_value))
+ m_p_max = p_nd;
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp
new file mode 100644
index 0000000..6acb7bd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp
@@ -0,0 +1,126 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file split_join_fn_imps.hpp
+ * Contains an implementation for thin_heap_.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Pred>
+void
+PB_DS_CLASS_C_DEC::
+split(Pred pred, PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ other.clear();
+
+ if (base_type::empty())
+ {
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ return;
+ }
+
+ base_type::to_linked_list();
+
+ node_pointer p_out = base_type::prune(pred);
+
+ while (p_out != NULL)
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_size > 0);
+ --base_type::m_size;
+
+ ++other.m_size;
+
+ node_pointer p_next = p_out->m_p_next_sibling;
+
+ other.make_root_and_link(p_out);
+
+ p_out = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ node_pointer p_cur = base_type::m_p_root;
+
+ m_p_max = NULL;
+
+ base_type::m_p_root = NULL;
+
+ while (p_cur != NULL)
+ {
+ node_pointer p_next = p_cur->m_p_next_sibling;
+
+ make_root_and_link(p_cur);
+
+ p_cur = p_next;
+ }
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+join(PB_DS_CLASS_C_DEC& other)
+{
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+
+ node_pointer p_other = other.m_p_root;
+
+ while (p_other != NULL)
+ {
+ node_pointer p_next = p_other->m_p_next_sibling;
+
+ make_root_and_link(p_other);
+
+ p_other = p_next;
+ }
+
+ base_type::m_size += other.m_size;
+
+ other.m_p_root = NULL;
+ other.m_size = 0;
+ other.m_p_max = NULL;
+
+ _GLIBCXX_DEBUG_ONLY(assert_valid();)
+ _GLIBCXX_DEBUG_ONLY(other.assert_valid();)
+ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
new file mode 100644
index 0000000..88fa04b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp
@@ -0,0 +1,351 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file thin_heap_.hpp
+ * Contains an implementation class for a thin heap.
+ */
+
+#ifndef PB_DS_THIN_HEAP_HPP
+#define PB_DS_THIN_HEAP_HPP
+
+/*
+ * Thin heaps.
+ * Tarjan and Kaplan.
+ */
+
+#include <algorithm>
+#include <ext/pb_ds/detail/cond_dealtor.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp>
+#include <ext/pb_ds/detail/left_child_next_sibling_heap_/null_metadata.hpp>
+#include <debug/debug.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ thin_heap_<Value_Type, Cmp_Fn, Allocator>
+
+#ifdef _GLIBCXX_DEBUG
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_<Value_Type, Cmp_Fn, \
+ typename Allocator::size_type, Allocator, true>
+#else
+#define PB_DS_BASE_C_DEC \
+ left_child_next_sibling_heap_<Value_Type, Cmp_Fn, \
+ typename Allocator::size_type, Allocator>
+#endif
+
+ /**
+ * class description = "t|-|i|\| h34p">
+ **/
+ template<typename Value_Type, class Cmp_Fn, class Allocator>
+ class thin_heap_ : public PB_DS_BASE_C_DEC
+ {
+
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ protected:
+ typedef typename base_type::node node;
+
+ typedef typename base_type::node_pointer node_pointer;
+
+ typedef typename base_type::const_node_pointer const_node_pointer;
+
+ public:
+
+ typedef typename Allocator::size_type size_type;
+
+ typedef typename Allocator::difference_type difference_type;
+
+ typedef Value_Type value_type;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::pointer
+ pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_pointer
+ const_pointer;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::reference
+ reference;
+
+ typedef
+ typename Allocator::template rebind<
+ value_type>::other::const_reference
+ const_reference;
+
+ typedef
+ typename PB_DS_BASE_C_DEC::const_point_iterator
+ const_point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::point_iterator point_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::const_iterator const_iterator;
+
+ typedef typename PB_DS_BASE_C_DEC::iterator iterator;
+
+ typedef Cmp_Fn cmp_fn;
+
+ typedef Allocator allocator_type;
+
+ public:
+
+ inline point_iterator
+ push(const_reference r_val);
+
+ void
+ modify(point_iterator it, const_reference r_new_val);
+
+ inline const_reference
+ top() const;
+
+ void
+ pop();
+
+ void
+ erase(point_iterator it);
+
+ inline void
+ clear();
+
+ template<typename Pred>
+ size_type
+ erase_if(Pred pred);
+
+ template<typename Pred>
+ void
+ split(Pred pred, PB_DS_CLASS_C_DEC& other);
+
+ void
+ join(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+
+ thin_heap_();
+
+ thin_heap_(const Cmp_Fn& r_cmp_fn);
+
+ thin_heap_(const PB_DS_CLASS_C_DEC& other);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ ~thin_heap_();
+
+ template<typename It>
+ void
+ copy_from_range(It first_it, It last_it);
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+
+ void
+ assert_max() const;
+#endif
+
+#ifdef PB_DS_THIN_HEAP_TRACE_
+ void
+ trace() const;
+#endif
+
+ private:
+ enum
+ {
+ max_rank = (sizeof(size_type) << 4) + 2
+ };
+
+ private:
+
+ void
+ initialize();
+
+ inline void
+ update_max(node_pointer p_nd);
+
+ inline void
+ fix(node_pointer p_nd);
+
+ inline void
+ fix_root(node_pointer p_y);
+
+ inline void
+ fix_sibling_rank_1_unmarked(node_pointer p_y);
+
+ inline void
+ fix_sibling_rank_1_marked(node_pointer p_y);
+
+ inline void
+ fix_sibling_general_unmarked(node_pointer p_y);
+
+ inline void
+ fix_sibling_general_marked(node_pointer p_y);
+
+ inline void
+ fix_child(node_pointer p_y);
+
+ inline static void
+ make_root(node_pointer p_nd);
+
+ inline void
+ make_root_and_link(node_pointer p_nd);
+
+ inline void
+ remove_max_node();
+
+ void
+ to_aux_except_max();
+
+ inline void
+ add_to_aux(node_pointer p_nd);
+
+ inline void
+ make_from_aux();
+
+ inline size_type
+ rank_bound();
+
+ inline void
+ make_child_of(node_pointer p_nd, node_pointer p_new_parent);
+
+ inline void
+ remove_node(node_pointer p_nd);
+
+ inline node_pointer
+ join(node_pointer p_lhs, node_pointer p_rhs) const;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_node_consistent(const_node_pointer p_nd, bool root) const;
+
+ void
+ assert_aux_null() const;
+#endif
+
+ private:
+ node_pointer m_p_max;
+
+ node_pointer m_a_aux[max_rank];
+ };
+
+ enum
+ {
+ num_distinct_rank_bounds = 48
+ };
+
+ // Taken from the SGI implementation; acknowledged in the docs.
+ static const std::size_t g_a_rank_bounds[num_distinct_rank_bounds] =
+ {
+ /* Dealing cards... */
+ /* 0 */ 0ul,
+ /* 1 */ 1ul,
+ /* 2 */ 1ul,
+ /* 3 */ 2ul,
+ /* 4 */ 4ul,
+ /* 5 */ 6ul,
+ /* 6 */ 11ul,
+ /* 7 */ 17ul,
+ /* 8 */ 29ul,
+ /* 9 */ 46ul,
+ /* 10 */ 76ul,
+ /* 11 */ 122ul,
+ /* 12 */ 199ul,
+ /* 13 */ 321ul,
+ /* 14 */ 521ul,
+ /* 15 */ 842ul,
+ /* 16 */ 1364ul,
+ /* 17 */ 2206ul,
+ /* 18 */ 3571ul,
+ /* 19 */ 5777ul,
+ /* 20 */ 9349ul,
+ /* 21 */ 15126ul,
+ /* 22 */ 24476ul,
+ /* 23 */ 39602ul,
+ /* 24 */ 64079ul,
+ /* 25 */ 103681ul,
+ /* 26 */ 167761ul,
+ /* 27 */ 271442ul,
+ /* 28 */ 439204ul,
+ /* 29 */ 710646ul,
+ /* 30 */ 1149851ul,
+ /* 31 */ 1860497ul,
+ /* 32 */ 3010349ul,
+ /* 33 */ 4870846ul,
+ /* 34 */ 7881196ul,
+ /* 35 */ 12752042ul,
+ /* 36 */ 20633239ul,
+ /* 37 */ 33385282ul,
+ /* 38 */ 54018521ul,
+ /* 39 */ 87403803ul,
+ /* 40 */ 141422324ul,
+ /* 41 */ 228826127ul,
+ /* 42 */ 370248451ul,
+ /* 43 */ 599074578ul,
+ /* 44 */ 969323029ul,
+ /* 45 */ 1568397607ul,
+ /* 46 */ 2537720636ul,
+ /* 47 */ 4106118243ul
+ /* Pot's good, let's play */
+ };
+
+#include <ext/pb_ds/detail/thin_heap_/constructors_destructor_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp>
+#include <ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_BASE_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp
new file mode 100644
index 0000000..fc309d5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trace_fn_imps.hpp
+ * Contains an implementation class for left_child_next_sibling_heap_.
+ */
+
+#ifdef PB_DS_THIN_HEAP_TRACE_
+
+PB_DS_CLASS_T_DEC
+void
+PB_DS_CLASS_C_DEC::
+trace() const
+{
+ std::cerr << std::endl;
+
+ std::cerr << "m_p_max " << m_p_max << std::endl;
+
+ base_type::trace();
+}
+
+#endif // #ifdef PB_DS_THIN_HEAP_TRACE_
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp
new file mode 100644
index 0000000..c182886
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp
@@ -0,0 +1,116 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_metadata_selector.hpp
+ * Contains an implementation class for trees.
+ */
+
+#ifndef PB_DS_TREE_NODE_METADATA_SELECTOR_HPP
+#define PB_DS_TREE_NODE_METADATA_SELECTOR_HPP
+
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Node_Update, bool Null>
+ struct tree_metadata_helper
+ {
+ typedef typename Node_Update::metadata_type type;
+ };
+
+ template<typename Node_Update>
+ struct tree_metadata_helper<
+ Node_Update,
+ true>
+ {
+ typedef null_node_metadata type;
+ };
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Const_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct tree_node_metadata_selector
+ {
+ private:
+ typedef
+ dumconst_node_iterator<
+ Key,
+ Data,
+ Allocator>
+ dumconst_node_it;
+
+ enum
+ {
+ null_update =
+ is_same<
+ Node_Update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator>,
+ null_tree_node_update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator> >::value
+ };
+
+ public:
+ typedef
+ typename tree_metadata_helper<
+ Node_Update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator>,
+ null_update>::type
+ type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_TREE_NODE_METADATA_SELECTOR_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp
new file mode 100644
index 0000000..006a3eb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file null_node_update_imp.hpp
+ * Contains an implementation of null_node_update.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Const_Node_Iterator_,
+ typename Node_Iterator_,
+ class Cmp_Fn_,
+ typename Allocator_>
+inline void
+PB_DS_CLASS_C_DEC::
+swap(null_tree_node_update< Const_Node_Iterator_, Node_Iterator_, Cmp_Fn_, Allocator_>& /*other*/)
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp
new file mode 100644
index 0000000..1d33767
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp
@@ -0,0 +1,141 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file order_statistics_imp.hpp
+ * Contains forward declarations for order_statistics_key
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+find_by_order(size_type order)
+{
+ node_iterator it = node_begin();
+
+ node_iterator end_it = node_end();
+
+ while (it != end_it)
+ {
+ node_iterator l_it = it.get_l_child();
+
+ const size_type o = (l_it == end_it)?
+ 0 :
+ l_it.get_metadata();
+
+ if (order == o)
+ return (*it);
+ else if (order < o)
+ it = l_it;
+ else
+ {
+ order -= o + 1;
+
+ it = it.get_r_child();
+ }
+ }
+
+ return (PB_DS_BASE_C_DEC::end_iterator());
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+find_by_order(size_type order) const
+{
+ return (const_cast<PB_DS_CLASS_C_DEC* >(this)->find_by_order(order));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+order_of_key(const_key_reference r_key) const
+{
+ const_node_iterator it = node_begin();
+
+ const_node_iterator end_it = node_end();
+
+ const cmp_fn& r_cmp_fn =
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->get_cmp_fn();
+
+ size_type ord = 0;
+
+ while (it != end_it)
+ {
+ const_node_iterator l_it = it.get_l_child();
+
+ if (r_cmp_fn(r_key, extract_key(*(*it))))
+ it = l_it;
+ else if (r_cmp_fn(extract_key(*(*it)), r_key))
+ {
+
+ ord += (l_it == end_it)?
+ 1 :
+ 1 + l_it.get_metadata();
+
+ it = it.get_r_child();
+ }
+ else
+ {
+ ord += (l_it == end_it)?
+ 0 :
+ l_it.get_metadata();
+
+ it = end_it;
+ }
+ }
+
+ return (ord);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+operator()(node_iterator node_it, const_node_iterator end_nd_it) const
+{
+ node_iterator l_child_it = node_it.get_l_child();
+ const size_type l_rank =(l_child_it == end_nd_it)? 0 : l_child_it.get_metadata();
+
+ node_iterator r_child_it = node_it.get_r_child();
+ const size_type r_rank =(r_child_it == end_nd_it)? 0 : r_child_it.get_metadata();
+
+ const_cast<metadata_reference>(node_it.get_metadata())=
+ 1 + l_rank + r_rank;
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~tree_order_statistics_node_update()
+{ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp
new file mode 100644
index 0000000..6ea6899
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_policy/sample_tree_node_update.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_tree_node_update.hpp
+ * Contains a samle node update functor.
+ */
+
+#ifndef PB_DS_SAMPLE_TREE_NODE_UPDATOR_HPP
+#define PB_DS_SAMPLE_TREE_NODE_UPDATOR_HPP
+
+// A sample node updator.
+template<typename Const_Node_Iterator,
+
+ class Node_Iterator,
+
+ class Cmp_Fn,
+
+ class Allocator
+ >
+class sample_tree_node_update
+{
+
+public:
+
+ // Metadata type.
+ typedef size_t metadata_type;
+
+protected:
+
+ // Default constructor.
+ sample_tree_node_update();
+
+ // Updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator.
+ inline void
+ operator()(node_iterator node_it, const_node_iterator end_nd_it) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_TREE_NODE_UPDATOR_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_trace_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_trace_base.hpp
new file mode 100644
index 0000000..e4bd656
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/tree_trace_base.hpp
@@ -0,0 +1,209 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file tree_trace_base.hpp
+ * Contains tree-related policies.
+ */
+
+#ifndef PB_DS_TREE_TRACE_BASE_HPP
+#define PB_DS_TREE_TRACE_BASE_HPP
+
+#ifdef PB_DS_TREE_TRACE
+
+#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+
+namespace __gnu_pbds
+{
+
+ namespace detail
+ {
+
+#ifdef PB_DS_TREE_TRACE
+
+#define PB_DS_CLASS_T_DEC \
+ template< \
+ class Const_Node_Iterator, \
+ class Node_Iterator, \
+ class Cmp_Fn, \
+ bool Node_Based, \
+ class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ tree_trace_base< \
+ Const_Node_Iterator, \
+ Node_Iterator, \
+ Cmp_Fn, \
+ Node_Based, \
+ Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ basic_tree_policy_base< \
+ Const_Node_Iterator, \
+ Node_Iterator, \
+ Allocator>
+
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class Cmp_Fn,
+ bool Node_Based,
+ class Allocator>
+ class tree_trace_base : private PB_DS_BASE_C_DEC
+ {
+ public:
+ void
+ trace() const;
+
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ typedef Const_Node_Iterator const_node_iterator;
+
+ typedef typename Allocator::size_type size_type;
+
+ private:
+ void
+ trace_node(const_node_iterator nd_it, size_type level) const;
+
+ virtual bool
+ empty() const = 0;
+
+ virtual const_node_iterator
+ node_begin() const = 0;
+
+ virtual const_node_iterator
+ node_end() const = 0;
+
+ static void
+ print_node_pointer(Const_Node_Iterator nd_it, integral_constant<int,true>);
+
+ static void
+ print_node_pointer(Const_Node_Iterator nd_it, integral_constant<int,false>);
+
+ template<typename Metadata_>
+ static void
+ trace_it_metadata(Const_Node_Iterator nd_it, type_to_type<Metadata_>);
+
+ static void
+ trace_it_metadata(Const_Node_Iterator, type_to_type<null_node_metadata>);
+ };
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ trace() const
+ {
+ if (empty())
+ return;
+
+ trace_node(node_begin(), 0);
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ trace_node(const_node_iterator nd_it, size_type level) const
+ {
+ if (nd_it.get_r_child() != node_end())
+ trace_node(nd_it.get_r_child(), level + 1);
+
+ for (size_type i = 0; i < level; ++i)
+ std::cerr << ' ';
+
+ print_node_pointer(nd_it, integral_constant<int,Node_Based>());
+ std::cerr << base_type::extract_key(*(*nd_it));
+
+ typedef
+ type_to_type<
+ typename const_node_iterator::metadata_type>
+ m_type_ind_t;
+
+ trace_it_metadata(nd_it, m_type_ind_t());
+
+ std::cerr << std::endl;
+
+ if (nd_it.get_l_child() != node_end())
+ trace_node(nd_it.get_l_child(), level + 1);
+ }
+
+ PB_DS_CLASS_T_DEC
+ template<typename Metadata_>
+ void
+ PB_DS_CLASS_C_DEC::
+ trace_it_metadata(Const_Node_Iterator nd_it, type_to_type<Metadata_>)
+ {
+ std::cerr << " (" <<
+ static_cast<unsigned long>(nd_it.get_metadata()) << ") ";
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ trace_it_metadata(Const_Node_Iterator, type_to_type<null_node_metadata>)
+ { }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ print_node_pointer(Const_Node_Iterator nd_it, integral_constant<int,true>)
+ {
+ std::cerr << nd_it.m_p_nd << " ";
+ }
+
+ PB_DS_CLASS_T_DEC
+ void
+ PB_DS_CLASS_C_DEC::
+ print_node_pointer(Const_Node_Iterator nd_it, integral_constant<int,false>)
+ {
+ std::cerr <<* nd_it << " ";
+ }
+
+#undef PB_DS_CLASS_T_DEC
+
+#undef PB_DS_CLASS_C_DEC
+
+#undef PB_DS_BASE_C_DEC
+
+#endif // #ifdef PB_DS_TREE_TRACE
+
+ } // namespace detail
+
+} // namespace __gnu_pbds
+
+#endif // #ifdef PB_DS_TREE_TRACE
+
+#endif // #ifndef PB_DS_TREE_TRACE_BASE_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp
new file mode 100644
index 0000000..b4de31f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp
@@ -0,0 +1,116 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file node_metadata_selector.hpp
+ * Contains an implementation class for tries.
+ */
+
+#ifndef PB_DS_TRIE_NODE_METADATA_SELECTOR_HPP
+#define PB_DS_TRIE_NODE_METADATA_SELECTOR_HPP
+
+#include <ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp>
+#include <ext/pb_ds/detail/types_traits.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+ template<typename Node_Update, bool Null>
+ struct trie_metadata_helper
+ {
+ typedef typename Node_Update::metadata_type type;
+ };
+
+ template<typename Node_Update>
+ struct trie_metadata_helper<
+ Node_Update,
+ true>
+ {
+ typedef null_node_metadata type;
+ };
+
+ template<typename Key,
+ typename Data,
+ class Cmp_Fn,
+ template<typename Const_Node_Iterator,
+ class Const_Iterator,
+ class Cmp_Fn_,
+ class Allocator_>
+ class Node_Update,
+ class Allocator>
+ struct trie_node_metadata_selector
+ {
+ private:
+ typedef
+ dumconst_node_iterator<
+ Key,
+ Data,
+ Allocator>
+ dumconst_node_it;
+
+ enum
+ {
+ null_update =
+ is_same<
+ Node_Update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator>,
+ null_trie_node_update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator> >::value
+ };
+
+ public:
+ typedef
+ typename trie_metadata_helper<
+ Node_Update<
+ dumconst_node_it,
+ dumconst_node_it,
+ Cmp_Fn,
+ Allocator>,
+ null_update>::type
+ type;
+ };
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_TRIE_NODE_METADATA_SELECTOR_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp
new file mode 100644
index 0000000..65245e9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp
@@ -0,0 +1,50 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file null_node_update_imp.hpp
+ * Contains an implementation of null_node_update.
+ */
+
+PB_DS_CLASS_T_DEC
+template<typename Const_Node_Iterator_,
+ typename Node_Iterator_,
+ class E_Access_Traits_,
+ typename Allocator_>
+inline void
+PB_DS_CLASS_C_DEC::
+swap(null_trie_node_update< Const_Node_Iterator_, Node_Iterator_, E_Access_Traits_, Allocator_>& /*other*/)
+{ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp
new file mode 100644
index 0000000..4e27ac2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp
@@ -0,0 +1,183 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file order_statistics_imp.hpp
+ * Contains forward declarations for order_statistics_key
+ */
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::iterator
+PB_DS_CLASS_C_DEC::
+find_by_order(size_type order)
+{
+ if (empty())
+ return (end());
+
+ ++order;
+
+ node_iterator nd_it = node_begin();
+
+ node_iterator end_nd_it = node_end();
+
+ while (true)
+ {
+ if (order > nd_it.get_metadata())
+ return (++base_type::rightmost_it(nd_it));
+
+ const size_type num_children = nd_it.num_children();
+
+ if (num_children == 0)
+ return (*nd_it);
+
+ for (size_type i = 0; i < num_children; ++i)
+ {
+ node_iterator child_nd_it = nd_it.get_child(i);
+
+ if (order <= child_nd_it.get_metadata())
+ {
+ i = num_children;
+
+ nd_it = child_nd_it;
+ }
+ else
+ order -= child_nd_it.get_metadata();
+ }
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+find_by_order(size_type order) const
+{
+ return (const_cast<PB_DS_CLASS_C_DEC* >(this)->find_by_order(order));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+order_of_key(const_key_reference r_key) const
+{
+ const E_Access_Traits& r_traits =
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->get_e_access_traits();
+
+ return (order_of_prefix(
+ r_traits.begin(r_key),
+ r_traits.end(r_key)));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+order_of_prefix(typename e_access_traits::const_iterator b, typename e_access_traits::const_iterator e) const
+{
+ if (empty())
+ return (0);
+
+ const E_Access_Traits& r_traits =
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->get_e_access_traits();
+
+ const_node_iterator nd_it = node_begin();
+
+ const_node_iterator end_nd_it = node_end();
+
+ size_type ord = 0;
+
+ while (true)
+ {
+ const size_type num_children = nd_it.num_children();
+
+ if (num_children == 0)
+ {
+ const_key_reference r_key =
+ base_type::extract_key(*(*nd_it));
+
+ typename e_access_traits::const_iterator key_b =
+ r_traits.begin(r_key);
+
+ typename e_access_traits::const_iterator key_e =
+ r_traits.end(r_key);
+
+ return ((base_type::less( key_b, key_e, b, e, r_traits))?
+ ord + 1 :
+ ord);
+ }
+
+ const_node_iterator next_nd_it = end_nd_it;
+
+ size_type i = num_children - 1;
+
+ do
+ {
+ const_node_iterator child_nd_it = nd_it.get_child(i);
+
+ if (next_nd_it != end_nd_it)
+ ord += child_nd_it.get_metadata();
+ else if (!base_type::less(
+ b, e,
+ child_nd_it.valid_prefix().first,
+ child_nd_it.valid_prefix().second,
+ r_traits))
+ next_nd_it = child_nd_it;
+ }
+ while (i-- > 0);
+
+ if (next_nd_it == end_nd_it)
+ return (ord);
+
+ nd_it = next_nd_it;
+ }
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+operator()(node_iterator nd_it, const_node_iterator /*end_nd_it*/) const
+{
+ const size_type num_children = nd_it.num_children();
+
+ size_type children_rank = 0;
+
+ for (size_type i = 0; i < num_children; ++i)
+ children_rank += nd_it.get_child(i).get_metadata();
+
+ const_cast<size_type& >(nd_it.get_metadata()) =(num_children == 0)? 1 : children_rank;
+}
+
+PB_DS_CLASS_T_DEC
+PB_DS_CLASS_C_DEC::
+~trie_order_statistics_node_update()
+{ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp
new file mode 100644
index 0000000..cdd8989
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp
@@ -0,0 +1,151 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file prefix_search_node_update_imp.hpp
+ * Contains an implementation of prefix_search_node_update.
+ */
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::const_iterator,
+ typename PB_DS_CLASS_C_DEC::const_iterator>
+PB_DS_CLASS_C_DEC::
+prefix_range(const_key_reference r_key) const
+{
+ const e_access_traits& r_traits = get_e_access_traits();
+
+ return (prefix_range(
+ r_traits.begin(r_key),
+ r_traits.end(r_key)));
+}
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::iterator,
+ typename PB_DS_CLASS_C_DEC::iterator>
+PB_DS_CLASS_C_DEC::
+prefix_range(const_key_reference r_key)
+{
+ return (prefix_range(
+ get_e_access_traits().begin(r_key),
+ get_e_access_traits().end(r_key)));
+}
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::const_iterator,
+ typename PB_DS_CLASS_C_DEC::const_iterator>
+PB_DS_CLASS_C_DEC::
+prefix_range(typename e_access_traits::const_iterator b, typename e_access_traits::const_iterator e) const
+{
+ const std::pair<iterator, iterator> non_const_ret =
+ const_cast<PB_DS_CLASS_C_DEC* >(this)->prefix_range(b, e);
+
+ return (std::make_pair(
+ const_iterator(non_const_ret.first),
+ const_iterator(non_const_ret.second)));
+}
+
+PB_DS_CLASS_T_DEC
+std::pair<
+ typename PB_DS_CLASS_C_DEC::iterator,
+ typename PB_DS_CLASS_C_DEC::iterator>
+PB_DS_CLASS_C_DEC::
+prefix_range(typename e_access_traits::const_iterator b, typename e_access_traits::const_iterator e)
+{
+ Node_Iterator nd_it = node_begin();
+ Node_Iterator end_nd_it = node_end();
+
+ const e_access_traits& r_traits =
+ get_e_access_traits();
+
+ const size_type given_range_length = std::distance(b, e);
+
+ while (true)
+ {
+ if (nd_it == end_nd_it)
+ return (std::make_pair(end(), end()));
+
+ const size_type common_range_length =
+ PB_DS_BASE_C_DEC::common_prefix_len(nd_it, b, e, r_traits);
+
+ if (common_range_length >= given_range_length)
+ {
+ iterator ret_b = leftmost_it(nd_it);
+
+ iterator ret_e = rightmost_it(nd_it);
+
+ return (std::make_pair(ret_b, ++ret_e));
+ }
+
+ nd_it = next_child(nd_it, b, e, end_nd_it, r_traits);
+ }
+}
+
+PB_DS_CLASS_T_DEC
+typename PB_DS_CLASS_C_DEC::node_iterator
+PB_DS_CLASS_C_DEC::
+next_child(node_iterator nd_it, typename e_access_traits::const_iterator b, typename e_access_traits::const_iterator e, node_iterator end_nd_it, const e_access_traits& r_traits)
+{
+ const size_type num_children = nd_it.num_children();
+
+ node_iterator ret = end_nd_it;
+
+ size_type max_length = 0;
+
+ for (size_type i = 0; i < num_children; ++i)
+ {
+ node_iterator pot = nd_it.get_child(i);
+
+ const size_type common_range_length =
+ PB_DS_BASE_C_DEC::common_prefix_len( pot, b, e, r_traits);
+
+ if (common_range_length > max_length)
+ {
+ ret = pot;
+
+ max_length = common_range_length;
+ }
+ }
+
+ return (ret);
+}
+
+PB_DS_CLASS_T_DEC
+inline void
+PB_DS_CLASS_C_DEC::
+operator()(node_iterator /*nd_it*/, const_node_iterator /*end_nd_it*/) const
+{ }
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_e_access_traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_e_access_traits.hpp
new file mode 100644
index 0000000..34fbe0c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_e_access_traits.hpp
@@ -0,0 +1,89 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_trie_e_access_traits.hpp
+ * Contains a sample probe policy.
+ */
+
+#ifndef PB_DS_SAMPLE_TRIE_E_ACCESS_TRAITS_HPP
+#define PB_DS_SAMPLE_TRIE_E_ACCESS_TRAITS_HPP
+
+// A sample trie element-access traits.
+class sample_trie_e_access_traits
+{
+
+public:
+
+ // Size type.
+ typedef size_t size_type;
+
+ // Key type.
+ typedef std::string key_type;
+
+ // Const key reference type.
+ typedef
+ typename Allocator::template rebind<
+ key_type>::other::const_reference
+ const_key_reference;
+
+ // Element const iterator type.
+ typedef std::string::const_iterator const_iterator;
+
+ // Element type.
+ typedef char e_type;
+
+ enum
+ {
+ max_size = 4
+ };
+
+public:
+
+ // Returns a const_iterator to the first element of r_key.
+ inline static const_iterator
+ begin(const_key_reference r_key);
+
+ // Returns a const_iterator to the after-last element of r_key.
+ inline static const_iterator
+ end(const_key_reference r_key);
+
+ // Maps an element to a position.
+ inline static size_type
+ e_pos(e_type e);
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_TRIE_E_ACCESS_TRAITS_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp
new file mode 100644
index 0000000..55fd997
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/sample_trie_node_update.hpp
@@ -0,0 +1,72 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file sample_trie_node_update.hpp
+ * Contains a samle node update functor.
+ */
+
+#ifndef PB_DS_SAMPLE_TRIE_NODE_UPDATOR_HPP
+#define PB_DS_SAMPLE_TRIE_NODE_UPDATOR_HPP
+
+// A sample node updator.
+template<typename Const_Node_Iterator,
+
+ class Node_Iterator,
+
+ class E_Access_Traits,
+
+ class Allocator
+ >
+class sample_trie_node_update
+{
+
+public:
+
+ // Metadata type.
+ typedef size_t metadata_type;
+
+protected:
+
+ // Default constructor.
+ sample_trie_node_update();
+
+ // Updates the rank of a node through a node_iterator node_it; end_nd_it is the end node iterator.
+ inline void
+ operator()(node_iterator node_it, const_node_iterator end_nd_it) const;
+
+};
+
+#endif // #ifndef PB_DS_SAMPLE_TRIE_NODE_UPDATOR_HPP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp
new file mode 100644
index 0000000..228a4a5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp
@@ -0,0 +1,99 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file string_trie_e_access_traits_imp.hpp
+ * Contains a policy for extracting character positions from
+ * a string for a vector-based PATRICIA tree
+ */
+
+PB_DS_CLASS_T_DEC
+detail::integral_constant<int, Reverse> PB_DS_CLASS_C_DEC::s_rev_ind;
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::size_type
+PB_DS_CLASS_C_DEC::
+e_pos(e_type e)
+{
+ return (static_cast<size_type>(e - min_e_val));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin(const_key_reference r_key)
+{
+ return (begin_imp(r_key, s_rev_ind));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end(const_key_reference r_key)
+{
+ return (end_imp(r_key, s_rev_ind));
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin_imp(const_key_reference r_key, detail::false_type)
+{
+ return (r_key.begin());
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+begin_imp(const_key_reference r_key, detail::true_type)
+{
+ return (r_key.rbegin());
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end_imp(const_key_reference r_key, detail::false_type)
+{
+ return (r_key.end());
+}
+
+PB_DS_CLASS_T_DEC
+inline typename PB_DS_CLASS_C_DEC::const_iterator
+PB_DS_CLASS_C_DEC::
+end_imp(const_key_reference r_key, detail::true_type)
+{
+ return (r_key.rend());
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp
new file mode 100644
index 0000000..db912a0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp
@@ -0,0 +1,249 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trie_policy_base.hpp
+ * Contains an implementation of trie_policy_base.
+ */
+
+#ifndef PB_DS_TRIE_POLICY_BASE_HPP
+#define PB_DS_TRIE_POLICY_BASE_HPP
+
+#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+
+#define PB_DS_CLASS_T_DEC \
+ template< \
+ class Const_Node_Iterator, \
+ class Node_Iterator, \
+ class E_Access_Traits, \
+ typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ trie_policy_base< \
+ Const_Node_Iterator, \
+ Node_Iterator, \
+ E_Access_Traits, \
+ Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ basic_tree_policy_base< \
+ Const_Node_Iterator, \
+ Node_Iterator, \
+ Allocator>
+
+ template<typename Const_Node_Iterator,
+ class Node_Iterator,
+ class E_Access_Traits,
+ class Allocator>
+ class trie_policy_base : public PB_DS_BASE_C_DEC
+ {
+
+ public:
+
+ typedef E_Access_Traits e_access_traits;
+
+ typedef Allocator allocator_type;
+
+ typedef typename allocator_type::size_type size_type;
+
+ typedef null_node_metadata metadata_type;
+
+ typedef Const_Node_Iterator const_node_iterator;
+
+ typedef Node_Iterator node_iterator;
+
+ typedef typename const_node_iterator::value_type const_iterator;
+
+ typedef typename node_iterator::value_type iterator;
+
+ public:
+
+ typedef typename PB_DS_BASE_C_DEC::key_type key_type;
+
+ typedef
+ typename PB_DS_BASE_C_DEC::const_key_reference
+ const_key_reference;
+
+ protected:
+
+ virtual const_iterator
+ end() const = 0;
+
+ virtual iterator
+ end() = 0;
+
+ virtual const_node_iterator
+ node_begin() const = 0;
+
+ virtual node_iterator
+ node_begin() = 0;
+
+ virtual const_node_iterator
+ node_end() const = 0;
+
+ virtual node_iterator
+ node_end() = 0;
+
+ virtual const e_access_traits&
+ get_e_access_traits() const = 0;
+
+ private:
+ typedef
+ std::pair<
+ typename e_access_traits::const_iterator,
+ typename e_access_traits::const_iterator>
+ prefix_range_t;
+
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ protected:
+ static size_type
+ common_prefix_len(node_iterator nd_it, typename e_access_traits::const_iterator b_r, typename e_access_traits::const_iterator e_r, const e_access_traits& r_traits);
+
+ static iterator
+ leftmost_it(node_iterator nd_it);
+
+ static iterator
+ rightmost_it(node_iterator nd_it);
+
+ static bool
+ less(typename e_access_traits::const_iterator b_l, typename e_access_traits::const_iterator e_l, typename e_access_traits::const_iterator b_r, typename e_access_traits::const_iterator e_r, const e_access_traits& r_traits);
+ };
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::size_type
+ PB_DS_CLASS_C_DEC::
+ common_prefix_len(node_iterator nd_it, typename e_access_traits::const_iterator b_r, typename e_access_traits::const_iterator e_r, const e_access_traits& r_traits)
+ {
+ prefix_range_t pref_range = nd_it.valid_prefix();
+
+ typename e_access_traits::const_iterator b_l = pref_range.first;
+ typename e_access_traits::const_iterator e_l = pref_range.second;
+
+ const size_type range_length_l =
+ std::distance(b_l, e_l);
+
+ const size_type range_length_r =
+ std::distance(b_r, e_r);
+
+ if (range_length_r < range_length_l)
+ {
+ std::swap(b_l, b_r);
+
+ std::swap(e_l, e_r);
+ }
+
+ size_type ret = 0;
+
+ while (b_l != e_l)
+ {
+ if (r_traits.e_pos(*b_l) != r_traits.e_pos(*b_r))
+ return (ret);
+
+ ++ret;
+
+ ++b_l;
+
+ ++b_r;
+ }
+
+ return (ret);
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ leftmost_it(node_iterator nd_it)
+ {
+ if (nd_it.num_children() == 0)
+ return (*nd_it);
+
+ return (leftmost_it(nd_it.get_child(0)));
+ }
+
+ PB_DS_CLASS_T_DEC
+ typename PB_DS_CLASS_C_DEC::iterator
+ PB_DS_CLASS_C_DEC::
+ rightmost_it(node_iterator nd_it)
+ {
+ const size_type num_children = nd_it.num_children();
+
+ if (num_children == 0)
+ return (*nd_it);
+
+ return (rightmost_it(nd_it.get_child(num_children - 1)));
+ }
+
+ PB_DS_CLASS_T_DEC
+ bool
+ PB_DS_CLASS_C_DEC::
+ less(typename e_access_traits::const_iterator b_l, typename e_access_traits::const_iterator e_l, typename e_access_traits::const_iterator b_r, typename e_access_traits::const_iterator e_r, const e_access_traits& r_traits)
+ {
+ while (b_l != e_l)
+ {
+ if (b_r == e_r)
+ return (false);
+
+ size_type l_pos =
+ r_traits.e_pos(*b_l);
+ size_type r_pos =
+ r_traits.e_pos(*b_r);
+
+ if (l_pos != r_pos)
+ return (l_pos < r_pos);
+
+ ++b_l;
+ ++b_r;
+ }
+
+ return (b_r != e_r);
+ }
+
+#undef PB_DS_CLASS_T_DEC
+
+#undef PB_DS_CLASS_C_DEC
+
+#undef PB_DS_BASE_C_DEC
+
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif // #ifndef PB_DS_TRIE_POLICY_BASE_HPP
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/type_utils.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/type_utils.hpp
new file mode 100644
index 0000000..55f349a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/type_utils.hpp
@@ -0,0 +1,167 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file type_utils.hpp
+ * Contains utilities for handnling types. All of these classes are based on
+ * "Modern C++" by Andrei Alxandrescu.
+ */
+
+#ifndef PB_DS_TYPE_UTILS_HPP
+#define PB_DS_TYPE_UTILS_HPP
+
+#include <cstddef>
+#include <utility>
+#include <tr1/type_traits>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ using std::tr1::is_same;
+ using std::tr1::is_const;
+ using std::tr1::is_pointer;
+ using std::tr1::is_reference;
+ using std::tr1::is_fundamental;
+ using std::tr1::is_member_object_pointer;
+ using std::tr1::is_member_pointer;
+ using std::tr1::is_base_of;
+ using std::tr1::remove_const;
+ using std::tr1::remove_reference;
+
+ // Need integral_const<bool, true> <-> integral_const<int, 1>, so
+ // because of this use the following typedefs instead of importing
+ // std::tr1's.
+ using std::tr1::integral_constant;
+ typedef std::tr1::integral_constant<int, 1> true_type;
+ typedef std::tr1::integral_constant<int, 0> false_type;
+
+ using __gnu_cxx::__conditional_type;
+ using __gnu_cxx::__numeric_traits;
+
+ template<typename T>
+ struct is_const_pointer
+ {
+ enum
+ {
+ value = is_const<T>::value && is_pointer<T>::value
+ };
+ };
+
+ template<typename T>
+ struct is_const_reference
+ {
+ enum
+ {
+ value = is_const<T>::value && is_reference<T>::value
+ };
+ };
+
+ template<typename T>
+ struct is_simple
+ {
+ enum
+ {
+ value = is_fundamental<typename remove_const<T>::type>::value
+ || is_pointer<typename remove_const<T>::type>::value
+ || is_member_pointer<T>::value
+ };
+ };
+
+ template<typename T>
+ class is_pair
+ {
+ private:
+ template<typename U>
+ struct is_pair_imp
+ {
+ enum
+ {
+ value = 0
+ };
+ };
+
+ template<typename U, typename V>
+ struct is_pair_imp<std::pair<U,V> >
+ {
+ enum
+ {
+ value = 1
+ };
+ };
+
+ public:
+ enum
+ {
+ value = is_pair_imp<T>::value
+ };
+ };
+
+ // Use C++0x's static_assert if possible.
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#define PB_DS_STATIC_ASSERT(UNIQUE, E) static_assert(E, #UNIQUE)
+#else
+ template<bool>
+ struct __static_assert;
+
+ template<>
+ struct __static_assert<true>
+ { };
+
+ template<int>
+ struct __static_assert_dumclass
+ {
+ enum
+ {
+ v = 1
+ };
+ };
+
+#define PB_DS_STATIC_ASSERT(UNIQUE, E) \
+ typedef __gnu_pbds::detail::__static_assert_dumclass<sizeof(__gnu_pbds::detail::__static_assert<bool(E)>)> UNIQUE##__static_assert_type
+
+#endif
+
+ template<typename Type>
+ struct type_to_type
+ {
+ typedef Type type;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/types_traits.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/types_traits.hpp
new file mode 100644
index 0000000..6d5a078
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/types_traits.hpp
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file types_traits.hpp
+ * Contains a traits class of types used by containers.
+ */
+
+#ifndef PB_DS_TYPES_TRAITS_HPP
+#define PB_DS_TYPES_TRAITS_HPP
+
+#include <ext/pb_ds/detail/basic_types.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <utility>
+
+namespace __gnu_pbds
+{
+ namespace detail
+ {
+ template<typename Key, typename Mapped, typename Alloc, bool Store_Extra>
+ struct vt_base_selector
+ {
+ typedef value_type_base<Key, Mapped, Alloc, Store_Extra> type;
+ };
+
+ template<typename Key, typename Mapped, typename Alloc, bool Store_Extra>
+ struct types_traits
+ : public vt_base_selector<Key, Mapped, Alloc, Store_Extra>::type
+ {
+ typedef typename Alloc::template rebind<Key>::other key_allocator;
+ typedef typename key_allocator::value_type key_type;
+ typedef typename key_allocator::pointer key_pointer;
+ typedef typename key_allocator::const_pointer const_key_pointer;
+ typedef typename key_allocator::reference key_reference;
+ typedef typename key_allocator::const_reference const_key_reference;
+ typedef typename Alloc::size_type size_type;
+
+ // Extra value (used when the extra value is stored with each value).
+ typedef std::pair<size_type, size_type> comp_hash;
+
+ typedef integral_constant<int, Store_Extra> store_extra;
+ store_extra m_store_extra_indicator;
+
+ typedef typename no_throw_copies<Key, Mapped>::indicator no_throw_copies;
+ no_throw_copies m_no_throw_copies_indicator;
+ };
+ } // namespace detail
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp
new file mode 100644
index 0000000..38d4eb1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_iterator.hpp
+ * Contains an iterator class used for const ranging over the elements of the
+ * table.
+ */
+
+// Const range-type iterator.
+class const_iterator_ :
+ public const_point_iterator_
+
+{
+
+public:
+
+ // Category.
+ typedef std::forward_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef typename Allocator::difference_type difference_type;
+
+ // Iterator's value type.
+ typedef value_type_ value_type;
+
+ // Iterator's pointer type.
+ typedef pointer_ pointer;
+
+ // Iterator's const pointer type.
+ typedef const_pointer_ const_pointer;
+
+ // Iterator's reference type.
+ typedef reference_ reference;
+
+ // Iterator's const reference type.
+ typedef const_reference_ const_reference;
+
+public:
+
+ // Default constructor.
+ inline
+ const_iterator_()
+
+ : m_p_tbl(NULL)
+ { }
+
+ // Increments.
+ inline const_iterator_&
+ operator++()
+ {
+ m_p_tbl->inc_it_state(base_type::m_p_value, m_pos);
+
+ return (*this);
+ }
+
+ // Increments.
+ inline const_iterator_
+ operator++(int)
+ {
+ const_iterator_ ret =* this;
+
+ m_p_tbl->inc_it_state(base_type::m_p_value, m_pos);
+
+ return (ret);
+ }
+
+protected:
+
+ typedef const_point_iterator_ base_type;
+
+protected:
+
+ /**
+ * Constructor used by the table to initiate the generalized
+ * pointer and position (e.g., this is called from within a find()
+ * of a table.
+ * */
+ inline
+ const_iterator_(const_pointer_ p_value, PB_DS_GEN_POS pos, const PB_DS_CLASS_C_DEC* p_tbl) : const_point_iterator_(p_value),
+ m_p_tbl(p_tbl),
+ m_pos(pos)
+ { }
+
+protected:
+
+ /**
+ * Pointer to the table object which created the iterator (used for
+ * incrementing its position.
+ * */
+ const PB_DS_CLASS_C_DEC* m_p_tbl;
+
+ PB_DS_GEN_POS m_pos;
+
+ friend class PB_DS_CLASS_C_DEC;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp
new file mode 100644
index 0000000..bc0b2ad
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/const_point_iterator.hpp
@@ -0,0 +1,151 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file const_point_iterator.hpp
+ * Contains an iterator class returned by the tables' const find and insert
+ * methods.
+ */
+
+class point_iterator_;
+
+// Const point-type iterator.
+class const_point_iterator_
+{
+
+public:
+
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // Iterator's value type.
+ typedef value_type_ value_type;
+
+ // Iterator's pointer type.
+ typedef pointer_ pointer;
+
+ // Iterator's const pointer type.
+ typedef const_pointer_ const_pointer;
+
+ // Iterator's reference type.
+ typedef reference_ reference;
+
+ // Iterator's const reference type.
+ typedef const_reference_ const_reference;
+
+public:
+
+ inline
+ const_point_iterator_(const_pointer p_value) : m_p_value(p_value)
+ { }
+
+ // Default constructor.
+ inline
+ const_point_iterator_()
+
+ : m_p_value(NULL)
+ { }
+
+ // Copy constructor.
+ inline
+ const_point_iterator_(const const_point_iterator_& other)
+
+ : m_p_value(other.m_p_value)
+ { }
+
+ // Copy constructor.
+ inline
+ const_point_iterator_(const point_iterator_& other)
+
+ : m_p_value(other.m_p_value)
+ { }
+
+ // Access.
+ inline const_pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_value != NULL);
+
+ return (m_p_value);
+ }
+
+ // Access.
+ inline const_reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_value != NULL);
+
+ return (*m_p_value);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const point_iterator_& other) const
+ {
+ return (m_p_value == other.m_p_value);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const const_point_iterator_& other) const
+ {
+ return (m_p_value == other.m_p_value);
+ }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const point_iterator_& other) const
+ {
+ return (m_p_value != other.m_p_value);
+ }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const const_point_iterator_& other) const
+ {
+ return (m_p_value != other.m_p_value);
+ }
+
+protected:
+ const_pointer m_p_value;
+
+ friend class point_iterator_;
+
+ friend class PB_DS_CLASS_C_DEC;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/iterator.hpp
new file mode 100644
index 0000000..3e21aba
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/iterator.hpp
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file iterator.hpp
+ * Contains an iterator_ class used for ranging over the elements of the
+ * table.
+ */
+
+// Range-type iterator.
+class iterator_ :
+ public const_iterator_
+
+{
+
+public:
+
+ // Category.
+ typedef std::forward_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef typename Allocator::difference_type difference_type;
+
+ // Iterator's value type.
+ typedef value_type_ value_type;
+
+ // Iterator's pointer type.
+ typedef pointer_ pointer;
+
+ // Iterator's const pointer type.
+ typedef const_pointer_ const_pointer;
+
+ // Iterator's reference type.
+ typedef reference_ reference;
+
+ // Iterator's const reference type.
+ typedef const_reference_ const_reference;
+
+public:
+
+ // Default constructor.
+ inline
+ iterator_()
+
+ : const_iterator_(NULL, PB_DS_GEN_POS(), NULL)
+ { }
+
+ // Conversion to a point-type iterator.
+ inline
+ operator point_iterator_()
+ {
+ return (point_iterator_(
+ const_cast<pointer>(const_iterator_::m_p_value)));
+ }
+
+ // Conversion to a point-type iterator.
+ inline
+ operator const point_iterator_() const
+ {
+ return (point_iterator_(
+ const_cast<pointer>(const_iterator_::m_p_value)));
+ }
+
+ // Access.
+ inline pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_value != NULL);
+
+ return (const_cast<pointer>(base_type::m_p_value));
+ }
+
+ // Access.
+ inline reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(base_type::m_p_value != NULL);
+
+ return (const_cast<reference>(*base_type::m_p_value));
+ }
+
+ // Increments.
+ inline iterator_&
+ operator++()
+ {
+ base_type::m_p_tbl->inc_it_state(base_type::m_p_value, base_type::m_pos);
+
+ return (*this);
+ }
+
+ // Increments.
+ inline iterator_
+ operator++(int)
+ {
+ iterator_ ret =* this;
+
+ base_type::m_p_tbl->inc_it_state(base_type::m_p_value, base_type::m_pos);
+
+ return (ret);
+ }
+
+protected:
+ typedef const_iterator_ base_type;
+
+protected:
+
+ /**
+ * Constructor used by the table to initiate the generalized
+ * pointer and position (e.g., this is called from within a find()
+ * of a table.
+ * */
+ inline
+ iterator_(pointer p_value, PB_DS_GEN_POS pos, PB_DS_CLASS_C_DEC* p_tbl) : const_iterator_(p_value, pos, p_tbl)
+ { }
+
+ friend class PB_DS_CLASS_C_DEC;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp
new file mode 100644
index 0000000..37ce900
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp
@@ -0,0 +1,143 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file point_iterator.hpp
+ * Contains an iterator class returned by the tables' find and insert
+ * methods.
+ */
+
+// Find type iterator.
+class point_iterator_
+{
+
+public:
+
+ // Category.
+ typedef trivial_iterator_tag iterator_category;
+
+ // Difference type.
+ typedef trivial_iterator_difference_type difference_type;
+
+ // Iterator's value type.
+ typedef value_type_ value_type;
+
+ // Iterator's pointer type.
+ typedef pointer_ pointer;
+
+ // Iterator's const pointer type.
+ typedef const_pointer_ const_pointer;
+
+ // Iterator's reference type.
+ typedef reference_ reference;
+
+ // Iterator's const reference type.
+ typedef const_reference_ const_reference;
+
+public:
+
+ // Default constructor.
+ inline
+ point_iterator_()
+
+ : m_p_value(NULL)
+ { }
+
+ // Copy constructor.
+ inline
+ point_iterator_(const point_iterator_& other)
+
+ : m_p_value(other.m_p_value)
+ { }
+
+ // Access.
+ inline pointer
+ operator->() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_value != NULL);
+
+ return (m_p_value);
+ }
+
+ // Access.
+ inline reference
+ operator*() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(m_p_value != NULL);
+
+ return (*m_p_value);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const point_iterator_& other) const
+ {
+ return (m_p_value == other.m_p_value);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator==(const const_point_iterator_& other) const
+ {
+ return (m_p_value == other.m_p_value);
+ }
+
+ // Compares content to a different iterator object.
+ inline bool
+ operator!=(const point_iterator_& other) const
+ {
+ return (m_p_value != other.m_p_value);
+ }
+
+ // Compares content (negatively) to a different iterator object.
+ inline bool
+ operator!=(const const_point_iterator_& other) const
+ {
+ return (m_p_value != other.m_p_value);
+ }
+
+ inline
+ point_iterator_(pointer p_value) : m_p_value(p_value)
+ { }
+
+protected:
+ friend class const_point_iterator_;
+
+ friend class PB_DS_CLASS_C_DEC;
+
+protected:
+ pointer m_p_value;
+};
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/exception.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/exception.hpp
new file mode 100644
index 0000000..4f796b1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/exception.hpp
@@ -0,0 +1,103 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file exception.hpp
+ * Contains exception classes.
+ */
+
+#ifndef PB_DS_EXCEPTION_HPP
+#define PB_DS_EXCEPTION_HPP
+
+#include <stdexcept>
+#include <cstdlib>
+
+namespace __gnu_pbds
+{
+ // Base class for exceptions.
+ struct container_error : public std::logic_error
+ {
+ container_error()
+ : std::logic_error(__N("__gnu_pbds::container_error")) { }
+ };
+
+ // An entry cannot be inserted into a container object for logical
+ // reasons (not, e.g., if memory is unabvailable, in which case
+ // the allocator_type's exception will be thrown).
+ struct insert_error : public container_error { };
+
+ // A join cannot be performed logical reasons (i.e., the ranges of
+ // the two container objects being joined overlaps.
+ struct join_error : public container_error { };
+
+ // A container cannot be resized.
+ struct resize_error : public container_error { };
+
+#if __EXCEPTIONS
+ inline void
+ __throw_container_error(void)
+ { throw container_error(); }
+
+ inline void
+ __throw_insert_error(void)
+ { throw insert_error(); }
+
+ inline void
+ __throw_join_error(void)
+ { throw join_error(); }
+
+ inline void
+ __throw_resize_error(void)
+ { throw resize_error(); }
+#else
+ inline void
+ __throw_container_error(void)
+ { std::abort(); }
+
+ inline void
+ __throw_insert_error(void)
+ { std::abort(); }
+
+ inline void
+ __throw_join_error(void)
+ { std::abort(); }
+
+ inline void
+ __throw_resize_error(void)
+ { std::abort(); }
+#endif
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/hash_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/hash_policy.hpp
new file mode 100644
index 0000000..24c0c45
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/hash_policy.hpp
@@ -0,0 +1,604 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file hash_policy.hpp
+ * Contains hash-related policies.
+ */
+
+#ifndef PB_DS_HASH_POLICY_HPP
+#define PB_DS_HASH_POLICY_HPP
+
+#include <algorithm>
+#include <vector>
+#include <cmath>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/hash_fn/mask_based_range_hashing.hpp>
+#include <ext/pb_ds/detail/hash_fn/mod_based_range_hashing.hpp>
+#include <ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_size_base.hpp>
+
+namespace __gnu_pbds
+{
+ // A null hash function, indicating that the combining hash function
+ // is actually a ranged hash function.
+ struct null_hash_fn
+ { };
+
+ // A null probe function, indicating that the combining probe
+ // function is actually a ranged probe function.
+ struct null_probe_fn
+ { };
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC linear_probe_fn<Size_Type>
+
+ // A probe sequence policy using fixed increments.
+ template<typename Size_Type = size_t>
+ class linear_probe_fn
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ // Returns the i-th offset from the hash value.
+ inline size_type
+ operator()(size_type i) const;
+ };
+
+#include <ext/pb_ds/detail/hash_fn/linear_probe_fn_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC quadratic_probe_fn<Size_Type>
+
+ // A probe sequence policy using square increments.
+ template<typename Size_Type = size_t>
+ class quadratic_probe_fn
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ // Returns the i-th offset from the hash value.
+ inline size_type
+ operator()(size_type i) const;
+ };
+
+#include <ext/pb_ds/detail/hash_fn/quadratic_probe_fn_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC direct_mask_range_hashing<Size_Type>
+
+ // A mask range-hashing class (uses a bit-mask).
+ template<typename Size_Type = size_t>
+ class direct_mask_range_hashing
+ : public detail::mask_based_range_hashing<Size_Type>
+ {
+ private:
+ typedef detail::mask_based_range_hashing<Size_Type> mask_based_base;
+
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ void
+ notify_resized(size_type size);
+
+ // Transforms the __hash value hash into a ranged-hash value
+ // (using a bit-mask).
+ inline size_type
+ operator()(size_type hash) const;
+ };
+
+#include <ext/pb_ds/detail/hash_fn/direct_mask_range_hashing_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC direct_mod_range_hashing<Size_Type>
+
+ // A mod range-hashing class (uses the modulo function).
+ template<typename Size_Type = size_t>
+ class direct_mod_range_hashing
+ : public detail::mod_based_range_hashing<Size_Type>
+ {
+ public:
+ typedef Size_Type size_type;
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ void
+ notify_resized(size_type size);
+
+ // Transforms the __hash value hash into a ranged-hash value
+ // (using a modulo operation).
+ inline size_type
+ operator()(size_type hash) const;
+
+ private:
+ typedef detail::mod_based_range_hashing<size_type> mod_based_base;
+ };
+
+#include <ext/pb_ds/detail/hash_fn/direct_mod_range_hashing_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<bool External_Load_Access, typename Size_Type>
+#define PB_DS_CLASS_C_DEC hash_load_check_resize_trigger<External_Load_Access, Size_Type>
+#define PB_DS_SIZE_BASE_C_DEC detail::hash_load_check_resize_trigger_size_base<Size_Type, External_Load_Access>
+
+ // A resize trigger policy based on a load check. It keeps the
+ // load factor between some load factors load_min and load_max.
+ template<bool External_Load_Access = false, typename Size_Type = size_t>
+ class hash_load_check_resize_trigger : private PB_DS_SIZE_BASE_C_DEC
+ {
+ public:
+ typedef Size_Type size_type;
+
+ enum
+ {
+ external_load_access = External_Load_Access
+ };
+
+ // Default constructor, or constructor taking load_min and
+ // load_max load factors between which this policy will keep the
+ // actual load.
+ hash_load_check_resize_trigger(float load_min = 0.125,
+ float load_max = 0.5);
+
+ void
+ swap(hash_load_check_resize_trigger& other);
+
+ virtual
+ ~hash_load_check_resize_trigger();
+
+ // Returns a pair of the minimal and maximal loads, respectively.
+ inline std::pair<float, float>
+ get_loads() const;
+
+ // Sets the loads through a pair of the minimal and maximal
+ // loads, respectively.
+ void
+ set_loads(std::pair<float, float> load_pair);
+
+ protected:
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ // Notifies an element was inserted. The total number of entries
+ // in the table is num_entries.
+ inline void
+ notify_inserted(size_type num_entries);
+
+ inline void
+ notify_erased(size_type num_entries);
+
+ // Notifies the table was cleared.
+ void
+ notify_cleared();
+
+ // Notifies the table was resized as a result of this object's
+ // signifying that a resize is needed.
+ void
+ notify_resized(size_type new_size);
+
+ void
+ notify_externally_resized(size_type new_size);
+
+ inline bool
+ is_resize_needed() const;
+
+ inline bool
+ is_grow_needed(size_type size, size_type num_entries) const;
+
+ private:
+ virtual void
+ do_resize(size_type new_size);
+
+ typedef PB_DS_SIZE_BASE_C_DEC size_base;
+
+#ifdef _GLIBCXX_DEBUG
+ void
+ assert_valid() const;
+#endif
+
+ float m_load_min;
+ float m_load_max;
+ size_type m_next_shrink_size;
+ size_type m_next_grow_size;
+ bool m_resize_needed;
+ };
+
+#include <ext/pb_ds/detail/resize_policy/hash_load_check_resize_trigger_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_SIZE_BASE_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<bool External_Load_Access, typename Size_Type>
+#define PB_DS_CLASS_C_DEC cc_hash_max_collision_check_resize_trigger<External_Load_Access, Size_Type>
+
+ // A resize trigger policy based on collision checks. It keeps the
+ // simulated load factor lower than some given load factor.
+ template<bool External_Load_Access = false, typename Size_Type = size_t>
+ class cc_hash_max_collision_check_resize_trigger
+ {
+ public:
+ typedef Size_Type size_type;
+
+ enum
+ {
+ external_load_access = External_Load_Access
+ };
+
+ // Default constructor, or constructor taking load, a __load
+ // factor which it will attempt to maintain.
+ cc_hash_max_collision_check_resize_trigger(float load = 0.5);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ // Returns the current load.
+ inline float
+ get_load() const;
+
+ // Sets the load; does not resize the container.
+ void
+ set_load(float load);
+
+ protected:
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ inline void
+ notify_inserted(size_type num_entries);
+
+ inline void
+ notify_erased(size_type num_entries);
+
+ void
+ notify_cleared();
+
+ // Notifies the table was resized as a result of this object's
+ // signifying that a resize is needed.
+ void
+ notify_resized(size_type new_size);
+
+ void
+ notify_externally_resized(size_type new_size);
+
+ inline bool
+ is_resize_needed() const;
+
+ inline bool
+ is_grow_needed(size_type size, size_type num_entries) const;
+
+ private:
+ void
+ calc_max_num_coll();
+
+ inline void
+ calc_resize_needed();
+
+ float m_load;
+ size_type m_size;
+ size_type m_num_col;
+ size_type m_max_col;
+ bool m_resize_needed;
+ };
+
+#include <ext/pb_ds/detail/resize_policy/cc_hash_max_collision_check_resize_trigger_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Type>
+#define PB_DS_CLASS_C_DEC hash_exponential_size_policy<Size_Type>
+
+ // A size policy whose sequence of sizes form an exponential
+ // sequence (typically powers of 2.
+ template<typename Size_Type = size_t>
+ class hash_exponential_size_policy
+ {
+ public:
+ typedef Size_Type size_type;
+
+ // Default constructor, or onstructor taking a start_size, or
+ // constructor taking a start size and grow_factor. The policy
+ // will use the sequence of sizes start_size, start_size*
+ // grow_factor, start_size* grow_factor^2, ...
+ hash_exponential_size_policy(size_type start_size = 8,
+ size_type grow_factor = 2);
+
+ void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ size_type
+ get_nearest_larger_size(size_type size) const;
+
+ size_type
+ get_nearest_smaller_size(size_type size) const;
+
+ private:
+ size_type m_start_size;
+ size_type m_grow_factor;
+ };
+
+#include <ext/pb_ds/detail/resize_policy/hash_exponential_size_policy_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC
+#define PB_DS_CLASS_C_DEC hash_prime_size_policy
+
+ // A size policy whose sequence of sizes form a nearly-exponential
+ // sequence of primes.
+ class hash_prime_size_policy
+ {
+ public:
+ // Size type.
+ typedef size_t size_type;
+
+ // Default constructor, or onstructor taking a start_size The
+ // policy will use the sequence of sizes approximately
+ // start_size, start_size* 2, start_size* 2^2, ...
+ hash_prime_size_policy(size_type start_size = 8);
+
+ inline void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ protected:
+ size_type
+ get_nearest_larger_size(size_type size) const;
+
+ size_type
+ get_nearest_smaller_size(size_type size) const;
+
+ private:
+ size_type m_start_size;
+ };
+
+#include <ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
+
+#define PB_DS_CLASS_C_DEC hash_standard_resize_policy<Size_Policy, Trigger_Policy, External_Size_Access, Size_Type>
+
+ // A resize policy which delegates operations to size and trigger policies.
+ template<typename Size_Policy = hash_exponential_size_policy<>,
+ typename Trigger_Policy = hash_load_check_resize_trigger<>,
+ bool External_Size_Access = false,
+ typename Size_Type = size_t>
+ class hash_standard_resize_policy
+ : public Size_Policy, public Trigger_Policy
+ {
+ public:
+ typedef Size_Type size_type;
+ typedef Trigger_Policy trigger_policy;
+ typedef Size_Policy size_policy;
+
+ enum
+ {
+ external_size_access = External_Size_Access
+ };
+
+ // Default constructor.
+ hash_standard_resize_policy();
+
+ // constructor taking some policies r_size_policy will be copied
+ // by the Size_Policy object of this object.
+ hash_standard_resize_policy(const Size_Policy& r_size_policy);
+
+ // constructor taking some policies. r_size_policy will be
+ // copied by the Size_Policy object of this
+ // object. r_trigger_policy will be copied by the Trigger_Policy
+ // object of this object.
+ hash_standard_resize_policy(const Size_Policy& r_size_policy,
+ const Trigger_Policy& r_trigger_policy);
+
+ virtual
+ ~hash_standard_resize_policy();
+
+ inline void
+ swap(PB_DS_CLASS_C_DEC& other);
+
+ // Access to the Size_Policy object used.
+ Size_Policy&
+ get_size_policy();
+
+ // Const access to the Size_Policy object used.
+ const Size_Policy&
+ get_size_policy() const;
+
+ // Access to the Trigger_Policy object used.
+ Trigger_Policy&
+ get_trigger_policy();
+
+ // Access to the Trigger_Policy object used.
+ const Trigger_Policy&
+ get_trigger_policy() const;
+
+ // Returns the actual size of the container.
+ inline size_type
+ get_actual_size() const;
+
+ // Resizes the container to suggested_new_size, a suggested size
+ // (the actual size will be determined by the Size_Policy
+ // object).
+ void
+ resize(size_type suggested_new_size);
+
+ protected:
+ inline void
+ notify_insert_search_start();
+
+ inline void
+ notify_insert_search_collision();
+
+ inline void
+ notify_insert_search_end();
+
+ inline void
+ notify_find_search_start();
+
+ inline void
+ notify_find_search_collision();
+
+ inline void
+ notify_find_search_end();
+
+ inline void
+ notify_erase_search_start();
+
+ inline void
+ notify_erase_search_collision();
+
+ inline void
+ notify_erase_search_end();
+
+ inline void
+ notify_inserted(size_type num_e);
+
+ inline void
+ notify_erased(size_type num_e);
+
+ void
+ notify_cleared();
+
+ void
+ notify_resized(size_type new_size);
+
+ inline bool
+ is_resize_needed() const;
+
+ // Queries what the new size should be, when the container is
+ // resized naturally. The current __size of the container is
+ // size, and the number of used entries within the container is
+ // num_used_e.
+ size_type
+ get_new_size(size_type size, size_type num_used_e) const;
+
+ private:
+ // Resizes to new_size.
+ virtual void
+ do_resize(size_type new_size);
+
+ typedef Trigger_Policy trigger_policy_base;
+
+ typedef Size_Policy size_policy_base;
+
+ size_type m_size;
+ };
+
+#include <ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/list_update_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/list_update_policy.hpp
new file mode 100644
index 0000000..ec05b69
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/list_update_policy.hpp
@@ -0,0 +1,136 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file list_update_policy.hpp
+ * Contains policies for list update containers.
+ */
+
+#ifndef PB_DS_LU_POLICY_HPP
+#define PB_DS_LU_POLICY_HPP
+
+#include <cstdlib>
+#include <ext/pb_ds/detail/list_update_policy/counter_lu_metadata.hpp>
+
+namespace __gnu_pbds
+{
+ // A null type that means that each link in a list-based container
+ // does not actually need metadata.
+ struct null_lu_metadata
+ { };
+
+#define PB_DS_CLASS_T_DEC template<typename Allocator>
+#define PB_DS_CLASS_C_DEC move_to_front_lu_policy<Allocator>
+
+ // A list-update policy that unconditionally moves elements to the
+ // front of the list.
+ template<typename Allocator = std::allocator<char> >
+ class move_to_front_lu_policy
+ {
+ public:
+ typedef Allocator allocator_type;
+
+ // Metadata on which this functor operates.
+ typedef null_lu_metadata metadata_type;
+
+ // Reference to metadata on which this functor operates.
+ typedef typename allocator_type::template rebind<metadata_type>::other metadata_rebind;
+ typedef typename metadata_rebind::reference metadata_reference;
+
+ // Creates a metadata object.
+ metadata_type
+ operator()() const;
+
+ // Decides whether a metadata object should be moved to the front
+ // of the list.
+ inline bool
+ operator()(metadata_reference r_metadata) const;
+
+ private:
+ static null_lu_metadata s_metadata;
+ };
+
+#include <ext/pb_ds/detail/list_update_policy/mtf_lu_policy_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC template<size_t Max_Count, class Allocator>
+#define PB_DS_CLASS_C_DEC counter_lu_policy<Max_Count, Allocator>
+
+ // A list-update policy that moves elements to the front of the list
+ // based on the counter algorithm.
+ template<size_t Max_Count = 5, typename Allocator = std::allocator<char> >
+ class counter_lu_policy
+ : private detail::counter_lu_policy_base<typename Allocator::size_type>
+ {
+ public:
+ typedef Allocator allocator_type;
+
+ enum
+ {
+ max_count = Max_Count
+ };
+
+ typedef typename allocator_type::size_type size_type;
+
+ // Metadata on which this functor operates.
+ typedef detail::counter_lu_metadata<size_type> metadata_type;
+
+ // Reference to metadata on which this functor operates.
+ typedef typename Allocator::template rebind<metadata_type>::other metadata_rebind;
+ typedef typename metadata_rebind::reference metadata_reference;
+
+ // Creates a metadata object.
+ metadata_type
+ operator()() const;
+
+ // Decides whether a metadata object should be moved to the front
+ // of the list.
+ bool
+ operator()(metadata_reference r_metadata) const;
+
+ private:
+ typedef detail::counter_lu_policy_base<typename Allocator::size_type> base_type;
+ };
+
+#include <ext/pb_ds/detail/list_update_policy/counter_lu_policy_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/priority_queue.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/priority_queue.hpp
new file mode 100644
index 0000000..531f70c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/priority_queue.hpp
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file priority_queue.hpp
+ * Contains priority_queues.
+ */
+
+#ifndef PB_DS_PRIORITY_QUEUE_HPP
+#define PB_DS_PRIORITY_QUEUE_HPP
+
+#include <ext/pb_ds/tag_and_trait.hpp>
+#include <ext/pb_ds/detail/priority_queue_base_dispatch.hpp>
+#include <ext/pb_ds/detail/standard_policies.hpp>
+
+namespace __gnu_pbds
+{
+ // A priority queue.
+ template<typename Value_Type,
+ typename Cmp_Fn = std::less<Value_Type>,
+ typename Tag = pairing_heap_tag,
+ typename Allocator = std::allocator<char> >
+ class priority_queue
+ : public detail::priority_queue_base_dispatch<Value_Type,Cmp_Fn,Tag,Allocator>::type
+ {
+ private:
+ typedef typename detail::priority_queue_base_dispatch<Value_Type,Cmp_Fn,Tag,Allocator>::type base_type;
+
+ public:
+ typedef Value_Type value_type;
+ typedef Cmp_Fn cmp_fn;
+ typedef Tag container_category;
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+ typedef typename allocator_type::difference_type difference_type;
+
+ typedef typename allocator_type::template rebind<value_type>::other value_rebind;
+ typedef typename value_rebind::reference reference;
+ typedef typename value_rebind::const_reference const_reference;
+ typedef typename value_rebind::pointer pointer;
+ typedef typename value_rebind::const_pointer const_pointer;
+
+ typedef typename base_type::const_point_iterator const_point_iterator;
+ typedef typename base_type::point_iterator point_iterator;
+ typedef typename base_type::const_iterator const_iterator;
+ typedef typename base_type::iterator iterator;
+
+ priority_queue() { }
+
+ // Constructor taking some policy objects. r_cmp_fn will be copied
+ // by the Cmp_Fn object of the container object.
+ priority_queue(const cmp_fn& r_cmp_fn) : base_type(r_cmp_fn) { }
+
+ // Constructor taking __iterators to a range of value_types. The
+ // value_types between first_it and last_it will be inserted into
+ // the container object.
+ template<typename It>
+ priority_queue(It first_it, It last_it)
+ { base_type::copy_from_range(first_it, last_it); }
+
+ // Constructor taking __iterators to a range of value_types and
+ // some policy objects The value_types between first_it and
+ // last_it will be inserted into the container object. r_cmp_fn
+ // will be copied by the cmp_fn object of the container object.
+ template<typename It>
+ priority_queue(It first_it, It last_it, const cmp_fn& r_cmp_fn)
+ : base_type(r_cmp_fn)
+ { base_type::copy_from_range(first_it, last_it); }
+
+ priority_queue(const priority_queue& other)
+ : base_type((const base_type& )other) { }
+
+ virtual
+ ~priority_queue() { }
+
+ priority_queue&
+ operator=(const priority_queue& other)
+ {
+ if (this != &other)
+ {
+ priority_queue tmp(other);
+ swap(tmp);
+ }
+ return *this;
+ }
+
+ void
+ swap(priority_queue& other)
+ { base_type::swap(other); }
+ };
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tag_and_trait.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tag_and_trait.hpp
new file mode 100644
index 0000000..ccd2533
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tag_and_trait.hpp
@@ -0,0 +1,363 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file tag_and_trait.hpp
+ * Contains tags and traits, e.g., ones describing underlying
+ * data structures.
+ */
+
+#ifndef PB_DS_TAG_AND_TRAIT_HPP
+#define PB_DS_TAG_AND_TRAIT_HPP
+
+#include <ext/pb_ds/detail/type_utils.hpp>
+
+/**
+ * @namespace __gnu_pbds
+ * @brief GNU extensions for policy-based data structures for public use.
+ */
+namespace __gnu_pbds
+{
+ // A trivial iterator tag. Signifies that the iterators has none of
+ // the STL's movement abilities.
+ struct trivial_iterator_tag
+ { };
+
+ // Prohibit moving trivial iterators.
+ typedef void trivial_iterator_difference_type;
+
+
+ // Signifies a basic invalidation guarantee that any iterator,
+ // pointer, or reference to a container object's mapped value type
+ // is valid as long as the container is not modified.
+ struct basic_invalidation_guarantee
+ { };
+
+ // Signifies an invalidation guarantee that includes all those of
+ // its base, and additionally, that any point-type iterator,
+ // pointer, or reference to a container object's mapped value type
+ // is valid as long as its corresponding entry has not be erased,
+ // regardless of modifications to the container object.
+ struct point_invalidation_guarantee : public basic_invalidation_guarantee
+ { };
+
+ // Signifies an invalidation guarantee that includes all those of
+ // its base, and additionally, that any range-type iterator
+ // (including the returns of begin() and end()) is in the correct
+ // relative positions to other range-type iterators as long as its
+ // corresponding entry has not be erased, regardless of
+ // modifications to the container object.
+ struct range_invalidation_guarantee : public point_invalidation_guarantee
+ { };
+
+
+ /// A mapped-policy indicating that an associative container is a set.
+ // XXX should this be a trait of the form is_set<T> ??
+ struct null_mapped_type { };
+
+
+ /// Base data structure tag.
+ struct container_tag
+ { };
+
+ /// Basic string container, inclusive of strings, ropes, etc.
+ struct string_tag : public container_tag { };
+
+ /// Basic sequence.
+ struct sequence_tag : public container_tag { };
+
+ /// Basic associative-container.
+ struct associative_container_tag : public container_tag { };
+
+ /// Basic hash.
+ struct basic_hash_tag : public associative_container_tag { };
+
+ /// Collision-chaining hash.
+ struct cc_hash_tag : public basic_hash_tag { };
+
+ /// General-probing hash.
+ struct gp_hash_tag : public basic_hash_tag { };
+
+ /// Basic tree.
+ struct basic_tree_tag : public associative_container_tag { };
+
+ /// tree.
+ struct tree_tag : public basic_tree_tag { };
+
+ /// Red-black tree.
+ struct rb_tree_tag : public tree_tag { };
+
+ /// Splay tree.
+ struct splay_tree_tag : public tree_tag { };
+
+ /// Ordered-vector tree.
+ struct ov_tree_tag : public tree_tag { };
+
+ /// trie.
+ struct trie_tag : public basic_tree_tag { };
+
+ /// PATRICIA trie.
+ struct pat_trie_tag : public trie_tag { };
+
+ /// List-update.
+ struct list_update_tag : public associative_container_tag { };
+
+ /// Basic priority-queue.
+ struct priority_queue_tag : public container_tag { };
+
+ /// Pairing-heap.
+ struct pairing_heap_tag : public priority_queue_tag { };
+
+ /// Binomial-heap.
+ struct binomial_heap_tag : public priority_queue_tag { };
+
+ /// Redundant-counter binomial-heap.
+ struct rc_binomial_heap_tag : public priority_queue_tag { };
+
+ /// Binary-heap (array-based).
+ struct binary_heap_tag : public priority_queue_tag { };
+
+ /// Thin heap.
+ struct thin_heap_tag : public priority_queue_tag { };
+
+
+ /// Base traits type for containers.
+ template<typename Tag>
+ struct container_traits_base;
+
+ template<>
+ struct container_traits_base<cc_hash_tag>
+ {
+ typedef cc_hash_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<gp_hash_tag>
+ {
+ typedef gp_hash_tag container_category;
+ typedef basic_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<rb_tree_tag>
+ {
+ typedef rb_tree_tag container_category;
+ typedef range_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = true,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = true
+ };
+ };
+
+ template<>
+ struct container_traits_base<splay_tree_tag>
+ {
+ typedef splay_tree_tag container_category;
+ typedef range_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = true,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = true
+ };
+ };
+
+ template<>
+ struct container_traits_base<ov_tree_tag>
+ {
+ typedef ov_tree_tag container_category;
+ typedef basic_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = true,
+ erase_can_throw = true,
+ split_join_can_throw = true,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<pat_trie_tag>
+ {
+ typedef pat_trie_tag container_category;
+ typedef range_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = true,
+ erase_can_throw = false,
+ split_join_can_throw = true,
+ reverse_iteration = true
+ };
+ };
+
+ template<>
+ struct container_traits_base<list_update_tag>
+ {
+ typedef list_update_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+
+ template<>
+ struct container_traits_base<pairing_heap_tag>
+ {
+ typedef pairing_heap_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<thin_heap_tag>
+ {
+ typedef thin_heap_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<binomial_heap_tag>
+ {
+ typedef binomial_heap_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<rc_binomial_heap_tag>
+ {
+ typedef rc_binomial_heap_tag container_category;
+ typedef point_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = false,
+ reverse_iteration = false
+ };
+ };
+
+ template<>
+ struct container_traits_base<binary_heap_tag>
+ {
+ typedef binary_heap_tag container_category;
+ typedef basic_invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = false,
+ erase_can_throw = false,
+ split_join_can_throw = true,
+ reverse_iteration = false
+ };
+ };
+
+
+ /// container_traits
+ // See Matt Austern for the name, S. Meyers MEFC++ #2, others.
+ template<typename Cntnr>
+ struct container_traits
+ : public container_traits_base<typename Cntnr::container_category>
+ {
+ typedef Cntnr container_type;
+ typedef typename Cntnr::container_category container_category;
+ typedef container_traits_base<container_category> base_type;
+ typedef typename base_type::invalidation_guarantee invalidation_guarantee;
+
+ enum
+ {
+ order_preserving = base_type::order_preserving,
+ erase_can_throw = base_type::erase_can_throw,
+ split_join_can_throw = base_type::split_join_can_throw,
+ reverse_iteration = base_type::reverse_iteration
+ };
+ };
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tree_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tree_policy.hpp
new file mode 100644
index 0000000..990860e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/tree_policy.hpp
@@ -0,0 +1,162 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file tree_policy.hpp
+ * Contains tree-related policies.
+ */
+
+#ifndef PB_DS_TREE_POLICY_HPP
+#define PB_DS_TREE_POLICY_HPP
+
+#include <iterator>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp>
+
+namespace __gnu_pbds
+{
+ // A null node updator, indicating that no node updates are required.
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename Cmp_Fn,
+ typename Allocator>
+ struct null_tree_node_update
+ { };
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Const_Node_Iterator, class Node_Iterator, class Cmp_Fn, class Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ tree_order_statistics_node_update<Const_Node_Iterator, Node_Iterator, Cmp_Fn, Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ detail::basic_tree_policy_base<Const_Node_Iterator, Node_Iterator, Allocator>
+
+ // Functor updating ranks of entrees.
+ template<typename Const_Node_Iterator, typename Node_Iterator,
+ typename Cmp_Fn, typename Allocator>
+ class tree_order_statistics_node_update : private PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef Cmp_Fn cmp_fn;
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::const_key_reference const_key_reference;
+
+ typedef size_type metadata_type;
+ typedef Const_Node_Iterator const_node_iterator;
+ typedef Node_Iterator node_iterator;
+ typedef typename const_node_iterator::value_type const_iterator;
+ typedef typename node_iterator::value_type iterator;
+
+ // Finds an entry by __order. Returns a const_iterator to the
+ // entry with the __order order, or a const_iterator to the
+ // container object's end if order is at least the size of the
+ // container object.
+ inline const_iterator
+ find_by_order(size_type order) const;
+
+ // Finds an entry by __order. Returns an iterator to the entry
+ // with the __order order, or an iterator to the container
+ // object's end if order is at least the size of the container
+ // object.
+ inline iterator
+ find_by_order(size_type order);
+
+ // Returns the order of a key within a sequence. For exapmle, if
+ // r_key is the smallest key, this method will return 0; if r_key
+ // is a key between the smallest and next key, this method will
+ // return 1; if r_key is a key larger than the largest key, this
+ // method will return the size of r_c.
+ inline size_type
+ order_of_key(const_key_reference r_key) const;
+
+ private:
+ // Const reference to the container's value-type.
+ typedef typename base_type::const_reference const_reference;
+
+ // Const pointer to the container's value-type.
+ typedef typename base_type::const_pointer const_pointer;
+
+ typedef typename allocator_type::template rebind<metadata_type>::other metadata_rebind;
+ // Const metadata reference.
+ typedef typename metadata_rebind::const_reference const_metadata_reference;
+
+ // Metadata reference.
+ typedef typename metadata_rebind::reference metadata_reference;
+
+ // Returns the const_node_iterator associated with the tree's root node.
+ virtual const_node_iterator
+ node_begin() const = 0;
+
+ // Returns the node_iterator associated with the tree's root node.
+ virtual node_iterator
+ node_begin() = 0;
+
+ // Returns the const_node_iterator associated with a just-after leaf node.
+ virtual const_node_iterator
+ node_end() const = 0;
+
+ // Returns the node_iterator associated with a just-after leaf node.
+ virtual node_iterator
+ node_end() = 0;
+
+ // Access to the cmp_fn object.
+ virtual cmp_fn&
+ get_cmp_fn() = 0;
+
+ protected:
+ // Updates the rank of a node through a node_iterator node_it;
+ // end_nd_it is the end node iterator.
+ inline void
+ operator()(node_iterator node_it, const_node_iterator end_nd_it) const;
+
+ virtual
+ ~tree_order_statistics_node_update();
+ };
+
+#include <ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/trie_policy.hpp b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/trie_policy.hpp
new file mode 100644
index 0000000..c10591b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pb_ds/trie_policy.hpp
@@ -0,0 +1,355 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/**
+ * @file trie_policy.hpp
+ * Contains trie-related policies.
+ */
+
+#ifndef PB_DS_TRIE_POLICY_HPP
+#define PB_DS_TRIE_POLICY_HPP
+
+#include <string>
+#include <ext/pb_ds/detail/type_utils.hpp>
+#include <ext/pb_ds/detail/trie_policy/trie_policy_base.hpp>
+
+namespace __gnu_pbds
+{
+ // A null node updator, indicating that no node updates are required.
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename E_Access_Traits,
+ typename Allocator>
+ struct null_trie_node_update
+ { };
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename String, typename String::value_type Min_E_Val, typename String::value_type Max_E_Val, bool Reverse, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ string_trie_e_access_traits<String, Min_E_Val,Max_E_Val,Reverse,Allocator>
+
+ // Element access traits for string types.
+ template<typename String = std::string,
+ typename String::value_type Min_E_Val = detail::__numeric_traits<typename String::value_type>::__min,
+ typename String::value_type Max_E_Val = detail::__numeric_traits<typename String::value_type>::__max,
+ bool Reverse = false,
+ typename Allocator = std::allocator<char> >
+ struct string_trie_e_access_traits
+ {
+ public:
+ typedef typename Allocator::size_type size_type;
+ typedef String key_type;
+ typedef typename Allocator::template rebind<key_type>::other key_rebind;
+ typedef typename key_rebind::const_reference const_key_reference;
+
+ enum
+ {
+ reverse = Reverse
+ };
+
+ // Element const iterator type.
+ typedef typename detail::__conditional_type<Reverse, typename String::const_reverse_iterator, typename String::const_iterator>::__type const_iterator;
+
+ // Element type.
+ typedef typename std::iterator_traits<const_iterator>::value_type e_type;
+
+ enum
+ {
+ min_e_val = Min_E_Val,
+ max_e_val = Max_E_Val,
+ max_size = max_e_val - min_e_val + 1
+ };
+ PB_DS_STATIC_ASSERT(min_max_size, max_size >= 2);
+
+ // Returns a const_iterator to the first element of
+ // const_key_reference agumnet.
+ inline static const_iterator
+ begin(const_key_reference);
+
+ // Returns a const_iterator to the after-last element of
+ // const_key_reference argument.
+ inline static const_iterator
+ end(const_key_reference);
+
+ // Maps an element to a position.
+ inline static size_type
+ e_pos(e_type e);
+
+ private:
+
+ inline static const_iterator
+ begin_imp(const_key_reference, detail::false_type);
+
+ inline static const_iterator
+ begin_imp(const_key_reference, detail::true_type);
+
+ inline static const_iterator
+ end_imp(const_key_reference, detail::false_type);
+
+ inline static const_iterator
+ end_imp(const_key_reference, detail::true_type);
+
+ static detail::integral_constant<int, Reverse> s_rev_ind;
+ };
+
+#include <ext/pb_ds/detail/trie_policy/string_trie_e_access_traits_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_T_DEC \
+ template<typename Const_Node_Iterator,typename Node_Iterator,class E_Access_Traits, typename Allocator>
+
+#define PB_DS_CLASS_C_DEC \
+ trie_prefix_search_node_update<Const_Node_Iterator, Node_Iterator, E_Access_Traits,Allocator>
+
+#define PB_DS_BASE_C_DEC \
+ detail::trie_policy_base<Const_Node_Iterator,Node_Iterator,E_Access_Traits, Allocator>
+
+ // A node updator that allows tries to be searched for the range of
+ // values that match a certain prefix.
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename E_Access_Traits,
+ typename Allocator>
+ class trie_prefix_search_node_update : private PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::const_key_reference const_key_reference;
+
+ // Element access traits.
+ typedef E_Access_Traits e_access_traits;
+
+ // Const element iterator.
+ typedef typename e_access_traits::const_iterator const_e_iterator;
+
+ // Allocator type.
+ typedef Allocator allocator_type;
+
+ // Size type.
+ typedef typename allocator_type::size_type size_type;
+ typedef detail::null_node_metadata metadata_type;
+ typedef Const_Node_Iterator const_node_iterator;
+ typedef Node_Iterator node_iterator;
+ typedef typename const_node_iterator::value_type const_iterator;
+ typedef typename node_iterator::value_type iterator;
+
+ // Finds the const iterator range corresponding to all values
+ // whose prefixes match r_key.
+ std::pair<const_iterator, const_iterator>
+ prefix_range(const_key_reference) const;
+
+ // Finds the iterator range corresponding to all values whose
+ // prefixes match r_key.
+ std::pair<iterator, iterator>
+ prefix_range(const_key_reference);
+
+ // Finds the const iterator range corresponding to all values
+ // whose prefixes match [b, e).
+ std::pair<const_iterator, const_iterator>
+ prefix_range(const_e_iterator, const_e_iterator) const;
+
+ // Finds the iterator range corresponding to all values whose
+ // prefixes match [b, e).
+ std::pair<iterator, iterator>
+ prefix_range(const_e_iterator, const_e_iterator);
+
+ protected:
+ // Called to update a node's metadata.
+ inline void
+ operator()(node_iterator node_it, const_node_iterator end_nd_it) const;
+
+ private:
+ // Returns the const iterator associated with the just-after last element.
+ virtual const_iterator
+ end() const = 0;
+
+ // Returns the iterator associated with the just-after last element.
+ virtual iterator
+ end() = 0;
+
+ // Returns the const_node_iterator associated with the trie's root node.
+ virtual const_node_iterator
+ node_begin() const = 0;
+
+ // Returns the node_iterator associated with the trie's root node.
+ virtual node_iterator
+ node_begin() = 0;
+
+ // Returns the const_node_iterator associated with a just-after leaf node.
+ virtual const_node_iterator
+ node_end() const = 0;
+
+ // Returns the node_iterator associated with a just-after leaf node.
+ virtual node_iterator
+ node_end() = 0;
+
+ // Access to the cmp_fn object.
+ virtual const e_access_traits&
+ get_e_access_traits() const = 0;
+
+ node_iterator
+ next_child(node_iterator, const_e_iterator, const_e_iterator,
+ node_iterator, const e_access_traits&);
+ };
+
+#include <ext/pb_ds/detail/trie_policy/prefix_search_node_update_imp.hpp>
+
+#undef PB_DS_CLASS_C_DEC
+
+#define PB_DS_CLASS_C_DEC \
+ trie_order_statistics_node_update<Const_Node_Iterator, Node_Iterator,E_Access_Traits, Allocator>
+
+ // Functor updating ranks of entrees.
+ template<typename Const_Node_Iterator,
+ typename Node_Iterator,
+ typename E_Access_Traits,
+ typename Allocator>
+ class trie_order_statistics_node_update : private PB_DS_BASE_C_DEC
+ {
+ private:
+ typedef PB_DS_BASE_C_DEC base_type;
+
+ public:
+ typedef E_Access_Traits e_access_traits;
+ typedef typename e_access_traits::const_iterator const_e_iterator;
+ typedef Allocator allocator_type;
+ typedef typename allocator_type::size_type size_type;
+ typedef typename base_type::key_type key_type;
+ typedef typename base_type::const_key_reference const_key_reference;
+
+ typedef size_type metadata_type;
+ typedef Const_Node_Iterator const_node_iterator;
+ typedef Node_Iterator node_iterator;
+ typedef typename const_node_iterator::value_type const_iterator;
+ typedef typename node_iterator::value_type iterator;
+
+ // Finds an entry by __order. Returns a const_iterator to the
+ // entry with the __order order, or a const_iterator to the
+ // container object's end if order is at least the size of the
+ // container object.
+ inline const_iterator
+ find_by_order(size_type) const;
+
+ // Finds an entry by __order. Returns an iterator to the entry
+ // with the __order order, or an iterator to the container
+ // object's end if order is at least the size of the container
+ // object.
+ inline iterator
+ find_by_order(size_type);
+
+ // Returns the order of a key within a sequence. For exapmle, if
+ // r_key is the smallest key, this method will return 0; if r_key
+ // is a key between the smallest and next key, this method will
+ // return 1; if r_key is a key larger than the largest key, this
+ // method will return the size of r_c.
+ inline size_type
+ order_of_key(const_key_reference) const;
+
+ // Returns the order of a prefix within a sequence. For exapmle,
+ // if [b, e] is the smallest prefix, this method will return 0; if
+ // r_key is a key between the smallest and next key, this method
+ // will return 1; if r_key is a key larger than the largest key,
+ // this method will return the size of r_c.
+ inline size_type
+ order_of_prefix(const_e_iterator, const_e_iterator) const;
+
+ private:
+ typedef typename base_type::const_reference const_reference;
+ typedef typename base_type::const_pointer const_pointer;
+
+ typedef typename Allocator::template rebind<metadata_type>::other metadata_rebind;
+ typedef typename metadata_rebind::const_reference const_metadata_reference;
+ typedef typename metadata_rebind::reference metadata_reference;
+
+ // Returns true if the container is empty.
+ virtual bool
+ empty() const = 0;
+
+ // Returns the iterator associated with the trie's first element.
+ virtual iterator
+ begin() = 0;
+
+ // Returns the iterator associated with the trie's
+ // just-after-last element.
+ virtual iterator
+ end() = 0;
+
+ // Returns the const_node_iterator associated with the trie's root node.
+ virtual const_node_iterator
+ node_begin() const = 0;
+
+ // Returns the node_iterator associated with the trie's root node.
+ virtual node_iterator
+ node_begin() = 0;
+
+ // Returns the const_node_iterator associated with a just-after
+ // leaf node.
+ virtual const_node_iterator
+ node_end() const = 0;
+
+ // Returns the node_iterator associated with a just-after leaf node.
+ virtual node_iterator
+ node_end() = 0;
+
+ // Access to the cmp_fn object.
+ virtual e_access_traits&
+ get_e_access_traits() = 0;
+
+ protected:
+ // Updates the rank of a node through a node_iterator node_it;
+ // end_nd_it is the end node iterator.
+ inline void
+ operator()(node_iterator, const_node_iterator) const;
+
+ // Destructor.
+ virtual
+ ~trie_order_statistics_node_update();
+ };
+
+#include <ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp>
+
+#undef PB_DS_CLASS_T_DEC
+#undef PB_DS_CLASS_C_DEC
+#undef PB_DS_BASE_C_DEC
+
+} // namespace __gnu_pbds
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pod_char_traits.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pod_char_traits.h
new file mode 100644
index 0000000..2797c1b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pod_char_traits.h
@@ -0,0 +1,182 @@
+// POD character, std::char_traits specialization -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/pod_char_traits.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+// Gabriel Dos Reis <gdr@integrable-solutions.net>
+// Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _POD_CHAR_TRAITS_H
+#define _POD_CHAR_TRAITS_H 1
+
+#include <string>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // POD character abstraction.
+ // NB: The char_type parameter is a subset of int_type, as to allow
+ // int_type to properly hold the full range of char_type values as
+ // well as EOF.
+ /// @brief A POD class that serves as a character abstraction class.
+ template<typename V, typename I, typename S = std::mbstate_t>
+ struct character
+ {
+ typedef V value_type;
+ typedef I int_type;
+ typedef S state_type;
+ typedef character<V, I, S> char_type;
+
+ value_type value;
+
+ template<typename V2>
+ static char_type
+ from(const V2& v)
+ {
+ char_type ret = { static_cast<value_type>(v) };
+ return ret;
+ }
+
+ template<typename V2>
+ static V2
+ to(const char_type& c)
+ {
+ V2 ret = { static_cast<V2>(c.value) };
+ return ret;
+ }
+
+ };
+
+ template<typename V, typename I, typename S>
+ inline bool
+ operator==(const character<V, I, S>& lhs, const character<V, I, S>& rhs)
+ { return lhs.value == rhs.value; }
+
+ template<typename V, typename I, typename S>
+ inline bool
+ operator<(const character<V, I, S>& lhs, const character<V, I, S>& rhs)
+ { return lhs.value < rhs.value; }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// char_traits<__gnu_cxx::character> specialization.
+ template<typename V, typename I, typename S>
+ struct char_traits<__gnu_cxx::character<V, I, S> >
+ {
+ typedef __gnu_cxx::character<V, I, S> char_type;
+ typedef typename char_type::int_type int_type;
+ typedef typename char_type::state_type state_type;
+ typedef fpos<state_type> pos_type;
+ typedef streamoff off_type;
+
+ static void
+ assign(char_type& __c1, const char_type& __c2)
+ { __c1 = __c2; }
+
+ static bool
+ eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+
+ static bool
+ lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int
+ compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (!eq(__s1[__i], __s2[__i]))
+ return lt(__s1[__i], __s2[__i]) ? -1 : 1;
+ return 0;
+ }
+
+ static size_t
+ length(const char_type* __s)
+ {
+ const char_type* __p = __s;
+ while (__p->value)
+ ++__p;
+ return (__p - __s);
+ }
+
+ static const char_type*
+ find(const char_type* __s, size_t __n, const char_type& __a)
+ {
+ for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
+ if (*__p == __a)
+ return __p;
+ return 0;
+ }
+
+ static char_type*
+ move(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ return static_cast<char_type*>
+ (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)));
+ }
+
+ static char_type*
+ copy(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ std::copy(__s2, __s2 + __n, __s1);
+ return __s1;
+ }
+
+ static char_type*
+ assign(char_type* __s, size_t __n, char_type __a)
+ {
+ std::fill_n(__s, __n, __a);
+ return __s;
+ }
+
+ static char_type
+ to_char_type(const int_type& __i)
+ { return char_type::template from(__i); }
+
+ static int_type
+ to_int_type(const char_type& __c)
+ { return char_type::template to<int_type>(__c); }
+
+ static bool
+ eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type
+ eof()
+ {
+ int_type __r = { -1 };
+ return __r;
+ }
+
+ static int_type
+ not_eof(const int_type& __c)
+ { return eq_int_type(__c, eof()) ? int_type() : __c; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pointer.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pointer.h
new file mode 100644
index 0000000..5aac7f1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pointer.h
@@ -0,0 +1,551 @@
+// Custom pointer adapter and sample storage policies
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file ext/pointer.h
+ * @author Bob Walters
+ *
+ * Provides reusable _Pointer_adapter for assisting in the development of
+ * custom pointer types that can be used with the standard containers via
+ * the allocator::pointer and allocator::const_pointer typedefs.
+ */
+
+#ifndef _POINTER_H
+#define _POINTER_H 1
+
+#include <iosfwd>
+#include <bits/stl_iterator_base_types.h>
+#include <ext/cast.h>
+#include <ext/type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @brief A storage policy for use with _Pointer_adapter<> which yields a
+ * standard pointer.
+ *
+ * A _Storage_policy is required to provide 4 things:
+ * 1) A get() API for returning the stored pointer value.
+ * 2) An set() API for storing a pointer value.
+ * 3) An element_type typedef to define the type this points to.
+ * 4) An operator<() to support pointer comparison.
+ * 5) An operator==() to support pointer comparison.
+ */
+ template<typename _Tp>
+ class _Std_pointer_impl
+ {
+ public:
+ // the type this pointer points to.
+ typedef _Tp element_type;
+
+ // A method to fetch the pointer value as a standard T* value;
+ inline _Tp*
+ get() const
+ { return _M_value; }
+
+ // A method to set the pointer value, from a standard T* value;
+ inline void
+ set(element_type* __arg)
+ { _M_value = __arg; }
+
+ // Comparison of pointers
+ inline bool
+ operator<(const _Std_pointer_impl& __rarg) const
+ { return (_M_value < __rarg._M_value); }
+
+ inline bool
+ operator==(const _Std_pointer_impl& __rarg) const
+ { return (_M_value == __rarg._M_value); }
+
+ private:
+ element_type* _M_value;
+ };
+
+ /**
+ * @brief A storage policy for use with _Pointer_adapter<> which stores
+ * the pointer's address as an offset value which is relative to
+ * its own address.
+ *
+ * This is intended for pointers
+ * within shared memory regions which might be mapped at different
+ * addresses by different processes. For null pointers, a value of 1 is
+ * used. (0 is legitimate sometimes for nodes in circularly linked lists)
+ * This value was chosen as the least likely to generate an incorrect null,
+ * As there is no reason why any normal pointer would point 1 byte into
+ * its own pointer address.
+ */
+ template<typename _Tp>
+ class _Relative_pointer_impl
+ {
+ public:
+ typedef _Tp element_type;
+
+ _Tp*
+ get() const
+ {
+ if (_M_diff == 1)
+ return 0;
+ else
+ return reinterpret_cast<_Tp*>(reinterpret_cast<_UIntPtrType>(this)
+ + _M_diff);
+ }
+
+ void
+ set(_Tp* __arg)
+ {
+ if (!__arg)
+ _M_diff = 1;
+ else
+ _M_diff = reinterpret_cast<_UIntPtrType>(__arg)
+ - reinterpret_cast<_UIntPtrType>(this);
+ }
+
+ // Comparison of pointers
+ inline bool
+ operator<(const _Relative_pointer_impl& __rarg) const
+ { return (reinterpret_cast<_UIntPtrType>(this->get())
+ < reinterpret_cast<_UIntPtrType>(__rarg.get())); }
+
+ inline bool
+ operator==(const _Relative_pointer_impl& __rarg) const
+ { return (reinterpret_cast<_UIntPtrType>(this->get())
+ == reinterpret_cast<_UIntPtrType>(__rarg.get())); }
+
+ private:
+ typedef __gnu_cxx::__conditional_type<
+ (sizeof(unsigned long) >= sizeof(void*)),
+ unsigned long, unsigned long long>::__type _UIntPtrType;
+ _UIntPtrType _M_diff;
+ };
+
+ /**
+ * Relative_pointer_impl needs a specialization for const T because of
+ * the casting done during pointer arithmetic.
+ */
+ template<typename _Tp>
+ class _Relative_pointer_impl<const _Tp>
+ {
+ public:
+ typedef const _Tp element_type;
+
+ const _Tp*
+ get() const
+ {
+ if (_M_diff == 1)
+ return 0;
+ else
+ return reinterpret_cast<const _Tp*>
+ (reinterpret_cast<_UIntPtrType>(this) + _M_diff);
+ }
+
+ void
+ set(const _Tp* __arg)
+ {
+ if (!__arg)
+ _M_diff = 1;
+ else
+ _M_diff = reinterpret_cast<_UIntPtrType>(__arg)
+ - reinterpret_cast<_UIntPtrType>(this);
+ }
+
+ // Comparison of pointers
+ inline bool
+ operator<(const _Relative_pointer_impl& __rarg) const
+ { return (reinterpret_cast<_UIntPtrType>(this->get())
+ < reinterpret_cast<_UIntPtrType>(__rarg.get())); }
+
+ inline bool
+ operator==(const _Relative_pointer_impl& __rarg) const
+ { return (reinterpret_cast<_UIntPtrType>(this->get())
+ == reinterpret_cast<_UIntPtrType>(__rarg.get())); }
+
+ private:
+ typedef __gnu_cxx::__conditional_type
+ <(sizeof(unsigned long) >= sizeof(void*)),
+ unsigned long, unsigned long long>::__type _UIntPtrType;
+ _UIntPtrType _M_diff;
+ };
+
+ /**
+ * The specialization on this type helps resolve the problem of
+ * reference to void, and eliminates the need to specialize _Pointer_adapter
+ * for cases of void*, const void*, and so on.
+ */
+ struct _Invalid_type { };
+
+ template<typename _Tp>
+ struct _Reference_type
+ { typedef _Tp& reference; };
+
+ template<>
+ struct _Reference_type<void>
+ { typedef _Invalid_type& reference; };
+
+ template<>
+ struct _Reference_type<const void>
+ { typedef const _Invalid_type& reference; };
+
+ template<>
+ struct _Reference_type<volatile void>
+ { typedef volatile _Invalid_type& reference; };
+
+ template<>
+ struct _Reference_type<volatile const void>
+ { typedef const volatile _Invalid_type& reference; };
+
+ /**
+ * This structure accomodates the way in which std::iterator_traits<>
+ * is normally specialized for const T*, so that value_type is still T.
+ */
+ template<typename _Tp>
+ struct _Unqualified_type
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct _Unqualified_type<const _Tp>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct _Unqualified_type<volatile _Tp>
+ { typedef volatile _Tp type; };
+
+ template<typename _Tp>
+ struct _Unqualified_type<volatile const _Tp>
+ { typedef volatile _Tp type; };
+
+ /**
+ * The following provides an 'alternative pointer' that works with the
+ * containers when specified as the pointer typedef of the allocator.
+ *
+ * The pointer type used with the containers doesn't have to be this class,
+ * but it must support the implicit conversions, pointer arithmetic,
+ * comparison operators, etc. that are supported by this class, and avoid
+ * raising compile-time ambiguities. Because creating a working pointer can
+ * be challenging, this pointer template was designed to wrapper an
+ * easier storage policy type, so that it becomes reusable for creating
+ * other pointer types.
+ *
+ * A key point of this class is also that it allows container writers to
+ * 'assume' Alocator::pointer is a typedef for a normal pointer. This class
+ * supports most of the conventions of a true pointer, and can, for instance
+ * handle implicit conversion to const and base class pointer types. The
+ * only impositions on container writers to support extended pointers are:
+ * 1) use the Allocator::pointer typedef appropriately for pointer types.
+ * 2) if you need pointer casting, use the __pointer_cast<> functions
+ * from ext/cast.h. This allows pointer cast operations to be overloaded
+ * is necessary by custom pointers.
+ *
+ * Note: The const qualifier works with this pointer adapter as follows:
+ *
+ * _Tp* == _Pointer_adapter<_Std_pointer_impl<_Tp> >;
+ * const _Tp* == _Pointer_adapter<_Std_pointer_impl<const _Tp> >;
+ * _Tp* const == const _Pointer_adapter<_Std_pointer_impl<_Tp> >;
+ * const _Tp* const == const _Pointer_adapter<_Std_pointer_impl<const _Tp> >;
+ */
+ template<typename _Storage_policy>
+ class _Pointer_adapter : public _Storage_policy
+ {
+ public:
+ typedef typename _Storage_policy::element_type element_type;
+
+ // These are needed for iterator_traits
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef typename _Unqualified_type<element_type>::type value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef _Pointer_adapter pointer;
+ typedef typename _Reference_type<element_type>::reference reference;
+
+ // Reminder: 'const' methods mean that the method is valid when the
+ // pointer is immutable, and has nothing to do with whether the
+ // 'pointee' is const.
+
+ // Default Constructor (Convert from element_type*)
+ _Pointer_adapter(element_type* __arg = 0)
+ { _Storage_policy::set(__arg); }
+
+ // Copy constructor from _Pointer_adapter of same type.
+ _Pointer_adapter(const _Pointer_adapter& __arg)
+ { _Storage_policy::set(__arg.get()); }
+
+ // Convert from _Up* if conversion to element_type* is valid.
+ template<typename _Up>
+ _Pointer_adapter(_Up* __arg)
+ { _Storage_policy::set(__arg); }
+
+ // Conversion from another _Pointer_adapter if _Up if static cast is
+ // valid.
+ template<typename _Up>
+ _Pointer_adapter(const _Pointer_adapter<_Up>& __arg)
+ { _Storage_policy::set(__arg.get()); }
+
+ // Destructor
+ ~_Pointer_adapter() { }
+
+ // Assignment operator
+ _Pointer_adapter&
+ operator=(const _Pointer_adapter& __arg)
+ {
+ _Storage_policy::set(__arg.get());
+ return *this;
+ }
+
+ template<typename _Up>
+ _Pointer_adapter&
+ operator=(const _Pointer_adapter<_Up>& __arg)
+ {
+ _Storage_policy::set(__arg.get());
+ return *this;
+ }
+
+ template<typename _Up>
+ _Pointer_adapter&
+ operator=(_Up* __arg)
+ {
+ _Storage_policy::set(__arg);
+ return *this;
+ }
+
+ // Operator*, returns element_type&
+ inline reference
+ operator*() const
+ { return *(_Storage_policy::get()); }
+
+ // Operator->, returns element_type*
+ inline element_type*
+ operator->() const
+ { return _Storage_policy::get(); }
+
+ // Operator[], returns a element_type& to the item at that loc.
+ inline reference
+ operator[](std::ptrdiff_t __index) const
+ { return _Storage_policy::get()[__index]; }
+
+ // To allow implicit conversion to "bool", for "if (ptr)..."
+ private:
+ typedef element_type*(_Pointer_adapter::*__unspecified_bool_type)() const;
+
+ public:
+ operator __unspecified_bool_type() const
+ {
+ return _Storage_policy::get() == 0 ? 0 :
+ &_Pointer_adapter::operator->;
+ }
+
+ // ! operator (for: if (!ptr)...)
+ inline bool
+ operator!() const
+ { return (_Storage_policy::get() == 0); }
+
+ // Pointer differences
+ inline friend std::ptrdiff_t
+ operator-(const _Pointer_adapter& __lhs, element_type* __rhs)
+ { return (__lhs.get() - __rhs); }
+
+ inline friend std::ptrdiff_t
+ operator-(element_type* __lhs, const _Pointer_adapter& __rhs)
+ { return (__lhs - __rhs.get()); }
+
+ template<typename _Up>
+ inline friend std::ptrdiff_t
+ operator-(const _Pointer_adapter& __lhs, _Up* __rhs)
+ { return (__lhs.get() - __rhs); }
+
+ template<typename _Up>
+ inline friend std::ptrdiff_t
+ operator-(_Up* __lhs, const _Pointer_adapter& __rhs)
+ { return (__lhs - __rhs.get()); }
+
+ template<typename _Up>
+ inline std::ptrdiff_t
+ operator-(const _Pointer_adapter<_Up>& __rhs) const
+ { return (_Storage_policy::get() - __rhs.get()); }
+
+ // Pointer math
+ // Note: There is a reason for all this overloading based on different
+ // integer types. In some libstdc++-v3 test cases, a templated
+ // operator+ is declared which can match any types. This operator
+ // tends to "steal" the recognition of _Pointer_adapter's own operator+
+ // unless the integer type matches perfectly.
+
+#define _CXX_POINTER_ARITH_OPERATOR_SET(INT_TYPE) \
+ inline friend _Pointer_adapter \
+ operator+(const _Pointer_adapter& __lhs, INT_TYPE __offset) \
+ { return _Pointer_adapter(__lhs.get() + __offset); } \
+\
+ inline friend _Pointer_adapter \
+ operator+(INT_TYPE __offset, const _Pointer_adapter& __rhs) \
+ { return _Pointer_adapter(__rhs.get() + __offset); } \
+\
+ inline friend _Pointer_adapter \
+ operator-(const _Pointer_adapter& __lhs, INT_TYPE __offset) \
+ { return _Pointer_adapter(__lhs.get() - __offset); } \
+\
+ inline _Pointer_adapter& \
+ operator+=(INT_TYPE __offset) \
+ { \
+ _Storage_policy::set(_Storage_policy::get() + __offset); \
+ return *this; \
+ } \
+\
+ inline _Pointer_adapter& \
+ operator-=(INT_TYPE __offset) \
+ { \
+ _Storage_policy::set(_Storage_policy::get() - __offset); \
+ return *this; \
+ } \
+// END of _CXX_POINTER_ARITH_OPERATOR_SET macro
+
+ // Expand into the various pointer arithmatic operators needed.
+ _CXX_POINTER_ARITH_OPERATOR_SET(short);
+ _CXX_POINTER_ARITH_OPERATOR_SET(unsigned short);
+ _CXX_POINTER_ARITH_OPERATOR_SET(int);
+ _CXX_POINTER_ARITH_OPERATOR_SET(unsigned int);
+ _CXX_POINTER_ARITH_OPERATOR_SET(long);
+ _CXX_POINTER_ARITH_OPERATOR_SET(unsigned long);
+
+ // Mathematical Manipulators
+ inline _Pointer_adapter&
+ operator++()
+ {
+ _Storage_policy::set(_Storage_policy::get() + 1);
+ return *this;
+ }
+
+ inline _Pointer_adapter
+ operator++(int __unused)
+ {
+ _Pointer_adapter tmp(*this);
+ _Storage_policy::set(_Storage_policy::get() + 1);
+ return tmp;
+ }
+
+ inline _Pointer_adapter&
+ operator--()
+ {
+ _Storage_policy::set(_Storage_policy::get() - 1);
+ return *this;
+ }
+
+ inline _Pointer_adapter
+ operator--(int)
+ {
+ _Pointer_adapter tmp(*this);
+ _Storage_policy::set(_Storage_policy::get() - 1);
+ return tmp;
+ }
+
+ }; // class _Pointer_adapter
+
+
+#define _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(OPERATOR,BLANK) \
+ template<typename _Tp1, typename _Tp2> \
+ inline bool \
+ operator OPERATOR##BLANK (const _Pointer_adapter<_Tp1>& __lhs, _Tp2 __rhs) \
+ { return __lhs.get() OPERATOR##BLANK __rhs; } \
+\
+ template<typename _Tp1, typename _Tp2> \
+ inline bool \
+ operator OPERATOR##BLANK (_Tp1 __lhs, const _Pointer_adapter<_Tp2>& __rhs) \
+ { return __lhs OPERATOR##BLANK __rhs.get(); } \
+\
+ template<typename _Tp1, typename _Tp2> \
+ inline bool \
+ operator OPERATOR##BLANK (const _Pointer_adapter<_Tp1>& __lhs, \
+ const _Pointer_adapter<_Tp2>& __rhs) \
+ { return __lhs.get() OPERATOR##BLANK __rhs.get(); } \
+\
+// End GCC_CXX_POINTER_COMPARISON_OPERATION_SET Macro
+
+ // Expand into the various comparison operators needed.
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(==,);
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(!=,);
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<,);
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(<=,);
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>,);
+ _GCC_CXX_POINTER_COMPARISON_OPERATION_SET(>=,);
+
+ // These are here for expressions like "ptr == 0", "ptr != 0"
+ template<typename _Tp>
+ inline bool
+ operator==(const _Pointer_adapter<_Tp>& __lhs, int __rhs)
+ { return __lhs.get() == reinterpret_cast<void*>(__rhs); }
+
+ template<typename _Tp>
+ inline bool
+ operator==(int __lhs, const _Pointer_adapter<_Tp>& __rhs)
+ { return __rhs.get() == reinterpret_cast<void*>(__lhs); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const _Pointer_adapter<_Tp>& __lhs, int __rhs)
+ { return __lhs.get() != reinterpret_cast<void*>(__rhs); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(int __lhs, const _Pointer_adapter<_Tp>& __rhs)
+ { return __rhs.get() != reinterpret_cast<void*>(__lhs); }
+
+ /**
+ * Comparison operators for _Pointer_adapter defer to the base class'es
+ * comparison operators, when possible.
+ */
+ template<typename _Tp>
+ inline bool
+ operator==(const _Pointer_adapter<_Tp>& __lhs,
+ const _Pointer_adapter<_Tp>& __rhs)
+ { return __lhs._Tp::operator==(__rhs); }
+
+ template<typename _Tp>
+ inline bool
+ operator<=(const _Pointer_adapter<_Tp>& __lhs,
+ const _Pointer_adapter<_Tp>& __rhs)
+ { return __lhs._Tp::operator<(__rhs) || __lhs._Tp::operator==(__rhs); }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const _Pointer_adapter<_Tp>& __lhs,
+ const _Pointer_adapter<_Tp>& __rhs)
+ { return !(__lhs._Tp::operator==(__rhs)); }
+
+ template<typename _Tp>
+ inline bool
+ operator>(const _Pointer_adapter<_Tp>& __lhs,
+ const _Pointer_adapter<_Tp>& __rhs)
+ { return !(__lhs._Tp::operator<(__rhs) || __lhs._Tp::operator==(__rhs)); }
+
+ template<typename _Tp>
+ inline bool
+ operator>=(const _Pointer_adapter<_Tp>& __lhs,
+ const _Pointer_adapter<_Tp>& __rhs)
+ { return !(__lhs._Tp::operator<(__rhs)); }
+
+ template<typename _CharT, typename _Traits, typename _StoreT>
+ inline std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const _Pointer_adapter<_StoreT>& __p)
+ { return (__os << __p.get()); }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _POINTER_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/pool_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pool_allocator.h
new file mode 100644
index 0000000..87d145d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/pool_allocator.h
@@ -0,0 +1,263 @@
+// Allocators -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * 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.
+ */
+
+/** @file ext/pool_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _POOL_ALLOCATOR_H
+#define _POOL_ALLOCATOR_H 1
+
+#include <bits/c++config.h>
+#include <cstdlib>
+#include <new>
+#include <bits/functexcept.h>
+#include <ext/atomicity.h>
+#include <ext/concurrence.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+
+ /**
+ * @brief Base class for __pool_alloc.
+ *
+ * Uses various allocators to fulfill underlying requests (and makes as
+ * few requests as possible when in default high-speed pool mode).
+ *
+ * Important implementation properties:
+ * 0. If globally mandated, then allocate objects from new
+ * 1. If the clients request an object of size > _S_max_bytes, the resulting
+ * object will be obtained directly from new
+ * 2. In all other cases, we allocate an object of size exactly
+ * _S_round_up(requested_size). Thus the client has enough size
+ * information that we can return the object to the proper free list
+ * without permanently losing part of the object.
+ */
+ class __pool_alloc_base
+ {
+ protected:
+
+ enum { _S_align = 8 };
+ enum { _S_max_bytes = 128 };
+ enum { _S_free_list_size = (size_t)_S_max_bytes / (size_t)_S_align };
+
+ union _Obj
+ {
+ union _Obj* _M_free_list_link;
+ char _M_client_data[1]; // The client sees this.
+ };
+
+ static _Obj* volatile _S_free_list[_S_free_list_size];
+
+ // Chunk allocation state.
+ static char* _S_start_free;
+ static char* _S_end_free;
+ static size_t _S_heap_size;
+
+ size_t
+ _M_round_up(size_t __bytes)
+ { return ((__bytes + (size_t)_S_align - 1) & ~((size_t)_S_align - 1)); }
+
+ _Obj* volatile*
+ _M_get_free_list(size_t __bytes);
+
+ __mutex&
+ _M_get_mutex();
+
+ // Returns an object of size __n, and optionally adds to size __n
+ // free list.
+ void*
+ _M_refill(size_t __n);
+
+ // Allocates a chunk for nobjs of size size. nobjs may be reduced
+ // if it is inconvenient to allocate the requested number.
+ char*
+ _M_allocate_chunk(size_t __n, int& __nobjs);
+ };
+
+
+ /**
+ * @brief Allocator using a memory pool with a single lock.
+ * @ingroup allocators
+ */
+ template<typename _Tp>
+ class __pool_alloc : private __pool_alloc_base
+ {
+ private:
+ static _Atomic_word _S_force_new;
+
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+ template<typename _Tp1>
+ struct rebind
+ { typedef __pool_alloc<_Tp1> other; };
+
+ __pool_alloc() throw() { }
+
+ __pool_alloc(const __pool_alloc&) throw() { }
+
+ template<typename _Tp1>
+ __pool_alloc(const __pool_alloc<_Tp1>&) throw() { }
+
+ ~__pool_alloc() throw() { }
+
+ pointer
+ address(reference __x) const { return &__x; }
+
+ const_pointer
+ address(const_reference __x) const { return &__x; }
+
+ size_type
+ max_size() const throw()
+ { return size_t(-1) / sizeof(_Tp); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 402. wrong new expression in [some_] allocator::construct
+ void
+ construct(pointer __p, const _Tp& __val)
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
+
+ void
+ destroy(pointer __p) { __p->~_Tp(); }
+
+ pointer
+ allocate(size_type __n, const void* = 0);
+
+ void
+ deallocate(pointer __p, size_type __n);
+ };
+
+ template<typename _Tp>
+ inline bool
+ operator==(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
+ { return true; }
+
+ template<typename _Tp>
+ inline bool
+ operator!=(const __pool_alloc<_Tp>&, const __pool_alloc<_Tp>&)
+ { return false; }
+
+ template<typename _Tp>
+ _Atomic_word
+ __pool_alloc<_Tp>::_S_force_new;
+
+ template<typename _Tp>
+ _Tp*
+ __pool_alloc<_Tp>::allocate(size_type __n, const void*)
+ {
+ pointer __ret = 0;
+ if (__builtin_expect(__n != 0, true))
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ // If there is a race through here, assume answer from getenv
+ // will resolve in same direction. Inspired by techniques
+ // to efficiently support threading found in basic_string.h.
+ if (_S_force_new == 0)
+ {
+ if (std::getenv("GLIBCXX_FORCE_NEW"))
+ __atomic_add_dispatch(&_S_force_new, 1);
+ else
+ __atomic_add_dispatch(&_S_force_new, -1);
+ }
+
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > size_t(_S_max_bytes) || _S_force_new > 0)
+ __ret = static_cast<_Tp*>(::operator new(__bytes));
+ else
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__bytes);
+
+ __scoped_lock sentry(_M_get_mutex());
+ _Obj* __restrict__ __result = *__free_list;
+ if (__builtin_expect(__result == 0, 0))
+ __ret = static_cast<_Tp*>(_M_refill(_M_round_up(__bytes)));
+ else
+ {
+ *__free_list = __result->_M_free_list_link;
+ __ret = reinterpret_cast<_Tp*>(__result);
+ }
+ if (__builtin_expect(__ret == 0, 0))
+ std::__throw_bad_alloc();
+ }
+ }
+ return __ret;
+ }
+
+ template<typename _Tp>
+ void
+ __pool_alloc<_Tp>::deallocate(pointer __p, size_type __n)
+ {
+ if (__builtin_expect(__n != 0 && __p != 0, true))
+ {
+ const size_t __bytes = __n * sizeof(_Tp);
+ if (__bytes > static_cast<size_t>(_S_max_bytes) || _S_force_new > 0)
+ ::operator delete(__p);
+ else
+ {
+ _Obj* volatile* __free_list = _M_get_free_list(__bytes);
+ _Obj* __q = reinterpret_cast<_Obj*>(__p);
+
+ __scoped_lock sentry(_M_get_mutex());
+ __q ->_M_free_list_link = *__free_list;
+ *__free_list = __q;
+ }
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/rb_tree b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rb_tree
new file mode 100644
index 0000000..185d02e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rb_tree
@@ -0,0 +1,93 @@
+// rb_tree extension -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file ext/rb_tree
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _RB_TREE
+#define _RB_TREE 1
+
+#pragma GCC system_header
+
+#include <bits/stl_tree.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::_Rb_tree;
+ using std::allocator;
+
+ // Class rb_tree is not part of the C++ standard. It is provided for
+ // compatibility with the HP STL.
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template <class _Key, class _Value, class _KeyOfValue, class _Compare,
+ class _Alloc = allocator<_Value> >
+ struct rb_tree
+ : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
+ {
+ typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
+ typedef typename _Base::allocator_type allocator_type;
+
+ rb_tree(const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__comp, __a) { }
+
+ ~rb_tree() { }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/rc_string_base.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rc_string_base.h
new file mode 100644
index 0000000..dce5e06
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rc_string_base.h
@@ -0,0 +1,718 @@
+// Reference-counted versatile string base -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/rc_string_base.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _RC_STRING_BASE_H
+#define _RC_STRING_BASE_H 1
+
+#include <ext/atomicity.h>
+#include <bits/stl_iterator_base_funcs.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * Documentation? What's that?
+ * Nathan Myers <ncm@cantrip.org>.
+ *
+ * A string looks like this:
+ *
+ * @code
+ * [_Rep]
+ * _M_length
+ * [__rc_string_base<char_type>] _M_capacity
+ * _M_dataplus _M_refcount
+ * _M_p ----------------> unnamed array of char_type
+ * @endcode
+ *
+ * Where the _M_p points to the first character in the string, and
+ * you cast it to a pointer-to-_Rep and subtract 1 to get a
+ * pointer to the header.
+ *
+ * This approach has the enormous advantage that a string object
+ * requires only one allocation. All the ugliness is confined
+ * within a single pair of inline functions, which each compile to
+ * a single "add" instruction: _Rep::_M_refdata(), and
+ * __rc_string_base::_M_rep(); and the allocation function which gets a
+ * block of raw bytes and with room enough and constructs a _Rep
+ * object at the front.
+ *
+ * The reason you want _M_data pointing to the character array and
+ * not the _Rep is so that the debugger can see the string
+ * contents. (Probably we should add a non-inline member to get
+ * the _Rep for the debugger to use, so users can check the actual
+ * string length.)
+ *
+ * Note that the _Rep object is a POD so that you can have a
+ * static "empty string" _Rep object already "constructed" before
+ * static constructors have run. The reference-count encoding is
+ * chosen so that a 0 indicates one reference, so you never try to
+ * destroy the empty-string _Rep object.
+ *
+ * All but the last paragraph is considered pretty conventional
+ * for a C++ string implementation.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __rc_string_base
+ : protected __vstring_utility<_CharT, _Traits, _Alloc>
+ {
+ public:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Alloc allocator_type;
+
+ typedef __vstring_utility<_CharT, _Traits, _Alloc> _Util_Base;
+ typedef typename _Util_Base::_CharT_alloc_type _CharT_alloc_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+
+ private:
+ // _Rep: string representation
+ // Invariants:
+ // 1. String really contains _M_length + 1 characters: due to 21.3.4
+ // must be kept null-terminated.
+ // 2. _M_capacity >= _M_length
+ // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT).
+ // 3. _M_refcount has three states:
+ // -1: leaked, one reference, no ref-copies allowed, non-const.
+ // 0: one reference, non-const.
+ // n>0: n + 1 references, operations require a lock, const.
+ // 4. All fields == 0 is an empty string, given the extra storage
+ // beyond-the-end for a null terminator; thus, the shared
+ // empty string representation needs no constructor.
+ struct _Rep
+ {
+ union
+ {
+ struct
+ {
+ size_type _M_length;
+ size_type _M_capacity;
+ _Atomic_word _M_refcount;
+ } _M_info;
+
+ // Only for alignment purposes.
+ _CharT _M_align;
+ };
+
+ typedef typename _Alloc::template rebind<_Rep>::other _Rep_alloc_type;
+
+ _CharT*
+ _M_refdata() throw()
+ { return reinterpret_cast<_CharT*>(this + 1); }
+
+ _CharT*
+ _M_refcopy() throw()
+ {
+ __atomic_add_dispatch(&_M_info._M_refcount, 1);
+ return _M_refdata();
+ } // XXX MT
+
+ void
+ _M_set_length(size_type __n)
+ {
+ _M_info._M_refcount = 0; // One reference.
+ _M_info._M_length = __n;
+ // grrr. (per 21.3.4)
+ // You cannot leave those LWG people alone for a second.
+ traits_type::assign(_M_refdata()[__n], _CharT());
+ }
+
+ // Create & Destroy
+ static _Rep*
+ _S_create(size_type, size_type, const _Alloc&);
+
+ void
+ _M_destroy(const _Alloc&) throw();
+
+ _CharT*
+ _M_clone(const _Alloc&, size_type __res = 0);
+ };
+
+ struct _Rep_empty
+ : public _Rep
+ {
+ _CharT _M_terminal;
+ };
+
+ static _Rep_empty _S_empty_rep;
+
+ // The maximum number of individual char_type elements of an
+ // individual string is determined by _S_max_size. This is the
+ // value that will be returned by max_size(). (Whereas npos
+ // is the maximum number of bytes the allocator can allocate.)
+ // If one was to divvy up the theoretical largest size string,
+ // with a terminating character and m _CharT elements, it'd
+ // look like this:
+ // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)
+ // + sizeof(_Rep) - 1
+ // (NB: last two terms for rounding reasons, see _M_create below)
+ // Solving for m:
+ // m = ((npos - 2 * sizeof(_Rep) + 1) / sizeof(_CharT)) - 1
+ // In addition, this implementation halves this amount.
+ enum { _S_max_size = (((static_cast<size_type>(-1) - 2 * sizeof(_Rep)
+ + 1) / sizeof(_CharT)) - 1) / 2 };
+
+ // Data Member (private):
+ mutable typename _Util_Base::template _Alloc_hider<_Alloc> _M_dataplus;
+
+ void
+ _M_data(_CharT* __p)
+ { _M_dataplus._M_p = __p; }
+
+ _Rep*
+ _M_rep() const
+ { return &((reinterpret_cast<_Rep*>(_M_data()))[-1]); }
+
+ _CharT*
+ _M_grab(const _Alloc& __alloc) const
+ {
+ return (!_M_is_leaked() && _M_get_allocator() == __alloc)
+ ? _M_rep()->_M_refcopy() : _M_rep()->_M_clone(__alloc);
+ }
+
+ void
+ _M_dispose()
+ {
+ if (__exchange_and_add_dispatch(&_M_rep()->_M_info._M_refcount,
+ -1) <= 0)
+ _M_rep()->_M_destroy(_M_get_allocator());
+ } // XXX MT
+
+ bool
+ _M_is_leaked() const
+ { return _M_rep()->_M_info._M_refcount < 0; }
+
+ void
+ _M_set_sharable()
+ { _M_rep()->_M_info._M_refcount = 0; }
+
+ void
+ _M_leak_hard();
+
+ // _S_construct_aux is used to implement the 21.3.1 para 15 which
+ // requires special behaviour if _InIterator is an integral type
+ template<typename _InIterator>
+ static _CharT*
+ _S_construct_aux(_InIterator __beg, _InIterator __end,
+ const _Alloc& __a, std::__false_type)
+ {
+ typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
+ return _S_construct(__beg, __end, __a, _Tag());
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ static _CharT*
+ _S_construct_aux(_Integer __beg, _Integer __end,
+ const _Alloc& __a, std::__true_type)
+ { return _S_construct(static_cast<size_type>(__beg), __end, __a); }
+
+ template<typename _InIterator>
+ static _CharT*
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
+ {
+ typedef typename std::__is_integer<_InIterator>::__type _Integral;
+ return _S_construct_aux(__beg, __end, __a, _Integral());
+ }
+
+ // For Input Iterators, used in istreambuf_iterators, etc.
+ template<typename _InIterator>
+ static _CharT*
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ std::input_iterator_tag);
+
+ // For forward_iterators up to random_access_iterators, used for
+ // string::iterator, _CharT*, etc.
+ template<typename _FwdIterator>
+ static _CharT*
+ _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
+ std::forward_iterator_tag);
+
+ static _CharT*
+ _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
+
+ public:
+ size_type
+ _M_max_size() const
+ { return size_type(_S_max_size); }
+
+ _CharT*
+ _M_data() const
+ { return _M_dataplus._M_p; }
+
+ size_type
+ _M_length() const
+ { return _M_rep()->_M_info._M_length; }
+
+ size_type
+ _M_capacity() const
+ { return _M_rep()->_M_info._M_capacity; }
+
+ bool
+ _M_is_shared() const
+ { return _M_rep()->_M_info._M_refcount > 0; }
+
+ void
+ _M_set_leaked()
+ { _M_rep()->_M_info._M_refcount = -1; }
+
+ void
+ _M_leak() // for use in begin() & non-const op[]
+ {
+ if (!_M_is_leaked())
+ _M_leak_hard();
+ }
+
+ void
+ _M_set_length(size_type __n)
+ { _M_rep()->_M_set_length(__n); }
+
+ __rc_string_base()
+ : _M_dataplus(_S_empty_rep._M_refcopy()) { }
+
+ __rc_string_base(const _Alloc& __a);
+
+ __rc_string_base(const __rc_string_base& __rcs);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ __rc_string_base(__rc_string_base&& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), __rcs._M_data())
+ { __rcs._M_data(_S_empty_rep._M_refcopy()); }
+#endif
+
+ __rc_string_base(size_type __n, _CharT __c, const _Alloc& __a);
+
+ template<typename _InputIterator>
+ __rc_string_base(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a);
+
+ ~__rc_string_base()
+ { _M_dispose(); }
+
+ allocator_type&
+ _M_get_allocator()
+ { return _M_dataplus; }
+
+ const allocator_type&
+ _M_get_allocator() const
+ { return _M_dataplus; }
+
+ void
+ _M_swap(__rc_string_base& __rcs);
+
+ void
+ _M_assign(const __rc_string_base& __rcs);
+
+ void
+ _M_reserve(size_type __res);
+
+ void
+ _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
+ size_type __len2);
+
+ void
+ _M_erase(size_type __pos, size_type __n);
+
+ void
+ _M_clear()
+ { _M_erase(size_type(0), _M_length()); }
+
+ bool
+ _M_compare(const __rc_string_base&) const
+ { return false; }
+ };
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename __rc_string_base<_CharT, _Traits, _Alloc>::_Rep_empty
+ __rc_string_base<_CharT, _Traits, _Alloc>::_S_empty_rep;
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ typename __rc_string_base<_CharT, _Traits, _Alloc>::_Rep*
+ __rc_string_base<_CharT, _Traits, _Alloc>::_Rep::
+ _S_create(size_type __capacity, size_type __old_capacity,
+ const _Alloc& __alloc)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 83. String::npos vs. string::max_size()
+ if (__capacity > size_type(_S_max_size))
+ std::__throw_length_error(__N("__rc_string_base::_Rep::_S_create"));
+
+ // The standard places no restriction on allocating more memory
+ // than is strictly needed within this layer at the moment or as
+ // requested by an explicit application call to reserve().
+
+ // Many malloc implementations perform quite poorly when an
+ // application attempts to allocate memory in a stepwise fashion
+ // growing each allocation size by only 1 char. Additionally,
+ // it makes little sense to allocate less linear memory than the
+ // natural blocking size of the malloc implementation.
+ // Unfortunately, we would need a somewhat low-level calculation
+ // with tuned parameters to get this perfect for any particular
+ // malloc implementation. Fortunately, generalizations about
+ // common features seen among implementations seems to suffice.
+
+ // __pagesize need not match the actual VM page size for good
+ // results in practice, thus we pick a common value on the low
+ // side. __malloc_header_size is an estimate of the amount of
+ // overhead per memory allocation (in practice seen N * sizeof
+ // (void*) where N is 0, 2 or 4). According to folklore,
+ // picking this value on the high side is better than
+ // low-balling it (especially when this algorithm is used with
+ // malloc implementations that allocate memory blocks rounded up
+ // to a size which is a power of 2).
+ const size_type __pagesize = 4096;
+ const size_type __malloc_header_size = 4 * sizeof(void*);
+
+ // The below implements an exponential growth policy, necessary to
+ // meet amortized linear time requirements of the library: see
+ // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+ if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
+ {
+ __capacity = 2 * __old_capacity;
+ // Never allocate a string bigger than _S_max_size.
+ if (__capacity > size_type(_S_max_size))
+ __capacity = size_type(_S_max_size);
+ }
+
+ // NB: Need an array of char_type[__capacity], plus a terminating
+ // null char_type() element, plus enough for the _Rep data structure,
+ // plus sizeof(_Rep) - 1 to upper round to a size multiple of
+ // sizeof(_Rep).
+ // Whew. Seemingly so needy, yet so elemental.
+ size_type __size = ((__capacity + 1) * sizeof(_CharT)
+ + 2 * sizeof(_Rep) - 1);
+
+ const size_type __adj_size = __size + __malloc_header_size;
+ if (__adj_size > __pagesize && __capacity > __old_capacity)
+ {
+ const size_type __extra = __pagesize - __adj_size % __pagesize;
+ __capacity += __extra / sizeof(_CharT);
+ if (__capacity > size_type(_S_max_size))
+ __capacity = size_type(_S_max_size);
+ __size = (__capacity + 1) * sizeof(_CharT) + 2 * sizeof(_Rep) - 1;
+ }
+
+ // NB: Might throw, but no worries about a leak, mate: _Rep()
+ // does not throw.
+ _Rep* __place = _Rep_alloc_type(__alloc).allocate(__size / sizeof(_Rep));
+ _Rep* __p = new (__place) _Rep;
+ __p->_M_info._M_capacity = __capacity;
+ return __p;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::_Rep::
+ _M_destroy(const _Alloc& __a) throw ()
+ {
+ const size_type __size = ((_M_info._M_capacity + 1) * sizeof(_CharT)
+ + 2 * sizeof(_Rep) - 1);
+ _Rep_alloc_type(__a).deallocate(this, __size / sizeof(_Rep));
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ _CharT*
+ __rc_string_base<_CharT, _Traits, _Alloc>::_Rep::
+ _M_clone(const _Alloc& __alloc, size_type __res)
+ {
+ // Requested capacity of the clone.
+ const size_type __requested_cap = _M_info._M_length + __res;
+ _Rep* __r = _Rep::_S_create(__requested_cap, _M_info._M_capacity,
+ __alloc);
+
+ if (_M_info._M_length)
+ _S_copy(__r->_M_refdata(), _M_refdata(), _M_info._M_length);
+
+ __r->_M_set_length(_M_info._M_length);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ __rc_string_base(const _Alloc& __a)
+ : _M_dataplus(__a, _S_construct(size_type(), _CharT(), __a)) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ __rc_string_base(const __rc_string_base& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(),
+ __rcs._M_grab(__rcs._M_get_allocator())) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ __rc_string_base(size_type __n, _CharT __c, const _Alloc& __a)
+ : _M_dataplus(__a, _S_construct(__n, __c, __a)) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InputIterator>
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ __rc_string_base(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a)
+ : _M_dataplus(__a, _S_construct(__beg, __end, __a)) { }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_leak_hard()
+ {
+ if (_M_is_shared())
+ _M_erase(0, 0);
+ _M_set_leaked();
+ }
+
+ // NB: This is the special case for Input Iterators, used in
+ // istreambuf_iterators, etc.
+ // Input Iterators have a cost structure very different from
+ // pointers, calling for a different coding style.
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InIterator>
+ _CharT*
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ std::input_iterator_tag)
+ {
+ if (__beg == __end && __a == _Alloc())
+ return _S_empty_rep._M_refcopy();
+
+ // Avoid reallocation for common case.
+ _CharT __buf[128];
+ size_type __len = 0;
+ while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
+ {
+ __buf[__len++] = *__beg;
+ ++__beg;
+ }
+ _Rep* __r = _Rep::_S_create(__len, size_type(0), __a);
+ _S_copy(__r->_M_refdata(), __buf, __len);
+ __try
+ {
+ while (__beg != __end)
+ {
+ if (__len == __r->_M_info._M_capacity)
+ {
+ // Allocate more space.
+ _Rep* __another = _Rep::_S_create(__len + 1, __len, __a);
+ _S_copy(__another->_M_refdata(), __r->_M_refdata(), __len);
+ __r->_M_destroy(__a);
+ __r = __another;
+ }
+ __r->_M_refdata()[__len++] = *__beg;
+ ++__beg;
+ }
+ }
+ __catch(...)
+ {
+ __r->_M_destroy(__a);
+ __throw_exception_again;
+ }
+ __r->_M_set_length(__len);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InIterator>
+ _CharT*
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+ std::forward_iterator_tag)
+ {
+ if (__beg == __end && __a == _Alloc())
+ return _S_empty_rep._M_refcopy();
+
+ // NB: Not required, but considered best practice.
+ if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0))
+ std::__throw_logic_error(__N("__rc_string_base::"
+ "_S_construct NULL not valid"));
+
+ const size_type __dnew = static_cast<size_type>(std::distance(__beg,
+ __end));
+ // Check for out_of_range and length_error exceptions.
+ _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a);
+ __try
+ { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
+ __catch(...)
+ {
+ __r->_M_destroy(__a);
+ __throw_exception_again;
+ }
+ __r->_M_set_length(__dnew);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ _CharT*
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
+ {
+ if (__n == 0 && __a == _Alloc())
+ return _S_empty_rep._M_refcopy();
+
+ // Check for out_of_range and length_error exceptions.
+ _Rep* __r = _Rep::_S_create(__n, size_type(0), __a);
+ if (__n)
+ _S_assign(__r->_M_refdata(), __n, __c);
+
+ __r->_M_set_length(__n);
+ return __r->_M_refdata();
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_swap(__rc_string_base& __rcs)
+ {
+ if (_M_is_leaked())
+ _M_set_sharable();
+ if (__rcs._M_is_leaked())
+ __rcs._M_set_sharable();
+
+ _CharT* __tmp = _M_data();
+ _M_data(__rcs._M_data());
+ __rcs._M_data(__tmp);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<allocator_type>::_S_do_it(_M_get_allocator(),
+ __rcs._M_get_allocator());
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_assign(const __rc_string_base& __rcs)
+ {
+ if (_M_rep() != __rcs._M_rep())
+ {
+ _CharT* __tmp = __rcs._M_grab(_M_get_allocator());
+ _M_dispose();
+ _M_data(__tmp);
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_reserve(size_type __res)
+ {
+ // Make sure we don't shrink below the current size.
+ if (__res < _M_length())
+ __res = _M_length();
+
+ if (__res != _M_capacity() || _M_is_shared())
+ {
+ _CharT* __tmp = _M_rep()->_M_clone(_M_get_allocator(),
+ __res - _M_length());
+ _M_dispose();
+ _M_data(__tmp);
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
+ size_type __len2)
+ {
+ const size_type __how_much = _M_length() - __pos - __len1;
+
+ _Rep* __r = _Rep::_S_create(_M_length() + __len2 - __len1,
+ _M_capacity(), _M_get_allocator());
+
+ if (__pos)
+ _S_copy(__r->_M_refdata(), _M_data(), __pos);
+ if (__s && __len2)
+ _S_copy(__r->_M_refdata() + __pos, __s, __len2);
+ if (__how_much)
+ _S_copy(__r->_M_refdata() + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
+
+ _M_dispose();
+ _M_data(__r->_M_refdata());
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __rc_string_base<_CharT, _Traits, _Alloc>::
+ _M_erase(size_type __pos, size_type __n)
+ {
+ const size_type __new_size = _M_length() - __n;
+ const size_type __how_much = _M_length() - __pos - __n;
+
+ if (_M_is_shared())
+ {
+ // Must reallocate.
+ _Rep* __r = _Rep::_S_create(__new_size, _M_capacity(),
+ _M_get_allocator());
+
+ if (__pos)
+ _S_copy(__r->_M_refdata(), _M_data(), __pos);
+ if (__how_much)
+ _S_copy(__r->_M_refdata() + __pos,
+ _M_data() + __pos + __n, __how_much);
+
+ _M_dispose();
+ _M_data(__r->_M_refdata());
+ }
+ else if (__how_much && __n)
+ {
+ // Work in-place.
+ _S_move(_M_data() + __pos,
+ _M_data() + __pos + __n, __how_much);
+ }
+
+ _M_rep()->_M_set_length(__new_size);
+ }
+
+ template<>
+ inline bool
+ __rc_string_base<char, std::char_traits<char>,
+ std::allocator<char> >::
+ _M_compare(const __rc_string_base& __rcs) const
+ {
+ if (_M_rep() == __rcs._M_rep())
+ return true;
+ return false;
+ }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ inline bool
+ __rc_string_base<wchar_t, std::char_traits<wchar_t>,
+ std::allocator<wchar_t> >::
+ _M_compare(const __rc_string_base& __rcs) const
+ {
+ if (_M_rep() == __rcs._M_rep())
+ return true;
+ return false;
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _RC_STRING_BASE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/rope b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rope
new file mode 100644
index 0000000..462c8f5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/rope
@@ -0,0 +1,2958 @@
+// SGI's rope class -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 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.
+ */
+
+/** @file ext/rope
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _ROPE
+#define _ROPE 1
+
+#include <algorithm>
+#include <iosfwd>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_function.h>
+#include <bits/stl_numeric.h>
+#include <bits/allocator.h>
+#include <bits/gthr.h>
+#include <tr1/functional>
+
+# ifdef __GC
+# define __GC_CONST const
+# else
+# define __GC_CONST // constant except for deallocation
+# endif
+
+#include <ext/memory> // For uninitialized_copy_n
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ namespace __detail
+ {
+ enum { _S_max_rope_depth = 45 };
+ enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
+ } // namespace __detail
+
+ using std::size_t;
+ using std::ptrdiff_t;
+ using std::allocator;
+ using std::_Destroy;
+
+ // See libstdc++/36832.
+ template<typename _ForwardIterator, typename _Allocator>
+ void
+ _Destroy_const(_ForwardIterator __first,
+ _ForwardIterator __last, _Allocator __alloc)
+ {
+ for (; __first != __last; ++__first)
+ __alloc.destroy(&*__first);
+ }
+
+ template<typename _ForwardIterator, typename _Tp>
+ inline void
+ _Destroy_const(_ForwardIterator __first,
+ _ForwardIterator __last, allocator<_Tp>)
+ { _Destroy(__first, __last); }
+
+ // The _S_eos function is used for those functions that
+ // convert to/from C-like strings to detect the end of the string.
+
+ // The end-of-C-string character.
+ // This is what the draft standard says it should be.
+ template <class _CharT>
+ inline _CharT
+ _S_eos(_CharT*)
+ { return _CharT(); }
+
+ // Test for basic character types.
+ // For basic character types leaves having a trailing eos.
+ template <class _CharT>
+ inline bool
+ _S_is_basic_char_type(_CharT*)
+ { return false; }
+
+ template <class _CharT>
+ inline bool
+ _S_is_one_byte_char_type(_CharT*)
+ { return false; }
+
+ inline bool
+ _S_is_basic_char_type(char*)
+ { return true; }
+
+ inline bool
+ _S_is_one_byte_char_type(char*)
+ { return true; }
+
+ inline bool
+ _S_is_basic_char_type(wchar_t*)
+ { return true; }
+
+ // Store an eos iff _CharT is a basic character type.
+ // Do not reference _S_eos if it isn't.
+ template <class _CharT>
+ inline void
+ _S_cond_store_eos(_CharT&) { }
+
+ inline void
+ _S_cond_store_eos(char& __c)
+ { __c = 0; }
+
+ inline void
+ _S_cond_store_eos(wchar_t& __c)
+ { __c = 0; }
+
+ // char_producers are logically functions that generate a section of
+ // a string. These can be converted to ropes. The resulting rope
+ // invokes the char_producer on demand. This allows, for example,
+ // files to be viewed as ropes without reading the entire file.
+ template <class _CharT>
+ class char_producer
+ {
+ public:
+ virtual ~char_producer() { };
+
+ virtual void
+ operator()(size_t __start_pos, size_t __len,
+ _CharT* __buffer) = 0;
+ // Buffer should really be an arbitrary output iterator.
+ // That way we could flatten directly into an ostream, etc.
+ // This is thoroughly impossible, since iterator types don't
+ // have runtime descriptions.
+ };
+
+ // Sequence buffers:
+ //
+ // Sequence must provide an append operation that appends an
+ // array to the sequence. Sequence buffers are useful only if
+ // appending an entire array is cheaper than appending element by element.
+ // This is true for many string representations.
+ // This should perhaps inherit from ostream<sequence::value_type>
+ // and be implemented correspondingly, so that they can be used
+ // for formatted. For the sake of portability, we don't do this yet.
+ //
+ // For now, sequence buffers behave as output iterators. But they also
+ // behave a little like basic_ostringstream<sequence::value_type> and a
+ // little like containers.
+
+ template<class _Sequence, size_t _Buf_sz = 100>
+ class sequence_buffer
+ : public std::iterator<std::output_iterator_tag, void, void, void, void>
+ {
+ public:
+ typedef typename _Sequence::value_type value_type;
+ protected:
+ _Sequence* _M_prefix;
+ value_type _M_buffer[_Buf_sz];
+ size_t _M_buf_count;
+ public:
+
+ void
+ flush()
+ {
+ _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count);
+ _M_buf_count = 0;
+ }
+
+ ~sequence_buffer()
+ { flush(); }
+
+ sequence_buffer()
+ : _M_prefix(0), _M_buf_count(0) { }
+
+ sequence_buffer(const sequence_buffer& __x)
+ {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ std::copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ }
+
+ sequence_buffer(sequence_buffer& __x)
+ {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ }
+
+ sequence_buffer(_Sequence& __s)
+ : _M_prefix(&__s), _M_buf_count(0) { }
+
+ sequence_buffer&
+ operator=(sequence_buffer& __x)
+ {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ return *this;
+ }
+
+ sequence_buffer&
+ operator=(const sequence_buffer& __x)
+ {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ std::copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ return *this;
+ }
+
+ void
+ push_back(value_type __x)
+ {
+ if (_M_buf_count < _Buf_sz)
+ {
+ _M_buffer[_M_buf_count] = __x;
+ ++_M_buf_count;
+ }
+ else
+ {
+ flush();
+ _M_buffer[0] = __x;
+ _M_buf_count = 1;
+ }
+ }
+
+ void
+ append(value_type* __s, size_t __len)
+ {
+ if (__len + _M_buf_count <= _Buf_sz)
+ {
+ size_t __i = _M_buf_count;
+ for (size_t __j = 0; __j < __len; __i++, __j++)
+ _M_buffer[__i] = __s[__j];
+ _M_buf_count += __len;
+ }
+ else if (0 == _M_buf_count)
+ _M_prefix->append(__s, __s + __len);
+ else
+ {
+ flush();
+ append(__s, __len);
+ }
+ }
+
+ sequence_buffer&
+ write(value_type* __s, size_t __len)
+ {
+ append(__s, __len);
+ return *this;
+ }
+
+ sequence_buffer&
+ put(value_type __x)
+ {
+ push_back(__x);
+ return *this;
+ }
+
+ sequence_buffer&
+ operator=(const value_type& __rhs)
+ {
+ push_back(__rhs);
+ return *this;
+ }
+
+ sequence_buffer&
+ operator*()
+ { return *this; }
+
+ sequence_buffer&
+ operator++()
+ { return *this; }
+
+ sequence_buffer
+ operator++(int)
+ { return *this; }
+ };
+
+ // The following should be treated as private, at least for now.
+ template<class _CharT>
+ class _Rope_char_consumer
+ {
+ public:
+ // If we had member templates, these should not be virtual.
+ // For now we need to use run-time parametrization where
+ // compile-time would do. Hence this should all be private
+ // for now.
+ // The symmetry with char_producer is accidental and temporary.
+ virtual ~_Rope_char_consumer() { };
+
+ virtual bool
+ operator()(const _CharT* __buffer, size_t __len) = 0;
+ };
+
+ // First a lot of forward declarations. The standard seems to require
+ // much stricter "declaration before use" than many of the implementations
+ // that preceded it.
+ template<class _CharT, class _Alloc = allocator<_CharT> >
+ class rope;
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeConcatenation;
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeLeaf;
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeFunction;
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeSubstring;
+
+ template<class _CharT, class _Alloc>
+ class _Rope_iterator;
+
+ template<class _CharT, class _Alloc>
+ class _Rope_const_iterator;
+
+ template<class _CharT, class _Alloc>
+ class _Rope_char_ref_proxy;
+
+ template<class _CharT, class _Alloc>
+ class _Rope_char_ptr_proxy;
+
+ template<class _CharT, class _Alloc>
+ bool
+ operator==(const _Rope_char_ptr_proxy<_CharT, _Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ _Rope_const_iterator<_CharT, _Alloc>
+ operator-(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ ptrdiff_t __n);
+
+ template<class _CharT, class _Alloc>
+ _Rope_const_iterator<_CharT, _Alloc>
+ operator+(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ ptrdiff_t __n);
+
+ template<class _CharT, class _Alloc>
+ _Rope_const_iterator<_CharT, _Alloc>
+ operator+(ptrdiff_t __n,
+ const _Rope_const_iterator<_CharT, _Alloc>& __x);
+
+ template<class _CharT, class _Alloc>
+ bool
+ operator==(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ bool
+ operator<(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ ptrdiff_t
+ operator-(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ _Rope_iterator<_CharT, _Alloc>
+ operator-(const _Rope_iterator<_CharT, _Alloc>& __x, ptrdiff_t __n);
+
+ template<class _CharT, class _Alloc>
+ _Rope_iterator<_CharT, _Alloc>
+ operator+(const _Rope_iterator<_CharT, _Alloc>& __x, ptrdiff_t __n);
+
+ template<class _CharT, class _Alloc>
+ _Rope_iterator<_CharT, _Alloc>
+ operator+(ptrdiff_t __n, const _Rope_iterator<_CharT, _Alloc>& __x);
+
+ template<class _CharT, class _Alloc>
+ bool
+ operator==(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ bool
+ operator<(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ ptrdiff_t
+ operator-(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y);
+
+ template<class _CharT, class _Alloc>
+ rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left,
+ const rope<_CharT, _Alloc>& __right);
+
+ template<class _CharT, class _Alloc>
+ rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left, const _CharT* __right);
+
+ template<class _CharT, class _Alloc>
+ rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left, _CharT __right);
+
+ // Some helpers, so we can use power on ropes.
+ // See below for why this isn't local to the implementation.
+
+ // This uses a nonstandard refcount convention.
+ // The result has refcount 0.
+ template<class _CharT, class _Alloc>
+ struct _Rope_Concat_fn
+ : public std::binary_function<rope<_CharT, _Alloc>, rope<_CharT, _Alloc>,
+ rope<_CharT, _Alloc> >
+ {
+ rope<_CharT, _Alloc>
+ operator()(const rope<_CharT, _Alloc>& __x,
+ const rope<_CharT, _Alloc>& __y)
+ { return __x + __y; }
+ };
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>
+ identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
+ { return rope<_CharT, _Alloc>(); }
+
+ // Class _Refcount_Base provides a type, _RC_t, a data member,
+ // _M_ref_count, and member functions _M_incr and _M_decr, which perform
+ // atomic preincrement/predecrement. The constructor initializes
+ // _M_ref_count.
+ struct _Refcount_Base
+ {
+ // The type _RC_t
+ typedef size_t _RC_t;
+
+ // The data member _M_ref_count
+ volatile _RC_t _M_ref_count;
+
+ // Constructor
+ __gthread_mutex_t _M_ref_count_lock;
+
+ _Refcount_Base(_RC_t __n) : _M_ref_count(__n), _M_ref_count_lock()
+ {
+#ifdef __GTHREAD_MUTEX_INIT
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ _M_ref_count_lock = __tmp;
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+ __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
+#else
+#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org.
+#endif
+ }
+
+ void
+ _M_incr()
+ {
+ __gthread_mutex_lock(&_M_ref_count_lock);
+ ++_M_ref_count;
+ __gthread_mutex_unlock(&_M_ref_count_lock);
+ }
+
+ _RC_t
+ _M_decr()
+ {
+ __gthread_mutex_lock(&_M_ref_count_lock);
+ volatile _RC_t __tmp = --_M_ref_count;
+ __gthread_mutex_unlock(&_M_ref_count_lock);
+ return __tmp;
+ }
+ };
+
+ //
+ // What follows should really be local to rope. Unfortunately,
+ // that doesn't work, since it makes it impossible to define generic
+ // equality on rope iterators. According to the draft standard, the
+ // template parameters for such an equality operator cannot be inferred
+ // from the occurrence of a member class as a parameter.
+ // (SGI compilers in fact allow this, but the __result wouldn't be
+ // portable.)
+ // Similarly, some of the static member functions are member functions
+ // only to avoid polluting the global namespace, and to circumvent
+ // restrictions on type inference for template functions.
+ //
+
+ //
+ // The internal data structure for representing a rope. This is
+ // private to the implementation. A rope is really just a pointer
+ // to one of these.
+ //
+ // A few basic functions for manipulating this data structure
+ // are members of _RopeRep. Most of the more complex algorithms
+ // are implemented as rope members.
+ //
+ // Some of the static member functions of _RopeRep have identically
+ // named functions in rope that simply invoke the _RopeRep versions.
+
+#define __ROPE_DEFINE_ALLOCS(__a) \
+ __ROPE_DEFINE_ALLOC(_CharT,_Data) /* character data */ \
+ typedef _Rope_RopeConcatenation<_CharT,__a> __C; \
+ __ROPE_DEFINE_ALLOC(__C,_C) \
+ typedef _Rope_RopeLeaf<_CharT,__a> __L; \
+ __ROPE_DEFINE_ALLOC(__L,_L) \
+ typedef _Rope_RopeFunction<_CharT,__a> __F; \
+ __ROPE_DEFINE_ALLOC(__F,_F) \
+ typedef _Rope_RopeSubstring<_CharT,__a> __S; \
+ __ROPE_DEFINE_ALLOC(__S,_S)
+
+ // Internal rope nodes potentially store a copy of the allocator
+ // instance used to allocate them. This is mostly redundant.
+ // But the alternative would be to pass allocator instances around
+ // in some form to nearly all internal functions, since any pointer
+ // assignment may result in a zero reference count and thus require
+ // deallocation.
+
+#define __STATIC_IF_SGI_ALLOC /* not static */
+
+ template <class _CharT, class _Alloc>
+ struct _Rope_rep_base
+ : public _Alloc
+ {
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Alloc*>(this); }
+
+ allocator_type&
+ _M_get_allocator()
+ { return *static_cast<_Alloc*>(this); }
+
+ const allocator_type&
+ _M_get_allocator() const
+ { return *static_cast<const _Alloc*>(this); }
+
+ _Rope_rep_base(size_t __size, const allocator_type&)
+ : _M_size(__size) { }
+
+ size_t _M_size;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+ typedef typename \
+ _Alloc::template rebind<_Tp>::other __name##Alloc; \
+ static _Tp* __name##_allocate(size_t __n) \
+ { return __name##Alloc().allocate(__n); } \
+ static void __name##_deallocate(_Tp *__p, size_t __n) \
+ { __name##Alloc().deallocate(__p, __n); }
+ __ROPE_DEFINE_ALLOCS(_Alloc)
+# undef __ROPE_DEFINE_ALLOC
+ };
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeRep
+ : public _Rope_rep_base<_CharT, _Alloc>
+# ifndef __GC
+ , _Refcount_Base
+# endif
+ {
+ public:
+ __detail::_Tag _M_tag:8;
+ bool _M_is_balanced:8;
+ unsigned char _M_depth;
+ __GC_CONST _CharT* _M_c_string;
+ __gthread_mutex_t _M_c_string_lock;
+ /* Flattened version of string, if needed. */
+ /* typically 0. */
+ /* If it's not 0, then the memory is owned */
+ /* by this node. */
+ /* In the case of a leaf, this may point to */
+ /* the same memory as the data field. */
+ typedef typename _Rope_rep_base<_CharT, _Alloc>::allocator_type
+ allocator_type;
+
+ using _Rope_rep_base<_CharT, _Alloc>::get_allocator;
+ using _Rope_rep_base<_CharT, _Alloc>::_M_get_allocator;
+
+ _Rope_RopeRep(__detail::_Tag __t, int __d, bool __b, size_t __size,
+ const allocator_type& __a)
+ : _Rope_rep_base<_CharT, _Alloc>(__size, __a),
+#ifndef __GC
+ _Refcount_Base(1),
+#endif
+ _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0)
+#ifdef __GTHREAD_MUTEX_INIT
+ {
+ // Do not copy a POSIX/gthr mutex once in use. However, bits are bits.
+ __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+ _M_c_string_lock = __tmp;
+ }
+#else
+ { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); }
+#endif
+#ifdef __GC
+ void
+ _M_incr () { }
+#endif
+ static void
+ _S_free_string(__GC_CONST _CharT*, size_t __len,
+ allocator_type& __a);
+#define __STL_FREE_STRING(__s, __l, __a) _S_free_string(__s, __l, __a);
+ // Deallocate data section of a leaf.
+ // This shouldn't be a member function.
+ // But its hard to do anything else at the
+ // moment, because it's templatized w.r.t.
+ // an allocator.
+ // Does nothing if __GC is defined.
+#ifndef __GC
+ void _M_free_c_string();
+ void _M_free_tree();
+ // Deallocate t. Assumes t is not 0.
+ void
+ _M_unref_nonnil()
+ {
+ if (0 == _M_decr())
+ _M_free_tree();
+ }
+
+ void
+ _M_ref_nonnil()
+ { _M_incr(); }
+
+ static void
+ _S_unref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t)
+ __t->_M_unref_nonnil();
+ }
+
+ static void
+ _S_ref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t)
+ __t->_M_incr();
+ }
+
+ static void
+ _S_free_if_unref(_Rope_RopeRep* __t)
+ {
+ if (0 != __t && 0 == __t->_M_ref_count)
+ __t->_M_free_tree();
+ }
+# else /* __GC */
+ void _M_unref_nonnil() { }
+ void _M_ref_nonnil() { }
+ static void _S_unref(_Rope_RopeRep*) { }
+ static void _S_ref(_Rope_RopeRep*) { }
+ static void _S_free_if_unref(_Rope_RopeRep*) { }
+# endif
+protected:
+ _Rope_RopeRep&
+ operator=(const _Rope_RopeRep&);
+
+ _Rope_RopeRep(const _Rope_RopeRep&);
+ };
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeLeaf
+ : public _Rope_RopeRep<_CharT, _Alloc>
+ {
+ public:
+ // Apparently needed by VC++
+ // The data fields of leaves are allocated with some
+ // extra space, to accommodate future growth and for basic
+ // character types, to hold a trailing eos character.
+ enum { _S_alloc_granularity = 8 };
+
+ static size_t
+ _S_rounded_up_size(size_t __n)
+ {
+ size_t __size_with_eos;
+
+ if (_S_is_basic_char_type((_CharT*)0))
+ __size_with_eos = __n + 1;
+ else
+ __size_with_eos = __n;
+#ifdef __GC
+ return __size_with_eos;
+#else
+ // Allow slop for in-place expansion.
+ return ((__size_with_eos + size_t(_S_alloc_granularity) - 1)
+ &~ (size_t(_S_alloc_granularity) - 1));
+#endif
+ }
+ __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */
+ /* The allocated size is */
+ /* _S_rounded_up_size(size), except */
+ /* in the GC case, in which it */
+ /* doesn't matter. */
+ typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+ allocator_type;
+
+ _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size,
+ const allocator_type& __a)
+ : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_leaf, 0, true,
+ __size, __a), _M_data(__d)
+ {
+ if (_S_is_basic_char_type((_CharT *)0))
+ {
+ // already eos terminated.
+ this->_M_c_string = __d;
+ }
+ }
+ // The constructor assumes that d has been allocated with
+ // the proper allocator and the properly padded size.
+ // In contrast, the destructor deallocates the data:
+#ifndef __GC
+ ~_Rope_RopeLeaf() throw()
+ {
+ if (_M_data != this->_M_c_string)
+ this->_M_free_c_string();
+
+ __STL_FREE_STRING(_M_data, this->_M_size, this->_M_get_allocator());
+ }
+#endif
+protected:
+ _Rope_RopeLeaf&
+ operator=(const _Rope_RopeLeaf&);
+
+ _Rope_RopeLeaf(const _Rope_RopeLeaf&);
+ };
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeConcatenation
+ : public _Rope_RopeRep<_CharT, _Alloc>
+ {
+ public:
+ _Rope_RopeRep<_CharT, _Alloc>* _M_left;
+ _Rope_RopeRep<_CharT, _Alloc>* _M_right;
+
+ typedef typename _Rope_rep_base<_CharT, _Alloc>::allocator_type
+ allocator_type;
+
+ _Rope_RopeConcatenation(_Rope_RopeRep<_CharT, _Alloc>* __l,
+ _Rope_RopeRep<_CharT, _Alloc>* __r,
+ const allocator_type& __a)
+ : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_concat,
+ std::max(__l->_M_depth,
+ __r->_M_depth) + 1,
+ false,
+ __l->_M_size + __r->_M_size, __a),
+ _M_left(__l), _M_right(__r)
+ { }
+#ifndef __GC
+ ~_Rope_RopeConcatenation() throw()
+ {
+ this->_M_free_c_string();
+ _M_left->_M_unref_nonnil();
+ _M_right->_M_unref_nonnil();
+ }
+#endif
+protected:
+ _Rope_RopeConcatenation&
+ operator=(const _Rope_RopeConcatenation&);
+
+ _Rope_RopeConcatenation(const _Rope_RopeConcatenation&);
+ };
+
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeFunction
+ : public _Rope_RopeRep<_CharT, _Alloc>
+ {
+ public:
+ char_producer<_CharT>* _M_fn;
+#ifndef __GC
+ bool _M_delete_when_done; // Char_producer is owned by the
+ // rope and should be explicitly
+ // deleted when the rope becomes
+ // inaccessible.
+#else
+ // In the GC case, we either register the rope for
+ // finalization, or not. Thus the field is unnecessary;
+ // the information is stored in the collector data structures.
+ // We do need a finalization procedure to be invoked by the
+ // collector.
+ static void
+ _S_fn_finalization_proc(void * __tree, void *)
+ { delete ((_Rope_RopeFunction *)__tree) -> _M_fn; }
+#endif
+ typedef typename _Rope_rep_base<_CharT, _Alloc>::allocator_type
+ allocator_type;
+
+ _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size,
+ bool __d, const allocator_type& __a)
+ : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_function, 0, true, __size, __a)
+ , _M_fn(__f)
+#ifndef __GC
+ , _M_delete_when_done(__d)
+#endif
+ {
+#ifdef __GC
+ if (__d)
+ {
+ GC_REGISTER_FINALIZER(this, _Rope_RopeFunction::
+ _S_fn_finalization_proc, 0, 0, 0);
+ }
+#endif
+ }
+#ifndef __GC
+ ~_Rope_RopeFunction() throw()
+ {
+ this->_M_free_c_string();
+ if (_M_delete_when_done)
+ delete _M_fn;
+ }
+# endif
+ protected:
+ _Rope_RopeFunction&
+ operator=(const _Rope_RopeFunction&);
+
+ _Rope_RopeFunction(const _Rope_RopeFunction&);
+ };
+ // Substring results are usually represented using just
+ // concatenation nodes. But in the case of very long flat ropes
+ // or ropes with a functional representation that isn't practical.
+ // In that case, we represent the __result as a special case of
+ // RopeFunction, whose char_producer points back to the rope itself.
+ // In all cases except repeated substring operations and
+ // deallocation, we treat the __result as a RopeFunction.
+ template<class _CharT, class _Alloc>
+ struct _Rope_RopeSubstring
+ : public _Rope_RopeFunction<_CharT, _Alloc>,
+ public char_producer<_CharT>
+ {
+ public:
+ // XXX this whole class should be rewritten.
+ _Rope_RopeRep<_CharT,_Alloc>* _M_base; // not 0
+ size_t _M_start;
+
+ virtual void
+ operator()(size_t __start_pos, size_t __req_len,
+ _CharT* __buffer)
+ {
+ switch(_M_base->_M_tag)
+ {
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ {
+ char_producer<_CharT>* __fn =
+ ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn;
+ (*__fn)(__start_pos + _M_start, __req_len, __buffer);
+ }
+ break;
+ case __detail::_S_leaf:
+ {
+ __GC_CONST _CharT* __s =
+ ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data;
+ uninitialized_copy_n(__s + __start_pos + _M_start, __req_len,
+ __buffer);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ typedef typename _Rope_rep_base<_CharT, _Alloc>::allocator_type
+ allocator_type;
+
+ _Rope_RopeSubstring(_Rope_RopeRep<_CharT, _Alloc>* __b, size_t __s,
+ size_t __l, const allocator_type& __a)
+ : _Rope_RopeFunction<_CharT, _Alloc>(this, __l, false, __a),
+ char_producer<_CharT>(), _M_base(__b), _M_start(__s)
+ {
+#ifndef __GC
+ _M_base->_M_ref_nonnil();
+#endif
+ this->_M_tag = __detail::_S_substringfn;
+ }
+ virtual ~_Rope_RopeSubstring() throw()
+ {
+#ifndef __GC
+ _M_base->_M_unref_nonnil();
+ // _M_free_c_string(); -- done by parent class
+#endif
+ }
+ };
+
+ // Self-destructing pointers to Rope_rep.
+ // These are not conventional smart pointers. Their
+ // only purpose in life is to ensure that unref is called
+ // on the pointer either at normal exit or if an exception
+ // is raised. It is the caller's responsibility to
+ // adjust reference counts when these pointers are initialized
+ // or assigned to. (This convention significantly reduces
+ // the number of potentially expensive reference count
+ // updates.)
+#ifndef __GC
+ template<class _CharT, class _Alloc>
+ struct _Rope_self_destruct_ptr
+ {
+ _Rope_RopeRep<_CharT, _Alloc>* _M_ptr;
+
+ ~_Rope_self_destruct_ptr()
+ { _Rope_RopeRep<_CharT, _Alloc>::_S_unref(_M_ptr); }
+#ifdef __EXCEPTIONS
+ _Rope_self_destruct_ptr() : _M_ptr(0) { };
+#else
+ _Rope_self_destruct_ptr() { };
+#endif
+ _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT, _Alloc>* __p)
+ : _M_ptr(__p) { }
+
+ _Rope_RopeRep<_CharT, _Alloc>&
+ operator*()
+ { return *_M_ptr; }
+
+ _Rope_RopeRep<_CharT, _Alloc>*
+ operator->()
+ { return _M_ptr; }
+
+ operator _Rope_RopeRep<_CharT, _Alloc>*()
+ { return _M_ptr; }
+
+ _Rope_self_destruct_ptr&
+ operator=(_Rope_RopeRep<_CharT, _Alloc>* __x)
+ { _M_ptr = __x; return *this; }
+ };
+#endif
+
+ // Dereferencing a nonconst iterator has to return something
+ // that behaves almost like a reference. It's not possible to
+ // return an actual reference since assignment requires extra
+ // work. And we would get into the same problems as with the
+ // CD2 version of basic_string.
+ template<class _CharT, class _Alloc>
+ class _Rope_char_ref_proxy
+ {
+ friend class rope<_CharT, _Alloc>;
+ friend class _Rope_iterator<_CharT, _Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT, _Alloc>;
+#ifdef __GC
+ typedef _Rope_RopeRep<_CharT, _Alloc>* _Self_destruct_ptr;
+#else
+ typedef _Rope_self_destruct_ptr<_CharT, _Alloc> _Self_destruct_ptr;
+#endif
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ typedef rope<_CharT, _Alloc> _My_rope;
+ size_t _M_pos;
+ _CharT _M_current;
+ bool _M_current_valid;
+ _My_rope* _M_root; // The whole rope.
+ public:
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p)
+ : _M_pos(__p), _M_current(), _M_current_valid(false), _M_root(__r) { }
+
+ _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x)
+ : _M_pos(__x._M_pos), _M_current(__x._M_current),
+ _M_current_valid(false), _M_root(__x._M_root) { }
+
+ // Don't preserve cache if the reference can outlive the
+ // expression. We claim that's not possible without calling
+ // a copy constructor or generating reference to a proxy
+ // reference. We declare the latter to have undefined semantics.
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c)
+ : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) { }
+
+ inline operator _CharT () const;
+
+ _Rope_char_ref_proxy&
+ operator=(_CharT __c);
+
+ _Rope_char_ptr_proxy<_CharT, _Alloc> operator&() const;
+
+ _Rope_char_ref_proxy&
+ operator=(const _Rope_char_ref_proxy& __c)
+ { return operator=((_CharT)__c); }
+ };
+
+ template<class _CharT, class __Alloc>
+ inline void
+ swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a,
+ _Rope_char_ref_proxy <_CharT, __Alloc > __b)
+ {
+ _CharT __tmp = __a;
+ __a = __b;
+ __b = __tmp;
+ }
+
+ template<class _CharT, class _Alloc>
+ class _Rope_char_ptr_proxy
+ {
+ // XXX this class should be rewritten.
+ friend class _Rope_char_ref_proxy<_CharT, _Alloc>;
+ size_t _M_pos;
+ rope<_CharT,_Alloc>* _M_root; // The whole rope.
+ public:
+ _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) { }
+
+ _Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) { }
+
+ _Rope_char_ptr_proxy() { }
+
+ _Rope_char_ptr_proxy(_CharT* __x)
+ : _M_root(0), _M_pos(0) { }
+
+ _Rope_char_ptr_proxy&
+ operator=(const _Rope_char_ptr_proxy& __x)
+ {
+ _M_pos = __x._M_pos;
+ _M_root = __x._M_root;
+ return *this;
+ }
+
+ template<class _CharT2, class _Alloc2>
+ friend bool
+ operator==(const _Rope_char_ptr_proxy<_CharT2, _Alloc2>& __x,
+ const _Rope_char_ptr_proxy<_CharT2, _Alloc2>& __y);
+
+ _Rope_char_ref_proxy<_CharT, _Alloc> operator*() const
+ { return _Rope_char_ref_proxy<_CharT, _Alloc>(_M_root, _M_pos); }
+ };
+
+ // Rope iterators:
+ // Unlike in the C version, we cache only part of the stack
+ // for rope iterators, since they must be efficiently copyable.
+ // When we run out of cache, we have to reconstruct the iterator
+ // value.
+ // Pointers from iterators are not included in reference counts.
+ // Iterators are assumed to be thread private. Ropes can
+ // be shared.
+
+ template<class _CharT, class _Alloc>
+ class _Rope_iterator_base
+ : public std::iterator<std::random_access_iterator_tag, _CharT>
+ {
+ friend class rope<_CharT, _Alloc>;
+ public:
+ typedef _Alloc _allocator_type; // used in _Rope_rotate, VC++ workaround
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ // Borland doesn't want this to be protected.
+ protected:
+ enum { _S_path_cache_len = 4 }; // Must be <= 9.
+ enum { _S_iterator_buf_len = 15 };
+ size_t _M_current_pos;
+ _RopeRep* _M_root; // The whole rope.
+ size_t _M_leaf_pos; // Starting position for current leaf
+ __GC_CONST _CharT* _M_buf_start;
+ // Buffer possibly
+ // containing current char.
+ __GC_CONST _CharT* _M_buf_ptr;
+ // Pointer to current char in buffer.
+ // != 0 ==> buffer valid.
+ __GC_CONST _CharT* _M_buf_end;
+ // One past __last valid char in buffer.
+ // What follows is the path cache. We go out of our
+ // way to make this compact.
+ // Path_end contains the bottom section of the path from
+ // the root to the current leaf.
+ const _RopeRep* _M_path_end[_S_path_cache_len];
+ int _M_leaf_index; // Last valid __pos in path_end;
+ // _M_path_end[0] ... _M_path_end[leaf_index-1]
+ // point to concatenation nodes.
+ unsigned char _M_path_directions;
+ // (path_directions >> __i) & 1 is 1
+ // iff we got from _M_path_end[leaf_index - __i - 1]
+ // to _M_path_end[leaf_index - __i] by going to the
+ // __right. Assumes path_cache_len <= 9.
+ _CharT _M_tmp_buf[_S_iterator_buf_len];
+ // Short buffer for surrounding chars.
+ // This is useful primarily for
+ // RopeFunctions. We put the buffer
+ // here to avoid locking in the
+ // multithreaded case.
+ // The cached path is generally assumed to be valid
+ // only if the buffer is valid.
+ static void _S_setbuf(_Rope_iterator_base& __x);
+ // Set buffer contents given
+ // path cache.
+ static void _S_setcache(_Rope_iterator_base& __x);
+ // Set buffer contents and
+ // path cache.
+ static void _S_setcache_for_incr(_Rope_iterator_base& __x);
+ // As above, but assumes path
+ // cache is valid for previous posn.
+ _Rope_iterator_base() { }
+
+ _Rope_iterator_base(_RopeRep* __root, size_t __pos)
+ : _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) { }
+
+ void _M_incr(size_t __n);
+ void _M_decr(size_t __n);
+ public:
+ size_t
+ index() const
+ { return _M_current_pos; }
+
+ _Rope_iterator_base(const _Rope_iterator_base& __x)
+ {
+ if (0 != __x._M_buf_ptr)
+ *this = __x;
+ else
+ {
+ _M_current_pos = __x._M_current_pos;
+ _M_root = __x._M_root;
+ _M_buf_ptr = 0;
+ }
+ }
+ };
+
+ template<class _CharT, class _Alloc>
+ class _Rope_iterator;
+
+ template<class _CharT, class _Alloc>
+ class _Rope_const_iterator
+ : public _Rope_iterator_base<_CharT, _Alloc>
+ {
+ friend class rope<_CharT, _Alloc>;
+ protected:
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ // The one from the base class may not be directly visible.
+ _Rope_const_iterator(const _RopeRep* __root, size_t __pos)
+ : _Rope_iterator_base<_CharT, _Alloc>(const_cast<_RopeRep*>(__root),
+ __pos)
+ // Only nonconst iterators modify root ref count
+ { }
+ public:
+ typedef _CharT reference; // Really a value. Returning a reference
+ // Would be a mess, since it would have
+ // to be included in refcount.
+ typedef const _CharT* pointer;
+
+ public:
+ _Rope_const_iterator() { };
+
+ _Rope_const_iterator(const _Rope_const_iterator& __x)
+ : _Rope_iterator_base<_CharT,_Alloc>(__x) { }
+
+ _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x);
+
+ _Rope_const_iterator(const rope<_CharT, _Alloc>& __r, size_t __pos)
+ : _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos) { }
+
+ _Rope_const_iterator&
+ operator=(const _Rope_const_iterator& __x)
+ {
+ if (0 != __x._M_buf_ptr)
+ *(static_cast<_Rope_iterator_base<_CharT, _Alloc>*>(this)) = __x;
+ else
+ {
+ this->_M_current_pos = __x._M_current_pos;
+ this->_M_root = __x._M_root;
+ this->_M_buf_ptr = 0;
+ }
+ return(*this);
+ }
+
+ reference
+ operator*()
+ {
+ if (0 == this->_M_buf_ptr)
+ _S_setcache(*this);
+ return *this->_M_buf_ptr;
+ }
+
+ // Without this const version, Rope iterators do not meet the
+ // requirements of an Input Iterator.
+ reference
+ operator*() const
+ {
+ return *const_cast<_Rope_const_iterator&>(*this);
+ }
+
+ _Rope_const_iterator&
+ operator++()
+ {
+ __GC_CONST _CharT* __next;
+ if (0 != this->_M_buf_ptr
+ && (__next = this->_M_buf_ptr + 1) < this->_M_buf_end)
+ {
+ this->_M_buf_ptr = __next;
+ ++this->_M_current_pos;
+ }
+ else
+ this->_M_incr(1);
+ return *this;
+ }
+
+ _Rope_const_iterator&
+ operator+=(ptrdiff_t __n)
+ {
+ if (__n >= 0)
+ this->_M_incr(__n);
+ else
+ this->_M_decr(-__n);
+ return *this;
+ }
+
+ _Rope_const_iterator&
+ operator--()
+ {
+ this->_M_decr(1);
+ return *this;
+ }
+
+ _Rope_const_iterator&
+ operator-=(ptrdiff_t __n)
+ {
+ if (__n >= 0)
+ this->_M_decr(__n);
+ else
+ this->_M_incr(-__n);
+ return *this;
+ }
+
+ _Rope_const_iterator
+ operator++(int)
+ {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ // This makes a subsequent dereference expensive.
+ // Perhaps we should instead copy the iterator
+ // if it has a valid cache?
+ }
+
+ _Rope_const_iterator
+ operator--(int)
+ {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ }
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2, _Alloc2>
+ operator-(const _Rope_const_iterator<_CharT2, _Alloc2>& __x,
+ ptrdiff_t __n);
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2, _Alloc2>
+ operator+(const _Rope_const_iterator<_CharT2, _Alloc2>& __x,
+ ptrdiff_t __n);
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_const_iterator<_CharT2, _Alloc2>
+ operator+(ptrdiff_t __n,
+ const _Rope_const_iterator<_CharT2, _Alloc2>& __x);
+
+ reference
+ operator[](size_t __n)
+ { return rope<_CharT, _Alloc>::_S_fetch(this->_M_root,
+ this->_M_current_pos + __n); }
+
+ template<class _CharT2, class _Alloc2>
+ friend bool
+ operator==(const _Rope_const_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2, _Alloc2>& __y);
+
+ template<class _CharT2, class _Alloc2>
+ friend bool
+ operator<(const _Rope_const_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2, _Alloc2>& __y);
+
+ template<class _CharT2, class _Alloc2>
+ friend ptrdiff_t
+ operator-(const _Rope_const_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_const_iterator<_CharT2, _Alloc2>& __y);
+ };
+
+ template<class _CharT, class _Alloc>
+ class _Rope_iterator
+ : public _Rope_iterator_base<_CharT, _Alloc>
+ {
+ friend class rope<_CharT, _Alloc>;
+ protected:
+ typedef typename _Rope_iterator_base<_CharT, _Alloc>::_RopeRep _RopeRep;
+ rope<_CharT, _Alloc>* _M_root_rope;
+
+ // root is treated as a cached version of this, and is used to
+ // detect changes to the underlying rope.
+
+ // Root is included in the reference count. This is necessary
+ // so that we can detect changes reliably. Unfortunately, it
+ // requires careful bookkeeping for the nonGC case.
+ _Rope_iterator(rope<_CharT, _Alloc>* __r, size_t __pos)
+ : _Rope_iterator_base<_CharT, _Alloc>(__r->_M_tree_ptr, __pos),
+ _M_root_rope(__r)
+ { _RopeRep::_S_ref(this->_M_root);
+ if (!(__r -> empty()))
+ _S_setcache(*this);
+ }
+
+ void _M_check();
+ public:
+ typedef _Rope_char_ref_proxy<_CharT, _Alloc> reference;
+ typedef _Rope_char_ref_proxy<_CharT, _Alloc>* pointer;
+
+ rope<_CharT, _Alloc>&
+ container()
+ { return *_M_root_rope; }
+
+ _Rope_iterator()
+ {
+ this->_M_root = 0; // Needed for reference counting.
+ };
+
+ _Rope_iterator(const _Rope_iterator& __x)
+ : _Rope_iterator_base<_CharT, _Alloc>(__x)
+ {
+ _M_root_rope = __x._M_root_rope;
+ _RopeRep::_S_ref(this->_M_root);
+ }
+
+ _Rope_iterator(rope<_CharT, _Alloc>& __r, size_t __pos);
+
+ ~_Rope_iterator()
+ { _RopeRep::_S_unref(this->_M_root); }
+
+ _Rope_iterator&
+ operator=(const _Rope_iterator& __x)
+ {
+ _RopeRep* __old = this->_M_root;
+
+ _RopeRep::_S_ref(__x._M_root);
+ if (0 != __x._M_buf_ptr)
+ {
+ _M_root_rope = __x._M_root_rope;
+ *(static_cast<_Rope_iterator_base<_CharT, _Alloc>*>(this)) = __x;
+ }
+ else
+ {
+ this->_M_current_pos = __x._M_current_pos;
+ this->_M_root = __x._M_root;
+ _M_root_rope = __x._M_root_rope;
+ this->_M_buf_ptr = 0;
+ }
+ _RopeRep::_S_unref(__old);
+ return(*this);
+ }
+
+ reference
+ operator*()
+ {
+ _M_check();
+ if (0 == this->_M_buf_ptr)
+ return _Rope_char_ref_proxy<_CharT, _Alloc>(_M_root_rope,
+ this->_M_current_pos);
+ else
+ return _Rope_char_ref_proxy<_CharT, _Alloc>(_M_root_rope,
+ this->_M_current_pos,
+ *this->_M_buf_ptr);
+ }
+
+ // See above comment.
+ reference
+ operator*() const
+ {
+ return *const_cast<_Rope_iterator&>(*this);
+ }
+
+ _Rope_iterator&
+ operator++()
+ {
+ this->_M_incr(1);
+ return *this;
+ }
+
+ _Rope_iterator&
+ operator+=(ptrdiff_t __n)
+ {
+ if (__n >= 0)
+ this->_M_incr(__n);
+ else
+ this->_M_decr(-__n);
+ return *this;
+ }
+
+ _Rope_iterator&
+ operator--()
+ {
+ this->_M_decr(1);
+ return *this;
+ }
+
+ _Rope_iterator&
+ operator-=(ptrdiff_t __n)
+ {
+ if (__n >= 0)
+ this->_M_decr(__n);
+ else
+ this->_M_incr(-__n);
+ return *this;
+ }
+
+ _Rope_iterator
+ operator++(int)
+ {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+ }
+
+ _Rope_iterator
+ operator--(int)
+ {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+ }
+
+ reference
+ operator[](ptrdiff_t __n)
+ { return _Rope_char_ref_proxy<_CharT, _Alloc>(_M_root_rope,
+ this->_M_current_pos
+ + __n); }
+
+ template<class _CharT2, class _Alloc2>
+ friend bool
+ operator==(const _Rope_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_iterator<_CharT2, _Alloc2>& __y);
+
+ template<class _CharT2, class _Alloc2>
+ friend bool
+ operator<(const _Rope_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_iterator<_CharT2, _Alloc2>& __y);
+
+ template<class _CharT2, class _Alloc2>
+ friend ptrdiff_t
+ operator-(const _Rope_iterator<_CharT2, _Alloc2>& __x,
+ const _Rope_iterator<_CharT2, _Alloc2>& __y);
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2, _Alloc2>
+ operator-(const _Rope_iterator<_CharT2, _Alloc2>& __x, ptrdiff_t __n);
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2, _Alloc2>
+ operator+(const _Rope_iterator<_CharT2, _Alloc2>& __x, ptrdiff_t __n);
+
+ template<class _CharT2, class _Alloc2>
+ friend _Rope_iterator<_CharT2, _Alloc2>
+ operator+(ptrdiff_t __n, const _Rope_iterator<_CharT2, _Alloc2>& __x);
+ };
+
+
+ template <class _CharT, class _Alloc>
+ struct _Rope_base
+ : public _Alloc
+ {
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Alloc*>(this); }
+
+ allocator_type&
+ _M_get_allocator()
+ { return *static_cast<_Alloc*>(this); }
+
+ const allocator_type&
+ _M_get_allocator() const
+ { return *static_cast<const _Alloc*>(this); }
+
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ // The one in _Base may not be visible due to template rules.
+
+ _Rope_base(_RopeRep* __t, const allocator_type&)
+ : _M_tree_ptr(__t) { }
+
+ _Rope_base(const allocator_type&) { }
+
+ // The only data member of a rope:
+ _RopeRep *_M_tree_ptr;
+
+#define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+ typedef typename \
+ _Alloc::template rebind<_Tp>::other __name##Alloc; \
+ static _Tp* __name##_allocate(size_t __n) \
+ { return __name##Alloc().allocate(__n); } \
+ static void __name##_deallocate(_Tp *__p, size_t __n) \
+ { __name##Alloc().deallocate(__p, __n); }
+ __ROPE_DEFINE_ALLOCS(_Alloc)
+#undef __ROPE_DEFINE_ALLOC
+
+ protected:
+ _Rope_base&
+ operator=(const _Rope_base&);
+
+ _Rope_base(const _Rope_base&);
+ };
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template <class _CharT, class _Alloc>
+ class rope : public _Rope_base<_CharT, _Alloc>
+ {
+ public:
+ typedef _CharT value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _CharT const_reference;
+ typedef const _CharT* const_pointer;
+ typedef _Rope_iterator<_CharT, _Alloc> iterator;
+ typedef _Rope_const_iterator<_CharT, _Alloc> const_iterator;
+ typedef _Rope_char_ref_proxy<_CharT, _Alloc> reference;
+ typedef _Rope_char_ptr_proxy<_CharT, _Alloc> pointer;
+
+ friend class _Rope_iterator<_CharT, _Alloc>;
+ friend class _Rope_const_iterator<_CharT, _Alloc>;
+ friend struct _Rope_RopeRep<_CharT, _Alloc>;
+ friend class _Rope_iterator_base<_CharT, _Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT, _Alloc>;
+ friend class _Rope_char_ref_proxy<_CharT, _Alloc>;
+ friend struct _Rope_RopeSubstring<_CharT, _Alloc>;
+
+ protected:
+ typedef _Rope_base<_CharT, _Alloc> _Base;
+ typedef typename _Base::allocator_type allocator_type;
+ using _Base::_M_tree_ptr;
+ using _Base::get_allocator;
+ using _Base::_M_get_allocator;
+ typedef __GC_CONST _CharT* _Cstrptr;
+
+ static _CharT _S_empty_c_str[1];
+
+ static bool
+ _S_is0(_CharT __c)
+ { return __c == _S_eos((_CharT*)0); }
+
+ enum { _S_copy_max = 23 };
+ // For strings shorter than _S_copy_max, we copy to
+ // concatenate.
+
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ typedef _Rope_RopeConcatenation<_CharT, _Alloc> _RopeConcatenation;
+ typedef _Rope_RopeLeaf<_CharT, _Alloc> _RopeLeaf;
+ typedef _Rope_RopeFunction<_CharT, _Alloc> _RopeFunction;
+ typedef _Rope_RopeSubstring<_CharT, _Alloc> _RopeSubstring;
+
+ // Retrieve a character at the indicated position.
+ static _CharT _S_fetch(_RopeRep* __r, size_type __pos);
+
+#ifndef __GC
+ // Obtain a pointer to the character at the indicated position.
+ // The pointer can be used to change the character.
+ // If such a pointer cannot be produced, as is frequently the
+ // case, 0 is returned instead.
+ // (Returns nonzero only if all nodes in the path have a refcount
+ // of 1.)
+ static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
+#endif
+
+ static bool
+ _S_apply_to_pieces(// should be template parameter
+ _Rope_char_consumer<_CharT>& __c,
+ const _RopeRep* __r,
+ size_t __begin, size_t __end);
+ // begin and end are assumed to be in range.
+
+#ifndef __GC
+ static void
+ _S_unref(_RopeRep* __t)
+ { _RopeRep::_S_unref(__t); }
+
+ static void
+ _S_ref(_RopeRep* __t)
+ { _RopeRep::_S_ref(__t); }
+
+#else /* __GC */
+ static void _S_unref(_RopeRep*) { }
+ static void _S_ref(_RopeRep*) { }
+#endif
+
+#ifdef __GC
+ typedef _Rope_RopeRep<_CharT, _Alloc>* _Self_destruct_ptr;
+#else
+ typedef _Rope_self_destruct_ptr<_CharT, _Alloc> _Self_destruct_ptr;
+#endif
+
+ // _Result is counted in refcount.
+ static _RopeRep* _S_substring(_RopeRep* __base,
+ size_t __start, size_t __endp1);
+
+ static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate rope and char ptr, copying __s.
+ // Should really take an arbitrary iterator.
+ // Result is counted in refcount.
+ static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter,
+ size_t __slen)
+ // As above, but one reference to __r is about to be
+ // destroyed. Thus the pieces may be recycled if all
+ // relevant reference counts are 1.
+#ifdef __GC
+ // We can't really do anything since refcounts are unavailable.
+ { return _S_concat_char_iter(__r, __iter, __slen); }
+#else
+ ;
+#endif
+
+ static _RopeRep* _S_concat(_RopeRep* __left, _RopeRep* __right);
+ // General concatenation on _RopeRep. _Result
+ // has refcount of 1. Adjusts argument refcounts.
+
+ public:
+ void
+ apply_to_pieces(size_t __begin, size_t __end,
+ _Rope_char_consumer<_CharT>& __c) const
+ { _S_apply_to_pieces(__c, this->_M_tree_ptr, __begin, __end); }
+
+ protected:
+
+ static size_t
+ _S_rounded_up_size(size_t __n)
+ { return _RopeLeaf::_S_rounded_up_size(__n); }
+
+ static size_t
+ _S_allocated_capacity(size_t __n)
+ {
+ if (_S_is_basic_char_type((_CharT*)0))
+ return _S_rounded_up_size(__n) - 1;
+ else
+ return _S_rounded_up_size(__n);
+
+ }
+
+ // Allocate and construct a RopeLeaf using the supplied allocator
+ // Takes ownership of s instead of copying.
+ static _RopeLeaf*
+ _S_new_RopeLeaf(__GC_CONST _CharT *__s,
+ size_t __size, allocator_type& __a)
+ {
+ _RopeLeaf* __space = typename _Base::_LAlloc(__a).allocate(1);
+ return new(__space) _RopeLeaf(__s, __size, __a);
+ }
+
+ static _RopeConcatenation*
+ _S_new_RopeConcatenation(_RopeRep* __left, _RopeRep* __right,
+ allocator_type& __a)
+ {
+ _RopeConcatenation* __space = typename _Base::_CAlloc(__a).allocate(1);
+ return new(__space) _RopeConcatenation(__left, __right, __a);
+ }
+
+ static _RopeFunction*
+ _S_new_RopeFunction(char_producer<_CharT>* __f,
+ size_t __size, bool __d, allocator_type& __a)
+ {
+ _RopeFunction* __space = typename _Base::_FAlloc(__a).allocate(1);
+ return new(__space) _RopeFunction(__f, __size, __d, __a);
+ }
+
+ static _RopeSubstring*
+ _S_new_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+ size_t __l, allocator_type& __a)
+ {
+ _RopeSubstring* __space = typename _Base::_SAlloc(__a).allocate(1);
+ return new(__space) _RopeSubstring(__b, __s, __l, __a);
+ }
+
+ static _RopeLeaf*
+ _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
+ size_t __size, allocator_type& __a)
+#define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \
+ _S_RopeLeaf_from_unowned_char_ptr(__s, __size, __a)
+ {
+ if (0 == __size)
+ return 0;
+ _CharT* __buf = __a.allocate(_S_rounded_up_size(__size));
+
+ __uninitialized_copy_n_a(__s, __size, __buf, __a);
+ _S_cond_store_eos(__buf[__size]);
+ __try
+ { return _S_new_RopeLeaf(__buf, __size, __a); }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
+ __throw_exception_again;
+ }
+ }
+
+ // Concatenation of nonempty strings.
+ // Always builds a concatenation node.
+ // Rebalances if the result is too deep.
+ // Result has refcount 1.
+ // Does not increment left and right ref counts even though
+ // they are referenced.
+ static _RopeRep*
+ _S_tree_concat(_RopeRep* __left, _RopeRep* __right);
+
+ // Concatenation helper functions
+ static _RopeLeaf*
+ _S_leaf_concat_char_iter(_RopeLeaf* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate by copying leaf.
+ // should take an arbitrary iterator
+ // result has refcount 1.
+#ifndef __GC
+ static _RopeLeaf*
+ _S_destr_leaf_concat_char_iter(_RopeLeaf* __r,
+ const _CharT* __iter, size_t __slen);
+ // A version that potentially clobbers __r if __r->_M_ref_count == 1.
+#endif
+
+ private:
+
+ static size_t _S_char_ptr_len(const _CharT* __s);
+ // slightly generalized strlen
+
+ rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
+ : _Base(__t, __a) { }
+
+
+ // Copy __r to the _CharT buffer.
+ // Returns __buffer + __r->_M_size.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);
+
+ // Again, with explicit starting position and length.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r,
+ size_t __start, size_t __len,
+ _CharT* __buffer);
+
+ static const unsigned long
+ _S_min_len[__detail::_S_max_rope_depth + 1];
+
+ static bool
+ _S_is_balanced(_RopeRep* __r)
+ { return (__r->_M_size >= _S_min_len[__r->_M_depth]); }
+
+ static bool
+ _S_is_almost_balanced(_RopeRep* __r)
+ { return (__r->_M_depth == 0
+ || __r->_M_size >= _S_min_len[__r->_M_depth - 1]); }
+
+ static bool
+ _S_is_roughly_balanced(_RopeRep* __r)
+ { return (__r->_M_depth <= 1
+ || __r->_M_size >= _S_min_len[__r->_M_depth - 2]); }
+
+ // Assumes the result is not empty.
+ static _RopeRep*
+ _S_concat_and_set_balanced(_RopeRep* __left, _RopeRep* __right)
+ {
+ _RopeRep* __result = _S_concat(__left, __right);
+ if (_S_is_balanced(__result))
+ __result->_M_is_balanced = true;
+ return __result;
+ }
+
+ // The basic rebalancing operation. Logically copies the
+ // rope. The result has refcount of 1. The client will
+ // usually decrement the reference count of __r.
+ // The result is within height 2 of balanced by the above
+ // definition.
+ static _RopeRep* _S_balance(_RopeRep* __r);
+
+ // Add all unbalanced subtrees to the forest of balanced trees.
+ // Used only by balance.
+ static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
+
+ // Add __r to forest, assuming __r is already balanced.
+ static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);
+
+ // Print to stdout, exposing structure
+ static void _S_dump(_RopeRep* __r, int __indent = 0);
+
+ // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
+ static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);
+
+ public:
+ bool
+ empty() const
+ { return 0 == this->_M_tree_ptr; }
+
+ // Comparison member function. This is public only for those
+ // clients that need a ternary comparison. Others
+ // should use the comparison operators below.
+ int
+ compare(const rope& __y) const
+ { return _S_compare(this->_M_tree_ptr, __y._M_tree_ptr); }
+
+ rope(const _CharT* __s, const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ this->_M_tree_ptr =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),
+ _M_get_allocator());
+ }
+
+ rope(const _CharT* __s, size_t __len,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ this->_M_tree_ptr =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, _M_get_allocator());
+ }
+
+ // Should perhaps be templatized with respect to the iterator type
+ // and use Sequence_buffer. (It should perhaps use sequence_buffer
+ // even now.)
+ rope(const _CharT* __s, const _CharT* __e,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ this->_M_tree_ptr =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, _M_get_allocator());
+ }
+
+ rope(const const_iterator& __s, const const_iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos), __a)
+ { }
+
+ rope(const iterator& __s, const iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos), __a)
+ { }
+
+ rope(_CharT __c, const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ _CharT* __buf = this->_Data_allocate(_S_rounded_up_size(1));
+
+ _M_get_allocator().construct(__buf, __c);
+ __try
+ {
+ this->_M_tree_ptr = _S_new_RopeLeaf(__buf, 1,
+ _M_get_allocator());
+ }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__buf, 1, _M_get_allocator());
+ __throw_exception_again;
+ }
+ }
+
+ rope(size_t __n, _CharT __c,
+ const allocator_type& __a = allocator_type());
+
+ rope(const allocator_type& __a = allocator_type())
+ : _Base(0, __a) { }
+
+ // Construct a rope from a function that can compute its members
+ rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ {
+ this->_M_tree_ptr = (0 == __len) ?
+ 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
+ }
+
+ rope(const rope& __x, const allocator_type& __a = allocator_type())
+ : _Base(__x._M_tree_ptr, __a)
+ { _S_ref(this->_M_tree_ptr); }
+
+ ~rope() throw()
+ { _S_unref(this->_M_tree_ptr); }
+
+ rope&
+ operator=(const rope& __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr = __x._M_tree_ptr;
+ _S_ref(this->_M_tree_ptr);
+ _S_unref(__old);
+ return *this;
+ }
+
+ void
+ clear()
+ {
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = 0;
+ }
+
+ void
+ push_back(_CharT __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr
+ = _S_destr_concat_char_iter(this->_M_tree_ptr, &__x, 1);
+ _S_unref(__old);
+ }
+
+ void
+ pop_back()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr = _S_substring(this->_M_tree_ptr,
+ 0, this->_M_tree_ptr->_M_size - 1);
+ _S_unref(__old);
+ }
+
+ _CharT
+ back() const
+ { return _S_fetch(this->_M_tree_ptr, this->_M_tree_ptr->_M_size - 1); }
+
+ void
+ push_front(_CharT __x)
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ _RopeRep* __left =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, _M_get_allocator());
+ __try
+ {
+ this->_M_tree_ptr = _S_concat(__left, this->_M_tree_ptr);
+ _S_unref(__old);
+ _S_unref(__left);
+ }
+ __catch(...)
+ {
+ _S_unref(__left);
+ __throw_exception_again;
+ }
+ }
+
+ void
+ pop_front()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr
+ = _S_substring(this->_M_tree_ptr, 1, this->_M_tree_ptr->_M_size);
+ _S_unref(__old);
+ }
+
+ _CharT
+ front() const
+ { return _S_fetch(this->_M_tree_ptr, 0); }
+
+ void
+ balance()
+ {
+ _RopeRep* __old = this->_M_tree_ptr;
+ this->_M_tree_ptr = _S_balance(this->_M_tree_ptr);
+ _S_unref(__old);
+ }
+
+ void
+ copy(_CharT* __buffer) const
+ {
+ _Destroy_const(__buffer, __buffer + size(), _M_get_allocator());
+ _S_flatten(this->_M_tree_ptr, __buffer);
+ }
+
+ // This is the copy function from the standard, but
+ // with the arguments reordered to make it consistent with the
+ // rest of the interface.
+ // Note that this guaranteed not to compile if the draft standard
+ // order is assumed.
+ size_type
+ copy(size_type __pos, size_type __n, _CharT* __buffer) const
+ {
+ size_t __size = size();
+ size_t __len = (__pos + __n > __size? __size - __pos : __n);
+
+ _Destroy_const(__buffer, __buffer + __len, _M_get_allocator());
+ _S_flatten(this->_M_tree_ptr, __pos, __len, __buffer);
+ return __len;
+ }
+
+ // Print to stdout, exposing structure. May be useful for
+ // performance debugging.
+ void
+ dump()
+ { _S_dump(this->_M_tree_ptr); }
+
+ // Convert to 0 terminated string in new allocated memory.
+ // Embedded 0s in the input do not terminate the copy.
+ const _CharT* c_str() const;
+
+ // As above, but also use the flattened representation as
+ // the new rope representation.
+ const _CharT* replace_with_c_str();
+
+ // Reclaim memory for the c_str generated flattened string.
+ // Intentionally undocumented, since it's hard to say when this
+ // is safe for multiple threads.
+ void
+ delete_c_str ()
+ {
+ if (0 == this->_M_tree_ptr)
+ return;
+ if (__detail::_S_leaf == this->_M_tree_ptr->_M_tag &&
+ ((_RopeLeaf*)this->_M_tree_ptr)->_M_data ==
+ this->_M_tree_ptr->_M_c_string)
+ {
+ // Representation shared
+ return;
+ }
+#ifndef __GC
+ this->_M_tree_ptr->_M_free_c_string();
+#endif
+ this->_M_tree_ptr->_M_c_string = 0;
+ }
+
+ _CharT
+ operator[] (size_type __pos) const
+ { return _S_fetch(this->_M_tree_ptr, __pos); }
+
+ _CharT
+ at(size_type __pos) const
+ {
+ // if (__pos >= size()) throw out_of_range; // XXX
+ return (*this)[__pos];
+ }
+
+ const_iterator
+ begin() const
+ { return(const_iterator(this->_M_tree_ptr, 0)); }
+
+ // An easy way to get a const iterator from a non-const container.
+ const_iterator
+ const_begin() const
+ { return(const_iterator(this->_M_tree_ptr, 0)); }
+
+ const_iterator
+ end() const
+ { return(const_iterator(this->_M_tree_ptr, size())); }
+
+ const_iterator
+ const_end() const
+ { return(const_iterator(this->_M_tree_ptr, size())); }
+
+ size_type
+ size() const
+ { return(0 == this->_M_tree_ptr? 0 : this->_M_tree_ptr->_M_size); }
+
+ size_type
+ length() const
+ { return size(); }
+
+ size_type
+ max_size() const
+ {
+ return _S_min_len[int(__detail::_S_max_rope_depth) - 1] - 1;
+ // Guarantees that the result can be sufficiently
+ // balanced. Longer ropes will probably still work,
+ // but it's harder to make guarantees.
+ }
+
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ const_rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ const_rend() const
+ { return const_reverse_iterator(begin()); }
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2, _Alloc2>
+ operator+(const rope<_CharT2, _Alloc2>& __left,
+ const rope<_CharT2, _Alloc2>& __right);
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2, _Alloc2>
+ operator+(const rope<_CharT2, _Alloc2>& __left, const _CharT2* __right);
+
+ template<class _CharT2, class _Alloc2>
+ friend rope<_CharT2, _Alloc2>
+ operator+(const rope<_CharT2, _Alloc2>& __left, _CharT2 __right);
+
+ // The symmetric cases are intentionally omitted, since they're
+ // presumed to be less common, and we don't handle them as well.
+
+ // The following should really be templatized. The first
+ // argument should be an input iterator or forward iterator with
+ // value_type _CharT.
+ rope&
+ append(const _CharT* __iter, size_t __n)
+ {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, __iter, __n);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope&
+ append(const _CharT* __c_string)
+ {
+ size_t __len = _S_char_ptr_len(__c_string);
+ append(__c_string, __len);
+ return(*this);
+ }
+
+ rope&
+ append(const _CharT* __s, const _CharT* __e)
+ {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, __s, __e - __s);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope&
+ append(const_iterator __s, const_iterator __e)
+ {
+ _Self_destruct_ptr __appendee(_S_substring(__s._M_root,
+ __s._M_current_pos,
+ __e._M_current_pos));
+ _RopeRep* __result = _S_concat(this->_M_tree_ptr,
+ (_RopeRep*)__appendee);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope&
+ append(_CharT __c)
+ {
+ _RopeRep* __result =
+ _S_destr_concat_char_iter(this->_M_tree_ptr, &__c, 1);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope&
+ append()
+ { return append(_CharT()); } // XXX why?
+
+ rope&
+ append(const rope& __y)
+ {
+ _RopeRep* __result = _S_concat(this->_M_tree_ptr, __y._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ rope&
+ append(size_t __n, _CharT __c)
+ {
+ rope<_CharT,_Alloc> __last(__n, __c);
+ return append(__last);
+ }
+
+ void
+ swap(rope& __b)
+ {
+ _RopeRep* __tmp = this->_M_tree_ptr;
+ this->_M_tree_ptr = __b._M_tree_ptr;
+ __b._M_tree_ptr = __tmp;
+ }
+
+ protected:
+ // Result is included in refcount.
+ static _RopeRep*
+ replace(_RopeRep* __old, size_t __pos1,
+ size_t __pos2, _RopeRep* __r)
+ {
+ if (0 == __old)
+ {
+ _S_ref(__r);
+ return __r;
+ }
+ _Self_destruct_ptr __left(_S_substring(__old, 0, __pos1));
+ _Self_destruct_ptr __right(_S_substring(__old, __pos2, __old->_M_size));
+ _RopeRep* __result;
+
+ if (0 == __r)
+ __result = _S_concat(__left, __right);
+ else
+ {
+ _Self_destruct_ptr __left_result(_S_concat(__left, __r));
+ __result = _S_concat(__left_result, __right);
+ }
+ return __result;
+ }
+
+ public:
+ void
+ insert(size_t __p, const rope& __r)
+ {
+ _RopeRep* __result =
+ replace(this->_M_tree_ptr, __p, __p, __r._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void
+ insert(size_t __p, size_t __n, _CharT __c)
+ {
+ rope<_CharT,_Alloc> __r(__n,__c);
+ insert(__p, __r);
+ }
+
+ void
+ insert(size_t __p, const _CharT* __i, size_t __n)
+ {
+ _Self_destruct_ptr __left(_S_substring(this->_M_tree_ptr, 0, __p));
+ _Self_destruct_ptr __right(_S_substring(this->_M_tree_ptr,
+ __p, size()));
+ _Self_destruct_ptr __left_result(_S_concat_char_iter(__left, __i, __n));
+ // _S_ destr_concat_char_iter should be safe here.
+ // But as it stands it's probably not a win, since __left
+ // is likely to have additional references.
+ _RopeRep* __result = _S_concat(__left_result, __right);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void
+ insert(size_t __p, const _CharT* __c_string)
+ { insert(__p, __c_string, _S_char_ptr_len(__c_string)); }
+
+ void
+ insert(size_t __p, _CharT __c)
+ { insert(__p, &__c, 1); }
+
+ void
+ insert(size_t __p)
+ {
+ _CharT __c = _CharT();
+ insert(__p, &__c, 1);
+ }
+
+ void
+ insert(size_t __p, const _CharT* __i, const _CharT* __j)
+ {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void
+ insert(size_t __p, const const_iterator& __i,
+ const const_iterator& __j)
+ {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void
+ insert(size_t __p, const iterator& __i,
+ const iterator& __j)
+ {
+ rope __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ // (position, length) versions of replace operations:
+
+ void
+ replace(size_t __p, size_t __n, const rope& __r)
+ {
+ _RopeRep* __result =
+ replace(this->_M_tree_ptr, __p, __p + __n, __r._M_tree_ptr);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ void
+ replace(size_t __p, size_t __n,
+ const _CharT* __i, size_t __i_len)
+ {
+ rope __r(__i, __i_len);
+ replace(__p, __n, __r);
+ }
+
+ void
+ replace(size_t __p, size_t __n, _CharT __c)
+ {
+ rope __r(__c);
+ replace(__p, __n, __r);
+ }
+
+ void
+ replace(size_t __p, size_t __n, const _CharT* __c_string)
+ {
+ rope __r(__c_string);
+ replace(__p, __n, __r);
+ }
+
+ void
+ replace(size_t __p, size_t __n,
+ const _CharT* __i, const _CharT* __j)
+ {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void
+ replace(size_t __p, size_t __n,
+ const const_iterator& __i, const const_iterator& __j)
+ {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void
+ replace(size_t __p, size_t __n,
+ const iterator& __i, const iterator& __j)
+ {
+ rope __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ // Single character variants:
+ void
+ replace(size_t __p, _CharT __c)
+ {
+ iterator __i(this, __p);
+ *__i = __c;
+ }
+
+ void
+ replace(size_t __p, const rope& __r)
+ { replace(__p, 1, __r); }
+
+ void
+ replace(size_t __p, const _CharT* __i, size_t __i_len)
+ { replace(__p, 1, __i, __i_len); }
+
+ void
+ replace(size_t __p, const _CharT* __c_string)
+ { replace(__p, 1, __c_string); }
+
+ void
+ replace(size_t __p, const _CharT* __i, const _CharT* __j)
+ { replace(__p, 1, __i, __j); }
+
+ void
+ replace(size_t __p, const const_iterator& __i,
+ const const_iterator& __j)
+ { replace(__p, 1, __i, __j); }
+
+ void
+ replace(size_t __p, const iterator& __i,
+ const iterator& __j)
+ { replace(__p, 1, __i, __j); }
+
+ // Erase, (position, size) variant.
+ void
+ erase(size_t __p, size_t __n)
+ {
+ _RopeRep* __result = replace(this->_M_tree_ptr, __p,
+ __p + __n, 0);
+ _S_unref(this->_M_tree_ptr);
+ this->_M_tree_ptr = __result;
+ }
+
+ // Erase, single character
+ void
+ erase(size_t __p)
+ { erase(__p, __p + 1); }
+
+ // Insert, iterator variants.
+ iterator
+ insert(const iterator& __p, const rope& __r)
+ {
+ insert(__p.index(), __r);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p, size_t __n, _CharT __c)
+ {
+ insert(__p.index(), __n, __c);
+ return __p;
+ }
+
+ iterator insert(const iterator& __p, _CharT __c)
+ {
+ insert(__p.index(), __c);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p )
+ {
+ insert(__p.index());
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p, const _CharT* c_string)
+ {
+ insert(__p.index(), c_string);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p, const _CharT* __i, size_t __n)
+ {
+ insert(__p.index(), __i, __n);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p, const _CharT* __i,
+ const _CharT* __j)
+ {
+ insert(__p.index(), __i, __j);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p,
+ const const_iterator& __i, const const_iterator& __j)
+ {
+ insert(__p.index(), __i, __j);
+ return __p;
+ }
+
+ iterator
+ insert(const iterator& __p,
+ const iterator& __i, const iterator& __j)
+ {
+ insert(__p.index(), __i, __j);
+ return __p;
+ }
+
+ // Replace, range variants.
+ void
+ replace(const iterator& __p, const iterator& __q, const rope& __r)
+ { replace(__p.index(), __q.index() - __p.index(), __r); }
+
+ void
+ replace(const iterator& __p, const iterator& __q, _CharT __c)
+ { replace(__p.index(), __q.index() - __p.index(), __c); }
+
+ void
+ replace(const iterator& __p, const iterator& __q,
+ const _CharT* __c_string)
+ { replace(__p.index(), __q.index() - __p.index(), __c_string); }
+
+ void
+ replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, size_t __n)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __n); }
+
+ void
+ replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+ void
+ replace(const iterator& __p, const iterator& __q,
+ const const_iterator& __i, const const_iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+ void
+ replace(const iterator& __p, const iterator& __q,
+ const iterator& __i, const iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+ // Replace, iterator variants.
+ void
+ replace(const iterator& __p, const rope& __r)
+ { replace(__p.index(), __r); }
+
+ void
+ replace(const iterator& __p, _CharT __c)
+ { replace(__p.index(), __c); }
+
+ void
+ replace(const iterator& __p, const _CharT* __c_string)
+ { replace(__p.index(), __c_string); }
+
+ void
+ replace(const iterator& __p, const _CharT* __i, size_t __n)
+ { replace(__p.index(), __i, __n); }
+
+ void
+ replace(const iterator& __p, const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __i, __j); }
+
+ void
+ replace(const iterator& __p, const_iterator __i, const_iterator __j)
+ { replace(__p.index(), __i, __j); }
+
+ void
+ replace(const iterator& __p, iterator __i, iterator __j)
+ { replace(__p.index(), __i, __j); }
+
+ // Iterator and range variants of erase
+ iterator
+ erase(const iterator& __p, const iterator& __q)
+ {
+ size_t __p_index = __p.index();
+ erase(__p_index, __q.index() - __p_index);
+ return iterator(this, __p_index);
+ }
+
+ iterator
+ erase(const iterator& __p)
+ {
+ size_t __p_index = __p.index();
+ erase(__p_index, 1);
+ return iterator(this, __p_index);
+ }
+
+ rope
+ substr(size_t __start, size_t __len = 1) const
+ {
+ return rope<_CharT, _Alloc>(_S_substring(this->_M_tree_ptr,
+ __start,
+ __start + __len));
+ }
+
+ rope
+ substr(iterator __start, iterator __end) const
+ {
+ return rope<_CharT, _Alloc>(_S_substring(this->_M_tree_ptr,
+ __start.index(),
+ __end.index()));
+ }
+
+ rope
+ substr(iterator __start) const
+ {
+ size_t __pos = __start.index();
+ return rope<_CharT, _Alloc>(_S_substring(this->_M_tree_ptr,
+ __pos, __pos + 1));
+ }
+
+ rope
+ substr(const_iterator __start, const_iterator __end) const
+ {
+ // This might eventually take advantage of the cache in the
+ // iterator.
+ return rope<_CharT, _Alloc>(_S_substring(this->_M_tree_ptr,
+ __start.index(),
+ __end.index()));
+ }
+
+ rope<_CharT, _Alloc>
+ substr(const_iterator __start)
+ {
+ size_t __pos = __start.index();
+ return rope<_CharT, _Alloc>(_S_substring(this->_M_tree_ptr,
+ __pos, __pos + 1));
+ }
+
+ static const size_type npos;
+
+ size_type find(_CharT __c, size_type __pos = 0) const;
+
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ size_type __result_pos;
+ const_iterator __result =
+ std::search(const_begin() + __pos, const_end(),
+ __s, __s + _S_char_ptr_len(__s));
+ __result_pos = __result.index();
+#ifndef __STL_OLD_ROPE_SEMANTICS
+ if (__result_pos == size())
+ __result_pos = npos;
+#endif
+ return __result_pos;
+ }
+
+ iterator
+ mutable_begin()
+ { return(iterator(this, 0)); }
+
+ iterator
+ mutable_end()
+ { return(iterator(this, size())); }
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+
+ reverse_iterator
+ mutable_rbegin()
+ { return reverse_iterator(mutable_end()); }
+
+ reverse_iterator
+ mutable_rend()
+ { return reverse_iterator(mutable_begin()); }
+
+ reference
+ mutable_reference_at(size_type __pos)
+ { return reference(this, __pos); }
+
+#ifdef __STD_STUFF
+ reference
+ operator[] (size_type __pos)
+ { return _char_ref_proxy(this, __pos); }
+
+ reference
+ at(size_type __pos)
+ {
+ // if (__pos >= size()) throw out_of_range; // XXX
+ return (*this)[__pos];
+ }
+
+ void resize(size_type __n, _CharT __c) { }
+ void resize(size_type __n) { }
+ void reserve(size_type __res_arg = 0) { }
+
+ size_type
+ capacity() const
+ { return max_size(); }
+
+ // Stuff below this line is dangerous because it's error prone.
+ // I would really like to get rid of it.
+ // copy function with funny arg ordering.
+ size_type
+ copy(_CharT* __buffer, size_type __n,
+ size_type __pos = 0) const
+ { return copy(__pos, __n, __buffer); }
+
+ iterator
+ end()
+ { return mutable_end(); }
+
+ iterator
+ begin()
+ { return mutable_begin(); }
+
+ reverse_iterator
+ rend()
+ { return mutable_rend(); }
+
+ reverse_iterator
+ rbegin()
+ { return mutable_rbegin(); }
+
+#else
+ const_iterator
+ end()
+ { return const_end(); }
+
+ const_iterator
+ begin()
+ { return const_begin(); }
+
+ const_reverse_iterator
+ rend()
+ { return const_rend(); }
+
+ const_reverse_iterator
+ rbegin()
+ { return const_rbegin(); }
+
+#endif
+ };
+
+ template <class _CharT, class _Alloc>
+ const typename rope<_CharT, _Alloc>::size_type
+ rope<_CharT, _Alloc>::npos = (size_type)(-1);
+
+ template <class _CharT, class _Alloc>
+ inline bool operator==(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return (__x._M_current_pos == __y._M_current_pos
+ && __x._M_root == __y._M_root); }
+
+ template <class _CharT, class _Alloc>
+ inline bool operator<(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return (__x._M_current_pos < __y._M_current_pos); }
+
+ template <class _CharT, class _Alloc>
+ inline bool operator!=(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ template <class _CharT, class _Alloc>
+ inline bool operator>(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return __y < __x; }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator<=(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator>=(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ template <class _CharT, class _Alloc>
+ inline ptrdiff_t
+ operator-(const _Rope_const_iterator<_CharT, _Alloc>& __x,
+ const _Rope_const_iterator<_CharT, _Alloc>& __y)
+ { return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_const_iterator<_CharT, _Alloc>
+ operator-(const _Rope_const_iterator<_CharT, _Alloc>& __x, ptrdiff_t __n)
+ { return _Rope_const_iterator<_CharT, _Alloc>(__x._M_root,
+ __x._M_current_pos - __n); }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_const_iterator<_CharT, _Alloc>
+ operator+(const _Rope_const_iterator<_CharT, _Alloc>& __x, ptrdiff_t __n)
+ { return _Rope_const_iterator<_CharT, _Alloc>(__x._M_root,
+ __x._M_current_pos + __n); }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_const_iterator<_CharT, _Alloc>
+ operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT, _Alloc>& __x)
+ { return _Rope_const_iterator<_CharT, _Alloc>(__x._M_root,
+ __x._M_current_pos + __n); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator==(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ {return (__x._M_current_pos == __y._M_current_pos
+ && __x._M_root_rope == __y._M_root_rope); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator<(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return (__x._M_current_pos < __y._M_current_pos); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator!=(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator>(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return __y < __x; }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator<=(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator>=(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ template <class _CharT, class _Alloc>
+ inline ptrdiff_t
+ operator-(const _Rope_iterator<_CharT, _Alloc>& __x,
+ const _Rope_iterator<_CharT, _Alloc>& __y)
+ { return ((ptrdiff_t)__x._M_current_pos
+ - (ptrdiff_t)__y._M_current_pos); }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_iterator<_CharT, _Alloc>
+ operator-(const _Rope_iterator<_CharT, _Alloc>& __x,
+ ptrdiff_t __n)
+ { return _Rope_iterator<_CharT, _Alloc>(__x._M_root_rope,
+ __x._M_current_pos - __n); }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_iterator<_CharT, _Alloc>
+ operator+(const _Rope_iterator<_CharT, _Alloc>& __x, ptrdiff_t __n)
+ { return _Rope_iterator<_CharT, _Alloc>(__x._M_root_rope,
+ __x._M_current_pos + __n); }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_iterator<_CharT, _Alloc>
+ operator+(ptrdiff_t __n, const _Rope_iterator<_CharT, _Alloc>& __x)
+ { return _Rope_iterator<_CharT, _Alloc>(__x._M_root_rope,
+ __x._M_current_pos + __n); }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left,
+ const rope<_CharT, _Alloc>& __right)
+ {
+ // Inlining this should make it possible to keep __left and
+ // __right in registers.
+ typedef rope<_CharT, _Alloc> rope_type;
+ return rope_type(rope_type::_S_concat(__left._M_tree_ptr,
+ __right._M_tree_ptr));
+ }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>&
+ operator+=(rope<_CharT, _Alloc>& __left,
+ const rope<_CharT, _Alloc>& __right)
+ {
+ __left.append(__right);
+ return __left;
+ }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left,
+ const _CharT* __right)
+ {
+ typedef rope<_CharT, _Alloc> rope_type;
+ size_t __rlen = rope_type::_S_char_ptr_len(__right);
+ return rope_type(rope_type::_S_concat_char_iter(__left._M_tree_ptr,
+ __right, __rlen));
+ }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>&
+ operator+=(rope<_CharT, _Alloc>& __left,
+ const _CharT* __right)
+ {
+ __left.append(__right);
+ return __left;
+ }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>
+ operator+(const rope<_CharT, _Alloc>& __left, _CharT __right)
+ {
+ typedef rope<_CharT, _Alloc> rope_type;
+ return rope_type(rope_type::_S_concat_char_iter(__left._M_tree_ptr,
+ &__right, 1));
+ }
+
+ template <class _CharT, class _Alloc>
+ inline rope<_CharT, _Alloc>&
+ operator+=(rope<_CharT, _Alloc>& __left, _CharT __right)
+ {
+ __left.append(__right);
+ return __left;
+ }
+
+ template <class _CharT, class _Alloc>
+ bool
+ operator<(const rope<_CharT, _Alloc>& __left,
+ const rope<_CharT, _Alloc>& __right)
+ { return __left.compare(__right) < 0; }
+
+ template <class _CharT, class _Alloc>
+ bool
+ operator==(const rope<_CharT, _Alloc>& __left,
+ const rope<_CharT, _Alloc>& __right)
+ { return __left.compare(__right) == 0; }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator==(const _Rope_char_ptr_proxy<_CharT, _Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT, _Alloc>& __y)
+ { return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator!=(const rope<_CharT, _Alloc>& __x,
+ const rope<_CharT, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator>(const rope<_CharT, _Alloc>& __x,
+ const rope<_CharT, _Alloc>& __y)
+ { return __y < __x; }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator<=(const rope<_CharT, _Alloc>& __x,
+ const rope<_CharT, _Alloc>& __y)
+ { return !(__y < __x); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator>=(const rope<_CharT, _Alloc>& __x,
+ const rope<_CharT, _Alloc>& __y)
+ { return !(__x < __y); }
+
+ template <class _CharT, class _Alloc>
+ inline bool
+ operator!=(const _Rope_char_ptr_proxy<_CharT, _Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT, _Alloc>& __y)
+ { return !(__x == __y); }
+
+ template<class _CharT, class _Traits, class _Alloc>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r);
+
+ typedef rope<char> crope;
+ typedef rope<wchar_t> wrope;
+
+ inline crope::reference
+ __mutable_reference_at(crope& __c, size_t __i)
+ { return __c.mutable_reference_at(__i); }
+
+ inline wrope::reference
+ __mutable_reference_at(wrope& __c, size_t __i)
+ { return __c.mutable_reference_at(__i); }
+
+ template <class _CharT, class _Alloc>
+ inline void
+ swap(rope<_CharT, _Alloc>& __x, rope<_CharT, _Alloc>& __y)
+ { __x.swap(__y); }
+
+_GLIBCXX_END_NAMESPACE
+
+
+namespace std
+{
+namespace tr1
+{
+ template<>
+ struct hash<__gnu_cxx::crope>
+ {
+ size_t
+ operator()(const __gnu_cxx::crope& __str) const
+ {
+ size_t __size = __str.size();
+ if (0 == __size)
+ return 0;
+ return 13 * __str[0] + 5 * __str[__size - 1] + __size;
+ }
+ };
+
+
+ template<>
+ struct hash<__gnu_cxx::wrope>
+ {
+ size_t
+ operator()(const __gnu_cxx::wrope& __str) const
+ {
+ size_t __size = __str.size();
+ if (0 == __size)
+ return 0;
+ return 13 * __str[0] + 5 * __str[__size - 1] + __size;
+ }
+ };
+} // namespace tr1
+} // namespace std
+
+# include <ext/ropeimpl.h>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/ropeimpl.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/ropeimpl.h
new file mode 100644
index 0000000..e79bca4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/ropeimpl.h
@@ -0,0 +1,1701 @@
+// SGI's rope class implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 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.
+ */
+
+/** @file ropeimpl.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#include <cstdio>
+#include <ostream>
+#include <bits/functexcept.h>
+
+#include <ext/algorithm> // For copy_n and lexicographical_compare_3way
+#include <ext/memory> // For uninitialized_copy_n
+#include <ext/numeric> // For power
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::printf;
+ using std::basic_ostream;
+ using std::__throw_length_error;
+ using std::_Destroy;
+ using std::uninitialized_fill_n;
+
+ // Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
+ // if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct.
+ // Results in a valid buf_ptr if the iterator can be legitimately
+ // dereferenced.
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator_base<_CharT, _Alloc>::
+ _S_setbuf(_Rope_iterator_base<_CharT, _Alloc>& __x)
+ {
+ const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index];
+ size_t __leaf_pos = __x._M_leaf_pos;
+ size_t __pos = __x._M_current_pos;
+
+ switch(__leaf->_M_tag)
+ {
+ case __detail::_S_leaf:
+ __x._M_buf_start = ((_Rope_RopeLeaf<_CharT, _Alloc>*)__leaf)->_M_data;
+ __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
+ __x._M_buf_end = __x._M_buf_start + __leaf->_M_size;
+ break;
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ {
+ size_t __len = _S_iterator_buf_len;
+ size_t __buf_start_pos = __leaf_pos;
+ size_t __leaf_end = __leaf_pos + __leaf->_M_size;
+ char_producer<_CharT>* __fn = ((_Rope_RopeFunction<_CharT,
+ _Alloc>*)__leaf)->_M_fn;
+ if (__buf_start_pos + __len <= __pos)
+ {
+ __buf_start_pos = __pos - __len / 4;
+ if (__buf_start_pos + __len > __leaf_end)
+ __buf_start_pos = __leaf_end - __len;
+ }
+ if (__buf_start_pos + __len > __leaf_end)
+ __len = __leaf_end - __buf_start_pos;
+ (*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf);
+ __x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos);
+ __x._M_buf_start = __x._M_tmp_buf;
+ __x._M_buf_end = __x._M_tmp_buf + __len;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // Set path and buffer inside a rope iterator. We assume that
+ // pos and root are already set.
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator_base<_CharT, _Alloc>::
+ _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x)
+ {
+ const _RopeRep* __path[int(__detail::_S_max_rope_depth) + 1];
+ const _RopeRep* __curr_rope;
+ int __curr_depth = -1; /* index into path */
+ size_t __curr_start_pos = 0;
+ size_t __pos = __x._M_current_pos;
+ unsigned char __dirns = 0; // Bit vector marking right turns in the path
+
+ if (__pos >= __x._M_root->_M_size)
+ {
+ __x._M_buf_ptr = 0;
+ return;
+ }
+ __curr_rope = __x._M_root;
+ if (0 != __curr_rope->_M_c_string)
+ {
+ /* Treat the root as a leaf. */
+ __x._M_buf_start = __curr_rope->_M_c_string;
+ __x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size;
+ __x._M_buf_ptr = __curr_rope->_M_c_string + __pos;
+ __x._M_path_end[0] = __curr_rope;
+ __x._M_leaf_index = 0;
+ __x._M_leaf_pos = 0;
+ return;
+ }
+ for(;;)
+ {
+ ++__curr_depth;
+ __path[__curr_depth] = __curr_rope;
+ switch(__curr_rope->_M_tag)
+ {
+ case __detail::_S_leaf:
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ __x._M_leaf_pos = __curr_start_pos;
+ goto done;
+ case __detail::_S_concat:
+ {
+ _Rope_RopeConcatenation<_CharT, _Alloc>* __c =
+ (_Rope_RopeConcatenation<_CharT, _Alloc>*)__curr_rope;
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size;
+
+ __dirns <<= 1;
+ if (__pos >= __curr_start_pos + __left_len)
+ {
+ __dirns |= 1;
+ __curr_rope = __c->_M_right;
+ __curr_start_pos += __left_len;
+ }
+ else
+ __curr_rope = __left;
+ }
+ break;
+ }
+ }
+ done:
+ // Copy last section of path into _M_path_end.
+ {
+ int __i = -1;
+ int __j = __curr_depth + 1 - int(_S_path_cache_len);
+
+ if (__j < 0) __j = 0;
+ while (__j <= __curr_depth)
+ __x._M_path_end[++__i] = __path[__j++];
+ __x._M_leaf_index = __i;
+ }
+ __x._M_path_directions = __dirns;
+ _S_setbuf(__x);
+ }
+
+ // Specialized version of the above. Assumes that
+ // the path cache is valid for the previous position.
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator_base<_CharT, _Alloc>::
+ _S_setcache_for_incr(_Rope_iterator_base<_CharT, _Alloc>& __x)
+ {
+ int __current_index = __x._M_leaf_index;
+ const _RopeRep* __current_node = __x._M_path_end[__current_index];
+ size_t __len = __current_node->_M_size;
+ size_t __node_start_pos = __x._M_leaf_pos;
+ unsigned char __dirns = __x._M_path_directions;
+ _Rope_RopeConcatenation<_CharT, _Alloc>* __c;
+
+ if (__x._M_current_pos - __node_start_pos < __len)
+ {
+ /* More stuff in this leaf, we just didn't cache it. */
+ _S_setbuf(__x);
+ return;
+ }
+ // node_start_pos is starting position of last_node.
+ while (--__current_index >= 0)
+ {
+ if (!(__dirns & 1) /* Path turned left */)
+ break;
+ __current_node = __x._M_path_end[__current_index];
+ __c = (_Rope_RopeConcatenation<_CharT, _Alloc>*)__current_node;
+ // Otherwise we were in the right child. Thus we should pop
+ // the concatenation node.
+ __node_start_pos -= __c->_M_left->_M_size;
+ __dirns >>= 1;
+ }
+ if (__current_index < 0)
+ {
+ // We underflowed the cache. Punt.
+ _S_setcache(__x);
+ return;
+ }
+ __current_node = __x._M_path_end[__current_index];
+ __c = (_Rope_RopeConcatenation<_CharT, _Alloc>*)__current_node;
+ // current_node is a concatenation node. We are positioned on the first
+ // character in its right child.
+ // node_start_pos is starting position of current_node.
+ __node_start_pos += __c->_M_left->_M_size;
+ __current_node = __c->_M_right;
+ __x._M_path_end[++__current_index] = __current_node;
+ __dirns |= 1;
+ while (__detail::_S_concat == __current_node->_M_tag)
+ {
+ ++__current_index;
+ if (int(_S_path_cache_len) == __current_index)
+ {
+ int __i;
+ for (__i = 0; __i < int(_S_path_cache_len) - 1; __i++)
+ __x._M_path_end[__i] = __x._M_path_end[__i+1];
+ --__current_index;
+ }
+ __current_node =
+ ((_Rope_RopeConcatenation<_CharT, _Alloc>*)__current_node)->_M_left;
+ __x._M_path_end[__current_index] = __current_node;
+ __dirns <<= 1;
+ // node_start_pos is unchanged.
+ }
+ __x._M_leaf_index = __current_index;
+ __x._M_leaf_pos = __node_start_pos;
+ __x._M_path_directions = __dirns;
+ _S_setbuf(__x);
+ }
+
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator_base<_CharT, _Alloc>::
+ _M_incr(size_t __n)
+ {
+ _M_current_pos += __n;
+ if (0 != _M_buf_ptr)
+ {
+ size_t __chars_left = _M_buf_end - _M_buf_ptr;
+ if (__chars_left > __n)
+ _M_buf_ptr += __n;
+ else if (__chars_left == __n)
+ {
+ _M_buf_ptr += __n;
+ _S_setcache_for_incr(*this);
+ }
+ else
+ _M_buf_ptr = 0;
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator_base<_CharT, _Alloc>::
+ _M_decr(size_t __n)
+ {
+ if (0 != _M_buf_ptr)
+ {
+ size_t __chars_left = _M_buf_ptr - _M_buf_start;
+ if (__chars_left >= __n)
+ _M_buf_ptr -= __n;
+ else
+ _M_buf_ptr = 0;
+ }
+ _M_current_pos -= __n;
+ }
+
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_iterator<_CharT, _Alloc>::
+ _M_check()
+ {
+ if (_M_root_rope->_M_tree_ptr != this->_M_root)
+ {
+ // _Rope was modified. Get things fixed up.
+ _RopeRep::_S_unref(this->_M_root);
+ this->_M_root = _M_root_rope->_M_tree_ptr;
+ _RopeRep::_S_ref(this->_M_root);
+ this->_M_buf_ptr = 0;
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ inline
+ _Rope_const_iterator<_CharT, _Alloc>::
+ _Rope_const_iterator(const _Rope_iterator<_CharT, _Alloc>& __x)
+ : _Rope_iterator_base<_CharT, _Alloc>(__x)
+ { }
+
+ template <class _CharT, class _Alloc>
+ inline
+ _Rope_iterator<_CharT, _Alloc>::
+ _Rope_iterator(rope<_CharT, _Alloc>& __r, size_t __pos)
+ : _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos),
+ _M_root_rope(&__r)
+ { _RopeRep::_S_ref(this->_M_root); }
+
+ template <class _CharT, class _Alloc>
+ inline size_t
+ rope<_CharT, _Alloc>::
+ _S_char_ptr_len(const _CharT* __s)
+ {
+ const _CharT* __p = __s;
+
+ while (!_S_is0(*__p))
+ ++__p;
+ return (__p - __s);
+ }
+
+
+#ifndef __GC
+
+ template <class _CharT, class _Alloc>
+ inline void
+ _Rope_RopeRep<_CharT, _Alloc>::
+ _M_free_c_string()
+ {
+ _CharT* __cstr = _M_c_string;
+ if (0 != __cstr)
+ {
+ size_t __size = this->_M_size + 1;
+ _Destroy(__cstr, __cstr + __size, _M_get_allocator());
+ this->_Data_deallocate(__cstr, __size);
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ inline void
+ _Rope_RopeRep<_CharT, _Alloc>::
+ _S_free_string(_CharT* __s, size_t __n, allocator_type& __a)
+ {
+ if (!_S_is_basic_char_type((_CharT*)0))
+ _Destroy(__s, __s + __n, __a);
+
+ // This has to be a static member, so this gets a bit messy
+ __a.deallocate(__s,
+ _Rope_RopeLeaf<_CharT, _Alloc>::_S_rounded_up_size(__n));
+ }
+
+ // There are several reasons for not doing this with virtual destructors
+ // and a class specific delete operator:
+ // - A class specific delete operator can't easily get access to
+ // allocator instances if we need them.
+ // - Any virtual function would need a 4 or byte vtable pointer;
+ // this only requires a one byte tag per object.
+ template <class _CharT, class _Alloc>
+ void
+ _Rope_RopeRep<_CharT, _Alloc>::
+ _M_free_tree()
+ {
+ switch(_M_tag)
+ {
+ case __detail::_S_leaf:
+ {
+ _Rope_RopeLeaf<_CharT, _Alloc>* __l
+ = (_Rope_RopeLeaf<_CharT, _Alloc>*)this;
+ __l->_Rope_RopeLeaf<_CharT, _Alloc>::~_Rope_RopeLeaf();
+ _L_deallocate(__l, 1);
+ break;
+ }
+ case __detail::_S_concat:
+ {
+ _Rope_RopeConcatenation<_CharT,_Alloc>* __c
+ = (_Rope_RopeConcatenation<_CharT, _Alloc>*)this;
+ __c->_Rope_RopeConcatenation<_CharT, _Alloc>::
+ ~_Rope_RopeConcatenation();
+ _C_deallocate(__c, 1);
+ break;
+ }
+ case __detail::_S_function:
+ {
+ _Rope_RopeFunction<_CharT, _Alloc>* __f
+ = (_Rope_RopeFunction<_CharT, _Alloc>*)this;
+ __f->_Rope_RopeFunction<_CharT, _Alloc>::~_Rope_RopeFunction();
+ _F_deallocate(__f, 1);
+ break;
+ }
+ case __detail::_S_substringfn:
+ {
+ _Rope_RopeSubstring<_CharT, _Alloc>* __ss =
+ (_Rope_RopeSubstring<_CharT, _Alloc>*)this;
+ __ss->_Rope_RopeSubstring<_CharT, _Alloc>::
+ ~_Rope_RopeSubstring();
+ _S_deallocate(__ss, 1);
+ break;
+ }
+ }
+ }
+#else
+
+ template <class _CharT, class _Alloc>
+ inline void
+ _Rope_RopeRep<_CharT, _Alloc>::
+ _S_free_string(const _CharT*, size_t, allocator_type)
+ { }
+
+#endif
+
+ // Concatenate a C string onto a leaf rope by copying the rope data.
+ // Used for short ropes.
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeLeaf*
+ rope<_CharT, _Alloc>::
+ _S_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
+ {
+ size_t __old_len = __r->_M_size;
+ _CharT* __new_data = (_CharT*)
+ _Data_allocate(_S_rounded_up_size(__old_len + __len));
+ _RopeLeaf* __result;
+
+ uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
+ uninitialized_copy_n(__iter, __len, __new_data + __old_len);
+ _S_cond_store_eos(__new_data[__old_len + __len]);
+ __try
+ {
+ __result = _S_new_RopeLeaf(__new_data, __old_len + __len,
+ __r->_M_get_allocator());
+ }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len,
+ __r->_M_get_allocator());
+ __throw_exception_again;
+ }
+ return __result;
+ }
+
+#ifndef __GC
+ // As above, but it's OK to clobber original if refcount is 1
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT,_Alloc>::_RopeLeaf*
+ rope<_CharT, _Alloc>::
+ _S_destr_leaf_concat_char_iter(_RopeLeaf* __r, const _CharT* __iter,
+ size_t __len)
+ {
+ if (__r->_M_ref_count > 1)
+ return _S_leaf_concat_char_iter(__r, __iter, __len);
+ size_t __old_len = __r->_M_size;
+ if (_S_allocated_capacity(__old_len) >= __old_len + __len)
+ {
+ // The space has been partially initialized for the standard
+ // character types. But that doesn't matter for those types.
+ uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len);
+ if (_S_is_basic_char_type((_CharT*)0))
+ _S_cond_store_eos(__r->_M_data[__old_len + __len]);
+ else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string)
+ {
+ __r->_M_free_c_string();
+ __r->_M_c_string = 0;
+ }
+ __r->_M_size = __old_len + __len;
+ __r->_M_ref_count = 2;
+ return __r;
+ }
+ else
+ {
+ _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
+ return __result;
+ }
+ }
+#endif
+
+ // Assumes left and right are not 0.
+ // Does not increment (nor decrement on exception) child reference counts.
+ // Result has ref count 1.
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeRep*
+ rope<_CharT, _Alloc>::
+ _S_tree_concat(_RopeRep* __left, _RopeRep* __right)
+ {
+ _RopeConcatenation* __result = _S_new_RopeConcatenation(__left, __right,
+ __left->
+ _M_get_allocator());
+ size_t __depth = __result->_M_depth;
+
+ if (__depth > 20
+ && (__result->_M_size < 1000
+ || __depth > size_t(__detail::_S_max_rope_depth)))
+ {
+ _RopeRep* __balanced;
+
+ __try
+ {
+ __balanced = _S_balance(__result);
+ __result->_M_unref_nonnil();
+ }
+ __catch(...)
+ {
+ _C_deallocate(__result,1);
+ __throw_exception_again;
+ }
+ // In case of exception, we need to deallocate
+ // otherwise dangling result node. But caller
+ // still owns its children. Thus unref is
+ // inappropriate.
+ return __balanced;
+ }
+ else
+ return __result;
+ }
+
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeRep*
+ rope<_CharT, _Alloc>::
+ _S_concat_char_iter(_RopeRep* __r, const _CharT*__s, size_t __slen)
+ {
+ _RopeRep* __result;
+ if (0 == __slen)
+ {
+ _S_ref(__r);
+ return __r;
+ }
+ if (0 == __r)
+ return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
+ __r->_M_get_allocator());
+ if (__r->_M_tag == __detail::_S_leaf
+ && __r->_M_size + __slen <= size_t(_S_copy_max))
+ {
+ __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
+ return __result;
+ }
+ if (__detail::_S_concat == __r->_M_tag
+ && __detail::_S_leaf == ((_RopeConcatenation*) __r)->_M_right->_M_tag)
+ {
+ _RopeLeaf* __right =
+ (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
+ if (__right->_M_size + __slen <= size_t(_S_copy_max))
+ {
+ _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
+ _RopeRep* __nright =
+ _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
+ __left->_M_ref_nonnil();
+ __try
+ { __result = _S_tree_concat(__left, __nright); }
+ __catch(...)
+ {
+ _S_unref(__left);
+ _S_unref(__nright);
+ __throw_exception_again;
+ }
+ return __result;
+ }
+ }
+ _RopeRep* __nright =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
+ __try
+ {
+ __r->_M_ref_nonnil();
+ __result = _S_tree_concat(__r, __nright);
+ }
+ __catch(...)
+ {
+ _S_unref(__r);
+ _S_unref(__nright);
+ __throw_exception_again;
+ }
+ return __result;
+ }
+
+#ifndef __GC
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT,_Alloc>::_RopeRep*
+ rope<_CharT,_Alloc>::
+ _S_destr_concat_char_iter(_RopeRep* __r, const _CharT* __s, size_t __slen)
+ {
+ _RopeRep* __result;
+ if (0 == __r)
+ return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
+ __r->_M_get_allocator());
+ size_t __count = __r->_M_ref_count;
+ size_t __orig_size = __r->_M_size;
+ if (__count > 1)
+ return _S_concat_char_iter(__r, __s, __slen);
+ if (0 == __slen)
+ {
+ __r->_M_ref_count = 2; // One more than before
+ return __r;
+ }
+ if (__orig_size + __slen <= size_t(_S_copy_max)
+ && __detail::_S_leaf == __r->_M_tag)
+ {
+ __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s,
+ __slen);
+ return __result;
+ }
+ if (__detail::_S_concat == __r->_M_tag)
+ {
+ _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)
+ __r)->_M_right);
+ if (__detail::_S_leaf == __right->_M_tag
+ && __right->_M_size + __slen <= size_t(_S_copy_max))
+ {
+ _RopeRep* __new_right =
+ _S_destr_leaf_concat_char_iter(__right, __s, __slen);
+ if (__right == __new_right)
+ __new_right->_M_ref_count = 1;
+ else
+ __right->_M_unref_nonnil();
+ __r->_M_ref_count = 2; // One more than before.
+ ((_RopeConcatenation*)__r)->_M_right = __new_right;
+ __r->_M_size = __orig_size + __slen;
+ if (0 != __r->_M_c_string)
+ {
+ __r->_M_free_c_string();
+ __r->_M_c_string = 0;
+ }
+ return __r;
+ }
+ }
+ _RopeRep* __right =
+ __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->_M_get_allocator());
+ __r->_M_ref_nonnil();
+ __try
+ { __result = _S_tree_concat(__r, __right); }
+ __catch(...)
+ {
+ _S_unref(__r);
+ _S_unref(__right);
+ __throw_exception_again;
+ }
+ return __result;
+ }
+#endif /* !__GC */
+
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeRep*
+ rope<_CharT, _Alloc>::
+ _S_concat(_RopeRep* __left, _RopeRep* __right)
+ {
+ if (0 == __left)
+ {
+ _S_ref(__right);
+ return __right;
+ }
+ if (0 == __right)
+ {
+ __left->_M_ref_nonnil();
+ return __left;
+ }
+ if (__detail::_S_leaf == __right->_M_tag)
+ {
+ if (__detail::_S_leaf == __left->_M_tag)
+ {
+ if (__right->_M_size + __left->_M_size <= size_t(_S_copy_max))
+ return _S_leaf_concat_char_iter((_RopeLeaf*)__left,
+ ((_RopeLeaf*)__right)->_M_data,
+ __right->_M_size);
+ }
+ else if (__detail::_S_concat == __left->_M_tag
+ && __detail::_S_leaf == ((_RopeConcatenation*)
+ __left)->_M_right->_M_tag)
+ {
+ _RopeLeaf* __leftright =
+ (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right);
+ if (__leftright->_M_size
+ + __right->_M_size <= size_t(_S_copy_max))
+ {
+ _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left;
+ _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
+ ((_RopeLeaf*)
+ __right)->
+ _M_data,
+ __right->_M_size);
+ __leftleft->_M_ref_nonnil();
+ __try
+ { return(_S_tree_concat(__leftleft, __rest)); }
+ __catch(...)
+ {
+ _S_unref(__leftleft);
+ _S_unref(__rest);
+ __throw_exception_again;
+ }
+ }
+ }
+ }
+ __left->_M_ref_nonnil();
+ __right->_M_ref_nonnil();
+ __try
+ { return(_S_tree_concat(__left, __right)); }
+ __catch(...)
+ {
+ _S_unref(__left);
+ _S_unref(__right);
+ __throw_exception_again;
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeRep*
+ rope<_CharT, _Alloc>::
+ _S_substring(_RopeRep* __base, size_t __start, size_t __endp1)
+ {
+ if (0 == __base)
+ return 0;
+ size_t __len = __base->_M_size;
+ size_t __adj_endp1;
+ const size_t __lazy_threshold = 128;
+
+ if (__endp1 >= __len)
+ {
+ if (0 == __start)
+ {
+ __base->_M_ref_nonnil();
+ return __base;
+ }
+ else
+ __adj_endp1 = __len;
+
+ }
+ else
+ __adj_endp1 = __endp1;
+
+ switch(__base->_M_tag)
+ {
+ case __detail::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__base;
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+ size_t __left_len = __left->_M_size;
+ _RopeRep* __result;
+
+ if (__adj_endp1 <= __left_len)
+ return _S_substring(__left, __start, __endp1);
+ else if (__start >= __left_len)
+ return _S_substring(__right, __start - __left_len,
+ __adj_endp1 - __left_len);
+ _Self_destruct_ptr __left_result(_S_substring(__left,
+ __start,
+ __left_len));
+ _Self_destruct_ptr __right_result(_S_substring(__right, 0,
+ __endp1
+ - __left_len));
+ __result = _S_concat(__left_result, __right_result);
+ return __result;
+ }
+ case __detail::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__base;
+ _RopeLeaf* __result;
+ size_t __result_len;
+ if (__start >= __adj_endp1)
+ return 0;
+ __result_len = __adj_endp1 - __start;
+ if (__result_len > __lazy_threshold)
+ goto lazy;
+#ifdef __GC
+ const _CharT* __section = __l->_M_data + __start;
+ __result = _S_new_RopeLeaf(__section, __result_len,
+ __base->_M_get_allocator());
+ __result->_M_c_string = 0; // Not eos terminated.
+#else
+ // We should sometimes create substring node instead.
+ __result = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__l->_M_data + __start,
+ __result_len,
+ __base->
+ _M_get_allocator());
+#endif
+ return __result;
+ }
+ case __detail::_S_substringfn:
+ // Avoid introducing multiple layers of substring nodes.
+ {
+ _RopeSubstring* __old = (_RopeSubstring*)__base;
+ size_t __result_len;
+ if (__start >= __adj_endp1)
+ return 0;
+ __result_len = __adj_endp1 - __start;
+ if (__result_len > __lazy_threshold)
+ {
+ _RopeSubstring* __result =
+ _S_new_RopeSubstring(__old->_M_base,
+ __start + __old->_M_start,
+ __adj_endp1 - __start,
+ __base->_M_get_allocator());
+ return __result;
+
+ } // *** else fall through: ***
+ }
+ case __detail::_S_function:
+ {
+ _RopeFunction* __f = (_RopeFunction*)__base;
+ _CharT* __section;
+ size_t __result_len;
+ if (__start >= __adj_endp1)
+ return 0;
+ __result_len = __adj_endp1 - __start;
+
+ if (__result_len > __lazy_threshold)
+ goto lazy;
+ __section = (_CharT*)
+ _Data_allocate(_S_rounded_up_size(__result_len));
+ __try
+ { (*(__f->_M_fn))(__start, __result_len, __section); }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__section, __result_len,
+ __base->_M_get_allocator());
+ __throw_exception_again;
+ }
+ _S_cond_store_eos(__section[__result_len]);
+ return _S_new_RopeLeaf(__section, __result_len,
+ __base->_M_get_allocator());
+ }
+ }
+ lazy:
+ {
+ // Create substring node.
+ return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start,
+ __base->_M_get_allocator());
+ }
+ }
+
+ template<class _CharT>
+ class _Rope_flatten_char_consumer
+ : public _Rope_char_consumer<_CharT>
+ {
+ private:
+ _CharT* _M_buf_ptr;
+ public:
+
+ _Rope_flatten_char_consumer(_CharT* __buffer)
+ { _M_buf_ptr = __buffer; };
+
+ ~_Rope_flatten_char_consumer() {}
+
+ bool
+ operator()(const _CharT* __leaf, size_t __n)
+ {
+ uninitialized_copy_n(__leaf, __n, _M_buf_ptr);
+ _M_buf_ptr += __n;
+ return true;
+ }
+ };
+
+ template<class _CharT>
+ class _Rope_find_char_char_consumer
+ : public _Rope_char_consumer<_CharT>
+ {
+ private:
+ _CharT _M_pattern;
+ public:
+ size_t _M_count; // Number of nonmatching characters
+
+ _Rope_find_char_char_consumer(_CharT __p)
+ : _M_pattern(__p), _M_count(0) {}
+
+ ~_Rope_find_char_char_consumer() {}
+
+ bool
+ operator()(const _CharT* __leaf, size_t __n)
+ {
+ size_t __i;
+ for (__i = 0; __i < __n; __i++)
+ {
+ if (__leaf[__i] == _M_pattern)
+ {
+ _M_count += __i;
+ return false;
+ }
+ }
+ _M_count += __n; return true;
+ }
+ };
+
+ template<class _CharT, class _Traits>
+ // Here _CharT is both the stream and rope character type.
+ class _Rope_insert_char_consumer
+ : public _Rope_char_consumer<_CharT>
+ {
+ private:
+ typedef basic_ostream<_CharT,_Traits> _Insert_ostream;
+ _Insert_ostream& _M_o;
+ public:
+ _Rope_insert_char_consumer(_Insert_ostream& __writer)
+ : _M_o(__writer) {};
+ ~_Rope_insert_char_consumer() { };
+ // Caller is presumed to own the ostream
+ bool operator() (const _CharT* __leaf, size_t __n);
+ // Returns true to continue traversal.
+ };
+
+ template<class _CharT, class _Traits>
+ bool
+ _Rope_insert_char_consumer<_CharT, _Traits>::
+ operator()(const _CharT* __leaf, size_t __n)
+ {
+ size_t __i;
+ // We assume that formatting is set up correctly for each element.
+ for (__i = 0; __i < __n; __i++)
+ _M_o.put(__leaf[__i]);
+ return true;
+ }
+
+ template <class _CharT, class _Alloc>
+ bool
+ rope<_CharT, _Alloc>::
+ _S_apply_to_pieces(_Rope_char_consumer<_CharT>& __c,
+ const _RopeRep* __r, size_t __begin, size_t __end)
+ {
+ if (0 == __r)
+ return true;
+ switch(__r->_M_tag)
+ {
+ case __detail::_S_concat:
+ {
+ _RopeConcatenation* __conc = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __conc->_M_left;
+ size_t __left_len = __left->_M_size;
+ if (__begin < __left_len)
+ {
+ size_t __left_end = std::min(__left_len, __end);
+ if (!_S_apply_to_pieces(__c, __left, __begin, __left_end))
+ return false;
+ }
+ if (__end > __left_len)
+ {
+ _RopeRep* __right = __conc->_M_right;
+ size_t __right_start = std::max(__left_len, __begin);
+ if (!_S_apply_to_pieces(__c, __right,
+ __right_start - __left_len,
+ __end - __left_len))
+ return false;
+ }
+ }
+ return true;
+ case __detail::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ return __c(__l->_M_data + __begin, __end - __begin);
+ }
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ {
+ _RopeFunction* __f = (_RopeFunction*)__r;
+ size_t __len = __end - __begin;
+ bool __result;
+ _CharT* __buffer =
+ (_CharT*)_Alloc().allocate(__len * sizeof(_CharT));
+ __try
+ {
+ (*(__f->_M_fn))(__begin, __len, __buffer);
+ __result = __c(__buffer, __len);
+ _Alloc().deallocate(__buffer, __len * sizeof(_CharT));
+ }
+ __catch(...)
+ {
+ _Alloc().deallocate(__buffer, __len * sizeof(_CharT));
+ __throw_exception_again;
+ }
+ return __result;
+ }
+ default:
+ return false;
+ }
+ }
+
+ template<class _CharT, class _Traits>
+ inline void
+ _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n)
+ {
+ char __f = __o.fill();
+ size_t __i;
+
+ for (__i = 0; __i < __n; __i++)
+ __o.put(__f);
+ }
+
+
+ template <class _CharT>
+ inline bool
+ _Rope_is_simple(_CharT*)
+ { return false; }
+
+ inline bool
+ _Rope_is_simple(char*)
+ { return true; }
+
+ inline bool
+ _Rope_is_simple(wchar_t*)
+ { return true; }
+
+ template<class _CharT, class _Traits, class _Alloc>
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r)
+ {
+ size_t __w = __o.width();
+ bool __left = bool(__o.flags() & std::ios::left);
+ size_t __pad_len;
+ size_t __rope_len = __r.size();
+ _Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
+ bool __is_simple = _Rope_is_simple((_CharT*)0);
+
+ if (__rope_len < __w)
+ __pad_len = __w - __rope_len;
+ else
+ __pad_len = 0;
+
+ if (!__is_simple)
+ __o.width(__w / __rope_len);
+ __try
+ {
+ if (__is_simple && !__left && __pad_len > 0)
+ _Rope_fill(__o, __pad_len);
+ __r.apply_to_pieces(0, __r.size(), __c);
+ if (__is_simple && __left && __pad_len > 0)
+ _Rope_fill(__o, __pad_len);
+ if (!__is_simple)
+ __o.width(__w);
+ }
+ __catch(...)
+ {
+ if (!__is_simple)
+ __o.width(__w);
+ __throw_exception_again;
+ }
+ return __o;
+ }
+
+ template <class _CharT, class _Alloc>
+ _CharT*
+ rope<_CharT, _Alloc>::
+ _S_flatten(_RopeRep* __r, size_t __start, size_t __len,
+ _CharT* __buffer)
+ {
+ _Rope_flatten_char_consumer<_CharT> __c(__buffer);
+ _S_apply_to_pieces(__c, __r, __start, __start + __len);
+ return(__buffer + __len);
+ }
+
+ template <class _CharT, class _Alloc>
+ size_t
+ rope<_CharT, _Alloc>::
+ find(_CharT __pattern, size_t __start) const
+ {
+ _Rope_find_char_char_consumer<_CharT> __c(__pattern);
+ _S_apply_to_pieces(__c, this->_M_tree_ptr, __start, size());
+ size_type __result_pos = __start + __c._M_count;
+#ifndef __STL_OLD_ROPE_SEMANTICS
+ if (__result_pos == size())
+ __result_pos = npos;
+#endif
+ return __result_pos;
+ }
+
+ template <class _CharT, class _Alloc>
+ _CharT*
+ rope<_CharT, _Alloc>::
+ _S_flatten(_RopeRep* __r, _CharT* __buffer)
+ {
+ if (0 == __r)
+ return __buffer;
+ switch(__r->_M_tag)
+ {
+ case __detail::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+ _CharT* __rest = _S_flatten(__left, __buffer);
+ return _S_flatten(__right, __rest);
+ }
+ case __detail::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ return copy_n(__l->_M_data, __l->_M_size, __buffer).second;
+ }
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ // We don't yet do anything with substring nodes.
+ // This needs to be fixed before ropefiles will work well.
+ {
+ _RopeFunction* __f = (_RopeFunction*)__r;
+ (*(__f->_M_fn))(0, __f->_M_size, __buffer);
+ return __buffer + __f->_M_size;
+ }
+ default:
+ return 0;
+ }
+ }
+
+ // This needs work for _CharT != char
+ template <class _CharT, class _Alloc>
+ void
+ rope<_CharT, _Alloc>::
+ _S_dump(_RopeRep* __r, int __indent)
+ {
+ for (int __i = 0; __i < __indent; __i++)
+ putchar(' ');
+ if (0 == __r)
+ {
+ printf("NULL\n");
+ return;
+ }
+ if (_S_concat == __r->_M_tag)
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+
+#ifdef __GC
+ printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n",
+ __r, __r->_M_depth, __r->_M_size,
+ __r->_M_is_balanced? "" : "not");
+#else
+ printf("Concatenation %p (rc = %ld, depth = %d, "
+ "len = %ld, %s balanced)\n",
+ __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size,
+ __r->_M_is_balanced? "" : "not");
+#endif
+ _S_dump(__left, __indent + 2);
+ _S_dump(__right, __indent + 2);
+ return;
+ }
+ else
+ {
+ char* __kind;
+
+ switch (__r->_M_tag)
+ {
+ case __detail::_S_leaf:
+ __kind = "Leaf";
+ break;
+ case __detail::_S_function:
+ __kind = "Function";
+ break;
+ case __detail::_S_substringfn:
+ __kind = "Function representing substring";
+ break;
+ default:
+ __kind = "(corrupted kind field!)";
+ }
+#ifdef __GC
+ printf("%s %p (depth = %d, len = %ld) ",
+ __kind, __r, __r->_M_depth, __r->_M_size);
+#else
+ printf("%s %p (rc = %ld, depth = %d, len = %ld) ",
+ __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size);
+#endif
+ if (_S_is_one_byte_char_type((_CharT*)0))
+ {
+ const int __max_len = 40;
+ _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
+ _CharT __buffer[__max_len + 1];
+ bool __too_big = __r->_M_size > __prefix->_M_size;
+
+ _S_flatten(__prefix, __buffer);
+ __buffer[__prefix->_M_size] = _S_eos((_CharT*)0);
+ printf("%s%s\n", (char*)__buffer,
+ __too_big? "...\n" : "\n");
+ }
+ else
+ printf("\n");
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ const unsigned long
+ rope<_CharT, _Alloc>::
+ _S_min_len[int(__detail::_S_max_rope_depth) + 1] = {
+ /* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21,
+ /* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377,
+ /* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181,
+ /* 18 */6765, /* 19 */10946, /* 20 */17711, /* 21 */28657, /* 22 */46368,
+ /* 23 */75025, /* 24 */121393, /* 25 */196418, /* 26 */317811,
+ /* 27 */514229, /* 28 */832040, /* 29 */1346269, /* 30 */2178309,
+ /* 31 */3524578, /* 32 */5702887, /* 33 */9227465, /* 34 */14930352,
+ /* 35 */24157817, /* 36 */39088169, /* 37 */63245986, /* 38 */102334155,
+ /* 39 */165580141, /* 40 */267914296, /* 41 */433494437,
+ /* 42 */701408733, /* 43 */1134903170, /* 44 */1836311903,
+ /* 45 */2971215073u };
+ // These are Fibonacci numbers < 2**32.
+
+ template <class _CharT, class _Alloc>
+ typename rope<_CharT, _Alloc>::_RopeRep*
+ rope<_CharT, _Alloc>::
+ _S_balance(_RopeRep* __r)
+ {
+ _RopeRep* __forest[int(__detail::_S_max_rope_depth) + 1];
+ _RopeRep* __result = 0;
+ int __i;
+ // Invariant:
+ // The concatenation of forest in descending order is equal to __r.
+ // __forest[__i]._M_size >= _S_min_len[__i]
+ // __forest[__i]._M_depth = __i
+ // References from forest are included in refcount.
+
+ for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
+ __forest[__i] = 0;
+ __try
+ {
+ _S_add_to_forest(__r, __forest);
+ for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
+ if (0 != __forest[__i])
+ {
+#ifndef __GC
+ _Self_destruct_ptr __old(__result);
+#endif
+ __result = _S_concat(__forest[__i], __result);
+ __forest[__i]->_M_unref_nonnil();
+#if !defined(__GC) && defined(__EXCEPTIONS)
+ __forest[__i] = 0;
+#endif
+ }
+ }
+ __catch(...)
+ {
+ for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++)
+ _S_unref(__forest[__i]);
+ __throw_exception_again;
+ }
+
+ if (__result->_M_depth > int(__detail::_S_max_rope_depth))
+ __throw_length_error(__N("rope::_S_balance"));
+ return(__result);
+ }
+
+ template <class _CharT, class _Alloc>
+ void
+ rope<_CharT, _Alloc>::
+ _S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
+ {
+ if (__r->_M_is_balanced)
+ {
+ _S_add_leaf_to_forest(__r, __forest);
+ return;
+ }
+
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+
+ _S_add_to_forest(__c->_M_left, __forest);
+ _S_add_to_forest(__c->_M_right, __forest);
+ }
+ }
+
+
+ template <class _CharT, class _Alloc>
+ void
+ rope<_CharT, _Alloc>::
+ _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
+ {
+ _RopeRep* __insertee; // included in refcount
+ _RopeRep* __too_tiny = 0; // included in refcount
+ int __i; // forest[0..__i-1] is empty
+ size_t __s = __r->_M_size;
+
+ for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i)
+ {
+ if (0 != __forest[__i])
+ {
+#ifndef __GC
+ _Self_destruct_ptr __old(__too_tiny);
+#endif
+ __too_tiny = _S_concat_and_set_balanced(__forest[__i],
+ __too_tiny);
+ __forest[__i]->_M_unref_nonnil();
+ __forest[__i] = 0;
+ }
+ }
+ {
+#ifndef __GC
+ _Self_destruct_ptr __old(__too_tiny);
+#endif
+ __insertee = _S_concat_and_set_balanced(__too_tiny, __r);
+ }
+ // Too_tiny dead, and no longer included in refcount.
+ // Insertee is live and included.
+ for (;; ++__i)
+ {
+ if (0 != __forest[__i])
+ {
+#ifndef __GC
+ _Self_destruct_ptr __old(__insertee);
+#endif
+ __insertee = _S_concat_and_set_balanced(__forest[__i],
+ __insertee);
+ __forest[__i]->_M_unref_nonnil();
+ __forest[__i] = 0;
+ }
+ if (__i == int(__detail::_S_max_rope_depth)
+ || __insertee->_M_size < _S_min_len[__i+1])
+ {
+ __forest[__i] = __insertee;
+ // refcount is OK since __insertee is now dead.
+ return;
+ }
+ }
+ }
+
+ template <class _CharT, class _Alloc>
+ _CharT
+ rope<_CharT, _Alloc>::
+ _S_fetch(_RopeRep* __r, size_type __i)
+ {
+ __GC_CONST _CharT* __cstr = __r->_M_c_string;
+
+ if (0 != __cstr)
+ return __cstr[__i];
+ for(;;)
+ {
+ switch(__r->_M_tag)
+ {
+ case __detail::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size;
+
+ if (__i >= __left_len)
+ {
+ __i -= __left_len;
+ __r = __c->_M_right;
+ }
+ else
+ __r = __left;
+ }
+ break;
+ case __detail::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ return __l->_M_data[__i];
+ }
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ {
+ _RopeFunction* __f = (_RopeFunction*)__r;
+ _CharT __result;
+
+ (*(__f->_M_fn))(__i, 1, &__result);
+ return __result;
+ }
+ }
+ }
+ }
+
+#ifndef __GC
+ // Return a uniquely referenced character slot for the given
+ // position, or 0 if that's not possible.
+ template <class _CharT, class _Alloc>
+ _CharT*
+ rope<_CharT, _Alloc>::
+ _S_fetch_ptr(_RopeRep* __r, size_type __i)
+ {
+ _RopeRep* __clrstack[__detail::_S_max_rope_depth];
+ size_t __csptr = 0;
+
+ for(;;)
+ {
+ if (__r->_M_ref_count > 1)
+ return 0;
+ switch(__r->_M_tag)
+ {
+ case __detail::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size;
+
+ if (__c->_M_c_string != 0)
+ __clrstack[__csptr++] = __c;
+ if (__i >= __left_len)
+ {
+ __i -= __left_len;
+ __r = __c->_M_right;
+ }
+ else
+ __r = __left;
+ }
+ break;
+ case __detail::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
+ __clrstack[__csptr++] = __l;
+ while (__csptr > 0)
+ {
+ -- __csptr;
+ _RopeRep* __d = __clrstack[__csptr];
+ __d->_M_free_c_string();
+ __d->_M_c_string = 0;
+ }
+ return __l->_M_data + __i;
+ }
+ case __detail::_S_function:
+ case __detail::_S_substringfn:
+ return 0;
+ }
+ }
+ }
+#endif /* __GC */
+
+ // The following could be implemented trivially using
+ // lexicographical_compare_3way.
+ // We do a little more work to avoid dealing with rope iterators for
+ // flat strings.
+ template <class _CharT, class _Alloc>
+ int
+ rope<_CharT, _Alloc>::
+ _S_compare (const _RopeRep* __left, const _RopeRep* __right)
+ {
+ size_t __left_len;
+ size_t __right_len;
+
+ if (0 == __right)
+ return 0 != __left;
+ if (0 == __left)
+ return -1;
+ __left_len = __left->_M_size;
+ __right_len = __right->_M_size;
+ if (__detail::_S_leaf == __left->_M_tag)
+ {
+ _RopeLeaf* __l = (_RopeLeaf*) __left;
+ if (__detail::_S_leaf == __right->_M_tag)
+ {
+ _RopeLeaf* __r = (_RopeLeaf*) __right;
+ return lexicographical_compare_3way(__l->_M_data,
+ __l->_M_data + __left_len,
+ __r->_M_data, __r->_M_data
+ + __right_len);
+ }
+ else
+ {
+ const_iterator __rstart(__right, 0);
+ const_iterator __rend(__right, __right_len);
+ return lexicographical_compare_3way(__l->_M_data, __l->_M_data
+ + __left_len,
+ __rstart, __rend);
+ }
+ }
+ else
+ {
+ const_iterator __lstart(__left, 0);
+ const_iterator __lend(__left, __left_len);
+ if (__detail::_S_leaf == __right->_M_tag)
+ {
+ _RopeLeaf* __r = (_RopeLeaf*) __right;
+ return lexicographical_compare_3way(__lstart, __lend,
+ __r->_M_data, __r->_M_data
+ + __right_len);
+ }
+ else
+ {
+ const_iterator __rstart(__right, 0);
+ const_iterator __rend(__right, __right_len);
+ return lexicographical_compare_3way(__lstart, __lend,
+ __rstart, __rend);
+ }
+ }
+ }
+
+ // Assignment to reference proxies.
+ template <class _CharT, class _Alloc>
+ _Rope_char_ref_proxy<_CharT, _Alloc>&
+ _Rope_char_ref_proxy<_CharT, _Alloc>::
+ operator=(_CharT __c)
+ {
+ _RopeRep* __old = _M_root->_M_tree_ptr;
+#ifndef __GC
+ // First check for the case in which everything is uniquely
+ // referenced. In that case we can do this destructively.
+ _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos);
+ if (0 != __ptr)
+ {
+ *__ptr = __c;
+ return *this;
+ }
+#endif
+ _Self_destruct_ptr __left(_My_rope::_S_substring(__old, 0, _M_pos));
+ _Self_destruct_ptr __right(_My_rope::_S_substring(__old, _M_pos + 1,
+ __old->_M_size));
+ _Self_destruct_ptr __result_left(_My_rope::
+ _S_destr_concat_char_iter(__left,
+ &__c, 1));
+
+ _RopeRep* __result = _My_rope::_S_concat(__result_left, __right);
+#ifndef __GC
+ _RopeRep::_S_unref(__old);
+#endif
+ _M_root->_M_tree_ptr = __result;
+ return *this;
+ }
+
+ template <class _CharT, class _Alloc>
+ inline _Rope_char_ref_proxy<_CharT, _Alloc>::
+ operator _CharT() const
+ {
+ if (_M_current_valid)
+ return _M_current;
+ else
+ return _My_rope::_S_fetch(_M_root->_M_tree_ptr, _M_pos);
+ }
+
+ template <class _CharT, class _Alloc>
+ _Rope_char_ptr_proxy<_CharT, _Alloc>
+ _Rope_char_ref_proxy<_CharT, _Alloc>::
+ operator&() const
+ { return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this); }
+
+ template <class _CharT, class _Alloc>
+ rope<_CharT, _Alloc>::
+ rope(size_t __n, _CharT __c, const allocator_type& __a)
+ : _Base(__a)
+ {
+ rope<_CharT,_Alloc> __result;
+ const size_t __exponentiate_threshold = 32;
+ size_t __exponent;
+ size_t __rest;
+ _CharT* __rest_buffer;
+ _RopeRep* __remainder;
+ rope<_CharT, _Alloc> __remainder_rope;
+
+ if (0 == __n)
+ return;
+
+ __exponent = __n / __exponentiate_threshold;
+ __rest = __n % __exponentiate_threshold;
+ if (0 == __rest)
+ __remainder = 0;
+ else
+ {
+ __rest_buffer = this->_Data_allocate(_S_rounded_up_size(__rest));
+ __uninitialized_fill_n_a(__rest_buffer, __rest, __c,
+ _M_get_allocator());
+ _S_cond_store_eos(__rest_buffer[__rest]);
+ __try
+ { __remainder = _S_new_RopeLeaf(__rest_buffer, __rest,
+ _M_get_allocator()); }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__rest_buffer, __rest,
+ _M_get_allocator());
+ __throw_exception_again;
+ }
+ }
+ __remainder_rope._M_tree_ptr = __remainder;
+ if (__exponent != 0)
+ {
+ _CharT* __base_buffer =
+ this->_Data_allocate(_S_rounded_up_size(__exponentiate_threshold));
+ _RopeLeaf* __base_leaf;
+ rope __base_rope;
+ __uninitialized_fill_n_a(__base_buffer, __exponentiate_threshold, __c,
+ _M_get_allocator());
+ _S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
+ __try
+ {
+ __base_leaf = _S_new_RopeLeaf(__base_buffer,
+ __exponentiate_threshold,
+ _M_get_allocator());
+ }
+ __catch(...)
+ {
+ _RopeRep::__STL_FREE_STRING(__base_buffer,
+ __exponentiate_threshold,
+ _M_get_allocator());
+ __throw_exception_again;
+ }
+ __base_rope._M_tree_ptr = __base_leaf;
+ if (1 == __exponent)
+ __result = __base_rope;
+ else
+ __result = power(__base_rope, __exponent,
+ _Rope_Concat_fn<_CharT, _Alloc>());
+
+ if (0 != __remainder)
+ __result += __remainder_rope;
+ }
+ else
+ __result = __remainder_rope;
+
+ this->_M_tree_ptr = __result._M_tree_ptr;
+ this->_M_tree_ptr->_M_ref_nonnil();
+ }
+
+ template<class _CharT, class _Alloc>
+ _CharT
+ rope<_CharT, _Alloc>::_S_empty_c_str[1];
+
+ template<class _CharT, class _Alloc>
+ const _CharT*
+ rope<_CharT, _Alloc>::
+ c_str() const
+ {
+ if (0 == this->_M_tree_ptr)
+ {
+ _S_empty_c_str[0] = _S_eos((_CharT*)0); // Possibly redundant,
+ // but probably fast.
+ return _S_empty_c_str;
+ }
+ __gthread_mutex_lock (&this->_M_tree_ptr->_M_c_string_lock);
+ __GC_CONST _CharT* __result = this->_M_tree_ptr->_M_c_string;
+ if (0 == __result)
+ {
+ size_t __s = size();
+ __result = this->_Data_allocate(__s + 1);
+ _S_flatten(this->_M_tree_ptr, __result);
+ __result[__s] = _S_eos((_CharT*)0);
+ this->_M_tree_ptr->_M_c_string = __result;
+ }
+ __gthread_mutex_unlock (&this->_M_tree_ptr->_M_c_string_lock);
+ return(__result);
+ }
+
+ template<class _CharT, class _Alloc>
+ const _CharT* rope<_CharT, _Alloc>::
+ replace_with_c_str()
+ {
+ if (0 == this->_M_tree_ptr)
+ {
+ _S_empty_c_str[0] = _S_eos((_CharT*)0);
+ return _S_empty_c_str;
+ }
+ __GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string;
+ if (__detail::_S_leaf == this->_M_tree_ptr->_M_tag
+ && 0 != __old_c_string)
+ return(__old_c_string);
+ size_t __s = size();
+ _CharT* __result = this->_Data_allocate(_S_rounded_up_size(__s));
+ _S_flatten(this->_M_tree_ptr, __result);
+ __result[__s] = _S_eos((_CharT*)0);
+ this->_M_tree_ptr->_M_unref_nonnil();
+ this->_M_tree_ptr = _S_new_RopeLeaf(__result, __s,
+ this->_M_get_allocator());
+ return(__result);
+ }
+
+ // Algorithm specializations. More should be added.
+
+ template<class _Rope_iterator> // was templated on CharT and Alloc
+ void // VC++ workaround
+ _Rope_rotate(_Rope_iterator __first,
+ _Rope_iterator __middle,
+ _Rope_iterator __last)
+ {
+ typedef typename _Rope_iterator::value_type _CharT;
+ typedef typename _Rope_iterator::_allocator_type _Alloc;
+
+ rope<_CharT, _Alloc>& __r(__first.container());
+ rope<_CharT, _Alloc> __prefix = __r.substr(0, __first.index());
+ rope<_CharT, _Alloc> __suffix =
+ __r.substr(__last.index(), __r.size() - __last.index());
+ rope<_CharT, _Alloc> __part1 =
+ __r.substr(__middle.index(), __last.index() - __middle.index());
+ rope<_CharT, _Alloc> __part2 =
+ __r.substr(__first.index(), __middle.index() - __first.index());
+ __r = __prefix;
+ __r += __part1;
+ __r += __part2;
+ __r += __suffix;
+ }
+
+#if !defined(__GNUC__)
+ // Appears to confuse g++
+ inline void
+ rotate(_Rope_iterator<char, __STL_DEFAULT_ALLOCATOR(char)> __first,
+ _Rope_iterator<char, __STL_DEFAULT_ALLOCATOR(char)> __middle,
+ _Rope_iterator<char, __STL_DEFAULT_ALLOCATOR(char)> __last)
+ { _Rope_rotate(__first, __middle, __last); }
+#endif
+
+# if 0
+ // Probably not useful for several reasons:
+ // - for SGIs 7.1 compiler and probably some others,
+ // this forces lots of rope<wchar_t, ...> instantiations, creating a
+ // code bloat and compile time problem. (Fixed in 7.2.)
+ // - wchar_t is 4 bytes wide on most UNIX platforms, making it
+ // unattractive for unicode strings. Unsigned short may be a better
+ // character type.
+ inline void
+ rotate(_Rope_iterator<wchar_t, __STL_DEFAULT_ALLOCATOR(char)> __first,
+ _Rope_iterator<wchar_t, __STL_DEFAULT_ALLOCATOR(char)> __middle,
+ _Rope_iterator<wchar_t, __STL_DEFAULT_ALLOCATOR(char)> __last)
+ { _Rope_rotate(__first, __middle, __last); }
+# endif
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/slist b/6/sources/cxx-stl/gnu-libstdc++/include/ext/slist
new file mode 100644
index 0000000..a34e36e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/slist
@@ -0,0 +1,1077 @@
+// Singly-linked list implementation -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 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.
+ *
+ */
+
+/** @file ext/slist
+ * This file is a GNU extension to the Standard C++ Library (possibly
+ * containing extensions from the HP/SGI STL subset).
+ */
+
+#ifndef _SLIST
+#define _SLIST 1
+
+#include <algorithm>
+#include <bits/allocator.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/concept_check.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
+ using std::ptrdiff_t;
+ using std::_Construct;
+ using std::_Destroy;
+ using std::allocator;
+ using std::__true_type;
+ using std::__false_type;
+
+ struct _Slist_node_base
+ {
+ _Slist_node_base* _M_next;
+ };
+
+ inline _Slist_node_base*
+ __slist_make_link(_Slist_node_base* __prev_node,
+ _Slist_node_base* __new_node)
+ {
+ __new_node->_M_next = __prev_node->_M_next;
+ __prev_node->_M_next = __new_node;
+ return __new_node;
+ }
+
+ inline _Slist_node_base*
+ __slist_previous(_Slist_node_base* __head,
+ const _Slist_node_base* __node)
+ {
+ while (__head && __head->_M_next != __node)
+ __head = __head->_M_next;
+ return __head;
+ }
+
+ inline const _Slist_node_base*
+ __slist_previous(const _Slist_node_base* __head,
+ const _Slist_node_base* __node)
+ {
+ while (__head && __head->_M_next != __node)
+ __head = __head->_M_next;
+ return __head;
+ }
+
+ inline void
+ __slist_splice_after(_Slist_node_base* __pos,
+ _Slist_node_base* __before_first,
+ _Slist_node_base* __before_last)
+ {
+ if (__pos != __before_first && __pos != __before_last)
+ {
+ _Slist_node_base* __first = __before_first->_M_next;
+ _Slist_node_base* __after = __pos->_M_next;
+ __before_first->_M_next = __before_last->_M_next;
+ __pos->_M_next = __first;
+ __before_last->_M_next = __after;
+ }
+ }
+
+ inline void
+ __slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __head)
+ {
+ _Slist_node_base* __before_last = __slist_previous(__head, 0);
+ if (__before_last != __head)
+ {
+ _Slist_node_base* __after = __pos->_M_next;
+ __pos->_M_next = __head->_M_next;
+ __head->_M_next = 0;
+ __before_last->_M_next = __after;
+ }
+ }
+
+ inline _Slist_node_base*
+ __slist_reverse(_Slist_node_base* __node)
+ {
+ _Slist_node_base* __result = __node;
+ __node = __node->_M_next;
+ __result->_M_next = 0;
+ while(__node)
+ {
+ _Slist_node_base* __next = __node->_M_next;
+ __node->_M_next = __result;
+ __result = __node;
+ __node = __next;
+ }
+ return __result;
+ }
+
+ inline size_t
+ __slist_size(_Slist_node_base* __node)
+ {
+ size_t __result = 0;
+ for (; __node != 0; __node = __node->_M_next)
+ ++__result;
+ return __result;
+ }
+
+ template <class _Tp>
+ struct _Slist_node : public _Slist_node_base
+ {
+ _Tp _M_data;
+ };
+
+ struct _Slist_iterator_base
+ {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Slist_node_base* _M_node;
+
+ _Slist_iterator_base(_Slist_node_base* __x)
+ : _M_node(__x) {}
+
+ void
+ _M_incr()
+ { _M_node = _M_node->_M_next; }
+
+ bool
+ operator==(const _Slist_iterator_base& __x) const
+ { return _M_node == __x._M_node; }
+
+ bool
+ operator!=(const _Slist_iterator_base& __x) const
+ { return _M_node != __x._M_node; }
+ };
+
+ template <class _Tp, class _Ref, class _Ptr>
+ struct _Slist_iterator : public _Slist_iterator_base
+ {
+ typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator;
+ typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+ typedef _Slist_iterator<_Tp, _Ref, _Ptr> _Self;
+
+ typedef _Tp value_type;
+ typedef _Ptr pointer;
+ typedef _Ref reference;
+ typedef _Slist_node<_Tp> _Node;
+
+ explicit
+ _Slist_iterator(_Node* __x)
+ : _Slist_iterator_base(__x) {}
+
+ _Slist_iterator()
+ : _Slist_iterator_base(0) {}
+
+ _Slist_iterator(const iterator& __x)
+ : _Slist_iterator_base(__x._M_node) {}
+
+ reference
+ operator*() const
+ { return ((_Node*) _M_node)->_M_data; }
+
+ pointer
+ operator->() const
+ { return &(operator*()); }
+
+ _Self&
+ operator++()
+ {
+ _M_incr();
+ return *this;
+ }
+
+ _Self
+ operator++(int)
+ {
+ _Self __tmp = *this;
+ _M_incr();
+ return __tmp;
+ }
+ };
+
+ template <class _Tp, class _Alloc>
+ struct _Slist_base
+ : public _Alloc::template rebind<_Slist_node<_Tp> >::other
+ {
+ typedef typename _Alloc::template rebind<_Slist_node<_Tp> >::other
+ _Node_alloc;
+ typedef _Alloc allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return *static_cast<const _Node_alloc*>(this); }
+
+ _Slist_base(const allocator_type& __a)
+ : _Node_alloc(__a)
+ { this->_M_head._M_next = 0; }
+
+ ~_Slist_base()
+ { _M_erase_after(&this->_M_head, 0); }
+
+ protected:
+ _Slist_node_base _M_head;
+
+ _Slist_node<_Tp>*
+ _M_get_node()
+ { return _Node_alloc::allocate(1); }
+
+ void
+ _M_put_node(_Slist_node<_Tp>* __p)
+ { _Node_alloc::deallocate(__p, 1); }
+
+ protected:
+ _Slist_node_base* _M_erase_after(_Slist_node_base* __pos)
+ {
+ _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next);
+ _Slist_node_base* __next_next = __next->_M_next;
+ __pos->_M_next = __next_next;
+ get_allocator().destroy(&__next->_M_data);
+ _M_put_node(__next);
+ return __next_next;
+ }
+ _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
+ };
+
+ template <class _Tp, class _Alloc>
+ _Slist_node_base*
+ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
+ _Slist_node_base* __last_node)
+ {
+ _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next);
+ while (__cur != __last_node)
+ {
+ _Slist_node<_Tp>* __tmp = __cur;
+ __cur = (_Slist_node<_Tp>*) __cur->_M_next;
+ get_allocator().destroy(&__tmp->_M_data);
+ _M_put_node(__tmp);
+ }
+ __before_first->_M_next = __last_node;
+ return __last_node;
+ }
+
+ /**
+ * This is an SGI extension.
+ * @ingroup SGIextensions
+ * @doctodo
+ */
+ template <class _Tp, class _Alloc = allocator<_Tp> >
+ class slist : private _Slist_base<_Tp,_Alloc>
+ {
+ // concept requirements
+ __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
+
+ private:
+ typedef _Slist_base<_Tp,_Alloc> _Base;
+
+ public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator;
+ typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+ typedef typename _Base::allocator_type allocator_type;
+
+ allocator_type
+ get_allocator() const
+ { return _Base::get_allocator(); }
+
+ private:
+ typedef _Slist_node<_Tp> _Node;
+ typedef _Slist_node_base _Node_base;
+ typedef _Slist_iterator_base _Iterator_base;
+
+ _Node*
+ _M_create_node(const value_type& __x)
+ {
+ _Node* __node = this->_M_get_node();
+ __try
+ {
+ get_allocator().construct(&__node->_M_data, __x);
+ __node->_M_next = 0;
+ }
+ __catch(...)
+ {
+ this->_M_put_node(__node);
+ __throw_exception_again;
+ }
+ return __node;
+ }
+
+ _Node*
+ _M_create_node()
+ {
+ _Node* __node = this->_M_get_node();
+ __try
+ {
+ get_allocator().construct(&__node->_M_data, value_type());
+ __node->_M_next = 0;
+ }
+ __catch(...)
+ {
+ this->_M_put_node(__node);
+ __throw_exception_again;
+ }
+ return __node;
+ }
+
+ public:
+ explicit
+ slist(const allocator_type& __a = allocator_type())
+ : _Base(__a) {}
+
+ slist(size_type __n, const value_type& __x,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { _M_insert_after_fill(&this->_M_head, __n, __x); }
+
+ explicit
+ slist(size_type __n)
+ : _Base(allocator_type())
+ { _M_insert_after_fill(&this->_M_head, __n, value_type()); }
+
+ // We don't need any dispatching tricks here, because
+ // _M_insert_after_range already does them.
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a = allocator_type())
+ : _Base(__a)
+ { _M_insert_after_range(&this->_M_head, __first, __last); }
+
+ slist(const slist& __x)
+ : _Base(__x.get_allocator())
+ { _M_insert_after_range(&this->_M_head, __x.begin(), __x.end()); }
+
+ slist&
+ operator= (const slist& __x);
+
+ ~slist() {}
+
+ public:
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void
+ assign(size_type __n, const _Tp& __val)
+ { _M_fill_assign(__n, __val); }
+
+ void
+ _M_fill_assign(size_type __n, const _Tp& __val);
+
+ template <class _InputIterator>
+ void
+ assign(_InputIterator __first, _InputIterator __last)
+ {
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void
+ _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+ { _M_fill_assign((size_type) __n, (_Tp) __val); }
+
+ template <class _InputIterator>
+ void
+ _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ __false_type);
+
+ public:
+
+ iterator
+ begin()
+ { return iterator((_Node*)this->_M_head._M_next); }
+
+ const_iterator
+ begin() const
+ { return const_iterator((_Node*)this->_M_head._M_next);}
+
+ iterator
+ end()
+ { return iterator(0); }
+
+ const_iterator
+ end() const
+ { return const_iterator(0); }
+
+ // Experimental new feature: before_begin() returns a
+ // non-dereferenceable iterator that, when incremented, yields
+ // begin(). This iterator may be used as the argument to
+ // insert_after, erase_after, etc. Note that even for an empty
+ // slist, before_begin() is not the same iterator as end(). It
+ // is always necessary to increment before_begin() at least once to
+ // obtain end().
+ iterator
+ before_begin()
+ { return iterator((_Node*) &this->_M_head); }
+
+ const_iterator
+ before_begin() const
+ { return const_iterator((_Node*) &this->_M_head); }
+
+ size_type
+ size() const
+ { return __slist_size(this->_M_head._M_next); }
+
+ size_type
+ max_size() const
+ { return size_type(-1); }
+
+ bool
+ empty() const
+ { return this->_M_head._M_next == 0; }
+
+ void
+ swap(slist& __x)
+ { std::swap(this->_M_head._M_next, __x._M_head._M_next); }
+
+ public:
+
+ reference
+ front()
+ { return ((_Node*) this->_M_head._M_next)->_M_data; }
+
+ const_reference
+ front() const
+ { return ((_Node*) this->_M_head._M_next)->_M_data; }
+
+ void
+ push_front(const value_type& __x)
+ { __slist_make_link(&this->_M_head, _M_create_node(__x)); }
+
+ void
+ push_front()
+ { __slist_make_link(&this->_M_head, _M_create_node()); }
+
+ void
+ pop_front()
+ {
+ _Node* __node = (_Node*) this->_M_head._M_next;
+ this->_M_head._M_next = __node->_M_next;
+ get_allocator().destroy(&__node->_M_data);
+ this->_M_put_node(__node);
+ }
+
+ iterator
+ previous(const_iterator __pos)
+ { return iterator((_Node*) __slist_previous(&this->_M_head,
+ __pos._M_node)); }
+
+ const_iterator
+ previous(const_iterator __pos) const
+ { return const_iterator((_Node*) __slist_previous(&this->_M_head,
+ __pos._M_node)); }
+
+ private:
+ _Node*
+ _M_insert_after(_Node_base* __pos, const value_type& __x)
+ { return (_Node*) (__slist_make_link(__pos, _M_create_node(__x))); }
+
+ _Node*
+ _M_insert_after(_Node_base* __pos)
+ { return (_Node*) (__slist_make_link(__pos, _M_create_node())); }
+
+ void
+ _M_insert_after_fill(_Node_base* __pos,
+ size_type __n, const value_type& __x)
+ {
+ for (size_type __i = 0; __i < __n; ++__i)
+ __pos = __slist_make_link(__pos, _M_create_node(__x));
+ }
+
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InIterator>
+ void
+ _M_insert_after_range(_Node_base* __pos,
+ _InIterator __first, _InIterator __last)
+ {
+ typedef typename std::__is_integer<_InIterator>::__type _Integral;
+ _M_insert_after_range(__pos, __first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void
+ _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
+ __true_type)
+ { _M_insert_after_fill(__pos, __n, __x); }
+
+ template <class _InIterator>
+ void
+ _M_insert_after_range(_Node_base* __pos,
+ _InIterator __first, _InIterator __last,
+ __false_type)
+ {
+ while (__first != __last)
+ {
+ __pos = __slist_make_link(__pos, _M_create_node(*__first));
+ ++__first;
+ }
+ }
+
+ public:
+ iterator
+ insert_after(iterator __pos, const value_type& __x)
+ { return iterator(_M_insert_after(__pos._M_node, __x)); }
+
+ iterator
+ insert_after(iterator __pos)
+ { return insert_after(__pos, value_type()); }
+
+ void
+ insert_after(iterator __pos, size_type __n, const value_type& __x)
+ { _M_insert_after_fill(__pos._M_node, __n, __x); }
+
+ // We don't need any dispatching tricks here, because
+ // _M_insert_after_range already does them.
+ template <class _InIterator>
+ void
+ insert_after(iterator __pos, _InIterator __first, _InIterator __last)
+ { _M_insert_after_range(__pos._M_node, __first, __last); }
+
+ iterator
+ insert(iterator __pos, const value_type& __x)
+ { return iterator(_M_insert_after(__slist_previous(&this->_M_head,
+ __pos._M_node),
+ __x)); }
+
+ iterator
+ insert(iterator __pos)
+ { return iterator(_M_insert_after(__slist_previous(&this->_M_head,
+ __pos._M_node),
+ value_type())); }
+
+ void
+ insert(iterator __pos, size_type __n, const value_type& __x)
+ { _M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node),
+ __n, __x); }
+
+ // We don't need any dispatching tricks here, because
+ // _M_insert_after_range already does them.
+ template <class _InIterator>
+ void
+ insert(iterator __pos, _InIterator __first, _InIterator __last)
+ { _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node),
+ __first, __last); }
+
+ public:
+ iterator
+ erase_after(iterator __pos)
+ { return iterator((_Node*) this->_M_erase_after(__pos._M_node)); }
+
+ iterator
+ erase_after(iterator __before_first, iterator __last)
+ {
+ return iterator((_Node*) this->_M_erase_after(__before_first._M_node,
+ __last._M_node));
+ }
+
+ iterator
+ erase(iterator __pos)
+ {
+ return iterator((_Node*) this->_M_erase_after
+ (__slist_previous(&this->_M_head, __pos._M_node)));
+ }
+
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ return iterator((_Node*) this->_M_erase_after
+ (__slist_previous(&this->_M_head, __first._M_node),
+ __last._M_node));
+ }
+
+ void
+ resize(size_type new_size, const _Tp& __x);
+
+ void
+ resize(size_type new_size)
+ { resize(new_size, _Tp()); }
+
+ void
+ clear()
+ { this->_M_erase_after(&this->_M_head, 0); }
+
+ public:
+ // Moves the range [__before_first + 1, __before_last + 1) to *this,
+ // inserting it immediately after __pos. This is constant time.
+ void
+ splice_after(iterator __pos,
+ iterator __before_first, iterator __before_last)
+ {
+ if (__before_first != __before_last)
+ __slist_splice_after(__pos._M_node, __before_first._M_node,
+ __before_last._M_node);
+ }
+
+ // Moves the element that follows __prev to *this, inserting it
+ // immediately after __pos. This is constant time.
+ void
+ splice_after(iterator __pos, iterator __prev)
+ { __slist_splice_after(__pos._M_node,
+ __prev._M_node, __prev._M_node->_M_next); }
+
+ // Removes all of the elements from the list __x to *this, inserting
+ // them immediately after __pos. __x must not be *this. Complexity:
+ // linear in __x.size().
+ void
+ splice_after(iterator __pos, slist& __x)
+ { __slist_splice_after(__pos._M_node, &__x._M_head); }
+
+ // Linear in distance(begin(), __pos), and linear in __x.size().
+ void
+ splice(iterator __pos, slist& __x)
+ {
+ if (__x._M_head._M_next)
+ __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+ &__x._M_head,
+ __slist_previous(&__x._M_head, 0)); }
+
+ // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i).
+ void
+ splice(iterator __pos, slist& __x, iterator __i)
+ { __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+ __slist_previous(&__x._M_head, __i._M_node),
+ __i._M_node); }
+
+ // Linear in distance(begin(), __pos), in distance(__x.begin(), __first),
+ // and in distance(__first, __last).
+ void
+ splice(iterator __pos, slist& __x, iterator __first, iterator __last)
+ {
+ if (__first != __last)
+ __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+ __slist_previous(&__x._M_head, __first._M_node),
+ __slist_previous(__first._M_node,
+ __last._M_node));
+ }
+
+ public:
+ void
+ reverse()
+ {
+ if (this->_M_head._M_next)
+ this->_M_head._M_next = __slist_reverse(this->_M_head._M_next);
+ }
+
+ void
+ remove(const _Tp& __val);
+
+ void
+ unique();
+
+ void
+ merge(slist& __x);
+
+ void
+ sort();
+
+ template <class _Predicate>
+ void
+ remove_if(_Predicate __pred);
+
+ template <class _BinaryPredicate>
+ void
+ unique(_BinaryPredicate __pred);
+
+ template <class _StrictWeakOrdering>
+ void
+ merge(slist&, _StrictWeakOrdering);
+
+ template <class _StrictWeakOrdering>
+ void
+ sort(_StrictWeakOrdering __comp);
+ };
+
+ template <class _Tp, class _Alloc>
+ slist<_Tp, _Alloc>&
+ slist<_Tp, _Alloc>::operator=(const slist<_Tp, _Alloc>& __x)
+ {
+ if (&__x != this)
+ {
+ _Node_base* __p1 = &this->_M_head;
+ _Node* __n1 = (_Node*) this->_M_head._M_next;
+ const _Node* __n2 = (const _Node*) __x._M_head._M_next;
+ while (__n1 && __n2)
+ {
+ __n1->_M_data = __n2->_M_data;
+ __p1 = __n1;
+ __n1 = (_Node*) __n1->_M_next;
+ __n2 = (const _Node*) __n2->_M_next;
+ }
+ if (__n2 == 0)
+ this->_M_erase_after(__p1, 0);
+ else
+ _M_insert_after_range(__p1, const_iterator((_Node*)__n2),
+ const_iterator(0));
+ }
+ return *this;
+ }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val)
+ {
+ _Node_base* __prev = &this->_M_head;
+ _Node* __node = (_Node*) this->_M_head._M_next;
+ for (; __node != 0 && __n > 0; --__n)
+ {
+ __node->_M_data = __val;
+ __prev = __node;
+ __node = (_Node*) __node->_M_next;
+ }
+ if (__n > 0)
+ _M_insert_after_fill(__prev, __n, __val);
+ else
+ this->_M_erase_after(__prev, 0);
+ }
+
+ template <class _Tp, class _Alloc>
+ template <class _InputIterator>
+ void
+ slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first,
+ _InputIterator __last,
+ __false_type)
+ {
+ _Node_base* __prev = &this->_M_head;
+ _Node* __node = (_Node*) this->_M_head._M_next;
+ while (__node != 0 && __first != __last)
+ {
+ __node->_M_data = *__first;
+ __prev = __node;
+ __node = (_Node*) __node->_M_next;
+ ++__first;
+ }
+ if (__first != __last)
+ _M_insert_after_range(__prev, __first, __last);
+ else
+ this->_M_erase_after(__prev, 0);
+ }
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator==(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ {
+ typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
+ const_iterator __end1 = _SL1.end();
+ const_iterator __end2 = _SL2.end();
+
+ const_iterator __i1 = _SL1.begin();
+ const_iterator __i2 = _SL2.begin();
+ while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2)
+ {
+ ++__i1;
+ ++__i2;
+ }
+ return __i1 == __end1 && __i2 == __end2;
+ }
+
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator<(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ { return std::lexicographical_compare(_SL1.begin(), _SL1.end(),
+ _SL2.begin(), _SL2.end()); }
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator!=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ { return !(_SL1 == _SL2); }
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator>(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ { return _SL2 < _SL1; }
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator<=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ { return !(_SL2 < _SL1); }
+
+ template <class _Tp, class _Alloc>
+ inline bool
+ operator>=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2)
+ { return !(_SL1 < _SL2); }
+
+ template <class _Tp, class _Alloc>
+ inline void
+ swap(slist<_Tp, _Alloc>& __x, slist<_Tp, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::resize(size_type __len, const _Tp& __x)
+ {
+ _Node_base* __cur = &this->_M_head;
+ while (__cur->_M_next != 0 && __len > 0)
+ {
+ --__len;
+ __cur = __cur->_M_next;
+ }
+ if (__cur->_M_next)
+ this->_M_erase_after(__cur, 0);
+ else
+ _M_insert_after_fill(__cur, __len, __x);
+ }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::remove(const _Tp& __val)
+ {
+ _Node_base* __cur = &this->_M_head;
+ while (__cur && __cur->_M_next)
+ {
+ if (((_Node*) __cur->_M_next)->_M_data == __val)
+ this->_M_erase_after(__cur);
+ else
+ __cur = __cur->_M_next;
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::unique()
+ {
+ _Node_base* __cur = this->_M_head._M_next;
+ if (__cur)
+ {
+ while (__cur->_M_next)
+ {
+ if (((_Node*)__cur)->_M_data
+ == ((_Node*)(__cur->_M_next))->_M_data)
+ this->_M_erase_after(__cur);
+ else
+ __cur = __cur->_M_next;
+ }
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x)
+ {
+ _Node_base* __n1 = &this->_M_head;
+ while (__n1->_M_next && __x._M_head._M_next)
+ {
+ if (((_Node*) __x._M_head._M_next)->_M_data
+ < ((_Node*) __n1->_M_next)->_M_data)
+ __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
+ __n1 = __n1->_M_next;
+ }
+ if (__x._M_head._M_next)
+ {
+ __n1->_M_next = __x._M_head._M_next;
+ __x._M_head._M_next = 0;
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ void
+ slist<_Tp, _Alloc>::sort()
+ {
+ if (this->_M_head._M_next && this->_M_head._M_next->_M_next)
+ {
+ slist __carry;
+ slist __counter[64];
+ int __fill = 0;
+ while (!empty())
+ {
+ __slist_splice_after(&__carry._M_head,
+ &this->_M_head, this->_M_head._M_next);
+ int __i = 0;
+ while (__i < __fill && !__counter[__i].empty())
+ {
+ __counter[__i].merge(__carry);
+ __carry.swap(__counter[__i]);
+ ++__i;
+ }
+ __carry.swap(__counter[__i]);
+ if (__i == __fill)
+ ++__fill;
+ }
+
+ for (int __i = 1; __i < __fill; ++__i)
+ __counter[__i].merge(__counter[__i-1]);
+ this->swap(__counter[__fill-1]);
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ template <class _Predicate>
+ void slist<_Tp, _Alloc>::remove_if(_Predicate __pred)
+ {
+ _Node_base* __cur = &this->_M_head;
+ while (__cur->_M_next)
+ {
+ if (__pred(((_Node*) __cur->_M_next)->_M_data))
+ this->_M_erase_after(__cur);
+ else
+ __cur = __cur->_M_next;
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ template <class _BinaryPredicate>
+ void
+ slist<_Tp, _Alloc>::unique(_BinaryPredicate __pred)
+ {
+ _Node* __cur = (_Node*) this->_M_head._M_next;
+ if (__cur)
+ {
+ while (__cur->_M_next)
+ {
+ if (__pred(((_Node*)__cur)->_M_data,
+ ((_Node*)(__cur->_M_next))->_M_data))
+ this->_M_erase_after(__cur);
+ else
+ __cur = (_Node*) __cur->_M_next;
+ }
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ template <class _StrictWeakOrdering>
+ void
+ slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x,
+ _StrictWeakOrdering __comp)
+ {
+ _Node_base* __n1 = &this->_M_head;
+ while (__n1->_M_next && __x._M_head._M_next)
+ {
+ if (__comp(((_Node*) __x._M_head._M_next)->_M_data,
+ ((_Node*) __n1->_M_next)->_M_data))
+ __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
+ __n1 = __n1->_M_next;
+ }
+ if (__x._M_head._M_next)
+ {
+ __n1->_M_next = __x._M_head._M_next;
+ __x._M_head._M_next = 0;
+ }
+ }
+
+ template <class _Tp, class _Alloc>
+ template <class _StrictWeakOrdering>
+ void
+ slist<_Tp, _Alloc>::sort(_StrictWeakOrdering __comp)
+ {
+ if (this->_M_head._M_next && this->_M_head._M_next->_M_next)
+ {
+ slist __carry;
+ slist __counter[64];
+ int __fill = 0;
+ while (!empty())
+ {
+ __slist_splice_after(&__carry._M_head,
+ &this->_M_head, this->_M_head._M_next);
+ int __i = 0;
+ while (__i < __fill && !__counter[__i].empty())
+ {
+ __counter[__i].merge(__carry, __comp);
+ __carry.swap(__counter[__i]);
+ ++__i;
+ }
+ __carry.swap(__counter[__i]);
+ if (__i == __fill)
+ ++__fill;
+ }
+
+ for (int __i = 1; __i < __fill; ++__i)
+ __counter[__i].merge(__counter[__i-1], __comp);
+ this->swap(__counter[__fill-1]);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Specialization of insert_iterator so that insertions will be constant
+ // time rather than linear time.
+ template <class _Tp, class _Alloc>
+ class insert_iterator<__gnu_cxx::slist<_Tp, _Alloc> >
+ {
+ protected:
+ typedef __gnu_cxx::slist<_Tp, _Alloc> _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+
+ public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
+ : container(&__x)
+ {
+ if (__i == __x.begin())
+ iter = __x.before_begin();
+ else
+ iter = __x.previous(__i);
+ }
+
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __value)
+ {
+ iter = container->insert_after(iter, __value);
+ return *this;
+ }
+
+ insert_iterator<_Container>&
+ operator*()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++()
+ { return *this; }
+
+ insert_iterator<_Container>&
+ operator++(int)
+ { return *this; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/sso_string_base.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/sso_string_base.h
new file mode 100644
index 0000000..c329609
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/sso_string_base.h
@@ -0,0 +1,592 @@
+// Short-string-optimized versatile string base -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/sso_string_base.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _SSO_STRING_BASE_H
+#define _SSO_STRING_BASE_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __sso_string_base
+ : protected __vstring_utility<_CharT, _Traits, _Alloc>
+ {
+ public:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+
+ typedef __vstring_utility<_CharT, _Traits, _Alloc> _Util_Base;
+ typedef typename _Util_Base::_CharT_alloc_type _CharT_alloc_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+
+ private:
+ // Data Members:
+ typename _Util_Base::template _Alloc_hider<_CharT_alloc_type>
+ _M_dataplus;
+ size_type _M_string_length;
+
+ enum { _S_local_capacity = 15 };
+
+ union
+ {
+ _CharT _M_local_data[_S_local_capacity + 1];
+ size_type _M_allocated_capacity;
+ };
+
+ void
+ _M_data(_CharT* __p)
+ { _M_dataplus._M_p = __p; }
+
+ void
+ _M_length(size_type __length)
+ { _M_string_length = __length; }
+
+ void
+ _M_capacity(size_type __capacity)
+ { _M_allocated_capacity = __capacity; }
+
+ bool
+ _M_is_local() const
+ { return _M_data() == _M_local_data; }
+
+ // Create & Destroy
+ _CharT*
+ _M_create(size_type&, size_type);
+
+ void
+ _M_dispose()
+ {
+ if (!_M_is_local())
+ _M_destroy(_M_allocated_capacity);
+#if __google_stl_debug_string_dangling
+ else {
+ // Wipe local storage for destructed string with 0xCD.
+ // This mimics what DebugAllocation does to free()d memory.
+ __builtin_memset(_M_local_data, 0xcd, sizeof(_M_local_data));
+ }
+#endif
+ }
+
+ void
+ _M_destroy(size_type __size) throw()
+ { _M_get_allocator().deallocate(_M_data(), __size + 1); }
+
+ // _M_construct_aux is used to implement the 21.3.1 para 15 which
+ // requires special behaviour if _InIterator is an integral type
+ template<typename _InIterator>
+ void
+ _M_construct_aux(_InIterator __beg, _InIterator __end,
+ std::__false_type)
+ {
+ typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
+ _M_construct(__beg, __end, _Tag());
+ }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 438. Ambiguity in the "do the right thing" clause
+ template<typename _Integer>
+ void
+ _M_construct_aux(_Integer __beg, _Integer __end, std::__true_type)
+ { _M_construct(static_cast<size_type>(__beg), __end); }
+
+ template<typename _InIterator>
+ void
+ _M_construct(_InIterator __beg, _InIterator __end)
+ {
+ typedef typename std::__is_integer<_InIterator>::__type _Integral;
+ _M_construct_aux(__beg, __end, _Integral());
+ }
+
+ // For Input Iterators, used in istreambuf_iterators, etc.
+ template<typename _InIterator>
+ void
+ _M_construct(_InIterator __beg, _InIterator __end,
+ std::input_iterator_tag);
+
+ // For forward_iterators up to random_access_iterators, used for
+ // string::iterator, _CharT*, etc.
+ template<typename _FwdIterator>
+ void
+ _M_construct(_FwdIterator __beg, _FwdIterator __end,
+ std::forward_iterator_tag);
+
+ void
+ _M_construct(size_type __req, _CharT __c);
+
+ public:
+ size_type
+ _M_max_size() const
+ { return (_M_get_allocator().max_size() - 1) / 2; }
+
+ _CharT*
+ _M_data() const
+ { return _M_dataplus._M_p; }
+
+ size_type
+ _M_length() const
+ { return _M_string_length; }
+
+ size_type
+ _M_capacity() const
+ {
+ return _M_is_local() ? size_type(_S_local_capacity)
+ : _M_allocated_capacity;
+ }
+
+ bool
+ _M_is_shared() const
+ { return false; }
+
+ void
+ _M_set_leaked() { }
+
+ void
+ _M_leak() { }
+
+ void
+ _M_set_length_no_wipe(size_type __n)
+ {
+ _M_length(__n);
+ traits_type::assign(_M_data()[__n], _CharT());
+ }
+
+ void
+ _M_set_length(size_type __n)
+ {
+#if __google_stl_debug_string_dangling
+ if (__n + 1 < _M_length())
+ {
+ // Wipe the storage with 0xCD.
+ // Also wipes the old NUL terminator.
+ __builtin_memset(_M_data() + __n + 1, 0xcd, _M_length() - __n);
+ }
+#endif
+ _M_set_length_no_wipe(__n);
+ }
+
+ __sso_string_base()
+ : _M_dataplus(_M_local_data)
+ { _M_set_length_no_wipe(0); }
+
+ __sso_string_base(const _Alloc& __a);
+
+ __sso_string_base(const __sso_string_base& __rcs);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ __sso_string_base(__sso_string_base&& __rcs);
+#endif
+
+ __sso_string_base(size_type __n, _CharT __c, const _Alloc& __a);
+
+ template<typename _InputIterator>
+ __sso_string_base(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a);
+
+ ~__sso_string_base()
+ { _M_dispose(); }
+
+ _CharT_alloc_type&
+ _M_get_allocator()
+ { return _M_dataplus; }
+
+ const _CharT_alloc_type&
+ _M_get_allocator() const
+ { return _M_dataplus; }
+
+ void
+ _M_swap(__sso_string_base& __rcs);
+
+ void
+ _M_assign(const __sso_string_base& __rcs);
+
+ void
+ _M_reserve(size_type __res);
+
+ void
+ _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
+ size_type __len2);
+
+ void
+ _M_erase(size_type __pos, size_type __n);
+
+ void
+ _M_clear()
+ { _M_set_length(0); }
+
+ bool
+ _M_compare(const __sso_string_base&) const
+ { return false; }
+ };
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_swap(__sso_string_base& __rcs)
+ {
+ if (this == &__rcs)
+ return;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<_CharT_alloc_type>::_S_do_it(_M_get_allocator(),
+ __rcs._M_get_allocator());
+
+ if (_M_is_local())
+ if (__rcs._M_is_local())
+ {
+ if (_M_length() && __rcs._M_length())
+ {
+ _CharT __tmp_data[_S_local_capacity + 1];
+ traits_type::copy(__tmp_data, __rcs._M_local_data,
+ _S_local_capacity + 1);
+ traits_type::copy(__rcs._M_local_data, _M_local_data,
+ _S_local_capacity + 1);
+ traits_type::copy(_M_local_data, __tmp_data,
+ _S_local_capacity + 1);
+ }
+ else if (__rcs._M_length())
+ {
+ traits_type::copy(_M_local_data, __rcs._M_local_data,
+ _S_local_capacity + 1);
+ _M_length(__rcs._M_length());
+ __rcs._M_set_length(0);
+ return;
+ }
+ else if (_M_length())
+ {
+ traits_type::copy(__rcs._M_local_data, _M_local_data,
+ _S_local_capacity + 1);
+ __rcs._M_length(_M_length());
+ _M_set_length(0);
+ return;
+ }
+ }
+ else
+ {
+ const size_type __tmp_capacity = __rcs._M_allocated_capacity;
+ traits_type::copy(__rcs._M_local_data, _M_local_data,
+ _S_local_capacity + 1);
+ _M_data(__rcs._M_data());
+ __rcs._M_data(__rcs._M_local_data);
+ _M_capacity(__tmp_capacity);
+ }
+ else
+ {
+ const size_type __tmp_capacity = _M_allocated_capacity;
+ if (__rcs._M_is_local())
+ {
+ traits_type::copy(_M_local_data, __rcs._M_local_data,
+ _S_local_capacity + 1);
+ __rcs._M_data(_M_data());
+ _M_data(_M_local_data);
+ }
+ else
+ {
+ _CharT* __tmp_ptr = _M_data();
+ _M_data(__rcs._M_data());
+ __rcs._M_data(__tmp_ptr);
+ _M_capacity(__rcs._M_allocated_capacity);
+ }
+ __rcs._M_capacity(__tmp_capacity);
+ }
+
+ const size_type __tmp_length = _M_length();
+ _M_length(__rcs._M_length());
+ __rcs._M_length(__tmp_length);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ _CharT*
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_create(size_type& __capacity, size_type __old_capacity)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 83. String::npos vs. string::max_size()
+ if (__capacity > _M_max_size())
+ std::__throw_length_error(__N("__sso_string_base::_M_create"));
+
+ // The below implements an exponential growth policy, necessary to
+ // meet amortized linear time requirements of the library: see
+ // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+ if (__capacity > __old_capacity && __capacity < 2 * __old_capacity)
+ {
+ __capacity = 2 * __old_capacity;
+ // Never allocate a string bigger than max_size.
+ if (__capacity > _M_max_size())
+ __capacity = _M_max_size();
+ }
+
+ // NB: Need an array of char_type[__capacity], plus a terminating
+ // null char_type() element.
+ return _M_get_allocator().allocate(__capacity + 1);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(const _Alloc& __a)
+ : _M_dataplus(__a, _M_local_data)
+ { _M_set_length_no_wipe(0); }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(const __sso_string_base& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), _M_local_data)
+ { _M_construct(__rcs._M_data(), __rcs._M_data() + __rcs._M_length()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(__sso_string_base&& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), _M_local_data)
+ {
+ if (__rcs._M_is_local())
+ {
+ if (__rcs._M_length())
+ traits_type::copy(_M_local_data, __rcs._M_local_data,
+ _S_local_capacity + 1);
+ }
+ else
+ {
+ _M_data(__rcs._M_data());
+ _M_capacity(__rcs._M_allocated_capacity);
+ }
+
+ _M_length(__rcs._M_length());
+ __rcs._M_length(0);
+ __rcs._M_data(__rcs._M_local_data);
+ }
+#endif
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(size_type __n, _CharT __c, const _Alloc& __a)
+ : _M_dataplus(__a, _M_local_data)
+ { _M_construct(__n, __c); }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InputIterator>
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ __sso_string_base(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a)
+ : _M_dataplus(__a, _M_local_data)
+ { _M_construct(__beg, __end); }
+
+ // NB: This is the special case for Input Iterators, used in
+ // istreambuf_iterators, etc.
+ // Input Iterators have a cost structure very different from
+ // pointers, calling for a different coding style.
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InIterator>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_construct(_InIterator __beg, _InIterator __end,
+ std::input_iterator_tag)
+ {
+ size_type __len = 0;
+ size_type __capacity = size_type(_S_local_capacity);
+
+ while (__beg != __end && __len < __capacity)
+ {
+ _M_data()[__len++] = *__beg;
+ ++__beg;
+ }
+
+ __try
+ {
+ while (__beg != __end)
+ {
+ if (__len == __capacity)
+ {
+ // Allocate more space.
+ __capacity = __len + 1;
+ _CharT* __another = _M_create(__capacity, __len);
+ this->_S_copy(__another, _M_data(), __len);
+ _M_dispose();
+ _M_data(__another);
+ _M_capacity(__capacity);
+ }
+ _M_data()[__len++] = *__beg;
+ ++__beg;
+ }
+ }
+ __catch(...)
+ {
+ _M_dispose();
+ __throw_exception_again;
+ }
+
+ _M_set_length_no_wipe(__len);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ template<typename _InIterator>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_construct(_InIterator __beg, _InIterator __end,
+ std::forward_iterator_tag)
+ {
+ // NB: Not required, but considered best practice.
+ if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0))
+ std::__throw_logic_error(__N("__sso_string_base::"
+ "_M_construct NULL not valid"));
+
+ size_type __dnew = static_cast<size_type>(std::distance(__beg, __end));
+
+ if (__dnew > size_type(_S_local_capacity))
+ {
+ _M_data(_M_create(__dnew, size_type(0)));
+ _M_capacity(__dnew);
+ }
+
+ // Check for out_of_range and length_error exceptions.
+ __try
+ { this->_S_copy_chars(_M_data(), __beg, __end); }
+ __catch(...)
+ {
+ _M_dispose();
+ __throw_exception_again;
+ }
+
+ _M_set_length_no_wipe(__dnew);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_construct(size_type __n, _CharT __c)
+ {
+ if (__n > size_type(_S_local_capacity))
+ {
+ _M_data(_M_create(__n, size_type(0)));
+ _M_capacity(__n);
+ }
+
+ if (__n)
+ this->_S_assign(_M_data(), __n, __c);
+
+ _M_set_length_no_wipe(__n);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_assign(const __sso_string_base& __rcs)
+ {
+ if (this != &__rcs)
+ {
+ const size_type __rsize = __rcs._M_length();
+ const size_type __capacity = _M_capacity();
+
+ if (__rsize > __capacity)
+ {
+ size_type __new_capacity = __rsize;
+ _CharT* __tmp = _M_create(__new_capacity, __capacity);
+ _M_dispose();
+ _M_data(__tmp);
+ _M_capacity(__new_capacity);
+ }
+
+ if (__rsize)
+ this->_S_copy(_M_data(), __rcs._M_data(), __rsize);
+
+ _M_set_length(__rsize);
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_reserve(size_type __res)
+ {
+ // Make sure we don't shrink below the current size.
+ if (__res < _M_length())
+ __res = _M_length();
+
+ const size_type __capacity = _M_capacity();
+ if (__res != __capacity)
+ {
+ if (__res > __capacity
+ || __res > size_type(_S_local_capacity))
+ {
+ _CharT* __tmp = _M_create(__res, __capacity);
+ this->_S_copy(__tmp, _M_data(), _M_length() + 1);
+ _M_dispose();
+ _M_data(__tmp);
+ _M_capacity(__res);
+ }
+ else if (!_M_is_local())
+ {
+ this->_S_copy(_M_local_data, _M_data(), _M_length() + 1);
+ _M_destroy(__capacity);
+ _M_data(_M_local_data);
+ }
+ }
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
+ const size_type __len2)
+ {
+ const size_type __how_much = _M_length() - __pos - __len1;
+
+ size_type __new_capacity = _M_length() + __len2 - __len1;
+ _CharT* __r = _M_create(__new_capacity, _M_capacity());
+
+ if (__pos)
+ this->_S_copy(__r, _M_data(), __pos);
+ if (__s && __len2)
+ this->_S_copy(__r + __pos, __s, __len2);
+ if (__how_much)
+ this->_S_copy(__r + __pos + __len2,
+ _M_data() + __pos + __len1, __how_much);
+
+ _M_dispose();
+ _M_data(__r);
+ _M_capacity(__new_capacity);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ void
+ __sso_string_base<_CharT, _Traits, _Alloc>::
+ _M_erase(size_type __pos, size_type __n)
+ {
+ const size_type __how_much = _M_length() - __pos - __n;
+
+ if (__how_much && __n)
+ this->_S_move(_M_data() + __pos, _M_data() + __pos + __n,
+ __how_much);
+
+ _M_set_length(_M_length() - __n);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _SSO_STRING_BASE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_filebuf.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_filebuf.h
new file mode 100644
index 0000000..6efe4ea
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_filebuf.h
@@ -0,0 +1,157 @@
+// File descriptor layer for filebuf -*- C++ -*-
+
+// Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/stdio_filebuf.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _STDIO_FILEBUF_H
+#define _STDIO_FILEBUF_H 1
+
+#pragma GCC system_header
+
+#include <fstream>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @brief Provides a layer of compatibility for C/POSIX.
+ *
+ * This GNU extension provides extensions for working with standard C
+ * FILE*'s and POSIX file descriptors. It must be instantiated by the
+ * user with the type of character used in the file stream, e.g.,
+ * stdio_filebuf<char>.
+ */
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT> >
+ class stdio_filebuf : public std::basic_filebuf<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ typedef std::size_t size_t;
+
+ public:
+ /**
+ * deferred initialization
+ */
+ stdio_filebuf() : std::basic_filebuf<_CharT, _Traits>() {}
+
+ /**
+ * @param fd An open file descriptor.
+ * @param mode Same meaning as in a standard filebuf.
+ * @param size Optimal or preferred size of internal buffer, in chars.
+ *
+ * This constructor associates a file stream buffer with an open
+ * POSIX file descriptor. The file descriptor will be automatically
+ * closed when the stdio_filebuf is closed/destroyed.
+ */
+ stdio_filebuf(int __fd, std::ios_base::openmode __mode,
+ size_t __size = static_cast<size_t>(BUFSIZ));
+
+ /**
+ * @param f An open @c FILE*.
+ * @param mode Same meaning as in a standard filebuf.
+ * @param size Optimal or preferred size of internal buffer, in chars.
+ * Defaults to system's @c BUFSIZ.
+ *
+ * This constructor associates a file stream buffer with an open
+ * C @c FILE*. The @c FILE* will not be automatically closed when the
+ * stdio_filebuf is closed/destroyed.
+ */
+ stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
+ size_t __size = static_cast<size_t>(BUFSIZ));
+
+ /**
+ * Closes the external data stream if the file descriptor constructor
+ * was used.
+ */
+ virtual
+ ~stdio_filebuf();
+
+ /**
+ * @return The underlying file descriptor.
+ *
+ * Once associated with an external data stream, this function can be
+ * used to access the underlying POSIX file descriptor. Note that
+ * there is no way for the library to track what you do with the
+ * descriptor, so be careful.
+ */
+ int
+ fd() { return this->_M_file.fd(); }
+
+ /**
+ * @return The underlying FILE*.
+ *
+ * This function can be used to access the underlying "C" file pointer.
+ * Note that there is no way for the library to track what you do
+ * with the file, so be careful.
+ */
+ std::__c_file*
+ file() { return this->_M_file.file(); }
+ };
+
+ template<typename _CharT, typename _Traits>
+ stdio_filebuf<_CharT, _Traits>::~stdio_filebuf()
+ { }
+
+ template<typename _CharT, typename _Traits>
+ stdio_filebuf<_CharT, _Traits>::
+ stdio_filebuf(int __fd, std::ios_base::openmode __mode, size_t __size)
+ {
+ this->_M_file.sys_open(__fd, __mode);
+ if (this->is_open())
+ {
+ this->_M_mode = __mode;
+ this->_M_buf_size = __size;
+ this->_M_allocate_internal_buffer();
+ this->_M_reading = false;
+ this->_M_writing = false;
+ this->_M_set_buffer(-1);
+ }
+ }
+
+ template<typename _CharT, typename _Traits>
+ stdio_filebuf<_CharT, _Traits>::
+ stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode,
+ size_t __size)
+ {
+ this->_M_file.sys_open(__f, __mode);
+ if (this->is_open())
+ {
+ this->_M_mode = __mode;
+ this->_M_buf_size = __size;
+ this->_M_allocate_internal_buffer();
+ this->_M_reading = false;
+ this->_M_writing = false;
+ this->_M_set_buffer(-1);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_sync_filebuf.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_sync_filebuf.h
new file mode 100644
index 0000000..9407e96
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/stdio_sync_filebuf.h
@@ -0,0 +1,279 @@
+// Iostreams wrapper for stdio FILE* -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/stdio_sync_filebuf.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _STDIO_SYNC_FILEBUF_H
+#define _STDIO_SYNC_FILEBUF_H 1
+
+#pragma GCC system_header
+
+#include <streambuf>
+#include <unistd.h>
+#include <cstdio>
+#include <bits/c++io.h> // For __c_file
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+#include <cwchar>
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /// class stdio_sync_filebuf.
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT> >
+ class stdio_sync_filebuf : public std::basic_streambuf<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ private:
+ // Underlying stdio FILE
+ std::__c_file* const _M_file;
+
+ // Last character gotten. This is used when pbackfail is
+ // called from basic_streambuf::sungetc()
+ int_type _M_unget_buf;
+
+ public:
+ explicit
+ stdio_sync_filebuf(std::__c_file* __f)
+ : _M_file(__f), _M_unget_buf(traits_type::eof())
+ { }
+
+ /**
+ * @return The underlying FILE*.
+ *
+ * This function can be used to access the underlying "C" file pointer.
+ * Note that there is no way for the library to track what you do
+ * with the file, so be careful.
+ */
+ std::__c_file* const
+ file() { return this->_M_file; }
+
+ protected:
+ int_type
+ syncgetc();
+
+ int_type
+ syncungetc(int_type __c);
+
+ int_type
+ syncputc(int_type __c);
+
+ virtual int_type
+ underflow()
+ {
+ int_type __c = this->syncgetc();
+ return this->syncungetc(__c);
+ }
+
+ virtual int_type
+ uflow()
+ {
+ // Store the gotten character in case we need to unget it.
+ _M_unget_buf = this->syncgetc();
+ return _M_unget_buf;
+ }
+
+ virtual int_type
+ pbackfail(int_type __c = traits_type::eof())
+ {
+ int_type __ret;
+ const int_type __eof = traits_type::eof();
+
+ // Check if the unget or putback was requested
+ if (traits_type::eq_int_type(__c, __eof)) // unget
+ {
+ if (!traits_type::eq_int_type(_M_unget_buf, __eof))
+ __ret = this->syncungetc(_M_unget_buf);
+ else // buffer invalid, fail.
+ __ret = __eof;
+ }
+ else // putback
+ __ret = this->syncungetc(__c);
+
+ // The buffered character is no longer valid, discard it.
+ _M_unget_buf = __eof;
+ return __ret;
+ }
+
+ virtual std::streamsize
+ xsgetn(char_type* __s, std::streamsize __n);
+
+ virtual int_type
+ overflow(int_type __c = traits_type::eof())
+ {
+ int_type __ret;
+ if (traits_type::eq_int_type(__c, traits_type::eof()))
+ {
+ if (std::fflush(_M_file))
+ __ret = traits_type::eof();
+ else
+ __ret = traits_type::not_eof(__c);
+ }
+ else
+ __ret = this->syncputc(__c);
+ return __ret;
+ }
+
+ virtual std::streamsize
+ xsputn(const char_type* __s, std::streamsize __n);
+
+ virtual int
+ sync()
+ { return std::fflush(_M_file); }
+
+ virtual std::streampos
+ seekoff(std::streamoff __off, std::ios_base::seekdir __dir,
+ std::ios_base::openmode = std::ios_base::in | std::ios_base::out)
+ {
+ std::streampos __ret(std::streamoff(-1));
+ int __whence;
+ if (__dir == std::ios_base::beg)
+ __whence = SEEK_SET;
+ else if (__dir == std::ios_base::cur)
+ __whence = SEEK_CUR;
+ else
+ __whence = SEEK_END;
+#ifdef _GLIBCXX_USE_LFS
+ if (!fseeko64(_M_file, __off, __whence))
+ __ret = std::streampos(ftello64(_M_file));
+#else
+ if (!fseek(_M_file, __off, __whence))
+ __ret = std::streampos(std::ftell(_M_file));
+#endif
+ return __ret;
+ }
+
+ virtual std::streampos
+ seekpos(std::streampos __pos,
+ std::ios_base::openmode __mode =
+ std::ios_base::in | std::ios_base::out)
+ { return seekoff(std::streamoff(__pos), std::ios_base::beg, __mode); }
+ };
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncgetc()
+ { return std::getc(_M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncungetc(int_type __c)
+ { return std::ungetc(__c, _M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<char>::int_type
+ stdio_sync_filebuf<char>::syncputc(int_type __c)
+ { return std::putc(__c, _M_file); }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<char>::xsgetn(char* __s, std::streamsize __n)
+ {
+ std::streamsize __ret = std::fread(__s, 1, __n, _M_file);
+ if (__ret > 0)
+ _M_unget_buf = traits_type::to_int_type(__s[__ret - 1]);
+ else
+ _M_unget_buf = traits_type::eof();
+ return __ret;
+ }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<char>::xsputn(const char* __s, std::streamsize __n)
+ { return std::fwrite(__s, 1, __n, _M_file); }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncgetc()
+ { return std::getwc(_M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncungetc(int_type __c)
+ { return std::ungetwc(__c, _M_file); }
+
+ template<>
+ inline stdio_sync_filebuf<wchar_t>::int_type
+ stdio_sync_filebuf<wchar_t>::syncputc(int_type __c)
+ { return std::putwc(__c, _M_file); }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<wchar_t>::xsgetn(wchar_t* __s, std::streamsize __n)
+ {
+ std::streamsize __ret = 0;
+ const int_type __eof = traits_type::eof();
+ while (__n--)
+ {
+ int_type __c = this->syncgetc();
+ if (traits_type::eq_int_type(__c, __eof))
+ break;
+ __s[__ret] = traits_type::to_char_type(__c);
+ ++__ret;
+ }
+
+ if (__ret > 0)
+ _M_unget_buf = traits_type::to_int_type(__s[__ret - 1]);
+ else
+ _M_unget_buf = traits_type::eof();
+ return __ret;
+ }
+
+ template<>
+ inline std::streamsize
+ stdio_sync_filebuf<wchar_t>::xsputn(const wchar_t* __s,
+ std::streamsize __n)
+ {
+ std::streamsize __ret = 0;
+ const int_type __eof = traits_type::eof();
+ while (__n--)
+ {
+ if (traits_type::eq_int_type(this->syncputc(*__s++), __eof))
+ break;
+ ++__ret;
+ }
+ return __ret;
+ }
+#endif
+
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template class stdio_sync_filebuf<char>;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template class stdio_sync_filebuf<wchar_t>;
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/string_conversions.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/string_conversions.h
new file mode 100644
index 0000000..36c19e0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/string_conversions.h
@@ -0,0 +1,94 @@
+// String Conversions -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef _STRING_CONVERSIONS_H
+#define _STRING_CONVERSIONS_H 1
+
+#pragma GCC system_header
+
+#include <ext/numeric_traits.h>
+#include <bits/functexcept.h>
+#include <cstddef>
+#include <cstdlib>
+#include <cwchar>
+#include <cstdio>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Helper for all the sto* functions.
+ template<typename _TRet, typename _Ret = _TRet, typename _CharT,
+ typename... _Base>
+ _Ret
+ __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...),
+ const char* __name, const _CharT* __str, std::size_t* __idx,
+ _Base... __base)
+ {
+ _Ret __ret;
+
+ _CharT* __endptr;
+ errno = 0;
+ const _TRet __tmp = __convf(__str, &__endptr, __base...);
+
+ if (__endptr == __str)
+ std::__throw_invalid_argument(__name);
+ else if (errno == ERANGE
+ || (std::__are_same<_Ret, int>::__value
+ && (__tmp < __numeric_traits<int>::__min
+ || __tmp > __numeric_traits<int>::__max)))
+ std::__throw_out_of_range(__name);
+ else
+ __ret = __tmp;
+
+ if (__idx)
+ *__idx = __endptr - __str;
+
+ return __ret;
+ }
+
+ // Helper for the to_string / to_wstring functions.
+ template<typename _String, typename _CharT = typename _String::value_type>
+ _String
+ __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*,
+ __builtin_va_list), std::size_t __n,
+ const _CharT* __fmt, ...)
+ {
+ // XXX Eventually the result will be constructed in place in
+ // the C++0x string, likely with the help of internal hooks.
+ _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
+ * __n));
+
+ __builtin_va_list __args;
+ __builtin_va_start(__args, __fmt);
+
+ const int __len = __convf(__s, __n, __fmt, __args);
+
+ __builtin_va_end(__args);
+
+ return _String(__s, __s + __len);
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _STRING_CONVERSIONS_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/throw_allocator.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/throw_allocator.h
new file mode 100644
index 0000000..c87408f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/throw_allocator.h
@@ -0,0 +1,448 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice
+// and this permission notice appear in supporting documentation. None
+// of the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied
+// warranty.
+
+/** @file ext/throw_allocator.h
+ * This file is a GNU extension to the Standard C++ Library.
+ *
+ * Contains an exception-throwing allocator, useful for testing
+ * exception safety. In addition, allocation addresses are stored and
+ * sanity checked.
+ */
+
+#ifndef _THROW_ALLOCATOR_H
+#define _THROW_ALLOCATOR_H 1
+
+#include <cmath>
+#include <ctime>
+#include <map>
+#include <set>
+#include <string>
+#include <ostream>
+#include <stdexcept>
+#include <utility>
+#include <tr1/random>
+#include <bits/functexcept.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ class twister_rand_gen
+ {
+ private:
+ std::tr1::mt19937 _M_generator;
+
+ public:
+ twister_rand_gen(unsigned int s = static_cast<unsigned int>(std::time(0)));
+
+ void
+ init(unsigned int);
+
+ double
+ get_prob();
+ };
+
+ /**
+ * @brief Thown by throw_allocator.
+ * @ingroup exceptions
+ */
+ struct forced_exception_error : public std::exception
+ { };
+
+ // Substitute for concurrence_error object in the case of -fno-exceptions.
+ inline void
+ __throw_forced_exception_error()
+ {
+#if __EXCEPTIONS
+ throw forced_exception_error();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ /// Base class.
+ class throw_allocator_base
+ {
+ public:
+ void
+ init(unsigned long seed);
+
+ static void
+ set_throw_prob(double throw_prob);
+
+ static double
+ get_throw_prob();
+
+ static void
+ set_label(size_t l);
+
+ static bool
+ empty();
+
+ struct group_throw_prob_adjustor
+ {
+ group_throw_prob_adjustor(size_t size) : _M_throw_prob_orig(_S_throw_prob)
+ {
+ _S_throw_prob =
+ 1 - std::pow(double(1 - _S_throw_prob), double(0.5 / (size + 1)));
+ }
+
+ ~group_throw_prob_adjustor()
+ { _S_throw_prob = _M_throw_prob_orig; }
+
+ private:
+ const double _M_throw_prob_orig;
+ };
+
+ struct zero_throw_prob_adjustor
+ {
+ zero_throw_prob_adjustor() : _M_throw_prob_orig(_S_throw_prob)
+ { _S_throw_prob = 0; }
+
+ ~zero_throw_prob_adjustor()
+ { _S_throw_prob = _M_throw_prob_orig; }
+
+ private:
+ const double _M_throw_prob_orig;
+ };
+
+ protected:
+ static void
+ insert(void*, size_t);
+
+ static void
+ erase(void*, size_t);
+
+ static void
+ throw_conditionally();
+
+ // See if a particular address and size has been allocated by this
+ // allocator.
+ static void
+ check_allocated(void*, size_t);
+
+ // See if a given label has been allocated by this allocator.
+ static void
+ check_allocated(size_t);
+
+ private:
+ typedef std::pair<size_t, size_t> alloc_data_type;
+ typedef std::map<void*, alloc_data_type> map_type;
+ typedef map_type::value_type entry_type;
+ typedef map_type::const_iterator const_iterator;
+ typedef map_type::const_reference const_reference;
+
+ friend std::ostream&
+ operator<<(std::ostream&, const throw_allocator_base&);
+
+ static entry_type
+ make_entry(void*, size_t);
+
+ static void
+ print_to_string(std::string&);
+
+ static void
+ print_to_string(std::string&, const_reference);
+
+ static twister_rand_gen _S_g;
+ static map_type _S_map;
+ static double _S_throw_prob;
+ static size_t _S_label;
+ };
+
+ /**
+ * @brief Allocator class with logging and exception control.
+ * @ingroup allocators
+ */
+ template<typename T>
+ class throw_allocator : public throw_allocator_base
+ {
+ public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+
+ template<typename U>
+ struct rebind
+ {
+ typedef throw_allocator<U> other;
+ };
+
+ throw_allocator() throw() { }
+
+ throw_allocator(const throw_allocator&) throw() { }
+
+ template<typename U>
+ throw_allocator(const throw_allocator<U>&) throw() { }
+
+ ~throw_allocator() throw() { }
+
+ size_type
+ max_size() const throw()
+ { return std::allocator<value_type>().max_size(); }
+
+ pointer
+ allocate(size_type __n, std::allocator<void>::const_pointer hint = 0)
+ {
+ if (__builtin_expect(__n > this->max_size(), false))
+ std::__throw_bad_alloc();
+
+ throw_conditionally();
+ value_type* const a = std::allocator<value_type>().allocate(__n, hint);
+ insert(a, sizeof(value_type) * __n);
+ return a;
+ }
+
+ void
+ construct(pointer __p, const T& val)
+ { return std::allocator<value_type>().construct(__p, val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ {
+ return std::allocator<value_type>().
+ construct(__p, std::forward<_Args>(__args)...);
+ }
+#endif
+
+ void
+ destroy(pointer __p)
+ { std::allocator<value_type>().destroy(__p); }
+
+ void
+ deallocate(pointer __p, size_type __n)
+ {
+ erase(__p, sizeof(value_type) * __n);
+ std::allocator<value_type>().deallocate(__p, __n);
+ }
+
+ void
+ check_allocated(pointer __p, size_type __n)
+ { throw_allocator_base::check_allocated(__p, sizeof(value_type) * __n); }
+
+ void
+ check_allocated(size_type label)
+ { throw_allocator_base::check_allocated(label); }
+ };
+
+ template<typename T>
+ inline bool
+ operator==(const throw_allocator<T>&, const throw_allocator<T>&)
+ { return true; }
+
+ template<typename T>
+ inline bool
+ operator!=(const throw_allocator<T>&, const throw_allocator<T>&)
+ { return false; }
+
+ std::ostream&
+ operator<<(std::ostream& os, const throw_allocator_base& alloc)
+ {
+ std::string error;
+ throw_allocator_base::print_to_string(error);
+ os << error;
+ return os;
+ }
+
+ // XXX Should be in .cc.
+ twister_rand_gen::
+ twister_rand_gen(unsigned int seed) : _M_generator(seed) { }
+
+ void
+ twister_rand_gen::
+ init(unsigned int seed)
+ { _M_generator.seed(seed); }
+
+ double
+ twister_rand_gen::
+ get_prob()
+ {
+ const double min = _M_generator.min();
+ const double res = static_cast<const double>(_M_generator() - min);
+ const double range = static_cast<const double>(_M_generator.max() - min);
+ const double ret = res / range;
+ _GLIBCXX_DEBUG_ASSERT(ret >= 0 && ret <= 1);
+ return ret;
+ }
+
+ twister_rand_gen throw_allocator_base::_S_g;
+
+ throw_allocator_base::map_type
+ throw_allocator_base::_S_map;
+
+ double throw_allocator_base::_S_throw_prob;
+
+ size_t throw_allocator_base::_S_label = 0;
+
+ throw_allocator_base::entry_type
+ throw_allocator_base::make_entry(void* p, size_t size)
+ { return std::make_pair(p, alloc_data_type(_S_label, size)); }
+
+ void
+ throw_allocator_base::init(unsigned long seed)
+ { _S_g.init(seed); }
+
+ void
+ throw_allocator_base::set_throw_prob(double throw_prob)
+ { _S_throw_prob = throw_prob; }
+
+ double
+ throw_allocator_base::get_throw_prob()
+ { return _S_throw_prob; }
+
+ void
+ throw_allocator_base::set_label(size_t l)
+ { _S_label = l; }
+
+ void
+ throw_allocator_base::insert(void* p, size_t size)
+ {
+ const_iterator found_it = _S_map.find(p);
+ if (found_it != _S_map.end())
+ {
+ std::string error("throw_allocator_base::insert");
+ error += "double insert!";
+ error += '\n';
+ print_to_string(error, make_entry(p, size));
+ print_to_string(error, *found_it);
+ std::__throw_logic_error(error.c_str());
+ }
+ _S_map.insert(make_entry(p, size));
+ }
+
+ bool
+ throw_allocator_base::empty()
+ { return _S_map.empty(); }
+
+ void
+ throw_allocator_base::erase(void* p, size_t size)
+ {
+ check_allocated(p, size);
+ _S_map.erase(p);
+ }
+
+ void
+ throw_allocator_base::check_allocated(void* p, size_t size)
+ {
+ const_iterator found_it = _S_map.find(p);
+ if (found_it == _S_map.end())
+ {
+ std::string error("throw_allocator_base::check_allocated by value ");
+ error += "null erase!";
+ error += '\n';
+ print_to_string(error, make_entry(p, size));
+ std::__throw_logic_error(error.c_str());
+ }
+
+ if (found_it->second.second != size)
+ {
+ std::string error("throw_allocator_base::check_allocated by value ");
+ error += "wrong-size erase!";
+ error += '\n';
+ print_to_string(error, make_entry(p, size));
+ print_to_string(error, *found_it);
+ std::__throw_logic_error(error.c_str());
+ }
+ }
+
+ void
+ throw_allocator_base::check_allocated(size_t label)
+ {
+ std::string found;
+ const_iterator it = _S_map.begin();
+ while (it != _S_map.end())
+ {
+ if (it->second.first == label)
+ {
+ print_to_string(found, *it);
+ }
+ ++it;
+ }
+
+ if (!found.empty())
+ {
+ std::string error("throw_allocator_base::check_allocated by label ");
+ error += '\n';
+ error += found;
+ std::__throw_logic_error(error.c_str());
+ }
+ }
+
+ void
+ throw_allocator_base::throw_conditionally()
+ {
+ if (_S_g.get_prob() < _S_throw_prob)
+ __throw_forced_exception_error();
+ }
+
+ void
+ throw_allocator_base::print_to_string(std::string& s)
+ {
+ const_iterator begin = throw_allocator_base::_S_map.begin();
+ const_iterator end = throw_allocator_base::_S_map.end();
+ for (; begin != end; ++begin)
+ print_to_string(s, *begin);
+ }
+
+ void
+ throw_allocator_base::print_to_string(std::string& s, const_reference ref)
+ {
+ char buf[40];
+ const char tab('\t');
+ s += "address: ";
+ __builtin_sprintf(buf, "%p", ref.first);
+ s += buf;
+ s += tab;
+ s += "label: ";
+ unsigned long l = static_cast<unsigned long>(ref.second.first);
+ __builtin_sprintf(buf, "%lu", l);
+ s += buf;
+ s += tab;
+ s += "size: ";
+ l = static_cast<unsigned long>(ref.second.second);
+ __builtin_sprintf(buf, "%lu", l);
+ s += buf;
+ s += '\n';
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/type_traits.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/type_traits.h
new file mode 100644
index 0000000..b24ce4e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/type_traits.h
@@ -0,0 +1,204 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License as published by the Free Software
+// Foundation; either version 3, 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
+// General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/type_traits.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _EXT_TYPE_TRAITS
+#define _EXT_TYPE_TRAITS 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/cpp_type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // Define a nested type if some predicate holds.
+ template<bool, typename>
+ struct __enable_if
+ { };
+
+ template<typename _Tp>
+ struct __enable_if<true, _Tp>
+ { typedef _Tp __type; };
+
+
+ // Conditional expression for types. If true, first, if false, second.
+ template<bool _Cond, typename _Iftrue, typename _Iffalse>
+ struct __conditional_type
+ { typedef _Iftrue __type; };
+
+ template<typename _Iftrue, typename _Iffalse>
+ struct __conditional_type<false, _Iftrue, _Iffalse>
+ { typedef _Iffalse __type; };
+
+
+ // Given an integral builtin type, return the corresponding unsigned type.
+ template<typename _Tp>
+ struct __add_unsigned
+ {
+ private:
+ typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
+
+ public:
+ typedef typename __if_type::__type __type;
+ };
+
+ template<>
+ struct __add_unsigned<char>
+ { typedef unsigned char __type; };
+
+ template<>
+ struct __add_unsigned<signed char>
+ { typedef unsigned char __type; };
+
+ template<>
+ struct __add_unsigned<short>
+ { typedef unsigned short __type; };
+
+ template<>
+ struct __add_unsigned<int>
+ { typedef unsigned int __type; };
+
+ template<>
+ struct __add_unsigned<long>
+ { typedef unsigned long __type; };
+
+ template<>
+ struct __add_unsigned<long long>
+ { typedef unsigned long long __type; };
+
+ // Declare but don't define.
+ template<>
+ struct __add_unsigned<bool>;
+
+ template<>
+ struct __add_unsigned<wchar_t>;
+
+
+ // Given an integral builtin type, return the corresponding signed type.
+ template<typename _Tp>
+ struct __remove_unsigned
+ {
+ private:
+ typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type;
+
+ public:
+ typedef typename __if_type::__type __type;
+ };
+
+ template<>
+ struct __remove_unsigned<char>
+ { typedef signed char __type; };
+
+ template<>
+ struct __remove_unsigned<unsigned char>
+ { typedef signed char __type; };
+
+ template<>
+ struct __remove_unsigned<unsigned short>
+ { typedef short __type; };
+
+ template<>
+ struct __remove_unsigned<unsigned int>
+ { typedef int __type; };
+
+ template<>
+ struct __remove_unsigned<unsigned long>
+ { typedef long __type; };
+
+ template<>
+ struct __remove_unsigned<unsigned long long>
+ { typedef long long __type; };
+
+ // Declare but don't define.
+ template<>
+ struct __remove_unsigned<bool>;
+
+ template<>
+ struct __remove_unsigned<wchar_t>;
+
+
+ // For use in string and vstring.
+ template<typename _Type>
+ inline bool
+ __is_null_pointer(_Type* __ptr)
+ { return __ptr == 0; }
+
+ template<typename _Type>
+ inline bool
+ __is_null_pointer(_Type)
+ { return false; }
+
+
+ // For complex and cmath
+ template<typename _Tp, bool = std::__is_integer<_Tp>::__value>
+ struct __promote
+ { typedef double __type; };
+
+ template<typename _Tp>
+ struct __promote<_Tp, false>
+ { typedef _Tp __type; };
+
+ template<typename _Tp, typename _Up>
+ struct __promote_2
+ {
+ private:
+ typedef typename __promote<_Tp>::__type __type1;
+ typedef typename __promote<_Up>::__type __type2;
+
+ public:
+ typedef __typeof__(__type1() + __type2()) __type;
+ };
+
+ template<typename _Tp, typename _Up, typename _Vp>
+ struct __promote_3
+ {
+ private:
+ typedef typename __promote<_Tp>::__type __type1;
+ typedef typename __promote<_Up>::__type __type2;
+ typedef typename __promote<_Vp>::__type __type3;
+
+ public:
+ typedef __typeof__(__type1() + __type2() + __type3()) __type;
+ };
+
+ template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
+ struct __promote_4
+ {
+ private:
+ typedef typename __promote<_Tp>::__type __type1;
+ typedef typename __promote<_Up>::__type __type2;
+ typedef typename __promote<_Vp>::__type __type3;
+ typedef typename __promote<_Wp>::__type __type4;
+
+ public:
+ typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/typelist.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/typelist.h
new file mode 100644
index 0000000..ff1cac7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/typelist.h
@@ -0,0 +1,544 @@
+// -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// Copyright (C) 2004 Ami Tavory and Vladimir Dreizin, IBM-HRL.
+
+// Permission to use, copy, modify, sell, and distribute this software
+// is hereby granted without fee, provided that the above copyright
+// notice appears in all copies, and that both that copyright notice and
+// this permission notice appear in supporting documentation. None of
+// the above authors, nor IBM Haifa Research Laboratories, make any
+// representation about the suitability of this software for any
+// purpose. It is provided "as is" without express or implied warranty.
+
+/**
+ * @file typelist.h
+ * Contains typelist_chain definitions.
+ * Typelists are an idea by Andrei Alexandrescu.
+ */
+
+#ifndef _TYPELIST_H
+#define _TYPELIST_H 1
+
+#include <ext/type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+/** @namespace __gnu_cxx::typelist
+ * @brief GNU typelist extensions for public compile-time use.
+*/
+namespace typelist
+{
+ struct null_type { };
+
+ template<typename Root>
+ struct node
+ {
+ typedef Root root;
+ };
+
+ // Forward declarations of functors.
+ template<typename Hd, typename Typelist>
+ struct chain
+ {
+ typedef Hd head;
+ typedef Typelist tail;
+ };
+
+ // Apply all typelist types to unary functor.
+ template<typename Fn, typename Typelist>
+ void
+ apply(Fn&, Typelist);
+
+ /// Apply all typelist types to generator functor.
+ template<typename Gn, typename Typelist>
+ void
+ apply_generator(Gn&, Typelist);
+
+ // Apply all typelist types and values to generator functor.
+ template<typename Gn, typename TypelistT, typename TypelistV>
+ void
+ apply_generator(Gn&, TypelistT, TypelistV);
+
+ template<typename Typelist0, typename Typelist1>
+ struct append;
+
+ template<typename Typelist_Typelist>
+ struct append_typelist;
+
+ template<typename Typelist, typename T>
+ struct contains;
+
+ template<typename Typelist, template<typename T> class Pred>
+ struct filter;
+
+ template<typename Typelist, int i>
+ struct at_index;
+
+ template<typename Typelist, template<typename T> class Transform>
+ struct transform;
+
+ template<typename Typelist_Typelist>
+ struct flatten;
+
+ template<typename Typelist>
+ struct from_first;
+
+ template<typename T1>
+ struct create1;
+
+ template<typename T1, typename T2>
+ struct create2;
+
+ template<typename T1, typename T2, typename T3>
+ struct create3;
+
+ template<typename T1, typename T2, typename T3, typename T4>
+ struct create4;
+
+ template<typename T1, typename T2, typename T3, typename T4, typename T5>
+ struct create5;
+
+ template<typename T1, typename T2, typename T3,
+ typename T4, typename T5, typename T6>
+ struct create6;
+} // namespace typelist
+
+_GLIBCXX_END_NAMESPACE
+
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+namespace typelist
+{
+namespace detail
+{
+ template<typename Fn, typename Typelist_Chain>
+ struct apply_;
+
+ template<typename Fn, typename Hd, typename Tl>
+ struct apply_<Fn, chain<Hd, Tl> >
+ {
+ void
+ operator()(Fn& f)
+ {
+ f.operator()(Hd());
+ apply_<Fn, Tl> next;
+ next(f);
+ }
+ };
+
+ template<typename Fn>
+ struct apply_<Fn, null_type>
+ {
+ void
+ operator()(Fn&) { }
+ };
+
+ template<typename Gn, typename Typelist_Chain>
+ struct apply_generator1_;
+
+ template<typename Gn, typename Hd, typename Tl>
+ struct apply_generator1_<Gn, chain<Hd, Tl> >
+ {
+ void
+ operator()(Gn& g)
+ {
+ g.template operator()<Hd>();
+ apply_generator1_<Gn, Tl> next;
+ next(g);
+ }
+ };
+
+ template<typename Gn>
+ struct apply_generator1_<Gn, null_type>
+ {
+ void
+ operator()(Gn&) { }
+ };
+
+ template<typename Gn, typename TypelistT_Chain, typename TypelistV_Chain>
+ struct apply_generator2_;
+
+ template<typename Gn, typename Hd1, typename TlT, typename Hd2, typename TlV>
+ struct apply_generator2_<Gn, chain<Hd1, TlT>, chain<Hd2, TlV> >
+ {
+ void
+ operator()(Gn& g)
+ {
+ g.template operator()<Hd1, Hd2>();
+ apply_generator2_<Gn, TlT, TlV> next;
+ next(g);
+ }
+ };
+
+ template<typename Gn>
+ struct apply_generator2_<Gn, null_type, null_type>
+ {
+ void
+ operator()(Gn&) { }
+ };
+
+ template<typename Typelist_Chain0, typename Typelist_Chain1>
+ struct append_;
+
+ template<typename Hd, typename Tl, typename Typelist_Chain>
+ struct append_<chain<Hd, Tl>, Typelist_Chain>
+ {
+ private:
+ typedef append_<Tl, Typelist_Chain> append_type;
+
+ public:
+ typedef chain<Hd, typename append_type::type> type;
+ };
+
+ template<typename Typelist_Chain>
+ struct append_<null_type, Typelist_Chain>
+ {
+ typedef Typelist_Chain type;
+ };
+
+ template<typename Typelist_Chain>
+ struct append_<Typelist_Chain, null_type>
+ {
+ typedef Typelist_Chain type;
+ };
+
+ template<>
+ struct append_<null_type, null_type>
+ {
+ typedef null_type type;
+ };
+
+ template<typename Typelist_Typelist_Chain>
+ struct append_typelist_;
+
+ template<typename Hd>
+ struct append_typelist_<chain<Hd, null_type> >
+ {
+ typedef chain<Hd, null_type> type;
+ };
+
+ template<typename Hd, typename Tl>
+ struct append_typelist_<chain< Hd, Tl> >
+ {
+ private:
+ typedef typename append_typelist_<Tl>::type rest_type;
+
+ public:
+ typedef typename append<Hd, node<rest_type> >::type::root type;
+ };
+
+ template<typename Typelist_Chain, typename T>
+ struct contains_;
+
+ template<typename T>
+ struct contains_<null_type, T>
+ {
+ enum
+ {
+ value = false
+ };
+ };
+
+ template<typename Hd, typename Tl, typename T>
+ struct contains_<chain<Hd, Tl>, T>
+ {
+ enum
+ {
+ value = contains_<Tl, T>::value
+ };
+ };
+
+ template<typename Tl, typename T>
+ struct contains_<chain<T, Tl>, T>
+ {
+ enum
+ {
+ value = true
+ };
+ };
+
+ template<typename Typelist_Chain, template<typename T> class Pred>
+ struct chain_filter_;
+
+ template<template<typename T> class Pred>
+ struct chain_filter_<null_type, Pred>
+ {
+ typedef null_type type;
+ };
+
+ template<typename Hd, typename Tl, template<typename T> class Pred>
+ struct chain_filter_<chain<Hd, Tl>, Pred>
+ {
+ private:
+ enum
+ {
+ include_hd = Pred<Hd>::value
+ };
+
+ typedef typename chain_filter_<Tl, Pred>::type rest_type;
+ typedef chain<Hd, rest_type> chain_type;
+
+ public:
+ typedef typename __conditional_type<include_hd, chain_type, rest_type>::__type type;
+ };
+
+ template<typename Typelist_Chain, int i>
+ struct chain_at_index_;
+
+ template<typename Hd, typename Tl>
+ struct chain_at_index_<chain<Hd, Tl>, 0>
+ {
+ typedef Hd type;
+ };
+
+ template<typename Hd, typename Tl, int i>
+ struct chain_at_index_<chain<Hd, Tl>, i>
+ {
+ typedef typename chain_at_index_<Tl, i - 1>::type type;
+ };
+
+ template<class Typelist_Chain, template<typename T> class Transform>
+ struct chain_transform_;
+
+ template<template<typename T> class Transform>
+ struct chain_transform_<null_type, Transform>
+ {
+ typedef null_type type;
+ };
+
+ template<class Hd, class Tl, template<typename T> class Transform>
+ struct chain_transform_<chain<Hd, Tl>, Transform>
+ {
+ private:
+ typedef typename chain_transform_<Tl, Transform>::type rest_type;
+ typedef typename Transform<Hd>::type transform_type;
+
+ public:
+ typedef chain<transform_type, rest_type> type;
+ };
+
+ template<typename Typelist_Typelist_Chain>
+ struct chain_flatten_;
+
+ template<typename Hd_Tl>
+ struct chain_flatten_<chain<Hd_Tl, null_type> >
+ {
+ typedef typename Hd_Tl::root type;
+ };
+
+ template<typename Hd_Typelist, class Tl_Typelist>
+ struct chain_flatten_<chain<Hd_Typelist, Tl_Typelist> >
+ {
+ private:
+ typedef typename chain_flatten_<Tl_Typelist>::type rest_type;
+ typedef append<Hd_Typelist, node<rest_type> > append_type;
+ public:
+ typedef typename append_type::type::root type;
+ };
+} // namespace detail
+} // namespace typelist
+
+_GLIBCXX_END_NAMESPACE
+
+#define _GLIBCXX_TYPELIST_CHAIN1(X0) __gnu_cxx::typelist::chain<X0, __gnu_cxx::typelist::null_type>
+#define _GLIBCXX_TYPELIST_CHAIN2(X0, X1) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN1(X1) >
+#define _GLIBCXX_TYPELIST_CHAIN3(X0, X1, X2) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN2(X1, X2) >
+#define _GLIBCXX_TYPELIST_CHAIN4(X0, X1, X2, X3) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN3(X1, X2, X3) >
+#define _GLIBCXX_TYPELIST_CHAIN5(X0, X1, X2, X3, X4) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN4(X1, X2, X3, X4) >
+#define _GLIBCXX_TYPELIST_CHAIN6(X0, X1, X2, X3, X4, X5) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN5(X1, X2, X3, X4, X5) >
+#define _GLIBCXX_TYPELIST_CHAIN7(X0, X1, X2, X3, X4, X5, X6) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN6(X1, X2, X3, X4, X5, X6) >
+#define _GLIBCXX_TYPELIST_CHAIN8(X0, X1, X2, X3, X4, X5, X6, X7) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN7(X1, X2, X3, X4, X5, X6, X7) >
+#define _GLIBCXX_TYPELIST_CHAIN9(X0, X1, X2, X3, X4, X5, X6, X7, X8) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN8(X1, X2, X3, X4, X5, X6, X7, X8) >
+#define _GLIBCXX_TYPELIST_CHAIN10(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN9(X1, X2, X3, X4, X5, X6, X7, X8, X9) >
+#define _GLIBCXX_TYPELIST_CHAIN11(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN10(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10) >
+#define _GLIBCXX_TYPELIST_CHAIN12(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN11(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11) >
+#define _GLIBCXX_TYPELIST_CHAIN13(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN12(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12) >
+#define _GLIBCXX_TYPELIST_CHAIN14(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN13(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13) >
+#define _GLIBCXX_TYPELIST_CHAIN15(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) __gnu_cxx::typelist::chain<X0, _GLIBCXX_TYPELIST_CHAIN14(X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14) >
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+namespace typelist
+{
+ template<typename Fn, typename Typelist>
+ void
+ apply(Fn& fn, Typelist)
+ {
+ detail::apply_<Fn, typename Typelist::root> a;
+ a(fn);
+ }
+
+ template<typename Fn, typename Typelist>
+ void
+ apply_generator(Fn& fn, Typelist)
+ {
+ detail::apply_generator1_<Fn, typename Typelist::root> a;
+ a(fn);
+ }
+
+ template<typename Fn, typename TypelistT, typename TypelistV>
+ void
+ apply_generator(Fn& fn, TypelistT, TypelistV)
+ {
+ typedef typename TypelistT::root rootT;
+ typedef typename TypelistV::root rootV;
+ detail::apply_generator2_<Fn, rootT, rootV> a;
+ a(fn);
+ }
+
+ template<typename Typelist0, typename Typelist1>
+ struct append
+ {
+ private:
+ typedef typename Typelist0::root root0_type;
+ typedef typename Typelist1::root root1_type;
+ typedef detail::append_<root0_type, root1_type> append_type;
+
+ public:
+ typedef node<typename append_type::type> type;
+ };
+
+ template<typename Typelist_Typelist>
+ struct append_typelist
+ {
+ private:
+ typedef typename Typelist_Typelist::root root_type;
+ typedef detail::append_typelist_<root_type> append_type;
+
+ public:
+ typedef node<typename append_type::type> type;
+ };
+
+ template<typename Typelist, typename T>
+ struct contains
+ {
+ private:
+ typedef typename Typelist::root root_type;
+
+ public:
+ enum
+ {
+ value = detail::contains_<root_type, T>::value
+ };
+ };
+
+ template<typename Typelist, template<typename T> class Pred>
+ struct filter
+ {
+ private:
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_filter_<root_type, Pred> filter_type;
+
+ public:
+ typedef node<typename filter_type::type> type;
+ };
+
+ template<typename Typelist, int i>
+ struct at_index
+ {
+ private:
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_at_index_<root_type, i> index_type;
+
+ public:
+ typedef typename index_type::type type;
+ };
+
+ template<typename Typelist, template<typename T> class Transform>
+ struct transform
+ {
+ private:
+ typedef typename Typelist::root root_type;
+ typedef detail::chain_transform_<root_type, Transform> transform_type;
+
+ public:
+ typedef node<typename transform_type::type> type;
+ };
+
+ template<typename Typelist_Typelist>
+ struct flatten
+ {
+ private:
+ typedef typename Typelist_Typelist::root root_type;
+ typedef typename detail::chain_flatten_<root_type>::type flatten_type;
+
+ public:
+ typedef node<flatten_type> type;
+ };
+
+ template<typename Typelist>
+ struct from_first
+ {
+ private:
+ typedef typename at_index<Typelist, 0>::type first_type;
+
+ public:
+ typedef node<chain<first_type, null_type> > type;
+ };
+
+ template<typename T1>
+ struct create1
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN1(T1)> type;
+ };
+
+ template<typename T1, typename T2>
+ struct create2
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN2(T1,T2)> type;
+ };
+
+ template<typename T1, typename T2, typename T3>
+ struct create3
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN3(T1,T2,T3)> type;
+ };
+
+ template<typename T1, typename T2, typename T3, typename T4>
+ struct create4
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN4(T1,T2,T3,T4)> type;
+ };
+
+ template<typename T1, typename T2, typename T3,
+ typename T4, typename T5>
+ struct create5
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN5(T1,T2,T3,T4,T5)> type;
+ };
+
+ template<typename T1, typename T2, typename T3,
+ typename T4, typename T5, typename T6>
+ struct create6
+ {
+ typedef node<_GLIBCXX_TYPELIST_CHAIN6(T1,T2,T3,T4,T5,T6)> type;
+ };
+} // namespace typelist
+_GLIBCXX_END_NAMESPACE
+
+
+#endif
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.h
new file mode 100644
index 0000000..6377ca5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.h
@@ -0,0 +1,2598 @@
+// Versatile string -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/vstring.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _VSTRING_H
+#define _VSTRING_H 1
+
+#pragma GCC system_header
+
+#include <initializer_list>
+#include <ext/vstring_util.h>
+#include <ext/rc_string_base.h>
+#include <ext/sso_string_base.h>
+
+#if __google_stl_debug_string && !defined(_GLIBCXX_DEBUG)
+# undef _GLIBCXX_DEBUG_ASSERT
+# undef _GLIBCXX_DEBUG_PEDASSERT
+// Perform additional checks (but only in this file).
+# define _GLIBCXX_DEBUG_ASSERT(_Condition) \
+ if (! (_Condition)) { \
+ char buf[512]; \
+ __builtin_snprintf(buf, sizeof(buf), \
+ "%s:%d: %s: Assertion '%s' failed.\n", \
+ __FILE__, __LINE__, __func__, # _Condition); \
+ std::__throw_runtime_error(buf); \
+ }
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition) _GLIBCXX_DEBUG_ASSERT(_Condition)
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ /**
+ * @class __versa_string vstring.h
+ * @brief Managing sequences of characters and character-like objects.
+ */
+
+ // Template class __versa_string
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ class __versa_string
+ : private _Base<_CharT, _Traits, _Alloc>
+ {
+ typedef _Base<_CharT, _Traits, _Alloc> __vstring_base;
+ typedef typename __vstring_base::_CharT_alloc_type _CharT_alloc_type;
+
+ // Types:
+ public:
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef _Alloc allocator_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+ typedef typename _CharT_alloc_type::difference_type difference_type;
+ typedef typename _CharT_alloc_type::reference reference;
+ typedef typename _CharT_alloc_type::const_reference const_reference;
+ typedef typename _CharT_alloc_type::pointer pointer;
+ typedef typename _CharT_alloc_type::const_pointer const_pointer;
+ typedef __gnu_cxx::__normal_iterator<pointer, __versa_string> iterator;
+ typedef __gnu_cxx::__normal_iterator<const_pointer, __versa_string>
+ const_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+
+ // Data Member (public):
+ /// Value returned by various member functions when they fail.
+ static const size_type npos = static_cast<size_type>(-1);
+
+ private:
+ size_type
+ _M_check(size_type __pos, const char* __s) const
+ {
+ if (__pos > this->size())
+ std::__throw_out_of_range(__N(__s));
+ return __pos;
+ }
+
+ void
+ _M_check_length(size_type __n1, size_type __n2, const char* __s) const
+ {
+ if (this->max_size() - (this->size() - __n1) < __n2)
+ std::__throw_length_error(__N(__s));
+ }
+
+ // NB: _M_limit doesn't check for a bad __pos value.
+ size_type
+ _M_limit(size_type __pos, size_type __off) const
+ {
+ const bool __testoff = __off < this->size() - __pos;
+ return __testoff ? __off : this->size() - __pos;
+ }
+
+ // True if _Rep and source do not overlap.
+ bool
+ _M_disjunct(const _CharT* __s) const
+ {
+ return (std::less<const _CharT*>()(__s, this->_M_data())
+ || std::less<const _CharT*>()(this->_M_data()
+ + this->size(), __s));
+ }
+
+ // For the internal use we have functions similar to `begin'/`end'
+ // but they do not call _M_leak.
+ iterator
+ _M_ibegin() const
+ { return iterator(this->_M_data()); }
+
+ iterator
+ _M_iend() const
+ { return iterator(this->_M_data() + this->_M_length()); }
+
+ public:
+ // Construct/copy/destroy:
+ // NB: We overload ctors in some cases instead of using default
+ // arguments, per 17.4.4.4 para. 2 item 2.
+
+ /**
+ * @brief Default constructor creates an empty string.
+ */
+ __versa_string()
+ : __vstring_base() { }
+
+ /**
+ * @brief Construct an empty string using allocator @a a.
+ */
+ explicit
+ __versa_string(const _Alloc& __a)
+ : __vstring_base(__a) { }
+
+ // NB: per LWG issue 42, semantics different from IS:
+ /**
+ * @brief Construct string with copy of value of @a str.
+ * @param __str Source string.
+ */
+ __versa_string(const __versa_string& __str)
+ : __vstring_base(__str) { }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief String move constructor.
+ * @param __str Source string.
+ *
+ * The newly-constructed %string contains the exact contents of
+ * @a str. The contents of @a str are a valid, but unspecified
+ * string.
+ */
+ __versa_string(__versa_string&& __str)
+ : __vstring_base(std::forward<__vstring_base>(__str)) { }
+
+ /**
+ * @brief Construct string from an initializer list.
+ * @param __l std::initializer_list of characters.
+ * @param __a Allocator to use (default is default allocator).
+ */
+ __versa_string(std::initializer_list<_CharT> __l,
+ const _Alloc& __a = _Alloc())
+ : __vstring_base(__l.begin(), __l.end(), __a) { }
+#endif
+
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param __str Source string.
+ * @param __pos Index of first character to copy from.
+ * @param __n Number of characters to copy (default remainder).
+ */
+ __versa_string(const __versa_string& __str, size_type __pos,
+ size_type __n = npos)
+ : __vstring_base(__str._M_data()
+ + __str._M_check(__pos,
+ "__versa_string::__versa_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, _Alloc()) { }
+
+ /**
+ * @brief Construct string as copy of a substring.
+ * @param __str Source string.
+ * @param __pos Index of first character to copy from.
+ * @param __n Number of characters to copy.
+ * @param __a Allocator to use.
+ */
+ __versa_string(const __versa_string& __str, size_type __pos,
+ size_type __n, const _Alloc& __a)
+ : __vstring_base(__str._M_data()
+ + __str._M_check(__pos,
+ "__versa_string::__versa_string"),
+ __str._M_data() + __str._M_limit(__pos, __n)
+ + __pos, __a) { }
+
+ /**
+ * @brief Construct string initialized by a character array.
+ * @param __s Source character array.
+ * @param __n Number of characters to copy.
+ * @param __a Allocator to use (default is default allocator).
+ *
+ * NB: @a __s must have at least @a __n characters, '\\0' has no special
+ * meaning.
+ */
+ __versa_string(const _CharT* __s, size_type __n,
+ const _Alloc& __a = _Alloc())
+ : __vstring_base(__s, __s + __n, __a) { }
+
+ /**
+ * @brief Construct string as copy of a C string.
+ * @param __s Source C string.
+ * @param __a Allocator to use (default is default allocator).
+ */
+ __versa_string(const _CharT* __s, const _Alloc& __a = _Alloc())
+ : __vstring_base(__s, __s ? __s + traits_type::length(__s) :
+ __s + npos, __a) { }
+
+ /**
+ * @brief Construct string as multiple characters.
+ * @param __n Number of characters.
+ * @param __c Character to use.
+ * @param __a Allocator to use (default is default allocator).
+ */
+ __versa_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
+ : __vstring_base(__n, __c, __a) { }
+
+ /**
+ * @brief Construct string as copy of a range.
+ * @param __beg Start of range.
+ * @param __end End of range.
+ * @param __a Allocator to use (default is default allocator).
+ */
+ template<class _InputIterator>
+ __versa_string(_InputIterator __beg, _InputIterator __end,
+ const _Alloc& __a = _Alloc())
+ : __vstring_base(__beg, __end, __a) { }
+
+ /**
+ * @brief Destroy the string instance.
+ */
+ ~__versa_string() { }
+
+ /**
+ * @brief Assign the value of @a str to this string.
+ * @param __str Source string.
+ */
+ __versa_string&
+ operator=(const __versa_string& __str)
+ { return this->assign(__str); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief String move assignment operator.
+ * @param __str Source string.
+ *
+ * The contents of @a __str are moved into this string (without
+ * copying). @a __str is a valid, but unspecified string.
+ */
+ __versa_string&
+ operator=(__versa_string&& __str)
+ {
+ if (this != &__str)
+ this->swap(__str);
+ return *this;
+ }
+
+ /**
+ * @brief Set value to string constructed from initializer list.
+ * @param __l std::initializer_list.
+ */
+ __versa_string&
+ operator=(std::initializer_list<_CharT> __l)
+ {
+ this->assign(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+
+ /**
+ * @brief Copy contents of @a __s into this string.
+ * @param __s Source null-terminated string.
+ */
+ __versa_string&
+ operator=(const _CharT* __s)
+ { return this->assign(__s); }
+
+ /**
+ * @brief Set value to string of length 1.
+ * @param __c Source character.
+ *
+ * Assigning to a character makes this string length 1 and
+ * (*this)[0] == @a __c.
+ */
+ __versa_string&
+ operator=(_CharT __c)
+ {
+ this->assign(1, __c);
+ return *this;
+ }
+
+ // Iterators:
+ /**
+ * Returns a read/write iterator that points to the first character in
+ * the %string. Unshares the string.
+ */
+ iterator
+ begin()
+ {
+ this->_M_leak();
+ return iterator(this->_M_data());
+ }
+
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * character in the %string.
+ */
+ const_iterator
+ begin() const
+ { return const_iterator(this->_M_data()); }
+
+ /**
+ * Returns a read/write iterator that points one past the last
+ * character in the %string. Unshares the string.
+ */
+ iterator
+ end()
+ {
+ this->_M_leak();
+ return iterator(this->_M_data() + this->size());
+ }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the
+ * last character in the %string.
+ */
+ const_iterator
+ end() const
+ { return const_iterator(this->_M_data() + this->size()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to the last
+ * character in the %string. Iteration is done in reverse element
+ * order. Unshares the string.
+ */
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last character in the %string. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read/write reverse iterator that points to one before the
+ * first character in the %string. Iteration is done in reverse
+ * element order. Unshares the string.
+ */
+ reverse_iterator
+ rend()
+ { return reverse_iterator(this->begin()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first character in the %string. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(this->begin()); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read-only (constant) iterator that points to the first
+ * character in the %string.
+ */
+ const_iterator
+ cbegin() const
+ { return const_iterator(this->_M_data()); }
+
+ /**
+ * Returns a read-only (constant) iterator that points one past the
+ * last character in the %string.
+ */
+ const_iterator
+ cend() const
+ { return const_iterator(this->_M_data() + this->size()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to the last character in the %string. Iteration is done in
+ * reverse element order.
+ */
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(this->end()); }
+
+ /**
+ * Returns a read-only (constant) reverse iterator that points
+ * to one before the first character in the %string. Iteration
+ * is done in reverse element order.
+ */
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(this->begin()); }
+#endif
+
+ public:
+ // Capacity:
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
+ size_type
+ size() const
+ { return this->_M_length(); }
+
+ /// Returns the number of characters in the string, not including any
+ /// null-termination.
+ size_type
+ length() const
+ { return this->_M_length(); }
+
+ /// Returns the size() of the largest possible %string.
+ size_type
+ max_size() const
+ { return this->_M_max_size(); }
+
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param __n Number of characters the %string should contain.
+ * @param __c Character to fill any new elements.
+ *
+ * This function will %resize the %string to the specified
+ * number of characters. If the number is smaller than the
+ * %string's current size the %string is truncated, otherwise
+ * the %string is extended and new elements are set to @a __c.
+ */
+ void
+ resize(size_type __n, _CharT __c);
+
+ /**
+ * @brief Resizes the %string to the specified number of characters.
+ * @param __n Number of characters the %string should contain.
+ *
+ * This function will resize the %string to the specified
+ * length. If the new size is smaller than the %string's
+ * current size the %string is truncated, otherwise the %string
+ * is extended and new characters are default-constructed. For
+ * basic types such as char, this means setting them to 0.
+ */
+ void
+ resize(size_type __n)
+ { this->resize(__n, _CharT()); }
+
+ /**
+ * Returns the total number of characters that the %string can
+ * hold before needing to allocate more memory.
+ */
+ size_type
+ capacity() const
+ { return this->_M_capacity(); }
+
+ /**
+ * @brief Attempt to preallocate enough memory for specified number of
+ * characters.
+ * @param __res_arg Number of characters required.
+ * @throw std::length_error If @a __res_arg exceeds @c max_size().
+ *
+ * This function attempts to reserve enough memory for the
+ * %string to hold the specified number of characters. If the
+ * number requested is more than max_size(), length_error is
+ * thrown.
+ *
+ * The advantage of this function is that if optimal code is a
+ * necessity and the user can determine the string length that
+ * will be required, the user can reserve the memory in
+ * %advance, and thus prevent a possible reallocation of memory
+ * and copying of %string data.
+ */
+ void
+ reserve(size_type __res_arg = 0)
+ { this->_M_reserve(__res_arg); }
+
+ /**
+ * Erases the string, making it empty.
+ */
+ void
+ clear()
+ { this->_M_clear(); }
+
+ /**
+ * Returns true if the %string is empty. Equivalent to *this == "".
+ */
+ bool
+ empty() const
+ { return this->size() == 0; }
+
+ // Element access:
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param __pos The index of the character to access.
+ * @return Read-only (constant) reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().)
+ */
+ const_reference
+ operator[] (size_type __pos) const
+ {
+ _GLIBCXX_DEBUG_ASSERT(__pos <= this->size());
+ return this->_M_data()[__pos];
+ }
+
+ /**
+ * @brief Subscript access to the data contained in the %string.
+ * @param __pos The index of the character to access.
+ * @return Read/write reference to the character.
+ *
+ * This operator allows for easy, array-style, data access.
+ * Note that data access with this operator is unchecked and
+ * out_of_range lookups are not defined. (For checked lookups
+ * see at().) Unshares the string.
+ */
+ reference
+ operator[](size_type __pos)
+ {
+ // allow pos == size() as v3 extension:
+ _GLIBCXX_DEBUG_ASSERT(__pos <= this->size());
+ // but be strict in pedantic mode:
+ _GLIBCXX_DEBUG_PEDASSERT(__pos < this->size());
+ this->_M_leak();
+ return this->_M_data()[__pos];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param __n The index of the character to access.
+ * @return Read-only (const) reference to the character.
+ * @throw std::out_of_range If @a __n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the string. The
+ * function throws out_of_range if the check fails.
+ */
+ const_reference
+ at(size_type __n) const
+ {
+ if (__n >= this->size())
+ std::__throw_out_of_range(__N("__versa_string::at"));
+ return this->_M_data()[__n];
+ }
+
+ /**
+ * @brief Provides access to the data contained in the %string.
+ * @param __n The index of the character to access.
+ * @return Read/write reference to the character.
+ * @throw std::out_of_range If @a __n is an invalid index.
+ *
+ * This function provides for safer data access. The parameter
+ * is first checked that it is in the range of the string. The
+ * function throws out_of_range if the check fails. Success
+ * results in unsharing the string.
+ */
+ reference
+ at(size_type __n)
+ {
+ if (__n >= this->size())
+ std::__throw_out_of_range(__N("__versa_string::at"));
+ this->_M_leak();
+ return this->_M_data()[__n];
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * Returns a read/write reference to the data at the first
+ * element of the %string.
+ */
+ reference
+ front()
+ { return *begin(); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the first
+ * element of the %string.
+ */
+ const_reference
+ front() const
+ { return *begin(); }
+
+ /**
+ * Returns a read/write reference to the data at the last
+ * element of the %string.
+ */
+ reference
+ back()
+ { return *(end() - 1); }
+
+ /**
+ * Returns a read-only (constant) reference to the data at the
+ * last element of the %string.
+ */
+ const_reference
+ back() const
+ { return *(end() - 1); }
+#endif
+
+ // Modifiers:
+ /**
+ * @brief Append a string to this string.
+ * @param __str The string to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ operator+=(const __versa_string& __str)
+ { return this->append(__str); }
+
+ /**
+ * @brief Append a C string.
+ * @param __s The C string to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ operator+=(const _CharT* __s)
+ { return this->append(__s); }
+
+ /**
+ * @brief Append a character.
+ * @param __c The character to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ operator+=(_CharT __c)
+ {
+ this->push_back(__c);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Append an initializer_list of characters.
+ * @param __l The initializer_list of characters to be appended.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ operator+=(std::initializer_list<_CharT> __l)
+ { return this->append(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Append a string to this string.
+ * @param __str The string to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ append(const __versa_string& __str)
+ { return _M_append(__str._M_data(), __str.size()); }
+
+ /**
+ * @brief Append a substring.
+ * @param __str The string to append.
+ * @param __pos Index of the first character of str to append.
+ * @param __n The number of characters to append.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a pos is not a valid index.
+ *
+ * This function appends @a __n characters from @a __str
+ * starting at @a __pos to this string. If @a __n is is larger
+ * than the number of available characters in @a __str, the
+ * remainder of @a __str is appended.
+ */
+ __versa_string&
+ append(const __versa_string& __str, size_type __pos, size_type __n)
+ { return _M_append(__str._M_data()
+ + __str._M_check(__pos, "__versa_string::append"),
+ __str._M_limit(__pos, __n)); }
+
+ /**
+ * @brief Append a C substring.
+ * @param __s The C string to append.
+ * @param __n The number of characters to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ append(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ _M_check_length(size_type(0), __n, "__versa_string::append");
+ return _M_append(__s, __n);
+ }
+
+ /**
+ * @brief Append a C string.
+ * @param __s The C string to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ append(const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ const size_type __n = traits_type::length(__s);
+ _M_check_length(size_type(0), __n, "__versa_string::append");
+ return _M_append(__s, __n);
+ }
+
+ /**
+ * @brief Append multiple characters.
+ * @param __n The number of characters to append.
+ * @param __c The character to use.
+ * @return Reference to this string.
+ *
+ * Appends n copies of c to this string.
+ */
+ __versa_string&
+ append(size_type __n, _CharT __c)
+ { return _M_replace_aux(this->size(), size_type(0), __n, __c); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Append an initializer_list of characters.
+ * @param __l The initializer_list of characters to append.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ append(std::initializer_list<_CharT> __l)
+ { return this->append(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Append a range of characters.
+ * @param __first Iterator referencing the first character to append.
+ * @param __last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Appends characters in the range [first,last) to this string.
+ */
+ template<class _InputIterator>
+ __versa_string&
+ append(_InputIterator __first, _InputIterator __last)
+ { return this->replace(_M_iend(), _M_iend(), __first, __last); }
+
+ /**
+ * @brief Append a single character.
+ * @param __c Character to append.
+ */
+ void
+ push_back(_CharT __c)
+ {
+ const size_type __size = this->size();
+ if (__size + 1 > this->capacity() || this->_M_is_shared())
+ this->_M_mutate(__size, size_type(0), 0, size_type(1));
+ traits_type::assign(this->_M_data()[__size], __c);
+ this->_M_set_length(__size + 1);
+ }
+
+ /**
+ * @brief Set value to contents of another string.
+ * @param __str Source string to use.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ assign(const __versa_string& __str)
+ {
+ this->_M_assign(__str);
+ return *this;
+ }
+
+ /**
+ * @brief Set value to a substring of a string.
+ * @param __str The string to use.
+ * @param __pos Index of the first character of str.
+ * @param __n Number of characters to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range if @a __pos is not a valid index.
+ *
+ * This function sets this string to the substring of @a __str
+ * consisting of @a __n characters at @a __pos. If @a __n is
+ * is larger than the number of available characters in @a
+ * __str, the remainder of @a __str is used.
+ */
+ __versa_string&
+ assign(const __versa_string& __str, size_type __pos, size_type __n)
+ { return _M_replace(size_type(0), this->size(), __str._M_data()
+ + __str._M_check(__pos, "__versa_string::assign"),
+ __str._M_limit(__pos, __n)); }
+
+ /**
+ * @brief Set value to a C substring.
+ * @param __s The C string to use.
+ * @param __n Number of characters to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the first @a
+ * __n characters of @a __s. If @a __n is is larger than the
+ * number of available characters in @a __s, the remainder of
+ * @a __s is used.
+ */
+ __versa_string&
+ assign(const _CharT* __s, size_type __n)
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ return _M_replace(size_type(0), this->size(), __s, __n);
+ }
+
+ /**
+ * @brief Set value to contents of a C string.
+ * @param __s The C string to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to the value of
+ * @a __s. The data is copied, so there is no dependence on @a
+ * __s once the function returns.
+ */
+ __versa_string&
+ assign(const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return _M_replace(size_type(0), this->size(), __s,
+ traits_type::length(__s));
+ }
+
+ /**
+ * @brief Set value to multiple characters.
+ * @param __n Length of the resulting string.
+ * @param __c The character to use.
+ * @return Reference to this string.
+ *
+ * This function sets the value of this string to @a __n copies of
+ * character @a __c.
+ */
+ __versa_string&
+ assign(size_type __n, _CharT __c)
+ { return _M_replace_aux(size_type(0), this->size(), __n, __c); }
+
+ /**
+ * @brief Set value to a range of characters.
+ * @param __first Iterator referencing the first character to append.
+ * @param __last Iterator marking the end of the range.
+ * @return Reference to this string.
+ *
+ * Sets value of string to characters in the range
+ * [first,last).
+ */
+ template<class _InputIterator>
+ __versa_string&
+ assign(_InputIterator __first, _InputIterator __last)
+ { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Set value to an initializer_list of characters.
+ * @param __l The initializer_list of characters to assign.
+ * @return Reference to this string.
+ */
+ __versa_string&
+ assign(std::initializer_list<_CharT> __l)
+ { return this->assign(__l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Insert multiple characters.
+ * @param __p Iterator referencing location in string to insert at.
+ * @param __n Number of characters to insert
+ * @param __c The character to insert.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts @a __n copies of character @a __c starting at the
+ * position referenced by iterator @a __p. If adding
+ * characters causes the length to exceed max_size(),
+ * length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ void
+ insert(iterator __p, size_type __n, _CharT __c)
+ { this->replace(__p, __p, __n, __c); }
+
+ /**
+ * @brief Insert a range of characters.
+ * @param __p Iterator referencing location in string to insert at.
+ * @param __beg Start of range.
+ * @param __end End of range.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts characters in range [beg,end). If adding characters
+ * causes the length to exceed max_size(), length_error is
+ * thrown. The value of the string doesn't change if an error
+ * is thrown.
+ */
+ template<class _InputIterator>
+ void
+ insert(iterator __p, _InputIterator __beg, _InputIterator __end)
+ { this->replace(__p, __p, __beg, __end); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Insert an initializer_list of characters.
+ * @param __p Iterator referencing location in string to insert at.
+ * @param __l The initializer_list of characters to insert.
+ * @throw std::length_error If new length exceeds @c max_size().
+ */
+ void
+ insert(iterator __p, std::initializer_list<_CharT> __l)
+ { this->insert(__p, __l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ /**
+ * @brief Insert value of a string.
+ * @param __pos1 Iterator referencing location in string to insert at.
+ * @param __str The string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts value of @a __str starting at @a __pos1. If adding
+ * characters causes the length to exceed max_size(),
+ * length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ __versa_string&
+ insert(size_type __pos1, const __versa_string& __str)
+ { return this->replace(__pos1, size_type(0),
+ __str._M_data(), __str.size()); }
+
+ /**
+ * @brief Insert a substring.
+ * @param __pos1 Iterator referencing location in string to insert at.
+ * @param __str The string to insert.
+ * @param __pos2 Start of characters in str to insert.
+ * @param __n Number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a __pos1 > size() or
+ * @a __pos2 > @a __str.size().
+ *
+ * Starting at @a __pos1, insert @a __n character of @a __str
+ * beginning with @a __pos2. If adding characters causes the
+ * length to exceed max_size(), length_error is thrown. If @a
+ * __pos1 is beyond the end of this string or @a __pos2 is
+ * beyond the end of @a __str, out_of_range is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ __versa_string&
+ insert(size_type __pos1, const __versa_string& __str,
+ size_type __pos2, size_type __n)
+ { return this->replace(__pos1, size_type(0), __str._M_data()
+ + __str._M_check(__pos2, "__versa_string::insert"),
+ __str._M_limit(__pos2, __n)); }
+
+ /**
+ * @brief Insert a C substring.
+ * @param __pos Iterator referencing location in string to insert at.
+ * @param __s The C string to insert.
+ * @param __n The number of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a __pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a __n characters of @a __s starting at @a
+ * __pos. If adding characters causes the length to exceed
+ * max_size(), length_error is thrown. If @a __pos is beyond
+ * end(), out_of_range is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
+ __versa_string&
+ insert(size_type __pos, const _CharT* __s, size_type __n)
+ { return this->replace(__pos, size_type(0), __s, __n); }
+
+ /**
+ * @brief Insert a C string.
+ * @param __pos Iterator referencing location in string to insert at.
+ * @param __s The C string to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a __pos is beyond the end of this
+ * string.
+ *
+ * Inserts the first @a __n characters of @a __s starting at @a
+ * __pos. If adding characters causes the length to exceed
+ * max_size(), length_error is thrown. If @a __pos is beyond
+ * end(), out_of_range is thrown. The value of the string
+ * doesn't change if an error is thrown.
+ */
+ __versa_string&
+ insert(size_type __pos, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__pos, size_type(0), __s,
+ traits_type::length(__s));
+ }
+
+ /**
+ * @brief Insert multiple characters.
+ * @param __pos Index in string to insert at.
+ * @param __n Number of characters to insert
+ * @param __c The character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ * @throw std::out_of_range If @a __pos is beyond the end of this
+ * string.
+ *
+ * Inserts @a __n copies of character @a __c starting at index
+ * @a __pos. If adding characters causes the length to exceed
+ * max_size(), length_error is thrown. If @a __pos > length(),
+ * out_of_range is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ __versa_string&
+ insert(size_type __pos, size_type __n, _CharT __c)
+ { return _M_replace_aux(_M_check(__pos, "__versa_string::insert"),
+ size_type(0), __n, __c); }
+
+ /**
+ * @brief Insert one character.
+ * @param __p Iterator referencing position in string to insert at.
+ * @param __c The character to insert.
+ * @return Iterator referencing newly inserted char.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Inserts character @a __c at position referenced by @a __p.
+ * If adding character causes the length to exceed max_size(),
+ * length_error is thrown. If @a __p is beyond end of string,
+ * out_of_range is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ iterator
+ insert(iterator __p, _CharT __c)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__p >= _M_ibegin() && __p <= _M_iend());
+ const size_type __pos = __p - _M_ibegin();
+ _M_replace_aux(__pos, size_type(0), size_type(1), __c);
+ this->_M_set_leaked();
+ return iterator(this->_M_data() + __pos);
+ }
+
+ /**
+ * @brief Remove characters.
+ * @param __pos Index of first character to remove (default 0).
+ * @param __n Number of characters to remove (default remainder).
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos is beyond the end of this
+ * string.
+ *
+ * Removes @a __n characters from this string starting at @a
+ * __pos. The length of the string is reduced by @a __n. If
+ * there are < @a __n characters to remove, the remainder of
+ * the string is truncated. If @a __p is beyond end of string,
+ * out_of_range is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ __versa_string&
+ erase(size_type __pos = 0, size_type __n = npos)
+ {
+ this->_M_erase(_M_check(__pos, "__versa_string::erase"),
+ _M_limit(__pos, __n));
+ return *this;
+ }
+
+ /**
+ * @brief Remove one character.
+ * @param __position Iterator referencing the character to remove.
+ * @return iterator referencing same location after removal.
+ *
+ * Removes the character at @a __position from this string. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ iterator
+ erase(iterator __position)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__position >= _M_ibegin()
+ && __position < _M_iend());
+ const size_type __pos = __position - _M_ibegin();
+ this->_M_erase(__pos, size_type(1));
+ this->_M_set_leaked();
+ return iterator(this->_M_data() + __pos);
+ }
+
+ /**
+ * @brief Remove a range of characters.
+ * @param __first Iterator referencing the first character to remove.
+ * @param __last Iterator referencing the end of the range.
+ * @return Iterator referencing location of first after removal.
+ *
+ * Removes the characters in the range [first,last) from this
+ * string. The value of the string doesn't change if an error
+ * is thrown.
+ */
+ iterator
+ erase(iterator __first, iterator __last)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(__first >= _M_ibegin() && __first <= __last
+ && __last <= _M_iend());
+ const size_type __pos = __first - _M_ibegin();
+ this->_M_erase(__pos, __last - __first);
+ this->_M_set_leaked();
+ return iterator(this->_M_data() + __pos);
+ }
+
+ /**
+ * @brief Replace characters with value from another string.
+ * @param __pos Index of first character to replace.
+ * @param __n Number of characters to be replaced.
+ * @param __str String to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos is beyond the end of this
+ * string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos+n) from this
+ * string. In place, the value of @a __str is inserted. If @a
+ * __pos is beyond end of string, out_of_range is thrown. If
+ * the length of the result exceeds max_size(), length_error is
+ * thrown. The value of the string doesn't change if an error
+ * is thrown.
+ */
+ __versa_string&
+ replace(size_type __pos, size_type __n, const __versa_string& __str)
+ { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+
+ /**
+ * @brief Replace characters with value from another string.
+ * @param __pos1 Index of first character to replace.
+ * @param __n1 Number of characters to be replaced.
+ * @param __str String to insert.
+ * @param __pos2 Index of first character of str to use.
+ * @param __n2 Number of characters from str to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos1 > size() or @a __pos2 >
+ * str.size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos1,pos1 + n) from
+ * this string. In place, the value of @a __str is inserted.
+ * If @a __pos is beyond end of string, out_of_range is thrown.
+ * If the length of the result exceeds max_size(), length_error
+ * is thrown. The value of the string doesn't change if an
+ * error is thrown.
+ */
+ __versa_string&
+ replace(size_type __pos1, size_type __n1, const __versa_string& __str,
+ size_type __pos2, size_type __n2)
+ {
+ return this->replace(__pos1, __n1, __str._M_data()
+ + __str._M_check(__pos2,
+ "__versa_string::replace"),
+ __str._M_limit(__pos2, __n2));
+ }
+
+ /**
+ * @brief Replace characters with value of a C substring.
+ * @param __pos Index of first character to replace.
+ * @param __n1 Number of characters to be replaced.
+ * @param __s C string to insert.
+ * @param __n2 Number of characters from @a __s to use.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos1 > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this
+ * string. In place, the first @a __n2 characters of @a __s
+ * are inserted, or all of @a __s if @a __n2 is too large. If
+ * @a __pos is beyond end of string, out_of_range is thrown.
+ * If the length of result exceeds max_size(), length_error is
+ * thrown. The value of the string doesn't change if an error
+ * is thrown.
+ */
+ __versa_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2)
+ {
+ __glibcxx_requires_string_len(__s, __n2);
+ return _M_replace(_M_check(__pos, "__versa_string::replace"),
+ _M_limit(__pos, __n1), __s, __n2);
+ }
+
+ /**
+ * @brief Replace characters with value of a C string.
+ * @param __pos Index of first character to replace.
+ * @param __n1 Number of characters to be replaced.
+ * @param __s C string to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this
+ * string. In place, the first @a __n characters of @a __s are
+ * inserted. If @a pos is beyond end of string, out_of_range
+ * is thrown. If the length of result exceeds max_size(),
+ * length_error is thrown. The value of the string doesn't
+ * change if an error is thrown.
+ */
+ __versa_string&
+ replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__pos, __n1, __s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Replace characters with multiple characters.
+ * @param __pos Index of first character to replace.
+ * @param __n1 Number of characters to be replaced.
+ * @param __n2 Number of characters to insert.
+ * @param __c Character to insert.
+ * @return Reference to this string.
+ * @throw std::out_of_range If @a __pos > size().
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [pos,pos + n1) from this
+ * string. In place, @a __n2 copies of @a __c are inserted.
+ * If @a __pos is beyond end of string, out_of_range is thrown.
+ * If the length of result exceeds max_size(), length_error is
+ * thrown. The value of the string doesn't change if an error
+ * is thrown.
+ */
+ __versa_string&
+ replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+ { return _M_replace_aux(_M_check(__pos, "__versa_string::replace"),
+ _M_limit(__pos, __n1), __n2, __c); }
+
+ /**
+ * @brief Replace range of characters with string.
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __str String value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the
+ * value of @a __str is inserted. If the length of result
+ * exceeds max_size(), length_error is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
+ __versa_string&
+ replace(iterator __i1, iterator __i2, const __versa_string& __str)
+ { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+
+ /**
+ * @brief Replace range of characters with C substring.
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __s C string value to insert.
+ * @param __n Number of characters from s to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the
+ * first @a n characters of @a __s are inserted. If the length
+ * of result exceeds max_size(), length_error is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ __versa_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n);
+ }
+
+ /**
+ * @brief Replace range of characters with C string.
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __s C string value to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, the
+ * characters of @a __s are inserted. If the length of result
+ * exceeds max_size(), length_error is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
+ __versa_string&
+ replace(iterator __i1, iterator __i2, const _CharT* __s)
+ {
+ __glibcxx_requires_string(__s);
+ return this->replace(__i1, __i2, __s, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Replace range of characters with multiple characters
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __n Number of characters to insert.
+ * @param __c Character to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place, @a
+ * __n copies of @a __c are inserted. If the length of result
+ * exceeds max_size(), length_error is thrown. The value of
+ * the string doesn't change if an error is thrown.
+ */
+ __versa_string&
+ replace(iterator __i1, iterator __i2, size_type __n, _CharT __c)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c);
+ }
+
+ /**
+ * @brief Replace range of characters with range.
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __k1 Iterator referencing start of range to insert.
+ * @param __k2 Iterator referencing end of range to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place,
+ * characters in the range [k1,k2) are inserted. If the length
+ * of result exceeds max_size(), length_error is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ template<class _InputIterator>
+ __versa_string&
+ replace(iterator __i1, iterator __i2,
+ _InputIterator __k1, _InputIterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ typedef typename std::__is_integer<_InputIterator>::__type _Integral;
+ return this->_M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral());
+ }
+
+ // Specializations for the common case of pointer and iterator:
+ // useful to avoid the overhead of temporary buffering in _M_replace.
+ __versa_string&
+ replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
+
+ __versa_string&
+ replace(iterator __i1, iterator __i2,
+ const _CharT* __k1, const _CharT* __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1, __k2 - __k1);
+ }
+
+ __versa_string&
+ replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1.base(), __k2 - __k1);
+ }
+
+ __versa_string&
+ replace(iterator __i1, iterator __i2,
+ const_iterator __k1, const_iterator __k2)
+ {
+ _GLIBCXX_DEBUG_PEDASSERT(_M_ibegin() <= __i1 && __i1 <= __i2
+ && __i2 <= _M_iend());
+ __glibcxx_requires_valid_range(__k1, __k2);
+ return this->replace(__i1 - _M_ibegin(), __i2 - __i1,
+ __k1.base(), __k2 - __k1);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Replace range of characters with initializer_list.
+ * @param __i1 Iterator referencing start of range to replace.
+ * @param __i2 Iterator referencing end of range to replace.
+ * @param __l The initializer_list of characters to insert.
+ * @return Reference to this string.
+ * @throw std::length_error If new length exceeds @c max_size().
+ *
+ * Removes the characters in the range [i1,i2). In place,
+ * characters in the range [k1,k2) are inserted. If the length
+ * of result exceeds max_size(), length_error is thrown. The
+ * value of the string doesn't change if an error is thrown.
+ */
+ __versa_string& replace(iterator __i1, iterator __i2,
+ std::initializer_list<_CharT> __l)
+ { return this->replace(__i1, __i2, __l.begin(), __l.end()); }
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+ private:
+ template<class _Integer>
+ __versa_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n,
+ _Integer __val, std::__true_type)
+ { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); }
+
+ template<class _InputIterator>
+ __versa_string&
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, std::__false_type);
+
+ __versa_string&
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c);
+
+ __versa_string&
+ _M_replace(size_type __pos, size_type __len1, const _CharT* __s,
+ const size_type __len2);
+
+ __versa_string&
+ _M_append(const _CharT* __s, size_type __n);
+
+ public:
+
+ /**
+ * @brief Copy substring into C string.
+ * @param __s C string to copy value into.
+ * @param __n Number of characters to copy.
+ * @param __pos Index of first character to copy.
+ * @return Number of characters actually copied
+ * @throw std::out_of_range If pos > size().
+ *
+ * Copies up to @a __n characters starting at @a __pos into the
+ * C string @a s. If @a __pos is greater than size(),
+ * out_of_range is thrown.
+ */
+ size_type
+ copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+
+ /**
+ * @brief Swap contents with another string.
+ * @param __s String to swap with.
+ *
+ * Exchanges the contents of this string with that of @a __s in
+ * constant time.
+ */
+ void
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ swap(__versa_string&& __s)
+#else
+ swap(__versa_string& __s)
+#endif
+ { this->_M_swap(__s); }
+
+ // String operations:
+ /**
+ * @brief Return const pointer to null-terminated contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
+ const _CharT*
+ c_str() const
+ { return this->_M_data(); }
+
+ /**
+ * @brief Return const pointer to contents.
+ *
+ * This is a handle to internal data. Do not modify or dire things may
+ * happen.
+ */
+ const _CharT*
+ data() const
+ { return this->_M_data(); }
+
+ /**
+ * @brief Return copy of allocator used to construct this string.
+ */
+ allocator_type
+ get_allocator() const
+ { return allocator_type(this->_M_get_allocator()); }
+
+ /**
+ * @brief Find position of a C substring.
+ * @param __s C string to locate.
+ * @param __pos Index of character to search from.
+ * @param __n Number of characters from @a __s to search for.
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for the first @a
+ * __n characters in @a __s within this string. If found,
+ * returns the index where it begins. If not found, returns
+ * npos.
+ */
+ size_type
+ find(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find position of a string.
+ * @param __str String to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for value of @a
+ * __str within this string. If found, returns the index where
+ * it begins. If not found, returns npos.
+ */
+ size_type
+ find(const __versa_string& __str, size_type __pos = 0) const
+ { return this->find(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a C string.
+ * @param __s C string to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of start of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for the value of @a
+ * __s within this string. If found, returns the index where
+ * it begins. If not found, returns npos.
+ */
+ size_type
+ find(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a character.
+ * @param __c Character to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for @a __c within
+ * this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find(_CharT __c, size_type __pos = 0) const;
+
+ /**
+ * @brief Find last position of a string.
+ * @param __str String to locate.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for value of @a
+ * __str within this string. If found, returns the index where
+ * it begins. If not found, returns npos.
+ */
+ size_type
+ rfind(const __versa_string& __str, size_type __pos = npos) const
+ { return this->rfind(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a C substring.
+ * @param __s C string to locate.
+ * @param __pos Index of character to search back from.
+ * @param __n Number of characters from s to search for.
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for the first @a
+ * __n characters in @a __s within this string. If found,
+ * returns the index where it begins. If not found, returns
+ * npos.
+ */
+ size_type
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find last position of a C string.
+ * @param __s C string to locate.
+ * @param __pos Index of character to start search at (default end).
+ * @return Index of start of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for the value of
+ * @a __s within this string. If found, returns the index
+ * where it begins. If not found, returns npos.
+ */
+ size_type
+ rfind(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->rfind(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a character.
+ * @param __c Character to locate.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for @a __c within
+ * this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ rfind(_CharT __c, size_type __pos = npos) const;
+
+ /**
+ * @brief Find position of a character of string.
+ * @param __str String containing characters to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for one of the characters of
+ * @a __str within this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_first_of(const __versa_string& __str, size_type __pos = 0) const
+ { return this->find_first_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a character of C substring.
+ * @param __s String containing characters to locate.
+ * @param __pos Index of character to search from.
+ * @param __n Number of characters from s to search for.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for one of the
+ * first @a __n characters of @a __s within this string. If
+ * found, returns the index where it was found. If not found,
+ * returns npos.
+ */
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find position of a character of C string.
+ * @param __s String containing characters to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for one of the
+ * characters of @a __s within this string. If found, returns
+ * the index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a character.
+ * @param __c Character to locate.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for the character
+ * @a __c within this string. If found, returns the index
+ * where it was found. If not found, returns npos.
+ *
+ * Note: equivalent to find(c, pos).
+ */
+ size_type
+ find_first_of(_CharT __c, size_type __pos = 0) const
+ { return this->find(__c, __pos); }
+
+ /**
+ * @brief Find last position of a character of string.
+ * @param __str String containing characters to locate.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for one of the
+ * characters of @a __str within this string. If found,
+ * returns the index where it was found. If not found, returns
+ * npos.
+ */
+ size_type
+ find_last_of(const __versa_string& __str, size_type __pos = npos) const
+ { return this->find_last_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a character of C substring.
+ * @param __s C string containing characters to locate.
+ * @param __pos Index of character to search back from.
+ * @param __n Number of characters from s to search for.
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for one of the
+ * first @a __n characters of @a __s within this string. If
+ * found, returns the index where it was found. If not found,
+ * returns npos.
+ */
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ /**
+ * @brief Find last position of a character of C string.
+ * @param __s C string containing characters to locate.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for one of the
+ * characters of @a __s within this string. If found, returns
+ * the index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_last_of(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a character.
+ * @param __c Character to locate.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for @a __c within
+ * this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ *
+ * Note: equivalent to rfind(c, pos).
+ */
+ size_type
+ find_last_of(_CharT __c, size_type __pos = npos) const
+ { return this->rfind(__c, __pos); }
+
+ /**
+ * @brief Find position of a character not in string.
+ * @param __str String containing characters to avoid.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for a character not
+ * contained in @a __str within this string. If found, returns
+ * the index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const __versa_string& __str, size_type __pos = 0) const
+ { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find position of a character not in C substring.
+ * @param __s C string containing characters to avoid.
+ * @param __pos Index of character to search from.
+ * @param __n Number of characters from s to consider.
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for a character not
+ * contained in the first @a __n characters of @a __s within
+ * this string. If found, returns the index where it was
+ * found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+
+ /**
+ * @brief Find position of a character not in C string.
+ * @param __s C string containing characters to avoid.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for a character not
+ * contained in @a __s within this string. If found, returns
+ * the index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_first_not_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find position of a different character.
+ * @param __c Character to avoid.
+ * @param __pos Index of character to search from (default 0).
+ * @return Index of first occurrence.
+ *
+ * Starting from @a __pos, searches forward for a character
+ * other than @a __c within this string. If found, returns the
+ * index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_first_not_of(_CharT __c, size_type __pos = 0) const;
+
+ /**
+ * @brief Find last position of a character not in string.
+ * @param __str String containing characters to avoid.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for a character
+ * not contained in @a __str within this string. If found,
+ * returns the index where it was found. If not found, returns
+ * npos.
+ */
+ size_type
+ find_last_not_of(const __versa_string& __str,
+ size_type __pos = npos) const
+ { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+
+ /**
+ * @brief Find last position of a character not in C substring.
+ * @param __s C string containing characters to avoid.
+ * @param __pos Index of character to search back from.
+ * @param __n Number of characters from s to consider.
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for a character
+ * not contained in the first @a __n characters of @a __s
+ * within this string. If found, returns the index where it
+ * was found. If not found, returns npos.
+ */
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const;
+ /**
+ * @brief Find last position of a character not in C string.
+ * @param __s C string containing characters to avoid.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for a character
+ * not contained in @a __s within this string. If found,
+ * returns the index where it was found. If not found, returns
+ * npos.
+ */
+ size_type
+ find_last_not_of(const _CharT* __s, size_type __pos = npos) const
+ {
+ __glibcxx_requires_string(__s);
+ return this->find_last_not_of(__s, __pos, traits_type::length(__s));
+ }
+
+ /**
+ * @brief Find last position of a different character.
+ * @param __c Character to avoid.
+ * @param __pos Index of character to search back from (default end).
+ * @return Index of last occurrence.
+ *
+ * Starting from @a __pos, searches backward for a character
+ * other than @a __c within this string. If found, returns the
+ * index where it was found. If not found, returns npos.
+ */
+ size_type
+ find_last_not_of(_CharT __c, size_type __pos = npos) const;
+
+ /**
+ * @brief Get a substring.
+ * @param __pos Index of first character (default 0).
+ * @param __n Number of characters in substring (default remainder).
+ * @return The new string.
+ * @throw std::out_of_range If pos > size().
+ *
+ * Construct and return a new string using the @a __n
+ * characters starting at @a __pos. If the string is too
+ * short, use the remainder of the characters. If @a __pos is
+ * beyond the end of the string, out_of_range is thrown.
+ */
+ __versa_string
+ substr(size_type __pos = 0, size_type __n = npos) const
+ {
+ return __versa_string(*this, _M_check(__pos, "__versa_string::substr"),
+ __n);
+ }
+
+ /**
+ * @brief Compare to a string.
+ * @param __str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a
+ * __str, 0 if their values are equivalent, or > 0 if this
+ * string is ordered after @a __str. Determines the effective
+ * length rlen of the strings to compare as the smallest of
+ * size() and str.size(). The function then compares the two
+ * strings by calling traits::compare(data(), str.data(),rlen).
+ * If the result of the comparison is nonzero returns it,
+ * otherwise the shorter one is ordered first.
+ */
+ int
+ compare(const __versa_string& __str) const
+ {
+ if (this->_M_compare(__str))
+ return 0;
+
+ const size_type __size = this->size();
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__size, __osize);
+
+ int __r = traits_type::compare(this->_M_data(), __str.data(), __len);
+ if (!__r)
+ __r = this->_S_compare(__size, __osize);
+ return __r;
+ }
+
+ /**
+ * @brief Compare substring to a string.
+ * @param __pos Index of first character of substring.
+ * @param __n Number of characters in substring.
+ * @param __str String to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a __n characters
+ * starting at @a __pos. Returns an integer < 0 if the
+ * substring is ordered before @a __str, 0 if their values are
+ * equivalent, or > 0 if the substring is ordered after @a
+ * __str. Determines the effective length rlen of the strings
+ * to compare as the smallest of the length of the substring
+ * and @a __str.size(). The function then compares the two
+ * strings by calling
+ * traits::compare(substring.data(),str.data(),rlen). If the
+ * result of the comparison is nonzero returns it, otherwise
+ * the shorter one is ordered first.
+ */
+ int
+ compare(size_type __pos, size_type __n,
+ const __versa_string& __str) const;
+
+ /**
+ * @brief Compare substring to a substring.
+ * @param __pos1 Index of first character of substring.
+ * @param __n1 Number of characters in substring.
+ * @param __str String to compare against.
+ * @param __pos2 Index of first character of substring of str.
+ * @param __n2 Number of characters in substring of str.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a __n1
+ * characters starting at @a __pos1. Form the substring of @a
+ * __str from the @a __n2 characters starting at @a __pos2.
+ * Returns an integer < 0 if this substring is ordered before
+ * the substring of @a __str, 0 if their values are equivalent,
+ * or > 0 if this substring is ordered after the substring of
+ * @a __str. Determines the effective length rlen of the
+ * strings to compare as the smallest of the lengths of the
+ * substrings. The function then compares the two strings by
+ * calling
+ * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen).
+ * If the result of the comparison is nonzero returns it,
+ * otherwise the shorter one is ordered first.
+ */
+ int
+ compare(size_type __pos1, size_type __n1, const __versa_string& __str,
+ size_type __pos2, size_type __n2) const;
+
+ /**
+ * @brief Compare to a C string.
+ * @param __s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Returns an integer < 0 if this string is ordered before @a
+ * __s, 0 if their values are equivalent, or > 0 if this string
+ * is ordered after @a __s. Determines the effective length
+ * rlen of the strings to compare as the smallest of size() and
+ * the length of a string constructed from @a __s. The
+ * function then compares the two strings by calling
+ * traits::compare(data(),s,rlen). If the result of the
+ * comparison is nonzero returns it, otherwise the shorter one
+ * is ordered first.
+ */
+ int
+ compare(const _CharT* __s) const;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 5 String::compare specification questionable
+ /**
+ * @brief Compare substring to a C string.
+ * @param __pos Index of first character of substring.
+ * @param __n1 Number of characters in substring.
+ * @param __s C string to compare against.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a __n1
+ * characters starting at @a __pos. Returns an integer < 0 if
+ * the substring is ordered before @a __s, 0 if their values
+ * are equivalent, or > 0 if the substring is ordered after @a
+ * __s. Determines the effective length rlen of the strings to
+ * compare as the smallest of the length of the substring and
+ * the length of a string constructed from @a __s. The
+ * function then compares the two string by calling
+ * traits::compare(substring.data(),s,rlen). If the result of
+ * the comparison is nonzero returns it, otherwise the shorter
+ * one is ordered first.
+ */
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+
+ /**
+ * @brief Compare substring against a character array.
+ * @param __pos1 Index of first character of substring.
+ * @param __n1 Number of characters in substring.
+ * @param __s character array to compare against.
+ * @param __n2 Number of characters of s.
+ * @return Integer < 0, 0, or > 0.
+ *
+ * Form the substring of this string from the @a __n1
+ * characters starting at @a __pos1. Form a string from the
+ * first @a __n2 characters of @a __s. Returns an integer < 0
+ * if this substring is ordered before the string from @a __s,
+ * 0 if their values are equivalent, or > 0 if this substring
+ * is ordered after the string from @a __s. Determines the
+ * effective length rlen of the strings to compare as the
+ * smallest of the length of the substring and @a __n2. The
+ * function then compares the two strings by calling
+ * traits::compare(substring.data(),s,rlen). If the result of
+ * the comparison is nonzero returns it, otherwise the shorter
+ * one is ordered first.
+ *
+ * NB: s must have at least n2 characters, '\\0' has no special
+ * meaning.
+ */
+ int
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2) const;
+ };
+
+ // operator+
+ /**
+ * @brief Concatenate two strings.
+ * @param __lhs First string.
+ * @param __rhs Last string.
+ * @return New string with value of @a __lhs followed by @a __rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
+
+ /**
+ * @brief Concatenate C string and string.
+ * @param __lhs First string.
+ * @param __rhs Last string.
+ * @return New string with value of @a __lhs followed by @a __rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
+
+ /**
+ * @brief Concatenate character and string.
+ * @param __lhs First string.
+ * @param __rhs Last string.
+ * @return New string with @a __lhs followed by @a __rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(_CharT __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs);
+
+ /**
+ * @brief Concatenate string and C string.
+ * @param __lhs First string.
+ * @param __rhs Last string.
+ * @return New string with @a __lhs followed by @a __rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs);
+
+ /**
+ * @brief Concatenate string and character.
+ * @param __lhs First string.
+ * @param __rhs Last string.
+ * @return New string with @a __lhs followed by @a __rhs.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ _CharT __rhs);
+
+ // operator ==
+ /**
+ * @brief Test equivalence of two strings.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator==(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __lhs.compare(__rhs) == 0; }
+
+ template<typename _CharT,
+ template <typename, typename, typename> class _Base>
+ inline typename __enable_if<std::__is_char<_CharT>::__value, bool>::__type
+ operator==(const __versa_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT>, _Base>& __lhs,
+ const __versa_string<_CharT, std::char_traits<_CharT>,
+ std::allocator<_CharT>, _Base>& __rhs)
+ { return (__lhs.size() == __rhs.size()
+ && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(),
+ __lhs.size())); }
+
+ /**
+ * @brief Test equivalence of C string and string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __rhs.compare(@a __lhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator==(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __rhs.compare(__lhs) == 0; }
+
+ /**
+ * @brief Test equivalence of string and C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs.compare(@a __rhs) == 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator==(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) == 0; }
+
+ // operator !=
+ /**
+ * @brief Test difference of two strings.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator!=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * @brief Test difference of C string and string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __rhs.compare(@a __lhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator!=(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * @brief Test difference of string and C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs.compare(@a __rhs) != 0. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator!=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return !(__lhs == __rhs); }
+
+ // operator <
+ /**
+ * @brief Test if string precedes string.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs precedes @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __lhs.compare(__rhs) < 0; }
+
+ /**
+ * @brief Test if string precedes C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs precedes @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) < 0; }
+
+ /**
+ * @brief Test if C string precedes string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __lhs precedes @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __rhs.compare(__lhs) > 0; }
+
+ // operator >
+ /**
+ * @brief Test if string follows string.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs follows @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __lhs.compare(__rhs) > 0; }
+
+ /**
+ * @brief Test if string follows C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs follows @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) > 0; }
+
+ /**
+ * @brief Test if C string follows string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __lhs follows @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __rhs.compare(__lhs) < 0; }
+
+ // operator <=
+ /**
+ * @brief Test if string doesn't follow string.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __lhs.compare(__rhs) <= 0; }
+
+ /**
+ * @brief Test if string doesn't follow C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) <= 0; }
+
+ /**
+ * @brief Test if C string doesn't follow string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __lhs doesn't follow @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator<=(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __rhs.compare(__lhs) >= 0; }
+
+ // operator >=
+ /**
+ * @brief Test if string doesn't precede string.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __lhs.compare(__rhs) >= 0; }
+
+ /**
+ * @brief Test if string doesn't precede C string.
+ * @param __lhs String.
+ * @param __rhs C string.
+ * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>=(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ { return __lhs.compare(__rhs) >= 0; }
+
+ /**
+ * @brief Test if C string doesn't precede string.
+ * @param __lhs C string.
+ * @param __rhs String.
+ * @return True if @a __lhs doesn't precede @a __rhs. False otherwise.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline bool
+ operator>=(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { return __rhs.compare(__lhs) <= 0; }
+
+ /**
+ * @brief Swap contents of two strings.
+ * @param __lhs First string.
+ * @param __rhs Second string.
+ *
+ * Exchanges the contents of @a __lhs and @a __rhs in constant time.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline void
+ swap(__versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { __lhs.swap(__rhs); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline void
+ swap(__versa_string<_CharT, _Traits, _Alloc, _Base>&& __lhs,
+ __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline void
+ swap(__versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&& __rhs)
+ { __lhs.swap(__rhs); }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Read stream into a string.
+ * @param __is Input stream.
+ * @param __str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a __is into @a __str until whitespace is
+ * found, the end of the stream is encountered, or str.max_size()
+ * is reached. If is.width() is non-zero, that is the limit on the
+ * number of characters stored into @a __str. Any previous
+ * contents of @a __str are erased.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::__versa_string<_CharT, _Traits,
+ _Alloc, _Base>& __str);
+
+ /**
+ * @brief Write string to a stream.
+ * @param __os Output stream.
+ * @param __str String to write out.
+ * @return Reference to the output stream.
+ *
+ * Output characters of @a __str into os following the same rules as for
+ * writing a C string.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc,
+ _Base>& __str)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 586. string inserter not a formatted function
+ return __ostream_insert(__os, __str.data(), __str.size());
+ }
+
+ /**
+ * @brief Read a line from stream into a string.
+ * @param __is Input stream.
+ * @param __str Buffer to store into.
+ * @param __delim Character marking end of line.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from @a __is into @a __str until @a __delim is
+ * found, the end of the stream is encountered, or str.max_size()
+ * is reached. If is.width() is non-zero, that is the limit on the
+ * number of characters stored into @a __str. Any previous
+ * contents of @a __str are erased. If @a delim was encountered,
+ * it is extracted but not stored into @a __str.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str,
+ _CharT __delim);
+
+ /**
+ * @brief Read a line from stream into a string.
+ * @param __is Input stream.
+ * @param __str Buffer to store into.
+ * @return Reference to the input stream.
+ *
+ * Stores characters from is into @a __str until '\n' is found, the
+ * end of the stream is encountered, or str.max_size() is reached.
+ * If is.width() is non-zero, that is the limit on the number of
+ * characters stored into @a __str. Any previous contents of @a
+ * __str are erased. If end of line was encountered, it is
+ * extracted but not stored into @a __str.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ inline basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __is,
+ __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str)
+ { return getline(__is, __str, __is.widen('\n')); }
+
+_GLIBCXX_END_NAMESPACE
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99))
+
+#include <ext/string_conversions.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ // 21.4 Numeric Conversions [string.conversions].
+ inline int
+ stoi(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa<long, int>(&std::strtol, "stoi", __str.c_str(),
+ __idx, __base); }
+
+ inline long
+ stol(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long
+ stoul(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(),
+ __idx, __base); }
+
+ inline long long
+ stoll(const __vstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long long
+ stoull(const __vstring& __str, std::size_t* __idx, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(),
+ __idx, __base); }
+
+ // NB: strtof vs strtod.
+ inline float
+ stof(const __vstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); }
+
+ inline double
+ stod(const __vstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); }
+
+ inline long double
+ stold(const __vstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); }
+
+ // NB: (v)snprintf vs sprintf.
+ inline __vstring
+ to_string(long long __val)
+ { return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
+ 4 * sizeof(long long),
+ "%lld", __val); }
+
+ inline __vstring
+ to_string(unsigned long long __val)
+ { return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf,
+ 4 * sizeof(unsigned long long),
+ "%llu", __val); }
+
+ inline __vstring
+ to_string(long double __val)
+ {
+ const int __n = __numeric_traits<long double>::__max_exponent10 + 20;
+ return __gnu_cxx::__to_xstring<__vstring>(&std::vsnprintf, __n,
+ "%Lf", __val);
+ }
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ inline int
+ stoi(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa<long, int>(&std::wcstol, "stoi", __str.c_str(),
+ __idx, __base); }
+
+ inline long
+ stol(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long
+ stoul(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(),
+ __idx, __base); }
+
+ inline long long
+ stoll(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(),
+ __idx, __base); }
+
+ inline unsigned long long
+ stoull(const __wvstring& __str, std::size_t* __idx = 0, int __base = 10)
+ { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(),
+ __idx, __base); }
+
+ // NB: wcstof vs wcstod.
+ inline float
+ stof(const __wvstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); }
+
+ inline double
+ stod(const __wvstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); }
+
+ inline long double
+ stold(const __wvstring& __str, std::size_t* __idx = 0)
+ { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); }
+
+ inline __wvstring
+ to_wstring(long long __val)
+ { return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
+ 4 * sizeof(long long),
+ L"%lld", __val); }
+
+ inline __wvstring
+ to_wstring(unsigned long long __val)
+ { return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf,
+ 4 * sizeof(unsigned long long),
+ L"%llu", __val); }
+
+ inline __wvstring
+ to_wstring(long double __val)
+ {
+ const int __n = __numeric_traits<long double>::__max_exponent10 + 20;
+ return __gnu_cxx::__to_xstring<__wvstring>(&std::vswprintf, __n,
+ L"%Lf", __val);
+ }
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include "vstring.tcc"
+#endif
+
+#if __google_stl_debug_string && !defined(_GLIBCXX_DEBUG)
+// Undo our defines, so they don't affect anything else.
+# undef _GLIBCXX_DEBUG_ASSERT
+# undef _GLIBCXX_DEBUG_PEDASSERT
+# define _GLIBCXX_DEBUG_ASSERT(_Condition)
+# define _GLIBCXX_DEBUG_PEDASSERT(_Condition)
+#endif
+
+#endif /* _VSTRING_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.tcc
new file mode 100644
index 0000000..2c3a8e2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring.tcc
@@ -0,0 +1,696 @@
+// Versatile string -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/vstring.tcc
+ * This file is a GNU extension to the Standard C++ Library.
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VSTRING_TCC
+#define _VSTRING_TCC 1
+
+#pragma GCC system_header
+
+#include <cxxabi-forced.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ const typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::npos;
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ void
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ resize(size_type __n, _CharT __c)
+ {
+ const size_type __size = this->size();
+ if (__size < __n)
+ this->append(__n - __size, __c);
+ else if (__n < __size)
+ this->_M_erase(__n, __size - __n);
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ _M_append(const _CharT* __s, size_type __n)
+ {
+ const size_type __len = __n + this->size();
+
+ if (__len <= this->capacity() && !this->_M_is_shared())
+ {
+ if (__n)
+ this->_S_copy(this->_M_data() + this->size(), __s, __n);
+ }
+ else
+ this->_M_mutate(this->size(), size_type(0), __s, __n);
+
+ this->_M_set_length(__len);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ template<typename _InputIterator>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1,
+ _InputIterator __k2, std::__false_type)
+ {
+ const __versa_string __s(__k1, __k2);
+ const size_type __n1 = __i2 - __i1;
+ return _M_replace(__i1 - _M_ibegin(), __n1, __s._M_data(),
+ __s.size());
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2,
+ _CharT __c)
+ {
+ _M_check_length(__n1, __n2, "__versa_string::_M_replace_aux");
+
+ const size_type __old_size = this->size();
+ const size_type __new_size = __old_size + __n2 - __n1;
+
+ if (__new_size <= this->capacity() && !this->_M_is_shared())
+ {
+ _CharT* __p = this->_M_data() + __pos1;
+
+ const size_type __how_much = __old_size - __pos1 - __n1;
+ if (__how_much && __n1 != __n2)
+ this->_S_move(__p + __n2, __p + __n1, __how_much);
+ }
+ else
+ this->_M_mutate(__pos1, __n1, 0, __n2);
+
+ if (__n2)
+ this->_S_assign(this->_M_data() + __pos1, __n2, __c);
+
+ this->_M_set_length(__new_size);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>&
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ _M_replace(size_type __pos, size_type __len1, const _CharT* __s,
+ const size_type __len2)
+ {
+ _M_check_length(__len1, __len2, "__versa_string::_M_replace");
+
+ const size_type __old_size = this->size();
+ const size_type __new_size = __old_size + __len2 - __len1;
+
+ if (__new_size <= this->capacity() && !this->_M_is_shared())
+ {
+ _CharT* __p = this->_M_data() + __pos;
+
+ const size_type __how_much = __old_size - __pos - __len1;
+ if (_M_disjunct(__s))
+ {
+ if (__how_much && __len1 != __len2)
+ this->_S_move(__p + __len2, __p + __len1, __how_much);
+ if (__len2)
+ this->_S_copy(__p, __s, __len2);
+ }
+ else
+ {
+ // Work in-place.
+ if (__len2 && __len2 <= __len1)
+ this->_S_move(__p, __s, __len2);
+ if (__how_much && __len1 != __len2)
+ this->_S_move(__p + __len2, __p + __len1, __how_much);
+ if (__len2 > __len1)
+ {
+ if (__s + __len2 <= __p + __len1)
+ this->_S_move(__p, __s, __len2);
+ else if (__s >= __p + __len1)
+ this->_S_copy(__p, __s + __len2 - __len1, __len2);
+ else
+ {
+ const size_type __nleft = (__p + __len1) - __s;
+ this->_S_move(__p, __s, __nleft);
+ this->_S_copy(__p + __nleft, __p + __len2,
+ __len2 - __nleft);
+ }
+ }
+ }
+ }
+ else
+ this->_M_mutate(__pos, __len1, __s, __len2);
+
+ this->_M_set_length(__new_size);
+ return *this;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ {
+ __versa_string<_CharT, _Traits, _Alloc, _Base> __str;
+ __str.reserve(__lhs.size() + __rhs.size());
+ __str.append(__lhs);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const _CharT* __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ {
+ __glibcxx_requires_string(__lhs);
+ typedef __versa_string<_CharT, _Traits, _Alloc, _Base> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ const __size_type __len = _Traits::length(__lhs);
+ __string_type __str;
+ __str.reserve(__len + __rhs.size());
+ __str.append(__lhs, __len);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(_CharT __lhs,
+ const __versa_string<_CharT, _Traits, _Alloc, _Base>& __rhs)
+ {
+ __versa_string<_CharT, _Traits, _Alloc, _Base> __str;
+ __str.reserve(__rhs.size() + 1);
+ __str.push_back(__lhs);
+ __str.append(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ const _CharT* __rhs)
+ {
+ __glibcxx_requires_string(__rhs);
+ typedef __versa_string<_CharT, _Traits, _Alloc, _Base> __string_type;
+ typedef typename __string_type::size_type __size_type;
+ const __size_type __len = _Traits::length(__rhs);
+ __string_type __str;
+ __str.reserve(__lhs.size() + __len);
+ __str.append(__lhs);
+ __str.append(__rhs, __len);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ __versa_string<_CharT, _Traits, _Alloc, _Base>
+ operator+(const __versa_string<_CharT, _Traits, _Alloc, _Base>& __lhs,
+ _CharT __rhs)
+ {
+ __versa_string<_CharT, _Traits, _Alloc, _Base> __str;
+ __str.reserve(__lhs.size() + 1);
+ __str.append(__lhs);
+ __str.push_back(__rhs);
+ return __str;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ copy(_CharT* __s, size_type __n, size_type __pos) const
+ {
+ _M_check(__pos, "__versa_string::copy");
+ __n = _M_limit(__pos, __n);
+ __glibcxx_requires_string_len(__s, __n);
+ if (__n)
+ this->_S_copy(__s, this->_M_data() + __pos, __n);
+ // 21.3.5.7 par 3: do not append null. (good.)
+ return __n;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
+ const _CharT* __data = this->_M_data();
+
+ if (__n == 0)
+ return __pos <= __size ? __pos : npos;
+
+ if (__n <= __size)
+ {
+ for (; __pos <= __size - __n; ++__pos)
+ if (traits_type::eq(__data[__pos], __s[0])
+ && traits_type::compare(__data + __pos + 1,
+ __s + 1, __n - 1) == 0)
+ return __pos;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find(_CharT __c, size_type __pos) const
+ {
+ size_type __ret = npos;
+ const size_type __size = this->size();
+ if (__pos < __size)
+ {
+ const _CharT* __data = this->_M_data();
+ const size_type __n = __size - __pos;
+ const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
+ if (__p)
+ __ret = __p - __data;
+ }
+ return __ret;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ rfind(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ const size_type __size = this->size();
+ if (__n <= __size)
+ {
+ __pos = std::min(size_type(__size - __n), __pos);
+ const _CharT* __data = this->_M_data();
+ do
+ {
+ if (traits_type::compare(__data + __pos, __s, __n) == 0)
+ return __pos;
+ }
+ while (__pos-- > 0);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ rfind(_CharT __c, size_type __pos) const
+ {
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ for (++__size; __size-- > 0; )
+ if (traits_type::eq(this->_M_data()[__size], __c))
+ return __size;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ for (; __n && __pos < this->size(); ++__pos)
+ {
+ const _CharT* __p = traits_type::find(__s, __n,
+ this->_M_data()[__pos]);
+ if (__p)
+ return __pos;
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ size_type __size = this->size();
+ if (__size && __n)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (traits_type::find(__s, __n, this->_M_data()[__size]))
+ return __size;
+ }
+ while (__size-- != 0);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::find(__s, __n, this->_M_data()[__pos]))
+ return __pos;
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_first_not_of(_CharT __c, size_type __pos) const
+ {
+ for (; __pos < this->size(); ++__pos)
+ if (!traits_type::eq(this->_M_data()[__pos], __c))
+ return __pos;
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ {
+ __glibcxx_requires_string_len(__s, __n);
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (!traits_type::find(__s, __n, this->_M_data()[__size]))
+ return __size;
+ }
+ while (__size--);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ find_last_not_of(_CharT __c, size_type __pos) const
+ {
+ size_type __size = this->size();
+ if (__size)
+ {
+ if (--__size > __pos)
+ __size = __pos;
+ do
+ {
+ if (!traits_type::eq(this->_M_data()[__size], __c))
+ return __size;
+ }
+ while (__size--);
+ }
+ return npos;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ int
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ compare(size_type __pos, size_type __n, const __versa_string& __str) const
+ {
+ _M_check(__pos, "__versa_string::compare");
+ __n = _M_limit(__pos, __n);
+ const size_type __osize = __str.size();
+ const size_type __len = std::min(__n, __osize);
+ int __r = traits_type::compare(this->_M_data() + __pos,
+ __str.data(), __len);
+ if (!__r)
+ __r = this->_S_compare(__n, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ int
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ compare(size_type __pos1, size_type __n1, const __versa_string& __str,
+ size_type __pos2, size_type __n2) const
+ {
+ _M_check(__pos1, "__versa_string::compare");
+ __str._M_check(__pos2, "__versa_string::compare");
+ __n1 = _M_limit(__pos1, __n1);
+ __n2 = __str._M_limit(__pos2, __n2);
+ const size_type __len = std::min(__n1, __n2);
+ int __r = traits_type::compare(this->_M_data() + __pos1,
+ __str.data() + __pos2, __len);
+ if (!__r)
+ __r = this->_S_compare(__n1, __n2);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ int
+ __versa_string<_CharT, _Traits, _Alloc, _Base>::
+ compare(const _CharT* __s) const
+ {
+ __glibcxx_requires_string(__s);
+ const size_type __size = this->size();
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__size, __osize);
+ int __r = traits_type::compare(this->_M_data(), __s, __len);
+ if (!__r)
+ __r = this->_S_compare(__size, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ int
+ __versa_string <_CharT, _Traits, _Alloc, _Base>::
+ compare(size_type __pos, size_type __n1, const _CharT* __s) const
+ {
+ __glibcxx_requires_string(__s);
+ _M_check(__pos, "__versa_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __osize = traits_type::length(__s);
+ const size_type __len = std::min(__n1, __osize);
+ int __r = traits_type::compare(this->_M_data() + __pos, __s, __len);
+ if (!__r)
+ __r = this->_S_compare(__n1, __osize);
+ return __r;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ int
+ __versa_string <_CharT, _Traits, _Alloc, _Base>::
+ compare(size_type __pos, size_type __n1, const _CharT* __s,
+ size_type __n2) const
+ {
+ __glibcxx_requires_string_len(__s, __n2);
+ _M_check(__pos, "__versa_string::compare");
+ __n1 = _M_limit(__pos, __n1);
+ const size_type __len = std::min(__n1, __n2);
+ int __r = traits_type::compare(this->_M_data() + __pos, __s, __len);
+ if (!__r)
+ __r = this->_S_compare(__n1, __n2);
+ return __r;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in,
+ __gnu_cxx::__versa_string<_CharT, _Traits,
+ _Alloc, _Base>& __str)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+ typedef __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>
+ __string_type;
+ typedef typename __istream_type::int_type __int_type;
+ typedef typename __string_type::size_type __size_type;
+ typedef ctype<_CharT> __ctype_type;
+ typedef typename __ctype_type::ctype_base __ctype_base;
+
+ __size_type __extracted = 0;
+ typename __ios_base::iostate __err = __ios_base::goodbit;
+ typename __istream_type::sentry __cerb(__in, false);
+ if (__cerb)
+ {
+ __try
+ {
+ // Avoid reallocation for common case.
+ __str.erase();
+ _CharT __buf[128];
+ __size_type __len = 0;
+ const streamsize __w = __in.width();
+ const __size_type __n = __w > 0 ? static_cast<__size_type>(__w)
+ : __str.max_size();
+ const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc());
+ const __int_type __eof = _Traits::eof();
+ __int_type __c = __in.rdbuf()->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !__ct.is(__ctype_base::space,
+ _Traits::to_char_type(__c)))
+ {
+ if (__len == sizeof(__buf) / sizeof(_CharT))
+ {
+ __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+ __len = 0;
+ }
+ __buf[__len++] = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __in.rdbuf()->snextc();
+ }
+ __str.append(__buf, __len);
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= __ios_base::eofbit;
+ __in.width(0);
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(__ios_base::badbit);
+ }
+ }
+ // 211. operator>>(istream&, string&) doesn't set failbit
+ if (!__extracted)
+ __err |= __ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
+ return __in;
+ }
+
+ template<typename _CharT, typename _Traits, typename _Alloc,
+ template <typename, typename, typename> class _Base>
+ basic_istream<_CharT, _Traits>&
+ getline(basic_istream<_CharT, _Traits>& __in,
+ __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>& __str,
+ _CharT __delim)
+ {
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+ typedef __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc, _Base>
+ __string_type;
+ typedef typename __istream_type::int_type __int_type;
+ typedef typename __string_type::size_type __size_type;
+
+ __size_type __extracted = 0;
+ const __size_type __n = __str.max_size();
+ typename __ios_base::iostate __err = __ios_base::goodbit;
+ typename __istream_type::sentry __cerb(__in, true);
+ if (__cerb)
+ {
+ __try
+ {
+ // Avoid reallocation for common case.
+ __str.erase();
+ _CharT __buf[128];
+ __size_type __len = 0;
+ const __int_type __idelim = _Traits::to_int_type(__delim);
+ const __int_type __eof = _Traits::eof();
+ __int_type __c = __in.rdbuf()->sgetc();
+
+ while (__extracted < __n
+ && !_Traits::eq_int_type(__c, __eof)
+ && !_Traits::eq_int_type(__c, __idelim))
+ {
+ if (__len == sizeof(__buf) / sizeof(_CharT))
+ {
+ __str.append(__buf, sizeof(__buf) / sizeof(_CharT));
+ __len = 0;
+ }
+ __buf[__len++] = _Traits::to_char_type(__c);
+ ++__extracted;
+ __c = __in.rdbuf()->snextc();
+ }
+ __str.append(__buf, __len);
+
+ if (_Traits::eq_int_type(__c, __eof))
+ __err |= __ios_base::eofbit;
+ else if (_Traits::eq_int_type(__c, __idelim))
+ {
+ ++__extracted;
+ __in.rdbuf()->sbumpc();
+ }
+ else
+ __err |= __ios_base::failbit;
+ }
+ __catch(__cxxabiv1::__forced_unwind&)
+ {
+ __in._M_setstate(__ios_base::badbit);
+ __throw_exception_again;
+ }
+ __catch(...)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 91. Description of operator>> and getline() for string<>
+ // might cause endless loop
+ __in._M_setstate(__ios_base::badbit);
+ }
+ }
+ if (!__extracted)
+ __err |= __ios_base::failbit;
+ if (__err)
+ __in.setstate(__err);
+ return __in;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // _VSTRING_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_fwd.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_fwd.h
new file mode 100644
index 0000000..c2a31d4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_fwd.h
@@ -0,0 +1,87 @@
+// Versatile string forward -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/vstring_fwd.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VSTRING_FWD_H
+#define _VSTRING_FWD_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/char_traits.h>
+#include <bits/allocator.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __sso_string_base;
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __rc_string_base;
+
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
+ typename _Alloc = std::allocator<_CharT>,
+ template
+ <typename, typename, typename> class _Base = __sso_string_base>
+ class __versa_string;
+
+ typedef __versa_string<char> __vstring;
+ typedef __vstring __sso_string;
+ typedef
+ __versa_string<char, std::char_traits<char>,
+ std::allocator<char>, __rc_string_base> __rc_string;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef __versa_string<wchar_t> __wvstring;
+ typedef __wvstring __wsso_string;
+ typedef
+ __versa_string<wchar_t, std::char_traits<wchar_t>,
+ std::allocator<wchar_t>, __rc_string_base> __wrc_string;
+#endif
+
+#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
+ && defined(_GLIBCXX_USE_C99_STDINT_TR1))
+
+ typedef __versa_string<char16_t> __u16vstring;
+ typedef __u16vstring __u16sso_string;
+ typedef
+ __versa_string<char16_t, std::char_traits<char16_t>,
+ std::allocator<char16_t>, __rc_string_base> __u16rc_string;
+
+ typedef __versa_string<char32_t> __u32vstring;
+ typedef __u32vstring __u32sso_string;
+ typedef
+ __versa_string<char32_t, std::char_traits<char32_t>,
+ std::allocator<char32_t>, __rc_string_base> __u32rc_string;
+
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _VSTRING_FWD_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_util.h b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_util.h
new file mode 100644
index 0000000..4042f70
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ext/vstring_util.h
@@ -0,0 +1,180 @@
+// Versatile string utility -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ext/vstring_util.h
+ * This file is a GNU extension to the Standard C++ Library.
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _VSTRING_UTIL_H
+#define _VSTRING_UTIL_H 1
+
+#pragma GCC system_header
+
+#include <ext/vstring_fwd.h>
+#include <debug/debug.h>
+#include <bits/stl_function.h> // For less
+#include <bits/functexcept.h>
+#include <bits/localefwd.h>
+#include <bits/ostream_insert.h>
+#include <bits/stl_iterator.h>
+#include <ext/numeric_traits.h>
+#include <bits/move.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ struct __vstring_utility
+ {
+ typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
+
+ typedef _Traits traits_type;
+ typedef typename _Traits::char_type value_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+ typedef typename _CharT_alloc_type::difference_type difference_type;
+ typedef typename _CharT_alloc_type::pointer pointer;
+ typedef typename _CharT_alloc_type::const_pointer const_pointer;
+
+ // For __sso_string.
+ typedef __gnu_cxx::
+ __normal_iterator<pointer, __gnu_cxx::
+ __versa_string<_CharT, _Traits, _Alloc,
+ __sso_string_base> >
+ __sso_iterator;
+ typedef __gnu_cxx::
+ __normal_iterator<const_pointer, __gnu_cxx::
+ __versa_string<_CharT, _Traits, _Alloc,
+ __sso_string_base> >
+ __const_sso_iterator;
+
+ // For __rc_string.
+ typedef __gnu_cxx::
+ __normal_iterator<pointer, __gnu_cxx::
+ __versa_string<_CharT, _Traits, _Alloc,
+ __rc_string_base> >
+ __rc_iterator;
+ typedef __gnu_cxx::
+ __normal_iterator<const_pointer, __gnu_cxx::
+ __versa_string<_CharT, _Traits, _Alloc,
+ __rc_string_base> >
+ __const_rc_iterator;
+
+ // NB: When the allocator is empty, deriving from it saves space
+ // (http://www.cantrip.org/emptyopt.html).
+ template<typename _Alloc1>
+ struct _Alloc_hider
+ : public _Alloc1
+ {
+ _Alloc_hider(_CharT* __ptr)
+ : _Alloc1(), _M_p(__ptr) { }
+
+ _Alloc_hider(const _Alloc1& __a, _CharT* __ptr)
+ : _Alloc1(__a), _M_p(__ptr) { }
+
+ _CharT* _M_p; // The actual data.
+ };
+
+ // When __n = 1 way faster than the general multichar
+ // traits_type::copy/move/assign.
+ static void
+ _S_copy(_CharT* __d, const _CharT* __s, size_type __n)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, *__s);
+ else
+ traits_type::copy(__d, __s, __n);
+ }
+
+ static void
+ _S_move(_CharT* __d, const _CharT* __s, size_type __n)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, *__s);
+ else
+ traits_type::move(__d, __s, __n);
+ }
+
+ static void
+ _S_assign(_CharT* __d, size_type __n, _CharT __c)
+ {
+ if (__n == 1)
+ traits_type::assign(*__d, __c);
+ else
+ traits_type::assign(__d, __n, __c);
+ }
+
+ // _S_copy_chars is a separate template to permit specialization
+ // to optimize for the common case of pointers as iterators.
+ template<typename _Iterator>
+ static void
+ _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
+ {
+ for (; __k1 != __k2; ++__k1, ++__p)
+ traits_type::assign(*__p, *__k1); // These types are off.
+ }
+
+ static void
+ _S_copy_chars(_CharT* __p, __sso_iterator __k1, __sso_iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, __const_sso_iterator __k1,
+ __const_sso_iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, __rc_iterator __k1, __rc_iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, __const_rc_iterator __k1,
+ __const_rc_iterator __k2)
+ { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+ static void
+ _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
+ { _S_copy(__p, __k1, __k2 - __k1); }
+
+ static void
+ _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
+ { _S_copy(__p, __k1, __k2 - __k1); }
+
+ static int
+ _S_compare(size_type __n1, size_type __n2)
+ {
+ const difference_type __d = difference_type(__n1 - __n2);
+
+ if (__d > __numeric_traits_integer<int>::__max)
+ return __numeric_traits_integer<int>::__max;
+ else if (__d < __numeric_traits_integer<int>::__min)
+ return __numeric_traits_integer<int>::__min;
+ else
+ return int(__d);
+ }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _VSTRING_UTIL_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/fenv.h b/6/sources/cxx-stl/gnu-libstdc++/include/fenv.h
new file mode 100644
index 0000000..5db6d9d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/fenv.h
@@ -0,0 +1,58 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file fenv.h
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_FENV_H
+#define _GLIBCXX_FENV_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#if _GLIBCXX_HAVE_FENV_H
+# include_next <fenv.h>
+#endif
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/cfenv>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/cfenv>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif // _GLIBCXX_FENV_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/forward_list b/6/sources/cxx-stl/gnu-libstdc++/include/forward_list
new file mode 100644
index 0000000..40a0812
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/forward_list
@@ -0,0 +1,46 @@
+// <forward_list> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file forward_list
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_FORWARD_LIST
+#define _GLIBCXX_FORWARD_LIST 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <bits/forward_list.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/forward_list.tcc>
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_FORWARD_LIST
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/fstream b/6/sources/cxx-stl/gnu-libstdc++/include/fstream
new file mode 100644
index 0000000..88c1d14
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/fstream
@@ -0,0 +1,918 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file fstream
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.8 File-based streams
+//
+
+#ifndef _GLIBCXX_FSTREAM
+#define _GLIBCXX_FSTREAM 1
+
+#pragma GCC system_header
+
+#include <istream>
+#include <ostream>
+#include <bits/codecvt.h>
+#include <cstdio> // For BUFSIZ
+#include <bits/basic_file.h> // For __basic_file, __c_lock
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <string> // For std::string overloads.
+#endif
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // [27.8.1.1] template class basic_filebuf
+ /**
+ * @brief The actual work of input and output (for files).
+ * @ingroup io
+ *
+ * This class associates both its input and output sequence with an
+ * external disk file, and maintains a joint file position for both
+ * sequences. Many of its semantics are described in terms of similar
+ * behavior in the Standard C Library's @c FILE streams.
+ */
+ // Requirements on traits_type, specific to this class:
+ // traits_type::pos_type must be fpos<traits_type::state_type>
+ // traits_type::off_type must be streamoff
+ // traits_type::state_type must be Assignable and DefaultConstructible,
+ // and traits_type::state_type() must be the initial state for codecvt.
+ template<typename _CharT, typename _Traits>
+ class basic_filebuf : public basic_streambuf<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
+ typedef basic_filebuf<char_type, traits_type> __filebuf_type;
+ typedef __basic_file<char> __file_type;
+ typedef typename traits_type::state_type __state_type;
+ typedef codecvt<char_type, char, __state_type> __codecvt_type;
+
+ friend class ios_base; // For sync_with_stdio.
+
+ protected:
+ // Data Members:
+ // MT lock inherited from libio or other low-level io library.
+ __c_lock _M_lock;
+
+ // External buffer.
+ __file_type _M_file;
+
+ /// Place to stash in || out || in | out settings for current filebuf.
+ ios_base::openmode _M_mode;
+
+ // Beginning state type for codecvt.
+ __state_type _M_state_beg;
+
+ // During output, the state that corresponds to pptr(),
+ // during input, the state that corresponds to egptr() and
+ // _M_ext_next.
+ __state_type _M_state_cur;
+
+ // Not used for output. During input, the state that corresponds
+ // to eback() and _M_ext_buf.
+ __state_type _M_state_last;
+
+ /// Pointer to the beginning of internal buffer.
+ char_type* _M_buf;
+
+ /**
+ * Actual size of internal buffer. This number is equal to the size
+ * of the put area + 1 position, reserved for the overflow char of
+ * a full area.
+ */
+ size_t _M_buf_size;
+
+ // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.
+ bool _M_buf_allocated;
+
+ /**
+ * _M_reading == false && _M_writing == false for 'uncommitted' mode;
+ * _M_reading == true for 'read' mode;
+ * _M_writing == true for 'write' mode;
+ *
+ * NB: _M_reading == true && _M_writing == true is unused.
+ */
+ bool _M_reading;
+ bool _M_writing;
+
+ //@{
+ /**
+ * Necessary bits for putback buffer management.
+ *
+ * @note pbacks of over one character are not currently supported.
+ */
+ char_type _M_pback;
+ char_type* _M_pback_cur_save;
+ char_type* _M_pback_end_save;
+ bool _M_pback_init;
+ //@}
+
+ // Cached codecvt facet.
+ const __codecvt_type* _M_codecvt;
+
+ /**
+ * Buffer for external characters. Used for input when
+ * codecvt::always_noconv() == false. When valid, this corresponds
+ * to eback().
+ */
+ char* _M_ext_buf;
+
+ /**
+ * Size of buffer held by _M_ext_buf.
+ */
+ streamsize _M_ext_buf_size;
+
+ /**
+ * Pointers into the buffer held by _M_ext_buf that delimit a
+ * subsequence of bytes that have been read but not yet converted.
+ * When valid, _M_ext_next corresponds to egptr().
+ */
+ const char* _M_ext_next;
+ char* _M_ext_end;
+
+ /**
+ * Initializes pback buffers, and moves normal buffers to safety.
+ * Assumptions:
+ * _M_in_cur has already been moved back
+ */
+ void
+ _M_create_pback()
+ {
+ if (!_M_pback_init)
+ {
+ _M_pback_cur_save = this->gptr();
+ _M_pback_end_save = this->egptr();
+ this->setg(&_M_pback, &_M_pback, &_M_pback + 1);
+ _M_pback_init = true;
+ }
+ }
+
+ /**
+ * Deactivates pback buffer contents, and restores normal buffer.
+ * Assumptions:
+ * The pback buffer has only moved forward.
+ */
+ void
+ _M_destroy_pback() throw()
+ {
+ if (_M_pback_init)
+ {
+ // Length _M_in_cur moved in the pback buffer.
+ _M_pback_cur_save += this->gptr() != this->eback();
+ this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save);
+ _M_pback_init = false;
+ }
+ }
+
+ public:
+ // Constructors/destructor:
+ /**
+ * @brief Does not open any files.
+ *
+ * The default constructor initializes the parent class using its
+ * own default ctor.
+ */
+ basic_filebuf();
+
+ /**
+ * @brief The destructor closes the file first.
+ */
+ virtual
+ ~basic_filebuf()
+ { this->close(); }
+
+ // Members:
+ /**
+ * @brief Returns true if the external file is open.
+ */
+ bool
+ is_open() const throw()
+ { return _M_file.is_open(); }
+
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ * @return @c this on success, NULL on failure
+ *
+ * If a file is already open, this function immediately fails.
+ * Otherwise it tries to open the file named @a s using the flags
+ * given in @a mode.
+ *
+ * Table 92, adapted here, gives the relation between openmode
+ * combinations and the equivalent fopen() flags.
+ * (NB: lines app, in|out|app, in|app, binary|app, binary|in|out|app,
+ * and binary|in|app per DR 596)
+ * +---------------------------------------------------------+
+ * | ios_base Flag combination stdio equivalent |
+ * |binary in out trunc app |
+ * +---------------------------------------------------------+
+ * | + "w" |
+ * | + + "a" |
+ * | + "a" |
+ * | + + "w" |
+ * | + "r" |
+ * | + + "r+" |
+ * | + + + "w+" |
+ * | + + + "a+" |
+ * | + + "a+" |
+ * +---------------------------------------------------------+
+ * | + + "wb" |
+ * | + + + "ab" |
+ * | + + "ab" |
+ * | + + + "wb" |
+ * | + + "rb" |
+ * | + + + "r+b" |
+ * | + + + + "w+b" |
+ * | + + + + "a+b" |
+ * | + + + "a+b" |
+ * +---------------------------------------------------------+
+ */
+ __filebuf_type*
+ open(const char* __s, ios_base::openmode __mode);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ * @return @c this on success, NULL on failure
+ */
+ __filebuf_type*
+ open(const std::string& __s, ios_base::openmode __mode)
+ { return open(__s.c_str(), __mode); }
+#endif
+
+ /**
+ * @brief Closes the currently associated file.
+ * @return @c this on success, NULL on failure
+ *
+ * If no file is currently open, this function immediately fails.
+ *
+ * If a "put buffer area" exists, @c overflow(eof) is called to flush
+ * all the characters. The file is then closed.
+ *
+ * If any operations fail, this function also fails.
+ */
+ __filebuf_type*
+ close();
+
+ protected:
+ void
+ _M_allocate_internal_buffer();
+
+ void
+ _M_destroy_internal_buffer() throw();
+
+ // [27.8.1.4] overridden virtual functions
+ virtual streamsize
+ showmanyc();
+
+ // Stroustrup, 1998, p. 628
+ // underflow() and uflow() functions are called to get the next
+ // character from the real input source when the buffer is empty.
+ // Buffered input uses underflow()
+
+ virtual int_type
+ underflow();
+
+ virtual int_type
+ pbackfail(int_type __c = _Traits::eof());
+
+ // Stroustrup, 1998, p 648
+ // The overflow() function is called to transfer characters to the
+ // real output destination when the buffer is full. A call to
+ // overflow(c) outputs the contents of the buffer plus the
+ // character c.
+ // 27.5.2.4.5
+ // Consume some sequence of the characters in the pending sequence.
+ virtual int_type
+ overflow(int_type __c = _Traits::eof());
+
+ // Convert internal byte sequence to external, char-based
+ // sequence via codecvt.
+ bool
+ _M_convert_to_external(char_type*, streamsize);
+
+ /**
+ * @brief Manipulates the buffer.
+ * @param s Pointer to a buffer area.
+ * @param n Size of @a s.
+ * @return @c this
+ *
+ * If no file has been opened, and both @a s and @a n are zero, then
+ * the stream becomes unbuffered. Otherwise, @c s is used as a
+ * buffer; see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html
+ * for more.
+ */
+ virtual __streambuf_type*
+ setbuf(char_type* __s, streamsize __n);
+
+ virtual pos_type
+ seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+ virtual pos_type
+ seekpos(pos_type __pos,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+ // Common code for seekoff and seekpos
+ pos_type
+ _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state);
+
+ virtual int
+ sync();
+
+ virtual void
+ imbue(const locale& __loc);
+
+ virtual streamsize
+ xsgetn(char_type* __s, streamsize __n);
+
+ virtual streamsize
+ xsputn(const char_type* __s, streamsize __n);
+
+ // Flushes output buffer, then writes unshift sequence.
+ bool
+ _M_terminate_output();
+
+ /**
+ * This function sets the pointers of the internal buffer, both get
+ * and put areas. Typically:
+ *
+ * __off == egptr() - eback() upon underflow/uflow ('read' mode);
+ * __off == 0 upon overflow ('write' mode);
+ * __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode).
+ *
+ * NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size
+ * reflects the actual allocated memory and the last cell is reserved
+ * for the overflow char of a full put area.
+ */
+ void
+ _M_set_buffer(streamsize __off)
+ {
+ const bool __testin = _M_mode & ios_base::in;
+ const bool __testout = _M_mode & ios_base::out;
+
+ if (__testin && __off > 0)
+ this->setg(_M_buf, _M_buf, _M_buf + __off);
+ else
+ this->setg(_M_buf, _M_buf, _M_buf);
+
+ if (__testout && __off == 0 && _M_buf_size > 1 )
+ this->setp(_M_buf, _M_buf + _M_buf_size - 1);
+ else
+ this->setp(NULL, NULL);
+ }
+ };
+
+ // [27.8.1.5] Template class basic_ifstream
+ /**
+ * @brief Controlling input for files.
+ * @ingroup io
+ *
+ * This class supports reading from named files, using the inherited
+ * functions from std::basic_istream. To control the associated
+ * sequence, an instance of std::basic_filebuf is used, which this page
+ * refers to as @c sb.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_ifstream : public basic_istream<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard types:
+ typedef basic_filebuf<char_type, traits_type> __filebuf_type;
+ typedef basic_istream<char_type, traits_type> __istream_type;
+
+ private:
+ __filebuf_type _M_filebuf;
+
+ public:
+ // Constructors/Destructors:
+ /**
+ * @brief Default constructor.
+ *
+ * Initializes @c sb using its default constructor, and passes
+ * @c &sb to the base class initializer. Does not open any files
+ * (you haven't given it a filename to open).
+ */
+ basic_ifstream() : __istream_type(), _M_filebuf()
+ { this->init(&_M_filebuf); }
+
+ /**
+ * @brief Create an input file stream.
+ * @param s Null terminated string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::in is automatically included in @a mode.
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ explicit
+ basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an input file stream.
+ * @param s std::string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::in is automatically included in @a mode.
+ */
+ explicit
+ basic_ifstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The file is closed by the filebuf object, not the formatting
+ * stream.
+ */
+ ~basic_ifstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_filebuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __filebuf_type*
+ rdbuf() const
+ { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+ /**
+ * @brief Wrapper to test for an open file.
+ * @return @c rdbuf()->is_open()
+ */
+ bool
+ is_open()
+ { return _M_filebuf.is_open(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 365. Lack of const-qualification in clause 27
+ bool
+ is_open() const
+ { return _M_filebuf.is_open(); }
+
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|in). If that function
+ * fails, @c failbit is set in the stream's error state.
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ void
+ open(const char* __s, ios_base::openmode __mode = ios_base::in)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::in))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|in). If that function
+ * fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s, ios_base::openmode __mode = ios_base::in)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::in))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
+ /**
+ * @brief Close the file.
+ *
+ * Calls @c std::basic_filebuf::close(). If that function
+ * fails, @c failbit is set in the stream's error state.
+ */
+ void
+ close()
+ {
+ if (!_M_filebuf.close())
+ this->setstate(ios_base::failbit);
+ }
+ };
+
+
+ // [27.8.1.8] Template class basic_ofstream
+ /**
+ * @brief Controlling output for files.
+ * @ingroup io
+ *
+ * This class supports reading from named files, using the inherited
+ * functions from std::basic_ostream. To control the associated
+ * sequence, an instance of std::basic_filebuf is used, which this page
+ * refers to as @c sb.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_ofstream : public basic_ostream<_CharT,_Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard types:
+ typedef basic_filebuf<char_type, traits_type> __filebuf_type;
+ typedef basic_ostream<char_type, traits_type> __ostream_type;
+
+ private:
+ __filebuf_type _M_filebuf;
+
+ public:
+ // Constructors:
+ /**
+ * @brief Default constructor.
+ *
+ * Initializes @c sb using its default constructor, and passes
+ * @c &sb to the base class initializer. Does not open any files
+ * (you haven't given it a filename to open).
+ */
+ basic_ofstream(): __ostream_type(), _M_filebuf()
+ { this->init(&_M_filebuf); }
+
+ /**
+ * @brief Create an output file stream.
+ * @param s Null terminated string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::out|ios_base::trunc is automatically included in
+ * @a mode.
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ explicit
+ basic_ofstream(const char* __s,
+ ios_base::openmode __mode = ios_base::out|ios_base::trunc)
+ : __ostream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an output file stream.
+ * @param s std::string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::out|ios_base::trunc is automatically included in
+ * @a mode.
+ */
+ explicit
+ basic_ofstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::out|ios_base::trunc)
+ : __ostream_type(), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The file is closed by the filebuf object, not the formatting
+ * stream.
+ */
+ ~basic_ofstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_filebuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __filebuf_type*
+ rdbuf() const
+ { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+ /**
+ * @brief Wrapper to test for an open file.
+ * @return @c rdbuf()->is_open()
+ */
+ bool
+ is_open()
+ { return _M_filebuf.is_open(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 365. Lack of const-qualification in clause 27
+ bool
+ is_open() const
+ { return _M_filebuf.is_open(); }
+
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|out|trunc). If that
+ * function fails, @c failbit is set in the stream's error state.
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ void
+ open(const char* __s,
+ ios_base::openmode __mode = ios_base::out | ios_base::trunc)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::out))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode|out|trunc). If that
+ * function fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s,
+ ios_base::openmode __mode = ios_base::out | ios_base::trunc)
+ {
+ if (!_M_filebuf.open(__s, __mode | ios_base::out))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
+ /**
+ * @brief Close the file.
+ *
+ * Calls @c std::basic_filebuf::close(). If that function
+ * fails, @c failbit is set in the stream's error state.
+ */
+ void
+ close()
+ {
+ if (!_M_filebuf.close())
+ this->setstate(ios_base::failbit);
+ }
+ };
+
+
+ // [27.8.1.11] Template class basic_fstream
+ /**
+ * @brief Controlling input and output for files.
+ * @ingroup io
+ *
+ * This class supports reading from and writing to named files, using
+ * the inherited functions from std::basic_iostream. To control the
+ * associated sequence, an instance of std::basic_filebuf is used, which
+ * this page refers to as @c sb.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_fstream : public basic_iostream<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard types:
+ typedef basic_filebuf<char_type, traits_type> __filebuf_type;
+ typedef basic_ios<char_type, traits_type> __ios_type;
+ typedef basic_iostream<char_type, traits_type> __iostream_type;
+
+ private:
+ __filebuf_type _M_filebuf;
+
+ public:
+ // Constructors/destructor:
+ /**
+ * @brief Default constructor.
+ *
+ * Initializes @c sb using its default constructor, and passes
+ * @c &sb to the base class initializer. Does not open any files
+ * (you haven't given it a filename to open).
+ */
+ basic_fstream()
+ : __iostream_type(), _M_filebuf()
+ { this->init(&_M_filebuf); }
+
+ /**
+ * @brief Create an input/output file stream.
+ * @param s Null terminated string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ explicit
+ basic_fstream(const char* __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __iostream_type(NULL), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Create an input/output file stream.
+ * @param s Null terminated string specifying the filename.
+ * @param mode Open file in specified mode (see std::ios_base).
+ */
+ explicit
+ basic_fstream(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __iostream_type(NULL), _M_filebuf()
+ {
+ this->init(&_M_filebuf);
+ this->open(__s, __mode);
+ }
+#endif
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The file is closed by the filebuf object, not the formatting
+ * stream.
+ */
+ ~basic_fstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_filebuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __filebuf_type*
+ rdbuf() const
+ { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+ /**
+ * @brief Wrapper to test for an open file.
+ * @return @c rdbuf()->is_open()
+ */
+ bool
+ is_open()
+ { return _M_filebuf.is_open(); }
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 365. Lack of const-qualification in clause 27
+ bool
+ is_open() const
+ { return _M_filebuf.is_open(); }
+
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode). If that
+ * function fails, @c failbit is set in the stream's error state.
+ *
+ * Tip: When using std::string to hold the filename, you must use
+ * .c_str() before passing it to this constructor.
+ */
+ void
+ open(const char* __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ {
+ if (!_M_filebuf.open(__s, __mode))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Opens an external file.
+ * @param s The name of the file.
+ * @param mode The open mode flags.
+ *
+ * Calls @c std::basic_filebuf::open(s,mode). If that
+ * function fails, @c failbit is set in the stream's error state.
+ */
+ void
+ open(const std::string& __s,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ {
+ if (!_M_filebuf.open(__s, __mode))
+ this->setstate(ios_base::failbit);
+ else
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 409. Closing an fstream should clear error state
+ this->clear();
+ }
+#endif
+
+ /**
+ * @brief Close the file.
+ *
+ * Calls @c std::basic_filebuf::close(). If that function
+ * fails, @c failbit is set in the stream's error state.
+ */
+ void
+ close()
+ {
+ if (!_M_filebuf.close())
+ this->setstate(ios_base::failbit);
+ }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/fstream.tcc>
+#endif
+
+#endif /* _GLIBCXX_FSTREAM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/functional b/6/sources/cxx-stl/gnu-libstdc++/include/functional
new file mode 100644
index 0000000..8f4f42c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/functional
@@ -0,0 +1,78 @@
+// <functional> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 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.
+ *
+ */
+
+/** @file include/functional
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_FUNCTIONAL
+#define _GLIBCXX_FUNCTIONAL 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stl_function.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# include <typeinfo>
+# include <new>
+# include <tuple>
+# include <type_traits>
+# include <bits/stringfwd.h>
+# include <bits/functional_hash.h>
+# include <ext/type_traits.h>
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/functional>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/functional>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#endif
+
+#endif // _GLIBCXX_FUNCTIONAL
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/initializer_list b/6/sources/cxx-stl/gnu-libstdc++/include/initializer_list
new file mode 100644
index 0000000..6b8a202
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/initializer_list
@@ -0,0 +1,72 @@
+// std::initializer_list support -*- C++ -*-
+
+// Copyright (C) 2008, 2009 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file initializer_list
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef __CXX_INITIALIZER_LIST
+#define __CXX_INITIALIZER_LIST
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+#pragma GCC visibility push(default)
+
+#include <cstddef>
+
+namespace std
+{
+ /// initializer_list
+ template<class _E>
+ class initializer_list
+ {
+ const _E* __array;
+ size_t __len;
+
+ // The compiler can call a private constructor.
+ initializer_list(const _E* __a, size_t __l)
+ : __array(__a), __len(__l) { }
+
+ public:
+ initializer_list()
+ : __array(NULL), __len(0) { }
+
+ // Number of elements.
+ size_t size() const
+ { return __len; }
+
+ // First element.
+ const _E* begin() const
+ { return __array; }
+
+ // One past the last element.
+ const _E* end() const
+ { return begin() + size(); }
+ };
+}
+
+#pragma GCC visibility pop
+#endif // C++0x
+#endif // __CXX_INITIALIZER_LIST
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/iomanip b/6/sources/cxx-stl/gnu-libstdc++/include/iomanip
new file mode 100644
index 0000000..873c76f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/iomanip
@@ -0,0 +1,296 @@
+// Standard stream manipulators -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file iomanip
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.6.3 Standard manipulators
+//
+
+#ifndef _GLIBCXX_IOMANIP
+#define _GLIBCXX_IOMANIP 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <iosfwd>
+#include <bits/ios_base.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // [27.6.3] standard manipulators
+ // Also see DR 183.
+
+ struct _Resetiosflags { ios_base::fmtflags _M_mask; };
+
+ /**
+ * @brief Manipulator for @c setf.
+ * @param mask A format flags mask.
+ *
+ * Sent to a stream object, this manipulator resets the specified flags,
+ * via @e stream.setf(0,mask).
+ */
+ inline _Resetiosflags
+ resetiosflags(ios_base::fmtflags __mask)
+ {
+ _Resetiosflags __x;
+ __x._M_mask = __mask;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
+ {
+ __is.setf(ios_base::fmtflags(0), __f._M_mask);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
+ {
+ __os.setf(ios_base::fmtflags(0), __f._M_mask);
+ return __os;
+ }
+
+
+ struct _Setiosflags { ios_base::fmtflags _M_mask; };
+
+ /**
+ * @brief Manipulator for @c setf.
+ * @param mask A format flags mask.
+ *
+ * Sent to a stream object, this manipulator sets the format flags
+ * to @a mask.
+ */
+ inline _Setiosflags
+ setiosflags(ios_base::fmtflags __mask)
+ {
+ _Setiosflags __x;
+ __x._M_mask = __mask;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
+ {
+ __is.setf(__f._M_mask);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
+ {
+ __os.setf(__f._M_mask);
+ return __os;
+ }
+
+
+ struct _Setbase { int _M_base; };
+
+ /**
+ * @brief Manipulator for @c setf.
+ * @param base A numeric base.
+ *
+ * Sent to a stream object, this manipulator changes the
+ * @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base
+ * is 8, 10, or 16, accordingly, and to 0 if @a base is any other value.
+ */
+ inline _Setbase
+ setbase(int __base)
+ {
+ _Setbase __x;
+ __x._M_base = __base;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
+ {
+ __is.setf(__f._M_base == 8 ? ios_base::oct :
+ __f._M_base == 10 ? ios_base::dec :
+ __f._M_base == 16 ? ios_base::hex :
+ ios_base::fmtflags(0), ios_base::basefield);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
+ {
+ __os.setf(__f._M_base == 8 ? ios_base::oct :
+ __f._M_base == 10 ? ios_base::dec :
+ __f._M_base == 16 ? ios_base::hex :
+ ios_base::fmtflags(0), ios_base::basefield);
+ return __os;
+ }
+
+
+ template<typename _CharT>
+ struct _Setfill { _CharT _M_c; };
+
+ /**
+ * @brief Manipulator for @c fill.
+ * @param c The new fill character.
+ *
+ * Sent to a stream object, this manipulator calls @c fill(c) for that
+ * object.
+ */
+ template<typename _CharT>
+ inline _Setfill<_CharT>
+ setfill(_CharT __c)
+ {
+ _Setfill<_CharT> __x;
+ __x._M_c = __c;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
+ {
+ __is.fill(__f._M_c);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
+ {
+ __os.fill(__f._M_c);
+ return __os;
+ }
+
+
+ struct _Setprecision { int _M_n; };
+
+ /**
+ * @brief Manipulator for @c precision.
+ * @param n The new precision.
+ *
+ * Sent to a stream object, this manipulator calls @c precision(n) for
+ * that object.
+ */
+ inline _Setprecision
+ setprecision(int __n)
+ {
+ _Setprecision __x;
+ __x._M_n = __n;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
+ {
+ __is.precision(__f._M_n);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
+ {
+ __os.precision(__f._M_n);
+ return __os;
+ }
+
+
+ struct _Setw { int _M_n; };
+
+ /**
+ * @brief Manipulator for @c width.
+ * @param n The new width.
+ *
+ * Sent to a stream object, this manipulator calls @c width(n) for
+ * that object.
+ */
+ inline _Setw
+ setw(int __n)
+ {
+ _Setw __x;
+ __x._M_n = __n;
+ return __x;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
+ {
+ __is.width(__f._M_n);
+ return __is;
+ }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
+ {
+ __os.width(__f._M_n);
+ return __os;
+ }
+
+ // Inhibit implicit instantiations for required instantiations,
+ // which are defined via explicit instantiations elsewhere.
+ // NB: This syntax is a GNU extension.
+#if _GLIBCXX_EXTERN_TEMPLATE
+ extern template ostream& operator<<(ostream&, _Setfill<char>);
+ extern template ostream& operator<<(ostream&, _Setiosflags);
+ extern template ostream& operator<<(ostream&, _Resetiosflags);
+ extern template ostream& operator<<(ostream&, _Setbase);
+ extern template ostream& operator<<(ostream&, _Setprecision);
+ extern template ostream& operator<<(ostream&, _Setw);
+ extern template istream& operator>>(istream&, _Setfill<char>);
+ extern template istream& operator>>(istream&, _Setiosflags);
+ extern template istream& operator>>(istream&, _Resetiosflags);
+ extern template istream& operator>>(istream&, _Setbase);
+ extern template istream& operator>>(istream&, _Setprecision);
+ extern template istream& operator>>(istream&, _Setw);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern template wostream& operator<<(wostream&, _Setfill<wchar_t>);
+ extern template wostream& operator<<(wostream&, _Setiosflags);
+ extern template wostream& operator<<(wostream&, _Resetiosflags);
+ extern template wostream& operator<<(wostream&, _Setbase);
+ extern template wostream& operator<<(wostream&, _Setprecision);
+ extern template wostream& operator<<(wostream&, _Setw);
+ extern template wistream& operator>>(wistream&, _Setfill<wchar_t>);
+ extern template wistream& operator>>(wistream&, _Setiosflags);
+ extern template wistream& operator>>(wistream&, _Resetiosflags);
+ extern template wistream& operator>>(wistream&, _Setbase);
+ extern template wistream& operator>>(wistream&, _Setprecision);
+ extern template wistream& operator>>(wistream&, _Setw);
+#endif
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_IOMANIP */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ios b/6/sources/cxx-stl/gnu-libstdc++/include/ios
new file mode 100644
index 0000000..d561ac6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ios
@@ -0,0 +1,47 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+// 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ios
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.4 Iostreams base classes
+//
+
+#ifndef _GLIBCXX_IOS
+#define _GLIBCXX_IOS 1
+
+#pragma GCC system_header
+
+#include <iosfwd>
+#include <exception> // For ios_base::failure
+#include <bits/char_traits.h> // For char_traits, streamoff, streamsize, fpos
+#include <bits/localefwd.h> // For class locale
+#include <bits/ios_base.h> // For ios_base declarations.
+#include <streambuf>
+#include <bits/basic_ios.h>
+
+#endif /* _GLIBCXX_IOS */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/iosfwd b/6/sources/cxx-stl/gnu-libstdc++/include/iosfwd
new file mode 100644
index 0000000..9bba0ab
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/iosfwd
@@ -0,0 +1,160 @@
+// Forwarding declarations -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file iosfwd
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.2 Forward declarations
+//
+
+#ifndef _GLIBCXX_IOSFWD
+#define _GLIBCXX_IOSFWD 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stringfwd.h> // For string forward declarations.
+#include <bits/postypes.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ios;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_streambuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_istream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ostream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_iostream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_stringbuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_istringstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_ostringstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT>,
+ typename _Alloc = allocator<_CharT> >
+ class basic_stringstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_filebuf;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ifstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_ofstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class basic_fstream;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class istreambuf_iterator;
+
+ template<typename _CharT, typename _Traits = char_traits<_CharT> >
+ class ostreambuf_iterator;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // Not included. (??? Apparently no LWG number?)
+ class ios_base;
+
+ /**
+ * @defgroup io I/O
+ *
+ * Nearly all of the I/O classes are parameterized on the type of
+ * characters they read and write. (The major exception is ios_base at
+ * the top of the hierarchy.) This is a change from pre-Standard
+ * streams, which were not templates.
+ *
+ * For ease of use and compatibility, all of the basic_* I/O-related
+ * classes are given typedef names for both of the builtin character
+ * widths (wide and narrow). The typedefs are the same as the
+ * pre-Standard names, for example:
+ *
+ * @code
+ * typedef basic_ifstream<char> ifstream;
+ * @endcode
+ *
+ * Because properly forward-declaring these classes can be difficult, you
+ * should not do it yourself. Instead, include the &lt;iosfwd&gt;
+ * header, which contains only declarations of all the I/O classes as
+ * well as the typedefs. Trying to forward-declare the typedefs
+ * themselves (e.g., "class ostream;") is not valid ISO C++.
+ *
+ * For more specific declarations, see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
+ *
+ * @{
+ */
+ typedef basic_ios<char> ios; ///< @isiosfwd
+ typedef basic_streambuf<char> streambuf; ///< @isiosfwd
+ typedef basic_istream<char> istream; ///< @isiosfwd
+ typedef basic_ostream<char> ostream; ///< @isiosfwd
+ typedef basic_iostream<char> iostream; ///< @isiosfwd
+ typedef basic_stringbuf<char> stringbuf; ///< @isiosfwd
+ typedef basic_istringstream<char> istringstream; ///< @isiosfwd
+ typedef basic_ostringstream<char> ostringstream; ///< @isiosfwd
+ typedef basic_stringstream<char> stringstream; ///< @isiosfwd
+ typedef basic_filebuf<char> filebuf; ///< @isiosfwd
+ typedef basic_ifstream<char> ifstream; ///< @isiosfwd
+ typedef basic_ofstream<char> ofstream; ///< @isiosfwd
+ typedef basic_fstream<char> fstream; ///< @isiosfwd
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef basic_ios<wchar_t> wios; ///< @isiosfwd
+ typedef basic_streambuf<wchar_t> wstreambuf; ///< @isiosfwd
+ typedef basic_istream<wchar_t> wistream; ///< @isiosfwd
+ typedef basic_ostream<wchar_t> wostream; ///< @isiosfwd
+ typedef basic_iostream<wchar_t> wiostream; ///< @isiosfwd
+ typedef basic_stringbuf<wchar_t> wstringbuf; ///< @isiosfwd
+ typedef basic_istringstream<wchar_t> wistringstream; ///< @isiosfwd
+ typedef basic_ostringstream<wchar_t> wostringstream; ///< @isiosfwd
+ typedef basic_stringstream<wchar_t> wstringstream; ///< @isiosfwd
+ typedef basic_filebuf<wchar_t> wfilebuf; ///< @isiosfwd
+ typedef basic_ifstream<wchar_t> wifstream; ///< @isiosfwd
+ typedef basic_ofstream<wchar_t> wofstream; ///< @isiosfwd
+ typedef basic_fstream<wchar_t> wfstream; ///< @isiosfwd
+#endif
+ /** @} */
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_IOSFWD */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/iostream b/6/sources/cxx-stl/gnu-libstdc++/include/iostream
new file mode 100644
index 0000000..e14c4f3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/iostream
@@ -0,0 +1,76 @@
+// Standard iostream objects -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2005, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file iostream
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.3 Standard iostream objects
+//
+
+#ifndef _GLIBCXX_IOSTREAM
+#define _GLIBCXX_IOSTREAM 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <ostream>
+#include <istream>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @name Standard Stream Objects
+ *
+ * The &lt;iostream&gt; header declares the eight <em>standard stream
+ * objects</em>. For other declarations, see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
+ * and the @link iosfwd I/O forward declarations @endlink
+ *
+ * They are required by default to cooperate with the global C library's
+ * @c FILE streams, and to be available during program startup and
+ * termination. For more information, see the HOWTO linked to above.
+ */
+ //@{
+ extern istream cin; ///< Linked to standard input
+ extern ostream cout; ///< Linked to standard output
+ extern ostream cerr; ///< Linked to standard error (unbuffered)
+ extern ostream clog; ///< Linked to standard error (buffered)
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ extern wistream wcin; ///< Linked to standard input
+ extern wostream wcout; ///< Linked to standard output
+ extern wostream wcerr; ///< Linked to standard error (unbuffered)
+ extern wostream wclog; ///< Linked to standard error (buffered)
+#endif
+ //@}
+
+ // For construction of filebuffers for cout, cin, cerr, clog et. al.
+ static ios_base::Init __ioinit;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_IOSTREAM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/istream b/6/sources/cxx-stl/gnu-libstdc++/include/istream
new file mode 100644
index 0000000..521be7f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/istream
@@ -0,0 +1,833 @@
+// Input streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.6.1 Input streams
+//
+
+/** @file istream
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ISTREAM
+#define _GLIBCXX_ISTREAM 1
+
+#pragma GCC system_header
+
+#include <ios>
+#include <ostream>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // [27.6.1.1] Template class basic_istream
+ /**
+ * @brief Controlling input.
+ * @ingroup io
+ *
+ * This is the base class for all input streams. It provides text
+ * formatting of all builtin types, and communicates with any class
+ * derived from basic_streambuf to do the actual input.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_istream : virtual public basic_ios<_CharT, _Traits>
+ {
+ public:
+ // Types (inherited from basic_ios (27.4.4)):
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ // Non-standard Types:
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef basic_ios<_CharT, _Traits> __ios_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
+ __num_get_type;
+ typedef ctype<_CharT> __ctype_type;
+
+ protected:
+ // Data Members:
+ /**
+ * The number of characters extracted in the previous unformatted
+ * function; see gcount().
+ */
+ streamsize _M_gcount;
+
+ public:
+ // [27.6.1.1.1] constructor/destructor
+ /**
+ * @brief Base constructor.
+ *
+ * This ctor is almost never called by the user directly, rather from
+ * derived classes' initialization lists, which pass a pointer to
+ * their own stream buffer.
+ */
+ explicit
+ basic_istream(__streambuf_type* __sb)
+ : _M_gcount(streamsize(0))
+ { this->init(__sb); }
+
+ /**
+ * @brief Base destructor.
+ *
+ * This does very little apart from providing a virtual base dtor.
+ */
+ virtual
+ ~basic_istream()
+ { _M_gcount = streamsize(0); }
+
+ // [27.6.1.1.2] prefix/suffix
+ class sentry;
+ friend class sentry;
+
+ // [27.6.1.2] formatted input
+ // [27.6.1.2.3] basic_istream::operator>>
+ //@{
+ /**
+ * @brief Interface for manipulators.
+ *
+ * Manipulators such as @c std::ws and @c std::dec use these
+ * functions in constructs like "std::cin >> std::ws". For more
+ * information, see the iomanip header.
+ */
+ __istream_type&
+ operator>>(__istream_type& (*__pf)(__istream_type&))
+ { return __pf(*this); }
+
+ __istream_type&
+ operator>>(__ios_type& (*__pf)(__ios_type&))
+ {
+ __pf(*this);
+ return *this;
+ }
+
+ __istream_type&
+ operator>>(ios_base& (*__pf)(ios_base&))
+ {
+ __pf(*this);
+ return *this;
+ }
+ //@}
+
+ // [27.6.1.2.2] arithmetic extractors
+ /**
+ * @name Arithmetic Extractors
+ *
+ * All the @c operator>> functions (aka <em>formatted input
+ * functions</em>) have some common behavior. Each starts by
+ * constructing a temporary object of type std::basic_istream::sentry
+ * with the second argument (noskipws) set to false. This has several
+ * effects, concluding with the setting of a status flag; see the
+ * sentry documentation for more.
+ *
+ * If the sentry status is good, the function tries to extract
+ * whatever data is appropriate for the type of the argument.
+ *
+ * If an exception is thrown during extraction, ios_base::badbit
+ * will be turned on in the stream's error state without causing an
+ * ios_base::failure to be thrown. The original exception will then
+ * be rethrown.
+ */
+ //@{
+ /**
+ * @brief Basic arithmetic extractors
+ * @param A variable of builtin type.
+ * @return @c *this if successful
+ *
+ * These functions use the stream's current locale (specifically, the
+ * @c num_get facet) to parse the input data.
+ */
+ __istream_type&
+ operator>>(bool& __n)
+ { return _M_extract(__n); }
+
+ __istream_type&
+ operator>>(short& __n);
+
+ __istream_type&
+ operator>>(unsigned short& __n)
+ { return _M_extract(__n); }
+
+ __istream_type&
+ operator>>(int& __n);
+
+ __istream_type&
+ operator>>(unsigned int& __n)
+ { return _M_extract(__n); }
+
+ __istream_type&
+ operator>>(long& __n)
+ { return _M_extract(__n); }
+
+ __istream_type&
+ operator>>(unsigned long& __n)
+ { return _M_extract(__n); }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ __istream_type&
+ operator>>(long long& __n)
+ { return _M_extract(__n); }
+
+ __istream_type&
+ operator>>(unsigned long long& __n)
+ { return _M_extract(__n); }
+#endif
+
+ __istream_type&
+ operator>>(float& __f)
+ { return _M_extract(__f); }
+
+ __istream_type&
+ operator>>(double& __f)
+ { return _M_extract(__f); }
+
+ __istream_type&
+ operator>>(long double& __f)
+ { return _M_extract(__f); }
+
+ __istream_type&
+ operator>>(void*& __p)
+ { return _M_extract(__p); }
+
+ /**
+ * @brief Extracting into another streambuf.
+ * @param sb A pointer to a streambuf
+ *
+ * This function behaves like one of the basic arithmetic extractors,
+ * in that it also constructs a sentry object and has the same error
+ * handling behavior.
+ *
+ * If @a sb is NULL, the stream will set failbit in its error state.
+ *
+ * Characters are extracted from this stream and inserted into the
+ * @a sb streambuf until one of the following occurs:
+ *
+ * - the input stream reaches end-of-file,
+ * - insertion into the output buffer fails (in this case, the
+ * character that would have been inserted is not extracted), or
+ * - an exception occurs (and in this case is caught)
+ *
+ * If the function inserts no characters, failbit is set.
+ */
+ __istream_type&
+ operator>>(__streambuf_type* __sb);
+ //@}
+
+ // [27.6.1.3] unformatted input
+ /**
+ * @brief Character counting
+ * @return The number of characters extracted by the previous
+ * unformatted input function dispatched for this stream.
+ */
+ streamsize
+ gcount() const
+ { return _M_gcount; }
+
+ /**
+ * @name Unformatted Input Functions
+ *
+ * All the unformatted input functions have some common behavior.
+ * Each starts by constructing a temporary object of type
+ * std::basic_istream::sentry with the second argument (noskipws)
+ * set to true. This has several effects, concluding with the
+ * setting of a status flag; see the sentry documentation for more.
+ *
+ * If the sentry status is good, the function tries to extract
+ * whatever data is appropriate for the type of the argument.
+ *
+ * The number of characters extracted is stored for later retrieval
+ * by gcount().
+ *
+ * If an exception is thrown during extraction, ios_base::badbit
+ * will be turned on in the stream's error state without causing an
+ * ios_base::failure to be thrown. The original exception will then
+ * be rethrown.
+ */
+ //@{
+ /**
+ * @brief Simple extraction.
+ * @return A character, or eof().
+ *
+ * Tries to extract a character. If none are available, sets failbit
+ * and returns traits::eof().
+ */
+ int_type
+ get();
+
+ /**
+ * @brief Simple extraction.
+ * @param c The character in which to store data.
+ * @return *this
+ *
+ * Tries to extract a character and store it in @a c. If none are
+ * available, sets failbit and returns traits::eof().
+ *
+ * @note This function is not overloaded on signed char and
+ * unsigned char.
+ */
+ __istream_type&
+ get(char_type& __c);
+
+ /**
+ * @brief Simple multiple-character extraction.
+ * @param s Pointer to an array.
+ * @param n Maximum number of characters to store in @a s.
+ * @param delim A "stop" character.
+ * @return *this
+ *
+ * Characters are extracted and stored into @a s until one of the
+ * following happens:
+ *
+ * - @c n-1 characters are stored
+ * - the input sequence reaches EOF
+ * - the next character equals @a delim, in which case the character
+ * is not extracted
+ *
+ * If no characters are stored, failbit is set in the stream's error
+ * state.
+ *
+ * In any case, a null character is stored into the next location in
+ * the array.
+ *
+ * @note This function is not overloaded on signed char and
+ * unsigned char.
+ */
+ __istream_type&
+ get(char_type* __s, streamsize __n, char_type __delim);
+
+ /**
+ * @brief Simple multiple-character extraction.
+ * @param s Pointer to an array.
+ * @param n Maximum number of characters to store in @a s.
+ * @return *this
+ *
+ * Returns @c get(s,n,widen('\n')).
+ */
+ __istream_type&
+ get(char_type* __s, streamsize __n)
+ { return this->get(__s, __n, this->widen('\n')); }
+
+ /**
+ * @brief Extraction into another streambuf.
+ * @param sb A streambuf in which to store data.
+ * @param delim A "stop" character.
+ * @return *this
+ *
+ * Characters are extracted and inserted into @a sb until one of the
+ * following happens:
+ *
+ * - the input sequence reaches EOF
+ * - insertion into the output buffer fails (in this case, the
+ * character that would have been inserted is not extracted)
+ * - the next character equals @a delim (in this case, the character
+ * is not extracted)
+ * - an exception occurs (and in this case is caught)
+ *
+ * If no characters are stored, failbit is set in the stream's error
+ * state.
+ */
+ __istream_type&
+ get(__streambuf_type& __sb, char_type __delim);
+
+ /**
+ * @brief Extraction into another streambuf.
+ * @param sb A streambuf in which to store data.
+ * @return *this
+ *
+ * Returns @c get(sb,widen('\n')).
+ */
+ __istream_type&
+ get(__streambuf_type& __sb)
+ { return this->get(__sb, this->widen('\n')); }
+
+ /**
+ * @brief String extraction.
+ * @param s A character array in which to store the data.
+ * @param n Maximum number of characters to extract.
+ * @param delim A "stop" character.
+ * @return *this
+ *
+ * Extracts and stores characters into @a s until one of the
+ * following happens. Note that these criteria are required to be
+ * tested in the order listed here, to allow an input line to exactly
+ * fill the @a s array without setting failbit.
+ *
+ * -# the input sequence reaches end-of-file, in which case eofbit
+ * is set in the stream error state
+ * -# the next character equals @c delim, in which case the character
+ * is extracted (and therefore counted in @c gcount()) but not stored
+ * -# @c n-1 characters are stored, in which case failbit is set
+ * in the stream error state
+ *
+ * If no characters are extracted, failbit is set. (An empty line of
+ * input should therefore not cause failbit to be set.)
+ *
+ * In any case, a null character is stored in the next location in
+ * the array.
+ */
+ __istream_type&
+ getline(char_type* __s, streamsize __n, char_type __delim);
+
+ /**
+ * @brief String extraction.
+ * @param s A character array in which to store the data.
+ * @param n Maximum number of characters to extract.
+ * @return *this
+ *
+ * Returns @c getline(s,n,widen('\n')).
+ */
+ __istream_type&
+ getline(char_type* __s, streamsize __n)
+ { return this->getline(__s, __n, this->widen('\n')); }
+
+ /**
+ * @brief Discarding characters
+ * @param n Number of characters to discard.
+ * @param delim A "stop" character.
+ * @return *this
+ *
+ * Extracts characters and throws them away until one of the
+ * following happens:
+ * - if @a n @c != @c std::numeric_limits<int>::max(), @a n
+ * characters are extracted
+ * - the input sequence reaches end-of-file
+ * - the next character equals @a delim (in this case, the character
+ * is extracted); note that this condition will never occur if
+ * @a delim equals @c traits::eof().
+ *
+ * NB: Provide three overloads, instead of the single function
+ * (with defaults) mandated by the Standard: this leads to a
+ * better performing implementation, while still conforming to
+ * the Standard.
+ */
+ __istream_type&
+ ignore();
+
+ __istream_type&
+ ignore(streamsize __n);
+
+ __istream_type&
+ ignore(streamsize __n, int_type __delim);
+
+ /**
+ * @brief Looking ahead in the stream
+ * @return The next character, or eof().
+ *
+ * If, after constructing the sentry object, @c good() is false,
+ * returns @c traits::eof(). Otherwise reads but does not extract
+ * the next input character.
+ */
+ int_type
+ peek();
+
+ /**
+ * @brief Extraction without delimiters.
+ * @param s A character array.
+ * @param n Maximum number of characters to store.
+ * @return *this
+ *
+ * If the stream state is @c good(), extracts characters and stores
+ * them into @a s until one of the following happens:
+ * - @a n characters are stored
+ * - the input sequence reaches end-of-file, in which case the error
+ * state is set to @c failbit|eofbit.
+ *
+ * @note This function is not overloaded on signed char and
+ * unsigned char.
+ */
+ __istream_type&
+ read(char_type* __s, streamsize __n);
+
+ /**
+ * @brief Extraction until the buffer is exhausted, but no more.
+ * @param s A character array.
+ * @param n Maximum number of characters to store.
+ * @return The number of characters extracted.
+ *
+ * Extracts characters and stores them into @a s depending on the
+ * number of characters remaining in the streambuf's buffer,
+ * @c rdbuf()->in_avail(), called @c A here:
+ * - if @c A @c == @c -1, sets eofbit and extracts no characters
+ * - if @c A @c == @c 0, extracts no characters
+ * - if @c A @c > @c 0, extracts @c min(A,n)
+ *
+ * The goal is to empty the current buffer, and to not request any
+ * more from the external input sequence controlled by the streambuf.
+ */
+ streamsize
+ readsome(char_type* __s, streamsize __n);
+
+ /**
+ * @brief Unextracting a single character.
+ * @param c The character to push back into the input stream.
+ * @return *this
+ *
+ * If @c rdbuf() is not null, calls @c rdbuf()->sputbackc(c).
+ *
+ * If @c rdbuf() is null or if @c sputbackc() fails, sets badbit in
+ * the error state.
+ *
+ * @note Since no characters are extracted, the next call to
+ * @c gcount() will return 0, as required by DR 60.
+ */
+ __istream_type&
+ putback(char_type __c);
+
+ /**
+ * @brief Unextracting the previous character.
+ * @return *this
+ *
+ * If @c rdbuf() is not null, calls @c rdbuf()->sungetc(c).
+ *
+ * If @c rdbuf() is null or if @c sungetc() fails, sets badbit in
+ * the error state.
+ *
+ * @note Since no characters are extracted, the next call to
+ * @c gcount() will return 0, as required by DR 60.
+ */
+ __istream_type&
+ unget();
+
+ /**
+ * @brief Synchronizing the stream buffer.
+ * @return 0 on success, -1 on failure
+ *
+ * If @c rdbuf() is a null pointer, returns -1.
+ *
+ * Otherwise, calls @c rdbuf()->pubsync(), and if that returns -1,
+ * sets badbit and returns -1.
+ *
+ * Otherwise, returns 0.
+ *
+ * @note This function does not count the number of characters
+ * extracted, if any, and therefore does not affect the next
+ * call to @c gcount().
+ */
+ int
+ sync();
+
+ /**
+ * @brief Getting the current read position.
+ * @return A file position object.
+ *
+ * If @c fail() is not false, returns @c pos_type(-1) to indicate
+ * failure. Otherwise returns @c rdbuf()->pubseekoff(0,cur,in).
+ *
+ * @note This function does not count the number of characters
+ * extracted, if any, and therefore does not affect the next
+ * call to @c gcount().
+ */
+ pos_type
+ tellg();
+
+ /**
+ * @brief Changing the current read position.
+ * @param pos A file position object.
+ * @return *this
+ *
+ * If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos). If
+ * that function fails, sets failbit.
+ *
+ * @note This function does not count the number of characters
+ * extracted, if any, and therefore does not affect the next
+ * call to @c gcount().
+ */
+ __istream_type&
+ seekg(pos_type);
+
+ /**
+ * @brief Changing the current read position.
+ * @param off A file offset object.
+ * @param dir The direction in which to seek.
+ * @return *this
+ *
+ * If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir).
+ * If that function fails, sets failbit.
+ *
+ * @note This function does not count the number of characters
+ * extracted, if any, and therefore does not affect the next
+ * call to @c gcount().
+ */
+ __istream_type&
+ seekg(off_type, ios_base::seekdir);
+ //@}
+
+ protected:
+ basic_istream()
+ : _M_gcount(streamsize(0))
+ { this->init(0); }
+
+ template<typename _ValueT>
+ __istream_type&
+ _M_extract(_ValueT& __v);
+ };
+
+ // Explicit specialization declarations, defined in src/istream.cc.
+ template<>
+ basic_istream<char>&
+ basic_istream<char>::
+ getline(char_type* __s, streamsize __n, char_type __delim);
+
+ template<>
+ basic_istream<char>&
+ basic_istream<char>::
+ ignore(streamsize __n);
+
+ template<>
+ basic_istream<char>&
+ basic_istream<char>::
+ ignore(streamsize __n, int_type __delim);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ basic_istream<wchar_t>&
+ basic_istream<wchar_t>::
+ getline(char_type* __s, streamsize __n, char_type __delim);
+
+ template<>
+ basic_istream<wchar_t>&
+ basic_istream<wchar_t>::
+ ignore(streamsize __n);
+
+ template<>
+ basic_istream<wchar_t>&
+ basic_istream<wchar_t>::
+ ignore(streamsize __n, int_type __delim);
+#endif
+
+ /**
+ * @brief Performs setup work for input streams.
+ *
+ * Objects of this class are created before all of the standard
+ * extractors are run. It is responsible for "exception-safe prefix and
+ * suffix operations," although only prefix actions are currently required
+ * by the standard.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_istream<_CharT, _Traits>::sentry
+ {
+ public:
+ /// Easy access to dependant types.
+ typedef _Traits traits_type;
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::__ctype_type __ctype_type;
+ typedef typename _Traits::int_type __int_type;
+
+ /**
+ * @brief The constructor performs all the work.
+ * @param is The input stream to guard.
+ * @param noskipws Whether to consume whitespace or not.
+ *
+ * If the stream state is good (@a is.good() is true), then the
+ * following actions are performed, otherwise the sentry state is
+ * false ("not okay") and failbit is set in the stream state.
+ *
+ * The sentry's preparatory actions are:
+ *
+ * -# if the stream is tied to an output stream, @c is.tie()->flush()
+ * is called to synchronize the output sequence
+ * -# if @a noskipws is false, and @c ios_base::skipws is set in
+ * @c is.flags(), the sentry extracts and discards whitespace
+ * characters from the stream. The currently imbued locale is
+ * used to determine whether each character is whitespace.
+ *
+ * If the stream state is still good, then the sentry state becomes
+ * true ("okay").
+ */
+ explicit
+ sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
+
+ /**
+ * @brief Quick status checking.
+ * @return The sentry state.
+ *
+ * For ease of use, sentries may be converted to booleans. The
+ * return value is that of the sentry state (true == okay).
+ */
+ operator bool() const
+ { return _M_ok; }
+
+ private:
+ bool _M_ok;
+ };
+
+ // [27.6.1.2.3] character extraction templates
+ //@{
+ /**
+ * @brief Character extractors
+ * @param in An input stream.
+ * @param c A character reference.
+ * @return in
+ *
+ * Behaves like one of the formatted arithmetic extractors described in
+ * std::basic_istream. After constructing a sentry object with good
+ * status, this function extracts a character (if one is available) and
+ * stores it in @a c. Otherwise, sets failbit in the input stream.
+ */
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
+
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
+ { return (__in >> reinterpret_cast<char&>(__c)); }
+
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
+ { return (__in >> reinterpret_cast<char&>(__c)); }
+ //@}
+
+ //@{
+ /**
+ * @brief Character string extractors
+ * @param in An input stream.
+ * @param s A pointer to a character array.
+ * @return in
+ *
+ * Behaves like one of the formatted arithmetic extractors described in
+ * std::basic_istream. After constructing a sentry object with good
+ * status, this function extracts up to @c n characters and stores them
+ * into the array starting at @a s. @c n is defined as:
+ *
+ * - if @c width() is greater than zero, @c n is width()
+ * - otherwise @c n is "the number of elements of the largest array of
+ * @c char_type that can store a terminating @c eos." [27.6.1.2.3]/6
+ *
+ * Characters are extracted and stored until one of the following happens:
+ * - @c n-1 characters are stored
+ * - EOF is reached
+ * - the next character is whitespace according to the current locale
+ * - the next character is a null byte (i.e., @c charT() )
+ *
+ * @c width(0) is then called for the input stream.
+ *
+ * If no characters are extracted, sets failbit.
+ */
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
+
+ // Explicit specialization declaration, defined in src/istream.cc.
+ template<>
+ basic_istream<char>&
+ operator>>(basic_istream<char>& __in, char* __s);
+
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
+ { return (__in >> reinterpret_cast<char*>(__s)); }
+
+ template<class _Traits>
+ inline basic_istream<char, _Traits>&
+ operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
+ { return (__in >> reinterpret_cast<char*>(__s)); }
+ //@}
+
+ // 27.6.1.5 Template class basic_iostream
+ /**
+ * @brief Merging istream and ostream capabilities.
+ * @ingroup io
+ *
+ * This class multiply inherits from the input and output stream classes
+ * simply to provide a single interface.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_iostream
+ : public basic_istream<_CharT, _Traits>,
+ public basic_ostream<_CharT, _Traits>
+ {
+ public:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 271. basic_iostream missing typedefs
+ // Types (inherited):
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ // Non-standard Types:
+ typedef basic_istream<_CharT, _Traits> __istream_type;
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+
+ /**
+ * @brief Constructor does nothing.
+ *
+ * Both of the parent classes are initialized with the same
+ * streambuf pointer passed to this constructor.
+ */
+ explicit
+ basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
+ : __istream_type(__sb), __ostream_type(__sb) { }
+
+ /**
+ * @brief Destructor does nothing.
+ */
+ virtual
+ ~basic_iostream() { }
+
+ protected:
+ basic_iostream()
+ : __istream_type(), __ostream_type() { }
+ };
+
+ // [27.6.1.4] standard basic_istream manipulators
+ /**
+ * @brief Quick and easy way to eat whitespace
+ *
+ * This manipulator extracts whitespace characters, stopping when the
+ * next character is non-whitespace, or when the input sequence is empty.
+ * If the sequence is empty, @c eofbit is set in the stream, but not
+ * @c failbit.
+ *
+ * The current locale is used to distinguish whitespace characters.
+ *
+ * Example:
+ * @code
+ * MyClass mc;
+ *
+ * std::cin >> std::ws >> mc;
+ * @endcode
+ * will skip leading whitespace before calling operator>> on cin and your
+ * object. Note that the same effect can be achieved by creating a
+ * std::basic_istream::sentry inside your definition of operator>>.
+ */
+ template<typename _CharT, typename _Traits>
+ basic_istream<_CharT, _Traits>&
+ ws(basic_istream<_CharT, _Traits>& __is);
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/istream.tcc>
+#endif
+
+#endif /* _GLIBCXX_ISTREAM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/iterator b/6/sources/cxx-stl/gnu-libstdc++/include/iterator
new file mode 100644
index 0000000..a15bdf9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/iterator
@@ -0,0 +1,70 @@
+// <iterator> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/iterator
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_ITERATOR
+#define _GLIBCXX_ITERATOR 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+#include <ostream>
+#include <istream>
+#include <bits/stream_iterator.h>
+#include <bits/streambuf_iterator.h>
+
+#endif /* _GLIBCXX_ITERATOR */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/limits b/6/sources/cxx-stl/gnu-libstdc++/include/limits
new file mode 100644
index 0000000..41bf806
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/limits
@@ -0,0 +1,1256 @@
+// The template and inlines for the numeric_limits classes. -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+// 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file limits
+ * This is a Standard C++ Library header.
+ */
+
+// Note: this is not a conforming implementation.
+// Written by Gabriel Dos Reis <gdr@codesourcery.com>
+
+//
+// ISO 14882:1998
+// 18.2.1
+//
+
+#ifndef _GLIBCXX_NUMERIC_LIMITS
+#define _GLIBCXX_NUMERIC_LIMITS 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+//
+// The numeric_limits<> traits document implementation-defined aspects
+// of fundamental arithmetic data types (integers and floating points).
+// From Standard C++ point of view, there are 13 such types:
+// * integers
+// bool (1)
+// char, signed char, unsigned char (3)
+// short, unsigned short (2)
+// int, unsigned (2)
+// long, unsigned long (2)
+//
+// * floating points
+// float (1)
+// double (1)
+// long double (1)
+//
+// GNU C++ understands (where supported by the host C-library)
+// * integer
+// long long, unsigned long long (2)
+//
+// which brings us to 15 fundamental arithmetic data types in GNU C++.
+//
+//
+// Since a numeric_limits<> is a bit tricky to get right, we rely on
+// an interface composed of macros which should be defined in config/os
+// or config/cpu when they differ from the generic (read arbitrary)
+// definitions given here.
+//
+
+// These values can be overridden in the target configuration file.
+// The default values are appropriate for many 32-bit targets.
+
+// GCC only intrinsically supports modulo integral types. The only remaining
+// integral exceptional values is division by zero. Only targets that do not
+// signal division by zero in some "hard to ignore" way should use false.
+#ifndef __glibcxx_integral_traps
+# define __glibcxx_integral_traps true
+#endif
+
+// float
+//
+
+// Default values. Should be overridden in configuration files if necessary.
+
+#ifndef __glibcxx_float_has_denorm_loss
+# define __glibcxx_float_has_denorm_loss false
+#endif
+#ifndef __glibcxx_float_traps
+# define __glibcxx_float_traps false
+#endif
+#ifndef __glibcxx_float_tinyness_before
+# define __glibcxx_float_tinyness_before false
+#endif
+
+// double
+
+// Default values. Should be overridden in configuration files if necessary.
+
+#ifndef __glibcxx_double_has_denorm_loss
+# define __glibcxx_double_has_denorm_loss false
+#endif
+#ifndef __glibcxx_double_traps
+# define __glibcxx_double_traps false
+#endif
+#ifndef __glibcxx_double_tinyness_before
+# define __glibcxx_double_tinyness_before false
+#endif
+
+// long double
+
+// Default values. Should be overridden in configuration files if necessary.
+
+#ifndef __glibcxx_long_double_has_denorm_loss
+# define __glibcxx_long_double_has_denorm_loss false
+#endif
+#ifndef __glibcxx_long_double_traps
+# define __glibcxx_long_double_traps false
+#endif
+#ifndef __glibcxx_long_double_tinyness_before
+# define __glibcxx_long_double_tinyness_before false
+#endif
+
+// You should not need to define any macros below this point.
+
+#define __glibcxx_signed(T) ((T)(-1) < 0)
+
+#define __glibcxx_min(T) \
+ (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0)
+
+#define __glibcxx_max(T) \
+ (__glibcxx_signed (T) ? \
+ (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)
+
+#define __glibcxx_digits(T) \
+ (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))
+
+// The fraction 643/2136 approximates log10(2) to 7 significant digits.
+#define __glibcxx_digits10(T) \
+ (__glibcxx_digits (T) * 643 / 2136)
+
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @brief Describes the rounding style for floating-point types.
+ *
+ * This is used in the std::numeric_limits class.
+ */
+ enum float_round_style
+ {
+ round_indeterminate = -1, ///< Self-explanatory.
+ round_toward_zero = 0, ///< Self-explanatory.
+ round_to_nearest = 1, ///< To the nearest representable value.
+ round_toward_infinity = 2, ///< Self-explanatory.
+ round_toward_neg_infinity = 3 ///< Self-explanatory.
+ };
+
+ /**
+ * @brief Describes the denormalization for floating-point types.
+ *
+ * These values represent the presence or absence of a variable number
+ * of exponent bits. This type is used in the std::numeric_limits class.
+ */
+ enum float_denorm_style
+ {
+ /// Indeterminate at compile time whether denormalized values are allowed.
+ denorm_indeterminate = -1,
+ /// The type does not allow denormalized values.
+ denorm_absent = 0,
+ /// The type allows denormalized values.
+ denorm_present = 1
+ };
+
+ /**
+ * @brief Part of std::numeric_limits.
+ *
+ * The @c static @c const members are usable as integral constant
+ * expressions.
+ *
+ * @note This is a separate class for purposes of efficiency; you
+ * should only access these members as part of an instantiation
+ * of the std::numeric_limits class.
+ */
+ struct __numeric_limits_base
+ {
+ /** This will be true for all fundamental types (which have
+ specializations), and false for everything else. */
+ static const bool is_specialized = false;
+
+ /** The number of @c radix digits that be represented without change: for
+ integer types, the number of non-sign bits in the mantissa; for
+ floating types, the number of @c radix digits in the mantissa. */
+ static const int digits = 0;
+ /** The number of base 10 digits that can be represented without change. */
+ static const int digits10 = 0;
+ /** True if the type is signed. */
+ static const bool is_signed = false;
+ /** True if the type is integer.
+ * Is this supposed to be "if the type is integral"?
+ */
+ static const bool is_integer = false;
+ /** True if the type uses an exact representation. "All integer types are
+ exact, but not all exact types are integer. For example, rational and
+ fixed-exponent representations are exact but not integer."
+ [18.2.1.2]/15 */
+ static const bool is_exact = false;
+ /** For integer types, specifies the base of the representation. For
+ floating types, specifies the base of the exponent representation. */
+ static const int radix = 0;
+
+ /** The minimum negative integer such that @c radix raised to the power of
+ (one less than that integer) is a normalized floating point number. */
+ static const int min_exponent = 0;
+ /** The minimum negative integer such that 10 raised to that power is in
+ the range of normalized floating point numbers. */
+ static const int min_exponent10 = 0;
+ /** The maximum positive integer such that @c radix raised to the power of
+ (one less than that integer) is a representable finite floating point
+ number. */
+ static const int max_exponent = 0;
+ /** The maximum positive integer such that 10 raised to that power is in
+ the range of representable finite floating point numbers. */
+ static const int max_exponent10 = 0;
+
+ /** True if the type has a representation for positive infinity. */
+ static const bool has_infinity = false;
+ /** True if the type has a representation for a quiet (non-signaling)
+ "Not a Number." */
+ static const bool has_quiet_NaN = false;
+ /** True if the type has a representation for a signaling
+ "Not a Number." */
+ static const bool has_signaling_NaN = false;
+ /** See std::float_denorm_style for more information. */
+ static const float_denorm_style has_denorm = denorm_absent;
+ /** "True if loss of accuracy is detected as a denormalization loss,
+ rather than as an inexact result." [18.2.1.2]/42 */
+ static const bool has_denorm_loss = false;
+
+ /** True if-and-only-if the type adheres to the IEC 559 standard, also
+ known as IEEE 754. (Only makes sense for floating point types.) */
+ static const bool is_iec559 = false;
+ /** "True if the set of values representable by the type is finite. All
+ built-in types are bounded, this member would be false for arbitrary
+ precision types." [18.2.1.2]/54 */
+ static const bool is_bounded = false;
+ /** True if the type is @e modulo, that is, if it is possible to add two
+ positive numbers and have a result that wraps around to a third number
+ that is less. Typically false for floating types, true for unsigned
+ integers, and true for signed integers. */
+ static const bool is_modulo = false;
+
+ /** True if trapping is implemented for this type. */
+ static const bool traps = false;
+ /** True if tininess is detected before rounding. (see IEC 559) */
+ static const bool tinyness_before = false;
+ /** See std::float_round_style for more information. This is only
+ meaningful for floating types; integer types will all be
+ round_toward_zero. */
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /**
+ * @brief Properties of fundamental types.
+ *
+ * This class allows a program to obtain information about the
+ * representation of a fundamental type on a given platform. For
+ * non-fundamental types, the functions will return 0 and the data
+ * members will all be @c false.
+ *
+ * _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
+ * noted, but not incorporated in this documented (yet).
+ */
+ template<typename _Tp>
+ struct numeric_limits : public __numeric_limits_base
+ {
+ /** The minimum finite value, or for floating types with
+ denormalization, the minimum positive normalized value. */
+ static _Tp min() throw() { return static_cast<_Tp>(0); }
+ /** The maximum finite value. */
+ static _Tp max() throw() { return static_cast<_Tp>(0); }
+ /** The @e machine @e epsilon: the difference between 1 and the least
+ value greater than 1 that is representable. */
+ static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
+ /** The maximum rounding error measurement (see LIA-1). */
+ static _Tp round_error() throw() { return static_cast<_Tp>(0); }
+ /** The representation of positive infinity, if @c has_infinity. */
+ static _Tp infinity() throw() { return static_cast<_Tp>(0); }
+ /** The representation of a quiet "Not a Number," if @c has_quiet_NaN. */
+ static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
+ /** The representation of a signaling "Not a Number," if
+ @c has_signaling_NaN. */
+ static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
+ /** The minimum positive denormalized value. For types where
+ @c has_denorm is false, this is the minimum positive normalized
+ value. */
+ static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
+ };
+
+ // Now there follow 15 explicit specializations. Yes, 15. Make sure
+ // you get the count right.
+
+ /// numeric_limits<bool> specialization.
+ template<>
+ struct numeric_limits<bool>
+ {
+ static const bool is_specialized = true;
+
+ static bool min() throw()
+ { return false; }
+ static bool max() throw()
+ { return true; }
+
+ static const int digits = 1;
+ static const int digits10 = 0;
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static bool epsilon() throw()
+ { return false; }
+ static bool round_error() throw()
+ { return false; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static bool infinity() throw()
+ { return false; }
+ static bool quiet_NaN() throw()
+ { return false; }
+ static bool signaling_NaN() throw()
+ { return false; }
+ static bool denorm_min() throw()
+ { return false; }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ // It is not clear what it means for a boolean type to trap.
+ // This is a DR on the LWG issue list. Here, I use integer
+ // promotion semantics.
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<char> specialization.
+ template<>
+ struct numeric_limits<char>
+ {
+ static const bool is_specialized = true;
+
+ static char min() throw()
+ { return __glibcxx_min(char); }
+ static char max() throw()
+ { return __glibcxx_max(char); }
+
+ static const int digits = __glibcxx_digits (char);
+ static const int digits10 = __glibcxx_digits10 (char);
+ static const bool is_signed = __glibcxx_signed (char);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static char epsilon() throw()
+ { return 0; }
+ static char round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static char infinity() throw()
+ { return char(); }
+ static char quiet_NaN() throw()
+ { return char(); }
+ static char signaling_NaN() throw()
+ { return char(); }
+ static char denorm_min() throw()
+ { return static_cast<char>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<signed char> specialization.
+ template<>
+ struct numeric_limits<signed char>
+ {
+ static const bool is_specialized = true;
+
+ static signed char min() throw()
+ { return -__SCHAR_MAX__ - 1; }
+ static signed char max() throw()
+ { return __SCHAR_MAX__; }
+
+ static const int digits = __glibcxx_digits (signed char);
+ static const int digits10 = __glibcxx_digits10 (signed char);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static signed char epsilon() throw()
+ { return 0; }
+ static signed char round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static signed char infinity() throw()
+ { return static_cast<signed char>(0); }
+ static signed char quiet_NaN() throw()
+ { return static_cast<signed char>(0); }
+ static signed char signaling_NaN() throw()
+ { return static_cast<signed char>(0); }
+ static signed char denorm_min() throw()
+ { return static_cast<signed char>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<unsigned char> specialization.
+ template<>
+ struct numeric_limits<unsigned char>
+ {
+ static const bool is_specialized = true;
+
+ static unsigned char min() throw()
+ { return 0; }
+ static unsigned char max() throw()
+ { return __SCHAR_MAX__ * 2U + 1; }
+
+ static const int digits = __glibcxx_digits (unsigned char);
+ static const int digits10 = __glibcxx_digits10 (unsigned char);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned char epsilon() throw()
+ { return 0; }
+ static unsigned char round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static unsigned char infinity() throw()
+ { return static_cast<unsigned char>(0); }
+ static unsigned char quiet_NaN() throw()
+ { return static_cast<unsigned char>(0); }
+ static unsigned char signaling_NaN() throw()
+ { return static_cast<unsigned char>(0); }
+ static unsigned char denorm_min() throw()
+ { return static_cast<unsigned char>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<wchar_t> specialization.
+ template<>
+ struct numeric_limits<wchar_t>
+ {
+ static const bool is_specialized = true;
+
+ static wchar_t min() throw()
+ { return __glibcxx_min (wchar_t); }
+ static wchar_t max() throw()
+ { return __glibcxx_max (wchar_t); }
+
+ static const int digits = __glibcxx_digits (wchar_t);
+ static const int digits10 = __glibcxx_digits10 (wchar_t);
+ static const bool is_signed = __glibcxx_signed (wchar_t);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static wchar_t epsilon() throw()
+ { return 0; }
+ static wchar_t round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static wchar_t infinity() throw()
+ { return wchar_t(); }
+ static wchar_t quiet_NaN() throw()
+ { return wchar_t(); }
+ static wchar_t signaling_NaN() throw()
+ { return wchar_t(); }
+ static wchar_t denorm_min() throw()
+ { return wchar_t(); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// numeric_limits<char16_t> specialization.
+ template<>
+ struct numeric_limits<char16_t>
+ {
+ static const bool is_specialized = true;
+
+ static char16_t min() throw()
+ { return __glibcxx_min (char16_t); }
+ static char16_t max() throw()
+ { return __glibcxx_max (char16_t); }
+
+ static const int digits = __glibcxx_digits (char16_t);
+ static const int digits10 = __glibcxx_digits10 (char16_t);
+ static const bool is_signed = __glibcxx_signed (char16_t);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static char16_t epsilon() throw()
+ { return 0; }
+ static char16_t round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static char16_t infinity() throw()
+ { return char16_t(); }
+ static char16_t quiet_NaN() throw()
+ { return char16_t(); }
+ static char16_t signaling_NaN() throw()
+ { return char16_t(); }
+ static char16_t denorm_min() throw()
+ { return char16_t(); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<char32_t> specialization.
+ template<>
+ struct numeric_limits<char32_t>
+ {
+ static const bool is_specialized = true;
+
+ static char32_t min() throw()
+ { return __glibcxx_min (char32_t); }
+ static char32_t max() throw()
+ { return __glibcxx_max (char32_t); }
+
+ static const int digits = __glibcxx_digits (char32_t);
+ static const int digits10 = __glibcxx_digits10 (char32_t);
+ static const bool is_signed = __glibcxx_signed (char32_t);
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static char32_t epsilon() throw()
+ { return 0; }
+ static char32_t round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static char32_t infinity() throw()
+ { return char32_t(); }
+ static char32_t quiet_NaN() throw()
+ { return char32_t(); }
+ static char32_t signaling_NaN() throw()
+ { return char32_t(); }
+ static char32_t denorm_min() throw()
+ { return char32_t(); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+#endif
+
+ /// numeric_limits<short> specialization.
+ template<>
+ struct numeric_limits<short>
+ {
+ static const bool is_specialized = true;
+
+ static short min() throw()
+ { return -__SHRT_MAX__ - 1; }
+ static short max() throw()
+ { return __SHRT_MAX__; }
+
+ static const int digits = __glibcxx_digits (short);
+ static const int digits10 = __glibcxx_digits10 (short);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static short epsilon() throw()
+ { return 0; }
+ static short round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static short infinity() throw()
+ { return short(); }
+ static short quiet_NaN() throw()
+ { return short(); }
+ static short signaling_NaN() throw()
+ { return short(); }
+ static short denorm_min() throw()
+ { return short(); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<unsigned short> specialization.
+ template<>
+ struct numeric_limits<unsigned short>
+ {
+ static const bool is_specialized = true;
+
+ static unsigned short min() throw()
+ { return 0; }
+ static unsigned short max() throw()
+ { return __SHRT_MAX__ * 2U + 1; }
+
+ static const int digits = __glibcxx_digits (unsigned short);
+ static const int digits10 = __glibcxx_digits10 (unsigned short);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned short epsilon() throw()
+ { return 0; }
+ static unsigned short round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static unsigned short infinity() throw()
+ { return static_cast<unsigned short>(0); }
+ static unsigned short quiet_NaN() throw()
+ { return static_cast<unsigned short>(0); }
+ static unsigned short signaling_NaN() throw()
+ { return static_cast<unsigned short>(0); }
+ static unsigned short denorm_min() throw()
+ { return static_cast<unsigned short>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<int> specialization.
+ template<>
+ struct numeric_limits<int>
+ {
+ static const bool is_specialized = true;
+
+ static int min() throw()
+ { return -__INT_MAX__ - 1; }
+ static int max() throw()
+ { return __INT_MAX__; }
+
+ static const int digits = __glibcxx_digits (int);
+ static const int digits10 = __glibcxx_digits10 (int);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static int epsilon() throw()
+ { return 0; }
+ static int round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static int infinity() throw()
+ { return static_cast<int>(0); }
+ static int quiet_NaN() throw()
+ { return static_cast<int>(0); }
+ static int signaling_NaN() throw()
+ { return static_cast<int>(0); }
+ static int denorm_min() throw()
+ { return static_cast<int>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<unsigned int> specialization.
+ template<>
+ struct numeric_limits<unsigned int>
+ {
+ static const bool is_specialized = true;
+
+ static unsigned int min() throw()
+ { return 0; }
+ static unsigned int max() throw()
+ { return __INT_MAX__ * 2U + 1; }
+
+ static const int digits = __glibcxx_digits (unsigned int);
+ static const int digits10 = __glibcxx_digits10 (unsigned int);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned int epsilon() throw()
+ { return 0; }
+ static unsigned int round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static unsigned int infinity() throw()
+ { return static_cast<unsigned int>(0); }
+ static unsigned int quiet_NaN() throw()
+ { return static_cast<unsigned int>(0); }
+ static unsigned int signaling_NaN() throw()
+ { return static_cast<unsigned int>(0); }
+ static unsigned int denorm_min() throw()
+ { return static_cast<unsigned int>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<long> specialization.
+ template<>
+ struct numeric_limits<long>
+ {
+ static const bool is_specialized = true;
+
+ static long min() throw()
+ { return -__LONG_MAX__ - 1; }
+ static long max() throw()
+ { return __LONG_MAX__; }
+
+ static const int digits = __glibcxx_digits (long);
+ static const int digits10 = __glibcxx_digits10 (long);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static long epsilon() throw()
+ { return 0; }
+ static long round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static long infinity() throw()
+ { return static_cast<long>(0); }
+ static long quiet_NaN() throw()
+ { return static_cast<long>(0); }
+ static long signaling_NaN() throw()
+ { return static_cast<long>(0); }
+ static long denorm_min() throw()
+ { return static_cast<long>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<unsigned long> specialization.
+ template<>
+ struct numeric_limits<unsigned long>
+ {
+ static const bool is_specialized = true;
+
+ static unsigned long min() throw()
+ { return 0; }
+ static unsigned long max() throw()
+ { return __LONG_MAX__ * 2UL + 1; }
+
+ static const int digits = __glibcxx_digits (unsigned long);
+ static const int digits10 = __glibcxx_digits10 (unsigned long);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned long epsilon() throw()
+ { return 0; }
+ static unsigned long round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static unsigned long infinity() throw()
+ { return static_cast<unsigned long>(0); }
+ static unsigned long quiet_NaN() throw()
+ { return static_cast<unsigned long>(0); }
+ static unsigned long signaling_NaN() throw()
+ { return static_cast<unsigned long>(0); }
+ static unsigned long denorm_min() throw()
+ { return static_cast<unsigned long>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<long long> specialization.
+ template<>
+ struct numeric_limits<long long>
+ {
+ static const bool is_specialized = true;
+
+ static long long min() throw()
+ { return -__LONG_LONG_MAX__ - 1; }
+ static long long max() throw()
+ { return __LONG_LONG_MAX__; }
+
+ static const int digits = __glibcxx_digits (long long);
+ static const int digits10 = __glibcxx_digits10 (long long);
+ static const bool is_signed = true;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static long long epsilon() throw()
+ { return 0; }
+ static long long round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static long long infinity() throw()
+ { return static_cast<long long>(0); }
+ static long long quiet_NaN() throw()
+ { return static_cast<long long>(0); }
+ static long long signaling_NaN() throw()
+ { return static_cast<long long>(0); }
+ static long long denorm_min() throw()
+ { return static_cast<long long>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<unsigned long long> specialization.
+ template<>
+ struct numeric_limits<unsigned long long>
+ {
+ static const bool is_specialized = true;
+
+ static unsigned long long min() throw()
+ { return 0; }
+ static unsigned long long max() throw()
+ { return __LONG_LONG_MAX__ * 2ULL + 1; }
+
+ static const int digits = __glibcxx_digits (unsigned long long);
+ static const int digits10 = __glibcxx_digits10 (unsigned long long);
+ static const bool is_signed = false;
+ static const bool is_integer = true;
+ static const bool is_exact = true;
+ static const int radix = 2;
+ static unsigned long long epsilon() throw()
+ { return 0; }
+ static unsigned long long round_error() throw()
+ { return 0; }
+
+ static const int min_exponent = 0;
+ static const int min_exponent10 = 0;
+ static const int max_exponent = 0;
+ static const int max_exponent10 = 0;
+
+ static const bool has_infinity = false;
+ static const bool has_quiet_NaN = false;
+ static const bool has_signaling_NaN = false;
+ static const float_denorm_style has_denorm = denorm_absent;
+ static const bool has_denorm_loss = false;
+
+ static unsigned long long infinity() throw()
+ { return static_cast<unsigned long long>(0); }
+ static unsigned long long quiet_NaN() throw()
+ { return static_cast<unsigned long long>(0); }
+ static unsigned long long signaling_NaN() throw()
+ { return static_cast<unsigned long long>(0); }
+ static unsigned long long denorm_min() throw()
+ { return static_cast<unsigned long long>(0); }
+
+ static const bool is_iec559 = false;
+ static const bool is_bounded = true;
+ static const bool is_modulo = true;
+
+ static const bool traps = __glibcxx_integral_traps;
+ static const bool tinyness_before = false;
+ static const float_round_style round_style = round_toward_zero;
+ };
+
+ /// numeric_limits<float> specialization.
+ template<>
+ struct numeric_limits<float>
+ {
+ static const bool is_specialized = true;
+
+ static float min() throw()
+ { return __FLT_MIN__; }
+ static float max() throw()
+ { return __FLT_MAX__; }
+
+ static const int digits = __FLT_MANT_DIG__;
+ static const int digits10 = __FLT_DIG__;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ static float epsilon() throw()
+ { return __FLT_EPSILON__; }
+ static float round_error() throw()
+ { return 0.5F; }
+
+ static const int min_exponent = __FLT_MIN_EXP__;
+ static const int min_exponent10 = __FLT_MIN_10_EXP__;
+ static const int max_exponent = __FLT_MAX_EXP__;
+ static const int max_exponent10 = __FLT_MAX_10_EXP__;
+
+ static const bool has_infinity = __FLT_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss = __glibcxx_float_has_denorm_loss;
+
+ static float infinity() throw()
+ { return __builtin_huge_valf (); }
+ static float quiet_NaN() throw()
+ { return __builtin_nanf (""); }
+ static float signaling_NaN() throw()
+ { return __builtin_nansf (""); }
+ static float denorm_min() throw()
+ { return __FLT_DENORM_MIN__; }
+
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = __glibcxx_float_traps;
+ static const bool tinyness_before = __glibcxx_float_tinyness_before;
+ static const float_round_style round_style = round_to_nearest;
+ };
+
+#undef __glibcxx_float_has_denorm_loss
+#undef __glibcxx_float_traps
+#undef __glibcxx_float_tinyness_before
+
+ /// numeric_limits<double> specialization.
+ template<>
+ struct numeric_limits<double>
+ {
+ static const bool is_specialized = true;
+
+ static double min() throw()
+ { return __DBL_MIN__; }
+ static double max() throw()
+ { return __DBL_MAX__; }
+
+ static const int digits = __DBL_MANT_DIG__;
+ static const int digits10 = __DBL_DIG__;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ static double epsilon() throw()
+ { return __DBL_EPSILON__; }
+ static double round_error() throw()
+ { return 0.5; }
+
+ static const int min_exponent = __DBL_MIN_EXP__;
+ static const int min_exponent10 = __DBL_MIN_10_EXP__;
+ static const int max_exponent = __DBL_MAX_EXP__;
+ static const int max_exponent10 = __DBL_MAX_10_EXP__;
+
+ static const bool has_infinity = __DBL_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss = __glibcxx_double_has_denorm_loss;
+
+ static double infinity() throw()
+ { return __builtin_huge_val(); }
+ static double quiet_NaN() throw()
+ { return __builtin_nan (""); }
+ static double signaling_NaN() throw()
+ { return __builtin_nans (""); }
+ static double denorm_min() throw()
+ { return __DBL_DENORM_MIN__; }
+
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = __glibcxx_double_traps;
+ static const bool tinyness_before = __glibcxx_double_tinyness_before;
+ static const float_round_style round_style = round_to_nearest;
+ };
+
+#undef __glibcxx_double_has_denorm_loss
+#undef __glibcxx_double_traps
+#undef __glibcxx_double_tinyness_before
+
+ /// numeric_limits<long double> specialization.
+ template<>
+ struct numeric_limits<long double>
+ {
+ static const bool is_specialized = true;
+
+ static long double min() throw()
+ { return __LDBL_MIN__; }
+ static long double max() throw()
+ { return __LDBL_MAX__; }
+
+ static const int digits = __LDBL_MANT_DIG__;
+ static const int digits10 = __LDBL_DIG__;
+ static const bool is_signed = true;
+ static const bool is_integer = false;
+ static const bool is_exact = false;
+ static const int radix = __FLT_RADIX__;
+ static long double epsilon() throw()
+ { return __LDBL_EPSILON__; }
+ static long double round_error() throw()
+ { return 0.5L; }
+
+ static const int min_exponent = __LDBL_MIN_EXP__;
+ static const int min_exponent10 = __LDBL_MIN_10_EXP__;
+ static const int max_exponent = __LDBL_MAX_EXP__;
+ static const int max_exponent10 = __LDBL_MAX_10_EXP__;
+
+ static const bool has_infinity = __LDBL_HAS_INFINITY__;
+ static const bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
+ static const bool has_signaling_NaN = has_quiet_NaN;
+ static const float_denorm_style has_denorm
+ = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
+ static const bool has_denorm_loss
+ = __glibcxx_long_double_has_denorm_loss;
+
+ static long double infinity() throw()
+ { return __builtin_huge_vall (); }
+ static long double quiet_NaN() throw()
+ { return __builtin_nanl (""); }
+ static long double signaling_NaN() throw()
+ { return __builtin_nansl (""); }
+ static long double denorm_min() throw()
+ { return __LDBL_DENORM_MIN__; }
+
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
+ static const bool is_bounded = true;
+ static const bool is_modulo = false;
+
+ static const bool traps = __glibcxx_long_double_traps;
+ static const bool tinyness_before = __glibcxx_long_double_tinyness_before;
+ static const float_round_style round_style = round_to_nearest;
+ };
+
+#undef __glibcxx_long_double_has_denorm_loss
+#undef __glibcxx_long_double_traps
+#undef __glibcxx_long_double_tinyness_before
+
+_GLIBCXX_END_NAMESPACE
+
+#undef __glibcxx_signed
+#undef __glibcxx_min
+#undef __glibcxx_max
+#undef __glibcxx_digits
+#undef __glibcxx_digits10
+
+#endif // _GLIBCXX_NUMERIC_LIMITS
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/list b/6/sources/cxx-stl/gnu-libstdc++/include/list
new file mode 100644
index 0000000..d199802
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/list
@@ -0,0 +1,74 @@
+// <list> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/list
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_LIST
+#define _GLIBCXX_LIST 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_list.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/list.tcc>
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/list>
+#endif
+
+#endif /* _GLIBCXX_LIST */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/locale b/6/sources/cxx-stl/gnu-libstdc++/include/locale
new file mode 100644
index 0000000..3504b77
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/locale
@@ -0,0 +1,45 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+/** @file locale
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_LOCALE
+#define _GLIBCXX_LOCALE 1
+
+#pragma GCC system_header
+
+#include <bits/localefwd.h>
+#include <bits/locale_classes.h>
+#include <bits/locale_facets.h>
+#include <bits/locale_facets_nonio.h>
+
+#endif /* _GLIBCXX_LOCALE */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/map b/6/sources/cxx-stl/gnu-libstdc++/include/map
new file mode 100644
index 0000000..159bfb3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/map
@@ -0,0 +1,68 @@
+// <map> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/map
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_MAP
+#define _GLIBCXX_MAP 1
+
+#pragma GCC system_header
+
+#include <bits/stl_tree.h>
+#include <bits/stl_map.h>
+#include <bits/stl_multimap.h>
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/map>
+#endif
+
+#endif /* _GLIBCXX_MAP */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/memory b/6/sources/cxx-stl/gnu-libstdc++/include/memory
new file mode 100644
index 0000000..9defd48
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/memory
@@ -0,0 +1,100 @@
+// <memory> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ * Copyright (c) 1997-1999
+ * 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.
+ *
+ */
+
+/** @file include/memory
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_MEMORY
+#define _GLIBCXX_MEMORY 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_tempbuf.h>
+#include <bits/stl_raw_storage_iter.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# include <exception> // std::exception
+# include <typeinfo> // std::type_info in get_deleter
+# include <iosfwd> // std::basic_ostream
+# include <ext/atomicity.h>
+# include <ext/concurrence.h>
+# include <bits/functexcept.h>
+# include <bits/stl_function.h> // std::less
+# include <bits/unique_ptr.h>
+# include <debug/debug.h>
+# include <type_traits>
+# include <functional>
+# if _GLIBCXX_DEPRECATED
+# include <backward/auto_ptr.h>
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <bits/shared_ptr.h>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <bits/shared_ptr.h>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+#else
+# include <backward/auto_ptr.h>
+#endif
+
+/**
+ * @defgroup memory Memory
+ * @ingroup utilities
+ *
+ * Components for memory allocation, deallocation, and management.
+ */
+
+#endif /* _GLIBCXX_MEMORY */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/mutex b/6/sources/cxx-stl/gnu-libstdc++/include/mutex
new file mode 100644
index 0000000..62b314b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/mutex
@@ -0,0 +1,774 @@
+// <mutex> -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file mutex
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_MUTEX
+#define _GLIBCXX_MUTEX 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <tuple>
+#include <cstddef>
+#include <chrono>
+#include <exception>
+#include <type_traits>
+#include <functional>
+#include <system_error>
+#include <bits/functexcept.h>
+#include <bits/gthr.h>
+#include <bits/move.h> // for std::swap
+
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+
+namespace std
+{
+ /**
+ * @defgroup mutexes Mutexes
+ * @ingroup concurrency
+ *
+ * Classes for mutex support.
+ * @{
+ */
+
+ /// mutex
+ class mutex
+ {
+ typedef __gthread_mutex_t __native_type;
+ __native_type _M_mutex;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ mutex()
+ {
+ // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
+#ifdef __GTHREAD_MUTEX_INIT
+ __native_type __tmp = __GTHREAD_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+
+ mutex(const mutex&) = delete;
+ mutex& operator=(const mutex&) = delete;
+
+ void
+ lock()
+ {
+ int __e = __gthread_mutex_lock(&_M_mutex);
+
+ // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
+ if (__e)
+ __throw_system_error(__e);
+ }
+
+ bool
+ try_lock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ return !__gthread_mutex_trylock(&_M_mutex);
+ }
+
+ void
+ unlock()
+ {
+ // XXX EINVAL, EAGAIN, EPERM
+ __gthread_mutex_unlock(&_M_mutex);
+ }
+
+ native_handle_type
+ native_handle()
+ { return &_M_mutex; }
+ };
+
+ /// recursive_mutex
+ class recursive_mutex
+ {
+ typedef __gthread_recursive_mutex_t __native_type;
+ __native_type _M_mutex;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ recursive_mutex()
+ {
+ // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
+#ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
+ __native_type __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+
+ recursive_mutex(const recursive_mutex&) = delete;
+ recursive_mutex& operator=(const recursive_mutex&) = delete;
+
+ void
+ lock()
+ {
+ int __e = __gthread_recursive_mutex_lock(&_M_mutex);
+
+ // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
+ if (__e)
+ __throw_system_error(__e);
+ }
+
+ bool
+ try_lock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ return !__gthread_recursive_mutex_trylock(&_M_mutex);
+ }
+
+ void
+ unlock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ __gthread_recursive_mutex_unlock(&_M_mutex);
+ }
+
+ native_handle_type
+ native_handle()
+ { return &_M_mutex; }
+ };
+
+ /// timed_mutex
+ class timed_mutex
+ {
+ typedef __gthread_mutex_t __native_type;
+
+#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
+ typedef chrono::monotonic_clock __clock_t;
+#else
+ typedef chrono::high_resolution_clock __clock_t;
+#endif
+
+ __native_type _M_mutex;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ timed_mutex()
+ {
+#ifdef __GTHREAD_MUTEX_INIT
+ __native_type __tmp = __GTHREAD_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+
+ timed_mutex(const timed_mutex&) = delete;
+ timed_mutex& operator=(const timed_mutex&) = delete;
+
+ void
+ lock()
+ {
+ int __e = __gthread_mutex_lock(&_M_mutex);
+
+ // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
+ if (__e)
+ __throw_system_error(__e);
+ }
+
+ bool
+ try_lock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ return !__gthread_mutex_trylock(&_M_mutex);
+ }
+
+ template <class _Rep, class _Period>
+ bool
+ try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
+ { return __try_lock_for_impl(__rtime); }
+
+ template <class _Clock, class _Duration>
+ bool
+ try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
+ {
+ chrono::time_point<_Clock, chrono::seconds> __s =
+ chrono::time_point_cast<chrono::seconds>(__atime);
+
+ chrono::nanoseconds __ns =
+ chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
+
+ __gthread_time_t __ts = {
+ static_cast<std::time_t>(__s.time_since_epoch().count()),
+ static_cast<long>(__ns.count())
+ };
+
+ return !__gthread_mutex_timedlock(&_M_mutex, &__ts);
+ }
+
+ void
+ unlock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ __gthread_mutex_unlock(&_M_mutex);
+ }
+
+ native_handle_type
+ native_handle()
+ { return &_M_mutex; }
+
+ private:
+ template<typename _Rep, typename _Period>
+ typename enable_if<
+ ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
+ __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ __clock_t::time_point __atime = __clock_t::now()
+ + chrono::duration_cast<__clock_t::duration>(__rtime);
+
+ return try_lock_until(__atime);
+ }
+
+ template <typename _Rep, typename _Period>
+ typename enable_if<
+ !ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
+ __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ __clock_t::time_point __atime = __clock_t::now()
+ + ++chrono::duration_cast<__clock_t::duration>(__rtime);
+
+ return try_lock_until(__atime);
+ }
+ };
+
+ /// recursive_timed_mutex
+ class recursive_timed_mutex
+ {
+ typedef __gthread_recursive_mutex_t __native_type;
+
+#ifdef _GLIBCXX_USE_CLOCK_MONOTONIC
+ typedef chrono::monotonic_clock __clock_t;
+#else
+ typedef chrono::high_resolution_clock __clock_t;
+#endif
+
+ __native_type _M_mutex;
+
+ public:
+ typedef __native_type* native_handle_type;
+
+ recursive_timed_mutex()
+ {
+ // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
+#ifdef __GTHREAD_RECURSIVE_MUTEX_INIT
+ __native_type __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
+ _M_mutex = __tmp;
+#else
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
+#endif
+ }
+
+ recursive_timed_mutex(const recursive_timed_mutex&) = delete;
+ recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete;
+
+ void
+ lock()
+ {
+ int __e = __gthread_recursive_mutex_lock(&_M_mutex);
+
+ // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
+ if (__e)
+ __throw_system_error(__e);
+ }
+
+ bool
+ try_lock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ return !__gthread_recursive_mutex_trylock(&_M_mutex);
+ }
+
+ template <class _Rep, class _Period>
+ bool
+ try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
+ { return __try_lock_for_impl(__rtime); }
+
+ template <class _Clock, class _Duration>
+ bool
+ try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
+ {
+ chrono::time_point<_Clock, chrono::seconds> __s =
+ chrono::time_point_cast<chrono::seconds>(__atime);
+
+ chrono::nanoseconds __ns =
+ chrono::duration_cast<chrono::nanoseconds>(__atime - __s);
+
+ __gthread_time_t __ts = {
+ static_cast<std::time_t>(__s.time_since_epoch().count()),
+ static_cast<long>(__ns.count())
+ };
+
+ return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts);
+ }
+
+ void
+ unlock()
+ {
+ // XXX EINVAL, EAGAIN, EBUSY
+ __gthread_recursive_mutex_unlock(&_M_mutex);
+ }
+
+ native_handle_type
+ native_handle()
+ { return &_M_mutex; }
+
+ private:
+ template<typename _Rep, typename _Period>
+ typename enable_if<
+ ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
+ __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ __clock_t::time_point __atime = __clock_t::now()
+ + chrono::duration_cast<__clock_t::duration>(__rtime);
+
+ return try_lock_until(__atime);
+ }
+
+ template <typename _Rep, typename _Period>
+ typename enable_if<
+ !ratio_less_equal<__clock_t::period, _Period>::value, bool>::type
+ __try_lock_for_impl(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ __clock_t::time_point __atime = __clock_t::now()
+ + ++chrono::duration_cast<__clock_t::duration>(__rtime);
+
+ return try_lock_until(__atime);
+ }
+ };
+
+ /// Do not acquire ownership of the mutex.
+ struct defer_lock_t { };
+
+ /// Try to acquire ownership of the mutex without blocking.
+ struct try_to_lock_t { };
+
+ /// Assume the calling thread has already obtained mutex ownership
+ /// and manage it.
+ struct adopt_lock_t { };
+
+ extern const defer_lock_t defer_lock;
+ extern const try_to_lock_t try_to_lock;
+ extern const adopt_lock_t adopt_lock;
+
+ /**
+ * @brief Thrown to indicate errors with lock operations.
+ *
+ * @ingroup exceptions
+ */
+ class lock_error : public exception
+ {
+ public:
+ virtual const char*
+ what() const throw();
+ };
+
+ /// @brief Scoped lock idiom.
+ // Acquire the mutex here with a constructor call, then release with
+ // the destructor call in accordance with RAII style.
+ template<typename _Mutex>
+ class lock_guard
+ {
+ public:
+ typedef _Mutex mutex_type;
+
+ explicit lock_guard(mutex_type& __m) : _M_device(__m)
+ { _M_device.lock(); }
+
+ lock_guard(mutex_type& __m, adopt_lock_t __a) : _M_device(__m)
+ { _M_device.lock(); }
+
+ ~lock_guard()
+ { _M_device.unlock(); }
+
+ lock_guard(const lock_guard&) = delete;
+ lock_guard& operator=(const lock_guard&) = delete;
+
+ private:
+ mutex_type& _M_device;
+ };
+
+ /// unique_lock
+ template<typename _Mutex>
+ class unique_lock
+ {
+ public:
+ typedef _Mutex mutex_type;
+
+ unique_lock()
+ : _M_device(0), _M_owns(false)
+ { }
+
+ explicit unique_lock(mutex_type& __m)
+ : _M_device(&__m), _M_owns(false)
+ {
+ lock();
+ _M_owns = true;
+ }
+
+ unique_lock(mutex_type& __m, defer_lock_t)
+ : _M_device(&__m), _M_owns(false)
+ { }
+
+ unique_lock(mutex_type& __m, try_to_lock_t)
+ : _M_device(&__m), _M_owns(_M_device->try_lock())
+ { }
+
+ unique_lock(mutex_type& __m, adopt_lock_t)
+ : _M_device(&__m), _M_owns(true)
+ {
+ // XXX calling thread owns mutex
+ }
+
+ template<typename _Clock, typename _Duration>
+ unique_lock(mutex_type& __m,
+ const chrono::time_point<_Clock, _Duration>& __atime)
+ : _M_device(&__m), _M_owns(_M_device->try_lock_until(__atime))
+ { }
+
+ template<typename _Rep, typename _Period>
+ unique_lock(mutex_type& __m,
+ const chrono::duration<_Rep, _Period>& __rtime)
+ : _M_device(&__m), _M_owns(_M_device->try_lock_for(__rtime))
+ { }
+
+ ~unique_lock()
+ {
+ if (_M_owns)
+ unlock();
+ }
+
+ unique_lock(const unique_lock&) = delete;
+ unique_lock& operator=(const unique_lock&) = delete;
+
+ unique_lock(unique_lock&& __u)
+ : _M_device(__u._M_device), _M_owns(__u._M_owns)
+ {
+ __u._M_device = 0;
+ __u._M_owns = false;
+ }
+
+ unique_lock& operator=(unique_lock&& __u)
+ {
+ if(_M_owns)
+ unlock();
+
+ unique_lock(std::move(__u)).swap(*this);
+
+ __u._M_device = 0;
+ __u._M_owns = false;
+
+ return *this;
+ }
+
+ void
+ lock()
+ {
+ if (!_M_device)
+ __throw_system_error(int(errc::operation_not_permitted));
+ else if (_M_owns)
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
+ else
+ {
+ _M_device->lock();
+ _M_owns = true;
+ }
+ }
+
+ bool
+ try_lock()
+ {
+ if (!_M_device)
+ __throw_system_error(int(errc::operation_not_permitted));
+ else if (_M_owns)
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
+ else
+ {
+ _M_owns = _M_device->try_lock();
+ return _M_owns;
+ }
+ }
+
+ template<typename _Clock, typename _Duration>
+ bool
+ try_lock_until(const chrono::time_point<_Clock, _Duration>& __atime)
+ {
+ if (!_M_device)
+ __throw_system_error(int(errc::operation_not_permitted));
+ else if (_M_owns)
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
+ else
+ {
+ _M_owns = _M_device->try_lock_until(__atime);
+ return _M_owns;
+ }
+ }
+
+ template<typename _Rep, typename _Period>
+ bool
+ try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ if (!_M_device)
+ __throw_system_error(int(errc::operation_not_permitted));
+ else if (_M_owns)
+ __throw_system_error(int(errc::resource_deadlock_would_occur));
+ else
+ {
+ _M_owns = _M_device->try_lock_for(__rtime);
+ return _M_owns;
+ }
+ }
+
+ void
+ unlock()
+ {
+ if (!_M_owns)
+ __throw_system_error(int(errc::operation_not_permitted));
+ else if (_M_device)
+ {
+ _M_device->unlock();
+ _M_owns = false;
+ }
+ }
+
+ void
+ swap(unique_lock&& __u)
+ {
+ std::swap(_M_device, __u._M_device);
+ std::swap(_M_owns, __u._M_owns);
+ }
+
+ mutex_type*
+ release()
+ {
+ mutex_type* __ret = _M_device;
+ _M_device = 0;
+ _M_owns = false;
+ return __ret;
+ }
+
+ bool
+ owns_lock() const
+ { return _M_owns; }
+
+ /* explicit */ operator bool () const
+ { return owns_lock(); }
+
+ mutex_type*
+ mutex() const
+ { return _M_device; }
+
+ private:
+ mutex_type* _M_device;
+ bool _M_owns; // XXX use atomic_bool
+ };
+
+ template<typename _Mutex>
+ inline void
+ swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Mutex>
+ inline void
+ swap(unique_lock<_Mutex>&& __x, unique_lock<_Mutex>& __y)
+ { __x.swap(__y); }
+
+ template<typename _Mutex>
+ inline void
+ swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>&& __y)
+ { __x.swap(__y); }
+
+ template<int _Idx>
+ struct __unlock_impl
+ {
+ template<typename... _Lock>
+ static void
+ __do_unlock(tuple<_Lock&...>& __locks)
+ {
+ std::get<_Idx>(__locks).unlock();
+ __unlock_impl<_Idx - 1>::__do_unlock(__locks);
+ }
+ };
+
+ template<>
+ struct __unlock_impl<-1>
+ {
+ template<typename... _Lock>
+ static void
+ __do_unlock(tuple<_Lock&...>&)
+ { }
+ };
+
+ template<int _Idx, bool _Continue = true>
+ struct __try_lock_impl
+ {
+ template<typename... _Lock>
+ static int
+ __do_try_lock(tuple<_Lock&...>& __locks)
+ {
+ if(std::get<_Idx>(__locks).try_lock())
+ {
+ return __try_lock_impl<_Idx + 1,
+ _Idx + 2 < sizeof...(_Lock)>::__do_try_lock(__locks);
+ }
+ else
+ {
+ __unlock_impl<_Idx>::__do_unlock(__locks);
+ return _Idx;
+ }
+ }
+ };
+
+ template<int _Idx>
+ struct __try_lock_impl<_Idx, false>
+ {
+ template<typename... _Lock>
+ static int
+ __do_try_lock(tuple<_Lock&...>& __locks)
+ {
+ if(std::get<_Idx>(__locks).try_lock())
+ return -1;
+ else
+ {
+ __unlock_impl<_Idx>::__do_unlock(__locks);
+ return _Idx;
+ }
+ }
+ };
+
+ /** @brief Generic try_lock.
+ * @param __l1 Meets Mutex requirements (try_lock() may throw).
+ * @param __l2 Meets Mutex requirements (try_lock() may throw).
+ * @param __l3 Meets Mutex requirements (try_lock() may throw).
+ * @return Returns -1 if all try_lock() calls return true. Otherwise returns
+ * a 0-based index corresponding to the argument that returned false.
+ * @post Either all arguments are locked, or none will be.
+ *
+ * Sequentially calls try_lock() on each argument.
+ */
+ template<typename _Lock1, typename _Lock2, typename... _Lock3>
+ int
+ try_lock(_Lock1& __l1, _Lock2& __l2, _Lock3&... __l3)
+ {
+ tuple<_Lock1&, _Lock2&, _Lock3&...> __locks(__l1, __l2, __l3...);
+ return __try_lock_impl<0>::__do_try_lock(__locks);
+ }
+
+ /// lock
+ template<typename _L1, typename _L2, typename ..._L3>
+ void
+ lock(_L1&, _L2&, _L3&...);
+
+ /// once_flag
+ struct once_flag
+ {
+ private:
+ typedef __gthread_once_t __native_type;
+ __native_type _M_once;
+
+ public:
+ once_flag()
+ {
+ __native_type __tmp = __GTHREAD_ONCE_INIT;
+ _M_once = __tmp;
+ }
+
+ once_flag(const once_flag&) = delete;
+ once_flag& operator=(const once_flag&) = delete;
+
+ template<typename _Callable, typename... _Args>
+ friend void
+ call_once(once_flag& __once, _Callable __f, _Args&&... __args);
+ };
+
+#ifdef _GLIBCXX_HAVE_TLS
+ extern __thread void* __once_callable;
+ extern __thread void (*__once_call)();
+
+ template<typename _Callable>
+ inline void
+ __once_call_impl()
+ {
+ (*(_Callable*)__once_callable)();
+ }
+#else
+ extern function<void()> __once_functor;
+
+ extern void
+ __set_once_functor_lock_ptr(unique_lock<mutex>*);
+
+ extern mutex&
+ __get_once_mutex();
+#endif
+
+ extern "C" void __once_proxy();
+
+ /// call_once
+ template<typename _Callable, typename... _Args>
+ void
+ call_once(once_flag& __once, _Callable __f, _Args&&... __args)
+ {
+#ifdef _GLIBCXX_HAVE_TLS
+ auto __bound_functor = bind(__f, __args...);
+ __once_callable = &__bound_functor;
+ __once_call = &__once_call_impl<decltype(__bound_functor)>;
+#else
+ unique_lock<mutex> __functor_lock(__get_once_mutex());
+ __once_functor = bind(__f, __args...);
+ __set_once_functor_lock_ptr(&__functor_lock);
+#endif
+
+ int __e = __gthread_once(&(__once._M_once), &__once_proxy);
+
+#ifndef _GLIBCXX_HAVE_TLS
+ if (__functor_lock)
+ __set_once_functor_lock_ptr(0);
+#endif
+
+ if (__e)
+ __throw_system_error(__e);
+ }
+
+ // @} group mutexes
+}
+
+#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_MUTEX
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/new b/6/sources/cxx-stl/gnu-libstdc++/include/new
new file mode 100644
index 0000000..d411502
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/new
@@ -0,0 +1,112 @@
+// The -*- C++ -*- dynamic memory management header.
+
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+// 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation
+
+// 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file new
+ * This is a Standard C++ Library header.
+ *
+ * The header @c new defines several functions to manage dynamic memory and
+ * handling memory allocation errors; see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more.
+ */
+
+#ifndef _NEW
+#define _NEW
+
+#include <cstddef>
+#include <exception>
+
+#pragma GCC visibility push(default)
+
+extern "C++" {
+
+namespace std
+{
+ /**
+ * @brief Exception possibly thrown by @c new.
+ * @ingroup exceptions
+ *
+ * @c bad_alloc (or classes derived from it) is used to report allocation
+ * errors from the throwing forms of @c new. */
+ class bad_alloc : public exception
+ {
+ public:
+ bad_alloc() throw() { }
+
+ // This declaration is not useless:
+ // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+ virtual ~bad_alloc() throw();
+
+ // See comment in eh_exception.cc.
+ virtual const char* what() const throw();
+ };
+
+ struct nothrow_t { };
+
+ extern const nothrow_t nothrow;
+
+ /** If you write your own error handler to be called by @c new, it must
+ * be of this type. */
+ typedef void (*new_handler)();
+
+ /// Takes a replacement handler as the argument, returns the
+ /// previous handler.
+ new_handler set_new_handler(new_handler) throw();
+} // namespace std
+
+//@{
+/** These are replaceable signatures:
+ * - normal single new and delete (no arguments, throw @c bad_alloc on error)
+ * - normal array new and delete (same)
+ * - @c nothrow single new and delete (take a @c nothrow argument, return
+ * @c NULL on error)
+ * - @c nothrow array new and delete (same)
+ *
+ * Placement new and delete signatures (take a memory address argument,
+ * does nothing) may not be replaced by a user's program.
+*/
+void* operator new(std::size_t) throw (std::bad_alloc);
+void* operator new[](std::size_t) throw (std::bad_alloc);
+void operator delete(void*) throw();
+void operator delete[](void*) throw();
+void* operator new(std::size_t, const std::nothrow_t&) throw();
+void* operator new[](std::size_t, const std::nothrow_t&) throw();
+void operator delete(void*, const std::nothrow_t&) throw();
+void operator delete[](void*, const std::nothrow_t&) throw();
+
+// Default placement versions of operator new.
+inline void* operator new(std::size_t, void* __p) throw() { return __p; }
+inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
+
+// Default placement versions of operator delete.
+inline void operator delete (void*, void*) throw() { }
+inline void operator delete[](void*, void*) throw() { }
+//@}
+} // extern "C++"
+
+#pragma GCC visibility pop
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/numeric b/6/sources/cxx-stl/gnu-libstdc++/include/numeric
new file mode 100644
index 0000000..43d76d9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/numeric
@@ -0,0 +1,78 @@
+// <numeric> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/numeric
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_NUMERIC
+#define _GLIBCXX_NUMERIC 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_numeric.h>
+
+#ifdef _GLIBCXX_PARALLEL
+# include <parallel/numeric>
+#endif
+
+/**
+ * @defgroup numerics Numerics
+ *
+ * Components for performing numeric operations. Includes support for
+ * for complex number types, random number generation, numeric
+ * (n-at-a-time) arrays, generalized numeric algorithms, and special
+ * math functions.
+ */
+
+#endif /* _GLIBCXX_NUMERIC */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ostream b/6/sources/cxx-stl/gnu-libstdc++/include/ostream
new file mode 100644
index 0000000..c49b36f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ostream
@@ -0,0 +1,568 @@
+// Output streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ostream
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.6.2 Output streams
+//
+
+#ifndef _GLIBCXX_OSTREAM
+#define _GLIBCXX_OSTREAM 1
+
+#pragma GCC system_header
+
+#include <ios>
+#include <bits/ostream_insert.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // [27.6.2.1] Template class basic_ostream
+ /**
+ * @brief Controlling output.
+ * @ingroup io
+ *
+ * This is the base class for all output streams. It provides text
+ * formatting of all builtin types, and communicates with any class
+ * derived from basic_streambuf to do the actual output.
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_ostream : virtual public basic_ios<_CharT, _Traits>
+ {
+ public:
+ // Types (inherited from basic_ios (27.4.4)):
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ // Non-standard Types:
+ typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
+ typedef basic_ios<_CharT, _Traits> __ios_type;
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
+ __num_put_type;
+ typedef ctype<_CharT> __ctype_type;
+
+ // [27.6.2.2] constructor/destructor
+ /**
+ * @brief Base constructor.
+ *
+ * This ctor is almost never called by the user directly, rather from
+ * derived classes' initialization lists, which pass a pointer to
+ * their own stream buffer.
+ */
+ explicit
+ basic_ostream(__streambuf_type* __sb)
+ { this->init(__sb); }
+
+ /**
+ * @brief Base destructor.
+ *
+ * This does very little apart from providing a virtual base dtor.
+ */
+ virtual
+ ~basic_ostream() { }
+
+ // [27.6.2.3] prefix/suffix
+ class sentry;
+ friend class sentry;
+
+ // [27.6.2.5] formatted output
+ // [27.6.2.5.3] basic_ostream::operator<<
+ //@{
+ /**
+ * @brief Interface for manipulators.
+ *
+ * Manipulators such as @c std::endl and @c std::hex use these
+ * functions in constructs like "std::cout << std::endl". For more
+ * information, see the iomanip header.
+ */
+ __ostream_type&
+ operator<<(__ostream_type& (*__pf)(__ostream_type&))
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ return __pf(*this);
+ }
+
+ __ostream_type&
+ operator<<(__ios_type& (*__pf)(__ios_type&))
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ __pf(*this);
+ return *this;
+ }
+
+ __ostream_type&
+ operator<<(ios_base& (*__pf) (ios_base&))
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 60. What is a formatted input function?
+ // The inserters for manipulators are *not* formatted output functions.
+ __pf(*this);
+ return *this;
+ }
+ //@}
+
+ // [27.6.2.5.2] arithmetic inserters
+ /**
+ * @name Arithmetic Inserters
+ *
+ * All the @c operator<< functions (aka <em>formatted output
+ * functions</em>) have some common behavior. Each starts by
+ * constructing a temporary object of type std::basic_ostream::sentry.
+ * This can have several effects, concluding with the setting of a
+ * status flag; see the sentry documentation for more.
+ *
+ * If the sentry status is good, the function tries to generate
+ * whatever data is appropriate for the type of the argument.
+ *
+ * If an exception is thrown during insertion, ios_base::badbit
+ * will be turned on in the stream's error state without causing an
+ * ios_base::failure to be thrown. The original exception will then
+ * be rethrown.
+ */
+ //@{
+ /**
+ * @brief Basic arithmetic inserters
+ * @param A variable of builtin type.
+ * @return @c *this if successful
+ *
+ * These functions use the stream's current locale (specifically, the
+ * @c num_get facet) to perform numeric formatting.
+ */
+ __ostream_type&
+ operator<<(long __n)
+ { return _M_insert(__n); }
+
+ __ostream_type&
+ operator<<(unsigned long __n)
+ { return _M_insert(__n); }
+
+ __ostream_type&
+ operator<<(bool __n)
+ { return _M_insert(__n); }
+
+ __ostream_type&
+ operator<<(short __n);
+
+ __ostream_type&
+ operator<<(unsigned short __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 117. basic_ostream uses nonexistent num_put member functions.
+ return _M_insert(static_cast<unsigned long>(__n));
+ }
+
+ __ostream_type&
+ operator<<(int __n);
+
+ __ostream_type&
+ operator<<(unsigned int __n)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 117. basic_ostream uses nonexistent num_put member functions.
+ return _M_insert(static_cast<unsigned long>(__n));
+ }
+
+#ifdef _GLIBCXX_USE_LONG_LONG
+ __ostream_type&
+ operator<<(long long __n)
+ { return _M_insert(__n); }
+
+ __ostream_type&
+ operator<<(unsigned long long __n)
+ { return _M_insert(__n); }
+#endif
+
+ __ostream_type&
+ operator<<(double __f)
+ { return _M_insert(__f); }
+
+ __ostream_type&
+ operator<<(float __f)
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 117. basic_ostream uses nonexistent num_put member functions.
+ return _M_insert(static_cast<double>(__f));
+ }
+
+ __ostream_type&
+ operator<<(long double __f)
+ { return _M_insert(__f); }
+
+ __ostream_type&
+ operator<<(const void* __p)
+ { return _M_insert(__p); }
+
+ /**
+ * @brief Extracting from another streambuf.
+ * @param sb A pointer to a streambuf
+ *
+ * This function behaves like one of the basic arithmetic extractors,
+ * in that it also constructs a sentry object and has the same error
+ * handling behavior.
+ *
+ * If @a sb is NULL, the stream will set failbit in its error state.
+ *
+ * Characters are extracted from @a sb and inserted into @c *this
+ * until one of the following occurs:
+ *
+ * - the input stream reaches end-of-file,
+ * - insertion into the output sequence fails (in this case, the
+ * character that would have been inserted is not extracted), or
+ * - an exception occurs while getting a character from @a sb, which
+ * sets failbit in the error state
+ *
+ * If the function inserts no characters, failbit is set.
+ */
+ __ostream_type&
+ operator<<(__streambuf_type* __sb);
+ //@}
+
+ // [27.6.2.6] unformatted output functions
+ /**
+ * @name Unformatted Output Functions
+ *
+ * All the unformatted output functions have some common behavior.
+ * Each starts by constructing a temporary object of type
+ * std::basic_ostream::sentry. This has several effects, concluding
+ * with the setting of a status flag; see the sentry documentation
+ * for more.
+ *
+ * If the sentry status is good, the function tries to generate
+ * whatever data is appropriate for the type of the argument.
+ *
+ * If an exception is thrown during insertion, ios_base::badbit
+ * will be turned on in the stream's error state. If badbit is on in
+ * the stream's exceptions mask, the exception will be rethrown
+ * without completing its actions.
+ */
+ //@{
+ /**
+ * @brief Simple insertion.
+ * @param c The character to insert.
+ * @return *this
+ *
+ * Tries to insert @a c.
+ *
+ * @note This function is not overloaded on signed char and
+ * unsigned char.
+ */
+ __ostream_type&
+ put(char_type __c);
+
+ // Core write functionality, without sentry.
+ void
+ _M_write(const char_type* __s, streamsize __n)
+ {
+ const streamsize __put = this->rdbuf()->sputn(__s, __n);
+ if (__put != __n)
+ this->setstate(ios_base::badbit);
+ }
+
+ /**
+ * @brief Character string insertion.
+ * @param s The array to insert.
+ * @param n Maximum number of characters to insert.
+ * @return *this
+ *
+ * Characters are copied from @a s and inserted into the stream until
+ * one of the following happens:
+ *
+ * - @a n characters are inserted
+ * - inserting into the output sequence fails (in this case, badbit
+ * will be set in the stream's error state)
+ *
+ * @note This function is not overloaded on signed char and
+ * unsigned char.
+ */
+ __ostream_type&
+ write(const char_type* __s, streamsize __n);
+ //@}
+
+ /**
+ * @brief Synchronizing the stream buffer.
+ * @return *this
+ *
+ * If @c rdbuf() is a null pointer, changes nothing.
+ *
+ * Otherwise, calls @c rdbuf()->pubsync(), and if that returns -1,
+ * sets badbit.
+ */
+ __ostream_type&
+ flush();
+
+ // [27.6.2.4] seek members
+ /**
+ * @brief Getting the current write position.
+ * @return A file position object.
+ *
+ * If @c fail() is not false, returns @c pos_type(-1) to indicate
+ * failure. Otherwise returns @c rdbuf()->pubseekoff(0,cur,out).
+ */
+ pos_type
+ tellp();
+
+ /**
+ * @brief Changing the current write position.
+ * @param pos A file position object.
+ * @return *this
+ *
+ * If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos). If
+ * that function fails, sets failbit.
+ */
+ __ostream_type&
+ seekp(pos_type);
+
+ /**
+ * @brief Changing the current write position.
+ * @param off A file offset object.
+ * @param dir The direction in which to seek.
+ * @return *this
+ *
+ * If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir).
+ * If that function fails, sets failbit.
+ */
+ __ostream_type&
+ seekp(off_type, ios_base::seekdir);
+
+ protected:
+ basic_ostream()
+ { this->init(0); }
+
+ template<typename _ValueT>
+ __ostream_type&
+ _M_insert(_ValueT __v);
+ };
+
+ /**
+ * @brief Performs setup work for output streams.
+ *
+ * Objects of this class are created before all of the standard
+ * inserters are run. It is responsible for "exception-safe prefix and
+ * suffix operations."
+ */
+ template <typename _CharT, typename _Traits>
+ class basic_ostream<_CharT, _Traits>::sentry
+ {
+ // Data Members:
+ bool _M_ok;
+ basic_ostream<_CharT, _Traits>& _M_os;
+
+ public:
+ /**
+ * @brief The constructor performs preparatory work.
+ * @param os The output stream to guard.
+ *
+ * If the stream state is good (@a os.good() is true), then if the
+ * stream is tied to another output stream, @c is.tie()->flush()
+ * is called to synchronize the output sequences.
+ *
+ * If the stream state is still good, then the sentry state becomes
+ * true ("okay").
+ */
+ explicit
+ sentry(basic_ostream<_CharT, _Traits>& __os);
+
+ /**
+ * @brief Possibly flushes the stream.
+ *
+ * If @c ios_base::unitbuf is set in @c os.flags(), and
+ * @c std::uncaught_exception() is true, the sentry destructor calls
+ * @c flush() on the output stream.
+ */
+ ~sentry()
+ {
+ // XXX MT
+ if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception())
+ {
+ // Can't call flush directly or else will get into recursive lock.
+ if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
+ _M_os.setstate(ios_base::badbit);
+ }
+ }
+
+ /**
+ * @brief Quick status checking.
+ * @return The sentry state.
+ *
+ * For ease of use, sentries may be converted to booleans. The
+ * return value is that of the sentry state (true == okay).
+ */
+ operator bool() const
+ { return _M_ok; }
+ };
+
+ // [27.6.2.5.4] character insertion templates
+ //@{
+ /**
+ * @brief Character inserters
+ * @param out An output stream.
+ * @param c A character.
+ * @return out
+ *
+ * Behaves like one of the formatted arithmetic inserters described in
+ * std::basic_ostream. After constructing a sentry object with good
+ * status, this function inserts a single character and any required
+ * padding (as determined by [22.2.2.2.2]). @c out.width(0) is then
+ * called.
+ *
+ * If @a c is of type @c char and the character type of the stream is not
+ * @c char, the character is widened before insertion.
+ */
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
+ { return __ostream_insert(__out, &__c, 1); }
+
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
+ { return (__out << __out.widen(__c)); }
+
+ // Specialization
+ template <class _Traits>
+ inline basic_ostream<char, _Traits>&
+ operator<<(basic_ostream<char, _Traits>& __out, char __c)
+ { return __ostream_insert(__out, &__c, 1); }
+
+ // Signed and unsigned
+ template<class _Traits>
+ inline basic_ostream<char, _Traits>&
+ operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
+ { return (__out << static_cast<char>(__c)); }
+
+ template<class _Traits>
+ inline basic_ostream<char, _Traits>&
+ operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
+ { return (__out << static_cast<char>(__c)); }
+ //@}
+
+ //@{
+ /**
+ * @brief String inserters
+ * @param out An output stream.
+ * @param s A character string.
+ * @return out
+ * @pre @a s must be a non-NULL pointer
+ *
+ * Behaves like one of the formatted arithmetic inserters described in
+ * std::basic_ostream. After constructing a sentry object with good
+ * status, this function inserts @c traits::length(s) characters starting
+ * at @a s, widened if necessary, followed by any required padding (as
+ * determined by [22.2.2.2.2]). @c out.width(0) is then called.
+ */
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
+ {
+ if (!__s)
+ __out.setstate(ios_base::badbit);
+ else
+ __ostream_insert(__out, __s,
+ static_cast<streamsize>(_Traits::length(__s)));
+ return __out;
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits> &
+ operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
+
+ // Partial specializations
+ template<class _Traits>
+ inline basic_ostream<char, _Traits>&
+ operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
+ {
+ if (!__s)
+ __out.setstate(ios_base::badbit);
+ else
+ __ostream_insert(__out, __s,
+ static_cast<streamsize>(_Traits::length(__s)));
+ return __out;
+ }
+
+ // Signed and unsigned
+ template<class _Traits>
+ inline basic_ostream<char, _Traits>&
+ operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
+ { return (__out << reinterpret_cast<const char*>(__s)); }
+
+ template<class _Traits>
+ inline basic_ostream<char, _Traits> &
+ operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
+ { return (__out << reinterpret_cast<const char*>(__s)); }
+ //@}
+
+ // [27.6.2.7] standard basic_ostream manipulators
+ /**
+ * @brief Write a newline and flush the stream.
+ *
+ * This manipulator is often mistakenly used when a simple newline is
+ * desired, leading to poor buffering performance. See
+ * http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#2 for more
+ * on this subject.
+ */
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ endl(basic_ostream<_CharT, _Traits>& __os)
+ { return flush(__os.put(__os.widen('\n'))); }
+
+ /**
+ * @brief Write a null character into the output sequence.
+ *
+ * "Null character" is @c CharT() by definition. For CharT of @c char,
+ * this correctly writes the ASCII @c NUL character string terminator.
+ */
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ ends(basic_ostream<_CharT, _Traits>& __os)
+ { return __os.put(_CharT()); }
+
+ /**
+ * @brief Flushes the output stream.
+ *
+ * This manipulator simply calls the stream's @c flush() member function.
+ */
+ template<typename _CharT, typename _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ flush(basic_ostream<_CharT, _Traits>& __os)
+ { return __os.flush(); }
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/ostream.tcc>
+#endif
+
+#endif /* _GLIBCXX_OSTREAM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/queue b/6/sources/cxx-stl/gnu-libstdc++/include/queue
new file mode 100644
index 0000000..abf9842
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/queue
@@ -0,0 +1,67 @@
+// <queue> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/queue
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_QUEUE
+#define _GLIBCXX_QUEUE 1
+
+#pragma GCC system_header
+
+#include <deque>
+#include <vector>
+#include <bits/stl_heap.h>
+#include <bits/stl_function.h>
+#include <bits/stl_queue.h>
+
+#endif /* _GLIBCXX_QUEUE */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/random b/6/sources/cxx-stl/gnu-libstdc++/include/random
new file mode 100644
index 0000000..1cb968c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/random
@@ -0,0 +1,70 @@
+// <random> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/random
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_RANDOM
+#define _GLIBCXX_RANDOM 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <iosfwd>
+#include <limits>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+#include <type_traits>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/random>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/random>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_RANDOM
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/ratio b/6/sources/cxx-stl/gnu-libstdc++/include/ratio
new file mode 100644
index 0000000..f0e8831
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/ratio
@@ -0,0 +1,303 @@
+// ratio -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ratio
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_RATIO
+#define _GLIBCXX_RATIO 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <type_traits>
+#include <cstdint>
+
+#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+
+namespace std
+{
+ /**
+ * @defgroup ratio Rational Arithmetic
+ * @ingroup utilities
+ *
+ * Compile time representation of fininte rational numbers.
+ * @{
+ */
+
+ template<intmax_t _Pn>
+ struct __static_sign
+ : integral_constant<intmax_t, (_Pn < 0) ? -1 : 1>
+ { };
+
+ template<intmax_t _Pn>
+ struct __static_abs
+ : integral_constant<intmax_t, _Pn * __static_sign<_Pn>::value>
+ { };
+
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __static_gcd;
+
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __static_gcd
+ : __static_gcd<_Qn, (_Pn % _Qn)>
+ { };
+
+ template<intmax_t _Pn>
+ struct __static_gcd<_Pn, 0>
+ : integral_constant<intmax_t, __static_abs<_Pn>::value>
+ { };
+
+ template<intmax_t _Qn>
+ struct __static_gcd<0, _Qn>
+ : integral_constant<intmax_t, __static_abs<_Qn>::value>
+ { };
+
+ // Let c = 2^(half # of bits in an intmax_t)
+ // then we find a1, a0, b1, b0 s.t. N = a1*c + a0, M = b1*c + b0
+ // The multiplication of N and M becomes,
+ // N * M = (a1 * b1)c^2 + (a0 * b1 + b0 * a1)c + a0 * b0
+ // Multiplication is safe if each term and the sum of the terms
+ // is representable by intmax_t.
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __safe_multiply
+ {
+ private:
+ static const uintmax_t __c = uintmax_t(1) << (sizeof(intmax_t) * 4);
+
+ static const uintmax_t __a0 = __static_abs<_Pn>::value % __c;
+ static const uintmax_t __a1 = __static_abs<_Pn>::value / __c;
+ static const uintmax_t __b0 = __static_abs<_Qn>::value % __c;
+ static const uintmax_t __b1 = __static_abs<_Qn>::value / __c;
+
+ static_assert(__a1 == 0 || __b1 == 0,
+ "overflow in multiplication");
+ static_assert(__a0 * __b1 + __b0 * __a1 < (__c >> 1),
+ "overflow in multiplication");
+ static_assert(__b0 * __a0 <= __INTMAX_MAX__,
+ "overflow in multiplication");
+ static_assert((__a0 * __b1 + __b0 * __a1) * __c <=
+ __INTMAX_MAX__ - __b0 * __a0, "overflow in multiplication");
+
+ public:
+ static const intmax_t value = _Pn * _Qn;
+ };
+
+ // Helpers for __safe_add
+ template<intmax_t _Pn, intmax_t _Qn, bool>
+ struct __add_overflow_check_impl
+ : integral_constant<bool, (_Pn <= __INTMAX_MAX__ - _Qn)>
+ { };
+
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __add_overflow_check_impl<_Pn, _Qn, false>
+ : integral_constant<bool, (_Pn >= -__INTMAX_MAX__ - _Qn)>
+ { };
+
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __add_overflow_check
+ : __add_overflow_check_impl<_Pn, _Qn, (_Qn >= 0)>
+ { };
+
+ template<intmax_t _Pn, intmax_t _Qn>
+ struct __safe_add
+ {
+ static_assert(__add_overflow_check<_Pn, _Qn>::value != 0,
+ "overflow in addition");
+
+ static const intmax_t value = _Pn + _Qn;
+ };
+
+ /**
+ * @brief Provides compile-time rational arithmetic.
+ *
+ * This class template represents any finite rational number with a
+ * numerator and denominator representable by compile-time constants of
+ * type intmax_t. The ratio is simplified when instantiated.
+ *
+ * For example:
+ * @code
+ * std::ratio<7,-21>::num == -1;
+ * std::ratio<7,-21>::den == 3;
+ * @endcode
+ *
+ */
+ template<intmax_t _Num, intmax_t _Den = 1>
+ struct ratio
+ {
+ static_assert(_Den != 0, "denominator cannot be zero");
+ static_assert(_Num >= -__INTMAX_MAX__ && _Den >= -__INTMAX_MAX__,
+ "out of range");
+
+ // Note: sign(N) * abs(N) == N
+ static const intmax_t num =
+ _Num * __static_sign<_Den>::value / __static_gcd<_Num, _Den>::value;
+
+ static const intmax_t den =
+ __static_abs<_Den>::value / __static_gcd<_Num, _Den>::value;
+ };
+
+ template<intmax_t _Num, intmax_t _Den>
+ const intmax_t ratio<_Num, _Den>::num;
+
+ template<intmax_t _Num, intmax_t _Den>
+ const intmax_t ratio<_Num, _Den>::den;
+
+ /// ratio_add
+ template<typename _R1, typename _R2>
+ struct ratio_add
+ {
+ private:
+ static const intmax_t __gcd =
+ __static_gcd<_R1::den, _R2::den>::value;
+
+ public:
+ typedef ratio<
+ __safe_add<
+ __safe_multiply<_R1::num, (_R2::den / __gcd)>::value,
+ __safe_multiply<_R2::num, (_R1::den / __gcd)>::value>::value,
+ __safe_multiply<_R1::den, (_R2::den / __gcd)>::value> type;
+ };
+
+ /// ratio_subtract
+ template<typename _R1, typename _R2>
+ struct ratio_subtract
+ {
+ typedef typename ratio_add<
+ _R1,
+ ratio<-_R2::num, _R2::den>>::type type;
+ };
+
+ /// ratio_multiply
+ template<typename _R1, typename _R2>
+ struct ratio_multiply
+ {
+ private:
+ static const intmax_t __gcd1 =
+ __static_gcd<_R1::num, _R2::den>::value;
+ static const intmax_t __gcd2 =
+ __static_gcd<_R2::num, _R1::den>::value;
+
+ public:
+ typedef ratio<
+ __safe_multiply<(_R1::num / __gcd1),
+ (_R2::num / __gcd2)>::value,
+ __safe_multiply<(_R1::den / __gcd2),
+ (_R2::den / __gcd1)>::value> type;
+ };
+
+ /// ratio_divide
+ template<typename _R1, typename _R2>
+ struct ratio_divide
+ {
+ static_assert(_R2::num != 0, "division by 0");
+
+ typedef typename ratio_multiply<
+ _R1,
+ ratio<_R2::den, _R2::num>>::type type;
+ };
+
+ /// ratio_equal
+ template<typename _R1, typename _R2>
+ struct ratio_equal
+ : integral_constant<bool, _R1::num == _R2::num && _R1::den == _R2::den>
+ { };
+
+ /// ratio_not_equal
+ template<typename _R1, typename _R2>
+ struct ratio_not_equal
+ : integral_constant<bool, !ratio_equal<_R1, _R2>::value>
+ { };
+
+ template<typename _R1, typename _R2>
+ struct __ratio_less_simple_impl
+ : integral_constant<bool,
+ (__safe_multiply<_R1::num, _R2::den>::value
+ < __safe_multiply<_R2::num, _R1::den>::value)>
+ { };
+
+ // If the denominators are equal or the signs differ, we can just compare
+ // numerators, otherwise fallback to the simple cross-multiply method.
+ template<typename _R1, typename _R2>
+ struct __ratio_less_impl
+ : conditional<(_R1::den == _R2::den
+ || (__static_sign<_R1::num>::value
+ != __static_sign<_R2::num>::value)),
+ integral_constant<bool, (_R1::num < _R2::num)>,
+ __ratio_less_simple_impl<_R1, _R2>>::type
+ { };
+
+ /// ratio_less
+ template<typename _R1, typename _R2>
+ struct ratio_less
+ : __ratio_less_impl<_R1, _R2>::type
+ { };
+
+ /// ratio_less_equal
+ template<typename _R1, typename _R2>
+ struct ratio_less_equal
+ : integral_constant<bool, !ratio_less<_R2, _R1>::value>
+ { };
+
+ /// ratio_greater
+ template<typename _R1, typename _R2>
+ struct ratio_greater
+ : integral_constant<bool, ratio_less<_R2, _R1>::value>
+ { };
+
+ /// ratio_greater_equal
+ template<typename _R1, typename _R2>
+ struct ratio_greater_equal
+ : integral_constant<bool, !ratio_less<_R1, _R2>::value>
+ { };
+
+ typedef ratio<1, 1000000000000000000> atto;
+ typedef ratio<1, 1000000000000000> femto;
+ typedef ratio<1, 1000000000000> pico;
+ typedef ratio<1, 1000000000> nano;
+ typedef ratio<1, 1000000> micro;
+ typedef ratio<1, 1000> milli;
+ typedef ratio<1, 100> centi;
+ typedef ratio<1, 10> deci;
+ typedef ratio< 10, 1> deca;
+ typedef ratio< 100, 1> hecto;
+ typedef ratio< 1000, 1> kilo;
+ typedef ratio< 1000000, 1> mega;
+ typedef ratio< 1000000000, 1> giga;
+ typedef ratio< 1000000000000, 1> tera;
+ typedef ratio< 1000000000000000, 1> peta;
+ typedef ratio< 1000000000000000000, 1> exa;
+
+ // @} group ratio
+}
+
+#endif //_GLIBCXX_USE_C99_STDINT_TR1
+
+#endif //__GXX_EXPERIMENTAL_CXX0X__
+
+#endif //_GLIBCXX_RATIO
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/regex b/6/sources/cxx-stl/gnu-libstdc++/include/regex
new file mode 100644
index 0000000..3b25044
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/regex
@@ -0,0 +1,68 @@
+// <regex> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/regex
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_REGEX
+#define _GLIBCXX_REGEX 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <algorithm>
+#include <bitset>
+#include <iterator>
+#include <locale>
+#include <stdexcept>
+#include <string>
+#include <vector>
+#include <utility>
+#include <sstream>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/regex>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/regex>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_REGEX
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/set b/6/sources/cxx-stl/gnu-libstdc++/include/set
new file mode 100644
index 0000000..21e3f5a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/set
@@ -0,0 +1,68 @@
+// <set> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/set
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_SET
+#define _GLIBCXX_SET 1
+
+#pragma GCC system_header
+
+#include <bits/stl_tree.h>
+#include <bits/stl_set.h>
+#include <bits/stl_multiset.h>
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/set>
+#endif
+
+#endif /* _GLIBCXX_SET */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/sstream b/6/sources/cxx-stl/gnu-libstdc++/include/sstream
new file mode 100644
index 0000000..f5e3191
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/sstream
@@ -0,0 +1,576 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file sstream
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.7 String-based streams
+//
+
+#ifndef _GLIBCXX_SSTREAM
+#define _GLIBCXX_SSTREAM 1
+
+#pragma GCC system_header
+
+#include <istream>
+#include <ostream>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // [27.7.1] template class basic_stringbuf
+ /**
+ * @brief The actual work of input and output (for std::string).
+ * @ingroup io
+ *
+ * This class associates either or both of its input and output sequences
+ * with a sequence of characters, which can be initialized from, or made
+ * available as, a @c std::basic_string. (Paraphrased from [27.7.1]/1.)
+ *
+ * For this class, open modes (of type @c ios_base::openmode) have
+ * @c in set if the input sequence can be read, and @c out set if the
+ * output sequence can be written.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
+ typedef basic_string<char_type, _Traits, _Alloc> __string_type;
+ typedef typename __string_type::size_type __size_type;
+
+ protected:
+ /// Place to stash in || out || in | out settings for current stringbuf.
+ ios_base::openmode _M_mode;
+
+ // Data Members:
+ __string_type _M_string;
+
+ public:
+ // Constructors:
+ /**
+ * @brief Starts with an empty string buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * The default constructor initializes the parent class using its
+ * own default ctor.
+ */
+ explicit
+ basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __streambuf_type(), _M_mode(__mode), _M_string()
+ { }
+
+ /**
+ * @brief Starts with an existing string buffer.
+ * @param str A string to copy as a starting buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * This constructor initializes the parent class using its
+ * own default ctor.
+ */
+ explicit
+ basic_stringbuf(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size())
+ { _M_stringbuf_init(__mode); }
+
+ // Get and set:
+ /**
+ * @brief Copying out the string buffer.
+ * @return A copy of one of the underlying sequences.
+ *
+ * "If the buffer is only created in input mode, the underlying
+ * character sequence is equal to the input sequence; otherwise, it
+ * is equal to the output sequence." [27.7.1.2]/1
+ */
+ __string_type
+ str() const
+ {
+ __string_type __ret;
+ if (this->pptr())
+ {
+ // The current egptr() may not be the actual string end.
+ if (this->pptr() > this->egptr())
+ __ret = __string_type(this->pbase(), this->pptr());
+ else
+ __ret = __string_type(this->pbase(), this->egptr());
+ }
+ else
+ __ret = _M_string;
+ return __ret;
+ }
+
+ /**
+ * @brief Setting a new buffer.
+ * @param s The string to use as a new sequence.
+ *
+ * Deallocates any previous stored sequence, then copies @a s to
+ * use as a new one.
+ */
+ void
+ str(const __string_type& __s)
+ {
+ // Cannot use _M_string = __s, since v3 strings are COW.
+ _M_string.assign(__s.data(), __s.size());
+ _M_stringbuf_init(_M_mode);
+ }
+
+ protected:
+ // Common initialization code goes here.
+ void
+ _M_stringbuf_init(ios_base::openmode __mode)
+ {
+ _M_mode = __mode;
+ __size_type __len = 0;
+ if (_M_mode & (ios_base::ate | ios_base::app))
+ __len = _M_string.size();
+ _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
+ }
+
+ virtual streamsize
+ showmanyc()
+ {
+ streamsize __ret = -1;
+ if (_M_mode & ios_base::in)
+ {
+ _M_update_egptr();
+ __ret = this->egptr() - this->gptr();
+ }
+ return __ret;
+ }
+
+ virtual int_type
+ underflow();
+
+ virtual int_type
+ pbackfail(int_type __c = traits_type::eof());
+
+ virtual int_type
+ overflow(int_type __c = traits_type::eof());
+
+ /**
+ * @brief Manipulates the buffer.
+ * @param s Pointer to a buffer area.
+ * @param n Size of @a s.
+ * @return @c this
+ *
+ * If no buffer has already been created, and both @a s and @a n are
+ * non-zero, then @c s is used as a buffer; see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html
+ * for more.
+ */
+ virtual __streambuf_type*
+ setbuf(char_type* __s, streamsize __n)
+ {
+ if (__s && __n >= 0)
+ {
+ // This is implementation-defined behavior, and assumes
+ // that an external char_type array of length __n exists
+ // and has been pre-allocated. If this is not the case,
+ // things will quickly blow up.
+
+ // Step 1: Destroy the current internal array.
+ _M_string.clear();
+
+ // Step 2: Use the external array.
+ _M_sync(__s, __n, 0);
+ }
+ return this;
+ }
+
+ virtual pos_type
+ seekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+ virtual pos_type
+ seekpos(pos_type __sp,
+ ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+ // Internal function for correctly updating the internal buffer
+ // for a particular _M_string, due to initialization or re-sizing
+ // of an existing _M_string.
+ void
+ _M_sync(char_type* __base, __size_type __i, __size_type __o);
+
+ // Internal function for correctly updating egptr() to the actual
+ // string end.
+ void
+ _M_update_egptr()
+ {
+ const bool __testin = _M_mode & ios_base::in;
+ if (this->pptr() && this->pptr() > this->egptr())
+ {
+ if (__testin)
+ this->setg(this->eback(), this->gptr(), this->pptr());
+ else
+ this->setg(this->pptr(), this->pptr(), this->pptr());
+ }
+ }
+ };
+
+
+ // [27.7.2] Template class basic_istringstream
+ /**
+ * @brief Controlling input for std::string.
+ * @ingroup io
+ *
+ * This class supports reading from objects of type std::basic_string,
+ * using the inherited functions from std::basic_istream. To control
+ * the associated sequence, an instance of std::basic_stringbuf is used,
+ * which this page refers to as @c sb.
+ */
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class basic_istringstream : public basic_istream<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard types:
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_istream<char_type, traits_type> __istream_type;
+
+ private:
+ __stringbuf_type _M_stringbuf;
+
+ public:
+ // Constructors:
+ /**
+ * @brief Default constructor starts with an empty string buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * @c ios_base::in is automatically included in @a mode.
+ *
+ * Initializes @c sb using @c mode|in, and passes @c &sb to the base
+ * class initializer. Does not allocate any buffer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_istringstream(ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_stringbuf(__mode | ios_base::in)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief Starts with an existing string buffer.
+ * @param str A string to copy as a starting buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * @c ios_base::in is automatically included in @a mode.
+ *
+ * Initializes @c sb using @a str and @c mode|in, and passes @c &sb
+ * to the base class initializer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_istringstream(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::in)
+ : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The buffer is deallocated by the stringbuf object, not the
+ * formatting stream.
+ */
+ ~basic_istringstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_stringbuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+ /**
+ * @brief Copying out the string buffer.
+ * @return @c rdbuf()->str()
+ */
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+
+ /**
+ * @brief Setting a new buffer.
+ * @param s The string to use as a new sequence.
+ *
+ * Calls @c rdbuf()->str(s).
+ */
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+
+
+ // [27.7.3] Template class basic_ostringstream
+ /**
+ * @brief Controlling output for std::string.
+ * @ingroup io
+ *
+ * This class supports writing to objects of type std::basic_string,
+ * using the inherited functions from std::basic_ostream. To control
+ * the associated sequence, an instance of std::basic_stringbuf is used,
+ * which this page refers to as @c sb.
+ */
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ class basic_ostringstream : public basic_ostream<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard types:
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_ostream<char_type, traits_type> __ostream_type;
+
+ private:
+ __stringbuf_type _M_stringbuf;
+
+ public:
+ // Constructors/destructor:
+ /**
+ * @brief Default constructor starts with an empty string buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * @c ios_base::out is automatically included in @a mode.
+ *
+ * Initializes @c sb using @c mode|out, and passes @c &sb to the base
+ * class initializer. Does not allocate any buffer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_ostringstream(ios_base::openmode __mode = ios_base::out)
+ : __ostream_type(), _M_stringbuf(__mode | ios_base::out)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief Starts with an existing string buffer.
+ * @param str A string to copy as a starting buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * @c ios_base::out is automatically included in @a mode.
+ *
+ * Initializes @c sb using @a str and @c mode|out, and passes @c &sb
+ * to the base class initializer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_ostringstream(const __string_type& __str,
+ ios_base::openmode __mode = ios_base::out)
+ : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The buffer is deallocated by the stringbuf object, not the
+ * formatting stream.
+ */
+ ~basic_ostringstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_stringbuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+ /**
+ * @brief Copying out the string buffer.
+ * @return @c rdbuf()->str()
+ */
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+
+ /**
+ * @brief Setting a new buffer.
+ * @param s The string to use as a new sequence.
+ *
+ * Calls @c rdbuf()->str(s).
+ */
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+
+
+ // [27.7.4] Template class basic_stringstream
+ /**
+ * @brief Controlling input and output for std::string.
+ * @ingroup io
+ *
+ * This class supports reading from and writing to objects of type
+ * std::basic_string, using the inherited functions from
+ * std::basic_iostream. To control the associated sequence, an instance
+ * of std::basic_stringbuf is used, which this page refers to as @c sb.
+ */
+ template <typename _CharT, typename _Traits, typename _Alloc>
+ class basic_stringstream : public basic_iostream<_CharT, _Traits>
+ {
+ public:
+ // Types:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 251. basic_stringbuf missing allocator_type
+ typedef _Alloc allocator_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+
+ // Non-standard Types:
+ typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type;
+ typedef basic_iostream<char_type, traits_type> __iostream_type;
+
+ private:
+ __stringbuf_type _M_stringbuf;
+
+ public:
+ // Constructors/destructors
+ /**
+ * @brief Default constructor starts with an empty string buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * Initializes @c sb using @c mode, and passes @c &sb to the base
+ * class initializer. Does not allocate any buffer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
+ : __iostream_type(), _M_stringbuf(__m)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief Starts with an existing string buffer.
+ * @param str A string to copy as a starting buffer.
+ * @param mode Whether the buffer can read, or write, or both.
+ *
+ * Initializes @c sb using @a str and @c mode, and passes @c &sb
+ * to the base class initializer.
+ *
+ * That's a lie. We initialize the base class with NULL, because the
+ * string class does its own memory management.
+ */
+ explicit
+ basic_stringstream(const __string_type& __str,
+ ios_base::openmode __m = ios_base::out | ios_base::in)
+ : __iostream_type(), _M_stringbuf(__str, __m)
+ { this->init(&_M_stringbuf); }
+
+ /**
+ * @brief The destructor does nothing.
+ *
+ * The buffer is deallocated by the stringbuf object, not the
+ * formatting stream.
+ */
+ ~basic_stringstream()
+ { }
+
+ // Members:
+ /**
+ * @brief Accessing the underlying buffer.
+ * @return The current basic_stringbuf buffer.
+ *
+ * This hides both signatures of std::basic_ios::rdbuf().
+ */
+ __stringbuf_type*
+ rdbuf() const
+ { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+ /**
+ * @brief Copying out the string buffer.
+ * @return @c rdbuf()->str()
+ */
+ __string_type
+ str() const
+ { return _M_stringbuf.str(); }
+
+ /**
+ * @brief Setting a new buffer.
+ * @param s The string to use as a new sequence.
+ *
+ * Calls @c rdbuf()->str(s).
+ */
+ void
+ str(const __string_type& __s)
+ { _M_stringbuf.str(__s); }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/sstream.tcc>
+#endif
+
+#endif /* _GLIBCXX_SSTREAM */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/stack b/6/sources/cxx-stl/gnu-libstdc++/include/stack
new file mode 100644
index 0000000..4ee2c72
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/stack
@@ -0,0 +1,64 @@
+// <stack> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/stack
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_STACK
+#define _GLIBCXX_STACK 1
+
+#pragma GCC system_header
+
+#include <deque>
+#include <bits/stl_stack.h>
+
+#endif /* _GLIBCXX_STACK */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/stdatomic.h b/6/sources/cxx-stl/gnu-libstdc++/include/stdatomic.h
new file mode 100644
index 0000000..ecbacc9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/stdatomic.h
@@ -0,0 +1,221 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdatomic.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <bits/c++config.h>
+#include <stddef.h>
+#include <stdbool.h> // XXX need to define bool w/o stdbool.h in tr1/cstdbool
+
+#ifndef _GLIBCXX_STDATOMIC_H
+#define _GLIBCXX_STDATOMIC_H 1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+_GLIBCXX_BEGIN_EXTERN_C
+
+ /**
+ * @defgroup atomics Atomics
+ *
+ * Components for performing atomic operations.
+ * @{
+ */
+
+ /// Enumeration for memory_order
+ typedef enum memory_order
+ {
+ memory_order_relaxed,
+ memory_order_consume,
+ memory_order_acquire,
+ memory_order_release,
+ memory_order_acq_rel,
+ memory_order_seq_cst
+ } memory_order;
+
+ // Base for atomic_flag.
+ typedef struct __atomic_flag_base
+ {
+ bool _M_i;
+ } __atomic_flag_base;
+
+#define ATOMIC_FLAG_INIT { false }
+
+ /// 29.2 Lock-free Property
+#if defined(_GLIBCXX_ATOMIC_BUILTINS_1) && defined(_GLIBCXX_ATOMIC_BUILTINS_2) \
+ && defined(_GLIBCXX_ATOMIC_BUILTINS_4) && defined(_GLIBCXX_ATOMIC_BUILTINS_8)
+# define _GLIBCXX_ATOMIC_PROPERTY 2
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic2
+#elif defined(_GLIBCXX_ATOMIC_BUILTINS_1)
+# define _GLIBCXX_ATOMIC_PROPERTY 1
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic1
+#else
+# define _GLIBCXX_ATOMIC_PROPERTY 0
+# define _GLIBCXX_ATOMIC_NAMESPACE __atomic0
+#endif
+
+#define ATOMIC_INTEGRAL_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+#define ATOMIC_ADDRESS_LOCK_FREE _GLIBCXX_ATOMIC_PROPERTY
+
+ // Switch atomic integral base types based on C or C++. In
+ // addition, for "C" only provide type-generic macros for atomic
+ // operations. (As C++ accomplishes the same thing with sets of
+ // overloaded functions.
+#ifdef __cplusplus
+ inline namespace _GLIBCXX_ATOMIC_NAMESPACE { }
+# include <bits/atomicfwd_cxx.h>
+#else
+# include <bits/atomicfwd_c.h>
+#endif
+
+ // Typedefs for other atomic integral types.
+ typedef atomic_schar atomic_int_least8_t;
+ typedef atomic_uchar atomic_uint_least8_t;
+ typedef atomic_short atomic_int_least16_t;
+ typedef atomic_ushort atomic_uint_least16_t;
+ typedef atomic_int atomic_int_least32_t;
+ typedef atomic_uint atomic_uint_least32_t;
+ typedef atomic_llong atomic_int_least64_t;
+ typedef atomic_ullong atomic_uint_least64_t;
+
+ typedef atomic_schar atomic_int_fast8_t;
+ typedef atomic_uchar atomic_uint_fast8_t;
+ typedef atomic_short atomic_int_fast16_t;
+ typedef atomic_ushort atomic_uint_fast16_t;
+ typedef atomic_int atomic_int_fast32_t;
+ typedef atomic_uint atomic_uint_fast32_t;
+ typedef atomic_llong atomic_int_fast64_t;
+ typedef atomic_ullong atomic_uint_fast64_t;
+
+ typedef atomic_long atomic_intptr_t;
+ typedef atomic_ulong atomic_uintptr_t;
+
+ typedef atomic_long atomic_ssize_t;
+ typedef atomic_ulong atomic_size_t;
+
+ typedef atomic_llong atomic_intmax_t;
+ typedef atomic_ullong atomic_uintmax_t;
+
+ typedef atomic_long atomic_ptrdiff_t;
+
+ // Accessor functions for base atomic_flag type.
+ bool
+ atomic_flag_test_and_set_explicit(volatile __atomic_flag_base*, memory_order);
+
+ inline bool
+ atomic_flag_test_and_set(volatile __atomic_flag_base* __a)
+ { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); }
+
+ void
+ atomic_flag_clear_explicit(volatile __atomic_flag_base*, memory_order);
+
+ inline void
+ atomic_flag_clear(volatile __atomic_flag_base* __a)
+ { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }
+
+ void
+ __atomic_flag_wait_explicit(volatile __atomic_flag_base*, memory_order);
+
+ volatile __atomic_flag_base*
+ __atomic_flag_for_address(const volatile void* __z) __attribute__((const));
+
+ // Implementation specific defines.
+#define _ATOMIC_LOAD_(__a, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ volatile atomic_flag* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __r = *__p; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+#define _ATOMIC_STORE_(__a, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__m) __v = (__m); \
+ volatile atomic_flag* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ *__p = __v; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __v; })
+
+#define _ATOMIC_MODIFY_(__a, __o, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__m) __v = (__m); \
+ volatile atomic_flag* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __r = *__p; \
+ *__p __o __v; \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x) \
+ ({ volatile __typeof__ _ATOMIC_MEMBER_* __p = &_ATOMIC_MEMBER_; \
+ __typeof__(__e) __q = (__e); \
+ __typeof__(__m) __v = (__m); \
+ bool __r; \
+ volatile atomic_flag* __g = __atomic_flag_for_address(__p); \
+ __atomic_flag_wait_explicit(__g, __x); \
+ __typeof__ _ATOMIC_MEMBER_ __t__ = *__p; \
+ if (__t__ == *__q) { *__p = __v; __r = true; } \
+ else { *__q = __t__; __r = false; } \
+ atomic_flag_clear_explicit(__g, __x); \
+ __r; })
+
+ // @} group atomics
+
+_GLIBCXX_END_EXTERN_C
+_GLIBCXX_END_NAMESPACE
+
+// Inject into global namespace.
+#ifdef __cplusplus
+
+#include <cstdatomic>
+
+using std::memory_order;
+using std::memory_order_relaxed;
+using std::memory_order_consume;
+using std::memory_order_acquire;
+using std::memory_order_release;
+using std::memory_order_acq_rel;
+using std::memory_order_seq_cst;
+using std::atomic_flag;
+using std::atomic_bool;
+using std::atomic_char;
+using std::atomic_schar;
+using std::atomic_uchar;
+using std::atomic_short;
+using std::atomic_ushort;
+using std::atomic_int;
+using std::atomic_uint;
+using std::atomic_long;
+using std::atomic_ulong;
+using std::atomic_llong;
+using std::atomic_ullong;
+using std::atomic_wchar_t;
+using std::atomic_char16_t;
+using std::atomic_char32_t;
+using std::atomic_address;
+using std::atomic;
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/stdexcept b/6/sources/cxx-stl/gnu-libstdc++/include/stdexcept
new file mode 100644
index 0000000..9f5c976
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/stdexcept
@@ -0,0 +1,150 @@
+// Standard exception classes -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdexcept
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 19.1 Exception classes
+//
+
+#ifndef _GLIBCXX_STDEXCEPT
+#define _GLIBCXX_STDEXCEPT 1
+
+#pragma GCC system_header
+
+#include <exception>
+#include <string>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup exceptions
+ * @{
+ */
+
+ /** Logic errors represent problems in the internal logic of a program;
+ * in theory, these are preventable, and even detectable before the
+ * program runs (e.g., violations of class invariants).
+ * @brief One of two subclasses of exception.
+ */
+ class logic_error : public exception
+ {
+ string _M_msg;
+
+ public:
+ /** Takes a character string describing the error. */
+ explicit
+ logic_error(const string& __arg);
+
+ virtual
+ ~logic_error() throw();
+
+ /** Returns a C-style character string describing the general cause of
+ * the current error (the same string passed to the ctor). */
+ virtual const char*
+ what() const throw();
+ };
+
+ /** Thrown by the library, or by you, to report domain errors (domain in
+ * the mathematical sense). */
+ class domain_error : public logic_error
+ {
+ public:
+ explicit domain_error(const string& __arg);
+ };
+
+ /** Thrown to report invalid arguments to functions. */
+ class invalid_argument : public logic_error
+ {
+ public:
+ explicit invalid_argument(const string& __arg);
+ };
+
+ /** Thrown when an object is constructed that would exceed its maximum
+ * permitted size (e.g., a basic_string instance). */
+ class length_error : public logic_error
+ {
+ public:
+ explicit length_error(const string& __arg);
+ };
+
+ /** This represents an argument whose value is not within the expected
+ * range (e.g., boundary checks in basic_string). */
+ class out_of_range : public logic_error
+ {
+ public:
+ explicit out_of_range(const string& __arg);
+ };
+
+ /** Runtime errors represent problems outside the scope of a program;
+ * they cannot be easily predicted and can generally only be caught as
+ * the program executes.
+ * @brief One of two subclasses of exception.
+ */
+ class runtime_error : public exception
+ {
+ string _M_msg;
+
+ public:
+ /** Takes a character string describing the error. */
+ explicit
+ runtime_error(const string& __arg);
+
+ virtual
+ ~runtime_error() throw();
+
+ /** Returns a C-style character string describing the general cause of
+ * the current error (the same string passed to the ctor). */
+ virtual const char*
+ what() const throw();
+ };
+
+ /** Thrown to indicate range errors in internal computations. */
+ class range_error : public runtime_error
+ {
+ public:
+ explicit range_error(const string& __arg);
+ };
+
+ /** Thrown to indicate arithmetic overflow. */
+ class overflow_error : public runtime_error
+ {
+ public:
+ explicit overflow_error(const string& __arg);
+ };
+
+ /** Thrown to indicate arithmetic underflow. */
+ class underflow_error : public runtime_error
+ {
+ public:
+ explicit underflow_error(const string& __arg);
+ };
+
+ // @} group exceptions
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_STDEXCEPT */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/streambuf b/6/sources/cxx-stl/gnu-libstdc++/include/streambuf
new file mode 100644
index 0000000..790be0e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/streambuf
@@ -0,0 +1,799 @@
+// Stream buffer classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file streambuf
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 27.5 Stream buffers
+//
+
+#ifndef _GLIBXX_STREAMBUF
+#define _GLIBXX_STREAMBUF 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <iosfwd>
+#include <bits/localefwd.h>
+#include <bits/ios_base.h>
+#include <bits/cpp_type_traits.h>
+#include <ext/type_traits.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT, typename _Traits>
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*,
+ basic_streambuf<_CharT, _Traits>*, bool&);
+
+ /**
+ * @brief The actual work of input and output (interface).
+ *
+ * This is a base class. Derived stream buffers each control a
+ * pair of character sequences: one for input, and one for output.
+ *
+ * Section [27.5.1] of the standard describes the requirements and
+ * behavior of stream buffer classes. That section (three paragraphs)
+ * is reproduced here, for simplicity and accuracy.
+ *
+ * -# Stream buffers can impose various constraints on the sequences
+ * they control. Some constraints are:
+ * - The controlled input sequence can be not readable.
+ * - The controlled output sequence can be not writable.
+ * - The controlled sequences can be associated with the contents of
+ * other representations for character sequences, such as external
+ * files.
+ * - The controlled sequences can support operations @e directly to or
+ * from associated sequences.
+ * - The controlled sequences can impose limitations on how the
+ * program can read characters from a sequence, write characters to
+ * a sequence, put characters back into an input sequence, or alter
+ * the stream position.
+ * .
+ * -# Each sequence is characterized by three pointers which, if non-null,
+ * all point into the same @c charT array object. The array object
+ * represents, at any moment, a (sub)sequence of characters from the
+ * sequence. Operations performed on a sequence alter the values
+ * stored in these pointers, perform reads and writes directly to or
+ * from associated sequences, and alter "the stream position" and
+ * conversion state as needed to maintain this subsequence relationship.
+ * The three pointers are:
+ * - the <em>beginning pointer</em>, or lowest element address in the
+ * array (called @e xbeg here);
+ * - the <em>next pointer</em>, or next element address that is a
+ * current candidate for reading or writing (called @e xnext here);
+ * - the <em>end pointer</em>, or first element address beyond the
+ * end of the array (called @e xend here).
+ * .
+ * -# The following semantic constraints shall always apply for any set
+ * of three pointers for a sequence, using the pointer names given
+ * immediately above:
+ * - If @e xnext is not a null pointer, then @e xbeg and @e xend shall
+ * also be non-null pointers into the same @c charT array, as
+ * described above; otherwise, @e xbeg and @e xend shall also be null.
+ * - If @e xnext is not a null pointer and @e xnext < @e xend for an
+ * output sequence, then a <em>write position</em> is available.
+ * In this case, @e *xnext shall be assignable as the next element
+ * to write (to put, or to store a character value, into the sequence).
+ * - If @e xnext is not a null pointer and @e xbeg < @e xnext for an
+ * input sequence, then a <em>putback position</em> is available.
+ * In this case, @e xnext[-1] shall have a defined value and is the
+ * next (preceding) element to store a character that is put back
+ * into the input sequence.
+ * - If @e xnext is not a null pointer and @e xnext< @e xend for an
+ * input sequence, then a <em>read position</em> is available.
+ * In this case, @e *xnext shall have a defined value and is the
+ * next element to read (to get, or to obtain a character value,
+ * from the sequence).
+ */
+ template<typename _CharT, typename _Traits>
+ class basic_streambuf
+ {
+ public:
+ //@{
+ /**
+ * These are standard types. They permit a standardized way of
+ * referring to names of (or names dependant on) the template
+ * parameters, which are specific to the implementation.
+ */
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename traits_type::int_type int_type;
+ typedef typename traits_type::pos_type pos_type;
+ typedef typename traits_type::off_type off_type;
+ //@}
+
+ //@{
+ /// This is a non-standard type.
+ typedef basic_streambuf<char_type, traits_type> __streambuf_type;
+ //@}
+
+ friend class basic_ios<char_type, traits_type>;
+ friend class basic_istream<char_type, traits_type>;
+ friend class basic_ostream<char_type, traits_type>;
+ friend class istreambuf_iterator<char_type, traits_type>;
+ friend class ostreambuf_iterator<char_type, traits_type>;
+
+ friend streamsize
+ __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&);
+
+ template<bool _IsMove, typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ _CharT2*>::__type
+ __copy_move_a2(istreambuf_iterator<_CharT2>,
+ istreambuf_iterator<_CharT2>, _CharT2*);
+
+ template<typename _CharT2>
+ friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
+ istreambuf_iterator<_CharT2> >::__type
+ find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
+ const _CharT2&);
+
+ template<typename _CharT2, typename _Traits2>
+ friend basic_istream<_CharT2, _Traits2>&
+ operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*);
+
+ template<typename _CharT2, typename _Traits2, typename _Alloc>
+ friend basic_istream<_CharT2, _Traits2>&
+ operator>>(basic_istream<_CharT2, _Traits2>&,
+ basic_string<_CharT2, _Traits2, _Alloc>&);
+
+ template<typename _CharT2, typename _Traits2, typename _Alloc>
+ friend basic_istream<_CharT2, _Traits2>&
+ getline(basic_istream<_CharT2, _Traits2>&,
+ basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2);
+
+ protected:
+ //@{
+ /**
+ * This is based on _IO_FILE, just reordered to be more consistent,
+ * and is intended to be the most minimal abstraction for an
+ * internal buffer.
+ * - get == input == read
+ * - put == output == write
+ */
+ char_type* _M_in_beg; // Start of get area.
+ char_type* _M_in_cur; // Current read area.
+ char_type* _M_in_end; // End of get area.
+ char_type* _M_out_beg; // Start of put area.
+ char_type* _M_out_cur; // Current put area.
+ char_type* _M_out_end; // End of put area.
+
+ /// Current locale setting.
+ locale _M_buf_locale;
+
+ public:
+ /// Destructor deallocates no buffer space.
+ virtual
+ ~basic_streambuf()
+ { }
+
+ // [27.5.2.2.1] locales
+ /**
+ * @brief Entry point for imbue().
+ * @param loc The new locale.
+ * @return The previous locale.
+ *
+ * Calls the derived imbue(loc).
+ */
+ locale
+ pubimbue(const locale &__loc)
+ {
+ locale __tmp(this->getloc());
+ this->imbue(__loc);
+ _M_buf_locale = __loc;
+ return __tmp;
+ }
+
+ /**
+ * @brief Locale access.
+ * @return The current locale in effect.
+ *
+ * If pubimbue(loc) has been called, then the most recent @c loc
+ * is returned. Otherwise the global locale in effect at the time
+ * of construction is returned.
+ */
+ locale
+ getloc() const
+ { return _M_buf_locale; }
+
+ // [27.5.2.2.2] buffer management and positioning
+ //@{
+ /**
+ * @brief Entry points for derived buffer functions.
+ *
+ * The public versions of @c pubfoo dispatch to the protected
+ * derived @c foo member functions, passing the arguments (if any)
+ * and returning the result unchanged.
+ */
+ __streambuf_type*
+ pubsetbuf(char_type* __s, streamsize __n)
+ { return this->setbuf(__s, __n); }
+
+ pos_type
+ pubseekoff(off_type __off, ios_base::seekdir __way,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ { return this->seekoff(__off, __way, __mode); }
+
+ pos_type
+ pubseekpos(pos_type __sp,
+ ios_base::openmode __mode = ios_base::in | ios_base::out)
+ { return this->seekpos(__sp, __mode); }
+
+ int
+ pubsync() { return this->sync(); }
+ //@}
+
+ // [27.5.2.2.3] get area
+ /**
+ * @brief Looking ahead into the stream.
+ * @return The number of characters available.
+ *
+ * If a read position is available, returns the number of characters
+ * available for reading before the buffer must be refilled.
+ * Otherwise returns the derived @c showmanyc().
+ */
+ streamsize
+ in_avail()
+ {
+ const streamsize __ret = this->egptr() - this->gptr();
+ return __ret ? __ret : this->showmanyc();
+ }
+
+ /**
+ * @brief Getting the next character.
+ * @return The next character, or eof.
+ *
+ * Calls @c sbumpc(), and if that function returns
+ * @c traits::eof(), so does this function. Otherwise, @c sgetc().
+ */
+ int_type
+ snextc()
+ {
+ int_type __ret = traits_type::eof();
+ if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(),
+ __ret), true))
+ __ret = this->sgetc();
+ return __ret;
+ }
+
+ /**
+ * @brief Getting the next character.
+ * @return The next character, or eof.
+ *
+ * If the input read position is available, returns that character
+ * and increments the read pointer, otherwise calls and returns
+ * @c uflow().
+ */
+ int_type
+ sbumpc()
+ {
+ int_type __ret;
+ if (__builtin_expect(this->gptr() < this->egptr(), true))
+ {
+ __ret = traits_type::to_int_type(*this->gptr());
+ this->gbump(1);
+ }
+ else
+ __ret = this->uflow();
+ return __ret;
+ }
+
+ /**
+ * @brief Getting the next character.
+ * @return The next character, or eof.
+ *
+ * If the input read position is available, returns that character,
+ * otherwise calls and returns @c underflow(). Does not move the
+ * read position after fetching the character.
+ */
+ int_type
+ sgetc()
+ {
+ int_type __ret;
+ if (__builtin_expect(this->gptr() < this->egptr(), true))
+ __ret = traits_type::to_int_type(*this->gptr());
+ else
+ __ret = this->underflow();
+ return __ret;
+ }
+
+ /**
+ * @brief Entry point for xsgetn.
+ * @param s A buffer area.
+ * @param n A count.
+ *
+ * Returns xsgetn(s,n). The effect is to fill @a s[0] through
+ * @a s[n-1] with characters from the input sequence, if possible.
+ */
+ streamsize
+ sgetn(char_type* __s, streamsize __n)
+ { return this->xsgetn(__s, __n); }
+
+ // [27.5.2.2.4] putback
+ /**
+ * @brief Pushing characters back into the input stream.
+ * @param c The character to push back.
+ * @return The previous character, if possible.
+ *
+ * Similar to sungetc(), but @a c is pushed onto the stream instead
+ * of "the previous character". If successful, the next character
+ * fetched from the input stream will be @a c.
+ */
+ int_type
+ sputbackc(char_type __c)
+ {
+ int_type __ret;
+ const bool __testpos = this->eback() < this->gptr();
+ if (__builtin_expect(!__testpos ||
+ !traits_type::eq(__c, this->gptr()[-1]), false))
+ __ret = this->pbackfail(traits_type::to_int_type(__c));
+ else
+ {
+ this->gbump(-1);
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ return __ret;
+ }
+
+ /**
+ * @brief Moving backwards in the input stream.
+ * @return The previous character, if possible.
+ *
+ * If a putback position is available, this function decrements the
+ * input pointer and returns that character. Otherwise, calls and
+ * returns pbackfail(). The effect is to "unget" the last character
+ * "gotten".
+ */
+ int_type
+ sungetc()
+ {
+ int_type __ret;
+ if (__builtin_expect(this->eback() < this->gptr(), true))
+ {
+ this->gbump(-1);
+ __ret = traits_type::to_int_type(*this->gptr());
+ }
+ else
+ __ret = this->pbackfail();
+ return __ret;
+ }
+
+ // [27.5.2.2.5] put area
+ /**
+ * @brief Entry point for all single-character output functions.
+ * @param c A character to output.
+ * @return @a c, if possible.
+ *
+ * One of two public output functions.
+ *
+ * If a write position is available for the output sequence (i.e.,
+ * the buffer is not full), stores @a c in that position, increments
+ * the position, and returns @c traits::to_int_type(c). If a write
+ * position is not available, returns @c overflow(c).
+ */
+ int_type
+ sputc(char_type __c)
+ {
+ int_type __ret;
+ if (__builtin_expect(this->pptr() < this->epptr(), true))
+ {
+ *this->pptr() = __c;
+ this->pbump(1);
+ __ret = traits_type::to_int_type(__c);
+ }
+ else
+ __ret = this->overflow(traits_type::to_int_type(__c));
+ return __ret;
+ }
+
+ /**
+ * @brief Entry point for all single-character output functions.
+ * @param s A buffer read area.
+ * @param n A count.
+ *
+ * One of two public output functions.
+ *
+ *
+ * Returns xsputn(s,n). The effect is to write @a s[0] through
+ * @a s[n-1] to the output sequence, if possible.
+ */
+ streamsize
+ sputn(const char_type* __s, streamsize __n)
+ { return this->xsputn(__s, __n); }
+
+ protected:
+ /**
+ * @brief Base constructor.
+ *
+ * Only called from derived constructors, and sets up all the
+ * buffer data to zero, including the pointers described in the
+ * basic_streambuf class description. Note that, as a result,
+ * - the class starts with no read nor write positions available,
+ * - this is not an error
+ */
+ basic_streambuf()
+ : _M_in_beg(0), _M_in_cur(0), _M_in_end(0),
+ _M_out_beg(0), _M_out_cur(0), _M_out_end(0),
+ _M_buf_locale(locale())
+ { }
+
+ // [27.5.2.3.1] get area access
+ //@{
+ /**
+ * @brief Access to the get area.
+ *
+ * These functions are only available to other protected functions,
+ * including derived classes.
+ *
+ * - eback() returns the beginning pointer for the input sequence
+ * - gptr() returns the next pointer for the input sequence
+ * - egptr() returns the end pointer for the input sequence
+ */
+ char_type*
+ eback() const { return _M_in_beg; }
+
+ char_type*
+ gptr() const { return _M_in_cur; }
+
+ char_type*
+ egptr() const { return _M_in_end; }
+ //@}
+
+ /**
+ * @brief Moving the read position.
+ * @param n The delta by which to move.
+ *
+ * This just advances the read position without returning any data.
+ */
+ void
+ gbump(int __n) { _M_in_cur += __n; }
+
+ /**
+ * @brief Setting the three read area pointers.
+ * @param gbeg A pointer.
+ * @param gnext A pointer.
+ * @param gend A pointer.
+ * @post @a gbeg == @c eback(), @a gnext == @c gptr(), and
+ * @a gend == @c egptr()
+ */
+ void
+ setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
+ {
+ _M_in_beg = __gbeg;
+ _M_in_cur = __gnext;
+ _M_in_end = __gend;
+ }
+
+ // [27.5.2.3.2] put area access
+ //@{
+ /**
+ * @brief Access to the put area.
+ *
+ * These functions are only available to other protected functions,
+ * including derived classes.
+ *
+ * - pbase() returns the beginning pointer for the output sequence
+ * - pptr() returns the next pointer for the output sequence
+ * - epptr() returns the end pointer for the output sequence
+ */
+ char_type*
+ pbase() const { return _M_out_beg; }
+
+ char_type*
+ pptr() const { return _M_out_cur; }
+
+ char_type*
+ epptr() const { return _M_out_end; }
+ //@}
+
+ /**
+ * @brief Moving the write position.
+ * @param n The delta by which to move.
+ *
+ * This just advances the write position without returning any data.
+ */
+ void
+ pbump(int __n) { _M_out_cur += __n; }
+
+ /**
+ * @brief Setting the three write area pointers.
+ * @param pbeg A pointer.
+ * @param pend A pointer.
+ * @post @a pbeg == @c pbase(), @a pbeg == @c pptr(), and
+ * @a pend == @c epptr()
+ */
+ void
+ setp(char_type* __pbeg, char_type* __pend)
+ {
+ _M_out_beg = _M_out_cur = __pbeg;
+ _M_out_end = __pend;
+ }
+
+ // [27.5.2.4] virtual functions
+ // [27.5.2.4.1] locales
+ /**
+ * @brief Changes translations.
+ * @param loc A new locale.
+ *
+ * Translations done during I/O which depend on the current locale
+ * are changed by this call. The standard adds, "Between invocations
+ * of this function a class derived from streambuf can safely cache
+ * results of calls to locale functions and to members of facets
+ * so obtained."
+ *
+ * @note Base class version does nothing.
+ */
+ virtual void
+ imbue(const locale&)
+ { }
+
+ // [27.5.2.4.2] buffer management and positioning
+ /**
+ * @brief Manipulates the buffer.
+ *
+ * Each derived class provides its own appropriate behavior. See
+ * the next-to-last paragraph of
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html
+ * for more on this function.
+ *
+ * @note Base class version does nothing, returns @c this.
+ */
+ virtual basic_streambuf<char_type,_Traits>*
+ setbuf(char_type*, streamsize)
+ { return this; }
+
+ /**
+ * @brief Alters the stream positions.
+ *
+ * Each derived class provides its own appropriate behavior.
+ * @note Base class version does nothing, returns a @c pos_type
+ * that represents an invalid stream position.
+ */
+ virtual pos_type
+ seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+ { return pos_type(off_type(-1)); }
+
+ /**
+ * @brief Alters the stream positions.
+ *
+ * Each derived class provides its own appropriate behavior.
+ * @note Base class version does nothing, returns a @c pos_type
+ * that represents an invalid stream position.
+ */
+ virtual pos_type
+ seekpos(pos_type,
+ ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+ { return pos_type(off_type(-1)); }
+
+ /**
+ * @brief Synchronizes the buffer arrays with the controlled sequences.
+ * @return -1 on failure.
+ *
+ * Each derived class provides its own appropriate behavior,
+ * including the definition of "failure".
+ * @note Base class version does nothing, returns zero.
+ */
+ virtual int
+ sync() { return 0; }
+
+ // [27.5.2.4.3] get area
+ /**
+ * @brief Investigating the data available.
+ * @return An estimate of the number of characters available in the
+ * input sequence, or -1.
+ *
+ * "If it returns a positive value, then successive calls to
+ * @c underflow() will not return @c traits::eof() until at least that
+ * number of characters have been supplied. If @c showmanyc()
+ * returns -1, then calls to @c underflow() or @c uflow() will fail."
+ * [27.5.2.4.3]/1
+ *
+ * @note Base class version does nothing, returns zero.
+ * @note The standard adds that "the intention is not only that the
+ * calls [to underflow or uflow] will not return @c eof() but
+ * that they will return "immediately".
+ * @note The standard adds that "the morphemes of @c showmanyc are
+ * "es-how-many-see", not "show-manic".
+ */
+ virtual streamsize
+ showmanyc() { return 0; }
+
+ /**
+ * @brief Multiple character extraction.
+ * @param s A buffer area.
+ * @param n Maximum number of characters to assign.
+ * @return The number of characters assigned.
+ *
+ * Fills @a s[0] through @a s[n-1] with characters from the input
+ * sequence, as if by @c sbumpc(). Stops when either @a n characters
+ * have been copied, or when @c traits::eof() would be copied.
+ *
+ * It is expected that derived classes provide a more efficient
+ * implementation by overriding this definition.
+ */
+ virtual streamsize
+ xsgetn(char_type* __s, streamsize __n);
+
+ /**
+ * @brief Fetches more data from the controlled sequence.
+ * @return The first character from the <em>pending sequence</em>.
+ *
+ * Informally, this function is called when the input buffer is
+ * exhausted (or does not exist, as buffering need not actually be
+ * done). If a buffer exists, it is "refilled". In either case, the
+ * next available character is returned, or @c traits::eof() to
+ * indicate a null pending sequence.
+ *
+ * For a formal definition of the pending sequence, see a good text
+ * such as Langer & Kreft, or [27.5.2.4.3]/7-14.
+ *
+ * A functioning input streambuf can be created by overriding only
+ * this function (no buffer area will be used). For an example, see
+ * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25.html
+ *
+ * @note Base class version does nothing, returns eof().
+ */
+ virtual int_type
+ underflow()
+ { return traits_type::eof(); }
+
+ /**
+ * @brief Fetches more data from the controlled sequence.
+ * @return The first character from the <em>pending sequence</em>.
+ *
+ * Informally, this function does the same thing as @c underflow(),
+ * and in fact is required to call that function. It also returns
+ * the new character, like @c underflow() does. However, this
+ * function also moves the read position forward by one.
+ */
+ virtual int_type
+ uflow()
+ {
+ int_type __ret = traits_type::eof();
+ const bool __testeof = traits_type::eq_int_type(this->underflow(),
+ __ret);
+ if (!__testeof)
+ {
+ __ret = traits_type::to_int_type(*this->gptr());
+ this->gbump(1);
+ }
+ return __ret;
+ }
+
+ // [27.5.2.4.4] putback
+ /**
+ * @brief Tries to back up the input sequence.
+ * @param c The character to be inserted back into the sequence.
+ * @return eof() on failure, "some other value" on success
+ * @post The constraints of @c gptr(), @c eback(), and @c pptr()
+ * are the same as for @c underflow().
+ *
+ * @note Base class version does nothing, returns eof().
+ */
+ virtual int_type
+ pbackfail(int_type /* __c */ = traits_type::eof())
+ { return traits_type::eof(); }
+
+ // Put area:
+ /**
+ * @brief Multiple character insertion.
+ * @param s A buffer area.
+ * @param n Maximum number of characters to write.
+ * @return The number of characters written.
+ *
+ * Writes @a s[0] through @a s[n-1] to the output sequence, as if
+ * by @c sputc(). Stops when either @a n characters have been
+ * copied, or when @c sputc() would return @c traits::eof().
+ *
+ * It is expected that derived classes provide a more efficient
+ * implementation by overriding this definition.
+ */
+ virtual streamsize
+ xsputn(const char_type* __s, streamsize __n);
+
+ /**
+ * @brief Consumes data from the buffer; writes to the
+ * controlled sequence.
+ * @param c An additional character to consume.
+ * @return eof() to indicate failure, something else (usually
+ * @a c, or not_eof())
+ *
+ * Informally, this function is called when the output buffer is full
+ * (or does not exist, as buffering need not actually be done). If a
+ * buffer exists, it is "consumed", with "some effect" on the
+ * controlled sequence. (Typically, the buffer is written out to the
+ * sequence verbatim.) In either case, the character @a c is also
+ * written out, if @a c is not @c eof().
+ *
+ * For a formal definition of this function, see a good text
+ * such as Langer & Kreft, or [27.5.2.4.5]/3-7.
+ *
+ * A functioning output streambuf can be created by overriding only
+ * this function (no buffer area will be used).
+ *
+ * @note Base class version does nothing, returns eof().
+ */
+ virtual int_type
+ overflow(int_type /* __c */ = traits_type::eof())
+ { return traits_type::eof(); }
+
+#if _GLIBCXX_DEPRECATED
+ // Annex D.6
+ public:
+ /**
+ * @brief Tosses a character.
+ *
+ * Advances the read pointer, ignoring the character that would have
+ * been read.
+ *
+ * See http://gcc.gnu.org/ml/libstdc++/2002-05/msg00168.html
+ */
+ void
+ stossc()
+ {
+ if (this->gptr() < this->egptr())
+ this->gbump(1);
+ else
+ this->uflow();
+ }
+#endif
+
+ private:
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // Side effect of DR 50.
+ basic_streambuf(const __streambuf_type& __sb)
+ : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur),
+ _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg),
+ _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur),
+ _M_buf_locale(__sb._M_buf_locale)
+ { }
+
+ __streambuf_type&
+ operator=(const __streambuf_type&) { return *this; };
+ };
+
+ // Explicit specialization declarations, defined in src/streambuf.cc.
+ template<>
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<char>* __sbin,
+ basic_streambuf<char>* __sbout, bool& __ineof);
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ streamsize
+ __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin,
+ basic_streambuf<wchar_t>* __sbout, bool& __ineof);
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/streambuf.tcc>
+#endif
+
+#endif /* _GLIBCXX_STREAMBUF */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/string b/6/sources/cxx-stl/gnu-libstdc++/include/string
new file mode 100644
index 0000000..8c5949f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/string
@@ -0,0 +1,59 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+// 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/string
+ * This is a Standard C++ Library header.
+ */
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+#ifndef _GLIBCXX_STRING
+#define _GLIBCXX_STRING 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stringfwd.h>
+#include <bits/char_traits.h> // NB: In turn includes stl_algobase.h
+#include <bits/allocator.h>
+#include <bits/cpp_type_traits.h>
+#include <bits/localefwd.h> // For operators >>, <<, and getline.
+#include <bits/ostream_insert.h>
+#include <bits/stl_iterator_base_types.h>
+#include <bits/stl_iterator_base_funcs.h>
+#include <bits/stl_iterator.h>
+#include <bits/stl_function.h> // For less
+#include <ext/numeric_traits.h>
+#include <bits/stl_algobase.h>
+#include <bits/basic_string.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/basic_string.tcc>
+#endif
+
+#endif /* _GLIBCXX_STRING */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/system_error b/6/sources/cxx-stl/gnu-libstdc++/include/system_error
new file mode 100644
index 0000000..02dd2df
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/system_error
@@ -0,0 +1,353 @@
+// <system_error> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file system_error
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_SYSTEM_ERROR
+#define _GLIBCXX_SYSTEM_ERROR 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <bits/c++config.h>
+#include <bits/error_constants.h>
+#include <iosfwd>
+#include <stdexcept>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ class error_code;
+ class error_condition;
+ class error_category;
+ class system_error;
+
+ /// is_error_code_enum
+ template<typename _Tp>
+ struct is_error_code_enum : public false_type { };
+
+ /// is_error_condition_enum
+ template<typename _Tp>
+ struct is_error_condition_enum : public false_type { };
+
+ template<>
+ struct is_error_condition_enum<errc>
+ : public true_type { };
+
+
+ /// error_category
+ class error_category
+ {
+ protected:
+ error_category() = default;
+
+ public:
+ virtual ~error_category() { }
+
+ error_category(const error_category&) = delete;
+ error_category& operator=(const error_category&) = delete;
+
+ virtual const char*
+ name() const = 0;
+
+ virtual string
+ message(int) const = 0;
+
+ virtual error_condition
+ default_error_condition(int __i) const;
+
+ virtual bool
+ equivalent(int __i, const error_condition& __cond) const;
+
+ virtual bool
+ equivalent(const error_code& __code, int __i) const;
+
+ bool
+ operator<(const error_category& __other) const
+ { return less<const error_category*>()(this, &__other); }
+
+ bool
+ operator==(const error_category& __other) const
+ { return this == &__other; }
+
+ bool
+ operator!=(const error_category& __other) const
+ { return this != &__other; }
+ };
+
+ // DR 890.
+ const error_category& system_category();
+ const error_category& generic_category();
+
+ error_code make_error_code(errc);
+
+ /// error_code
+ // Implementation-specific error identification
+ struct error_code
+ {
+ error_code()
+ : _M_value(0), _M_cat(&system_category()) { }
+
+ error_code(int __v, const error_category& __cat)
+ : _M_value(__v), _M_cat(&__cat) { }
+
+ template<typename _ErrorCodeEnum>
+ error_code(_ErrorCodeEnum __e,
+ typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value>::type* = 0)
+ { *this = make_error_code(__e); }
+
+ void
+ assign(int __v, const error_category& __cat)
+ {
+ _M_value = __v;
+ _M_cat = &__cat;
+ }
+
+ void
+ clear()
+ { assign(0, system_category()); }
+
+ // DR 804.
+ template<typename _ErrorCodeEnum>
+ typename enable_if<is_error_code_enum<_ErrorCodeEnum>::value,
+ error_code&>::type
+ operator=(_ErrorCodeEnum __e)
+ { return *this = make_error_code(__e); }
+
+ int
+ value() const { return _M_value; }
+
+ const error_category&
+ category() const { return *_M_cat; }
+
+ error_condition
+ default_error_condition() const;
+
+ string
+ message() const
+ { return category().message(value()); }
+
+ // Safe bool idiom.
+ // explicit operator bool() const throw()
+ // { return _M_value != 0; }
+ typedef void (*__bool_type)();
+
+ static void __not_bool_type() { }
+
+ operator __bool_type() const
+ { return _M_value != 0 ? &__not_bool_type : false; }
+
+ // DR 804.
+ private:
+ int _M_value;
+ const error_category* _M_cat;
+ };
+
+ // 19.4.2.6 non-member functions
+ inline error_code
+ make_error_code(errc __e)
+ { return error_code(static_cast<int>(__e), generic_category()); }
+
+ inline bool
+ operator<(const error_code& __lhs, const error_code& __rhs)
+ {
+ return (__lhs.category() < __rhs.category()
+ || (__lhs.category() == __rhs.category()
+ && __lhs.value() < __rhs.value()));
+ }
+
+ template<typename _CharT, typename _Traits>
+ basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
+ { return (__os << __e.category().name() << ':' << __e.value()); }
+
+ error_condition make_error_condition(errc);
+
+ /// error_condition
+ // Portable error identification
+ struct error_condition
+ {
+ error_condition()
+ : _M_value(0), _M_cat(&generic_category()) { }
+
+ error_condition(int __v, const error_category& __cat)
+ : _M_value(__v), _M_cat(&__cat) { }
+
+ template<typename _ErrorConditionEnum>
+ error_condition(_ErrorConditionEnum __e,
+ typename enable_if<is_error_condition_enum
+ <_ErrorConditionEnum>::value>::type* = 0)
+ { *this = make_error_condition(__e); }
+
+ void
+ assign(int __v, const error_category& __cat)
+ {
+ _M_value = __v;
+ _M_cat = &__cat;
+ }
+
+ // DR 804.
+ template<typename _ErrorConditionEnum>
+ typename enable_if<is_error_condition_enum
+ <_ErrorConditionEnum>::value, error_condition&>::type
+ operator=(_ErrorConditionEnum __e)
+ { return *this = make_error_condition(__e); }
+
+ void
+ clear()
+ { assign(0, generic_category()); }
+
+ // 19.4.3.4 observers
+ int
+ value() const { return _M_value; }
+
+ const error_category&
+ category() const { return *_M_cat; }
+
+ string
+ message() const
+ { return category().message(value()); }
+
+ // Safe bool idiom.
+ // explicit operator bool() const throw()
+ // { return _M_value != 0; }
+ typedef void (*__bool_type)();
+
+ static void __not_bool_type() { }
+
+ operator __bool_type() const
+ { return _M_value != 0 ? &__not_bool_type : false; }
+
+ // DR 804.
+ private:
+ int _M_value;
+ const error_category* _M_cat;
+ };
+
+ // 19.4.3.6 non-member functions
+ inline error_condition
+ make_error_condition(errc __e)
+ { return error_condition(static_cast<int>(__e), generic_category()); }
+
+ inline bool
+ operator<(const error_condition& __lhs, const error_condition& __rhs)
+ {
+ return (__lhs.category() < __rhs.category()
+ || (__lhs.category() == __rhs.category()
+ && __lhs.value() < __rhs.value()));
+ }
+
+ // 19.4.4 Comparison operators
+ inline bool
+ operator==(const error_code& __lhs, const error_code& __rhs)
+ { return (__lhs.category() == __rhs.category()
+ && __lhs.value() == __rhs.value()); }
+
+ inline bool
+ operator==(const error_code& __lhs, const error_condition& __rhs)
+ {
+ return (__lhs.category().equivalent(__lhs.value(), __rhs)
+ || __rhs.category().equivalent(__lhs, __rhs.value()));
+ }
+
+ inline bool
+ operator==(const error_condition& __lhs, const error_code& __rhs)
+ {
+ return (__rhs.category().equivalent(__rhs.value(), __lhs)
+ || __lhs.category().equivalent(__rhs, __lhs.value()));
+ }
+
+ inline bool
+ operator==(const error_condition& __lhs, const error_condition& __rhs)
+ {
+ return (__lhs.category() == __rhs.category()
+ && __lhs.value() == __rhs.value());
+ }
+
+ inline bool
+ operator!=(const error_code& __lhs, const error_code& __rhs)
+ { return !(__lhs == __rhs); }
+
+ inline bool
+ operator!=(const error_code& __lhs, const error_condition& __rhs)
+ { return !(__lhs == __rhs); }
+
+ inline bool
+ operator!=(const error_condition& __lhs, const error_code& __rhs)
+ { return !(__lhs == __rhs); }
+
+ inline bool
+ operator!=(const error_condition& __lhs, const error_condition& __rhs)
+ { return !(__lhs == __rhs); }
+
+
+ /**
+ * @brief Thrown to indicate error code of underlying system.
+ *
+ * @ingroup exceptions
+ */
+ class system_error : public std::runtime_error
+ {
+ private:
+ error_code _M_code;
+
+ public:
+ system_error(error_code __ec = error_code())
+ : runtime_error(""), _M_code(__ec) { }
+
+ system_error(error_code __ec, const string& __what)
+ : runtime_error(__what), _M_code(__ec) { }
+
+ /*
+ * TODO: Add const char* ctors to all exceptions.
+ *
+ * system_error(error_code __ec, const char* __what)
+ * : runtime_error(__what), _M_code(__ec) { }
+ *
+ * system_error(int __v, const error_category& __ecat, const char* __what)
+ * : runtime_error(__what), _M_code(error_code(__v, __ecat)) { }
+ */
+
+ system_error(int __v, const error_category& __ecat)
+ : runtime_error(""), _M_code(error_code(__v, __ecat)) { }
+
+ system_error(int __v, const error_category& __ecat, const string& __what)
+ : runtime_error(__what), _M_code(error_code(__v, __ecat)) { }
+
+ virtual ~system_error() throw();
+
+ const error_code&
+ code() const throw() { return _M_code; }
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_SYSTEM_ERROR
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tgmath.h b/6/sources/cxx-stl/gnu-libstdc++/include/tgmath.h
new file mode 100644
index 0000000..3d84d37
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tgmath.h
@@ -0,0 +1,42 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tgmath.h
+ * This is a Standard C++ Library header.
+ */
+
+#include <bits/c++config.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# include <ctgmath>
+#else
+# if _GLIBCXX_HAVE_TGMATH_H
+# include_next <tgmath.h>
+# endif
+#endif
+
+#ifndef _GLIBCXX_TGMATH_H
+#define _GLIBCXX_TGMATH_H 1
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/thread b/6/sources/cxx-stl/gnu-libstdc++/include/thread
new file mode 100644
index 0000000..6f735a0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/thread
@@ -0,0 +1,284 @@
+// <thread> -*- C++ -*-
+
+// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file thread
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_THREAD
+#define _GLIBCXX_THREAD 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <chrono>
+#include <functional>
+#include <memory>
+#include <mutex>
+#include <condition_variable>
+#include <cstddef>
+#include <bits/functexcept.h>
+#include <bits/gthr.h>
+
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+
+namespace std
+{
+ /**
+ * @defgroup threads Threads
+ * @ingroup concurrency
+ *
+ * Classes for thread support.
+ * @{
+ */
+
+ /// thread
+ class thread
+ {
+ public:
+ typedef __gthread_t native_handle_type;
+ struct _Impl_base;
+ typedef shared_ptr<_Impl_base> __shared_base_type;
+
+ /// thread::id
+ class id
+ {
+ native_handle_type _M_thread;
+
+ public:
+ id() : _M_thread() { }
+
+ explicit
+ id(native_handle_type __id) : _M_thread(__id) { }
+
+ private:
+ friend class thread;
+
+ friend bool
+ operator==(thread::id __x, thread::id __y)
+ { return __gthread_equal(__x._M_thread, __y._M_thread); }
+
+ friend bool
+ operator<(thread::id __x, thread::id __y)
+ { return __x._M_thread < __y._M_thread; }
+
+ template<class _CharT, class _Traits>
+ friend basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id);
+ };
+
+ // Simple base type that the templatized, derived class containing
+ // an arbitrary functor can be converted to and called.
+ struct _Impl_base
+ {
+ __shared_base_type _M_this_ptr;
+
+ virtual ~_Impl_base() = default;
+
+ virtual void _M_run() = 0;
+ };
+
+ template<typename _Callable>
+ struct _Impl : public _Impl_base
+ {
+ _Callable _M_func;
+
+ _Impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f))
+ { }
+
+ void
+ _M_run() { _M_func(); }
+ };
+
+ private:
+ id _M_id;
+
+ public:
+ thread() = default;
+ thread(const thread&) = delete;
+
+ thread(thread&& __t)
+ { swap(__t); }
+
+ template<typename _Callable>
+ explicit thread(_Callable __f)
+ { _M_start_thread(_M_make_routine<_Callable>(__f)); }
+
+ template<typename _Callable, typename... _Args>
+ thread(_Callable&& __f, _Args&&... __args)
+ { _M_start_thread(_M_make_routine(std::bind(__f, __args...))); }
+
+ ~thread()
+ {
+ if (joinable())
+ std::terminate();
+ }
+
+ thread& operator=(const thread&) = delete;
+
+ thread& operator=(thread&& __t)
+ {
+ if (joinable())
+ std::terminate();
+ swap(__t);
+ return *this;
+ }
+
+ void
+ swap(thread&& __t)
+ { std::swap(_M_id, __t._M_id); }
+
+ bool
+ joinable() const
+ { return !(_M_id == id()); }
+
+ void
+ join();
+
+ void
+ detach();
+
+ thread::id
+ get_id() const
+ { return _M_id; }
+
+ /** @pre thread is joinable
+ */
+ native_handle_type
+ native_handle()
+ { return _M_id._M_thread; }
+
+ // Returns a value that hints at the number of hardware thread contexts.
+ static unsigned int
+ hardware_concurrency()
+ { return 0; }
+
+ private:
+ void
+ _M_start_thread(__shared_base_type);
+
+ template<typename _Callable>
+ shared_ptr<_Impl<_Callable>>
+ _M_make_routine(_Callable&& __f)
+ {
+ // Create and allocate full data structure, not base.
+ return make_shared<_Impl<_Callable>>(std::forward<_Callable>(__f));
+ }
+ };
+
+ inline void
+ swap(thread& __x, thread& __y)
+ { __x.swap(__y); }
+
+ inline void
+ swap(thread&& __x, thread& __y)
+ { __x.swap(__y); }
+
+ inline void
+ swap(thread& __x, thread&& __y)
+ { __x.swap(__y); }
+
+ inline bool
+ operator!=(thread::id __x, thread::id __y)
+ { return !(__x == __y); }
+
+ inline bool
+ operator<=(thread::id __x, thread::id __y)
+ { return !(__y < __x); }
+
+ inline bool
+ operator>(thread::id __x, thread::id __y)
+ { return __y < __x; }
+
+ inline bool
+ operator>=(thread::id __x, thread::id __y)
+ { return !(__x < __y); }
+
+ template<class _CharT, class _Traits>
+ inline basic_ostream<_CharT, _Traits>&
+ operator<<(basic_ostream<_CharT, _Traits>&& __out, thread::id __id)
+ {
+ if (__id == thread::id())
+ return __out << "thread::id of a non-executing thread";
+ else
+ return __out << __id._M_thread;
+ }
+
+ /** @namespace std::this_thread
+ * @brief ISO C++ 0x entities sub namespace for thread.
+ * 30.2.2 Namespace this_thread.
+ */
+ namespace this_thread
+ {
+ /// get_id
+ inline thread::id
+ get_id() { return thread::id(__gthread_self()); }
+
+#ifdef _GLIBCXX_USE_SCHED_YIELD
+ /// yield
+ inline void
+ yield()
+ { __gthread_yield(); }
+#endif
+
+#ifdef _GLIBCXX_USE_NANOSLEEP
+ /// sleep_until
+ template<typename _Clock, typename _Duration>
+ inline void
+ sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
+ { sleep_for(__atime - _Clock::now()); }
+
+ /// sleep_for
+ template<typename _Rep, typename _Period>
+ inline void
+ sleep_for(const chrono::duration<_Rep, _Period>& __rtime)
+ {
+ chrono::seconds __s =
+ chrono::duration_cast<chrono::seconds>(__rtime);
+
+ chrono::nanoseconds __ns =
+ chrono::duration_cast<chrono::nanoseconds>(__rtime - __s);
+
+ __gthread_time_t __ts =
+ {
+ static_cast<std::time_t>(__s.count()),
+ static_cast<long>(__ns.count())
+ };
+
+ ::nanosleep(&__ts, 0);
+ }
+#endif
+ }
+
+ // @} group threads
+}
+
+#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_THREAD
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/array b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/array
new file mode 100644
index 0000000..17cf5d2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/array
@@ -0,0 +1,54 @@
+// class template array -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/array
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_ARRAY
+#define _GLIBCXX_TR1_ARRAY 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <bits/stl_algobase.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/array>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/array>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_ARRAY
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/bessel_function.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/bessel_function.tcc
new file mode 100644
index 0000000..2510215
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/bessel_function.tcc
@@ -0,0 +1,627 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/bessel_function.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland.
+//
+// References:
+// (1) Handbook of Mathematical Functions,
+// ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 9, pp. 355-434, Section 10 pp. 435-478
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 240-245
+
+#ifndef _GLIBCXX_TR1_BESSEL_FUNCTION_TCC
+#define _GLIBCXX_TR1_BESSEL_FUNCTION_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Compute the gamma functions required by the Temme series
+ * expansions of @f$ N_\nu(x) @f$ and @f$ K_\nu(x) @f$.
+ * @f[
+ * \Gamma_1 = \frac{1}{2\mu}
+ * [\frac{1}{\Gamma(1 - \mu)} - \frac{1}{\Gamma(1 + \mu)}]
+ * @f]
+ * and
+ * @f[
+ * \Gamma_2 = \frac{1}{2}
+ * [\frac{1}{\Gamma(1 - \mu)} + \frac{1}{\Gamma(1 + \mu)}]
+ * @f]
+ * where @f$ -1/2 <= \mu <= 1/2 @f$ is @f$ \mu = \nu - N @f$ and @f$ N @f$.
+ * is the nearest integer to @f$ \nu @f$.
+ * The values of \f$ \Gamma(1 + \mu) \f$ and \f$ \Gamma(1 - \mu) \f$
+ * are returned as well.
+ *
+ * The accuracy requirements on this are exquisite.
+ *
+ * @param __mu The input parameter of the gamma functions.
+ * @param __gam1 The output function \f$ \Gamma_1(\mu) \f$
+ * @param __gam2 The output function \f$ \Gamma_2(\mu) \f$
+ * @param __gampl The output function \f$ \Gamma(1 + \mu) \f$
+ * @param __gammi The output function \f$ \Gamma(1 - \mu) \f$
+ */
+ template <typename _Tp>
+ void
+ __gamma_temme(const _Tp __mu,
+ _Tp & __gam1, _Tp & __gam2, _Tp & __gampl, _Tp & __gammi)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ __gampl = _Tp(1) / std::tr1::tgamma(_Tp(1) + __mu);
+ __gammi = _Tp(1) / std::tr1::tgamma(_Tp(1) - __mu);
+#else
+ __gampl = _Tp(1) / __gamma(_Tp(1) + __mu);
+ __gammi = _Tp(1) / __gamma(_Tp(1) - __mu);
+#endif
+
+ if (std::abs(__mu) < std::numeric_limits<_Tp>::epsilon())
+ __gam1 = -_Tp(__numeric_constants<_Tp>::__gamma_e());
+ else
+ __gam1 = (__gammi - __gampl) / (_Tp(2) * __mu);
+
+ __gam2 = (__gammi + __gampl) / (_Tp(2));
+
+ return;
+ }
+
+
+ /**
+ * @brief Compute the Bessel @f$ J_\nu(x) @f$ and Neumann
+ * @f$ N_\nu(x) @f$ functions and their first derivatives
+ * @f$ J'_\nu(x) @f$ and @f$ N'_\nu(x) @f$ respectively.
+ * These four functions are computed together for numerical
+ * stability.
+ *
+ * @param __nu The order of the Bessel functions.
+ * @param __x The argument of the Bessel functions.
+ * @param __Jnu The output Bessel function of the first kind.
+ * @param __Nnu The output Neumann function (Bessel function of the second kind).
+ * @param __Jpnu The output derivative of the Bessel function of the first kind.
+ * @param __Npnu The output derivative of the Neumann function.
+ */
+ template <typename _Tp>
+ void
+ __bessel_jn(const _Tp __nu, const _Tp __x,
+ _Tp & __Jnu, _Tp & __Nnu, _Tp & __Jpnu, _Tp & __Npnu)
+ {
+ if (__x == _Tp(0))
+ {
+ if (__nu == _Tp(0))
+ {
+ __Jnu = _Tp(1);
+ __Jpnu = _Tp(0);
+ }
+ else if (__nu == _Tp(1))
+ {
+ __Jnu = _Tp(0);
+ __Jpnu = _Tp(0.5L);
+ }
+ else
+ {
+ __Jnu = _Tp(0);
+ __Jpnu = _Tp(0);
+ }
+ __Nnu = -std::numeric_limits<_Tp>::infinity();
+ __Npnu = std::numeric_limits<_Tp>::infinity();
+ return;
+ }
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ // When the multiplier is N i.e.
+ // fp_min = N * min()
+ // Then J_0 and N_0 tank at x = 8 * N (J_0 = 0 and N_0 = nan)!
+ //const _Tp __fp_min = _Tp(20) * std::numeric_limits<_Tp>::min();
+ const _Tp __fp_min = std::sqrt(std::numeric_limits<_Tp>::min());
+ const int __max_iter = 15000;
+ const _Tp __x_min = _Tp(2);
+
+ const int __nl = (__x < __x_min
+ ? static_cast<int>(__nu + _Tp(0.5L))
+ : std::max(0, static_cast<int>(__nu - __x + _Tp(1.5L))));
+
+ const _Tp __mu = __nu - __nl;
+ const _Tp __mu2 = __mu * __mu;
+ const _Tp __xi = _Tp(1) / __x;
+ const _Tp __xi2 = _Tp(2) * __xi;
+ _Tp __w = __xi2 / __numeric_constants<_Tp>::__pi();
+ int __isign = 1;
+ _Tp __h = __nu * __xi;
+ if (__h < __fp_min)
+ __h = __fp_min;
+ _Tp __b = __xi2 * __nu;
+ _Tp __d = _Tp(0);
+ _Tp __c = __h;
+ int __i;
+ for (__i = 1; __i <= __max_iter; ++__i)
+ {
+ __b += __xi2;
+ __d = __b - __d;
+ if (std::abs(__d) < __fp_min)
+ __d = __fp_min;
+ __c = __b - _Tp(1) / __c;
+ if (std::abs(__c) < __fp_min)
+ __c = __fp_min;
+ __d = _Tp(1) / __d;
+ const _Tp __del = __c * __d;
+ __h *= __del;
+ if (__d < _Tp(0))
+ __isign = -__isign;
+ if (std::abs(__del - _Tp(1)) < __eps)
+ break;
+ }
+ if (__i > __max_iter)
+ std::__throw_runtime_error(__N("Argument x too large in __bessel_jn; "
+ "try asymptotic expansion."));
+ _Tp __Jnul = __isign * __fp_min;
+ _Tp __Jpnul = __h * __Jnul;
+ _Tp __Jnul1 = __Jnul;
+ _Tp __Jpnu1 = __Jpnul;
+ _Tp __fact = __nu * __xi;
+ for ( int __l = __nl; __l >= 1; --__l )
+ {
+ const _Tp __Jnutemp = __fact * __Jnul + __Jpnul;
+ __fact -= __xi;
+ __Jpnul = __fact * __Jnutemp - __Jnul;
+ __Jnul = __Jnutemp;
+ }
+ if (__Jnul == _Tp(0))
+ __Jnul = __eps;
+ _Tp __f= __Jpnul / __Jnul;
+ _Tp __Nmu, __Nnu1, __Npmu, __Jmu;
+ if (__x < __x_min)
+ {
+ const _Tp __x2 = __x / _Tp(2);
+ const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu;
+ _Tp __fact = (std::abs(__pimu) < __eps
+ ? _Tp(1) : __pimu / std::sin(__pimu));
+ _Tp __d = -std::log(__x2);
+ _Tp __e = __mu * __d;
+ _Tp __fact2 = (std::abs(__e) < __eps
+ ? _Tp(1) : std::sinh(__e) / __e);
+ _Tp __gam1, __gam2, __gampl, __gammi;
+ __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi);
+ _Tp __ff = (_Tp(2) / __numeric_constants<_Tp>::__pi())
+ * __fact * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d);
+ __e = std::exp(__e);
+ _Tp __p = __e / (__numeric_constants<_Tp>::__pi() * __gampl);
+ _Tp __q = _Tp(1) / (__e * __numeric_constants<_Tp>::__pi() * __gammi);
+ const _Tp __pimu2 = __pimu / _Tp(2);
+ _Tp __fact3 = (std::abs(__pimu2) < __eps
+ ? _Tp(1) : std::sin(__pimu2) / __pimu2 );
+ _Tp __r = __numeric_constants<_Tp>::__pi() * __pimu2 * __fact3 * __fact3;
+ _Tp __c = _Tp(1);
+ __d = -__x2 * __x2;
+ _Tp __sum = __ff + __r * __q;
+ _Tp __sum1 = __p;
+ for (__i = 1; __i <= __max_iter; ++__i)
+ {
+ __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2);
+ __c *= __d / _Tp(__i);
+ __p /= _Tp(__i) - __mu;
+ __q /= _Tp(__i) + __mu;
+ const _Tp __del = __c * (__ff + __r * __q);
+ __sum += __del;
+ const _Tp __del1 = __c * __p - __i * __del;
+ __sum1 += __del1;
+ if ( std::abs(__del) < __eps * (_Tp(1) + std::abs(__sum)) )
+ break;
+ }
+ if ( __i > __max_iter )
+ std::__throw_runtime_error(__N("Bessel y series failed to converge "
+ "in __bessel_jn."));
+ __Nmu = -__sum;
+ __Nnu1 = -__sum1 * __xi2;
+ __Npmu = __mu * __xi * __Nmu - __Nnu1;
+ __Jmu = __w / (__Npmu - __f * __Nmu);
+ }
+ else
+ {
+ _Tp __a = _Tp(0.25L) - __mu2;
+ _Tp __q = _Tp(1);
+ _Tp __p = -__xi / _Tp(2);
+ _Tp __br = _Tp(2) * __x;
+ _Tp __bi = _Tp(2);
+ _Tp __fact = __a * __xi / (__p * __p + __q * __q);
+ _Tp __cr = __br + __q * __fact;
+ _Tp __ci = __bi + __p * __fact;
+ _Tp __den = __br * __br + __bi * __bi;
+ _Tp __dr = __br / __den;
+ _Tp __di = -__bi / __den;
+ _Tp __dlr = __cr * __dr - __ci * __di;
+ _Tp __dli = __cr * __di + __ci * __dr;
+ _Tp __temp = __p * __dlr - __q * __dli;
+ __q = __p * __dli + __q * __dlr;
+ __p = __temp;
+ int __i;
+ for (__i = 2; __i <= __max_iter; ++__i)
+ {
+ __a += _Tp(2 * (__i - 1));
+ __bi += _Tp(2);
+ __dr = __a * __dr + __br;
+ __di = __a * __di + __bi;
+ if (std::abs(__dr) + std::abs(__di) < __fp_min)
+ __dr = __fp_min;
+ __fact = __a / (__cr * __cr + __ci * __ci);
+ __cr = __br + __cr * __fact;
+ __ci = __bi - __ci * __fact;
+ if (std::abs(__cr) + std::abs(__ci) < __fp_min)
+ __cr = __fp_min;
+ __den = __dr * __dr + __di * __di;
+ __dr /= __den;
+ __di /= -__den;
+ __dlr = __cr * __dr - __ci * __di;
+ __dli = __cr * __di + __ci * __dr;
+ __temp = __p * __dlr - __q * __dli;
+ __q = __p * __dli + __q * __dlr;
+ __p = __temp;
+ if (std::abs(__dlr - _Tp(1)) + std::abs(__dli) < __eps)
+ break;
+ }
+ if (__i > __max_iter)
+ std::__throw_runtime_error(__N("Lentz's method failed "
+ "in __bessel_jn."));
+ const _Tp __gam = (__p - __f) / __q;
+ __Jmu = std::sqrt(__w / ((__p - __f) * __gam + __q));
+#if _GLIBCXX_USE_C99_MATH_TR1
+ __Jmu = std::tr1::copysign(__Jmu, __Jnul);
+#else
+ if (__Jmu * __Jnul < _Tp(0))
+ __Jmu = -__Jmu;
+#endif
+ __Nmu = __gam * __Jmu;
+ __Npmu = (__p + __q / __gam) * __Nmu;
+ __Nnu1 = __mu * __xi * __Nmu - __Npmu;
+ }
+ __fact = __Jmu / __Jnul;
+ __Jnu = __fact * __Jnul1;
+ __Jpnu = __fact * __Jpnu1;
+ for (__i = 1; __i <= __nl; ++__i)
+ {
+ const _Tp __Nnutemp = (__mu + __i) * __xi2 * __Nnu1 - __Nmu;
+ __Nmu = __Nnu1;
+ __Nnu1 = __Nnutemp;
+ }
+ __Nnu = __Nmu;
+ __Npnu = __nu * __xi * __Nmu - __Nnu1;
+
+ return;
+ }
+
+
+ /**
+ * @brief This routine computes the asymptotic cylindrical Bessel
+ * and Neumann functions of order nu: \f$ J_{\nu} \f$,
+ * \f$ N_{\nu} \f$.
+ *
+ * References:
+ * (1) Handbook of Mathematical Functions,
+ * ed. Milton Abramowitz and Irene A. Stegun,
+ * Dover Publications,
+ * Section 9 p. 364, Equations 9.2.5-9.2.10
+ *
+ * @param __nu The order of the Bessel functions.
+ * @param __x The argument of the Bessel functions.
+ * @param __Jnu The output Bessel function of the first kind.
+ * @param __Nnu The output Neumann function (Bessel function of the second kind).
+ */
+ template <typename _Tp>
+ void
+ __cyl_bessel_jn_asymp(const _Tp __nu, const _Tp __x,
+ _Tp & __Jnu, _Tp & __Nnu)
+ {
+ const _Tp __coef = std::sqrt(_Tp(2)
+ / (__numeric_constants<_Tp>::__pi() * __x));
+ const _Tp __mu = _Tp(4) * __nu * __nu;
+ const _Tp __mum1 = __mu - _Tp(1);
+ const _Tp __mum9 = __mu - _Tp(9);
+ const _Tp __mum25 = __mu - _Tp(25);
+ const _Tp __mum49 = __mu - _Tp(49);
+ const _Tp __xx = _Tp(64) * __x * __x;
+ const _Tp __P = _Tp(1) - __mum1 * __mum9 / (_Tp(2) * __xx)
+ * (_Tp(1) - __mum25 * __mum49 / (_Tp(12) * __xx));
+ const _Tp __Q = __mum1 / (_Tp(8) * __x)
+ * (_Tp(1) - __mum9 * __mum25 / (_Tp(6) * __xx));
+
+ const _Tp __chi = __x - (__nu + _Tp(0.5L))
+ * __numeric_constants<_Tp>::__pi_2();
+ const _Tp __c = std::cos(__chi);
+ const _Tp __s = std::sin(__chi);
+
+ __Jnu = __coef * (__c * __P - __s * __Q);
+ __Nnu = __coef * (__s * __P + __c * __Q);
+
+ return;
+ }
+
+
+ /**
+ * @brief This routine returns the cylindrical Bessel functions
+ * of order \f$ \nu \f$: \f$ J_{\nu} \f$ or \f$ I_{\nu} \f$
+ * by series expansion.
+ *
+ * The modified cylindrical Bessel function is:
+ * @f[
+ * Z_{\nu}(x) = \sum_{k=0}^{\infty}
+ * \frac{\sigma^k (x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
+ * @f]
+ * where \f$ \sigma = +1 \f$ or\f$ -1 \f$ for
+ * \f$ Z = I \f$ or \f$ J \f$ respectively.
+ *
+ * See Abramowitz & Stegun, 9.1.10
+ * Abramowitz & Stegun, 9.6.7
+ * (1) Handbook of Mathematical Functions,
+ * ed. Milton Abramowitz and Irene A. Stegun,
+ * Dover Publications,
+ * Equation 9.1.10 p. 360 and Equation 9.6.10 p. 375
+ *
+ * @param __nu The order of the Bessel function.
+ * @param __x The argument of the Bessel function.
+ * @param __sgn The sign of the alternate terms
+ * -1 for the Bessel function of the first kind.
+ * +1 for the modified Bessel function of the first kind.
+ * @return The output Bessel function.
+ */
+ template <typename _Tp>
+ _Tp
+ __cyl_bessel_ij_series(const _Tp __nu, const _Tp __x, const _Tp __sgn,
+ const unsigned int __max_iter)
+ {
+
+ const _Tp __x2 = __x / _Tp(2);
+ _Tp __fact = __nu * std::log(__x2);
+#if _GLIBCXX_USE_C99_MATH_TR1
+ __fact -= std::tr1::lgamma(__nu + _Tp(1));
+#else
+ __fact -= __log_gamma(__nu + _Tp(1));
+#endif
+ __fact = std::exp(__fact);
+ const _Tp __xx4 = __sgn * __x2 * __x2;
+ _Tp __Jn = _Tp(1);
+ _Tp __term = _Tp(1);
+
+ for (unsigned int __i = 1; __i < __max_iter; ++__i)
+ {
+ __term *= __xx4 / (_Tp(__i) * (__nu + _Tp(__i)));
+ __Jn += __term;
+ if (std::abs(__term / __Jn) < std::numeric_limits<_Tp>::epsilon())
+ break;
+ }
+
+ return __fact * __Jn;
+ }
+
+
+ /**
+ * @brief Return the Bessel function of order \f$ \nu \f$:
+ * \f$ J_{\nu}(x) \f$.
+ *
+ * The cylindrical Bessel function is:
+ * @f[
+ * J_{\nu}(x) = \sum_{k=0}^{\infty}
+ * \frac{(-1)^k (x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
+ * @f]
+ *
+ * @param __nu The order of the Bessel function.
+ * @param __x The argument of the Bessel function.
+ * @return The output Bessel function.
+ */
+ template<typename _Tp>
+ _Tp
+ __cyl_bessel_j(const _Tp __nu, const _Tp __x)
+ {
+ if (__nu < _Tp(0) || __x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __cyl_bessel_j."));
+ else if (__isnan(__nu) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x * __x < _Tp(10) * (__nu + _Tp(1)))
+ return __cyl_bessel_ij_series(__nu, __x, -_Tp(1), 200);
+ else if (__x > _Tp(1000))
+ {
+ _Tp __J_nu, __N_nu;
+ __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu);
+ return __J_nu;
+ }
+ else
+ {
+ _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu;
+ __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu);
+ return __J_nu;
+ }
+ }
+
+
+ /**
+ * @brief Return the Neumann function of order \f$ \nu \f$:
+ * \f$ N_{\nu}(x) \f$.
+ *
+ * The Neumann function is defined by:
+ * @f[
+ * N_{\nu}(x) = \frac{J_{\nu}(x) \cos \nu\pi - J_{-\nu}(x)}
+ * {\sin \nu\pi}
+ * @f]
+ * where for integral \f$ \nu = n \f$ a limit is taken:
+ * \f$ lim_{\nu \to n} \f$.
+ *
+ * @param __nu The order of the Neumann function.
+ * @param __x The argument of the Neumann function.
+ * @return The output Neumann function.
+ */
+ template<typename _Tp>
+ _Tp
+ __cyl_neumann_n(const _Tp __nu, const _Tp __x)
+ {
+ if (__nu < _Tp(0) || __x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __cyl_neumann_n."));
+ else if (__isnan(__nu) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x > _Tp(1000))
+ {
+ _Tp __J_nu, __N_nu;
+ __cyl_bessel_jn_asymp(__nu, __x, __J_nu, __N_nu);
+ return __N_nu;
+ }
+ else
+ {
+ _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu;
+ __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu);
+ return __N_nu;
+ }
+ }
+
+
+ /**
+ * @brief Compute the spherical Bessel @f$ j_n(x) @f$
+ * and Neumann @f$ n_n(x) @f$ functions and their first
+ * derivatives @f$ j'_n(x) @f$ and @f$ n'_n(x) @f$
+ * respectively.
+ *
+ * @param __n The order of the spherical Bessel function.
+ * @param __x The argument of the spherical Bessel function.
+ * @param __j_n The output spherical Bessel function.
+ * @param __n_n The output spherical Neumann function.
+ * @param __jp_n The output derivative of the spherical Bessel function.
+ * @param __np_n The output derivative of the spherical Neumann function.
+ */
+ template <typename _Tp>
+ void
+ __sph_bessel_jn(const unsigned int __n, const _Tp __x,
+ _Tp & __j_n, _Tp & __n_n, _Tp & __jp_n, _Tp & __np_n)
+ {
+ const _Tp __nu = _Tp(__n) + _Tp(0.5L);
+
+ _Tp __J_nu, __N_nu, __Jp_nu, __Np_nu;
+ __bessel_jn(__nu, __x, __J_nu, __N_nu, __Jp_nu, __Np_nu);
+
+ const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2()
+ / std::sqrt(__x);
+
+ __j_n = __factor * __J_nu;
+ __n_n = __factor * __N_nu;
+ __jp_n = __factor * __Jp_nu - __j_n / (_Tp(2) * __x);
+ __np_n = __factor * __Np_nu - __n_n / (_Tp(2) * __x);
+
+ return;
+ }
+
+
+ /**
+ * @brief Return the spherical Bessel function
+ * @f$ j_n(x) @f$ of order n.
+ *
+ * The spherical Bessel function is defined by:
+ * @f[
+ * j_n(x) = \left( \frac{\pi}{2x} \right) ^{1/2} J_{n+1/2}(x)
+ * @f]
+ *
+ * @param __n The order of the spherical Bessel function.
+ * @param __x The argument of the spherical Bessel function.
+ * @return The output spherical Bessel function.
+ */
+ template <typename _Tp>
+ _Tp
+ __sph_bessel(const unsigned int __n, const _Tp __x)
+ {
+ if (__x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __sph_bessel."));
+ else if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x == _Tp(0))
+ {
+ if (__n == 0)
+ return _Tp(1);
+ else
+ return _Tp(0);
+ }
+ else
+ {
+ _Tp __j_n, __n_n, __jp_n, __np_n;
+ __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n);
+ return __j_n;
+ }
+ }
+
+
+ /**
+ * @brief Return the spherical Neumann function
+ * @f$ n_n(x) @f$.
+ *
+ * The spherical Neumann function is defined by:
+ * @f[
+ * n_n(x) = \left( \frac{\pi}{2x} \right) ^{1/2} N_{n+1/2}(x)
+ * @f]
+ *
+ * @param __n The order of the spherical Neumann function.
+ * @param __x The argument of the spherical Neumann function.
+ * @return The output spherical Neumann function.
+ */
+ template <typename _Tp>
+ _Tp
+ __sph_neumann(const unsigned int __n, const _Tp __x)
+ {
+ if (__x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __sph_neumann."));
+ else if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x == _Tp(0))
+ return -std::numeric_limits<_Tp>::infinity();
+ else
+ {
+ _Tp __j_n, __n_n, __jp_n, __np_n;
+ __sph_bessel_jn(__n, __x, __j_n, __n_n, __jp_n, __np_n);
+ return __n_n;
+ }
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_BESSEL_FUNCTION_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/beta_function.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/beta_function.tcc
new file mode 100644
index 0000000..f9d1860
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/beta_function.tcc
@@ -0,0 +1,197 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/beta_function.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 6, pp. 253-266
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 213-216
+// (4) Gamma, Exploring Euler's Constant, Julian Havil,
+// Princeton, 2003.
+
+#ifndef _GLIBCXX_TR1_BETA_FUNCTION_TCC
+#define _GLIBCXX_TR1_BETA_FUNCTION_TCC 1
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Return the beta function: \f$B(x,y)\f$.
+ *
+ * The beta function is defined by
+ * @f[
+ * B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}
+ * @f]
+ *
+ * @param __x The first argument of the beta function.
+ * @param __y The second argument of the beta function.
+ * @return The beta function.
+ */
+ template<typename _Tp>
+ _Tp
+ __beta_gamma(_Tp __x, _Tp __y)
+ {
+
+ _Tp __bet;
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (__x > __y)
+ {
+ __bet = std::tr1::tgamma(__x)
+ / std::tr1::tgamma(__x + __y);
+ __bet *= std::tr1::tgamma(__y);
+ }
+ else
+ {
+ __bet = std::tr1::tgamma(__y)
+ / std::tr1::tgamma(__x + __y);
+ __bet *= std::tr1::tgamma(__x);
+ }
+#else
+ if (__x > __y)
+ {
+ __bet = __gamma(__x) / __gamma(__x + __y);
+ __bet *= __gamma(__y);
+ }
+ else
+ {
+ __bet = __gamma(__y) / __gamma(__x + __y);
+ __bet *= __gamma(__x);
+ }
+#endif
+
+ return __bet;
+ }
+
+ /**
+ * @brief Return the beta function \f$B(x,y)\f$ using
+ * the log gamma functions.
+ *
+ * The beta function is defined by
+ * @f[
+ * B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}
+ * @f]
+ *
+ * @param __x The first argument of the beta function.
+ * @param __y The second argument of the beta function.
+ * @return The beta function.
+ */
+ template<typename _Tp>
+ _Tp
+ __beta_lgamma(_Tp __x, _Tp __y)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _Tp __bet = std::tr1::lgamma(__x)
+ + std::tr1::lgamma(__y)
+ - std::tr1::lgamma(__x + __y);
+#else
+ _Tp __bet = __log_gamma(__x)
+ + __log_gamma(__y)
+ - __log_gamma(__x + __y);
+#endif
+ __bet = std::exp(__bet);
+ return __bet;
+ }
+
+
+ /**
+ * @brief Return the beta function \f$B(x,y)\f$ using
+ * the product form.
+ *
+ * The beta function is defined by
+ * @f[
+ * B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}
+ * @f]
+ *
+ * @param __x The first argument of the beta function.
+ * @param __y The second argument of the beta function.
+ * @return The beta function.
+ */
+ template<typename _Tp>
+ _Tp
+ __beta_product(_Tp __x, _Tp __y)
+ {
+
+ _Tp __bet = (__x + __y) / (__x * __y);
+
+ unsigned int __max_iter = 1000000;
+ for (unsigned int __k = 1; __k < __max_iter; ++__k)
+ {
+ _Tp __term = (_Tp(1) + (__x + __y) / __k)
+ / ((_Tp(1) + __x / __k) * (_Tp(1) + __y / __k));
+ __bet *= __term;
+ }
+
+ return __bet;
+ }
+
+
+ /**
+ * @brief Return the beta function \f$ B(x,y) \f$.
+ *
+ * The beta function is defined by
+ * @f[
+ * B(x,y) = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}
+ * @f]
+ *
+ * @param __x The first argument of the beta function.
+ * @param __y The second argument of the beta function.
+ * @return The beta function.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __beta(_Tp __x, _Tp __y)
+ {
+ if (__isnan(__x) || __isnan(__y))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ return __beta_lgamma(__x, __y);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // __GLIBCXX_TR1_BETA_FUNCTION_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ccomplex b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ccomplex
new file mode 100644
index 0000000..a0ae33e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ccomplex
@@ -0,0 +1,34 @@
+// TR1 ccomplex -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/ccomplex
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CCOMPLEX
+#define _GLIBCXX_TR1_CCOMPLEX 1
+
+#include <tr1/complex>
+
+#endif // _GLIBCXX_TR1_CCOMPLEX
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cctype b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cctype
new file mode 100644
index 0000000..93e864e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cctype
@@ -0,0 +1,49 @@
+// TR1 cctype -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cctype
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CCTYPE
+#define _GLIBCXX_TR1_CCTYPE 1
+
+#include <bits/c++config.h>
+#include <cctype>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cctype>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cctype>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CCTYPE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfenv b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfenv
new file mode 100644
index 0000000..e4c4fac
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfenv
@@ -0,0 +1,53 @@
+// TR1 cfenv -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cfenv
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CFENV
+#define _GLIBCXX_TR1_CFENV 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#if _GLIBCXX_HAVE_FENV_H
+# include <fenv.h>
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cfenv>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cfenv>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CFENV
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfloat b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfloat
new file mode 100644
index 0000000..801cfc3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cfloat
@@ -0,0 +1,42 @@
+// TR1 cfloat -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cfloat
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CFLOAT
+#define _GLIBCXX_TR1_CFLOAT 1
+
+#include <cfloat>
+
+#ifndef DECIMAL_DIG
+#define DECIMAL_DIG __DECIMAL_DIG__
+#endif
+
+#ifndef FLT_EVAL_METHOD
+#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
+#endif
+
+#endif //_GLIBCXX_TR1_CFLOAT
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cinttypes b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cinttypes
new file mode 100644
index 0000000..71fd545
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cinttypes
@@ -0,0 +1,63 @@
+// TR1 cinttypes -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cinttypes
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CINTTYPES
+#define _GLIBCXX_TR1_CINTTYPES 1
+
+#pragma GCC system_header
+
+#include <tr1/cstdint>
+
+// For 8.11.1/1 (see C99, Note 184)
+#if _GLIBCXX_HAVE_INTTYPES_H
+# ifndef __STDC_FORMAT_MACROS
+# define _UNDEF__STDC_FORMAT_MACROS
+# define __STDC_FORMAT_MACROS
+# endif
+# include <inttypes.h>
+# ifdef _UNDEF__STDC_FORMAT_MACROS
+# undef __STDC_FORMAT_MACROS
+# undef _UNDEF__STDC_FORMAT_MACROS
+# endif
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cinttypes>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cinttypes>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CINTTYPES
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/climits b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/climits
new file mode 100644
index 0000000..91af96b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/climits
@@ -0,0 +1,46 @@
+// TR1 climits -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/climits
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CLIMITS
+#define _GLIBCXX_TR1_CLIMITS 1
+
+#include <climits>
+
+#ifndef LLONG_MIN
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1)
+#endif
+
+#ifndef LLONG_MAX
+#define LLONG_MAX __LONG_LONG_MAX__
+#endif
+
+#ifndef ULLONG_MAX
+#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
+#endif
+
+#endif // _GLIBCXX_TR1_CLIMITS
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cmath b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cmath
new file mode 100644
index 0000000..a9fbf2b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cmath
@@ -0,0 +1,507 @@
+// TR1 cmath -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cmath
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CMATH
+#define _GLIBCXX_TR1_CMATH 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cmath>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cmath>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cmath>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+namespace std
+{
+namespace tr1
+{
+ // DR 550. What should the return type of pow(float,int) be?
+ // NB: C++0x and TR1 != C++03.
+ inline double
+ pow(double __x, double __y)
+ { return std::pow(__x, __y); }
+
+ inline float
+ pow(float __x, float __y)
+ { return std::pow(__x, __y); }
+
+ inline long double
+ pow(long double __x, long double __y)
+ { return std::pow(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ pow(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return std::pow(__type(__x), __type(__y));
+ }
+}
+}
+
+#include <bits/stl_algobase.h>
+#include <limits>
+#include <tr1/type_traits>
+
+#include <tr1/gamma.tcc>
+#include <tr1/bessel_function.tcc>
+#include <tr1/beta_function.tcc>
+#include <tr1/ell_integral.tcc>
+#include <tr1/exp_integral.tcc>
+#include <tr1/hypergeometric.tcc>
+#include <tr1/legendre_function.tcc>
+#include <tr1/modified_bessel_func.tcc>
+#include <tr1/poly_hermite.tcc>
+#include <tr1/poly_laguerre.tcc>
+#include <tr1/riemann_zeta.tcc>
+
+namespace std
+{
+namespace tr1
+{
+ /**
+ * @defgroup tr1_math_spec_func Mathematical Special Functions
+ * @ingroup numerics
+ *
+ * A collection of advanced mathematical special functions.
+ * @{
+ */
+
+ inline float
+ assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
+ { return __detail::__assoc_laguerre<float>(__n, __m, __x); }
+
+ inline long double
+ assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
+ {
+ return __detail::__assoc_laguerre<long double>(__n, __m, __x);
+ }
+
+ /// 5.2.1.1 Associated Laguerre polynomials.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__assoc_laguerre<__type>(__n, __m, __x);
+ }
+
+ inline float
+ assoc_legendref(unsigned int __l, unsigned int __m, float __x)
+ { return __detail::__assoc_legendre_p<float>(__l, __m, __x); }
+
+ inline long double
+ assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
+ { return __detail::__assoc_legendre_p<long double>(__l, __m, __x); }
+
+ /// 5.2.1.2 Associated Legendre functions.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__assoc_legendre_p<__type>(__l, __m, __x);
+ }
+
+ inline float
+ betaf(float __x, float __y)
+ { return __detail::__beta<float>(__x, __y); }
+
+ inline long double
+ betal(long double __x, long double __y)
+ { return __detail::__beta<long double>(__x, __y); }
+
+ /// 5.2.1.3 Beta functions.
+ template<typename _Tpx, typename _Tpy>
+ inline typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type
+ beta(_Tpx __x, _Tpy __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tpx, _Tpy>::__type __type;
+ return __detail::__beta<__type>(__x, __y);
+ }
+
+ inline float
+ comp_ellint_1f(float __k)
+ { return __detail::__comp_ellint_1<float>(__k); }
+
+ inline long double
+ comp_ellint_1l(long double __k)
+ { return __detail::__comp_ellint_1<long double>(__k); }
+
+ /// 5.2.1.4 Complete elliptic integrals of the first kind.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ comp_ellint_1(_Tp __k)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__comp_ellint_1<__type>(__k);
+ }
+
+ inline float
+ comp_ellint_2f(float __k)
+ { return __detail::__comp_ellint_2<float>(__k); }
+
+ inline long double
+ comp_ellint_2l(long double __k)
+ { return __detail::__comp_ellint_2<long double>(__k); }
+
+ /// 5.2.1.5 Complete elliptic integrals of the second kind.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ comp_ellint_2(_Tp __k)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__comp_ellint_2<__type>(__k);
+ }
+
+ inline float
+ comp_ellint_3f(float __k, float __nu)
+ { return __detail::__comp_ellint_3<float>(__k, __nu); }
+
+ inline long double
+ comp_ellint_3l(long double __k, long double __nu)
+ { return __detail::__comp_ellint_3<long double>(__k, __nu); }
+
+ /// 5.2.1.6 Complete elliptic integrals of the third kind.
+ template<typename _Tp, typename _Tpn>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type
+ comp_ellint_3(_Tp __k, _Tpn __nu)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Tpn>::__type __type;
+ return __detail::__comp_ellint_3<__type>(__k, __nu);
+ }
+
+ inline float
+ conf_hypergf(float __a, float __c, float __x)
+ { return __detail::__conf_hyperg<float>(__a, __c, __x); }
+
+ inline long double
+ conf_hypergl(long double __a, long double __c, long double __x)
+ { return __detail::__conf_hyperg<long double>(__a, __c, __x); }
+
+ /// 5.2.1.7 Confluent hypergeometric functions.
+ template<typename _Tpa, typename _Tpc, typename _Tp>
+ inline typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type
+ conf_hyperg(_Tpa __a, _Tpc __c, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_3<_Tpa, _Tpc, _Tp>::__type __type;
+ return __detail::__conf_hyperg<__type>(__a, __c, __x);
+ }
+
+ inline float
+ cyl_bessel_if(float __nu, float __x)
+ { return __detail::__cyl_bessel_i<float>(__nu, __x); }
+
+ inline long double
+ cyl_bessel_il(long double __nu, long double __x)
+ { return __detail::__cyl_bessel_i<long double>(__nu, __x); }
+
+ /// 5.2.1.8 Regular modified cylindrical Bessel functions.
+ template<typename _Tpnu, typename _Tp>
+ inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
+ cyl_bessel_i(_Tpnu __nu, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
+ return __detail::__cyl_bessel_i<__type>(__nu, __x);
+ }
+
+ inline float
+ cyl_bessel_jf(float __nu, float __x)
+ { return __detail::__cyl_bessel_j<float>(__nu, __x); }
+
+ inline long double
+ cyl_bessel_jl(long double __nu, long double __x)
+ { return __detail::__cyl_bessel_j<long double>(__nu, __x); }
+
+ /// 5.2.1.9 Cylindrical Bessel functions (of the first kind).
+ template<typename _Tpnu, typename _Tp>
+ inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
+ cyl_bessel_j(_Tpnu __nu, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
+ return __detail::__cyl_bessel_j<__type>(__nu, __x);
+ }
+
+ inline float
+ cyl_bessel_kf(float __nu, float __x)
+ { return __detail::__cyl_bessel_k<float>(__nu, __x); }
+
+ inline long double
+ cyl_bessel_kl(long double __nu, long double __x)
+ { return __detail::__cyl_bessel_k<long double>(__nu, __x); }
+
+ /// 5.2.1.10 Irregular modified cylindrical Bessel functions.
+ template<typename _Tpnu, typename _Tp>
+ inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
+ cyl_bessel_k(_Tpnu __nu, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
+ return __detail::__cyl_bessel_k<__type>(__nu, __x);
+ }
+
+ inline float
+ cyl_neumannf(float __nu, float __x)
+ { return __detail::__cyl_neumann_n<float>(__nu, __x); }
+
+ inline long double
+ cyl_neumannl(long double __nu, long double __x)
+ { return __detail::__cyl_neumann_n<long double>(__nu, __x); }
+
+ /// 5.2.1.11 Cylindrical Neumann functions.
+ template<typename _Tpnu, typename _Tp>
+ inline typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type
+ cyl_neumann(_Tpnu __nu, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tpnu, _Tp>::__type __type;
+ return __detail::__cyl_neumann_n<__type>(__nu, __x);
+ }
+
+ inline float
+ ellint_1f(float __k, float __phi)
+ { return __detail::__ellint_1<float>(__k, __phi); }
+
+ inline long double
+ ellint_1l(long double __k, long double __phi)
+ { return __detail::__ellint_1<long double>(__k, __phi); }
+
+ /// 5.2.1.12 Incomplete elliptic integrals of the first kind.
+ template<typename _Tp, typename _Tpp>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
+ ellint_1(_Tp __k, _Tpp __phi)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
+ return __detail::__ellint_1<__type>(__k, __phi);
+ }
+
+ inline float
+ ellint_2f(float __k, float __phi)
+ { return __detail::__ellint_2<float>(__k, __phi); }
+
+ inline long double
+ ellint_2l(long double __k, long double __phi)
+ { return __detail::__ellint_2<long double>(__k, __phi); }
+
+ /// 5.2.1.13 Incomplete elliptic integrals of the second kind.
+ template<typename _Tp, typename _Tpp>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type
+ ellint_2(_Tp __k, _Tpp __phi)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Tpp>::__type __type;
+ return __detail::__ellint_2<__type>(__k, __phi);
+ }
+
+ inline float
+ ellint_3f(float __k, float __nu, float __phi)
+ { return __detail::__ellint_3<float>(__k, __nu, __phi); }
+
+ inline long double
+ ellint_3l(long double __k, long double __nu, long double __phi)
+ { return __detail::__ellint_3<long double>(__k, __nu, __phi); }
+
+ /// 5.2.1.14 Incomplete elliptic integrals of the third kind.
+ template<typename _Tp, typename _Tpn, typename _Tpp>
+ inline typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type
+ ellint_3(_Tp __k, _Tpn __nu, _Tpp __phi)
+ {
+ typedef typename __gnu_cxx::__promote_3<_Tp, _Tpn, _Tpp>::__type __type;
+ return __detail::__ellint_3<__type>(__k, __nu, __phi);
+ }
+
+ inline float
+ expintf(float __x)
+ { return __detail::__expint<float>(__x); }
+
+ inline long double
+ expintl(long double __x)
+ { return __detail::__expint<long double>(__x); }
+
+ /// 5.2.1.15 Exponential integrals.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ expint(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__expint<__type>(__x);
+ }
+
+ inline float
+ hermitef(unsigned int __n, float __x)
+ { return __detail::__poly_hermite<float>(__n, __x); }
+
+ inline long double
+ hermitel(unsigned int __n, long double __x)
+ { return __detail::__poly_hermite<long double>(__n, __x); }
+
+ /// 5.2.1.16 Hermite polynomials.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ hermite(unsigned int __n, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__poly_hermite<__type>(__n, __x);
+ }
+
+ inline float
+ hypergf(float __a, float __b, float __c, float __x)
+ { return __detail::__hyperg<float>(__a, __b, __c, __x); }
+
+ inline long double
+ hypergl(long double __a, long double __b, long double __c, long double __x)
+ { return __detail::__hyperg<long double>(__a, __b, __c, __x); }
+
+ /// 5.2.1.17 Hypergeometric functions.
+ template<typename _Tpa, typename _Tpb, typename _Tpc, typename _Tp>
+ inline typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type
+ hyperg(_Tpa __a, _Tpb __b, _Tpc __c, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote_4<_Tpa, _Tpb, _Tpc, _Tp>::__type __type;
+ return __detail::__hyperg<__type>(__a, __b, __c, __x);
+ }
+
+ inline float
+ laguerref(unsigned int __n, float __x)
+ { return __detail::__laguerre<float>(__n, __x); }
+
+ inline long double
+ laguerrel(unsigned int __n, long double __x)
+ { return __detail::__laguerre<long double>(__n, __x); }
+
+ /// 5.2.1.18 Laguerre polynomials.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ laguerre(unsigned int __n, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__laguerre<__type>(__n, __x);
+ }
+
+ inline float
+ legendref(unsigned int __n, float __x)
+ { return __detail::__poly_legendre_p<float>(__n, __x); }
+
+ inline long double
+ legendrel(unsigned int __n, long double __x)
+ { return __detail::__poly_legendre_p<long double>(__n, __x); }
+
+ /// 5.2.1.19 Legendre polynomials.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ legendre(unsigned int __n, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__poly_legendre_p<__type>(__n, __x);
+ }
+
+ inline float
+ riemann_zetaf(float __x)
+ { return __detail::__riemann_zeta<float>(__x); }
+
+ inline long double
+ riemann_zetal(long double __x)
+ { return __detail::__riemann_zeta<long double>(__x); }
+
+ /// 5.2.1.20 Riemann zeta function.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ riemann_zeta(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__riemann_zeta<__type>(__x);
+ }
+
+ inline float
+ sph_besself(unsigned int __n, float __x)
+ { return __detail::__sph_bessel<float>(__n, __x); }
+
+ inline long double
+ sph_bessell(unsigned int __n, long double __x)
+ { return __detail::__sph_bessel<long double>(__n, __x); }
+
+ /// 5.2.1.21 Spherical Bessel functions.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ sph_bessel(unsigned int __n, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__sph_bessel<__type>(__n, __x);
+ }
+
+ inline float
+ sph_legendref(unsigned int __l, unsigned int __m, float __theta)
+ { return __detail::__sph_legendre<float>(__l, __m, __theta); }
+
+ inline long double
+ sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
+ { return __detail::__sph_legendre<long double>(__l, __m, __theta); }
+
+ /// 5.2.1.22 Spherical associated Legendre functions.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__sph_legendre<__type>(__l, __m, __theta);
+ }
+
+ inline float
+ sph_neumannf(unsigned int __n, float __x)
+ { return __detail::__sph_neumann<float>(__n, __x); }
+
+ inline long double
+ sph_neumannl(unsigned int __n, long double __x)
+ { return __detail::__sph_neumann<long double>(__n, __x); }
+
+ /// 5.2.1.23 Spherical Neumann functions.
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ sph_neumann(unsigned int __n, _Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __detail::__sph_neumann<__type>(__n, __x);
+ }
+
+ /* @} */ // tr1_math_spec_func
+}
+}
+
+#endif // _GLIBCXX_TR1_CMATH
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex
new file mode 100644
index 0000000..3ed1eb9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex
@@ -0,0 +1,91 @@
+// TR1 complex -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/complex
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_COMPLEX
+#define _GLIBCXX_TR1_COMPLEX 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <complex>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/complex>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/complex>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+namespace std
+{
+namespace tr1
+{
+ using std::arg;
+ using std::conj;
+ using std::imag;
+ using std::norm;
+ using std::polar;
+
+ template<typename _Tp, typename _Up>
+ inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type>
+ polar(const _Tp& __rho, const _Up& __theta)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return std::polar(__type(__rho), __type(__theta));
+ }
+
+ using std::real;
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ pow(const std::complex<_Tp>& __x, const _Tp& __y)
+ { return std::pow(__x, __y); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ pow(const _Tp& __x, const std::complex<_Tp>& __y)
+ { return std::pow(__x, __y); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ pow(const std::complex<_Tp>& __x, const std::complex<_Tp>& __y)
+ { return std::pow(__x, __y); }
+}
+}
+
+#endif // _GLIBCXX_TR1_COMPLEX
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex.h
new file mode 100644
index 0000000..0f28810
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/complex.h
@@ -0,0 +1,34 @@
+// TR1 complex.h -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/complex.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_COMPLEX_H
+#define _GLIBCXX_TR1_COMPLEX_H 1
+
+#include <tr1/ccomplex>
+
+#endif // _GLIBCXX_TR1_COMPLEX_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdarg b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdarg
new file mode 100644
index 0000000..bc2e881
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdarg
@@ -0,0 +1,34 @@
+// TR1 cstdarg -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cstdarg
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CSTDARG
+#define _GLIBCXX_TR1_CSTDARG 1
+
+#include <cstdarg>
+
+#endif // _GLIBCXX_TR1_CSTDARG
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdbool b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdbool
new file mode 100644
index 0000000..d68e4b8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdbool
@@ -0,0 +1,40 @@
+// TR1 cstdbool -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cstdbool
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CSTDBOOL
+#define _GLIBCXX_TR1_CSTDBOOL 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+
+#if _GLIBCXX_HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+
+#endif // _GLIBCXX_TR1_CSTDBOOL
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdint b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdint
new file mode 100644
index 0000000..1e6cc37
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdint
@@ -0,0 +1,76 @@
+// TR1 cstdint -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cstdint
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CSTDINT
+#define _GLIBCXX_TR1_CSTDINT 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <bits/c++config.h>
+
+// For 8.22.1/1 (see C99, Notes 219, 220, 222)
+# if _GLIBCXX_HAVE_STDINT_H
+# ifndef __STDC_LIMIT_MACROS
+# define _UNDEF__STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+# endif
+# ifndef __STDC_CONSTANT_MACROS
+# define _UNDEF__STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+# endif
+# include <stdint.h>
+# ifdef _UNDEF__STDC_LIMIT_MACROS
+# undef __STDC_LIMIT_MACROS
+# undef _UNDEF__STDC_LIMIT_MACROS
+# endif
+# ifdef _UNDEF__STDC_CONSTANT_MACROS
+# undef __STDC_CONSTANT_MACROS
+# undef _UNDEF__STDC_CONSTANT_MACROS
+# endif
+# endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cstdint>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cstdint>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CSTDINT
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdio b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdio
new file mode 100644
index 0000000..cfcf31a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdio
@@ -0,0 +1,54 @@
+// TR1 cstdio -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cstdio
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CSTDIO
+#define _GLIBCXX_TR1_CSTDIO 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cstdio>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cstdio>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cstdio>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CSTDIO
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdlib b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdlib
new file mode 100644
index 0000000..c9fab20
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cstdlib
@@ -0,0 +1,54 @@
+// TR1 cstdlib -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cstdlib
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CSTDLIB
+#define _GLIBCXX_TR1_CSTDLIB 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cstdlib>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cstdlib>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cstdlib>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CSTDLIB
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctgmath b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctgmath
new file mode 100644
index 0000000..e82a9a1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctgmath
@@ -0,0 +1,34 @@
+// TR1 ctgmath -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/ctgmath
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CTGMATH
+#define _GLIBCXX_TR1_CTGMATH 1
+
+#include <tr1/cmath>
+
+#endif // _GLIBCXX_TR1_CTGMATH
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctime b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctime
new file mode 100644
index 0000000..bf76337
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctime
@@ -0,0 +1,34 @@
+// TR1 ctime -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/ctime
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CTIME
+#define _GLIBCXX_TR1_CTIME 1
+
+#include <ctime>
+
+#endif // _GLIBCXX_TR1_CTIME
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctype.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctype.h
new file mode 100644
index 0000000..712bedb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ctype.h
@@ -0,0 +1,34 @@
+// TR1 ctype.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/ctype.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_CTYPE_H
+#define _TR1_CTYPE_H 1
+
+#include <tr1/cctype>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwchar b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwchar
new file mode 100644
index 0000000..a27ebc3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwchar
@@ -0,0 +1,54 @@
+// TR1 cwchar -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cwchar
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CWCHAR
+#define _GLIBCXX_TR1_CWCHAR 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cwchar>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cwchar>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cwchar>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CWCHAR
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwctype b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwctype
new file mode 100644
index 0000000..77cbb14
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/cwctype
@@ -0,0 +1,54 @@
+// TR1 cwctype -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/cwctype
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_CWCTYPE
+#define _GLIBCXX_TR1_CWCTYPE 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cwctype>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/cwctype>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/cwctype>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_CWCTYPE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ell_integral.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ell_integral.tcc
new file mode 100644
index 0000000..09bda9a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/ell_integral.tcc
@@ -0,0 +1,750 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/ell_integral.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) B. C. Carlson Numer. Math. 33, 1 (1979)
+// (2) B. C. Carlson, Special Functions of Applied Mathematics (1977)
+// (3) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (4) Numerical Recipes in C, 2nd ed, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press
+// (1992), pp. 261-269
+
+#ifndef _GLIBCXX_TR1_ELL_INTEGRAL_TCC
+#define _GLIBCXX_TR1_ELL_INTEGRAL_TCC 1
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Return the Carlson elliptic function @f$ R_F(x,y,z) @f$
+ * of the first kind.
+ *
+ * The Carlson elliptic function of the first kind is defined by:
+ * @f[
+ * R_F(x,y,z) = \frac{1}{2} \int_0^\infty
+ * \frac{dt}{(t + x)^{1/2}(t + y)^{1/2}(t + z)^{1/2}}
+ * @f]
+ *
+ * @param __x The first of three symmetric arguments.
+ * @param __y The second of three symmetric arguments.
+ * @param __z The third of three symmetric arguments.
+ * @return The Carlson elliptic function of the first kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_rf(const _Tp __x, const _Tp __y, const _Tp __z)
+ {
+ const _Tp __min = std::numeric_limits<_Tp>::min();
+ const _Tp __max = std::numeric_limits<_Tp>::max();
+ const _Tp __lolim = _Tp(5) * __min;
+ const _Tp __uplim = __max / _Tp(5);
+
+ if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0))
+ std::__throw_domain_error(__N("Argument less than zero "
+ "in __ellint_rf."));
+ else if (__x + __y < __lolim || __x + __z < __lolim
+ || __y + __z < __lolim)
+ std::__throw_domain_error(__N("Argument too small in __ellint_rf"));
+ else
+ {
+ const _Tp __c0 = _Tp(1) / _Tp(4);
+ const _Tp __c1 = _Tp(1) / _Tp(24);
+ const _Tp __c2 = _Tp(1) / _Tp(10);
+ const _Tp __c3 = _Tp(3) / _Tp(44);
+ const _Tp __c4 = _Tp(1) / _Tp(14);
+
+ _Tp __xn = __x;
+ _Tp __yn = __y;
+ _Tp __zn = __z;
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __errtol = std::pow(__eps, _Tp(1) / _Tp(6));
+ _Tp __mu;
+ _Tp __xndev, __yndev, __zndev;
+
+ const unsigned int __max_iter = 100;
+ for (unsigned int __iter = 0; __iter < __max_iter; ++__iter)
+ {
+ __mu = (__xn + __yn + __zn) / _Tp(3);
+ __xndev = 2 - (__mu + __xn) / __mu;
+ __yndev = 2 - (__mu + __yn) / __mu;
+ __zndev = 2 - (__mu + __zn) / __mu;
+ _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev));
+ __epsilon = std::max(__epsilon, std::abs(__zndev));
+ if (__epsilon < __errtol)
+ break;
+ const _Tp __xnroot = std::sqrt(__xn);
+ const _Tp __ynroot = std::sqrt(__yn);
+ const _Tp __znroot = std::sqrt(__zn);
+ const _Tp __lambda = __xnroot * (__ynroot + __znroot)
+ + __ynroot * __znroot;
+ __xn = __c0 * (__xn + __lambda);
+ __yn = __c0 * (__yn + __lambda);
+ __zn = __c0 * (__zn + __lambda);
+ }
+
+ const _Tp __e2 = __xndev * __yndev - __zndev * __zndev;
+ const _Tp __e3 = __xndev * __yndev * __zndev;
+ const _Tp __s = _Tp(1) + (__c1 * __e2 - __c2 - __c3 * __e3) * __e2
+ + __c4 * __e3;
+
+ return __s / std::sqrt(__mu);
+ }
+ }
+
+
+ /**
+ * @brief Return the complete elliptic integral of the first kind
+ * @f$ K(k) @f$ by series expansion.
+ *
+ * The complete elliptic integral of the first kind is defined as
+ * @f[
+ * K(k) = F(k,\pi/2) = \int_0^{\pi/2}\frac{d\theta}
+ * {\sqrt{1 - k^2sin^2\theta}}
+ * @f]
+ *
+ * This routine is not bad as long as |k| is somewhat smaller than 1
+ * but is not is good as the Carlson elliptic integral formulation.
+ *
+ * @param __k The argument of the complete elliptic function.
+ * @return The complete elliptic function of the first kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __comp_ellint_1_series(const _Tp __k)
+ {
+
+ const _Tp __kk = __k * __k;
+
+ _Tp __term = __kk / _Tp(4);
+ _Tp __sum = _Tp(1) + __term;
+
+ const unsigned int __max_iter = 1000;
+ for (unsigned int __i = 2; __i < __max_iter; ++__i)
+ {
+ __term *= (2 * __i - 1) * __kk / (2 * __i);
+ if (__term < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __sum += __term;
+ }
+
+ return __numeric_constants<_Tp>::__pi_2() * __sum;
+ }
+
+
+ /**
+ * @brief Return the complete elliptic integral of the first kind
+ * @f$ K(k) @f$ using the Carlson formulation.
+ *
+ * The complete elliptic integral of the first kind is defined as
+ * @f[
+ * K(k) = F(k,\pi/2) = \int_0^{\pi/2}\frac{d\theta}
+ * {\sqrt{1 - k^2 sin^2\theta}}
+ * @f]
+ * where @f$ F(k,\phi) @f$ is the incomplete elliptic integral of the
+ * first kind.
+ *
+ * @param __k The argument of the complete elliptic function.
+ * @return The complete elliptic function of the first kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __comp_ellint_1(const _Tp __k)
+ {
+
+ if (__isnan(__k))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (std::abs(__k) >= _Tp(1))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ return __ellint_rf(_Tp(0), _Tp(1) - __k * __k, _Tp(1));
+ }
+
+
+ /**
+ * @brief Return the incomplete elliptic integral of the first kind
+ * @f$ F(k,\phi) @f$ using the Carlson formulation.
+ *
+ * The incomplete elliptic integral of the first kind is defined as
+ * @f[
+ * F(k,\phi) = \int_0^{\phi}\frac{d\theta}
+ * {\sqrt{1 - k^2 sin^2\theta}}
+ * @f]
+ *
+ * @param __k The argument of the elliptic function.
+ * @param __phi The integral limit argument of the elliptic function.
+ * @return The elliptic function of the first kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_1(const _Tp __k, const _Tp __phi)
+ {
+
+ if (__isnan(__k) || __isnan(__phi))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (std::abs(__k) > _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in __ellint_1."));
+ else
+ {
+ // Reduce phi to -pi/2 < phi < +pi/2.
+ const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi()
+ + _Tp(0.5L));
+ const _Tp __phi_red = __phi
+ - __n * __numeric_constants<_Tp>::__pi();
+
+ const _Tp __s = std::sin(__phi_red);
+ const _Tp __c = std::cos(__phi_red);
+
+ const _Tp __F = __s
+ * __ellint_rf(__c * __c,
+ _Tp(1) - __k * __k * __s * __s, _Tp(1));
+
+ if (__n == 0)
+ return __F;
+ else
+ return __F + _Tp(2) * __n * __comp_ellint_1(__k);
+ }
+ }
+
+
+ /**
+ * @brief Return the complete elliptic integral of the second kind
+ * @f$ E(k) @f$ by series expansion.
+ *
+ * The complete elliptic integral of the second kind is defined as
+ * @f[
+ * E(k,\pi/2) = \int_0^{\pi/2}\sqrt{1 - k^2 sin^2\theta}
+ * @f]
+ *
+ * This routine is not bad as long as |k| is somewhat smaller than 1
+ * but is not is good as the Carlson elliptic integral formulation.
+ *
+ * @param __k The argument of the complete elliptic function.
+ * @return The complete elliptic function of the second kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __comp_ellint_2_series(const _Tp __k)
+ {
+
+ const _Tp __kk = __k * __k;
+
+ _Tp __term = __kk;
+ _Tp __sum = __term;
+
+ const unsigned int __max_iter = 1000;
+ for (unsigned int __i = 2; __i < __max_iter; ++__i)
+ {
+ const _Tp __i2m = 2 * __i - 1;
+ const _Tp __i2 = 2 * __i;
+ __term *= __i2m * __i2m * __kk / (__i2 * __i2);
+ if (__term < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __sum += __term / __i2m;
+ }
+
+ return __numeric_constants<_Tp>::__pi_2() * (_Tp(1) - __sum);
+ }
+
+
+ /**
+ * @brief Return the Carlson elliptic function of the second kind
+ * @f$ R_D(x,y,z) = R_J(x,y,z,z) @f$ where
+ * @f$ R_J(x,y,z,p) @f$ is the Carlson elliptic function
+ * of the third kind.
+ *
+ * The Carlson elliptic function of the second kind is defined by:
+ * @f[
+ * R_D(x,y,z) = \frac{3}{2} \int_0^\infty
+ * \frac{dt}{(t + x)^{1/2}(t + y)^{1/2}(t + z)^{3/2}}
+ * @f]
+ *
+ * Based on Carlson's algorithms:
+ * - B. C. Carlson Numer. Math. 33, 1 (1979)
+ * - B. C. Carlson, Special Functions of Applied Mathematics (1977)
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
+ * by Press, Teukolsky, Vetterling, Flannery (1992)
+ *
+ * @param __x The first of two symmetric arguments.
+ * @param __y The second of two symmetric arguments.
+ * @param __z The third argument.
+ * @return The Carlson elliptic function of the second kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_rd(const _Tp __x, const _Tp __y, const _Tp __z)
+ {
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6));
+ const _Tp __min = std::numeric_limits<_Tp>::min();
+ const _Tp __max = std::numeric_limits<_Tp>::max();
+ const _Tp __lolim = _Tp(2) / std::pow(__max, _Tp(2) / _Tp(3));
+ const _Tp __uplim = std::pow(_Tp(0.1L) * __errtol / __min, _Tp(2) / _Tp(3));
+
+ if (__x < _Tp(0) || __y < _Tp(0))
+ std::__throw_domain_error(__N("Argument less than zero "
+ "in __ellint_rd."));
+ else if (__x + __y < __lolim || __z < __lolim)
+ std::__throw_domain_error(__N("Argument too small "
+ "in __ellint_rd."));
+ else
+ {
+ const _Tp __c0 = _Tp(1) / _Tp(4);
+ const _Tp __c1 = _Tp(3) / _Tp(14);
+ const _Tp __c2 = _Tp(1) / _Tp(6);
+ const _Tp __c3 = _Tp(9) / _Tp(22);
+ const _Tp __c4 = _Tp(3) / _Tp(26);
+
+ _Tp __xn = __x;
+ _Tp __yn = __y;
+ _Tp __zn = __z;
+ _Tp __sigma = _Tp(0);
+ _Tp __power4 = _Tp(1);
+
+ _Tp __mu;
+ _Tp __xndev, __yndev, __zndev;
+
+ const unsigned int __max_iter = 100;
+ for (unsigned int __iter = 0; __iter < __max_iter; ++__iter)
+ {
+ __mu = (__xn + __yn + _Tp(3) * __zn) / _Tp(5);
+ __xndev = (__mu - __xn) / __mu;
+ __yndev = (__mu - __yn) / __mu;
+ __zndev = (__mu - __zn) / __mu;
+ _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev));
+ __epsilon = std::max(__epsilon, std::abs(__zndev));
+ if (__epsilon < __errtol)
+ break;
+ _Tp __xnroot = std::sqrt(__xn);
+ _Tp __ynroot = std::sqrt(__yn);
+ _Tp __znroot = std::sqrt(__zn);
+ _Tp __lambda = __xnroot * (__ynroot + __znroot)
+ + __ynroot * __znroot;
+ __sigma += __power4 / (__znroot * (__zn + __lambda));
+ __power4 *= __c0;
+ __xn = __c0 * (__xn + __lambda);
+ __yn = __c0 * (__yn + __lambda);
+ __zn = __c0 * (__zn + __lambda);
+ }
+
+ // Note: __ea is an SPU badname.
+ _Tp __eaa = __xndev * __yndev;
+ _Tp __eb = __zndev * __zndev;
+ _Tp __ec = __eaa - __eb;
+ _Tp __ed = __eaa - _Tp(6) * __eb;
+ _Tp __ef = __ed + __ec + __ec;
+ _Tp __s1 = __ed * (-__c1 + __c3 * __ed
+ / _Tp(3) - _Tp(3) * __c4 * __zndev * __ef
+ / _Tp(2));
+ _Tp __s2 = __zndev
+ * (__c2 * __ef
+ + __zndev * (-__c3 * __ec - __zndev * __c4 - __eaa));
+
+ return _Tp(3) * __sigma + __power4 * (_Tp(1) + __s1 + __s2)
+ / (__mu * std::sqrt(__mu));
+ }
+ }
+
+
+ /**
+ * @brief Return the complete elliptic integral of the second kind
+ * @f$ E(k) @f$ using the Carlson formulation.
+ *
+ * The complete elliptic integral of the second kind is defined as
+ * @f[
+ * E(k,\pi/2) = \int_0^{\pi/2}\sqrt{1 - k^2 sin^2\theta}
+ * @f]
+ *
+ * @param __k The argument of the complete elliptic function.
+ * @return The complete elliptic function of the second kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __comp_ellint_2(const _Tp __k)
+ {
+
+ if (__isnan(__k))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (std::abs(__k) == 1)
+ return _Tp(1);
+ else if (std::abs(__k) > _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in __comp_ellint_2."));
+ else
+ {
+ const _Tp __kk = __k * __k;
+
+ return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1))
+ - __kk * __ellint_rd(_Tp(0), _Tp(1) - __kk, _Tp(1)) / _Tp(3);
+ }
+ }
+
+
+ /**
+ * @brief Return the incomplete elliptic integral of the second kind
+ * @f$ E(k,\phi) @f$ using the Carlson formulation.
+ *
+ * The incomplete elliptic integral of the second kind is defined as
+ * @f[
+ * E(k,\phi) = \int_0^{\phi} \sqrt{1 - k^2 sin^2\theta}
+ * @f]
+ *
+ * @param __k The argument of the elliptic function.
+ * @param __phi The integral limit argument of the elliptic function.
+ * @return The elliptic function of the second kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_2(const _Tp __k, const _Tp __phi)
+ {
+
+ if (__isnan(__k) || __isnan(__phi))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (std::abs(__k) > _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in __ellint_2."));
+ else
+ {
+ // Reduce phi to -pi/2 < phi < +pi/2.
+ const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi()
+ + _Tp(0.5L));
+ const _Tp __phi_red = __phi
+ - __n * __numeric_constants<_Tp>::__pi();
+
+ const _Tp __kk = __k * __k;
+ const _Tp __s = std::sin(__phi_red);
+ const _Tp __ss = __s * __s;
+ const _Tp __sss = __ss * __s;
+ const _Tp __c = std::cos(__phi_red);
+ const _Tp __cc = __c * __c;
+
+ const _Tp __E = __s
+ * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1))
+ - __kk * __sss
+ * __ellint_rd(__cc, _Tp(1) - __kk * __ss, _Tp(1))
+ / _Tp(3);
+
+ if (__n == 0)
+ return __E;
+ else
+ return __E + _Tp(2) * __n * __comp_ellint_2(__k);
+ }
+ }
+
+
+ /**
+ * @brief Return the Carlson elliptic function
+ * @f$ R_C(x,y) = R_F(x,y,y) @f$ where @f$ R_F(x,y,z) @f$
+ * is the Carlson elliptic function of the first kind.
+ *
+ * The Carlson elliptic function is defined by:
+ * @f[
+ * R_C(x,y) = \frac{1}{2} \int_0^\infty
+ * \frac{dt}{(t + x)^{1/2}(t + y)}
+ * @f]
+ *
+ * Based on Carlson's algorithms:
+ * - B. C. Carlson Numer. Math. 33, 1 (1979)
+ * - B. C. Carlson, Special Functions of Applied Mathematics (1977)
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
+ * by Press, Teukolsky, Vetterling, Flannery (1992)
+ *
+ * @param __x The first argument.
+ * @param __y The second argument.
+ * @return The Carlson elliptic function.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_rc(const _Tp __x, const _Tp __y)
+ {
+ const _Tp __min = std::numeric_limits<_Tp>::min();
+ const _Tp __max = std::numeric_limits<_Tp>::max();
+ const _Tp __lolim = _Tp(5) * __min;
+ const _Tp __uplim = __max / _Tp(5);
+
+ if (__x < _Tp(0) || __y < _Tp(0) || __x + __y < __lolim)
+ std::__throw_domain_error(__N("Argument less than zero "
+ "in __ellint_rc."));
+ else
+ {
+ const _Tp __c0 = _Tp(1) / _Tp(4);
+ const _Tp __c1 = _Tp(1) / _Tp(7);
+ const _Tp __c2 = _Tp(9) / _Tp(22);
+ const _Tp __c3 = _Tp(3) / _Tp(10);
+ const _Tp __c4 = _Tp(3) / _Tp(8);
+
+ _Tp __xn = __x;
+ _Tp __yn = __y;
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __errtol = std::pow(__eps / _Tp(30), _Tp(1) / _Tp(6));
+ _Tp __mu;
+ _Tp __sn;
+
+ const unsigned int __max_iter = 100;
+ for (unsigned int __iter = 0; __iter < __max_iter; ++__iter)
+ {
+ __mu = (__xn + _Tp(2) * __yn) / _Tp(3);
+ __sn = (__yn + __mu) / __mu - _Tp(2);
+ if (std::abs(__sn) < __errtol)
+ break;
+ const _Tp __lambda = _Tp(2) * std::sqrt(__xn) * std::sqrt(__yn)
+ + __yn;
+ __xn = __c0 * (__xn + __lambda);
+ __yn = __c0 * (__yn + __lambda);
+ }
+
+ _Tp __s = __sn * __sn
+ * (__c3 + __sn*(__c1 + __sn * (__c4 + __sn * __c2)));
+
+ return (_Tp(1) + __s) / std::sqrt(__mu);
+ }
+ }
+
+
+ /**
+ * @brief Return the Carlson elliptic function @f$ R_J(x,y,z,p) @f$
+ * of the third kind.
+ *
+ * The Carlson elliptic function of the third kind is defined by:
+ * @f[
+ * R_J(x,y,z,p) = \frac{3}{2} \int_0^\infty
+ * \frac{dt}{(t + x)^{1/2}(t + y)^{1/2}(t + z)^{1/2}(t + p)}
+ * @f]
+ *
+ * Based on Carlson's algorithms:
+ * - B. C. Carlson Numer. Math. 33, 1 (1979)
+ * - B. C. Carlson, Special Functions of Applied Mathematics (1977)
+ * - Numerical Recipes in C, 2nd ed, pp. 261-269,
+ * by Press, Teukolsky, Vetterling, Flannery (1992)
+ *
+ * @param __x The first of three symmetric arguments.
+ * @param __y The second of three symmetric arguments.
+ * @param __z The third of three symmetric arguments.
+ * @param __p The fourth argument.
+ * @return The Carlson elliptic function of the fourth kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_rj(const _Tp __x, const _Tp __y, const _Tp __z, const _Tp __p)
+ {
+ const _Tp __min = std::numeric_limits<_Tp>::min();
+ const _Tp __max = std::numeric_limits<_Tp>::max();
+ const _Tp __lolim = std::pow(_Tp(5) * __min, _Tp(1)/_Tp(3));
+ const _Tp __uplim = _Tp(0.3L)
+ * std::pow(_Tp(0.2L) * __max, _Tp(1)/_Tp(3));
+
+ if (__x < _Tp(0) || __y < _Tp(0) || __z < _Tp(0))
+ std::__throw_domain_error(__N("Argument less than zero "
+ "in __ellint_rj."));
+ else if (__x + __y < __lolim || __x + __z < __lolim
+ || __y + __z < __lolim || __p < __lolim)
+ std::__throw_domain_error(__N("Argument too small "
+ "in __ellint_rj"));
+ else
+ {
+ const _Tp __c0 = _Tp(1) / _Tp(4);
+ const _Tp __c1 = _Tp(3) / _Tp(14);
+ const _Tp __c2 = _Tp(1) / _Tp(3);
+ const _Tp __c3 = _Tp(3) / _Tp(22);
+ const _Tp __c4 = _Tp(3) / _Tp(26);
+
+ _Tp __xn = __x;
+ _Tp __yn = __y;
+ _Tp __zn = __z;
+ _Tp __pn = __p;
+ _Tp __sigma = _Tp(0);
+ _Tp __power4 = _Tp(1);
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __errtol = std::pow(__eps / _Tp(8), _Tp(1) / _Tp(6));
+
+ _Tp __lambda, __mu;
+ _Tp __xndev, __yndev, __zndev, __pndev;
+
+ const unsigned int __max_iter = 100;
+ for (unsigned int __iter = 0; __iter < __max_iter; ++__iter)
+ {
+ __mu = (__xn + __yn + __zn + _Tp(2) * __pn) / _Tp(5);
+ __xndev = (__mu - __xn) / __mu;
+ __yndev = (__mu - __yn) / __mu;
+ __zndev = (__mu - __zn) / __mu;
+ __pndev = (__mu - __pn) / __mu;
+ _Tp __epsilon = std::max(std::abs(__xndev), std::abs(__yndev));
+ __epsilon = std::max(__epsilon, std::abs(__zndev));
+ __epsilon = std::max(__epsilon, std::abs(__pndev));
+ if (__epsilon < __errtol)
+ break;
+ const _Tp __xnroot = std::sqrt(__xn);
+ const _Tp __ynroot = std::sqrt(__yn);
+ const _Tp __znroot = std::sqrt(__zn);
+ const _Tp __lambda = __xnroot * (__ynroot + __znroot)
+ + __ynroot * __znroot;
+ const _Tp __alpha1 = __pn * (__xnroot + __ynroot + __znroot)
+ + __xnroot * __ynroot * __znroot;
+ const _Tp __alpha2 = __alpha1 * __alpha1;
+ const _Tp __beta = __pn * (__pn + __lambda)
+ * (__pn + __lambda);
+ __sigma += __power4 * __ellint_rc(__alpha2, __beta);
+ __power4 *= __c0;
+ __xn = __c0 * (__xn + __lambda);
+ __yn = __c0 * (__yn + __lambda);
+ __zn = __c0 * (__zn + __lambda);
+ __pn = __c0 * (__pn + __lambda);
+ }
+
+ // Note: __ea is an SPU badname.
+ _Tp __eaa = __xndev * (__yndev + __zndev) + __yndev * __zndev;
+ _Tp __eb = __xndev * __yndev * __zndev;
+ _Tp __ec = __pndev * __pndev;
+ _Tp __e2 = __eaa - _Tp(3) * __ec;
+ _Tp __e3 = __eb + _Tp(2) * __pndev * (__eaa - __ec);
+ _Tp __s1 = _Tp(1) + __e2 * (-__c1 + _Tp(3) * __c3 * __e2 / _Tp(4)
+ - _Tp(3) * __c4 * __e3 / _Tp(2));
+ _Tp __s2 = __eb * (__c2 / _Tp(2)
+ + __pndev * (-__c3 - __c3 + __pndev * __c4));
+ _Tp __s3 = __pndev * __eaa * (__c2 - __pndev * __c3)
+ - __c2 * __pndev * __ec;
+
+ return _Tp(3) * __sigma + __power4 * (__s1 + __s2 + __s3)
+ / (__mu * std::sqrt(__mu));
+ }
+ }
+
+
+ /**
+ * @brief Return the complete elliptic integral of the third kind
+ * @f$ \Pi(k,\nu) = \Pi(k,\nu,\pi/2) @f$ using the
+ * Carlson formulation.
+ *
+ * The complete elliptic integral of the third kind is defined as
+ * @f[
+ * \Pi(k,\nu) = \int_0^{\pi/2}
+ * \frac{d\theta}
+ * {(1 - \nu \sin^2\theta)\sqrt{1 - k^2 \sin^2\theta}}
+ * @f]
+ *
+ * @param __k The argument of the elliptic function.
+ * @param __nu The second argument of the elliptic function.
+ * @return The complete elliptic function of the third kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __comp_ellint_3(const _Tp __k, const _Tp __nu)
+ {
+
+ if (__isnan(__k) || __isnan(__nu))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__nu == _Tp(1))
+ return std::numeric_limits<_Tp>::infinity();
+ else if (std::abs(__k) > _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in __comp_ellint_3."));
+ else
+ {
+ const _Tp __kk = __k * __k;
+
+ return __ellint_rf(_Tp(0), _Tp(1) - __kk, _Tp(1))
+ - __nu
+ * __ellint_rj(_Tp(0), _Tp(1) - __kk, _Tp(1), _Tp(1) + __nu)
+ / _Tp(3);
+ }
+ }
+
+
+ /**
+ * @brief Return the incomplete elliptic integral of the third kind
+ * @f$ \Pi(k,\nu,\phi) @f$ using the Carlson formulation.
+ *
+ * The incomplete elliptic integral of the third kind is defined as
+ * @f[
+ * \Pi(k,\nu,\phi) = \int_0^{\phi}
+ * \frac{d\theta}
+ * {(1 - \nu \sin^2\theta)
+ * \sqrt{1 - k^2 \sin^2\theta}}
+ * @f]
+ *
+ * @param __k The argument of the elliptic function.
+ * @param __nu The second argument of the elliptic function.
+ * @param __phi The integral limit argument of the elliptic function.
+ * @return The elliptic function of the third kind.
+ */
+ template<typename _Tp>
+ _Tp
+ __ellint_3(const _Tp __k, const _Tp __nu, const _Tp __phi)
+ {
+
+ if (__isnan(__k) || __isnan(__nu) || __isnan(__phi))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (std::abs(__k) > _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in __ellint_3."));
+ else
+ {
+ // Reduce phi to -pi/2 < phi < +pi/2.
+ const int __n = std::floor(__phi / __numeric_constants<_Tp>::__pi()
+ + _Tp(0.5L));
+ const _Tp __phi_red = __phi
+ - __n * __numeric_constants<_Tp>::__pi();
+
+ const _Tp __kk = __k * __k;
+ const _Tp __s = std::sin(__phi_red);
+ const _Tp __ss = __s * __s;
+ const _Tp __sss = __ss * __s;
+ const _Tp __c = std::cos(__phi_red);
+ const _Tp __cc = __c * __c;
+
+ const _Tp __Pi = __s
+ * __ellint_rf(__cc, _Tp(1) - __kk * __ss, _Tp(1))
+ - __nu * __sss
+ * __ellint_rj(__cc, _Tp(1) - __kk * __ss, _Tp(1),
+ _Tp(1) + __nu * __ss) / _Tp(3);
+
+ if (__n == 0)
+ return __Pi;
+ else
+ return __Pi + _Tp(2) * __n * __comp_ellint_3(__k, __nu);
+ }
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_ELL_INTEGRAL_TCC
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/exp_integral.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/exp_integral.tcc
new file mode 100644
index 0000000..5b3af5d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/exp_integral.tcc
@@ -0,0 +1,524 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/exp_integral.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+//
+// (1) Handbook of Mathematical Functions,
+// Ed. by Milton Abramowitz and Irene A. Stegun,
+// Dover Publications, New-York, Section 5, pp. 228-251.
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 222-225.
+//
+
+#ifndef _GLIBCXX_TR1_EXP_INTEGRAL_TCC
+#define _GLIBCXX_TR1_EXP_INTEGRAL_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Return the exponential integral @f$ E_1(x) @f$
+ * by series summation. This should be good
+ * for @f$ x < 1 @f$.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_1(x) = \int_{1}^{\infty} \frac{e^{-xt}}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_E1_series(const _Tp __x)
+ {
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ _Tp __term = _Tp(1);
+ _Tp __esum = _Tp(0);
+ _Tp __osum = _Tp(0);
+ const unsigned int __max_iter = 100;
+ for (unsigned int __i = 1; __i < __max_iter; ++__i)
+ {
+ __term *= - __x / __i;
+ if (std::abs(__term) < __eps)
+ break;
+ if (__term >= _Tp(0))
+ __esum += __term / __i;
+ else
+ __osum += __term / __i;
+ }
+
+ return - __esum - __osum
+ - __numeric_constants<_Tp>::__gamma_e() - std::log(__x);
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_1(x) @f$
+ * by asymptotic expansion.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_1(x) = \int_{1}^\infty \frac{e^{-xt}}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_E1_asymp(const _Tp __x)
+ {
+ _Tp __term = _Tp(1);
+ _Tp __esum = _Tp(1);
+ _Tp __osum = _Tp(0);
+ const unsigned int __max_iter = 1000;
+ for (unsigned int __i = 1; __i < __max_iter; ++__i)
+ {
+ _Tp __prev = __term;
+ __term *= - __i / __x;
+ if (std::abs(__term) > std::abs(__prev))
+ break;
+ if (__term >= _Tp(0))
+ __esum += __term;
+ else
+ __osum += __term;
+ }
+
+ return std::exp(- __x) * (__esum + __osum) / __x;
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$
+ * by series summation.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_En_series(const unsigned int __n, const _Tp __x)
+ {
+ const unsigned int __max_iter = 100;
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const int __nm1 = __n - 1;
+ _Tp __ans = (__nm1 != 0
+ ? _Tp(1) / __nm1 : -std::log(__x)
+ - __numeric_constants<_Tp>::__gamma_e());
+ _Tp __fact = _Tp(1);
+ for (int __i = 1; __i <= __max_iter; ++__i)
+ {
+ __fact *= -__x / _Tp(__i);
+ _Tp __del;
+ if ( __i != __nm1 )
+ __del = -__fact / _Tp(__i - __nm1);
+ else
+ {
+ _Tp __psi = -_TR1_GAMMA_TCC;
+ for (int __ii = 1; __ii <= __nm1; ++__ii)
+ __psi += _Tp(1) / _Tp(__ii);
+ __del = __fact * (__psi - std::log(__x));
+ }
+ __ans += __del;
+ if (std::abs(__del) < __eps * std::abs(__ans))
+ return __ans;
+ }
+ std::__throw_runtime_error(__N("Series summation failed "
+ "in __expint_En_series."));
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$
+ * by continued fractions.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_En_cont_frac(const unsigned int __n, const _Tp __x)
+ {
+ const unsigned int __max_iter = 100;
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __fp_min = std::numeric_limits<_Tp>::min();
+ const int __nm1 = __n - 1;
+ _Tp __b = __x + _Tp(__n);
+ _Tp __c = _Tp(1) / __fp_min;
+ _Tp __d = _Tp(1) / __b;
+ _Tp __h = __d;
+ for ( unsigned int __i = 1; __i <= __max_iter; ++__i )
+ {
+ _Tp __a = -_Tp(__i * (__nm1 + __i));
+ __b += _Tp(2);
+ __d = _Tp(1) / (__a * __d + __b);
+ __c = __b + __a / __c;
+ const _Tp __del = __c * __d;
+ __h *= __del;
+ if (std::abs(__del - _Tp(1)) < __eps)
+ {
+ const _Tp __ans = __h * std::exp(-__x);
+ return __ans;
+ }
+ }
+ std::__throw_runtime_error(__N("Continued fraction failed "
+ "in __expint_En_cont_frac."));
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$
+ * by recursion. Use upward recursion for @f$ x < n @f$
+ * and downward recursion (Miller's algorithm) otherwise.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_En_recursion(const unsigned int __n, const _Tp __x)
+ {
+ _Tp __En;
+ _Tp __E1 = __expint_E1(__x);
+ if (__x < _Tp(__n))
+ {
+ // Forward recursion is stable only for n < x.
+ __En = __E1;
+ for (unsigned int __j = 2; __j < __n; ++__j)
+ __En = (std::exp(-__x) - __x * __En) / _Tp(__j - 1);
+ }
+ else
+ {
+ // Backward recursion is stable only for n >= x.
+ __En = _Tp(1);
+ const int __N = __n + 20; // TODO: Check this starting number.
+ _Tp __save = _Tp(0);
+ for (int __j = __N; __j > 0; --__j)
+ {
+ __En = (std::exp(-__x) - __j * __En) / __x;
+ if (__j == __n)
+ __save = __En;
+ }
+ _Tp __norm = __En / __E1;
+ __En /= __norm;
+ }
+
+ return __En;
+ }
+
+ /**
+ * @brief Return the exponential integral @f$ Ei(x) @f$
+ * by series summation.
+ *
+ * The exponential integral is given by
+ * \f[
+ * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_Ei_series(const _Tp __x)
+ {
+ _Tp __term = _Tp(1);
+ _Tp __sum = _Tp(0);
+ const unsigned int __max_iter = 1000;
+ for (unsigned int __i = 1; __i < __max_iter; ++__i)
+ {
+ __term *= __x / __i;
+ __sum += __term / __i;
+ if (__term < std::numeric_limits<_Tp>::epsilon() * __sum)
+ break;
+ }
+
+ return __numeric_constants<_Tp>::__gamma_e() + __sum + std::log(__x);
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ Ei(x) @f$
+ * by asymptotic expansion.
+ *
+ * The exponential integral is given by
+ * \f[
+ * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_Ei_asymp(const _Tp __x)
+ {
+ _Tp __term = _Tp(1);
+ _Tp __sum = _Tp(1);
+ const unsigned int __max_iter = 1000;
+ for (unsigned int __i = 1; __i < __max_iter; ++__i)
+ {
+ _Tp __prev = __term;
+ __term *= __i / __x;
+ if (__term < std::numeric_limits<_Tp>::epsilon())
+ break;
+ if (__term >= __prev)
+ break;
+ __sum += __term;
+ }
+
+ return std::exp(__x) * __sum / __x;
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ Ei(x) @f$.
+ *
+ * The exponential integral is given by
+ * \f[
+ * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_Ei(const _Tp __x)
+ {
+ if (__x < _Tp(0))
+ return -__expint_E1(-__x);
+ else if (__x < -std::log(std::numeric_limits<_Tp>::epsilon()))
+ return __expint_Ei_series(__x);
+ else
+ return __expint_Ei_asymp(__x);
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_1(x) @f$.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_1(x) = \int_{1}^\infty \frac{e^{-xt}}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_E1(const _Tp __x)
+ {
+ if (__x < _Tp(0))
+ return -__expint_Ei(-__x);
+ else if (__x < _Tp(1))
+ return __expint_E1_series(__x);
+ else if (__x < _Tp(100)) // TODO: Find a good asymptotic switch point.
+ return __expint_En_cont_frac(1, __x);
+ else
+ return __expint_E1_asymp(__x);
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$
+ * for large argument.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ *
+ * This is something of an extension.
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_asymp(const unsigned int __n, const _Tp __x)
+ {
+ _Tp __term = _Tp(1);
+ _Tp __sum = _Tp(1);
+ for (unsigned int __i = 1; __i <= __n; ++__i)
+ {
+ _Tp __prev = __term;
+ __term *= -(__n - __i + 1) / __x;
+ if (std::abs(__term) > std::abs(__prev))
+ break;
+ __sum += __term;
+ }
+
+ return std::exp(-__x) * __sum / __x;
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$
+ * for large order.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ *
+ * This is something of an extension.
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint_large_n(const unsigned int __n, const _Tp __x)
+ {
+ const _Tp __xpn = __x + __n;
+ const _Tp __xpn2 = __xpn * __xpn;
+ _Tp __term = _Tp(1);
+ _Tp __sum = _Tp(1);
+ for (unsigned int __i = 1; __i <= __n; ++__i)
+ {
+ _Tp __prev = __term;
+ __term *= (__n - 2 * (__i - 1) * __x) / __xpn2;
+ if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __sum += __term;
+ }
+
+ return std::exp(-__x) * __sum / __xpn;
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ E_n(x) @f$.
+ *
+ * The exponential integral is given by
+ * \f[
+ * E_n(x) = \int_{1}^\infty \frac{e^{-xt}}{t^n} dt
+ * \f]
+ * This is something of an extension.
+ *
+ * @param __n The order of the exponential integral function.
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ _Tp
+ __expint(const unsigned int __n, const _Tp __x)
+ {
+ // Return NaN on NaN input.
+ if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__n <= 1 && __x == _Tp(0))
+ return std::numeric_limits<_Tp>::infinity();
+ else
+ {
+ _Tp __E0 = std::exp(__x) / __x;
+ if (__n == 0)
+ return __E0;
+
+ _Tp __E1 = __expint_E1(__x);
+ if (__n == 1)
+ return __E1;
+
+ if (__x == _Tp(0))
+ return _Tp(1) / static_cast<_Tp>(__n - 1);
+
+ _Tp __En = __expint_En_recursion(__n, __x);
+
+ return __En;
+ }
+ }
+
+
+ /**
+ * @brief Return the exponential integral @f$ Ei(x) @f$.
+ *
+ * The exponential integral is given by
+ * \f[
+ * Ei(x) = -\int_{-x}^\infty \frac{e^t}{t} dt
+ * \f]
+ *
+ * @param __x The argument of the exponential integral function.
+ * @return The exponential integral.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __expint(const _Tp __x)
+ {
+ if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ return __expint_Ei(__x);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_EXP_INTEGRAL_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/fenv.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/fenv.h
new file mode 100644
index 0000000..118630e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/fenv.h
@@ -0,0 +1,34 @@
+// TR1 fenv.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/fenv.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_FENV_H
+#define _TR1_FENV_H 1
+
+#include <tr1/cfenv>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/float.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/float.h
new file mode 100644
index 0000000..bbeff6e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/float.h
@@ -0,0 +1,34 @@
+// TR1 float.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/float.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_FLOAT_H
+#define _TR1_FLOAT_H 1
+
+#include <tr1/cfloat>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional
new file mode 100644
index 0000000..3deaa5e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional
@@ -0,0 +1,63 @@
+// TR1 functional header -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/functional
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_FUNCTIONAL
+#define _GLIBCXX_TR1_FUNCTIONAL 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <bits/c++config.h>
+#include <bits/stl_function.h>
+
+#include <typeinfo>
+#include <new>
+#include <tr1/tuple>
+#include <tr1/type_traits>
+#include <bits/stringfwd.h>
+#include <tr1/functional_hash.h>
+#include <ext/type_traits.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/functional>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/functional>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_FUNCTIONAL
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional_hash.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional_hash.h
new file mode 100644
index 0000000..933ded9
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/functional_hash.h
@@ -0,0 +1,53 @@
+// TR1 functional_hash.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/functional_hash.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_TR1_FUNCTIONAL_HASH_H
+#define _GLIBCXX_TR1_FUNCTIONAL_HASH_H 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/functional_hash.h>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/functional_hash.h>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_FUNCTIONAL_HASH_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/gamma.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/gamma.tcc
new file mode 100644
index 0000000..f456da3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/gamma.tcc
@@ -0,0 +1,471 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/gamma.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 6, pp. 253-266
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 213-216
+// (4) Gamma, Exploring Euler's Constant, Julian Havil,
+// Princeton, 2003.
+
+#ifndef _TR1_GAMMA_TCC
+#define _TR1_GAMMA_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief This returns Bernoulli numbers from a table or by summation
+ * for larger values.
+ *
+ * Recursion is unstable.
+ *
+ * @param __n the order n of the Bernoulli number.
+ * @return The Bernoulli number of order n.
+ */
+ template <typename _Tp>
+ _Tp __bernoulli_series(unsigned int __n)
+ {
+
+ static const _Tp __num[28] = {
+ _Tp(1UL), -_Tp(1UL) / _Tp(2UL),
+ _Tp(1UL) / _Tp(6UL), _Tp(0UL),
+ -_Tp(1UL) / _Tp(30UL), _Tp(0UL),
+ _Tp(1UL) / _Tp(42UL), _Tp(0UL),
+ -_Tp(1UL) / _Tp(30UL), _Tp(0UL),
+ _Tp(5UL) / _Tp(66UL), _Tp(0UL),
+ -_Tp(691UL) / _Tp(2730UL), _Tp(0UL),
+ _Tp(7UL) / _Tp(6UL), _Tp(0UL),
+ -_Tp(3617UL) / _Tp(510UL), _Tp(0UL),
+ _Tp(43867UL) / _Tp(798UL), _Tp(0UL),
+ -_Tp(174611) / _Tp(330UL), _Tp(0UL),
+ _Tp(854513UL) / _Tp(138UL), _Tp(0UL),
+ -_Tp(236364091UL) / _Tp(2730UL), _Tp(0UL),
+ _Tp(8553103UL) / _Tp(6UL), _Tp(0UL)
+ };
+
+ if (__n == 0)
+ return _Tp(1);
+
+ if (__n == 1)
+ return -_Tp(1) / _Tp(2);
+
+ // Take care of the rest of the odd ones.
+ if (__n % 2 == 1)
+ return _Tp(0);
+
+ // Take care of some small evens that are painful for the series.
+ if (__n < 28)
+ return __num[__n];
+
+
+ _Tp __fact = _Tp(1);
+ if ((__n / 2) % 2 == 0)
+ __fact *= _Tp(-1);
+ for (unsigned int __k = 1; __k <= __n; ++__k)
+ __fact *= __k / (_Tp(2) * __numeric_constants<_Tp>::__pi());
+ __fact *= _Tp(2);
+
+ _Tp __sum = _Tp(0);
+ for (unsigned int __i = 1; __i < 1000; ++__i)
+ {
+ _Tp __term = std::pow(_Tp(__i), -_Tp(__n));
+ if (__term < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __sum += __term;
+ }
+
+ return __fact * __sum;
+ }
+
+
+ /**
+ * @brief This returns Bernoulli number \f$B_n\f$.
+ *
+ * @param __n the order n of the Bernoulli number.
+ * @return The Bernoulli number of order n.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __bernoulli(const int __n)
+ {
+ return __bernoulli_series<_Tp>(__n);
+ }
+
+
+ /**
+ * @brief Return \f$log(\Gamma(x))\f$ by asymptotic expansion
+ * with Bernoulli number coefficients. This is like
+ * Sterling's approximation.
+ *
+ * @param __x The argument of the log of the gamma function.
+ * @return The logarithm of the gamma function.
+ */
+ template<typename _Tp>
+ _Tp
+ __log_gamma_bernoulli(const _Tp __x)
+ {
+ _Tp __lg = (__x - _Tp(0.5L)) * std::log(__x) - __x
+ + _Tp(0.5L) * std::log(_Tp(2)
+ * __numeric_constants<_Tp>::__pi());
+
+ const _Tp __xx = __x * __x;
+ _Tp __help = _Tp(1) / __x;
+ for ( unsigned int __i = 1; __i < 20; ++__i )
+ {
+ const _Tp __2i = _Tp(2 * __i);
+ __help /= __2i * (__2i - _Tp(1)) * __xx;
+ __lg += __bernoulli<_Tp>(2 * __i) * __help;
+ }
+
+ return __lg;
+ }
+
+
+ /**
+ * @brief Return \f$log(\Gamma(x))\f$ by the Lanczos method.
+ * This method dominates all others on the positive axis I think.
+ *
+ * @param __x The argument of the log of the gamma function.
+ * @return The logarithm of the gamma function.
+ */
+ template<typename _Tp>
+ _Tp
+ __log_gamma_lanczos(const _Tp __x)
+ {
+ const _Tp __xm1 = __x - _Tp(1);
+
+ static const _Tp __lanczos_cheb_7[9] = {
+ _Tp( 0.99999999999980993227684700473478L),
+ _Tp( 676.520368121885098567009190444019L),
+ _Tp(-1259.13921672240287047156078755283L),
+ _Tp( 771.3234287776530788486528258894L),
+ _Tp(-176.61502916214059906584551354L),
+ _Tp( 12.507343278686904814458936853L),
+ _Tp(-0.13857109526572011689554707L),
+ _Tp( 9.984369578019570859563e-6L),
+ _Tp( 1.50563273514931155834e-7L)
+ };
+
+ static const _Tp __LOGROOT2PI
+ = _Tp(0.9189385332046727417803297364056176L);
+
+ _Tp __sum = __lanczos_cheb_7[0];
+ for(unsigned int __k = 1; __k < 9; ++__k)
+ __sum += __lanczos_cheb_7[__k] / (__xm1 + __k);
+
+ const _Tp __term1 = (__xm1 + _Tp(0.5L))
+ * std::log((__xm1 + _Tp(7.5L))
+ / __numeric_constants<_Tp>::__euler());
+ const _Tp __term2 = __LOGROOT2PI + std::log(__sum);
+ const _Tp __result = __term1 + (__term2 - _Tp(7));
+
+ return __result;
+ }
+
+
+ /**
+ * @brief Return \f$ log(|\Gamma(x)|) \f$.
+ * This will return values even for \f$ x < 0 \f$.
+ * To recover the sign of \f$ \Gamma(x) \f$ for
+ * any argument use @a __log_gamma_sign.
+ *
+ * @param __x The argument of the log of the gamma function.
+ * @return The logarithm of the gamma function.
+ */
+ template<typename _Tp>
+ _Tp
+ __log_gamma(const _Tp __x)
+ {
+ if (__x > _Tp(0.5L))
+ return __log_gamma_lanczos(__x);
+ else
+ {
+ const _Tp __sin_fact
+ = std::abs(std::sin(__numeric_constants<_Tp>::__pi() * __x));
+ if (__sin_fact == _Tp(0))
+ std::__throw_domain_error(__N("Argument is nonpositive integer "
+ "in __log_gamma"));
+ return __numeric_constants<_Tp>::__lnpi()
+ - std::log(__sin_fact)
+ - __log_gamma_lanczos(_Tp(1) - __x);
+ }
+ }
+
+
+ /**
+ * @brief Return the sign of \f$ \Gamma(x) \f$.
+ * At nonpositive integers zero is returned.
+ *
+ * @param __x The argument of the gamma function.
+ * @return The sign of the gamma function.
+ */
+ template<typename _Tp>
+ _Tp
+ __log_gamma_sign(const _Tp __x)
+ {
+ if (__x > _Tp(0))
+ return _Tp(1);
+ else
+ {
+ const _Tp __sin_fact
+ = std::sin(__numeric_constants<_Tp>::__pi() * __x);
+ if (__sin_fact > _Tp(0))
+ return (1);
+ else if (__sin_fact < _Tp(0))
+ return -_Tp(1);
+ else
+ return _Tp(0);
+ }
+ }
+
+
+ /**
+ * @brief Return the logarithm of the binomial coefficient.
+ * The binomial coefficient is given by:
+ * @f[
+ * \left( \right) = \frac{n!}{(n-k)! k!}
+ * @f]
+ *
+ * @param __n The first argument of the binomial coefficient.
+ * @param __k The second argument of the binomial coefficient.
+ * @return The binomial coefficient.
+ */
+ template<typename _Tp>
+ _Tp
+ __log_bincoef(const unsigned int __n, const unsigned int __k)
+ {
+ // Max e exponent before overflow.
+ static const _Tp __max_bincoeff
+ = std::numeric_limits<_Tp>::max_exponent10
+ * std::log(_Tp(10)) - _Tp(1);
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _Tp __coeff = std::tr1::lgamma(_Tp(1 + __n))
+ - std::tr1::lgamma(_Tp(1 + __k))
+ - std::tr1::lgamma(_Tp(1 + __n - __k));
+#else
+ _Tp __coeff = __log_gamma(_Tp(1 + __n))
+ - __log_gamma(_Tp(1 + __k))
+ - __log_gamma(_Tp(1 + __n - __k));
+#endif
+ }
+
+
+ /**
+ * @brief Return the binomial coefficient.
+ * The binomial coefficient is given by:
+ * @f[
+ * \left( \right) = \frac{n!}{(n-k)! k!}
+ * @f]
+ *
+ * @param __n The first argument of the binomial coefficient.
+ * @param __k The second argument of the binomial coefficient.
+ * @return The binomial coefficient.
+ */
+ template<typename _Tp>
+ _Tp
+ __bincoef(const unsigned int __n, const unsigned int __k)
+ {
+ // Max e exponent before overflow.
+ static const _Tp __max_bincoeff
+ = std::numeric_limits<_Tp>::max_exponent10
+ * std::log(_Tp(10)) - _Tp(1);
+
+ const _Tp __log_coeff = __log_bincoef<_Tp>(__n, __k);
+ if (__log_coeff > __max_bincoeff)
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ return std::exp(__log_coeff);
+ }
+
+
+ /**
+ * @brief Return \f$ \Gamma(x) \f$.
+ *
+ * @param __x The argument of the gamma function.
+ * @return The gamma function.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __gamma(const _Tp __x)
+ {
+ return std::exp(__log_gamma(__x));
+ }
+
+
+ /**
+ * @brief Return the digamma function by series expansion.
+ * The digamma or @f$ \psi(x) @f$ function is defined by
+ * @f[
+ * \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}
+ * @f]
+ *
+ * The series is given by:
+ * @f[
+ * \psi(x) = -\gamma_E - \frac{1}{x}
+ * \sum_{k=1}^{\infty} \frac{x}{k(x + k)}
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __psi_series(const _Tp __x)
+ {
+ _Tp __sum = -__numeric_constants<_Tp>::__gamma_e() - _Tp(1) / __x;
+ const unsigned int __max_iter = 100000;
+ for (unsigned int __k = 1; __k < __max_iter; ++__k)
+ {
+ const _Tp __term = __x / (__k * (__k + __x));
+ __sum += __term;
+ if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon())
+ break;
+ }
+ return __sum;
+ }
+
+
+ /**
+ * @brief Return the digamma function for large argument.
+ * The digamma or @f$ \psi(x) @f$ function is defined by
+ * @f[
+ * \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}
+ * @f]
+ *
+ * The asymptotic series is given by:
+ * @f[
+ * \psi(x) = \ln(x) - \frac{1}{2x}
+ * - \sum_{n=1}^{\infty} \frac{B_{2n}}{2 n x^{2n}}
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __psi_asymp(const _Tp __x)
+ {
+ _Tp __sum = std::log(__x) - _Tp(0.5L) / __x;
+ const _Tp __xx = __x * __x;
+ _Tp __xp = __xx;
+ const unsigned int __max_iter = 100;
+ for (unsigned int __k = 1; __k < __max_iter; ++__k)
+ {
+ const _Tp __term = __bernoulli<_Tp>(2 * __k) / (2 * __k * __xp);
+ __sum -= __term;
+ if (std::abs(__term / __sum) < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __xp *= __xx;
+ }
+ return __sum;
+ }
+
+
+ /**
+ * @brief Return the digamma function.
+ * The digamma or @f$ \psi(x) @f$ function is defined by
+ * @f[
+ * \psi(x) = \frac{\Gamma'(x)}{\Gamma(x)}
+ * @f]
+ * For negative argument the reflection formula is used:
+ * @f[
+ * \psi(x) = \psi(1-x) - \pi \cot(\pi x)
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __psi(const _Tp __x)
+ {
+ const int __n = static_cast<int>(__x + 0.5L);
+ const _Tp __eps = _Tp(4) * std::numeric_limits<_Tp>::epsilon();
+ if (__n <= 0 && std::abs(__x - _Tp(__n)) < __eps)
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x < _Tp(0))
+ {
+ const _Tp __pi = __numeric_constants<_Tp>::__pi();
+ return __psi(_Tp(1) - __x)
+ - __pi * std::cos(__pi * __x) / std::sin(__pi * __x);
+ }
+ else if (__x > _Tp(100))
+ return __psi_asymp(__x);
+ else
+ return __psi_series(__x);
+ }
+
+
+ /**
+ * @brief Return the polygamma function @f$ \psi^{(n)}(x) @f$.
+ *
+ * The polygamma function is related to the Hurwitz zeta function:
+ * @f[
+ * \psi^{(n)}(x) = (-1)^{n+1} m! \zeta(m+1,x)
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __psi(const unsigned int __n, const _Tp __x)
+ {
+ if (__x <= _Tp(0))
+ std::__throw_domain_error(__N("Argument out of range "
+ "in __psi"));
+ else if (__n == 0)
+ return __psi(__x);
+ else
+ {
+ const _Tp __hzeta = __hurwitz_zeta(_Tp(__n + 1), __x);
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __ln_nfact = std::tr1::lgamma(_Tp(__n + 1));
+#else
+ const _Tp __ln_nfact = __log_gamma(_Tp(__n + 1));
+#endif
+ _Tp __result = std::exp(__ln_nfact) * __hzeta;
+ if (__n % 2 == 1)
+ __result = -__result;
+ return __result;
+ }
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _TR1_GAMMA_TCC
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hashtable.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hashtable.h
new file mode 100644
index 0000000..22fdbff
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hashtable.h
@@ -0,0 +1,53 @@
+// TR1 hashtable.h header -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/hashtable.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_TR1_HASHTABLE_H
+#define _GLIBCXX_TR1_HASHTABLE_H 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/hashtable>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/hashtable>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_HASHTABLE_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hypergeometric.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hypergeometric.tcc
new file mode 100644
index 0000000..c975afa
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/hypergeometric.tcc
@@ -0,0 +1,774 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/hypergeometric.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based:
+// (1) Handbook of Mathematical Functions,
+// ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 6, pp. 555-566
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+
+#ifndef _GLIBCXX_TR1_HYPERGEOMETRIC_TCC
+#define _GLIBCXX_TR1_HYPERGEOMETRIC_TCC 1
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief This routine returns the confluent hypergeometric function
+ * by series expansion.
+ *
+ * @f[
+ * _1F_1(a;c;x) = \frac{\Gamma(c)}{\Gamma(a)}
+ * \sum_{n=0}^{\infty}
+ * \frac{\Gamma(a+n)}{\Gamma(c+n)}
+ * \frac{x^n}{n!}
+ * @f]
+ *
+ * If a and b are integers and a < 0 and either b > 0 or b < a then the
+ * series is a polynomial with a finite number of terms. If b is an integer
+ * and b <= 0 the confluent hypergeometric function is undefined.
+ *
+ * @param __a The "numerator" parameter.
+ * @param __c The "denominator" parameter.
+ * @param __x The argument of the confluent hypergeometric function.
+ * @return The confluent hypergeometric function.
+ */
+ template<typename _Tp>
+ _Tp
+ __conf_hyperg_series(const _Tp __a, const _Tp __c, const _Tp __x)
+ {
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+
+ _Tp __term = _Tp(1);
+ _Tp __Fac = _Tp(1);
+ const unsigned int __max_iter = 100000;
+ unsigned int __i;
+ for (__i = 0; __i < __max_iter; ++__i)
+ {
+ __term *= (__a + _Tp(__i)) * __x
+ / ((__c + _Tp(__i)) * _Tp(1 + __i));
+ if (std::abs(__term) < __eps)
+ {
+ break;
+ }
+ __Fac += __term;
+ }
+ if (__i == __max_iter)
+ std::__throw_runtime_error(__N("Series failed to converge "
+ "in __conf_hyperg_series."));
+
+ return __Fac;
+ }
+
+
+ /**
+ * @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$
+ * by an iterative procedure described in
+ * Luke, Algorithms for the Computation of Mathematical Functions.
+ *
+ * Like the case of the 2F1 rational approximations, these are
+ * probably guaranteed to converge for x < 0, barring gross
+ * numerical instability in the pre-asymptotic regime.
+ */
+ template<typename _Tp>
+ _Tp
+ __conf_hyperg_luke(const _Tp __a, const _Tp __c, const _Tp __xin)
+ {
+ const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L));
+ const int __nmax = 20000;
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __x = -__xin;
+ const _Tp __x3 = __x * __x * __x;
+ const _Tp __t0 = __a / __c;
+ const _Tp __t1 = (__a + _Tp(1)) / (_Tp(2) * __c);
+ const _Tp __t2 = (__a + _Tp(2)) / (_Tp(2) * (__c + _Tp(1)));
+ _Tp __F = _Tp(1);
+ _Tp __prec;
+
+ _Tp __Bnm3 = _Tp(1);
+ _Tp __Bnm2 = _Tp(1) + __t1 * __x;
+ _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x);
+
+ _Tp __Anm3 = _Tp(1);
+ _Tp __Anm2 = __Bnm2 - __t0 * __x;
+ _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x
+ + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x;
+
+ int __n = 3;
+ while(1)
+ {
+ _Tp __npam1 = _Tp(__n - 1) + __a;
+ _Tp __npcm1 = _Tp(__n - 1) + __c;
+ _Tp __npam2 = _Tp(__n - 2) + __a;
+ _Tp __npcm2 = _Tp(__n - 2) + __c;
+ _Tp __tnm1 = _Tp(2 * __n - 1);
+ _Tp __tnm3 = _Tp(2 * __n - 3);
+ _Tp __tnm5 = _Tp(2 * __n - 5);
+ _Tp __F1 = (_Tp(__n - 2) - __a) / (_Tp(2) * __tnm3 * __npcm1);
+ _Tp __F2 = (_Tp(__n) + __a) * __npam1
+ / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1);
+ _Tp __F3 = -__npam2 * __npam1 * (_Tp(__n - 2) - __a)
+ / (_Tp(8) * __tnm3 * __tnm3 * __tnm5
+ * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1);
+ _Tp __E = -__npam1 * (_Tp(__n - 1) - __c)
+ / (_Tp(2) * __tnm3 * __npcm2 * __npcm1);
+
+ _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1
+ + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3;
+ _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1
+ + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3;
+ _Tp __r = __An / __Bn;
+
+ __prec = std::abs((__F - __r) / __F);
+ __F = __r;
+
+ if (__prec < __eps || __n > __nmax)
+ break;
+
+ if (std::abs(__An) > __big || std::abs(__Bn) > __big)
+ {
+ __An /= __big;
+ __Bn /= __big;
+ __Anm1 /= __big;
+ __Bnm1 /= __big;
+ __Anm2 /= __big;
+ __Bnm2 /= __big;
+ __Anm3 /= __big;
+ __Bnm3 /= __big;
+ }
+ else if (std::abs(__An) < _Tp(1) / __big
+ || std::abs(__Bn) < _Tp(1) / __big)
+ {
+ __An *= __big;
+ __Bn *= __big;
+ __Anm1 *= __big;
+ __Bnm1 *= __big;
+ __Anm2 *= __big;
+ __Bnm2 *= __big;
+ __Anm3 *= __big;
+ __Bnm3 *= __big;
+ }
+
+ ++__n;
+ __Bnm3 = __Bnm2;
+ __Bnm2 = __Bnm1;
+ __Bnm1 = __Bn;
+ __Anm3 = __Anm2;
+ __Anm2 = __Anm1;
+ __Anm1 = __An;
+ }
+
+ if (__n >= __nmax)
+ std::__throw_runtime_error(__N("Iteration failed to converge "
+ "in __conf_hyperg_luke."));
+
+ return __F;
+ }
+
+
+ /**
+ * @brief Return the confluent hypogeometric function
+ * @f$ _1F_1(a;c;x) @f$.
+ *
+ * @todo Handle b == nonpositive integer blowup - return NaN.
+ *
+ * @param __a The "numerator" parameter.
+ * @param __c The "denominator" parameter.
+ * @param __x The argument of the confluent hypergeometric function.
+ * @return The confluent hypergeometric function.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __conf_hyperg(const _Tp __a, const _Tp __c, const _Tp __x)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __c_nint = std::tr1::nearbyint(__c);
+#else
+ const _Tp __c_nint = static_cast<int>(__c + _Tp(0.5L));
+#endif
+ if (__isnan(__a) || __isnan(__c) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__c_nint == __c && __c_nint <= 0)
+ return std::numeric_limits<_Tp>::infinity();
+ else if (__a == _Tp(0))
+ return _Tp(1);
+ else if (__c == __a)
+ return std::exp(__x);
+ else if (__x < _Tp(0))
+ return __conf_hyperg_luke(__a, __c, __x);
+ else
+ return __conf_hyperg_series(__a, __c, __x);
+ }
+
+
+ /**
+ * @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$
+ * by series expansion.
+ *
+ * The hypogeometric function is defined by
+ * @f[
+ * _2F_1(a,b;c;x) = \frac{\Gamma(c)}{\Gamma(a)\Gamma(b)}
+ * \sum_{n=0}^{\infty}
+ * \frac{\Gamma(a+n)\Gamma(b+n)}{\Gamma(c+n)}
+ * \frac{x^n}{n!}
+ * @f]
+ *
+ * This works and it's pretty fast.
+ *
+ * @param __a The first "numerator" parameter.
+ * @param __a The second "numerator" parameter.
+ * @param __c The "denominator" parameter.
+ * @param __x The argument of the confluent hypergeometric function.
+ * @return The confluent hypergeometric function.
+ */
+ template<typename _Tp>
+ _Tp
+ __hyperg_series(const _Tp __a, const _Tp __b,
+ const _Tp __c, const _Tp __x)
+ {
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+
+ _Tp __term = _Tp(1);
+ _Tp __Fabc = _Tp(1);
+ const unsigned int __max_iter = 100000;
+ unsigned int __i;
+ for (__i = 0; __i < __max_iter; ++__i)
+ {
+ __term *= (__a + _Tp(__i)) * (__b + _Tp(__i)) * __x
+ / ((__c + _Tp(__i)) * _Tp(1 + __i));
+ if (std::abs(__term) < __eps)
+ {
+ break;
+ }
+ __Fabc += __term;
+ }
+ if (__i == __max_iter)
+ std::__throw_runtime_error(__N("Series failed to converge "
+ "in __hyperg_series."));
+
+ return __Fabc;
+ }
+
+
+ /**
+ * @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$
+ * by an iterative procedure described in
+ * Luke, Algorithms for the Computation of Mathematical Functions.
+ */
+ template<typename _Tp>
+ _Tp
+ __hyperg_luke(const _Tp __a, const _Tp __b, const _Tp __c,
+ const _Tp __xin)
+ {
+ const _Tp __big = std::pow(std::numeric_limits<_Tp>::max(), _Tp(0.16L));
+ const int __nmax = 20000;
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __x = -__xin;
+ const _Tp __x3 = __x * __x * __x;
+ const _Tp __t0 = __a * __b / __c;
+ const _Tp __t1 = (__a + _Tp(1)) * (__b + _Tp(1)) / (_Tp(2) * __c);
+ const _Tp __t2 = (__a + _Tp(2)) * (__b + _Tp(2))
+ / (_Tp(2) * (__c + _Tp(1)));
+
+ _Tp __F = _Tp(1);
+
+ _Tp __Bnm3 = _Tp(1);
+ _Tp __Bnm2 = _Tp(1) + __t1 * __x;
+ _Tp __Bnm1 = _Tp(1) + __t2 * __x * (_Tp(1) + __t1 / _Tp(3) * __x);
+
+ _Tp __Anm3 = _Tp(1);
+ _Tp __Anm2 = __Bnm2 - __t0 * __x;
+ _Tp __Anm1 = __Bnm1 - __t0 * (_Tp(1) + __t2 * __x) * __x
+ + __t0 * __t1 * (__c / (__c + _Tp(1))) * __x * __x;
+
+ int __n = 3;
+ while (1)
+ {
+ const _Tp __npam1 = _Tp(__n - 1) + __a;
+ const _Tp __npbm1 = _Tp(__n - 1) + __b;
+ const _Tp __npcm1 = _Tp(__n - 1) + __c;
+ const _Tp __npam2 = _Tp(__n - 2) + __a;
+ const _Tp __npbm2 = _Tp(__n - 2) + __b;
+ const _Tp __npcm2 = _Tp(__n - 2) + __c;
+ const _Tp __tnm1 = _Tp(2 * __n - 1);
+ const _Tp __tnm3 = _Tp(2 * __n - 3);
+ const _Tp __tnm5 = _Tp(2 * __n - 5);
+ const _Tp __n2 = __n * __n;
+ const _Tp __F1 = (_Tp(3) * __n2 + (__a + __b - _Tp(6)) * __n
+ + _Tp(2) - __a * __b - _Tp(2) * (__a + __b))
+ / (_Tp(2) * __tnm3 * __npcm1);
+ const _Tp __F2 = -(_Tp(3) * __n2 - (__a + __b + _Tp(6)) * __n
+ + _Tp(2) - __a * __b) * __npam1 * __npbm1
+ / (_Tp(4) * __tnm1 * __tnm3 * __npcm2 * __npcm1);
+ const _Tp __F3 = (__npam2 * __npam1 * __npbm2 * __npbm1
+ * (_Tp(__n - 2) - __a) * (_Tp(__n - 2) - __b))
+ / (_Tp(8) * __tnm3 * __tnm3 * __tnm5
+ * (_Tp(__n - 3) + __c) * __npcm2 * __npcm1);
+ const _Tp __E = -__npam1 * __npbm1 * (_Tp(__n - 1) - __c)
+ / (_Tp(2) * __tnm3 * __npcm2 * __npcm1);
+
+ _Tp __An = (_Tp(1) + __F1 * __x) * __Anm1
+ + (__E + __F2 * __x) * __x * __Anm2 + __F3 * __x3 * __Anm3;
+ _Tp __Bn = (_Tp(1) + __F1 * __x) * __Bnm1
+ + (__E + __F2 * __x) * __x * __Bnm2 + __F3 * __x3 * __Bnm3;
+ const _Tp __r = __An / __Bn;
+
+ const _Tp __prec = std::abs((__F - __r) / __F);
+ __F = __r;
+
+ if (__prec < __eps || __n > __nmax)
+ break;
+
+ if (std::abs(__An) > __big || std::abs(__Bn) > __big)
+ {
+ __An /= __big;
+ __Bn /= __big;
+ __Anm1 /= __big;
+ __Bnm1 /= __big;
+ __Anm2 /= __big;
+ __Bnm2 /= __big;
+ __Anm3 /= __big;
+ __Bnm3 /= __big;
+ }
+ else if (std::abs(__An) < _Tp(1) / __big
+ || std::abs(__Bn) < _Tp(1) / __big)
+ {
+ __An *= __big;
+ __Bn *= __big;
+ __Anm1 *= __big;
+ __Bnm1 *= __big;
+ __Anm2 *= __big;
+ __Bnm2 *= __big;
+ __Anm3 *= __big;
+ __Bnm3 *= __big;
+ }
+
+ ++__n;
+ __Bnm3 = __Bnm2;
+ __Bnm2 = __Bnm1;
+ __Bnm1 = __Bn;
+ __Anm3 = __Anm2;
+ __Anm2 = __Anm1;
+ __Anm1 = __An;
+ }
+
+ if (__n >= __nmax)
+ std::__throw_runtime_error(__N("Iteration failed to converge "
+ "in __hyperg_luke."));
+
+ return __F;
+ }
+
+
+ /**
+ * @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$ by the reflection
+ * formulae in Abramowitz & Stegun formula 15.3.6 for d = c - a - b not integral
+ * and formula 15.3.11 for d = c - a - b integral.
+ * This assumes a, b, c != negative integer.
+ *
+ * The hypogeometric function is defined by
+ * @f[
+ * _2F_1(a,b;c;x) = \frac{\Gamma(c)}{\Gamma(a)\Gamma(b)}
+ * \sum_{n=0}^{\infty}
+ * \frac{\Gamma(a+n)\Gamma(b+n)}{\Gamma(c+n)}
+ * \frac{x^n}{n!}
+ * @f]
+ *
+ * The reflection formula for nonintegral @f$ d = c - a - b @f$ is:
+ * @f[
+ * _2F_1(a,b;c;x) = \frac{\Gamma(c)\Gamma(d)}{\Gamma(c-a)\Gamma(c-b)}
+ * _2F_1(a,b;1-d;1-x)
+ * + \frac{\Gamma(c)\Gamma(-d)}{\Gamma(a)\Gamma(b)}
+ * _2F_1(c-a,c-b;1+d;1-x)
+ * @f]
+ *
+ * The reflection formula for integral @f$ m = c - a - b @f$ is:
+ * @f[
+ * _2F_1(a,b;a+b+m;x) = \frac{\Gamma(m)\Gamma(a+b+m)}{\Gamma(a+m)\Gamma(b+m)}
+ * \sum_{k=0}^{m-1} \frac{(m+a)_k(m+b)_k}{k!(1-m)_k}
+ * -
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __hyperg_reflect(const _Tp __a, const _Tp __b, const _Tp __c,
+ const _Tp __x)
+ {
+ const _Tp __d = __c - __a - __b;
+ const int __intd = std::floor(__d + _Tp(0.5L));
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __toler = _Tp(1000) * __eps;
+ const _Tp __log_max = std::log(std::numeric_limits<_Tp>::max());
+ const bool __d_integer = (std::abs(__d - __intd) < __toler);
+
+ if (__d_integer)
+ {
+ const _Tp __ln_omx = std::log(_Tp(1) - __x);
+ const _Tp __ad = std::abs(__d);
+ _Tp __F1, __F2;
+
+ _Tp __d1, __d2;
+ if (__d >= _Tp(0))
+ {
+ __d1 = __d;
+ __d2 = _Tp(0);
+ }
+ else
+ {
+ __d1 = _Tp(0);
+ __d2 = __d;
+ }
+
+ const _Tp __lng_c = __log_gamma(__c);
+
+ // Evaluate F1.
+ if (__ad < __eps)
+ {
+ // d = c - a - b = 0.
+ __F1 = _Tp(0);
+ }
+ else
+ {
+
+ bool __ok_d1 = true;
+ _Tp __lng_ad, __lng_ad1, __lng_bd1;
+ __try
+ {
+ __lng_ad = __log_gamma(__ad);
+ __lng_ad1 = __log_gamma(__a + __d1);
+ __lng_bd1 = __log_gamma(__b + __d1);
+ }
+ __catch(...)
+ {
+ __ok_d1 = false;
+ }
+
+ if (__ok_d1)
+ {
+ /* Gamma functions in the denominator are ok.
+ * Proceed with evaluation.
+ */
+ _Tp __sum1 = _Tp(1);
+ _Tp __term = _Tp(1);
+ _Tp __ln_pre1 = __lng_ad + __lng_c + __d2 * __ln_omx
+ - __lng_ad1 - __lng_bd1;
+
+ /* Do F1 sum.
+ */
+ for (int __i = 1; __i < __ad; ++__i)
+ {
+ const int __j = __i - 1;
+ __term *= (__a + __d2 + __j) * (__b + __d2 + __j)
+ / (_Tp(1) + __d2 + __j) / __i * (_Tp(1) - __x);
+ __sum1 += __term;
+ }
+
+ if (__ln_pre1 > __log_max)
+ std::__throw_runtime_error(__N("Overflow of gamma functions "
+ "in __hyperg_luke."));
+ else
+ __F1 = std::exp(__ln_pre1) * __sum1;
+ }
+ else
+ {
+ // Gamma functions in the denominator were not ok.
+ // So the F1 term is zero.
+ __F1 = _Tp(0);
+ }
+ } // end F1 evaluation
+
+ // Evaluate F2.
+ bool __ok_d2 = true;
+ _Tp __lng_ad2, __lng_bd2;
+ __try
+ {
+ __lng_ad2 = __log_gamma(__a + __d2);
+ __lng_bd2 = __log_gamma(__b + __d2);
+ }
+ __catch(...)
+ {
+ __ok_d2 = false;
+ }
+
+ if (__ok_d2)
+ {
+ // Gamma functions in the denominator are ok.
+ // Proceed with evaluation.
+ const int __maxiter = 2000;
+ const _Tp __psi_1 = -__numeric_constants<_Tp>::__gamma_e();
+ const _Tp __psi_1pd = __psi(_Tp(1) + __ad);
+ const _Tp __psi_apd1 = __psi(__a + __d1);
+ const _Tp __psi_bpd1 = __psi(__b + __d1);
+
+ _Tp __psi_term = __psi_1 + __psi_1pd - __psi_apd1
+ - __psi_bpd1 - __ln_omx;
+ _Tp __fact = _Tp(1);
+ _Tp __sum2 = __psi_term;
+ _Tp __ln_pre2 = __lng_c + __d1 * __ln_omx
+ - __lng_ad2 - __lng_bd2;
+
+ // Do F2 sum.
+ int __j;
+ for (__j = 1; __j < __maxiter; ++__j)
+ {
+ // Values for psi functions use recurrence; Abramowitz & Stegun 6.3.5
+ const _Tp __term1 = _Tp(1) / _Tp(__j)
+ + _Tp(1) / (__ad + __j);
+ const _Tp __term2 = _Tp(1) / (__a + __d1 + _Tp(__j - 1))
+ + _Tp(1) / (__b + __d1 + _Tp(__j - 1));
+ __psi_term += __term1 - __term2;
+ __fact *= (__a + __d1 + _Tp(__j - 1))
+ * (__b + __d1 + _Tp(__j - 1))
+ / ((__ad + __j) * __j) * (_Tp(1) - __x);
+ const _Tp __delta = __fact * __psi_term;
+ __sum2 += __delta;
+ if (std::abs(__delta) < __eps * std::abs(__sum2))
+ break;
+ }
+ if (__j == __maxiter)
+ std::__throw_runtime_error(__N("Sum F2 failed to converge "
+ "in __hyperg_reflect"));
+
+ if (__sum2 == _Tp(0))
+ __F2 = _Tp(0);
+ else
+ __F2 = std::exp(__ln_pre2) * __sum2;
+ }
+ else
+ {
+ // Gamma functions in the denominator not ok.
+ // So the F2 term is zero.
+ __F2 = _Tp(0);
+ } // end F2 evaluation
+
+ const _Tp __sgn_2 = (__intd % 2 == 1 ? -_Tp(1) : _Tp(1));
+ const _Tp __F = __F1 + __sgn_2 * __F2;
+
+ return __F;
+ }
+ else
+ {
+ // d = c - a - b not an integer.
+
+ // These gamma functions appear in the denominator, so we
+ // catch their harmless domain errors and set the terms to zero.
+ bool __ok1 = true;
+ _Tp __sgn_g1ca = _Tp(0), __ln_g1ca = _Tp(0);
+ _Tp __sgn_g1cb = _Tp(0), __ln_g1cb = _Tp(0);
+ __try
+ {
+ __sgn_g1ca = __log_gamma_sign(__c - __a);
+ __ln_g1ca = __log_gamma(__c - __a);
+ __sgn_g1cb = __log_gamma_sign(__c - __b);
+ __ln_g1cb = __log_gamma(__c - __b);
+ }
+ __catch(...)
+ {
+ __ok1 = false;
+ }
+
+ bool __ok2 = true;
+ _Tp __sgn_g2a = _Tp(0), __ln_g2a = _Tp(0);
+ _Tp __sgn_g2b = _Tp(0), __ln_g2b = _Tp(0);
+ __try
+ {
+ __sgn_g2a = __log_gamma_sign(__a);
+ __ln_g2a = __log_gamma(__a);
+ __sgn_g2b = __log_gamma_sign(__b);
+ __ln_g2b = __log_gamma(__b);
+ }
+ __catch(...)
+ {
+ __ok2 = false;
+ }
+
+ const _Tp __sgn_gc = __log_gamma_sign(__c);
+ const _Tp __ln_gc = __log_gamma(__c);
+ const _Tp __sgn_gd = __log_gamma_sign(__d);
+ const _Tp __ln_gd = __log_gamma(__d);
+ const _Tp __sgn_gmd = __log_gamma_sign(-__d);
+ const _Tp __ln_gmd = __log_gamma(-__d);
+
+ const _Tp __sgn1 = __sgn_gc * __sgn_gd * __sgn_g1ca * __sgn_g1cb;
+ const _Tp __sgn2 = __sgn_gc * __sgn_gmd * __sgn_g2a * __sgn_g2b;
+
+ _Tp __pre1, __pre2;
+ if (__ok1 && __ok2)
+ {
+ _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb;
+ _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b
+ + __d * std::log(_Tp(1) - __x);
+ if (__ln_pre1 < __log_max && __ln_pre2 < __log_max)
+ {
+ __pre1 = std::exp(__ln_pre1);
+ __pre2 = std::exp(__ln_pre2);
+ __pre1 *= __sgn1;
+ __pre2 *= __sgn2;
+ }
+ else
+ {
+ std::__throw_runtime_error(__N("Overflow of gamma functions "
+ "in __hyperg_reflect"));
+ }
+ }
+ else if (__ok1 && !__ok2)
+ {
+ _Tp __ln_pre1 = __ln_gc + __ln_gd - __ln_g1ca - __ln_g1cb;
+ if (__ln_pre1 < __log_max)
+ {
+ __pre1 = std::exp(__ln_pre1);
+ __pre1 *= __sgn1;
+ __pre2 = _Tp(0);
+ }
+ else
+ {
+ std::__throw_runtime_error(__N("Overflow of gamma functions "
+ "in __hyperg_reflect"));
+ }
+ }
+ else if (!__ok1 && __ok2)
+ {
+ _Tp __ln_pre2 = __ln_gc + __ln_gmd - __ln_g2a - __ln_g2b
+ + __d * std::log(_Tp(1) - __x);
+ if (__ln_pre2 < __log_max)
+ {
+ __pre1 = _Tp(0);
+ __pre2 = std::exp(__ln_pre2);
+ __pre2 *= __sgn2;
+ }
+ else
+ {
+ std::__throw_runtime_error(__N("Overflow of gamma functions "
+ "in __hyperg_reflect"));
+ }
+ }
+ else
+ {
+ __pre1 = _Tp(0);
+ __pre2 = _Tp(0);
+ std::__throw_runtime_error(__N("Underflow of gamma functions "
+ "in __hyperg_reflect"));
+ }
+
+ const _Tp __F1 = __hyperg_series(__a, __b, _Tp(1) - __d,
+ _Tp(1) - __x);
+ const _Tp __F2 = __hyperg_series(__c - __a, __c - __b, _Tp(1) + __d,
+ _Tp(1) - __x);
+
+ const _Tp __F = __pre1 * __F1 + __pre2 * __F2;
+
+ return __F;
+ }
+ }
+
+
+ /**
+ * @brief Return the hypogeometric function @f$ _2F_1(a,b;c;x) @f$.
+ *
+ * The hypogeometric function is defined by
+ * @f[
+ * _2F_1(a,b;c;x) = \frac{\Gamma(c)}{\Gamma(a)\Gamma(b)}
+ * \sum_{n=0}^{\infty}
+ * \frac{\Gamma(a+n)\Gamma(b+n)}{\Gamma(c+n)}
+ * \frac{x^n}{n!}
+ * @f]
+ *
+ * @param __a The first "numerator" parameter.
+ * @param __a The second "numerator" parameter.
+ * @param __c The "denominator" parameter.
+ * @param __x The argument of the confluent hypergeometric function.
+ * @return The confluent hypergeometric function.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __hyperg(const _Tp __a, const _Tp __b, const _Tp __c, const _Tp __x)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __a_nint = std::tr1::nearbyint(__a);
+ const _Tp __b_nint = std::tr1::nearbyint(__b);
+ const _Tp __c_nint = std::tr1::nearbyint(__c);
+#else
+ const _Tp __a_nint = static_cast<int>(__a + _Tp(0.5L));
+ const _Tp __b_nint = static_cast<int>(__b + _Tp(0.5L));
+ const _Tp __c_nint = static_cast<int>(__c + _Tp(0.5L));
+#endif
+ const _Tp __toler = _Tp(1000) * std::numeric_limits<_Tp>::epsilon();
+ if (std::abs(__x) >= _Tp(1))
+ std::__throw_domain_error(__N("Argument outside unit circle "
+ "in __hyperg."));
+ else if (__isnan(__a) || __isnan(__b)
+ || __isnan(__c) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__c_nint == __c && __c_nint <= _Tp(0))
+ return std::numeric_limits<_Tp>::infinity();
+ else if (std::abs(__c - __b) < __toler || std::abs(__c - __a) < __toler)
+ return std::pow(_Tp(1) - __x, __c - __a - __b);
+ else if (__a >= _Tp(0) && __b >= _Tp(0) && __c >= _Tp(0)
+ && __x >= _Tp(0) && __x < _Tp(0.995L))
+ return __hyperg_series(__a, __b, __c, __x);
+ else if (std::abs(__a) < _Tp(10) && std::abs(__b) < _Tp(10))
+ {
+ // For integer a and b the hypergeometric function is a finite polynomial.
+ if (__a < _Tp(0) && std::abs(__a - __a_nint) < __toler)
+ return __hyperg_series(__a_nint, __b, __c, __x);
+ else if (__b < _Tp(0) && std::abs(__b - __b_nint) < __toler)
+ return __hyperg_series(__a, __b_nint, __c, __x);
+ else if (__x < -_Tp(0.25L))
+ return __hyperg_luke(__a, __b, __c, __x);
+ else if (__x < _Tp(0.5L))
+ return __hyperg_series(__a, __b, __c, __x);
+ else
+ if (std::abs(__c) > _Tp(10))
+ return __hyperg_series(__a, __b, __c, __x);
+ else
+ return __hyperg_reflect(__a, __b, __c, __x);
+ }
+ else
+ return __hyperg_luke(__a, __b, __c, __x);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_HYPERGEOMETRIC_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/inttypes.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/inttypes.h
new file mode 100644
index 0000000..4c8fd45
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/inttypes.h
@@ -0,0 +1,34 @@
+// TR1 inttypes.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/inttypes.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_INTTYPES_H
+#define _GLIBCXX_TR1_INTTYPES_H 1
+
+#include <tr1/cinttypes>
+
+#endif // _GLIBCXX_TR1_INTTYPES_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/legendre_function.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/legendre_function.tcc
new file mode 100644
index 0000000..8b59814
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/legendre_function.tcc
@@ -0,0 +1,305 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/legendre_function.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 8, pp. 331-341
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 252-254
+
+#ifndef _GLIBCXX_TR1_LEGENDRE_FUNCTION_TCC
+#define _GLIBCXX_TR1_LEGENDRE_FUNCTION_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Return the Legendre polynomial by recursion on order
+ * @f$ l @f$.
+ *
+ * The Legendre function of @f$ l @f$ and @f$ x @f$,
+ * @f$ P_l(x) @f$, is defined by:
+ * @f[
+ * P_l(x) = \frac{1}{2^l l!}\frac{d^l}{dx^l}(x^2 - 1)^{l}
+ * @f]
+ *
+ * @param l The order of the Legendre polynomial. @f$l >= 0@f$.
+ * @param x The argument of the Legendre polynomial. @f$|x| <= 1@f$.
+ */
+ template<typename _Tp>
+ _Tp
+ __poly_legendre_p(const unsigned int __l, const _Tp __x)
+ {
+
+ if ((__x < _Tp(-1)) || (__x > _Tp(+1)))
+ std::__throw_domain_error(__N("Argument out of range"
+ " in __poly_legendre_p."));
+ else if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x == +_Tp(1))
+ return +_Tp(1);
+ else if (__x == -_Tp(1))
+ return (__l % 2 == 1 ? -_Tp(1) : +_Tp(1));
+ else
+ {
+ _Tp __p_lm2 = _Tp(1);
+ if (__l == 0)
+ return __p_lm2;
+
+ _Tp __p_lm1 = __x;
+ if (__l == 1)
+ return __p_lm1;
+
+ _Tp __p_l = 0;
+ for (unsigned int __ll = 2; __ll <= __l; ++__ll)
+ {
+ // This arrangement is supposed to be better for roundoff
+ // protection, Arfken, 2nd Ed, Eq 12.17a.
+ __p_l = _Tp(2) * __x * __p_lm1 - __p_lm2
+ - (__x * __p_lm1 - __p_lm2) / _Tp(__ll);
+ __p_lm2 = __p_lm1;
+ __p_lm1 = __p_l;
+ }
+
+ return __p_l;
+ }
+ }
+
+
+ /**
+ * @brief Return the associated Legendre function by recursion
+ * on @f$ l @f$.
+ *
+ * The associated Legendre function is derived from the Legendre function
+ * @f$ P_l(x) @f$ by the Rodrigues formula:
+ * @f[
+ * P_l^m(x) = (1 - x^2)^{m/2}\frac{d^m}{dx^m}P_l(x)
+ * @f]
+ *
+ * @param l The order of the associated Legendre function.
+ * @f$ l >= 0 @f$.
+ * @param m The order of the associated Legendre function.
+ * @f$ m <= l @f$.
+ * @param x The argument of the associated Legendre function.
+ * @f$ |x| <= 1 @f$.
+ */
+ template<typename _Tp>
+ _Tp
+ __assoc_legendre_p(const unsigned int __l, const unsigned int __m,
+ const _Tp __x)
+ {
+
+ if (__x < _Tp(-1) || __x > _Tp(+1))
+ std::__throw_domain_error(__N("Argument out of range"
+ " in __assoc_legendre_p."));
+ else if (__m > __l)
+ std::__throw_domain_error(__N("Degree out of range"
+ " in __assoc_legendre_p."));
+ else if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__m == 0)
+ return __poly_legendre_p(__l, __x);
+ else
+ {
+ _Tp __p_mm = _Tp(1);
+ if (__m > 0)
+ {
+ // Two square roots seem more accurate more of the time
+ // than just one.
+ _Tp __root = std::sqrt(_Tp(1) - __x) * std::sqrt(_Tp(1) + __x);
+ _Tp __fact = _Tp(1);
+ for (unsigned int __i = 1; __i <= __m; ++__i)
+ {
+ __p_mm *= -__fact * __root;
+ __fact += _Tp(2);
+ }
+ }
+ if (__l == __m)
+ return __p_mm;
+
+ _Tp __p_mp1m = _Tp(2 * __m + 1) * __x * __p_mm;
+ if (__l == __m + 1)
+ return __p_mp1m;
+
+ _Tp __p_lm2m = __p_mm;
+ _Tp __P_lm1m = __p_mp1m;
+ _Tp __p_lm = _Tp(0);
+ for (unsigned int __j = __m + 2; __j <= __l; ++__j)
+ {
+ __p_lm = (_Tp(2 * __j - 1) * __x * __P_lm1m
+ - _Tp(__j + __m - 1) * __p_lm2m) / _Tp(__j - __m);
+ __p_lm2m = __P_lm1m;
+ __P_lm1m = __p_lm;
+ }
+
+ return __p_lm;
+ }
+ }
+
+
+ /**
+ * @brief Return the spherical associated Legendre function.
+ *
+ * The spherical associated Legendre function of @f$ l @f$, @f$ m @f$,
+ * and @f$ \theta @f$ is defined as @f$ Y_l^m(\theta,0) @f$ where
+ * @f[
+ * Y_l^m(\theta,\phi) = (-1)^m[\frac{(2l+1)}{4\pi}
+ * \frac{(l-m)!}{(l+m)!}]
+ * P_l^m(\cos\theta) \exp^{im\phi}
+ * @f]
+ * is the spherical harmonic function and @f$ P_l^m(x) @f$ is the
+ * associated Legendre function.
+ *
+ * This function differs from the associated Legendre function by
+ * argument (@f$x = \cos(\theta)@f$) and by a normalization factor
+ * but this factor is rather large for large @f$ l @f$ and @f$ m @f$
+ * and so this function is stable for larger differences of @f$ l @f$
+ * and @f$ m @f$.
+ *
+ * @param l The order of the spherical associated Legendre function.
+ * @f$ l >= 0 @f$.
+ * @param m The order of the spherical associated Legendre function.
+ * @f$ m <= l @f$.
+ * @param theta The radian angle argument of the spherical associated
+ * Legendre function.
+ */
+ template <typename _Tp>
+ _Tp
+ __sph_legendre(const unsigned int __l, const unsigned int __m,
+ const _Tp __theta)
+ {
+ if (__isnan(__theta))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+
+ const _Tp __x = std::cos(__theta);
+
+ if (__l < __m)
+ {
+ std::__throw_domain_error(__N("Bad argument "
+ "in __sph_legendre."));
+ }
+ else if (__m == 0)
+ {
+ _Tp __P = __poly_legendre_p(__l, __x);
+ _Tp __fact = std::sqrt(_Tp(2 * __l + 1)
+ / (_Tp(4) * __numeric_constants<_Tp>::__pi()));
+ __P *= __fact;
+ return __P;
+ }
+ else if (__x == _Tp(1) || __x == -_Tp(1))
+ {
+ // m > 0 here
+ return _Tp(0);
+ }
+ else
+ {
+ // m > 0 and |x| < 1 here
+
+ // Starting value for recursion.
+ // Y_m^m(x) = sqrt( (2m+1)/(4pi m) gamma(m+1/2)/gamma(m) )
+ // (-1)^m (1-x^2)^(m/2) / pi^(1/4)
+ const _Tp __sgn = ( __m % 2 == 1 ? -_Tp(1) : _Tp(1));
+ const _Tp __y_mp1m_factor = __x * std::sqrt(_Tp(2 * __m + 3));
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __lncirc = std::tr1::log1p(-__x * __x);
+#else
+ const _Tp __lncirc = std::log(_Tp(1) - __x * __x);
+#endif
+ // Gamma(m+1/2) / Gamma(m)
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __lnpoch = std::tr1::lgamma(_Tp(__m + _Tp(0.5L)))
+ - std::tr1::lgamma(_Tp(__m));
+#else
+ const _Tp __lnpoch = __log_gamma(_Tp(__m + _Tp(0.5L)))
+ - __log_gamma(_Tp(__m));
+#endif
+ const _Tp __lnpre_val =
+ -_Tp(0.25L) * __numeric_constants<_Tp>::__lnpi()
+ + _Tp(0.5L) * (__lnpoch + __m * __lncirc);
+ _Tp __sr = std::sqrt((_Tp(2) + _Tp(1) / __m)
+ / (_Tp(4) * __numeric_constants<_Tp>::__pi()));
+ _Tp __y_mm = __sgn * __sr * std::exp(__lnpre_val);
+ _Tp __y_mp1m = __y_mp1m_factor * __y_mm;
+
+ if (__l == __m)
+ {
+ return __y_mm;
+ }
+ else if (__l == __m + 1)
+ {
+ return __y_mp1m;
+ }
+ else
+ {
+ _Tp __y_lm = _Tp(0);
+
+ // Compute Y_l^m, l > m+1, upward recursion on l.
+ for ( int __ll = __m + 2; __ll <= __l; ++__ll)
+ {
+ const _Tp __rat1 = _Tp(__ll - __m) / _Tp(__ll + __m);
+ const _Tp __rat2 = _Tp(__ll - __m - 1) / _Tp(__ll + __m - 1);
+ const _Tp __fact1 = std::sqrt(__rat1 * _Tp(2 * __ll + 1)
+ * _Tp(2 * __ll - 1));
+ const _Tp __fact2 = std::sqrt(__rat1 * __rat2 * _Tp(2 * __ll + 1)
+ / _Tp(2 * __ll - 3));
+ __y_lm = (__x * __y_mp1m * __fact1
+ - (__ll + __m - 1) * __y_mm * __fact2) / _Tp(__ll - __m);
+ __y_mm = __y_mp1m;
+ __y_mp1m = __y_lm;
+ }
+
+ return __y_lm;
+ }
+ }
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_LEGENDRE_FUNCTION_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/limits.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/limits.h
new file mode 100644
index 0000000..d95d360
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/limits.h
@@ -0,0 +1,34 @@
+// TR1 limits.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/limits.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_LIMITS_H
+#define _TR1_LIMITS_H 1
+
+#include <tr1/climits>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/math.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/math.h
new file mode 100644
index 0000000..15d6d64
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/math.h
@@ -0,0 +1,186 @@
+// TR1 math.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/math.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_MATH_H
+#define _GLIBCXX_TR1_MATH_H 1
+
+#include <tr1/cmath>
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+
+using std::tr1::acos;
+using std::tr1::acosh;
+using std::tr1::asin;
+using std::tr1::asinh;
+using std::tr1::atan;
+using std::tr1::atan2;
+using std::tr1::atanh;
+using std::tr1::cbrt;
+using std::tr1::ceil;
+using std::tr1::copysign;
+using std::tr1::cos;
+using std::tr1::cosh;
+using std::tr1::erf;
+using std::tr1::erfc;
+using std::tr1::exp;
+using std::tr1::exp2;
+using std::tr1::expm1;
+using std::tr1::fabs;
+using std::tr1::fdim;
+using std::tr1::floor;
+using std::tr1::fma;
+using std::tr1::fmax;
+using std::tr1::fmin;
+using std::tr1::fmod;
+using std::tr1::frexp;
+using std::tr1::hypot;
+using std::tr1::ilogb;
+using std::tr1::ldexp;
+using std::tr1::lgamma;
+using std::tr1::llrint;
+using std::tr1::llround;
+using std::tr1::log;
+using std::tr1::log10;
+using std::tr1::log1p;
+using std::tr1::log2;
+using std::tr1::logb;
+using std::tr1::lrint;
+using std::tr1::lround;
+using std::tr1::nearbyint;
+using std::tr1::nextafter;
+using std::tr1::nexttoward;
+using std::tr1::pow;
+using std::tr1::remainder;
+using std::tr1::remquo;
+using std::tr1::rint;
+using std::tr1::round;
+using std::tr1::scalbln;
+using std::tr1::scalbn;
+using std::tr1::sin;
+using std::tr1::sinh;
+using std::tr1::sqrt;
+using std::tr1::tan;
+using std::tr1::tanh;
+using std::tr1::tgamma;
+using std::tr1::trunc;
+
+#endif
+
+using std::tr1::assoc_laguerref;
+using std::tr1::assoc_laguerre;
+using std::tr1::assoc_laguerrel;
+
+using std::tr1::assoc_legendref;
+using std::tr1::assoc_legendre;
+using std::tr1::assoc_legendrel;
+
+using std::tr1::betaf;
+using std::tr1::beta;
+using std::tr1::betal;
+
+using std::tr1::comp_ellint_1f;
+using std::tr1::comp_ellint_1;
+using std::tr1::comp_ellint_1l;
+
+using std::tr1::comp_ellint_2f;
+using std::tr1::comp_ellint_2;
+using std::tr1::comp_ellint_2l;
+
+using std::tr1::comp_ellint_3f;
+using std::tr1::comp_ellint_3;
+using std::tr1::comp_ellint_3l;
+
+using std::tr1::conf_hypergf;
+using std::tr1::conf_hyperg;
+using std::tr1::conf_hypergl;
+
+using std::tr1::cyl_bessel_if;
+using std::tr1::cyl_bessel_i;
+using std::tr1::cyl_bessel_il;
+
+using std::tr1::cyl_bessel_jf;
+using std::tr1::cyl_bessel_j;
+using std::tr1::cyl_bessel_jl;
+
+using std::tr1::cyl_bessel_kf;
+using std::tr1::cyl_bessel_k;
+using std::tr1::cyl_bessel_kl;
+
+using std::tr1::cyl_neumannf;
+using std::tr1::cyl_neumann;
+using std::tr1::cyl_neumannl;
+
+using std::tr1::ellint_1f;
+using std::tr1::ellint_1;
+using std::tr1::ellint_1l;
+
+using std::tr1::ellint_2f;
+using std::tr1::ellint_2;
+using std::tr1::ellint_2l;
+
+using std::tr1::ellint_3f;
+using std::tr1::ellint_3;
+using std::tr1::ellint_3l;
+
+using std::tr1::expintf;
+using std::tr1::expint;
+using std::tr1::expintl;
+
+using std::tr1::hermitef;
+using std::tr1::hermite;
+using std::tr1::hermitel;
+
+using std::tr1::hypergf;
+using std::tr1::hyperg;
+using std::tr1::hypergl;
+
+using std::tr1::laguerref;
+using std::tr1::laguerre;
+using std::tr1::laguerrel;
+
+using std::tr1::legendref;
+using std::tr1::legendre;
+using std::tr1::legendrel;
+
+using std::tr1::riemann_zetaf;
+using std::tr1::riemann_zeta;
+using std::tr1::riemann_zetal;
+
+using std::tr1::sph_besself;
+using std::tr1::sph_bessel;
+using std::tr1::sph_bessell;
+
+using std::tr1::sph_legendref;
+using std::tr1::sph_legendre;
+using std::tr1::sph_legendrel;
+
+using std::tr1::sph_neumannf;
+using std::tr1::sph_neumann;
+using std::tr1::sph_neumannl;
+
+#endif // _GLIBCXX_TR1_MATH_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/memory b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/memory
new file mode 100644
index 0000000..8b021a1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/memory
@@ -0,0 +1,67 @@
+// <tr1/memory> -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file tr1/memory
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_MEMORY
+#define _GLIBCXX_TR1_MEMORY 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <memory>
+#include <exception> // std::exception
+#include <typeinfo> // std::type_info in get_deleter
+#include <bits/stl_algobase.h> // std::swap
+#include <iosfwd> // std::basic_ostream
+#include <ext/atomicity.h>
+#include <ext/concurrence.h>
+#include <bits/functexcept.h>
+#include <bits/stl_function.h> // std::less
+#include <debug/debug.h>
+#include <tr1/type_traits>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <tr1/shared_ptr.h>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/boost_sp_counted_base.h>
+# include <tr1/shared_ptr.h>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_MEMORY
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/modified_bessel_func.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/modified_bessel_func.tcc
new file mode 100644
index 0000000..7b8aebc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/modified_bessel_func.tcc
@@ -0,0 +1,436 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/modified_bessel_func.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland.
+//
+// References:
+// (1) Handbook of Mathematical Functions,
+// Ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 9, pp. 355-434, Section 10 pp. 435-478
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Numerical Recipes in C, by W. H. Press, S. A. Teukolsky,
+// W. T. Vetterling, B. P. Flannery, Cambridge University Press (1992),
+// 2nd ed, pp. 246-249.
+
+#ifndef _GLIBCXX_TR1_MODIFIED_BESSEL_FUNC_TCC
+#define _GLIBCXX_TR1_MODIFIED_BESSEL_FUNC_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Compute the modified Bessel functions @f$ I_\nu(x) @f$ and
+ * @f$ K_\nu(x) @f$ and their first derivatives
+ * @f$ I'_\nu(x) @f$ and @f$ K'_\nu(x) @f$ respectively.
+ * These four functions are computed together for numerical
+ * stability.
+ *
+ * @param __nu The order of the Bessel functions.
+ * @param __x The argument of the Bessel functions.
+ * @param __Inu The output regular modified Bessel function.
+ * @param __Knu The output irregular modified Bessel function.
+ * @param __Ipnu The output derivative of the regular
+ * modified Bessel function.
+ * @param __Kpnu The output derivative of the irregular
+ * modified Bessel function.
+ */
+ template <typename _Tp>
+ void
+ __bessel_ik(const _Tp __nu, const _Tp __x,
+ _Tp & __Inu, _Tp & __Knu, _Tp & __Ipnu, _Tp & __Kpnu)
+ {
+ if (__x == _Tp(0))
+ {
+ if (__nu == _Tp(0))
+ {
+ __Inu = _Tp(1);
+ __Ipnu = _Tp(0);
+ }
+ else if (__nu == _Tp(1))
+ {
+ __Inu = _Tp(0);
+ __Ipnu = _Tp(0.5L);
+ }
+ else
+ {
+ __Inu = _Tp(0);
+ __Ipnu = _Tp(0);
+ }
+ __Knu = std::numeric_limits<_Tp>::infinity();
+ __Kpnu = -std::numeric_limits<_Tp>::infinity();
+ return;
+ }
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ const _Tp __fp_min = _Tp(10) * std::numeric_limits<_Tp>::epsilon();
+ const int __max_iter = 15000;
+ const _Tp __x_min = _Tp(2);
+
+ const int __nl = static_cast<int>(__nu + _Tp(0.5L));
+
+ const _Tp __mu = __nu - __nl;
+ const _Tp __mu2 = __mu * __mu;
+ const _Tp __xi = _Tp(1) / __x;
+ const _Tp __xi2 = _Tp(2) * __xi;
+ _Tp __h = __nu * __xi;
+ if ( __h < __fp_min )
+ __h = __fp_min;
+ _Tp __b = __xi2 * __nu;
+ _Tp __d = _Tp(0);
+ _Tp __c = __h;
+ int __i;
+ for ( __i = 1; __i <= __max_iter; ++__i )
+ {
+ __b += __xi2;
+ __d = _Tp(1) / (__b + __d);
+ __c = __b + _Tp(1) / __c;
+ const _Tp __del = __c * __d;
+ __h *= __del;
+ if (std::abs(__del - _Tp(1)) < __eps)
+ break;
+ }
+ if (__i > __max_iter)
+ std::__throw_runtime_error(__N("Argument x too large "
+ "in __bessel_jn; "
+ "try asymptotic expansion."));
+ _Tp __Inul = __fp_min;
+ _Tp __Ipnul = __h * __Inul;
+ _Tp __Inul1 = __Inul;
+ _Tp __Ipnu1 = __Ipnul;
+ _Tp __fact = __nu * __xi;
+ for (int __l = __nl; __l >= 1; --__l)
+ {
+ const _Tp __Inutemp = __fact * __Inul + __Ipnul;
+ __fact -= __xi;
+ __Ipnul = __fact * __Inutemp + __Inul;
+ __Inul = __Inutemp;
+ }
+ _Tp __f = __Ipnul / __Inul;
+ _Tp __Kmu, __Knu1;
+ if (__x < __x_min)
+ {
+ const _Tp __x2 = __x / _Tp(2);
+ const _Tp __pimu = __numeric_constants<_Tp>::__pi() * __mu;
+ const _Tp __fact = (std::abs(__pimu) < __eps
+ ? _Tp(1) : __pimu / std::sin(__pimu));
+ _Tp __d = -std::log(__x2);
+ _Tp __e = __mu * __d;
+ const _Tp __fact2 = (std::abs(__e) < __eps
+ ? _Tp(1) : std::sinh(__e) / __e);
+ _Tp __gam1, __gam2, __gampl, __gammi;
+ __gamma_temme(__mu, __gam1, __gam2, __gampl, __gammi);
+ _Tp __ff = __fact
+ * (__gam1 * std::cosh(__e) + __gam2 * __fact2 * __d);
+ _Tp __sum = __ff;
+ __e = std::exp(__e);
+ _Tp __p = __e / (_Tp(2) * __gampl);
+ _Tp __q = _Tp(1) / (_Tp(2) * __e * __gammi);
+ _Tp __c = _Tp(1);
+ __d = __x2 * __x2;
+ _Tp __sum1 = __p;
+ int __i;
+ for (__i = 1; __i <= __max_iter; ++__i)
+ {
+ __ff = (__i * __ff + __p + __q) / (__i * __i - __mu2);
+ __c *= __d / __i;
+ __p /= __i - __mu;
+ __q /= __i + __mu;
+ const _Tp __del = __c * __ff;
+ __sum += __del;
+ const _Tp __del1 = __c * (__p - __i * __ff);
+ __sum1 += __del1;
+ if (std::abs(__del) < __eps * std::abs(__sum))
+ break;
+ }
+ if (__i > __max_iter)
+ std::__throw_runtime_error(__N("Bessel k series failed to converge "
+ "in __bessel_jn."));
+ __Kmu = __sum;
+ __Knu1 = __sum1 * __xi2;
+ }
+ else
+ {
+ _Tp __b = _Tp(2) * (_Tp(1) + __x);
+ _Tp __d = _Tp(1) / __b;
+ _Tp __delh = __d;
+ _Tp __h = __delh;
+ _Tp __q1 = _Tp(0);
+ _Tp __q2 = _Tp(1);
+ _Tp __a1 = _Tp(0.25L) - __mu2;
+ _Tp __q = __c = __a1;
+ _Tp __a = -__a1;
+ _Tp __s = _Tp(1) + __q * __delh;
+ int __i;
+ for (__i = 2; __i <= __max_iter; ++__i)
+ {
+ __a -= 2 * (__i - 1);
+ __c = -__a * __c / __i;
+ const _Tp __qnew = (__q1 - __b * __q2) / __a;
+ __q1 = __q2;
+ __q2 = __qnew;
+ __q += __c * __qnew;
+ __b += _Tp(2);
+ __d = _Tp(1) / (__b + __a * __d);
+ __delh = (__b * __d - _Tp(1)) * __delh;
+ __h += __delh;
+ const _Tp __dels = __q * __delh;
+ __s += __dels;
+ if ( std::abs(__dels / __s) < __eps )
+ break;
+ }
+ if (__i > __max_iter)
+ std::__throw_runtime_error(__N("Steed's method failed "
+ "in __bessel_jn."));
+ __h = __a1 * __h;
+ __Kmu = std::sqrt(__numeric_constants<_Tp>::__pi() / (_Tp(2) * __x))
+ * std::exp(-__x) / __s;
+ __Knu1 = __Kmu * (__mu + __x + _Tp(0.5L) - __h) * __xi;
+ }
+
+ _Tp __Kpmu = __mu * __xi * __Kmu - __Knu1;
+ _Tp __Inumu = __xi / (__f * __Kmu - __Kpmu);
+ __Inu = __Inumu * __Inul1 / __Inul;
+ __Ipnu = __Inumu * __Ipnu1 / __Inul;
+ for ( __i = 1; __i <= __nl; ++__i )
+ {
+ const _Tp __Knutemp = (__mu + __i) * __xi2 * __Knu1 + __Kmu;
+ __Kmu = __Knu1;
+ __Knu1 = __Knutemp;
+ }
+ __Knu = __Kmu;
+ __Kpnu = __nu * __xi * __Kmu - __Knu1;
+
+ return;
+ }
+
+
+ /**
+ * @brief Return the regular modified Bessel function of order
+ * \f$ \nu \f$: \f$ I_{\nu}(x) \f$.
+ *
+ * The regular modified cylindrical Bessel function is:
+ * @f[
+ * I_{\nu}(x) = \sum_{k=0}^{\infty}
+ * \frac{(x/2)^{\nu + 2k}}{k!\Gamma(\nu+k+1)}
+ * @f]
+ *
+ * @param __nu The order of the regular modified Bessel function.
+ * @param __x The argument of the regular modified Bessel function.
+ * @return The output regular modified Bessel function.
+ */
+ template<typename _Tp>
+ _Tp
+ __cyl_bessel_i(const _Tp __nu, const _Tp __x)
+ {
+ if (__nu < _Tp(0) || __x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __cyl_bessel_i."));
+ else if (__isnan(__nu) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x * __x < _Tp(10) * (__nu + _Tp(1)))
+ return __cyl_bessel_ij_series(__nu, __x, +_Tp(1), 200);
+ else
+ {
+ _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu;
+ __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu);
+ return __I_nu;
+ }
+ }
+
+
+ /**
+ * @brief Return the irregular modified Bessel function
+ * \f$ K_{\nu}(x) \f$ of order \f$ \nu \f$.
+ *
+ * The irregular modified Bessel function is defined by:
+ * @f[
+ * K_{\nu}(x) = \frac{\pi}{2}
+ * \frac{I_{-\nu}(x) - I_{\nu}(x)}{\sin \nu\pi}
+ * @f]
+ * where for integral \f$ \nu = n \f$ a limit is taken:
+ * \f$ lim_{\nu \to n} \f$.
+ *
+ * @param __nu The order of the irregular modified Bessel function.
+ * @param __x The argument of the irregular modified Bessel function.
+ * @return The output irregular modified Bessel function.
+ */
+ template<typename _Tp>
+ _Tp
+ __cyl_bessel_k(const _Tp __nu, const _Tp __x)
+ {
+ if (__nu < _Tp(0) || __x < _Tp(0))
+ std::__throw_domain_error(__N("Bad argument "
+ "in __cyl_bessel_k."));
+ else if (__isnan(__nu) || __isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ {
+ _Tp __I_nu, __K_nu, __Ip_nu, __Kp_nu;
+ __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu);
+ return __K_nu;
+ }
+ }
+
+
+ /**
+ * @brief Compute the spherical modified Bessel functions
+ * @f$ i_n(x) @f$ and @f$ k_n(x) @f$ and their first
+ * derivatives @f$ i'_n(x) @f$ and @f$ k'_n(x) @f$
+ * respectively.
+ *
+ * @param __n The order of the modified spherical Bessel function.
+ * @param __x The argument of the modified spherical Bessel function.
+ * @param __i_n The output regular modified spherical Bessel function.
+ * @param __k_n The output irregular modified spherical
+ * Bessel function.
+ * @param __ip_n The output derivative of the regular modified
+ * spherical Bessel function.
+ * @param __kp_n The output derivative of the irregular modified
+ * spherical Bessel function.
+ */
+ template <typename _Tp>
+ void
+ __sph_bessel_ik(const unsigned int __n, const _Tp __x,
+ _Tp & __i_n, _Tp & __k_n, _Tp & __ip_n, _Tp & __kp_n)
+ {
+ const _Tp __nu = _Tp(__n) + _Tp(0.5L);
+
+ _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu;
+ __bessel_ik(__nu, __x, __I_nu, __K_nu, __Ip_nu, __Kp_nu);
+
+ const _Tp __factor = __numeric_constants<_Tp>::__sqrtpio2()
+ / std::sqrt(__x);
+
+ __i_n = __factor * __I_nu;
+ __k_n = __factor * __K_nu;
+ __ip_n = __factor * __Ip_nu - __i_n / (_Tp(2) * __x);
+ __kp_n = __factor * __Kp_nu - __k_n / (_Tp(2) * __x);
+
+ return;
+ }
+
+
+ /**
+ * @brief Compute the Airy functions
+ * @f$ Ai(x) @f$ and @f$ Bi(x) @f$ and their first
+ * derivatives @f$ Ai'(x) @f$ and @f$ Bi(x) @f$
+ * respectively.
+ *
+ * @param __n The order of the Airy functions.
+ * @param __x The argument of the Airy functions.
+ * @param __i_n The output Airy function.
+ * @param __k_n The output Airy function.
+ * @param __ip_n The output derivative of the Airy function.
+ * @param __kp_n The output derivative of the Airy function.
+ */
+ template <typename _Tp>
+ void
+ __airy(const _Tp __x,
+ _Tp & __Ai, _Tp & __Bi, _Tp & __Aip, _Tp & __Bip)
+ {
+ const _Tp __absx = std::abs(__x);
+ const _Tp __rootx = std::sqrt(__absx);
+ const _Tp __z = _Tp(2) * __absx * __rootx / _Tp(3);
+
+ if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__x > _Tp(0))
+ {
+ _Tp __I_nu, __Ip_nu, __K_nu, __Kp_nu;
+
+ __bessel_ik(_Tp(1) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu);
+ __Ai = __rootx * __K_nu
+ / (__numeric_constants<_Tp>::__sqrt3()
+ * __numeric_constants<_Tp>::__pi());
+ __Bi = __rootx * (__K_nu / __numeric_constants<_Tp>::__pi()
+ + _Tp(2) * __I_nu / __numeric_constants<_Tp>::__sqrt3());
+
+ __bessel_ik(_Tp(2) / _Tp(3), __z, __I_nu, __K_nu, __Ip_nu, __Kp_nu);
+ __Aip = -__x * __K_nu
+ / (__numeric_constants<_Tp>::__sqrt3()
+ * __numeric_constants<_Tp>::__pi());
+ __Bip = __x * (__K_nu / __numeric_constants<_Tp>::__pi()
+ + _Tp(2) * __I_nu
+ / __numeric_constants<_Tp>::__sqrt3());
+ }
+ else if (__x < _Tp(0))
+ {
+ _Tp __J_nu, __Jp_nu, __N_nu, __Np_nu;
+
+ __bessel_jn(_Tp(1) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu);
+ __Ai = __rootx * (__J_nu
+ - __N_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2);
+ __Bi = -__rootx * (__N_nu
+ + __J_nu / __numeric_constants<_Tp>::__sqrt3()) / _Tp(2);
+
+ __bessel_jn(_Tp(2) / _Tp(3), __z, __J_nu, __N_nu, __Jp_nu, __Np_nu);
+ __Aip = __absx * (__N_nu / __numeric_constants<_Tp>::__sqrt3()
+ + __J_nu) / _Tp(2);
+ __Bip = __absx * (__J_nu / __numeric_constants<_Tp>::__sqrt3()
+ - __N_nu) / _Tp(2);
+ }
+ else
+ {
+ // Reference:
+ // Abramowitz & Stegun, page 446 section 10.4.4 on Airy functions.
+ // The number is Ai(0) = 3^{-2/3}/\Gamma(2/3).
+ __Ai = _Tp(0.35502805388781723926L);
+ __Bi = __Ai * __numeric_constants<_Tp>::__sqrt3();
+
+ // Reference:
+ // Abramowitz & Stegun, page 446 section 10.4.5 on Airy functions.
+ // The number is Ai'(0) = -3^{-1/3}/\Gamma(1/3).
+ __Aip = -_Tp(0.25881940379280679840L);
+ __Bip = -__Aip * __numeric_constants<_Tp>::__sqrt3();
+ }
+
+ return;
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_MODIFIED_BESSEL_FUNC_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_hermite.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_hermite.tcc
new file mode 100644
index 0000000..d4825a3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_hermite.tcc
@@ -0,0 +1,124 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/poly_hermite.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// Ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications, Section 22 pp. 773-802
+
+#ifndef _GLIBCXX_TR1_POLY_HERMITE_TCC
+#define _GLIBCXX_TR1_POLY_HERMITE_TCC 1
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief This routine returns the Hermite polynomial
+ * of order n: \f$ H_n(x) \f$ by recursion on n.
+ *
+ * The Hermite polynomial is defined by:
+ * @f[
+ * H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2}
+ * @f]
+ *
+ * @param __n The order of the Hermite polynomial.
+ * @param __x The argument of the Hermite polynomial.
+ * @return The value of the Hermite polynomial of order n
+ * and argument x.
+ */
+ template<typename _Tp>
+ _Tp
+ __poly_hermite_recursion(const unsigned int __n, const _Tp __x)
+ {
+ // Compute H_0.
+ _Tp __H_0 = 1;
+ if (__n == 0)
+ return __H_0;
+
+ // Compute H_1.
+ _Tp __H_1 = 2 * __x;
+ if (__n == 1)
+ return __H_1;
+
+ // Compute H_n.
+ _Tp __H_n, __H_nm1, __H_nm2;
+ unsigned int __i;
+ for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i)
+ {
+ __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2);
+ __H_nm2 = __H_nm1;
+ __H_nm1 = __H_n;
+ }
+
+ return __H_n;
+ }
+
+
+ /**
+ * @brief This routine returns the Hermite polynomial
+ * of order n: \f$ H_n(x) \f$.
+ *
+ * The Hermite polynomial is defined by:
+ * @f[
+ * H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2}
+ * @f]
+ *
+ * @param __n The order of the Hermite polynomial.
+ * @param __x The argument of the Hermite polynomial.
+ * @return The value of the Hermite polynomial of order n
+ * and argument x.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __poly_hermite(const unsigned int __n, const _Tp __x)
+ {
+ if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else
+ return __poly_hermite_recursion(__n, __x);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_POLY_HERMITE_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_laguerre.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_laguerre.tcc
new file mode 100644
index 0000000..9c999db
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/poly_laguerre.tcc
@@ -0,0 +1,329 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/poly_laguerre.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// Ed. Milton Abramowitz and Irene A. Stegun,
+// Dover Publications,
+// Section 13, pp. 509-510, Section 22 pp. 773-802
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+
+#ifndef _GLIBCXX_TR1_POLY_LAGUERRE_TCC
+#define _GLIBCXX_TR1_POLY_LAGUERRE_TCC 1
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+
+ /**
+ * @brief This routine returns the associated Laguerre polynomial
+ * of order @f$ n @f$, degree @f$ \alpha @f$ for large n.
+ * Abramowitz & Stegun, 13.5.21
+ *
+ * @param __n The order of the Laguerre function.
+ * @param __alpha The degree of the Laguerre function.
+ * @param __x The argument of the Laguerre function.
+ * @return The value of the Laguerre function of order n,
+ * degree @f$ \alpha @f$, and argument x.
+ *
+ * This is from the GNU Scientific Library.
+ */
+ template<typename _Tpa, typename _Tp>
+ _Tp
+ __poly_laguerre_large_n(const unsigned __n, const _Tpa __alpha1,
+ const _Tp __x)
+ {
+ const _Tp __a = -_Tp(__n);
+ const _Tp __b = _Tp(__alpha1) + _Tp(1);
+ const _Tp __eta = _Tp(2) * __b - _Tp(4) * __a;
+ const _Tp __cos2th = __x / __eta;
+ const _Tp __sin2th = _Tp(1) - __cos2th;
+ const _Tp __th = std::acos(std::sqrt(__cos2th));
+ const _Tp __pre_h = __numeric_constants<_Tp>::__pi_2()
+ * __numeric_constants<_Tp>::__pi_2()
+ * __eta * __eta * __cos2th * __sin2th;
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+ const _Tp __lg_b = std::tr1::lgamma(_Tp(__n) + __b);
+ const _Tp __lnfact = std::tr1::lgamma(_Tp(__n + 1));
+#else
+ const _Tp __lg_b = __log_gamma(_Tp(__n) + __b);
+ const _Tp __lnfact = __log_gamma(_Tp(__n + 1));
+#endif
+
+ _Tp __pre_term1 = _Tp(0.5L) * (_Tp(1) - __b)
+ * std::log(_Tp(0.25L) * __x * __eta);
+ _Tp __pre_term2 = _Tp(0.25L) * std::log(__pre_h);
+ _Tp __lnpre = __lg_b - __lnfact + _Tp(0.5L) * __x
+ + __pre_term1 - __pre_term2;
+ _Tp __ser_term1 = std::sin(__a * __numeric_constants<_Tp>::__pi());
+ _Tp __ser_term2 = std::sin(_Tp(0.25L) * __eta
+ * (_Tp(2) * __th
+ - std::sin(_Tp(2) * __th))
+ + __numeric_constants<_Tp>::__pi_4());
+ _Tp __ser = __ser_term1 + __ser_term2;
+
+ return std::exp(__lnpre) * __ser;
+ }
+
+
+ /**
+ * @brief Evaluate the polynomial based on the confluent hypergeometric
+ * function in a safe way, with no restriction on the arguments.
+ *
+ * The associated Laguerre function is defined by
+ * @f[
+ * L_n^\alpha(x) = \frac{(\alpha + 1)_n}{n!}
+ * _1F_1(-n; \alpha + 1; x)
+ * @f]
+ * where @f$ (\alpha)_n @f$ is the Pochhammer symbol and
+ * @f$ _1F_1(a; c; x) @f$ is the confluent hypergeometric function.
+ *
+ * This function assumes x != 0.
+ *
+ * This is from the GNU Scientific Library.
+ */
+ template<typename _Tpa, typename _Tp>
+ _Tp
+ __poly_laguerre_hyperg(const unsigned int __n, const _Tpa __alpha1,
+ const _Tp __x)
+ {
+ const _Tp __b = _Tp(__alpha1) + _Tp(1);
+ const _Tp __mx = -__x;
+ const _Tp __tc_sgn = (__x < _Tp(0) ? _Tp(1)
+ : ((__n % 2 == 1) ? -_Tp(1) : _Tp(1)));
+ // Get |x|^n/n!
+ _Tp __tc = _Tp(1);
+ const _Tp __ax = std::abs(__x);
+ for (unsigned int __k = 1; __k <= __n; ++__k)
+ __tc *= (__ax / __k);
+
+ _Tp __term = __tc * __tc_sgn;
+ _Tp __sum = __term;
+ for (int __k = int(__n) - 1; __k >= 0; --__k)
+ {
+ __term *= ((__b + _Tp(__k)) / _Tp(int(__n) - __k))
+ * _Tp(__k + 1) / __mx;
+ __sum += __term;
+ }
+
+ return __sum;
+ }
+
+
+ /**
+ * @brief This routine returns the associated Laguerre polynomial
+ * of order @f$ n @f$, degree @f$ \alpha @f$: @f$ L_n^\alpha(x) @f$
+ * by recursion.
+ *
+ * The associated Laguerre function is defined by
+ * @f[
+ * L_n^\alpha(x) = \frac{(\alpha + 1)_n}{n!}
+ * _1F_1(-n; \alpha + 1; x)
+ * @f]
+ * where @f$ (\alpha)_n @f$ is the Pochhammer symbol and
+ * @f$ _1F_1(a; c; x) @f$ is the confluent hypergeometric function.
+ *
+ * The associated Laguerre polynomial is defined for integral
+ * @f$ \alpha = m @f$ by:
+ * @f[
+ * L_n^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n + m}(x)
+ * @f]
+ * where the Laguerre polynomial is defined by:
+ * @f[
+ * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
+ * @f]
+ *
+ * @param __n The order of the Laguerre function.
+ * @param __alpha The degree of the Laguerre function.
+ * @param __x The argument of the Laguerre function.
+ * @return The value of the Laguerre function of order n,
+ * degree @f$ \alpha @f$, and argument x.
+ */
+ template<typename _Tpa, typename _Tp>
+ _Tp
+ __poly_laguerre_recursion(const unsigned int __n,
+ const _Tpa __alpha1, const _Tp __x)
+ {
+ // Compute l_0.
+ _Tp __l_0 = _Tp(1);
+ if (__n == 0)
+ return __l_0;
+
+ // Compute l_1^alpha.
+ _Tp __l_1 = -__x + _Tp(1) + _Tp(__alpha1);
+ if (__n == 1)
+ return __l_1;
+
+ // Compute l_n^alpha by recursion on n.
+ _Tp __l_n2 = __l_0;
+ _Tp __l_n1 = __l_1;
+ _Tp __l_n = _Tp(0);
+ for (unsigned int __nn = 2; __nn <= __n; ++__nn)
+ {
+ __l_n = (_Tp(2 * __nn - 1) + _Tp(__alpha1) - __x)
+ * __l_n1 / _Tp(__nn)
+ - (_Tp(__nn - 1) + _Tp(__alpha1)) * __l_n2 / _Tp(__nn);
+ __l_n2 = __l_n1;
+ __l_n1 = __l_n;
+ }
+
+ return __l_n;
+ }
+
+
+ /**
+ * @brief This routine returns the associated Laguerre polynomial
+ * of order n, degree @f$ \alpha @f$: @f$ L_n^alpha(x) @f$.
+ *
+ * The associated Laguerre function is defined by
+ * @f[
+ * L_n^\alpha(x) = \frac{(\alpha + 1)_n}{n!}
+ * _1F_1(-n; \alpha + 1; x)
+ * @f]
+ * where @f$ (\alpha)_n @f$ is the Pochhammer symbol and
+ * @f$ _1F_1(a; c; x) @f$ is the confluent hypergeometric function.
+ *
+ * The associated Laguerre polynomial is defined for integral
+ * @f$ \alpha = m @f$ by:
+ * @f[
+ * L_n^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n + m}(x)
+ * @f]
+ * where the Laguerre polynomial is defined by:
+ * @f[
+ * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
+ * @f]
+ *
+ * @param __n The order of the Laguerre function.
+ * @param __alpha The degree of the Laguerre function.
+ * @param __x The argument of the Laguerre function.
+ * @return The value of the Laguerre function of order n,
+ * degree @f$ \alpha @f$, and argument x.
+ */
+ template<typename _Tpa, typename _Tp>
+ inline _Tp
+ __poly_laguerre(const unsigned int __n, const _Tpa __alpha1,
+ const _Tp __x)
+ {
+ if (__x < _Tp(0))
+ std::__throw_domain_error(__N("Negative argument "
+ "in __poly_laguerre."));
+ // Return NaN on NaN input.
+ else if (__isnan(__x))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__n == 0)
+ return _Tp(1);
+ else if (__n == 1)
+ return _Tp(1) + _Tp(__alpha1) - __x;
+ else if (__x == _Tp(0))
+ {
+ _Tp __prod = _Tp(__alpha1) + _Tp(1);
+ for (unsigned int __k = 2; __k <= __n; ++__k)
+ __prod *= (_Tp(__alpha1) + _Tp(__k)) / _Tp(__k);
+ return __prod;
+ }
+ else if (__n > 10000000 && _Tp(__alpha1) > -_Tp(1)
+ && __x < _Tp(2) * (_Tp(__alpha1) + _Tp(1)) + _Tp(4 * __n))
+ return __poly_laguerre_large_n(__n, __alpha1, __x);
+ else if (_Tp(__alpha1) >= _Tp(0)
+ || (__x > _Tp(0) && _Tp(__alpha1) < -_Tp(__n + 1)))
+ return __poly_laguerre_recursion(__n, __alpha1, __x);
+ else
+ return __poly_laguerre_hyperg(__n, __alpha1, __x);
+ }
+
+
+ /**
+ * @brief This routine returns the associated Laguerre polynomial
+ * of order n, degree m: @f$ L_n^m(x) @f$.
+ *
+ * The associated Laguerre polynomial is defined for integral
+ * @f$ \alpha = m @f$ by:
+ * @f[
+ * L_n^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n + m}(x)
+ * @f]
+ * where the Laguerre polynomial is defined by:
+ * @f[
+ * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
+ * @f]
+ *
+ * @param __n The order of the Laguerre polynomial.
+ * @param __m The degree of the Laguerre polynomial.
+ * @param __x The argument of the Laguerre polynomial.
+ * @return The value of the associated Laguerre polynomial of order n,
+ * degree m, and argument x.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __assoc_laguerre(const unsigned int __n, const unsigned int __m,
+ const _Tp __x)
+ {
+ return __poly_laguerre<unsigned int, _Tp>(__n, __m, __x);
+ }
+
+
+ /**
+ * @brief This routine returns the Laguerre polynomial
+ * of order n: @f$ L_n(x) @f$.
+ *
+ * The Laguerre polynomial is defined by:
+ * @f[
+ * L_n(x) = \frac{e^x}{n!} \frac{d^n}{dx^n} (x^ne^{-x})
+ * @f]
+ *
+ * @param __n The order of the Laguerre polynomial.
+ * @param __x The argument of the Laguerre polynomial.
+ * @return The value of the Laguerre polynomial of order n
+ * and argument x.
+ */
+ template<typename _Tp>
+ inline _Tp
+ __laguerre(const unsigned int __n, const _Tp __x)
+ {
+ return __poly_laguerre<unsigned int, _Tp>(__n, 0, __x);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_POLY_LAGUERRE_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/random b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/random
new file mode 100644
index 0000000..a23519c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/random
@@ -0,0 +1,66 @@
+// random number generation -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file tr1/random
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_RANDOM
+#define _GLIBCXX_TR1_RANDOM 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <iosfwd>
+#include <limits>
+#include <ext/type_traits.h>
+#include <ext/numeric_traits.h>
+#include <bits/concept_check.h>
+#include <debug/debug.h>
+#include <tr1/type_traits>
+#include <tr1/cmath>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/random>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/random>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_RANDOM
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/regex b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/regex
new file mode 100644
index 0000000..b7e2cdf
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/regex
@@ -0,0 +1,64 @@
+// class template regex -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file tr1/regex
+ * @author Stephen M. Webb <stephen.webb@bregmasoft.ca>
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_REGEX
+#define _GLIBCXX_TR1_REGEX 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <algorithm>
+#include <bitset>
+#include <iterator>
+#include <locale>
+#include <stdexcept>
+#include <string>
+#include <vector>
+#include <utility>
+#include <sstream>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/regex>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/regex>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_REGEX
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/riemann_zeta.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/riemann_zeta.tcc
new file mode 100644
index 0000000..c646c2e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/riemann_zeta.tcc
@@ -0,0 +1,435 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/riemann_zeta.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on:
+// (1) Handbook of Mathematical Functions,
+// Ed. by Milton Abramowitz and Irene A. Stegun,
+// Dover Publications, New-York, Section 5, pp. 807-808.
+// (2) The Gnu Scientific Library, http://www.gnu.org/software/gsl
+// (3) Gamma, Exploring Euler's Constant, Julian Havil,
+// Princeton, 2003.
+
+#ifndef _GLIBCXX_TR1_RIEMANN_ZETA_TCC
+#define _GLIBCXX_TR1_RIEMANN_ZETA_TCC 1
+
+#include "special_function_util.h"
+
+namespace std
+{
+namespace tr1
+{
+
+ // [5.2] Special functions
+
+ // Implementation-space details.
+ namespace __detail
+ {
+
+ /**
+ * @brief Compute the Riemann zeta function @f$ \zeta(s) @f$
+ * by summation for s > 1.
+ *
+ * The Riemann zeta function is defined by:
+ * \f[
+ * \zeta(s) = \sum_{k=1}^{\infty} \frac{1}{k^{s}} for s > 1
+ * \f]
+ * For s < 1 use the reflection formula:
+ * \f[
+ * \zeta(s) = 2^s \pi^{s-1} \Gamma(1-s) \zeta(1-s)
+ * \f]
+ */
+ template<typename _Tp>
+ _Tp
+ __riemann_zeta_sum(const _Tp __s)
+ {
+ // A user shouldn't get to this.
+ if (__s < _Tp(1))
+ std::__throw_domain_error(__N("Bad argument in zeta sum."));
+
+ const unsigned int max_iter = 10000;
+ _Tp __zeta = _Tp(0);
+ for (unsigned int __k = 1; __k < max_iter; ++__k)
+ {
+ _Tp __term = std::pow(static_cast<_Tp>(__k), -__s);
+ if (__term < std::numeric_limits<_Tp>::epsilon())
+ {
+ break;
+ }
+ __zeta += __term;
+ }
+
+ return __zeta;
+ }
+
+
+ /**
+ * @brief Evaluate the Riemann zeta function @f$ \zeta(s) @f$
+ * by an alternate series for s > 0.
+ *
+ * The Riemann zeta function is defined by:
+ * \f[
+ * \zeta(s) = \sum_{k=1}^{\infty} \frac{1}{k^{s}} for s > 1
+ * \f]
+ * For s < 1 use the reflection formula:
+ * \f[
+ * \zeta(s) = 2^s \pi^{s-1} \Gamma(1-s) \zeta(1-s)
+ * \f]
+ */
+ template<typename _Tp>
+ _Tp
+ __riemann_zeta_alt(const _Tp __s)
+ {
+ _Tp __sgn = _Tp(1);
+ _Tp __zeta = _Tp(0);
+ for (unsigned int __i = 1; __i < 10000000; ++__i)
+ {
+ _Tp __term = __sgn / std::pow(__i, __s);
+ if (std::abs(__term) < std::numeric_limits<_Tp>::epsilon())
+ break;
+ __zeta += __term;
+ __sgn *= _Tp(-1);
+ }
+ __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s);
+
+ return __zeta;
+ }
+
+
+ /**
+ * @brief Evaluate the Riemann zeta function by series for all s != 1.
+ * Convergence is great until largish negative numbers.
+ * Then the convergence of the > 0 sum gets better.
+ *
+ * The series is:
+ * \f[
+ * \zeta(s) = \frac{1}{1-2^{1-s}}
+ * \sum_{n=0}^{\infty} \frac{1}{2^{n+1}}
+ * \sum_{k=0}^{n} (-1)^k \frac{n!}{(n-k)!k!} (k+1)^{-s}
+ * \f]
+ * Havil 2003, p. 206.
+ *
+ * The Riemann zeta function is defined by:
+ * \f[
+ * \zeta(s) = \sum_{k=1}^{\infty} \frac{1}{k^{s}} for s > 1
+ * \f]
+ * For s < 1 use the reflection formula:
+ * \f[
+ * \zeta(s) = 2^s \pi^{s-1} \Gamma(1-s) \zeta(1-s)
+ * \f]
+ */
+ template<typename _Tp>
+ _Tp
+ __riemann_zeta_glob(const _Tp __s)
+ {
+ _Tp __zeta = _Tp(0);
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ // Max e exponent before overflow.
+ const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10
+ * std::log(_Tp(10)) - _Tp(1);
+
+ // This series works until the binomial coefficient blows up
+ // so use reflection.
+ if (__s < _Tp(0))
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (std::tr1::fmod(__s,_Tp(2)) == _Tp(0))
+ return _Tp(0);
+ else
+#endif
+ {
+ _Tp __zeta = __riemann_zeta_glob(_Tp(1) - __s);
+ __zeta *= std::pow(_Tp(2)
+ * __numeric_constants<_Tp>::__pi(), __s)
+ * std::sin(__numeric_constants<_Tp>::__pi_2() * __s)
+#if _GLIBCXX_USE_C99_MATH_TR1
+ * std::exp(std::tr1::lgamma(_Tp(1) - __s))
+#else
+ * std::exp(__log_gamma(_Tp(1) - __s))
+#endif
+ / __numeric_constants<_Tp>::__pi();
+ return __zeta;
+ }
+ }
+
+ _Tp __num = _Tp(0.5L);
+ const unsigned int __maxit = 10000;
+ for (unsigned int __i = 0; __i < __maxit; ++__i)
+ {
+ bool __punt = false;
+ _Tp __sgn = _Tp(1);
+ _Tp __term = _Tp(0);
+ for (unsigned int __j = 0; __j <= __i; ++__j)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _Tp __bincoeff = std::tr1::lgamma(_Tp(1 + __i))
+ - std::tr1::lgamma(_Tp(1 + __j))
+ - std::tr1::lgamma(_Tp(1 + __i - __j));
+#else
+ _Tp __bincoeff = __log_gamma(_Tp(1 + __i))
+ - __log_gamma(_Tp(1 + __j))
+ - __log_gamma(_Tp(1 + __i - __j));
+#endif
+ if (__bincoeff > __max_bincoeff)
+ {
+ // This only gets hit for x << 0.
+ __punt = true;
+ break;
+ }
+ __bincoeff = std::exp(__bincoeff);
+ __term += __sgn * __bincoeff * std::pow(_Tp(1 + __j), -__s);
+ __sgn *= _Tp(-1);
+ }
+ if (__punt)
+ break;
+ __term *= __num;
+ __zeta += __term;
+ if (std::abs(__term/__zeta) < __eps)
+ break;
+ __num *= _Tp(0.5L);
+ }
+
+ __zeta /= _Tp(1) - std::pow(_Tp(2), _Tp(1) - __s);
+
+ return __zeta;
+ }
+
+
+ /**
+ * @brief Compute the Riemann zeta function @f$ \zeta(s) @f$
+ * using the product over prime factors.
+ * \f[
+ * \zeta(s) = \Pi_{i=1}^\infty \frac{1}{1 - p_i^{-s}}
+ * \f]
+ * where @f$ {p_i} @f$ are the prime numbers.
+ *
+ * The Riemann zeta function is defined by:
+ * \f[
+ * \zeta(s) = \sum_{k=1}^{\infty} \frac{1}{k^{s}} for s > 1
+ * \f]
+ * For s < 1 use the reflection formula:
+ * \f[
+ * \zeta(s) = 2^s \pi^{s-1} \Gamma(1-s) \zeta(1-s)
+ * \f]
+ */
+ template<typename _Tp>
+ _Tp
+ __riemann_zeta_product(const _Tp __s)
+ {
+ static const _Tp __prime[] = {
+ _Tp(2), _Tp(3), _Tp(5), _Tp(7), _Tp(11), _Tp(13), _Tp(17), _Tp(19),
+ _Tp(23), _Tp(29), _Tp(31), _Tp(37), _Tp(41), _Tp(43), _Tp(47),
+ _Tp(53), _Tp(59), _Tp(61), _Tp(67), _Tp(71), _Tp(73), _Tp(79),
+ _Tp(83), _Tp(89), _Tp(97), _Tp(101), _Tp(103), _Tp(107), _Tp(109)
+ };
+ static const unsigned int __num_primes = sizeof(__prime) / sizeof(_Tp);
+
+ _Tp __zeta = _Tp(1);
+ for (unsigned int __i = 0; __i < __num_primes; ++__i)
+ {
+ const _Tp __fact = _Tp(1) - std::pow(__prime[__i], -__s);
+ __zeta *= __fact;
+ if (_Tp(1) - __fact < std::numeric_limits<_Tp>::epsilon())
+ break;
+ }
+
+ __zeta = _Tp(1) / __zeta;
+
+ return __zeta;
+ }
+
+
+ /**
+ * @brief Return the Riemann zeta function @f$ \zeta(s) @f$.
+ *
+ * The Riemann zeta function is defined by:
+ * \f[
+ * \zeta(s) = \sum_{k=1}^{\infty} k^{-s} for s > 1
+ * \frac{(2\pi)^s}{pi} sin(\frac{\pi s}{2})
+ * \Gamma (1 - s) \zeta (1 - s) for s < 1
+ * \f]
+ * For s < 1 use the reflection formula:
+ * \f[
+ * \zeta(s) = 2^s \pi^{s-1} \Gamma(1-s) \zeta(1-s)
+ * \f]
+ */
+ template<typename _Tp>
+ _Tp
+ __riemann_zeta(const _Tp __s)
+ {
+ if (__isnan(__s))
+ return std::numeric_limits<_Tp>::quiet_NaN();
+ else if (__s == _Tp(1))
+ return std::numeric_limits<_Tp>::infinity();
+ else if (__s < -_Tp(19))
+ {
+ _Tp __zeta = __riemann_zeta_product(_Tp(1) - __s);
+ __zeta *= std::pow(_Tp(2) * __numeric_constants<_Tp>::__pi(), __s)
+ * std::sin(__numeric_constants<_Tp>::__pi_2() * __s)
+#if _GLIBCXX_USE_C99_MATH_TR1
+ * std::exp(std::tr1::lgamma(_Tp(1) - __s))
+#else
+ * std::exp(__log_gamma(_Tp(1) - __s))
+#endif
+ / __numeric_constants<_Tp>::__pi();
+ return __zeta;
+ }
+ else if (__s < _Tp(20))
+ {
+ // Global double sum or McLaurin?
+ bool __glob = true;
+ if (__glob)
+ return __riemann_zeta_glob(__s);
+ else
+ {
+ if (__s > _Tp(1))
+ return __riemann_zeta_sum(__s);
+ else
+ {
+ _Tp __zeta = std::pow(_Tp(2)
+ * __numeric_constants<_Tp>::__pi(), __s)
+ * std::sin(__numeric_constants<_Tp>::__pi_2() * __s)
+#if _GLIBCXX_USE_C99_MATH_TR1
+ * std::tr1::tgamma(_Tp(1) - __s)
+#else
+ * std::exp(__log_gamma(_Tp(1) - __s))
+#endif
+ * __riemann_zeta_sum(_Tp(1) - __s);
+ return __zeta;
+ }
+ }
+ }
+ else
+ return __riemann_zeta_product(__s);
+ }
+
+
+ /**
+ * @brief Return the Hurwitz zeta function @f$ \zeta(x,s) @f$
+ * for all s != 1 and x > -1.
+ *
+ * The Hurwitz zeta function is defined by:
+ * @f[
+ * \zeta(x,s) = \sum_{n=0}^{\infty} \frac{1}{(n + x)^s}
+ * @f]
+ * The Riemann zeta function is a special case:
+ * @f[
+ * \zeta(s) = \zeta(1,s)
+ * @f]
+ *
+ * This functions uses the double sum that converges for s != 1
+ * and x > -1:
+ * @f[
+ * \zeta(x,s) = \frac{1}{s-1}
+ * \sum_{n=0}^{\infty} \frac{1}{n + 1}
+ * \sum_{k=0}^{n} (-1)^k \frac{n!}{(n-k)!k!} (x+k)^{-s}
+ * @f]
+ */
+ template<typename _Tp>
+ _Tp
+ __hurwitz_zeta_glob(const _Tp __a, const _Tp __s)
+ {
+ _Tp __zeta = _Tp(0);
+
+ const _Tp __eps = std::numeric_limits<_Tp>::epsilon();
+ // Max e exponent before overflow.
+ const _Tp __max_bincoeff = std::numeric_limits<_Tp>::max_exponent10
+ * std::log(_Tp(10)) - _Tp(1);
+
+ const unsigned int __maxit = 10000;
+ for (unsigned int __i = 0; __i < __maxit; ++__i)
+ {
+ bool __punt = false;
+ _Tp __sgn = _Tp(1);
+ _Tp __term = _Tp(0);
+ for (unsigned int __j = 0; __j <= __i; ++__j)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _Tp __bincoeff = std::tr1::lgamma(_Tp(1 + __i))
+ - std::tr1::lgamma(_Tp(1 + __j))
+ - std::tr1::lgamma(_Tp(1 + __i - __j));
+#else
+ _Tp __bincoeff = __log_gamma(_Tp(1 + __i))
+ - __log_gamma(_Tp(1 + __j))
+ - __log_gamma(_Tp(1 + __i - __j));
+#endif
+ if (__bincoeff > __max_bincoeff)
+ {
+ // This only gets hit for x << 0.
+ __punt = true;
+ break;
+ }
+ __bincoeff = std::exp(__bincoeff);
+ __term += __sgn * __bincoeff * std::pow(_Tp(__a + __j), -__s);
+ __sgn *= _Tp(-1);
+ }
+ if (__punt)
+ break;
+ __term /= _Tp(__i + 1);
+ if (std::abs(__term / __zeta) < __eps)
+ break;
+ __zeta += __term;
+ }
+
+ __zeta /= __s - _Tp(1);
+
+ return __zeta;
+ }
+
+
+ /**
+ * @brief Return the Hurwitz zeta function @f$ \zeta(x,s) @f$
+ * for all s != 1 and x > -1.
+ *
+ * The Hurwitz zeta function is defined by:
+ * @f[
+ * \zeta(x,s) = \sum_{n=0}^{\infty} \frac{1}{(n + x)^s}
+ * @f]
+ * The Riemann zeta function is a special case:
+ * @f[
+ * \zeta(s) = \zeta(1,s)
+ * @f]
+ */
+ template<typename _Tp>
+ inline _Tp
+ __hurwitz_zeta(const _Tp __a, const _Tp __s)
+ {
+ return __hurwitz_zeta_glob(__a, __s);
+ }
+
+ } // namespace std::tr1::__detail
+}
+}
+
+#endif // _GLIBCXX_TR1_RIEMANN_ZETA_TCC
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/shared_ptr.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/shared_ptr.h
new file mode 100644
index 0000000..0afce01
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/shared_ptr.h
@@ -0,0 +1,1020 @@
+// <tr1/shared_ptr.h> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file tr1/shared_ptr.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _TR1_SHARED_PTR_H
+#define _TR1_SHARED_PTR_H 1
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+namespace std
+{
+namespace tr1
+{
+
+ template<typename _Ptr, typename _Deleter, _Lock_policy _Lp>
+ class _Sp_counted_base_impl
+ : public _Sp_counted_base<_Lp>
+ {
+ public:
+ /**
+ * @brief
+ * @pre __d(__p) must not throw.
+ */
+ _Sp_counted_base_impl(_Ptr __p, _Deleter __d)
+ : _M_ptr(__p), _M_del(__d) { }
+
+ virtual void
+ _M_dispose() // nothrow
+ { _M_del(_M_ptr); }
+
+ virtual void*
+ _M_get_deleter(const std::type_info& __ti)
+ { return __ti == typeid(_Deleter) ? &_M_del : 0; }
+
+ private:
+ _Sp_counted_base_impl(const _Sp_counted_base_impl&);
+ _Sp_counted_base_impl& operator=(const _Sp_counted_base_impl&);
+
+ _Ptr _M_ptr; // copy constructor must not throw
+ _Deleter _M_del; // copy constructor must not throw
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __weak_count;
+
+ template<typename _Tp>
+ struct _Sp_deleter
+ {
+ typedef void result_type;
+ typedef _Tp* argument_type;
+ void operator()(_Tp* __p) const { delete __p; }
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class __shared_count
+ {
+ public:
+ __shared_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ template<typename _Ptr>
+ __shared_count(_Ptr __p) : _M_pi(0)
+ {
+ __try
+ {
+ typedef typename std::tr1::remove_pointer<_Ptr>::type _Tp;
+ _M_pi = new _Sp_counted_base_impl<_Ptr, _Sp_deleter<_Tp>, _Lp>(
+ __p, _Sp_deleter<_Tp>());
+ }
+ __catch(...)
+ {
+ delete __p;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Ptr, typename _Deleter>
+ __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0)
+ {
+ __try
+ {
+ _M_pi = new _Sp_counted_base_impl<_Ptr, _Deleter, _Lp>(__p, __d);
+ }
+ __catch(...)
+ {
+ __d(__p); // Call _Deleter on __p.
+ __throw_exception_again;
+ }
+ }
+
+ // Special case for auto_ptr<_Tp> to provide the strong guarantee.
+ template<typename _Tp>
+ explicit
+ __shared_count(std::auto_ptr<_Tp>& __r)
+ : _M_pi(new _Sp_counted_base_impl<_Tp*,
+ _Sp_deleter<_Tp>, _Lp >(__r.get(), _Sp_deleter<_Tp>()))
+ { __r.release(); }
+
+ // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
+ explicit
+ __shared_count(const __weak_count<_Lp>& __r);
+
+ ~__shared_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ }
+
+ __shared_count(const __shared_count& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_copy();
+ }
+
+ __shared_count&
+ operator=(const __shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != _M_pi)
+ {
+ if (__tmp != 0)
+ __tmp->_M_add_ref_copy();
+ if (_M_pi != 0)
+ _M_pi->_M_release();
+ _M_pi = __tmp;
+ }
+ return *this;
+ }
+
+ void
+ _M_swap(__shared_count& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ bool
+ _M_unique() const // nothrow
+ { return this->_M_get_use_count() == 1; }
+
+ friend inline bool
+ operator==(const __shared_count& __a, const __shared_count& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ friend inline bool
+ operator<(const __shared_count& __a, const __shared_count& __b)
+ { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
+
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; }
+
+ private:
+ friend class __weak_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+
+ template<_Lock_policy _Lp>
+ class __weak_count
+ {
+ public:
+ __weak_count()
+ : _M_pi(0) // nothrow
+ { }
+
+ __weak_count(const __shared_count<_Lp>& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ __weak_count(const __weak_count<_Lp>& __r)
+ : _M_pi(__r._M_pi) // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_add_ref();
+ }
+
+ ~__weak_count() // nothrow
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __shared_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ __weak_count<_Lp>&
+ operator=(const __weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ if (__tmp != 0)
+ __tmp->_M_weak_add_ref();
+ if (_M_pi != 0)
+ _M_pi->_M_weak_release();
+ _M_pi = __tmp;
+ return *this;
+ }
+
+ void
+ _M_swap(__weak_count<_Lp>& __r) // nothrow
+ {
+ _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
+ __r._M_pi = _M_pi;
+ _M_pi = __tmp;
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; }
+
+ friend inline bool
+ operator==(const __weak_count<_Lp>& __a, const __weak_count<_Lp>& __b)
+ { return __a._M_pi == __b._M_pi; }
+
+ friend inline bool
+ operator<(const __weak_count<_Lp>& __a, const __weak_count<_Lp>& __b)
+ { return std::less<_Sp_counted_base<_Lp>*>()(__a._M_pi, __b._M_pi); }
+
+ private:
+ friend class __shared_count<_Lp>;
+
+ _Sp_counted_base<_Lp>* _M_pi;
+ };
+
+ // now that __weak_count is defined we can define this constructor:
+ template<_Lock_policy _Lp>
+ inline
+ __shared_count<_Lp>::
+ __shared_count(const __weak_count<_Lp>& __r)
+ : _M_pi(__r._M_pi)
+ {
+ if (_M_pi != 0)
+ _M_pi->_M_add_ref_lock();
+ else
+ __throw_bad_weak_ptr();
+ }
+
+ // Forward declarations.
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __shared_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __weak_ptr;
+
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __enable_shared_from_this;
+
+ template<typename _Tp>
+ class shared_ptr;
+
+ template<typename _Tp>
+ class weak_ptr;
+
+ template<typename _Tp>
+ class enable_shared_from_this;
+
+ // Support for enable_shared_from_this.
+
+ // Friend of __enable_shared_from_this.
+ template<_Lock_policy _Lp, typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&,
+ const __enable_shared_from_this<_Tp1,
+ _Lp>*, const _Tp2*);
+
+ // Friend of enable_shared_from_this.
+ template<typename _Tp1, typename _Tp2>
+ void
+ __enable_shared_from_this_helper(const __shared_count<>&,
+ const enable_shared_from_this<_Tp1>*,
+ const _Tp2*);
+
+ template<_Lock_policy _Lp>
+ inline void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...)
+ { }
+
+
+ struct __static_cast_tag { };
+ struct __const_cast_tag { };
+ struct __dynamic_cast_tag { };
+
+ /**
+ * @class __shared_ptr
+ *
+ * A smart pointer with reference-counted copy semantics.
+ * The object pointed to is deleted when the last shared_ptr pointing to
+ * it is destroyed or reset.
+ */
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ /** @brief Construct an empty %__shared_ptr.
+ * @post use_count()==0 && get()==0
+ */
+ __shared_ptr()
+ : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p.
+ * @param __p A pointer that is convertible to element_type*.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @c delete @a __p is called.
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(_Tp1* __p)
+ : _M_ptr(__p), _M_refcount(__p)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // __glibcxx_function_requires(_CompleteConcept<_Tp1*>)
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ //
+ // Requirements: _Deleter's copy constructor and destructor must
+ // not throw
+ //
+ // __shared_ptr will release __p by calling __d(__p)
+ //
+ /** @brief Construct a %__shared_ptr that owns the pointer @a __p
+ * and the deleter @a __d.
+ * @param __p A pointer.
+ * @param __d A deleter.
+ * @post use_count() == 1 && get() == __p
+ * @throw std::bad_alloc, in which case @a __d(__p) is called.
+ */
+ template<typename _Tp1, typename _Deleter>
+ __shared_ptr(_Tp1* __p, _Deleter __d)
+ : _M_ptr(__p), _M_refcount(__p, __d)
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Deleter CopyConstructible and __d(__p) well-formed
+ __enable_shared_from_this_helper(_M_refcount, __p, __p);
+ }
+
+ // generated copy constructor, assignment, destructor are fine.
+
+ /** @brief If @a __r is empty, constructs an empty %__shared_ptr;
+ * otherwise construct a %__shared_ptr that shares ownership
+ * with @a __r.
+ * @param __r A %__shared_ptr.
+ * @post get() == __r.get() && use_count() == __r.use_count()
+ */
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ /** @brief Constructs a %__shared_ptr that shares ownership with @a __r
+ * and stores a copy of the pointer stored in @a __r.
+ * @param __r A weak_ptr.
+ * @post use_count() == __r.use_count()
+ * @throw bad_weak_ptr when __r.expired(),
+ * in which case the constructor has no effect.
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // may throw
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // It is now safe to copy __r._M_ptr, as _M_refcount(__r._M_refcount)
+ // did not throw.
+ _M_ptr = __r._M_ptr;
+ }
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+ /**
+ * @post use_count() == 1 and __r.get() == 0
+ */
+ template<typename _Tp1>
+ explicit
+ __shared_ptr(std::auto_ptr<_Tp1>& __r)
+ : _M_ptr(__r.get()), _M_refcount()
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ // TODO requires _Tp1 is complete, delete __r.release() well-formed
+ _Tp1* __tmp = __r.get();
+ _M_refcount = __shared_count<_Lp>(__r);
+ __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
+ }
+
+#endif
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, __static_cast_tag)
+ : _M_ptr(static_cast<element_type*>(__r._M_ptr)),
+ _M_refcount(__r._M_refcount)
+ { }
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, __const_cast_tag)
+ : _M_ptr(const_cast<element_type*>(__r._M_ptr)),
+ _M_refcount(__r._M_refcount)
+ { }
+
+ template<typename _Tp1>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, __dynamic_cast_tag)
+ : _M_ptr(dynamic_cast<element_type*>(__r._M_ptr)),
+ _M_refcount(__r._M_refcount)
+ {
+ if (_M_ptr == 0) // need to allocate new counter -- the cast failed
+ _M_refcount = __shared_count<_Lp>();
+ }
+
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
+ return *this;
+ }
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ __shared_ptr&
+ operator=(std::auto_ptr<_Tp1>& __r)
+ {
+ __shared_ptr(__r).swap(*this);
+ return *this;
+ }
+#endif
+
+ void
+ reset() // never throws
+ { __shared_ptr().swap(*this); }
+
+ template<typename _Tp1>
+ void
+ reset(_Tp1* __p) // _Tp1 must be complete.
+ {
+ // Catch self-reset errors.
+ _GLIBCXX_DEBUG_ASSERT(__p == 0 || __p != _M_ptr);
+ __shared_ptr(__p).swap(*this);
+ }
+
+ template<typename _Tp1, typename _Deleter>
+ void
+ reset(_Tp1* __p, _Deleter __d)
+ { __shared_ptr(__p, __d).swap(*this); }
+
+ // Allow class instantiation when _Tp is [cv-qual] void.
+ typename std::tr1::add_reference<_Tp>::type
+ operator*() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return *_M_ptr;
+ }
+
+ _Tp*
+ operator->() const // never throws
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_ptr != 0);
+ return _M_ptr;
+ }
+
+ _Tp*
+ get() const // never throws
+ { return _M_ptr; }
+
+ // Implicit conversion to "bool"
+ private:
+ typedef _Tp* __shared_ptr::*__unspecified_bool_type;
+
+ public:
+ operator __unspecified_bool_type() const // never throws
+ { return _M_ptr == 0 ? 0 : &__shared_ptr::_M_ptr; }
+
+ bool
+ unique() const // never throws
+ { return _M_refcount._M_unique(); }
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ void
+ swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
+ {
+ std::swap(_M_ptr, __other._M_ptr);
+ _M_refcount._M_swap(__other._M_refcount);
+ }
+
+ private:
+ void*
+ _M_get_deleter(const std::type_info& __ti) const
+ { return _M_refcount._M_get_deleter(__ti); }
+
+ template<typename _Tp1, _Lock_policy _Lp1>
+ bool
+ _M_less(const __shared_ptr<_Tp1, _Lp1>& __rhs) const
+ { return _M_refcount < __rhs._M_refcount; }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+
+ template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
+ friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&);
+
+ // Friends injected into enclosing namespace and found by ADL:
+ template<typename _Tp1>
+ friend inline bool
+ operator==(const __shared_ptr& __a, const __shared_ptr<_Tp1, _Lp>& __b)
+ { return __a.get() == __b.get(); }
+
+ template<typename _Tp1>
+ friend inline bool
+ operator!=(const __shared_ptr& __a, const __shared_ptr<_Tp1, _Lp>& __b)
+ { return __a.get() != __b.get(); }
+
+ template<typename _Tp1>
+ friend inline bool
+ operator<(const __shared_ptr& __a, const __shared_ptr<_Tp1, _Lp>& __b)
+ { return __a._M_less(__b); }
+
+ _Tp* _M_ptr; // Contained pointer.
+ __shared_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+ // 2.2.3.8 shared_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+ // 2.2.3.9 shared_ptr casts
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, __static_cast_tag()); }
+
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, __const_cast_tag()); }
+
+ /** @warning The seemingly equivalent
+ * <code>shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))</code>
+ * will eventually result in undefined behaviour,
+ * attempting to delete the same object twice.
+ */
+ template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
+ inline __shared_ptr<_Tp, _Lp>
+ dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r)
+ { return __shared_ptr<_Tp, _Lp>(__r, __dynamic_cast_tag()); }
+
+ // 2.2.3.7 shared_ptr I/O
+ template<typename _Ch, typename _Tr, typename _Tp, _Lock_policy _Lp>
+ std::basic_ostream<_Ch, _Tr>&
+ operator<<(std::basic_ostream<_Ch, _Tr>& __os,
+ const __shared_ptr<_Tp, _Lp>& __p)
+ {
+ __os << __p.get();
+ return __os;
+ }
+
+ // 2.2.3.10 shared_ptr get_deleter (experimental)
+ template<typename _Del, typename _Tp, _Lock_policy _Lp>
+ inline _Del*
+ get_deleter(const __shared_ptr<_Tp, _Lp>& __p)
+ { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __weak_ptr
+ {
+ public:
+ typedef _Tp element_type;
+
+ __weak_ptr()
+ : _M_ptr(0), _M_refcount() // never throws
+ { }
+
+ // Generated copy constructor, assignment, destructor are fine.
+
+ // The "obvious" converting constructor implementation:
+ //
+ // template<typename _Tp1>
+ // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ // { }
+ //
+ // has a serious problem.
+ //
+ // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
+ // conversion may require access to *__r._M_ptr (virtual inheritance).
+ //
+ // It is not possible to avoid spurious access violations since
+ // in multithreaded programs __r._M_ptr may be invalidated at any point.
+ template<typename _Tp1>
+ __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
+ : _M_refcount(__r._M_refcount) // never throws
+ {
+ __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
+ _M_ptr = __r.lock().get();
+ }
+
+ template<typename _Tp1>
+ __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r)
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
+ { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __weak_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r.lock().get();
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ template<typename _Tp1>
+ __weak_ptr&
+ operator=(const __shared_ptr<_Tp1, _Lp>& __r) // never throws
+ {
+ _M_ptr = __r._M_ptr;
+ _M_refcount = __r._M_refcount;
+ return *this;
+ }
+
+ __shared_ptr<_Tp, _Lp>
+ lock() const // never throws
+ {
+#ifdef __GTHREADS
+ // Optimization: avoid throw overhead.
+ if (expired())
+ return __shared_ptr<element_type, _Lp>();
+
+ __try
+ {
+ return __shared_ptr<element_type, _Lp>(*this);
+ }
+ __catch(const bad_weak_ptr&)
+ {
+ // Q: How can we get here?
+ // A: Another thread may have invalidated r after the
+ // use_count test above.
+ return __shared_ptr<element_type, _Lp>();
+ }
+
+#else
+ // Optimization: avoid try/catch overhead when single threaded.
+ return expired() ? __shared_ptr<element_type, _Lp>()
+ : __shared_ptr<element_type, _Lp>(*this);
+
+#endif
+ } // XXX MT
+
+ long
+ use_count() const // never throws
+ { return _M_refcount._M_get_use_count(); }
+
+ bool
+ expired() const // never throws
+ { return _M_refcount._M_get_use_count() == 0; }
+
+ void
+ reset() // never throws
+ { __weak_ptr().swap(*this); }
+
+ void
+ swap(__weak_ptr& __s) // never throws
+ {
+ std::swap(_M_ptr, __s._M_ptr);
+ _M_refcount._M_swap(__s._M_refcount);
+ }
+
+ private:
+ // Used by __enable_shared_from_this.
+ void
+ _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount)
+ {
+ _M_ptr = __ptr;
+ _M_refcount = __refcount;
+ }
+
+ template<typename _Tp1>
+ bool
+ _M_less(const __weak_ptr<_Tp1, _Lp>& __rhs) const
+ { return _M_refcount < __rhs._M_refcount; }
+
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
+ template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
+ friend class __enable_shared_from_this<_Tp, _Lp>;
+ friend class enable_shared_from_this<_Tp>;
+
+ // Friend injected into namespace and found by ADL.
+ template<typename _Tp1>
+ friend inline bool
+ operator<(const __weak_ptr& __lhs, const __weak_ptr<_Tp1, _Lp>& __rhs)
+ { return __lhs._M_less(__rhs); }
+
+ _Tp* _M_ptr; // Contained pointer.
+ __weak_count<_Lp> _M_refcount; // Reference counter.
+ };
+
+ // 2.2.4.7 weak_ptr specialized algorithms.
+ template<typename _Tp, _Lock_policy _Lp>
+ inline void
+ swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b)
+ { __a.swap(__b); }
+
+
+ template<typename _Tp, _Lock_policy _Lp>
+ class __enable_shared_from_this
+ {
+ protected:
+ __enable_shared_from_this() { }
+
+ __enable_shared_from_this(const __enable_shared_from_this&) { }
+
+ __enable_shared_from_this&
+ operator=(const __enable_shared_from_this&)
+ { return *this; }
+
+ ~__enable_shared_from_this() { }
+
+ public:
+ __shared_ptr<_Tp, _Lp>
+ shared_from_this()
+ { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
+
+ __shared_ptr<const _Tp, _Lp>
+ shared_from_this() const
+ { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn,
+ const __enable_shared_from_this* __pe,
+ const _Tp1* __px)
+ {
+ if (__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
+ };
+
+
+ /// shared_ptr
+ // The actual shared_ptr, with forwarding constructors and
+ // assignment operators.
+ template<typename _Tp>
+ class shared_ptr
+ : public __shared_ptr<_Tp>
+ {
+ public:
+ shared_ptr()
+ : __shared_ptr<_Tp>() { }
+
+ template<typename _Tp1>
+ explicit
+ shared_ptr(_Tp1* __p)
+ : __shared_ptr<_Tp>(__p) { }
+
+ template<typename _Tp1, typename _Deleter>
+ shared_ptr(_Tp1* __p, _Deleter __d)
+ : __shared_ptr<_Tp>(__p, __d) { }
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r)
+ : __shared_ptr<_Tp>(__r) { }
+
+ template<typename _Tp1>
+ explicit
+ shared_ptr(const weak_ptr<_Tp1>& __r)
+ : __shared_ptr<_Tp>(__r) { }
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ explicit
+ shared_ptr(std::auto_ptr<_Tp1>& __r)
+ : __shared_ptr<_Tp>(__r) { }
+#endif
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, __static_cast_tag)
+ : __shared_ptr<_Tp>(__r, __static_cast_tag()) { }
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, __const_cast_tag)
+ : __shared_ptr<_Tp>(__r, __const_cast_tag()) { }
+
+ template<typename _Tp1>
+ shared_ptr(const shared_ptr<_Tp1>& __r, __dynamic_cast_tag)
+ : __shared_ptr<_Tp>(__r, __dynamic_cast_tag()) { }
+
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
+ this->__shared_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+#if !defined(__GXX_EXPERIMENTAL_CXX0X__) || _GLIBCXX_DEPRECATED
+ template<typename _Tp1>
+ shared_ptr&
+ operator=(std::auto_ptr<_Tp1>& __r)
+ {
+ this->__shared_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+#endif
+ };
+
+ // 2.2.3.8 shared_ptr specialized algorithms.
+ template<typename _Tp>
+ inline void
+ swap(__shared_ptr<_Tp>& __a, __shared_ptr<_Tp>& __b)
+ { __a.swap(__b); }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ static_pointer_cast(const shared_ptr<_Tp1>& __r)
+ { return shared_ptr<_Tp>(__r, __static_cast_tag()); }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ const_pointer_cast(const shared_ptr<_Tp1>& __r)
+ { return shared_ptr<_Tp>(__r, __const_cast_tag()); }
+
+ template<typename _Tp, typename _Tp1>
+ inline shared_ptr<_Tp>
+ dynamic_pointer_cast(const shared_ptr<_Tp1>& __r)
+ { return shared_ptr<_Tp>(__r, __dynamic_cast_tag()); }
+
+
+ /// weak_ptr
+ // The actual weak_ptr, with forwarding constructors and
+ // assignment operators.
+ template<typename _Tp>
+ class weak_ptr
+ : public __weak_ptr<_Tp>
+ {
+ public:
+ weak_ptr()
+ : __weak_ptr<_Tp>() { }
+
+ template<typename _Tp1>
+ weak_ptr(const weak_ptr<_Tp1>& __r)
+ : __weak_ptr<_Tp>(__r) { }
+
+ template<typename _Tp1>
+ weak_ptr(const shared_ptr<_Tp1>& __r)
+ : __weak_ptr<_Tp>(__r) { }
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const weak_ptr<_Tp1>& __r) // never throws
+ {
+ this->__weak_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+ template<typename _Tp1>
+ weak_ptr&
+ operator=(const shared_ptr<_Tp1>& __r) // never throws
+ {
+ this->__weak_ptr<_Tp>::operator=(__r);
+ return *this;
+ }
+
+ shared_ptr<_Tp>
+ lock() const // never throws
+ {
+#ifdef __GTHREADS
+ if (this->expired())
+ return shared_ptr<_Tp>();
+
+ __try
+ {
+ return shared_ptr<_Tp>(*this);
+ }
+ __catch(const bad_weak_ptr&)
+ {
+ return shared_ptr<_Tp>();
+ }
+#else
+ return this->expired() ? shared_ptr<_Tp>()
+ : shared_ptr<_Tp>(*this);
+#endif
+ }
+ };
+
+ /// enable_shared_from_this
+ template<typename _Tp>
+ class enable_shared_from_this
+ {
+ protected:
+ enable_shared_from_this() { }
+
+ enable_shared_from_this(const enable_shared_from_this&) { }
+
+ enable_shared_from_this&
+ operator=(const enable_shared_from_this&)
+ { return *this; }
+
+ ~enable_shared_from_this() { }
+
+ public:
+ shared_ptr<_Tp>
+ shared_from_this()
+ { return shared_ptr<_Tp>(this->_M_weak_this); }
+
+ shared_ptr<const _Tp>
+ shared_from_this() const
+ { return shared_ptr<const _Tp>(this->_M_weak_this); }
+
+ private:
+ template<typename _Tp1>
+ void
+ _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const
+ { _M_weak_this._M_assign(__p, __n); }
+
+ template<typename _Tp1>
+ friend void
+ __enable_shared_from_this_helper(const __shared_count<>& __pn,
+ const enable_shared_from_this* __pe,
+ const _Tp1* __px)
+ {
+ if (__pe != 0)
+ __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn);
+ }
+
+ mutable weak_ptr<_Tp> _M_weak_this;
+ };
+
+}
+}
+
+#endif // _TR1_SHARED_PTR_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/special_function_util.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/special_function_util.h
new file mode 100644
index 0000000..d2699bd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/special_function_util.h
@@ -0,0 +1,144 @@
+// Special functions -*- C++ -*-
+
+// Copyright (C) 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/special_function_util.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882 TR1: 5.2 Special functions
+//
+
+// Written by Edward Smith-Rowland based on numerous mathematics books.
+
+#ifndef _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H
+#define _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H 1
+
+namespace std
+{
+namespace tr1
+{
+
+ namespace __detail
+ {
+
+ /// A class to encapsulate type dependent floating point
+ /// constants. Not everything will be able to be expressed as
+ /// type logic.
+ template<typename _Tp>
+ struct __floating_point_constant
+ {
+ static const _Tp __value;
+ };
+
+
+ /// A structure for numeric constants.
+ template<typename _Tp>
+ struct __numeric_constants
+ {
+ /// Constant @f$ \pi @f$.
+ static _Tp __pi() throw()
+ { return static_cast<_Tp>(3.1415926535897932384626433832795029L); }
+ /// Constant @f$ \pi / 2 @f$.
+ static _Tp __pi_2() throw()
+ { return static_cast<_Tp>(1.5707963267948966192313216916397514L); }
+ /// Constant @f$ \pi / 3 @f$.
+ static _Tp __pi_3() throw()
+ { return static_cast<_Tp>(1.0471975511965977461542144610931676L); }
+ /// Constant @f$ \pi / 4 @f$.
+ static _Tp __pi_4() throw()
+ { return static_cast<_Tp>(0.7853981633974483096156608458198757L); }
+ /// Constant @f$ 1 / \pi @f$.
+ static _Tp __1_pi() throw()
+ { return static_cast<_Tp>(0.3183098861837906715377675267450287L); }
+ /// Constant @f$ 2 / \sqrt(\pi) @f$.
+ static _Tp __2_sqrtpi() throw()
+ { return static_cast<_Tp>(1.1283791670955125738961589031215452L); }
+ /// Constant @f$ \sqrt(2) @f$.
+ static _Tp __sqrt2() throw()
+ { return static_cast<_Tp>(1.4142135623730950488016887242096981L); }
+ /// Constant @f$ \sqrt(3) @f$.
+ static _Tp __sqrt3() throw()
+ { return static_cast<_Tp>(1.7320508075688772935274463415058723L); }
+ /// Constant @f$ \sqrt(\pi/2) @f$.
+ static _Tp __sqrtpio2() throw()
+ { return static_cast<_Tp>(1.2533141373155002512078826424055226L); }
+ /// Constant @f$ 1 / sqrt(2) @f$.
+ static _Tp __sqrt1_2() throw()
+ { return static_cast<_Tp>(0.7071067811865475244008443621048490L); }
+ /// Constant @f$ \log(\pi) @f$.
+ static _Tp __lnpi() throw()
+ { return static_cast<_Tp>(1.1447298858494001741434273513530587L); }
+ /// Constant Euler's constant @f$ \gamma_E @f$.
+ static _Tp __gamma_e() throw()
+ { return static_cast<_Tp>(0.5772156649015328606065120900824024L); }
+ /// Constant Euler-Mascheroni @f$ e @f$
+ static _Tp __euler() throw()
+ { return static_cast<_Tp>(2.7182818284590452353602874713526625L); }
+ };
+
+
+#if _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+
+ /// This is a wrapper for the isnan function. Otherwise, for NaN,
+ /// all comparisons result in false. If/when we build a std::isnan
+ /// out of intrinsics, this will disappear completely in favor of
+ /// std::isnan.
+ template<typename _Tp>
+ inline bool __isnan(const _Tp __x)
+ {
+ return std::isnan(__x);
+ }
+
+#else
+
+ template<typename _Tp>
+ inline bool __isnan(const _Tp __x)
+ {
+ return __builtin_isnan(__x);
+ }
+
+ template<>
+ inline bool __isnan<float>(const float __x)
+ {
+ return __builtin_isnanf(__x);
+ }
+
+ template<>
+ inline bool __isnan<long double>(const long double __x)
+ {
+ return __builtin_isnanl(__x);
+ }
+
+#endif
+
+ } // namespace __detail
+
+}
+}
+
+#endif // _GLIBCXX_TR1_SPECIAL_FUNCTION_UTIL_H
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdarg.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdarg.h
new file mode 100644
index 0000000..41173e8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdarg.h
@@ -0,0 +1,34 @@
+// TR1 stdarg.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/stdarg.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDARG_H
+#define _TR1_STDARG_H 1
+
+#include <tr1/cstdarg>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdbool.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdbool.h
new file mode 100644
index 0000000..3861e44
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdbool.h
@@ -0,0 +1,34 @@
+// TR1 stdbool.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/stdbool.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDBOOL_H
+#define _TR1_STDBOOL_H 1
+
+#include <tr1/cstdbool>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdint.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdint.h
new file mode 100644
index 0000000..8113fa5
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdint.h
@@ -0,0 +1,34 @@
+// TR1 stdint.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/stdint.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDINT_H
+#define _TR1_STDINT_H 1
+
+#include <tr1/cstdint>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdio.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdio.h
new file mode 100644
index 0000000..f1edf83
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdio.h
@@ -0,0 +1,34 @@
+// TR1 stdio.h -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/stdio.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _TR1_STDIO_H
+#define _TR1_STDIO_H 1
+
+#include <tr1/cstdio>
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdlib.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdlib.h
new file mode 100644
index 0000000..5e57aec
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/stdlib.h
@@ -0,0 +1,52 @@
+// TR1 stdlib.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/stdlib.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_STDLIB_H
+#define _GLIBCXX_TR1_STDLIB_H 1
+
+#include <tr1/cstdlib>
+
+#if _GLIBCXX_HOSTED
+
+#if _GLIBCXX_USE_C99
+
+using std::tr1::atoll;
+using std::tr1::strtoll;
+using std::tr1::strtoull;
+
+using std::tr1::abs;
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+using std::tr1::div;
+#endif
+
+#endif
+
+#endif
+
+#endif // _GLIBCXX_TR1_STDLIB_H
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tgmath.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tgmath.h
new file mode 100644
index 0000000..c807031
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tgmath.h
@@ -0,0 +1,34 @@
+// TR1 tgmath.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/tgmath.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_TGMATH_H
+#define _GLIBCXX_TR1_TGMATH_H 1
+
+#include <tr1/ctgmath>
+
+#endif // _GLIBCXX_TR1_TGMATH_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tuple b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tuple
new file mode 100644
index 0000000..ff9f220
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/tuple
@@ -0,0 +1,422 @@
+// class template tuple -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/tuple
+* This is a TR1 C++ Library header.
+*/
+
+// Chris Jefferson <chris@bubblescope.net>
+// Variadic Templates support by Douglas Gregor <doug.gregor@gmail.com>
+
+#ifndef _GLIBCXX_TR1_TUPLE
+#define _GLIBCXX_TR1_TUPLE 1
+
+#pragma GCC system_header
+
+#include <utility>
+
+namespace std
+{
+namespace tr1
+{
+ // Adds a const reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_c_ref
+ { typedef const _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_c_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ // Adds a reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_ref
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ /**
+ * Contains the actual implementation of the @c tuple template, stored
+ * as a recursive inheritance hierarchy from the first element (most
+ * derived class) to the last (least derived class). The @c Idx
+ * parameter gives the 0-based index of the element stored at this
+ * point in the hierarchy; we use it to implement a constant-time
+ * get() operation.
+ */
+ template<int _Idx, typename... _Elements>
+ struct _Tuple_impl;
+
+ /**
+ * Zero-element tuple implementation. This is the basis case for the
+ * inheritance recursion.
+ */
+ template<int _Idx>
+ struct _Tuple_impl<_Idx> { };
+
+ /**
+ * Recursive tuple implementation. Here we store the @c Head element
+ * and derive from a @c Tuple_impl containing the remaining elements
+ * (which contains the @c Tail).
+ */
+ template<int _Idx, typename _Head, typename... _Tail>
+ struct _Tuple_impl<_Idx, _Head, _Tail...>
+ : public _Tuple_impl<_Idx + 1, _Tail...>
+ {
+ typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
+
+ _Head _M_head;
+
+ _Inherited& _M_tail() { return *this; }
+ const _Inherited& _M_tail() const { return *this; }
+
+ _Tuple_impl() : _Inherited(), _M_head() { }
+
+ explicit
+ _Tuple_impl(typename __add_c_ref<_Head>::type __head,
+ typename __add_c_ref<_Tail>::type... __tail)
+ : _Inherited(__tail...), _M_head(__head) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
+ : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
+
+ _Tuple_impl(const _Tuple_impl& __in)
+ : _Inherited(__in._M_tail()), _M_head(__in._M_head) { }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
+ {
+ _M_head = __in._M_head;
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ _Tuple_impl&
+ operator=(const _Tuple_impl& __in)
+ {
+ _M_head = __in._M_head;
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+ };
+
+ template<typename... _Elements>
+ class tuple : public _Tuple_impl<0, _Elements...>
+ {
+ typedef _Tuple_impl<0, _Elements...> _Inherited;
+
+ public:
+ tuple() : _Inherited() { }
+
+ explicit
+ tuple(typename __add_c_ref<_Elements>::type... __elements)
+ : _Inherited(__elements...) { }
+
+ template<typename... _UElements>
+ tuple(const tuple<_UElements...>& __in)
+ : _Inherited(__in) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(__in) { }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(const tuple<_UElements...>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+ };
+
+ template<> class tuple<> { };
+
+ // 2-element tuple, with construction and assignment from a pair.
+ template<typename _T1, typename _T2>
+ class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
+ {
+ typedef _Tuple_impl<0, _T1, _T2> _Inherited;
+
+ public:
+ tuple() : _Inherited() { }
+
+ explicit
+ tuple(typename __add_c_ref<_T1>::type __a1,
+ typename __add_c_ref<_T2>::type __a2)
+ : _Inherited(__a1, __a2) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const tuple<_U1, _U2>& __in)
+ : _Inherited(__in) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(__in) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const pair<_U1, _U2>& __in)
+ : _Inherited(_Tuple_impl<0,
+ typename __add_c_ref<_U1>::type,
+ typename __add_c_ref<_U2>::type>(__in.first,
+ __in.second))
+ { }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const tuple<_U1, _U2>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const pair<_U1, _U2>& __in)
+ {
+ this->_M_head = __in.first;
+ this->_M_tail()._M_head = __in.second;
+ return *this;
+ }
+ };
+
+
+ /// Gives the type of the ith element of a given tuple type.
+ template<int __i, typename _Tp>
+ struct tuple_element;
+
+ /**
+ * Recursive case for tuple_element: strip off the first element in
+ * the tuple and retrieve the (i-1)th element of the remaining tuple.
+ */
+ template<int __i, typename _Head, typename... _Tail>
+ struct tuple_element<__i, tuple<_Head, _Tail...> >
+ : tuple_element<__i - 1, tuple<_Tail...> > { };
+
+ /**
+ * Basis case for tuple_element: The first element is the one we're seeking.
+ */
+ template<typename _Head, typename... _Tail>
+ struct tuple_element<0, tuple<_Head, _Tail...> >
+ {
+ typedef _Head type;
+ };
+
+ /// Finds the size of a given tuple type.
+ template<typename _Tp>
+ struct tuple_size;
+
+ /// class tuple_size
+ template<typename... _Elements>
+ struct tuple_size<tuple<_Elements...> >
+ {
+ static const int value = sizeof...(_Elements);
+ };
+
+ template<typename... _Elements>
+ const int tuple_size<tuple<_Elements...> >::value;
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_ref<_Head>::type
+ __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
+ {
+ return __t._M_head;
+ }
+
+ template<int __i, typename _Head, typename... _Tail>
+ inline typename __add_c_ref<_Head>::type
+ __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
+ {
+ return __t._M_head;
+ }
+
+ // Return a reference (const reference) to the ith element of a tuple.
+ // Any const or non-const ref elements are returned with their original type.
+ template<int __i, typename... _Elements>
+ inline typename __add_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(tuple<_Elements...>& __t)
+ {
+ return __get_helper<__i>(__t);
+ }
+
+ template<int __i, typename... _Elements>
+ inline typename __add_c_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(const tuple<_Elements...>& __t)
+ {
+ return __get_helper<__i>(__t);
+ }
+
+ // This class helps construct the various comparison operations on tuples
+ template<int __check_equal_size, int __i, int __j,
+ typename _Tp, typename _Up>
+ struct __tuple_compare;
+
+ template<int __i, int __j, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __j, _Tp, _Up>
+ {
+ static bool __eq(const _Tp& __t, const _Up& __u)
+ {
+ return (get<__i>(__t) == get<__i>(__u) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ static bool __less(const _Tp& __t, const _Up& __u)
+ {
+ return ((get<__i>(__t) < get<__i>(__u))
+ || !(get<__i>(__u) < get<__i>(__t)) &&
+ __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u));
+ }
+ };
+
+ template<int __i, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __i, _Tp, _Up>
+ {
+ static bool __eq(const _Tp&, const _Up&)
+ { return true; }
+
+ static bool __less(const _Tp&, const _Up&)
+ { return false; }
+ };
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator==(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator<(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator!=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t == __u); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return __u < __t; }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator<=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__u < __t); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t < __u); }
+
+ template<typename _Tp>
+ class reference_wrapper;
+
+ // Helper which adds a reference to a type when given a reference_wrapper
+ template<typename _Tp>
+ struct __strip_reference_wrapper
+ {
+ typedef _Tp __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename _Tp>
+ struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+ {
+ typedef _Tp& __type;
+ };
+
+ template<typename... _Elements>
+ inline tuple<typename __strip_reference_wrapper<_Elements>::__type...>
+ make_tuple(_Elements... __args)
+ {
+ typedef tuple<typename __strip_reference_wrapper<_Elements>::__type...>
+ __result_type;
+ return __result_type(__args...);
+ }
+
+ template<typename... _Elements>
+ inline tuple<_Elements&...>
+ tie(_Elements&... __args)
+ {
+ return tuple<_Elements&...>(__args...);
+ }
+
+ // A class (and instance) which can be used in 'tie' when an element
+ // of a tuple is not required
+ struct _Swallow_assign
+ {
+ template<class _Tp>
+ _Swallow_assign&
+ operator=(const _Tp&)
+ { return *this; }
+ };
+
+ // TODO: Put this in some kind of shared file.
+ namespace
+ {
+ _Swallow_assign ignore;
+ }; // anonymous namespace
+}
+}
+
+#endif // _GLIBCXX_TR1_TUPLE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/type_traits b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/type_traits
new file mode 100644
index 0000000..fe28f84
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/type_traits
@@ -0,0 +1,249 @@
+// TR1 type_traits -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/type_traits
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_TYPE_TRAITS
+#define _GLIBCXX_TR1_TYPE_TRAITS 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <cstddef>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/type_traits>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/type_traits>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+namespace std
+{
+namespace tr1
+{
+#define _DEFINE_SPEC(_Trait, _Type) \
+ template<> \
+ struct _Trait<_Type> \
+ : public true_type { };
+
+ template<typename>
+ struct is_reference
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_reference<_Tp&>
+ : public true_type { };
+
+ template<typename _Tp>
+ struct is_pod
+ : public integral_constant<bool, __is_pod(_Tp) || is_void<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_trivial_constructor
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_trivial_copy
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_trivial_assign
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_trivial_destructor
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_nothrow_constructor
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_nothrow_copy
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename _Tp>
+ struct has_nothrow_assign
+ : public integral_constant<bool, is_pod<_Tp>::value>
+ { };
+
+ template<typename>
+ struct __is_signed_helper
+ : public false_type { };
+ _DEFINE_SPEC(__is_signed_helper, signed char)
+ _DEFINE_SPEC(__is_signed_helper, short)
+ _DEFINE_SPEC(__is_signed_helper, int)
+ _DEFINE_SPEC(__is_signed_helper, long)
+ _DEFINE_SPEC(__is_signed_helper, long long)
+
+ template<typename _Tp>
+ struct is_signed
+ : public integral_constant<bool, (__is_signed_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ template<typename>
+ struct __is_unsigned_helper
+ : public false_type { };
+ _DEFINE_SPEC(__is_unsigned_helper, unsigned char)
+ _DEFINE_SPEC(__is_unsigned_helper, unsigned short)
+ _DEFINE_SPEC(__is_unsigned_helper, unsigned int)
+ _DEFINE_SPEC(__is_unsigned_helper, unsigned long)
+ _DEFINE_SPEC(__is_unsigned_helper, unsigned long long)
+
+ template<typename _Tp>
+ struct is_unsigned
+ : public integral_constant<bool, (__is_unsigned_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ template<typename _Base, typename _Derived>
+ struct __is_base_of_helper
+ {
+ typedef typename remove_cv<_Base>::type _NoCv_Base;
+ typedef typename remove_cv<_Derived>::type _NoCv_Derived;
+ static const bool __value = (is_same<_Base, _Derived>::value
+ || (__is_base_of(_Base, _Derived)
+ && !is_same<_NoCv_Base,
+ _NoCv_Derived>::value));
+ };
+
+ template<typename _Base, typename _Derived>
+ struct is_base_of
+ : public integral_constant<bool,
+ __is_base_of_helper<_Base, _Derived>::__value>
+ { };
+
+ template<typename _From, typename _To>
+ struct __is_convertible_simple
+ : public __sfinae_types
+ {
+ private:
+ static __one __test(_To);
+ static __two __test(...);
+ static _From __makeFrom();
+
+ public:
+ static const bool __value = sizeof(__test(__makeFrom())) == 1;
+ };
+
+ template<typename _Tp>
+ struct add_reference;
+
+ template<typename _Tp>
+ struct __is_int_or_cref
+ {
+ typedef typename remove_reference<_Tp>::type __rr_Tp;
+ static const bool __value = (is_integral<_Tp>::value
+ || (is_integral<__rr_Tp>::value
+ && is_const<__rr_Tp>::value
+ && !is_volatile<__rr_Tp>::value));
+ };
+
+ template<typename _From, typename _To,
+ bool = (is_void<_From>::value || is_void<_To>::value
+ || is_function<_To>::value || is_array<_To>::value
+ // This special case is here only to avoid warnings.
+ || (is_floating_point<typename
+ remove_reference<_From>::type>::value
+ && __is_int_or_cref<_To>::__value))>
+ struct __is_convertible_helper
+ {
+ // "An imaginary lvalue of type From...".
+ static const bool __value = (__is_convertible_simple<typename
+ add_reference<_From>::type, _To>::__value);
+ };
+
+ template<typename _From, typename _To>
+ struct __is_convertible_helper<_From, _To, true>
+ { static const bool __value = (is_void<_To>::value
+ || (__is_int_or_cref<_To>::__value
+ && !is_void<_From>::value)); };
+
+ template<typename _From, typename _To>
+ struct is_convertible
+ : public integral_constant<bool,
+ __is_convertible_helper<_From, _To>::__value>
+ { };
+
+ // reference modifications [4.7.2].
+ template<typename _Tp>
+ struct remove_reference
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_reference<_Tp&>
+ { typedef _Tp type; };
+
+ // NB: Careful with reference to void.
+ template<typename _Tp, bool = (is_void<_Tp>::value
+ || is_reference<_Tp>::value)>
+ struct __add_reference_helper
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_reference_helper<_Tp, true>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct add_reference
+ : public __add_reference_helper<_Tp>
+ { };
+
+ // other transformations [4.8].
+ template<std::size_t _Len, std::size_t _Align>
+ struct aligned_storage
+ {
+ union type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__((_Align)))) { } __align;
+ };
+ };
+
+#undef _DEFINE_SPEC
+}
+}
+
+#endif // _GLIBCXX_TR1_TYPE_TRAITS
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_map b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_map
new file mode 100644
index 0000000..316630f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_map
@@ -0,0 +1,61 @@
+// TR1 unordered_map -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/unordered_map
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_UNORDERED_MAP
+#define _GLIBCXX_TR1_UNORDERED_MAP 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <utility>
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
+#include <tr1/type_traits>
+#include <tr1/functional_hash.h>
+#include <tr1/hashtable.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/unordered_map>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/unordered_map>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_UNORDERED_MAP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_set b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_set
new file mode 100644
index 0000000..3bd0944
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/unordered_set
@@ -0,0 +1,61 @@
+// TR1 unordered_set -*- C++ -*-
+
+// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/unordered_set
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_UNORDERED_SET
+#define _GLIBCXX_TR1_UNORDERED_SET 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <utility>
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
+#include <tr1/type_traits>
+#include <tr1/functional_hash.h>
+#include <tr1/hashtable.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/unordered_set>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/unordered_set>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_UNORDERED_SET
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/utility b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/utility
new file mode 100644
index 0000000..0aac2b2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/utility
@@ -0,0 +1,56 @@
+// TR1 utility -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/utility
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_UTILITY
+#define _GLIBCXX_TR1_UTILITY 1
+
+#pragma GCC system_header
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# error TR1 header cannot be included from C++0x header
+#endif
+
+#include <bits/c++config.h>
+#include <bits/stl_relops.h>
+#include <bits/stl_pair.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# include <tr1_impl/utility>
+#else
+# define _GLIBCXX_INCLUDE_AS_TR1
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 tr1::
+# include <tr1_impl/utility>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_TR1
+#endif
+
+#endif // _GLIBCXX_TR1_UTILITY
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wchar.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wchar.h
new file mode 100644
index 0000000..5996048
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wchar.h
@@ -0,0 +1,34 @@
+// TR1 wchar.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/wchar.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_WCHAR_H
+#define _GLIBCXX_TR1_WCHAR_H 1
+
+#include <tr1/cwchar>
+
+#endif // _GLIBCXX_TR1_WCHAR_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wctype.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wctype.h
new file mode 100644
index 0000000..604948a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1/wctype.h
@@ -0,0 +1,34 @@
+// TR1 wctype.h -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1/wctype.h
+ * This is a TR1 C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TR1_WCTYPE_H
+#define _GLIBCXX_TR1_WCTYPE_H 1
+
+#include <tr1/cwctype>
+
+#endif // _GLIBCXX_TR1_WCTYPE_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/array b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/array
new file mode 100644
index 0000000..c0bd240
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/array
@@ -0,0 +1,287 @@
+// class template array -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/array
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ /**
+ * @brief A standard container for storing a fixed size sequence of elements.
+ *
+ * @ingroup sequences
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, a
+ * <a href="tables.html#66">reversible container</a>, and a
+ * <a href="tables.html#67">sequence</a>.
+ *
+ * Sets support random access iterators.
+ *
+ * @param Tp Type of element. Required to be a complete type.
+ * @param N Number of elements.
+ */
+ template<typename _Tp, std::size_t _Nm>
+ struct array
+ {
+ typedef _Tp value_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef value_type* iterator;
+ typedef const value_type* const_iterator;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ // Support for zero-sized arrays mandatory.
+ value_type _M_instance[_Nm ? _Nm : 1];
+
+ // No explicit construct/copy/destroy for aggregate type.
+
+ void
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ // DR 776.
+ fill(const value_type& __u)
+#else
+ assign(const value_type& __u)
+#endif
+ { std::fill_n(begin(), size(), __u); }
+
+ void
+ swap(array& __other)
+ { std::swap_ranges(begin(), end(), __other.begin()); }
+
+ // Iterators.
+ iterator
+ begin()
+ { return iterator(&_M_instance[0]); }
+
+ const_iterator
+ begin() const
+ { return const_iterator(&_M_instance[0]); }
+
+ iterator
+ end()
+ { return iterator(&_M_instance[_Nm]); }
+
+ const_iterator
+ end() const
+ { return const_iterator(&_M_instance[_Nm]); }
+
+ reverse_iterator
+ rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator
+ rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator
+ rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator
+ rend() const
+ { return const_reverse_iterator(begin()); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const_iterator
+ cbegin() const
+ { return const_iterator(&_M_instance[0]); }
+
+ const_iterator
+ cend() const
+ { return const_iterator(&_M_instance[_Nm]); }
+
+ const_reverse_iterator
+ crbegin() const
+ { return const_reverse_iterator(end()); }
+
+ const_reverse_iterator
+ crend() const
+ { return const_reverse_iterator(begin()); }
+#endif
+
+ // Capacity.
+ size_type
+ size() const { return _Nm; }
+
+ size_type
+ max_size() const { return _Nm; }
+
+ bool
+ empty() const { return size() == 0; }
+
+ // Element access.
+ reference
+ operator[](size_type __n)
+ { return _M_instance[__n]; }
+
+ const_reference
+ operator[](size_type __n) const
+ { return _M_instance[__n]; }
+
+ reference
+ at(size_type __n)
+ {
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
+ return _M_instance[__n];
+ }
+
+ const_reference
+ at(size_type __n) const
+ {
+ if (__builtin_expect(__n >= _Nm, false))
+ std::__throw_out_of_range(__N("array::at"));
+ return _M_instance[__n];
+ }
+
+ reference
+ front()
+ { return *begin(); }
+
+ const_reference
+ front() const
+ { return *begin(); }
+
+ reference
+ back()
+ { return _Nm ? *(end() - 1) : *end(); }
+
+ const_reference
+ back() const
+ { return _Nm ? *(end() - 1) : *end(); }
+
+ _Tp*
+ data()
+ { return &_M_instance[0]; }
+
+ const _Tp*
+ data() const
+ { return &_M_instance[0]; }
+ };
+
+ // Array comparisons.
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
+ { return std::equal(__one.begin(), __one.end(), __two.begin()); }
+
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
+ { return !(__one == __two); }
+
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
+ {
+ return std::lexicographical_compare(__a.begin(), __a.end(),
+ __b.begin(), __b.end());
+ }
+
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
+ { return __two < __one; }
+
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
+ { return !(__one > __two); }
+
+ template<typename _Tp, std::size_t _Nm>
+ inline bool
+ operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
+ { return !(__one < __two); }
+
+ // Specialized algorithms [6.2.2.2].
+ template<typename _Tp, std::size_t _Nm>
+ inline void
+ swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two)
+ { std::swap_ranges(__one.begin(), __one.end(), __two.begin()); }
+
+ // Tuple interface to class template array [6.2.2.5].
+
+ /// tuple_size
+ template<typename _Tp>
+ class tuple_size;
+
+ /// tuple_element
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, typename _Tp>
+#else
+ template<int _Int, typename _Tp>
+#endif
+ class tuple_element;
+
+ template<typename _Tp, std::size_t _Nm>
+ struct tuple_size<array<_Tp, _Nm> >
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ { static const std::size_t value = _Nm; };
+#else
+ { static const int value = _Nm; };
+#endif
+
+ template<typename _Tp, std::size_t _Nm>
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const std::size_t
+#else
+ const int
+#endif
+ tuple_size<array<_Tp, _Nm> >::value;
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, typename _Tp, std::size_t _Nm>
+#else
+ template<int _Int, typename _Tp, std::size_t _Nm>
+#endif
+ struct tuple_element<_Int, array<_Tp, _Nm> >
+ { typedef _Tp type; };
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, typename _Tp, std::size_t _Nm>
+#else
+ template<int _Int, typename _Tp, std::size_t _Nm>
+#endif
+ inline _Tp&
+ get(array<_Tp, _Nm>& __arr)
+ { return __arr[_Int]; }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, typename _Tp, std::size_t _Nm>
+#else
+ template<int _Int, typename _Tp, std::size_t _Nm>
+#endif
+ inline const _Tp&
+ get(const array<_Tp, _Nm>& __arr)
+ { return __arr[_Int]; }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/boost_sp_counted_base.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/boost_sp_counted_base.h
new file mode 100644
index 0000000..48e601f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/boost_sp_counted_base.h
@@ -0,0 +1,239 @@
+// <tr1_impl/boost_sp_counted_base.h> -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+// shared_count.hpp
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+
+// shared_ptr.hpp
+// Copyright (C) 1998, 1999 Greg Colvin and Beman Dawes.
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// weak_ptr.hpp
+// Copyright (C) 2001, 2002, 2003 Peter Dimov
+
+// enable_shared_from_this.hpp
+// Copyright (C) 2002 Peter Dimov
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// GCC Note: based on version 1.32.0 of the Boost library.
+
+/** @file tr1_impl/boost_sp_counted_base.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ class bad_weak_ptr : public std::exception
+ {
+ public:
+ virtual char const*
+ what() const throw()
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ { return "std::bad_weak_ptr"; }
+#else
+ { return "tr1::bad_weak_ptr"; }
+#endif
+ };
+
+ // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
+ inline void
+ __throw_bad_weak_ptr()
+ {
+#if __EXCEPTIONS
+ throw bad_weak_ptr();
+#else
+ __builtin_abort();
+#endif
+ }
+
+ using __gnu_cxx::_Lock_policy;
+ using __gnu_cxx::__default_lock_policy;
+ using __gnu_cxx::_S_single;
+ using __gnu_cxx::_S_mutex;
+ using __gnu_cxx::_S_atomic;
+
+ // Empty helper class except when the template argument is _S_mutex.
+ template<_Lock_policy _Lp>
+ class _Mutex_base
+ {
+ protected:
+ // The atomic policy uses fully-fenced builtins, single doesn't care.
+ enum { _S_need_barriers = 0 };
+ };
+
+ template<>
+ class _Mutex_base<_S_mutex>
+ : public __gnu_cxx::__mutex
+ {
+ protected:
+ // This policy is used when atomic builtins are not available.
+ // The replacement atomic operations might not have the necessary
+ // memory barriers.
+ enum { _S_need_barriers = 1 };
+ };
+
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class _Sp_counted_base
+ : public _Mutex_base<_Lp>
+ {
+ public:
+ _Sp_counted_base()
+ : _M_use_count(1), _M_weak_count(1) { }
+
+ virtual
+ ~_Sp_counted_base() // nothrow
+ { }
+
+ // Called when _M_use_count drops to zero, to release the resources
+ // managed by *this.
+ virtual void
+ _M_dispose() = 0; // nothrow
+
+ // Called when _M_weak_count drops to zero.
+ virtual void
+ _M_destroy() // nothrow
+ { delete this; }
+
+ virtual void*
+ _M_get_deleter(const std::type_info&) = 0;
+
+ void
+ _M_add_ref_copy()
+ { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
+
+ void
+ _M_add_ref_lock();
+
+ void
+ _M_release() // nothrow
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
+ {
+ _M_dispose();
+ // There must be a memory barrier between dispose() and destroy()
+ // to ensure that the effects of dispose() are observed in the
+ // thread that runs destroy().
+ // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html
+ if (_Mutex_base<_Lp>::_S_need_barriers)
+ {
+ _GLIBCXX_READ_MEM_BARRIER;
+ _GLIBCXX_WRITE_MEM_BARRIER;
+ }
+
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
+ -1) == 1)
+ _M_destroy();
+ }
+ }
+
+ void
+ _M_weak_add_ref() // nothrow
+ { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
+
+ void
+ _M_weak_release() // nothrow
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
+ {
+ if (_Mutex_base<_Lp>::_S_need_barriers)
+ {
+ // See _M_release(),
+ // destroy() must observe results of dispose()
+ _GLIBCXX_READ_MEM_BARRIER;
+ _GLIBCXX_WRITE_MEM_BARRIER;
+ }
+ _M_destroy();
+ }
+ }
+
+ long
+ _M_get_use_count() const // nothrow
+ {
+ // No memory barrier is used here so there is no synchronization
+ // with other threads.
+ return const_cast<const volatile _Atomic_word&>(_M_use_count);
+ }
+
+ private:
+ _Sp_counted_base(_Sp_counted_base const&);
+ _Sp_counted_base& operator=(_Sp_counted_base const&);
+
+ _Atomic_word _M_use_count; // #shared
+ _Atomic_word _M_weak_count; // #weak + (#shared != 0)
+ };
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_single>::
+ _M_add_ref_lock()
+ {
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
+ {
+ _M_use_count = 0;
+ __throw_bad_weak_ptr();
+ }
+ }
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_mutex>::
+ _M_add_ref_lock()
+ {
+ __gnu_cxx::__scoped_lock sentry(*this);
+ if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
+ {
+ _M_use_count = 0;
+ __throw_bad_weak_ptr();
+ }
+ }
+
+ template<>
+ inline void
+ _Sp_counted_base<_S_atomic>::
+ _M_add_ref_lock()
+ {
+ // Perform lock-free add-if-not-zero operation.
+ _Atomic_word __count;
+ do
+ {
+ __count = _M_use_count;
+ if (__count == 0)
+ __throw_bad_weak_ptr();
+
+ // Replace the current counter value with the old value + 1, as
+ // long as it's not changed meanwhile.
+ }
+ while (!__sync_bool_compare_and_swap(&_M_use_count, __count,
+ __count + 1));
+ }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cctype b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cctype
new file mode 100644
index 0000000..c76d38c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cctype
@@ -0,0 +1,43 @@
+// TR1 cctype -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cctype
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_C99_CTYPE_TR1
+
+#undef isblank
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ using ::isblank;
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cfenv b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cfenv
new file mode 100644
index 0000000..3078c7d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cfenv
@@ -0,0 +1,70 @@
+// TR1 cfenv -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cfenv
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_C99_FENV_TR1
+
+#undef feclearexcept
+#undef fegetexceptflag
+#undef feraiseexcept
+#undef fesetexceptflag
+#undef fetestexcept
+#undef fegetround
+#undef fesetround
+#undef fegetenv
+#undef feholdexcept
+#undef fesetenv
+#undef feupdateenv
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // types
+ using ::fenv_t;
+ using ::fexcept_t;
+
+ // functions
+ using ::feclearexcept;
+ using ::fegetexceptflag;
+ using ::feraiseexcept;
+ using ::fesetexceptflag;
+ using ::fetestexcept;
+
+ using ::fegetround;
+ using ::fesetround;
+
+ using ::fegetenv;
+ using ::feholdexcept;
+ using ::fesetenv;
+ using ::feupdateenv;
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cinttypes b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cinttypes
new file mode 100644
index 0000000..4a0f9f1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cinttypes
@@ -0,0 +1,64 @@
+// TR1 cinttypes -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cinttypes
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_C99_INTTYPES_TR1
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // types
+ using ::imaxdiv_t;
+
+ // functions
+ using ::imaxabs;
+
+ // May collide with _Longlong abs(_Longlong), and is not described
+ // anywhere outside the synopsis. Likely, a defect.
+ //
+ // intmax_t abs(intmax_t)
+
+ using ::imaxdiv;
+
+ // Likewise, with lldiv_t div(_Longlong, _Longlong).
+ //
+ // imaxdiv_t div(intmax_t, intmax_t)
+
+ using ::strtoimax;
+ using ::strtoumax;
+
+#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
+ using ::wcstoimax;
+ using ::wcstoumax;
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cmath b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cmath
new file mode 100644
index 0000000..5807380
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cmath
@@ -0,0 +1,902 @@
+// TR1 cmath -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cmath
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+
+#undef acosh
+#undef acoshf
+#undef acoshl
+#undef asinh
+#undef asinhf
+#undef asinhl
+#undef atanh
+#undef atanhf
+#undef atanhl
+#undef cbrt
+#undef cbrtf
+#undef cbrtl
+#undef copysign
+#undef copysignf
+#undef copysignl
+#undef erf
+#undef erff
+#undef erfl
+#undef erfc
+#undef erfcf
+#undef erfcl
+#undef exp2
+#undef exp2f
+#undef exp2l
+#undef expm1
+#undef expm1f
+#undef expm1l
+#undef fdim
+#undef fdimf
+#undef fdiml
+#undef fma
+#undef fmaf
+#undef fmal
+#undef fmax
+#undef fmaxf
+#undef fmaxl
+#undef fmin
+#undef fminf
+#undef fminl
+#undef hypot
+#undef hypotf
+#undef hypotl
+#undef ilogb
+#undef ilogbf
+#undef ilogbl
+#undef lgamma
+#undef lgammaf
+#undef lgammal
+#undef llrint
+#undef llrintf
+#undef llrintl
+#undef llround
+#undef llroundf
+#undef llroundl
+#undef log1p
+#undef log1pf
+#undef log1pl
+#undef log2
+#undef log2f
+#undef log2l
+#undef logb
+#undef logbf
+#undef logbl
+#undef lrint
+#undef lrintf
+#undef lrintl
+#undef lround
+#undef lroundf
+#undef lroundl
+#undef nan
+#undef nanf
+#undef nanl
+#undef nearbyint
+#undef nearbyintf
+#undef nearbyintl
+#undef nextafter
+#undef nextafterf
+#undef nextafterl
+#undef nexttoward
+#undef nexttowardf
+#undef nexttowardl
+#undef remainder
+#undef remainderf
+#undef remainderl
+#undef remquo
+#undef remquof
+#undef remquol
+#undef rint
+#undef rintf
+#undef rintl
+#undef round
+#undef roundf
+#undef roundl
+#undef scalbln
+#undef scalblnf
+#undef scalblnl
+#undef scalbn
+#undef scalbnf
+#undef scalbnl
+#undef tgamma
+#undef tgammaf
+#undef tgammal
+#undef trunc
+#undef truncf
+#undef truncl
+
+#endif
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+
+ // types
+ using ::double_t;
+ using ::float_t;
+
+ // functions
+ using ::acosh;
+ using ::acoshf;
+ using ::acoshl;
+
+ using ::asinh;
+ using ::asinhf;
+ using ::asinhl;
+
+ using ::atanh;
+ using ::atanhf;
+ using ::atanhl;
+
+ using ::cbrt;
+ using ::cbrtf;
+ using ::cbrtl;
+
+ using ::copysign;
+ using ::copysignf;
+ using ::copysignl;
+
+ using ::erf;
+ using ::erff;
+ using ::erfl;
+
+ using ::erfc;
+ using ::erfcf;
+ using ::erfcl;
+
+ using ::exp2;
+ using ::exp2f;
+ using ::exp2l;
+
+ using ::expm1;
+ using ::expm1f;
+ using ::expm1l;
+
+ using ::fdim;
+ using ::fdimf;
+ using ::fdiml;
+
+ using ::fma;
+ using ::fmaf;
+ using ::fmal;
+
+ using ::fmax;
+ using ::fmaxf;
+ using ::fmaxl;
+
+ using ::fmin;
+ using ::fminf;
+ using ::fminl;
+
+ using ::hypot;
+ using ::hypotf;
+ using ::hypotl;
+
+ using ::ilogb;
+ using ::ilogbf;
+ using ::ilogbl;
+
+ using ::lgamma;
+ using ::lgammaf;
+ using ::lgammal;
+
+ using ::llrint;
+ using ::llrintf;
+ using ::llrintl;
+
+ using ::llround;
+ using ::llroundf;
+ using ::llroundl;
+
+ using ::log1p;
+ using ::log1pf;
+ using ::log1pl;
+
+ using ::log2;
+ using ::log2f;
+ using ::log2l;
+
+ using ::logb;
+ using ::logbf;
+ using ::logbl;
+
+ using ::lrint;
+ using ::lrintf;
+ using ::lrintl;
+
+ using ::lround;
+ using ::lroundf;
+ using ::lroundl;
+
+ using ::nan;
+ using ::nanf;
+ using ::nanl;
+
+ using ::nearbyint;
+ using ::nearbyintf;
+ using ::nearbyintl;
+
+ using ::nextafter;
+ using ::nextafterf;
+ using ::nextafterl;
+
+ using ::nexttoward;
+ using ::nexttowardf;
+ using ::nexttowardl;
+
+ using ::remainder;
+ using ::remainderf;
+ using ::remainderl;
+
+ using ::remquo;
+ using ::remquof;
+ using ::remquol;
+
+ using ::rint;
+ using ::rintf;
+ using ::rintl;
+
+ using ::round;
+ using ::roundf;
+ using ::roundl;
+
+ using ::scalbln;
+ using ::scalblnf;
+ using ::scalblnl;
+
+ using ::scalbn;
+ using ::scalbnf;
+ using ::scalbnl;
+
+ using ::tgamma;
+ using ::tgammaf;
+ using ::tgammal;
+
+ using ::trunc;
+ using ::truncf;
+ using ::truncl;
+
+#endif
+
+#if _GLIBCXX_USE_C99_MATH
+#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+
+ /// Function template definitions [8.16.3].
+ using std::signbit;
+
+ using std::fpclassify;
+
+ using std::isfinite;
+ using std::isinf;
+ using std::isnan;
+ using std::isnormal;
+
+ using std::isgreater;
+ using std::isgreaterequal;
+ using std::isless;
+ using std::islessequal;
+ using std::islessgreater;
+ using std::isunordered;
+#endif
+#endif
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+
+ /// Additional overloads [8.16.4].
+ using std::acos;
+
+ inline float
+ acosh(float __x)
+ { return __builtin_acoshf(__x); }
+
+ inline long double
+ acosh(long double __x)
+ { return __builtin_acoshl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ acosh(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return acosh(__type(__x));
+ }
+
+ using std::asin;
+
+ inline float
+ asinh(float __x)
+ { return __builtin_asinhf(__x); }
+
+ inline long double
+ asinh(long double __x)
+ { return __builtin_asinhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ asinh(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return asinh(__type(__x));
+ }
+
+ using std::atan;
+ using std::atan2;
+
+ inline float
+ atanh(float __x)
+ { return __builtin_atanhf(__x); }
+
+ inline long double
+ atanh(long double __x)
+ { return __builtin_atanhl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ atanh(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return atanh(__type(__x));
+ }
+
+ inline float
+ cbrt(float __x)
+ { return __builtin_cbrtf(__x); }
+
+ inline long double
+ cbrt(long double __x)
+ { return __builtin_cbrtl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ cbrt(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return cbrt(__type(__x));
+ }
+
+ using std::ceil;
+
+ inline float
+ copysign(float __x, float __y)
+ { return __builtin_copysignf(__x, __y); }
+
+ inline long double
+ copysign(long double __x, long double __y)
+ { return __builtin_copysignl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ copysign(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return copysign(__type(__x), __type(__y));
+ }
+
+ using std::cos;
+ using std::cosh;
+
+ inline float
+ erf(float __x)
+ { return __builtin_erff(__x); }
+
+ inline long double
+ erf(long double __x)
+ { return __builtin_erfl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ erf(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return erf(__type(__x));
+ }
+
+ inline float
+ erfc(float __x)
+ { return __builtin_erfcf(__x); }
+
+ inline long double
+ erfc(long double __x)
+ { return __builtin_erfcl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ erfc(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return erfc(__type(__x));
+ }
+
+ using std::exp;
+
+ inline float
+ exp2(float __x)
+ { return __builtin_exp2f(__x); }
+
+ inline long double
+ exp2(long double __x)
+ { return __builtin_exp2l(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ exp2(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return exp2(__type(__x));
+ }
+
+ inline float
+ expm1(float __x)
+ { return __builtin_expm1f(__x); }
+
+ inline long double
+ expm1(long double __x)
+ { return __builtin_expm1l(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ expm1(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return expm1(__type(__x));
+ }
+
+ using std::fabs;
+
+ inline float
+ fdim(float __x, float __y)
+ { return __builtin_fdimf(__x, __y); }
+
+ inline long double
+ fdim(long double __x, long double __y)
+ { return __builtin_fdiml(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fdim(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fdim(__type(__x), __type(__y));
+ }
+
+ using std::floor;
+
+ inline float
+ fma(float __x, float __y, float __z)
+ { return __builtin_fmaf(__x, __y, __z); }
+
+ inline long double
+ fma(long double __x, long double __y, long double __z)
+ { return __builtin_fmal(__x, __y, __z); }
+
+ template<typename _Tp, typename _Up, typename _Vp>
+ inline typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
+ fma(_Tp __x, _Up __y, _Vp __z)
+ {
+ typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type;
+ return fma(__type(__x), __type(__y), __type(__z));
+ }
+
+ inline float
+ fmax(float __x, float __y)
+ { return __builtin_fmaxf(__x, __y); }
+
+ inline long double
+ fmax(long double __x, long double __y)
+ { return __builtin_fmaxl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fmax(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fmax(__type(__x), __type(__y));
+ }
+
+ inline float
+ fmin(float __x, float __y)
+ { return __builtin_fminf(__x, __y); }
+
+ inline long double
+ fmin(long double __x, long double __y)
+ { return __builtin_fminl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ fmin(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return fmin(__type(__x), __type(__y));
+ }
+
+ using std::fmod;
+ using std::frexp;
+
+ inline float
+ hypot(float __x, float __y)
+ { return __builtin_hypotf(__x, __y); }
+
+ inline long double
+ hypot(long double __x, long double __y)
+ { return __builtin_hypotl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ hypot(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return hypot(__type(__x), __type(__y));
+ }
+
+ inline int
+ ilogb(float __x)
+ { return __builtin_ilogbf(__x); }
+
+ inline int
+ ilogb(long double __x)
+ { return __builtin_ilogbl(__x); }
+
+ template<typename _Tp>
+ inline int
+ ilogb(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return ilogb(__type(__x));
+ }
+
+ using std::ldexp;
+
+ inline float
+ lgamma(float __x)
+ { return __builtin_lgammaf(__x); }
+
+ inline long double
+ lgamma(long double __x)
+ { return __builtin_lgammal(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ lgamma(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return lgamma(__type(__x));
+ }
+
+ inline long long
+ llrint(float __x)
+ { return __builtin_llrintf(__x); }
+
+ inline long long
+ llrint(long double __x)
+ { return __builtin_llrintl(__x); }
+
+ template<typename _Tp>
+ inline long long
+ llrint(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return llrint(__type(__x));
+ }
+
+ inline long long
+ llround(float __x)
+ { return __builtin_llroundf(__x); }
+
+ inline long long
+ llround(long double __x)
+ { return __builtin_llroundl(__x); }
+
+ template<typename _Tp>
+ inline long long
+ llround(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return llround(__type(__x));
+ }
+
+ using std::log;
+ using std::log10;
+
+ inline float
+ log1p(float __x)
+ { return __builtin_log1pf(__x); }
+
+ inline long double
+ log1p(long double __x)
+ { return __builtin_log1pl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ log1p(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return log1p(__type(__x));
+ }
+
+ // DR 568.
+ inline float
+ log2(float __x)
+ { return __builtin_log2f(__x); }
+
+ inline long double
+ log2(long double __x)
+ { return __builtin_log2l(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ log2(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return log2(__type(__x));
+ }
+
+ inline float
+ logb(float __x)
+ { return __builtin_logbf(__x); }
+
+ inline long double
+ logb(long double __x)
+ { return __builtin_logbl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ logb(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return logb(__type(__x));
+ }
+
+ inline long
+ lrint(float __x)
+ { return __builtin_lrintf(__x); }
+
+ inline long
+ lrint(long double __x)
+ { return __builtin_lrintl(__x); }
+
+ template<typename _Tp>
+ inline long
+ lrint(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return lrint(__type(__x));
+ }
+
+ inline long
+ lround(float __x)
+ { return __builtin_lroundf(__x); }
+
+ inline long
+ lround(long double __x)
+ { return __builtin_lroundl(__x); }
+
+ template<typename _Tp>
+ inline long
+ lround(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return lround(__type(__x));
+ }
+
+ inline float
+ nearbyint(float __x)
+ { return __builtin_nearbyintf(__x); }
+
+ inline long double
+ nearbyint(long double __x)
+ { return __builtin_nearbyintl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ nearbyint(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return nearbyint(__type(__x));
+ }
+
+ inline float
+ nextafter(float __x, float __y)
+ { return __builtin_nextafterf(__x, __y); }
+
+ inline long double
+ nextafter(long double __x, long double __y)
+ { return __builtin_nextafterl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ nextafter(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return nextafter(__type(__x), __type(__y));
+ }
+
+ inline float
+ nexttoward(float __x, long double __y)
+ { return __builtin_nexttowardf(__x, __y); }
+
+ inline long double
+ nexttoward(long double __x, long double __y)
+ { return __builtin_nexttowardl(__x, __y); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ nexttoward(_Tp __x, long double __y)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return nexttoward(__type(__x), __y);
+ }
+
+ // DR 550. What should the return type of pow(float,int) be?
+ // NB: C++0x and TR1 != C++03.
+ // using std::pow;
+
+ inline float
+ remainder(float __x, float __y)
+ { return __builtin_remainderf(__x, __y); }
+
+ inline long double
+ remainder(long double __x, long double __y)
+ { return __builtin_remainderl(__x, __y); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ remainder(_Tp __x, _Up __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return remainder(__type(__x), __type(__y));
+ }
+
+ inline float
+ remquo(float __x, float __y, int* __pquo)
+ { return __builtin_remquof(__x, __y, __pquo); }
+
+ inline long double
+ remquo(long double __x, long double __y, int* __pquo)
+ { return __builtin_remquol(__x, __y, __pquo); }
+
+ template<typename _Tp, typename _Up>
+ inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
+ remquo(_Tp __x, _Up __y, int* __pquo)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return remquo(__type(__x), __type(__y), __pquo);
+ }
+
+ inline float
+ rint(float __x)
+ { return __builtin_rintf(__x); }
+
+ inline long double
+ rint(long double __x)
+ { return __builtin_rintl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ rint(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return rint(__type(__x));
+ }
+
+ inline float
+ round(float __x)
+ { return __builtin_roundf(__x); }
+
+ inline long double
+ round(long double __x)
+ { return __builtin_roundl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ round(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return round(__type(__x));
+ }
+
+ inline float
+ scalbln(float __x, long __ex)
+ { return __builtin_scalblnf(__x, __ex); }
+
+ inline long double
+ scalbln(long double __x, long __ex)
+ { return __builtin_scalblnl(__x, __ex); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ scalbln(_Tp __x, long __ex)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return scalbln(__type(__x), __ex);
+ }
+
+ inline float
+ scalbn(float __x, int __ex)
+ { return __builtin_scalbnf(__x, __ex); }
+
+ inline long double
+ scalbn(long double __x, int __ex)
+ { return __builtin_scalbnl(__x, __ex); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ scalbn(_Tp __x, int __ex)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return scalbn(__type(__x), __ex);
+ }
+
+ using std::sin;
+ using std::sinh;
+ using std::sqrt;
+ using std::tan;
+ using std::tanh;
+
+ inline float
+ tgamma(float __x)
+ { return __builtin_tgammaf(__x); }
+
+ inline long double
+ tgamma(long double __x)
+ { return __builtin_tgammal(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ tgamma(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return tgamma(__type(__x));
+ }
+
+ inline float
+ trunc(float __x)
+ { return __builtin_truncf(__x); }
+
+ inline long double
+ trunc(long double __x)
+ { return __builtin_truncl(__x); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ trunc(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return trunc(__type(__x));
+ }
+
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/complex b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/complex
new file mode 100644
index 0000000..615fe18
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/complex
@@ -0,0 +1,370 @@
+// TR1 complex -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/complex
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ /**
+ * @addtogroup complex_numbers
+ * @{
+ */
+
+ // Forward declarations.
+ template<typename _Tp> std::complex<_Tp> acos(const std::complex<_Tp>&);
+ template<typename _Tp> std::complex<_Tp> asin(const std::complex<_Tp>&);
+ template<typename _Tp> std::complex<_Tp> atan(const std::complex<_Tp>&);
+
+ template<typename _Tp> std::complex<_Tp> acosh(const std::complex<_Tp>&);
+ template<typename _Tp> std::complex<_Tp> asinh(const std::complex<_Tp>&);
+ template<typename _Tp> std::complex<_Tp> atanh(const std::complex<_Tp>&);
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ // DR 595.
+ template<typename _Tp> _Tp fabs(const std::complex<_Tp>&);
+#else
+ template<typename _Tp> std::complex<_Tp> fabs(const std::complex<_Tp>&);
+#endif
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ __complex_acos(const std::complex<_Tp>& __z)
+ {
+ const std::complex<_Tp> __t = std::_GLIBCXX_TR1 asin(__z);
+ const _Tp __pi_2 = 1.5707963267948966192313216916397514L;
+ return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag());
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_acos(__complex__ float __z)
+ { return __builtin_cacosf(__z); }
+
+ inline __complex__ double
+ __complex_acos(__complex__ double __z)
+ { return __builtin_cacos(__z); }
+
+ inline __complex__ long double
+ __complex_acos(const __complex__ long double& __z)
+ { return __builtin_cacosl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ acos(const std::complex<_Tp>& __z)
+ { return __complex_acos(__z.__rep()); }
+#else
+ /// acos(__z) [8.1.2].
+ // Effects: Behaves the same as C99 function cacos, defined
+ // in subclause 7.3.5.1.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ acos(const std::complex<_Tp>& __z)
+ { return __complex_acos(__z); }
+#endif
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ __complex_asin(const std::complex<_Tp>& __z)
+ {
+ std::complex<_Tp> __t(-__z.imag(), __z.real());
+ __t = std::_GLIBCXX_TR1 asinh(__t);
+ return std::complex<_Tp>(__t.imag(), -__t.real());
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_asin(__complex__ float __z)
+ { return __builtin_casinf(__z); }
+
+ inline __complex__ double
+ __complex_asin(__complex__ double __z)
+ { return __builtin_casin(__z); }
+
+ inline __complex__ long double
+ __complex_asin(const __complex__ long double& __z)
+ { return __builtin_casinl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ asin(const std::complex<_Tp>& __z)
+ { return __complex_asin(__z.__rep()); }
+#else
+ /// asin(__z) [8.1.3].
+ // Effects: Behaves the same as C99 function casin, defined
+ // in subclause 7.3.5.2.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ asin(const std::complex<_Tp>& __z)
+ { return __complex_asin(__z); }
+#endif
+
+ template<typename _Tp>
+ std::complex<_Tp>
+ __complex_atan(const std::complex<_Tp>& __z)
+ {
+ const _Tp __r2 = __z.real() * __z.real();
+ const _Tp __x = _Tp(1.0) - __r2 - __z.imag() * __z.imag();
+
+ _Tp __num = __z.imag() + _Tp(1.0);
+ _Tp __den = __z.imag() - _Tp(1.0);
+
+ __num = __r2 + __num * __num;
+ __den = __r2 + __den * __den;
+
+ return std::complex<_Tp>(_Tp(0.5) * atan2(_Tp(2.0) * __z.real(), __x),
+ _Tp(0.25) * log(__num / __den));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_atan(__complex__ float __z)
+ { return __builtin_catanf(__z); }
+
+ inline __complex__ double
+ __complex_atan(__complex__ double __z)
+ { return __builtin_catan(__z); }
+
+ inline __complex__ long double
+ __complex_atan(const __complex__ long double& __z)
+ { return __builtin_catanl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ atan(const std::complex<_Tp>& __z)
+ { return __complex_atan(__z.__rep()); }
+#else
+ /// atan(__z) [8.1.4].
+ // Effects: Behaves the same as C99 function catan, defined
+ // in subclause 7.3.5.3.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ atan(const std::complex<_Tp>& __z)
+ { return __complex_atan(__z); }
+#endif
+
+ template<typename _Tp>
+ std::complex<_Tp>
+ __complex_acosh(const std::complex<_Tp>& __z)
+ {
+ std::complex<_Tp> __t((__z.real() - __z.imag())
+ * (__z.real() + __z.imag()) - _Tp(1.0),
+ _Tp(2.0) * __z.real() * __z.imag());
+ __t = std::sqrt(__t);
+
+ return std::log(__t + __z);
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_acosh(__complex__ float __z)
+ { return __builtin_cacoshf(__z); }
+
+ inline __complex__ double
+ __complex_acosh(__complex__ double __z)
+ { return __builtin_cacosh(__z); }
+
+ inline __complex__ long double
+ __complex_acosh(const __complex__ long double& __z)
+ { return __builtin_cacoshl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ acosh(const std::complex<_Tp>& __z)
+ { return __complex_acosh(__z.__rep()); }
+#else
+ /// acosh(__z) [8.1.5].
+ // Effects: Behaves the same as C99 function cacosh, defined
+ // in subclause 7.3.6.1.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ acosh(const std::complex<_Tp>& __z)
+ { return __complex_acosh(__z); }
+#endif
+
+ template<typename _Tp>
+ std::complex<_Tp>
+ __complex_asinh(const std::complex<_Tp>& __z)
+ {
+ std::complex<_Tp> __t((__z.real() - __z.imag())
+ * (__z.real() + __z.imag()) + _Tp(1.0),
+ _Tp(2.0) * __z.real() * __z.imag());
+ __t = std::sqrt(__t);
+
+ return std::log(__t + __z);
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_asinh(__complex__ float __z)
+ { return __builtin_casinhf(__z); }
+
+ inline __complex__ double
+ __complex_asinh(__complex__ double __z)
+ { return __builtin_casinh(__z); }
+
+ inline __complex__ long double
+ __complex_asinh(const __complex__ long double& __z)
+ { return __builtin_casinhl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ asinh(const std::complex<_Tp>& __z)
+ { return __complex_asinh(__z.__rep()); }
+#else
+ /// asinh(__z) [8.1.6].
+ // Effects: Behaves the same as C99 function casin, defined
+ // in subclause 7.3.6.2.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ asinh(const std::complex<_Tp>& __z)
+ { return __complex_asinh(__z); }
+#endif
+
+ template<typename _Tp>
+ std::complex<_Tp>
+ __complex_atanh(const std::complex<_Tp>& __z)
+ {
+ const _Tp __i2 = __z.imag() * __z.imag();
+ const _Tp __x = _Tp(1.0) - __i2 - __z.real() * __z.real();
+
+ _Tp __num = _Tp(1.0) + __z.real();
+ _Tp __den = _Tp(1.0) - __z.real();
+
+ __num = __i2 + __num * __num;
+ __den = __i2 + __den * __den;
+
+ return std::complex<_Tp>(_Tp(0.25) * (log(__num) - log(__den)),
+ _Tp(0.5) * atan2(_Tp(2.0) * __z.imag(), __x));
+ }
+
+#if _GLIBCXX_USE_C99_COMPLEX_TR1
+ inline __complex__ float
+ __complex_atanh(__complex__ float __z)
+ { return __builtin_catanhf(__z); }
+
+ inline __complex__ double
+ __complex_atanh(__complex__ double __z)
+ { return __builtin_catanh(__z); }
+
+ inline __complex__ long double
+ __complex_atanh(const __complex__ long double& __z)
+ { return __builtin_catanhl(__z); }
+
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ atanh(const std::complex<_Tp>& __z)
+ { return __complex_atanh(__z.__rep()); }
+#else
+ /// atanh(__z) [8.1.7].
+ // Effects: Behaves the same as C99 function catanh, defined
+ // in subclause 7.3.6.3.
+ template<typename _Tp>
+ inline std::complex<_Tp>
+ atanh(const std::complex<_Tp>& __z)
+ { return __complex_atanh(__z); }
+#endif
+
+ template<typename _Tp>
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ inline _Tp
+#else
+ inline std::complex<_Tp>
+#endif
+ /// fabs(__z) [8.1.8].
+ // Effects: Behaves the same as C99 function cabs, defined
+ // in subclause 7.3.8.1.
+ fabs(const std::complex<_Tp>& __z)
+ { return std::abs(__z); }
+
+ /// Additional overloads [8.1.9].
+#if (defined(_GLIBCXX_INCLUDE_AS_CXX0X) \
+ || (defined(_GLIBCXX_INCLUDE_AS_TR1) \
+ && !defined(__GXX_EXPERIMENTAL_CXX0X__)))
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ arg(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return std::arg(std::complex<__type>(__x));
+ }
+
+ template<typename _Tp>
+ inline std::complex<typename __gnu_cxx::__promote<_Tp>::__type>
+ conj(_Tp __x)
+ { return __x; }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ imag(_Tp)
+ { return _Tp(); }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ norm(_Tp __x)
+ {
+ typedef typename __gnu_cxx::__promote<_Tp>::__type __type;
+ return __type(__x) * __type(__x);
+ }
+
+ template<typename _Tp>
+ inline typename __gnu_cxx::__promote<_Tp>::__type
+ real(_Tp __x)
+ { return __x; }
+
+#endif
+
+ template<typename _Tp, typename _Up>
+ inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type>
+ pow(const std::complex<_Tp>& __x, const _Up& __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return std::pow(std::complex<__type>(__x), __type(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type>
+ pow(const _Tp& __x, const std::complex<_Up>& __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return std::pow(__type(__x), std::complex<__type>(__y));
+ }
+
+ template<typename _Tp, typename _Up>
+ inline std::complex<typename __gnu_cxx::__promote_2<_Tp, _Up>::__type>
+ pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y)
+ {
+ typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
+ return std::pow(std::complex<__type>(__x),
+ std::complex<__type>(__y));
+ }
+
+ // @} group complex_numbers
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdint b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdint
new file mode 100644
index 0000000..d140388
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdint
@@ -0,0 +1,75 @@
+// TR1 cstdint -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cstdint
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_C99_STDINT_TR1
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ using ::int8_t;
+ using ::int16_t;
+ using ::int32_t;
+ using ::int64_t;
+
+ using ::int_fast8_t;
+ using ::int_fast16_t;
+ using ::int_fast32_t;
+ using ::int_fast64_t;
+
+ using ::int_least8_t;
+ using ::int_least16_t;
+ using ::int_least32_t;
+ using ::int_least64_t;
+
+ using ::intmax_t;
+ using ::intptr_t;
+
+ using ::uint8_t;
+ using ::uint16_t;
+ using ::uint32_t;
+ using ::uint64_t;
+
+ using ::uint_fast8_t;
+ using ::uint_fast16_t;
+ using ::uint_fast32_t;
+ using ::uint_fast64_t;
+
+ using ::uint_least8_t;
+ using ::uint_least16_t;
+ using ::uint_least32_t;
+ using ::uint_least64_t;
+
+ using ::uintmax_t;
+ using ::uintptr_t;
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdio b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdio
new file mode 100644
index 0000000..8b100cc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdio
@@ -0,0 +1,44 @@
+// TR1 cstdio -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cstdio
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+#if _GLIBCXX_USE_C99
+ using std::snprintf;
+ using std::vsnprintf;
+
+ using std::vfscanf;
+ using std::vscanf;
+ using std::vsscanf;
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdlib b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdlib
new file mode 100644
index 0000000..e9a590f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cstdlib
@@ -0,0 +1,65 @@
+// TR1 cstdlib -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cstdlib
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_HOSTED
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+#if _GLIBCXX_USE_C99
+
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ // types
+ using std::lldiv_t;
+
+ // functions
+ using std::llabs;
+ using std::lldiv;
+#endif
+
+ using std::atoll;
+ using std::strtoll;
+ using std::strtoull;
+
+ using std::strtof;
+ using std::strtold;
+
+ // overloads
+ using std::abs;
+#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
+ using std::div;
+#endif
+
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwchar b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwchar
new file mode 100644
index 0000000..2a9004d
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwchar
@@ -0,0 +1,58 @@
+// TR1 cwchar -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cwchar
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_WCHAR_T
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+#if _GLIBCXX_HAVE_WCSTOF
+ using std::wcstof;
+#endif
+#if _GLIBCXX_HAVE_VFWSCANF
+ using std::vfwscanf;
+#endif
+#if _GLIBCXX_HAVE_VSWSCANF
+ using std::vswscanf;
+#endif
+#if _GLIBCXX_HAVE_VWSCANF
+ using std::vwscanf;
+#endif
+
+#if _GLIBCXX_USE_C99
+ using std::wcstold;
+ using std::wcstoll;
+ using std::wcstoull;
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwctype b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwctype
new file mode 100644
index 0000000..3135d36
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/cwctype
@@ -0,0 +1,43 @@
+// TR1 cwctype -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/cwctype
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#if _GLIBCXX_USE_WCHAR_T
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+#if _GLIBCXX_HAVE_ISWBLANK
+ using std::iswblank;
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional
new file mode 100644
index 0000000..7e6eaeb
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional
@@ -0,0 +1,2130 @@
+// TR1 functional header -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/functional
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ template<typename _MemberPointer>
+ class _Mem_fn;
+
+ /**
+ * Actual implementation of _Has_result_type, which uses SFINAE to
+ * determine if the type _Tp has a publicly-accessible member type
+ * result_type.
+ */
+ template<typename _Tp>
+ class _Has_result_type_helper : __sfinae_types
+ {
+ template<typename _Up>
+ struct _Wrap_type
+ { };
+
+ template<typename _Up>
+ static __one __test(_Wrap_type<typename _Up::result_type>*);
+
+ template<typename _Up>
+ static __two __test(...);
+
+ public:
+ static const bool value = sizeof(__test<_Tp>(0)) == 1;
+ };
+
+ template<typename _Tp>
+ struct _Has_result_type
+ : integral_constant<bool,
+ _Has_result_type_helper<typename remove_cv<_Tp>::type>::value>
+ { };
+
+ /**
+ *
+ */
+ /// If we have found a result_type, extract it.
+ template<bool _Has_result_type, typename _Functor>
+ struct _Maybe_get_result_type
+ { };
+
+ template<typename _Functor>
+ struct _Maybe_get_result_type<true, _Functor>
+ {
+ typedef typename _Functor::result_type result_type;
+ };
+
+ /**
+ * Base class for any function object that has a weak result type, as
+ * defined in 3.3/3 of TR1.
+ */
+ template<typename _Functor>
+ struct _Weak_result_type_impl
+ : _Maybe_get_result_type<_Has_result_type<_Functor>::value, _Functor>
+ {
+ };
+
+ /// Retrieve the result type for a function type.
+ template<typename _Res, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res(_ArgTypes...)>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve the result type for a function reference.
+ template<typename _Res, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve the result type for a function pointer.
+ template<typename _Res, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve result type for a member function pointer.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve result type for a const member function pointer.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve result type for a volatile member function pointer.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile>
+ {
+ typedef _Res result_type;
+ };
+
+ /// Retrieve result type for a const volatile member function pointer.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)const volatile>
+ {
+ typedef _Res result_type;
+ };
+
+ /**
+ * Strip top-level cv-qualifiers from the function object and let
+ * _Weak_result_type_impl perform the real work.
+ */
+ template<typename _Functor>
+ struct _Weak_result_type
+ : _Weak_result_type_impl<typename remove_cv<_Functor>::type>
+ {
+ };
+
+ template<typename _Signature>
+ class result_of;
+
+ /**
+ * Actual implementation of result_of. When _Has_result_type is
+ * true, gets its result from _Weak_result_type. Otherwise, uses
+ * the function object's member template result to extract the
+ * result type.
+ */
+ template<bool _Has_result_type, typename _Signature>
+ struct _Result_of_impl;
+
+ // Handle member data pointers using _Mem_fn's logic
+ template<typename _Res, typename _Class, typename _T1>
+ struct _Result_of_impl<false, _Res _Class::*(_T1)>
+ {
+ typedef typename _Mem_fn<_Res _Class::*>
+ ::template _Result_type<_T1>::type type;
+ };
+
+ /**
+ * Determine whether we can determine a result type from @c Functor
+ * alone.
+ */
+ template<typename _Functor, typename... _ArgTypes>
+ class result_of<_Functor(_ArgTypes...)>
+ : public _Result_of_impl<
+ _Has_result_type<_Weak_result_type<_Functor> >::value,
+ _Functor(_ArgTypes...)>
+ {
+ };
+
+ /// We already know the result type for @c Functor; use it.
+ template<typename _Functor, typename... _ArgTypes>
+ struct _Result_of_impl<true, _Functor(_ArgTypes...)>
+ {
+ typedef typename _Weak_result_type<_Functor>::result_type type;
+ };
+
+ /**
+ * We need to compute the result type for this invocation the hard
+ * way.
+ */
+ template<typename _Functor, typename... _ArgTypes>
+ struct _Result_of_impl<false, _Functor(_ArgTypes...)>
+ {
+ typedef typename _Functor
+ ::template result<_Functor(_ArgTypes...)>::type type;
+ };
+
+ /**
+ * It is unsafe to access ::result when there are zero arguments, so we
+ * return @c void instead.
+ */
+ template<typename _Functor>
+ struct _Result_of_impl<false, _Functor()>
+ {
+ typedef void type;
+ };
+
+ /// Determines if the type _Tp derives from unary_function.
+ template<typename _Tp>
+ struct _Derives_from_unary_function : __sfinae_types
+ {
+ private:
+ template<typename _T1, typename _Res>
+ static __one __test(const volatile unary_function<_T1, _Res>*);
+
+ // It's tempting to change "..." to const volatile void*, but
+ // that fails when _Tp is a function type.
+ static __two __test(...);
+
+ public:
+ static const bool value = sizeof(__test((_Tp*)0)) == 1;
+ };
+
+ /// Determines if the type _Tp derives from binary_function.
+ template<typename _Tp>
+ struct _Derives_from_binary_function : __sfinae_types
+ {
+ private:
+ template<typename _T1, typename _T2, typename _Res>
+ static __one __test(const volatile binary_function<_T1, _T2, _Res>*);
+
+ // It's tempting to change "..." to const volatile void*, but
+ // that fails when _Tp is a function type.
+ static __two __test(...);
+
+ public:
+ static const bool value = sizeof(__test((_Tp*)0)) == 1;
+ };
+
+ /// Turns a function type into a function pointer type
+ template<typename _Tp, bool _IsFunctionType = is_function<_Tp>::value>
+ struct _Function_to_function_pointer
+ {
+ typedef _Tp type;
+ };
+
+ template<typename _Tp>
+ struct _Function_to_function_pointer<_Tp, true>
+ {
+ typedef _Tp* type;
+ };
+
+ /**
+ * Invoke a function object, which may be either a member pointer or a
+ * function object. The first parameter will tell which.
+ */
+ template<typename _Functor, typename... _Args>
+ inline
+ typename __gnu_cxx::__enable_if<
+ (!is_member_pointer<_Functor>::value
+ && !is_function<_Functor>::value
+ && !is_function<typename remove_pointer<_Functor>::type>::value),
+ typename result_of<_Functor(_Args...)>::type
+ >::__type
+ __invoke(_Functor& __f, _Args&... __args)
+ {
+ return __f(__args...);
+ }
+
+ template<typename _Functor, typename... _Args>
+ inline
+ typename __gnu_cxx::__enable_if<
+ (is_member_pointer<_Functor>::value
+ && !is_function<_Functor>::value
+ && !is_function<typename remove_pointer<_Functor>::type>::value),
+ typename result_of<_Functor(_Args...)>::type
+ >::__type
+ __invoke(_Functor& __f, _Args&... __args)
+ {
+ return mem_fn(__f)(__args...);
+ }
+
+ // To pick up function references (that will become function pointers)
+ template<typename _Functor, typename... _Args>
+ inline
+ typename __gnu_cxx::__enable_if<
+ (is_pointer<_Functor>::value
+ && is_function<typename remove_pointer<_Functor>::type>::value),
+ typename result_of<_Functor(_Args...)>::type
+ >::__type
+ __invoke(_Functor __f, _Args&... __args)
+ {
+ return __f(__args...);
+ }
+
+ /**
+ * Knowing which of unary_function and binary_function _Tp derives
+ * from, derives from the same and ensures that reference_wrapper
+ * will have a weak result type. See cases below.
+ */
+ template<bool _Unary, bool _Binary, typename _Tp>
+ struct _Reference_wrapper_base_impl;
+
+ // Not a unary_function or binary_function, so try a weak result type.
+ template<typename _Tp>
+ struct _Reference_wrapper_base_impl<false, false, _Tp>
+ : _Weak_result_type<_Tp>
+ { };
+
+ // unary_function but not binary_function
+ template<typename _Tp>
+ struct _Reference_wrapper_base_impl<true, false, _Tp>
+ : unary_function<typename _Tp::argument_type,
+ typename _Tp::result_type>
+ { };
+
+ // binary_function but not unary_function
+ template<typename _Tp>
+ struct _Reference_wrapper_base_impl<false, true, _Tp>
+ : binary_function<typename _Tp::first_argument_type,
+ typename _Tp::second_argument_type,
+ typename _Tp::result_type>
+ { };
+
+ // Both unary_function and binary_function. Import result_type to
+ // avoid conflicts.
+ template<typename _Tp>
+ struct _Reference_wrapper_base_impl<true, true, _Tp>
+ : unary_function<typename _Tp::argument_type,
+ typename _Tp::result_type>,
+ binary_function<typename _Tp::first_argument_type,
+ typename _Tp::second_argument_type,
+ typename _Tp::result_type>
+ {
+ typedef typename _Tp::result_type result_type;
+ };
+
+ /**
+ * Derives from unary_function or binary_function when it
+ * can. Specializations handle all of the easy cases. The primary
+ * template determines what to do with a class type, which may
+ * derive from both unary_function and binary_function.
+ */
+ template<typename _Tp>
+ struct _Reference_wrapper_base
+ : _Reference_wrapper_base_impl<
+ _Derives_from_unary_function<_Tp>::value,
+ _Derives_from_binary_function<_Tp>::value,
+ _Tp>
+ { };
+
+ // - a function type (unary)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res(_T1)>
+ : unary_function<_T1, _Res>
+ { };
+
+ // - a function type (binary)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res(_T1, _T2)>
+ : binary_function<_T1, _T2, _Res>
+ { };
+
+ // - a function pointer type (unary)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res(*)(_T1)>
+ : unary_function<_T1, _Res>
+ { };
+
+ // - a function pointer type (binary)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res(*)(_T1, _T2)>
+ : binary_function<_T1, _T2, _Res>
+ { };
+
+ // - a pointer to member function type (unary, no qualifiers)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res (_T1::*)()>
+ : unary_function<_T1*, _Res>
+ { };
+
+ // - a pointer to member function type (binary, no qualifiers)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res (_T1::*)(_T2)>
+ : binary_function<_T1*, _T2, _Res>
+ { };
+
+ // - a pointer to member function type (unary, const)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res (_T1::*)() const>
+ : unary_function<const _T1*, _Res>
+ { };
+
+ // - a pointer to member function type (binary, const)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const>
+ : binary_function<const _T1*, _T2, _Res>
+ { };
+
+ // - a pointer to member function type (unary, volatile)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res (_T1::*)() volatile>
+ : unary_function<volatile _T1*, _Res>
+ { };
+
+ // - a pointer to member function type (binary, volatile)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile>
+ : binary_function<volatile _T1*, _T2, _Res>
+ { };
+
+ // - a pointer to member function type (unary, const volatile)
+ template<typename _Res, typename _T1>
+ struct _Reference_wrapper_base<_Res (_T1::*)() const volatile>
+ : unary_function<const volatile _T1*, _Res>
+ { };
+
+ // - a pointer to member function type (binary, const volatile)
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile>
+ : binary_function<const volatile _T1*, _T2, _Res>
+ { };
+
+ /// reference_wrapper
+ template<typename _Tp>
+ class reference_wrapper
+ : public _Reference_wrapper_base<typename remove_cv<_Tp>::type>
+ {
+ // If _Tp is a function type, we can't form result_of<_Tp(...)>,
+ // so turn it into a function pointer type.
+ typedef typename _Function_to_function_pointer<_Tp>::type
+ _M_func_type;
+
+ _Tp* _M_data;
+ public:
+ typedef _Tp type;
+
+ explicit
+ reference_wrapper(_Tp& __indata): _M_data(&__indata)
+ { }
+
+ reference_wrapper(const reference_wrapper<_Tp>& __inref):
+ _M_data(__inref._M_data)
+ { }
+
+ reference_wrapper&
+ operator=(const reference_wrapper<_Tp>& __inref)
+ {
+ _M_data = __inref._M_data;
+ return *this;
+ }
+
+ operator _Tp&() const
+ { return this->get(); }
+
+ _Tp&
+ get() const
+ { return *_M_data; }
+
+ template<typename... _Args>
+ typename result_of<_M_func_type(_Args...)>::type
+ operator()(_Args&... __args) const
+ {
+ return __invoke(get(), __args...);
+ }
+ };
+
+
+ // Denotes a reference should be taken to a variable.
+ template<typename _Tp>
+ inline reference_wrapper<_Tp>
+ ref(_Tp& __t)
+ { return reference_wrapper<_Tp>(__t); }
+
+ // Denotes a const reference should be taken to a variable.
+ template<typename _Tp>
+ inline reference_wrapper<const _Tp>
+ cref(const _Tp& __t)
+ { return reference_wrapper<const _Tp>(__t); }
+
+ template<typename _Tp>
+ inline reference_wrapper<_Tp>
+ ref(reference_wrapper<_Tp> __t)
+ { return ref(__t.get()); }
+
+ template<typename _Tp>
+ inline reference_wrapper<const _Tp>
+ cref(reference_wrapper<_Tp> __t)
+ { return cref(__t.get()); }
+
+ template<typename _Tp, bool>
+ struct _Mem_fn_const_or_non
+ {
+ typedef const _Tp& type;
+ };
+
+ template<typename _Tp>
+ struct _Mem_fn_const_or_non<_Tp, false>
+ {
+ typedef _Tp& type;
+ };
+
+ /**
+ * Derives from @c unary_function or @c binary_function, or perhaps
+ * nothing, depending on the number of arguments provided. The
+ * primary template is the basis case, which derives nothing.
+ */
+ template<typename _Res, typename... _ArgTypes>
+ struct _Maybe_unary_or_binary_function { };
+
+ /// Derives from @c unary_function, as appropriate.
+ template<typename _Res, typename _T1>
+ struct _Maybe_unary_or_binary_function<_Res, _T1>
+ : std::unary_function<_T1, _Res> { };
+
+ /// Derives from @c binary_function, as appropriate.
+ template<typename _Res, typename _T1, typename _T2>
+ struct _Maybe_unary_or_binary_function<_Res, _T1, _T2>
+ : std::binary_function<_T1, _T2, _Res> { };
+
+ /// Implementation of @c mem_fn for member function pointers.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ class _Mem_fn<_Res (_Class::*)(_ArgTypes...)>
+ : public _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>
+ {
+ typedef _Res (_Class::*_Functor)(_ArgTypes...);
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __object, const volatile _Class *,
+ _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
+ { return ((*__ptr).*__pmf)(__args...); }
+
+ public:
+ typedef _Res result_type;
+
+ explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
+
+ // Handle objects
+ _Res
+ operator()(_Class& __object, _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ // Handle pointers
+ _Res
+ operator()(_Class* __object, _ArgTypes... __args) const
+ { return (__object->*__pmf)(__args...); }
+
+ // Handle smart pointers, references and pointers to derived
+ template<typename _Tp>
+ _Res
+ operator()(_Tp& __object, _ArgTypes... __args) const
+ { return _M_call(__object, &__object, __args...); }
+
+ private:
+ _Functor __pmf;
+ };
+
+ /// Implementation of @c mem_fn for const member function pointers.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const>
+ : public _Maybe_unary_or_binary_function<_Res, const _Class*,
+ _ArgTypes...>
+ {
+ typedef _Res (_Class::*_Functor)(_ArgTypes...) const;
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __object, const volatile _Class *,
+ _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
+ { return ((*__ptr).*__pmf)(__args...); }
+
+ public:
+ typedef _Res result_type;
+
+ explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
+
+ // Handle objects
+ _Res
+ operator()(const _Class& __object, _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ // Handle pointers
+ _Res
+ operator()(const _Class* __object, _ArgTypes... __args) const
+ { return (__object->*__pmf)(__args...); }
+
+ // Handle smart pointers, references and pointers to derived
+ template<typename _Tp>
+ _Res operator()(_Tp& __object, _ArgTypes... __args) const
+ { return _M_call(__object, &__object, __args...); }
+
+ private:
+ _Functor __pmf;
+ };
+
+ /// Implementation of @c mem_fn for volatile member function pointers.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ class _Mem_fn<_Res (_Class::*)(_ArgTypes...) volatile>
+ : public _Maybe_unary_or_binary_function<_Res, volatile _Class*,
+ _ArgTypes...>
+ {
+ typedef _Res (_Class::*_Functor)(_ArgTypes...) volatile;
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __object, const volatile _Class *,
+ _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
+ { return ((*__ptr).*__pmf)(__args...); }
+
+ public:
+ typedef _Res result_type;
+
+ explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
+
+ // Handle objects
+ _Res
+ operator()(volatile _Class& __object, _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ // Handle pointers
+ _Res
+ operator()(volatile _Class* __object, _ArgTypes... __args) const
+ { return (__object->*__pmf)(__args...); }
+
+ // Handle smart pointers, references and pointers to derived
+ template<typename _Tp>
+ _Res
+ operator()(_Tp& __object, _ArgTypes... __args) const
+ { return _M_call(__object, &__object, __args...); }
+
+ private:
+ _Functor __pmf;
+ };
+
+ /// Implementation of @c mem_fn for const volatile member function pointers.
+ template<typename _Res, typename _Class, typename... _ArgTypes>
+ class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const volatile>
+ : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*,
+ _ArgTypes...>
+ {
+ typedef _Res (_Class::*_Functor)(_ArgTypes...) const volatile;
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __object, const volatile _Class *,
+ _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ template<typename _Tp>
+ _Res
+ _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
+ { return ((*__ptr).*__pmf)(__args...); }
+
+ public:
+ typedef _Res result_type;
+
+ explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }
+
+ // Handle objects
+ _Res
+ operator()(const volatile _Class& __object, _ArgTypes... __args) const
+ { return (__object.*__pmf)(__args...); }
+
+ // Handle pointers
+ _Res
+ operator()(const volatile _Class* __object, _ArgTypes... __args) const
+ { return (__object->*__pmf)(__args...); }
+
+ // Handle smart pointers, references and pointers to derived
+ template<typename _Tp>
+ _Res operator()(_Tp& __object, _ArgTypes... __args) const
+ { return _M_call(__object, &__object, __args...); }
+
+ private:
+ _Functor __pmf;
+ };
+
+
+ template<typename _Res, typename _Class>
+ class _Mem_fn<_Res _Class::*>
+ {
+ // This bit of genius is due to Peter Dimov, improved slightly by
+ // Douglas Gregor.
+ template<typename _Tp>
+ _Res&
+ _M_call(_Tp& __object, _Class *) const
+ { return __object.*__pm; }
+
+ template<typename _Tp, typename _Up>
+ _Res&
+ _M_call(_Tp& __object, _Up * const *) const
+ { return (*__object).*__pm; }
+
+ template<typename _Tp, typename _Up>
+ const _Res&
+ _M_call(_Tp& __object, const _Up * const *) const
+ { return (*__object).*__pm; }
+
+ template<typename _Tp>
+ const _Res&
+ _M_call(_Tp& __object, const _Class *) const
+ { return __object.*__pm; }
+
+ template<typename _Tp>
+ const _Res&
+ _M_call(_Tp& __ptr, const volatile void*) const
+ { return (*__ptr).*__pm; }
+
+ template<typename _Tp> static _Tp& __get_ref();
+
+ template<typename _Tp>
+ static __sfinae_types::__one __check_const(_Tp&, _Class*);
+ template<typename _Tp, typename _Up>
+ static __sfinae_types::__one __check_const(_Tp&, _Up * const *);
+ template<typename _Tp, typename _Up>
+ static __sfinae_types::__two __check_const(_Tp&, const _Up * const *);
+ template<typename _Tp>
+ static __sfinae_types::__two __check_const(_Tp&, const _Class*);
+ template<typename _Tp>
+ static __sfinae_types::__two __check_const(_Tp&, const volatile void*);
+
+ public:
+ template<typename _Tp>
+ struct _Result_type
+ : _Mem_fn_const_or_non<_Res,
+ (sizeof(__sfinae_types::__two)
+ == sizeof(__check_const<_Tp>(__get_ref<_Tp>(), (_Tp*)0)))>
+ { };
+
+ template<typename _Signature>
+ struct result;
+
+ template<typename _CVMem, typename _Tp>
+ struct result<_CVMem(_Tp)>
+ : public _Result_type<_Tp> { };
+
+ template<typename _CVMem, typename _Tp>
+ struct result<_CVMem(_Tp&)>
+ : public _Result_type<_Tp> { };
+
+ explicit
+ _Mem_fn(_Res _Class::*__pm) : __pm(__pm) { }
+
+ // Handle objects
+ _Res&
+ operator()(_Class& __object) const
+ { return __object.*__pm; }
+
+ const _Res&
+ operator()(const _Class& __object) const
+ { return __object.*__pm; }
+
+ // Handle pointers
+ _Res&
+ operator()(_Class* __object) const
+ { return __object->*__pm; }
+
+ const _Res&
+ operator()(const _Class* __object) const
+ { return __object->*__pm; }
+
+ // Handle smart pointers and derived
+ template<typename _Tp>
+ typename _Result_type<_Tp>::type
+ operator()(_Tp& __unknown) const
+ { return _M_call(__unknown, &__unknown); }
+
+ private:
+ _Res _Class::*__pm;
+ };
+
+ /**
+ * @brief Returns a function object that forwards to the member
+ * pointer @a pm.
+ */
+ template<typename _Tp, typename _Class>
+ inline _Mem_fn<_Tp _Class::*>
+ mem_fn(_Tp _Class::* __pm)
+ {
+ return _Mem_fn<_Tp _Class::*>(__pm);
+ }
+
+ /**
+ * @brief Determines if the given type _Tp is a function object
+ * should be treated as a subexpression when evaluating calls to
+ * function objects returned by bind(). [TR1 3.6.1]
+ */
+ template<typename _Tp>
+ struct is_bind_expression
+ { static const bool value = false; };
+
+ template<typename _Tp>
+ const bool is_bind_expression<_Tp>::value;
+
+ /**
+ * @brief Determines if the given type _Tp is a placeholder in a
+ * bind() expression and, if so, which placeholder it is. [TR1 3.6.2]
+ */
+ template<typename _Tp>
+ struct is_placeholder
+ { static const int value = 0; };
+
+ template<typename _Tp>
+ const int is_placeholder<_Tp>::value;
+
+ /// The type of placeholder objects defined by libstdc++.
+ template<int _Num> struct _Placeholder { };
+
+ /** @namespace std::placeholders
+ * @brief ISO C++ 0x entities sub namespace for functional.
+ *
+ * Define a large number of placeholders. There is no way to
+ * simplify this with variadic templates, because we're introducing
+ * unique names for each.
+ */
+ namespace placeholders
+ {
+ namespace
+ {
+ _Placeholder<1> _1;
+ _Placeholder<2> _2;
+ _Placeholder<3> _3;
+ _Placeholder<4> _4;
+ _Placeholder<5> _5;
+ _Placeholder<6> _6;
+ _Placeholder<7> _7;
+ _Placeholder<8> _8;
+ _Placeholder<9> _9;
+ _Placeholder<10> _10;
+ _Placeholder<11> _11;
+ _Placeholder<12> _12;
+ _Placeholder<13> _13;
+ _Placeholder<14> _14;
+ _Placeholder<15> _15;
+ _Placeholder<16> _16;
+ _Placeholder<17> _17;
+ _Placeholder<18> _18;
+ _Placeholder<19> _19;
+ _Placeholder<20> _20;
+ _Placeholder<21> _21;
+ _Placeholder<22> _22;
+ _Placeholder<23> _23;
+ _Placeholder<24> _24;
+ _Placeholder<25> _25;
+ _Placeholder<26> _26;
+ _Placeholder<27> _27;
+ _Placeholder<28> _28;
+ _Placeholder<29> _29;
+ }
+ }
+
+ /**
+ * Partial specialization of is_placeholder that provides the placeholder
+ * number for the placeholder objects defined by libstdc++.
+ */
+ template<int _Num>
+ struct is_placeholder<_Placeholder<_Num> >
+ { static const int value = _Num; };
+
+ template<int _Num>
+ const int is_placeholder<_Placeholder<_Num> >::value;
+
+ /**
+ * Stores a tuple of indices. Used by bind() to extract the elements
+ * in a tuple.
+ */
+ template<int... _Indexes>
+ struct _Index_tuple { };
+
+ /// Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
+ template<std::size_t _Num, typename _Tuple = _Index_tuple<> >
+ struct _Build_index_tuple;
+
+ template<std::size_t _Num, int... _Indexes>
+ struct _Build_index_tuple<_Num, _Index_tuple<_Indexes...> >
+ : _Build_index_tuple<_Num - 1,
+ _Index_tuple<_Indexes..., sizeof...(_Indexes)> >
+ {
+ };
+
+ template<int... _Indexes>
+ struct _Build_index_tuple<0, _Index_tuple<_Indexes...> >
+ {
+ typedef _Index_tuple<_Indexes...> __type;
+ };
+
+ /**
+ * Used by _Safe_tuple_element to indicate that there is no tuple
+ * element at this position.
+ */
+ struct _No_tuple_element;
+
+ /**
+ * Implementation helper for _Safe_tuple_element. This primary
+ * template handles the case where it is safe to use @c
+ * tuple_element.
+ */
+ template<int __i, typename _Tuple, bool _IsSafe>
+ struct _Safe_tuple_element_impl
+ : tuple_element<__i, _Tuple> { };
+
+ /**
+ * Implementation helper for _Safe_tuple_element. This partial
+ * specialization handles the case where it is not safe to use @c
+ * tuple_element. We just return @c _No_tuple_element.
+ */
+ template<int __i, typename _Tuple>
+ struct _Safe_tuple_element_impl<__i, _Tuple, false>
+ {
+ typedef _No_tuple_element type;
+ };
+
+ /**
+ * Like tuple_element, but returns @c _No_tuple_element when
+ * tuple_element would return an error.
+ */
+ template<int __i, typename _Tuple>
+ struct _Safe_tuple_element
+ : _Safe_tuple_element_impl<__i, _Tuple,
+ (__i >= 0 && __i < tuple_size<_Tuple>::value)>
+ {
+ };
+
+ /**
+ * Maps an argument to bind() into an actual argument to the bound
+ * function object [TR1 3.6.3/5]. Only the first parameter should
+ * be specified: the rest are used to determine among the various
+ * implementations. Note that, although this class is a function
+ * object, it isn't entirely normal because it takes only two
+ * parameters regardless of the number of parameters passed to the
+ * bind expression. The first parameter is the bound argument and
+ * the second parameter is a tuple containing references to the
+ * rest of the arguments.
+ */
+ template<typename _Arg,
+ bool _IsBindExp = is_bind_expression<_Arg>::value,
+ bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
+ class _Mu;
+
+ /**
+ * If the argument is reference_wrapper<_Tp>, returns the
+ * underlying reference. [TR1 3.6.3/5 bullet 1]
+ */
+ template<typename _Tp>
+ class _Mu<reference_wrapper<_Tp>, false, false>
+ {
+ public:
+ typedef _Tp& result_type;
+
+ /* Note: This won't actually work for const volatile
+ * reference_wrappers, because reference_wrapper::get() is const
+ * but not volatile-qualified. This might be a defect in the TR.
+ */
+ template<typename _CVRef, typename _Tuple>
+ result_type
+ operator()(_CVRef& __arg, const _Tuple&) const volatile
+ { return __arg.get(); }
+ };
+
+ /**
+ * If the argument is a bind expression, we invoke the underlying
+ * function object with the same cv-qualifiers as we are given and
+ * pass along all of our arguments (unwrapped). [TR1 3.6.3/5 bullet 2]
+ */
+ template<typename _Arg>
+ class _Mu<_Arg, true, false>
+ {
+ public:
+ template<typename _Signature> class result;
+
+ // Determine the result type when we pass the arguments along. This
+ // involves passing along the cv-qualifiers placed on _Mu and
+ // unwrapping the argument bundle.
+ template<typename _CVMu, typename _CVArg, typename... _Args>
+ class result<_CVMu(_CVArg, tuple<_Args...>)>
+ : public result_of<_CVArg(_Args...)> { };
+
+ template<typename _CVArg, typename... _Args>
+ typename result_of<_CVArg(_Args...)>::type
+ operator()(_CVArg& __arg,
+ const tuple<_Args...>& __tuple) const volatile
+ {
+ // Construct an index tuple and forward to __call
+ typedef typename _Build_index_tuple<sizeof...(_Args)>::__type
+ _Indexes;
+ return this->__call(__arg, __tuple, _Indexes());
+ }
+
+ private:
+ // Invokes the underlying function object __arg by unpacking all
+ // of the arguments in the tuple.
+ template<typename _CVArg, typename... _Args, int... _Indexes>
+ typename result_of<_CVArg(_Args...)>::type
+ __call(_CVArg& __arg, const tuple<_Args...>& __tuple,
+ const _Index_tuple<_Indexes...>&) const volatile
+ {
+ return __arg(_GLIBCXX_TR1 get<_Indexes>(__tuple)...);
+ }
+ };
+
+ /**
+ * If the argument is a placeholder for the Nth argument, returns
+ * a reference to the Nth argument to the bind function object.
+ * [TR1 3.6.3/5 bullet 3]
+ */
+ template<typename _Arg>
+ class _Mu<_Arg, false, true>
+ {
+ public:
+ template<typename _Signature> class result;
+
+ template<typename _CVMu, typename _CVArg, typename _Tuple>
+ class result<_CVMu(_CVArg, _Tuple)>
+ {
+ // Add a reference, if it hasn't already been done for us.
+ // This allows us to be a little bit sloppy in constructing
+ // the tuple that we pass to result_of<...>.
+ typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value
+ - 1), _Tuple>::type
+ __base_type;
+
+ public:
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ typedef typename add_lvalue_reference<__base_type>::type type;
+#else
+ typedef typename add_reference<__base_type>::type type;
+#endif
+ };
+
+ template<typename _Tuple>
+ typename result<_Mu(_Arg, _Tuple)>::type
+ operator()(const volatile _Arg&, const _Tuple& __tuple) const volatile
+ {
+ return ::std::_GLIBCXX_TR1 get<(is_placeholder<_Arg>::value
+ - 1)>(__tuple);
+ }
+ };
+
+ /**
+ * If the argument is just a value, returns a reference to that
+ * value. The cv-qualifiers on the reference are the same as the
+ * cv-qualifiers on the _Mu object. [TR1 3.6.3/5 bullet 4]
+ */
+ template<typename _Arg>
+ class _Mu<_Arg, false, false>
+ {
+ public:
+ template<typename _Signature> struct result;
+
+ template<typename _CVMu, typename _CVArg, typename _Tuple>
+ struct result<_CVMu(_CVArg, _Tuple)>
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ typedef typename add_lvalue_reference<_CVArg>::type type;
+#else
+ typedef typename add_reference<_CVArg>::type type;
+#endif
+ };
+
+ // Pick up the cv-qualifiers of the argument
+ template<typename _CVArg, typename _Tuple>
+ _CVArg&
+ operator()(_CVArg& __arg, const _Tuple&) const volatile
+ { return __arg; }
+ };
+
+ /**
+ * Maps member pointers into instances of _Mem_fn but leaves all
+ * other function objects untouched. Used by tr1::bind(). The
+ * primary template handles the non--member-pointer case.
+ */
+ template<typename _Tp>
+ struct _Maybe_wrap_member_pointer
+ {
+ typedef _Tp type;
+
+ static const _Tp&
+ __do_wrap(const _Tp& __x)
+ { return __x; }
+ };
+
+ /**
+ * Maps member pointers into instances of _Mem_fn but leaves all
+ * other function objects untouched. Used by tr1::bind(). This
+ * partial specialization handles the member pointer case.
+ */
+ template<typename _Tp, typename _Class>
+ struct _Maybe_wrap_member_pointer<_Tp _Class::*>
+ {
+ typedef _Mem_fn<_Tp _Class::*> type;
+
+ static type
+ __do_wrap(_Tp _Class::* __pm)
+ { return type(__pm); }
+ };
+
+ /// Type of the function object returned from bind().
+ template<typename _Signature>
+ struct _Bind;
+
+ template<typename _Functor, typename... _Bound_args>
+ class _Bind<_Functor(_Bound_args...)>
+ : public _Weak_result_type<_Functor>
+ {
+ typedef _Bind __self_type;
+ typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
+ _Bound_indexes;
+
+ _Functor _M_f;
+ tuple<_Bound_args...> _M_bound_args;
+
+ // Call unqualified
+ template<typename... _Args, int... _Indexes>
+ typename result_of<
+ _Functor(typename result_of<_Mu<_Bound_args>
+ (_Bound_args, tuple<_Args...>)>::type...)
+ >::type
+ __call(const tuple<_Args...>& __args, _Index_tuple<_Indexes...>)
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as const
+ template<typename... _Args, int... _Indexes>
+ typename result_of<
+ const _Functor(typename result_of<_Mu<_Bound_args>
+ (const _Bound_args, tuple<_Args...>)
+ >::type...)>::type
+ __call(const tuple<_Args...>& __args, _Index_tuple<_Indexes...>) const
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as volatile
+ template<typename... _Args, int... _Indexes>
+ typename result_of<
+ volatile _Functor(typename result_of<_Mu<_Bound_args>
+ (volatile _Bound_args, tuple<_Args...>)
+ >::type...)>::type
+ __call(const tuple<_Args...>& __args,
+ _Index_tuple<_Indexes...>) volatile
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as const volatile
+ template<typename... _Args, int... _Indexes>
+ typename result_of<
+ const volatile _Functor(typename result_of<_Mu<_Bound_args>
+ (const volatile _Bound_args,
+ tuple<_Args...>)
+ >::type...)>::type
+ __call(const tuple<_Args...>& __args,
+ _Index_tuple<_Indexes...>) const volatile
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ public:
+ explicit _Bind(_Functor __f, _Bound_args... __bound_args)
+ : _M_f(__f), _M_bound_args(__bound_args...) { }
+
+ // Call unqualified
+ template<typename... _Args>
+ typename result_of<
+ _Functor(typename result_of<_Mu<_Bound_args>
+ (_Bound_args, tuple<_Args...>)>::type...)
+ >::type
+ operator()(_Args&... __args)
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+ // Call as const
+ template<typename... _Args>
+ typename result_of<
+ const _Functor(typename result_of<_Mu<_Bound_args>
+ (const _Bound_args, tuple<_Args...>)>::type...)
+ >::type
+ operator()(_Args&... __args) const
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+
+ // Call as volatile
+ template<typename... _Args>
+ typename result_of<
+ volatile _Functor(typename result_of<_Mu<_Bound_args>
+ (volatile _Bound_args, tuple<_Args...>)>::type...)
+ >::type
+ operator()(_Args&... __args) volatile
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+
+ // Call as const volatile
+ template<typename... _Args>
+ typename result_of<
+ const volatile _Functor(typename result_of<_Mu<_Bound_args>
+ (const volatile _Bound_args,
+ tuple<_Args...>)>::type...)
+ >::type
+ operator()(_Args&... __args) const volatile
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+ };
+
+ /// Type of the function object returned from bind<R>().
+ template<typename _Result, typename _Signature>
+ struct _Bind_result;
+
+ template<typename _Result, typename _Functor, typename... _Bound_args>
+ class _Bind_result<_Result, _Functor(_Bound_args...)>
+ {
+ typedef _Bind_result __self_type;
+ typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
+ _Bound_indexes;
+
+ _Functor _M_f;
+ tuple<_Bound_args...> _M_bound_args;
+
+ // Call unqualified
+ template<typename... _Args, int... _Indexes>
+ _Result
+ __call(const tuple<_Args...>& __args, _Index_tuple<_Indexes...>)
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as const
+ template<typename... _Args, int... _Indexes>
+ _Result
+ __call(const tuple<_Args...>& __args, _Index_tuple<_Indexes...>) const
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as volatile
+ template<typename... _Args, int... _Indexes>
+ _Result
+ __call(const tuple<_Args...>& __args,
+ _Index_tuple<_Indexes...>) volatile
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ // Call as const volatile
+ template<typename... _Args, int... _Indexes>
+ _Result
+ __call(const tuple<_Args...>& __args,
+ _Index_tuple<_Indexes...>) const volatile
+ {
+ return _M_f(_Mu<_Bound_args>()
+ (_GLIBCXX_TR1 get<_Indexes>(_M_bound_args), __args)...);
+ }
+
+ public:
+ typedef _Result result_type;
+
+ explicit
+ _Bind_result(_Functor __f, _Bound_args... __bound_args)
+ : _M_f(__f), _M_bound_args(__bound_args...) { }
+
+ // Call unqualified
+ template<typename... _Args>
+ result_type
+ operator()(_Args&... __args)
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+ // Call as const
+ template<typename... _Args>
+ result_type
+ operator()(_Args&... __args) const
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+ // Call as volatile
+ template<typename... _Args>
+ result_type
+ operator()(_Args&... __args) volatile
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+
+ // Call as const volatile
+ template<typename... _Args>
+ result_type
+ operator()(_Args&... __args) const volatile
+ {
+ return this->__call(_GLIBCXX_TR1 tie(__args...), _Bound_indexes());
+ }
+ };
+
+ /// Class template _Bind is always a bind expression.
+ template<typename _Signature>
+ struct is_bind_expression<_Bind<_Signature> >
+ { static const bool value = true; };
+
+ template<typename _Signature>
+ const bool is_bind_expression<_Bind<_Signature> >::value;
+
+ /// Class template _Bind_result is always a bind expression.
+ template<typename _Result, typename _Signature>
+ struct is_bind_expression<_Bind_result<_Result, _Signature> >
+ { static const bool value = true; };
+
+ template<typename _Result, typename _Signature>
+ const bool is_bind_expression<_Bind_result<_Result, _Signature> >::value;
+
+ /// bind
+ template<typename _Functor, typename... _ArgTypes>
+ inline
+ _Bind<typename _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...)>
+ bind(_Functor __f, _ArgTypes... __args)
+ {
+ typedef _Maybe_wrap_member_pointer<_Functor> __maybe_type;
+ typedef typename __maybe_type::type __functor_type;
+ typedef _Bind<__functor_type(_ArgTypes...)> __result_type;
+ return __result_type(__maybe_type::__do_wrap(__f), __args...);
+ }
+
+ template<typename _Result, typename _Functor, typename... _ArgTypes>
+ inline
+ _Bind_result<_Result,
+ typename _Maybe_wrap_member_pointer<_Functor>::type
+ (_ArgTypes...)>
+ bind(_Functor __f, _ArgTypes... __args)
+ {
+ typedef _Maybe_wrap_member_pointer<_Functor> __maybe_type;
+ typedef typename __maybe_type::type __functor_type;
+ typedef _Bind_result<_Result, __functor_type(_ArgTypes...)>
+ __result_type;
+ return __result_type(__maybe_type::__do_wrap(__f), __args...);
+ }
+
+ /**
+ * @brief Exception class thrown when class template function's
+ * operator() is called with an empty target.
+ *
+ */
+ class bad_function_call : public std::exception { };
+
+ /**
+ * The integral constant expression 0 can be converted into a
+ * pointer to this type. It is used by the function template to
+ * accept NULL pointers.
+ */
+ struct _M_clear_type;
+
+ /**
+ * Trait identifying "location-invariant" types, meaning that the
+ * address of the object (or any of its members) will not escape.
+ * Also implies a trivial copy constructor and assignment operator.
+ */
+ template<typename _Tp>
+ struct __is_location_invariant
+ : integral_constant<bool,
+ (is_pointer<_Tp>::value
+ || is_member_pointer<_Tp>::value)>
+ {
+ };
+
+ class _Undefined_class;
+
+ union _Nocopy_types
+ {
+ void* _M_object;
+ const void* _M_const_object;
+ void (*_M_function_pointer)();
+ void (_Undefined_class::*_M_member_pointer)();
+ };
+
+ union _Any_data
+ {
+ void* _M_access() { return &_M_pod_data[0]; }
+ const void* _M_access() const { return &_M_pod_data[0]; }
+
+ template<typename _Tp>
+ _Tp&
+ _M_access()
+ { return *static_cast<_Tp*>(_M_access()); }
+
+ template<typename _Tp>
+ const _Tp&
+ _M_access() const
+ { return *static_cast<const _Tp*>(_M_access()); }
+
+ _Nocopy_types _M_unused;
+ char _M_pod_data[sizeof(_Nocopy_types)];
+ };
+
+ enum _Manager_operation
+ {
+ __get_type_info,
+ __get_functor_ptr,
+ __clone_functor,
+ __destroy_functor
+ };
+
+ // Simple type wrapper that helps avoid annoying const problems
+ // when casting between void pointers and pointers-to-pointers.
+ template<typename _Tp>
+ struct _Simple_type_wrapper
+ {
+ _Simple_type_wrapper(_Tp __value) : __value(__value) { }
+
+ _Tp __value;
+ };
+
+ template<typename _Tp>
+ struct __is_location_invariant<_Simple_type_wrapper<_Tp> >
+ : __is_location_invariant<_Tp>
+ {
+ };
+
+ // Converts a reference to a function object into a callable
+ // function object.
+ template<typename _Functor>
+ inline _Functor&
+ __callable_functor(_Functor& __f)
+ { return __f; }
+
+ template<typename _Member, typename _Class>
+ inline _Mem_fn<_Member _Class::*>
+ __callable_functor(_Member _Class::* &__p)
+ { return mem_fn(__p); }
+
+ template<typename _Member, typename _Class>
+ inline _Mem_fn<_Member _Class::*>
+ __callable_functor(_Member _Class::* const &__p)
+ { return mem_fn(__p); }
+
+ template<typename _Signature>
+ class function;
+
+ /// Base class of all polymorphic function object wrappers.
+ class _Function_base
+ {
+ public:
+ static const std::size_t _M_max_size = sizeof(_Nocopy_types);
+ static const std::size_t _M_max_align = __alignof__(_Nocopy_types);
+
+ template<typename _Functor>
+ class _Base_manager
+ {
+ protected:
+ static const bool __stored_locally =
+ (__is_location_invariant<_Functor>::value
+ && sizeof(_Functor) <= _M_max_size
+ && __alignof__(_Functor) <= _M_max_align
+ && (_M_max_align % __alignof__(_Functor) == 0));
+
+ typedef integral_constant<bool, __stored_locally> _Local_storage;
+
+ // Retrieve a pointer to the function object
+ static _Functor*
+ _M_get_pointer(const _Any_data& __source)
+ {
+ const _Functor* __ptr =
+ __stored_locally? &__source._M_access<_Functor>()
+ /* have stored a pointer */ : __source._M_access<_Functor*>();
+ return const_cast<_Functor*>(__ptr);
+ }
+
+ // Clone a location-invariant function object that fits within
+ // an _Any_data structure.
+ static void
+ _M_clone(_Any_data& __dest, const _Any_data& __source, true_type)
+ {
+ new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
+ }
+
+ // Clone a function object that is not location-invariant or
+ // that cannot fit into an _Any_data structure.
+ static void
+ _M_clone(_Any_data& __dest, const _Any_data& __source, false_type)
+ {
+ __dest._M_access<_Functor*>() =
+ new _Functor(*__source._M_access<_Functor*>());
+ }
+
+ // Destroying a location-invariant object may still require
+ // destruction.
+ static void
+ _M_destroy(_Any_data& __victim, true_type)
+ {
+ __victim._M_access<_Functor>().~_Functor();
+ }
+
+ // Destroying an object located on the heap.
+ static void
+ _M_destroy(_Any_data& __victim, false_type)
+ {
+ delete __victim._M_access<_Functor*>();
+ }
+
+ public:
+ static bool
+ _M_manager(_Any_data& __dest, const _Any_data& __source,
+ _Manager_operation __op)
+ {
+ switch (__op)
+ {
+#ifdef __GXX_RTTI
+ case __get_type_info:
+ __dest._M_access<const type_info*>() = &typeid(_Functor);
+ break;
+#endif
+ case __get_functor_ptr:
+ __dest._M_access<_Functor*>() = _M_get_pointer(__source);
+ break;
+
+ case __clone_functor:
+ _M_clone(__dest, __source, _Local_storage());
+ break;
+
+ case __destroy_functor:
+ _M_destroy(__dest, _Local_storage());
+ break;
+ }
+ return false;
+ }
+
+ static void
+ _M_init_functor(_Any_data& __functor, const _Functor& __f)
+ { _M_init_functor(__functor, __f, _Local_storage()); }
+
+ template<typename _Signature>
+ static bool
+ _M_not_empty_function(const function<_Signature>& __f)
+ { return __f; }
+
+ template<typename _Tp>
+ static bool
+ _M_not_empty_function(const _Tp*& __fp)
+ { return __fp; }
+
+ template<typename _Class, typename _Tp>
+ static bool
+ _M_not_empty_function(_Tp _Class::* const& __mp)
+ { return __mp; }
+
+ template<typename _Tp>
+ static bool
+ _M_not_empty_function(const _Tp&)
+ { return true; }
+
+ private:
+ static void
+ _M_init_functor(_Any_data& __functor, const _Functor& __f, true_type)
+ { new (__functor._M_access()) _Functor(__f); }
+
+ static void
+ _M_init_functor(_Any_data& __functor, const _Functor& __f, false_type)
+ { __functor._M_access<_Functor*>() = new _Functor(__f); }
+ };
+
+ template<typename _Functor>
+ class _Ref_manager : public _Base_manager<_Functor*>
+ {
+ typedef _Function_base::_Base_manager<_Functor*> _Base;
+
+ public:
+ static bool
+ _M_manager(_Any_data& __dest, const _Any_data& __source,
+ _Manager_operation __op)
+ {
+ switch (__op)
+ {
+#ifdef __GXX_RTTI
+ case __get_type_info:
+ __dest._M_access<const type_info*>() = &typeid(_Functor);
+ break;
+#endif
+ case __get_functor_ptr:
+ __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source);
+ return is_const<_Functor>::value;
+ break;
+
+ default:
+ _Base::_M_manager(__dest, __source, __op);
+ }
+ return false;
+ }
+
+ static void
+ _M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
+ {
+ // TBD: Use address_of function instead.
+ _Base::_M_init_functor(__functor, &__f.get());
+ }
+ };
+
+ _Function_base() : _M_manager(0) { }
+
+ ~_Function_base()
+ {
+ if (_M_manager)
+ _M_manager(_M_functor, _M_functor, __destroy_functor);
+ }
+
+
+ bool _M_empty() const { return !_M_manager; }
+
+ typedef bool (*_Manager_type)(_Any_data&, const _Any_data&,
+ _Manager_operation);
+
+ _Any_data _M_functor;
+ _Manager_type _M_manager;
+ };
+
+ template<typename _Signature, typename _Functor>
+ class _Function_handler;
+
+ template<typename _Res, typename _Functor, typename... _ArgTypes>
+ class _Function_handler<_Res(_ArgTypes...), _Functor>
+ : public _Function_base::_Base_manager<_Functor>
+ {
+ typedef _Function_base::_Base_manager<_Functor> _Base;
+
+ public:
+ static _Res
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ return (*_Base::_M_get_pointer(__functor))(__args...);
+ }
+ };
+
+ template<typename _Functor, typename... _ArgTypes>
+ class _Function_handler<void(_ArgTypes...), _Functor>
+ : public _Function_base::_Base_manager<_Functor>
+ {
+ typedef _Function_base::_Base_manager<_Functor> _Base;
+
+ public:
+ static void
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ (*_Base::_M_get_pointer(__functor))(__args...);
+ }
+ };
+
+ template<typename _Res, typename _Functor, typename... _ArgTypes>
+ class _Function_handler<_Res(_ArgTypes...), reference_wrapper<_Functor> >
+ : public _Function_base::_Ref_manager<_Functor>
+ {
+ typedef _Function_base::_Ref_manager<_Functor> _Base;
+
+ public:
+ static _Res
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ return
+ __callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
+ }
+ };
+
+ template<typename _Functor, typename... _ArgTypes>
+ class _Function_handler<void(_ArgTypes...), reference_wrapper<_Functor> >
+ : public _Function_base::_Ref_manager<_Functor>
+ {
+ typedef _Function_base::_Ref_manager<_Functor> _Base;
+
+ public:
+ static void
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ __callable_functor(**_Base::_M_get_pointer(__functor))(__args...);
+ }
+ };
+
+ template<typename _Class, typename _Member, typename _Res,
+ typename... _ArgTypes>
+ class _Function_handler<_Res(_ArgTypes...), _Member _Class::*>
+ : public _Function_handler<void(_ArgTypes...), _Member _Class::*>
+ {
+ typedef _Function_handler<void(_ArgTypes...), _Member _Class::*>
+ _Base;
+
+ public:
+ static _Res
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ return _GLIBCXX_TR1
+ mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
+ }
+ };
+
+ template<typename _Class, typename _Member, typename... _ArgTypes>
+ class _Function_handler<void(_ArgTypes...), _Member _Class::*>
+ : public _Function_base::_Base_manager<
+ _Simple_type_wrapper< _Member _Class::* > >
+ {
+ typedef _Member _Class::* _Functor;
+ typedef _Simple_type_wrapper<_Functor> _Wrapper;
+ typedef _Function_base::_Base_manager<_Wrapper> _Base;
+
+ public:
+ static bool
+ _M_manager(_Any_data& __dest, const _Any_data& __source,
+ _Manager_operation __op)
+ {
+ switch (__op)
+ {
+#ifdef __GXX_RTTI
+ case __get_type_info:
+ __dest._M_access<const type_info*>() = &typeid(_Functor);
+ break;
+#endif
+ case __get_functor_ptr:
+ __dest._M_access<_Functor*>() =
+ &_Base::_M_get_pointer(__source)->__value;
+ break;
+
+ default:
+ _Base::_M_manager(__dest, __source, __op);
+ }
+ return false;
+ }
+
+ static void
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ _GLIBCXX_TR1
+ mem_fn(_Base::_M_get_pointer(__functor)->__value)(__args...);
+ }
+ };
+
+ /// class function
+ template<typename _Res, typename... _ArgTypes>
+ class function<_Res(_ArgTypes...)>
+ : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
+ private _Function_base
+ {
+ /// This class is used to implement the safe_bool idiom.
+ struct _Hidden_type
+ {
+ _Hidden_type* _M_bool;
+ };
+
+ /// This typedef is used to implement the safe_bool idiom.
+ typedef _Hidden_type* _Hidden_type::* _Safe_bool;
+
+ typedef _Res _Signature_type(_ArgTypes...);
+
+ struct _Useless { };
+
+ public:
+ typedef _Res result_type;
+
+ // [3.7.2.1] construct/copy/destroy
+
+ /**
+ * @brief Default construct creates an empty function call wrapper.
+ * @post @c !(bool)*this
+ */
+ function() : _Function_base() { }
+
+ /**
+ * @brief Default construct creates an empty function call wrapper.
+ * @post @c !(bool)*this
+ */
+ function(_M_clear_type*) : _Function_base() { }
+
+ /**
+ * @brief %Function copy constructor.
+ * @param x A %function object with identical call signature.
+ * @pre @c (bool)*this == (bool)x
+ *
+ * The newly-created %function contains a copy of the target of @a
+ * x (if it has one).
+ */
+ function(const function& __x);
+
+ /**
+ * @brief Builds a %function that targets a copy of the incoming
+ * function object.
+ * @param f A %function object that is callable with parameters of
+ * type @c T1, @c T2, ..., @c TN and returns a value convertible
+ * to @c Res.
+ *
+ * The newly-created %function object will target a copy of @a
+ * f. If @a f is @c reference_wrapper<F>, then this function
+ * object will contain a reference to the function object @c
+ * f.get(). If @a f is a NULL function pointer or NULL
+ * pointer-to-member, the newly-created object will be empty.
+ *
+ * If @a f is a non-NULL function pointer or an object of type @c
+ * reference_wrapper<F>, this function will not throw.
+ */
+ template<typename _Functor>
+ function(_Functor __f,
+ typename __gnu_cxx::__enable_if<
+ !is_integral<_Functor>::value, _Useless>::__type
+ = _Useless());
+
+ /**
+ * @brief %Function assignment operator.
+ * @param x A %function with identical call signature.
+ * @post @c (bool)*this == (bool)x
+ * @returns @c *this
+ *
+ * The target of @a x is copied to @c *this. If @a x has no
+ * target, then @c *this will be empty.
+ *
+ * If @a x targets a function pointer or a reference to a function
+ * object, then this operation will not throw an exception.
+ */
+ function&
+ operator=(const function& __x)
+ {
+ function(__x).swap(*this);
+ return *this;
+ }
+
+ /**
+ * @brief %Function assignment to zero.
+ * @post @c !(bool)*this
+ * @returns @c *this
+ *
+ * The target of @a *this is deallocated, leaving it empty.
+ */
+ function&
+ operator=(_M_clear_type*)
+ {
+ if (_M_manager)
+ {
+ _M_manager(_M_functor, _M_functor, __destroy_functor);
+ _M_manager = 0;
+ _M_invoker = 0;
+ }
+ return *this;
+ }
+
+ /**
+ * @brief %Function assignment to a new target.
+ * @param f A %function object that is callable with parameters of
+ * type @c T1, @c T2, ..., @c TN and returns a value convertible
+ * to @c Res.
+ * @return @c *this
+ *
+ * This %function object wrapper will target a copy of @a
+ * f. If @a f is @c reference_wrapper<F>, then this function
+ * object will contain a reference to the function object @c
+ * f.get(). If @a f is a NULL function pointer or NULL
+ * pointer-to-member, @c this object will be empty.
+ *
+ * If @a f is a non-NULL function pointer or an object of type @c
+ * reference_wrapper<F>, this function will not throw.
+ */
+ template<typename _Functor>
+ typename __gnu_cxx::__enable_if<!is_integral<_Functor>::value,
+ function&>::__type
+ operator=(_Functor __f)
+ {
+ function(__f).swap(*this);
+ return *this;
+ }
+
+ // [3.7.2.2] function modifiers
+
+ /**
+ * @brief Swap the targets of two %function objects.
+ * @param f A %function with identical call signature.
+ *
+ * Swap the targets of @c this function object and @a f. This
+ * function will not throw an exception.
+ */
+ void swap(function& __x)
+ {
+ _Any_data __old_functor = _M_functor;
+ _M_functor = __x._M_functor;
+ __x._M_functor = __old_functor;
+ _Manager_type __old_manager = _M_manager;
+ _M_manager = __x._M_manager;
+ __x._M_manager = __old_manager;
+ _Invoker_type __old_invoker = _M_invoker;
+ _M_invoker = __x._M_invoker;
+ __x._M_invoker = __old_invoker;
+ }
+
+ // [3.7.2.3] function capacity
+
+ /**
+ * @brief Determine if the %function wrapper has a target.
+ *
+ * @return @c true when this %function object contains a target,
+ * or @c false when it is empty.
+ *
+ * This function will not throw an exception.
+ */
+ operator _Safe_bool() const
+ {
+ if (_M_empty())
+ return 0;
+ else
+ return &_Hidden_type::_M_bool;
+ }
+
+ // [3.7.2.4] function invocation
+
+ /**
+ * @brief Invokes the function targeted by @c *this.
+ * @returns the result of the target.
+ * @throws bad_function_call when @c !(bool)*this
+ *
+ * The function call operator invokes the target function object
+ * stored by @c this.
+ */
+ _Res operator()(_ArgTypes... __args) const;
+
+#ifdef __GXX_RTTI
+ // [3.7.2.5] function target access
+ /**
+ * @brief Determine the type of the target of this function object
+ * wrapper.
+ *
+ * @returns the type identifier of the target function object, or
+ * @c typeid(void) if @c !(bool)*this.
+ *
+ * This function will not throw an exception.
+ */
+ const type_info& target_type() const;
+
+ /**
+ * @brief Access the stored target function object.
+ *
+ * @return Returns a pointer to the stored target function object,
+ * if @c typeid(Functor).equals(target_type()); otherwise, a NULL
+ * pointer.
+ *
+ * This function will not throw an exception.
+ */
+ template<typename _Functor> _Functor* target();
+
+ /// @overload
+ template<typename _Functor> const _Functor* target() const;
+#endif
+
+ private:
+ // [3.7.2.6] undefined operators
+ template<typename _Function>
+ void operator==(const function<_Function>&) const;
+ template<typename _Function>
+ void operator!=(const function<_Function>&) const;
+
+ typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...);
+ _Invoker_type _M_invoker;
+ };
+
+ template<typename _Res, typename... _ArgTypes>
+ function<_Res(_ArgTypes...)>::
+ function(const function& __x)
+ : _Function_base()
+ {
+ if (__x)
+ {
+ _M_invoker = __x._M_invoker;
+ _M_manager = __x._M_manager;
+ __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
+ }
+ }
+
+ template<typename _Res, typename... _ArgTypes>
+ template<typename _Functor>
+ function<_Res(_ArgTypes...)>::
+ function(_Functor __f,
+ typename __gnu_cxx::__enable_if<
+ !is_integral<_Functor>::value, _Useless>::__type)
+ : _Function_base()
+ {
+ typedef _Function_handler<_Signature_type, _Functor> _My_handler;
+
+ if (_My_handler::_M_not_empty_function(__f))
+ {
+ _M_invoker = &_My_handler::_M_invoke;
+ _M_manager = &_My_handler::_M_manager;
+ _My_handler::_M_init_functor(_M_functor, __f);
+ }
+ }
+
+ template<typename _Res, typename... _ArgTypes>
+ _Res
+ function<_Res(_ArgTypes...)>::
+ operator()(_ArgTypes... __args) const
+ {
+ if (_M_empty())
+ {
+#if __EXCEPTIONS
+ throw bad_function_call();
+#else
+ __builtin_abort();
+#endif
+ }
+ return _M_invoker(_M_functor, __args...);
+ }
+
+#ifdef __GXX_RTTI
+ template<typename _Res, typename... _ArgTypes>
+ const type_info&
+ function<_Res(_ArgTypes...)>::
+ target_type() const
+ {
+ if (_M_manager)
+ {
+ _Any_data __typeinfo_result;
+ _M_manager(__typeinfo_result, _M_functor, __get_type_info);
+ return *__typeinfo_result._M_access<const type_info*>();
+ }
+ else
+ return typeid(void);
+ }
+
+ template<typename _Res, typename... _ArgTypes>
+ template<typename _Functor>
+ _Functor*
+ function<_Res(_ArgTypes...)>::
+ target()
+ {
+ if (typeid(_Functor) == target_type() && _M_manager)
+ {
+ _Any_data __ptr;
+ if (_M_manager(__ptr, _M_functor, __get_functor_ptr)
+ && !is_const<_Functor>::value)
+ return 0;
+ else
+ return __ptr._M_access<_Functor*>();
+ }
+ else
+ return 0;
+ }
+
+ template<typename _Res, typename... _ArgTypes>
+ template<typename _Functor>
+ const _Functor*
+ function<_Res(_ArgTypes...)>::
+ target() const
+ {
+ if (typeid(_Functor) == target_type() && _M_manager)
+ {
+ _Any_data __ptr;
+ _M_manager(__ptr, _M_functor, __get_functor_ptr);
+ return __ptr._M_access<const _Functor*>();
+ }
+ else
+ return 0;
+ }
+#endif
+
+ // [3.7.2.7] null pointer comparisons
+
+ /**
+ * @brief Compares a polymorphic function object wrapper against 0
+ * (the NULL pointer).
+ * @returns @c true if the wrapper has no target, @c false otherwise
+ *
+ * This function will not throw an exception.
+ */
+ template<typename _Signature>
+ inline bool
+ operator==(const function<_Signature>& __f, _M_clear_type*)
+ { return !__f; }
+
+ /// @overload
+ template<typename _Signature>
+ inline bool
+ operator==(_M_clear_type*, const function<_Signature>& __f)
+ { return !__f; }
+
+ /**
+ * @brief Compares a polymorphic function object wrapper against 0
+ * (the NULL pointer).
+ * @returns @c false if the wrapper has no target, @c true otherwise
+ *
+ * This function will not throw an exception.
+ */
+ template<typename _Signature>
+ inline bool
+ operator!=(const function<_Signature>& __f, _M_clear_type*)
+ { return __f; }
+
+ /// @overload
+ template<typename _Signature>
+ inline bool
+ operator!=(_M_clear_type*, const function<_Signature>& __f)
+ { return __f; }
+
+ // [3.7.2.8] specialized algorithms
+
+ /**
+ * @brief Swap the targets of two polymorphic function object wrappers.
+ *
+ * This function will not throw an exception.
+ */
+ template<typename _Signature>
+ inline void
+ swap(function<_Signature>& __x, function<_Signature>& __y)
+ { __x.swap(__y); }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional_hash.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional_hash.h
new file mode 100644
index 0000000..665168c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/functional_hash.h
@@ -0,0 +1,183 @@
+// TR1 functional -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/functional_hash.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ /// Class template hash.
+ // Declaration of default hash functor std::tr1::hash. The types for
+ // which std::tr1::hash<T> is well-defined is in clause 6.3.3. of the PDTR.
+ template<typename _Tp>
+ struct hash : public std::unary_function<_Tp, size_t>
+ {
+ size_t
+ operator()(_Tp __val) const;
+ };
+
+ /// Partial specializations for pointer types.
+ template<typename _Tp>
+ struct hash<_Tp*> : public std::unary_function<_Tp*, size_t>
+ {
+ size_t
+ operator()(_Tp* __p) const
+ { return reinterpret_cast<size_t>(__p); }
+ };
+
+ /// Explicit specializations for integer types.
+#define _TR1_hashtable_define_trivial_hash(_Tp) \
+ template<> \
+ inline size_t \
+ hash<_Tp>::operator()(_Tp __val) const \
+ { return static_cast<size_t>(__val); }
+
+ _TR1_hashtable_define_trivial_hash(bool);
+ _TR1_hashtable_define_trivial_hash(char);
+ _TR1_hashtable_define_trivial_hash(signed char);
+ _TR1_hashtable_define_trivial_hash(unsigned char);
+ _TR1_hashtable_define_trivial_hash(wchar_t);
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _TR1_hashtable_define_trivial_hash(char16_t);
+ _TR1_hashtable_define_trivial_hash(char32_t);
+#endif
+ _TR1_hashtable_define_trivial_hash(short);
+ _TR1_hashtable_define_trivial_hash(int);
+ _TR1_hashtable_define_trivial_hash(long);
+ _TR1_hashtable_define_trivial_hash(long long);
+ _TR1_hashtable_define_trivial_hash(unsigned short);
+ _TR1_hashtable_define_trivial_hash(unsigned int);
+ _TR1_hashtable_define_trivial_hash(unsigned long);
+ _TR1_hashtable_define_trivial_hash(unsigned long long);
+
+#undef _TR1_hashtable_define_trivial_hash
+
+ // Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
+ // (Used by the next specializations of std::tr1::hash.)
+
+ /// Dummy generic implementation (for sizeof(size_t) != 4, 8).
+ template<size_t = sizeof(size_t)>
+ struct _Fnv_hash
+ {
+ static size_t
+ hash(const char* __first, size_t __length)
+ {
+ size_t __result = 0;
+ for (; __length > 0; --__length)
+ __result = (__result * 131) + *__first++;
+ return __result;
+ }
+ };
+
+ template<>
+ struct _Fnv_hash<4>
+ {
+ static size_t
+ hash(const char* __first, size_t __length)
+ {
+ size_t __result = static_cast<size_t>(2166136261UL);
+ for (; __length > 0; --__length)
+ {
+ __result ^= static_cast<size_t>(*__first++);
+ __result *= static_cast<size_t>(16777619UL);
+ }
+ return __result;
+ }
+ };
+
+ template<>
+ struct _Fnv_hash<8>
+ {
+ static size_t
+ hash(const char* __first, size_t __length)
+ {
+ size_t __result =
+ static_cast<size_t>(14695981039346656037ULL);
+ for (; __length > 0; --__length)
+ {
+ __result ^= static_cast<size_t>(*__first++);
+ __result *= static_cast<size_t>(1099511628211ULL);
+ }
+ return __result;
+ }
+ };
+
+ /// Explicit specializations for float.
+ template<>
+ inline size_t
+ hash<float>::operator()(float __val) const
+ {
+ size_t __result = 0;
+
+ // 0 and -0 both hash to zero.
+ if (__val != 0.0f)
+ __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__val),
+ sizeof(__val));
+ return __result;
+ };
+
+ /// Explicit specializations for double.
+ template<>
+ inline size_t
+ hash<double>::operator()(double __val) const
+ {
+ size_t __result = 0;
+
+ // 0 and -0 both hash to zero.
+ if (__val != 0.0)
+ __result = _Fnv_hash<>::hash(reinterpret_cast<const char*>(&__val),
+ sizeof(__val));
+ return __result;
+ };
+
+ /// Explicit specializations for long double.
+ template<>
+ size_t
+ hash<long double>::operator()(long double __val) const;
+
+ /// Explicit specialization of member operator for non-builtin types.
+ template<>
+ size_t
+ hash<string>::operator()(string) const;
+
+ template<>
+ size_t
+ hash<const string&>::operator()(const string&) const;
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ template<>
+ size_t
+ hash<wstring>::operator()(wstring) const;
+
+ template<>
+ size_t
+ hash<const wstring&>::operator()(const wstring&) const;
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable
new file mode 100644
index 0000000..7c90983
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable
@@ -0,0 +1,1266 @@
+// Internal header for TR1 unordered_set and unordered_map -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/hashtable
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// This header file defines std::tr1::hashtable, which is used to
+// implement std::tr1::unordered_set, std::tr1::unordered_map,
+// std::tr1::unordered_multiset, and std::tr1::unordered_multimap.
+// hashtable has many template parameters, partly to accommodate
+// the differences between those four classes and partly to
+// accommodate policy choices that go beyond TR1 specifications.
+
+// Class template hashtable attempts to encapsulate all reasonable
+// variation among hash tables that use chaining. It does not handle
+// open addressing.
+
+// References:
+// M. Austern, "A Proposal to Add Hash Tables to the Standard
+// Library (revision 4)," WG21 Document N1456=03-0039, 2003.
+// D. E. Knuth, The Art of Computer Programming, v. 3, Sorting and Searching.
+// A. Tavori and V. Dreizin, "Policy-Based Data Structures", 2004.
+// http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/index.html
+
+#include <tr1_impl/hashtable_policy.h>
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // Class template _Hashtable, class definition.
+
+ // Meaning of class template _Hashtable's template parameters
+
+ // _Key and _Value: arbitrary CopyConstructible types.
+
+ // _Allocator: an allocator type ([lib.allocator.requirements]) whose
+ // value type is Value. As a conforming extension, we allow for
+ // value type != Value.
+
+ // _ExtractKey: function object that takes a object of type Value
+ // and returns a value of type _Key.
+
+ // _Equal: function object that takes two objects of type k and returns
+ // a bool-like value that is true if the two objects are considered equal.
+
+ // _H1: the hash function. A unary function object with argument type
+ // Key and result type size_t. Return values should be distributed
+ // over the entire range [0, numeric_limits<size_t>:::max()].
+
+ // _H2: the range-hashing function (in the terminology of Tavori and
+ // Dreizin). A binary function object whose argument types and result
+ // type are all size_t. Given arguments r and N, the return value is
+ // in the range [0, N).
+
+ // _Hash: the ranged hash function (Tavori and Dreizin). A binary function
+ // whose argument types are _Key and size_t and whose result type is
+ // size_t. Given arguments k and N, the return value is in the range
+ // [0, N). Default: hash(k, N) = h2(h1(k), N). If _Hash is anything other
+ // than the default, _H1 and _H2 are ignored.
+
+ // _RehashPolicy: Policy class with three members, all of which govern
+ // the bucket count. _M_next_bkt(n) returns a bucket count no smaller
+ // than n. _M_bkt_for_elements(n) returns a bucket count appropriate
+ // for an element count of n. _M_need_rehash(n_bkt, n_elt, n_ins)
+ // determines whether, if the current bucket count is n_bkt and the
+ // current element count is n_elt, we need to increase the bucket
+ // count. If so, returns make_pair(true, n), where n is the new
+ // bucket count. If not, returns make_pair(false, <anything>).
+
+ // ??? Right now it is hard-wired that the number of buckets never
+ // shrinks. Should we allow _RehashPolicy to change that?
+
+ // __cache_hash_code: bool. true if we store the value of the hash
+ // function along with the value. This is a time-space tradeoff.
+ // Storing it may improve lookup speed by reducing the number of times
+ // we need to call the Equal function.
+
+ // __constant_iterators: bool. true if iterator and const_iterator are
+ // both constant iterator types. This is true for unordered_set and
+ // unordered_multiset, false for unordered_map and unordered_multimap.
+
+ // __unique_keys: bool. true if the return value of _Hashtable::count(k)
+ // is always at most one, false if it may be an arbitrary number. This
+ // true for unordered_set and unordered_map, false for unordered_multiset
+ // and unordered_multimap.
+
+ template<typename _Key, typename _Value, typename _Allocator,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash,
+ typename _RehashPolicy,
+ bool __cache_hash_code,
+ bool __constant_iterators,
+ bool __unique_keys>
+ class _Hashtable
+ : public __detail::_Rehash_base<_RehashPolicy,
+ _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey,
+ _Equal, _H1, _H2, _Hash,
+ _RehashPolicy,
+ __cache_hash_code,
+ __constant_iterators,
+ __unique_keys> >,
+ public __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __cache_hash_code>,
+ public __detail::_Map_base<_Key, _Value, _ExtractKey, __unique_keys,
+ _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey,
+ _Equal, _H1, _H2, _Hash,
+ _RehashPolicy,
+ __cache_hash_code,
+ __constant_iterators,
+ __unique_keys> >
+ {
+ public:
+ typedef _Allocator allocator_type;
+ typedef _Value value_type;
+ typedef _Key key_type;
+ typedef _Equal key_equal;
+ // mapped_type, if present, comes from _Map_base.
+ // hasher, if present, comes from _Hash_code_base.
+ typedef typename _Allocator::difference_type difference_type;
+ typedef typename _Allocator::size_type size_type;
+ typedef typename _Allocator::pointer pointer;
+ typedef typename _Allocator::const_pointer const_pointer;
+ typedef typename _Allocator::reference reference;
+ typedef typename _Allocator::const_reference const_reference;
+
+ typedef __detail::_Node_iterator<value_type, __constant_iterators,
+ __cache_hash_code>
+ local_iterator;
+ typedef __detail::_Node_const_iterator<value_type,
+ __constant_iterators,
+ __cache_hash_code>
+ const_local_iterator;
+
+ typedef __detail::_Hashtable_iterator<value_type, __constant_iterators,
+ __cache_hash_code>
+ iterator;
+ typedef __detail::_Hashtable_const_iterator<value_type,
+ __constant_iterators,
+ __cache_hash_code>
+ const_iterator;
+
+ template<typename _Key2, typename _Value2, typename _Ex2, bool __unique2,
+ typename _Hashtable2>
+ friend struct __detail::_Map_base;
+
+ private:
+ typedef __detail::_Hash_node<_Value, __cache_hash_code> _Node;
+ typedef typename _Allocator::template rebind<_Node>::other
+ _Node_allocator_type;
+ typedef typename _Allocator::template rebind<_Node*>::other
+ _Bucket_allocator_type;
+
+ typedef typename _Allocator::template rebind<_Value>::other
+ _Value_allocator_type;
+
+ _Node_allocator_type _M_node_allocator;
+ _Node** _M_buckets;
+ size_type _M_bucket_count;
+ size_type _M_element_count;
+ _RehashPolicy _M_rehash_policy;
+
+ _Node*
+ _M_allocate_node(const value_type& __v);
+
+ void
+ _M_deallocate_node(_Node* __n);
+
+ void
+ _M_deallocate_nodes(_Node**, size_type);
+
+ _Node**
+ _M_allocate_buckets(size_type __n);
+
+ void
+ _M_deallocate_buckets(_Node**, size_type __n);
+
+ public:
+ // Constructor, destructor, assignment, swap
+ _Hashtable(size_type __bucket_hint,
+ const _H1&, const _H2&, const _Hash&,
+ const _Equal&, const _ExtractKey&,
+ const allocator_type&);
+
+ template<typename _InputIterator>
+ _Hashtable(_InputIterator __first, _InputIterator __last,
+ size_type __bucket_hint,
+ const _H1&, const _H2&, const _Hash&,
+ const _Equal&, const _ExtractKey&,
+ const allocator_type&);
+
+ _Hashtable(const _Hashtable&);
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _Hashtable(_Hashtable&&);
+#endif
+
+ _Hashtable&
+ operator=(const _Hashtable&);
+
+ ~_Hashtable();
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ void swap(_Hashtable&&);
+#else
+ void swap(_Hashtable&);
+#endif
+
+ // Basic container operations
+ iterator
+ begin()
+ {
+ iterator __i(_M_buckets);
+ if (!__i._M_cur_node)
+ __i._M_incr_bucket();
+ return __i;
+ }
+
+ const_iterator
+ begin() const
+ {
+ const_iterator __i(_M_buckets);
+ if (!__i._M_cur_node)
+ __i._M_incr_bucket();
+ return __i;
+ }
+
+ iterator
+ end()
+ { return iterator(_M_buckets + _M_bucket_count); }
+
+ const_iterator
+ end() const
+ { return const_iterator(_M_buckets + _M_bucket_count); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const_iterator
+ cbegin() const
+ {
+ const_iterator __i(_M_buckets);
+ if (!__i._M_cur_node)
+ __i._M_incr_bucket();
+ return __i;
+ }
+
+ const_iterator
+ cend() const
+ { return const_iterator(_M_buckets + _M_bucket_count); }
+#endif
+
+ size_type
+ size() const
+ { return _M_element_count; }
+
+ bool
+ empty() const
+ { return size() == 0; }
+
+ allocator_type
+ get_allocator() const
+ { return allocator_type(_M_node_allocator); }
+
+ _Value_allocator_type
+ _M_get_Value_allocator() const
+ { return _Value_allocator_type(_M_node_allocator); }
+
+ size_type
+ max_size() const
+ { return _M_node_allocator.max_size(); }
+
+ // Observers
+ key_equal
+ key_eq() const
+ { return this->_M_eq; }
+
+ // hash_function, if present, comes from _Hash_code_base.
+
+ // Bucket operations
+ size_type
+ bucket_count() const
+ { return _M_bucket_count; }
+
+ size_type
+ max_bucket_count() const
+ { return max_size(); }
+
+ size_type
+ bucket_size(size_type __n) const
+ { return std::distance(begin(__n), end(__n)); }
+
+ size_type
+ bucket(const key_type& __k) const
+ {
+ return this->_M_bucket_index(__k, this->_M_hash_code(__k),
+ bucket_count());
+ }
+
+ local_iterator
+ begin(size_type __n)
+ { return local_iterator(_M_buckets[__n]); }
+
+ local_iterator
+ end(size_type)
+ { return local_iterator(0); }
+
+ const_local_iterator
+ begin(size_type __n) const
+ { return const_local_iterator(_M_buckets[__n]); }
+
+ const_local_iterator
+ end(size_type) const
+ { return const_local_iterator(0); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ // DR 691.
+ const_local_iterator
+ cbegin(size_type __n) const
+ { return const_local_iterator(_M_buckets[__n]); }
+
+ const_local_iterator
+ cend(size_type) const
+ { return const_local_iterator(0); }
+#endif
+
+ float
+ load_factor() const
+ {
+ return static_cast<float>(size()) / static_cast<float>(bucket_count());
+ }
+
+ // max_load_factor, if present, comes from _Rehash_base.
+
+ // Generalization of max_load_factor. Extension, not found in TR1. Only
+ // useful if _RehashPolicy is something other than the default.
+ const _RehashPolicy&
+ __rehash_policy() const
+ { return _M_rehash_policy; }
+
+ void
+ __rehash_policy(const _RehashPolicy&);
+
+ // Lookup.
+ iterator
+ find(const key_type& __k);
+
+ const_iterator
+ find(const key_type& __k) const;
+
+ size_type
+ count(const key_type& __k) const;
+
+ std::pair<iterator, iterator>
+ equal_range(const key_type& __k);
+
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type& __k) const;
+
+ private: // Find, insert and erase helper functions
+ // ??? This dispatching is a workaround for the fact that we don't
+ // have partial specialization of member templates; it would be
+ // better to just specialize insert on __unique_keys. There may be a
+ // cleaner workaround.
+ typedef typename __gnu_cxx::__conditional_type<__unique_keys,
+ std::pair<iterator, bool>, iterator>::__type
+ _Insert_Return_Type;
+
+ typedef typename __gnu_cxx::__conditional_type<__unique_keys,
+ std::_Select1st<_Insert_Return_Type>,
+ std::_Identity<_Insert_Return_Type>
+ >::__type
+ _Insert_Conv_Type;
+
+ _Node*
+ _M_find_node(_Node*, const key_type&,
+ typename _Hashtable::_Hash_code_type) const;
+
+ iterator
+ _M_insert_bucket(const value_type&, size_type,
+ typename _Hashtable::_Hash_code_type);
+
+ std::pair<iterator, bool>
+ _M_insert(const value_type&, std::_GLIBCXX_TR1 true_type);
+
+ iterator
+ _M_insert(const value_type&, std::_GLIBCXX_TR1 false_type);
+
+ void
+ _M_erase_node(_Node*, _Node**);
+
+ public:
+ // Insert and erase
+ _Insert_Return_Type
+ insert(const value_type& __v)
+ { return _M_insert(__v, std::_GLIBCXX_TR1 integral_constant<bool,
+ __unique_keys>()); }
+
+ iterator
+ insert(iterator, const value_type& __v)
+ { return iterator(_Insert_Conv_Type()(this->insert(__v))); }
+
+ const_iterator
+ insert(const_iterator, const value_type& __v)
+ { return const_iterator(_Insert_Conv_Type()(this->insert(__v))); }
+
+ template<typename _InputIterator>
+ void
+ insert(_InputIterator __first, _InputIterator __last);
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ void
+ insert(initializer_list<value_type> __l)
+ { this->insert(__l.begin(), __l.end()); }
+#endif
+
+ iterator
+ erase(iterator);
+
+ const_iterator
+ erase(const_iterator);
+
+ size_type
+ erase(const key_type&);
+
+ iterator
+ erase(iterator, iterator);
+
+ const_iterator
+ erase(const_iterator, const_iterator);
+
+ void
+ clear();
+
+ // Set number of buckets to be appropriate for container of n element.
+ void rehash(size_type __n);
+
+ private:
+ // Unconditionally change size of bucket array to n.
+ void _M_rehash(size_type __n);
+ };
+
+
+ // Definitions of class template _Hashtable's out-of-line member functions.
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::_Node*
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_allocate_node(const value_type& __v)
+ {
+ _Node* __n = _M_node_allocator.allocate(1);
+ __try
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _M_node_allocator.construct(__n, __v);
+#else
+ _M_get_Value_allocator().construct(&__n->_M_v, __v);
+#endif
+ __n->_M_next = 0;
+ return __n;
+ }
+ __catch(...)
+ {
+ _M_node_allocator.deallocate(__n, 1);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_deallocate_node(_Node* __n)
+ {
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _M_node_allocator.destroy(__n);
+#else
+ _M_get_Value_allocator().destroy(&__n->_M_v);
+#endif
+ _M_node_allocator.deallocate(__n, 1);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_deallocate_nodes(_Node** __array, size_type __n)
+ {
+ for (size_type __i = 0; __i < __n; ++__i)
+ {
+ _Node* __p = __array[__i];
+ while (__p)
+ {
+ _Node* __tmp = __p;
+ __p = __p->_M_next;
+ _M_deallocate_node(__tmp);
+ }
+ __array[__i] = 0;
+ }
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::_Node**
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_allocate_buckets(size_type __n)
+ {
+ _Bucket_allocator_type __alloc(_M_node_allocator);
+
+ // We allocate one extra bucket to hold a sentinel, an arbitrary
+ // non-null pointer. Iterator increment relies on this.
+ _Node** __p = __alloc.allocate(__n + 1);
+ std::fill(__p, __p + __n, (_Node*) 0);
+ __p[__n] = reinterpret_cast<_Node*>(0x1000);
+ return __p;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_deallocate_buckets(_Node** __p, size_type __n)
+ {
+ _Bucket_allocator_type __alloc(_M_node_allocator);
+ __alloc.deallocate(__p, __n + 1);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _Hashtable(size_type __bucket_hint,
+ const _H1& __h1, const _H2& __h2, const _Hash& __h,
+ const _Equal& __eq, const _ExtractKey& __exk,
+ const allocator_type& __a)
+ : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(),
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>(__exk, __eq,
+ __h1, __h2, __h),
+ __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(),
+ _M_node_allocator(__a),
+ _M_bucket_count(0),
+ _M_element_count(0),
+ _M_rehash_policy()
+ {
+ _M_bucket_count = _M_rehash_policy._M_next_bkt(__bucket_hint);
+ _M_buckets = _M_allocate_buckets(_M_bucket_count);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ template<typename _InputIterator>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _Hashtable(_InputIterator __f, _InputIterator __l,
+ size_type __bucket_hint,
+ const _H1& __h1, const _H2& __h2, const _Hash& __h,
+ const _Equal& __eq, const _ExtractKey& __exk,
+ const allocator_type& __a)
+ : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(),
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>(__exk, __eq,
+ __h1, __h2, __h),
+ __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(),
+ _M_node_allocator(__a),
+ _M_bucket_count(0),
+ _M_element_count(0),
+ _M_rehash_policy()
+ {
+ _M_bucket_count = std::max(_M_rehash_policy._M_next_bkt(__bucket_hint),
+ _M_rehash_policy.
+ _M_bkt_for_elements(__detail::
+ __distance_fw(__f,
+ __l)));
+ _M_buckets = _M_allocate_buckets(_M_bucket_count);
+ __try
+ {
+ for (; __f != __l; ++__f)
+ this->insert(*__f);
+ }
+ __catch(...)
+ {
+ clear();
+ _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _Hashtable(const _Hashtable& __ht)
+ : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>(__ht),
+ __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
+ _M_node_allocator(__ht._M_node_allocator),
+ _M_bucket_count(__ht._M_bucket_count),
+ _M_element_count(__ht._M_element_count),
+ _M_rehash_policy(__ht._M_rehash_policy)
+ {
+ _M_buckets = _M_allocate_buckets(_M_bucket_count);
+ __try
+ {
+ for (size_type __i = 0; __i < __ht._M_bucket_count; ++__i)
+ {
+ _Node* __n = __ht._M_buckets[__i];
+ _Node** __tail = _M_buckets + __i;
+ while (__n)
+ {
+ *__tail = _M_allocate_node(__n->_M_v);
+ this->_M_copy_code(*__tail, __n);
+ __tail = &((*__tail)->_M_next);
+ __n = __n->_M_next;
+ }
+ }
+ }
+ __catch(...)
+ {
+ clear();
+ _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+ __throw_exception_again;
+ }
+ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _Hashtable(_Hashtable&& __ht)
+ : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht),
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>(__ht),
+ __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht),
+ _M_node_allocator(__ht._M_node_allocator),
+ _M_bucket_count(__ht._M_bucket_count),
+ _M_element_count(__ht._M_element_count),
+ _M_rehash_policy(__ht._M_rehash_policy),
+ _M_buckets(__ht._M_buckets)
+ {
+ size_type __n_bkt = __ht._M_rehash_policy._M_next_bkt(0);
+ __ht._M_buckets = __ht._M_allocate_buckets(__n_bkt);
+ __ht._M_bucket_count = __n_bkt;
+ __ht._M_element_count = 0;
+ __ht._M_rehash_policy = _RehashPolicy();
+ }
+#endif
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>&
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ operator=(const _Hashtable& __ht)
+ {
+ _Hashtable __tmp(__ht);
+ this->swap(__tmp);
+ return *this;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ ~_Hashtable()
+ {
+ clear();
+ _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ swap(_Hashtable&& __x)
+#else
+ swap(_Hashtable& __x)
+#endif
+ {
+ // The only base class with member variables is hash_code_base. We
+ // define _Hash_code_base::_M_swap because different specializations
+ // have different members.
+ __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, __chc>::_M_swap(__x);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 431. Swapping containers with unequal allocators.
+ std::__alloc_swap<_Node_allocator_type>::_S_do_it(_M_node_allocator,
+ __x._M_node_allocator);
+
+ std::swap(_M_rehash_policy, __x._M_rehash_policy);
+ std::swap(_M_buckets, __x._M_buckets);
+ std::swap(_M_bucket_count, __x._M_bucket_count);
+ std::swap(_M_element_count, __x._M_element_count);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ __rehash_policy(const _RehashPolicy& __pol)
+ {
+ _M_rehash_policy = __pol;
+ size_type __n_bkt = __pol._M_bkt_for_elements(_M_element_count);
+ if (__n_bkt > _M_bucket_count)
+ _M_rehash(__n_bkt);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ find(const key_type& __k)
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ _Node* __p = _M_find_node(_M_buckets[__n], __k, __code);
+ return __p ? iterator(__p, _M_buckets + __n) : this->end();
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::const_iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ find(const key_type& __k) const
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ _Node* __p = _M_find_node(_M_buckets[__n], __k, __code);
+ return __p ? const_iterator(__p, _M_buckets + __n) : this->end();
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::size_type
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ count(const key_type& __k) const
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ std::size_t __result = 0;
+ for (_Node* __p = _M_buckets[__n]; __p; __p = __p->_M_next)
+ if (this->_M_compare(__k, __code, __p))
+ ++__result;
+ return __result;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey, _Equal, _H1,
+ _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator,
+ typename _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey, _Equal, _H1,
+ _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ equal_range(const key_type& __k)
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ _Node** __head = _M_buckets + __n;
+ _Node* __p = _M_find_node(*__head, __k, __code);
+
+ if (__p)
+ {
+ _Node* __p1 = __p->_M_next;
+ for (; __p1; __p1 = __p1->_M_next)
+ if (!this->_M_compare(__k, __code, __p1))
+ break;
+
+ iterator __first(__p, __head);
+ iterator __last(__p1, __head);
+ if (!__p1)
+ __last._M_incr_bucket();
+ return std::make_pair(__first, __last);
+ }
+ else
+ return std::make_pair(this->end(), this->end());
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey, _Equal, _H1,
+ _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::const_iterator,
+ typename _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey, _Equal, _H1,
+ _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::const_iterator>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ equal_range(const key_type& __k) const
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ _Node** __head = _M_buckets + __n;
+ _Node* __p = _M_find_node(*__head, __k, __code);
+
+ if (__p)
+ {
+ _Node* __p1 = __p->_M_next;
+ for (; __p1; __p1 = __p1->_M_next)
+ if (!this->_M_compare(__k, __code, __p1))
+ break;
+
+ const_iterator __first(__p, __head);
+ const_iterator __last(__p1, __head);
+ if (!__p1)
+ __last._M_incr_bucket();
+ return std::make_pair(__first, __last);
+ }
+ else
+ return std::make_pair(this->end(), this->end());
+ }
+
+ // Find the node whose key compares equal to k, beginning the search
+ // at p (usually the head of a bucket). Return nil if no node is found.
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey,
+ _Equal, _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::_Node*
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_find_node(_Node* __p, const key_type& __k,
+ typename _Hashtable::_Hash_code_type __code) const
+ {
+ for (; __p; __p = __p->_M_next)
+ if (this->_M_compare(__k, __code, __p))
+ return __p;
+ return false;
+ }
+
+ // Insert v in bucket n (assumes no element with its key already present).
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_insert_bucket(const value_type& __v, size_type __n,
+ typename _Hashtable::_Hash_code_type __code)
+ {
+ std::pair<bool, std::size_t> __do_rehash
+ = _M_rehash_policy._M_need_rehash(_M_bucket_count,
+ _M_element_count, 1);
+
+ // Allocate the new node before doing the rehash so that we don't
+ // do a rehash if the allocation throws.
+ _Node* __new_node = _M_allocate_node(__v);
+
+ __try
+ {
+ if (__do_rehash.first)
+ {
+ const key_type& __k = this->_M_extract(__v);
+ __n = this->_M_bucket_index(__k, __code, __do_rehash.second);
+ _M_rehash(__do_rehash.second);
+ }
+
+ __new_node->_M_next = _M_buckets[__n];
+ this->_M_store_code(__new_node, __code);
+ _M_buckets[__n] = __new_node;
+ ++_M_element_count;
+ return iterator(__new_node, _M_buckets + __n);
+ }
+ __catch(...)
+ {
+ _M_deallocate_node(__new_node);
+ __throw_exception_again;
+ }
+ }
+
+ // Insert v if no element with its key is already present.
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ std::pair<typename _Hashtable<_Key, _Value, _Allocator,
+ _ExtractKey, _Equal, _H1,
+ _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator, bool>
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_insert(const value_type& __v, std::_GLIBCXX_TR1 true_type)
+ {
+ const key_type& __k = this->_M_extract(__v);
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ size_type __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+
+ if (_Node* __p = _M_find_node(_M_buckets[__n], __k, __code))
+ return std::make_pair(iterator(__p, _M_buckets + __n), false);
+ return std::make_pair(_M_insert_bucket(__v, __n, __code), true);
+ }
+
+ // Insert v unconditionally.
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_insert(const value_type& __v, std::_GLIBCXX_TR1 false_type)
+ {
+ std::pair<bool, std::size_t> __do_rehash
+ = _M_rehash_policy._M_need_rehash(_M_bucket_count,
+ _M_element_count, 1);
+ if (__do_rehash.first)
+ _M_rehash(__do_rehash.second);
+
+ const key_type& __k = this->_M_extract(__v);
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ size_type __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+
+ // First find the node, avoid leaking new_node if compare throws.
+ _Node* __prev = _M_find_node(_M_buckets[__n], __k, __code);
+ _Node* __new_node = _M_allocate_node(__v);
+
+ if (__prev)
+ {
+ __new_node->_M_next = __prev->_M_next;
+ __prev->_M_next = __new_node;
+ }
+ else
+ {
+ __new_node->_M_next = _M_buckets[__n];
+ _M_buckets[__n] = __new_node;
+ }
+ this->_M_store_code(__new_node, __code);
+
+ ++_M_element_count;
+ return iterator(__new_node, _M_buckets + __n);
+ }
+
+ // For erase(iterator) and erase(const_iterator).
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_erase_node(_Node* __p, _Node** __b)
+ {
+ _Node* __cur = *__b;
+ if (__cur == __p)
+ *__b = __cur->_M_next;
+ else
+ {
+ _Node* __next = __cur->_M_next;
+ while (__next != __p)
+ {
+ __cur = __next;
+ __next = __cur->_M_next;
+ }
+ __cur->_M_next = __next->_M_next;
+ }
+
+ _M_deallocate_node(__p);
+ --_M_element_count;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ template<typename _InputIterator>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ insert(_InputIterator __first, _InputIterator __last)
+ {
+ size_type __n_elt = __detail::__distance_fw(__first, __last);
+ std::pair<bool, std::size_t> __do_rehash
+ = _M_rehash_policy._M_need_rehash(_M_bucket_count,
+ _M_element_count, __n_elt);
+ if (__do_rehash.first)
+ _M_rehash(__do_rehash.second);
+
+ for (; __first != __last; ++__first)
+ this->insert(*__first);
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ erase(iterator __it)
+ {
+ iterator __result = __it;
+ ++__result;
+ _M_erase_node(__it._M_cur_node, __it._M_cur_bucket);
+ return __result;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::const_iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ erase(const_iterator __it)
+ {
+ const_iterator __result = __it;
+ ++__result;
+ _M_erase_node(__it._M_cur_node, __it._M_cur_bucket);
+ return __result;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::size_type
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ erase(const key_type& __k)
+ {
+ typename _Hashtable::_Hash_code_type __code = this->_M_hash_code(__k);
+ std::size_t __n = this->_M_bucket_index(__k, __code, _M_bucket_count);
+ size_type __result = 0;
+
+ _Node** __slot = _M_buckets + __n;
+ while (*__slot && !this->_M_compare(__k, __code, *__slot))
+ __slot = &((*__slot)->_M_next);
+
+ _Node** __saved_slot = 0;
+ while (*__slot && this->_M_compare(__k, __code, *__slot))
+ {
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 526. Is it undefined if a function in the standard changes
+ // in parameters?
+ if (&this->_M_extract((*__slot)->_M_v) != &__k)
+ {
+ _Node* __p = *__slot;
+ *__slot = __p->_M_next;
+ _M_deallocate_node(__p);
+ --_M_element_count;
+ ++__result;
+ }
+ else
+ {
+ __saved_slot = __slot;
+ __slot = &((*__slot)->_M_next);
+ }
+ }
+
+ if (__saved_slot)
+ {
+ _Node* __p = *__saved_slot;
+ *__saved_slot = __p->_M_next;
+ _M_deallocate_node(__p);
+ --_M_element_count;
+ ++__result;
+ }
+
+ return __result;
+ }
+
+ // ??? This could be optimized by taking advantage of the bucket
+ // structure, but it's not clear that it's worth doing. It probably
+ // wouldn't even be an optimization unless the load factor is large.
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ erase(iterator __first, iterator __last)
+ {
+ while (__first != __last)
+ __first = this->erase(__first);
+ return __last;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ typename _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy,
+ __chc, __cit, __uk>::const_iterator
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ erase(const_iterator __first, const_iterator __last)
+ {
+ while (__first != __last)
+ __first = this->erase(__first);
+ return __last;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ clear()
+ {
+ _M_deallocate_nodes(_M_buckets, _M_bucket_count);
+ _M_element_count = 0;
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ rehash(size_type __n)
+ {
+ _M_rehash(std::max(_M_rehash_policy._M_next_bkt(__n),
+ _M_rehash_policy._M_bkt_for_elements(_M_element_count
+ + 1)));
+ }
+
+ template<typename _Key, typename _Value,
+ typename _Allocator, typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
+ bool __chc, bool __cit, bool __uk>
+ void
+ _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
+ _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
+ _M_rehash(size_type __n)
+ {
+ _Node** __new_array = _M_allocate_buckets(__n);
+ __try
+ {
+ for (size_type __i = 0; __i < _M_bucket_count; ++__i)
+ while (_Node* __p = _M_buckets[__i])
+ {
+ std::size_t __new_index = this->_M_bucket_index(__p, __n);
+ _M_buckets[__i] = __p->_M_next;
+ __p->_M_next = __new_array[__new_index];
+ __new_array[__new_index] = __p;
+ }
+ _M_deallocate_buckets(_M_buckets, _M_bucket_count);
+ _M_bucket_count = __n;
+ _M_buckets = __new_array;
+ }
+ __catch(...)
+ {
+ // A failure here means that a hash function threw an exception.
+ // We can't restore the previous state without calling the hash
+ // function again, so the only sensible recovery is to delete
+ // everything.
+ _M_deallocate_nodes(__new_array, __n);
+ _M_deallocate_buckets(__new_array, __n);
+ _M_deallocate_nodes(_M_buckets, _M_bucket_count);
+ _M_element_count = 0;
+ __throw_exception_again;
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable_policy.h b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable_policy.h
new file mode 100644
index 0000000..8996d04
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/hashtable_policy.h
@@ -0,0 +1,865 @@
+// Internal policy header for TR1 unordered_set and unordered_map -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/hashtable_policy.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+namespace __detail
+{
+ // Helper function: return distance(first, last) for forward
+ // iterators, or 0 for input iterators.
+ template<class _Iterator>
+ inline typename std::iterator_traits<_Iterator>::difference_type
+ __distance_fw(_Iterator __first, _Iterator __last,
+ std::input_iterator_tag)
+ { return 0; }
+
+ template<class _Iterator>
+ inline typename std::iterator_traits<_Iterator>::difference_type
+ __distance_fw(_Iterator __first, _Iterator __last,
+ std::forward_iterator_tag)
+ { return std::distance(__first, __last); }
+
+ template<class _Iterator>
+ inline typename std::iterator_traits<_Iterator>::difference_type
+ __distance_fw(_Iterator __first, _Iterator __last)
+ {
+ typedef typename std::iterator_traits<_Iterator>::iterator_category _Tag;
+ return __distance_fw(__first, __last, _Tag());
+ }
+
+ template<typename _RAIter, typename _Tp>
+ _RAIter
+ __lower_bound(_RAIter __first, _RAIter __last, const _Tp& __val)
+ {
+ typedef typename std::iterator_traits<_RAIter>::difference_type _DType;
+
+ _DType __len = __last - __first;
+ while (__len > 0)
+ {
+ _DType __half = __len >> 1;
+ _RAIter __middle = __first + __half;
+ if (*__middle < __val)
+ {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+ }
+
+ // Auxiliary types used for all instantiations of _Hashtable: nodes
+ // and iterators.
+
+ // Nodes, used to wrap elements stored in the hash table. A policy
+ // template parameter of class template _Hashtable controls whether
+ // nodes also store a hash code. In some cases (e.g. strings) this
+ // may be a performance win.
+ template<typename _Value, bool __cache_hash_code>
+ struct _Hash_node;
+
+ template<typename _Value>
+ struct _Hash_node<_Value, true>
+ {
+ _Value _M_v;
+ std::size_t _M_hash_code;
+ _Hash_node* _M_next;
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename... _Args>
+ _Hash_node(_Args&&... __args)
+ : _M_v(std::forward<_Args>(__args)...),
+ _M_hash_code(), _M_next() { }
+#endif
+ };
+
+ template<typename _Value>
+ struct _Hash_node<_Value, false>
+ {
+ _Value _M_v;
+ _Hash_node* _M_next;
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename... _Args>
+ _Hash_node(_Args&&... __args)
+ : _M_v(std::forward<_Args>(__args)...),
+ _M_next() { }
+#endif
+ };
+
+ // Local iterators, used to iterate within a bucket but not between
+ // buckets.
+ template<typename _Value, bool __cache>
+ struct _Node_iterator_base
+ {
+ _Node_iterator_base(_Hash_node<_Value, __cache>* __p)
+ : _M_cur(__p) { }
+
+ void
+ _M_incr()
+ { _M_cur = _M_cur->_M_next; }
+
+ _Hash_node<_Value, __cache>* _M_cur;
+ };
+
+ template<typename _Value, bool __cache>
+ inline bool
+ operator==(const _Node_iterator_base<_Value, __cache>& __x,
+ const _Node_iterator_base<_Value, __cache>& __y)
+ { return __x._M_cur == __y._M_cur; }
+
+ template<typename _Value, bool __cache>
+ inline bool
+ operator!=(const _Node_iterator_base<_Value, __cache>& __x,
+ const _Node_iterator_base<_Value, __cache>& __y)
+ { return __x._M_cur != __y._M_cur; }
+
+ template<typename _Value, bool __constant_iterators, bool __cache>
+ struct _Node_iterator
+ : public _Node_iterator_base<_Value, __cache>
+ {
+ typedef _Value value_type;
+ typedef typename
+ __gnu_cxx::__conditional_type<__constant_iterators,
+ const _Value*, _Value*>::__type
+ pointer;
+ typedef typename
+ __gnu_cxx::__conditional_type<__constant_iterators,
+ const _Value&, _Value&>::__type
+ reference;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Node_iterator()
+ : _Node_iterator_base<_Value, __cache>(0) { }
+
+ explicit
+ _Node_iterator(_Hash_node<_Value, __cache>* __p)
+ : _Node_iterator_base<_Value, __cache>(__p) { }
+
+ reference
+ operator*() const
+ { return this->_M_cur->_M_v; }
+
+ pointer
+ operator->() const
+ { return &this->_M_cur->_M_v; }
+
+ _Node_iterator&
+ operator++()
+ {
+ this->_M_incr();
+ return *this;
+ }
+
+ _Node_iterator
+ operator++(int)
+ {
+ _Node_iterator __tmp(*this);
+ this->_M_incr();
+ return __tmp;
+ }
+ };
+
+ template<typename _Value, bool __constant_iterators, bool __cache>
+ struct _Node_const_iterator
+ : public _Node_iterator_base<_Value, __cache>
+ {
+ typedef _Value value_type;
+ typedef const _Value* pointer;
+ typedef const _Value& reference;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Node_const_iterator()
+ : _Node_iterator_base<_Value, __cache>(0) { }
+
+ explicit
+ _Node_const_iterator(_Hash_node<_Value, __cache>* __p)
+ : _Node_iterator_base<_Value, __cache>(__p) { }
+
+ _Node_const_iterator(const _Node_iterator<_Value, __constant_iterators,
+ __cache>& __x)
+ : _Node_iterator_base<_Value, __cache>(__x._M_cur) { }
+
+ reference
+ operator*() const
+ { return this->_M_cur->_M_v; }
+
+ pointer
+ operator->() const
+ { return &this->_M_cur->_M_v; }
+
+ _Node_const_iterator&
+ operator++()
+ {
+ this->_M_incr();
+ return *this;
+ }
+
+ _Node_const_iterator
+ operator++(int)
+ {
+ _Node_const_iterator __tmp(*this);
+ this->_M_incr();
+ return __tmp;
+ }
+ };
+
+ template<typename _Value, bool __cache>
+ struct _Hashtable_iterator_base
+ {
+ _Hashtable_iterator_base(_Hash_node<_Value, __cache>* __node,
+ _Hash_node<_Value, __cache>** __bucket)
+ : _M_cur_node(__node), _M_cur_bucket(__bucket) { }
+
+ void
+ _M_incr()
+ {
+ _M_cur_node = _M_cur_node->_M_next;
+ if (!_M_cur_node)
+ _M_incr_bucket();
+ }
+
+ void
+ _M_incr_bucket();
+
+ _Hash_node<_Value, __cache>* _M_cur_node;
+ _Hash_node<_Value, __cache>** _M_cur_bucket;
+ };
+
+ // Global iterators, used for arbitrary iteration within a hash
+ // table. Larger and more expensive than local iterators.
+ template<typename _Value, bool __cache>
+ void
+ _Hashtable_iterator_base<_Value, __cache>::
+ _M_incr_bucket()
+ {
+ ++_M_cur_bucket;
+
+ // This loop requires the bucket array to have a non-null sentinel.
+ while (!*_M_cur_bucket)
+ ++_M_cur_bucket;
+ _M_cur_node = *_M_cur_bucket;
+ }
+
+ template<typename _Value, bool __cache>
+ inline bool
+ operator==(const _Hashtable_iterator_base<_Value, __cache>& __x,
+ const _Hashtable_iterator_base<_Value, __cache>& __y)
+ { return __x._M_cur_node == __y._M_cur_node; }
+
+ template<typename _Value, bool __cache>
+ inline bool
+ operator!=(const _Hashtable_iterator_base<_Value, __cache>& __x,
+ const _Hashtable_iterator_base<_Value, __cache>& __y)
+ { return __x._M_cur_node != __y._M_cur_node; }
+
+ template<typename _Value, bool __constant_iterators, bool __cache>
+ struct _Hashtable_iterator
+ : public _Hashtable_iterator_base<_Value, __cache>
+ {
+ typedef _Value value_type;
+ typedef typename
+ __gnu_cxx::__conditional_type<__constant_iterators,
+ const _Value*, _Value*>::__type
+ pointer;
+ typedef typename
+ __gnu_cxx::__conditional_type<__constant_iterators,
+ const _Value&, _Value&>::__type
+ reference;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Hashtable_iterator()
+ : _Hashtable_iterator_base<_Value, __cache>(0, 0) { }
+
+ _Hashtable_iterator(_Hash_node<_Value, __cache>* __p,
+ _Hash_node<_Value, __cache>** __b)
+ : _Hashtable_iterator_base<_Value, __cache>(__p, __b) { }
+
+ explicit
+ _Hashtable_iterator(_Hash_node<_Value, __cache>** __b)
+ : _Hashtable_iterator_base<_Value, __cache>(*__b, __b) { }
+
+ reference
+ operator*() const
+ { return this->_M_cur_node->_M_v; }
+
+ pointer
+ operator->() const
+ { return &this->_M_cur_node->_M_v; }
+
+ _Hashtable_iterator&
+ operator++()
+ {
+ this->_M_incr();
+ return *this;
+ }
+
+ _Hashtable_iterator
+ operator++(int)
+ {
+ _Hashtable_iterator __tmp(*this);
+ this->_M_incr();
+ return __tmp;
+ }
+ };
+
+ template<typename _Value, bool __constant_iterators, bool __cache>
+ struct _Hashtable_const_iterator
+ : public _Hashtable_iterator_base<_Value, __cache>
+ {
+ typedef _Value value_type;
+ typedef const _Value* pointer;
+ typedef const _Value& reference;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
+ _Hashtable_const_iterator()
+ : _Hashtable_iterator_base<_Value, __cache>(0, 0) { }
+
+ _Hashtable_const_iterator(_Hash_node<_Value, __cache>* __p,
+ _Hash_node<_Value, __cache>** __b)
+ : _Hashtable_iterator_base<_Value, __cache>(__p, __b) { }
+
+ explicit
+ _Hashtable_const_iterator(_Hash_node<_Value, __cache>** __b)
+ : _Hashtable_iterator_base<_Value, __cache>(*__b, __b) { }
+
+ _Hashtable_const_iterator(const _Hashtable_iterator<_Value,
+ __constant_iterators, __cache>& __x)
+ : _Hashtable_iterator_base<_Value, __cache>(__x._M_cur_node,
+ __x._M_cur_bucket) { }
+
+ reference
+ operator*() const
+ { return this->_M_cur_node->_M_v; }
+
+ pointer
+ operator->() const
+ { return &this->_M_cur_node->_M_v; }
+
+ _Hashtable_const_iterator&
+ operator++()
+ {
+ this->_M_incr();
+ return *this;
+ }
+
+ _Hashtable_const_iterator
+ operator++(int)
+ {
+ _Hashtable_const_iterator __tmp(*this);
+ this->_M_incr();
+ return __tmp;
+ }
+ };
+
+
+ // Many of class template _Hashtable's template parameters are policy
+ // classes. These are defaults for the policies.
+
+ // Default range hashing function: use division to fold a large number
+ // into the range [0, N).
+ struct _Mod_range_hashing
+ {
+ typedef std::size_t first_argument_type;
+ typedef std::size_t second_argument_type;
+ typedef std::size_t result_type;
+
+ result_type
+ operator()(first_argument_type __num, second_argument_type __den) const
+ { return __num % __den; }
+ };
+
+ // Default ranged hash function H. In principle it should be a
+ // function object composed from objects of type H1 and H2 such that
+ // h(k, N) = h2(h1(k), N), but that would mean making extra copies of
+ // h1 and h2. So instead we'll just use a tag to tell class template
+ // hashtable to do that composition.
+ struct _Default_ranged_hash { };
+
+ // Default value for rehash policy. Bucket size is (usually) the
+ // smallest prime that keeps the load factor small enough.
+ struct _Prime_rehash_policy
+ {
+ _Prime_rehash_policy(float __z = 1.0)
+ : _M_max_load_factor(__z), _M_growth_factor(2.f), _M_next_resize(0) { }
+
+ float
+ max_load_factor() const
+ { return _M_max_load_factor; }
+
+ // Return a bucket size no smaller than n.
+ std::size_t
+ _M_next_bkt(std::size_t __n) const;
+
+ // Return a bucket count appropriate for n elements
+ std::size_t
+ _M_bkt_for_elements(std::size_t __n) const;
+
+ // __n_bkt is current bucket count, __n_elt is current element count,
+ // and __n_ins is number of elements to be inserted. Do we need to
+ // increase bucket count? If so, return make_pair(true, n), where n
+ // is the new bucket count. If not, return make_pair(false, 0).
+ std::pair<bool, std::size_t>
+ _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
+ std::size_t __n_ins) const;
+
+ enum { _S_n_primes = sizeof(unsigned long) != 8 ? 256 : 256 + 48 };
+
+ float _M_max_load_factor;
+ float _M_growth_factor;
+ mutable std::size_t _M_next_resize;
+ };
+
+ extern const unsigned long __prime_list[];
+
+ // XXX This is a hack. There's no good reason for any of
+ // _Prime_rehash_policy's member functions to be inline.
+
+ // Return a prime no smaller than n.
+ inline std::size_t
+ _Prime_rehash_policy::
+ _M_next_bkt(std::size_t __n) const
+ {
+ const unsigned long* __p = __lower_bound(__prime_list, __prime_list
+ + _S_n_primes, __n);
+ _M_next_resize =
+ static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
+ return *__p;
+ }
+
+ // Return the smallest prime p such that alpha p >= n, where alpha
+ // is the load factor.
+ inline std::size_t
+ _Prime_rehash_policy::
+ _M_bkt_for_elements(std::size_t __n) const
+ {
+ const float __min_bkts = __n / _M_max_load_factor;
+ const unsigned long* __p = __lower_bound(__prime_list, __prime_list
+ + _S_n_primes, __min_bkts);
+ _M_next_resize =
+ static_cast<std::size_t>(__builtin_ceil(*__p * _M_max_load_factor));
+ return *__p;
+ }
+
+ // Finds the smallest prime p such that alpha p > __n_elt + __n_ins.
+ // If p > __n_bkt, return make_pair(true, p); otherwise return
+ // make_pair(false, 0). In principle this isn't very different from
+ // _M_bkt_for_elements.
+
+ // The only tricky part is that we're caching the element count at
+ // which we need to rehash, so we don't have to do a floating-point
+ // multiply for every insertion.
+
+ inline std::pair<bool, std::size_t>
+ _Prime_rehash_policy::
+ _M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
+ std::size_t __n_ins) const
+ {
+ if (__n_elt + __n_ins > _M_next_resize)
+ {
+ float __min_bkts = ((float(__n_ins) + float(__n_elt))
+ / _M_max_load_factor);
+ if (__min_bkts > __n_bkt)
+ {
+ __min_bkts = std::max(__min_bkts, _M_growth_factor * __n_bkt);
+ const unsigned long* __p =
+ __lower_bound(__prime_list, __prime_list + _S_n_primes,
+ __min_bkts);
+ _M_next_resize = static_cast<std::size_t>
+ (__builtin_ceil(*__p * _M_max_load_factor));
+ return std::make_pair(true, *__p);
+ }
+ else
+ {
+ _M_next_resize = static_cast<std::size_t>
+ (__builtin_ceil(__n_bkt * _M_max_load_factor));
+ return std::make_pair(false, 0);
+ }
+ }
+ else
+ return std::make_pair(false, 0);
+ }
+
+ // Base classes for std::tr1::_Hashtable. We define these base
+ // classes because in some cases we want to do different things
+ // depending on the value of a policy class. In some cases the
+ // policy class affects which member functions and nested typedefs
+ // are defined; we handle that by specializing base class templates.
+ // Several of the base class templates need to access other members
+ // of class template _Hashtable, so we use the "curiously recurring
+ // template pattern" for them.
+
+ // class template _Map_base. If the hashtable has a value type of the
+ // form pair<T1, T2> and a key extraction policy that returns the
+ // first part of the pair, the hashtable gets a mapped_type typedef.
+ // If it satisfies those criteria and also has unique keys, then it
+ // also gets an operator[].
+ template<typename _Key, typename _Value, typename _Ex, bool __unique,
+ typename _Hashtable>
+ struct _Map_base { };
+
+ template<typename _Key, typename _Pair, typename _Hashtable>
+ struct _Map_base<_Key, _Pair, std::_Select1st<_Pair>, false, _Hashtable>
+ {
+ typedef typename _Pair::second_type mapped_type;
+ };
+
+ template<typename _Key, typename _Pair, typename _Hashtable>
+ struct _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>
+ {
+ typedef typename _Pair::second_type mapped_type;
+
+ mapped_type&
+ operator[](const _Key& __k);
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // DR 761. unordered_map needs an at() member function.
+ mapped_type&
+ at(const _Key& __k);
+
+ const mapped_type&
+ at(const _Key& __k) const;
+#endif
+ };
+
+ template<typename _Key, typename _Pair, typename _Hashtable>
+ typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+ true, _Hashtable>::mapped_type&
+ _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+ operator[](const _Key& __k)
+ {
+ _Hashtable* __h = static_cast<_Hashtable*>(this);
+ typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+ std::size_t __n = __h->_M_bucket_index(__k, __code,
+ __h->_M_bucket_count);
+
+ typename _Hashtable::_Node* __p =
+ __h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+ if (!__p)
+ return __h->_M_insert_bucket(std::make_pair(__k, mapped_type()),
+ __n, __code)->second;
+ return (__p->_M_v).second;
+ }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<typename _Key, typename _Pair, typename _Hashtable>
+ typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+ true, _Hashtable>::mapped_type&
+ _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+ at(const _Key& __k)
+ {
+ _Hashtable* __h = static_cast<_Hashtable*>(this);
+ typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+ std::size_t __n = __h->_M_bucket_index(__k, __code,
+ __h->_M_bucket_count);
+
+ typename _Hashtable::_Node* __p =
+ __h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+ if (!__p)
+ __throw_out_of_range(__N("_Map_base::at"));
+ return (__p->_M_v).second;
+ }
+
+ template<typename _Key, typename _Pair, typename _Hashtable>
+ const typename _Map_base<_Key, _Pair, std::_Select1st<_Pair>,
+ true, _Hashtable>::mapped_type&
+ _Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::
+ at(const _Key& __k) const
+ {
+ const _Hashtable* __h = static_cast<const _Hashtable*>(this);
+ typename _Hashtable::_Hash_code_type __code = __h->_M_hash_code(__k);
+ std::size_t __n = __h->_M_bucket_index(__k, __code,
+ __h->_M_bucket_count);
+
+ typename _Hashtable::_Node* __p =
+ __h->_M_find_node(__h->_M_buckets[__n], __k, __code);
+ if (!__p)
+ __throw_out_of_range(__N("_Map_base::at"));
+ return (__p->_M_v).second;
+ }
+#endif
+
+ // class template _Rehash_base. Give hashtable the max_load_factor
+ // functions iff the rehash policy is _Prime_rehash_policy.
+ template<typename _RehashPolicy, typename _Hashtable>
+ struct _Rehash_base { };
+
+ template<typename _Hashtable>
+ struct _Rehash_base<_Prime_rehash_policy, _Hashtable>
+ {
+ float
+ max_load_factor() const
+ {
+ const _Hashtable* __this = static_cast<const _Hashtable*>(this);
+ return __this->__rehash_policy().max_load_factor();
+ }
+
+ void
+ max_load_factor(float __z)
+ {
+ _Hashtable* __this = static_cast<_Hashtable*>(this);
+ __this->__rehash_policy(_Prime_rehash_policy(__z));
+ }
+ };
+
+ // Class template _Hash_code_base. Encapsulates two policy issues that
+ // aren't quite orthogonal.
+ // (1) the difference between using a ranged hash function and using
+ // the combination of a hash function and a range-hashing function.
+ // In the former case we don't have such things as hash codes, so
+ // we have a dummy type as placeholder.
+ // (2) Whether or not we cache hash codes. Caching hash codes is
+ // meaningless if we have a ranged hash function.
+ // We also put the key extraction and equality comparison function
+ // objects here, for convenience.
+
+ // Primary template: unused except as a hook for specializations.
+ template<typename _Key, typename _Value,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash,
+ bool __cache_hash_code>
+ struct _Hash_code_base;
+
+ // Specialization: ranged hash function, no caching hash codes. H1
+ // and H2 are provided but ignored. We define a dummy hash code type.
+ template<typename _Key, typename _Value,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash>
+ struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+ _Hash, false>
+ {
+ protected:
+ _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+ const _H1&, const _H2&, const _Hash& __h)
+ : _M_extract(__ex), _M_eq(__eq), _M_ranged_hash(__h) { }
+
+ typedef void* _Hash_code_type;
+
+ _Hash_code_type
+ _M_hash_code(const _Key& __key) const
+ { return 0; }
+
+ std::size_t
+ _M_bucket_index(const _Key& __k, _Hash_code_type,
+ std::size_t __n) const
+ { return _M_ranged_hash(__k, __n); }
+
+ std::size_t
+ _M_bucket_index(const _Hash_node<_Value, false>* __p,
+ std::size_t __n) const
+ { return _M_ranged_hash(_M_extract(__p->_M_v), __n); }
+
+ bool
+ _M_compare(const _Key& __k, _Hash_code_type,
+ _Hash_node<_Value, false>* __n) const
+ { return _M_eq(__k, _M_extract(__n->_M_v)); }
+
+ void
+ _M_store_code(_Hash_node<_Value, false>*, _Hash_code_type) const
+ { }
+
+ void
+ _M_copy_code(_Hash_node<_Value, false>*,
+ const _Hash_node<_Value, false>*) const
+ { }
+
+ void
+ _M_swap(_Hash_code_base& __x)
+ {
+ std::swap(_M_extract, __x._M_extract);
+ std::swap(_M_eq, __x._M_eq);
+ std::swap(_M_ranged_hash, __x._M_ranged_hash);
+ }
+
+ protected:
+ _ExtractKey _M_extract;
+ _Equal _M_eq;
+ _Hash _M_ranged_hash;
+ };
+
+
+ // No specialization for ranged hash function while caching hash codes.
+ // That combination is meaningless, and trying to do it is an error.
+
+
+ // Specialization: ranged hash function, cache hash codes. This
+ // combination is meaningless, so we provide only a declaration
+ // and no definition.
+ template<typename _Key, typename _Value,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2, typename _Hash>
+ struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+ _Hash, true>;
+
+ // Specialization: hash function and range-hashing function, no
+ // caching of hash codes. H is provided but ignored. Provides
+ // typedef and accessor required by TR1.
+ template<typename _Key, typename _Value,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2>
+ struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+ _Default_ranged_hash, false>
+ {
+ typedef _H1 hasher;
+
+ hasher
+ hash_function() const
+ { return _M_h1; }
+
+ protected:
+ _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+ const _H1& __h1, const _H2& __h2,
+ const _Default_ranged_hash&)
+ : _M_extract(__ex), _M_eq(__eq), _M_h1(__h1), _M_h2(__h2) { }
+
+ typedef std::size_t _Hash_code_type;
+
+ _Hash_code_type
+ _M_hash_code(const _Key& __k) const
+ { return _M_h1(__k); }
+
+ std::size_t
+ _M_bucket_index(const _Key&, _Hash_code_type __c,
+ std::size_t __n) const
+ { return _M_h2(__c, __n); }
+
+ std::size_t
+ _M_bucket_index(const _Hash_node<_Value, false>* __p,
+ std::size_t __n) const
+ { return _M_h2(_M_h1(_M_extract(__p->_M_v)), __n); }
+
+ bool
+ _M_compare(const _Key& __k, _Hash_code_type,
+ _Hash_node<_Value, false>* __n) const
+ { return _M_eq(__k, _M_extract(__n->_M_v)); }
+
+ void
+ _M_store_code(_Hash_node<_Value, false>*, _Hash_code_type) const
+ { }
+
+ void
+ _M_copy_code(_Hash_node<_Value, false>*,
+ const _Hash_node<_Value, false>*) const
+ { }
+
+ void
+ _M_swap(_Hash_code_base& __x)
+ {
+ std::swap(_M_extract, __x._M_extract);
+ std::swap(_M_eq, __x._M_eq);
+ std::swap(_M_h1, __x._M_h1);
+ std::swap(_M_h2, __x._M_h2);
+ }
+
+ protected:
+ _ExtractKey _M_extract;
+ _Equal _M_eq;
+ _H1 _M_h1;
+ _H2 _M_h2;
+ };
+
+ // Specialization: hash function and range-hashing function,
+ // caching hash codes. H is provided but ignored. Provides
+ // typedef and accessor required by TR1.
+ template<typename _Key, typename _Value,
+ typename _ExtractKey, typename _Equal,
+ typename _H1, typename _H2>
+ struct _Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2,
+ _Default_ranged_hash, true>
+ {
+ typedef _H1 hasher;
+
+ hasher
+ hash_function() const
+ { return _M_h1; }
+
+ protected:
+ _Hash_code_base(const _ExtractKey& __ex, const _Equal& __eq,
+ const _H1& __h1, const _H2& __h2,
+ const _Default_ranged_hash&)
+ : _M_extract(__ex), _M_eq(__eq), _M_h1(__h1), _M_h2(__h2) { }
+
+ typedef std::size_t _Hash_code_type;
+
+ _Hash_code_type
+ _M_hash_code(const _Key& __k) const
+ { return _M_h1(__k); }
+
+ std::size_t
+ _M_bucket_index(const _Key&, _Hash_code_type __c,
+ std::size_t __n) const
+ { return _M_h2(__c, __n); }
+
+ std::size_t
+ _M_bucket_index(const _Hash_node<_Value, true>* __p,
+ std::size_t __n) const
+ { return _M_h2(__p->_M_hash_code, __n); }
+
+ bool
+ _M_compare(const _Key& __k, _Hash_code_type __c,
+ _Hash_node<_Value, true>* __n) const
+ { return __c == __n->_M_hash_code && _M_eq(__k, _M_extract(__n->_M_v)); }
+
+ void
+ _M_store_code(_Hash_node<_Value, true>* __n, _Hash_code_type __c) const
+ { __n->_M_hash_code = __c; }
+
+ void
+ _M_copy_code(_Hash_node<_Value, true>* __to,
+ const _Hash_node<_Value, true>* __from) const
+ { __to->_M_hash_code = __from->_M_hash_code; }
+
+ void
+ _M_swap(_Hash_code_base& __x)
+ {
+ std::swap(_M_extract, __x._M_extract);
+ std::swap(_M_eq, __x._M_eq);
+ std::swap(_M_h1, __x._M_h1);
+ std::swap(_M_h2, __x._M_h2);
+ }
+
+ protected:
+ _ExtractKey _M_extract;
+ _Equal _M_eq;
+ _H1 _M_h1;
+ _H2 _M_h2;
+ };
+} // namespace __detail
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random
new file mode 100644
index 0000000..0cf4dc4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random
@@ -0,0 +1,2407 @@
+// random number generation -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file tr1_impl/random
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // [5.1] Random number generation
+
+ /**
+ * @defgroup tr1_random Random Number Generation
+ * @ingroup numerics
+ * A facility for generating random numbers on selected distributions.
+ * @{
+ */
+
+ /*
+ * Implementation-space details.
+ */
+ namespace __detail
+ {
+ template<typename _UIntType, int __w,
+ bool = __w < std::numeric_limits<_UIntType>::digits>
+ struct _Shift
+ { static const _UIntType __value = 0; };
+
+ template<typename _UIntType, int __w>
+ struct _Shift<_UIntType, __w, true>
+ { static const _UIntType __value = _UIntType(1) << __w; };
+
+ template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool>
+ struct _Mod;
+
+ // Dispatch based on modulus value to prevent divide-by-zero compile-time
+ // errors when m == 0.
+ template<typename _Tp, _Tp __a, _Tp __c, _Tp __m>
+ inline _Tp
+ __mod(_Tp __x)
+ { return _Mod<_Tp, __a, __c, __m, __m == 0>::__calc(__x); }
+
+ typedef __gnu_cxx::__conditional_type<(sizeof(unsigned) == 4),
+ unsigned, unsigned long>::__type _UInt32Type;
+
+ /*
+ * An adaptor class for converting the output of any Generator into
+ * the input for a specific Distribution.
+ */
+ template<typename _Engine, typename _Distribution>
+ struct _Adaptor
+ {
+ typedef typename remove_reference<_Engine>::type _BEngine;
+ typedef typename _BEngine::result_type _Engine_result_type;
+ typedef typename _Distribution::input_type result_type;
+
+ public:
+ _Adaptor(const _Engine& __g)
+ : _M_g(__g) { }
+
+ result_type
+ min() const
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g.min();
+ else
+ __return_value = result_type(0);
+ return __return_value;
+ }
+
+ result_type
+ max() const
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g.max();
+ else if (!is_integral<result_type>::value)
+ __return_value = result_type(1);
+ else
+ __return_value = std::numeric_limits<result_type>::max() - 1;
+ return __return_value;
+ }
+
+ /*
+ * Converts a value generated by the adapted random number generator
+ * into a value in the input domain for the dependent random number
+ * distribution.
+ *
+ * Because the type traits are compile time constants only the
+ * appropriate clause of the if statements will actually be emitted
+ * by the compiler.
+ */
+ result_type
+ operator()()
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g();
+ else if (!is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type(_M_g() - _M_g.min())
+ / result_type(_M_g.max() - _M_g.min());
+ else if (is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type(_M_g() - _M_g.min())
+ / result_type(_M_g.max() - _M_g.min() + result_type(1));
+ else
+ __return_value = (((_M_g() - _M_g.min())
+ / (_M_g.max() - _M_g.min()))
+ * std::numeric_limits<result_type>::max());
+ return __return_value;
+ }
+
+ private:
+ _Engine _M_g;
+ };
+
+ // Specialization for _Engine*.
+ template<typename _Engine, typename _Distribution>
+ struct _Adaptor<_Engine*, _Distribution>
+ {
+ typedef typename _Engine::result_type _Engine_result_type;
+ typedef typename _Distribution::input_type result_type;
+
+ public:
+ _Adaptor(_Engine* __g)
+ : _M_g(__g) { }
+
+ result_type
+ min() const
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g->min();
+ else
+ __return_value = result_type(0);
+ return __return_value;
+ }
+
+ result_type
+ max() const
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = _M_g->max();
+ else if (!is_integral<result_type>::value)
+ __return_value = result_type(1);
+ else
+ __return_value = std::numeric_limits<result_type>::max() - 1;
+ return __return_value;
+ }
+
+ result_type
+ operator()()
+ {
+ result_type __return_value;
+ if (is_integral<_Engine_result_type>::value
+ && is_integral<result_type>::value)
+ __return_value = (*_M_g)();
+ else if (!is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type((*_M_g)() - _M_g->min())
+ / result_type(_M_g->max() - _M_g->min());
+ else if (is_integral<_Engine_result_type>::value
+ && !is_integral<result_type>::value)
+ __return_value = result_type((*_M_g)() - _M_g->min())
+ / result_type(_M_g->max() - _M_g->min() + result_type(1));
+ else
+ __return_value = ((((*_M_g)() - _M_g->min())
+ / (_M_g->max() - _M_g->min()))
+ * std::numeric_limits<result_type>::max());
+ return __return_value;
+ }
+
+ private:
+ _Engine* _M_g;
+ };
+ } // namespace __detail
+
+ /**
+ * Produces random numbers on a given distribution function using a
+ * non-uniform random number generation engine.
+ *
+ * @todo the engine_value_type needs to be studied more carefully.
+ */
+ template<typename _Engine, typename _Dist>
+ class variate_generator
+ {
+ // Concept requirements.
+ __glibcxx_class_requires(_Engine, _CopyConstructibleConcept)
+ // __glibcxx_class_requires(_Engine, _EngineConcept)
+ // __glibcxx_class_requires(_Dist, _EngineConcept)
+
+ public:
+ typedef _Engine engine_type;
+ typedef __detail::_Adaptor<_Engine, _Dist> engine_value_type;
+ typedef _Dist distribution_type;
+ typedef typename _Dist::result_type result_type;
+
+ // tr1:5.1.1 table 5.1 requirement
+ typedef typename __gnu_cxx::__enable_if<
+ is_arithmetic<result_type>::value, result_type>::__type _IsValidType;
+
+ /**
+ * Constructs a variate generator with the uniform random number
+ * generator @p __eng for the random distribution @p __dist.
+ *
+ * @throws Any exceptions which may thrown by the copy constructors of
+ * the @p _Engine or @p _Dist objects.
+ */
+ variate_generator(engine_type __eng, distribution_type __dist)
+ : _M_engine(__eng), _M_dist(__dist) { }
+
+ /**
+ * Gets the next generated value on the distribution.
+ */
+ result_type
+ operator()()
+ { return _M_dist(_M_engine); }
+
+ /**
+ * WTF?
+ */
+ template<typename _Tp>
+ result_type
+ operator()(_Tp __value)
+ { return _M_dist(_M_engine, __value); }
+
+ /**
+ * Gets a reference to the underlying uniform random number generator
+ * object.
+ */
+ engine_value_type&
+ engine()
+ { return _M_engine; }
+
+ /**
+ * Gets a const reference to the underlying uniform random number
+ * generator object.
+ */
+ const engine_value_type&
+ engine() const
+ { return _M_engine; }
+
+ /**
+ * Gets a reference to the underlying random distribution.
+ */
+ distribution_type&
+ distribution()
+ { return _M_dist; }
+
+ /**
+ * Gets a const reference to the underlying random distribution.
+ */
+ const distribution_type&
+ distribution() const
+ { return _M_dist; }
+
+ /**
+ * Gets the closed lower bound of the distribution interval.
+ */
+ result_type
+ min() const
+ { return this->distribution().min(); }
+
+ /**
+ * Gets the closed upper bound of the distribution interval.
+ */
+ result_type
+ max() const
+ { return this->distribution().max(); }
+
+ private:
+ engine_value_type _M_engine;
+ distribution_type _M_dist;
+ };
+
+
+ /**
+ * @defgroup tr1_random_generators Random Number Generators
+ * @ingroup tr1_random
+ *
+ * These classes define objects which provide random or pseudorandom
+ * numbers, either from a discrete or a continuous interval. The
+ * random number generator supplied as a part of this library are
+ * all uniform random number generators which provide a sequence of
+ * random number uniformly distributed over their range.
+ *
+ * A number generator is a function object with an operator() that
+ * takes zero arguments and returns a number.
+ *
+ * A compliant random number generator must satisfy the following
+ * requirements. <table border=1 cellpadding=10 cellspacing=0>
+ * <caption align=top>Random Number Generator Requirements</caption>
+ * <tr><td>To be documented.</td></tr> </table>
+ *
+ * @{
+ */
+
+ /**
+ * @brief A model of a linear congruential random number generator.
+ *
+ * A random number generator that produces pseudorandom numbers using the
+ * linear function @f$x_{i+1}\leftarrow(ax_{i} + c) \bmod m @f$.
+ *
+ * The template parameter @p _UIntType must be an unsigned integral type
+ * large enough to store values up to (__m-1). If the template parameter
+ * @p __m is 0, the modulus @p __m used is
+ * std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template
+ * parameters @p __a and @p __c must be less than @p __m.
+ *
+ * The size of the state is @f$ 1 @f$.
+ */
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ class linear_congruential
+ {
+ __glibcxx_class_requires(_UIntType, _UnsignedIntegerConcept)
+ // __glibcpp_class_requires(__a < __m && __c < __m)
+
+ public:
+ /** The type of the generated random value. */
+ typedef _UIntType result_type;
+
+ /** The multiplier. */
+ static const _UIntType multiplier = __a;
+ /** An increment. */
+ static const _UIntType increment = __c;
+ /** The modulus. */
+ static const _UIntType modulus = __m;
+
+ /**
+ * Constructs a %linear_congruential random number generator engine with
+ * seed @p __s. The default seed value is 1.
+ *
+ * @param __s The initial seed value.
+ */
+ explicit
+ linear_congruential(unsigned long __x0 = 1)
+ { this->seed(__x0); }
+
+ /**
+ * Constructs a %linear_congruential random number generator engine
+ * seeded from the generator function @p __g.
+ *
+ * @param __g The seed generator function.
+ */
+ template<class _Gen>
+ linear_congruential(_Gen& __g)
+ { this->seed(__g); }
+
+ /**
+ * Reseeds the %linear_congruential random number generator engine
+ * sequence to the seed @g __s.
+ *
+ * @param __s The new seed.
+ */
+ void
+ seed(unsigned long __s = 1);
+
+ /**
+ * Reseeds the %linear_congruential random number generator engine
+ * sequence using values from the generator function @p __g.
+ *
+ * @param __g the seed generator function.
+ */
+ template<class _Gen>
+ void
+ seed(_Gen& __g)
+ { seed(__g, typename is_fundamental<_Gen>::type()); }
+
+ /**
+ * Gets the smallest possible value in the output range.
+ *
+ * The minimum depends on the @p __c parameter: if it is zero, the
+ * minimum generated must be > 0, otherwise 0 is allowed.
+ */
+ result_type
+ min() const
+ { return (__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0) ? 1 : 0; }
+
+ /**
+ * Gets the largest possible value in the output range.
+ */
+ result_type
+ max() const
+ { return __m - 1; }
+
+ /**
+ * Gets the next random number in the sequence.
+ */
+ result_type
+ operator()();
+
+ /**
+ * Compares two linear congruential random number generator
+ * objects of the same type for equality.
+ *
+ * @param __lhs A linear congruential random number generator object.
+ * @param __rhs Another linear congruential random number generator obj.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const linear_congruential& __lhs,
+ const linear_congruential& __rhs)
+ { return __lhs._M_x == __rhs._M_x; }
+
+ /**
+ * Compares two linear congruential random number generator
+ * objects of the same type for inequality.
+ *
+ * @param __lhs A linear congruential random number generator object.
+ * @param __rhs Another linear congruential random number generator obj.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const linear_congruential& __lhs,
+ const linear_congruential& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Writes the textual representation of the state x(i) of x to @p __os.
+ *
+ * @param __os The output stream.
+ * @param __lcr A % linear_congruential random number generator.
+ * @returns __os.
+ */
+ template<class _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+ _UIntType1 __m1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const linear_congruential<_UIntType1, __a1, __c1,
+ __m1>& __lcr);
+
+ /**
+ * Sets the state of the engine by reading its textual
+ * representation from @p __is.
+ *
+ * The textual representation must have been previously written using an
+ * output stream whose imbued locale and whose type's template
+ * specialization arguments _CharT and _Traits were the same as those of
+ * @p __is.
+ *
+ * @param __is The input stream.
+ * @param __lcr A % linear_congruential random number generator.
+ * @returns __is.
+ */
+ template<class _UIntType1, _UIntType1 __a1, _UIntType1 __c1,
+ _UIntType1 __m1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ linear_congruential<_UIntType1, __a1, __c1, __m1>& __lcr);
+
+ private:
+ template<class _Gen>
+ void
+ seed(_Gen& __g, true_type)
+ { return seed(static_cast<unsigned long>(__g)); }
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g, false_type);
+
+ _UIntType _M_x;
+ };
+
+ /**
+ * The classic Minimum Standard rand0 of Lewis, Goodman, and Miller.
+ */
+ typedef linear_congruential<unsigned long, 16807, 0, 2147483647> minstd_rand0;
+
+ /**
+ * An alternative LCR (Lehmer Generator function) .
+ */
+ typedef linear_congruential<unsigned long, 48271, 0, 2147483647> minstd_rand;
+
+
+ /**
+ * A generalized feedback shift register discrete random number generator.
+ *
+ * This algorithm avoids multiplication and division and is designed to be
+ * friendly to a pipelined architecture. If the parameters are chosen
+ * correctly, this generator will produce numbers with a very long period and
+ * fairly good apparent entropy, although still not cryptographically strong.
+ *
+ * The best way to use this generator is with the predefined mt19937 class.
+ *
+ * This algorithm was originally invented by Makoto Matsumoto and
+ * Takuji Nishimura.
+ *
+ * @var word_size The number of bits in each element of the state vector.
+ * @var state_size The degree of recursion.
+ * @var shift_size The period parameter.
+ * @var mask_bits The separation point bit index.
+ * @var parameter_a The last row of the twist matrix.
+ * @var output_u The first right-shift tempering matrix parameter.
+ * @var output_s The first left-shift tempering matrix parameter.
+ * @var output_b The first left-shift tempering matrix mask.
+ * @var output_t The second left-shift tempering matrix parameter.
+ * @var output_c The second left-shift tempering matrix mask.
+ * @var output_l The second right-shift tempering matrix parameter.
+ */
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s, _UIntType __b, int __t,
+ _UIntType __c, int __l>
+ class mersenne_twister
+ {
+ __glibcxx_class_requires(_UIntType, _UnsignedIntegerConcept)
+
+ public:
+ // types
+ typedef _UIntType result_type;
+
+ // parameter values
+ static const int word_size = __w;
+ static const int state_size = __n;
+ static const int shift_size = __m;
+ static const int mask_bits = __r;
+ static const _UIntType parameter_a = __a;
+ static const int output_u = __u;
+ static const int output_s = __s;
+ static const _UIntType output_b = __b;
+ static const int output_t = __t;
+ static const _UIntType output_c = __c;
+ static const int output_l = __l;
+
+ // constructors and member function
+ mersenne_twister()
+ { seed(); }
+
+ explicit
+ mersenne_twister(unsigned long __value)
+ { seed(__value); }
+
+ template<class _Gen>
+ mersenne_twister(_Gen& __g)
+ { seed(__g); }
+
+ void
+ seed()
+ { seed(5489UL); }
+
+ void
+ seed(unsigned long __value);
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g)
+ { seed(__g, typename is_fundamental<_Gen>::type()); }
+
+ result_type
+ min() const
+ { return 0; };
+
+ result_type
+ max() const
+ { return __detail::_Shift<_UIntType, __w>::__value - 1; }
+
+ result_type
+ operator()();
+
+ /**
+ * Compares two % mersenne_twister random number generator objects of
+ * the same type for equality.
+ *
+ * @param __lhs A % mersenne_twister random number generator object.
+ * @param __rhs Another % mersenne_twister random number generator
+ * object.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const mersenne_twister& __lhs,
+ const mersenne_twister& __rhs)
+ { return std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x); }
+
+ /**
+ * Compares two % mersenne_twister random number generator objects of
+ * the same type for inequality.
+ *
+ * @param __lhs A % mersenne_twister random number generator object.
+ * @param __rhs Another % mersenne_twister random number generator
+ * object.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const mersenne_twister& __lhs,
+ const mersenne_twister& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Inserts the current state of a % mersenne_twister random number
+ * generator engine @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A % mersenne_twister random number generator engine.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<class _UIntType1, int __w1, int __n1, int __m1, int __r1,
+ _UIntType1 __a1, int __u1, int __s1, _UIntType1 __b1, int __t1,
+ _UIntType1 __c1, int __l1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const mersenne_twister<_UIntType1, __w1, __n1, __m1, __r1,
+ __a1, __u1, __s1, __b1, __t1, __c1, __l1>& __x);
+
+ /**
+ * Extracts the current state of a % mersenne_twister random number
+ * generator engine @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A % mersenne_twister random number generator engine.
+ *
+ * @returns The input stream with the state of @p __x extracted or in
+ * an error state.
+ */
+ template<class _UIntType1, int __w1, int __n1, int __m1, int __r1,
+ _UIntType1 __a1, int __u1, int __s1, _UIntType1 __b1, int __t1,
+ _UIntType1 __c1, int __l1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ mersenne_twister<_UIntType1, __w1, __n1, __m1, __r1,
+ __a1, __u1, __s1, __b1, __t1, __c1, __l1>& __x);
+
+ private:
+ template<class _Gen>
+ void
+ seed(_Gen& __g, true_type)
+ { return seed(static_cast<unsigned long>(__g)); }
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g, false_type);
+
+ _UIntType _M_x[state_size];
+ int _M_p;
+ };
+
+ /**
+ * The classic Mersenne Twister.
+ *
+ * Reference:
+ * M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
+ * Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions
+ * on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
+ */
+ typedef mersenne_twister<
+ unsigned long, 32, 624, 397, 31,
+ 0x9908b0dful, 11, 7,
+ 0x9d2c5680ul, 15,
+ 0xefc60000ul, 18
+ > mt19937;
+
+
+ /**
+ * @brief The Marsaglia-Zaman generator.
+ *
+ * This is a model of a Generalized Fibonacci discrete random number
+ * generator, sometimes referred to as the SWC generator.
+ *
+ * A discrete random number generator that produces pseudorandom
+ * numbers using @f$x_{i}\leftarrow(x_{i - s} - x_{i - r} -
+ * carry_{i-1}) \bmod m @f$.
+ *
+ * The size of the state is @f$ r @f$
+ * and the maximum period of the generator is @f$ m^r - m^s -1 @f$.
+ *
+ * N1688[4.13] says "the template parameter _IntType shall denote an integral
+ * type large enough to store values up to m."
+ *
+ * @var _M_x The state of the generator. This is a ring buffer.
+ * @var _M_carry The carry.
+ * @var _M_p Current index of x(i - r).
+ */
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ class subtract_with_carry
+ {
+ __glibcxx_class_requires(_IntType, _IntegerConcept)
+
+ public:
+ /** The type of the generated random value. */
+ typedef _IntType result_type;
+
+ // parameter values
+ static const _IntType modulus = __m;
+ static const int long_lag = __r;
+ static const int short_lag = __s;
+
+ /**
+ * Constructs a default-initialized % subtract_with_carry random number
+ * generator.
+ */
+ subtract_with_carry()
+ { this->seed(); }
+
+ /**
+ * Constructs an explicitly seeded % subtract_with_carry random number
+ * generator.
+ */
+ explicit
+ subtract_with_carry(unsigned long __value)
+ { this->seed(__value); }
+
+ /**
+ * Constructs a %subtract_with_carry random number generator engine
+ * seeded from the generator function @p __g.
+ *
+ * @param __g The seed generator function.
+ */
+ template<class _Gen>
+ subtract_with_carry(_Gen& __g)
+ { this->seed(__g); }
+
+ /**
+ * Seeds the initial state @f$ x_0 @f$ of the random number generator.
+ *
+ * N1688[4.19] modifies this as follows. If @p __value == 0,
+ * sets value to 19780503. In any case, with a linear
+ * congruential generator lcg(i) having parameters @f$ m_{lcg} =
+ * 2147483563, a_{lcg} = 40014, c_{lcg} = 0, and lcg(0) = value
+ * @f$, sets @f$ x_{-r} \dots x_{-1} @f$ to @f$ lcg(1) \bmod m
+ * \dots lcg(r) \bmod m @f$ respectively. If @f$ x_{-1} = 0 @f$
+ * set carry to 1, otherwise sets carry to 0.
+ */
+ void
+ seed(unsigned long __value = 19780503);
+
+ /**
+ * Seeds the initial state @f$ x_0 @f$ of the % subtract_with_carry
+ * random number generator.
+ */
+ template<class _Gen>
+ void
+ seed(_Gen& __g)
+ { seed(__g, typename is_fundamental<_Gen>::type()); }
+
+ /**
+ * Gets the inclusive minimum value of the range of random integers
+ * returned by this generator.
+ */
+ result_type
+ min() const
+ { return 0; }
+
+ /**
+ * Gets the inclusive maximum value of the range of random integers
+ * returned by this generator.
+ */
+ result_type
+ max() const
+ { return this->modulus - 1; }
+
+ /**
+ * Gets the next random number in the sequence.
+ */
+ result_type
+ operator()();
+
+ /**
+ * Compares two % subtract_with_carry random number generator objects of
+ * the same type for equality.
+ *
+ * @param __lhs A % subtract_with_carry random number generator object.
+ * @param __rhs Another % subtract_with_carry random number generator
+ * object.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const subtract_with_carry& __lhs,
+ const subtract_with_carry& __rhs)
+ { return std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x); }
+
+ /**
+ * Compares two % subtract_with_carry random number generator objects of
+ * the same type for inequality.
+ *
+ * @param __lhs A % subtract_with_carry random number generator object.
+ * @param __rhs Another % subtract_with_carry random number generator
+ * object.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const subtract_with_carry& __lhs,
+ const subtract_with_carry& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Inserts the current state of a % subtract_with_carry random number
+ * generator engine @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A % subtract_with_carry random number generator engine.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _IntType1, _IntType1 __m1, int __s1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const subtract_with_carry<_IntType1, __m1, __s1,
+ __r1>& __x);
+
+ /**
+ * Extracts the current state of a % subtract_with_carry random number
+ * generator engine @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A % subtract_with_carry random number generator engine.
+ *
+ * @returns The input stream with the state of @p __x extracted or in
+ * an error state.
+ */
+ template<typename _IntType1, _IntType1 __m1, int __s1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ subtract_with_carry<_IntType1, __m1, __s1, __r1>& __x);
+
+ private:
+ template<class _Gen>
+ void
+ seed(_Gen& __g, true_type)
+ { return seed(static_cast<unsigned long>(__g)); }
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g, false_type);
+
+ typedef typename __gnu_cxx::__add_unsigned<_IntType>::__type _UIntType;
+
+ _UIntType _M_x[long_lag];
+ _UIntType _M_carry;
+ int _M_p;
+ };
+
+
+ /**
+ * @brief The Marsaglia-Zaman generator (floats version).
+ *
+ * @var _M_x The state of the generator. This is a ring buffer.
+ * @var _M_carry The carry.
+ * @var _M_p Current index of x(i - r).
+ * @var _M_npows Precomputed negative powers of 2.
+ */
+ template<typename _RealType, int __w, int __s, int __r>
+ class subtract_with_carry_01
+ {
+ public:
+ /** The type of the generated random value. */
+ typedef _RealType result_type;
+
+ // parameter values
+ static const int word_size = __w;
+ static const int long_lag = __r;
+ static const int short_lag = __s;
+
+ /**
+ * Constructs a default-initialized % subtract_with_carry_01 random
+ * number generator.
+ */
+ subtract_with_carry_01()
+ {
+ this->seed();
+ _M_initialize_npows();
+ }
+
+ /**
+ * Constructs an explicitly seeded % subtract_with_carry_01 random number
+ * generator.
+ */
+ explicit
+ subtract_with_carry_01(unsigned long __value)
+ {
+ this->seed(__value);
+ _M_initialize_npows();
+ }
+
+ /**
+ * Constructs a % subtract_with_carry_01 random number generator engine
+ * seeded from the generator function @p __g.
+ *
+ * @param __g The seed generator function.
+ */
+ template<class _Gen>
+ subtract_with_carry_01(_Gen& __g)
+ {
+ this->seed(__g);
+ _M_initialize_npows();
+ }
+
+ /**
+ * Seeds the initial state @f$ x_0 @f$ of the random number generator.
+ */
+ void
+ seed(unsigned long __value = 19780503);
+
+ /**
+ * Seeds the initial state @f$ x_0 @f$ of the % subtract_with_carry_01
+ * random number generator.
+ */
+ template<class _Gen>
+ void
+ seed(_Gen& __g)
+ { seed(__g, typename is_fundamental<_Gen>::type()); }
+
+ /**
+ * Gets the minimum value of the range of random floats
+ * returned by this generator.
+ */
+ result_type
+ min() const
+ { return 0.0; }
+
+ /**
+ * Gets the maximum value of the range of random floats
+ * returned by this generator.
+ */
+ result_type
+ max() const
+ { return 1.0; }
+
+ /**
+ * Gets the next random number in the sequence.
+ */
+ result_type
+ operator()();
+
+ /**
+ * Compares two % subtract_with_carry_01 random number generator objects
+ * of the same type for equality.
+ *
+ * @param __lhs A % subtract_with_carry_01 random number
+ * generator object.
+ * @param __rhs Another % subtract_with_carry_01 random number generator
+ * object.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const subtract_with_carry_01& __lhs,
+ const subtract_with_carry_01& __rhs)
+ {
+ for (int __i = 0; __i < long_lag; ++__i)
+ if (!std::equal(__lhs._M_x[__i], __lhs._M_x[__i] + __n,
+ __rhs._M_x[__i]))
+ return false;
+ return true;
+ }
+
+ /**
+ * Compares two % subtract_with_carry_01 random number generator objects
+ * of the same type for inequality.
+ *
+ * @param __lhs A % subtract_with_carry_01 random number
+ * generator object.
+ *
+ * @param __rhs Another % subtract_with_carry_01 random number generator
+ * object.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const subtract_with_carry_01& __lhs,
+ const subtract_with_carry_01& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Inserts the current state of a % subtract_with_carry_01 random number
+ * generator engine @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A % subtract_with_carry_01 random number generator engine.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, int __w1, int __s1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const subtract_with_carry_01<_RealType1, __w1, __s1,
+ __r1>& __x);
+
+ /**
+ * Extracts the current state of a % subtract_with_carry_01 random number
+ * generator engine @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A % subtract_with_carry_01 random number generator engine.
+ *
+ * @returns The input stream with the state of @p __x extracted or in
+ * an error state.
+ */
+ template<typename _RealType1, int __w1, int __s1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ subtract_with_carry_01<_RealType1, __w1, __s1, __r1>& __x);
+
+ private:
+ template<class _Gen>
+ void
+ seed(_Gen& __g, true_type)
+ { return seed(static_cast<unsigned long>(__g)); }
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g, false_type);
+
+ void
+ _M_initialize_npows();
+
+ static const int __n = (__w + 31) / 32;
+
+ typedef __detail::_UInt32Type _UInt32Type;
+ _UInt32Type _M_x[long_lag][__n];
+ _RealType _M_npows[__n];
+ _UInt32Type _M_carry;
+ int _M_p;
+ };
+
+ typedef subtract_with_carry_01<float, 24, 10, 24> ranlux_base_01;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 508. Bad parameters for ranlux64_base_01.
+ typedef subtract_with_carry_01<double, 48, 5, 12> ranlux64_base_01;
+
+
+ /**
+ * Produces random numbers from some base engine by discarding blocks of
+ * data.
+ *
+ * 0 <= @p __r <= @p __p
+ */
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ class discard_block
+ {
+ // __glibcxx_class_requires(typename base_type::result_type,
+ // ArithmeticTypeConcept)
+
+ public:
+ /** The type of the underlying generator engine. */
+ typedef _UniformRandomNumberGenerator base_type;
+ /** The type of the generated random value. */
+ typedef typename base_type::result_type result_type;
+
+ // parameter values
+ static const int block_size = __p;
+ static const int used_block = __r;
+
+ /**
+ * Constructs a default %discard_block engine.
+ *
+ * The underlying engine is default constructed as well.
+ */
+ discard_block()
+ : _M_n(0) { }
+
+ /**
+ * Copy constructs a %discard_block engine.
+ *
+ * Copies an existing base class random number generator.
+ * @param rng An existing (base class) engine object.
+ */
+ explicit
+ discard_block(const base_type& __rng)
+ : _M_b(__rng), _M_n(0) { }
+
+ /**
+ * Seed constructs a %discard_block engine.
+ *
+ * Constructs the underlying generator engine seeded with @p __s.
+ * @param __s A seed value for the base class engine.
+ */
+ explicit
+ discard_block(unsigned long __s)
+ : _M_b(__s), _M_n(0) { }
+
+ /**
+ * Generator construct a %discard_block engine.
+ *
+ * @param __g A seed generator function.
+ */
+ template<class _Gen>
+ discard_block(_Gen& __g)
+ : _M_b(__g), _M_n(0) { }
+
+ /**
+ * Reseeds the %discard_block object with the default seed for the
+ * underlying base class generator engine.
+ */
+ void seed()
+ {
+ _M_b.seed();
+ _M_n = 0;
+ }
+
+ /**
+ * Reseeds the %discard_block object with the given seed generator
+ * function.
+ * @param __g A seed generator function.
+ */
+ template<class _Gen>
+ void seed(_Gen& __g)
+ {
+ _M_b.seed(__g);
+ _M_n = 0;
+ }
+
+ /**
+ * Gets a const reference to the underlying generator engine object.
+ */
+ const base_type&
+ base() const
+ { return _M_b; }
+
+ /**
+ * Gets the minimum value in the generated random number range.
+ */
+ result_type
+ min() const
+ { return _M_b.min(); }
+
+ /**
+ * Gets the maximum value in the generated random number range.
+ */
+ result_type
+ max() const
+ { return _M_b.max(); }
+
+ /**
+ * Gets the next value in the generated random number sequence.
+ */
+ result_type
+ operator()();
+
+ /**
+ * Compares two %discard_block random number generator objects of
+ * the same type for equality.
+ *
+ * @param __lhs A %discard_block random number generator object.
+ * @param __rhs Another %discard_block random number generator
+ * object.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const discard_block& __lhs, const discard_block& __rhs)
+ { return (__lhs._M_b == __rhs._M_b) && (__lhs._M_n == __rhs._M_n); }
+
+ /**
+ * Compares two %discard_block random number generator objects of
+ * the same type for inequality.
+ *
+ * @param __lhs A %discard_block random number generator object.
+ * @param __rhs Another %discard_block random number generator
+ * object.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const discard_block& __lhs, const discard_block& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Inserts the current state of a %discard_block random number
+ * generator engine @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %discard_block random number generator engine.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<class _UniformRandomNumberGenerator1, int __p1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const discard_block<_UniformRandomNumberGenerator1,
+ __p1, __r1>& __x);
+
+ /**
+ * Extracts the current state of a % subtract_with_carry random number
+ * generator engine @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %discard_block random number generator engine.
+ *
+ * @returns The input stream with the state of @p __x extracted or in
+ * an error state.
+ */
+ template<class _UniformRandomNumberGenerator1, int __p1, int __r1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ discard_block<_UniformRandomNumberGenerator1,
+ __p1, __r1>& __x);
+
+ private:
+ base_type _M_b;
+ int _M_n;
+ };
+
+
+ /**
+ * James's luxury-level-3 integer adaptation of Luescher's generator.
+ */
+ typedef discard_block<
+ subtract_with_carry<unsigned long, (1UL << 24), 10, 24>,
+ 223,
+ 24
+ > ranlux3;
+
+ /**
+ * James's luxury-level-4 integer adaptation of Luescher's generator.
+ */
+ typedef discard_block<
+ subtract_with_carry<unsigned long, (1UL << 24), 10, 24>,
+ 389,
+ 24
+ > ranlux4;
+
+ typedef discard_block<
+ subtract_with_carry_01<float, 24, 10, 24>,
+ 223,
+ 24
+ > ranlux3_01;
+
+ typedef discard_block<
+ subtract_with_carry_01<float, 24, 10, 24>,
+ 389,
+ 24
+ > ranlux4_01;
+
+
+ /**
+ * A random number generator adaptor class that combines two random number
+ * generator engines into a single output sequence.
+ */
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
+ class xor_combine
+ {
+ // __glibcxx_class_requires(typename _UniformRandomNumberGenerator1::
+ // result_type, ArithmeticTypeConcept)
+ // __glibcxx_class_requires(typename _UniformRandomNumberGenerator2::
+ // result_type, ArithmeticTypeConcept)
+
+ public:
+ /** The type of the first underlying generator engine. */
+ typedef _UniformRandomNumberGenerator1 base1_type;
+ /** The type of the second underlying generator engine. */
+ typedef _UniformRandomNumberGenerator2 base2_type;
+
+ private:
+ typedef typename base1_type::result_type _Result_type1;
+ typedef typename base2_type::result_type _Result_type2;
+
+ public:
+ /** The type of the generated random value. */
+ typedef typename __gnu_cxx::__conditional_type<(sizeof(_Result_type1)
+ > sizeof(_Result_type2)),
+ _Result_type1, _Result_type2>::__type result_type;
+
+ // parameter values
+ static const int shift1 = __s1;
+ static const int shift2 = __s2;
+
+ // constructors and member function
+ xor_combine()
+ : _M_b1(), _M_b2()
+ { _M_initialize_max(); }
+
+ xor_combine(const base1_type& __rng1, const base2_type& __rng2)
+ : _M_b1(__rng1), _M_b2(__rng2)
+ { _M_initialize_max(); }
+
+ xor_combine(unsigned long __s)
+ : _M_b1(__s), _M_b2(__s + 1)
+ { _M_initialize_max(); }
+
+ template<class _Gen>
+ xor_combine(_Gen& __g)
+ : _M_b1(__g), _M_b2(__g)
+ { _M_initialize_max(); }
+
+ void
+ seed()
+ {
+ _M_b1.seed();
+ _M_b2.seed();
+ }
+
+ template<class _Gen>
+ void
+ seed(_Gen& __g)
+ {
+ _M_b1.seed(__g);
+ _M_b2.seed(__g);
+ }
+
+ const base1_type&
+ base1() const
+ { return _M_b1; }
+
+ const base2_type&
+ base2() const
+ { return _M_b2; }
+
+ result_type
+ min() const
+ { return 0; }
+
+ result_type
+ max() const
+ { return _M_max; }
+
+ /**
+ * Gets the next random number in the sequence.
+ */
+ // NB: Not exactly the TR1 formula, per N2079 instead.
+ result_type
+ operator()()
+ {
+ return ((result_type(_M_b1() - _M_b1.min()) << shift1)
+ ^ (result_type(_M_b2() - _M_b2.min()) << shift2));
+ }
+
+ /**
+ * Compares two %xor_combine random number generator objects of
+ * the same type for equality.
+ *
+ * @param __lhs A %xor_combine random number generator object.
+ * @param __rhs Another %xor_combine random number generator
+ * object.
+ *
+ * @returns true if the two objects are equal, false otherwise.
+ */
+ friend bool
+ operator==(const xor_combine& __lhs, const xor_combine& __rhs)
+ {
+ return (__lhs.base1() == __rhs.base1())
+ && (__lhs.base2() == __rhs.base2());
+ }
+
+ /**
+ * Compares two %xor_combine random number generator objects of
+ * the same type for inequality.
+ *
+ * @param __lhs A %xor_combine random number generator object.
+ * @param __rhs Another %xor_combine random number generator
+ * object.
+ *
+ * @returns true if the two objects are not equal, false otherwise.
+ */
+ friend bool
+ operator!=(const xor_combine& __lhs, const xor_combine& __rhs)
+ { return !(__lhs == __rhs); }
+
+ /**
+ * Inserts the current state of a %xor_combine random number
+ * generator engine @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %xor_combine random number generator engine.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<class _UniformRandomNumberGenerator11, int __s11,
+ class _UniformRandomNumberGenerator21, int __s21,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const xor_combine<_UniformRandomNumberGenerator11, __s11,
+ _UniformRandomNumberGenerator21, __s21>& __x);
+
+ /**
+ * Extracts the current state of a %xor_combine random number
+ * generator engine @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %xor_combine random number generator engine.
+ *
+ * @returns The input stream with the state of @p __x extracted or in
+ * an error state.
+ */
+ template<class _UniformRandomNumberGenerator11, int __s11,
+ class _UniformRandomNumberGenerator21, int __s21,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ xor_combine<_UniformRandomNumberGenerator11, __s11,
+ _UniformRandomNumberGenerator21, __s21>& __x);
+
+ private:
+ void
+ _M_initialize_max();
+
+ result_type
+ _M_initialize_max_aux(result_type, result_type, int);
+
+ base1_type _M_b1;
+ base2_type _M_b2;
+ result_type _M_max;
+ };
+
+
+ /**
+ * A standard interface to a platform-specific non-deterministic
+ * random number generator (if any are available).
+ */
+ class random_device
+ {
+ public:
+ // types
+ typedef unsigned int result_type;
+
+ // constructors, destructors and member functions
+
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+
+ explicit
+ random_device(const std::string& __token = "/dev/urandom")
+ {
+ if ((__token != "/dev/urandom" && __token != "/dev/random")
+ || !(_M_file = std::fopen(__token.c_str(), "rb")))
+ std::__throw_runtime_error(__N("random_device::"
+ "random_device(const std::string&)"));
+ }
+
+ ~random_device()
+ { std::fclose(_M_file); }
+
+#else
+
+ explicit
+ random_device(const std::string& __token = "mt19937")
+ : _M_mt(_M_strtoul(__token)) { }
+
+ private:
+ static unsigned long
+ _M_strtoul(const std::string& __str)
+ {
+ unsigned long __ret = 5489UL;
+ if (__str != "mt19937")
+ {
+ const char* __nptr = __str.c_str();
+ char* __endptr;
+ __ret = std::strtoul(__nptr, &__endptr, 0);
+ if (*__nptr == '\0' || *__endptr != '\0')
+ std::__throw_runtime_error(__N("random_device::_M_strtoul"
+ "(const std::string&)"));
+ }
+ return __ret;
+ }
+
+ public:
+
+#endif
+
+ result_type
+ min() const
+ { return std::numeric_limits<result_type>::min(); }
+
+ result_type
+ max() const
+ { return std::numeric_limits<result_type>::max(); }
+
+ double
+ entropy() const
+ { return 0.0; }
+
+ result_type
+ operator()()
+ {
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+ result_type __ret;
+ std::fread(reinterpret_cast<void*>(&__ret), sizeof(result_type),
+ 1, _M_file);
+ return __ret;
+#else
+ return _M_mt();
+#endif
+ }
+
+ private:
+ random_device(const random_device&);
+ void operator=(const random_device&);
+
+#ifdef _GLIBCXX_USE_RANDOM_TR1
+ FILE* _M_file;
+#else
+ mt19937 _M_mt;
+#endif
+ };
+
+ /* @} */ // group tr1_random_generators
+
+ /**
+ * @defgroup tr1_random_distributions Random Number Distributions
+ * @ingroup tr1_random
+ * @{
+ */
+
+ /**
+ * @defgroup tr1_random_distributions_discrete Discrete Distributions
+ * @ingroup tr1_random_distributions
+ * @{
+ */
+
+ /**
+ * @brief Uniform discrete distribution for random numbers.
+ * A discrete random distribution on the range @f$[min, max]@f$ with equal
+ * probability throughout the range.
+ */
+ template<typename _IntType = int>
+ class uniform_int
+ {
+ __glibcxx_class_requires(_IntType, _IntegerConcept)
+
+ public:
+ /** The type of the parameters of the distribution. */
+ typedef _IntType input_type;
+ /** The type of the range of the distribution. */
+ typedef _IntType result_type;
+
+ public:
+ /**
+ * Constructs a uniform distribution object.
+ */
+ explicit
+ uniform_int(_IntType __min = 0, _IntType __max = 9)
+ : _M_min(__min), _M_max(__max)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_min <= _M_max);
+ }
+
+ /**
+ * Gets the inclusive lower bound of the distribution range.
+ */
+ result_type
+ min() const
+ { return _M_min; }
+
+ /**
+ * Gets the inclusive upper bound of the distribution range.
+ */
+ result_type
+ max() const
+ { return _M_max; }
+
+ /**
+ * Resets the distribution state.
+ *
+ * Does nothing for the uniform integer distribution.
+ */
+ void
+ reset() { }
+
+ /**
+ * Gets a uniformly distributed random number in the range
+ * @f$(min, max)@f$.
+ */
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ typedef typename _UniformRandomNumberGenerator::result_type
+ _UResult_type;
+ return _M_call(__urng, _M_min, _M_max,
+ typename is_integral<_UResult_type>::type());
+ }
+
+ /**
+ * Gets a uniform random number in the range @f$[0, n)@f$.
+ *
+ * This function is aimed at use with std::random_shuffle.
+ */
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng, result_type __n)
+ {
+ typedef typename _UniformRandomNumberGenerator::result_type
+ _UResult_type;
+ return _M_call(__urng, 0, __n - 1,
+ typename is_integral<_UResult_type>::type());
+ }
+
+ /**
+ * Inserts a %uniform_int random number distribution @p __x into the
+ * output stream @p os.
+ *
+ * @param __os An output stream.
+ * @param __x A %uniform_int random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _IntType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const uniform_int<_IntType1>& __x);
+
+ /**
+ * Extracts a %uniform_int random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %uniform_int random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _IntType1, typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ uniform_int<_IntType1>& __x);
+
+ private:
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ _M_call(_UniformRandomNumberGenerator& __urng,
+ result_type __min, result_type __max, true_type);
+
+ template<typename _UniformRandomNumberGenerator>
+ result_type
+ _M_call(_UniformRandomNumberGenerator& __urng,
+ result_type __min, result_type __max, false_type)
+ {
+ return result_type((__urng() - __urng.min())
+ / (__urng.max() - __urng.min())
+ * (__max - __min + 1)) + __min;
+ }
+
+ _IntType _M_min;
+ _IntType _M_max;
+ };
+
+
+ /**
+ * @brief A Bernoulli random number distribution.
+ *
+ * Generates a sequence of true and false values with likelihood @f$ p @f$
+ * that true will come up and @f$ (1 - p) @f$ that false will appear.
+ */
+ class bernoulli_distribution
+ {
+ public:
+ typedef int input_type;
+ typedef bool result_type;
+
+ public:
+ /**
+ * Constructs a Bernoulli distribution with likelihood @p p.
+ *
+ * @param __p [IN] The likelihood of a true result being returned. Must
+ * be in the interval @f$ [0, 1] @f$.
+ */
+ explicit
+ bernoulli_distribution(double __p = 0.5)
+ : _M_p(__p)
+ {
+ _GLIBCXX_DEBUG_ASSERT((_M_p >= 0.0) && (_M_p <= 1.0));
+ }
+
+ /**
+ * Gets the @p p parameter of the distribution.
+ */
+ double
+ p() const
+ { return _M_p; }
+
+ /**
+ * Resets the distribution state.
+ *
+ * Does nothing for a Bernoulli distribution.
+ */
+ void
+ reset() { }
+
+ /**
+ * Gets the next value in the Bernoullian sequence.
+ */
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ if ((__urng() - __urng.min()) < _M_p * (__urng.max() - __urng.min()))
+ return true;
+ return false;
+ }
+
+ /**
+ * Inserts a %bernoulli_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %bernoulli_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bernoulli_distribution& __x);
+
+ /**
+ * Extracts a %bernoulli_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %bernoulli_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ bernoulli_distribution& __x)
+ { return __is >> __x._M_p; }
+
+ private:
+ double _M_p;
+ };
+
+
+ /**
+ * @brief A discrete geometric random number distribution.
+ *
+ * The formula for the geometric probability mass function is
+ * @f$ p(i) = (1 - p)p^{i-1} @f$ where @f$ p @f$ is the parameter of the
+ * distribution.
+ */
+ template<typename _IntType = int, typename _RealType = double>
+ class geometric_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _IntType result_type;
+
+ // constructors and member function
+ explicit
+ geometric_distribution(const _RealType& __p = _RealType(0.5))
+ : _M_p(__p)
+ {
+ _GLIBCXX_DEBUG_ASSERT((_M_p > 0.0) && (_M_p < 1.0));
+ _M_initialize();
+ }
+
+ /**
+ * Gets the distribution parameter @p p.
+ */
+ _RealType
+ p() const
+ { return _M_p; }
+
+ void
+ reset() { }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng);
+
+ /**
+ * Inserts a %geometric_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %geometric_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _IntType1, typename _RealType1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const geometric_distribution<_IntType1, _RealType1>& __x);
+
+ /**
+ * Extracts a %geometric_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %geometric_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ geometric_distribution& __x)
+ {
+ __is >> __x._M_p;
+ __x._M_initialize();
+ return __is;
+ }
+
+ private:
+ void
+ _M_initialize()
+ { _M_log_p = std::log(_M_p); }
+
+ _RealType _M_p;
+ _RealType _M_log_p;
+ };
+
+
+ template<typename _RealType>
+ class normal_distribution;
+
+ /**
+ * @brief A discrete Poisson random number distribution.
+ *
+ * The formula for the Poisson probability mass function is
+ * @f$ p(i) = \frac{mean^i}{i!} e^{-mean} @f$ where @f$ mean @f$ is the
+ * parameter of the distribution.
+ */
+ template<typename _IntType = int, typename _RealType = double>
+ class poisson_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _IntType result_type;
+
+ // constructors and member function
+ explicit
+ poisson_distribution(const _RealType& __mean = _RealType(1))
+ : _M_mean(__mean), _M_nd()
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_mean > 0.0);
+ _M_initialize();
+ }
+
+ /**
+ * Gets the distribution parameter @p mean.
+ */
+ _RealType
+ mean() const
+ { return _M_mean; }
+
+ void
+ reset()
+ { _M_nd.reset(); }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng);
+
+ /**
+ * Inserts a %poisson_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %poisson_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _IntType1, typename _RealType1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const poisson_distribution<_IntType1, _RealType1>& __x);
+
+ /**
+ * Extracts a %poisson_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %poisson_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _IntType1, typename _RealType1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ poisson_distribution<_IntType1, _RealType1>& __x);
+
+ private:
+ void
+ _M_initialize();
+
+ // NB: Unused when _GLIBCXX_USE_C99_MATH_TR1 is undefined.
+ normal_distribution<_RealType> _M_nd;
+
+ _RealType _M_mean;
+
+ // Hosts either log(mean) or the threshold of the simple method.
+ _RealType _M_lm_thr;
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _RealType _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb;
+#endif
+ };
+
+
+ /**
+ * @brief A discrete binomial random number distribution.
+ *
+ * The formula for the binomial probability mass function is
+ * @f$ p(i) = \binom{n}{i} p^i (1 - p)^{t - i} @f$ where @f$ t @f$
+ * and @f$ p @f$ are the parameters of the distribution.
+ */
+ template<typename _IntType = int, typename _RealType = double>
+ class binomial_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _IntType result_type;
+
+ // constructors and member function
+ explicit
+ binomial_distribution(_IntType __t = 1,
+ const _RealType& __p = _RealType(0.5))
+ : _M_t(__t), _M_p(__p), _M_nd()
+ {
+ _GLIBCXX_DEBUG_ASSERT((_M_t >= 0) && (_M_p >= 0.0) && (_M_p <= 1.0));
+ _M_initialize();
+ }
+
+ /**
+ * Gets the distribution @p t parameter.
+ */
+ _IntType
+ t() const
+ { return _M_t; }
+
+ /**
+ * Gets the distribution @p p parameter.
+ */
+ _RealType
+ p() const
+ { return _M_p; }
+
+ void
+ reset()
+ { _M_nd.reset(); }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng);
+
+ /**
+ * Inserts a %binomial_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %binomial_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _IntType1, typename _RealType1,
+ typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const binomial_distribution<_IntType1, _RealType1>& __x);
+
+ /**
+ * Extracts a %binomial_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %binomial_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _IntType1, typename _RealType1,
+ typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ binomial_distribution<_IntType1, _RealType1>& __x);
+
+ private:
+ void
+ _M_initialize();
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t);
+
+ // NB: Unused when _GLIBCXX_USE_C99_MATH_TR1 is undefined.
+ normal_distribution<_RealType> _M_nd;
+
+ _RealType _M_q;
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _RealType _M_d1, _M_d2, _M_s1, _M_s2, _M_c,
+ _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p;
+#endif
+ _RealType _M_p;
+ _IntType _M_t;
+
+ bool _M_easy;
+ };
+
+ /* @} */ // group tr1_random_distributions_discrete
+
+ /**
+ * @defgroup tr1_random_distributions_continuous Continuous Distributions
+ * @ingroup tr1_random_distributions
+ * @{
+ */
+
+ /**
+ * @brief Uniform continuous distribution for random numbers.
+ *
+ * A continuous random distribution on the range [min, max) with equal
+ * probability throughout the range. The URNG should be real-valued and
+ * deliver number in the range [0, 1).
+ */
+ template<typename _RealType = double>
+ class uniform_real
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _RealType result_type;
+
+ public:
+ /**
+ * Constructs a uniform_real object.
+ *
+ * @param __min [IN] The lower bound of the distribution.
+ * @param __max [IN] The upper bound of the distribution.
+ */
+ explicit
+ uniform_real(_RealType __min = _RealType(0),
+ _RealType __max = _RealType(1))
+ : _M_min(__min), _M_max(__max)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_min <= _M_max);
+ }
+
+ result_type
+ min() const
+ { return _M_min; }
+
+ result_type
+ max() const
+ { return _M_max; }
+
+ void
+ reset() { }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ { return (__urng() * (_M_max - _M_min)) + _M_min; }
+
+ /**
+ * Inserts a %uniform_real random number distribution @p __x into the
+ * output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %uniform_real random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const uniform_real<_RealType1>& __x);
+
+ /**
+ * Extracts a %uniform_real random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %uniform_real random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ uniform_real<_RealType1>& __x);
+
+ private:
+ _RealType _M_min;
+ _RealType _M_max;
+ };
+
+
+ /**
+ * @brief An exponential continuous distribution for random numbers.
+ *
+ * The formula for the exponential probability mass function is
+ * @f$ p(x) = \lambda e^{-\lambda x} @f$.
+ *
+ * <table border=1 cellpadding=10 cellspacing=0>
+ * <caption align=top>Distribution Statistics</caption>
+ * <tr><td>Mean</td><td>@f$ \frac{1}{\lambda} @f$</td></tr>
+ * <tr><td>Median</td><td>@f$ \frac{\ln 2}{\lambda} @f$</td></tr>
+ * <tr><td>Mode</td><td>@f$ zero @f$</td></tr>
+ * <tr><td>Range</td><td>@f$[0, \infty]@f$</td></tr>
+ * <tr><td>Standard Deviation</td><td>@f$ \frac{1}{\lambda} @f$</td></tr>
+ * </table>
+ */
+ template<typename _RealType = double>
+ class exponential_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _RealType result_type;
+
+ public:
+ /**
+ * Constructs an exponential distribution with inverse scale parameter
+ * @f$ \lambda @f$.
+ */
+ explicit
+ exponential_distribution(const result_type& __lambda = result_type(1))
+ : _M_lambda(__lambda)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_lambda > 0);
+ }
+
+ /**
+ * Gets the inverse scale parameter of the distribution.
+ */
+ _RealType
+ lambda() const
+ { return _M_lambda; }
+
+ /**
+ * Resets the distribution.
+ *
+ * Has no effect on exponential distributions.
+ */
+ void
+ reset() { }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng)
+ { return -std::log(__urng()) / _M_lambda; }
+
+ /**
+ * Inserts a %exponential_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %exponential_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const exponential_distribution<_RealType1>& __x);
+
+ /**
+ * Extracts a %exponential_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %exponential_distribution random number
+ * generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ exponential_distribution& __x)
+ { return __is >> __x._M_lambda; }
+
+ private:
+ result_type _M_lambda;
+ };
+
+
+ /**
+ * @brief A normal continuous distribution for random numbers.
+ *
+ * The formula for the normal probability mass function is
+ * @f$ p(x) = \frac{1}{\sigma \sqrt{2 \pi}}
+ * e^{- \frac{{x - mean}^ {2}}{2 \sigma ^ {2}} } @f$.
+ */
+ template<typename _RealType = double>
+ class normal_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _RealType result_type;
+
+ public:
+ /**
+ * Constructs a normal distribution with parameters @f$ mean @f$ and
+ * @f$ \sigma @f$.
+ */
+ explicit
+ normal_distribution(const result_type& __mean = result_type(0),
+ const result_type& __sigma = result_type(1))
+ : _M_mean(__mean), _M_sigma(__sigma), _M_saved_available(false)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_sigma > 0);
+ }
+
+ /**
+ * Gets the mean of the distribution.
+ */
+ _RealType
+ mean() const
+ { return _M_mean; }
+
+ /**
+ * Gets the @f$ \sigma @f$ of the distribution.
+ */
+ _RealType
+ sigma() const
+ { return _M_sigma; }
+
+ /**
+ * Resets the distribution.
+ */
+ void
+ reset()
+ { _M_saved_available = false; }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng);
+
+ /**
+ * Inserts a %normal_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %normal_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const normal_distribution<_RealType1>& __x);
+
+ /**
+ * Extracts a %normal_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %normal_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ normal_distribution<_RealType1>& __x);
+
+ private:
+ result_type _M_mean;
+ result_type _M_sigma;
+ result_type _M_saved;
+ bool _M_saved_available;
+ };
+
+
+ /**
+ * @brief A gamma continuous distribution for random numbers.
+ *
+ * The formula for the gamma probability mass function is
+ * @f$ p(x) = \frac{1}{\Gamma(\alpha)} x^{\alpha - 1} e^{-x} @f$.
+ */
+ template<typename _RealType = double>
+ class gamma_distribution
+ {
+ public:
+ // types
+ typedef _RealType input_type;
+ typedef _RealType result_type;
+
+ public:
+ /**
+ * Constructs a gamma distribution with parameters @f$ \alpha @f$.
+ */
+ explicit
+ gamma_distribution(const result_type& __alpha_val = result_type(1))
+ : _M_alpha(__alpha_val)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_alpha > 0);
+ _M_initialize();
+ }
+
+ /**
+ * Gets the @f$ \alpha @f$ of the distribution.
+ */
+ _RealType
+ alpha() const
+ { return _M_alpha; }
+
+ /**
+ * Resets the distribution.
+ */
+ void
+ reset() { }
+
+ template<class _UniformRandomNumberGenerator>
+ result_type
+ operator()(_UniformRandomNumberGenerator& __urng);
+
+ /**
+ * Inserts a %gamma_distribution random number distribution
+ * @p __x into the output stream @p __os.
+ *
+ * @param __os An output stream.
+ * @param __x A %gamma_distribution random number distribution.
+ *
+ * @returns The output stream with the state of @p __x inserted or in
+ * an error state.
+ */
+ template<typename _RealType1, typename _CharT, typename _Traits>
+ friend std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const gamma_distribution<_RealType1>& __x);
+
+ /**
+ * Extracts a %gamma_distribution random number distribution
+ * @p __x from the input stream @p __is.
+ *
+ * @param __is An input stream.
+ * @param __x A %gamma_distribution random number generator engine.
+ *
+ * @returns The input stream with @p __x extracted or in an error state.
+ */
+ template<typename _CharT, typename _Traits>
+ friend std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ gamma_distribution& __x)
+ {
+ __is >> __x._M_alpha;
+ __x._M_initialize();
+ return __is;
+ }
+
+ private:
+ void
+ _M_initialize();
+
+ result_type _M_alpha;
+
+ // Hosts either lambda of GB or d of modified Vaduva's.
+ result_type _M_l_d;
+ };
+
+ /* @} */ // group tr1_random_distributions_continuous
+ /* @} */ // group tr1_random_distributions
+ /* @} */ // group tr1_random
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
+#include <tr1_impl/random.tcc>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random.tcc b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random.tcc
new file mode 100644
index 0000000..4c78ce6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/random.tcc
@@ -0,0 +1,1577 @@
+// random number generation (out of line) -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/random.tcc
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ /*
+ * (Further) implementation-space details.
+ */
+ namespace __detail
+ {
+ // General case for x = (ax + c) mod m -- use Schrage's algorithm to avoid
+ // integer overflow.
+ //
+ // Because a and c are compile-time integral constants the compiler kindly
+ // elides any unreachable paths.
+ //
+ // Preconditions: a > 0, m > 0.
+ //
+ template<typename _Tp, _Tp __a, _Tp __c, _Tp __m, bool>
+ struct _Mod
+ {
+ static _Tp
+ __calc(_Tp __x)
+ {
+ if (__a == 1)
+ __x %= __m;
+ else
+ {
+ static const _Tp __q = __m / __a;
+ static const _Tp __r = __m % __a;
+
+ _Tp __t1 = __a * (__x % __q);
+ _Tp __t2 = __r * (__x / __q);
+ if (__t1 >= __t2)
+ __x = __t1 - __t2;
+ else
+ __x = __m - __t2 + __t1;
+ }
+
+ if (__c != 0)
+ {
+ const _Tp __d = __m - __x;
+ if (__d > __c)
+ __x += __c;
+ else
+ __x = __c - __d;
+ }
+ return __x;
+ }
+ };
+
+ // Special case for m == 0 -- use unsigned integer overflow as modulo
+ // operator.
+ template<typename _Tp, _Tp __a, _Tp __c, _Tp __m>
+ struct _Mod<_Tp, __a, __c, __m, true>
+ {
+ static _Tp
+ __calc(_Tp __x)
+ { return __a * __x + __c; }
+ };
+ } // namespace __detail
+
+ /**
+ * Seeds the LCR with integral value @p __x0, adjusted so that the
+ * ring identity is never a member of the convergence set.
+ */
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ void
+ linear_congruential<_UIntType, __a, __c, __m>::
+ seed(unsigned long __x0)
+ {
+ if ((__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0)
+ && (__detail::__mod<_UIntType, 1, 0, __m>(__x0) == 0))
+ _M_x = __detail::__mod<_UIntType, 1, 0, __m>(1);
+ else
+ _M_x = __detail::__mod<_UIntType, 1, 0, __m>(__x0);
+ }
+
+ /**
+ * Seeds the LCR engine with a value generated by @p __g.
+ */
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ template<class _Gen>
+ void
+ linear_congruential<_UIntType, __a, __c, __m>::
+ seed(_Gen& __g, false_type)
+ {
+ _UIntType __x0 = __g();
+ if ((__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0)
+ && (__detail::__mod<_UIntType, 1, 0, __m>(__x0) == 0))
+ _M_x = __detail::__mod<_UIntType, 1, 0, __m>(1);
+ else
+ _M_x = __detail::__mod<_UIntType, 1, 0, __m>(__x0);
+ }
+
+ /**
+ * Gets the next generated value in sequence.
+ */
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
+ typename linear_congruential<_UIntType, __a, __c, __m>::result_type
+ linear_congruential<_UIntType, __a, __c, __m>::
+ operator()()
+ {
+ _M_x = __detail::__mod<_UIntType, __a, __c, __m>(_M_x);
+ return _M_x;
+ }
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const linear_congruential<_UIntType, __a, __c, __m>& __lcr)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+ __os.fill(__os.widen(' '));
+
+ __os << __lcr._M_x;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ linear_congruential<_UIntType, __a, __c, __m>& __lcr)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec);
+
+ __is >> __lcr._M_x;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ void
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::
+ seed(unsigned long __value)
+ {
+ _M_x[0] = __detail::__mod<_UIntType, 1, 0,
+ __detail::_Shift<_UIntType, __w>::__value>(__value);
+
+ for (int __i = 1; __i < state_size; ++__i)
+ {
+ _UIntType __x = _M_x[__i - 1];
+ __x ^= __x >> (__w - 2);
+ __x *= 1812433253ul;
+ __x += __i;
+ _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
+ __detail::_Shift<_UIntType, __w>::__value>(__x);
+ }
+ _M_p = state_size;
+ }
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ template<class _Gen>
+ void
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::
+ seed(_Gen& __gen, false_type)
+ {
+ for (int __i = 0; __i < state_size; ++__i)
+ _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
+ __detail::_Shift<_UIntType, __w>::__value>(__gen());
+ _M_p = state_size;
+ }
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s,
+ _UIntType __b, int __t, _UIntType __c, int __l>
+ typename
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::result_type
+ mersenne_twister<_UIntType, __w, __n, __m, __r, __a, __u, __s,
+ __b, __t, __c, __l>::
+ operator()()
+ {
+ // Reload the vector - cost is O(n) amortized over n calls.
+ if (_M_p >= state_size)
+ {
+ const _UIntType __upper_mask = (~_UIntType()) << __r;
+ const _UIntType __lower_mask = ~__upper_mask;
+
+ for (int __k = 0; __k < (__n - __m); ++__k)
+ {
+ _UIntType __y = ((_M_x[__k] & __upper_mask)
+ | (_M_x[__k + 1] & __lower_mask));
+ _M_x[__k] = (_M_x[__k + __m] ^ (__y >> 1)
+ ^ ((__y & 0x01) ? __a : 0));
+ }
+
+ for (int __k = (__n - __m); __k < (__n - 1); ++__k)
+ {
+ _UIntType __y = ((_M_x[__k] & __upper_mask)
+ | (_M_x[__k + 1] & __lower_mask));
+ _M_x[__k] = (_M_x[__k + (__m - __n)] ^ (__y >> 1)
+ ^ ((__y & 0x01) ? __a : 0));
+ }
+
+ _UIntType __y = ((_M_x[__n - 1] & __upper_mask)
+ | (_M_x[0] & __lower_mask));
+ _M_x[__n - 1] = (_M_x[__m - 1] ^ (__y >> 1)
+ ^ ((__y & 0x01) ? __a : 0));
+ _M_p = 0;
+ }
+
+ // Calculate o(x(i)).
+ result_type __z = _M_x[_M_p++];
+ __z ^= (__z >> __u);
+ __z ^= (__z << __s) & __b;
+ __z ^= (__z << __t) & __c;
+ __z ^= (__z >> __l);
+
+ return __z;
+ }
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s, _UIntType __b, int __t,
+ _UIntType __c, int __l,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const mersenne_twister<_UIntType, __w, __n, __m,
+ __r, __a, __u, __s, __b, __t, __c, __l>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+ __os.fill(__space);
+
+ for (int __i = 0; __i < __n - 1; ++__i)
+ __os << __x._M_x[__i] << __space;
+ __os << __x._M_x[__n - 1];
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<class _UIntType, int __w, int __n, int __m, int __r,
+ _UIntType __a, int __u, int __s, _UIntType __b, int __t,
+ _UIntType __c, int __l,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ mersenne_twister<_UIntType, __w, __n, __m,
+ __r, __a, __u, __s, __b, __t, __c, __l>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ for (int __i = 0; __i < __n; ++__i)
+ __is >> __x._M_x[__i];
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ void
+ subtract_with_carry<_IntType, __m, __s, __r>::
+ seed(unsigned long __value)
+ {
+ if (__value == 0)
+ __value = 19780503;
+
+ std::_GLIBCXX_TR1 linear_congruential<unsigned long, 40014, 0, 2147483563>
+ __lcg(__value);
+
+ for (int __i = 0; __i < long_lag; ++__i)
+ _M_x[__i] = __detail::__mod<_UIntType, 1, 0, modulus>(__lcg());
+
+ _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
+ _M_p = 0;
+ }
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ template<class _Gen>
+ void
+ subtract_with_carry<_IntType, __m, __s, __r>::
+ seed(_Gen& __gen, false_type)
+ {
+ const int __n = (std::numeric_limits<_UIntType>::digits + 31) / 32;
+
+ for (int __i = 0; __i < long_lag; ++__i)
+ {
+ _UIntType __tmp = 0;
+ _UIntType __factor = 1;
+ for (int __j = 0; __j < __n; ++__j)
+ {
+ __tmp += __detail::__mod<__detail::_UInt32Type, 1, 0, 0>
+ (__gen()) * __factor;
+ __factor *= __detail::_Shift<_UIntType, 32>::__value;
+ }
+ _M_x[__i] = __detail::__mod<_UIntType, 1, 0, modulus>(__tmp);
+ }
+ _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
+ _M_p = 0;
+ }
+
+ template<typename _IntType, _IntType __m, int __s, int __r>
+ typename subtract_with_carry<_IntType, __m, __s, __r>::result_type
+ subtract_with_carry<_IntType, __m, __s, __r>::
+ operator()()
+ {
+ // Derive short lag index from current index.
+ int __ps = _M_p - short_lag;
+ if (__ps < 0)
+ __ps += long_lag;
+
+ // Calculate new x(i) without overflow or division.
+ // NB: Thanks to the requirements for _IntType, _M_x[_M_p] + _M_carry
+ // cannot overflow.
+ _UIntType __xi;
+ if (_M_x[__ps] >= _M_x[_M_p] + _M_carry)
+ {
+ __xi = _M_x[__ps] - _M_x[_M_p] - _M_carry;
+ _M_carry = 0;
+ }
+ else
+ {
+ __xi = modulus - _M_x[_M_p] - _M_carry + _M_x[__ps];
+ _M_carry = 1;
+ }
+ _M_x[_M_p] = __xi;
+
+ // Adjust current index to loop around in ring buffer.
+ if (++_M_p >= long_lag)
+ _M_p = 0;
+
+ return __xi;
+ }
+
+ template<typename _IntType, _IntType __m, int __s, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const subtract_with_carry<_IntType, __m, __s, __r>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+ __os.fill(__space);
+
+ for (int __i = 0; __i < __r; ++__i)
+ __os << __x._M_x[__i] << __space;
+ __os << __x._M_carry;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<typename _IntType, _IntType __m, int __s, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ subtract_with_carry<_IntType, __m, __s, __r>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ for (int __i = 0; __i < __r; ++__i)
+ __is >> __x._M_x[__i];
+ __is >> __x._M_carry;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _RealType, int __w, int __s, int __r>
+ void
+ subtract_with_carry_01<_RealType, __w, __s, __r>::
+ _M_initialize_npows()
+ {
+ for (int __j = 0; __j < __n; ++__j)
+#if _GLIBCXX_USE_C99_MATH_TR1
+ _M_npows[__j] = std::_GLIBCXX_TR1 ldexp(_RealType(1), -__w + __j * 32);
+#else
+ _M_npows[__j] = std::pow(_RealType(2), -__w + __j * 32);
+#endif
+ }
+
+ template<typename _RealType, int __w, int __s, int __r>
+ void
+ subtract_with_carry_01<_RealType, __w, __s, __r>::
+ seed(unsigned long __value)
+ {
+ if (__value == 0)
+ __value = 19780503;
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 512. Seeding subtract_with_carry_01 from a single unsigned long.
+ std::_GLIBCXX_TR1 linear_congruential<unsigned long, 40014, 0, 2147483563>
+ __lcg(__value);
+
+ this->seed(__lcg);
+ }
+
+ template<typename _RealType, int __w, int __s, int __r>
+ template<class _Gen>
+ void
+ subtract_with_carry_01<_RealType, __w, __s, __r>::
+ seed(_Gen& __gen, false_type)
+ {
+ for (int __i = 0; __i < long_lag; ++__i)
+ {
+ for (int __j = 0; __j < __n - 1; ++__j)
+ _M_x[__i][__j] = __detail::__mod<_UInt32Type, 1, 0, 0>(__gen());
+ _M_x[__i][__n - 1] = __detail::__mod<_UInt32Type, 1, 0,
+ __detail::_Shift<_UInt32Type, __w % 32>::__value>(__gen());
+ }
+
+ _M_carry = 1;
+ for (int __j = 0; __j < __n; ++__j)
+ if (_M_x[long_lag - 1][__j] != 0)
+ {
+ _M_carry = 0;
+ break;
+ }
+
+ _M_p = 0;
+ }
+
+ template<typename _RealType, int __w, int __s, int __r>
+ typename subtract_with_carry_01<_RealType, __w, __s, __r>::result_type
+ subtract_with_carry_01<_RealType, __w, __s, __r>::
+ operator()()
+ {
+ // Derive short lag index from current index.
+ int __ps = _M_p - short_lag;
+ if (__ps < 0)
+ __ps += long_lag;
+
+ _UInt32Type __new_carry;
+ for (int __j = 0; __j < __n - 1; ++__j)
+ {
+ if (_M_x[__ps][__j] > _M_x[_M_p][__j]
+ || (_M_x[__ps][__j] == _M_x[_M_p][__j] && _M_carry == 0))
+ __new_carry = 0;
+ else
+ __new_carry = 1;
+
+ _M_x[_M_p][__j] = _M_x[__ps][__j] - _M_x[_M_p][__j] - _M_carry;
+ _M_carry = __new_carry;
+ }
+
+ if (_M_x[__ps][__n - 1] > _M_x[_M_p][__n - 1]
+ || (_M_x[__ps][__n - 1] == _M_x[_M_p][__n - 1] && _M_carry == 0))
+ __new_carry = 0;
+ else
+ __new_carry = 1;
+
+ _M_x[_M_p][__n - 1] = __detail::__mod<_UInt32Type, 1, 0,
+ __detail::_Shift<_UInt32Type, __w % 32>::__value>
+ (_M_x[__ps][__n - 1] - _M_x[_M_p][__n - 1] - _M_carry);
+ _M_carry = __new_carry;
+
+ result_type __ret = 0.0;
+ for (int __j = 0; __j < __n; ++__j)
+ __ret += _M_x[_M_p][__j] * _M_npows[__j];
+
+ // Adjust current index to loop around in ring buffer.
+ if (++_M_p >= long_lag)
+ _M_p = 0;
+
+ return __ret;
+ }
+
+ template<typename _RealType, int __w, int __s, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const subtract_with_carry_01<_RealType, __w, __s, __r>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+ __os.fill(__space);
+
+ for (int __i = 0; __i < __r; ++__i)
+ for (int __j = 0; __j < __x.__n; ++__j)
+ __os << __x._M_x[__i][__j] << __space;
+ __os << __x._M_carry;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<typename _RealType, int __w, int __s, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ subtract_with_carry_01<_RealType, __w, __s, __r>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ for (int __i = 0; __i < __r; ++__i)
+ for (int __j = 0; __j < __x.__n; ++__j)
+ __is >> __x._M_x[__i][__j];
+ __is >> __x._M_carry;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<class _UniformRandomNumberGenerator, int __p, int __r>
+ typename discard_block<_UniformRandomNumberGenerator,
+ __p, __r>::result_type
+ discard_block<_UniformRandomNumberGenerator, __p, __r>::
+ operator()()
+ {
+ if (_M_n >= used_block)
+ {
+ while (_M_n < block_size)
+ {
+ _M_b();
+ ++_M_n;
+ }
+ _M_n = 0;
+ }
+ ++_M_n;
+ return _M_b();
+ }
+
+ template<class _UniformRandomNumberGenerator, int __p, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const discard_block<_UniformRandomNumberGenerator,
+ __p, __r>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::dec | __ios_base::fixed
+ | __ios_base::left);
+ __os.fill(__space);
+
+ __os << __x._M_b << __space << __x._M_n;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<class _UniformRandomNumberGenerator, int __p, int __r,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ discard_block<_UniformRandomNumberGenerator, __p, __r>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ __is >> __x._M_b >> __x._M_n;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
+ void
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::
+ _M_initialize_max()
+ {
+ const int __w = std::numeric_limits<result_type>::digits;
+
+ const result_type __m1 =
+ std::min(result_type(_M_b1.max() - _M_b1.min()),
+ __detail::_Shift<result_type, __w - __s1>::__value - 1);
+
+ const result_type __m2 =
+ std::min(result_type(_M_b2.max() - _M_b2.min()),
+ __detail::_Shift<result_type, __w - __s2>::__value - 1);
+
+ // NB: In TR1 s1 is not required to be >= s2.
+ if (__s1 < __s2)
+ _M_max = _M_initialize_max_aux(__m2, __m1, __s2 - __s1) << __s1;
+ else
+ _M_max = _M_initialize_max_aux(__m1, __m2, __s1 - __s2) << __s2;
+ }
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2>
+ typename xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::result_type
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>::
+ _M_initialize_max_aux(result_type __a, result_type __b, int __d)
+ {
+ const result_type __two2d = result_type(1) << __d;
+ const result_type __c = __a * __two2d;
+
+ if (__a == 0 || __b < __two2d)
+ return __c + __b;
+
+ const result_type __t = std::max(__c, __b);
+ const result_type __u = std::min(__c, __b);
+
+ result_type __ub = __u;
+ result_type __p;
+ for (__p = 0; __ub != 1; __ub >>= 1)
+ ++__p;
+
+ const result_type __two2p = result_type(1) << __p;
+ const result_type __k = __t / __two2p;
+
+ if (__k & 1)
+ return (__k + 1) * __two2p - 1;
+
+ if (__c >= __b)
+ return (__k + 1) * __two2p + _M_initialize_max_aux((__t % __two2p)
+ / __two2d,
+ __u % __two2p, __d);
+ else
+ return (__k + 1) * __two2p + _M_initialize_max_aux((__u % __two2p)
+ / __two2d,
+ __t % __two2p, __d);
+ }
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left);
+ __os.fill(__space);
+
+ __os << __x.base1() << __space << __x.base2();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<class _UniformRandomNumberGenerator1, int __s1,
+ class _UniformRandomNumberGenerator2, int __s2,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ xor_combine<_UniformRandomNumberGenerator1, __s1,
+ _UniformRandomNumberGenerator2, __s2>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::skipws);
+
+ __is >> __x._M_b1 >> __x._M_b2;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _IntType>
+ template<typename _UniformRandomNumberGenerator>
+ typename uniform_int<_IntType>::result_type
+ uniform_int<_IntType>::
+ _M_call(_UniformRandomNumberGenerator& __urng,
+ result_type __min, result_type __max, true_type)
+ {
+ // XXX Must be fixed to work well for *arbitrary* __urng.max(),
+ // __urng.min(), __max, __min. Currently works fine only in the
+ // most common case __urng.max() - __urng.min() >= __max - __min,
+ // with __urng.max() > __urng.min() >= 0.
+ typedef typename __gnu_cxx::__add_unsigned<typename
+ _UniformRandomNumberGenerator::result_type>::__type __urntype;
+ typedef typename __gnu_cxx::__add_unsigned<result_type>::__type
+ __utype;
+ typedef typename __gnu_cxx::__conditional_type<(sizeof(__urntype)
+ > sizeof(__utype)),
+ __urntype, __utype>::__type __uctype;
+
+ result_type __ret;
+
+ const __urntype __urnmin = __urng.min();
+ const __urntype __urnmax = __urng.max();
+ const __urntype __urnrange = __urnmax - __urnmin;
+ const __uctype __urange = __max - __min;
+ const __uctype __udenom = (__urnrange <= __urange
+ ? 1 : __urnrange / (__urange + 1));
+ do
+ __ret = (__urntype(__urng()) - __urnmin) / __udenom;
+ while (__ret > __max - __min);
+
+ return __ret + __min;
+ }
+
+ template<typename _IntType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const uniform_int<_IntType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+
+ __os << __x.min() << __space << __x.max();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ return __os;
+ }
+
+ template<typename _IntType, typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ uniform_int<_IntType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ __is >> __x._M_min >> __x._M_max;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const bernoulli_distribution& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__os.widen(' '));
+ __os.precision(__gnu_cxx::__numeric_traits<double>::__max_digits10);
+
+ __os << __x.p();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+
+ template<typename _IntType, typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename geometric_distribution<_IntType, _RealType>::result_type
+ geometric_distribution<_IntType, _RealType>::
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ // About the epsilon thing see this thread:
+ // http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00971.html
+ const _RealType __naf =
+ (1 - std::numeric_limits<_RealType>::epsilon()) / 2;
+ // The largest _RealType convertible to _IntType.
+ const _RealType __thr =
+ std::numeric_limits<_IntType>::max() + __naf;
+
+ _RealType __cand;
+ do
+ __cand = std::ceil(std::log(__urng()) / _M_log_p);
+ while (__cand >= __thr);
+
+ return result_type(__cand + __naf);
+ }
+
+ template<typename _IntType, typename _RealType,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const geometric_distribution<_IntType, _RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__os.widen(' '));
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.p();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+
+ template<typename _IntType, typename _RealType>
+ void
+ poisson_distribution<_IntType, _RealType>::
+ _M_initialize()
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (_M_mean >= 12)
+ {
+ const _RealType __m = std::floor(_M_mean);
+ _M_lm_thr = std::log(_M_mean);
+ _M_lfm = std::_GLIBCXX_TR1 lgamma(__m + 1);
+ _M_sm = std::sqrt(__m);
+
+ const _RealType __pi_4 = 0.7853981633974483096156608458198757L;
+ const _RealType __dx = std::sqrt(2 * __m * std::log(32 * __m
+ / __pi_4));
+ _M_d = std::_GLIBCXX_TR1 round(std::max(_RealType(6),
+ std::min(__m, __dx)));
+ const _RealType __cx = 2 * __m + _M_d;
+ _M_scx = std::sqrt(__cx / 2);
+ _M_1cx = 1 / __cx;
+
+ _M_c2b = std::sqrt(__pi_4 * __cx) * std::exp(_M_1cx);
+ _M_cb = 2 * __cx * std::exp(-_M_d * _M_1cx * (1 + _M_d / 2)) / _M_d;
+ }
+ else
+#endif
+ _M_lm_thr = std::exp(-_M_mean);
+ }
+
+ /**
+ * A rejection algorithm when mean >= 12 and a simple method based
+ * upon the multiplication of uniform random variates otherwise.
+ * NB: The former is available only if _GLIBCXX_USE_C99_MATH_TR1
+ * is defined.
+ *
+ * Reference:
+ * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * New York, 1986, Ch. X, Sects. 3.3 & 3.4 (+ Errata!).
+ */
+ template<typename _IntType, typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename poisson_distribution<_IntType, _RealType>::result_type
+ poisson_distribution<_IntType, _RealType>::
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (_M_mean >= 12)
+ {
+ _RealType __x;
+
+ // See comments above...
+ const _RealType __naf =
+ (1 - std::numeric_limits<_RealType>::epsilon()) / 2;
+ const _RealType __thr =
+ std::numeric_limits<_IntType>::max() + __naf;
+
+ const _RealType __m = std::floor(_M_mean);
+ // sqrt(pi / 2)
+ const _RealType __spi_2 = 1.2533141373155002512078826424055226L;
+ const _RealType __c1 = _M_sm * __spi_2;
+ const _RealType __c2 = _M_c2b + __c1;
+ const _RealType __c3 = __c2 + 1;
+ const _RealType __c4 = __c3 + 1;
+ // e^(1 / 78)
+ const _RealType __e178 = 1.0129030479320018583185514777512983L;
+ const _RealType __c5 = __c4 + __e178;
+ const _RealType __c = _M_cb + __c5;
+ const _RealType __2cx = 2 * (2 * __m + _M_d);
+
+ bool __reject = true;
+ do
+ {
+ const _RealType __u = __c * __urng();
+ const _RealType __e = -std::log(__urng());
+
+ _RealType __w = 0.0;
+
+ if (__u <= __c1)
+ {
+ const _RealType __n = _M_nd(__urng);
+ const _RealType __y = -std::abs(__n) * _M_sm - 1;
+ __x = std::floor(__y);
+ __w = -__n * __n / 2;
+ if (__x < -__m)
+ continue;
+ }
+ else if (__u <= __c2)
+ {
+ const _RealType __n = _M_nd(__urng);
+ const _RealType __y = 1 + std::abs(__n) * _M_scx;
+ __x = std::ceil(__y);
+ __w = __y * (2 - __y) * _M_1cx;
+ if (__x > _M_d)
+ continue;
+ }
+ else if (__u <= __c3)
+ // NB: This case not in the book, nor in the Errata,
+ // but should be ok...
+ __x = -1;
+ else if (__u <= __c4)
+ __x = 0;
+ else if (__u <= __c5)
+ __x = 1;
+ else
+ {
+ const _RealType __v = -std::log(__urng());
+ const _RealType __y = _M_d + __v * __2cx / _M_d;
+ __x = std::ceil(__y);
+ __w = -_M_d * _M_1cx * (1 + __y / 2);
+ }
+
+ __reject = (__w - __e - __x * _M_lm_thr
+ > _M_lfm - std::_GLIBCXX_TR1 lgamma(__x + __m + 1));
+
+ __reject |= __x + __m >= __thr;
+
+ } while (__reject);
+
+ return result_type(__x + __m + __naf);
+ }
+ else
+#endif
+ {
+ _IntType __x = 0;
+ _RealType __prod = 1.0;
+
+ do
+ {
+ __prod *= __urng();
+ __x += 1;
+ }
+ while (__prod > _M_lm_thr);
+
+ return __x - 1;
+ }
+ }
+
+ template<typename _IntType, typename _RealType,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const poisson_distribution<_IntType, _RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.mean() << __space << __x._M_nd;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _IntType, typename _RealType,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ poisson_distribution<_IntType, _RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::skipws);
+
+ __is >> __x._M_mean >> __x._M_nd;
+ __x._M_initialize();
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _IntType, typename _RealType>
+ void
+ binomial_distribution<_IntType, _RealType>::
+ _M_initialize()
+ {
+ const _RealType __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p;
+
+ _M_easy = true;
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (_M_t * __p12 >= 8)
+ {
+ _M_easy = false;
+ const _RealType __np = std::floor(_M_t * __p12);
+ const _RealType __pa = __np / _M_t;
+ const _RealType __1p = 1 - __pa;
+
+ const _RealType __pi_4 = 0.7853981633974483096156608458198757L;
+ const _RealType __d1x =
+ std::sqrt(__np * __1p * std::log(32 * __np
+ / (81 * __pi_4 * __1p)));
+ _M_d1 = std::_GLIBCXX_TR1 round(std::max(_RealType(1), __d1x));
+ const _RealType __d2x =
+ std::sqrt(__np * __1p * std::log(32 * _M_t * __1p
+ / (__pi_4 * __pa)));
+ _M_d2 = std::_GLIBCXX_TR1 round(std::max(_RealType(1), __d2x));
+
+ // sqrt(pi / 2)
+ const _RealType __spi_2 = 1.2533141373155002512078826424055226L;
+ _M_s1 = std::sqrt(__np * __1p) * (1 + _M_d1 / (4 * __np));
+ _M_s2 = std::sqrt(__np * __1p) * (1 + _M_d2 / (4 * _M_t * __1p));
+ _M_c = 2 * _M_d1 / __np;
+ _M_a1 = std::exp(_M_c) * _M_s1 * __spi_2;
+ const _RealType __a12 = _M_a1 + _M_s2 * __spi_2;
+ const _RealType __s1s = _M_s1 * _M_s1;
+ _M_a123 = __a12 + (std::exp(_M_d1 / (_M_t * __1p))
+ * 2 * __s1s / _M_d1
+ * std::exp(-_M_d1 * _M_d1 / (2 * __s1s)));
+ const _RealType __s2s = _M_s2 * _M_s2;
+ _M_s = (_M_a123 + 2 * __s2s / _M_d2
+ * std::exp(-_M_d2 * _M_d2 / (2 * __s2s)));
+ _M_lf = (std::_GLIBCXX_TR1 lgamma(__np + 1)
+ + std::_GLIBCXX_TR1 lgamma(_M_t - __np + 1));
+ _M_lp1p = std::log(__pa / __1p);
+
+ _M_q = -std::log(1 - (__p12 - __pa) / __1p);
+ }
+ else
+#endif
+ _M_q = -std::log(1 - __p12);
+ }
+
+ template<typename _IntType, typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename binomial_distribution<_IntType, _RealType>::result_type
+ binomial_distribution<_IntType, _RealType>::
+ _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t)
+ {
+ _IntType __x = 0;
+ _RealType __sum = 0;
+
+ do
+ {
+ const _RealType __e = -std::log(__urng());
+ __sum += __e / (__t - __x);
+ __x += 1;
+ }
+ while (__sum <= _M_q);
+
+ return __x - 1;
+ }
+
+ /**
+ * A rejection algorithm when t * p >= 8 and a simple waiting time
+ * method - the second in the referenced book - otherwise.
+ * NB: The former is available only if _GLIBCXX_USE_C99_MATH_TR1
+ * is defined.
+ *
+ * Reference:
+ * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * New York, 1986, Ch. X, Sect. 4 (+ Errata!).
+ */
+ template<typename _IntType, typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename binomial_distribution<_IntType, _RealType>::result_type
+ binomial_distribution<_IntType, _RealType>::
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ result_type __ret;
+ const _RealType __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p;
+
+#if _GLIBCXX_USE_C99_MATH_TR1
+ if (!_M_easy)
+ {
+ _RealType __x;
+
+ // See comments above...
+ const _RealType __naf =
+ (1 - std::numeric_limits<_RealType>::epsilon()) / 2;
+ const _RealType __thr =
+ std::numeric_limits<_IntType>::max() + __naf;
+
+ const _RealType __np = std::floor(_M_t * __p12);
+ const _RealType __pa = __np / _M_t;
+
+ // sqrt(pi / 2)
+ const _RealType __spi_2 = 1.2533141373155002512078826424055226L;
+ const _RealType __a1 = _M_a1;
+ const _RealType __a12 = __a1 + _M_s2 * __spi_2;
+ const _RealType __a123 = _M_a123;
+ const _RealType __s1s = _M_s1 * _M_s1;
+ const _RealType __s2s = _M_s2 * _M_s2;
+
+ bool __reject;
+ do
+ {
+ const _RealType __u = _M_s * __urng();
+
+ _RealType __v;
+
+ if (__u <= __a1)
+ {
+ const _RealType __n = _M_nd(__urng);
+ const _RealType __y = _M_s1 * std::abs(__n);
+ __reject = __y >= _M_d1;
+ if (!__reject)
+ {
+ const _RealType __e = -std::log(__urng());
+ __x = std::floor(__y);
+ __v = -__e - __n * __n / 2 + _M_c;
+ }
+ }
+ else if (__u <= __a12)
+ {
+ const _RealType __n = _M_nd(__urng);
+ const _RealType __y = _M_s2 * std::abs(__n);
+ __reject = __y >= _M_d2;
+ if (!__reject)
+ {
+ const _RealType __e = -std::log(__urng());
+ __x = std::floor(-__y);
+ __v = -__e - __n * __n / 2;
+ }
+ }
+ else if (__u <= __a123)
+ {
+ const _RealType __e1 = -std::log(__urng());
+ const _RealType __e2 = -std::log(__urng());
+
+ const _RealType __y = _M_d1 + 2 * __s1s * __e1 / _M_d1;
+ __x = std::floor(__y);
+ __v = (-__e2 + _M_d1 * (1 / (_M_t - __np)
+ -__y / (2 * __s1s)));
+ __reject = false;
+ }
+ else
+ {
+ const _RealType __e1 = -std::log(__urng());
+ const _RealType __e2 = -std::log(__urng());
+
+ const _RealType __y = _M_d2 + 2 * __s2s * __e1 / _M_d2;
+ __x = std::floor(-__y);
+ __v = -__e2 - _M_d2 * __y / (2 * __s2s);
+ __reject = false;
+ }
+
+ __reject = __reject || __x < -__np || __x > _M_t - __np;
+ if (!__reject)
+ {
+ const _RealType __lfx =
+ std::_GLIBCXX_TR1 lgamma(__np + __x + 1)
+ + std::_GLIBCXX_TR1 lgamma(_M_t - (__np + __x) + 1);
+ __reject = __v > _M_lf - __lfx + __x * _M_lp1p;
+ }
+
+ __reject |= __x + __np >= __thr;
+ }
+ while (__reject);
+
+ __x += __np + __naf;
+
+ const _IntType __z = _M_waiting(__urng, _M_t - _IntType(__x));
+ __ret = _IntType(__x) + __z;
+ }
+ else
+#endif
+ __ret = _M_waiting(__urng, _M_t);
+
+ if (__p12 != _M_p)
+ __ret = _M_t - __ret;
+ return __ret;
+ }
+
+ template<typename _IntType, typename _RealType,
+ typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const binomial_distribution<_IntType, _RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.t() << __space << __x.p()
+ << __space << __x._M_nd;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _IntType, typename _RealType,
+ typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ binomial_distribution<_IntType, _RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ __is >> __x._M_t >> __x._M_p >> __x._M_nd;
+ __x._M_initialize();
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const uniform_real<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.min() << __space << __x.max();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ uniform_real<_RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::skipws);
+
+ __is >> __x._M_min >> __x._M_max;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const exponential_distribution<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__os.widen(' '));
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.lambda();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+
+ /**
+ * Polar method due to Marsaglia.
+ *
+ * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * New York, 1986, Ch. V, Sect. 4.4.
+ */
+ template<typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename normal_distribution<_RealType>::result_type
+ normal_distribution<_RealType>::
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ result_type __ret;
+
+ if (_M_saved_available)
+ {
+ _M_saved_available = false;
+ __ret = _M_saved;
+ }
+ else
+ {
+ result_type __x, __y, __r2;
+ do
+ {
+ __x = result_type(2.0) * __urng() - 1.0;
+ __y = result_type(2.0) * __urng() - 1.0;
+ __r2 = __x * __x + __y * __y;
+ }
+ while (__r2 > 1.0 || __r2 == 0.0);
+
+ const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2);
+ _M_saved = __x * __mult;
+ _M_saved_available = true;
+ __ret = __y * __mult;
+ }
+
+ __ret = __ret * _M_sigma + _M_mean;
+ return __ret;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const normal_distribution<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ const _CharT __space = __os.widen(' ');
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__space);
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x._M_saved_available << __space
+ << __x.mean() << __space
+ << __x.sigma();
+ if (__x._M_saved_available)
+ __os << __space << __x._M_saved;
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_istream<_CharT, _Traits>&
+ operator>>(std::basic_istream<_CharT, _Traits>& __is,
+ normal_distribution<_RealType>& __x)
+ {
+ typedef std::basic_istream<_CharT, _Traits> __istream_type;
+ typedef typename __istream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __is.flags();
+ __is.flags(__ios_base::dec | __ios_base::skipws);
+
+ __is >> __x._M_saved_available >> __x._M_mean
+ >> __x._M_sigma;
+ if (__x._M_saved_available)
+ __is >> __x._M_saved;
+
+ __is.flags(__flags);
+ return __is;
+ }
+
+
+ template<typename _RealType>
+ void
+ gamma_distribution<_RealType>::
+ _M_initialize()
+ {
+ if (_M_alpha >= 1)
+ _M_l_d = std::sqrt(2 * _M_alpha - 1);
+ else
+ _M_l_d = (std::pow(_M_alpha, _M_alpha / (1 - _M_alpha))
+ * (1 - _M_alpha));
+ }
+
+ /**
+ * Cheng's rejection algorithm GB for alpha >= 1 and a modification
+ * of Vaduva's rejection from Weibull algorithm due to Devroye for
+ * alpha < 1.
+ *
+ * References:
+ * Cheng, R. C. "The Generation of Gamma Random Variables with Non-integral
+ * Shape Parameter." Applied Statistics, 26, 71-75, 1977.
+ *
+ * Vaduva, I. "Computer Generation of Gamma Gandom Variables by Rejection
+ * and Composition Procedures." Math. Operationsforschung and Statistik,
+ * Series in Statistics, 8, 545-576, 1977.
+ *
+ * Devroye, L. "Non-Uniform Random Variates Generation." Springer-Verlag,
+ * New York, 1986, Ch. IX, Sect. 3.4 (+ Errata!).
+ */
+ template<typename _RealType>
+ template<class _UniformRandomNumberGenerator>
+ typename gamma_distribution<_RealType>::result_type
+ gamma_distribution<_RealType>::
+ operator()(_UniformRandomNumberGenerator& __urng)
+ {
+ result_type __x;
+
+ bool __reject;
+ if (_M_alpha >= 1)
+ {
+ // alpha - log(4)
+ const result_type __b = _M_alpha
+ - result_type(1.3862943611198906188344642429163531L);
+ const result_type __c = _M_alpha + _M_l_d;
+ const result_type __1l = 1 / _M_l_d;
+
+ // 1 + log(9 / 2)
+ const result_type __k = 2.5040773967762740733732583523868748L;
+
+ do
+ {
+ const result_type __u = __urng();
+ const result_type __v = __urng();
+
+ const result_type __y = __1l * std::log(__v / (1 - __v));
+ __x = _M_alpha * std::exp(__y);
+
+ const result_type __z = __u * __v * __v;
+ const result_type __r = __b + __c * __y - __x;
+
+ __reject = __r < result_type(4.5) * __z - __k;
+ if (__reject)
+ __reject = __r < std::log(__z);
+ }
+ while (__reject);
+ }
+ else
+ {
+ const result_type __c = 1 / _M_alpha;
+
+ do
+ {
+ const result_type __z = -std::log(__urng());
+ const result_type __e = -std::log(__urng());
+
+ __x = std::pow(__z, __c);
+
+ __reject = __z + __e < _M_l_d + __x;
+ }
+ while (__reject);
+ }
+
+ return __x;
+ }
+
+ template<typename _RealType, typename _CharT, typename _Traits>
+ std::basic_ostream<_CharT, _Traits>&
+ operator<<(std::basic_ostream<_CharT, _Traits>& __os,
+ const gamma_distribution<_RealType>& __x)
+ {
+ typedef std::basic_ostream<_CharT, _Traits> __ostream_type;
+ typedef typename __ostream_type::ios_base __ios_base;
+
+ const typename __ios_base::fmtflags __flags = __os.flags();
+ const _CharT __fill = __os.fill();
+ const std::streamsize __precision = __os.precision();
+ __os.flags(__ios_base::scientific | __ios_base::left);
+ __os.fill(__os.widen(' '));
+ __os.precision(__gnu_cxx::__numeric_traits<_RealType>::__max_digits10);
+
+ __os << __x.alpha();
+
+ __os.flags(__flags);
+ __os.fill(__fill);
+ __os.precision(__precision);
+ return __os;
+ }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/regex b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/regex
new file mode 100644
index 0000000..9352bc1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/regex
@@ -0,0 +1,2708 @@
+// class template regex -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/**
+ * @file tr1_impl/regex
+ * @brief The common implementation file for tr1 and std regular expressions.
+ *
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+/**
+ * @defgroup tr1_regex Regular Expressions
+ * A facility for performing regular expression pattern matching.
+ */
+ //@{
+
+/** @namespace std::regex_constants
+ * @brief ISO C++ 0x entities sub namespace for regex.
+ */
+namespace regex_constants
+{
+ /**
+ * @name 5.1 Regular Expression Syntax Options
+ */
+ //@{
+ enum __syntax_option
+ {
+ _S_icase,
+ _S_nosubs,
+ _S_optimize,
+ _S_collate,
+ _S_ECMAScript,
+ _S_basic,
+ _S_extended,
+ _S_awk,
+ _S_grep,
+ _S_egrep,
+ _S_syntax_last
+ };
+
+ /**
+ * @brief This is a bitmask type indicating how to interpret the regex.
+ *
+ * The @c syntax_option_type is implementation defined but it is valid to
+ * perform bitwise operations on these values and expect the right thing to
+ * happen.
+ *
+ * A valid value of type syntax_option_type shall have exactly one of the
+ * elements @c ECMAScript, @c basic, @c extended, @c awk, @c grep, @c egrep
+ * %set.
+ */
+ typedef unsigned int syntax_option_type;
+
+ /**
+ * Specifies that the matching of regular expressions against a character
+ * sequence shall be performed without regard to case.
+ */
+ static const syntax_option_type icase = 1 << _S_icase;
+
+ /**
+ * Specifies that when a regular expression is matched against a character
+ * container sequence, no sub-expression matches are to be stored in the
+ * supplied match_results structure.
+ */
+ static const syntax_option_type nosubs = 1 << _S_nosubs;
+
+ /**
+ * Specifies that the regular expression engine should pay more attention to
+ * the speed with which regular expressions are matched, and less to the
+ * speed with which regular expression objects are constructed. Otherwise
+ * it has no detectable effect on the program output.
+ */
+ static const syntax_option_type optimize = 1 << _S_optimize;
+
+ /**
+ * Specifies that character ranges of the form [a-b] should be locale
+ * sensitive.
+ */
+ static const syntax_option_type collate = 1 << _S_collate;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by ECMAScript in ECMA-262 [Ecma International, ECMAScript
+ * Language Specification, Standard Ecma-262, third edition, 1999], as
+ * modified in tr1 section [7.13]. This grammar is similar to that defined
+ * in the PERL scripting language but extended with elements found in the
+ * POSIX regular expression grammar.
+ */
+ static const syntax_option_type ECMAScript = 1 << _S_ECMAScript;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by POSIX basic regular expressions in IEEE Std 1003.1-2001,
+ * Portable Operating System Interface (POSIX), Base Definitions and
+ * Headers, Section 9, Regular Expressions [IEEE, Information Technology --
+ * Portable Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
+ */
+ static const syntax_option_type basic = 1 << _S_basic;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by POSIX extended regular expressions in IEEE Std 1003.1-2001,
+ * Portable Operating System Interface (POSIX), Base Definitions and Headers,
+ * Section 9, Regular Expressions.
+ */
+ static const syntax_option_type extended = 1 << _S_extended;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by POSIX utility awk in IEEE Std 1003.1-2001. This option is
+ * identical to syntax_option_type extended, except that C-style escape
+ * sequences are supported. These sequences are, explicitly, "\\", "\a",
+ * "\b", "\f", "\n", "\r", "\t" , "\v", "\"", "'",
+ * and "\ddd" (where ddd is one, two, or three octal digits).
+ */
+ static const syntax_option_type awk = 1 << _S_awk;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by POSIX utility grep in IEEE Std 1003.1-2001. This option is
+ * identical to syntax_option_type basic, except that newlines are treated
+ * as whitespace.
+ */
+ static const syntax_option_type grep = 1 << _S_grep;
+
+ /**
+ * Specifies that the grammar recognized by the regular expression engine is
+ * that used by POSIX utility grep when given the -E option in
+ * IEEE Std 1003.1-2001. This option is identical to syntax_option_type
+ * extended, except that newlines are treated as whitespace.
+ */
+ static const syntax_option_type egrep = 1 << _S_egrep;
+
+ //@}
+
+ /**
+ * @name 5.2 Matching Rules
+ *
+ * Matching a regular expression against a sequence of characters [first,
+ * last) proceeds according to the rules of the grammar specified for the
+ * regular expression object, modified according to the effects listed
+ * below for any bitmask elements set.
+ *
+ */
+ //@{
+
+ enum __match_flag
+ {
+ _S_not_bol,
+ _S_not_eol,
+ _S_not_bow,
+ _S_not_eow,
+ _S_any,
+ _S_not_null,
+ _S_continuous,
+ _S_prev_avail,
+ _S_sed,
+ _S_no_copy,
+ _S_first_only,
+ _S_match_flag_last
+ };
+
+ /**
+ * @brief This is a bitmask type indicating regex matching rules.
+ *
+ * The @c match_flag_type is implementation defined but it is valid to
+ * perform bitwise operations on these values and expect the right thing to
+ * happen.
+ */
+ typedef std::bitset<_S_match_flag_last> match_flag_type;
+
+ /**
+ * The default matching rules.
+ */
+ static const match_flag_type match_default = 0;
+
+ /**
+ * The first character in the sequence [first, last) is treated as though it
+ * is not at the beginning of a line, so the character "^" in the regular
+ * expression shall not match [first, first).
+ */
+ static const match_flag_type match_not_bol = 1 << _S_not_bol;
+
+ /**
+ * The last character in the sequence [first, last) is treated as though it
+ * is not at the end of a line, so the character "$" in the regular
+ * expression shall not match [last, last).
+ */
+ static const match_flag_type match_not_eol = 1 << _S_not_eol;
+
+ /**
+ * The expression "\b" is not matched against the sub-sequence
+ * [first,first).
+ */
+ static const match_flag_type match_not_bow = 1 << _S_not_bow;
+
+ /**
+ * The expression "\b" should not be matched against the sub-sequence
+ * [last,last).
+ */
+ static const match_flag_type match_not_eow = 1 << _S_not_eow;
+
+ /**
+ * If more than one match is possible then any match is an acceptable
+ * result.
+ */
+ static const match_flag_type match_any = 1 << _S_any;
+
+ /**
+ * The expression does not match an empty sequence.
+ */
+ static const match_flag_type match_not_null = 1 << _S_not_null;
+
+ /**
+ * The expression only matches a sub-sequence that begins at first .
+ */
+ static const match_flag_type match_continuous = 1 << _S_continuous;
+
+ /**
+ * --first is a valid iterator position. When this flag is set then the
+ * flags match_not_bol and match_not_bow are ignored by the regular
+ * expression algorithms 7.11 and iterators 7.12.
+ */
+ static const match_flag_type match_prev_avail = 1 << _S_prev_avail;
+
+ /**
+ * When a regular expression match is to be replaced by a new string, the
+ * new string is constructed using the rules used by the ECMAScript replace
+ * function in ECMA- 262 [Ecma International, ECMAScript Language
+ * Specification, Standard Ecma-262, third edition, 1999], part 15.5.4.11
+ * String.prototype.replace. In addition, during search and replace
+ * operations all non-overlapping occurrences of the regular expression
+ * are located and replaced, and sections of the input that did not match
+ * the expression are copied unchanged to the output string.
+ *
+ * Format strings (from ECMA-262 [15.5.4.11]):
+ * @li $$ The dollar-sign itself ($)
+ * @li $& The matched substring.
+ * @li $` The portion of <em>string</em> that precedes the matched substring.
+ * This would be match_results::prefix().
+ * @li $' The portion of <em>string</em> that follows the matched substring.
+ * This would be match_results::suffix().
+ * @li $n The nth capture, where n is in [1,9] and $n is not followed by a
+ * decimal digit. If n <= match_results::size() and the nth capture
+ * is undefined, use the empty string instead. If n >
+ * match_results::size(), the result is implementation-defined.
+ * @li $nn The nnth capture, where nn is a two-digit decimal number on
+ * [01, 99]. If nn <= match_results::size() and the nth capture is
+ * undefined, use the empty string instead. If
+ * nn > match_results::size(), the result is implementation-defined.
+ */
+ static const match_flag_type format_default = 0;
+
+ /**
+ * When a regular expression match is to be replaced by a new string, the
+ * new string is constructed using the rules used by the POSIX sed utility
+ * in IEEE Std 1003.1- 2001 [IEEE, Information Technology -- Portable
+ * Operating System Interface (POSIX), IEEE Standard 1003.1-2001].
+ */
+ static const match_flag_type format_sed = 1 << _S_sed;
+
+ /**
+ * During a search and replace operation, sections of the character
+ * container sequence being searched that do not match the regular
+ * expression shall not be copied to the output string.
+ */
+ static const match_flag_type format_no_copy = 1 << _S_no_copy;
+
+ /**
+ * When specified during a search and replace operation, only the first
+ * occurrence of the regular expression shall be replaced.
+ */
+ static const match_flag_type format_first_only = 1 << _S_first_only;
+
+ //@}
+
+ /**
+ * @name 5.3 Error Types
+ */
+ //@{
+
+ enum error_type
+ {
+ _S_error_collate,
+ _S_error_ctype,
+ _S_error_escape,
+ _S_error_backref,
+ _S_error_brack,
+ _S_error_paren,
+ _S_error_brace,
+ _S_error_badbrace,
+ _S_error_range,
+ _S_error_space,
+ _S_error_badrepeat,
+ _S_error_complexity,
+ _S_error_stack,
+ _S_error_last
+ };
+
+ /** The expression contained an invalid collating element name. */
+ static const error_type error_collate(_S_error_collate);
+
+ /** The expression contained an invalid character class name. */
+ static const error_type error_ctype(_S_error_ctype);
+
+ /**
+ * The expression contained an invalid escaped character, or a trailing
+ * escape.
+ */
+ static const error_type error_escape(_S_error_escape);
+
+ /** The expression contained an invalid back reference. */
+ static const error_type error_backref(_S_error_backref);
+
+ /** The expression contained mismatched [ and ]. */
+ static const error_type error_brack(_S_error_brack);
+
+ /** The expression contained mismatched ( and ). */
+ static const error_type error_paren(_S_error_paren);
+
+ /** The expression contained mismatched { and } */
+ static const error_type error_brace(_S_error_brace);
+
+ /** The expression contained an invalid range in a {} expression. */
+ static const error_type error_badbrace(_S_error_badbrace);
+
+ /**
+ * The expression contained an invalid character range,
+ * such as [b-a] in most encodings.
+ */
+ static const error_type error_range(_S_error_range);
+
+ /**
+ * There was insufficient memory to convert the expression into a
+ * finite state machine.
+ */
+ static const error_type error_space(_S_error_space);
+
+ /**
+ * One of "*?+{" was not preceded by a valid regular expression.
+ */
+ static const error_type error_badrepeat(_S_error_badrepeat);
+
+ /**
+ * The complexity of an attempted match against a regular expression
+ * exceeded a pre-set level.
+ */
+ static const error_type error_complexity(_S_error_complexity);
+
+ /**
+ * There was insufficient memory to determine whether the
+ * regular expression could match the specified character sequence.
+ */
+ static const error_type error_stack(_S_error_stack);
+
+ //@}
+}
+
+
+ // [7.8] Class regex_error
+ /**
+ * @brief A regular expression exception class.
+ * @ingroup exceptions
+ *
+ * The regular expression library throws objects of this class on error.
+ */
+ class regex_error
+ : public std::runtime_error
+ {
+ public:
+ /**
+ * @brief Constructs a regex_error object.
+ *
+ * @param ecode the regex error code.
+ */
+ explicit
+ regex_error(regex_constants::error_type __ecode)
+ : std::runtime_error("regex_error"), _M_code(__ecode)
+ { }
+
+ /**
+ * @brief Gets the regex error code.
+ *
+ * @returns the regex error code.
+ */
+ regex_constants::error_type
+ code() const
+ { return _M_code; }
+
+ protected:
+ regex_constants::error_type _M_code;
+ };
+
+ // [7.7] Class regex_traits
+ /**
+ * @brief Describes aspects of a regular expression.
+ *
+ * A regular expression traits class that satisfies the requirements of tr1
+ * section [7.2].
+ *
+ * The class %regex is parameterized around a set of related types and
+ * functions used to complete the definition of its semantics. This class
+ * satisfies the requirements of such a traits class.
+ */
+ template<typename _Ch_type>
+ struct regex_traits
+ {
+ public:
+ typedef _Ch_type char_type;
+ typedef std::basic_string<char_type> string_type;
+ typedef std::locale locale_type;
+ typedef std::ctype_base::mask char_class_type;
+
+ public:
+ /**
+ * @brief Constructs a default traits object.
+ */
+ regex_traits()
+ { }
+
+ /**
+ * @brief Gives the length of a C-style string starting at @p __p.
+ *
+ * @param __p a pointer to the start of a character sequence.
+ *
+ * @returns the number of characters between @p *__p and the first
+ * default-initialized value of type @p char_type. In other words, uses
+ * the C-string algorithm for determining the length of a sequence of
+ * characters.
+ */
+ static std::size_t
+ length(const char_type* __p)
+ { return string_type::traits_type::length(__p); }
+
+ /**
+ * @brief Performs the identity translation.
+ *
+ * @param c A character to the locale-specific character set.
+ *
+ * @returns c.
+ */
+ char_type
+ translate(char_type __c) const
+ { return __c; }
+
+ /**
+ * @brief Translates a character into a case-insensitive equivalent.
+ *
+ * @param c A character to the locale-specific character set.
+ *
+ * @returns the locale-specific lower-case equivalent of c.
+ * @throws std::bad_cast if the imbued locale does not support the ctype
+ * facet.
+ */
+ char_type
+ translate_nocase(char_type __c) const
+ {
+ using std::ctype;
+ using std::use_facet;
+ return use_facet<ctype<char_type> >(_M_locale).tolower(__c);
+ }
+
+ /**
+ * @brief Gets a sort key for a character sequence.
+ *
+ * @param first beginning of the character sequence.
+ * @param last one-past-the-end of the character sequence.
+ *
+ * Returns a sort key for the character sequence designated by the
+ * iterator range [F1, F2) such that if the character sequence [G1, G2)
+ * sorts before the character sequence [H1, H2) then
+ * v.transform(G1, G2) < v.transform(H1, H2).
+ *
+ * What this really does is provide a more efficient way to compare a
+ * string to multiple other strings in locales with fancy collation
+ * rules and equivalence classes.
+ *
+ * @returns a locale-specific sort key equivalent to the input range.
+ *
+ * @throws std::bad_cast if the current locale does not have a collate
+ * facet.
+ */
+ template<typename _Fwd_iter>
+ string_type
+ transform(_Fwd_iter __first, _Fwd_iter __last) const
+ {
+ using std::collate;
+ using std::use_facet;
+ const collate<_Ch_type>& __c(use_facet<
+ collate<_Ch_type> >(_M_locale));
+ string_type __s(__first, __last);
+ return __c.transform(__s.data(), __s.data() + __s.size());
+ }
+
+ /**
+ * @brief Dunno.
+ *
+ * @param first beginning of the character sequence.
+ * @param last one-past-the-end of the character sequence.
+ *
+ * Effects: if typeid(use_facet<collate<_Ch_type> >) ==
+ * typeid(collate_byname<_Ch_type>) and the form of the sort key
+ * returned by collate_byname<_Ch_type>::transform(first, last) is known
+ * and can be converted into a primary sort key then returns that key,
+ * otherwise returns an empty string. WTF??
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Fwd_iter>
+ string_type
+ transform_primary(_Fwd_iter __first, _Fwd_iter __last) const;
+
+ /**
+ * @brief Gets a collation element by name.
+ *
+ * @param first beginning of the collation element name.
+ * @param last one-past-the-end of the collation element name.
+ *
+ * @returns a sequence of one or more characters that represents the
+ * collating element consisting of the character sequence designated by
+ * the iterator range [first, last). Returns an empty string if the
+ * character sequence is not a valid collating element.
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Fwd_iter>
+ string_type
+ lookup_collatename(_Fwd_iter __first, _Fwd_iter __last) const;
+
+ /**
+ * @brief Maps one or more characters to a named character
+ * classification.
+ *
+ * @param first beginning of the character sequence.
+ * @param last one-past-the-end of the character sequence.
+ *
+ * @returns an unspecified value that represents the character
+ * classification named by the character sequence designated by the
+ * iterator range [first, last). The value returned shall be independent
+ * of the case of the characters in the character sequence. If the name
+ * is not recognized then returns a value that compares equal to 0.
+ *
+ * At least the following names (or their wide-character equivalent) are
+ * supported.
+ * - d
+ * - w
+ * - s
+ * - alnum
+ * - alpha
+ * - blank
+ * - cntrl
+ * - digit
+ * - graph
+ * - lower
+ * - print
+ * - punct
+ * - space
+ * - upper
+ * - xdigit
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Fwd_iter>
+ char_class_type
+ lookup_classname(_Fwd_iter __first, _Fwd_iter __last) const;
+
+ /**
+ * @brief Determines if @p c is a member of an identified class.
+ *
+ * @param c a character.
+ * @param f a class type (as returned from lookup_classname).
+ *
+ * @returns true if the character @p c is a member of the classification
+ * represented by @p f, false otherwise.
+ *
+ * @throws std::bad_cast if the current locale does not have a ctype
+ * facet.
+ */
+ bool
+ isctype(_Ch_type __c, char_class_type __f) const;
+
+ /**
+ * @brief Converts a digit to an int.
+ *
+ * @param ch a character representing a digit.
+ * @param radix the radix if the numeric conversion (limited to 8, 10,
+ * or 16).
+ *
+ * @returns the value represented by the digit ch in base radix if the
+ * character ch is a valid digit in base radix; otherwise returns -1.
+ */
+ int
+ value(_Ch_type __ch, int __radix) const;
+
+ /**
+ * @brief Imbues the regex_traits object with a copy of a new locale.
+ *
+ * @param loc A locale.
+ *
+ * @returns a copy of the previous locale in use by the regex_traits
+ * object.
+ *
+ * @note Calling imbue with a different locale than the one currently in
+ * use invalidates all cached data held by *this.
+ */
+ locale_type
+ imbue(locale_type __loc)
+ {
+ std::swap(_M_locale, __loc);
+ return __loc;
+ }
+
+ /**
+ * @brief Gets a copy of the current locale in use by the regex_traits
+ * object.
+ */
+ locale_type
+ getloc() const
+ { return _M_locale; }
+
+ protected:
+ locale_type _M_locale;
+ };
+
+ template<typename _Ch_type>
+ bool regex_traits<_Ch_type>::
+ isctype(_Ch_type __c, char_class_type __f) const
+ {
+ using std::ctype;
+ using std::use_facet;
+ const ctype<_Ch_type>& __ctype(use_facet<
+ ctype<_Ch_type> >(_M_locale));
+
+ if (__ctype.is(__c, __f))
+ return true;
+
+ // special case of underscore in [[:w:]]
+ if (__c == __ctype.widen('_'))
+ {
+ const char* const __wb[] = "w";
+ char_class_type __wt = this->lookup_classname(__wb,
+ __wb + sizeof(__wb));
+ if (__f | __wt)
+ return true;
+ }
+
+ // special case of [[:space:]] in [[:blank:]]
+ if (__c == __ctype.isspace(__c))
+ {
+ const char* const __bb[] = "blank";
+ char_class_type __bt = this->lookup_classname(__bb,
+ __bb + sizeof(__bb));
+ if (__f | __bt)
+ return true;
+ }
+
+ return false;
+ }
+
+ template<typename _Ch_type>
+ int regex_traits<_Ch_type>::
+ value(_Ch_type __ch, int __radix) const
+ {
+ std::basic_istringstream<_Ch_type> __is(string_type(1, __ch));
+ int __v = -1;
+ if (__radix == 8)
+ __is >> std::oct;
+ else if (__radix == 16)
+ __is >> std::hex;
+ __is >> __v;
+ return __v;
+ }
+
+ // [7.8] Class basic_regex
+ /**
+ * Objects of specializations of this class represent regular expressions
+ * constructed from sequences of character type @p _Ch_type.
+ *
+ * Storage for the regular expression is allocated and deallocated as
+ * necessary by the member functions of this class.
+ */
+ template<typename _Ch_type, typename _Rx_traits = regex_traits<_Ch_type> >
+ class basic_regex
+ {
+ public:
+ // types:
+ typedef _Ch_type value_type;
+ typedef regex_constants::syntax_option_type flag_type;
+ typedef typename _Rx_traits::locale_type locale_type;
+ typedef typename _Rx_traits::string_type string_type;
+
+ /**
+ * @name Constants
+ * tr1 [7.8.1] std [28.8.1]
+ */
+ //@{
+ static const regex_constants::syntax_option_type icase
+ = regex_constants::icase;
+ static const regex_constants::syntax_option_type nosubs
+ = regex_constants::nosubs;
+ static const regex_constants::syntax_option_type optimize
+ = regex_constants::optimize;
+ static const regex_constants::syntax_option_type collate
+ = regex_constants::collate;
+ static const regex_constants::syntax_option_type ECMAScript
+ = regex_constants::ECMAScript;
+ static const regex_constants::syntax_option_type basic
+ = regex_constants::basic;
+ static const regex_constants::syntax_option_type extended
+ = regex_constants::extended;
+ static const regex_constants::syntax_option_type awk
+ = regex_constants::awk;
+ static const regex_constants::syntax_option_type grep
+ = regex_constants::grep;
+ static const regex_constants::syntax_option_type egrep
+ = regex_constants::egrep;
+ //@}
+
+ // [7.8.2] construct/copy/destroy
+ /**
+ * Constructs a basic regular expression that does not match any
+ * character sequence.
+ */
+ basic_regex()
+ : _M_flags(regex_constants::ECMAScript), _M_pattern(), _M_mark_count(0)
+ { _M_compile(); }
+
+ /**
+ * @brief Constructs a basic regular expression from the sequence
+ * [p, p + char_traits<_Ch_type>::length(p)) interpreted according to the
+ * flags in @p f.
+ *
+ * @param p A pointer to the start of a C-style null-terminated string
+ * containing a regular expression.
+ * @param f Flags indicating the syntax rules and options.
+ *
+ * @throws regex_error if @p p is not a valid regular expression.
+ */
+ explicit
+ basic_regex(const _Ch_type* __p,
+ flag_type __f = regex_constants::ECMAScript)
+ : _M_flags(__f), _M_pattern(__p), _M_mark_count(0)
+ { _M_compile(); }
+
+ /**
+ * @brief Constructs a basic regular expression from the sequence
+ * [p, p + len) interpreted according to the flags in @p f.
+ *
+ * @param p A pointer to the start of a string containing a regular
+ * expression.
+ * @param len The length of the string containing the regular expression.
+ * @param f Flags indicating the syntax rules and options.
+ *
+ * @throws regex_error if @p p is not a valid regular expression.
+ */
+ basic_regex(const _Ch_type* __p, std::size_t __len, flag_type __f)
+ : _M_flags(__f) , _M_pattern(__p, __len), _M_mark_count(0)
+ { _M_compile(); }
+
+ /**
+ * @brief Copy-constructs a basic regular expression.
+ *
+ * @param rhs A @p regex object.
+ */
+ basic_regex(const basic_regex& __rhs)
+ : _M_flags(__rhs._M_flags), _M_pattern(__rhs._M_pattern),
+ _M_mark_count(__rhs._M_mark_count)
+ { _M_compile(); }
+
+ /**
+ * @brief Constructs a basic regular expression from the string
+ * @p s interpreted according to the flags in @p f.
+ *
+ * @param s A string containing a regular expression.
+ * @param f Flags indicating the syntax rules and options.
+ *
+ * @throws regex_error if @p s is not a valid regular expression.
+ */
+ template<typename _Ch_traits, typename _Ch_alloc>
+ explicit
+ basic_regex(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s,
+ flag_type __f = regex_constants::ECMAScript)
+ : _M_flags(__f), _M_pattern(__s.begin(), __s.end()), _M_mark_count(0)
+ { _M_compile(); }
+
+ /**
+ * @brief Constructs a basic regular expression from the range
+ * [first, last) interpreted according to the flags in @p f.
+ *
+ * @param first The start of a range containing a valid regular
+ * expression.
+ * @param last The end of a range containing a valid regular
+ * expression.
+ * @param f The format flags of the regular expression.
+ *
+ * @throws regex_error if @p [first, last) is not a valid regular
+ * expression.
+ */
+ template<typename _InputIterator>
+ basic_regex(_InputIterator __first, _InputIterator __last,
+ flag_type __f = regex_constants::ECMAScript)
+ : _M_flags(__f), _M_pattern(__first, __last), _M_mark_count(0)
+ { _M_compile(); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ /**
+ * @brief Constructs a basic regular expression from an initializer list.
+ *
+ * @param l The initializer list.
+ * @param f The format flags of the regular expression.
+ *
+ * @throws regex_error if @p l is not a valid regular expression.
+ */
+ basic_regex(initializer_list<_Ch_type> __l,
+ flag_type __f = regex_constants::ECMAScript)
+ : _M_flags(__f), _M_pattern(__l.begin(), __l.end()), _M_mark_count(0)
+ { _M_compile(); }
+#endif
+
+ /**
+ * @brief Destroys a basic regular expression.
+ */
+ ~basic_regex()
+ { }
+
+ /**
+ * @brief Assigns one regular expression to another.
+ */
+ basic_regex&
+ operator=(const basic_regex& __rhs)
+ { return this->assign(__rhs); }
+
+ /**
+ * @brief Replaces a regular expression with a new one constructed from
+ * a C-style null-terminated string.
+ *
+ * @param A pointer to the start of a null-terminated C-style string
+ * containing a regular expression.
+ */
+ basic_regex&
+ operator=(const _Ch_type* __p)
+ { return this->assign(__p, flags()); }
+
+ /**
+ * @brief Replaces a regular expression with a new one constructed from
+ * a string.
+ *
+ * @param A pointer to a string containing a regular expression.
+ */
+ template<typename _Ch_typeraits, typename _Allocator>
+ basic_regex&
+ operator=(const basic_string<_Ch_type, _Ch_typeraits, _Allocator>& __s)
+ { return this->assign(__s, flags()); }
+
+ // [7.8.3] assign
+ /**
+ * @brief the real assignment operator.
+ *
+ * @param that Another regular expression object.
+ */
+ basic_regex&
+ assign(const basic_regex& __that)
+ {
+ basic_regex __tmp(__that);
+ this->swap(__tmp);
+ return *this;
+ }
+
+ /**
+ * @brief Assigns a new regular expression to a regex object from a
+ * C-style null-terminated string containing a regular expression
+ * pattern.
+ *
+ * @param p A pointer to a C-style null-terminated string containing
+ * a regular expression pattern.
+ * @param flags Syntax option flags.
+ *
+ * @throws regex_error if p does not contain a valid regular expression
+ * pattern interpreted according to @p flags. If regex_error is thrown,
+ * *this remains unchanged.
+ */
+ basic_regex&
+ assign(const _Ch_type* __p,
+ flag_type __flags = regex_constants::ECMAScript)
+ { return this->assign(string_type(__p), __flags); }
+
+ /**
+ * @brief Assigns a new regular expression to a regex object from a
+ * C-style string containing a regular expression pattern.
+ *
+ * @param p A pointer to a C-style string containing a
+ * regular expression pattern.
+ * @param len The length of the regular expression pattern string.
+ * @param flags Syntax option flags.
+ *
+ * @throws regex_error if p does not contain a valid regular expression
+ * pattern interpreted according to @p flags. If regex_error is thrown,
+ * *this remains unchanged.
+ */
+ basic_regex&
+ assign(const _Ch_type* __p, std::size_t __len, flag_type __flags)
+ { return this->assign(string_type(__p, __len), __flags); }
+
+ /**
+ * @brief Assigns a new regular expression to a regex object from a
+ * string containing a regular expression pattern.
+ *
+ * @param s A string containing a regular expression pattern.
+ * @param flags Syntax option flags.
+ *
+ * @throws regex_error if p does not contain a valid regular expression
+ * pattern interpreted according to @p flags. If regex_error is thrown,
+ * *this remains unchanged.
+ */
+ template<typename _Ch_typeraits, typename _Allocator>
+ basic_regex&
+ assign(const basic_string<_Ch_type, _Ch_typeraits, _Allocator>& __s,
+ flag_type __f = regex_constants::ECMAScript)
+ {
+ basic_regex __tmp(__s, __f);
+ this->swap(__tmp);
+ return *this;
+ }
+
+ /**
+ * @brief Assigns a new regular expression to a regex object.
+ *
+ * @param first The start of a range containing a valid regular
+ * expression.
+ * @param last The end of a range containing a valid regular
+ * expression.
+ * @param flags Syntax option flags.
+ *
+ * @throws regex_error if p does not contain a valid regular expression
+ * pattern interpreted according to @p flags. If regex_error is thrown,
+ * the object remains unchanged.
+ */
+ template<typename _InputIterator>
+ basic_regex&
+ assign(_InputIterator __first, _InputIterator __last,
+ flag_type __flags = regex_constants::ECMAScript)
+ { return this->assign(string_type(__first, __last), __flags); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ /**
+ * @brief Assigns a new regular expression to a regex object.
+ *
+ * @param l An initializer list representing a regular expression.
+ * @param flags Syntax option flags.
+ *
+ * @throws regex_error if @p l does not contain a valid regular
+ * expression pattern interpreted according to @p flags. If regex_error
+ * is thrown, the object remains unchanged.
+ */
+ basic_regex&
+ assign(initializer_list<_Ch_type> __l,
+ flag_type __f = regex_constants::ECMAScript)
+ { return this->assign(__l.begin(), __l.end(), __f); }
+#endif
+
+ // [7.8.4] const operations
+ /**
+ * @brief Gets the number of marked subexpressions within the regular
+ * expression.
+ */
+ unsigned int
+ mark_count() const
+ { return _M_mark_count; }
+
+ /**
+ * @brief Gets the flags used to construct the regular expression
+ * or in the last call to assign().
+ */
+ flag_type
+ flags() const
+ { return _M_flags; }
+
+ // [7.8.5] locale
+ /**
+ * @brief Imbues the regular expression object with the given locale.
+ *
+ * @param loc A locale.
+ */
+ locale_type
+ imbue(locale_type __loc)
+ { return _M_traits.imbue(__loc); }
+
+ /**
+ * @brief Gets the locale currently imbued in the regular expression
+ * object.
+ */
+ locale_type
+ getloc() const
+ { return _M_traits.getloc(); }
+
+ // [7.8.6] swap
+ /**
+ * @brief Swaps the contents of two regular expression objects.
+ *
+ * @param rhs Another regular expression object.
+ */
+ void
+ swap(basic_regex& __rhs)
+ {
+ std::swap(_M_flags, __rhs._M_flags);
+ std::swap(_M_pattern, __rhs._M_pattern);
+ std::swap(_M_mark_count, __rhs._M_mark_count);
+ std::swap(_M_traits, __rhs._M_traits);
+ }
+
+ private:
+ /**
+ * @brief Compiles a regular expression pattern into a NFA.
+ * @todo Implement this function.
+ */
+ void _M_compile();
+
+ protected:
+ flag_type _M_flags;
+ string_type _M_pattern;
+ unsigned int _M_mark_count;
+ _Rx_traits _M_traits;
+ };
+
+ /** @brief Standard regular expressions. */
+ typedef basic_regex<char> regex;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /** @brief Standard wide-character regular expressions. */
+ typedef basic_regex<wchar_t> wregex;
+#endif
+
+
+ // [7.8.6] basic_regex swap
+ /**
+ * @brief Swaps the contents of two regular expression objects.
+ * @param lhs First regular expression.
+ * @param rhs Second regular expression.
+ */
+ template<typename _Ch_type, typename _Rx_traits>
+ inline void
+ swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
+ basic_regex<_Ch_type, _Rx_traits>& __rhs)
+ { __lhs.swap(__rhs); }
+
+
+ // [7.9] Class template sub_match
+ /**
+ * A sequence of characters matched by a particular marked sub-expression.
+ *
+ * An object of this class is essentially a pair of iterators marking a
+ * matched subexpression within a regular expression pattern match. Such
+ * objects can be converted to and compared with std::basic_string objects
+ * of a similar base character type as the pattern matched by the regular
+ * expression.
+ *
+ * The iterators that make up the pair are the usual half-open interval
+ * referencing the actual original pattern matched.
+ */
+ template<typename _BiIter>
+ class sub_match : public std::pair<_BiIter, _BiIter>
+ {
+ public:
+ typedef typename iterator_traits<_BiIter>::value_type value_type;
+ typedef typename iterator_traits<_BiIter>::difference_type
+ difference_type;
+ typedef _BiIter iterator;
+
+ public:
+ bool matched;
+
+ /**
+ * Gets the length of the matching sequence.
+ */
+ difference_type
+ length() const
+ { return this->matched ? std::distance(this->first, this->second) : 0; }
+
+ /**
+ * @brief Gets the matching sequence as a string.
+ *
+ * @returns the matching sequence as a string.
+ *
+ * This is the implicit conversion operator. It is identical to the
+ * str() member function except that it will want to pop up in
+ * unexpected places and cause a great deal of confusion and cursing
+ * from the unwary.
+ */
+ operator basic_string<value_type>() const
+ {
+ return this->matched
+ ? std::basic_string<value_type>(this->first, this->second)
+ : std::basic_string<value_type>();
+ }
+
+ /**
+ * @brief Gets the matching sequence as a string.
+ *
+ * @returns the matching sequence as a string.
+ */
+ basic_string<value_type>
+ str() const
+ {
+ return this->matched
+ ? std::basic_string<value_type>(this->first, this->second)
+ : std::basic_string<value_type>();
+ }
+
+ /**
+ * @brief Compares this and another matched sequence.
+ *
+ * @param s Another matched sequence to compare to this one.
+ *
+ * @retval <0 this matched sequence will collate before @p s.
+ * @retval =0 this matched sequence is equivalent to @p s.
+ * @retval <0 this matched sequence will collate after @p s.
+ */
+ int
+ compare(const sub_match& __s) const
+ { return this->str().compare(__s.str()); }
+
+ /**
+ * @brief Compares this sub_match to a string.
+ *
+ * @param s A string to compare to this sub_match.
+ *
+ * @retval <0 this matched sequence will collate before @p s.
+ * @retval =0 this matched sequence is equivalent to @p s.
+ * @retval <0 this matched sequence will collate after @p s.
+ */
+ int
+ compare(const basic_string<value_type>& __s) const
+ { return this->str().compare(__s); }
+
+ /**
+ * @brief Compares this sub_match to a C-style string.
+ *
+ * @param s A C-style string to compare to this sub_match.
+ *
+ * @retval <0 this matched sequence will collate before @p s.
+ * @retval =0 this matched sequence is equivalent to @p s.
+ * @retval <0 this matched sequence will collate after @p s.
+ */
+ int
+ compare(const value_type* __s) const
+ { return this->str().compare(__s); }
+ };
+
+
+ /** @brief Standard regex submatch over a C-style null-terminated string. */
+ typedef sub_match<const char*> csub_match;
+ /** @brief Standard regex submatch over a standard string. */
+ typedef sub_match<string::const_iterator> ssub_match;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /** @brief Regex submatch over a C-style null-terminated wide string. */
+ typedef sub_match<const wchar_t*> wcsub_match;
+ /** @brief Regex submatch over a standard wide string. */
+ typedef sub_match<wstring::const_iterator> wssub_match;
+#endif
+
+ // [7.9.2] sub_match non-member operators
+
+ /**
+ * @brief Tests the equivalence of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator==(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) == 0; }
+
+ /**
+ * @brief Tests the inequivalence of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator!=(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) != 0; }
+
+ /**
+ * @brief Tests the ordering of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator<(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) < 0; }
+
+ /**
+ * @brief Tests the ordering of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator<=(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) <= 0; }
+
+ /**
+ * @brief Tests the ordering of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator>=(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) >= 0; }
+
+ /**
+ * @brief Tests the ordering of two regular expression submatches.
+ * @param lhs First regular expression submatch.
+ * @param rhs Second regular expression submatch.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _BiIter>
+ inline bool
+ operator>(const sub_match<_BiIter>& __lhs,
+ const sub_match<_BiIter>& __rhs)
+ { return __lhs.compare(__rhs) > 0; }
+
+ /**
+ * @brief Tests the equivalence of a string and a regular expression
+ * submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator==(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs == __rhs.str(); }
+
+ /**
+ * @brief Tests the inequivalence of a string and a regular expression
+ * submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator!=(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs, const sub_match<_Bi_iter>& __rhs)
+ { return __lhs != __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator<(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs, const sub_match<_Bi_iter>& __rhs)
+ { return __lhs < __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator>(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs, const sub_match<_Bi_iter>& __rhs)
+ { return __lhs > __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator>=(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs, const sub_match<_Bi_iter>& __rhs)
+ { return __lhs >= __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator<=(const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __lhs, const sub_match<_Bi_iter>& __rhs)
+ { return __lhs <= __rhs.str(); }
+
+ /**
+ * @brief Tests the equivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator==(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() == __rhs; }
+
+ /**
+ * @brief Tests the inequivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, typename _Ch_traits, typename _Ch_alloc>
+ inline bool
+ operator!=(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() != __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, class _Ch_traits, class _Ch_alloc>
+ inline bool
+ operator<(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() < __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, class _Ch_traits, class _Ch_alloc>
+ inline bool
+ operator>(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() > __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, class _Ch_traits, class _Ch_alloc>
+ inline bool
+ operator>=(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() >= __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter, class _Ch_traits, class _Ch_alloc>
+ inline bool
+ operator<=(const sub_match<_Bi_iter>& __lhs,
+ const basic_string<
+ typename iterator_traits<_Bi_iter>::value_type,
+ _Ch_traits, _Ch_alloc>& __rhs)
+ { return __lhs.str() <= __rhs; }
+
+ /**
+ * @brief Tests the equivalence of a C string and a regular expression
+ * submatch.
+ * @param lhs A C string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs == __rhs.str(); }
+
+ /**
+ * @brief Tests the inequivalence of an iterator value and a regular
+ * expression submatch.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator!=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs != __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs < __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs > __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs >= __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs <= __rhs.str(); }
+
+ /**
+ * @brief Tests the equivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A pointer to a string?
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator==(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() == __rhs; }
+
+ /**
+ * @brief Tests the inequivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A pointer to a string.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator!=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() != __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() < __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() > __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() >= __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A string.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const* __rhs)
+ { return __lhs.str() <= __rhs; }
+
+ /**
+ * @brief Tests the equivalence of a string and a regular expression
+ * submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs == __rhs.str(); }
+
+ /**
+ * @brief Tests the inequivalence of a string and a regular expression
+ * submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator!=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs != __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs < __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs > __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs >= __rhs.str(); }
+
+ /**
+ * @brief Tests the ordering of a string and a regular expression submatch.
+ * @param lhs A string.
+ * @param rhs A regular expression submatch.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
+ const sub_match<_Bi_iter>& __rhs)
+ { return __lhs <= __rhs.str(); }
+
+ /**
+ * @brief Tests the equivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs is equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator==(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() == __rhs; }
+
+ /**
+ * @brief Tests the inequivalence of a regular expression submatch and a
+ * string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs is not equivalent to @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator!=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() != __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs precedes @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() < __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs succeeds @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() > __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs does not precede @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator>=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() >= __rhs; }
+
+ /**
+ * @brief Tests the ordering of a regular expression submatch and a string.
+ * @param lhs A regular expression submatch.
+ * @param rhs A const string reference.
+ * @returns true if @a lhs does not succeed @a rhs, false otherwise.
+ */
+ template<typename _Bi_iter>
+ inline bool
+ operator<=(const sub_match<_Bi_iter>& __lhs,
+ typename iterator_traits<_Bi_iter>::value_type const& __rhs)
+ { return __lhs.str() <= __rhs; }
+
+ /**
+ * @brief Inserts a matched string into an output stream.
+ *
+ * @param os The output stream.
+ * @param m A submatch string.
+ *
+ * @returns the output stream with the submatch string inserted.
+ */
+ template<typename _Ch_type, typename _Ch_traits, typename _Bi_iter>
+ inline
+ basic_ostream<_Ch_type, _Ch_traits>&
+ operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
+ const sub_match<_Bi_iter>& __m)
+ { return __os << __m.str(); }
+
+ // [7.10] Class template match_results
+ /**
+ * @brief The results of a match or search operation.
+ *
+ * A collection of character sequences representing the result of a regular
+ * expression match. Storage for the collection is allocated and freed as
+ * necessary by the member functions of class template match_results.
+ *
+ * This class satisfies the Sequence requirements, with the exception that
+ * only the operations defined for a const-qualified Sequence are supported.
+ *
+ * The sub_match object stored at index 0 represents sub-expression 0, i.e.
+ * the whole match. In this case the sub_match member matched is always true.
+ * The sub_match object stored at index n denotes what matched the marked
+ * sub-expression n within the matched expression. If the sub-expression n
+ * participated in a regular expression match then the sub_match member
+ * matched evaluates to true, and members first and second denote the range
+ * of characters [first, second) which formed that match. Otherwise matched
+ * is false, and members first and second point to the end of the sequence
+ * that was searched.
+ *
+ * @nosubgrouping
+ */
+ template<typename _Bi_iter,
+ typename _Allocator = allocator<sub_match<_Bi_iter> > >
+ class match_results
+ : private std::vector<std::_GLIBCXX_TR1 sub_match<_Bi_iter>, _Allocator>
+ {
+ private:
+ typedef std::vector<std::_GLIBCXX_TR1 sub_match<_Bi_iter>, _Allocator>
+ _Base_type;
+
+ public:
+ /**
+ * @name 10.? Public Types
+ */
+ //@{
+ typedef sub_match<_Bi_iter> value_type;
+ typedef typename _Allocator::const_reference const_reference;
+ typedef const_reference reference;
+ typedef typename _Base_type::const_iterator const_iterator;
+ typedef const_iterator iterator;
+ typedef typename iterator_traits<_Bi_iter>::difference_type
+ difference_type;
+ typedef typename _Allocator::size_type size_type;
+ typedef _Allocator allocator_type;
+ typedef typename iterator_traits<_Bi_iter>::value_type char_type;
+ typedef basic_string<char_type> string_type;
+ //@}
+
+ public:
+ /**
+ * @name 10.1 Construction, Copying, and Destruction
+ */
+ //@{
+
+ /**
+ * @brief Constructs a default %match_results container.
+ * @post size() returns 0 and str() returns an empty string.
+ */
+ explicit
+ match_results(const _Allocator& __a = _Allocator())
+ : _Base_type(__a), _M_matched(false)
+ { }
+
+ /**
+ * @brief Copy constructs a %match_results.
+ */
+ match_results(const match_results& __rhs)
+ : _Base_type(__rhs), _M_matched(__rhs._M_matched),
+ _M_prefix(__rhs._M_prefix), _M_suffix(__rhs._M_suffix)
+ { }
+
+ /**
+ * @brief Assigns rhs to *this.
+ */
+ match_results&
+ operator=(const match_results& __rhs)
+ {
+ match_results __tmp(__rhs);
+ this->swap(__tmp);
+ return *this;
+ }
+
+ /**
+ * @brief Destroys a %match_results object.
+ */
+ ~match_results()
+ { }
+
+ //@}
+
+ /**
+ * @name 10.2 Size
+ */
+ //@{
+
+ /**
+ * @brief Gets the number of matches and submatches.
+ *
+ * The number of matches for a given regular expression will be either 0
+ * if there was no match or mark_count() + 1 if a match was successful.
+ * Some matches may be empty.
+ *
+ * @returns the number of matches found.
+ */
+ size_type
+ size() const
+ { return _M_matched ? _Base_type::size() + 1 : 0; }
+
+ //size_type
+ //max_size() const;
+ using _Base_type::max_size;
+
+ /**
+ * @brief Indicates if the %match_results contains no results.
+ * @retval true The %match_results object is empty.
+ * @retval false The %match_results object is not empty.
+ */
+ bool
+ empty() const
+ { return size() == 0; }
+
+ //@}
+
+ /**
+ * @name 10.3 Element Access
+ */
+ //@{
+
+ /**
+ * @brief Gets the length of the indicated submatch.
+ * @param sub indicates the submatch.
+ *
+ * This function returns the length of the indicated submatch, or the
+ * length of the entire match if @p sub is zero (the default).
+ */
+ difference_type
+ length(size_type __sub = 0) const
+ { return _M_matched ? this->str(__sub).length() : 0; }
+
+ /**
+ * @brief Gets the offset of the beginning of the indicated submatch.
+ * @param sub indicates the submatch.
+ *
+ * This function returns the offset from the beginning of the target
+ * sequence to the beginning of the submatch, unless the value of @p sub
+ * is zero (the default), in which case this function returns the offset
+ * from the beginning of the target sequence to the beginning of the
+ * match.
+ */
+ difference_type
+ position(size_type __sub = 0) const
+ {
+ return _M_matched ? std::distance(this->prefix().first,
+ (*this)[__sub].first) : 0;
+ }
+
+ /**
+ * @brief Gets the match or submatch converted to a string type.
+ * @param sub indicates the submatch.
+ *
+ * This function gets the submatch (or match, if @p sub is zero) extracted
+ * from the target range and converted to the associated string type.
+ */
+ string_type
+ str(size_type __sub = 0) const
+ { return _M_matched ? (*this)[__sub].str() : string_type(); }
+
+ /**
+ * @brief Gets a %sub_match reference for the match or submatch.
+ * @param sub indicates the submatch.
+ *
+ * This function gets a reference to the indicated submatch, or the entire
+ * match if @p sub is zero.
+ *
+ * If @p sub >= size() then this function returns a %sub_match with a
+ * special value indicating no submatch.
+ */
+ const_reference
+ operator[](size_type __sub) const
+ { return _Base_type::operator[](__sub); }
+
+ /**
+ * @brief Gets a %sub_match representing the match prefix.
+ *
+ * This function gets a reference to a %sub_match object representing the
+ * part of the target range between the start of the target range and the
+ * start of the match.
+ */
+ const_reference
+ prefix() const
+ { return _M_prefix; }
+
+ /**
+ * @brief Gets a %sub_match representing the match suffix.
+ *
+ * This function gets a reference to a %sub_match object representing the
+ * part of the target range between the end of the match and the end of
+ * the target range.
+ */
+ const_reference
+ suffix() const
+ { return _M_suffix; }
+
+ /**
+ * @brief Gets an iterator to the start of the %sub_match collection.
+ */
+ const_iterator
+ begin() const
+ { return _Base_type::begin(); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ /**
+ * @brief Gets an iterator to the start of the %sub_match collection.
+ */
+ const_iterator
+ cbegin() const
+ { return _Base_type::begin(); }
+#endif
+
+ /**
+ * @brief Gets an iterator to one-past-the-end of the collection.
+ */
+ const_iterator
+ end() const
+ { return _Base_type::end(); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ /**
+ * @brief Gets an iterator to one-past-the-end of the collection.
+ */
+ const_iterator
+ cend() const
+ { return _Base_type::end(); }
+#endif
+
+ //@}
+
+ /**
+ * @name 10.4 Formatting
+ *
+ * These functions perform formatted substitution of the matched character
+ * sequences into their target. The format specifiers and escape sequences
+ * accepted by these functions are determined by their @p flags parameter
+ * as documented above.
+ */
+ //@{
+
+ /**
+ * @todo Implement this function.
+ */
+ template<typename _Out_iter>
+ _Out_iter
+ format(_Out_iter __out, const string_type& __fmt,
+ regex_constants::match_flag_type __flags
+ = regex_constants::format_default) const;
+
+ /**
+ * @todo Implement this function.
+ */
+ string_type
+ format(const string_type& __fmt,
+ regex_constants::match_flag_type __flags
+ = regex_constants::format_default) const;
+
+ //@}
+
+ /**
+ * @name 10.5 Allocator
+ */
+ //@{
+
+ /**
+ * @brief Gets a copy of the allocator.
+ */
+ //allocator_type
+ //get_allocator() const;
+ using _Base_type::get_allocator;
+
+ //@}
+
+ /**
+ * @name 10.6 Swap
+ */
+ //@{
+
+ /**
+ * @brief Swaps the contents of two match_results.
+ */
+ void
+ swap(match_results& __that)
+ {
+ _Base_type::swap(__that);
+ std::swap(_M_matched, __that._M_matched);
+ std::swap(_M_prefix, __that._M_prefix);
+ std::swap(_M_suffix, __that._M_suffix);
+ }
+ //@}
+
+ private:
+ bool _M_matched;
+ value_type _M_prefix;
+ value_type _M_suffix;
+ };
+
+ typedef match_results<const char*> cmatch;
+ typedef match_results<string::const_iterator> smatch;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef match_results<const wchar_t*> wcmatch;
+ typedef match_results<wstring::const_iterator> wsmatch;
+#endif
+
+ // match_results comparisons
+ /**
+ * @brief Compares two match_results for equality.
+ * @returns true if the two objects refer to the same match,
+ * false otherwise.
+ * @todo Implement this function.
+ */
+ template<typename _Bi_iter, typename _Allocator>
+ inline bool
+ operator==(const match_results<_Bi_iter, _Allocator>& __m1,
+ const match_results<_Bi_iter, _Allocator>& __m2);
+
+ /**
+ * @brief Compares two match_results for inequality.
+ * @returns true if the two objects do not refer to the same match,
+ * false otherwise.
+ */
+ template<typename _Bi_iter, class _Allocator>
+ inline bool
+ operator!=(const match_results<_Bi_iter, _Allocator>& __m1,
+ const match_results<_Bi_iter, _Allocator>& __m2)
+ { return !(__m1 == __m2); }
+
+ // [7.10.6] match_results swap
+ /**
+ * @brief Swaps two match results.
+ * @param lhs A match result.
+ * @param rhs A match result.
+ *
+ * The contents of the two match_results objects are swapped.
+ */
+ template<typename _Bi_iter, typename _Allocator>
+ inline void
+ swap(match_results<_Bi_iter, _Allocator>& __lhs,
+ match_results<_Bi_iter, _Allocator>& __rhs)
+ { __lhs.swap(__rhs); }
+
+ // [7.11.2] Function template regex_match
+ /**
+ * @name Matching, Searching, and Replacing
+ */
+ //@{
+
+ /**
+ * @brief Determines if there is a match between the regular expression @p e
+ * and all of the character sequence [first, last).
+ *
+ * @param first Beginning of the character sequence to match.
+ * @param last One-past-the-end of the character sequence to match.
+ * @param m The match results.
+ * @param re The regular expression.
+ * @param flags Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Bi_iter, typename _Allocator,
+ typename _Ch_type, typename _Rx_traits>
+ bool
+ regex_match(_Bi_iter __first, _Bi_iter __last,
+ match_results<_Bi_iter, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default);
+
+ /**
+ * @brief Indicates if there is a match between the regular expression @p e
+ * and all of the character sequence [first, last).
+ *
+ * @param first Beginning of the character sequence to match.
+ * @param last One-past-the-end of the character sequence to match.
+ * @param re The regular expression.
+ * @param flags Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits>
+ bool
+ regex_match(_Bi_iter __first, _Bi_iter __last,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ {
+ match_results<_Bi_iter> __what;
+ return regex_match(__first, __last, __what, __re, __flags);
+ }
+
+ /**
+ * @brief Determines if there is a match between the regular expression @p e
+ * and a C-style null-terminated string.
+ *
+ * @param s The C-style null-terminated string to match.
+ * @param m The match results.
+ * @param re The regular expression.
+ * @param f Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_type, typename _Allocator, typename _Rx_traits>
+ inline bool
+ regex_match(const _Ch_type* __s,
+ match_results<const _Ch_type*, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __f
+ = regex_constants::match_default)
+ { return regex_match(__s, __s + _Rx_traits::length(__s), __m, __re, __f); }
+
+ /**
+ * @brief Determines if there is a match between the regular expression @p e
+ * and a string.
+ *
+ * @param s The string to match.
+ * @param m The match results.
+ * @param re The regular expression.
+ * @param flags Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_traits, typename _Ch_alloc,
+ typename _Allocator, typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_match(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s,
+ match_results<typename basic_string<_Ch_type,
+ _Ch_traits, _Ch_alloc>::const_iterator, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ { return regex_match(__s.begin(), __s.end(), __m, __re, __flags); }
+
+ /**
+ * @brief Indicates if there is a match between the regular expression @p e
+ * and a C-style null-terminated string.
+ *
+ * @param s The C-style null-terminated string to match.
+ * @param re The regular expression.
+ * @param f Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_type, class _Rx_traits>
+ inline bool
+ regex_match(const _Ch_type* __s,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __f
+ = regex_constants::match_default)
+ { return regex_match(__s, __s + _Rx_traits::length(__s), __re, __f); }
+
+ /**
+ * @brief Indicates if there is a match between the regular expression @p e
+ * and a string.
+ *
+ * @param s [IN] The string to match.
+ * @param re [IN] The regular expression.
+ * @param flags [IN] Controls how the regular expression is matched.
+ *
+ * @retval true A match exists.
+ * @retval false Otherwise.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_traits, typename _Str_allocator,
+ typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_match(const basic_string<_Ch_type, _Ch_traits, _Str_allocator>& __s,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ { return regex_match(__s.begin(), __s.end(), __re, __flags); }
+
+ // [7.11.3] Function template regex_search
+ /**
+ * Searches for a regular expression within a range.
+ * @param first [IN] The start of the string to search.
+ * @param last [IN] One-past-the-end of the string to search.
+ * @param m [OUT] The match results.
+ * @param re [IN] The regular expression to search for.
+ * @param flags [IN] Search policy flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string, the content of %m is
+ * undefined.
+ *
+ * @throws an exception of type regex_error.
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Bi_iter, typename _Allocator,
+ typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_search(_Bi_iter __first, _Bi_iter __last,
+ match_results<_Bi_iter, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default);
+
+ /**
+ * Searches for a regular expression within a range.
+ * @param first [IN] The start of the string to search.
+ * @param last [IN] One-past-the-end of the string to search.
+ * @param re [IN] The regular expression to search for.
+ * @param flags [IN] Search policy flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string.
+ * @doctodo
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Bi_iter, typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_search(_Bi_iter __first, _Bi_iter __last,
+ const basic_regex<_Ch_type, _Rx_traits>& __re,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ {
+ match_results<_Bi_iter> __what;
+ return regex_search(__first, __last, __what, __re, __flags);
+ }
+
+ /**
+ * @brief Searches for a regular expression within a C-string.
+ * @param s [IN] A C-string to search for the regex.
+ * @param m [OUT] The set of regex matches.
+ * @param e [IN] The regex to search for in @p s.
+ * @param f [IN] The search flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string, the content of %m is
+ * undefined.
+ * @doctodo
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_type, class _Allocator, class _Rx_traits>
+ inline bool
+ regex_search(const _Ch_type* __s,
+ match_results<const _Ch_type*, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ regex_constants::match_flag_type __f
+ = regex_constants::match_default)
+ { return regex_search(__s, __s + _Rx_traits::length(__s), __m, __e, __f); }
+
+ /**
+ * @brief Searches for a regular expression within a C-string.
+ * @param s [IN] The C-string to search.
+ * @param e [IN] The regular expression to search for.
+ * @param f [IN] Search policy flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string.
+ * @doctodo
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_search(const _Ch_type* __s,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ regex_constants::match_flag_type __f
+ = regex_constants::match_default)
+ { return regex_search(__s, __s + _Rx_traits::length(__s), __e, __f); }
+
+ /**
+ * @brief Searches for a regular expression within a string.
+ * @param s [IN] The string to search.
+ * @param e [IN] The regular expression to search for.
+ * @param flags [IN] Search policy flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string.
+ * @doctodo
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_traits, typename _String_allocator,
+ typename _Ch_type, typename _Rx_traits>
+ inline bool
+ regex_search(const basic_string<_Ch_type, _Ch_traits,
+ _String_allocator>& __s,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ { return regex_search(__s.begin(), __s.end(), __e, __flags); }
+
+ /**
+ * @brief Searches for a regular expression within a string.
+ * @param s [IN] A C++ string to search for the regex.
+ * @param m [OUT] The set of regex matches.
+ * @param e [IN] The regex to search for in @p s.
+ * @param f [IN] The search flags.
+ * @retval true A match was found within the string.
+ * @retval false No match was found within the string, the content of %m is
+ * undefined.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Ch_traits, typename _Ch_alloc,
+ typename _Allocator, typename _Ch_type,
+ typename _Rx_traits>
+ inline bool
+ regex_search(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>& __s,
+ match_results<typename basic_string<_Ch_type,
+ _Ch_traits, _Ch_alloc>::const_iterator, _Allocator>& __m,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ regex_constants::match_flag_type __f
+ = regex_constants::match_default)
+ { return regex_search(__s.begin(), __s.end(), __m, __e, __f); }
+
+ // tr1 [7.11.4] std [28.11.4] Function template regex_replace
+ /**
+ * @doctodo
+ * @param out
+ * @param first
+ * @param last
+ * @param e
+ * @param fmt
+ * @param flags
+ *
+ * @returns out
+ * @throws an exception of type regex_error.
+ *
+ * @todo Implement this function.
+ */
+ template<typename _Out_iter, typename _Bi_iter,
+ typename _Rx_traits, typename _Ch_type>
+ inline _Out_iter
+ regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ const basic_string<_Ch_type>& __fmt,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default);
+
+ /**
+ * @doctodo
+ * @param s
+ * @param e
+ * @param fmt
+ * @param flags
+ *
+ * @returns a copy of string @p s with replacements.
+ *
+ * @throws an exception of type regex_error.
+ */
+ template<typename _Rx_traits, typename _Ch_type>
+ inline basic_string<_Ch_type>
+ regex_replace(const basic_string<_Ch_type>& __s,
+ const basic_regex<_Ch_type, _Rx_traits>& __e,
+ const basic_string<_Ch_type>& __fmt,
+ regex_constants::match_flag_type __flags
+ = regex_constants::match_default)
+ {
+ std::string __result;
+ regex_replace(std::back_inserter(__result),
+ __s.begin(), __s.end(), __e, __fmt, __flags);
+ return __result;
+ }
+
+ //@}
+
+ // tr1 [7.12.1] std [28.12] Class template regex_iterator
+ /**
+ * An iterator adaptor that will provide repeated calls of regex_search over
+ * a range until no more matches remain.
+ */
+ template<typename _Bi_iter,
+ typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type,
+ typename _Rx_traits = regex_traits<_Ch_type> >
+ class regex_iterator
+ {
+ public:
+ typedef basic_regex<_Ch_type, _Rx_traits> regex_type;
+ typedef match_results<_Bi_iter> value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ public:
+ /**
+ * @brief Provides a singular iterator, useful for indicating
+ * one-past-the-end of a range.
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator();
+
+ /**
+ * Constructs a %regex_iterator...
+ * @param a [IN] The start of a text range to search.
+ * @param b [IN] One-past-the-end of the text range to search.
+ * @param re [IN] The regular expression to match.
+ * @param m [IN] Policy flags for match rules.
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator(_Bi_iter __a, _Bi_iter __b, const regex_type& __re,
+ regex_constants::match_flag_type __m
+ = regex_constants::match_default);
+
+ /**
+ * Copy constructs a %regex_iterator.
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator(const regex_iterator& __rhs);
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator&
+ operator=(const regex_iterator& __rhs);
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ bool
+ operator==(const regex_iterator& __rhs);
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ bool
+ operator!=(const regex_iterator& __rhs);
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ const value_type&
+ operator*();
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ const value_type*
+ operator->();
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator&
+ operator++();
+
+ /**
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_iterator
+ operator++(int);
+
+ private:
+ // these members are shown for exposition only:
+ _Bi_iter begin;
+ _Bi_iter end;
+ const regex_type* pregex;
+ regex_constants::match_flag_type flags;
+ match_results<_Bi_iter> match;
+ };
+
+ typedef regex_iterator<const char*> cregex_iterator;
+ typedef regex_iterator<string::const_iterator> sregex_iterator;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ typedef regex_iterator<const wchar_t*> wcregex_iterator;
+ typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
+#endif
+
+ // [7.12.2] Class template regex_token_iterator
+ /**
+ * Iterates over submatches in a range (or "splits" a text string).
+ *
+ * The purpose of this iterator is to enumerate all, or all specified,
+ * matches of a regular expression within a text range. The dereferenced
+ * value of an iterator of this class is a std::tr1::sub_match object.
+ */
+ template<typename _Bi_iter,
+ typename _Ch_type = typename iterator_traits<_Bi_iter>::value_type,
+ typename _Rx_traits = regex_traits<_Ch_type> >
+ class regex_token_iterator
+ {
+ public:
+ typedef basic_regex<_Ch_type, _Rx_traits> regex_type;
+ typedef sub_match<_Bi_iter> value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ public:
+ /**
+ * @brief Default constructs a %regex_token_iterator.
+ * @todo Implement this function.
+ *
+ * A default-constructed %regex_token_iterator is a singular iterator
+ * that will compare equal to the one-past-the-end value for any
+ * iterator of the same type.
+ */
+ regex_token_iterator();
+
+ /**
+ * Constructs a %regex_token_iterator...
+ * @param a [IN] The start of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
+ * @param re [IN] The regular expression to search for.
+ * @param submatch [IN] Which submatch to return. There are some
+ * special values for this parameter:
+ * - -1 each enumerated subexpression does NOT
+ * match the regular expression (aka field
+ * splitting)
+ * - 0 the entire string matching the
+ * subexpression is returned for each match
+ * within the text.
+ * - >0 enumerates only the indicated
+ * subexpression from a match within the text.
+ * @param m [IN] Policy flags for match rules.
+ *
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_token_iterator(_Bi_iter __a, _Bi_iter __b, const regex_type& __re,
+ int __submatch = 0,
+ regex_constants::match_flag_type __m
+ = regex_constants::match_default);
+
+ /**
+ * Constructs a %regex_token_iterator...
+ * @param a [IN] The start of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
+ * @param re [IN] The regular expression to search for.
+ * @param submatches [IN] A list of subexpressions to return for each
+ * regular expression match within the text.
+ * @param m [IN] Policy flags for match rules.
+ *
+ * @todo Implement this function.
+ * @doctodo
+ */
+ regex_token_iterator(_Bi_iter __a, _Bi_iter __b,
+ const regex_type& __re,
+ const std::vector<int>& __submatches,
+ regex_constants::match_flag_type __m
+ = regex_constants::match_default);
+
+ /**
+ * Constructs a %regex_token_iterator...
+ * @param a [IN] The start of the text to search.
+ * @param b [IN] One-past-the-end of the text to search.
+ * @param re [IN] The regular expression to search for.
+ * @param submatches [IN] A list of subexpressions to return for each
+ * regular expression match within the text.
+ * @param m [IN] Policy flags for match rules.
+
+ * @todo Implement this function.
+ * @doctodo
+ */
+ template<std::size_t _Nm>
+ regex_token_iterator(_Bi_iter __a, _Bi_iter __b,
+ const regex_type& __re,
+ const int (&__submatches)[_Nm],
+ regex_constants::match_flag_type __m
+ = regex_constants::match_default);
+
+ /**
+ * @brief Copy constructs a %regex_token_iterator.
+ * @param rhs [IN] A %regex_token_iterator to copy.
+ * @todo Implement this function.
+ */
+ regex_token_iterator(const regex_token_iterator& __rhs);
+
+ /**
+ * @brief Assigns a %regex_token_iterator to another.
+ * @param rhs [IN] A %regex_token_iterator to copy.
+ * @todo Implement this function.
+ */
+ regex_token_iterator&
+ operator=(const regex_token_iterator& __rhs);
+
+ /**
+ * @brief Compares a %regex_token_iterator to another for equality.
+ * @todo Implement this function.
+ */
+ bool
+ operator==(const regex_token_iterator& __rhs);
+
+ /**
+ * @brief Compares a %regex_token_iterator to another for inequality.
+ * @todo Implement this function.
+ */
+ bool
+ operator!=(const regex_token_iterator& __rhs);
+
+ /**
+ * @brief Dereferences a %regex_token_iterator.
+ * @todo Implement this function.
+ */
+ const value_type&
+ operator*();
+
+ /**
+ * @brief Selects a %regex_token_iterator member.
+ * @todo Implement this function.
+ */
+ const value_type*
+ operator->();
+
+ /**
+ * @brief Increments a %regex_token_iterator.
+ * @todo Implement this function.
+ */
+ regex_token_iterator&
+ operator++();
+
+ /**
+ * @brief Postincrements a %regex_token_iterator.
+ * @todo Implement this function.
+ */
+ regex_token_iterator
+ operator++(int);
+
+ private: // data members for exposition only:
+ typedef regex_iterator<_Bi_iter, _Ch_type, _Rx_traits> position_iterator;
+
+ position_iterator __position;
+ const value_type* __result;
+ value_type __suffix;
+ std::size_t __n;
+ std::vector<int> __subs;
+ };
+
+ /** @brief Token iterator for C-style NULL-terminated strings. */
+ typedef regex_token_iterator<const char*> cregex_token_iterator;
+ /** @brief Token iterator for standard strings. */
+ typedef regex_token_iterator<string::const_iterator> sregex_token_iterator;
+#ifdef _GLIBCXX_USE_WCHAR_T
+ /** @brief Token iterator for C-style NULL-terminated wide strings. */
+ typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
+ /** @brief Token iterator for standard wide-character strings. */
+ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
+#endif
+
+ //@}
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/type_traits b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/type_traits
new file mode 100644
index 0000000..75b85ea
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/type_traits
@@ -0,0 +1,501 @@
+// TR1 type_traits -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/type_traits
+* This is an internal header file, included by other library headers.
+* You should not attempt to use it directly.
+*/
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ /**
+ * @defgroup metaprogramming Type Traits
+ * @ingroup utilities
+ *
+ * Compile time type transformation and information.
+ * @{
+ */
+
+ // For use in __is_convertible_simple.
+ struct __sfinae_types
+ {
+ typedef char __one;
+ typedef struct { char __arr[2]; } __two;
+ };
+
+#define _DEFINE_SPEC_0_HELPER \
+ template<>
+
+#define _DEFINE_SPEC_1_HELPER \
+ template<typename _Tp>
+
+#define _DEFINE_SPEC_2_HELPER \
+ template<typename _Tp, typename _Cp>
+
+#define _DEFINE_SPEC(_Order, _Trait, _Type, _Value) \
+ _DEFINE_SPEC_##_Order##_HELPER \
+ struct _Trait<_Type> \
+ : public integral_constant<bool, _Value> { };
+
+ // helper classes [4.3].
+
+ /// integral_constant
+ template<typename _Tp, _Tp __v>
+ struct integral_constant
+ {
+ static const _Tp value = __v;
+ typedef _Tp value_type;
+ typedef integral_constant<_Tp, __v> type;
+ };
+
+ /// typedef for true_type
+ typedef integral_constant<bool, true> true_type;
+
+ /// typedef for false_type
+ typedef integral_constant<bool, false> false_type;
+
+ template<typename _Tp, _Tp __v>
+ const _Tp integral_constant<_Tp, __v>::value;
+
+ /// remove_cv
+ template<typename>
+ struct remove_cv;
+
+ template<typename>
+ struct __is_void_helper
+ : public false_type { };
+ _DEFINE_SPEC(0, __is_void_helper, void, true)
+
+ // primary type categories [4.5.1].
+
+ /// is_void
+ template<typename _Tp>
+ struct is_void
+ : public integral_constant<bool, (__is_void_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ template<typename>
+ struct __is_integral_helper
+ : public false_type { };
+ _DEFINE_SPEC(0, __is_integral_helper, bool, true)
+ _DEFINE_SPEC(0, __is_integral_helper, char, true)
+ _DEFINE_SPEC(0, __is_integral_helper, signed char, true)
+ _DEFINE_SPEC(0, __is_integral_helper, unsigned char, true)
+#ifdef _GLIBCXX_USE_WCHAR_T
+ _DEFINE_SPEC(0, __is_integral_helper, wchar_t, true)
+#endif
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ _DEFINE_SPEC(0, __is_integral_helper, char16_t, true)
+ _DEFINE_SPEC(0, __is_integral_helper, char32_t, true)
+#endif
+ _DEFINE_SPEC(0, __is_integral_helper, short, true)
+ _DEFINE_SPEC(0, __is_integral_helper, unsigned short, true)
+ _DEFINE_SPEC(0, __is_integral_helper, int, true)
+ _DEFINE_SPEC(0, __is_integral_helper, unsigned int, true)
+ _DEFINE_SPEC(0, __is_integral_helper, long, true)
+ _DEFINE_SPEC(0, __is_integral_helper, unsigned long, true)
+ _DEFINE_SPEC(0, __is_integral_helper, long long, true)
+ _DEFINE_SPEC(0, __is_integral_helper, unsigned long long, true)
+
+ /// is_integral
+ template<typename _Tp>
+ struct is_integral
+ : public integral_constant<bool, (__is_integral_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ template<typename>
+ struct __is_floating_point_helper
+ : public false_type { };
+ _DEFINE_SPEC(0, __is_floating_point_helper, float, true)
+ _DEFINE_SPEC(0, __is_floating_point_helper, double, true)
+ _DEFINE_SPEC(0, __is_floating_point_helper, long double, true)
+
+ /// is_floating_point
+ template<typename _Tp>
+ struct is_floating_point
+ : public integral_constant<bool, (__is_floating_point_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ /// is_array
+ template<typename>
+ struct is_array
+ : public false_type { };
+
+ template<typename _Tp, std::size_t _Size>
+ struct is_array<_Tp[_Size]>
+ : public true_type { };
+
+ template<typename _Tp>
+ struct is_array<_Tp[]>
+ : public true_type { };
+
+ template<typename>
+ struct __is_pointer_helper
+ : public false_type { };
+ _DEFINE_SPEC(1, __is_pointer_helper, _Tp*, true)
+
+ /// is_pointer
+ template<typename _Tp>
+ struct is_pointer
+ : public integral_constant<bool, (__is_pointer_helper<typename
+ remove_cv<_Tp>::type>::value)>
+ { };
+
+ /// is_reference
+ template<typename _Tp>
+ struct is_reference;
+
+ /// is_function
+ template<typename _Tp>
+ struct is_function;
+
+ template<typename>
+ struct __is_member_object_pointer_helper
+ : public false_type { };
+ _DEFINE_SPEC(2, __is_member_object_pointer_helper, _Tp _Cp::*,
+ !is_function<_Tp>::value)
+
+ /// is_member_object_pointer
+ template<typename _Tp>
+ struct is_member_object_pointer
+ : public integral_constant<bool, (__is_member_object_pointer_helper<
+ typename remove_cv<_Tp>::type>::value)>
+ { };
+
+ template<typename>
+ struct __is_member_function_pointer_helper
+ : public false_type { };
+ _DEFINE_SPEC(2, __is_member_function_pointer_helper, _Tp _Cp::*,
+ is_function<_Tp>::value)
+
+ /// is_member_function_pointer
+ template<typename _Tp>
+ struct is_member_function_pointer
+ : public integral_constant<bool, (__is_member_function_pointer_helper<
+ typename remove_cv<_Tp>::type>::value)>
+ { };
+
+ /// is_enum
+ template<typename _Tp>
+ struct is_enum
+ : public integral_constant<bool, __is_enum(_Tp)>
+ { };
+
+ /// is_union
+ template<typename _Tp>
+ struct is_union
+ : public integral_constant<bool, __is_union(_Tp)>
+ { };
+
+ /// is_class
+ template<typename _Tp>
+ struct is_class
+ : public integral_constant<bool, __is_class(_Tp)>
+ { };
+
+ /// is_function
+ template<typename>
+ struct is_function
+ : public false_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes...)>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes......)>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes...) const>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes......) const>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes...) volatile>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes......) volatile>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes...) const volatile>
+ : public true_type { };
+ template<typename _Res, typename... _ArgTypes>
+ struct is_function<_Res(_ArgTypes......) const volatile>
+ : public true_type { };
+
+ // composite type traits [4.5.2].
+
+ /// is_arithmetic
+ template<typename _Tp>
+ struct is_arithmetic
+ : public integral_constant<bool, (is_integral<_Tp>::value
+ || is_floating_point<_Tp>::value)>
+ { };
+
+ /// is_fundamental
+ template<typename _Tp>
+ struct is_fundamental
+ : public integral_constant<bool, (is_arithmetic<_Tp>::value
+ || is_void<_Tp>::value)>
+ { };
+
+ /// is_object
+ template<typename _Tp>
+ struct is_object
+ : public integral_constant<bool, !(is_function<_Tp>::value
+ || is_reference<_Tp>::value
+ || is_void<_Tp>::value)>
+ { };
+
+ /// is_member_pointer
+ template<typename _Tp>
+ struct is_member_pointer;
+
+ /// is_scalar
+ template<typename _Tp>
+ struct is_scalar
+ : public integral_constant<bool, (is_arithmetic<_Tp>::value
+ || is_enum<_Tp>::value
+ || is_pointer<_Tp>::value
+ || is_member_pointer<_Tp>::value)>
+ { };
+
+ /// is_compound
+ template<typename _Tp>
+ struct is_compound
+ : public integral_constant<bool, !is_fundamental<_Tp>::value> { };
+
+ /// is_member_pointer
+ template<typename _Tp>
+ struct __is_member_pointer_helper
+ : public false_type { };
+ _DEFINE_SPEC(2, __is_member_pointer_helper, _Tp _Cp::*, true)
+
+ template<typename _Tp>
+ struct is_member_pointer
+ : public integral_constant<bool, (__is_member_pointer_helper<
+ typename remove_cv<_Tp>::type>::value)>
+ { };
+
+ // type properties [4.5.3].
+ /// is_const
+ template<typename>
+ struct is_const
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_const<_Tp const>
+ : public true_type { };
+
+ /// is_volatile
+ template<typename>
+ struct is_volatile
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_volatile<_Tp volatile>
+ : public true_type { };
+
+ /// is_empty
+ template<typename _Tp>
+ struct is_empty
+ : public integral_constant<bool, __is_empty(_Tp)>
+ { };
+
+ /// is_polymorphic
+ template<typename _Tp>
+ struct is_polymorphic
+ : public integral_constant<bool, __is_polymorphic(_Tp)>
+ { };
+
+ /// is_abstract
+ template<typename _Tp>
+ struct is_abstract
+ : public integral_constant<bool, __is_abstract(_Tp)>
+ { };
+
+ /// has_virtual_destructor
+ template<typename _Tp>
+ struct has_virtual_destructor
+ : public integral_constant<bool, __has_virtual_destructor(_Tp)>
+ { };
+
+ /// alignment_of
+ template<typename _Tp>
+ struct alignment_of
+ : public integral_constant<std::size_t, __alignof__(_Tp)> { };
+
+ /// rank
+ template<typename>
+ struct rank
+ : public integral_constant<std::size_t, 0> { };
+
+ template<typename _Tp, std::size_t _Size>
+ struct rank<_Tp[_Size]>
+ : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
+
+ template<typename _Tp>
+ struct rank<_Tp[]>
+ : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
+
+ /// extent
+ template<typename, unsigned _Uint = 0>
+ struct extent
+ : public integral_constant<std::size_t, 0> { };
+
+ template<typename _Tp, unsigned _Uint, std::size_t _Size>
+ struct extent<_Tp[_Size], _Uint>
+ : public integral_constant<std::size_t,
+ _Uint == 0 ? _Size : extent<_Tp,
+ _Uint - 1>::value>
+ { };
+
+ template<typename _Tp, unsigned _Uint>
+ struct extent<_Tp[], _Uint>
+ : public integral_constant<std::size_t,
+ _Uint == 0 ? 0 : extent<_Tp,
+ _Uint - 1>::value>
+ { };
+
+ // relationships between types [4.6].
+
+ /// is_same
+ template<typename, typename>
+ struct is_same
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_same<_Tp, _Tp>
+ : public true_type { };
+
+ // const-volatile modifications [4.7.1].
+
+ /// remove_const
+ template<typename _Tp>
+ struct remove_const
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_const<_Tp const>
+ { typedef _Tp type; };
+
+ /// remove_volatile
+ template<typename _Tp>
+ struct remove_volatile
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_volatile<_Tp volatile>
+ { typedef _Tp type; };
+
+ /// remove_cv
+ template<typename _Tp>
+ struct remove_cv
+ {
+ typedef typename
+ remove_const<typename remove_volatile<_Tp>::type>::type type;
+ };
+
+ /// add_const
+ template<typename _Tp>
+ struct add_const
+ { typedef _Tp const type; };
+
+ /// add_volatile
+ template<typename _Tp>
+ struct add_volatile
+ { typedef _Tp volatile type; };
+
+ /// add_cv
+ template<typename _Tp>
+ struct add_cv
+ {
+ typedef typename
+ add_const<typename add_volatile<_Tp>::type>::type type;
+ };
+
+ // array modifications [4.7.3].
+
+ /// remove_extent
+ template<typename _Tp>
+ struct remove_extent
+ { typedef _Tp type; };
+
+ template<typename _Tp, std::size_t _Size>
+ struct remove_extent<_Tp[_Size]>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_extent<_Tp[]>
+ { typedef _Tp type; };
+
+ /// remove_all_extents
+ template<typename _Tp>
+ struct remove_all_extents
+ { typedef _Tp type; };
+
+ template<typename _Tp, std::size_t _Size>
+ struct remove_all_extents<_Tp[_Size]>
+ { typedef typename remove_all_extents<_Tp>::type type; };
+
+ template<typename _Tp>
+ struct remove_all_extents<_Tp[]>
+ { typedef typename remove_all_extents<_Tp>::type type; };
+
+ // pointer modifications [4.7.4].
+
+ template<typename _Tp, typename>
+ struct __remove_pointer_helper
+ { typedef _Tp type; };
+
+ template<typename _Tp, typename _Up>
+ struct __remove_pointer_helper<_Tp, _Up*>
+ { typedef _Up type; };
+
+ /// remove_pointer
+ template<typename _Tp>
+ struct remove_pointer
+ : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
+ { };
+
+ template<typename>
+ struct remove_reference;
+
+ /// add_pointer
+ template<typename _Tp>
+ struct add_pointer
+ { typedef typename remove_reference<_Tp>::type* type; };
+
+#undef _DEFINE_SPEC_0_HELPER
+#undef _DEFINE_SPEC_1_HELPER
+#undef _DEFINE_SPEC_2_HELPER
+#undef _DEFINE_SPEC
+
+ // @} group metaprogramming
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_map b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_map
new file mode 100644
index 0000000..cef6490
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_map
@@ -0,0 +1,370 @@
+// TR1 unordered_map -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/unordered_map
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // XXX When we get typedef templates these class definitions
+ // will be unnecessary.
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
+ bool __cache_hash_code = false>
+ class __unordered_map
+ : public _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, true>
+ {
+ typedef _Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, true>
+ _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ __unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
+ { }
+
+ template<typename _InputIterator>
+ __unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_map(__unordered_map&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+ };
+
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> >,
+ bool __cache_hash_code = false>
+ class __unordered_multimap
+ : public _Hashtable<_Key, std::pair<const _Key, _Tp>,
+ _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, false>
+ {
+ typedef _Hashtable<_Key, std::pair<const _Key, _Tp>,
+ _Alloc,
+ std::_Select1st<std::pair<const _Key, _Tp> >, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, false, false>
+ _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ __unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
+ { }
+
+
+ template<typename _InputIterator>
+ __unordered_multimap(_InputIterator __f, _InputIterator __l,
+ typename _Base::size_type __n = 0,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(),
+ __eql, std::_Select1st<std::pair<const _Key, _Tp> >(), __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_multimap(__unordered_multimap&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+ };
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
+ inline void
+ swap(__unordered_map<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __x,
+ __unordered_map<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
+ inline void
+ swap(__unordered_multimap<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __x,
+ __unordered_multimap<_Key, _Tp, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
+
+
+ /**
+ * @brief A standard container composed of unique keys (containing
+ * at most one of each key value) that associates values of another type
+ * with the keys.
+ *
+ * @ingroup unordered_associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, and
+ * <a href="tables.html#xx">unordered associative container</a>
+ *
+ * @param Key Type of key objects.
+ * @param Tp Type of mapped objects.
+ * @param Hash Hashing function object type, defaults to hash<Value>.
+ * @param Pred Predicate function object type, defaults to equal_to<Value>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ *
+ * The resulting value type of the container is std::pair<const Key, Tp>.
+ */
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+ class unordered_map
+ : public __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>
+ {
+ typedef __unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
+
+ public:
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ unordered_map(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_map(unordered_map&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_map(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
+ { }
+
+ unordered_map&
+ operator=(unordered_map&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_map&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+ };
+
+ /**
+ * @brief A standard container composed of equivalent keys
+ * (possibly containing multiple of each key value) that associates
+ * values of another type with the keys.
+ *
+ * @ingroup unordered_associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, and
+ * <a href="tables.html#xx">unordered associative container</a>
+ *
+ * @param Key Type of key objects.
+ * @param Tp Type of mapped objects.
+ * @param Hash Hashing function object type, defaults to hash<Value>.
+ * @param Pred Predicate function object type, defaults to equal_to<Value>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ *
+ * The resulting value type of the container is std::pair<const Key, Tp>.
+ */
+ template<class _Key, class _Tp,
+ class _Hash = hash<_Key>,
+ class _Pred = std::equal_to<_Key>,
+ class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
+ class unordered_multimap
+ : public __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>
+ {
+ typedef __unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc> _Base;
+
+ public:
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ unordered_multimap(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ { }
+
+
+ template<typename _InputIterator>
+ unordered_multimap(_InputIterator __f, _InputIterator __l,
+ typename _Base::size_type __n = 0,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_multimap(unordered_multimap&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_multimap(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
+ { }
+
+ unordered_multimap&
+ operator=(unordered_multimap&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_multimap&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+ };
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
+ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_set b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_set
new file mode 100644
index 0000000..fc2ce2b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/unordered_set
@@ -0,0 +1,360 @@
+// TR1 unordered_set -*- C++ -*-
+
+// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/unordered_set
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ // XXX When we get typedef templates these class definitions
+ // will be unnecessary.
+ template<class _Value,
+ class _Hash = hash<_Value>,
+ class _Pred = std::equal_to<_Value>,
+ class _Alloc = std::allocator<_Value>,
+ bool __cache_hash_code = false>
+ class __unordered_set
+ : public _Hashtable<_Value, _Value, _Alloc,
+ std::_Identity<_Value>, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, true, true>
+ {
+ typedef _Hashtable<_Value, _Value, _Alloc,
+ std::_Identity<_Value>, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, true, true>
+ _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ __unordered_set(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(), __eql,
+ std::_Identity<_Value>(), __a)
+ { }
+
+ template<typename _InputIterator>
+ __unordered_set(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(), __eql,
+ std::_Identity<_Value>(), __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_set(__unordered_set&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+ };
+
+ template<class _Value,
+ class _Hash = hash<_Value>,
+ class _Pred = std::equal_to<_Value>,
+ class _Alloc = std::allocator<_Value>,
+ bool __cache_hash_code = false>
+ class __unordered_multiset
+ : public _Hashtable<_Value, _Value, _Alloc,
+ std::_Identity<_Value>, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, true, false>
+ {
+ typedef _Hashtable<_Value, _Value, _Alloc,
+ std::_Identity<_Value>, _Pred,
+ _Hash, __detail::_Mod_range_hashing,
+ __detail::_Default_ranged_hash,
+ __detail::_Prime_rehash_policy,
+ __cache_hash_code, true, false>
+ _Base;
+
+ public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ __unordered_multiset(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(), __eql,
+ std::_Identity<_Value>(), __a)
+ { }
+
+
+ template<typename _InputIterator>
+ __unordered_multiset(_InputIterator __f, _InputIterator __l,
+ typename _Base::size_type __n = 0,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __detail::_Mod_range_hashing(),
+ __detail::_Default_ranged_hash(), __eql,
+ std::_Identity<_Value>(), __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ __unordered_multiset(__unordered_multiset&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+#endif
+ };
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
+ inline void
+ swap(__unordered_set<_Value, _Hash, _Pred, _Alloc, __cache_hash_code>& __x,
+ __unordered_set<_Value, _Hash, _Pred, _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc,
+ bool __cache_hash_code>
+ inline void
+ swap(__unordered_multiset<_Value, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __x,
+ __unordered_multiset<_Value, _Hash, _Pred,
+ _Alloc, __cache_hash_code>& __y)
+ { __x.swap(__y); }
+
+
+ /**
+ * @brief A standard container composed of unique keys (containing
+ * at most one of each key value) in which the elements' keys are
+ * the elements themselves.
+ *
+ * @ingroup unordered_associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, and
+ * <a href="tables.html#xx">unordered associative container</a>
+ *
+ * @param Value Type of key objects.
+ * @param Hash Hashing function object type, defaults to hash<Value>.
+ * @param Pred Predicate function object type, defaults to equal_to<Value>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ */
+ template<class _Value,
+ class _Hash = hash<_Value>,
+ class _Pred = std::equal_to<_Value>,
+ class _Alloc = std::allocator<_Value> >
+ class unordered_set
+ : public __unordered_set<_Value, _Hash, _Pred, _Alloc>
+ {
+ typedef __unordered_set<_Value, _Hash, _Pred, _Alloc> _Base;
+
+ public:
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ unordered_set(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ { }
+
+ template<typename _InputIterator>
+ unordered_set(_InputIterator __f, _InputIterator __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_set(unordered_set&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_set(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
+ { }
+
+ unordered_set&
+ operator=(unordered_set&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_set&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+ };
+
+ /**
+ * @brief A standard container composed of equivalent keys
+ * (possibly containing multiple of each key value) in which the
+ * elements' keys are the elements themselves.
+ *
+ * @ingroup unordered_associative_containers
+ *
+ * Meets the requirements of a <a href="tables.html#65">container</a>, and
+ * <a href="tables.html#xx">unordered associative container</a>
+ *
+ * @param Value Type of key objects.
+ * @param Hash Hashing function object type, defaults to hash<Value>.
+ * @param Pred Predicate function object type, defaults to equal_to<Value>.
+ * @param Alloc Allocator type, defaults to allocator<Key>.
+ */
+ template<class _Value,
+ class _Hash = hash<_Value>,
+ class _Pred = std::equal_to<_Value>,
+ class _Alloc = std::allocator<_Value> >
+ class unordered_multiset
+ : public __unordered_multiset<_Value, _Hash, _Pred, _Alloc>
+ {
+ typedef __unordered_multiset<_Value, _Hash, _Pred, _Alloc> _Base;
+
+ public:
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::hasher hasher;
+ typedef typename _Base::key_equal key_equal;
+ typedef typename _Base::allocator_type allocator_type;
+
+ explicit
+ unordered_multiset(size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__n, __hf, __eql, __a)
+ { }
+
+
+ template<typename _InputIterator>
+ unordered_multiset(_InputIterator __f, _InputIterator __l,
+ typename _Base::size_type __n = 0,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__f, __l, __n, __hf, __eql, __a)
+ { }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ unordered_multiset(unordered_multiset&& __x)
+ : _Base(std::forward<_Base>(__x)) { }
+
+ unordered_multiset(initializer_list<value_type> __l,
+ size_type __n = 10,
+ const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _Base(__l.begin(), __l.end(), __n, __hf, __eql, __a)
+ { }
+
+ unordered_multiset&
+ operator=(unordered_multiset&& __x)
+ {
+ // NB: DR 675.
+ this->clear();
+ this->swap(__x);
+ return *this;
+ }
+
+ unordered_multiset&
+ operator=(initializer_list<value_type> __l)
+ {
+ this->clear();
+ this->insert(__l.begin(), __l.end());
+ return *this;
+ }
+#endif
+ };
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
+ { __x.swap(__y); }
+
+ template<class _Value, class _Hash, class _Pred, class _Alloc>
+ inline void
+ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
+ unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y)
+ { __x.swap(__y); }
+#endif
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/utility b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/utility
new file mode 100644
index 0000000..a31c4da
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tr1_impl/utility
@@ -0,0 +1,120 @@
+// TR1 utility -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file tr1_impl/utility
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+namespace std
+{
+_GLIBCXX_BEGIN_NAMESPACE_TR1
+
+ template<class _Tp>
+ class tuple_size;
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, class _Tp>
+#else
+ template<int _Int, class _Tp>
+#endif
+ class tuple_element;
+
+ // Various functions which give std::pair a tuple-like interface.
+ template<class _Tp1, class _Tp2>
+ struct tuple_size<std::pair<_Tp1, _Tp2> >
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ { static const std::size_t value = 2; };
+#else
+ { static const int value = 2; };
+#endif
+
+ template<class _Tp1, class _Tp2>
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ const std::size_t
+#else
+ const int
+#endif
+ tuple_size<std::pair<_Tp1, _Tp2> >::value;
+
+ template<class _Tp1, class _Tp2>
+ struct tuple_element<0, std::pair<_Tp1, _Tp2> >
+ { typedef _Tp1 type; };
+
+ template<class _Tp1, class _Tp2>
+ struct tuple_element<1, std::pair<_Tp1, _Tp2> >
+ { typedef _Tp2 type; };
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int>
+#else
+ template<int _Int>
+#endif
+ struct __pair_get;
+
+ template<>
+ struct __pair_get<0>
+ {
+ template<typename _Tp1, typename _Tp2>
+ static _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair)
+ { return __pair.first; }
+
+ template<typename _Tp1, typename _Tp2>
+ static const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair)
+ { return __pair.first; }
+ };
+
+ template<>
+ struct __pair_get<1>
+ {
+ template<typename _Tp1, typename _Tp2>
+ static _Tp2& __get(std::pair<_Tp1, _Tp2>& __pair)
+ { return __pair.second; }
+
+ template<typename _Tp1, typename _Tp2>
+ static const _Tp2& __const_get(const std::pair<_Tp1, _Tp2>& __pair)
+ { return __pair.second; }
+ };
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, class _Tp1, class _Tp2>
+#else
+ template<int _Int, class _Tp1, class _Tp2>
+#endif
+ inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
+ get(std::pair<_Tp1, _Tp2>& __in)
+ { return __pair_get<_Int>::__get(__in); }
+
+#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
+ template<std::size_t _Int, class _Tp1, class _Tp2>
+#else
+ template<int _Int, class _Tp1, class _Tp2>
+#endif
+ inline const typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
+ get(const std::pair<_Tp1, _Tp2>& __in)
+ { return __pair_get<_Int>::__const_get(__in); }
+
+_GLIBCXX_END_NAMESPACE_TR1
+}
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/tuple b/6/sources/cxx-stl/gnu-libstdc++/include/tuple
new file mode 100644
index 0000000..c5dbe6b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/tuple
@@ -0,0 +1,697 @@
+// <tuple> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/tuple
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TUPLE
+#define _GLIBCXX_TUPLE 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#include <utility>
+
+namespace std
+{
+ // Adds a const reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_c_ref
+ { typedef const _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_c_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ // Adds a reference to a non-reference type.
+ template<typename _Tp>
+ struct __add_ref
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_ref<_Tp&>
+ { typedef _Tp& type; };
+
+ template<std::size_t _Idx, typename _Head, bool _IsEmpty>
+ struct _Head_base;
+
+ template<std::size_t _Idx, typename _Head>
+ struct _Head_base<_Idx, _Head, true>
+ : public _Head
+ {
+ _Head_base()
+ : _Head() { }
+
+ _Head_base(const _Head& __h)
+ : _Head(__h) { }
+
+ template<typename _UHead>
+ _Head_base(_UHead&& __h)
+ : _Head(std::forward<_UHead>(__h)) { }
+
+ _Head& _M_head() { return *this; }
+ const _Head& _M_head() const { return *this; }
+
+ void _M_swap_impl(_Head&&) { /* no-op */ }
+ };
+
+ template<std::size_t _Idx, typename _Head>
+ struct _Head_base<_Idx, _Head, false>
+ {
+ _Head_base()
+ : _M_head_impl() { }
+
+ _Head_base(const _Head& __h)
+ : _M_head_impl(__h) { }
+
+ template<typename _UHead>
+ _Head_base(_UHead&& __h)
+ : _M_head_impl(std::forward<_UHead>(__h)) { }
+
+ _Head& _M_head() { return _M_head_impl; }
+ const _Head& _M_head() const { return _M_head_impl; }
+
+ void
+ _M_swap_impl(_Head&& __h)
+ {
+ using std::swap;
+ swap(__h, _M_head_impl);
+ }
+
+ _Head _M_head_impl;
+ };
+
+ /**
+ * Contains the actual implementation of the @c tuple template, stored
+ * as a recursive inheritance hierarchy from the first element (most
+ * derived class) to the last (least derived class). The @c Idx
+ * parameter gives the 0-based index of the element stored at this
+ * point in the hierarchy; we use it to implement a constant-time
+ * get() operation.
+ */
+ template<std::size_t _Idx, typename... _Elements>
+ struct _Tuple_impl;
+
+ /**
+ * Zero-element tuple implementation. This is the basis case for the
+ * inheritance recursion.
+ */
+ template<std::size_t _Idx>
+ struct _Tuple_impl<_Idx>
+ {
+ protected:
+ void _M_swap_impl(_Tuple_impl&&) { /* no-op */ }
+ };
+
+ /**
+ * Recursive tuple implementation. Here we store the @c Head element
+ * and derive from a @c Tuple_impl containing the remaining elements
+ * (which contains the @c Tail).
+ */
+ template<std::size_t _Idx, typename _Head, typename... _Tail>
+ struct _Tuple_impl<_Idx, _Head, _Tail...>
+ : public _Tuple_impl<_Idx + 1, _Tail...>,
+ private _Head_base<_Idx, _Head, std::is_empty<_Head>::value>
+ {
+ typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited;
+ typedef _Head_base<_Idx, _Head, std::is_empty<_Head>::value> _Base;
+
+ _Head& _M_head() { return _Base::_M_head(); }
+ const _Head& _M_head() const { return _Base::_M_head(); }
+
+ _Inherited& _M_tail() { return *this; }
+ const _Inherited& _M_tail() const { return *this; }
+
+ _Tuple_impl()
+ : _Inherited(), _Base() { }
+
+ explicit
+ _Tuple_impl(const _Head& __head, const _Tail&... __tail)
+ : _Inherited(__tail...), _Base(__head) { }
+
+ template<typename _UHead, typename... _UTail>
+ explicit
+ _Tuple_impl(_UHead&& __head, _UTail&&... __tail)
+ : _Inherited(std::forward<_UTail>(__tail)...),
+ _Base(std::forward<_UHead>(__head)) { }
+
+ _Tuple_impl(const _Tuple_impl& __in)
+ : _Inherited(__in._M_tail()), _Base(__in._M_head()) { }
+
+ _Tuple_impl(_Tuple_impl&& __in)
+ : _Inherited(std::move<_Inherited&&>(__in._M_tail())),
+ _Base(std::forward<_Head>(__in._M_head())) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in)
+ : _Inherited(__in._M_tail()), _Base(__in._M_head()) { }
+
+ template<typename... _UElements>
+ _Tuple_impl(_Tuple_impl<_Idx, _UElements...>&& __in)
+ : _Inherited(std::move<typename _Tuple_impl<_Idx, _UElements...>::
+ _Inherited&&>(__in._M_tail())),
+ _Base(std::forward<typename _Tuple_impl<_Idx, _UElements...>::
+ _Base>(__in._M_head())) { }
+
+ _Tuple_impl&
+ operator=(const _Tuple_impl& __in)
+ {
+ _M_head() = __in._M_head();
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ _Tuple_impl&
+ operator=(_Tuple_impl&& __in)
+ {
+ _M_head() = std::move(__in._M_head());
+ _M_tail() = std::move(__in._M_tail());
+ return *this;
+ }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(const _Tuple_impl<_Idx, _UElements...>& __in)
+ {
+ _M_head() = __in._M_head();
+ _M_tail() = __in._M_tail();
+ return *this;
+ }
+
+ template<typename... _UElements>
+ _Tuple_impl&
+ operator=(_Tuple_impl<_Idx, _UElements...>&& __in)
+ {
+ _M_head() = std::move(__in._M_head());
+ _M_tail() = std::move(__in._M_tail());
+ return *this;
+ }
+
+ protected:
+ void
+ _M_swap_impl(_Tuple_impl&& __in)
+ {
+ _Base::_M_swap_impl(__in._M_head());
+ _Inherited::_M_swap_impl(__in._M_tail());
+ }
+ };
+
+ /// tuple
+ template<typename... _Elements>
+ class tuple : public _Tuple_impl<0, _Elements...>
+ {
+ typedef _Tuple_impl<0, _Elements...> _Inherited;
+
+ public:
+ tuple()
+ : _Inherited() { }
+
+ explicit
+ tuple(const _Elements&... __elements)
+ : _Inherited(__elements...) { }
+
+ template<typename... _UElements>
+ explicit
+ tuple(_UElements&&... __elements)
+ : _Inherited(std::forward<_UElements>(__elements)...) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(static_cast<const _Inherited&>(__in)) { }
+
+ tuple(tuple&& __in)
+ : _Inherited(std::move<_Inherited>(__in)) { }
+
+ template<typename... _UElements>
+ tuple(const tuple<_UElements...>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
+ { }
+
+ template<typename... _UElements>
+ tuple(tuple<_UElements...>&& __in)
+ : _Inherited(std::move<_Tuple_impl<0, _UElements...> >(__in)) { }
+
+ // XXX http://gcc.gnu.org/ml/libstdc++/2008-02/msg00047.html
+ template<typename... _UElements>
+ tuple(tuple<_UElements...>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _UElements...>&>(__in))
+ { }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(tuple&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(const tuple<_UElements...>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename... _UElements>
+ tuple&
+ operator=(tuple<_UElements...>&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ void
+ swap(tuple&& __in)
+ { _Inherited::_M_swap_impl(__in); }
+ };
+
+
+ template<>
+ class tuple<>
+ {
+ public:
+ void swap(tuple&&) { /* no-op */ }
+ };
+
+ /// tuple (2-element), with construction and assignment from a pair.
+ template<typename _T1, typename _T2>
+ class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2>
+ {
+ typedef _Tuple_impl<0, _T1, _T2> _Inherited;
+
+ public:
+ tuple()
+ : _Inherited() { }
+
+ explicit
+ tuple(const _T1& __a1, const _T2& __a2)
+ : _Inherited(__a1, __a2) { }
+
+ template<typename _U1, typename _U2>
+ explicit
+ tuple(_U1&& __a1, _U2&& __a2)
+ : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
+
+ tuple(const tuple& __in)
+ : _Inherited(static_cast<const _Inherited&>(__in)) { }
+
+ tuple(tuple&& __in)
+ : _Inherited(std::move<_Inherited>(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const tuple<_U1, _U2>& __in)
+ : _Inherited(static_cast<const _Tuple_impl<0, _U1, _U2>&>(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(tuple<_U1, _U2>&& __in)
+ : _Inherited(std::move<_Tuple_impl<0, _U1, _U2> >(__in)) { }
+
+ template<typename _U1, typename _U2>
+ tuple(const pair<_U1, _U2>& __in)
+ : _Inherited(__in.first, __in.second) { }
+
+ template<typename _U1, typename _U2>
+ tuple(pair<_U1, _U2>&& __in)
+ : _Inherited(std::move(__in.first), std::move(__in.second)) { }
+
+ tuple&
+ operator=(const tuple& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ tuple&
+ operator=(tuple&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const tuple<_U1, _U2>& __in)
+ {
+ static_cast<_Inherited&>(*this) = __in;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(tuple<_U1, _U2>&& __in)
+ {
+ static_cast<_Inherited&>(*this) = std::move(__in);
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const pair<_U1, _U2>& __in)
+ {
+ this->_M_head() = __in.first;
+ this->_M_tail()._M_head() = __in.second;
+ return *this;
+ }
+
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(pair<_U1, _U2>&& __in)
+ {
+ this->_M_head() = std::move(__in.first);
+ this->_M_tail()._M_head() = std::move(__in.second);
+ return *this;
+ }
+
+ void
+ swap(tuple&& __in)
+ {
+ using std::swap;
+ swap(this->_M_head(), __in._M_head());
+ swap(this->_M_tail()._M_head(), __in._M_tail()._M_head());
+ }
+ };
+
+
+ /// Gives the type of the ith element of a given tuple type.
+ template<std::size_t __i, typename _Tp>
+ struct tuple_element;
+
+ /**
+ * Recursive case for tuple_element: strip off the first element in
+ * the tuple and retrieve the (i-1)th element of the remaining tuple.
+ */
+ template<std::size_t __i, typename _Head, typename... _Tail>
+ struct tuple_element<__i, tuple<_Head, _Tail...> >
+ : tuple_element<__i - 1, tuple<_Tail...> > { };
+
+ /**
+ * Basis case for tuple_element: The first element is the one we're seeking.
+ */
+ template<typename _Head, typename... _Tail>
+ struct tuple_element<0, tuple<_Head, _Tail...> >
+ {
+ typedef _Head type;
+ };
+
+ /// Finds the size of a given tuple type.
+ template<typename _Tp>
+ struct tuple_size;
+
+ /// class tuple_size
+ template<typename... _Elements>
+ struct tuple_size<tuple<_Elements...> >
+ {
+ static const std::size_t value = sizeof...(_Elements);
+ };
+
+ template<typename... _Elements>
+ const std::size_t tuple_size<tuple<_Elements...> >::value;
+
+ template<std::size_t __i, typename _Head, typename... _Tail>
+ inline typename __add_ref<_Head>::type
+ __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t)
+ { return __t._M_head(); }
+
+ template<std::size_t __i, typename _Head, typename... _Tail>
+ inline typename __add_c_ref<_Head>::type
+ __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t)
+ { return __t._M_head(); }
+
+ // Return a reference (const reference) to the ith element of a tuple.
+ // Any const or non-const ref elements are returned with their original type.
+ template<std::size_t __i, typename... _Elements>
+ inline typename __add_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(tuple<_Elements...>& __t)
+ { return __get_helper<__i>(__t); }
+
+ template<std::size_t __i, typename... _Elements>
+ inline typename __add_c_ref<
+ typename tuple_element<__i, tuple<_Elements...> >::type
+ >::type
+ get(const tuple<_Elements...>& __t)
+ { return __get_helper<__i>(__t); }
+
+ // This class helps construct the various comparison operations on tuples
+ template<std::size_t __check_equal_size, std::size_t __i, std::size_t __j,
+ typename _Tp, typename _Up>
+ struct __tuple_compare;
+
+ template<std::size_t __i, std::size_t __j, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __j, _Tp, _Up>
+ {
+ static bool __eq(const _Tp& __t, const _Up& __u)
+ {
+ return (get<__i>(__t) == get<__i>(__u) &&
+ __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ static bool __less(const _Tp& __t, const _Up& __u)
+ {
+ return ((get<__i>(__t) < get<__i>(__u))
+ || !(get<__i>(__u) < get<__i>(__t)) &&
+ __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__less(__t, __u));
+ }
+ };
+
+ template<std::size_t __i, typename _Tp, typename _Up>
+ struct __tuple_compare<0, __i, __i, _Tp, _Up>
+ {
+ static bool __eq(const _Tp&, const _Up&)
+ { return true; }
+
+ static bool __less(const _Tp&, const _Up&)
+ { return false; }
+ };
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator==(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ bool
+ operator<(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ {
+ typedef tuple<_TElements...> _Tp;
+ typedef tuple<_UElements...> _Up;
+ return (__tuple_compare<tuple_size<_Tp>::value - tuple_size<_Up>::value,
+ 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u));
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator!=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t == __u); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return __u < __t; }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator<=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__u < __t); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline bool
+ operator>=(const tuple<_TElements...>& __t,
+ const tuple<_UElements...>& __u)
+ { return !(__t < __u); }
+
+ // NB: DR 705.
+ template<typename... _Elements>
+ inline tuple<typename __decay_and_strip<_Elements>::__type...>
+ make_tuple(_Elements&&... __args)
+ {
+ typedef tuple<typename __decay_and_strip<_Elements>::__type...>
+ __result_type;
+ return __result_type(std::forward<_Elements>(__args)...);
+ }
+
+ template<std::size_t...> struct __index_holder { };
+
+ template<std::size_t __i, typename _IdxHolder, typename... _Elements>
+ struct __index_holder_impl;
+
+ template<std::size_t __i, std::size_t... _Indexes, typename _IdxHolder,
+ typename... _Elements>
+ struct __index_holder_impl<__i, __index_holder<_Indexes...>,
+ _IdxHolder, _Elements...>
+ {
+ typedef typename __index_holder_impl<__i + 1,
+ __index_holder<_Indexes..., __i>,
+ _Elements...>::type type;
+ };
+
+ template<std::size_t __i, std::size_t... _Indexes>
+ struct __index_holder_impl<__i, __index_holder<_Indexes...> >
+ { typedef __index_holder<_Indexes...> type; };
+
+ template<typename... _Elements>
+ struct __make_index_holder
+ : __index_holder_impl<0, __index_holder<>, _Elements...> { };
+
+ template<typename... _TElements, std::size_t... _TIdx,
+ typename... _UElements, std::size_t... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(const tuple<_TElements...>& __t,
+ const __index_holder<_TIdx...>&,
+ const tuple<_UElements...>& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>(get<_TIdx>(__t)...,
+ get<_UIdx>(__u)...); }
+
+ template<typename... _TElements, std::size_t... _TIdx,
+ typename... _UElements, std::size_t... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(tuple<_TElements...>&& __t,
+ const __index_holder<_TIdx...>&,
+ const tuple<_UElements...>& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (std::move(get<_TIdx>(__t))..., get<_UIdx>(__u)...); }
+
+ template<typename... _TElements, std::size_t... _TIdx,
+ typename... _UElements, std::size_t... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(const tuple<_TElements...>& __t,
+ const __index_holder<_TIdx...>&,
+ tuple<_UElements...>&& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (get<_TIdx>(__t)..., std::move(get<_UIdx>(__u))...); }
+
+ template<typename... _TElements, std::size_t... _TIdx,
+ typename... _UElements, std::size_t... _UIdx>
+ inline tuple<_TElements..., _UElements...>
+ __tuple_cat_helper(tuple<_TElements...>&& __t,
+ const __index_holder<_TIdx...>&,
+ tuple<_UElements...>&& __u,
+ const __index_holder<_UIdx...>&)
+ { return tuple<_TElements..., _UElements...>
+ (std::move(get<_TIdx>(__t))..., std::move(get<_UIdx>(__u))...); }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u)
+ {
+ return __tuple_cat_helper(__t, typename
+ __make_index_holder<_TElements...>::type(),
+ __u, typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(tuple<_TElements...>&& __t, const tuple<_UElements...>& __u)
+ {
+ return __tuple_cat_helper(std::move(__t), typename
+ __make_index_holder<_TElements...>::type(),
+ __u, typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(const tuple<_TElements...>& __t, tuple<_UElements...>&& __u)
+ {
+ return __tuple_cat_helper(__t, typename
+ __make_index_holder<_TElements...>::type(),
+ std::move(__u), typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _TElements, typename... _UElements>
+ inline tuple<_TElements..., _UElements...>
+ tuple_cat(tuple<_TElements...>&& __t, tuple<_UElements...>&& __u)
+ {
+ return __tuple_cat_helper(std::move(__t), typename
+ __make_index_holder<_TElements...>::type(),
+ std::move(__u), typename
+ __make_index_holder<_UElements...>::type());
+ }
+
+ template<typename... _Elements>
+ inline tuple<_Elements&...>
+ tie(_Elements&... __args)
+ { return tuple<_Elements&...>(__args...); }
+
+ template<typename... _Elements>
+ inline void
+ swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
+ { __x.swap(__y); }
+
+ template<typename... _Elements>
+ inline void
+ swap(tuple<_Elements...>&& __x, tuple<_Elements...>& __y)
+ { __x.swap(__y); }
+
+ template<typename... _Elements>
+ inline void
+ swap(tuple<_Elements...>& __x, tuple<_Elements...>&& __y)
+ { __x.swap(__y); }
+
+ // A class (and instance) which can be used in 'tie' when an element
+ // of a tuple is not required
+ struct _Swallow_assign
+ {
+ template<class _Tp>
+ _Swallow_assign&
+ operator=(const _Tp&)
+ { return *this; }
+ };
+
+ // TODO: Put this in some kind of shared file.
+ namespace
+ {
+ _Swallow_assign ignore;
+ }; // anonymous namespace
+}
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_TUPLE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/type_traits b/6/sources/cxx-stl/gnu-libstdc++/include/type_traits
new file mode 100644
index 0000000..ce9ee1b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/type_traits
@@ -0,0 +1,605 @@
+// C++0x type_traits -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/type_traits
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_TYPE_TRAITS
+#define _GLIBCXX_TYPE_TRAITS 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <cstddef>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/type_traits>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/type_traits>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+namespace std
+{
+ /** @addtogroup metaprogramming
+ * @{
+ */
+
+ // Primary classification traits.
+
+ /// is_lvalue_reference
+ template<typename>
+ struct is_lvalue_reference
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_lvalue_reference<_Tp&>
+ : public true_type { };
+
+ /// is_rvalue_reference
+ template<typename>
+ struct is_rvalue_reference
+ : public false_type { };
+
+ template<typename _Tp>
+ struct is_rvalue_reference<_Tp&&>
+ : public true_type { };
+
+ // Secondary classification traits.
+
+ /// is_reference
+ template<typename _Tp>
+ struct is_reference
+ : public integral_constant<bool, (is_lvalue_reference<_Tp>::value
+ || is_rvalue_reference<_Tp>::value)>
+ { };
+
+ // Reference transformations.
+
+ /// remove_reference
+ template<typename _Tp>
+ struct remove_reference
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_reference<_Tp&>
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct remove_reference<_Tp&&>
+ { typedef _Tp type; };
+
+ template<typename _Tp,
+ bool = !is_reference<_Tp>::value && !is_void<_Tp>::value,
+ bool = is_rvalue_reference<_Tp>::value>
+ struct __add_lvalue_reference_helper
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct __add_lvalue_reference_helper<_Tp, true, false>
+ { typedef _Tp& type; };
+
+ template<typename _Tp>
+ struct __add_lvalue_reference_helper<_Tp, false, true>
+ { typedef typename remove_reference<_Tp>::type& type; };
+
+ /// add_lvalue_reference
+ template<typename _Tp>
+ struct add_lvalue_reference
+ : public __add_lvalue_reference_helper<_Tp>
+ { };
+
+ template<typename _Tp,
+ bool = !is_reference<_Tp>::value && !is_void<_Tp>::value>
+ struct __add_rvalue_reference_helper
+ { typedef _Tp type; };
+
+ template<typename _Tp>
+ struct __add_rvalue_reference_helper<_Tp, true>
+ { typedef _Tp&& type; };
+
+ /// add_rvalue_reference
+ template<typename _Tp>
+ struct add_rvalue_reference
+ : public __add_rvalue_reference_helper<_Tp>
+ { };
+
+ // Scalar properties and transformations.
+
+ template<typename _Tp,
+ bool = is_integral<_Tp>::value,
+ bool = is_floating_point<_Tp>::value>
+ struct __is_signed_helper
+ : public false_type { };
+
+ template<typename _Tp>
+ struct __is_signed_helper<_Tp, false, true>
+ : public true_type { };
+
+ template<typename _Tp>
+ struct __is_signed_helper<_Tp, true, false>
+ : public integral_constant<bool, _Tp(-1) < _Tp(0)>
+ { };
+
+ /// is_signed
+ template<typename _Tp>
+ struct is_signed
+ : public integral_constant<bool, __is_signed_helper<_Tp>::value>
+ { };
+
+ /// is_unsigned
+ template<typename _Tp>
+ struct is_unsigned
+ : public integral_constant<bool, (is_arithmetic<_Tp>::value
+ && !is_signed<_Tp>::value)>
+ { };
+
+ // Member introspection.
+
+ /// is_pod
+ template<typename _Tp>
+ struct is_pod
+ : public integral_constant<bool, __is_pod(_Tp)>
+ { };
+
+ /// has_trivial_default_constructor
+ template<typename _Tp>
+ struct has_trivial_default_constructor
+ : public integral_constant<bool, __has_trivial_constructor(_Tp)>
+ { };
+
+ /// has_trivial_copy_constructor
+ template<typename _Tp>
+ struct has_trivial_copy_constructor
+ : public integral_constant<bool, __has_trivial_copy(_Tp)>
+ { };
+
+ /// has_trivial_assign
+ template<typename _Tp>
+ struct has_trivial_assign
+ : public integral_constant<bool, __has_trivial_assign(_Tp)>
+ { };
+
+ /// has_trivial_destructor
+ template<typename _Tp>
+ struct has_trivial_destructor
+ : public integral_constant<bool, __has_trivial_destructor(_Tp)>
+ { };
+
+ /// has_nothrow_default_constructor
+ template<typename _Tp>
+ struct has_nothrow_default_constructor
+ : public integral_constant<bool, __has_nothrow_constructor(_Tp)>
+ { };
+
+ /// has_nothrow_copy_constructor
+ template<typename _Tp>
+ struct has_nothrow_copy_constructor
+ : public integral_constant<bool, __has_nothrow_copy(_Tp)>
+ { };
+
+ /// has_nothrow_assign
+ template<typename _Tp>
+ struct has_nothrow_assign
+ : public integral_constant<bool, __has_nothrow_assign(_Tp)>
+ { };
+
+ /// is_base_of
+ template<typename _Base, typename _Derived>
+ struct is_base_of
+ : public integral_constant<bool, __is_base_of(_Base, _Derived)>
+ { };
+
+ // Relationships between types.
+ template<typename _From, typename _To>
+ struct __is_convertible_simple
+ : public __sfinae_types
+ {
+ private:
+ static __one __test(_To);
+ static __two __test(...);
+ static _From __makeFrom();
+
+ public:
+ static const bool __value = sizeof(__test(__makeFrom())) == 1;
+ };
+
+ template<typename _Tp>
+ struct __is_int_or_cref
+ {
+ typedef typename remove_reference<_Tp>::type __rr_Tp;
+ static const bool __value = (is_integral<_Tp>::value
+ || (is_integral<__rr_Tp>::value
+ && is_const<__rr_Tp>::value
+ && !is_volatile<__rr_Tp>::value));
+ };
+
+ template<typename _From, typename _To,
+ bool = (is_void<_From>::value || is_void<_To>::value
+ || is_function<_To>::value || is_array<_To>::value
+ // This special case is here only to avoid warnings.
+ || (is_floating_point<typename
+ remove_reference<_From>::type>::value
+ && __is_int_or_cref<_To>::__value))>
+ struct __is_convertible_helper
+ {
+ // "An imaginary lvalue of type From...".
+ static const bool __value = (__is_convertible_simple<typename
+ add_lvalue_reference<_From>::type,
+ _To>::__value);
+ };
+
+ template<typename _From, typename _To>
+ struct __is_convertible_helper<_From, _To, true>
+ { static const bool __value = (is_void<_To>::value
+ || (__is_int_or_cref<_To>::__value
+ && !is_void<_From>::value)); };
+
+ // XXX FIXME
+ // The C++0x specifications are different, see N2255.
+ /// is_convertible
+ template<typename _From, typename _To>
+ struct is_convertible
+ : public integral_constant<bool,
+ __is_convertible_helper<_From, _To>::__value>
+ { };
+
+ template<std::size_t _Len>
+ struct __aligned_storage_msa
+ {
+ union __type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__)) { } __align;
+ };
+ };
+
+ /**
+ * @brief Alignment type.
+ *
+ * The value of _Align is a default-alignment which shall be the
+ * most stringent alignment requirement for any C++ object type
+ * whose size is no greater than _Len (3.9). The member typedef
+ * type shall be a POD type suitable for use as uninitialized
+ * storage for any object whose size is at most _Len and whose
+ * alignment is a divisor of _Align.
+ */
+ template<std::size_t _Len, std::size_t _Align =
+ __alignof__(typename __aligned_storage_msa<_Len>::__type)>
+ struct aligned_storage
+ {
+ union type
+ {
+ unsigned char __data[_Len];
+ struct __attribute__((__aligned__((_Align)))) { } __align;
+ };
+ };
+
+
+ // Define a nested type if some predicate holds.
+ // Primary template.
+ /// enable_if
+ template<bool, typename _Tp = void>
+ struct enable_if
+ { };
+
+ // Partial specialization for true.
+ template<typename _Tp>
+ struct enable_if<true, _Tp>
+ { typedef _Tp type; };
+
+
+ // A conditional expression, but for types. If true, first, if false, second.
+ // Primary template.
+ /// conditional
+ template<bool _Cond, typename _Iftrue, typename _Iffalse>
+ struct conditional
+ { typedef _Iftrue type; };
+
+ // Partial specialization for false.
+ template<typename _Iftrue, typename _Iffalse>
+ struct conditional<false, _Iftrue, _Iffalse>
+ { typedef _Iffalse type; };
+
+
+ // Decay trait for arrays and functions, used for perfect forwarding
+ // in make_pair, make_tuple, etc.
+ template<typename _Up,
+ bool _IsArray = is_array<_Up>::value,
+ bool _IsFunction = is_function<_Up>::value>
+ struct __decay_selector;
+
+ // NB: DR 705.
+ template<typename _Up>
+ struct __decay_selector<_Up, false, false>
+ { typedef typename remove_cv<_Up>::type __type; };
+
+ template<typename _Up>
+ struct __decay_selector<_Up, true, false>
+ { typedef typename remove_extent<_Up>::type* __type; };
+
+ template<typename _Up>
+ struct __decay_selector<_Up, false, true>
+ { typedef typename add_pointer<_Up>::type __type; };
+
+ /// decay
+ template<typename _Tp>
+ struct decay
+ {
+ private:
+ typedef typename remove_reference<_Tp>::type __remove_type;
+
+ public:
+ typedef typename __decay_selector<__remove_type>::__type type;
+ };
+
+
+ // Utility for constructing identically cv-qualified types.
+ template<typename _Unqualified, bool _IsConst, bool _IsVol>
+ struct __cv_selector;
+
+ template<typename _Unqualified>
+ struct __cv_selector<_Unqualified, false, false>
+ { typedef _Unqualified __type; };
+
+ template<typename _Unqualified>
+ struct __cv_selector<_Unqualified, false, true>
+ { typedef volatile _Unqualified __type; };
+
+ template<typename _Unqualified>
+ struct __cv_selector<_Unqualified, true, false>
+ { typedef const _Unqualified __type; };
+
+ template<typename _Unqualified>
+ struct __cv_selector<_Unqualified, true, true>
+ { typedef const volatile _Unqualified __type; };
+
+ template<typename _Qualified, typename _Unqualified,
+ bool _IsConst = is_const<_Qualified>::value,
+ bool _IsVol = is_volatile<_Qualified>::value>
+ struct __match_cv_qualifiers
+ {
+ private:
+ typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
+
+ public:
+ typedef typename __match::__type __type;
+ };
+
+
+ // Utility for finding the unsigned versions of signed integral types.
+ template<typename _Tp>
+ struct __make_unsigned
+ { typedef _Tp __type; };
+
+ template<>
+ struct __make_unsigned<char>
+ { typedef unsigned char __type; };
+
+ template<>
+ struct __make_unsigned<signed char>
+ { typedef unsigned char __type; };
+
+ template<>
+ struct __make_unsigned<short>
+ { typedef unsigned short __type; };
+
+ template<>
+ struct __make_unsigned<int>
+ { typedef unsigned int __type; };
+
+ template<>
+ struct __make_unsigned<long>
+ { typedef unsigned long __type; };
+
+ template<>
+ struct __make_unsigned<long long>
+ { typedef unsigned long long __type; };
+
+
+ // Select between integral and enum: not possible to be both.
+ template<typename _Tp,
+ bool _IsInt = is_integral<_Tp>::value,
+ bool _IsEnum = is_enum<_Tp>::value>
+ struct __make_unsigned_selector;
+
+ template<typename _Tp>
+ struct __make_unsigned_selector<_Tp, true, false>
+ {
+ private:
+ typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
+ typedef typename __unsignedt::__type __unsigned_type;
+ typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
+
+ public:
+ typedef typename __cv_unsigned::__type __type;
+ };
+
+ template<typename _Tp>
+ struct __make_unsigned_selector<_Tp, false, true>
+ {
+ private:
+ // With -fshort-enums, an enum may be as small as a char.
+ typedef unsigned char __smallest;
+ static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
+ static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short);
+ static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int);
+ typedef conditional<__b2, unsigned int, unsigned long> __cond2;
+ typedef typename __cond2::type __cond2_type;
+ typedef conditional<__b1, unsigned short, __cond2_type> __cond1;
+ typedef typename __cond1::type __cond1_type;
+
+ public:
+ typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
+ };
+
+ // Given an integral/enum type, return the corresponding unsigned
+ // integer type.
+ // Primary template.
+ /// make_unsigned
+ template<typename _Tp>
+ struct make_unsigned
+ { typedef typename __make_unsigned_selector<_Tp>::__type type; };
+
+ // Integral, but don't define.
+ template<>
+ struct make_unsigned<bool>;
+
+
+ // Utility for finding the signed versions of unsigned integral types.
+ template<typename _Tp>
+ struct __make_signed
+ { typedef _Tp __type; };
+
+ template<>
+ struct __make_signed<char>
+ { typedef signed char __type; };
+
+ template<>
+ struct __make_signed<unsigned char>
+ { typedef signed char __type; };
+
+ template<>
+ struct __make_signed<unsigned short>
+ { typedef signed short __type; };
+
+ template<>
+ struct __make_signed<unsigned int>
+ { typedef signed int __type; };
+
+ template<>
+ struct __make_signed<unsigned long>
+ { typedef signed long __type; };
+
+ template<>
+ struct __make_signed<unsigned long long>
+ { typedef signed long long __type; };
+
+
+ // Select between integral and enum: not possible to be both.
+ template<typename _Tp,
+ bool _IsInt = is_integral<_Tp>::value,
+ bool _IsEnum = is_enum<_Tp>::value>
+ struct __make_signed_selector;
+
+ template<typename _Tp>
+ struct __make_signed_selector<_Tp, true, false>
+ {
+ private:
+ typedef __make_signed<typename remove_cv<_Tp>::type> __signedt;
+ typedef typename __signedt::__type __signed_type;
+ typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed;
+
+ public:
+ typedef typename __cv_signed::__type __type;
+ };
+
+ template<typename _Tp>
+ struct __make_signed_selector<_Tp, false, true>
+ {
+ private:
+ // With -fshort-enums, an enum may be as small as a char.
+ typedef signed char __smallest;
+ static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest);
+ static const bool __b1 = sizeof(_Tp) <= sizeof(signed short);
+ static const bool __b2 = sizeof(_Tp) <= sizeof(signed int);
+ typedef conditional<__b2, signed int, signed long> __cond2;
+ typedef typename __cond2::type __cond2_type;
+ typedef conditional<__b1, signed short, __cond2_type> __cond1;
+ typedef typename __cond1::type __cond1_type;
+
+ public:
+ typedef typename conditional<__b0, __smallest, __cond1_type>::type __type;
+ };
+
+ // Given an integral/enum type, return the corresponding signed
+ // integer type.
+ // Primary template.
+ /// make_signed
+ template<typename _Tp>
+ struct make_signed
+ { typedef typename __make_signed_selector<_Tp>::__type type; };
+
+ // Integral, but don't define.
+ template<>
+ struct make_signed<bool>;
+
+ /// common_type
+ template<typename... _Tp>
+ struct common_type;
+
+ template<typename _Tp>
+ struct common_type<_Tp>
+ {
+ static_assert(sizeof(_Tp) > 0, "must be complete type");
+ typedef _Tp type;
+ };
+
+ template<typename _Tp, typename _Up>
+ class common_type<_Tp, _Up>
+ {
+ static_assert(sizeof(_Tp) > 0, "must be complete type");
+ static_assert(sizeof(_Up) > 0, "must be complete type");
+
+ static _Tp&& __t();
+ static _Up&& __u();
+
+ // HACK: Prevents optimization of ?: in the decltype
+ // expression when the condition is the literal, "true".
+ // See, PR36628.
+ static bool __true_or_false();
+
+ public:
+ typedef decltype(__true_or_false() ? __t() : __u()) type;
+ };
+
+ template<typename _Tp, typename _Up, typename... _Vp>
+ struct common_type<_Tp, _Up, _Vp...>
+ {
+ typedef typename
+ common_type<typename common_type<_Tp, _Up>::type, _Vp...>::type type;
+ };
+
+ // @} group metaprogramming
+}
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_TYPE_TRAITS
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/typeinfo b/6/sources/cxx-stl/gnu-libstdc++/include/typeinfo
new file mode 100644
index 0000000..eea38e7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/typeinfo
@@ -0,0 +1,196 @@
+// RTTI support for -*- C++ -*-
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+// 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation
+//
+// 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 3, 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.
+//
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file typeinfo
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _TYPEINFO
+#define _TYPEINFO
+
+#include <exception>
+
+#pragma GCC visibility push(default)
+
+extern "C++" {
+
+namespace __cxxabiv1
+{
+ class __class_type_info;
+} // namespace __cxxabiv1
+
+// Determine whether typeinfo names for the same type are merged (in which
+// case comparison can just compare pointers) or not (in which case
+// strings must be compared and g++.dg/abi/local1.C will fail), and
+// whether comparison is to be implemented inline or not. By default we
+// use inline pointer comparison if weak symbols are available, and
+// out-of-line strcmp if not. Out-of-line pointer comparison is used
+// where the object files are to be portable to multiple systems, some of
+// which may not be able to use pointer comparison, but the particular
+// system for which libstdc++ is being built can use pointer comparison;
+// in particular for most ARM EABI systems, where the ABI specifies
+// out-of-line comparison. Inline strcmp is not currently supported. The
+// compiler's target configuration can override the defaults by defining
+// __GXX_TYPEINFO_EQUALITY_INLINE to 1 or 0 to indicate whether or not
+// comparison is inline, and __GXX_MERGED_TYPEINFO_NAMES to 1 or 0 to
+// indicate whether or not pointer comparison can be used.
+
+#ifndef __GXX_MERGED_TYPEINFO_NAMES
+ #if !__GXX_WEAK__
+ // If weak symbols are not supported, typeinfo names are not merged.
+ #define __GXX_MERGED_TYPEINFO_NAMES 0
+ #else
+ // On platforms that support weak symbols, typeinfo names are merged.
+ #define __GXX_MERGED_TYPEINFO_NAMES 1
+ #endif
+#endif
+
+// By default follow the same rules as for __GXX_MERGED_TYPEINFO_NAMES.
+#ifndef __GXX_TYPEINFO_EQUALITY_INLINE
+ #if !__GXX_WEAK__
+ #define __GXX_TYPEINFO_EQUALITY_INLINE 0
+ #else
+ #define __GXX_TYPEINFO_EQUALITY_INLINE 1
+ #endif
+#endif
+
+namespace std
+{
+ /**
+ * @brief Part of RTTI.
+ *
+ * The @c type_info class describes type information generated by
+ * an implementation.
+ */
+ class type_info
+ {
+ public:
+ /** Destructor first. Being the first non-inline virtual function, this
+ * controls in which translation unit the vtable is emitted. The
+ * compiler makes use of that information to know where to emit
+ * the runtime-mandated type_info structures in the new-abi. */
+ virtual ~type_info();
+
+ /** Returns an @e implementation-defined byte string; this is not
+ * portable between compilers! */
+ const char* name() const
+ { return __name; }
+
+#if !__GXX_TYPEINFO_EQUALITY_INLINE
+ bool before(const type_info& __arg) const;
+
+ // In old abi, or when weak symbols are not supported, there can
+ // be multiple instances of a type_info object for one
+ // type. Uniqueness must use the _name value, not object address.
+ bool operator==(const type_info& __arg) const;
+#else
+ #if !__GXX_MERGED_TYPEINFO_NAMES
+ #error "Inline implementation of type_info comparision requires merging of type_info objects"
+ #endif
+ /** Returns true if @c *this precedes @c __arg in the implementation's
+ * collation order. */
+ // In new abi we can rely on type_info's NTBS being unique,
+ // and therefore address comparisons are sufficient.
+ bool before(const type_info& __arg) const
+ { return __name < __arg.__name; }
+
+ bool operator==(const type_info& __arg) const
+ { return __name == __arg.__name; }
+#endif
+ bool operator!=(const type_info& __arg) const
+ { return !operator==(__arg); }
+
+ // Return true if this is a pointer type of some kind
+ virtual bool __is_pointer_p() const;
+
+ // Return true if this is a function type
+ virtual bool __is_function_p() const;
+
+ // Try and catch a thrown type. Store an adjusted pointer to the
+ // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
+ // THR_OBJ points to the thrown object. If THR_TYPE is a pointer
+ // type, then THR_OBJ is the pointer itself. OUTER indicates the
+ // number of outer pointers, and whether they were const
+ // qualified.
+ virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
+ unsigned __outer) const;
+
+ // Internally used during catch matching
+ virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
+ void **__obj_ptr) const;
+
+ protected:
+ const char *__name;
+
+ explicit type_info(const char *__n): __name(__n) { }
+
+ private:
+ /// Assigning type_info is not supported.
+ type_info& operator=(const type_info&);
+ type_info(const type_info&);
+ };
+
+ /**
+ * @brief Thrown during incorrect typecasting.
+ * @ingroup exceptions
+ *
+ * If you attempt an invalid @c dynamic_cast expression, an instance of
+ * this class (or something derived from this class) is thrown. */
+ class bad_cast : public exception
+ {
+ public:
+ bad_cast() throw() { }
+
+ // This declaration is not useless:
+ // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+ virtual ~bad_cast() throw();
+
+ // See comment in eh_exception.cc.
+ virtual const char* what() const throw();
+ };
+
+ /**
+ * @brief Thrown when a NULL pointer in a @c typeid expression is used.
+ * @ingroup exceptions
+ */
+ class bad_typeid : public exception
+ {
+ public:
+ bad_typeid () throw() { }
+
+ // This declaration is not useless:
+ // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+ virtual ~bad_typeid() throw();
+
+ // See comment in eh_exception.cc.
+ virtual const char* what() const throw();
+ };
+} // namespace std
+
+#pragma GCC visibility pop
+
+} // extern "C++"
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/unordered_map b/6/sources/cxx-stl/gnu-libstdc++/include/unordered_map
new file mode 100644
index 0000000..56906d2
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/unordered_map
@@ -0,0 +1,78 @@
+// <unordered_map> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/unordered_map
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_UNORDERED_MAP
+#define _GLIBCXX_UNORDERED_MAP 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <utility>
+#include <type_traits>
+#include <initializer_list>
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
+#include <bits/functional_hash.h>
+#include <bits/hashtable.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/unordered_map>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+#endif
+# include <tr1_impl/unordered_map>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/unordered_map>
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_UNORDERED_MAP
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/unordered_set b/6/sources/cxx-stl/gnu-libstdc++/include/unordered_set
new file mode 100644
index 0000000..880f3be
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/unordered_set
@@ -0,0 +1,78 @@
+// <unordered_set> -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file include/unordered_set
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_UNORDERED_SET
+#define _GLIBCXX_UNORDERED_SET 1
+
+#pragma GCC system_header
+
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
+# include <c++0x_warning.h>
+#else
+
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+#endif
+
+#include <utility>
+#include <type_traits>
+#include <initializer_list>
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_function.h> // equal_to, _Identity, _Select1st
+#include <bits/stringfwd.h>
+#include <bits/functional_hash.h>
+#include <bits/hashtable.h>
+
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/unordered_set>
+#else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+#if defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL)
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace _GLIBCXX_STD_D {
+# define _GLIBCXX_END_NAMESPACE_TR1 }
+# define _GLIBCXX_TR1 _GLIBCXX_STD_D
+#else
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+#endif
+# include <tr1_impl/unordered_set>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/unordered_set>
+#endif
+
+#endif // __GXX_EXPERIMENTAL_CXX0X__
+
+#endif // _GLIBCXX_UNORDERED_SET
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/utility b/6/sources/cxx-stl/gnu-libstdc++/include/utility
new file mode 100644
index 0000000..1a6d0b1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/utility
@@ -0,0 +1,94 @@
+// <utility> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/** @file include/utility
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_UTILITY
+#define _GLIBCXX_UTILITY 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/stl_relops.h>
+#include <bits/stl_pair.h>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+# if defined(_GLIBCXX_INCLUDE_AS_TR1)
+# error C++0x header cannot be included from TR1 header
+# endif
+# if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+# include <tr1_impl/utility>
+# else
+# define _GLIBCXX_INCLUDE_AS_CXX0X
+# define _GLIBCXX_BEGIN_NAMESPACE_TR1
+# define _GLIBCXX_END_NAMESPACE_TR1
+# define _GLIBCXX_TR1
+# include <tr1_impl/utility>
+# undef _GLIBCXX_TR1
+# undef _GLIBCXX_END_NAMESPACE_TR1
+# undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+# undef _GLIBCXX_INCLUDE_AS_CXX0X
+# endif
+# include <bits/move.h>
+# include <initializer_list>
+#endif
+
+/**
+ * @defgroup utilities Utilities
+ *
+ * Components deemed generally useful. Includes pair, tuple,
+ * forward/move helpers, ratio, function object, metaprogramming and
+ * type traits, time, date, and memory functions.
+ */
+
+#endif /* _GLIBCXX_UTILITY */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/valarray b/6/sources/cxx-stl/gnu-libstdc++/include/valarray
new file mode 100644
index 0000000..43e8d20
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/valarray
@@ -0,0 +1,1087 @@
+// The template and inlines for the -*- C++ -*- valarray class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file valarray
+ * This is a Standard C++ Library header.
+ */
+
+// Written by Gabriel Dos Reis <Gabriel.Dos-Reis@DPTMaths.ENS-Cachan.Fr>
+
+#ifndef _GLIBCXX_VALARRAY
+#define _GLIBCXX_VALARRAY 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <cstddef>
+#include <cmath>
+#include <algorithm>
+#include <debug/debug.h>
+#include <initializer_list>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<class _Clos, typename _Tp>
+ class _Expr;
+
+ template<typename _Tp1, typename _Tp2>
+ class _ValArray;
+
+ template<class _Oper, template<class, class> class _Meta, class _Dom>
+ struct _UnClos;
+
+ template<class _Oper,
+ template<class, class> class _Meta1,
+ template<class, class> class _Meta2,
+ class _Dom1, class _Dom2>
+ class _BinClos;
+
+ template<template<class, class> class _Meta, class _Dom>
+ class _SClos;
+
+ template<template<class, class> class _Meta, class _Dom>
+ class _GClos;
+
+ template<template<class, class> class _Meta, class _Dom>
+ class _IClos;
+
+ template<template<class, class> class _Meta, class _Dom>
+ class _ValFunClos;
+
+ template<template<class, class> class _Meta, class _Dom>
+ class _RefFunClos;
+
+ template<class _Tp> class valarray; // An array of type _Tp
+ class slice; // BLAS-like slice out of an array
+ template<class _Tp> class slice_array;
+ class gslice; // generalized slice out of an array
+ template<class _Tp> class gslice_array;
+ template<class _Tp> class mask_array; // masked array
+ template<class _Tp> class indirect_array; // indirected array
+
+_GLIBCXX_END_NAMESPACE
+
+#include <bits/valarray_array.h>
+#include <bits/valarray_before.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @defgroup numeric_arrays Numeric Arrays
+ * @ingroup numerics
+ *
+ * Classes and functions for representing and manipulating arrays of elements.
+ * @{
+ */
+
+ /**
+ * @brief Smart array designed to support numeric processing.
+ *
+ * A valarray is an array that provides constraints intended to allow for
+ * effective optimization of numeric array processing by reducing the
+ * aliasing that can result from pointer representations. It represents a
+ * one-dimensional array from which different multidimensional subsets can
+ * be accessed and modified.
+ *
+ * @param Tp Type of object in the array.
+ */
+ template<class _Tp>
+ class valarray
+ {
+ template<class _Op>
+ struct _UnaryOp
+ {
+ typedef typename __fun<_Op, _Tp>::result_type __rt;
+ typedef _Expr<_UnClos<_Op, _ValArray, _Tp>, __rt> _Rt;
+ };
+ public:
+ typedef _Tp value_type;
+
+ // _lib.valarray.cons_ construct/destroy:
+ /// Construct an empty array.
+ valarray();
+
+ /// Construct an array with @a n elements.
+ explicit valarray(size_t);
+
+ /// Construct an array with @a n elements initialized to @a t.
+ valarray(const _Tp&, size_t);
+
+ /// Construct an array initialized to the first @a n elements of @a t.
+ valarray(const _Tp* __restrict__, size_t);
+
+ /// Copy constructor.
+ valarray(const valarray&);
+
+ /// Construct an array with the same size and values in @a sa.
+ valarray(const slice_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ga.
+ valarray(const gslice_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ma.
+ valarray(const mask_array<_Tp>&);
+
+ /// Construct an array with the same size and values in @a ia.
+ valarray(const indirect_array<_Tp>&);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /// Construct an array with an initializer_list of values.
+ valarray(initializer_list<_Tp>);
+#endif
+
+ template<class _Dom>
+ valarray(const _Expr<_Dom, _Tp>& __e);
+
+ ~valarray();
+
+ // _lib.valarray.assign_ assignment:
+ /**
+ * @brief Assign elements to an array.
+ *
+ * Assign elements of array to values in @a v. Results are undefined
+ * if @a v does not have the same size as this array.
+ *
+ * @param v Valarray to get values from.
+ */
+ valarray<_Tp>& operator=(const valarray<_Tp>&);
+
+ /**
+ * @brief Assign elements to a value.
+ *
+ * Assign all elements of array to @a t.
+ *
+ * @param t Value for elements.
+ */
+ valarray<_Tp>& operator=(const _Tp&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a sa. Results are undefined
+ * if @a sa does not have the same size as this array.
+ *
+ * @param sa Array slice to get values from.
+ */
+ valarray<_Tp>& operator=(const slice_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ga. Results are undefined
+ * if @a ga does not have the same size as this array.
+ *
+ * @param ga Array slice to get values from.
+ */
+ valarray<_Tp>& operator=(const gslice_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ma. Results are undefined
+ * if @a ma does not have the same size as this array.
+ *
+ * @param ma Array slice to get values from.
+ */
+ valarray<_Tp>& operator=(const mask_array<_Tp>&);
+
+ /**
+ * @brief Assign elements to an array subset.
+ *
+ * Assign elements of array to values in @a ia. Results are undefined
+ * if @a ia does not have the same size as this array.
+ *
+ * @param ia Array slice to get values from.
+ */
+ valarray<_Tp>& operator=(const indirect_array<_Tp>&);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ /**
+ * @brief Assign elements to an initializer_list.
+ *
+ * Assign elements of array to values in @a l. Results are undefined
+ * if @a l does not have the same size as this array.
+ *
+ * @param l initializer_list to get values from.
+ */
+ valarray& operator=(initializer_list<_Tp>);
+#endif
+
+ template<class _Dom> valarray<_Tp>&
+ operator= (const _Expr<_Dom, _Tp>&);
+
+ // _lib.valarray.access_ element access:
+ /**
+ * Return a reference to the i'th array element.
+ *
+ * @param i Index of element to return.
+ * @return Reference to the i'th element.
+ */
+ _Tp& operator[](size_t);
+
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 389. Const overload of valarray::operator[] returns by value.
+ const _Tp& operator[](size_t) const;
+
+ // _lib.valarray.sub_ subset operations:
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the slice argument. The new valarray has the same size
+ * as the input slice. @see slice.
+ *
+ * @param s The source slice.
+ * @return New valarray containing elements in @a s.
+ */
+ _Expr<_SClos<_ValArray, _Tp>, _Tp> operator[](slice) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the slice argument. The new valarray has the same size
+ * as the input slice. @see slice.
+ *
+ * @param s The source slice.
+ * @return New valarray containing elements in @a s.
+ */
+ slice_array<_Tp> operator[](slice);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a slice_array referencing the elements of the array
+ * indicated by the slice argument. @see gslice.
+ *
+ * @param s The source slice.
+ * @return Slice_array referencing elements indicated by @a s.
+ */
+ _Expr<_GClos<_ValArray, _Tp>, _Tp> operator[](const gslice&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the gslice argument. The new valarray has
+ * the same size as the input gslice. @see gslice.
+ *
+ * @param s The source gslice.
+ * @return New valarray containing elements in @a s.
+ */
+ gslice_array<_Tp> operator[](const gslice&);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the argument. The input is a valarray of bool which
+ * represents a bitmask indicating which elements should be copied into
+ * the new valarray. Each element of the array is added to the return
+ * valarray if the corresponding element of the argument is true.
+ *
+ * @param m The valarray bitmask.
+ * @return New valarray containing elements indicated by @a m.
+ */
+ valarray<_Tp> operator[](const valarray<bool>&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns a new mask_array referencing the elements of the array
+ * indicated by the argument. The input is a valarray of bool which
+ * represents a bitmask indicating which elements are part of the
+ * subset. Elements of the array are part of the subset if the
+ * corresponding element of the argument is true.
+ *
+ * @param m The valarray bitmask.
+ * @return New valarray containing elements indicated by @a m.
+ */
+ mask_array<_Tp> operator[](const valarray<bool>&);
+
+ /**
+ * @brief Return an array subset.
+ *
+ * Returns a new valarray containing the elements of the array
+ * indicated by the argument. The elements in the argument are
+ * interpreted as the indices of elements of this valarray to copy to
+ * the return valarray.
+ *
+ * @param i The valarray element index list.
+ * @return New valarray containing elements in @a s.
+ */
+ _Expr<_IClos<_ValArray, _Tp>, _Tp>
+ operator[](const valarray<size_t>&) const;
+
+ /**
+ * @brief Return a reference to an array subset.
+ *
+ * Returns an indirect_array referencing the elements of the array
+ * indicated by the argument. The elements in the argument are
+ * interpreted as the indices of elements of this valarray to include
+ * in the subset. The returned indirect_array refers to these
+ * elements.
+ *
+ * @param i The valarray element index list.
+ * @return Indirect_array referencing elements in @a i.
+ */
+ indirect_array<_Tp> operator[](const valarray<size_t>&);
+
+ // _lib.valarray.unary_ unary operators:
+ /// Return a new valarray by applying unary + to each element.
+ typename _UnaryOp<__unary_plus>::_Rt operator+() const;
+
+ /// Return a new valarray by applying unary - to each element.
+ typename _UnaryOp<__negate>::_Rt operator-() const;
+
+ /// Return a new valarray by applying unary ~ to each element.
+ typename _UnaryOp<__bitwise_not>::_Rt operator~() const;
+
+ /// Return a new valarray by applying unary ! to each element.
+ typename _UnaryOp<__logical_not>::_Rt operator!() const;
+
+ // _lib.valarray.cassign_ computed assignment:
+ /// Multiply each element of array by @a t.
+ valarray<_Tp>& operator*=(const _Tp&);
+
+ /// Divide each element of array by @a t.
+ valarray<_Tp>& operator/=(const _Tp&);
+
+ /// Set each element e of array to e % @a t.
+ valarray<_Tp>& operator%=(const _Tp&);
+
+ /// Add @a t to each element of array.
+ valarray<_Tp>& operator+=(const _Tp&);
+
+ /// Subtract @a t to each element of array.
+ valarray<_Tp>& operator-=(const _Tp&);
+
+ /// Set each element e of array to e ^ @a t.
+ valarray<_Tp>& operator^=(const _Tp&);
+
+ /// Set each element e of array to e & @a t.
+ valarray<_Tp>& operator&=(const _Tp&);
+
+ /// Set each element e of array to e | @a t.
+ valarray<_Tp>& operator|=(const _Tp&);
+
+ /// Left shift each element e of array by @a t bits.
+ valarray<_Tp>& operator<<=(const _Tp&);
+
+ /// Right shift each element e of array by @a t bits.
+ valarray<_Tp>& operator>>=(const _Tp&);
+
+ /// Multiply elements of array by corresponding elements of @a v.
+ valarray<_Tp>& operator*=(const valarray<_Tp>&);
+
+ /// Divide elements of array by corresponding elements of @a v.
+ valarray<_Tp>& operator/=(const valarray<_Tp>&);
+
+ /// Modulo elements of array by corresponding elements of @a v.
+ valarray<_Tp>& operator%=(const valarray<_Tp>&);
+
+ /// Add corresponding elements of @a v to elements of array.
+ valarray<_Tp>& operator+=(const valarray<_Tp>&);
+
+ /// Subtract corresponding elements of @a v from elements of array.
+ valarray<_Tp>& operator-=(const valarray<_Tp>&);
+
+ /// Logical xor corresponding elements of @a v with elements of array.
+ valarray<_Tp>& operator^=(const valarray<_Tp>&);
+
+ /// Logical or corresponding elements of @a v with elements of array.
+ valarray<_Tp>& operator|=(const valarray<_Tp>&);
+
+ /// Logical and corresponding elements of @a v with elements of array.
+ valarray<_Tp>& operator&=(const valarray<_Tp>&);
+
+ /// Left shift elements of array by corresponding elements of @a v.
+ valarray<_Tp>& operator<<=(const valarray<_Tp>&);
+
+ /// Right shift elements of array by corresponding elements of @a v.
+ valarray<_Tp>& operator>>=(const valarray<_Tp>&);
+
+ template<class _Dom>
+ valarray<_Tp>& operator*=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator/=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator%=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator+=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator-=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator^=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator|=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator&=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator<<=(const _Expr<_Dom, _Tp>&);
+ template<class _Dom>
+ valarray<_Tp>& operator>>=(const _Expr<_Dom, _Tp>&);
+
+ // _lib.valarray.members_ member functions:
+ /// Return the number of elements in array.
+ size_t size() const;
+
+ /**
+ * @brief Return the sum of all elements in the array.
+ *
+ * Accumulates the sum of all elements into a Tp using +=. The order
+ * of adding the elements is unspecified.
+ */
+ _Tp sum() const;
+
+ /// Return the minimum element using operator<().
+ _Tp min() const;
+
+ /// Return the maximum element using operator<().
+ _Tp max() const;
+
+ /**
+ * @brief Return a shifted array.
+ *
+ * A new valarray is constructed as a copy of this array with elements
+ * in shifted positions. For an element with index i, the new position
+ * is i - n. The new valarray has the same size as the current one.
+ * New elements without a value are set to 0. Elements whose new
+ * position is outside the bounds of the array are discarded.
+ *
+ * Positive arguments shift toward index 0, discarding elements [0, n).
+ * Negative arguments discard elements from the top of the array.
+ *
+ * @param n Number of element positions to shift.
+ * @return New valarray with elements in shifted positions.
+ */
+ valarray<_Tp> shift (int) const;
+
+ /**
+ * @brief Return a rotated array.
+ *
+ * A new valarray is constructed as a copy of this array with elements
+ * in shifted positions. For an element with index i, the new position
+ * is (i - n) % size(). The new valarray has the same size as the
+ * current one. Elements that are shifted beyond the array bounds are
+ * shifted into the other end of the array. No elements are lost.
+ *
+ * Positive arguments shift toward index 0, wrapping around the top.
+ * Negative arguments shift towards the top, wrapping around to 0.
+ *
+ * @param n Number of element positions to rotate.
+ * @return New valarray with elements in shifted positions.
+ */
+ valarray<_Tp> cshift(int) const;
+
+ /**
+ * @brief Apply a function to the array.
+ *
+ * Returns a new valarray with elements assigned to the result of
+ * applying func to the corresponding element of this array. The new
+ * array has the same size as this one.
+ *
+ * @param func Function of Tp returning Tp to apply.
+ * @return New valarray with transformed elements.
+ */
+ _Expr<_ValFunClos<_ValArray, _Tp>, _Tp> apply(_Tp func(_Tp)) const;
+
+ /**
+ * @brief Apply a function to the array.
+ *
+ * Returns a new valarray with elements assigned to the result of
+ * applying func to the corresponding element of this array. The new
+ * array has the same size as this one.
+ *
+ * @param func Function of const Tp& returning Tp to apply.
+ * @return New valarray with transformed elements.
+ */
+ _Expr<_RefFunClos<_ValArray, _Tp>, _Tp> apply(_Tp func(const _Tp&)) const;
+
+ /**
+ * @brief Resize array.
+ *
+ * Resize this array to @a size and set all elements to @a c. All
+ * references and iterators are invalidated.
+ *
+ * @param size New array size.
+ * @param c New value for all elements.
+ */
+ void resize(size_t __size, _Tp __c = _Tp());
+
+ private:
+ size_t _M_size;
+ _Tp* __restrict__ _M_data;
+
+ friend class _Array<_Tp>;
+ };
+
+ template<typename _Tp>
+ inline const _Tp&
+ valarray<_Tp>::operator[](size_t __i) const
+ {
+ __glibcxx_requires_subscript(__i);
+ return _M_data[__i];
+ }
+
+ template<typename _Tp>
+ inline _Tp&
+ valarray<_Tp>::operator[](size_t __i)
+ {
+ __glibcxx_requires_subscript(__i);
+ return _M_data[__i];
+ }
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#include <bits/valarray_after.h>
+#include <bits/slice_array.h>
+#include <bits/gslice.h>
+#include <bits/gslice_array.h>
+#include <bits/mask_array.h>
+#include <bits/indirect_array.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /**
+ * @addtogroup numeric_arrays
+ * @{
+ */
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray() : _M_size(0), _M_data(0) {}
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(size_t __n)
+ : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+ { std::__valarray_default_construct(_M_data, _M_data + __n); }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const _Tp& __t, size_t __n)
+ : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+ { std::__valarray_fill_construct(_M_data, _M_data + __n, __t); }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const _Tp* __restrict__ __p, size_t __n)
+ : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+ {
+ _GLIBCXX_DEBUG_ASSERT(__p != 0 || __n == 0);
+ std::__valarray_copy_construct(__p, __p + __n, _M_data);
+ }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const valarray<_Tp>& __v)
+ : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size))
+ { std::__valarray_copy_construct(__v._M_data, __v._M_data + _M_size,
+ _M_data); }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const slice_array<_Tp>& __sa)
+ : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz))
+ {
+ std::__valarray_copy_construct
+ (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data));
+ }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const gslice_array<_Tp>& __ga)
+ : _M_size(__ga._M_index.size()),
+ _M_data(__valarray_get_storage<_Tp>(_M_size))
+ {
+ std::__valarray_copy_construct
+ (__ga._M_array, _Array<size_t>(__ga._M_index),
+ _Array<_Tp>(_M_data), _M_size);
+ }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const mask_array<_Tp>& __ma)
+ : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz))
+ {
+ std::__valarray_copy_construct
+ (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size);
+ }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(const indirect_array<_Tp>& __ia)
+ : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz))
+ {
+ std::__valarray_copy_construct
+ (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::valarray(initializer_list<_Tp> __l)
+ : _M_size(__l.size()), _M_data(__valarray_get_storage<_Tp>(__l.size()))
+ { std::__valarray_copy_construct (__l.begin(), __l.end(), _M_data); }
+#endif
+
+ template<typename _Tp> template<class _Dom>
+ inline
+ valarray<_Tp>::valarray(const _Expr<_Dom, _Tp>& __e)
+ : _M_size(__e.size()), _M_data(__valarray_get_storage<_Tp>(_M_size))
+ { std::__valarray_copy_construct(__e, _M_size, _Array<_Tp>(_M_data)); }
+
+ template<typename _Tp>
+ inline
+ valarray<_Tp>::~valarray()
+ {
+ std::__valarray_destroy_elements(_M_data, _M_data + _M_size);
+ std::__valarray_release_memory(_M_data);
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const valarray<_Tp>& __v)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size);
+ std::__valarray_copy(__v._M_data, _M_size, _M_data);
+ return *this;
+ }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(initializer_list<_Tp> __l)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __l.size());
+ std::__valarray_copy(__l.begin(), __l.size(), _M_data);
+ return *this;
+ }
+#endif
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const _Tp& __t)
+ {
+ std::__valarray_fill(_M_data, _M_size, __t);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const slice_array<_Tp>& __sa)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __sa._M_sz);
+ std::__valarray_copy(__sa._M_array, __sa._M_sz,
+ __sa._M_stride, _Array<_Tp>(_M_data));
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const gslice_array<_Tp>& __ga)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ga._M_index.size());
+ std::__valarray_copy(__ga._M_array, _Array<size_t>(__ga._M_index),
+ _Array<_Tp>(_M_data), _M_size);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const mask_array<_Tp>& __ma)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ma._M_sz);
+ std::__valarray_copy(__ma._M_array, __ma._M_mask,
+ _Array<_Tp>(_M_data), _M_size);
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const indirect_array<_Tp>& __ia)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __ia._M_sz);
+ std::__valarray_copy(__ia._M_array, __ia._M_index,
+ _Array<_Tp>(_M_data), _M_size);
+ return *this;
+ }
+
+ template<typename _Tp> template<class _Dom>
+ inline valarray<_Tp>&
+ valarray<_Tp>::operator=(const _Expr<_Dom, _Tp>& __e)
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __e.size());
+ std::__valarray_copy(__e, _M_size, _Array<_Tp>(_M_data));
+ return *this;
+ }
+
+ template<typename _Tp>
+ inline _Expr<_SClos<_ValArray,_Tp>, _Tp>
+ valarray<_Tp>::operator[](slice __s) const
+ {
+ typedef _SClos<_ValArray,_Tp> _Closure;
+ return _Expr<_Closure, _Tp>(_Closure (_Array<_Tp>(_M_data), __s));
+ }
+
+ template<typename _Tp>
+ inline slice_array<_Tp>
+ valarray<_Tp>::operator[](slice __s)
+ { return slice_array<_Tp>(_Array<_Tp>(_M_data), __s); }
+
+ template<typename _Tp>
+ inline _Expr<_GClos<_ValArray,_Tp>, _Tp>
+ valarray<_Tp>::operator[](const gslice& __gs) const
+ {
+ typedef _GClos<_ValArray,_Tp> _Closure;
+ return _Expr<_Closure, _Tp>
+ (_Closure(_Array<_Tp>(_M_data), __gs._M_index->_M_index));
+ }
+
+ template<typename _Tp>
+ inline gslice_array<_Tp>
+ valarray<_Tp>::operator[](const gslice& __gs)
+ {
+ return gslice_array<_Tp>
+ (_Array<_Tp>(_M_data), __gs._M_index->_M_index);
+ }
+
+ template<typename _Tp>
+ inline valarray<_Tp>
+ valarray<_Tp>::operator[](const valarray<bool>& __m) const
+ {
+ size_t __s = 0;
+ size_t __e = __m.size();
+ for (size_t __i=0; __i<__e; ++__i)
+ if (__m[__i]) ++__s;
+ return valarray<_Tp>(mask_array<_Tp>(_Array<_Tp>(_M_data), __s,
+ _Array<bool> (__m)));
+ }
+
+ template<typename _Tp>
+ inline mask_array<_Tp>
+ valarray<_Tp>::operator[](const valarray<bool>& __m)
+ {
+ size_t __s = 0;
+ size_t __e = __m.size();
+ for (size_t __i=0; __i<__e; ++__i)
+ if (__m[__i]) ++__s;
+ return mask_array<_Tp>(_Array<_Tp>(_M_data), __s, _Array<bool>(__m));
+ }
+
+ template<typename _Tp>
+ inline _Expr<_IClos<_ValArray,_Tp>, _Tp>
+ valarray<_Tp>::operator[](const valarray<size_t>& __i) const
+ {
+ typedef _IClos<_ValArray,_Tp> _Closure;
+ return _Expr<_Closure, _Tp>(_Closure(*this, __i));
+ }
+
+ template<typename _Tp>
+ inline indirect_array<_Tp>
+ valarray<_Tp>::operator[](const valarray<size_t>& __i)
+ {
+ return indirect_array<_Tp>(_Array<_Tp>(_M_data), __i.size(),
+ _Array<size_t>(__i));
+ }
+
+ template<class _Tp>
+ inline size_t
+ valarray<_Tp>::size() const
+ { return _M_size; }
+
+ template<class _Tp>
+ inline _Tp
+ valarray<_Tp>::sum() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return std::__valarray_sum(_M_data, _M_data + _M_size);
+ }
+
+ template<class _Tp>
+ inline valarray<_Tp>
+ valarray<_Tp>::shift(int __n) const
+ {
+ valarray<_Tp> __ret;
+
+ if (_M_size == 0)
+ return __ret;
+
+ _Tp* __restrict__ __tmp_M_data =
+ std::__valarray_get_storage<_Tp>(_M_size);
+
+ if (__n == 0)
+ std::__valarray_copy_construct(_M_data,
+ _M_data + _M_size, __tmp_M_data);
+ else if (__n > 0) // shift left
+ {
+ if (size_t(__n) > _M_size)
+ __n = int(_M_size);
+
+ std::__valarray_copy_construct(_M_data + __n,
+ _M_data + _M_size, __tmp_M_data);
+ std::__valarray_default_construct(__tmp_M_data + _M_size - __n,
+ __tmp_M_data + _M_size);
+ }
+ else // shift right
+ {
+ if (-size_t(__n) > _M_size)
+ __n = -int(_M_size);
+
+ std::__valarray_copy_construct(_M_data, _M_data + _M_size + __n,
+ __tmp_M_data - __n);
+ std::__valarray_default_construct(__tmp_M_data,
+ __tmp_M_data - __n);
+ }
+
+ __ret._M_size = _M_size;
+ __ret._M_data = __tmp_M_data;
+ return __ret;
+ }
+
+ template<class _Tp>
+ inline valarray<_Tp>
+ valarray<_Tp>::cshift(int __n) const
+ {
+ valarray<_Tp> __ret;
+
+ if (_M_size == 0)
+ return __ret;
+
+ _Tp* __restrict__ __tmp_M_data =
+ std::__valarray_get_storage<_Tp>(_M_size);
+
+ if (__n == 0)
+ std::__valarray_copy_construct(_M_data,
+ _M_data + _M_size, __tmp_M_data);
+ else if (__n > 0) // cshift left
+ {
+ if (size_t(__n) > _M_size)
+ __n = int(__n % _M_size);
+
+ std::__valarray_copy_construct(_M_data, _M_data + __n,
+ __tmp_M_data + _M_size - __n);
+ std::__valarray_copy_construct(_M_data + __n, _M_data + _M_size,
+ __tmp_M_data);
+ }
+ else // cshift right
+ {
+ if (-size_t(__n) > _M_size)
+ __n = -int(-size_t(__n) % _M_size);
+
+ std::__valarray_copy_construct(_M_data + _M_size + __n,
+ _M_data + _M_size, __tmp_M_data);
+ std::__valarray_copy_construct(_M_data, _M_data + _M_size + __n,
+ __tmp_M_data - __n);
+ }
+
+ __ret._M_size = _M_size;
+ __ret._M_data = __tmp_M_data;
+ return __ret;
+ }
+
+ template<class _Tp>
+ inline void
+ valarray<_Tp>::resize(size_t __n, _Tp __c)
+ {
+ // This complication is so to make valarray<valarray<T> > work
+ // even though it is not required by the standard. Nobody should
+ // be saying valarray<valarray<T> > anyway. See the specs.
+ std::__valarray_destroy_elements(_M_data, _M_data + _M_size);
+ if (_M_size != __n)
+ {
+ std::__valarray_release_memory(_M_data);
+ _M_size = __n;
+ _M_data = __valarray_get_storage<_Tp>(__n);
+ }
+ std::__valarray_fill_construct(_M_data, _M_data + __n, __c);
+ }
+
+ template<typename _Tp>
+ inline _Tp
+ valarray<_Tp>::min() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return *std::min_element(_M_data, _M_data + _M_size);
+ }
+
+ template<typename _Tp>
+ inline _Tp
+ valarray<_Tp>::max() const
+ {
+ _GLIBCXX_DEBUG_ASSERT(_M_size > 0);
+ return *std::max_element(_M_data, _M_data + _M_size);
+ }
+
+ template<class _Tp>
+ inline _Expr<_ValFunClos<_ValArray, _Tp>, _Tp>
+ valarray<_Tp>::apply(_Tp func(_Tp)) const
+ {
+ typedef _ValFunClos<_ValArray, _Tp> _Closure;
+ return _Expr<_Closure, _Tp>(_Closure(*this, func));
+ }
+
+ template<class _Tp>
+ inline _Expr<_RefFunClos<_ValArray, _Tp>, _Tp>
+ valarray<_Tp>::apply(_Tp func(const _Tp &)) const
+ {
+ typedef _RefFunClos<_ValArray, _Tp> _Closure;
+ return _Expr<_Closure, _Tp>(_Closure(*this, func));
+ }
+
+#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name) \
+ template<typename _Tp> \
+ inline typename valarray<_Tp>::template _UnaryOp<_Name>::_Rt \
+ valarray<_Tp>::operator _Op() const \
+ { \
+ typedef _UnClos<_Name, _ValArray, _Tp> _Closure; \
+ typedef typename __fun<_Name, _Tp>::result_type _Rt; \
+ return _Expr<_Closure, _Rt>(_Closure(*this)); \
+ }
+
+ _DEFINE_VALARRAY_UNARY_OPERATOR(+, __unary_plus)
+ _DEFINE_VALARRAY_UNARY_OPERATOR(-, __negate)
+ _DEFINE_VALARRAY_UNARY_OPERATOR(~, __bitwise_not)
+ _DEFINE_VALARRAY_UNARY_OPERATOR (!, __logical_not)
+
+#undef _DEFINE_VALARRAY_UNARY_OPERATOR
+
+#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name) \
+ template<class _Tp> \
+ inline valarray<_Tp>& \
+ valarray<_Tp>::operator _Op##=(const _Tp &__t) \
+ { \
+ _Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size, __t); \
+ return *this; \
+ } \
+ \
+ template<class _Tp> \
+ inline valarray<_Tp>& \
+ valarray<_Tp>::operator _Op##=(const valarray<_Tp> &__v) \
+ { \
+ _GLIBCXX_DEBUG_ASSERT(_M_size == __v._M_size); \
+ _Array_augmented_##_Name(_Array<_Tp>(_M_data), _M_size, \
+ _Array<_Tp>(__v._M_data)); \
+ return *this; \
+ }
+
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(+, __plus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(-, __minus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(*, __multiplies)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(/, __divides)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(%, __modulus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(^, __bitwise_xor)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(&, __bitwise_and)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(|, __bitwise_or)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(<<, __shift_left)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT
+
+#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name) \
+ template<class _Tp> template<class _Dom> \
+ inline valarray<_Tp>& \
+ valarray<_Tp>::operator _Op##=(const _Expr<_Dom, _Tp>& __e) \
+ { \
+ _Array_augmented_##_Name(_Array<_Tp>(_M_data), __e, _M_size); \
+ return *this; \
+ }
+
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(+, __plus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(-, __minus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(*, __multiplies)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(/, __divides)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(%, __modulus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(^, __bitwise_xor)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(&, __bitwise_and)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(|, __bitwise_or)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, __shift_left)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, __shift_right)
+
+#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT
+
+
+#define _DEFINE_BINARY_OPERATOR(_Op, _Name) \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<_Name, _ValArray, _ValArray, _Tp, _Tp>, \
+ typename __fun<_Name, _Tp>::result_type> \
+ operator _Op(const valarray<_Tp>& __v, const valarray<_Tp>& __w) \
+ { \
+ _GLIBCXX_DEBUG_ASSERT(__v.size() == __w.size()); \
+ typedef _BinClos<_Name, _ValArray, _ValArray, _Tp, _Tp> _Closure; \
+ typedef typename __fun<_Name, _Tp>::result_type _Rt; \
+ return _Expr<_Closure, _Rt>(_Closure(__v, __w)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<_Name, _ValArray,_Constant, _Tp, _Tp>, \
+ typename __fun<_Name, _Tp>::result_type> \
+ operator _Op(const valarray<_Tp>& __v, const _Tp& __t) \
+ { \
+ typedef _BinClos<_Name, _ValArray, _Constant, _Tp, _Tp> _Closure; \
+ typedef typename __fun<_Name, _Tp>::result_type _Rt; \
+ return _Expr<_Closure, _Rt>(_Closure(__v, __t)); \
+ } \
+ \
+ template<typename _Tp> \
+ inline _Expr<_BinClos<_Name, _Constant, _ValArray, _Tp, _Tp>, \
+ typename __fun<_Name, _Tp>::result_type> \
+ operator _Op(const _Tp& __t, const valarray<_Tp>& __v) \
+ { \
+ typedef _BinClos<_Name, _Constant, _ValArray, _Tp, _Tp> _Closure; \
+ typedef typename __fun<_Name, _Tp>::result_type _Rt; \
+ return _Expr<_Closure, _Rt>(_Closure(__t, __v)); \
+ }
+
+_DEFINE_BINARY_OPERATOR(+, __plus)
+_DEFINE_BINARY_OPERATOR(-, __minus)
+_DEFINE_BINARY_OPERATOR(*, __multiplies)
+_DEFINE_BINARY_OPERATOR(/, __divides)
+_DEFINE_BINARY_OPERATOR(%, __modulus)
+_DEFINE_BINARY_OPERATOR(^, __bitwise_xor)
+_DEFINE_BINARY_OPERATOR(&, __bitwise_and)
+_DEFINE_BINARY_OPERATOR(|, __bitwise_or)
+_DEFINE_BINARY_OPERATOR(<<, __shift_left)
+_DEFINE_BINARY_OPERATOR(>>, __shift_right)
+_DEFINE_BINARY_OPERATOR(&&, __logical_and)
+_DEFINE_BINARY_OPERATOR(||, __logical_or)
+_DEFINE_BINARY_OPERATOR(==, __equal_to)
+_DEFINE_BINARY_OPERATOR(!=, __not_equal_to)
+_DEFINE_BINARY_OPERATOR(<, __less)
+_DEFINE_BINARY_OPERATOR(>, __greater)
+_DEFINE_BINARY_OPERATOR(<=, __less_equal)
+_DEFINE_BINARY_OPERATOR(>=, __greater_equal)
+
+#undef _DEFINE_BINARY_OPERATOR
+
+ // @} group numeric_arrays
+
+_GLIBCXX_END_NAMESPACE
+
+#endif /* _GLIBCXX_VALARRAY */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/include/vector b/6/sources/cxx-stl/gnu-libstdc++/include/vector
new file mode 100644
index 0000000..114665b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/include/vector
@@ -0,0 +1,77 @@
+// <vector> -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * Copyright (c) 1996
+ * 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.
+ */
+
+/** @file include/vector
+ * This is a Standard C++ Library header.
+ */
+
+#ifndef _GLIBCXX_VECTOR
+#define _GLIBCXX_VECTOR 1
+
+#pragma GCC system_header
+
+#include <bits/stl_algobase.h>
+#include <bits/allocator.h>
+#include <bits/stl_construct.h>
+#include <bits/stl_uninitialized.h>
+#include <bits/stl_vector.h>
+#include <bits/stl_bvector.h>
+
+#ifndef _GLIBCXX_EXPORT_TEMPLATE
+# include <bits/vector.tcc>
+#endif
+
+#ifdef _GLIBCXX_DEBUG
+# include <debug/vector>
+#endif
+
+#endif /* _GLIBCXX_VECTOR */
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/atomic_word.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/basic_file.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/basic_file.h
new file mode 100644
index 0000000..eedb73b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8 File-based streams
+//
+
+/** @file basic_file.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h> // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Generic declaration.
+ template<typename _CharT>
+ class __basic_file;
+
+ // Specialization.
+ template<>
+ class __basic_file<char>
+ {
+ // Underlying data source/sink.
+ __c_file* _M_cfile;
+
+ // True iff we opened _M_cfile, and thus must close it ourselves.
+ bool _M_cfile_created;
+
+ public:
+ __basic_file(__c_lock* __lock = 0);
+
+ __basic_file*
+ open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+ __basic_file*
+ sys_open(__c_file* __file, ios_base::openmode);
+
+ __basic_file*
+ sys_open(int __fd, ios_base::openmode __mode);
+
+ __basic_file*
+ close();
+
+ bool
+ is_open() const;
+
+ int
+ fd();
+
+ __c_file*
+ file();
+
+ ~__basic_file();
+
+ streamsize
+ xsputn(const char* __s, streamsize __n);
+
+ streamsize
+ xsputn_2(const char* __s1, streamsize __n1,
+ const char* __s2, streamsize __n2);
+
+ streamsize
+ xsgetn(char* __s, streamsize __n);
+
+ streamoff
+ seekoff(streamoff __off, ios_base::seekdir __way);
+
+ int
+ sync();
+
+ streamsize
+ showmanyc();
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++allocator.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator __gnu_cxx::new_allocator
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++config.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++config.h
new file mode 100644
index 0000000..855d69c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++config.h
@@ -0,0 +1,1431 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20100121
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+# define _GLIBCXX_VISIBILITY_ATTR(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+ namespace std
+ {
+ namespace __debug { }
+ namespace __parallel { }
+ namespace __norm { } // __normative, __shadow, __replaced
+ namespace __cxx1998 { }
+
+ namespace tr1 { }
+ }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD _6
+# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+// debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+# warning currently using namespace associated mode which may fail \
+ without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+namespace std
+{
+ namespace __norm { }
+ inline namespace __debug { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{
+ namespace __norm { }
+ inline namespace __parallel { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+ inline namespace _6 { }
+}
+
+namespace __gnu_cxx
+{
+ inline namespace _6 { }
+}
+
+namespace std
+{
+ namespace tr1
+ {
+ inline namespace _6 { }
+ }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+namespace std
+{
+ inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro. For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+ // Avoid the use of assert, because we're trying to keep the <cassert>
+ // include out of the mix.
+ inline void
+ __replacement_assert(const char* __file, int __line,
+ const char* __function, const char* __condition)
+ {
+ __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+ __function, __condition);
+ __builtin_abort();
+ }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition) \
+ do \
+ { \
+ if (! (_Condition)) \
+ std::__replacement_assert(__FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, #_Condition); \
+ } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation. It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc. We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid) (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+// End of prewritten config; the discovered settings follow.
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+/* #undef _GLIBCXX_HAVE_ACOSL */
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+/* #undef _GLIBCXX_HAVE_ASINL */
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+/* #undef _GLIBCXX_HAVE_ATAN2L */
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+/* #undef _GLIBCXX_HAVE_ATANL */
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+/* #undef _GLIBCXX_HAVE_COMPLEX_H */
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+/* #undef _GLIBCXX_HAVE_COSHL */
+
+/* Define to 1 if you have the `cosl' function. */
+/* #undef _GLIBCXX_HAVE_COSL */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+/* #undef _GLIBCXX_HAVE_EXPL */
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+/* #undef _GLIBCXX_HAVE_FINITEL */
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+/* #undef _GLIBCXX_HAVE_FMODL */
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+/* #undef _GLIBCXX_HAVE_FREXPL */
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+ enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+/* #undef _GLIBCXX_HAVE_HYPOTL */
+
+/* Define if you have the iconv() function. */
+/* #undef _GLIBCXX_HAVE_ICONV */
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+/* #undef _GLIBCXX_HAVE_ISINF */
+
+/* Define to 1 if you have the `isinff' function. */
+/* #undef _GLIBCXX_HAVE_ISINFF */
+
+/* Define to 1 if you have the `isinfl' function. */
+/* #undef _GLIBCXX_HAVE_ISINFL */
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+/* #undef _GLIBCXX_HAVE_ISNANL */
+
+/* Defined if iswblank exists. */
+/* #undef _GLIBCXX_HAVE_ISWBLANK */
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+/* #undef _GLIBCXX_HAVE_LOG10L */
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+/* #undef _GLIBCXX_HAVE_LOGL */
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+/* #undef _GLIBCXX_HAVE_MODFL */
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+/* #undef _GLIBCXX_HAVE_POWL */
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+/* #undef _GLIBCXX_HAVE_SINCOS */
+
+/* Define to 1 if you have the `sincosf' function. */
+/* #undef _GLIBCXX_HAVE_SINCOSF */
+
+/* Define to 1 if you have the `sincosl' function. */
+/* #undef _GLIBCXX_HAVE_SINCOSL */
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+/* #undef _GLIBCXX_HAVE_SINHL */
+
+/* Define to 1 if you have the `sinl' function. */
+/* #undef _GLIBCXX_HAVE_SINL */
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+/* #undef _GLIBCXX_HAVE_SQRTL */
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRERROR_L */
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+/* #undef _GLIBCXX_HAVE_STRTOF */
+
+/* Define to 1 if you have the `strtold' function. */
+/* #undef _GLIBCXX_HAVE_STRTOLD */
+
+/* Define if strxfrm_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRXFRM_L */
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_SEM_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+/* #undef _GLIBCXX_HAVE_TANHL */
+
+/* Define to 1 if you have the `tanl' function. */
+/* #undef _GLIBCXX_HAVE_TANL */
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+/* #undef _GLIBCXX_HAVE_TGMATH_H */
+
+/* Define to 1 if the target supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_TLS */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VFWSCANF */
+
+/* Defined if vswscanf exists. */
+/* #undef _GLIBCXX_HAVE_VSWSCANF */
+
+/* Defined if vwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VWSCANF */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+/* #undef _GLIBCXX_HAVE_WCSTOF */
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+/* #undef _GLIBCXX_ICONV_CONST */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_1 */
+
+/* Define if builtin atomic operations for short are supported on this host.
+ */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_2 */
+
+/* Define if builtin atomic operations for int are supported on this host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_4 */
+
+/* Define if builtin atomic operations for long long are supported on this
+ host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_8 */
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+/* #undef _GLIBCXX_HAS_GTHREADS */
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER */
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU */
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+ <stdio.h>, and <stdlib.h> can be used or exposed. */
+/* #undef _GLIBCXX_USE_C99 */
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+ compiler builtins for these functions requires corresponding C99 library
+ functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX */
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+ Using compiler builtins for these functions requires corresponding C99
+ library functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+ namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+ namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_FENV_TR1 */
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_TR1 */
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 */
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+ in namespace std. */
+/* #undef _GLIBCXX_USE_C99_MATH */
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+ <tr1/cmath> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_MATH_TR1 */
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+ namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_STDINT_TR1 */
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+/* #undef _GLIBCXX_USE_LFS */
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+ of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+/* #undef _GLIBCXX_USE_WCHAR_T */
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++io.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef __gthread_mutex_t __c_lock;
+
+ // for basic_file.h
+ typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++locale.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++locale.h
new file mode 100644
index 0000000..e27a9cd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/c++locale.h
@@ -0,0 +1,91 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8 Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_NUM_CATEGORIES 0
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef int* __c_locale;
+
+ // Convert numeric value of type double and long double to string and
+ // return length of string. If vsnprintf is available use it, otherwise
+ // fall back to the unsafe vsprintf which, in general, can be dangerous
+ // and should be avoided.
+ inline int
+ __convert_from_v(const __c_locale&, char* __out,
+ const int __size __attribute__((__unused__)),
+ const char* __fmt, ...)
+ {
+ char* __old = std::setlocale(LC_NUMERIC, NULL);
+ char* __sav = NULL;
+ if (__old != NULL && __builtin_strcmp(__old, "C"))
+ {
+ const size_t __len = __builtin_strlen(__old) + 1;
+ __sav = new char[__len];
+ __builtin_memcpy(__sav, __old, __len);
+ std::setlocale(LC_NUMERIC, "C");
+ }
+
+ __builtin_va_list __args;
+ __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+ const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+ __builtin_va_end(__args);
+
+ if (__sav)
+ {
+ std::setlocale(LC_NUMERIC, __sav);
+ delete [] __sav;
+ }
+ return __ret;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cpu_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_base.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_base.h
new file mode 100644
index 0000000..15f0063
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
+
+// Support for Solaris 2.5.1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// @brief Base class for ctype.
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+ static const mask alpha = _U | _L;
+ static const mask digit = _N;
+ static const mask xdigit = _X | _N;
+ static const mask space = _S;
+ static const mask print = _P | _U | _L | _N | _B;
+ static const mask graph = _P | _U | _L | _N;
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
+ };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_inline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_inline.h
new file mode 100644
index 0000000..2c88eb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && !this->is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && this->is(__m, *__low) != 0)
+ ++__low;
+ return __low;
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_noninline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_noninline.h
new file mode 100644
index 0000000..55eecd8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/ctype_noninline.h
@@ -0,0 +1,98 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return _ctype_ + 1; }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
+ }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
+ }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cxxabi_tweaks.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..1bfc588
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/cxxabi_tweaks.h
@@ -0,0 +1,81 @@
+// Control various target specific ABI tweaks. ARM version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ * The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ extern "C"
+ {
+#endif
+
+#ifdef __ARM_EABI__
+ // The ARM EABI uses the least significant bit of a 32-bit
+ // guard variable. */
+#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+ typedef int __guard;
+
+ // We also want the element size in array cookies.
+#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
+
+ // __cxa_vec_ctor should return a pointer to the array.
+ typedef void * __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
+ // Constructors and destructors return the "this" pointer.
+ typedef void * __cxa_cdtor_return_type;
+
+#else // __ARM_EABI__
+
+ // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+ __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+ // __cxa_vec_ctor has void return type.
+ typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+ // Constructors and destructors do not return a value.
+ typedef void __cxa_cdtor_return_type;
+
+#endif //!__ARM_EABI__
+
+#ifdef __cplusplus
+ }
+} // namespace __cxxabiv1
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/error_constants.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ enum class errc
+ {
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ bad_message = EBADMSG,
+#endif
+
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+ identifier_removed = EIDRM,
+#endif
+
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ no_link = ENOLINK,
+#endif
+
+ no_lock_available = ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+ no_message_available = ENODATA,
+#endif
+
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+ no_stream_resources = ENOSR,
+#endif
+
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ not_a_stream = ENOSTR,
+#endif
+
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+ not_supported = ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+ operation_canceled = ECANCELED,
+#endif
+
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ owner_dead = EOWNERDEAD,
+#endif
+
+ permission_denied = EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+ protocol_error = EPROTO,
+#endif
+
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ state_not_recoverable = ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+ stream_timeout = ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+ text_file_busy = ETXTBSY,
+#endif
+
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_symbolic_link_levels = ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+ value_too_large = EOVERFLOW,
+#endif
+
+ wrong_protocol_type = EPROTOTYPE
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/extc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/extc++.h
new file mode 100644
index 0000000..f0ccc42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/extc++.h
@@ -0,0 +1,69 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdtr1c++.h>
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-default.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-default.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-default.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-posix.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-posix.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-posix.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-single.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-single.h
new file mode 100644
index 0000000..f2b132a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+ 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling. */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return NULL;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ return;
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ /* No thread support available */
+ /* Should we really exit the program */
+ /* exit (&__objc_thread_exit_status); */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ /* No thread support, use 1. */
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ thread_local_storage = value;
+ return 0;
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+ objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-tpf.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-tpf.h
new file mode 100644
index 0000000..eb619e0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+ Compile this one with gcc.
+ Copyright (C) 2004, 2005, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+ the thread library. However, for performance reasons we still do not
+ want to issue thread api calls unless a check is made to see that we
+ are running as a thread. */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD 00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+ static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_delete) (__key);
+ else
+ return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_getspecific) (__key);
+ else
+ return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_lock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_trylock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_unlock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr.h
new file mode 100644
index 0000000..35d9b7e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+ #define __GTHREADS 1
+ to indicate that threads support is present. Also it has define
+ function
+ int __gthread_active_p ()
+ that returns 1 if thread system is active, 0 if not.
+
+ The threads interface must define the following types:
+ __gthread_key_t
+ __gthread_once_t
+ __gthread_mutex_t
+ __gthread_recursive_mutex_t
+
+ The threads interface must define the following macros:
+
+ __GTHREAD_ONCE_INIT
+ to initialize __gthread_once_t
+ __GTHREAD_MUTEX_INIT
+ to initialize __gthread_mutex_t to get a fast
+ non-recursive mutex.
+ __GTHREAD_MUTEX_INIT_FUNCTION
+ some systems can't initialize a mutex without a
+ function call. On such systems, define this to a
+ function which looks like this:
+ void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+ Don't define __GTHREAD_MUTEX_INIT in this case
+ __GTHREAD_RECURSIVE_MUTEX_INIT
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+ as above, but for a recursive mutex.
+
+ The threads interface must define the following static functions:
+
+ int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+ int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+ int __gthread_key_delete (__gthread_key_t key)
+
+ void *__gthread_getspecific (__gthread_key_t key)
+ int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+ int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+ int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+ int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+ The following are supported in POSIX threads only. They are required to
+ fix a deadlock in static initialization inside libsupc++. The header file
+ gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+ features are supported.
+
+ Types:
+ __gthread_cond_t
+
+ Macros:
+ __GTHREAD_COND_INIT
+ __GTHREAD_COND_INIT_FUNCTION
+
+ Interface:
+ int __gthread_cond_broadcast (__gthread_cond_t *cond);
+ int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+ int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex);
+
+ All functions returning int should return zero on success or the error
+ number. If the operation is not supported, -1 is returned.
+
+ If the following are also defined, you should
+ #define __GTHREADS_CXX0X 1
+ to enable the c++0x thread library.
+
+ Types:
+ __gthread_t
+ __gthread_time_t
+
+ Interface:
+ int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+ void *args);
+ int __gthread_join (__gthread_t thread, void **value_ptr);
+ int __gthread_detach (__gthread_t thread);
+ int __gthread_equal (__gthread_t t1, __gthread_t t2);
+ __gthread_t __gthread_self (void);
+ int __gthread_yield (void);
+
+ int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+ const __gthread_time_t *abs_time);
+
+ int __gthread_cond_signal (__gthread_cond_t *cond);
+ int __gthread_cond_timedwait (__gthread_cond_t *cond,
+ __gthread_mutex_t *mutex,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex,
+ const __gthread_time_t *abs_time)
+
+ Currently supported threads packages are
+ TPF threads with -D__tpf__
+ POSIX/Unix98 threads with -D_PTHREADS
+ POSIX/Unix95 threads with -D_PTHREADS95
+ DCE threads with -D_DCE_THREADS
+ Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines. */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined. */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions. */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/messages_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/messages_members.h
new file mode 100644
index 0000000..a149950
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/messages_members.h
@@ -0,0 +1,90 @@
+// std::messages implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Non-virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale, const char*, size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char*) const
+ { return this->do_open(__s, __loc); }
+
+ // Virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::~messages()
+ { _S_destroy_c_locale(_M_c_locale_messages); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
+ { return 0; }
+
+ template<typename _CharT>
+ typename messages<_CharT>::string_type
+ messages<_CharT>::do_get(catalog, int, int,
+ const string_type& __dfault) const
+ { return __dfault; }
+
+ template<typename _CharT>
+ void
+ messages<_CharT>::do_close(catalog) const
+ { }
+
+ // messages_byname
+ template<typename _CharT>
+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+ : messages<_CharT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/os_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/os_defines.h
new file mode 100644
index 0000000..832592a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/os_defines.h
@@ -0,0 +1,36 @@
+// Specific definitions for Bionic -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdc++.h
new file mode 100644
index 0000000..5782fa3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdc++.h
@@ -0,0 +1,111 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdatomic>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdtr1c++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/time_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/time_members.h
new file mode 100644
index 0000000..d06faf4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include/bits/time_members.h
@@ -0,0 +1,90 @@
+// std::time_get, std::time_put implementation, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+ }
+ else
+ _M_name_timepunct = _S_get_c_name();
+
+ __try
+ { _M_initialize_timepunct(__cloc); }
+ __catch(...)
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::~__timepunct()
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.a b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.a
new file mode 100644
index 0000000..6e44650
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.a
Binary files differ
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.la b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.la
new file mode 100755
index 0000000..c6a40d7
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libstdc++.la
@@ -0,0 +1,41 @@
+# libstdc++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libstdc++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libstdc++.
+current=6
+age=0
+revision=13
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib/armv7-a'
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/atomic_word.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/basic_file.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/basic_file.h
new file mode 100644
index 0000000..eedb73b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8 File-based streams
+//
+
+/** @file basic_file.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h> // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Generic declaration.
+ template<typename _CharT>
+ class __basic_file;
+
+ // Specialization.
+ template<>
+ class __basic_file<char>
+ {
+ // Underlying data source/sink.
+ __c_file* _M_cfile;
+
+ // True iff we opened _M_cfile, and thus must close it ourselves.
+ bool _M_cfile_created;
+
+ public:
+ __basic_file(__c_lock* __lock = 0);
+
+ __basic_file*
+ open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+ __basic_file*
+ sys_open(__c_file* __file, ios_base::openmode);
+
+ __basic_file*
+ sys_open(int __fd, ios_base::openmode __mode);
+
+ __basic_file*
+ close();
+
+ bool
+ is_open() const;
+
+ int
+ fd();
+
+ __c_file*
+ file();
+
+ ~__basic_file();
+
+ streamsize
+ xsputn(const char* __s, streamsize __n);
+
+ streamsize
+ xsputn_2(const char* __s1, streamsize __n1,
+ const char* __s2, streamsize __n2);
+
+ streamsize
+ xsgetn(char* __s, streamsize __n);
+
+ streamoff
+ seekoff(streamoff __off, ios_base::seekdir __way);
+
+ int
+ sync();
+
+ streamsize
+ showmanyc();
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++allocator.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator __gnu_cxx::new_allocator
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++config.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++config.h
new file mode 100644
index 0000000..855d69c
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++config.h
@@ -0,0 +1,1431 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20100121
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+# define _GLIBCXX_VISIBILITY_ATTR(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+ namespace std
+ {
+ namespace __debug { }
+ namespace __parallel { }
+ namespace __norm { } // __normative, __shadow, __replaced
+ namespace __cxx1998 { }
+
+ namespace tr1 { }
+ }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD _6
+# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+// debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+# warning currently using namespace associated mode which may fail \
+ without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+namespace std
+{
+ namespace __norm { }
+ inline namespace __debug { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{
+ namespace __norm { }
+ inline namespace __parallel { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+ inline namespace _6 { }
+}
+
+namespace __gnu_cxx
+{
+ inline namespace _6 { }
+}
+
+namespace std
+{
+ namespace tr1
+ {
+ inline namespace _6 { }
+ }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+namespace std
+{
+ inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro. For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+ // Avoid the use of assert, because we're trying to keep the <cassert>
+ // include out of the mix.
+ inline void
+ __replacement_assert(const char* __file, int __line,
+ const char* __function, const char* __condition)
+ {
+ __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+ __function, __condition);
+ __builtin_abort();
+ }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition) \
+ do \
+ { \
+ if (! (_Condition)) \
+ std::__replacement_assert(__FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, #_Condition); \
+ } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation. It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc. We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid) (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+// End of prewritten config; the discovered settings follow.
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+/* #undef _GLIBCXX_HAVE_ACOSL */
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+/* #undef _GLIBCXX_HAVE_ASINL */
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+/* #undef _GLIBCXX_HAVE_ATAN2L */
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+/* #undef _GLIBCXX_HAVE_ATANL */
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+/* #undef _GLIBCXX_HAVE_COMPLEX_H */
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+/* #undef _GLIBCXX_HAVE_COSHL */
+
+/* Define to 1 if you have the `cosl' function. */
+/* #undef _GLIBCXX_HAVE_COSL */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+/* #undef _GLIBCXX_HAVE_EXPL */
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+/* #undef _GLIBCXX_HAVE_FINITEL */
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+/* #undef _GLIBCXX_HAVE_FMODL */
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+/* #undef _GLIBCXX_HAVE_FREXPL */
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+ enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+/* #undef _GLIBCXX_HAVE_HYPOTL */
+
+/* Define if you have the iconv() function. */
+/* #undef _GLIBCXX_HAVE_ICONV */
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+/* #undef _GLIBCXX_HAVE_ISINF */
+
+/* Define to 1 if you have the `isinff' function. */
+/* #undef _GLIBCXX_HAVE_ISINFF */
+
+/* Define to 1 if you have the `isinfl' function. */
+/* #undef _GLIBCXX_HAVE_ISINFL */
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+/* #undef _GLIBCXX_HAVE_ISNANL */
+
+/* Defined if iswblank exists. */
+/* #undef _GLIBCXX_HAVE_ISWBLANK */
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+/* #undef _GLIBCXX_HAVE_LOG10L */
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+/* #undef _GLIBCXX_HAVE_LOGL */
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+/* #undef _GLIBCXX_HAVE_MODFL */
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+/* #undef _GLIBCXX_HAVE_POWL */
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+/* #undef _GLIBCXX_HAVE_SINCOS */
+
+/* Define to 1 if you have the `sincosf' function. */
+/* #undef _GLIBCXX_HAVE_SINCOSF */
+
+/* Define to 1 if you have the `sincosl' function. */
+/* #undef _GLIBCXX_HAVE_SINCOSL */
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+/* #undef _GLIBCXX_HAVE_SINHL */
+
+/* Define to 1 if you have the `sinl' function. */
+/* #undef _GLIBCXX_HAVE_SINL */
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+/* #undef _GLIBCXX_HAVE_SQRTL */
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRERROR_L */
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+/* #undef _GLIBCXX_HAVE_STRTOF */
+
+/* Define to 1 if you have the `strtold' function. */
+/* #undef _GLIBCXX_HAVE_STRTOLD */
+
+/* Define if strxfrm_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRXFRM_L */
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_SEM_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+/* #undef _GLIBCXX_HAVE_TANHL */
+
+/* Define to 1 if you have the `tanl' function. */
+/* #undef _GLIBCXX_HAVE_TANL */
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+/* #undef _GLIBCXX_HAVE_TGMATH_H */
+
+/* Define to 1 if the target supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_TLS */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VFWSCANF */
+
+/* Defined if vswscanf exists. */
+/* #undef _GLIBCXX_HAVE_VSWSCANF */
+
+/* Defined if vwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VWSCANF */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+/* #undef _GLIBCXX_HAVE_WCSTOF */
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+/* #undef _GLIBCXX_ICONV_CONST */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_1 */
+
+/* Define if builtin atomic operations for short are supported on this host.
+ */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_2 */
+
+/* Define if builtin atomic operations for int are supported on this host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_4 */
+
+/* Define if builtin atomic operations for long long are supported on this
+ host. */
+/* #undef _GLIBCXX_ATOMIC_BUILTINS_8 */
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+/* #undef _GLIBCXX_HAS_GTHREADS */
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER */
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU */
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+ <stdio.h>, and <stdlib.h> can be used or exposed. */
+/* #undef _GLIBCXX_USE_C99 */
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+ compiler builtins for these functions requires corresponding C99 library
+ functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX */
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+ Using compiler builtins for these functions requires corresponding C99
+ library functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+ namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+ namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_FENV_TR1 */
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_TR1 */
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 */
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+ in namespace std. */
+/* #undef _GLIBCXX_USE_C99_MATH */
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+ <tr1/cmath> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_MATH_TR1 */
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+ namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_STDINT_TR1 */
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+/* #undef _GLIBCXX_USE_LFS */
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+ of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+/* #undef _GLIBCXX_USE_WCHAR_T */
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++io.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef __gthread_mutex_t __c_lock;
+
+ // for basic_file.h
+ typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++locale.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++locale.h
new file mode 100644
index 0000000..e27a9cd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/c++locale.h
@@ -0,0 +1,91 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8 Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_NUM_CATEGORIES 0
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef int* __c_locale;
+
+ // Convert numeric value of type double and long double to string and
+ // return length of string. If vsnprintf is available use it, otherwise
+ // fall back to the unsafe vsprintf which, in general, can be dangerous
+ // and should be avoided.
+ inline int
+ __convert_from_v(const __c_locale&, char* __out,
+ const int __size __attribute__((__unused__)),
+ const char* __fmt, ...)
+ {
+ char* __old = std::setlocale(LC_NUMERIC, NULL);
+ char* __sav = NULL;
+ if (__old != NULL && __builtin_strcmp(__old, "C"))
+ {
+ const size_t __len = __builtin_strlen(__old) + 1;
+ __sav = new char[__len];
+ __builtin_memcpy(__sav, __old, __len);
+ std::setlocale(LC_NUMERIC, "C");
+ }
+
+ __builtin_va_list __args;
+ __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+ const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+ __builtin_va_end(__args);
+
+ if (__sav)
+ {
+ std::setlocale(LC_NUMERIC, __sav);
+ delete [] __sav;
+ }
+ return __ret;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cpu_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_base.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_base.h
new file mode 100644
index 0000000..15f0063
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
+
+// Support for Solaris 2.5.1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// @brief Base class for ctype.
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+ static const mask alpha = _U | _L;
+ static const mask digit = _N;
+ static const mask xdigit = _X | _N;
+ static const mask space = _S;
+ static const mask print = _P | _U | _L | _N | _B;
+ static const mask graph = _P | _U | _L | _N;
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
+ };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_inline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_inline.h
new file mode 100644
index 0000000..2c88eb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && !this->is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && this->is(__m, *__low) != 0)
+ ++__low;
+ return __low;
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_noninline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_noninline.h
new file mode 100644
index 0000000..55eecd8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/ctype_noninline.h
@@ -0,0 +1,98 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return _ctype_ + 1; }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
+ }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
+ }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cxxabi_tweaks.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..1bfc588
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/cxxabi_tweaks.h
@@ -0,0 +1,81 @@
+// Control various target specific ABI tweaks. ARM version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ * The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ extern "C"
+ {
+#endif
+
+#ifdef __ARM_EABI__
+ // The ARM EABI uses the least significant bit of a 32-bit
+ // guard variable. */
+#define _GLIBCXX_GUARD_TEST(x) ((*(x) & 1) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(x) = 1
+#define _GLIBCXX_GUARD_BIT 1
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+ typedef int __guard;
+
+ // We also want the element size in array cookies.
+#define _GLIBCXX_ELTSIZE_IN_COOKIE 1
+
+ // __cxa_vec_ctor should return a pointer to the array.
+ typedef void * __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x
+ // Constructors and destructors return the "this" pointer.
+ typedef void * __cxa_cdtor_return_type;
+
+#else // __ARM_EABI__
+
+ // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+ __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+ // __cxa_vec_ctor has void return type.
+ typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+ // Constructors and destructors do not return a value.
+ typedef void __cxa_cdtor_return_type;
+
+#endif //!__ARM_EABI__
+
+#ifdef __cplusplus
+ }
+} // namespace __cxxabiv1
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/error_constants.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ enum class errc
+ {
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ bad_message = EBADMSG,
+#endif
+
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+ identifier_removed = EIDRM,
+#endif
+
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ no_link = ENOLINK,
+#endif
+
+ no_lock_available = ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+ no_message_available = ENODATA,
+#endif
+
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+ no_stream_resources = ENOSR,
+#endif
+
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ not_a_stream = ENOSTR,
+#endif
+
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+ not_supported = ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+ operation_canceled = ECANCELED,
+#endif
+
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ owner_dead = EOWNERDEAD,
+#endif
+
+ permission_denied = EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+ protocol_error = EPROTO,
+#endif
+
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ state_not_recoverable = ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+ stream_timeout = ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+ text_file_busy = ETXTBSY,
+#endif
+
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_symbolic_link_levels = ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+ value_too_large = EOVERFLOW,
+#endif
+
+ wrong_protocol_type = EPROTOTYPE
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/extc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/extc++.h
new file mode 100644
index 0000000..f0ccc42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/extc++.h
@@ -0,0 +1,69 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdtr1c++.h>
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-default.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-default.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-default.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-posix.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-posix.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-posix.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-single.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-single.h
new file mode 100644
index 0000000..f2b132a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+ 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling. */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return NULL;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ return;
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ /* No thread support available */
+ /* Should we really exit the program */
+ /* exit (&__objc_thread_exit_status); */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ /* No thread support, use 1. */
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ thread_local_storage = value;
+ return 0;
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+ objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-tpf.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-tpf.h
new file mode 100644
index 0000000..eb619e0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+ Compile this one with gcc.
+ Copyright (C) 2004, 2005, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+ the thread library. However, for performance reasons we still do not
+ want to issue thread api calls unless a check is made to see that we
+ are running as a thread. */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD 00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+ static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_delete) (__key);
+ else
+ return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_getspecific) (__key);
+ else
+ return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_lock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_trylock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_unlock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr.h
new file mode 100644
index 0000000..35d9b7e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+ #define __GTHREADS 1
+ to indicate that threads support is present. Also it has define
+ function
+ int __gthread_active_p ()
+ that returns 1 if thread system is active, 0 if not.
+
+ The threads interface must define the following types:
+ __gthread_key_t
+ __gthread_once_t
+ __gthread_mutex_t
+ __gthread_recursive_mutex_t
+
+ The threads interface must define the following macros:
+
+ __GTHREAD_ONCE_INIT
+ to initialize __gthread_once_t
+ __GTHREAD_MUTEX_INIT
+ to initialize __gthread_mutex_t to get a fast
+ non-recursive mutex.
+ __GTHREAD_MUTEX_INIT_FUNCTION
+ some systems can't initialize a mutex without a
+ function call. On such systems, define this to a
+ function which looks like this:
+ void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+ Don't define __GTHREAD_MUTEX_INIT in this case
+ __GTHREAD_RECURSIVE_MUTEX_INIT
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+ as above, but for a recursive mutex.
+
+ The threads interface must define the following static functions:
+
+ int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+ int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+ int __gthread_key_delete (__gthread_key_t key)
+
+ void *__gthread_getspecific (__gthread_key_t key)
+ int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+ int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+ int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+ int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+ The following are supported in POSIX threads only. They are required to
+ fix a deadlock in static initialization inside libsupc++. The header file
+ gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+ features are supported.
+
+ Types:
+ __gthread_cond_t
+
+ Macros:
+ __GTHREAD_COND_INIT
+ __GTHREAD_COND_INIT_FUNCTION
+
+ Interface:
+ int __gthread_cond_broadcast (__gthread_cond_t *cond);
+ int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+ int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex);
+
+ All functions returning int should return zero on success or the error
+ number. If the operation is not supported, -1 is returned.
+
+ If the following are also defined, you should
+ #define __GTHREADS_CXX0X 1
+ to enable the c++0x thread library.
+
+ Types:
+ __gthread_t
+ __gthread_time_t
+
+ Interface:
+ int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+ void *args);
+ int __gthread_join (__gthread_t thread, void **value_ptr);
+ int __gthread_detach (__gthread_t thread);
+ int __gthread_equal (__gthread_t t1, __gthread_t t2);
+ __gthread_t __gthread_self (void);
+ int __gthread_yield (void);
+
+ int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+ const __gthread_time_t *abs_time);
+
+ int __gthread_cond_signal (__gthread_cond_t *cond);
+ int __gthread_cond_timedwait (__gthread_cond_t *cond,
+ __gthread_mutex_t *mutex,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex,
+ const __gthread_time_t *abs_time)
+
+ Currently supported threads packages are
+ TPF threads with -D__tpf__
+ POSIX/Unix98 threads with -D_PTHREADS
+ POSIX/Unix95 threads with -D_PTHREADS95
+ DCE threads with -D_DCE_THREADS
+ Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines. */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined. */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions. */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/messages_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/messages_members.h
new file mode 100644
index 0000000..a149950
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/messages_members.h
@@ -0,0 +1,90 @@
+// std::messages implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Non-virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale, const char*, size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char*) const
+ { return this->do_open(__s, __loc); }
+
+ // Virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::~messages()
+ { _S_destroy_c_locale(_M_c_locale_messages); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
+ { return 0; }
+
+ template<typename _CharT>
+ typename messages<_CharT>::string_type
+ messages<_CharT>::do_get(catalog, int, int,
+ const string_type& __dfault) const
+ { return __dfault; }
+
+ template<typename _CharT>
+ void
+ messages<_CharT>::do_close(catalog) const
+ { }
+
+ // messages_byname
+ template<typename _CharT>
+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+ : messages<_CharT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/os_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/os_defines.h
new file mode 100644
index 0000000..832592a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/os_defines.h
@@ -0,0 +1,36 @@
+// Specific definitions for Bionic -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdc++.h
new file mode 100644
index 0000000..5782fa3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdc++.h
@@ -0,0 +1,111 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdatomic>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdtr1c++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/time_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/time_members.h
new file mode 100644
index 0000000..d06faf4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include/bits/time_members.h
@@ -0,0 +1,90 @@
+// std::time_get, std::time_put implementation, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+ }
+ else
+ _M_name_timepunct = _S_get_c_name();
+
+ __try
+ { _M_initialize_timepunct(__cloc); }
+ __catch(...)
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::~__timepunct()
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a
new file mode 100644
index 0000000..c2948cc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.a
Binary files differ
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.la b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.la
new file mode 100755
index 0000000..7f64478
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/armeabi/libstdc++.la
@@ -0,0 +1,41 @@
+# libstdc++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libstdc++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libstdc++.
+current=6
+age=0
+revision=13
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/tmp/ndk-digit/build/install/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi/lib/thumb'
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/atomic_word.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/atomic_word.h
new file mode 100644
index 0000000..f2bdbbc
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/atomic_word.h
@@ -0,0 +1,47 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file atomic_word.h
+ * This file is a GNU extension to the Standard C++ Library.
+ */
+
+#ifndef _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef int _Atomic_word;
+
+// Define these two macros using the appropriate memory barrier for the target.
+// The commented out versions below are the defaults.
+// See ia64/atomic_word.h for an alternative approach.
+
+// This one prevents loads from being hoisted across the barrier;
+// in other words, this is a Load-Load acquire barrier.
+// This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h.
+// #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory")
+
+// This one prevents stores from being sunk across the barrier; in other
+// words, a Store-Store release barrier.
+// #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory")
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/basic_file.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/basic_file.h
new file mode 100644
index 0000000..eedb73b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/basic_file.h
@@ -0,0 +1,108 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 27.8 File-based streams
+//
+
+/** @file basic_file.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_BASIC_FILE_STDIO_H
+#define _GLIBCXX_BASIC_FILE_STDIO_H 1
+
+#pragma GCC system_header
+
+#include <bits/c++config.h>
+#include <bits/c++io.h> // for __c_lock and __c_file
+#include <ios>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Generic declaration.
+ template<typename _CharT>
+ class __basic_file;
+
+ // Specialization.
+ template<>
+ class __basic_file<char>
+ {
+ // Underlying data source/sink.
+ __c_file* _M_cfile;
+
+ // True iff we opened _M_cfile, and thus must close it ourselves.
+ bool _M_cfile_created;
+
+ public:
+ __basic_file(__c_lock* __lock = 0);
+
+ __basic_file*
+ open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+ __basic_file*
+ sys_open(__c_file* __file, ios_base::openmode);
+
+ __basic_file*
+ sys_open(int __fd, ios_base::openmode __mode);
+
+ __basic_file*
+ close();
+
+ bool
+ is_open() const;
+
+ int
+ fd();
+
+ __c_file*
+ file();
+
+ ~__basic_file();
+
+ streamsize
+ xsputn(const char* __s, streamsize __n);
+
+ streamsize
+ xsputn_2(const char* __s1, streamsize __n1,
+ const char* __s2, streamsize __n2);
+
+ streamsize
+ xsgetn(char* __s, streamsize __n);
+
+ streamoff
+ seekoff(streamoff __off, ios_base::seekdir __way);
+
+ int
+ sync();
+
+ streamsize
+ showmanyc();
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++allocator.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++allocator.h
new file mode 100644
index 0000000..c33a124
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++allocator.h
@@ -0,0 +1,37 @@
+// Base to std::allocator -*- C++ -*-
+
+// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++allocator.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_ALLOCATOR_H
+#define _GLIBCXX_CXX_ALLOCATOR_H 1
+
+// Define new_allocator as the base class to std::allocator.
+#include <ext/new_allocator.h>
+#define __glibcxx_base_allocator __gnu_cxx::new_allocator
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++config.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++config.h
new file mode 100644
index 0000000..a40709f
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++config.h
@@ -0,0 +1,1431 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++config.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CXX_CONFIG_H
+#define _GLIBCXX_CXX_CONFIG_H 1
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCXX__ 20100121
+
+// Macros for visibility.
+// _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+// _GLIBCXX_VISIBILITY_ATTR
+# define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1
+
+#if _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY
+# define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V)))
+#else
+# define _GLIBCXX_VISIBILITY_ATTR(V)
+#endif
+
+// Macros for deprecated.
+// _GLIBCXX_DEPRECATED
+// _GLIBCXX_DEPRECATED_ATTR
+#ifndef _GLIBCXX_DEPRECATED
+# define _GLIBCXX_DEPRECATED 1
+#endif
+
+#if defined(__DEPRECATED) && defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define _GLIBCXX_DEPRECATED_ATTR __attribute__ ((__deprecated__))
+#else
+# define _GLIBCXX_DEPRECATED_ATTR
+#endif
+
+// Macros for activating various namespace association modes.
+// _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+// _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+// _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+
+// Guide to libstdc++ namespaces.
+/*
+ namespace std
+ {
+ namespace __debug { }
+ namespace __parallel { }
+ namespace __norm { } // __normative, __shadow, __replaced
+ namespace __cxx1998 { }
+
+ namespace tr1 { }
+ }
+*/
+#if __cplusplus
+
+#ifdef _GLIBCXX_DEBUG
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG 1
+#endif
+
+#ifdef _GLIBCXX_PARALLEL
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL 1
+#endif
+
+# define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0
+
+// Defined if any namespace association modes are active.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL \
+ || _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+# define _GLIBCXX_USE_NAMESPACE_ASSOCIATION 1
+#endif
+
+// Macros for namespace scope. Either namespace std:: or the name
+// of some nested namespace within it.
+// _GLIBCXX_STD
+// _GLIBCXX_STD_D
+// _GLIBCXX_STD_P
+//
+// Macros for enclosing namespaces and possibly nested namespaces.
+// _GLIBCXX_BEGIN_NAMESPACE
+// _GLIBCXX_END_NAMESPACE
+// _GLIBCXX_BEGIN_NESTED_NAMESPACE
+// _GLIBCXX_END_NESTED_NAMESPACE
+#ifndef _GLIBCXX_USE_NAMESPACE_ASSOCIATION
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD std
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+#else
+
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION // && not anything else
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD _6
+# define _GLIBCXX_BEGIN_NAMESPACE(X) _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, _6)
+# define _GLIBCXX_END_NAMESPACE _GLIBCXX_END_NESTED_NAMESPACE
+# endif
+
+// debug
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG && !_GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P _GLIBCXX_STD
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && !_GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D _GLIBCXX_STD
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+// debug + parallel
+# if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL && _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+# define _GLIBCXX_STD_D __norm
+# define _GLIBCXX_STD_P __norm
+# define _GLIBCXX_STD __cxx1998
+# define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NAMESPACE }
+# define _GLIBCXX_EXTERN_TEMPLATE -1
+# endif
+
+# if __NO_INLINE__ && !__GXX_WEAK__
+# warning currently using namespace associated mode which may fail \
+ without inlining due to lack of weak symbols
+# endif
+
+# define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X, Y) namespace X { namespace Y _GLIBCXX_VISIBILITY_ATTR(default) {
+# define _GLIBCXX_END_NESTED_NAMESPACE } }
+#endif
+
+// Namespace associations for debug mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_DEBUG
+namespace std
+{
+ namespace __norm { }
+ inline namespace __debug { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for parallel mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_PARALLEL
+namespace std
+{
+ namespace __norm { }
+ inline namespace __parallel { }
+ inline namespace __cxx1998 { }
+}
+#endif
+
+// Namespace associations for versioning mode.
+#if _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION
+namespace std
+{
+ inline namespace _6 { }
+}
+
+namespace __gnu_cxx
+{
+ inline namespace _6 { }
+}
+
+namespace std
+{
+ namespace tr1
+ {
+ inline namespace _6 { }
+ }
+}
+#endif
+
+// XXX GLIBCXX_ABI Deprecated
+// Define if compatibility should be provided for -mlong-double-64
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+namespace std
+{
+ inline namespace __gnu_cxx_ldbl128 { }
+}
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
+
+// Defines for C compatibility. In particular, define extern "C"
+// linkage only when using C++.
+# define _GLIBCXX_BEGIN_EXTERN_C extern "C" {
+# define _GLIBCXX_END_EXTERN_C }
+
+#else // !__cplusplus
+# undef _GLIBCXX_BEGIN_NAMESPACE
+# undef _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_NAMESPACE(X)
+# define _GLIBCXX_END_NAMESPACE
+# define _GLIBCXX_BEGIN_EXTERN_C
+# define _GLIBCXX_END_EXTERN_C
+#endif
+
+// First includes.
+
+// Pick up any OS-specific definitions.
+#include <bits/os_defines.h>
+
+// Pick up any CPU-specific definitions.
+#include <bits/cpu_defines.h>
+
+// Allow use of "export template." This is currently not a feature
+// that g++ supports.
+// #define _GLIBCXX_EXPORT_TEMPLATE 1
+
+// Allow use of the GNU syntax extension, "extern template." This
+// extension is fully documented in the g++ manual, but in a nutshell,
+// it inhibits all implicit instantiations and is used throughout the
+// library to avoid multiple weak definitions for required types that
+// are already explicitly instantiated in the library binary. This
+// substantially reduces the binary size of resulting executables.
+#ifndef _GLIBCXX_EXTERN_TEMPLATE
+# define _GLIBCXX_EXTERN_TEMPLATE 1
+#endif
+
+// Certain function definitions that are meant to be overridable from
+// user code are decorated with this macro. For some targets, this
+// macro causes these definitions to be weak.
+#ifndef _GLIBCXX_WEAK_DEFINITION
+# define _GLIBCXX_WEAK_DEFINITION
+#endif
+
+// Assert.
+// Avoid the use of assert, because we're trying to keep the <cassert>
+// include out of the mix.
+#if !defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_PARALLEL)
+#define __glibcxx_assert(_Condition)
+#else
+_GLIBCXX_BEGIN_NAMESPACE(std)
+ // Avoid the use of assert, because we're trying to keep the <cassert>
+ // include out of the mix.
+ inline void
+ __replacement_assert(const char* __file, int __line,
+ const char* __function, const char* __condition)
+ {
+ __builtin_printf("%s:%d: %s: Assertion '%s' failed.\n", __file, __line,
+ __function, __condition);
+ __builtin_abort();
+ }
+_GLIBCXX_END_NAMESPACE
+
+#define __glibcxx_assert(_Condition) \
+ do \
+ { \
+ if (! (_Condition)) \
+ std::__replacement_assert(__FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, #_Condition); \
+ } while (false)
+#endif
+
+// The remainder of the prewritten config is automatic; all the
+// user hooks are listed above.
+
+// Create a boolean flag to be used to determine if --fast-math is set.
+#ifdef __FAST_MATH__
+# define _GLIBCXX_FAST_MATH 1
+#else
+# define _GLIBCXX_FAST_MATH 0
+#endif
+
+// This marks string literals in header files to be extracted for eventual
+// translation. It is primarily used for messages in thrown exceptions; see
+// src/functexcept.cc. We use __N because the more traditional _N is used
+// for something else under certain OSes (see BADNAMES).
+#define __N(msgid) (msgid)
+
+// For example, <windows.h> is known to #define min and max as macros...
+#undef min
+#undef max
+
+// End of prewritten config; the discovered settings follow.
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if you have the `acosf' function. */
+#define _GLIBCXX_HAVE_ACOSF 1
+
+/* Define to 1 if you have the `acosl' function. */
+/* #undef _GLIBCXX_HAVE_ACOSL */
+
+/* Define to 1 if you have the `asinf' function. */
+#define _GLIBCXX_HAVE_ASINF 1
+
+/* Define to 1 if you have the `asinl' function. */
+/* #undef _GLIBCXX_HAVE_ASINL */
+
+/* Define to 1 if the target assembler supports .symver directive. */
+#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1
+
+/* Define to 1 if you have the `atan2f' function. */
+#define _GLIBCXX_HAVE_ATAN2F 1
+
+/* Define to 1 if you have the `atan2l' function. */
+/* #undef _GLIBCXX_HAVE_ATAN2L */
+
+/* Define to 1 if you have the `atanf' function. */
+#define _GLIBCXX_HAVE_ATANF 1
+
+/* Define to 1 if you have the `atanl' function. */
+/* #undef _GLIBCXX_HAVE_ATANL */
+
+/* Define to 1 if the target assembler supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_CC_TLS */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define _GLIBCXX_HAVE_CEILF 1
+
+/* Define to 1 if you have the `ceill' function. */
+#define _GLIBCXX_HAVE_CEILL 1
+
+/* Define to 1 if you have the <complex.h> header file. */
+/* #undef _GLIBCXX_HAVE_COMPLEX_H */
+
+/* Define to 1 if you have the `cosf' function. */
+#define _GLIBCXX_HAVE_COSF 1
+
+/* Define to 1 if you have the `coshf' function. */
+#define _GLIBCXX_HAVE_COSHF 1
+
+/* Define to 1 if you have the `coshl' function. */
+/* #undef _GLIBCXX_HAVE_COSHL */
+
+/* Define to 1 if you have the `cosl' function. */
+/* #undef _GLIBCXX_HAVE_COSL */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define _GLIBCXX_HAVE_DLFCN_H 1
+
+/* Define if EBADMSG exists. */
+#define _GLIBCXX_HAVE_EBADMSG 1
+
+/* Define if ECANCELED exists. */
+#define _GLIBCXX_HAVE_ECANCELED 1
+
+/* Define if EIDRM exists. */
+#define _GLIBCXX_HAVE_EIDRM 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define _GLIBCXX_HAVE_ENDIAN_H 1
+
+/* Define if ENODATA exists. */
+#define _GLIBCXX_HAVE_ENODATA 1
+
+/* Define if ENOLINK exists. */
+#define _GLIBCXX_HAVE_ENOLINK 1
+
+/* Define if ENOSR exists. */
+#define _GLIBCXX_HAVE_ENOSR 1
+
+/* Define if ENOSTR exists. */
+#define _GLIBCXX_HAVE_ENOSTR 1
+
+/* Define if ENOTRECOVERABLE exists. */
+#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1
+
+/* Define if ENOTSUP exists. */
+#define _GLIBCXX_HAVE_ENOTSUP 1
+
+/* Define if EOVERFLOW exists. */
+#define _GLIBCXX_HAVE_EOVERFLOW 1
+
+/* Define if EOWNERDEAD exists. */
+#define _GLIBCXX_HAVE_EOWNERDEAD 1
+
+/* Define if EPROTO exists. */
+#define _GLIBCXX_HAVE_EPROTO 1
+
+/* Define if ETIME exists. */
+#define _GLIBCXX_HAVE_ETIME 1
+
+/* Define if ETXTBSY exists. */
+#define _GLIBCXX_HAVE_ETXTBSY 1
+
+/* Define to 1 if you have the `expf' function. */
+#define _GLIBCXX_HAVE_EXPF 1
+
+/* Define to 1 if you have the `expl' function. */
+/* #undef _GLIBCXX_HAVE_EXPL */
+
+/* Define to 1 if you have the `fabsf' function. */
+#define _GLIBCXX_HAVE_FABSF 1
+
+/* Define to 1 if you have the `fabsl' function. */
+#define _GLIBCXX_HAVE_FABSL 1
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define _GLIBCXX_HAVE_FENV_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define _GLIBCXX_HAVE_FINITE 1
+
+/* Define to 1 if you have the `finitef' function. */
+#define _GLIBCXX_HAVE_FINITEF 1
+
+/* Define to 1 if you have the `finitel' function. */
+/* #undef _GLIBCXX_HAVE_FINITEL */
+
+/* Define to 1 if you have the <float.h> header file. */
+#define _GLIBCXX_HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `floorf' function. */
+#define _GLIBCXX_HAVE_FLOORF 1
+
+/* Define to 1 if you have the `floorl' function. */
+#define _GLIBCXX_HAVE_FLOORL 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define _GLIBCXX_HAVE_FMODF 1
+
+/* Define to 1 if you have the `fmodl' function. */
+/* #undef _GLIBCXX_HAVE_FMODL */
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef _GLIBCXX_HAVE_FPCLASS */
+
+/* Define to 1 if you have the <fp.h> header file. */
+/* #undef _GLIBCXX_HAVE_FP_H */
+
+/* Define to 1 if you have the `frexpf' function. */
+#define _GLIBCXX_HAVE_FREXPF 1
+
+/* Define to 1 if you have the `frexpl' function. */
+/* #undef _GLIBCXX_HAVE_FREXPL */
+
+/* Define if _Unwind_GetIPInfo is available. */
+#define _GLIBCXX_HAVE_GETIPINFO 1
+
+/* Define if gthr-default.h exists (meaning that threading support is
+ enabled). */
+#define _GLIBCXX_HAVE_GTHR_DEFAULT 1
+
+/* Define to 1 if you have the `hypot' function. */
+#define _GLIBCXX_HAVE_HYPOT 1
+
+/* Define to 1 if you have the `hypotf' function. */
+#define _GLIBCXX_HAVE_HYPOTF 1
+
+/* Define to 1 if you have the `hypotl' function. */
+/* #undef _GLIBCXX_HAVE_HYPOTL */
+
+/* Define if you have the iconv() function. */
+/* #undef _GLIBCXX_HAVE_ICONV */
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef _GLIBCXX_HAVE_IEEEFP_H */
+
+/* Define if int64_t is available in <stdint.h>. */
+#define _GLIBCXX_HAVE_INT64_T 1
+
+/* Define if int64_t is a long. */
+/* #undef _GLIBCXX_HAVE_INT64_T_LONG */
+
+/* Define if int64_t is a long long. */
+#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define _GLIBCXX_HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isinf' function. */
+/* #undef _GLIBCXX_HAVE_ISINF */
+
+/* Define to 1 if you have the `isinff' function. */
+/* #undef _GLIBCXX_HAVE_ISINFF */
+
+/* Define to 1 if you have the `isinfl' function. */
+/* #undef _GLIBCXX_HAVE_ISINFL */
+
+/* Define to 1 if you have the `isnan' function. */
+#define _GLIBCXX_HAVE_ISNAN 1
+
+/* Define to 1 if you have the `isnanf' function. */
+#define _GLIBCXX_HAVE_ISNANF 1
+
+/* Define to 1 if you have the `isnanl' function. */
+/* #undef _GLIBCXX_HAVE_ISNANL */
+
+/* Defined if iswblank exists. */
+/* #undef _GLIBCXX_HAVE_ISWBLANK */
+
+/* Define if LC_MESSAGES is available in <locale.h>. */
+#define _GLIBCXX_HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the `ldexpf' function. */
+#define _GLIBCXX_HAVE_LDEXPF 1
+
+/* Define to 1 if you have the `ldexpl' function. */
+#define _GLIBCXX_HAVE_LDEXPL 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+/* #undef _GLIBCXX_HAVE_LIBINTL_H */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_AS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_DATA */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_FSIZE */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_RSS */
+
+/* Only used in build directory testsuite_hooks.h. */
+/* #undef _GLIBCXX_HAVE_LIMIT_VMEM */
+
+/* Define if futex syscall is available. */
+/* #undef _GLIBCXX_HAVE_LINUX_FUTEX */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define _GLIBCXX_HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `log10f' function. */
+#define _GLIBCXX_HAVE_LOG10F 1
+
+/* Define to 1 if you have the `log10l' function. */
+/* #undef _GLIBCXX_HAVE_LOG10L */
+
+/* Define to 1 if you have the `logf' function. */
+#define _GLIBCXX_HAVE_LOGF 1
+
+/* Define to 1 if you have the `logl' function. */
+/* #undef _GLIBCXX_HAVE_LOGL */
+
+/* Define to 1 if you have the <machine/endian.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */
+
+/* Define to 1 if you have the <machine/param.h> header file. */
+/* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */
+
+/* Define if mbstate_t exists in wchar.h. */
+#define _GLIBCXX_HAVE_MBSTATE_T 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define _GLIBCXX_HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `modf' function. */
+#define _GLIBCXX_HAVE_MODF 1
+
+/* Define to 1 if you have the `modff' function. */
+#define _GLIBCXX_HAVE_MODFF 1
+
+/* Define to 1 if you have the `modfl' function. */
+/* #undef _GLIBCXX_HAVE_MODFL */
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef _GLIBCXX_HAVE_NAN_H */
+
+/* Define if poll is available in <poll.h>. */
+#define _GLIBCXX_HAVE_POLL 1
+
+/* Define to 1 if you have the `powf' function. */
+#define _GLIBCXX_HAVE_POWF 1
+
+/* Define to 1 if you have the `powl' function. */
+/* #undef _GLIBCXX_HAVE_POWL */
+
+/* Define to 1 if you have the `qfpclass' function. */
+/* #undef _GLIBCXX_HAVE_QFPCLASS */
+
+/* Define to 1 if you have the `setenv' function. */
+/* #undef _GLIBCXX_HAVE_SETENV */
+
+/* Define to 1 if you have the `sincos' function. */
+#define _GLIBCXX_HAVE_SINCOS 1
+
+/* Define to 1 if you have the `sincosf' function. */
+#define _GLIBCXX_HAVE_SINCOSF 1
+
+/* Define to 1 if you have the `sincosl' function. */
+#define _GLIBCXX_HAVE_SINCOSL 1
+
+/* Define to 1 if you have the `sinf' function. */
+#define _GLIBCXX_HAVE_SINF 1
+
+/* Define to 1 if you have the `sinhf' function. */
+#define _GLIBCXX_HAVE_SINHF 1
+
+/* Define to 1 if you have the `sinhl' function. */
+/* #undef _GLIBCXX_HAVE_SINHL */
+
+/* Define to 1 if you have the `sinl' function. */
+/* #undef _GLIBCXX_HAVE_SINL */
+
+/* Define to 1 if you have the `sqrtf' function. */
+#define _GLIBCXX_HAVE_SQRTF 1
+
+/* Define to 1 if you have the `sqrtl' function. */
+/* #undef _GLIBCXX_HAVE_SQRTL */
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define _GLIBCXX_HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define _GLIBCXX_HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define _GLIBCXX_HAVE_STDLIB_H 1
+
+/* Define if strerror_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRERROR_L */
+
+/* Define if strerror_r is available in <string.h>. */
+#define _GLIBCXX_HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define _GLIBCXX_HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define _GLIBCXX_HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtof' function. */
+/* #undef _GLIBCXX_HAVE_STRTOF */
+
+/* Define to 1 if you have the `strtold' function. */
+/* #undef _GLIBCXX_HAVE_STRTOLD */
+
+/* Define if strxfrm_l is available in <string.h>. */
+/* #undef _GLIBCXX_HAVE_STRXFRM_L */
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#define _GLIBCXX_HAVE_SYS_IPC_H 1
+
+/* Define to 1 if you have the <sys/isa_defs.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */
+
+/* Define to 1 if you have the <sys/machine.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define _GLIBCXX_HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/sem.h> header file. */
+/* #undef _GLIBCXX_HAVE_SYS_SEM_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define _GLIBCXX_HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define _GLIBCXX_HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define _GLIBCXX_HAVE_SYS_UIO_H 1
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+/* #undef _GLIBCXX_HAVE_S_IFREG */
+
+/* Define if S_IFREG is available in <sys/stat.h>. */
+#define _GLIBCXX_HAVE_S_ISREG 1
+
+/* Define to 1 if you have the `tanf' function. */
+#define _GLIBCXX_HAVE_TANF 1
+
+/* Define to 1 if you have the `tanhf' function. */
+#define _GLIBCXX_HAVE_TANHF 1
+
+/* Define to 1 if you have the `tanhl' function. */
+/* #undef _GLIBCXX_HAVE_TANHL */
+
+/* Define to 1 if you have the `tanl' function. */
+/* #undef _GLIBCXX_HAVE_TANL */
+
+/* Define to 1 if you have the <tgmath.h> header file. */
+/* #undef _GLIBCXX_HAVE_TGMATH_H */
+
+/* Define to 1 if the target supports thread-local storage. */
+/* #undef _GLIBCXX_HAVE_TLS */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define _GLIBCXX_HAVE_UNISTD_H 1
+
+/* Defined if vfwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VFWSCANF */
+
+/* Defined if vswscanf exists. */
+/* #undef _GLIBCXX_HAVE_VSWSCANF */
+
+/* Defined if vwscanf exists. */
+/* #undef _GLIBCXX_HAVE_VWSCANF */
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define _GLIBCXX_HAVE_WCHAR_H 1
+
+/* Defined if wcstof exists. */
+/* #undef _GLIBCXX_HAVE_WCSTOF */
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define _GLIBCXX_HAVE_WCTYPE_H 1
+
+/* Define if writev is available in <sys/uio.h>. */
+#define _GLIBCXX_HAVE_WRITEV 1
+
+/* Define to 1 if you have the `_acosf' function. */
+/* #undef _GLIBCXX_HAVE__ACOSF */
+
+/* Define to 1 if you have the `_acosl' function. */
+/* #undef _GLIBCXX_HAVE__ACOSL */
+
+/* Define to 1 if you have the `_asinf' function. */
+/* #undef _GLIBCXX_HAVE__ASINF */
+
+/* Define to 1 if you have the `_asinl' function. */
+/* #undef _GLIBCXX_HAVE__ASINL */
+
+/* Define to 1 if you have the `_atan2f' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2F */
+
+/* Define to 1 if you have the `_atan2l' function. */
+/* #undef _GLIBCXX_HAVE__ATAN2L */
+
+/* Define to 1 if you have the `_atanf' function. */
+/* #undef _GLIBCXX_HAVE__ATANF */
+
+/* Define to 1 if you have the `_atanl' function. */
+/* #undef _GLIBCXX_HAVE__ATANL */
+
+/* Define to 1 if you have the `_ceilf' function. */
+/* #undef _GLIBCXX_HAVE__CEILF */
+
+/* Define to 1 if you have the `_ceill' function. */
+/* #undef _GLIBCXX_HAVE__CEILL */
+
+/* Define to 1 if you have the `_cosf' function. */
+/* #undef _GLIBCXX_HAVE__COSF */
+
+/* Define to 1 if you have the `_coshf' function. */
+/* #undef _GLIBCXX_HAVE__COSHF */
+
+/* Define to 1 if you have the `_coshl' function. */
+/* #undef _GLIBCXX_HAVE__COSHL */
+
+/* Define to 1 if you have the `_cosl' function. */
+/* #undef _GLIBCXX_HAVE__COSL */
+
+/* Define to 1 if you have the `_expf' function. */
+/* #undef _GLIBCXX_HAVE__EXPF */
+
+/* Define to 1 if you have the `_expl' function. */
+/* #undef _GLIBCXX_HAVE__EXPL */
+
+/* Define to 1 if you have the `_fabsf' function. */
+/* #undef _GLIBCXX_HAVE__FABSF */
+
+/* Define to 1 if you have the `_fabsl' function. */
+/* #undef _GLIBCXX_HAVE__FABSL */
+
+/* Define to 1 if you have the `_finite' function. */
+/* #undef _GLIBCXX_HAVE__FINITE */
+
+/* Define to 1 if you have the `_finitef' function. */
+/* #undef _GLIBCXX_HAVE__FINITEF */
+
+/* Define to 1 if you have the `_finitel' function. */
+/* #undef _GLIBCXX_HAVE__FINITEL */
+
+/* Define to 1 if you have the `_floorf' function. */
+/* #undef _GLIBCXX_HAVE__FLOORF */
+
+/* Define to 1 if you have the `_floorl' function. */
+/* #undef _GLIBCXX_HAVE__FLOORL */
+
+/* Define to 1 if you have the `_fmodf' function. */
+/* #undef _GLIBCXX_HAVE__FMODF */
+
+/* Define to 1 if you have the `_fmodl' function. */
+/* #undef _GLIBCXX_HAVE__FMODL */
+
+/* Define to 1 if you have the `_fpclass' function. */
+/* #undef _GLIBCXX_HAVE__FPCLASS */
+
+/* Define to 1 if you have the `_frexpf' function. */
+/* #undef _GLIBCXX_HAVE__FREXPF */
+
+/* Define to 1 if you have the `_frexpl' function. */
+/* #undef _GLIBCXX_HAVE__FREXPL */
+
+/* Define to 1 if you have the `_hypot' function. */
+/* #undef _GLIBCXX_HAVE__HYPOT */
+
+/* Define to 1 if you have the `_hypotf' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTF */
+
+/* Define to 1 if you have the `_hypotl' function. */
+/* #undef _GLIBCXX_HAVE__HYPOTL */
+
+/* Define to 1 if you have the `_isinf' function. */
+/* #undef _GLIBCXX_HAVE__ISINF */
+
+/* Define to 1 if you have the `_isinff' function. */
+/* #undef _GLIBCXX_HAVE__ISINFF */
+
+/* Define to 1 if you have the `_isinfl' function. */
+/* #undef _GLIBCXX_HAVE__ISINFL */
+
+/* Define to 1 if you have the `_isnan' function. */
+/* #undef _GLIBCXX_HAVE__ISNAN */
+
+/* Define to 1 if you have the `_isnanf' function. */
+/* #undef _GLIBCXX_HAVE__ISNANF */
+
+/* Define to 1 if you have the `_isnanl' function. */
+/* #undef _GLIBCXX_HAVE__ISNANL */
+
+/* Define to 1 if you have the `_ldexpf' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPF */
+
+/* Define to 1 if you have the `_ldexpl' function. */
+/* #undef _GLIBCXX_HAVE__LDEXPL */
+
+/* Define to 1 if you have the `_log10f' function. */
+/* #undef _GLIBCXX_HAVE__LOG10F */
+
+/* Define to 1 if you have the `_log10l' function. */
+/* #undef _GLIBCXX_HAVE__LOG10L */
+
+/* Define to 1 if you have the `_logf' function. */
+/* #undef _GLIBCXX_HAVE__LOGF */
+
+/* Define to 1 if you have the `_logl' function. */
+/* #undef _GLIBCXX_HAVE__LOGL */
+
+/* Define to 1 if you have the `_modf' function. */
+/* #undef _GLIBCXX_HAVE__MODF */
+
+/* Define to 1 if you have the `_modff' function. */
+/* #undef _GLIBCXX_HAVE__MODFF */
+
+/* Define to 1 if you have the `_modfl' function. */
+/* #undef _GLIBCXX_HAVE__MODFL */
+
+/* Define to 1 if you have the `_powf' function. */
+/* #undef _GLIBCXX_HAVE__POWF */
+
+/* Define to 1 if you have the `_powl' function. */
+/* #undef _GLIBCXX_HAVE__POWL */
+
+/* Define to 1 if you have the `_qfpclass' function. */
+/* #undef _GLIBCXX_HAVE__QFPCLASS */
+
+/* Define to 1 if you have the `_sincos' function. */
+/* #undef _GLIBCXX_HAVE__SINCOS */
+
+/* Define to 1 if you have the `_sincosf' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSF */
+
+/* Define to 1 if you have the `_sincosl' function. */
+/* #undef _GLIBCXX_HAVE__SINCOSL */
+
+/* Define to 1 if you have the `_sinf' function. */
+/* #undef _GLIBCXX_HAVE__SINF */
+
+/* Define to 1 if you have the `_sinhf' function. */
+/* #undef _GLIBCXX_HAVE__SINHF */
+
+/* Define to 1 if you have the `_sinhl' function. */
+/* #undef _GLIBCXX_HAVE__SINHL */
+
+/* Define to 1 if you have the `_sinl' function. */
+/* #undef _GLIBCXX_HAVE__SINL */
+
+/* Define to 1 if you have the `_sqrtf' function. */
+/* #undef _GLIBCXX_HAVE__SQRTF */
+
+/* Define to 1 if you have the `_sqrtl' function. */
+/* #undef _GLIBCXX_HAVE__SQRTL */
+
+/* Define to 1 if you have the `_tanf' function. */
+/* #undef _GLIBCXX_HAVE__TANF */
+
+/* Define to 1 if you have the `_tanhf' function. */
+/* #undef _GLIBCXX_HAVE__TANHF */
+
+/* Define to 1 if you have the `_tanhl' function. */
+/* #undef _GLIBCXX_HAVE__TANHL */
+
+/* Define to 1 if you have the `_tanl' function. */
+/* #undef _GLIBCXX_HAVE__TANL */
+
+/* Define as const if the declaration of iconv() needs const. */
+/* #undef _GLIBCXX_ICONV_CONST */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+/* #undef _GLIBCXX_PACKAGE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define _GLIBCXX_PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define _GLIBCXX_PACKAGE_NAME "package-unused"
+
+/* Define to the full name and version of this package. */
+#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
+
+/* Define to the one symbol short name of this package. */
+#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
+
+/* Define to the version of this package. */
+#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
+
+/* The size of a `char', as computed by sizeof. */
+/* #undef SIZEOF_CHAR */
+
+/* The size of a `int', as computed by sizeof. */
+/* #undef SIZEOF_INT */
+
+/* The size of a `long', as computed by sizeof. */
+/* #undef SIZEOF_LONG */
+
+/* The size of a `short', as computed by sizeof. */
+/* #undef SIZEOF_SHORT */
+
+/* The size of a `void *', as computed by sizeof. */
+/* #undef SIZEOF_VOID_P */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+/* #undef _GLIBCXX_VERSION */
+
+/* Define if builtin atomic operations for bool are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_1 1
+
+/* Define if builtin atomic operations for short are supported on this host.
+ */
+#define _GLIBCXX_ATOMIC_BUILTINS_2 1
+
+/* Define if builtin atomic operations for int are supported on this host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_4 1
+
+/* Define if builtin atomic operations for long long are supported on this
+ host. */
+#define _GLIBCXX_ATOMIC_BUILTINS_8 1
+
+/* Define to use concept checking code from the boost libraries. */
+/* #undef _GLIBCXX_CONCEPT_CHECKS */
+
+/* Define if a fully dynamic basic_string is wanted. */
+/* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */
+
+/* Define if gthreads library is available. */
+/* #undef _GLIBCXX_HAS_GTHREADS */
+
+/* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+#define _GLIBCXX_HOSTED 1
+
+/* Define if compatibility should be provided for -mlong-double-64. */
+
+/* Define if ptrdiff_t is int. */
+#define _GLIBCXX_PTRDIFF_T_IS_INT 1
+
+/* Define if using setrlimit to set resource limits during "make check" */
+/* #undef _GLIBCXX_RES_LIMITS */
+
+/* Define if size_t is unsigned int. */
+#define _GLIBCXX_SIZE_T_IS_UINT 1
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */
+
+/* Define if EOF == -1, SEEK_CUR == 1, SEEK_END == 2. */
+#define _GLIBCXX_STDIO_MACROS 1
+
+/* Define to use symbol versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER */
+
+/* Define to use darwin versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_DARWIN */
+
+/* Define to use GNU versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU */
+
+/* Define to use GNU namespace versioning in the shared library. */
+/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */
+
+/* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>,
+ <stdio.h>, and <stdlib.h> can be used or exposed. */
+/* #undef _GLIBCXX_USE_C99 */
+
+/* Define if C99 functions in <complex.h> should be used in <complex>. Using
+ compiler builtins for these functions requires corresponding C99 library
+ functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX */
+
+/* Define if C99 functions in <complex.h> should be used in <tr1/complex>.
+ Using compiler builtins for these functions requires corresponding C99
+ library functions to be present. */
+/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */
+
+/* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in
+ namespace std::tr1. */
+#define _GLIBCXX_USE_C99_CTYPE_TR1 1
+
+/* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in
+ namespace std::tr1. */
+#define _GLIBCXX_USE_C99_FENV_TR1 1
+
+/* Define if C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_TR1 */
+
+/* Define if wchar_t C99 functions in <inttypes.h> should be imported in
+ <tr1/cinttypes> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 */
+
+/* Define if C99 functions or macros in <math.h> should be imported in <cmath>
+ in namespace std. */
+/* #undef _GLIBCXX_USE_C99_MATH */
+
+/* Define if C99 functions or macros in <math.h> should be imported in
+ <tr1/cmath> in namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_MATH_TR1 */
+
+/* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in
+ namespace std::tr1. */
+/* #undef _GLIBCXX_USE_C99_STDINT_TR1 */
+
+/* Defined if clock_gettime has monotonic clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */
+
+/* Defined if clock_gettime has realtime clock support. */
+/* #undef _GLIBCXX_USE_CLOCK_REALTIME */
+
+/* Defined if gettimeofday is available. */
+#define _GLIBCXX_USE_GETTIMEOFDAY 1
+
+/* Define if LFS support is available. */
+/* #undef _GLIBCXX_USE_LFS */
+
+/* Define if code specialized for long long should be used. */
+#define _GLIBCXX_USE_LONG_LONG 1
+
+/* Defined if nanosleep is available. */
+/* #undef _GLIBCXX_USE_NANOSLEEP */
+
+/* Define if NLS translations are to be used. */
+/* #undef _GLIBCXX_USE_NLS */
+
+/* Define if /dev/random and /dev/urandom are available for the random_device
+ of TR1 (Chapter 5.1). */
+#define _GLIBCXX_USE_RANDOM_TR1 1
+
+/* Defined if sched_yield is available. */
+/* #undef _GLIBCXX_USE_SCHED_YIELD */
+
+/* Define if code specialized for wchar_t should be used. */
+/* #undef _GLIBCXX_USE_WCHAR_T */
+
+#if defined (_GLIBCXX_HAVE__ACOSF) && ! defined (_GLIBCXX_HAVE_ACOSF)
+# define _GLIBCXX_HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ACOSL) && ! defined (_GLIBCXX_HAVE_ACOSL)
+# define _GLIBCXX_HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINF) && ! defined (_GLIBCXX_HAVE_ASINF)
+# define _GLIBCXX_HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ASINL) && ! defined (_GLIBCXX_HAVE_ASINL)
+# define _GLIBCXX_HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2F) && ! defined (_GLIBCXX_HAVE_ATAN2F)
+# define _GLIBCXX_HAVE_ATAN2F 1
+# define atan2f _atan2f
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATAN2L) && ! defined (_GLIBCXX_HAVE_ATAN2L)
+# define _GLIBCXX_HAVE_ATAN2L 1
+# define atan2l _atan2l
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANF) && ! defined (_GLIBCXX_HAVE_ATANF)
+# define _GLIBCXX_HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ATANL) && ! defined (_GLIBCXX_HAVE_ATANL)
+# define _GLIBCXX_HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILF) && ! defined (_GLIBCXX_HAVE_CEILF)
+# define _GLIBCXX_HAVE_CEILF 1
+# define ceilf _ceilf
+#endif
+
+#if defined (_GLIBCXX_HAVE__CEILL) && ! defined (_GLIBCXX_HAVE_CEILL)
+# define _GLIBCXX_HAVE_CEILL 1
+# define ceill _ceill
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSF) && ! defined (_GLIBCXX_HAVE_COSF)
+# define _GLIBCXX_HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHF) && ! defined (_GLIBCXX_HAVE_COSHF)
+# define _GLIBCXX_HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSHL) && ! defined (_GLIBCXX_HAVE_COSHL)
+# define _GLIBCXX_HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (_GLIBCXX_HAVE__COSL) && ! defined (_GLIBCXX_HAVE_COSL)
+# define _GLIBCXX_HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPF) && ! defined (_GLIBCXX_HAVE_EXPF)
+# define _GLIBCXX_HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (_GLIBCXX_HAVE__EXPL) && ! defined (_GLIBCXX_HAVE_EXPL)
+# define _GLIBCXX_HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSF) && ! defined (_GLIBCXX_HAVE_FABSF)
+# define _GLIBCXX_HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FABSL) && ! defined (_GLIBCXX_HAVE_FABSL)
+# define _GLIBCXX_HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITE) && ! defined (_GLIBCXX_HAVE_FINITE)
+# define _GLIBCXX_HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEF) && ! defined (_GLIBCXX_HAVE_FINITEF)
+# define _GLIBCXX_HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (_GLIBCXX_HAVE__FINITEL) && ! defined (_GLIBCXX_HAVE_FINITEL)
+# define _GLIBCXX_HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORF) && ! defined (_GLIBCXX_HAVE_FLOORF)
+# define _GLIBCXX_HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FLOORL) && ! defined (_GLIBCXX_HAVE_FLOORL)
+# define _GLIBCXX_HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODF) && ! defined (_GLIBCXX_HAVE_FMODF)
+# define _GLIBCXX_HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FMODL) && ! defined (_GLIBCXX_HAVE_FMODL)
+# define _GLIBCXX_HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (_GLIBCXX_HAVE__FPCLASS) && ! defined (_GLIBCXX_HAVE_FPCLASS)
+# define _GLIBCXX_HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPF) && ! defined (_GLIBCXX_HAVE_FREXPF)
+# define _GLIBCXX_HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__FREXPL) && ! defined (_GLIBCXX_HAVE_FREXPL)
+# define _GLIBCXX_HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOT) && ! defined (_GLIBCXX_HAVE_HYPOT)
+# define _GLIBCXX_HAVE_HYPOT 1
+# define hypot _hypot
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTF) && ! defined (_GLIBCXX_HAVE_HYPOTF)
+# define _GLIBCXX_HAVE_HYPOTF 1
+# define hypotf _hypotf
+#endif
+
+#if defined (_GLIBCXX_HAVE__HYPOTL) && ! defined (_GLIBCXX_HAVE_HYPOTL)
+# define _GLIBCXX_HAVE_HYPOTL 1
+# define hypotl _hypotl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINF) && ! defined (_GLIBCXX_HAVE_ISINF)
+# define _GLIBCXX_HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFF) && ! defined (_GLIBCXX_HAVE_ISINFF)
+# define _GLIBCXX_HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISINFL) && ! defined (_GLIBCXX_HAVE_ISINFL)
+# define _GLIBCXX_HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNAN) && ! defined (_GLIBCXX_HAVE_ISNAN)
+# define _GLIBCXX_HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANF) && ! defined (_GLIBCXX_HAVE_ISNANF)
+# define _GLIBCXX_HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__ISNANL) && ! defined (_GLIBCXX_HAVE_ISNANL)
+# define _GLIBCXX_HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPF) && ! defined (_GLIBCXX_HAVE_LDEXPF)
+# define _GLIBCXX_HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LDEXPL) && ! defined (_GLIBCXX_HAVE_LDEXPL)
+# define _GLIBCXX_HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10F) && ! defined (_GLIBCXX_HAVE_LOG10F)
+# define _GLIBCXX_HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOG10L) && ! defined (_GLIBCXX_HAVE_LOG10L)
+# define _GLIBCXX_HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGF) && ! defined (_GLIBCXX_HAVE_LOGF)
+# define _GLIBCXX_HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (_GLIBCXX_HAVE__LOGL) && ! defined (_GLIBCXX_HAVE_LOGL)
+# define _GLIBCXX_HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODF) && ! defined (_GLIBCXX_HAVE_MODF)
+# define _GLIBCXX_HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFF) && ! defined (_GLIBCXX_HAVE_MODFF)
+# define _GLIBCXX_HAVE_MODFF 1
+# define modff _modff
+#endif
+
+#if defined (_GLIBCXX_HAVE__MODFL) && ! defined (_GLIBCXX_HAVE_MODFL)
+# define _GLIBCXX_HAVE_MODFL 1
+# define modfl _modfl
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWF) && ! defined (_GLIBCXX_HAVE_POWF)
+# define _GLIBCXX_HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (_GLIBCXX_HAVE__POWL) && ! defined (_GLIBCXX_HAVE_POWL)
+# define _GLIBCXX_HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (_GLIBCXX_HAVE__QFPCLASS) && ! defined (_GLIBCXX_HAVE_QFPCLASS)
+# define _GLIBCXX_HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOS) && ! defined (_GLIBCXX_HAVE_SINCOS)
+# define _GLIBCXX_HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSF) && ! defined (_GLIBCXX_HAVE_SINCOSF)
+# define _GLIBCXX_HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINCOSL) && ! defined (_GLIBCXX_HAVE_SINCOSL)
+# define _GLIBCXX_HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINF) && ! defined (_GLIBCXX_HAVE_SINF)
+# define _GLIBCXX_HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHF) && ! defined (_GLIBCXX_HAVE_SINHF)
+# define _GLIBCXX_HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINHL) && ! defined (_GLIBCXX_HAVE_SINHL)
+# define _GLIBCXX_HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SINL) && ! defined (_GLIBCXX_HAVE_SINL)
+# define _GLIBCXX_HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTF) && ! defined (_GLIBCXX_HAVE_SQRTF)
+# define _GLIBCXX_HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (_GLIBCXX_HAVE__SQRTL) && ! defined (_GLIBCXX_HAVE_SQRTL)
+# define _GLIBCXX_HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOF) && ! defined (_GLIBCXX_HAVE_STRTOF)
+# define _GLIBCXX_HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (_GLIBCXX_HAVE__STRTOLD) && ! defined (_GLIBCXX_HAVE_STRTOLD)
+# define _GLIBCXX_HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANF) && ! defined (_GLIBCXX_HAVE_TANF)
+# define _GLIBCXX_HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHF) && ! defined (_GLIBCXX_HAVE_TANHF)
+# define _GLIBCXX_HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANHL) && ! defined (_GLIBCXX_HAVE_TANHL)
+# define _GLIBCXX_HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (_GLIBCXX_HAVE__TANL) && ! defined (_GLIBCXX_HAVE_TANL)
+# define _GLIBCXX_HAVE_TANL 1
+# define tanl _tanl
+#endif
+
+#endif // _GLIBCXX_CXX_CONFIG_H
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++io.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++io.h
new file mode 100644
index 0000000..86ca53b
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++io.h
@@ -0,0 +1,49 @@
+// Underlying io library details -*- C++ -*-
+
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++io.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _GLIBCXX_CXX_IO_H
+#define _GLIBCXX_CXX_IO_H 1
+
+#include <cstdio>
+#include <cstddef>
+#include <bits/gthr.h>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef __gthread_mutex_t __c_lock;
+
+ // for basic_file.h
+ typedef FILE __c_file;
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++locale.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++locale.h
new file mode 100644
index 0000000..e27a9cd
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/c++locale.h
@@ -0,0 +1,91 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file c++locale.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.8 Standard locale categories.
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+#ifndef _GLIBCXX_CXX_LOCALE_H
+#define _GLIBCXX_CXX_LOCALE_H 1
+
+#pragma GCC system_header
+
+#include <clocale>
+#include <cstddef>
+
+#define _GLIBCXX_NUM_CATEGORIES 0
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ typedef int* __c_locale;
+
+ // Convert numeric value of type double and long double to string and
+ // return length of string. If vsnprintf is available use it, otherwise
+ // fall back to the unsafe vsprintf which, in general, can be dangerous
+ // and should be avoided.
+ inline int
+ __convert_from_v(const __c_locale&, char* __out,
+ const int __size __attribute__((__unused__)),
+ const char* __fmt, ...)
+ {
+ char* __old = std::setlocale(LC_NUMERIC, NULL);
+ char* __sav = NULL;
+ if (__old != NULL && __builtin_strcmp(__old, "C"))
+ {
+ const size_t __len = __builtin_strlen(__old) + 1;
+ __sav = new char[__len];
+ __builtin_memcpy(__sav, __old, __len);
+ std::setlocale(LC_NUMERIC, "C");
+ }
+
+ __builtin_va_list __args;
+ __builtin_va_start(__args, __fmt);
+
+#ifdef _GLIBCXX_USE_C99
+ const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
+#else
+ const int __ret = __builtin_vsprintf(__out, __fmt, __args);
+#endif
+
+ __builtin_va_end(__args);
+
+ if (__sav)
+ {
+ std::setlocale(LC_NUMERIC, __sav);
+ delete [] __sav;
+ }
+ return __ret;
+ }
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cpu_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cpu_defines.h
new file mode 100644
index 0000000..faf97e1
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cpu_defines.h
@@ -0,0 +1,33 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cpu_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_CPU_DEFINES
+#define _GLIBCXX_CPU_DEFINES 1
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_base.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_base.h
new file mode 100644
index 0000000..15f0063
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
+
+// Support for Solaris 2.5.1
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ /// @brief Base class for ctype.
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef char mask;
+ static const mask upper = _U;
+ static const mask lower = _L;
+ static const mask alpha = _U | _L;
+ static const mask digit = _N;
+ static const mask xdigit = _X | _N;
+ static const mask space = _S;
+ static const mask print = _P | _U | _L | _N | _B;
+ static const mask graph = _P | _U | _L | _N;
+ static const mask cntrl = _C;
+ static const mask punct = _P;
+ static const mask alnum = _U | _L | _N;
+ };
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_inline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_inline.h
new file mode 100644
index 0000000..2c88eb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_inline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && !this->is(__m, *__low))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high && this->is(__m, *__low) != 0)
+ ++__low;
+ return __low;
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_noninline.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_noninline.h
new file mode 100644
index 0000000..55eecd8
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/ctype_noninline.h
@@ -0,0 +1,98 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file ctype_noninline.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return _ctype_ + 1; }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
+ }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ {
+ int __x = __c;
+ return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
+ }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = this->do_tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cxxabi_tweaks.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cxxabi_tweaks.h
new file mode 100644
index 0000000..8354691
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/cxxabi_tweaks.h
@@ -0,0 +1,58 @@
+// Control various target specific ABI tweaks. Generic version.
+
+// Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file cxxabi_tweaks.h
+ * The header provides an CPU-variable interface to the C++ ABI.
+ */
+
+#ifndef _CXXABI_TWEAKS_H
+#define _CXXABI_TWEAKS_H 1
+
+#ifdef __cplusplus
+namespace __cxxabiv1
+{
+ extern "C"
+ {
+#endif
+
+ // The generic ABI uses the first byte of a 64-bit guard variable.
+#define _GLIBCXX_GUARD_TEST(x) (*(char *) (x) != 0)
+#define _GLIBCXX_GUARD_SET(x) *(char *) (x) = 1
+#define _GLIBCXX_GUARD_BIT __guard_test_bit (0, 1)
+#define _GLIBCXX_GUARD_PENDING_BIT __guard_test_bit (1, 1)
+#define _GLIBCXX_GUARD_WAITING_BIT __guard_test_bit (2, 1)
+ __extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+ // __cxa_vec_ctor has void return type.
+ typedef void __cxa_vec_ctor_return_type;
+#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return
+ // Constructors and destructors do not return a value.
+ typedef void __cxa_cdtor_return_type;
+
+#ifdef __cplusplus
+ }
+} // namespace __cxxabiv1
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/error_constants.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/error_constants.h
new file mode 100644
index 0000000..61c0349
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/error_constants.h
@@ -0,0 +1,175 @@
+// Specific definitions for generic platforms -*- C++ -*-
+
+// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file error_constants.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_ERROR_CONSTANTS
+#define _GLIBCXX_ERROR_CONSTANTS 1
+
+#include <bits/c++config.h>
+#include <cerrno>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ enum class errc
+ {
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+ bad_message = EBADMSG,
+#endif
+
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+ identifier_removed = EIDRM,
+#endif
+
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+ no_link = ENOLINK,
+#endif
+
+ no_lock_available = ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+ no_message_available = ENODATA,
+#endif
+
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+ no_stream_resources = ENOSR,
+#endif
+
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+ not_a_stream = ENOSTR,
+#endif
+
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+ not_supported = ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+ operation_canceled = ECANCELED,
+#endif
+
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+ owner_dead = EOWNERDEAD,
+#endif
+
+ permission_denied = EACCES,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+ protocol_error = EPROTO,
+#endif
+
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+ state_not_recoverable = ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+ stream_timeout = ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+ text_file_busy = ETXTBSY,
+#endif
+
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_symbolic_link_levels = ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+ value_too_large = EOVERFLOW,
+#endif
+
+ wrong_protocol_type = EPROTOTYPE
+ };
+
+_GLIBCXX_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/extc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/extc++.h
new file mode 100644
index 0000000..f0ccc42
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/extc++.h
@@ -0,0 +1,69 @@
+// C++ includes used for precompiling extensions -*- C++ -*-
+
+// Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file extc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdtr1c++.h>
+
+#include <ext/algorithm>
+#include <ext/array_allocator.h>
+#include <ext/atomicity.h>
+#include <ext/bitmap_allocator.h>
+#include <ext/cast.h>
+#include <ext/concurrence.h>
+#include <ext/debug_allocator.h>
+#include <ext/extptr_allocator.h>
+#include <ext/functional>
+#include <ext/iterator>
+#include <ext/malloc_allocator.h>
+#include <ext/memory>
+#include <ext/mt_allocator.h>
+#include <ext/new_allocator.h>
+#include <ext/numeric>
+#include <ext/pod_char_traits.h>
+#include <ext/pointer.h>
+#include <ext/pool_allocator.h>
+#include <ext/rb_tree>
+#include <ext/rope>
+#include <ext/slist>
+#include <ext/stdio_filebuf.h>
+#include <ext/stdio_sync_filebuf.h>
+#include <ext/throw_allocator.h>
+#include <ext/typelist.h>
+#include <ext/type_traits.h>
+#include <ext/vstring.h>
+#include <ext/pb_ds/assoc_container.hpp>
+#include <ext/pb_ds/priority_queue.hpp>
+#include <ext/pb_ds/exception.hpp>
+#include <ext/pb_ds/hash_policy.hpp>
+#include <ext/pb_ds/list_update_policy.hpp>
+#include <ext/pb_ds/tree_policy.hpp>
+#include <ext/pb_ds/trie_policy.hpp>
+
+#ifdef _GLIBCXX_HAVE_ICONV
+ #include <ext/codecvt_specializations.h>
+ #include <ext/enc_filebuf.h>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-default.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-default.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-default.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-posix.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-posix.h
new file mode 100644
index 0000000..1096dbe
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-posix.h
@@ -0,0 +1,918 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_POSIX_H
+#define _GLIBCXX_GCC_GTHR_POSIX_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+#define __GTHREADS_CXX0X 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#if !defined(_REENTRANT) && defined(__osf__)
+#define _REENTRANT 1
+#endif
+
+/* The following should normally be in a different header file,
+ * but I couldn't find the right location. The point of the macro
+ * definition below is to prevent libsupc++ and libstdc++ to reference
+ * weak symbols in their static C++ constructors. Such code crashes
+ * when a shared object linked statically to these libraries is
+ * loaded on Android 2.1 (Eclair) and older platform releases, due
+ * to a dynamic linker bug.
+ */
+#ifdef __ANDROID__
+#undef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_t __gthread_t;
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+typedef pthread_cond_t __gthread_cond_t;
+typedef struct timespec __gthread_time_t;
+
+/* POSIX like conditional variables are supported. Please look at comments
+ in gthr.h for details. */
+#define __GTHREAD_HAS_COND 1
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#endif
+#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER
+#define __GTHREAD_TIME_INIT {0,0}
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+# define __gthrw_pragma(pragma)
+# endif
+# define __gthrw2(name,name2,type) \
+ static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+ __gthrw_pragma(weak type)
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw2(name,name2,type)
+# define __gthrw_(name) name
+#endif
+
+/* Typically, __gthrw_foo is a weak reference to symbol foo. */
+#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
+
+/* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to
+ map a subset of the POSIX pthread API to mangled versions of their
+ names. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+#define __gthrw3(name) __gthrw2(__gthrw_ ## name, __ ## name, name)
+__gthrw3(pthread_once)
+__gthrw3(pthread_getspecific)
+__gthrw3(pthread_setspecific)
+
+__gthrw3(pthread_create)
+__gthrw3(pthread_join)
+__gthrw3(pthread_detach)
+__gthrw3(pthread_equal)
+__gthrw3(pthread_self)
+__gthrw3(pthread_cancel)
+__gthrw3(sched_yield)
+
+__gthrw3(pthread_mutex_lock)
+__gthrw3(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw3(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw3(pthread_mutex_unlock)
+__gthrw3(pthread_mutex_init)
+__gthrw3(pthread_mutex_destroy)
+
+__gthrw3(pthread_cond_broadcast)
+__gthrw3(pthread_cond_signal)
+__gthrw3(pthread_cond_wait)
+__gthrw3(pthread_cond_timedwait)
+__gthrw3(pthread_cond_destroy)
+#else
+__gthrw(pthread_once)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+
+__gthrw(pthread_create)
+__gthrw(pthread_join)
+__gthrw(pthread_equal)
+__gthrw(pthread_self)
+__gthrw(pthread_detach)
+#ifndef __BIONIC__
+__gthrw(pthread_cancel)
+#endif
+__gthrw(sched_yield)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+__gthrw(pthread_mutex_timedlock)
+#endif
+#endif /* _POSIX_TIMEOUTS */
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+__gthrw(pthread_cond_broadcast)
+__gthrw(pthread_cond_signal)
+__gthrw(pthread_cond_wait)
+__gthrw(pthread_cond_timedwait)
+__gthrw(pthread_cond_destroy)
+#endif
+
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+
+
+#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
+/* Objective-C. */
+#if defined(__osf__) && defined(_PTHREAD_USE_MANGLED_NAMES_)
+__gthrw3(pthread_cond_init)
+__gthrw3(pthread_exit)
+#else
+__gthrw(pthread_cond_init)
+__gthrw(pthread_exit)
+#endif /* __osf__ && _PTHREAD_USE_MANGLED_NAMES_ */
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(sched_get_priority_max)
+__gthrw(sched_get_priority_min)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+__gthrw(pthread_attr_destroy)
+__gthrw(pthread_attr_init)
+__gthrw(pthread_attr_setdetachstate)
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+__gthrw(pthread_getschedparam)
+__gthrw(pthread_setschedparam)
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _LIBOBJC || _LIBOBJC_WEAK */
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+
+/* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if
+ -pthreads is not specified. The functions are dummies and most return an
+ error value. However pthread_once returns 0 without invoking the routine
+ it is passed so we cannot pretend that the interface is active if -pthreads
+ is not specified. On Solaris 2.5.1, the interface is not exposed at all so
+ we need to play the usual game with weak symbols. On Solaris 10 and up, a
+ working interface is always exposed. On FreeBSD 6 and later, libc also
+ exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up
+ to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc,
+ which means the alternate __gthread_active_p below cannot be used there. */
+
+#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__))
+
+static volatile int __gthread_active = -1;
+
+static void
+__gthread_trigger (void)
+{
+ __gthread_active = 1;
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static pthread_once_t __gthread_active_once = PTHREAD_ONCE_INIT;
+
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ if (__gthrw_(pthread_once))
+ {
+ /* If this really is a threaded program, then we must ensure that
+ __gthread_active has been set to 1 before exiting this block. */
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ __gthrw_(pthread_once) (&__gthread_active_once, __gthread_trigger);
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+ }
+
+ /* Make sure we'll never enter this block again. */
+ if (__gthread_active < 0)
+ __gthread_active = 0;
+
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* neither FreeBSD nor Solaris */
+
+static inline int
+__gthread_active_p (void)
+{
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(
+/* Android's C library does not provide pthread_cancel, check for
+ `pthread_create' instead. */
+#ifndef __BIONIC__
+ pthread_cancel
+#else
+ pthread_create
+#endif
+ );
+ return __gthread_active_ptr != 0;
+}
+
+#endif /* FreeBSD or Solaris */
+
+#else /* not __GXX_WEAK__ */
+
+/* Similar to Solaris, HP-UX 11 for PA-RISC provides stubs for pthread
+ calls in shared flavors of the HP-UX C library. Most of the stubs
+ have no functionality. The details are described in the "libc cumulative
+ patch" for each subversion of HP-UX 11. There are two special interfaces
+ provided for checking whether an application is linked to a pthread
+ library or not. However, these interfaces aren't available in early
+ libc versions. We also can't use pthread_once as some libc versions
+ call the init function. So, we use pthread_create to check whether it
+ is possible to create a thread or not. The stub implementation returns
+ the error number ENOSYS. */
+
+#if defined(__hppa__) && defined(__hpux__)
+
+#include <errno.h>
+
+static volatile int __gthread_active = -1;
+
+static void *
+__gthread_start (void *__arg __attribute__((unused)))
+{
+ return NULL;
+}
+
+static void __gthread_active_init (void) __attribute__((noinline));
+static void
+__gthread_active_init (void)
+{
+ static pthread_mutex_t __gthread_active_mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_t __t;
+ pthread_attr_t __a;
+ int __result;
+
+ __gthrw_(pthread_mutex_lock) (&__gthread_active_mutex);
+ if (__gthread_active < 0)
+ {
+ __gthrw_(pthread_attr_init) (&__a);
+ __gthrw_(pthread_attr_setdetachstate) (&__a, PTHREAD_CREATE_DETACHED);
+ __result = __gthrw_(pthread_create) (&__t, &__a, __gthread_start, NULL);
+ if (__result != ENOSYS)
+ __gthread_active = 1;
+ else
+ __gthread_active = 0;
+ __gthrw_(pthread_attr_destroy) (&__a);
+ }
+ __gthrw_(pthread_mutex_unlock) (&__gthread_active_mutex);
+}
+
+static inline int
+__gthread_active_p (void)
+{
+ /* Avoid reading __gthread_active twice on the main code path. */
+ int __gthread_active_latest_value = __gthread_active;
+
+ /* This test is not protected to avoid taking a lock on the main code
+ path so every update of __gthread_active in a threaded program must
+ be atomic with regard to the result of the test. */
+ if (__builtin_expect (__gthread_active_latest_value < 0, 0))
+ {
+ __gthread_active_init ();
+ __gthread_active_latest_value = __gthread_active;
+ }
+
+ return __gthread_active_latest_value != 0;
+}
+
+#else /* not hppa-hpux */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+#endif /* hppa-hpux */
+
+#endif /* __GXX_WEAK__ */
+
+#ifdef _LIBOBJC
+
+/* This is the config.h file in libobjc/ */
+#include <config.h>
+
+#ifdef HAVE_SCHED_H
+# include <sched.h>
+#endif
+
+/* Key structure for maintaining thread specific storage */
+static pthread_key_t _objc_thread_storage;
+static pthread_attr_t _objc_thread_attribs;
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ if (__gthread_active_p ())
+ {
+ /* Initialize the thread storage key. */
+ if (__gthrw_(pthread_key_create) (&_objc_thread_storage, NULL) == 0)
+ {
+ /* The normal default detach state for threads is
+ * PTHREAD_CREATE_JOINABLE which causes threads to not die
+ * when you think they should. */
+ if (__gthrw_(pthread_attr_init) (&_objc_thread_attribs) == 0
+ && __gthrw_(pthread_attr_setdetachstate) (&_objc_thread_attribs,
+ PTHREAD_CREATE_DETACHED) == 0)
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_key_delete) (_objc_thread_storage) == 0
+ && __gthrw_(pthread_attr_destroy) (&_objc_thread_attribs) == 0)
+ return 0;
+
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (*func)(void *), void *arg)
+{
+ objc_thread_t thread_id;
+ pthread_t new_thread_handle;
+
+ if (!__gthread_active_p ())
+ return NULL;
+
+ if (!(__gthrw_(pthread_create) (&new_thread_handle, NULL, (void *) func, arg)))
+ thread_id = (objc_thread_t) new_thread_handle;
+ else
+ thread_id = NULL;
+
+ return thread_id;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority)
+{
+ if (!__gthread_active_p ())
+ return -1;
+ else
+ {
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ pthread_t thread_id = __gthrw_(pthread_self) ();
+ int policy;
+ struct sched_param params;
+ int priority_min, priority_max;
+
+ if (__gthrw_(pthread_getschedparam) (thread_id, &policy, &params) == 0)
+ {
+ if ((priority_max = __gthrw_(sched_get_priority_max) (policy)) == -1)
+ return -1;
+
+ if ((priority_min = __gthrw_(sched_get_priority_min) (policy)) == -1)
+ return -1;
+
+ if (priority > priority_max)
+ priority = priority_max;
+ else if (priority < priority_min)
+ priority = priority_min;
+ params.sched_priority = priority;
+
+ /*
+ * The solaris 7 and several other man pages incorrectly state that
+ * this should be a pointer to policy but pthread.h is universally
+ * at odds with this.
+ */
+ if (__gthrw_(pthread_setschedparam) (thread_id, policy, &params) == 0)
+ return 0;
+ }
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return -1;
+ }
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+ if (__gthread_active_p ())
+ {
+ int policy;
+ struct sched_param params;
+
+ if (__gthrw_(pthread_getschedparam) (__gthrw_(pthread_self) (), &policy, &params) == 0)
+ return params.sched_priority;
+ else
+ return -1;
+ }
+ else
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING */
+#endif /* _POSIX_PRIORITY_SCHEDULING */
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ if (__gthread_active_p ())
+ __gthrw_(sched_yield) ();
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ if (__gthread_active_p ())
+ /* exit the thread */
+ __gthrw_(pthread_exit) (&__objc_thread_exit_status);
+
+ /* Failed if we reached here */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ if (__gthread_active_p ())
+ return (objc_thread_t) __gthrw_(pthread_self) ();
+ else
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_setspecific) (_objc_thread_storage, value);
+ else
+ {
+ thread_local_storage = value;
+ return 0;
+ }
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_getspecific) (_objc_thread_storage);
+ else
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ mutex->backend = objc_malloc (sizeof (pthread_mutex_t));
+
+ if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL))
+ {
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ {
+ int count;
+
+ /*
+ * Posix Threads specifically require that the thread be unlocked
+ * for __gthrw_(pthread_mutex_destroy) to work.
+ */
+
+ do
+ {
+ count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend);
+ if (count < 0)
+ return -1;
+ }
+ while (count);
+
+ if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend))
+ return -1;
+
+ objc_free (mutex->backend);
+ mutex->backend = NULL;
+ }
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_lock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_trylock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex)
+{
+ if (__gthread_active_p ()
+ && __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend) != 0)
+ {
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ condition->backend = objc_malloc (sizeof (pthread_cond_t));
+
+ if (__gthrw_(pthread_cond_init) ((pthread_cond_t *) condition->backend, NULL))
+ {
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ {
+ if (__gthrw_(pthread_cond_destroy) ((pthread_cond_t *) condition->backend))
+ return -1;
+
+ objc_free (condition->backend);
+ condition->backend = NULL;
+ }
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition, objc_mutex_t mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_wait) ((pthread_cond_t *) condition->backend,
+ (pthread_mutex_t *) mutex->backend);
+ else
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_broadcast) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_cond_signal) ((pthread_cond_t *) condition->backend);
+ else
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
+ void *__args)
+{
+ return __gthrw_(pthread_create) (__threadid, NULL, __func, __args);
+}
+
+static inline int
+__gthread_join (__gthread_t __threadid, void **__value_ptr)
+{
+ return __gthrw_(pthread_join) (__threadid, __value_ptr);
+}
+
+static inline int
+__gthread_detach (__gthread_t __threadid)
+{
+ return __gthrw_(pthread_detach) (__threadid);
+}
+
+static inline int
+__gthread_equal (__gthread_t __t1, __gthread_t __t2)
+{
+ return __gthrw_(pthread_equal) (__t1, __t2);
+}
+
+static inline __gthread_t
+__gthread_self (void)
+{
+ return __gthrw_(pthread_self) ();
+}
+
+static inline int
+__gthread_yield (void)
+{
+ return __gthrw_(sched_yield) ();
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_key_delete) (__key);
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ return __gthrw_(pthread_getspecific) (__key);
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_timedlock) (__mutex, __abs_timeout);
+ else
+ return 0;
+}
+#endif
+#endif
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__gthread_active_p ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+#endif
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+#ifdef _POSIX_TIMEOUTS
+#if _POSIX_TIMEOUTS >= 0
+static inline int
+__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_mutex_timedlock (__mutex, __abs_timeout);
+}
+#endif
+#endif
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+static inline int
+__gthread_cond_broadcast (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_broadcast) (__cond);
+}
+
+static inline int
+__gthread_cond_signal (__gthread_cond_t *__cond)
+{
+ return __gthrw_(pthread_cond_signal) (__cond);
+}
+
+static inline int
+__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
+{
+ return __gthrw_(pthread_cond_wait) (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthrw_(pthread_cond_timedwait) (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_cond_wait (__cond, __mutex);
+}
+
+static inline int
+__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond,
+ __gthread_recursive_mutex_t *__mutex,
+ const __gthread_time_t *__abs_timeout)
+{
+ return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout);
+}
+
+static inline int
+__gthread_cond_destroy (__gthread_cond_t* __cond)
+{
+ return __gthrw_(pthread_cond_destroy) (__cond);
+}
+
+#endif /* _LIBOBJC */
+
+#endif /* ! _GLIBCXX_GCC_GTHR_POSIX_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-single.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-single.h
new file mode 100644
index 0000000..f2b132a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-single.h
@@ -0,0 +1,292 @@
+/* Threads compatibility routines for libgcc2 and libobjc. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009
+ 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_SINGLE_H
+#define _GLIBCXX_GCC_GTHR_SINGLE_H
+
+/* Just provide compatibility for mutex handling. */
+
+typedef int __gthread_key_t;
+typedef int __gthread_once_t;
+typedef int __gthread_mutex_t;
+typedef int __gthread_recursive_mutex_t;
+
+#define __GTHREAD_ONCE_INIT 0
+#define __GTHREAD_MUTEX_INIT 0
+#define __GTHREAD_RECURSIVE_MUTEX_INIT 0
+
+#define _GLIBCXX_UNUSED __attribute__((unused))
+
+#ifdef _LIBOBJC
+
+/* Thread local storage for a single thread */
+static void *thread_local_storage = NULL;
+
+/* Backend initialization functions */
+
+/* Initialize the threads subsystem. */
+static inline int
+__gthread_objc_init_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Close the threads subsystem. */
+static inline int
+__gthread_objc_close_thread_system (void)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Backend thread functions */
+
+/* Create a new thread of execution. */
+static inline objc_thread_t
+__gthread_objc_thread_detach (void (* func)(void *), void * arg _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return NULL;
+}
+
+/* Set the current thread's priority. */
+static inline int
+__gthread_objc_thread_set_priority (int priority _GLIBCXX_UNUSED)
+{
+ /* No thread support available */
+ return -1;
+}
+
+/* Return the current thread's priority. */
+static inline int
+__gthread_objc_thread_get_priority (void)
+{
+ return OBJC_THREAD_INTERACTIVE_PRIORITY;
+}
+
+/* Yield our process time to another thread. */
+static inline void
+__gthread_objc_thread_yield (void)
+{
+ return;
+}
+
+/* Terminate the current thread. */
+static inline int
+__gthread_objc_thread_exit (void)
+{
+ /* No thread support available */
+ /* Should we really exit the program */
+ /* exit (&__objc_thread_exit_status); */
+ return -1;
+}
+
+/* Returns an integer value which uniquely describes a thread. */
+static inline objc_thread_t
+__gthread_objc_thread_id (void)
+{
+ /* No thread support, use 1. */
+ return (objc_thread_t) 1;
+}
+
+/* Sets the thread's local storage pointer. */
+static inline int
+__gthread_objc_thread_set_data (void *value)
+{
+ thread_local_storage = value;
+ return 0;
+}
+
+/* Returns the thread's local storage pointer. */
+static inline void *
+__gthread_objc_thread_get_data (void)
+{
+ return thread_local_storage;
+}
+
+/* Backend mutex functions */
+
+/* Allocate a mutex. */
+static inline int
+__gthread_objc_mutex_allocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a mutex. */
+static inline int
+__gthread_objc_mutex_deallocate (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_lock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Try to grab a lock on a mutex. */
+static inline int
+__gthread_objc_mutex_trylock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ /* There can only be one thread, so we always get the lock */
+ return 0;
+}
+
+/* Unlock the mutex */
+static inline int
+__gthread_objc_mutex_unlock (objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Backend condition mutex functions */
+
+/* Allocate a condition. */
+static inline int
+__gthread_objc_condition_allocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Deallocate a condition. */
+static inline int
+__gthread_objc_condition_deallocate (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wait on the condition */
+static inline int
+__gthread_objc_condition_wait (objc_condition_t condition _GLIBCXX_UNUSED,
+ objc_mutex_t mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up all threads waiting on this condition. */
+static inline int
+__gthread_objc_condition_broadcast (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+/* Wake up one thread waiting on this condition. */
+static inline int
+__gthread_objc_condition_signal (objc_condition_t condition _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+#else /* _LIBOBJC */
+
+static inline int
+__gthread_active_p (void)
+{
+ return 0;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once _GLIBCXX_UNUSED, void (*__func) (void) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int _GLIBCXX_UNUSED
+__gthread_key_create (__gthread_key_t *__key _GLIBCXX_UNUSED, void (*__func) (void *) _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static int _GLIBCXX_UNUSED
+__gthread_key_delete (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key _GLIBCXX_UNUSED, const void *__v _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex _GLIBCXX_UNUSED)
+{
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_lock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_trylock (__mutex);
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ return __gthread_mutex_unlock (__mutex);
+}
+
+#endif /* _LIBOBJC */
+
+#undef _GLIBCXX_UNUSED
+
+#endif /* ! _GLIBCXX_GCC_GTHR_SINGLE_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-tpf.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-tpf.h
new file mode 100644
index 0000000..eb619e0
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr-tpf.h
@@ -0,0 +1,229 @@
+/* Threads compatibility routines for libgcc2 and libobjc.
+ Compile this one with gcc.
+ Copyright (C) 2004, 2005, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+/* TPF needs its own version of gthr-*.h because TPF always links to
+ the thread library. However, for performance reasons we still do not
+ want to issue thread api calls unless a check is made to see that we
+ are running as a thread. */
+
+#ifndef _GLIBCXX_GCC_GTHR_TPF_H
+#define _GLIBCXX_GCC_GTHR_TPF_H
+
+/* POSIX threads specific definitions.
+ Easy, since the interface is just one-to-one mapping. */
+
+#define __GTHREADS 1
+
+/* Some implementations of <pthread.h> require this to be defined. */
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+typedef pthread_key_t __gthread_key_t;
+typedef pthread_once_t __gthread_once_t;
+typedef pthread_mutex_t __gthread_mutex_t;
+typedef pthread_mutex_t __gthread_recursive_mutex_t;
+
+#if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
+#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#endif
+
+#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER
+#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+
+#define NOTATHREAD 00
+#define ECBBASEPTR (unsigned long int) *(unsigned int *)0x00000514u
+#define ECBPG2PTR ECBBASEPTR + 0x1000
+#define CE2THRCPTR *((unsigned char *)(ECBPG2PTR + 16))
+#define __tpf_pthread_active() (CE2THRCPTR != NOTATHREAD)
+
+#if __GXX_WEAK__ && _GLIBCXX_GTHREAD_USE_WEAK
+# define __gthrw(name) \
+ static __typeof(name) __gthrw_ ## name __attribute__ ((__weakref__(#name)));
+# define __gthrw_(name) __gthrw_ ## name
+#else
+# define __gthrw(name)
+# define __gthrw_(name) name
+#endif
+
+__gthrw(pthread_once)
+__gthrw(pthread_key_create)
+__gthrw(pthread_key_delete)
+__gthrw(pthread_getspecific)
+__gthrw(pthread_setspecific)
+__gthrw(pthread_create)
+
+__gthrw(pthread_mutex_lock)
+__gthrw(pthread_mutex_trylock)
+__gthrw(pthread_mutex_unlock)
+__gthrw(pthread_mutexattr_init)
+__gthrw(pthread_mutexattr_settype)
+__gthrw(pthread_mutexattr_destroy)
+__gthrw(pthread_mutex_init)
+__gthrw(pthread_mutex_destroy)
+
+static inline int
+__gthread_active_p (void)
+{
+ return 1;
+}
+
+static inline int
+__gthread_once (__gthread_once_t *__once, void (*__func) (void))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_once) (__once, __func);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_create) (__key, __dtor);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_key_delete (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_key_delete) (__key);
+ else
+ return -1;
+}
+
+static inline void *
+__gthread_getspecific (__gthread_key_t __key)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_getspecific) (__key);
+ else
+ return NULL;
+}
+
+static inline int
+__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_setspecific) (__key, __ptr);
+ else
+ return -1;
+}
+
+static inline int
+__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_destroy) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_lock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_lock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_trylock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthrw_(pthread_mutex_unlock) (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_lock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_trylock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ return __gthread_mutex_unlock (__mutex);
+ else
+ return 0;
+}
+
+static inline int
+__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *__mutex)
+{
+ if (__tpf_pthread_active ())
+ {
+ pthread_mutexattr_t __attr;
+ int __r;
+
+ __r = __gthrw_(pthread_mutexattr_init) (&__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_settype) (&__attr,
+ PTHREAD_MUTEX_RECURSIVE);
+ if (!__r)
+ __r = __gthrw_(pthread_mutex_init) (__mutex, &__attr);
+ if (!__r)
+ __r = __gthrw_(pthread_mutexattr_destroy) (&__attr);
+ return __r;
+ }
+ return 0;
+}
+
+
+#endif /* ! _GLIBCXX_GCC_GTHR_TPF_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr.h
new file mode 100644
index 0000000..35d9b7e
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/gthr.h
@@ -0,0 +1,173 @@
+/* Threads compatibility routines for libgcc2. */
+/* Compile this one with gcc. */
+/* Copyright (C) 1997, 1998, 2004, 2008, 2009 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 3, 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.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef _GLIBCXX_GCC_GTHR_H
+#define _GLIBCXX_GCC_GTHR_H
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+/* If this file is compiled with threads support, it must
+ #define __GTHREADS 1
+ to indicate that threads support is present. Also it has define
+ function
+ int __gthread_active_p ()
+ that returns 1 if thread system is active, 0 if not.
+
+ The threads interface must define the following types:
+ __gthread_key_t
+ __gthread_once_t
+ __gthread_mutex_t
+ __gthread_recursive_mutex_t
+
+ The threads interface must define the following macros:
+
+ __GTHREAD_ONCE_INIT
+ to initialize __gthread_once_t
+ __GTHREAD_MUTEX_INIT
+ to initialize __gthread_mutex_t to get a fast
+ non-recursive mutex.
+ __GTHREAD_MUTEX_INIT_FUNCTION
+ some systems can't initialize a mutex without a
+ function call. On such systems, define this to a
+ function which looks like this:
+ void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *)
+ Don't define __GTHREAD_MUTEX_INIT in this case
+ __GTHREAD_RECURSIVE_MUTEX_INIT
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION
+ as above, but for a recursive mutex.
+
+ The threads interface must define the following static functions:
+
+ int __gthread_once (__gthread_once_t *once, void (*func) ())
+
+ int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *))
+ int __gthread_key_delete (__gthread_key_t key)
+
+ void *__gthread_getspecific (__gthread_key_t key)
+ int __gthread_setspecific (__gthread_key_t key, const void *ptr)
+
+ int __gthread_mutex_destroy (__gthread_mutex_t *mutex);
+
+ int __gthread_mutex_lock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_trylock (__gthread_mutex_t *mutex);
+ int __gthread_mutex_unlock (__gthread_mutex_t *mutex);
+
+ int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex);
+ int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex);
+
+ The following are supported in POSIX threads only. They are required to
+ fix a deadlock in static initialization inside libsupc++. The header file
+ gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra
+ features are supported.
+
+ Types:
+ __gthread_cond_t
+
+ Macros:
+ __GTHREAD_COND_INIT
+ __GTHREAD_COND_INIT_FUNCTION
+
+ Interface:
+ int __gthread_cond_broadcast (__gthread_cond_t *cond);
+ int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex);
+ int __gthread_cond_wait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex);
+
+ All functions returning int should return zero on success or the error
+ number. If the operation is not supported, -1 is returned.
+
+ If the following are also defined, you should
+ #define __GTHREADS_CXX0X 1
+ to enable the c++0x thread library.
+
+ Types:
+ __gthread_t
+ __gthread_time_t
+
+ Interface:
+ int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+ void *args);
+ int __gthread_join (__gthread_t thread, void **value_ptr);
+ int __gthread_detach (__gthread_t thread);
+ int __gthread_equal (__gthread_t t1, __gthread_t t2);
+ __gthread_t __gthread_self (void);
+ int __gthread_yield (void);
+
+ int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+ const __gthread_time_t *abs_time);
+
+ int __gthread_cond_signal (__gthread_cond_t *cond);
+ int __gthread_cond_timedwait (__gthread_cond_t *cond,
+ __gthread_mutex_t *mutex,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex,
+ const __gthread_time_t *abs_time)
+
+ Currently supported threads packages are
+ TPF threads with -D__tpf__
+ POSIX/Unix98 threads with -D_PTHREADS
+ POSIX/Unix95 threads with -D_PTHREADS95
+ DCE threads with -D_DCE_THREADS
+ Solaris/UI threads with -D_SOLARIS_THREADS
+
+*/
+
+/* Check first for thread specific defines. */
+#if defined (_GLIBCXX___tpf_GLIBCXX___)
+#include <bits/gthr-tpf.h>
+#elif _GLIBCXX__PTHREADS
+#include <bits/gthr-posix.h>
+#elif _GLIBCXX__PTHREADS95
+#include <bits/gthr-posix95.h>
+#elif _GLIBCXX__DCE_THREADS
+#include <bits/gthr-dce.h>
+#elif _GLIBCXX__SOLARIS_THREADS
+#include <bits/gthr-solaris.h>
+
+/* Include GTHREAD_FILE if one is defined. */
+#elif defined(_GLIBCXX_HAVE_GTHR_DEFAULT)
+#if __GXX_WEAK__
+#ifndef _GLIBCXX_GTHREAD_USE_WEAK
+#define _GLIBCXX_GTHREAD_USE_WEAK 1
+#endif
+#endif
+#include <bits/gthr-default.h>
+
+/* Fallback to single thread definitions. */
+#else
+#include <bits/gthr-single.h>
+#endif
+
+#ifndef _GLIBCXX_HIDE_EXPORTS
+#pragma GCC visibility pop
+#endif
+
+#endif /* ! _GLIBCXX_GCC_GTHR_H */
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/messages_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/messages_members.h
new file mode 100644
index 0000000..a149950
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/messages_members.h
@@ -0,0 +1,90 @@
+// std::messages implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file messages_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ // Non-virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale, const char*, size_t __refs)
+ : facet(__refs)
+ { _M_c_locale_messages = _S_get_c_locale(); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char*) const
+ { return this->do_open(__s, __loc); }
+
+ // Virtual member functions.
+ template<typename _CharT>
+ messages<_CharT>::~messages()
+ { _S_destroy_c_locale(_M_c_locale_messages); }
+
+ template<typename _CharT>
+ typename messages<_CharT>::catalog
+ messages<_CharT>::do_open(const basic_string<char>&, const locale&) const
+ { return 0; }
+
+ template<typename _CharT>
+ typename messages<_CharT>::string_type
+ messages<_CharT>::do_get(catalog, int, int,
+ const string_type& __dfault) const
+ { return __dfault; }
+
+ template<typename _CharT>
+ void
+ messages<_CharT>::do_close(catalog) const
+ { }
+
+ // messages_byname
+ template<typename _CharT>
+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
+ : messages<_CharT>(__refs)
+ {
+ if (__builtin_strcmp(__s, "C") != 0
+ && __builtin_strcmp(__s, "POSIX") != 0)
+ {
+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/os_defines.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/os_defines.h
new file mode 100644
index 0000000..832592a
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/os_defines.h
@@ -0,0 +1,36 @@
+// Specific definitions for Bionic -*- C++ -*-
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file os_defines.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdc++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdc++.h
new file mode 100644
index 0000000..5782fa3
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdc++.h
@@ -0,0 +1,111 @@
+// C++ includes used for precompiling -*- C++ -*-
+
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdc++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+// 17.4.1.2 Headers
+
+// C
+#include <cassert>
+#include <cctype>
+#include <cerrno>
+#include <cfloat>
+#include <ciso646>
+#include <climits>
+#include <clocale>
+#include <cmath>
+#include <csetjmp>
+#include <csignal>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <ccomplex>
+#include <cfenv>
+#include <cinttypes>
+#include <cstdatomic>
+#include <cstdbool>
+#include <cstdint>
+#include <ctgmath>
+#include <cwchar>
+#include <cwctype>
+#endif
+
+// C++
+#include <algorithm>
+#include <bitset>
+#include <complex>
+#include <deque>
+#include <exception>
+#include <fstream>
+#include <functional>
+#include <iomanip>
+#include <ios>
+#include <iosfwd>
+#include <iostream>
+#include <istream>
+#include <iterator>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <memory>
+#include <new>
+#include <numeric>
+#include <ostream>
+#include <queue>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdexcept>
+#include <streambuf>
+#include <string>
+#include <typeinfo>
+#include <utility>
+#include <valarray>
+#include <vector>
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#include <array>
+#include <chrono>
+#include <condition_variable>
+#include <forward_list>
+#include <mutex>
+#include <random>
+#include <ratio>
+#include <regex>
+#include <system_error>
+#include <thread>
+#include <tuple>
+#include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+#endif
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdtr1c++.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdtr1c++.h
new file mode 100644
index 0000000..8ed9cb6
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/stdtr1c++.h
@@ -0,0 +1,53 @@
+// C++ includes used for precompiling TR1 -*- C++ -*-
+
+// Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file stdtr1c++.h
+ * This is an implementation file for a precompiled header.
+ */
+
+#include <bits/stdc++.h>
+
+#include <tr1/array>
+#include <tr1/cctype>
+#include <tr1/cfenv>
+#include <tr1/cfloat>
+#include <tr1/cinttypes>
+#include <tr1/climits>
+#include <tr1/cmath>
+#include <tr1/complex>
+#include <tr1/cstdarg>
+#include <tr1/cstdbool>
+#include <tr1/cstdint>
+#include <tr1/cstdio>
+#include <tr1/cstdlib>
+#include <tr1/ctgmath>
+#include <tr1/ctime>
+#include <tr1/cwchar>
+#include <tr1/cwctype>
+#include <tr1/functional>
+#include <tr1/random>
+#include <tr1/tuple>
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+#include <tr1/utility>
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/time_members.h b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/time_members.h
new file mode 100644
index 0000000..d06faf4
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/include/bits/time_members.h
@@ -0,0 +1,90 @@
+// std::time_get, std::time_put implementation, generic version -*- C++ -*-
+
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, 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 General Public License for more details.
+
+// Under Section 7 of GPL version 3, you are granted additional
+// permissions described in the GCC Runtime Library Exception, version
+// 3.1, as published by the Free Software Foundation.
+
+// You should have received a copy of the GNU General Public License and
+// a copy of the GCC Runtime Library Exception along with this program;
+// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+// <http://www.gnu.org/licenses/>.
+
+/** @file time_members.h
+ * This is an internal header file, included by other library headers.
+ * You should not attempt to use it directly.
+ */
+
+//
+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
+//
+
+// Written by Benjamin Kosnik <bkoz@redhat.com>
+
+_GLIBCXX_BEGIN_NAMESPACE(std)
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache)
+ {
+ _M_name_timepunct = _S_get_c_name();
+ _M_initialize_timepunct();
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL)
+ {
+ if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
+ {
+ const size_t __len = __builtin_strlen(__s) + 1;
+ char* __tmp = new char[__len];
+ __builtin_memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+ }
+ else
+ _M_name_timepunct = _S_get_c_name();
+
+ __try
+ { _M_initialize_timepunct(__cloc); }
+ __catch(...)
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ __throw_exception_again;
+ }
+ }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::~__timepunct()
+ {
+ if (_M_name_timepunct != _S_get_c_name())
+ delete [] _M_name_timepunct;
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
+
+_GLIBCXX_END_NAMESPACE
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.a b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.a
new file mode 100644
index 0000000..aa3c517
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.a
Binary files differ
diff --git a/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.la b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.la
new file mode 100755
index 0000000..53167da
--- /dev/null
+++ b/6/sources/cxx-stl/gnu-libstdc++/libs/x86/libstdc++.la
@@ -0,0 +1,41 @@
+# libstdc++.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname=''
+
+# Names of this library.
+library_names=''
+
+# The name of the static archive.
+old_library='libstdc++.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lm'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libstdc++.
+current=6
+age=0
+revision=13
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/tmp/ndk-digit/build/install/toolchains/x86-4.4.3/prebuilt/linux-x86/i686-android-linux/lib'
diff --git a/6/sources/cxx-stl/stlport/LICENSE b/6/sources/cxx-stl/stlport/LICENSE
new file mode 100644
index 0000000..6846270
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/LICENSE
@@ -0,0 +1,27 @@
+Boris Fomitchev grants Licensee a non-exclusive, non-transferable, royalty-free license to use STLport and its documentation without fee.
+
+By downloading, using, or copying STLport or any portion thereof, Licensee agrees to abide by the intellectual property laws and all other applicable laws of the United States of America, and to all of the terms and conditions of this Agreement.
+
+Licensee shall maintain the following copyright and permission notices on STLport sources and its documentation unchanged :
+
+Copyright 1999,2000 Boris Fomitchev
+
+This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk.
+Permission to use or copy this software for any purpose is hereby granted without fee, 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.
+The Licensee may distribute binaries compiled with STLport (whether original or modified) without any royalties or restrictions.
+
+The Licensee may distribute original or modified STLport sources, provided that:
+
+The conditions indicated in the above permission notice are met;
+The following copyright notices are retained when present, and conditions provided in accompanying permission notices are met :
+Copyright 1994 Hewlett-Packard Company
+
+Copyright 1996,97 Silicon Graphics Computer Systems, Inc.
+
+Copyright 1997 Moscow Center for SPARC Technology.
+
+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.
+
+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.
+
+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. Moscow Center for SPARC Technology makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
diff --git a/6/sources/cxx-stl/stlport/MODULE_LICENSE_BSD_LIKE b/6/sources/cxx-stl/stlport/MODULE_LICENSE_BSD_LIKE
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/MODULE_LICENSE_BSD_LIKE
diff --git a/6/sources/cxx-stl/stlport/README b/6/sources/cxx-stl/stlport/README
new file mode 100644
index 0000000..8f602fe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/README
@@ -0,0 +1,69 @@
+STLport for Android
+
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+ This feature is currently in beta. In case of issue
+ please contact the android-ndk support forum or
+ file bugs at http://b.android.com
+
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+This directory contains a port of STLport for Android, which provides
+a simple STL implementation. Note that it currently does not support
+C++ exceptions and RTTI. Support for wchar_t and locales is probably buggy.
+
+You can either use it as a static or shared library.
+
+1/ The static library is recommended if you will only produce
+ one shared library for your project. All necessary STLport functions
+ will be added to it. This option should also generate smaller
+ overall binaries.
+
+2/ The shared library, is recommended if you want to produce
+ several shared libraries in your project, because it avoids copying the
+ same STLport functions to each one of them, and having different instances
+ of the same global variables (which can easily conflict or result in
+ undefined behaviour).
+
+To use the *static* library, define APP_STL in your Application.mk as follows:
+
+ APP_STL := stlport_static
+
+To use the *shared* library, use "stlport_shared" instead:
+
+ APP_STL := stlport_shared
+
+Note that, in this case, you will need, in your application, to explicitely
+load the 'stlport_shared' library before any library that depends on it.
+For example:
+
+ static {
+ System.loadLibrary("stlport_shared");
+ System.loadLibrary("foo");
+ System.loadLibrary("bar");
+ }
+
+If both libfoo.so and libbar.so depend on STLport.
+
+You can build the STLport unit test program by doing the following:
+
+ cd $NDK
+ tests/run-tests.sh --test=test-stlport
+
+If you have an Android device connected to your machine, this will
+automatically try to run the generated test command. Note that for now
+a few tests are still failing (mostly related to wchar_t and locales).
+
+They should be fixed hopefully by a later release of this library.
+
+The NDK comes with prebuilt binaries for this library to speed up development.
+You can however rebuild them from sources in your own application build by
+defining STLPORT_FORCE_REBUILD to 'true' in your Application.mk as in:
+
+ STLPORT_FORCE_REBUILD := true
+
+
+VERSION INFORMATION: This module is based on STLport version 5.2.0
+
diff --git a/6/sources/cxx-stl/stlport/README.android b/6/sources/cxx-stl/stlport/README.android
new file mode 100644
index 0000000..a35c955
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/README.android
@@ -0,0 +1,9 @@
+Version: 5.2.1
+
+Changes:
+ * Added _android.h included by _system.h
+ * Do not use linux float functions in num_get_float.cpp as Android does not
+ have them.
+ * _mbstate_t.h cannot define its own mbstate_t as bionic already defines
+ it.
+ * _pair.h needs to define bionic's (sgi's) internal pair header guard.
diff --git a/6/sources/cxx-stl/stlport/README.original b/6/sources/cxx-stl/stlport/README.original
new file mode 100644
index 0000000..a759495
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/README.original
@@ -0,0 +1,64 @@
+**********************************************************************
+* README file for STLport 5.0 *
+* *
+**********************************************************************
+
+This directory contains the STLport-5.0 release.
+
+What's inside :
+
+README - this file
+INSTALL - installation instructions
+
+bin - installation directory for STLport unit tests;
+ it may contain more subdirs, if you use
+ crosscompilation
+build/lib - build directory for STLport library (if you use
+ STLport iostreams and/or locale only)
+build/test/unit - build directory for regression (unit) tests
+build/test/eh - build directory for exception handling tests
+stlport - main STLport include directory
+src - source for iostreams implementation and other parts
+ that aren't pure template code
+lib - installation directory for STLport library (if you
+ use STLport iostreams and/or locale only);
+ it may contain more subdirs, if you use
+ crosscompilation
+test/unit - unit (regression) tests
+test/eh - exception handling test using STLport iostreams
+etc - miscellanous files (ChangeLog, TODO, scripts, etc.)
+
+GETTING STLPORT
+
+To download the latest version of STLport, please be sure to visit
+https://sourceforge.net/project/showfiles.php?group_id=146814
+
+LEGALESE
+
+This software is being distributed under the following terms:
+
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999-2003
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+
+**********************************************************************
diff --git a/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_shared.so b/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_shared.so
new file mode 100755
index 0000000..4391d0d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_shared.so
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a b/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a
new file mode 100644
index 0000000..ed6ab70
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so b/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so
new file mode 100755
index 0000000..1e93e73
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_static.a b/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_static.a
new file mode 100644
index 0000000..364d075
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/armeabi/libstlport_static.a
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/libs/x86/libstlport_shared.so b/6/sources/cxx-stl/stlport/libs/x86/libstlport_shared.so
new file mode 100755
index 0000000..26afb8b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/x86/libstlport_shared.so
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/libs/x86/libstlport_static.a b/6/sources/cxx-stl/stlport/libs/x86/libstlport_static.a
new file mode 100644
index 0000000..042073f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/libs/x86/libstlport_static.a
Binary files differ
diff --git a/6/sources/cxx-stl/stlport/stlport/algorithm b/6/sources/cxx-stl/stlport/stlport/algorithm
new file mode 100644
index 0000000..c653d8c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/algorithm
@@ -0,0 +1,62 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_ALGORITHM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1
+# include <stl/_prolog.h>
+# define _STLP_ALGORITHM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1)
+# ifndef _STLP_INTERNAL_CSTDIO
+// remove() conflicts, <cstdio> should always go first
+# include <stl/_cstdio.h>
+# endif
+
+# ifndef _STLP_INTERNAL_ALGO_H
+# include <stl/_algo.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <algorithm>
+# else
+# include _STLP_NATIVE_HEADER(algorithm)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_ALGORITHM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/assert.h b/6/sources/cxx-stl/stlport/stlport/assert.h
new file mode 100644
index 0000000..112dd26
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/assert.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x202
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x202) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* evc3 doesn't have assert.h; macro assert() is defined in stl_evc.h */
+#ifndef _STLP_WCE_EVC3
+# if !defined (assert)
+# define _STLP_NATIVE_ASSERT_H_INCLUDED
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <assert.h>
+# else
+# include _STLP_NATIVE_C_HEADER(assert.h)
+# endif
+# endif
+# if !defined (_STLP_NATIVE_ASSERT_H_INCLUDED)
+/* See errno.h for additional information about this #error */
+# error assert has been defined before inclusion of assert.h header.
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x202)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* Local Variables:
+ * mode:C++
+ * End:
+ */
diff --git a/6/sources/cxx-stl/stlport/stlport/bitset b/6/sources/cxx-stl/stlport/stlport/bitset
new file mode 100644
index 0000000..1d7fcf3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/bitset
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_BITSET
+
+// This implementation of bitset<> has a second template parameter,
+// _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE
+// THIS FEATURE*. It is experimental, and it may be removed in
+// future releases.
+
+// A bitset of size N, using words of type _WordT, will have
+// N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high-
+// order bits in the highest word.) It is a class invariant
+// of class bitset<> that those unused bits are always zero.
+
+// Most of the actual code isn't contained in bitset<> itself, but in the
+// base class _Base_bitset. The base class works with whole words, not with
+// individual bits. This allows us to specialize _Base_bitset for the
+// important special case where the bitset is only a single word.
+
+// The C++ standard does not define the precise semantics of operator[].
+// In this implementation the const version of operator[] is equivalent
+// to test(), except that it does no range checking. The non-const version
+// returns a reference to a bit, again without doing any range checking.
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2
+# include <stl/_prolog.h>
+# define _STLP_BITSET
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2)
+# ifndef _STLP_INTERNAL_BITSET
+# include <stl/_bitset.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x2) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <bitset>
+# else
+# include _STLP_NATIVE_HEADER(bitset)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_BITSET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cassert b/6/sources/cxx-stl/stlport/stlport/cassert
new file mode 100644
index 0000000..aabd0b4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cassert
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x103
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x103) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if !defined (_STLP_WCE_EVC3)
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cassert>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cassert)
+# endif
+# else
+# include <assert.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x103 )
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cctype b/6/sources/cxx-stl/stlport/stlport/cctype
new file mode 100644
index 0000000..513512e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cctype
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CCTYPE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x104
+# define _STLP_CCTYPE
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x104 )
+# ifndef _STLP_INTERNAL_CCTYPE
+# include <stl/_cctype.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x104) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cctype>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cctype)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x104 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CCTYPE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cerrno b/6/sources/cxx-stl/stlport/stlport/cerrno
new file mode 100644
index 0000000..0d17faf
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cerrno
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CERRNO
+#define _STLP_CERRNO
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x105
+# include <stl/_prolog.h>
+#endif
+
+#ifndef _STLP_WCE
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cerrno>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cerrno)
+# endif
+# else
+# include <errno.h>
+# endif
+#endif
+
+#ifndef errno /* errno is not a macro */
+# if defined (_STLP_IMPORT_VENDOR_CSTD)
+# if !defined (__IBMCPP__) && !defined (__hpux) && !defined (__MWERKS__) && !defined (_STLP_WCE)
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::errno;
+_STLP_END_NAMESPACE
+# endif
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x105 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CERRNO */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cfloat b/6/sources/cxx-stl/stlport/stlport/cfloat
new file mode 100644
index 0000000..cb2e0cd
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cfloat
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CFLOAT
+#define _STLP_CFLOAT
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x106
+# include <stl/_prolog.h>
+#endif
+
+// Borland defines some implementation constants in std:: namespace,
+// we do not want to import them.
+#if defined (_STLP_USE_NEW_C_HEADERS) && !defined (__BORLANDC__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cfloat>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cfloat)
+# endif
+#else
+# include <float.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x106 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CFLOAT */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ciso646 b/6/sources/cxx-stl/stlport/stlport/ciso646
new file mode 100644
index 0000000..443449d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ciso646
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CISO646
+#define _STLP_CISO646
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x107
+# include <stl/_prolog.h>
+#endif
+
+#if !defined(_STLP_WCE_EVC3) && !defined (__BORLANDC__)
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ciso646>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(ciso646)
+# endif
+# else
+# include <iso646.h>
+# endif /* _STLP_USE_NEW_C_HEADERS */
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x107 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CISO646 */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/climits b/6/sources/cxx-stl/stlport/stlport/climits
new file mode 100644
index 0000000..86bc413
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/climits
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CLIMITS
+# define _STLP_CLIMITS
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x108
+# include <stl/_prolog.h>
+#endif
+
+#if defined (__SUNPRO_CC) && ((__SUNPRO_CC == 0x500) && (__SUNPRO_CC_COMPAT > 4))
+# include </usr/include/limits.h>
+#elif defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <climits>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(climits)
+# endif
+#else
+# if defined (__BORLANDC__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <limits.h>
+# else
+# include _STLP_NATIVE_C_HEADER(limits.h)
+# endif
+# else
+# include <limits.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x108 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CLIMITS */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/clocale b/6/sources/cxx-stl/stlport/stlport/clocale
new file mode 100644
index 0000000..28996ce
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/clocale
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CLOCALE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x109
+# define _STLP_CLOCALE
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x109)
+# ifndef _STLP_INTERNAL_CLOCALE
+# include <stl/_clocale.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x109) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <clocale>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(clocale)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x109)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CLOCALE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cmath b/6/sources/cxx-stl/stlport/stlport/cmath
new file mode 100644
index 0000000..46a8f52
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cmath
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CMATH
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x110
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x110) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_CMATH
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x110) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_CMATH
+# include <stl/_cmath.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x110) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cmath>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cmath)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x110)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif /* _STLP_CMATH */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/complex b/6/sources/cxx-stl/stlport/stlport/complex
new file mode 100644
index 0000000..6cfe605
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/complex
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_COMPLEX
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x10
+# define _STLP_COMPLEX
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x10)
+// This header declares the template class complex, as described in
+// in the C++ Standard. Single-precision complex numbers
+// are complex<float>, double-precision are complex<double>, and
+// quad precision are complex<long double>.
+
+// Note that the template class complex is declared within namespace
+// std, as called for by the draft C++ standard
+# ifndef _STLP_INTERNAL_COMPLEX
+# include <stl/_complex.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x10) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <complex>
+# else
+# include _STLP_NATIVE_HEADER(complex)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x10 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_COMPLEX */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/csetjmp b/6/sources/cxx-stl/stlport/stlport/csetjmp
new file mode 100644
index 0000000..eef2bd8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/csetjmp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSETJMP
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x111
+# define _STLP_CSETJMP
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x111)
+# ifndef _STLP_INTERNAL_CSETJMP
+# include <stl/_csetjmp.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x111) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <csetjmp>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(csetjmp)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x111 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSETJMP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/csignal b/6/sources/cxx-stl/stlport/stlport/csignal
new file mode 100644
index 0000000..7b1a30d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/csignal
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSIGNAL
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x112
+# define _STLP_CSIGNAL
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x112)
+# ifndef _STLP_INTERNAL_CSIGNAL
+# include <stl/_csignal.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x112) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <csignal>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(csignal)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x112 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSIGNAL */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cstdarg b/6/sources/cxx-stl/stlport/stlport/cstdarg
new file mode 100644
index 0000000..6882bbd
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cstdarg
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSTDARG
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x113
+# define _STLP_CSTDARG
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x113)
+# ifndef _STLP_INTERNAL_CSTDARG
+# include <stl/_cstdarg.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x113) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdarg>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdarg)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x113 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSTDARG */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cstddef b/6/sources/cxx-stl/stlport/stlport/cstddef
new file mode 100644
index 0000000..0a66f0e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cstddef
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSTDDEF
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x114
+# define _STLP_CSTDDEF
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x114)
+# ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x114) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstddef>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x114 )
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSTDDEF */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cstdio b/6/sources/cxx-stl/stlport/stlport/cstdio
new file mode 100644
index 0000000..e20c8ff
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cstdio
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSTDIO
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x15
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x15) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_CSTDIO
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x15) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x15) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdio>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdio)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x15)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cstdlib b/6/sources/cxx-stl/stlport/stlport/cstdlib
new file mode 100644
index 0000000..20afa35
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cstdlib
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSTDLIB
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x116
+# define _STLP_CSTDLIB
+# include <stl/_prolog.h>
+#endif
+
+# if defined (__GNUC__) && defined (__MINGW32__)
+/* Native cstdlib includes stdlib.h using an include_next so STLport stdlib.h
+ * is not used and the workaround in this file must be duplicated here
+ * (see stdlib.h). */
+# include "errno.h"
+# endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x116)
+# ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x116) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdlib>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x116)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSTDLIB */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cstring b/6/sources/cxx-stl/stlport/stlport/cstring
new file mode 100644
index 0000000..d5cf58d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cstring
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CSTRING
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x117
+# define _STLP_CSTRING
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x117)
+# ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x117) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstring>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstring)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x117)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CSTRING */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ctime b/6/sources/cxx-stl/stlport/stlport/ctime
new file mode 100644
index 0000000..bafb7dd
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ctime
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CTIME
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x118
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x118) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_CTIME
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x118) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_CTIME
+# include <stl/_ctime.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x118) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ctime>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(ctime)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x118)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif /* _STLP_CTIME */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ctype.h b/6/sources/cxx-stl/stlport/stlport/ctype.h
new file mode 100644
index 0000000..f9d1000
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ctype.h
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CTYPE_H
+
+/* Workaround for a "misbehaviour" when compiling resource scripts using
+ * eMbedded Visual C++. The standard .rc file includes windows header files,
+ * which in turn include ctype.h, which results in warnings and errors
+ */
+#if !defined(RC_INVOKED)
+
+# if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x219
+# include <stl/_prolog.h>
+# elif (_STLP_OUTERMOST_HEADER_ID == 0x219)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_CTYPE_H
+# endif
+
+# if defined(_STLP_WCE_EVC3)
+struct _exception;
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ctype.h>
+# else
+# include _STLP_NATIVE_C_HEADER(ctype.h)
+# endif
+
+/* on evc4 including ctype.h also defines setjmp macro */
+# if defined (_STLP_WCE)
+# define _STLP_NATIVE_SETJMP_H_INCLUDED
+# endif
+
+# ifndef _STLP_CTYPE_H_SEEN
+# define _STLP_CTYPE_H_SEEN
+
+/* Undef convenience interfaces */
+# undef isspace
+# undef isprint
+# undef iscntrl
+# undef isupper
+# undef islower
+# undef isalpha
+# undef isdigit
+# undef ispunct
+# undef isxdigit
+# undef isalnum
+# undef isgraph
+# undef toupper
+# undef tolower
+
+# if defined (UNDER_CE)
+
+# if (_WIN32_WCE < 300) /* Only wide chars for older versions */
+# define _isctype iswctype
+# endif
+
+__inline int (isalpha)(int c) { return _isctype(c, _ALPHA); }
+__inline int (isupper)(int c) { return _isctype(c, _UPPER); }
+__inline int (islower)(int c) { return _isctype(c, _LOWER); }
+__inline int (isdigit)(int c) { return _isctype(c, _DIGIT); }
+__inline int (isxdigit)(int c) { return _isctype(c, _HEX); }
+__inline int (isspace)(int c) { return _isctype(c, _SPACE); }
+__inline int (ispunct)(int c) { return _isctype(c, _PUNCT); }
+__inline int (isalnum)(int c) { return _isctype(c, _ALPHA|_DIGIT); }
+__inline int (isprint)(int c) { return _isctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
+__inline int (isgraph)(int c) { return _isctype(c, _PUNCT|_ALPHA|_DIGIT); }
+__inline int (iscntrl)(int c) { return _isctype(c, _CONTROL); }
+__inline int (isascii)(int c) { return ((unsigned)(c) < 0x80); }
+
+# undef _isctype
+
+__inline int (iswalpha)(int c) { return iswctype((unsigned short)(c), _ALPHA); }
+__inline int (iswupper)(int c) { return iswctype((unsigned short)(c), _UPPER); }
+__inline int (iswlower)(int c) { return iswctype((unsigned short)(c), _LOWER); }
+__inline int (iswdigit)(int c) { return iswctype((unsigned short)(c), _DIGIT); }
+__inline int (iswxdigit)(int c) { return iswctype((unsigned short)(c), _HEX); }
+__inline int (iswspace)(int c) { return iswctype((unsigned short)(c), _SPACE); }
+__inline int (iswpunct)(int c) { return iswctype((unsigned short)(c), _PUNCT); }
+__inline int (iswalnum)(int c) { return iswctype((unsigned short)(c), _ALPHA|_DIGIT); }
+__inline int (iswprint)(int c) { return iswctype((unsigned short)(c), _BLANK|_PUNCT|_ALPHA|_DIGIT); }
+__inline int (iswgraph)(int c) { return iswctype((unsigned short)(c), _PUNCT|_ALPHA|_DIGIT); }
+__inline int (iswcntrl)(int c) { return iswctype((unsigned short)(c), _CONTROL); }
+__inline int (iswascii)(int c) { return ((unsigned)(c) < 0x80); }
+
+# endif /* UNDER_CE */
+
+# endif /* _STLP_CTYPE_H_SEEN */
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x219)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+# endif
+
+#endif /* RC_INVOKED */
+
+#endif /* _STLP_CTYPE_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/cwchar b/6/sources/cxx-stl/stlport/stlport/cwchar
new file mode 100644
index 0000000..0b32054
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cwchar
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CWCHAR
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x120
+# define _STLP_CWCHAR
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x120)
+# ifndef _STLP_INTERNAL_CWCHAR
+# include <stl/_cwchar.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x120) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cwchar>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cwchar)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x120)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CWCHAR */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/cwctype b/6/sources/cxx-stl/stlport/stlport/cwctype
new file mode 100644
index 0000000..0e86218
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/cwctype
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CWCTYPE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x121
+# define _STLP_CWCTYPE
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x121)
+# ifndef _STLP_INTERNAL_CWCTYPE
+# include <stl/_cwctype.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x121) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cwctype>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cwctype)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x121)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_CWCTYPE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/deque b/6/sources/cxx-stl/stlport/stlport/deque
new file mode 100644
index 0000000..448f159
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/deque
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_DEQUE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x22
+# include <stl/_prolog.h>
+# define _STLP_DEQUE
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x22)
+# ifndef _STLP_INTERNAL_DEQUE_H
+# include <stl/_deque.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x22) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <deque>
+# else
+# include _STLP_NATIVE_HEADER(deque)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x22)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_DEQUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/errno.h b/6/sources/cxx-stl/stlport/stlport/errno.h
new file mode 100644
index 0000000..bb7999b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/errno.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x205
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x205) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#ifdef _STLP_WCE
+/* only show message when directly including this file in a non-library build */
+# if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x205)
+# pragma message("eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport won't include native errno.h here")
+# endif
+#else
+# ifndef errno
+/* We define the following macro first to guaranty the header reentrancy: */
+# define _STLP_NATIVE_ERRNO_H_INCLUDED
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <errno.h>
+# else
+# include _STLP_NATIVE_C_HEADER(errno.h)
+# endif
+# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x590) && defined (__cplusplus)
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::__errno;
+_STLP_END_NAMESPACE
+# endif
+# endif /* errno */
+
+# if !defined (_STLP_NATIVE_ERRNO_H_INCLUDED)
+/* If errno has been defined before inclusion of native errno.h including it from STLport errno.h
+ * becomes impossible because if:
+ * #define errno foo
+ * then
+ * #include _STLP_NATIVE_C_HEADER(errno.h)
+ * becomes:
+ * #include _STLP_NATIVE_C_HEADER(foo.h)
+ *
+ * To fix this problem you have to find where this definition comes from and include errno.h before it.
+ */
+# error errno has been defined before inclusion of errno.h header.
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x205)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* Local Variables:
+ * mode: C
+ * End:
+ */
diff --git a/6/sources/cxx-stl/stlport/stlport/exception b/6/sources/cxx-stl/stlport/stlport/exception
new file mode 100644
index 0000000..47822e9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/exception
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+// This header exists solely for portability. Normally it just includes
+// the native header <exception>.
+
+#ifndef _STLP_EXCEPTION
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x423
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x423)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_EXCEPTION
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x423) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_EXCEPTION
+# include <stl/_exception.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x423) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+/* If we are here it means that we are in an include called
+ * from the native lib which means that we can simply forward this
+ * call to the native exception header:
+ */
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <exception>
+# else
+# if defined (__DMC__) && (_STLP_OUTERMOST_HEADER_ID == 0x874)
+// Workaround to DMC harcoded typeinfo.h inclusion.
+# include <../include/exception>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
+# endif
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x423)
+# if !defined(_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif /* _STLP_EXCEPTION */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/exception.h b/6/sources/cxx-stl/stlport/stlport/exception.h
new file mode 100644
index 0000000..f4be9af
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/exception.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_OLDSTD_exception
+#define _STLP_OLDSTD_exception
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x824
+# include <stl/_prolog.h>
+#endif
+
+#if defined (__BORLANDC__) || defined (_MSC_VER)
+# include <exception>
+#else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <exception.h>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x824)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_OLDSTD_exception */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/float.h b/6/sources/cxx-stl/stlport/stlport/float.h
new file mode 100644
index 0000000..70fe3ad
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/float.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x203
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x203) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x203)
+# error This header is only reentrant once, it should be modified if it has to be included more.
+#endif
+
+#if defined (_STLP_WCE_EVC3)
+struct _exception;
+#endif
+
+#if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <float.h>
+#else
+# include _STLP_NATIVE_C_HEADER(float.h)
+#endif
+
+#if !defined (__linux__)
+# if defined(__BORLANDC__) && defined (__cplusplus) && (__BORLANDC__ >= 0x560)
+_STLP_BEGIN_NAMESPACE
+using ::_max_dble;
+using ::_max_flt;
+using ::_max_ldble;
+using ::_tiny_ldble;
+_STLP_END_NAMESPACE
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x203)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/fstream b/6/sources/cxx-stl/stlport/stlport/fstream
new file mode 100644
index 0000000..fc4cd1e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/fstream
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+
+// This header defines classes basic_filebuf, basic_ifstream,
+// basic_ofstream, and basic_fstream. These classes represent
+// streambufs and streams whose sources or destinations are files.
+
+#ifndef _STLP_FSTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1025
+# include <stl/_prolog.h>
+# define _STLP_FSTREAM
+# if defined (__DMC__) && defined (_DLL)
+# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1025) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_FSTREAM_H
+# include <stl/_fstream.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1025) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <fstream>
+# else
+# include _STLP_NATIVE_HEADER(fstream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1025)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# if defined (__DMC__) && defined (_DLL)
+# undef _STLP_CLASS_IMPORT_DECLSPEC
+# define _STLP_CLASS_IMPORT_DECLSPEC
+# endif
+#endif
+
+#endif /* _STLP_FSTREAM */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/fstream.h b/6/sources/cxx-stl/stlport/stlport/fstream.h
new file mode 100644
index 0000000..4640033
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/fstream.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_FSTREAM_H
+#define _STLP_FSTREAM_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2026
+# include <stl/_prolog.h>
+#endif
+
+#include <fstream>
+
+// get desired pollution
+#include <iostream.h>
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+# include <using/fstream>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2026)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_FSTREAM_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/functional b/6/sources/cxx-stl/stlport/stlport/functional
new file mode 100644
index 0000000..27e37ab
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/functional
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_FUNCTIONAL
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x27
+# include <stl/_prolog.h>
+# define _STLP_FUNCTIONAL
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x27)
+# ifndef _STLP_INTERNAL_FUNCTION_H
+# include <stl/_function.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x27) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <functional>
+# else
+# include _STLP_NATIVE_HEADER(functional)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x27)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
+
+#include <boost/ref.hpp>
+#include <boost/utility/result_of.hpp>
+#include <boost/bind/placeholders.hpp>
+#include <boost/mem_fn.hpp>
+#include <boost/bind.hpp>
+
+namespace boost {
+
+template<class T> class reference_wrapper;
+template<class T> reference_wrapper<T> const ref(T &);
+template<class T> inline reference_wrapper<T const> const cref(T const &);
+
+template<typename F> struct result_of;
+
+namespace _mfi {
+template<class R, class T> class dm;
+}
+
+template<class R, class T> _mfi::dm<R, T> mem_fn(R T::*f);
+
+} // namespace boost
+
+_STLP_BEGIN_NAMESPACE
+
+namespace tr1 {
+
+using ::boost::reference_wrapper;
+using ::boost::ref;
+using ::boost::cref;
+
+using ::boost::result_of;
+
+using ::boost::mem_fn;
+
+using ::boost::bind;
+
+namespace placeholders {
+ using ::_1;
+ using ::_2;
+ using ::_3;
+ using ::_4;
+ using ::_5;
+ using ::_6;
+ using ::_7;
+ using ::_8;
+ using ::_9;
+} // placeholders
+
+} // namespace tr1
+
+_STLP_END_NAMESPACE
+
+#endif // !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT
+
+#endif /* _STLP_FUNCTIONAL */
+
+#if !defined(_STLP_FUNCTIONAL_FUN) && !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
+
+#ifndef BOOST_FUNCTION_NUM_ARGS // avoid recursive includes
+
+// #ifdef BOOST_FUNCTION_BASE_HEADER
+// #undef BOOST_FUNCTION_BASE_HEADER
+// #endif
+
+// #ifdef BOOST_FUNCTION_PROLOGUE_HPP
+// #undef BOOST_FUNCTION_PROLOGUE_HPP
+// #endif
+
+#define _STLP_FUNCTIONAL_FUN
+
+#ifndef BOOST_FUNCTION_BASE_HEADER // avoid recursive includes
+# include <boost/function.hpp>
+#else
+namespace boost {
+class bad_function_call;
+template<typename Signature, typename Allocator >
+class function;
+template<typename Signature, typename Allocator>
+void swap(function<Signature, Allocator>& f1, function<Signature, Allocator>& f2);
+}
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+namespace tr1 {
+
+using ::boost::bad_function_call;
+using ::boost::function;
+using ::boost::swap;
+
+} // namespace tr1
+
+_STLP_END_NAMESPACE
+
+#endif // !BOOST_FUNCTION_NUM_ARGS
+
+#endif // !_STLP_FUNCTIONAL_REF && !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/hash_map b/6/sources/cxx-stl/stlport/stlport/hash_map
new file mode 100644
index 0000000..0e2422d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/hash_map
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_HASH_MAP
+#define _STLP_HASH_MAP
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x4028
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined (_STLP_NO_EXTENSIONS)
+/* Comment following if you want to use hash constainers even if you ask for
+ * no extension.
+ */
+# error The hash_map and hash_multimap class are STLport extensions.
+#endif
+
+#include <stl/_hash_map.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x4028)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_HASH_MAP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/hash_set b/6/sources/cxx-stl/stlport/stlport/hash_set
new file mode 100644
index 0000000..0fc89ec
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/hash_set
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_HASH_SET
+#define _STLP_HASH_SET
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x4029
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined (_STLP_NO_EXTENSIONS)
+/* Comment following if you want to use hash constainers even if you ask for
+ * no extension.
+ */
+# error The hash_set and hash_multiset class are STLport extensions.
+#endif
+
+#include <stl/_hash_set.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x4029)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_HASH_SET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iomanip b/6/sources/cxx-stl/stlport/stlport/iomanip
new file mode 100644
index 0000000..085564f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iomanip
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOMANIP
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1030
+# include <stl/_prolog.h>
+# define _STLP_IOMANIP
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1030) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_IOMANIP
+# include <stl/_iomanip.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1030) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iomanip>
+# else
+# include _STLP_NATIVE_HEADER(iomanip)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1030)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOMANIP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iomanip.h b/6/sources/cxx-stl/stlport/stlport/iomanip.h
new file mode 100644
index 0000000..1bfb0d2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iomanip.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOMANIP_H
+#define _STLP_IOMANIP_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2031
+# include <stl/_prolog.h>
+#endif
+
+#include <stl/_ioserr.h>
+
+#include <iomanip>
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+_STLP_USING_NAMESPACE(stlport)
+# else
+using _STLP_STD::setiosflags;
+using _STLP_STD::resetiosflags;
+using _STLP_STD::setbase;
+using _STLP_STD::setfill;
+using _STLP_STD::setprecision;
+using _STLP_STD::setw;
+# endif
+#endif /* _STLP_HAS_NO_NAMESPACES */
+
+// get all the pollution we want
+#include <iostream.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2031)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOMANIP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ios b/6/sources/cxx-stl/stlport/stlport/ios
new file mode 100644
index 0000000..12492bb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ios
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOS
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1032
+# include <stl/_prolog.h>
+# define _STLP_IOS
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1032) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_IOS_H
+# include <stl/_ios.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1032) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ios>
+# else
+# include _STLP_NATIVE_HEADER(ios)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1032)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOS */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ios.h b/6/sources/cxx-stl/stlport/stlport/ios.h
new file mode 100644
index 0000000..90ccfbb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ios.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOS_H
+#define _STLP_IOS_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1033
+# include <stl/_prolog.h>
+#endif
+
+#include <ios>
+
+#if defined (_STLP_USE_NAMESPACES)
+# include <using/ios>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1033)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iosfwd b/6/sources/cxx-stl/stlport/stlport/iosfwd
new file mode 100644
index 0000000..1401046
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iosfwd
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOSFWD
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1034
+# include <stl/_prolog.h>
+# define _STLP_IOSFWD
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1034) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1034) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iosfwd>
+# else
+# include _STLP_NATIVE_HEADER(iosfwd)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1034)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOSFWD */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iostream b/6/sources/cxx-stl/stlport/stlport/iostream
new file mode 100644
index 0000000..1241f10
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iostream
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOSTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1037
+# include <stl/_prolog.h>
+# define _STLP_IOSTREAM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1037) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifdef _STLP_REDIRECT_STDSTREAMS
+// for ofstream redirection
+# ifndef _STLP_INTERNAL_FSTREAM_H
+# include <stl/_fstream.h>
+# endif
+# endif
+
+# ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+# endif
+
+# ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+# ifndef _STLP_USE_NAMESPACES
+// in case of SGI iostreams, we have to rename our streams not to clash with those
+// provided in native lib
+# define cin _STLP_cin
+# define cout _STLP_cout
+# define cerr _STLP_cerr
+# define clog _STLP_clog
+# endif
+
+// Note: cin and wcin are both associated with stdio. The C standard
+// (Amendment 1, section 4.6.2.1) says that it is an error to mix
+// wide- and narrow-oriented I/O on the same stream. This implies
+// that it is an error to use both cin and wcin in the same C++
+// program; the same applies to cout and wcout, and cerr/clog and
+// wcerr/wclog.
+
+extern _STLP_DECLSPEC istream cin;
+
+# ifdef _STLP_REDIRECT_STDSTREAMS
+extern _STLP_DECLSPEC ofstream cout;
+extern _STLP_DECLSPEC ofstream cerr;
+extern _STLP_DECLSPEC ofstream clog;
+# else
+extern _STLP_DECLSPEC ostream cout;
+extern _STLP_DECLSPEC ostream cerr;
+extern _STLP_DECLSPEC ostream clog;
+# endif
+
+# ifndef _STLP_NO_WCHAR_T
+extern _STLP_DECLSPEC wistream wcin;
+extern _STLP_DECLSPEC wostream wcout;
+extern _STLP_DECLSPEC wostream wcerr;
+extern _STLP_DECLSPEC wostream wclog;
+# endif
+
+_STLP_END_NAMESPACE
+
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1037) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iostream>
+# else
+# include _STLP_NATIVE_HEADER(iostream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iostream.h b/6/sources/cxx-stl/stlport/stlport/iostream.h
new file mode 100644
index 0000000..2e7a7a9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iostream.h
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_IOSTREAM_H
+#define _STLP_IOSTREAM_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2035
+# include <stl/_prolog.h>
+#endif
+
+#include <iostream>
+
+// Those should be included all separately, as they do contain using declarations
+#include <streambuf.h>
+#include <ostream.h>
+#include <istream.h>
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+_STLP_USING_NAMESPACE(stlport)
+# else
+using _STLP_STD::cin;
+using _STLP_STD::cout;
+using _STLP_STD::clog;
+using _STLP_STD::cerr;
+using _STLP_STD::iostream;
+# ifndef _STLP_NO_WCHAR_T
+using _STLP_STD::wcin;
+using _STLP_STD::wcout;
+using _STLP_STD::wclog;
+using _STLP_STD::wcerr;
+# endif
+# endif
+#endif /* _STLP_HAS_NO_NAMESPACES */
+
+// Obsolete classes for old-style backwards compatibility
+
+
+class istream_withassign : public istream {
+ public:
+ istream_withassign() : istream((streambuf*)0) {}
+ ~istream_withassign() {}
+
+ istream_withassign& operator=(istream& __s) {
+ ios::init(__s.rdbuf());
+ return *this;
+ }
+ istream_withassign& operator=(streambuf* __s) {
+ ios::init(__s);
+ return *this;
+ }
+};
+
+class ostream_withassign : public ostream {
+ public:
+ ostream_withassign() : ostream((streambuf*)0) {}
+ ~ostream_withassign() {}
+
+ ostream_withassign& operator=(ostream& __s) {
+ ios::init(__s.rdbuf());
+ return *this;
+ }
+ ostream_withassign& operator=(streambuf* __s) {
+ ios::init(__s);
+ return *this;
+ }
+};
+
+class iostream_withassign : public iostream {
+ public:
+ iostream_withassign() : iostream((streambuf*)0) {}
+ ~iostream_withassign() {}
+ iostream_withassign & operator=(ios& __i) {
+ ios::init(__i.rdbuf());
+ return *this;
+ }
+ iostream_withassign & operator=(streambuf* __s) {
+ ios::init(__s);
+ return *this;
+ }
+} ;
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_IOSTREAM_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/iso646.h b/6/sources/cxx-stl/stlport/stlport/iso646.h
new file mode 100644
index 0000000..858863a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iso646.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x204
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x204) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* evc3 doesn't have iso646.h */
+#if !defined (_STLP_WCE_EVC3) && !defined (__BORLANDC__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iso646.h>
+# else
+# include _STLP_NATIVE_C_HEADER(iso646.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x204)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/istream b/6/sources/cxx-stl/stlport/stlport/istream
new file mode 100644
index 0000000..d4ca903
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/istream
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_ISTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1036
+# include <stl/_prolog.h>
+# define _STLP_ISTREAM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1036) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1036) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <istream>
+# else
+# include _STLP_NATIVE_HEADER(istream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1036)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_ISTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/istream.h b/6/sources/cxx-stl/stlport/stlport/istream.h
new file mode 100644
index 0000000..d382d96
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/istream.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_ISTREAM_H
+#define _STLP_ISTREAM_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2037
+# include <stl/_prolog.h>
+#endif
+
+#include <stl/_ioserr.h>
+
+#include <istream>
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+_STLP_USING_NAMESPACE(stlport)
+# else
+using _STLP_STD::basic_istream;
+using _STLP_STD::basic_iostream;
+using _STLP_STD::istream;
+using _STLP_STD::iostream;
+using _STLP_STD::ios;
+# ifndef _STLP_NO_WCHAR_T
+using _STLP_STD::wistream;
+using _STLP_STD::wiostream;
+# endif
+using _STLP_STD::ws;
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2037)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_ISTREAM_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/iterator b/6/sources/cxx-stl/stlport/stlport/iterator
new file mode 100644
index 0000000..f8d3dee
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/iterator
@@ -0,0 +1,61 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_ITERATOR
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x38
+# include <stl/_prolog.h>
+# define _STLP_ITERATOR
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x38)
+# ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+# endif
+
+# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H
+# include <stl/_stream_iterator.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x38) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iterator>
+# else
+# include _STLP_NATIVE_HEADER(iterator)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x38)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_ITERATOR */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/limits b/6/sources/cxx-stl/stlport/stlport/limits
new file mode 100644
index 0000000..5333b14
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/limits
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_LIMITS
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x39
+# include <stl/_prolog.h>
+# define _STLP_LIMITS
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x39)
+# ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x39) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <limits>
+# else
+# include _STLP_NATIVE_HEADER(limits)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x39)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_LIMITS */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/limits.h b/6/sources/cxx-stl/stlport/stlport/limits.h
new file mode 100644
index 0000000..aab553b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/limits.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x201
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x201) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if defined(_STLP_WCE_EVC3)
+struct _exception;
+#endif
+
+#if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <limits.h>
+#else
+# include _STLP_NATIVE_C_HEADER(limits.h)
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x201)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/list b/6/sources/cxx-stl/stlport/stlport/list
new file mode 100644
index 0000000..647a8be
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/list
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_LIST
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x40
+# include <stl/_prolog.h>
+# define _STLP_LIST
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x40)
+# ifndef _STLP_INTERNAL_LIST_H
+# include <stl/_list.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x40) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <list>
+# else
+# include _STLP_NATIVE_HEADER(list)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x40)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_LIST */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/locale b/6/sources/cxx-stl/stlport/stlport/locale
new file mode 100644
index 0000000..22cd01f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/locale
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_LOCALE
+
+// Basic framework: class locale and class locale::facet
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1041
+# include <stl/_prolog.h>
+# define _STLP_LOCALE
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1041) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+// Individual facets
+# ifndef _STLP_INTERNAL_CTYPE_H
+# include <stl/_ctype.h>
+# endif
+
+# ifndef _STLP_INTERNAL_CODECVT_H
+# include <stl/_codecvt.h>
+# endif
+
+# ifndef _STLP_INTERNAL_COLLATE_H
+# include <stl/_collate.h>
+# endif
+
+# ifndef _STLP_INTERNAL_NUM_PUT_H
+# include <stl/_num_put.h>
+# endif
+
+# ifndef _STLP_INTERNAL_NUM_GET_H
+# include <stl/_num_get.h>
+# endif
+
+// those never included separately anyway
+# include <stl/_monetary.h>
+# include <stl/_time_facets.h>
+# include <stl/_messages_facets.h>
+
+// some stuff for streambuf iterators ended up defined there
+// Strictly speaking, _istream.h portion is only required for <iterator>, but it may break too many
+// programs if we omit it
+# ifndef _STLP_ISTREAM_H
+# include <stl/_istream.h>
+# endif
+
+// Convenience interfaces
+#undef isspace
+#undef isprint
+#undef iscntrl
+#undef isupper
+#undef islower
+#undef isalpha
+#undef isdigit
+#undef ispunct
+#undef isxdigit
+#undef isalnum
+#undef isgraph
+#undef toupper
+#undef tolower
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT>
+inline bool isspace (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::space, c); }
+
+template <class _CharT>
+inline bool isprint (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::print, c); }
+
+template <class _CharT>
+inline bool iscntrl (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::cntrl, c); }
+
+template <class _CharT>
+inline bool isupper (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::upper, c); }
+
+template <class _CharT>
+inline bool islower (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::lower, c); }
+
+template <class _CharT>
+inline bool isalpha (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alpha, c); }
+
+template <class _CharT>
+inline bool isdigit (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::digit, c); }
+
+template <class _CharT>
+inline bool ispunct (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::punct, c); }
+
+template <class _CharT>
+inline bool isxdigit (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::xdigit, c); }
+
+template <class _CharT>
+inline bool isalnum (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alnum, c); }
+
+template <class _CharT>
+inline bool isgraph (_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::graph, c); }
+
+template <class _CharT>
+inline _CharT toupper(_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).toupper(c); }
+
+template <class _CharT>
+inline _CharT tolower(_CharT c, const locale& loc)
+{ return (use_facet<ctype<_CharT> >(loc)).tolower(c); }
+
+_STLP_END_NAMESPACE
+
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1041) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <locale>
+# else
+# include _STLP_NATIVE_HEADER(locale)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1041)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_LOCALE */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/locale.h b/6/sources/cxx-stl/stlport/stlport/locale.h
new file mode 100644
index 0000000..81b56b4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/locale.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x242
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x242)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# else
+# error STLport include schema violation
+# endif
+#endif
+
+/* evc3 doesn't have locale.h */
+#ifndef _STLP_WCE_EVC3
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <locale.h>
+# else
+# include _STLP_NATIVE_C_HEADER(locale.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x242)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/map b/6/sources/cxx-stl/stlport/stlport/map
new file mode 100644
index 0000000..f30c400
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/map
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_MAP
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x43
+# include <stl/_prolog.h>
+# define _STLP_MAP
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x43)
+# ifndef _STLP_INTERNAL_MAP_H
+# include <stl/_map.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x43) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <map>
+# else
+# include _STLP_NATIVE_HEADER(map)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x43)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_MAP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/math.h b/6/sources/cxx-stl/stlport/stlport/math.h
new file mode 100644
index 0000000..32b666f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/math.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x244
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x244) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if !defined (exception) && (!defined (__KCC) || (__KCC_VERSION < 4000)) && \
+ !(defined(__IBMCPP__) && (500 <= __IBMCPP__)) && !defined(_STLP_WCE_EVC3)
+# define _STLP_EXCEPTION_WAS_REDEFINED 1
+# define exception __math_exception
+#endif
+
+#if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <math.h>
+#else
+# include _STLP_NATIVE_C_HEADER(math.h)
+#endif
+
+#if defined (_STLP_EXCEPTION_WAS_REDEFINED)
+# undef exception
+# undef _STLP_EXCEPTION_WAS_REDEFINED
+#endif
+
+#ifdef _STLP_WCE_EVC3
+# undef _exception
+# define _exception exception
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x244)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/mem.h b/6/sources/cxx-stl/stlport/stlport/mem.h
new file mode 100644
index 0000000..2ebecea
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/mem.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_mem_h
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x245
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x245) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x245) || defined (_STLP_DONT_POP_HEADER_ID)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <mem.h>
+# else
+# include _STLP_NATIVE_C_HEADER(mem.h)
+# endif
+#else
+# if defined (__BORLANDC__) && defined (__USING_CNAME__)
+# define _USING_CNAME_WAS_UNDEFINED
+# undef __USING_CNAME__
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <mem.h>
+# else
+# include _STLP_NATIVE_C_HEADER(mem.h)
+# endif
+
+# if defined (__BORLANDC__) && defined (_USING_CNAME_WAS_UNDEFINED)
+# define __USING_CNAME__
+# define _STLP_mem_h 1
+# undef _USING_CNAME_WAS_UNDEFINED
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x245)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
+
+#endif /* _STLP_mem_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/memory b/6/sources/cxx-stl/stlport/stlport/memory
new file mode 100644
index 0000000..3c0ceb3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/memory
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_MEMORY
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x46
+# include <stl/_prolog.h>
+# define _STLP_MEMORY
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x46)
+# ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+# endif
+
+# ifndef _STLP_INTERNAL_TEMPBUF_H
+# include <stl/_tempbuf.h>
+# endif
+
+# ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H
+# include <stl/_raw_storage_iter.h>
+# endif
+
+# include <stl/_auto_ptr.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x46) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (__MSL__)
+# include _STLP_NATIVE_HEADER(limits)
+# endif
+
+# if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
+# define BOOST_TR1_MEMORY_INCLUDED
+# define BOOST_TR1_FULL_MEMORY_INCLUDED
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <memory>
+# else
+# include _STLP_NATIVE_HEADER(memory)
+# endif
+
+# if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201)
+/* 980401 vss MSL 2.4 Pro 3 Release */
+# include <new_mem.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x46)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#if !defined(_STLP_NO_EXTENSIONS) && defined(_STLP_USE_BOOST_SUPPORT)
+
+namespace boost {
+
+class bad_weak_ptr;
+template<class T> class shared_ptr;
+template<class T> class weak_ptr;
+template<class T> class enable_shared_from_this;
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
+template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
+template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
+template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
+
+namespace detail{
+class shared_count;
+class weak_count;
+}
+
+} // namespace boost
+
+# ifndef BOOST_SHARED_PTR_HPP_INCLUDED
+# include <boost/shared_ptr.hpp>
+# endif
+# ifndef BOOST_WEAK_PTR_HPP_INCLUDED
+# include <boost/weak_ptr.hpp>
+# endif
+# ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED
+# include <boost/enable_shared_from_this.hpp>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+namespace tr1 {
+
+using ::boost::bad_weak_ptr;
+using ::boost::shared_ptr;
+using ::boost::swap;
+using ::boost::static_pointer_cast;
+using ::boost::dynamic_pointer_cast;
+using ::boost::const_pointer_cast;
+using ::boost::get_deleter;
+using ::boost::weak_ptr;
+using ::boost::enable_shared_from_this;
+
+// shared_ptr IO
+// weak_ptr IO
+
+} // namespace tr1
+
+_STLP_END_NAMESPACE
+
+#endif /* !_STLP_NO_EXTENSIONS && _STLP_USE_BOOST_SUPPORT */
+
+#endif /* _STLP_MEMORY */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/new b/6/sources/cxx-stl/stlport/stlport/new
new file mode 100644
index 0000000..974ca44
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/new
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_NEW_HEADER
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x447
+# define _STLP_NEW_HEADER
+# include <stl/_prolog.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x447)
+# ifndef _STLP_NEW_H_HEADER
+# include <stl/_new.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x447) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <new>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(new)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x447)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_NEW */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/new.h b/6/sources/cxx-stl/stlport/stlport/new.h
new file mode 100644
index 0000000..0a9bf33
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/new.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x848
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x848) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if !defined(_STLP_NO_NEW_HEADER)
+# if defined (__BORLANDC__)
+# include <new>
+# elif defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <new.h>
+# elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800 && !defined(_MSC_VER))
+# include _STLP_NATIVE_OLD_STREAMS_HEADER(new.h)
+# else
+# if defined (__GNUC__) && (__GNUC__ >= 3)
+# include _STLP_NATIVE_OLD_STREAMS_HEADER(new.h)
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(new.h)
+# endif
+# endif
+#endif /* !defined(_STLP_NO_NEW_HEADER) */
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x848)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/numeric b/6/sources/cxx-stl/stlport/stlport/numeric
new file mode 100644
index 0000000..79e4647
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/numeric
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_NUMERIC
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x49
+# include <stl/_prolog.h>
+# define _STLP_NUMERIC
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x49)
+# ifndef _STLP_INTERNAL_NUMERIC_H
+# include <stl/_numeric.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x49) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <numeric>
+# else
+# include _STLP_NATIVE_HEADER(numeric)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x49)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_NUMERIC */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ostream b/6/sources/cxx-stl/stlport/stlport/ostream
new file mode 100644
index 0000000..5134d9c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ostream
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_OSTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1050
+# include <stl/_prolog.h>
+# define _STLP_OSTREAM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1050) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_OSTREAM
+# include <stl/_ostream.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1050) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ostream>
+# else
+# include _STLP_NATIVE_HEADER(ostream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1050)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_OSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/ostream.h b/6/sources/cxx-stl/stlport/stlport/ostream.h
new file mode 100644
index 0000000..b6a7664
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/ostream.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_OSTREAM_H
+#define _STLP_OSTREAM_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2051
+# include <stl/_prolog.h>
+#endif
+
+#include <stl/_ioserr.h>
+
+#include <ostream>
+
+#ifdef _STLP_USE_NAMESPACES
+# include <using/ostream>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2051)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_OSTREAM_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/pthread.h b/6/sources/cxx-stl/stlport/stlport/pthread.h
new file mode 100644
index 0000000..4f0d90c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/pthread.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x280
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x280) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if defined (__SUNPRO_CC) || defined (__HP_aCC)
+# include "/usr/include/pthread.h"
+#else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <pthread.h>
+# else
+# include _STLP_NATIVE_C_HEADER(pthread.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x280)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+/*
+ Local Variables:
+ mode:C++
+ End:
+*/
diff --git a/6/sources/cxx-stl/stlport/stlport/pthread_alloc b/6/sources/cxx-stl/stlport/stlport/pthread_alloc
new file mode 100644
index 0000000..c5ccbcb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/pthread_alloc
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_PTHREAD_ALLOC
+#define _STLP_PTHREAD_ALLOC
+
+# ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x52
+# include <stl/_prolog.h>
+# endif
+
+# ifdef _STLP_PRAGMA_ONCE
+# pragma once
+# endif
+
+# include <stl/_pthread_alloc.h>
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x52)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+
+#endif /* _STLP_PTHREAD_ALLOC */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/queue b/6/sources/cxx-stl/stlport/stlport/queue
new file mode 100644
index 0000000..6acd63f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/queue
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_QUEUE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x53
+# include <stl/_prolog.h>
+# define _STLP_QUEUE
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x53)
+# ifndef _STLP_INTERNAL_QUEUE_H
+# include <stl/_queue.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x53) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <queue>
+# else
+# include _STLP_NATIVE_HEADER(queue)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x53)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_QUEUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/rlocks.h b/6/sources/cxx-stl/stlport/stlport/rlocks.h
new file mode 100644
index 0000000..84db1f4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/rlocks.h
@@ -0,0 +1,11 @@
+#ifndef _STLP_misc_rlocks_h
+# define _STLP_misc_rlocks_h
+# if (__SUNPRO_CC >= 0x500 )
+# include <../CCios/rlocks.h>
+# elif defined (__SUNPRO_CC)
+# include <../CC/rlocks.h>
+# else
+# error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers."
+# endif
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/rope b/6/sources/cxx-stl/stlport/stlport/rope
new file mode 100644
index 0000000..4faa36b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/rope
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 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.
+ */
+
+#ifndef _STLP_ROPE
+#define _STLP_ROPE
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x54
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined (_STLP_NO_EXTENSIONS)
+/* Comment following if you want to use rope class even if you ask for
+ * no extension.
+ */
+# error The rope class is a STLport extension.
+#endif
+
+#include <stl/_rope.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x54)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_ROPE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/set b/6/sources/cxx-stl/stlport/stlport/set
new file mode 100644
index 0000000..ed79d89
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/set
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_SET
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x55
+# include <stl/_prolog.h>
+# define _STLP_SET
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x55)
+# ifndef _STLP_INTERNAL_SET_H
+# include <stl/_set.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x55) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <set>
+# else
+# include _STLP_NATIVE_HEADER(set)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x55)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_SET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/setjmp.h b/6/sources/cxx-stl/stlport/stlport/setjmp.h
new file mode 100644
index 0000000..3d3f5ef
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/setjmp.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_SETJMP_H
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x256
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x256) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_SETJMP_H
+#endif
+
+#if defined(_STLP_WCE_EVC3)
+struct _exception;
+#endif
+
+#if !defined (setjmp)
+# define _STLP_NATIVE_SETJMP_H_INCLUDED
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <setjmp.h>
+# else
+# include _STLP_NATIVE_C_HEADER(setjmp.h)
+# endif
+#endif
+
+#if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
+/* See errno.h file for a description of this problem. */
+# error setjmp has been defined before inclusion of setjmp.h header.
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x256)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+#endif /* _STLP_SETJMP_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/signal.h b/6/sources/cxx-stl/stlport/stlport/signal.h
new file mode 100644
index 0000000..27f91be
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/signal.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x257
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x257) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* evc3 and evc4 don't have signal.h */
+#ifndef _STLP_WCE
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <signal.h>
+# else
+# include _STLP_NATIVE_C_HEADER(signal.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x257)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# undef _STLP_DONT_POP_HEADER_ID
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/slist b/6/sources/cxx-stl/stlport/stlport/slist
new file mode 100644
index 0000000..c1930e4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/slist
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 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.
+ *
+ */
+
+#ifndef _STLP_SLIST
+#define _STLP_SLIST
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x58
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined (_STLP_NO_EXTENSIONS)
+/* Comment following if you want to use the slist constainer even if you ask for
+ * no extension.
+ */
+# error The slist class is an STLport extension.
+#endif
+
+#ifndef _STLP_INTERNAL_SLIST_H
+# include <stl/_slist.h>
+#endif
+
+#if defined (_STLP_IMPORT_VENDOR_STD)
+//This is not a Standard header, it might failed for most of
+//the compilers so we comment it for the moment. Should be uncommented
+//on a compiler basis.
+//# include _STLP_NATIVE_HEADER(slist)
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x58)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_SLIST */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/sstream b/6/sources/cxx-stl/stlport/stlport/sstream
new file mode 100644
index 0000000..336bdde
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/sstream
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// This header defines classes basic_stringbuf, basic_istringstream,
+// basic_ostringstream, and basic_stringstream. These classes
+// represent streamsbufs and streams whose sources or destinations are
+// C++ strings.
+
+#ifndef _STLP_SSTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1059
+# include <stl/_prolog.h>
+# define _STLP_SSTREAM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1059) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_SSTREAM
+# include <stl/_sstream.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1059) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <sstream>
+# else
+# include _STLP_NATIVE_HEADER(sstream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1059)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_SSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stack b/6/sources/cxx-stl/stlport/stlport/stack
new file mode 100644
index 0000000..253b31d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stack
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STACK
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x60
+# include <stl/_prolog.h>
+# define _STLP_STACK
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x60)
+# ifndef _STLP_INTERNAL_STACK_H
+# include <stl/_stack.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x60) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stack>
+# else
+# include _STLP_NATIVE_HEADER(stack)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x60)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STACK */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stdarg.h b/6/sources/cxx-stl/stlport/stlport/stdarg.h
new file mode 100644
index 0000000..368e672
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stdarg.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* Workaround for a "misbehaviour" when compiling resource scripts using
+ * eMbedded Visual C++. The standard .rc file includes windows header files,
+ * which in turn include stdarg.h, which results in warnings and errors
+ */
+#if !defined (RC_INVOKED)
+
+# if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x261
+# include <stl/_cprolog.h>
+# elif (_STLP_OUTERMOST_HEADER_ID == 0x261) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# endif
+
+# if defined(_STLP_WCE_EVC3)
+struct _exception;
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stdarg.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stdarg.h)
+# endif
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x261)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+# endif
+#endif /* RC_INVOKED */
diff --git a/6/sources/cxx-stl/stlport/stlport/stddef.h b/6/sources/cxx-stl/stlport/stlport/stddef.h
new file mode 100644
index 0000000..f959c23
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stddef.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x262
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x262) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if defined (_MSC_VER) || defined (__DMC__)
+/* Native stddef.h contains errno macro definition making inclusion of native
+ * errno.h in STLport errno.h impossible. We are then forced to include errno.h
+ * first.
+ */
+# include "errno.h"
+#endif
+
+#if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stddef.h>
+#else
+# include _STLP_NATIVE_C_HEADER(stddef.h)
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x262)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stdexcept b/6/sources/cxx-stl/stlport/stlport/stdexcept
new file mode 100644
index 0000000..dbb96b9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stdexcept
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STDEXCEPT
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x63
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_STDEXCEPT
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x63)
+# ifndef _STLP_INTERNAL_STDEXCEPT
+# include <stl/_stdexcept.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x63) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stdexcept>
+# else
+# include _STLP_NATIVE_HEADER(stdexcept)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x63)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif /* _STLP_STDEXCEPT */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stdio.h b/6/sources/cxx-stl/stlport/stlport/stdio.h
new file mode 100644
index 0000000..e2dbdea
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stdio.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* Workaround for a "misbehaviour" when compiling resource scripts using
+ * eMbedded Visual C++. The standard .rc file includes windows header files,
+ * which in turn include stdarg.h, which results in warnings and errors
+ */
+#if !defined(RC_INVOKED)
+
+# ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x264
+# include <stl/_cprolog.h>
+# elif (_STLP_OUTERMOST_HEADER_ID == 0x264) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# endif
+
+# if defined(_STLP_WCE_EVC3)
+struct _exception;
+# endif
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stdio.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stdio.h)
+# endif
+
+# if defined (__SUNPRO_CC) && !defined (_STRUCT_FILE)
+# define _STRUCT_FILE
+# endif
+
+# if defined (__BORLANDC__) && defined (__cplusplus) && !defined (__linux__)
+_STLP_BEGIN_NAMESPACE
+using __std_alias::_streams;
+_STLP_END_NAMESPACE
+# endif
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x264)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+# endif
+
+#endif /* RC_INVOKED */
diff --git a/6/sources/cxx-stl/stlport/stlport/stdiostream.h b/6/sources/cxx-stl/stlport/stlport/stdiostream.h
new file mode 100644
index 0000000..80a5c67
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stdiostream.h
@@ -0,0 +1,10 @@
+#ifndef _STLP_misc_stdiostream_h
+# define _STLP_misc_stdiostream_h
+# if (__SUNPRO_CC >= 0x500 )
+# include <../CCios/stdiostream.h>
+# else if defined (__SUNPRO_CC)
+# include <../CC/stdiostream.h>
+# else
+# error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers."
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stdlib.h b/6/sources/cxx-stl/stlport/stlport/stdlib.h
new file mode 100644
index 0000000..fd55f8a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stdlib.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* Workaround for a "misbehaviour" when compiling resource scripts using
+ * eMbedded Visual C++. The standard .rc file includes windows header files,
+ * which in turn include stdlib.h, which results in warnings and errors
+ */
+#if !defined (RC_INVOKED)
+
+# if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x265
+# include <stl/_cprolog.h>
+# elif (_STLP_OUTERMOST_HEADER_ID == 0x265) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# endif
+
+# if defined (_STLP_MSVC_LIB) || (defined (__GNUC__) && defined (__MINGW32__)) || \
+ defined (__BORLANDC__) || defined (__DMC__) || \
+ (defined (__HP_aCC) && defined (_REENTRANT))
+/* Native stdlib.h contains errno macro definition making inclusion of native
+ * errno.h in STLport errno.h impossible. We are then forced to include errno.h
+ * first.
+ */
+# include "errno.h"
+# endif
+
+/*
+ forward-declaration for _exception struct; prevents warning message
+ ../include/stdlib.h(817) : warning C4115: '_exception' : named type definition in parentheses
+*/
+# if defined(_STLP_WCE_EVC3)
+struct _exception;
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stdlib.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stdlib.h)
+# endif
+
+/* on evc3/evc4 including stdlib.h also defines setjmp macro */
+# if defined (_STLP_WCE)
+# define _STLP_NATIVE_SETJMP_H_INCLUDED
+# endif
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x265)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+# endif
+
+#endif /* RC_INVOKED */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_abbrevs.h b/6/sources/cxx-stl/stlport/stlport/stl/_abbrevs.h
new file mode 100644
index 0000000..c4acac8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_abbrevs.h
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ABBREVS_H
+# define _STLP_INTERNAL_ABBREVS_H
+
+// ugliness is intentional - to reduce conflicts
+# define input_iterator_tag _In__ItT
+# define output_iterator_tag _Ou__ItT
+# define bidirectional_iterator_tag _Bd__ItT
+# define random_access_iterator_tag _Ra__ItT
+# define input_iterator _In__It
+# define output_iterator _Ou__It
+# define bidirectional_iterator _Bd__It
+# define random_access_iterator _Ra__It
+# define reverse_bidirectional_iterator _rBd__It
+# define reverse_iterator _r__It
+# define back_insert_iterator _bI__It
+# define front_insert_iterator _fI__It
+# define raw_storage_iterator _rS__It
+# define _Const_traits _C_Tr
+# define _Const_Const_traits _CC_Tr
+# define _Nonconst_traits _N_Tr
+# define _Nonconst_Const_traits _NC_Tr
+
+// ugliness is intentional - to reduce conflicts probability
+# define __malloc_alloc M__A
+# define __node_alloc D__A
+# define __new_alloc N__A
+# define __debug_alloc G__A
+# define _STLP_alloc_proxy P__A
+
+# define _Deque_iterator_base _Dq__ItB
+# define _Deque_iterator _Dq__It
+
+# define _Select1st _S1st
+# define _Select2nd _S2nd
+# define __move_source __m_s
+# define _Vector_nonconst_traits _V_nct
+
+# define _Ht_iterator _Ht_It
+
+# define _List_node_base _L__NB
+# define _List_iterator_base _L__ItB
+# define _List_iterator _L__It
+
+# define _Slist_iterator_base _SL__ItB
+# define _Slist_iterator _SL__It
+
+# define _Rb_tree_node_base _rbT__NB
+# define _Rb_tree_node _rbT__N
+# define _Rb_tree_base_iterator _rbT__It
+# define _Rb_tree_base _rbT__B
+
+# if defined (__DMC__) && defined (_STLP_DEBUG)
+# define _NonDbg_hashtable _Nd_Ht
+# define _DBG_iter _d__It
+# endif
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_algo.c b/6/sources/cxx-stl/stlport/stlport/stl/_algo.c
new file mode 100644
index 0000000..b58b92d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_algo.c
@@ -0,0 +1,2028 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_ALGO_C
+#define _STLP_ALGO_C
+
+#if !defined (_STLP_INTERNAL_ALGO_H)
+# include <stl/_algo.h>
+#endif
+
+#ifndef _STLP_INTERNAL_TEMPBUF_H
+# include <stl/_tempbuf.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter, class _Distance, class _Compare>
+void __merge_without_buffer(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last,
+ _Distance __len1, _Distance __len2,
+ _Compare __comp);
+
+
+template <class _BidirectionalIter1, class _BidirectionalIter2,
+ class _BidirectionalIter3, class _Compare>
+_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
+ _BidirectionalIter1 __last1,
+ _BidirectionalIter2 __first2,
+ _BidirectionalIter2 __last2,
+ _BidirectionalIter3 __result,
+ _Compare __comp);
+
+template <class _Tp>
+#if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
+inline
+#endif
+const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) {
+ if (__a < __b)
+ if (__b < __c)
+ return __b;
+ else if (__a < __c)
+ return __c;
+ else
+ return __a;
+ else if (__a < __c)
+ return __a;
+ else if (__b < __c)
+ return __c;
+ else
+ return __b;
+}
+
+template <class _Tp, class _Compare>
+#if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
+inline
+#endif
+const _Tp&
+__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) {
+ if (__comp(__a, __b)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__b, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ if (__comp(__b, __c)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__c, __b), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return __b;
+ }
+ else if (__comp(__a, __c)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__c, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return __c;
+ }
+ else
+ return __a;
+ }
+ else if (__comp(__a, __c)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__c, __a), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return __a;
+ }
+ else if (__comp(__b, __c)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__c, __b), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return __c;
+ }
+ else
+ return __b;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter1, class _ForwardIter2>
+_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIter2 __p1(__first2);
+
+ if ( ++__p1 == __last2 )
+ return find(__first1, __last1, *__first2);
+
+ // General case.
+
+ for ( ; ; ) { // __first1 != __last1 will be checked in find below
+ __first1 = find(__first1, __last1, *__first2);
+ if (__first1 == __last1)
+ return __last1;
+
+ _ForwardIter2 __p = __p1;
+ _ForwardIter1 __current = __first1;
+ if (++__current == __last1)
+ return __last1;
+
+ while (*__current == *__p) {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+
+ ++__first1;
+ }
+ return __first1;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Integer, class _Tp,
+ class _BinaryPred, class _Distance>
+_RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last,
+ _Integer __count, const _Tp& __val, _BinaryPred __pred,
+ _Distance*, const random_access_iterator_tag &)
+{
+ _Distance __tailSize = __last - __first;
+ const _Distance __pattSize = __count;
+ const _Distance __skipOffset = __pattSize - 1;
+ _RandomAccessIter __backTrack;
+ _Distance __remainder, __prevRemainder;
+
+ for ( _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize >= __pattSize; __lookAhead += __pattSize ) { // the main loop...
+ //__lookAhead here is always pointing to the last element of next possible match.
+ __tailSize -= __pattSize;
+
+ while ( !__pred(*__lookAhead, __val) ) { // the skip loop...
+ if (__tailSize < __pattSize)
+ return __last;
+
+ __lookAhead += __pattSize;
+ __tailSize -= __pattSize;
+ }
+
+ if ( __skipOffset == 0 ) {
+ return (__lookAhead - __skipOffset); //Success
+ }
+
+ __remainder = __skipOffset;
+
+ for (__backTrack = __lookAhead; __pred(*--__backTrack, __val); ) {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset); //Success
+ }
+
+ if (__remainder > __tailSize)
+ return __last; //failure
+
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+
+ while ( __pred(*__lookAhead, __val) ) {
+ __prevRemainder = __remainder;
+ __backTrack = __lookAhead;
+
+ do {
+ if (--__remainder == 0)
+ return (__lookAhead - __skipOffset); //Success
+ } while (__pred(*--__backTrack, __val));
+
+ //adjust remainder for next comparison
+ __remainder += __pattSize - __prevRemainder;
+
+ if (__remainder > __tailSize)
+ return __last; //failure
+
+ __lookAhead += __remainder;
+ __tailSize -= __remainder;
+ }
+
+ //__lookAhead here is always pointing to the element of the last mismatch.
+ }
+
+ return __last; //failure
+}
+
+template <class _ForwardIter, class _Integer, class _Tp,
+ class _Distance, class _BinaryPred>
+_ForwardIter __search_n(_ForwardIter __first, _ForwardIter __last,
+ _Integer __count, const _Tp& __val, _BinaryPred __pred,
+ _Distance*, const forward_iterator_tag &) {
+ for (; (__first != __last) && !__pred(*__first, __val); ++__first) {}
+ while (__first != __last) {
+ _Integer __n = __count - 1;
+ _ForwardIter __i = __first;
+ ++__i;
+ while (__i != __last && __n != 0 && __pred(*__i, __val)) {
+ ++__i;
+ --__n;
+ }
+ if (__n == 0)
+ return __first;
+ else if (__i != __last)
+ for (__first = ++__i; (__first != __last) && !__pred(*__first, __val); ++__first) {}
+ else
+ break;
+ }
+ return __last;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// search_n. Search for __count consecutive copies of __val.
+template <class _ForwardIter, class _Integer, class _Tp>
+_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
+ _Integer __count, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__count <= 0)
+ return __first;
+ if (__count == 1)
+ //We use find when __count == 1 to use potential find overload.
+ return find(__first, __last, __val);
+ return _STLP_PRIV __search_n(__first, __last, __count, __val, equal_to<_Tp>(),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter),
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
+}
+
+template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
+_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
+ _Integer __count, const _Tp& __val,
+ _BinaryPred __binary_pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__count <= 0)
+ return __first;
+ return _STLP_PRIV __search_n(__first, __last, __count, __val, __binary_pred,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter),
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
+}
+
+template <class _ForwardIter1, class _ForwardIter2>
+_ForwardIter1
+find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ return _STLP_PRIV __find_end(__first1, __last1, __first2, __last2,
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+ _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
+ _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
+#else
+ forward_iterator_tag(),
+ forward_iterator_tag(),
+#endif
+ _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1))
+ );
+}
+
+// unique and unique_copy
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator, class _BinaryPredicate,
+ class _Tp>
+_STLP_INLINE_LOOP _OutputIterator
+__unique_copy(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result,
+ _BinaryPredicate __binary_pred, _Tp*) {
+ _Tp __val = *__first;
+ *__result = __val;
+ while (++__first != __last)
+ if (!__binary_pred(__val, *__first)) {
+ __val = *__first;
+ *++__result = __val;
+ }
+ return ++__result;
+}
+
+template <class _InputIter, class _OutputIter, class _BinaryPredicate>
+inline _OutputIter
+__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
+ _BinaryPredicate __binary_pred, const output_iterator_tag &) {
+ return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred,
+ _STLP_VALUE_TYPE(__first, _InputIter));
+}
+
+template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
+_STLP_INLINE_LOOP _ForwardIter
+__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result,
+ _BinaryPredicate __binary_pred, const forward_iterator_tag &) {
+ *__result = *__first;
+ while (++__first != __last)
+ if (!__binary_pred(*__result, *__first)) *++__result = *__first;
+ return ++__result;
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _InputIterator, class _BidirectionalIterator, class _BinaryPredicate>
+inline _BidirectionalIterator
+__unique_copy(_InputIterator __first, _InputIterator __last,
+ _BidirectionalIterator __result, _BinaryPredicate __binary_pred,
+ const bidirectional_iterator_tag &) {
+ return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
+}
+
+template <class _InputIterator, class _RandomAccessIterator, class _BinaryPredicate>
+inline _RandomAccessIterator
+__unique_copy(_InputIterator __first, _InputIterator __last,
+ _RandomAccessIterator __result, _BinaryPredicate __binary_pred,
+ const random_access_iterator_tag &) {
+ return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
+}
+#endif /* _STLP_NONTEMPL_BASE_MATCH_BUG */
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _OutputIter>
+_OutputIter
+unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __result;
+ return _STLP_PRIV __unique_copy(__first, __last, __result,
+ _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first, _InputIter)),
+ _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
+}
+
+template <class _InputIter, class _OutputIter, class _BinaryPredicate>
+_OutputIter
+unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
+ _BinaryPredicate __binary_pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __result;
+ return _STLP_PRIV __unique_copy(__first, __last, __result, __binary_pred,
+ _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
+}
+
+// rotate and rotate_copy, and their auxiliary functions
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Distance>
+_ForwardIter __rotate_aux(_ForwardIter __first,
+ _ForwardIter __middle,
+ _ForwardIter __last,
+ _Distance*,
+ const forward_iterator_tag &) {
+ if (__first == __middle)
+ return __last;
+ if (__last == __middle)
+ return __first;
+
+ _ForwardIter __first2 = __middle;
+ do {
+ _STLP_STD::swap(*__first++, *__first2++);
+ if (__first == __middle)
+ __middle = __first2;
+ } while (__first2 != __last);
+
+ _ForwardIter __new_middle = __first;
+
+ __first2 = __middle;
+
+ while (__first2 != __last) {
+ _STLP_STD::swap (*__first++, *__first2++);
+ if (__first == __middle)
+ __middle = __first2;
+ else if (__first2 == __last)
+ __first2 = __middle;
+ }
+
+ return __new_middle;
+}
+
+template <class _BidirectionalIter, class _Distance>
+_BidirectionalIter __rotate_aux(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last,
+ _Distance*,
+ const bidirectional_iterator_tag &) {
+ if (__first == __middle)
+ return __last;
+ if (__last == __middle)
+ return __first;
+
+ _STLP_PRIV __reverse(__first, __middle, bidirectional_iterator_tag());
+ _STLP_PRIV __reverse(__middle, __last, bidirectional_iterator_tag());
+
+ while (__first != __middle && __middle != __last)
+ _STLP_STD::swap(*__first++, *--__last);
+
+ if (__first == __middle) {
+ _STLP_PRIV __reverse(__middle, __last, bidirectional_iterator_tag());
+ return __last;
+ }
+ else {
+ _STLP_PRIV __reverse(__first, __middle, bidirectional_iterator_tag());
+ return __first;
+ }
+}
+
+// rotate and rotate_copy, and their auxiliary functions
+template <class _EuclideanRingElement>
+_STLP_INLINE_LOOP
+_EuclideanRingElement __gcd(_EuclideanRingElement __m,
+ _EuclideanRingElement __n) {
+ while (__n != 0) {
+ _EuclideanRingElement __t = __m % __n;
+ __m = __n;
+ __n = __t;
+ }
+ return __m;
+}
+
+template <class _RandomAccessIter, class _Distance, class _Tp>
+_RandomAccessIter __rotate_aux(_RandomAccessIter __first,
+ _RandomAccessIter __middle,
+ _RandomAccessIter __last,
+ _Distance *, _Tp *) {
+
+ _Distance __n = __last - __first;
+ _Distance __k = __middle - __first;
+ _Distance __l = __n - __k;
+ _RandomAccessIter __result = __first + (__last - __middle);
+
+ if (__k == 0) /* __first == middle */
+ return __last;
+
+ if (__k == __l) {
+ _STLP_STD::swap_ranges(__first, __middle, __middle);
+ return __result;
+ }
+
+ _Distance __d = _STLP_PRIV __gcd(__n, __k);
+
+ for (_Distance __i = 0; __i < __d; __i++) {
+ _Tp __tmp = *__first;
+ _RandomAccessIter __p = __first;
+
+ if (__k < __l) {
+ for (_Distance __j = 0; __j < __l/__d; __j++) {
+ if (__p > __first + __l) {
+ *__p = *(__p - __l);
+ __p -= __l;
+ }
+
+ *__p = *(__p + __k);
+ __p += __k;
+ }
+ }
+
+ else {
+ for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
+ if (__p < __last - __k) {
+ *__p = *(__p + __k);
+ __p += __k;
+ }
+
+ *__p = * (__p - __l);
+ __p -= __l;
+ }
+ }
+
+ *__p = __tmp;
+ ++__first;
+ }
+
+ return __result;
+}
+
+template <class _RandomAccessIter, class _Distance>
+inline _RandomAccessIter
+__rotate_aux(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last,
+ _Distance * __dis, const random_access_iterator_tag &) {
+ return _STLP_PRIV __rotate_aux(__first, __middle, __last,
+ __dis, _STLP_VALUE_TYPE(__first, _RandomAccessIter));
+}
+
+template <class _ForwardIter>
+_ForwardIter
+__rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first, __middle))
+ _STLP_DEBUG_CHECK(__check_range(__middle, __last))
+ return __rotate_aux(__first, __middle, __last,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter),
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter>
+void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) {
+ _STLP_PRIV __rotate(__first, __middle, __last);
+}
+
+// Return a random number in the range [0, __n). This function encapsulates
+// whether we're using rand (part of the standard C library) or lrand48
+// (not standard, but a much better choice whenever it's available).
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Distance>
+inline _Distance __random_number(_Distance __n) {
+#ifdef _STLP_NO_DRAND48
+ return rand() % __n;
+#else
+ return lrand48() % __n;
+#endif
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void random_shuffle(_RandomAccessIter __first,
+ _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return;
+ for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+ iter_swap(__i, __first + _STLP_PRIV __random_number((__i - __first) + 1));
+}
+
+template <class _RandomAccessIter, class _RandomNumberGenerator>
+void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
+ _RandomNumberGenerator &__rand) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return;
+ for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+ iter_swap(__i, __first + __rand((__i - __first) + 1));
+}
+
+#if !defined (_STLP_NO_EXTENSIONS)
+// random_sample and random_sample_n (extensions, not part of the standard).
+template <class _ForwardIter, class _OutputIter, class _Distance>
+_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
+ _OutputIter __out_ite, const _Distance __n) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Distance __remaining = _STLP_STD::distance(__first, __last);
+ _Distance __m = (min) (__n, __remaining);
+
+ while (__m > 0) {
+ if (_STLP_PRIV __random_number(__remaining) < __m) {
+ *__out_ite = *__first;
+ ++__out_ite;
+ --__m;
+ }
+
+ --__remaining;
+ ++__first;
+ }
+ return __out_ite;
+}
+
+
+template <class _ForwardIter, class _OutputIter, class _Distance,
+ class _RandomNumberGenerator>
+_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
+ _OutputIter __out_ite, const _Distance __n,
+ _RandomNumberGenerator& __rand) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Distance __remaining = _STLP_STD::distance(__first, __last);
+ _Distance __m = (min) (__n, __remaining);
+
+ while (__m > 0) {
+ if (__rand(__remaining) < __m) {
+ *__out_ite = *__first;
+ ++__out_ite;
+ --__m;
+ }
+
+ --__remaining;
+ ++__first;
+ }
+ return __out_ite;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _RandomAccessIter, class _Distance>
+_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_ite,
+ const _Distance __n) {
+ _Distance __m = 0;
+ _Distance __t = __n;
+ for ( ; __first != __last && __m < __n; ++__m, ++__first)
+ __out_ite[__m] = *__first;
+
+ while (__first != __last) {
+ ++__t;
+ _Distance __M = __random_number(__t);
+ if (__M < __n)
+ __out_ite[__M] = *__first;
+ ++__first;
+ }
+
+ return __out_ite + __m;
+}
+
+template <class _InputIter, class _RandomAccessIter,
+ class _RandomNumberGenerator, class _Distance>
+_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_ite,
+ _RandomNumberGenerator& __rand,
+ const _Distance __n) {
+ _Distance __m = 0;
+ _Distance __t = __n;
+ for ( ; __first != __last && __m < __n; ++__m, ++__first)
+ __out_ite[__m] = *__first;
+
+ while (__first != __last) {
+ ++__t;
+ _Distance __M = __rand(__t);
+ if (__M < __n)
+ __out_ite[__M] = *__first;
+ ++__first;
+ }
+
+ return __out_ite + __m;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _RandomAccessIter>
+_RandomAccessIter
+random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_first, _RandomAccessIter __out_last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__out_first, __out_last))
+ return _STLP_PRIV __random_sample(__first, __last,
+ __out_first, __out_last - __out_first);
+}
+
+template <class _InputIter, class _RandomAccessIter, class _RandomNumberGenerator>
+_RandomAccessIter
+random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_first, _RandomAccessIter __out_last,
+ _RandomNumberGenerator& __rand) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__out_first, __out_last))
+ return _STLP_PRIV __random_sample(__first, __last,
+ __out_first, __rand,
+ __out_last - __out_first);
+}
+
+#endif /* _STLP_NO_EXTENSIONS */
+
+// partition, stable_partition, and their auxiliary functions
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Predicate>
+_STLP_INLINE_LOOP _ForwardIter __partition(_ForwardIter __first,
+ _ForwardIter __last,
+ _Predicate __pred,
+ const forward_iterator_tag &) {
+ if (__first == __last) return __first;
+
+ while (__pred(*__first))
+ if (++__first == __last) return __first;
+
+ _ForwardIter __next = __first;
+
+ while (++__next != __last) {
+ if (__pred(*__next)) {
+ _STLP_STD::swap(*__first, *__next);
+ ++__first;
+ }
+ }
+ return __first;
+}
+
+template <class _BidirectionalIter, class _Predicate>
+_STLP_INLINE_LOOP _BidirectionalIter __partition(_BidirectionalIter __first,
+ _BidirectionalIter __last,
+ _Predicate __pred,
+ const bidirectional_iterator_tag &) {
+ for (;;) {
+ for (;;) {
+ if (__first == __last)
+ return __first;
+ else if (__pred(*__first))
+ ++__first;
+ else
+ break;
+ }
+ --__last;
+ for (;;) {
+ if (__first == __last)
+ return __first;
+ else if (!__pred(*__last))
+ --__last;
+ else
+ break;
+ }
+ iter_swap(__first, __last);
+ ++__first;
+ }
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _BidirectionalIter, class _Predicate>
+inline
+_BidirectionalIter __partition(_BidirectionalIter __first,
+ _BidirectionalIter __last,
+ _Predicate __pred,
+ const random_access_iterator_tag &) {
+ return __partition(__first, __last, __pred, bidirectional_iterator_tag());
+}
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Predicate>
+_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __partition(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
+}
+
+
+/* __pred_of_first: false if we know that __pred(*__first) is false,
+ * true when we don't know the result of __pred(*__first).
+ * __not_pred_of_before_last: true if we know that __pred(*--__last) is true,
+ * false when we don't know the result of __pred(*--__last).
+ */
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Predicate, class _Distance>
+_ForwardIter __inplace_stable_partition(_ForwardIter __first,
+ _ForwardIter __last,
+ _Predicate __pred, _Distance __len,
+ bool __pred_of_first, bool __pred_of_before_last) {
+ if (__len == 1)
+ return (__pred_of_first && (__pred_of_before_last || __pred(*__first))) ? __last : __first;
+ _ForwardIter __middle = __first;
+ _Distance __half_len = __len / 2;
+ _STLP_STD::advance(__middle, __half_len);
+ return _STLP_PRIV __rotate(_STLP_PRIV __inplace_stable_partition(__first, __middle, __pred, __half_len, __pred_of_first, false),
+ __middle,
+ _STLP_PRIV __inplace_stable_partition(__middle, __last, __pred, __len - __half_len, true, __pred_of_before_last));
+}
+
+template <class _ForwardIter, class _Pointer, class _Predicate,
+ class _Distance>
+_ForwardIter __stable_partition_adaptive(_ForwardIter __first,
+ _ForwardIter __last,
+ _Predicate __pred, _Distance __len,
+ _Pointer __buffer, _Distance __buffer_size,
+ bool __pred_of_first, bool __pred_of_before_last) {
+ if (__len <= __buffer_size) {
+ _ForwardIter __result1 = __first;
+ _Pointer __result2 = __buffer;
+ if ((__first != __last) && (!__pred_of_first || __pred(*__first))) {
+ *__result2 = *__first;
+ ++__result2; ++__first; --__len;
+ }
+ for (; __first != __last ; ++__first, --__len) {
+ if (((__len == 1) && (__pred_of_before_last || __pred(*__first))) ||
+ ((__len != 1) && __pred(*__first))){
+ *__result1 = *__first;
+ ++__result1;
+ }
+ else {
+ *__result2 = *__first;
+ ++__result2;
+ }
+ }
+ _STLP_STD::copy(__buffer, __result2, __result1);
+ return __result1;
+ }
+ else {
+ _ForwardIter __middle = __first;
+ _Distance __half_len = __len / 2;
+ _STLP_STD::advance(__middle, __half_len);
+ return _STLP_PRIV __rotate(_STLP_PRIV __stable_partition_adaptive(__first, __middle, __pred,
+ __half_len, __buffer, __buffer_size,
+ __pred_of_first, false),
+ __middle,
+ _STLP_PRIV __stable_partition_adaptive(__middle, __last, __pred,
+ __len - __half_len, __buffer, __buffer_size,
+ true, __pred_of_before_last));
+ }
+}
+
+template <class _ForwardIter, class _Predicate, class _Tp, class _Distance>
+inline _ForwardIter
+__stable_partition_aux_aux(_ForwardIter __first, _ForwardIter __last,
+ _Predicate __pred, _Tp*, _Distance*, bool __pred_of_before_last) {
+ _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last);
+ _STLP_MPWFIX_TRY //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
+ return (__buf.size() > 0) ?
+ __stable_partition_adaptive(__first, __last, __pred,
+ _Distance(__buf.requested_size()),
+ __buf.begin(), __buf.size(),
+ false, __pred_of_before_last) :
+ __inplace_stable_partition(__first, __last, __pred,
+ _Distance(__buf.requested_size()),
+ false, __pred_of_before_last);
+ _STLP_MPWFIX_CATCH //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
+}
+
+template <class _ForwardIter, class _Predicate>
+_ForwardIter
+__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, _Predicate __pred,
+ const forward_iterator_tag &) {
+ return __stable_partition_aux_aux(__first, __last, __pred,
+ _STLP_VALUE_TYPE(__first, _ForwardIter),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter), false);
+}
+
+template <class _BidirectIter, class _Predicate>
+_BidirectIter
+__stable_partition_aux(_BidirectIter __first, _BidirectIter __last, _Predicate __pred,
+ const bidirectional_iterator_tag &) {
+ for (--__last;;) {
+ if (__first == __last)
+ return __first;
+ else if (!__pred(*__last))
+ --__last;
+ else
+ break;
+ }
+ ++__last;
+ //Here we know that __pred(*--__last) is true
+ return __stable_partition_aux_aux(__first, __last, __pred,
+ _STLP_VALUE_TYPE(__first, _BidirectIter),
+ _STLP_DISTANCE_TYPE(__first, _BidirectIter), true);
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _BidirectIter, class _Predicate>
+_BidirectIter
+__stable_partition_aux(_BidirectIter __first, _BidirectIter __last, _Predicate __pred,
+ const random_access_iterator_tag &) {
+ return __stable_partition_aux(__first, __last, __pred, bidirectional_iterator_tag());
+}
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Predicate>
+_ForwardIter
+stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for (;;) {
+ if (__first == __last)
+ return __first;
+ else if (__pred(*__first))
+ ++__first;
+ else
+ break;
+ }
+ return _STLP_PRIV __stable_partition_aux(__first, __last, __pred,
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+_RandomAccessIter __unguarded_partition(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _Tp __pivot, _Compare __comp) {
+ for (;;) {
+ while (__comp(*__first, __pivot)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__pivot, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ ++__first;
+ }
+ --__last;
+ while (__comp(__pivot, *__last)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__last, __pivot), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ --__last;
+ }
+ if (!(__first < __last))
+ return __first;
+ iter_swap(__first, __last);
+ ++__first;
+ }
+}
+
+// sort() and its auxiliary functions.
+#define __stl_threshold 16
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val,
+ _Compare __comp) {
+ _RandomAccessIter __next = __last;
+ --__next;
+ while (__comp(__val, *__next)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__next, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__last = *__next;
+ __last = __next;
+ --__next;
+ }
+ *__last = __val;
+}
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+inline void __linear_insert(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Tp __val, _Compare __comp) {
+ //*TY 12/26/1998 - added __val as a paramter
+ // _Tp __val = *__last; //*TY 12/26/1998 - __val supplied by caller
+ if (__comp(__val, *__first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ copy_backward(__first, __last, __last + 1);
+ *__first = __val;
+ }
+ else
+ __unguarded_linear_insert(__last, __val, __comp);
+}
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+void __insertion_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _Tp *, _Compare __comp) {
+ if (__first == __last) return;
+ for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+ __linear_insert<_RandomAccessIter, _Tp, _Compare>(__first, __i, *__i, __comp); //*TY 12/26/1998 - supply *__i as __val
+}
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+void __unguarded_insertion_sort_aux(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _Tp*, _Compare __comp) {
+ for (_RandomAccessIter __i = __first; __i != __last; ++__i)
+ __unguarded_linear_insert<_RandomAccessIter, _Tp, _Compare>(__i, *__i, __comp);
+}
+
+template <class _RandomAccessIter, class _Compare>
+inline void __unguarded_insertion_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _Compare __comp) {
+ __unguarded_insertion_sort_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
+}
+
+template <class _RandomAccessIter, class _Compare>
+void __final_insertion_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Compare __comp) {
+ if (__last - __first > __stl_threshold) {
+ __insertion_sort(__first, __first + __stl_threshold, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+ __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp);
+ }
+ else
+ __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+}
+
+template <class _RandomAccessIter, class _Tp, class _Size, class _Compare>
+void __introsort_loop(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Tp*,
+ _Size __depth_limit, _Compare __comp) {
+ while (__last - __first > __stl_threshold) {
+ if (__depth_limit == 0) {
+ partial_sort(__first, __last, __last, __comp);
+ return;
+ }
+ --__depth_limit;
+ _RandomAccessIter __cut =
+ __unguarded_partition(__first, __last,
+ _Tp(__median(*__first,
+ *(__first + (__last - __first)/2),
+ *(__last - 1), __comp)),
+ __comp);
+ __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp);
+ __last = __cut;
+ }
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void sort(_RandomAccessIter __first, _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first != __last) {
+ _STLP_PRIV __introsort_loop(__first, __last,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_PRIV __lg(__last - __first) * 2,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
+ _STLP_PRIV __final_insertion_sort(__first, __last,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
+ }
+}
+
+template <class _RandomAccessIter, class _Compare>
+void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first != __last) {
+ _STLP_PRIV __introsort_loop(__first, __last,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_PRIV __lg(__last - __first) * 2, __comp);
+ _STLP_PRIV __final_insertion_sort(__first, __last, __comp);
+ }
+}
+
+// stable_sort() and its auxiliary functions.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Compare>
+void __inplace_stable_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Compare __comp) {
+ if (__last - __first < 15) {
+ __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+ return;
+ }
+ _RandomAccessIter __middle = __first + (__last - __first) / 2;
+ __inplace_stable_sort(__first, __middle, __comp);
+ __inplace_stable_sort(__middle, __last, __comp);
+ __merge_without_buffer(__first, __middle, __last,
+ __middle - __first,
+ __last - __middle,
+ __comp);
+}
+
+template <class _RandomAccessIter1, class _RandomAccessIter2,
+ class _Distance, class _Compare>
+void __merge_sort_loop(_RandomAccessIter1 __first,
+ _RandomAccessIter1 __last,
+ _RandomAccessIter2 __result, _Distance __step_size,
+ _Compare __comp) {
+ _Distance __two_step = 2 * __step_size;
+
+ while (__last - __first >= __two_step) {
+ __result = merge(__first, __first + __step_size,
+ __first + __step_size, __first + __two_step,
+ __result,
+ __comp);
+ __first += __two_step;
+ }
+ __step_size = (min) (_Distance(__last - __first), __step_size);
+
+ merge(__first, __first + __step_size,
+ __first + __step_size, __last,
+ __result,
+ __comp);
+}
+
+const int __stl_chunk_size = 7;
+
+template <class _RandomAccessIter, class _Distance, class _Compare>
+void __chunk_insertion_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _Distance __chunk_size, _Compare __comp) {
+ while (__last - __first >= __chunk_size) {
+ __insertion_sort(__first, __first + __chunk_size,
+ _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+ __first += __chunk_size;
+ }
+ __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+}
+
+template <class _RandomAccessIter, class _Pointer, class _Distance,
+ class _Compare>
+void __merge_sort_with_buffer(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Pointer __buffer,
+ _Distance*, _Compare __comp) {
+ _Distance __len = __last - __first;
+ _Pointer __buffer_last = __buffer + __len;
+
+ _Distance __step_size = __stl_chunk_size;
+ __chunk_insertion_sort(__first, __last, __step_size, __comp);
+
+ while (__step_size < __len) {
+ __merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
+ __step_size *= 2;
+ __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
+ __step_size *= 2;
+ }
+}
+
+template <class _BidirectionalIter1, class _BidirectionalIter2,
+ class _Distance>
+_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first,
+ _BidirectionalIter1 __middle,
+ _BidirectionalIter1 __last,
+ _Distance __len1, _Distance __len2,
+ _BidirectionalIter2 __buffer,
+ _Distance __buffer_size) {
+ if (__len1 > __len2 && __len2 <= __buffer_size) {
+ _BidirectionalIter2 __buffer_end = _STLP_STD::copy(__middle, __last, __buffer);
+ _STLP_STD::copy_backward(__first, __middle, __last);
+ return _STLP_STD::copy(__buffer, __buffer_end, __first);
+ }
+ else if (__len1 <= __buffer_size) {
+ _BidirectionalIter2 __buffer_end = _STLP_STD::copy(__first, __middle, __buffer);
+ _STLP_STD::copy(__middle, __last, __first);
+ return _STLP_STD::copy_backward(__buffer, __buffer_end, __last);
+ }
+ else
+ return _STLP_PRIV __rotate(__first, __middle, __last);
+}
+
+template <class _BidirectionalIter, class _Distance, class _Pointer,
+ class _Compare>
+void __merge_adaptive(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last,
+ _Distance __len1, _Distance __len2,
+ _Pointer __buffer, _Distance __buffer_size,
+ _Compare __comp) {
+ if (__len1 <= __len2 && __len1 <= __buffer_size) {
+ _Pointer __buffer_end = _STLP_STD::copy(__first, __middle, __buffer);
+ _STLP_STD::merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
+ }
+ else if (__len2 <= __buffer_size) {
+ _Pointer __buffer_end = _STLP_STD::copy(__middle, __last, __buffer);
+ _STLP_PRIV __merge_backward(__first, __middle, __buffer, __buffer_end, __last,
+ __comp);
+ }
+ else {
+ _BidirectionalIter __first_cut = __first;
+ _BidirectionalIter __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2) {
+ __len11 = __len1 / 2;
+ _STLP_STD::advance(__first_cut, __len11);
+ __second_cut = _STLP_STD::lower_bound(__middle, __last, *__first_cut, __comp);
+ __len22 += _STLP_STD::distance(__middle, __second_cut);
+ }
+ else {
+ __len22 = __len2 / 2;
+ _STLP_STD::advance(__second_cut, __len22);
+ __first_cut = _STLP_STD::upper_bound(__first, __middle, *__second_cut, __comp);
+ __len11 += _STLP_STD::distance(__first, __first_cut);
+ }
+ _BidirectionalIter __new_middle =
+ __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11,
+ __len22, __buffer, __buffer_size);
+ __merge_adaptive(__first, __first_cut, __new_middle, __len11,
+ __len22, __buffer, __buffer_size, __comp);
+ __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
+ __len2 - __len22, __buffer, __buffer_size, __comp);
+ }
+}
+
+template <class _RandomAccessIter, class _Pointer, class _Distance,
+ class _Compare>
+void __stable_sort_adaptive(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Pointer __buffer,
+ _Distance __buffer_size, _Compare __comp) {
+ _Distance __len = (__last - __first + 1) / 2;
+ _RandomAccessIter __middle = __first + __len;
+ if (__len > __buffer_size) {
+ __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size,
+ __comp);
+ __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size,
+ __comp);
+ }
+ else {
+ __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0,
+ __comp);
+ __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0,
+ __comp);
+ }
+ __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
+ _Distance(__last - __middle), __buffer, __buffer_size,
+ __comp);
+}
+
+template <class _RandomAccessIter, class _Tp, class _Distance, class _Compare>
+void __stable_sort_aux(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Tp*, _Distance*,
+ _Compare __comp) {
+ _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last);
+ if (buf.begin() == 0)
+ __inplace_stable_sort(__first, __last, __comp);
+ else
+ __stable_sort_adaptive(__first, __last, buf.begin(),
+ _Distance(buf.size()),
+ __comp);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void stable_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_PRIV __stable_sort_aux(__first, __last,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIter),
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
+}
+
+template <class _RandomAccessIter, class _Compare>
+void stable_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_PRIV __stable_sort_aux(__first, __last,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIter),
+ __comp);
+}
+
+// partial_sort, partial_sort_copy, and auxiliary functions.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
+ _RandomAccessIter __last, _Tp*, _Compare __comp) {
+ make_heap(__first, __middle, __comp);
+ for (_RandomAccessIter __i = __middle; __i < __last; ++__i) {
+ if (__comp(*__i, *__first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first, *__i), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __pop_heap(__first, __middle, __i, _Tp(*__i), __comp,
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIter));
+ }
+ }
+ sort_heap(__first, __middle, __comp);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
+ _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
+ _STLP_PRIV __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
+}
+
+template <class _RandomAccessIter, class _Compare>
+void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
+ _RandomAccessIter __last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
+ _STLP_PRIV __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _RandomAccessIter, class _Compare,
+ class _Distance, class _Tp>
+_RandomAccessIter __partial_sort_copy(_InputIter __first,
+ _InputIter __last,
+ _RandomAccessIter __result_first,
+ _RandomAccessIter __result_last,
+ _Compare __comp, _Distance*, _Tp*) {
+ if (__result_first == __result_last) return __result_last;
+ _RandomAccessIter __result_real_last = __result_first;
+ while(__first != __last && __result_real_last != __result_last) {
+ *__result_real_last = *__first;
+ ++__result_real_last;
+ ++__first;
+ }
+ make_heap(__result_first, __result_real_last, __comp);
+ while (__first != __last) {
+ if (__comp(*__first, *__result_first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__result_first, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __adjust_heap(__result_first, _Distance(0),
+ _Distance(__result_real_last - __result_first),
+ _Tp(*__first),
+ __comp);
+ }
+ ++__first;
+ }
+ sort_heap(__result_first, __result_real_last, __comp);
+ return __result_real_last;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _RandomAccessIter>
+_RandomAccessIter
+partial_sort_copy(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __result_first, _RandomAccessIter __result_last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__result_first, __result_last))
+ return _STLP_PRIV __partial_sort_copy(__first, __last, __result_first, __result_last,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _InputIter)),
+ _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
+ _STLP_VALUE_TYPE(__first, _InputIter));
+}
+
+template <class _InputIter, class _RandomAccessIter, class _Compare>
+_RandomAccessIter
+partial_sort_copy(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __result_first,
+ _RandomAccessIter __result_last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__result_first, __result_last))
+ return _STLP_PRIV __partial_sort_copy(__first, __last, __result_first, __result_last,
+ __comp,
+ _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
+ _STLP_VALUE_TYPE(__first, _InputIter));
+}
+
+// nth_element() and its auxiliary functions.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Tp, class _Compare>
+void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
+ _RandomAccessIter __last, _Tp*, _Compare __comp) {
+ while (__last - __first > 3) {
+ _RandomAccessIter __cut =
+ __unguarded_partition(__first, __last,
+ _Tp(__median(*__first,
+ *(__first + (__last - __first)/2),
+ *(__last - 1),
+ __comp)),
+ __comp);
+ if (__cut <= __nth)
+ __first = __cut;
+ else
+ __last = __cut;
+ }
+ __insertion_sort(__first, __last, _STLP_VALUE_TYPE(__first,_RandomAccessIter), __comp);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
+ _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __nth))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__nth, __last))
+ _STLP_PRIV __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter),
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
+}
+
+template <class _RandomAccessIter, class _Compare>
+void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
+ _RandomAccessIter __last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __nth))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__nth, __last))
+ _STLP_PRIV __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
+}
+
+// Binary search (lower_bound, upper_bound, equal_range, binary_search).
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp,
+ class _Compare1, class _Compare2, class _Distance>
+_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare1 __comp1, _Compare2 __comp2, _Distance*) {
+ _Distance __len = _STLP_STD::distance(__first, __last);
+ _Distance __half;
+
+ while (__len > 0) {
+ __half = __len >> 1;
+ _ForwardIter __middle = __first;
+ _STLP_STD::advance(__middle, __half);
+ if (__comp2(__val, *__middle)) {
+ _STLP_VERBOSE_ASSERT(!__comp1(*__middle, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __len = __half;
+ }
+ else {
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ }
+ return __first;
+}
+
+template <class _ForwardIter, class _Tp,
+ class _Compare1, class _Compare2, class _Distance>
+pair<_ForwardIter, _ForwardIter>
+__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare1 __comp1, _Compare2 __comp2, _Distance* __dist) {
+ _Distance __len = _STLP_STD::distance(__first, __last);
+ _Distance __half;
+
+ while (__len > 0) {
+ __half = __len >> 1;
+ _ForwardIter __middle = __first;
+ _STLP_STD::advance(__middle, __half);
+ if (__comp1(*__middle, __val)) {
+ _STLP_VERBOSE_ASSERT(!__comp2(__val, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else if (__comp2(__val, *__middle)) {
+ _STLP_VERBOSE_ASSERT(!__comp1(*__middle, __val), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __len = __half;
+ }
+ else {
+ _ForwardIter __left = _STLP_PRIV __lower_bound(__first, __middle, __val, __comp1, __comp2, __dist);
+ //Small optim: If lower_bound haven't found an equivalent value
+ //there is no need to call upper_bound.
+ if (__comp1(*__left, __val)) {
+ _STLP_VERBOSE_ASSERT(!__comp2(__val, *__left), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return pair<_ForwardIter, _ForwardIter>(__left, __left);
+ }
+ _STLP_STD::advance(__first, __len);
+ _ForwardIter __right = _STLP_PRIV __upper_bound(++__middle, __first, __val, __comp1, __comp2, __dist);
+ return pair<_ForwardIter, _ForwardIter>(__left, __right);
+ }
+ }
+ return pair<_ForwardIter, _ForwardIter>(__first, __first);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (*__first2 < *__first1) {
+ *__result = *__first2;
+ ++__first2;
+ }
+ else {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
+}
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (__comp(*__first2, *__first1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__result = *__first2;
+ ++__first2;
+ }
+ else {
+ *__result = *__first1;
+ ++__first1;
+ }
+ ++__result;
+ }
+ return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter, class _Distance, class _Compare>
+void __merge_without_buffer(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last,
+ _Distance __len1, _Distance __len2,
+ _Compare __comp) {
+ if (__len1 == 0 || __len2 == 0)
+ return;
+ if (__len1 + __len2 == 2) {
+ if (__comp(*__middle, *__first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ iter_swap(__first, __middle);
+ }
+ return;
+ }
+ _BidirectionalIter __first_cut = __first;
+ _BidirectionalIter __second_cut = __middle;
+ _Distance __len11 = 0;
+ _Distance __len22 = 0;
+ if (__len1 > __len2) {
+ __len11 = __len1 / 2;
+ _STLP_STD::advance(__first_cut, __len11);
+ __second_cut = _STLP_STD::lower_bound(__middle, __last, *__first_cut, __comp);
+ __len22 += _STLP_STD::distance(__middle, __second_cut);
+ }
+ else {
+ __len22 = __len2 / 2;
+ _STLP_STD::advance(__second_cut, __len22);
+ __first_cut = _STLP_STD::upper_bound(__first, __middle, *__second_cut, __comp);
+ __len11 += _STLP_STD::distance(__first, __first_cut);
+ }
+ _BidirectionalIter __new_middle
+ = _STLP_PRIV __rotate(__first_cut, __middle, __second_cut);
+ __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22,
+ __comp);
+ __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11,
+ __len2 - __len22, __comp);
+}
+
+template <class _BidirectionalIter1, class _BidirectionalIter2,
+ class _BidirectionalIter3, class _Compare>
+_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
+ _BidirectionalIter1 __last1,
+ _BidirectionalIter2 __first2,
+ _BidirectionalIter2 __last2,
+ _BidirectionalIter3 __result,
+ _Compare __comp) {
+ if (__first1 == __last1)
+ return copy_backward(__first2, __last2, __result);
+ if (__first2 == __last2)
+ return copy_backward(__first1, __last1, __result);
+ --__last1;
+ --__last2;
+ for (;;) {
+ if (__comp(*__last2, *__last1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__last1, *__last2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *--__result = *__last1;
+ if (__first1 == __last1)
+ return copy_backward(__first2, ++__last2, __result);
+ --__last1;
+ }
+ else {
+ *--__result = *__last2;
+ if (__first2 == __last2)
+ return copy_backward(__first1, ++__last1, __result);
+ --__last2;
+ }
+ }
+}
+
+template <class _BidirectionalIter, class _Tp,
+ class _Distance, class _Compare>
+inline void __inplace_merge_aux(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last, _Tp*, _Distance*,
+ _Compare __comp) {
+ _Distance __len1 = _STLP_STD::distance(__first, __middle);
+ _Distance __len2 = _STLP_STD::distance(__middle, __last);
+
+ _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last);
+ if (__buf.begin() == 0)
+ __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
+ else
+ __merge_adaptive(__first, __middle, __last, __len1, __len2,
+ __buf.begin(), _Distance(__buf.size()),
+ __comp);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _BidirectionalIter>
+void inplace_merge(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
+ if (__first == __middle || __middle == __last)
+ return;
+ _STLP_PRIV __inplace_merge_aux(__first, __middle, __last,
+ _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
+}
+
+template <class _BidirectionalIter, class _Compare>
+void inplace_merge(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __middle))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__middle, __last))
+ if (__first == __middle || __middle == __last)
+ return;
+ _STLP_PRIV __inplace_merge_aux(__first, __middle, __last,
+ _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
+ __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _Compare>
+bool __includes(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__comp(*__first2, *__first1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return false;
+ }
+ else if (__comp(*__first1, *__first2))
+ ++__first1;
+ else
+ ++__first1, ++__first2;
+
+ return __first2 == __last2;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _Compare>
+bool includes(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
+ return _STLP_PRIV __includes(__first1, __last1, __first2, __last2, __comp);
+}
+
+template <class _InputIter1, class _InputIter2>
+bool includes(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2) {
+ return _STLP_PRIV __includes(__first1, __last1, __first2, __last2,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter __set_union(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (__comp(*__first1, *__first2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__result = *__first1;
+ ++__first1;
+ }
+ else if (__comp(*__first2, *__first1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__result = *__first2;
+ ++__first2;
+ }
+ else {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ }
+ ++__result;
+ }
+ return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result) {
+ return _STLP_PRIV __set_union(__first1, __last1, __first2, __last2, __result,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
+}
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ return _STLP_PRIV __set_union(__first1, __last1, __first2, __last2, __result, __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter __set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__comp(*__first1, *__first2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ ++__first1;
+ }
+ else if (__comp(*__first2, *__first1))
+ ++__first2;
+ else {
+ *__result = *__first1;
+ ++__first1;
+ ++__first2;
+ ++__result;
+ }
+ return __result;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result) {
+ return _STLP_PRIV __set_intersection(__first1, __last1, __first2, __last2, __result,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
+}
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ return _STLP_PRIV __set_intersection(__first1, __last1, __first2, __last2, __result, __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter __set_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2)
+ if (__comp(*__first1, *__first2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (__comp(*__first2, *__first1))
+ ++__first2;
+ else {
+ ++__first1;
+ ++__first2;
+ }
+ return _STLP_STD::copy(__first1, __last1, __result);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result) {
+ return _STLP_PRIV __set_difference(__first1, __last1, __first2, __last2, __result,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
+}
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ return _STLP_PRIV __set_difference(__first1, __last1, __first2, __last2, __result, __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
+_OutputIter
+__set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (__comp(*__first1, *__first2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *__result = *__first1;
+ ++__first1;
+ ++__result;
+ }
+ else if (__comp(*__first2, *__first1)) {
+ *__result = *__first2;
+ ++__first2;
+ ++__result;
+ }
+ else {
+ ++__first1;
+ ++__first2;
+ }
+ }
+ return _STLP_STD::copy(__first2, __last2, _STLP_STD::copy(__first1, __last1, __result));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter
+set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result) {
+ return _STLP_PRIV __set_symmetric_difference(__first1, __last1, __first2, __last2, __result,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
+}
+
+template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
+_OutputIter
+set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result,
+ _Compare __comp) {
+ return _STLP_PRIV __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp);
+}
+
+// min_element and max_element, with and without an explicitly supplied
+// comparison function.
+
+template <class _ForwardIter>
+_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __first;
+ _ForwardIter __result = __first;
+ while (++__first != __last)
+ if (*__result < *__first) {
+ _STLP_VERBOSE_ASSERT(!(*__first < *__result), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __result = __first;
+ }
+ return __result;
+}
+
+template <class _ForwardIter, class _Compare>
+_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __first;
+ _ForwardIter __result = __first;
+ while (++__first != __last) {
+ if (__comp(*__result, *__first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first, *__result), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __result = __first;
+ }
+ }
+ return __result;
+}
+
+template <class _ForwardIter>
+_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __first;
+ _ForwardIter __result = __first;
+ while (++__first != __last)
+ if (*__first < *__result) {
+ _STLP_VERBOSE_ASSERT(!(*__result < *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __result = __first;
+ }
+ return __result;
+}
+
+template <class _ForwardIter, class _Compare>
+_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last) return __first;
+ _ForwardIter __result = __first;
+ while (++__first != __last) {
+ if (__comp(*__first, *__result)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__result, *__first), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __result = __first;
+ }
+ }
+ return __result;
+}
+
+// next_permutation and prev_permutation, with and without an explicitly
+// supplied comparison function.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter, class _Compare>
+bool __next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last)
+ return false;
+ _BidirectionalIter __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;) {
+ _BidirectionalIter __ii = __i;
+ --__i;
+ if (__comp(*__i, *__ii)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__ii, *__i), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ _BidirectionalIter __j = __last;
+ while (!__comp(*__i, *--__j)) {}
+ iter_swap(__i, __j);
+ reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first) {
+ reverse(__first, __last);
+ return false;
+ }
+ }
+#if defined (_STLP_NEED_UNREACHABLE_RETURN)
+ return false;
+#endif
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _BidirectionalIter>
+bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __next_permutation(__first, __last,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
+}
+
+template <class _BidirectionalIter, class _Compare>
+bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __next_permutation(__first, __last, __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter, class _Compare>
+bool __prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp) {
+ if (__first == __last)
+ return false;
+ _BidirectionalIter __i = __first;
+ ++__i;
+ if (__i == __last)
+ return false;
+ __i = __last;
+ --__i;
+
+ for(;;) {
+ _BidirectionalIter __ii = __i;
+ --__i;
+ if (__comp(*__ii, *__i)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__i, *__ii), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ _BidirectionalIter __j = __last;
+ while (!__comp(*--__j, *__i)) {}
+ iter_swap(__i, __j);
+ reverse(__ii, __last);
+ return true;
+ }
+ if (__i == __first) {
+ reverse(__first, __last);
+ return false;
+ }
+ }
+#if defined (_STLP_NEED_UNREACHABLE_RETURN)
+ return false;
+#endif
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _BidirectionalIter>
+bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __prev_permutation(__first, __last,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
+}
+
+template <class _BidirectionalIter, class _Compare>
+bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __prev_permutation(__first, __last, __comp);
+}
+
+#if !defined (_STLP_NO_EXTENSIONS)
+
+// is_heap, a predicate testing whether or not a range is
+// a heap. This function is an extension, not part of the C++
+// standard.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Distance, class _StrictWeakOrdering>
+bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
+ _Distance __n) {
+ _Distance __parent = 0;
+ for (_Distance __child = 1; __child < __n; ++__child) {
+ if (__comp(__first[__parent], __first[__child])) {
+ _STLP_VERBOSE_ASSERT(!__comp(__first[__child], __first[__parent]), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return false;
+ }
+ if ((__child & 1) == 0)
+ ++__parent;
+ }
+ return true;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __is_heap(__first, _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)), __last - __first);
+}
+
+template <class _RandomAccessIter, class _StrictWeakOrdering>
+bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
+ _StrictWeakOrdering __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __is_heap(__first, __comp, __last - __first);
+}
+
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _StrictWeakOrdering>
+bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
+ _StrictWeakOrdering __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last)
+ return true;
+
+ _ForwardIter __next = __first;
+ for (++__next; __next != __last; __first = __next, ++__next) {
+ if (__comp(*__next, *__first)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first, *__next), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return false;
+ }
+ }
+
+ return true;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif /* _STLP_NO_EXTENSIONS */
+
+_STLP_END_NAMESPACE
+
+#undef __stl_threshold
+
+#endif /* _STLP_ALGO_C */
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_algo.h b/6/sources/cxx-stl/stlport/stlport/stl/_algo.h
new file mode 100644
index 0000000..01e5f93
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_algo.h
@@ -0,0 +1,745 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ALGO_H
+#define _STLP_INTERNAL_ALGO_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_HEAP_H
+# include <stl/_heap.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#if defined (__SUNPRO_CC) && !defined (_STLP_INTERNAL_CSTDIO)
+// remove() conflict
+# include <stl/_cstdio.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// for_each. Apply a function to every element of a range.
+template <class _InputIter, class _Function>
+_STLP_INLINE_LOOP _Function
+for_each(_InputIter __first, _InputIter __last, _Function __f) {
+ for ( ; __first != __last; ++__first)
+ __f(*__first);
+ return __f;
+}
+
+// count_if
+template <class _InputIter, class _Predicate>
+_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
+count_if(_InputIter __first, _InputIter __last, _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
+ for ( ; __first != __last; ++__first) {
+ if (__pred(*__first))
+ ++__n;
+ }
+ return __n;
+}
+
+// adjacent_find.
+
+template <class _ForwardIter, class _BinaryPredicate>
+_STLP_INLINE_LOOP _ForwardIter
+adjacent_find(_ForwardIter __first, _ForwardIter __last,
+ _BinaryPredicate __binary_pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ if (__first == __last)
+ return __last;
+ _ForwardIter __next = __first;
+ while(++__next != __last) {
+ if (__binary_pred(*__first, *__next))
+ return __first;
+ __first = __next;
+ }
+ return __last;
+}
+
+template <class _ForwardIter>
+_STLP_INLINE_LOOP _ForwardIter
+adjacent_find(_ForwardIter __first, _ForwardIter __last) {
+ return adjacent_find(__first, __last,
+ _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter)));
+}
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+template <class _InputIter, class _Tp, class _Size>
+_STLP_INLINE_LOOP void
+count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ if (*__first == __val)
+ ++__n;
+}
+
+template <class _InputIter, class _Predicate, class _Size>
+_STLP_INLINE_LOOP void
+count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ if (__pred(*__first))
+ ++__n;
+}
+#endif
+
+template <class _ForwardIter1, class _ForwardIter2>
+_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2);
+
+// search_n. Search for __count consecutive copies of __val.
+template <class _ForwardIter, class _Integer, class _Tp>
+_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
+ _Integer __count, const _Tp& __val);
+template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
+_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
+ _Integer __count, const _Tp& __val, _BinaryPred __binary_pred);
+
+template <class _InputIter, class _ForwardIter>
+inline _InputIter find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2);
+}
+
+template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
+inline _InputIter
+find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2, _BinaryPredicate __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2, __comp);
+}
+
+template <class _ForwardIter1, class _ForwardIter2>
+_ForwardIter1
+find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2);
+
+// swap_ranges
+template <class _ForwardIter1, class _ForwardIter2>
+_STLP_INLINE_LOOP _ForwardIter2
+swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2)
+ iter_swap(__first1, __first2);
+ return __first2;
+}
+
+// transform
+template <class _InputIter, class _OutputIter, class _UnaryOperation>
+_STLP_INLINE_LOOP _OutputIter
+transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first, ++__result)
+ *__result = __opr(*__first);
+ return __result;
+}
+template <class _InputIter1, class _InputIter2, class _OutputIter, class _BinaryOperation>
+_STLP_INLINE_LOOP _OutputIter
+transform(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _OutputIter __result,_BinaryOperation __binary_op) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
+ *__result = __binary_op(*__first1, *__first2);
+ return __result;
+}
+
+// replace_if, replace_copy, replace_copy_if
+
+template <class _ForwardIter, class _Predicate, class _Tp>
+_STLP_INLINE_LOOP void
+replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ if (__pred(*__first))
+ *__first = __new_value;
+}
+
+template <class _InputIter, class _OutputIter, class _Tp>
+_STLP_INLINE_LOOP _OutputIter
+replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
+ const _Tp& __old_value, const _Tp& __new_value) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first, ++__result)
+ *__result = *__first == __old_value ? __new_value : *__first;
+ return __result;
+}
+
+template <class _Iterator, class _OutputIter, class _Predicate, class _Tp>
+_STLP_INLINE_LOOP _OutputIter
+replace_copy_if(_Iterator __first, _Iterator __last,
+ _OutputIter __result,
+ _Predicate __pred, const _Tp& __new_value) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first, ++__result)
+ *__result = __pred(*__first) ? __new_value : *__first;
+ return __result;
+}
+
+// generate and generate_n
+
+template <class _ForwardIter, class _Generator>
+_STLP_INLINE_LOOP void
+generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ *__first = __gen();
+}
+
+template <class _OutputIter, class _Size, class _Generator>
+_STLP_INLINE_LOOP void
+generate_n(_OutputIter __first, _Size __n, _Generator __gen) {
+ for ( ; __n > 0; --__n, ++__first)
+ *__first = __gen();
+}
+
+// remove, remove_if, remove_copy, remove_copy_if
+
+template <class _InputIter, class _OutputIter, class _Tp>
+_STLP_INLINE_LOOP _OutputIter
+remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first) {
+ if (!(*__first == __val)) {
+ *__result = *__first;
+ ++__result;
+ }
+ }
+ return __result;
+}
+
+template <class _InputIter, class _OutputIter, class _Predicate>
+_STLP_INLINE_LOOP _OutputIter
+remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first) {
+ if (!__pred(*__first)) {
+ *__result = *__first;
+ ++__result;
+ }
+ }
+ return __result;
+}
+
+template <class _ForwardIter, class _Tp>
+_STLP_INLINE_LOOP _ForwardIter
+remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ __first = find(__first, __last, __val);
+ if (__first == __last)
+ return __first;
+ else {
+ _ForwardIter __next = __first;
+ return remove_copy(++__next, __last, __first, __val);
+ }
+}
+
+template <class _ForwardIter, class _Predicate>
+_STLP_INLINE_LOOP _ForwardIter
+remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ __first = find_if(__first, __last, __pred);
+ if ( __first == __last )
+ return __first;
+ else {
+ _ForwardIter __next = __first;
+ return remove_copy_if(++__next, __last, __first, __pred);
+ }
+}
+
+// unique and unique_copy
+template <class _InputIter, class _OutputIter>
+_OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result);
+
+template <class _InputIter, class _OutputIter, class _BinaryPredicate>
+_OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
+ _BinaryPredicate __binary_pred);
+
+template <class _ForwardIter>
+inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
+ __first = adjacent_find(__first, __last);
+ return unique_copy(__first, __last, __first);
+}
+
+template <class _ForwardIter, class _BinaryPredicate>
+inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last,
+ _BinaryPredicate __binary_pred) {
+ __first = adjacent_find(__first, __last, __binary_pred);
+ return unique_copy(__first, __last, __first, __binary_pred);
+}
+
+// reverse and reverse_copy, and their auxiliary functions
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter>
+_STLP_INLINE_LOOP void
+__reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) {
+ for (; __first != __last && __first != --__last; ++__first)
+ _STLP_STD::iter_swap(__first,__last);
+}
+
+template <class _RandomAccessIter>
+_STLP_INLINE_LOOP void
+__reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) {
+ for (; __first < __last; ++__first)
+ _STLP_STD::iter_swap(__first, --__last);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _BidirectionalIter>
+inline void
+reverse(_BidirectionalIter __first, _BidirectionalIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_PRIV __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter));
+}
+
+template <class _BidirectionalIter, class _OutputIter>
+_STLP_INLINE_LOOP
+_OutputIter reverse_copy(_BidirectionalIter __first,
+ _BidirectionalIter __last,
+ _OutputIter __result) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ while (__first != __last) {
+ --__last;
+ *__result = *__last;
+ ++__result;
+ }
+ return __result;
+}
+
+template <class _ForwardIter>
+void rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last);
+
+template <class _ForwardIter, class _OutputIter>
+inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle,
+ _ForwardIter __last, _OutputIter __result) {
+ return _STLP_STD::copy(__first, __middle, copy(__middle, __last, __result));
+}
+
+// random_shuffle
+
+template <class _RandomAccessIter>
+void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last);
+
+template <class _RandomAccessIter, class _RandomNumberGenerator>
+void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
+ _RandomNumberGenerator& __rand);
+
+#if !defined (_STLP_NO_EXTENSIONS)
+// random_sample and random_sample_n (extensions, not part of the standard).
+
+template <class _ForwardIter, class _OutputIter, class _Distance>
+_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
+ _OutputIter __out_ite, const _Distance __n);
+
+template <class _ForwardIter, class _OutputIter, class _Distance,
+ class _RandomNumberGenerator>
+_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
+ _OutputIter __out_ite, const _Distance __n,
+ _RandomNumberGenerator& __rand);
+
+template <class _InputIter, class _RandomAccessIter>
+_RandomAccessIter
+random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_first, _RandomAccessIter __out_last);
+
+template <class _InputIter, class _RandomAccessIter,
+ class _RandomNumberGenerator>
+_RandomAccessIter
+random_sample(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __out_first, _RandomAccessIter __out_last,
+ _RandomNumberGenerator& __rand);
+
+#endif /* _STLP_NO_EXTENSIONS */
+
+// partition, stable_partition, and their auxiliary functions
+
+template <class _ForwardIter, class _Predicate>
+_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
+
+template <class _ForwardIter, class _Predicate>
+_ForwardIter
+stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
+
+// sort() and its auxiliary functions.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Size>
+inline _Size __lg(_Size __n) {
+ _Size __k;
+ for (__k = 0; __n != 1; __n >>= 1) ++__k;
+ return __k;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _RandomAccessIter>
+void sort(_RandomAccessIter __first, _RandomAccessIter __last);
+template <class _RandomAccessIter, class _Compare>
+void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp);
+
+// stable_sort() and its auxiliary functions.
+template <class _RandomAccessIter>
+void stable_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last);
+
+template <class _RandomAccessIter, class _Compare>
+void stable_sort(_RandomAccessIter __first,
+ _RandomAccessIter __last, _Compare __comp);
+
+// partial_sort, partial_sort_copy, and auxiliary functions.
+
+template <class _RandomAccessIter>
+void partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
+ _RandomAccessIter __last);
+
+template <class _RandomAccessIter, class _Compare>
+void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
+ _RandomAccessIter __last, _Compare __comp);
+
+template <class _InputIter, class _RandomAccessIter>
+_RandomAccessIter
+partial_sort_copy(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __result_first, _RandomAccessIter __result_last);
+
+template <class _InputIter, class _RandomAccessIter, class _Compare>
+_RandomAccessIter
+partial_sort_copy(_InputIter __first, _InputIter __last,
+ _RandomAccessIter __result_first,
+ _RandomAccessIter __result_last, _Compare __comp);
+
+// nth_element() and its auxiliary functions.
+template <class _RandomAccessIter>
+void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
+ _RandomAccessIter __last);
+
+template <class _RandomAccessIter, class _Compare>
+void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
+ _RandomAccessIter __last, _Compare __comp);
+
+// auxiliary class for lower_bound, etc.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _T1, class _T2>
+struct __less_2 {
+ bool operator() (const _T1& __x, const _T2& __y) const { return __x < __y ; }
+};
+
+template <class _T1, class _T2>
+__less_2<_T1,_T2> __less2(_T1*, _T2* ) { return __less_2<_T1, _T2>(); }
+
+#if defined (_STLP_FUNCTION_PARTIAL_ORDER)
+template <class _Tp>
+less<_Tp> __less2(_Tp*, _Tp* ) { return less<_Tp>(); }
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// Binary search (lower_bound, upper_bound, equal_range, binary_search).
+template <class _ForwardIter, class _Tp>
+inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __lower_bound(__first, __last, __val,
+ _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
+ _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+template <class _ForwardIter, class _Tp, class _Compare>
+inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
+_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare1 __comp1, _Compare2 __comp2, _Distance*);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Tp>
+inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __upper_bound(__first, __last, __val,
+ _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
+ _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+template <class _ForwardIter, class _Tp, class _Compare>
+inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val, _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __upper_bound(__first, __last, __val, __comp, __comp,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
+pair<_ForwardIter, _ForwardIter>
+__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare1 __comp1, _Compare2 __comp2, _Distance*);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Tp>
+inline pair<_ForwardIter, _ForwardIter>
+equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __equal_range(__first, __last, __val,
+ _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
+ _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+template <class _ForwardIter, class _Tp, class _Compare>
+inline pair<_ForwardIter, _ForwardIter>
+equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __equal_range(__first, __last, __val, __comp, __comp,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+template <class _ForwardIter, class _Tp>
+inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val,
+ _STLP_PRIV __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
+ _STLP_PRIV __less2((_Tp*)0, _STLP_VALUE_TYPE(__first, _ForwardIter)),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+ return __i != __last && !(__val < *__i);
+}
+
+template <class _ForwardIter, class _Tp, class _Compare>
+inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _ForwardIter __i = _STLP_PRIV __lower_bound(__first, __last, __val, __comp, __comp,
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+ return __i != __last && !__comp(__val, *__i);
+}
+
+// merge, with and without an explicitly supplied comparison function.
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp);
+
+
+// inplace_merge and its auxiliary functions.
+
+
+template <class _BidirectionalIter>
+void inplace_merge(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last) ;
+
+template <class _BidirectionalIter, class _Compare>
+void inplace_merge(_BidirectionalIter __first,
+ _BidirectionalIter __middle,
+ _BidirectionalIter __last, _Compare __comp);
+
+// Set algorithms: includes, set_union, set_intersection, set_difference,
+// set_symmetric_difference. All of these algorithms have the precondition
+// that their input ranges are sorted and the postcondition that their output
+// ranges are sorted.
+
+template <class _InputIter1, class _InputIter2>
+bool includes(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2);
+
+template <class _InputIter1, class _InputIter2, class _Compare>
+bool includes(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2, _Compare __comp);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp);
+
+
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result, _Compare __comp);
+
+template <class _InputIter1, class _InputIter2, class _OutputIter>
+_OutputIter
+set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result);
+
+
+template <class _InputIter1, class _InputIter2, class _OutputIter,
+ class _Compare>
+_OutputIter
+set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _OutputIter __result,
+ _Compare __comp);
+
+
+// min_element and max_element, with and without an explicitly supplied
+// comparison function.
+
+template <class _ForwardIter>
+_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last);
+template <class _ForwardIter, class _Compare>
+_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
+ _Compare __comp);
+
+template <class _ForwardIter>
+_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last);
+
+template <class _ForwardIter, class _Compare>
+_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
+ _Compare __comp);
+
+// next_permutation and prev_permutation, with and without an explicitly
+// supplied comparison function.
+
+template <class _BidirectionalIter>
+bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
+
+template <class _BidirectionalIter, class _Compare>
+bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp);
+
+
+template <class _BidirectionalIter>
+bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
+
+
+template <class _BidirectionalIter, class _Compare>
+bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+ _Compare __comp);
+
+#if !defined (_STLP_NO_EXTENSIONS)
+// is_heap, a predicate testing whether or not a range is
+// a heap. This function is an extension, not part of the C++
+// standard.
+
+template <class _RandomAccessIter>
+bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last);
+
+template <class _RandomAccessIter, class _StrictWeakOrdering>
+bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
+ _StrictWeakOrdering __comp);
+
+// is_sorted, a predicated testing whether a range is sorted in
+// nondescending order. This is an extension, not part of the C++
+// standard.
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _StrictWeakOrdering>
+bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
+ _StrictWeakOrdering __comp);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _ForwardIter>
+inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) {
+ return _STLP_PRIV __is_sorted(__first, __last,
+ _STLP_PRIV __less(_STLP_VALUE_TYPE(__first, _ForwardIter)));
+}
+
+template <class _ForwardIter, class _StrictWeakOrdering>
+inline bool is_sorted(_ForwardIter __first, _ForwardIter __last,
+ _StrictWeakOrdering __comp) {
+ return _STLP_PRIV __is_sorted(__first, __last, __comp);
+}
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_algo.c>
+#endif
+
+#endif /* _STLP_INTERNAL_ALGO_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_algobase.c b/6/sources/cxx-stl/stlport/stlport/stl/_algobase.c
new file mode 100644
index 0000000..157e25c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_algobase.c
@@ -0,0 +1,483 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_ALGOBASE_C
+#define _STLP_ALGOBASE_C
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _InputIter1, class _InputIter2>
+bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ for ( ; __first1 != __last1 && __first2 != __last2
+ ; ++__first1, ++__first2) {
+ if (*__first1 < *__first2) {
+ _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return true;
+ }
+ if (*__first2 < *__first1)
+ return false;
+ }
+ return __first1 == __last1 && __first2 != __last2;
+}
+
+template <class _InputIter1, class _InputIter2, class _Compare>
+bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _Compare __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ for ( ; __first1 != __last1 && __first2 != __last2
+ ; ++__first1, ++__first2) {
+ if (__comp(*__first1, *__first2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first2, *__first1),
+ _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return true;
+ }
+ if (__comp(*__first2, *__first1))
+ return false;
+ }
+ return __first1 == __last1 && __first2 != __last2;
+}
+
+#if !defined (_STLP_NO_EXTENSIONS)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2>
+int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2) {
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (*__first1 < *__first2) {
+ _STLP_VERBOSE_ASSERT(!(*__first2 < *__first1), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ return -1;
+ }
+ if (*__first2 < *__first1)
+ return 1;
+ ++__first1;
+ ++__first2;
+ }
+ if (__first2 == __last2) {
+ return !(__first1 == __last1);
+ }
+ else {
+ return -1;
+ }
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter1, class _InputIter2>
+int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ return _STLP_PRIV __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
+}
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _RandomAccessIter, class _Tp>
+_STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last,
+ const _Tp& __val,
+ const random_access_iterator_tag &) {
+ _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2;
+
+ for ( ; __trip_count > 0 ; --__trip_count) {
+ if (*__first == __val) return __first;
+ ++__first;
+
+ if (*__first == __val) return __first;
+ ++__first;
+
+ if (*__first == __val) return __first;
+ ++__first;
+
+ if (*__first == __val) return __first;
+ ++__first;
+ }
+
+ switch (__last - __first) {
+ case 3:
+ if (*__first == __val) return __first;
+ ++__first;
+ case 2:
+ if (*__first == __val) return __first;
+ ++__first;
+ case 1:
+ if (*__first == __val) return __first;
+ //++__first;
+ case 0:
+ default:
+ return __last;
+ }
+}
+
+inline char*
+__find(char* __first, char* __last, char __val, const random_access_iterator_tag &) {
+ void *res = memchr(__first, __val, __last - __first);
+ return res != 0 ? __STATIC_CAST(char*, res) : __last;
+}
+inline const char*
+__find(const char* __first, const char* __last, char __val, const random_access_iterator_tag &) {
+ const void *res = memchr(__first, __val, __last - __first);
+ return res != 0 ? __STATIC_CAST(const char*, res) : __last;
+}
+
+template <class _RandomAccessIter, class _Predicate>
+_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last,
+ _Predicate __pred,
+ const random_access_iterator_tag &) {
+ _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2;
+
+ for ( ; __trip_count > 0 ; --__trip_count) {
+ if (__pred(*__first)) return __first;
+ ++__first;
+
+ if (__pred(*__first)) return __first;
+ ++__first;
+
+ if (__pred(*__first)) return __first;
+ ++__first;
+
+ if (__pred(*__first)) return __first;
+ ++__first;
+ }
+
+ switch(__last - __first) {
+ case 3:
+ if (__pred(*__first)) return __first;
+ ++__first;
+ case 2:
+ if (__pred(*__first)) return __first;
+ ++__first;
+ case 1:
+ if (__pred(*__first)) return __first;
+ //++__first;
+ case 0:
+ default:
+ return __last;
+ }
+}
+
+template <class _InputIter, class _Tp>
+_STLP_INLINE_LOOP _InputIter __find(_InputIter __first, _InputIter __last,
+ const _Tp& __val,
+ const input_iterator_tag &) {
+ while (__first != __last && !(*__first == __val)) ++__first;
+ return __first;
+}
+
+template <class _InputIter, class _Predicate>
+_STLP_INLINE_LOOP _InputIter __find_if(_InputIter __first, _InputIter __last,
+ _Predicate __pred,
+ const input_iterator_tag &) {
+ while (__first != __last && !__pred(*__first))
+ ++__first;
+ return __first;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _Predicate>
+_InputIter find_if(_InputIter __first, _InputIter __last,
+ _Predicate __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
+}
+
+template <class _InputIter, class _Tp>
+_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
+}
+
+template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
+_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2,
+ _BinaryPred __pred) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ // Test for empty ranges
+ if (__first1 == __last1 || __first2 == __last2)
+ return __first1;
+
+ // Test for a pattern of length 1.
+ _ForwardIter2 __p1(__first2);
+
+ if ( ++__p1 == __last2 ) {
+ while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
+ ++__first1;
+ }
+ return __first1;
+ }
+
+ // General case.
+
+ for ( ; ; ) { // __first1 != __last1 will be checked below
+ while (__first1 != __last1 && !__pred(*__first1, *__first2)) {
+ ++__first1;
+ }
+ if (__first1 == __last1) {
+ return __last1;
+ }
+ _ForwardIter2 __p = __p1;
+ _ForwardIter1 __current = __first1;
+ if (++__current == __last1) return __last1;
+
+ while (__pred(*__current, *__p)) {
+ if (++__p == __last2)
+ return __first1;
+ if (++__current == __last1)
+ return __last1;
+ }
+ ++__first1;
+ }
+ return __first1;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+template <class _Tp>
+struct _IsCharLikeType
+{ typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsCharLikeType<char>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsCharLikeType<unsigned char>
+{ typedef __true_type _Ret; };
+
+# ifndef _STLP_NO_SIGNED_BUILTINS
+_STLP_TEMPLATE_NULL struct _IsCharLikeType<signed char>
+{ typedef __true_type _Ret; };
+# endif
+
+template <class _Tp1, class _Tp2>
+inline bool __stlp_eq(_Tp1 __val1, _Tp2 __val2)
+{ return __val1 == __val2; }
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _Tp>
+inline bool __stlp_eq(_Tp, _Tp)
+{ return true; }
+#endif
+
+template <class _InputIter, class _ForwardIter, class _Tp2, class _Predicate>
+inline _InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2,
+ _Tp2*, _Predicate __pred,
+ const __true_type& /* _UseStrcspnLikeAlgo */) {
+ unsigned char __hints[(UCHAR_MAX + 1) / CHAR_BIT];
+ memset(__hints, 0, sizeof(__hints) / sizeof(unsigned char));
+ for (; __first2 != __last2; ++__first2) {
+ unsigned char __tmp = (unsigned char)*__first2;
+ __hints[__tmp / CHAR_BIT] |= (1 << (__tmp % CHAR_BIT));
+ }
+
+ for (; __first1 != __last1; ++__first1) {
+ _Tp2 __tmp = (_Tp2)*__first1;
+ if (__stlp_eq(*__first1, __tmp) &&
+ __pred((__hints[(unsigned char)__tmp / CHAR_BIT] & (1 << ((unsigned char)__tmp % CHAR_BIT))) != 0))
+ break;
+ }
+ return __first1;
+}
+
+template <class _InputIter, class _ForwardIter, class _Tp2, class _Predicate>
+inline _InputIter __find_first_of_aux2(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2,
+ _Tp2* /* __dummy */, _Predicate /* __pred */,
+ const __false_type& /* _UseStrcspnLikeAlgo */) {
+ return _STLP_PRIV __find_first_of(__first1, __last1, __first2, __last2,
+ _STLP_PRIV __equal_to(_STLP_VALUE_TYPE(__first1, _InputIter)));
+}
+
+template <class _InputIter, class _ForwardIter, class _Tp1, class _Tp2>
+inline _InputIter __find_first_of_aux1(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2,
+ _Tp1* __pt1, _Tp2* __pt2) {
+ typedef _STLP_TYPENAME _STLP_STD::_IsIntegral<_Tp1>::_Ret _IsIntegral;
+ typedef _STLP_TYPENAME _STLP_PRIV _IsCharLikeType<_Tp2>::_Ret _IsCharLike;
+ typedef _STLP_TYPENAME _STLP_STD::_Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
+ return _STLP_PRIV __find_first_of_aux2(__first1, __last1,
+ __first2, __last2,
+ __pt2, _Identity<bool>(), _UseStrcspnLikeAlgo());
+}
+
+template <class _InputIter, class _ForwardIter>
+inline _InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2) {
+ return _STLP_PRIV __find_first_of_aux1(__first1, __last1, __first2, __last2,
+ _STLP_VALUE_TYPE(__first1, _InputIter),
+ _STLP_VALUE_TYPE(__first2, _ForwardIter));
+}
+
+// find_first_of, with and without an explicitly supplied comparison function.
+template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
+_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2,
+ _BinaryPredicate __comp) {
+ for ( ; __first1 != __last1; ++__first1) {
+ for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) {
+ if (__comp(*__first1, *__iter)) {
+ return __first1;
+ }
+ }
+ }
+ return __last1;
+}
+
+// find_end, with and without an explicitly supplied comparison function.
+// Search [first2, last2) as a subsequence in [first1, last1), and return
+// the *last* possible match. Note that find_end for bidirectional iterators
+// is much faster than for forward iterators.
+
+// find_end for forward iterators.
+template <class _ForwardIter1, class _ForwardIter2,
+ class _BinaryPredicate>
+_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2,
+ const forward_iterator_tag &, const forward_iterator_tag &,
+ _BinaryPredicate __comp) {
+ if (__first2 == __last2)
+ return __last1;
+ else {
+ _ForwardIter1 __result = __last1;
+ for (;;) {
+ _ForwardIter1 __new_result = _STLP_STD::search(__first1, __last1, __first2, __last2, __comp);
+ if (__new_result == __last1)
+ return __result;
+ else {
+ __result = __new_result;
+ __first1 = __new_result;
+ ++__first1;
+ }
+ }
+ }
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// find_end for bidirectional iterators. Requires partial specialization.
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+
+# ifndef _STLP_INTERNAL_ITERATOR_H
+_STLP_END_NAMESPACE
+# include <stl/_iterator.h>
+_STLP_BEGIN_NAMESPACE
+# endif /*_STLP_INTERNAL_ITERATOR_H*/
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _BidirectionalIter1, class _BidirectionalIter2,
+ class _BinaryPredicate>
+_BidirectionalIter1
+__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
+ _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+ const bidirectional_iterator_tag &, const bidirectional_iterator_tag &,
+ _BinaryPredicate __comp) {
+ typedef _STLP_STD::reverse_iterator<_BidirectionalIter1> _RevIter1;
+ typedef _STLP_STD::reverse_iterator<_BidirectionalIter2> _RevIter2;
+
+ _RevIter1 __rlast1(__first1);
+ _RevIter2 __rlast2(__first2);
+ _RevIter1 __rresult = _STLP_STD::search(_RevIter1(__last1), __rlast1,
+ _RevIter2(__last2), __rlast2,
+ __comp);
+
+ if (__rresult == __rlast1)
+ return __last1;
+ else {
+ _BidirectionalIter1 __result = __rresult.base();
+ _STLP_STD::advance(__result, -_STLP_STD::distance(__first2, __last2));
+ return __result;
+ }
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+template <class _ForwardIter1, class _ForwardIter2,
+ class _BinaryPredicate>
+_ForwardIter1
+find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2,
+ _BinaryPredicate __comp) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+ return _STLP_PRIV __find_end(__first1, __last1, __first2, __last2,
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+ _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
+ _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
+#else
+ forward_iterator_tag(),
+ forward_iterator_tag(),
+#endif
+ __comp);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
+_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ _Compare1 __comp1, _Compare2 __comp2, _Distance*) {
+ _Distance __len = _STLP_STD::distance(__first, __last);
+ _Distance __half;
+ _ForwardIter __middle;
+
+ while (__len > 0) {
+ __half = __len >> 1;
+ __middle = __first;
+ _STLP_STD::advance(__middle, __half);
+ if (__comp1(*__middle, __val)) {
+ _STLP_VERBOSE_ASSERT(!__comp2(__val, *__middle), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __first = __middle;
+ ++__first;
+ __len = __len - __half - 1;
+ }
+ else
+ __len = __half;
+ }
+ return __first;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_ALGOBASE_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_algobase.h b/6/sources/cxx-stl/stlport/stlport/stl/_algobase.h
new file mode 100644
index 0000000..597dcbe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_algobase.h
@@ -0,0 +1,728 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+#define _STLP_INTERNAL_ALGOBASE_H
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+#endif
+
+#ifndef _STLP_CLIMITS
+# include <climits>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+#ifndef _STLP_INTERNAL_PAIR_H
+# include <stl/_pair.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+#ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+template <class _Tp>
+inline void __swap_aux(_Tp& __a, _Tp& __b, const __true_type& /*SwapImplemented*/) {
+ __a._M_swap_workaround(__b);
+}
+
+template <class _Tp>
+inline void __swap_aux(_Tp& __a, _Tp& __b, const __false_type& /*SwapImplemented*/) {
+ _Tp __tmp = __a;
+ __a = __b;
+ __b = __tmp;
+}
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+// swap and iter_swap
+template <class _Tp>
+inline void swap(_Tp& __a, _Tp& __b) {
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+# if !defined(__BORLANDC__)
+ typedef typename _SwapImplemented<_Tp>::_Ret _Implemented;
+# else
+ enum { _Is = _SwapImplemented<_Tp>::_Is };
+ typedef typename __bool2type<_Is>::_Ret _Implemented;
+# endif
+ _STLP_PRIV __swap_aux(__a, __b, _Implemented());
+#else
+ _Tp __tmp = __a;
+ __a = __b;
+ __b = __tmp;
+#endif
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter1, class _ForwardIter2, class _Value>
+inline void __iter_swap_aux_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, _Value *) {
+ _Value tmp = *__i1;
+ *__i1 = *__i2;
+ *__i2 = tmp;
+}
+
+template <class _ForwardIter1, class _ForwardIter2>
+inline void __iter_swap_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, const __true_type& /*OKToSwap*/) {
+ /* namespace specification breaks access to the right swap template overload (at least for gcc) */
+ /*_STLP_STD::*/ swap(*__i1, *__i2);
+}
+
+template <class _ForwardIter1, class _ForwardIter2>
+inline void __iter_swap_aux(_ForwardIter1& __i1, _ForwardIter2& __i2, const __false_type& /*OKToSwap*/) {
+ _STLP_PRIV __iter_swap_aux_aux( __i1, __i2, _STLP_VALUE_TYPE(__i1,_ForwardIter1) );
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter1, class _ForwardIter2>
+inline void iter_swap(_ForwardIter1 __i1, _ForwardIter2 __i2) {
+ _STLP_PRIV __iter_swap_aux( __i1, __i2, _IsOKToSwap(_STLP_VALUE_TYPE(__i1, _ForwardIter1), _STLP_VALUE_TYPE(__i2, _ForwardIter2),
+ _STLP_IS_REF_TYPE_REAL_REF(__i1, _ForwardIter1),
+ _STLP_IS_REF_TYPE_REAL_REF(__i2, _ForwardIter2))._Answer());
+}
+
+//--------------------------------------------------
+// min and max
+
+#if !defined (__BORLANDC__) || defined (_STLP_USE_OWN_NAMESPACE)
+# if (defined (__BORLANDC__) && (__BORLANDC__ < 0x580)) && !defined (__STDC__)
+//In not ANSI mode Borland import min/max in global namespace which conflict
+//with STLport min/max when user does a 'using namespace std' in its code
+//(see test/unit/alg_test.cpp). To avoid this clash we simply import Borland min/max
+//in STLport namespace.
+using _STLP_VENDOR_STD::min;
+using _STLP_VENDOR_STD::max;
+# else
+template <class _Tp>
+inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; }
+template <class _Tp>
+inline const _Tp& (max)(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; }
+# endif
+#endif
+
+# if defined (__BORLANDC__) && defined (_STLP_USE_OWN_NAMESPACE)
+inline unsigned long (min) (unsigned long __a, unsigned long __b) { return __b < __a ? __b : __a; }
+inline unsigned long (max) (unsigned long __a, unsigned long __b) { return __a < __b ? __b : __a; }
+# endif
+
+# if !defined (__BORLANDC__) || (__BORLANDC__ < 0x590)
+template <class _Tp, class _Compare>
+inline const _Tp& (min)(const _Tp& __a, const _Tp& __b, _Compare __comp) {
+ return __comp(__b, __a) ? __b : __a;
+}
+
+template <class _Tp, class _Compare>
+inline const _Tp& (max)(const _Tp& __a, const _Tp& __b, _Compare __comp) {
+ return __comp(__a, __b) ? __b : __a;
+}
+# else
+template <class _Tp, class _Compare>
+inline const _Tp (min)(const _Tp __a, const _Tp __b, _Compare __comp) {
+ return __comp(__b, __a) ? __b : __a;
+}
+
+template <class _Tp, class _Compare>
+inline const _Tp (max)(const _Tp __a, const _Tp __b, _Compare __comp) {
+ return __comp(__a, __b) ? __b : __a;
+}
+# endif
+
+//--------------------------------------------------
+// copy
+
+// All of these auxiliary functions serve two purposes. (1) Replace
+// calls to copy with memmove whenever possible. (Memmove, not memcpy,
+// because the input and output ranges are permitted to overlap.)
+// (2) If we're using random access iterators, then write the loop as
+// a for loop with an explicit count.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __copy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const input_iterator_tag &, _Distance*) {
+ for ( ; __first != __last; ++__result, ++__first)
+ *__result = *__first;
+ return __result;
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __copy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const forward_iterator_tag &, _Distance* ) {
+ for ( ; __first != __last; ++__result, ++__first)
+ *__result = *__first;
+ return __result;
+}
+
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __copy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const bidirectional_iterator_tag &, _Distance* ) {
+ for ( ; __first != __last; ++__result, ++__first)
+ *__result = *__first;
+ return __result;
+}
+#endif
+
+template <class _RandomAccessIter, class _OutputIter, class _Distance>
+inline _OutputIter
+__copy(_RandomAccessIter __first, _RandomAccessIter __last,
+ _OutputIter __result, const random_access_iterator_tag &, _Distance*) {
+ for (_Distance __n = __last - __first; __n > 0; --__n) {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
+ return __result;
+}
+
+inline void*
+__copy_trivial(const void* __first, const void* __last, void* __result) {
+ size_t __n = (const char*)__last - (const char*)__first;
+ return __n ? (void *)((char*)memmove(__result, __first, __n) + __n) : __result;
+}
+
+//--------------------------------------------------
+// copy_backward auxiliary functions
+
+template <class _BidirectionalIter1, class _BidirectionalIter2,
+ class _Distance>
+inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first,
+ _BidirectionalIter1 __last,
+ _BidirectionalIter2 __result,
+ const bidirectional_iterator_tag &,
+ _Distance*) {
+ while (__first != __last)
+ *--__result = *--__last;
+ return __result;
+}
+
+template <class _RandomAccessIter, class _BidirectionalIter, class _Distance>
+inline _BidirectionalIter __copy_backward(_RandomAccessIter __first,
+ _RandomAccessIter __last,
+ _BidirectionalIter __result,
+ const random_access_iterator_tag &,
+ _Distance*) {
+ for (_Distance __n = __last - __first; __n > 0; --__n)
+ *--__result = *--__last;
+ return __result;
+}
+
+inline void*
+__copy_trivial_backward(const void* __first, const void* __last, void* __result) {
+ const ptrdiff_t _Num = (const char*)__last - (const char*)__first;
+ return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ;
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __false_type& /*IsOKToMemCpy*/) {
+ return _STLP_PRIV __copy(__first, __last, __result, random_access_iterator_tag(), (ptrdiff_t*)0);
+}
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __true_type& /*IsOKToMemCpy*/) {
+ // we know they all pointers, so this cast is OK
+ // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result));
+ return (_OutputIter)_STLP_PRIV __copy_trivial(__first, __last, __result);
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __true_type& /*BothPtrType*/) {
+ return _STLP_PRIV __copy_ptrs(__first, __last, __result,
+ _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
+ _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __false_type& /*BothPtrType*/) {
+ return _STLP_PRIV __copy(__first, __last, __result,
+ _STLP_ITERATOR_CATEGORY(__first, _InputIter),
+ _STLP_DISTANCE_TYPE(__first, _InputIter));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer());
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const __false_type& /*TrivialAssignment*/) {
+ return _STLP_PRIV __copy_backward(__first, __last, __result,
+ _STLP_ITERATOR_CATEGORY(__first, _InputIter),
+ _STLP_DISTANCE_TYPE(__first, _InputIter));
+}
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const __true_type& /*TrivialAssignment*/) {
+ return (_OutputIter)_STLP_PRIV __copy_trivial_backward(__first, __last, __result);
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
+ return _STLP_PRIV __copy_backward(__first, __last, __result,
+ _STLP_ITERATOR_CATEGORY(__first,_InputIter),
+ _STLP_DISTANCE_TYPE(__first, _InputIter));
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
+ return _STLP_PRIV __copy_backward_ptrs(__first, __last, __result,
+ _UseTrivialCopy(_STLP_VALUE_TYPE(__first, _InputIter),
+ _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ return _STLP_PRIV __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter>::_Answer() );
+}
+
+#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
+# define _STLP_DECLARE_COPY_TRIVIAL(_Tp) \
+inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \
+{ return (_Tp*)_STLP_PRIV __copy_trivial(__first, __last, __result); } \
+inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \
+{ return (_Tp*)_STLP_PRIV __copy_trivial_backward(__first, __last, __result); }
+
+# if !defined (_STLP_NO_BOOL)
+_STLP_DECLARE_COPY_TRIVIAL(bool)
+# endif
+_STLP_DECLARE_COPY_TRIVIAL(char)
+# if !defined (_STLP_NO_SIGNED_BUILTINS)
+_STLP_DECLARE_COPY_TRIVIAL(signed char)
+# endif
+_STLP_DECLARE_COPY_TRIVIAL(unsigned char)
+_STLP_DECLARE_COPY_TRIVIAL(short)
+_STLP_DECLARE_COPY_TRIVIAL(unsigned short)
+_STLP_DECLARE_COPY_TRIVIAL(int)
+_STLP_DECLARE_COPY_TRIVIAL(unsigned int)
+_STLP_DECLARE_COPY_TRIVIAL(long)
+_STLP_DECLARE_COPY_TRIVIAL(unsigned long)
+# if !defined(_STLP_NO_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT)
+_STLP_DECLARE_COPY_TRIVIAL(wchar_t)
+# endif
+# if defined (_STLP_LONG_LONG)
+_STLP_DECLARE_COPY_TRIVIAL(_STLP_LONG_LONG)
+_STLP_DECLARE_COPY_TRIVIAL(unsigned _STLP_LONG_LONG)
+# endif
+_STLP_DECLARE_COPY_TRIVIAL(float)
+_STLP_DECLARE_COPY_TRIVIAL(double)
+# if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_DECLARE_COPY_TRIVIAL(long double)
+# endif
+# undef _STLP_DECLARE_COPY_TRIVIAL
+#endif
+
+//--------------------------------------------------
+// copy_n (not part of the C++ standard)
+
+#if !defined (_STLP_NO_EXTENSIONS)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _Size, class _OutputIter>
+_STLP_INLINE_LOOP _STLP_STD::pair<_InputIter, _OutputIter>
+__copy_n(_InputIter __first, _Size __count, _OutputIter __result,
+ const input_iterator_tag &) {
+ for ( ; __count > 0; --__count) {
+ *__result = *__first;
+ ++__first;
+ ++__result;
+ }
+ return _STLP_STD::pair<_InputIter, _OutputIter>(__first, __result);
+}
+
+template <class _RAIter, class _Size, class _OutputIter>
+inline _STLP_STD::pair<_RAIter, _OutputIter>
+__copy_n(_RAIter __first, _Size __count, _OutputIter __result,
+ const random_access_iterator_tag &) {
+ _RAIter __last = __first + __count;
+ return _STLP_STD::pair<_RAIter, _OutputIter>(__last, _STLP_STD::copy(__first, __last, __result));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _Size, class _OutputIter>
+inline pair<_InputIter, _OutputIter>
+copy_n(_InputIter __first, _Size __count, _OutputIter __result) {
+ _STLP_FIX_LITERAL_BUG(__first)
+ return _STLP_PRIV __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
+}
+#endif
+
+//--------------------------------------------------
+// fill and fill_n
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp>
+_STLP_INLINE_LOOP
+void __fill_fwd(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
+ for ( ; __first != __last; ++__first)
+ *__first = __val;
+}
+
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ const input_iterator_tag &, _Distance*) {
+ _STLP_PRIV __fill_fwd(__first, __last, __val);
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _ForwardIter, class _Tp, class _Distance>
+_STLP_INLINE_LOOP
+void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ const forward_iterator_tag &, _Distance*) {
+ _STLP_PRIV __fill_fwd(__first, __last, __val);
+}
+
+template <class _ForwardIter, class _Tp, class _Distance>
+_STLP_INLINE_LOOP
+void __fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+ const bidirectional_iterator_tag &, _Distance*) {
+ _STLP_PRIV __fill_fwd(__first, __last, __val);
+}
+#endif
+
+template <class _RandomAccessIter, class _Tp, class _Distance>
+_STLP_INLINE_LOOP
+void __fill(_RandomAccessIter __first, _RandomAccessIter __last, const _Tp& __val,
+ const random_access_iterator_tag &, _Distance*) {
+ for (_Distance __n = __last - __first ; __n > 0; ++__first, --__n)
+ *__first = __val;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Tp>
+inline void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_PRIV __fill(__first, __last, __val,
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+// Specialization: for one-byte types we can use memset.
+inline void fill(unsigned char* __first, unsigned char* __last,
+ const unsigned char& __val) {
+ unsigned char __tmp = __val;
+ memset(__first, __tmp, __last - __first);
+}
+#if !defined (_STLP_NO_SIGNED_BUILTINS)
+inline void fill(signed char* __first, signed char* __last,
+ const signed char& __val) {
+ signed char __tmp = __val;
+ memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
+}
+#endif
+inline void fill(char* __first, char* __last, const char& __val) {
+ char __tmp = __val;
+ memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _OutputIter, class _Size, class _Tp>
+_STLP_INLINE_LOOP
+_OutputIter __fill_n(_OutputIter __first, _Size __n, const _Tp& __val) {
+ _STLP_FIX_LITERAL_BUG(__first)
+ for ( ; __n > 0; --__n, ++__first)
+ *__first = __val;
+ return __first;
+}
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _Size>
+inline unsigned char* __fill_n(unsigned char* __first, _Size __n,
+ const unsigned char& __val) {
+ _STLP_STD::fill(__first, __first + __n, __val);
+ return __first + __n;
+}
+#if !defined (_STLP_NO_SIGNED_BUILTINS)
+template <class _Size>
+inline signed char* __fill_n(signed char* __first, _Size __n,
+ const signed char& __val) {
+ _STLP_STD::fill(__first, __first + __n, __val);
+ return __first + __n;
+}
+#endif
+template <class _Size>
+inline char* __fill_n(char* __first, _Size __n,
+ const char& __val) {
+ _STLP_STD::fill(__first, __first + __n, __val);
+ return __first + __n;
+}
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _OutputIter, class _Size, class _Tp>
+inline void fill_n(_OutputIter __first, _Size __n, const _Tp& __val) {
+ _STLP_FIX_LITERAL_BUG(__first)
+ _STLP_PRIV __fill_n(__first, __n, __val);
+}
+
+
+//--------------------------------------------------
+// equal and mismatch
+
+template <class _InputIter1, class _InputIter2>
+_STLP_INLINE_LOOP
+_STLP_STD::pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
+ _InputIter1 __last1,
+ _InputIter2 __first2) {
+ _STLP_FIX_LITERAL_BUG(__first2)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ while (__first1 != __last1 && *__first1 == *__first2) {
+ ++__first1;
+ ++__first2;
+ }
+ return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
+}
+
+template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
+_STLP_INLINE_LOOP
+_STLP_STD::pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
+ _InputIter1 __last1,
+ _InputIter2 __first2,
+ _BinaryPredicate __binary_pred) {
+ _STLP_FIX_LITERAL_BUG(__first2)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
+ ++__first1;
+ ++__first2;
+ }
+ return _STLP_STD::pair<_InputIter1, _InputIter2>(__first1, __first2);
+}
+
+template <class _InputIter1, class _InputIter2>
+_STLP_INLINE_LOOP
+bool equal(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2) {
+ _STLP_FIX_LITERAL_BUG(__first1) _STLP_FIX_LITERAL_BUG(__last1) _STLP_FIX_LITERAL_BUG(__first2)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2)
+ if (!(*__first1 == *__first2))
+ return false;
+ return true;
+}
+
+template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
+_STLP_INLINE_LOOP
+bool equal(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _BinaryPredicate __binary_pred) {
+ _STLP_FIX_LITERAL_BUG(__first2)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2)
+ if (!__binary_pred(*__first1, *__first2))
+ return false;
+ return true;
+}
+
+//--------------------------------------------------
+// lexicographical_compare and lexicographical_compare_3way.
+// (the latter is not part of the C++ standard.)
+
+template <class _InputIter1, class _InputIter2>
+bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2);
+
+template <class _InputIter1, class _InputIter2, class _Compare>
+bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _Compare __comp);
+
+inline bool
+lexicographical_compare(const unsigned char* __first1,
+ const unsigned char* __last1,
+ const unsigned char* __first2,
+ const unsigned char* __last2) {
+ const size_t __len1 = __last1 - __first1;
+ const size_t __len2 = __last2 - __first2;
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+
+ const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
+ return __result != 0 ? (__result < 0) : (__len1 < __len2);
+}
+
+
+#if !(CHAR_MAX == SCHAR_MAX)
+inline bool lexicographical_compare(const char* __first1, const char* __last1,
+ const char* __first2, const char* __last2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first2, __last2))
+
+ return lexicographical_compare((const unsigned char*) __first1,
+ (const unsigned char*) __last1,
+ (const unsigned char*) __first2,
+ (const unsigned char*) __last2);
+}
+#endif /* CHAR_MAX == SCHAR_MAX */
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2>
+int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2);
+
+inline int
+__lexicographical_compare_3way(const unsigned char* __first1,
+ const unsigned char* __last1,
+ const unsigned char* __first2,
+ const unsigned char* __last2) {
+ const ptrdiff_t __len1 = __last1 - __first1;
+ const ptrdiff_t __len2 = __last2 - __first2;
+ const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
+ return __result != 0 ? __result
+ : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
+}
+
+
+#if !(CHAR_MAX == SCHAR_MAX)
+inline int
+__lexicographical_compare_3way(const char* __first1, const char* __last1,
+ const char* __first2, const char* __last2) {
+ return __lexicographical_compare_3way((const unsigned char*) __first1,
+ (const unsigned char*) __last1,
+ (const unsigned char*) __first2,
+ (const unsigned char*) __last2);
+}
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if !defined (_STLP_NO_EXTENSIONS)
+template <class _InputIter1, class _InputIter2>
+int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2);
+
+#endif
+
+// count
+template <class _InputIter, class _Tp>
+_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
+count(_InputIter __first, _InputIter __last, const _Tp& __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
+ for ( ; __first != __last; ++__first)
+ if (*__first == __val)
+ ++__n;
+ return __n;
+}
+
+// find and find_if. Note find may be expressed in terms of find_if if appropriate binder was available.
+template <class _InputIter, class _Tp>
+_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val);
+
+template <class _InputIter, class _Predicate>
+_InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred);
+
+// search.
+template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
+_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate);
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// find_first_of
+template <class _InputIter, class _ForwardIter>
+_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2);
+
+template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
+_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
+ _ForwardIter __first2, _ForwardIter __last2,
+ _BinaryPredicate __comp);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter1, class _ForwardIter2,
+ class _BinaryPredicate>
+_ForwardIter1
+find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+ _ForwardIter2 __first2, _ForwardIter2 __last2,
+ _BinaryPredicate __comp);
+
+// replace
+template <class _ForwardIter, class _Tp>
+_STLP_INLINE_LOOP void
+replace(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __old_value, const _Tp& __new_value) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ if (*__first == __old_value)
+ *__first = __new_value;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Tp, class _Compare1, class _Compare2, class _Distance>
+_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __val, _Compare1 __comp1, _Compare2 __comp2, _Distance*);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_algobase.c>
+#endif
+
+#endif /* _STLP_INTERNAL_ALGOBASE_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_alloc.c b/6/sources/cxx-stl/stlport/stlport/stl/_alloc.c
new file mode 100644
index 0000000..467405b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_alloc.c
@@ -0,0 +1,87 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_ALLOC_C
+#define _STLP_ALLOC_C
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#if defined (__WATCOMC__)
+# pragma warning 13 9
+# pragma warning 367 9
+# pragma warning 368 9
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Alloc>
+void * _STLP_CALL __debug_alloc<_Alloc>::allocate(size_t __n) {
+ size_t __total_extra = __extra_before_chunk() + __extra_after_chunk();
+ size_t __real_n = __n + __total_extra;
+ if (__real_n < __n) {
+ //It means that we rolled on size_t, __n must be very large:
+ _STLP_THROW_BAD_ALLOC;
+ }
+ __alloc_header *__result = (__alloc_header *)__allocator_type::allocate(__real_n);
+ memset((char*)__result, __shred_byte, __real_n * sizeof(value_type));
+ __result->__magic = __magic;
+ __result->__type_size = sizeof(value_type);
+ __result->_M_size = (_STLP_UINT32_T)__n;
+ return ((char*)__result) + (long)__extra_before;
+}
+
+template <class _Alloc>
+void _STLP_CALL
+__debug_alloc<_Alloc>::deallocate(void *__p, size_t __n) {
+ __alloc_header * __real_p = (__alloc_header*)((char *)__p -(long)__extra_before);
+ // check integrity
+ _STLP_VERBOSE_ASSERT(__real_p->__magic != __deleted_magic, _StlMsg_DBA_DELETED_TWICE)
+ _STLP_VERBOSE_ASSERT(__real_p->__magic == __magic, _StlMsg_DBA_NEVER_ALLOCATED)
+ _STLP_VERBOSE_ASSERT(__real_p->__type_size == 1,_StlMsg_DBA_TYPE_MISMATCH)
+ _STLP_VERBOSE_ASSERT(__real_p->_M_size == __n, _StlMsg_DBA_SIZE_MISMATCH)
+ // check pads on both sides
+ unsigned char* __tmp;
+ for (__tmp = (unsigned char*)(__real_p + 1); __tmp < (unsigned char*)__p; ++__tmp) {
+ _STLP_VERBOSE_ASSERT(*__tmp == __shred_byte, _StlMsg_DBA_UNDERRUN)
+ }
+
+ size_t __real_n = __n + __extra_before_chunk() + __extra_after_chunk();
+
+ for (__tmp= ((unsigned char*)__p) + __n * sizeof(value_type);
+ __tmp < ((unsigned char*)__real_p) + __real_n ; ++__tmp) {
+ _STLP_VERBOSE_ASSERT(*__tmp == __shred_byte, _StlMsg_DBA_OVERRUN)
+ }
+
+ // that may be unfortunate, just in case
+ __real_p->__magic = __deleted_magic;
+ memset((char*)__p, __shred_byte, __n * sizeof(value_type));
+ __allocator_type::deallocate(__real_p, __real_n);
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_ALLOC_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_alloc.h b/6/sources/cxx-stl/stlport/stlport/stl/_alloc.h
new file mode 100644
index 0000000..09b8af5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_alloc.h
@@ -0,0 +1,580 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+#define _STLP_INTERNAL_ALLOC_H
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NEW_HEADER
+# include <stl/_new.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// Malloc-based allocator. Typically slower than default alloc below.
+// Typically thread-safe and more storage efficient.
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+typedef void (* __oom_handler_type)();
+#endif
+
+class _STLP_CLASS_DECLSPEC __malloc_alloc {
+public:
+ // this one is needed for proper simple_alloc wrapping
+ typedef char value_type;
+ static void* _STLP_CALL allocate(size_t __n)
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+ ;
+#else
+ {
+ void *__result = malloc(__n);
+ if (__result == 0) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ return __result;
+ }
+#endif
+
+ static void _STLP_CALL deallocate(void* __p, size_t /* __n */) { free((char*)__p); }
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+ static __oom_handler_type _STLP_CALL set_malloc_handler(__oom_handler_type __f);
+#endif
+};
+
+// New-based allocator. Typically slower than default alloc below.
+// Typically thread-safe and more storage efficient.
+class _STLP_CLASS_DECLSPEC __new_alloc {
+public:
+ // this one is needed for proper simple_alloc wrapping
+ typedef char value_type;
+ static void* _STLP_CALL allocate(size_t __n) { return __stl_new(__n); }
+ static void _STLP_CALL deallocate(void* __p, size_t) { __stl_delete(__p); }
+};
+
+// Allocator adaptor to check size arguments for debugging.
+// Reports errors using assert. Checking can be disabled with
+// NDEBUG, but it's far better to just use the underlying allocator
+// instead when no checking is desired.
+// There is some evidence that this can confuse Purify.
+// This adaptor can only be applied to raw allocators
+
+template <class _Alloc>
+class __debug_alloc : public _Alloc {
+public:
+ typedef _Alloc __allocator_type;
+ typedef typename _Alloc::value_type value_type;
+private:
+ struct __alloc_header {
+ size_t __magic: 16;
+ size_t __type_size:16;
+ _STLP_UINT32_T _M_size;
+ }; // that is 8 bytes for sure
+ // Sunpro CC has bug on enums, so extra_before/after set explicitly
+ enum { __pad = 8, __magic = 0xdeba, __deleted_magic = 0xdebd,
+ __shred_byte = _STLP_SHRED_BYTE };
+
+ enum { __extra_before = 16, __extra_after = 8 };
+ // Size of space used to store size. Note
+ // that this must be large enough to preserve
+ // alignment.
+ static size_t _STLP_CALL __extra_before_chunk() {
+ return (long)__extra_before / sizeof(value_type) +
+ (size_t)((long)__extra_before % sizeof(value_type) > 0);
+ }
+ static size_t _STLP_CALL __extra_after_chunk() {
+ return (long)__extra_after / sizeof(value_type) +
+ (size_t)((long)__extra_after % sizeof(value_type) > 0);
+ }
+public:
+ __debug_alloc() {}
+ ~__debug_alloc() {}
+ static void* _STLP_CALL allocate(size_t);
+ static void _STLP_CALL deallocate(void *, size_t);
+};
+
+# if defined (__OS400__)
+// dums 02/05/2007: is it really necessary ?
+enum { _MAX_BYTES = 256 };
+# else
+enum { _MAX_BYTES = 32 * sizeof(void*) };
+# endif
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+// Default node allocator.
+// With a reasonable compiler, this should be roughly as fast as the
+// original STL class-specific allocators, but with less fragmentation.
+class _STLP_CLASS_DECLSPEC __node_alloc {
+ static void * _STLP_CALL _M_allocate(size_t& __n);
+ /* __p may not be 0 */
+ static void _STLP_CALL _M_deallocate(void *__p, size_t __n);
+
+public:
+ // this one is needed for proper simple_alloc wrapping
+ typedef char value_type;
+ /* __n must be > 0 */
+ static void* _STLP_CALL allocate(size_t& __n)
+ { return (__n > (size_t)_MAX_BYTES) ? __stl_new(__n) : _M_allocate(__n); }
+ /* __p may not be 0 */
+ static void _STLP_CALL deallocate(void *__p, size_t __n)
+ { if (__n > (size_t)_MAX_BYTES) __stl_delete(__p); else _M_deallocate(__p, __n); }
+};
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__node_alloc>;
+# endif
+
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__new_alloc>;
+_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__malloc_alloc>;
+#endif
+
+/* macro to convert the allocator for initialization
+ * not using MEMBER_TEMPLATE_CLASSES as it should work given template constructor */
+#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+/* if _STLP_NO_TEMPLATE_CONVERSIONS is set, the member template constructor is
+ * not used implicitly to convert allocator parameter, so let us do it explicitly */
+# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS)
+# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
+# else
+# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a
+# endif
+/* else convert, but only if partial specialization works, since else
+ * Container::allocator_type won't be different */
+#else
+# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
+#endif
+
+// Another allocator adaptor: _Alloc_traits. This serves two
+// purposes. First, make it possible to write containers that can use
+// either SGI-style allocators or standard-conforming allocator.
+
+// The fully general version.
+template <class _Tp, class _Allocator>
+struct _Alloc_traits {
+ typedef _Allocator _Orig;
+#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
+ typedef typename _Allocator::_STLP_TEMPLATE rebind<_Tp> _Rebind_type;
+ typedef typename _Rebind_type::other allocator_type;
+ static allocator_type create_allocator(const _Orig& __a)
+ { return allocator_type(_STLP_CONVERT_ALLOCATOR(__a, _Tp)); }
+#else
+ // this is not actually true, used only to pass this type through
+ // to dynamic overload selection in _STLP_alloc_proxy methods
+ typedef _Allocator allocator_type;
+#endif
+};
+
+#if defined (_STLP_USE_PERTHREAD_ALLOC)
+
+_STLP_END_NAMESPACE
+// include additional header here
+# include <stl/_pthread_alloc.h>
+_STLP_BEGIN_NAMESPACE
+
+typedef __pthread_alloc __alloc_type;
+#elif defined (_STLP_USE_NEWALLOC)
+typedef __new_alloc __alloc_type;
+#elif defined (_STLP_USE_MALLOC)
+typedef __malloc_alloc __alloc_type;
+#else
+typedef __node_alloc __alloc_type;
+#endif
+
+#if defined (_STLP_DEBUG_ALLOC)
+typedef __debug_alloc<__alloc_type> __sgi_alloc;
+#else
+typedef __alloc_type __sgi_alloc;
+#endif
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+typedef __sgi_alloc __single_client_alloc;
+typedef __sgi_alloc __multithreaded_alloc;
+#endif
+
+// This implements allocators as specified in the C++ standard.
+//
+// Note that standard-conforming allocators use many language features
+// that are not yet widely implemented. In particular, they rely on
+// member templates, partial specialization, partial ordering of function
+// templates, the typename keyword, and the use of the template keyword
+// to refer to a template member of a dependent type.
+
+/*
+template <class _Tp>
+struct _AllocatorAux {
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+
+ pointer address(reference __x) const {return &__x;}
+ const_pointer address(const_reference __x) const { return &__x; }
+};
+
+template <class _Tp>
+struct _AllocatorAux<const _Tp> {
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+
+ const_pointer address(const_reference __x) const { return &__x; }
+};
+*/
+
+template <class _Tp>
+class allocator //: public _AllocatorAux<_Tp>
+/* A small helper struct to recognize STLport allocator implementation
+ * from any user specialization one.
+ */
+ : public __stlport_class<allocator<_Tp> >
+{
+public:
+ typedef _Tp value_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+ template <class _Tp1> struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+#endif
+ allocator() _STLP_NOTHROW {}
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Tp1> allocator(const allocator<_Tp1>&) _STLP_NOTHROW {}
+#endif
+ allocator(const allocator<_Tp>&) _STLP_NOTHROW {}
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ allocator(__move_source<allocator<_Tp> > src) _STLP_NOTHROW {}
+#endif
+ ~allocator() _STLP_NOTHROW {}
+ pointer address(reference __x) const {return &__x;}
+ const_pointer address(const_reference __x) const { return &__x; }
+ // __n is permitted to be 0. The C++ standard says nothing about what the return value is when __n == 0.
+ _Tp* allocate(size_type __n, const void* = 0) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(_Tp*, __sgi_alloc::allocate(__buf_size));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ return __ret;
+ }
+
+ return 0;
+ }
+ // __p is permitted to be a null pointer, only if n==0.
+ void deallocate(pointer __p, size_type __n) {
+ _STLP_ASSERT( (__p == 0) == (__n == 0) )
+ if (__p != 0) {
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__p, _STLP_SHRED_BYTE, __n * sizeof(value_type));
+#endif
+ __sgi_alloc::deallocate((void*)__p, __n * sizeof(value_type));
+ }
+ }
+#if !defined (_STLP_NO_ANACHRONISMS)
+ // backwards compatibility
+ void deallocate(pointer __p) const { if (__p != 0) __sgi_alloc::deallocate((void*)__p, sizeof(value_type)); }
+#endif
+ size_type max_size() const _STLP_NOTHROW { return size_t(-1) / sizeof(value_type); }
+ void construct(pointer __p, const_reference __val) { _STLP_STD::_Copy_Construct(__p, __val); }
+ void destroy(pointer __p) { _STLP_STD::_Destroy(__p); }
+
+#if defined (_STLP_NO_EXTENSIONS)
+ /* STLport extension giving rounded size of an allocated memory buffer
+ * This method do not have to be part of a user defined allocator implementation
+ * and won't even be called if such a function was granted.
+ */
+protected:
+#endif
+ _Tp* _M_allocate(size_type __n, size_type& __allocated_n) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(_Tp*, __sgi_alloc::allocate(__buf_size));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ __allocated_n = __buf_size / sizeof(value_type);
+ return __ret;
+ }
+
+ return 0;
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(allocator<_Tp>& __other) {}
+#endif
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC allocator<void> {
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+ typedef void value_type;
+#endif
+#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+ template <class _Tp1> struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+#endif
+};
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator==(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW
+{ return true; }
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator!=(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW
+{ return false; }
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS allocator<char>;
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS allocator<wchar_t>;
+# endif
+# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+_STLP_EXPORT_TEMPLATE_CLASS allocator<void*>;
+# endif
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+struct __alloc_type_traits {
+#if !defined (__BORLANDC__)
+ typedef typename _IsSTLportClass<allocator<_Tp> >::_Ret _STLportAlloc;
+#else
+ enum { _Is = _IsSTLportClass<allocator<_Tp> >::_Is };
+ typedef typename __bool2type<_Is>::_Ret _STLportAlloc;
+#endif
+ //The default allocator implementation which is recognize thanks to the
+ //__stlport_class inheritance is a stateless object so:
+ typedef _STLportAlloc has_trivial_default_constructor;
+ typedef _STLportAlloc has_trivial_copy_constructor;
+ typedef _STLportAlloc has_trivial_assignment_operator;
+ typedef _STLportAlloc has_trivial_destructor;
+ typedef _STLportAlloc is_POD_type;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct __type_traits<allocator<_Tp> > : _STLP_PRIV __alloc_type_traits<_Tp> {};
+#else
+_STLP_TEMPLATE_NULL
+struct __type_traits<allocator<char> > : _STLP_PRIV __alloc_type_traits<char> {};
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_TEMPLATE_NULL
+struct __type_traits<allocator<wchar_t> > : _STLP_PRIV __alloc_type_traits<wchar_t> {};
+# endif
+# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+_STLP_TEMPLATE_NULL
+struct __type_traits<allocator<void*> > : _STLP_PRIV __alloc_type_traits<void*> {};
+# endif
+#endif
+
+
+#if !defined (_STLP_FORCE_ALLOCATORS)
+# define _STLP_FORCE_ALLOCATORS(a,y)
+#endif
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+// The version for the default allocator, for rare occasion when we have partial spec w/o member template classes
+template <class _Tp, class _Tp1>
+struct _Alloc_traits<_Tp, allocator<_Tp1> > {
+ typedef allocator<_Tp1> _Orig;
+ typedef allocator<_Tp> allocator_type;
+ static allocator_type create_allocator(const allocator<_Tp1 >& __a)
+ { return allocator_type(_STLP_CONVERT_ALLOCATOR(__a, _Tp)); }
+};
+#endif
+
+#if !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) && defined (_STLP_MEMBER_TEMPLATES)
+template <class _Tp, class _Alloc>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _Alloc_traits<_Tp, _Alloc>::allocator_type _STLP_CALL
+__stl_alloc_create(const _Alloc& __a, const _Tp*) {
+ typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type;
+ return _Rebound_type(__a);
+}
+#else
+// If custom allocators are being used without member template classes support :
+// user (on purpose) is forced to define rebind/get operations !!!
+template <class _Tp1, class _Tp2>
+inline allocator<_Tp2>& _STLP_CALL
+__stl_alloc_rebind(allocator<_Tp1>& __a, const _Tp2*) { return (allocator<_Tp2>&)(__a); }
+template <class _Tp1, class _Tp2>
+inline allocator<_Tp2> _STLP_CALL
+__stl_alloc_create(const allocator<_Tp1>&, const _Tp2*) { return allocator<_Tp2>(); }
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// inheritance is being used for EBO optimization
+template <class _Value, class _Tp, class _MaybeReboundAlloc>
+class _STLP_alloc_proxy : public _MaybeReboundAlloc {
+private:
+ typedef _MaybeReboundAlloc _Base;
+ typedef typename _Base::size_type size_type;
+ typedef _STLP_alloc_proxy<_Value, _Tp, _MaybeReboundAlloc> _Self;
+public:
+ _Value _M_data;
+
+ _STLP_alloc_proxy (const _MaybeReboundAlloc& __a, _Value __p) :
+ _MaybeReboundAlloc(__a), _M_data(__p) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _STLP_alloc_proxy (__move_source<_Self> src) :
+ _Base(_STLP_PRIV _AsMoveSource(src.get()._M_base())),
+ _M_data(_STLP_PRIV _AsMoveSource(src.get()._M_data)) {}
+
+ _Base& _M_base()
+ { return *this; }
+#endif
+
+private:
+ /* Following are helper methods to detect stateless allocators and avoid
+ * swap in this case. For some compilers (VC6) it is a workaround for a
+ * compiler bug in the Empty Base class Optimization feature, for others
+ * it is a small optimization or nothing if no EBO. */
+ void _M_swap_alloc(_Self&, const __true_type& /*_IsStateless*/)
+ {}
+
+ void _M_swap_alloc(_Self& __x, const __false_type& /*_IsStateless*/) {
+ _MaybeReboundAlloc &__base_this = *this;
+ _MaybeReboundAlloc &__base_x = __x;
+ _STLP_STD::swap(__base_this, __base_x);
+ }
+
+public:
+ void _M_swap_alloc(_Self& __x) {
+#if !defined (__BORLANDC__)
+ typedef typename _IsStateless<_MaybeReboundAlloc>::_Ret _StatelessAlloc;
+#else
+ typedef typename __bool2type<_IsStateless<_MaybeReboundAlloc>::_Is>::_Ret _StatelessAlloc;
+#endif
+ _M_swap_alloc(__x, _StatelessAlloc());
+ }
+
+ /* We need to define the following swap implementation for allocator with state
+ * as those allocators might have implement a special swap function to correctly
+ * move datas from an instance to the oher, _STLP_alloc_proxy should not break
+ * this mecanism. */
+ void swap(_Self& __x) {
+ _M_swap_alloc(__x);
+ _STLP_STD::swap(_M_data, __x._M_data);
+ }
+
+ _Tp* allocate(size_type __n, size_type& __allocated_n) {
+#if !defined (__BORLANDC__)
+ typedef typename _IsSTLportClass<_MaybeReboundAlloc>::_Ret _STLportAlloc;
+#else
+ typedef typename __bool2type<_IsSTLportClass<_MaybeReboundAlloc>::_Is>::_Ret _STLportAlloc;
+#endif
+ return allocate(__n, __allocated_n, _STLportAlloc());
+ }
+
+ // Unified interface to perform allocate()/deallocate() with limited
+ // language support
+#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
+ // else it is rebound already, and allocate() member is accessible
+ _Tp* allocate(size_type __n)
+ { return __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0)).allocate(__n, 0); }
+ void deallocate(_Tp* __p, size_type __n)
+ { __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0)).deallocate(__p, __n); }
+private:
+ _Tp* allocate(size_type __n, size_type& __allocated_n, const __true_type& /*STLport allocator*/)
+ { return __stl_alloc_rebind(__STATIC_CAST(_Base&, *this), __STATIC_CAST(_Tp*, 0))._M_allocate(__n, __allocated_n); }
+#else
+ //Expose Standard allocate overload (using expression do not work for some compilers (Borland))
+ _Tp* allocate(size_type __n)
+ { return _Base::allocate(__n); }
+private:
+ _Tp* allocate(size_type __n, size_type& __allocated_n, const __true_type& /*STLport allocator*/)
+ { return _Base::_M_allocate(__n, __allocated_n); }
+#endif
+
+ _Tp* allocate(size_type __n, size_type& __allocated_n, const __false_type& /*STLport allocator*/)
+ { __allocated_n = __n; return allocate(__n); }
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<char*, char, allocator<char> >;
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<wchar_t*, wchar_t, allocator<wchar_t> >;
+# endif
+# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<void**, void*, allocator<void*> >;
+# endif
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_alloc.c>
+#endif
+
+#endif /* _STLP_INTERNAL_ALLOC_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_auto_ptr.h b/6/sources/cxx-stl/stlport/stlport/stl/_auto_ptr.h
new file mode 100644
index 0000000..c750534
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_auto_ptr.h
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_AUTO_PTR_H
+#define _STLP_AUTO_PTR_H
+
+_STLP_BEGIN_NAMESPACE
+// implementation primitive
+class __ptr_base {
+public:
+ void* _M_p;
+ void __set(const volatile void* p) { _M_p = __CONST_CAST(void*,p); }
+ void __set(void* p) { _M_p = p; }
+};
+
+template <class _Tp>
+class auto_ptr_ref {
+public:
+ __ptr_base& _M_r;
+ _Tp* const _M_p;
+
+ auto_ptr_ref(__ptr_base& __r, _Tp* __p) : _M_r(__r), _M_p(__p) { }
+
+ _Tp* release() const { _M_r.__set(__STATIC_CAST(void*, 0)); return _M_p; }
+
+private:
+ //explicitely defined as private to avoid warnings:
+ typedef auto_ptr_ref<_Tp> _Self;
+ _Self& operator = (_Self const&);
+};
+
+template<class _Tp>
+class auto_ptr : public __ptr_base {
+public:
+ typedef _Tp element_type;
+ typedef auto_ptr<_Tp> _Self;
+
+ _Tp* release() _STLP_NOTHROW {
+ _Tp* __px = this->get();
+ this->_M_p = 0;
+ return __px;
+ }
+
+ void reset(_Tp* __px = 0) _STLP_NOTHROW {
+ _Tp* __pt = this->get();
+ if (__px != __pt)
+ delete __pt;
+ this->__set(__px);
+ }
+
+ _Tp* get() const _STLP_NOTHROW
+#if !defined (__GNUC__) || (__GNUC__ > 2)
+ { return __STATIC_CAST(_Tp*, _M_p); }
+#else
+ { return __REINTERPRET_CAST(_Tp*, _M_p); }
+#endif
+
+#if !defined (_STLP_NO_ARROW_OPERATOR)
+ _Tp* operator->() const _STLP_NOTHROW {
+ _STLP_VERBOSE_ASSERT(get() != 0, _StlMsg_AUTO_PTR_NULL)
+ return get();
+ }
+#endif
+ _Tp& operator*() const _STLP_NOTHROW {
+ _STLP_VERBOSE_ASSERT(get() != 0, _StlMsg_AUTO_PTR_NULL)
+ return *get();
+ }
+
+ explicit auto_ptr(_Tp* __px = 0) _STLP_NOTHROW { this->__set(__px); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if !defined (_STLP_NO_TEMPLATE_CONVERSIONS)
+ template<class _Tp1> auto_ptr(auto_ptr<_Tp1>& __r) _STLP_NOTHROW {
+ _Tp* __conversionCheck = __r.release();
+ this->__set(__conversionCheck);
+ }
+# endif
+ template<class _Tp1> auto_ptr<_Tp>& operator=(auto_ptr<_Tp1>& __r) _STLP_NOTHROW {
+ _Tp* __conversionCheck = __r.release();
+ reset(__conversionCheck);
+ return *this;
+ }
+#endif
+
+ auto_ptr(_Self& __r) _STLP_NOTHROW { this->__set(__r.release()); }
+
+ _Self& operator=(_Self& __r) _STLP_NOTHROW {
+ reset(__r.release());
+ return *this;
+ }
+
+ ~auto_ptr() _STLP_NOTHROW { /* boris : reset(0) might be better */ delete this->get(); }
+
+ auto_ptr(auto_ptr_ref<_Tp> __r) _STLP_NOTHROW
+ { this->__set(__r.release()); }
+
+ _Self& operator=(auto_ptr_ref<_Tp> __r) _STLP_NOTHROW {
+ reset(__r.release());
+ return *this;
+ }
+
+#if defined(_STLP_MEMBER_TEMPLATES) && !defined(_STLP_NO_TEMPLATE_CONVERSIONS)
+ template<class _Tp1> operator auto_ptr_ref<_Tp1>() _STLP_NOTHROW
+ { return auto_ptr_ref<_Tp1>(*this, this->get()); }
+ template<class _Tp1> operator auto_ptr<_Tp1>() _STLP_NOTHROW
+ { return auto_ptr<_Tp1>(release()); }
+#else
+ operator auto_ptr_ref<_Tp>() _STLP_NOTHROW
+ { return auto_ptr_ref<_Tp>(*this, this->get()); }
+#endif
+};
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_AUTO_PTR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_bitset.c b/6/sources/cxx-stl/stlport/stlport/stl/_bitset.c
new file mode 100644
index 0000000..82b9312
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_bitset.c
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_BITSET_C
+#define _STLP_BITSET_C
+
+#ifndef _STLP_BITSET_H
+# include <stl/_bitset.h>
+#endif
+
+#define __BITS_PER_WORD (CHAR_BIT * sizeof(unsigned long))
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+//
+// Definitions of non-inline functions from _Base_bitset.
+//
+template<size_t _Nw>
+void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) {
+ if (__shift != 0) {
+ const size_t __wshift = __shift / __BITS_PER_WORD;
+ const size_t __offset = __shift % __BITS_PER_WORD;
+
+ if (__offset == 0)
+ for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
+ _M_w[__n] = _M_w[__n - __wshift];
+
+ else {
+ const size_t __sub_offset = __BITS_PER_WORD - __offset;
+ for (size_t __n = _Nw - 1; __n > __wshift; --__n)
+ _M_w[__n] = (_M_w[__n - __wshift] << __offset) |
+ (_M_w[__n - __wshift - 1] >> __sub_offset);
+ _M_w[__wshift] = _M_w[0] << __offset;
+ }
+
+ fill(_M_w + 0, _M_w + __wshift, __STATIC_CAST(_WordT,0));
+ }
+}
+
+template<size_t _Nw>
+void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) {
+ if (__shift != 0) {
+ const size_t __wshift = __shift / __BITS_PER_WORD;
+ const size_t __offset = __shift % __BITS_PER_WORD;
+ const size_t __limit = _Nw - __wshift - 1;
+
+ if (__offset == 0)
+ for (size_t __n = 0; __n <= __limit; ++__n)
+ _M_w[__n] = _M_w[__n + __wshift];
+
+ else {
+ const size_t __sub_offset = __BITS_PER_WORD - __offset;
+ for (size_t __n = 0; __n < __limit; ++__n)
+ _M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
+ (_M_w[__n + __wshift + 1] << __sub_offset);
+ _M_w[__limit] = _M_w[_Nw-1] >> __offset;
+ }
+
+ fill(_M_w + __limit + 1, _M_w + _Nw, __STATIC_CAST(_WordT,0));
+ }
+}
+
+template<size_t _Nw>
+unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const {
+ for (size_t __i = 1; __i < _Nw; ++__i)
+ if (_M_w[__i])
+ __stl_throw_overflow_error("bitset");
+ return _M_w[0];
+} // End _M_do_to_ulong
+
+template<size_t _Nw>
+size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _WordT __thisword = _M_w[__i];
+ if ( __thisword != __STATIC_CAST(_WordT,0) ) {
+ // find byte within word
+ for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
+ unsigned char __this_byte
+ = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
+ if ( __this_byte )
+ return __i*__BITS_PER_WORD + __j*CHAR_BIT +
+ _Bs_G::_S_first_one(__this_byte);
+
+ __thisword >>= CHAR_BIT;
+ }
+ }
+ }
+ // not found, so return an indication of failure.
+ return __not_found;
+}
+
+template<size_t _Nw>
+size_t
+_Base_bitset<_Nw>::_M_do_find_next(size_t __prev,
+ size_t __not_found) const {
+ // make bound inclusive
+ ++__prev;
+
+ // check out of bounds
+ if ( __prev >= _Nw * __BITS_PER_WORD )
+ return __not_found;
+
+ // search first word
+ size_t __i = _S_whichword(__prev);
+ _WordT __thisword = _M_w[__i];
+
+ // mask off bits below bound
+ __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
+
+ if ( __thisword != __STATIC_CAST(_WordT,0) ) {
+ // find byte within word
+ // get first byte into place
+ __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
+ for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); ++__j ) {
+ unsigned char __this_byte
+ = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
+ if ( __this_byte )
+ return __i*__BITS_PER_WORD + __j*CHAR_BIT +
+ _Bs_G::_S_first_one(__this_byte);
+
+ __thisword >>= CHAR_BIT;
+ }
+ }
+
+ // check subsequent words
+ ++__i;
+ for ( ; __i < _Nw; ++__i ) {
+ /* _WordT */ __thisword = _M_w[__i];
+ if ( __thisword != __STATIC_CAST(_WordT,0) ) {
+ // find byte within word
+ for ( size_t __j = 0; __j < sizeof(_WordT); ++__j ) {
+ unsigned char __this_byte
+ = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
+ if ( __this_byte )
+ return __i*__BITS_PER_WORD + __j*CHAR_BIT +
+ _Bs_G::_S_first_one(__this_byte);
+
+ __thisword >>= CHAR_BIT;
+ }
+ }
+ }
+
+ // not found, so return an indication of failure.
+ return __not_found;
+} // end _M_do_find_next
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if !defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
+
+# if !defined (_STLP_USE_NO_IOSTREAMS)
+
+_STLP_END_NAMESPACE
+
+#ifndef _STLP_STRING_IO_H
+# include <stl/_string_io.h> //includes _istream.h and _ostream.h
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) {
+ basic_string<_CharT, _Traits> __tmp;
+ __tmp.reserve(_Nb);
+
+ // Skip whitespace
+ typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ static typename _Traits::int_type __eof = _Traits::eof();
+
+ typename _Traits::int_type __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof)) {
+ __is.setstate(ios_base::eofbit);
+ break;
+ }
+ else {
+ typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
+ char __c = __is.narrow(__c2, '*');
+
+ if (__c == '0' || __c == '1')
+ __tmp.push_back(__c);
+ else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
+ __is.setstate(ios_base::failbit);
+ break;
+ }
+ }
+ }
+
+ if (__tmp.empty())
+ __is.setstate(ios_base::failbit);
+ else
+ __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
+ }
+
+ return __is;
+}
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const bitset<_Nb>& __x) {
+ basic_string<_CharT, _Traits> __tmp;
+ __x._M_copy_to_string(__tmp);
+ return __os << __tmp;
+}
+
+# endif /* !_STLP_USE_NO_IOSTREAMS */
+
+#endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
+
+_STLP_END_NAMESPACE
+
+#undef __BITS_PER_WORD
+#undef bitset
+
+#endif /* _STLP_BITSET_C */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_bitset.h b/6/sources/cxx-stl/stlport/stlport/stl/_bitset.h
new file mode 100644
index 0000000..f894346
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_bitset.h
@@ -0,0 +1,880 @@
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_BITSET_H
+#define _STLP_BITSET_H
+
+// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused
+// bits. (They are the high- order bits in the highest word.) It is
+// a class invariant of class bitset<> that those unused bits are
+// always zero.
+
+// Most of the actual code isn't contained in bitset<> itself, but in the
+// base class _Base_bitset. The base class works with whole words, not with
+// individual bits. This allows us to specialize _Base_bitset for the
+// important special case where the bitset is only a single word.
+
+// The C++ standard does not define the precise semantics of operator[].
+// In this implementation the const version of operator[] is equivalent
+// to test(), except that it does no range checking. The non-const version
+// returns a reference to a bit, again without doing any range checking.
+
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+# include <stl/_uninitialized.h>
+#endif
+
+#ifndef _STLP_RANGE_ERRORS_H
+# include <stl/_range_errors.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
+#define __BITSET_WORDS(__n) ((__n + __BITS_PER_WORD - 1)/__BITS_PER_WORD)
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// structure to aid in counting bits
+class _STLP_CLASS_DECLSPEC _Bs_G
+{
+ public:
+ //returns the number of bit set within the buffer between __beg and __end.
+ static size_t _S_count(const unsigned char *__beg, const unsigned char *__end)
+#if defined (_STLP_USE_NO_IOSTREAMS)
+ {
+ size_t __result = 0;
+ for (; __beg != __end; ++__beg) {
+ for (size_t i = 0; i < (sizeof(unsigned char) * 8); ++i) {
+ if ((*__beg & (1 << i)) != 0) { ++__result; }
+ }
+ }
+ return __result;
+ }
+#else
+ ;
+#endif
+ // Mapping from 8 bit unsigned integers to the index of the first one bit set:
+ static unsigned char _S_first_one(unsigned char __x)
+#if defined (_STLP_USE_NO_IOSTREAMS)
+ {
+ for (unsigned char i = 0; i < (sizeof(unsigned char) * 8); ++i) {
+ if ((__x & (1 << i)) != 0) { return i; }
+ }
+ return 0;
+ }
+#else
+ ;
+#endif
+};
+
+//
+// Base class: general case.
+//
+
+template<size_t _Nw>
+struct _Base_bitset {
+ typedef unsigned long _WordT;
+
+ _WordT _M_w[_Nw]; // 0 is the least significant word.
+
+ _Base_bitset() { _M_do_reset(); }
+
+ _Base_bitset(unsigned long __val) {
+ _M_do_reset();
+ _M_w[0] = __val;
+ }
+
+ static size_t _STLP_CALL _S_whichword( size_t __pos ) {
+ return __pos / __BITS_PER_WORD;
+ }
+ static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
+ return (__pos % __BITS_PER_WORD) / CHAR_BIT;
+ }
+ static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
+ return __pos % __BITS_PER_WORD;
+ }
+ static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
+ return __STATIC_CAST(_WordT,1) << _S_whichbit(__pos);
+ }
+
+ _WordT& _M_getword(size_t __pos) { return _M_w[_S_whichword(__pos)]; }
+ _WordT _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; }
+
+ _WordT& _M_hiword() { return _M_w[_Nw - 1]; }
+ _WordT _M_hiword() const { return _M_w[_Nw - 1]; }
+
+ void _M_do_and(const _Base_bitset<_Nw>& __x) {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _M_w[__i] &= __x._M_w[__i];
+ }
+ }
+
+ void _M_do_or(const _Base_bitset<_Nw>& __x) {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _M_w[__i] |= __x._M_w[__i];
+ }
+ }
+
+ void _M_do_xor(const _Base_bitset<_Nw>& __x) {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _M_w[__i] ^= __x._M_w[__i];
+ }
+ }
+
+ void _M_do_left_shift(size_t __shift);
+
+ void _M_do_right_shift(size_t __shift);
+
+ void _M_do_flip() {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _M_w[__i] = ~_M_w[__i];
+ }
+ }
+
+ void _M_do_set() {
+ for ( size_t __i = 0; __i < _Nw; __i++ ) {
+ _M_w[__i] = ~__STATIC_CAST(_WordT,0);
+ }
+ }
+
+ void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
+
+ bool _M_is_equal(const _Base_bitset<_Nw>& __x) const {
+ for (size_t __i = 0; __i < _Nw; ++__i) {
+ if (_M_w[__i] != __x._M_w[__i])
+ return false;
+ }
+ return true;
+ }
+
+ bool _M_is_any() const {
+ for ( size_t __i = 0; __i < _Nw ; __i++ ) {
+ if ( _M_w[__i] != __STATIC_CAST(_WordT,0) )
+ return true;
+ }
+ return false;
+ }
+
+ size_t _M_do_count() const {
+ const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
+ const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw);
+
+ return _Bs_G::_S_count(__byte_ptr, __end_ptr);
+ }
+
+ unsigned long _M_do_to_ulong() const;
+
+ // find first "on" bit
+ size_t _M_do_find_first(size_t __not_found) const;
+
+ // find the next "on" bit that follows "prev"
+ size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
+};
+
+//
+// Base class: specialization for a single word.
+//
+_STLP_TEMPLATE_NULL
+struct _Base_bitset<1UL> {
+ typedef unsigned long _WordT;
+ typedef _Base_bitset<1UL> _Self;
+
+ _WordT _M_w;
+
+ _Base_bitset( void ) : _M_w(0) {}
+ _Base_bitset(unsigned long __val) : _M_w(__val) {}
+
+ static size_t _STLP_CALL _S_whichword( size_t __pos ) {
+ return __pos / __BITS_PER_WORD ;
+ }
+ static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
+ return (__pos % __BITS_PER_WORD) / CHAR_BIT;
+ }
+ static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
+ return __pos % __BITS_PER_WORD;
+ }
+ static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
+ return (__STATIC_CAST(_WordT,1)) << _S_whichbit(__pos);
+ }
+
+ _WordT& _M_getword(size_t) { return _M_w; }
+ _WordT _M_getword(size_t) const { return _M_w; }
+
+ _WordT& _M_hiword() { return _M_w; }
+ _WordT _M_hiword() const { return _M_w; }
+
+ void _M_do_and(const _Self& __x) { _M_w &= __x._M_w; }
+ void _M_do_or(const _Self& __x) { _M_w |= __x._M_w; }
+ void _M_do_xor(const _Self& __x) { _M_w ^= __x._M_w; }
+ void _M_do_left_shift(size_t __shift) { _M_w <<= __shift; }
+ void _M_do_right_shift(size_t __shift) { _M_w >>= __shift; }
+ void _M_do_flip() { _M_w = ~_M_w; }
+ void _M_do_set() { _M_w = ~__STATIC_CAST(_WordT,0); }
+ void _M_do_reset() { _M_w = 0; }
+
+ bool _M_is_equal(const _Self& __x) const {
+ return _M_w == __x._M_w;
+ }
+ bool _M_is_any() const {
+ return _M_w != 0;
+ }
+
+ size_t _M_do_count() const {
+ const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
+ const unsigned char* __end_ptr = ((const unsigned char*)&_M_w)+sizeof(_M_w);
+ return _Bs_G::_S_count(__byte_ptr, __end_ptr);
+ }
+
+ unsigned long _M_do_to_ulong() const { return _M_w; }
+
+ inline size_t _M_do_find_first(size_t __not_found) const;
+
+ // find the next "on" bit that follows "prev"
+ inline size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
+};
+
+
+// ------------------------------------------------------------
+//
+// Definitions of should-be-non-inline functions from the single-word version of
+// _Base_bitset.
+//
+inline size_t
+_Base_bitset<1UL>::_M_do_find_first(size_t __not_found) const {
+ // typedef unsigned long _WordT;
+ _WordT __thisword = _M_w;
+
+ if ( __thisword != __STATIC_CAST(_WordT,0) ) {
+ // find byte within word
+ for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
+ unsigned char __this_byte
+ = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
+ if ( __this_byte )
+ return __j*CHAR_BIT + _Bs_G::_S_first_one(__this_byte);
+
+ __thisword >>= CHAR_BIT;
+ }
+ }
+ // not found, so return a value that indicates failure.
+ return __not_found;
+}
+
+inline size_t
+_Base_bitset<1UL>::_M_do_find_next(size_t __prev,
+ size_t __not_found ) const {
+ // make bound inclusive
+ ++__prev;
+
+ // check out of bounds
+ if ( __prev >= __BITS_PER_WORD )
+ return __not_found;
+
+ // search first (and only) word
+ _WordT __thisword = _M_w;
+
+ // mask off bits below bound
+ __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
+
+ if ( __thisword != __STATIC_CAST(_WordT,0) ) {
+ // find byte within word
+ // get first byte into place
+ __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
+ for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
+ unsigned char __this_byte
+ = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
+ if ( __this_byte )
+ return __j*CHAR_BIT + _Bs_G::_S_first_one(__this_byte);
+
+ __thisword >>= CHAR_BIT;
+ }
+ }
+
+ // not found, so return a value that indicates failure.
+ return __not_found;
+} // end _M_do_find_next
+
+
+// ------------------------------------------------------------
+// Helper class to zero out the unused high-order bits in the highest word.
+
+template <size_t _Extrabits> struct _Sanitize {
+ static void _STLP_CALL _M_do_sanitize(unsigned long& __val)
+ { __val &= ~((~__STATIC_CAST(unsigned long,0)) << _Extrabits); }
+};
+
+_STLP_TEMPLATE_NULL struct _Sanitize<0UL> {
+ static void _STLP_CALL _M_do_sanitize(unsigned long) {}
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// ------------------------------------------------------------
+// Class bitset.
+// _Nb may be any nonzero number of type size_t.
+template<size_t _Nb>
+class bitset : public _STLP_PRIV _Base_bitset<__BITSET_WORDS(_Nb) > {
+public:
+ enum { _Words = __BITSET_WORDS(_Nb) } ;
+
+private:
+ typedef _STLP_PRIV _Base_bitset< _Words > _Base;
+
+ void _M_do_sanitize() {
+ _STLP_PRIV _Sanitize<_Nb%__BITS_PER_WORD >::_M_do_sanitize(this->_M_hiword());
+ }
+public:
+ typedef unsigned long _WordT;
+ struct reference;
+ friend struct reference;
+
+ // bit reference:
+ struct reference {
+ typedef _STLP_PRIV _Base_bitset<_Words > _Bitset_base;
+ typedef bitset<_Nb> _Bitset;
+ // friend _Bitset;
+ _WordT *_M_wp;
+ size_t _M_bpos;
+
+ // should be left undefined
+ reference() {}
+
+ reference( _Bitset& __b, size_t __pos ) {
+ _M_wp = &__b._M_getword(__pos);
+ _M_bpos = _Bitset_base::_S_whichbit(__pos);
+ }
+
+ public:
+ ~reference() {}
+
+ // for b[i] = __x;
+ reference& operator=(bool __x) {
+ if ( __x )
+ *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
+
+ return *this;
+ }
+
+ // for b[i] = b[__j];
+ reference& operator=(const reference& __j) {
+ if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) )
+ *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
+ else
+ *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
+
+ return *this;
+ }
+
+ // flips the bit
+ bool operator~() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; }
+
+ // for __x = b[i];
+ operator bool() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; }
+
+ // for b[i].flip();
+ reference& flip() {
+ *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos);
+ return *this;
+ }
+ };
+
+ // 23.3.5.1 constructors:
+ bitset() {}
+
+ bitset(unsigned long __val) : _STLP_PRIV _Base_bitset<_Words>(__val) { _M_do_sanitize(); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template<class _CharT, class _Traits, class _Alloc>
+ explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
+ size_t __pos = 0)
+ : _STLP_PRIV _Base_bitset<_Words >() {
+ if (__pos > __s.size())
+ __stl_throw_out_of_range("bitset");
+ _M_copy_from_string(__s, __pos,
+ basic_string<_CharT, _Traits, _Alloc>::npos);
+ }
+ template<class _CharT, class _Traits, class _Alloc>
+ bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+ size_t __pos,
+ size_t __n)
+ : _STLP_PRIV _Base_bitset<_Words >() {
+ if (__pos > __s.size())
+ __stl_throw_out_of_range("bitset");
+ _M_copy_from_string(__s, __pos, __n);
+ }
+#else /* _STLP_MEMBER_TEMPLATES */
+ explicit bitset(const string& __s,
+ size_t __pos = 0,
+ size_t __n = (size_t)-1)
+ : _STLP_PRIV _Base_bitset<_Words >() {
+ if (__pos > __s.size())
+ __stl_throw_out_of_range("bitset");
+ _M_copy_from_string(__s, __pos, __n);
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ // 23.3.5.2 bitset operations:
+ bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) {
+ this->_M_do_and(__rhs);
+ return *this;
+ }
+
+ bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) {
+ this->_M_do_or(__rhs);
+ return *this;
+ }
+
+ bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) {
+ this->_M_do_xor(__rhs);
+ return *this;
+ }
+
+ bitset<_Nb>& operator<<=(size_t __pos) {
+ this->_M_do_left_shift(__pos);
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ bitset<_Nb>& operator>>=(size_t __pos) {
+ this->_M_do_right_shift(__pos);
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ //
+ // Extension:
+ // Versions of single-bit set, reset, flip, test with no range checking.
+ //
+
+ bitset<_Nb>& _Unchecked_set(size_t __pos) {
+ this->_M_getword(__pos) |= _STLP_PRIV _Base_bitset<_Words > ::_S_maskbit(__pos);
+ return *this;
+ }
+
+ bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) {
+ if (__val)
+ this->_M_getword(__pos) |= this->_S_maskbit(__pos);
+ else
+ this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
+
+ return *this;
+ }
+
+ bitset<_Nb>& _Unchecked_reset(size_t __pos) {
+ this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
+ return *this;
+ }
+
+ bitset<_Nb>& _Unchecked_flip(size_t __pos) {
+ this->_M_getword(__pos) ^= this->_S_maskbit(__pos);
+ return *this;
+ }
+
+ bool _Unchecked_test(size_t __pos) const {
+ return (this->_M_getword(__pos) & this->_S_maskbit(__pos)) != __STATIC_CAST(_WordT,0);
+ }
+
+ // Set, reset, and flip.
+
+ bitset<_Nb>& set() {
+ this->_M_do_set();
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ bitset<_Nb>& set(size_t __pos) {
+ if (__pos >= _Nb)
+ __stl_throw_out_of_range("bitset");
+ return _Unchecked_set(__pos);
+ }
+
+ bitset<_Nb>& set(size_t __pos, int __val) {
+ if (__pos >= _Nb)
+ __stl_throw_out_of_range("bitset");
+ return _Unchecked_set(__pos, __val);
+ }
+
+ bitset<_Nb>& reset() {
+ this->_M_do_reset();
+ return *this;
+ }
+
+ bitset<_Nb>& reset(size_t __pos) {
+ if (__pos >= _Nb)
+ __stl_throw_out_of_range("bitset");
+
+ return _Unchecked_reset(__pos);
+ }
+
+ bitset<_Nb>& flip() {
+ this->_M_do_flip();
+ this->_M_do_sanitize();
+ return *this;
+ }
+
+ bitset<_Nb>& flip(size_t __pos) {
+ if (__pos >= _Nb)
+ __stl_throw_out_of_range("bitset");
+
+ return _Unchecked_flip(__pos);
+ }
+
+ bitset<_Nb> operator~() const {
+ return bitset<_Nb>(*this).flip();
+ }
+
+ // element access:
+ //for b[i];
+ reference operator[](size_t __pos) { return reference(*this,__pos); }
+ bool operator[](size_t __pos) const { return _Unchecked_test(__pos); }
+
+ unsigned long to_ulong() const { return this->_M_do_to_ulong(); }
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
+ template <class _CharT, class _Traits, class _Alloc>
+ basic_string<_CharT, _Traits, _Alloc> to_string() const {
+ basic_string<_CharT, _Traits, _Alloc> __result;
+ _M_copy_to_string(__result);
+ return __result;
+ }
+#else
+ string to_string() const {
+ string __result;
+ _M_copy_to_string(__result);
+ return __result;
+ }
+#endif /* _STLP_EXPLICIT_FUNCTION_TMPL_ARGS */
+
+ size_t count() const { return this->_M_do_count(); }
+
+ size_t size() const { return _Nb; }
+
+ bool operator==(const bitset<_Nb>& __rhs) const {
+ return this->_M_is_equal(__rhs);
+ }
+ bool operator!=(const bitset<_Nb>& __rhs) const {
+ return !this->_M_is_equal(__rhs);
+ }
+
+ bool test(size_t __pos) const {
+ if (__pos >= _Nb)
+ __stl_throw_out_of_range("bitset");
+
+ return _Unchecked_test(__pos);
+ }
+
+ bool any() const { return this->_M_is_any(); }
+ bool none() const { return !this->_M_is_any(); }
+
+ bitset<_Nb> operator<<(size_t __pos) const {
+ bitset<_Nb> __result(*this);
+ __result <<= __pos ; return __result;
+ }
+ bitset<_Nb> operator>>(size_t __pos) const {
+ bitset<_Nb> __result(*this);
+ __result >>= __pos ; return __result;
+ }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+ //
+ // EXTENSIONS: bit-find operations. These operations are
+ // experimental, and are subject to change or removal in future
+ // versions.
+ //
+
+ // find the index of the first "on" bit
+ size_t _Find_first() const
+ { return this->_M_do_find_first(_Nb); }
+
+ // find the index of the next "on" bit after prev
+ size_t _Find_next( size_t __prev ) const
+ { return this->_M_do_find_next(__prev, _Nb); }
+#endif
+
+//
+// Definitions of should-be non-inline member functions.
+//
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template<class _CharT, class _Traits, class _Alloc>
+ void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
+ size_t __pos, size_t __n) {
+#else
+ void _M_copy_from_string(const string& __s,
+ size_t __pos, size_t __n) {
+ typedef typename string::traits_type _Traits;
+#endif
+ reset();
+ size_t __tmp = _Nb;
+ const size_t __Nbits = (min) (__tmp, (min) (__n, __s.size() - __pos));
+ for ( size_t __i= 0; __i < __Nbits; ++__i) {
+ typename _Traits::int_type __k = _Traits::to_int_type(__s[__pos + __Nbits - __i - 1]);
+ // boris : widen() ?
+ if (__k == '1')
+ set(__i);
+ else if (__k != '0')
+ __stl_throw_invalid_argument("bitset");
+ }
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _CharT, class _Traits, class _Alloc>
+ void _M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
+#else
+ void _M_copy_to_string(string& __s) const
+#endif
+ {
+ __s.assign(_Nb, '0');
+
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ if (_Unchecked_test(__i))
+ __s[_Nb - 1 - __i] = '1';
+ }
+ }
+
+#if !defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_WCHAR_T)
+ void _M_copy_to_string(wstring& __s) const {
+ __s.assign(_Nb, '0');
+
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ if (_Unchecked_test(__i))
+ __s[_Nb - 1 - __i] = '1';
+ }
+ }
+#endif
+
+#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
+ bitset<_Nb> operator&(const bitset<_Nb>& __y) const {
+ bitset<_Nb> __result(*this);
+ __result &= __y;
+ return __result;
+ }
+ bitset<_Nb> operator|(const bitset<_Nb>& __y) const {
+ bitset<_Nb> __result(*this);
+ __result |= __y;
+ return __result;
+ }
+ bitset<_Nb> operator^(const bitset<_Nb>& __y) const {
+ bitset<_Nb> __result(*this);
+ __result ^= __y;
+ return __result;
+ }
+#endif
+};
+
+// ------------------------------------------------------------
+//
+// 23.3.5.3 bitset operations:
+//
+#if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
+template <size_t _Nb>
+inline bitset<_Nb> _STLP_CALL
+operator&(const bitset<_Nb>& __x,
+ const bitset<_Nb>& __y) {
+ bitset<_Nb> __result(__x);
+ __result &= __y;
+ return __result;
+}
+
+
+template <size_t _Nb>
+inline bitset<_Nb> _STLP_CALL
+operator|(const bitset<_Nb>& __x,
+ const bitset<_Nb>& __y) {
+ bitset<_Nb> __result(__x);
+ __result |= __y;
+ return __result;
+}
+
+template <size_t _Nb>
+inline bitset<_Nb> _STLP_CALL
+operator^(const bitset<_Nb>& __x,
+ const bitset<_Nb>& __y) {
+ bitset<_Nb> __result(__x);
+ __result ^= __y;
+ return __result;
+}
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+
+_STLP_END_NAMESPACE
+
+# if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1300)) && \
+ !(defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x500))
+
+#ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x);
+
+template <class _CharT, class _Traits, size_t _Nb>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x);
+
+# else
+
+#ifndef _STLP_STRING_IO_H
+# include <stl/_string_io.h> //includes _istream.h and _ostream.h
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <size_t _Nb>
+istream& _STLP_CALL
+operator>>(istream& __is, bitset<_Nb>& __x) {
+ typedef typename string::traits_type _Traits;
+ string __tmp;
+ __tmp.reserve(_Nb);
+
+ // Skip whitespace
+ typename istream::sentry __sentry(__is);
+ if (__sentry) {
+ streambuf* __buf = __is.rdbuf();
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ static typename _Traits::int_type __eof = _Traits::eof();
+
+ typename _Traits::int_type __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof)) {
+ __is.setstate(ios_base::eofbit);
+ break;
+ }
+ else {
+ typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
+ char __c = __is.narrow(__c2, '*');
+
+ if (__c == '0' || __c == '1')
+ __tmp.push_back(__c);
+ else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
+ __is.setstate(ios_base::failbit);
+ break;
+ }
+ }
+ }
+
+ if (__tmp.empty())
+ __is.setstate(ios_base::failbit);
+ else
+ __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
+ }
+
+ return __is;
+}
+
+template <size_t _Nb>
+ostream& _STLP_CALL
+operator<<(ostream& __os, const bitset<_Nb>& __x) {
+ string __tmp;
+ __x._M_copy_to_string(__tmp);
+ return __os << __tmp;
+}
+
+# if !defined (_STLP_NO_WCHAR_T)
+
+template <size_t _Nb>
+wistream& _STLP_CALL
+operator>>(wistream& __is, bitset<_Nb>& __x) {
+ typedef typename wstring::traits_type _Traits;
+ wstring __tmp;
+ __tmp.reserve(_Nb);
+
+ // Skip whitespace
+ typename wistream::sentry __sentry(__is);
+ if (__sentry) {
+ wstreambuf* __buf = __is.rdbuf();
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ static typename _Traits::int_type __eof = _Traits::eof();
+
+ typename _Traits::int_type __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, __eof)) {
+ __is.setstate(ios_base::eofbit);
+ break;
+ }
+ else {
+ typename _Traits::char_type __c2 = _Traits::to_char_type(__c1);
+ char __c = __is.narrow(__c2, '*');
+
+ if (__c == '0' || __c == '1')
+ __tmp.push_back(__c);
+ else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
+ __is.setstate(ios_base::failbit);
+ break;
+ }
+ }
+ }
+
+ if (__tmp.empty())
+ __is.setstate(ios_base::failbit);
+ else
+ __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
+ }
+
+ return __is;
+}
+
+template <size_t _Nb>
+wostream& _STLP_CALL
+operator<<(wostream& __os, const bitset<_Nb>& __x) {
+ wstring __tmp;
+ __x._M_copy_to_string(__tmp);
+ return __os << __tmp;
+}
+
+# endif /* _STLP_NO_WCHAR_T */
+# endif
+#endif
+
+#endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
+
+#undef bitset
+
+_STLP_END_NAMESPACE
+
+#undef __BITS_PER_WORD
+#undef __BITSET_WORDS
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_bitset.c>
+#endif
+
+#endif /* _STLP_BITSET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_bvector.h b/6/sources/cxx-stl/stlport/stlport/stl/_bvector.h
new file mode 100644
index 0000000..bf417f1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_bvector.h
@@ -0,0 +1,841 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_BVECTOR_H
+#define _STLP_INTERNAL_BVECTOR_H
+
+#ifndef _STLP_INTERNAL_VECTOR_H
+# include <stl/_vector.h>
+#endif
+
+#define _STLP_WORD_BIT (int(CHAR_BIT * sizeof(unsigned int)))
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+struct _Bit_reference {
+ unsigned int* _M_p;
+ unsigned int _M_mask;
+ _Bit_reference(unsigned int* __x, unsigned int __y)
+ : _M_p(__x), _M_mask(__y) {}
+
+public:
+ _Bit_reference() : _M_p(0), _M_mask(0) {}
+
+ operator bool() const {
+ return !(!(*_M_p & _M_mask));
+ }
+ _Bit_reference& operator = (bool __x) {
+ if (__x) *_M_p |= _M_mask;
+ else *_M_p &= ~_M_mask;
+ return *this;
+ }
+ _Bit_reference& operator = (const _Bit_reference& __x) {
+ return *this = bool(__x);
+ }
+ bool operator == (const _Bit_reference& __x) const {
+ return bool(*this) == bool(__x);
+ }
+ bool operator < (const _Bit_reference& __x) const {
+ return !bool(*this) && bool(__x);
+ }
+
+ _Bit_reference& operator |= (bool __x) {
+ if (__x)
+ *_M_p |= _M_mask;
+ return *this;
+ }
+ _Bit_reference& operator &= (bool __x) {
+ if (!__x)
+ *_M_p &= ~_M_mask;
+ return *this;
+ }
+ void flip() { *_M_p ^= _M_mask; }
+};
+
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+inline void swap(_STLP_PRIV _Bit_reference& __x, _STLP_PRIV _Bit_reference& __y) {
+ bool __tmp = (bool)__x;
+ __x = __y;
+ __y = __tmp;
+}
+
+// Might not be very useful but costs nothing!
+_STLP_TEMPLATE_NULL
+struct __type_traits<_STLP_PRIV _Bit_reference> {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __false_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+struct _Bit_iterator_base {
+ typedef ptrdiff_t difference_type;
+
+ unsigned int* _M_p;
+ unsigned int _M_offset;
+
+ void _M_bump_up() {
+ if (_M_offset++ == _STLP_WORD_BIT - 1) {
+ _M_offset = 0;
+ ++_M_p;
+ }
+ }
+
+ void _M_bump_down() {
+ if (_M_offset-- == 0) {
+ _M_offset = _STLP_WORD_BIT - 1;
+ --_M_p;
+ }
+ }
+
+ _Bit_iterator_base() : _M_p(0), _M_offset(0) {}
+ _Bit_iterator_base(unsigned int* __x, unsigned int __y) : _M_p(__x), _M_offset(__y) {}
+// see comment in doc/README.evc4 and doc/README.evc8
+#if defined(_MSC_VER) && _MSC_VER<=1401 && defined(MIPS) && defined(NDEBUG)
+ _Bit_iterator_base( const _Bit_iterator_base& __x) : _M_p(__x._M_p), _M_offset(__x._M_offset) {}
+#endif
+ // _Bit_iterator_base& operator = ( const _Bit_iterator_base& __x) { _M_p = __x._M_p ; _M_offset = __x._M_offset ; return *this; }
+
+ void _M_advance (difference_type __i) {
+ difference_type __n = __i + _M_offset;
+ _M_p += __n / _STLP_WORD_BIT;
+ __n = __n % _STLP_WORD_BIT;
+ if (__n < 0) {
+ _M_offset = (unsigned int) __n + _STLP_WORD_BIT;
+ --_M_p;
+ } else
+ _M_offset = (unsigned int) __n;
+ }
+
+ difference_type _M_subtract(const _Bit_iterator_base& __x) const {
+ return _STLP_WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset;
+ }
+};
+
+inline bool _STLP_CALL operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return __y._M_p == __x._M_p && __y._M_offset == __x._M_offset;
+}
+inline bool _STLP_CALL operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return __y._M_p != __x._M_p || __y._M_offset != __x._M_offset;
+}
+
+inline bool _STLP_CALL operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return __x._M_p < __y._M_p || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset);
+}
+
+inline bool _STLP_CALL operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return operator <(__y , __x);
+}
+inline bool _STLP_CALL operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return !(__y < __x);
+}
+inline bool _STLP_CALL operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+ return !(__x < __y);
+}
+
+template <class _Ref, class _Ptr>
+struct _Bit_iter : public _Bit_iterator_base {
+ typedef _Ref reference;
+ typedef _Ptr pointer;
+ typedef _Bit_iter<_Ref, _Ptr> _Self;
+ typedef random_access_iterator_tag iterator_category;
+ typedef bool value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+
+ _Bit_iter(unsigned int* __x, unsigned int __y) : _Bit_iterator_base(__x, __y) {}
+ _Bit_iter() {}
+
+ _Bit_iter(const _Bit_iter<_Bit_reference, _Bit_reference*>& __x):
+ _Bit_iterator_base((const _Bit_iterator_base&)__x) {}
+
+ // _Self& operator = (const _Bit_iter<_Bit_reference, _Bit_reference*>& __x)
+ // { (_Bit_iterator_base&)*this = (const _Bit_iterator_base&)__x; return *this; }
+
+ reference operator*() const {
+ return _Bit_reference(_M_p, 1UL << _M_offset);
+ }
+ _Self& operator++() {
+ _M_bump_up();
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ _M_bump_up();
+ return __tmp;
+ }
+ _Self& operator--() {
+ _M_bump_down();
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ _M_bump_down();
+ return __tmp;
+ }
+ _Self& operator+=(difference_type __i) {
+ _M_advance(__i);
+ return *this;
+ }
+ _Self& operator-=(difference_type __i) {
+ *this += -__i;
+ return *this;
+ }
+ _Self operator+(difference_type __i) const {
+ _Self __tmp = *this;
+ return __tmp += __i;
+ }
+ _Self operator-(difference_type __i) const {
+ _Self __tmp = *this;
+ return __tmp -= __i;
+ }
+ difference_type operator-(const _Self& __x) const {
+ return _M_subtract(__x);
+ }
+ reference operator[](difference_type __i) { return *(*this + __i); }
+};
+
+template <class _Ref, class _Ptr>
+inline _Bit_iter<_Ref,_Ptr> _STLP_CALL
+operator+(ptrdiff_t __n, const _Bit_iter<_Ref, _Ptr>& __x) {
+ return __x + __n;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Ref, class _Ptr>
+struct __type_traits< _STLP_PRIV _Bit_iter<_Ref, _Ptr> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+inline random_access_iterator_tag iterator_category(const _STLP_PRIV _Bit_iterator_base&)
+{ return random_access_iterator_tag(); }
+inline ptrdiff_t* distance_type(const _STLP_PRIV _Bit_iterator_base&)
+{ return (ptrdiff_t*)0; }
+inline bool* value_type(const _STLP_PRIV _Bit_iter<_STLP_PRIV _Bit_reference, _STLP_PRIV _Bit_reference*>&)
+{ return (bool*)0; }
+inline bool* value_type(const _STLP_PRIV _Bit_iter<bool, const bool*>&)
+{ return (bool*)0; }
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+typedef _Bit_iter<bool, const bool*> _Bit_const_iterator;
+typedef _Bit_iter<_Bit_reference, _Bit_reference*> _Bit_iterator;
+
+// Bit-vector base class, which encapsulates the difference between
+// old SGI-style allocators and standard-conforming allocators.
+template <class _Alloc>
+class _Bvector_base {
+ typedef _Bvector_base<_Alloc> _Self;
+public:
+ _STLP_FORCE_ALLOCATORS(bool, _Alloc)
+ typedef _Alloc allocator_type;
+ typedef unsigned int __chunk_type;
+ typedef typename _Alloc_traits<__chunk_type, _Alloc>::allocator_type __chunk_allocator_type;
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(__STATIC_CAST(const __chunk_allocator_type&, _M_end_of_storage), bool); }
+
+ _Bvector_base(const allocator_type& __a)
+ : _M_start(), _M_finish(), _M_end_of_storage(_STLP_CONVERT_ALLOCATOR(__a, __chunk_type),
+ (__chunk_type*)0)
+ {}
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Bvector_base(__move_source<_Self> src)
+ : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish),
+ _M_end_of_storage(src.get()._M_end_of_storage) {
+ //Make the source destroyable
+ src.get()._M_start._M_p = 0;
+ }
+#endif
+
+ ~_Bvector_base() {
+ _M_deallocate();
+ }
+
+protected:
+
+ static size_t _M_bits_to_chunks(size_t __n_bits)
+ { return (__n_bits + _STLP_WORD_BIT - 1) / _STLP_WORD_BIT; }
+
+ __chunk_type* _M_bit_alloc(size_t __n)
+ { return _M_end_of_storage.allocate(_M_bits_to_chunks(__n)); }
+
+ void _M_deallocate() {
+ if (_M_start._M_p)
+ _M_end_of_storage.deallocate(_M_start._M_p,
+ _M_end_of_storage._M_data - _M_start._M_p);
+ }
+
+ _Bit_iterator _M_start;
+ _Bit_iterator _M_finish;
+ _STLP_alloc_proxy<__chunk_type*, __chunk_type, __chunk_allocator_type> _M_end_of_storage;
+};
+
+
+// The next few lines are confusing. What we're doing is declaring a
+// partial specialization of vector<T, Alloc> if we have the necessary
+// compiler support. Otherwise, we define a class bit_vector which uses
+// the default allocator.
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_BOOL) && !defined (__SUNPRO_CC)
+# define _STLP_VECBOOL_TEMPLATE
+# define __BVEC_TMPL_HEADER template <class _Alloc>
+#else
+# undef _STLP_VECBOOL_TEMPLATE
+# ifdef _STLP_NO_BOOL
+# define __BVEC_TMPL_HEADER
+# else
+# define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL
+# endif
+# define _Alloc allocator<bool>
+#endif
+
+#if defined (_STLP_DEBUG)
+# define vector _STLP_NON_DBG_NAME(vector)
+#endif
+
+#ifdef _STLP_NO_BOOL
+# define __BVECTOR_QUALIFIED bit_vector
+# define __BVECTOR bit_vector
+#else
+# ifdef _STLP_VECBOOL_TEMPLATE
+# define __BVECTOR_QUALIFIED vector<bool, _Alloc>
+# else
+# define __BVECTOR_QUALIFIED vector<bool, allocator<bool> >
+# endif
+# if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS)
+# define __BVECTOR __BVECTOR_QUALIFIED
+# else
+# define __BVECTOR vector
+# endif
+#endif
+
+#if !defined (_STLP_DEBUG) || defined (_STLP_NO_BOOL)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+__BVEC_TMPL_HEADER
+class __BVECTOR_QUALIFIED : public _STLP_PRIV _Bvector_base<_Alloc >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_DEBUG)
+ , public __stlport_class< __BVECTOR_QUALIFIED >
+#endif
+{
+ typedef _STLP_PRIV _Bvector_base<_Alloc > _Base;
+ typedef __BVECTOR_QUALIFIED _Self;
+public:
+ typedef bool value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _STLP_PRIV _Bit_reference reference;
+ typedef bool const_reference;
+ typedef _STLP_PRIV _Bit_reference* pointer;
+ typedef const bool* const_pointer;
+ typedef random_access_iterator_tag _Iterator_category;
+
+ typedef _STLP_PRIV _Bit_iterator iterator;
+ typedef _STLP_PRIV _Bit_const_iterator const_iterator;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+#ifdef _STLP_VECBOOL_TEMPLATE
+ typedef _STLP_TYPENAME _STLP_PRIV _Bvector_base<_Alloc >::allocator_type allocator_type;
+ typedef _STLP_TYPENAME _STLP_PRIV _Bvector_base<_Alloc >::__chunk_type __chunk_type;
+#else
+ typedef _STLP_PRIV _Bvector_base<_Alloc >::allocator_type allocator_type;
+ typedef _STLP_PRIV _Bvector_base<_Alloc >::__chunk_type __chunk_type;
+#endif
+
+protected:
+
+ void _M_initialize(size_type __n) {
+ __chunk_type* __q = this->_M_bit_alloc(__n);
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
+ this->_M_start = iterator(__q, 0);
+ this->_M_finish = this->_M_start + difference_type(__n);
+ }
+ void _M_insert_aux(iterator __position, bool __x) {
+ if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
+ _STLP_PRIV __copy_backward(__position, this->_M_finish, this->_M_finish + 1,
+ random_access_iterator_tag(), (difference_type*)0 );
+ *__position = __x;
+ ++this->_M_finish;
+ }
+ else {
+ size_type __len = size() ? 2 * size() : _STLP_WORD_BIT;
+ __chunk_type* __q = this->_M_bit_alloc(__len);
+ iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
+ *__i++ = __x;
+ this->_M_finish = _STLP_STD::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
+ this->_M_start = iterator(__q, 0);
+ }
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void _M_initialize_range(_InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ this->_M_start = iterator();
+ this->_M_finish = iterator();
+ this->_M_end_of_storage._M_data = 0;
+ for ( ; __first != __last; ++__first)
+ push_back(*__first);
+ }
+
+ template <class _ForwardIterator>
+ void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ _M_initialize(__n);
+ _STLP_STD::copy(__first, __last, this->_M_start);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_range(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last; ++__first) {
+ __pos = insert(__pos, *__first);
+ ++__pos;
+ }
+ }
+
+ template <class _ForwardIterator>
+ void _M_insert_range(iterator __position,
+ _ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+ if (__first != __last) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ if (capacity() - size() >= __n) {
+ _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + difference_type(__n),
+ random_access_iterator_tag(), (difference_type*)0 );
+ _STLP_STD::copy(__first, __last, __position);
+ this->_M_finish += difference_type(__n);
+ }
+ else {
+ size_type __len = size() + (max)(size(), __n);
+ __chunk_type* __q = this->_M_bit_alloc(__len);
+ iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
+ __i = _STLP_STD::copy(__first, __last, __i);
+ this->_M_finish = _STLP_STD::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
+ this->_M_start = iterator(__q, 0);
+ }
+ }
+ }
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+public:
+ iterator begin() { return this->_M_start; }
+ const_iterator begin() const { return this->_M_start; }
+ iterator end() { return this->_M_finish; }
+ const_iterator end() const { return this->_M_finish; }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ size_type size() const { return size_type(end() - begin()); }
+ size_type max_size() const { return size_type(-1); }
+ size_type capacity() const {
+ return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin());
+ }
+ bool empty() const { return begin() == end(); }
+ reference operator[](size_type __n)
+ { return *(begin() + difference_type(__n)); }
+ const_reference operator[](size_type __n) const
+ { return *(begin() + difference_type(__n)); }
+
+ void _M_range_check(size_type __n) const {
+ if (__n >= this->size())
+ __stl_throw_range_error("vector<bool>");
+ }
+
+ reference at(size_type __n)
+ { _M_range_check(__n); return (*this)[__n]; }
+ const_reference at(size_type __n) const
+ { _M_range_check(__n); return (*this)[__n]; }
+
+ explicit __BVECTOR(const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Bvector_base<_Alloc >(__a) {}
+
+ __BVECTOR(size_type __n, bool __val,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
+ _M_initialize(__n);
+ fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0);
+ }
+
+ explicit __BVECTOR(size_type __n)
+ : _STLP_PRIV _Bvector_base<_Alloc >(allocator_type()) {
+ _M_initialize(__n);
+ fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0);
+ }
+
+ __BVECTOR(const _Self& __x)
+ : _STLP_PRIV _Bvector_base<_Alloc >(__x.get_allocator()) {
+ _M_initialize(__x.size());
+ _STLP_STD::copy(__x.begin(), __x.end(), this->_M_start);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Integer>
+ void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
+ _M_initialize(__n);
+ fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0);
+ }
+
+ template <class _InputIterator>
+ void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_initialize_range(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
+ }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ __BVECTOR(_InputIterator __first, _InputIterator __last)
+ : _STLP_PRIV _Bvector_base<_Alloc >(allocator_type()) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+# endif
+ template <class _InputIterator>
+ __BVECTOR(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+#else /* _STLP_MEMBER_TEMPLATES */
+ __BVECTOR(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ _M_initialize(__n);
+ _STLP_STD::copy(__first, __last, this->_M_start);
+ }
+ __BVECTOR(const bool* __first, const bool* __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Bvector_base<_Alloc >(__a) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ _M_initialize(__n);
+ _STLP_STD::copy(__first, __last, this->_M_start);
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ __BVECTOR(__move_source<_Self> src)
+ : _STLP_PRIV _Bvector_base<_Alloc >(__move_source<_Base>(src.get())) {}
+#endif
+
+ ~__BVECTOR() {}
+
+ __BVECTOR_QUALIFIED& operator=(const __BVECTOR_QUALIFIED& __x) {
+ if (&__x == this) return *this;
+ if (__x.size() > capacity()) {
+ this->_M_deallocate();
+ _M_initialize(__x.size());
+ }
+ _STLP_STD::copy(__x.begin(), __x.end(), begin());
+ this->_M_finish = begin() + difference_type(__x.size());
+ return *this;
+ }
+
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void _M_fill_assign(size_t __n, bool __x) {
+ if (__n > size()) {
+ fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
+ insert(end(), __n - size(), __x);
+ }
+ else {
+ erase(begin() + __n, end());
+ fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
+ }
+ }
+ void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
+ { _M_fill_assign((size_t) __n, (bool) __val); }
+
+ template <class _InputIter>
+ void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&)
+ { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
+
+ template <class _InputIterator>
+ void _M_assign_aux(_InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ iterator __cur = begin();
+ for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ erase(__cur, end());
+ else
+ insert(end(), __first, __last);
+ }
+
+ template <class _ForwardIterator>
+ void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+ size_type __len = _STLP_STD::distance(__first, __last);
+ if (__len < size())
+ erase(_STLP_STD::copy(__first, __last, begin()), end());
+ else {
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, size());
+ _STLP_STD::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ void reserve(size_type __n) {
+ if (capacity() < __n) {
+ if (max_size() < __n)
+ __stl_throw_length_error("vector<bool>");
+ __chunk_type* __q = this->_M_bit_alloc(__n);
+ _STLP_PRIV _Bit_iterator __z(__q, 0);
+ this->_M_finish = _STLP_STD::copy(begin(), end(), __z);
+ this->_M_deallocate();
+ this->_M_start = iterator(__q, 0);
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__n);
+ }
+ }
+
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ reference back() { return *(end() - 1); }
+ const_reference back() const { return *(end() - 1); }
+ void push_back(bool __x) {
+ if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
+ *(this->_M_finish) = __x;
+ ++this->_M_finish;
+ }
+ else
+ _M_insert_aux(end(), __x);
+ }
+ void swap(__BVECTOR_QUALIFIED& __x) {
+ _STLP_STD::swap(this->_M_start, __x._M_start);
+ _STLP_STD::swap(this->_M_finish, __x._M_finish);
+ this->_M_end_of_storage.swap(__x._M_end_of_storage);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(__BVECTOR_QUALIFIED& __x) { swap(__x); }
+#endif
+
+ iterator insert(iterator __position, bool __x = bool()) {
+ difference_type __n = __position - begin();
+ if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) {
+ *(this->_M_finish) = __x;
+ ++this->_M_finish;
+ }
+ else
+ _M_insert_aux(__position, __x);
+ return begin() + __n;
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ const __true_type&) {
+ _M_fill_insert(__pos, (size_type) __n, (bool) __x);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_insert_range(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
+ }
+
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ void insert(iterator __position,
+ _InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__position, __first, __last, _Integral());
+ }
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __position,
+ const_iterator __first, const_iterator __last) {
+ if (__first == __last) return;
+ size_type __n = _STLP_STD::distance(__first, __last);
+ if (capacity() - size() >= __n) {
+ _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
+ random_access_iterator_tag(), (difference_type*)0 );
+ _STLP_STD::copy(__first, __last, __position);
+ this->_M_finish += __n;
+ }
+ else {
+ size_type __len = size() + (max)(size(), __n);
+ __chunk_type* __q = this->_M_bit_alloc(__len);
+ iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
+ __i = _STLP_STD::copy(__first, __last, __i);
+ this->_M_finish = _STLP_STD::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
+ this->_M_start = iterator(__q, 0);
+ }
+ }
+
+ void insert(iterator __position, const bool* __first, const bool* __last) {
+ if (__first == __last) return;
+ size_type __n = _STLP_STD::distance(__first, __last);
+ if (capacity() - size() >= __n) {
+ _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + __n,
+ random_access_iterator_tag(), (difference_type*)0 );
+ _STLP_STD::copy(__first, __last, __position);
+ this->_M_finish += __n;
+ }
+ else {
+ size_type __len = size() + (max)(size(), __n);
+ __chunk_type* __q = this->_M_bit_alloc(__len);
+ iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
+ __i = _STLP_STD::copy(__first, __last, __i);
+ this->_M_finish = _STLP_STD::copy(__position, end(), __i);
+ this->_M_deallocate();
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
+ this->_M_start = iterator(__q, 0);
+ }
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ void _M_fill_insert(iterator __position, size_type __n, bool __x) {
+ if (__n == 0) return;
+ if (capacity() - size() >= __n) {
+ _STLP_PRIV __copy_backward(__position, end(), this->_M_finish + difference_type(__n),
+ random_access_iterator_tag(), (difference_type*)0 );
+ fill(__position, __position + difference_type(__n), __x);
+ this->_M_finish += difference_type(__n);
+ }
+ else {
+ size_type __len = size() + (max)(size(), __n);
+ __chunk_type* __q = this->_M_bit_alloc(__len);
+ iterator __i = _STLP_STD::copy(begin(), __position, iterator(__q, 0));
+ fill_n(__i, __n, __x);
+ this->_M_finish = _STLP_STD::copy(__position, end(), __i + difference_type(__n));
+ this->_M_deallocate();
+ this->_M_end_of_storage._M_data = __q + _Base::_M_bits_to_chunks(__len);
+ this->_M_start = iterator(__q, 0);
+ }
+ }
+
+ void insert(iterator __position, size_type __n, bool __x) {
+ _M_fill_insert(__position, __n, __x);
+ }
+
+ void pop_back() {
+ --this->_M_finish;
+ }
+ iterator erase(iterator __position) {
+ if (__position + 1 != end())
+ _STLP_STD::copy(__position + 1, end(), __position);
+ --this->_M_finish;
+ return __position;
+ }
+ iterator erase(iterator __first, iterator __last) {
+ this->_M_finish = _STLP_STD::copy(__last, end(), __first);
+ return __first;
+ }
+ void resize(size_type __new_size, bool __x = bool()) {
+ if (__new_size < size())
+ erase(begin() + difference_type(__new_size), end());
+ else
+ insert(end(), __new_size - size(), __x);
+ }
+ void flip() {
+ for (__chunk_type* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p)
+ *__p = ~*__p;
+ }
+
+ void clear() { erase(begin(), end()); }
+};
+
+#if defined (_STLP_NO_BOOL) || defined (__HP_aCC) // fixed soon (03/17/2000)
+# define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER
+# define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED
+# include <stl/_relops_cont.h>
+# undef _STLP_TEMPLATE_CONTAINER
+# undef _STLP_TEMPLATE_HEADER
+#endif /* NO_BOOL */
+
+#if defined (_STLP_DEBUG) && !defined (_STLP_NO_BOOL)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#undef vector
+#undef _Alloc
+#undef _STLP_VECBOOL_TEMPLATE
+#undef __BVECTOR
+#undef __BVECTOR_QUALIFIED
+#undef __BVEC_TMPL_HEADER
+
+#undef _STLP_WORD_BIT
+
+#endif /* _STLP_INTERNAL_BVECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_carray.h b/6/sources/cxx-stl/stlport/stlport/stl/_carray.h
new file mode 100644
index 0000000..560bab2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_carray.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_CARRAY_H
+#define _STLP_CARRAY_H
+
+/* Purpose: Mimic a pur C array with the additionnal feature of
+ * being able to be used with type not default constructible.
+ */
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, size_t _Nb>
+struct _CArray {
+ _CArray (const _Tp& __val) {
+ for (size_t __i = 0; __i < _Nb; ++__i) {
+ _Copy_Construct(__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)), __val);
+ }
+ }
+
+ ~_CArray() {
+ _Destroy_Range(__REINTERPRET_CAST(_Tp*, _M_data + 0),
+ __REINTERPRET_CAST(_Tp*, _M_data + _Nb * sizeof(_Tp)));
+ }
+
+ _Tp& operator [] (size_t __i) {
+ _STLP_ASSERT(__i < _Nb)
+ return *__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp));
+ }
+
+private:
+ char _M_data[sizeof(_Tp) * _Nb];
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif //_STLP_CARRAY_H
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cctype.h b/6/sources/cxx-stl/stlport/stlport/stl/_cctype.h
new file mode 100644
index 0000000..cf82524
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cctype.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CCTYPE
+#define _STLP_INTERNAL_CCTYPE
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cctype>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cctype)
+# endif
+#else
+# include <ctype.h>
+#endif /* _STLP_USE_NEW_C_HEADERS */
+
+#if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+# if defined ( _STLP_IMPORT_VENDOR_CSTD )
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::isalnum;
+using _STLP_VENDOR_CSTD::isalpha;
+using _STLP_VENDOR_CSTD::iscntrl;
+using _STLP_VENDOR_CSTD::isdigit;
+using _STLP_VENDOR_CSTD::isgraph;
+using _STLP_VENDOR_CSTD::islower;
+using _STLP_VENDOR_CSTD::isprint;
+using _STLP_VENDOR_CSTD::ispunct;
+using _STLP_VENDOR_CSTD::isspace;
+using _STLP_VENDOR_CSTD::isupper;
+using _STLP_VENDOR_CSTD::isxdigit;
+using _STLP_VENDOR_CSTD::tolower;
+using _STLP_VENDOR_CSTD::toupper;
+_STLP_END_NAMESPACE
+# endif /* _STLP_IMPORT_VENDOR_CSTD*/
+#endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_clocale.h b/6/sources/cxx-stl/stlport/stlport/stl/_clocale.h
new file mode 100644
index 0000000..2dcf39a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_clocale.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CLOCALE
+#define _STLP_INTERNAL_CLOCALE
+
+#if !defined (_STLP_WCE_EVC3)
+
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <clocale>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(clocale)
+# endif
+# else
+# include <locale.h>
+# endif
+
+# if defined (_STLP_IMPORT_VENDOR_CSTD)
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::lconv;
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(__ANDROID__)
+using _STLP_VENDOR_CSTD::localeconv;
+using _STLP_VENDOR_CSTD::setlocale;
+# endif
+_STLP_END_NAMESPACE
+# endif
+
+#endif /* !_STLP_WCE_EVC3 */
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cmath.h b/6/sources/cxx-stl/stlport/stlport/stl/_cmath.h
new file mode 100644
index 0000000..2867c23
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cmath.h
@@ -0,0 +1,605 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CMATH
+#define _STLP_INTERNAL_CMATH
+
+/* gcc do not like when a using directive appear after a function
+ * declaration. cmath have abs overloads and cstdlib a using directive
+ * so cstdlib has to be included first.
+ */
+#if defined (__GNUC__) && defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdlib>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
+# endif
+#endif
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_NO_NAMESPACES) && !defined (exception)
+# define exception __math_exception
+# endif
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cmath>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cmath)
+# endif
+# if defined (_STLP_HAS_NO_NAMESPACES)
+# undef exception
+# endif
+#else
+# include <math.h>
+#endif
+
+#if (defined (__SUNPRO_CC) && (__SUNPRO_CC > 0x500)) || \
+ !(defined (__IBMCPP__) && (__IBMCPP__ >= 500) || !(defined(__HP_aCC) && (__HP_aCC >= 30000) ))
+# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
+// All the other hypot stuff is going to be at file scope, so follow along here.
+namespace std {
+# endif
+extern "C" double hypot(double x, double y);
+# if !defined(_STLP_HAS_NO_NAMESPACES) && !defined(__SUNPRO_CC)
+}
+# endif
+
+#endif
+
+#if defined (__sun) && defined (__GNUC__)
+extern "C" {
+ float __cosf(float v);
+ float __sinf(float v);
+ float __atan2f(float, float);
+ float __coshf(float v);
+ float __sinhf(float v);
+ float __sqrtf(float v);
+ float __expf(float v);
+ float __logf(float v);
+ float __log10f(float v);
+
+ long double __cosl(long double v);
+ long double __sinl(long double v);
+ long double __atan2l(long double, long double);
+ long double __coshl(long double v);
+ long double __sinhl(long double v);
+ long double __sqrtl(long double v);
+ long double __expl(long double v);
+ long double __logl(long double v);
+ long double __log10l(long double v);
+}
+
+extern "C" {
+ inline float cosf(float v) { return __cosf(v); }
+ inline float sinf(float v) { return __sinf(v); }
+ inline float atan2f(float v1, float v2) { return __atan2f(v1,v2); }
+ inline float coshf(float v) { return __coshf(v); }
+ inline float sinhf(float v) { return __sinhf(v); }
+ inline float sqrtf(float v) { return __sqrtf(v); }
+ inline float expf(float v) { return __expf(v); }
+ inline float logf(float v) { return __logf(v); }
+ inline float log10f(float v) { return __log10f(v); }
+
+ inline long double cosl(long double v) { return __cosl(v); }
+ inline long double sinl(long double v) { return __sinl(v); }
+ inline long double atan2l(long double v1, long double v2) { return __atan2l(v1,v2); }
+ inline long double coshl(long double v) { return __coshl(v); }
+ inline long double sinhl(long double v) { return __sinhl(v); }
+ inline long double sqrtl(long double v) { return __sqrtl(v); }
+ inline long double expl(long double v) { return __expl(v); }
+ inline long double logl(long double v) { return __logl(v); }
+ inline long double log10l(long double v) { return __log10l(v); }
+}
+#endif // __sun && __GNUC__
+
+#if defined (__sun)
+extern "C" {
+extern float __acosf(float);
+extern float __asinf(float);
+extern float __atanf(float);
+extern float __atan2f(float, float);
+extern float __ceilf(float);
+extern float __cosf(float);
+extern float __coshf(float);
+extern float __expf(float);
+extern float __fabsf(float);
+extern float __floorf(float);
+extern float __fmodf(float, float);
+extern float __frexpf(float, int *);
+extern float __ldexpf(float, int);
+extern float __logf(float);
+extern float __log10f(float);
+extern float __modff(float, float *);
+extern float __powf(float, float);
+extern float __sinf(float);
+extern float __sinhf(float);
+extern float __sqrtf(float);
+extern float __tanf(float);
+extern float __tanhf(float);
+
+extern long double __acosl(long double);
+extern long double __asinl(long double);
+extern long double __atanl(long double);
+extern long double __atan2l(long double, long double);
+extern long double __ceill(long double);
+extern long double __cosl(long double);
+extern long double __coshl(long double);
+extern long double __expl(long double);
+extern long double __fabsl(long double);
+extern long double __floorl(long double);
+extern long double __fmodl(long double, long double);
+extern long double __frexpl(long double, int *);
+extern long double __ldexpl(long double, int);
+extern long double __logl(long double);
+extern long double __log10l(long double);
+extern long double __modfl(long double, long double *);
+extern long double __powl(long double, long double);
+extern long double __sinl(long double);
+extern long double __sinhl(long double);
+extern long double __sqrtl(long double);
+extern long double __tanl(long double);
+extern long double __tanhl(long double);
+}
+#endif
+
+#if defined (__BORLANDC__)
+# define _STLP_CMATH_FUNC_NAMESPACE _STLP_VENDOR_CSTD
+#else
+# define _STLP_CMATH_FUNC_NAMESPACE
+#endif
+
+#if !defined (__sun) || defined (__GNUC__)
+# define _STLP_MATH_INLINE(float_type, func, cfunc) \
+ inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); }
+# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
+ inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); }
+# define _STLP_MATH_INLINE_D(float_type, func, cfunc)
+# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc)
+#else
+# ifdef __SUNPRO_CC
+# define _STLP_MATH_INLINE(float_type, func, cfunc) \
+ inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::__##cfunc(x); }
+# define _STLP_MATH_INLINE_D(float_type, func, cfunc) \
+ inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::cfunc(x); }
+# define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
+ inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::__##cfunc(x,y); }
+# define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc) \
+ inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::cfunc(x,y); }
+# else
+# error Unknown compiler for the Sun platform
+# endif
+#endif
+
+/** macros to define math functions
+These macros (having an X somewhere in the name) forward to the C library's
+double functions but cast the arguments and return values to the given type. */
+
+#define _STLP_MATH_INLINEX(__type,func,cfunc) \
+ inline __type func (__type x) \
+ { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x)); }
+#define _STLP_MATH_INLINE2X(__type1,__type2,func,cfunc) \
+ inline __type1 func (__type1 x, __type2 y) \
+ { return __STATIC_CAST(__type1, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, y)); }
+#define _STLP_MATH_INLINE2PX(__type,func,cfunc) \
+ inline __type func (__type x, __type *y) { \
+ double tmp1, tmp2; \
+ tmp1 = _STLP_CMATH_FUNC_NAMESPACE::cfunc(__STATIC_CAST(double, x), &tmp2); \
+ *y = __STATIC_CAST(__type, tmp2); \
+ return __STATIC_CAST(__type, tmp1); \
+ }
+#define _STLP_MATH_INLINE2XX(__type,func,cfunc) \
+ inline __type func (__type x, __type y) \
+ { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, (double)y)); }
+
+
+/** rough characterization of compiler and native C library
+For the compiler, it can either support long double or not. If it doesn't, the
+macro _STLP_NO_LONG_DOUBLE is not defined and we don't define any long double
+overloads.
+For the native C library the question is whether it has variants with an 'f'
+suffix (for float as opposed to double) or an 'l' suffix (for long double). If
+the float variants are missing, _STLP_NO_VENDOR_MATH_F is defined, when the
+long double variants are missing, _STLP_NO_VENDOR_MATH_L is defined. Of course
+the latter doesn't make sense anyway when the compiler already has no long
+double support.
+
+Those two traits determine a) which overloads get defined and b) how they are
+defined.
+
+Meaning of suffixes:
+"" : function returning and taking a float_type
+"2" : function returning a float_type and taking to float_types
+"2P" : function returning a float_type and taking a float_type and a float_type*
+"2PI": function returning a float_type and taking a float_type and an int*
+"2I" : function returning a float_type and taking a float_Type and an int
+*/
+
+#if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_NO_VENDOR_MATH_L) && !defined (_STLP_NO_VENDOR_MATH_F)
+ // long double support and both e.g. sinl(long double) and sinf(float)
+ // This is the default for a correct and complete native library.
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINE(float,func,cf##f) \
+ _STLP_MATH_INLINE_D(double,func,cf) \
+ _STLP_MATH_INLINE(long double,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2(float,float,func,cf##f) \
+ _STLP_MATH_INLINE2_D(double,double,func,cf) \
+ _STLP_MATH_INLINE2(long double,long double,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2(float,float *,func,cf##f) \
+ _STLP_MATH_INLINE2_D(double,double *,func,cf) \
+ _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2(float,int *,func,cf##f) \
+ _STLP_MATH_INLINE2_D(double,int *,func,cf) \
+ _STLP_MATH_INLINE2(long double,int *,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2(float,int,func,cf##f) \
+ _STLP_MATH_INLINE2_D(double,int,func,cf) \
+ _STLP_MATH_INLINE2(long double,int,func,cf##l)
+#else
+# if !defined (_STLP_NO_LONG_DOUBLE)
+# if !defined (_STLP_NO_VENDOR_MATH_F)
+ // long double support and e.g. sinf(float) but not e.g. sinl(long double)
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINE(float,func,cf##f) \
+ _STLP_MATH_INLINEX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2(float,float,func,cf##f) \
+ _STLP_MATH_INLINE2XX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2(float,float *,func,cf##f) \
+ _STLP_MATH_INLINE2PX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2(float,int *,func,cf##f) \
+ _STLP_MATH_INLINE2X(long double,int *,func,cf)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2(float,int,func,cf##f) \
+ _STLP_MATH_INLINE2X(long double,int,func,cf)
+# elif !defined (_STLP_NO_VENDOR_MATH_L)
+ // long double support and e.g. sinl(long double) but not e.g. sinf(float)
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINEX(float,func,cf) \
+ _STLP_MATH_INLINE(long double,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2XX(float,func,cf) \
+ _STLP_MATH_INLINE2(long double,long double,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2PX(float,func,cf) \
+ _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2X(float,int *,func,cf) \
+ _STLP_MATH_INLINE2(long double,int *,func,cf##l)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2X(float,int,func,cf) \
+ _STLP_MATH_INLINE2(long double,int,func,cf##l)
+# else
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINEX(float,func,cf) \
+ _STLP_MATH_INLINEX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2XX(float,func,cf) \
+ _STLP_MATH_INLINE2XX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2PX(float,func,cf) \
+ _STLP_MATH_INLINE2PX(long double,func,cf)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2X(float,int *,func,cf) \
+ _STLP_MATH_INLINE2X(long double,int *,func,cf)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2X(float,int,func,cf) \
+ _STLP_MATH_INLINE2X(long double,int,func,cf)
+# endif
+# else
+# if !defined (_STLP_NO_VENDOR_MATH_F)
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINE(float,func,cf##f)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2(float,float,func,cf##f)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2(float,float *,func,cf##f)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2(float,int *,func,cf##f)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2(float,int,func,cf##f)
+# else // _STLP_NO_VENDOR_MATH_F
+ // neither long double support nor e.g. sinf(float) functions
+# define _STLP_DEF_MATH_INLINE(func,cf) \
+ _STLP_MATH_INLINEX(float,func,cf)
+# define _STLP_DEF_MATH_INLINE2(func,cf) \
+ _STLP_MATH_INLINE2XX(float,func,cf)
+# define _STLP_DEF_MATH_INLINE2P(func,cf) \
+ _STLP_MATH_INLINE2PX(float,func,cf)
+# define _STLP_DEF_MATH_INLINE2PI(func,cf) \
+ _STLP_MATH_INLINE2X(float,int *,func,cf)
+# define _STLP_DEF_MATH_INLINE2I(func,cf) \
+ _STLP_MATH_INLINE2X(float,int,func,cf)
+# endif // _STLP_NO_VENDOR_MATH_F
+# endif
+#endif
+
+#if defined (_STLP_WCE) || \
+ (defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) && defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */)
+/*
+ * dums: VC6 has all the required C++ functions but only define them if
+ * _MSC_EXTENSIONS is not defined (a bug?). STLport just do the same
+ * thing also when _MSC_EXTENSIONS is defined.
+ * TODO: above check (_STLP_MSVC <= 1300) also catches VC7.0, is that intended?
+ */
+//We have to tell the compilers that abs, acos ... math functions are not intrinsic
+//otherwise we have Internal Compiler Error in release mode...
+# pragma warning(push)
+# pragma warning(disable: 4162) // no function with C linkage found
+# pragma warning(disable: 4163) // not available as an intrinsic function
+# pragma function (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
+# if defined (_STLP_WCE)
+# pragma function (ceil, floor)
+# endif
+# define _STLP_RESTORE_FUNCTION_INTRINSIC
+#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
+
+#if (defined (__BORLANDC__) || defined (__WATCOMC__)) && defined (_STLP_USE_NEW_C_HEADERS)
+/* In this config Borland native lib only define functions in std namespace.
+ * In order to have all overloads in STLport namespace we need to add the
+ * double overload in global namespace. We do not use a using statement to avoid
+ * import of invalid overload.
+ */
+# define _STLP_DMATH_INLINE(func) _STLP_MATH_INLINE(double, func, func)
+# define _STLP_DMATH_INLINE2(func) _STLP_MATH_INLINE2(double, double, func, func)
+
+_STLP_DMATH_INLINE(acos)
+_STLP_DMATH_INLINE(asin)
+_STLP_DMATH_INLINE(atan)
+_STLP_DMATH_INLINE2(atan2)
+_STLP_DMATH_INLINE(ceil)
+_STLP_DMATH_INLINE(cos)
+_STLP_DMATH_INLINE(cosh)
+_STLP_DMATH_INLINE(exp)
+_STLP_DMATH_INLINE(fabs)
+_STLP_DMATH_INLINE(floor)
+_STLP_DMATH_INLINE2(fmod)
+_STLP_MATH_INLINE2X(double, int*, frexp, frexp)
+_STLP_MATH_INLINE2X(double, int, ldexp, ldexp)
+_STLP_DMATH_INLINE(log)
+_STLP_DMATH_INLINE(log10)
+_STLP_MATH_INLINE2PX(double, modf, modf)
+_STLP_DMATH_INLINE(sin)
+_STLP_DMATH_INLINE(sinh)
+_STLP_DMATH_INLINE(sqrt)
+_STLP_DMATH_INLINE(tan)
+_STLP_DMATH_INLINE(tanh)
+_STLP_DMATH_INLINE2(pow)
+_STLP_DMATH_INLINE2(hypot)
+
+# undef _STLP_DMATH_INLINE
+# undef _STLP_DMATH_INLINE2
+#endif
+
+#if defined (__DMC__)
+# if defined (fabs)
+inline double __stlp_fabs(double __x) { return fabs(__x); }
+# undef fabs
+inline double fabs(double __x) { return __stlp_fabs(__x); }
+# endif
+# if defined (cos)
+inline double __stlp_cos(double __x) { return cos(__x); }
+# undef cos
+inline double cos(double __x) { return __stlp_cos(__x); }
+# endif
+# if defined (sin)
+inline double __stlp_sin(double __x) { return sin(__x); }
+# undef sin
+inline double sin(double __x) { return __stlp_sin(__x); }
+# endif
+# if defined (sqrt)
+inline double __stlp_sqrt(double __x) { return sqrt(__x); }
+# undef sqrt
+inline double sqrt(double __x) { return __stlp_sqrt(__x); }
+# endif
+# if defined (ldexp)
+inline double __stlp_ldexp(double __x, int __y) { return ldexp(__x, __y); }
+# undef ldexp
+inline double ldexp(double __x, int __y) { return __stlp_ldexp(__x, __y); }
+# endif
+#endif
+
+/* MSVC native lib starting with .Net 2003 has already all math functions
+ * in global namespace.
+ * HP-UX native lib has math functions in the global namespace.
+ */
+#if (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE)) && \
+ (!defined (__HP_aCC) || (__HP_aCC < 30000)) && \
+ !defined (__WATCOMC__)
+inline double abs(double __x)
+{ return ::fabs(__x); }
+# if !defined (__MVS__)
+_STLP_DEF_MATH_INLINE(abs, fabs)
+# else // __MVS__ has native long double abs?
+inline float abs(float __x) { return ::fabsf(__x); }
+# endif
+
+_STLP_DEF_MATH_INLINE(acos, acos)
+_STLP_DEF_MATH_INLINE(asin, asin)
+_STLP_DEF_MATH_INLINE(atan, atan)
+_STLP_DEF_MATH_INLINE2(atan2, atan2)
+_STLP_DEF_MATH_INLINE(ceil, ceil)
+_STLP_DEF_MATH_INLINE(cos, cos)
+_STLP_DEF_MATH_INLINE(cosh, cosh)
+_STLP_DEF_MATH_INLINE(exp, exp)
+_STLP_DEF_MATH_INLINE(fabs, fabs)
+_STLP_DEF_MATH_INLINE(floor, floor)
+_STLP_DEF_MATH_INLINE2(fmod, fmod)
+_STLP_DEF_MATH_INLINE2PI(frexp, frexp)
+_STLP_DEF_MATH_INLINE2I(ldexp, ldexp)
+_STLP_DEF_MATH_INLINE(log, log)
+_STLP_DEF_MATH_INLINE(log10, log10)
+_STLP_DEF_MATH_INLINE2P(modf, modf)
+_STLP_DEF_MATH_INLINE(sin, sin)
+_STLP_DEF_MATH_INLINE(sinh, sinh)
+_STLP_DEF_MATH_INLINE(sqrt, sqrt)
+_STLP_DEF_MATH_INLINE(tan, tan)
+_STLP_DEF_MATH_INLINE(tanh, tanh)
+_STLP_DEF_MATH_INLINE2(pow, pow)
+
+# if !defined(_STLP_MSVC) /* || (_STLP_MSVC > 1300) */ || defined(_STLP_WCE) || !defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */
+# ifndef _STLP_NO_VENDOR_MATH_F
+# ifndef __sun
+inline float pow(float __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powf(__x, __STATIC_CAST(float,__y)); }
+# else
+inline float pow(float __x, int __y) { return ::__powf(__x, __STATIC_CAST(float,__y)); }
+# endif
+# else
+inline float pow(float __x, int __y) { return __STATIC_CAST(float, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(float,__y))); }
+# endif
+inline double pow(double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(double,__y)); }
+# if !defined (_STLP_NO_LONG_DOUBLE)
+# if !defined(_STLP_NO_VENDOR_MATH_L)
+# ifndef __sun
+inline long double pow(long double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powl(__x, __STATIC_CAST(long double,__y)); }
+# else
+# ifndef __SUNPRO_CC
+inline long double pow(long double __x, int __y) { return ::__powl(__x, __STATIC_CAST(long double,__y)); }
+# else
+inline long double pow(long double __x, int __y) { return _STLP_VENDOR_CSTD::__powl(__x, __STATIC_CAST(long double,__y)); }
+# endif
+# endif
+# else
+inline long double pow(long double __x, int __y) { return __STATIC_CAST(long double, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(long double,__y))); }
+# endif
+# endif
+# else
+//The MS native pow version has a bugged overload so it is not imported
+//in the STLport namespace.
+//Here is the bugged version:
+//inline double pow(int __x, int __y) { return (_Pow_int(__x, __y)); }
+inline double pow(double __x, int __y) { return (_Pow_int(__x, __y)); }
+inline float pow(float __x, int __y) { return (_Pow_int(__x, __y)); }
+inline long double pow(long double __x, int __y) { return (_Pow_int(__x, __y)); }
+# endif
+#endif
+
+#if (defined (_STLP_MSVC) && !defined (_STLP_WCE)) || defined (__ICL) || defined (__sun)
+# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
+# pragma warning (push)
+# pragma warning (disable : 4996) // hypot is deprecated.
+# endif
+_STLP_MATH_INLINE2XX(float, hypot, hypot)
+inline long double hypot(long double x, long double y) { return sqrt(x * x + y * y); }
+# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
+# pragma warning (pop)
+# endif
+#else
+# if defined (_STLP_USE_UCLIBC)
+inline double hypot(double x, double y) { return sqrt(x * x + y * y); }
+_STLP_DEF_MATH_INLINE2(hypot, hypot)
+# elif defined (_STLP_WCE)
+ /* CE has a double _hypot(double,double) which we use */
+inline double hypot(double __x, double __y) { return _hypot(__x,__y); }
+_STLP_DEF_MATH_INLINE2(hypot, _hypot)
+# endif
+#endif
+
+#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
+//restoration of the default intrinsic status of those functions:
+# pragma intrinsic (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
+# if defined (_STLP_WCE)
+# pragma intrinsic (ceil, floor)
+# endif
+# pragma warning(pop)
+# undef _STLP_RESTORE_FUNCTION_INTRINSIC
+#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
+
+/* C++ Standard is unclear about several call to 'using ::func' if new overloads
+ * of ::func appears between 2 successive 'using' calls. To avoid this potential
+ * problem we provide all abs overload before the 'using' call.
+ * Beware: This header inclusion has to be after all abs overload of this file.
+ * The first 'using ::abs' call is going to be in the other header.
+ */
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+#if defined (ANDROID)
+namespace __captured {
+template<typename _Tp> inline int __capture_isfinite(_Tp __f) { return isfinite(__f); }
+template<typename _Tp> inline int __capture_isinf(_Tp __f) { return isinf(__f); }
+template<typename _Tp> inline int __capture_isnan(_Tp __f) { return isnan(__f); }
+template<typename _Tp> inline int __capture_signbit(_Tp __f) { return signbit(__f); }
+}
+#undef isfinite
+#undef isinf
+#undef isnan
+#undef signbit
+namespace __captured {
+template<typename _Tp> inline int isfinite(_Tp __f) { return __capture_isfinite(__f); }
+template<typename _Tp> inline int isinf(_Tp __f) { return __capture_isinf(__f); }
+template<typename _Tp> inline int isnan(_Tp __f) { return __capture_isnan(__f); }
+template<typename _Tp> inline int signbit(_Tp __f) { return __capture_signbit(__f); }
+}
+#endif
+_STLP_BEGIN_NAMESPACE
+using ::abs;
+using ::acos;
+using ::asin;
+using ::atan;
+using ::atan2;
+using ::ceil;
+using ::cos;
+using ::cosh;
+using ::exp;
+using ::fabs;
+using ::floor;
+using ::fmod;
+using ::frexp;
+/*
+ Because of some weird interaction between STLport headers
+ and native HP-UX headers, when compiled with _STLP_DEBUG
+ macro defined with aC++, hypot() is not declared.
+ At some point we'll need to get to the bottom line of
+ this problem.
+*/
+#if !(defined(__HP_aCC) && defined(_STLP_DEBUG))
+using ::hypot;
+#endif
+#if defined (ANDROID)
+using __captured::isfinite;
+using __captured::isinf;
+using __captured::isnan;
+#endif
+using ::ldexp;
+using ::log;
+using ::log10;
+using ::modf;
+using ::pow;
+#if defined (ANDROID)
+using __captured::signbit;
+#endif
+using ::sin;
+using ::sinh;
+using ::sqrt;
+using ::tan;
+using ::tanh;
+_STLP_END_NAMESPACE
+# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x560) && !defined (__linux__)
+using _STLP_VENDOR_CSTD::_ecvt;
+using _STLP_VENDOR_CSTD::_fcvt;
+# endif
+#endif
+
+#endif /* _STLP_INTERNAL_CMATH */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_codecvt.h b/6/sources/cxx-stl/stlport/stlport/stl/_codecvt.h
new file mode 100644
index 0000000..29b408b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_codecvt.h
@@ -0,0 +1,442 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_CODECVT_H
+#define _STLP_INTERNAL_CODECVT_H
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LOCALE_H
+# include <stl/_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+class _STLP_CLASS_DECLSPEC codecvt_base {
+public:
+ enum result {ok, partial, error, noconv};
+};
+
+template <class _InternT, class _ExternT, class _StateT>
+class codecvt : public locale::facet, public codecvt_base {
+public:
+ typedef _InternT intern_type;
+ typedef _ExternT extern_type;
+ typedef _StateT state_type;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC < 1300)
+ /* For the moment VC6 do not support this facet default implementation
+ * because of the static locale::id instance. When VC6 see this definition
+ * it goes crasy with locale::id static instances and all the has_facet tests
+ * unit tests are failing.
+ */
+};
+#else
+ explicit codecvt(size_t __refs = 0) : locale::facet(__refs) {}
+
+ result out(state_type& __state,
+ const intern_type* __from,
+ const intern_type* __from_end,
+ const intern_type*& __from_next,
+ extern_type* __to,
+ extern_type* __to_limit,
+ extern_type*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_out(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ result unshift(state_type& __state,
+ extern_type* __to,
+ extern_type* __to_limit,
+ extern_type*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_unshift(__state, __to, __to_limit, __to_next);
+ }
+
+ result in(state_type& __state,
+ const extern_type* __from,
+ const extern_type* __from_end,
+ const extern_type*& __from_next,
+ intern_type* __to,
+ intern_type* __to_limit,
+ intern_type*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_in(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ int encoding() const _STLP_NOTHROW { return do_encoding(); }
+
+ bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); }
+
+ int length(state_type& __state,
+ const extern_type* __from,
+ const extern_type* __from_end,
+ size_t __max) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ return do_length(__state, __from, __from_end, __max);
+ }
+
+ int max_length() const _STLP_NOTHROW { return do_max_length(); }
+
+ static locale::id id;
+
+protected:
+ ~codecvt() {}
+
+ virtual result do_out(state_type&,
+ const intern_type* __from,
+ const intern_type*,
+ const intern_type*& __from_next,
+ extern_type* __to,
+ extern_type*,
+ extern_type*& __to_next) const
+ { __from_next = __from; __to_next = __to; return noconv; }
+
+ virtual result do_in (state_type&,
+ const extern_type* __from,
+ const extern_type*,
+ const extern_type*& __from_next,
+ intern_type* __to,
+ intern_type*,
+ intern_type*& __to_next) const
+ { __from_next = __from; __to_next = __to; return noconv; }
+
+ virtual result do_unshift(state_type&,
+ extern_type* __to,
+ extern_type*,
+ extern_type*& __to_next) const
+ { __to_next = __to; return noconv; }
+
+ virtual int do_encoding() const _STLP_NOTHROW
+ { return 1; }
+
+ virtual bool do_always_noconv() const _STLP_NOTHROW
+ { return true; }
+
+ virtual int do_length(state_type&,
+ const extern_type* __from,
+ const extern_type* __end,
+ size_t __max) const
+ { return (int)(min) ( __STATIC_CAST(size_t, (__end - __from)), __max); }
+
+ virtual int do_max_length() const _STLP_NOTHROW
+ { return 1; }
+
+private:
+ codecvt(const codecvt<intern_type, extern_type, state_type>&);
+ codecvt<intern_type, extern_type, state_type>& operator = (const codecvt<intern_type, extern_type, state_type>&);
+};
+
+# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x590)
+template <class _InternT, class _ExternT, class _StateT>
+locale::id codecvt<_InternT, _ExternT, _StateT>::id;
+# endif
+# endif
+#endif
+
+template <class _InternT, class _ExternT, class _StateT>
+class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC codecvt<char, char, mbstate_t>
+ : public locale::facet, public codecvt_base {
+public:
+ typedef char intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ explicit codecvt(size_t __refs = 0) : locale::facet(__refs) {}
+
+ result out(state_type& __state,
+ const char* __from,
+ const char* __from_end,
+ const char*& __from_next,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_out(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ result unshift(state_type& __state,
+ char* __to, char* __to_limit, char*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_unshift(__state, __to, __to_limit, __to_next);
+ }
+
+ result in(state_type& __state,
+ const char* __from,
+ const char* __from_end,
+ const char*& __from_next,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_in(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ int encoding() const _STLP_NOTHROW { return do_encoding(); }
+
+ bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); }
+
+ int length(state_type& __state,
+ const char* __from, const char* __from_end,
+ size_t __max) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ return do_length(__state, __from, __from_end, __max);
+ }
+
+ int max_length() const _STLP_NOTHROW { return do_max_length(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~codecvt();
+
+ virtual result do_out(state_type& /* __state */,
+ const char* __from,
+ const char* /* __from_end */,
+ const char*& __from_next,
+ char* __to,
+ char* /* __to_limit */,
+ char*& __to_next) const;
+
+ virtual result do_in (state_type& /* __state */ ,
+ const char* __from,
+ const char* /* __from_end */,
+ const char*& __from_next,
+ char* __to,
+ char* /* __to_end */,
+ char*& __to_next) const;
+
+ virtual result do_unshift(state_type& /* __state */,
+ char* __to,
+ char* /* __to_limit */,
+ char*& __to_next) const;
+
+ virtual int do_encoding() const _STLP_NOTHROW;
+ virtual bool do_always_noconv() const _STLP_NOTHROW;
+ virtual int do_length(state_type& __state,
+ const char* __from,
+ const char* __end,
+ size_t __max) const;
+ virtual int do_max_length() const _STLP_NOTHROW;
+private:
+ codecvt(const codecvt<char, char, mbstate_t>&);
+ codecvt<char, char, mbstate_t>& operator =(const codecvt<char, char, mbstate_t>&);
+};
+
+# ifndef _STLP_NO_WCHAR_T
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC codecvt<wchar_t, char, mbstate_t>
+ : public locale::facet, public codecvt_base {
+public:
+ typedef wchar_t intern_type;
+ typedef char extern_type;
+ typedef mbstate_t state_type;
+
+ explicit codecvt(size_t __refs = 0) : locale::facet(__refs) {}
+
+ result out(state_type& __state,
+ const wchar_t* __from,
+ const wchar_t* __from_end,
+ const wchar_t*& __from_next,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_out(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ result unshift(state_type& __state,
+ char* __to, char* __to_limit, char*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_unshift(__state, __to, __to_limit, __to_next);
+ }
+
+ result in(state_type& __state,
+ const char* __from,
+ const char* __from_end,
+ const char*& __from_next,
+ wchar_t* __to,
+ wchar_t* __to_limit,
+ wchar_t*& __to_next) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(__to <= __to_limit, _StlMsg_INVALID_ARGUMENT)
+ return do_in(__state,
+ __from, __from_end, __from_next,
+ __to, __to_limit, __to_next);
+ }
+
+ int encoding() const _STLP_NOTHROW { return do_encoding(); }
+
+ bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); }
+
+ int length(state_type& __state,
+ const char* __from, const char* __from_end,
+ size_t __max) const {
+ _STLP_VERBOSE_ASSERT(__from <= __from_end, _StlMsg_INVALID_ARGUMENT)
+ return do_length(__state, __from, __from_end, __max);
+ }
+
+ int max_length() const _STLP_NOTHROW { return do_max_length(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~codecvt();
+
+ virtual result do_out(state_type& __state,
+ const wchar_t* __from,
+ const wchar_t* __from_end,
+ const wchar_t*& __from_next,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const;
+
+ virtual result do_in (state_type& __state,
+ const char* __from,
+ const char* __from_end,
+ const char*& __from_next,
+ wchar_t* __to,
+ wchar_t* __to_limit,
+ wchar_t*& __to_next) const;
+
+ virtual result do_unshift(state_type& __state,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const;
+
+ virtual int do_encoding() const _STLP_NOTHROW;
+
+ virtual bool do_always_noconv() const _STLP_NOTHROW;
+
+ virtual int do_length(state_type& __state,
+ const char* __from,
+ const char* __end,
+ size_t __max) const;
+
+ virtual int do_max_length() const _STLP_NOTHROW;
+
+private:
+ codecvt(const codecvt<wchar_t, char, mbstate_t>&);
+ codecvt<wchar_t, char, mbstate_t>& operator = (const codecvt<wchar_t, char, mbstate_t>&);
+};
+
+# endif
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC codecvt_byname<char, char, mbstate_t>
+ : public codecvt<char, char, mbstate_t> {
+public:
+ explicit codecvt_byname(const char* __name, size_t __refs = 0);
+ ~codecvt_byname();
+private:
+ codecvt_byname(const codecvt_byname<char, char, mbstate_t>&);
+ codecvt_byname<char, char, mbstate_t>& operator =(const codecvt_byname<char, char, mbstate_t>&);
+};
+
+# ifndef _STLP_NO_WCHAR_T
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC codecvt_byname<wchar_t, char, mbstate_t>
+ : public codecvt<wchar_t, char, mbstate_t> {
+ friend class _Locale_impl;
+public:
+ explicit codecvt_byname(const char * __name, size_t __refs = 0);
+
+protected:
+ ~codecvt_byname();
+
+ virtual result do_out(state_type& __state,
+ const wchar_t* __from,
+ const wchar_t* __from_end,
+ const wchar_t*& __from_next,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const;
+
+ virtual result do_in (state_type& __state,
+ const char* __from,
+ const char* __from_end,
+ const char*& __from_next,
+ wchar_t* __to,
+ wchar_t* __to_limit,
+ wchar_t*& __to_next) const;
+
+ virtual result do_unshift(state_type& __state,
+ char* __to,
+ char* __to_limit,
+ char*& __to_next) const;
+
+ virtual int do_encoding() const _STLP_NOTHROW;
+
+ virtual bool do_always_noconv() const _STLP_NOTHROW;
+
+ virtual int do_length(state_type& __state,
+ const char* __from,
+ const char* __end,
+ size_t __max) const;
+
+ virtual int do_max_length() const _STLP_NOTHROW;
+
+private:
+ codecvt_byname(_Locale_codecvt* __cvt)
+ : _M_codecvt(__cvt) {}
+
+ codecvt_byname(const codecvt_byname<wchar_t, char, mbstate_t>&);
+ codecvt_byname<wchar_t, char, mbstate_t>& operator =(const codecvt_byname<wchar_t, char, mbstate_t>&);
+ _Locale_codecvt* _M_codecvt;
+};
+
+# endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_CODECVT_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_collate.h b/6/sources/cxx-stl/stlport/stlport/stl/_collate.h
new file mode 100644
index 0000000..4384f2e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_collate.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+#ifndef _STLP_INTERNAL_COLLATE_H
+#define _STLP_INTERNAL_COLLATE_H
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LOCALE_H
+# include <stl/_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT> class collate {};
+template <class _CharT> class collate_byname {};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC collate<char> : public locale::facet {
+public:
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit collate(size_t __refs = 0) : locale::facet(__refs) {}
+
+ int compare(const char* __low1, const char* __high1,
+ const char* __low2, const char* __high2) const {
+ return do_compare( __low1, __high1, __low2, __high2);
+ }
+
+ string_type transform(const char* __low, const char* __high) const {
+ return do_transform(__low, __high);
+ }
+
+ long hash(const char* __low, const char* __high) const
+ { return do_hash(__low, __high); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~collate();
+
+ virtual int do_compare(const char*, const char*,
+ const char*, const char*) const;
+ virtual string_type do_transform(const char*, const char*) const;
+ virtual long do_hash(const char*, const char*) const;
+private:
+ collate(const collate<char>&);
+ collate<char>& operator =(const collate<char>&);
+};
+
+# ifndef _STLP_NO_WCHAR_T
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC collate<wchar_t> : public locale::facet {
+public:
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit collate(size_t __refs = 0) : locale::facet(__refs) {}
+
+ int compare(const wchar_t* __low1, const wchar_t* __high1,
+ const wchar_t* __low2, const wchar_t* __high2) const {
+ return do_compare( __low1, __high1, __low2, __high2);
+ }
+
+ string_type transform(const wchar_t* __low, const wchar_t* __high) const {
+ return do_transform(__low, __high);
+ }
+
+ long hash(const wchar_t* __low, const wchar_t* __high) const
+ { return do_hash(__low, __high); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~collate();
+
+ virtual int do_compare(const wchar_t*, const wchar_t*,
+ const wchar_t*, const wchar_t*) const;
+ virtual string_type do_transform(const wchar_t*, const wchar_t*) const;
+ virtual long do_hash(const wchar_t* __low, const wchar_t* __high) const;
+private:
+ collate(const collate<wchar_t>&);
+ collate<wchar_t>& operator = (const collate<wchar_t>&);
+};
+
+# endif /* NO_WCHAR_T */
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC collate_byname<char>: public collate<char> {
+ friend class _Locale_impl;
+public:
+ explicit collate_byname(const char* __name, size_t __refs = 0);
+
+protected:
+ ~collate_byname();
+
+ virtual int do_compare(const char*, const char*,
+ const char*, const char*) const;
+ virtual string_type do_transform(const char*, const char*) const;
+
+private:
+ collate_byname(_Locale_collate *__coll)
+ : _M_collate(__coll) {}
+ _Locale_collate* _M_collate;
+ collate_byname(const collate_byname<char>&);
+ collate_byname<char>& operator =(const collate_byname<char>&);
+};
+
+# ifndef _STLP_NO_WCHAR_T
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC collate_byname<wchar_t>: public collate<wchar_t> {
+ friend class _Locale_impl;
+public:
+ explicit collate_byname(const char * __name, size_t __refs = 0);
+
+protected:
+ ~collate_byname();
+
+ virtual int do_compare(const wchar_t*, const wchar_t*,
+ const wchar_t*, const wchar_t*) const;
+ virtual string_type do_transform(const wchar_t*, const wchar_t*) const;
+
+private:
+ collate_byname(_Locale_collate *__coll)
+ : _M_collate(__coll) {}
+ _Locale_collate* _M_collate;
+ collate_byname(const collate_byname<wchar_t>&);
+ collate_byname<wchar_t>& operator =(const collate_byname<wchar_t>&);
+};
+
+# endif /* NO_WCHAR_T */
+
+template <class _CharT, class _Traits, class _Alloc>
+bool
+__locale_do_operator_call (const locale& __loc,
+ const basic_string<_CharT, _Traits, _Alloc>& __x,
+ const basic_string<_CharT, _Traits, _Alloc>& __y) {
+ collate<_CharT> const& __coll = use_facet<collate<_CharT> >(__loc);
+ return __coll.compare(__x.data(), __x.data() + __x.size(),
+ __y.data(), __y.data() + __y.size()) < 0;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_COLLATE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_complex.c b/6/sources/cxx-stl/stlport/stlport/stl/_complex.c
new file mode 100644
index 0000000..204fa1e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_complex.c
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_COMPLEX_C
+#define _STLP_COMPLEX_C
+
+#ifndef _STLP_INTERNAL_COMPLEX
+# include <stl/_complex.h>
+#endif
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+# ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+# endif
+
+# ifndef _STLP_INTERNAL_SSTREAM
+# include <stl/_sstream.h>
+# endif
+
+# ifndef _STLP_STRING_IO_H
+# include <stl/_string_io.h>
+# endif
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// Non-inline member functions.
+
+template <class _Tp>
+void complex<_Tp>::_div(const _Tp& __z1_r, const _Tp& __z1_i,
+ const _Tp& __z2_r, const _Tp& __z2_i,
+ _Tp& __res_r, _Tp& __res_i) {
+ _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
+ _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
+
+ if (__ar <= __ai) {
+ _Tp __ratio = __z2_r / __z2_i;
+ _Tp __denom = __z2_i * (1 + __ratio * __ratio);
+ __res_r = (__z1_r * __ratio + __z1_i) / __denom;
+ __res_i = (__z1_i * __ratio - __z1_r) / __denom;
+ }
+ else {
+ _Tp __ratio = __z2_i / __z2_r;
+ _Tp __denom = __z2_r * (1 + __ratio * __ratio);
+ __res_r = (__z1_r + __z1_i * __ratio) / __denom;
+ __res_i = (__z1_i - __z1_r * __ratio) / __denom;
+ }
+}
+
+template <class _Tp>
+void complex<_Tp>::_div(const _Tp& __z1_r,
+ const _Tp& __z2_r, const _Tp& __z2_i,
+ _Tp& __res_r, _Tp& __res_i) {
+ _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
+ _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
+
+ if (__ar <= __ai) {
+ _Tp __ratio = __z2_r / __z2_i;
+ _Tp __denom = __z2_i * (1 + __ratio * __ratio);
+ __res_r = (__z1_r * __ratio) / __denom;
+ __res_i = - __z1_r / __denom;
+ }
+ else {
+ _Tp __ratio = __z2_i / __z2_r;
+ _Tp __denom = __z2_r * (1 + __ratio * __ratio);
+ __res_r = __z1_r / __denom;
+ __res_i = - (__z1_r * __ratio) / __denom;
+ }
+}
+
+// I/O.
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+
+// Complex output, in the form (re,im). We use a two-step process
+// involving stringstream so that we get the padding right.
+template <class _Tp, class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z) {
+ basic_ostringstream<_CharT, _Traits, allocator<_CharT> > __tmp;
+ __tmp.flags(__os.flags());
+ __tmp.imbue(__os.getloc());
+ __tmp.precision(__os.precision());
+ __tmp << '(' << __z.real() << ',' << __z.imag() << ')';
+ return __os << __tmp.str();
+}
+
+// Complex input from arbitrary streams. Note that results in some
+// locales may be confusing, since the decimal character varies with
+// locale and the separator between real and imaginary parts does not.
+
+template <class _Tp, class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z) {
+ _Tp __re = 0;
+ _Tp __im = 0;
+
+ const ctype<_CharT>& __c_type = *__is._M_ctype_facet();
+
+ const char __punct[4] = "(,)";
+ _CharT __wpunct[3];
+ __c_type.widen(__punct, __punct + 3, __wpunct);
+
+ _CharT __c;
+
+ __is >> __c;
+ if (_Traits::eq(__c, __wpunct[0])) { // Left paren
+ __is >> __re >> __c;
+ if (_Traits::eq(__c, __wpunct[1])) // Comma
+ __is >> __im >> __c;
+ if (!_Traits::eq(__c, __wpunct[2])) // Right paren
+ __is.setstate(ios_base::failbit);
+ }
+ else {
+ __is.putback(__c);
+ __is >> __re;
+ }
+
+ if (__is)
+ __z = complex<_Tp>(__re, __im);
+ return __is;
+}
+
+#endif /* _STLP_USE_NO_IOSTREAMS */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_COMPLEX_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_complex.h b/6/sources/cxx-stl/stlport/stlport/stl/_complex.h
new file mode 100644
index 0000000..5dba0ad
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_complex.h
@@ -0,0 +1,935 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_COMPLEX
+#define _STLP_INTERNAL_COMPLEX
+
+// This header declares the template class complex, as described in
+// in the draft C++ standard. Single-precision complex numbers
+// are complex<float>, double-precision are complex<double>, and
+// quad precision are complex<long double>.
+
+// Note that the template class complex is declared within namespace
+// std, as called for by the draft C++ standard.
+
+#ifndef _STLP_INTERNAL_CMATH
+# include <stl/_cmath.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+struct complex {
+ typedef _Tp value_type;
+ typedef complex<_Tp> _Self;
+
+ // Constructors, destructor, assignment operator.
+ complex() : _M_re(0), _M_im(0) {}
+ complex(const value_type& __x)
+ : _M_re(__x), _M_im(0) {}
+ complex(const value_type& __x, const value_type& __y)
+ : _M_re(__x), _M_im(__y) {}
+ complex(const _Self& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+
+ _Self& operator=(const _Self& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ template <class _Tp2>
+ explicit complex(const complex<_Tp2>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+
+ template <class _Tp2>
+ _Self& operator=(const complex<_Tp2>& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ // Element access.
+ value_type real() const { return _M_re; }
+ value_type imag() const { return _M_im; }
+
+ // Arithmetic op= operations involving one real argument.
+
+ _Self& operator= (const value_type& __x) {
+ _M_re = __x;
+ _M_im = 0;
+ return *this;
+ }
+ _Self& operator+= (const value_type& __x) {
+ _M_re += __x;
+ return *this;
+ }
+ _Self& operator-= (const value_type& __x) {
+ _M_re -= __x;
+ return *this;
+ }
+ _Self& operator*= (const value_type& __x) {
+ _M_re *= __x;
+ _M_im *= __x;
+ return *this;
+ }
+ _Self& operator/= (const value_type& __x) {
+ _M_re /= __x;
+ _M_im /= __x;
+ return *this;
+ }
+
+ // Arithmetic op= operations involving two complex arguments.
+
+ static void _STLP_CALL _div(const value_type& __z1_r, const value_type& __z1_i,
+ const value_type& __z2_r, const value_type& __z2_i,
+ value_type& __res_r, value_type& __res_i);
+
+ static void _STLP_CALL _div(const value_type& __z1_r,
+ const value_type& __z2_r, const value_type& __z2_i,
+ value_type& __res_r, value_type& __res_i);
+
+#if defined (_STLP_MEMBER_TEMPLATES) // && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+
+ template <class _Tp2> _Self& operator+= (const complex<_Tp2>& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2> _Self& operator-= (const complex<_Tp2>& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2> _Self& operator*= (const complex<_Tp2>& __z) {
+ value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ template <class _Tp2> _Self& operator/= (const complex<_Tp2>& __z) {
+ value_type __r;
+ value_type __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator+= (const _Self& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ _Self& operator-= (const _Self& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ _Self& operator*= (const _Self& __z) {
+ value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ _Self& operator/= (const _Self& __z) {
+ value_type __r;
+ value_type __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ // Data members.
+ value_type _M_re;
+ value_type _M_im;
+};
+
+// Explicit specializations for float, double, long double. The only
+// reason for these specializations is to enable automatic conversions
+// from complex<float> to complex<double>, and complex<double> to
+// complex<long double>.
+
+_STLP_TEMPLATE_NULL
+struct _STLP_CLASS_DECLSPEC complex<float> {
+ typedef float value_type;
+ typedef complex<float> _Self;
+ // Constructors, destructor, assignment operator.
+
+ complex(value_type __x = 0.0f, value_type __y = 0.0f)
+ : _M_re(__x), _M_im(__y) {}
+
+ complex(const complex<float>& __z) : _M_re(__z._M_re), _M_im(__z._M_im) {}
+
+ inline explicit complex(const complex<double>& __z);
+#ifndef _STLP_NO_LONG_DOUBLE
+ inline explicit complex(const complex<long double>& __z);
+#endif
+ // Element access.
+ value_type real() const { return _M_re; }
+ value_type imag() const { return _M_im; }
+
+ // Arithmetic op= operations involving one real argument.
+
+ _Self& operator= (value_type __x) {
+ _M_re = __x;
+ _M_im = 0.0f;
+ return *this;
+ }
+ _Self& operator+= (value_type __x) {
+ _M_re += __x;
+ return *this;
+ }
+ _Self& operator-= (value_type __x) {
+ _M_re -= __x;
+ return *this;
+ }
+ _Self& operator*= (value_type __x) {
+ _M_re *= __x;
+ _M_im *= __x;
+ return *this;
+ }
+ _Self& operator/= (value_type __x) {
+ _M_re /= __x;
+ _M_im /= __x;
+ return *this;
+ }
+
+ // Arithmetic op= operations involving two complex arguments.
+
+ static void _STLP_CALL _div(const float& __z1_r, const float& __z1_i,
+ const float& __z2_r, const float& __z2_i,
+ float& __res_r, float& __res_i);
+
+ static void _STLP_CALL _div(const float& __z1_r,
+ const float& __z2_r, const float& __z2_i,
+ float& __res_r, float& __res_i);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Tp2>
+ complex<float>& operator=(const complex<_Tp2>& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<float>& operator+= (const complex<_Tp2>& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<float>& operator-= (const complex<_Tp2>& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<float>& operator*= (const complex<_Tp2>& __z) {
+ float __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ float __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<float>& operator/= (const complex<_Tp2>& __z) {
+ float __r;
+ float __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator=(const _Self& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ _Self& operator+= (const _Self& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ _Self& operator-= (const _Self& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ _Self& operator*= (const _Self& __z) {
+ value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ _Self& operator/= (const _Self& __z) {
+ value_type __r;
+ value_type __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ // Data members.
+ value_type _M_re;
+ value_type _M_im;
+};
+
+_STLP_TEMPLATE_NULL
+struct _STLP_CLASS_DECLSPEC complex<double> {
+ typedef double value_type;
+ typedef complex<double> _Self;
+
+ // Constructors, destructor, assignment operator.
+
+ complex(value_type __x = 0.0, value_type __y = 0.0)
+ : _M_re(__x), _M_im(__y) {}
+
+ complex(const complex<double>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+ inline complex(const complex<float>& __z);
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ explicit inline complex(const complex<long double>& __z);
+#endif
+ // Element access.
+ value_type real() const { return _M_re; }
+ value_type imag() const { return _M_im; }
+
+ // Arithmetic op= operations involving one real argument.
+
+ _Self& operator= (value_type __x) {
+ _M_re = __x;
+ _M_im = 0.0;
+ return *this;
+ }
+ _Self& operator+= (value_type __x) {
+ _M_re += __x;
+ return *this;
+ }
+ _Self& operator-= (value_type __x) {
+ _M_re -= __x;
+ return *this;
+ }
+ _Self& operator*= (value_type __x) {
+ _M_re *= __x;
+ _M_im *= __x;
+ return *this;
+ }
+ _Self& operator/= (value_type __x) {
+ _M_re /= __x;
+ _M_im /= __x;
+ return *this;
+ }
+
+ // Arithmetic op= operations involving two complex arguments.
+
+ static void _STLP_CALL _div(const double& __z1_r, const double& __z1_i,
+ const double& __z2_r, const double& __z2_i,
+ double& __res_r, double& __res_i);
+ static void _STLP_CALL _div(const double& __z1_r,
+ const double& __z2_r, const double& __z2_i,
+ double& __res_r, double& __res_i);
+
+#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ template <class _Tp2>
+ complex<double>& operator=(const complex<_Tp2>& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<double>& operator+= (const complex<_Tp2>& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<double>& operator-= (const complex<_Tp2>& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<double>& operator*= (const complex<_Tp2>& __z) {
+ double __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ double __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<double>& operator/= (const complex<_Tp2>& __z) {
+ double __r;
+ double __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator=(const _Self& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ _Self& operator+= (const _Self& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ _Self& operator-= (const _Self& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ _Self& operator*= (const _Self& __z) {
+ value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ _Self& operator/= (const _Self& __z) {
+ value_type __r;
+ value_type __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ // Data members.
+ value_type _M_re;
+ value_type _M_im;
+};
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+
+_STLP_TEMPLATE_NULL
+struct _STLP_CLASS_DECLSPEC complex<long double> {
+ typedef long double value_type;
+ typedef complex<long double> _Self;
+
+ // Constructors, destructor, assignment operator.
+ complex(value_type __x = 0.0l, value_type __y = 0.0l)
+ : _M_re(__x), _M_im(__y) {}
+
+ complex(const complex<long double>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+ inline complex(const complex<float>& __z);
+ inline complex(const complex<double>& __z);
+
+ // Element access.
+ value_type real() const { return _M_re; }
+ value_type imag() const { return _M_im; }
+
+ // Arithmetic op= operations involving one real argument.
+
+ _Self& operator= (value_type __x) {
+ _M_re = __x;
+ _M_im = 0.0l;
+ return *this;
+ }
+ _Self& operator+= (value_type __x) {
+ _M_re += __x;
+ return *this;
+ }
+ _Self& operator-= (value_type __x) {
+ _M_re -= __x;
+ return *this;
+ }
+ _Self& operator*= (value_type __x) {
+ _M_re *= __x;
+ _M_im *= __x;
+ return *this;
+ }
+ _Self& operator/= (value_type __x) {
+ _M_re /= __x;
+ _M_im /= __x;
+ return *this;
+ }
+
+ // Arithmetic op= operations involving two complex arguments.
+
+ static void _STLP_CALL _div(const long double& __z1_r, const long double& __z1_i,
+ const long double& __z2_r, const long double& __z2_i,
+ long double& __res_r, long double& __res_i);
+
+ static void _STLP_CALL _div(const long double& __z1_r,
+ const long double& __z2_r, const long double& __z2_i,
+ long double& __res_r, long double& __res_i);
+
+# if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+
+ template <class _Tp2>
+ complex<long double>& operator=(const complex<_Tp2>& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<long double>& operator+= (const complex<_Tp2>& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<long double>& operator-= (const complex<_Tp2>& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<long double>& operator*= (const complex<_Tp2>& __z) {
+ long double __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ long double __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ template <class _Tp2>
+ complex<long double>& operator/= (const complex<_Tp2>& __z) {
+ long double __r;
+ long double __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+# endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator=(const _Self& __z) {
+ _M_re = __z._M_re;
+ _M_im = __z._M_im;
+ return *this;
+ }
+
+ _Self& operator+= (const _Self& __z) {
+ _M_re += __z._M_re;
+ _M_im += __z._M_im;
+ return *this;
+ }
+
+ _Self& operator-= (const _Self& __z) {
+ _M_re -= __z._M_re;
+ _M_im -= __z._M_im;
+ return *this;
+ }
+
+ _Self& operator*= (const _Self& __z) {
+ value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
+ value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ _Self& operator/= (const _Self& __z) {
+ value_type __r;
+ value_type __i;
+ _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
+ _M_re = __r;
+ _M_im = __i;
+ return *this;
+ }
+
+ // Data members.
+ value_type _M_re;
+ value_type _M_im;
+};
+
+#endif /* _STLP_NO_LONG_DOUBLE */
+
+// Converting constructors from one of these three specialized types
+// to another.
+
+inline complex<float>::complex(const complex<double>& __z)
+ : _M_re((float)__z._M_re), _M_im((float)__z._M_im) {}
+inline complex<double>::complex(const complex<float>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+#ifndef _STLP_NO_LONG_DOUBLE
+inline complex<float>::complex(const complex<long double>& __z)
+ : _M_re((float)__z._M_re), _M_im((float)__z._M_im) {}
+inline complex<double>::complex(const complex<long double>& __z)
+ : _M_re((double)__z._M_re), _M_im((double)__z._M_im) {}
+inline complex<long double>::complex(const complex<float>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+inline complex<long double>::complex(const complex<double>& __z)
+ : _M_re(__z._M_re), _M_im(__z._M_im) {}
+#endif
+
+// Unary non-member arithmetic operators.
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z)
+{ return __z; }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z)
+{ return complex<_Tp>(-__z._M_re, -__z._M_im); }
+
+// Non-member arithmetic operations involving one real argument.
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator+(const _Tp& __x, const complex<_Tp>& __z)
+{ return complex<_Tp>(__x + __z._M_re, __z._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z, const _Tp& __x)
+{ return complex<_Tp>(__z._M_re + __x, __z._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator-(const _Tp& __x, const complex<_Tp>& __z)
+{ return complex<_Tp>(__x - __z._M_re, -__z._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z, const _Tp& __x)
+{ return complex<_Tp>(__z._M_re - __x, __z._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator*(const _Tp& __x, const complex<_Tp>& __z)
+{ return complex<_Tp>(__x * __z._M_re, __x * __z._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator*(const complex<_Tp>& __z, const _Tp& __x)
+{ return complex<_Tp>(__z._M_re * __x, __z._M_im * __x); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator/(const _Tp& __x, const complex<_Tp>& __z) {
+ complex<_Tp> __result;
+ complex<_Tp>::_div(__x,
+ __z._M_re, __z._M_im,
+ __result._M_re, __result._M_im);
+ return __result;
+}
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL operator/(const complex<_Tp>& __z, const _Tp& __x)
+{ return complex<_Tp>(__z._M_re / __x, __z._M_im / __x); }
+
+// Non-member arithmetic operations involving two complex arguments
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL
+operator+(const complex<_Tp>& __z1, const complex<_Tp>& __z2)
+{ return complex<_Tp>(__z1._M_re + __z2._M_re, __z1._M_im + __z2._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL
+operator-(const complex<_Tp>& __z1, const complex<_Tp>& __z2)
+{ return complex<_Tp>(__z1._M_re - __z2._M_re, __z1._M_im - __z2._M_im); }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL
+operator*(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
+ return complex<_Tp>(__z1._M_re * __z2._M_re - __z1._M_im * __z2._M_im,
+ __z1._M_re * __z2._M_im + __z1._M_im * __z2._M_re);
+}
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL
+operator/(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
+ complex<_Tp> __result;
+ complex<_Tp>::_div(__z1._M_re, __z1._M_im,
+ __z2._M_re, __z2._M_im,
+ __result._M_re, __result._M_im);
+ return __result;
+}
+
+// Comparison operators.
+
+template <class _Tp>
+inline bool _STLP_CALL operator==(const complex<_Tp>& __z1, const complex<_Tp>& __z2)
+{ return __z1._M_re == __z2._M_re && __z1._M_im == __z2._M_im; }
+
+template <class _Tp>
+inline bool _STLP_CALL operator==(const complex<_Tp>& __z, const _Tp& __x)
+{ return __z._M_re == __x && __z._M_im == 0; }
+
+template <class _Tp>
+inline bool _STLP_CALL operator==(const _Tp& __x, const complex<_Tp>& __z)
+{ return __x == __z._M_re && 0 == __z._M_im; }
+
+//04/27/04 dums: removal of this check, if it is restablish
+//please explain why the other operators are not macro guarded
+//#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
+
+template <class _Tp>
+inline bool _STLP_CALL operator!=(const complex<_Tp>& __z1, const complex<_Tp>& __z2)
+{ return __z1._M_re != __z2._M_re || __z1._M_im != __z2._M_im; }
+
+//#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
+
+template <class _Tp>
+inline bool _STLP_CALL operator!=(const complex<_Tp>& __z, const _Tp& __x)
+{ return __z._M_re != __x || __z._M_im != 0; }
+
+template <class _Tp>
+inline bool _STLP_CALL operator!=(const _Tp& __x, const complex<_Tp>& __z)
+{ return __x != __z._M_re || 0 != __z._M_im; }
+
+// Other basic arithmetic operations
+template <class _Tp>
+inline _Tp _STLP_CALL real(const complex<_Tp>& __z)
+{ return __z._M_re; }
+
+template <class _Tp>
+inline _Tp _STLP_CALL imag(const complex<_Tp>& __z)
+{ return __z._M_im; }
+
+template <class _Tp>
+_Tp _STLP_CALL abs(const complex<_Tp>& __z);
+
+template <class _Tp>
+_Tp _STLP_CALL arg(const complex<_Tp>& __z);
+
+template <class _Tp>
+inline _Tp _STLP_CALL norm(const complex<_Tp>& __z)
+{ return __z._M_re * __z._M_re + __z._M_im * __z._M_im; }
+
+template <class _Tp>
+inline complex<_Tp> _STLP_CALL conj(const complex<_Tp>& __z)
+{ return complex<_Tp>(__z._M_re, -__z._M_im); }
+
+template <class _Tp>
+complex<_Tp> _STLP_CALL polar(const _Tp& __rho)
+{ return complex<_Tp>(__rho, 0); }
+
+template <class _Tp>
+complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi);
+
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC float _STLP_CALL abs(const complex<float>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC double _STLP_CALL abs(const complex<double>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC float _STLP_CALL arg(const complex<float>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC double _STLP_CALL arg(const complex<double>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC complex<float> _STLP_CALL polar(const float& __rho, const float& __phi);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC complex<double> _STLP_CALL polar(const double& __rho, const double& __phi);
+
+template <class _Tp>
+_Tp _STLP_CALL abs(const complex<_Tp>& __z)
+{ return _Tp(abs(complex<double>(double(__z.real()), double(__z.imag())))); }
+
+template <class _Tp>
+_Tp _STLP_CALL arg(const complex<_Tp>& __z)
+{ return _Tp(arg(complex<double>(double(__z.real()), double(__z.imag())))); }
+
+template <class _Tp>
+complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) {
+ complex<double> __tmp = polar(double(__rho), double(__phi));
+ return complex<_Tp>(_Tp(__tmp.real()), _Tp(__tmp.imag()));
+}
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC long double _STLP_CALL arg(const complex<long double>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC long double _STLP_CALL abs(const complex<long double>&);
+_STLP_TEMPLATE_NULL
+_STLP_DECLSPEC complex<long double> _STLP_CALL polar(const long double&, const long double&);
+#endif
+
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+
+_STLP_END_NAMESPACE
+
+# ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+// Complex output, in the form (re,im). We use a two-step process
+// involving stringstream so that we get the padding right.
+template <class _Tp, class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z);
+
+template <class _Tp, class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z);
+
+// Specializations for narrow characters; lets us avoid widen.
+
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL
+operator>>(basic_istream<char, char_traits<char> >& __is, complex<float>& __z);
+
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL
+operator>>(basic_istream<char, char_traits<char> >& __is, complex<double>& __z);
+
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<float>& __z);
+
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<double>& __z);
+
+# if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL
+operator>>(basic_istream<char, char_traits<char> >& __is, complex<long double>& __z);
+
+_STLP_OPERATOR_TEMPLATE
+_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<long double>& __z);
+
+# endif
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT) && ! defined (_STLP_NO_WCHAR_T)
+
+_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&, complex<double>&);
+_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<double>&);
+_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&, complex<float>&);
+_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<float>&);
+
+# if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator>>(basic_istream<wchar_t, char_traits<wchar_t> >&, complex<long double>&);
+_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL
+operator<<(basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<long double>&);
+# endif
+# endif
+#endif
+
+
+// Transcendental functions. These are defined only for float,
+// double, and long double. (Sqrt isn't transcendental, of course,
+// but it's included in this section anyway.)
+
+_STLP_DECLSPEC complex<float> _STLP_CALL sqrt(const complex<float>&);
+
+_STLP_DECLSPEC complex<float> _STLP_CALL exp(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL log(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL log10(const complex<float>&);
+
+_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, int);
+_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, const float&);
+_STLP_DECLSPEC complex<float> _STLP_CALL pow(const float&, const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, const complex<float>&);
+
+_STLP_DECLSPEC complex<float> _STLP_CALL sin(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL cos(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL tan(const complex<float>&);
+
+_STLP_DECLSPEC complex<float> _STLP_CALL sinh(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL cosh(const complex<float>&);
+_STLP_DECLSPEC complex<float> _STLP_CALL tanh(const complex<float>&);
+
+_STLP_DECLSPEC complex<double> _STLP_CALL sqrt(const complex<double>&);
+
+_STLP_DECLSPEC complex<double> _STLP_CALL exp(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL log(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL log10(const complex<double>&);
+
+_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, int);
+_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, const double&);
+_STLP_DECLSPEC complex<double> _STLP_CALL pow(const double&, const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, const complex<double>&);
+
+_STLP_DECLSPEC complex<double> _STLP_CALL sin(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL cos(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL tan(const complex<double>&);
+
+_STLP_DECLSPEC complex<double> _STLP_CALL sinh(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL cosh(const complex<double>&);
+_STLP_DECLSPEC complex<double> _STLP_CALL tanh(const complex<double>&);
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_DECLSPEC complex<long double> _STLP_CALL sqrt(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL exp(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL log(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL log10(const complex<long double>&);
+
+_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&, int);
+_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&, const long double&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const long double&, const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&,
+ const complex<long double>&);
+
+_STLP_DECLSPEC complex<long double> _STLP_CALL sin(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL cos(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL tan(const complex<long double>&);
+
+_STLP_DECLSPEC complex<long double> _STLP_CALL sinh(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL cosh(const complex<long double>&);
+_STLP_DECLSPEC complex<long double> _STLP_CALL tanh(const complex<long double>&);
+#endif
+
+_STLP_END_NAMESPACE
+
+#ifndef _STLP_LINK_TIME_INSTANTIATION
+# include <stl/_complex.c>
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_config_compat_post.h b/6/sources/cxx-stl/stlport/stlport/stl/_config_compat_post.h
new file mode 100644
index 0000000..e3b4111
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_config_compat_post.h
@@ -0,0 +1,51 @@
+/*========================================== */
+#if 1 /* def _STLP_3_COMPATIBILITY */
+
+# define __SGI_STL_PORT _STLPORT_VERSION
+
+# if defined (_STLP_DEBUG) && ! defined ( __STL_DEBUG )
+# define __STL_DEBUG _STLP_DEBUG
+# endif
+
+# if defined (_STLP_USE_NAMESPACES)
+# undef __STL_USE_NAMESPACES
+# define __STL_USE_NAMESPACES _STLP_USE_NAMESPACES
+# endif
+
+# if defined (_STLP_USE_EXCEPTIONS)
+# undef __STL_USE_EXCEPTIONS
+# define __STL_USE_EXCEPTIONS _STLP_USE_EXCEPTIONS
+# endif
+
+# if defined (_STLP_BEGIN_NAMESPACE) && ! defined ( __STL_BEGIN_NAMESPACE )
+# define __STL_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE
+# define __STL_END_NAMESPACE _STLP_END_NAMESPACE
+# define __STL_VENDOR_STD _STLP_VENDOR_STD
+# define __STL_VENDOR_CSTD _STLP_VENDOR_CSTD
+# endif
+# endif
+
+/*
+# if defined (_STLP_XXX) && ! defined ( __STL_XXX )
+# define __STL_XXX _STLP_XXX
+# endif
+*/
+
+/* 5.0 -> 4.6 compatibility section */
+#if 1 /* def _STLP_46_COMPATIBILITY */
+
+/* provide a uniform way to access full functionality */
+# define __slist__ slist
+# define __map__ map
+# define __multimap__ multimap
+# define __set__ set
+# define __multiset__ multiset
+# define __list__ list
+# define __hash_map__ hash_map
+# define __hash_multimap__ hash_multimap
+# define __hash_set__ hash_set
+# define __hash_multiset__ hash_multiset
+# define __vector__ vector
+
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_construct.h b/6/sources/cxx-stl/stlport/stlport/stl/_construct.h
new file mode 100644
index 0000000..9361878
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_construct.h
@@ -0,0 +1,289 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+#define _STLP_INTERNAL_CONSTRUCT_H
+
+#if !defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_INTERNAL_CSTRING)
+# include <stl/_cstring.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NEW
+# include <stl/_new.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+#ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+#endif
+
+#if !defined (_STLP_MOVE_CONSTRUCT_FWK_H) && !defined (_STLP_NO_MOVE_SEMANTIC)
+# include <stl/_move_construct_fwk.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+inline void __destroy_aux(_Tp* __pointer, const __false_type& /*_Trivial_destructor*/)
+{ __pointer->~_Tp(); }
+
+template <class _Tp>
+inline void __destroy_aux(_Tp*, const __true_type& /*_Trivial_destructor*/) {}
+
+template <class _Tp>
+inline void _Destroy(_Tp* __pointer) {
+ typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
+ __destroy_aux(__pointer, _Trivial_destructor());
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset(__REINTERPRET_CAST(char*, __pointer), _STLP_SHRED_BYTE, sizeof(_Tp));
+#endif
+}
+
+template <class _Tp>
+inline void _Destroy_Moved(_Tp* __pointer) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::complete _Trivial_destructor;
+ __destroy_aux(__pointer, _Trivial_destructor());
+# if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)__pointer, _STLP_SHRED_BYTE, sizeof(_Tp));
+# endif
+#else
+ _Destroy(__pointer);
+#endif
+}
+
+#if defined (new)
+# define _STLP_NEW_REDEFINE new
+# undef new
+#endif
+
+template <class _T1>
+inline void _Construct_aux (_T1* __p, const __false_type&) {
+ new(__p) _T1();
+}
+
+template <class _T1>
+inline void _Construct_aux (_T1* __p, const __true_type&) {
+#if defined (_STLP_DEF_CONST_PLCT_NEW_BUG)
+ *__p = _T1(0);
+#else
+ // We use binary copying for POD types since it results
+ // in a considerably better code at least on MSVC.
+ *__p = _T1();
+#endif /* _STLP_DEF_CONST_PLCT_NEW_BUG */
+}
+
+template <class _T1>
+inline void _Construct(_T1* __p) {
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
+#endif
+#if defined (_STLP_DEF_CONST_PLCT_NEW_BUG)
+ _Construct_aux (__p, _HasDefaultZeroValue(__p)._Answer());
+#else
+ _Construct_aux (__p, _Is_POD(__p)._Answer());
+#endif /* _STLP_DEF_CONST_PLCT_NEW_BUG */
+}
+
+template <class _Tp>
+inline void _Copy_Construct_aux(_Tp* __p, const _Tp& __val, const __false_type&) {
+ new(__p) _Tp(__val);
+}
+
+template <class _Tp>
+inline void _Copy_Construct_aux(_Tp* __p, const _Tp& __val, const __true_type&) {
+ // We use binary copying for POD types since it results
+ // in a considerably better code at least on MSVC.
+ *__p = __val;
+}
+
+template <class _Tp>
+inline void _Copy_Construct(_Tp* __p, const _Tp& __val) {
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_Tp));
+#endif
+ _Copy_Construct_aux(__p, __val, _Is_POD(__p)._Answer());
+}
+
+template <class _T1, class _T2>
+inline void _Param_Construct_aux(_T1* __p, const _T2& __val, const __false_type&) {
+ new(__p) _T1(__val);
+}
+
+template <class _T1, class _T2>
+inline void _Param_Construct_aux(_T1* __p, const _T2& __val, const __true_type&) {
+ // We use binary copying for POD types since it results
+ // in a considerably better code at least on MSVC.
+ *__p = _T1(__val);
+}
+
+template <class _T1, class _T2>
+inline void _Param_Construct(_T1* __p, const _T2& __val) {
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
+#endif
+ _Param_Construct_aux(__p, __val, _Is_POD(__p)._Answer());
+}
+
+template <class _T1, class _T2>
+inline void _Move_Construct_Aux(_T1* __p, _T2& __val, const __false_type& /*_IsPOD*/) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ new(__p) _T1(_STLP_PRIV _AsMoveSource(__val));
+#else
+ _Param_Construct(__p, __val);
+#endif
+}
+
+template <class _T1, class _T2>
+inline void _Move_Construct_Aux(_T1* __p, _T2& __val, const __true_type& /*_IsPOD*/) {
+ // We use binary copying for POD types since it results
+ // in a considerably better code at least on MSVC.
+ *__p = _T1(__val);
+}
+
+template <class _T1, class _T2>
+inline void _Move_Construct(_T1* __p, _T2& __val) {
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
+#endif
+ _Move_Construct_Aux(__p, __val, _Is_POD(__p)._Answer());
+}
+
+#if defined(_STLP_NEW_REDEFINE)
+# if defined (DEBUG_NEW)
+# define new DEBUG_NEW
+# endif
+# undef _STLP_NEW_REDEFINE
+#endif
+
+template <class _ForwardIterator, class _Tp>
+_STLP_INLINE_LOOP void
+__destroy_range_aux(_ForwardIterator __first, _ForwardIterator __last, _Tp*, const __false_type& /*_Trivial_destructor*/) {
+ for ( ; __first != __last; ++__first) {
+ __destroy_aux(&(*__first), __false_type());
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+ memset((char*)&(*__first), _STLP_SHRED_BYTE, sizeof(_Tp));
+#endif
+ }
+}
+
+template <class _ForwardIterator, class _Tp>
+#if defined (_STLP_DEBUG_UNINITIALIZED)
+_STLP_INLINE_LOOP void
+__destroy_range_aux(_ForwardIterator __first, _ForwardIterator __last, _Tp*, const __true_type& /*_Trivial_destructor*/) {
+ for ( ; __first != __last; ++__first)
+ memset((char*)&(*__first), _STLP_SHRED_BYTE, sizeof(_Tp));
+}
+#else
+inline void
+__destroy_range_aux(_ForwardIterator, _ForwardIterator, _Tp*, const __true_type& /*_Trivial_destructor*/) {}
+#endif
+
+template <class _ForwardIterator, class _Tp>
+inline void
+__destroy_range(_ForwardIterator __first, _ForwardIterator __last, _Tp *__ptr) {
+ typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
+ __destroy_range_aux(__first, __last, __ptr, _Trivial_destructor());
+}
+
+template <class _ForwardIterator>
+inline void _Destroy_Range(_ForwardIterator __first, _ForwardIterator __last) {
+ __destroy_range(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator));
+}
+
+inline void _Destroy_Range(char*, char*) {}
+#if defined (_STLP_HAS_WCHAR_T) // dwa 8/15/97
+inline void _Destroy_Range(wchar_t*, wchar_t*) {}
+inline void _Destroy_Range(const wchar_t*, const wchar_t*) {}
+#endif
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _ForwardIterator, class _Tp>
+inline void
+__destroy_mv_srcs(_ForwardIterator __first, _ForwardIterator __last, _Tp *__ptr) {
+ typedef typename __move_traits<_Tp>::complete _CompleteMove;
+ __destroy_range_aux(__first, __last, __ptr, _CompleteMove());
+}
+#endif
+
+template <class _ForwardIterator>
+inline void _Destroy_Moved_Range(_ForwardIterator __first, _ForwardIterator __last)
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+{ __destroy_mv_srcs(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator)); }
+#else
+{ _Destroy_Range(__first, __last); }
+#endif
+
+#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
+// Those adaptors are here to fix common compiler bug regarding builtins:
+// expressions like int k = int() should initialize k to 0
+template <class _Tp>
+inline _Tp __default_constructed_aux(_Tp*, const __false_type&) {
+ return _Tp();
+}
+template <class _Tp>
+inline _Tp __default_constructed_aux(_Tp*, const __true_type&) {
+ return _Tp(0);
+}
+
+template <class _Tp>
+inline _Tp __default_constructed(_Tp* __p) {
+ return __default_constructed_aux(__p, _HasDefaultZeroValue(__p)._Answer());
+}
+
+# define _STLP_DEFAULT_CONSTRUCTED(_TTp) __default_constructed((_TTp*)0)
+#else
+# define _STLP_DEFAULT_CONSTRUCTED(_TTp) _TTp()
+#endif /* _STLP_DEF_CONST_DEF_PARAM_BUG */
+
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+// --------------------------------------------------
+// Old names from the HP STL.
+
+template <class _T1, class _T2>
+inline void construct(_T1* __p, const _T2& __val) {_Param_Construct(__p, __val); }
+template <class _T1>
+inline void construct(_T1* __p) { _STLP_STD::_Construct(__p); }
+template <class _Tp>
+inline void destroy(_Tp* __pointer) { _STLP_STD::_Destroy(__pointer); }
+template <class _ForwardIterator>
+inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { _STLP_STD::_Destroy_Range(__first, __last); }
+#endif /* _STLP_NO_ANACHRONISMS */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_CONSTRUCT_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cprolog.h b/6/sources/cxx-stl/stlport/stlport/stl/_cprolog.h
new file mode 100644
index 0000000..1d27656
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cprolog.h
@@ -0,0 +1,25 @@
+/* NOTE : this header has no guards and is MEANT for multiple inclusion!
+ * If you are using "header protection" option with your compiler,
+ * please also find #pragma which disables it and put it here, to
+ * allow reentrancy of this header.
+ */
+
+#ifdef std
+# undef std /* We undef "std" on entry , as STLport headers may include native ones. */
+#endif
+
+#ifdef _STLP_PROLOG_HEADER_INCLUDED
+# error STlport prolog header can not be reincluded as long as epilog has not be included.
+#endif
+
+#define _STLP_PROLOG_HEADER_INCLUDED
+
+#ifndef _STLP_FEATURES_H
+# include <stl/config/features.h>
+#endif
+
+/* If the platform provides any specific prolog actions,
+ * like #pragmas, do include platform-specific prolog file */
+#if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
+# include <stl/config/_prolog.h>
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_csetjmp.h b/6/sources/cxx-stl/stlport/stlport/stl/_csetjmp.h
new file mode 100644
index 0000000..ca132c1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_csetjmp.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSETJMP
+#define _STLP_INTERNAL_CSETJMP
+
+// if the macro is on, the header is already there
+#if !defined (setjmp)
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <csetjmp>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(csetjmp)
+# endif
+# else
+# include <setjmp.h>
+# endif
+#endif
+
+#if defined (_STLP_IMPORT_VENDOR_CSTD)
+
+# if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS)
+/* For Borland, even if stdjmp.h is included symbols won't be in global namespace
+ * so we need to reach them in vendor namespace:
+ */
+# undef _STLP_NATIVE_SETJMP_H_INCLUDED
+# endif
+
+_STLP_BEGIN_NAMESPACE
+# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
+using _STLP_VENDOR_CSTD::jmp_buf;
+# else
+// if setjmp.h was included first, this is in global namespace, not in
+// vendor's std. - 2005-08-04, ptr
+using ::jmp_buf;
+# endif
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+# if !defined (setjmp)
+# if !defined (__MSL__) || ((__MSL__ > 0x7001) && (__MSL__ < 0x8000))
+# ifndef _STLP_NATIVE_SETJMP_H_INCLUDED
+using _STLP_VENDOR_CSTD::setjmp;
+# else
+using ::setjmp;
+# endif
+# endif
+# endif
+# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED)
+using _STLP_VENDOR_CSTD::longjmp;
+# else
+using ::longjmp;
+# endif
+# endif
+_STLP_END_NAMESPACE
+#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_csignal.h b/6/sources/cxx-stl/stlport/stlport/stl/_csignal.h
new file mode 100644
index 0000000..551846b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_csignal.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSIGNAL
+#define _STLP_INTERNAL_CSIGNAL
+
+#if !defined (_STLP_WCE)
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <csignal>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(csignal)
+# endif
+# else
+# include <signal.h>
+# endif
+
+# if defined (_STLP_IMPORT_VENDOR_CSTD)
+_STLP_BEGIN_NAMESPACE
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+using _STLP_VENDOR_CSTD::signal;
+using _STLP_VENDOR_CSTD::raise;
+# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+using _STLP_VENDOR_CSTD::sig_atomic_t;
+_STLP_END_NAMESPACE
+# endif /* _STLP_IMPORT_VENDOR_CSTD */
+#endif
+
+#endif /* _STLP_INTERNAL_CSIGNAL */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cstdarg.h b/6/sources/cxx-stl/stlport/stlport/stl/_cstdarg.h
new file mode 100644
index 0000000..e98f31c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cstdarg.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+#ifndef _STLP_INTERNAL_CSTDARG
+#define _STLP_INTERNAL_CSTDARG
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdarg>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdarg)
+# endif
+#else
+# include <stdarg.h>
+#endif
+
+#ifdef _STLP_IMPORT_VENDOR_CSTD
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::va_list;
+_STLP_END_NAMESPACE
+#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cstddef.h b/6/sources/cxx-stl/stlport/stlport/stl/_cstddef.h
new file mode 100644
index 0000000..35a585c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cstddef.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+#define _STLP_INTERNAL_CSTDDEF
+
+# if (__GNUC__ >= 3) && defined (__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0
+# define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :(
+# define __need_wchar_t
+# define __need_size_t
+# define __need_ptrdiff_t
+# define __need_NULL
+# endif
+
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstddef>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
+# endif
+# else
+# include <stddef.h>
+# endif
+
+# ifdef _STLP_IMPORT_VENDOR_CSTD
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::ptrdiff_t;
+using _STLP_VENDOR_CSTD::size_t;
+_STLP_END_NAMESPACE
+# endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif /* _STLP_INTERNAL_CSTDDEF */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cstdio.h b/6/sources/cxx-stl/stlport/stlport/stl/_cstdio.h
new file mode 100644
index 0000000..67236f2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cstdio.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSTDIO
+#define _STLP_INTERNAL_CSTDIO
+
+#if defined (__Lynx__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stdarg.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stdarg.h)
+# endif
+#endif
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdio>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdio)
+# endif
+#else
+# include <stdio.h>
+#endif
+
+#if defined (__MWERKS__)
+# undef stdin
+# undef stdout
+# undef stderr
+# define stdin (&_STLP_VENDOR_CSTD::__files[0])
+# define stdout (&_STLP_VENDOR_CSTD::__files[1])
+# define stderr (&_STLP_VENDOR_CSTD::__files[2])
+#endif
+
+#if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER)
+inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
+{ return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); }
+#endif
+
+#if defined (_STLP_IMPORT_VENDOR_CSTD )
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::FILE;
+using _STLP_VENDOR_CSTD::fpos_t;
+using _STLP_VENDOR_CSTD::size_t;
+
+// undef obsolete macros
+# undef putc
+# undef getc
+# undef getchar
+# undef putchar
+# undef feof
+# undef ferror
+
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+using _STLP_VENDOR_CSTD::clearerr;
+using _STLP_VENDOR_CSTD::fclose;
+using _STLP_VENDOR_CSTD::feof;
+using _STLP_VENDOR_CSTD::ferror;
+using _STLP_VENDOR_CSTD::fflush;
+using _STLP_VENDOR_CSTD::fgetc;
+using _STLP_VENDOR_CSTD::fgetpos;
+using _STLP_VENDOR_CSTD::fgets;
+using _STLP_VENDOR_CSTD::fopen;
+using _STLP_VENDOR_CSTD::fprintf;
+using _STLP_VENDOR_CSTD::fputc;
+using _STLP_VENDOR_CSTD::fputs;
+using _STLP_VENDOR_CSTD::fread;
+# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
+using _STLP_VENDOR_CSTD::freopen;
+# endif
+using _STLP_VENDOR_CSTD::fscanf;
+using _STLP_VENDOR_CSTD::fseek;
+using _STLP_VENDOR_CSTD::fsetpos;
+using _STLP_VENDOR_CSTD::ftell;
+using _STLP_VENDOR_CSTD::fwrite;
+
+# if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500))
+# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) // Supplied as macros, TODO: use inline function to redirect to the macros?
+ using _STLP_VENDOR_CSTD::getc;
+ using _STLP_VENDOR_CSTD::putc;
+# endif
+ using _STLP_VENDOR_CSTD::getchar;
+ using _STLP_VENDOR_CSTD::putchar;
+# endif
+
+using _STLP_VENDOR_CSTD::gets;
+# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
+using _STLP_VENDOR_CSTD::perror;
+# endif
+using _STLP_VENDOR_CSTD::printf;
+using _STLP_VENDOR_CSTD::puts;
+# if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
+using _STLP_VENDOR_CSTD::remove;
+using _STLP_VENDOR_CSTD::rename;
+using _STLP_VENDOR_CSTD::rewind;
+using _STLP_VENDOR_CSTD::setbuf;
+using _STLP_VENDOR_CSTD::tmpfile;
+using _STLP_VENDOR_CSTD::tmpnam;
+# endif
+using _STLP_VENDOR_CSTD::scanf;
+using _STLP_VENDOR_CSTD::setvbuf;
+using _STLP_VENDOR_CSTD::sprintf;
+using _STLP_VENDOR_CSTD::sscanf;
+using _STLP_VENDOR_CSTD::ungetc;
+using _STLP_VENDOR_CSTD::vfprintf;
+using _STLP_VENDOR_CSTD::vprintf;
+using _STLP_VENDOR_CSTD::vsprintf;
+# if (defined (__MWERKS__) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \
+ (defined (__BORLANDC__)))
+using _STLP_VENDOR_CSTD::vsnprintf;
+# endif
+# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+_STLP_END_NAMESPACE
+#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif /* _STLP_INTERNAL_CSTDIO */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cstdlib.h b/6/sources/cxx-stl/stlport/stlport/stl/_cstdlib.h
new file mode 100644
index 0000000..4d1dd35
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cstdlib.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+#define _STLP_INTERNAL_CSTDLIB
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstdlib>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
+# endif
+#else
+# include <stdlib.h>
+#endif
+
+#if defined (__BORLANDC__) && !defined (__linux__)
+/* Borland process.h header do not bring anything here and is just included
+ * in order to avoid inclusion later. This header cannot be included later
+ * because Borland compiler consider that for instance the abort function
+ * defined as extern "C" cannot be overloaded and it finds 2 "overloads",
+ * once in native std namespace and the other in STLport namespace...
+ */
+# include <process.h>
+#endif
+
+/* on evc3/evc4 including stdlib.h also defines setjmp macro */
+#if defined (_STLP_WCE)
+# define _STLP_NATIVE_SETJMP_H_INCLUDED
+#endif
+
+#if defined (__MSL__) && (__MSL__ <= 0x5003)
+namespace std {
+ typedef ::div_t div_t;
+ typedef ::ldiv_t ldiv_t;
+# ifdef __MSL_LONGLONG_SUPPORT__
+ typedef ::lldiv_t lldiv_t;
+# endif
+}
+#endif
+
+#ifdef _STLP_IMPORT_VENDOR_CSTD
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::div_t;
+using _STLP_VENDOR_CSTD::ldiv_t;
+using _STLP_VENDOR_CSTD::size_t;
+
+# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
+# ifndef _STLP_WCE
+// these functions just don't exist on Windows CE
+using _STLP_VENDOR_CSTD::abort;
+using _STLP_VENDOR_CSTD::getenv;
+using _STLP_VENDOR_CSTD::mblen;
+using _STLP_VENDOR_CSTD::mbtowc;
+using _STLP_VENDOR_CSTD::system;
+using _STLP_VENDOR_CSTD::bsearch;
+# endif
+using _STLP_VENDOR_CSTD::atexit;
+using _STLP_VENDOR_CSTD::exit;
+using _STLP_VENDOR_CSTD::calloc;
+using _STLP_VENDOR_CSTD::free;
+using _STLP_VENDOR_CSTD::malloc;
+using _STLP_VENDOR_CSTD::realloc;
+using _STLP_VENDOR_CSTD::atof;
+using _STLP_VENDOR_CSTD::atoi;
+using _STLP_VENDOR_CSTD::atol;
+using _STLP_VENDOR_CSTD::mbstowcs;
+using _STLP_VENDOR_CSTD::strtod;
+using _STLP_VENDOR_CSTD::strtol;
+using _STLP_VENDOR_CSTD::strtoul;
+
+# if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_NATIVE_MBSTATE_T))
+using _STLP_VENDOR_CSTD::wcstombs;
+# ifndef _STLP_WCE
+using _STLP_VENDOR_CSTD::wctomb;
+# endif
+# endif
+using _STLP_VENDOR_CSTD::qsort;
+using _STLP_VENDOR_CSTD::labs;
+using _STLP_VENDOR_CSTD::ldiv;
+# if defined (_STLP_LONG_LONG) && !defined (_STLP_NO_VENDOR_STDLIB_L)
+# if !defined(__sun)
+using _STLP_VENDOR_CSTD::llabs;
+using _STLP_VENDOR_CSTD::lldiv_t;
+using _STLP_VENDOR_CSTD::lldiv;
+# else
+using ::llabs;
+using ::lldiv_t;
+using ::lldiv;
+# endif
+# endif
+using _STLP_VENDOR_CSTD::rand;
+using _STLP_VENDOR_CSTD::srand;
+# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+_STLP_END_NAMESPACE
+#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#if (defined (__BORLANDC__) || defined (__WATCOMC__)) && defined (_STLP_USE_NEW_C_HEADERS)
+//In this config bcc define everything in std namespace and not in
+//the global one.
+inline int abs(int __x) { return _STLP_VENDOR_CSTD::abs(__x); }
+inline _STLP_VENDOR_CSTD::div_t div(int __x, int __y) { return _STLP_VENDOR_CSTD::div(__x, __y); }
+#endif
+
+#if defined(_MSC_EXTENSIONS) && defined(_STLP_MSVC) && (_STLP_MSVC <= 1300)
+# define _STLP_RESTORE_FUNCTION_INTRINSIC
+# pragma warning (push)
+# pragma warning (disable: 4162)
+# pragma function (abs)
+#endif
+
+//HP-UX native lib has abs() and div() functions in global namespace
+#if !defined (__SUNPRO_CC) && \
+ (!defined (__HP_aCC) || (__HP_aCC < 30000))
+
+//MSVC starting with .Net 2003 already define all math functions in global namespace:
+# if !defined (__WATCOMC__) && \
+ (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined (UNDER_CE))
+inline long abs(long __x) { return _STLP_VENDOR_CSTD::labs(__x); }
+# endif
+
+/** VC since version 8 has this, the platform SDK and CE SDKs hanging behind. */
+# if !defined (__WATCOMC__) && \
+ (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) || defined (UNDER_CE))
+inline _STLP_VENDOR_CSTD::ldiv_t div(long __x, long __y) { return _STLP_VENDOR_CSTD::ldiv(__x, __y); }
+# endif
+
+#endif
+
+#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
+# pragma intrinsic (abs)
+# pragma warning (pop)
+# undef _STLP_RESTORE_FUNCTION_INTRINSIC
+#endif
+
+#if defined (_STLP_LONG_LONG)
+# if !defined (_STLP_NO_VENDOR_STDLIB_L)
+# if !defined (__sun)
+inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::llabs(__x); }
+inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::lldiv(__x, __y); }
+# else
+inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return ::llabs(__x); }
+inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return ::lldiv(__x, __y); }
+# endif
+# else
+inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; }
+# endif
+#endif
+
+/* C++ Standard is unclear about several call to 'using ::func' if new overloads
+ * of ::func appears between 2 successive 'using' calls. To avoid this potential
+ * problem we provide all abs overload before the 'using' call.
+ * Beware: This header inclusion has to be after all abs overload of this file.
+ * The first 'using ::abs' call is going to be in the other header.
+ */
+#ifndef _STLP_INTERNAL_CMATH
+# include <stl/_cmath.h>
+#endif
+
+#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+// ad hoc, don't replace with _STLP_VENDOR_CSTD::abs here! - ptr 2005-03-05
+_STLP_BEGIN_NAMESPACE
+using ::abs;
+using ::div;
+_STLP_END_NAMESPACE
+#endif
+
+#endif /* _STLP_INTERNAL_CSTDLIB */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cstring.h b/6/sources/cxx-stl/stlport/stlport/stl/_cstring.h
new file mode 100644
index 0000000..fe0fd5f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cstring.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CSTRING
+#define _STLP_INTERNAL_CSTRING
+
+#if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstring>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstring)
+# endif
+#else
+# include <string.h>
+#endif
+
+#ifdef _STLP_IMPORT_VENDOR_CSTD
+_STLP_BEGIN_NAMESPACE
+# include <using/cstring>
+_STLP_END_NAMESPACE
+#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif /* _STLP_INTERNAL_CSTRING */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ctime.h b/6/sources/cxx-stl/stlport/stlport/stl/_ctime.h
new file mode 100644
index 0000000..56e433b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ctime.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CTIME
+#define _STLP_INTERNAL_CTIME
+
+#if !defined (_STLP_WCE_EVC3)
+
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <ctime>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(ctime)
+# endif
+# else
+# include <time.h>
+# endif
+
+# if defined (_STLP_IMPORT_VENDOR_CSTD)
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD::size_t;
+using _STLP_VENDOR_CSTD::clock_t;
+using _STLP_VENDOR_CSTD::time_t;
+using _STLP_VENDOR_CSTD::tm;
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+using _STLP_VENDOR_CSTD::clock;
+using _STLP_VENDOR_CSTD::asctime;
+using _STLP_VENDOR_CSTD::ctime;
+using _STLP_VENDOR_CSTD::gmtime;
+
+# if !defined (_WIN32_WCE) || (_WIN32_WCE < 0x500) // CE5 stopped supplying this
+using _STLP_VENDOR_CSTD::difftime;
+# endif
+using _STLP_VENDOR_CSTD::mktime;
+using _STLP_VENDOR_CSTD::localtime;
+using _STLP_VENDOR_CSTD::strftime;
+using _STLP_VENDOR_CSTD::time;
+# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+_STLP_END_NAMESPACE
+# endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#endif
+
+#endif /* _STLP_INTERNAL_CTIME */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ctraits_fns.h b/6/sources/cxx-stl/stlport/stlport/stl/_ctraits_fns.h
new file mode 100644
index 0000000..e4a4af1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ctraits_fns.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 1999
+ * 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.
+ */
+
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
+#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+// This file contains a few small adapters that allow a character
+// traits class to be used as a function object.
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Traits>
+struct _Eq_traits
+ : public binary_function<typename _Traits::char_type,
+ typename _Traits::char_type,
+ bool> {
+ bool operator()(const typename _Traits::char_type& __x,
+ const typename _Traits::char_type& __y) const
+ { return _Traits::eq(__x, __y); }
+};
+
+template <class _Traits>
+struct _Eq_char_bound
+ : public unary_function<typename _Traits::char_type, bool> {
+ typename _Traits::char_type __val;
+ _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
+ bool operator()(const typename _Traits::char_type& __x) const
+ { return _Traits::eq(__x, __val); }
+};
+
+template <class _Traits>
+struct _Neq_char_bound
+ : public unary_function<typename _Traits::char_type, bool>
+{
+ typename _Traits::char_type __val;
+ _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
+ bool operator()(const typename _Traits::char_type& __x) const
+ { return !_Traits::eq(__x, __val); }
+};
+
+template <class _Traits>
+struct _Eq_int_bound
+ : public unary_function<typename _Traits::char_type, bool> {
+ typename _Traits::int_type __val;
+
+ _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {}
+ bool operator()(const typename _Traits::char_type& __x) const
+ { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); }
+};
+
+#if 0
+template <class _Traits>
+struct _Lt_traits
+ : public binary_function<typename _Traits::char_type,
+ typename _Traits::char_type,
+ bool> {
+ bool operator()(const typename _Traits::char_type& __x,
+ const typename _Traits::char_type& __y) const
+ { return _Traits::lt(__x, __y); }
+};
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ctype.h b/6/sources/cxx-stl/stlport/stlport/stl/_ctype.h
new file mode 100644
index 0000000..33a5d3c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ctype.h
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+#ifndef _STLP_INTERNAL_CTYPE_H
+#define _STLP_INTERNAL_CTYPE_H
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LOCALE_H
+# include <stl/_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+class _STLP_CLASS_DECLSPEC ctype_base {
+public:
+ enum mask {
+ space = _Locale_SPACE,
+ print = _Locale_PRINT,
+ cntrl = _Locale_CNTRL,
+ upper = _Locale_UPPER,
+ lower = _Locale_LOWER,
+ alpha = _Locale_ALPHA,
+ digit = _Locale_DIGIT,
+ punct = _Locale_PUNCT,
+ xdigit = _Locale_XDIGIT,
+ alnum = alpha | digit,
+ graph = alnum | punct
+ };
+};
+
+// ctype<> template
+
+template <class charT> class ctype {};
+template <class charT> class ctype_byname {};
+
+//ctype specializations
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC ctype<char> : public locale::facet, public ctype_base {
+#ifndef _STLP_NO_WCHAR_T
+# ifdef _STLP_MSVC
+ typedef ctype<wchar_t> _Wctype;
+ friend _Wctype;
+# else
+ friend class ctype<wchar_t>;
+# endif
+#endif
+public:
+
+ typedef char char_type;
+
+ explicit ctype(const mask* __tab = 0, bool __del = false, size_t __refs = 0);
+ bool is(mask __m, char __c) const
+ { return ((*(_M_ctype_table+(unsigned char)__c)) & __m) != 0; }
+
+ const char* is(const char* __low, const char* __high, mask* __vec) const {
+ for (const char* __p = __low;__p != __high; ++__p, ++__vec) {
+ *__vec = _M_ctype_table[(unsigned char)*__p];
+ }
+ return __high;
+ }
+
+ const char* scan_is(mask __m, const char* __low, const char* __high) const;
+ const char* scan_not(mask __m, const char* __low, const char* __high) const;
+
+ char (toupper)(char __c) const { return do_toupper(__c); }
+ const char* (toupper)(char* __low, const char* __high) const {
+ return do_toupper(__low, __high);
+ }
+
+ char (tolower)(char __c) const { return do_tolower(__c); }
+ const char* (tolower)(char* __low, const char* __high) const {
+ return do_tolower(__low, __high);
+ }
+
+ char widen(char __c) const { return do_widen(__c); }
+ const char* widen(const char* __low, const char* __high, char* __to) const {
+ return do_widen(__low, __high, __to);
+ }
+
+ char narrow(char __c, char __dfault) const {
+ return do_narrow(__c, __dfault);
+ }
+ const char* narrow(const char* __low, const char* __high,
+ char __dfault, char* __to) const {
+ return do_narrow(__low, __high, __dfault, __to);
+ }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+ _STLP_STATIC_CONSTANT(size_t, table_size = 256);
+
+protected:
+ const mask* table() const _STLP_NOTHROW { return _M_ctype_table; }
+ static const mask* _STLP_CALL classic_table() _STLP_NOTHROW;
+
+ ~ctype();
+
+ virtual char do_toupper(char __c) const;
+ virtual char do_tolower(char __c) const;
+ virtual const char* do_toupper(char* __low, const char* __high) const;
+ virtual const char* do_tolower(char* __low, const char* __high) const;
+ virtual char do_widen(char __c) const;
+ virtual const char* do_widen(const char* __low, const char* __high,
+ char* __to) const;
+ virtual char do_narrow(char __c, char /* dfault */ ) const;
+ virtual const char* do_narrow(const char* __low, const char* __high,
+ char /* dfault */, char* __to) const;
+private:
+ struct _Is_mask {
+ mask __m;
+ _Is_mask(mask __x): __m(__x) {}
+ bool operator()(char __c) {return (__m & (unsigned char) __c) != 0;}
+ };
+
+protected:
+ const mask* _M_ctype_table;
+private:
+ bool _M_delete;
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC ctype_byname<char>: public ctype<char> {
+ friend class _Locale_impl;
+public:
+ explicit ctype_byname(const char*, size_t = 0);
+ ~ctype_byname();
+
+ virtual char do_toupper(char __c) const;
+ virtual char do_tolower(char __c) const;
+
+ virtual const char* do_toupper(char*, const char*) const;
+ virtual const char* do_tolower(char*, const char*) const;
+
+private:
+ ctype_byname(_Locale_ctype* __ctype)
+ : _M_ctype(__ctype)
+ { _M_init(); }
+
+ void _M_init();
+
+ //explicitely defined as private to avoid warnings:
+ typedef ctype_byname<char> _Self;
+ ctype_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ mask _M_byname_table[table_size];
+ _Locale_ctype* _M_ctype;
+};
+
+# ifndef _STLP_NO_WCHAR_T
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC ctype<wchar_t> : public locale::facet, public ctype_base {
+public:
+ typedef wchar_t char_type;
+
+ explicit ctype(size_t __refs = 0) : locale::facet(__refs) {}
+
+ bool is(mask __m, wchar_t __c) const
+ { return do_is(__m, __c); }
+
+ const wchar_t* is(const wchar_t* __low, const wchar_t* __high,
+ mask* __vec) const
+ { return do_is(__low, __high, __vec); }
+
+ const wchar_t* scan_is(mask __m,
+ const wchar_t* __low, const wchar_t* __high) const
+ { return do_scan_is(__m, __low, __high); }
+
+ const wchar_t* scan_not (mask __m,
+ const wchar_t* __low, const wchar_t* __high) const
+ { return do_scan_not(__m, __low, __high); }
+
+ wchar_t (toupper)(wchar_t __c) const { return do_toupper(__c); }
+ const wchar_t* (toupper)(wchar_t* __low, const wchar_t* __high) const
+ { return do_toupper(__low, __high); }
+
+ wchar_t (tolower)(wchar_t __c) const { return do_tolower(__c); }
+ const wchar_t* (tolower)(wchar_t* __low, const wchar_t* __high) const
+ { return do_tolower(__low, __high); }
+
+ wchar_t widen(char __c) const { return do_widen(__c); }
+ const char* widen(const char* __low, const char* __high,
+ wchar_t* __to) const
+ { return do_widen(__low, __high, __to); }
+
+ char narrow(wchar_t __c, char __dfault) const
+ { return do_narrow(__c, __dfault); }
+ const wchar_t* narrow(const wchar_t* __low, const wchar_t* __high,
+ char __dfault, char* __to) const
+ { return do_narrow(__low, __high, __dfault, __to); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~ctype();
+
+ virtual bool do_is(mask __m, wchar_t __c) const;
+ virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const;
+ virtual const wchar_t* do_scan_is(mask,
+ const wchar_t*, const wchar_t*) const;
+ virtual const wchar_t* do_scan_not(mask,
+ const wchar_t*, const wchar_t*) const;
+ virtual wchar_t do_toupper(wchar_t __c) const;
+ virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const;
+ virtual wchar_t do_tolower(wchar_t c) const;
+ virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const;
+ virtual wchar_t do_widen(char c) const;
+ virtual const char* do_widen(const char*, const char*, wchar_t*) const;
+ virtual char do_narrow(wchar_t __c, char __dfault) const;
+ virtual const wchar_t* do_narrow(const wchar_t*, const wchar_t*,
+ char, char*) const;
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC ctype_byname<wchar_t>: public ctype<wchar_t> {
+ friend class _Locale_impl;
+public:
+ explicit ctype_byname(const char* __name, size_t __refs = 0);
+
+protected:
+ ~ctype_byname();
+
+ virtual bool do_is(mask __m, wchar_t __c) const;
+ virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const;
+ virtual const wchar_t* do_scan_is(mask,
+ const wchar_t*, const wchar_t*) const;
+ virtual const wchar_t* do_scan_not(mask,
+ const wchar_t*, const wchar_t*) const;
+ virtual wchar_t do_toupper(wchar_t __c) const;
+ virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const;
+ virtual wchar_t do_tolower(wchar_t c) const;
+ virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const;
+
+private:
+ ctype_byname(_Locale_ctype* __ctype)
+ : _M_ctype(__ctype) {}
+
+ //explicitely defined as private to avoid warnings:
+ typedef ctype_byname<wchar_t> _Self;
+ ctype_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_ctype* _M_ctype;
+};
+
+# endif /* WCHAR_T */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_CTYPE_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cwchar.h b/6/sources/cxx-stl/stlport/stlport/stl/_cwchar.h
new file mode 100644
index 0000000..87cb82b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cwchar.h
@@ -0,0 +1,342 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CWCHAR
+#define _STLP_INTERNAL_CWCHAR
+
+#if defined (_STLP_WCE_EVC3)
+# ifndef _STLP_INTERNAL_MBSTATE_T
+# include <stl/_mbstate_t.h>
+# endif
+#else
+# if defined (__GNUC__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cstddef>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cstddef)
+# endif
+# endif
+
+# if !defined (_STLP_NO_CWCHAR) && defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cwchar>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cwchar)
+# endif
+# if defined (__OpenBSD__)
+typedef _BSD_WINT_T_ wint_t;
+# endif /* __OpenBSD__ */
+
+# if defined (__DMC__)
+# define __STDC_LIMIT_MACROS
+# include <stdint.h> // WCHAR_MIN, WCHAR_MAX
+# endif
+# elif defined (_STLP_NO_WCHAR_T) || \
+ (defined (__BORLANDC__) && (__BORLANDC__ < 0x570)) || \
+ defined (__OpenBSD__) || defined (__FreeBSD__) || \
+ (defined (__GNUC__) && (defined (__APPLE__) || defined ( __Lynx__ )))
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stddef.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stddef.h)
+# endif
+# if defined (__Lynx__)
+# ifndef _WINT_T
+typedef long int wint_t;
+# define _WINT_T
+# endif /* _WINT_T */
+# endif
+# if defined(__OpenBSD__)
+typedef _BSD_WINT_T_ wint_t;
+# endif /* __OpenBSD__ */
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <wchar.h>
+# else
+# include _STLP_NATIVE_C_HEADER(wchar.h)
+# endif
+
+# if defined (__sun) && (defined (_XOPEN_SOURCE) || (_XOPEN_VERSION - 0 == 4))
+extern wint_t btowc();
+extern int fwprintf();
+extern int fwscanf();
+extern int fwide();
+extern int mbsinit();
+extern size_t mbrlen();
+extern size_t mbrtowc();
+extern size_t mbsrtowcs();
+extern int swprintf();
+extern int swscanf();
+extern int vfwprintf();
+extern int vwprintf();
+extern int vswprintf();
+extern size_t wcrtomb();
+extern size_t wcsrtombs();
+extern wchar_t *wcsstr();
+extern int wctob();
+extern wchar_t *wmemchr();
+extern int wmemcmp();
+extern wchar_t *wmemcpy();
+extern wchar_t *wmemmove();
+extern wchar_t *wmemset();
+extern int wprintf();
+extern int wscanf();
+# endif
+# endif
+
+# if defined (__MSL__) && (__MSL__ <= 0x51FF) /* dwa 2/28/99 - not yet implemented by MSL */
+# define _STLP_WCHAR_MSL_EXCLUDE 1
+namespace std {
+ extern "C" size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr);
+}
+# define _STLP_NO_NATIVE_MBSTATE_T 1
+# elif defined (__BORLANDC__)
+# if !defined (_STLP_USE_NO_IOSTREAMS)
+# define _STLP_NO_NATIVE_MBSTATE_T
+# endif
+# define _STLP_WCHAR_BORLAND_EXCLUDE 1
+# endif
+
+# ifndef _STLP_INTERNAL_MBSTATE_T
+# include <stl/_mbstate_t.h>
+# endif
+
+# if !defined (_STLP_NO_WCHAR_T)
+# ifndef WCHAR_MIN
+# define WCHAR_MIN 0
+/* SUNpro has some bugs with casts. wchar_t is size of int there anyway. */
+# if defined (__SUNPRO_CC) || defined (__DJGPP)
+# define WCHAR_MAX (~0)
+# else
+# define WCHAR_MAX ((wchar_t)~0)
+# endif
+# endif
+# if defined (__DMC__) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || defined(_WIN32_WCE)
+/* Compilers that do not define WCHAR_MIN and WCHAR_MAX to be testable at
+ * preprocessing time. */
+# undef WCHAR_MIN
+# define WCHAR_MIN 0
+# undef WCHAR_MAX
+# define WCHAR_MAX 0xffff
+# endif
+# if defined (__GNUC__) && defined (__alpha__)
+/* Definition of WCHAR_MIN and MAX are wrong for alpha platform
+ * as gcc consider wchar_t as an unsigned type but WCHAR_MIN is defined as
+ * a negative value. Static assertion is here to check that a future alpha
+ * SDK or a future gcc won't change the situation making this workaround
+ * useless.
+ */
+/* Check that gcc still consider wchar_t as unsigned */
+_STLP_STATIC_ASSERT(((wchar_t)-1 > 0))
+/* Check that WCHAR_MIN value hasn't been fixed */
+_STLP_STATIC_ASSERT((WCHAR_MIN < 0))
+# undef WCHAR_MIN
+# define WCHAR_MIN 0
+# undef WCHAR_MAX
+# define WCHAR_MAX 0xffffffff
+# endif
+# if defined(__HP_aCC) && (__HP_aCC >= 60000)
+/* Starting with B.11.31, HP-UX/ia64 provides C99-compliant definitions
+ * of WCHAR_MIN/MAX macros without having to define
+ * _INCLUDE_STDC__SOURCE_199901 macro (which aCC compiler does not
+ * predefine). Let STLport provide B.11.31 definitions on any version of
+ * HP-UX/ia64.
+ */
+# undef WCHAR_MIN
+# define WCHAR_MIN 0
+# undef WCHAR_MAX
+# define WCHAR_MAX UINT_MAX
+# endif
+# endif
+
+# if defined (_STLP_IMPORT_VENDOR_CSTD)
+
+# if defined (__SUNPRO_CC) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
+using _STLP_VENDOR_CSTD::wint_t;
+# endif
+
+_STLP_BEGIN_NAMESPACE
+# if defined (_STLP_NO_WCHAR_T)
+typedef int wint_t;
+# else
+// gcc 3.0 has a glitch : wint_t only sucked into the global namespace if _GLIBCPP_USE_WCHAR_T is defined
+// __MWERKS__ has definition in wchar_t.h (MSL C++), but ones differ from definition
+// in stdio.h; I prefer settings from last file.
+# if (defined (__GNUC__) && ! defined (_GLIBCPP_USE_WCHAR_T))
+using ::wint_t;
+# else
+using _STLP_VENDOR_CSTD::wint_t;
+# endif
+# endif
+
+using _STLP_VENDOR_CSTD::size_t;
+
+# if !defined (_STLP_NO_NATIVE_MBSTATE_T) && !defined (_STLP_USE_OWN_MBSTATE_T)
+using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
+
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(_STLP_WCHAR_BORLAND_EXCLUDE) && \
+ (!defined(__MSL__) || __MSL__ > 0x6001)
+# if defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8))) || \
+ !(defined (__KCC) || defined (__GNUC__)) && !defined(_STLP_WCE_NET)
+using _STLP_VENDOR_MB_NAMESPACE::btowc;
+# if (!defined(__MSL__) || __MSL__ > 0x7001)
+using _STLP_VENDOR_MB_NAMESPACE::mbsinit;
+# endif
+# endif
+# if defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 3) || ((__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION >= 8))) || \
+ !defined (__GNUC__) && !defined(_STLP_WCE_NET)
+using _STLP_VENDOR_MB_NAMESPACE::mbrlen;
+using _STLP_VENDOR_MB_NAMESPACE::mbrtowc;
+using _STLP_VENDOR_MB_NAMESPACE::mbsrtowcs;
+using _STLP_VENDOR_MB_NAMESPACE::wcrtomb;
+using _STLP_VENDOR_MB_NAMESPACE::wcsrtombs;
+# endif
+# endif /* BORLAND && !__MSL__ || __MSL__ > 0x6001 */
+
+# endif /* _STLP_NO_NATIVE_MBSTATE_T */
+
+# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+
+# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+using _STLP_VENDOR_CSTD::fgetwc;
+using _STLP_VENDOR_CSTD::fgetws;
+using _STLP_VENDOR_CSTD::fputwc;
+using _STLP_VENDOR_CSTD::fputws;
+# endif
+
+# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) || \
+ defined(_STLP_WCHAR_HPACC_EXCLUDE) )
+# if !defined (__DECCXX)
+using _STLP_VENDOR_CSTD::fwide;
+# endif
+using _STLP_VENDOR_CSTD::fwprintf;
+using _STLP_VENDOR_CSTD::fwscanf;
+using _STLP_VENDOR_CSTD::getwchar;
+# endif
+
+# if !defined(_STLP_WCHAR_BORLAND_EXCLUDE)
+# ifndef _STLP_WCE_NET
+using _STLP_VENDOR_CSTD::getwc;
+# endif
+using _STLP_VENDOR_CSTD::ungetwc;
+# ifndef _STLP_WCE_NET
+using _STLP_VENDOR_CSTD::putwc;
+# endif
+using _STLP_VENDOR_CSTD::putwchar;
+# endif
+
+# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) || \
+ defined (_STLP_WCHAR_HPACC_EXCLUDE) )
+# if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB <= 1300) || \
+ defined (__MINGW32__)
+# undef swprintf
+# define swprintf _snwprintf
+# undef vswprintf
+# define vswprintf _vsnwprintf
+using ::swprintf;
+using ::vswprintf;
+# else
+using _STLP_VENDOR_CSTD::swprintf;
+using _STLP_VENDOR_CSTD::vswprintf;
+# endif
+using _STLP_VENDOR_CSTD::swscanf;
+using _STLP_VENDOR_CSTD::vfwprintf;
+using _STLP_VENDOR_CSTD::vwprintf;
+
+# if (!defined(__MSL__) || __MSL__ > 0x7001 ) && !defined(_STLP_WCE_NET) && \
+ !defined(_STLP_USE_UCLIBC) /* at least in uClibc 0.9.26 */
+
+using _STLP_VENDOR_CSTD::wcsftime;
+# endif
+using _STLP_VENDOR_CSTD::wcstok;
+
+# endif
+
+# if !defined (_STLP_WCE_NET)
+using _STLP_VENDOR_CSTD::wcscoll;
+using _STLP_VENDOR_CSTD::wcsxfrm;
+# endif
+using _STLP_VENDOR_CSTD::wcscat;
+using _STLP_VENDOR_CSTD::wcsrchr;
+using _STLP_VENDOR_CSTD::wcscmp;
+
+using _STLP_VENDOR_CSTD::wcscpy;
+using _STLP_VENDOR_CSTD::wcscspn;
+
+using _STLP_VENDOR_CSTD::wcslen;
+using _STLP_VENDOR_CSTD::wcsncat;
+using _STLP_VENDOR_CSTD::wcsncmp;
+using _STLP_VENDOR_CSTD::wcsncpy;
+using _STLP_VENDOR_CSTD::wcspbrk;
+using _STLP_VENDOR_CSTD::wcschr;
+
+using _STLP_VENDOR_CSTD::wcsspn;
+
+# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
+using _STLP_VENDOR_CSTD::wcstod;
+using _STLP_VENDOR_CSTD::wcstol;
+# endif
+
+# if !(defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_HPACC_EXCLUDE) )
+using _STLP_VENDOR_CSTD::wcsstr;
+using _STLP_VENDOR_CSTD::wmemchr;
+
+# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
+# if !defined (_STLP_WCE_NET)
+using _STLP_VENDOR_CSTD::wctob;
+# endif
+# if !defined (__DMC__)
+using _STLP_VENDOR_CSTD::wmemcmp;
+using _STLP_VENDOR_CSTD::wmemmove;
+# endif
+using _STLP_VENDOR_CSTD::wprintf;
+using _STLP_VENDOR_CSTD::wscanf;
+# endif
+
+# if defined (__BORLANDC__) && !defined (__linux__)
+inline wchar_t* _STLP_wmemcpy(wchar_t* __wdst, const wchar_t* __wsrc, size_t __n)
+{ return __STATIC_CAST(wchar_t*, _STLP_VENDOR_CSTD::wmemcpy(__wdst, __wsrc, __n)); }
+inline wchar_t* _STLP_wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
+{ return __STATIC_CAST(wchar_t*, _STLP_VENDOR_CSTD::memset(__wdst, __wc, __n)); }
+# undef wmemcpy
+# undef wmemset
+inline wchar_t* wmemcpy(wchar_t* __wdst, const wchar_t* __wsrc, size_t __n)
+{ return _STLP_wmemcpy(__wdst, __wsrc, __n); }
+inline wchar_t* wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
+{ return _STLP_wmemset(__wdst, __wc, __n); }
+# elif defined (__DMC__)
+inline wchar_t* wmemcpy(wchar_t* __RESTRICT __wdst, const wchar_t* __RESTRICT __wsrc, size_t __n)
+{ return __STATIC_CAST(wchar_t*, memcpy(__wdst, __wsrc, __n * sizeof(wchar_t))); }
+inline wchar_t* wmemmove(wchar_t* __RESTRICT __wdst, const wchar_t * __RESTRICT __wc, size_t __n)
+{ return __STATIC_CAST(wchar_t*, memmove(__wdst, __wc, __n * sizeof(wchar_t))); }
+inline wchar_t* wmemset(wchar_t* __wdst, wchar_t __wc, size_t __n)
+{ for (size_t i = 0; i < __n; i++) __wdst[i] = __wc; return __wdst; }
+# else
+using _STLP_VENDOR_CSTD::wmemcpy;
+using _STLP_VENDOR_CSTD::wmemset;
+# endif
+# endif
+
+# endif /* _STLP_NO_NATIVE_WIDE_FUNCTIONS */
+_STLP_END_NAMESPACE
+
+# endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+# undef _STLP_WCHAR_SUNPRO_EXCLUDE
+# undef _STLP_WCHAR_MSL_EXCLUDE
+
+# endif /* !defined(_STLP_WCE_EVC3) */
+
+#endif /* _STLP_INTERNAL_CWCHAR */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_cwctype.h b/6/sources/cxx-stl/stlport/stlport/stl/_cwctype.h
new file mode 100644
index 0000000..83b551f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_cwctype.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_CWCTYPE
+#define _STLP_INTERNAL_CWCTYPE
+
+#if defined (__BORLANDC__) && !defined (_STLP_INTERNAL_CCTYPE)
+# include <stl/_cctype.h>
+#endif
+
+#if !defined (_STLP_WCE_EVC3)
+# if defined (_STLP_USE_NEW_C_HEADERS)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <cwctype>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(cwctype)
+# endif
+# if defined (__MSL__)
+namespace std {
+ typedef wchar_t wctrans_t;
+ wint_t towctrans(wint_t c, wctrans_t value);
+ wctrans_t wctrans(const char *name);
+}
+using std::wctrans_t;
+using std::towctrans;
+using std::wctrans;
+# endif
+# else
+# include <wctype.h>
+# endif
+
+# if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (__hpux)
+
+# if defined (_STLP_USE_GLIBC) && !(defined (_GLIBCPP_USE_WCHAR_T) || defined (_GLIBCXX_USE_WCHAR_T)) || \
+ defined (__sun) || defined (__FreeBSD__) || \
+ defined (__CYGWIN__) || \
+ defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION < 3) || (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION <= 0))
+//We take wide functions from global namespace:
+# define _STLP_VENDOR_CSTD_WFUNC
+# else
+# define _STLP_VENDOR_CSTD_WFUNC _STLP_VENDOR_CSTD
+# endif
+
+_STLP_BEGIN_NAMESPACE
+using _STLP_VENDOR_CSTD_WFUNC::wctype_t;
+using _STLP_VENDOR_CSTD_WFUNC::wint_t;
+# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+# if !defined (__BORLANDC__) && !defined (__MSL__)
+using _STLP_VENDOR_CSTD_WFUNC::wctrans_t;
+# if !defined (__DMC__) && (!defined(_WIN32_WCE) || (_WIN32_WCE < 400))
+using _STLP_VENDOR_CSTD_WFUNC::towctrans;
+using _STLP_VENDOR_CSTD_WFUNC::wctrans;
+using _STLP_VENDOR_CSTD_WFUNC::wctype;
+# endif
+using _STLP_VENDOR_CSTD_WFUNC::iswctype;
+# endif
+using _STLP_VENDOR_CSTD_WFUNC::iswalnum;
+using _STLP_VENDOR_CSTD_WFUNC::iswalpha;
+using _STLP_VENDOR_CSTD_WFUNC::iswcntrl;
+
+using _STLP_VENDOR_CSTD_WFUNC::iswdigit;
+using _STLP_VENDOR_CSTD_WFUNC::iswgraph;
+using _STLP_VENDOR_CSTD_WFUNC::iswlower;
+using _STLP_VENDOR_CSTD_WFUNC::iswprint;
+using _STLP_VENDOR_CSTD_WFUNC::iswpunct;
+using _STLP_VENDOR_CSTD_WFUNC::iswspace;
+using _STLP_VENDOR_CSTD_WFUNC::iswupper;
+using _STLP_VENDOR_CSTD_WFUNC::iswxdigit;
+
+using _STLP_VENDOR_CSTD_WFUNC::towlower;
+using _STLP_VENDOR_CSTD_WFUNC::towupper;
+# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
+_STLP_END_NAMESPACE
+# endif /* _STLP_IMPORT_VENDOR_CSTD */
+#endif /* _STLP_WCE_EVC3 */
+
+#endif /* _STLP_INTERNAL_CWCTYPE */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_deque.c b/6/sources/cxx-stl/stlport/stlport/stl/_deque.c
new file mode 100644
index 0000000..74e9ef6
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_deque.c
@@ -0,0 +1,823 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_DEQUE_C
+#define _STLP_DEQUE_C
+
+#ifndef _STLP_INTERNAL_DEQUE_H
+# include <stl/_deque.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Non-inline member functions from _Deque_base.
+
+template <class _Tp, class _Alloc >
+_Deque_base<_Tp,_Alloc >::~_Deque_base() {
+ if (_M_map._M_data) {
+ _M_destroy_nodes(_M_start._M_node, this->_M_finish._M_node + 1);
+ _M_map.deallocate(_M_map._M_data, _M_map_size._M_data);
+ }
+}
+
+template <class _Tp, class _Alloc >
+void _Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements) {
+ size_t __num_nodes = __num_elements / this->buffer_size() + 1 ;
+
+ _M_map_size._M_data = (max)((size_t) _S_initial_map_size, __num_nodes + 2);
+ _M_map._M_data = _M_map.allocate(_M_map_size._M_data);
+
+ _Tp** __nstart = _M_map._M_data + (_M_map_size._M_data - __num_nodes) / 2;
+ _Tp** __nfinish = __nstart + __num_nodes;
+
+ _STLP_TRY {
+ _M_create_nodes(__nstart, __nfinish);
+ }
+ _STLP_UNWIND((_M_map.deallocate(_M_map._M_data, _M_map_size._M_data),
+ _M_map._M_data = 0, _M_map_size._M_data = 0))
+ _M_start._M_set_node(__nstart);
+ this->_M_finish._M_set_node(__nfinish - 1);
+ _M_start._M_cur = _M_start._M_first;
+ this->_M_finish._M_cur = this->_M_finish._M_first + __num_elements % this->buffer_size();
+}
+
+template <class _Tp, class _Alloc >
+void _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart,
+ _Tp** __nfinish) {
+ _Tp** __cur = __nstart;
+ _STLP_TRY {
+ for (; __cur < __nfinish; ++__cur)
+ *__cur = _M_map_size.allocate(this->buffer_size());
+ }
+ _STLP_UNWIND(_M_destroy_nodes(__nstart, __cur))
+}
+
+template <class _Tp, class _Alloc >
+void _Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart,
+ _Tp** __nfinish) {
+ for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
+ _M_map_size.deallocate(*__n, this->buffer_size());
+}
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define deque _STLP_PTR_IMPL_NAME(deque)
+#elif defined (_STLP_DEBUG)
+# define deque _STLP_NON_DBG_NAME(deque)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+// qualified references
+# define __iterator__ _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >
+# define const_iterator _Deque_iterator<_Tp, _Const_traits<_Tp> >
+# define iterator __iterator__
+# define size_type size_t
+# define value_type _Tp
+#else
+# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE deque<_Tp, _Alloc>::iterator
+#endif
+
+template <class _Tp, class _Alloc >
+deque<_Tp, _Alloc >&
+deque<_Tp, _Alloc >::operator= (const deque<_Tp, _Alloc >& __x) {
+ const size_type __len = size();
+ if (&__x != this) {
+ if (__len >= __x.size())
+ erase(_STLP_STD::copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish);
+ else {
+ const_iterator __mid = __x.begin() + difference_type(__len);
+ _STLP_STD::copy(__x.begin(), __mid, this->_M_start);
+ insert(this->_M_finish, __mid, __x.end());
+ }
+ }
+ return *this;
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp, _Alloc >::_M_fill_insert(iterator __pos,
+ size_type __n, const value_type& __x) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ if (__pos._M_cur == this->_M_start._M_cur) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ _STLP_TRY {
+ uninitialized_fill(__new_start, this->_M_start, __x);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ this->_M_start = __new_start;
+ }
+ else if (__pos._M_cur == this->_M_finish._M_cur) {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ _STLP_TRY {
+ uninitialized_fill(this->_M_finish, __new_finish, __x);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1))
+ this->_M_finish = __new_finish;
+ }
+ else
+ _M_fill_insert_aux(__pos, __n, __x, _Movable());
+}
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+
+template <class _Tp, class _Alloc >
+void deque<_Tp, _Alloc>::insert(iterator __pos,
+ const value_type* __first, const value_type* __last) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ size_type __n = __last - __first;
+ if (__pos._M_cur == this->_M_start._M_cur) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ _STLP_TRY {
+ _STLP_PRIV __ucopy(__first, __last, __new_start);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ this->_M_start = __new_start;
+ }
+ else if (__pos._M_cur == this->_M_finish._M_cur) {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ _STLP_TRY {
+ _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
+ __new_finish._M_node + 1))
+ this->_M_finish = __new_finish;
+ }
+ else
+ _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ size_type __n = __last - __first;
+ if (__pos._M_cur == this->_M_start._M_cur) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ _STLP_TRY {
+ _STLP_PRIV __ucopy(__first, __last, __new_start);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ this->_M_start = __new_start;
+ }
+ else if (__pos._M_cur == this->_M_finish._M_cur) {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ _STLP_TRY {
+ _STLP_PRIV __ucopy(__first, __last, this->_M_finish);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,
+ __new_finish._M_node + 1))
+ this->_M_finish = __new_finish;
+ }
+ else
+ _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
+}
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __pos,
+ const __true_type& /*_Movable*/) {
+ difference_type __index = __pos - this->_M_start;
+ if (size_type(__index) < this->size() >> 1) {
+ //We move the start of the deque one position to the right
+ //starting from the rightmost element to move.
+ iterator __src = __pos, __dst = __pos;
+ _STLP_STD::_Destroy(&(*__dst));
+ if (__src != this->_M_start) {
+ for (--__src; __dst != this->_M_start; --__src, --__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ }
+ _M_pop_front_aux();
+ }
+ else {
+ iterator __src = __pos, __dst = __pos;
+ _STLP_STD::_Destroy(&(*__dst));
+ for (++__src; __src != this->_M_finish; ++__src, ++__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ //Duplication of the pop_back code without the destroy which has already been done:
+ if (this->_M_finish._M_cur != this->_M_finish._M_first) {
+ --this->_M_finish._M_cur;
+ }
+ else {
+ _M_pop_back_aux();
+ }
+ }
+ return this->_M_start + __index;
+}
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __pos,
+ const __false_type& /*_Movable*/) {
+ iterator __next = __pos;
+ ++__next;
+ difference_type __index = __pos - this->_M_start;
+ if (size_type(__index) < this->size() >> 1) {
+ copy_backward(this->_M_start, __pos, __next);
+ pop_front();
+ }
+ else {
+ _STLP_STD::copy(__next, this->_M_finish, __pos);
+ pop_back();
+ }
+ return this->_M_start + __index;
+}
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __first, iterator __last,
+ const __true_type& /*_Movable*/) {
+ difference_type __n = __last - __first;
+ difference_type __elems_before = __first - this->_M_start;
+ if (__elems_before <= difference_type(this->size() - __n) / 2) {
+ iterator __src = __first, __dst = __last;
+ if (__src != this->_M_start) {
+ for (--__src, --__dst; (__src >= this->_M_start) && (__dst >= __first); --__src, --__dst) {
+ _STLP_STD::_Destroy(&(*__dst));
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ }
+ if (__dst >= __first) {
+ //There are more elements to erase than elements to move
+ _STLP_STD::_Destroy_Range(__first, ++__dst);
+ _STLP_STD::_Destroy_Moved_Range(this->_M_start, __first);
+ }
+ else {
+ //There are more elements to move than elements to erase
+ for (; __src >= this->_M_start; --__src, --__dst) {
+ _STLP_STD::_Destroy_Moved(&(*__dst));
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ }
+ _STLP_STD::_Destroy_Moved_Range(this->_M_start, ++__dst);
+ }
+ }
+ else {
+ _STLP_STD::_Destroy_Range(this->_M_start, __last);
+ }
+ iterator __new_start = this->_M_start + __n;
+ this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
+ this->_M_start = __new_start;
+ }
+ else {
+ if (__last != this->_M_finish) {
+ iterator __src = __last, __dst = __first;
+ for (; (__src != this->_M_finish) && (__dst != __last); ++__src, ++__dst) {
+ _STLP_STD::_Destroy(&(*__dst));
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ }
+ if (__dst != __last) {
+ //There are more elements to erase than elements to move
+ _STLP_STD::_Destroy_Range(__dst, __last);
+ _STLP_STD::_Destroy_Moved_Range(__last, this->_M_finish);
+ }
+ else {
+ //There are more elements to move than elements to erase
+ for (; __src != this->_M_finish; ++__src, ++__dst) {
+ _STLP_STD::_Destroy_Moved(&(*__dst));
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ }
+ _STLP_STD::_Destroy_Moved_Range(__dst, this->_M_finish);
+ }
+ }
+ else {
+ _STLP_STD::_Destroy_Range(__first, this->_M_finish);
+ }
+ iterator __new_finish = this->_M_finish - __n;
+ this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
+ this->_M_finish = __new_finish;
+ }
+ return this->_M_start + __elems_before;
+}
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_erase(iterator __first, iterator __last,
+ const __false_type& /*_Movable*/) {
+ difference_type __n = __last - __first;
+ difference_type __elems_before = __first - this->_M_start;
+ if (__elems_before <= difference_type(this->size() - __n) / 2) {
+ copy_backward(this->_M_start, __first, __last);
+ iterator __new_start = this->_M_start + __n;
+ _STLP_STD::_Destroy_Range(this->_M_start, __new_start);
+ this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
+ this->_M_start = __new_start;
+ }
+ else {
+ _STLP_STD::copy(__last, this->_M_finish, __first);
+ iterator __new_finish = this->_M_finish - __n;
+ _STLP_STD::_Destroy_Range(__new_finish, this->_M_finish);
+ this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
+ this->_M_finish = __new_finish;
+ }
+ return this->_M_start + __elems_before;
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::clear() {
+ for (_Map_pointer __node = this->_M_start._M_node + 1;
+ __node < this->_M_finish._M_node;
+ ++__node) {
+ _STLP_STD::_Destroy_Range(*__node, *__node + this->buffer_size());
+ this->_M_map_size.deallocate(*__node, this->buffer_size());
+ }
+
+ if (this->_M_start._M_node != this->_M_finish._M_node) {
+ _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_start._M_last);
+ _STLP_STD::_Destroy_Range(this->_M_finish._M_first, this->_M_finish._M_cur);
+ this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
+ }
+ else
+ _STLP_STD::_Destroy_Range(this->_M_start._M_cur, this->_M_finish._M_cur);
+
+ this->_M_finish = this->_M_start;
+}
+
+// Precondition: this->_M_start and this->_M_finish have already been initialized,
+// but none of the deque's elements have yet been constructed.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_fill_initialize(const value_type& __val,
+ const __false_type& /*_TrivialInit*/) {
+ _Map_pointer __cur = this->_M_start._M_node;
+ _STLP_TRY {
+ for (; __cur < this->_M_finish._M_node; ++__cur)
+ uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val);
+ uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur, __cur)))
+}
+
+
+// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_push_back_aux_v(const value_type& __t) {
+ _M_reserve_map_at_back();
+ *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
+ _STLP_TRY {
+ _Copy_Construct(this->_M_finish._M_cur, __t);
+ this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
+ this->_M_finish._M_cur = this->_M_finish._M_first;
+ }
+ _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1),
+ this->buffer_size()))
+}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_push_back_aux() {
+ _M_reserve_map_at_back();
+ *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
+ _STLP_TRY {
+ _STLP_STD::_Construct(this->_M_finish._M_cur);
+ this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
+ this->_M_finish._M_cur = this->_M_finish._M_first;
+ }
+ _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1),
+ this->buffer_size()))
+}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+// Called only if this->_M_start._M_cur == this->_M_start._M_first.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_push_front_aux_v(const value_type& __t) {
+ _M_reserve_map_at_front();
+ *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
+ _STLP_TRY {
+ this->_M_start._M_set_node(this->_M_start._M_node - 1);
+ this->_M_start._M_cur = this->_M_start._M_last - 1;
+ _Copy_Construct(this->_M_start._M_cur, __t);
+ }
+ _STLP_UNWIND((++this->_M_start,
+ this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size())))
+}
+
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+// Called only if this->_M_start._M_cur == this->_M_start._M_first.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_push_front_aux() {
+ _M_reserve_map_at_front();
+ *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
+ _STLP_TRY {
+ this->_M_start._M_set_node(this->_M_start._M_node - 1);
+ this->_M_start._M_cur = this->_M_start._M_last - 1;
+ _STLP_STD::_Construct(this->_M_start._M_cur);
+ }
+ _STLP_UNWIND((++this->_M_start, this->_M_map_size.deallocate(*(this->_M_start._M_node - 1),
+ this->buffer_size())))
+}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+// Called only if this->_M_finish._M_cur == this->_M_finish._M_first.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_pop_back_aux() {
+ this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
+ this->_M_finish._M_set_node(this->_M_finish._M_node - 1);
+ this->_M_finish._M_cur = this->_M_finish._M_last - 1;
+}
+
+// Note that if the deque has at least one element (a precondition for this member
+// function), and if this->_M_start._M_cur == this->_M_start._M_last, then the deque
+// must have at least two nodes.
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_pop_front_aux() {
+ if (this->_M_start._M_cur != this->_M_start._M_last - 1)
+ ++this->_M_start._M_cur;
+ else {
+ this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size());
+ this->_M_start._M_set_node(this->_M_start._M_node + 1);
+ this->_M_start._M_cur = this->_M_start._M_first;
+ }
+}
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_fill_insert_aux(iterator __pos, size_type __n,
+ const value_type& __x,
+ const __true_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = this->size();
+ value_type __x_copy = __x;
+ if (__elems_before <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ iterator __dst = __new_start;
+ iterator __src = this->_M_start;
+ for (; __src != __pos; ++__dst, ++__src) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_start = __new_start;
+ uninitialized_fill(__dst, __src, __x_copy);
+ __pos = __dst;
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ const difference_type __elems_after = difference_type(__length) - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+ iterator __dst = __new_finish;
+ iterator __src = this->_M_finish;
+ for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_finish = __new_finish;
+ uninitialized_fill(__pos, __pos + __n, __x_copy);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+ return __pos;
+}
+
+template <class _Tp, class _Alloc >
+__iterator__ deque<_Tp,_Alloc>::_M_fill_insert_aux(iterator __pos, size_type __n,
+ const value_type& __x,
+ const __false_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = this->size();
+ value_type __x_copy = __x;
+ if (__elems_before <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_start;
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ if (__elems_before >= difference_type(__n)) {
+ iterator __start_n = this->_M_start + difference_type(__n);
+ _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__start_n, __pos, __old_start);
+ _STLP_STD::fill(__pos - difference_type(__n), __pos, __x_copy);
+ __pos -= difference_type(__n);
+ }
+ else {
+ _STLP_PRIV __uninitialized_copy_fill(this->_M_start, __pos, __new_start,
+ this->_M_start, __x_copy);
+ this->_M_start = __new_start;
+ fill(__old_start, __pos, __x_copy);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_finish;
+ const difference_type __elems_after =
+ difference_type(__length) - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+ if (__elems_after > difference_type(__n)) {
+ iterator __finish_n = this->_M_finish - difference_type(__n);
+ _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ copy_backward(__pos, __finish_n, __old_finish);
+ fill(__pos, __pos + difference_type(__n), __x_copy);
+ }
+ else {
+ _STLP_PRIV __uninitialized_fill_copy(this->_M_finish, __pos + difference_type(__n),
+ __x_copy, __pos, this->_M_finish);
+ this->_M_finish = __new_finish;
+ fill(__pos, __old_finish, __x_copy);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+ return __pos;
+}
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
+ const value_type* __first, const value_type* __last,
+ size_type __n, const __true_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elems_before <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ iterator __dst = __new_start;
+ iterator __src = this->_M_start;
+ for (; __src != __pos; ++__dst, ++__src) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_start = __new_start;
+ _STLP_PRIV __ucopy(__first, __last, __dst);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ const difference_type __elems_after = difference_type(__length) - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+ iterator __dst = __new_finish;
+ iterator __src = this->_M_finish;
+ for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_finish = __new_finish;
+ _STLP_PRIV __ucopy(__first, __last, __pos);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
+ const value_type* __first, const value_type* __last,
+ size_type __n, const __false_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elems_before <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_start;
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ if (__elems_before >= difference_type(__n)) {
+ iterator __start_n = this->_M_start + difference_type(__n);
+ _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__start_n, __pos, __old_start);
+ _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
+ }
+ else {
+ const value_type* __mid = __first + (difference_type(__n) - __elems_before);
+ _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__mid, __last, __old_start);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_finish;
+ const difference_type __elems_after =
+ difference_type(__length) - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+
+ if (__elems_after > difference_type(__n)) {
+ iterator __finish_n = this->_M_finish - difference_type(__n);
+ _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
+ _STLP_STD::copy(__first, __last, __pos);
+ }
+ else {
+ const value_type* __mid = __first + __elems_after;
+ _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy(__first, __mid, __pos);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+ size_type __n, const __true_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elems_before <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ iterator __dst = __new_start;
+ iterator __src = this->_M_start;
+ for (; __src != __pos; ++__dst, ++__src) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_start = __new_start;
+ _STLP_PRIV __ucopy(__first, __last, __dst);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ const difference_type __elems_after = difference_type(__length) - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+ iterator __dst = __new_finish;
+ iterator __src = this->_M_finish;
+ for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_finish = __new_finish;
+ _STLP_PRIV __ucopy(__first, __last, __pos);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_insert_range_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+ size_type __n, const __false_type& /*_Movable*/) {
+ const difference_type __elems_before = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elems_before < difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_start;
+ __pos = this->_M_start + __elems_before;
+ _STLP_TRY {
+ if (__elems_before >= difference_type(__n)) {
+ iterator __start_n = this->_M_start + __n;
+ _STLP_PRIV __ucopy(this->_M_start, __start_n, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__start_n, __pos, __old_start);
+ _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
+ }
+ else {
+ const_iterator __mid = __first + (__n - __elems_before);
+ _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__mid, __last, __old_start);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_finish;
+ const difference_type __elems_after = __length - __elems_before;
+ __pos = this->_M_finish - __elems_after;
+ _STLP_TRY {
+ if (__elems_after > difference_type(__n)) {
+ iterator __finish_n = this->_M_finish - difference_type(__n);
+ _STLP_PRIV __ucopy(__finish_n, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
+ _STLP_STD::copy(__first, __last, __pos);
+ }
+ else {
+ const_iterator __mid = __first + __elems_after;
+ _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy(__first, __mid, __pos);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+}
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems) {
+ size_type __new_nodes
+ = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
+ _M_reserve_map_at_front(__new_nodes);
+ size_type __i = 1;
+ _STLP_TRY {
+ for (; __i <= __new_nodes; ++__i)
+ *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size());
+ }
+ _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
+ this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size()))
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems) {
+ size_type __new_nodes
+ = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
+ _M_reserve_map_at_back(__new_nodes);
+ size_type __i = 1;
+ _STLP_TRY {
+ for (; __i <= __new_nodes; ++__i)
+ *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size());
+ }
+ _STLP_UNWIND(for (size_type __j = 1; __j < __i; ++__j)
+ this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size()))
+}
+
+template <class _Tp, class _Alloc >
+void deque<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add,
+ bool __add_at_front) {
+ size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1;
+ size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
+
+ _Map_pointer __new_nstart;
+ if (this->_M_map_size._M_data > 2 * __new_num_nodes) {
+ __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ if (__new_nstart < this->_M_start._M_node)
+ _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
+ else
+ _STLP_STD::copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1,
+ __new_nstart + __old_num_nodes);
+ }
+ else {
+ size_type __new_map_size =
+ this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2;
+
+ _Map_pointer __new_map = this->_M_map.allocate(__new_map_size);
+ __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+ + (__add_at_front ? __nodes_to_add : 0);
+ _STLP_STD::copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
+ this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data);
+
+ this->_M_map._M_data = __new_map;
+ this->_M_map_size._M_data = __new_map_size;
+ }
+
+ this->_M_start._M_set_node(__new_nstart);
+ this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+}
+
+#if defined (deque)
+# undef deque
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#undef __iterator__
+#undef iterator
+#undef const_iterator
+#undef size_type
+#undef value_type
+
+#endif /* _STLP_DEQUE_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_deque.h b/6/sources/cxx-stl/stlport/stlport/stl/_deque.h
new file mode 100644
index 0000000..a8faeef
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_deque.h
@@ -0,0 +1,1115 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DEQUE_H
+#define _STLP_INTERNAL_DEQUE_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+# include <stl/_uninitialized.h>
+#endif
+
+#ifndef _STLP_RANGE_ERRORS_H
+# include <stl/_range_errors.h>
+#endif
+
+/* Class invariants:
+ * For any nonsingular iterator i:
+ * i.node is the address of an element in the map array. The
+ * contents of i.node is a pointer to the beginning of a node.
+ * i.first == *(i.node)
+ * i.last == i.first + node_size
+ * i.cur is a pointer in the range [i.first, i.last). NOTE:
+ * the implication of this is that i.cur is always a dereferenceable
+ * pointer, even if i is a past-the-end iterator.
+ * Start and Finish are always nonsingular iterators. NOTE: this means
+ * that an empty deque must have one node, and that a deque
+ * with N elements, where N is the buffer size, must have two nodes.
+ * For every node other than start.node and finish.node, every element
+ * in the node is an initialized object. If start.node == finish.node,
+ * then [start.cur, finish.cur) are initialized objects, and
+ * the elements outside that range are uninitialized storage. Otherwise,
+ * [start.cur, start.last) and [finish.first, finish.cur) are initialized
+ * objects, and [start.first, start.cur) and [finish.cur, finish.last)
+ * are uninitialized storage.
+ * [map, map + map_size) is a valid, non-empty range.
+ * [start.node, finish.node] is a valid range contained within
+ * [map, map + map_size).
+ * A pointer in the range [map, map + map_size) points to an allocated node
+ * if and only if the pointer is in the range [start.node, finish.node].
+ */
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+struct _Deque_iterator_base {
+
+ static size_t _S_buffer_size() {
+ const size_t blocksize = _MAX_BYTES;
+ return (sizeof(_Tp) < blocksize ? (blocksize / sizeof(_Tp)) : 1);
+ }
+
+ typedef random_access_iterator_tag iterator_category;
+
+ typedef _Tp value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef value_type** _Map_pointer;
+
+ typedef _Deque_iterator_base< _Tp > _Self;
+
+ value_type* _M_cur;
+ value_type* _M_first;
+ value_type* _M_last;
+ _Map_pointer _M_node;
+
+ _Deque_iterator_base(value_type* __x, _Map_pointer __y)
+ : _M_cur(__x), _M_first(*__y),
+ _M_last(*__y + _S_buffer_size()), _M_node(__y) {}
+
+ _Deque_iterator_base() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
+
+// see comment in doc/README.evc4 and doc/README.evc8
+#if defined (_STLP_MSVC) && (_STLP_MSVC <= 1401) && defined (MIPS) && defined (NDEBUG)
+ _Deque_iterator_base(_Deque_iterator_base const& __other)
+ : _M_cur(__other._M_cur), _M_first(__other._M_first),
+ _M_last(__other._M_last), _M_node(__other._M_node) {}
+#endif
+
+ difference_type _M_subtract(const _Self& __x) const {
+ return difference_type(_S_buffer_size()) * (_M_node - __x._M_node - 1) +
+ (_M_cur - _M_first) + (__x._M_last - __x._M_cur);
+ }
+
+ void _M_increment() {
+ if (++_M_cur == _M_last) {
+ _M_set_node(_M_node + 1);
+ _M_cur = _M_first;
+ }
+ }
+
+ void _M_decrement() {
+ if (_M_cur == _M_first) {
+ _M_set_node(_M_node - 1);
+ _M_cur = _M_last;
+ }
+ --_M_cur;
+ }
+
+ void _M_advance(difference_type __n) {
+ const size_t buffersize = _S_buffer_size();
+ difference_type __offset = __n + (_M_cur - _M_first);
+ if (__offset >= 0 && __offset < difference_type(buffersize))
+ _M_cur += __n;
+ else {
+ difference_type __node_offset =
+ __offset > 0 ? __offset / buffersize
+ : -difference_type((-__offset - 1) / buffersize) - 1;
+ _M_set_node(_M_node + __node_offset);
+ _M_cur = _M_first +
+
+ (__offset - __node_offset * difference_type(buffersize));
+ }
+ }
+
+ void _M_set_node(_Map_pointer __new_node) {
+ _M_last = (_M_first = *(_M_node = __new_node)) + difference_type(_S_buffer_size());
+ }
+};
+
+
+template <class _Tp, class _Traits>
+struct _Deque_iterator : public _Deque_iterator_base< _Tp> {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef typename _Traits::reference reference;
+ typedef typename _Traits::pointer pointer;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type** _Map_pointer;
+
+ typedef _Deque_iterator_base< _Tp > _Base;
+ typedef _Deque_iterator<_Tp, _Traits> _Self;
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef _Deque_iterator<_Tp, _NonConstTraits> iterator;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef _Deque_iterator<_Tp, _ConstTraits> const_iterator;
+
+ _Deque_iterator(value_type* __x, _Map_pointer __y) :
+ _Deque_iterator_base<value_type>(__x,__y) {}
+
+ _Deque_iterator() {}
+ //copy constructor for iterator and constructor from iterator for const_iterator
+ _Deque_iterator(const iterator& __x) :
+ _Deque_iterator_base<value_type>(__x) {}
+
+ reference operator*() const {
+ return *this->_M_cur;
+ }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ difference_type operator-(const const_iterator& __x) const { return this->_M_subtract(__x); }
+
+ _Self& operator++() { this->_M_increment(); return *this; }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ _Self& operator--() { this->_M_decrement(); return *this; }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ --*this;
+ return __tmp;
+ }
+
+ _Self& operator+=(difference_type __n) { this->_M_advance(__n); return *this; }
+ _Self operator+(difference_type __n) const {
+ _Self __tmp = *this;
+ return __tmp += __n;
+ }
+
+ _Self& operator-=(difference_type __n) { return *this += -__n; }
+ _Self operator-(difference_type __n) const {
+ _Self __tmp = *this;
+ return __tmp -= __n;
+ }
+
+ reference operator[](difference_type __n) const { return *(*this + __n); }
+};
+
+
+template <class _Tp, class _Traits>
+inline _Deque_iterator<_Tp, _Traits> _STLP_CALL
+operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Traits>& __x)
+{ return __x + __n; }
+
+
+#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+template <class _Tp>
+inline bool _STLP_CALL
+operator==(const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y)
+{ return __x._M_cur == __y._M_cur; }
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator < (const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y) {
+ return (__x._M_node == __y._M_node) ?
+ (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
+}
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator!=(const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y)
+{ return __x._M_cur != __y._M_cur; }
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator>(const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y)
+{ return __y < __x; }
+
+template <class _Tp>
+inline bool _STLP_CALL operator>=(const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y)
+{ return !(__x < __y); }
+
+template <class _Tp>
+inline bool _STLP_CALL operator<=(const _Deque_iterator_base<_Tp >& __x,
+ const _Deque_iterator_base<_Tp >& __y)
+{ return !(__y < __x); }
+
+#else /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _Tp, class _Traits1, class _Traits2>
+inline bool _STLP_CALL
+operator==(const _Deque_iterator<_Tp, _Traits1 >& __x,
+ const _Deque_iterator<_Tp, _Traits2 >& __y)
+{ return __x._M_cur == __y._M_cur; }
+
+template <class _Tp, class _Traits1, class _Traits2>
+inline bool _STLP_CALL
+operator < (const _Deque_iterator<_Tp, _Traits1 >& __x,
+ const _Deque_iterator<_Tp, _Traits2 >& __y) {
+ return (__x._M_node == __y._M_node) ?
+ (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
+}
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator!=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
+ const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
+{ return __x._M_cur != __y._M_cur; }
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator>(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
+ const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
+{ return __y < __x; }
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator>=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
+ const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
+{ return !(__x < __y); }
+
+template <class _Tp>
+inline bool _STLP_CALL
+operator<=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
+ const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y)
+{ return !(__y < __x); }
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits>
+struct __type_traits<_STLP_PRIV _Deque_iterator<_Tp, _Traits> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits> inline _Tp* _STLP_CALL
+value_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return (_Tp*)0; }
+template <class _Tp, class _Traits> inline random_access_iterator_tag _STLP_CALL
+iterator_category(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return random_access_iterator_tag(); }
+template <class _Tp, class _Traits> inline ptrdiff_t* _STLP_CALL
+distance_type(const _STLP_PRIV _Deque_iterator<_Tp, _Traits >&) { return 0; }
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+/* Deque base class. It has two purposes. First, its constructor
+ * and destructor allocate (but don't initialize) storage. This makes
+ * exception safety easier. Second, the base class encapsulates all of
+ * the differences between SGI-style allocators and standard-conforming
+ * allocators.
+ */
+
+template <class _Tp, class _Alloc>
+class _Deque_base {
+ typedef _Deque_base<_Tp, _Alloc> _Self;
+public:
+ typedef _Tp value_type;
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef _Alloc allocator_type;
+ typedef _STLP_alloc_proxy<size_t, value_type, allocator_type> _Alloc_proxy;
+
+ typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type _Map_alloc_type;
+ typedef _STLP_alloc_proxy<value_type**, value_type*, _Map_alloc_type> _Map_alloc_proxy;
+
+ typedef _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
+ typedef _Deque_iterator<_Tp, _Const_traits<_Tp> > const_iterator;
+
+ static size_t _STLP_CALL buffer_size() { return _Deque_iterator_base<_Tp>::_S_buffer_size(); }
+
+ _Deque_base(const allocator_type& __a, size_t __num_elements)
+ : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0),
+ _M_map_size(__a, (size_t)0)
+ { _M_initialize_map(__num_elements); }
+
+ _Deque_base(const allocator_type& __a)
+ : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0),
+ _M_map_size(__a, (size_t)0) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Deque_base(__move_source<_Self> src)
+ : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish),
+ _M_map(__move_source<_Map_alloc_proxy>(src.get()._M_map)),
+ _M_map_size(__move_source<_Alloc_proxy>(src.get()._M_map_size)) {
+ src.get()._M_map._M_data = 0;
+ src.get()._M_map_size._M_data = 0;
+ src.get()._M_finish = src.get()._M_start;
+ }
+#endif
+
+ ~_Deque_base();
+
+protected:
+ void _M_initialize_map(size_t);
+ void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
+ void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
+ enum { _S_initial_map_size = 8 };
+
+protected:
+ iterator _M_start;
+ iterator _M_finish;
+ _Map_alloc_proxy _M_map;
+ _Alloc_proxy _M_map_size;
+};
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define deque _STLP_PTR_IMPL_NAME(deque)
+#elif defined (_STLP_DEBUG)
+# define deque _STLP_NON_DBG_NAME(deque)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class deque : protected _STLP_PRIV _Deque_base<_Tp, _Alloc>
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (deque)
+ , public __stlport_class<deque<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_PRIV _Deque_base<_Tp, _Alloc> _Base;
+ typedef deque<_Tp, _Alloc> _Self;
+public: // Basic types
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag _Iterator_category;
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef typename _Base::allocator_type allocator_type;
+
+public: // Iterators
+ typedef typename _Base::iterator iterator;
+ typedef typename _Base::const_iterator const_iterator;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+protected: // Internal typedefs
+ typedef pointer* _Map_pointer;
+#if defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef __false_type _Movable;
+#endif
+
+public: // Basic accessors
+ iterator begin() { return this->_M_start; }
+ iterator end() { return this->_M_finish; }
+ const_iterator begin() const { return const_iterator(this->_M_start); }
+ const_iterator end() const { return const_iterator(this->_M_finish); }
+
+ reverse_iterator rbegin() { return reverse_iterator(this->_M_finish); }
+ reverse_iterator rend() { return reverse_iterator(this->_M_start); }
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(this->_M_finish); }
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(this->_M_start); }
+
+ reference operator[](size_type __n)
+ { return this->_M_start[difference_type(__n)]; }
+ const_reference operator[](size_type __n) const
+ { return this->_M_start[difference_type(__n)]; }
+
+ void _M_range_check(size_type __n) const {
+ if (__n >= this->size())
+ __stl_throw_out_of_range("deque");
+ }
+ reference at(size_type __n)
+ { _M_range_check(__n); return (*this)[__n]; }
+ const_reference at(size_type __n) const
+ { _M_range_check(__n); return (*this)[__n]; }
+
+ reference front() { return *this->_M_start; }
+ reference back() {
+ iterator __tmp = this->_M_finish;
+ --__tmp;
+ return *__tmp;
+ }
+ const_reference front() const { return *this->_M_start; }
+ const_reference back() const {
+ const_iterator __tmp = this->_M_finish;
+ --__tmp;
+ return *__tmp;
+ }
+
+ size_type size() const { return this->_M_finish - this->_M_start; }
+ size_type max_size() const { return size_type(-1); }
+ bool empty() const { return this->_M_finish == this->_M_start; }
+ allocator_type get_allocator() const { return this->_M_map_size; }
+
+public: // Constructor, destructor.
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit deque(const allocator_type& __a = allocator_type())
+#else
+ deque()
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), 0) {}
+ deque(const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, 0) {}
+
+ deque(const _Self& __x)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__x.get_allocator(), __x.size())
+ { _STLP_PRIV __ucopy(__x.begin(), __x.end(), this->_M_start); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+private:
+ void _M_initialize(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+ typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
+ _M_fill_initialize(__val, _TrivialInit());
+ }
+public:
+ explicit deque(size_type __n)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n)
+ { _M_initialize(__n); }
+ deque(size_type __n, const value_type& __val, const allocator_type& __a = allocator_type())
+#else
+ explicit deque(size_type __n)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n) {
+ typedef typename _TrivialInit<_Tp>::_Ret _TrivialInit;
+ _M_fill_initialize(_STLP_DEFAULT_CONSTRUCTED(_Tp), _TrivialInit());
+ }
+ deque(size_type __n, const value_type& __val)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type(), __n)
+ { _M_fill_initialize(__val, __false_type()); }
+ deque(size_type __n, const value_type& __val, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __n)
+ { _M_fill_initialize(__val, __false_type()); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+protected:
+ template <class _Integer>
+ void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
+ this->_M_initialize_map(__n);
+ _M_fill_initialize(__x, __false_type());
+ }
+
+ template <class _InputIter>
+ void _M_initialize_dispatch(_InputIter __first, _InputIter __last,
+ const __false_type&) {
+ _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
+ }
+
+public:
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(allocator_type()) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__first, __last, _Integral());
+ }
+# endif
+
+#else
+ deque(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type() )
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first)
+ { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }
+
+ deque(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type() )
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__a, __last - __first)
+ { _STLP_PRIV __ucopy(__first, __last, this->_M_start); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ deque(__move_source<_Self> src)
+ : _STLP_PRIV _Deque_base<_Tp, _Alloc>(__move_source<_Base>(src.get()))
+ {}
+#endif
+
+ ~deque()
+ { _STLP_STD::_Destroy_Range(this->_M_start, this->_M_finish); }
+
+ _Self& operator= (const _Self& __x);
+
+ void swap(_Self& __x) {
+ _STLP_STD::swap(this->_M_start, __x._M_start);
+ _STLP_STD::swap(this->_M_finish, __x._M_finish);
+ this->_M_map.swap(__x._M_map);
+ this->_M_map_size.swap(__x._M_map_size);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public:
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void _M_fill_assign(size_type __n, const _Tp& __val) {
+ if (__n > size()) {
+ _STLP_STD::fill(begin(), end(), __val);
+ insert(end(), __n - size(), __val);
+ }
+ else {
+ erase(begin() + __n, end());
+ _STLP_STD::fill(begin(), end(), __val);
+ }
+ }
+
+ void assign(size_type __n, const _Tp& __val) {
+ _M_fill_assign(__n, __val);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+private: // helper functions for assign()
+
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type& /*_IsIntegral*/)
+ { _M_fill_assign((size_type) __n, (_Tp) __val); }
+
+ template <class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ const __false_type& /*_IsIntegral*/) {
+ _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
+ }
+
+ template <class _InputIter>
+ void _M_assign_aux(_InputIter __first, _InputIter __last, const input_iterator_tag &) {
+ iterator __cur = begin();
+ for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ erase(__cur, end());
+ else
+ insert(end(), __first, __last);
+ }
+
+ template <class _ForwardIterator>
+ void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+#else
+ void assign(const value_type *__first, const value_type *__last) {
+ size_type __size = size();
+ size_type __len = __last - __first;
+ if (__len > __size) {
+ const value_type *__mid = __first + __size;
+ _STLP_STD::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ else {
+ erase(_STLP_STD::copy(__first, __last, begin()), end());
+ }
+ }
+ void assign(const_iterator __first, const_iterator __last) {
+ typedef const_iterator _ForwardIterator;
+#endif /* _STLP_MEMBER_TEMPLATES */
+ size_type __len = _STLP_STD::distance(__first, __last);
+ if (__len > size()) {
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, size());
+ _STLP_STD::copy(__first, __mid, begin());
+ insert(end(), __mid, __last);
+ }
+ else {
+ erase(_STLP_STD::copy(__first, __last, begin()), end());
+ }
+ }
+
+
+public: // push_* and pop_*
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void push_back(const value_type& __t) {
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
+ _Copy_Construct(this->_M_finish._M_cur, __t);
+ ++this->_M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux_v(__t);
+ }
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void push_front(const value_type& __t) {
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ if (this->_M_start._M_cur != this->_M_start._M_first) {
+ _Copy_Construct(this->_M_start._M_cur - 1, __t);
+ --this->_M_start._M_cur;
+ }
+ else
+ _M_push_front_aux_v(__t);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back() {
+ if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
+ _STLP_STD::_Construct(this->_M_finish._M_cur);
+ ++this->_M_finish._M_cur;
+ }
+ else
+ _M_push_back_aux();
+ }
+ void push_front() {
+ if (this->_M_start._M_cur != this->_M_start._M_first) {
+ _STLP_STD::_Construct(this->_M_start._M_cur - 1);
+ --this->_M_start._M_cur;
+ }
+ else
+ _M_push_front_aux();
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void pop_back() {
+ if (this->_M_finish._M_cur != this->_M_finish._M_first) {
+ --this->_M_finish._M_cur;
+ _STLP_STD::_Destroy(this->_M_finish._M_cur);
+ }
+ else {
+ _M_pop_back_aux();
+ _STLP_STD::_Destroy(this->_M_finish._M_cur);
+ }
+ }
+
+ void pop_front() {
+ _STLP_STD::_Destroy(this->_M_start._M_cur);
+ _M_pop_front_aux();
+ }
+
+public: // Insert
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ iterator insert(iterator __pos, const value_type& __x) {
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ if (__pos._M_cur == this->_M_start._M_cur) {
+ push_front(__x);
+ return this->_M_start;
+ }
+ else if (__pos._M_cur == this->_M_finish._M_cur) {
+ push_back(__x);
+ iterator __tmp = this->_M_finish;
+ --__tmp;
+ return __tmp;
+ }
+ else {
+ return _M_fill_insert_aux(__pos, 1, __x, _Movable());
+ }
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos)
+ { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void insert(iterator __pos, size_type __n, const value_type& __x)
+ { _M_fill_insert(__pos, __n, __x); }
+
+protected:
+ iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __true_type& /*_Movable*/);
+ iterator _M_fill_insert_aux(iterator __pos, size_type __n, const value_type& __x, const __false_type& /*_Movable*/);
+
+ void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ const __true_type& /*_IsIntegral*/) {
+ _M_fill_insert(__pos, (size_type) __n, (value_type) __x);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type& /*_IsIntegral*/) {
+ _M_insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
+ }
+
+public:
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ void _M_insert_range_aux(iterator __pos,
+ const value_type* __first, const value_type* __last,
+ size_type __n, const __true_type& /*_Movable*/);
+ void _M_insert_range_aux(iterator __pos,
+ const value_type* __first, const value_type* __last,
+ size_type __n, const __false_type& /*_Movable*/);
+ void _M_insert_range_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+ size_type __n, const __true_type& /*_Movable*/);
+ void _M_insert_range_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+ size_type __n, const __false_type& /*_Movable*/);
+public:
+ void insert(iterator __pos,
+ const value_type* __first, const value_type* __last);
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last);
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+public:
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size,
+ const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void resize(size_type __new_size, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const size_type __len = size();
+ if (__new_size < __len)
+ erase(this->_M_start + __new_size, this->_M_finish);
+ else
+ insert(this->_M_finish, __new_size - __len, __x);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size)
+ { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+protected:
+ iterator _M_erase(iterator __pos, const __true_type& /*_Movable*/);
+ iterator _M_erase(iterator __pos, const __false_type& /*_Movable*/);
+
+ iterator _M_erase(iterator __first, iterator __last, const __true_type& /*_Movable*/);
+ iterator _M_erase(iterator __first, iterator __last, const __false_type& /*_Movable*/);
+public: // Erase
+ iterator erase(iterator __pos) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ return _M_erase(__pos, _Movable());
+ }
+ iterator erase(iterator __first, iterator __last) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ if (__first == this->_M_start && __last == this->_M_finish) {
+ clear();
+ return this->_M_finish;
+ }
+ else {
+ if (__first == __last)
+ return __first;
+ return _M_erase(__first, __last, _Movable());
+ }
+ }
+ void clear();
+
+protected: // Internal construction/destruction
+
+ void _M_fill_initialize(const value_type& __val, const __true_type& /*_TrivialInit*/)
+ {}
+ void _M_fill_initialize(const value_type& __val, const __false_type& /*_TrivialInit*/);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ this->_M_initialize_map(0);
+ _STLP_TRY {
+ for ( ; __first != __last; ++__first)
+ push_back(*__first);
+ }
+ _STLP_UNWIND(clear())
+ }
+ template <class _ForwardIterator>
+ void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ this->_M_initialize_map(__n);
+ _Map_pointer __cur_node = this->_M_start._M_node;
+ _STLP_TRY {
+ for (; __cur_node < this->_M_finish._M_node; ++__cur_node) {
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, this->buffer_size());
+ _STLP_STD::uninitialized_copy(__first, __mid, *__cur_node);
+ __first = __mid;
+ }
+ _STLP_STD::uninitialized_copy(__first, __last, this->_M_finish._M_first);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(this->_M_start, iterator(*__cur_node, __cur_node)))
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+protected: // Internal push_* and pop_*
+
+ void _M_push_back_aux_v(const value_type&);
+ void _M_push_front_aux_v(const value_type&);
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void _M_push_back_aux();
+ void _M_push_front_aux();
+#endif /*_STLP_DONT_SUP_DFLT_PARAM !_STLP_NO_ANACHRONISMS*/
+ void _M_pop_back_aux();
+ void _M_pop_front_aux();
+
+protected: // Internal insert functions
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+
+ template <class _InputIterator>
+ void _M_insert(iterator __pos,
+ _InputIterator __first,
+ _InputIterator __last,
+ const input_iterator_tag &) {
+ _STLP_STD::copy(__first, __last, inserter(*this, __pos));
+ }
+
+ template <class _ForwardIterator>
+ void _M_insert(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ size_type __n = _STLP_STD::distance(__first, __last);
+ if (__pos._M_cur == this->_M_start._M_cur) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ _STLP_TRY {
+ uninitialized_copy(__first, __last, __new_start);
+ this->_M_start = __new_start;
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else if (__pos._M_cur == this->_M_finish._M_cur) {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ _STLP_TRY {
+ uninitialized_copy(__first, __last, this->_M_finish);
+ this->_M_finish = __new_finish;
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+ else
+ _M_insert_range_aux(__pos, __first, __last, __n, _Movable());
+ }
+
+ template <class _ForwardIterator>
+ void _M_insert_range_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n, const __true_type& /*_Movable*/) {
+ const difference_type __elemsbefore = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elemsbefore <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ __pos = this->_M_start + __elemsbefore;
+ _STLP_TRY {
+ iterator __dst = __new_start;
+ iterator __src = this->_M_start;
+ for (; __src != __pos; ++__dst, ++__src) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_start = __new_start;
+ uninitialized_copy(__first, __last, __dst);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ const difference_type __elemsafter = difference_type(__length) - __elemsbefore;
+ __pos = this->_M_finish - __elemsafter;
+ _STLP_TRY {
+ iterator __dst = __new_finish;
+ iterator __src = this->_M_finish;
+ for (--__src, --__dst; __src >= __pos; --__src, --__dst) {
+ _STLP_STD::_Move_Construct(&(*__dst), *__src);
+ _STLP_STD::_Destroy_Moved(&(*__src));
+ }
+ this->_M_finish = __new_finish;
+ uninitialized_copy(__first, __last, __pos);
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+ }
+
+ template <class _ForwardIterator>
+ void _M_insert_range_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ size_type __n, const __false_type& /*_Movable*/) {
+ const difference_type __elemsbefore = __pos - this->_M_start;
+ size_type __length = size();
+ if (__elemsbefore <= difference_type(__length / 2)) {
+ iterator __new_start = _M_reserve_elements_at_front(__n);
+ iterator __old_start = this->_M_start;
+ __pos = this->_M_start + __elemsbefore;
+ _STLP_TRY {
+ if (__elemsbefore >= difference_type(__n)) {
+ iterator __start_n = this->_M_start + difference_type(__n);
+ _STLP_STD::uninitialized_copy(this->_M_start, __start_n, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__start_n, __pos, __old_start);
+ _STLP_STD::copy(__first, __last, __pos - difference_type(__n));
+ }
+ else {
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, difference_type(__n) - __elemsbefore);
+ _STLP_PRIV __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, __new_start);
+ this->_M_start = __new_start;
+ _STLP_STD::copy(__mid, __last, __old_start);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node))
+ }
+ else {
+ iterator __new_finish = _M_reserve_elements_at_back(__n);
+ iterator __old_finish = this->_M_finish;
+ const difference_type __elemsafter = difference_type(__length) - __elemsbefore;
+ __pos = this->_M_finish - __elemsafter;
+ _STLP_TRY {
+ if (__elemsafter > difference_type(__n)) {
+ iterator __finish_n = this->_M_finish - difference_type(__n);
+ _STLP_STD::uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy_backward(__pos, __finish_n, __old_finish);
+ _STLP_STD::copy(__first, __last, __pos);
+ }
+ else {
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, __elemsafter);
+ _STLP_PRIV __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ _STLP_STD::copy(__first, __mid, __pos);
+ }
+ }
+ _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1))
+ }
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ iterator _M_reserve_elements_at_front(size_type __n) {
+ size_type __vacancies = this->_M_start._M_cur - this->_M_start._M_first;
+ if (__n > __vacancies)
+ _M_new_elements_at_front(__n - __vacancies);
+ return this->_M_start - difference_type(__n);
+ }
+
+ iterator _M_reserve_elements_at_back(size_type __n) {
+ size_type __vacancies = (this->_M_finish._M_last - this->_M_finish._M_cur) - 1;
+ if (__n > __vacancies)
+ _M_new_elements_at_back(__n - __vacancies);
+ return this->_M_finish + difference_type(__n);
+ }
+
+ void _M_new_elements_at_front(size_type __new_elements);
+ void _M_new_elements_at_back(size_type __new_elements);
+
+protected: // Allocation of _M_map and nodes
+
+ // Makes sure the _M_map has space for new nodes. Does not actually
+ // add the nodes. Can invalidate _M_map pointers. (And consequently,
+ // deque iterators.)
+
+ void _M_reserve_map_at_back (size_type __nodes_to_add = 1) {
+ if (__nodes_to_add + 1 > this->_M_map_size._M_data - (this->_M_finish._M_node - this->_M_map._M_data))
+ _M_reallocate_map(__nodes_to_add, false);
+ }
+
+ void _M_reserve_map_at_front (size_type __nodes_to_add = 1) {
+ if (__nodes_to_add > size_type(this->_M_start._M_node - this->_M_map._M_data))
+ _M_reallocate_map(__nodes_to_add, true);
+ }
+
+ void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
+};
+
+#if defined (deque)
+# undef deque
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_deque.c>
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# include <stl/pointers/_deque.h>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_deque.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define _STLP_TEMPLATE_CONTAINER deque<_Tp, _Alloc>
+#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Alloc>
+struct __move_traits<deque<_Tp, _Alloc> > {
+ typedef __true_type implemented;
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_DEQUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_epilog.h b/6/sources/cxx-stl/stlport/stlport/stl/_epilog.h
new file mode 100644
index 0000000..0747ae3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_epilog.h
@@ -0,0 +1,42 @@
+/* NOTE : this header has no guards and is MEANT for multiple inclusion!
+ * If you are using "header protection" option with your compiler,
+ * please also find #pragma which disables it and put it here, to
+ * allow reentrancy of this header.
+ */
+
+#ifndef _STLP_PROLOG_HEADER_INCLUDED
+# error STLport epilog header can not be included as long as prolog has not be included.
+#endif
+
+/* If the platform provides any specific epilog actions,
+ * like #pragmas, do include platform-specific prolog file
+ */
+#if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
+# include <stl/config/_epilog.h>
+#endif
+
+#if !defined (_STLP_NO_POST_COMPATIBLE_SECTION)
+# include <stl/_config_compat_post.h>
+#endif
+
+#if defined (_STLP_USE_OWN_NAMESPACE)
+
+# if !defined (_STLP_DONT_REDEFINE_STD)
+/* We redefine "std" to STLPORT, so that user code may use std:: transparently
+ * The STLPORT macro contains the STLport namespace name containing all the std
+ * stuff.
+ */
+# if defined (std)
+/*
+ * Looks like the compiler native library on which STLport rely defined the std macro.
+ * This might introduce major incompatibility so report the problem to the STLport
+ * forum or comment the following #error at your own risk.
+ */
+# error Incompatible native Std library.
+# endif /* std */
+# define std STLPORT
+# endif /* _STLP_DONT_REDEFINE_STD */
+
+#endif
+
+#undef _STLP_PROLOG_HEADER_INCLUDED /* defined in _prolog.h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_exception.h b/6/sources/cxx-stl/stlport/stlport/stl/_exception.h
new file mode 100644
index 0000000..a0bf4ad
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_exception.h
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+// The header <exception> contains low-level functions that interact
+// with a compiler's exception-handling mechanism. It is assumed to
+// be supplied with the compiler, rather than with the library, because
+// it is inherently tied very closely to the compiler itself.
+
+// On platforms where <exception> does not exist, this header defines
+// an exception base class. This is *not* a substitute for everything
+// in <exception>, but it suffices to support a bare minimum of STL
+// functionality.
+
+#ifndef _STLP_INTERNAL_EXCEPTION
+#define _STLP_INTERNAL_EXCEPTION
+
+#if !defined (_STLP_NO_EXCEPTION_HEADER)
+
+# if defined ( _UNCAUGHT_EXCEPTION )
+# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+# endif
+
+# if defined (_STLP_BROKEN_EXCEPTION_CLASS)
+# define exception _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS
+# define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS
+# if defined (_STLP_NO_NEW_NEW_HEADER)
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h)
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception)
+# endif
+# undef exception
+# undef bad_exception
+# else
+# if defined (_STLP_NO_NEW_NEW_HEADER)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <exception.h>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
+# endif
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <exception>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
+# endif
+# endif
+# endif
+
+# if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG) && defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1300)
+// dwa 02/04/00
+// The header <yvals.h> which ships with vc6 and is included by its native <exception>
+// actually turns on warnings, so we have to turn them back off.
+# include <stl/config/_warnings_off.h>
+# endif
+
+# if defined (_STLP_USE_OWN_NAMESPACE)
+
+_STLP_BEGIN_NAMESPACE
+# if !defined (_STLP_BROKEN_EXCEPTION_CLASS)
+# if !defined (_STLP_USING_PLATFORM_SDK_COMPILER) || !defined (_WIN64)
+using _STLP_VENDOR_EXCEPT_STD::exception;
+# else
+using ::exception;
+# endif
+using _STLP_VENDOR_EXCEPT_STD::bad_exception;
+# endif
+
+# if !defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS)
+// fbp : many platforms present strange mix of
+// those in various namespaces
+# if !defined (_STLP_VENDOR_UNEXPECTED_STD)
+# define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD
+# else
+/* The following definitions are for backward compatibility as _STLP_VENDOR_TERMINATE_STD
+ * and _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD has been introduce after _STLP_VENDOR_UNEXPECTED_STD
+ * and _STLP_VENDOR_UNEXPECTED_STD was the macro used in their place before that introduction.
+ */
+# if !defined (_STLP_VENDOR_TERMINATE_STD)
+# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_UNEXPECTED_STD
+# endif
+# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
+# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_UNEXPECTED_STD
+# endif
+# endif
+# if !defined (_STLP_VENDOR_TERMINATE_STD)
+# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
+# endif
+# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
+# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
+# endif
+# if !defined (_STLP_VENDOR_TERMINATE_STD)
+# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
+# endif
+# if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
+# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
+# endif
+// weird errors
+# if !defined (_STLP_NO_UNEXPECTED_EXCEPT_SUPPORT)
+# if defined (__ICL) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300)
+//See config/_intel.h for reason about this workaround
+using std::unexpected;
+# else
+using _STLP_VENDOR_UNEXPECTED_STD::unexpected;
+# endif
+using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler;
+using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected;
+# endif
+using _STLP_VENDOR_TERMINATE_STD::terminate;
+using _STLP_VENDOR_TERMINATE_STD::terminate_handler;
+using _STLP_VENDOR_TERMINATE_STD::set_terminate;
+
+# if !defined (_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)
+using _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD::uncaught_exception;
+# endif
+# endif /* !_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS */
+_STLP_END_NAMESPACE
+# endif /* _STLP_OWN_NAMESPACE */
+#else /* _STLP_NO_EXCEPTION_HEADER */
+
+/* fbp : absence of <exception> usually means that those
+ * functions are not going to be called by compiler.
+ * Still, define them for the user.
+ * dums: Policy modification, if the function do not behave like the Standard
+ * defined it we do not grant it in the STLport namespace. We will have
+ * compile time error rather than runtime error.
+ */
+#if 0
+/*
+typedef void (*unexpected_handler)();
+unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY;
+void unexpected();
+
+typedef void (*terminate_handler)();
+terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY;
+void terminate();
+
+bool uncaught_exception(); // not implemented under mpw as of Jan/1999
+*/
+#endif
+
+#endif /* _STLP_NO_EXCEPTION_HEADER */
+
+#if defined (_STLP_NO_EXCEPTION_HEADER) || defined (_STLP_BROKEN_EXCEPTION_CLASS)
+_STLP_BEGIN_NAMESPACE
+
+// section 18.6.1
+class _STLP_CLASS_DECLSPEC exception {
+public:
+# ifndef _STLP_USE_NO_IOSTREAMS
+ exception() _STLP_NOTHROW;
+ virtual ~exception() _STLP_NOTHROW;
+ virtual const char* what() const _STLP_NOTHROW;
+# else
+ exception() _STLP_NOTHROW {}
+ virtual ~exception() _STLP_NOTHROW {}
+ virtual const char* what() const _STLP_NOTHROW {return "class exception";}
+# endif
+};
+
+// section 18.6.2.1
+class _STLP_CLASS_DECLSPEC bad_exception : public exception {
+public:
+# ifndef _STLP_USE_NO_IOSTREAMS
+ bad_exception() _STLP_NOTHROW;
+ ~bad_exception() _STLP_NOTHROW;
+ const char* what() const _STLP_NOTHROW;
+# else
+ bad_exception() _STLP_NOTHROW {}
+ ~bad_exception() _STLP_NOTHROW {}
+ const char* what() const _STLP_NOTHROW {return "class bad_exception";}
+# endif
+};
+
+// forward declaration
+class __Named_exception;
+_STLP_END_NAMESPACE
+#endif
+
+#endif /* _STLP_INTERNAL_EXCEPTION */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_facets_fwd.h b/6/sources/cxx-stl/stlport/stlport/stl/_facets_fwd.h
new file mode 100644
index 0000000..d4c8451
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_facets_fwd.h
@@ -0,0 +1,53 @@
+#ifndef _STLP_FACETS_FWD_H
+#define _STLP_FACETS_FWD_H
+
+
+#include <stl/_iosfwd.h>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _CharT, class _InputIter>
+#else
+template <class _CharT, class _InputIter = istreambuf_iterator<_CharT, char_traits<_CharT> > >
+#endif
+class money_get;
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _CharT, class _OutputIter>
+#else
+template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT, char_traits<_CharT> > >
+#endif
+class money_put;
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _CharT, class _InputIter>
+#else
+template <class _CharT, class _InputIter = istreambuf_iterator<_CharT, char_traits<_CharT> > >
+#endif
+class num_get;
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _CharT, class _OutputIter>
+#else
+template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT, char_traits<_CharT> > >
+#endif
+class num_put;
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _Ch, class _InIt>
+#else
+template <class _Ch, class _InIt = istreambuf_iterator<_Ch, char_traits<_Ch> > >
+#endif
+class time_get;
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _Ch, class _OutIt>
+#else
+template <class _Ch, class _OutIt = ostreambuf_iterator<_Ch, char_traits<_Ch> > >
+#endif
+class time_put;
+
+_STLP_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_fstream.c b/6/sources/cxx-stl/stlport/stlport/stl/_fstream.c
new file mode 100644
index 0000000..f1548ae
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_fstream.c
@@ -0,0 +1,766 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_FSTREAM_C
+#define _STLP_FSTREAM_C
+
+#ifndef _STLP_INTERNAL_FSTREAM_H
+# include <stl/_fstream.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+// no wchar_t is supported for this mode
+# define __BF_int_type__ int
+# define __BF_pos_type__ streampos
+# define __BF_off_type__ streamoff
+# else
+# define __BF_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type
+# define __BF_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::pos_type
+# define __BF_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::off_type
+# endif
+
+
+//----------------------------------------------------------------------
+// Public basic_filebuf<> member functions
+
+template <class _CharT, class _Traits>
+basic_filebuf<_CharT, _Traits>::basic_filebuf()
+ : basic_streambuf<_CharT, _Traits>(), _M_base(),
+ _M_constant_width(false), _M_always_noconv(false),
+ _M_int_buf_dynamic(false),
+ _M_in_input_mode(false), _M_in_output_mode(false),
+ _M_in_error_mode(false), _M_in_putback_mode(false),
+ _M_int_buf(0), _M_int_buf_EOS(0),
+ _M_ext_buf(0), _M_ext_buf_EOS(0),
+ _M_ext_buf_converted(0), _M_ext_buf_end(0),
+ _M_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)),
+ _M_end_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)),
+ _M_mmap_base(0), _M_mmap_len(0),
+ _M_saved_eback(0), _M_saved_gptr(0), _M_saved_egptr(0),
+ _M_codecvt(0),
+ _M_width(1), _M_max_width(1)
+{
+ this->_M_setup_codecvt(locale(), false);
+}
+
+template <class _CharT, class _Traits>
+basic_filebuf<_CharT, _Traits>::~basic_filebuf() {
+ this->close();
+ _M_deallocate_buffers();
+}
+
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type
+basic_filebuf<_CharT, _Traits>::underflow() {
+ return _Underflow<_CharT, _Traits>::_M_doit(this);
+}
+
+template <class _CharT, class _Traits>
+basic_filebuf<_CharT, _Traits>*
+basic_filebuf<_CharT, _Traits>::close() {
+ bool __ok = this->is_open();
+
+ if (_M_in_output_mode) {
+ __ok = __ok && !_Traits::eq_int_type(this->overflow(traits_type::eof()),
+ traits_type::eof());
+ __ok == __ok && this->_M_unshift();
+ }
+ else if (_M_in_input_mode)
+ this->_M_exit_input_mode();
+
+ // Note order of arguments. We close the file even if __ok is false.
+ __ok = _M_base._M_close() && __ok;
+
+ // Restore the initial state, except that we don't deallocate the buffer
+ // or mess with the cached codecvt information.
+ _M_state = _M_end_state = _State_type();
+ _M_ext_buf_converted = _M_ext_buf_end = 0;
+
+ _M_mmap_base = 0;
+ _M_mmap_len = 0;
+
+ this->setg(0, 0, 0);
+ this->setp(0, 0);
+
+ _M_saved_eback = _M_saved_gptr = _M_saved_egptr = 0;
+
+ _M_in_input_mode = _M_in_output_mode = _M_in_error_mode = _M_in_putback_mode
+ = false;
+
+ return __ok ? this : 0;
+}
+
+// This member function is called whenever we exit input mode.
+// It unmaps the memory-mapped file, if any, and sets
+// _M_in_input_mode to false.
+template <class _CharT, class _Traits>
+void basic_filebuf<_CharT, _Traits>::_M_exit_input_mode() {
+ if (_M_mmap_base != 0) {
+ _M_base._M_unmap(_M_mmap_base, _M_mmap_len);
+ _M_mmap_base = 0;
+ _M_mmap_len = 0;
+ }
+ _M_in_input_mode = false;
+}
+
+
+//----------------------------------------------------------------------
+// basic_filebuf<> overridden protected virtual member functions
+
+template <class _CharT, class _Traits>
+streamsize basic_filebuf<_CharT, _Traits>::showmanyc() {
+ // Is there any possibility that reads can succeed?
+ if (!this->is_open() || _M_in_output_mode || _M_in_error_mode)
+ return -1;
+ else if (_M_in_putback_mode)
+ return this->egptr() - this->gptr();
+ else if (_M_constant_width) {
+ streamoff __pos = _M_base._M_seek(0, ios_base::cur);
+ streamoff __size = _M_base._M_file_size();
+ return __pos >= 0 && __size > __pos ? __size - __pos : 0;
+ }
+ else
+ return 0;
+}
+
+
+// Make a putback position available, if necessary, by switching to a
+// special internal buffer used only for putback. The buffer is
+// [_M_pback_buf, _M_pback_buf + _S_pback_buf_size), but the base
+// class only sees a piece of it at a time. (We want to make sure
+// that we don't try to read a character that hasn't been initialized.)
+// The end of the putback buffer is always _M_pback_buf + _S_pback_buf_size,
+// but the beginning is usually not _M_pback_buf.
+template <class _CharT, class _Traits>
+__BF_int_type__
+basic_filebuf<_CharT, _Traits>::pbackfail(int_type __c) {
+ const int_type __eof = traits_type::eof();
+
+ // If we aren't already in input mode, pushback is impossible.
+ if (!_M_in_input_mode)
+ return __eof;
+
+ // We can use the ordinary get buffer if there's enough space, and
+ // if it's a buffer that we're allowed to write to.
+ if (this->gptr() != this->eback() &&
+ (traits_type::eq_int_type(__c, __eof) ||
+ traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]) ||
+ !_M_mmap_base)) {
+ this->gbump(-1);
+ if (traits_type::eq_int_type(__c, __eof) ||
+ traits_type::eq(traits_type::to_char_type(__c), *this->gptr()))
+ return traits_type::to_int_type(*this->gptr());
+ }
+ else if (!traits_type::eq_int_type(__c, __eof)) {
+ // Are we in the putback buffer already?
+ _CharT* __pback_end = _M_pback_buf + __STATIC_CAST(int,_S_pback_buf_size);
+ if (_M_in_putback_mode) {
+ // Do we have more room in the putback buffer?
+ if (this->eback() != _M_pback_buf)
+ this->setg(this->egptr() - 1, this->egptr() - 1, __pback_end);
+ else
+ return __eof; // No more room in the buffer, so fail.
+ }
+ else { // We're not yet in the putback buffer.
+ _M_saved_eback = this->eback();
+ _M_saved_gptr = this->gptr();
+ _M_saved_egptr = this->egptr();
+ this->setg(__pback_end - 1, __pback_end - 1, __pback_end);
+ _M_in_putback_mode = true;
+ }
+ }
+ else
+ return __eof;
+
+ // We have made a putback position available. Assign to it, and return.
+ *this->gptr() = traits_type::to_char_type(__c);
+ return __c;
+}
+
+// This member function flushes the put area, and also outputs the
+// character __c (unless __c is eof). Invariant: we always leave room
+// in the internal buffer for one character more than the base class knows
+// about. We see the internal buffer as [_M_int_buf, _M_int_buf_EOS), but
+// the base class only sees [_M_int_buf, _M_int_buf_EOS - 1).
+template <class _CharT, class _Traits>
+__BF_int_type__
+basic_filebuf<_CharT, _Traits>::overflow(int_type __c) {
+ // Switch to output mode, if necessary.
+ if (!_M_in_output_mode)
+ if (!_M_switch_to_output_mode())
+ return traits_type::eof();
+
+ _CharT* __ibegin = this->_M_int_buf;
+ _CharT* __iend = this->pptr();
+ this->setp(_M_int_buf, _M_int_buf_EOS - 1);
+
+ // Put __c at the end of the internal buffer.
+ if (!traits_type::eq_int_type(__c, traits_type::eof()))
+ *__iend++ = _Traits::to_char_type(__c);
+
+ // For variable-width encodings, output may take more than one pass.
+ while (__ibegin != __iend) {
+ const _CharT* __inext = __ibegin;
+ char* __enext = _M_ext_buf;
+ typename _Codecvt::result __status
+ = _M_codecvt->out(_M_state, __ibegin, __iend, __inext,
+ _M_ext_buf, _M_ext_buf_EOS, __enext);
+ if (__status == _Codecvt::noconv) {
+ return _Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend)
+ ? traits_type::not_eof(__c)
+ : _M_output_error();
+ }
+
+ // For a constant-width encoding we know that the external buffer
+ // is large enough, so failure to consume the entire internal buffer
+ // or to produce the correct number of external characters, is an error.
+ // For a variable-width encoding, however, we require only that we
+ // consume at least one internal character
+ else if (__status != _Codecvt::error &&
+ (((__inext == __iend) &&
+ (__enext - _M_ext_buf == _M_width * (__iend - __ibegin))) ||
+ (!_M_constant_width && __inext != __ibegin))) {
+ // We successfully converted part or all of the internal buffer.
+ ptrdiff_t __n = __enext - _M_ext_buf;
+ if (_M_write(_M_ext_buf, __n))
+ __ibegin += __inext - __ibegin;
+ else
+ return _M_output_error();
+ }
+ else
+ return _M_output_error();
+ }
+
+ return traits_type::not_eof(__c);
+}
+
+// This member function must be called before any I/O has been
+// performed on the stream, otherwise it has no effect.
+//
+// __buf == 0 && __n == 0 means to make this stream unbuffered.
+// __buf != 0 && __n > 0 means to use __buf as the stream's internal
+// buffer, rather than the buffer that would otherwise be allocated
+// automatically. __buf must be a pointer to an array of _CharT whose
+// size is at least __n.
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>*
+basic_filebuf<_CharT, _Traits>::setbuf(_CharT* __buf, streamsize __n) {
+ if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode &&
+ _M_int_buf == 0) {
+ if (__buf == 0 && __n == 0)
+ _M_allocate_buffers(0, 1);
+ else if (__buf != 0 && __n > 0)
+ _M_allocate_buffers(__buf, __n);
+ }
+ return this;
+}
+
+#if defined (_STLP_ASSERTIONS)
+// helper class.
+template <class _CharT>
+struct _Filebuf_Tmp_Buf {
+ _CharT* _M_ptr;
+ _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; }
+ ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; }
+};
+#endif
+
+template <class _CharT, class _Traits>
+__BF_pos_type__
+basic_filebuf<_CharT, _Traits>::seekoff(off_type __off,
+ ios_base::seekdir __whence,
+ ios_base::openmode /* dummy */) {
+ if (!this->is_open())
+ return pos_type(-1);
+
+ if (!_M_constant_width && __off != 0)
+ return pos_type(-1);
+
+ if (!_M_seek_init(__off != 0 || __whence != ios_base::cur))
+ return pos_type(-1);
+
+ // Seek to beginning or end, regardless of whether we're in input mode.
+ if (__whence == ios_base::beg || __whence == ios_base::end)
+ return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence),
+ _State_type());
+
+ // Seek relative to current position. Complicated if we're in input mode.
+ _STLP_ASSERT(__whence == ios_base::cur)
+ if (!_M_in_input_mode)
+ return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence),
+ _State_type());
+
+ if (_M_mmap_base != 0) {
+ // __off is relative to gptr(). We need to do a bit of arithmetic
+ // to get an offset relative to the external file pointer.
+ streamoff __adjust = _M_mmap_len - (this->gptr() - (_CharT*) _M_mmap_base);
+
+ // if __off == 0, we do not need to exit input mode and to shift file pointer
+ return __off == 0 ? pos_type(_M_base._M_seek(0, ios_base::cur) - __adjust)
+ : _M_seek_return(_M_base._M_seek(__off - __adjust, ios_base::cur), _State_type());
+ }
+
+ if (_M_constant_width) { // Get or set the position.
+ streamoff __iadj = _M_width * (this->gptr() - this->eback());
+
+ // Compensate for offset relative to gptr versus offset relative
+ // to external pointer. For a text-oriented stream, where the
+ // compensation is more than just pointer arithmetic, we may get
+ // but not set the current position.
+
+ if (__iadj <= _M_ext_buf_end - _M_ext_buf) {
+ streamoff __eadj = _M_base._M_get_offset(_M_ext_buf + __STATIC_CAST(ptrdiff_t, __iadj), _M_ext_buf_end);
+
+ return __off == 0 ? pos_type(_M_base._M_seek(0, ios_base::cur) - __eadj)
+ : _M_seek_return(_M_base._M_seek(__off - __eadj, ios_base::cur), _State_type());
+ }
+ }
+ else { // Get the position. Encoding is var width.
+ // Get position in internal buffer.
+ ptrdiff_t __ipos = this->gptr() - this->eback();
+
+ // Get corresponding position in external buffer.
+ _State_type __state = _M_state;
+ int __epos = _M_codecvt->length(__state, _M_ext_buf, _M_ext_buf_converted,
+ __ipos);
+#if defined (_STLP_ASSERTIONS)
+ // Sanity check (expensive): make sure __epos is the right answer.
+ _STLP_ASSERT(__epos >= 0)
+ _State_type __tmp_state = _M_state;
+ _Filebuf_Tmp_Buf<_CharT> __buf(__ipos);
+ _CharT* __ibegin = __buf._M_ptr;
+ _CharT* __inext = __ibegin;
+ const char* __dummy;
+ typename _Codecvt::result __status
+ = _M_codecvt->in(__tmp_state,
+ _M_ext_buf, _M_ext_buf + __epos, __dummy,
+ __ibegin, __ibegin + __ipos, __inext);
+ // The result code is necessarily ok because:
+ // - noconv: impossible for a variable encoding
+ // - error: length method is supposed to count until it reach max value or find an error so we cannot have
+ // an error again when decoding an external buffer up to length return value.
+ // - partial: idem error, it is also a reason for length to stop counting.
+ _STLP_ASSERT(__status == _Codecvt::ok)
+ _STLP_ASSERT(__inext == __ibegin + __ipos)
+ _STLP_ASSERT(equal(this->eback(), this->gptr(), __ibegin, _STLP_PRIV _Eq_traits<traits_type>()))
+#endif
+ // Get the current position (at the end of the external buffer),
+ // then adjust it. Again, it might be a text-oriented stream.
+ streamoff __cur = _M_base._M_seek(0, ios_base::cur);
+ streamoff __adj = _M_base._M_get_offset(_M_ext_buf, _M_ext_buf + __epos) -
+ _M_base._M_get_offset(_M_ext_buf, _M_ext_buf_end);
+ if (__cur != -1 && __cur + __adj >= 0)
+ return __off == 0 ? pos_type(__cur + __adj)
+ : _M_seek_return(__cur + __adj, __state);
+ }
+
+ return pos_type(-1);
+}
+
+
+template <class _CharT, class _Traits>
+__BF_pos_type__
+basic_filebuf<_CharT, _Traits>::seekpos(pos_type __pos,
+ ios_base::openmode /* dummy */) {
+ if (this->is_open()) {
+ if (!_M_seek_init(true))
+ return pos_type(-1);
+
+ streamoff __off = off_type(__pos);
+ if (__off != -1 && _M_base._M_seek(__off, ios_base::beg) != -1) {
+ _M_state = __pos.state();
+ return _M_seek_return(__off, __pos.state());
+ }
+ }
+
+ return pos_type(-1);
+}
+
+
+template <class _CharT, class _Traits>
+int basic_filebuf<_CharT, _Traits>::sync() {
+ if (_M_in_output_mode)
+ return traits_type::eq_int_type(this->overflow(traits_type::eof()),
+ traits_type::eof()) ? -1 : 0;
+ return 0;
+}
+
+
+// Change the filebuf's locale. This member function has no effect
+// unless it is called before any I/O is performed on the stream.
+template <class _CharT, class _Traits>
+void basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc) {
+ if (!_M_in_input_mode && !_M_in_output_mode && !_M_in_error_mode) {
+ this->_M_setup_codecvt(__loc);
+ }
+}
+
+//----------------------------------------------------------------------
+// basic_filebuf<> helper functions.
+
+//----------------------------------------
+// Helper functions for switching between modes.
+
+// This member function is called if we're performing the first I/O
+// operation on a filebuf, or if we're performing an input operation
+// immediately after a seek.
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_switch_to_input_mode() {
+ if (this->is_open() && (((int)_M_base.__o_mode() & (int)ios_base::in) !=0)
+ && (_M_in_output_mode == 0) && (_M_in_error_mode == 0)) {
+ if (!_M_int_buf && !_M_allocate_buffers())
+ return false;
+
+ _M_ext_buf_converted = _M_ext_buf;
+ _M_ext_buf_end = _M_ext_buf;
+
+ _M_end_state = _M_state;
+
+ _M_in_input_mode = true;
+ return true;
+ }
+
+ return false;
+}
+
+
+// This member function is called if we're performing the first I/O
+// operation on a filebuf, or if we're performing an output operation
+// immediately after a seek.
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_switch_to_output_mode() {
+ if (this->is_open() && (_M_base.__o_mode() & (int)ios_base::out) &&
+ _M_in_input_mode == 0 && _M_in_error_mode == 0) {
+
+ if (!_M_int_buf && !_M_allocate_buffers())
+ return false;
+
+ // In append mode, every write does an implicit seek to the end
+ // of the file. Whenever leaving output mode, the end of file
+ // get put in the initial shift state.
+ if (_M_base.__o_mode() & ios_base::app)
+ _M_state = _State_type();
+
+ this->setp(_M_int_buf, _M_int_buf_EOS - 1);
+ _M_in_output_mode = true;
+ return true;
+ }
+
+ return false;
+}
+
+
+//----------------------------------------
+// Helper functions for input
+
+// This member function is called if there is an error during input.
+// It puts the filebuf in error mode, clear the get area buffer, and
+// returns eof.
+// returns eof. Error mode is sticky; it is cleared only by close or
+// seek.
+
+template <class _CharT, class _Traits>
+__BF_int_type__
+basic_filebuf<_CharT, _Traits>::_M_input_error() {
+ this->_M_exit_input_mode();
+ _M_in_output_mode = false;
+ _M_in_error_mode = true;
+ this->setg(0, 0, 0);
+ return traits_type::eof();
+}
+
+template <class _CharT, class _Traits>
+__BF_int_type__
+basic_filebuf<_CharT, _Traits>::_M_underflow_aux() {
+ // We have the state and file position from the end of the internal
+ // buffer. This round, they become the beginning of the internal buffer.
+ _M_state = _M_end_state;
+
+ // Fill the external buffer. Start with any leftover characters that
+ // didn't get converted last time.
+ if (_M_ext_buf_end > _M_ext_buf_converted)
+
+ _M_ext_buf_end = _STLP_STD::copy(_M_ext_buf_converted, _M_ext_buf_end, _M_ext_buf);
+ // boris : copy_backward did not work
+ //_M_ext_buf_end = copy_backward(_M_ext_buf_converted, _M_ext_buf_end,
+ //_M_ext_buf+ (_M_ext_buf_end - _M_ext_buf_converted));
+ else
+ _M_ext_buf_end = _M_ext_buf;
+
+ // Now fill the external buffer with characters from the file. This is
+ // a loop because occasionally we don't get enough external characters
+ // to make progress.
+ for (;;) {
+ ptrdiff_t __n = _M_base._M_read(_M_ext_buf_end, _M_ext_buf_EOS - _M_ext_buf_end);
+ if (__n < 0) {
+ // Read failed, maybe we should set err bit on associated stream...
+ this->setg(0, 0, 0);
+ return traits_type::eof();
+ }
+
+ _M_ext_buf_end += __n;
+
+ // If external buffer is empty there is nothing to do.
+ if (_M_ext_buf == _M_ext_buf_end) {
+ this->setg(0, 0, 0);
+ return traits_type::eof();
+ }
+
+ // Convert the external buffer to internal characters.
+ const char* __enext;
+ _CharT* __inext;
+
+ typename _Codecvt::result __status
+ = _M_codecvt->in(_M_end_state,
+ _M_ext_buf, _M_ext_buf_end, __enext,
+ _M_int_buf, _M_int_buf_EOS, __inext);
+
+ /* Error conditions:
+ * (1) Return value of error.
+ * (2) Producing internal characters without consuming external characters.
+ * (3) In fixed-width encodings, producing an internal sequence whose length
+ * is inconsistent with that of the internal sequence.
+ * (4) Failure to produce any characters if we have enough characters in
+ * the external buffer, where "enough" means the largest possible width
+ * of a single character. */
+ if (__status == _Codecvt::noconv)
+ return _Noconv_input<_Traits>::_M_doit(this);
+ else if (__status == _Codecvt::error ||
+ (__inext != _M_int_buf && __enext == _M_ext_buf) ||
+ (_M_constant_width && (__inext - _M_int_buf) * _M_width != (__enext - _M_ext_buf)) ||
+ (__inext == _M_int_buf && __enext - _M_ext_buf >= _M_max_width))
+ return _M_input_error();
+ else if (__inext != _M_int_buf) {
+ _M_ext_buf_converted = _M_ext_buf + (__enext - _M_ext_buf);
+ this->setg(_M_int_buf, _M_int_buf, __inext);
+ return traits_type::to_int_type(*_M_int_buf);
+ }
+ /* We need to go around the loop again to get more external characters.
+ * But if the previous read failed then don't try again for now.
+ * Don't enter error mode for a failed read. Error mode is sticky,
+ * and we might succeed if we try again. */
+ if (__n <= 0) {
+ this->setg(0, 0, 0);
+ return traits_type::eof();
+ }
+ }
+}
+
+//----------------------------------------
+// Helper functions for output
+
+// This member function is called if there is an error during output.
+// It puts the filebuf in error mode, clear the put area buffer, and
+// returns eof. Error mode is sticky; it is cleared only by close or
+// seek.
+template <class _CharT, class _Traits>
+__BF_int_type__
+basic_filebuf<_CharT, _Traits>::_M_output_error() {
+ _M_in_output_mode = false;
+ _M_in_input_mode = false;
+ _M_in_error_mode = true;
+ this->setp(0, 0);
+ return traits_type::eof();
+}
+
+
+// Write whatever sequence of characters is necessary to get back to
+// the initial shift state. This function overwrites the external
+// buffer, changes the external file position, and changes the state.
+// Precondition: the internal buffer is empty.
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_unshift() {
+ if (_M_in_output_mode && !_M_constant_width) {
+ typename _Codecvt::result __status;
+ do {
+ char* __enext = _M_ext_buf;
+ __status = _M_codecvt->unshift(_M_state,
+ _M_ext_buf, _M_ext_buf_EOS, __enext);
+ if (__status == _Codecvt::noconv ||
+ (__enext == _M_ext_buf && __status == _Codecvt::ok))
+ return true;
+ else if (__status == _Codecvt::error)
+ return false;
+ else if (!_M_write(_M_ext_buf, __enext - _M_ext_buf))
+ return false;
+ } while (__status == _Codecvt::partial);
+ }
+
+ return true;
+}
+
+
+//----------------------------------------
+// Helper functions for buffer allocation and deallocation
+
+// This member function is called when we're initializing a filebuf's
+// internal and external buffers. The argument is the size of the
+// internal buffer; the external buffer is sized using the character
+// width in the current encoding. Preconditions: the buffers are currently
+// null. __n >= 1. __buf is either a null pointer or a pointer to an
+// array show size is at least __n.
+
+// We need __n >= 1 for two different reasons. For input, the base
+// class always needs a buffer because of the semantics of underflow().
+// For output, we want to have an internal buffer that's larger by one
+// element than the buffer that the base class knows about. (See
+// basic_filebuf<>::overflow() for the reason.)
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_allocate_buffers(_CharT* __buf, streamsize __n) {
+ //The major hypothesis in the following implementation is that size_t is unsigned.
+ //We also need streamsize byte representation to be larger or equal to the int
+ //representation to correctly store the encoding information.
+ _STLP_STATIC_ASSERT(!numeric_limits<size_t>::is_signed &&
+ sizeof(streamsize) >= sizeof(int))
+
+ if (__buf == 0) {
+ streamsize __bufsize = __n * sizeof(_CharT);
+ //We first check that the streamsize representation can't overflow a size_t one.
+ //If it can, we check that __bufsize is not higher than the size_t max value.
+ if ((sizeof(streamsize) > sizeof(size_t)) &&
+ (__bufsize > __STATIC_CAST(streamsize, (numeric_limits<size_t>::max)())))
+ return false;
+ _M_int_buf = __STATIC_CAST(_CharT*, malloc(__STATIC_CAST(size_t, __bufsize)));
+ if (!_M_int_buf)
+ return false;
+ _M_int_buf_dynamic = true;
+ }
+ else {
+ _M_int_buf = __buf;
+ _M_int_buf_dynamic = false;
+ }
+
+ streamsize __ebufsiz = (max)(__n * __STATIC_CAST(streamsize, _M_width),
+ __STATIC_CAST(streamsize, _M_codecvt->max_length()));
+
+ _M_ext_buf = 0;
+ if ((sizeof(streamsize) < sizeof(size_t)) ||
+ ((sizeof(streamsize) == sizeof(size_t)) && numeric_limits<streamsize>::is_signed) ||
+ (__ebufsiz <= __STATIC_CAST(streamsize, (numeric_limits<size_t>::max)()))) {
+ _M_ext_buf = __STATIC_CAST(char*, malloc(__STATIC_CAST(size_t, __ebufsiz)));
+ }
+
+ if (!_M_ext_buf) {
+ _M_deallocate_buffers();
+ return false;
+ }
+
+ _M_int_buf_EOS = _M_int_buf + __STATIC_CAST(ptrdiff_t, __n);
+ _M_ext_buf_EOS = _M_ext_buf + __STATIC_CAST(ptrdiff_t, __ebufsiz);
+ return true;
+}
+
+// Abbreviation for the most common case.
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_allocate_buffers() {
+ // Choose a buffer that's at least 4096 characters long and that's a
+ // multiple of the page size.
+ streamsize __default_bufsiz =
+ ((_M_base.__page_size() + 4095UL) / _M_base.__page_size()) * _M_base.__page_size();
+ return _M_allocate_buffers(0, __default_bufsiz);
+}
+
+template <class _CharT, class _Traits>
+void basic_filebuf<_CharT, _Traits>::_M_deallocate_buffers() {
+ if (_M_int_buf_dynamic)
+ free(_M_int_buf);
+ free(_M_ext_buf);
+ _M_int_buf = 0;
+ _M_int_buf_EOS = 0;
+ _M_ext_buf = 0;
+ _M_ext_buf_EOS = 0;
+}
+
+
+//----------------------------------------
+// Helper functiosn for seek and imbue
+
+template <class _CharT, class _Traits>
+bool basic_filebuf<_CharT, _Traits>::_M_seek_init(bool __do_unshift) {
+ // If we're in error mode, leave it.
+ _M_in_error_mode = false;
+
+ // Flush the output buffer if we're in output mode, and (conditionally)
+ // emit an unshift sequence.
+ if (_M_in_output_mode) {
+ bool __ok = !traits_type::eq_int_type(this->overflow(traits_type::eof()),
+ traits_type::eof());
+ if (__do_unshift)
+ __ok = __ok && this->_M_unshift();
+ if (!__ok) {
+ _M_in_output_mode = false;
+ _M_in_error_mode = true;
+ this->setp(0, 0);
+ return false;
+ }
+ }
+
+ // Discard putback characters, if any.
+ if (_M_in_input_mode && _M_in_putback_mode)
+ _M_exit_putback_mode();
+
+ return true;
+}
+
+
+/* Change the filebuf's locale. This member function has no effect
+ * unless it is called before any I/O is performed on the stream.
+ * This function is called on construction and on an imbue call. In the
+ * case of the construction the codecvt facet might be a custom one if
+ * the basic_filebuf user has instanciate it with a custom char_traits.
+ * The user will have to call imbue before any I/O operation.
+ */
+template <class _CharT, class _Traits>
+void basic_filebuf<_CharT, _Traits>::_M_setup_codecvt(const locale& __loc, bool __on_imbue) {
+ if (has_facet<_Codecvt>(__loc)) {
+ _M_codecvt = &use_facet<_Codecvt>(__loc) ;
+ int __encoding = _M_codecvt->encoding();
+
+ _M_width = (max)(__encoding, 1);
+ _M_max_width = _M_codecvt->max_length();
+ _M_constant_width = __encoding > 0;
+ _M_always_noconv = _M_codecvt->always_noconv();
+ }
+ else {
+ _M_codecvt = 0;
+ _M_width = _M_max_width = 1;
+ _M_constant_width = _M_always_noconv = false;
+ if (__on_imbue) {
+ //This call will generate an exception reporting the problem.
+ use_facet<_Codecvt>(__loc);
+ }
+ }
+}
+
+_STLP_END_NAMESPACE
+
+# undef __BF_int_type__
+# undef __BF_pos_type__
+# undef __BF_off_type__
+
+#endif /* _STLP_FSTREAM_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_fstream.h b/6/sources/cxx-stl/stlport/stlport/stl/_fstream.h
new file mode 100644
index 0000000..1945e41
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_fstream.h
@@ -0,0 +1,714 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// This header defines classes basic_filebuf, basic_ifstream,
+// basic_ofstream, and basic_fstream. These classes represent
+// streambufs and streams whose sources or destinations are files.
+
+#ifndef _STLP_INTERNAL_FSTREAM_H
+#define _STLP_INTERNAL_FSTREAM_H
+
+#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS)
+# error This header file requires the -LANG:std option
+#endif
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CODECVT_H
+# include <stl/_codecvt.h>
+#endif
+
+#if defined (_STLP_USE_WIN32_IO)
+typedef void* _STLP_fd;
+#elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO)
+typedef int _STLP_fd;
+#else
+# error "Configure i/o !"
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Class _Filebuf_base, a private base class to factor out the system-
+// dependent code from basic_filebuf<>.
+
+class _STLP_CLASS_DECLSPEC _Filebuf_base {
+public: // Opening and closing files.
+ _Filebuf_base();
+
+ bool _M_open(const char*, ios_base::openmode, long __protection);
+ bool _M_open(const char*, ios_base::openmode);
+ bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode);
+#if defined (_STLP_USE_WIN32_IO)
+ bool _M_open(_STLP_fd __id, ios_base::openmode = ios_base::__default_mode);
+#endif /* _STLP_USE_WIN32_IO */
+ bool _M_close();
+
+public: // Low-level I/O, like Unix read/write
+ ptrdiff_t _M_read(char* __buf, ptrdiff_t __n);
+ streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir);
+ streamoff _M_file_size();
+ bool _M_write(char* __buf, ptrdiff_t __n);
+
+public: // Memory-mapped I/O.
+ void* _M_mmap(streamoff __offset, streamoff __len);
+ void _M_unmap(void* __mmap_base, streamoff __len);
+
+public:
+ // Returns a value n such that, if pos is the file pointer at the
+ // beginning of the range [first, last), pos + n is the file pointer at
+ // the end. On many operating systems n == __last - __first.
+ // In Unix, writing n characters always bumps the file position by n.
+ // In Windows text mode, however, it bumps the file position by n + m,
+ // where m is the number of newlines in the range. That's because an
+ // internal \n corresponds to an external two-character sequence.
+ streamoff _M_get_offset(char* __first, char* __last) {
+#if defined (_STLP_UNIX) || defined (_STLP_MAC)
+ return __last - __first;
+#else // defined (_STLP_WIN32)
+ return ( (_M_openmode & ios_base::binary) != 0 )
+ ? (__last - __first)
+ : count(__first, __last, '\n') + (__last - __first);
+#endif
+ }
+
+ // Returns true if we're in binary mode or if we're using an OS or file
+ // system where there is no distinction between text and binary mode.
+ bool _M_in_binary_mode() const {
+#if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__)
+ return true;
+#elif defined (_STLP_WIN32) || defined (_STLP_VM)
+ return (_M_openmode & ios_base::binary) != 0;
+#else
+# error "Port!"
+#endif
+ }
+
+ static void _S_initialize();
+
+protected: // Static data members.
+ static size_t _M_page_size;
+
+protected: // Data members.
+ _STLP_fd _M_file_id;
+#if defined (_STLP_USE_STDIO_IO)
+ // for stdio, the whole FILE* is being kept here
+ FILE* _M_file;
+#endif
+ ios_base::openmode _M_openmode ;
+ unsigned char _M_is_open ;
+ unsigned char _M_should_close ;
+ unsigned char _M_regular_file ;
+
+#if defined (_STLP_USE_WIN32_IO)
+ _STLP_fd _M_view_id;
+#endif
+
+public :
+ static size_t _STLP_CALL __page_size() { return _M_page_size; }
+ int __o_mode() const { return (int)_M_openmode; }
+ bool __is_open() const { return (_M_is_open !=0 ); }
+ bool __should_close() const { return (_M_should_close != 0); }
+ bool __regular_file() const { return (_M_regular_file != 0); }
+ _STLP_fd __get_fd() const { return _M_file_id; }
+};
+
+//----------------------------------------------------------------------
+// Class basic_filebuf<>.
+
+// Forward declaration of two helper classes.
+template <class _Traits> class _Noconv_input;
+template <class _Traits> class _Noconv_output;
+
+// There is a specialized version of underflow, for basic_filebuf<char>,
+// in fstream.cpp.
+template <class _CharT, class _Traits>
+class _Underflow;
+
+template <class _CharT, class _Traits>
+class basic_filebuf : public basic_streambuf<_CharT, _Traits> {
+public: // Types.
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef typename _Traits::state_type _State_type;
+ typedef basic_streambuf<_CharT, _Traits> _Base;
+ typedef basic_filebuf<_CharT, _Traits> _Self;
+
+public: // Constructors, destructor.
+ basic_filebuf();
+ ~basic_filebuf();
+
+public: // Opening and closing files.
+ bool is_open() const { return _M_base.__is_open(); }
+
+ _Self* open(const char* __s, ios_base::openmode __m) {
+ return _M_base._M_open(__s, __m) ? this : 0;
+ }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+ // These two version of open() and file descriptor getter are extensions.
+ _Self* open(const char* __s, ios_base::openmode __m,
+ long __protection) {
+ return _M_base._M_open(__s, __m, __protection) ? this : 0;
+ }
+
+ _STLP_fd fd() const { return _M_base.__get_fd(); }
+
+ _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
+ return this->_M_open(__id, _Init_mode);
+ }
+
+# if defined (_STLP_USE_WIN32_IO)
+ _Self* open(_STLP_fd __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
+ return _M_base._M_open(__id, _Init_mode) ? this : 0;
+ }
+# endif /* _STLP_USE_WIN32_IO */
+
+#endif
+
+ _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
+ return _M_base._M_open(__id, _Init_mode) ? this : 0;
+ }
+
+ _Self* close();
+
+protected: // Virtual functions from basic_streambuf.
+ virtual streamsize showmanyc();
+ virtual int_type underflow();
+
+ virtual int_type pbackfail(int_type = traits_type::eof());
+ virtual int_type overflow(int_type = traits_type::eof());
+
+ virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
+ virtual pos_type seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode = ios_base::in | ios_base::out);
+ virtual pos_type seekpos(pos_type,
+ ios_base::openmode = ios_base::in | ios_base::out);
+
+ virtual int sync();
+ virtual void imbue(const locale&);
+
+private: // Helper functions.
+
+ // Precondition: we are currently in putback input mode. Effect:
+ // switches back to ordinary input mode.
+ void _M_exit_putback_mode() {
+ this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr);
+ _M_in_putback_mode = false;
+ }
+ bool _M_switch_to_input_mode();
+ void _M_exit_input_mode();
+ bool _M_switch_to_output_mode();
+
+ int_type _M_input_error();
+ int_type _M_underflow_aux();
+ friend class _Underflow<_CharT, _Traits>;
+
+ int_type _M_output_error();
+ bool _M_unshift();
+
+ bool _M_allocate_buffers(_CharT* __buf, streamsize __n);
+ bool _M_allocate_buffers();
+ void _M_deallocate_buffers();
+
+ pos_type _M_seek_return(off_type __off, _State_type __state) {
+ if (__off != -1) {
+ if (_M_in_input_mode)
+ _M_exit_input_mode();
+ _M_in_input_mode = false;
+ _M_in_output_mode = false;
+ _M_in_putback_mode = false;
+ _M_in_error_mode = false;
+ this->setg(0, 0, 0);
+ this->setp(0, 0);
+ }
+
+ pos_type __result(__off);
+ __result.state(__state);
+ return __result;
+ }
+
+ bool _M_seek_init(bool __do_unshift);
+
+ void _M_setup_codecvt(const locale&, bool __on_imbue = true);
+
+private: // Data members used in all modes.
+
+ _Filebuf_base _M_base;
+
+private: // Locale-related information.
+
+ unsigned char _M_constant_width;
+ unsigned char _M_always_noconv;
+
+ // private: // Mode flags.
+ unsigned char _M_int_buf_dynamic; // True if internal buffer is heap allocated,
+ // false if it was supplied by the user.
+ unsigned char _M_in_input_mode;
+ unsigned char _M_in_output_mode;
+ unsigned char _M_in_error_mode;
+ unsigned char _M_in_putback_mode;
+
+ // Internal buffer: characters seen by the filebuf's clients.
+ _CharT* _M_int_buf;
+ _CharT* _M_int_buf_EOS;
+
+ // External buffer: characters corresponding to the external file.
+ char* _M_ext_buf;
+ char* _M_ext_buf_EOS;
+
+ // The range [_M_ext_buf, _M_ext_buf_converted) contains the external
+ // characters corresponding to the sequence in the internal buffer. The
+ // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that
+ // have been read into the external buffer but have not been converted
+ // to an internal sequence.
+ char* _M_ext_buf_converted;
+ char* _M_ext_buf_end;
+
+ // State corresponding to beginning of internal buffer.
+ _State_type _M_state;
+
+private: // Data members used only in input mode.
+
+ // Similar to _M_state except that it corresponds to
+ // the end of the internal buffer instead of the beginning.
+ _State_type _M_end_state;
+
+ // This is a null pointer unless we are in mmap input mode.
+ void* _M_mmap_base;
+ streamoff _M_mmap_len;
+
+private: // Data members used only in putback mode.
+ _CharT* _M_saved_eback;
+ _CharT* _M_saved_gptr;
+ _CharT* _M_saved_egptr;
+
+ typedef codecvt<_CharT, char, _State_type> _Codecvt;
+ const _Codecvt* _M_codecvt;
+
+ int _M_width; // Width of the encoding (if constant), else 1
+ int _M_max_width; // Largest possible width of single character.
+
+
+ enum { _S_pback_buf_size = 8 };
+ _CharT _M_pback_buf[_S_pback_buf_size];
+
+ // for _Noconv_output
+public:
+ bool _M_write(char* __buf, ptrdiff_t __n) {return _M_base._M_write(__buf, __n); }
+
+public:
+ int_type
+ _M_do_noconv_input() {
+ _M_ext_buf_converted = _M_ext_buf_end;
+ /* this-> */ _Base::setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end);
+ return traits_type::to_int_type(*_M_ext_buf);
+ }
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<char, char_traits<char> >;
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<wchar_t, char_traits<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+//
+// This class had to be designed very carefully to work
+// with Visual C++.
+//
+template <class _Traits>
+class _Noconv_output {
+public:
+ typedef typename _Traits::char_type char_type;
+ static bool _STLP_CALL _M_doit(basic_filebuf<char_type, _Traits >*,
+ char_type*, char_type*)
+ { return false; }
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits<char> > {
+public:
+ static bool _STLP_CALL
+ _M_doit(basic_filebuf<char, char_traits<char> >* __buf,
+ char* __first, char* __last) {
+ ptrdiff_t __n = __last - __first;
+ return (__buf->_M_write(__first, __n));
+ }
+};
+
+//----------------------------------------------------------------------
+// basic_filebuf<> helper functions.
+
+
+//----------------------------------------
+// Helper functions for switching between modes.
+
+//
+// This class had to be designed very carefully to work
+// with Visual C++.
+//
+template <class _Traits>
+class _Noconv_input {
+public:
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::char_type char_type;
+
+ static inline int_type _STLP_CALL
+ _M_doit(basic_filebuf<char_type, _Traits>*)
+ { return _Traits::eof(); }
+};
+
+_STLP_TEMPLATE_NULL
+class _Noconv_input<char_traits<char> > {
+public:
+ static inline int _STLP_CALL
+ _M_doit(basic_filebuf<char, char_traits<char> >* __buf) {
+ return __buf->_M_do_noconv_input();
+ }
+};
+
+// underflow() may be called for one of two reasons. (1) We've
+// been going through the special putback buffer, and we need to move back
+// to the regular internal buffer. (2) We've exhausted the internal buffer,
+// and we need to replentish it.
+template <class _CharT, class _Traits>
+class _Underflow {
+public:
+ typedef typename _Traits::int_type int_type;
+ typedef _Traits traits_type;
+
+ // There is a specialized version of underflow, for basic_filebuf<char>,
+ // in fstream.cpp.
+ static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this) {
+ if (!__this->_M_in_input_mode) {
+ if (!__this->_M_switch_to_input_mode())
+ return traits_type::eof();
+ }
+ else if (__this->_M_in_putback_mode) {
+ __this->_M_exit_putback_mode();
+ if (__this->gptr() != __this->egptr()) {
+ int_type __c = traits_type::to_int_type(*__this->gptr());
+ return __c;
+ }
+ }
+
+ return __this->_M_underflow_aux();
+ }
+};
+
+// Specialization of underflow: if the character type is char, maybe
+// we can use mmap instead of read.
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits<char> >
+{
+ public:
+ typedef char_traits<char>::int_type int_type;
+ typedef char_traits<char> traits_type;
+ static int_type _STLP_CALL _M_doit(basic_filebuf<char, traits_type >* __this);
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS _Underflow<wchar_t, char_traits<wchar_t> >;
+#endif
+
+//----------------------------------------------------------------------
+// Class basic_ifstream<>
+
+template <class _CharT, class _Traits>
+class basic_ifstream : public basic_istream<_CharT, _Traits> {
+public: // Types
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_istream<_CharT, _Traits> _Base;
+ typedef basic_filebuf<_CharT, _Traits> _Buf;
+
+public: // Constructors, destructor.
+
+ basic_ifstream() :
+ basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ }
+
+ explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) :
+ basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0),
+ _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __mod | ios_base::in))
+ this->setstate(ios_base::failbit);
+ }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+ explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) :
+ basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod | ios_base::in))
+ this->setstate(ios_base::failbit);
+ }
+ basic_ifstream(const char* __s, ios_base::openmode __m,
+ long __protection) :
+ basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __m | ios_base::in, __protection))
+ this->setstate(ios_base::failbit);
+ }
+
+# if defined (_STLP_USE_WIN32_IO)
+ explicit basic_ifstream(_STLP_fd __id, ios_base::openmode __mod = ios_base::in) :
+ basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod | ios_base::in))
+ this->setstate(ios_base::failbit);
+ }
+# endif /* _STLP_USE_WIN32_IO */
+#endif
+
+ ~basic_ifstream() {}
+
+public: // File and buffer operations.
+ basic_filebuf<_CharT, _Traits>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ bool is_open() {
+ return this->rdbuf()->is_open();
+ }
+
+ void open(const char* __s, ios_base::openmode __mod = ios_base::in) {
+ if (!this->rdbuf()->open(__s, __mod | ios_base::in))
+ this->setstate(ios_base::failbit);
+ }
+
+ void close() {
+ if (!this->rdbuf()->close())
+ this->setstate(ios_base::failbit);
+ }
+
+private:
+ basic_filebuf<_CharT, _Traits> _M_buf;
+};
+
+
+//----------------------------------------------------------------------
+// Class basic_ofstream<>
+
+template <class _CharT, class _Traits>
+class basic_ofstream : public basic_ostream<_CharT, _Traits> {
+public: // Types
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_ostream<_CharT, _Traits> _Base;
+ typedef basic_filebuf<_CharT, _Traits> _Buf;
+
+public: // Constructors, destructor.
+ basic_ofstream() :
+ basic_ios<_CharT, _Traits>(),
+ basic_ostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ }
+ explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out)
+ : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __mod | ios_base::out))
+ this->setstate(ios_base::failbit);
+ }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+ explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out)
+ : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
+ _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod | ios_base::out))
+ this->setstate(ios_base::failbit);
+ }
+ basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) :
+ basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __m | ios_base::out, __protection))
+ this->setstate(ios_base::failbit);
+ }
+# if defined (_STLP_USE_WIN32_IO)
+ explicit basic_ofstream(_STLP_fd __id, ios_base::openmode __mod = ios_base::out)
+ : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
+ _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod | ios_base::out))
+ this->setstate(ios_base::failbit);
+ }
+# endif /* _STLP_USE_WIN32_IO */
+#endif
+
+ ~basic_ofstream() {}
+
+public: // File and buffer operations.
+ basic_filebuf<_CharT, _Traits>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ bool is_open() {
+ return this->rdbuf()->is_open();
+ }
+
+ void open(const char* __s, ios_base::openmode __mod= ios_base::out) {
+ if (!this->rdbuf()->open(__s, __mod | ios_base::out))
+ this->setstate(ios_base::failbit);
+ }
+
+ void close() {
+ if (!this->rdbuf()->close())
+ this->setstate(ios_base::failbit);
+ }
+
+private:
+ basic_filebuf<_CharT, _Traits> _M_buf;
+};
+
+
+//----------------------------------------------------------------------
+// Class basic_fstream<>
+
+template <class _CharT, class _Traits>
+class basic_fstream : public basic_iostream<_CharT, _Traits> {
+public: // Types
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_iostream<_CharT, _Traits> _Base;
+ typedef basic_filebuf<_CharT, _Traits> _Buf;
+
+public: // Constructors, destructor.
+
+ basic_fstream()
+ : basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ }
+
+ explicit basic_fstream(const char* __s,
+ ios_base::openmode __mod = ios_base::in | ios_base::out) :
+ basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __mod))
+ this->setstate(ios_base::failbit);
+ }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+ explicit basic_fstream(int __id,
+ ios_base::openmode __mod = ios_base::in | ios_base::out) :
+ basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod))
+ this->setstate(ios_base::failbit);
+ }
+ basic_fstream(const char* __s, ios_base::openmode __m, long __protection) :
+ basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__s, __m, __protection))
+ this->setstate(ios_base::failbit);
+ }
+# if defined (_STLP_USE_WIN32_IO)
+ explicit basic_fstream(_STLP_fd __id,
+ ios_base::openmode __mod = ios_base::in | ios_base::out) :
+ basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
+ this->init(&_M_buf);
+ if (!_M_buf.open(__id, __mod))
+ this->setstate(ios_base::failbit);
+ }
+# endif /* _STLP_USE_WIN32_IO */
+#endif
+ ~basic_fstream() {}
+
+public: // File and buffer operations.
+
+ basic_filebuf<_CharT, _Traits>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ bool is_open() {
+ return this->rdbuf()->is_open();
+ }
+
+ void open(const char* __s,
+ ios_base::openmode __mod =
+ ios_base::in | ios_base::out) {
+ if (!this->rdbuf()->open(__s, __mod))
+ this->setstate(ios_base::failbit);
+ }
+
+ void close() {
+ if (!this->rdbuf()->close())
+ this->setstate(ios_base::failbit);
+ }
+
+private:
+ basic_filebuf<_CharT, _Traits> _M_buf;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ typedef basic_fstream<_CharT, _Traits> _Self;
+ //explicitely defined as private to avoid warnings:
+ basic_fstream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+};
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_fstream.c>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<char, char_traits<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<char, char_traits<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_fstream<char, char_traits<char> >;
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<wchar_t, char_traits<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<wchar_t, char_traits<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_fstream<wchar_t, char_traits<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_FSTREAM */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_function.h b/6/sources/cxx-stl/stlport/stlport/stl/_function.h
new file mode 100644
index 0000000..bf4ad3e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_function.h
@@ -0,0 +1,433 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_FUNCTION_H
+#define _STLP_INTERNAL_FUNCTION_H
+
+#ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+struct not_equal_to : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
+};
+
+template <class _Tp>
+struct greater : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
+};
+
+template <class _Tp>
+struct greater_equal : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
+};
+
+template <class _Tp>
+struct less_equal : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
+};
+
+template <class _Tp>
+struct divides : public binary_function<_Tp, _Tp, _Tp> {
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
+};
+
+template <class _Tp>
+struct modulus : public binary_function<_Tp, _Tp, _Tp> {
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
+};
+
+template <class _Tp>
+struct negate : public unary_function<_Tp, _Tp> {
+ _Tp operator()(const _Tp& __x) const { return -__x; }
+};
+
+template <class _Tp>
+struct logical_and : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
+};
+
+template <class _Tp>
+struct logical_or : public binary_function<_Tp, _Tp,bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
+};
+
+template <class _Tp>
+struct logical_not : public unary_function<_Tp, bool> {
+ bool operator()(const _Tp& __x) const { return !__x; }
+};
+
+#if !defined (_STLP_NO_EXTENSIONS)
+// identity_element (not part of the C++ standard).
+template <class _Tp> inline _Tp identity_element(plus<_Tp>) { return _Tp(0); }
+template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); }
+#endif
+
+#if defined (_STLP_BASE_TYPEDEF_BUG)
+// this workaround is needed for SunPro 4.0.1
+// suggested by "Martin Abernethy" <gma@paston.co.uk>:
+
+// We have to introduce the XXary_predicate_aux structures in order to
+// access the argument and return types of predicate functions supplied
+// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters
+// of the form 'name1::name2', where name1 is itself a type parameter.
+template <class _Pair>
+struct __pair_aux : private _Pair {
+ typedef typename _Pair::first_type first_type;
+ typedef typename _Pair::second_type second_type;
+};
+
+template <class _Operation>
+struct __unary_fun_aux : private _Operation {
+ typedef typename _Operation::argument_type argument_type;
+ typedef typename _Operation::result_type result_type;
+};
+
+template <class _Operation>
+struct __binary_fun_aux : private _Operation {
+ typedef typename _Operation::first_argument_type first_argument_type;
+ typedef typename _Operation::second_argument_type second_argument_type;
+ typedef typename _Operation::result_type result_type;
+};
+
+# define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type
+# define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type
+# define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type
+#else
+# define __UNARY_ARG(__Operation,__type) __Operation::__type
+# define __BINARY_ARG(__Operation,__type) __Operation::__type
+# define __PAIR_ARG(__Pair,__type) __Pair::__type
+#endif
+
+template <class _Predicate>
+class unary_negate
+ : public unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> {
+ typedef unary_function<typename __UNARY_ARG(_Predicate, argument_type), bool> _Base;
+public:
+ typedef typename _Base::argument_type argument_type;
+private:
+ typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
+protected:
+ _Predicate _M_pred;
+public:
+ explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
+ bool operator()(_ArgParamType __x) const {
+ return !_M_pred(__x);
+ }
+};
+
+template <class _Predicate>
+inline unary_negate<_Predicate>
+not1(const _Predicate& __pred) {
+ return unary_negate<_Predicate>(__pred);
+}
+
+template <class _Predicate>
+class binary_negate
+ : public binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
+ typename __BINARY_ARG(_Predicate, second_argument_type),
+ bool> {
+ typedef binary_function<typename __BINARY_ARG(_Predicate, first_argument_type),
+ typename __BINARY_ARG(_Predicate, second_argument_type),
+ bool> _Base;
+public:
+ typedef typename _Base::first_argument_type first_argument_type;
+ typedef typename _Base::second_argument_type second_argument_type;
+private:
+ typedef typename __call_traits<first_argument_type>::const_param_type _FstArgParamType;
+ typedef typename __call_traits<second_argument_type>::const_param_type _SndArgParamType;
+protected:
+ _Predicate _M_pred;
+public:
+ explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
+ bool operator()(_FstArgParamType __x, _SndArgParamType __y) const {
+ return !_M_pred(__x, __y);
+ }
+};
+
+template <class _Predicate>
+inline binary_negate<_Predicate>
+not2(const _Predicate& __pred) {
+ return binary_negate<_Predicate>(__pred);
+}
+
+template <class _Operation>
+class binder1st :
+ public unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
+ typename __BINARY_ARG(_Operation, result_type) > {
+ typedef unary_function<typename __BINARY_ARG(_Operation, second_argument_type),
+ typename __BINARY_ARG(_Operation, result_type) > _Base;
+public:
+ typedef typename _Base::argument_type argument_type;
+ typedef typename _Base::result_type result_type;
+private:
+ typedef typename __call_traits<argument_type>::param_type _ArgParamType;
+ typedef typename __call_traits<argument_type>::const_param_type _ConstArgParamType;
+ typedef typename __call_traits<typename _Operation::first_argument_type>::const_param_type _ValueParamType;
+protected:
+ //op is a Standard name (20.3.6.1), do no make it STLport naming convention compliant.
+ _Operation op;
+ typename _Operation::first_argument_type _M_value;
+public:
+ binder1st(const _Operation& __x, _ValueParamType __y)
+ : op(__x), _M_value(__y) {}
+
+ result_type operator()(_ConstArgParamType __x) const
+ { return op(_M_value, __x); }
+ // DR 109 Missing binders for non-const sequence elements
+ result_type operator()(_ArgParamType __x) const
+ { return op(_M_value, __x); }
+};
+
+template <class _Operation, class _Tp>
+inline binder1st<_Operation>
+bind1st(const _Operation& __fn, const _Tp& __x) {
+ typedef typename _Operation::first_argument_type _Arg1_type;
+ return binder1st<_Operation>(__fn, _Arg1_type(__x));
+}
+
+template <class _Operation>
+class binder2nd
+ : public unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
+ typename __BINARY_ARG(_Operation, result_type)> {
+ typedef unary_function<typename __BINARY_ARG(_Operation, first_argument_type),
+ typename __BINARY_ARG(_Operation, result_type)> _Base;
+public:
+ typedef typename _Base::argument_type argument_type;
+ typedef typename _Base::result_type result_type;
+private:
+ typedef typename __call_traits<argument_type>::param_type _ArgParamType;
+ typedef typename __call_traits<argument_type>::const_param_type _ConstArgParamType;
+ typedef typename __call_traits<typename _Operation::second_argument_type>::const_param_type _ValueParamType;
+protected:
+ //op is a Standard name (20.3.6.3), do no make it STLport naming convention compliant.
+ _Operation op;
+ typename _Operation::second_argument_type value;
+public:
+ binder2nd(const _Operation& __x, _ValueParamType __y)
+ : op(__x), value(__y) {}
+
+ result_type operator()(_ConstArgParamType __x) const
+ { return op(__x, value); }
+ // DR 109 Missing binders for non-const sequence elements
+ result_type operator()(_ArgParamType __x) const
+ { return op(__x, value); }
+};
+
+template <class _Operation, class _Tp>
+inline binder2nd<_Operation>
+bind2nd(const _Operation& __fn, const _Tp& __x) {
+ typedef typename _Operation::second_argument_type _Arg2_type;
+ return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+}
+
+#if !defined (_STLP_NO_EXTENSIONS)
+// unary_compose and binary_compose (extensions, not part of the standard).
+
+template <class _Operation1, class _Operation2>
+class unary_compose :
+ public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
+ typename __UNARY_ARG(_Operation1, result_type)> {
+ typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
+ typename __UNARY_ARG(_Operation1, result_type)> _Base;
+public:
+ typedef typename _Base::argument_type argument_type;
+ typedef typename _Base::result_type result_type;
+private:
+ typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
+protected:
+ _Operation1 _M_fn1;
+ _Operation2 _M_fn2;
+public:
+ unary_compose(const _Operation1& __x, const _Operation2& __y)
+ : _M_fn1(__x), _M_fn2(__y) {}
+
+ result_type operator()(_ArgParamType __x) const {
+ return _M_fn1(_M_fn2(__x));
+ }
+};
+
+template <class _Operation1, class _Operation2>
+inline unary_compose<_Operation1,_Operation2>
+compose1(const _Operation1& __fn1, const _Operation2& __fn2) {
+ return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
+}
+
+template <class _Operation1, class _Operation2, class _Operation3>
+class binary_compose :
+ public unary_function<typename __UNARY_ARG(_Operation2, argument_type),
+ typename __BINARY_ARG(_Operation1, result_type)> {
+ typedef unary_function<typename __UNARY_ARG(_Operation2, argument_type),
+ typename __BINARY_ARG(_Operation1, result_type)> _Base;
+public:
+ typedef typename _Base::argument_type argument_type;
+ typedef typename _Base::result_type result_type;
+private:
+ typedef typename __call_traits<argument_type>::const_param_type _ArgParamType;
+protected:
+ _Operation1 _M_fn1;
+ _Operation2 _M_fn2;
+ _Operation3 _M_fn3;
+public:
+ binary_compose(const _Operation1& __x, const _Operation2& __y,
+ const _Operation3& __z)
+ : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
+
+ result_type operator()(_ArgParamType __x) const {
+ return _M_fn1(_M_fn2(__x), _M_fn3(__x));
+ }
+};
+
+template <class _Operation1, class _Operation2, class _Operation3>
+inline binary_compose<_Operation1, _Operation2, _Operation3>
+compose2(const _Operation1& __fn1, const _Operation2& __fn2,
+ const _Operation3& __fn3) {
+ return binary_compose<_Operation1,_Operation2,_Operation3>(__fn1, __fn2, __fn3);
+}
+
+// identity is an extension: it is not part of the standard.
+template <class _Tp> struct identity : public _STLP_PRIV _Identity<_Tp> {};
+// select1st and select2nd are extensions: they are not part of the standard.
+template <class _Pair> struct select1st : public _STLP_PRIV _Select1st<_Pair> {};
+template <class _Pair> struct select2nd : public _STLP_PRIV _Select2nd<_Pair> {};
+
+template <class _Arg1, class _Arg2>
+struct project1st : public _STLP_PRIV _Project1st<_Arg1, _Arg2> {};
+
+template <class _Arg1, class _Arg2>
+struct project2nd : public _STLP_PRIV _Project2nd<_Arg1, _Arg2> {};
+
+
+// constant_void_fun, constant_unary_fun, and constant_binary_fun are
+// extensions: they are not part of the standard. (The same, of course,
+// is true of the helper functions constant0, constant1, and constant2.)
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Result>
+struct _Constant_void_fun {
+ typedef _Result result_type;
+ result_type _M_val;
+
+ _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
+ const result_type& operator()() const { return _M_val; }
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Result>
+struct constant_void_fun : public _STLP_PRIV _Constant_void_fun<_Result> {
+ constant_void_fun(const _Result& __v)
+ : _STLP_PRIV _Constant_void_fun<_Result>(__v) {}
+};
+
+template <class _Result, _STLP_DFL_TMPL_PARAM( _Argument , _Result) >
+struct constant_unary_fun : public _STLP_PRIV _Constant_unary_fun<_Result, _Argument> {
+ constant_unary_fun(const _Result& __v)
+ : _STLP_PRIV _Constant_unary_fun<_Result, _Argument>(__v) {}
+};
+
+template <class _Result, _STLP_DFL_TMPL_PARAM( _Arg1 , _Result), _STLP_DFL_TMPL_PARAM( _Arg2 , _Arg1) >
+struct constant_binary_fun
+ : public _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2> {
+ constant_binary_fun(const _Result& __v)
+ : _STLP_PRIV _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
+};
+
+template <class _Result>
+inline constant_void_fun<_Result> constant0(const _Result& __val) {
+ return constant_void_fun<_Result>(__val);
+}
+
+template <class _Result>
+inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) {
+ return constant_unary_fun<_Result,_Result>(__val);
+}
+
+template <class _Result>
+inline constant_binary_fun<_Result,_Result,_Result>
+constant2(const _Result& __val) {
+ return constant_binary_fun<_Result,_Result,_Result>(__val);
+}
+
+// subtractive_rng is an extension: it is not part of the standard.
+// Note: this code assumes that int is 32 bits.
+class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> {
+private:
+ _STLP_UINT32_T _M_table[55];
+ _STLP_UINT32_T _M_index1;
+ _STLP_UINT32_T _M_index2;
+public:
+ _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) {
+ _M_index1 = (_M_index1 + 1) % 55;
+ _M_index2 = (_M_index2 + 1) % 55;
+ _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
+ return _M_table[_M_index1] % __limit;
+ }
+
+ void _M_initialize(_STLP_UINT32_T __seed) {
+ _STLP_UINT32_T __k = 1;
+ _M_table[54] = __seed;
+ _STLP_UINT32_T __i;
+ for (__i = 0; __i < 54; __i++) {
+ _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1;
+ _M_table[__ii] = __k;
+ __k = __seed - __k;
+ __seed = _M_table[__ii];
+ }
+ for (int __loop = 0; __loop < 4; __loop++) {
+ for (__i = 0; __i < 55; __i++)
+ _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
+ }
+ _M_index1 = 0;
+ _M_index2 = 31;
+ }
+
+ subtractive_rng(unsigned int __seed) { _M_initialize(__seed); }
+ subtractive_rng() { _M_initialize(161803398ul); }
+};
+
+#endif /* _STLP_NO_EXTENSIONS */
+
+_STLP_END_NAMESPACE
+
+#include <stl/_function_adaptors.h>
+
+#endif /* _STLP_INTERNAL_FUNCTION_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_function_adaptors.h b/6/sources/cxx-stl/stlport/stlport/stl/_function_adaptors.h
new file mode 100644
index 0000000..0da419b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_function_adaptors.h
@@ -0,0 +1,783 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * Copyright (c) 2000
+ * Pavel Kuznetsov
+ *
+ * Copyright (c) 2001
+ * Meridian'93
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+// This file has noo macro protection as it is meant to be included several times
+// from other header.
+// Adaptor function objects: pointers to member functions.
+
+// There are a total of 16 = 2^4 function objects in this family.
+// (1) Member functions taking no arguments vs member functions taking
+// one argument.
+// (2) Call through pointer vs call through reference.
+// (3) Member function with void return type vs member function with
+// non-void return type.
+// (4) Const vs non-const member function.
+
+// Note that choice (3) is nothing more than a workaround: according
+// to the draft, compilers should handle void and non-void the same way.
+// This feature is not yet widely implemented, though. You can only use
+// member functions returning void if your compiler supports partial
+// specialization.
+
+// All of this complexity is in the function objects themselves. You can
+// ignore it by using the helper function mem_fun and mem_fun_ref,
+// which create whichever type of adaptor is appropriate.
+
+_STLP_BEGIN_NAMESPACE
+
+//This implementation will only be used if needed, that is to say when there is the return void bug
+//and when there is no partial template specialization
+#if defined (_STLP_DONT_RETURN_VOID) && defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+
+template<class _Result, class _Tp>
+class _Mem_fun0_ptr : public unary_function<_Tp*, _Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) ();
+ explicit _Mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(_Tp* __p) const { return (__p->*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp, class _Arg>
+class _Mem_fun1_ptr : public binary_function<_Tp*,_Arg,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) (_Arg);
+ explicit _Mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp>
+class _Const_mem_fun0_ptr : public unary_function<const _Tp*,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) () const;
+ explicit _Const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(const _Tp* __p) const { return (__p->*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp, class _Arg>
+class _Const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) (_Arg) const;
+ explicit _Const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(const _Tp* __p, _Arg __x) const {
+ return (__p->*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp>
+class _Mem_fun0_ref : public unary_function<_Tp,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) ();
+ explicit _Mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(_Tp& __p) const { return (__p.*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp, class _Arg>
+class _Mem_fun1_ref : public binary_function<_Tp,_Arg,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) (_Arg);
+ explicit _Mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(_Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp>
+class _Const_mem_fun0_ref : public unary_function<_Tp,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) () const;
+ explicit _Const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(const _Tp& __p) const { return (__p.*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result, class _Tp, class _Arg>
+class _Const_mem_fun1_ref : public binary_function<_Tp,_Arg,_Result> {
+protected:
+ typedef _Result (_Tp::*__fun_type) (_Arg) const;
+ explicit _Const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator ()(const _Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result>
+struct _Mem_fun_traits {
+ template<class _Tp>
+ struct _Args0 {
+ typedef _Mem_fun0_ptr<_Result,_Tp> _Ptr;
+ typedef _Const_mem_fun0_ptr<_Result,_Tp> _Ptr_const;
+ typedef _Mem_fun0_ref<_Result,_Tp> _Ref;
+ typedef _Const_mem_fun0_ref<_Result,_Tp> _Ref_const;
+ };
+
+ template<class _Tp, class _Arg>
+ struct _Args1 {
+ typedef _Mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr;
+ typedef _Const_mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr_const;
+ typedef _Mem_fun1_ref<_Result,_Tp,_Arg> _Ref;
+ typedef _Const_mem_fun1_ref<_Result,_Tp,_Arg> _Ref_const;
+ };
+};
+
+template<class _Arg, class _Result>
+class _Ptr_fun1_base : public unary_function<_Arg, _Result> {
+protected:
+ typedef _Result (*__fun_type) (_Arg);
+ explicit _Ptr_fun1_base(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator()(_Arg __x) const { return _M_f(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template <class _Arg1, class _Arg2, class _Result>
+class _Ptr_fun2_base : public binary_function<_Arg1,_Arg2,_Result> {
+protected:
+ typedef _Result (*__fun_type) (_Arg1, _Arg2);
+ explicit _Ptr_fun2_base(__fun_type __f) : _M_f(__f) {}
+
+public:
+ _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_f(__x, __y); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Result>
+struct _Ptr_fun_traits {
+ template<class _Arg> struct _Args1 {
+ typedef _Ptr_fun1_base<_Arg,_Result> _Fun;
+ };
+
+ template<class _Arg1, class _Arg2> struct _Args2 {
+ typedef _Ptr_fun2_base<_Arg1,_Arg2,_Result> _Fun;
+ };
+};
+
+/* Specializations for void return type */
+template<class _Tp>
+class _Void_mem_fun0_ptr : public unary_function<_Tp*,void> {
+protected:
+ typedef void (_Tp::*__fun_type) ();
+ explicit _Void_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(_Tp* __p) const { (__p->*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp, class _Arg>
+class _Void_mem_fun1_ptr : public binary_function<_Tp*,_Arg,void> {
+protected:
+ typedef void (_Tp::*__fun_type) (_Arg);
+ explicit _Void_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp>
+class _Void_const_mem_fun0_ptr : public unary_function<const _Tp*,void> {
+protected:
+ typedef void (_Tp::*__fun_type) () const;
+ explicit _Void_const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(const _Tp* __p) const { (__p->*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp, class _Arg>
+class _Void_const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,void> {
+protected:
+ typedef void (_Tp::*__fun_type) (_Arg) const;
+ explicit _Void_const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp>
+class _Void_mem_fun0_ref : public unary_function<_Tp,void> {
+protected:
+ typedef void (_Tp::*__fun_type) ();
+ explicit _Void_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(_Tp& __p) const { (__p.*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp, class _Arg>
+class _Void_mem_fun1_ref : public binary_function<_Tp,_Arg,void> {
+protected:
+ typedef void (_Tp::*__fun_type) (_Arg);
+ explicit _Void_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(_Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp>
+class _Void_const_mem_fun0_ref : public unary_function<_Tp,void> {
+protected:
+ typedef void (_Tp::*__fun_type) () const;
+ explicit _Void_const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(const _Tp& __p) const { (__p.*_M_f)(); }
+
+private:
+ __fun_type _M_f;
+};
+
+template<class _Tp, class _Arg>
+class _Void_const_mem_fun1_ref : public binary_function<_Tp,_Arg,void> {
+protected:
+ typedef void (_Tp::*__fun_type) (_Arg) const;
+ explicit _Void_const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator ()(const _Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+_STLP_TEMPLATE_NULL
+struct _Mem_fun_traits<void> {
+ template<class _Tp> struct _Args0 {
+ typedef _Void_mem_fun0_ptr<_Tp> _Ptr;
+ typedef _Void_const_mem_fun0_ptr<_Tp> _Ptr_const;
+ typedef _Void_mem_fun0_ref<_Tp> _Ref;
+ typedef _Void_const_mem_fun0_ref<_Tp> _Ref_const;
+ };
+
+ template<class _Tp, class _Arg> struct _Args1 {
+ typedef _Void_mem_fun1_ptr<_Tp,_Arg> _Ptr;
+ typedef _Void_const_mem_fun1_ptr<_Tp,_Arg> _Ptr_const;
+ typedef _Void_mem_fun1_ref<_Tp,_Arg> _Ref;
+ typedef _Void_const_mem_fun1_ref<_Tp,_Arg> _Ref_const;
+ };
+};
+
+template<class _Arg>
+class _Ptr_void_fun1_base : public unary_function<_Arg, void> {
+protected:
+ typedef void (*__fun_type) (_Arg);
+ explicit _Ptr_void_fun1_base(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator()(_Arg __x) const { _M_f(__x); }
+
+private:
+ __fun_type _M_f;
+};
+
+template <class _Arg1, class _Arg2>
+class _Ptr_void_fun2_base : public binary_function<_Arg1,_Arg2,void> {
+protected:
+ typedef void (*__fun_type) (_Arg1, _Arg2);
+ explicit _Ptr_void_fun2_base(__fun_type __f) : _M_f(__f) {}
+
+public:
+ void operator()(_Arg1 __x, _Arg2 __y) const { _M_f(__x, __y); }
+
+private:
+ __fun_type _M_f;
+};
+
+_STLP_TEMPLATE_NULL
+struct _Ptr_fun_traits<void> {
+ template<class _Arg> struct _Args1 {
+ typedef _Ptr_void_fun1_base<_Arg> _Fun;
+ };
+
+ template<class _Arg1, class _Arg2> struct _Args2 {
+ typedef _Ptr_void_fun2_base<_Arg1,_Arg2> _Fun;
+ };
+};
+
+// pavel: need extra level of inheritance here since MSVC++ does not
+// accept traits-based fake partial specialization for template
+// arguments other than first
+
+template<class _Result, class _Arg>
+class _Ptr_fun1 :
+ public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun {
+protected:
+ typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun _Base;
+ explicit _Ptr_fun1(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template<class _Result, class _Arg1, class _Arg2>
+class _Ptr_fun2 :
+ public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun {
+protected:
+ typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun _Base;
+ explicit _Ptr_fun2(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp>
+class mem_fun_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr _Base;
+public:
+ explicit mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp>
+class const_mem_fun_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const _Base;
+public:
+ explicit const_mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp>
+class mem_fun_ref_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref _Base;
+public:
+ explicit mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp>
+class const_mem_fun_ref_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const _Base;
+public:
+ explicit const_mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp, class _Arg>
+class mem_fun1_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr _Base;
+public:
+ explicit mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp, class _Arg>
+class const_mem_fun1_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const _Base;
+public:
+ explicit const_mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp, class _Arg>
+class mem_fun1_ref_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref _Base;
+public:
+ explicit mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Result, class _Tp, class _Arg>
+class const_mem_fun1_ref_t :
+ public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const {
+ typedef typename
+ _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const _Base;
+public:
+ explicit const_mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
+};
+
+template <class _Arg, class _Result>
+class pointer_to_unary_function :
+ public _Ptr_fun1<_Result,_Arg> {
+ typedef typename
+ _Ptr_fun1<_Result,_Arg>::__fun_type __fun_type;
+public:
+ explicit pointer_to_unary_function(__fun_type __f)
+ : _Ptr_fun1<_Result,_Arg>(__f) {}
+};
+
+template <class _Arg1, class _Arg2, class _Result>
+class pointer_to_binary_function :
+ public _Ptr_fun2<_Result,_Arg1,_Arg2> {
+ typedef typename
+ _Ptr_fun2<_Result,_Arg1,_Arg2>::__fun_type __fun_type;
+public:
+ explicit pointer_to_binary_function(__fun_type __f)
+ : _Ptr_fun2<_Result,_Arg1,_Arg2>(__f) {}
+};
+
+#else
+
+template <class _Ret, class _Tp>
+class mem_fun_t : public unary_function<_Tp*,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(void);
+public:
+ explicit mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp>
+class const_mem_fun_t : public unary_function<const _Tp*,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(void) const;
+public:
+ explicit const_mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp>
+class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(void);
+public:
+ explicit mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp>
+class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(void) const;
+public:
+ explicit const_mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp, class _Arg>
+class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(_Arg);
+public:
+ explicit mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp, class _Arg>
+class const_mem_fun1_t : public binary_function<const _Tp*,_Arg,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(_Arg) const;
+public:
+ explicit const_mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(const _Tp* __p, _Arg __x) const
+ { return (__p->*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp, class _Arg>
+class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(_Arg);
+public:
+ explicit mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Ret, class _Tp, class _Arg>
+class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
+ typedef _Ret (_Tp::*__fun_type)(_Arg) const;
+public:
+ explicit const_mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
+ _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Arg, class _Result>
+class pointer_to_unary_function : public unary_function<_Arg, _Result> {
+protected:
+ _Result (*_M_ptr)(_Arg);
+public:
+ pointer_to_unary_function() {}
+ explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {}
+ _Result operator()(_Arg __x) const { return _M_ptr(__x); }
+};
+
+template <class _Arg1, class _Arg2, class _Result>
+class pointer_to_binary_function :
+ public binary_function<_Arg1,_Arg2,_Result> {
+protected:
+ _Result (*_M_ptr)(_Arg1, _Arg2);
+public:
+ pointer_to_binary_function() {}
+ explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
+ : _M_ptr(__x) {}
+ _Result operator()(_Arg1 __x, _Arg2 __y) const {
+ return _M_ptr(__x, __y);
+ }
+};
+
+# if defined (_STLP_DONT_RETURN_VOID) && !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION)
+//Partial specializations for the void type
+template <class _Tp>
+class mem_fun_t<void, _Tp> : public unary_function<_Tp*,void> {
+ typedef void (_Tp::*__fun_type)(void);
+public:
+ explicit mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(_Tp* __p) const { (__p->*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp>
+class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*,void> {
+ typedef void (_Tp::*__fun_type)(void) const;
+public:
+ explicit const_mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp>
+class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
+ typedef void (_Tp::*__fun_type)(void);
+public:
+ explicit mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(_Tp& __r) const { (__r.*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp>
+class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
+ typedef void (_Tp::*__fun_type)(void) const;
+public:
+ explicit const_mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp, class _Arg>
+class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*,_Arg,void> {
+ typedef void (_Tp::*__fun_type)(_Arg);
+public:
+ explicit mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp, class _Arg>
+class const_mem_fun1_t<void, _Tp, _Arg>
+ : public binary_function<const _Tp*,_Arg,void> {
+ typedef void (_Tp::*__fun_type)(_Arg) const;
+public:
+ explicit const_mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp, class _Arg>
+class mem_fun1_ref_t<void, _Tp, _Arg>
+ : public binary_function<_Tp,_Arg,void> {
+ typedef void (_Tp::*__fun_type)(_Arg);
+public:
+ explicit mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Tp, class _Arg>
+class const_mem_fun1_ref_t<void, _Tp, _Arg>
+ : public binary_function<_Tp,_Arg,void> {
+ typedef void (_Tp::*__fun_type)(_Arg) const;
+public:
+ explicit const_mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
+ void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
+private:
+ __fun_type _M_f;
+};
+
+template <class _Arg>
+class pointer_to_unary_function<_Arg, void> : public unary_function<_Arg, void> {
+ typedef void (*__fun_type)(_Arg);
+ __fun_type _M_ptr;
+public:
+ pointer_to_unary_function() {}
+ explicit pointer_to_unary_function(__fun_type __x) : _M_ptr(__x) {}
+ void operator()(_Arg __x) const { _M_ptr(__x); }
+};
+
+template <class _Arg1, class _Arg2>
+class pointer_to_binary_function<_Arg1, _Arg2, void> : public binary_function<_Arg1,_Arg2,void> {
+ typedef void (*__fun_type)(_Arg1, _Arg2);
+ __fun_type _M_ptr;
+public:
+ pointer_to_binary_function() {}
+ explicit pointer_to_binary_function(__fun_type __x) : _M_ptr(__x) {}
+ void operator()(_Arg1 __x, _Arg2 __y) const { _M_ptr(__x, __y); }
+};
+
+# endif
+
+#endif
+
+#if !defined (_STLP_MEMBER_POINTER_PARAM_BUG)
+// Mem_fun adaptor helper functions. There are only two:
+// mem_fun and mem_fun_ref. (mem_fun1 and mem_fun1_ref
+// are provided for backward compatibility, but they are no longer
+// part of the C++ standard.)
+
+template <class _Result, class _Tp>
+inline mem_fun_t<_Result,_Tp>
+mem_fun(_Result (_Tp::*__f)()) { return mem_fun_t<_Result,_Tp>(__f); }
+
+template <class _Result, class _Tp>
+inline const_mem_fun_t<_Result,_Tp>
+mem_fun(_Result (_Tp::*__f)() const) { return const_mem_fun_t<_Result,_Tp>(__f); }
+
+template <class _Result, class _Tp>
+inline mem_fun_ref_t<_Result,_Tp>
+mem_fun_ref(_Result (_Tp::*__f)()) { return mem_fun_ref_t<_Result,_Tp>(__f); }
+
+template <class _Result, class _Tp>
+inline const_mem_fun_ref_t<_Result,_Tp>
+mem_fun_ref(_Result (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Result,_Tp>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline mem_fun1_t<_Result,_Tp,_Arg>
+mem_fun(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline const_mem_fun1_t<_Result,_Tp,_Arg>
+mem_fun(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline mem_fun1_ref_t<_Result,_Tp,_Arg>
+mem_fun_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
+mem_fun_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
+
+# if !(defined (_STLP_NO_EXTENSIONS) || defined (_STLP_NO_ANACHRONISMS))
+// mem_fun1 and mem_fun1_ref are no longer part of the C++ standard,
+// but they are provided for backward compatibility.
+template <class _Result, class _Tp, class _Arg>
+inline mem_fun1_t<_Result,_Tp,_Arg>
+mem_fun1(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline const_mem_fun1_t<_Result,_Tp,_Arg>
+mem_fun1(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline mem_fun1_ref_t<_Result,_Tp,_Arg>
+mem_fun1_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
+
+template <class _Result, class _Tp, class _Arg>
+inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
+mem_fun1_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
+
+# endif
+
+#endif
+
+template <class _Arg, class _Result>
+inline pointer_to_unary_function<_Arg, _Result>
+ptr_fun(_Result (*__f)(_Arg))
+{ return pointer_to_unary_function<_Arg, _Result>(__f); }
+
+template <class _Arg1, class _Arg2, class _Result>
+inline pointer_to_binary_function<_Arg1,_Arg2,_Result>
+ptr_fun(_Result (*__f)(_Arg1, _Arg2))
+{ return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f); }
+
+_STLP_END_NAMESPACE
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_function_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_function_base.h
new file mode 100644
index 0000000..1e7f4f5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_function_base.h
@@ -0,0 +1,217 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+#define _STLP_INTERNAL_FUNCTION_BASE_H
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_TYPE_TRAITS_H)
+# include <stl/type_traits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Arg, class _Result>
+struct unary_function {
+ typedef _Arg argument_type;
+ typedef _Result result_type;
+#if !defined (__BORLANDC__) || (__BORLANDC__ < 0x580)
+protected:
+ /* This class purpose is to be derived but it is not polymorphic so users should never try
+ * to destroy an instance of it directly. The protected non-virtual destructor make this
+ * fact obvious at compilation time. */
+ ~unary_function() {}
+#endif
+};
+
+template <class _Arg1, class _Arg2, class _Result>
+struct binary_function {
+ typedef _Arg1 first_argument_type;
+ typedef _Arg2 second_argument_type;
+ typedef _Result result_type;
+#if !defined (__BORLANDC__) || (__BORLANDC__ < 0x580)
+protected:
+ /* See unary_function comment. */
+ ~binary_function() {}
+#endif
+};
+
+template <class _Tp>
+struct equal_to : public binary_function<_Tp, _Tp, bool> {
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
+};
+
+template <class _Tp>
+struct less : public binary_function<_Tp,_Tp,bool>
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+/* less is the default template parameter for many STL containers, to fully use
+ * the move constructor feature we need to know that the default less is just a
+ * functor.
+ */
+ , public __stlport_class<less<_Tp> >
+#endif
+{
+ bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
+
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(less<_Tp>& __x) {}
+#endif
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct __type_traits<less<_Tp> > {
+#if !defined (__BORLANDC__)
+ typedef typename _IsSTLportClass<less<_Tp> >::_Ret _STLportLess;
+#else
+ enum { _Is = _IsSTLportClass<less<_Tp> >::_Is };
+ typedef typename __bool2type<_Is>::_Ret _STLportLess;
+#endif
+ typedef _STLportLess has_trivial_default_constructor;
+ typedef _STLportLess has_trivial_copy_constructor;
+ typedef _STLportLess has_trivial_assignment_operator;
+ typedef _STLportLess has_trivial_destructor;
+ typedef _STLportLess is_POD_type;
+};
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+less<_Tp> __less(_Tp* ) { return less<_Tp>(); }
+
+template <class _Tp>
+equal_to<_Tp> __equal_to(_Tp* ) { return equal_to<_Tp>(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Tp>
+struct plus : public binary_function<_Tp, _Tp, _Tp> {
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
+};
+
+template <class _Tp>
+struct minus : public binary_function<_Tp, _Tp, _Tp> {
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+plus<_Tp> __plus(_Tp* ) { return plus<_Tp>(); }
+
+template <class _Tp>
+minus<_Tp> __minus(_Tp* ) { return minus<_Tp>(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Tp>
+struct multiplies : public binary_function<_Tp, _Tp, _Tp> {
+ _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Pair>
+struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> {
+ const typename _Pair::first_type& operator()(const _Pair& __x) const {
+ return __x.first;
+ }
+};
+
+template <class _Pair>
+struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> {
+ const typename _Pair::second_type& operator()(const _Pair& __x) const {
+ return __x.second;
+ }
+};
+
+// project1st and project2nd are extensions: they are not part of the standard
+template <class _Arg1, class _Arg2>
+struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> {
+ _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; }
+};
+
+template <class _Arg1, class _Arg2>
+struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> {
+ _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; }
+};
+
+#if defined (_STLP_MULTI_CONST_TEMPLATE_ARG_BUG)
+// fbp : sort of select1st just for maps
+template <class _Pair, class _Whatever>
+// JDJ (CW Pro1 doesn't like const when first_type is also const)
+struct __Select1st_hint : public unary_function<_Pair, _Whatever> {
+ const _Whatever& operator () (const _Pair& __x) const { return __x.first; }
+};
+# define _STLP_SELECT1ST(__x,__y) _STLP_PRIV __Select1st_hint< __x, __y >
+#else
+# define _STLP_SELECT1ST(__x, __y) _STLP_PRIV _Select1st< __x >
+#endif
+
+template <class _Tp>
+struct _Identity : public unary_function<_Tp,_Tp> {
+ const _Tp& operator()(const _Tp& __x) const { return __x; }
+};
+
+template <class _Result, class _Argument>
+struct _Constant_unary_fun {
+ typedef _Argument argument_type;
+ typedef _Result result_type;
+ result_type _M_val;
+
+ _Constant_unary_fun(const result_type& __v) : _M_val(__v) {}
+ const result_type& operator()(const _Argument&) const { return _M_val; }
+};
+
+template <class _Result, class _Arg1, class _Arg2>
+struct _Constant_binary_fun {
+ typedef _Arg1 first_argument_type;
+ typedef _Arg2 second_argument_type;
+ typedef _Result result_type;
+ _Result _M_val;
+
+ _Constant_binary_fun(const _Result& __v) : _M_val(__v) {}
+ const result_type& operator()(const _Arg1&, const _Arg2&) const {
+ return _M_val;
+ }
+};
+
+// identity_element (not part of the C++ standard).
+template <class _Tp> inline _Tp __identity_element(plus<_Tp>) { return _Tp(0); }
+template <class _Tp> inline _Tp __identity_element(multiplies<_Tp>) { return _Tp(1); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_FUNCTION_BASE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_hash_fun.h b/6/sources/cxx-stl/stlport/stlport/stl/_hash_fun.h
new file mode 100644
index 0000000..6197d7b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_hash_fun.h
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 1996-1998
+ * 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) 1994
+ * 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_HASH_FUN_H
+#define _STLP_HASH_FUN_H
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Key> struct hash { };
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+inline size_t __stl_hash_string(const char* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ unsigned long __h = 0;
+ for ( ; *__s; ++__s)
+ __h = 5*__h + *__s;
+
+ return size_t(__h);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_TEMPLATE_NULL
+struct hash<char*> {
+ size_t operator()(const char* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _STLP_PRIV __stl_hash_string(__s);
+ }
+};
+
+_STLP_TEMPLATE_NULL
+struct hash<const char*> {
+ size_t operator()(const char* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _STLP_PRIV __stl_hash_string(__s);
+ }
+};
+
+_STLP_TEMPLATE_NULL struct hash<char> {
+ size_t operator()(char __x) const { return __x; }
+};
+_STLP_TEMPLATE_NULL struct hash<unsigned char> {
+ size_t operator()(unsigned char __x) const { return __x; }
+};
+#if !defined (_STLP_NO_SIGNED_BUILTINS)
+_STLP_TEMPLATE_NULL struct hash<signed char> {
+ size_t operator()(unsigned char __x) const { return __x; }
+};
+#endif
+_STLP_TEMPLATE_NULL struct hash<short> {
+ size_t operator()(short __x) const { return __x; }
+};
+_STLP_TEMPLATE_NULL struct hash<unsigned short> {
+ size_t operator()(unsigned short __x) const { return __x; }
+};
+_STLP_TEMPLATE_NULL struct hash<int> {
+ size_t operator()(int __x) const { return __x; }
+};
+
+#if !defined (_STLP_MSVC) || (_STLP_MSVC < 1300) || defined (_WIN64)
+_STLP_TEMPLATE_NULL struct hash<unsigned int> {
+ size_t operator()(unsigned int __x) const { return __x; }
+};
+#else
+/* MSVC .Net since 2002 has a 64 bits portability warning feature. typedef
+ * like size_t are tagged as potential 64 bits variables making them different from
+ * unsigned int. To avoid the warning when a hash container is instanciated with
+ * the size_t key we prefer to grant the size_t specialization rather than the
+ * unsigned int one.
+ */
+_STLP_TEMPLATE_NULL struct hash<size_t> {
+ size_t operator()(size_t __x) const { return __x; }
+};
+#endif
+
+_STLP_TEMPLATE_NULL struct hash<long> {
+ size_t operator()(long __x) const { return __x; }
+};
+_STLP_TEMPLATE_NULL struct hash<unsigned long> {
+ size_t operator()(unsigned long __x) const { return __x; }
+};
+
+#if defined (_STLP_LONG_LONG)
+_STLP_TEMPLATE_NULL struct hash<_STLP_LONG_LONG> {
+ size_t operator()(_STLP_LONG_LONG x) const { return (size_t)x; }
+};
+_STLP_TEMPLATE_NULL struct hash<unsigned _STLP_LONG_LONG> {
+ size_t operator()(unsigned _STLP_LONG_LONG x) const { return (size_t)x; }
+};
+#endif
+
+_STLP_TEMPLATE_NULL
+struct hash<void *>
+{
+ union __vp {
+ size_t s;
+ void *p;
+ };
+
+ size_t operator()(void *__x) const
+ {
+ __vp vp;
+ vp.p = __x;
+ return vp.s;
+ }
+};
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_HASH_FUN_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_hash_map.h b/6/sources/cxx-stl/stlport/stlport/stl/_hash_map.h
new file mode 100644
index 0000000..cd46603
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_hash_map.h
@@ -0,0 +1,500 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_HASH_MAP_H
+#define _STLP_INTERNAL_HASH_MAP_H
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+# include <stl/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(HashMapTraitsT, traits)
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class hash_map
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+private:
+ typedef hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
+public:
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST key_type, data_type> value_type;
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _HashMapTraitsT<value_type> _HashMapTraits;
+
+public:
+ typedef hashtable<value_type, key_type, _HashFcn, _HashMapTraits,
+ _STLP_SELECT1ST(value_type, _Key), _EqualKey, _Alloc > _Ht;
+
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_funct() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+public:
+ hash_map() : _M_ht(0, hasher(), key_equal(), allocator_type()) {}
+ explicit hash_map(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+ hash_map(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+ hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hash_map(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {
+ }
+#endif
+
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ template <class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ template <class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+ template <class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+# endif
+ template <class _InputIterator>
+ hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+#else
+ hash_map(const value_type* __f, const value_type* __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const value_type* __f, const value_type* __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ hash_map(const_iterator __f, const_iterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const_iterator __f, const_iterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_map(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+public:
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+public:
+ pair<iterator,bool> insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_unique(__f,__l); }
+#else
+ void insert(const value_type* __f, const value_type* __l)
+ { _M_ht.insert_unique(__f,__l); }
+ void insert(const_iterator __f, const_iterator __l)
+ { _M_ht.insert_unique(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+ pair<iterator,bool> insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_unique_noresize(__obj); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Tp& operator[](const _KT& __key) {
+ iterator __it = _M_ht.find(__key);
+ return (__it == _M_ht.end() ?
+ _M_ht._M_insert(value_type(__key, _STLP_DEFAULT_CONSTRUCTED(_Tp))).second :
+ (*__it).second );
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type erase(const _KT& __key) {return _M_ht.erase(__key); }
+ void erase(iterator __it) { _M_ht.erase(__it); }
+ void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+ void resize(size_type __hint) { _M_ht.resize(__hint); }
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+};
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(HashMultimapTraitsT, traits)
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class hash_multimap
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+private:
+ typedef hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
+public:
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST key_type, data_type> value_type;
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _HashMultimapTraitsT<value_type> _HashMultimapTraits;
+
+public:
+ typedef hashtable<value_type, key_type, _HashFcn, _HashMultimapTraits,
+ _STLP_SELECT1ST(value_type, _Key), _EqualKey, _Alloc > _Ht;
+
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_funct() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+public:
+ hash_multimap() : _M_ht(0, hasher(), key_equal(), allocator_type()) {}
+ explicit hash_multimap(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+ hash_multimap(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+ hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hash_multimap(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {
+ }
+#endif
+
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ template <class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ template <class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+ template <class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+# endif
+ template <class _InputIterator>
+ hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+#else
+ hash_multimap(const value_type* __f, const value_type* __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const value_type* __f, const value_type* __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ hash_multimap(const_iterator __f, const_iterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const_iterator __f, const_iterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+public:
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+public:
+ iterator insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+#else
+ void insert(const value_type* __f, const value_type* __l) {
+ _M_ht.insert_equal(__f,__l);
+ }
+ void insert(const_iterator __f, const_iterator __l)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+ iterator insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator>
+ equal_range(const _KT& __key) { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator>
+ equal_range(const _KT& __key) const { return _M_ht.equal_range(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type erase(const _KT& __key) {return _M_ht.erase(__key); }
+ void erase(iterator __it) { _M_ht.erase(__it); }
+ void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+public:
+ void resize(size_type __hint) { _M_ht.resize(__hint); }
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+};
+
+#define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
+#include <stl/_relops_hash_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
+#include <stl/_relops_hash_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+struct __move_traits<hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > :
+ _STLP_PRIV __move_traits_help<typename hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>::_Ht>
+{};
+
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+struct __move_traits<hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > :
+ _STLP_PRIV __move_traits_help<typename hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc>::_Ht>
+{};
+# endif
+
+// Specialization of insert_iterator so that it will work for hash_map
+// and hash_multimap.
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+class insert_iterator<hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+ typedef hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+ _Container* container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+class insert_iterator<hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+ typedef hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_HASH_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_hash_set.h b/6/sources/cxx-stl/stlport/stlport/stl/_hash_set.h
new file mode 100644
index 0000000..29b168b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_hash_set.h
@@ -0,0 +1,495 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_HASH_SET_H
+#define _STLP_INTERNAL_HASH_SET_H
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+# include <stl/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(HashSetTraitsT, Const_traits)
+
+template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class hash_set
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+ typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _HashSetTraitsT<_Value> _HashSetTraits;
+public:
+ typedef hashtable<_Value, _Value, _HashFcn,
+ _HashSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht;
+public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_funct() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ hash_set()
+ : _M_ht(0, hasher(), key_equal(), allocator_type()) {}
+ explicit hash_set(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+ hash_set(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+#else
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type()) {}
+ hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a)
+#endif
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hash_set(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ template <class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ template <class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ template <class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+# endif
+#else
+ hash_set(const value_type* __f, const value_type* __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const value_type* __f, const value_type* __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ hash_set(const_iterator __f, const_iterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const_iterator __f, const_iterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_unique(__f, __l); }
+ hash_set(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+public:
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+public:
+ pair<iterator, bool> insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+#else
+ void insert(const_iterator __f, const_iterator __l)
+ {_M_ht.insert_unique(__f, __l); }
+ void insert(const value_type* __f, const value_type* __l)
+#endif
+ { _M_ht.insert_unique(__f,__l); }
+
+ pair<iterator, bool> insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_unique_noresize(__obj); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type erase(const _KT& __key) {return _M_ht.erase(__key); }
+ void erase(iterator __it) { _M_ht.erase(__it); }
+ void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+public:
+ void resize(size_type __hint) { _M_ht.resize(__hint); }
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+};
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(HashMultisetTraitsT, Const_traits)
+
+template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class hash_multiset
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+ typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _HashMultisetTraitsT<_Value> _HashMultisetTraits;
+public:
+ typedef hashtable<_Value, _Value, _HashFcn,
+ _HashMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht;
+
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_funct() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ hash_multiset()
+ : _M_ht(0, hasher(), key_equal(), allocator_type()) {}
+ explicit hash_multiset(size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+ hash_multiset(size_type __n, const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type()) {}
+ hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a)
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hash_multiset(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ template <class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ template <class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+
+ template <class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql)
+ : _M_ht(__n, __hf, __eql, allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+# endif
+#else
+ hash_multiset(const value_type* __f, const value_type* __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const value_type* __f, const value_type* __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ hash_multiset(const_iterator __f, const_iterator __l)
+ : _M_ht(0, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const_iterator __f, const_iterator __l, size_type __n)
+ : _M_ht(__n, hasher(), key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf)
+ : _M_ht(__n, __hf, key_equal(), allocator_type())
+ { _M_ht.insert_equal(__f, __l); }
+ hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
+ const hasher& __hf, const key_equal& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+public:
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& hs) { _M_ht.swap(hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+public:
+ iterator insert(const value_type& __obj) { return _M_ht.insert_equal(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+ { _M_ht.insert_equal(__f,__l); }
+#else
+ void insert(const value_type* __f, const value_type* __l)
+ { _M_ht.insert_equal(__f,__l); }
+ void insert(const_iterator __f, const_iterator __l)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+ iterator insert_noresize(const value_type& __obj)
+ { return _M_ht.insert_equal_noresize(__obj); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type erase(const _KT& __key) {return _M_ht.erase(__key); }
+ void erase(iterator __it) { _M_ht.erase(__it); }
+ void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+public:
+ void resize(size_type __hint) { _M_ht.resize(__hint); }
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type elems_in_bucket(size_type __n) const
+ { return _M_ht.elems_in_bucket(__n); }
+};
+
+#define _STLP_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER hash_set<_Value,_HashFcn,_EqualKey,_Alloc>
+
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER hash_multiset<_Value,_HashFcn,_EqualKey,_Alloc>
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+// Specialization of insert_iterator so that it will work for hash_set
+// and hash_multiset.
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+struct __move_traits<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename hash_set<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht>
+{};
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+struct __move_traits<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht>
+{};
+# endif
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+class insert_iterator<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+ typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+ _Container* container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+class insert_iterator<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+ typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_HASH_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.c b/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.c
new file mode 100644
index 0000000..b743156
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.c
@@ -0,0 +1,553 @@
+/*
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_HASHTABLE_C
+#define _STLP_HASHTABLE_C
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+# include <stl/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+# define __PRIME_LIST_BODY { \
+ 7ul, 23ul, \
+ 53ul, 97ul, 193ul, 389ul, 769ul, \
+ 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, \
+ 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, \
+ 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, \
+ 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,\
+ 1610612741ul, 3221225473ul, 4294967291ul \
+}
+
+template <class _Dummy>
+const size_t* _STLP_CALL
+_Stl_prime<_Dummy>::_S_primes(size_t &__size) {
+ static const size_t _list[] = __PRIME_LIST_BODY;
+# ifndef __MWERKS__
+ __size = sizeof(_list) / sizeof(_list[0]);
+# else
+ __size = 30;
+# endif
+ return _list;
+}
+
+template <class _Dummy>
+size_t _STLP_CALL
+_Stl_prime<_Dummy>::_S_max_nb_buckets() {
+ size_t __size;
+ const size_t* __first = _S_primes(__size);
+ return *(__first + __size - 1);
+}
+
+template <class _Dummy>
+size_t _STLP_CALL
+_Stl_prime<_Dummy>::_S_next_size(size_t __n) {
+ size_t __size;
+ const size_t* __first = _S_primes(__size);
+ const size_t* __last = __first + __size;
+ const size_t* pos = __lower_bound(__first, __last, __n,
+ __less((size_t*)0), __less((size_t*)0), (ptrdiff_t*)0);
+ return (pos == __last ? *(__last - 1) : *pos);
+}
+
+template <class _Dummy>
+void _STLP_CALL
+_Stl_prime<_Dummy>::_S_prev_sizes(size_t __n, size_t const*&__begin, size_t const*&__pos) {
+ size_t __size;
+ __begin = _S_primes(__size);
+ const size_t* __last = __begin + __size;
+ __pos = __lower_bound(__begin, __last, __n,
+ __less((size_t*)0), __less((size_t*)0), (ptrdiff_t*)0);
+
+ if (__pos== __last)
+ --__pos;
+ else if (*__pos == __n) {
+ if (__pos != __begin)
+ --__pos;
+ }
+}
+
+# undef __PRIME_LIST_BODY
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#endif
+
+#if defined (_STLP_DEBUG)
+# define hashtable _STLP_NON_DBG_NAME(hashtable)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+// fbp: these defines are for outline methods definitions.
+// needed to definitions to be portable. Should not be used in method bodies.
+
+#if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+# define __size_type__ size_t
+# define size_type size_t
+# define value_type _Val
+# define key_type _Key
+# define __reference__ _Val&
+
+# define __iterator__ _Ht_iterator<_Val, _STLP_HEADER_TYPENAME _Traits::_NonConstTraits, \
+ _Key, _HF, _ExK, _EqK, _All>
+# define __const_iterator__ _Ht_iterator<_Val, _STLP_HEADER_TYPENAME _Traits::_ConstTraits, \
+ _Key, _HF, _ExK, _EqK, _All>
+#else
+# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::size_type
+# define __reference__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference
+# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::iterator
+# define __const_iterator__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::const_iterator
+#endif
+
+/*
+ * This method is too difficult to implement for hashtable that do not
+ * require a sorted operation on the stored type.
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+bool hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>::_M_equal(
+ const hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>& __ht1,
+ const hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>& __ht2) {
+ return __ht1._M_buckets == __ht2._M_buckets &&
+ __ht1._M_elems == __ht2._M_elems;
+}
+*/
+
+/* Returns the iterator before the first iterator of the bucket __n and set
+ * __n to the first previous bucket having the same first iterator as bucket
+ * __n.
+ */
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__iterator__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_before_begin(size_type &__n) const {
+ return _S_before_begin(_M_elems, _M_buckets, __n);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__iterator__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_S_before_begin(const _ElemsCont& __elems, const _BucketVector& __buckets,
+ size_type &__n) {
+ _ElemsCont &__mutable_elems = __CONST_CAST(_ElemsCont&, __elems);
+ typename _BucketVector::const_iterator __bpos(__buckets.begin() + __n);
+
+ _ElemsIte __pos(*__bpos);
+ if (__pos == __mutable_elems.begin()) {
+ __n = 0;
+ return __mutable_elems.before_begin();
+ }
+
+ typename _BucketVector::const_iterator __bcur(__bpos);
+ _BucketType *__pos_node = __pos._M_node;
+ for (--__bcur; __pos_node == *__bcur; --__bcur);
+
+ __n = __bcur - __buckets.begin() + 1;
+ _ElemsIte __cur(*__bcur);
+ _ElemsIte __prev = __cur++;
+ for (; __cur != __pos; ++__prev, ++__cur);
+ return __prev;
+}
+
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__iterator__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_insert_noresize(size_type __n, const value_type& __obj) {
+ //We always insert this element as 1st in the bucket to not break
+ //the elements order as equal elements must be kept next to each other.
+ size_type __prev = __n;
+ _ElemsIte __pos = _M_before_begin(__prev)._M_ite;
+
+ fill(_M_buckets.begin() + __prev, _M_buckets.begin() + __n + 1,
+ _M_elems.insert_after(__pos, __obj)._M_node);
+ ++_M_num_elements;
+ return iterator(_ElemsIte(_M_buckets[__n]));
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+pair<__iterator__, bool>
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::insert_unique_noresize(const value_type& __obj) {
+ const size_type __n = _M_bkt_num(__obj);
+ _ElemsIte __cur(_M_buckets[__n]);
+ _ElemsIte __last(_M_buckets[__n + 1]);
+
+ if (__cur != __last) {
+ for (; __cur != __last; ++__cur) {
+ if (_M_equals(_M_get_key(*__cur), _M_get_key(__obj))) {
+ //We check that equivalent keys have equals hash code as otherwise, on resize,
+ //equivalent value might not be in the same bucket
+ _STLP_ASSERT(_M_hash(_M_get_key(*__cur)) == _M_hash(_M_get_key(__obj)))
+ return pair<iterator, bool>(iterator(__cur), false);
+ }
+ }
+ /* Here we do not rely on the _M_insert_noresize method as we know
+ * that we cannot break element orders, elements are unique, and
+ * insertion after the first bucket element is faster than what is
+ * done in _M_insert_noresize.
+ */
+ __cur = _M_elems.insert_after(_ElemsIte(_M_buckets[__n]), __obj);
+ ++_M_num_elements;
+ return pair<iterator, bool>(iterator(__cur), true);
+ }
+
+ return pair<iterator, bool>(_M_insert_noresize(__n, __obj), true);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__iterator__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::insert_equal_noresize(const value_type& __obj) {
+ const size_type __n = _M_bkt_num(__obj);
+ {
+ _ElemsIte __cur(_M_buckets[__n]);
+ _ElemsIte __last(_M_buckets[__n + 1]);
+
+ for (; __cur != __last; ++__cur) {
+ if (_M_equals(_M_get_key(*__cur), _M_get_key(__obj))) {
+ //We check that equivalent keys have equals hash code as otherwise, on resize,
+ //equivalent value might not be in the same bucket
+ _STLP_ASSERT(_M_hash(_M_get_key(*__cur)) == _M_hash(_M_get_key(__obj)))
+ ++_M_num_elements;
+ return _M_elems.insert_after(__cur, __obj);
+ }
+ }
+ }
+
+ return _M_insert_noresize(__n, __obj);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__reference__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_insert(const value_type& __obj) {
+ _M_enlarge(_M_num_elements + 1);
+ return *insert_unique_noresize(__obj).first;
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+__size_type__
+hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::erase(const key_type& __key) {
+ const size_type __n = _M_bkt_num_key(__key);
+
+ _ElemsIte __cur(_M_buckets[__n]);
+ _ElemsIte __last(_M_buckets[__n + 1]);
+ if (__cur == __last)
+ return 0;
+
+ size_type __erased = 0;
+ if (_M_equals(_M_get_key(*__cur), __key)) {
+ //We look for the pos before __cur:
+ size_type __prev_b = __n;
+ _ElemsIte __prev = _M_before_begin(__prev_b)._M_ite;
+ do {
+ __cur = _M_elems.erase_after(__prev);
+ ++__erased;
+ } while ((__cur != __last) && _M_equals(_M_get_key(*__cur), __key));
+ fill(_M_buckets.begin() + __prev_b, _M_buckets.begin() + __n + 1, __cur._M_node);
+ }
+ else {
+ _ElemsIte __prev = __cur++;
+ for (; __cur != __last; ++__prev, ++__cur) {
+ if (_M_equals(_M_get_key(*__cur), __key)) {
+ do {
+ __cur = _M_elems.erase_after(__prev);
+ ++__erased;
+ } while ((__cur != __last) && _M_equals(_M_get_key(*__cur), __key));
+ break;
+ }
+ }
+ }
+
+ _M_num_elements -= __erased;
+ _M_reduce();
+ return __erased;
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::erase(const_iterator __it) {
+ const size_type __n = _M_bkt_num(*__it);
+ _ElemsIte __cur(_M_buckets[__n]);
+
+ size_type __erased = 0;
+ if (__cur == __it._M_ite) {
+ size_type __prev_b = __n;
+ _ElemsIte __prev = _M_before_begin(__prev_b)._M_ite;
+ fill(_M_buckets.begin() + __prev_b, _M_buckets.begin() + __n + 1,
+ _M_elems.erase_after(__prev)._M_node);
+ ++__erased;
+ }
+ else {
+ _ElemsIte __prev = __cur++;
+ _ElemsIte __last(_M_buckets[__n + 1]);
+ for (; __cur != __last; ++__prev, ++__cur) {
+ if (__cur == __it._M_ite) {
+ _M_elems.erase_after(__prev);
+ ++__erased;
+ break;
+ }
+ }
+ }
+
+ _M_num_elements -= __erased;
+ _M_reduce();
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::erase(const_iterator __first, const_iterator __last) {
+ if (__first == __last)
+ return;
+ size_type __f_bucket = _M_bkt_num(*__first);
+ size_type __l_bucket = __last != end() ? _M_bkt_num(*__last) : (_M_buckets.size() - 1);
+
+ _ElemsIte __cur(_M_buckets[__f_bucket]);
+ _ElemsIte __prev;
+ if (__cur == __first._M_ite) {
+ __prev = _M_before_begin(__f_bucket)._M_ite;
+ }
+ else {
+ _ElemsIte __last(_M_buckets[++__f_bucket]);
+ __prev = __cur++;
+ for (; (__cur != __last) && (__cur != __first._M_ite); ++__prev, ++__cur);
+ }
+ size_type __erased = 0;
+ //We do not use the slist::erase_after method taking a range to count the
+ //number of erased elements:
+ while (__cur != __last._M_ite) {
+ __cur = _M_elems.erase_after(__prev);
+ ++__erased;
+ }
+ fill(_M_buckets.begin() + __f_bucket, _M_buckets.begin() + __l_bucket + 1, __cur._M_node);
+ _M_num_elements -= __erased;
+ _M_reduce();
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::rehash(size_type __num_buckets_hint) {
+ if (bucket_count() >= __num_buckets_hint) {
+ // We are trying to reduce number of buckets, we have to validate it:
+ size_type __limit_num_buckets = (size_type)((float)size() / max_load_factor());
+ if (__num_buckets_hint < __limit_num_buckets) {
+ // Targetted number of buckets __num_buckets_hint would break
+ // load_factor() <= max_load_factor() rule.
+ return;
+ }
+ }
+
+ _M_rehash(__num_buckets_hint);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_enlarge(size_type __to_size) {
+ size_type __num_buckets = bucket_count();
+ size_type __num_buckets_hint = (size_type)((float)__to_size / max_load_factor());
+ if (__num_buckets_hint <= __num_buckets) {
+ return;
+ }
+ __num_buckets = _STLP_PRIV _Stl_prime_type::_S_next_size(__num_buckets_hint);
+
+ _M_rehash(__num_buckets);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_reduce() {
+ size_type __num_buckets = bucket_count();
+ // We only try to reduce the hashtable if the theorical load factor
+ // is lower than a fraction of the max load factor:
+ // 4 factor is coming from the fact that prime number list is almost a
+ // geometrical suite with reason 2, as we try to jump 2 levels is means
+ // a 4 factor.
+ if ((float)size() / (float)__num_buckets > max_load_factor() / 4.0f)
+ return;
+
+ const size_type *__first;
+ const size_type *__prev;
+ _STLP_PRIV _Stl_prime_type::_S_prev_sizes(__num_buckets, __first, __prev);
+
+ /* We are only going to reduce number of buckets if moving to yet the previous number
+ * of buckets in the prime numbers would respect the load rule. Otherwise algorithm
+ * successively removing and adding an element would each time perform an expensive
+ * rehash operation. */
+ const size_type *__prev_prev = __prev;
+ if (__prev_prev != __first) {
+ --__prev_prev;
+ if ((float)size() / (float)*__prev_prev > max_load_factor())
+ return;
+ }
+ else {
+ if (*__prev >= __num_buckets)
+ return;
+ }
+
+ // Can we reduce further:
+ while (__prev_prev != __first) {
+ --__prev_prev;
+ if ((float)size() / (float)*__prev_prev > max_load_factor())
+ // We cannot reduce further.
+ break;
+ --__prev;
+ }
+
+ _M_rehash(*__prev);
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_resize() {
+ if (load_factor() > max_load_factor()) {
+ // We have to enlarge
+ _M_enlarge(size());
+ }
+ else {
+ // We can try to reduce size:
+ _M_reduce();
+ }
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_rehash(size_type __num_buckets) {
+#if defined (_STLP_DEBUG)
+ _M_check();
+#endif
+ _ElemsCont __tmp_elems(_M_elems.get_allocator());
+ _BucketVector __tmp(__num_buckets + 1, __STATIC_CAST(_BucketType*, 0), _M_buckets.get_allocator());
+ _ElemsIte __cur, __last(_M_elems.end());
+ while (!_M_elems.empty()) {
+ __cur = _M_elems.begin();
+ size_type __new_bucket = _M_bkt_num(*__cur, __num_buckets);
+ _ElemsIte __ite(__cur), __before_ite(__cur);
+ for (++__ite;
+ __ite != __last && _M_equals(_M_get_key(*__cur), _M_get_key(*__ite));
+ ++__ite, ++__before_ite);
+ size_type __prev_bucket = __new_bucket;
+ _ElemsIte __prev = _S_before_begin(__tmp_elems, __tmp, __prev_bucket)._M_ite;
+ __tmp_elems.splice_after(__prev, _M_elems, _M_elems.before_begin(), __before_ite);
+ fill(__tmp.begin() + __prev_bucket, __tmp.begin() + __new_bucket + 1, __cur._M_node);
+ }
+ _M_elems.swap(__tmp_elems);
+ _M_buckets.swap(__tmp);
+}
+
+#if defined (_STLP_DEBUG)
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>::_M_check() const {
+ //We check that hash code of stored keys haven't change and also that equivalent
+ //relation hasn't been modified
+ size_t __num_buckets = bucket_count();
+ for (size_t __b = 0; __b < __num_buckets; ++__b) {
+ _ElemsIte __cur(_M_buckets[__b]), __last(_M_buckets[__b + 1]);
+ _ElemsIte __fst(__cur), __snd(__cur);
+ for (; __cur != __last; ++__cur) {
+ _STLP_ASSERT( _M_bkt_num(*__cur, __num_buckets) == __b )
+ _STLP_ASSERT( !_M_equals(_M_get_key(*__fst), _M_get_key(*__cur)) || _M_equals(_M_get_key(*__snd), _M_get_key(*__cur)) )
+ if (__fst != __snd)
+ ++__fst;
+ if (__snd != __cur)
+ ++__snd;
+ }
+ }
+}
+#endif
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>::clear() {
+ _M_elems.clear();
+ _M_buckets.assign(_M_buckets.size(), __STATIC_CAST(_BucketType*, 0));
+ _M_num_elements = 0;
+}
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+void hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+ ::_M_copy_from(const hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>& __ht) {
+ _M_elems.clear();
+ _M_elems.insert(_M_elems.end(), __ht._M_elems.begin(), __ht._M_elems.end());
+ _M_buckets.resize(__ht._M_buckets.size());
+ _ElemsConstIte __src(__ht._M_elems.begin()), __src_end(__ht._M_elems.end());
+ _ElemsIte __dst(_M_elems.begin());
+ typename _BucketVector::const_iterator __src_b(__ht._M_buckets.begin()),
+ __src_end_b(__ht._M_buckets.end());
+ typename _BucketVector::iterator __dst_b(_M_buckets.begin()), __dst_end_b(_M_buckets.end());
+ for (; __src != __src_end; ++__src, ++__dst) {
+ for (; __src_b != __src_end_b; ++__src_b, ++__dst_b) {
+ if (*__src_b == __src._M_node) {
+ *__dst_b = __dst._M_node;
+ }
+ else
+ break;
+ }
+ }
+ fill(__dst_b, __dst_end_b, __STATIC_CAST(_BucketType*, 0));
+ _M_num_elements = __ht._M_num_elements;
+ _M_max_load_factor = __ht._M_max_load_factor;
+}
+
+#undef __iterator__
+#undef const_iterator
+#undef __size_type__
+#undef __reference__
+#undef size_type
+#undef value_type
+#undef key_type
+#undef __stl_num_primes
+
+#if defined (_STLP_DEBUG)
+# undef hashtable
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_HASHTABLE_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.h b/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.h
new file mode 100644
index 0000000..1c8e2f5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_hashtable.h
@@ -0,0 +1,658 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+#define _STLP_INTERNAL_HASHTABLE_H
+
+#ifndef _STLP_INTERNAL_VECTOR_H
+# include <stl/_vector.h>
+#endif
+
+#ifndef _STLP_INTERNAL_SLIST_H
+# include <stl/_slist.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_HASH_FUN_H
+# include <stl/_hash_fun.h>
+#endif
+
+/*
+ * Hashtable class, used to implement the hashed associative containers
+ * hash_set, hash_map, hash_multiset, hash_multimap,
+ * unordered_set, unordered_map, unordered_multiset, unordered_multimap.
+ */
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+//Export of the classes used to represent buckets in the hashtable implementation.
+# if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
+//If pointer specialization is enabled vector<_Slist_node_base*> will use the void*
+//storage type for which internal classes have already been exported.
+_STLP_EXPORT_TEMPLATE_CLASS allocator<_STLP_PRIV _Slist_node_base*>;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<_Slist_node_base**, _Slist_node_base*,
+ allocator<_Slist_node_base*> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Vector_base<_Slist_node_base*,
+ allocator<_Slist_node_base*> >;
+_STLP_MOVE_TO_STD_NAMESPACE
+# endif
+
+# if defined (_STLP_DEBUG)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+# define _STLP_NON_DBG_VECTOR _STLP_NON_DBG_NAME(vector)
+_STLP_EXPORT_TEMPLATE_CLASS __construct_checker<_STLP_NON_DBG_VECTOR<_Slist_node_base*, allocator<_Slist_node_base*> > >;
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_NON_DBG_VECTOR<_Slist_node_base*, allocator<_Slist_node_base*> >;
+# undef _STLP_NON_DBG_VECTOR
+_STLP_MOVE_TO_STD_NAMESPACE
+# endif
+
+_STLP_EXPORT_TEMPLATE_CLASS vector<_STLP_PRIV _Slist_node_base*,
+ allocator<_STLP_PRIV _Slist_node_base*> >;
+#endif
+
+#if defined (_STLP_DEBUG)
+# define hashtable _STLP_NON_DBG_NAME(hashtable)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+// some compilers require the names of template parameters to be the same
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+class hashtable;
+
+#if !defined (_STLP_DEBUG)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _BaseIte, class _Traits>
+struct _Ht_iterator {
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+
+ typedef _Ht_iterator<_BaseIte,_Traits> _Self;
+
+ typedef typename _Traits::value_type value_type;
+ typedef typename _Traits::pointer pointer;
+ typedef typename _Traits::reference reference;
+ typedef forward_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+
+ typedef _Ht_iterator<_BaseIte, _NonConstTraits> iterator;
+ typedef _Ht_iterator<_BaseIte, _ConstTraits> const_iterator;
+
+ _Ht_iterator() {}
+ //copy constructor for iterator and constructor from iterator for const_iterator
+ _Ht_iterator(const iterator& __it) : _M_ite(__it._M_ite) {}
+ _Ht_iterator(_BaseIte __it) : _M_ite(__it) {}
+
+ reference operator*() const {
+ return *_M_ite;
+ }
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ ++_M_ite;
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ ++*this;
+ return __tmp;
+ }
+
+ bool operator == (const_iterator __rhs) const {
+ return _M_ite == __rhs._M_ite;
+ }
+ bool operator != (const_iterator __rhs) const {
+ return _M_ite != __rhs._M_ite;
+ }
+
+ _BaseIte _M_ite;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _BaseIte, class _Traits>
+struct __type_traits<_STLP_PRIV _Ht_iterator<_BaseIte, _Traits> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+template <class _BaseIte, class _Traits>
+inline
+# if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+_STLP_TYPENAME_ON_RETURN_TYPE _Traits::value_type *
+# else
+_STLP_TYPENAME_ON_RETURN_TYPE _STLP_PRIV _Ht_iterator<_BaseIte,_Traits>::value_type *
+# endif
+value_type(const _STLP_PRIV _Ht_iterator<_BaseIte,_Traits>&) {
+ typedef _STLP_TYPENAME _STLP_PRIV _Ht_iterator<_BaseIte,_Traits>::value_type _Val;
+ return (_Val*) 0;
+}
+template <class _BaseIte, class _Traits>
+inline forward_iterator_tag iterator_category(const _STLP_PRIV _Ht_iterator<_BaseIte,_Traits>&)
+{ return forward_iterator_tag(); }
+template <class _BaseIte, class _Traits>
+inline ptrdiff_t* distance_type(const _STLP_PRIV _Ht_iterator<_BaseIte,_Traits>&)
+{ return (ptrdiff_t*) 0; }
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Dummy>
+class _Stl_prime {
+ // Returns begining of primes list and size by reference.
+ static const size_t* _S_primes(size_t&);
+public:
+ //Returns the maximum number of buckets handled by the hashtable implementation
+ static size_t _STLP_CALL _S_max_nb_buckets();
+
+ //Returns the bucket size next to a required size
+ static size_t _STLP_CALL _S_next_size(size_t);
+
+ // Returns the bucket range containing sorted list of prime numbers <= __hint.
+ static void _STLP_CALL _S_prev_sizes(size_t __hint, const size_t *&__begin, const size_t *&__end);
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _Stl_prime<bool>;
+#endif
+
+typedef _Stl_prime<bool> _Stl_prime_type;
+
+#if !defined (_STLP_DEBUG)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+/*
+ * Hashtables handle allocators a bit differently than other containers
+ * do. If we're using standard-conforming allocators, then a hashtable
+ * unconditionally has a member variable to hold its allocator, even if
+ * it so happens that all instances of the allocator type are identical.
+ * This is because, for hashtables, this extra storage is negligible.
+ * Additionally, a base class wouldn't serve any other purposes; it
+ * wouldn't, for example, simplify the exception-handling code.
+ */
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+class hashtable {
+ typedef hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All> _Self;
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef typename _Traits::_NonConstLocalTraits _NonConstLocalTraits;
+ typedef typename _Traits::_ConstLocalTraits _ConstLocalTraits;
+
+public:
+ typedef _Key key_type;
+ typedef _Val value_type;
+ typedef _HF hasher;
+ typedef _EqK key_equal;
+
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef typename _NonConstTraits::pointer pointer;
+ typedef const value_type* const_pointer;
+ typedef typename _NonConstTraits::reference reference;
+ typedef const value_type& const_reference;
+ typedef forward_iterator_tag _Iterator_category;
+
+ hasher hash_funct() const { return _M_hash; }
+ key_equal key_eq() const { return _M_equals; }
+
+private:
+ _STLP_FORCE_ALLOCATORS(_Val, _All)
+#if defined (_STLP_DEBUG)
+ typedef _STLP_PRIV _STLP_NON_DBG_NAME(slist)<value_type, _All> _ElemsCont;
+#else
+ typedef slist<value_type, _All> _ElemsCont;
+#endif
+ typedef typename _ElemsCont::iterator _ElemsIte;
+ typedef typename _ElemsCont::const_iterator _ElemsConstIte;
+ typedef _STLP_PRIV _Slist_node_base _BucketType;
+ typedef typename _Alloc_traits<_BucketType*, _All>::allocator_type _BucketAllocType;
+ /*
+ * We are going to use vector of _Slist_node_base pointers for 2 reasons:
+ * - limit code bloat, all hashtable instanciation use the same buckets representation.
+ * - avoid _STLP_DEBUG performance trouble: with a vector of iterator on slist the resize
+ * method would be too slow because the slist::splice_after method become linear on
+ * the number of iterators in the buckets rather than constant in time as the iterator
+ * has to be move from a slist to the other.
+ */
+#if defined (_STLP_DEBUG)
+ typedef _STLP_PRIV _STLP_NON_DBG_NAME(vector)<_BucketType*, _BucketAllocType> _BucketVector;
+#else
+ typedef vector<_BucketType*, _BucketAllocType> _BucketVector;
+#endif
+
+ hasher _M_hash;
+ key_equal _M_equals;
+ _ElemsCont _M_elems;
+ _BucketVector _M_buckets;
+ size_type _M_num_elements;
+ float _M_max_load_factor;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+ static const key_type& _M_get_key(const value_type& __val) {
+ _ExK k;
+ return k(__val);
+ }
+public:
+ typedef _STLP_PRIV _Ht_iterator<_ElemsIte, _NonConstTraits> iterator;
+ typedef _STLP_PRIV _Ht_iterator<_ElemsIte, _ConstTraits> const_iterator;
+ //TODO: Avoids this debug check and make the local_iterator different from
+ //iterator in debug mode too.
+#if !defined (_STLP_DEBUG)
+ typedef _STLP_PRIV _Ht_iterator<_ElemsIte, _NonConstLocalTraits> local_iterator;
+ typedef _STLP_PRIV _Ht_iterator<_ElemsIte, _ConstLocalTraits> const_local_iterator;
+#else
+ typedef iterator local_iterator;
+ typedef const_iterator const_local_iterator;
+#endif
+
+ typedef _All allocator_type;
+ allocator_type get_allocator() const { return _M_elems.get_allocator(); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ hashtable(size_type __n,
+ const _HF& __hf,
+ const _EqK& __eql,
+ const allocator_type& __a = allocator_type())
+#else
+ hashtable(size_type __n,
+ const _HF& __hf,
+ const _EqK& __eql)
+ : _M_hash(__hf),
+ _M_equals(__eql),
+ _M_elems(allocator_type()),
+ _M_buckets(_STLP_CONVERT_ALLOCATOR(__a, _BucketType*)),
+ _M_num_elements(0),
+ _M_max_load_factor(1.0f)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(size_type __n,
+ const _HF& __hf,
+ const _EqK& __eql,
+ const allocator_type& __a)
+#endif
+ : _M_hash(__hf),
+ _M_equals(__eql),
+ _M_elems(__a),
+ _M_buckets(_STLP_CONVERT_ALLOCATOR(__a, _BucketType*)),
+ _M_num_elements(0),
+ _M_max_load_factor(1.0f)
+ { _M_initialize_buckets(__n); }
+
+ hashtable(const _Self& __ht)
+ : _M_hash(__ht._M_hash),
+ _M_equals(__ht._M_equals),
+ _M_elems(__ht.get_allocator()),
+ _M_buckets(_STLP_CONVERT_ALLOCATOR(__ht.get_allocator(), _BucketType*)),
+ _M_num_elements(0),
+ _M_max_load_factor(1.0f)
+ { _M_copy_from(__ht); }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hashtable(__move_source<_Self> src)
+ : _M_hash(_STLP_PRIV _AsMoveSource(src.get()._M_hash)),
+ _M_equals(_STLP_PRIV _AsMoveSource(src.get()._M_equals)),
+ _M_elems(__move_source<_ElemsCont>(src.get()._M_elems)),
+ _M_buckets(__move_source<_BucketVector>(src.get()._M_buckets)),
+ _M_num_elements(src.get()._M_num_elements),
+ _M_max_load_factor(src.get()._M_max_load_factor) {}
+#endif
+
+ _Self& operator= (const _Self& __ht) {
+ if (&__ht != this) {
+ clear();
+ _M_hash = __ht._M_hash;
+ _M_equals = __ht._M_equals;
+ _M_copy_from(__ht);
+ }
+ return *this;
+ }
+
+ ~hashtable() { clear(); }
+
+ size_type size() const { return _M_num_elements; }
+ size_type max_size() const { return size_type(-1); }
+ bool empty() const { return size() == 0; }
+
+ void swap(_Self& __ht) {
+ _STLP_STD::swap(_M_hash, __ht._M_hash);
+ _STLP_STD::swap(_M_equals, __ht._M_equals);
+ _M_elems.swap(__ht._M_elems);
+ _M_buckets.swap(__ht._M_buckets);
+ _STLP_STD::swap(_M_num_elements, __ht._M_num_elements);
+ _STLP_STD::swap(_M_max_load_factor, __ht._M_max_load_factor);
+ }
+
+ iterator begin() { return _M_elems.begin(); }
+ iterator end() { return _M_elems.end(); }
+ local_iterator begin(size_type __n) { return _ElemsIte(_M_buckets[__n]); }
+ local_iterator end(size_type __n) { return _ElemsIte(_M_buckets[__n + 1]); }
+
+ const_iterator begin() const { return __CONST_CAST(_ElemsCont&, _M_elems).begin(); }
+ const_iterator end() const { return __CONST_CAST(_ElemsCont&, _M_elems).end(); }
+ const_local_iterator begin(size_type __n) const { return _ElemsIte(_M_buckets[__n]); }
+ const_local_iterator end(size_type __n) const { return _ElemsIte(_M_buckets[__n + 1]); }
+
+ //static bool _STLP_CALL _M_equal (const _Self&, const _Self&);
+
+public:
+ //The number of buckets is size() - 1 because the last bucket always contains
+ //_M_elems.end() to make algo easier to implement.
+ size_type bucket_count() const { return _M_buckets.size() - 1; }
+ size_type max_bucket_count() const { return _STLP_PRIV _Stl_prime_type::_S_max_nb_buckets(); }
+ size_type elems_in_bucket(size_type __bucket) const
+ { return _STLP_STD::distance(_ElemsIte(_M_buckets[__bucket]), _ElemsIte(_M_buckets[__bucket + 1])); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_bkt_num_key(__k); }
+
+ // hash policy
+ float load_factor() const { return (float)size() / (float)bucket_count(); }
+ float max_load_factor() const { return _M_max_load_factor; }
+ void max_load_factor(float __z) {
+ _M_max_load_factor = __z;
+ _M_resize();
+ }
+
+ pair<iterator, bool> insert_unique(const value_type& __obj) {
+ _M_enlarge(_M_num_elements + 1);
+ return insert_unique_noresize(__obj);
+ }
+
+ iterator insert_equal(const value_type& __obj) {
+ _M_enlarge(_M_num_elements + 1);
+ return insert_equal_noresize(__obj);
+ }
+
+protected:
+ iterator _M_insert_noresize(size_type __n, const value_type& __obj);
+public:
+ pair<iterator, bool> insert_unique_noresize(const value_type& __obj);
+ iterator insert_equal_noresize(const value_type& __obj);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert_unique(_InputIterator __f, _InputIterator __l)
+ { insert_unique(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIterator)); }
+
+ template <class _InputIterator>
+ void insert_equal(_InputIterator __f, _InputIterator __l)
+ { insert_equal(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIterator)); }
+
+ template <class _InputIterator>
+ void insert_unique(_InputIterator __f, _InputIterator __l,
+ const input_iterator_tag &) {
+ for ( ; __f != __l; ++__f)
+ insert_unique(*__f);
+ }
+
+ template <class _InputIterator>
+ void insert_equal(_InputIterator __f, _InputIterator __l,
+ const input_iterator_tag &) {
+ for ( ; __f != __l; ++__f)
+ insert_equal(*__f);
+ }
+
+ template <class _ForwardIterator>
+ void insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+ const forward_iterator_tag &) {
+ size_type __n = _STLP_STD::distance(__f, __l);
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ template <class _ForwardIterator>
+ void insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+ const forward_iterator_tag &) {
+ size_type __n = _STLP_STD::distance(__f, __l);
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert_unique(const value_type* __f, const value_type* __l) {
+ size_type __n = __l - __f;
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ void insert_equal(const value_type* __f, const value_type* __l) {
+ size_type __n = __l - __f;
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+
+ void insert_unique(const_iterator __f, const_iterator __l) {
+ size_type __n = _STLP_STD::distance(__f, __l);
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_unique_noresize(*__f);
+ }
+
+ void insert_equal(const_iterator __f, const_iterator __l) {
+ size_type __n = _STLP_STD::distance(__f, __l);
+ _M_enlarge(_M_num_elements + __n);
+ for ( ; __n > 0; --__n, ++__f)
+ insert_equal_noresize(*__f);
+ }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+ //reference find_or_insert(const value_type& __obj);
+
+private:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _ElemsIte _M_find(const _KT& __key) const {
+ size_type __n = _M_bkt_num_key(__key);
+ _ElemsIte __first(_M_buckets[__n]);
+ _ElemsIte __last(_M_buckets[__n + 1]);
+ for ( ; (__first != __last) && !_M_equals(_M_get_key(*__first), __key); ++__first);
+ if (__first != __last)
+ return __first;
+ else
+ return __CONST_CAST(_ElemsCont&, _M_elems).end();
+ }
+
+public:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const {
+ const size_type __n = _M_bkt_num_key(__key);
+
+ _ElemsIte __cur(_M_buckets[__n]);
+ _ElemsIte __last(_M_buckets[__n + 1]);
+ for (; __cur != __last; ++__cur) {
+ if (_M_equals(_M_get_key(*__cur), __key)) {
+ size_type __result = 1;
+ for (++__cur;
+ __cur != __last && _M_equals(_M_get_key(*__cur), __key);
+ ++__result, ++__cur);
+ return __result;
+ }
+ }
+ return 0;
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key) {
+ typedef pair<iterator, iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (_ElemsIte __first(_M_buckets[__n]), __last(_M_buckets[__n + 1]);
+ __first != __last; ++__first) {
+ if (_M_equals(_M_get_key(*__first), __key)) {
+ _ElemsIte __cur(__first);
+ for (++__cur; (__cur != __last) && _M_equals(_M_get_key(*__cur), __key); ++__cur);
+ return _Pii(__first, __cur);
+ }
+ }
+ return _Pii(end(), end());
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const {
+ typedef pair<const_iterator, const_iterator> _Pii;
+ const size_type __n = _M_bkt_num_key(__key);
+
+ for (_ElemsIte __first(_M_buckets[__n]), __last(_M_buckets[__n + 1]);
+ __first != __last; ++__first) {
+ if (_M_equals(_M_get_key(*__first), __key)) {
+ _ElemsIte __cur(__first);
+ for (++__cur; (__cur != __last) && _M_equals(_M_get_key(*__cur), __key); ++__cur);
+ return _Pii(__first, __cur);
+ }
+ }
+ return _Pii(end(), end());
+ }
+
+ size_type erase(const key_type& __key);
+ void erase(const_iterator __it);
+ void erase(const_iterator __first, const_iterator __last);
+
+private:
+ void _M_enlarge(size_type __n);
+ void _M_reduce();
+ void _M_resize();
+ void _M_rehash(size_type __num_buckets);
+#if defined (_STLP_DEBUG)
+ void _M_check() const;
+#endif
+
+public:
+ void rehash(size_type __num_buckets_hint);
+ void resize(size_type __num_buckets_hint)
+ { rehash(__num_buckets_hint); }
+ void clear();
+
+ // this is for hash_map::operator[]
+ reference _M_insert(const value_type& __obj);
+
+private:
+ //__n is set to the first bucket that has to be modified if any
+ //erase/insert operation is done after the returned iterator.
+ iterator _M_before_begin(size_type &__n) const;
+
+ static iterator _S_before_begin(const _ElemsCont& __elems, const _BucketVector& __buckets,
+ size_type &__n);
+
+ void _M_initialize_buckets(size_type __n) {
+ const size_type __n_buckets = _STLP_PRIV _Stl_prime_type::_S_next_size(__n) + 1;
+ _M_buckets.reserve(__n_buckets);
+ _M_buckets.assign(__n_buckets, __STATIC_CAST(_BucketType*, 0));
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type _M_bkt_num_key(const _KT& __key) const
+ { return _M_bkt_num_key(__key, bucket_count()); }
+
+ size_type _M_bkt_num(const value_type& __obj) const
+ { return _M_bkt_num_key(_M_get_key(__obj)); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type _M_bkt_num_key(const _KT& __key, size_type __n) const
+ { return _M_hash(__key) % __n; }
+
+ size_type _M_bkt_num(const value_type& __obj, size_t __n) const
+ { return _M_bkt_num_key(_M_get_key(__obj), __n); }
+
+ void _M_copy_from(const _Self& __ht);
+};
+
+#if defined (_STLP_DEBUG)
+# undef hashtable
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_hashtable.c>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define _STLP_TEMPLATE_HEADER template <class _Val, class _Key, class _HF, class _Traits, class _ExK, class _EqK, class _All>
+#define _STLP_TEMPLATE_CONTAINER hashtable<_Val,_Key,_HF,_Traits,_ExK,_EqK,_All>
+#include <stl/_relops_hash_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Val, class _Key, class _HF, class _Traits, class _ExK, class _EqK, class _All>
+struct __move_traits<hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All> > {
+ //Hashtables are movable:
+ typedef __true_type implemented;
+
+ //Completeness depends on many template parameters, for the moment we consider it not complete:
+ typedef __false_type complete;
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_HASHTABLE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_heap.c b/6/sources/cxx-stl/stlport/stlport/stl/_heap.c
new file mode 100644
index 0000000..a4ab049
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_heap.c
@@ -0,0 +1,246 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_HEAP_C
+#define _STLP_HEAP_C
+
+#ifndef _STLP_INTERNAL_HEAP_H
+# include <stl/_heap.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _RandomAccessIterator, class _Distance, class _Tp>
+_STLP_INLINE_LOOP
+void
+__push_heap(_RandomAccessIterator __first,
+ _Distance __holeIndex, _Distance __topIndex, _Tp __val)
+{
+ _Distance __parent = (__holeIndex - 1) / 2;
+ while (__holeIndex > __topIndex && *(__first + __parent) < __val) {
+ *(__first + __holeIndex) = *(__first + __parent);
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = __val;
+}
+
+template <class _RandomAccessIterator, class _Distance, class _Tp>
+inline void
+__push_heap_aux(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Distance*, _Tp*)
+{
+ __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0),
+ _Tp(*(__last - 1)));
+}
+
+template <class _RandomAccessIterator>
+void
+push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+{
+ __push_heap_aux(__first, __last,
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
+}
+
+
+template <class _RandomAccessIterator, class _Distance, class _Tp,
+ class _Compare>
+_STLP_INLINE_LOOP
+void
+__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __topIndex, _Tp __val, _Compare __comp)
+{
+ _Distance __parent = (__holeIndex - 1) / 2;
+ while (__holeIndex > __topIndex && __comp(*(__first + __parent), __val)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__val, *(__first + __parent)), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ *(__first + __holeIndex) = *(__first + __parent);
+ __holeIndex = __parent;
+ __parent = (__holeIndex - 1) / 2;
+ }
+ *(__first + __holeIndex) = __val;
+}
+
+template <class _RandomAccessIterator, class _Compare,
+ class _Distance, class _Tp>
+inline void
+__push_heap_aux(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp,
+ _Distance*, _Tp*)
+{
+ __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0),
+ _Tp(*(__last - 1)), __comp);
+}
+
+template <class _RandomAccessIterator, class _Compare>
+void
+push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp)
+{
+ __push_heap_aux(__first, __last, __comp,
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
+}
+
+template <class _RandomAccessIterator, class _Distance, class _Tp>
+void
+__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __val) {
+ _Distance __topIndex = __holeIndex;
+ _Distance __secondChild = 2 * __holeIndex + 2;
+ while (__secondChild < __len) {
+ if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
+ __secondChild--;
+ *(__first + __holeIndex) = *(__first + __secondChild);
+ __holeIndex = __secondChild;
+ __secondChild = 2 * (__secondChild + 1);
+ }
+ if (__secondChild == __len) {
+ *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ __holeIndex = __secondChild - 1;
+ }
+ __push_heap(__first, __holeIndex, __topIndex, __val);
+}
+
+
+template <class _RandomAccessIterator, class _Tp>
+inline void
+__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*) {
+ __pop_heap(__first, __last - 1, __last - 1,
+ _Tp(*(__last - 1)), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
+}
+
+template <class _RandomAccessIterator>
+void pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last) {
+ __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
+}
+
+template <class _RandomAccessIterator, class _Distance,
+ class _Tp, class _Compare>
+void
+__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __val, _Compare __comp)
+{
+ _Distance __topIndex = __holeIndex;
+ _Distance __secondChild = 2 * __holeIndex + 2;
+ while (__secondChild < __len) {
+ if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) {
+ _STLP_VERBOSE_ASSERT(!__comp(*(__first + (__secondChild - 1)), *(__first + __secondChild)),
+ _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __secondChild--;
+ }
+ *(__first + __holeIndex) = *(__first + __secondChild);
+ __holeIndex = __secondChild;
+ __secondChild = 2 * (__secondChild + 1);
+ }
+ if (__secondChild == __len) {
+ *(__first + __holeIndex) = *(__first + (__secondChild - 1));
+ __holeIndex = __secondChild - 1;
+ }
+ __push_heap(__first, __holeIndex, __topIndex, __val, __comp);
+}
+
+
+template <class _RandomAccessIterator, class _Tp, class _Compare>
+inline void
+__pop_heap_aux(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Tp*, _Compare __comp)
+{
+ __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp,
+ _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
+}
+
+
+template <class _RandomAccessIterator, class _Compare>
+void
+pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+{
+ __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator), __comp);
+}
+
+template <class _RandomAccessIterator, class _Tp, class _Distance>
+_STLP_INLINE_LOOP
+void
+__make_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Tp*, _Distance*)
+{
+ if (__last - __first < 2) return;
+ _Distance __len = __last - __first;
+ _Distance __parent = (__len - 2)/2;
+
+ for (;;) {
+ __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)));
+ if (__parent == 0) return;
+ __parent--;
+ }
+}
+
+template <class _RandomAccessIterator>
+void
+make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+{
+ __make_heap(__first, __last,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
+}
+
+template <class _RandomAccessIterator, class _Compare,
+ class _Tp, class _Distance>
+_STLP_INLINE_LOOP
+void
+__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp, _Tp*, _Distance*)
+{
+ if (__last - __first < 2) return;
+ _Distance __len = __last - __first;
+ _Distance __parent = (__len - 2)/2;
+
+ for (;;) {
+ __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)),
+ __comp);
+ if (__parent == 0) return;
+ __parent--;
+ }
+}
+
+template <class _RandomAccessIterator, class _Compare>
+void
+make_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+{
+ __make_heap(__first, __last, __comp,
+ _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_HEAP_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_heap.h b/6/sources/cxx-stl/stlport/stlport/stl/_heap.h
new file mode 100644
index 0000000..016dc49
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_heap.h
@@ -0,0 +1,125 @@
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ * Copyright (c) 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.
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_HEAP_H
+#define _STLP_INTERNAL_HEAP_H
+
+_STLP_BEGIN_NAMESPACE
+
+// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
+
+template <class _RandomAccessIterator>
+void
+push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last);
+
+
+template <class _RandomAccessIterator, class _Compare>
+void
+push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _Compare __comp);
+
+template <class _RandomAccessIterator, class _Distance, class _Tp>
+void
+__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __val);
+
+template <class _RandomAccessIterator, class _Tp, class _Distance>
+inline void
+__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomAccessIterator __result, _Tp __val, _Distance*)
+{
+ *__result = *__first;
+ __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __val);
+}
+
+template <class _RandomAccessIterator>
+void pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last);
+
+template <class _RandomAccessIterator, class _Distance,
+ class _Tp, class _Compare>
+void
+__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+ _Distance __len, _Tp __val, _Compare __comp);
+
+template <class _RandomAccessIterator, class _Tp, class _Compare,
+ class _Distance>
+inline void
+__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+ _RandomAccessIterator __result, _Tp __val, _Compare __comp,
+ _Distance*)
+{
+ *__result = *__first;
+ __adjust_heap(__first, _Distance(0), _Distance(__last - __first),
+ __val, __comp);
+}
+
+template <class _RandomAccessIterator, class _Compare>
+void
+pop_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp);
+
+template <class _RandomAccessIterator>
+void
+make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last);
+
+template <class _RandomAccessIterator, class _Compare>
+void
+make_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp);
+
+template <class _RandomAccessIterator>
+_STLP_INLINE_LOOP
+void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+{
+ while (__last - __first > 1)
+ pop_heap(__first, __last--);
+}
+
+template <class _RandomAccessIterator, class _Compare>
+_STLP_INLINE_LOOP
+void
+sort_heap(_RandomAccessIterator __first,
+ _RandomAccessIterator __last, _Compare __comp)
+{
+ while (__last - __first > 1)
+ pop_heap(__first, __last--, __comp);
+}
+
+_STLP_END_NAMESPACE
+
+# if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_heap.c>
+# endif
+
+#endif /* _STLP_INTERNAL_HEAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iomanip.h b/6/sources/cxx-stl/stlport/stlport/stl/_iomanip.h
new file mode 100644
index 0000000..a27d951
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iomanip.h
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_IOMANIP
+#define _STLP_INTERNAL_IOMANIP
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h> // Includes <ostream> and <ios>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+//----------------------------------------------------------------------
+// Machinery for defining manipulators.
+
+// Class that calls one of ios_base's single-argument member functions.
+template <class _Arg>
+struct _Ios_Manip_1 {
+ typedef _Arg (ios_base::*__f_ptr_type)(_Arg);
+
+ _Ios_Manip_1(__f_ptr_type __f, const _Arg& __arg)
+ : _M_f(__f), _M_arg(__arg) {}
+
+ void operator()(ios_base& __ios) const
+ { (__ios.*_M_f)(_M_arg); }
+
+ __f_ptr_type _M_f;
+ _Arg _M_arg;
+};
+
+// Class that calls one of ios_base's two-argument member functions.
+struct _Ios_Setf_Manip {
+ ios_base::fmtflags _M_flag;
+ ios_base::fmtflags _M_mask;
+ bool _M_two_args;
+
+ _Ios_Setf_Manip(ios_base::fmtflags __f)
+ : _M_flag(__f), _M_mask(0), _M_two_args(false) {}
+
+ _Ios_Setf_Manip(ios_base::fmtflags __f, ios_base::fmtflags __m)
+ : _M_flag(__f), _M_mask(__m), _M_two_args(true) {}
+
+ void operator()(ios_base& __ios) const {
+ if (_M_two_args)
+ __ios.setf(_M_flag, _M_mask);
+ else
+ __ios.setf(_M_flag);
+ }
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _Traits, class _Arg>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __istr,
+ const _STLP_PRIV _Ios_Manip_1<_Arg>& __f) {
+ __f(__istr);
+ return __istr;
+}
+
+template <class _CharT, class _Traits, class _Arg>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const _STLP_PRIV _Ios_Manip_1<_Arg>& __f) {
+ __f(__os);
+ return __os;
+}
+
+template <class _CharT, class _Traits>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __istr,
+ const _STLP_PRIV _Ios_Setf_Manip& __f) {
+ __f(__istr);
+ return __istr;
+}
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const _STLP_PRIV _Ios_Setf_Manip& __f) {
+ __f(__os);
+ return __os;
+}
+
+//----------------------------------------------------------------------
+// The ios_base manipulators.
+inline _STLP_PRIV _Ios_Setf_Manip _STLP_CALL resetiosflags(ios_base::fmtflags __mask)
+{ return _STLP_PRIV _Ios_Setf_Manip(0, __mask); }
+
+inline _STLP_PRIV _Ios_Setf_Manip _STLP_CALL setiosflags(ios_base::fmtflags __flag)
+{ return _STLP_PRIV _Ios_Setf_Manip(__flag); }
+
+inline _STLP_PRIV _Ios_Setf_Manip _STLP_CALL setbase(int __n) {
+ ios_base::fmtflags __base = __n == 8 ? ios_base::oct :
+ __n == 10 ? ios_base::dec :
+ __n == 16 ? ios_base::hex :
+ ios_base::fmtflags(0);
+ return _STLP_PRIV _Ios_Setf_Manip(__base, ios_base::basefield);
+}
+
+inline _STLP_PRIV _Ios_Manip_1<streamsize> _STLP_CALL
+setprecision(int __n) {
+ _STLP_PRIV _Ios_Manip_1<streamsize>::__f_ptr_type __f = &ios_base::precision;
+ return _STLP_PRIV _Ios_Manip_1<streamsize>(__f, __n);
+}
+
+inline _STLP_PRIV _Ios_Manip_1<streamsize> _STLP_CALL
+setw(int __n) {
+ _STLP_PRIV _Ios_Manip_1<streamsize>::__f_ptr_type __f = &ios_base::width;
+ return _STLP_PRIV _Ios_Manip_1<streamsize>(__f, __n);
+}
+
+//----------------------------------------------------------------------
+// setfill, a manipulator that operates on basic_ios<> instead of ios_base.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT>
+struct _Setfill_Manip {
+ _Setfill_Manip(_CharT __c) : _M_c(__c) {}
+ _CharT _M_c;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _CharT2, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const _STLP_PRIV _Setfill_Manip<_CharT2>& __m) {
+ __os.fill(__m._M_c);
+ return __os;
+}
+
+template <class _CharT, class _CharT2, class _Traits>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is,
+ const _STLP_PRIV _Setfill_Manip<_CharT2>& __m) {
+ __is.fill(__m._M_c);
+ return __is;
+}
+
+template <class _CharT>
+inline _STLP_PRIV _Setfill_Manip<_CharT> _STLP_CALL setfill(_CharT __c)
+{ return _STLP_PRIV _Setfill_Manip<_CharT>(__c); }
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_IOMANIP */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ios.c b/6/sources/cxx-stl/stlport/stlport/stl/_ios.c
new file mode 100644
index 0000000..7dec77f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ios.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_IOS_C
+#define _STLP_IOS_C
+
+#ifndef _STLP_INTERNAL_IOS_H
+# include <stl/_ios.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUMPUNCT_H
+# include <stl/_numpunct.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// basic_ios<>'s non-inline member functions
+
+// Public constructor, taking a streambuf.
+template <class _CharT, class _Traits>
+basic_ios<_CharT, _Traits>
+ ::basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf)
+ : ios_base(), _M_cached_ctype(0),
+ _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) {
+ basic_ios<_CharT, _Traits>::init(__streambuf);
+}
+
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>*
+basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __buf) {
+ basic_streambuf<_CharT, _Traits>* __tmp = _M_streambuf;
+ _M_streambuf = __buf;
+ this->clear();
+ return __tmp;
+}
+
+template <class _CharT, class _Traits>
+basic_ios<_CharT, _Traits>&
+basic_ios<_CharT, _Traits>::copyfmt(const basic_ios<_CharT, _Traits>& __x) {
+ _M_invoke_callbacks(erase_event);
+ _M_copy_state(__x); // Inherited from ios_base.
+ _M_cached_ctype = __x._M_cached_ctype;
+ _M_fill = __x._M_fill;
+ _M_tied_ostream = __x._M_tied_ostream;
+ _M_invoke_callbacks(copyfmt_event);
+ this->_M_set_exception_mask(__x.exceptions());
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) {
+ locale __tmp = ios_base::imbue(__loc);
+ _STLP_TRY {
+ if (_M_streambuf)
+ _M_streambuf->pubimbue(__loc);
+
+ // no throwing here
+ _M_cached_ctype = &use_facet<ctype<char_type> >(__loc);
+ }
+ _STLP_CATCH_ALL {
+ __tmp = ios_base::imbue(__tmp);
+ _M_handle_exception(ios_base::failbit);
+ }
+ return __tmp;
+}
+
+// Protected constructor and initialization functions. The default
+// constructor creates an uninitialized basic_ios, and init() initializes
+// all of the members to the values in Table 89 of the C++ standard.
+
+template <class _CharT, class _Traits>
+basic_ios<_CharT, _Traits>::basic_ios()
+ : ios_base(),
+ _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0)
+{}
+
+template <class _CharT, class _Traits>
+void
+basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
+{
+ this->rdbuf(__sb);
+ this->imbue(locale());
+ this->tie(0);
+ this->_M_set_exception_mask(ios_base::goodbit);
+ this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit);
+ ios_base::flags(ios_base::skipws | ios_base::dec);
+ ios_base::width(0);
+ ios_base::precision(6);
+ this->fill(widen(' '));
+ // We don't need to worry about any of the three arrays: they are
+ // initialized correctly in ios_base's constructor.
+}
+
+// This is never called except from within a catch clause.
+template <class _CharT, class _Traits>
+void basic_ios<_CharT, _Traits>::_M_handle_exception(ios_base::iostate __flag)
+{
+ this->_M_setstate_nothrow(__flag);
+ if (this->_M_get_exception_mask() & __flag)
+ _STLP_RETHROW;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_IOS_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ios.h b/6/sources/cxx-stl/stlport/stlport/stl/_ios.h
new file mode 100644
index 0000000..20422f0
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ios.h
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_IOS_H
+#define _STLP_INTERNAL_IOS_H
+
+
+#ifndef _STLP_IOS_BASE_H
+# include <stl/_ios_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CTYPE_H
+# include <stl/_ctype.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUMPUNCT_H
+# include <stl/_numpunct.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// ----------------------------------------------------------------------
+
+// Class basic_ios, a subclass of ios_base. The only important difference
+// between the two is that basic_ios is a class template, parameterized
+// by the character type. ios_base exists to factor out all of the
+// common properties that don't depend on the character type.
+
+// The second template parameter, _Traits, defaults to char_traits<_CharT>.
+// The default is declared in header <iosfwd>, and it isn't declared here
+// because C++ language rules do not allow it to be declared twice.
+
+template <class _CharT, class _Traits>
+class basic_ios : public ios_base {
+ friend class ios_base;
+public: // Synonyms for types.
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+public: // Constructor, destructor.
+ explicit basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf);
+ virtual ~basic_ios() {}
+
+public: // Members from clause 27.4.4.2
+ basic_ostream<_CharT, _Traits>* tie() const {
+ return _M_tied_ostream;
+ }
+ basic_ostream<_CharT, _Traits>*
+ tie(basic_ostream<char_type, traits_type>* __new_tied_ostream) {
+ basic_ostream<char_type, traits_type>* __tmp = _M_tied_ostream;
+ _M_tied_ostream = __new_tied_ostream;
+ return __tmp;
+ }
+
+ basic_streambuf<_CharT, _Traits>* rdbuf() const
+ { return _M_streambuf; }
+
+ basic_streambuf<_CharT, _Traits>*
+ rdbuf(basic_streambuf<char_type, traits_type>*);
+
+ // Copies __x's state to *this.
+ basic_ios<_CharT, _Traits>& copyfmt(const basic_ios<_CharT, _Traits>& __x);
+
+ char_type fill() const { return _M_fill; }
+ char_type fill(char_type __fill) {
+ char_type __tmp(_M_fill);
+ _M_fill = __fill;
+ return __tmp;
+ }
+
+public: // Members from 27.4.4.3. These four functions
+ // can almost be defined in ios_base.
+
+ void clear(iostate __state = goodbit) {
+ _M_clear_nothrow(this->rdbuf() ? __state : iostate(__state|ios_base::badbit));
+ _M_check_exception_mask();
+ }
+ void setstate(iostate __state) { this->clear(rdstate() | __state); }
+
+ iostate exceptions() const { return this->_M_get_exception_mask(); }
+ void exceptions(iostate __mask) {
+ this->_M_set_exception_mask(__mask);
+ this->clear(this->rdstate());
+ }
+
+public: // Locale-related member functions.
+ locale imbue(const locale&);
+
+ inline char narrow(_CharT, char) const ;
+ inline _CharT widen(char) const;
+
+ // Helper function that makes testing for EOF more convenient.
+ static bool _STLP_CALL _S_eof(int_type __c) {
+ const int_type __eof = _Traits::eof();
+ return _Traits::eq_int_type(__c, __eof);
+ }
+
+protected:
+ // Cached copy of the curent locale's ctype facet. Set by init() and imbue().
+ const ctype<char_type>* _M_cached_ctype;
+
+public:
+ // Equivalent to &use_facet< Facet >(getloc()), but faster.
+ const ctype<char_type>* _M_ctype_facet() const { return _M_cached_ctype; }
+
+protected:
+ basic_ios();
+
+ void init(basic_streambuf<_CharT, _Traits>* __streambuf);
+
+public:
+
+ // Helper function used in istream and ostream. It is called only from
+ // a catch clause.
+ void _M_handle_exception(ios_base::iostate __flag);
+
+private: // Data members
+ char_type _M_fill; // The fill character, used for padding.
+
+ basic_streambuf<_CharT, _Traits>* _M_streambuf;
+ basic_ostream<_CharT, _Traits>* _M_tied_ostream;
+
+};
+
+
+template <class _CharT, class _Traits>
+inline char
+basic_ios<_CharT, _Traits>::narrow(_CharT __c, char __default) const
+{ return _M_ctype_facet()->narrow(__c, __default); }
+
+template <class _CharT, class _Traits>
+inline _CharT
+basic_ios<_CharT, _Traits>::widen(char __c) const
+{ return _M_ctype_facet()->widen(__c); }
+
+# if !defined (_STLP_NO_METHOD_SPECIALIZATION)
+_STLP_TEMPLATE_NULL
+inline char
+basic_ios<char, char_traits<char> >::narrow(char __c, char) const
+{
+ return __c;
+}
+
+_STLP_TEMPLATE_NULL
+inline char
+basic_ios<char, char_traits<char> >::widen(char __c) const
+{
+ return __c;
+}
+# endif /* _STLP_NO_METHOD_SPECIALIZATION */
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ios<char, char_traits<char> >;
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ios<wchar_t, char_traits<wchar_t> >;
+# endif
+# endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_ios.c>
+#endif
+
+#endif /* _STLP_IOS */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ios_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_ios_base.h
new file mode 100644
index 0000000..c9e10ad
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ios_base.h
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_IOS_BASE_H
+#define _STLP_IOS_BASE_H
+
+#ifndef _STLP_INTERNAL_STDEXCEPT_BASE
+# include <stl/_stdexcept_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_PAIR_H
+# include <stl/_pair.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LOCALE_H
+# include <stl/_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// ----------------------------------------------------------------------
+
+// Class ios_base. This is the base class of the ios hierarchy, which
+// includes basic_istream and basic_ostream. Classes in the ios
+// hierarchy are actually quite simple: they are just glorified
+// wrapper classes. They delegate buffering and physical character
+// manipulation to the streambuf classes, and they delegate most
+// formatting tasks to a locale.
+
+class _STLP_CLASS_DECLSPEC ios_base {
+public:
+
+ class _STLP_CLASS_DECLSPEC failure : public __Named_exception {
+ public:
+ explicit failure(const string&);
+ virtual ~failure() _STLP_NOTHROW_INHERENTLY;
+ };
+
+ typedef int fmtflags;
+ typedef int iostate;
+ typedef int openmode;
+ typedef int seekdir;
+
+# ifndef _STLP_NO_ANACHRONISMS
+ typedef fmtflags fmt_flags;
+# endif
+
+ // Formatting flags.
+ _STLP_STATIC_CONSTANT(int, left = 0x0001);
+ _STLP_STATIC_CONSTANT(int, right = 0x0002);
+ _STLP_STATIC_CONSTANT(int, internal = 0x0004);
+ _STLP_STATIC_CONSTANT(int, dec = 0x0008);
+ _STLP_STATIC_CONSTANT(int, hex = 0x0010);
+ _STLP_STATIC_CONSTANT(int, oct = 0x0020);
+ _STLP_STATIC_CONSTANT(int, fixed = 0x0040);
+ _STLP_STATIC_CONSTANT(int, scientific = 0x0080);
+ _STLP_STATIC_CONSTANT(int, boolalpha = 0x0100);
+ _STLP_STATIC_CONSTANT(int, showbase = 0x0200);
+ _STLP_STATIC_CONSTANT(int, showpoint = 0x0400);
+ _STLP_STATIC_CONSTANT(int, showpos = 0x0800);
+ _STLP_STATIC_CONSTANT(int, skipws = 0x1000);
+ _STLP_STATIC_CONSTANT(int, unitbuf = 0x2000);
+ _STLP_STATIC_CONSTANT(int, uppercase = 0x4000);
+ _STLP_STATIC_CONSTANT(int, adjustfield = left | right | internal);
+ _STLP_STATIC_CONSTANT(int, basefield = dec | hex | oct);
+ _STLP_STATIC_CONSTANT(int, floatfield = scientific | fixed);
+
+ // State flags.
+ _STLP_STATIC_CONSTANT(int, goodbit = 0x00);
+ _STLP_STATIC_CONSTANT(int, badbit = 0x01);
+ _STLP_STATIC_CONSTANT(int, eofbit = 0x02);
+ _STLP_STATIC_CONSTANT(int, failbit = 0x04);
+
+ // Openmode flags.
+ _STLP_STATIC_CONSTANT(int, __default_mode = 0x0); /* implementation detail */
+ _STLP_STATIC_CONSTANT(int, app = 0x01);
+ _STLP_STATIC_CONSTANT(int, ate = 0x02);
+ _STLP_STATIC_CONSTANT(int, binary = 0x04);
+ _STLP_STATIC_CONSTANT(int, in = 0x08);
+ _STLP_STATIC_CONSTANT(int, out = 0x10);
+ _STLP_STATIC_CONSTANT(int, trunc = 0x20);
+
+ // Seekdir flags
+ _STLP_STATIC_CONSTANT(int, beg = 0x01);
+ _STLP_STATIC_CONSTANT(int, cur = 0x02);
+ _STLP_STATIC_CONSTANT(int, end = 0x04);
+
+public: // Flag-manipulation functions.
+ fmtflags flags() const { return _M_fmtflags; }
+ fmtflags flags(fmtflags __flags) {
+ fmtflags __tmp = _M_fmtflags;
+ _M_fmtflags = __flags;
+ return __tmp;
+ }
+
+ fmtflags setf(fmtflags __flag) {
+ fmtflags __tmp = _M_fmtflags;
+ _M_fmtflags |= __flag;
+ return __tmp;
+ }
+ fmtflags setf(fmtflags __flag, fmtflags __mask) {
+ fmtflags __tmp = _M_fmtflags;
+ _M_fmtflags &= ~__mask;
+ _M_fmtflags |= __flag & __mask;
+ return __tmp;
+ }
+ void unsetf(fmtflags __mask) { _M_fmtflags &= ~__mask; }
+
+ streamsize precision() const { return _M_precision; }
+ streamsize precision(streamsize __newprecision) {
+ streamsize __tmp = _M_precision;
+ _M_precision = __newprecision;
+ return __tmp;
+ }
+
+ streamsize width() const { return _M_width; }
+ streamsize width(streamsize __newwidth) {
+ streamsize __tmp = _M_width;
+ _M_width = __newwidth;
+ return __tmp;
+ }
+
+public: // Locales
+ locale imbue(const locale&);
+ locale getloc() const { return _M_locale; }
+
+public: // Auxiliary storage.
+ static int _STLP_CALL xalloc();
+ long& iword(int __index);
+ void*& pword(int __index);
+
+public: // Destructor.
+ virtual ~ios_base();
+
+public: // Callbacks.
+ enum event { erase_event, imbue_event, copyfmt_event };
+ typedef void (*event_callback)(event, ios_base&, int __index);
+ void register_callback(event_callback __fn, int __index);
+
+public: // This member function affects only
+ // the eight predefined ios objects:
+ // cin, cout, etc.
+ static bool _STLP_CALL sync_with_stdio(bool __sync = true);
+
+public: // The C++ standard requires only that these
+ // member functions be defined in basic_ios.
+ // We define them in the non-template
+ // base class to avoid code duplication.
+ operator void*() const { return !fail() ? (void*) __CONST_CAST(ios_base*,this) : (void*) 0; }
+ bool operator!() const { return fail(); }
+
+ iostate rdstate() const { return _M_iostate; }
+
+ bool good() const { return _M_iostate == 0; }
+ bool eof() const { return (_M_iostate & eofbit) != 0; }
+ bool fail() const { return (_M_iostate & (failbit | badbit)) != 0; }
+ bool bad() const { return (_M_iostate & badbit) != 0; }
+
+protected: // The functional protected interface.
+
+ // Copies the state of __x to *this. This member function makes it
+ // possible to implement basic_ios::copyfmt without having to expose
+ // ios_base's private data members. Does not copy _M_exception_mask
+ // or _M_iostate.
+ void _M_copy_state(const ios_base& __x);
+
+ void _M_setstate_nothrow(iostate __state) { _M_iostate |= __state; }
+ void _M_clear_nothrow(iostate __state) { _M_iostate = __state; }
+ iostate _M_get_exception_mask() const { return _M_exception_mask; }
+ void _M_set_exception_mask(iostate __mask) { _M_exception_mask = __mask; }
+ void _M_check_exception_mask() {
+ if (_M_iostate & _M_exception_mask)
+ _M_throw_failure();
+ }
+
+ void _M_invoke_callbacks(event);
+ void _STLP_FUNCTION_THROWS _M_throw_failure();
+
+ ios_base(); // Default constructor.
+
+protected: // Initialization of the I/O system
+ static void _STLP_CALL _S_initialize();
+ static void _STLP_CALL _S_uninitialize();
+ static bool _S_is_synced;
+
+private: // Invalidate the copy constructor and
+ // assignment operator.
+ ios_base(const ios_base&);
+ void operator=(const ios_base&);
+
+private: // Data members.
+
+ fmtflags _M_fmtflags; // Flags
+ iostate _M_iostate;
+ openmode _M_openmode;
+ seekdir _M_seekdir;
+ iostate _M_exception_mask;
+
+ streamsize _M_precision;
+ streamsize _M_width;
+
+ locale _M_locale;
+
+ pair<event_callback, int>* _M_callbacks;
+ size_t _M_num_callbacks; // Size of the callback array.
+ size_t _M_callback_index; // Index of the next available callback;
+ // initially zero.
+
+ long* _M_iwords; // Auxiliary storage. The count is zero
+ size_t _M_num_iwords; // if and only if the pointer is null.
+
+ void** _M_pwords;
+ size_t _M_num_pwords;
+
+public:
+ // ----------------------------------------------------------------------
+ // Nested initializer class. This is an implementation detail, but it's
+ // prescribed by the standard. The static initializer object (on
+ // implementations where such a thing is required) is declared in
+ // <iostream>
+ class _STLP_CLASS_DECLSPEC Init
+ {
+ public:
+ Init();
+ ~Init();
+ private:
+ static long _S_count;
+ friend class ios_base;
+ };
+
+ friend class Init;
+
+public:
+# ifndef _STLP_NO_ANACHRONISMS
+ // 31.6 Old iostreams members [depr.ios.members]
+ typedef iostate io_state;
+ typedef openmode open_mode;
+ typedef seekdir seek_dir;
+ typedef _STLP_STD::streamoff streamoff;
+ typedef _STLP_STD::streampos streampos;
+# endif
+};
+
+// ----------------------------------------------------------------------
+// ios_base manipulator functions, from section 27.4.5 of the C++ standard.
+// All of them are trivial one-line wrapper functions.
+
+// fmtflag manipulators, section 27.4.5.1
+inline ios_base& _STLP_CALL boolalpha(ios_base& __s)
+ { __s.setf(ios_base::boolalpha); return __s;}
+
+inline ios_base& _STLP_CALL noboolalpha(ios_base& __s)
+ { __s.unsetf(ios_base::boolalpha); return __s;}
+
+inline ios_base& _STLP_CALL showbase(ios_base& __s)
+ { __s.setf(ios_base::showbase); return __s;}
+
+inline ios_base& _STLP_CALL noshowbase(ios_base& __s)
+ { __s.unsetf(ios_base::showbase); return __s;}
+
+inline ios_base& _STLP_CALL showpoint(ios_base& __s)
+ { __s.setf(ios_base::showpoint); return __s;}
+
+inline ios_base& _STLP_CALL noshowpoint(ios_base& __s)
+ { __s.unsetf(ios_base::showpoint); return __s;}
+
+inline ios_base& _STLP_CALL showpos(ios_base& __s)
+ { __s.setf(ios_base::showpos); return __s;}
+
+inline ios_base& _STLP_CALL noshowpos(ios_base& __s)
+ { __s.unsetf(ios_base::showpos); return __s;}
+
+inline ios_base& _STLP_CALL skipws(ios_base& __s)
+ { __s.setf(ios_base::skipws); return __s;}
+
+inline ios_base& _STLP_CALL noskipws(ios_base& __s)
+ { __s.unsetf(ios_base::skipws); return __s;}
+
+inline ios_base& _STLP_CALL uppercase(ios_base& __s)
+ { __s.setf(ios_base::uppercase); return __s;}
+
+inline ios_base& _STLP_CALL nouppercase(ios_base& __s)
+ { __s.unsetf(ios_base::uppercase); return __s;}
+
+inline ios_base& _STLP_CALL unitbuf(ios_base& __s)
+ { __s.setf(ios_base::unitbuf); return __s;}
+
+inline ios_base& _STLP_CALL nounitbuf(ios_base& __s)
+ { __s.unsetf(ios_base::unitbuf); return __s;}
+
+
+// adjustfield manipulators, section 27.4.5.2
+inline ios_base& _STLP_CALL internal(ios_base& __s)
+ { __s.setf(ios_base::internal, ios_base::adjustfield); return __s; }
+
+inline ios_base& _STLP_CALL left(ios_base& __s)
+ { __s.setf(ios_base::left, ios_base::adjustfield); return __s; }
+
+inline ios_base& _STLP_CALL right(ios_base& __s)
+ { __s.setf(ios_base::right, ios_base::adjustfield); return __s; }
+
+// basefield manipulators, section 27.4.5.3
+inline ios_base& _STLP_CALL dec(ios_base& __s)
+ { __s.setf(ios_base::dec, ios_base::basefield); return __s; }
+
+inline ios_base& _STLP_CALL hex(ios_base& __s)
+ { __s.setf(ios_base::hex, ios_base::basefield); return __s; }
+
+inline ios_base& _STLP_CALL oct(ios_base& __s)
+ { __s.setf(ios_base::oct, ios_base::basefield); return __s; }
+
+
+// floatfield manipulators, section 27.4.5.3
+inline ios_base& _STLP_CALL fixed(ios_base& __s)
+ { __s.setf(ios_base::fixed, ios_base::floatfield); return __s; }
+
+inline ios_base& _STLP_CALL scientific(ios_base& __s)
+ { __s.setf(ios_base::scientific, ios_base::floatfield); return __s; }
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_IOS_BASE */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ioserr.h b/6/sources/cxx-stl/stlport/stlport/stl/_ioserr.h
new file mode 100644
index 0000000..83ba877
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ioserr.h
@@ -0,0 +1,12 @@
+/*
+ * This file is included in every header that needs the STLport library to be
+ * built; the header files mostly are the iostreams-headers. The file checks for
+ * _STLP_USE_NO_IOSTREAMS or _STLP_NO_IOSTREAMS being not defined, so that the
+ * iostreams part of STLport cannot be used when the symbols were defined
+ * accidentally.
+ */
+#if defined (_STLP_NO_IOSTREAMS)
+# error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h).
+#elif defined (_STLP_USE_NO_IOSTREAMS )
+# error STLport iostreams header cannot be used; your compiler do not support it.
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iosfwd.h b/6/sources/cxx-stl/stlport/stlport/stl/_iosfwd.h
new file mode 100644
index 0000000..e31db31
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iosfwd.h
@@ -0,0 +1,159 @@
+#ifndef _STLP_INTERNAL_IOSFWD
+#define _STLP_INTERNAL_IOSFWD
+
+#if defined (__sgi) && !defined (__GNUC__) && !defined (_STANDARD_C_PLUS_PLUS)
+# error This header file requires the -LANG:std option
+#endif
+
+// This file provides forward declarations of the most important I/O
+// classes. Note that almost all of those classes are class templates,
+// with default template arguments. According to the C++ standard,
+// if a class template is declared more than once in the same scope
+// then only one of those declarations may have default arguments.
+
+// <iosfwd> contains the same declarations as other headers, and including
+// both <iosfwd> and (say) <iostream> is permitted. This means that only
+// one header may contain those default template arguments.
+
+// In this implementation, the declarations in <iosfwd> contain default
+// template arguments. All of the other I/O headers include <iosfwd>.
+
+#ifndef _STLP_CHAR_TRAITS_H
+# include <stl/char_traits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+class ios_base;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_ios;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_streambuf;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_istream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_ostream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_iostream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM( _Traits , char_traits<_CharT>),
+ _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
+class basic_stringbuf;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
+ _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
+class basic_istringstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
+ _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
+class basic_ostringstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
+ _STLP_DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
+class basic_stringstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_filebuf;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_ifstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_ofstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class basic_fstream;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class istreambuf_iterator;
+
+template <class _CharT, _STLP_DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
+class ostreambuf_iterator;
+
+typedef basic_ios<char, char_traits<char> > ios;
+
+#if !defined (_STLP_NO_WCHAR_T)
+typedef basic_ios<wchar_t, char_traits<wchar_t> > wios;
+#endif
+
+// Forward declaration of class locale, and of the most important facets.
+class locale;
+template <class _Facet>
+#if defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
+struct _Use_facet {
+ const locale& __loc;
+ _Use_facet(const locale& __p_loc) : __loc(__p_loc) {}
+ inline const _Facet& operator *() const;
+};
+# define use_facet *_Use_facet
+#else
+inline const _Facet& use_facet(const locale&);
+#endif
+
+template <class _CharT> class ctype;
+template <class _CharT> class ctype_byname;
+template <class _CharT> class collate;
+template <class _CharT> class collate_byname;
+
+_STLP_TEMPLATE_NULL class ctype<char>;
+_STLP_TEMPLATE_NULL class ctype_byname<char>;
+_STLP_TEMPLATE_NULL class collate<char>;
+_STLP_TEMPLATE_NULL class collate_byname<char>;
+
+#if !defined (_STLP_NO_WCHAR_T)
+_STLP_TEMPLATE_NULL class ctype<wchar_t>;
+_STLP_TEMPLATE_NULL class ctype_byname<wchar_t>;
+_STLP_TEMPLATE_NULL class collate<wchar_t>;
+_STLP_TEMPLATE_NULL class collate_byname<wchar_t>;
+#endif
+
+#if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 )
+// Typedefs for ordinary (narrow-character) streams.
+//_STLP_TEMPLATE_NULL class basic_streambuf<char, char_traits<char> >;
+#endif
+
+typedef basic_istream<char, char_traits<char> > istream;
+typedef basic_ostream<char, char_traits<char> > ostream;
+typedef basic_iostream<char, char_traits<char> > iostream;
+typedef basic_streambuf<char,char_traits<char> > streambuf;
+
+typedef basic_stringbuf<char, char_traits<char>, allocator<char> > stringbuf;
+typedef basic_istringstream<char, char_traits<char>, allocator<char> > istringstream;
+typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
+typedef basic_stringstream<char, char_traits<char>, allocator<char> > stringstream;
+
+typedef basic_filebuf<char, char_traits<char> > filebuf;
+typedef basic_ifstream<char, char_traits<char> > ifstream;
+typedef basic_ofstream<char, char_traits<char> > ofstream;
+typedef basic_fstream<char, char_traits<char> > fstream;
+
+#if !defined (_STLP_NO_WCHAR_T)
+// Typedefs for wide-character streams.
+typedef basic_streambuf<wchar_t, char_traits<wchar_t> > wstreambuf;
+typedef basic_istream<wchar_t, char_traits<wchar_t> > wistream;
+typedef basic_ostream<wchar_t, char_traits<wchar_t> > wostream;
+typedef basic_iostream<wchar_t, char_traits<wchar_t> > wiostream;
+
+typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringbuf;
+typedef basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wistringstream;
+typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wostringstream;
+typedef basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstringstream;
+
+typedef basic_filebuf<wchar_t, char_traits<wchar_t> > wfilebuf;
+typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream;
+typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream;
+typedef basic_fstream<wchar_t, char_traits<wchar_t> > wfstream;
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iostream_string.h b/6/sources/cxx-stl/stlport/stlport/stl/_iostream_string.h
new file mode 100644
index 0000000..87656a4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iostream_string.h
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+ /*
+ * This is an internal string for the STLport own iostream implementation.
+ * The only diference rely on the allocator used to instanciate the basic_string.
+ * Its goals is to improve performance limitating the number of dynamic allocation
+ * that could occur when requesting a big float ouput for instance. This allocator
+ * is not standard conformant as it has an internal state (the static buffer)
+ */
+
+
+#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H
+#define _STLP_INTERNAL_IOSTREAM_STRING_H
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif /* _STLP_INTERNAL_ALLOC_H */
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif /* _STLP_INTERNAL_STRING_H */
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT>
+class __iostring_allocator : public allocator<_CharT> {
+public:
+ enum { _STR_SIZE = 256 };
+
+private:
+ enum { _BUF_SIZE = _STR_SIZE + 1 };
+ typedef allocator<_CharT> _Base;
+ _CharT _M_static_buf[_BUF_SIZE];
+
+public:
+ typedef typename _Base::size_type size_type;
+ typedef typename _Base::pointer pointer;
+#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+ template <class _Tp1> struct rebind {
+# if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300)
+ typedef __iostring_allocator<_Tp1> other;
+# else
+ typedef _STLP_PRIV __iostring_allocator<_Tp1> other;
+# endif
+ };
+#endif
+
+ _CharT* allocate(size_type __n, const void* __ptr = 0) {
+ if (__n > _BUF_SIZE) {
+ return _Base::allocate(__n, __ptr);
+ }
+ return _M_static_buf;
+ }
+ void deallocate(pointer __p, size_type __n) {
+ if (__p != _M_static_buf) _Base::deallocate(__p, __n);
+ }
+};
+
+#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) || !defined (_STLP_MEMBER_TEMPLATES)
+/*
+ * As the __iostring_allocator allocator will only be used in the basic_string implementation
+ * we known that it is never going to be bound to another type that the one used to instantiate
+ * the basic_string. This is why the associated __stl_alloc_rebind has only one template
+ * parameter.
+ */
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Tp>
+inline _STLP_PRIV __iostring_allocator<_Tp>& _STLP_CALL
+__stl_alloc_rebind(_STLP_PRIV __iostring_allocator<_Tp>& __a, const _Tp*)
+{ return __a; }
+template <class _Tp>
+inline _STLP_PRIV __iostring_allocator<_Tp> _STLP_CALL
+__stl_alloc_create(const _STLP_PRIV __iostring_allocator<_Tp>&, const _Tp*)
+{ return _STLP_PRIV __iostring_allocator<_Tp>(); }
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE */
+
+#if !defined (_STLP_DEBUG)
+template <class _CharT>
+struct __basic_iostring : public basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > {
+ /*
+ * A consequence of the non standard conformant allocator is that a string using it
+ * must always be presized to the allocator static buffer size because the basic_string implementation
+ * do not manage an allocator returning always the same memory adress as long as the
+ * requested memory block size is under a certain value.
+ */
+ typedef __basic_iostring<_CharT> _Self;
+ typedef basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > _Base;
+ typedef typename _Base::_Reserve_t _Reserve_t;
+
+ __basic_iostring() : _Base(_Reserve_t(), __iostring_allocator<_CharT>::_STR_SIZE)
+ {}
+
+ _Self& operator=(const _CharT* __s) {
+ _Base::operator=(__s);
+ return *this;
+ }
+};
+
+typedef __basic_iostring<char> __iostring;
+
+# if !defined (_STLP_NO_WCHAR_T)
+typedef __basic_iostring<wchar_t> __iowstring;
+# endif
+
+# define _STLP_BASIC_IOSTRING(_CharT) _STLP_PRIV __basic_iostring<_CharT>
+
+#else
+
+typedef string __iostring;
+# if !defined (_STLP_NO_WCHAR_T)
+typedef wstring __iowstring;
+# endif
+
+# define _STLP_BASIC_IOSTRING(_CharT) basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >
+
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_IOSTREAM_STRING_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_istream.c b/6/sources/cxx-stl/stlport/stlport/stl/_istream.c
new file mode 100644
index 0000000..ab327b2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_istream.c
@@ -0,0 +1,1429 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_ISTREAM_C
+#define _STLP_ISTREAM_C
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUM_GET_H
+# include <stl/_num_get.h>
+#endif
+
+#if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+// no wchar_t is supported for this mode
+# define __BIS_int_type__ int
+# define __BIS_pos_type__ streampos
+# define __BIS_off_type__ streamoff
+#else
+# define __BIS_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::int_type
+# define __BIS_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::pos_type
+# define __BIS_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::off_type
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Function object structs used by some member functions.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Traits>
+struct _Is_not_wspace {
+ typedef typename _Traits::char_type argument_type;
+ typedef bool result_type;
+
+ const ctype<argument_type>* _M_ctype;
+
+ _Is_not_wspace(const ctype<argument_type>* __c_type) : _M_ctype(__c_type) {}
+ bool operator()(argument_type __c) const
+ { return !_M_ctype->is(ctype_base::space, __c); }
+};
+
+template <class _Traits>
+struct _Is_wspace_null {
+ typedef typename _Traits::char_type argument_type;
+ typedef bool result_type;
+
+ const ctype<argument_type>* _M_ctype;
+
+ _Is_wspace_null(const ctype<argument_type>* __c_type) : _M_ctype(__c_type) {}
+ bool operator()(argument_type __c) const {
+ return _Traits::eq(__c, argument_type()) ||
+ _M_ctype->is(ctype_base::space, __c);
+ }
+};
+
+template <class _Traits>
+struct _Scan_for_wspace {
+ typedef typename _Traits::char_type char_type;
+ typedef char_type* first_argument_type;
+ typedef char_type* second_argument_type;
+ typedef char_type* result_type;
+
+ const ctype<char_type>* _M_ctype;
+
+ _Scan_for_wspace(const ctype<char_type>* __ctype) : _M_ctype(__ctype) {}
+ const char_type*
+ operator()(const char_type* __first, const char_type* __last) const {
+ return _M_ctype->scan_is(ctype_base::space, __first, __last);
+ }
+};
+
+template <class _Traits>
+struct _Scan_wspace_null {
+ typedef typename _Traits::char_type char_type;
+ typedef char_type* first_argument_type;
+ typedef char_type* second_argument_type;
+ typedef char_type* result_type;
+
+ const ctype<char_type>* _M_ctype;
+
+ _Scan_wspace_null(const ctype<char_type>* __c_type) : _M_ctype(__c_type) {}
+ const char_type*
+ operator()(const char_type* __first, const char_type* __last) const {
+ __last = find_if(__first, __last,
+ _Eq_char_bound<_Traits>(char_type()));
+ return _M_ctype->scan_is(ctype_base::space, __first, __last);
+ }
+};
+
+template <class _Traits>
+struct _Scan_for_not_wspace {
+ typedef typename _Traits::char_type char_type;
+ typedef char_type* first_argument_type;
+ typedef char_type* second_argument_type;
+ typedef char_type* result_type;
+
+ const ctype<char_type>* _M_ctype;
+
+ _Scan_for_not_wspace(const ctype<char_type>* __c_type) : _M_ctype(__c_type) {}
+ const char_type*
+ operator()(const char_type* __first, const char_type* __last) const {
+ return _M_ctype->scan_not(ctype_base::space, __first, __last);
+ }
+};
+
+template <class _Traits>
+struct _Scan_for_char_val {
+ typedef typename _Traits::char_type char_type;
+ typedef char_type* first_argument_type;
+ typedef char_type* second_argument_type;
+ typedef char_type* result_type;
+
+ char_type _M_val;
+
+ _Scan_for_char_val(char_type __val) : _M_val(__val) {}
+
+ const char_type*
+ operator()(const char_type* __first, const char_type* __last) const {
+ return find_if(__first, __last, _Eq_char_bound<_Traits>(_M_val));
+ }
+};
+
+template <class _Traits>
+struct _Scan_for_int_val {
+ typedef typename _Traits::char_type char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef char_type* first_argument_type;
+ typedef char_type* second_argument_type;
+ typedef char_type* result_type;
+
+ int_type _M_val;
+
+ _Scan_for_int_val(int_type __val) : _M_val(__val) {}
+
+ const char_type*
+ operator()(const char_type* __first, const char_type* __last) const {
+ return find_if(__first, __last,
+ _Eq_int_bound<_Traits>(_M_val));
+ }
+};
+
+// Helper function: try to push back a character to a streambuf,
+// return true if the pushback succeeded. Does not throw.
+
+template <class _CharT, class _Traits>
+bool _STLP_CALL
+__pushback(basic_streambuf<_CharT, _Traits>* __buf, _CharT __c) {
+ bool ret;
+ _STLP_TRY {
+ const typename _Traits::int_type __eof = _Traits::eof();
+ ret = !_Traits::eq_int_type(__buf->sputbackc(__c), __eof);
+ }
+ _STLP_CATCH_ALL {
+ ret = false;
+ }
+ return ret;
+}
+
+//----------------------------------------------------------------------
+// Definitions of basic_istream<>'s noninline member functions.
+
+// Helper function for formatted input of numbers.
+template <class _CharT, class _Traits, class _Number>
+ios_base::iostate _STLP_CALL
+__get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val) {
+ typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry;
+ ios_base::iostate __err = 0;
+ _Sentry __sentry( __that ); // Skip whitespace.
+ if (__sentry) {
+ typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > _Num_get;
+ _STLP_TRY {
+ // Do not remove additional parenthesis around use_facet instanciation, some compilers (VC6)
+ // require it when building the library.
+ (use_facet<_Num_get>(__that.getloc())).get(istreambuf_iterator<_CharT, _Traits>(__that.rdbuf()),
+ 0, __that, __err, __val);
+ }
+ _STLP_CATCH_ALL {
+ __that._M_handle_exception(ios_base::badbit);
+ }
+ if (__err) __that.setstate(__err);
+ }
+ return __err;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (short& __val) {
+ long __lval;
+ _STLP_PRIV __get_num(*this, __lval);
+ if ( this->fail() ) {
+ return *this;
+ }
+ short __tmp = __STATIC_CAST(short, __lval);
+ unsigned short __uval = __STATIC_CAST(unsigned short, __lval);
+ // check if we lose digits
+ // if ((__val != __lval) && ((unsigned short)__val != __lval))
+ if ((__tmp != __lval) && ((long)__uval != __lval))
+ this->setstate(ios_base::failbit);
+ else
+ __val = __tmp;
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (int& __val) {
+ long __lval;
+ _STLP_PRIV __get_num(*this, __lval);
+ if ( this->fail() ) {
+ return *this;
+ }
+ int __tmp = __lval;
+ unsigned int __uval = __lval;
+ // check if we lose digits
+ // if ((__val != __lval) && ((unsigned int)__val != __lval))
+ if ((__tmp != __lval) && ((long)__uval != __lval))
+ this->setstate(ios_base::failbit);
+ else
+ __val = __tmp;
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (unsigned short& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (unsigned int& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (long& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (unsigned long& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+#if defined (_STLP_LONG_LONG)
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (_STLP_LONG_LONG& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (unsigned _STLP_LONG_LONG& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+#endif
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (float& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (double& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+#if !defined (_STLP_NO_LONG_DOUBLE)
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (long double& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+#endif
+#if !defined (_STLP_NO_BOOL)
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (bool& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+#endif
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::operator>> (void*& __val) {
+ _STLP_PRIV __get_num(*this, __val);
+ return *this;
+}
+
+// Unformatted input
+
+template <class _CharT, class _Traits>
+__BIS_int_type__
+basic_istream<_CharT, _Traits>::peek() {
+ typename _Traits::int_type __tmp = _Traits::eof();
+
+ this->_M_gcount = 0;
+ sentry __sentry(*this, _No_Skip_WS());
+
+ if (__sentry) {
+ _STLP_TRY {
+ __tmp = this->rdbuf()->sgetc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ if (this->_S_eof(__tmp))
+ this->setstate(ios_base::eofbit);
+ }
+
+ return __tmp;
+}
+
+
+template <class _CharT, class _Traits>
+__BIS_int_type__
+basic_istream<_CharT, _Traits>::get() {
+ typename _Traits::int_type __tmp = _Traits::eof();
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ _STLP_TRY {
+ __tmp = this->rdbuf()->sbumpc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (!this->_S_eof(__tmp))
+ this->_M_gcount = 1;
+ }
+
+ if (_M_gcount == 0)
+ this->setstate(ios_base::eofbit | ios_base::failbit);
+
+ return __tmp;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::get(_CharT& __c) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ typename _Traits::int_type __tmp = _Traits::eof();
+ _STLP_TRY {
+ __tmp = this->rdbuf()->sbumpc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (!this->_S_eof(__tmp)) {
+ this->_M_gcount = 1;
+ __c = _Traits::to_char_type(__tmp);
+ }
+ }
+
+ if (this->_M_gcount == 0)
+ this->setstate(ios_base::eofbit | ios_base::failbit);
+
+ return *this;
+}
+
+
+// Read characters and discard them. The standard specifies a single
+// function with two arguments, each with a default. We instead use
+// three overloded functions, because it's possible to implement the
+// first two more efficiently than the fully general third version.
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::ignore() {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ int_type __c;
+ _STLP_TRY {
+ __c = this->rdbuf()->sbumpc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ return *this;
+ }
+
+ if (!this->_S_eof(__c))
+ this->_M_gcount = 1;
+ else
+ this->setstate(ios_base::eofbit);
+ }
+
+ return *this;
+}
+
+// Putback
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::putback(_CharT __c) {
+ this->_M_gcount = 0;
+ sentry __sentry(*this, _No_Skip_WS());
+
+ if (__sentry) {
+ typename _Traits::int_type __tmp = _Traits::eof();
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+// if (!__buf || this->_S_eof(__buf->sputbackc(__c)))
+ if (__buf) {
+ _STLP_TRY {
+ __tmp = __buf->sputbackc(__c);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ }
+ if (this->_S_eof(__tmp))
+ this->setstate(ios_base::badbit);
+ }
+ else
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::unget() {
+ this->_M_gcount = 0;
+
+ sentry __sentry(*this, _No_Skip_WS());
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ // if (!__buf || _Traits::eq_int_type(__buf->sungetc(), _Traits::eof()))
+ if (__buf) {
+ _STLP_TRY {
+ if (this->_S_eof(__buf->sungetc()))
+ this->setstate(ios_base::badbit);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ } else
+ this->setstate(ios_base::badbit);
+ }
+ else
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+// Positioning and buffer control.
+
+template <class _CharT, class _Traits>
+int basic_istream<_CharT, _Traits>::sync() {
+ sentry __sentry(*this, _No_Skip_WS());
+
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ if (__buf) {
+ if (__buf->pubsync() == -1) {
+ this->setstate(ios_base::badbit);
+ return -1;
+ }
+ else
+ return 0;
+ }
+ else
+ return -1;
+}
+
+template <class _CharT, class _Traits>
+__BIS_pos_type__
+basic_istream<_CharT, _Traits>::tellg() {
+ sentry __sentry(*this, _No_Skip_WS());
+
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ return (__buf && !this->fail()) ? __buf->pubseekoff(0, ios_base::cur, ios_base::in)
+ : pos_type(-1);
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::seekg(pos_type __pos) {
+ sentry __sentry(*this, _No_Skip_WS());
+
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ if (!this->fail() && __buf) {
+ if (__buf->pubseekpos(__pos, ios_base::in) == pos_type(-1)) {
+ this->setstate(ios_base::failbit);
+ }
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir) {
+ sentry __sentry(*this, _No_Skip_WS());
+
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ if (!this->fail() && __buf)
+ __buf->pubseekoff(__off, __dir, ios_base::in);
+ return *this;
+}
+
+// Formatted input of characters and character arrays.
+
+template <class _CharT, class _Traits>
+void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT& __c) {
+// typename _Traits::int_type __tmp = _Traits::eof();
+
+ sentry __sentry(*this); // Skip whitespace.
+
+ if (__sentry) {
+ typename _Traits::int_type __tmp;// = _Traits::eof();
+
+ _STLP_TRY {
+ __tmp = this->rdbuf()->sbumpc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ return;
+ }
+
+ if (!this->_S_eof(__tmp))
+ __c = _Traits::to_char_type(__tmp);
+ else
+ this->setstate(ios_base::eofbit | ios_base::failbit);
+ }
+}
+
+
+//---------------------------------------------------------------------------
+// istream's helper functions.
+
+// A generic function for unbuffered input. We stop when we reach EOF,
+// or when we have extracted _Num characters, or when the function object
+// __is_delim return true. In the last case, it extracts the character
+// for which __is_delim is true, if and only if __extract_delim is true.
+// It appends a null character to the end of the string; this means that
+// it may store up to _Num + 1 characters.
+//
+// __is_getline governs two corner cases: reading _Num characters without
+// encountering delim or eof (in which case failbit is set if __is_getline
+// is true); and reading _Num characters where the _Num+1'st character is
+// eof (in which case eofbit is set if __is_getline is true).
+//
+// It is assumed that __is_delim never throws.
+//
+// Return value is the number of characters extracted, including the
+// delimiter if it is extracted. Note that the number of characaters
+// extracted isn't necessarily the same as the number stored.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template < class _CharT, class _Traits, class _Is_Delim>
+streamsize _STLP_CALL
+__read_unbuffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf,
+ streamsize _Num, _CharT* __s,
+ _Is_Delim __is_delim,
+ bool __extract_delim, bool __append_null,
+ bool __is_getline)
+{
+ streamsize __n = 0;
+ ios_base::iostate __status = 0;
+
+ typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
+ // The operations that can potentially throw are sbumpc, snextc, and sgetc.
+ _STLP_TRY {
+ for (;;) {
+ if (__n == _Num) {
+ if (__is_getline) // didn't find delimiter as one of the _Num chars
+ __status |= ios_base::failbit;
+ break;
+ }
+ int_type __c = __buf->sbumpc(); // sschwarz
+
+ if (__that->_S_eof(__c)) {
+ if (__n < _Num || __is_getline)
+ __status |= ios_base::eofbit;
+ break;
+ } else if (__is_delim(_Traits::to_char_type(__c))) {
+ if (__extract_delim) { // Extract and discard current character.
+ ++__n;
+ } else if ( !__pushback(__buf, _Traits::to_char_type(__c)) ) { // leave delimiter
+ __status |= ios_base::failbit;
+ }
+ break;
+ }
+ // regular character
+ *__s++ = _Traits::to_char_type(__c);
+ ++__n;
+ }
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ return __n;
+ }
+
+ if (__append_null)
+ *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ if (__status)
+ __that->setstate(__status); // This might throw.
+ return __n;
+}
+
+// Much like __read_unbuffered, but with one additional function object:
+// __scan_delim(first, last) returns the first pointer p in [first, last)
+// such that __is_delim(p) is true.
+
+template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
+streamsize _STLP_CALL
+__read_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf,
+ streamsize _Num, _CharT* __s,
+ _Is_Delim __is_delim, _Scan_Delim __scan_delim,
+ bool __extract_delim, bool __append_null,
+ bool __is_getline) {
+ streamsize __n = 0;
+ ios_base::iostate __status = 0;
+ bool __done = false;
+
+ _STLP_TRY {
+ while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) {
+ const _CharT* __first = __buf->_M_gptr();
+ const _CharT* __last = __buf->_M_egptr();
+ //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation
+ //is larger than ptrdiff_t one.
+ _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) ||
+ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed))
+ ptrdiff_t __request = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()), _Num - __n));
+
+ const _CharT* __p = __scan_delim(__first, __last);
+ ptrdiff_t __chunk = (min) (ptrdiff_t(__p - __first), __request);
+ _Traits::copy(__s, __first, __chunk);
+ __s += __chunk;
+ __n += __chunk;
+ __buf->_M_gbump((int)__chunk);
+
+ // We terminated by finding delim.
+ if (__p != __last && __p - __first <= __request) {
+ if (__extract_delim) {
+ __n += 1;
+ __buf->_M_gbump(1);
+ }
+ __done = true;
+ }
+
+ // We terminated by reading all the characters we were asked for.
+ else if (__n == _Num) {
+
+ // Find out if we have reached eof. This matters for getline.
+ if (__is_getline) {
+ if (__chunk == __last - __first) {
+ if (__that->_S_eof(__buf->sgetc()))
+ __status |= ios_base::eofbit;
+ }
+ else
+ __status |= ios_base::failbit;
+ }
+ __done = true;
+ }
+
+ // The buffer contained fewer than _Num - __n characters. Either we're
+ // at eof, or we should refill the buffer and try again.
+ else {
+ if (__that->_S_eof(__buf->sgetc())) {
+ __status |= ios_base::eofbit;
+ __done = true;
+ }
+ }
+ } // Close the while loop.
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ __done = true;
+ }
+
+ if (__done) {
+ if (__append_null)
+ *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ if (__status != 0)
+ __that->setstate(__status); // This might throw.
+ return __n;
+ }
+
+ // If execution has reached this point, then we have an empty buffer but
+ // we have not reached eof. What that means is that the streambuf has
+ // decided to switch from buffered to unbuffered input. We switch to
+ // to __read_unbuffered.
+
+ return __n + __read_unbuffered(__that, __buf, _Num - __n, __s, __is_delim,
+ __extract_delim,__append_null,__is_getline);
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::get(_CharT* __s, streamsize __n,
+ _CharT __delim) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ if (__n > 0) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+
+ if (__buf->egptr() != __buf->gptr())
+ this->_M_gcount =
+ _STLP_PRIV __read_buffered(this, __buf, __n - 1, __s,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ _STLP_PRIV _Scan_for_char_val<_Traits>(__delim),
+ false, true, false);
+ else
+ this->_M_gcount =
+ _STLP_PRIV __read_unbuffered(this, __buf, __n - 1, __s,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ false, true, false);
+ }
+ }
+
+ if (this->_M_gcount == 0)
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+// Getline is essentially identical to get, except that it extracts
+// the delimiter.
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::getline(_CharT* __s, streamsize __n,
+ _CharT __delim) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ if (__n > 0) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ this->_M_gcount = __buf->egptr() != __buf->gptr()
+ ? _STLP_PRIV __read_buffered(this, __buf, __n - 1, __s,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ _STLP_PRIV _Scan_for_char_val<_Traits>(__delim),
+ true, true, true)
+ : _STLP_PRIV __read_unbuffered(this, __buf, __n - 1, __s,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ true, true, true);
+ }
+ }
+
+ if (this->_M_gcount == 0)
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+// Read n characters. We don't look for any delimiter, and we don't
+// put in a terminating null character.
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry && !this->eof()) {
+ basic_streambuf<_CharT, _Traits>*__buf = this->rdbuf();
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount
+ = _STLP_PRIV __read_buffered(this, __buf, __n, __s,
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ _STLP_PRIV _Project2nd<const _CharT*, const _CharT*>(),
+ false, false, false);
+ else
+ _M_gcount
+ = _STLP_PRIV __read_unbuffered(this, __buf, __n, __s,
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ false, false, false);
+ }
+ else
+ this->setstate(ios_base::failbit);
+
+ if (this->eof())
+ this->setstate(ios_base::eofbit | ios_base::failbit);
+
+ return *this;
+}
+
+
+// Read n or fewer characters. We don't look for any delimiter, and
+// we don't put in a terminating null character.
+template <class _CharT, class _Traits>
+streamsize
+basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __nmax) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry && !this->eof() && __nmax >= 0) {
+
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ streamsize __avail = __buf->in_avail();
+
+ // fbp : isn't full-blown setstate required here ?
+ if (__avail == -1)
+ this->_M_setstate_nothrow(ios_base::eofbit);
+
+ else if (__avail != 0) {
+
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount
+ = _STLP_PRIV __read_buffered(this, __buf, (min) (__avail, __nmax), __s,
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ _STLP_PRIV _Project2nd<const _CharT*, const _CharT*>(),
+ false, false, false);
+ else
+ _M_gcount
+ = _STLP_PRIV __read_unbuffered(this, __buf, (min) (__avail, __nmax), __s,
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ false, false, false);
+ }
+ }
+ else {
+ // fbp : changed so that failbit is set only there, to pass Dietmar's test
+ if (this->eof())
+ this->setstate(ios_base::eofbit | ios_base::failbit);
+ else
+ this->setstate(ios_base::failbit);
+ }
+
+ // if (this->eof())
+ // this->setstate(ios_base::eofbit | ios_base::failbit);
+
+ return _M_gcount;
+}
+
+template <class _CharT, class _Traits>
+void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT* __s) {
+ sentry __sentry(*this); // Skip whitespace.
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ streamsize __nmax = this->width() > 0
+ ? this->width() - 1
+ : ((numeric_limits<streamsize>::max)() / sizeof(_CharT)) - 1;
+
+ streamsize __n = __buf->gptr() != __buf->egptr()
+ ? _STLP_PRIV __read_buffered(this, __buf, __nmax, __s,
+ _STLP_PRIV _Is_wspace_null<_Traits>(this->_M_ctype_facet()),
+ _STLP_PRIV _Scan_wspace_null<_Traits>(this->_M_ctype_facet()),
+ false, true, false)
+ : _STLP_PRIV __read_unbuffered(this, __buf, __nmax, __s,
+ _STLP_PRIV _Is_wspace_null<_Traits>(this->_M_ctype_facet()),
+ false, true, false);
+ if (__n == 0)
+ this->setstate(ios_base::failbit);
+ }
+ this->width(0);
+}
+
+// A generic unbuffered function for ignoring characters. We stop
+// when we reach EOF, or when the function object __is_delim returns
+// true. In the last case, it extracts the character for which
+// __is_delim is true, if and only if __extract_delim is true.
+
+template < class _CharT, class _Traits, class _Is_Delim>
+void _STLP_CALL
+_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that,
+ basic_streambuf<_CharT, _Traits>* __buf,
+ _Is_Delim __is_delim,
+ bool __extract_delim, bool __set_failbit) {
+ bool __done = false;
+ ios_base::iostate __status = 0;
+ typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
+
+ _STLP_TRY {
+ while (!__done) {
+ int_type __c = __buf->sbumpc();
+
+ if (__that->_S_eof(__c)) {
+ __done = true;
+ __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit
+ : ios_base::eofbit;
+ }
+
+ else if (__is_delim(_Traits::to_char_type(__c))) {
+ __done = true;
+ if (!__extract_delim)
+ if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c))))
+ __status |= ios_base::failbit;
+ }
+ }
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ }
+
+ __that->setstate(__status);
+}
+
+// A generic buffered function for ignoring characters. Much like
+// _M_ignore_unbuffered, but with one additional function object:
+// __scan_delim(first, last) returns the first pointer p in [first,
+// last) such that __is_delim(p) is true.
+
+template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
+void _STLP_CALL
+_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that,
+ basic_streambuf<_CharT, _Traits>* __buf,
+ _Is_Delim __is_delim, _Scan_Delim __scan_delim,
+ bool __extract_delim, bool __set_failbit) {
+ bool __at_eof = false;
+ bool __found_delim = false;
+
+ _STLP_TRY {
+ while (__buf->_M_egptr() != __buf->_M_gptr() && !__at_eof && !__found_delim) {
+ const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr());
+ __buf->_M_gbump((int)(__p - __buf->_M_gptr()));
+
+ if (__p != __buf->_M_egptr()) { // We found delim, so we're done.
+ if (__extract_delim)
+ __buf->_M_gbump(1);
+ __found_delim = true;
+ }
+
+ else // No delim. Try to refil the buffer.
+ __at_eof = __that->_S_eof(__buf->sgetc());
+ } // Close the while loop.
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ return;
+ }
+
+ if (__at_eof) {
+ __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit
+ : ios_base::eofbit);
+ return;
+ }
+ if (__found_delim)
+ return;
+
+ // If execution has reached this point, then we have an empty buffer but
+ // we have not reached eof. What that means is that the streambuf has
+ // decided to switch from a buffered to an unbuffered mode. We switch
+ // to _M_ignore_unbuffered.
+ _M_ignore_unbuffered(__that, __buf, __is_delim, __extract_delim, __set_failbit);
+}
+
+// Overloaded versions of _M_ignore_unbuffered and _M_ignore_unbuffered
+// with an explicit count _Num. Return value is the number of
+// characters extracted.
+//
+// The function object __max_chars takes two arguments, _Num and __n
+// (the latter being the number of characters we have already read),
+// and returns the maximum number of characters to read from the buffer.
+// We parameterize _M_ignore_buffered so that we can use it for both
+// bounded and unbounded input; for the former the function object should
+// be minus<>, and for the latter it should return a constant maximum value.
+
+template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim>
+streamsize _STLP_CALL
+_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that,
+ basic_streambuf<_CharT, _Traits>* __buf,
+ streamsize _Num, _Max_Chars __max_chars,
+ _Is_Delim __is_delim,
+ bool __extract_delim, bool __set_failbit) {
+ streamsize __n = 0;
+ ios_base::iostate __status = 0;
+ typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
+
+ _STLP_TRY {
+ while (__max_chars(_Num, __n) > 0) {
+ int_type __c = __buf->sbumpc();
+
+ if (__that->_S_eof(__c)) {
+ __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit
+ : ios_base::eofbit;
+ break;
+ }
+
+ else if (__is_delim(_Traits::to_char_type(__c))) {
+ if (__extract_delim)
+ ++__n;
+ else if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c))))
+ __status |= ios_base::failbit;
+
+ break;
+ }
+ // fbp : added counter increment to pass Dietmar's test
+ ++__n;
+ }
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (__status)
+ __that->setstate(__status); // This might throw.
+ return __n;
+}
+
+template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim, class _Scan_Delim>
+streamsize _STLP_CALL
+_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that,
+ basic_streambuf<_CharT, _Traits>* __buf,
+ streamsize _Num,
+ _Max_Chars __max_chars,
+ _Is_Delim __is_delim, _Scan_Delim __scan_delim,
+ bool __extract_delim, bool __set_failbit) {
+ streamsize __n = 0;
+ bool __at_eof = false;
+ bool __done = false;
+
+ _STLP_TRY {
+ while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) {
+ ptrdiff_t __avail = __buf->_M_egptr() - __buf->_M_gptr();
+ streamsize __m = __max_chars(_Num, __n);
+
+ if (__avail >= __m) { // We have more characters than we need.
+ const _CharT* __last = __buf->_M_gptr() + __STATIC_CAST(ptrdiff_t, __m);
+ const _CharT* __p = __scan_delim(__buf->_M_gptr(), __last);
+ ptrdiff_t __chunk = __p - __buf->_M_gptr();
+ __n += __chunk;
+ __buf->_M_gbump((int)__chunk);
+
+ if (__extract_delim && __p != __last) {
+ __n += 1;
+ __buf->_M_gbump(1);
+ }
+
+ __done = true;
+ }
+
+ else {
+ const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr());
+ ptrdiff_t __chunk = __p - __buf->_M_gptr();
+ __n += __chunk;
+ __buf->_M_gbump((int)__chunk);
+
+ if (__p != __buf->_M_egptr()) { // We found delim.
+ if (__extract_delim) {
+ __n += 1;
+ __buf->_M_gbump(1);
+ }
+
+ __done = true;
+ }
+
+ // We didn't find delim. Try to refill the buffer.
+ else if (__that->_S_eof(__buf->sgetc())) {
+ __done = true;
+ __at_eof = true;
+ }
+ }
+ } // Close the while loop.
+ }
+ _STLP_CATCH_ALL {
+ __that->_M_handle_exception(ios_base::badbit);
+ return __n;
+ }
+
+ if (__at_eof)
+ __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit
+ : ios_base::eofbit);
+
+ if (__done)
+ return __n;
+
+ // If execution has reached this point, then we have an empty buffer but
+ // we have not reached eof. What that means is that the streambuf has
+ // decided to switch from buffered to unbuffered input. We switch to
+ // to _M_ignore_unbuffered.
+
+ return __n + _M_ignore_unbuffered(__that, __buf, _Num, __max_chars,
+ __is_delim, __extract_delim, __set_failbit);
+}
+
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::ignore(streamsize __n) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
+ typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize> _Const_streamsize;
+ const streamsize __maxss = (numeric_limits<streamsize>::max)();
+
+ if (__n == (numeric_limits<int>::max)()) {
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount = _M_ignore_buffered(this, __buf,
+ __maxss, _Const_streamsize(__maxss),
+ _Const_bool(false),
+ _STLP_PRIV _Project2nd<const _CharT*, const _CharT*>(),
+ false, false);
+ else
+ _M_gcount = _M_ignore_unbuffered(this, __buf,
+ __maxss, _Const_streamsize(__maxss),
+ _Const_bool(false), false, false);
+ }
+ else {
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount = _M_ignore_buffered(this, __buf,
+ __n, minus<streamsize>(),
+ _Const_bool(false),
+ _STLP_PRIV _Project2nd<const _CharT*, const _CharT*>(),
+ false, false);
+ else
+ _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus<streamsize>(),
+ _Const_bool(false), false, false);
+ }
+ }
+
+ return *this;
+}
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
+ typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize>
+ _Const_streamsize;
+ const streamsize __maxss = (numeric_limits<streamsize>::max)();
+
+ if (__n == (numeric_limits<int>::max)()) {
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount = _M_ignore_buffered(this, __buf,
+ __maxss, _Const_streamsize(__maxss),
+ _STLP_PRIV _Eq_int_bound<_Traits>(__delim),
+ _STLP_PRIV _Scan_for_int_val<_Traits>(__delim),
+ true, false);
+ else
+ _M_gcount = _M_ignore_unbuffered(this, __buf,
+ __maxss, _Const_streamsize(__maxss),
+ _STLP_PRIV _Eq_int_bound<_Traits>(__delim),
+ true, false);
+ }
+ else {
+ if (__buf->gptr() != __buf->egptr())
+ _M_gcount = _M_ignore_buffered(this, __buf,
+ __n, minus<streamsize>(),
+ _STLP_PRIV _Eq_int_bound<_Traits>(__delim),
+ _STLP_PRIV _Scan_for_int_val<_Traits>(__delim),
+ true, false);
+ else
+ _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus<streamsize>(),
+ _STLP_PRIV _Eq_int_bound<_Traits>(__delim),
+ true, false);
+ }
+ }
+
+ return *this;
+}
+
+// This member function does not construct a sentry object, because
+// it is called from sentry's constructor.
+template <class _CharT, class _Traits>
+void basic_istream<_CharT, _Traits>::_M_skip_whitespace(bool __set_failbit) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+ if (!__buf)
+ this->setstate(ios_base::badbit);
+ else if (__buf->gptr() != __buf->egptr())
+ _M_ignore_buffered(this, __buf,
+ _STLP_PRIV _Is_not_wspace<_Traits>(this->_M_ctype_facet()),
+ _STLP_PRIV _Scan_for_not_wspace<_Traits>(this->_M_ctype_facet()),
+ false, __set_failbit);
+ else
+ _M_ignore_unbuffered(this, __buf,
+ _STLP_PRIV _Is_not_wspace<_Traits>(this->_M_ctype_facet()),
+ false, __set_failbit);
+}
+
+
+// This is a very simple loop that reads characters from __src and puts
+// them into __dest. It looks complicated because of the (standard-
+// mandated) exception handling policy.
+//
+// We stop when we get an exception, when we fail to insert into the
+// output streambuf, or when __is_delim is true.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template < class _CharT, class _Traits, class _Is_Delim>
+streamsize _STLP_CALL
+__copy_unbuffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src,
+ basic_streambuf<_CharT, _Traits>* __dest,
+ _Is_Delim __is_delim,
+ bool __extract_delim, bool __rethrow) {
+ streamsize __extracted = 0;
+ ios_base::iostate __status = 0;
+ typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
+ int_type __c;
+
+ _STLP_TRY {
+ for (;;) {
+ // Get a character. If there's an exception, catch and (maybe) rethrow it.
+ __c = __src->sbumpc();
+
+ // If we failed to get a character, then quit.
+ if (__that->_S_eof(__c)) {
+ __status |= ios_base::eofbit;
+ break;
+ }
+ // If it's the delimiter, then quit.
+ else if (__is_delim(_Traits::to_char_type(__c))) {
+ if (!__extract_delim && !__pushback(__src, _Traits::to_char_type(__c)))
+ __status |= ios_base::failbit;
+ break;
+ }
+ else {
+ // Try to put the character in the output streambuf.
+ bool __failed = false;
+ _STLP_TRY {
+ if (!__that->_S_eof(__dest->sputc(_Traits::to_char_type(__c))))
+ ++__extracted;
+ else
+ __failed = true;
+ }
+ _STLP_CATCH_ALL {
+ __failed = true;
+ }
+
+ // If we failed to put the character in the output streambuf, then
+ // try to push it back to the input streambuf.
+ if (__failed && !__pushback(__src, _Traits::to_char_type(__c)))
+ __status |= ios_base::failbit;
+
+ // fbp : avoiding infinite loop in io-27-6-1-2-3.exp
+ if (__failed)
+ break;
+ }
+
+ } /* for (;;) */
+
+ }
+ // fbp : this try/catch moved here in reasonable assumption
+ // __is_delim never throw (__pushback is guaranteed not to)
+ _STLP_CATCH_ALL {
+ // See 27.6.1.2.3, paragraph 13.
+ if (__rethrow && __extracted == 0)
+ __that->_M_handle_exception(ios_base::failbit);
+ }
+ __that->setstate(__status);
+ return __extracted;
+}
+
+// Buffered copying from one streambuf to another. We copy the characters
+// in chunks, rather than one at a time. We still have to worry about all
+// of the error conditions we checked in __copy_unbuffered, plus one more:
+// the streambuf might decide to switch from a buffered to an unbuffered mode.
+
+template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
+streamsize _STLP_CALL
+__copy_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src,
+ basic_streambuf<_CharT, _Traits>* __dest,
+ _Scan_Delim __scan_delim, _Is_Delim __is_delim,
+ bool __extract_delim, bool __rethrow) {
+ streamsize __extracted = 0;
+ ios_base::iostate __status = 0;
+ typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
+ //Borland compiler generates a warning if assignment because value is never used:
+ int_type __c /*= _Traits::eof()*/;
+ _CharT* __first = __src->_M_gptr();
+ ptrdiff_t __avail = __src->_M_egptr() - __first;
+ // fbp : introduced to move catch/try blocks out of the loop
+ bool __do_handle_exceptions = false;
+
+ _STLP_TRY {
+ for (;;) {
+ const _CharT* __last = __scan_delim(__first, __src->_M_egptr());
+
+ // Try to copy the entire input buffer to the output buffer.
+ streamsize __n = __dest->sputn(__first, __extract_delim && __last != __src->_M_egptr()
+ ? (__last - __first) + 1
+ : (__last - __first));
+ __src->_M_gbump((int)__n);
+ __extracted += __n;
+
+ // from this on, catch() will call _M_handle_exceptions()
+ __do_handle_exceptions = true;
+
+ if (__n < __avail) // We found the delimiter, or else failed to
+ break; // copy some characters.
+
+ __c = __src->sgetc();
+
+ // Three possibilities: we succeeded in refilling the buffer, or
+ // we got EOF, or the streambuf has switched to unbuffered mode.
+ __first = __src->_M_gptr();
+ __avail = __src->_M_egptr() - __first;
+
+ if (__avail > 0)
+ {} // dwa 1/16/00 -- suppress a Metrowerks warning
+ else if (__that->_S_eof(__c)) {
+ __status |= ios_base::eofbit;
+ break;
+ }
+ else {
+ return __extracted + __copy_unbuffered(__that, __src, __dest, __is_delim,
+ __extract_delim, __rethrow);
+ }
+
+ __do_handle_exceptions = false;
+ }
+ }
+
+ _STLP_CATCH_ALL {
+ // See 27.6.1.2.3, paragraph 13.
+ if (__rethrow && __do_handle_exceptions && __extracted == 0)
+ __that->_M_handle_exception(ios_base::failbit);
+ }
+
+ if (__status)
+ __that->setstate(__status); // This might throw.
+ return __extracted;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>
+ ::get(basic_streambuf<_CharT, _Traits>& __dest, _CharT __delim) {
+ sentry __sentry(*this, _No_Skip_WS());
+ this->_M_gcount = 0;
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __src = this->rdbuf();
+
+ if (__src)
+ this->_M_gcount = __src->egptr() != __src->gptr()
+ ? _STLP_PRIV __copy_buffered(this, __src, &__dest,
+ _STLP_PRIV _Scan_for_char_val<_Traits>(__delim),
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ false, false)
+ : _STLP_PRIV __copy_unbuffered(this, __src, &__dest,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__delim),
+ false, false);
+ }
+
+ if (this->_M_gcount == 0)
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+// Copying characters into a streambuf.
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>&
+basic_istream<_CharT, _Traits>
+ ::operator>>(basic_streambuf<_CharT, _Traits>* __dest) {
+ streamsize __n = 0;
+ typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry;
+ _Sentry __sentry(*this);
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __src = this->rdbuf();
+ if (__src && __dest)
+ __n = __src->egptr() != __src->gptr()
+ ? _STLP_PRIV __copy_buffered(this, __src, __dest,
+ _STLP_PRIV _Project2nd<const _CharT*, const _CharT*>(),
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ false, true)
+ : _STLP_PRIV __copy_unbuffered(this, __src, __dest,
+ _STLP_PRIV _Constant_unary_fun<bool, int_type>(false),
+ false, true);
+ }
+
+ if (__n == 0)
+ this->setstate(ios_base::failbit);
+
+ return *this;
+}
+
+// ----------------------------------------------------------------
+// basic_iostream<> class
+// ----------------------------------------------------------------
+
+template <class _CharT, class _Traits>
+basic_iostream<_CharT, _Traits>
+ ::basic_iostream(basic_streambuf<_CharT, _Traits>* __buf)
+ : basic_ios<_CharT, _Traits>(),
+ basic_istream<_CharT, _Traits>(__buf),
+ basic_ostream<_CharT, _Traits>(__buf) {
+ this->init(__buf);
+}
+
+template <class _CharT, class _Traits>
+basic_iostream<_CharT, _Traits>::~basic_iostream()
+{}
+
+_STLP_END_NAMESPACE
+
+#undef __BIS_int_type__
+#undef __BIS_pos_type__
+#undef __BIS_off_type__
+
+#endif /* _STLP_ISTREAM_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_istream.h b/6/sources/cxx-stl/stlport/stlport/stl/_istream.h
new file mode 100644
index 0000000..6b38d03
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_istream.h
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_ISTREAM
+#define _STLP_INTERNAL_ISTREAM
+
+// this block is included by _ostream.h, we include it here to lower #include level
+#if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_INTERNAL_CWCHAR)
+# include <stl/_cwchar.h>
+#endif
+
+#ifndef _STLP_INTERNAL_IOS_H
+# include <stl/_ios.h> // For basic_ios<>. Includes <iosfwd>.
+#endif
+
+#ifndef _STLP_INTERNAL_OSTREAM_H
+# include <stl/_ostream.h> // Needed as a base class of basic_iostream.
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+# include <stl/_istreambuf_iterator.h>
+#endif
+
+#include <stl/_ctraits_fns.h> // Helper functions that allow char traits
+ // to be used as function objects.
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+template <class _CharT, class _Traits>
+class _Isentry;
+#endif
+
+struct _No_Skip_WS {}; // Dummy class used by sentry.
+
+template <class _CharT, class _Traits>
+bool _M_init_skip(basic_istream<_CharT, _Traits>& __istr);
+template <class _CharT, class _Traits>
+bool _M_init_noskip(basic_istream<_CharT, _Traits>& __istr);
+
+//----------------------------------------------------------------------
+// Class basic_istream, a class that performs formatted input through
+// a stream buffer.
+
+// The second template parameter, _Traits, defaults to char_traits<_CharT>.
+// The default is declared in header <iosfwd>, and it isn't declared here
+// because C++ language rules do not allow it to be declared twice.
+
+template <class _CharT, class _Traits>
+class basic_istream : virtual public basic_ios<_CharT, _Traits> {
+ typedef basic_istream<_CharT, _Traits> _Self;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ //explicitely defined as private to avoid warnings:
+ basic_istream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+
+public:
+ // Types
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+
+ typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&);
+ typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&);
+ typedef _Self& (_STLP_CALL *__istream_fn)(_Self&);
+
+public: // Constructor and destructor.
+ explicit basic_istream(basic_streambuf<_CharT, _Traits>* __buf) :
+ basic_ios<_CharT, _Traits>(), _M_gcount(0) {
+ this->init(__buf);
+ }
+ ~basic_istream() {};
+
+public: // Nested sentry class.
+
+public: // Hooks for manipulators. The arguments are
+ // function pointers.
+ _Self& operator>> (__istream_fn __f) { return __f(*this); }
+ _Self& operator>> (__ios_fn __f) { __f(*this); return *this; }
+ _Self& operator>> (__ios_base_fn __f) { __f(*this); return *this; }
+
+public: // Formatted input of numbers.
+ _Self& operator>> (short& __val);
+ _Self& operator>> (int& __val);
+ _Self& operator>> (unsigned short& __val);
+ _Self& operator>> (unsigned int& __val);
+ _Self& operator>> (long& __val);
+ _Self& operator>> (unsigned long& __val);
+#ifdef _STLP_LONG_LONG
+ _Self& operator>> (_STLP_LONG_LONG& __val);
+ _Self& operator>> (unsigned _STLP_LONG_LONG& __val);
+#endif
+ _Self& operator>> (float& __val);
+ _Self& operator>> (double& __val);
+# ifndef _STLP_NO_LONG_DOUBLE
+ _Self& operator>> (long double& __val);
+# endif
+# ifndef _STLP_NO_BOOL
+ _Self& operator>> (bool& __val);
+# endif
+ _Self& operator>> (void*& __val);
+
+public: // Copying characters into a streambuf.
+ _Self& operator>>(basic_streambuf<_CharT, _Traits>*);
+
+public: // Unformatted input.
+ streamsize gcount() const { return _M_gcount; }
+ int_type peek();
+
+public: // get() for single characters
+ int_type get();
+ _Self& get(char_type& __c);
+
+public: // get() for character arrays.
+ _Self& get(char_type* __s, streamsize __n, char_type __delim);
+ _Self& get(char_type* __s, streamsize __n)
+ { return get(__s, __n, this->widen('\n')); }
+
+public: // get() for streambufs
+ _Self& get(basic_streambuf<_CharT, _Traits>& __buf,
+ char_type __delim);
+ _Self& get(basic_streambuf<_CharT, _Traits>& __buf)
+ { return get(__buf, this->widen('\n')); }
+
+public: // getline()
+ _Self& getline(char_type* __s, streamsize __n, char_type delim);
+ _Self& getline(char_type* __s, streamsize __n)
+ { return getline(__s, __n, this->widen('\n')); }
+
+public: // read(), readsome(), ignore()
+ _Self& ignore();
+ _Self& ignore(streamsize __n);
+ _Self& ignore(streamsize __n, int_type __delim);
+
+ _Self& read(char_type* __s, streamsize __n);
+ streamsize readsome(char_type* __s, streamsize __n);
+
+public: // putback
+ _Self& putback(char_type __c);
+ _Self& unget();
+
+public: // Positioning and buffer control.
+ int sync();
+
+ pos_type tellg();
+ _Self& seekg(pos_type __pos);
+ _Self& seekg(off_type, ios_base::seekdir);
+
+public: // Helper functions for non-member extractors.
+ void _M_formatted_get(_CharT& __c);
+ void _M_formatted_get(_CharT* __s);
+ void _M_skip_whitespace(bool __set_failbit);
+
+private: // Number of characters extracted by the
+ streamsize _M_gcount; // most recent unformatted input function.
+
+public:
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+ // If we are using DLL specs, we have not to use inner classes
+ // end class declaration here
+ typedef _Isentry<_CharT, _Traits> sentry;
+};
+# define sentry _Isentry
+template <class _CharT, class _Traits>
+class _Isentry {
+ typedef _Isentry<_CharT, _Traits> _Self;
+# else
+ class sentry {
+ typedef sentry _Self;
+#endif
+
+ private:
+ const bool _M_ok;
+ // basic_streambuf<_CharT, _Traits>* _M_buf;
+
+ public:
+ typedef _Traits traits_type;
+
+ explicit sentry(basic_istream<_CharT, _Traits>& __istr,
+ bool __noskipws = false) :
+ _M_ok((__noskipws || !(__istr.flags() & ios_base::skipws)) ? _M_init_noskip(__istr) : _M_init_skip(__istr) )
+ /* , _M_buf(__istr.rdbuf()) */
+ {}
+
+ // Calling this constructor is the same as calling the previous one with
+ // __noskipws = true, except that it doesn't require a runtime test.
+ sentry(basic_istream<_CharT, _Traits>& __istr, _No_Skip_WS) : /* _M_buf(__istr.rdbuf()), */
+ _M_ok(_M_init_noskip(__istr)) {}
+
+ ~sentry() {}
+
+ operator bool() const { return _M_ok; }
+
+ private: // Disable assignment and copy constructor.
+ //Implementation is here only to avoid warning with some compilers.
+ sentry(const _Self&) : _M_ok(false) {}
+ _Self& operator=(const _Self&) { return *this; }
+ };
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+# undef sentry
+# else
+ // close basic_istream class definition here
+};
+# endif
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _Isentry<char, char_traits<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_istream<char, char_traits<char> >;
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS _Isentry<wchar_t, char_traits<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_istream<wchar_t, char_traits<wchar_t> >;
+# endif
+# endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+// Non-member character and string extractor functions.
+template <class _CharT, class _Traits>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __in_str, _CharT& __c) {
+ __in_str._M_formatted_get(__c);
+ return __in_str;
+}
+
+template <class _Traits>
+inline basic_istream<char, _Traits>& _STLP_CALL
+operator>>(basic_istream<char, _Traits>& __in_str, unsigned char& __c) {
+ __in_str._M_formatted_get(__REINTERPRET_CAST(char&,__c));
+ return __in_str;
+}
+
+template <class _Traits>
+inline basic_istream<char, _Traits>& _STLP_CALL
+operator>>(basic_istream<char, _Traits>& __in_str, signed char& __c) {
+ __in_str._M_formatted_get(__REINTERPRET_CAST(char&,__c));
+ return __in_str;
+}
+
+template <class _CharT, class _Traits>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __in_str, _CharT* __s) {
+ __in_str._M_formatted_get(__s);
+ return __in_str;
+}
+
+template <class _Traits>
+inline basic_istream<char, _Traits>& _STLP_CALL
+operator>>(basic_istream<char, _Traits>& __in_str, unsigned char* __s) {
+ __in_str._M_formatted_get(__REINTERPRET_CAST(char*,__s));
+ return __in_str;
+}
+
+template <class _Traits>
+inline basic_istream<char, _Traits>& _STLP_CALL
+operator>>(basic_istream<char, _Traits>& __in_str, signed char* __s) {
+ __in_str._M_formatted_get(__REINTERPRET_CAST(char*,__s));
+ return __in_str;
+}
+
+//----------------------------------------------------------------------
+// istream manipulator.
+template <class _CharT, class _Traits>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+ws(basic_istream<_CharT, _Traits>& __istr) {
+ if (!__istr.eof()) {
+ typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry;
+ _Sentry __sentry(__istr, _No_Skip_WS()); // Don't skip whitespace.
+ if (__sentry)
+ __istr._M_skip_whitespace(false);
+ }
+ return __istr;
+}
+
+// Helper functions for istream<>::sentry constructor.
+template <class _CharT, class _Traits>
+inline bool _M_init_skip(basic_istream<_CharT, _Traits>& __istr) {
+ if (__istr.good()) {
+ if (__istr.tie())
+ __istr.tie()->flush();
+
+ __istr._M_skip_whitespace(true);
+ }
+
+ if (!__istr.good()) {
+ __istr.setstate(ios_base::failbit);
+ return false;
+ } else
+ return true;
+}
+
+template <class _CharT, class _Traits>
+inline bool _M_init_noskip(basic_istream<_CharT, _Traits>& __istr) {
+ if (__istr.good()) {
+ if (__istr.tie())
+ __istr.tie()->flush();
+
+ if (!__istr.rdbuf())
+ __istr.setstate(ios_base::badbit);
+ }
+ else
+ __istr.setstate(ios_base::failbit);
+ return __istr.good();
+}
+
+//----------------------------------------------------------------------
+// Class iostream.
+template <class _CharT, class _Traits>
+class basic_iostream
+ : public basic_istream<_CharT, _Traits>,
+ public basic_ostream<_CharT, _Traits>
+{
+public:
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+
+ explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __buf);
+ virtual ~basic_iostream();
+};
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_iostream<char, char_traits<char> >;
+
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_iostream<wchar_t, char_traits<wchar_t> >;
+# endif
+# endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& __istr)
+{ return __istr.rdbuf(); }
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_istream.c>
+#endif
+
+#endif /* _STLP_INTERNAL_ISTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_istreambuf_iterator.h b/6/sources/cxx-stl/stlport/stlport/stl/_istreambuf_iterator.h
new file mode 100644
index 0000000..9f340cb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_istreambuf_iterator.h
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+#define _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// defined in _istream.h
+template <class _CharT, class _Traits>
+extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& ) ;
+
+// We do not read any characters until operator* is called. operator* calls sgetc
+// unless the iterator is unchanged from the last call in which case a cached value is
+// used. Calls to operator++ use sbumpc.
+
+template<class _CharT, class _Traits>
+class istreambuf_iterator :
+ public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT&>
+{
+public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename _Traits::int_type int_type;
+ typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+ typedef basic_istream<_CharT, _Traits> istream_type;
+
+ typedef input_iterator_tag iterator_category;
+ typedef _CharT value_type;
+ typedef typename _Traits::off_type difference_type;
+ typedef const _CharT* pointer;
+ typedef const _CharT& reference;
+
+public:
+ istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); }
+ // istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) { this->_M_init(_M_get_istreambuf(__is)); }
+ inline istreambuf_iterator(basic_istream<_CharT, _Traits>& __is);
+
+ char_type operator*() const { this->_M_getc(); return _M_c; }
+ istreambuf_iterator<_CharT, _Traits>& operator++() {
+ _M_buf->sbumpc();
+ _M_have_c = false;
+ return *this;
+ }
+ istreambuf_iterator<_CharT, _Traits> operator++(int);
+
+ bool equal(const istreambuf_iterator<_CharT, _Traits>& __i) const {
+ if (this->_M_buf)
+ this->_M_getc();
+ if (__i._M_buf)
+ __i._M_getc();
+ return this->_M_eof == __i._M_eof;
+ }
+
+private:
+ void _M_init(streambuf_type* __p) {
+ _M_buf = __p;
+ _M_eof = (__p == 0);
+ _M_have_c = false;
+ }
+
+ void _M_getc() const {
+ if (_M_have_c)
+ return;
+ int_type __c = _M_buf->sgetc();
+ _STLP_MUTABLE(_Self, _M_c) = traits_type::to_char_type(__c);
+ _STLP_MUTABLE(_Self, _M_eof) = traits_type::eq_int_type(__c, traits_type::eof());
+ _STLP_MUTABLE(_Self, _M_have_c) = true;
+ }
+
+private:
+ streambuf_type* _M_buf;
+ mutable _CharT _M_c;
+ mutable bool _M_eof;
+ mutable bool _M_have_c;
+};
+
+template<class _CharT, class _Traits>
+inline istreambuf_iterator<_CharT, _Traits>::istreambuf_iterator(basic_istream<_CharT, _Traits>& __is)
+{ this->_M_init(_M_get_istreambuf(__is)); }
+
+template<class _CharT, class _Traits>
+inline bool _STLP_CALL operator==(const istreambuf_iterator<_CharT, _Traits>& __x,
+ const istreambuf_iterator<_CharT, _Traits>& __y) {
+ return __x.equal(__y);
+}
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template<class _CharT, class _Traits>
+inline bool _STLP_CALL operator!=(const istreambuf_iterator<_CharT, _Traits>& __x,
+ const istreambuf_iterator<_CharT, _Traits>& __y) {
+ return !__x.equal(__y);
+}
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator<char, char_traits<char> >;
+# if defined (INSTANTIATE_WIDE_STREAMS)
+_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator<wchar_t, char_traits<wchar_t> >;
+# endif
+# endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+template <class _CharT, class _Traits>
+inline input_iterator_tag _STLP_CALL iterator_category(const istreambuf_iterator<_CharT, _Traits>&) { return input_iterator_tag(); }
+template <class _CharT, class _Traits>
+inline streamoff* _STLP_CALL
+distance_type(const istreambuf_iterator<_CharT, _Traits>&) { return (streamoff*)0; }
+template <class _CharT, class _Traits>
+inline _CharT* _STLP_CALL value_type(const istreambuf_iterator<_CharT, _Traits>&) { return (_CharT*)0; }
+# endif
+
+template <class _CharT, class _Traits>
+istreambuf_iterator<_CharT, _Traits>
+istreambuf_iterator<_CharT, _Traits>::operator++(int) {
+ _M_getc(); // __tmp should avoid any future actions under
+ // underlined buffer---during call of operator *()
+ // (due to buffer for *this and __tmp are the same).
+ istreambuf_iterator<_CharT, _Traits> __tmp = *this;
+ _M_buf->sbumpc();
+ _M_have_c = false;
+ return __tmp;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iterator.h b/6/sources/cxx-stl/stlport/stlport/stl/_iterator.h
new file mode 100644
index 0000000..8e3b7b0
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iterator.h
@@ -0,0 +1,265 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+#define _STLP_INTERNAL_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+// This is the new version of reverse_iterator, as defined in the
+// draft C++ standard. It relies on the iterator_traits template,
+// which in turn relies on partial specialization. The class
+// reverse_bidirectional_iterator is no longer part of the draft
+// standard, but it is retained for backward compatibility.
+
+template <class _Iterator>
+class reverse_iterator :
+ public iterator<typename iterator_traits<_Iterator>::iterator_category,
+ typename iterator_traits<_Iterator>::value_type,
+ typename iterator_traits<_Iterator>::difference_type,
+ typename iterator_traits<_Iterator>::pointer,
+ typename iterator_traits<_Iterator>::reference> {
+protected:
+ _Iterator current;
+ typedef reverse_iterator<_Iterator> _Self;
+public:
+ typedef typename iterator_traits<_Iterator>::difference_type difference_type;
+ // pointer type required for arrow operator hidden behind _STLP_DEFINE_ARROW_OPERATOR:
+ typedef typename iterator_traits<_Iterator>::pointer pointer;
+ typedef typename iterator_traits<_Iterator>::reference reference;
+ typedef _Iterator iterator_type;
+public:
+ reverse_iterator() {}
+ explicit reverse_iterator(iterator_type __x) : current(__x) {}
+ reverse_iterator(const _Self& __x) : current(__x.current) {}
+ _Self& operator = (const _Self& __x) { current = __x.base(); return *this; }
+# if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Iter>
+ reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) {}
+ template <class _Iter>
+ _Self& operator = (const reverse_iterator<_Iter>& __x) { current = __x.base(); return *this; }
+# endif /* _STLP_MEMBER_TEMPLATES */
+
+ iterator_type base() const { return current; }
+ reference operator*() const {
+ _Iterator __tmp = current;
+ return *--__tmp;
+ }
+ _STLP_DEFINE_ARROW_OPERATOR
+ _Self& operator++() {
+ --current;
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ --current;
+ return __tmp;
+ }
+ _Self& operator--() {
+ ++current;
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ ++current;
+ return __tmp;
+ }
+
+ _Self operator+(difference_type __n) const { return _Self(current - __n); }
+ _Self& operator+=(difference_type __n) {
+ current -= __n;
+ return *this;
+ }
+ _Self operator-(difference_type __n) const { return _Self(current + __n); }
+ _Self& operator-=(difference_type __n) {
+ current += __n;
+ return *this;
+ }
+ reference operator[](difference_type __n) const { return *(*this + __n); }
+};
+
+template <class _Iterator>
+inline bool _STLP_CALL operator==(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return __x.base() == __y.base(); }
+
+template <class _Iterator>
+inline bool _STLP_CALL operator<(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return __y.base() < __x.base(); }
+
+# if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+template <class _Iterator>
+inline bool _STLP_CALL operator!=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return !(__x == __y); }
+
+template <class _Iterator>
+inline bool _STLP_CALL operator>(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return __y < __x; }
+
+template <class _Iterator>
+inline bool _STLP_CALL operator<=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return !(__y < __x); }
+
+template <class _Iterator>
+inline bool _STLP_CALL operator>=(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return !(__x < __y); }
+# endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _Iterator>
+# if defined (__SUNPRO_CC)
+inline ptrdiff_t _STLP_CALL
+# else
+inline typename reverse_iterator<_Iterator>::difference_type _STLP_CALL
+# endif
+operator-(const reverse_iterator<_Iterator>& __x,
+ const reverse_iterator<_Iterator>& __y)
+{ return __y.base() - __x.base(); }
+
+template <class _Iterator, class _DifferenceType>
+inline reverse_iterator<_Iterator> _STLP_CALL
+operator+(_DifferenceType n,const reverse_iterator<_Iterator>& x)
+{ return x.operator+(n); }
+#endif
+
+template <class _Container>
+class back_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void> {
+ typedef back_insert_iterator<_Container> _Self;
+protected:
+ //c is a Standard name (24.4.2.1), do no make it STLport naming convention compliant.
+ _Container *container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+
+ explicit back_insert_iterator(_Container& __x) : container(&__x) {}
+
+ _Self& operator=(const _Self& __other) {
+ container = __other.container;
+ return *this;
+ }
+ _Self& operator=(const typename _Container::value_type& __val) {
+ container->push_back(__val);
+ return *this;
+ }
+ _Self& operator*() { return *this; }
+ _Self& operator++() { return *this; }
+ _Self operator++(int) { return *this; }
+};
+
+template <class _Container>
+inline back_insert_iterator<_Container> _STLP_CALL back_inserter(_Container& __x)
+{ return back_insert_iterator<_Container>(__x); }
+
+template <class _Container>
+class front_insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void> {
+ typedef front_insert_iterator<_Container> _Self;
+protected:
+ //c is a Standard name (24.4.2.3), do no make it STLport naming convention compliant.
+ _Container *container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ explicit front_insert_iterator(_Container& __x) : container(&__x) {}
+
+ _Self& operator=(const _Self& __other) {
+ container = __other.container;
+ return *this;
+ }
+ _Self& operator=(const typename _Container::value_type& __val) {
+ container->push_front(__val);
+ return *this;
+ }
+ _Self& operator*() { return *this; }
+ _Self& operator++() { return *this; }
+ _Self operator++(int) { return *this; }
+};
+
+template <class _Container>
+inline front_insert_iterator<_Container> _STLP_CALL front_inserter(_Container& __x)
+{ return front_insert_iterator<_Container>(__x); }
+
+template <class _Container>
+class insert_iterator
+ : public iterator<output_iterator_tag, void, void, void, void> {
+ typedef insert_iterator<_Container> _Self;
+protected:
+ //container is a Standard name (24.4.2.5), do no make it STLport naming convention compliant.
+ _Container *container;
+ typename _Container::iterator _M_iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
+ : container(&__x), _M_iter(__i) {}
+
+ _Self& operator=(_Self const& __other) {
+ container = __other.container;
+ _M_iter = __other._M_iter;
+ return *this;
+ }
+ _Self& operator=(const typename _Container::value_type& __val) {
+ _M_iter = container->insert(_M_iter, __val);
+ ++_M_iter;
+ return *this;
+ }
+ _Self& operator*() { return *this; }
+ _Self& operator++() { return *this; }
+ _Self& operator++(int) { return *this; }
+};
+
+template <class _Container, class _Iterator>
+inline insert_iterator<_Container> _STLP_CALL
+inserter(_Container& __x, _Iterator __i) {
+ typedef typename _Container::iterator __iter;
+ return insert_iterator<_Container>(__x, __iter(__i));
+}
+
+_STLP_END_NAMESPACE
+
+#if ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+# include <stl/_iterator_old.h>
+#endif
+
+#endif /* _STLP_INTERNAL_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h
new file mode 100644
index 0000000..ef59048
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iterator_base.h
@@ -0,0 +1,525 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+#define _STLP_INTERNAL_ITERATOR_BASE_H
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+//# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
+//_STLP_BEGIN_NAMESPACE
+//using namespace _STLP_VENDOR_CSTD;
+//_STLP_END_NAMESPACE
+//#endif /* _STLP_IMPORT_VENDOR_CSTD */
+
+#if !defined(_STLP_USE_OLD_HP_ITERATOR_QUERIES) && !defined(_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+# endif
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+struct input_iterator_tag {};
+struct output_iterator_tag {};
+struct forward_iterator_tag : public input_iterator_tag {};
+struct bidirectional_iterator_tag : public forward_iterator_tag {};
+struct random_access_iterator_tag : public bidirectional_iterator_tag {};
+
+template <class _Category, class _Tp, _STLP_DFL_TMPL_PARAM(_Distance,ptrdiff_t),
+ _STLP_DFL_TMPL_PARAM(_Pointer,_Tp*), _STLP_DFL_TMPL_PARAM(_Reference,_Tp&) >
+struct iterator {
+ typedef _Category iterator_category;
+ typedef _Tp value_type;
+ typedef _Distance difference_type;
+ typedef _Pointer pointer;
+ typedef _Reference reference;
+};
+_STLP_TEMPLATE_NULL
+struct iterator<output_iterator_tag, void, void, void, void> {
+ typedef output_iterator_tag iterator_category;
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+#endif
+};
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::iterator_category(_It)
+# define _STLP_DISTANCE_TYPE(_It, _Tp) _STLP_STD::distance_type(_It)
+# define _STLP_VALUE_TYPE(_It, _Tp) _STLP_STD::value_type(_It)
+//Old HP iterator queries do not give information about the iterator
+//associated reference type so we consider that it is not a real reference.
+# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) __false_type()
+#else
+# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# define _STLP_VALUE_TYPE(_It, _Tp) (_STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::value_type*)0
+# define _STLP_DISTANCE_TYPE(_It, _Tp) (_STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::difference_type*)0
+# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || \
+ (defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__)
+# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::iterator_traits< _Tp >::iterator_category()
+# else
+# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::iterator_category()
+# endif
+# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) _STLP_STD::_IsRefType< _STLP_TYPENAME _STLP_STD::iterator_traits< _Tp >::reference >::_Ret()
+# else
+# define _STLP_ITERATOR_CATEGORY(_It, _Tp) _STLP_STD::__iterator_category(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
+# define _STLP_DISTANCE_TYPE(_It, _Tp) _STLP_STD::__distance_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
+# define _STLP_VALUE_TYPE(_It, _Tp) _STLP_STD::__value_type(_It, _STLP_STD::_IsPtrType<_Tp>::_Ret())
+# define _STLP_IS_REF_TYPE_REAL_REF(_It, _Tp) __false_type()
+# endif
+#endif
+
+#if defined (_STLP_DONT_REDEFINE_STD) && defined (_STLP_WHOLE_NATIVE_STD)
+/* In this mode we will see both STLport implementation and native
+ * one. To allow some interaction between both implementations through
+ * iterators we have to map std iterator categories to stlport ones. This
+ * way we will be able to initialize STLport containers with native
+ * iterators, the other side won't work except when STLport iterators are
+ * simple pointers. */
+
+_STLP_END_NAMESPACE
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <iterator>
+# else
+# include _STLP_NATIVE_HEADER(iterator)
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _IteCat>
+struct _CategoryMapping
+{ typedef _IteCat _Tag; };
+
+_STLP_TEMPLATE_NULL
+struct _CategoryMapping<::std::input_iterator_tag>
+{ typedef input_iterator_tag _Tag; };
+_STLP_TEMPLATE_NULL
+struct _CategoryMapping<::std::output_iterator_tag>
+{ typedef output_iterator_tag _Tag; };
+_STLP_TEMPLATE_NULL
+struct _CategoryMapping<::std::forward_iterator_tag>
+{ typedef forward_iterator_tag _Tag; };
+_STLP_TEMPLATE_NULL
+struct _CategoryMapping<::std::bidirectional_iterator_tag>
+{ typedef bidirectional_iterator_tag _Tag; };
+_STLP_TEMPLATE_NULL
+struct _CategoryMapping<::std::random_access_iterator_tag>
+{ typedef random_access_iterator_tag _Tag; };
+
+template <class _Iterator>
+struct iterator_traits {
+ typedef typename _Iterator::iterator_category _OriginalTag;
+ typedef typename _CategoryMapping<_OriginalTag>::_Tag iterator_category;
+#else
+template <class _Iterator>
+struct iterator_traits {
+ typedef typename _Iterator::iterator_category iterator_category;
+#endif
+ typedef typename _Iterator::value_type value_type;
+ typedef typename _Iterator::difference_type difference_type;
+ typedef typename _Iterator::pointer pointer;
+ typedef typename _Iterator::reference reference;
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (__SUNPRO_CC)
+# define _STLP_DIFFERENCE_TYPE(_Iterator) typename iterator_traits<_Iterator>::difference_type
+#else
+# define _STLP_DIFFERENCE_TYPE(_Iterator) ptrdiff_t
+#endif
+
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+
+// fbp : this order keeps gcc happy
+template <class _Tp>
+struct iterator_traits<const _Tp*> {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+};
+
+template <class _Tp>
+struct iterator_traits<_Tp*> {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef _Tp& reference;
+};
+
+# if defined (__BORLANDC__)
+template <class _Tp>
+struct iterator_traits<_Tp* const> {
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef ptrdiff_t difference_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+};
+# endif
+
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+#include <stl/_ptrs_specialize.h>
+_STLP_BEGIN_NAMESPACE
+
+#ifndef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+// The overloaded functions iterator_category, distance_type, and
+// value_type are not part of the C++ standard. (They have been
+// replaced by struct iterator_traits.) They are included for
+// backward compatibility with the HP STL.
+// We introduce internal names for these functions.
+
+# ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
+
+template <class _Tp>
+inline _STLP_STD::random_access_iterator_tag
+__iterator_category(const _Tp*, const __true_type&)
+{ return _STLP_STD::random_access_iterator_tag(); }
+
+template <class _Iter>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::iterator_category
+__iterator_category(const _Iter&, const __false_type&) {
+ typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::iterator_category _Category;
+ return _Category();
+}
+
+template <class _Tp>
+inline ptrdiff_t*
+__distance_type(const _Tp*, const __true_type&)
+{ return __STATIC_CAST(ptrdiff_t*, 0); }
+
+template <class _Iter>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::difference_type*
+__distance_type(const _Iter&, const __false_type&) {
+ typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::difference_type _diff_type;
+ return __STATIC_CAST(_diff_type*,0);
+}
+
+template <class _Tp>
+inline _Tp*
+__value_type(const _Tp*, const __true_type&)
+{ return __STATIC_CAST(_Tp*, 0); }
+
+template <class _Iter>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _STLP_STD::iterator_traits<_Iter>::value_type*
+__value_type(const _Iter&, const __false_type&) {
+ typedef _STLP_TYPENAME _STLP_STD::iterator_traits<_Iter>::value_type _value_type;
+ return __STATIC_CAST(_value_type*,0);
+}
+
+# endif
+
+#else /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
+template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
+inline _Category _STLP_CALL iterator_category(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return _Category(); }
+template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
+inline _Tp* _STLP_CALL value_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
+inline _Distance* _STLP_CALL distance_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return __STATIC_CAST(_Distance*, 0); }
+template <class _Tp>
+inline random_access_iterator_tag _STLP_CALL iterator_category(const _Tp*) { return random_access_iterator_tag(); }
+template <class _Tp>
+inline _Tp* _STLP_CALL value_type(const _Tp*) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Tp>
+inline ptrdiff_t* _STLP_CALL distance_type(const _Tp*) { return __STATIC_CAST(ptrdiff_t*, 0); }
+#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+// The base classes input_iterator, output_iterator, forward_iterator,
+// bidirectional_iterator, and random_access_iterator are not part of
+// the C++ standard. (They have been replaced by struct iterator.)
+// They are included for backward compatibility with the HP STL.
+template <class _Tp, class _Distance> struct input_iterator :
+ public iterator <input_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
+struct output_iterator : public iterator <output_iterator_tag, void, void, void, void> {};
+template <class _Tp, class _Distance> struct forward_iterator :
+ public iterator<forward_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
+template <class _Tp, class _Distance> struct bidirectional_iterator :
+ public iterator<bidirectional_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
+template <class _Tp, class _Distance> struct random_access_iterator :
+ public iterator<random_access_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
+
+# if defined (_STLP_BASE_MATCH_BUG) && defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+template <class _Tp, class _Distance>
+inline input_iterator_tag _STLP_CALL
+iterator_category(const input_iterator<_Tp, _Distance>&) { return input_iterator_tag(); }
+inline output_iterator_tag _STLP_CALL
+iterator_category(const output_iterator&) { return output_iterator_tag(); }
+template <class _Tp, class _Distance>
+inline forward_iterator_tag _STLP_CALL
+iterator_category(const forward_iterator<_Tp, _Distance>&) { return forward_iterator_tag(); }
+template <class _Tp, class _Distance>
+inline bidirectional_iterator_tag _STLP_CALL
+iterator_category(const bidirectional_iterator<_Tp, _Distance>&) { return bidirectional_iterator_tag(); }
+template <class _Tp, class _Distance>
+inline random_access_iterator_tag _STLP_CALL
+iterator_category(const random_access_iterator<_Tp, _Distance>&) { return random_access_iterator_tag(); }
+template <class _Tp, class _Distance>
+inline _Tp* _STLP_CALL value_type(const input_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Tp, class _Distance>
+inline _Tp* _STLP_CALL value_type(const forward_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Tp, class _Distance>
+inline _Tp* _STLP_CALL value_type(const bidirectional_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Tp, class _Distance>
+inline _Tp* _STLP_CALL value_type(const random_access_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Tp*, 0); }
+template <class _Tp, class _Distance>
+inline _Distance* _STLP_CALL distance_type(const input_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Distance*, 0); }
+template <class _Tp, class _Distance>
+inline _Distance* _STLP_CALL distance_type(const forward_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Distance*, 0); }
+template <class _Tp, class _Distance>
+inline _Distance* _STLP_CALL distance_type(const bidirectional_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Distance*, 0);}
+template <class _Tp, class _Distance>
+inline _Distance* _STLP_CALL distance_type(const random_access_iterator<_Tp, _Distance>&) { return __STATIC_CAST(_Distance*, 0); }
+# endif
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIterator>
+inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL
+__distance(const _InputIterator& __first, const _InputIterator& __last,
+ const input_iterator_tag &) {
+ _STLP_DIFFERENCE_TYPE(_InputIterator) __n = 0;
+ _InputIterator __it(__first);
+ while (__it != __last) {
+ ++__it; ++__n;
+ }
+ return __n;
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _ForwardIterator>
+inline _STLP_DIFFERENCE_TYPE(_ForwardIterator) _STLP_CALL
+__distance(const _ForwardIterator& __first, const _ForwardIterator& __last,
+ const forward_iterator_tag &) {
+ _STLP_DIFFERENCE_TYPE(_ForwardIterator) __n = 0;
+ _ForwardIterator __it(__first);
+ while (__it != __last) {
+ ++__it; ++__n;
+ }
+ return __n;
+}
+
+template <class _BidirectionalIterator>
+_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) _STLP_CALL
+__distance(const _BidirectionalIterator& __first, const _BidirectionalIterator& __last,
+ const bidirectional_iterator_tag &) {
+ _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) __n = 0;
+ _BidirectionalIterator __it(__first);
+ while (__it != __last) {
+ ++__it; ++__n;
+ }
+ return __n;
+}
+#endif
+
+template <class _RandomAccessIterator>
+inline _STLP_DIFFERENCE_TYPE(_RandomAccessIterator) _STLP_CALL
+__distance(const _RandomAccessIterator& __first, const _RandomAccessIterator& __last,
+ const random_access_iterator_tag &)
+{ return __last - __first; }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIterator>
+inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL
+distance(_InputIterator __first, _InputIterator __last)
+{ return _STLP_PRIV __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); }
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+template <class _InputIterator, class _Distance>
+inline void _STLP_CALL distance(const _InputIterator& __first,
+ const _InputIterator& __last, _Distance& __n)
+{ __n += _STLP_STD::distance(__first, __last); }
+
+# if defined (_STLP_MSVC)
+// MSVC specific
+template <class _InputIterator, class _Dist>
+inline void _STLP_CALL _Distance(_InputIterator __first,
+ _InputIterator __last, _Dist& __n)
+{ __n += _STLP_STD::distance(__first, __last); }
+# endif
+#endif
+
+// fbp: those are being used for iterator/const_iterator definitions everywhere
+template <class _Tp>
+struct _Nonconst_traits;
+
+template <class _Tp>
+struct _Const_traits {
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
+ typedef _Const_traits<_Tp> _ConstTraits;
+ typedef _Nonconst_traits<_Tp> _NonConstTraits;
+};
+
+template <class _Tp>
+struct _Nonconst_traits {
+ typedef _Tp value_type;
+ typedef _Tp& reference;
+ typedef _Tp* pointer;
+ typedef _Const_traits<_Tp> _ConstTraits;
+ typedef _Nonconst_traits<_Tp> _NonConstTraits;
+};
+
+/*
+ * dums: A special iterator/const_iterator traits for set and multiset for which even
+ * the iterator is not mutable
+ */
+template <class _Tp>
+struct _Nonconst_Const_traits;
+
+template <class _Tp>
+struct _Const_Const_traits {
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
+ typedef _Const_Const_traits<_Tp> _ConstTraits;
+ typedef _Nonconst_Const_traits<_Tp> _NonConstTraits;
+};
+
+template <class _Tp>
+struct _Nonconst_Const_traits {
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
+ typedef _Const_Const_traits<_Tp> _ConstTraits;
+ typedef _Nonconst_Const_traits<_Tp> _NonConstTraits;
+};
+
+/*
+ * A macro to generate a new iterator traits from one of the
+ * previous one. Changing the iterator traits type make iterators
+ * from different containers not comparable.
+ */
+#define _STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits) \
+template <class _Tp> \
+struct _##Motif; \
+template <class _Tp> \
+struct _Const##Motif : public _STLP_STD::_Const_##Traits<_Tp> { \
+ typedef _Const##Motif<_Tp> _ConstTraits; \
+ typedef _##Motif<_Tp> _NonConstTraits; \
+}; \
+template <class _Tp> \
+struct _##Motif : public _STLP_STD::_Nonconst_##Traits<_Tp> { \
+ typedef _Const##Motif<_Tp> _ConstTraits; \
+ typedef _##Motif<_Tp> _NonConstTraits; \
+};
+
+#define _STLP_CREATE_ITERATOR_TRAITS(Motif, Traits) \
+_STLP_MOVE_TO_PRIV_NAMESPACE \
+_STLP_CREATE_ITERATOR_TRAITS_BASE(Motif, Traits) \
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#define _STLP_CREATE_HASH_ITERATOR_TRAITS(Motif, Traits) \
+_STLP_MOVE_TO_PRIV_NAMESPACE \
+_STLP_CREATE_ITERATOR_TRAITS_BASE(NonLocal##Motif, Traits) \
+_STLP_CREATE_ITERATOR_TRAITS_BASE(Local##Motif, Traits) \
+template <class _Tp> \
+struct _##Motif { \
+ typedef _ConstNonLocal##Motif<_Tp> _ConstTraits; \
+ typedef _NonLocal##Motif<_Tp> _NonConstTraits; \
+ typedef _ConstLocal##Motif<_Tp> _ConstLocalTraits; \
+ typedef _Local##Motif<_Tp> _NonConstLocalTraits; \
+}; \
+_STLP_MOVE_TO_STD_NAMESPACE
+
+/*
+# if defined (_STLP_BASE_TYPEDEF_BUG)
+// this workaround is needed for SunPro 4.0.1
+template <class _Traits>
+struct __cnst_traits_aux : private _Traits {
+ typedef typename _Traits::value_type value_type;
+};
+# define __TRAITS_VALUE_TYPE(_Traits) __cnst_traits_aux<_Traits>::value_type
+# else
+# define __TRAITS_VALUE_TYPE(_Traits) _Traits::value_type
+# endif
+*/
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _Distance>
+_STLP_INLINE_LOOP void _STLP_CALL
+__advance(_InputIter& __i, _Distance __n, const input_iterator_tag &)
+{ while (__n--) ++__i; }
+
+// fbp : added output iterator tag variant
+template <class _InputIter, class _Distance>
+_STLP_INLINE_LOOP void _STLP_CALL
+__advance(_InputIter& __i, _Distance __n, const output_iterator_tag &)
+{ while (__n--) ++__i; }
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _ForwardIterator, class _Distance>
+_STLP_INLINE_LOOP void _STLP_CALL
+__advance(_ForwardIterator& i, _Distance n, const forward_iterator_tag &)
+{ while (n--) ++i; }
+#endif
+
+template <class _BidirectionalIterator, class _Distance>
+_STLP_INLINE_LOOP void _STLP_CALL
+__advance(_BidirectionalIterator& __i, _Distance __n,
+ const bidirectional_iterator_tag &) {
+ if (__n > 0)
+ while (__n--) ++__i;
+ else
+ while (__n++) --__i;
+}
+
+template <class _RandomAccessIterator, class _Distance>
+inline void _STLP_CALL
+__advance(_RandomAccessIterator& __i, _Distance __n,
+ const random_access_iterator_tag &)
+{ __i += __n; }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIterator, class _Distance>
+inline void _STLP_CALL advance(_InputIterator& __i, _Distance __n)
+{ _STLP_PRIV __advance(__i, __n, _STLP_ITERATOR_CATEGORY(__i, _InputIterator)); }
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_ITERATOR_BASE_H */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_iterator_old.h b/6/sources/cxx-stl/stlport/stlport/stl/_iterator_old.h
new file mode 100644
index 0000000..144b9ab
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_iterator_old.h
@@ -0,0 +1,334 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_ITERATOR_OLD_H
+#define _STLP_INTERNAL_ITERATOR_OLD_H
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+
+template <class _Container>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const back_insert_iterator<_Container>&) { return output_iterator_tag(); }
+template <class _Container>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const front_insert_iterator<_Container>&) { return output_iterator_tag(); }
+template <class _Container>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const insert_iterator<_Container>&) { return output_iterator_tag(); }
+
+#endif
+
+template <class _BidirectionalIterator, class _Tp,
+ _STLP_DFL_TMPL_PARAM(_Reference, _Tp& ),
+#if defined (_STLP_MSVC50_COMPATIBILITY)
+# define __Reference _Reference, class _Pointer
+# define Reference__ _Reference, _Pointer
+ _STLP_DFL_TMPL_PARAM(_Pointer, _Tp*),
+#else
+# define __Reference _Reference
+# define Reference__ _Reference
+#endif
+ _STLP_DFL_TYPE_PARAM(_Distance, ptrdiff_t)>
+class reverse_bidirectional_iterator {
+ typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
+ Reference__, _Distance> _Self;
+ // friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& x, const _Self& y);
+protected:
+ _BidirectionalIterator current;
+public:
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Distance difference_type;
+# if defined (_STLP_MSVC50_COMPATIBILITY)
+ typedef _Pointer pointer;
+# else
+ typedef _Tp* pointer;
+# endif
+ typedef _Reference reference;
+
+ reverse_bidirectional_iterator() {}
+ explicit reverse_bidirectional_iterator(_BidirectionalIterator __x)
+ : current(__x) {}
+ _BidirectionalIterator base() const { return current; }
+ _Reference operator*() const {
+ _BidirectionalIterator __tmp = current;
+ return *(--__tmp);
+ }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ --current;
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ --current;
+ return __tmp;
+ }
+ _Self& operator--() {
+ ++current;
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ ++current;
+ return __tmp;
+ }
+};
+
+#ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+template <class _BidirectionalIterator, class _Tp, class __Reference,
+ class _Distance>
+inline bidirectional_iterator_tag _STLP_CALL
+iterator_category(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&)
+{ return bidirectional_iterator_tag(); }
+template <class _BidirectionalIterator, class _Tp, class __Reference,
+ class _Distance>
+inline _Tp* _STLP_CALL
+value_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&)
+{ return (_Tp*) 0; }
+template <class _BidirectionalIterator, class _Tp, class __Reference,
+ class _Distance>
+inline _Distance* _STLP_CALL
+distance_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&)
+{ return (_Distance*) 0; }
+#endif
+
+template <class _BidirectionalIterator, class _Tp, class __Reference,
+ class _Distance>
+inline bool _STLP_CALL operator==(
+ const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
+ Reference__, _Distance>& __y)
+{ return __x.base() == __y.base(); }
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _BiIter, class _Tp, class __Reference, class _Distance>
+inline bool _STLP_CALL operator!=(
+ const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __x,
+ const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __y)
+{ return !(__x == __y); }
+
+#endif
+
+#if !defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
+
+// This is the old version of reverse_iterator, as found in the original
+// HP STL. It does not use partial specialization.
+
+template <class _RandomAccessIterator, class _Tp,
+ _STLP_DFL_TMPL_PARAM(_Reference,_Tp&),
+# if defined (_STLP_MSVC50_COMPATIBILITY)
+ _STLP_DFL_TMPL_PARAM(_Pointer, _Tp*),
+# endif
+ _STLP_DFL_TYPE_PARAM(_Distance,ptrdiff_t)>
+class reverse_iterator {
+ typedef reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance> _Self;
+protected:
+ _RandomAccessIterator __current;
+public:
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Distance difference_type;
+# if defined (_STLP_MSVC50_COMPATIBILITY)
+ typedef _Pointer pointer;
+# else
+ typedef _Tp* pointer;
+# endif
+ typedef _Reference reference;
+
+ reverse_iterator() {}
+ reverse_iterator(const _Self& __x) : __current(__x.base()) {}
+ explicit reverse_iterator(_RandomAccessIterator __x) : __current(__x) {}
+ _Self& operator=(const _Self& __x) {__current = __x.base(); return *this; }
+
+ _RandomAccessIterator base() const { return __current; }
+ _Reference operator*() const { return *(__current - (difference_type)1); }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ --__current;
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ --__current;
+ return __tmp;
+ }
+ _Self& operator--() {
+ ++__current;
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ ++__current;
+ return __tmp;
+ }
+ _Self operator+(_Distance __n) const {
+ return _Self(__current - __n);
+ }
+ _Self& operator+=(_Distance __n) {
+ __current -= __n;
+ return *this;
+ }
+ _Self operator-(_Distance __n) const {
+ return _Self(__current + __n);
+ }
+ _Self& operator-=(_Distance __n) {
+ __current += __n;
+ return *this;
+ }
+ _Reference operator[](_Distance __n) const { return *(*this + __n); }
+};
+
+# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline random_access_iterator_tag _STLP_CALL
+iterator_category(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
+{ return random_access_iterator_tag(); }
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline _Tp* _STLP_CALL value_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
+{ return (_Tp*) 0; }
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline _Distance* _STLP_CALL
+distance_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
+{ return (_Distance*) 0; }
+# endif
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator==(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y)
+{
+ return __x.base() == __y.base();
+}
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator<(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y)
+{
+ return __y.base() < __x.base();
+}
+
+# ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator!=(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y) {
+ return !(__x == __y);
+}
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator>(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y) {
+ return __y < __x;
+}
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator<=(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y) {
+ return !(__y < __x);
+}
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline bool _STLP_CALL
+operator>=(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y) {
+ return !(__x < __y);
+}
+
+# endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline _Distance _STLP_CALL
+operator-(const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __y)
+{
+ return __y.base() - __x.base();
+}
+
+template <class _RandomAccessIterator, class _Tp,
+ class __Reference, class _Distance>
+inline reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance> _STLP_CALL
+operator+(_Distance __n,
+ const reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>& __x)
+{
+ return reverse_iterator<_RandomAccessIterator, _Tp,
+ Reference__, _Distance>(__x.base() - __n);
+}
+
+#endif /* ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_limits.c b/6/sources/cxx-stl/stlport/stlport/stl/_limits.c
new file mode 100644
index 0000000..3938024
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_limits.c
@@ -0,0 +1,405 @@
+/*
+ * Copyright (c) 1998,1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_LIMITS_C
+#define _STLP_LIMITS_C
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+//==========================================================
+// numeric_limits static members
+//==========================================================
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
+
+# define __declare_numeric_base_member(__type, __mem) \
+template <class __number> \
+ const __type _Numeric_limits_base<__number>:: __mem
+
+__declare_numeric_base_member(bool, is_specialized);
+__declare_numeric_base_member(int, digits);
+__declare_numeric_base_member(int, digits10);
+__declare_numeric_base_member(bool, is_signed);
+__declare_numeric_base_member(bool, is_integer);
+__declare_numeric_base_member(bool, is_exact);
+__declare_numeric_base_member(int, radix);
+__declare_numeric_base_member(int, min_exponent);
+__declare_numeric_base_member(int, max_exponent);
+__declare_numeric_base_member(int, min_exponent10);
+__declare_numeric_base_member(int, max_exponent10);
+__declare_numeric_base_member(bool, has_infinity);
+__declare_numeric_base_member(bool, has_quiet_NaN);
+__declare_numeric_base_member(bool, has_signaling_NaN);
+__declare_numeric_base_member(float_denorm_style, has_denorm);
+__declare_numeric_base_member(bool, has_denorm_loss);
+__declare_numeric_base_member(bool, is_iec559);
+__declare_numeric_base_member(bool, is_bounded);
+__declare_numeric_base_member(bool, is_modulo);
+__declare_numeric_base_member(bool, traps);
+__declare_numeric_base_member(bool, tinyness_before);
+__declare_numeric_base_member(float_round_style, round_style);
+
+# undef __declare_numeric_base_member
+
+# define __declare_integer_limits_member(__type, __mem) \
+template <class _Int, _STLP_LIMITS_MIN_TYPE __imin, _STLP_LIMITS_MAX_TYPE __imax, int __idigits, bool __ismod> \
+ const __type _Integer_limits<_Int, __imin, __imax, __idigits, __ismod>:: __mem
+
+__declare_integer_limits_member(bool, is_specialized);
+__declare_integer_limits_member(int, digits);
+__declare_integer_limits_member(int, digits10);
+__declare_integer_limits_member(bool, is_signed);
+__declare_integer_limits_member(bool, is_integer);
+__declare_integer_limits_member(bool, is_exact);
+__declare_integer_limits_member(int, radix);
+__declare_integer_limits_member(bool, is_bounded);
+__declare_integer_limits_member(bool, is_modulo);
+# undef __declare_integer_limits_member
+
+# if defined (__GNUC__) && (__GNUC__ != 2 || __GNUC_MINOR__ > 96) && (__GNUC__ != 3 || __GNUC_MINOR__ == 0) && (__GNUC__ <= 3)
+_STLP_MOVE_TO_STD_NAMESPACE
+
+# define __declare_numeric_limits_member(__integer) \
+ _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::digits; \
+ _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::digits10; \
+ _STLP_TEMPLATE_NULL const int numeric_limits<__integer>::radix; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_specialized; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_signed; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_integer; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_exact; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_bounded; \
+ _STLP_TEMPLATE_NULL const bool numeric_limits<__integer>::is_modulo
+
+__declare_numeric_limits_member(_STLP_LONG_LONG);
+__declare_numeric_limits_member(unsigned _STLP_LONG_LONG);
+
+# undef __declare_numeric_limits_member
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+# endif
+
+# define __declare_float_limits_member(__type, __mem) \
+template <class __number, \
+ int __Digits, int __Digits10, \
+ int __MinExp, int __MaxExp, \
+ int __MinExp10, int __MaxExp10, \
+ bool __IsIEC559, \
+ float_denorm_style __DenormStyle, \
+ float_round_style __RoundStyle> \
+const __type _Floating_limits< __number, __Digits, __Digits10, \
+ __MinExp, __MaxExp, __MinExp10, __MaxExp10, \
+ __IsIEC559, __DenormStyle, __RoundStyle>::\
+ __mem
+
+__declare_float_limits_member(bool, is_specialized);
+__declare_float_limits_member(int, digits);
+__declare_float_limits_member(int, digits10);
+__declare_float_limits_member(bool, is_signed);
+__declare_float_limits_member(int, radix);
+__declare_float_limits_member(int, min_exponent);
+__declare_float_limits_member(int, max_exponent);
+__declare_float_limits_member(int, min_exponent10);
+__declare_float_limits_member(int, max_exponent10);
+__declare_float_limits_member(bool, has_infinity);
+__declare_float_limits_member(bool, has_quiet_NaN);
+__declare_float_limits_member(bool, has_signaling_NaN);
+__declare_float_limits_member(float_denorm_style, has_denorm);
+__declare_float_limits_member(bool, has_denorm_loss);
+__declare_float_limits_member(bool, is_iec559);
+__declare_float_limits_member(bool, is_bounded);
+__declare_float_limits_member(bool, traps);
+__declare_float_limits_member(bool, tinyness_before);
+__declare_float_limits_member(float_round_style, round_style);
+# undef __declare_float_limits_member
+
+#endif
+
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+
+# if defined (__GNUC__) || defined (__BORLANDC__)
+# define _STLP_ADDITIONAL_OPEN_BRACKET {
+# define _STLP_ADDITIONAL_CLOSE_BRACKET }
+# else
+# define _STLP_ADDITIONAL_OPEN_BRACKET
+# define _STLP_ADDITIONAL_CLOSE_BRACKET
+# endif
+
+/* The following code has been extracted from the boost libraries (www.boost.org) and
+ * adapted with the STLport portability macros. Advantage on previous technique is that
+ * computation of infinity and NaN values is only based on big/little endianess, compiler
+ * float, double or long double representation is taken into account thanks to the sizeof
+ * operator. */
+template<class _Number, unsigned short _Word>
+struct float_helper {
+ union _WordsNumber {
+ unsigned short _Words[8];
+ _Number _num;
+ };
+ static _Number get_word_higher() _STLP_NOTHROW {
+ _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET _Word, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
+ return __tmp._num;
+ }
+ static _Number get_word_lower() _STLP_NOTHROW {
+ _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET 0, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
+ __tmp._Words[(sizeof(_Number) >= 12 ? 10 : sizeof(_Number)) / sizeof(unsigned short) - 1] = _Word;
+ return __tmp._num;
+ }
+ static _Number get_from_last_word() _STLP_NOTHROW {
+# if defined (_STLP_BIG_ENDIAN)
+ return get_word_higher();
+# else /* _STLP_LITTLE_ENDIAN */
+ return get_word_lower();
+# endif
+ }
+ static _Number get_from_first_word() _STLP_NOTHROW {
+# if defined (_STLP_BIG_ENDIAN)
+ return get_word_lower();
+# else /* _STLP_LITTLE_ENDIAN */
+ return get_word_higher();
+# endif
+ }
+};
+
+# if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_BIG_ENDIAN)
+template<class _Number, unsigned short _Word1, unsigned short _Word2>
+struct float_helper2 {
+ union _WordsNumber {
+ unsigned short _Words[8];
+ _Number _num;
+ };
+ //static _Number get_word_higher() _STLP_NOTHROW {
+ // _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET _Word1, _Word2, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
+ // return __tmp._num;
+ //}
+ static _Number get_word_lower() _STLP_NOTHROW {
+ _WordsNumber __tmp = { _STLP_ADDITIONAL_OPEN_BRACKET 0, 0, 0, 0, 0, 0, 0, 0 _STLP_ADDITIONAL_CLOSE_BRACKET };
+ __tmp._Words[(sizeof(_Number) >= 12 ? 10 : sizeof(_Number)) / sizeof(unsigned short) - 2] = _Word1;
+ __tmp._Words[(sizeof(_Number) >= 12 ? 10 : sizeof(_Number)) / sizeof(unsigned short) - 1] = _Word2;
+ return __tmp._num;
+ }
+ static _Number get_from_last_word() _STLP_NOTHROW {
+//# if defined (_STLP_BIG_ENDIAN)
+// return get_word_higher();
+//# else /* _STLP_LITTLE_ENDIAN */
+ return get_word_lower();
+//# endif
+ }
+};
+# endif
+
+/* Former values kept in case moving to boost code has introduce a regression on
+ * some platform. */
+#if 0
+# if defined (_STLP_BIG_ENDIAN)
+# if defined (__OS400__)
+# define _STLP_FLOAT_INF_REP { 0x7f80, 0 }
+# define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 }
+# define _STLP_FLOAT_SNAN_REP { 0xff80, 0 }
+# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }
+# define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 }
+# define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 }
+# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
+# define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 }
+# define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 }
+# else /* __OS400__ */
+# define _STLP_FLOAT_INF_REP { 0x7f80, 0 }
+# define _STLP_FLOAT_QNAN_REP { 0x7fc1, 0 }
+# define _STLP_FLOAT_SNAN_REP { 0x7f81, 0 }
+# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }
+# define _STLP_DOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0 }
+# define _STLP_DOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0 }
+# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
+# define _STLP_LDOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 }
+# define _STLP_LDOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 }
+# endif /* __OS400__ */
+# else /* _STLP_LITTLE_ENDIAN */
+# if defined(__DECCXX)
+# define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
+# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 }
+# define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 }
+# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
+# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 }
+# define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 }
+# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff }
+# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff }
+# define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff}
+# else
+# define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
+# define _STLP_FLOAT_QNAN_REP { 0, 0x7fc0 }
+# define _STLP_FLOAT_SNAN_REP { 0, 0x7fa0 }
+# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
+# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff8 }
+# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff4 }
+# if defined (_STLP_MSVC) || defined (__ICL)
+# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 }
+# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 }
+# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 }
+# elif defined (__BORLANDC__)
+# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff }
+# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xc000, 0x7fff }
+# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xa000, 0x7fff }
+# else
+# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff, 0 }
+# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff, 0 }
+# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff, 0 }
+# endif
+# endif
+# endif
+
+union _F_rep {
+ unsigned short rep[2];
+ float val;
+};
+union _D_rep {
+ unsigned short rep[4];
+ double val;
+};
+
+# ifndef _STLP_NO_LONG_DOUBLE
+union _LD_rep {
+ unsigned short rep[8];
+ long double val;
+};
+# endif
+#endif
+
+template <class __dummy>
+float _STLP_CALL _LimG<__dummy>::get_F_inf() {
+ typedef float_helper<float, 0x7f80u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+}
+template <class __dummy>
+float _STLP_CALL _LimG<__dummy>::get_F_qNaN() {
+ typedef float_helper<float, 0x7f81u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+}
+template <class __dummy>
+float _STLP_CALL _LimG<__dummy>::get_F_sNaN() {
+ typedef float_helper<float, 0x7fc1u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+}
+template <class __dummy>
+float _STLP_CALL _LimG<__dummy>::get_F_denormMin() {
+ typedef float_helper<float, 0x0001u> _FloatHelper;
+ return _FloatHelper::get_from_first_word();
+}
+
+template <int __use_double_limits>
+class _NumericLimitsAccess;
+
+_STLP_TEMPLATE_NULL
+class _NumericLimitsAccess<1> {
+public:
+ static double get_inf() {
+ typedef float_helper<double, 0x7ff0u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+ }
+ static double get_qNaN() {
+ typedef float_helper<double, 0x7ff1u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+ }
+ static double get_sNaN() {
+ typedef float_helper<double, 0x7ff9u> _FloatHelper;
+ return _FloatHelper::get_from_last_word();
+ }
+};
+
+template <class __dummy>
+double _STLP_CALL _LimG<__dummy>::get_D_inf()
+{ return _NumericLimitsAccess<1>::get_inf(); }
+template <class __dummy>
+double _STLP_CALL _LimG<__dummy>::get_D_qNaN()
+{ return _NumericLimitsAccess<1>::get_qNaN(); }
+template <class __dummy>
+double _STLP_CALL _LimG<__dummy>::get_D_sNaN()
+{ return _NumericLimitsAccess<1>::get_sNaN(); }
+template <class __dummy>
+double _STLP_CALL _LimG<__dummy>::get_D_denormMin() {
+ typedef float_helper<double, 0x0001u> _FloatHelper;
+ return _FloatHelper::get_from_first_word();
+}
+
+# if !defined (_STLP_NO_LONG_DOUBLE)
+_STLP_TEMPLATE_NULL
+class _NumericLimitsAccess<0> {
+public:
+ static long double get_inf() {
+# if defined (_STLP_BIG_ENDIAN)
+ typedef float_helper<long double, 0x7ff0u> _FloatHelper;
+# else
+ typedef float_helper2<long double, 0x8000u, 0x7fffu> _FloatHelper;
+# endif
+ return _FloatHelper::get_from_last_word();
+ }
+ static long double get_qNaN() {
+# if defined (_STLP_BIG_ENDIAN)
+ typedef float_helper<long double, 0x7ff1u> _FloatHelper;
+# else
+ typedef float_helper2<long double, 0xc000u, 0x7fffu> _FloatHelper;
+# endif
+ return _FloatHelper::get_from_last_word();
+ }
+ static long double get_sNaN() {
+# if defined (_STLP_BIG_ENDIAN)
+ typedef float_helper<long double, 0x7ff9u> _FloatHelper;
+# else
+ typedef float_helper2<long double, 0x9000u, 0x7fffu> _FloatHelper;
+# endif
+ return _FloatHelper::get_from_last_word();
+ }
+};
+
+template <class __dummy>
+long double _STLP_CALL _LimG<__dummy>::get_LD_inf() {
+ const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;
+ return _NumericLimitsAccess<__use_double_limits>::get_inf();
+}
+template <class __dummy>
+long double _STLP_CALL _LimG<__dummy>::get_LD_qNaN() {
+ const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;
+ return _NumericLimitsAccess<__use_double_limits>::get_qNaN();
+}
+template <class __dummy>
+long double _STLP_CALL _LimG<__dummy>::get_LD_sNaN() {
+ const int __use_double_limits = sizeof(double) == sizeof(long double) ? 1 : 0;
+ return _NumericLimitsAccess<__use_double_limits>::get_sNaN();
+}
+template <class __dummy>
+long double _STLP_CALL _LimG<__dummy>::get_LD_denormMin() {
+ typedef float_helper<long double, 0x0001u> _FloatHelper;
+ return _FloatHelper::get_from_first_word();
+}
+# endif
+
+#endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
+
+#undef _STLP_LIMITS_MIN_TYPE
+#undef _STLP_LIMITS_MAX_TYPE
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_LIMITS_C_INCLUDED */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_limits.h b/6/sources/cxx-stl/stlport/stlport/stl/_limits.h
new file mode 100644
index 0000000..c0091f6
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_limits.h
@@ -0,0 +1,519 @@
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This may be not portable code. Parts of numeric_limits<> are
+ * inherently machine-dependent. At present this file is suitable
+ * for the MIPS, SPARC, Alpha and ia32 architectures.
+ */
+
+#ifndef _STLP_INTERNAL_LIMITS
+#define _STLP_INTERNAL_LIMITS
+
+#ifndef _STLP_CLIMITS
+# include <climits>
+#endif
+
+#ifndef _STLP_CFLOAT
+# include <cfloat>
+#endif
+
+#if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_INTERNAL_CWCHAR)
+# include <stl/_cwchar.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+enum float_round_style {
+ round_indeterminate = -1,
+ round_toward_zero = 0,
+ round_to_nearest = 1,
+ round_toward_infinity = 2,
+ round_toward_neg_infinity = 3
+};
+
+enum float_denorm_style {
+ denorm_indeterminate = -1,
+ denorm_absent = 0,
+ denorm_present = 1
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Base class for all specializations of numeric_limits.
+template <class __number>
+class _Numeric_limits_base {
+public:
+
+ static __number (_STLP_CALL min)() _STLP_NOTHROW { return __number(); }
+ static __number (_STLP_CALL max)() _STLP_NOTHROW { return __number(); }
+
+ _STLP_STATIC_CONSTANT(int, digits = 0);
+ _STLP_STATIC_CONSTANT(int, digits10 = 0);
+ _STLP_STATIC_CONSTANT(int, radix = 0);
+ _STLP_STATIC_CONSTANT(int, min_exponent = 0);
+ _STLP_STATIC_CONSTANT(int, min_exponent10 = 0);
+ _STLP_STATIC_CONSTANT(int, max_exponent = 0);
+ _STLP_STATIC_CONSTANT(int, max_exponent10 = 0);
+
+ _STLP_STATIC_CONSTANT(float_denorm_style, has_denorm = denorm_absent);
+ _STLP_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
+
+ _STLP_STATIC_CONSTANT(bool, is_specialized = false);
+ _STLP_STATIC_CONSTANT(bool, is_signed = false);
+ _STLP_STATIC_CONSTANT(bool, is_integer = false);
+ _STLP_STATIC_CONSTANT(bool, is_exact = false);
+ _STLP_STATIC_CONSTANT(bool, has_infinity = false);
+ _STLP_STATIC_CONSTANT(bool, has_quiet_NaN = false);
+ _STLP_STATIC_CONSTANT(bool, has_signaling_NaN = false);
+ _STLP_STATIC_CONSTANT(bool, has_denorm_loss = false);
+ _STLP_STATIC_CONSTANT(bool, is_iec559 = false);
+ _STLP_STATIC_CONSTANT(bool, is_bounded = false);
+ _STLP_STATIC_CONSTANT(bool, is_modulo = false);
+ _STLP_STATIC_CONSTANT(bool, traps = false);
+ _STLP_STATIC_CONSTANT(bool, tinyness_before = false);
+
+ static __number _STLP_CALL epsilon() _STLP_NOTHROW { return __number(); }
+ static __number _STLP_CALL round_error() _STLP_NOTHROW { return __number(); }
+
+ static __number _STLP_CALL infinity() _STLP_NOTHROW { return __number(); }
+ static __number _STLP_CALL quiet_NaN() _STLP_NOTHROW { return __number(); }
+ static __number _STLP_CALL signaling_NaN() _STLP_NOTHROW { return __number(); }
+ static __number _STLP_CALL denorm_min() _STLP_NOTHROW { return __number(); }
+};
+
+// Base class for integers.
+
+#ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
+# ifdef _STLP_LONG_LONG
+# define _STLP_LIMITS_MIN_TYPE _STLP_LONG_LONG
+# define _STLP_LIMITS_MAX_TYPE unsigned _STLP_LONG_LONG
+# else
+# define _STLP_LIMITS_MIN_TYPE long
+# define _STLP_LIMITS_MAX_TYPE unsigned long
+# endif
+#else
+# define _STLP_LIMITS_MIN_TYPE _Int
+# define _STLP_LIMITS_MAX_TYPE _Int
+#endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
+
+template <class _Int,
+ _STLP_LIMITS_MIN_TYPE __imin,
+ _STLP_LIMITS_MAX_TYPE __imax,
+ int __idigits, bool __ismod>
+class _Integer_limits : public _Numeric_limits_base<_Int> {
+public:
+
+ static _Int (_STLP_CALL min) () _STLP_NOTHROW { return (_Int)__imin; }
+ static _Int (_STLP_CALL max) () _STLP_NOTHROW { return (_Int)__imax; }
+
+ _STLP_STATIC_CONSTANT(int, digits = (__idigits < 0) ? ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1)) : (__idigits));
+ _STLP_STATIC_CONSTANT(int, digits10 = (digits * 301UL) / 1000);
+ _STLP_STATIC_CONSTANT(int, radix = 2);
+ _STLP_STATIC_CONSTANT(bool, is_specialized = true);
+ _STLP_STATIC_CONSTANT(bool, is_signed = (__imin != 0));
+ _STLP_STATIC_CONSTANT(bool, is_integer = true);
+ _STLP_STATIC_CONSTANT(bool, is_exact = true);
+ _STLP_STATIC_CONSTANT(bool, is_bounded = true);
+ _STLP_STATIC_CONSTANT(bool, is_modulo = __ismod);
+};
+
+// Base class for floating-point numbers.
+template <class __number,
+ int __Digits, int __Digits10,
+ int __MinExp, int __MaxExp,
+ int __MinExp10, int __MaxExp10,
+ bool __IsIEC559,
+ float_denorm_style __DenormStyle,
+ float_round_style __RoundStyle>
+class _Floating_limits : public _Numeric_limits_base<__number> {
+public:
+
+ _STLP_STATIC_CONSTANT(int, digits = __Digits);
+ _STLP_STATIC_CONSTANT(int, digits10 = __Digits10);
+ _STLP_STATIC_CONSTANT(int, radix = FLT_RADIX);
+ _STLP_STATIC_CONSTANT(int, min_exponent = __MinExp);
+ _STLP_STATIC_CONSTANT(int, max_exponent = __MaxExp);
+ _STLP_STATIC_CONSTANT(int, min_exponent10 = __MinExp10);
+ _STLP_STATIC_CONSTANT(int, max_exponent10 = __MaxExp10);
+
+ _STLP_STATIC_CONSTANT(float_denorm_style, has_denorm = __DenormStyle);
+ _STLP_STATIC_CONSTANT(float_round_style, round_style = __RoundStyle);
+
+ _STLP_STATIC_CONSTANT(bool, is_specialized = true);
+ _STLP_STATIC_CONSTANT(bool, is_signed = true);
+
+ _STLP_STATIC_CONSTANT(bool, has_infinity = true);
+#if (!defined (_STLP_MSVC) || (_STLP_MSVC > 1300)) && \
+ (!defined (__BORLANDC__) || (__BORLANDC__ >= 0x590)) && \
+ (!defined (_CRAY) || defined (_CRAYIEEE))
+ _STLP_STATIC_CONSTANT(bool, has_quiet_NaN = true);
+ _STLP_STATIC_CONSTANT(bool, has_signaling_NaN = true);
+#else
+ _STLP_STATIC_CONSTANT(bool, has_quiet_NaN = false);
+ _STLP_STATIC_CONSTANT(bool, has_signaling_NaN = false);
+#endif
+
+ _STLP_STATIC_CONSTANT(bool, is_iec559 = __IsIEC559 && has_infinity && has_quiet_NaN && has_signaling_NaN && (has_denorm == denorm_present));
+ _STLP_STATIC_CONSTANT(bool, has_denorm_loss = false);
+ _STLP_STATIC_CONSTANT(bool, is_bounded = true);
+ _STLP_STATIC_CONSTANT(bool, traps = true);
+ _STLP_STATIC_CONSTANT(bool, tinyness_before = false);
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// Class numeric_limits
+
+// The unspecialized class.
+
+template<class _Tp>
+class numeric_limits : public _STLP_PRIV _Numeric_limits_base<_Tp> {};
+
+// Specializations for all built-in integral types.
+
+#if !defined (_STLP_NO_BOOL)
+_STLP_TEMPLATE_NULL
+class numeric_limits<bool>
+ : public _STLP_PRIV _Integer_limits<bool, false, true, 1, false>
+{};
+#endif /* _STLP_NO_BOOL */
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<char>
+ : public _STLP_PRIV _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>
+{};
+
+#if !defined (_STLP_NO_SIGNED_BUILTINS)
+_STLP_TEMPLATE_NULL
+class numeric_limits<signed char>
+ : public _STLP_PRIV _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX, -1, true>
+{};
+#endif
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned char>
+ : public _STLP_PRIV _Integer_limits<unsigned char, 0, UCHAR_MAX, -1, true>
+{};
+
+#if !(defined (_STLP_NO_WCHAR_T) || defined (_STLP_WCHAR_T_IS_USHORT))
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<wchar_t>
+ : public _STLP_PRIV _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX, -1, true>
+{};
+
+#endif
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<short>
+ : public _STLP_PRIV _Integer_limits<short, SHRT_MIN, SHRT_MAX, -1, true>
+{};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned short>
+ : public _STLP_PRIV _Integer_limits<unsigned short, 0, USHRT_MAX, -1, true>
+{};
+
+#if defined (__xlC__) && (__xlC__ == 0x500)
+# undef INT_MIN
+# define INT_MIN -2147483648
+#endif
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<int>
+ : public _STLP_PRIV _Integer_limits<int, INT_MIN, INT_MAX, -1, true>
+{};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned int>
+ : public _STLP_PRIV _Integer_limits<unsigned int, 0, UINT_MAX, -1, true>
+{};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<long>
+ : public _STLP_PRIV _Integer_limits<long, LONG_MIN, LONG_MAX, -1, true>
+{};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned long>
+ : public _STLP_PRIV _Integer_limits<unsigned long, 0, ULONG_MAX, -1, true>
+{};
+
+#if defined (_STLP_LONG_LONG)
+
+# if defined (_STLP_MSVC) || defined (__BORLANDC__)
+# define LONGLONG_MAX 0x7fffffffffffffffi64
+# define LONGLONG_MIN (-LONGLONG_MAX-1i64)
+# define ULONGLONG_MAX 0xffffffffffffffffUi64
+# else
+# ifndef LONGLONG_MAX
+# define LONGLONG_MAX 0x7fffffffffffffffLL
+# endif
+# ifndef LONGLONG_MIN
+# define LONGLONG_MIN (-LONGLONG_MAX-1LL)
+# endif
+# ifndef ULONGLONG_MAX
+# define ULONGLONG_MAX 0xffffffffffffffffULL
+# endif
+# endif
+
+# if !defined (__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ <= 96) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 3)
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<_STLP_LONG_LONG>
+ : public _STLP_PRIV _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
+{};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned _STLP_LONG_LONG>
+ : public _STLP_PRIV _Integer_limits<unsigned _STLP_LONG_LONG, 0, ULONGLONG_MAX, -1, true>
+{};
+# else /* gcc 2.97 (after 2000-11-01), 2.98, 3.0 */
+/*
+ newest gcc has new mangling scheme, that has problem
+ with generating name [instantiated] of template specialization like
+ _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
+ ~~~~~~~~~~~~ ~~~~~~~~~~~~
+ Below is code that solve this problem.
+ - ptr
+ */
+_STLP_TEMPLATE_NULL
+class numeric_limits<_STLP_LONG_LONG>
+ : public _STLP_PRIV _Numeric_limits_base<_STLP_LONG_LONG> {
+public:
+
+ static _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return LONGLONG_MIN; }
+ static _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return LONGLONG_MAX; }
+
+ _STLP_STATIC_CONSTANT(int, digits = ((int)((sizeof(_STLP_LONG_LONG) * (CHAR_BIT))) - 1));
+ _STLP_STATIC_CONSTANT(int, digits10 = (digits * 301UL) / 1000);
+ _STLP_STATIC_CONSTANT(int, radix = 2);
+ _STLP_STATIC_CONSTANT(bool, is_specialized = true);
+ _STLP_STATIC_CONSTANT(bool, is_signed = true);
+ _STLP_STATIC_CONSTANT(bool, is_integer = true);
+ _STLP_STATIC_CONSTANT(bool, is_exact = true);
+ _STLP_STATIC_CONSTANT(bool, is_bounded = true);
+ _STLP_STATIC_CONSTANT(bool, is_modulo = true);
+};
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<unsigned _STLP_LONG_LONG>
+ : public _STLP_PRIV _Numeric_limits_base<unsigned _STLP_LONG_LONG> {
+public:
+
+ static unsigned _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return 0ULL; }
+ static unsigned _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return ULONGLONG_MAX; }
+
+ _STLP_STATIC_CONSTANT(int, digits = ((int)((sizeof(unsigned _STLP_LONG_LONG) * (CHAR_BIT)))));
+ _STLP_STATIC_CONSTANT(int, digits10 = (digits * 301UL) / 1000);
+ _STLP_STATIC_CONSTANT(int, radix = 2);
+ _STLP_STATIC_CONSTANT(bool, is_specialized = true);
+ _STLP_STATIC_CONSTANT(bool, is_signed = false);
+ _STLP_STATIC_CONSTANT(bool, is_integer = true);
+ _STLP_STATIC_CONSTANT(bool, is_exact = true);
+ _STLP_STATIC_CONSTANT(bool, is_bounded = true);
+ _STLP_STATIC_CONSTANT(bool, is_modulo = true);
+};
+
+# endif /* __GNUC__ > 2000-11-01 */
+
+#endif /* _STLP_LONG_LONG */
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Specializations for all built-in floating-point types.
+template <class __dummy>
+class _LimG {
+public:
+ static float _STLP_CALL get_F_inf();
+ static float _STLP_CALL get_F_qNaN();
+ static float _STLP_CALL get_F_sNaN();
+ static float _STLP_CALL get_F_denormMin();
+ static double _STLP_CALL get_D_inf();
+ static double _STLP_CALL get_D_qNaN();
+ static double _STLP_CALL get_D_sNaN();
+ static double _STLP_CALL get_D_denormMin();
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ static long double _STLP_CALL get_LD_inf();
+ static long double _STLP_CALL get_LD_qNaN();
+ static long double _STLP_CALL get_LD_sNaN();
+ static long double _STLP_CALL get_LD_denormMin();
+#endif
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _LimG<bool>;
+#endif
+
+#if defined (__GNUC__)
+# if defined (__FLT_DENORM_MIN__)
+# define _STLP_FLT_DENORM_MIN __FLT_DENORM_MIN__
+# else
+# define _STLP_FLT_DENORM_STYLE denorm_absent
+# endif
+# if defined (__DBL_DENORM_MIN__)
+# define _STLP_DBL_DENORM_MIN __DBL_DENORM_MIN__
+# else
+# define _STLP_DBL_DENORM_STYLE denorm_absent
+# endif
+# if defined (__LDBL_DENORM_MIN__)
+# define _STLP_LDBL_DENORM_MIN __LDBL_DENORM_MIN__
+# else
+# define _STLP_LDBL_DENORM_STYLE denorm_absent
+# endif
+#endif
+
+/* If compiler do not expose thanks to some macro its status regarding
+ * denormalized floating point numbers, we consider that denormalization
+ * is present. Unit tests will tell us if compiler do not support them. */
+#if !defined (_STLP_FLT_DENORM_STYLE)
+# define _STLP_FLT_DENORM_STYLE denorm_present
+#endif
+
+#if !defined (_STLP_DBL_DENORM_STYLE)
+# define _STLP_DBL_DENORM_STYLE denorm_present
+#endif
+
+#if !defined (_STLP_LDBL_DENORM_STYLE)
+# define _STLP_LDBL_DENORM_STYLE denorm_present
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<float>
+ : public _STLP_PRIV _Floating_limits<float,
+ FLT_MANT_DIG, // Binary digits of precision
+ FLT_DIG, // Decimal digits of precision
+ FLT_MIN_EXP, // Minimum exponent
+ FLT_MAX_EXP, // Maximum exponent
+ FLT_MIN_10_EXP, // Minimum base 10 exponent
+ FLT_MAX_10_EXP, // Maximum base 10 exponent
+ true,
+ _STLP_FLT_DENORM_STYLE,
+ round_to_nearest> {
+public:
+ static float (_STLP_CALL min) () _STLP_NOTHROW { return FLT_MIN; }
+ static float _STLP_CALL denorm_min() _STLP_NOTHROW
+#if defined (_STLP_FLT_DENORM_MIN)
+ { return _STLP_FLT_DENORM_MIN; }
+#else
+ { return _STLP_FLT_DENORM_STYLE ? _STLP_PRIV _LimG<bool>::get_F_denormMin() : FLT_MIN; }
+#endif
+ static float (_STLP_CALL max) () _STLP_NOTHROW { return FLT_MAX; }
+ static float _STLP_CALL epsilon() _STLP_NOTHROW { return FLT_EPSILON; }
+ static float _STLP_CALL round_error() _STLP_NOTHROW { return 0.5f; } // Units: ulps.
+ static float _STLP_CALL infinity() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_F_inf(); }
+ static float _STLP_CALL quiet_NaN() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_F_qNaN(); }
+ static float _STLP_CALL signaling_NaN() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_F_sNaN(); }
+};
+
+#undef _STLP_FLT_DENORM_MIN
+#undef _STLP_FLT_DNORM_STYLE
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<double>
+ : public _STLP_PRIV _Floating_limits<double,
+ DBL_MANT_DIG, // Binary digits of precision
+ DBL_DIG, // Decimal digits of precision
+ DBL_MIN_EXP, // Minimum exponent
+ DBL_MAX_EXP, // Maximum exponent
+ DBL_MIN_10_EXP, // Minimum base 10 exponent
+ DBL_MAX_10_EXP, // Maximum base 10 exponent
+ true,
+ _STLP_DBL_DENORM_STYLE,
+ round_to_nearest> {
+public:
+ static double (_STLP_CALL min)() _STLP_NOTHROW { return DBL_MIN; }
+ static double _STLP_CALL denorm_min() _STLP_NOTHROW
+#if defined (_STLP_DBL_DENORM_MIN)
+ { return _STLP_DBL_DENORM_MIN; }
+#else
+ { return _STLP_DBL_DENORM_STYLE ? _STLP_PRIV _LimG<bool>::get_D_denormMin() : DBL_MIN; }
+#endif
+ static double (_STLP_CALL max)() _STLP_NOTHROW { return DBL_MAX; }
+ static double _STLP_CALL epsilon() _STLP_NOTHROW { return DBL_EPSILON; }
+ static double _STLP_CALL round_error() _STLP_NOTHROW { return 0.5; } // Units: ulps.
+ static double _STLP_CALL infinity() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_D_inf(); }
+ static double _STLP_CALL quiet_NaN() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_D_qNaN(); }
+ static double _STLP_CALL signaling_NaN() _STLP_NOTHROW { return _STLP_PRIV _LimG<bool>::get_D_sNaN(); }
+};
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+
+_STLP_TEMPLATE_NULL
+class numeric_limits<long double>
+ : public _STLP_PRIV _Floating_limits<long double,
+ LDBL_MANT_DIG, // Binary digits of precision
+ LDBL_DIG, // Decimal digits of precision
+ LDBL_MIN_EXP, // Minimum exponent
+ LDBL_MAX_EXP, // Maximum exponent
+ LDBL_MIN_10_EXP,// Minimum base 10 exponent
+ LDBL_MAX_10_EXP,// Maximum base 10 exponent
+ false, // do not conform to iec559
+ _STLP_LDBL_DENORM_STYLE,
+ round_to_nearest> {
+public:
+ static long double (_STLP_CALL min) () _STLP_NOTHROW { return LDBL_MIN; }
+ static long double _STLP_CALL denorm_min() _STLP_NOTHROW
+#if defined (_STLP_LDBL_DENORM_MIN)
+ { return _STLP_LDBL_DENORM_MIN; }
+#else
+ { return _STLP_LDBL_DENORM_STYLE ? _STLP_PRIV _LimG<bool>::get_LD_denormMin() : LDBL_MIN; }
+#endif
+ _STLP_STATIC_CONSTANT(bool, is_iec559 = false);
+ static long double (_STLP_CALL max) () _STLP_NOTHROW { return LDBL_MAX; }
+ static long double _STLP_CALL epsilon() _STLP_NOTHROW { return LDBL_EPSILON; }
+ static long double _STLP_CALL round_error() _STLP_NOTHROW { return 0.5l; }
+ static long double _STLP_CALL infinity() _STLP_NOTHROW
+ //For MSVC, long double is nothing more than an alias for double.
+#if !defined (_STLP_MSVC)
+ { return _STLP_PRIV _LimG<bool>::get_LD_inf(); }
+#else
+ { return _STLP_PRIV _LimG<bool>::get_D_inf(); }
+#endif
+ static long double _STLP_CALL quiet_NaN() _STLP_NOTHROW
+#if !defined (_STLP_MSVC)
+ { return _STLP_PRIV _LimG<bool>::get_LD_qNaN(); }
+#else
+ { return _STLP_PRIV _LimG<bool>::get_D_qNaN(); }
+#endif
+ static long double _STLP_CALL signaling_NaN() _STLP_NOTHROW
+#if !defined (_STLP_MSVC)
+ { return _STLP_PRIV _LimG<bool>::get_LD_sNaN(); }
+#else
+ { return _STLP_PRIV _LimG<bool>::get_D_sNaN(); }
+#endif
+};
+
+#endif
+
+// We write special values (Inf and NaN) as bit patterns and
+// cast the the appropriate floating-point types.
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_limits.c>
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_list.c b/6/sources/cxx-stl/stlport/stlport/stl/_list.c
new file mode 100644
index 0000000..86e420b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_list.c
@@ -0,0 +1,250 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_LIST_C
+#define _STLP_LIST_C
+
+#ifndef _STLP_INTERNAL_LIST_H
+# include <stl/_list.h>
+#endif
+
+#ifndef _STLP_CARRAY_H
+# include <stl/_carray.h>
+#endif
+
+#ifndef _STLP_RANGE_ERRORS_H
+# include <stl/_range_errors.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+template <class _Dummy>
+void _STLP_CALL
+_List_global<_Dummy>::_Transfer(_List_node_base* __position,
+ _List_node_base* __first, _List_node_base* __last) {
+ if (__position != __last) {
+ // Remove [first, last) from its old position.
+ __last->_M_prev->_M_next = __position;
+ __first->_M_prev->_M_next = __last;
+ __position->_M_prev->_M_next = __first;
+
+ // Splice [first, last) into its new position.
+ _Node_base* __tmp = __position->_M_prev;
+ __position->_M_prev = __last->_M_prev;
+ __last->_M_prev = __first->_M_prev;
+ __first->_M_prev = __tmp;
+ }
+}
+#endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
+
+template <class _Tp, class _Alloc>
+void _List_base<_Tp,_Alloc>::clear() {
+ _Node* __cur = __STATIC_CAST(_Node*, _M_node._M_data._M_next);
+ while (
+#if defined (__BORLANDC__) // runtime error
+ __cur &&
+#endif
+ __cur != &(_M_node._M_data)) {
+ _Node* __tmp = __cur;
+ __cur = __STATIC_CAST(_Node*, __cur->_M_next);
+ _STLP_STD::_Destroy(&__tmp->_M_data);
+ this->_M_node.deallocate(__tmp, 1);
+ }
+ _M_node._M_data._M_next = &_M_node._M_data;
+ _M_node._M_data._M_prev = &_M_node._M_data;
+}
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define size_type size_t
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define list _STLP_PTR_IMPL_NAME(list)
+#elif defined (_STLP_DEBUG)
+# define list _STLP_NON_DBG_NAME(list)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, class _Alloc>
+void list<_Tp, _Alloc>::resize(size_type __new_size, const _Tp& __x) {
+ iterator __i = begin();
+ size_type __len = 0;
+ for ( ; __i != end() && __len < __new_size; ++__i, ++__len);
+
+ if (__len == __new_size)
+ erase(__i, end());
+ else // __i == end()
+ insert(end(), __new_size - __len, __x);
+}
+
+template <class _Tp, class _Alloc>
+list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list<_Tp, _Alloc>& __x) {
+ if (this != &__x) {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ const_iterator __first2 = __x.begin();
+ const_iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2)
+ *__first1++ = *__first2++;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
+ return *this;
+}
+
+template <class _Tp, class _Alloc>
+void list<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
+ iterator __i = begin();
+ for ( ; __i != end() && __n > 0; ++__i, --__n)
+ *__i = __val;
+ if (__n > 0)
+ insert(end(), __n, __val);
+ else
+ erase(__i, end());
+}
+
+#if !defined (list)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Tp, class _Alloc, class _Predicate>
+void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred) {
+ typedef typename list<_Tp, _Alloc>::iterator _Literator;
+ _Literator __first = __that.begin();
+ _Literator __last = __that.end();
+ while (__first != __last) {
+ _Literator __next = __first;
+ ++__next;
+ if (__pred(*__first)) __that.erase(__first);
+ __first = __next;
+ }
+}
+
+template <class _Tp, class _Alloc, class _BinaryPredicate>
+void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred) {
+ typedef typename list<_Tp, _Alloc>::iterator _Literator;
+ _Literator __first = __that.begin();
+ _Literator __last = __that.end();
+ if (__first == __last) return;
+ _Literator __next = __first;
+ while (++__next != __last) {
+ if (__binary_pred(*__first, *__next))
+ __that.erase(__next);
+ else
+ __first = __next;
+ __next = __first;
+ }
+}
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x,
+ _StrictWeakOrdering __comp) {
+ typedef typename list<_Tp, _Alloc>::iterator _Literator;
+ _Literator __first1 = __that.begin();
+ _Literator __last1 = __that.end();
+ _Literator __first2 = __x.begin();
+ _Literator __last2 = __x.end();
+ if (__that.get_allocator() == __x.get_allocator()) {
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (__comp(*__first2, *__first1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ _Literator __next = __first2;
+ _List_global_inst::_Transfer(__first1._M_node, __first2._M_node, (++__next)._M_node);
+ __first2 = __next;
+ }
+ else
+ ++__first1;
+ }
+ if (__first2 != __last2)
+ _List_global_inst::_Transfer(__last1._M_node, __first2._M_node, __last2._M_node);
+ }
+ else {
+ while (__first1 != __last1 && __first2 != __last2) {
+ if (__comp(*__first2, *__first1)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__first1, *__first2), _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __first1 = __that.insert(__first1, *__first2);
+ }
+ else
+ ++__first1;
+ }
+ if (__first2 != __last2) {
+ __that.insert(__first1, __first2, __last2);
+ }
+ __x.clear();
+ }
+}
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp) {
+ // Do nothing if the list has length 0 or 1.
+ if (__that._M_node._M_data._M_next == &__that._M_node._M_data ||
+ __that._M_node._M_data._M_next->_M_next == &__that._M_node._M_data)
+ return;
+
+ list<_Tp, _Alloc> __carry(__that.get_allocator());
+ const int NB = 64;
+ _STLP_PRIV _CArray<list<_Tp, _Alloc>, NB> __counter(__carry);
+ int __fill = 0;
+ while (!__that.empty()) {
+ __carry.splice(__carry.begin(), __that, __that.begin());
+ int __i = 0;
+ while (__i < __fill && !__counter[__i].empty()) {
+ _S_merge(__counter[__i], __carry, __comp);
+ __carry.swap(__counter[__i++]);
+ }
+ __carry.swap(__counter[__i]);
+ if (__i == __fill) {
+ ++__fill;
+ if (__fill >= NB) {
+ //Looks like the list has too many elements to be sorted with this algorithm:
+ __stl_throw_overflow_error("list::sort");
+ }
+ }
+ }
+
+ for (int __i = 1; __i < __fill; ++__i)
+ _S_merge(__counter[__i], __counter[__i - 1], __comp);
+ __that.swap(__counter[__fill - 1]);
+}
+
+#if defined (list)
+# undef list
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_LIST_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_list.h b/6/sources/cxx-stl/stlport/stlport/stl/_list.h
new file mode 100644
index 0000000..6cd3f2b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_list.h
@@ -0,0 +1,742 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_LIST_IMPL_H
+#define _STLP_INTERNAL_LIST_IMPL_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+struct _List_node_base {
+ _List_node_base* _M_next;
+ _List_node_base* _M_prev;
+};
+
+template <class _Dummy>
+class _List_global {
+public:
+ typedef _List_node_base _Node_base;
+ static void _STLP_CALL _Transfer(_Node_base* __pos,
+ _Node_base* __first, _Node_base* __last);
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _List_global<bool>;
+#endif
+typedef _List_global<bool> _List_global_inst;
+
+template <class _Tp>
+class _List_node : public _List_node_base {
+public:
+ _Tp _M_data;
+ __TRIVIAL_STUFF(_List_node)
+};
+
+struct _List_iterator_base {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef bidirectional_iterator_tag iterator_category;
+
+ _List_node_base* _M_node;
+
+ _List_iterator_base(_List_node_base* __x) : _M_node(__x) {}
+
+ void _M_incr() { _M_node = _M_node->_M_next; }
+ void _M_decr() { _M_node = _M_node->_M_prev; }
+};
+
+
+template<class _Tp, class _Traits>
+struct _List_iterator : public _List_iterator_base {
+ typedef _Tp value_type;
+ typedef typename _Traits::pointer pointer;
+ typedef typename _Traits::reference reference;
+
+ typedef _List_iterator<_Tp, _Traits> _Self;
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef _List_iterator<_Tp, _NonConstTraits> iterator;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef _List_iterator<_Tp, _ConstTraits> const_iterator;
+
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef _List_node<_Tp> _Node;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ explicit _List_iterator(_List_node_base* __x) : _List_iterator_base(__x) {}
+ _List_iterator() : _List_iterator_base(0) {}
+ //copy constructor for iterator and constructor from iterator for const_iterator
+ _List_iterator(const iterator& __x) : _List_iterator_base(__x._M_node) {}
+
+ reference operator*() const { return __STATIC_CAST(_Node*, this->_M_node)->_M_data; }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ this->_M_incr();
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ this->_M_incr();
+ return __tmp;
+ }
+ _Self& operator--() {
+ this->_M_decr();
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ this->_M_decr();
+ return __tmp;
+ }
+ bool operator==(const_iterator __y ) const {
+ return this->_M_node == __y._M_node;
+ }
+ bool operator!=(const_iterator __y ) const {
+ return this->_M_node != __y._M_node;
+ }
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits>
+struct __type_traits<_STLP_PRIV _List_iterator<_Tp, _Traits> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits>
+inline _Tp* value_type(const _STLP_PRIV _List_iterator<_Tp, _Traits>&) { return 0; }
+inline bidirectional_iterator_tag iterator_category(const _STLP_PRIV _List_iterator_base&) { return bidirectional_iterator_tag();}
+inline ptrdiff_t* distance_type(const _STLP_PRIV _List_iterator_base&) { return 0; }
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+// Base class that encapsulates details of allocators and helps
+// to simplify EH
+
+template <class _Tp, class _Alloc>
+class _List_base {
+protected:
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef _List_node_base _Node_base;
+ typedef _List_node<_Tp> _Node;
+ typedef _List_base<_Tp, _Alloc> _Self;
+ typedef typename _Alloc_traits<_Node, _Alloc>::allocator_type _Node_allocator_type;
+public:
+ typedef _STLP_alloc_proxy<_Node_base, _Node, _Node_allocator_type> _AllocProxy;
+ typedef _Alloc allocator_type;
+
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR((const _Node_allocator_type&)_M_node, _Tp); }
+
+ _List_base(const allocator_type& __a) : _M_node(_STLP_CONVERT_ALLOCATOR(__a, _Node), _Node_base())
+ { _M_empty_initialize(); }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _List_base(__move_source<_Self> src) :
+ _M_node(__move_source<_AllocProxy>(src.get()._M_node)) {
+ if (src.get().empty())
+ //We force this to empty.
+ _M_empty_initialize();
+ else {
+ src.get()._M_empty_initialize();
+ _M_node._M_data._M_prev->_M_next = _M_node._M_data._M_next->_M_prev = &_M_node._M_data;
+ }
+ }
+#endif
+
+ ~_List_base()
+ { clear(); }
+
+ void clear();
+ bool empty() const { return _M_node._M_data._M_next == &_M_node._M_data; }
+
+ void _M_empty_initialize() {
+ _M_node._M_data._M_next = &_M_node._M_data;
+ _M_node._M_data._M_prev = _M_node._M_data._M_next;
+ }
+
+public:
+ _AllocProxy _M_node;
+};
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define list _STLP_PTR_IMPL_NAME(list)
+#elif defined (_STLP_DEBUG)
+# define list _STLP_NON_DBG_NAME(list)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class list;
+
+#if !defined (list)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+// helper functions to reduce code duplication
+template <class _Tp, class _Alloc, class _Predicate>
+void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred);
+
+template <class _Tp, class _Alloc, class _BinaryPredicate>
+void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred);
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x,
+ _StrictWeakOrdering __comp);
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp);
+
+#if !defined (list)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, class _Alloc>
+class list : public _STLP_PRIV _List_base<_Tp, _Alloc>
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (list)
+ , public __stlport_class<list<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_PRIV _List_base<_Tp, _Alloc> _Base;
+ typedef list<_Tp, _Alloc> _Self;
+ typedef _STLP_PRIV _List_node<_Tp> _Node;
+ typedef _STLP_PRIV _List_node_base _Node_base;
+public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef typename _Base::allocator_type allocator_type;
+ typedef bidirectional_iterator_tag _Iterator_category;
+
+public:
+ typedef _STLP_PRIV _List_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
+ typedef _STLP_PRIV _List_iterator<_Tp, _Const_traits<_Tp> > const_iterator;
+ _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
+
+protected:
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ _Node_base* _M_create_node(const_reference __x = value_type()) {
+#else
+ _Node_base* _M_create_node(const_reference __x) {
+#endif
+ _Node* __p = this->_M_node.allocate(1);
+ _STLP_TRY {
+ _Copy_Construct(&__p->_M_data, __x);
+ }
+ _STLP_UNWIND(this->_M_node.deallocate(__p, 1))
+ return __p;
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ _Node_base* _M_create_node() {
+ _Node* __p = this->_M_node.allocate(1);
+ _STLP_TRY {
+ _STLP_STD::_Construct(&__p->_M_data);
+ }
+ _STLP_UNWIND(this->_M_node.deallocate(__p, 1))
+ return __p;
+ }
+#endif
+
+public:
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(size_type __n, const_reference __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
+ const allocator_type& __a = allocator_type())
+#else
+ explicit list(size_type __n)
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type())
+ { this->insert(begin(), __n, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
+ list(size_type __n, const_reference __val)
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type())
+ { this->insert(begin(), __n, __val); }
+ list(size_type __n, const_reference __val, const allocator_type& __a)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
+ { this->insert(begin(), __n, __val); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because insert does all of
+ // that anyway.
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
+ { _M_insert(begin(), __first, __last); }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last)
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type())
+ { _M_insert(begin(), __first, __last); }
+# endif
+#else /* _STLP_MEMBER_TEMPLATES */
+ list(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
+ { _M_insert(begin(), __first, __last); }
+ list(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__a)
+ { _M_insert(begin(), __first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(const allocator_type& __a = allocator_type())
+#else
+ list()
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(allocator_type()) {}
+ list(const allocator_type& __a)
+#endif
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__a) {}
+
+ list(const _Self& __x) : _STLP_PRIV _List_base<_Tp, _Alloc>(__x.get_allocator())
+ { _M_insert(begin(), __x.begin(), __x.end()); }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ list(__move_source<_Self> src)
+ : _STLP_PRIV _List_base<_Tp, _Alloc>(__move_source<_Base>(src.get())) {}
+#endif
+
+ ~list() {}
+
+ _Self& operator = (const _Self& __x);
+
+ iterator begin() { return iterator(this->_M_node._M_data._M_next); }
+ const_iterator begin() const { return const_iterator(this->_M_node._M_data._M_next); }
+
+ iterator end() { return iterator(&this->_M_node._M_data); }
+ const_iterator end() const { return const_iterator(__CONST_CAST(_Node_base*, &this->_M_node._M_data)); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ size_type size() const {
+ size_type __result = _STLP_STD::distance(begin(), end());
+ return __result;
+ }
+ size_type max_size() const { return size_type(-1); }
+
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ reference back() { return *(--end()); }
+ const_reference back() const { return *(--end()); }
+
+private:
+ void _M_swap_aux(_Self& __x) {
+ __x._M_node._M_swap_alloc(this->_M_node);
+ __x._M_node._M_data._M_next = this->_M_node._M_data._M_next;
+ __x._M_node._M_data._M_next->_M_prev = &__x._M_node._M_data;
+ __x._M_node._M_data._M_prev = this->_M_node._M_data._M_prev;
+ __x._M_node._M_data._M_prev->_M_next = &__x._M_node._M_data;
+ this->_M_empty_initialize();
+ }
+
+public:
+ void swap(_Self& __x) {
+ if (__x.empty()) {
+ if (this->empty()) {
+ return;
+ }
+ this->_M_swap_aux(__x);
+ } else if (this->empty()) {
+ __x._M_swap_aux(*this);
+ } else {
+ this->_M_node.swap(__x._M_node);
+ _STLP_STD::swap(this->_M_node._M_data._M_prev->_M_next, __x._M_node._M_data._M_prev->_M_next);
+ _STLP_STD::swap(this->_M_node._M_data._M_next->_M_prev, __x._M_node._M_data._M_next->_M_prev);
+ }
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const_reference __x = value_type())
+#else
+ iterator insert(iterator __pos, const_reference __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ {
+ _Node_base* __tmp = _M_create_node(__x);
+ _Node_base* __n = __pos._M_node;
+ _Node_base* __p = __n->_M_prev;
+ __tmp->_M_next = __n;
+ __tmp->_M_prev = __p;
+ __p->_M_next = __tmp;
+ __n->_M_prev = __tmp;
+ return iterator(__tmp);
+ }
+
+private:
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void _M_insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+ }
+
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template<class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ const __true_type& /*_IsIntegral*/) {
+ _M_fill_insert(__pos, __n, __x);
+ }
+ template <class _InputIter>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIter __first, _InputIter __last,
+ const __false_type& /*_IsIntegral*/) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void _M_insert(iterator __pos, const value_type* __first, const value_type* __last) {
+ for (; __first != __last; ++__first)
+ insert(__pos, *__first);
+ }
+ void _M_insert(iterator __pos, const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ //We use a temporary list to avoid the auto reference troubles (infinite loop)
+ for (; __first != __last; ++__first)
+ insert(__pos, *__first);
+ }
+
+public:
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_splice_insert_dispatch(__pos, __first, __last, _Integral());
+ }
+
+private:
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template<class _Integer>
+ void _M_splice_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+ const __true_type& /*_IsIntegral*/) {
+ _M_fill_insert(__pos, __n, __x);
+ }
+ template <class _InputIter>
+ void _M_splice_insert_dispatch(iterator __pos,
+ _InputIter __first, _InputIter __last,
+ const __false_type& /*_IsIntegral*/) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __pos, const value_type* __first, const value_type* __last) {
+ _Self __tmp(__first, __last, this->get_allocator());
+ _STLP_ASSERT(__tmp.get_allocator() == this->get_allocator())
+ splice(__pos, __tmp);
+ }
+ void insert(iterator __pos, const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ //We use a temporary list to avoid the auto reference troubles (infinite loop)
+ _Self __tmp(__first, __last, this->get_allocator());
+ splice(__pos, __tmp);
+ }
+
+public:
+ void insert(iterator __pos, size_type __n, const_reference __x)
+ { _M_fill_insert(__pos, __n, __x); }
+
+private:
+ void _M_fill_insert(iterator __pos, size_type __n, const_reference __x) {
+ for ( ; __n > 0; --__n)
+ insert(__pos, __x);
+ }
+
+public:
+ void push_front(const_reference __x) { insert(begin(), __x); }
+ void push_back (const_reference __x) { insert(end(), __x); }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos)
+ { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
+ void push_front() {insert(begin());}
+ void push_back() {insert(end());}
+# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ iterator erase(iterator __pos) {
+ _Node_base* __next_node = __pos._M_node->_M_next;
+ _Node_base* __prev_node = __pos._M_node->_M_prev;
+ _Node* __n = __STATIC_CAST(_Node*, __pos._M_node);
+ __prev_node->_M_next = __next_node;
+ __next_node->_M_prev = __prev_node;
+ _STLP_STD::_Destroy(&__n->_M_data);
+ this->_M_node.deallocate(__n, 1);
+ return iterator(__next_node);
+ }
+
+ iterator erase(iterator __first, iterator __last) {
+ while (__first != __last)
+ erase(__first++);
+ return __last;
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const_reference __x = value_type());
+#else
+ void resize(size_type __new_size, const_reference __x);
+ void resize(size_type __new_size)
+ { this->resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void pop_front() { erase(begin()); }
+ void pop_back() {
+ iterator __tmp = end();
+ erase(--__tmp);
+ }
+
+public:
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void assign(size_type __n, const_reference __val) { _M_fill_assign(__n, __val); }
+
+ void _M_fill_assign(size_type __n, const_reference __val);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type& /*_IsIntegral*/) {
+ _M_fill_assign(__n, __val);
+ }
+
+ template <class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
+ const __false_type& /*_IsIntegral*/) {
+#else
+ void assign(const value_type *__first2, const value_type *__last2) {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
+ *__first1 = *__first2;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
+ void assign(const_iterator __first2, const_iterator __last2) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
+ *__first1 = *__first2;
+ if (__first2 == __last2)
+ erase(__first1, __last1);
+ else
+ insert(__last1, __first2, __last2);
+ }
+
+public:
+ void splice(iterator __pos, _Self& __x) {
+ if (!__x.empty()) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __x.begin()._M_node, __x.end()._M_node);
+ }
+ else {
+ insert(__pos, __x.begin(), __x.end());
+ __x.clear();
+ }
+ }
+ }
+ void splice(iterator __pos, _Self& __x, iterator __i) {
+ iterator __j = __i;
+ ++__j;
+ if (__pos == __i || __pos == __j) return;
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __i._M_node, __j._M_node);
+ }
+ else {
+ insert(__pos, *__i);
+ __x.erase(__i);
+ }
+ }
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last) {
+ if (__first != __last) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _List_global_inst::_Transfer(__pos._M_node, __first._M_node, __last._M_node);
+ }
+ else {
+ insert(__pos, __first, __last);
+ __x.erase(__first, __last);
+ }
+ }
+ }
+
+ void remove(const_reference __val) {
+ iterator __first = begin();
+ iterator __last = end();
+ while (__first != __last) {
+ iterator __next = __first;
+ ++__next;
+ if (__val == *__first) erase(__first);
+ __first = __next;
+ }
+ }
+
+ void unique()
+ { _STLP_PRIV _S_unique(*this, equal_to<value_type>()); }
+
+ void merge(_Self& __x)
+ { _STLP_PRIV _S_merge(*this, __x, less<value_type>()); }
+
+ void reverse() {
+ _Node_base* __p = &this->_M_node._M_data;
+ _Node_base* __tmp = __p;
+ do {
+ _STLP_STD::swap(__tmp->_M_next, __tmp->_M_prev);
+ __tmp = __tmp->_M_prev; // Old next node is now prev.
+ } while (__tmp != __p);
+ }
+
+ void sort()
+ { _STLP_PRIV _S_sort(*this, less<value_type>()); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Predicate>
+ void remove_if(_Predicate __pred)
+ { _STLP_PRIV _S_remove_if(*this, __pred); }
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __binary_pred)
+ { _STLP_PRIV _S_unique(*this, __binary_pred); }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self& __x,
+ _StrictWeakOrdering __comp) {
+ _STLP_PRIV _S_merge(*this, __x, __comp);
+ }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp)
+ { _STLP_PRIV _S_sort(*this, __comp); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+};
+
+#if defined (list)
+# undef list
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_list.c>
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# include <stl/pointers/_list.h>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_list.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp, class _Alloc>
+_STLP_INLINE_LOOP bool _STLP_CALL
+operator==(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y) {
+ typedef typename list<_Tp,_Alloc>::const_iterator const_iterator;
+ const_iterator __end1 = __x.end();
+ const_iterator __end2 = __y.end();
+
+ const_iterator __i1 = __x.begin();
+ const_iterator __i2 = __y.begin();
+ while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
+ ++__i1;
+ ++__i2;
+ }
+ return __i1 == __end1 && __i2 == __end2;
+}
+
+#define _STLP_EQUAL_OPERATOR_SPECIALIZED
+#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER list<_Tp, _Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+#undef _STLP_EQUAL_OPERATOR_SPECIALIZED
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Alloc>
+struct __move_traits<list<_Tp, _Alloc> > {
+ typedef __true_type implemented;
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_LIST_IMPL_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_locale.h b/6/sources/cxx-stl/stlport/stlport/stl/_locale.h
new file mode 100644
index 0000000..fd6d537
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_locale.h
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_LOCALE_H
+#define _STLP_INTERNAL_LOCALE_H
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CWCHAR
+# include <stl/_cwchar.h>
+#endif
+
+#ifndef _STLP_INTERNAL_THREADS_H
+# include <stl/_threads.h>
+#endif
+
+#ifndef _STLP_STRING_FWD_H
+# include <stl/_string_fwd.h>
+#endif
+
+#include <stl/_facets_fwd.h>
+
+_STLP_BEGIN_NAMESPACE
+
+class _Locale_impl; // Forward declaration of opaque type.
+class locale;
+
+template <class _CharT, class _Traits, class _Alloc>
+bool __locale_do_operator_call(const locale& __loc,
+ const basic_string<_CharT, _Traits, _Alloc>& __x,
+ const basic_string<_CharT, _Traits, _Alloc>& __y);
+
+_STLP_DECLSPEC _Locale_impl * _STLP_CALL _get_Locale_impl( _Locale_impl *locimpl );
+_STLP_DECLSPEC _Locale_impl * _STLP_CALL _copy_Nameless_Locale_impl( _Locale_impl *locimpl );
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Facet>
+bool _HasFacet(const locale& __loc, const _Facet* __facet) _STLP_NOTHROW;
+
+template <class _Facet>
+_Facet* _UseFacet(const locale& __loc, const _Facet* __facet);
+
+template <class _Facet>
+void _InsertFacet(locale& __loc, _Facet* __facet);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
+ defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+# define locale _STLP_NO_MEM_T_NAME(loc)
+#endif
+
+class _STLP_CLASS_DECLSPEC locale {
+public:
+ // types:
+ class _STLP_CLASS_DECLSPEC facet : protected _Refcount_Base {
+ protected:
+ /* Here we filter __init_count user value to 0 or 1 because __init_count is a
+ * size_t instance and _Refcount_Base use __stl_atomic_t instances that might
+ * have lower sizeof and generate roll issues. 1 is enough to keep the facet
+ * alive when required. */
+ explicit facet(size_t __init_count = 0) : _Refcount_Base( __init_count == 0 ? 0 : 1 ) {}
+ virtual ~facet();
+ friend class locale;
+ friend class _Locale_impl;
+ friend facet * _STLP_CALL _get_facet( facet * );
+ friend void _STLP_CALL _release_facet( facet *& );
+
+ private: // Invalidate assignment and copying.
+ facet(const facet& ) /* : _Refcount_Base(1) {} */;
+ void operator=(const facet&);
+ };
+
+#if defined (__MVS__) || defined (__OS400__)
+ struct
+#else
+ class
+#endif
+ _STLP_CLASS_DECLSPEC id {
+ public:
+ size_t _M_index;
+ static size_t _S_max;
+ };
+
+ typedef int category;
+ _STLP_STATIC_CONSTANT(category, none = 0x000);
+ _STLP_STATIC_CONSTANT(category, collate = 0x010);
+ _STLP_STATIC_CONSTANT(category, ctype = 0x020);
+ _STLP_STATIC_CONSTANT(category, monetary = 0x040);
+ _STLP_STATIC_CONSTANT(category, numeric = 0x100);
+ _STLP_STATIC_CONSTANT(category, time = 0x200);
+ _STLP_STATIC_CONSTANT(category, messages = 0x400);
+ _STLP_STATIC_CONSTANT(category, all = collate | ctype | monetary | numeric | time | messages);
+
+ // construct/copy/destroy:
+ locale() _STLP_NOTHROW;
+ locale(const locale&) _STLP_NOTHROW;
+ explicit locale(const char *);
+ locale(const locale&, const char*, category);
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _Facet>
+ locale(const locale& __loc, _Facet* __f) {
+ if ( __f != 0 ) {
+ this->_M_impl = _get_Locale_impl( _copy_Nameless_Locale_impl( __loc._M_impl ) );
+ _STLP_PRIV _InsertFacet(*this, __f);
+ } else {
+ this->_M_impl = _get_Locale_impl( __loc._M_impl );
+ }
+ }
+#endif
+
+protected:
+ // those are for internal use
+ locale(_Locale_impl*);
+
+public:
+ locale(const locale&, const locale&, category);
+ const locale& operator=(const locale&) _STLP_NOTHROW;
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+protected:
+#endif
+ ~locale() _STLP_NOTHROW;
+
+public:
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) && \
+ !defined(_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _Facet>
+ locale combine(const locale& __loc) const {
+ _Facet *__facet = 0;
+ if (!_STLP_PRIV _HasFacet(__loc, __facet))
+ _M_throw_on_combine_error(__loc.name());
+
+ return locale(*this, _STLP_PRIV _UseFacet(__loc, __facet));
+ }
+#endif
+
+ // locale operations:
+ string name() const;
+
+ bool operator==(const locale&) const;
+ bool operator!=(const locale&) const;
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || defined (_STLP_INLINE_MEMBER_TEMPLATES) || (defined(__MWERKS__) && __MWERKS__ <= 0x2301)
+ bool operator()(const string& __x, const string& __y) const;
+# ifndef _STLP_NO_WCHAR_T
+ bool operator()(const wstring& __x, const wstring& __y) const;
+# endif
+#elif !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _CharT, class _Traits, class _Alloc>
+ bool operator()(const basic_string<_CharT, _Traits, _Alloc>& __x,
+ const basic_string<_CharT, _Traits, _Alloc>& __y) const
+ { return __locale_do_operator_call(*this, __x, __y); }
+#endif
+
+ // global locale objects:
+#if !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ static locale _STLP_CALL global(const locale&);
+#else
+ static _Locale_impl* _STLP_CALL global(const locale&);
+#endif
+ static const locale& _STLP_CALL classic();
+
+//protected: // Helper functions for locale globals.
+ facet* _M_get_facet(const id&) const;
+ // same, but throws
+ facet* _M_use_facet(const id&) const;
+ static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_on_combine_error(const string& name);
+ static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_on_null_name();
+ static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_on_creation_failure(int __err_code,
+ const char* name, const char* facet);
+
+//protected: // More helper functions.
+ void _M_insert(facet* __f, id& __id);
+
+ // friends:
+ friend class _Locale_impl;
+
+protected: // Data members
+ _Locale_impl* _M_impl;
+ _Locale_impl* _M_get_impl() const { return _M_impl; }
+};
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
+ defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+# undef locale
+# define _Locale _STLP_NO_MEM_T_NAME(loc)
+
+class locale : public _Locale {
+public:
+
+ // construct/copy/destroy:
+ locale() _STLP_NOTHROW {
+#if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+ _STLP_CHECK_RUNTIME_COMPATIBILITY();
+#endif
+ }
+ locale(const locale& __loc) _STLP_NOTHROW : _Locale(__loc) {}
+ explicit locale(const char *__str) : _Locale(__str) {}
+ locale(const locale& __loc, const char* __str, category __cat)
+ : _Locale(__loc, __str, __cat) {}
+
+ template <class _Facet>
+ locale(const locale& __loc, _Facet* __f)
+ : _Locale(__f != 0 ? _copy_Nameless_Locale_impl(__loc._M_impl) : __loc._M_impl) {
+ if ( __f != 0 ) {
+ _STLP_PRIV _InsertFacet(*this, __f);
+ }
+ }
+
+private:
+ // those are for internal use
+ locale(_Locale_impl* __impl) : _Locale(__impl) {}
+ locale(const _Locale& __loc) : _Locale(__loc) {}
+
+public:
+
+ locale(const locale& __loc1, const locale& __loc2, category __cat)
+ : _Locale(__loc1, __loc2, __cat) {}
+
+ const locale& operator=(const locale& __loc) _STLP_NOTHROW {
+ _Locale::operator=(__loc);
+ return *this;
+ }
+
+ template <class _Facet>
+ locale combine(const locale& __loc) const {
+ _Facet *__facet = 0;
+ if (!_STLP_PRIV _HasFacet(__loc, __facet))
+ _M_throw_on_combine_error(__loc.name());
+
+ return locale(*this, _STLP_PRIV _UseFacet(__loc, __facet));
+ }
+
+ // locale operations:
+ bool operator==(const locale& __loc) const { return _Locale::operator==(__loc); }
+ bool operator!=(const locale& __loc) const { return _Locale::operator!=(__loc); }
+
+ template <class _CharT, class _Traits, class _Alloc>
+ bool operator()(const basic_string<_CharT, _Traits, _Alloc>& __x,
+ const basic_string<_CharT, _Traits, _Alloc>& __y) const
+ { return __locale_do_operator_call(*this, __x, __y); }
+
+ // global locale objects:
+ static locale _STLP_CALL global(const locale& __loc) {
+ return _Locale::global(__loc);
+ }
+ static const locale& _STLP_CALL classic() {
+ return __STATIC_CAST(const locale&, _Locale::classic());
+ }
+
+ // friends:
+ friend class _Locale_impl;
+};
+
+# undef _Locale
+#endif
+
+//----------------------------------------------------------------------
+// locale globals
+
+template <class _Facet>
+inline const _Facet&
+#ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+_Use_facet<_Facet>::operator *() const
+#else
+use_facet(const locale& __loc)
+#endif
+{
+ _Facet *__facet = 0;
+ return *(_STLP_PRIV _UseFacet(__loc, __facet));
+}
+
+template <class _Facet>
+#ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+struct has_facet {
+ const locale& __loc;
+ has_facet(const locale& __p_loc) : __loc(__p_loc) {}
+ operator bool() const _STLP_NOTHROW
+#else
+inline bool has_facet(const locale& __loc) _STLP_NOTHROW
+#endif
+{
+ _Facet *__facet = 0;
+ return _STLP_PRIV _HasFacet(__loc, __facet);
+}
+
+#ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+}; // close class definition
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/* _GetFacetId is a helper function that allow delaying access to
+ * facet id static instance in the library source code to avoid
+ * the other static instances that many compilers are generating
+ * in all dynamic library or executable when instanciating facet
+ * template class.
+ */
+template <class _Facet>
+inline locale::id& _GetFacetId(const _Facet*)
+{ return _Facet::id; }
+
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const money_get<char, istreambuf_iterator<char, char_traits<char> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const money_put<char, ostreambuf_iterator<char, char_traits<char> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const num_get<char, istreambuf_iterator<char, char_traits<char> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const num_put<char, ostreambuf_iterator<char, char_traits<char> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const time_get<char, istreambuf_iterator<char, char_traits<char> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const time_put<char, ostreambuf_iterator<char, char_traits<char> > >*);
+
+#ifndef _STLP_NO_WCHAR_T
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+_STLP_DECLSPEC locale::id& _STLP_CALL _GetFacetId(const time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >*);
+#endif
+
+template <class _Facet>
+inline bool _HasFacet(const locale& __loc, const _Facet* __facet) _STLP_NOTHROW
+{ return (__loc._M_get_facet(_GetFacetId(__facet)) != 0); }
+
+template <class _Facet>
+inline _Facet* _UseFacet(const locale& __loc, const _Facet* __facet)
+{ return __STATIC_CAST(_Facet*, __loc._M_use_facet(_GetFacetId(__facet))); }
+
+template <class _Facet>
+inline void _InsertFacet(locale& __loc, _Facet* __facet)
+{ __loc._M_insert(__facet, _GetFacetId(__facet)); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_LOCALE_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_map.h b/6/sources/cxx-stl/stlport/stlport/stl/_map.h
new file mode 100644
index 0000000..bf46a5d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_map.h
@@ -0,0 +1,435 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_MAP_H
+#define _STLP_INTERNAL_MAP_H
+
+#ifndef _STLP_INTERNAL_TREE_H
+# include <stl/_tree.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(MapTraitsT, traits)
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key> ),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class map
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<map<_Key, _Tp, _Compare, _Alloc> >
+#endif
+{
+ typedef map<_Key, _Tp, _Compare, _Alloc> _Self;
+public:
+
+// typedefs:
+
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+
+ class value_compare
+ : public binary_function<value_type, value_type, bool> {
+ friend class map<_Key,_Tp,_Compare,_Alloc>;
+ protected :
+ //c is a Standard name (23.3.1), do no make it STLport naming convention compliant.
+ _Compare comp;
+ value_compare(_Compare __c) : comp(__c) {}
+ public:
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
+ };
+
+protected:
+ typedef _STLP_PRIV _MapTraitsT<value_type> _MapTraits;
+
+public:
+ //Following typedef have to be public for __move_traits specialization.
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_SELECT1ST(value_type, _Key),
+ _MapTraits, _Alloc> _Rep_type;
+
+ typedef typename _Rep_type::pointer pointer;
+ typedef typename _Rep_type::const_pointer const_pointer;
+ typedef typename _Rep_type::reference reference;
+ typedef typename _Rep_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing map
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ // allocation/deallocation
+ map() : _M_t(_Compare(), allocator_type()) {}
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit map(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+#else
+ explicit map(const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) {}
+ explicit map(const _Compare& __comp, const allocator_type& __a)
+#endif
+ : _M_t(__comp, __a) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ map(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ template <class _InputIterator>
+ map(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ map(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) { _M_t.insert_unique(__first, __last); }
+# endif
+
+#else
+ map(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ map(const value_type* __first,
+ const value_type* __last, const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+
+ map(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ map(const_iterator __first, const_iterator __last, const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ map(const _Self& __x) : _M_t(__x._M_t) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ map(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
+ allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+ iterator begin() { return _M_t.begin(); }
+ const_iterator begin() const { return _M_t.begin(); }
+ iterator end() { return _M_t.end(); }
+ const_iterator end() const { return _M_t.end(); }
+ reverse_iterator rbegin() { return _M_t.rbegin(); }
+ const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+ reverse_iterator rend() { return _M_t.rend(); }
+ const_reverse_iterator rend() const { return _M_t.rend(); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Tp& operator[](const _KT& __k) {
+ iterator __i = lower_bound(__k);
+ // __i->first is greater than or equivalent to __k.
+ if (__i == end() || key_comp()(__k, (*__i).first))
+ __i = insert(__i, value_type(__k, _STLP_DEFAULT_CONSTRUCTED(_Tp)));
+ return (*__i).second;
+ }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ pair<iterator,bool> insert(const value_type& __x)
+ { return _M_t.insert_unique(__x); }
+ iterator insert(iterator __pos, const value_type& __x)
+ { return _M_t.insert_unique(__pos, __x); }
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_unique(__first, __last); }
+#else
+ void insert(const value_type* __first, const value_type* __last)
+ { _M_t.insert_unique(__first, __last); }
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_unique(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ void erase(iterator __pos) { _M_t.erase(__pos); }
+ size_type erase(const key_type& __x) { return _M_t.erase_unique(__x); }
+ void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); }
+ void clear() { _M_t.clear(); }
+
+ // map operations:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x) { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range(const _KT& __x)
+ { return _M_t.equal_range_unique(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator,const_iterator> equal_range(const _KT& __x) const
+ { return _M_t.equal_range_unique(__x); }
+};
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(MultimapTraitsT, traits)
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key> ),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class multimap
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<multimap<_Key, _Tp, _Compare, _Alloc> >
+#endif
+{
+ typedef multimap<_Key, _Tp, _Compare, _Alloc> _Self;
+public:
+
+// typedefs:
+
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST _Key, _Tp> value_type;
+ typedef _Compare key_compare;
+
+ class value_compare : public binary_function<value_type, value_type, bool> {
+ friend class multimap<_Key,_Tp,_Compare,_Alloc>;
+ protected:
+ //comp is a Standard name (23.3.2), do no make it STLport naming convention compliant.
+ _Compare comp;
+ value_compare(_Compare __c) : comp(__c) {}
+ public:
+ bool operator()(const value_type& __x, const value_type& __y) const
+ { return comp(__x.first, __y.first); }
+ };
+
+protected:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _MultimapTraitsT<value_type> _MultimapTraits;
+
+public:
+ //Following typedef have to be public for __move_traits specialization.
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_SELECT1ST(value_type, _Key),
+ _MultimapTraits, _Alloc> _Rep_type;
+
+ typedef typename _Rep_type::pointer pointer;
+ typedef typename _Rep_type::const_pointer const_pointer;
+ typedef typename _Rep_type::reference reference;
+ typedef typename _Rep_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing multimap
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ // allocation/deallocation
+ multimap() : _M_t(_Compare(), allocator_type()) { }
+ explicit multimap(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { }
+
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+ template <class _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) { _M_t.insert_equal(__first, __last); }
+# endif
+ template <class _InputIterator>
+ multimap(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+#else
+ multimap(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+ multimap(const value_type* __first, const value_type* __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+
+ multimap(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+ multimap(const_iterator __first, const_iterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ multimap(const _Self& __x) : _M_t(__x._M_t) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ multimap(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
+ allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+ iterator begin() { return _M_t.begin(); }
+ const_iterator begin() const { return _M_t.begin(); }
+ iterator end() { return _M_t.end(); }
+ const_iterator end() const { return _M_t.end(); }
+ reverse_iterator rbegin() { return _M_t.rbegin(); }
+ const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+ reverse_iterator rend() { return _M_t.rend(); }
+ const_reverse_iterator rend() const { return _M_t.rend(); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ iterator insert(const value_type& __x) { return _M_t.insert_equal(__x); }
+ iterator insert(iterator __pos, const value_type& __x) { return _M_t.insert_equal(__pos, __x); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_equal(__first, __last); }
+#else
+ void insert(const value_type* __first, const value_type* __last)
+ { _M_t.insert_equal(__first, __last); }
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_equal(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+ void erase(iterator __pos) { _M_t.erase(__pos); }
+ size_type erase(const key_type& __x) { return _M_t.erase(__x); }
+ void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); }
+ void clear() { _M_t.clear(); }
+
+ // multimap operations:
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x) { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const { return _M_t.count(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range(const _KT& __x)
+ { return _M_t.equal_range(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator,const_iterator> equal_range(const _KT& __x) const
+ { return _M_t.equal_range(__x); }
+};
+
+#define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER map<_Key,_Tp,_Compare,_Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER multimap<_Key,_Tp,_Compare,_Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Key, class _Tp, class _Compare, class _Alloc>
+struct __move_traits<map<_Key,_Tp,_Compare,_Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename map<_Key,_Tp,_Compare,_Alloc>::_Rep_type>
+{};
+
+template <class _Key, class _Tp, class _Compare, class _Alloc>
+struct __move_traits<multimap<_Key,_Tp,_Compare,_Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename multimap<_Key,_Tp,_Compare,_Alloc>::_Rep_type>
+{};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_mbstate_t.h b/6/sources/cxx-stl/stlport/stlport/stl/_mbstate_t.h
new file mode 100644
index 0000000..53566a7
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_mbstate_t.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_MBSTATE_T
+#define _STLP_INTERNAL_MBSTATE_T
+
+#if (defined (__OpenBSD__) || defined (__FreeBSD__) || defined (__hpux)) && defined (__GNUC__) && !defined (_GLIBCPP_HAVE_MBSTATE_T)
+# define _STLP_CPP_MBSTATE_T /* mbstate_t defined in native <cwchar>, so not defined in C! */
+#endif
+
+#if defined (_STLP_NO_NATIVE_MBSTATE_T) || defined (_STLP_CPP_MBSTATE_T) && !defined (_MBSTATE_T)
+# define _STLP_USE_OWN_MBSTATE_T
+# define _MBSTATE_T
+#endif
+
+#if defined (_STLP_USE_OWN_MBSTATE_T)
+# if !defined (_STLP_CPP_MBSTATE_T) || !defined (__cplusplus) || !defined (_STLP_USE_NEW_C_HEADERS)
+# if !defined (ANDROID) /* mbstate_t conflicts with Android's definition */
+typedef int mbstate_t;
+# endif
+# endif
+
+# if !defined (_STLP_CPP_MBSTATE_T) && defined (__cplusplus) && defined (_STLP_USE_NAMESPACES)
+_STLP_BEGIN_NAMESPACE
+using ::mbstate_t;
+_STLP_END_NAMESPACE
+# endif
+
+#endif /* _STLP_USE_OWN_MBSTATE_T */
+
+#endif /* _STLP_INTERNAL_MBSTATE_T */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_messages_facets.h b/6/sources/cxx-stl/stlport/stlport/stl/_messages_facets.h
new file mode 100644
index 0000000..aca5596
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_messages_facets.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_MESSAGES_H
+#define _STLP_INTERNAL_MESSAGES_H
+
+#ifndef _STLP_IOS_BASE_H
+# include <stl/_ios_base.h>
+#endif
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// messages facets
+
+class messages_base {
+ public:
+ typedef int catalog;
+};
+
+template <class _CharT> class messages {};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+class _Messages;
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC messages<char> : public locale::facet, public messages_base {
+public:
+ typedef messages_base::catalog catalog;
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit messages(size_t __refs = 0);
+
+ catalog open(const string& __fn, const locale& __loc) const
+ { return do_open(__fn, __loc); }
+ string_type get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const
+ { return do_get(__c, __set, __msgid, __dfault); }
+ inline void close(catalog __c) const
+ { do_close(__c); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~messages() {}
+
+ virtual catalog do_open(const string& __fn, const locale& __loc) const
+ { return -1; }
+ virtual string_type do_get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const
+ { return __dfault; }
+ virtual void do_close(catalog __c) const
+ {}
+};
+
+#if !defined (_STLP_NO_WCHAR_T)
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC messages<wchar_t> : public locale::facet, public messages_base {
+public:
+ typedef messages_base::catalog catalog;
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit messages(size_t __refs = 0);
+
+ inline catalog open(const string& __fn, const locale& __loc) const
+ { return do_open(__fn, __loc); }
+ inline string_type get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const
+ { return do_get(__c, __set, __msgid, __dfault); }
+ inline void close(catalog __c) const
+ { do_close(__c); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~messages() {}
+
+ virtual catalog do_open(const string& __fn, const locale& __loc) const
+ { return -1; }
+ virtual string_type do_get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const
+ { return __dfault; }
+ virtual void do_close(catalog __c) const
+ {}
+};
+
+#endif
+
+template <class _CharT> class messages_byname {};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC messages_byname<char> : public messages<char> {
+ friend class _Locale_impl;
+public:
+ typedef messages_base::catalog catalog;
+ typedef string string_type;
+
+ explicit messages_byname(const char* __name, size_t __refs = 0);
+
+protected:
+ ~messages_byname();
+
+ virtual catalog do_open(const string& __fn, const locale& __loc) const;
+ virtual string_type do_get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const;
+ virtual void do_close(catalog __c) const;
+
+private:
+ messages_byname(_Locale_messages*);
+ typedef messages_byname<char> _Self;
+ //explicitely defined as private to avoid warnings:
+ messages_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _STLP_PRIV _Messages* _M_impl;
+};
+
+#if !defined (_STLP_NO_WCHAR_T)
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC messages_byname<wchar_t> : public messages<wchar_t> {
+ friend class _Locale_impl;
+public:
+ typedef messages_base::catalog catalog;
+ typedef wstring string_type;
+
+ explicit messages_byname(const char* __name, size_t __refs = 0);
+
+protected:
+ ~messages_byname();
+
+ virtual catalog do_open(const string& __fn, const locale& __loc) const;
+ virtual string_type do_get(catalog __c, int __set, int __msgid,
+ const string_type& __dfault) const;
+ virtual void do_close(catalog __c) const;
+
+private:
+ messages_byname(_Locale_messages*);
+ typedef messages_byname<wchar_t> _Self;
+ //explicitely defined as private to avoid warnings:
+ messages_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _STLP_PRIV _Messages* _M_impl;
+};
+#endif /* WCHAR_T */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_MESSAGES_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_monetary.c b/6/sources/cxx-stl/stlport/stlport/stl/_monetary.c
new file mode 100644
index 0000000..3de937c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_monetary.c
@@ -0,0 +1,527 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_MONETARY_C
+#define _STLP_MONETARY_C
+
+# ifndef _STLP_INTERNAL_MONETARY_H
+# include <stl/_monetary.h>
+# endif
+
+#ifndef _STLP_INTERNAL_IOS_H
+# include <stl/_ios.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUM_PUT_H
+# include <stl/_num_put.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUM_GET_H
+# include <stl/_num_get.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _InputIterator>
+locale::id money_get<_CharT, _InputIterator>::id;
+
+template <class _CharT, class _OutputIterator>
+locale::id money_put<_CharT, _OutputIterator>::id;
+
+// money_get facets
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// helper functions for do_get
+template <class _InIt1, class _InIt2>
+pair<_InIt1, bool> __get_string( _InIt1 __first, _InIt1 __last,
+ _InIt2 __str_first, _InIt2 __str_last) {
+ while ( __first != __last && __str_first != __str_last && *__first == *__str_first ) {
+ ++__first;
+ ++__str_first;
+ }
+ return make_pair(__first, __str_first == __str_last);
+}
+
+template <class _InIt, class _OuIt, class _CharT>
+bool
+__get_monetary_value(_InIt& __first, _InIt __last, _OuIt __out_ite,
+ const ctype<_CharT>& _c_type,
+ _CharT __point, int __frac_digits, _CharT __sep,
+ const string& __grouping, bool &__syntax_ok) {
+ if (__first == __last || !_c_type.is(ctype_base::digit, *__first))
+ return false;
+
+ char __group_sizes[128];
+ char* __group_sizes_end = __grouping.empty()? 0 : __group_sizes;
+ char __current_group_size = 0;
+
+ while (__first != __last) {
+ if (_c_type.is(ctype_base::digit, *__first)) {
+ ++__current_group_size;
+ *__out_ite++ = *__first++;
+ }
+ else if (__group_sizes_end) {
+ if (*__first == __sep) {
+ *__group_sizes_end++ = __current_group_size;
+ __current_group_size = 0;
+ ++__first;
+ }
+ else break;
+ }
+ else
+ break;
+ }
+
+ if (__grouping.empty())
+ __syntax_ok = true;
+ else {
+ if (__group_sizes_end != __group_sizes)
+ *__group_sizes_end++ = __current_group_size;
+
+ __syntax_ok = __valid_grouping(__group_sizes, __group_sizes_end,
+ __grouping.data(), __grouping.data()+ __grouping.size());
+
+ if (__first == __last || *__first != __point) {
+ for (int __digits = 0; __digits != __frac_digits; ++__digits)
+ *__out_ite++ = _CharT('0');
+ return true; // OK not to have decimal point
+ }
+ }
+
+ ++__first;
+
+ int __digits = 0;
+
+ while (__first != __last && _c_type.is(ctype_base::digit, *__first)) {
+ *__out_ite++ = *__first++;
+ ++__digits;
+ }
+
+ __syntax_ok = __syntax_ok && (__digits == __frac_digits);
+
+ return true;
+}
+
+
+template <class _CharT, class _InputIter, class _StrType>
+_InputIter __money_do_get(_InputIter __s, _InputIter __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ _StrType& __digits, bool &__is_positive, _CharT* /*__dummy*/) {
+ if (__s == __end) {
+ __err |= ios_base::eofbit;
+ return __s;
+ }
+
+ typedef _CharT char_type;
+ typedef _StrType string_type;
+ typedef _InputIter iter_type;
+ typedef moneypunct<char_type, false> _Punct;
+ typedef moneypunct<char_type, true> _Punct_intl;
+ typedef ctype<char_type> _Ctype;
+
+ locale __loc = __str.getloc();
+ const _Punct& __punct = use_facet<_Punct>(__loc) ;
+ const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ;
+ const _Ctype& __c_type = use_facet<_Ctype>(__loc) ;
+
+ money_base::pattern __format = __intl ? __punct_intl.neg_format()
+ : __punct.neg_format();
+ string_type __ns = __intl ? __punct_intl.negative_sign()
+ : __punct.negative_sign();
+ string_type __ps = __intl ? __punct_intl.positive_sign()
+ : __punct.positive_sign();
+ int __i;
+ bool __symbol_required = (__str.flags() & ios_base::showbase) != 0;
+ string_type __buf;
+ back_insert_iterator<string_type> __out_ite(__buf);
+
+ for (__i = 0; __i < 4; ++__i) {
+ switch (__format.field[__i]) {
+ case money_base::space:
+ if (!__c_type.is(ctype_base::space, *__s)) {
+ __err = ios_base::failbit;
+ return __s;
+ }
+ ++__s;
+ case money_base::none:
+ while (__s != __end && __c_type.is(ctype_base::space, *__s))
+ ++__s;
+ break;
+ case money_base::symbol: {
+ string_type __curs = __intl ? __punct_intl.curr_symbol()
+ : __punct.curr_symbol();
+ pair<iter_type, bool>
+ __result = __get_string(__s, __end, __curs.begin(), __curs.end());
+ if (!__result.second && __symbol_required)
+ __err = ios_base::failbit;
+ __s = __result.first;
+ break;
+ }
+ case money_base::sign: {
+ if (__s == __end) {
+ if (__ps.empty())
+ break;
+ if (__ns.empty()) {
+ __is_positive = false;
+ break;
+ }
+ __err = ios_base::failbit;
+ return __s;
+ }
+ else {
+ if (__ps.empty()) {
+ if (__ns.empty())
+ break;
+ if (*__s == __ns[0]) {
+ ++__s;
+ __is_positive = false;
+ }
+ break;
+ }
+ else {
+ if (*__s == __ps[0]) {
+ ++__s;
+ break;
+ }
+ if (__ns.empty())
+ break;
+ if (*__s == __ns[0]) {
+ ++__s;
+ __is_positive = false;
+ break;
+ }
+ __err = ios_base::failbit;
+ }
+ }
+ return __s;
+ }
+ case money_base::value: {
+ char_type __point = __intl ? __punct_intl.decimal_point()
+ : __punct.decimal_point();
+ int __frac_digits = __intl ? __punct_intl.frac_digits()
+ : __punct.frac_digits();
+ string __grouping = __intl ? __punct_intl.grouping()
+ : __punct.grouping();
+ bool __syntax_ok = true;
+
+ bool __result;
+
+ char_type __sep = __grouping.empty() ? char_type() :
+ __intl ? __punct_intl.thousands_sep() : __punct.thousands_sep();
+
+ __result = __get_monetary_value(__s, __end, __out_ite, __c_type,
+ __point, __frac_digits,
+ __sep,
+ __grouping, __syntax_ok);
+
+ if (!__syntax_ok)
+ __err |= ios_base::failbit;
+ if (!__result) {
+ __err = ios_base::failbit;
+ return __s;
+ }
+ break;
+
+ } // Close money_base::value case
+ } // Close switch statement
+ } // Close for loop
+
+ if (__is_positive) {
+ if (__ps.size() > 1) {
+ pair<_InputIter, bool>
+ __result = __get_string(__s, __end, __ps.begin() + 1, __ps.end());
+ __s = __result.first;
+ if (!__result.second)
+ __err |= ios::failbit;
+ }
+ if (!(__err & ios_base::failbit))
+ __digits = __buf;
+ }
+ else {
+ if (__ns.size() > 1) {
+ pair<_InputIter, bool>
+ __result = __get_string(__s, __end, __ns.begin() + 1, __ns.end());
+ __s = __result.first;
+ if (!__result.second)
+ __err |= ios::failbit;
+ }
+ if (!(__err & ios::failbit)) {
+ __digits = __c_type.widen('-');
+ __digits += __buf;
+ }
+ }
+ if (__s == __end)
+ __err |= ios::eofbit;
+
+ return __s;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+//===== methods ======
+template <class _CharT, class _InputIter>
+_InputIter
+money_get<_CharT, _InputIter>::do_get(_InputIter __s, _InputIter __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ _STLP_LONGEST_FLOAT_TYPE& __units) const {
+ string_type __buf;
+ bool __is_positive = true;
+ __s = _STLP_PRIV __money_do_get(__s, __end, __intl, __str, __err, __buf, __is_positive, (_CharT*)0);
+
+ if (__err == ios_base::goodbit || __err == ios_base::eofbit) {
+ typename string_type::iterator __b = __buf.begin(), __e = __buf.end();
+
+ if (!__is_positive) ++__b;
+ // Can't use atold, since it might be wchar_t. Don't get confused by name below :
+ // it's perfectly capable of reading long double.
+ _STLP_PRIV __get_decimal_integer(__b, __e, __units, (_CharT*)0);
+
+ if (!__is_positive) {
+ __units = -__units;
+ }
+ }
+
+ return __s;
+}
+
+template <class _CharT, class _InputIter>
+_InputIter
+money_get<_CharT, _InputIter>::do_get(iter_type __s, iter_type __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ string_type& __digits) const {
+ bool __is_positive = true;
+ return _STLP_PRIV __money_do_get(__s, __end, __intl, __str, __err, __digits, __is_positive, (_CharT*)0);
+}
+
+// money_put facets
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT, class _OutputIter, class _Str_Type, class _Str>
+_OutputIter __money_do_put(_OutputIter __s, bool __intl, ios_base& __str,
+ _CharT __fill, const _Str& __digits, bool __check_digits,
+ _Str_Type * /*__dummy*/) {
+ typedef _CharT char_type;
+ typedef _Str_Type string_type;
+ typedef ctype<char_type> _Ctype;
+ typedef moneypunct<char_type, false> _Punct;
+ typedef moneypunct<char_type, true> _Punct_intl;
+
+ locale __loc = __str.getloc();
+ const _Ctype& __c_type = use_facet<_Ctype>(__loc) ;
+ const _Punct& __punct = use_facet<_Punct>(__loc) ;
+ const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ;
+
+ // some special characters
+ char_type __minus = __c_type.widen('-');
+ char_type __plus = __c_type.widen('+');
+ char_type __space = __c_type.widen(' ');
+ char_type __zero = __c_type.widen('0');
+ char_type __point = __intl ? __punct_intl.decimal_point()
+ : __punct.decimal_point();
+
+ char_type __sep = __intl ? __punct_intl.thousands_sep()
+ : __punct.thousands_sep();
+
+ string __grouping = __intl ? __punct_intl.grouping()
+ : __punct.grouping();
+
+ int __frac_digits = __intl ? __punct_intl.frac_digits()
+ : __punct.frac_digits();
+
+ string_type __curr_sym = __intl ? __punct_intl.curr_symbol()
+ : __punct.curr_symbol();
+
+ // if there are no digits we are going to return __s. If there
+ // are digits, but not enough to fill the frac_digits, we are
+ // going to add zeros. I don't know whether this is right or
+ // not.
+ if (__digits.empty())
+ return __s;
+
+ typename string_type::const_iterator __digits_first = __digits.begin();
+ typename string_type::const_iterator __digits_last = __digits.end();
+
+ bool __is_negative = *__digits_first == __minus;
+ if (__is_negative)
+ ++__digits_first;
+
+#if !defined (__BORLANDC__)
+ string_type __sign = __intl ? __is_negative ? __punct_intl.negative_sign()
+ : __punct_intl.positive_sign()
+ : __is_negative ? __punct.negative_sign()
+ : __punct.positive_sign();
+#else
+ string_type __sign;
+ if (__intl) {
+ if (__is_negative)
+ __sign = __punct_intl.negative_sign();
+ else
+ __sign = __punct_intl.positive_sign();
+ }
+ else {
+ if (__is_negative)
+ __sign = __punct.negative_sign();
+ else
+ __sign = __punct.positive_sign();
+ }
+#endif
+
+ if (__check_digits) {
+ typename string_type::const_iterator __cp = __digits_first;
+ while (__cp != __digits_last && __c_type.is(ctype_base::digit, *__cp))
+ ++__cp;
+ if (__cp == __digits_first)
+ return __s;
+ __digits_last = __cp;
+ }
+
+ // If grouping is required, we make a copy of __digits and
+ // insert the grouping.
+ _STLP_BASIC_IOSTRING(char_type) __new_digits;
+ if (!__grouping.empty()) {
+ __new_digits.assign(__digits_first, __digits_last);
+ __insert_grouping(__new_digits,
+ __new_digits.size() - __frac_digits,
+ __grouping,
+ __sep, __plus, __minus, 0);
+ __digits_first = __new_digits.begin(); // <<--
+ __digits_last = __new_digits.end(); // <<--
+ }
+
+ // Determine the amount of padding required, if any.
+ streamsize __width = __str.width();
+
+#if defined (_STLP_DEBUG) && (defined(__HP_aCC) && (__HP_aCC <= 1))
+ size_t __value_length = operator -(__digits_last, __digits_first);
+#else
+ size_t __value_length = __digits_last - __digits_first;
+#endif
+
+ size_t __length = __value_length + __sign.size();
+
+ if (__frac_digits != 0)
+ ++__length;
+
+ bool __generate_curr = (__str.flags() & ios_base::showbase) !=0;
+ if (__generate_curr)
+ __length += __curr_sym.size();
+ money_base::pattern __format = __intl ? (__is_negative ? __punct_intl.neg_format()
+ : __punct_intl.pos_format())
+ : (__is_negative ? __punct.neg_format()
+ : __punct.pos_format());
+ {
+ //For the moment the following is commented for decoding reason.
+ //No reason to add a space last if the money symbol do not have to be display
+ //if (__format.field[3] == (char) money_base::symbol && !__generate_curr) {
+ // if (__format.field[2] == (char) money_base::space) {
+ // __format.field[2] = (char) money_base::none;
+ // }
+ //}
+ //space can only be second or third and only once (22.2.6.3-1):
+ if ((__format.field[1] == (char) money_base::space) ||
+ (__format.field[2] == (char) money_base::space))
+ ++__length;
+ }
+
+ const bool __need_fill = (((sizeof(streamsize) > sizeof(size_t)) && (__STATIC_CAST(streamsize, __length) < __width)) ||
+ ((sizeof(streamsize) <= sizeof(size_t)) && (__length < __STATIC_CAST(size_t, __width))));
+ streamsize __fill_amt = __need_fill ? __width - __length : 0;
+
+ ios_base::fmtflags __fill_pos = __str.flags() & ios_base::adjustfield;
+
+ if (__fill_amt != 0 &&
+ !(__fill_pos & (ios_base::left | ios_base::internal)))
+ __s = _STLP_PRIV __fill_n(__s, __fill_amt, __fill);
+
+ for (int __i = 0; __i < 4; ++__i) {
+ char __ffield = __format.field[__i];
+ switch (__ffield) {
+ case money_base::space:
+ *__s++ = __space;
+ case money_base::none:
+ if (__fill_amt != 0 && __fill_pos == ios_base::internal)
+ __s = _STLP_PRIV __fill_n(__s, __fill_amt, __fill);
+ break;
+ case money_base::symbol:
+ if (__generate_curr)
+ __s = _STLP_STD::copy(__curr_sym.begin(), __curr_sym.end(), __s);
+ break;
+ case money_base::sign:
+ if (!__sign.empty())
+ *__s++ = __sign[0];
+ break;
+ case money_base::value:
+ if (__frac_digits == 0) {
+ __s = _STLP_STD::copy(__digits_first, __digits_last, __s);
+ } else {
+ if ((int)__value_length <= __frac_digits) {
+ // if we see '9' here, we should out 0.09
+ *__s++ = __zero; // integer part is zero
+ *__s++ = __point; // decimal point
+ __s = _STLP_PRIV __fill_n(__s, __frac_digits - __value_length, __zero); // zeros
+ __s = _STLP_STD::copy(__digits_first, __digits_last, __s); // digits
+ } else {
+ __s = _STLP_STD::copy(__digits_first, __digits_last - __frac_digits, __s);
+ if (__frac_digits != 0) {
+ *__s++ = __point;
+ __s = _STLP_STD::copy(__digits_last - __frac_digits, __digits_last, __s);
+ }
+ }
+ }
+ break;
+ } //Close for switch
+ } // Close for loop
+
+ // Ouput rest of sign if necessary.
+ if (__sign.size() > 1)
+ __s = _STLP_STD::copy(__sign.begin() + 1, __sign.end(), __s);
+ if (__fill_amt != 0 &&
+ !(__fill_pos & (ios_base::right | ios_base::internal)))
+ __s = _STLP_PRIV __fill_n(__s, __fill_amt, __fill);
+
+ return __s;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+money_put<_CharT, _OutputIter>
+ ::do_put(_OutputIter __s, bool __intl, ios_base& __str,
+ char_type __fill, _STLP_LONGEST_FLOAT_TYPE __units) const {
+ _STLP_BASIC_IOSTRING(char_type) __digits;
+ _STLP_PRIV __get_money_digits(__digits, __str, __units);
+ return _STLP_PRIV __money_do_put(__s, __intl, __str, __fill, __digits, false, __STATIC_CAST(string_type*, 0));
+}
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+money_put<_CharT, _OutputIter>
+ ::do_put(_OutputIter __s, bool __intl, ios_base& __str,
+ char_type __fill, const string_type& __digits) const {
+ return _STLP_PRIV __money_do_put(__s, __intl, __str, __fill, __digits, true, __STATIC_CAST(string_type*, 0));
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_MONETARY_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_monetary.h b/6/sources/cxx-stl/stlport/stlport/stl/_monetary.h
new file mode 100644
index 0000000..7b93010
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_monetary.h
@@ -0,0 +1,435 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_MONETARY_H
+#define _STLP_INTERNAL_MONETARY_H
+
+#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+# include <stl/_ostreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+# include <stl/_istreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_FACETS_FWD_H
+# include <stl/_facets_fwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+class money_base {
+public:
+ enum part {none, space, symbol, sign, value};
+ struct pattern {
+ char field[4];
+ };
+};
+
+// moneypunct facets: forward declaration
+template <class _charT, _STLP_DFL_NON_TYPE_PARAM(bool, _International, false) > class moneypunct {};
+
+// money_get facets
+
+template <class _CharT, class _InputIter>
+class money_get : public locale::facet {
+public:
+ typedef _CharT char_type;
+ typedef _InputIter iter_type;
+ typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
+
+ explicit money_get(size_t __refs = 0) : locale::facet(__refs) {}
+ iter_type get(iter_type __s, iter_type __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ _STLP_LONGEST_FLOAT_TYPE& __units) const
+ { return do_get(__s, __end, __intl, __str, __err, __units); }
+ iter_type get(iter_type __s, iter_type __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ string_type& __digits) const
+ { return do_get(__s, __end, __intl, __str, __err, __digits); }
+
+ static locale::id id;
+
+protected:
+ ~money_get() {}
+ virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ _STLP_LONGEST_FLOAT_TYPE& __units) const;
+ virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl,
+ ios_base& __str, ios_base::iostate& __err,
+ string_type& __digits) const;
+};
+
+
+// moneypunct facets: definition of specializations
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct<char, true> : public locale::facet, public money_base {
+public:
+ typedef char char_type;
+ typedef string string_type;
+ explicit moneypunct _STLP_PSPEC2(char, true) (size_t __refs = 0);
+
+ char decimal_point() const { return do_decimal_point(); }
+ char thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ string_type curr_symbol() const { return do_curr_symbol(); }
+ string_type positive_sign() const { return do_positive_sign(); }
+ string_type negative_sign() const { return do_negative_sign(); }
+ int frac_digits() const { return do_frac_digits(); }
+ pattern pos_format() const { return do_pos_format(); }
+ pattern neg_format() const { return do_neg_format(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+ _STLP_STATIC_CONSTANT(bool, intl = true);
+
+protected:
+ pattern _M_pos_format;
+ pattern _M_neg_format;
+
+ ~moneypunct _STLP_PSPEC2(char, true) ();
+
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string do_curr_symbol() const;
+
+ virtual string do_positive_sign() const;
+ virtual string do_negative_sign() const;
+ virtual int do_frac_digits() const;
+ virtual pattern do_pos_format() const;
+ virtual pattern do_neg_format() const;
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct<char, false> : public locale::facet, public money_base {
+public:
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit moneypunct _STLP_PSPEC2(char, false) (size_t __refs = 0);
+
+ char decimal_point() const { return do_decimal_point(); }
+ char thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ string_type curr_symbol() const { return do_curr_symbol(); }
+ string_type positive_sign() const { return do_positive_sign(); }
+ string_type negative_sign() const { return do_negative_sign(); }
+ int frac_digits() const { return do_frac_digits(); }
+ pattern pos_format() const { return do_pos_format(); }
+ pattern neg_format() const { return do_neg_format(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+ _STLP_STATIC_CONSTANT(bool, intl = false);
+
+protected:
+ pattern _M_pos_format;
+ pattern _M_neg_format;
+
+ ~moneypunct _STLP_PSPEC2(char, false) ();
+
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string do_curr_symbol() const;
+
+ virtual string do_positive_sign() const;
+ virtual string do_negative_sign() const;
+ virtual int do_frac_digits() const;
+ virtual pattern do_pos_format() const;
+ virtual pattern do_neg_format() const;
+};
+
+
+#ifndef _STLP_NO_WCHAR_T
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, true> : public locale::facet, public money_base {
+public:
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+ explicit moneypunct _STLP_PSPEC2(wchar_t, true) (size_t __refs = 0);
+ wchar_t decimal_point() const { return do_decimal_point(); }
+ wchar_t thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ string_type curr_symbol() const { return do_curr_symbol(); }
+ string_type positive_sign() const { return do_positive_sign(); }
+ string_type negative_sign() const { return do_negative_sign(); }
+ int frac_digits() const { return do_frac_digits(); }
+ pattern pos_format() const { return do_pos_format(); }
+ pattern neg_format() const { return do_neg_format(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+ _STLP_STATIC_CONSTANT(bool, intl = true);
+
+protected:
+ pattern _M_pos_format;
+ pattern _M_neg_format;
+
+ ~moneypunct _STLP_PSPEC2(wchar_t, true) ();
+
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+ virtual pattern do_pos_format() const;
+ virtual pattern do_neg_format() const;
+};
+
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, false> : public locale::facet, public money_base {
+public:
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+ explicit moneypunct _STLP_PSPEC2(wchar_t, false) (size_t __refs = 0);
+ wchar_t decimal_point() const { return do_decimal_point(); }
+ wchar_t thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ string_type curr_symbol() const { return do_curr_symbol(); }
+ string_type positive_sign() const { return do_positive_sign(); }
+ string_type negative_sign() const { return do_negative_sign(); }
+ int frac_digits() const { return do_frac_digits(); }
+ pattern pos_format() const { return do_pos_format(); }
+ pattern neg_format() const { return do_neg_format(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+ _STLP_STATIC_CONSTANT(bool, intl = false);
+
+protected:
+ pattern _M_pos_format;
+ pattern _M_neg_format;
+
+ ~moneypunct _STLP_PSPEC2(wchar_t, false) ();
+
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+ virtual pattern do_pos_format() const;
+ virtual pattern do_neg_format() const;
+};
+
+# endif
+
+template <class _charT, _STLP_DFL_NON_TYPE_PARAM(bool , _International , false) > class moneypunct_byname {};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct_byname<char, true> : public moneypunct<char, true> {
+ friend class _Locale_impl;
+public:
+ typedef money_base::pattern pattern;
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit moneypunct_byname _STLP_PSPEC2(char, true) (const char * __name, size_t __refs = 0);
+
+protected:
+ ~moneypunct_byname _STLP_PSPEC2(char, true) ();
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+
+private:
+ moneypunct_byname _STLP_PSPEC2(char, true) (_Locale_monetary *__monetary);
+
+ typedef moneypunct_byname<char, true> _Self;
+ //explicitely defined as private to avoid warnings:
+ moneypunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_monetary* _M_monetary;
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct_byname<char, false> : public moneypunct<char, false> {
+ friend class _Locale_impl;
+public:
+ typedef money_base::pattern pattern;
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit moneypunct_byname _STLP_PSPEC2(char, false) (const char * __name, size_t __refs = 0);
+
+protected:
+ ~moneypunct_byname _STLP_PSPEC2(char, false) ();
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+
+private:
+ moneypunct_byname _STLP_PSPEC2(char, false) (_Locale_monetary *__monetary);
+
+ typedef moneypunct_byname<char, false> _Self;
+ //explicitely defined as private to avoid warnings:
+ moneypunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_monetary* _M_monetary;
+};
+
+#if !defined (_STLP_NO_WCHAR_T)
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, true> : public moneypunct<wchar_t, true> {
+ friend class _Locale_impl;
+public:
+ typedef money_base::pattern pattern;
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit moneypunct_byname _STLP_PSPEC2(wchar_t, true) (const char * __name, size_t __refs = 0);
+
+protected:
+ ~moneypunct_byname _STLP_PSPEC2(wchar_t, true) ();
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+
+private:
+ moneypunct_byname _STLP_PSPEC2(wchar_t, true) (_Locale_monetary *__monetary);
+
+ typedef moneypunct_byname<wchar_t, true> _Self;
+ //explicitely defined as private to avoid warnings:
+ moneypunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_monetary* _M_monetary;
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, false> : public moneypunct<wchar_t, false> {
+ friend class _Locale_impl;
+public:
+ typedef money_base::pattern pattern;
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit moneypunct_byname _STLP_PSPEC2(wchar_t, false) (const char * __name, size_t __refs = 0);
+
+protected:
+ ~moneypunct_byname _STLP_PSPEC2(wchar_t, false) ();
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+
+ virtual string_type do_curr_symbol() const;
+
+ virtual string_type do_positive_sign() const;
+ virtual string_type do_negative_sign() const;
+ virtual int do_frac_digits() const;
+
+private:
+ moneypunct_byname _STLP_PSPEC2(wchar_t, false) (_Locale_monetary *__monetary);
+
+ typedef moneypunct_byname<wchar_t, false> _Self;
+ //explicitely defined as private to avoid warnings:
+ moneypunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_monetary* _M_monetary;
+};
+#endif
+
+//===== methods ======
+
+
+// money_put facets
+
+template <class _CharT, class _OutputIter>
+class money_put : public locale::facet {
+public:
+ typedef _CharT char_type;
+ typedef _OutputIter iter_type;
+ typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
+
+ explicit money_put(size_t __refs = 0) : locale::facet(__refs) {}
+ iter_type put(iter_type __s, bool __intl, ios_base& __str,
+ char_type __fill, _STLP_LONGEST_FLOAT_TYPE __units) const
+ { return do_put(__s, __intl, __str, __fill, __units); }
+ iter_type put(iter_type __s, bool __intl, ios_base& __str,
+ char_type __fill,
+ const string_type& __digits) const
+ { return do_put(__s, __intl, __str, __fill, __digits); }
+
+ static locale::id id;
+
+protected:
+ ~money_put() {}
+ virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str,
+ char_type __fill, _STLP_LONGEST_FLOAT_TYPE __units) const;
+ virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str,
+ char_type __fill,
+ const string_type& __digits) const;
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS money_get<char, istreambuf_iterator<char, char_traits<char> > >;
+_STLP_EXPORT_TEMPLATE_CLASS money_put<char, ostreambuf_iterator<char, char_traits<char> > >;
+# if ! defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+_STLP_EXPORT_TEMPLATE_CLASS money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+# endif
+#endif
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_monetary.c>
+#endif
+
+#endif /* _STLP_INTERNAL_MONETARY_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_move_construct_fwk.h b/6/sources/cxx-stl/stlport/stlport/stl/_move_construct_fwk.h
new file mode 100644
index 0000000..4a85fe3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_move_construct_fwk.h
@@ -0,0 +1,159 @@
+/*
+ *
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_MOVE_CONSTRUCT_FWK_H
+#define _STLP_MOVE_CONSTRUCT_FWK_H
+
+#ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+/*************************************************************
+ * Move constructor framework
+ *************************************************************/
+
+/*************************************************************
+ *Partial move:
+ *The source HAS to be a valid instance after the move!
+ *************************************************************/
+template <class _Tp>
+class __move_source {
+public:
+ explicit __move_source (_Tp &_src) : _M_data(_src)
+ {}
+
+ _Tp& get() const
+ { return _M_data; }
+private:
+ _Tp &_M_data;
+
+ //We explicitely forbid assignment to avoid warning:
+ typedef __move_source<_Tp> _Self;
+ _Self& operator = (_Self const&);
+};
+
+//Class used to signal move constructor support, implementation and type.
+template <class _Tp>
+struct __move_traits {
+ /*
+ * implemented tells if a the special move constructor has to be called or the classic
+ * copy constructor is just fine. Most of the time the copy constructor is fine only
+ * if the following info is true.
+ */
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && \
+ !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && \
+ !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename _IsSTLportClass<_Tp>::_Ret implemented;
+#else
+ typedef __false_type implemented;
+#endif
+ /*
+ * complete tells if the move is complete or partial, that is to say, does the source
+ * needs to be destroyed once it has been moved.
+ */
+# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x564)
+ typedef __type_traits<_Tp>::has_trivial_destructor _TpMoveComplete;
+ typedef typename __bool2type<__type2bool<_TpMoveComplete>::_Ret>::_Ret complete;
+# else
+ typedef typename __type_traits<_Tp>::has_trivial_destructor complete;
+# endif
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/*
+ * This struct should never be used if the user has not explicitely stipulated
+ * that its class support the full move concept. To check that the return type
+ * in such a case will be __invalid_source<_Tp> to generate a compile error
+ * revealing the configuration problem.
+ */
+template <class _Tp>
+struct _MoveSourceTraits {
+ typedef typename __move_traits<_Tp>::implemented _MvImpRet;
+#if defined (__BORLANDC__)
+ typedef typename __selectT<_MvImpRet,
+#else
+ enum {_MvImp = __type2bool<_MvImpRet>::_Ret};
+ typedef typename __select<_MvImp,
+#endif
+ __move_source<_Tp>,
+ _Tp const&>::_Ret _Type;
+};
+
+//The helper function
+template <class _Tp>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _MoveSourceTraits<_Tp>::_Type
+_AsMoveSource (_Tp &src) {
+ typedef typename _MoveSourceTraits<_Tp>::_Type _SrcType;
+ return _SrcType(src);
+}
+
+//Helper structs used for many class.
+template <class _Tp>
+struct __move_traits_aux {
+ typedef typename __move_traits<_Tp>::implemented implemented;
+ typedef typename __move_traits<_Tp>::complete complete;
+};
+
+template <class _Tp1, class _Tp2>
+struct __move_traits_aux2 {
+ typedef __move_traits<_Tp1> _MoveTraits1;
+ typedef __move_traits<_Tp2> _MoveTraits2;
+
+ typedef typename _Lor2<typename _MoveTraits1::implemented,
+ typename _MoveTraits2::implemented>::_Ret implemented;
+ typedef typename _Land2<typename _MoveTraits1::complete,
+ typename _MoveTraits2::complete>::_Ret complete;
+};
+
+/*
+ * Most of the time a class implement a move constructor but its use depends
+ * on a third party, this is what the following struct are for.
+ */
+template <class _Tp>
+struct __move_traits_help {
+ typedef __true_type implemented;
+ typedef typename __move_traits<_Tp>::complete complete;
+};
+
+template <class _Tp1, class _Tp2>
+struct __move_traits_help1 {
+ typedef __move_traits<_Tp1> _MoveTraits1;
+ typedef __move_traits<_Tp2> _MoveTraits2;
+
+ typedef typename _Lor2<typename _MoveTraits1::implemented,
+ typename _MoveTraits2::implemented>::_Ret implemented;
+ typedef typename _Land2<typename _MoveTraits1::complete,
+ typename _MoveTraits2::complete>::_Ret complete;
+};
+
+template <class _Tp1, class _Tp2>
+struct __move_traits_help2 {
+ typedef __move_traits<_Tp1> _MoveTraits1;
+ typedef __move_traits<_Tp2> _MoveTraits2;
+
+ typedef __true_type implemented;
+ typedef typename _Land2<typename _MoveTraits1::complete,
+ typename _MoveTraits2::complete>::_Ret complete;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_MOVE_CONSTRUCT_FWK_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_new.h b/6/sources/cxx-stl/stlport/stlport/stl/_new.h
new file mode 100644
index 0000000..94094cf
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_new.h
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_NEW
+#define _STLP_INTERNAL_NEW
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+// size_t
+# include <stl/_cstddef.h>
+#endif
+
+#if defined (__BORLANDC__) && (__BORLANDC__ < 0x570)
+// new.h uses ::malloc ;(
+# include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
+using _STLP_VENDOR_CSTD::malloc;
+#endif
+
+#if !defined (_STLP_NO_NEW_NEW_HEADER)
+// eMbedded Visual C++ .NET unfortunately uses _INC_NEW for both <new.h> and <new>
+// we undefine the symbol to get the stuff in the SDK's <new>
+# if defined (_STLP_WCE_NET) && defined (_INC_NEW)
+# undef _INC_NEW
+# endif
+
+# if defined (new)
+/* STLport cannot replace native Std library new header if new is a macro,
+ * please define new macro after <new> header inclusion.
+ */
+# error Cannot include native new header as new is a macro.
+# endif
+
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <new>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(new)
+# endif
+#else
+# include <new.h>
+#endif
+
+#if defined (_STLP_NO_BAD_ALLOC) && !defined (_STLP_NEW_DONT_THROW_BAD_ALLOC)
+# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
+#endif
+
+#if defined (_STLP_USE_EXCEPTIONS) && defined (_STLP_NEW_DONT_THROW_BAD_ALLOC)
+
+# ifndef _STLP_INTERNAL_EXCEPTION
+# include <stl/_exception.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+# if defined (_STLP_NO_BAD_ALLOC)
+struct nothrow_t {};
+# define nothrow nothrow_t()
+# endif
+
+/*
+ * STLport own bad_alloc exception to be used if the native C++ library
+ * do not define it or when the new operator do not throw it to avoid
+ * a useless library dependency.
+ */
+class bad_alloc : public exception {
+public:
+ bad_alloc () _STLP_NOTHROW_INHERENTLY { }
+ bad_alloc(const bad_alloc&) _STLP_NOTHROW_INHERENTLY { }
+ bad_alloc& operator=(const bad_alloc&) _STLP_NOTHROW_INHERENTLY {return *this;}
+ ~bad_alloc () _STLP_NOTHROW_INHERENTLY { }
+ const char* what() const _STLP_NOTHROW_INHERENTLY { return "bad alloc"; }
+};
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_USE_EXCEPTIONS && (_STLP_NO_BAD_ALLOC || _STLP_NEW_DONT_THROW_BAD_ALLOC) */
+
+#if defined (_STLP_USE_OWN_NAMESPACE)
+
+_STLP_BEGIN_NAMESPACE
+
+# if !defined (_STLP_NEW_DONT_THROW_BAD_ALLOC)
+using _STLP_VENDOR_EXCEPT_STD::bad_alloc;
+# endif
+
+# if !defined (_STLP_NO_BAD_ALLOC)
+using _STLP_VENDOR_EXCEPT_STD::nothrow_t;
+using _STLP_VENDOR_EXCEPT_STD::nothrow;
+# if defined (_STLP_GLOBAL_NEW_HANDLER)
+using ::new_handler;
+using ::set_new_handler;
+# else
+using _STLP_VENDOR_EXCEPT_STD::new_handler;
+using _STLP_VENDOR_EXCEPT_STD::set_new_handler;
+# endif
+# endif /* !_STLP_NO_BAD_ALLOC */
+
+_STLP_END_NAMESPACE
+#endif /* _STLP_USE_OWN_NAMESPACE */
+
+#ifndef _STLP_THROW_BAD_ALLOC
+# if !defined (_STLP_USE_EXCEPTIONS)
+# ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+# endif
+# define _STLP_THROW_BAD_ALLOC puts("out of memory\n"); exit(1)
+# else
+# define _STLP_THROW_BAD_ALLOC _STLP_THROW(_STLP_STD::bad_alloc())
+# endif
+#endif
+
+#if defined (_STLP_NO_NEW_NEW_HEADER) || defined (_STLP_NEW_DONT_THROW_BAD_ALLOC)
+# define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x; if (__y == 0) { _STLP_THROW_BAD_ALLOC; } return __y
+#else
+# define _STLP_CHECK_NULL_ALLOC(__x) return __x
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if ((defined (__IBMCPP__) || defined (__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined (_STLP_DEBUG_ALLOC))
+inline void* _STLP_CALL __stl_new(size_t __n) { _STLP_CHECK_NULL_ALLOC(::operator new(__n, __FILE__, __LINE__)); }
+inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p, __FILE__, __LINE__); }
+#else
+inline void* _STLP_CALL __stl_new(size_t __n) { _STLP_CHECK_NULL_ALLOC(::operator new(__n)); }
+inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p); }
+#endif
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_NEW */
+
+/*
+ * Local Variables:
+ * mode:C++
+ * End:
+ */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_num_get.c b/6/sources/cxx-stl/stlport/stlport/stl/_num_get.c
new file mode 100644
index 0000000..1e7d234
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_num_get.c
@@ -0,0 +1,623 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_NUM_GET_C
+#define _STLP_NUM_GET_C
+
+#ifndef _STLP_INTERNAL_NUM_GET_H
+# include <stl/_num_get.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_DECLSPEC unsigned char _STLP_CALL __digit_val_table(unsigned);
+_STLP_DECLSPEC const char* _STLP_CALL __narrow_atoms();
+
+// __do_get_integer, __do_get_float and its helper functions.
+
+inline bool _STLP_CALL __get_fdigit(char __c, const char*)
+{ return __c >= '0' && __c <= '9'; }
+
+inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *__digits) {
+ if (__c == __sep) {
+ __c = ',' ;
+ return true ;
+ }
+ else
+ return __get_fdigit(__c, __digits);
+}
+
+inline int _STLP_CALL
+__get_digit_from_table(unsigned __index)
+{ return (__index > 127 ? 0xFF : __digit_val_table(__index)); }
+
+template <class _InputIter, class _CharT>
+int
+__get_base_or_zero(_InputIter& __in_ite, _InputIter& __end,
+ ios_base::fmtflags __flags, const ctype<_CharT>& __c_type) {
+ _CharT __atoms[5];
+ __c_type.widen(__narrow_atoms(), __narrow_atoms() + 5, __atoms);
+
+ bool __negative = false;
+ _CharT __c = *__in_ite;
+
+ if (__c == __atoms[1] /* __xminus_char */ ) {
+ __negative = true;
+ ++__in_ite;
+ }
+ else if (__c == __atoms[0] /* __xplus_char */ )
+ ++__in_ite;
+
+ int __base;
+ int __valid_zero = 0;
+
+ ios_base::fmtflags __basefield = __flags & ios_base::basefield;
+
+ switch (__basefield) {
+ case ios_base::oct:
+ __base = 8;
+ break;
+ case ios_base::dec:
+ __base = 10;
+ break;
+ case ios_base::hex:
+ __base = 16;
+ if (__in_ite != __end && *__in_ite == __atoms[2] /* __zero_char */ ) {
+ ++__in_ite;
+ if (__in_ite != __end &&
+ (*__in_ite == __atoms[3] /* __x_char */ || *__in_ite == __atoms[4] /* __X_char */ ))
+ ++__in_ite;
+ else
+ __valid_zero = 1; // That zero is valid by itself.
+ }
+ break;
+ default:
+ if (__in_ite != __end && *__in_ite == __atoms[2] /* __zero_char */ ) {
+ ++__in_ite;
+ if (__in_ite != __end &&
+ (*__in_ite == __atoms[3] /* __x_char */ || *__in_ite == __atoms[4] /* __X_char */ )) {
+ ++__in_ite;
+ __base = 16;
+ }
+ else
+ {
+ __base = 8;
+ __valid_zero = 1; // That zero is still valid by itself.
+ }
+ }
+ else
+ __base = 10;
+ break;
+ }
+ return (__base << 2) | ((int)__negative << 1) | __valid_zero;
+}
+
+
+template <class _InputIter, class _Integer, class _CharT>
+bool _STLP_CALL
+__get_integer(_InputIter& __first, _InputIter& __last,
+ int __base, _Integer& __val,
+ int __got, bool __is_negative, _CharT __separator, const string& __grouping, const __true_type& /*_IsSigned*/) {
+ bool __ovflow = false;
+ _Integer __result = 0;
+ bool __is_group = !__grouping.empty();
+ char __group_sizes[64];
+ char __current_group_size = 0;
+ char* __group_sizes_end = __group_sizes;
+
+ _Integer __over_base = (numeric_limits<_Integer>::min)() / __STATIC_CAST(_Integer, __base);
+
+ for ( ; __first != __last ; ++__first) {
+
+ const _CharT __c = *__first;
+
+ if (__is_group && __c == __separator) {
+ *__group_sizes_end++ = __current_group_size;
+ __current_group_size = 0;
+ continue;
+ }
+
+ int __n = __get_digit_from_table(__c);
+
+ if (__n >= __base)
+ break;
+
+ ++__got;
+ ++__current_group_size;
+
+ if (__result < __over_base)
+ __ovflow = true; // don't need to keep accumulating
+ else {
+ _Integer __next = __STATIC_CAST(_Integer, __base * __result - __n);
+ if (__result != 0)
+ __ovflow = __ovflow || __next >= __result;
+ __result = __next;
+ }
+ }
+
+ if (__is_group && __group_sizes_end != __group_sizes) {
+ *__group_sizes_end++ = __current_group_size;
+ }
+
+ // fbp : added to not modify value if nothing was read
+ if (__got > 0) {
+ __val = __ovflow ? __is_negative ? (numeric_limits<_Integer>::min)()
+ : (numeric_limits<_Integer>::max)()
+ : __is_negative ? __result
+ : __STATIC_CAST(_Integer, -__result);
+ }
+ // overflow is being treated as failure
+ return ((__got > 0) && !__ovflow) &&
+ (__is_group == 0 ||
+ __valid_grouping(__group_sizes, __group_sizes_end,
+ __grouping.data(), __grouping.data()+ __grouping.size()));
+}
+
+template <class _InputIter, class _Integer, class _CharT>
+bool _STLP_CALL
+__get_integer(_InputIter& __first, _InputIter& __last,
+ int __base, _Integer& __val,
+ int __got, bool __is_negative, _CharT __separator, const string& __grouping, const __false_type& /*_IsSigned*/) {
+ bool __ovflow = false;
+ _Integer __result = 0;
+ bool __is_group = !__grouping.empty();
+ char __group_sizes[64];
+ char __current_group_size = 0;
+ char* __group_sizes_end = __group_sizes;
+
+ _Integer __over_base = (numeric_limits<_Integer>::max)() / __STATIC_CAST(_Integer, __base);
+
+ for ( ; __first != __last ; ++__first) {
+
+ const _CharT __c = *__first;
+
+ if (__is_group && __c == __separator) {
+ *__group_sizes_end++ = __current_group_size;
+ __current_group_size = 0;
+ continue;
+ }
+
+ int __n = __get_digit_from_table(__c);
+
+ if (__n >= __base)
+ break;
+
+ ++__got;
+ ++__current_group_size;
+
+ if (__result > __over_base)
+ __ovflow = true; //don't need to keep accumulating
+ else {
+ _Integer __next = __STATIC_CAST(_Integer, __base * __result + __n);
+ if (__result != 0)
+ __ovflow = __ovflow || __next <= __result;
+ __result = __next;
+ }
+ }
+
+ if (__is_group && __group_sizes_end != __group_sizes) {
+ *__group_sizes_end++ = __current_group_size;
+ }
+
+ // fbp : added to not modify value if nothing was read
+ if (__got > 0) {
+ __val = __ovflow ? (numeric_limits<_Integer>::max)()
+ : (__is_negative ? __STATIC_CAST(_Integer, -__result)
+ : __result);
+ }
+
+ // overflow is being treated as failure
+ return ((__got > 0) && !__ovflow) &&
+ (__is_group == 0 ||
+ __valid_grouping(__group_sizes, __group_sizes_end,
+ __grouping.data(), __grouping.data()+ __grouping.size()));
+}
+
+
+template <class _InputIter, class _Integer, class _CharT>
+bool _STLP_CALL
+__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val, _CharT* /*dummy*/) {
+ string __grp;
+ //Here there is no grouping so separator is not important, we just pass the default character.
+ return __get_integer(__first, __last, 10, __val, 0, false, _CharT() /*separator*/, __grp, __false_type());
+}
+
+template <class _InputIter, class _Integer, class _CharT>
+_InputIter _STLP_CALL
+__do_get_integer(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
+ ios_base::iostate& __err, _Integer& __val, _CharT* /*__pc*/) {
+ locale __loc = __str.getloc();
+ const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
+
+#if defined (__HP_aCC) && (__HP_aCC == 1)
+ bool _IsSigned = !((_Integer)(-1) > 0);
+#else
+ typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned;
+#endif
+
+ const int __base_or_zero = __get_base_or_zero(__in_ite, __end, __str.flags(), __ctype);
+ int __got = __base_or_zero & 1;
+
+ bool __result;
+
+ if (__in_ite == __end) { // We may have already read a 0. If so,
+
+ if (__got > 0) { // the result is 0 even if we're at eof.
+ __val = 0;
+ __result = true;
+ }
+ else
+ __result = false;
+ }
+ else {
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc);
+ const bool __negative = (__base_or_zero & 2) != 0;
+ const int __base = __base_or_zero >> 2;
+
+#if defined (__HP_aCC) && (__HP_aCC == 1)
+ if (_IsSigned)
+ __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __true_type() );
+ else
+ __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), __false_type() );
+#else
+ __result = __get_integer(__in_ite, __end, __base, __val, __got, __negative, __np.thousands_sep(), __np.grouping(), _IsSigned());
+# endif
+ }
+
+ __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit);
+
+ if (__in_ite == __end)
+ __err |= ios_base::eofbit;
+ return __in_ite;
+}
+
+// __read_float and its helper functions.
+template <class _InputIter, class _CharT>
+_InputIter _STLP_CALL
+__copy_sign(_InputIter __first, _InputIter __last, __iostring& __v,
+ _CharT __xplus, _CharT __xminus) {
+ if (__first != __last) {
+ _CharT __c = *__first;
+ if (__c == __xplus)
+ ++__first;
+ else if (__c == __xminus) {
+ __v.push_back('-');
+ ++__first;
+ }
+ }
+ return __first;
+}
+
+
+template <class _InputIter, class _CharT>
+bool _STLP_CALL
+__copy_digits(_InputIter& __first, _InputIter __last,
+ __iostring& __v, const _CharT* __digits) {
+ bool __ok = false;
+
+ for ( ; __first != __last; ++__first) {
+ _CharT __c = *__first;
+ if (__get_fdigit(__c, __digits)) {
+ __v.push_back((char)__c);
+ __ok = true;
+ }
+ else
+ break;
+ }
+ return __ok;
+}
+
+template <class _InputIter, class _CharT>
+bool _STLP_CALL
+__copy_grouped_digits(_InputIter& __first, _InputIter __last,
+ __iostring& __v, const _CharT * __digits,
+ _CharT __sep, const string& __grouping,
+ bool& __grouping_ok) {
+ bool __ok = false;
+ char __group_sizes[64];
+ char*__group_sizes_end = __group_sizes;
+ char __current_group_size = 0;
+
+ for ( ; __first != __last; ++__first) {
+ _CharT __c = *__first;
+ bool __tmp = __get_fdigit_or_sep(__c, __sep, __digits);
+ if (__tmp) {
+ if (__c == ',') {
+ *__group_sizes_end++ = __current_group_size;
+ __current_group_size = 0;
+ }
+ else {
+ __ok = true;
+ __v.push_back((char)__c);
+ ++__current_group_size;
+ }
+ }
+ else
+ break;
+ }
+
+ if (__group_sizes_end != __group_sizes)
+ *__group_sizes_end++ = __current_group_size;
+ __grouping_ok = __valid_grouping(__group_sizes, __group_sizes_end, __grouping.data(), __grouping.data() + __grouping.size());
+ return __ok;
+}
+
+
+template <class _InputIter, class _CharT>
+bool _STLP_CALL
+__read_float(__iostring& __buf, _InputIter& __in_ite, _InputIter& __end,
+ const ctype<_CharT> &__ct, const numpunct<_CharT> &__numpunct) {
+ // Create a string, copying characters of the form
+ // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)?
+
+ string __grouping = __numpunct.grouping();
+ bool __digits_before_dot /* = false */;
+ bool __digits_after_dot = false;
+ bool __ok;
+
+ bool __grouping_ok = true;
+
+ _CharT __dot = __numpunct.decimal_point();
+ _CharT __sep = __numpunct.thousands_sep();
+
+ _CharT __digits[10];
+ _CharT __xplus;
+ _CharT __xminus;
+
+ _CharT __pow_e;
+ _CharT __pow_E;
+
+ _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits);
+
+ // Get an optional sign
+ __in_ite = __copy_sign(__in_ite, __end, __buf, __xplus, __xminus);
+
+ // Get an optional string of digits.
+ if (!__grouping.empty())
+ __digits_before_dot = __copy_grouped_digits(__in_ite, __end, __buf, __digits,
+ __sep, __grouping, __grouping_ok);
+ else
+ __digits_before_dot = __copy_digits(__in_ite, __end, __buf, __digits);
+
+ // Get an optional decimal point, and an optional string of digits.
+ if (__in_ite != __end && *__in_ite == __dot) {
+ __buf.push_back('.');
+ ++__in_ite;
+ __digits_after_dot = __copy_digits(__in_ite, __end, __buf, __digits);
+ }
+
+ // There have to be some digits, somewhere.
+ __ok = __digits_before_dot || __digits_after_dot;
+
+ // Get an optional exponent.
+ if (__ok && __in_ite != __end && (*__in_ite == __pow_e || *__in_ite == __pow_E)) {
+ __buf.push_back('e');
+ ++__in_ite;
+ __in_ite = __copy_sign(__in_ite, __end, __buf, __xplus, __xminus);
+ __ok = __copy_digits(__in_ite, __end, __buf, __digits);
+ // If we have an exponent then the sign
+ // is optional but the digits aren't.
+ }
+
+ return __ok;
+}
+
+template <class _InputIter, class _Float, class _CharT>
+_InputIter _STLP_CALL
+__do_get_float(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
+ ios_base::iostate& __err, _Float& __val, _CharT* /*__pc*/) {
+ locale __loc = __str.getloc();
+ const ctype<_CharT> &__ctype = use_facet<ctype<_CharT> >(__loc);
+ const numpunct<_CharT> &__numpunct = use_facet<numpunct<_CharT> >(__loc);
+
+ __iostring __buf ;
+ bool __ok = __read_float(__buf, __in_ite, __end, __ctype, __numpunct);
+ if (__ok) {
+ __string_to_float(__buf, __val);
+ __err = ios_base::goodbit;
+ }
+ else {
+ __err = ios_base::failbit;
+ }
+ if (__in_ite == __end)
+ __err |= ios_base::eofbit;
+ return __in_ite;
+}
+
+template <class _InputIter, class _CharT>
+_InputIter _STLP_CALL
+__do_get_alphabool(_InputIter& __in_ite, _InputIter& __end, ios_base& __str,
+ ios_base::iostate& __err, bool& __x, _CharT* /*__pc*/) {
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__str.getloc());
+ const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > __truename = __np.truename();
+ const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > __falsename = __np.falsename();
+ bool __true_ok = true;
+ bool __false_ok = true;
+
+ size_t __n = 0;
+ for ( ; __in_ite != __end; ++__in_ite) {
+ _CharT __c = *__in_ite;
+ __true_ok = __true_ok && (__c == __truename[__n]);
+ __false_ok = __false_ok && (__c == __falsename[__n]);
+ ++__n;
+
+ if ((!__true_ok && !__false_ok) ||
+ (__true_ok && __n >= __truename.size()) ||
+ (__false_ok && __n >= __falsename.size())) {
+ ++__in_ite;
+ break;
+ }
+ }
+ if (__true_ok && __n < __truename.size()) __true_ok = false;
+ if (__false_ok && __n < __falsename.size()) __false_ok = false;
+
+ if (__true_ok || __false_ok) {
+ __err = ios_base::goodbit;
+ __x = __true_ok;
+ }
+ else
+ __err = ios_base::failbit;
+
+ if (__in_ite == __end)
+ __err |= ios_base::eofbit;
+
+ return __in_ite;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+//
+// num_get<>, num_put<>
+//
+
+template <class _CharT, class _InputIterator>
+locale::id num_get<_CharT, _InputIterator>::id;
+
+#if !defined (_STLP_NO_BOOL)
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end,
+ ios_base& __s, ios_base::iostate& __err, bool& __x) const {
+ if (__s.flags() & ios_base::boolalpha) {
+ return _STLP_PRIV __do_get_alphabool(__in_ite, __end, __s, __err, __x, (_CharT*)0);
+ }
+ else {
+ long __lx;
+ _InputIter __tmp = _STLP_PRIV __do_get_integer(__in_ite, __end, __s, __err, __lx, (_CharT*)0 );
+ if (!(__err & ios_base::failbit)) {
+ if (__lx == 0)
+ __x = false;
+ else if (__lx == 1)
+ __x = true;
+ else
+ __err |= ios_base::failbit;
+ }
+ return __tmp;
+ }
+}
+#endif
+
+#if defined (_STLP_FIX_LIBRARY_ISSUES)
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, short& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, int& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+#endif
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, long& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ unsigned short& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ unsigned int& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ unsigned long& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ float& __val) const
+{ return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ double& __val) const
+{ return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ long double& __val) const
+{ return _STLP_PRIV __do_get_float(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+#endif
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ void*& __p) const {
+#if defined (_STLP_LONG_LONG) && !defined (__MRC__) //*ty 12/07/2001 - MrCpp can not cast from long long to void*
+ unsigned _STLP_LONG_LONG __val;
+#else
+ unsigned long __val;
+#endif
+ iter_type __tmp = _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 );
+ if (!(__err & ios_base::failbit))
+ __p = __REINTERPRET_CAST(void*, __val);
+ return __tmp;
+}
+
+#if defined (_STLP_LONG_LONG)
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ _STLP_LONG_LONG& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+
+template <class _CharT, class _InputIter>
+_InputIter
+num_get<_CharT, _InputIter>::do_get(_InputIter __in_ite, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err,
+ unsigned _STLP_LONG_LONG& __val) const
+{ return _STLP_PRIV __do_get_integer(__in_ite, __end, __str, __err, __val, (_CharT*)0 ); }
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_NUMERIC_FACETS_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_num_get.h b/6/sources/cxx-stl/stlport/stlport/stl/_num_get.h
new file mode 100644
index 0000000..95f7935
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_num_get.h
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_NUM_GET_H
+#define _STLP_INTERNAL_NUM_GET_H
+
+#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+# include <stl/_istreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUMPUNCT_H
+# include <stl/_numpunct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CTYPE_H
+# include <stl/_ctype.h>
+#endif
+
+#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H
+# include <stl/_iostream_string.h>
+#endif
+
+#ifndef _STLP_FACETS_FWD_H
+# include <stl/_facets_fwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// num_get facets
+
+template <class _CharT, class _InputIter>
+class num_get: public locale::facet {
+public:
+ typedef _CharT char_type;
+ typedef _InputIter iter_type;
+
+ explicit num_get(size_t __refs = 0): locale::facet(__refs) {}
+
+#if !defined (_STLP_NO_BOOL)
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, bool& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+#endif
+
+#if defined (_STLP_FIX_LIBRARY_ISSUES)
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, short& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, int& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+#endif
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, long& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned short& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned int& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned long& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+#if defined (_STLP_LONG_LONG)
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, _STLP_LONG_LONG& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+#endif /* _STLP_LONG_LONG */
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, float& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, double& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, long double& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+# endif
+
+ _InputIter get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, void*& __val) const
+ { return do_get(__ii, __end, __str, __err, __val); }
+
+ static locale::id id;
+
+protected:
+ ~num_get() {}
+
+ typedef string string_type;
+ typedef ctype<_CharT> _Ctype;
+ typedef numpunct<_CharT> _Numpunct;
+
+#if !defined (_STLP_NO_BOOL)
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, bool& __val) const;
+#endif
+
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, long& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned short& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned int& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned long& __val) const;
+
+#if defined (_STLP_FIX_LIBRARY_ISSUES)
+ // issue 118 : those are actually not supposed to be here
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, short& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, int& __val) const;
+#endif
+
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, float& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, double& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, void*& __p) const;
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, long double& __val) const;
+#endif
+
+#if defined (_STLP_LONG_LONG)
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, _STLP_LONG_LONG& __val) const;
+ virtual _InputIter do_get(_InputIter __ii, _InputIter __end, ios_base& __str,
+ ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const;
+#endif
+
+};
+
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS num_get<char, istreambuf_iterator<char, char_traits<char> > >;
+// _STLP_EXPORT_TEMPLATE_CLASS num_get<char, const char*>;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+// _STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, const wchar_t*>;
+# endif
+#endif
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_DECLSPEC bool _STLP_CALL __valid_grouping(const char*, const char*, const char*, const char*);
+
+template <class _InputIter, class _Integer, class _CharT>
+bool _STLP_CALL
+__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val, _CharT*);
+
+# if !defined (_STLP_NO_WCHAR_T)
+bool _STLP_DECLSPEC _STLP_CALL __get_fdigit(wchar_t&, const wchar_t*);
+bool _STLP_DECLSPEC _STLP_CALL __get_fdigit_or_sep(wchar_t&, wchar_t, const wchar_t*);
+# endif
+
+inline void _STLP_CALL
+_Initialize_get_float(const ctype<char>&,
+ char& Plus, char& Minus,
+ char& pow_e, char& pow_E,
+ char*) {
+ Plus = '+';
+ Minus = '-';
+ pow_e = 'e';
+ pow_E = 'E';
+}
+
+# if !defined (_STLP_NO_WCHAR_T)
+void _STLP_DECLSPEC _STLP_CALL _Initialize_get_float(const ctype<wchar_t>&,
+ wchar_t&, wchar_t&, wchar_t&, wchar_t&, wchar_t*);
+# endif
+void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, float&);
+void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, double&);
+# if !defined (_STLP_NO_LONG_DOUBLE)
+void _STLP_DECLSPEC _STLP_CALL __string_to_float(const __iostring&, long double&);
+# endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */
+
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_num_get.c>
+#endif
+
+#endif /* _STLP_INTERNAL_NUM_GET_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_num_put.c b/6/sources/cxx-stl/stlport/stlport/stl/_num_put.c
new file mode 100644
index 0000000..0c07838
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_num_put.c
@@ -0,0 +1,522 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_NUM_PUT_C
+#define _STLP_NUM_PUT_C
+
+#ifndef _STLP_INTERNAL_NUM_PUT_H
+# include <stl/_num_put.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// __do_put_float and its helper functions. Strategy: write the output
+// to a buffer of char, transform the buffer to _CharT, and then copy
+// it to the output.
+
+//----------------------------------------------------------------------
+// num_put facet
+
+template <class _CharT, class _OutputIter>
+_OutputIter _STLP_CALL
+__copy_float_and_fill(const _CharT* __first, const _CharT* __last,
+ _OutputIter __oi,
+ ios_base::fmtflags __flags,
+ streamsize __width, _CharT __fill,
+ _CharT __xplus, _CharT __xminus) {
+ if (__width <= __last - __first)
+ return _STLP_STD::copy(__first, __last, __oi);
+ else {
+ streamsize __pad = __width - (__last - __first);
+ ios_base::fmtflags __dir = __flags & ios_base::adjustfield;
+
+ if (__dir == ios_base::left) {
+ __oi = _STLP_STD::copy(__first, __last, __oi);
+ return _STLP_PRIV __fill_n(__oi, __pad, __fill);
+ }
+ else if (__dir == ios_base::internal && __first != __last &&
+ (*__first == __xplus || *__first == __xminus)) {
+ *__oi++ = *__first++;
+ __oi = _STLP_PRIV __fill_n(__oi, __pad, __fill);
+ return _STLP_STD::copy(__first, __last, __oi);
+ }
+ else {
+ __oi = _STLP_PRIV __fill_n(__oi, __pad, __fill);
+ return _STLP_STD::copy(__first, __last, __oi);
+ }
+ }
+}
+
+#if !defined (_STLP_NO_WCHAR_T)
+// Helper routine for wchar_t
+template <class _OutputIter>
+_OutputIter _STLP_CALL
+__put_float(__iostring &__str, _OutputIter __oi,
+ ios_base& __f, wchar_t __fill,
+ wchar_t __decimal_point, wchar_t __sep,
+ size_t __group_pos, const string& __grouping) {
+ const ctype<wchar_t>& __ct = use_facet<ctype<wchar_t> >(__f.getloc());
+
+ __iowstring __wbuf;
+ __convert_float_buffer(__str, __wbuf, __ct, __decimal_point);
+
+ if (!__grouping.empty()) {
+ __insert_grouping(__wbuf, __group_pos, __grouping,
+ __sep, __ct.widen('+'), __ct.widen('-'), 0);
+ }
+
+ return __copy_float_and_fill(__wbuf.data(), __wbuf.data() + __wbuf.size(), __oi,
+ __f.flags(), __f.width(0), __fill, __ct.widen('+'), __ct.widen('-'));
+}
+#endif /* WCHAR_T */
+
+// Helper routine for char
+template <class _OutputIter>
+_OutputIter _STLP_CALL
+__put_float(__iostring &__str, _OutputIter __oi,
+ ios_base& __f, char __fill,
+ char __decimal_point, char __sep,
+ size_t __group_pos, const string& __grouping) {
+ if ((__group_pos < __str.size()) && (__str[__group_pos] == '.')) {
+ __str[__group_pos] = __decimal_point;
+ }
+
+ if (!__grouping.empty()) {
+ __insert_grouping(__str, __group_pos,
+ __grouping, __sep, '+', '-', 0);
+ }
+
+ return __copy_float_and_fill(__str.data(), __str.data() + __str.size(), __oi,
+ __f.flags(), __f.width(0), __fill, '+', '-');
+}
+
+template <class _CharT, class _OutputIter, class _Float>
+_OutputIter _STLP_CALL
+__do_put_float(_OutputIter __s, ios_base& __f,
+ _CharT __fill, _Float __x) {
+ __iostring __buf;
+
+ size_t __group_pos = __write_float(__buf, __f.flags(), (int)__f.precision(), __x);
+
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__f.getloc());
+ return __put_float(__buf, __s, __f, __fill,
+ __np.decimal_point(), __np.thousands_sep(),
+ __group_pos, __np.grouping());
+}
+
+inline void __get_money_digits_aux (__iostring &__buf, ios_base &, _STLP_LONGEST_FLOAT_TYPE __x)
+{ __get_floor_digits(__buf, __x); }
+
+#if !defined (_STLP_NO_WCHAR_T)
+inline void __get_money_digits_aux (__iowstring &__wbuf, ios_base &__f, _STLP_LONGEST_FLOAT_TYPE __x) {
+ __iostring __buf;
+ __get_floor_digits(__buf, __x);
+
+ const ctype<wchar_t>& __ct = use_facet<ctype<wchar_t> >(__f.getloc());
+ __convert_float_buffer(__buf, __wbuf, __ct, wchar_t(0), false);
+}
+#endif
+
+template <class _CharT>
+void _STLP_CALL __get_money_digits(_STLP_BASIC_IOSTRING(_CharT) &__buf, ios_base& __f, _STLP_LONGEST_FLOAT_TYPE __x)
+{ __get_money_digits_aux(__buf, __f, __x); }
+
+// _M_do_put_integer and its helper functions.
+
+template <class _CharT, class _OutputIter>
+_OutputIter _STLP_CALL
+__copy_integer_and_fill(const _CharT* __buf, ptrdiff_t __len,
+ _OutputIter __oi,
+ ios_base::fmtflags __flg, streamsize __wid, _CharT __fill,
+ _CharT __xplus, _CharT __xminus) {
+ if (__len >= __wid)
+ return _STLP_STD::copy(__buf, __buf + __len, __oi);
+ else {
+ //casting numeric_limits<ptrdiff_t>::max to streamsize only works is ptrdiff_t is signed or streamsize representation
+ //is larger than ptrdiff_t one.
+ _STLP_STATIC_ASSERT((sizeof(streamsize) > sizeof(ptrdiff_t)) ||
+ ((sizeof(streamsize) == sizeof(ptrdiff_t)) && numeric_limits<ptrdiff_t>::is_signed))
+ ptrdiff_t __pad = __STATIC_CAST(ptrdiff_t, (min) (__STATIC_CAST(streamsize, (numeric_limits<ptrdiff_t>::max)()),
+ __STATIC_CAST(streamsize, __wid - __len)));
+ ios_base::fmtflags __dir = __flg & ios_base::adjustfield;
+
+ if (__dir == ios_base::left) {
+ __oi = _STLP_STD::copy(__buf, __buf + __len, __oi);
+ return _STLP_PRIV __fill_n(__oi, __pad, __fill);
+ }
+ else if (__dir == ios_base::internal && __len != 0 &&
+ (__buf[0] == __xplus || __buf[0] == __xminus)) {
+ *__oi++ = __buf[0];
+ __oi = __fill_n(__oi, __pad, __fill);
+ return _STLP_STD::copy(__buf + 1, __buf + __len, __oi);
+ }
+ else if (__dir == ios_base::internal && __len >= 2 &&
+ (__flg & ios_base::showbase) &&
+ (__flg & ios_base::basefield) == ios_base::hex) {
+ *__oi++ = __buf[0];
+ *__oi++ = __buf[1];
+ __oi = __fill_n(__oi, __pad, __fill);
+ return _STLP_STD::copy(__buf + 2, __buf + __len, __oi);
+ }
+ else {
+ __oi = __fill_n(__oi, __pad, __fill);
+ return _STLP_STD::copy(__buf, __buf + __len, __oi);
+ }
+ }
+}
+
+#if !defined (_STLP_NO_WCHAR_T)
+// Helper function for wchar_t
+template <class _OutputIter>
+_OutputIter _STLP_CALL
+__put_integer(char* __buf, char* __iend, _OutputIter __s,
+ ios_base& __f,
+ ios_base::fmtflags __flags, wchar_t __fill) {
+ locale __loc = __f.getloc();
+ const ctype<wchar_t>& __ct = use_facet<ctype<wchar_t> >(__loc);
+
+ wchar_t __xplus = __ct.widen('+');
+ wchar_t __xminus = __ct.widen('-');
+
+ wchar_t __wbuf[64];
+ __ct.widen(__buf, __iend, __wbuf);
+ ptrdiff_t __len = __iend - __buf;
+ wchar_t* __eend = __wbuf + __len;
+
+ const numpunct<wchar_t>& __np = use_facet<numpunct<wchar_t> >(__loc);
+ const string& __grouping = __np.grouping();
+
+ if (!__grouping.empty()) {
+ int __basechars;
+ if (__flags & ios_base::showbase)
+ switch (__flags & ios_base::basefield) {
+ case ios_base::hex: __basechars = 2; break;
+ case ios_base::oct: __basechars = 1; break;
+ default: __basechars = 0;
+ }
+ else
+ __basechars = 0;
+
+ __len = __insert_grouping(__wbuf, __eend, __grouping, __np.thousands_sep(),
+ __xplus, __xminus, __basechars);
+ }
+
+ return __copy_integer_and_fill((wchar_t*)__wbuf, __len, __s,
+ __flags, __f.width(0), __fill, __xplus, __xminus);
+}
+#endif
+
+// Helper function for char
+template <class _OutputIter>
+_OutputIter _STLP_CALL
+__put_integer(char* __buf, char* __iend, _OutputIter __s,
+ ios_base& __f, ios_base::fmtflags __flags, char __fill) {
+ char __grpbuf[64];
+ ptrdiff_t __len = __iend - __buf;
+
+ const numpunct<char>& __np = use_facet<numpunct<char> >(__f.getloc());
+ const string& __grouping = __np.grouping();
+
+ if (!__grouping.empty()) {
+ int __basechars;
+ if (__flags & ios_base::showbase)
+ switch (__flags & ios_base::basefield) {
+ case ios_base::hex: __basechars = 2; break;
+ case ios_base::oct: __basechars = 1; break;
+ default: __basechars = 0;
+ }
+ else
+ __basechars = 0;
+
+ // make sure there is room at the end of the buffer
+ // we pass to __insert_grouping
+ _STLP_STD::copy(__buf, __iend, (char *) __grpbuf);
+ __buf = __grpbuf;
+ __iend = __grpbuf + __len;
+ __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(),
+ '+', '-', __basechars);
+ }
+
+ return __copy_integer_and_fill(__buf, __len, __s, __flags, __f.width(0), __fill, '+', '-');
+}
+
+#if defined (_STLP_LONG_LONG)
+typedef _STLP_LONG_LONG __max_int_t;
+typedef unsigned _STLP_LONG_LONG __umax_int_t;
+#else
+typedef long __max_int_t;
+typedef unsigned long __umax_int_t;
+#endif
+
+_STLP_DECLSPEC const char* _STLP_CALL __hex_char_table_lo();
+_STLP_DECLSPEC const char* _STLP_CALL __hex_char_table_hi();
+
+template <class _Integer>
+inline char* _STLP_CALL
+__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __true_type& /* is_signed */) {
+ const bool __negative = __x < 0 ;
+ __max_int_t __temp = __x;
+ __umax_int_t __utemp = __negative?-__temp:__temp;
+
+ for (; __utemp != 0; __utemp /= 10)
+ *--__ptr = (char)((int)(__utemp % 10) + '0');
+ // put sign if needed or requested
+ if (__negative)
+ *--__ptr = '-';
+ else if (__flags & ios_base::showpos)
+ *--__ptr = '+';
+ return __ptr;
+}
+
+template <class _Integer>
+inline char* _STLP_CALL
+__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __false_type& /* is_signed */) {
+ for (; __x != 0; __x /= 10)
+ *--__ptr = (char)((int)(__x % 10) + '0');
+ // put sign if requested
+ if (__flags & ios_base::showpos)
+ *--__ptr = '+';
+ return __ptr;
+}
+
+template <class _Integer>
+char* _STLP_CALL
+__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x) {
+ char* __ptr = __buf;
+
+ if (__x == 0) {
+ *--__ptr = '0';
+ if ((__flags & ios_base::showpos) && ((__flags & (ios_base::oct | ios_base::hex)) == 0))
+ *--__ptr = '+';
+ // oct or hex base shall not be added to the 0 value (see '#' flag in C formating strings)
+ }
+ else {
+ switch (__flags & ios_base::basefield) {
+ case ios_base::oct:
+ {
+ __umax_int_t __temp = __x;
+ // if the size of integer is less than 8, clear upper part
+ if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 )
+ __temp &= 0xFFFFFFFF;
+
+ for (; __temp != 0; __temp >>=3)
+ *--__ptr = (char)((((unsigned)__temp)& 0x7) + '0');
+
+ // put leading '0' if showbase is set
+ if (__flags & ios_base::showbase)
+ *--__ptr = '0';
+ }
+ break;
+ case ios_base::hex:
+ {
+ const char* __table_ptr = (__flags & ios_base::uppercase) ?
+ __hex_char_table_hi() : __hex_char_table_lo();
+ __umax_int_t __temp = __x;
+ // if the size of integer is less than 8, clear upper part
+ if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 )
+ __temp &= 0xFFFFFFFF;
+
+ for (; __temp != 0; __temp >>=4)
+ *--__ptr = __table_ptr[((unsigned)__temp & 0xF)];
+
+ if (__flags & ios_base::showbase) {
+ *--__ptr = __table_ptr[16];
+ *--__ptr = '0';
+ }
+ }
+ break;
+ //case ios_base::dec:
+ default:
+ {
+#if defined(__HP_aCC) && (__HP_aCC == 1)
+ bool _IsSigned = !((_Integer)-1 > 0);
+ if (_IsSigned)
+ __ptr = __write_decimal_backward(__ptr, __x, __flags, __true_type() );
+ else
+ __ptr = __write_decimal_backward(__ptr, __x, __flags, __false_type() );
+#else
+ typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned;
+ __ptr = __write_decimal_backward(__ptr, __x, __flags, _IsSigned());
+#endif
+ }
+ break;
+ }
+ }
+
+ // return pointer to beginning of the string
+ return __ptr;
+}
+
+template <class _CharT, class _OutputIter, class _Integer>
+_OutputIter _STLP_CALL
+__do_put_integer(_OutputIter __s, ios_base& __f, _CharT __fill, _Integer __x) {
+ // buffer size = number of bytes * number of digit necessary in the smallest Standard base (base 8, 3 digits/byte)
+ // plus the longest base representation '0x'
+ // Do not use __buf_size to define __buf static buffer, some compilers (HP aCC) do not accept const variable as
+ // the specification of a static buffer size.
+ char __buf[sizeof(_Integer) * 3 + 2];
+ const ptrdiff_t __buf_size = sizeof(__buf) / sizeof(char);
+ ios_base::fmtflags __flags = __f.flags();
+ char* __ibeg = __write_integer_backward((char*)__buf + __buf_size, __flags, __x);
+ return __put_integer(__ibeg, (char*)__buf + __buf_size, __s, __f, __flags, __fill);
+}
+
+template <class _CharT, class _OutputIter>
+_OutputIter _STLP_CALL
+__do_put_bool(_OutputIter __s, ios_base& __f, _CharT __fill, bool __x) {
+ const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__f.getloc());
+
+ basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > __str = __x ? __np.truename() : __np.falsename();
+
+ streamsize __wid = __f.width(0);
+ if (__str.size() >= __STATIC_CAST(size_t, __wid))
+ return _STLP_STD::copy(__str.begin(), __str.end(), __s);
+ else {
+ streamsize __pad = __wid - __str.size();
+ ios_base::fmtflags __dir = __f.flags() & ios_base::adjustfield;
+
+ if (__dir == ios_base::left) {
+ __s = _STLP_STD::copy(__str.begin(), __str.end(), __s);
+ return __fill_n(__s, __pad, __fill);
+ }
+ else /* covers right and internal padding */ {
+ __s = __fill_n(__s, __pad, __fill);
+ return _STLP_STD::copy(__str.begin(), __str.end(), __s);
+ }
+ }
+}
+_STLP_MOVE_TO_STD_NAMESPACE
+
+//
+// num_put<>
+//
+
+template <class _CharT, class _OutputIterator>
+locale::id num_put<_CharT, _OutputIterator>::id;
+
+#if !defined (_STLP_NO_BOOL)
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ bool __val) const {
+ if (!(__f.flags() & ios_base::boolalpha))
+ // 22.2.2.2.2.23: shall return do_put for int and not directly __do_put_integer.
+ return do_put(__s, __f, __fill, __STATIC_CAST(long, __val));
+
+ return _STLP_PRIV __do_put_bool(__s, __f, __fill, __val);
+}
+#endif
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ long __val) const
+{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ unsigned long __val) const
+{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ double __val) const
+{ return _STLP_PRIV __do_put_float(__s, __f, __fill, __val); }
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ long double __val) const
+{ return _STLP_PRIV __do_put_float(__s, __f, __fill, __val); }
+#endif
+
+#if defined (_STLP_LONG_LONG)
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ _STLP_LONG_LONG __val) const
+{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }
+
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ unsigned _STLP_LONG_LONG __val) const
+{ return _STLP_PRIV __do_put_integer(__s, __f, __fill, __val); }
+#endif /* _STLP_LONG_LONG */
+
+
+// 22.2.2.2.2 Stage 1: "For conversion from void* the specifier is %p."
+// This is not clear and I'm really don't follow this (below).
+template <class _CharT, class _OutputIter>
+_OutputIter
+num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT /*__fill*/,
+ const void* __val) const {
+ const ctype<_CharT>& __c_type = use_facet<ctype<_CharT> >(__f.getloc());
+ ios_base::fmtflags __save_flags = __f.flags();
+
+ __f.setf(ios_base::hex, ios_base::basefield);
+ __f.setf(ios_base::showbase);
+ __f.setf(ios_base::internal, ios_base::adjustfield);
+ __f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix
+ if ( __val == 0 ) {
+ // base ('0x') not shown for null, but I really want to type it
+ // for pointer. Print it first in this case.
+ const char* __table_ptr = (__save_flags & ios_base::uppercase) ?
+ _STLP_PRIV __hex_char_table_hi() : _STLP_PRIV __hex_char_table_lo();
+ __s++ = __c_type.widen( '0' );
+ __s++ = __c_type.widen( __table_ptr[16] );
+ __f.width((sizeof(void*) * 2)); // digits in pointer type
+ } else {
+ __f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix
+ }
+#if defined (_STLP_MSVC)
+# pragma warning (push)
+# pragma warning (disable : 4311) //pointer truncation from 'const void*' to 'unsigned long'
+#endif
+ _OutputIter result =
+#ifdef _STLP_LONG_LONG
+ ( sizeof(void*) == sizeof(unsigned long) ) ?
+#endif
+ _STLP_PRIV __do_put_integer(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned long,__val))
+#ifdef _STLP_LONG_LONG
+ : /* ( sizeof(void*) == sizeof(unsigned _STLP_LONG_LONG) ) ? */
+ _STLP_PRIV __do_put_integer(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val))
+#endif
+ ;
+#if defined (_STLP_MSVC)
+# pragma warning (pop)
+#endif
+ __f.flags(__save_flags);
+ return result;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_NUM_PUT_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_num_put.h b/6/sources/cxx-stl/stlport/stlport/stl/_num_put.h
new file mode 100644
index 0000000..29bfc01
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_num_put.h
@@ -0,0 +1,187 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_NUM_PUT_H
+#define _STLP_INTERNAL_NUM_PUT_H
+
+#ifndef _STLP_INTERNAL_NUMPUNCT_H
+# include <stl/_numpunct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CTYPE_H
+# include <stl/_ctype.h>
+#endif
+
+#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+# include <stl/_ostreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H
+# include <stl/_iostream_string.h>
+#endif
+
+#ifndef _STLP_FACETS_FWD_H
+# include <stl/_facets_fwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// num_put facet
+
+template <class _CharT, class _OutputIter>
+class num_put: public locale::facet {
+public:
+ typedef _CharT char_type;
+ typedef _OutputIter iter_type;
+
+ explicit num_put(size_t __refs = 0) : locale::facet(__refs) {}
+
+#if !defined (_STLP_NO_BOOL)
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ bool __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+#endif
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ long __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned long __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+
+#if defined (_STLP_LONG_LONG)
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ _STLP_LONG_LONG __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ unsigned _STLP_LONG_LONG __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+#endif
+
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ double __val) const {
+ return do_put(__s, __f, __fill, (double)__val);
+ }
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ long double __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+#endif
+
+ iter_type put(iter_type __s, ios_base& __f, char_type __fill,
+ const void * __val) const {
+ return do_put(__s, __f, __fill, __val);
+ }
+
+ static locale::id id;
+
+protected:
+ ~num_put() {}
+#if !defined (_STLP_NO_BOOL)
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const;
+#endif
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const;
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const;
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const;
+#if !defined (_STLP_NO_LONG_DOUBLE)
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const;
+#endif
+
+#if defined (_STLP_LONG_LONG)
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const;
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
+ unsigned _STLP_LONG_LONG __val) const ;
+#endif
+ virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const;
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS num_put<char, ostreambuf_iterator<char, char_traits<char> > >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+# endif
+#endif
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Integer>
+char* _STLP_CALL
+__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x);
+
+/*
+ * Returns the position on the right of the digits that has to be considered
+ * for the application of the grouping policy.
+ */
+extern size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, double);
+# if !defined (_STLP_NO_LONG_DOUBLE)
+extern size_t _STLP_CALL __write_float(__iostring&, ios_base::fmtflags, int, long double);
+# endif
+
+/*
+ * Gets the digits of the integer part.
+ */
+void _STLP_CALL __get_floor_digits(__iostring&, _STLP_LONGEST_FLOAT_TYPE);
+
+template <class _CharT>
+void _STLP_CALL __get_money_digits(_STLP_BASIC_IOSTRING(_CharT)&, ios_base&, _STLP_LONGEST_FLOAT_TYPE);
+
+# if !defined (_STLP_NO_WCHAR_T)
+extern void _STLP_CALL __convert_float_buffer(__iostring const&, __iowstring&, const ctype<wchar_t>&, wchar_t, bool = true);
+# endif
+extern void _STLP_CALL __adjust_float_buffer(__iostring&, char);
+
+extern char* _STLP_CALL
+__write_integer(char* buf, ios_base::fmtflags flags, long x);
+
+extern ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int);
+extern void _STLP_CALL __insert_grouping(__iostring&, size_t, const string&, char, char, char, int);
+# if !defined (_STLP_NO_WCHAR_T)
+extern ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int);
+extern void _STLP_CALL __insert_grouping(__iowstring&, size_t, const string&, wchar_t, wchar_t, wchar_t, int);
+# endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_num_put.c>
+#endif
+
+#endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_numeric.c b/6/sources/cxx-stl/stlport/stlport/stl/_numeric.c
new file mode 100644
index 0000000..6bd07ff
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_numeric.c
@@ -0,0 +1,106 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_NUMERIC_C
+#define _STLP_NUMERIC_C
+
+#ifndef _STLP_INTERNAL_NUMERIC_H
+# include <stl/_numeric.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator, class _Tp,
+ class _BinaryOperation>
+_OutputIterator
+__partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) {
+ _STLP_DEBUG_CHECK(__check_range(__first, __last))
+ if (__first == __last) return __result;
+ *__result = *__first;
+
+ _Tp __val = *__first;
+ while (++__first != __last) {
+ __val = __binary_op(__val, *__first);
+ *++__result = __val;
+ }
+ return ++__result;
+}
+
+template <class _InputIterator, class _OutputIterator, class _Tp,
+ class _BinaryOperation>
+_OutputIterator
+__adjacent_difference(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Tp*,
+ _BinaryOperation __binary_op) {
+ _STLP_DEBUG_CHECK(__check_range(__first, __last))
+ if (__first == __last) return __result;
+ *__result = *__first;
+ _Tp __val = *__first;
+ while (++__first != __last) {
+ _Tp __tmp = *__first;
+ *++__result = __binary_op(__tmp, __val);
+ __val = __tmp;
+ }
+ return ++__result;
+}
+
+
+template <class _Tp, class _Integer, class _MonoidOperation>
+_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr) {
+ _STLP_MPWFIX_TRY
+ if (__n == 0)
+ return __identity_element(__opr);
+ else {
+ while ((__n & 1) == 0) {
+ __n >>= 1;
+ __x = __opr(__x, __x);
+ }
+ _Tp __result = __x;
+ _STLP_MPWFIX_TRY
+ __n >>= 1;
+ while (__n != 0) {
+ __x = __opr(__x, __x);
+ if ((__n & 1) != 0)
+ __result = __opr(__result, __x);
+ __n >>= 1;
+ }
+ return __result;
+ _STLP_MPWFIX_CATCH
+ }
+ _STLP_MPWFIX_CATCH_ACTION(__x = _Tp())
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_NUMERIC_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_numeric.h b/6/sources/cxx-stl/stlport/stlport/stl/_numeric.h
new file mode 100644
index 0000000..4844da1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_numeric.h
@@ -0,0 +1,191 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_NUMERIC_H
+#define _STLP_INTERNAL_NUMERIC_H
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _InputIterator, class _Tp>
+_STLP_INLINE_LOOP
+_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ _Init = _Init + *__first;
+ return _Init;
+}
+
+template <class _InputIterator, class _Tp, class _BinaryOperation>
+_STLP_INLINE_LOOP
+_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init,
+ _BinaryOperation __binary_op) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ for ( ; __first != __last; ++__first)
+ _Init = __binary_op(_Init, *__first);
+ return _Init;
+}
+
+template <class _InputIterator1, class _InputIterator2, class _Tp>
+_STLP_INLINE_LOOP
+_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _Tp _Init) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2)
+ _Init = _Init + (*__first1 * *__first2);
+ return _Init;
+}
+
+template <class _InputIterator1, class _InputIterator2, class _Tp,
+ class _BinaryOperation1, class _BinaryOperation2>
+_STLP_INLINE_LOOP
+_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _Tp _Init,
+ _BinaryOperation1 __binary_op1,
+ _BinaryOperation2 __binary_op2) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first1, __last1))
+ for ( ; __first1 != __last1; ++__first1, ++__first2)
+ _Init = __binary_op1(_Init, __binary_op2(*__first1, *__first2));
+ return _Init;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator, class _Tp,
+ class _BinaryOperation>
+_OutputIterator
+__partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Tp*, _BinaryOperation __binary_op);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator>
+inline _OutputIterator
+partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result) {
+ return _STLP_PRIV __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator),
+ _STLP_PRIV __plus(_STLP_VALUE_TYPE(__first, _InputIterator)));
+}
+
+template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
+inline _OutputIterator
+partial_sum(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _BinaryOperation __binary_op) {
+ return _STLP_PRIV __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator),
+ __binary_op);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator, class _Tp,
+ class _BinaryOperation>
+_OutputIterator
+__adjacent_difference(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _Tp*,
+ _BinaryOperation __binary_op);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIterator, class _OutputIterator>
+inline _OutputIterator
+adjacent_difference(_InputIterator __first,
+ _InputIterator __last, _OutputIterator __result) {
+ return _STLP_PRIV __adjacent_difference(__first, __last, __result,
+ _STLP_VALUE_TYPE(__first, _InputIterator),
+ _STLP_PRIV __minus(_STLP_VALUE_TYPE(__first, _InputIterator)));
+}
+
+template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
+_OutputIterator
+adjacent_difference(_InputIterator __first, _InputIterator __last,
+ _OutputIterator __result, _BinaryOperation __binary_op) {
+ return _STLP_PRIV __adjacent_difference(__first, __last, __result,
+ _STLP_VALUE_TYPE(__first, _InputIterator),
+ __binary_op);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Integer, class _MonoidOperation>
+_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if !defined (_STLP_NO_EXTENSIONS)
+
+// Returns __x ** __n, where __n >= 0. _Note that "multiplication"
+// is required to be associative, but not necessarily commutative.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Integer>
+inline _Tp __power(_Tp __x, _Integer __n) {
+ return __power(__x, __n, multiplies<_Tp>());
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// Alias for the internal name __power. Note that power is an extension,
+// not part of the C++ standard.
+template <class _Tp, class _Integer, class _MonoidOperation>
+inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr) {
+ return _STLP_PRIV __power(__x, __n, __opr);
+}
+
+template <class _Tp, class _Integer>
+inline _Tp power(_Tp __x, _Integer __n) {
+ return _STLP_PRIV __power(__x, __n, multiplies<_Tp>());
+}
+
+// iota is not part of the C++ standard. It is an extension.
+
+template <class _ForwardIterator, class _Tp>
+_STLP_INLINE_LOOP
+void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __val) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ while (__first != __last)
+ *__first++ = __val++;
+}
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_numeric.c>
+#endif
+
+#endif /* _STLP_INTERNAL_NUMERIC_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_numpunct.h b/6/sources/cxx-stl/stlport/stlport/stl/_numpunct.h
new file mode 100644
index 0000000..c0d0ff4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_numpunct.h
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_NUMPUNCT_H
+#define _STLP_INTERNAL_NUMPUNCT_H
+
+#ifndef _STLP_IOS_BASE_H
+# include <stl/_ios_base.h>
+#endif
+
+# ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+# endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// numpunct facets
+
+template <class _CharT> class numpunct {};
+template <class _CharT> class numpunct_byname {};
+template <class _Ch, class _InIt> class num_get;
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC numpunct<char> : public locale::facet {
+public:
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit numpunct(size_t __refs = 0)
+ : locale::facet(__refs) {}
+
+ char decimal_point() const { return do_decimal_point(); }
+ char thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ string truename() const { return do_truename(); }
+ string falsename() const { return do_falsename(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~numpunct();
+
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+ virtual string do_truename() const;
+ virtual string do_falsename() const;
+};
+
+# if ! defined (_STLP_NO_WCHAR_T)
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC numpunct<wchar_t> : public locale::facet {
+public:
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit numpunct(size_t __refs = 0)
+ : locale::facet(__refs) {}
+
+ wchar_t decimal_point() const { return do_decimal_point(); }
+ wchar_t thousands_sep() const { return do_thousands_sep(); }
+ string grouping() const { return do_grouping(); }
+ wstring truename() const { return do_truename(); }
+ wstring falsename() const { return do_falsename(); }
+
+ static _STLP_STATIC_DECLSPEC locale::id id;
+
+protected:
+ ~numpunct();
+
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+ virtual wstring do_truename() const;
+ virtual wstring do_falsename() const;
+};
+
+# endif /* WCHAR_T */
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC numpunct_byname<char> : public numpunct<char> {
+ friend class _Locale_impl;
+public:
+ typedef char char_type;
+ typedef string string_type;
+
+ explicit numpunct_byname(const char* __name, size_t __refs = 0);
+
+protected:
+
+ ~numpunct_byname();
+
+ virtual char do_decimal_point() const;
+ virtual char do_thousands_sep() const;
+ virtual string do_grouping() const;
+ virtual string do_truename() const;
+ virtual string do_falsename() const;
+
+private:
+ numpunct_byname(_Locale_numeric *__numeric)
+ : _M_numeric(__numeric) {}
+
+ //explicitely defined as private to avoid warnings:
+ typedef numpunct_byname<char> _Self;
+ numpunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_numeric* _M_numeric;
+};
+
+# ifndef _STLP_NO_WCHAR_T
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC numpunct_byname<wchar_t>: public numpunct<wchar_t> {
+ friend class _Locale_impl;
+public:
+ typedef wchar_t char_type;
+ typedef wstring string_type;
+
+ explicit numpunct_byname(const char* __name, size_t __refs = 0);
+
+protected:
+ ~numpunct_byname();
+
+ virtual wchar_t do_decimal_point() const;
+ virtual wchar_t do_thousands_sep() const;
+ virtual string do_grouping() const;
+ virtual wstring do_truename() const;
+ virtual wstring do_falsename() const;
+
+private:
+ numpunct_byname(_Locale_numeric *__numeric)
+ : _M_numeric(__numeric) {}
+
+ //explicitely defined as private to avoid warnings:
+ typedef numpunct_byname<wchar_t> _Self;
+ numpunct_byname(_Self const&);
+ _Self& operator = (_Self const&);
+
+ _Locale_numeric* _M_numeric;
+};
+
+# endif /* WCHAR_T */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_NUMPUNCT_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ostream.c b/6/sources/cxx-stl/stlport/stlport/stl/_ostream.c
new file mode 100644
index 0000000..faba6c2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ostream.c
@@ -0,0 +1,455 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_OSTREAM_C
+#define _STLP_OSTREAM_C
+
+#ifndef _STLP_INTERNAL_OSTREAM_H
+# include <stl/_ostream.h>
+#endif
+
+#if !defined (_STLP_INTERNAL_NUM_PUT_H)
+# include <stl/_num_put.h> // For basic_streambuf and iterators
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Definitions of non-inline member functions.
+
+// Constructor, destructor
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambuf<_CharT, _Traits>* __buf)
+ : basic_ios<_CharT, _Traits>() {
+ this->init(__buf);
+}
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>::~basic_ostream()
+{}
+
+// Output directly from a streambuf.
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>&
+basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<_CharT, _Traits>* __from) {
+ sentry __sentry(*this);
+ if (__sentry) {
+ if (__from) {
+ bool __any_inserted = __from->gptr() != __from->egptr()
+ ? this->_M_copy_buffered(__from, this->rdbuf())
+ : this->_M_copy_unbuffered(__from, this->rdbuf());
+ if (!__any_inserted)
+ this->setstate(ios_base::failbit);
+ }
+ else
+ this->setstate(ios_base::badbit);
+ }
+
+ return *this;
+}
+
+// Helper functions for the streambuf version of operator<<. The
+// exception-handling code is complicated because exceptions thrown
+// while extracting characters are treated differently than exceptions
+// thrown while inserting characters.
+
+template <class _CharT, class _Traits>
+bool basic_ostream<_CharT, _Traits>
+ ::_M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from,
+ basic_streambuf<_CharT, _Traits>* __to) {
+ bool __any_inserted = false;
+
+ while (__from->egptr() != __from->gptr()) {
+ const ptrdiff_t __avail = __from->egptr() - __from->gptr();
+
+ streamsize __nwritten;
+ _STLP_TRY {
+ __nwritten = __to->sputn(__from->gptr(), __avail);
+ __from->gbump((int)__nwritten);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ return __any_inserted;
+ }
+
+ if (__nwritten == __avail) {
+ _STLP_TRY {
+ if (this->_S_eof(__from->sgetc()))
+ return true;
+ else
+ __any_inserted = true;
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::failbit);
+ return false;
+ }
+ }
+ else if (__nwritten != 0)
+ return true;
+ else
+ return __any_inserted;
+ }
+
+ // No characters are in the buffer, but we aren't at EOF. Switch to
+ // unbuffered mode.
+ return __any_inserted || this->_M_copy_unbuffered(__from, __to);
+}
+
+/*
+ * Helper struct (guard) to put back a character in a streambuf
+ * whenever an exception or an eof occur.
+ */
+template <class _CharT, class _Traits>
+struct _SPutBackC {
+ typedef basic_streambuf<_CharT, _Traits> _StreamBuf;
+ typedef typename _StreamBuf::int_type int_type;
+ _SPutBackC(_StreamBuf *pfrom)
+ : __pfrom(pfrom), __c(0), __do_guard(false) {}
+ ~_SPutBackC() {
+ if (__do_guard) {
+ __pfrom->sputbackc(_Traits::to_char_type(__c));
+ }
+ }
+
+ void guard(int_type c) {
+ __c = c;
+ __do_guard = true;
+ }
+ void release() {
+ __do_guard = false;
+ }
+
+private:
+ _StreamBuf *__pfrom;
+ int_type __c;
+ bool __do_guard;
+};
+
+template <class _CharT, class _Traits>
+bool basic_ostream<_CharT, _Traits>
+ ::_M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from,
+ basic_streambuf<_CharT, _Traits>* __to) {
+ typedef _SPutBackC<_CharT, _Traits> _SPutBackCGuard;
+ bool __any_inserted = false;
+ int_type __c;
+
+ _STLP_TRY {
+ _SPutBackCGuard __cguard(__from);
+ for (;;) {
+ _STLP_TRY {
+ __c = __from->sbumpc();
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::failbit);
+ break;
+ }
+
+ if (this->_S_eof(__c))
+ break;
+
+ __cguard.guard(__c);
+#if defined (__DMC__)
+ _STLP_TRY {
+#endif
+ if (this->_S_eof(__to->sputc(_Traits::to_char_type(__c))))
+ break;
+
+#if defined (__DMC__)
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ break;
+ }
+#endif
+ __cguard.release();
+ __any_inserted = true;
+ }
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ return __any_inserted;
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Helper function for numeric output.
+template <class _CharT, class _Traits, class _Number>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+__put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x) {
+ typedef typename basic_ostream<_CharT, _Traits>::sentry _Sentry;
+ _Sentry __sentry(__os);
+ bool __failed = true;
+
+ if (__sentry) {
+ _STLP_TRY {
+ typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > _NumPut;
+ __failed = (use_facet<_NumPut>(__os.getloc())).put(ostreambuf_iterator<_CharT, _Traits>(__os.rdbuf()),
+ __os, __os.fill(),
+ __x).failed();
+ }
+ _STLP_CATCH_ALL {
+ __os._M_handle_exception(ios_base::badbit);
+ }
+ }
+ if (__failed)
+ __os.setstate(ios_base::badbit);
+ return __os;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+/*
+ * In the following operators we try to limit code bloat by limiting the
+ * number of __put_num instanciations.
+ */
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(short __x) {
+ _STLP_STATIC_ASSERT( sizeof(short) <= sizeof(long) )
+ long __tmp = ((this->flags() & _Basic_ios::basefield) != ios_base::dec) ?
+ __STATIC_CAST(long, __STATIC_CAST(unsigned short, __x)): __x;
+ return _STLP_PRIV __put_num(*this, __tmp);
+}
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(unsigned short __x) {
+ _STLP_STATIC_ASSERT( sizeof(unsigned short) <= sizeof(unsigned long) )
+ return _STLP_PRIV __put_num(*this, __STATIC_CAST(unsigned long,__x));
+}
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(int __x) {
+ _STLP_STATIC_ASSERT( sizeof(int) <= sizeof(long) )
+ long __tmp = ((this->flags() & _Basic_ios::basefield) != ios_base::dec) ?
+ __STATIC_CAST(long, __STATIC_CAST(unsigned int, __x)): __x;
+ return _STLP_PRIV __put_num(*this, __tmp);
+}
+
+template <class _CharT, class _Traits>
+#if defined (_WIN64) || !defined (_STLP_MSVC) || (_STLP_MSVC < 1300)
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(unsigned int __x) {
+ _STLP_STATIC_ASSERT( sizeof(unsigned int) <= sizeof(unsigned long) )
+#else
+/* We define this operator with size_t rather than unsigned int to avoid
+ * 64 bits warning.
+ */
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(size_t __x) {
+ _STLP_STATIC_ASSERT( sizeof(size_t) <= sizeof(unsigned long) )
+#endif
+ return _STLP_PRIV __put_num(*this, __STATIC_CAST(unsigned long,__x));
+}
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(long __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(unsigned long __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+
+#ifdef _STLP_LONG_LONG
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<< (_STLP_LONG_LONG __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<< (unsigned _STLP_LONG_LONG __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+#endif
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(float __x)
+{ return _STLP_PRIV __put_num(*this, __STATIC_CAST(double,__x)); }
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(double __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+
+#ifndef _STLP_NO_LONG_DOUBLE
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(long double __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+#endif
+
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(const void* __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+
+#ifndef _STLP_NO_BOOL
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>::operator<<(bool __x)
+{ return _STLP_PRIV __put_num(*this, __x); }
+#endif
+
+template <class _CharT, class _Traits>
+void basic_ostream<_CharT, _Traits>::_M_put_char(_CharT __c) {
+ sentry __sentry(*this);
+ if (__sentry) {
+ bool __failed = true;
+ _STLP_TRY {
+ streamsize __npad = this->width() > 0 ? this->width() - 1 : 0;
+ // if (__npad <= 1)
+ if (__npad == 0)
+ __failed = this->_S_eof(this->rdbuf()->sputc(__c));
+ else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
+ __failed = this->_S_eof(this->rdbuf()->sputc(__c));
+ __failed = __failed ||
+ this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ }
+ else {
+ __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ __failed = __failed || this->_S_eof(this->rdbuf()->sputc(__c));
+ }
+
+ this->width(0);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (__failed)
+ this->setstate(ios_base::badbit);
+ }
+}
+
+template <class _CharT, class _Traits>
+void basic_ostream<_CharT, _Traits>::_M_put_nowiden(const _CharT* __s) {
+ sentry __sentry(*this);
+ if (__sentry) {
+ bool __failed = true;
+ streamsize __n = _Traits::length(__s);
+ streamsize __npad = this->width() > __n ? this->width() - __n : 0;
+
+ _STLP_TRY {
+ if (__npad == 0)
+ __failed = this->rdbuf()->sputn(__s, __n) != __n;
+ else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
+ __failed = this->rdbuf()->sputn(__s, __n) != __n;
+ __failed = __failed ||
+ this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ }
+ else {
+ __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ __failed = __failed || this->rdbuf()->sputn(__s, __n) != __n;
+ }
+
+ this->width(0);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (__failed)
+ this->setstate(ios_base::failbit);
+ }
+}
+
+template <class _CharT, class _Traits>
+void basic_ostream<_CharT, _Traits>::_M_put_widen(const char* __s) {
+ sentry __sentry(*this);
+ if (__sentry) {
+ bool __failed = true;
+ streamsize __n = char_traits<char>::length(__s);
+ streamsize __npad = this->width() > __n ? this->width() - __n : 0;
+
+ _STLP_TRY {
+ if (__npad == 0)
+ __failed = !this->_M_put_widen_aux(__s, __n);
+ else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
+ __failed = !this->_M_put_widen_aux(__s, __n);
+ __failed = __failed ||
+ this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ }
+ else {
+ __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
+ __failed = __failed || !this->_M_put_widen_aux(__s, __n);
+ }
+
+ this->width(0);
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+
+ if (__failed)
+ this->setstate(ios_base::failbit);
+ }
+}
+
+template <class _CharT, class _Traits>
+bool basic_ostream<_CharT, _Traits>::_M_put_widen_aux(const char* __s,
+ streamsize __n) {
+ basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
+
+ for ( ; __n > 0 ; --__n)
+ if (this->_S_eof(__buf->sputc(this->widen(*__s++))))
+ return false;
+ return true;
+}
+
+// Unformatted output of a single character.
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>&
+basic_ostream<_CharT, _Traits>::put(char_type __c) {
+ sentry __sentry(*this);
+ bool __failed = true;
+
+ if (__sentry) {
+ _STLP_TRY {
+ __failed = this->_S_eof(this->rdbuf()->sputc(__c));
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ }
+
+ if (__failed)
+ this->setstate(ios_base::badbit);
+
+ return *this;
+}
+
+// Unformatted output of a single character.
+template <class _CharT, class _Traits>
+basic_ostream<_CharT, _Traits>&
+basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n) {
+ sentry __sentry(*this);
+ bool __failed = true;
+
+ if (__sentry) {
+ _STLP_TRY {
+ __failed = this->rdbuf()->sputn(__s, __n) != __n;
+ }
+ _STLP_CATCH_ALL {
+ this->_M_handle_exception(ios_base::badbit);
+ }
+ }
+
+ if (__failed)
+ this->setstate(ios_base::badbit);
+
+ return *this;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_OSTREAM_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ostream.h b/6/sources/cxx-stl/stlport/stlport/stl/_ostream.h
new file mode 100644
index 0000000..3335b66
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ostream.h
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+
+#ifndef _STLP_INTERNAL_OSTREAM_H
+#define _STLP_INTERNAL_OSTREAM_H
+
+#ifndef _STLP_INTERNAL_IOS_H
+# include <stl/_ios.h> // For basic_ios<>. Includes <iosfwd>.
+#endif
+
+#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+# include <stl/_ostreambuf_iterator.h>
+#endif
+
+#if !defined (_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT) && !defined (_STLP_INTERNAL_EXCEPTION)
+# include <stl/_exception.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+template <class _CharT, class _Traits>
+class _Osentry;
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT, class _Traits>
+bool __init_bostr(basic_ostream<_CharT, _Traits>& __str);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+//----------------------------------------------------------------------
+// class basic_ostream<>
+
+template <class _CharT, class _Traits>
+class basic_ostream : virtual public basic_ios<_CharT, _Traits> {
+ typedef basic_ostream<_CharT, _Traits> _Self;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ //explicitely defined as private to avoid warnings:
+ basic_ostream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+
+public: // Types
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+
+public: // Constructor and destructor.
+ explicit basic_ostream(basic_streambuf<_CharT, _Traits>* __buf);
+ ~basic_ostream();
+
+public: // Hooks for manipulators.
+ typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&);
+ typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&);
+ typedef _Self& (_STLP_CALL *__ostream_fn)(_Self&);
+ _Self& operator<< (__ostream_fn __f) { return __f(*this); }
+ _Self & operator<< (__ios_base_fn __f) { __f(*this); return *this; }
+ _Self& operator<< (__ios_fn __ff) { __ff(*this); return *this; }
+
+private:
+ bool _M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from,
+ basic_streambuf<_CharT, _Traits>* __to);
+ bool _M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from,
+ basic_streambuf<_CharT, _Traits>* __to);
+
+public:
+ void _M_put_char(_CharT __c);
+
+ void _M_put_nowiden(const _CharT* __s);
+ void _M_put_widen(const char* __s);
+ bool _M_put_widen_aux(const char* __s, streamsize __n);
+
+public: // Unformatted output.
+ _Self& put(char_type __c);
+ _Self& write(const char_type* __s, streamsize __n);
+
+public: // Formatted output.
+ // Formatted output from a streambuf.
+ _Self& operator<<(basic_streambuf<_CharT, _Traits>* __buf);
+# ifndef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
+ // this is needed for compiling with option char = unsigned
+ _Self& operator<<(unsigned char __x) { _M_put_char(__x); return *this; }
+# endif
+ _Self& operator<<(short __x);
+ _Self& operator<<(unsigned short __x);
+ _Self& operator<<(int __x);
+#if defined (_WIN64) || !defined (_STLP_MSVC) || (_STLP_MSVC < 1300)
+ _Self& operator<<(unsigned int __x);
+#else
+/* We define this operator with size_t rather than unsigned int to avoid
+ * 64 bits warning.
+ */
+ _Self& operator<<(size_t __x);
+#endif
+ _Self& operator<<(long __x);
+ _Self& operator<<(unsigned long __x);
+#ifdef _STLP_LONG_LONG
+ _Self& operator<< (_STLP_LONG_LONG __x);
+ _Self& operator<< (unsigned _STLP_LONG_LONG __x);
+#endif
+ _Self& operator<<(float __x);
+ _Self& operator<<(double __x);
+# ifndef _STLP_NO_LONG_DOUBLE
+ _Self& operator<<(long double __x);
+# endif
+ _Self& operator<<(const void* __x);
+# ifndef _STLP_NO_BOOL
+ _Self& operator<<(bool __x);
+# endif
+
+public: // Buffer positioning and manipulation.
+ _Self& flush() {
+ if (this->rdbuf())
+ if (this->rdbuf()->pubsync() == -1)
+ this->setstate(ios_base::badbit);
+ return *this;
+ }
+
+ pos_type tellp() {
+ return this->rdbuf() && !this->fail()
+ ? this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out)
+ : pos_type(-1);
+ }
+
+ _Self& seekp(pos_type __pos) {
+ if (this->rdbuf() && !this->fail()) {
+ if (this->rdbuf()->pubseekpos(__pos, ios_base::out) == pos_type(-1)) {
+ this->setstate(ios_base::failbit);
+ }
+ }
+ return *this;
+ }
+
+ _Self& seekp(off_type __off, ios_base::seekdir __dir) {
+ if (this->rdbuf() && !this->fail())
+ this->rdbuf()->pubseekoff(__off, __dir, ios_base::out);
+ return *this;
+ }
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+ // If we are using DLL specs, we have not to use inner classes
+ // end class declaration here
+ typedef _Osentry<_CharT, _Traits> sentry;
+};
+# define sentry _Osentry
+ template <class _CharT, class _Traits>
+ class _Osentry {
+ typedef _Osentry<_CharT, _Traits> _Self;
+#else
+ class sentry {
+ typedef sentry _Self;
+#endif
+ private:
+ basic_ostream<_CharT, _Traits>& _M_str;
+ // basic_streambuf<_CharT, _Traits>* _M_buf;
+ bool _M_ok;
+ public:
+ explicit sentry(basic_ostream<_CharT, _Traits>& __str)
+ : _M_str(__str), /* _M_buf(__str.rdbuf()), */ _M_ok(_STLP_PRIV __init_bostr(__str))
+ {}
+
+ ~sentry() {
+ if (_M_str.flags() & ios_base::unitbuf)
+#if !defined (_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)
+ if (!uncaught_exception())
+#endif
+ _M_str.flush();
+ }
+
+ operator bool() const { return _M_ok; }
+ private: // Disable assignment and copy constructor.
+ //Implementation is here only to avoid warning with some compilers.
+ sentry(const _Self& __s) : _M_str(__s._M_str) {}
+ _Self& operator=(const _Self&) { return *this; }
+ };
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+# undef sentry
+#else
+ // close basic_ostream class definition here
+};
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ostream<char, char_traits<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Osentry<char, char_traits<char> >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_ostream<wchar_t, char_traits<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Osentry<wchar_t, char_traits<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Helper functions for istream<>::sentry constructor.
+template <class _CharT, class _Traits>
+bool __init_bostr(basic_ostream<_CharT, _Traits>& __str) {
+ if (__str.good()) {
+ // boris : check if this is needed !
+ if (!__str.rdbuf())
+ __str.setstate(ios_base::badbit);
+ if (__str.tie())
+ __str.tie()->flush();
+ return __str.good();
+ }
+ else
+ return false;
+}
+
+template <class _CharT, class _Traits>
+inline basic_streambuf<_CharT, _Traits>* _STLP_CALL
+__get_ostreambuf(basic_ostream<_CharT, _Traits>& __St)
+{ return __St.rdbuf(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// Non-member functions.
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c){
+ __os._M_put_char(__c);
+ return __os;
+}
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __s) {
+ __os._M_put_nowiden(__s);
+ return __os;
+}
+
+#if defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
+// some specializations
+
+inline basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __os, char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+inline basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __os, signed char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+inline basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __os, unsigned char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+inline basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __os, const char* __s) {
+ __os._M_put_nowiden(__s);
+ return __os;
+}
+
+inline basic_ostream<char, char_traits<char> >& _STLP_CALL
+operator<<(basic_ostream<char, char_traits<char> >& __os, const signed char* __s) {
+ __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
+ return __os;
+}
+
+inline basic_ostream<char, char_traits<char> >&
+operator<<(basic_ostream<char, char_traits<char> >& __os, const unsigned char* __s) {
+ __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
+ return __os;
+}
+
+#else
+
+// also for compilers who might use that
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, char __c) {
+ __os._M_put_char(__os.widen(__c));
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>& _STLP_CALL
+operator<<(basic_ostream<char, _Traits>& __os, char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>& _STLP_CALL
+operator<<(basic_ostream<char, _Traits>& __os, signed char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>& _STLP_CALL
+operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c) {
+ __os._M_put_char(__c);
+ return __os;
+}
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __s) {
+ __os._M_put_widen(__s);
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>& _STLP_CALL
+operator<<(basic_ostream<char, _Traits>& __os, const char* __s) {
+ __os._M_put_nowiden(__s);
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>& _STLP_CALL
+operator<<(basic_ostream<char, _Traits>& __os, const signed char* __s) {
+ __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
+ return __os;
+}
+
+template <class _Traits>
+inline basic_ostream<char, _Traits>&
+operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __s) {
+ __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
+ return __os;
+}
+#endif /* _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER */
+
+//----------------------------------------------------------------------
+// basic_ostream manipulators.
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+endl(basic_ostream<_CharT, _Traits>& __os) {
+ __os.put(__os.widen('\n'));
+ __os.flush();
+ return __os;
+}
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+ends(basic_ostream<_CharT, _Traits>& __os) {
+ __os.put(_STLP_DEFAULT_CONSTRUCTED(_CharT));
+ return __os;
+}
+
+template <class _CharT, class _Traits>
+inline basic_ostream<_CharT, _Traits>& _STLP_CALL
+flush(basic_ostream<_CharT, _Traits>& __os) {
+ __os.flush();
+ return __os;
+}
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_ostream.c>
+#endif
+
+#endif /* _STLP_INTERNAL_OSTREAM_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ostreambuf_iterator.h b/6/sources/cxx-stl/stlport/stlport/stl/_ostreambuf_iterator.h
new file mode 100644
index 0000000..d886549
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ostreambuf_iterator.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+#define _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template<class _CharT, class _Traits>
+extern basic_streambuf<_CharT, _Traits>* _STLP_CALL __get_ostreambuf(basic_ostream<_CharT, _Traits>&);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// The default template argument is declared in iosfwd
+template <class _CharT, class _Traits>
+class ostreambuf_iterator :
+ public iterator<output_iterator_tag, void, void, void, void> {
+public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef typename _Traits::int_type int_type;
+ typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+ typedef basic_ostream<_CharT, _Traits> ostream_type;
+
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+public:
+ ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {}
+ // ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(__get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
+ inline ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW;
+
+ ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) {
+ _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
+ traits_type::eof());
+ return *this;
+ }
+
+ ostreambuf_iterator<_CharT, _Traits>& operator*() { return *this; }
+ ostreambuf_iterator<_CharT, _Traits>& operator++() { return *this; }
+ ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; }
+
+ bool failed() const { return !_M_ok; }
+
+private:
+ streambuf_type* _M_buf;
+ bool _M_ok;
+};
+
+template <class _CharT, class _Traits>
+inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW
+ : _M_buf(_STLP_PRIV __get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<char, char_traits<char> >;
+# if defined (INSTANTIATE_WIDE_STREAMS)
+_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<wchar_t, char_traits<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+template <class _CharT, class _Traits>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const ostreambuf_iterator<_CharT, _Traits>&) { return output_iterator_tag(); }
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_pair.h b/6/sources/cxx-stl/stlport/stlport/stl/_pair.h
new file mode 100644
index 0000000..de0b08e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_pair.h
@@ -0,0 +1,186 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_PAIR_H
+#define _STLP_INTERNAL_PAIR_H
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+# endif
+
+# if !defined (_STLP_MOVE_CONSTRUCT_FWK_H) && !defined (_STLP_NO_MOVE_SEMANTIC)
+# include <stl/_move_construct_fwk.h>
+# endif
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (ANDROID)
+/* Android has stl_pair.h, prevent using it by defining the header guard. */
+# define __SGI_STL_INTERNAL_PAIR_H
+#endif
+template <class _T1, class _T2>
+struct pair {
+ typedef _T1 first_type;
+ typedef _T2 second_type;
+
+ _T1 first;
+ _T2 second;
+#if defined (_STLP_CONST_CONSTRUCTOR_BUG)
+ pair() {}
+#else
+ pair() : first(_T1()), second(_T2()) {}
+#endif
+ pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _U1, class _U2>
+ pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
+
+ pair(const pair<_T1,_T2>& __o) : first(__o.first), second(__o.second) {}
+#endif
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+ pair(__move_source<pair<_T1, _T2> > src) : first(_STLP_PRIV _AsMoveSource(src.get().first)),
+ second(_STLP_PRIV _AsMoveSource(src.get().second))
+ {}
+#endif
+
+ __TRIVIAL_DESTRUCTOR(pair)
+};
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ return __x.first == __y.first && __x.second == __y.second; }
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+ return __x.first < __y.first ||
+ (!(__y.first < __x.first) && __x.second < __y.second);
+}
+
+#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ return !(__x == __y); }
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ return __y < __x; }
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ return !(__y < __x); }
+
+template <class _T1, class _T2>
+inline bool _STLP_CALL operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ return !(__x < __y); }
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_EXTENSIONS)
+template <class _T1, class _T2, int _Sz>
+inline pair<_T1, _T2 const*> make_pair(_T1 const& __x,
+ _T2 const (&__y)[_Sz])
+{ return pair<_T1, _T2 const*>(__x, static_cast<_T2 const*>(__y)); }
+
+template <class _T1, class _T2, int _Sz>
+inline pair<_T1 const*, _T2> make_pair(_T1 const (&__x)[_Sz],
+ _T2 const& __y)
+{ return pair<_T1 const*, _T2>(static_cast<_T1 const*>(__x), __y); }
+
+template <class _T1, class _T2, int _Sz1, int _Sz2>
+inline pair<_T1 const*, _T2 const*> make_pair(_T1 const (&__x)[_Sz1],
+ _T2 const (&__y)[_Sz2]) {
+ return pair<_T1 const*, _T2 const*>(static_cast<_T1 const*>(__x),
+ static_cast<_T2 const*>(__y));
+}
+#endif
+
+template <class _T1, class _T2>
+inline pair<_T1, _T2> _STLP_CALL make_pair(_T1 __x, _T2 __y)
+{ return pair<_T1, _T2>(__x, __y); }
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_USE_NAMESPACES) || !defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+_STLP_BEGIN_RELOPS_NAMESPACE
+
+template <class _Tp>
+inline bool _STLP_CALL operator!=(const _Tp& __x, const _Tp& __y)
+{ return !(__x == __y); }
+
+template <class _Tp>
+inline bool _STLP_CALL operator>(const _Tp& __x, const _Tp& __y)
+{ return __y < __x; }
+
+template <class _Tp>
+inline bool _STLP_CALL operator<=(const _Tp& __x, const _Tp& __y)
+{ return !(__y < __x); }
+
+template <class _Tp>
+inline bool _STLP_CALL operator>=(const _Tp& __x, const _Tp& __y)
+{ return !(__x < __y); }
+
+_STLP_END_RELOPS_NAMESPACE
+#endif
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+_STLP_BEGIN_NAMESPACE
+
+template <class _T1, class _T2>
+struct __type_traits<pair<_T1, _T2> > {
+ typedef __type_traits<_T1> _T1Traits;
+ typedef __type_traits<_T2> _T2Traits;
+ typedef typename _Land2<typename _T1Traits::has_trivial_default_constructor,
+ typename _T2Traits::has_trivial_default_constructor>::_Ret has_trivial_default_constructor;
+ typedef typename _Land2<typename _T1Traits::has_trivial_copy_constructor,
+ typename _T2Traits::has_trivial_copy_constructor>::_Ret has_trivial_copy_constructor;
+ typedef typename _Land2<typename _T1Traits::has_trivial_assignment_operator,
+ typename _T2Traits::has_trivial_assignment_operator>::_Ret has_trivial_assignment_operator;
+ typedef typename _Land2<typename _T1Traits::has_trivial_destructor,
+ typename _T2Traits::has_trivial_destructor>::_Ret has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _T1, class _T2>
+struct __move_traits<pair<_T1, _T2> >
+ : _STLP_PRIV __move_traits_help1<_T1, _T2> {};
+# endif
+
+_STLP_END_NAMESPACE
+#endif
+
+#endif /* _STLP_INTERNAL_PAIR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_prolog.h b/6/sources/cxx-stl/stlport/stlport/stl/_prolog.h
new file mode 100644
index 0000000..9705c2c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_prolog.h
@@ -0,0 +1,18 @@
+/* NOTE : this header has no guards and is MEANT for multiple inclusion!
+ * If you are using "header protection" option with your compiler,
+ * please also find #pragma which disables it and put it here, to
+ * allow reentrancy of this header.
+ */
+
+#include <stl/_cprolog.h>
+
+/* Get all debug things, potentially only empty macros if none of
+ * the debug features available in user config file is activated. */
+ /* Thanks to _STLP_OUTERMOST_HEADER_ID we hide _debug.h when C standard
+ * headers are included as some platforms (Win32) include C standard headers
+ * in an 'extern "C"' scope which do not accept the templates exposed
+ * in _debug.h. */
+#if defined (__cplusplus) && !defined (_STLP_DEBUG_H) && \
+ !((_STLP_OUTERMOST_HEADER_ID >= 0x200) && (_STLP_OUTERMOST_HEADER_ID <= 0x300))
+# include <stl/debug/_debug.h>
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_pthread_alloc.h b/6/sources/cxx-stl/stlport/stlport/stl/_pthread_alloc.h
new file mode 100644
index 0000000..f45d949
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_pthread_alloc.h
@@ -0,0 +1,461 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_PTHREAD_ALLOC_H
+#define _STLP_PTHREAD_ALLOC_H
+
+/*
+ * Pthread-specific node allocator.
+ * This is similar to the default allocator, except that free-list
+ * information is kept separately for each thread, avoiding locking.
+ * This should be reasonably fast even in the presence of threads.
+ * The down side is that storage may not be well-utilized.
+ * It is not an error to allocate memory in thread A and deallocate
+ * it in thread B. But this effectively transfers ownership of the memory,
+ * so that it can only be reallocated by thread B. Thus this can effectively
+ * result in a storage leak if it's done on a regular basis.
+ * It can also result in frequent sharing of
+ * cache lines among processors, with potentially serious performance
+ * consequences.
+ */
+
+#if !defined (_STLP_PTHREADS)
+# error POSIX specific allocator implementation. Your system do not seems to \
+have this interface so please comment the _STLP_USE_PERTHREAD_ALLOC macro \
+or report to the STLport forum.
+#endif
+
+#if defined (_STLP_USE_NO_IOSTREAMS)
+# error You cannot use per thread allocator implementation without building \
+STLport libraries.
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+struct _Pthread_alloc_per_thread_state;
+
+// Pthread-specific allocator.
+class _STLP_CLASS_DECLSPEC _Pthread_alloc {
+public: // but only for internal use:
+ typedef _Pthread_alloc_per_thread_state __state_type;
+ typedef char value_type;
+
+public:
+ // Return a recycled or new per thread state.
+ static __state_type * _STLP_CALL _S_get_per_thread_state();
+
+ /* n must be > 0 */
+ static void * _STLP_CALL allocate(size_t& __n);
+
+ /* p may not be 0 */
+ static void _STLP_CALL deallocate(void *__p, size_t __n);
+
+ // boris : versions for per_thread_allocator
+ /* n must be > 0 */
+ static void * _STLP_CALL allocate(size_t& __n, __state_type* __a);
+
+ /* p may not be 0 */
+ static void _STLP_CALL deallocate(void *__p, size_t __n, __state_type* __a);
+
+ static void * _STLP_CALL reallocate(void *__p, size_t __old_sz, size_t& __new_sz);
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+typedef _STLP_PRIV _Pthread_alloc __pthread_alloc;
+typedef __pthread_alloc pthread_alloc;
+
+template <class _Tp>
+class pthread_allocator : public __stlport_class<pthread_allocator<_Tp> > {
+ typedef pthread_alloc _S_Alloc; // The underlying allocator.
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
+ template <class _NewType> struct rebind {
+ typedef pthread_allocator<_NewType> other;
+ };
+#endif
+
+ pthread_allocator() _STLP_NOTHROW {}
+ pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {}
+
+#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */
+ template <class _OtherType> pthread_allocator(const pthread_allocator<_OtherType>&)
+ _STLP_NOTHROW {}
+#endif
+
+ ~pthread_allocator() _STLP_NOTHROW {}
+
+ pointer address(reference __x) const { return &__x; }
+ const_pointer address(const_reference __x) const { return &__x; }
+
+ // __n is permitted to be 0. The C++ standard says nothing about what
+ // the return value is when __n == 0.
+ _Tp* allocate(size_type __n, const void* = 0) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(value_type*, _S_Alloc::allocate(__buf_size));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ return __ret;
+ }
+ else
+ return 0;
+ }
+
+ void deallocate(pointer __p, size_type __n) {
+ _STLP_ASSERT( (__p == 0) == (__n == 0) )
+ if (__p != 0) {
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__p, _STLP_SHRED_BYTE, __n * sizeof(value_type));
+#endif
+ _S_Alloc::deallocate(__p, __n * sizeof(value_type));
+ }
+ }
+
+ size_type max_size() const _STLP_NOTHROW
+ { return size_t(-1) / sizeof(_Tp); }
+
+ void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
+ void destroy(pointer _p) { _p->~_Tp(); }
+
+#if defined (_STLP_NO_EXTENSIONS)
+ /* STLport extension giving rounded size of an allocated memory buffer
+ * This method do not have to be part of a user defined allocator implementation
+ * and won't even be called if such a function was granted.
+ */
+protected:
+#endif
+ _Tp* allocate(size_type __n, size_type& __allocated_n) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(value_type*, _S_Alloc::allocate(__buf_size));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ __allocated_n = __buf_size / sizeof(value_type);
+ return __ret;
+ }
+ else
+ return 0;
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(pthread_allocator<_Tp>& __x) {}
+#endif
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC pthread_allocator<void> {
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
+#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
+ template <class _NewType> struct rebind {
+ typedef pthread_allocator<_NewType> other;
+ };
+#endif
+};
+
+template <class _T1, class _T2>
+inline bool operator==(const pthread_allocator<_T1>&,
+ const pthread_allocator<_T2>& a2)
+{ return true; }
+
+#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
+template <class _T1, class _T2>
+inline bool operator!=(const pthread_allocator<_T1>&,
+ const pthread_allocator<_T2>&)
+{ return false; }
+#endif
+
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+
+template <class _Tp, class _Atype>
+struct _Alloc_traits<_Tp, pthread_allocator<_Atype> >
+{ typedef pthread_allocator<_Tp> allocator_type; };
+
+#endif
+
+#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
+
+template <class _Tp1, class _Tp2>
+inline pthread_allocator<_Tp2>&
+__stl_alloc_rebind(pthread_allocator<_Tp1>& __x, const _Tp2*)
+{ return (pthread_allocator<_Tp2>&)__x; }
+
+template <class _Tp1, class _Tp2>
+inline pthread_allocator<_Tp2>
+__stl_alloc_create(pthread_allocator<_Tp1>&, const _Tp2*)
+{ return pthread_allocator<_Tp2>(); }
+
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+struct __pthread_alloc_type_traits {
+ typedef typename _IsSTLportClass<pthread_allocator<_Tp> >::_Ret _STLportAlloc;
+ //The default allocator implementation which is recognize thanks to the
+ //__stlport_class inheritance is a stateless object so:
+ typedef _STLportAlloc has_trivial_default_constructor;
+ typedef _STLportAlloc has_trivial_copy_constructor;
+ typedef _STLportAlloc has_trivial_assignment_operator;
+ typedef _STLportAlloc has_trivial_destructor;
+ typedef _STLportAlloc is_POD_type;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct __type_traits<pthread_allocator<_Tp> > : _STLP_PRIV __pthread_alloc_type_traits<_Tp> {};
+#else
+_STLP_TEMPLATE_NULL
+struct __type_traits<pthread_allocator<char> > : _STLP_PRIV __pthread_alloc_type_traits<char> {};
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_TEMPLATE_NULL
+struct __type_traits<pthread_allocator<wchar_t> > : _STLP_PRIV __pthread_alloc_type_traits<wchar_t> {};
+# endif
+# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+_STLP_TEMPLATE_NULL
+struct __type_traits<pthread_allocator<void*> > : _STLP_PRIV __pthread_alloc_type_traits<void*> {};
+# endif
+#endif
+
+//
+// per_thread_allocator<> : this allocator always return memory to the same thread
+// it was allocated from.
+//
+
+template <class _Tp>
+class per_thread_allocator {
+ typedef pthread_alloc _S_Alloc; // The underlying allocator.
+ typedef pthread_alloc::__state_type __state_type;
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef _Tp* pointer;
+ typedef const _Tp* const_pointer;
+ typedef _Tp& reference;
+ typedef const _Tp& const_reference;
+ typedef _Tp value_type;
+
+#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
+ template <class _NewType> struct rebind {
+ typedef per_thread_allocator<_NewType> other;
+ };
+#endif
+
+ per_thread_allocator() _STLP_NOTHROW {
+ _M_state = _S_Alloc::_S_get_per_thread_state();
+ }
+ per_thread_allocator(const per_thread_allocator<_Tp>& __a) _STLP_NOTHROW : _M_state(__a._M_state){}
+
+#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */
+ template <class _OtherType> per_thread_allocator(const per_thread_allocator<_OtherType>& __a)
+ _STLP_NOTHROW : _M_state(__a._M_state) {}
+#endif
+
+ ~per_thread_allocator() _STLP_NOTHROW {}
+
+ pointer address(reference __x) const { return &__x; }
+ const_pointer address(const_reference __x) const { return &__x; }
+
+ // __n is permitted to be 0. The C++ standard says nothing about what
+ // the return value is when __n == 0.
+ _Tp* allocate(size_type __n, const void* = 0) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(_Tp*, _S_Alloc::allocate(__buf_size, _M_state));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ return __ret;
+ }
+ else
+ return 0;
+ }
+
+ void deallocate(pointer __p, size_type __n) {
+ _STLP_ASSERT( (__p == 0) == (__n == 0) )
+ if (__p != 0) {
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__p, _STLP_SHRED_BYTE, __n * sizeof(value_type));
+#endif
+ _S_Alloc::deallocate(__p, __n * sizeof(value_type), _M_state);
+ }
+ }
+
+ size_type max_size() const _STLP_NOTHROW
+ { return size_t(-1) / sizeof(_Tp); }
+
+ void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
+ void destroy(pointer _p) { _p->~_Tp(); }
+
+ // state is being kept here
+ __state_type* _M_state;
+
+#if defined (_STLP_NO_EXTENSIONS)
+ /* STLport extension giving rounded size of an allocated memory buffer
+ * This method do not have to be part of a user defined allocator implementation
+ * and won't even be called if such a function was granted.
+ */
+protected:
+#endif
+ _Tp* allocate(size_type __n, size_type& __allocated_n) {
+ if (__n > max_size()) {
+ _STLP_THROW_BAD_ALLOC;
+ }
+ if (__n != 0) {
+ size_type __buf_size = __n * sizeof(value_type);
+ _Tp* __ret = __REINTERPRET_CAST(value_type*, _S_Alloc::allocate(__buf_size, _M_state));
+#if defined (_STLP_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_ALLOC)
+ memset((char*)__ret, _STLP_SHRED_BYTE, __buf_size);
+#endif
+ __allocated_n = __buf_size / sizeof(value_type);
+ return __ret;
+ }
+ else
+ return 0;
+ }
+};
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC per_thread_allocator<void> {
+public:
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+ typedef void value_type;
+#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
+ template <class _NewType> struct rebind {
+ typedef per_thread_allocator<_NewType> other;
+ };
+#endif
+};
+
+template <class _T1, class _T2>
+inline bool operator==(const per_thread_allocator<_T1>& __a1,
+ const per_thread_allocator<_T2>& __a2)
+{ return __a1._M_state == __a2._M_state; }
+
+#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
+template <class _T1, class _T2>
+inline bool operator!=(const per_thread_allocator<_T1>& __a1,
+ const per_thread_allocator<_T2>& __a2)
+{ return __a1._M_state != __a2._M_state; }
+#endif
+
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+
+template <class _Tp, class _Atype>
+struct _Alloc_traits<_Tp, per_thread_allocator<_Atype> >
+{ typedef per_thread_allocator<_Tp> allocator_type; };
+
+#endif
+
+#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
+
+template <class _Tp1, class _Tp2>
+inline per_thread_allocator<_Tp2>&
+__stl_alloc_rebind(per_thread_allocator<_Tp1>& __x, const _Tp2*)
+{ return (per_thread_allocator<_Tp2>&)__x; }
+
+template <class _Tp1, class _Tp2>
+inline per_thread_allocator<_Tp2>
+__stl_alloc_create(per_thread_allocator<_Tp1>&, const _Tp2*)
+{ return per_thread_allocator<_Tp2>(); }
+
+#endif /* _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE */
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+struct __perthread_alloc_type_traits {
+ typedef typename _IsSTLportClass<per_thread_allocator<_Tp> >::_Ret _STLportAlloc;
+ //The default allocator implementation which is recognize thanks to the
+ //__stlport_class inheritance is a stateless object so:
+ typedef __false_type has_trivial_default_constructor;
+ typedef _STLportAlloc has_trivial_copy_constructor;
+ typedef _STLportAlloc has_trivial_assignment_operator;
+ typedef _STLportAlloc has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct __type_traits<per_thread_allocator<_Tp> > : _STLP_PRIV __perthread_alloc_type_traits<_Tp> {};
+#else
+_STLP_TEMPLATE_NULL
+struct __type_traits<per_thread_allocator<char> > : _STLP_PRIV __perthread_alloc_type_traits<char> {};
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_TEMPLATE_NULL
+struct __type_traits<per_thread_allocator<wchar_t> > : _STLP_PRIV __perthread_alloc_type_traits<wchar_t> {};
+# endif
+# if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+_STLP_TEMPLATE_NULL
+struct __type_traits<per_thread_allocator<void*> > : _STLP_PRIV __perthread_alloc_type_traits<void*> {};
+# endif
+#endif
+
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_PTHREAD_ALLOC */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_ptrs_specialize.h b/6/sources/cxx-stl/stlport/stlport/stl/_ptrs_specialize.h
new file mode 100644
index 0000000..b9cb5d8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_ptrs_specialize.h
@@ -0,0 +1,83 @@
+#ifndef _STLP_PTRS_SPECIALIZE_H
+#define _STLP_PTRS_SPECIALIZE_H
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) || \
+ (defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) && !defined (_STLP_NO_ARROW_OPERATOR))
+# define _STLP_POINTERS_SPECIALIZE( _TpP )
+# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); }
+#else
+# ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+# endif
+
+// the following is a workaround for arrow operator problems
+# if defined ( _STLP_NO_ARROW_OPERATOR )
+// User wants to disable proxy -> operators
+# define _STLP_DEFINE_ARROW_OPERATOR
+# else
+// Compiler can handle generic -> operator.
+# if defined (__BORLANDC__)
+# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(*(*this)); }
+# elif defined(__WATCOMC__)
+# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; }
+# else
+# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); }
+# endif
+# endif /* _STLP_NO_ARROW_OPERATOR */
+
+// Important pointers specializations
+
+# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
+# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
+# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type)
+# else
+# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux<__true_type> {};
+# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \
+_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***)
+# endif
+
+# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
+
+_STLP_BEGIN_NAMESPACE
+
+# if !defined ( _STLP_NO_BOOL )
+_STLP_POINTERS_SPECIALIZE( bool )
+# endif
+_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void)
+# ifndef _STLP_NO_SIGNED_BUILTINS
+ _STLP_POINTERS_SPECIALIZE( signed char )
+# endif
+ _STLP_POINTERS_SPECIALIZE( char )
+ _STLP_POINTERS_SPECIALIZE( unsigned char )
+ _STLP_POINTERS_SPECIALIZE( short )
+ _STLP_POINTERS_SPECIALIZE( unsigned short )
+ _STLP_POINTERS_SPECIALIZE( int )
+ _STLP_POINTERS_SPECIALIZE( unsigned int )
+ _STLP_POINTERS_SPECIALIZE( long )
+ _STLP_POINTERS_SPECIALIZE( unsigned long )
+ _STLP_POINTERS_SPECIALIZE( float )
+ _STLP_POINTERS_SPECIALIZE( double )
+# if !defined ( _STLP_NO_LONG_DOUBLE )
+ _STLP_POINTERS_SPECIALIZE( long double )
+# endif
+# if defined ( _STLP_LONG_LONG)
+ _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG )
+ _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG )
+# endif
+# if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
+ _STLP_POINTERS_SPECIALIZE( wchar_t )
+# endif
+
+_STLP_END_NAMESPACE
+
+# undef _STLP_ARROW_SPECIALIZE
+# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V
+
+#endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_queue.h b/6/sources/cxx-stl/stlport/stlport/stl/_queue.h
new file mode 100644
index 0000000..5f3763c
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_queue.h
@@ -0,0 +1,268 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_QUEUE_H
+#define _STLP_INTERNAL_QUEUE_H
+
+#ifndef _STLP_INTERNAL_DEQUE_H
+# include <stl/_deque.h>
+#endif
+
+#ifndef _STLP_INTERNAL_VECTOR_H
+# include <stl/_vector.h>
+#endif
+
+#ifndef _STLP_INTERNAL_HEAP_H
+# include <stl/_heap.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+# if ! defined ( _STLP_LIMITED_DEFAULT_TEMPLATES )
+template <class _Tp, class _Sequence = deque<_Tp> >
+# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
+# define _STLP_QUEUE_ARGS _Tp
+template <class _Tp>
+# else
+template <class _Tp, class _Sequence>
+# endif
+class queue
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+# if defined (_STLP_QUEUE_ARGS)
+ : public __stlport_class<queue<_Tp> >
+# else
+ : public __stlport_class<queue<_Tp, _Sequence> >
+# endif
+#endif
+{
+# if defined ( _STLP_QUEUE_ARGS )
+ typedef deque<_Tp> _Sequence;
+ typedef queue<_Tp> _Self;
+# else
+ typedef queue<_Tp, _Sequence> _Self;
+# endif
+public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+
+protected:
+ //c is a Standard name (23.2.3.1), do no make it STLport naming convention compliant.
+ _Sequence c;
+public:
+ queue() : c() {}
+ explicit queue(const _Sequence& __c) : c(__c) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ queue(__move_source<_Self> src)
+ : c(_STLP_PRIV _AsMoveSource(src.get().c)) {}
+#endif
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ reference front() { return c.front(); }
+ const_reference front() const { return c.front(); }
+ reference back() { return c.back(); }
+ const_reference back() const { return c.back(); }
+ void push(const value_type& __x) { c.push_back(__x); }
+ void pop() { c.pop_front(); }
+ const _Sequence& _Get_s() const { return c; }
+
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) {
+ _Sequence __tmp = c;
+ c = __x.c;
+ __x.c = __tmp;
+ }
+#endif
+};
+
+#ifndef _STLP_QUEUE_ARGS
+# define _STLP_QUEUE_ARGS _Tp, _Sequence
+# define _STLP_QUEUE_HEADER_ARGS class _Tp, class _Sequence
+#else
+# define _STLP_QUEUE_HEADER_ARGS class _Tp
+#endif
+
+template < _STLP_QUEUE_HEADER_ARGS >
+inline bool _STLP_CALL
+operator==(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) {
+ return __x._Get_s() == __y._Get_s();
+}
+
+template < _STLP_QUEUE_HEADER_ARGS >
+inline bool _STLP_CALL
+operator<(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) {
+ return __x._Get_s() < __y._Get_s();
+}
+
+_STLP_RELOPS_OPERATORS( template < _STLP_QUEUE_HEADER_ARGS >, queue<_STLP_QUEUE_ARGS > )
+
+# if !(defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) || defined ( _STLP_TEMPLATE_PARAM_SUBTYPE_BUG ))
+template <class _Tp, class _Sequence = vector<_Tp>,
+ class _Compare = less<_STLP_HEADER_TYPENAME _Sequence::value_type> >
+# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
+template <class _Tp>
+# else
+template <class _Tp, class _Sequence, class _Compare>
+# endif
+class priority_queue
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
+ : public __stlport_class<priority_queue<_Tp> >
+# else
+ : public __stlport_class<priority_queue<_Tp, _Sequence> >
+# endif
+#endif
+{
+# ifdef _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS
+ typedef vector<_Tp> _Sequence;
+ typedef less< typename vector<_Tp>::value_type> _Compare;
+ typedef priority_queue<_Tp> _Self;
+# else
+ typedef priority_queue<_Tp, _Sequence, _Compare> _Self;
+# endif
+public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+protected:
+ //c is a Standard name (23.2.3.2), do no make it STLport naming convention compliant.
+ _Sequence c;
+ _Compare comp;
+public:
+ priority_queue() : c() {}
+ explicit priority_queue(const _Compare& __x) : c(), comp(__x) {}
+ priority_queue(const _Compare& __x, const _Sequence& __s)
+ : c(__s), comp(__x)
+ { make_heap(c.begin(), c.end(), comp); }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ priority_queue(__move_source<_Self> src)
+ : c(_STLP_PRIV _AsMoveSource(src.get().c)),
+ comp(_STLP_PRIV _AsMoveSource(src.get().comp)) {}
+#endif
+
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last)
+ : c(__first, __last) { make_heap(c.begin(), c.end(), comp); }
+
+ template <class _InputIterator>
+ priority_queue(_InputIterator __first,
+ _InputIterator __last, const _Compare& __x)
+ : c(__first, __last), comp(__x)
+ { make_heap(c.begin(), c.end(), comp); }
+
+ template <class _InputIterator>
+ priority_queue(_InputIterator __first, _InputIterator __last,
+ const _Compare& __x, const _Sequence& __s)
+ : c(__s), comp(__x)
+ {
+ c.insert(c.end(), __first, __last);
+ make_heap(c.begin(), c.end(), comp);
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ priority_queue(const value_type* __first, const value_type* __last)
+ : c(__first, __last) { make_heap(c.begin(), c.end(), comp); }
+
+ priority_queue(const value_type* __first, const value_type* __last,
+ const _Compare& __x)
+ : c(__first, __last), comp(__x)
+ { make_heap(c.begin(), c.end(), comp); }
+
+ priority_queue(const value_type* __first, const value_type* __last,
+ const _Compare& __x, const _Sequence& __c)
+ : c(__c), comp(__x)
+ {
+ c.insert(c.end(), __first, __last);
+ make_heap(c.begin(), c.end(), comp);
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ const_reference top() const { return c.front(); }
+ void push(const value_type& __x) {
+ _STLP_TRY {
+ c.push_back(__x);
+ push_heap(c.begin(), c.end(), comp);
+ }
+ _STLP_UNWIND(c.clear())
+ }
+ void pop() {
+ _STLP_TRY {
+ pop_heap(c.begin(), c.end(), comp);
+ c.pop_back();
+ }
+ _STLP_UNWIND(c.clear())
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) {
+ _Sequence __tmp = c;
+ c = __x.c;
+ __x.c = __tmp;
+ }
+#endif
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Sequence>
+struct __move_traits<queue<_Tp, _Sequence> > :
+ _STLP_PRIV __move_traits_aux<_Sequence>
+{};
+
+template <class _Tp, class _Sequence, class _Compare>
+struct __move_traits<priority_queue<_Tp, _Sequence, _Compare> > :
+ _STLP_PRIV __move_traits_aux2<_Sequence, _Compare>
+{};
+#endif
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_QUEUE_ARGS
+#undef _STLP_QUEUE_HEADER_ARGS
+#undef comp
+
+#endif /* _STLP_INTERNAL_QUEUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.c b/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.c
new file mode 100644
index 0000000..87293be
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.c
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics
+ *
+ * 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.
+ *
+ */
+
+#if defined(_STLP_THROW_RANGE_ERRORS)
+# if defined (_STLP_WHOLE_NATIVE_STD) && defined (_STLP_DONT_REDEFINE_STD)
+// In this mode we are going to throw native exception so that catch of
+// exception like std::runtime_error for instance will also catch exception
+// thrown by STLport containers like stlport::vector or stlport::string.
+# include <stdexcept>
+# include <string>
+# define _STLP_THROW_MSG(ex,msg) throw std::ex(msg)
+# else
+# if defined (__BUILDING_STLPORT)
+# include <stdexcept>
+# include <string>
+# else
+# ifndef _STLP_INTERNAL_STDEXCEPT
+# include <stl/_stdexcept.h>
+# endif
+# ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+# endif
+# endif
+# define _STLP_THROW_MSG(ex,msg) throw ex(msg)
+# endif
+#else
+# if defined (__BUILDING_STLPORT)
+# include <cstdlib>
+# include <cstdio>
+# else
+# ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+# endif
+# ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+# endif
+# endif
+# define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT()
+#endif
+
+// For mode without library and throwing range errors, include the
+// stdexcept header and throw the appropriate exceptions directly.
+
+#if defined (_STLP_EXTERN_RANGE_ERRORS)
+# define _STLP_THROW_FUNCT_SPEC void _STLP_DECLSPEC
+#else
+# define _STLP_THROW_FUNCT_SPEC inline void
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_runtime_error(const char* __msg)
+{ _STLP_THROW_MSG(runtime_error, __msg); }
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_range_error(const char* __msg)
+{ _STLP_THROW_MSG(range_error, __msg); }
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg)
+{ _STLP_THROW_MSG(out_of_range, __msg); }
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_length_error(const char* __msg)
+{ _STLP_THROW_MSG(length_error, __msg); }
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg)
+{ _STLP_THROW_MSG(invalid_argument, __msg); }
+
+_STLP_THROW_FUNCT_SPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg)
+{ _STLP_THROW_MSG(overflow_error, __msg); }
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_THROW_FUNCT_SPEC
+#undef _STLP_THROW_MSG
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.h b/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.h
new file mode 100644
index 0000000..80df26a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_range_errors.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics
+ *
+ * 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.
+ *
+ */
+
+#ifndef _STLP_RANGE_ERRORS_H
+#define _STLP_RANGE_ERRORS_H
+
+// A few places in the STL throw range errors, using standard exception
+// classes defined in <stdexcept>. This header file provides functions
+// to throw those exception objects.
+
+// _STLP_DONT_THROW_RANGE_ERRORS is a hook so that users can disable
+// this exception throwing.
+#if defined (_STLP_CAN_THROW_RANGE_ERRORS) && defined (_STLP_USE_EXCEPTIONS) && \
+ !defined (_STLP_DONT_THROW_RANGE_ERRORS)
+# define _STLP_THROW_RANGE_ERRORS
+#endif
+
+// For the STLport iostreams, only declaration here, definition is in the lib
+#if !defined (_STLP_USE_NO_IOSTREAMS) && !defined (_STLP_EXTERN_RANGE_ERRORS)
+# define _STLP_EXTERN_RANGE_ERRORS
+#endif
+
+_STLP_BEGIN_NAMESPACE
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_runtime_error(const char* __msg);
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg);
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg);
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg);
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg);
+void _STLP_FUNCTION_THROWS _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg);
+
+#if defined (__DMC__) && !defined (_STLP_NO_EXCEPTIONS)
+# pragma noreturn(__stl_throw_runtime_error)
+# pragma noreturn(__stl_throw_range_error)
+# pragma noreturn(__stl_throw_out_of_range)
+# pragma noreturn(__stl_throw_length_error)
+# pragma noreturn(__stl_throw_invalid_argument)
+# pragma noreturn(__stl_throw_overflow_error)
+#endif
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_EXTERN_RANGE_ERRORS)
+# include <stl/_range_errors.c>
+#endif
+
+#endif /* _STLP_RANGE_ERRORS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_raw_storage_iter.h b/6/sources/cxx-stl/stlport/stlport/stl/_raw_storage_iter.h
new file mode 100644
index 0000000..6e4bc2e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_raw_storage_iter.h
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
+#define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _ForwardIterator, class _Tp>
+class raw_storage_iterator
+ : public iterator<output_iterator_tag,void,void,void,void>
+{
+protected:
+ _ForwardIterator _M_iter;
+public:
+ typedef output_iterator_tag iterator_category;
+# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+# endif
+ explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
+ raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; }
+ raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) {
+ _Param_Construct(&*_M_iter, __element);
+ return *this;
+ }
+ raw_storage_iterator<_ForwardIterator, _Tp>& operator++() {
+ ++_M_iter;
+ return *this;
+ }
+ raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) {
+ raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
+ ++_M_iter;
+ return __tmp;
+ }
+};
+
+# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+template <class _ForwardIterator, class _Tp>
+inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); }
+#endif
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_relops_cont.h b/6/sources/cxx-stl/stlport/stlport/stl/_relops_cont.h
new file mode 100644
index 0000000..cd8ec05
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_relops_cont.h
@@ -0,0 +1,29 @@
+// This is an implementation file which
+// is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
+// setting
+
+#if !defined (_STLP_EQUAL_OPERATOR_SPECIALIZED)
+_STLP_TEMPLATE_HEADER
+inline bool _STLP_CALL operator==(const _STLP_TEMPLATE_CONTAINER& __x,
+ const _STLP_TEMPLATE_CONTAINER& __y) {
+ return __x.size() == __y.size() &&
+ equal(__x.begin(), __x.end(), __y.begin());
+}
+#endif /* _STLP_EQUAL_OPERATOR_SPECIALIZED */
+
+_STLP_TEMPLATE_HEADER
+inline bool _STLP_CALL operator<(const _STLP_TEMPLATE_CONTAINER& __x,
+ const _STLP_TEMPLATE_CONTAINER& __y) {
+ return lexicographical_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end());
+}
+
+_STLP_RELOPS_OPERATORS( _STLP_TEMPLATE_HEADER , _STLP_TEMPLATE_CONTAINER )
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+_STLP_TEMPLATE_HEADER
+inline void _STLP_CALL swap(_STLP_TEMPLATE_CONTAINER& __x,
+ _STLP_TEMPLATE_CONTAINER& __y) {
+ __x.swap(__y);
+}
+#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_relops_hash_cont.h b/6/sources/cxx-stl/stlport/stlport/stl/_relops_hash_cont.h
new file mode 100644
index 0000000..421c805
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_relops_hash_cont.h
@@ -0,0 +1,13 @@
+/* This is an implementation file which is intended to be included
+ * multiple times with different _STLP_TEMPLATE_CONTAINER settings.
+ */
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+
+_STLP_TEMPLATE_HEADER
+inline void _STLP_CALL
+swap(_STLP_TEMPLATE_CONTAINER& __hm1, _STLP_TEMPLATE_CONTAINER& __hm2) {
+ __hm1.swap(__hm2);
+}
+
+#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_rope.c b/6/sources/cxx-stl/stlport/stlport/stl/_rope.c
new file mode 100644
index 0000000..196ee22
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_rope.c
@@ -0,0 +1,1407 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
+// if necessary. Assumes path_end[leaf_index] and leaf_pos are correct.
+// Results in a valid buf_ptr if the iterator can be legitimately
+// dereferenced.
+#ifndef _STLP_ROPEIMPL_H
+#define _STLP_ROPEIMPL_H
+
+#ifndef _STLP_INTERNAL_ROPE_H
+# include <stl/_rope.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+#endif
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+# ifndef _STLP_INTERNAL_OSTREAM_H
+# include <stl/_ostream.h>
+# endif
+
+# ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+# endif
+#endif
+
+#include <stl/_range_errors.h>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+# define __allocator__ _Alloc
+#else
+# define __allocator__ allocator_type
+#endif
+
+template<class _CharT, class _Alloc>
+_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos)
+ : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr._M_data, __pos),
+ _M_root_rope(__r) { _RopeRep::_S_ref(this->_M_root); }
+
+template<class _CharT, class _Alloc>
+_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos):
+ _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos),
+ _M_root_rope(&__r) {
+#if !defined (__DMC__)
+ _RopeRep::_S_ref(this->_M_root); if (!(__r.empty()))_S_setcache(*this);
+#else
+ _Rope_iterator_base<_CharT, _Alloc>* __x = this;
+ _RopeRep::_S_ref(this->_M_root); if (!(__r.empty()))_S_setcache(*__x);
+#endif
+}
+
+template<class _CharT, class _Alloc>
+void _Rope_RopeRep<_CharT, _Alloc>::_M_free_c_string() {
+ _CharT* __cstr = _M_c_string;
+ if (0 != __cstr) {
+ size_t _p_size = _M_size._M_data + 1;
+ _STLP_STD::_Destroy_Range(__cstr, __cstr + _p_size);
+ _M_size.deallocate(__cstr, _p_size);
+ }
+}
+
+// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
+// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct.
+// Results in a valid buf_ptr if the iterator can be legitimately
+// dereferenced.
+template <class _CharT, class _Alloc>
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf(
+ _Rope_iterator_base<_CharT,_Alloc>& __x) {
+ const _RopeRep* __leaf = __x._M_path_end._M_data[__x._M_leaf_index];
+ size_t __leaf_pos = __x._M_leaf_pos;
+ size_t __pos = __x._M_current_pos;
+
+ switch(__leaf->_M_tag) {
+ case _RopeRep::_S_leaf:
+ typedef _Rope_RopeLeaf<_CharT, _Alloc> _RopeLeaf;
+ __x._M_buf_start = __STATIC_CAST(const _RopeLeaf*, __leaf)->_M_data;
+ __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
+ __x._M_buf_end = __x._M_buf_start + __leaf->_M_size._M_data;
+ break;
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ {
+ size_t __len = _S_iterator_buf_len;
+ size_t __buf_start_pos = __leaf_pos;
+ size_t __leaf_end = __leaf_pos + __leaf->_M_size._M_data;
+ typedef _Rope_RopeFunction<_CharT, _Alloc> _RopeFunction;
+ char_producer<_CharT>* __fn = __STATIC_CAST(const _RopeFunction*, __leaf)->_M_fn;
+
+ if (__buf_start_pos + __len <= __pos) {
+ __buf_start_pos = __pos - __len/4;
+ if (__buf_start_pos + __len > __leaf_end) {
+ __buf_start_pos = __leaf_end - __len;
+ }
+ }
+ if (__buf_start_pos + __len > __leaf_end) {
+ __len = __leaf_end - __buf_start_pos;
+ }
+ (*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf._M_data);
+ __x._M_buf_ptr = __x._M_tmp_buf._M_data + (__pos - __buf_start_pos);
+ __x._M_buf_start = __x._M_tmp_buf._M_data;
+ __x._M_buf_end = __x._M_tmp_buf._M_data + __len;
+ }
+ break;
+ default:
+ _STLP_ASSERT(0)
+ ;
+ }
+}
+
+// Set path and buffer inside a rope iterator. We assume that
+// pos and root are already set.
+template <class _CharT, class _Alloc>
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache(
+ _Rope_iterator_base<_CharT,_Alloc>& __x) {
+ const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1];
+ const _RopeRep* __curr_rope;
+ int __curr_depth = -1; /* index into path */
+ size_t __curr_start_pos = 0;
+ size_t __pos = __x._M_current_pos;
+ unsigned char __dirns = 0; // Bit vector marking right turns in the path
+
+ _STLP_ASSERT(__pos <= __x._M_root->_M_size._M_data)
+ if (__pos >= __x._M_root->_M_size._M_data) {
+ __x._M_buf_ptr = 0;
+ return;
+ }
+ __curr_rope = __x._M_root;
+ if (0 != __curr_rope->_M_c_string) {
+ /* Treat the root as a leaf. */
+ __x._M_buf_start = __curr_rope->_M_c_string;
+ __x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size._M_data;
+ __x._M_buf_ptr = __curr_rope->_M_c_string + __pos;
+ __x._M_path_end._M_data[0] = __curr_rope;
+ __x._M_leaf_index = 0;
+ __x._M_leaf_pos = 0;
+ return;
+ }
+ for(;;) {
+ ++__curr_depth;
+ _STLP_ASSERT(__curr_depth <= _RopeRep::_S_max_rope_depth)
+ __path[__curr_depth] = __curr_rope;
+ switch(__curr_rope->_M_tag) {
+ case _RopeRep::_S_leaf:
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ __x._M_leaf_pos = __curr_start_pos;
+ goto done;
+ case _RopeRep::_S_concat:
+ {
+ const _RopeConcat* __c = __STATIC_CAST(const _RopeConcat*, __curr_rope);
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size._M_data;
+
+ __dirns <<= 1;
+ if (__pos >= __curr_start_pos + __left_len) {
+ __dirns |= 1;
+ __curr_rope = __c->_M_right;
+ __curr_start_pos += __left_len;
+ } else {
+ __curr_rope = __left;
+ }
+ }
+ break;
+ }
+ }
+done:
+ // Copy last section of path into _M_path_end.
+ {
+ int __i = -1;
+ int __j = __curr_depth + 1 - _S_path_cache_len;
+
+ if (__j < 0) __j = 0;
+ while (__j <= __curr_depth) {
+ __x._M_path_end._M_data[++__i] = __path[__j++];
+ }
+ __x._M_leaf_index = __i;
+ }
+ __x._M_path_directions = __dirns;
+ _S_setbuf(__x);
+}
+
+// Specialized version of the above. Assumes that
+// the path cache is valid for the previous position.
+template <class _CharT, class _Alloc>
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr(
+_Rope_iterator_base<_CharT,_Alloc>& __x) {
+ int __current_index = __x._M_leaf_index;
+ const _RopeRep* __current_node = __x._M_path_end._M_data[__current_index];
+ size_t __len = __current_node->_M_size._M_data;
+ size_t __node_start_pos = __x._M_leaf_pos;
+ unsigned char __dirns = __x._M_path_directions;
+ const _RopeConcat* __c;
+
+ _STLP_ASSERT(__x._M_current_pos <= __x._M_root->_M_size._M_data)
+ if (__x._M_current_pos - __node_start_pos < __len) {
+ /* More stuff in this leaf, we just didn't cache it. */
+ _S_setbuf(__x);
+ return;
+ }
+ _STLP_ASSERT(__node_start_pos + __len == __x._M_current_pos)
+ // node_start_pos is starting position of last_node.
+ while (--__current_index >= 0) {
+ if (!(__dirns & 1) /* Path turned left */)
+ break;
+ __current_node = __x._M_path_end._M_data[__current_index];
+ __c = __STATIC_CAST(const _RopeConcat*, __current_node);
+ // Otherwise we were in the right child. Thus we should pop
+ // the concatenation node.
+ __node_start_pos -= __c->_M_left->_M_size._M_data;
+ __dirns >>= 1;
+ }
+ if (__current_index < 0) {
+ // We underflowed the cache. Punt.
+ _S_setcache(__x);
+ return;
+ }
+ __current_node = __x._M_path_end._M_data[__current_index];
+ __c = __STATIC_CAST(const _RopeConcat*, __current_node);
+ // current_node is a concatenation node. We are positioned on the first
+ // character in its right child.
+ // node_start_pos is starting position of current_node.
+ __node_start_pos += __c->_M_left->_M_size._M_data;
+ __current_node = __c->_M_right;
+ __x._M_path_end._M_data[++__current_index] = __current_node;
+ __dirns |= 1;
+ while (_RopeRep::_S_concat == __current_node->_M_tag) {
+ ++__current_index;
+ if (_S_path_cache_len == __current_index) {
+ int __i;
+ for (__i = 0; __i < _S_path_cache_len-1; ++__i) {
+ __x._M_path_end._M_data[__i] = __x._M_path_end._M_data[__i+1];
+ }
+ --__current_index;
+ }
+ __current_node = __STATIC_CAST(const _RopeConcat*, __current_node)->_M_left;
+ __x._M_path_end._M_data[__current_index] = __current_node;
+ __dirns <<= 1;
+ // node_start_pos is unchanged.
+ }
+ __x._M_leaf_index = __current_index;
+ __x._M_leaf_pos = __node_start_pos;
+ __x._M_path_directions = __dirns;
+ _S_setbuf(__x);
+}
+
+template <class _CharT, class _Alloc>
+void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) {
+ _M_current_pos += __n;
+ if (0 != _M_buf_ptr) {
+ size_t __chars_left = _M_buf_end - _M_buf_ptr;
+ if (__chars_left > __n) {
+ _M_buf_ptr += __n;
+ } else if (__chars_left == __n) {
+ _M_buf_ptr += __n;
+ _S_setcache_for_incr(*this);
+ } else {
+ _M_buf_ptr = 0;
+ }
+ }
+}
+
+template <class _CharT, class _Alloc>
+void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) {
+ if (0 != _M_buf_ptr) {
+ size_t __chars_left = _M_buf_ptr - _M_buf_start;
+ if (__chars_left >= __n) {
+ _M_buf_ptr -= __n;
+ } else {
+ _M_buf_ptr = 0;
+ }
+ }
+ _M_current_pos -= __n;
+}
+
+template <class _CharT, class _Alloc>
+void _Rope_iterator<_CharT,_Alloc>::_M_check() {
+ if (_M_root_rope->_M_tree_ptr._M_data != this->_M_root) {
+ // _Rope was modified. Get things fixed up.
+ _RopeRep::_S_unref(this->_M_root);
+ this->_M_root = _M_root_rope->_M_tree_ptr._M_data;
+ _RopeRep::_S_ref(this->_M_root);
+ this->_M_buf_ptr = 0;
+ }
+}
+
+// There are several reasons for not doing this with virtual destructors
+// and a class specific delete operator:
+// - A class specific delete operator can't easily get access to
+// allocator instances if we need them.
+// - Any virtual function would need a 4 or byte vtable pointer;
+// this only requires a one byte tag per object.
+template <class _CharT, class _Alloc>
+void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() {
+ switch (_M_tag) {
+ case _S_leaf:
+ {
+ typedef _Rope_RopeLeaf<_CharT, _Alloc> _RopeLeaf;
+ _RopeLeaf* __l = __STATIC_CAST(_RopeLeaf*, this);
+ _STLP_STD::_Destroy(__l); // ->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf();
+ _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size,
+ _RopeLeaf).deallocate(__l, 1);
+ break;
+ }
+ case _S_concat:
+ {
+ typedef _Rope_RopeConcatenation<_CharT, _Alloc> _RopeConcatenation;
+ _RopeConcatenation* __c = __STATIC_CAST(_RopeConcatenation*, this);
+ _STLP_STD::_Destroy(__c);
+ _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size,
+ _RopeConcatenation).deallocate(__c, 1);
+ break;
+ }
+ case _S_function:
+ {
+ typedef _Rope_RopeFunction<_CharT, _Alloc> _RopeFunction;
+ _RopeFunction* __f = __STATIC_CAST(_RopeFunction*, this);
+ _STLP_STD::_Destroy(__f);
+ _STLP_CREATE_ALLOCATOR(allocator_type, (const allocator_type&)_M_size,
+ _RopeFunction).deallocate(__f, 1);
+ break;
+ }
+ case _S_substringfn:
+ {
+ typedef _Rope_RopeSubstring<_CharT, _Alloc> _RopeSubstring;
+ _RopeSubstring* __rss = __STATIC_CAST(_RopeSubstring*, this);
+ _STLP_STD::_Destroy(__rss);
+ _STLP_CREATE_ALLOCATOR(allocator_type, (const allocator_type&)_M_size,
+ _RopeSubstring).deallocate(__rss, 1);
+ break;
+ }
+ }
+}
+
+# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+# define __RopeLeaf__ _Rope_RopeLeaf<_CharT,_Alloc>
+# define __RopeRep__ _Rope_RopeRep<_CharT,_Alloc>
+# define _RopeLeaf _Rope_RopeLeaf<_CharT,_Alloc>
+# define _RopeRep _Rope_RopeRep<_CharT,_Alloc>
+# define size_type size_t
+# else
+# define __RopeLeaf__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeLeaf
+# define __RopeRep__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeRep
+# endif
+
+template <class _CharT, class _Alloc>
+void rope<_CharT, _Alloc>::_M_throw_out_of_range() const {
+ __stl_throw_out_of_range("rope");
+}
+
+// Concatenate a C string onto a leaf rope by copying the rope data.
+// Used for short ropes.
+template <class _CharT, class _Alloc>
+__RopeLeaf__*
+rope<_CharT,_Alloc>::_S_leaf_concat_char_iter (
+ _RopeLeaf* __r, const _CharT* __iter, size_t __len) {
+ size_t __old_len = __r->_M_size._M_data;
+ _CharT* __new_data = __r->_M_size.allocate(_S_rounded_up_size(__old_len + __len));
+ _RopeLeaf* __result;
+
+ _STLP_PRIV __ucopy_n(__r->_M_data, __old_len, __new_data);
+ _STLP_PRIV __ucopy_n(__iter, __len, __new_data + __old_len);
+ _S_construct_null(__new_data + __old_len + __len);
+ _STLP_TRY {
+ __result = _S_new_RopeLeaf(__new_data, __old_len + __len, __r->get_allocator());
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__new_data, __old_len + __len,
+ __r->get_allocator()))
+ return __result;
+}
+
+template <class _CharT, class _Alloc>
+void _Terminate_RopeLeaf(_Rope_RopeLeaf<_CharT,_Alloc> *__r,
+ size_t __size, const __true_type& /*basic char type*/) {
+ _S_construct_null(__r->_M_data + __size);
+ _STLP_ASSERT(__r->_M_c_string == __r->_M_data)
+}
+
+template <class _CharT, class _Alloc>
+void _Terminate_RopeLeaf(_Rope_RopeLeaf<_CharT,_Alloc> *__r,
+ size_t, const __false_type& /*basic char type*/) {
+ if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) {
+ __r->_M_free_c_string();
+ __r->_M_c_string = 0;
+ }
+}
+
+// As above, but it's OK to clobber original if refcount is 1
+template <class _CharT, class _Alloc>
+__RopeLeaf__*
+rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter (_RopeLeaf* __r, const _CharT* __iter, size_t __len) {
+ //_STLP_ASSERT(__r->_M_ref_count >= 1)
+ if ( /* __r->_M_ref_count > 1 */ __r->_M_incr() > 2 ) { // - ptr
+ __r->_M_decr(); // - ptr
+ return _S_leaf_concat_char_iter(__r, __iter, __len);
+ }
+ __r->_M_decr(); // - ptr, __r->_M_ref_count == 1 or 0
+ size_t __old_len = __r->_M_size._M_data;
+ if (_S_rounded_up_size(__old_len) == _S_rounded_up_size(__old_len + __len)) {
+ // The space has been partially initialized for the standard
+ // character types. But that doesn't matter for those types.
+ _STLP_PRIV __ucopy_n(__iter, __len, __r->_M_data + __old_len);
+ _Terminate_RopeLeaf(__r, __old_len + __len, _IsBasicCharType());
+ __r->_M_size._M_data = __old_len + __len;
+ // _STLP_ASSERT(__r->_M_ref_count == 1)
+ // __r->_M_ref_count = 2;
+ __r->_M_incr(); // i.e. __r->_M_ref_count = 2
+ return __r;
+ } else {
+ _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
+ //_STLP_ASSERT(__result->_M_ref_count == 1)
+ return __result;
+ }
+}
+
+// Assumes left and right are not 0.
+// Does not increment (nor decrement on exception) child reference counts.
+// Result has ref count 1.
+template <class _CharT, class _Alloc>
+__RopeRep__*
+rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right) {
+ _RopeConcatenation* __result =
+ _S_new_RopeConcatenation(__left, __right, __left->get_allocator());
+ size_t __depth = __result->_M_depth;
+
+ _STLP_ASSERT(__left->get_allocator() == __right->get_allocator())
+ if (__depth > 20 && (__result->_M_size._M_data < 1000 ||
+ __depth > _RopeRep::_S_max_rope_depth)) {
+ _RopeRep* __balanced;
+
+ _STLP_TRY {
+ __balanced = _S_balance(__result);
+ // _STLP_ASSERT(__result == __balanced ||
+ // 1 == __result->_M_ref_count &&
+ // 1 == __balanced->_M_ref_count)
+ __result->_M_unref_nonnil();
+ }
+ _STLP_UNWIND((_STLP_CREATE_ALLOCATOR(allocator_type,(allocator_type&)__left->_M_size,
+ _RopeConcatenation).deallocate(__result,1)))
+ // In case of exception, we need to deallocate
+ // otherwise dangling result node. But caller
+ // still owns its children. Thus unref is
+ // inappropriate.
+ return __balanced;
+ } else {
+ return __result;
+ }
+}
+
+template <class _CharT, class _Alloc>
+__RopeRep__*
+rope<_CharT,_Alloc>::_S_concat_char_iter (_RopeRep* __r,
+ const _CharT*__s, size_t __slen) {
+ _RopeRep* __result;
+ if (0 == __slen) {
+ _S_ref(__r);
+ return __r;
+ }
+ if (0 == __r)
+ return _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->get_allocator());
+ if (_RopeRep::_S_leaf == __r->_M_tag &&
+ __r->_M_size._M_data + __slen <= _S_copy_max) {
+ __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
+ // _STLP_ASSERT(1 == __result->_M_ref_count)
+ return __result;
+ }
+ if (_RopeRep::_S_concat == __r->_M_tag &&
+ _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) {
+ _RopeLeaf* __right = (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
+ if (__right->_M_size._M_data + __slen <= _S_copy_max) {
+ _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
+ _RopeRep* __nright = _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
+ __left->_M_ref_nonnil();
+ _STLP_TRY {
+ __result = _S_tree_concat(__left, __nright);
+ }
+ _STLP_UNWIND(_S_unref(__left); _S_unref(__nright))
+ // _STLP_ASSERT(1 == __result->_M_ref_count)
+ return __result;
+ }
+ }
+ _RopeRep* __nright =
+ _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->get_allocator());
+ _STLP_TRY {
+ __r->_M_ref_nonnil();
+ __result = _S_tree_concat(__r, __nright);
+ }
+ _STLP_UNWIND(_S_unref(__r); _S_unref(__nright))
+ // _STLP_ASSERT(1 == __result->_M_ref_count)
+ return __result;
+}
+
+template <class _CharT, class _Alloc>
+__RopeRep__*
+rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
+ _RopeRep* __r, const _CharT* __s, size_t __slen) {
+ _RopeRep* __result;
+ if (0 == __r)
+ return _S_RopeLeaf_from_unowned_char_ptr(__s, __slen,
+ __r->get_allocator());
+ // size_t __count = __r->_M_ref_count;
+ size_t __orig_size = __r->_M_size._M_data;
+ // _STLP_ASSERT(__count >= 1)
+ if ( /* __count > 1 */ __r->_M_incr() > 2 ) {
+ __r->_M_decr();
+ return _S_concat_char_iter(__r, __s, __slen);
+ }
+ if (0 == __slen) {
+ return __r;
+ }
+ __r->_M_decr();
+ if (__orig_size + __slen <= _S_copy_max && _RopeRep::_S_leaf == __r->_M_tag) {
+ return _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
+ }
+ if (_RopeRep::_S_concat == __r->_M_tag) {
+ _RopeLeaf* __right = __STATIC_CAST(_RopeLeaf*, __STATIC_CAST(_RopeConcatenation*, __r)->_M_right);
+ if (_RopeRep::_S_leaf == __right->_M_tag &&
+ __right->_M_size._M_data + __slen <= _S_copy_max) {
+ _RopeRep* __new_right = _S_destr_leaf_concat_char_iter(__right, __s, __slen);
+ if (__right == __new_right) {
+ // _STLP_ASSERT(__new_right->_M_ref_count == 2)
+ // __new_right->_M_ref_count = 1;
+ __new_right->_M_decr();
+ } else {
+ // _STLP_ASSERT(__new_right->_M_ref_count >= 1)
+ __right->_M_unref_nonnil();
+ }
+ // _STLP_ASSERT(__r->_M_ref_count == 1)
+ // __r->_M_ref_count = 2; // One more than before.
+ __r->_M_incr();
+ __STATIC_CAST(_RopeConcatenation*, __r)->_M_right = __new_right;
+ // E.Musser : moved below
+ // __r->_M_size._M_data = __orig_size + __slen;
+ if (0 != __r->_M_c_string) {
+ __r->_M_free_c_string();
+ __r->_M_c_string = 0;
+ }
+ __r->_M_size._M_data = __orig_size + __slen;
+ return __r;
+ }
+ }
+ _RopeRep* __right =
+ _S_RopeLeaf_from_unowned_char_ptr(__s, __slen, __r->get_allocator());
+ __r->_M_ref_nonnil();
+ _STLP_TRY {
+ __result = _S_tree_concat(__r, __right);
+ }
+ _STLP_UNWIND(_S_unref(__r); _S_unref(__right))
+ // _STLP_ASSERT(1 == __result->_M_ref_count)
+ return __result;
+}
+
+template <class _CharT, class _Alloc>
+__RopeRep__*
+rope<_CharT,_Alloc>::_S_concat_rep(_RopeRep* __left, _RopeRep* __right) {
+ if (0 == __left) {
+ _S_ref(__right);
+ return __right;
+ }
+ if (0 == __right) {
+ __left->_M_ref_nonnil();
+ return __left;
+ }
+ if (_RopeRep::_S_leaf == __right->_M_tag) {
+ if (_RopeRep::_S_leaf == __left->_M_tag) {
+ if (__right->_M_size._M_data + __left->_M_size._M_data <= _S_copy_max) {
+ return _S_leaf_concat_char_iter(__STATIC_CAST(_RopeLeaf*, __left),
+ __STATIC_CAST(_RopeLeaf*, __right)->_M_data,
+ __right->_M_size._M_data);
+ }
+ } else if (_RopeRep::_S_concat == __left->_M_tag &&
+ _RopeRep::_S_leaf == __STATIC_CAST(_RopeConcatenation*, __left)->_M_right->_M_tag) {
+ _RopeLeaf* __leftright =
+ __STATIC_CAST(_RopeLeaf*, __STATIC_CAST(_RopeConcatenation*, __left)->_M_right);
+ if (__leftright->_M_size._M_data + __right->_M_size._M_data <= _S_copy_max) {
+ _RopeRep* __leftleft = __STATIC_CAST(_RopeConcatenation*, __left)->_M_left;
+ _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
+ __STATIC_CAST(_RopeLeaf*, __right)->_M_data,
+ __right->_M_size._M_data);
+ __leftleft->_M_ref_nonnil();
+ _STLP_TRY {
+ return _S_tree_concat(__leftleft, __rest);
+ }
+ _STLP_UNWIND(_S_unref(__leftleft); _S_unref(__rest))
+ }
+ }
+ }
+ __left->_M_ref_nonnil();
+ __right->_M_ref_nonnil();
+ _STLP_TRY {
+ return _S_tree_concat(__left, __right);
+ }
+ _STLP_UNWIND(_S_unref(__left); _S_unref(__right))
+ _STLP_RET_AFTER_THROW(0)
+}
+
+template <class _CharT, class _Alloc>
+__RopeRep__*
+rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base,
+ size_t __start, size_t __endp1) {
+ if (0 == __base) return 0;
+ size_t __len = __base->_M_size._M_data;
+ size_t __adj_endp1;
+ const size_t __lazy_threshold = 128;
+
+ if (__endp1 >= __len) {
+ if (0 == __start) {
+ __base->_M_ref_nonnil();
+ return __base;
+ } else {
+ __adj_endp1 = __len;
+ }
+ } else {
+ __adj_endp1 = __endp1;
+ }
+ switch(__base->_M_tag) {
+ case _RopeRep::_S_concat:
+ {
+ _RopeConcatenation* __c = __STATIC_CAST(_RopeConcatenation*, __base);
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+ size_t __left_len = __left->_M_size._M_data;
+ _RopeRep* __result;
+
+ if (__adj_endp1 <= __left_len) {
+ return _S_substring(__left, __start, __endp1);
+ } else if (__start >= __left_len) {
+ return _S_substring(__right, __start - __left_len,
+ __adj_endp1 - __left_len);
+ }
+ _Self_destruct_ptr __left_result(_S_substring(__left, __start, __left_len));
+ _Self_destruct_ptr __right_result(_S_substring(__right, 0, __endp1 - __left_len));
+ _STLP_MPWFIX_TRY //*TY 06/01/2000 - mpw forgets to call dtor on __left_result and __right_result without this try block
+ __result = _S_concat_rep(__left_result, __right_result);
+ // _STLP_ASSERT(1 == __result->_M_ref_count)
+ return __result;
+ _STLP_MPWFIX_CATCH //*TY 06/01/2000 -
+ }
+ case _RopeRep::_S_leaf:
+ {
+ _RopeLeaf* __l = __STATIC_CAST(_RopeLeaf*, __base);
+ _RopeLeaf* __result;
+ size_t __result_len;
+ if (__start >= __adj_endp1) return 0;
+ __result_len = __adj_endp1 - __start;
+ if (__result_len > __lazy_threshold) goto lazy;
+ const _CharT* __section = __l->_M_data + __start;
+ // We should sometimes create substring node instead.
+ __result = _S_RopeLeaf_from_unowned_char_ptr(__section, __result_len,
+ __base->get_allocator());
+ return __result;
+ }
+ case _RopeRep::_S_substringfn:
+ // Avoid introducing multiple layers of substring nodes.
+ {
+ _RopeSubstring* __old = __STATIC_CAST(_RopeSubstring*, __base);
+ size_t __result_len;
+ if (__start >= __adj_endp1) return 0;
+ __result_len = __adj_endp1 - __start;
+ if (__result_len > __lazy_threshold) {
+ _RopeSubstring* __result = _S_new_RopeSubstring(__old->_M_base,
+ __start + __old->_M_start,
+ __adj_endp1 - __start,
+ __base->get_allocator());
+ return __result;
+ } // *** else fall through: ***
+ }
+ case _RopeRep::_S_function:
+ {
+ _RopeFunction* __f = __STATIC_CAST(_RopeFunction*, __base);
+ if (__start >= __adj_endp1) return 0;
+ size_t __result_len = __adj_endp1 - __start;
+
+ if (__result_len > __lazy_threshold) goto lazy;
+ _CharT* __section = __base->_M_size.allocate(_S_rounded_up_size(__result_len));
+ _STLP_TRY {
+ (*(__f->_M_fn))(__start, __result_len, __section);
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__section,
+ __result_len, __base->get_allocator()))
+ _S_construct_null(__section + __result_len);
+ return _S_new_RopeLeaf(__section, __result_len,
+ __base->get_allocator());
+ }
+ }
+ /*NOTREACHED*/
+ _STLP_ASSERT(false)
+ lazy:
+ {
+ // Create substring node.
+ return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start,
+ __base->get_allocator());
+ }
+}
+
+template<class _CharT>
+class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> {
+private:
+ _CharT* _M_buf_ptr;
+public:
+ _Rope_flatten_char_consumer(_CharT* __buffer) {
+ _M_buf_ptr = __buffer;
+ }
+ ~_Rope_flatten_char_consumer() {}
+ bool operator() (const _CharT* __leaf, size_t __n) {
+ _STLP_PRIV __ucopy_n(__leaf, __n, _M_buf_ptr);
+ _M_buf_ptr += __n;
+ return true;
+ }
+};
+
+template<class _CharT>
+class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> {
+private:
+ _CharT _M_pattern;
+public:
+ size_t _M_count; // Number of nonmatching characters
+ _Rope_find_char_char_consumer(_CharT __p)
+ : _M_pattern(__p), _M_count(0) {}
+ ~_Rope_find_char_char_consumer() {}
+ bool operator() (const _CharT* __leaf, size_t __n) {
+ size_t __i;
+ for (__i = 0; __i < __n; ++__i) {
+ if (__leaf[__i] == _M_pattern) {
+ _M_count += __i; return false;
+ }
+ }
+ _M_count += __n; return true;
+ }
+};
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+template<class _CharT, class _Traits>
+// Here _CharT is both the stream and rope character type.
+class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> {
+private:
+ typedef basic_ostream<_CharT,_Traits> _Insert_ostream;
+ typedef _Rope_insert_char_consumer<_CharT,_Traits> _Self;
+ _Insert_ostream& _M_o;
+
+ //explicitely defined as private to avoid warnings:
+ _Self& operator = (_Self const&);
+public:
+ _Rope_insert_char_consumer(_Insert_ostream& __writer)
+ : _M_o(__writer) {}
+ ~_Rope_insert_char_consumer() {}
+ // Caller is presumed to own the ostream
+ bool operator() (const _CharT* __leaf, size_t __n);
+ // Returns true to continue traversal.
+};
+
+template<class _CharT, class _Traits>
+bool _Rope_insert_char_consumer<_CharT, _Traits>::operator()
+ (const _CharT* __leaf, size_t __n) {
+ size_t __i;
+ // We assume that formatting is set up correctly for each element.
+ for (__i = 0; __i < __n; ++__i) _M_o.put(__leaf[__i]);
+ return true;
+}
+#endif /* !_STLP_USE_NO_IOSTREAMS */
+
+template <class _CharT, class _Alloc, class _CharConsumer>
+bool _S_apply_to_pieces(_CharConsumer& __c,
+ _Rope_RopeRep<_CharT, _Alloc> * __r,
+ size_t __begin, size_t __end) {
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
+ typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
+ typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
+
+ if (0 == __r) return true;
+ switch(__r->_M_tag) {
+ case _RopeRep::_S_concat:
+ {
+ _RopeConcatenation* __conc = __STATIC_CAST(_RopeConcatenation*, __r);
+ _RopeRep* __left = __conc->_M_left;
+ size_t __left_len = __left->_M_size._M_data;
+ if (__begin < __left_len) {
+ size_t __left_end = (min) (__left_len, __end);
+ if (!_S_apply_to_pieces(__c, __left, __begin, __left_end))
+ return false;
+ }
+ if (__end > __left_len) {
+ _RopeRep* __right = __conc->_M_right;
+ size_t __right_start = (max)(__left_len, __begin);
+ if (!_S_apply_to_pieces(__c, __right,
+ __right_start - __left_len,
+ __end - __left_len)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ case _RopeRep::_S_leaf:
+ {
+ _RopeLeaf* __l = __STATIC_CAST(_RopeLeaf*, __r);
+ return __c(__l->_M_data + __begin, __end - __begin);
+ }
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ {
+ _RopeFunction* __f = __STATIC_CAST(_RopeFunction*, __r);
+ size_t __len = __end - __begin;
+ bool __result;
+ _CharT* __buffer = __r->get_allocator().allocate(__len);
+ _STLP_TRY {
+ (*(__f->_M_fn))(__begin, __len, __buffer);
+ __result = __c(__buffer, __len);
+ __r->get_allocator().deallocate(__buffer, __len);
+ }
+ _STLP_UNWIND((__r->get_allocator().deallocate(__buffer, __len)))
+ return __result;
+ }
+ default:
+ _STLP_ASSERT(false)
+ /*NOTREACHED*/
+ return false;
+ }
+}
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+template<class _CharT, class _Traits>
+inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, streamsize __n) {
+ char __f = __o.fill();
+ for (streamsize __i = 0; __i < __n; ++__i) __o.put(__f);
+}
+
+template<class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& _S_io_get(basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r, const __true_type& /*_IsBasicCharType*/) {
+ streamsize __w = __o.width();
+ const bool __left = (__o.flags() & ios::left) != 0;
+ size_t __rope_len = __r.size();
+ _Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
+
+ const bool __need_pad = (((sizeof(streamsize) > sizeof(size_t)) && (__STATIC_CAST(streamsize, __rope_len) < __w)) ||
+ ((sizeof(streamsize) <= sizeof(size_t)) && (__rope_len < __STATIC_CAST(size_t, __w))));
+ streamsize __pad_len = __need_pad ? __w - __rope_len : 0;
+
+ if (!__left && __pad_len > 0) {
+ _Rope_fill(__o, __pad_len);
+ }
+ __r.apply_to_pieces(0, __rope_len, __c);
+ if (__left && __pad_len > 0) {
+ _Rope_fill(__o, __pad_len);
+ }
+ return __o;
+}
+
+template<class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& _S_io_get(basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r, const __false_type& /*_IsBasicCharType*/) {
+ streamsize __w = __o.width();
+ size_t __rope_len = __r.size();
+ _Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
+
+ __o.width(__w /__rope_len);
+ _STLP_TRY {
+ __r.apply_to_pieces(0, __rope_len, __c);
+ __o.width(__w);
+ }
+ _STLP_UNWIND(__o.width(__w))
+ return __o;
+}
+
+template<class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r) {
+ typedef typename _IsIntegral<_CharT>::_Ret _Char_Is_Integral;
+ return _S_io_get(__o, __r, _Char_Is_Integral());
+}
+#endif /* NO_IOSTREAMS */
+
+template <class _CharT, class _Alloc>
+_CharT* rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r,
+ size_t __start, size_t __len,
+ _CharT* __buffer) {
+ _Rope_flatten_char_consumer<_CharT> __c(__buffer);
+ _S_apply_to_pieces(__c, __r, __start, __start + __len);
+ return(__buffer + __len);
+}
+
+template <class _CharT, class _Alloc>
+size_t rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const {
+ _Rope_find_char_char_consumer<_CharT> __c(__pattern);
+ _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __start, size());
+ size_type __result_pos = __start + __c._M_count;
+#ifndef _STLP_OLD_ROPE_SEMANTICS
+ if (__result_pos == size()) __result_pos = npos;
+#endif
+ return __result_pos;
+}
+
+template <class _CharT, class _Alloc>
+_CharT*
+rope<_CharT,_Alloc>::_S_flatten(_Rope_RopeRep<_CharT, _Alloc>* __r, _CharT* __buffer) {
+ if (0 == __r) return __buffer;
+ switch(__r->_M_tag) {
+ case _RopeRep::_S_concat:
+ {
+ _RopeConcatenation* __c = __STATIC_CAST(_RopeConcatenation*, __r);
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+ _CharT* __rest = _S_flatten(__left, __buffer);
+ return _S_flatten(__right, __rest);
+ }
+ case _RopeRep::_S_leaf:
+ {
+ _RopeLeaf* __l = __STATIC_CAST(_RopeLeaf*, __r);
+ return _STLP_PRIV __ucopy_n(__l->_M_data, __l->_M_size._M_data, __buffer).second;
+ }
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ // We dont yet do anything with substring nodes.
+ // This needs to be fixed before ropefiles will work well.
+ {
+ _RopeFunction* __f = __STATIC_CAST(_RopeFunction*, __r);
+ (*(__f->_M_fn))(0, __f->_M_size._M_data, __buffer);
+ return __buffer + __f->_M_size._M_data;
+ }
+ default:
+ _STLP_ASSERT(false)
+ /*NOTREACHED*/
+ return 0;
+ }
+}
+
+#ifdef _STLP_DEBUG
+// This needs work for _CharT != char
+template <class _CharT, class _Alloc>
+void rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent) {
+ for (int __i = 0; __i < __indent; ++__i) putchar(' ');
+ if (0 == __r) {
+ printf("NULL\n"); return;
+ }
+ if (_RopeRep::_S_concat == __r->_M_tag) {
+ _RopeConcatenation* __c = __STATIC_CAST(_RopeConcatenation*, __r);
+ _RopeRep* __left = __c->_M_left;
+ _RopeRep* __right = __c->_M_right;
+ printf("Concatenation %p (rc = %ld, depth = %d, len = %ld, %s balanced)\n",
+ __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data,
+ __r->_M_is_balanced? "" : "not");
+ _S_dump(__left, __indent + 2);
+ _S_dump(__right, __indent + 2);
+ return;
+ }
+ else {
+ const char* __kind;
+
+ switch (__r->_M_tag) {
+ case _RopeRep::_S_leaf:
+ __kind = "Leaf";
+ break;
+ case _RopeRep::_S_function:
+ __kind = "Function";
+ break;
+ case _RopeRep::_S_substringfn:
+ __kind = "Function representing substring";
+ break;
+ default:
+ __kind = "(corrupted kind field!)";
+ }
+ printf("%s %p (rc = %ld, depth = %d, len = %ld) ",
+ __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data);
+ if (sizeof(_CharT) == 1) {
+ const int __max_len = 40;
+ _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
+ _CharT __buffer[__max_len + 1];
+ bool __too_big = __r->_M_size._M_data > __prefix->_M_size._M_data;
+
+ _S_flatten(__prefix, __buffer);
+ __buffer[__prefix->_M_size._M_data] = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ printf("%s%s\n", (char*)__buffer, __too_big? "...\n" : "\n");
+ } else {
+ printf("\n");
+ }
+ }
+}
+#endif /* _STLP_DEBUG */
+
+# define __ROPE_TABLE_BODY = { \
+/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, \
+/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, \
+/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, \
+/* 18 */6765ul, /* 19 */10946ul, /* 20 */17711ul, /* 21 */28657ul, /* 22 */46368ul, \
+/* 23 */75025ul, /* 24 */121393ul, /* 25 */196418ul, /* 26 */317811ul, \
+/* 27 */514229ul, /* 28 */832040ul, /* 29 */1346269ul, /* 30 */2178309ul, \
+/* 31 */3524578ul, /* 32 */5702887ul, /* 33 */9227465ul, /* 34 */14930352ul, \
+/* 35 */24157817ul, /* 36 */39088169ul, /* 37 */63245986ul, /* 38 */102334155ul, \
+/* 39 */165580141ul, /* 40 */267914296ul, /* 41 */433494437ul, \
+/* 42 */701408733ul, /* 43 */1134903170ul, /* 44 */1836311903ul, \
+/* 45 */2971215073ul }
+
+template <class _CharT, class _Alloc>
+const unsigned long
+rope<_CharT,_Alloc>::_S_min_len[__ROPE_DEPTH_SIZE] __ROPE_TABLE_BODY;
+# undef __ROPE_DEPTH_SIZE
+# undef __ROPE_MAX_DEPTH
+# undef __ROPE_TABLE_BODY
+
+// These are Fibonacci numbers < 2**32.
+
+template <class _CharT, class _Alloc>
+__RopeRep__* rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) {
+ _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0};
+ _RopeRep* __result = 0;
+ int __i;
+ // Invariant:
+ // The concatenation of forest in descending order is equal to __r.
+ // __forest[__i]._M_size._M_data >= _S_min_len[__i]
+ // __forest[__i]._M_depth = __i
+ // References from forest are included in refcount.
+
+ _STLP_TRY {
+ _S_add_to_forest(__r, __forest);
+ for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
+ if (0 != __forest[__i]) {
+ _Self_destruct_ptr __old(__result);
+ __result = _S_concat_rep(__forest[__i], __result);
+ __forest[__i]->_M_unref_nonnil();
+# ifdef _STLP_USE_EXCEPTIONS
+ __forest[__i] = 0;
+# endif
+ }
+ }
+ _STLP_UNWIND(for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i)
+ _S_unref(__forest[__i]))
+ if (__result->_M_depth > _RopeRep::_S_max_rope_depth) {
+ __stl_throw_range_error("rope too long");
+ }
+ return(__result);
+}
+
+
+template <class _CharT, class _Alloc>
+void
+rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
+{
+ if (__r -> _M_is_balanced) {
+ _S_add_leaf_to_forest(__r, __forest);
+ return;
+ }
+ _STLP_ASSERT(__r->_M_tag == _RopeRep::_S_concat)
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+
+ _S_add_to_forest(__c->_M_left, __forest);
+ _S_add_to_forest(__c->_M_right, __forest);
+ }
+}
+
+
+template <class _CharT, class _Alloc>
+void
+rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
+{
+ _RopeRep* __insertee; // included in refcount
+ _RopeRep* __too_tiny = 0; // included in refcount
+ int __i; // forest[0..__i-1] is empty
+ size_t __s = __r->_M_size._M_data;
+
+ for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) {
+ if (0 != __forest[__i]) {
+ _Self_destruct_ptr __old(__too_tiny);
+ __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny);
+ __forest[__i]->_M_unref_nonnil();
+ __forest[__i] = 0;
+ }
+ }
+ {
+ _Self_destruct_ptr __old(__too_tiny);
+ __insertee = _S_concat_and_set_balanced(__too_tiny, __r);
+ }
+ // Too_tiny dead, and no longer included in refcount.
+ // Insertee is live and included.
+ _STLP_ASSERT(_S_is_almost_balanced(__insertee))
+ _STLP_ASSERT(__insertee->_M_depth <= __r->_M_depth + 1)
+ for (;; ++__i) {
+ if (0 != __forest[__i]) {
+ _Self_destruct_ptr __old(__insertee);
+ __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee);
+ __forest[__i]->_M_unref_nonnil();
+ __forest[__i] = 0;
+ _STLP_ASSERT(_S_is_almost_balanced(__insertee))
+ }
+ _STLP_ASSERT(_S_min_len[__i] <= __insertee->_M_size._M_data)
+ _STLP_ASSERT(__forest[__i] == 0)
+ if (__i == _RopeRep::_S_max_rope_depth ||
+ __insertee->_M_size._M_data < _S_min_len[__i+1]) {
+ __forest[__i] = __insertee;
+ // refcount is OK since __insertee is now dead.
+ return;
+ }
+ }
+}
+
+template <class _CharT, class _Alloc>
+_CharT
+rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i)
+{
+ _CharT* __cstr = __r->_M_c_string;
+
+ _STLP_ASSERT(__i < __r->_M_size._M_data)
+ if (0 != __cstr) return __cstr[__i];
+ for(;;) {
+ switch(__r->_M_tag) {
+ case _RopeRep::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size._M_data;
+
+ if (__i >= __left_len) {
+ __i -= __left_len;
+ __r = __c->_M_right;
+ } else {
+ __r = __left;
+ }
+ }
+ break;
+ case _RopeRep::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ return __l->_M_data[__i];
+ }
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ {
+ _RopeFunction* __f = (_RopeFunction*)__r;
+ _CharT __result;
+
+ (*(__f->_M_fn))(__i, 1, &__result);
+ return __result;
+ }
+ }
+ }
+#if defined(_STLP_NEED_UNREACHABLE_RETURN)
+ return 0;
+#endif
+}
+
+// Return a uniquely referenced character slot for the given
+// position, or 0 if that's not possible.
+template <class _CharT, class _Alloc>
+_CharT*
+rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
+{
+ _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth];
+ size_t __csptr = 0;
+
+ for(;;) {
+ // if (__r->_M_ref_count > 1) return 0;
+ if ( __r->_M_incr() > 2 ) {
+ __r->_M_decr();
+ return 0;
+ }
+ switch(__r->_M_tag) {
+ case _RopeRep::_S_concat:
+ {
+ _RopeConcatenation* __c = (_RopeConcatenation*)__r;
+ _RopeRep* __left = __c->_M_left;
+ size_t __left_len = __left->_M_size._M_data;
+
+ if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c;
+ if (__i >= __left_len) {
+ __i -= __left_len;
+ __r = __c->_M_right;
+ } else {
+ __r = __left;
+ }
+ }
+ break;
+ case _RopeRep::_S_leaf:
+ {
+ _RopeLeaf* __l = (_RopeLeaf*)__r;
+ if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
+ __clrstack[__csptr++] = __l;
+ while (__csptr > 0) {
+ -- __csptr;
+ _RopeRep* __d = __clrstack[__csptr];
+ __d->_M_free_c_string();
+ __d->_M_c_string = 0;
+ }
+ return __l->_M_data + __i;
+ }
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ return 0;
+ }
+ }
+#if defined(_STLP_NEED_UNREACHABLE_RETURN)
+ return 0;
+#endif
+
+}
+
+// The following could be implemented trivially using
+// lexicographical_compare_3way.
+// We do a little more work to avoid dealing with rope iterators for
+// flat strings.
+template <class _CharT, class _Alloc>
+int
+rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left,
+ const _RopeRep* __right) {
+ size_t __left_len;
+ size_t __right_len;
+
+ if (0 == __right) return 0 != __left;
+ if (0 == __left) return -1;
+ __left_len = __left->_M_size._M_data;
+ __right_len = __right->_M_size._M_data;
+ if (_RopeRep::_S_leaf == __left->_M_tag) {
+ const _RopeLeaf* __l = __STATIC_CAST(const _RopeLeaf*, __left);
+ if (_RopeRep::_S_leaf == __right->_M_tag) {
+ const _RopeLeaf* __r = __STATIC_CAST(const _RopeLeaf*, __right);
+ return _STLP_PRIV __lexicographical_compare_3way(__l->_M_data, __l->_M_data + __left_len,
+ __r->_M_data, __r->_M_data + __right_len);
+ }
+ else {
+ const_iterator __rstart(__right, 0);
+ const_iterator __rend(__right, __right_len);
+ return _STLP_PRIV __lexicographical_compare_3way(__l->_M_data, __l->_M_data + __left_len,
+ __rstart, __rend);
+ }
+ }
+ else {
+ const_iterator __lstart(__left, 0);
+ const_iterator __lend(__left, __left_len);
+ if (_RopeRep::_S_leaf == __right->_M_tag) {
+ const _RopeLeaf* __r = __STATIC_CAST(const _RopeLeaf*, __right);
+ return _STLP_PRIV __lexicographical_compare_3way(__lstart, __lend,
+ __r->_M_data, __r->_M_data + __right_len);
+ }
+ else {
+ const_iterator __rstart(__right, 0);
+ const_iterator __rend(__right, __right_len);
+ return _STLP_PRIV __lexicographical_compare_3way(__lstart, __lend, __rstart, __rend);
+ }
+ }
+}
+
+// Assignment to reference proxies.
+template <class _CharT, class _Alloc>
+_Rope_char_ref_proxy<_CharT, _Alloc>&
+_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) {
+ _RopeRep* __old = _M_root->_M_tree_ptr._M_data;
+ // First check for the case in which everything is uniquely
+ // referenced. In that case we can do this destructively.
+ _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos);
+ if (0 != __ptr) {
+ *__ptr = __c;
+ return *this;
+ }
+ _Self_destruct_ptr __left(
+ _My_rope::_S_substring(__old, 0, _M_pos));
+ _Self_destruct_ptr __right(
+ _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size._M_data));
+ _Self_destruct_ptr __result_left(
+ _My_rope::_S_destr_concat_char_iter(__left, &__c, 1));
+
+ // _STLP_ASSERT(__left == __result_left || 1 == __result_left->_M_ref_count)
+ _RopeRep* __result =
+ _My_rope::_S_concat_rep(__result_left, __right);
+ // _STLP_ASSERT(1 <= __result->_M_ref_count)
+ _RopeRep::_S_unref(__old);
+ _M_root->_M_tree_ptr._M_data = __result;
+ return *this;
+}
+
+template <class _CharT, class _Alloc>
+_Rope_char_ptr_proxy<_CharT, _Alloc>
+_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const {
+ return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this);
+}
+
+template<class _CharT, class _Alloc>
+_CharT rope<_CharT,_Alloc>::_S_empty_c_str[1] = { _CharT() };
+// # endif
+
+#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
+template <class _CharT, class _Alloc>
+const size_t rope<_CharT, _Alloc>::npos;
+#endif
+
+template<class _CharT, class _Alloc>
+const _CharT* rope<_CharT,_Alloc>::c_str() const {
+ if (0 == _M_tree_ptr._M_data) {
+ // Possibly redundant, but probably fast.
+ _S_empty_c_str[0] = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ return _S_empty_c_str;
+ }
+ _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
+ if (0 != __old_c_string) return __old_c_string;
+ size_t __s = size();
+ _CharT* __result = _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).allocate(__s + 1);
+ _S_flatten(_M_tree_ptr._M_data, __result);
+ _S_construct_null(__result + __s);
+ __old_c_string = __STATIC_CAST(_CharT*, _Atomic_swap_ptr(__REINTERPRET_CAST(void* _STLP_VOLATILE*, &(_M_tree_ptr._M_data->_M_c_string)),
+ __result));
+ if (0 != __old_c_string) {
+ // It must have been added in the interim. Hence it had to have been
+ // separately allocated. Deallocate the old copy, since we just
+ // replaced it.
+ _STLP_STD::_Destroy_Range(__old_c_string, __old_c_string + __s + 1);
+ _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).deallocate(__old_c_string, __s + 1);
+ }
+ return __result;
+}
+
+template<class _CharT, class _Alloc>
+const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() {
+ if (0 == _M_tree_ptr._M_data) {
+ _S_empty_c_str[0] = _STLP_DEFAULT_CONSTRUCTED(_CharT);
+ return _S_empty_c_str;
+ }
+ _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
+ if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 0 != __old_c_string) {
+ return __old_c_string;
+ }
+ size_t __s = size();
+ _CharT* __result = _M_tree_ptr.allocate(_S_rounded_up_size(__s));
+ _S_flatten(_M_tree_ptr._M_data, __result);
+ _S_construct_null(__result + __s);
+ _M_tree_ptr._M_data->_M_unref_nonnil();
+ _M_tree_ptr._M_data = _S_new_RopeLeaf(__result, __s, _M_tree_ptr);
+ return __result;
+}
+
+// Algorithm specializations. More should be added.
+
+#if (!defined (_STLP_MSVC) || (_STLP_MSVC >= 1310)) && !defined (__DMC__)
+// I couldn't get this to work with VC++
+template<class _CharT,class _Alloc>
+void _Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first,
+ _Rope_iterator<_CharT,_Alloc> __middle,
+ _Rope_iterator<_CharT,_Alloc> __last) {
+ _STLP_ASSERT(__first.container() == __middle.container() &&
+ __middle.container() == __last.container())
+ rope<_CharT,_Alloc>& __r(__first.container());
+ rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index());
+ rope<_CharT,_Alloc> __suffix =
+ __r.substr(__last.index(), __r.size() - __last.index());
+ rope<_CharT,_Alloc> __part1 =
+ __r.substr(__middle.index(), __last.index() - __middle.index());
+ rope<_CharT,_Alloc> __part2 =
+ __r.substr(__first.index(), __middle.index() - __first.index());
+ __r = __prefix;
+ __r += __part1;
+ __r += __part2;
+ __r += __suffix;
+}
+
+
+# if 0
+// Probably not useful for several reasons:
+// - for SGIs 7.1 compiler and probably some others,
+// this forces lots of rope<wchar_t, ...> instantiations, creating a
+// code bloat and compile time problem. (Fixed in 7.2.)
+// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive
+// for unicode strings. Unsigned short may be a better character
+// type.
+inline void rotate(
+ _Rope_iterator<wchar_t, allocator<char> > __first,
+ _Rope_iterator<wchar_t, allocator<char> > __middle,
+ _Rope_iterator<wchar_t, allocator<char> > __last) {
+ _Rope_rotate(__first, __middle, __last);
+}
+# endif
+#endif /* _STLP_MSVC */
+
+# undef __RopeLeaf__
+# undef __RopeRep__
+# undef __RopeLeaf
+# undef __RopeRep
+# undef size_type
+
+_STLP_END_NAMESPACE
+
+# endif /* ROPEIMPL_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_rope.h b/6/sources/cxx-stl/stlport/stlport/stl/_rope.h
new file mode 100644
index 0000000..f100f67
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_rope.h
@@ -0,0 +1,2389 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+// rope<_CharT,_Alloc> is a sequence of _CharT.
+// Ropes appear to be mutable, but update operations
+// really copy enough of the data structure to leave the original
+// valid. Thus ropes can be logically copied by just copying
+// a pointer value.
+
+#ifndef _STLP_INTERNAL_ROPE_H
+#define _STLP_INTERNAL_ROPE_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#if !defined (_STLP_USE_NO_IOSTREAMS) && !defined (_STLP_INTERNAL_IOSFWD)
+# include <stl/_iosfwd.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGO_H
+# include <stl/_algo.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUMERIC_H
+# include <stl/_numeric.h>
+#endif
+
+#ifndef _STLP_INTERNAL_HASH_FUN_H
+# include <stl/_hash_fun.h>
+#endif
+
+#ifndef _STLP_CHAR_TRAITS_H
+# include <stl/char_traits.h>
+#endif
+
+#ifndef _STLP_INTERNAL_THREADS_H
+# include <stl/_threads.h>
+#endif
+
+#ifdef _STLP_SGI_THREADS
+# include <mutex.h>
+#endif
+
+#ifndef _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE
+# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) (_Alloc_traits<_Tp,__atype>::create_allocator(__a))
+#else
+# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// First a lot of forward declarations. The standard seems to require
+// much stricter "declaration before use" than many of the implementations
+// that preceded it.
+template<class _CharT, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_CharT>) > class rope;
+template<class _CharT, class _Alloc> struct _Rope_RopeConcatenation;
+template<class _CharT, class _Alloc> struct _Rope_RopeRep;
+template<class _CharT, class _Alloc> struct _Rope_RopeLeaf;
+template<class _CharT, class _Alloc> struct _Rope_RopeFunction;
+template<class _CharT, class _Alloc> struct _Rope_RopeSubstring;
+template<class _CharT, class _Alloc> class _Rope_iterator;
+template<class _CharT, class _Alloc> class _Rope_const_iterator;
+template<class _CharT, class _Alloc> class _Rope_char_ref_proxy;
+template<class _CharT, class _Alloc> class _Rope_char_ptr_proxy;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT>
+struct _BasicCharType { typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _BasicCharType<char> { typedef __true_type _Ret; };
+
+#ifdef _STLP_HAS_WCHAR_T
+_STLP_TEMPLATE_NULL
+struct _BasicCharType<wchar_t> { typedef __true_type _Ret; };
+#endif
+
+// Some helpers, so we can use the power algorithm on ropes.
+// See below for why this isn't local to the implementation.
+
+// This uses a nonstandard refcount convention.
+// The result has refcount 0.
+template<class _CharT, class _Alloc>
+struct _Rope_Concat_fn
+ : public binary_function<rope<_CharT,_Alloc>, rope<_CharT,_Alloc>,
+ rope<_CharT,_Alloc> > {
+ rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x,
+ const rope<_CharT,_Alloc>& __y) {
+ return __x + __y;
+ }
+};
+
+template <class _CharT, class _Alloc>
+inline
+rope<_CharT,_Alloc>
+__identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
+{ return rope<_CharT,_Alloc>(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+// Store an eos
+template <class _CharT>
+inline void _S_construct_null_aux(_CharT *__p, const __true_type&)
+{ *__p = 0; }
+
+template <class _CharT>
+inline void _S_construct_null_aux(_CharT *__p, const __false_type&)
+{ _STLP_STD::_Construct(__p); }
+
+template <class _CharT>
+inline void _S_construct_null(_CharT *__p) {
+ typedef typename _IsIntegral<_CharT>::_Ret _Char_Is_Integral;
+ _S_construct_null_aux(__p, _Char_Is_Integral());
+}
+
+// char_producers are logically functions that generate a section of
+// a string. These can be converted to ropes. The resulting rope
+// invokes the char_producer on demand. This allows, for example,
+// files to be viewed as ropes without reading the entire file.
+template <class _CharT>
+class char_producer {
+public:
+ virtual ~char_producer() {}
+ virtual void operator()(size_t __start_pos, size_t __len,
+ _CharT* __buffer) = 0;
+ // Buffer should really be an arbitrary output iterator.
+ // That way we could flatten directly into an ostream, etc.
+ // This is thoroughly impossible, since iterator types don't
+ // have runtime descriptions.
+};
+
+// Sequence buffers:
+//
+// Sequence must provide an append operation that appends an
+// array to the sequence. Sequence buffers are useful only if
+// appending an entire array is cheaper than appending element by element.
+// This is true for many string representations.
+// This should perhaps inherit from ostream<sequence::value_type>
+// and be implemented correspondingly, so that they can be used
+// for formatted. For the sake of portability, we don't do this yet.
+//
+// For now, sequence buffers behave as output iterators. But they also
+// behave a little like basic_ostringstream<sequence::value_type> and a
+// little like containers.
+
+template<class _Sequence
+# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \
+ defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM ))
+ , size_t _Buf_sz = 100
+# if defined(__sgi) && !defined(__GNUC__)
+# define __TYPEDEF_WORKAROUND
+ ,class _V = typename _Sequence::value_type
+# endif /* __sgi */
+# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
+ >
+// The 3rd parameter works around a common compiler bug.
+class sequence_buffer : public iterator <output_iterator_tag, void, void, void, void> {
+public:
+# ifndef __TYPEDEF_WORKAROUND
+ typedef typename _Sequence::value_type value_type;
+ typedef sequence_buffer<_Sequence
+# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \
+ defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM ))
+ , _Buf_sz
+ > _Self;
+# else /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
+ > _Self;
+ enum { _Buf_sz = 100};
+# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
+ // # endif
+# else /* __TYPEDEF_WORKAROUND */
+ typedef _V value_type;
+ typedef sequence_buffer<_Sequence, _Buf_sz, _V> _Self;
+# endif /* __TYPEDEF_WORKAROUND */
+protected:
+ _Sequence* _M_prefix;
+ value_type _M_buffer[_Buf_sz];
+ size_t _M_buf_count;
+public:
+ void flush() {
+ _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count);
+ _M_buf_count = 0;
+ }
+ ~sequence_buffer() { flush(); }
+ sequence_buffer() : _M_prefix(0), _M_buf_count(0) {}
+ sequence_buffer(const _Self& __x) {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ _STLP_STD::copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ }
+ sequence_buffer(_Self& __x) {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ }
+ sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {}
+ _Self& operator= (_Self& __x) {
+ __x.flush();
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = 0;
+ return *this;
+ }
+ _Self& operator= (const _Self& __x) {
+ _M_prefix = __x._M_prefix;
+ _M_buf_count = __x._M_buf_count;
+ _STLP_STD::copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+ return *this;
+ }
+ void push_back(value_type __x) {
+ if (_M_buf_count < _Buf_sz) {
+ _M_buffer[_M_buf_count] = __x;
+ ++_M_buf_count;
+ } else {
+ flush();
+ _M_buffer[0] = __x;
+ _M_buf_count = 1;
+ }
+ }
+ void append(const value_type *__s, size_t __len) {
+ if (__len + _M_buf_count <= _Buf_sz) {
+ size_t __i = _M_buf_count;
+ size_t __j = 0;
+ for (; __j < __len; __i++, __j++) {
+ _M_buffer[__i] = __s[__j];
+ }
+ _M_buf_count += __len;
+ } else if (0 == _M_buf_count) {
+ _M_prefix->append(__s, __s + __len);
+ } else {
+ flush();
+ append(__s, __len);
+ }
+ }
+ _Self& write(const value_type *__s, size_t __len) {
+ append(__s, __len);
+ return *this;
+ }
+ _Self& put(value_type __x) {
+ push_back(__x);
+ return *this;
+ }
+ _Self& operator=(const value_type& __rhs) {
+ push_back(__rhs);
+ return *this;
+ }
+ _Self& operator*() { return *this; }
+ _Self& operator++() { return *this; }
+ _Self& operator++(int) { return *this; }
+};
+
+// The following should be treated as private, at least for now.
+template<class _CharT>
+class _Rope_char_consumer {
+#if !defined (_STLP_MEMBER_TEMPLATES)
+public:
+ //Without member templates we have to use run-time parameterization.
+ // The symmetry with char_producer is accidental and temporary.
+ virtual ~_Rope_char_consumer() {}
+ virtual bool operator()(const _CharT* __buffer, size_t __len) = 0;
+#endif
+};
+
+//
+// What follows should really be local to rope. Unfortunately,
+// that doesn't work, since it makes it impossible to define generic
+// equality on rope iterators. According to the draft standard, the
+// template parameters for such an equality operator cannot be inferred
+// from the occurence of a member class as a parameter.
+// (SGI compilers in fact allow this, but the __result wouldn't be
+// portable.)
+// Similarly, some of the static member functions are member functions
+// only to avoid polluting the global namespace, and to circumvent
+// restrictions on type inference for template functions.
+//
+
+//
+// The internal data structure for representing a rope. This is
+// private to the implementation. A rope is really just a pointer
+// to one of these.
+//
+// A few basic functions for manipulating this data structure
+// are members of _RopeRep. Most of the more complex algorithms
+// are implemented as rope members.
+//
+// Some of the static member functions of _RopeRep have identically
+// named functions in rope that simply invoke the _RopeRep versions.
+//
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeRep
+ : public _Refcount_Base
+{
+ typedef _Rope_RopeRep<_CharT, _Alloc> _Self;
+public:
+ //
+ // GAB: 11/09/05
+ //
+ // "__ROPE_DEPTH_SIZE" is set to one more then the "__ROPE_MAX_DEPTH".
+ // This was originally just an addition of "__ROPE_MAX_DEPTH + 1"
+ // but this addition causes the sunpro compiler to complain about
+ // multiple declarations during the initialization of "_S_min_len".
+ // Changed to be a fixed value and the sunpro compiler appears to
+ // be happy???
+ //
+# define __ROPE_MAX_DEPTH 45
+# define __ROPE_DEPTH_SIZE 46 // __ROPE_MAX_DEPTH + 1
+ enum { _S_max_rope_depth = __ROPE_MAX_DEPTH };
+ enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
+ // Apparently needed by VC++
+ // The data fields of leaves are allocated with some
+ // extra space, to accomodate future growth and for basic
+ // character types, to hold a trailing eos character.
+ enum { _S_alloc_granularity = 8 };
+
+ _Tag _M_tag:8;
+ bool _M_is_balanced:8;
+
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef _Alloc allocator_type;
+
+ allocator_type get_allocator() const { return allocator_type(_M_size); }
+
+ unsigned char _M_depth;
+ _CharT* _STLP_VOLATILE _M_c_string;
+ _STLP_PRIV _STLP_alloc_proxy<size_t, _CharT, allocator_type> _M_size;
+
+#ifdef _STLP_NO_ARROW_OPERATOR
+ _Rope_RopeRep() : _Refcount_Base(1), _M_size(allocator_type(), 0) {
+# if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+ _STLP_CHECK_RUNTIME_COMPATIBILITY();
+# endif
+ }
+#endif
+
+ /* Flattened version of string, if needed. */
+ /* typically 0. */
+ /* If it's not 0, then the memory is owned */
+ /* by this node. */
+ /* In the case of a leaf, this may point to */
+ /* the same memory as the data field. */
+ _Rope_RopeRep(_Tag __t, unsigned char __d, bool __b, size_t _p_size,
+ allocator_type __a) :
+ _Refcount_Base(1),
+ _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0), _M_size(__a, _p_size) {
+#if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+ _STLP_CHECK_RUNTIME_COMPATIBILITY();
+#endif
+ }
+
+ typedef _STLP_TYPENAME _STLP_PRIV _BasicCharType<_CharT>::_Ret _IsBasicCharType;
+
+#if 0
+ /* Please tell why this code is necessary if you uncomment it.
+ * Problem with it is that rope implementation expect that _S_rounded_up_size(n)
+ * returns a size > n in order to store the terminating null charater. When
+ * instanciation type is not a char or wchar_t this is not guaranty resulting in
+ * memory overrun.
+ */
+ static size_t _S_rounded_up_size_aux(size_t __n, __true_type const& /*_IsBasicCharType*/) {
+ // Allow slop for in-place expansion.
+ return (__n + _S_alloc_granularity) & ~(_S_alloc_granularity - 1);
+ }
+
+ static size_t _S_rounded_up_size_aux(size_t __n, __false_type const& /*_IsBasicCharType*/) {
+ // Allow slop for in-place expansion.
+ return (__n + _S_alloc_granularity - 1) & ~(_S_alloc_granularity - 1);
+ }
+#endif
+ // fbp : moved from RopeLeaf
+ static size_t _S_rounded_up_size(size_t __n)
+ //{ return _S_rounded_up_size_aux(__n, _IsBasicCharType()); }
+ { return (__n + _S_alloc_granularity) & ~(_S_alloc_granularity - 1); }
+
+ static void _S_free_string( _CharT* __s, size_t __len,
+ allocator_type __a) {
+ _STLP_STD::_Destroy_Range(__s, __s + __len);
+ // This has to be a static member, so this gets a bit messy
+# ifndef _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE
+ __a.deallocate(__s, _S_rounded_up_size(__len)); //*ty 03/24/2001 - restored not to use __stl_alloc_rebind() since it is not defined under _STLP_MEMBER_TEMPLATE_CLASSES
+# else
+ __stl_alloc_rebind (__a, (_CharT*)0).deallocate(__s, _S_rounded_up_size(__len));
+# endif
+ }
+
+ // Deallocate data section of a leaf.
+ // This shouldn't be a member function.
+ // But its hard to do anything else at the
+ // moment, because it's templatized w.r.t.
+ // an allocator.
+ // Does nothing if __GC is defined.
+ void _M_free_c_string();
+ void _M_free_tree();
+ // Deallocate t. Assumes t is not 0.
+ void _M_unref_nonnil() {
+ if (_M_decr() == 0) _M_free_tree();
+ }
+ void _M_ref_nonnil() {
+ _M_incr();
+ }
+ static void _S_unref(_Self* __t) {
+ if (0 != __t) {
+ __t->_M_unref_nonnil();
+ }
+ }
+ static void _S_ref(_Self* __t) {
+ if (0 != __t) __t->_M_incr();
+ }
+ //static void _S_free_if_unref(_Self* __t) {
+ // if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree();
+ //}
+};
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> {
+public:
+ _CharT* _M_data; /* Not necessarily 0 terminated. */
+ /* The allocated size is */
+ /* _S_rounded_up_size(size), except */
+ /* in the GC case, in which it */
+ /* doesn't matter. */
+private:
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ typedef typename _RopeRep::_IsBasicCharType _IsBasicCharType;
+ void _M_init(__true_type const& /*_IsBasicCharType*/) {
+ this->_M_c_string = _M_data;
+ }
+ void _M_init(__false_type const& /*_IsBasicCharType*/) {}
+
+public:
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef typename _RopeRep::allocator_type allocator_type;
+
+ _Rope_RopeLeaf( _CharT* __d, size_t _p_size, allocator_type __a)
+ : _Rope_RopeRep<_CharT,_Alloc>(_RopeRep::_S_leaf, 0, true, _p_size, __a),
+ _M_data(__d) {
+ _STLP_ASSERT(_p_size > 0)
+ _M_init(_IsBasicCharType());
+ }
+
+# ifdef _STLP_NO_ARROW_OPERATOR
+ _Rope_RopeLeaf() {}
+ _Rope_RopeLeaf(const _Rope_RopeLeaf<_CharT, _Alloc>& ) {}
+# endif
+
+// The constructor assumes that d has been allocated with
+ // the proper allocator and the properly padded size.
+ // In contrast, the destructor deallocates the data:
+ ~_Rope_RopeLeaf() {
+ if (_M_data != this->_M_c_string) {
+ this->_M_free_c_string();
+ }
+ _RopeRep::_S_free_string(_M_data, this->_M_size._M_data, this->get_allocator());
+ }
+};
+
+template<class _CharT, class _Alloc>
+struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT, _Alloc> {
+private:
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+
+public:
+ _RopeRep* _M_left;
+ _RopeRep* _M_right;
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef typename _RopeRep::allocator_type allocator_type;
+ _Rope_RopeConcatenation(_RopeRep* __l, _RopeRep* __r, allocator_type __a)
+ : _Rope_RopeRep<_CharT,_Alloc>(_RopeRep::_S_concat,
+ (max)(__l->_M_depth, __r->_M_depth) + 1, false,
+ __l->_M_size._M_data + __r->_M_size._M_data, __a), _M_left(__l), _M_right(__r)
+ {}
+# ifdef _STLP_NO_ARROW_OPERATOR
+ _Rope_RopeConcatenation() {}
+ _Rope_RopeConcatenation(const _Rope_RopeConcatenation<_CharT, _Alloc>&) {}
+# endif
+
+ ~_Rope_RopeConcatenation() {
+ this->_M_free_c_string();
+ _M_left->_M_unref_nonnil();
+ _M_right->_M_unref_nonnil();
+ }
+};
+
+template <class _CharT, class _Alloc>
+struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT, _Alloc> {
+private:
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+public:
+ char_producer<_CharT>* _M_fn;
+ /*
+ * Char_producer is owned by the
+ * rope and should be explicitly
+ * deleted when the rope becomes
+ * inaccessible.
+ */
+ bool _M_delete_when_done;
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type;
+# ifdef _STLP_NO_ARROW_OPERATOR
+ _Rope_RopeFunction() {}
+ _Rope_RopeFunction(const _Rope_RopeFunction<_CharT, _Alloc>& ) {}
+# endif
+
+ _Rope_RopeFunction(char_producer<_CharT>* __f, size_t _p_size,
+ bool __d, allocator_type __a)
+ : _Rope_RopeRep<_CharT,_Alloc>(_RopeRep::_S_function, 0, true, _p_size, __a), _M_fn(__f)
+ , _M_delete_when_done(__d)
+ { _STLP_ASSERT(_p_size > 0) }
+
+ ~_Rope_RopeFunction() {
+ this->_M_free_c_string();
+ if (_M_delete_when_done) {
+ delete _M_fn;
+ }
+ }
+};
+
+/*
+ * Substring results are usually represented using just
+ * concatenation nodes. But in the case of very long flat ropes
+ * or ropes with a functional representation that isn't practical.
+ * In that case, we represent the __result as a special case of
+ * RopeFunction, whose char_producer points back to the rope itself.
+ * In all cases except repeated substring operations and
+ * deallocation, we treat the __result as a RopeFunction.
+ */
+template<class _CharT, class _Alloc>
+struct _Rope_RopeSubstring : public char_producer<_CharT>, public _Rope_RopeFunction<_CharT,_Alloc> {
+public:
+ // XXX this whole class should be rewritten.
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ _RopeRep *_M_base; // not 0
+ size_t _M_start;
+ /* virtual */ void operator()(size_t __start_pos, size_t __req_len,
+ _CharT* __buffer) {
+ typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
+ typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
+ switch (_M_base->_M_tag) {
+ case _RopeRep::_S_function:
+ case _RopeRep::_S_substringfn:
+ {
+ char_producer<_CharT>* __fn =
+ __STATIC_CAST(_RopeFunction*, _M_base)->_M_fn;
+ _STLP_ASSERT(__start_pos + __req_len <= this->_M_size._M_data)
+ _STLP_ASSERT(_M_start + this->_M_size._M_data <= _M_base->_M_size._M_data)
+ (*__fn)(__start_pos + _M_start, __req_len, __buffer);
+ }
+ break;
+ case _RopeRep::_S_leaf:
+ {
+ _CharT* __s =
+ __STATIC_CAST(_RopeLeaf*, _M_base)->_M_data;
+ _STLP_PRIV __ucopy_n(__s + __start_pos + _M_start, __req_len, __buffer);
+ }
+ break;
+ default:
+ _STLP_ASSERT(false)
+ ;
+ }
+ }
+
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef typename _RopeRep::allocator_type allocator_type;
+
+ _Rope_RopeSubstring(_RopeRep* __b, size_t __s, size_t __l, allocator_type __a)
+ : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a),
+ _M_base(__b), _M_start(__s) {
+ _STLP_ASSERT(__l > 0)
+ _STLP_ASSERT(__s + __l <= __b->_M_size._M_data)
+ _M_base->_M_ref_nonnil();
+ this->_M_tag = _RopeRep::_S_substringfn;
+ }
+ virtual ~_Rope_RopeSubstring()
+ { _M_base->_M_unref_nonnil(); }
+};
+
+/*
+ * Self-destructing pointers to Rope_rep.
+ * These are not conventional smart pointers. Their
+ * only purpose in life is to ensure that unref is called
+ * on the pointer either at normal exit or if an exception
+ * is raised. It is the caller's responsibility to
+ * adjust reference counts when these pointers are initialized
+ * or assigned to. (This convention significantly reduces
+ * the number of potentially expensive reference count
+ * updates.)
+ */
+template<class _CharT, class _Alloc>
+struct _Rope_self_destruct_ptr {
+ _Rope_RopeRep<_CharT,_Alloc>* _M_ptr;
+ ~_Rope_self_destruct_ptr()
+ { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); }
+# ifdef _STLP_USE_EXCEPTIONS
+ _Rope_self_destruct_ptr() : _M_ptr(0) {}
+# else
+ _Rope_self_destruct_ptr() {}
+# endif
+ _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {}
+ _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; }
+ _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; }
+ operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; }
+ _Rope_self_destruct_ptr<_CharT, _Alloc>&
+ operator= (_Rope_RopeRep<_CharT,_Alloc>* __x)
+ { _M_ptr = __x; return *this; }
+};
+
+/*
+ * Dereferencing a nonconst iterator has to return something
+ * that behaves almost like a reference. It's not possible to
+ * return an actual reference since assignment requires extra
+ * work. And we would get into the same problems as with the
+ * CD2 version of basic_string.
+ */
+template<class _CharT, class _Alloc>
+class _Rope_char_ref_proxy {
+ typedef _Rope_char_ref_proxy<_CharT, _Alloc> _Self;
+ friend class rope<_CharT,_Alloc>;
+ friend class _Rope_iterator<_CharT,_Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+ typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ typedef rope<_CharT,_Alloc> _My_rope;
+ size_t _M_pos;
+ _CharT _M_current;
+ bool _M_current_valid;
+ _My_rope* _M_root; // The whole rope.
+public:
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p) :
+ _M_pos(__p), _M_current_valid(false), _M_root(__r) {}
+ _Rope_char_ref_proxy(const _Self& __x) :
+ _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {}
+ // Don't preserve cache if the reference can outlive the
+ // expression. We claim that's not possible without calling
+ // a copy constructor or generating reference to a proxy
+ // reference. We declare the latter to have undefined semantics.
+ _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c)
+ : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {}
+ inline operator _CharT () const;
+ _Self& operator= (_CharT __c);
+ _Rope_char_ptr_proxy<_CharT, _Alloc> operator& () const;
+ _Self& operator= (const _Self& __c) {
+ return operator=((_CharT)__c);
+ }
+};
+
+#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
+template<class _CharT, class __Alloc>
+inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a,
+ _Rope_char_ref_proxy <_CharT, __Alloc > __b) {
+ _CharT __tmp = __a;
+ __a = __b;
+ __b = __tmp;
+}
+#else
+// There is no really acceptable way to handle this. The default
+// definition of swap doesn't work for proxy references.
+// It can't really be made to work, even with ugly hacks, since
+// the only unusual operation it uses is the copy constructor, which
+// is needed for other purposes. We provide a macro for
+// full specializations, and instantiate the most common case.
+# define _ROPE_SWAP_SPECIALIZATION(_CharT, __Alloc) \
+ inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, \
+ _Rope_char_ref_proxy <_CharT, __Alloc > __b) { \
+ _CharT __tmp = __a; \
+ __a = __b; \
+ __b = __tmp; \
+ }
+
+_ROPE_SWAP_SPECIALIZATION(char, allocator<char>)
+
+# ifndef _STLP_NO_WCHAR_T
+_ROPE_SWAP_SPECIALIZATION(wchar_t, allocator<wchar_t>)
+# endif
+
+#endif /* !_STLP_FUNCTION_TMPL_PARTIAL_ORDER */
+
+template<class _CharT, class _Alloc>
+class _Rope_char_ptr_proxy {
+ // XXX this class should be rewritten.
+public:
+ typedef _Rope_char_ptr_proxy<_CharT, _Alloc> _Self;
+ friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+ size_t _M_pos;
+ rope<_CharT,_Alloc>* _M_root; // The whole rope.
+
+ _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+ _Rope_char_ptr_proxy(const _Self& __x)
+ : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+ _Rope_char_ptr_proxy() {}
+ _Rope_char_ptr_proxy(_CharT* __x) : _M_pos(0), _M_root(0) {
+ _STLP_ASSERT(0 == __x)
+ }
+ _Self& operator= (const _Self& __x) {
+ _M_pos = __x._M_pos;
+ _M_root = __x._M_root;
+ return *this;
+ }
+
+ _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const {
+ return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos);
+ }
+};
+
+
+/*
+ * Rope iterators:
+ * Unlike in the C version, we cache only part of the stack
+ * for rope iterators, since they must be efficiently copyable.
+ * When we run out of cache, we have to reconstruct the iterator
+ * value.
+ * Pointers from iterators are not included in reference counts.
+ * Iterators are assumed to be thread private. Ropes can
+ * be shared.
+ */
+template<class _CharT, class _Alloc>
+class _Rope_iterator_base
+/* : public random_access_iterator<_CharT, ptrdiff_t> */
+{
+ friend class rope<_CharT,_Alloc>;
+ typedef _Rope_iterator_base<_CharT, _Alloc> _Self;
+ typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcat;
+public:
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+
+ enum { _S_path_cache_len = 4 }; // Must be <= 9 because of _M_path_direction.
+ enum { _S_iterator_buf_len = 15 };
+ size_t _M_current_pos;
+ // The whole rope.
+ _RopeRep* _M_root;
+ // Starting position for current leaf
+ size_t _M_leaf_pos;
+ // Buffer possibly containing current char.
+ _CharT* _M_buf_start;
+ // Pointer to current char in buffer, != 0 ==> buffer valid.
+ _CharT* _M_buf_ptr;
+ // One past __last valid char in buffer.
+ _CharT* _M_buf_end;
+
+ // What follows is the path cache. We go out of our
+ // way to make this compact.
+ // Path_end contains the bottom section of the path from
+ // the root to the current leaf.
+ struct {
+# if defined (__BORLANDC__) && (__BORLANDC__ < 0x560)
+ _RopeRep const*_M_data[4];
+# else
+ _RopeRep const*_M_data[_S_path_cache_len];
+# endif
+ } _M_path_end;
+ // Last valid __pos in path_end;
+ // _M_path_end[0] ... _M_path_end[_M_leaf_index-1]
+ // point to concatenation nodes.
+ int _M_leaf_index;
+ // (_M_path_directions >> __i) & 1 is 1
+ // if we got from _M_path_end[leaf_index - __i - 1]
+ // to _M_path_end[leaf_index - __i] by going to the
+ // __right. Assumes path_cache_len <= 9.
+ unsigned char _M_path_directions;
+ // Short buffer for surrounding chars.
+ // This is useful primarily for
+ // RopeFunctions. We put the buffer
+ // here to avoid locking in the
+ // multithreaded case.
+ // The cached path is generally assumed to be valid
+ // only if the buffer is valid.
+ struct {
+# if defined (__BORLANDC__) && (__BORLANDC__ < 0x560)
+ _CharT _M_data[15];
+# else
+ _CharT _M_data[_S_iterator_buf_len];
+# endif
+ } _M_tmp_buf;
+
+ // Set buffer contents given path cache.
+ static void _S_setbuf(_Rope_iterator_base<_CharT, _Alloc>& __x);
+ // Set buffer contents and path cache.
+ static void _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x);
+ // As above, but assumes path cache is valid for previous posn.
+ static void _S_setcache_for_incr(_Rope_iterator_base<_CharT, _Alloc>& __x);
+ _Rope_iterator_base() {}
+ _Rope_iterator_base(_RopeRep* __root, size_t __pos)
+ : _M_current_pos(__pos),_M_root(__root), _M_buf_ptr(0) {}
+ void _M_incr(size_t __n);
+ void _M_decr(size_t __n);
+public:
+ size_t index() const { return _M_current_pos; }
+private:
+ void _M_copy_buf(const _Self& __x) {
+ _M_tmp_buf = __x._M_tmp_buf;
+ if (__x._M_buf_start == __x._M_tmp_buf._M_data) {
+ _M_buf_start = _M_tmp_buf._M_data;
+ _M_buf_end = _M_buf_start + (__x._M_buf_end - __x._M_buf_start);
+ _M_buf_ptr = _M_buf_start + (__x._M_buf_ptr - __x._M_buf_start);
+ } else {
+ _M_buf_end = __x._M_buf_end;
+ }
+ }
+
+public:
+ _Rope_iterator_base(const _Self& __x) :
+ _M_current_pos(__x._M_current_pos),
+ _M_root(__x._M_root),
+ _M_leaf_pos( __x._M_leaf_pos ),
+ _M_buf_start(__x._M_buf_start),
+ _M_buf_ptr(__x._M_buf_ptr),
+ _M_path_end(__x._M_path_end),
+ _M_leaf_index(__x._M_leaf_index),
+ _M_path_directions(__x._M_path_directions)
+ {
+ if (0 != __x._M_buf_ptr) {
+ _M_copy_buf(__x);
+ }
+ }
+ _Self& operator = (const _Self& __x)
+ {
+ _M_current_pos = __x._M_current_pos;
+ _M_root = __x._M_root;
+ _M_buf_start = __x._M_buf_start;
+ _M_buf_ptr = __x._M_buf_ptr;
+ _M_path_end = __x._M_path_end;
+ _M_leaf_index = __x._M_leaf_index;
+ _M_path_directions = __x._M_path_directions;
+ _M_leaf_pos = __x._M_leaf_pos;
+ if (0 != __x._M_buf_ptr) {
+ _M_copy_buf(__x);
+ }
+ return *this;
+ }
+};
+
+template<class _CharT, class _Alloc> class _Rope_iterator;
+
+template<class _CharT, class _Alloc>
+class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+ friend class rope<_CharT,_Alloc>;
+ typedef _Rope_const_iterator<_CharT, _Alloc> _Self;
+ typedef _Rope_iterator_base<_CharT,_Alloc> _Base;
+ // protected:
+public:
+# ifndef _STLP_HAS_NO_NAMESPACES
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+ // The one from the base class may not be directly visible.
+# endif
+ _Rope_const_iterator(const _RopeRep* __root, size_t __pos):
+ _Rope_iterator_base<_CharT,_Alloc>(__CONST_CAST(_RopeRep*,__root), __pos)
+ // Only nonconst iterators modify root ref count
+ {}
+public:
+ typedef _CharT reference; // Really a value. Returning a reference
+ // Would be a mess, since it would have
+ // to be included in refcount.
+ typedef const _CharT* pointer;
+ typedef _CharT value_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag iterator_category;
+
+public:
+ _Rope_const_iterator() {}
+ _Rope_const_iterator(const _Self& __x) :
+ _Rope_iterator_base<_CharT,_Alloc>(__x) { }
+ _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x):
+ _Rope_iterator_base<_CharT,_Alloc>(__x) {}
+ _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) :
+ _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos) {}
+ _Self& operator= (const _Self& __x) {
+ _Base::operator=(__x);
+ return *this;
+ }
+ reference operator*() {
+ if (0 == this->_M_buf_ptr)
+#if !defined (__DMC__)
+ _S_setcache(*this);
+#else
+ { _Rope_iterator_base<_CharT, _Alloc>* __x = this; _S_setcache(*__x); }
+#endif
+ return *(this->_M_buf_ptr);
+ }
+ _Self& operator++()
+ {
+ if ( this->_M_buf_ptr != 0 ) {
+ _CharT *__next = this->_M_buf_ptr + 1;
+ if ( __next < this->_M_buf_end ) {
+ this->_M_buf_ptr = __next;
+ ++this->_M_current_pos;
+ return *this;
+ }
+ }
+ this->_M_incr(1);
+ return *this;
+ }
+ _Self& operator+=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_incr(__n);
+ } else {
+ this->_M_decr(-__n);
+ }
+ return *this;
+ }
+ _Self& operator--() {
+ this->_M_decr(1);
+ return *this;
+ }
+ _Self& operator-=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_decr(__n);
+ } else {
+ this->_M_incr(-__n);
+ }
+ return *this;
+ }
+ _Self operator++(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ // This makes a subsequent dereference expensive.
+ // Perhaps we should instead copy the iterator
+ // if it has a valid cache?
+ }
+ _Self operator--(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
+ }
+ inline reference operator[](size_t __n);
+};
+
+template<class _CharT, class _Alloc>
+class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+ friend class rope<_CharT,_Alloc>;
+ typedef _Rope_iterator<_CharT, _Alloc> _Self;
+ typedef _Rope_iterator_base<_CharT,_Alloc> _Base;
+ typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+
+public:
+ rope<_CharT,_Alloc>* _M_root_rope;
+ // root is treated as a cached version of this,
+ // and is used to detect changes to the underlying
+ // rope.
+ // Root is included in the reference count.
+ // This is necessary so that we can detect changes reliably.
+ // Unfortunately, it requires careful bookkeeping for the
+ // nonGC case.
+ _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos);
+
+ void _M_check();
+public:
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer;
+ typedef _CharT value_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag iterator_category;
+public:
+ ~_Rope_iterator() { //*TY 5/6/00 - added dtor to balance reference count
+ _RopeRep::_S_unref(this->_M_root);
+ }
+
+ rope<_CharT,_Alloc>& container() { return *_M_root_rope; }
+ _Rope_iterator() {
+ this->_M_root = 0; // Needed for reference counting.
+ }
+ _Rope_iterator(const _Self& __x) :
+ _Rope_iterator_base<_CharT,_Alloc>(__x) {
+ _M_root_rope = __x._M_root_rope;
+ _RopeRep::_S_ref(this->_M_root);
+ }
+ _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos);
+ _Self& operator= (const _Self& __x) {
+ _RopeRep* __old = this->_M_root;
+ _RopeRep::_S_ref(__x._M_root);
+ _Base::operator=(__x);
+ _M_root_rope = __x._M_root_rope;
+ _RopeRep::_S_unref(__old);
+ return *this;
+ }
+ reference operator*() {
+ _M_check();
+ if (0 == this->_M_buf_ptr) {
+ return reference(_M_root_rope, this->_M_current_pos);
+ } else {
+ return reference(_M_root_rope, this->_M_current_pos, *(this->_M_buf_ptr));
+ }
+ }
+ _Self& operator++() {
+ this->_M_incr(1);
+ return *this;
+ }
+ _Self& operator+=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_incr(__n);
+ } else {
+ this->_M_decr(-__n);
+ }
+ return *this;
+ }
+ _Self& operator--() {
+ this->_M_decr(1);
+ return *this;
+ }
+ _Self& operator-=(ptrdiff_t __n) {
+ if (__n >= 0) {
+ this->_M_decr(__n);
+ } else {
+ this->_M_incr(-__n);
+ }
+ return *this;
+ }
+ _Self operator++(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_incr(1);
+ return _Self(_M_root_rope, __old_pos);
+ }
+ _Self operator--(int) {
+ size_t __old_pos = this->_M_current_pos;
+ this->_M_decr(1);
+ return _Self(_M_root_rope, __old_pos);
+ }
+ reference operator[](ptrdiff_t __n) {
+ return reference(_M_root_rope, this->_M_current_pos + __n);
+ }
+};
+
+# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+template <class _CharT, class _Alloc>
+inline random_access_iterator_tag
+iterator_category(const _Rope_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag();}
+template <class _CharT, class _Alloc>
+inline _CharT* value_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; }
+template <class _CharT, class _Alloc>
+inline ptrdiff_t* distance_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; }
+template <class _CharT, class _Alloc>
+inline random_access_iterator_tag
+iterator_category(const _Rope_const_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag(); }
+template <class _CharT, class _Alloc>
+inline _CharT* value_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; }
+template <class _CharT, class _Alloc>
+inline ptrdiff_t* distance_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; }
+#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
+
+template <class _CharT, class _Alloc, class _CharConsumer>
+bool _S_apply_to_pieces(_CharConsumer& __c,
+ _Rope_RopeRep<_CharT, _Alloc> *__r,
+ size_t __begin, size_t __end);
+ // begin and end are assumed to be in range.
+
+template <class _CharT, class _Alloc>
+class rope
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<rope<_CharT, _Alloc> >
+#endif
+{
+ typedef rope<_CharT,_Alloc> _Self;
+public:
+ typedef _CharT value_type;
+ typedef ptrdiff_t difference_type;
+ typedef size_t size_type;
+ typedef _CharT const_reference;
+ typedef const _CharT* const_pointer;
+ typedef _Rope_iterator<_CharT,_Alloc> iterator;
+ typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator;
+ typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
+ typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer;
+
+ friend class _Rope_iterator<_CharT,_Alloc>;
+ friend class _Rope_const_iterator<_CharT,_Alloc>;
+ friend struct _Rope_RopeRep<_CharT,_Alloc>;
+ friend class _Rope_iterator_base<_CharT,_Alloc>;
+ friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+ friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+ friend struct _Rope_RopeSubstring<_CharT,_Alloc>;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+protected:
+ typedef _CharT* _Cstrptr;
+
+ static _CharT _S_empty_c_str[1];
+
+ enum { _S_copy_max = 23 };
+ // For strings shorter than _S_copy_max, we copy to
+ // concatenate.
+
+ typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
+ typedef typename _RopeRep::_IsBasicCharType _IsBasicCharType;
+
+public:
+ _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
+ typedef _Alloc allocator_type;
+
+public:
+ // The only data member of a rope:
+ _STLP_PRIV _STLP_alloc_proxy<_RopeRep*, _CharT, allocator_type> _M_tree_ptr;
+
+public:
+ allocator_type get_allocator() const { return allocator_type(_M_tree_ptr); }
+
+public:
+ typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
+ typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
+ typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
+ typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring;
+
+ // Retrieve a character at the indicated position.
+ static _CharT _S_fetch(_RopeRep* __r, size_type __pos);
+
+ // Obtain a pointer to the character at the indicated position.
+ // The pointer can be used to change the character.
+ // If such a pointer cannot be produced, as is frequently the
+ // case, 0 is returned instead.
+ // (Returns nonzero only if all nodes in the path have a refcount
+ // of 1.)
+ static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
+
+ static void _S_unref(_RopeRep* __t) {
+ _RopeRep::_S_unref(__t);
+ }
+ static void _S_ref(_RopeRep* __t) {
+ _RopeRep::_S_ref(__t);
+ }
+
+ typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+
+ // _Result is counted in refcount.
+ static _RopeRep* _S_substring(_RopeRep* __base,
+ size_t __start, size_t __endp1);
+
+ static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate rope and char ptr, copying __s.
+ // Should really take an arbitrary iterator.
+ // Result is counted in refcount.
+ static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
+ const _CharT* __iter, size_t __slen);
+ // As above, but one reference to __r is about to be
+ // destroyed. Thus the pieces may be recycled if all
+ // relevent reference counts are 1.
+
+ // General concatenation on _RopeRep. _Result
+ // has refcount of 1. Adjusts argument refcounts.
+ static _RopeRep* _S_concat_rep(_RopeRep* __left, _RopeRep* __right);
+
+public:
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _CharConsumer>
+#else
+ typedef _Rope_char_consumer<_CharT> _CharConsumer;
+#endif
+ void apply_to_pieces(size_t __begin, size_t __end,
+ _CharConsumer& __c) const
+ { _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __begin, __end); }
+
+protected:
+
+ static size_t _S_rounded_up_size(size_t __n)
+ { return _RopeRep::_S_rounded_up_size(__n); }
+
+ // Allocate and construct a RopeLeaf using the supplied allocator
+ // Takes ownership of s instead of copying.
+ static _RopeLeaf* _S_new_RopeLeaf(_CharT *__s,
+ size_t _p_size, allocator_type __a) {
+ _RopeLeaf* __space = _STLP_CREATE_ALLOCATOR(allocator_type, __a,
+ _RopeLeaf).allocate(1);
+ _STLP_TRY {
+ new(__space) _RopeLeaf(__s, _p_size, __a);
+ }
+ _STLP_UNWIND(_STLP_CREATE_ALLOCATOR(allocator_type,__a,
+ _RopeLeaf).deallocate(__space, 1))
+ return __space;
+ }
+
+ static _RopeConcatenation* _S_new_RopeConcatenation(_RopeRep* __left, _RopeRep* __right,
+ allocator_type __a) {
+ _RopeConcatenation* __space = _STLP_CREATE_ALLOCATOR(allocator_type, __a,
+ _RopeConcatenation).allocate(1);
+ return new(__space) _RopeConcatenation(__left, __right, __a);
+ }
+
+ static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f,
+ size_t _p_size, bool __d, allocator_type __a) {
+ _RopeFunction* __space = _STLP_CREATE_ALLOCATOR(allocator_type, __a,
+ _RopeFunction).allocate(1);
+ return new(__space) _RopeFunction(__f, _p_size, __d, __a);
+ }
+
+ static _RopeSubstring* _S_new_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+ size_t __l, allocator_type __a) {
+ _RopeSubstring* __space = _STLP_CREATE_ALLOCATOR(allocator_type, __a,
+ _RopeSubstring).allocate(1);
+ return new(__space) _RopeSubstring(__b, __s, __l, __a);
+ }
+
+ static
+ _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
+ size_t _p_size, allocator_type __a) {
+ if (0 == _p_size) return 0;
+
+ _CharT* __buf = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _CharT).allocate(_S_rounded_up_size(_p_size));
+
+ _STLP_PRIV __ucopy_n(__s, _p_size, __buf);
+ _S_construct_null(__buf + _p_size);
+
+ _STLP_TRY {
+ return _S_new_RopeLeaf(__buf, _p_size, __a);
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__buf, _p_size, __a))
+ _STLP_RET_AFTER_THROW(0)
+ }
+
+
+ // Concatenation of nonempty strings.
+ // Always builds a concatenation node.
+ // Rebalances if the result is too deep.
+ // Result has refcount 1.
+ // Does not increment left and right ref counts even though
+ // they are referenced.
+ static _RopeRep*
+ _S_tree_concat(_RopeRep* __left, _RopeRep* __right);
+
+ // Concatenation helper functions
+ static _RopeLeaf*
+ _S_leaf_concat_char_iter(_RopeLeaf* __r,
+ const _CharT* __iter, size_t __slen);
+ // Concatenate by copying leaf.
+ // should take an arbitrary iterator
+ // result has refcount 1.
+ static _RopeLeaf* _S_destr_leaf_concat_char_iter
+ (_RopeLeaf* __r, const _CharT* __iter, size_t __slen);
+ // A version that potentially clobbers __r if __r->_M_ref_count == 1.
+
+
+ // A helper function for exponentiating strings.
+ // This uses a nonstandard refcount convention.
+ // The result has refcount 0.
+ typedef _STLP_PRIV _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn;
+#if !defined (__GNUC__) || (__GNUC__ < 3)
+ friend _Concat_fn;
+#else
+ friend struct _STLP_PRIV _Rope_Concat_fn<_CharT,_Alloc>;
+#endif
+
+public:
+ static size_t _S_char_ptr_len(const _CharT* __s) {
+ return char_traits<_CharT>::length(__s);
+ }
+
+public: /* for operators */
+ rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, __t) { }
+private:
+ // Copy __r to the _CharT buffer.
+ // Returns __buffer + __r->_M_size._M_data.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);
+
+ // Again, with explicit starting position and length.
+ // Assumes that buffer is uninitialized.
+ static _CharT* _S_flatten(_RopeRep* __r,
+ size_t __start, size_t __len,
+ _CharT* __buffer);
+
+ // fbp : HP aCC prohibits access to protected min_len from within static methods ( ?? )
+public:
+ static const unsigned long _S_min_len[__ROPE_DEPTH_SIZE];
+protected:
+ static bool _S_is_balanced(_RopeRep* __r)
+ { return (__r->_M_size._M_data >= _S_min_len[__r->_M_depth]); }
+
+ static bool _S_is_almost_balanced(_RopeRep* __r) {
+ return (__r->_M_depth == 0 ||
+ __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 1]);
+ }
+
+ static bool _S_is_roughly_balanced(_RopeRep* __r) {
+ return (__r->_M_depth <= 1 ||
+ __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 2]);
+ }
+
+ // Assumes the result is not empty.
+ static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left,
+ _RopeRep* __right) {
+ _RopeRep* __result = _S_concat_rep(__left, __right);
+ if (_S_is_balanced(__result)) __result->_M_is_balanced = true;
+ return __result;
+ }
+
+ // The basic rebalancing operation. Logically copies the
+ // rope. The result has refcount of 1. The client will
+ // usually decrement the reference count of __r.
+ // The result is within height 2 of balanced by the above
+ // definition.
+ static _RopeRep* _S_balance(_RopeRep* __r);
+
+ // Add all unbalanced subtrees to the forest of balanceed trees.
+ // Used only by balance.
+ static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
+
+ // Add __r to forest, assuming __r is already balanced.
+ static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);
+
+#ifdef _STLP_DEBUG
+ // Print to stdout, exposing structure
+ static void _S_dump(_RopeRep* __r, int __indent = 0);
+#endif
+
+ // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
+ static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);
+
+ void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const;
+
+ void _M_reset(_RopeRep* __r) {
+ //if (__r != _M_tree_ptr._M_data) {
+ _S_unref(_M_tree_ptr._M_data);
+ _M_tree_ptr._M_data = __r;
+ //}
+ }
+
+public:
+ bool empty() const { return 0 == _M_tree_ptr._M_data; }
+
+ // Comparison member function. This is public only for those
+ // clients that need a ternary comparison. Others
+ // should use the comparison operators below.
+ int compare(const _Self& __y) const {
+ return _S_compare(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data);
+ }
+
+ rope(const _CharT* __s, const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, _S_RopeLeaf_from_unowned_char_ptr(__s, _S_char_ptr_len(__s),__a))
+ {}
+
+ rope(const _CharT* __s, size_t __len,
+ const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, (_S_RopeLeaf_from_unowned_char_ptr(__s, __len, __a)))
+ {}
+
+ // Should perhaps be templatized with respect to the iterator type
+ // and use Sequence_buffer. (It should perhaps use sequence_buffer
+ // even now.)
+ rope(const _CharT *__s, const _CharT *__e,
+ const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, _S_RopeLeaf_from_unowned_char_ptr(__s, __e - __s, __a))
+ {}
+
+ rope(const const_iterator& __s, const const_iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos))
+ {}
+
+ rope(const iterator& __s, const iterator& __e,
+ const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos,
+ __e._M_current_pos))
+ {}
+
+ rope(_CharT __c, const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, (_RopeRep*)0) {
+ _CharT* __buf = _M_tree_ptr.allocate(_S_rounded_up_size(1));
+
+ _Copy_Construct(__buf, __c);
+ _S_construct_null(__buf + 1);
+
+ _STLP_TRY {
+ _M_tree_ptr._M_data = _S_new_RopeLeaf(__buf, 1, __a);
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__buf, 1, __a))
+ }
+
+ rope(size_t __n, _CharT __c,
+ const allocator_type& __a = allocator_type()):
+ _M_tree_ptr(__a, (_RopeRep*)0) {
+ if (0 == __n)
+ return;
+
+ rope<_CharT,_Alloc> __result;
+# define __exponentiate_threshold size_t(32)
+ _RopeRep* __remainder;
+ rope<_CharT,_Alloc> __remainder_rope;
+
+ // gcc-2.7.2 bugs
+ typedef _STLP_PRIV _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn;
+
+ size_t __exponent = __n / __exponentiate_threshold;
+ size_t __rest = __n % __exponentiate_threshold;
+ if (0 == __rest) {
+ __remainder = 0;
+ } else {
+ _CharT* __rest_buffer = _M_tree_ptr.allocate(_S_rounded_up_size(__rest));
+ uninitialized_fill_n(__rest_buffer, __rest, __c);
+ _S_construct_null(__rest_buffer + __rest);
+ _STLP_TRY {
+ __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a);
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__rest_buffer, __rest, __a))
+ }
+ __remainder_rope._M_tree_ptr._M_data = __remainder;
+ if (__exponent != 0) {
+ _CharT* __base_buffer = _M_tree_ptr.allocate(_S_rounded_up_size(__exponentiate_threshold));
+ _RopeLeaf* __base_leaf;
+ rope<_CharT,_Alloc> __base_rope;
+ uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c);
+ _S_construct_null(__base_buffer + __exponentiate_threshold);
+ _STLP_TRY {
+ __base_leaf = _S_new_RopeLeaf(__base_buffer,
+ __exponentiate_threshold, __a);
+ }
+ _STLP_UNWIND(_RopeRep::_S_free_string(__base_buffer,
+ __exponentiate_threshold, __a))
+ __base_rope._M_tree_ptr._M_data = __base_leaf;
+ if (1 == __exponent) {
+ __result = __base_rope;
+ // One each for base_rope and __result
+ //_STLP_ASSERT(2 == __result._M_tree_ptr._M_data->_M_ref_count)
+ } else {
+ __result = _STLP_PRIV __power(__base_rope, __exponent, _Concat_fn());
+ }
+ if (0 != __remainder) {
+ __result += __remainder_rope;
+ }
+ } else {
+ __result = __remainder_rope;
+ }
+ _M_tree_ptr._M_data = __result._M_tree_ptr._M_data;
+ _M_tree_ptr._M_data->_M_ref_nonnil();
+# undef __exponentiate_threshold
+ }
+
+ rope(const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, (_RopeRep*)0) {}
+
+ // Construct a rope from a function that can compute its members
+ rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
+ const allocator_type& __a = allocator_type())
+ : _M_tree_ptr(__a, (_RopeRep*)0) {
+ _M_tree_ptr._M_data = (0 == __len) ?
+ 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
+ }
+
+ rope(const _Self& __x)
+ : _M_tree_ptr(__x._M_tree_ptr, __x._M_tree_ptr._M_data) {
+ _S_ref(_M_tree_ptr._M_data);
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ rope(__move_source<_Self> __src)
+ : _M_tree_ptr(__src.get()._M_tree_ptr, __src.get()._M_tree_ptr._M_data) {
+ __src.get()._M_tree_ptr._M_data = 0;
+ }
+#endif
+
+ ~rope() {
+ _S_unref(_M_tree_ptr._M_data);
+ }
+
+ _Self& operator=(const _Self& __x) {
+ _STLP_ASSERT(get_allocator() == __x.get_allocator())
+ _S_ref(__x._M_tree_ptr._M_data);
+ _M_reset(__x._M_tree_ptr._M_data);
+ return *this;
+ }
+
+ void clear() {
+ _S_unref(_M_tree_ptr._M_data);
+ _M_tree_ptr._M_data = 0;
+ }
+ void push_back(_CharT __x) {
+ _M_reset(_S_destr_concat_char_iter(_M_tree_ptr._M_data, &__x, 1));
+ }
+
+ void pop_back() {
+ _RopeRep* __old = _M_tree_ptr._M_data;
+ _M_tree_ptr._M_data =
+ _S_substring(_M_tree_ptr._M_data, 0, _M_tree_ptr._M_data->_M_size._M_data - 1);
+ _S_unref(__old);
+ }
+
+ _CharT back() const {
+ return _S_fetch(_M_tree_ptr._M_data, _M_tree_ptr._M_data->_M_size._M_data - 1);
+ }
+
+ void push_front(_CharT __x) {
+ _RopeRep* __old = _M_tree_ptr._M_data;
+ _RopeRep* __left =
+ _S_RopeLeaf_from_unowned_char_ptr(&__x, 1, _M_tree_ptr);
+ _STLP_TRY {
+ _M_tree_ptr._M_data = _S_concat_rep(__left, _M_tree_ptr._M_data);
+ _S_unref(__old);
+ _S_unref(__left);
+ }
+ _STLP_UNWIND(_S_unref(__left))
+ }
+
+ void pop_front() {
+ _RopeRep* __old = _M_tree_ptr._M_data;
+ _M_tree_ptr._M_data = _S_substring(_M_tree_ptr._M_data, 1, _M_tree_ptr._M_data->_M_size._M_data);
+ _S_unref(__old);
+ }
+
+ _CharT front() const {
+ return _S_fetch(_M_tree_ptr._M_data, 0);
+ }
+
+ void balance() {
+ _RopeRep* __old = _M_tree_ptr._M_data;
+ _M_tree_ptr._M_data = _S_balance(_M_tree_ptr._M_data);
+ _S_unref(__old);
+ }
+
+ void copy(_CharT* __buffer) const {
+ _STLP_STD::_Destroy_Range(__buffer, __buffer + size());
+ _S_flatten(_M_tree_ptr._M_data, __buffer);
+ }
+
+ /*
+ * This is the copy function from the standard, but
+ * with the arguments reordered to make it consistent with the
+ * rest of the interface.
+ * Note that this guaranteed not to compile if the draft standard
+ * order is assumed.
+ */
+ size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const {
+ size_t _p_size = size();
+ size_t __len = (__pos + __n > _p_size? _p_size - __pos : __n);
+
+ _STLP_STD::_Destroy_Range(__buffer, __buffer + __len);
+ _S_flatten(_M_tree_ptr._M_data, __pos, __len, __buffer);
+ return __len;
+ }
+
+# ifdef _STLP_DEBUG
+ // Print to stdout, exposing structure. May be useful for
+ // performance debugging.
+ void dump() {
+ _S_dump(_M_tree_ptr._M_data);
+ }
+# endif
+
+ // Convert to 0 terminated string in new allocated memory.
+ // Embedded 0s in the input do not terminate the copy.
+ const _CharT* c_str() const;
+
+ // As above, but also use the flattened representation as the
+ // the new rope representation.
+ const _CharT* replace_with_c_str();
+
+ // Reclaim memory for the c_str generated flattened string.
+ // Intentionally undocumented, since it's hard to say when this
+ // is safe for multiple threads.
+ void delete_c_str () {
+ if (0 == _M_tree_ptr._M_data) return;
+ if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag &&
+ ((_RopeLeaf*)_M_tree_ptr._M_data)->_M_data ==
+ _M_tree_ptr._M_data->_M_c_string) {
+ // Representation shared
+ return;
+ }
+ _M_tree_ptr._M_data->_M_free_c_string();
+ _M_tree_ptr._M_data->_M_c_string = 0;
+ }
+
+ _CharT operator[] (size_type __pos) const {
+ return _S_fetch(_M_tree_ptr._M_data, __pos);
+ }
+
+ _CharT at(size_type __pos) const {
+ if (__pos >= size()) _M_throw_out_of_range();
+ return (*this)[__pos];
+ }
+
+ const_iterator begin() const {
+ return(const_iterator(_M_tree_ptr._M_data, 0));
+ }
+
+ // An easy way to get a const iterator from a non-const container.
+ const_iterator const_begin() const {
+ return(const_iterator(_M_tree_ptr._M_data, 0));
+ }
+
+ const_iterator end() const {
+ return(const_iterator(_M_tree_ptr._M_data, size()));
+ }
+
+ const_iterator const_end() const {
+ return(const_iterator(_M_tree_ptr._M_data, size()));
+ }
+
+ size_type size() const {
+ return(0 == _M_tree_ptr._M_data? 0 : _M_tree_ptr._M_data->_M_size._M_data);
+ }
+
+ size_type length() const {
+ return size();
+ }
+
+ size_type max_size() const {
+ return _S_min_len[__ROPE_MAX_DEPTH-1] - 1;
+ // Guarantees that the result can be sufficiently
+ // balanced. Longer ropes will probably still work,
+ // but it's harder to make guarantees.
+ }
+
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ const_reverse_iterator const_rbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ const_reverse_iterator const_rend() const {
+ return const_reverse_iterator(begin());
+ }
+ // The symmetric cases are intentionally omitted, since they're presumed
+ // to be less common, and we don't handle them as well.
+
+ // The following should really be templatized.
+ // The first argument should be an input iterator or
+ // forward iterator with value_type _CharT.
+ _Self& append(const _CharT* __iter, size_t __n) {
+ _M_reset(_S_destr_concat_char_iter(_M_tree_ptr._M_data, __iter, __n));
+ return *this;
+ }
+
+ _Self& append(const _CharT* __c_string) {
+ size_t __len = _S_char_ptr_len(__c_string);
+ append(__c_string, __len);
+ return *this;
+ }
+
+ _Self& append(const _CharT* __s, const _CharT* __e) {
+ _M_reset(_S_destr_concat_char_iter(_M_tree_ptr._M_data, __s, __e - __s));
+ return *this;
+ }
+
+ _Self& append(const_iterator __s, const_iterator __e) {
+ _STLP_ASSERT(__s._M_root == __e._M_root)
+ _STLP_ASSERT(get_allocator() == __s._M_root->get_allocator())
+ _Self_destruct_ptr __appendee(_S_substring(__s._M_root, __s._M_current_pos, __e._M_current_pos));
+ _M_reset(_S_concat_rep(_M_tree_ptr._M_data, (_RopeRep*)__appendee));
+ return *this;
+ }
+
+ _Self& append(_CharT __c) {
+ _M_reset(_S_destr_concat_char_iter(_M_tree_ptr._M_data, &__c, 1));
+ return *this;
+ }
+
+ _Self& append() { return append(_CharT()); } // XXX why?
+
+ _Self& append(const _Self& __y) {
+ _STLP_ASSERT(__y.get_allocator() == get_allocator())
+ _M_reset(_S_concat_rep(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data));
+ return *this;
+ }
+
+ _Self& append(size_t __n, _CharT __c) {
+ rope<_CharT,_Alloc> __last(__n, __c);
+ return append(__last);
+ }
+
+ void swap(_Self& __b) {
+ _M_tree_ptr.swap(__b._M_tree_ptr);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+protected:
+ // Result is included in refcount.
+ static _RopeRep* replace(_RopeRep* __old, size_t __pos1,
+ size_t __pos2, _RopeRep* __r) {
+ if (0 == __old) { _S_ref(__r); return __r; }
+ _Self_destruct_ptr __left(_S_substring(__old, 0, __pos1));
+ _Self_destruct_ptr __right(_S_substring(__old, __pos2, __old->_M_size._M_data));
+ _STLP_MPWFIX_TRY //*TY 06/01/2000 -
+ _RopeRep* __result;
+
+ if (0 == __r) {
+ __result = _S_concat_rep(__left, __right);
+ } else {
+ _STLP_ASSERT(__old->get_allocator() == __r->get_allocator())
+ _Self_destruct_ptr __left_result(_S_concat_rep(__left, __r));
+ __result = _S_concat_rep(__left_result, __right);
+ }
+ return __result;
+ _STLP_MPWFIX_CATCH //*TY 06/01/2000 -
+ }
+
+public:
+ void insert(size_t __p, const _Self& __r) {
+ if (__p > size()) _M_throw_out_of_range();
+ _STLP_ASSERT(get_allocator() == __r.get_allocator())
+ _M_reset(replace(_M_tree_ptr._M_data, __p, __p, __r._M_tree_ptr._M_data));
+ }
+
+ void insert(size_t __p, size_t __n, _CharT __c) {
+ rope<_CharT,_Alloc> __r(__n,__c);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const _CharT* __i, size_t __n) {
+ if (__p > size()) _M_throw_out_of_range();
+ _Self_destruct_ptr __left(_S_substring(_M_tree_ptr._M_data, 0, __p));
+ _Self_destruct_ptr __right(_S_substring(_M_tree_ptr._M_data, __p, size()));
+ _Self_destruct_ptr __left_result(
+ _S_concat_char_iter(__left, __i, __n));
+ // _S_ destr_concat_char_iter should be safe here.
+ // But as it stands it's probably not a win, since __left
+ // is likely to have additional references.
+ _M_reset(_S_concat_rep(__left_result, __right));
+ }
+
+ void insert(size_t __p, const _CharT* __c_string) {
+ insert(__p, __c_string, _S_char_ptr_len(__c_string));
+ }
+
+ void insert(size_t __p, _CharT __c) {
+ insert(__p, &__c, 1);
+ }
+
+ void insert(size_t __p) {
+ _CharT __c = _CharT();
+ insert(__p, &__c, 1);
+ }
+
+ void insert(size_t __p, const _CharT* __i, const _CharT* __j) {
+ _Self __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const const_iterator& __i,
+ const const_iterator& __j) {
+ _Self __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ void insert(size_t __p, const iterator& __i,
+ const iterator& __j) {
+ _Self __r(__i, __j);
+ insert(__p, __r);
+ }
+
+ // (position, length) versions of replace operations:
+ void replace(size_t __p, size_t __n, const _Self& __r) {
+ if (__p > size()) _M_throw_out_of_range();
+ _M_reset(replace(_M_tree_ptr._M_data, __p, __p + __n, __r._M_tree_ptr._M_data));
+ }
+
+ void replace(size_t __p, size_t __n,
+ const _CharT* __i, size_t __i_len) {
+ _Self __r(__i, __i_len);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n, _CharT __c) {
+ _Self __r(__c);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n, const _CharT* __c_string) {
+ _Self __r(__c_string);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const _CharT* __i, const _CharT* __j) {
+ _Self __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const const_iterator& __i, const const_iterator& __j) {
+ _Self __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ void replace(size_t __p, size_t __n,
+ const iterator& __i, const iterator& __j) {
+ _Self __r(__i, __j);
+ replace(__p, __n, __r);
+ }
+
+ // Single character variants:
+ void replace(size_t __p, _CharT __c) {
+ if (__p > size()) _M_throw_out_of_range();
+ iterator __i(this, __p);
+ *__i = __c;
+ }
+
+ void replace(size_t __p, const _Self& __r) {
+ replace(__p, 1, __r);
+ }
+
+ void replace(size_t __p, const _CharT* __i, size_t __i_len) {
+ replace(__p, 1, __i, __i_len);
+ }
+
+ void replace(size_t __p, const _CharT* __c_string) {
+ replace(__p, 1, __c_string);
+ }
+
+ void replace(size_t __p, const _CharT* __i, const _CharT* __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ void replace(size_t __p, const const_iterator& __i,
+ const const_iterator& __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ void replace(size_t __p, const iterator& __i,
+ const iterator& __j) {
+ replace(__p, 1, __i, __j);
+ }
+
+ // Erase, (position, size) variant.
+ void erase(size_t __p, size_t __n) {
+ if (__p > size()) _M_throw_out_of_range();
+ _M_reset(replace(_M_tree_ptr._M_data, __p, __p + __n, 0));
+ }
+
+ // Erase, single character
+ void erase(size_t __p) {
+ erase(__p, __p + 1);
+ }
+
+ // Insert, iterator variants.
+ iterator insert(const iterator& __p, const _Self& __r)
+ { insert(__p.index(), __r); return __p; }
+ iterator insert(const iterator& __p, size_t __n, _CharT __c)
+ { insert(__p.index(), __n, __c); return __p; }
+ iterator insert(const iterator& __p, _CharT __c)
+ { insert(__p.index(), __c); return __p; }
+ iterator insert(const iterator& __p )
+ { insert(__p.index()); return __p; }
+ iterator insert(const iterator& __p, const _CharT* c_string)
+ { insert(__p.index(), c_string); return __p; }
+ iterator insert(const iterator& __p, const _CharT* __i, size_t __n)
+ { insert(__p.index(), __i, __n); return __p; }
+ iterator insert(const iterator& __p, const _CharT* __i,
+ const _CharT* __j)
+ { insert(__p.index(), __i, __j); return __p; }
+ iterator insert(const iterator& __p,
+ const const_iterator& __i, const const_iterator& __j)
+ { insert(__p.index(), __i, __j); return __p; }
+ iterator insert(const iterator& __p,
+ const iterator& __i, const iterator& __j)
+ { insert(__p.index(), __i, __j); return __p; }
+
+ // Replace, range variants.
+ void replace(const iterator& __p, const iterator& __q,
+ const _Self& __r)
+ { replace(__p.index(), __q.index() - __p.index(), __r); }
+ void replace(const iterator& __p, const iterator& __q, _CharT __c)
+ { replace(__p.index(), __q.index() - __p.index(), __c); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __c_string)
+ { replace(__p.index(), __q.index() - __p.index(), __c_string); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, size_t __n)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __n); }
+ void replace(const iterator& __p, const iterator& __q,
+ const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+ void replace(const iterator& __p, const iterator& __q,
+ const const_iterator& __i, const const_iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+ void replace(const iterator& __p, const iterator& __q,
+ const iterator& __i, const iterator& __j)
+ { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+ // Replace, iterator variants.
+ void replace(const iterator& __p, const _Self& __r)
+ { replace(__p.index(), __r); }
+ void replace(const iterator& __p, _CharT __c)
+ { replace(__p.index(), __c); }
+ void replace(const iterator& __p, const _CharT* __c_string)
+ { replace(__p.index(), __c_string); }
+ void replace(const iterator& __p, const _CharT* __i, size_t __n)
+ { replace(__p.index(), __i, __n); }
+ void replace(const iterator& __p, const _CharT* __i, const _CharT* __j)
+ { replace(__p.index(), __i, __j); }
+ void replace(const iterator& __p, const_iterator __i,
+ const_iterator __j)
+ { replace(__p.index(), __i, __j); }
+ void replace(const iterator& __p, iterator __i, iterator __j)
+ { replace(__p.index(), __i, __j); }
+
+ // Iterator and range variants of erase
+ iterator erase(const iterator& __p, const iterator& __q) {
+ size_t __p_index = __p.index();
+ erase(__p_index, __q.index() - __p_index);
+ return iterator(this, __p_index);
+ }
+ iterator erase(const iterator& __p) {
+ size_t __p_index = __p.index();
+ erase(__p_index, 1);
+ return iterator(this, __p_index);
+ }
+
+ _Self substr(size_t __start, size_t __len = 1) const {
+ if (__start > size()) _M_throw_out_of_range();
+ return rope<_CharT,_Alloc>(_S_substring(_M_tree_ptr._M_data, __start, __start + __len));
+ }
+
+ _Self substr(iterator __start, iterator __end) const {
+ return rope<_CharT,_Alloc>(_S_substring(_M_tree_ptr._M_data, __start.index(), __end.index()));
+ }
+
+ _Self substr(iterator __start) const {
+ size_t __pos = __start.index();
+ return rope<_CharT,_Alloc>(_S_substring(_M_tree_ptr._M_data, __pos, __pos + 1));
+ }
+
+ _Self substr(const_iterator __start, const_iterator __end) const {
+ // This might eventually take advantage of the cache in the
+ // iterator.
+ return rope<_CharT,_Alloc>(_S_substring(_M_tree_ptr._M_data, __start.index(), __end.index()));
+ }
+
+ rope<_CharT,_Alloc> substr(const_iterator __start) {
+ size_t __pos = __start.index();
+ return rope<_CharT,_Alloc>(_S_substring(_M_tree_ptr._M_data, __pos, __pos + 1));
+ }
+
+#include <stl/_string_npos.h>
+
+ size_type find(const _Self& __s, size_type __pos = 0) const {
+ if (__pos >= size())
+# ifndef _STLP_OLD_ROPE_SEMANTICS
+ return npos;
+# else
+ return size();
+# endif
+
+ size_type __result_pos;
+ const_iterator __result = _STLP_STD::search(const_begin() + (ptrdiff_t)__pos, const_end(), __s.begin(), __s.end() );
+ __result_pos = __result.index();
+# ifndef _STLP_OLD_ROPE_SEMANTICS
+ if (__result_pos == size()) __result_pos = npos;
+# endif
+ return __result_pos;
+ }
+ size_type find(_CharT __c, size_type __pos = 0) const;
+ size_type find(const _CharT* __s, size_type __pos = 0) const {
+ size_type __result_pos;
+ const_iterator __result = _STLP_STD::search(const_begin() + (ptrdiff_t)__pos, const_end(),
+ __s, __s + _S_char_ptr_len(__s));
+ __result_pos = __result.index();
+# ifndef _STLP_OLD_ROPE_SEMANTICS
+ if (__result_pos == size()) __result_pos = npos;
+# endif
+ return __result_pos;
+ }
+
+ iterator mutable_begin() {
+ return(iterator(this, 0));
+ }
+
+ iterator mutable_end() {
+ return(iterator(this, size()));
+ }
+
+ reverse_iterator mutable_rbegin() {
+ return reverse_iterator(mutable_end());
+ }
+
+ reverse_iterator mutable_rend() {
+ return reverse_iterator(mutable_begin());
+ }
+
+ reference mutable_reference_at(size_type __pos) {
+ return reference(this, __pos);
+ }
+
+# ifdef __STD_STUFF
+ reference operator[] (size_type __pos) {
+ return reference(this, __pos);
+ }
+
+ reference at(size_type __pos) {
+ if (__pos >= size()) _M_throw_out_of_range();
+ return (*this)[__pos];
+ }
+
+ void resize(size_type, _CharT) {}
+ void resize(size_type) {}
+ void reserve(size_type = 0) {}
+ size_type capacity() const {
+ return max_size();
+ }
+
+ // Stuff below this line is dangerous because it's error prone.
+ // I would really like to get rid of it.
+ // copy function with funny arg ordering.
+ size_type copy(_CharT* __buffer, size_type __n,
+ size_type __pos = 0) const {
+ return copy(__pos, __n, __buffer);
+ }
+
+ iterator end() { return mutable_end(); }
+
+ iterator begin() { return mutable_begin(); }
+
+ reverse_iterator rend() { return mutable_rend(); }
+
+ reverse_iterator rbegin() { return mutable_rbegin(); }
+
+# else
+
+ const_iterator end() { return const_end(); }
+
+ const_iterator begin() { return const_begin(); }
+
+ const_reverse_iterator rend() { return const_rend(); }
+
+ const_reverse_iterator rbegin() { return const_rbegin(); }
+
+# endif
+}; //class rope
+
+#if defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
+template <class _CharT, class _Alloc>
+const size_t rope<_CharT, _Alloc>::npos = ~(size_t) 0;
+#endif
+
+template <class _CharT, class _Alloc>
+inline _CharT
+_Rope_const_iterator< _CharT, _Alloc>::operator[](size_t __n)
+{ return rope<_CharT,_Alloc>::_S_fetch(this->_M_root, this->_M_current_pos + __n); }
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos == __y._M_current_pos &&
+ __x._M_root == __y._M_root);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return (__x._M_current_pos < __y._M_current_pos); }
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return !(__x == __y); }
+
+template <class _CharT, class _Alloc>
+inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return __y < __x; }
+
+template <class _CharT, class _Alloc>
+inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return !(__y < __x); }
+
+template <class _CharT, class _Alloc>
+inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return !(__x < __y); }
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _CharT, class _Alloc>
+inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x,
+ const _Rope_const_iterator<_CharT,_Alloc>& __y)
+{ return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; }
+
+#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug.
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n)
+{ return _Rope_const_iterator<_CharT,_Alloc>(__x._M_root, __x._M_current_pos - __n); }
+# endif
+
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n)
+{ return _Rope_const_iterator<_CharT,_Alloc>(__x._M_root, __x._M_current_pos + __n); }
+
+template <class _CharT, class _Alloc>
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x)
+{ return _Rope_const_iterator<_CharT,_Alloc>(__x._M_root, __x._M_current_pos + __n); }
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y) {
+ return (__x._M_current_pos == __y._M_current_pos &&
+ __x._M_root_rope == __y._M_root_rope);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return (__x._M_current_pos < __y._M_current_pos); }
+
+#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return !(__x == __y); }
+
+template <class _CharT, class _Alloc>
+inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return __y < __x; }
+
+template <class _CharT, class _Alloc>
+inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return !(__y < __x); }
+
+template <class _CharT, class _Alloc>
+inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return !(__x < __y); }
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _CharT, class _Alloc>
+inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+ const _Rope_iterator<_CharT,_Alloc>& __y)
+{ return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; }
+
+#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug.
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n) {
+ return _Rope_iterator<_CharT,_Alloc>(__x._M_root_rope, __x._M_current_pos - __n);
+}
+# endif
+
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(const _Rope_iterator<_CharT,_Alloc>& __x,
+ ptrdiff_t __n) {
+ return _Rope_iterator<_CharT,_Alloc>(__x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) {
+ return _Rope_iterator<_CharT,_Alloc>(__x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ _STLP_ASSERT(__left.get_allocator() == __right.get_allocator())
+ return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_rep(__left._M_tree_ptr._M_data, __right._M_tree_ptr._M_data));
+ // Inlining this should make it possible to keep __left and __right in registers.
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+ const _CharT* __right) {
+ size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right);
+ return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_char_iter(__left._M_tree_ptr._M_data, __right, __rlen));
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left,
+ const _CharT* __right) {
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left, _CharT __right) {
+ return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_char_iter(__left._M_tree_ptr._M_data, &__right, 1));
+}
+
+template <class _CharT, class _Alloc>
+inline rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left, _CharT __right) {
+ __left.append(__right);
+ return __left;
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator< (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ return __left.compare(__right) < 0;
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator== (const rope<_CharT,_Alloc>& __left,
+ const rope<_CharT,_Alloc>& __right) {
+ return __left.compare(__right) == 0;
+}
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _CharT, class _Alloc>
+inline bool
+operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return __y < __x;
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__y < __x);
+}
+
+template <class _CharT, class _Alloc>
+inline bool
+operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+ return !(__x < __y);
+}
+
+template <class _CharT, class _Alloc>
+inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+ return !(__x == __y);
+}
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _CharT, class _Alloc>
+inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+ const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+ return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root);
+}
+
+#if !defined (_STLP_USE_NO_IOSTREAMS)
+template<class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& operator<< (basic_ostream<_CharT, _Traits>& __o,
+ const rope<_CharT, _Alloc>& __r);
+#endif
+
+typedef rope<char, allocator<char> > crope;
+#if defined (_STLP_HAS_WCHAR_T)
+typedef rope<wchar_t, allocator<wchar_t> > wrope;
+#endif
+
+inline crope::reference __mutable_reference_at(crope& __c, size_t __i)
+{ return __c.mutable_reference_at(__i); }
+
+#if defined (_STLP_HAS_WCHAR_T)
+inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i)
+{ return __c.mutable_reference_at(__i); }
+#endif
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _CharT, class _Alloc>
+inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y)
+{ __x.swap(__y); }
+#else
+
+inline void swap(crope& __x, crope& __y) { __x.swap(__y); }
+# ifdef _STLP_HAS_WCHAR_T // dwa 8/21/97
+inline void swap(wrope& __x, wrope& __y) { __x.swap(__y); }
+# endif
+
+#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
+
+
+// Hash functions should probably be revisited later:
+_STLP_TEMPLATE_NULL struct hash<crope> {
+ size_t operator()(const crope& __str) const {
+ size_t _p_size = __str.size();
+
+ if (0 == _p_size) return 0;
+ return 13*__str[0] + 5*__str[_p_size - 1] + _p_size;
+ }
+};
+
+#if defined (_STLP_HAS_WCHAR_T) // dwa 8/21/97
+_STLP_TEMPLATE_NULL struct hash<wrope> {
+ size_t operator()(const wrope& __str) const {
+ size_t _p_size = __str.size();
+
+ if (0 == _p_size) return 0;
+ return 13*__str[0] + 5*__str[_p_size - 1] + _p_size;
+ }
+};
+#endif
+
+#if (!defined (_STLP_MSVC) || (_STLP_MSVC >= 1310))
+// I couldn't get this to work with VC++
+template<class _CharT,class _Alloc>
+# if defined (__DMC__)
+extern
+# endif
+void _Rope_rotate(_Rope_iterator<_CharT, _Alloc> __first,
+ _Rope_iterator<_CharT, _Alloc> __middle,
+ _Rope_iterator<_CharT, _Alloc> __last);
+
+inline void rotate(_Rope_iterator<char, allocator<char> > __first,
+ _Rope_iterator<char, allocator<char> > __middle,
+ _Rope_iterator<char, allocator<char> > __last)
+{ _Rope_rotate(__first, __middle, __last); }
+#endif
+
+template <class _CharT, class _Alloc>
+inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const {
+ if (_M_current_valid) {
+ return _M_current;
+ } else {
+ return _My_rope::_S_fetch(_M_root->_M_tree_ptr._M_data, _M_pos);
+ }
+}
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _CharT, class _Alloc>
+struct __move_traits<rope<_CharT, _Alloc> > {
+ typedef __true_type implemented;
+ //Completness depends on the allocator:
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_rope.c>
+#endif
+
+#endif /* _STLP_INTERNAL_ROPE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_set.h b/6/sources/cxx-stl/stlport/stlport/stl/_set.h
new file mode 100644
index 0000000..a8f6862
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_set.h
@@ -0,0 +1,412 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_SET_H
+#define _STLP_INTERNAL_SET_H
+
+#ifndef _STLP_INTERNAL_TREE_H
+# include <stl/_tree.h>
+#endif
+
+#if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(SetTraitsT, Const_traits)
+
+template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
+class set
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<set<_Key, _Compare, _Alloc> >
+#endif
+{
+ typedef set<_Key, _Compare, _Alloc> _Self;
+public:
+// typedefs:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _SetTraitsT<value_type> _SetTraits;
+
+public:
+ //Following typedef have to be public for __move_traits specialization.
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_PRIV _Identity<value_type>,
+ _SetTraits, _Alloc> _Rep_type;
+
+ typedef typename _Rep_type::pointer pointer;
+ typedef typename _Rep_type::const_pointer const_pointer;
+ typedef typename _Rep_type::reference reference;
+ typedef typename _Rep_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing set
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+
+ // allocation/deallocation
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit set(const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+#else
+ set()
+ : _M_t(_Compare(), allocator_type()) {}
+ explicit set(const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) {}
+ set(const _Compare& __comp, const allocator_type& __a)
+#endif
+ : _M_t(__comp, __a) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) { _M_t.insert_unique(__first, __last); }
+# endif
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+#else
+ set(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ set(const value_type* __first,
+ const value_type* __last, const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+
+ set(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_unique(__first, __last); }
+
+ set(const_iterator __first, const_iterator __last, const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ set(const _Self& __x) : _M_t(__x._M_t) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ set(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return _M_t.key_comp(); }
+ allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+ iterator begin() { return _M_t.begin(); }
+ iterator end() { return _M_t.end(); }
+ const_iterator begin() const { return _M_t.begin(); }
+ const_iterator end() const { return _M_t.end(); }
+ reverse_iterator rbegin() { return _M_t.rbegin(); }
+ reverse_iterator rend() { return _M_t.rend(); }
+ const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+ const_reverse_iterator rend() const { return _M_t.rend(); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ pair<iterator,bool> insert(const value_type& __x)
+ { return _M_t.insert_unique(__x); }
+ iterator insert(iterator __pos, const value_type& __x)
+ { return _M_t.insert_unique( __pos , __x); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_unique(__first, __last); }
+#else
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_unique(__first, __last); }
+ void insert(const value_type* __first, const value_type* __last)
+ { _M_t.insert_unique(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+ void erase(iterator __pos) { _M_t.erase( __pos ); }
+ size_type erase(const key_type& __x) { return _M_t.erase_unique(__x); }
+ void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last ); }
+ void clear() { _M_t.clear(); }
+
+ // set operations:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x) { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const
+ { return _M_t.find(__x) == _M_t.end() ? 0 : 1 ; }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __x)
+ { return _M_t.equal_range_unique(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const
+ { return _M_t.equal_range_unique(__x); }
+};
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(MultisetTraitsT, Const_traits)
+
+template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
+class multiset
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<multiset<_Key, _Compare, _Alloc> >
+#endif
+{
+ typedef multiset<_Key, _Compare, _Alloc> _Self;
+public:
+ // typedefs:
+
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _MultisetTraitsT<value_type> _MultisetTraits;
+
+public:
+ //Following typedef have to be public for __move_traits specialization.
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_PRIV _Identity<value_type>,
+ _MultisetTraits, _Alloc> _Rep_type;
+
+ typedef typename _Rep_type::pointer pointer;
+ typedef typename _Rep_type::const_pointer const_pointer;
+ typedef typename _Rep_type::reference reference;
+ typedef typename _Rep_type::const_reference const_reference;
+ typedef typename _Rep_type::iterator iterator;
+ typedef typename _Rep_type::const_iterator const_iterator;
+ typedef typename _Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Rep_type::size_type size_type;
+ typedef typename _Rep_type::difference_type difference_type;
+ typedef typename _Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing multiset
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit multiset(const _Compare& __comp = _Compare(),
+ const allocator_type& __a = allocator_type())
+#else
+ multiset()
+ : _M_t(_Compare(), allocator_type()) {}
+ explicit multiset(const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) {}
+ multiset(const _Compare& __comp, const allocator_type& __a)
+#endif
+ : _M_t(__comp, __a) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp)
+ : _M_t(__comp, allocator_type()) { _M_t.insert_equal(__first, __last); }
+# endif
+#else
+ multiset(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+
+ multiset(const value_type* __first, const value_type* __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+
+ multiset(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), allocator_type())
+ { _M_t.insert_equal(__first, __last); }
+
+ multiset(const_iterator __first, const_iterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ multiset(const _Self& __x) : _M_t(__x._M_t) {}
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ multiset(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ // accessors:
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return _M_t.key_comp(); }
+ allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+ iterator begin() { return _M_t.begin(); }
+ iterator end() { return _M_t.end(); }
+ const_iterator begin() const { return _M_t.begin(); }
+ const_iterator end() const { return _M_t.end(); }
+ reverse_iterator rbegin() { return _M_t.rbegin(); }
+ reverse_iterator rend() { return _M_t.rend(); }
+ const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+ const_reverse_iterator rend() const { return _M_t.rend(); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ iterator insert(const value_type& __x)
+ { return _M_t.insert_equal(__x); }
+ iterator insert(iterator __pos, const value_type& __x)
+ { return _M_t.insert_equal(__pos, __x); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last)
+ { _M_t.insert_equal(__first, __last); }
+#else
+ void insert(const value_type* __first, const value_type* __last)
+ { _M_t.insert_equal(__first, __last); }
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_equal(__first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+ void erase(iterator __pos) { _M_t.erase( __pos ); }
+ size_type erase(const key_type& __x) { return _M_t.erase(__x); }
+ void erase(iterator __first, iterator __last) { _M_t.erase( __first, __last ); }
+ void clear() { _M_t.clear(); }
+
+ // multiset operations:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x) { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const { return _M_t.find(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const { return _M_t.count(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x) { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const { return _M_t.lower_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x) { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const { return _M_t.upper_bound(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __x) { return _M_t.equal_range(__x); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const { return _M_t.equal_range(__x); }
+};
+
+#else
+# include <stl/pointers/_set.h>
+_STLP_BEGIN_NAMESPACE
+#endif /* _STLP_USE_PTR_SPECIALIZATIONS */
+
+#define _STLP_TEMPLATE_HEADER template <class _Key, class _Compare, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER set<_Key,_Compare,_Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER multiset<_Key,_Compare,_Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Key, class _Compare, class _Alloc>
+struct __move_traits<set<_Key,_Compare,_Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename set<_Key,_Compare,_Alloc>::_Rep_type>
+{};
+
+template <class _Key, class _Compare, class _Alloc>
+struct __move_traits<multiset<_Key,_Compare,_Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename multiset<_Key,_Compare,_Alloc>::_Rep_type>
+{};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_slist.c b/6/sources/cxx-stl/stlport/stlport/stl/_slist.c
new file mode 100644
index 0000000..ba158d0
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_slist.c
@@ -0,0 +1,231 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_SLIST_C
+#define _STLP_SLIST_C
+
+#ifndef _STLP_INTERNAL_SLIST_H
+# include <stl/_slist.h>
+#endif
+
+#ifndef _STLP_CARRAY_H
+# include <stl/_carray.h>
+#endif
+
+#ifndef _STLP_RANGE_ERRORS_H
+# include <stl/_range_errors.h>
+#endif
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define size_type size_t
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Alloc>
+_Slist_node_base*
+_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
+ _Slist_node_base* __last_node) {
+ _Slist_node_base* __cur = __before_first->_M_next;
+ while (__cur != __last_node) {
+ _Node* __tmp = __STATIC_CAST(_Node*, __cur);
+ __cur = __cur->_M_next;
+ _STLP_STD::_Destroy(&__tmp->_M_data);
+ _M_head.deallocate(__tmp,1);
+ }
+ __before_first->_M_next = __last_node;
+ return __last_node;
+}
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define slist _STLP_PTR_IMPL_NAME(slist)
+#elif defined (_STLP_DEBUG)
+# define slist _STLP_NON_DBG_NAME(slist)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+/* When building STLport lib Digital Mars Compiler complains on the _M_data assignment
+ * problem which would be perfertly right if we were using it. Hiding it during build
+ * fix this issue.
+ */
+template <class _Tp, class _Alloc>
+slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x) {
+ if (&__x != this) {
+ _Node_base* __p1 = &this->_M_head._M_data;
+ _Node_base* __n1 = this->_M_head._M_data._M_next;
+ const _Node_base* __n2 = __x._M_head._M_data._M_next;
+ while (__n1 && __n2) {
+ __STATIC_CAST(_Node*, __n1)->_M_data = __STATIC_CAST(const _Node*, __n2)->_M_data;
+ __p1 = __n1;
+ __n1 = __n1->_M_next;
+ __n2 = __n2->_M_next;
+ }
+ if (__n2 == 0)
+ this->_M_erase_after(__p1, 0);
+ else
+ _M_insert_after_range(__p1, const_iterator(__CONST_CAST(_Node_base*, __n2)),
+ const_iterator(0));
+ }
+ return *this;
+}
+
+template <class _Tp, class _Alloc>
+void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
+ _Node_base* __prev = &this->_M_head._M_data;
+ _Node_base* __node = this->_M_head._M_data._M_next;
+ for ( ; __node != 0 && __n > 0 ; --__n) {
+ __STATIC_CAST(_Node*, __node)->_M_data = __val;
+ __prev = __node;
+ __node = __node->_M_next;
+ }
+ if (__n > 0)
+ _M_insert_after_fill(__prev, __n, __val);
+ else
+ this->_M_erase_after(__prev, 0);
+}
+
+template <class _Tp, class _Alloc>
+void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x) {
+ _Node_base* __cur = &this->_M_head._M_data;
+ while (__cur->_M_next != 0 && __len > 0) {
+ --__len;
+ __cur = __cur->_M_next;
+ }
+ if (__cur->_M_next)
+ this->_M_erase_after(__cur, 0);
+ else
+ _M_insert_after_fill(__cur, __len, __x);
+}
+
+template <class _Tp, class _Alloc>
+void slist<_Tp,_Alloc>::remove(const _Tp& __val) {
+ _Node_base* __cur = &this->_M_head._M_data;
+ while (__cur && __cur->_M_next) {
+ if (__STATIC_CAST(_Node*, __cur->_M_next)->_M_data == __val)
+ this->_M_erase_after(__cur);
+ else
+ __cur = __cur->_M_next;
+ }
+}
+
+#if !defined (slist)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Tp, class _Alloc, class _BinaryPredicate>
+void _Slist_unique(slist<_Tp, _Alloc>& __that, _BinaryPredicate __pred) {
+ typedef _Slist_node<_Tp> _Node;
+ typename slist<_Tp, _Alloc>::iterator __ite(__that.begin());
+ if (__ite != __that.end()) {
+ while (__ite._M_node->_M_next) {
+ if (__pred(*__ite, __STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data))
+ __that.erase_after(__ite);
+ else
+ ++__ite;
+ }
+ }
+}
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
+ _StrictWeakOrdering __comp) {
+ typedef _Slist_node<_Tp> _Node;
+ typedef _STLP_PRIV _Slist_node_base _Node_base;
+ if (__that.get_allocator() == __x.get_allocator()) {
+ typename slist<_Tp, _Alloc>::iterator __ite(__that.before_begin());
+ while (__ite._M_node->_M_next && !__x.empty()) {
+ if (__comp(__x.front(), __STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data)) {
+ _STLP_VERBOSE_ASSERT(!__comp(__STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data, __x.front()),
+ _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ __that.splice_after(__ite, __x, __x.before_begin());
+ }
+ ++__ite;
+ }
+ if (!__x.empty()) {
+ __that.splice_after(__ite, __x);
+ }
+ }
+ else {
+ typename slist<_Tp, _Alloc>::iterator __i1(__that.before_begin()), __i2(__x.begin());
+ while (__i1._M_node->_M_next && __i2._M_node) {
+ if (__comp(__STATIC_CAST(_Node*, __i1._M_node->_M_next)->_M_data, *__i2)) {
+ _STLP_VERBOSE_ASSERT(!__comp(*__i2, __STATIC_CAST(_Node*, __i1._M_node->_M_next)->_M_data),
+ _StlMsg_INVALID_STRICT_WEAK_PREDICATE)
+ ++__i1;
+ }
+ else {
+ __i1 = __that.insert_after(__i1, *(__i2++));
+ }
+ }
+ __that.insert_after(__i1, __i2, __x.end());
+ __x.clear();
+ }
+}
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _Slist_sort(slist<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp) {
+ if (!__that.begin()._M_node || !__that.begin()._M_node->_M_next)
+ return;
+
+ slist<_Tp, _Alloc> __carry(__that.get_allocator());
+ const int NB = 64;
+ _STLP_PRIV _CArray<slist<_Tp, _Alloc>, NB> __counter(__carry);
+ int __fill = 0;
+ while (!__that.empty()) {
+ __carry.splice_after(__carry.before_begin(), __that, __that.before_begin());
+ int __i = 0;
+ while (__i < __fill && !__counter[__i].empty()) {
+ _STLP_PRIV _Slist_merge(__counter[__i], __carry, __comp);
+ __carry.swap(__counter[__i]);
+ ++__i;
+ }
+ __carry.swap(__counter[__i]);
+ if (__i == __fill) {
+ ++__fill;
+ if (__fill >= NB) {
+ //Looks like the slist has too many elements to be sorted with this algorithm:
+ __stl_throw_overflow_error("slist::sort");
+ }
+ }
+ }
+
+ for (int __i = 1; __i < __fill; ++__i)
+ _STLP_PRIV _Slist_merge(__counter[__i], __counter[__i - 1], __comp);
+ __that.swap(__counter[__fill-1]);
+}
+
+#if defined (slist)
+# undef slist
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# undef size_type
+#endif
+
+#endif /* _STLP_SLIST_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_slist.h b/6/sources/cxx-stl/stlport/stlport/stl/_slist.h
new file mode 100644
index 0000000..924daa4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_slist.h
@@ -0,0 +1,914 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_SLIST_H
+#define _STLP_INTERNAL_SLIST_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_SLIST_BASE_H
+# include <stl/_slist_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp>
+class _Slist_node : public _Slist_node_base {
+public:
+ _Tp _M_data;
+ __TRIVIAL_STUFF(_Slist_node)
+};
+
+struct _Slist_iterator_base {
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef forward_iterator_tag iterator_category;
+
+ _Slist_node_base *_M_node;
+
+ _Slist_iterator_base(_Slist_node_base *__x) : _M_node(__x) {}
+
+ void _M_incr() {
+ _M_node = _M_node->_M_next;
+ }
+};
+
+template <class _Tp, class _Traits>
+class _Slist_iterator : public _Slist_iterator_base {
+public:
+ typedef typename _Traits::value_type value_type;
+ typedef typename _Traits::pointer pointer;
+ typedef typename _Traits::reference reference;
+ typedef forward_iterator_tag iterator_category;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef _Slist_iterator<_Tp, _Traits> _Self;
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef _Slist_iterator<_Tp, _NonConstTraits> iterator;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef _Slist_iterator<_Tp, _ConstTraits> const_iterator;
+
+ typedef _Slist_node<value_type> _Node;
+
+ explicit _Slist_iterator(_Slist_node_base *__x) : _Slist_iterator_base(__x) {}
+ _Slist_iterator() : _Slist_iterator_base(0) {}
+ //copy constructor for iterator and constructor from iterator for const_iterator
+ _Slist_iterator(const iterator& __x) : _Slist_iterator_base(__x._M_node) {}
+
+ reference operator*() const { return __STATIC_CAST(_Node*, this->_M_node)->_M_data; }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ _M_incr();
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ _M_incr();
+ return __tmp;
+ }
+
+ bool operator==(const_iterator __y ) const {
+ return this->_M_node == __y._M_node;
+ }
+ bool operator!=(const_iterator __y ) const {
+ return this->_M_node != __y._M_node;
+ }
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits>
+struct __type_traits<_STLP_PRIV _Slist_iterator<_Tp, _Traits> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Tp, class _Traits>
+inline _Tp* _STLP_CALL value_type(const _STLP_PRIV _Slist_iterator<_Tp, _Traits>&) { return __STATIC_CAST(_Tp*, 0); }
+inline ptrdiff_t* _STLP_CALL distance_type(const _STLP_PRIV _Slist_iterator_base&) { return 0; }
+inline forward_iterator_tag _STLP_CALL iterator_category(const _STLP_PRIV _Slist_iterator_base&) { return forward_iterator_tag(); }
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* OLD_QUERIES */
+
+// Base class that encapsulates details of allocators and simplifies EH
+template <class _Tp, class _Alloc>
+class _Slist_base {
+protected:
+ typedef _Slist_node<_Tp> _Node;
+ typedef typename _Alloc_traits<_Node,_Alloc>::allocator_type _M_node_allocator_type;
+ typedef _Slist_base<_Tp, _Alloc> _Self;
+
+public:
+ typedef _STLP_alloc_proxy<_Slist_node_base, _Node, _M_node_allocator_type> _AllocProxy;
+
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef _Alloc allocator_type;
+
+ _Slist_base(const allocator_type& __a) :
+ _M_head(_STLP_CONVERT_ALLOCATOR(__a, _Node), _Slist_node_base() )
+ { _M_head._M_data._M_next = 0; }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Slist_base(__move_source<_Self> src) :
+ _M_head(__move_source<_AllocProxy>(src.get()._M_head))
+ { src.get()._M_head._M_data._M_next = 0; }
+#endif
+
+ ~_Slist_base() { _M_erase_after(&_M_head._M_data, 0); }
+
+protected:
+ _Slist_node_base* _M_erase_after(_Slist_node_base* __pos) {
+ _Node* __next = __STATIC_CAST(_Node*, __pos->_M_next);
+ _Slist_node_base* __next_next = __next->_M_next;
+ __pos->_M_next = __next_next;
+ _STLP_STD::_Destroy(&__next->_M_data);
+ _M_head.deallocate(__next,1);
+ return __next_next;
+ }
+ _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
+
+public:
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR((const _M_node_allocator_type&)_M_head, _Tp); }
+ _AllocProxy _M_head;
+};
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define slist _STLP_PTR_IMPL_NAME(slist)
+#elif defined (_STLP_DEBUG)
+# define slist _STLP_NON_DBG_NAME(slist)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class slist;
+
+#if !defined (slist)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+// helper functions to reduce code duplication
+template <class _Tp, class _Alloc, class _BinaryPredicate>
+void _Slist_unique(slist<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred);
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
+ _StrictWeakOrdering __comp);
+
+template <class _Tp, class _Alloc, class _StrictWeakOrdering>
+void _Slist_sort(slist<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp);
+
+#if !defined (slist)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, class _Alloc>
+class slist : protected _STLP_PRIV _Slist_base<_Tp,_Alloc>
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (slist)
+ , public __stlport_class<slist<_Tp, _Alloc> >
+#endif
+{
+private:
+ typedef _STLP_PRIV _Slist_base<_Tp,_Alloc> _Base;
+ typedef slist<_Tp,_Alloc> _Self;
+public:
+ typedef _Tp value_type;
+
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef forward_iterator_tag _Iterator_category;
+
+ typedef _STLP_PRIV _Slist_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
+ typedef _STLP_PRIV _Slist_iterator<_Tp, _Const_traits<_Tp> > const_iterator;
+
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef typename _Base::allocator_type allocator_type;
+
+private:
+ typedef _STLP_PRIV _Slist_node<_Tp> _Node;
+ typedef _STLP_PRIV _Slist_node_base _Node_base;
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ _Node* _M_create_node(const value_type& __x = _Tp()) {
+#else
+ _Node* _M_create_node(const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _Node* __node = this->_M_head.allocate(1);
+ _STLP_TRY {
+ _Copy_Construct(&__node->_M_data, __x);
+ __node->_M_next = 0;
+ }
+ _STLP_UNWIND(this->_M_head.deallocate(__node, 1))
+ return __node;
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ _Node* _M_create_node() {
+ _Node* __node = this->_M_head.allocate(1);
+ _STLP_TRY {
+ _STLP_STD::_Construct(&__node->_M_data);
+ __node->_M_next = 0;
+ }
+ _STLP_UNWIND(this->_M_head.deallocate(__node, 1))
+ return __node;
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+public:
+
+ allocator_type get_allocator() const { return _Base::get_allocator(); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(const allocator_type& __a = allocator_type())
+#else
+ slist()
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(allocator_type()) {}
+ slist(const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__a) {}
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(size_type __n, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp),
+ const allocator_type& __a = allocator_type())
+#else
+ explicit slist(size_type __n)
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(allocator_type())
+ { _M_insert_after_fill(&this->_M_head._M_data, __n, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+ slist(size_type __n, const value_type& __x)
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(allocator_type())
+ { _M_insert_after_fill(&this->_M_head._M_data, __n, __x); }
+ slist(size_type __n, const value_type& __x, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__a)
+ { _M_insert_after_fill(&this->_M_head._M_data, __n, __x); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because _M_insert_after_range
+ // already does them.
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__a)
+ { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ // VC++ needs this crazyness
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last)
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(allocator_type())
+ { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
+# endif
+#else /* _STLP_MEMBER_TEMPLATES */
+ slist(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type() )
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__a)
+ { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
+ slist(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__a)
+ { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ slist(const _Self& __x)
+ : _STLP_PRIV _Slist_base<_Tp,_Alloc>(__x.get_allocator())
+ { _M_insert_after_range(&this->_M_head._M_data, __x.begin(), __x.end()); }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ slist(__move_source<_Self> src)
+ : _STLP_PRIV _Slist_base<_Tp, _Alloc>(__move_source<_Base>(src.get())) {}
+#endif
+
+ _Self& operator= (const _Self& __x);
+
+ ~slist() {}
+
+public:
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
+
+private:
+ void _M_fill_assign(size_type __n, const _Tp& __val);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+public:
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+private:
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type& /*_IsIntegral*/) {
+ _M_fill_assign((size_type) __n, (_Tp) __val);
+ }
+
+ template <class _InputIter>
+ void _M_assign_dispatch(_InputIter __first, _InputIter __last,
+ const __false_type& /*_IsIntegral*/) {
+#else
+public:
+ void assign(const_pointer __first, const_pointer __last) {
+ _Node_base* __prev = &this->_M_head._M_data;
+ _Node_base* __node = this->_M_head._M_data._M_next;
+ while (__node != 0 && __first != __last) {
+ __STATIC_CAST(_Node*, __node)->_M_data = *__first;
+ __prev = __node;
+ __node = __node->_M_next;
+ ++__first;
+ }
+ if (__first != __last)
+ _M_insert_after_range(__prev, __first, __last);
+ else
+ this->_M_erase_after(__prev, 0);
+ }
+ void assign(const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ _Node_base* __prev = &this->_M_head._M_data;
+ _Node_base* __node = this->_M_head._M_data._M_next;
+ while (__node != 0 && __first != __last) {
+ __STATIC_CAST(_Node*, __node)->_M_data = *__first;
+ __prev = __node;
+ __node = __node->_M_next;
+ ++__first;
+ }
+ if (__first != __last)
+ _M_insert_after_range(__prev, __first, __last);
+ else
+ this->_M_erase_after(__prev, 0);
+ }
+
+public:
+
+ // Experimental new feature: before_begin() returns a
+ // non-dereferenceable iterator that, when incremented, yields
+ // begin(). This iterator may be used as the argument to
+ // insert_after, erase_after, etc. Note that even for an empty
+ // slist, before_begin() is not the same iterator as end(). It
+ // is always necessary to increment before_begin() at least once to
+ // obtain end().
+ iterator before_begin() { return iterator(&this->_M_head._M_data); }
+ const_iterator before_begin() const
+ { return const_iterator(__CONST_CAST(_Node_base*, &this->_M_head._M_data)); }
+
+ iterator begin() { return iterator(this->_M_head._M_data._M_next); }
+ const_iterator begin() const
+ { return const_iterator(this->_M_head._M_data._M_next);}
+
+ iterator end() { return iterator(); }
+ const_iterator end() const { return const_iterator(); }
+
+ size_type size() const
+ { return _STLP_PRIV _Sl_global_inst::size(this->_M_head._M_data._M_next); }
+
+ size_type max_size() const { return size_type(-1); }
+
+ bool empty() const { return this->_M_head._M_data._M_next == 0; }
+
+ void swap(_Self& __x)
+ { this->_M_head.swap(__x._M_head); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public:
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front(const value_type& __x = _Tp()) {
+#else
+ void push_front(const value_type& __x) {
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ _STLP_PRIV __slist_make_link(&this->_M_head._M_data, _M_create_node(__x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front() { _STLP_PRIV __slist_make_link(&this->_M_head._M_data, _M_create_node());}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void pop_front() {
+ _Node* __node = __STATIC_CAST(_Node*, this->_M_head._M_data._M_next);
+ this->_M_head._M_data._M_next = __node->_M_next;
+ _STLP_STD::_Destroy(&__node->_M_data);
+ this->_M_head.deallocate(__node, 1);
+ }
+
+ iterator previous(const_iterator __pos) {
+ return iterator(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node));
+ }
+ const_iterator previous(const_iterator __pos) const {
+ return const_iterator(__CONST_CAST(_Node_base*,
+ _STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data,
+ __pos._M_node)));
+ }
+
+private:
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ _Node* _M_insert_after(_Node_base* __pos, const value_type& __x = _Tp()) {
+#else
+ _Node* _M_insert_after(_Node_base* __pos, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ return __STATIC_CAST(_Node*, _STLP_PRIV __slist_make_link(__pos, _M_create_node(__x)));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ _Node* _M_insert_after(_Node_base* __pos) {
+ return __STATIC_CAST(_Node*, _STLP_PRIV __slist_make_link(__pos, _M_create_node()));
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void _M_insert_after_fill(_Node_base* __pos,
+ size_type __n, const value_type& __x) {
+ for (size_type __i = 0; __i < __n; ++__i)
+ __pos = _STLP_PRIV __slist_make_link(__pos, _M_create_node(__x));
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InIter>
+ void _M_insert_after_range(_Node_base* __pos,
+ _InIter __first, _InIter __last) {
+ typedef typename _IsIntegral<_InIter>::_Ret _Integral;
+ _M_insert_after_range(__pos, __first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
+ const __true_type&) {
+ _M_insert_after_fill(__pos, __n, __x);
+ }
+
+ template <class _InIter>
+ void _M_insert_after_range(_Node_base* __pos,
+ _InIter __first, _InIter __last,
+ const __false_type&) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void _M_insert_after_range(_Node_base* __pos,
+ const value_type* __first,
+ const value_type* __last) {
+ while (__first != __last) {
+ __pos = _STLP_PRIV __slist_make_link(__pos, _M_create_node(*__first));
+ ++__first;
+ }
+ }
+ void _M_insert_after_range(_Node_base* __pos,
+ const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ while (__first != __last) {
+ __pos = _STLP_PRIV __slist_make_link(__pos, _M_create_node(*__first));
+ ++__first;
+ }
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InIter>
+ void _M_splice_after_range(_Node_base* __pos,
+ _InIter __first, _InIter __last) {
+ typedef typename _IsIntegral<_InIter>::_Ret _Integral;
+ _M_splice_after_range(__pos, __first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_splice_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
+ const __true_type&) {
+ _M_insert_after_fill(__pos, __n, __x);
+ }
+
+ template <class _InIter>
+ void _M_splice_after_range(_Node_base* __pos,
+ _InIter __first, _InIter __last,
+ const __false_type&) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void _M_splice_after_range(_Node_base* __pos,
+ const value_type* __first,
+ const value_type* __last) {
+ while (__first != __last) {
+ __pos = _STLP_PRIV __slist_make_link(__pos, _M_create_node(*__first));
+ ++__first;
+ }
+ }
+ void _M_splice_after_range(_Node_base* __pos,
+ const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ //We use a temporary slist to avoid the auto reference troubles (infinite loop)
+ _Self __tmp(__first, __last, this->get_allocator());
+ splice_after(iterator(__pos), __tmp);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InIter>
+ void _M_splice_range(_Node_base* __pos,
+ _InIter __first, _InIter __last) {
+ typedef typename _IsIntegral<_InIter>::_Ret _Integral;
+ _M_splice_range(__pos, __first, __last, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_splice_range(_Node_base* __pos, _Integer __n, _Integer __x,
+ const __true_type&) {
+ _M_insert_after_fill(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos),
+ __n, __x);
+ }
+
+ template <class _InIter>
+ void _M_splice_range(_Node_base* __pos,
+ _InIter __first, _InIter __last,
+ const __false_type&) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void _M_splice_range(_Node_base* __pos,
+ const value_type* __first,
+ const value_type* __last) {
+ while (__first != __last) {
+ __pos = _STLP_PRIV __slist_make_link(__pos, _M_create_node(*__first));
+ ++__first;
+ }
+ }
+ void _M_splice_range(_Node_base* __pos,
+ const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ //We use a temporary slist to avoid the auto reference troubles (infinite loop)
+ _Self __tmp(__first, __last, this->get_allocator());
+ splice(iterator(__pos), __tmp);
+ }
+
+public:
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos, const value_type& __x = _Tp()) {
+#else
+ iterator insert_after(iterator __pos, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ return iterator(_M_insert_after(__pos._M_node, __x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos) {
+ return insert_after(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp));
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert_after(iterator __pos, size_type __n, const value_type& __x) {
+ _M_insert_after_fill(__pos._M_node, __n, __x);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because _M_insert_after_range
+ // already does them.
+ template <class _InIter>
+ void insert_after(iterator __pos, _InIter __first, _InIter __last) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert_after(iterator __pos,
+ const value_type* __first, const value_type* __last) {
+ _M_insert_after_range(__pos._M_node, __first, __last);
+ }
+ void insert_after(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ _M_splice_after_range(__pos._M_node, __first, __last);
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos, const value_type& __x = _Tp()) {
+#else
+ iterator insert(iterator __pos, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ return iterator(_M_insert_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ __x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos) {
+ return iterator(_M_insert_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ _STLP_DEFAULT_CONSTRUCTED(_Tp)));
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert(iterator __pos, size_type __n, const value_type& __x) {
+ _M_insert_after_fill(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node), __n, __x);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because _M_insert_after_range
+ // already does them.
+ template <class _InIter>
+ void insert(iterator __pos, _InIter __first, _InIter __last) {
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __pos, const value_type* __first,
+ const value_type* __last) {
+ _M_insert_after_range(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ __first, __last);
+ }
+ void insert(iterator __pos, const_iterator __first, const_iterator __last) {
+#endif /* _STLP_MEMBER_TEMPLATES */
+ _M_splice_range(__pos._M_node, __first, __last);
+ }
+
+public:
+ iterator erase_after(iterator __pos)
+ { return iterator(this->_M_erase_after(__pos._M_node)); }
+ iterator erase_after(iterator __before_first, iterator __last)
+ { return iterator(this->_M_erase_after(__before_first._M_node, __last._M_node)); }
+
+ iterator erase(iterator __pos)
+ { return iterator(this->_M_erase_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node))); }
+ iterator erase(iterator __first, iterator __last)
+ { return iterator(this->_M_erase_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __first._M_node), __last._M_node)); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type new_size, const value_type& __x = _Tp());
+#else
+ void resize(size_type new_size, const value_type& __x);
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type new_size) { resize(new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void clear()
+ { this->_M_erase_after(&this->_M_head._M_data, 0); }
+
+public:
+ // Moves the range [__before_first + 1, __before_last + 1) to *this,
+ // inserting it immediately after __pos. This is constant time.
+ void splice_after(iterator __pos, _Self& __x,
+ iterator __before_first, iterator __before_last) {
+ if (__before_first != __before_last) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _Sl_global_inst::__splice_after(__pos._M_node,
+ __before_first._M_node, __before_last._M_node);
+ }
+ else {
+ this->insert_after(__pos, iterator(__before_first._M_node->_M_next), iterator(__before_last._M_node->_M_next));
+ __x.erase_after(__before_first, ++__before_last);
+ }
+ }
+ }
+
+ // Moves the element that follows __prev to *this, inserting it immediately
+ // after __pos. This is constant time.
+ void splice_after(iterator __pos, _Self& __x, iterator __prev) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _Sl_global_inst::__splice_after(__pos._M_node,
+ __prev._M_node, __prev._M_node->_M_next);
+ }
+ else {
+ this->insert_after(__pos, __STATIC_CAST(_Node*, __prev._M_node->_M_next)->_M_data);
+ __x.erase_after(__prev);
+ }
+ }
+
+ // Removes all of the elements from the list __x to *this, inserting
+ // them immediately after __pos. __x must not be *this. Complexity:
+ // linear in __x.size().
+ void splice_after(iterator __pos, _Self& __x) {
+ if (this->get_allocator() == __x.get_allocator())
+ _STLP_PRIV _Sl_global_inst::__splice_after(__pos._M_node, &__x._M_head._M_data);
+ else {
+ this->insert_after(__pos, __x.begin(), __x.end());
+ __x.clear();
+ }
+ }
+
+ // Linear in distance(begin(), __pos), and linear in __x.size().
+ void splice(iterator __pos, _Self& __x) {
+ if (__x._M_head._M_data._M_next) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _Sl_global_inst::__splice_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ &__x._M_head._M_data,
+ _STLP_PRIV _Sl_global_inst::__previous(&__x._M_head._M_data, 0));
+ }
+ else {
+ insert(__pos, __x.begin(), __x.end());
+ __x.clear();
+ }
+ }
+ }
+
+ // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i).
+ void splice(iterator __pos, _Self& __x, iterator __i) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _Sl_global_inst::__splice_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ _STLP_PRIV _Sl_global_inst::__previous(&__x._M_head._M_data, __i._M_node),
+ __i._M_node);
+ }
+ else {
+ insert(__pos, *__i);
+ __x.erase(__i);
+ }
+ }
+
+ // Linear in distance(begin(), __pos), in distance(__x.begin(), __first),
+ // and in distance(__first, __last).
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last) {
+ if (__first != __last) {
+ if (this->get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV _Sl_global_inst::__splice_after(_STLP_PRIV _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
+ _STLP_PRIV _Sl_global_inst::__previous(&__x._M_head._M_data, __first._M_node),
+ _STLP_PRIV _Sl_global_inst::__previous(__first._M_node, __last._M_node));
+ }
+ else {
+ insert(__pos, __first, __last);
+ __x.erase(__first, __last);
+ }
+ }
+ }
+
+public:
+ void reverse() {
+ if (this->_M_head._M_data._M_next)
+ this->_M_head._M_data._M_next = _STLP_PRIV _Sl_global_inst::__reverse(this->_M_head._M_data._M_next);
+ }
+
+ void remove(const _Tp& __val);
+
+ void unique() { _STLP_PRIV _Slist_unique(*this, equal_to<value_type>()); }
+ void merge(_Self& __x) { _STLP_PRIV _Slist_merge(*this, __x, less<value_type>()); }
+ void sort() { _STLP_PRIV _Slist_sort(*this, less<value_type>()); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Predicate>
+ void remove_if(_Predicate __pred) {
+ _Node_base* __cur = &this->_M_head._M_data;
+ while (__cur->_M_next) {
+ if (__pred(__STATIC_CAST(_Node*, __cur->_M_next)->_M_data))
+ this->_M_erase_after(__cur);
+ else
+ __cur = __cur->_M_next;
+ }
+ }
+
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __pred)
+ { _STLP_PRIV _Slist_unique(*this, __pred); }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self& __x, _StrictWeakOrdering __comp)
+ { _STLP_PRIV _Slist_merge(*this, __x, __comp); }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp)
+ { _STLP_PRIV _Slist_sort(*this, __comp); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+};
+
+#if defined (slist)
+# undef slist
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_slist.c>
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# include <stl/pointers/_slist.h>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_slist.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp, class _Alloc>
+inline bool _STLP_CALL
+operator == (const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
+ typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
+ const_iterator __end1 = _SL1.end();
+ const_iterator __end2 = _SL2.end();
+
+ const_iterator __i1 = _SL1.begin();
+ const_iterator __i2 = _SL2.begin();
+ while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
+ ++__i1;
+ ++__i2;
+ }
+ return __i1 == __end1 && __i2 == __end2;
+}
+
+#define _STLP_EQUAL_OPERATOR_SPECIALIZED
+#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER slist<_Tp, _Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+#undef _STLP_EQUAL_OPERATOR_SPECIALIZED
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Alloc>
+struct __move_traits<slist<_Tp, _Alloc> > {
+ typedef __true_type implemented;
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+# endif
+
+// Specialization of insert_iterator so that insertions will be constant
+// time rather than linear time.
+template <class _Tp, class _Alloc>
+class insert_iterator<slist<_Tp, _Alloc> > {
+protected:
+ typedef slist<_Tp, _Alloc> _Container;
+ _Container* _M_container;
+ typename _Container::iterator _M_iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x, typename _Container::iterator __i)
+ : _M_container(&__x) {
+ if (__i == __x.begin())
+ _M_iter = __x.before_begin();
+ else
+ _M_iter = __x.previous(__i);
+ }
+
+ insert_iterator<_Container>&
+ operator = (const typename _Container::value_type& __val) {
+ _M_iter = _M_container->insert_after(_M_iter, __val);
+ return *this;
+ }
+
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_SLIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.c b/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.c
new file mode 100644
index 0000000..e0e68c9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.c
@@ -0,0 +1,104 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_SLIST_BASE_C
+#define _STLP_SLIST_BASE_C
+
+#ifndef _STLP_INTERNAL_SLIST_BASE_H
+# include <stl/_slist_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Dummy>
+_Slist_node_base* _STLP_CALL
+_Sl_global<_Dummy>::__previous(_Slist_node_base* __head,
+ const _Slist_node_base* __node) {
+ while (__head && __head->_M_next != __node)
+ __head = __head->_M_next;
+ return __head;
+}
+
+template <class _Dummy>
+void _STLP_CALL
+_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, _Slist_node_base* __head) {
+ _Slist_node_base* __before_last = __previous(__head, 0);
+ if (__before_last != __head) {
+ _Slist_node_base* __after = __pos->_M_next;
+ __pos->_M_next = __head->_M_next;
+ __head->_M_next = 0;
+ __before_last->_M_next = __after;
+ }
+}
+
+template <class _Dummy>
+void _STLP_CALL
+_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos,
+ _Slist_node_base* __before_first,
+ _Slist_node_base* __before_last) {
+ if (__pos != __before_first && __pos != __before_last) {
+ _Slist_node_base* __first = __before_first->_M_next;
+ _Slist_node_base* __after = __pos->_M_next;
+ __before_first->_M_next = __before_last->_M_next;
+ __pos->_M_next = __first;
+ __before_last->_M_next = __after;
+ }
+}
+
+template <class _Dummy>
+_Slist_node_base* _STLP_CALL
+_Sl_global<_Dummy>::__reverse(_Slist_node_base* __node) {
+ _Slist_node_base* __result = __node;
+ __node = __node->_M_next;
+ __result->_M_next = 0;
+ while(__node) {
+ _Slist_node_base* __next = __node->_M_next;
+ __node->_M_next = __result;
+ __result = __node;
+ __node = __next;
+ }
+ return __result;
+}
+
+template <class _Dummy>
+size_t _STLP_CALL
+_Sl_global<_Dummy>::size(_Slist_node_base* __node) {
+ size_t __result = 0;
+ for ( ; __node != 0; __node = __node->_M_next)
+ ++__result;
+ return __result;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_SLIST_BASE_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.h
new file mode 100644
index 0000000..3afa18a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_slist_base.h
@@ -0,0 +1,90 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_SLIST_BASE_H
+#define _STLP_INTERNAL_SLIST_BASE_H
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+struct _Slist_node_base {
+ _Slist_node_base* _M_next;
+};
+
+inline _Slist_node_base*
+__slist_make_link(_Slist_node_base* __prev_node,
+ _Slist_node_base* __new_node) {
+ __new_node->_M_next = __prev_node->_M_next;
+ __prev_node->_M_next = __new_node;
+ return __new_node;
+}
+
+
+template <class _Dummy>
+class _Sl_global {
+public:
+ // those used to be global functions
+ // moved here to reduce code bloat without templatizing _Slist_iterator_base
+ static size_t _STLP_CALL size(_Slist_node_base* __node);
+ static _Slist_node_base* _STLP_CALL __reverse(_Slist_node_base* __node);
+ static void _STLP_CALL __splice_after(_Slist_node_base* __pos,
+ _Slist_node_base* __before_first,
+ _Slist_node_base* __before_last);
+
+ static void _STLP_CALL __splice_after(_Slist_node_base* __pos, _Slist_node_base* __head);
+
+ static _Slist_node_base* _STLP_CALL __previous(_Slist_node_base* __head,
+ const _Slist_node_base* __node);
+ static const _Slist_node_base* _STLP_CALL __previous(const _Slist_node_base* __head,
+ const _Slist_node_base* __node) {
+ return _Sl_global<_Dummy>::__previous(__CONST_CAST(_Slist_node_base*, __head), __node);
+ }
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _Sl_global<bool>;
+#endif
+
+typedef _Sl_global<bool> _Sl_global_inst;
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION) && defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+# include <stl/_slist_base.c>
+#endif
+
+#endif /* _STLP_INTERNAL_SLIST_BASE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_sparc_atomic.h b/6/sources/cxx-stl/stlport/stlport/stl/_sparc_atomic.h
new file mode 100644
index 0000000..21cc0ad
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_sparc_atomic.h
@@ -0,0 +1,61 @@
+
+// Currently, SUN CC requires object file
+
+#if defined (__GNUC__)
+
+/*
+** int _STLP_atomic_exchange (__stl_atomic_t *pvalue, __stl_atomic_t value)
+*/
+
+# if defined(__sparc_v9__) || defined (__sparcv9)
+
+# ifdef __arch64__
+
+# define _STLP_EXCH_ASM asm volatile ("casx [%3], %4, %0 ; membar #LoadLoad | #LoadStore " : \
+ "=r" (_L_value2), "=m" (*_L_pvalue1) : \
+ "m" (*_L_pvalue1), "r" (_L_pvalue1), "r" (_L_value1), "0" (_L_value2) )
+
+# else /* __arch64__ */
+
+# define _STLP_EXCH_ASM asm volatile ("cas [%3], %4, %0" : \
+ "=r" (_L_value2), "=m" (*_L_pvalue1) : \
+ "m" (*_L_pvalue1), "r" (_L_pvalue1), "r" (_L_value1), "0" (_L_value2) )
+# endif
+
+# else /* __sparc_v9__ */
+
+# define _STLP_EXCH_ASM asm volatile ("swap [%3], %0 " : \
+ "=r" (_L_value2), "=m" (*_L_pvalue1) : \
+ "m" (*_L_pvalue1), "r" (_L_pvalue1), "0" (_L_value2) )
+# endif
+
+
+# define _STLP_ATOMIC_EXCHANGE(__pvalue1, __value2) \
+ ({ register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
+ register __stl_atomic_t _L_value1, _L_value2 = __value2 ; \
+ do { _L_value1 = *_L_pvalue1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; \
+ _L_value1; })
+
+# define _STLP_ATOMIC_INCREMENT(__pvalue1) \
+ ({ register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
+ register __stl_atomic_t _L_value1, _L_value2; \
+ do { _L_value1 = *_L_pvalue1; _L_value2 = _L_value1+1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; \
+ (_L_value2 + 1); })
+
+# define _STLP_ATOMIC_DECREMENT(__pvalue1) \
+ ({ register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
+ register __stl_atomic_t _L_value1, _L_value2; \
+ do { _L_value1 = *_L_pvalue1; _L_value2 = _L_value1-1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; \
+ (_L_value2 - 1); })
+
+# elif ! defined (_STLP_NO_EXTERN_INLINE)
+
+extern "C" __stl_atomic_t _STLP_atomic_exchange(__stl_atomic_t * __x, __stl_atomic_t __v);
+extern "C" void _STLP_atomic_decrement(__stl_atomic_t* i);
+extern "C" void _STLP_atomic_increment(__stl_atomic_t* i);
+
+# define _STLP_ATOMIC_INCREMENT(__x) _STLP_atomic_increment((__stl_atomic_t*)__x)
+# define _STLP_ATOMIC_DECREMENT(__x) _STLP_atomic_decrement((__stl_atomic_t*)__x)
+# define _STLP_ATOMIC_EXCHANGE(__x, __y) _STLP_atomic_exchange((__stl_atomic_t*)__x, (__stl_atomic_t)__y)
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_sstream.c b/6/sources/cxx-stl/stlport/stlport/stl/_sstream.c
new file mode 100644
index 0000000..9f58535
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_sstream.c
@@ -0,0 +1,465 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_SSTREAM_C
+#define _STLP_SSTREAM_C
+
+#ifndef _STLP_INTERNAL_SSTREAM
+# include <stl/_sstream.h>
+#endif
+
+#if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
+// no wint_t is supported for this mode
+# define __BSB_int_type__ int
+# define __BSB_pos_type__ streampos
+#else
+# define __BSB_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
+# define __BSB_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Non-inline stringbuf member functions.
+
+// Constructors. Note that the base class constructor sets all of the
+// get and area pointers to null.
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringbuf<_CharT, _Traits, _Alloc>
+ ::basic_stringbuf(ios_base::openmode __mode)
+ : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str()
+{}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringbuf<_CharT, _Traits, _Alloc>
+ ::basic_stringbuf(const basic_string<_CharT, _Traits, _Alloc>& __s, ios_base::openmode __mode)
+ : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str(__s)
+{
+ _M_set_ptrs();
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringbuf<_CharT, _Traits, _Alloc>::~basic_stringbuf()
+{}
+
+// Set the underlying string to a new value.
+template <class _CharT, class _Traits, class _Alloc>
+void
+basic_stringbuf<_CharT, _Traits, _Alloc>::str(const basic_string<_CharT, _Traits, _Alloc>& __s)
+{
+ _M_str = __s;
+ _M_set_ptrs();
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+void
+basic_stringbuf<_CharT, _Traits, _Alloc>::_M_set_ptrs()
+{
+ _CharT* __data_ptr = _S_start(_M_str);
+ _CharT* __data_end = _S_finish(_M_str);
+ // The initial read position is the beginning of the string.
+ if (_M_mode & ios_base::in) {
+ this->setg(__data_ptr, (_M_mode & ios_base::ate) ? __data_end : __data_ptr, __data_end);
+ }
+
+ // The initial write position is the beginning of the string.
+ if (_M_mode & ios_base::out) {
+ if ( _M_mode & (ios_base::app | ios_base::ate) ) {
+ this->setp( __data_end, __data_end );
+ } else {
+ this->setp( __data_ptr, __data_end );
+ this->pbump((int)_M_str.size()); // initial write position, if we initialized with string
+ }
+ // this->setp((_M_mode & (ios_base::app | ios_base::ate))? __data_end : __data_ptr, __data_end);
+ }
+}
+
+// Precondition: gptr() >= egptr(). Returns a character, if one is available.
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_int_type__
+basic_stringbuf<_CharT, _Traits, _Alloc>::underflow() {
+ return this->gptr() != this->egptr()
+ ? _Traits::to_int_type(*this->gptr())
+ : _Traits::eof();
+}
+
+// Precondition: gptr() >= egptr().
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_int_type__
+basic_stringbuf<_CharT, _Traits, _Alloc>::uflow() {
+ if (this->gptr() != this->egptr()) {
+ int_type __c = _Traits::to_int_type(*this->gptr());
+ this->gbump(1);
+ return __c;
+ }
+ else
+ return _Traits::eof();
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_int_type__
+basic_stringbuf<_CharT, _Traits, _Alloc>::pbackfail(int_type __c) {
+ if (this->gptr() != this->eback()) {
+ if (!_Traits::eq_int_type(__c, _Traits::eof())) {
+ if (_Traits::eq(_Traits::to_char_type(__c), this->gptr()[-1])) {
+ this->gbump(-1);
+ return __c;
+ }
+ else if (_M_mode & ios_base::out) {
+ this->gbump(-1);
+ *this->gptr() = _Traits::to_char_type(__c);
+ return __c;
+ }
+ else
+ return _Traits::eof();
+ }
+ else {
+ this->gbump(-1);
+ return _Traits::not_eof(__c);
+ }
+ }
+ else
+ return _Traits::eof();
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_int_type__ basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(int_type __c)
+{
+ if (!_Traits::eq_int_type(__c, _Traits::eof())) {
+ if (_M_mode & ios_base::out) {
+ if ( this->pptr() < this->epptr() ) { // just put back in any case
+ _M_str.push_back( _Traits::to_char_type(__c) );
+ this->pbump(1);
+ } else if ( _M_mode & ios_base::in ) {
+ ptrdiff_t __offset = this->gptr() - this->eback();
+ _M_str.push_back(_Traits::to_char_type(__c));
+ _CharT* __data_ptr = _S_start(_M_str);
+ this->setg(__data_ptr, __data_ptr + __offset, _S_finish(_M_str));
+ this->setp(__data_ptr, _S_finish(_M_str));
+ this->pbump((int)_M_str.size());
+ } else {
+ _M_str.push_back( _Traits::to_char_type(__c) );
+ this->setp(_S_start(_M_str), _S_finish(_M_str));
+ this->pbump((int)_M_str.size());
+ }
+ return __c;
+ }
+ return _Traits::eof(); // Overflow always fails if it's read-only
+ }
+ return _Traits::not_eof(__c); // __c is EOF, so we don't have to do anything
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+streamsize
+basic_stringbuf<_CharT, _Traits, _Alloc>::xsputn(const char_type* __s,
+ streamsize __n) {
+ streamsize __nwritten = 0;
+
+ if ((_M_mode & ios_base::out) && __n > 0) {
+ // If the put pointer is somewhere in the middle of the string,
+ // then overwrite instead of append.
+ if ( !_M_str.empty() && this->pbase() == _S_start(_M_str)) {
+ ptrdiff_t __avail = _S_finish(_M_str) - this->pptr();
+ if (__avail > __n) {
+ _Traits::copy(this->pptr(), __s, __STATIC_CAST(size_t, __n));
+ this->pbump((int)__n);
+ return __n;
+ } else {
+ _Traits::copy(this->pptr(), __s, __avail);
+ __nwritten += __avail;
+ __n -= __avail;
+ __s += __avail;
+ }
+ }
+
+ // At this point we know we're appending.
+ _CharT* __data_ptr;
+ if (_M_mode & ios_base::in) {
+ ptrdiff_t __get_offset = this->gptr() - this->eback();
+ _M_str.append(__s, __s + __STATIC_CAST(ptrdiff_t, __n));
+ __data_ptr = _S_start(_M_str);
+ this->setg(__data_ptr, __data_ptr + __get_offset, _S_finish(_M_str));
+ } else {
+ _M_str.append(__s, __s + __STATIC_CAST(ptrdiff_t, __n));
+ __data_ptr = _S_start(_M_str);
+ }
+
+ this->setp(__data_ptr, _S_finish(_M_str));
+ this->pbump((int)_M_str.size());
+ __nwritten += __n;
+ }
+
+ return __nwritten;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+streamsize
+basic_stringbuf<_CharT, _Traits, _Alloc>::_M_xsputnc(char_type __c,
+ streamsize __n) {
+ streamsize __nwritten = 0;
+
+ if ((_M_mode & ios_base::out) && __n > 0) {
+ // If the put pointer is somewhere in the middle of the string,
+ // then overwrite instead of append.
+ if (this->pbase() == _S_start(_M_str)) {
+ ptrdiff_t __avail = _S_finish(_M_str) - this->pptr();
+ if (__avail > __n) {
+ _Traits::assign(this->pptr(), __STATIC_CAST(size_t, __n), __c);
+ this->pbump(__STATIC_CAST(int, __n));
+ return __n;
+ }
+ else {
+ _Traits::assign(this->pptr(), __avail, __c);
+ __nwritten += __avail;
+ __n -= __avail;
+ }
+ }
+
+ // At this point we know we're appending.
+ size_t __app_size = sizeof(streamsize) > sizeof(size_t) ? __STATIC_CAST(size_t, (min)(__n, __STATIC_CAST(streamsize, _M_str.max_size())))
+ : __STATIC_CAST(size_t, __n);
+ _CharT* __data_ptr;
+ if (this->_M_mode & ios_base::in) {
+ ptrdiff_t __get_offset = this->gptr() - this->eback();
+ _M_str.append(__app_size, __c);
+ __data_ptr = _S_start(_M_str);
+ this->setg(__data_ptr, __data_ptr + __get_offset, _S_finish(_M_str));
+ } else {
+ _M_str.append(__app_size, __c);
+ __data_ptr = _S_start(_M_str);
+ }
+
+ this->setp(__data_ptr, _S_finish(_M_str));
+ this->pbump((int)_M_str.size());
+ __nwritten += __app_size;
+ }
+
+ return __nwritten;
+}
+
+// According to the C++ standard the effects of setbuf are implementation
+// defined, except that setbuf(0, 0) has no effect. In this implementation,
+// setbuf(<anything>, n), for n > 0, calls reserve(n) on the underlying
+// string.
+template <class _CharT, class _Traits, class _Alloc>
+basic_streambuf<_CharT, _Traits>*
+basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT*, streamsize __n) {
+ if (__n > 0) {
+ bool __do_get_area = false;
+ bool __do_put_area = false;
+ ptrdiff_t __offg = 0;
+ ptrdiff_t __offp = 0;
+
+ if (this->pbase() == _S_start(_M_str)) {
+ __do_put_area = true;
+ __offp = this->pptr() - this->pbase();
+ }
+
+ if (this->eback() == _S_start(_M_str)) {
+ __do_get_area = true;
+ __offg = this->gptr() - this->eback();
+ }
+
+ _M_str.reserve(sizeof(streamsize) > sizeof(size_t) ? __STATIC_CAST(size_t, (min)(__n, __STATIC_CAST(streamsize, _M_str.max_size())))
+ : __STATIC_CAST(size_t, __n));
+
+ _CharT* __data_ptr = _S_start(_M_str);
+
+ if (__do_get_area) {
+ this->setg(__data_ptr, __data_ptr + __offg, _S_finish(_M_str));
+ }
+
+ if (__do_put_area) {
+ this->setp(__data_ptr, _S_finish(_M_str));
+ this->pbump((int)__offp);
+ }
+ }
+
+ return this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_pos_type__
+basic_stringbuf<_CharT, _Traits, _Alloc>
+ ::seekoff(off_type __off,
+ ios_base::seekdir __dir,
+ ios_base::openmode __mode) {
+ __mode &= _M_mode;
+
+ bool __imode = (__mode & ios_base::in) != 0;
+ bool __omode = (__mode & ios_base::out) != 0;
+
+ if ( !(__imode || __omode) )
+ return pos_type(off_type(-1));
+
+ if ( (__imode && (this->gptr() == 0)) || (__omode && (this->pptr() == 0)) )
+ return pos_type(off_type(-1));
+
+ streamoff __newoff;
+ switch(__dir) {
+ case ios_base::beg:
+ __newoff = 0;
+ break;
+ case ios_base::end:
+ __newoff = _M_str.size();
+ break;
+ case ios_base::cur:
+ __newoff = __imode ? this->gptr() - this->eback() : this->pptr() - this->pbase();
+ if ( __off == 0 ) {
+ return pos_type(__newoff);
+ }
+ break;
+ default:
+ return pos_type(off_type(-1));
+ }
+
+ __off += __newoff;
+
+ if (__imode) {
+ ptrdiff_t __n = this->egptr() - this->eback();
+
+ if (__off < 0 || __off > __n)
+ return pos_type(off_type(-1));
+ this->setg(this->eback(), this->eback() + __STATIC_CAST(ptrdiff_t, __off),
+ this->eback() + __STATIC_CAST(ptrdiff_t, __n));
+ }
+
+ if (__omode) {
+ ptrdiff_t __n = this->epptr() - this->pbase();
+
+ if (__off < 0 || __off > __n)
+ return pos_type(off_type(-1));
+ this->setp(this->pbase(), this->pbase() + __n);
+ this->pbump((int)__off);
+ }
+
+ return pos_type(__off);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__BSB_pos_type__
+basic_stringbuf<_CharT, _Traits, _Alloc>
+ ::seekpos(pos_type __pos, ios_base::openmode __mode) {
+ __mode &= _M_mode;
+
+ bool __imode = (__mode & ios_base::in) != 0;
+ bool __omode = (__mode & ios_base::out) != 0;
+
+ if ( !(__imode || __omode) )
+ return pos_type(off_type(-1));
+
+ if ( (__imode && (this->gptr() == 0)) || (__omode && (this->pptr() == 0)) )
+ return pos_type(off_type(-1));
+
+ const off_type __n = __pos - pos_type(off_type(0));
+
+ if (__imode) {
+ if (__n < 0 || __n > this->egptr() - this->eback())
+ return pos_type(off_type(-1));
+ this->setg(this->eback(), this->eback() + __STATIC_CAST(ptrdiff_t, __n), this->egptr());
+ }
+
+ if (__omode) {
+ if (__n < 0 || size_t(__n) > _M_str.size())
+ return pos_type(off_type(-1));
+
+ this->setp(_S_start(_M_str), _S_finish(_M_str));
+ this->pbump((int)__n);
+ }
+
+ return __pos;
+}
+
+//----------------------------------------------------------------------
+// Non-inline istringstream member functions.
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istringstream<_CharT, _Traits, _Alloc>
+ ::basic_istringstream(ios_base::openmode __mode)
+ : basic_istream<_CharT, _Traits>(0),
+ _M_buf(__mode | ios_base::in) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istringstream<_CharT, _Traits, _Alloc>
+ ::basic_istringstream(const _String& __str,ios_base::openmode __mode)
+ : basic_istream<_CharT, _Traits>(0),
+ _M_buf(__str, __mode | ios_base::in) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istringstream<_CharT, _Traits, _Alloc>::~basic_istringstream()
+{}
+
+//----------------------------------------------------------------------
+// Non-inline ostringstream member functions.
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_ostringstream<_CharT, _Traits, _Alloc>
+ ::basic_ostringstream(ios_base::openmode __mode)
+ : basic_ostream<_CharT, _Traits>(0),
+ _M_buf(__mode | ios_base::out) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_ostringstream<_CharT, _Traits, _Alloc>
+ ::basic_ostringstream(const _String& __str, ios_base::openmode __mode)
+ : basic_ostream<_CharT, _Traits>(0),
+ _M_buf(__str, __mode | ios_base::out) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_ostringstream<_CharT, _Traits, _Alloc>::~basic_ostringstream()
+{}
+
+//----------------------------------------------------------------------
+// Non-inline stringstream member functions.
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringstream<_CharT, _Traits, _Alloc>
+ ::basic_stringstream(ios_base::openmode __mode)
+ : basic_iostream<_CharT, _Traits>(0), _M_buf(__mode) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringstream<_CharT, _Traits, _Alloc>
+ ::basic_stringstream(const _String& __str, ios_base::openmode __mode)
+ : basic_iostream<_CharT, _Traits>(0), _M_buf(__str, __mode) {
+ this->init(&_M_buf);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream()
+{}
+
+_STLP_END_NAMESPACE
+
+# undef __BSB_int_type__
+# undef __BSB_pos_type__
+
+#endif /* _STLP_SSTREAM_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_sstream.h b/6/sources/cxx-stl/stlport/stlport/stl/_sstream.h
new file mode 100644
index 0000000..9e8d02a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_sstream.h
@@ -0,0 +1,266 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+
+// This header defines classes basic_stringbuf, basic_istringstream,
+// basic_ostringstream, and basic_stringstream. These classes
+// represent streamsbufs and streams whose sources or destinations are
+// C++ strings.
+
+#ifndef _STLP_INTERNAL_SSTREAM
+#define _STLP_INTERNAL_SSTREAM
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h> // Includes <ostream>, <ios>, <iosfwd>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// This version of basic_stringbuf relies on the internal details of
+// basic_string. It relies on the fact that, in this implementation,
+// basic_string's iterators are pointers. It also assumes (as allowed
+// by the standard) that _CharT is a POD type.
+
+// We have a very small buffer for the put area, just so that we don't
+// have to use append() for every sputc. Conceptually, the buffer
+// immediately follows the end of the underlying string. We use this
+// buffer when appending to write-only streambufs, but we don't use it
+// for read-write streambufs.
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_stringbuf : public basic_streambuf<_CharT, _Traits> {
+public: // Typedefs.
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_streambuf<_CharT, _Traits> _Base;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Self;
+ typedef basic_string<_CharT, _Traits, _Alloc> _String;
+
+public: // Constructors, destructor.
+ explicit basic_stringbuf(ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+ explicit basic_stringbuf(const _String& __s, ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+ virtual ~basic_stringbuf();
+
+public: // Get or set the string.
+ _String str() const { return _M_str; }
+ void str(const _String& __s);
+
+protected: // Overridden virtual member functions.
+ virtual int_type underflow();
+ virtual int_type uflow();
+ virtual int_type pbackfail(int_type __c);
+ virtual int_type overflow(int_type __c);
+ int_type pbackfail() {return pbackfail(_Traits::eof());}
+ int_type overflow() {return overflow(_Traits::eof());}
+
+ virtual streamsize xsputn(const char_type* __s, streamsize __n);
+ virtual streamsize _M_xsputnc(char_type __c, streamsize __n);
+
+ virtual _Base* setbuf(_CharT* __buf, streamsize __n);
+ virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
+ ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+ virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+
+private: // Helper functions.
+ void _M_set_ptrs();
+ static _CharT* _S_start(const _String& __str) { return __CONST_CAST(_CharT*, __str.data()); }
+ static _CharT* _S_finish(const _String& __str) { return __CONST_CAST(_CharT*, __str.data()) + __str.size(); }
+
+private:
+ ios_base::openmode _M_mode;
+ _String _M_str;
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf<char, char_traits<char>, allocator<char> >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+//----------------------------------------------------------------------
+// Class basic_istringstream, an input stream that uses a stringbuf.
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_istringstream : public basic_istream<_CharT, _Traits> {
+public: // Typedefs
+ typedef typename _Traits::char_type char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_istream<_CharT, _Traits> _Base;
+ typedef basic_string<_CharT, _Traits, _Alloc> _String;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf;
+
+public: // Constructors, destructor.
+ basic_istringstream(ios_base::openmode __mode = ios_base::in);
+ basic_istringstream(const _String& __str,
+ ios_base::openmode __mode = ios_base::in);
+ ~basic_istringstream();
+
+public: // Member functions
+
+ basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ _String str() const { return _M_buf.str(); }
+ void str(const _String& __s) { _M_buf.str(__s); }
+
+private:
+ basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ typedef basic_istringstream<_CharT, _Traits> _Self;
+ //explicitely defined as private to avoid warnings:
+ basic_istringstream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+};
+
+
+//----------------------------------------------------------------------
+// Class basic_ostringstream, an output stream that uses a stringbuf.
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_ostringstream : public basic_ostream<_CharT, _Traits> {
+public: // Typedefs
+ typedef typename _Traits::char_type char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_ostream<_CharT, _Traits> _Base;
+ typedef basic_string<_CharT, _Traits, _Alloc> _String;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf;
+
+public: // Constructors, destructor.
+ basic_ostringstream(ios_base::openmode __mode = ios_base::out);
+ basic_ostringstream(const _String& __str,
+ ios_base::openmode __mode = ios_base::out);
+ ~basic_ostringstream();
+
+public: // Member functions.
+
+ basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ _String str() const { return _M_buf.str(); }
+ void str(const _String& __s) { _M_buf.str(__s); } // dwa 02/07/00 - BUG STOMPER DAVE
+
+
+private:
+ basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ typedef basic_ostringstream<_CharT, _Traits> _Self;
+ //explicitely defined as private to avoid warnings:
+ basic_ostringstream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+};
+
+
+//----------------------------------------------------------------------
+// Class basic_stringstream, a bidirectional stream that uses a stringbuf.
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_stringstream : public basic_iostream<_CharT, _Traits> {
+public: // Typedefs
+ typedef typename _Traits::char_type char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+ typedef basic_ios<_CharT, _Traits> _Basic_ios;
+ typedef basic_iostream<_CharT, _Traits> _Base;
+ typedef basic_string<_CharT, _Traits, _Alloc> _String;
+ typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf;
+
+ typedef ios_base::openmode openmode;
+
+public: // Constructors, destructor.
+ basic_stringstream(openmode __mod = ios_base::in | ios_base::out);
+ basic_stringstream(const _String& __str,
+ openmode __mod = ios_base::in | ios_base::out);
+ ~basic_stringstream();
+
+public: // Member functions.
+
+ basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
+ { return __CONST_CAST(_Buf*,&_M_buf); }
+
+ _String str() const { return _M_buf.str(); }
+ void str(const _String& __s) { _M_buf.str(__s); }
+
+private:
+ basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC >= 1300 && _STLP_MSVC <= 1310)
+ typedef basic_stringstream<_CharT, _Traits> _Self;
+ //explicitely defined as private to avoid warnings:
+ basic_stringstream(_Self const&);
+ _Self& operator = (_Self const&);
+#endif
+};
+
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream<char, char_traits<char>, allocator<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream<char, char_traits<char>, allocator<char> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream<char, char_traits<char>, allocator<char> >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_sstream.c>
+#endif
+
+#endif /* _STLP_INTERNAL_SSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stack.h b/6/sources/cxx-stl/stlport/stlport/stl/_stack.h
new file mode 100644
index 0000000..7ea9d59
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stack.h
@@ -0,0 +1,133 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_STACK_H
+#define _STLP_INTERNAL_STACK_H
+
+#ifndef _STLP_INTERNAL_DEQUE_H
+# include <stl/_deque.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined ( _STLP_LIMITED_DEFAULT_TEMPLATES )
+template <class _Tp, class _Sequence = deque<_Tp> >
+#elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
+# define _STLP_STACK_ARGS _Tp
+template <class _Tp>
+#else
+template <class _Tp, class _Sequence>
+#endif
+class stack
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+# if defined (_STLP_STACK_ARGS)
+ : public __stlport_class<stack<_Tp> >
+# else
+ : public __stlport_class<stack<_Tp, _Sequence> >
+# endif
+#endif
+{
+#ifdef _STLP_STACK_ARGS
+ typedef deque<_Tp> _Sequence;
+ typedef stack<_Tp> _Self;
+#else
+ typedef stack<_Tp, _Sequence> _Self;
+#endif
+
+public:
+ typedef typename _Sequence::value_type value_type;
+ typedef typename _Sequence::size_type size_type;
+ typedef _Sequence container_type;
+
+ typedef typename _Sequence::reference reference;
+ typedef typename _Sequence::const_reference const_reference;
+protected:
+ //c is a Standard name (23.2.3.3), do no make it STLport naming convention compliant.
+ _Sequence c;
+public:
+ stack() : c() {}
+ explicit stack(const _Sequence& __s) : c(__s) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ stack(__move_source<_Self> src)
+ : c(_STLP_PRIV _AsMoveSource(src.get().c)) {}
+#endif
+
+ bool empty() const { return c.empty(); }
+ size_type size() const { return c.size(); }
+ reference top() { return c.back(); }
+ const_reference top() const { return c.back(); }
+ void push(const value_type& __x) { c.push_back(__x); }
+ void pop() { c.pop_back(); }
+ const _Sequence& _Get_s() const { return c; }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) {
+ _Sequence __tmp = c;
+ c = __x.c;
+ __x.c = __tmp;
+ }
+#endif
+};
+
+#ifndef _STLP_STACK_ARGS
+# define _STLP_STACK_ARGS _Tp, _Sequence
+# define _STLP_STACK_HEADER_ARGS class _Tp, class _Sequence
+#else
+# define _STLP_STACK_HEADER_ARGS class _Tp
+#endif
+
+template < _STLP_STACK_HEADER_ARGS >
+inline bool _STLP_CALL operator==(const stack< _STLP_STACK_ARGS >& __x,
+ const stack< _STLP_STACK_ARGS >& __y)
+{ return __x._Get_s() == __y._Get_s(); }
+
+template < _STLP_STACK_HEADER_ARGS >
+inline bool _STLP_CALL operator<(const stack< _STLP_STACK_ARGS >& __x,
+ const stack< _STLP_STACK_ARGS >& __y)
+{ return __x._Get_s() < __y._Get_s(); }
+
+_STLP_RELOPS_OPERATORS(template < _STLP_STACK_HEADER_ARGS >, stack< _STLP_STACK_ARGS >)
+
+#undef _STLP_STACK_ARGS
+#undef _STLP_STACK_HEADER_ARGS
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Sequence>
+struct __move_traits<stack<_Tp, _Sequence> > :
+ _STLP_PRIV __move_traits_aux<_Sequence>
+{};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_STACK_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept.h b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept.h
new file mode 100644
index 0000000..8c784bb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept.h
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_STDEXCEPT
+#define _STLP_INTERNAL_STDEXCEPT
+
+#ifndef _STLP_INTERNAL_STDEXCEPT_BASE
+# include <stl/_stdexcept_base.h>
+#endif
+
+#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)
+
+# if defined(_STLP_USE_EXCEPTIONS) || \
+ !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32))
+
+_STLP_BEGIN_NAMESPACE
+
+class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception {
+public:
+ logic_error(const string& __s) : __Named_exception(__s) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~logic_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception {
+public:
+ runtime_error(const string& __s) : __Named_exception(__s) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~runtime_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC domain_error : public logic_error {
+public:
+ domain_error(const string& __arg) : logic_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~domain_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error {
+public:
+ invalid_argument(const string& __arg) : logic_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~invalid_argument() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC length_error : public logic_error {
+public:
+ length_error(const string& __arg) : logic_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~length_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC out_of_range : public logic_error {
+public:
+ out_of_range(const string& __arg) : logic_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~out_of_range() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC range_error : public runtime_error {
+public:
+ range_error(const string& __arg) : runtime_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~range_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error {
+public:
+ overflow_error(const string& __arg) : runtime_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~overflow_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error {
+public:
+ underflow_error(const string& __arg) : runtime_error(__arg) {}
+# ifndef _STLP_USE_NO_IOSTREAMS
+ ~underflow_error() _STLP_NOTHROW_INHERENTLY;
+# endif
+};
+
+_STLP_END_NAMESPACE
+
+# endif
+#endif
+
+#endif /* _STLP_INTERNAL_STDEXCEPT */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.c b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.c
new file mode 100644
index 0000000..deb7056
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+__Named_exception::__Named_exception(const string& __str) {
+ size_t __size = strlen(_STLP_PRIV __get_c_string(__str)) + 1;
+ if (__size > _S_bufsize) {
+ _M_name = __STATIC_CAST(char*, malloc(__size * sizeof(char)));
+ if (!_M_name) {
+ __size = _S_bufsize;
+ _M_name = _M_static_name;
+ }
+ else {
+ *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) = __size * sizeof(char);
+ }
+ }
+ else {
+ _M_name = _M_static_name;
+ }
+#if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS)
+ strncpy(_M_name, _STLP_PRIV __get_c_string(__str), __size - 1);
+ _M_name[__size - 1] = '\0';
+#else
+ strncpy_s(_M_name, __size, _STLP_PRIV __get_c_string(__str), __size - 1);
+#endif
+}
+
+__Named_exception::__Named_exception(const __Named_exception& __x) {
+ size_t __size = strlen(__x._M_name) + 1;
+ if (__size > _S_bufsize) {
+ _M_name = __STATIC_CAST(char*, malloc(__size * sizeof(char)));
+ if (!_M_name) {
+ __size = _S_bufsize;
+ _M_name = _M_static_name;
+ }
+ else {
+ *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) = __size * sizeof(char);
+ }
+ }
+ else {
+ _M_name = _M_static_name;
+ }
+#if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS)
+ strncpy(_M_name, __x._M_name, __size - 1);
+ _M_name[__size - 1] = '\0';
+#else
+ strncpy_s(_M_name, __size, __x._M_name, __size - 1);
+#endif
+}
+
+__Named_exception& __Named_exception::operator = (const __Named_exception& __x) {
+ size_t __size = strlen(__x._M_name) + 1;
+ size_t __buf_size = _M_name != _M_static_name ? *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) : _S_bufsize;
+ if (__size > __buf_size) {
+ // Being here necessarily mean that we need to allocate a buffer:
+ if (_M_name != _M_static_name) free(_M_name);
+ _M_name = __STATIC_CAST(char*, malloc(__size * sizeof(char)));
+ if (!_M_name) {
+ __size = _S_bufsize;
+ _M_name = _M_static_name;
+ }
+ else {
+ *(__REINTERPRET_CAST(size_t*, &_M_static_name[0])) = __size * sizeof(char);
+ }
+ }
+#if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS)
+ strncpy(_M_name, __x._M_name, __size - 1);
+ _M_name[__size - 1] = '\0';
+#else
+ strncpy_s(_M_name, __size, __x._M_name, __size - 1);
+#endif
+ return *this;
+}
+
+__Named_exception::~__Named_exception() _STLP_NOTHROW_INHERENTLY {
+ if (_M_name != _M_static_name)
+ free(_M_name);
+}
+
+const char* __Named_exception::what() const _STLP_NOTHROW_INHERENTLY
+{ return _M_name; }
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.h
new file mode 100644
index 0000000..69dc077
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stdexcept_base.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_STDEXCEPT_BASE
+#define _STLP_INTERNAL_STDEXCEPT_BASE
+
+#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)
+
+# ifndef _STLP_INTERNAL_EXCEPTION
+# include <stl/_exception.h>
+# endif
+
+# if defined(_STLP_USE_EXCEPTIONS) || \
+ !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32))
+
+# ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+# endif
+
+# ifndef _STLP_STRING_FWD_H
+# include <stl/_string_fwd.h>
+# endif
+
+# ifndef _STLP_USE_NO_IOSTREAMS
+# define _STLP_OWN_STDEXCEPT 1
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+/* We disable the 4275 warning for
+ * - WinCE where there are only static version of the native C++ runtime.
+ * - The MSVC compilers when the STLport user wants to make an STLport dll linked to
+ * the static C++ native runtime. In this case the std::exception base class is no more
+ * exported from native dll but is used as a base class for the exported __Named_exception
+ * class.
+ */
+# if defined (_STLP_WCE_NET) || \
+ defined (_STLP_USE_DYNAMIC_LIB) && defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# define _STLP_DO_WARNING_POP
+# pragma warning (push)
+# pragma warning (disable: 4275) // Non dll interface class 'exception' used as base
+ // for dll-interface class '__Named_exception'
+# endif
+
+# if !defined (_STLP_NO_EXCEPTION_HEADER)
+# if !defined (_STLP_EXCEPTION_BASE) && !defined (_STLP_BROKEN_EXCEPTION_CLASS) && \
+ defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE)
+using _STLP_VENDOR_EXCEPT_STD::exception;
+# endif
+# endif
+# define _STLP_EXCEPTION_BASE exception
+
+class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE {
+public:
+ __Named_exception(const string& __str);
+ __Named_exception(const __Named_exception&);
+ __Named_exception& operator = (const __Named_exception&);
+
+ const char* what() const _STLP_NOTHROW_INHERENTLY;
+ ~__Named_exception() _STLP_NOTHROW_INHERENTLY;
+
+private:
+ enum { _S_bufsize = 256 };
+ char _M_static_name[_S_bufsize];
+ char *_M_name;
+};
+
+# if defined (_STLP_USE_NO_IOSTREAMS) && !defined (__BUILDING_STLPORT)
+ // if not linking to the lib, expose implementation of members here
+# include <stl/_stdexcept_base.c>
+# endif
+
+# if defined (_STLP_DO_WARNING_POP)
+# pragma warning (pop)
+# undef _STLP_DO_WARNING_POP
+# endif
+
+_STLP_END_NAMESPACE
+
+# endif /* Not o32, and no exceptions */
+#endif /* _STLP_STDEXCEPT_SEEN */
+
+#endif /* _STLP_INTERNAL_STDEXCEPT_BASE */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stlport_version.h b/6/sources/cxx-stl/stlport/stlport/stl/_stlport_version.h
new file mode 100644
index 0000000..587651d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stlport_version.h
@@ -0,0 +1,30 @@
+ /*
+ *
+ * Copyright (c) 2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STLPORT_VERSION_H
+#define _STLP_STLPORT_VERSION_H
+
+/* The last SGI STL release we merged with */
+#define __SGI_STL 0x330
+
+/* STLport version */
+#define _STLPORT_MAJOR 5
+#define _STLPORT_MINOR 2
+#define _STLPORT_PATCHLEVEL 1
+
+#define _STLPORT_VERSION 0x521
+
+#endif /* _STLP_STLPORT_VERSION_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_stream_iterator.h b/6/sources/cxx-stl/stlport/stlport/stl/_stream_iterator.h
new file mode 100644
index 0000000..aa26ae3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_stream_iterator.h
@@ -0,0 +1,253 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#if !defined (_STLP_INTERNAL_STREAM_ITERATOR_H) && !defined (_STLP_USE_NO_IOSTREAMS)
+#define _STLP_INTERNAL_STREAM_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+#endif
+
+// streambuf_iterators predeclarations must appear first
+#ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
+# include <stl/_ostreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
+# include <stl/_istreambuf_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+#endif
+
+// istream_iterator and ostream_iterator look very different if we're
+// using new, templatized iostreams than if we're using the old cfront
+// version.
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _CharT, class _Traits, class _Dist
+# define __ISI_TMPL_ARGUMENTS _Tp, _CharT, _Traits, _Dist
+template <class _Tp,
+ class _CharT = char, class _Traits = char_traits<_CharT>,
+ class _Dist = ptrdiff_t>
+class istream_iterator : public iterator<input_iterator_tag, _Tp , _Dist,
+ const _Tp*, const _Tp& > {
+#else
+# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_DEFAULT_TYPE_PARAM)
+# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp
+# define __ISI_TMPL_ARGUMENTS _Tp
+template <class _Tp>
+class istream_iterator : public iterator<input_iterator_tag, _Tp , ptrdiff_t,
+ const _Tp*, const _Tp& > {
+# else
+# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist
+# define __ISI_TMPL_ARGUMENTS _Tp, _Dist
+template <class _Tp, _STLP_DFL_TYPE_PARAM(_Dist, ptrdiff_t)>
+class istream_iterator : public iterator<input_iterator_tag, _Tp, _Dist ,
+ const _Tp*, const _Tp& > {
+# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */
+#endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+ typedef char _CharT;
+ typedef char_traits<char> _Traits;
+# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_DEFAULT_TYPE_PARAM)
+ typedef ptrdiff_t _Dist;
+# endif
+#endif
+
+ typedef istream_iterator< __ISI_TMPL_ARGUMENTS > _Self;
+public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef basic_istream<_CharT, _Traits> istream_type;
+
+ typedef input_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef _Dist difference_type;
+ typedef const _Tp* pointer;
+ typedef const _Tp& reference;
+
+ istream_iterator() : _M_stream(0), _M_ok(false), _M_read_done(true) {}
+ istream_iterator(istream_type& __s) : _M_stream(&__s), _M_ok(false), _M_read_done(false) {}
+
+ reference operator*() const {
+ if (!_M_read_done) {
+ _M_read();
+ }
+ return _M_value;
+ }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ _M_read();
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ _M_read();
+ return __tmp;
+ }
+
+ bool _M_equal(const _Self& __x) const {
+ if (!_M_read_done) {
+ _M_read();
+ }
+ if (!__x._M_read_done) {
+ __x._M_read();
+ }
+ return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
+ }
+
+private:
+ istream_type* _M_stream;
+ mutable _Tp _M_value;
+ mutable bool _M_ok;
+ mutable bool _M_read_done;
+
+ void _M_read() const {
+ _STLP_MUTABLE(_Self, _M_ok) = ((_M_stream != 0) && !_M_stream->fail());
+ if (_M_ok) {
+ *_M_stream >> _STLP_MUTABLE(_Self, _M_value);
+ _STLP_MUTABLE(_Self, _M_ok) = !_M_stream->fail();
+ }
+ _STLP_MUTABLE(_Self, _M_read_done) = true;
+ }
+};
+
+#if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _TpP,
+ class _CharT = char, class _Traits = char_traits<_CharT> >
+#else
+template <class _TpP>
+#endif
+class ostream_iterator: public iterator<output_iterator_tag, void, void, void, void> {
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+ typedef char _CharT;
+ typedef char_traits<char> _Traits;
+ typedef ostream_iterator<_TpP> _Self;
+#else
+ typedef ostream_iterator<_TpP, _CharT, _Traits> _Self;
+#endif
+public:
+ typedef _CharT char_type;
+ typedef _Traits traits_type;
+ typedef basic_ostream<_CharT, _Traits> ostream_type;
+
+ typedef output_iterator_tag iterator_category;
+
+ ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
+ ostream_iterator(ostream_type& __s, const _CharT* __c)
+ : _M_stream(&__s), _M_string(__c) {}
+ _Self& operator=(const _TpP& __val) {
+ *_M_stream << __val;
+ if (_M_string) *_M_stream << _M_string;
+ return *this;
+ }
+ _Self& operator*() { return *this; }
+ _Self& operator++() { return *this; }
+ _Self& operator++(int) { return *this; }
+private:
+ ostream_type* _M_stream;
+ const _CharT* _M_string;
+};
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _TpP>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const ostream_iterator<_TpP>&) { return output_iterator_tag(); }
+# else
+template <class _TpP, class _CharT, class _Traits>
+inline output_iterator_tag _STLP_CALL
+iterator_category(const ostream_iterator<_TpP, _CharT, _Traits>&) { return output_iterator_tag(); }
+# endif
+#endif
+
+_STLP_END_NAMESPACE
+
+// form-independent definiotion of stream iterators
+_STLP_BEGIN_NAMESPACE
+
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline bool _STLP_CALL
+operator==(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x,
+ const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y)
+{ return __x._M_equal(__y); }
+
+#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline bool _STLP_CALL
+operator!=(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x,
+ const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y)
+{ return !__x._M_equal(__y); }
+#endif
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline input_iterator_tag _STLP_CALL
+iterator_category(const istream_iterator< __ISI_TMPL_ARGUMENTS >&)
+{ return input_iterator_tag(); }
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline _Tp* _STLP_CALL
+value_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Tp*) 0; }
+
+# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_DEFAULT_TYPE_PARAM)
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline ptrdiff_t* _STLP_CALL
+distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (ptrdiff_t*)0; }
+# else
+template < __ISI_TMPL_HEADER_ARGUMENTS >
+inline _Dist* _STLP_CALL
+distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Dist*)0; }
+# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */
+#endif
+
+_STLP_END_NAMESPACE
+
+#undef __ISI_TMPL_HEADER_ARGUMENTS
+#undef __ISI_TMPL_ARGUMENTS
+
+#endif /* _STLP_INTERNAL_STREAM_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.c b/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.c
new file mode 100644
index 0000000..bd61a20
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.c
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_STREAMBUF_C
+#define _STLP_STREAMBUF_C
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+//----------------------------------------------------------------------
+// Non-inline basic_streambuf<> member functions.
+
+#if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) || !defined (_STLP_USE_STATIC_LIB)
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>::basic_streambuf()
+ : _M_gbegin(0), _M_gnext(0), _M_gend(0),
+ _M_pbegin(0), _M_pnext(0), _M_pend(0),
+ _M_locale() {
+ // _M_lock._M_initialize();
+}
+#endif
+
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>::~basic_streambuf()
+{}
+
+template <class _CharT, class _Traits>
+locale
+basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) {
+ this->imbue(__loc);
+ locale __tmp = _M_locale;
+ _M_locale = __loc;
+ return __tmp;
+}
+
+template <class _CharT, class _Traits>
+streamsize
+basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n) {
+ streamsize __result = 0;
+ const int_type __eof = _Traits::eof();
+
+ while (__result < __n) {
+ if (_M_gnext < _M_gend) {
+ size_t __chunk = (min) (__STATIC_CAST(size_t,_M_gend - _M_gnext),
+ __STATIC_CAST(size_t,__n - __result));
+ _Traits::copy(__s, _M_gnext, __chunk);
+ __result += __chunk;
+ __s += __chunk;
+ _M_gnext += __chunk;
+ }
+ else {
+ int_type __c = this->sbumpc();
+ if (!_Traits::eq_int_type(__c, __eof)) {
+ *__s = _Traits::to_char_type(__c);
+ ++__result;
+ ++__s;
+ }
+ else
+ break;
+ }
+ }
+
+ return __result;
+}
+
+template <class _CharT, class _Traits>
+streamsize
+basic_streambuf<_CharT, _Traits>::xsputn(const _CharT* __s, streamsize __n)
+{
+ streamsize __result = 0;
+ const int_type __eof = _Traits::eof();
+
+ while (__result < __n) {
+ if (_M_pnext < _M_pend) {
+ size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext),
+ __STATIC_CAST(size_t,__n - __result));
+ _Traits::copy(_M_pnext, __s, __chunk);
+ __result += __chunk;
+ __s += __chunk;
+ _M_pnext += __chunk;
+ }
+
+ else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(*__s)),
+ __eof)) {
+ ++__result;
+ ++__s;
+ }
+ else
+ break;
+ }
+ return __result;
+}
+
+template <class _CharT, class _Traits>
+streamsize
+basic_streambuf<_CharT, _Traits>::_M_xsputnc(_CharT __c, streamsize __n)
+{
+ streamsize __result = 0;
+ const int_type __eof = _Traits::eof();
+
+ while (__result < __n) {
+ if (_M_pnext < _M_pend) {
+ size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext),
+ __STATIC_CAST(size_t,__n - __result));
+ _Traits::assign(_M_pnext, __chunk, __c);
+ __result += __chunk;
+ _M_pnext += __chunk;
+ }
+
+ else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(__c)),
+ __eof))
+ ++__result;
+ else
+ break;
+ }
+ return __result;
+}
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
+basic_streambuf<_CharT, _Traits>::_M_snextc_aux()
+{
+ int_type __eof = _Traits::eof();
+ if (_M_gend == _M_gnext)
+ return _Traits::eq_int_type(this->uflow(), __eof) ? __eof : this->sgetc();
+ else {
+ _M_gnext = _M_gend;
+ return this->underflow();
+ }
+}
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
+basic_streambuf<_CharT, _Traits>::pbackfail(int_type) {
+ return _Traits::eof();
+}
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
+basic_streambuf<_CharT, _Traits>::overflow(int_type) {
+ return _Traits::eof();
+}
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
+basic_streambuf<_CharT, _Traits>::uflow() {
+ return ( _Traits::eq_int_type(this->underflow(),_Traits::eof()) ?
+ _Traits::eof() :
+ _Traits::to_int_type(*_M_gnext++));
+}
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
+basic_streambuf<_CharT, _Traits>::underflow()
+{ return _Traits::eof(); }
+
+template <class _CharT, class _Traits>
+streamsize
+basic_streambuf<_CharT, _Traits>::showmanyc()
+{ return 0; }
+
+template <class _CharT, class _Traits>
+void
+basic_streambuf<_CharT, _Traits>::imbue(const locale&) {}
+
+template <class _CharT, class _Traits>
+int
+basic_streambuf<_CharT, _Traits>::sync() { return 0; }
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type
+basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode)
+{ return pos_type(-1); }
+
+template <class _CharT, class _Traits>
+_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type
+basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode)
+{ return pos_type(-1); }
+
+template <class _CharT, class _Traits>
+basic_streambuf<_CharT, _Traits>*
+basic_streambuf<_CharT, _Traits>:: setbuf(char_type*, streamsize)
+{ return this; }
+
+_STLP_END_NAMESPACE
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.h b/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.h
new file mode 100644
index 0000000..e336b0f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_streambuf.h
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_STREAMBUF
+#define _STLP_INTERNAL_STREAMBUF
+
+#ifndef _STLP_IOS_BASE_H
+# include <stl/_ios_base.h> // Needed for ios_base bitfield members.
+#endif // <ios_base> includes <iosfwd>.
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Class basic_streambuf<>, the base class of the streambuf hierarchy.
+
+// A basic_streambuf<> manages an input (get) area and an output (put)
+// area. Each is described by three pointers: a beginning, an end, and a
+// current position. basic_streambuf<> contains some very simple member
+// functions that manipulate those six pointers, but almost all of the real
+// functionality gets delegated to protected virtual member functions.
+// All of the public member functions are inline, and most of the protected
+// member functions are virtual.
+
+// Although basic_streambuf<> is not abstract, it is useful only as a base
+// class. Its virtual member functions have default definitions such that
+// reading from a basic_streambuf<> will always yield EOF, and writing to a
+// basic_streambuf<> will always fail.
+
+// The second template parameter, _Traits, defaults to char_traits<_CharT>.
+// The default is declared in header <iosfwd>, and it isn't declared here
+// because C++ language rules do not allow it to be declared twice.
+
+template <class _CharT, class _Traits>
+class basic_streambuf {
+ friend class basic_istream<_CharT, _Traits>;
+ friend class basic_ostream<_CharT, _Traits>;
+
+public: // Typedefs.
+ typedef _CharT char_type;
+ typedef typename _Traits::int_type int_type;
+ typedef typename _Traits::pos_type pos_type;
+ typedef typename _Traits::off_type off_type;
+ typedef _Traits traits_type;
+
+private: // Data members.
+
+ char_type* _M_gbegin; // Beginning of get area
+ char_type* _M_gnext; // Current position within the get area
+ char_type* _M_gend; // End of get area
+
+ char_type* _M_pbegin; // Beginning of put area
+ char_type* _M_pnext; // Current position within the put area
+ char_type* _M_pend; // End of put area
+
+ locale _M_locale; // The streambuf's locale object
+
+public: // Destructor.
+ virtual ~basic_streambuf();
+
+protected: // The default constructor.
+ basic_streambuf()
+#if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && defined (_STLP_USE_STATIC_LIB)
+ //We make it inline to avoid unresolved symbol.
+ : _M_gbegin(0), _M_gnext(0), _M_gend(0),
+ _M_pbegin(0), _M_pnext(0), _M_pend(0),
+ _M_locale()
+ {}
+#else
+ ;
+#endif
+
+protected: // Protected interface to the get area.
+ char_type* eback() const { return _M_gbegin; } // Beginning
+ char_type* gptr() const { return _M_gnext; } // Current position
+ char_type* egptr() const { return _M_gend; } // End
+
+ void gbump(int __n) { _M_gnext += __n; }
+ void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) {
+ _M_gbegin = __gbegin;
+ _M_gnext = __gnext;
+ _M_gend = __gend;
+ }
+
+public:
+ // An alternate public interface to the above functions
+ // which allows us to avoid using templated friends which
+ // are not supported on some compilers.
+ char_type* _M_eback() const { return eback(); }
+ char_type* _M_gptr() const { return gptr(); }
+ char_type* _M_egptr() const { return egptr(); }
+ void _M_gbump(int __n) { gbump(__n); }
+ void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend)
+ { this->setg(__gbegin, __gnext, __gend); }
+
+protected: // Protected interface to the put area
+
+ char_type* pbase() const { return _M_pbegin; } // Beginning
+ char_type* pptr() const { return _M_pnext; } // Current position
+ char_type* epptr() const { return _M_pend; } // End
+
+ void pbump(int __n) { _M_pnext += __n; }
+ void setp(char_type* __pbegin, char_type* __pend) {
+ _M_pbegin = __pbegin;
+ _M_pnext = __pbegin;
+ _M_pend = __pend;
+ }
+
+protected: // Virtual buffer management functions.
+
+ virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
+
+ // Alters the stream position, using an integer offset. In this
+ // class seekoff does nothing; subclasses are expected to override it.
+ virtual pos_type seekoff(off_type, ios_base::seekdir,
+ ios_base::openmode = ios_base::in | ios_base::out);
+
+ // Alters the stream position, using a previously obtained streampos. In
+ // this class seekpos does nothing; subclasses are expected to override it.
+ virtual pos_type
+ seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out);
+
+ // Synchronizes (i.e. flushes) the buffer. All subclasses are expected to
+ // override this virtual member function.
+ virtual int sync();
+
+
+public: // Buffer management.
+ basic_streambuf<_CharT, _Traits>* pubsetbuf(char_type* __s, streamsize __n)
+ { return this->setbuf(__s, __n); }
+
+ pos_type pubseekoff(off_type __offset, ios_base::seekdir __way,
+ ios_base::openmode __mod = ios_base::in | ios_base::out)
+ { return this->seekoff(__offset, __way, __mod); }
+
+ pos_type pubseekpos(pos_type __sp,
+ ios_base::openmode __mod = ios_base::in | ios_base::out)
+ { return this->seekpos(__sp, __mod); }
+
+ int pubsync() { return this->sync(); }
+
+protected: // Virtual get area functions, as defined in
+ // 17.5.2.4.3 and 17.5.2.4.4 of the standard.
+ // Returns a lower bound on the number of characters that we can read,
+ // with underflow, before reaching end of file. (-1 is a special value:
+ // it means that underflow will fail.) Most subclasses should probably
+ // override this virtual member function.
+ virtual streamsize showmanyc();
+
+ // Reads up to __n characters. Return value is the number of
+ // characters read.
+ virtual streamsize xsgetn(char_type* __s, streamsize __n);
+
+ // Called when there is no read position, i.e. when gptr() is null
+ // or when gptr() >= egptr(). Subclasses are expected to override
+ // this virtual member function.
+ virtual int_type underflow();
+
+ // Similar to underflow(), but used for unbuffered input. Most
+ // subclasses should probably override this virtual member function.
+ virtual int_type uflow();
+
+ // Called when there is no putback position, i.e. when gptr() is null
+ // or when gptr() == eback(). All subclasses are expected to override
+ // this virtual member function.
+ virtual int_type pbackfail(int_type = traits_type::eof());
+
+protected: // Virtual put area functions, as defined in
+ // 27.5.2.4.5 of the standard.
+
+ // Writes up to __n characters. Return value is the number of characters
+ // written.
+ virtual streamsize xsputn(const char_type* __s, streamsize __n);
+
+ // Extension: writes up to __n copies of __c. Return value is the number
+ // of characters written.
+ virtual streamsize _M_xsputnc(char_type __c, streamsize __n);
+
+ // Called when there is no write position. All subclasses are expected to
+ // override this virtual member function.
+ virtual int_type overflow(int_type = traits_type::eof());
+
+public: // Public members for writing characters.
+ // Write a single character.
+ int_type sputc(char_type __c) {
+ return ((_M_pnext < _M_pend) ? _Traits::to_int_type(*_M_pnext++ = __c)
+ : this->overflow(_Traits::to_int_type(__c)));
+ }
+
+ // Write __n characters.
+ streamsize sputn(const char_type* __s, streamsize __n)
+ { return this->xsputn(__s, __n); }
+
+ // Extension: write __n copies of __c.
+ streamsize _M_sputnc(char_type __c, streamsize __n)
+ { return this->_M_xsputnc(__c, __n); }
+
+private: // Helper functions.
+ int_type _M_snextc_aux();
+
+public: // Public members for reading characters.
+ streamsize in_avail() {
+ return (_M_gnext < _M_gend) ? (_M_gend - _M_gnext) : this->showmanyc();
+ }
+
+ // Advance to the next character and return it.
+ int_type snextc() {
+ return ( _M_gend - _M_gnext > 1 ?
+ _Traits::to_int_type(*++_M_gnext) :
+ this->_M_snextc_aux());
+ }
+
+ // Return the current character and advance to the next.
+ int_type sbumpc() {
+ return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext++)
+ : this->uflow();
+ }
+
+ // Return the current character without advancing to the next.
+ int_type sgetc() {
+ return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext)
+ : this->underflow();
+ }
+
+ streamsize sgetn(char_type* __s, streamsize __n)
+ { return this->xsgetn(__s, __n); }
+
+ int_type sputbackc(char_type __c) {
+ return ((_M_gbegin < _M_gnext) && _Traits::eq(__c, *(_M_gnext - 1)))
+ ? _Traits::to_int_type(*--_M_gnext)
+ : this->pbackfail(_Traits::to_int_type(__c));
+ }
+
+ int_type sungetc() {
+ return (_M_gbegin < _M_gnext)
+ ? _Traits::to_int_type(*--_M_gnext)
+ : this->pbackfail();
+ }
+
+protected: // Virtual locale functions.
+
+ // This is a hook, called by pubimbue() just before pubimbue()
+ // sets the streambuf's locale to __loc. Note that imbue should
+ // not (and cannot, since it has no access to streambuf's private
+ // members) set the streambuf's locale itself.
+ virtual void imbue(const locale&);
+
+public: // Locale-related functions.
+ locale pubimbue(const locale&);
+ locale getloc() const { return _M_locale; }
+
+#if !defined (_STLP_NO_ANACHRONISMS)
+ void stossc() { this->sbumpc(); }
+#endif
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf<char, char_traits<char> >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf<wchar_t, char_traits<wchar_t> >;
+# endif // _STLP_NO_WCHAR_T
+#endif // _STLP_USE_TEMPLATE_EXPORT
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_streambuf.c>
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string.c b/6/sources/cxx-stl/stlport/stlport/stl/_string.c
new file mode 100644
index 0000000..4fa5ece
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string.c
@@ -0,0 +1,673 @@
+/*
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+#ifndef _STLP_STRING_C
+#define _STLP_STRING_C
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
+# include <stl/_ctraits_fns.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_H
+# include <stl/_function.h>
+#endif
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+# define basic_string _STLP_NO_MEM_T_NAME(str)
+#elif defined (_STLP_DEBUG)
+# define basic_string _STLP_NON_DBG_NAME(str)
+#endif
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define __size_type__ size_t
+# define size_type size_t
+# define iterator _CharT*
+#else
+# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// A helper class to use a char_traits as a function object.
+template <class _Traits>
+struct _Not_within_traits : public unary_function<typename _Traits::char_type, bool> {
+ typedef typename _Traits::char_type _CharT;
+ const _CharT* _M_first;
+ const _CharT* _M_last;
+
+ _Not_within_traits(const _CharT* __f, const _CharT* __l)
+ : _M_first(__f), _M_last(__l) {}
+
+ bool operator()(const _CharT& __x) const {
+ return find_if(_M_first, _M_last,
+ _STLP_PRIV _Eq_char_bound<_Traits>(__x)) == _M_last;
+ }
+};
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_of_aux(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits*, const __true_type& /* _STLportTraits */)
+{ return __find_first_of(__first1, __last1, __first2, __last2); }
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_of_aux(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits*, const __false_type& /* _STLportTraits */)
+{ return __find_first_of(__first1, __last1, __first2, __last2, _STLP_PRIV _Eq_traits<_Traits>()); }
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_of(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits* __traits) {
+#if !defined (__BORLANDC__)
+ typedef typename _IsSTLportClass<_Traits>::_Ret _STLportTraits;
+#else
+ enum { _Is = _IsSTLportClass<_Traits>::_Is };
+ typedef typename __bool2type<_Is>::_Ret _STLportTraits;
+#endif
+ return __str_find_first_of_aux(__first1, __last1, __first2, __last2, __traits, _STLportTraits());
+}
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_not_of_aux3(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits* /* __traits */, const __true_type& __useStrcspnLikeAlgo)
+{ return __find_first_of_aux2(__first1, __last1, __first2, __last2, __first2, not1(_Identity<bool>()), __useStrcspnLikeAlgo); }
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_not_of_aux3(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits* /* __traits */, const __false_type& /* _UseStrcspnLikeAlgo */)
+{ return _STLP_STD::find_if(__first1, __last1, _STLP_PRIV _Not_within_traits<_Traits>(__first2, __last2)); }
+
+template <class _InputIter, class _CharT, class _Tp, class _Traits>
+inline _InputIter __str_find_first_not_of_aux2(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Tp* __pt, _Traits* __traits) {
+ typedef typename _IsIntegral<_Tp>::_Ret _IsIntegral;
+ typedef typename _IsCharLikeType<_CharT>::_Ret _IsCharLike;
+ typedef typename _Land2<_IsIntegral, _IsCharLike>::_Ret _UseStrcspnLikeAlgo;
+ return __str_find_first_not_of_aux3(__first1, __last1, __first2, __last2, __traits, _UseStrcspnLikeAlgo());
+}
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_not_of_aux1(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits* __traits, const __true_type& /* _STLportTraits */)
+{ return __str_find_first_not_of_aux2(__first1, __last1, __first2, __last2,
+ _STLP_VALUE_TYPE(__first1, _InputIter), __traits); }
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_not_of_aux1(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits*, const __false_type& /* _STLportTraits */)
+{ return _STLP_STD::find_if(__first1, __last1, _STLP_PRIV _Not_within_traits<_Traits>(__first2, __last2)); }
+
+template <class _InputIter, class _CharT, class _Traits>
+inline _InputIter __str_find_first_not_of(_InputIter __first1, _InputIter __last1,
+ const _CharT* __first2, const _CharT* __last2,
+ _Traits* __traits) {
+#if !defined (__BORLANDC__)
+ typedef typename _IsSTLportClass<_Traits>::_Ret _STLportTraits;
+#else
+ enum { _Is = _IsSTLportClass<_Traits>::_Is };
+ typedef typename __bool2type<_Is>::_Ret _STLportTraits;
+#endif
+ return __str_find_first_not_of_aux1(__first1, __last1, __first2, __last2, __traits, _STLportTraits());
+}
+
+// ------------------------------------------------------------
+// Non-inline declarations.
+
+#if !defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+// Change the string's capacity so that it is large enough to hold
+// at least __res_arg elements, plus the terminating _CharT(). Note that,
+// if __res_arg < capacity(), this member function may actually decrease
+// the string's capacity.
+template <class _CharT, class _Traits, class _Alloc>
+void basic_string<_CharT,_Traits,_Alloc>::reserve(size_type __res_arg) {
+ if (__res_arg > max_size())
+ this->_M_throw_length_error();
+
+ size_type __n = (max)(__res_arg, size()) + 1;
+ if (__n < this->_M_capacity())
+ return;
+
+ _M_reserve(__n);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+void basic_string<_CharT,_Traits,_Alloc>::_M_reserve(size_type __n) {
+ pointer __new_start = this->_M_start_of_storage.allocate(__n, __n);
+ pointer __new_finish = _STLP_PRIV __ucopy(this->_M_Start(), this->_M_Finish(), __new_start);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __n);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT,_Traits,_Alloc>&
+basic_string<_CharT,_Traits,_Alloc>::append(size_type __n, _CharT __c) {
+ if (__n > 0) {
+ if (__n > max_size() - size())
+ this->_M_throw_length_error();
+ if (__n >= this->_M_rest())
+ _M_reserve(_M_compute_next_size(__n));
+ _STLP_PRIV __uninitialized_fill_n(this->_M_finish + 1, __n - 1, __c);
+ _M_construct_null(this->_M_finish + __n);
+ _Traits::assign(*end(), __c);
+ this->_M_finish += __n;
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT, _Traits, _Alloc>&
+basic_string<_CharT, _Traits, _Alloc>::_M_append(const _CharT* __first, const _CharT* __last) {
+ if (__first != __last) {
+ size_type __n = __STATIC_CAST(size_type, __last - __first);
+ if (__n >= this->_M_rest()) {
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = _STLP_PRIV __ucopy(this->_M_Start(), this->_M_Finish(), __new_start);
+ __new_finish = _STLP_PRIV __ucopy(__first, __last, __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ else {
+ const _CharT* __f1 = __first;
+ ++__f1;
+ _STLP_PRIV __ucopy(__f1, __last, this->_M_finish + 1);
+ _M_construct_null(this->_M_finish + __n);
+ _Traits::assign(*end(), *__first);
+ this->_M_finish += __n;
+ }
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT,_Traits,_Alloc>&
+basic_string<_CharT,_Traits,_Alloc>::assign(size_type __n, _CharT __c) {
+ if (__n <= size()) {
+ _Traits::assign(this->_M_Start(), __n, __c);
+ erase(begin() + __n, end());
+ }
+ else {
+ if (__n < capacity()) {
+ _Traits::assign(this->_M_Start(), size(), __c);
+ append(__n - size(), __c);
+ }
+ else {
+ _Self __str(__n, __c);
+ this->swap(__str);
+ }
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT,_Traits,_Alloc>&
+basic_string<_CharT,_Traits,_Alloc>::_M_assign(const _CharT* __f, const _CharT* __l) {
+ ptrdiff_t __n = __l - __f;
+ if (__STATIC_CAST(size_type, __n) <= size()) {
+ _Traits::copy(this->_M_Start(), __f, __n);
+ erase(begin() + __n, end());
+ }
+ else {
+ _Traits::copy(this->_M_Start(), __f, size());
+ _M_append(__f + size(), __l);
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+_CharT* basic_string<_CharT,_Traits,_Alloc> ::_M_insert_aux(_CharT* __p,
+ _CharT __c) {
+ pointer __new_pos = __p;
+ if (this->_M_rest() > 1 ) {
+ _M_construct_null(this->_M_finish + 1);
+ _Traits::move(__p + 1, __p, this->_M_finish - __p);
+ _Traits::assign(*__p, __c);
+ ++this->_M_finish;
+ }
+ else {
+ size_type __len = _M_compute_next_size(1);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ __new_pos = _STLP_PRIV __ucopy(this->_M_Start(), __p, __new_start);
+ _Traits::assign(*__new_pos, __c);
+ pointer __new_finish = __new_pos + 1;
+ __new_finish = _STLP_PRIV __ucopy(__p, this->_M_finish, __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ return __new_pos;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+void basic_string<_CharT,_Traits,_Alloc>::insert(iterator __pos,
+ size_t __n, _CharT __c) {
+ if (__n != 0) {
+ if (this->_M_rest() > __n) {
+ const size_type __elems_after = this->_M_finish - __pos;
+ pointer __old_finish = this->_M_finish;
+ if (__elems_after >= __n) {
+ _STLP_PRIV __ucopy((this->_M_finish - __n) + 1, this->_M_finish + 1, this->_M_finish + 1);
+ this->_M_finish += __n;
+ _Traits::move(__pos + __n, __pos, (__elems_after - __n) + 1);
+ _Traits::assign(__pos, __n, __c);
+ }
+ else {
+ _STLP_PRIV __uninitialized_fill_n(this->_M_finish + 1, __n - __elems_after - 1, __c);
+ this->_M_finish += __n - __elems_after;
+ _STLP_PRIV __ucopy(__pos, __old_finish + 1, this->_M_finish);
+ this->_M_finish += __elems_after;
+ _Traits::assign(__pos, __elems_after + 1, __c);
+ }
+ }
+ else {
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = _STLP_PRIV __ucopy(this->_M_Start(), __pos, __new_start);
+ __new_finish = _STLP_PRIV __uninitialized_fill_n(__new_finish, __n, __c);
+ __new_finish = _STLP_PRIV __ucopy(__pos, this->_M_finish, __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ }
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+void basic_string<_CharT,_Traits,_Alloc>::_M_insert(iterator __pos,
+ const _CharT* __first, const _CharT* __last,
+ bool __self_ref) {
+ //this version has to take care about the auto referencing
+ if (__first != __last) {
+ const size_t __n = __last - __first;
+ if (this->_M_rest() > __n) {
+ const size_t __elems_after = this->_M_finish - __pos;
+ pointer __old_finish = this->_M_finish;
+ if (__elems_after >= __n) {
+ _STLP_PRIV __ucopy((this->_M_finish - __n) + 1, this->_M_finish + 1, this->_M_finish + 1);
+ this->_M_finish += __n;
+ _Traits::move(__pos + __n, __pos, (__elems_after - __n) + 1);
+ if (!__self_ref || __last < __pos) {
+ _M_copy(__first, __last, __pos);
+ }
+ else {
+ //We have to check that the source buffer hasn't move
+ if (__first >= __pos) {
+ //The source buffer has move
+ __first += __n;
+ __last += __n;
+ _M_copy(__first, __last, __pos);
+ }
+ else {
+ //The source buffer hasn't move, it has been duplicated
+ _M_move(__first, __last, __pos);
+ }
+ }
+ }
+ else {
+ const_iterator __mid = __first;
+ __mid += __elems_after + 1;
+ _STLP_PRIV __ucopy(__mid, __last, this->_M_finish + 1);
+ this->_M_finish += __n - __elems_after;
+ _STLP_PRIV __ucopy(__pos, __old_finish + 1, this->_M_finish);
+ this->_M_finish += __elems_after;
+ if (!__self_ref)
+ _M_copy(__first, __mid, __pos);
+ else
+ _M_move(__first, __mid, __pos);
+ }
+ }
+ else {
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = _STLP_PRIV __ucopy(this->_M_Start(), __pos, __new_start);
+ __new_finish = _STLP_PRIV __ucopy(__first, __last, __new_finish);
+ __new_finish = _STLP_PRIV __ucopy(__pos, this->_M_finish, __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ }
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT,_Traits,_Alloc>&
+basic_string<_CharT,_Traits,_Alloc> ::replace(iterator __first, iterator __last,
+ size_type __n, _CharT __c) {
+ size_type __len = (size_type)(__last - __first);
+
+ if (__len >= __n) {
+ _Traits::assign(__first, __n, __c);
+ erase(__first + __n, __last);
+ }
+ else {
+ _Traits::assign(__first, __len, __c);
+ insert(__last, __n - __len, __c);
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT,_Traits,_Alloc>&
+basic_string<_CharT,_Traits,_Alloc> ::_M_replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l,
+ bool __self_ref) {
+ const ptrdiff_t __n = __l - __f;
+ const difference_type __len = __last - __first;
+ if (__len >= __n) {
+ if (!__self_ref || __l < __first || __f >= __last)
+ _M_copy(__f, __l, __first);
+ else
+ _M_move(__f, __l, __first);
+ erase(__first + __n, __last);
+ } else if (!__self_ref || (__f >= __last) || (__l <= __first)) { // no overlap
+ const_iterator __m = __f + __len;
+ _M_copy(__f, __m, __first);
+ _M_insert(__last, __m, __l, __self_ref );
+ } else if (__f < __first) { // we have to take care of overlaping
+ const_iterator __m = __f + __len;
+ // We have to deal with possible reallocation because we do insert first.
+ const difference_type __off_dest = __first - this->begin();
+ const difference_type __off_src = __f - this->begin();
+ _M_insert(__last, __m, __l, true);
+ _Traits::move(begin() + __off_dest, begin() + __off_src, __len);
+ } else {
+ const_iterator __m = __f + __len;
+ _Traits::move(__first, __f, __len);
+ _M_insert(__last, __m, __l, true);
+ }
+ return *this;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__ basic_string<_CharT,_Traits,_Alloc>::find( const _CharT* __s, size_type __pos,
+ size_type __n) const
+{
+ const size_t __len = size();
+ if (__pos >= __len || __pos + __n > __len) {
+ if ( __n == 0 && __pos <= __len ) { // marginal case
+ return __pos;
+ }
+ return npos;
+ }
+
+ const_pointer __result =
+ _STLP_STD::search(this->_M_Start() + __pos, this->_M_Finish(),
+ __s, __s + __n, _STLP_PRIV _Eq_traits<_Traits>());
+ return __result != this->_M_Finish() ? __result - this->_M_Start() : npos;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__ basic_string<_CharT,_Traits,_Alloc>::find(_CharT __c, size_type __pos) const
+{
+ if (__pos >= size()) { /*__pos + 1 > size()*/
+ return npos;
+ }
+
+ const_pointer __result =
+ _STLP_STD::find_if(this->_M_Start() + __pos, this->_M_Finish(),
+ _STLP_PRIV _Eq_char_bound<_Traits>(__c));
+ return __result != this->_M_Finish() ? __result - this->_M_Start() : npos;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__ basic_string<_CharT,_Traits,_Alloc>::rfind(const _CharT* __s, size_type __pos,
+ size_type __n) const
+{
+ const size_type __len = size();
+ if ( __len < __n ) {
+ return npos;
+ }
+ const_pointer __last = this->_M_Start() + (min)( __len - __n, __pos) + __n;
+ if ( __n == 0 ) { // marginal case
+ return __last - this->_M_Start();
+ }
+ const_pointer __result = _STLP_STD::find_end(this->_M_Start(), __last,
+ __s, __s + __n, _STLP_PRIV _Eq_traits<_Traits>());
+ return __result != __last ? __result - this->_M_Start() : npos;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__ basic_string<_CharT,_Traits,_Alloc>::rfind(_CharT __c, size_type __pos) const
+{
+ const size_type __len = size();
+ if ( __len < 1 ) {
+ return npos;
+ }
+ const_iterator __last = begin() + (min)(__len - 1, __pos) + 1;
+ const_reverse_iterator __rresult =
+ _STLP_STD::find_if(const_reverse_iterator(__last), rend(),
+ _STLP_PRIV _Eq_char_bound<_Traits>(__c));
+ return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
+}
+
+template <class _CharT, class _Traits, class _Alloc> __size_type__
+basic_string<_CharT,_Traits,_Alloc> ::find_first_of(const _CharT* __s, size_type __pos,
+ size_type __n) const {
+ if (__pos >= size()) /*__pos + 1 > size()*/
+ return npos;
+ else {
+ const_iterator __result = _STLP_PRIV __str_find_first_of(begin() + __pos, end(),
+ __s, __s + __n,
+ __STATIC_CAST(_Traits*, 0));
+ return __result != end() ? __result - begin() : npos;
+ }
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+ __size_type__
+basic_string<_CharT,_Traits,_Alloc> ::find_last_of(const _CharT* __s, size_type __pos,
+ size_type __n) const
+{
+ const size_type __len = size();
+ if ( __len < 1 ) {
+ return npos;
+ }
+ const const_iterator __last = begin() + (min)(__len - 1, __pos) + 1;
+ const const_reverse_iterator __rresult =
+ _STLP_PRIV __str_find_first_of(const_reverse_iterator(__last), rend(),
+ __s, __s + __n,
+ __STATIC_CAST(_Traits*, 0));
+ return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
+}
+
+
+template <class _CharT, class _Traits, class _Alloc> __size_type__
+basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(const _CharT* __s, size_type __pos,
+ size_type __n) const {
+ typedef typename _Traits::char_type _CharType;
+ if (__pos >= size()) /*__pos + 1 >= size()*/
+ return npos;
+ else {
+ const_pointer __result = _STLP_PRIV __str_find_first_not_of(this->_M_Start() + __pos, this->_M_Finish(),
+ __STATIC_CAST(const _CharType*, __s),
+ __STATIC_CAST(const _CharType*, __s) + __n,
+ __STATIC_CAST(_Traits*, 0));
+ return __result != this->_M_finish ? __result - this->_M_Start() : npos;
+ }
+}
+
+template <class _CharT, class _Traits, class _Alloc> __size_type__
+basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(_CharT __c, size_type __pos) const {
+ if (1 > size())
+ return npos;
+ else {
+ const_pointer __result = _STLP_STD::find_if(this->_M_Start() + __pos, this->_M_Finish(),
+ _STLP_PRIV _Neq_char_bound<_Traits>(__c));
+ return __result != this->_M_finish ? __result - this->_M_Start() : npos;
+ }
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__
+basic_string<_CharT,_Traits,_Alloc>::find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+{
+ typedef typename _Traits::char_type _CharType;
+ const size_type __len = size();
+ if ( __len < 1 ) {
+ return npos;
+ }
+ const_iterator __last = begin() + (min)(__len - 1, __pos) + 1;
+ const_reverse_iterator __rlast = const_reverse_iterator(__last);
+ const_reverse_iterator __rresult =
+ _STLP_PRIV __str_find_first_not_of(__rlast, rend(),
+ __STATIC_CAST(const _CharType*, __s),
+ __STATIC_CAST(const _CharType*, __s) + __n,
+ __STATIC_CAST(_Traits*, 0));
+ return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+__size_type__
+basic_string<_CharT, _Traits, _Alloc>::find_last_not_of(_CharT __c, size_type __pos) const
+{
+ const size_type __len = size();
+ if ( __len < 1 ) {
+ return npos;
+ }
+ const_iterator __last = begin() + (min)(__len - 1, __pos) + 1;
+ const_reverse_iterator __rlast = const_reverse_iterator(__last);
+ const_reverse_iterator __rresult =
+ _STLP_STD::find_if(__rlast, rend(),
+ _STLP_PRIV _Neq_char_bound<_Traits>(__c));
+ return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
+}
+
+#if !defined (basic_string)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _CharT, class _Traits, class _Alloc>
+void _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s,
+ _CharT* __buf, size_t __n) {
+ if (__n > 0) {
+ __n = (min) (__n - 1, __s.size());
+ _STLP_STD::copy(__s.begin(), __s.begin() + __n, __buf);
+ __buf[__n] = _CharT();
+ }
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#include <stl/_range_errors.h>
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// _String_base methods
+template <class _Tp, class _Alloc>
+void _String_base<_Tp,_Alloc>::_M_throw_length_error() const
+{ __stl_throw_length_error("basic_string"); }
+
+template <class _Tp, class _Alloc>
+void _String_base<_Tp, _Alloc>::_M_throw_out_of_range() const
+{ __stl_throw_out_of_range("basic_string"); }
+
+template <class _Tp, class _Alloc>
+void _String_base<_Tp, _Alloc>::_M_allocate_block(size_t __n) {
+ if ((__n <= (max_size() + 1)) && (__n > 0)) {
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ if (__n > _DEFAULT_SIZE) {
+ this->_M_start_of_storage._M_data = _M_start_of_storage.allocate(__n, __n);
+ this->_M_finish = this->_M_start_of_storage._M_data;
+ this->_M_buffers._M_end_of_storage = this->_M_start_of_storage._M_data + __n;
+ }
+#else
+ this->_M_start_of_storage._M_data = _M_start_of_storage.allocate(__n, __n);
+ this->_M_finish = this->_M_start_of_storage._M_data;
+ this->_M_end_of_storage = this->_M_start_of_storage._M_data + __n;
+#endif
+ } else {
+ this->_M_throw_length_error();
+ }
+}
+
+#if !defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT* __s)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _M_range_initialize(__s, __s + traits_type::length(__s));
+}
+#endif
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT* __s,
+ const allocator_type& __a)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _M_range_initialize(__s, __s + traits_type::length(__s));
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_string<_CharT, _Traits, _Alloc>::basic_string(const basic_string<_CharT, _Traits, _Alloc> & __s)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__s.get_allocator())
+{ _M_range_initialize(__s._M_Start(), __s._M_Finish()); }
+
+#if defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+# undef basic_string
+#endif
+
+#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
+template <class _CharT, class _Traits, class _Alloc>
+const size_t basic_string<_CharT, _Traits, _Alloc>::npos;
+#endif
+
+_STLP_END_NAMESPACE
+
+#undef __size_type__
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# undef size_type
+# undef iterator
+#endif
+
+#endif /* _STLP_STRING_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string.h b/6/sources/cxx-stl/stlport/stlport/stl/_string.h
new file mode 100644
index 0000000..540822b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string.h
@@ -0,0 +1,1182 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_STRING_H
+#define _STLP_INTERNAL_STRING_H
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_STRING_FWD_H
+# include <stl/_string_fwd.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+# include <stl/_uninitialized.h>
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+# include <stl/_string_sum.h>
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+#if defined (__MWERKS__) && ! defined (_STLP_USE_OWN_NAMESPACE)
+
+// MSL implementation classes expect to see the definition of streampos
+// when this header is included. We expect this to be fixed in later MSL
+// implementations
+# if !defined( __MSL_CPP__ ) || __MSL_CPP__ < 0x4105
+# include <stl/msl_string.h>
+# endif
+#endif // __MWERKS__
+
+/*
+ * Standard C++ string class. This class has performance
+ * characteristics very much like vector<>, meaning, for example, that
+ * it does not perform reference-count or copy-on-write, and that
+ * concatenation of two strings is an O(N) operation.
+
+ * There are three reasons why basic_string is not identical to
+ * vector.
+ * First, basic_string always stores a null character at the end;
+ * this makes it possible for c_str to be a fast operation.
+ * Second, the C++ standard requires basic_string to copy elements
+ * using char_traits<>::assign, char_traits<>::copy, and
+ * char_traits<>::move. This means that all of vector<>'s low-level
+ * operations must be rewritten. Third, basic_string<> has a lot of
+ * extra functions in its interface that are convenient but, strictly
+ * speaking, redundant.
+ */
+
+#include <stl/_string_base.h>
+
+_STLP_BEGIN_NAMESPACE
+
+// ------------------------------------------------------------
+// Class basic_string.
+
+// Class invariants:
+// (1) [start, finish) is a valid range.
+// (2) Each iterator in [start, finish) points to a valid object
+// of type value_type.
+// (3) *finish is a valid object of type value_type; when
+// value_type is not a POD it is value_type().
+// (4) [finish + 1, end_of_storage) is a valid range.
+// (5) Each iterator in [finish + 1, end_of_storage) points to
+// unininitialized memory.
+
+// Note one important consequence: a string of length n must manage
+// a block of memory whose size is at least n + 1.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+struct _String_reserve_t {};
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+# define basic_string _STLP_NO_MEM_T_NAME(str)
+#elif defined (_STLP_DEBUG)
+# define basic_string _STLP_NON_DBG_NAME(str)
+#endif
+
+#if defined (basic_string)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+#if defined (__DMC__)
+# define _STLP_PRIVATE public
+#elif defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+# define _STLP_PRIVATE protected
+#else
+# define _STLP_PRIVATE private
+#endif
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_string : _STLP_PRIVATE _STLP_PRIV _String_base<_CharT,_Alloc>
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (basic_string)
+ , public __stlport_class<basic_string<_CharT, _Traits, _Alloc> >
+#endif
+{
+_STLP_PRIVATE: // Private members inherited from base.
+ typedef _STLP_PRIV _String_base<_CharT,_Alloc> _Base;
+ typedef basic_string<_CharT, _Traits, _Alloc> _Self;
+
+public:
+ typedef _CharT value_type;
+ typedef _Traits traits_type;
+
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef typename _Base::size_type size_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag _Iterator_category;
+
+ typedef const value_type* const_iterator;
+ typedef value_type* iterator;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+#include <stl/_string_npos.h>
+
+ typedef _STLP_PRIV _String_reserve_t _Reserve_t;
+
+public: // Constructor, destructor, assignment.
+ typedef typename _Base::allocator_type allocator_type;
+
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR((const allocator_type&)this->_M_start_of_storage, _CharT); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit basic_string(const allocator_type& __a = allocator_type())
+#else
+ basic_string()
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type(), _Base::_DEFAULT_SIZE)
+ { _M_terminate_string(); }
+ explicit basic_string(const allocator_type& __a)
+#endif
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a, _Base::_DEFAULT_SIZE)
+ { _M_terminate_string(); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ basic_string(_Reserve_t, size_t __n,
+ const allocator_type& __a = allocator_type())
+#else
+ basic_string(_Reserve_t, size_t __n)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type(), __n + 1)
+ { _M_terminate_string(); }
+ basic_string(_Reserve_t, size_t __n, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a, __n + 1)
+ { _M_terminate_string(); }
+
+ basic_string(const _Self&);
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ basic_string(const _Self& __s, size_type __pos, size_type __n = npos,
+ const allocator_type& __a = allocator_type())
+#else
+ basic_string(const _Self& __s, size_type __pos)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ if (__pos > __s.size())
+ this->_M_throw_out_of_range();
+ else
+ _M_range_initialize(__s._M_Start() + __pos, __s._M_Finish());
+ }
+ basic_string(const _Self& __s, size_type __pos, size_type __n)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ if (__pos > __s.size())
+ this->_M_throw_out_of_range();
+ else
+ _M_range_initialize(__s._M_Start() + __pos,
+ __s._M_Start() + __pos + (min) (__n, __s.size() - __pos));
+ }
+ basic_string(const _Self& __s, size_type __pos, size_type __n,
+ const allocator_type& __a)
+#endif
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a) {
+ if (__pos > __s.size())
+ this->_M_throw_out_of_range();
+ else
+ _M_range_initialize(__s._M_Start() + __pos,
+ __s._M_Start() + __pos + (min) (__n, __s.size() - __pos));
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ basic_string(const _CharT* __s, size_type __n,
+ const allocator_type& __a = allocator_type())
+#else
+ basic_string(const _CharT* __s, size_type __n)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _M_range_initialize(__s, __s + __n);
+ }
+ basic_string(const _CharT* __s, size_type __n, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _M_range_initialize(__s, __s + __n);
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ basic_string(const _CharT* __s,
+ const allocator_type& __a = allocator_type());
+#else
+ basic_string(const _CharT* __s);
+ basic_string(const _CharT* __s, const allocator_type& __a);
+#endif
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ basic_string(size_type __n, _CharT __c,
+ const allocator_type& __a = allocator_type())
+#else
+ basic_string(size_type __n, _CharT __c)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type(), __n + 1) {
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_Start(), __n, __c);
+ _M_terminate_string();
+ }
+ basic_string(size_type __n, _CharT __c, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a, __n + 1) {
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_Start(), __n, __c);
+ _M_terminate_string();
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ basic_string(__move_source<_Self> src)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__move_source<_Base>(src.get())) {}
+#endif
+
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l,
+ const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__f, __l, _Integral());
+ }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__f, __l, _Integral());
+ }
+# endif
+#else
+# if !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ basic_string(const _CharT* __f, const _CharT* __l,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(__a) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _M_range_initialize(__f, __l);
+ }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ basic_string(const _CharT* __f, const _CharT* __l)
+ : _STLP_PRIV _String_base<_CharT,_Alloc>(allocator_type()) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _M_range_initialize(__f, __l);
+ }
+# endif
+# endif
+# if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ /* We need an additionnal constructor to build an empty string without
+ * any allocation or termination char*/
+protected:
+ struct _CalledFromWorkaround_t {};
+ basic_string(_CalledFromWorkaround_t, const allocator_type &__a)
+ : _String_base<_CharT,_Alloc>(__a) {}
+# endif
+#endif
+
+_STLP_PRIVATE:
+ size_type _M_compute_next_size(size_type __n) {
+ const size_type __size = size();
+ if (__n > max_size() - __size)
+ this->_M_throw_length_error();
+ size_type __len = __size + (max)(__n, __size) + 1;
+ if (__len > max_size() || __len < __size)
+ __len = max_size(); // overflow
+ return __len;
+ }
+
+ template <class _InputIter>
+ void _M_range_initialize(_InputIter __f, _InputIter __l,
+ const input_iterator_tag &__tag) {
+ this->_M_allocate_block();
+ _M_construct_null(this->_M_Finish());
+ _M_appendT(__f, __l, __tag);
+ }
+
+ template <class _ForwardIter>
+ void _M_range_initialize(_ForwardIter __f, _ForwardIter __l,
+ const forward_iterator_tag &) {
+ difference_type __n = _STLP_STD::distance(__f, __l);
+ this->_M_allocate_block(__n + 1);
+ this->_M_finish = uninitialized_copy(__f, __l, this->_M_Start());
+ this->_M_terminate_string();
+ }
+
+ template <class _InputIter>
+ void _M_range_initializeT(_InputIter __f, _InputIter __l) {
+ _M_range_initialize(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
+ }
+
+ template <class _Integer>
+ void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type& /*_Integral*/) {
+ this->_M_allocate_block(__n + 1);
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_Start(), __n, __x);
+ this->_M_terminate_string();
+ }
+
+ template <class _InputIter>
+ void _M_initialize_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*_Integral*/) {
+ _M_range_initializeT(__f, __l);
+ }
+
+public:
+ _Self& operator=(const _Self& __s) {
+ if (&__s != this)
+ _M_assign(__s._M_Start(), __s._M_Finish());
+ return *this;
+ }
+
+ _Self& operator=(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_assign(__s, __s + traits_type::length(__s));
+ }
+
+ _Self& operator=(_CharT __c)
+ { return assign(__STATIC_CAST(size_type,1), __c); }
+
+private:
+ static _CharT _STLP_CALL _M_null()
+ { return _STLP_DEFAULT_CONSTRUCTED(_CharT); }
+
+_STLP_PRIVATE: // Helper functions used by constructors
+ // and elsewhere.
+ void _M_construct_null(_CharT* __p) const
+ { _STLP_STD::_Construct(__p); }
+ void _M_terminate_string()
+ { _M_construct_null(this->_M_Finish()); }
+ bool _M_inside(const _CharT* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return (__s >= this->_M_Start()) && (__s < this->_M_Finish());
+ }
+
+ void _M_range_initialize(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ ptrdiff_t __n = __l - __f;
+ this->_M_allocate_block(__n + 1);
+ this->_M_finish = uninitialized_copy(__f, __l, this->_M_Start());
+ _M_terminate_string();
+ }
+
+public: // Iterators.
+ iterator begin() { return this->_M_Start(); }
+ iterator end() { return this->_M_Finish(); }
+ const_iterator begin() const { return this->_M_Start(); }
+ const_iterator end() const { return this->_M_Finish(); }
+
+ reverse_iterator rbegin()
+ { return reverse_iterator(this->_M_Finish()); }
+ reverse_iterator rend()
+ { return reverse_iterator(this->_M_Start()); }
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(this->_M_Finish()); }
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(this->_M_Start()); }
+
+public: // Size, capacity, etc.
+ size_type size() const { return this->_M_Finish() - this->_M_Start(); }
+ size_type length() const { return size(); }
+ size_type max_size() const { return _Base::max_size(); }
+
+ void resize(size_type __n, _CharT __c) {
+ if (__n <= size())
+ erase(begin() + __n, end());
+ else
+ append(__n - size(), __c);
+ }
+
+ void resize(size_type __n) { resize(__n, _M_null()); }
+
+private:
+ void _M_reserve(size_type);
+public:
+ void reserve(size_type = 0);
+
+ size_type capacity() const
+ { return this->_M_capacity() - 1; }
+
+ void clear() {
+ if (!empty()) {
+ _Traits::assign(*(this->_M_Start()), _M_null());
+ this->_M_finish = this->_M_Start();
+ }
+ }
+
+ bool empty() const { return this->_M_Start() == this->_M_Finish(); }
+
+public: // Element access.
+
+ const_reference operator[](size_type __n) const
+ { return *(this->_M_Start() + __n); }
+ reference operator[](size_type __n)
+ { return *(this->_M_Start() + __n); }
+
+ const_reference at(size_type __n) const {
+ if (__n >= size())
+ this->_M_throw_out_of_range();
+ return *(this->_M_Start() + __n);
+ }
+
+ reference at(size_type __n) {
+ if (__n >= size())
+ this->_M_throw_out_of_range();
+ return *(this->_M_Start() + __n);
+ }
+
+public: // Append, operator+=, push_back.
+
+ _Self& operator+=(const _Self& __s) { return append(__s); }
+ _Self& operator+=(const _CharT* __s) { _STLP_FIX_LITERAL_BUG(__s) return append(__s); }
+ _Self& operator+=(_CharT __c) { push_back(__c); return *this; }
+
+private:
+ _Self& _M_append(const _CharT* __first, const _CharT* __last);
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _InputIter>
+ _Self& _M_appendT(_InputIter __first, _InputIter __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last ; ++__first)
+ push_back(*__first);
+ return *this;
+ }
+
+ template <class _ForwardIter>
+ _Self& _M_appendT(_ForwardIter __first, _ForwardIter __last,
+ const forward_iterator_tag &) {
+ if (__first != __last) {
+ size_type __n = __STATIC_CAST(size_type, _STLP_STD::distance(__first, __last));
+ if (__n >= this->_M_rest()) {
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), this->_M_Finish(), __new_start);
+ __new_finish = uninitialized_copy(__first, __last, __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ else {
+ _Traits::assign(*this->_M_finish, *__first++);
+ uninitialized_copy(__first, __last, this->_M_Finish() + 1);
+ _M_construct_null(this->_M_Finish() + __n);
+ this->_M_finish += __n;
+ }
+ }
+ return *this;
+ }
+
+ template <class _Integer>
+ _Self& _M_append_dispatch(_Integer __n, _Integer __x, const __true_type& /*Integral*/)
+ { return append((size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ _Self& _M_append_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*Integral*/)
+ { return _M_appendT(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter)); }
+
+public:
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& append(_InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_append_dispatch(__first, __last, _Integral());
+ }
+#else
+public:
+ _Self& append(const _CharT* __first, const _CharT* __last) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ return _M_append(__first, __last);
+ }
+#endif
+
+public:
+ _Self& append(const _Self& __s)
+ { return _M_append(__s._M_Start(), __s._M_Finish()); }
+
+ _Self& append(const _Self& __s,
+ size_type __pos, size_type __n) {
+ if (__pos > __s.size())
+ this->_M_throw_out_of_range();
+ return _M_append(__s._M_Start() + __pos,
+ __s._M_Start() + __pos + (min) (__n, __s.size() - __pos));
+ }
+
+ _Self& append(const _CharT* __s, size_type __n)
+ { _STLP_FIX_LITERAL_BUG(__s) return _M_append(__s, __s+__n); }
+ _Self& append(const _CharT* __s)
+ { _STLP_FIX_LITERAL_BUG(__s) return _M_append(__s, __s + traits_type::length(__s)); }
+ _Self& append(size_type __n, _CharT __c);
+
+public:
+ void push_back(_CharT __c) {
+ if (this->_M_rest() == 1 )
+ _M_reserve(_M_compute_next_size(1));
+ _M_construct_null(this->_M_Finish() + 1);
+ _Traits::assign(*(this->_M_Finish()), __c);
+ ++this->_M_finish;
+ }
+
+ void pop_back() {
+ _Traits::assign(*(this->_M_Finish() - 1), _M_null());
+ --this->_M_finish;
+ }
+
+public: // Assign
+ _Self& assign(const _Self& __s)
+ { return _M_assign(__s._M_Start(), __s._M_Finish()); }
+
+ _Self& assign(const _Self& __s,
+ size_type __pos, size_type __n) {
+ if (__pos > __s.size())
+ this->_M_throw_out_of_range();
+ return _M_assign(__s._M_Start() + __pos,
+ __s._M_Start() + __pos + (min) (__n, __s.size() - __pos));
+ }
+
+ _Self& assign(const _CharT* __s, size_type __n)
+ { _STLP_FIX_LITERAL_BUG(__s) return _M_assign(__s, __s + __n); }
+
+ _Self& assign(const _CharT* __s)
+ { _STLP_FIX_LITERAL_BUG(__s) return _M_assign(__s, __s + _Traits::length(__s)); }
+
+ _Self& assign(size_type __n, _CharT __c);
+
+private:
+ _Self& _M_assign(const _CharT* __f, const _CharT* __l);
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ // Helper functions for assign.
+ template <class _Integer>
+ _Self& _M_assign_dispatch(_Integer __n, _Integer __x, const __true_type& /*_Integral*/)
+ { return assign((size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ _Self& _M_assign_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*_Integral*/) {
+ pointer __cur = this->_M_Start();
+ while (__f != __l && __cur != this->_M_Finish()) {
+ _Traits::assign(*__cur, *__f);
+ ++__f;
+ ++__cur;
+ }
+ if (__f == __l)
+ erase(__cur, this->end());
+ else
+ _M_appendT(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
+ return *this;
+ }
+
+public:
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& assign(_InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_assign_dispatch(__first, __last, _Integral());
+ }
+#else
+public:
+ _Self& assign(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ return _M_assign(__f, __l);
+ }
+#endif
+
+public: // Insert
+ _Self& insert(size_type __pos, const _Self& __s) {
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ if (__s.size() > max_size() - size())
+ this->_M_throw_length_error();
+ _M_insert(begin() + __pos, __s._M_Start(), __s._M_Finish(), &__s == this);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _Self& __s,
+ size_type __beg, size_type __n) {
+ if (__pos > size() || __beg > __s.size())
+ this->_M_throw_out_of_range();
+ size_type __len = (min) (__n, __s.size() - __beg);
+ if (__len > max_size() - size())
+ this->_M_throw_length_error();
+ _M_insert(begin() + __pos,
+ __s._M_Start() + __beg, __s._M_Start() + __beg + __len, &__s == this);
+ return *this;
+ }
+ _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ if (__n > max_size() - size())
+ this->_M_throw_length_error();
+ _M_insert(begin() + __pos, __s, __s + __n, _M_inside(__s));
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ size_type __len = _Traits::length(__s);
+ if (__len > max_size() - size())
+ this->_M_throw_length_error();
+ _M_insert(this->_M_Start() + __pos, __s, __s + __len, _M_inside(__s));
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, size_type __n, _CharT __c) {
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ if (__n > max_size() - size())
+ this->_M_throw_length_error();
+ insert(begin() + __pos, __n, __c);
+ return *this;
+ }
+
+ iterator insert(iterator __p, _CharT __c) {
+ _STLP_FIX_LITERAL_BUG(__p)
+ if (__p == end()) {
+ push_back(__c);
+ return this->_M_Finish() - 1;
+ }
+ else
+ return _M_insert_aux(__p, __c);
+ }
+
+ void insert(iterator __p, size_t __n, _CharT __c);
+
+_STLP_PRIVATE: // Helper functions for insert.
+ void _M_insert(iterator __p, const _CharT* __first, const _CharT* __last, bool __self_ref);
+
+ pointer _M_insert_aux(pointer, _CharT);
+
+ void _M_copy(const _CharT* __f, const _CharT* __l, _CharT* __res) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _STLP_FIX_LITERAL_BUG(__res)
+ _Traits::copy(__res, __f, __l - __f);
+ }
+
+ void _M_move(const _CharT* __f, const _CharT* __l, _CharT* __res) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _Traits::move(__res, __f, __l - __f);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _ForwardIter>
+ void _M_insert_overflow(iterator __pos, _ForwardIter __first, _ForwardIter __last,
+ size_type __n) {
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), __pos, __new_start);
+ __new_finish = uninitialized_copy(__first, __last, __new_finish);
+ __new_finish = uninitialized_copy(__pos, this->_M_Finish(), __new_finish);
+ _M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+
+ template <class _InputIter>
+ void _M_insertT(iterator __p, _InputIter __first, _InputIter __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last; ++__first) {
+ __p = insert(__p, *__first);
+ ++__p;
+ }
+ }
+
+ template <class _ForwardIter>
+ void _M_insertT(iterator __pos, _ForwardIter __first, _ForwardIter __last,
+ const forward_iterator_tag &) {
+ if (__first != __last) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ if (__n < this->_M_rest()) {
+ const size_type __elems_after = this->_M_finish - __pos;
+ if (__elems_after >= __n) {
+ uninitialized_copy((this->_M_Finish() - __n) + 1, this->_M_Finish() + 1, this->_M_Finish() + 1);
+ this->_M_finish += __n;
+ _Traits::move(__pos + __n, __pos, (__elems_after - __n) + 1);
+ _M_copyT(__first, __last, __pos);
+ }
+ else {
+ pointer __old_finish = this->_M_Finish();
+ _ForwardIter __mid = __first;
+ _STLP_STD::advance(__mid, __elems_after + 1);
+ _STLP_STD::uninitialized_copy(__mid, __last, this->_M_Finish() + 1);
+ this->_M_finish += __n - __elems_after;
+ uninitialized_copy(__pos, __old_finish + 1, this->_M_Finish());
+ this->_M_finish += __elems_after;
+ _M_copyT(__first, __mid, __pos);
+ }
+ }
+ else {
+ _M_insert_overflow(__pos, __first, __last, __n);
+ }
+ }
+ }
+
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __p, _Integer __n, _Integer __x,
+ const __true_type& /*Integral*/)
+ { insert(__p, (size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ void _M_insert_dispatch(iterator __p, _InputIter __first, _InputIter __last,
+ const __false_type& /*Integral*/) {
+ _STLP_FIX_LITERAL_BUG(__p)
+ /* We are forced to do a temporary string to avoid the self referencing issue. */
+ const _Self __self(__first, __last, get_allocator());
+ _M_insertT(__p, __self.begin(), __self.end(), forward_iterator_tag());
+ }
+
+ template <class _InputIterator>
+ void _M_copyT(_InputIterator __first, _InputIterator __last, pointer __result) {
+ _STLP_FIX_LITERAL_BUG(__result)
+ for ( ; __first != __last; ++__first, ++__result)
+ _Traits::assign(*__result, *__first);
+ }
+
+# if !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ void _M_copyT(const _CharT* __f, const _CharT* __l, _CharT* __res) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _STLP_FIX_LITERAL_BUG(__res)
+ _Traits::copy(__res, __f, __l - __f);
+ }
+# endif
+public:
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ void insert(iterator __p, _InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ _M_insert_dispatch(__p, __first, __last, _Integral());
+ }
+# endif
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+public:
+ void insert(iterator __p, const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _M_insert(__p, __f, __l, _M_inside(__f));
+ }
+#endif
+
+public: // Erase.
+ _Self& erase(size_type __pos = 0, size_type __n = npos) {
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ erase(begin() + __pos, begin() + __pos + (min) (__n, size() - __pos));
+ return *this;
+ }
+
+ iterator erase(iterator __pos) {
+ // The move includes the terminating _CharT().
+ _Traits::move(__pos, __pos + 1, this->_M_Finish() - __pos);
+ --this->_M_finish;
+ return __pos;
+ }
+
+ iterator erase(iterator __first, iterator __last) {
+ if (__first != __last) {
+ // The move includes the terminating _CharT().
+ traits_type::move(__first, __last, (this->_M_Finish() - __last) + 1);
+ this->_M_finish = this->_M_Finish() - (__last - __first);
+ }
+ return __first;
+ }
+
+public: // Replace. (Conceptually equivalent
+ // to erase followed by insert.)
+ _Self& replace(size_type __pos, size_type __n, const _Self& __s) {
+ const size_type __size = size();
+ if (__pos > __size)
+ this->_M_throw_out_of_range();
+ const size_type __len = (min) (__n, __size - __pos);
+ if (__s.size() > max_size() - (__size - __len))
+ this->_M_throw_length_error();
+ return _M_replace(begin() + __pos, begin() + __pos + __len,
+ __s._M_Start(), __s._M_Finish(), &__s == this);
+ }
+
+ _Self& replace(size_type __pos1, size_type __n1, const _Self& __s,
+ size_type __pos2, size_type __n2) {
+ const size_type __size1 = size();
+ const size_type __size2 = __s.size();
+ if (__pos1 > __size1 || __pos2 > __size2)
+ this->_M_throw_out_of_range();
+ const size_type __len1 = (min) (__n1, __size1 - __pos1);
+ const size_type __len2 = (min) (__n2, __size2 - __pos2);
+ if (__len2 > max_size() - (__size1 - __len1))
+ this->_M_throw_length_error();
+ return _M_replace(begin() + __pos1, begin() + __pos1 + __len1,
+ __s._M_Start() + __pos2, __s._M_Start() + __pos2 + __len2, &__s == this);
+ }
+
+ _Self& replace(size_type __pos, size_type __n1,
+ const _CharT* __s, size_type __n2) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ const size_type __size = size();
+ if (__pos > __size)
+ this->_M_throw_out_of_range();
+ const size_type __len = (min) (__n1, __size - __pos);
+ if (__n2 > max_size() - (__size - __len))
+ this->_M_throw_length_error();
+ return _M_replace(begin() + __pos, begin() + __pos + __len,
+ __s, __s + __n2, _M_inside(__s));
+ }
+
+ _Self& replace(size_type __pos, size_type __n1, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return replace(__pos, __n1, __s, _Traits::length(__s));
+ }
+
+ _Self& replace(size_type __pos, size_type __n1,
+ size_type __n2, _CharT __c) {
+ const size_type __size = size();
+ if (__pos > __size)
+ this->_M_throw_out_of_range();
+ const size_type __len = (min) (__n1, __size - __pos);
+ if (__n2 > max_size() - (__size - __len))
+ this->_M_throw_length_error();
+ return replace(begin() + __pos, begin() + __pos + __len, __n2, __c);
+ }
+
+ _Self& replace(iterator __first, iterator __last, const _Self& __s) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ return _M_replace(__first, __last, __s._M_Start(), __s._M_Finish(), &__s == this);
+ }
+
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_replace(__first, __last, __s, __s + __n, _M_inside(__s));
+ }
+
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_replace(__first, __last, __s, __s + _Traits::length(__s), _M_inside(__s));
+ }
+
+ _Self& replace(iterator __first, iterator __last, size_type __n, _CharT __c);
+
+_STLP_PRIVATE: // Helper functions for replace.
+ _Self& _M_replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l, bool __self_ref);
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+ template <class _Integer>
+ _Self& _M_replace_dispatch(iterator __first, iterator __last,
+ _Integer __n, _Integer __x, const __true_type& /*IsIntegral*/) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ return replace(__first, __last, (size_type) __n, (_CharT) __x);
+ }
+
+ template <class _InputIter>
+ _Self& _M_replace_dispatch(iterator __first, iterator __last,
+ _InputIter __f, _InputIter __l, const __false_type& /*IsIntegral*/) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ /* We are forced to do a temporary string to avoid the self referencing issue. */
+ const _Self __self(__f, __l, get_allocator());
+ return _M_replace(__first, __last, __self._M_Start(), __self._M_Finish(), false);
+ }
+
+public:
+ // Check to see if _InputIter is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& replace(iterator __first, iterator __last,
+ _InputIter __f, _InputIter __l) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_replace_dispatch(__first, __last, __f, __l, _Integral());
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+public:
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ return _M_replace(__first, __last, __f, __l, _M_inside(__f));
+ }
+#endif
+
+public: // Other modifier member functions.
+
+ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ if (__pos > size())
+ this->_M_throw_out_of_range();
+ const size_type __len = (min) (__n, size() - __pos);
+ _Traits::copy(__s, this->_M_Start() + __pos, __len);
+ return __len;
+ }
+
+ void swap(_Self& __s) { this->_M_swap(__s); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public: // Conversion to C string.
+
+ const _CharT* c_str() const { return this->_M_Start(); }
+ const _CharT* data() const { return this->_M_Start(); }
+
+public: // find.
+ size_type find(const _Self& __s, size_type __pos = 0) const
+ { return find(__s._M_Start(), __pos, __s.size()); }
+
+ size_type find(const _CharT* __s, size_type __pos = 0) const
+ { _STLP_FIX_LITERAL_BUG(__s) return find(__s, __pos, _Traits::length(__s)); }
+
+ size_type find(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ // WIE: Versant schema compiler 5.2.2 ICE workaround
+ size_type find(_CharT __c) const { return find(__c, 0); }
+ size_type find(_CharT __c, size_type __pos /* = 0 */) const;
+
+public: // rfind.
+ size_type rfind(const _Self& __s, size_type __pos = npos) const
+ { return rfind(__s._M_Start(), __pos, __s.size()); }
+
+ size_type rfind(const _CharT* __s, size_type __pos = npos) const
+ { _STLP_FIX_LITERAL_BUG(__s) return rfind(__s, __pos, _Traits::length(__s)); }
+
+ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+ size_type rfind(_CharT __c, size_type __pos = npos) const;
+
+public: // find_first_of
+ size_type find_first_of(const _Self& __s, size_type __pos = 0) const
+ { return find_first_of(__s._M_Start(), __pos, __s.size()); }
+
+ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const
+ { _STLP_FIX_LITERAL_BUG(__s) return find_first_of(__s, __pos, _Traits::length(__s)); }
+
+ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ size_type find_first_of(_CharT __c, size_type __pos = 0) const
+ { return find(__c, __pos); }
+
+public: // find_last_of
+ size_type find_last_of(const _Self& __s, size_type __pos = npos) const
+ { return find_last_of(__s._M_Start(), __pos, __s.size()); }
+
+ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const
+ { _STLP_FIX_LITERAL_BUG(__s) return find_last_of(__s, __pos, _Traits::length(__s)); }
+
+ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ size_type find_last_of(_CharT __c, size_type __pos = npos) const
+ { return rfind(__c, __pos); }
+
+public: // find_first_not_of
+ size_type find_first_not_of(const _Self& __s, size_type __pos = 0) const
+ { return find_first_not_of(__s._M_Start(), __pos, __s.size()); }
+
+ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ { _STLP_FIX_LITERAL_BUG(__s) return find_first_not_of(__s, __pos, _Traits::length(__s)); }
+
+ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const;
+
+public: // find_last_not_of
+ size_type find_last_not_of(const _Self& __s, size_type __pos = npos) const
+ { return find_last_not_of(__s._M_Start(), __pos, __s.size()); }
+
+ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const
+ { _STLP_FIX_LITERAL_BUG(__s) return find_last_not_of(__s, __pos, _Traits::length(__s)); }
+
+ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const;
+
+public: // Substring.
+ _Self substr(size_type __pos = 0, size_type __n = npos) const
+ { return _Self(*this, __pos, __n, get_allocator()); }
+
+public: // Compare
+ int compare(const _Self& __s) const
+ { return _M_compare(this->_M_Start(), this->_M_Finish(), __s._M_Start(), __s._M_Finish()); }
+
+ int compare(size_type __pos1, size_type __n1, const _Self& __s) const {
+ if (__pos1 > size())
+ this->_M_throw_out_of_range();
+ return _M_compare(this->_M_Start() + __pos1,
+ this->_M_Start() + __pos1 + (min) (__n1, size() - __pos1),
+ __s._M_Start(), __s._M_Finish());
+ }
+
+ int compare(size_type __pos1, size_type __n1, const _Self& __s,
+ size_type __pos2, size_type __n2) const {
+ if (__pos1 > size() || __pos2 > __s.size())
+ this->_M_throw_out_of_range();
+ return _M_compare(this->_M_Start() + __pos1,
+ this->_M_Start() + __pos1 + (min) (__n1, size() - __pos1),
+ __s._M_Start() + __pos2,
+ __s._M_Start() + __pos2 + (min) (__n2, __s.size() - __pos2));
+ }
+
+ int compare(const _CharT* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_compare(this->_M_Start(), this->_M_Finish(), __s, __s + _Traits::length(__s));
+ }
+
+ int compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ if (__pos1 > size())
+ this->_M_throw_out_of_range();
+ return _M_compare(this->_M_Start() + __pos1,
+ this->_M_Start() + __pos1 + (min) (__n1, size() - __pos1),
+ __s, __s + _Traits::length(__s));
+ }
+
+ int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ if (__pos1 > size())
+ this->_M_throw_out_of_range();
+ return _M_compare(this->_M_Start() + __pos1,
+ this->_M_Start() + __pos1 + (min) (__n1, size() - __pos1),
+ __s, __s + __n2);
+ }
+
+public: // Helper functions for compare.
+ static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
+ const _CharT* __f2, const _CharT* __l2) {
+ const ptrdiff_t __n1 = __l1 - __f1;
+ const ptrdiff_t __n2 = __l2 - __f2;
+ const int cmp = _Traits::compare(__f1, __f2, (min) (__n1, __n2));
+ return cmp != 0 ? cmp : (__n1 < __n2 ? -1 : (__n1 > __n2 ? 1 : 0));
+ }
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION) && !defined (_STLP_DEBUG) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+# define _STLP_STRING_SUM_BASE(__reserve, __size, __alloc) _STLP_PRIV _String_base<_CharT,_Alloc>(__alloc, __size + 1)
+# include <stl/_string_sum_methods.h>
+# undef _STLP_STRING_SUM_BASE
+#endif
+};
+
+#undef _STLP_PRIVATE
+
+#if defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
+template <class _CharT, class _Traits, class _Alloc>
+const size_t basic_string<_CharT, _Traits, _Alloc>::npos = ~(size_t) 0;
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS basic_string<char, char_traits<char>, allocator<char> >;
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+#if defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+# undef basic_string
+#endif
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+# include <stl/_string_workaround.h>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// ------------------------------------------------------------
+// Non-member functions.
+// Swap.
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _CharT, class _Traits, class _Alloc>
+inline void _STLP_CALL
+swap(basic_string<_CharT,_Traits,_Alloc>& __x,
+ basic_string<_CharT,_Traits,_Alloc>& __y)
+{ __x.swap(__y); }
+#else
+inline void _STLP_CALL swap(string& __x, string& __y)
+{ __x.swap(__y); }
+# if defined (_STLP_HAS_WCHAR_T)
+inline void _STLP_CALL swap(wstring& __x, wstring& __y)
+{ __x.swap(__y); }
+# endif
+#endif
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _CharT, class _Traits, class _Alloc>
+struct __move_traits<basic_string<_CharT, _Traits, _Alloc> > {
+ typedef __true_type implemented;
+ //Completness depends on the allocator:
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+/*#else
+ * There is no need to specialize for string and wstring in this case
+ * as the default __move_traits will already tell that string is movable
+ * but not complete. We cannot define it as complete as nothing guaranty
+ * that the STLport user hasn't specialized std::allocator for char or
+ * wchar_t.
+ */
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _CharT, class _Traits, class _Alloc>
+void _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s,
+ _CharT* __buf, size_t __n);
+
+#if defined(_STLP_USE_WIDE_INTERFACE)
+// A couple of functions to transfer between ASCII/Unicode
+wstring __ASCIIToWide(const char *ascii);
+string __WideToASCII(const wchar_t *wide);
+#endif
+
+inline const char* _STLP_CALL
+__get_c_string(const string& __str) { return __str.c_str(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#include <stl/_string_operators.h>
+
+#if defined(_STLP_USE_NO_IOSTREAMS) || \
+ (defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION))
+# include <stl/_string.c>
+#endif
+
+#endif /* _STLP_INTERNAL_STRING_H */
+
+/*
+ * Local Variables:
+ * mode:C++
+ * End:
+ */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_base.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_base.h
new file mode 100644
index 0000000..7c6d7fe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_base.h
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_BASE_H
+#define _STLP_STRING_BASE_H
+
+// ------------------------------------------------------------
+// Class _String_base.
+
+// _String_base is a helper class that makes it it easier to write an
+// exception-safe version of basic_string. The constructor allocates,
+// but does not initialize, a block of memory. The destructor
+// deallocates, but does not destroy elements within, a block of
+// memory. The destructor assumes that _M_start either is null, or else
+// points to a block of memory that was allocated using _String_base's
+// allocator and whose size is _M_end_of_storage - _M_start_of_storage._M_data.
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Alloc>
+class _String_base {
+ typedef _String_base<_Tp, _Alloc> _Self;
+protected:
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+public:
+ //dums: Some compiler(MSVC6) require it to be public not simply protected!
+ enum {_DEFAULT_SIZE = 4 * sizeof( void * )};
+ //This is needed by the full move framework
+ typedef _Alloc allocator_type;
+ typedef _STLP_alloc_proxy<_Tp*, _Tp, allocator_type> _AllocProxy;
+ typedef size_t size_type;
+private:
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ union _Buffers {
+ _Tp* _M_end_of_storage;
+ _Tp _M_static_buf[_DEFAULT_SIZE];
+ } _M_buffers;
+#else
+ _Tp* _M_end_of_storage;
+#endif /* _STLP_USE_SHORT_STRING_OPTIM */
+protected:
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ bool _M_using_static_buf() const
+ { return (_M_start_of_storage._M_data == _M_buffers._M_static_buf); }
+ _Tp const* _M_Start() const { return _M_start_of_storage._M_data; }
+ _Tp* _M_Start() { return _M_start_of_storage._M_data; }
+ _Tp const* _M_End() const
+ { return _M_using_static_buf() ? _M_buffers._M_static_buf + _DEFAULT_SIZE : _M_buffers._M_end_of_storage; }
+ _Tp* _M_End()
+ { return _M_using_static_buf() ? _M_buffers._M_static_buf + _DEFAULT_SIZE : _M_buffers._M_end_of_storage; }
+ size_type _M_capacity() const
+ { return _M_using_static_buf() ? _DEFAULT_SIZE : _M_buffers._M_end_of_storage - _M_start_of_storage._M_data; }
+ size_type _M_rest() const
+ { return _M_using_static_buf() ? _DEFAULT_SIZE - (_M_finish - _M_buffers._M_static_buf) : _M_buffers._M_end_of_storage - _M_finish; }
+#else
+ _Tp const* _M_Start() const { return _M_start_of_storage._M_data; }
+ _Tp* _M_Start() { return _M_start_of_storage._M_data; }
+ _Tp const* _M_End() const { return _M_end_of_storage; }
+ _Tp* _M_End() { return _M_end_of_storage; }
+ size_type _M_capacity() const
+ { return _M_end_of_storage - _M_start_of_storage._M_data; }
+ size_type _M_rest() const
+ { return _M_end_of_storage - _M_finish; }
+#endif /* _STLP_USE_SHORT_STRING_OPTIM */
+
+ _Tp* _M_finish;
+ _AllocProxy _M_start_of_storage;
+
+ _Tp const* _M_Finish() const {return _M_finish;}
+ _Tp* _M_Finish() {return _M_finish;}
+
+ // Precondition: 0 < __n <= max_size().
+ void _M_allocate_block(size_t __n = _DEFAULT_SIZE);
+ void _M_deallocate_block() {
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ if (!_M_using_static_buf() && (_M_start_of_storage._M_data != 0))
+ _M_start_of_storage.deallocate(_M_start_of_storage._M_data, _M_buffers._M_end_of_storage - _M_start_of_storage._M_data);
+#else
+ if (_M_start_of_storage._M_data != 0)
+ _M_start_of_storage.deallocate(_M_start_of_storage._M_data, _M_end_of_storage - _M_start_of_storage._M_data);
+#endif /* _STLP_USE_SHORT_STRING_OPTIM */
+ }
+
+ size_t max_size() const {
+ const size_type __string_max_size = size_type(-1) / sizeof(_Tp);
+ typename allocator_type::size_type __alloc_max_size = _M_start_of_storage.max_size();
+ return (min)(__alloc_max_size, __string_max_size) - 1;
+ }
+
+ _String_base(const allocator_type& __a)
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ : _M_finish(_M_buffers._M_static_buf), _M_start_of_storage(__a, _M_buffers._M_static_buf)
+#else
+ : _M_end_of_storage(0), _M_finish(0), _M_start_of_storage(__a, (_Tp*)0)
+#endif
+ {}
+
+ _String_base(const allocator_type& __a, size_t __n)
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ : _M_finish(_M_buffers._M_static_buf), _M_start_of_storage(__a, _M_buffers._M_static_buf) {
+#else
+ : _M_end_of_storage(0), _M_finish(0), _M_start_of_storage(__a, (_Tp*)0) {
+#endif
+ _M_allocate_block(__n);
+ }
+
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ void _M_move_src (_Self &src) {
+ if (src._M_using_static_buf()) {
+ _M_buffers = src._M_buffers;
+ _M_finish = _M_buffers._M_static_buf + (src._M_finish - src._M_start_of_storage._M_data);
+ _M_start_of_storage._M_data = _M_buffers._M_static_buf;
+ }
+ else {
+ _M_start_of_storage._M_data = src._M_start_of_storage._M_data;
+ _M_finish = src._M_finish;
+ _M_buffers._M_end_of_storage = src._M_buffers._M_end_of_storage;
+ src._M_start_of_storage._M_data = 0;
+ }
+ }
+#endif
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _String_base(__move_source<_Self> src)
+# if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ : _M_start_of_storage(__move_source<_AllocProxy>(src.get()._M_start_of_storage)) {
+ _M_move_src(src.get());
+# else
+ : _M_end_of_storage(src.get()._M_end_of_storage), _M_finish(src.get()._M_finish),
+ _M_start_of_storage(__move_source<_AllocProxy>(src.get()._M_start_of_storage)) {
+ src.get()._M_start_of_storage._M_data = 0;
+# endif
+ }
+#endif
+
+ ~_String_base() { _M_deallocate_block(); }
+
+ void _M_reset(_Tp *__start, _Tp *__finish, _Tp *__end_of_storage) {
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ _M_buffers._M_end_of_storage = __end_of_storage;
+#else
+ _M_end_of_storage = __end_of_storage;
+#endif
+ _M_finish = __finish;
+ _M_start_of_storage._M_data = __start;
+ }
+
+ void _M_swap(_Self &__s) {
+#if defined (_STLP_USE_SHORT_STRING_OPTIM)
+ if (_M_using_static_buf()) {
+ if (__s._M_using_static_buf()) {
+ _STLP_STD::swap(_M_buffers, __s._M_buffers);
+ _Tp *__tmp = _M_finish;
+ _M_finish = _M_start_of_storage._M_data + (__s._M_finish - __s._M_start_of_storage._M_data);
+ __s._M_finish = __s._M_buffers._M_static_buf + (__tmp - _M_start_of_storage._M_data);
+ //We need to swap _M_start_of_storage for allocators with state:
+ _M_start_of_storage.swap(__s._M_start_of_storage);
+ _M_start_of_storage._M_data = _M_buffers._M_static_buf;
+ __s._M_start_of_storage._M_data = __s._M_buffers._M_static_buf;
+ } else {
+ __s._M_swap(*this);
+ return;
+ }
+ }
+ else if (__s._M_using_static_buf()) {
+ _Tp *__tmp = _M_start_of_storage._M_data;
+ _Tp *__tmp_finish = _M_finish;
+ _Tp *__tmp_end_data = _M_buffers._M_end_of_storage;
+ _M_buffers = __s._M_buffers;
+ //We need to swap _M_start_of_storage for allocators with state:
+ _M_start_of_storage.swap(__s._M_start_of_storage);
+ _M_start_of_storage._M_data = _M_buffers._M_static_buf;
+ _M_finish = _M_buffers._M_static_buf + (__s._M_finish - __s._M_buffers._M_static_buf);
+ __s._M_buffers._M_end_of_storage = __tmp_end_data;
+ __s._M_start_of_storage._M_data = __tmp;
+ __s._M_finish = __tmp_finish;
+ }
+ else {
+ _STLP_STD::swap(_M_buffers._M_end_of_storage, __s._M_buffers._M_end_of_storage);
+ _M_start_of_storage.swap(__s._M_start_of_storage);
+ _STLP_STD::swap(_M_finish, __s._M_finish);
+ }
+#else
+ _STLP_STD::swap(_M_end_of_storage, __s._M_end_of_storage);
+ _M_start_of_storage.swap(__s._M_start_of_storage);
+ _STLP_STD::swap(_M_finish, __s._M_finish);
+#endif
+ }
+
+ void _STLP_FUNCTION_THROWS _M_throw_length_error() const;
+ void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const;
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _String_base<char, allocator<char> >;
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS _String_base<wchar_t, allocator<wchar_t> >;
+# endif
+#endif /* _STLP_USE_TEMPLATE_EXPORT */
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_STRING_BASE_H */
+
+/*
+ * Local Variables:
+ * mode:C++
+ * End:
+ */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_fwd.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_fwd.h
new file mode 100644
index 0000000..fe65385
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_fwd.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_FWD_H
+#define _STLP_STRING_FWD_H
+
+#ifndef _STLP_INTERNAL_IOSFWD
+# include <stl/_iosfwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _CharT,
+ class _Traits = char_traits<_CharT>,
+ class _Alloc = allocator<_CharT> >
+class basic_string;
+#else
+template <class _CharT,
+ class _Traits,
+ class _Alloc>
+class basic_string;
+#endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
+
+typedef basic_string<char, char_traits<char>, allocator<char> > string;
+
+#if defined (_STLP_HAS_WCHAR_T)
+typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+//This function limits header dependency between exception and string
+//implementation. It is implemented in _string.h
+const char* _STLP_CALL __get_c_string(const string& __str);
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_STRING_FWD_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_hash.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_hash.h
new file mode 100644
index 0000000..87f2d9f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_hash.h
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_HASH_H
+#define _STLP_STRING_HASH_H
+
+#ifndef _STLP_HASH_FUN_H
+# include <stl/_hash_fun.h>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _Traits, class _Alloc>
+_STLP_INLINE_LOOP size_t
+__stl_string_hash(const basic_string<_CharT,_Traits,_Alloc>& __s) {
+ unsigned long __h = 0;
+ size_t __len = __s.size();
+ const _CharT* __data = __s.data();
+ for ( size_t __i = 0; __i < __len; ++__i)
+ __h = /* 5 *__h */(__h << 2) + __h + __data[__i];
+ return size_t(__h);
+}
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && \
+ (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x560))
+template <class _CharT, class _Traits, class _Alloc>
+struct hash<basic_string<_CharT,_Traits,_Alloc> > {
+ size_t operator()(const basic_string<_CharT,_Traits,_Alloc>& __s) const
+ { return __stl_string_hash(__s); }
+};
+
+#else
+
+_STLP_TEMPLATE_NULL
+struct _STLP_CLASS_DECLSPEC hash<string> {
+ size_t operator()(const string& __s) const
+ { return __stl_string_hash(__s); }
+};
+
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_TEMPLATE_NULL
+struct _STLP_CLASS_DECLSPEC hash<wstring> {
+ size_t operator()(const wstring& __s) const
+ { return __stl_string_hash(__s); }
+};
+# endif
+
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_io.c b/6/sources/cxx-stl/stlport/stlport/stl/_string_io.c
new file mode 100644
index 0000000..84b1873
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_io.c
@@ -0,0 +1,172 @@
+#ifndef _STLP_STRING_IO_C
+#define _STLP_STRING_IO_C
+
+#ifndef _STLP_STRING_IO_H
+# include <stl/_string_io.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CTYPE_H
+# include <stl/_ctype.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _Traits>
+bool _STLP_CALL
+__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os,
+ basic_streambuf<_CharT, _Traits>* __buf,
+ streamsize __n) {
+ _CharT __f = __os.fill();
+ for (streamsize __i = 0; __i < __n; ++__i) {
+ if (_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof()))
+ return false;
+ }
+ return true;
+}
+
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator << (basic_ostream<_CharT, _Traits>& __os,
+ const basic_string<_CharT,_Traits,_Alloc>& __s) {
+ typedef basic_ostream<_CharT, _Traits> __ostream;
+ typedef typename basic_string<_CharT, _Traits, _Alloc>::size_type size_type;
+
+ // The hypothesis of this implementation is that size_type is unsigned:
+ _STLP_STATIC_ASSERT(__STATIC_CAST(size_type, -1) > 0)
+
+ typename __ostream::sentry __sentry(__os);
+ bool __ok = false;
+
+ if (__sentry) {
+ __ok = true;
+ size_type __n = __s.size();
+ const bool __left = (__os.flags() & __ostream::left) != 0;
+ const streamsize __w = __os.width(0);
+ basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf();
+
+ const bool __need_pad = (((sizeof(streamsize) > sizeof(size_t)) && (__STATIC_CAST(streamsize, __n) < __w)) ||
+ ((sizeof(streamsize) <= sizeof(size_t)) && (__n < __STATIC_CAST(size_t, __w))));
+ streamsize __pad_len = __need_pad ? __w - __n : 0;
+
+ if (!__left)
+ __ok = __stlp_string_fill(__os, __buf, __pad_len);
+
+ __ok = __ok && (__buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n));
+
+ if (__left)
+ __ok = __ok && __stlp_string_fill(__os, __buf, __pad_len);
+ }
+
+ if (!__ok)
+ __os.setstate(__ostream::failbit);
+
+ return __os;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator >> (basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT,_Traits, _Alloc>& __s) {
+ typedef basic_istream<_CharT, _Traits> __istream;
+ typedef typename basic_string<_CharT, _Traits, _Alloc>::size_type size_type;
+
+ // The hypothesis of this implementation is that size_type is unsigned:
+ _STLP_STATIC_ASSERT(__STATIC_CAST(size_type, -1) > 0)
+
+ typename __istream::sentry __sentry(__is);
+
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+ typedef ctype<_CharT> _C_type;
+
+ const locale& __loc = __is.getloc();
+ const _C_type& _Ctype = use_facet<_C_type>(__loc);
+ __s.clear();
+ streamsize __width = __is.width(0);
+ size_type __n;
+ if (__width <= 0)
+ __n = __s.max_size();
+ /* __width can only overflow size_type if sizeof(streamsize) > sizeof(size_type)
+ * because here we know that __width is positive and the stattic assertion check
+ * that size_type is unsigned.
+ */
+ else if (sizeof(streamsize) > sizeof(size_type) &&
+ (__width > __STATIC_CAST(streamsize, __s.max_size())))
+ __n = 0;
+ else {
+ __n = __STATIC_CAST(size_type, __width);
+ __s.reserve(__n);
+ }
+
+ while (__n-- > 0) {
+ typename _Traits::int_type __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, _Traits::eof())) {
+ __is.setstate(__istream::eofbit);
+ break;
+ }
+ else {
+ _CharT __c = _Traits::to_char_type(__c1);
+
+ if (_Ctype.is(_C_type::space, __c)) {
+ if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof()))
+ __is.setstate(__istream::failbit);
+ break;
+ }
+ else
+ __s.push_back(__c);
+ }
+ }
+
+ // If we have read no characters, then set failbit.
+ if (__s.empty())
+ __is.setstate(__istream::failbit);
+ }
+ else
+ __is.setstate(__istream::failbit);
+
+ return __is;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT,_Traits,_Alloc>& __s,
+ _CharT __delim) {
+ typedef basic_istream<_CharT, _Traits> __istream;
+ typedef typename basic_string<_CharT, _Traits, _Alloc>::size_type size_type;
+ size_type __nread = 0;
+ typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true);
+ if (__sentry) {
+ basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+ __s.clear();
+
+ while (__nread < __s.max_size()) {
+ int __c1 = __buf->sbumpc();
+ if (_Traits::eq_int_type(__c1, _Traits::eof())) {
+ __is.setstate(__istream::eofbit);
+ break;
+ }
+ else {
+ ++__nread;
+ _CharT __c = _Traits::to_char_type(__c1);
+ if (!_Traits::eq(__c, __delim))
+ __s.push_back(__c);
+ else
+ break; // Character is extracted but not appended.
+ }
+ }
+ }
+ if (__nread == 0 || __nread >= __s.max_size())
+ __is.setstate(__istream::failbit);
+
+ return __is;
+}
+
+_STLP_END_NAMESPACE
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_io.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_io.h
new file mode 100644
index 0000000..fe549fe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_io.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_IO_H
+#define _STLP_STRING_IO_H
+
+#ifndef _STLP_INTERNAL_OSTREAM_H
+# include <stl/_ostream.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h>
+#endif
+
+// I/O.
+_STLP_BEGIN_NAMESPACE
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const basic_string<_CharT,_Traits,_Alloc>& __s);
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+basic_ostream<_CharT, _Traits>& _STLP_CALL
+operator<<(basic_ostream<_CharT, _Traits>& __os,
+ const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __sum) {
+ basic_string<_CharT, _Traits, _Alloc> __tmp(__sum);
+ return __os << __tmp;
+}
+
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+operator>>(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT,_Traits,_Alloc>& __s);
+
+template <class _CharT, class _Traits, class _Alloc>
+basic_istream<_CharT, _Traits>& _STLP_CALL
+getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT,_Traits,_Alloc>& __s,
+ _CharT __delim);
+
+#if !(defined (__BORLANDC__) && !defined (_STLP_USE_OWN_NAMESPACE))
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_istream<_CharT, _Traits>& _STLP_CALL
+getline(basic_istream<_CharT, _Traits>& __is,
+ basic_string<_CharT,_Traits,_Alloc>& __s) {
+ return getline(__is, __s, __is.widen('\n'));
+}
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_string_io.c>
+#endif
+
+#endif /* _STLP_STRING_IO_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_npos.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_npos.h
new file mode 100644
index 0000000..faa9c62
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_npos.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+/* This header contains npos definition used in basic_string and rope
+ * implementation. It do not have to be guarded as files including it
+ * are already guarded and it has sometimes to be included several times.
+ */
+
+#if defined (_STLP_STATIC_CONST_INIT_BUG)
+ enum { npos = -1 };
+#elif defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
+ // inline initializer conflicts with 'extern template'
+ static const size_t npos;
+#else
+ static const size_t npos = ~(size_t)0;
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_operators.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_operators.h
new file mode 100644
index 0000000..cff13af
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_operators.h
@@ -0,0 +1,602 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_OPERATORS_H
+#define _STLP_STRING_OPERATORS_H
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined (_STLP_USE_TEMPLATE_EXPRESSION)
+
+# if defined (__GNUC__) || defined (__MLCCPP__)
+# define _STLP_INIT_AMBIGUITY 1
+# endif
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ typedef basic_string<_CharT,_Traits,_Alloc> _Str;
+ typedef typename _Str::_Reserve_t _Reserve_t;
+# if defined (_STLP_INIT_AMBIGUITY)
+ // gcc counts this as a function
+ _Str __result = _Str(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator());
+# else
+ _Str __result(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator());
+# endif
+ __result.append(__s);
+ __result.append(__y);
+ return __result;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
+operator+(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ typedef basic_string<_CharT,_Traits,_Alloc> _Str;
+ typedef typename _Str::_Reserve_t _Reserve_t;
+ const size_t __n = _Traits::length(__s);
+# if defined (_STLP_INIT_AMBIGUITY)
+ _Str __result = _Str(_Reserve_t(), __n + __y.size(), __y.get_allocator());
+# else
+ _Str __result(_Reserve_t(), __n + __y.size(), __y.get_allocator());
+# endif
+ __result.append(__s, __s + __n);
+ __result.append(__y);
+ return __result;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
+operator+(_CharT __c,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ typedef basic_string<_CharT,_Traits,_Alloc> _Str;
+ typedef typename _Str::_Reserve_t _Reserve_t;
+# if defined (_STLP_INIT_AMBIGUITY)
+ _Str __result = _Str(_Reserve_t(), 1 + __y.size(), __y.get_allocator());
+# else
+ _Str __result(_Reserve_t(), 1 + __y.size(), __y.get_allocator());
+# endif
+ __result.push_back(__c);
+ __result.append(__y);
+ return __result;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ typedef basic_string<_CharT,_Traits,_Alloc> _Str;
+ typedef typename _Str::_Reserve_t _Reserve_t;
+ const size_t __n = _Traits::length(__s);
+# if defined (_STLP_INIT_AMBIGUITY)
+ _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator());
+# else
+ _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator());
+# endif
+ __result.append(__x);
+ __result.append(__s, __s + __n);
+ return __result;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT __c) {
+ typedef basic_string<_CharT,_Traits,_Alloc> _Str;
+ typedef typename _Str::_Reserve_t _Reserve_t;
+# if defined (_STLP_INIT_AMBIGUITY)
+ _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator());
+# else
+ _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator());
+# endif
+ __result.append(__x);
+ __result.push_back(__c);
+ return __result;
+}
+
+# undef _STLP_INIT_AMBIGUITY
+
+#else /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+// addition with basic_string
+template <class _CharT, class _Traits, class _Alloc>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs,
+ const basic_string<_CharT,_Traits,_Alloc>& __rhs) {
+ typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right> __root_type;
+ __root_type __root(__rhs, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__lhs.get_allocator()));
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ __root_type,
+ _STLP_PRIV __on_right>(__lhs, __root);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs,
+ const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __rhs) {
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right>(__lhs, __rhs);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __on_left> _STLP_CALL
+operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __lhs,
+ const basic_string<_CharT,_Traits,_Alloc>& __rhs) {
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __on_left>(__lhs, __rhs);
+}
+
+// addition with C string
+template <class _CharT, class _Traits, class _Alloc>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ const size_t __n = _Traits::length(__s);
+ typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right> __root_type;
+ __root_type __root(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator()));
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ __root_type, _STLP_PRIV __on_right>(__x, __root);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ const size_t __n = _Traits::length(__s);
+ typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right> __root_type;
+ __root_type __root(__y, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__y.get_allocator()));
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>,
+ __root_type,
+ _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __root);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __on_left> _STLP_CALL
+operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x,
+ const _CharT* __s) {
+ const size_t __n = _Traits::length(__s);
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __on_left>(__x, _STLP_PRIV __cstr_wrapper<_CharT>(__s, __n));
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __y) {
+ const size_t __n = _Traits::length(__s);
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __y);
+}
+
+// addition with char
+template <class _CharT, class _Traits, class _Alloc>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, const _CharT __c) {
+ typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right> __root_type;
+ __root_type __root(__c, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator()));
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ __root_type, _STLP_PRIV __on_right>(__x, __root);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const _CharT __c, const basic_string<_CharT,_Traits,_Alloc>& __x) {
+ typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>,
+ _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>,
+ _STLP_PRIV __on_right> __root_type;
+ __root_type __root(__x, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator()));
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>,
+ __root_type, _STLP_PRIV __on_right>(__c, __root);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __on_left> _STLP_CALL
+operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, const _CharT __c) {
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __char_wrapper<_CharT>, _STLP_PRIV __on_left>(__x, __c);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
+inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right> _STLP_CALL
+operator+(const _CharT __c, const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x) {
+ return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>,
+ _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>,
+ _STLP_PRIV __on_right>(__c, __x);
+}
+
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+// Operator== and operator!=
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0;
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0;
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator==(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0;
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator==(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0;
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+// Operator< (and also >, <=, and >=).
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()) < 0;
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()) < 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(),
+ __y.begin(), __y.end()) < 0;
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n,
+ __y.begin(), __y.end()) < 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(),
+ __s, __s + __n) < 0;
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n,
+ __y.begin(), __y.end()) < 0;
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ size_t __n = _Traits::length(__s);
+ return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(),
+ __s, __s + __n) < 0;
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE)
+
+/* Only defined if _STLP_USE_SEPARATE_RELOPS_NAMESPACE is defined otherwise
+ * it might introduce ambiguity with pure template relational operators
+ * from rel_ops namespace.
+ */
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y)
+{ return !(__x == __y); }
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y)
+{ return __y < __x; }
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y)
+{ return !(__y < __x); }
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y)
+{ return !(__x < __y); }
+
+# if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const basic_string<_CharT,_Traits,_Alloc>& __y)
+{ return !(__x==__y); }
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y)
+{ return !(__x==__y); }
+# endif
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator!=(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s == __y);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__x == __s);
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator!=(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s == __y);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__x == __s);
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return __y < __s;
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return __s < __x;
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator>(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return __y < __s;
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator>(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return __s < __x;
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<=(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__y < __s);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s < __x);
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<=(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__y < __s);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator<=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s < __x);
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>=(const _CharT* __s,
+ const basic_string<_CharT,_Traits,_Alloc>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s < __y);
+}
+
+template <class _CharT, class _Traits, class _Alloc>
+inline bool _STLP_CALL
+operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__x < __s);
+}
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator>=(const _CharT* __s,
+ const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__s < __y);
+}
+
+template <class _CharT, class _Traits, class _Alloc, class _Lhs, class _Rhs, class _StoreDir>
+inline bool _STLP_CALL
+operator>=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return !(__x < __s);
+}
+#endif /* _STLP_USE_TEMPLATE_EXPRESSION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_STRING_OPERATORS_H */
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_sum.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_sum.h
new file mode 100644
index 0000000..739d288
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_sum.h
@@ -0,0 +1,414 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING_SUM_H
+#define _STLP_STRING_SUM_H
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/*char wrapper to simulate basic_string*/
+template <class _CharT>
+struct __char_wrapper {
+ typedef const _CharT& const_reference;
+
+ __char_wrapper(_CharT __val) : _Val(__val) {}
+
+ _CharT getValue() const { return _Val; }
+ size_t size() const { return 1; }
+
+ const_reference operator[] (size_t __n) const {
+ //To avoid a check on __n we use this strange implementation
+ return (&_Val)[__n];
+ }
+
+private:
+ _CharT _Val;
+};
+
+/*C string wrapper to simulate basic_string*/
+template <class _CharT>
+struct __cstr_wrapper {
+ typedef const _CharT& const_reference;
+
+ __cstr_wrapper(const _CharT *__cstr, size_t __size) :
+ _CStr(__cstr), _Size(__size) {}
+
+ const _CharT* c_str() const { return _CStr; }
+
+ size_t size() const { return _Size; }
+
+ const_reference operator[] (size_t __n) const { return _CStr[__n]; }
+
+private:
+ const _CharT *_CStr;
+ size_t _Size;
+};
+
+/*basic_string wrapper to ensure that we only store a reference to the original string and not copy it*/
+template <class _CharT, class _Traits, class _Alloc>
+struct __bstr_wrapper {
+ typedef const _CharT& const_reference;
+ typedef basic_string<_CharT, _Traits, _Alloc> _BString;
+
+ __bstr_wrapper (_BString const& __s) :
+ _BStr(__s) {}
+
+ size_t size() const { return _BStr.size(); }
+
+ const_reference operator[] (size_t __n) const { return _BStr[__n]; }
+
+ _BString const& b_str() const { return _BStr; }
+
+private:
+ _BString const& _BStr;
+};
+
+struct __on_left {};
+struct __on_right {};
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Left, class _Right,
+ class _StorageDirection>
+class __bstr_sum {
+public:
+ typedef basic_string<_CharT, _Traits, _Alloc> _BString;
+ typedef typename _BString::const_reference const_reference;
+ typedef typename _BString::const_iterator const_iterator;
+ typedef typename _BString::const_reverse_iterator const_reverse_iterator;
+ typedef typename _BString::size_type size_type;
+ typedef typename _BString::allocator_type allocator_type;
+ typedef __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDirection> _Self;
+
+ __bstr_sum (_Left const& lhs, _Right const& rhs) :
+ _lhs(lhs), _rhs(rhs) {}
+
+ _Left const& getLhs() const { return _lhs; }
+ _Right const& getRhs() const { return _rhs; }
+
+ allocator_type get_allocator() const { return _M_get_storage(false).get_allocator(); }
+
+ const_iterator begin() const { return _M_get_storage().begin(); }
+ const_iterator end() const { return _M_get_storage().end(); }
+ const_reverse_iterator rbegin() const { return _M_get_storage().rbegin(); }
+ const_reverse_iterator rend() const { return _M_get_storage().rend(); }
+
+ size_type size() const { return _lhs.size() + _rhs.size(); }
+ size_type length() const { return size(); }
+
+ size_t max_size() const { return _M_get_storage().max_size(); }
+ size_type capacity() const { return size(); }
+ bool empty() const { return size() == 0; }
+
+ const_reference operator[](size_t __n) const
+ { return (__n < _lhs.size())?_lhs[__n]:_rhs[__n - _lhs.size()]; }
+
+ const_reference at(size_type __n) const
+ { return _M_get_storage().at(__n); }
+
+ //operator +=
+ typedef __bstr_sum<_CharT, _Traits, _Alloc, _Self, __bstr_wrapper<_CharT, _Traits, _Alloc>, __on_left> _BStrOnLeft;
+ _BStrOnLeft operator += (const _BString& __s) { return append(__s); }
+
+ typedef __bstr_sum<_CharT, _Traits, _Alloc, _Self, __cstr_wrapper<_CharT>, __on_left> _CStrOnLeft;
+ _CStrOnLeft operator += (const _CharT* __s) { return append(__s); }
+
+ typedef __bstr_sum<_CharT, _Traits, _Alloc, _Self, __char_wrapper<_CharT>, __on_left> _CharOnLeft;
+ _CharOnLeft operator += (_CharT __c) { return _CharOnLeft(*this, __c); }
+
+ //append
+ _BStrOnLeft append (const _BString& __s)
+ { return _BStrOnLeft(*this, __s); }
+ _BString& append(const _BString& __s, size_type __pos, size_type __n)
+ { return _M_get_storage().append(__s, __pos, __n); }
+ _CStrOnLeft append(const _CharT* __s) {
+ const size_type __n = _Traits::length(__s);
+ return _CStrOnLeft(*this, __cstr_wrapper<_CharT>(__s, __n));
+ }
+ _CStrOnLeft append(const _CharT* __s, size_type __n)
+ { return _CStrOnLeft(*this, __cstr_wrapper<_CharT>(__s, __n)); }
+ _BString& append(size_type __n, _CharT __c)
+ {return _M_get_storage().append(__n, __c);}
+ template <class _InputIter>
+ _BString& append(_InputIter __first, _InputIter __last)
+ {return _M_get_storage().append(__first, __last);}
+
+ //assign
+ _BString& assign(const _BString& __s) {return _M_get_storage().assign(__s);}
+ _BString& assign(const _BString& __s, size_type __pos, size_type __n) {return _M_get_storage().assign(__s, __pos, __n);}
+ _BString& assign(const _CharT* __s, size_type __n) {return _M_get_storage().assign(__s, __n);}
+ _BString& assign(const _CharT* __s) {return _M_get_storage().assign(__s); }
+ _BString& assign(size_type __n, _CharT __c) {return _M_get_storage().assign(__n, __c);}
+
+ //insert
+ _BString& insert(size_type __pos, const _BString& __s) {return _M_get_storage().insert(__pos, __s);}
+ _BString& insert(size_type __pos, const _BString& __s, size_type __beg, size_type __n)
+ {return _M_get_storage().insert(__pos, __s, __beg, __n);}
+ _BString& insert(size_type __pos, const _CharT* __s, size_type __n) {return _M_get_storage().insert(__pos, __s, __n);}
+ _BString& insert(size_type __pos, const _CharT* __s) {return _M_get_storage().insert(__pos, __s);}
+ _BString& insert(size_type __pos, size_type __n, _CharT __c) {return _M_get_storage().insert(__pos, __n, __c);}
+
+ //erase
+ _BString& erase(size_type __pos = 0, size_type __n =_BString::npos) {return _M_get_storage().erase(__pos, __n);}
+
+ //replace
+ _BString& replace(size_type __pos, size_type __n, const _BString& __s)
+ {return _M_get_storage().replace(__pos, __n, __s);}
+ _BString& replace(size_type __pos1, size_type __n1, const _BString& __s, size_type __pos2, size_type __n2)
+ {return _M_get_storage().replace(__pos1, __n1, __s, __pos2, __n2);}
+ _BString& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2)
+ {return _M_get_storage().replace(__pos, __n1, __s, __n2);}
+ _BString& replace(size_type __pos, size_type __n1, const _CharT* __s)
+ {return _M_get_storage().replace(__pos, __n1, __s);}
+ _BString& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+ {return _M_get_storage().replace(__pos, __n1, __n2, __c);}
+
+ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
+ {return _M_get_storage().copy(__s, __n, __pos);}
+
+ void swap(_BString& __s)
+ {_M_get_storage().swap(__s);}
+
+ const _CharT* c_str() const { return _M_get_storage().c_str(); }
+ const _CharT* data() const { return _M_get_storage().data(); }
+
+ //find family
+ size_type find(const _BString& __s, size_type __pos = 0) const { return _M_get_storage().find(__s, __pos); }
+ size_type find(const _CharT* __s, size_type __pos = 0) const { return _M_get_storage().find(__s, __pos); }
+ size_type find(const _CharT* __s, size_type __pos, size_type __n) const { return _M_get_storage().find(__s, __pos, __n); }
+ size_type find(_CharT __c, size_type __pos = 0) const { return _M_get_storage().find(__c, __pos); }
+
+ size_type rfind(const _BString& __s, size_type __pos = _BString::npos) const { return _M_get_storage().rfind(__s, __pos); }
+ size_type rfind(const _CharT* __s, size_type __pos = _BString::npos) const { return _M_get_storage().rfind(__s, __pos); }
+ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const { return _M_get_storage().rfind(__s, __pos, __n); }
+ size_type rfind(_CharT __c, size_type __pos = _BString::npos) const { return _M_get_storage().rfind(__c, __pos); }
+
+ size_type find_first_of(const _BString& __s, size_type __pos = 0) const
+ { return _M_get_storage().find_first_of(__s, __pos); }
+ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const
+ { return _M_get_storage().find_first_of(__s, __pos); }
+ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+ { return _M_get_storage().find_first_of(__s, __pos, __n); }
+ size_type find_first_of(_CharT __c, size_type __pos = 0) const
+ { return _M_get_storage().find(__c, __pos); }
+
+ size_type find_last_of(const _BString& __s, size_type __pos = _BString::npos) const
+ { return _M_get_storage().find_last_of(__s, __pos); }
+ size_type find_last_of(const _CharT* __s, size_type __pos = _BString::npos) const
+ { return _M_get_storage().find_last_of(__s, __pos); }
+ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+ { return _M_get_storage().find_last_of(__s, __pos, __n); }
+ size_type find_last_of(_CharT __c, size_type __pos = _BString::npos) const
+ { return _M_get_storage().rfind(__c, __pos); }
+
+ size_type find_first_not_of(const _BString& __s, size_type __pos = 0) const
+ { return _M_get_storage().find_first_not_of(__s, __pos); }
+ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+ { return _M_get_storage().find_first_not_of(__s, __pos); }
+ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ { return _M_get_storage().find_first_not_of(__s, __pos, __n); }
+ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const
+ { return _M_get_storage().find_first_not_of(__c, __pos); }
+
+ size_type find_last_not_of(const _BString& __s, size_type __pos = _BString::npos) const
+ { return _M_get_storage().find_last_not_of(__s, __pos); }
+ size_type find_last_not_of(const _CharT* __s, size_type __pos =_BString:: npos) const
+ { return _M_get_storage().find_last_not_of(__s, __pos); }
+ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+ { return _M_get_storage().find_last_not_of(__s, __pos, __n); }
+ size_type find_last_not_of(_CharT __c, size_type __pos = _BString::npos) const
+ { return _M_get_storage().find_last_not_of(__c, __pos); }
+
+ _BString substr(size_type __pos = 0, size_type __n = _BString::npos) const
+ { return _M_get_storage().substr(__pos, __n); }
+
+ //compare
+ int compare(const _BString& __s) const
+ { return _M_get_storage().compare(__s); }
+ int compare(size_type __pos1, size_type __n1, const _Self& __s) const
+ { return _M_get_storage().compare(__pos1, __n1, __s); }
+ int compare(size_type __pos1, size_type __n1, const _Self& __s, size_type __pos2, size_type __n2) const
+ { return _M_get_storage().compare(__pos1, __n1, __s, __pos2, __n2); }
+ int compare(const _CharT* __s) const
+ { return _M_get_storage().compare(__s); }
+ int compare(size_type __pos1, size_type __n1, const _CharT* __s) const
+ { return _M_get_storage().compare(__pos1, __n1, __s); }
+ int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const
+ { return _M_get_storage().compare(__pos1, __n1, __s, __n2); }
+
+ //Returns the underlying basic_string representation of the template expression
+ //The non const method will always initialise it.
+ _BString& _M_get_storage()
+ { return _rhs._M_get_storage(*this, _StorageDirection()); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref,
+ __on_left const& /*StorageDir*/)
+ { return _lhs._M_get_storage(__ref); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref,
+ __on_right const& /*StorageDir*/)
+ { return _rhs._M_get_storage(__ref); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref)
+ { return _M_get_storage(__ref, _StorageDirection()); }
+
+ //The const method can be invoked without initialising the basic_string so avoiding dynamic allocation.
+ _BString const& _M_get_storage(bool __do_init = true) const
+ { return _M_get_storage(*this, __do_init, _StorageDirection()); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString const& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref,
+ bool __do_init, __on_left const& /*StorageDir*/) const
+ { return _lhs._M_get_storage(__ref, __do_init); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString const& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref,
+ bool __do_init, __on_right const& /*StorageDir*/) const
+ { return _rhs._M_get_storage(__ref, __do_init); }
+
+ template <class _Lhs, class _Rhs, class _StorageDir>
+ _BString const& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Lhs, _Rhs, _StorageDir> const& __ref,
+ bool __do_init) const
+ { return _M_get_storage(__ref, __do_init, _StorageDirection()); }
+
+private:
+ _Left _lhs;
+ _Right _rhs;
+};
+
+/*
+ * For this operator we choose to use the right part as the storage part
+ */
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline __bstr_sum<_CharT, _Traits, _Alloc,
+ __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1>,
+ __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2>,
+ __on_right> _STLP_CALL
+operator + (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs) {
+ return __bstr_sum<_CharT, _Traits, _Alloc,
+ __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1>,
+ __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2>,
+ __on_right>(__lhs, __rhs);
+}
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator == (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return (__lhs.size() == __rhs.size()) && (__lhs._M_get_storage() == __rhs._M_get_storage()); }
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator < (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return __lhs._M_get_storage() < __rhs._M_get_storage(); }
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator != (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return !(__lhs == __rhs); }
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator > (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return __rhs < __lhs; }
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator <= (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return !(__rhs < __lhs); }
+
+template <class _CharT, class _Traits, class _Alloc,
+ class _Lh1, class _Rh1, class _StoreDir1,
+ class _Lh2, class _Rh2, class _StoreDir2>
+inline bool _STLP_CALL
+operator >= (const __bstr_sum<_CharT, _Traits, _Alloc, _Lh1, _Rh1, _StoreDir1> &__lhs,
+ const __bstr_sum<_CharT, _Traits, _Alloc, _Lh2, _Rh2, _StoreDir2> &__rhs)
+{ return !(__lhs < __rhs); }
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+
+
+/*
+ * This class will be used to simulate a temporary string that is required for
+ * a call to the c_str method on the __bstr_sum class.
+ */
+
+template <class _CharT, class _Traits, class _Alloc>
+struct __sum_storage_elem {
+ typedef __sum_storage_elem<_CharT, _Traits, _Alloc> _Self;
+ typedef basic_string<_CharT, _Traits, _Alloc> _BString;
+
+ __sum_storage_elem(_Alloc __alloc) : _M_init(false), _M_storage(__alloc)
+ {}
+
+ template <class _Left, class _Right, class _StorageDir>
+ void _M_Init(__bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __ref) const {
+ if (!_M_init) {
+ _STLP_MUTABLE(_Self, _M_storage) = __ref;
+ _STLP_MUTABLE(_Self, _M_init) = true;
+ }
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _BString const& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __ref,
+ bool __do_init) const {
+ if (__do_init) {
+ _M_Init(__ref);
+ }
+ return _M_storage;
+ }
+ template <class _Left, class _Right, class _StorageDir>
+ _BString& _M_get_storage(__bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __ref) {
+ _M_Init(__ref);
+ return _M_storage;
+ }
+
+ size_t size() const { return 0; }
+ _CharT const& operator[](size_t __n) const
+ { return __STATIC_CAST(_CharT*, 0)[__n]; }
+
+private:
+ mutable bool _M_init;
+ mutable basic_string<_CharT, _Traits, _Alloc> _M_storage;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /*_STLP_STRING_SUM_H*/
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_sum_methods.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_sum_methods.h
new file mode 100644
index 0000000..305608e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_sum_methods.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/*
+ * All the necessary methods used for template expressions with basic_string
+ * This file do not have to be macro guarded as it is only used in the _string.h
+ * file and it is a part of the basic_string definition.
+ */
+
+public:
+ template <class _Left, class _Right, class _StorageDir>
+ basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s)
+ : _STLP_STRING_SUM_BASE(_Reserve_t(), __s.size(), __s.get_allocator())
+ { _M_append_sum(__s); }
+
+ template <class _Left, class _Right, class _StorageDir>
+ basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ size_type __pos, size_type __n = npos,
+ const allocator_type& __a = allocator_type())
+ : _STLP_STRING_SUM_BASE(_Reserve_t(), (__pos <= __s.size()) ? ((min) (__n, __s.size() - __pos)) : 0, __a) {
+ size_type __size = __s.size();
+ if (__pos > __size)
+ this->_M_throw_out_of_range();
+ else
+ _M_append_sum_pos(__s, __pos, (min) (__n, __size - __pos));
+ }
+
+private:
+ _CharT* _M_append_fast(_STLP_PRIV __char_wrapper<_CharT> __c, _CharT *__buf) {
+ _STLP_STD::_Copy_Construct(__buf, __c.getValue());
+ return __buf + 1;
+ }
+ _CharT* _M_append_fast(_CharT const* __s, size_type __s_size, _CharT *__buf)
+ { return uninitialized_copy(__s, __s + __s_size, __buf); }
+ _CharT* _M_append_fast(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _CharT *__buf)
+ { return _M_append_fast(__s.c_str(), __s.size(), __buf); }
+ _CharT* _M_append_fast(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _CharT *__buf)
+ { return _M_append_fast(__s.b_str(), __buf); }
+ _CharT* _M_append_fast(_Self const& __s, _CharT *__buf)
+ { return _M_append_fast(__s.data(), __s.size(), __buf); }
+ _CharT* _M_append_fast(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _CharT *__buf)
+ { return __buf; }
+ template <class _Left, class _Right, class _StorageDir>
+ _CharT* _M_append_fast(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, _CharT *__buf)
+ { return _M_append_fast(__s.getRhs(), _M_append_fast(__s.getLhs(), __buf)); }
+
+ _CharT* _M_append_fast_pos(_STLP_PRIV __char_wrapper<_CharT> __c, _CharT *__buf, size_type /*__pos*/, size_type __n) {
+ if (__n == 0)
+ return __buf;
+ _STLP_STD::_Copy_Construct(__buf, __c.getValue());
+ return __buf + 1;
+ }
+ _CharT* _M_append_fast_pos(_CharT const* __s, size_type __s_size, _CharT *__buf,
+ size_type __pos, size_type __n)
+ { return uninitialized_copy(__s + __pos, __s + __pos + (min)(__n, __s_size - __pos), __buf); }
+ _CharT* _M_append_fast_pos(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _CharT *__buf,
+ size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.c_str(), __s.size(), __buf, __pos, __n); }
+ _CharT* _M_append_fast_pos(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _CharT *__buf,
+ size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.b_str(), __buf, __pos, __n); }
+ _CharT* _M_append_fast_pos(_Self const& __s, _CharT *__buf,
+ size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.data(), __s.size(), __buf, __pos, __n); }
+ _CharT* _M_append_fast_pos(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _CharT *__buf,
+ size_type, size_type)
+ { return __buf; }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _CharT* _M_append_fast_pos(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ _CharT *__buf, size_type __pos, size_type __n) {
+ if (__n == 0) {
+ return __buf;
+ }
+ size_type __lhs_size = __s.getLhs().size();
+ if (__pos < __lhs_size) {
+ if (__n < (__lhs_size - __pos)) {
+ return _M_append_fast_pos(__s.getLhs(), __buf, __pos, __n);
+ } else {
+ return _M_append_fast_pos(__s.getRhs(), _M_append_fast_pos(__s.getLhs(), __buf, __pos, __n),
+ 0, __n - (__lhs_size - __pos));
+ }
+ } else {
+ return _M_append_fast_pos(__s.getRhs(), __buf, __pos - __lhs_size, __n);
+ }
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _Self& _M_append_sum (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s) {
+ size_type __s_size = __s.size();
+ if (__s_size == 0)
+ return *this;
+ const size_type __old_size = this->size();
+ if (__s_size > this->max_size() || __old_size > (this->max_size() - __s_size))
+ this->_M_throw_length_error();
+ if (__old_size + __s_size > this->capacity()) {
+ const size_type __len = __old_size + (max)(__old_size, __s_size) + 1;
+ pointer __new_start = this->_M_start_of_storage.allocate(__len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), this->_M_Finish(), __new_start);
+ __new_finish = this->_M_append_fast(__s, __new_finish);
+ this->_M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ else {
+ _M_append_sum_no_overflow(__s, 0, __s_size);
+ }
+ return *this;
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _Self& _M_append_sum_pos(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ size_type __pos, size_type __n) {
+ size_type __s_size = (min)(__s.size() - __pos, __n);
+ if (__s_size == 0)
+ return *this;
+ const size_type __old_size = this->size();
+ if (__s_size > this->max_size() || __old_size > (this->max_size() - __s_size))
+ this->_M_throw_length_error();
+ if (__old_size + __s_size > this->capacity()) {
+ const size_type __len = __old_size + (max)(__old_size, __s_size) + 1;
+ pointer __new_start = this->_M_start_of_storage.allocate(__len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), this->_M_Finish(), __new_start);
+ __new_finish = _M_append_fast_pos(__s, __new_finish, __pos, __s_size);
+ this->_M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ else {
+ _M_append_sum_no_overflow(__s, __pos, __s_size);
+ }
+ return *this;
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ void _M_append_sum_no_overflow(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ size_type __pos, size_type __n) {
+ pointer __finish = this->_M_Finish();
+ _M_append_fast_pos(__s, __finish + 1, __pos + 1, __n - 1);
+ this->_M_construct_null(__finish + __n);
+ _Traits::assign(*this->_M_finish, __s[__pos]);
+ this->_M_finish += __n;
+ }
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_string_workaround.h b/6/sources/cxx-stl/stlport/stlport/stl/_string_workaround.h
new file mode 100644
index 0000000..d77e320
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_string_workaround.h
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+//Included from _string.h, no need for macro guarding.
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_DEBUG)
+# define basic_string _STLP_NON_DBG_NAME(str)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+#define _STLP_NO_MEM_T_STRING_BASE _STLP_PRIV _STLP_NO_MEM_T_NAME(str)<_CharT, _Traits, _Alloc>
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_string : public _STLP_NO_MEM_T_STRING_BASE
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (basic_string)
+ , public __stlport_class<basic_string<_CharT, _Traits, _Alloc> >
+#endif
+{
+private: // Protected members inherited from base.
+ typedef basic_string<_CharT, _Traits, _Alloc> _Self;
+ typedef _STLP_NO_MEM_T_STRING_BASE _Base;
+ typedef typename _Base::_CalledFromWorkaround_t _CalledFromWorkaround_t;
+public:
+
+ __IMPORT_WITH_REVERSE_ITERATORS(_Base)
+
+ typedef typename _Base::_Iterator_category _Iterator_category;
+ typedef typename _Base::traits_type traits_type;
+ typedef typename _Base::_Reserve_t _Reserve_t;
+
+#include <stl/_string_npos.h>
+
+public: // Constructor, destructor, assignment.
+ explicit basic_string(const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__a) {}
+
+ basic_string(_Reserve_t __r, size_t __n,
+ const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__r, __n, __a) {}
+
+ basic_string(const _Self& __s)
+ : _STLP_NO_MEM_T_STRING_BASE(__s) {}
+
+ basic_string(const _Self& __s, size_type __pos, size_type __n = npos,
+ const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__s, __pos, __n, __a) {}
+
+ basic_string(const _CharT* __s, size_type __n,
+ const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__s, __n, __a) {}
+
+ basic_string(const _CharT* __s,
+ const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__s, __a) {}
+
+ basic_string(size_type __n, _CharT __c,
+ const allocator_type& __a = allocator_type())
+ : _STLP_NO_MEM_T_STRING_BASE(__n, __c, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ basic_string(__move_source<_Self> src)
+ : _STLP_NO_MEM_T_STRING_BASE(__move_source<_Base>(src.get())) {}
+#endif
+
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l,
+ const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _STLP_NO_MEM_T_STRING_BASE(_CalledFromWorkaround_t(), __a) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__f, __l, _Integral());
+ }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l)
+ : _STLP_NO_MEM_T_STRING_BASE(_CalledFromWorkaround_t(), allocator_type()) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_dispatch(__f, __l, _Integral());
+ }
+# endif
+
+ _Self& operator=(const _Self& __s) {
+ _Base::operator=(__s);
+ return *this;
+ }
+
+ _Self& operator=(const _CharT* __s) {
+ _Base::operator=(__s);
+ return *this;
+ }
+
+ _Self& operator=(_CharT __c) {
+ _Base::operator=(__c);
+ return *this;
+ }
+
+private:
+ template <class _InputIter>
+ void _M_range_initialize(_InputIter __f, _InputIter __l,
+ const input_iterator_tag &__tag) {
+ this->_M_allocate_block();
+ this->_M_construct_null(this->_M_Finish());
+ _M_appendT(__f, __l, __tag);
+ }
+
+ template <class _ForwardIter>
+ void _M_range_initialize(_ForwardIter __f, _ForwardIter __l,
+ const forward_iterator_tag &) {
+ difference_type __n = _STLP_STD::distance(__f, __l);
+ this->_M_allocate_block(__n + 1);
+ this->_M_finish = uninitialized_copy(__f, __l, this->_M_Start());
+ this->_M_terminate_string();
+ }
+
+ template <class _InputIter>
+ void _M_range_initializeT(_InputIter __f, _InputIter __l) {
+ _M_range_initialize(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
+ }
+
+ template <class _Integer>
+ void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type& /*_Integral*/) {
+ this->_M_allocate_block(__n + 1);
+ this->_M_finish = uninitialized_fill_n(this->_M_Start(), __n, __x);
+ this->_M_terminate_string();
+ }
+
+ template <class _InputIter>
+ void _M_initialize_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*_Integral*/) {
+ _M_range_initializeT(__f, __l);
+ }
+
+public: // Append, operator+=, push_back.
+ _Self& operator+=(const _Self& __s) {
+ _Base::operator+=(__s);
+ return *this;
+ }
+ _Self& operator+=(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::operator+=(__s);
+ return *this;
+ }
+ _Self& operator+=(_CharT __c) {
+ _Base::operator+=(__c);
+ return *this;
+ }
+
+ _Self& append(const _Self& __s) {
+ _Base::append(__s);
+ return *this;
+ }
+
+ _Self& append(const _Self& __s,
+ size_type __pos, size_type __n) {
+ _Base::append(__s, __pos, __n);
+ return *this;
+ }
+
+ _Self& append(const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::append(__s, __n);
+ return *this;
+ }
+ _Self& append(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::append(__s);
+ return *this;
+ }
+ _Self& append(size_type __n, _CharT __c) {
+ _Base::append(__n, __c);
+ return *this;
+ }
+
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& append(_InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_append_dispatch(__first, __last, _Integral());
+ }
+
+#if !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
+ //See equivalent assign method remark.
+ _Self& append(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
+ _Base::append(__f, __l);
+ return *this;
+ }
+#endif
+
+private: // Helper functions for append.
+
+ template <class _InputIter>
+ _Self& _M_appendT(_InputIter __first, _InputIter __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last ; ++__first)
+ _Base::push_back(*__first);
+ return *this;
+ }
+
+ template <class _ForwardIter>
+ _Self& _M_appendT(_ForwardIter __first, _ForwardIter __last,
+ const forward_iterator_tag &) {
+ if (__first != __last) {
+ const size_type __n = __STATIC_CAST(size_type, _STLP_STD::distance(__first, __last));
+ if (__n >= this->_M_rest()) {
+ size_type __len = this->_M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), this->_M_Finish(), __new_start);
+ __new_finish = uninitialized_copy(__first, __last, __new_finish);
+ this->_M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+ else {
+ _Traits::assign(*this->_M_finish, *__first++);
+ uninitialized_copy(__first, __last, this->_M_Finish() + 1);
+ this->_M_construct_null(this->_M_Finish() + __n);
+ this->_M_finish += __n;
+ }
+ }
+ return *this;
+ }
+
+ template <class _Integer>
+ _Self& _M_append_dispatch(_Integer __n, _Integer __x, const __true_type& /*Integral*/)
+ { return append((size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ _Self& _M_append_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*Integral*/)
+ { return _M_appendT(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter)); }
+
+public: // Assign
+ _Self& assign(const _Self& __s) {
+ _Base::assign(__s);
+ return *this;
+ }
+
+ _Self& assign(const _Self& __s,
+ size_type __pos, size_type __n) {
+ _Base::assign(__s, __pos, __n);
+ return *this;
+ }
+
+ _Self& assign(const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::assign(__s, __n);
+ return *this;
+ }
+
+ _Self& assign(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::assign(__s);
+ return *this;
+ }
+
+ _Self& assign(size_type __n, _CharT __c) {
+ _Base::assign(__n, __c);
+ return *this;
+ }
+
+private: // Helper functions for assign.
+
+ template <class _Integer>
+ _Self& _M_assign_dispatch(_Integer __n, _Integer __x, const __true_type& /*_Integral*/)
+ { return assign((size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ _Self& _M_assign_dispatch(_InputIter __f, _InputIter __l, const __false_type& /*_Integral*/) {
+ pointer __cur = this->_M_Start();
+ while (__f != __l && __cur != this->_M_Finish()) {
+ _Traits::assign(*__cur, *__f);
+ ++__f;
+ ++__cur;
+ }
+ if (__f == __l)
+ _Base::erase(__cur, this->_M_Finish());
+ else
+ _M_appendT(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
+ return *this;
+ }
+
+public:
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& assign(_InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_assign_dispatch(__first, __last, _Integral());
+ }
+
+#if !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
+ /* This method is not part of the standard and is a specialization of the
+ * template method assign. It is only granted for convenience to call assign
+ * with mixed parameters iterator and const_iterator.
+ */
+ _Self& assign(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
+ _Base::assign(__f, __l);
+ return *this;
+ }
+#endif
+
+public: // Insert
+ _Self& insert(size_type __pos, const _Self& __s) {
+ _Base::insert(__pos, __s);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _Self& __s,
+ size_type __beg, size_type __n) {
+ _Base::insert(__pos, __s, __beg, __n);
+ return *this;
+ }
+ _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::insert(__pos, __s, __n);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::insert(__pos, __s);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, size_type __n, _CharT __c) {
+ _Base::insert(__pos, __n, __c);
+ return *this;
+ }
+
+ iterator insert(iterator __p, _CharT __c)
+ { return _Base::insert(__p, __c); }
+
+ void insert(iterator __p, size_t __n, _CharT __c)
+ { _Base::insert(__p, __n, __c); }
+
+ // Check to see if _InputIterator is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ void insert(iterator __p, _InputIter __first, _InputIter __last) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ _M_insert_dispatch(__p, __first, __last, _Integral());
+ }
+
+#if !defined (_STLP_NO_METHOD_SPECIALIZATION)
+public:
+ void insert(iterator __p, const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _M_insert(__p, __f, __l, this->_M_inside(__f));
+ }
+#endif
+
+private: // Helper functions for insert.
+ void _M_insert(iterator __p, const _CharT* __f, const _CharT* __l, bool __self_ref) {
+ _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
+ _Base::_M_insert(__p, __f, __l, __self_ref);
+ }
+
+ template <class _ForwardIter>
+ void _M_insert_overflow(iterator __pos, _ForwardIter __first, _ForwardIter __last,
+ size_type __n) {
+ size_type __len = this->_M_compute_next_size(__n);
+ pointer __new_start = this->_M_start_of_storage.allocate(__len, __len);
+ pointer __new_finish = uninitialized_copy(this->_M_Start(), __pos, __new_start);
+ __new_finish = uninitialized_copy(__first, __last, __new_finish);
+ __new_finish = uninitialized_copy(__pos, this->_M_Finish(), __new_finish);
+ this->_M_construct_null(__new_finish);
+ this->_M_deallocate_block();
+ this->_M_reset(__new_start, __new_finish, __new_start + __len);
+ }
+
+ template <class _InputIter>
+ void _M_insertT(iterator __p, _InputIter __first, _InputIter __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last; ++__first) {
+ __p = insert(__p, *__first);
+ ++__p;
+ }
+ }
+
+ template <class _ForwardIter>
+ void _M_insertT(iterator __pos, _ForwardIter __first, _ForwardIter __last,
+ const forward_iterator_tag &) {
+ if (__first != __last) {
+ size_type __n = __STATIC_CAST(size_type, _STLP_STD::distance(__first, __last));
+ if (__n < this->_M_rest()) {
+ const size_type __elems_after = this->_M_finish - __pos;
+ if (__elems_after >= __n) {
+ uninitialized_copy((this->_M_Finish() - __n) + 1, this->_M_Finish() + 1, this->_M_Finish() + 1);
+ this->_M_finish += __n;
+ _Traits::move(__pos + __n, __pos, (__elems_after - __n) + 1);
+ _M_copyT(__first, __last, __pos);
+ }
+ else {
+ pointer __old_finish = this->_M_Finish();
+ _ForwardIter __mid = __first;
+ _STLP_STD::advance(__mid, __elems_after + 1);
+ _STLP_STD::uninitialized_copy(__mid, __last, this->_M_Finish() + 1);
+ this->_M_finish += __n - __elems_after;
+ uninitialized_copy(__pos, __old_finish + 1, this->_M_Finish());
+ this->_M_finish += __elems_after;
+ _M_copyT(__first, __mid, __pos);
+ }
+ }
+ else {
+ _M_insert_overflow(__pos, __first, __last, __n);
+ }
+ }
+ }
+
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __p, _Integer __n, _Integer __x,
+ const __true_type& /*Integral*/)
+ { insert(__p, (size_type) __n, (_CharT) __x); }
+
+ template <class _InputIter>
+ void _M_insert_dispatch(iterator __p, _InputIter __first, _InputIter __last,
+ const __false_type& /*Integral*/) {
+ _STLP_FIX_LITERAL_BUG(__p)
+ /* We are forced to do a temporary string to avoid the self referencing issue. */
+ const _Self __self(__first, __last, this->get_allocator());
+ _M_insertT(__p, __self.begin(), __self.end(), _STLP_ITERATOR_CATEGORY(__first, _InputIter));
+ }
+
+ template <class _InputIterator>
+ void _M_copyT(_InputIterator __first, _InputIterator __last, pointer __result) {
+ _STLP_FIX_LITERAL_BUG(__p)
+ for ( ; __first != __last; ++__first, ++__result)
+ _Traits::assign(*__result, *__first);
+ }
+
+#if !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ void _M_copyT(const _CharT* __f, const _CharT* __l, _CharT* __res) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l) _STLP_FIX_LITERAL_BUG(__res)
+ _Base::_M_copy(__f, __l, __res);
+ }
+#endif
+
+public: // Erase.
+ _Self& erase(size_type __pos = 0, size_type __n = npos) {
+ _Base::erase(__pos, __n);
+ return *this;
+ }
+
+ iterator erase(iterator __pos) {
+ _STLP_FIX_LITERAL_BUG(__pos)
+ return _Base::erase(__pos);
+ }
+
+ iterator erase(iterator __first, iterator __last) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ return _Base::erase(__first, __last);
+ }
+
+public: // Replace. (Conceptually equivalent
+ // to erase followed by insert.)
+ _Self& replace(size_type __pos, size_type __n, const _Self& __s) {
+ _Base::replace(__pos, __n, __s);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos1, size_type __n1, const _Self& __s,
+ size_type __pos2, size_type __n2) {
+ _Base::replace(__pos1, __n1, __s, __pos2, __n2);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1,
+ const _CharT* __s, size_type __n2) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::replace(__pos, __n1, __s, __n2);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::replace(__pos, __n1, __s);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1,
+ size_type __n2, _CharT __c) {
+ _Base::replace(__pos, __n1, __n2, __c);
+ return *this;
+ }
+
+ _Self& replace(iterator __first, iterator __last, const _Self& __s) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _Base::replace(__first, __last, __s);
+ return *this;
+ }
+
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::replace(__first, __last, __s, __n);
+ return *this;
+ }
+
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__s)
+ _Base::replace(__first, __last, __s);
+ return *this;
+ }
+
+ _Self& replace(iterator __first, iterator __last,
+ size_type __n, _CharT __c) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _Base::replace(__first, __last, __n, __c);
+ return *this;
+ }
+
+ // Check to see if _InputIter is an integer type. If so, then
+ // it can't be an iterator.
+ template <class _InputIter>
+ _Self& replace(iterator __first, iterator __last,
+ _InputIter __f, _InputIter __l) {
+ _STLP_FIX_LITERAL_BUG(__first)_STLP_FIX_LITERAL_BUG(__last)
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ return _M_replace_dispatch(__first, __last, __f, __l, _Integral());
+ }
+
+#if !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ return _M_replace(__first, __last, __f, __l, this->_M_inside(__f));
+ }
+#endif
+
+private: // Helper functions for replace.
+ _Self& _M_replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l, bool __self_ref) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _Base::_M_replace(__first, __last, __f, __l, __self_ref);
+ return *this;
+ }
+
+ template <class _Integer>
+ _Self& _M_replace_dispatch(iterator __first, iterator __last,
+ _Integer __n, _Integer __x, const __true_type& /*IsIntegral*/) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ return replace(__first, __last, (size_type) __n, (_CharT) __x);
+ }
+
+ template <class _InputIter>
+ _Self& _M_replace_dispatch(iterator __first, iterator __last,
+ _InputIter __f, _InputIter __l, const __false_type& /*IsIntegral*/) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ /* We are forced to do a temporary string to avoid the self referencing issue. */
+ const _Self __self(__f, __l, this->get_allocator());
+ return _M_replace(__first, __last, __self._M_Start(), __self._M_Finish(), false);
+ }
+
+public: // Other modifier member functions.
+ void swap(_Self& __s) { _Base::swap(__s); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public: // Substring.
+ _Self substr(size_type __pos = 0, size_type __n = npos) const
+ { return _Self(*this, __pos, __n, this->get_allocator()); }
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION) && !defined (_STLP_DEBUG)
+# define _STLP_STRING_SUM_BASE _STLP_NO_MEM_T_STRING_BASE
+# include <stl/_string_sum_methods.h>
+# undef _STLP_STRING_SUM_BASE
+#endif
+};
+
+#undef _STLP_NO_MEM_T_STRING_BASE
+
+#if defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+# undef basic_string
+#endif
+
+_STLP_END_NAMESPACE
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_strstream.h b/6/sources/cxx-stl/stlport/stlport/stl/_strstream.h
new file mode 100644
index 0000000..5e3d4c3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_strstream.h
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_STRSTREAM
+#define _STLP_INTERNAL_STRSTREAM
+
+#ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ISTREAM
+# include <stl/_istream.h> // Includes <ostream>, <ios>, <iosfwd>
+#endif
+
+#ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#ifndef _STLP_USE_NAMESPACES
+# define strstream _STLP_strstream
+# define ostrstream _STLP_ostrstream
+# define istrstream _STLP_istrstream
+# define strstreambuf _STLP_strstreambuf
+#endif
+
+//----------------------------------------------------------------------
+// Class strstreambuf, a streambuf class that manages an array of char.
+// Note that this class is not a template.
+
+class _STLP_CLASS_DECLSPEC strstreambuf : public basic_streambuf<char, char_traits<char> > {
+public: // Types.
+ typedef char_traits<char> _Traits;
+ typedef basic_streambuf<char, char_traits<char> > _Base;
+ typedef void* (*__alloc_fn)(size_t);
+ typedef void (*__free_fn)(void*);
+public: // Constructor, destructor
+
+ explicit strstreambuf(streamsize _Initial_capacity = 0);
+
+ strstreambuf(__alloc_fn, __free_fn);
+
+ strstreambuf(char* __get, streamsize __n, char* __put = 0);
+ strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
+ strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
+
+ strstreambuf(const char* __get, streamsize __n);
+ strstreambuf(const signed char* __get, streamsize __n);
+ strstreambuf(const unsigned char* __get, streamsize __n);
+
+ virtual ~strstreambuf();
+
+public: // strstreambuf operations.
+ void freeze(bool = true);
+ char* str();
+ int pcount() const;
+
+protected: // Overridden virtual member functions.
+ virtual int_type overflow(int_type __c = _Traits::eof());
+ virtual int_type pbackfail(int_type __c = _Traits::eof());
+ virtual int_type underflow();
+ virtual _Base* setbuf(char* __buf, streamsize __n);
+ virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
+ ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+ virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
+ = ios_base::in | ios_base::out);
+
+private: // Helper functions.
+ // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
+ char* _M_alloc(size_t);
+ void _M_free(char*);
+
+ // Helper function used in constructors.
+ void _M_setup(char* __get, char* __put, streamsize __n);
+private: // Data members.
+ __alloc_fn _M_alloc_fun;
+ __free_fn _M_free_fun;
+ bool _M_dynamic : 1;
+ bool _M_frozen : 1;
+ bool _M_constant : 1;
+};
+
+//----------------------------------------------------------------------
+// Class istrstream, an istream that manages a strstreambuf.
+
+class _STLP_CLASS_DECLSPEC istrstream : public basic_istream<char, char_traits<char> > {
+public:
+ explicit istrstream(char*);
+ explicit istrstream(const char*);
+ istrstream(char* , streamsize);
+ istrstream(const char*, streamsize);
+ virtual ~istrstream();
+
+ strstreambuf* rdbuf() const;
+ char* str();
+
+private:
+ strstreambuf _M_buf;
+};
+
+//----------------------------------------------------------------------
+// Class ostrstream
+
+class _STLP_CLASS_DECLSPEC ostrstream : public basic_ostream<char, char_traits<char> >
+{
+public:
+ ostrstream();
+ ostrstream(char*, int, ios_base::openmode = ios_base::out);
+ virtual ~ostrstream();
+
+ strstreambuf* rdbuf() const;
+ void freeze(bool = true);
+ char* str();
+ int pcount() const;
+
+private:
+ strstreambuf _M_buf;
+};
+
+//----------------------------------------------------------------------
+// Class strstream
+
+class _STLP_CLASS_DECLSPEC strstream : public basic_iostream<char, char_traits<char> > {
+public:
+ typedef char char_type;
+ typedef char_traits<char>::int_type int_type;
+ typedef char_traits<char>::pos_type pos_type;
+ typedef char_traits<char>::off_type off_type;
+
+ strstream();
+ strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
+ virtual ~strstream();
+
+ strstreambuf* rdbuf() const;
+ void freeze(bool = true);
+ int pcount() const;
+ char* str();
+
+private:
+ strstreambuf _M_buf;
+
+ //explicitely defined as private to avoid warnings:
+ strstream(strstream const&);
+ strstream& operator = (strstream const&);
+};
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_STRSTREAM */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.c b/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.c
new file mode 100644
index 0000000..179b472
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.c
@@ -0,0 +1,57 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_TEMPBUF_C
+#define _STLP_TEMPBUF_C
+
+#ifndef _STLP_INTERNAL_TEMPBUF_H
+# include <stl/_tempbuf.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+pair<_Tp*, ptrdiff_t> _STLP_CALL
+__get_temporary_buffer(ptrdiff_t __len, _Tp*)
+{
+ if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp)))
+ __len = INT_MAX / sizeof(_Tp);
+
+ while (__len > 0) {
+ _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp));
+ if (__tmp != 0)
+ return pair<_Tp*, ptrdiff_t>(__tmp, __len);
+ __len /= 2;
+ }
+
+ return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
+}
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_TEMPBUF_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.h b/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.h
new file mode 100644
index 0000000..0e0a747
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_tempbuf.h
@@ -0,0 +1,167 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_TEMPBUF_H
+#define _STLP_INTERNAL_TEMPBUF_H
+
+#ifndef _STLP_CLIMITS
+# include <climits>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+# include <stl/_uninitialized.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+pair<_Tp*, ptrdiff_t> _STLP_CALL
+__get_temporary_buffer(ptrdiff_t __len, _Tp*);
+
+#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+
+template <class _Tp>
+inline pair<_Tp*, ptrdiff_t> _STLP_CALL get_temporary_buffer(ptrdiff_t __len) {
+ return __get_temporary_buffer(__len, (_Tp*) 0);
+}
+
+# if ! defined(_STLP_NO_EXTENSIONS)
+// This overload is not required by the standard; it is an extension.
+// It is supported for backward compatibility with the HP STL, and
+// because not all compilers support the language feature (explicit
+// function template arguments) that is required for the standard
+// version of get_temporary_buffer.
+template <class _Tp>
+inline pair<_Tp*, ptrdiff_t> _STLP_CALL
+get_temporary_buffer(ptrdiff_t __len, _Tp*) {
+ return __get_temporary_buffer(__len, (_Tp*) 0);
+}
+# endif
+#endif
+
+template <class _Tp>
+inline void _STLP_CALL return_temporary_buffer(_Tp* __p) {
+// SunPro brain damage
+ free((char*)__p);
+}
+
+template <class _ForwardIterator, class _Tp>
+class _Temporary_buffer {
+private:
+ ptrdiff_t _M_original_len;
+ ptrdiff_t _M_len;
+ _Tp* _M_buffer;
+
+ void _M_allocate_buffer() {
+ _M_original_len = _M_len;
+ _M_buffer = 0;
+
+ if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp)))
+ _M_len = INT_MAX / sizeof(_Tp);
+
+ while (_M_len > 0) {
+ _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
+ if (_M_buffer)
+ break;
+ _M_len /= 2;
+ }
+ }
+
+ void _M_initialize_buffer(const _Tp&, const __true_type&) {}
+ void _M_initialize_buffer(const _Tp& val, const __false_type&) {
+ uninitialized_fill_n(_M_buffer, _M_len, val);
+ }
+
+public:
+ ptrdiff_t size() const { return _M_len; }
+ ptrdiff_t requested_size() const { return _M_original_len; }
+ _Tp* begin() { return _M_buffer; }
+ _Tp* end() { return _M_buffer + _M_len; }
+
+ _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
+ // Workaround for a __type_traits bug in the pre-7.3 compiler.
+# if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION < 730
+ typedef typename __type_traits<_Tp>::is_POD_type _Trivial;
+# else
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial;
+# endif
+ _STLP_TRY {
+ _M_len = _STLP_STD::distance(__first, __last);
+ _M_allocate_buffer();
+ if (_M_len > 0)
+ _M_initialize_buffer(*__first, _Trivial());
+ }
+ _STLP_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0)
+ }
+
+ ~_Temporary_buffer() {
+ _STLP_STD::_Destroy_Range(_M_buffer, _M_buffer + _M_len);
+ free(_M_buffer);
+ }
+
+private:
+ // Disable copy constructor and assignment operator.
+ _Temporary_buffer(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
+ void operator=(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
+};
+
+# ifndef _STLP_NO_EXTENSIONS
+
+// Class temporary_buffer is not part of the standard. It is an extension.
+
+template <class _ForwardIterator,
+ class _Tp
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+ = typename iterator_traits<_ForwardIterator>::value_type
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+ >
+struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
+{
+ temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
+ : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
+ ~temporary_buffer() {}
+};
+
+# endif /* _STLP_NO_EXTENSIONS */
+
+_STLP_END_NAMESPACE
+
+# ifndef _STLP_LINK_TIME_INSTANTIATION
+# include <stl/_tempbuf.c>
+# endif
+
+#endif /* _STLP_INTERNAL_TEMPBUF_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_threads.c b/6/sources/cxx-stl/stlport/stlport/stl/_threads.c
new file mode 100644
index 0000000..ea3c0b9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_threads.c
@@ -0,0 +1,167 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_THREADS_C
+#define _STLP_THREADS_C
+
+#ifndef _STLP_INTERNAL_THREADS_H
+# include <stl/_threads.h>
+#endif
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+
+#if defined (_STLP_SGI_THREADS)
+# include <time.h>
+#elif defined (_STLP_UNIX)
+# ifndef _STLP_INTERNAL_CTIME
+# include <stl/_ctime.h>
+# endif
+# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_VENDOR_GLOBAL_CSTD)
+using _STLP_VENDOR_CSTD::time_t;
+# endif
+# include <sys/time.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
+template<int __32bits>
+_STLP_STATIC_MUTEX
+_Atomic_swap_struct<__32bits>::_S_swap_lock _STLP_MUTEX_INITIALIZER;
+# undef _STLP_USE_ATOMIC_SWAP_MUTEX
+#endif
+
+#if defined (_STLP_THREADS) && !defined (_STLP_USE_PTHREAD_SPINLOCK)
+template <int __inst>
+unsigned _STLP_mutex_spin<__inst>::__max = _STLP_mutex_spin<__inst>::__low_max;
+
+template <int __inst>
+unsigned _STLP_mutex_spin<__inst>::__last = 0;
+#endif // _STLP_USE_PTHREAD_SPINLOCK
+
+#if defined (_STLP_THREADS) && !defined (_STLP_USE_PTHREAD_SPINLOCK)
+
+# if defined (_STLP_SPARC_SOLARIS_THREADS)
+// underground function in libc.so; we do not want dependance on librt
+extern "C" int __nanosleep(const struct timespec*, struct timespec*);
+# define _STLP_NANOSLEEP __nanosleep
+# else
+# define _STLP_NANOSLEEP nanosleep
+# endif
+
+template <int __inst>
+void _STLP_CALL
+_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec, unsigned int& __iteration) {
+# if defined (_STLP_WIN32THREADS)
+# if defined (_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
+ if (__iteration <= 4000) {
+ // Use SwitchToThread because
+ // 1) Sleep(1) often takes ~15 ms
+ // 2) SwitchToThread yields to lower-priority threads
+ // 4000 is enough to avoid Sleep and is used just to prevent infinite looping
+ // This number is advised spin count for Heap management by Microsoft
+ SwitchToThread();
+ } else {
+# endif
+ if (__log_nsec <= 21) {
+ /* Note from boost (www.boost.org):
+ * Changed from Sleep(0) to Sleep(1).
+ * According to MSDN, Sleep(0) will never yield to a lower-priority thread,
+ * whereas Sleep(1) will. Performance seems not to be affected. */
+ Sleep(1);
+ } else {
+ Sleep(1 << (__log_nsec - 20));
+ }
+# if defined (_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
+ __iteration = 0; //reset to avoid sleeps sequence
+ }
+# endif
+# elif defined(_STLP_OS2THREADS)
+ if (__log_nsec <= 20) {
+ DosSleep(0);
+ } else {
+ DosSleep(1 << (__log_nsec - 20));
+ }
+# elif defined (_STLP_UNIX)
+ timespec __ts;
+ /* Max sleep is 2**27nsec ~ 60msec */
+ __ts.tv_sec = 0;
+ __ts.tv_nsec = 1 << __log_nsec;
+ _STLP_NANOSLEEP(&__ts, 0);
+# endif
+}
+
+template <int __inst>
+void _STLP_CALL
+_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock) {
+# if defined(_STLP_ATOMIC_EXCHANGE)
+ if (_Atomic_swap(__lock, 1)) {
+ unsigned __my_spin_max = _STLP_mutex_spin<0>::__max;
+ unsigned __my_last_spins = _STLP_mutex_spin<0>::__last;
+ volatile unsigned __junk = 17; // Value doesn't matter.
+ unsigned __i;
+
+ for (__i = 0; __i < __my_spin_max; ++__i) {
+ if (__i < __my_last_spins/2 || *__lock) {
+ __junk *= __junk; __junk *= __junk;
+ __junk *= __junk; __junk *= __junk;
+ } else {
+ if (!_Atomic_swap(__lock, 1)) {
+ // 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.
+ _STLP_mutex_spin<0>::__last = __i;
+ _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__high_max;
+ return;
+ }
+ }
+ }
+
+ // We are probably being scheduled against the other process. Sleep.
+ _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__low_max;
+
+ for (__i = 0 ;; ++__i) {
+ int __log_nsec = __i + 6;
+
+ if (__log_nsec > 27) __log_nsec = 27;
+ if (!_Atomic_swap(__lock, 1)) {
+ break;
+ }
+ _S_nsec_sleep(__log_nsec, __i);
+ }
+ } /* first _Atomic_swap */
+# endif
+}
+#endif // _STLP_USE_PTHREAD_SPINLOCK
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
+#endif /* _STLP_THREADS_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_threads.h b/6/sources/cxx-stl/stlport/stlport/stl/_threads.h
new file mode 100644
index 0000000..fe381d8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_threads.h
@@ -0,0 +1,687 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_THREADS_H
+#define _STLP_INTERNAL_THREADS_H
+
+// Supported threading models are native SGI, pthreads, uithreads
+// (similar to pthreads, but based on an earlier draft of the Posix
+// threads standard), and Win32 threads. Uithread support by Jochen
+// Schlick, 1999, and Solaris threads generalized to them.
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+#endif
+
+// On SUN and Mac OS X gcc, zero-initialization works just fine...
+#if defined (__sun) || (defined (__GNUC__) && defined(__APPLE__))
+# define _STLP_MUTEX_INITIALIZER
+#endif
+
+/* This header defines the following atomic operation that platform should
+ * try to support as much as possible. Atomic operation are exposed as macro
+ * in order to easily test for their existance. They are:
+ * __stl_atomic_t _STLP_ATOMIC_INCREMENT(volatile __stl_atomic_t* __ptr) :
+ * increment *__ptr by 1 and returns the new value
+ * __stl_atomic_t _STLP_ATOMIC_DECREMENT(volatile __stl_atomic_t* __ptr) :
+ * decrement *__ptr by 1 and returns the new value
+ * __stl_atomic_t _STLP_ATOMIC_EXCHANGE(volatile __stl_atomic_t* __target, __stl_atomic_t __val) :
+ * assign __val to *__target and returns former *__target value
+ * void* _STLP_ATOMIC_EXCHANGE_PTR(void* volatile* __target, void* __ptr) :
+ * assign __ptr to *__target and returns former *__target value
+ */
+
+#if defined (_STLP_THREADS)
+
+# if defined (_STLP_SGI_THREADS)
+
+# include <mutex.h>
+// Hack for SGI o32 compilers.
+# if !defined(__add_and_fetch) && \
+ (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64)))
+# define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v)
+# define __test_and_set(__l,__v) test_and_set(__l,__v)
+# endif /* o32 */
+
+# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64))
+# define _STLP_ATOMIC_EXCHANGE(__p, __q) test_and_set(__p, __q)
+# else
+# define _STLP_ATOMIC_EXCHANGE(__p, __q) __test_and_set((unsigned long*)__p, (unsigned long)__q)
+# endif
+
+# define _STLP_ATOMIC_INCREMENT(__x) __add_and_fetch(__x, 1)
+# define _STLP_ATOMIC_DECREMENT(__x) __add_and_fetch(__x, (size_t) -1)
+typedef long __stl_atomic_t;
+
+# elif defined (_STLP_PTHREADS)
+
+# include <pthread.h>
+# if !defined (_STLP_USE_PTHREAD_SPINLOCK)
+# if defined (PTHREAD_MUTEX_INITIALIZER) && !defined (_STLP_MUTEX_INITIALIZER) && defined (_REENTRANT)
+# define _STLP_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER }
+# endif
+//HPUX variants have (on some platforms optional) non-standard "DCE" pthreads impl
+# if defined (_DECTHREADS_) && (defined (_PTHREAD_USE_D4) || defined (__hpux)) && !defined (_CMA_SUPPRESS_EXTERNALS_)
+# define _STLP_PTHREAD_ATTR_DEFAULT pthread_mutexattr_default
+# else
+# define _STLP_PTHREAD_ATTR_DEFAULT 0
+# endif
+# else
+# if defined (__OpenBSD__)
+# include <spinlock.h>
+# endif
+# endif
+
+# if defined (__GNUC__) && defined (__i386__)
+# if !defined (_STLP_ATOMIC_INCREMENT)
+inline long _STLP_atomic_increment_gcc_x86(long volatile* p) {
+ long result;
+ __asm__ __volatile__
+ ("lock; xaddl %1, %0;"
+ :"=m" (*p), "=r" (result)
+ :"m" (*p), "1" (1)
+ :"cc");
+ return result + 1;
+}
+# define _STLP_ATOMIC_INCREMENT(__x) (_STLP_atomic_increment_gcc_x86((long volatile*)__x))
+# endif
+
+# if !defined (_STLP_ATOMIC_DECREMENT)
+inline long _STLP_atomic_decrement_gcc_x86(long volatile* p) {
+ long result;
+ __asm__ __volatile__
+ ("lock; xaddl %1, %0;"
+ :"=m" (*p), "=r" (result)
+ :"m" (*p), "1" (-1)
+ :"cc");
+ return result - 1;
+}
+# define _STLP_ATOMIC_DECREMENT(__x) (_STLP_atomic_decrement_gcc_x86((long volatile*)__x))
+# endif
+typedef long __stl_atomic_t;
+# else
+typedef size_t __stl_atomic_t;
+# endif /* if defined(__GNUC__) && defined(__i386__) */
+
+# elif defined (_STLP_WIN32THREADS)
+
+# if !defined (_STLP_ATOMIC_INCREMENT)
+# if !defined (_STLP_NEW_PLATFORM_SDK)
+# define _STLP_ATOMIC_INCREMENT(__x) InterlockedIncrement(__CONST_CAST(long*, __x))
+# define _STLP_ATOMIC_DECREMENT(__x) InterlockedDecrement(__CONST_CAST(long*, __x))
+# define _STLP_ATOMIC_EXCHANGE(__x, __y) InterlockedExchange(__CONST_CAST(long*, __x), __y)
+# else
+# define _STLP_ATOMIC_INCREMENT(__x) InterlockedIncrement(__x)
+# define _STLP_ATOMIC_DECREMENT(__x) InterlockedDecrement(__x)
+# define _STLP_ATOMIC_EXCHANGE(__x, __y) InterlockedExchange(__x, __y)
+# endif
+# define _STLP_ATOMIC_EXCHANGE_PTR(__x, __y) STLPInterlockedExchangePointer(__x, __y)
+# endif
+typedef long __stl_atomic_t;
+
+# elif defined (__DECC) || defined (__DECCXX)
+
+# include <machine/builtins.h>
+# define _STLP_ATOMIC_EXCHANGE __ATOMIC_EXCH_LONG
+# define _STLP_ATOMIC_INCREMENT(__x) __ATOMIC_ADD_LONG(__x, 1)
+# define _STLP_ATOMIC_DECREMENT(__x) __ATOMIC_ADD_LONG(__x, -1)
+typedef long __stl_atomic_t;
+
+# elif defined (_STLP_SPARC_SOLARIS_THREADS)
+
+typedef long __stl_atomic_t;
+# include <stl/_sparc_atomic.h>
+
+# elif defined (_STLP_UITHREADS)
+
+// this inclusion is potential hazard to bring up all sorts
+// of old-style headers. Let's assume vendor already know how
+// to deal with that.
+# ifndef _STLP_INTERNAL_CTIME
+# include <stl/_ctime.h>
+# endif
+# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
+using _STLP_VENDOR_CSTD::time_t;
+# endif
+# include <synch.h>
+# ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+# endif
+# ifndef _STLP_INTERNAL_CWCHAR
+# include <stl/_cwchar.h>
+# endif
+typedef size_t __stl_atomic_t;
+
+# elif defined (_STLP_BETHREADS)
+
+# include <OS.h>
+# include <cassert>
+# include <stdio.h>
+# define _STLP_MUTEX_INITIALIZER = { 0 }
+typedef size_t __stl_atomic_t;
+
+# elif defined (_STLP_NWTHREADS)
+
+# include <nwthread.h>
+# include <nwsemaph.h>
+typedef size_t __stl_atomic_t;
+
+# elif defined(_STLP_OS2THREADS)
+
+# if defined (__GNUC__)
+# define INCL_DOSSEMAPHORES
+# include <os2.h>
+# else
+// This section serves to replace os2.h for VisualAge C++
+ typedef unsigned long ULONG;
+# if !defined (__HEV__) /* INCL_SEMAPHORE may also define HEV */
+# define __HEV__
+ typedef ULONG HEV;
+ typedef HEV* PHEV;
+# endif
+ typedef ULONG APIRET;
+ typedef ULONG HMTX;
+ typedef HMTX* PHMTX;
+ typedef const char* PCSZ;
+ typedef ULONG BOOL32;
+ APIRET _System DosCreateMutexSem(PCSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState);
+ APIRET _System DosRequestMutexSem(HMTX hmtx, ULONG ulTimeout);
+ APIRET _System DosReleaseMutexSem(HMTX hmtx);
+ APIRET _System DosCloseMutexSem(HMTX hmtx);
+# define _STLP_MUTEX_INITIALIZER = { 0 }
+# endif /* GNUC */
+typedef size_t __stl_atomic_t;
+
+# else
+
+typedef size_t __stl_atomic_t;
+
+# endif
+
+#else
+/* no threads */
+# define _STLP_ATOMIC_INCREMENT(__x) ++(*__x)
+# define _STLP_ATOMIC_DECREMENT(__x) --(*__x)
+/* We do not grant other atomic operations as they are useless if STLport do not have
+ * to be thread safe
+ */
+typedef size_t __stl_atomic_t;
+#endif
+
+#if !defined (_STLP_MUTEX_INITIALIZER)
+# if defined(_STLP_ATOMIC_EXCHANGE)
+# define _STLP_MUTEX_INITIALIZER = { 0 }
+# elif defined(_STLP_UITHREADS)
+# define _STLP_MUTEX_INITIALIZER = { DEFAULTMUTEX }
+# else
+# define _STLP_MUTEX_INITIALIZER
+# endif
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_THREADS) && !defined (_STLP_USE_PTHREAD_SPINLOCK)
+// Helper struct. This is a workaround for various compilers that don't
+// handle static variables in inline functions properly.
+template <int __inst>
+struct _STLP_mutex_spin {
+ enum { __low_max = 30, __high_max = 1000 };
+ // Low if we suspect uniprocessor, high for multiprocessor.
+ static unsigned __max;
+ static unsigned __last;
+ static void _STLP_CALL _M_do_lock(volatile __stl_atomic_t* __lock);
+ static void _STLP_CALL _S_nsec_sleep(int __log_nsec, unsigned int& __iteration);
+};
+#endif // !_STLP_USE_PTHREAD_SPINLOCK
+
+// Locking class. Note that this class *does not have a constructor*.
+// It must be initialized either statically, with _STLP_MUTEX_INITIALIZER,
+// or dynamically, by explicitly calling the _M_initialize member function.
+// (This is similar to the ways that a pthreads mutex can be initialized.)
+// There are explicit member functions for acquiring and releasing the lock.
+
+// There is no constructor because static initialization is essential for
+// some uses, and only a class aggregate (see section 8.5.1 of the C++
+// standard) can be initialized that way. That means we must have no
+// constructors, no base classes, no virtual functions, and no private or
+// protected members.
+
+// For non-static cases, clients should use _STLP_mutex.
+
+struct _STLP_CLASS_DECLSPEC _STLP_mutex_base {
+#if defined (_STLP_ATOMIC_EXCHANGE) || defined (_STLP_SGI_THREADS)
+ // It should be relatively easy to get this to work on any modern Unix.
+ volatile __stl_atomic_t _M_lock;
+#endif
+
+#if defined (_STLP_THREADS)
+# if defined (_STLP_ATOMIC_EXCHANGE)
+ inline void _M_initialize() { _M_lock = 0; }
+ inline void _M_destroy() {}
+
+ void _M_acquire_lock() {
+ _STLP_mutex_spin<0>::_M_do_lock(&_M_lock);
+ }
+
+ inline void _M_release_lock() {
+ volatile __stl_atomic_t* __lock = &_M_lock;
+# if defined(_STLP_SGI_THREADS) && defined(__GNUC__) && __mips >= 3
+ asm("sync");
+ *__lock = 0;
+# elif defined(_STLP_SGI_THREADS) && __mips >= 3 && \
+ (defined (_ABIN32) || defined(_ABI64))
+ __lock_release(__lock);
+# elif defined (_STLP_SPARC_SOLARIS_THREADS)
+# if defined (__WORD64) || defined (__arch64__) || defined (__sparcv9) || defined (__sparcv8plus)
+ asm("membar #StoreStore ; membar #LoadStore");
+# else
+ asm(" stbar ");
+# endif
+ *__lock = 0;
+# else
+ *__lock = 0;
+ // This is not sufficient on many multiprocessors, since
+ // writes to protected variables and the lock may be reordered.
+# endif
+ }
+# elif defined (_STLP_PTHREADS)
+# if defined (_STLP_USE_PTHREAD_SPINLOCK)
+# if !defined (__OpenBSD__)
+ pthread_spinlock_t _M_lock;
+ inline void _M_initialize() { pthread_spin_init( &_M_lock, 0 ); }
+ inline void _M_destroy() { pthread_spin_destroy( &_M_lock ); }
+
+ // sorry, but no static initializer for pthread_spinlock_t;
+ // this will not work for compilers that has problems with call
+ // constructor of static object...
+
+ // _STLP_mutex_base()
+ // { pthread_spin_init( &_M_lock, 0 ); }
+
+ // ~_STLP_mutex_base()
+ // { pthread_spin_destroy( &_M_lock ); }
+
+ inline void _M_acquire_lock() { pthread_spin_lock( &_M_lock ); }
+ inline void _M_release_lock() { pthread_spin_unlock( &_M_lock ); }
+# else // __OpenBSD__
+ spinlock_t _M_lock;
+ inline void _M_initialize() { _SPINLOCK_INIT( &_M_lock ); }
+ inline void _M_destroy() { }
+ inline void _M_acquire_lock() { _SPINLOCK( &_M_lock ); }
+ inline void _M_release_lock() { _SPINUNLOCK( &_M_lock ); }
+# endif // __OpenBSD__
+# else // !_STLP_USE_PTHREAD_SPINLOCK
+ pthread_mutex_t _M_lock;
+ inline void _M_initialize()
+ { pthread_mutex_init(&_M_lock,_STLP_PTHREAD_ATTR_DEFAULT); }
+ inline void _M_destroy()
+ { pthread_mutex_destroy(&_M_lock); }
+ inline void _M_acquire_lock() {
+# if defined ( __hpux ) && ! defined (PTHREAD_MUTEX_INITIALIZER)
+ if (!_M_lock.field1) _M_initialize();
+# endif
+ pthread_mutex_lock(&_M_lock);
+ }
+ inline void _M_release_lock() { pthread_mutex_unlock(&_M_lock); }
+# endif // !_STLP_USE_PTHREAD_SPINLOCK
+
+# elif defined (_STLP_UITHREADS)
+ mutex_t _M_lock;
+ inline void _M_initialize()
+ { mutex_init(&_M_lock, 0, NULL); }
+ inline void _M_destroy()
+ { mutex_destroy(&_M_lock); }
+ inline void _M_acquire_lock() { mutex_lock(&_M_lock); }
+ inline void _M_release_lock() { mutex_unlock(&_M_lock); }
+
+# elif defined (_STLP_OS2THREADS)
+ HMTX _M_lock;
+ inline void _M_initialize() { DosCreateMutexSem(NULL, &_M_lock, 0, false); }
+ inline void _M_destroy() { DosCloseMutexSem(_M_lock); }
+ inline void _M_acquire_lock() {
+ if (!_M_lock) _M_initialize();
+ DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT);
+ }
+ inline void _M_release_lock() { DosReleaseMutexSem(_M_lock); }
+# elif defined (_STLP_BETHREADS)
+ sem_id sem;
+ inline void _M_initialize() {
+ sem = create_sem(1, "STLPort");
+ assert(sem > 0);
+ }
+ inline void _M_destroy() {
+ int t = delete_sem(sem);
+ assert(t == B_NO_ERROR);
+ }
+ inline void _M_acquire_lock();
+ inline void _M_release_lock() {
+ status_t t = release_sem(sem);
+ assert(t == B_NO_ERROR);
+ }
+# elif defined (_STLP_NWTHREADS)
+ LONG _M_lock;
+ inline void _M_initialize()
+ { _M_lock = OpenLocalSemaphore(1); }
+ inline void _M_destroy()
+ { CloseLocalSemaphore(_M_lock); }
+ inline void _M_acquire_lock()
+ { WaitOnLocalSemaphore(_M_lock); }
+ inline void _M_release_lock() { SignalLocalSemaphore(_M_lock); }
+# else //*ty 11/24/2001 - added configuration check
+# error "Unknown thread facility configuration"
+# endif
+#else /* No threads */
+ inline void _M_initialize() {}
+ inline void _M_destroy() {}
+ inline void _M_acquire_lock() {}
+ inline void _M_release_lock() {}
+#endif // _STLP_PTHREADS
+};
+
+// Locking class. The constructor initializes the lock, the destructor destroys it.
+// Well - behaving class, does not need static initializer
+
+class _STLP_CLASS_DECLSPEC _STLP_mutex : public _STLP_mutex_base {
+ public:
+ inline _STLP_mutex () { _M_initialize(); }
+ inline ~_STLP_mutex () { _M_destroy(); }
+ private:
+ _STLP_mutex(const _STLP_mutex&);
+ void operator=(const _STLP_mutex&);
+};
+
+// A locking class that uses _STLP_STATIC_MUTEX. The constructor takes
+// a reference to an _STLP_STATIC_MUTEX, and acquires a lock. The destructor
+// releases the lock.
+// It's not clear that this is exactly the right functionality.
+// It will probably change in the future.
+
+struct _STLP_CLASS_DECLSPEC _STLP_auto_lock {
+ _STLP_auto_lock(_STLP_STATIC_MUTEX& __lock) : _M_lock(__lock)
+ { _M_lock._M_acquire_lock(); }
+ ~_STLP_auto_lock()
+ { _M_lock._M_release_lock(); }
+
+private:
+ _STLP_STATIC_MUTEX& _M_lock;
+ void operator=(const _STLP_auto_lock&);
+ _STLP_auto_lock(const _STLP_auto_lock&);
+};
+
+/*
+ * Class _Refcount_Base provides a type, __stl_atomic_t, a data member,
+ * _M_ref_count, and member functions _M_incr and _M_decr, which perform
+ * atomic preincrement/predecrement. The constructor initializes
+ * _M_ref_count.
+ */
+class _STLP_CLASS_DECLSPEC _Refcount_Base {
+ // The data member _M_ref_count
+#if defined (__DMC__)
+public:
+#endif
+ _STLP_VOLATILE __stl_atomic_t _M_ref_count;
+
+#if defined (_STLP_THREADS) && \
+ (!defined (_STLP_ATOMIC_INCREMENT) || !defined (_STLP_ATOMIC_DECREMENT) || \
+ defined (_STLP_WIN95_LIKE))
+# define _STLP_USE_MUTEX
+ _STLP_mutex _M_mutex;
+#endif
+
+ public:
+ // Constructor
+ _Refcount_Base(__stl_atomic_t __n) : _M_ref_count(__n) {}
+#if defined (__BORLANDC__)
+ ~_Refcount_Base(){};
+#endif
+
+ // _M_incr and _M_decr
+#if defined (_STLP_THREADS)
+# if !defined (_STLP_USE_MUTEX)
+ __stl_atomic_t _M_incr() { return _STLP_ATOMIC_INCREMENT(&_M_ref_count); }
+ __stl_atomic_t _M_decr() { return _STLP_ATOMIC_DECREMENT(&_M_ref_count); }
+# else
+# undef _STLP_USE_MUTEX
+ __stl_atomic_t _M_incr() {
+ _STLP_auto_lock l(_M_mutex);
+ return ++_M_ref_count;
+ }
+ __stl_atomic_t _M_decr() {
+ _STLP_auto_lock l(_M_mutex);
+ return --_M_ref_count;
+ }
+# endif
+#else /* No threads */
+ __stl_atomic_t _M_incr() { return ++_M_ref_count; }
+ __stl_atomic_t _M_decr() { return --_M_ref_count; }
+#endif
+};
+
+/* Atomic swap on __stl_atomic_t
+ * This is guaranteed to behave as though it were atomic only if all
+ * possibly concurrent updates use _Atomic_swap.
+ * In some cases the operation is emulated with a lock.
+ * Idem for _Atomic_swap_ptr
+ */
+/* Helper struct to handle following cases:
+ * - on platforms where sizeof(__stl_atomic_t) == sizeof(void*) atomic
+ * exchange can be done on pointers
+ * - on platform without atomic operation swap is done in a critical section,
+ * portable but inefficient.
+ */
+template <int __use_ptr_atomic_swap>
+class _Atomic_swap_struct {
+public:
+#if defined (_STLP_THREADS) && \
+ !defined (_STLP_ATOMIC_EXCHANGE) && \
+ (defined (_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS) || \
+ defined (_STLP_USE_PTHREAD_SPINLOCK) || defined (_STLP_NWTHREADS))
+# define _STLP_USE_ATOMIC_SWAP_MUTEX
+ static _STLP_STATIC_MUTEX _S_swap_lock;
+#endif
+
+ static __stl_atomic_t _S_swap(_STLP_VOLATILE __stl_atomic_t* __p, __stl_atomic_t __q) {
+#if defined (_STLP_THREADS)
+# if defined (_STLP_ATOMIC_EXCHANGE)
+ return _STLP_ATOMIC_EXCHANGE(__p, __q);
+# elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
+ _S_swap_lock._M_acquire_lock();
+ __stl_atomic_t __result = *__p;
+ *__p = __q;
+ _S_swap_lock._M_release_lock();
+ return __result;
+# else
+# error Missing atomic swap implementation
+# endif
+#else
+ /* no threads */
+ __stl_atomic_t __result = *__p;
+ *__p = __q;
+ return __result;
+#endif // _STLP_THREADS
+ }
+
+ static void* _S_swap_ptr(void* _STLP_VOLATILE* __p, void* __q) {
+#if defined (_STLP_THREADS)
+# if defined (_STLP_ATOMIC_EXCHANGE_PTR)
+ return _STLP_ATOMIC_EXCHANGE_PTR(__p, __q);
+# elif defined (_STLP_ATOMIC_EXCHANGE)
+ _STLP_STATIC_ASSERT(sizeof(__stl_atomic_t) == sizeof(void*))
+ return __REINTERPRET_CAST(void*, _STLP_ATOMIC_EXCHANGE(__REINTERPRET_CAST(volatile __stl_atomic_t*, __p),
+ __REINTERPRET_CAST(__stl_atomic_t, __q))
+ );
+# elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
+ _S_swap_lock._M_acquire_lock();
+ void *__result = *__p;
+ *__p = __q;
+ _S_swap_lock._M_release_lock();
+ return __result;
+# else
+# error Missing pointer atomic swap implementation
+# endif
+#else
+ /* no thread */
+ void *__result = *__p;
+ *__p = __q;
+ return __result;
+#endif
+ }
+};
+
+_STLP_TEMPLATE_NULL
+class _Atomic_swap_struct<0> {
+public:
+#if defined (_STLP_THREADS) && \
+ (!defined (_STLP_ATOMIC_EXCHANGE) || !defined (_STLP_ATOMIC_EXCHANGE_PTR)) && \
+ (defined (_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS) || \
+ defined (_STLP_USE_PTHREAD_SPINLOCK) || defined (_STLP_NWTHREADS))
+# define _STLP_USE_ATOMIC_SWAP_MUTEX
+ static _STLP_STATIC_MUTEX _S_swap_lock;
+#endif
+
+ static __stl_atomic_t _S_swap(_STLP_VOLATILE __stl_atomic_t* __p, __stl_atomic_t __q) {
+#if defined (_STLP_THREADS)
+# if defined (_STLP_ATOMIC_EXCHANGE)
+ return _STLP_ATOMIC_EXCHANGE(__p, __q);
+# elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
+ /* This should be portable, but performance is expected
+ * to be quite awful. This really needs platform specific
+ * code.
+ */
+ _S_swap_lock._M_acquire_lock();
+ __stl_atomic_t __result = *__p;
+ *__p = __q;
+ _S_swap_lock._M_release_lock();
+ return __result;
+# else
+# error Missing atomic swap implementation
+# endif
+#else
+ /* no threads */
+ __stl_atomic_t __result = *__p;
+ *__p = __q;
+ return __result;
+#endif // _STLP_THREADS
+ }
+
+ static void* _S_swap_ptr(void* _STLP_VOLATILE* __p, void* __q) {
+#if defined (_STLP_THREADS)
+# if defined (_STLP_ATOMIC_EXCHANGE_PTR)
+ return _STLP_ATOMIC_EXCHANGE_PTR(__p, __q);
+# elif defined (_STLP_ATOMIC_EXCHANGE)
+ _STLP_STATIC_ASSERT(sizeof(__stl_atomic_t) == sizeof(void*))
+ return __REINTERPRET_CAST(void*, _STLP_ATOMIC_EXCHANGE(__REINTERPRET_CAST(volatile __stl_atomic_t*, __p),
+ __REINTERPRET_CAST(__stl_atomic_t, __q))
+ );
+# elif defined (_STLP_USE_ATOMIC_SWAP_MUTEX)
+ _S_swap_lock._M_acquire_lock();
+ void *__result = *__p;
+ *__p = __q;
+ _S_swap_lock._M_release_lock();
+ return __result;
+# else
+# error Missing pointer atomic swap implementation
+# endif
+#else
+ /* no thread */
+ void *__result = *__p;
+ *__p = __q;
+ return __result;
+#endif
+ }
+};
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC == 1300)
+# pragma warning (push)
+# pragma warning (disable : 4189) //__use_ptr_atomic_swap initialized but not used
+#endif
+
+inline __stl_atomic_t _STLP_CALL _Atomic_swap(_STLP_VOLATILE __stl_atomic_t * __p, __stl_atomic_t __q) {
+ const int __use_ptr_atomic_swap = sizeof(__stl_atomic_t) == sizeof(void*);
+ return _Atomic_swap_struct<__use_ptr_atomic_swap>::_S_swap(__p, __q);
+}
+
+inline void* _STLP_CALL _Atomic_swap_ptr(void* _STLP_VOLATILE* __p, void* __q) {
+ const int __use_ptr_atomic_swap = sizeof(__stl_atomic_t) == sizeof(void*);
+ return _Atomic_swap_struct<__use_ptr_atomic_swap>::_S_swap_ptr(__p, __q);
+}
+
+#if defined (_STLP_MSVC) && (_STLP_MSVC == 1300)
+# pragma warning (pop)
+#endif
+
+#if defined (_STLP_BETHREADS)
+template <int __inst>
+struct _STLP_beos_static_lock_data {
+ static bool is_init;
+ struct mutex_t : public _STLP_mutex {
+ mutex_t()
+ { _STLP_beos_static_lock_data<0>::is_init = true; }
+ ~mutex_t()
+ { _STLP_beos_static_lock_data<0>::is_init = false; }
+ };
+ static mutex_t mut;
+};
+
+template <int __inst>
+bool _STLP_beos_static_lock_data<__inst>::is_init = false;
+template <int __inst>
+typename _STLP_beos_static_lock_data<__inst>::mutex_t _STLP_beos_static_lock_data<__inst>::mut;
+
+inline void _STLP_mutex_base::_M_acquire_lock() {
+ if (sem == 0) {
+ // we need to initialise on demand here
+ // to prevent race conditions use our global
+ // mutex if it's available:
+ if (_STLP_beos_static_lock_data<0>::is_init) {
+ _STLP_auto_lock al(_STLP_beos_static_lock_data<0>::mut);
+ if (sem == 0) _M_initialize();
+ }
+ else {
+ // no lock available, we must still be
+ // in startup code, THERE MUST BE ONE THREAD
+ // ONLY active at this point.
+ _M_initialize();
+ }
+ }
+ status_t t;
+ t = acquire_sem(sem);
+ assert(t == B_NO_ERROR);
+}
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_threads.c>
+#endif
+
+#endif /* _STLP_INTERNAL_THREADS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.c b/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.c
new file mode 100644
index 0000000..f403817
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.c
@@ -0,0 +1,441 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_TIME_FACETS_C
+#define _STLP_TIME_FACETS_C
+
+#ifndef _STLP_INTERNAL_TIME_FACETS_H
+# include <stl/_time_facets.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUM_PUT_H
+# include <stl/_num_put.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUM_GET_H
+# include <stl/_num_get.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------
+// Declarations of static template members.
+
+template <class _CharT, class _InputIterator>
+locale::id time_get<_CharT, _InputIterator>::id;
+
+template <class _CharT, class _OutputIterator>
+locale::id time_put<_CharT, _OutputIterator>::id;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/* Matching input against a list of names
+
+ * Alphabetic input of the names of months and the names
+ * of weekdays requires matching input against a list of names.
+ * We use a simple generic algorithm to accomplish this. This
+ * algorithm is not very efficient, especially for longer lists
+ * of names, but it probably does not matter for the initial
+ * implementation and it may never matter, since we do not expect
+ * this kind of input to be used very often. The algorithm
+ * could be improved fairly simply by creating a new list of
+ * names still in the running at each iteration. A more sophisticated
+ * approach would be to build a tree to do the matching.
+ *
+ * We compare each character of the input to the corresponding
+ * character of each name on the list that has not been eliminated,
+ * either because every character in the name has already been
+ * matched, or because some character has not been matched. We
+ * continue only as long as there are some names that have not been
+ * eliminated.
+
+ * We do not really need a random access iterator (a forward iterator
+ * would do), but the extra generality makes the notation clumsier,
+ * and we don't really need it.
+
+ * We can recognize a failed match by the fact that the return value
+ * will be __name_end.
+ */
+
+#define _MAXNAMES 24
+
+template <class _InIt, class _NameIt>
+size_t _STLP_CALL
+__match(_InIt& __first, _InIt& __last, _NameIt __name, _NameIt __name_end) {
+ typedef ptrdiff_t difference_type;
+ difference_type __n = __name_end - __name;
+ difference_type __i, __start = 0;
+ size_t __pos = 0;
+ difference_type __check_count = __n;
+ bool __do_not_check[_MAXNAMES];
+ size_t __matching_name_index = __n;
+
+ memset(__do_not_check, 0, sizeof(__do_not_check));
+
+ while (__first != __last) {
+ difference_type __new_n = __n;
+ for (__i = __start; __i < __n; ++__i) {
+ if (!__do_not_check[__i]) {
+ if (*__first == __name[__i][__pos]) {
+ if (__pos == (__name[__i].size() - 1)) {
+ __matching_name_index = __i;
+ __do_not_check[__i] = true;
+ if (__i == __start) ++__start;
+ --__check_count;
+ if (__check_count == 0) {
+ ++__first;
+ return __matching_name_index;
+ }
+ }
+ __new_n = __i + 1;
+ }
+ else {
+ __do_not_check[__i] = true;
+ if (__i == __start) ++__start;
+ --__check_count;
+ if (__check_count == 0)
+ return __matching_name_index;
+ }
+ }
+ else {
+ if (__i == __start) ++ __start;
+ }
+ }
+
+ __n = __new_n;
+ ++__first; ++__pos;
+ }
+
+ return __matching_name_index;
+}
+
+// __get_formatted_time reads input that is assumed to be formatted
+// according to the rules for the C strftime function (C standard,
+// 7.12.3.5). This function is used to implement the do_get_time
+// and do_get_date virtual functions, which depend on the locale
+// specifications for the time and day formats respectively.
+// Note the catchall default case, intended mainly for the '%Z'
+// format designator, which does not make sense here since the
+// representation of timezones is not part of the locale.
+//
+// The case branches are implemented either by doing a match using
+// the appopriate name table or by doing a __get_integer_nogroup.
+//
+// 'y' format is assumed to mean that the input represents years
+// since 1900. That is, 2002 should be represented as 102. There
+// is no century-guessing.
+//
+// The match is successful if and only if the second component of the
+// return value is format_end.
+
+// Note that the antepenultimate parameter is being used only to determine
+// the correct overloading for the calls to __get_integer_nogroup.
+template <class _InIt1, class _Ch, class _TimeInfo>
+string::const_iterator _STLP_CALL
+__get_formatted_time _STLP_WEAK (_InIt1 __first, _InIt1 __last,
+ string::const_iterator __format, string::const_iterator __format_end,
+ _Ch*, const _TimeInfo& __table,
+ const ios_base& __s, ios_base::iostate& __err, tm* __t) {
+ const ctype<_Ch>& __ct = use_facet<ctype<_Ch> >(__s.getloc());
+ typedef basic_string<_Ch, char_traits<_Ch>, allocator<_Ch> > string_type;
+ size_t offset;
+
+ while (__first != __last && __format != __format_end) {
+ offset = 0;
+ if (*__format == '%') {
+ ++__format;
+ char __c = *__format;
+ if (__c == '#') { //MS extension
+ ++__format;
+ __c = *__format;
+ }
+
+ switch (__c) {
+ case 'A':
+ offset = 7;
+ case 'a': {
+ size_t __index = __match(__first, __last,
+ __table._M_dayname + offset, __table._M_dayname + offset + 7);
+ if (__index == 7)
+ return __format;
+ __t->tm_wday = __STATIC_CAST(int, __index);
+ break;
+ }
+
+ case 'B':
+ offset = 12;
+ case 'b': {
+ size_t __index = __match(__first, __last,
+ __table._M_monthname + offset, __table._M_monthname + offset + 12);
+ if (__index == 12)
+ return __format;
+ __t->tm_mon = __STATIC_CAST(int, __index);
+ break;
+ }
+
+ case 'd': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_mday, __STATIC_CAST(_Ch*, 0));
+ if (!__pr || __t->tm_mday < 1 || __t->tm_mday > 31) {
+ __err |= ios_base::failbit;
+ return __format;
+ }
+ break;
+ }
+
+ case 'H': case 'I': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_hour, __STATIC_CAST(_Ch*, 0));
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ case 'j': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_yday, __STATIC_CAST(_Ch*, 0));
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ case 'm': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_mon, __STATIC_CAST(_Ch*, 0));
+ --__t->tm_mon;
+ if (!__pr || __t->tm_mon < 0 || __t->tm_mon > 11) {
+ __err |= ios_base::failbit;
+ return __format;
+ }
+ break;
+ }
+
+ case 'M': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_min, __STATIC_CAST(_Ch*, 0));
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ case 'p': {
+ size_t __index = __match(__first, __last,
+ __table._M_am_pm + 0, __table._M_am_pm + 2);
+ if (__index == 2)
+ return __format;
+ // 12:00 PM <=> 12:00, 12:00 AM <=> 00:00
+ if (__index == 1 && __t->tm_hour != 12 )
+ __t->tm_hour += 12;
+ if (__index == 0 && __t->tm_hour == 12 )
+ __t->tm_hour = 0;
+ break;
+ }
+
+ case 'S': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_sec, __STATIC_CAST(_Ch*, 0));
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ case 'y': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_year, __STATIC_CAST(_Ch*, 0));
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ case 'Y': {
+ bool __pr = __get_decimal_integer(__first, __last, __t->tm_year, __STATIC_CAST(_Ch*, 0));
+ __t->tm_year -= 1900;
+ if (!__pr)
+ return __format;
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+ else {
+ if (*__first++ != __ct.widen(*__format)) break;
+ }
+
+ ++__format;
+ }
+
+ return __format;
+}
+
+template <class _InIt, class _TimeInfo>
+bool _STLP_CALL
+__get_short_or_long_dayname(_InIt& __first, _InIt& __last, const _TimeInfo& __table, tm* __t) {
+ size_t __index = __match(__first, __last, __table._M_dayname + 0, __table._M_dayname + 14);
+ if (__index != 14) {
+ __t->tm_wday = __STATIC_CAST(int, __index % 7);
+ return true;
+ }
+ return false;
+}
+
+template <class _InIt, class _TimeInfo>
+bool _STLP_CALL
+__get_short_or_long_monthname(_InIt& __first, _InIt& __last, const _TimeInfo& __table, tm* __t) {
+ size_t __index = __match(__first, __last, __table._M_monthname + 0, __table._M_monthname + 24);
+ if (__index != 24) {
+ __t->tm_mon = __STATIC_CAST(int, __index % 12);
+ return true;
+ }
+ return false;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Ch, class _InIt>
+_InIt
+time_get<_Ch, _InIt>::do_get_date(_InIt __s, _InIt __end,
+ ios_base& __str, ios_base::iostate& __err,
+ tm* __t) const {
+ typedef string::const_iterator string_iterator;
+
+ string_iterator __format = this->_M_timeinfo._M_date_format.begin();
+ string_iterator __format_end = this->_M_timeinfo._M_date_format.end();
+
+ string_iterator __result
+ = _STLP_PRIV __get_formatted_time(__s, __end, __format, __format_end,
+ __STATIC_CAST(_Ch*, 0), this->_M_timeinfo,
+ __str, __err, __t);
+ if (__result == __format_end)
+ __err = ios_base::goodbit;
+ else {
+ __err = ios_base::failbit;
+ if (__s == __end)
+ __err |= ios_base::eofbit;
+ }
+ return __s;
+}
+
+template <class _Ch, class _InIt>
+_InIt
+time_get<_Ch, _InIt>::do_get_time(_InIt __s, _InIt __end,
+ ios_base& __str, ios_base::iostate& __err,
+ tm* __t) const {
+ typedef string::const_iterator string_iterator;
+ string_iterator __format = this->_M_timeinfo._M_time_format.begin();
+ string_iterator __format_end = this->_M_timeinfo._M_time_format.end();
+
+ string_iterator __result
+ = _STLP_PRIV __get_formatted_time(__s, __end, __format, __format_end,
+ __STATIC_CAST(_Ch*, 0), this->_M_timeinfo,
+ __str, __err, __t);
+ __err = __result == __format_end ? ios_base::goodbit
+ : ios_base::failbit;
+ if (__s == __end)
+ __err |= ios_base::eofbit;
+ return __s;
+}
+
+template <class _Ch, class _InIt>
+_InIt
+time_get<_Ch, _InIt>::do_get_year(_InIt __s, _InIt __end,
+ ios_base&, ios_base::iostate& __err,
+ tm* __t) const {
+ if (__s == __end) {
+ __err = ios_base::failbit | ios_base::eofbit;
+ return __s;
+ }
+
+ bool __pr = _STLP_PRIV __get_decimal_integer(__s, __end, __t->tm_year, __STATIC_CAST(_Ch*, 0));
+ __t->tm_year -= 1900;
+ __err = __pr ? ios_base::goodbit : ios_base::failbit;
+ if (__s == __end)
+ __err |= ios_base::eofbit;
+
+ return __s;
+}
+
+template <class _Ch, class _InIt>
+_InIt
+time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt __end,
+ ios_base &__str, ios_base::iostate &__err,
+ tm *__t) const {
+ bool __result =
+ _STLP_PRIV __get_short_or_long_dayname(__s, __end, this->_M_timeinfo, __t);
+ if (__result)
+ __err = ios_base::goodbit;
+ else {
+ __err = ios_base::failbit;
+ if (__s == __end)
+ __err |= ios_base::eofbit;
+ }
+ return __s;
+}
+
+template <class _Ch, class _InIt>
+_InIt
+time_get<_Ch, _InIt>::do_get_monthname(_InIt __s, _InIt __end,
+ ios_base &__str, ios_base::iostate &__err,
+ tm *__t) const {
+ bool __result =
+ _STLP_PRIV __get_short_or_long_monthname(__s, __end, this->_M_timeinfo, __t);
+ if (__result)
+ __err = ios_base::goodbit;
+ else {
+ __err = ios_base::failbit;
+ if (__s == __end)
+ __err |= ios_base::eofbit;
+ }
+ return __s;
+}
+
+template<class _Ch, class _OutputIter>
+_OutputIter
+time_put<_Ch,_OutputIter>::put(_OutputIter __s, ios_base& __f, _Ch __fill,
+ const tm* __tmb, const _Ch* __pat,
+ const _Ch* __pat_end) const {
+ const ctype<_Ch>& _Ct = use_facet<ctype<_Ch> >(__f.getloc());
+ while (__pat != __pat_end) {
+ char __c = _Ct.narrow(*__pat, 0);
+ if (__c == '%') {
+ char __mod = 0;
+ ++__pat;
+ __c = _Ct.narrow(*__pat++, 0);
+ if (__c == '#') { // MS extension
+ __mod = __c;
+ __c = _Ct.narrow(*__pat++, 0);
+ }
+ __s = do_put(__s, __f, __fill, __tmb, __c, __mod);
+ }
+ else
+ *__s++ = *__pat++;
+ }
+ return __s;
+}
+
+template<class _Ch, class _OutputIter>
+_OutputIter
+time_put<_Ch,_OutputIter>::do_put(_OutputIter __s, ios_base& __f, _Ch /* __fill */,
+ const tm* __tmb, char __format,
+ char __modifier ) const {
+ const ctype<_Ch>& __ct = use_facet<ctype<_Ch> >(__f.getloc());
+ _STLP_BASIC_IOSTRING(_Ch) __buf;
+ _STLP_PRIV __write_formatted_time(__buf, __ct, __format, __modifier, this->_M_timeinfo, __tmb);
+ return copy(__buf.begin(), __buf.end(), __s);
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_TIME_FACETS_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.h b/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.h
new file mode 100644
index 0000000..e67c2f4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_time_facets.h
@@ -0,0 +1,329 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: This is an internal header file, included by other C++
+// standard library headers. You should not attempt to use this header
+// file directly.
+
+
+#ifndef _STLP_INTERNAL_TIME_FACETS_H
+#define _STLP_INTERNAL_TIME_FACETS_H
+
+#ifndef _STLP_INTERNAL_CTIME
+# include <stl/_ctime.h> // Needed (for struct tm) by time facets
+#endif
+
+#ifndef _STLP_C_LOCALE_H
+# include <stl/c_locale.h>
+#endif
+
+#ifndef _STLP_IOS_BASE_H
+# include <stl/_ios_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H
+# include <stl/_iostream_string.h>
+#endif
+
+#ifndef _STLP_FACETS_FWD_H
+# include <stl/_facets_fwd.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// Template functions used by time_get
+
+/* Both time_get and time_put need a structure of type _Time_Info
+ * to provide names and abbreviated names for months and days,
+ * as well as the am/pm designator. The month and weekday tables
+ * have the all the abbreviated names before all the full names.
+ * The _Time_Info tables are initialized using the non-template
+ * time_base class, which has a default constructor and two protected.
+ * The default one initialize _Time_Info with "C" time info. The
+ * protected initialize _time_Info using a _Locale_time instance
+ * or using a name( in fact the name is used to build a _Locale_time
+ * instance that is then used for initialization). */
+
+class _STLP_CLASS_DECLSPEC _Time_Info_Base {
+public:
+ string _M_time_format;
+ string _M_date_format;
+ string _M_date_time_format;
+ string _M_long_date_format;
+ string _M_long_date_time_format;
+};
+
+class _STLP_CLASS_DECLSPEC _Time_Info : public _Time_Info_Base {
+public:
+ string _M_dayname[14];
+ string _M_monthname[24];
+ string _M_am_pm[2];
+};
+
+#ifndef _STLP_NO_WCHAR_T
+class _STLP_CLASS_DECLSPEC _WTime_Info : public _Time_Info_Base {
+public:
+ wstring _M_dayname[14];
+ wstring _M_monthname[24];
+ wstring _M_am_pm[2];
+};
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+class _STLP_CLASS_DECLSPEC time_base {
+public:
+ enum dateorder {no_order, dmy, mdy, ymd, ydm};
+};
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Ch>
+class time_init;
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC time_init<char> {
+protected:
+ time_init();
+ time_init(const char *name);
+ time_init(_Locale_time*);
+#if defined (__BORLANDC__)
+ static
+#endif
+ _Time_Info _M_timeinfo;
+ time_base::dateorder _M_dateorder;
+};
+
+#ifndef _STLP_NO_WCHAR_T
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC time_init<wchar_t> {
+protected:
+ time_init();
+ time_init(const char *name);
+ time_init(_Locale_time*);
+#if defined (__BORLANDC__)
+ static
+#endif
+ _WTime_Info _M_timeinfo;
+ time_base::dateorder _M_dateorder;
+};
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Ch, class _InIt>
+class time_get : public locale::facet, public time_base, public _STLP_PRIV time_init<_Ch> {
+public:
+ typedef _Ch char_type;
+ typedef _InIt iter_type;
+
+ explicit time_get(size_t __refs = 0) : locale::facet(__refs)
+ {}
+
+ dateorder date_order() const { return do_date_order(); }
+ iter_type get_time(iter_type __s, iter_type __end, ios_base& __str,
+ ios_base::iostate& __err, tm* __t) const
+ { return do_get_time(__s, __end, __str, __err, __t); }
+ iter_type get_date(iter_type __s, iter_type __end, ios_base& __str,
+ ios_base::iostate& __err, tm* __t) const
+ { return do_get_date(__s, __end, __str, __err, __t); }
+ iter_type get_weekday(iter_type __s, iter_type __end, ios_base& __str,
+ ios_base::iostate& __err, tm* __t) const
+ { return do_get_weekday(__s, __end, __str, __err, __t); }
+ iter_type get_monthname(iter_type __s, iter_type __end, ios_base& __str,
+ ios_base::iostate& __err, tm* __t) const
+ { return do_get_monthname(__s, __end, __str, __err, __t); }
+ iter_type get_year(iter_type __s, iter_type __end, ios_base& __str,
+ ios_base::iostate& __err, tm* __t) const
+ { return do_get_year(__s, __end, __str, __err, __t); }
+
+ static locale::id id;
+
+protected:
+ time_get(const char* __name, size_t __refs)
+ : locale::facet(__refs), _STLP_PRIV time_init<_Ch>(__name)
+ {}
+ time_get(_Locale_time *__time)
+ : _STLP_PRIV time_init<_Ch>(__time)
+ {}
+
+ ~time_get() {}
+
+ virtual dateorder do_date_order() const { return this->_M_dateorder; }
+
+ virtual iter_type do_get_time(iter_type __s, iter_type __end,
+ ios_base&, ios_base::iostate& __err,
+ tm* __t) const;
+
+ virtual iter_type do_get_date(iter_type __s, iter_type __end,
+ ios_base&, ios_base::iostate& __err,
+ tm* __t) const;
+
+ virtual iter_type do_get_weekday(iter_type __s, iter_type __end,
+ ios_base&,
+ ios_base::iostate& __err,
+ tm* __t) const;
+ virtual iter_type do_get_monthname(iter_type __s, iter_type __end,
+ ios_base&,
+ ios_base::iostate& __err,
+ tm* __t) const;
+
+ virtual iter_type do_get_year(iter_type __s, iter_type __end,
+ ios_base&, ios_base::iostate& __err,
+ tm* __t) const;
+};
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _Ch, class _InIt>
+#else
+template <class _Ch, class _InIt = istreambuf_iterator<_Ch, char_traits<_Ch> > >
+#endif
+class time_get_byname : public time_get<_Ch, _InIt> {
+ friend class _Locale_impl;
+public:
+ typedef time_base::dateorder dateorder;
+ typedef _InIt iter_type;
+
+ explicit time_get_byname(const char* __name, size_t __refs = 0)
+ : time_get<_Ch, _InIt>(__name, __refs) {}
+
+protected:
+ ~time_get_byname() {}
+ dateorder do_date_order() const { return this->_M_dateorder; }
+
+private:
+ time_get_byname(_Locale_time *__time)
+ : time_get<_Ch, _InIt>(__time)
+ {}
+
+ typedef time_get_byname<_Ch, _InIt> _Self;
+ //explicitely defined as private to avoid warnings:
+ time_get_byname(_Self const&);
+ _Self& operator = (_Self const&);
+};
+
+// time_put facet
+
+// For the formats 'x, 'X', and 'c', do_put calls the first form of
+// put with the pattern obtained from _M_timeinfo._M_date_format or
+// _M_timeinfo._M_time_format.
+
+// Helper function: __ takes a single-character
+// format. As indicated by the foregoing remark, this will never be
+// 'x', 'X', or 'c'.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_DECLSPEC void _STLP_CALL
+__write_formatted_time(__iostring&, const ctype<char>& __ct,
+ char __format, char __modifier,
+ const _Time_Info& __table, const tm* __t);
+
+#ifndef _STLP_NO_WCHAR_T
+_STLP_DECLSPEC void _STLP_CALL
+__write_formatted_time(__iowstring&, const ctype<wchar_t>& __ct,
+ char __format, char __modifier,
+ const _WTime_Info& __table, const tm* __t);
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Ch, class _OutIt>
+class time_put : public locale::facet, public time_base, public _STLP_PRIV time_init<_Ch> {
+public:
+ typedef _Ch char_type;
+ typedef _OutIt iter_type;
+
+ explicit time_put(size_t __refs = 0) : locale::facet(__refs)
+ {}
+
+ _OutIt put(iter_type __s, ios_base& __f, _Ch __fill,
+ const tm* __tmb,
+ const _Ch* __pat, const _Ch* __pat_end) const;
+
+ _OutIt put(iter_type __s, ios_base& __f, _Ch __fill,
+ const tm* __tmb, char __format, char __modifier = 0) const
+ { return do_put(__s, __f, __fill, __tmb, __format, __modifier); }
+
+ static locale::id id;
+
+protected:
+ time_put(const char* __name, size_t __refs)
+ : locale::facet(__refs), _STLP_PRIV time_init<_Ch>(__name)
+ {}
+ time_put(_Locale_time *__time)
+ : _STLP_PRIV time_init<_Ch>(__time)
+ {}
+ ~time_put() {}
+ virtual iter_type do_put(iter_type __s, ios_base& __f,
+ char_type /* __fill */, const tm* __tmb,
+ char __format, char /* __modifier */) const;
+};
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+template <class _Ch, class _OutIt>
+#else
+template <class _Ch, class _OutIt = ostreambuf_iterator<_Ch, char_traits<_Ch> > >
+#endif
+class time_put_byname : public time_put<_Ch, _OutIt> {
+ friend class _Locale_impl;
+public:
+ typedef time_base::dateorder dateorder;
+ typedef _OutIt iter_type;
+ typedef _Ch char_type;
+
+ explicit time_put_byname(const char * __name, size_t __refs = 0)
+ : time_put<_Ch, _OutIt>(__name, __refs)
+ {}
+
+protected:
+ ~time_put_byname() {}
+
+private:
+ time_put_byname(_Locale_time *__time)
+ : time_put<_Ch, _OutIt>(__time)
+ {}
+
+ typedef time_put_byname<_Ch, _OutIt> _Self;
+ //explicitely defined as private to avoid warnings:
+ time_put_byname(_Self const&);
+ _Self& operator = (_Self const&);
+};
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS time_get<char, istreambuf_iterator<char, char_traits<char> > >;
+_STLP_EXPORT_TEMPLATE_CLASS time_put<char, ostreambuf_iterator<char, char_traits<char> > >;
+# if !defined (_STLP_NO_WCHAR_T)
+_STLP_EXPORT_TEMPLATE_CLASS time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+_STLP_EXPORT_TEMPLATE_CLASS time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
+# endif
+
+#endif
+
+_STLP_END_NAMESPACE
+
+#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_time_facets.c>
+#endif
+
+#endif /* _STLP_INTERNAL_TIME_FACETS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_tree.c b/6/sources/cxx-stl/stlport/stlport/stl/_tree.c
new file mode 100644
index 0000000..818fcc4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_tree.c
@@ -0,0 +1,730 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ * Modified CRP 7/10/00 for improved conformance / efficiency on insert_unique /
+ * insert_equal with valid hint -- efficiency is improved all around, and it is
+ * should now be standard conforming for complexity on insert point immediately
+ * after hint (amortized constant time).
+ *
+ */
+#ifndef _STLP_TREE_C
+#define _STLP_TREE_C
+
+#ifndef _STLP_INTERNAL_TREE_H
+# include <stl/_tree.h>
+#endif
+
+#if defined (_STLP_DEBUG)
+# define _Rb_tree _STLP_NON_DBG_NAME(Rb_tree)
+#endif
+
+// fbp: these defines are for outline methods definitions.
+// needed for definitions to be portable. Should not be used in method bodies.
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define __iterator__ _Rb_tree_iterator<_Value, _STLP_HEADER_TYPENAME _Traits::_NonConstTraits>
+# define __size_type__ size_t
+# define iterator __iterator__
+#else
+# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc>::iterator
+# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc>::size_type
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+
+template <class _Dummy> void _STLP_CALL
+_Rb_global<_Dummy>::_Rotate_left(_Rb_tree_node_base* __x,
+ _Rb_tree_node_base*& __root) {
+ _Rb_tree_node_base* __y = __x->_M_right;
+ __x->_M_right = __y->_M_left;
+ if (__y->_M_left != 0)
+ __y->_M_left->_M_parent = __x;
+ __y->_M_parent = __x->_M_parent;
+
+ if (__x == __root)
+ __root = __y;
+ else if (__x == __x->_M_parent->_M_left)
+ __x->_M_parent->_M_left = __y;
+ else
+ __x->_M_parent->_M_right = __y;
+ __y->_M_left = __x;
+ __x->_M_parent = __y;
+}
+
+template <class _Dummy> void _STLP_CALL
+_Rb_global<_Dummy>::_Rotate_right(_Rb_tree_node_base* __x,
+ _Rb_tree_node_base*& __root) {
+ _Rb_tree_node_base* __y = __x->_M_left;
+ __x->_M_left = __y->_M_right;
+ if (__y->_M_right != 0)
+ __y->_M_right->_M_parent = __x;
+ __y->_M_parent = __x->_M_parent;
+
+ if (__x == __root)
+ __root = __y;
+ else if (__x == __x->_M_parent->_M_right)
+ __x->_M_parent->_M_right = __y;
+ else
+ __x->_M_parent->_M_left = __y;
+ __y->_M_right = __x;
+ __x->_M_parent = __y;
+}
+
+template <class _Dummy> void _STLP_CALL
+_Rb_global<_Dummy>::_Rebalance(_Rb_tree_node_base* __x,
+ _Rb_tree_node_base*& __root) {
+ __x->_M_color = _S_rb_tree_red;
+ while (__x != __root && __x->_M_parent->_M_color == _S_rb_tree_red) {
+ if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) {
+ _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right;
+ if (__y && __y->_M_color == _S_rb_tree_red) {
+ __x->_M_parent->_M_color = _S_rb_tree_black;
+ __y->_M_color = _S_rb_tree_black;
+ __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
+ __x = __x->_M_parent->_M_parent;
+ }
+ else {
+ if (__x == __x->_M_parent->_M_right) {
+ __x = __x->_M_parent;
+ _Rotate_left(__x, __root);
+ }
+ __x->_M_parent->_M_color = _S_rb_tree_black;
+ __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
+ _Rotate_right(__x->_M_parent->_M_parent, __root);
+ }
+ }
+ else {
+ _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left;
+ if (__y && __y->_M_color == _S_rb_tree_red) {
+ __x->_M_parent->_M_color = _S_rb_tree_black;
+ __y->_M_color = _S_rb_tree_black;
+ __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
+ __x = __x->_M_parent->_M_parent;
+ }
+ else {
+ if (__x == __x->_M_parent->_M_left) {
+ __x = __x->_M_parent;
+ _Rotate_right(__x, __root);
+ }
+ __x->_M_parent->_M_color = _S_rb_tree_black;
+ __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
+ _Rotate_left(__x->_M_parent->_M_parent, __root);
+ }
+ }
+ }
+ __root->_M_color = _S_rb_tree_black;
+}
+
+template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
+_Rb_global<_Dummy>::_Rebalance_for_erase(_Rb_tree_node_base* __z,
+ _Rb_tree_node_base*& __root,
+ _Rb_tree_node_base*& __leftmost,
+ _Rb_tree_node_base*& __rightmost) {
+ _Rb_tree_node_base* __y = __z;
+ _Rb_tree_node_base* __x;
+ _Rb_tree_node_base* __x_parent;
+
+ if (__y->_M_left == 0) // __z has at most one non-null child. y == z.
+ __x = __y->_M_right; // __x might be null.
+ else {
+ if (__y->_M_right == 0) // __z has exactly one non-null child. y == z.
+ __x = __y->_M_left; // __x is not null.
+ else { // __z has two non-null children. Set __y to
+ __y = _Rb_tree_node_base::_S_minimum(__y->_M_right); // __z's successor. __x might be null.
+ __x = __y->_M_right;
+ }
+ }
+
+ if (__y != __z) { // relink y in place of z. y is z's successor
+ __z->_M_left->_M_parent = __y;
+ __y->_M_left = __z->_M_left;
+ if (__y != __z->_M_right) {
+ __x_parent = __y->_M_parent;
+ if (__x) __x->_M_parent = __y->_M_parent;
+ __y->_M_parent->_M_left = __x; // __y must be a child of _M_left
+ __y->_M_right = __z->_M_right;
+ __z->_M_right->_M_parent = __y;
+ }
+ else
+ __x_parent = __y;
+ if (__root == __z)
+ __root = __y;
+ else if (__z->_M_parent->_M_left == __z)
+ __z->_M_parent->_M_left = __y;
+ else
+ __z->_M_parent->_M_right = __y;
+ __y->_M_parent = __z->_M_parent;
+ _STLP_STD::swap(__y->_M_color, __z->_M_color);
+ __y = __z;
+ // __y now points to node to be actually deleted
+ }
+ else { // __y == __z
+ __x_parent = __y->_M_parent;
+ if (__x) __x->_M_parent = __y->_M_parent;
+ if (__root == __z)
+ __root = __x;
+ else {
+ if (__z->_M_parent->_M_left == __z)
+ __z->_M_parent->_M_left = __x;
+ else
+ __z->_M_parent->_M_right = __x;
+ }
+
+ if (__leftmost == __z) {
+ if (__z->_M_right == 0) // __z->_M_left must be null also
+ __leftmost = __z->_M_parent;
+ // makes __leftmost == _M_header if __z == __root
+ else
+ __leftmost = _Rb_tree_node_base::_S_minimum(__x);
+ }
+ if (__rightmost == __z) {
+ if (__z->_M_left == 0) // __z->_M_right must be null also
+ __rightmost = __z->_M_parent;
+ // makes __rightmost == _M_header if __z == __root
+ else // __x == __z->_M_left
+ __rightmost = _Rb_tree_node_base::_S_maximum(__x);
+ }
+ }
+
+ if (__y->_M_color != _S_rb_tree_red) {
+ while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black))
+ if (__x == __x_parent->_M_left) {
+ _Rb_tree_node_base* __w = __x_parent->_M_right;
+ if (__w->_M_color == _S_rb_tree_red) {
+ __w->_M_color = _S_rb_tree_black;
+ __x_parent->_M_color = _S_rb_tree_red;
+ _Rotate_left(__x_parent, __root);
+ __w = __x_parent->_M_right;
+ }
+ if ((__w->_M_left == 0 ||
+ __w->_M_left->_M_color == _S_rb_tree_black) && (__w->_M_right == 0 ||
+ __w->_M_right->_M_color == _S_rb_tree_black)) {
+ __w->_M_color = _S_rb_tree_red;
+ __x = __x_parent;
+ __x_parent = __x_parent->_M_parent;
+ } else {
+ if (__w->_M_right == 0 ||
+ __w->_M_right->_M_color == _S_rb_tree_black) {
+ if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black;
+ __w->_M_color = _S_rb_tree_red;
+ _Rotate_right(__w, __root);
+ __w = __x_parent->_M_right;
+ }
+ __w->_M_color = __x_parent->_M_color;
+ __x_parent->_M_color = _S_rb_tree_black;
+ if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black;
+ _Rotate_left(__x_parent, __root);
+ break;
+ }
+ } else { // same as above, with _M_right <-> _M_left.
+ _Rb_tree_node_base* __w = __x_parent->_M_left;
+ if (__w->_M_color == _S_rb_tree_red) {
+ __w->_M_color = _S_rb_tree_black;
+ __x_parent->_M_color = _S_rb_tree_red;
+ _Rotate_right(__x_parent, __root);
+ __w = __x_parent->_M_left;
+ }
+ if ((__w->_M_right == 0 ||
+ __w->_M_right->_M_color == _S_rb_tree_black) && (__w->_M_left == 0 ||
+ __w->_M_left->_M_color == _S_rb_tree_black)) {
+ __w->_M_color = _S_rb_tree_red;
+ __x = __x_parent;
+ __x_parent = __x_parent->_M_parent;
+ } else {
+ if (__w->_M_left == 0 ||
+ __w->_M_left->_M_color == _S_rb_tree_black) {
+ if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black;
+ __w->_M_color = _S_rb_tree_red;
+ _Rotate_left(__w, __root);
+ __w = __x_parent->_M_left;
+ }
+ __w->_M_color = __x_parent->_M_color;
+ __x_parent->_M_color = _S_rb_tree_black;
+ if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black;
+ _Rotate_right(__x_parent, __root);
+ break;
+ }
+ }
+ if (__x) __x->_M_color = _S_rb_tree_black;
+ }
+ return __y;
+}
+
+template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
+_Rb_global<_Dummy>::_M_decrement(_Rb_tree_node_base* _M_node) {
+ if (_M_node->_M_color == _S_rb_tree_red && _M_node->_M_parent->_M_parent == _M_node)
+ _M_node = _M_node->_M_right;
+ else if (_M_node->_M_left != 0) {
+ _M_node = _Rb_tree_node_base::_S_maximum(_M_node->_M_left);
+ }
+ else {
+ _Base_ptr __y = _M_node->_M_parent;
+ while (_M_node == __y->_M_left) {
+ _M_node = __y;
+ __y = __y->_M_parent;
+ }
+ _M_node = __y;
+ }
+ return _M_node;
+}
+
+template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
+_Rb_global<_Dummy>::_M_increment(_Rb_tree_node_base* _M_node) {
+ if (_M_node->_M_right != 0) {
+ _M_node = _Rb_tree_node_base::_S_minimum(_M_node->_M_right);
+ }
+ else {
+ _Base_ptr __y = _M_node->_M_parent;
+ while (_M_node == __y->_M_right) {
+ _M_node = __y;
+ __y = __y->_M_parent;
+ }
+ // check special case: This is necessary if _M_node is the
+ // _M_head and the tree contains only a single node __y. In
+ // that case parent, left and right all point to __y!
+ if (_M_node->_M_right != __y)
+ _M_node = __y;
+ }
+ return _M_node;
+}
+
+#endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
+
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc>&
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::operator=(
+ const _Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc>& __x) {
+ if (this != &__x) {
+ // Note that _Key may be a constant type.
+ clear();
+ _M_node_count = 0;
+ _M_key_compare = __x._M_key_compare;
+ if (__x._M_root() == 0) {
+ _M_root() = 0;
+ _M_leftmost() = &this->_M_header._M_data;
+ _M_rightmost() = &this->_M_header._M_data;
+ }
+ else {
+ _M_root() = _M_copy(__x._M_root(), &this->_M_header._M_data);
+ _M_leftmost() = _S_minimum(_M_root());
+ _M_rightmost() = _S_maximum(_M_root());
+ _M_node_count = __x._M_node_count;
+ }
+ }
+ return *this;
+}
+
+// CRP 7/10/00 inserted argument __on_right, which is another hint (meant to
+// act like __on_left and ignore a portion of the if conditions -- specify
+// __on_right != 0 to bypass comparison as false or __on_left != 0 to bypass
+// comparison as true)
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+__iterator__
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::_M_insert(_Rb_tree_node_base * __parent,
+ const _Value& __val,
+ _Rb_tree_node_base * __on_left,
+ _Rb_tree_node_base * __on_right) {
+ // We do not create the node here as, depending on tests, we might call
+ // _M_key_compare that can throw an exception.
+ _Base_ptr __new_node;
+
+ if ( __parent == &this->_M_header._M_data ) {
+ __new_node = _M_create_node(__val);
+ _S_left(__parent) = __new_node; // also makes _M_leftmost() = __new_node
+ _M_root() = __new_node;
+ _M_rightmost() = __new_node;
+ }
+ else if ( __on_right == 0 && // If __on_right != 0, the remainder fails to false
+ ( __on_left != 0 || // If __on_left != 0, the remainder succeeds to true
+ _M_key_compare( _KeyOfValue()(__val), _S_key(__parent) ) ) ) {
+ __new_node = _M_create_node(__val);
+ _S_left(__parent) = __new_node;
+ if (__parent == _M_leftmost())
+ _M_leftmost() = __new_node; // maintain _M_leftmost() pointing to min node
+ }
+ else {
+ __new_node = _M_create_node(__val);
+ _S_right(__parent) = __new_node;
+ if (__parent == _M_rightmost())
+ _M_rightmost() = __new_node; // maintain _M_rightmost() pointing to max node
+ }
+ _S_parent(__new_node) = __parent;
+ _Rb_global_inst::_Rebalance(__new_node, this->_M_header._M_data._M_parent);
+ ++_M_node_count;
+ return iterator(__new_node);
+}
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+__iterator__
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::insert_equal(const _Value& __val) {
+ _Base_ptr __y = &this->_M_header._M_data;
+ _Base_ptr __x = _M_root();
+ while (__x != 0) {
+ __y = __x;
+ if (_M_key_compare(_KeyOfValue()(__val), _S_key(__x))) {
+ __x = _S_left(__x);
+ }
+ else
+ __x = _S_right(__x);
+ }
+ return _M_insert(__y, __val, __x);
+}
+
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+pair<__iterator__, bool>
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::insert_unique(const _Value& __val) {
+ _Base_ptr __y = &this->_M_header._M_data;
+ _Base_ptr __x = _M_root();
+ bool __comp = true;
+ while (__x != 0) {
+ __y = __x;
+ __comp = _M_key_compare(_KeyOfValue()(__val), _S_key(__x));
+ __x = __comp ? _S_left(__x) : _S_right(__x);
+ }
+ iterator __j = iterator(__y);
+ if (__comp) {
+ if (__j == begin())
+ return pair<iterator,bool>(_M_insert(__y, __val, /* __x*/ __y), true);
+ else
+ --__j;
+ }
+ if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__val))) {
+ return pair<iterator,bool>(_M_insert(__y, __val, __x), true);
+ }
+ return pair<iterator,bool>(__j, false);
+}
+
+// Modifications CRP 7/10/00 as noted to improve conformance and
+// efficiency.
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+__iterator__
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::insert_unique(iterator __position,
+ const _Value& __val) {
+ if (__position._M_node == this->_M_header._M_data._M_left) { // begin()
+
+ // if the container is empty, fall back on insert_unique.
+ if (empty())
+ return insert_unique(__val).first;
+
+ if (_M_key_compare(_KeyOfValue()(__val), _S_key(__position._M_node))) {
+ return _M_insert(__position._M_node, __val, __position._M_node);
+ }
+ // first argument just needs to be non-null
+ else {
+ bool __comp_pos_v = _M_key_compare( _S_key(__position._M_node), _KeyOfValue()(__val) );
+
+ if (__comp_pos_v == false) // compare > and compare < both false so compare equal
+ return __position;
+ //Below __comp_pos_v == true
+
+ // Standard-conformance - does the insertion point fall immediately AFTER
+ // the hint?
+ iterator __after = __position;
+ ++__after;
+
+ // Check for only one member -- in that case, __position points to itself,
+ // and attempting to increment will cause an infinite loop.
+ if (__after._M_node == &this->_M_header._M_data)
+ // Check guarantees exactly one member, so comparison was already
+ // performed and we know the result; skip repeating it in _M_insert
+ // by specifying a non-zero fourth argument.
+ return _M_insert(__position._M_node, __val, 0, __position._M_node);
+
+ // All other cases:
+
+ // Optimization to catch insert-equivalent -- save comparison results,
+ // and we get this for free.
+ if (_M_key_compare( _KeyOfValue()(__val), _S_key(__after._M_node) )) {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert(__position._M_node, __val, 0, __position._M_node);
+ else
+ return _M_insert(__after._M_node, __val, __after._M_node);
+ }
+ else {
+ return insert_unique(__val).first;
+ }
+ }
+ }
+ else if (__position._M_node == &this->_M_header._M_data) { // end()
+ if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__val))) {
+ // pass along to _M_insert that it can skip comparing
+ // v, Key ; since compare Key, v was true, compare v, Key must be false.
+ return _M_insert(_M_rightmost(), __val, 0, __position._M_node); // Last argument only needs to be non-null
+ }
+ else
+ return insert_unique(__val).first;
+ }
+ else {
+ iterator __before = __position;
+ --__before;
+
+ bool __comp_v_pos = _M_key_compare(_KeyOfValue()(__val), _S_key(__position._M_node));
+
+ if (__comp_v_pos
+ && _M_key_compare( _S_key(__before._M_node), _KeyOfValue()(__val) )) {
+
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert(__before._M_node, __val, 0, __before._M_node); // Last argument only needs to be non-null
+ else
+ return _M_insert(__position._M_node, __val, __position._M_node);
+ // first argument just needs to be non-null
+ }
+ else {
+ // Does the insertion point fall immediately AFTER the hint?
+ iterator __after = __position;
+ ++__after;
+ // Optimization to catch equivalent cases and avoid unnecessary comparisons
+ bool __comp_pos_v = !__comp_v_pos; // Stored this result earlier
+ // If the earlier comparison was true, this comparison doesn't need to be
+ // performed because it must be false. However, if the earlier comparison
+ // was false, we need to perform this one because in the equal case, both will
+ // be false.
+ if (!__comp_v_pos) {
+ __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__val));
+ }
+
+ if ( (!__comp_v_pos) // comp_v_pos true implies comp_v_pos false
+ && __comp_pos_v
+ && (__after._M_node == &this->_M_header._M_data ||
+ _M_key_compare( _KeyOfValue()(__val), _S_key(__after._M_node) ))) {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert(__position._M_node, __val, 0, __position._M_node);
+ else
+ return _M_insert(__after._M_node, __val, __after._M_node);
+ } else {
+ // Test for equivalent case
+ if (__comp_v_pos == __comp_pos_v)
+ return __position;
+ else
+ return insert_unique(__val).first;
+ }
+ }
+ }
+}
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+__iterator__
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::insert_equal(iterator __position,
+ const _Value& __val) {
+ if (__position._M_node == this->_M_header._M_data._M_left) { // begin()
+
+ // Check for zero members
+ if (size() <= 0)
+ return insert_equal(__val);
+
+ if (!_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__val)))
+ return _M_insert(__position._M_node, __val, __position._M_node);
+ else {
+ // Check for only one member
+ if (__position._M_node->_M_left == __position._M_node)
+ // Unlike insert_unique, can't avoid doing a comparison here.
+ return _M_insert(__position._M_node, __val);
+
+ // All other cases:
+ // Standard-conformance - does the insertion point fall immediately AFTER
+ // the hint?
+ iterator __after = __position;
+ ++__after;
+
+ // Already know that compare(pos, v) must be true!
+ // Therefore, we want to know if compare(after, v) is false.
+ // (i.e., we now pos < v, now we want to know if v <= after)
+ // If not, invalid hint.
+ if ( __after._M_node == &this->_M_header._M_data ||
+ !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__val) ) ) {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert(__position._M_node, __val, 0, __position._M_node);
+ else
+ return _M_insert(__after._M_node, __val, __after._M_node);
+ }
+ else { // Invalid hint
+ return insert_equal(__val);
+ }
+ }
+ }
+ else if (__position._M_node == &this->_M_header._M_data) { // end()
+ if (!_M_key_compare(_KeyOfValue()(__val), _S_key(_M_rightmost())))
+ return _M_insert(_M_rightmost(), __val, 0, __position._M_node); // Last argument only needs to be non-null
+ else {
+ return insert_equal(__val);
+ }
+ }
+ else {
+ iterator __before = __position;
+ --__before;
+ // store the result of the comparison between pos and v so
+ // that we don't have to do it again later. Note that this reverses the shortcut
+ // on the if, possibly harming efficiency in comparisons; I think the harm will
+ // be negligible, and to do what I want to do (save the result of a comparison so
+ // that it can be re-used) there is no alternative. Test here is for before <= v <= pos.
+ bool __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__val));
+ if (!__comp_pos_v &&
+ !_M_key_compare(_KeyOfValue()(__val), _S_key(__before._M_node))) {
+ if (_S_right(__before._M_node) == 0)
+ return _M_insert(__before._M_node, __val, 0, __before._M_node); // Last argument only needs to be non-null
+ else
+ return _M_insert(__position._M_node, __val, __position._M_node);
+ }
+ else {
+ // Does the insertion point fall immediately AFTER the hint?
+ // Test for pos < v <= after
+ iterator __after = __position;
+ ++__after;
+
+ if (__comp_pos_v &&
+ ( __after._M_node == &this->_M_header._M_data ||
+ !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__val) ) ) ) {
+ if (_S_right(__position._M_node) == 0)
+ return _M_insert(__position._M_node, __val, 0, __position._M_node);
+ else
+ return _M_insert(__after._M_node, __val, __after._M_node);
+ }
+ else { // Invalid hint
+ return insert_equal(__val);
+ }
+ }
+ }
+}
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+_Rb_tree_node_base*
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc> ::_M_copy(_Rb_tree_node_base* __x,
+ _Rb_tree_node_base* __p) {
+ // structural copy. __x and __p must be non-null.
+ _Base_ptr __top = _M_clone_node(__x);
+ _S_parent(__top) = __p;
+
+ _STLP_TRY {
+ if (_S_right(__x))
+ _S_right(__top) = _M_copy(_S_right(__x), __top);
+ __p = __top;
+ __x = _S_left(__x);
+
+ while (__x != 0) {
+ _Base_ptr __y = _M_clone_node(__x);
+ _S_left(__p) = __y;
+ _S_parent(__y) = __p;
+ if (_S_right(__x))
+ _S_right(__y) = _M_copy(_S_right(__x), __y);
+ __p = __y;
+ __x = _S_left(__x);
+ }
+ }
+ _STLP_UNWIND(_M_erase(__top))
+
+ return __top;
+}
+
+// this has to stay out-of-line : it's recursive
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+void
+_Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc>::_M_erase(_Rb_tree_node_base *__x) {
+ // erase without rebalancing
+ while (__x != 0) {
+ _M_erase(_S_right(__x));
+ _Base_ptr __y = _S_left(__x);
+ _STLP_STD::_Destroy(&_S_value(__x));
+ this->_M_header.deallocate(__STATIC_CAST(_Link_type, __x),1);
+ __x = __y;
+ }
+}
+
+#if defined (_STLP_DEBUG)
+inline int
+__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root) {
+ if (__node == 0)
+ return 0;
+ else {
+ int __bc = __node->_M_color == _S_rb_tree_black ? 1 : 0;
+ if (__node == __root)
+ return __bc;
+ else
+ return __bc + __black_count(__node->_M_parent, __root);
+ }
+}
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+bool _Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc>::__rb_verify() const {
+ if (_M_node_count == 0 || begin() == end())
+ return ((_M_node_count == 0) &&
+ (begin() == end()) &&
+ (this->_M_header._M_data._M_left == &this->_M_header._M_data) &&
+ (this->_M_header._M_data._M_right == &this->_M_header._M_data));
+
+ int __len = __black_count(_M_leftmost(), _M_root());
+ for (const_iterator __it = begin(); __it != end(); ++__it) {
+ _Base_ptr __x = __it._M_node;
+ _Base_ptr __L = _S_left(__x);
+ _Base_ptr __R = _S_right(__x);
+
+ if (__x->_M_color == _S_rb_tree_red)
+ if ((__L && __L->_M_color == _S_rb_tree_red) ||
+ (__R && __R->_M_color == _S_rb_tree_red))
+ return false;
+
+ if (__L && _M_key_compare(_S_key(__x), _S_key(__L)))
+ return false;
+ if (__R && _M_key_compare(_S_key(__R), _S_key(__x)))
+ return false;
+
+ if (!__L && !__R && __black_count(__x, _M_root()) != __len)
+ return false;
+ }
+
+ if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
+ return false;
+ if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
+ return false;
+
+ return true;
+}
+#endif /* _STLP_DEBUG */
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+#undef _Rb_tree
+#undef __iterator__
+#undef iterator
+#undef __size_type__
+
+#endif /* _STLP_TREE_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_tree.h b/6/sources/cxx-stl/stlport/stlport/stl/_tree.h
new file mode 100644
index 0000000..bf05901
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_tree.h
@@ -0,0 +1,684 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_TREE_H
+#define _STLP_INTERNAL_TREE_H
+
+/*
+
+Red-black tree class, designed for use in implementing STL
+associative containers (set, multiset, map, and multimap). The
+insertion and deletion algorithms are based on those in Cormen,
+Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),
+except that
+
+(1) the header cell is maintained with links not only to the root
+but also to the leftmost node of the tree, to enable constant time
+begin(), and to the rightmost node of the tree, to enable linear time
+performance when used with the generic set algorithms (set_union,
+etc.);
+
+(2) when a node being deleted has two children its successor node is
+relinked into its place, rather than copied, so that the only
+iterators invalidated are those referring to the deleted node.
+
+*/
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+typedef bool _Rb_tree_Color_type;
+//const _Rb_tree_Color_type _S_rb_tree_red = false;
+//const _Rb_tree_Color_type _S_rb_tree_black = true;
+
+#define _S_rb_tree_red false
+#define _S_rb_tree_black true
+
+struct _Rb_tree_node_base {
+ typedef _Rb_tree_Color_type _Color_type;
+ typedef _Rb_tree_node_base* _Base_ptr;
+
+ _Color_type _M_color;
+ _Base_ptr _M_parent;
+ _Base_ptr _M_left;
+ _Base_ptr _M_right;
+
+ static _Base_ptr _STLP_CALL _S_minimum(_Base_ptr __x) {
+ while (__x->_M_left != 0) __x = __x->_M_left;
+ return __x;
+ }
+
+ static _Base_ptr _STLP_CALL _S_maximum(_Base_ptr __x) {
+ while (__x->_M_right != 0) __x = __x->_M_right;
+ return __x;
+ }
+};
+
+template <class _Value>
+struct _Rb_tree_node : public _Rb_tree_node_base {
+ _Value _M_value_field;
+ __TRIVIAL_STUFF(_Rb_tree_node)
+};
+
+struct _Rb_tree_base_iterator;
+
+template <class _Dummy>
+class _Rb_global {
+public:
+ typedef _Rb_tree_node_base* _Base_ptr;
+ // those used to be global functions
+ static void _STLP_CALL _Rebalance(_Base_ptr __x, _Base_ptr& __root);
+ static _Base_ptr _STLP_CALL _Rebalance_for_erase(_Base_ptr __z,
+ _Base_ptr& __root,
+ _Base_ptr& __leftmost,
+ _Base_ptr& __rightmost);
+ // those are from _Rb_tree_base_iterator - moved here to reduce code bloat
+ // moved here to reduce code bloat without templatizing _Rb_tree_base_iterator
+ static _Base_ptr _STLP_CALL _M_increment (_Base_ptr);
+ static _Base_ptr _STLP_CALL _M_decrement (_Base_ptr);
+ static void _STLP_CALL _Rotate_left (_Base_ptr __x, _Base_ptr& __root);
+ static void _STLP_CALL _Rotate_right(_Base_ptr __x, _Base_ptr& __root);
+};
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS _Rb_global<bool>;
+# endif
+
+typedef _Rb_global<bool> _Rb_global_inst;
+
+struct _Rb_tree_base_iterator {
+ typedef _Rb_tree_node_base* _Base_ptr;
+ typedef bidirectional_iterator_tag iterator_category;
+ typedef ptrdiff_t difference_type;
+ _Base_ptr _M_node;
+ _Rb_tree_base_iterator() : _M_node(0) {}
+ _Rb_tree_base_iterator(_Base_ptr __x) : _M_node(__x) {}
+};
+
+template <class _Value, class _Traits>
+struct _Rb_tree_iterator : public _Rb_tree_base_iterator {
+ typedef _Value value_type;
+ typedef typename _Traits::reference reference;
+ typedef typename _Traits::pointer pointer;
+ typedef _Rb_tree_iterator<_Value, _Traits> _Self;
+ typedef _Rb_tree_node_base* _Base_ptr;
+ typedef _Rb_tree_node<_Value>* _Link_type;
+
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef _Rb_tree_iterator<_Value, _NonConstTraits> iterator;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef _Rb_tree_iterator<_Value, _ConstTraits> const_iterator;
+
+ _Rb_tree_iterator() {}
+#if !defined (_STLP_DEBUG)
+ /* In STL debug mode we need this constructor implicit for the pointer
+ * specialization implementation.
+ */
+ explicit
+#endif
+ _Rb_tree_iterator(_Base_ptr __x) : _Rb_tree_base_iterator(__x) {}
+ //copy constructor for iterator and constructor from iterator for const_iterator
+ _Rb_tree_iterator(const iterator& __it) : _Rb_tree_base_iterator(__it._M_node) {}
+
+ reference operator*() const {
+ return __STATIC_CAST(_Link_type, _M_node)->_M_value_field;
+ }
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ _M_node = _Rb_global_inst::_M_increment(_M_node);
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ ++(*this);
+ return __tmp;
+ }
+
+ _Self& operator--() {
+ _M_node = _Rb_global_inst::_M_decrement(_M_node);
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ --(*this);
+ return __tmp;
+ }
+
+ bool operator == (const_iterator __rhs) const {
+ return _M_node == __rhs._M_node;
+ }
+ bool operator != (const_iterator __rhs) const {
+ return _M_node != __rhs._M_node;
+ }
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Value, class _Traits>
+struct __type_traits<_STLP_PRIV _Rb_tree_iterator<_Value, _Traits> > {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Value, class _Traits>
+inline _Value* value_type(const _STLP_PRIV _Rb_tree_iterator<_Value, _Traits>&)
+{ return (_Value*)0; }
+inline bidirectional_iterator_tag iterator_category(const _STLP_PRIV _Rb_tree_base_iterator&)
+{ return bidirectional_iterator_tag(); }
+inline ptrdiff_t* distance_type(const _STLP_PRIV _Rb_tree_base_iterator&)
+{ return (ptrdiff_t*) 0; }
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+// Base class to help EH
+
+template <class _Tp, class _Alloc>
+class _Rb_tree_base {
+public:
+ typedef _Rb_tree_node_base _Node_base;
+ typedef _Rb_tree_node<_Tp> _Node;
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef _Alloc allocator_type;
+private:
+ typedef _Rb_tree_base<_Tp, _Alloc> _Self;
+ typedef typename _Alloc_traits<_Node, _Alloc>::allocator_type _M_node_allocator_type;
+ typedef _STLP_alloc_proxy<_Node_base, _Node, _M_node_allocator_type> _AllocProxy;
+
+public:
+ allocator_type get_allocator() const {
+ return _STLP_CONVERT_ALLOCATOR(_M_header, _Tp);
+ }
+
+protected:
+ _Rb_tree_base(const allocator_type& __a) :
+ _M_header(_STLP_CONVERT_ALLOCATOR(__a, _Node), _Node_base() ) {
+ _M_empty_initialize();
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Rb_tree_base(__move_source<_Self> src) :
+ _M_header(__move_source<_AllocProxy>(src.get()._M_header)) {
+ _M_rebind(&src.get()._M_header._M_data);
+ src.get()._M_empty_initialize();
+ }
+#endif
+
+ void _M_empty_initialize() {
+ _M_header._M_data._M_color = _S_rb_tree_red; // used to distinguish header from
+ // __root, in iterator.operator++
+ _M_header._M_data._M_parent = 0;
+ _M_header._M_data._M_left = &_M_header._M_data;
+ _M_header._M_data._M_right = &_M_header._M_data;
+ }
+
+ void _M_rebind(_Node_base *__static_node) {
+ if (_M_header._M_data._M_parent != 0) {
+ _M_header._M_data._M_parent->_M_parent = &_M_header._M_data;
+ }
+ if (_M_header._M_data._M_right == __static_node) {
+ _M_header._M_data._M_right = &_M_header._M_data;
+ }
+ if (_M_header._M_data._M_left == __static_node) {
+ _M_header._M_data._M_left = &_M_header._M_data;
+ }
+ }
+
+ _AllocProxy _M_header;
+};
+
+#if defined (_STLP_DEBUG)
+# define _Rb_tree _STLP_NON_DBG_NAME(Rb_tree)
+#endif
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits,
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class _Rb_tree : public _Rb_tree_base<_Value, _Alloc> {
+ typedef _Rb_tree_base<_Value, _Alloc> _Base;
+ typedef _Rb_tree<_Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc> _Self;
+protected:
+ typedef _Rb_tree_node_base * _Base_ptr;
+ typedef _Rb_tree_node<_Value> _Node;
+ typedef _Node* _Link_type;
+ typedef _Rb_tree_Color_type _Color_type;
+public:
+ typedef _Key key_type;
+ typedef _Value value_type;
+ typedef typename _Traits::pointer pointer;
+ typedef const value_type* const_pointer;
+ typedef typename _Traits::reference reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef bidirectional_iterator_tag _Iterator_category;
+ typedef typename _Base::allocator_type allocator_type;
+
+protected:
+
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+ _Base_ptr _M_create_node(const value_type& __x) {
+ _Link_type __tmp = this->_M_header.allocate(1);
+ _STLP_TRY {
+ _Copy_Construct(&__tmp->_M_value_field, __x);
+ }
+ _STLP_UNWIND(this->_M_header.deallocate(__tmp,1))
+ _S_left(__tmp) = 0;
+ _S_right(__tmp) = 0;
+ return __tmp;
+ }
+
+ _Base_ptr _M_clone_node(_Base_ptr __x) {
+ _Base_ptr __tmp = _M_create_node(_S_value(__x));
+ _S_color(__tmp) = _S_color(__x);
+ return __tmp;
+ }
+
+ size_type _M_node_count; // keeps track of size of tree
+ _Compare _M_key_compare;
+
+ _Base_ptr _M_root() const
+ { return this->_M_header._M_data._M_parent; }
+ _Base_ptr _M_leftmost() const
+ { return this->_M_header._M_data._M_left; }
+ _Base_ptr _M_rightmost() const
+ { return this->_M_header._M_data._M_right; }
+
+ _Base_ptr& _M_root()
+ { return this->_M_header._M_data._M_parent; }
+ _Base_ptr& _M_leftmost()
+ { return this->_M_header._M_data._M_left; }
+ _Base_ptr& _M_rightmost()
+ { return this->_M_header._M_data._M_right; }
+
+ static _Base_ptr& _STLP_CALL _S_left(_Base_ptr __x)
+ { return __x->_M_left; }
+ static _Base_ptr& _STLP_CALL _S_right(_Base_ptr __x)
+ { return __x->_M_right; }
+ static _Base_ptr& _STLP_CALL _S_parent(_Base_ptr __x)
+ { return __x->_M_parent; }
+ static value_type& _STLP_CALL _S_value(_Base_ptr __x)
+ { return __STATIC_CAST(_Link_type, __x)->_M_value_field; }
+ static const _Key& _STLP_CALL _S_key(_Base_ptr __x)
+ { return _KeyOfValue()(_S_value(__x));}
+ static _Color_type& _STLP_CALL _S_color(_Base_ptr __x)
+ { return (_Color_type&)(__x->_M_color); }
+
+ static _Base_ptr _STLP_CALL _S_minimum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_minimum(__x); }
+
+ static _Base_ptr _STLP_CALL _S_maximum(_Base_ptr __x)
+ { return _Rb_tree_node_base::_S_maximum(__x); }
+
+public:
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef _Rb_tree_iterator<value_type, _NonConstTraits> iterator;
+ typedef _Rb_tree_iterator<value_type, _ConstTraits> const_iterator;
+ _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
+
+private:
+ iterator _M_insert(_Base_ptr __parent, const value_type& __val, _Base_ptr __on_left = 0, _Base_ptr __on_right = 0);
+ _Base_ptr _M_copy(_Base_ptr __x, _Base_ptr __p);
+ void _M_erase(_Base_ptr __x);
+
+public:
+ // allocation/deallocation
+ _Rb_tree()
+ : _Rb_tree_base<_Value, _Alloc>(allocator_type()), _M_node_count(0), _M_key_compare(_Compare())
+ {}
+
+ _Rb_tree(const _Compare& __comp)
+ : _Rb_tree_base<_Value, _Alloc>(allocator_type()), _M_node_count(0), _M_key_compare(__comp)
+ {}
+
+ _Rb_tree(const _Compare& __comp, const allocator_type& __a)
+ : _Rb_tree_base<_Value, _Alloc>(__a), _M_node_count(0), _M_key_compare(__comp)
+ {}
+
+ _Rb_tree(const _Self& __x)
+ : _Rb_tree_base<_Value, _Alloc>(__x.get_allocator()),
+ _M_node_count(0), _M_key_compare(__x._M_key_compare) {
+ if (__x._M_root() != 0) {
+ _S_color(&this->_M_header._M_data) = _S_rb_tree_red;
+ _M_root() = _M_copy(__x._M_root(), &this->_M_header._M_data);
+ _M_leftmost() = _S_minimum(_M_root());
+ _M_rightmost() = _S_maximum(_M_root());
+ }
+ _M_node_count = __x._M_node_count;
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Rb_tree(__move_source<_Self> src)
+ : _Rb_tree_base<_Value, _Alloc>(__move_source<_Base>(src.get())),
+ _M_node_count(src.get()._M_node_count),
+ _M_key_compare(_AsMoveSource(src.get()._M_key_compare))
+ { src.get()._M_node_count = 0; }
+#endif
+
+ ~_Rb_tree() { clear(); }
+ _Self& operator=(const _Self& __x);
+
+public:
+ // accessors:
+ _Compare key_comp() const { return _M_key_compare; }
+
+ iterator begin() { return iterator(_M_leftmost()); }
+ const_iterator begin() const { return const_iterator(_M_leftmost()); }
+ iterator end() { return iterator(&this->_M_header._M_data); }
+ const_iterator end() const { return const_iterator(__CONST_CAST(_Base_ptr, &this->_M_header._M_data)); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(begin()); }
+ bool empty() const { return _M_node_count == 0; }
+ size_type size() const { return _M_node_count; }
+ size_type max_size() const { return size_type(-1); }
+
+ void swap(_Self& __t) {
+ if (__t.empty()) {
+ if (this->empty()) return;
+ __t._M_header.swap(this->_M_header);
+ __t._M_rebind(&this->_M_header._M_data);
+ this->_M_empty_initialize();
+ }
+ else if (this->empty()) {
+ __t.swap(*this);
+ return;
+ }
+ else {
+ this->_M_header.swap(__t._M_header);
+ this->_M_rebind(&__t._M_header._M_data);
+ __t._M_rebind(&this->_M_header._M_data);
+ }
+ _STLP_STD::swap(_M_node_count, __t._M_node_count);
+ _STLP_STD::swap(_M_key_compare, __t._M_key_compare);
+ }
+
+public:
+ // insert/erase
+ pair<iterator,bool> insert_unique(const value_type& __x);
+ iterator insert_equal(const value_type& __x);
+
+ iterator insert_unique(iterator __pos, const value_type& __x);
+ iterator insert_equal(iterator __pos, const value_type& __x);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template<class _II> void insert_equal(_II __first, _II __last) {
+ for ( ; __first != __last; ++__first)
+ insert_equal(*__first);
+ }
+ template<class _II> void insert_unique(_II __first, _II __last) {
+ for ( ; __first != __last; ++__first)
+ insert_unique(*__first);
+ }
+#else
+ void insert_unique(const_iterator __first, const_iterator __last) {
+ for ( ; __first != __last; ++__first)
+ insert_unique(*__first);
+ }
+ void insert_unique(const value_type* __first, const value_type* __last) {
+ for ( ; __first != __last; ++__first)
+ insert_unique(*__first);
+ }
+ void insert_equal(const_iterator __first, const_iterator __last) {
+ for ( ; __first != __last; ++__first)
+ insert_equal(*__first);
+ }
+ void insert_equal(const value_type* __first, const value_type* __last) {
+ for ( ; __first != __last; ++__first)
+ insert_equal(*__first);
+ }
+#endif
+
+ void erase(iterator __pos) {
+ _Base_ptr __x = _Rb_global_inst::_Rebalance_for_erase(__pos._M_node,
+ this->_M_header._M_data._M_parent,
+ this->_M_header._M_data._M_left,
+ this->_M_header._M_data._M_right);
+ _STLP_STD::_Destroy(&_S_value(__x));
+ this->_M_header.deallocate(__STATIC_CAST(_Link_type, __x), 1);
+ --_M_node_count;
+ }
+
+ size_type erase(const key_type& __x) {
+ pair<iterator,iterator> __p = equal_range(__x);
+ size_type __n = _STLP_STD::distance(__p.first, __p.second);
+ erase(__p.first, __p.second);
+ return __n;
+ }
+
+ size_type erase_unique(const key_type& __x) {
+ iterator __i = find(__x);
+ if (__i._M_node != &this->_M_header._M_data) {
+ erase(__i);
+ return 1;
+ }
+ return 0;
+ }
+
+ void erase(iterator __first, iterator __last) {
+ if (__first._M_node == this->_M_header._M_data._M_left && // begin()
+ __last._M_node == &this->_M_header._M_data) // end()
+ clear();
+ else
+ while (__first != __last) erase(__first++);
+ }
+
+ void erase(const key_type* __first, const key_type* __last) {
+ while (__first != __last) erase(*__first++);
+ }
+
+ void clear() {
+ if (_M_node_count != 0) {
+ _M_erase(_M_root());
+ _M_leftmost() = &this->_M_header._M_data;
+ _M_root() = 0;
+ _M_rightmost() = &this->_M_header._M_data;
+ _M_node_count = 0;
+ }
+ }
+
+public:
+ // set operations:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __k) { return iterator(_M_find(__k)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __k) const { return const_iterator(_M_find(__k)); }
+private:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Base_ptr _M_find(const _KT& __k) const {
+ _Base_ptr __y = __CONST_CAST(_Base_ptr, &this->_M_header._M_data); // Last node which is not less than __k.
+ _Base_ptr __x = _M_root(); // Current node.
+
+ while (__x != 0)
+ if (!_M_key_compare(_S_key(__x), __k))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+
+ if (__y != &this->_M_header._M_data) {
+ if (_M_key_compare(__k, _S_key(__y))) {
+ __y = __CONST_CAST(_Base_ptr, &this->_M_header._M_data);
+ }
+ }
+ return __y;
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Base_ptr _M_lower_bound(const _KT& __k) const {
+ _Base_ptr __y = __CONST_CAST(_Base_ptr, &this->_M_header._M_data); /* Last node which is not less than __k. */
+ _Base_ptr __x = _M_root(); /* Current node. */
+
+ while (__x != 0)
+ if (!_M_key_compare(_S_key(__x), __k))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+
+ return __y;
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Base_ptr _M_upper_bound(const _KT& __k) const {
+ _Base_ptr __y = __CONST_CAST(_Base_ptr, &this->_M_header._M_data); /* Last node which is greater than __k. */
+ _Base_ptr __x = _M_root(); /* Current node. */
+
+ while (__x != 0)
+ if (_M_key_compare(__k, _S_key(__x)))
+ __y = __x, __x = _S_left(__x);
+ else
+ __x = _S_right(__x);
+
+ return __y;
+ }
+
+public:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const {
+ pair<const_iterator, const_iterator> __p = equal_range(__x);
+ return _STLP_STD::distance(__p.first, __p.second);
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x) { return iterator(_M_lower_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const { return const_iterator(_M_lower_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x) { return iterator(_M_upper_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const { return const_iterator(_M_upper_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range(const _KT& __x)
+ { return pair<iterator, iterator>(lower_bound(__x), upper_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const
+ { return pair<const_iterator, const_iterator>(lower_bound(__x), upper_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range_unique(const _KT& __x) {
+ pair<iterator, iterator> __p;
+ __p.second = lower_bound(__x);
+ if (__p.second._M_node != &this->_M_header._M_data &&
+ !_M_key_compare(__x, _S_key(__p.second._M_node))) {
+ __p.first = __p.second++;
+ }
+ else {
+ __p.first = __p.second;
+ }
+ return __p;
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range_unique(const _KT& __x) const {
+ pair<const_iterator, const_iterator> __p;
+ __p.second = lower_bound(__x);
+ if (__p.second._M_node != &this->_M_header._M_data &&
+ !_M_key_compare(__x, _S_key(__p.second._M_node))) {
+ __p.first = __p.second++;
+ }
+ else {
+ __p.first = __p.second;
+ }
+ return __p;
+ }
+
+#if defined (_STLP_DEBUG)
+public:
+ // Debugging.
+ bool __rb_verify() const;
+#endif //_STLP_DEBUG
+};
+
+#if defined (_STLP_DEBUG)
+# undef _Rb_tree
+#endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_tree.c>
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_tree.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define _STLP_TEMPLATE_HEADER template <class _Key, class _Compare, class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER _STLP_PRIV _Rb_tree<_Key,_Compare,_Value,_KeyOfValue,_Traits,_Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Key, class _Compare, class _Value, class _KeyOfValue, class _Traits, class _Alloc>
+struct __move_traits<_STLP_PRIV _Rb_tree<_Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc> >
+ : _STLP_PRIV __move_traits_help2<_Compare, _Alloc> {};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_TREE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_typeinfo.h b/6/sources/cxx-stl/stlport/stlport/stl/_typeinfo.h
new file mode 100644
index 0000000..843ba56
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_typeinfo.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_INTERNAL_TYPEINFO
+#define _STLP_INTERNAL_TYPEINFO
+
+#if !defined (_STLP_NO_TYPEINFO)
+
+# if defined (_STLP_NO_NEW_NEW_HEADER)
+# include <typeinfo.h>
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <typeinfo>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
+# endif
+# endif
+
+# if (defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800))
+// In .NET, <typeinfo> actually includes <typeinfo.h>
+# undef _STLP_OLDSTD_typeinfo
+# endif
+
+// if <typeinfo.h> already included, do not import anything
+# if defined(_STLP_USE_NAMESPACES) && !defined(_STLP_OLDSTD_typeinfo) && \
+ (defined(_STLP_VENDOR_GLOBAL_EXCEPT_STD) || \
+ defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG))
+# if defined(_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined(_STLP_WCE_NET)
+class bad_cast : public exception {};
+# endif
+
+_STLP_BEGIN_NAMESPACE
+// VC 6 and eVC 4 have type_info in the global namespace
+# if (defined(_STLP_MSVC) && (_STLP_MSVC < 1300)) || defined(_STLP_WCE_NET)
+using ::type_info;
+# else
+using _STLP_VENDOR_EXCEPT_STD::type_info;
+# endif
+
+# if !defined (__DMC__)
+using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
+# endif
+
+# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) && !defined (_STLP_WCE_NET)
+using ::bad_cast;
+# else
+using _STLP_VENDOR_EXCEPT_STD::bad_cast;
+# endif
+
+_STLP_END_NAMESPACE
+
+# endif
+
+#else
+
+# ifndef _STLP_INTERNAL_EXCEPTION
+# include <stl/_exception.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+# if !defined (__DMC__)
+struct bad_cast : exception {};
+# endif
+_STLP_END_NAMESPACE
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_uninitialized.h b/6/sources/cxx-stl/stlport/stlport/stl/_uninitialized.h
new file mode 100644
index 0000000..5489a94
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_uninitialized.h
@@ -0,0 +1,443 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+#define _STLP_INTERNAL_UNINITIALIZED_H
+
+#ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+// uninitialized_copy
+
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __ucopy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, _Distance*) {
+ _OutputIter __cur = __result;
+ _STLP_TRY {
+ for ( ; __first != __last; ++__first, ++__cur)
+ _Param_Construct(&*__cur, *__first);
+ return __cur;
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__result, __cur))
+ _STLP_RET_AFTER_THROW(__cur)
+}
+
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __ucopy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const input_iterator_tag &, _Distance* __d)
+{ return __ucopy(__first, __last, __result, __d); }
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __ucopy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const forward_iterator_tag &, _Distance* __d)
+{ return __ucopy(__first, __last, __result, __d); }
+
+template <class _InputIter, class _OutputIter, class _Distance>
+inline _OutputIter __ucopy(_InputIter __first, _InputIter __last,
+ _OutputIter __result, const bidirectional_iterator_tag &, _Distance* __d)
+{ return __ucopy(__first, __last, __result, __d); }
+#endif
+
+template <class _RandomAccessIter, class _OutputIter, class _Distance>
+inline _OutputIter __ucopy(_RandomAccessIter __first, _RandomAccessIter __last,
+ _OutputIter __result, const random_access_iterator_tag &, _Distance*) {
+ _OutputIter __cur = __result;
+ _STLP_TRY {
+ for (_Distance __n = __last - __first; __n > 0; --__n) {
+ _Param_Construct(&*__cur, *__first);
+ ++__first;
+ ++__cur;
+ }
+ return __cur;
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__result, __cur))
+ _STLP_RET_AFTER_THROW(__cur)
+}
+
+//Used internaly
+template <class _RandomAccessIter, class _OutputIter>
+inline _OutputIter __ucopy(_RandomAccessIter __first, _RandomAccessIter __last, _OutputIter __result)
+{ return __ucopy(__first, __last, __result, random_access_iterator_tag(), (ptrdiff_t*)0); }
+
+inline void*
+__ucopy_trivial(const void* __first, const void* __last, void* __result) {
+ //dums: this version can use memcpy (__copy_trivial can't)
+ return (__last == __first) ? __result :
+ ((char*)memcpy(__result, __first, ((const char*)__last - (const char*)__first))) +
+ ((const char*)__last - (const char*)__first);
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __ucopy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __false_type& /*TrivialUCopy*/)
+{ return __ucopy(__first, __last, __result, random_access_iterator_tag(), (ptrdiff_t*)0); }
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __ucopy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __true_type& /*TrivialUCopy*/) {
+ // we know they all pointers, so this cast is OK
+ // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result));
+ return (_OutputIter)__ucopy_trivial(__first, __last, __result);
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __ucopy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __true_type& /*BothPtrType*/) {
+ return __ucopy_ptrs(__first, __last, __result,
+ _UseTrivialUCopy(_STLP_VALUE_TYPE(__first, _InputIter),
+ _STLP_VALUE_TYPE(__result, _OutputIter))._Answer());
+}
+
+template <class _InputIter, class _OutputIter>
+inline _OutputIter __ucopy_aux(_InputIter __first, _InputIter __last, _OutputIter __result,
+ const __false_type& /*BothPtrType*/) {
+ return __ucopy(__first, __last, __result,
+ _STLP_ITERATOR_CATEGORY(__first, _InputIter),
+ _STLP_DISTANCE_TYPE(__first, _InputIter));
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _ForwardIter>
+inline _ForwardIter
+uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
+{ return _STLP_PRIV __ucopy_aux(__first, __last, __result, _BothPtrType< _InputIter, _ForwardIter>::_Answer()); }
+
+inline char*
+uninitialized_copy(const char* __first, const char* __last, char* __result)
+{ return (char*)_STLP_PRIV __ucopy_trivial(__first, __last, __result); }
+
+# if defined (_STLP_HAS_WCHAR_T) // dwa 8/15/97
+inline wchar_t*
+uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result)
+{ return (wchar_t*)_STLP_PRIV __ucopy_trivial (__first, __last, __result); }
+# endif
+
+// uninitialized_copy_n (not part of the C++ standard)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter, class _Size, class _ForwardIter>
+_STLP_INLINE_LOOP
+pair<_InputIter, _ForwardIter>
+__ucopy_n(_InputIter __first, _Size __count, _ForwardIter __result,
+ const input_iterator_tag &) {
+ _ForwardIter __cur = __result;
+ _STLP_TRY {
+ for ( ; __count > 0 ; --__count, ++__first, ++__cur)
+ _Param_Construct(&*__cur, *__first);
+ return pair<_InputIter, _ForwardIter>(__first, __cur);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__result, __cur))
+ _STLP_RET_AFTER_THROW((pair<_InputIter, _ForwardIter>(__first, __cur)))
+}
+
+# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _InputIter, class _Size, class _ForwardIterator>
+inline pair<_InputIter, _ForwardIterator>
+__ucopy_n(_InputIter __first, _Size __count,
+ _ForwardIterator __result,
+ const forward_iterator_tag &)
+{ return __ucopy_n(__first, __count, __result, input_iterator_tag()); }
+
+template <class _InputIter, class _Size, class _ForwardIterator>
+inline pair<_InputIter, _ForwardIterator>
+__ucopy_n(_InputIter __first, _Size __count,
+ _ForwardIterator __result,
+ const bidirectional_iterator_tag &)
+{ return __ucopy_n(__first, __count, __result, input_iterator_tag()); }
+# endif
+
+template <class _RandomAccessIter, class _Size, class _ForwardIter>
+inline pair<_RandomAccessIter, _ForwardIter>
+__ucopy_n(_RandomAccessIter __first, _Size __count, _ForwardIter __result,
+ const random_access_iterator_tag &) {
+ _RandomAccessIter __last = __first + __count;
+ return pair<_RandomAccessIter, _ForwardIter>(__last, uninitialized_copy(__first, __last, __result));
+}
+
+// This is used internally in <rope> , which is extension itself.
+template <class _InputIter, class _Size, class _ForwardIter>
+inline pair<_InputIter, _ForwardIter>
+__ucopy_n(_InputIter __first, _Size __count, _ForwardIter __result)
+{ return _STLP_PRIV __ucopy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
+
+#if !defined (_STLP_NO_EXTENSIONS)
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _InputIter, class _Size, class _ForwardIter>
+inline pair<_InputIter, _ForwardIter>
+uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result)
+{ return _STLP_PRIV __ucopy_n(__first, __count, __result); }
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+#endif
+
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __ufill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x, _Distance*) {
+ _ForwardIter __cur = __first;
+ _STLP_TRY {
+ for ( ; __cur != __last; ++__cur)
+ _Param_Construct(&*__cur, __x);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__first, __cur))
+}
+
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __ufill(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __x, const input_iterator_tag &, _Distance* __d)
+{ __ufill(__first, __last, __x, __d); }
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __ufill(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __x, const forward_iterator_tag &, _Distance* __d)
+{ __ufill(__first, __last, __x, __d); }
+
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __ufill(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __x, const bidirectional_iterator_tag &, _Distance* __d)
+{ __ufill(__first, __last, __x, __d); }
+#endif
+
+template <class _ForwardIter, class _Tp, class _Distance>
+inline void __ufill(_ForwardIter __first, _ForwardIter __last,
+ const _Tp& __x, const random_access_iterator_tag &, _Distance*) {
+ _ForwardIter __cur = __first;
+ _STLP_TRY {
+ for (_Distance __n = __last - __first; __n > 0; --__n, ++__cur)
+ _Param_Construct(&*__cur, __x);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__first, __cur))
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Tp>
+inline void uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x) {
+ _STLP_PRIV __ufill(__first, __last, __x,
+ _STLP_ITERATOR_CATEGORY(__first, _ForwardIter),
+ _STLP_DISTANCE_TYPE(__first, _ForwardIter));
+}
+
+// Specialization: for one-byte types we can use memset.
+inline void uninitialized_fill(unsigned char* __first, unsigned char* __last,
+ const unsigned char& __val) {
+ unsigned char __tmp = __val;
+ memset(__first, __tmp, __last - __first);
+}
+#if !defined (_STLP_NO_SIGNED_BUILTINS)
+inline void uninitialized_fill(signed char* __first, signed char* __last,
+ const signed char& __val) {
+ signed char __tmp = __val;
+ memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
+}
+#endif
+inline void uninitialized_fill(char* __first, char* __last, const char& __val) {
+ char __tmp = __val;
+ memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
+}
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __ufill_n(_ForwardIter __first, _Size __n, const _Tp& __x) {
+ _ForwardIter __cur = __first;
+ _STLP_TRY {
+ for ( ; __n > 0; --__n, ++__cur)
+ _Param_Construct(&*__cur, __x);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__first, __cur))
+ return __cur;
+}
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __ufill_n(_ForwardIter __first, _Size __n, const _Tp& __x,
+ const input_iterator_tag &)
+{ return __ufill_n(__first, __n, __x); }
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __ufill_n(_ForwardIter __first, _Size __n, const _Tp& __x,
+ const forward_iterator_tag &)
+{ return __ufill_n(__first, __n, __x); }
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __ufill_n(_ForwardIter __first, _Size __n, const _Tp& __x,
+ const bidirectional_iterator_tag &)
+{ return __ufill_n(__first, __n, __x); }
+#endif
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) {
+ _ForwardIter __last = __first + __n;
+ __ufill(__first, __last, __x, random_access_iterator_tag(), (ptrdiff_t*)0);
+ return __last;
+}
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __ufill_n(_ForwardIter __first, _Size __n, const _Tp& __x,
+ const random_access_iterator_tag &)
+{ return __uninitialized_fill_n(__first, __n, __x); }
+
+/* __uninitialized_init is an internal algo to init a range with a value
+ * built using default constructor. It is only called with pointer as
+ * iterator.
+ */
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uinit_aux_aux(_ForwardIter __first, _Size __n, const _Tp& __val,
+ const __false_type& /*_HasDefaultZero*/)
+{ return __uninitialized_fill_n(__first, __n, __val); }
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uinit_aux_aux(_ForwardIter __first, _Size __n, const _Tp& /* __val */,
+ const __true_type& /*_HasDefaultZero*/) {
+ memset((unsigned char*)__first, 0, __n * sizeof(_Tp));
+ return __first + __n;
+}
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uinit_aux(_ForwardIter __first, _Size __n, const _Tp&,
+ const __true_type& /*_TrivialInit*/)
+{ return __first + __n; }
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uinit_aux(_ForwardIter __first, _Size __n, const _Tp& __val,
+ const __false_type& /*_TrivialInit*/)
+{ return __uinit_aux_aux(__first, __n, __val, _HasDefaultZeroValue(__first)._Answer()); }
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline _ForwardIter __uninitialized_init(_ForwardIter __first, _Size __n, const _Tp& __val)
+{ return __uinit_aux(__first, __n, __val, _UseTrivialInit(__first)._Answer()); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _ForwardIter, class _Size, class _Tp>
+inline void
+uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
+{ _STLP_PRIV __ufill_n(__first, __n, __x, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); }
+
+// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill,
+// __uninitialized_fill_copy.
+
+// __uninitialized_copy_copy
+// Copies [first1, last1) into [result, result + (last1 - first1)), and
+// copies [first2, last2) into
+// [result + (last1 - first1), result + (last1 - first1) + (last2 - first2)).
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _InputIter1, class _InputIter2, class _ForwardIter>
+inline _ForwardIter
+__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
+ _InputIter2 __first2, _InputIter2 __last2,
+ _ForwardIter __result) {
+ _ForwardIter __new_result = uninitialized_copy(__first1, __last1, __result);
+ _STLP_TRY {
+ return uninitialized_copy(__first2, __last2, __new_result);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__result, __new_result))
+ _STLP_RET_AFTER_THROW(__result)
+}
+
+// __uninitialized_fill_copy
+// Fills [result, mid) with x, and copies [first, last) into
+// [mid, mid + (last - first)).
+template <class _ForwardIter, class _Tp, class _InputIter>
+inline _ForwardIter
+__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp& __x,
+ _InputIter __first, _InputIter __last) {
+ uninitialized_fill(__result, __mid, __x);
+ _STLP_TRY {
+ return uninitialized_copy(__first, __last, __mid);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__result, __mid))
+ _STLP_RET_AFTER_THROW(__result)
+}
+
+// __uninitialized_copy_fill
+// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
+// fills [first2 + (last1 - first1), last2) with x.
+template <class _Iter, class _Tp>
+inline void
+__uninitialized_copy_fill(_Iter __first1, _Iter __last1, _Iter __first2, _Iter __last2,
+ const _Tp& __x) {
+ _Iter __mid2 = uninitialized_copy(__first1, __last1, __first2);
+ _STLP_TRY {
+ uninitialized_fill(__mid2, __last2, __x);
+ }
+ _STLP_UNWIND(_STLP_STD::_Destroy_Range(__first2, __mid2))
+}
+
+/* __uninitialized_move:
+ * This function is used internaly and only with pointers as iterators.
+ */
+template <class _InputIter, class _ForwardIter, class _TrivialUCpy>
+inline _ForwardIter
+__uninitialized_move(_InputIter __first, _InputIter __last, _ForwardIter __result,
+ _TrivialUCpy __trivial_ucpy, const __false_type& /*_Movable*/)
+{ return __ucopy_ptrs(__first, __last, __result, __trivial_ucpy); }
+
+template <class _InputIter, class _ForwardIter, class _TrivialUCpy>
+_STLP_INLINE_LOOP
+_ForwardIter
+__uninitialized_move(_InputIter __first, _InputIter __last, _ForwardIter __result,
+ _TrivialUCpy , const __true_type& /*_Movable*/) {
+ //Move constructor should not throw so we do not need to take care of exceptions here.
+ for (ptrdiff_t __n = __last - __first ; __n > 0; --__n) {
+ _Move_Construct(&*__result, *__first);
+ ++__first; ++__result;
+ }
+ return __result;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_UNINITIALIZED_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_unordered_map.h b/6/sources/cxx-stl/stlport/stlport/stl/_unordered_map.h
new file mode 100644
index 0000000..f2b017d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_unordered_map.h
@@ -0,0 +1,443 @@
+/*
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_UNORDERED_MAP_H
+#define _STLP_INTERNAL_UNORDERED_MAP_H
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+# include <stl/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMapTraitsT, traits)
+
+_STLP_BEGIN_TR1_NAMESPACE
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Key>),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class unordered_map
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+private:
+ typedef unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
+public:
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST key_type, data_type> value_type;
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _UnorderedMapTraitsT<value_type> _UnorderedMapTraits;
+
+public:
+ typedef hashtable<value_type, key_type, _HashFcn, _UnorderedMapTraits,
+ _STLP_SELECT1ST(value_type, _Key), _EqualKey, _Alloc > _Ht;
+
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+ typedef typename _Ht::local_iterator local_iterator;
+ typedef typename _Ht::const_local_iterator const_local_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_function() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ explicit unordered_map(size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ unordered_map(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ unordered_map(_InputIterator __f, _InputIterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#else
+ unordered_map(const value_type* __f, const value_type* __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ unordered_map(const_iterator __f, const_iterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+ _Self& operator = (const _Self& __other)
+ { _M_ht = __other._M_ht; return *this; }
+
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+ pair<iterator,bool> insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+ iterator insert(const_iterator /*__hint*/, const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+#else
+ void insert(const value_type* __f, const value_type* __l)
+ { _M_ht.insert_unique(__f,__l); }
+ void insert(const_iterator __f, const_iterator __l)
+#endif /*_STLP_MEMBER_TEMPLATES */
+ { _M_ht.insert_unique(__f, __l); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ _Tp& operator[](const _KT& __key) {
+ iterator __it = _M_ht.find(__key);
+ return (__it == _M_ht.end() ?
+ _M_ht._M_insert(value_type(__key, _STLP_DEFAULT_CONSTRUCTED(_Tp))).second :
+ (*__it).second );
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+ void erase(const_iterator __it) { _M_ht.erase(__it); }
+ void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); }
+ local_iterator begin(size_type __n) { return _M_ht.begin(__n); }
+ local_iterator end(size_type __n) { return _M_ht.end(__n); }
+ const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); }
+ const_local_iterator end(size_type __n) const { return _M_ht.end(__n); }
+
+ float load_factor() const { return _M_ht.load_factor(); }
+ float max_load_factor() const { return _M_ht.max_load_factor(); }
+ void max_load_factor(float __val) { _M_ht.max_load_factor(__val); }
+ void rehash(size_type __hint) { _M_ht.rehash(__hint); }
+
+#if defined (__DMC__) // disable operator==(pair<x,unordered_map>, pair<x,unordered_map>)
+ bool operator==(const _Self&) const;
+#endif
+};
+
+_STLP_END_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultimapTraitsT, traits)
+
+_STLP_BEGIN_TR1_NAMESPACE
+
+template <class _Key, class _Tp, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Key>),
+ _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_STLP_CONST _Key, _Tp) >
+class unordered_multimap
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<unordered_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+private:
+ typedef unordered_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
+public:
+ typedef _Key key_type;
+ typedef _Tp data_type;
+ typedef _Tp mapped_type;
+ typedef pair<_STLP_CONST key_type, data_type> value_type;
+private:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _UnorderedMultimapTraitsT<value_type> _UnorderedMultimapTraits;
+
+public:
+ typedef hashtable<value_type, key_type, _HashFcn, _UnorderedMultimapTraits,
+ _STLP_SELECT1ST(value_type, _Key), _EqualKey, _Alloc > _Ht;
+
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+ typedef typename _Ht::local_iterator local_iterator;
+ typedef typename _Ht::const_local_iterator const_local_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_function() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ explicit unordered_multimap(size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ unordered_multimap(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ unordered_multimap(_InputIterator __f, _InputIterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#else
+ unordered_multimap(const value_type* __f, const value_type* __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ unordered_multimap(const_iterator __f, const_iterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+ _Self& operator = (const _Self& __other)
+ { _M_ht = __other._M_ht; return *this; }
+
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+ iterator insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+ iterator insert(const_iterator /*__hint*/, const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+#else
+ void insert(const value_type* __f, const value_type* __l)
+ { _M_ht.insert_equal(__f,__l); }
+ void insert(const_iterator __f, const_iterator __l)
+#endif /*_STLP_MEMBER_TEMPLATES */
+ { _M_ht.insert_equal(__f, __l); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+ void erase(const_iterator __it) { _M_ht.erase(__it); }
+ void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); }
+ local_iterator begin(size_type __n) { return _M_ht.begin(__n); }
+ local_iterator end(size_type __n) { return _M_ht.end(__n); }
+ const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); }
+ const_local_iterator end(size_type __n) const { return _M_ht.end(__n); }
+
+ float load_factor() const { return _M_ht.load_factor(); }
+ float max_load_factor() const { return _M_ht.max_load_factor(); }
+ void max_load_factor(float __val) { _M_ht.max_load_factor(__val); }
+ void rehash(size_type __hint) { _M_ht.rehash(__hint); }
+};
+
+#define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER unordered_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
+
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER unordered_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
+
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+_STLP_END_NAMESPACE
+
+// Specialization of insert_iterator so that it will work for unordered_map
+// and unordered_multimap.
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+struct __move_traits<_STLP_TR1 unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > :
+ _STLP_PRIV __move_traits_help<typename _STLP_TR1 unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>::_Ht>
+{};
+
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+struct __move_traits<_STLP_TR1 unordered_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > :
+ _STLP_PRIV __move_traits_help<typename _STLP_TR1 unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>::_Ht>
+{};
+# endif
+
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+class insert_iterator<_STLP_TR1 unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+ typedef _STLP_TR1 unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+ _Container* container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
+class insert_iterator<_STLP_TR1 unordered_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+ typedef _STLP_TR1 unordered_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_UNORDERED_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_unordered_set.h b/6/sources/cxx-stl/stlport/stlport/stl/_unordered_set.h
new file mode 100644
index 0000000..ef5f5fe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_unordered_set.h
@@ -0,0 +1,418 @@
+/*
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_UNORDERED_SET_H
+#define _STLP_INTERNAL_UNORDERED_SET_H
+
+#ifndef _STLP_INTERNAL_HASHTABLE_H
+# include <stl/_hashtable.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedSetTraitsT, Const_traits)
+
+_STLP_BEGIN_TR1_NAMESPACE
+
+template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class unordered_set
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+ typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _UnorderedSetTraitsT<_Value> _UnorderedSetTraits;
+public:
+ typedef hashtable<_Value, _Value, _HashFcn,
+ _UnorderedSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht;
+public:
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+ typedef typename _Ht::local_iterator local_iterator;
+ typedef typename _Ht::const_local_iterator const_local_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_function() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ explicit unordered_set(size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ unordered_set(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ unordered_set(_InputIterator __f, _InputIterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#else
+ unordered_set(const value_type* __f, const value_type* __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+
+ unordered_set(const_iterator __f, const_iterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_unique(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+ _Self& operator = (const _Self& __other)
+ { _M_ht = __other._M_ht; return *this; }
+
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+ pair<iterator, bool> insert(const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+ iterator insert(const_iterator /*__hint*/, const value_type& __obj)
+ { return _M_ht.insert_unique(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+#else
+ void insert(const_iterator __f, const_iterator __l)
+ {_M_ht.insert_unique(__f, __l); }
+ void insert(const value_type* __f, const value_type* __l)
+#endif
+ { _M_ht.insert_unique(__f,__l); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+ void erase(const_iterator __it) { _M_ht.erase(__it); }
+ void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); }
+ local_iterator begin(size_type __n) { return _M_ht.begin(__n); }
+ local_iterator end(size_type __n) { return _M_ht.end(__n); }
+ const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); }
+ const_local_iterator end(size_type __n) const { return _M_ht.end(__n); }
+
+ float load_factor() const { return _M_ht.load_factor(); }
+ float max_load_factor() const { return _M_ht.max_load_factor(); }
+ void max_load_factor(float __val) { _M_ht.max_load_factor(__val); }
+ void rehash(size_type __hint) { _M_ht.rehash(__hint); }
+};
+
+_STLP_END_NAMESPACE
+
+//Specific iterator traits creation
+_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultisetTraitsT, Const_traits)
+
+_STLP_BEGIN_TR1_NAMESPACE
+
+template <class _Value, _STLP_DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
+ _STLP_DFL_TMPL_PARAM(_EqualKey, equal_to<_Value>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class unordered_multiset
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> >
+#endif
+{
+ typedef unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _UnorderedMultisetTraitsT<_Value> _UnorderedMultisetTraits;
+public:
+ typedef hashtable<_Value, _Value, _HashFcn,
+ _UnorderedMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht;
+
+ typedef typename _Ht::key_type key_type;
+ typedef typename _Ht::value_type value_type;
+ typedef typename _Ht::hasher hasher;
+ typedef typename _Ht::key_equal key_equal;
+
+ typedef typename _Ht::size_type size_type;
+ typedef typename _Ht::difference_type difference_type;
+ typedef typename _Ht::pointer pointer;
+ typedef typename _Ht::const_pointer const_pointer;
+ typedef typename _Ht::reference reference;
+ typedef typename _Ht::const_reference const_reference;
+
+ typedef typename _Ht::iterator iterator;
+ typedef typename _Ht::const_iterator const_iterator;
+ typedef typename _Ht::local_iterator local_iterator;
+ typedef typename _Ht::const_local_iterator const_local_iterator;
+
+ typedef typename _Ht::allocator_type allocator_type;
+
+ hasher hash_function() const { return _M_ht.hash_funct(); }
+ key_equal key_eq() const { return _M_ht.key_eq(); }
+ allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+private:
+ _Ht _M_ht;
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ explicit unordered_multiset(size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ unordered_multiset(__move_source<_Self> src)
+ : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ unordered_multiset(_InputIterator __f, _InputIterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#else
+ unordered_multiset(const value_type* __f, const value_type* __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+
+ unordered_multiset(const_iterator __f, const_iterator __l,
+ size_type __n = 0, const hasher& __hf = hasher(),
+ const key_equal& __eql = key_equal(),
+ const allocator_type& __a = allocator_type())
+ : _M_ht(__n, __hf, __eql, __a)
+ { _M_ht.insert_equal(__f, __l); }
+#endif /*_STLP_MEMBER_TEMPLATES */
+
+ _Self& operator = (const _Self& __other)
+ { _M_ht = __other._M_ht; return *this; }
+
+ size_type size() const { return _M_ht.size(); }
+ size_type max_size() const { return _M_ht.max_size(); }
+ bool empty() const { return _M_ht.empty(); }
+ void swap(_Self& hs) { _M_ht.swap(hs._M_ht); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ iterator begin() { return _M_ht.begin(); }
+ iterator end() { return _M_ht.end(); }
+ const_iterator begin() const { return _M_ht.begin(); }
+ const_iterator end() const { return _M_ht.end(); }
+
+ iterator insert(const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+ iterator insert(const_iterator /*__hint*/, const value_type& __obj)
+ { return _M_ht.insert_equal(__obj); }
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __f, _InputIterator __l)
+#else
+ void insert(const value_type* __f, const value_type* __l)
+ { _M_ht.insert_equal(__f,__l); }
+ void insert(const_iterator __f, const_iterator __l)
+#endif /*_STLP_MEMBER_TEMPLATES */
+ { _M_ht.insert_equal(__f, __l); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key) { return _M_ht.find(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const { return _M_ht.find(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_ht.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key)
+ { return _M_ht.equal_range(__key); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const
+ { return _M_ht.equal_range(__key); }
+
+ size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+ void erase(const_iterator __it) { _M_ht.erase(__it); }
+ void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); }
+ void clear() { _M_ht.clear(); }
+
+ size_type bucket_count() const { return _M_ht.bucket_count(); }
+ size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+ size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); }
+ local_iterator begin(size_type __n) { return _M_ht.begin(__n); }
+ local_iterator end(size_type __n) { return _M_ht.end(__n); }
+ const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); }
+ const_local_iterator end(size_type __n) const { return _M_ht.end(__n); }
+
+ float load_factor() const { return _M_ht.load_factor(); }
+ float max_load_factor() const { return _M_ht.max_load_factor(); }
+ void max_load_factor(float __val) { _M_ht.max_load_factor(__val); }
+ void rehash(size_type __hint) { _M_ht.rehash(__hint); }
+};
+
+#define _STLP_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER unordered_set<_Value,_HashFcn,_EqualKey,_Alloc>
+
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#define _STLP_TEMPLATE_CONTAINER unordered_multiset<_Value,_HashFcn,_EqualKey,_Alloc>
+#include <stl/_relops_hash_cont.h>
+
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+_STLP_END_NAMESPACE
+
+// Specialization of insert_iterator so that it will work for unordered_set
+// and unordered_multiset.
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+struct __move_traits<_STLP_TR1 unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename _STLP_TR1 unordered_set<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht>
+{};
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+struct __move_traits<_STLP_TR1 unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > :
+ _STLP_PRIV __move_traits_aux<typename _STLP_TR1 unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc>::_Ht>
+{};
+# endif
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+class insert_iterator<_STLP_TR1 unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+ typedef _STLP_TR1 unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+ _Container* container;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
+class insert_iterator<_STLP_TR1 unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+ typedef _STLP_TR1 unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+ _Container* container;
+ typename _Container::iterator iter;
+public:
+ typedef _Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(_Container& __x) : container(&__x) {}
+ insert_iterator(_Container& __x, typename _Container::iterator)
+ : container(&__x) {}
+ insert_iterator<_Container>&
+ operator=(const typename _Container::value_type& __val) {
+ container->insert(__val);
+ return *this;
+ }
+ insert_iterator<_Container>& operator*() { return *this; }
+ insert_iterator<_Container>& operator++() { return *this; }
+ insert_iterator<_Container>& operator++(int) { return *this; }
+};
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_INTERNAL_UNORDERED_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_valarray.c b/6/sources/cxx-stl/stlport/stlport/stl/_valarray.c
new file mode 100644
index 0000000..ee534a9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_valarray.c
@@ -0,0 +1,191 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_VALARRAY_C
+#define _STLP_VALARRAY_C
+
+#ifndef _STLP_VALARRAY_H
+# include <stl/_valarray.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp>
+_Valarray_bool valarray<_Tp>:: operator!() const {
+ _Valarray_bool __tmp(this->size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ __tmp[__i] = !(*this)[__i];
+ return __tmp;
+}
+
+// Behavior is undefined if __x and *this have different sizes
+template <class _Tp>
+valarray<_Tp>& valarray<_Tp>::operator=(const slice_array<_Tp>& __x) {
+ _STLP_ASSERT(__x._M_slice.size() == this->size())
+ size_t __index = __x._M_slice.start();
+ for (size_t __i = 0;
+ __i < __x._M_slice.size();
+ ++__i, __index += __x._M_slice.stride())
+ (*this)[__i] = __x._M_array[__index];
+ return *this;
+}
+
+template <class _Tp>
+valarray<_Tp> valarray<_Tp>::operator[](slice __slice) const {
+ valarray<_Tp> __tmp(__slice.size(), _NoInit());
+ size_t __index = __slice.start();
+ for (size_t __i = 0;
+ __i < __slice.size();
+ ++__i, __index += __slice.stride())
+ __tmp[__i] = (*this)[__index];
+ return __tmp;
+}
+
+template <class _Size>
+bool _Gslice_Iter_tmpl<_Size>::_M_incr() {
+ size_t __dim = _M_indices.size() - 1;
+ ++_M_step;
+ for (;;) {
+ _M_1d_idx += _M_gslice._M_strides[__dim];
+ if (++_M_indices[__dim] != _M_gslice._M_lengths[__dim])
+ return true;
+ else if (__dim != 0) {
+ _M_1d_idx -= _M_gslice._M_strides[__dim] * _M_gslice._M_lengths[__dim];
+ _M_indices[__dim] = 0;
+ --__dim;
+ }
+ else
+ return false;
+ }
+}
+
+// Behavior is undefined if __x and *this have different sizes, or if
+// __x was constructed from a degenerate gslice.
+template <class _Tp>
+valarray<_Tp>& valarray<_Tp>::operator=(const gslice_array<_Tp>& __x) {
+ if (this->size() != 0) {
+ _Gslice_Iter __i(__x._M_gslice);
+ do
+ (*this)[__i._M_step] = __x._M_array[__i._M_1d_idx];
+ while(__i._M_incr());
+ }
+ return *this;
+}
+
+template <class _Tp>
+valarray<_Tp> valarray<_Tp>::operator[](const gslice& __slice) const {
+ valarray<_Tp> __tmp(__slice._M_size(), _NoInit());
+ if (__tmp.size() != 0) {
+ _Gslice_Iter __i(__slice);
+ do __tmp[__i._M_step] = (*this)[__i._M_1d_idx]; while(__i._M_incr());
+ }
+ return __tmp;
+}
+
+template <class _Tp>
+valarray<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) const {
+ size_t _p_size = 0;
+ {
+ for (size_t __i = 0; __i < __mask.size(); ++__i)
+ if (__mask[__i]) ++_p_size;
+ }
+
+ valarray<_Tp> __tmp(_p_size, _NoInit());
+ size_t __idx = 0;
+ {
+ for (size_t __i = 0; __i < __mask.size(); ++__i)
+ if (__mask[__i]) __tmp[__idx++] = (*this)[__i];
+ }
+
+ return __tmp;
+}
+
+template <class _Tp>
+valarray<_Tp>& valarray<_Tp>::operator=(const indirect_array<_Tp>& __x) {
+ _STLP_ASSERT(__x._M_addr.size() == this->size())
+ for (size_t __i = 0; __i < __x._M_addr.size(); ++__i)
+ (*this)[__i] = __x._M_array[__x._M_addr[__i]];
+ return *this;
+}
+
+template <class _Tp>
+valarray<_Tp>
+valarray<_Tp>::operator[](const _Valarray_size_t& __addr) const {
+ valarray<_Tp> __tmp(__addr.size(), _NoInit());
+ for (size_t __i = 0; __i < __addr.size(); ++__i)
+ __tmp[__i] = (*this)[__addr[__i]];
+ return __tmp;
+}
+
+//----------------------------------------------------------------------
+// Other valarray noninline member functions
+
+// Shift and cshift
+
+template <class _Tp>
+valarray<_Tp> valarray<_Tp>::shift(int __n) const {
+ valarray<_Tp> __tmp(this->size());
+
+ if (__n >= 0) {
+ if (__n < this->size())
+ copy(this->_M_first + __n, this->_M_first + this->size(),
+ __tmp._M_first);
+ }
+ else {
+ if (-__n < this->size())
+ copy(this->_M_first, this->_M_first + this->size() + __n,
+ __tmp._M_first - __n);
+ }
+ return __tmp;
+}
+
+template <class _Tp>
+valarray<_Tp> valarray<_Tp>::cshift(int __m) const {
+ valarray<_Tp> __tmp(this->size());
+
+ // Reduce __m to an equivalent number in the range [0, size()). We
+ // have to be careful with negative numbers, since the sign of a % b
+ // is unspecified when a < 0.
+ long __n = __m;
+ if (this->size() < (numeric_limits<long>::max)())
+ __n %= long(this->size());
+ if (__n < 0)
+ __n += this->size();
+
+ copy(this->_M_first, this->_M_first + __n,
+ __tmp._M_first + (this->size() - __n));
+ copy(this->_M_first + __n, this->_M_first + this->size(),
+ __tmp._M_first);
+
+ return __tmp;
+}
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_VALARRAY_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_valarray.h b/6/sources/cxx-stl/stlport/stlport/stl/_valarray.h
new file mode 100644
index 0000000..cd9641a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_valarray.h
@@ -0,0 +1,1684 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_VALARRAY_H
+#define _STLP_VALARRAY_H
+
+#ifndef _STLP_INTERNAL_CMATH
+# include <stl/_cmath.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NEW
+# include <stl/_new.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALGO_H
+# include <stl/_algo.h>
+#endif
+
+#ifndef _STLP_INTERNAL_NUMERIC_H
+# include <stl/_numeric.h>
+#endif
+
+#ifndef _STLP_INTERNAL_LIMITS
+# include <stl/_limits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+class slice;
+class gslice;
+
+template <class _Tp> class valarray;
+typedef valarray<bool> _Valarray_bool;
+typedef valarray<size_t> _Valarray_size_t;
+
+template <class _Tp> class slice_array;
+template <class _Tp> class gslice_array;
+template <class _Tp> class mask_array;
+template <class _Tp> class indirect_array;
+
+//----------------------------------------------------------------------
+// class valarray
+
+// Base class to handle memory allocation and deallocation. We can't just
+// use vector<>, because vector<bool> would be unsuitable as an internal
+// representation for valarray<bool>.
+
+template <class _Tp>
+struct _Valarray_base {
+ _Tp* _M_first;
+ size_t _M_size;
+
+ _Valarray_base() : _M_first(0), _M_size(0) {}
+ _Valarray_base(size_t __n) : _M_first(0), _M_size(0) { _M_allocate(__n); }
+ ~_Valarray_base() { _M_deallocate(); }
+
+ void _M_allocate(size_t __n) {
+ if (__n != 0) {
+ _M_first = __STATIC_CAST(_Tp*, __stl_new(__n * sizeof(_Tp)));
+ _M_size = __n;
+ }
+ else {
+ _M_first = 0;
+ _M_size = 0;
+ }
+ }
+
+ void _M_deallocate() {
+ __stl_delete(_M_first);
+ _M_first = 0;
+ _M_size = 0;
+ }
+};
+
+template <class _Tp>
+class valarray : private _Valarray_base<_Tp>
+{
+ friend class gslice;
+
+public:
+ typedef _Tp value_type;
+
+ // Basic constructors
+ valarray() : _Valarray_base<_Tp>() {}
+ explicit valarray(size_t __n) : _Valarray_base<_Tp>(__n)
+ { uninitialized_fill_n(this->_M_first, this->_M_size, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
+ valarray(const value_type& __x, size_t __n) : _Valarray_base<_Tp>(__n)
+ { uninitialized_fill_n(this->_M_first, this->_M_size, __x); }
+ valarray(const value_type* __p, size_t __n) : _Valarray_base<_Tp>(__n)
+ { uninitialized_copy(__p, __p + __n, this->_M_first); }
+ valarray(const valarray<_Tp>& __x) : _Valarray_base<_Tp>(__x._M_size) {
+ uninitialized_copy(__x._M_first, __x._M_first + __x._M_size,
+ this->_M_first);
+ }
+
+ // Constructors from auxiliary array types
+ valarray(const slice_array<_Tp>&);
+ valarray(const gslice_array<_Tp>&);
+ valarray(const mask_array<_Tp>&);
+ valarray(const indirect_array<_Tp>&);
+
+ // Destructor
+ ~valarray() { _STLP_STD::_Destroy_Range(this->_M_first, this->_M_first + this->_M_size); }
+
+ // Extension: constructor that doesn't initialize valarray elements to a
+ // specific value. This is faster for types such as int and double.
+private:
+ void _M_initialize(const __true_type&) {}
+ void _M_initialize(const __false_type&)
+ { uninitialized_fill_n(this->_M_first, this->_M_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+
+public:
+ struct _NoInit {};
+ valarray(size_t __n, _NoInit) : _Valarray_base<_Tp>(__n) {
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Is_Trivial;
+ _M_initialize(_Is_Trivial());
+ }
+
+public: // Assignment
+ // Basic assignment. Note that 'x = y' is undefined if x.size() != y.size()
+ valarray<_Tp>& operator=(const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ if (this != &__x)
+ copy(__x._M_first, __x._M_first + __x._M_size, this->_M_first);
+ return *this;
+ }
+
+ // Scalar assignment
+ valarray<_Tp>& operator=(const value_type& __x) {
+ fill_n(this->_M_first, this->_M_size, __x);
+ return *this;
+ }
+
+ // Assignment of auxiliary array types
+ valarray<_Tp>& operator=(const slice_array<_Tp>&);
+ valarray<_Tp>& operator=(const gslice_array<_Tp>&);
+ valarray<_Tp>& operator=(const mask_array<_Tp>&);
+ valarray<_Tp>& operator=(const indirect_array<_Tp>&);
+
+public: // Element access
+ value_type operator[](size_t __n) const {
+ _STLP_ASSERT(__n < this->size())
+ return this->_M_first[__n];
+ }
+ value_type& operator[](size_t __n) {
+ _STLP_ASSERT(__n < this->size())
+ return this->_M_first[__n];
+ }
+ size_t size() const { return this->_M_size; }
+
+public: // Subsetting operations with auxiliary type
+ valarray<_Tp> operator[](slice) const;
+ slice_array<_Tp> operator[](slice);
+ valarray<_Tp> operator[](const gslice&) const;
+ gslice_array<_Tp> operator[](const gslice&);
+ valarray<_Tp> operator[](const _Valarray_bool&) const;
+ mask_array<_Tp> operator[](const _Valarray_bool&);
+ valarray<_Tp> operator[](const _Valarray_size_t&) const;
+ indirect_array<_Tp> operator[](const _Valarray_size_t&);
+
+public: // Unary operators.
+ valarray<_Tp> operator+() const { return *this; }
+
+ valarray<_Tp> operator-() const {
+ valarray<_Tp> __tmp(this->size(), _NoInit());
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ __tmp[__i] = -(*this)[__i];
+ return __tmp;
+ }
+
+ valarray<_Tp> operator~() const {
+ valarray<_Tp> __tmp(this->size(), _NoInit());
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ __tmp[__i] = ~(*this)[__i];
+ return __tmp;
+ }
+
+ _Valarray_bool operator!() const;
+
+public: // Scalar computed assignment.
+ valarray<_Tp>& operator*= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] *= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator/= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] /= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator%= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] %= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator+= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] += __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator-= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] -= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator^= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] ^= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator&= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] &= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator|= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] |= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator<<= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] <<= __x;
+ return *this;
+ }
+
+ valarray<_Tp>& operator>>= (const value_type& __x) {
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] >>= __x;
+ return *this;
+ }
+
+public: // Array computed assignment.
+ valarray<_Tp>& operator*= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] *= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator/= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] /= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator%= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] %= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator+= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] += __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator-= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] -= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator^= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] ^= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator&= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] &= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator|= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] |= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator<<= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] <<= __x[__i];
+ return *this;
+ }
+
+ valarray<_Tp>& operator>>= (const valarray<_Tp>& __x) {
+ _STLP_ASSERT(__x.size() == this->size())
+ for (size_t __i = 0; __i < this->size(); ++__i)
+ (*this)[__i] >>= __x[__i];
+ return *this;
+ }
+
+public: // Other member functions.
+
+ // The result is undefined for zero-length arrays
+ value_type sum() const {
+ _STLP_ASSERT(this->size() != 0)
+ return accumulate(this->_M_first + 1, this->_M_first + this->_M_size,
+ (*this)[0]);
+ }
+
+ // The result is undefined for zero-length arrays
+ value_type (min) () const {
+ _STLP_ASSERT(this->size() != 0)
+ return *min_element(this->_M_first + 0, this->_M_first + this->_M_size);
+ }
+
+ value_type (max) () const {
+ _STLP_ASSERT(this->size() != 0)
+ return *max_element(this->_M_first + 0, this->_M_first + this->_M_size);
+ }
+
+ valarray<_Tp> shift(int __n) const;
+ valarray<_Tp> cshift(int __n) const;
+
+ valarray<_Tp> apply(value_type __f(value_type)) const {
+ valarray<_Tp> __tmp(this->size());
+ transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first,
+ __f);
+ return __tmp;
+ }
+ valarray<_Tp> apply(value_type __f(const value_type&)) const {
+ valarray<_Tp> __tmp(this->size());
+ transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first,
+ __f);
+ return __tmp;
+ }
+
+ void resize(size_t __n, value_type __x = value_type()) {
+ _STLP_STD::_Destroy_Range(this->_M_first, this->_M_first + this->_M_size);
+ _Valarray_base<_Tp>::_M_deallocate();
+ _Valarray_base<_Tp>::_M_allocate(__n);
+ uninitialized_fill_n(this->_M_first, this->_M_size, __x);
+ }
+};
+
+//----------------------------------------------------------------------
+// valarray non-member functions.
+
+// Binary arithmetic operations between two arrays. Behavior is
+// undefined if the two arrays do not have the same length.
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] * __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] / __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] % __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] + __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] - __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] ^ __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] & __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] | __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] << __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] >> __y[__i];
+ return __tmp;
+}
+
+// Binary arithmetic operations between an array and a scalar.
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] * __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator*(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c * __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] / __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator/(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c / __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] % __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator%(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c % __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] + __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator+(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c + __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] - __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator-(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c - __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] ^ __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator^(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c ^ __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] & __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator&(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c & __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] | __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator|(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c | __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] << __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator<<(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c << __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] >> __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> _STLP_CALL operator>>(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c >> __x[__i];
+ return __tmp;
+}
+
+// Binary logical operations between two arrays. Behavior is undefined
+// if the two arrays have different lengths. Note that operator== does
+// not do what you might at first expect.
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] == __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] < __y[__i];
+ return __tmp;
+}
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] != __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] > __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] <= __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] >= __y[__i];
+ return __tmp;
+}
+
+#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
+// fbp : swap ?
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] && __y[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ _STLP_ASSERT(__x.size() == __y.size())
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] || __y[__i];
+ return __tmp;
+}
+
+// Logical operations between an array and a scalar.
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] == __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator==(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c == __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] != __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator!=(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c != __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] < __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c < __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] > __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c > __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] <= __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator<=(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c <= __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] >= __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator>=(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c >= __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] && __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator&&(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c && __x[__i];
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, const _Tp& __c) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __x[__i] || __c;
+ return __tmp;
+}
+
+template <class _Tp>
+inline _Valarray_bool _STLP_CALL operator||(const _Tp& __c, const valarray<_Tp>& __x) {
+ _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = __c || __x[__i];
+ return __tmp;
+}
+
+// valarray "transcendentals" (the list includes abs and sqrt, which,
+// of course, are not transcendental).
+
+template <class _Tp>
+inline valarray<_Tp> abs(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::abs(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> acos(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::acos(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> asin(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::asin(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> atan(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::atan(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> atan2(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::atan2(__x[__i], __y[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> atan2(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::atan2(__x[__i], __c);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> atan2(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::atan2(__c, __x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> cos(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::cos(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> cosh(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::cosh(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> exp(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::exp(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> log(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::log(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> log10(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::log10(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> pow(const valarray<_Tp>& __x,
+ const valarray<_Tp>& __y) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::pow(__x[__i], __y[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> pow(const valarray<_Tp>& __x, const _Tp& __c) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::pow(__x[__i], __c);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> pow(const _Tp& __c, const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::pow(__c, __x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> sin(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::sin(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> sinh(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::sinh(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> sqrt(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::sqrt(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> tan(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::tan(__x[__i]);
+ return __tmp;
+}
+
+template <class _Tp>
+inline valarray<_Tp> tanh(const valarray<_Tp>& __x) {
+ typedef typename valarray<_Tp>::_NoInit _NoInit;
+ valarray<_Tp> __tmp(__x.size(), _NoInit());
+ for (size_t __i = 0; __i < __x.size(); ++__i)
+ __tmp[__i] = ::tanh(__x[__i]);
+ return __tmp;
+}
+
+//----------------------------------------------------------------------
+// slice and slice_array
+
+class slice {
+public:
+ slice() : _M_start(0), _M_length(0), _M_stride(0) {}
+ slice(size_t __start, size_t __length, size_t __stride)
+ : _M_start(__start), _M_length(__length), _M_stride(__stride)
+ {}
+ __TRIVIAL_DESTRUCTOR(slice)
+
+ size_t start() const { return _M_start; }
+ size_t size() const { return _M_length; }
+ size_t stride() const { return _M_stride; }
+
+private:
+ size_t _M_start;
+ size_t _M_length;
+ size_t _M_stride;
+};
+
+template <class _Tp>
+class slice_array {
+ friend class valarray<_Tp>;
+public:
+ typedef _Tp value_type;
+
+ void operator=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] = __x[__i];
+ }
+
+ void operator*=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] *= __x[__i];
+ }
+
+ void operator/=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] /= __x[__i];
+ }
+
+ void operator%=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] %= __x[__i];
+ }
+
+ void operator+=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] += __x[__i];
+ }
+
+ void operator-=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] -= __x[__i];
+ }
+
+ void operator^=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] ^= __x[__i];
+ }
+
+ void operator&=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] &= __x[__i];
+ }
+
+ void operator|=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] |= __x[__i];
+ }
+
+ void operator<<=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] <<= __x[__i];
+ }
+
+ void operator>>=(const valarray<value_type>& __x) const {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] >>= __x[__i];
+ }
+
+ void operator=(const value_type& __c) /*const could be const but standard says NO (26.3.5.4-1)*/ {
+ size_t __index = _M_slice.start();
+ for (size_t __i = 0;
+ __i < _M_slice.size();
+ ++__i, __index += _M_slice.stride())
+ _M_array[__index] = __c;
+ }
+
+ // C++ Standard defect 253, copy constructor must be public.
+ slice_array(const slice_array &__x)
+ : _M_slice(__x._M_slice), _M_array(__x._M_array)
+ {}
+
+ ~slice_array() {}
+
+private:
+ slice_array(const slice& __slice, valarray<_Tp> &__array)
+ : _M_slice(__slice), _M_array(__array)
+ {}
+
+ slice _M_slice;
+ valarray<_Tp>& _M_array;
+
+private:
+ // Disable default constructor and assignment
+ slice_array();
+ slice_array& operator=(const slice_array&);
+};
+
+// valarray member functions dealing with slice and slice_array
+
+template <class _Tp>
+inline valarray<_Tp>::valarray(const slice_array<_Tp>& __x)
+ : _Valarray_base<_Tp>(__x._M_slice.size()) {
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+ _Is_Trivial;
+ _M_initialize(_Is_Trivial());
+ *this = __x;
+}
+
+
+template <class _Tp>
+inline slice_array<_Tp> valarray<_Tp>::operator[](slice __slice)
+{ return slice_array<_Tp>(__slice, *this); }
+
+//----------------------------------------------------------------------
+// gslice and gslice_array
+
+template <class _Size>
+struct _Gslice_Iter_tmpl;
+
+class gslice {
+ friend struct _Gslice_Iter_tmpl<size_t>;
+public:
+ gslice() : _M_start(0), _M_lengths(), _M_strides() {}
+ gslice(size_t __start,
+ const _Valarray_size_t& __lengths, const _Valarray_size_t& __strides)
+ : _M_start(__start), _M_lengths(__lengths), _M_strides(__strides)
+ {}
+ __TRIVIAL_DESTRUCTOR(gslice)
+
+ size_t start() const { return _M_start; }
+ _Valarray_size_t size() const { return _M_lengths; }
+ _Valarray_size_t stride() const { return _M_strides; }
+
+ // Extension: check for an empty gslice.
+ bool _M_empty() const { return _M_lengths.size() == 0; }
+
+ // Extension: number of indices this gslice represents. (For a degenerate
+ // gslice, they're not necessarily all distinct.)
+ size_t _M_size() const {
+ return !this->_M_empty()
+ ? accumulate(_M_lengths._M_first + 1,
+ _M_lengths._M_first + _M_lengths._M_size,
+ _M_lengths[0],
+ multiplies<size_t>())
+ : 0;
+ }
+
+# ifndef __HP_aCC
+private:
+# endif
+
+ size_t _M_start;
+ _Valarray_size_t _M_lengths;
+ _Valarray_size_t _M_strides;
+};
+
+// This is not an STL iterator. It is constructed from a gslice, and it
+// steps through the gslice indices in sequence. See 23.3.6 of the C++
+// standard, paragraphs 2-3, for an explanation of the sequence. At
+// each step we get two things: the ordinal (i.e. number of steps taken),
+// and the one-dimensional index.
+
+template <class _Size>
+struct _Gslice_Iter_tmpl {
+ _Gslice_Iter_tmpl(const gslice& __gslice)
+ : _M_step(0), _M_1d_idx(__gslice.start()),
+ _M_indices(size_t(0), __gslice._M_lengths.size()),
+ _M_gslice(__gslice)
+ {}
+
+ bool _M_done() const { return _M_indices[0] == _M_gslice._M_lengths[0]; }
+
+ bool _M_incr();
+
+ _Size _M_step;
+ _Size _M_1d_idx;
+
+ valarray<_Size> _M_indices;
+ const gslice& _M_gslice;
+};
+
+typedef _Gslice_Iter_tmpl<size_t> _Gslice_Iter;
+
+template <class _Tp>
+class gslice_array {
+ friend class valarray<_Tp>;
+public:
+ typedef _Tp value_type;
+
+ void operator= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] = __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator*= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] *= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator/= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] /= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator%= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] %= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator+= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] += __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator-= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] -= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator^= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] ^= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator&= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] &= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator|= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] |= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator<<= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] <<= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator>>= (const valarray<value_type>& __x) const {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] >>= __x[__i._M_step]; while(__i._M_incr());
+ }
+ }
+
+ void operator= (const value_type& __c) /*const could be const but standard says NO (26.3.7.4-1)*/ {
+ if (!_M_gslice._M_empty()) {
+ _Gslice_Iter __i(_M_gslice);
+ do _M_array[__i._M_1d_idx] = __c; while(__i._M_incr());
+ }
+ }
+
+ // C++ Standard defect 253, copy constructor must be public.
+ gslice_array(const gslice_array& __x)
+ : _M_gslice(__x._M_gslice), _M_array(__x._M_array)
+ {}
+
+ ~gslice_array() {}
+
+private:
+ gslice_array(const gslice &__gslice, valarray<_Tp> &__array)
+ : _M_gslice(__gslice), _M_array(__array)
+ {}
+
+ gslice _M_gslice;
+ valarray<value_type>& _M_array;
+
+private:
+ // Disable default constructor and assignment
+ gslice_array();
+ void operator=(const gslice_array<_Tp>&);
+};
+
+// valarray member functions dealing with gslice and gslice_array. Note
+// that it is illegal (behavior is undefined) to construct a gslice_array
+// from a degenerate gslice.
+
+template <class _Tp>
+inline valarray<_Tp>::valarray(const gslice_array<_Tp>& __x)
+ : _Valarray_base<_Tp>(__x._M_gslice._M_size()) {
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+ _Is_Trivial;
+ _M_initialize(_Is_Trivial());
+ *this = __x;
+}
+
+template <class _Tp>
+inline gslice_array<_Tp> valarray<_Tp>::operator[](const gslice& __slice)
+{ return gslice_array<_Tp>(__slice, *this); }
+
+
+//----------------------------------------------------------------------
+// mask_array
+
+template <class _Tp>
+class mask_array {
+ friend class valarray<_Tp>;
+public:
+ typedef _Tp value_type;
+
+ void operator=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] = __x[__idx++];
+ }
+
+ void operator*=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] *= __x[__idx++];
+ }
+
+ void operator/=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] /= __x[__idx++];
+ }
+
+ void operator%=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] %= __x[__idx++];
+ }
+
+ void operator+=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] += __x[__idx++];
+ }
+
+ void operator-=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] -= __x[__idx++];
+ }
+
+ void operator^=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] ^= __x[__idx++];
+ }
+
+ void operator&=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] &= __x[__idx++];
+ }
+
+ void operator|=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] |= __x[__idx++];
+ }
+
+ void operator<<=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] <<= __x[__idx++];
+ }
+
+ void operator>>=(const valarray<value_type>& __x) const {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] >>= __x[__idx++];
+ }
+
+ void operator=(const value_type& __c) const {
+ for (size_t __i = 0; __i < _M_array.size(); ++__i)
+ if (_M_mask[__i]) _M_array[__i] = __c;
+ }
+
+ // Extension: number of true values in the mask
+ size_t _M_num_true() const {
+ size_t __result = 0;
+ for (size_t __i = 0; __i < _M_mask.size(); ++__i)
+ if (_M_mask[__i]) ++__result;
+ return __result;
+ }
+
+ // C++ Standard defect 253, copy constructor must be public.
+ mask_array(const mask_array& __x)
+ : _M_mask(__x._M_mask), _M_array(__x._M_array)
+ {}
+
+ ~mask_array() {}
+
+private:
+ mask_array(const _Valarray_bool& __mask, valarray<_Tp>& __array)
+ : _M_mask(__mask), _M_array(__array)
+ {}
+ _Valarray_bool _M_mask;
+ valarray<_Tp>& _M_array;
+
+private:
+ // Disable default constructor and assignment
+ mask_array();
+ void operator=(const mask_array<_Tp>&);
+};
+
+// valarray member functions dealing with mask_array
+
+template <class _Tp>
+inline valarray<_Tp>::valarray(const mask_array<_Tp>& __x)
+ : _Valarray_base<_Tp>(__x._M_num_true()) {
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+ _Is_Trivial;
+ _M_initialize(_Is_Trivial());
+ *this = __x;
+}
+
+// Behavior is undefined if __x._M_num_true() != this->size()
+template <class _Tp>
+inline valarray<_Tp>& valarray<_Tp>::operator=(const mask_array<_Tp>& __x) {
+ size_t __idx = 0;
+ for (size_t __i = 0; __i < __x._M_array.size(); ++__i)
+ if (__x._M_mask[__i]) (*this)[__idx++] = __x._M_array[__i];
+ return *this;
+}
+
+template <class _Tp>
+inline mask_array<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) {
+ _STLP_ASSERT(__mask.size() == this->size())
+ return mask_array<_Tp>(__mask, *this);
+}
+
+//----------------------------------------------------------------------
+// indirect_array
+
+template <class _Tp>
+class indirect_array {
+ friend class valarray<_Tp>;
+public:
+ typedef _Tp value_type;
+
+ void operator=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] = __x[__i];
+ }
+
+ void operator*=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] *= __x[__i];
+ }
+
+ void operator/=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] /= __x[__i];
+ }
+
+ void operator%=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] %= __x[__i];
+ }
+
+ void operator+=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] += __x[__i];
+ }
+
+ void operator-=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] -= __x[__i];
+ }
+
+ void operator^=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] ^= __x[__i];
+ }
+
+ void operator&=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] &= __x[__i];
+ }
+
+ void operator|=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] |= __x[__i];
+ }
+
+ void operator<<=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] <<= __x[__i];
+ }
+
+ void operator>>=(const valarray<value_type>& __x) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] >>= __x[__i];
+ }
+
+ void operator=(const value_type& __c) const {
+ for (size_t __i = 0; __i < _M_addr.size(); ++__i)
+ _M_array[_M_addr[__i]] = __c;
+ }
+
+ // C++ Standard defect 253, copy constructor must be public.
+ indirect_array(const indirect_array& __x)
+ : _M_addr(__x._M_addr), _M_array(__x._M_array)
+ {}
+
+ ~indirect_array() {}
+
+private:
+ indirect_array(const _Valarray_size_t& __addr, valarray<_Tp>& __array)
+ : _M_addr(__addr), _M_array(__array)
+ {}
+
+ _Valarray_size_t _M_addr;
+ valarray<_Tp>& _M_array;
+
+private:
+ // Disable default constructor and assignment
+ indirect_array();
+ void operator=(const indirect_array<_Tp>&);
+};
+
+// valarray member functions dealing with indirect_array
+
+template <class _Tp>
+inline valarray<_Tp>::valarray(const indirect_array<_Tp>& __x)
+ : _Valarray_base<_Tp>(__x._M_addr.size()) {
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+ _Is_Trivial;
+ _M_initialize(_Is_Trivial());
+ *this = __x;
+}
+
+
+template <class _Tp>
+inline indirect_array<_Tp>
+valarray<_Tp>::operator[](const _Valarray_size_t& __addr)
+{ return indirect_array<_Tp>(__addr, *this); }
+
+_STLP_END_NAMESPACE
+
+# if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_valarray.c>
+# endif
+
+#endif /* _STLP_VALARRAY */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_vector.c b/6/sources/cxx-stl/stlport/stlport/stl/_vector.c
new file mode 100644
index 0000000..705f786
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_vector.c
@@ -0,0 +1,242 @@
+/*
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_VECTOR_C
+#define _STLP_VECTOR_C
+
+#if !defined (_STLP_INTERNAL_VECTOR_H)
+# include <stl/_vector.h>
+#endif
+
+#include <stl/_range_errors.h>
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Alloc>
+void _Vector_base<_Tp,_Alloc>::_M_throw_length_error() const
+{ __stl_throw_length_error("vector"); }
+
+template <class _Tp, class _Alloc>
+void _Vector_base<_Tp, _Alloc>::_M_throw_out_of_range() const
+{ __stl_throw_out_of_range("vector"); }
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define vector _STLP_PTR_IMPL_NAME(vector)
+#elif defined (_STLP_DEBUG)
+# define vector _STLP_NON_DBG_NAME(vector)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define __iterator__ _Tp*
+#else
+# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE vector<_Tp, _Alloc>::iterator
+#endif
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::reserve(size_type __n) {
+ if (capacity() < __n) {
+ if (max_size() < __n) {
+ this->_M_throw_length_error();
+ }
+
+ const size_type __old_size = size();
+ pointer __tmp;
+ if (this->_M_start) {
+ __tmp = _M_allocate_and_copy(__n, this->_M_start, this->_M_finish);
+ _M_clear();
+ } else {
+ __tmp = this->_M_end_of_storage.allocate(__n, __n);
+ }
+ _M_set(__tmp, __tmp + __old_size, __tmp + __n);
+ }
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_insert_overflow_aux(pointer __pos, const _Tp& __x, const __false_type& /*DO NOT USE!!*/,
+ size_type __fill_len, bool __atend ) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ size_type __len = _M_compute_next_size(__fill_len);
+ pointer __new_start = this->_M_end_of_storage.allocate(__len, __len);
+ pointer __new_finish = __new_start;
+ _STLP_TRY {
+ __new_finish = _STLP_PRIV __uninitialized_move(this->_M_start, __pos, __new_start, _TrivialUCopy(), _Movable());
+ // handle insertion
+ if (__fill_len == 1) {
+ _Copy_Construct(__new_finish, __x);
+ ++__new_finish;
+ } else
+ __new_finish = _STLP_PRIV __uninitialized_fill_n(__new_finish, __fill_len, __x);
+ if (!__atend)
+ __new_finish = _STLP_PRIV __uninitialized_move(__pos, this->_M_finish, __new_finish, _TrivialUCopy(), _Movable()); // copy remainder
+ }
+ _STLP_UNWIND((_STLP_STD::_Destroy_Range(__new_start,__new_finish),
+ this->_M_end_of_storage.deallocate(__new_start,__len)))
+ _M_clear_after_move();
+ _M_set(__new_start, __new_finish, __new_start + __len);
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_insert_overflow(pointer __pos, const _Tp& __x, const __true_type& /*_TrivialCopy*/,
+ size_type __fill_len, bool __atend ) {
+ size_type __len = _M_compute_next_size(__fill_len);
+ pointer __new_start = this->_M_end_of_storage.allocate(__len, __len);
+ pointer __new_finish = __STATIC_CAST(pointer, _STLP_PRIV __copy_trivial(this->_M_start, __pos, __new_start));
+ // handle insertion
+ __new_finish = _STLP_PRIV __fill_n(__new_finish, __fill_len, __x);
+ if (!__atend)
+ __new_finish = __STATIC_CAST(pointer, _STLP_PRIV __copy_trivial(__pos, this->_M_finish, __new_finish)); // copy remainder
+ _M_clear();
+ _M_set(__new_start, __new_finish, __new_start + __len);
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_fill_insert_aux(iterator __pos, size_type __n,
+ const _Tp& __x, const __true_type& /*_Movable*/) {
+ if (_M_is_inside(__x)) {
+ _Tp __x_copy = __x;
+ _M_fill_insert_aux(__pos, __n, __x_copy, __true_type());
+ return;
+ }
+ iterator __src = this->_M_finish - 1;
+ iterator __dst = __src + __n;
+ for (; __src >= __pos; --__dst, --__src) {
+ _STLP_STD::_Move_Construct(__dst, *__src);
+ _STLP_STD::_Destroy_Moved(__src);
+ }
+ _STLP_PRIV __uninitialized_fill_n(__pos, __n, __x);
+ this->_M_finish += __n;
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_fill_insert_aux (iterator __pos, size_type __n,
+ const _Tp& __x, const __false_type& /*_Movable*/) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ //Here self referencing needs to be checked even for non movable types.
+ if (_M_is_inside(__x)) {
+ _Tp __x_copy = __x;
+ _M_fill_insert_aux(__pos, __n, __x_copy, __false_type());
+ return;
+ }
+ const size_type __elems_after = this->_M_finish - __pos;
+ pointer __old_finish = this->_M_finish;
+ if (__elems_after > __n) {
+ _STLP_PRIV __ucopy_ptrs(this->_M_finish - __n, this->_M_finish, this->_M_finish, _TrivialUCopy());
+ this->_M_finish += __n;
+ _STLP_PRIV __copy_backward_ptrs(__pos, __old_finish - __n, __old_finish, _TrivialCopy());
+ _STLP_STD::fill(__pos, __pos + __n, __x);
+ } else {
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_finish, __n - __elems_after, __x);
+ _STLP_PRIV __ucopy_ptrs(__pos, __old_finish, this->_M_finish, _TrivialUCopy());
+ this->_M_finish += __elems_after;
+ _STLP_STD::fill(__pos, __old_finish, __x);
+ }
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_fill_insert(iterator __pos,
+ size_type __n, const _Tp& __x) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ if (__n != 0) {
+ if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) {
+ _M_fill_insert_aux(__pos, __n, __x, _Movable());
+ } else {
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ _M_insert_overflow(__pos, __x, _TrivialCopy(), __n);
+ }
+ }
+}
+
+template <class _Tp, class _Alloc>
+vector<_Tp, _Alloc>& vector<_Tp, _Alloc>::operator = (const vector<_Tp, _Alloc>& __x) {
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+ if (&__x != this) {
+ const size_type __xlen = __x.size();
+ if (__xlen > capacity()) {
+ size_type __len = __xlen;
+ pointer __tmp = _M_allocate_and_copy(__len, __CONST_CAST(const_pointer, __x._M_start) + 0,
+ __CONST_CAST(const_pointer, __x._M_finish) + 0);
+ _M_clear();
+ this->_M_start = __tmp;
+ this->_M_end_of_storage._M_data = this->_M_start + __len;
+ } else if (size() >= __xlen) {
+ pointer __i = _STLP_PRIV __copy_ptrs(__CONST_CAST(const_pointer, __x._M_start) + 0,
+ __CONST_CAST(const_pointer, __x._M_finish) + 0, this->_M_start, _TrivialCopy());
+ _STLP_STD::_Destroy_Range(__i, this->_M_finish);
+ } else {
+ _STLP_PRIV __copy_ptrs(__CONST_CAST(const_pointer, __x._M_start),
+ __CONST_CAST(const_pointer, __x._M_start) + size(), this->_M_start, _TrivialCopy());
+ _STLP_PRIV __ucopy_ptrs(__CONST_CAST(const_pointer, __x._M_start) + size(),
+ __CONST_CAST(const_pointer, __x._M_finish) + 0, this->_M_finish, _TrivialUCopy());
+ }
+ this->_M_finish = this->_M_start + __xlen;
+ }
+ return *this;
+}
+
+template <class _Tp, class _Alloc>
+void vector<_Tp, _Alloc>::_M_fill_assign(size_t __n, const _Tp& __val) {
+ if (__n > capacity()) {
+ vector<_Tp, _Alloc> __tmp(__n, __val, get_allocator());
+ __tmp.swap(*this);
+ } else if (__n > size()) {
+ fill(begin(), end(), __val);
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_finish, __n - size(), __val);
+ } else
+ erase(_STLP_PRIV __fill_n(begin(), __n, __val), end());
+}
+
+template <class _Tp, class _Alloc>
+__iterator__
+vector<_Tp, _Alloc>::insert(iterator __pos, const _Tp& __x) {
+ size_type __n = __pos - begin();
+ _M_fill_insert(__pos, 1, __x);
+ return begin() + __n;
+}
+
+#undef __iterator__
+
+#if defined (vector)
+# undef vector
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_VECTOR_C */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/_vector.h b/6/sources/cxx-stl/stlport/stlport/stl/_vector.h
new file mode 100644
index 0000000..ed243ef
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/_vector.h
@@ -0,0 +1,773 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_VECTOR_H
+#define _STLP_INTERNAL_VECTOR_H
+
+#ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ITERATOR_H
+# include <stl/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_UNINITIALIZED_H
+# include <stl/_uninitialized.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+// The vector base class serves one purpose, its constructor and
+// destructor allocate (but don't initialize) storage. This makes
+// exception safety easier.
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _Alloc>
+class _Vector_base {
+public:
+ typedef _Vector_base<_Tp, _Alloc> _Self;
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef _Alloc allocator_type;
+ typedef _Tp* pointer;
+ typedef _STLP_alloc_proxy<pointer, _Tp, allocator_type> _AllocProxy;
+
+ _Vector_base(const _Alloc& __a)
+ : _M_start(0), _M_finish(0), _M_end_of_storage(__a, 0) {}
+
+ _Vector_base(size_t __n, const _Alloc& __a)
+ : _M_start(0), _M_finish(0), _M_end_of_storage(__a, 0) {
+ _M_start = _M_end_of_storage.allocate(__n, __n);
+ _M_finish = _M_start;
+ _M_end_of_storage._M_data = _M_start + __n;
+ _STLP_MPWFIX_TRY _STLP_MPWFIX_CATCH
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Vector_base(__move_source<_Self> src)
+ : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish),
+ _M_end_of_storage(__move_source<_AllocProxy>(src.get()._M_end_of_storage)) {
+ //Set the source as empty:
+ src.get()._M_finish = src.get()._M_end_of_storage._M_data = src.get()._M_start = 0;
+ }
+#endif
+
+ ~_Vector_base() {
+ if (_M_start != _STLP_DEFAULT_CONSTRUCTED(pointer))
+ _M_end_of_storage.deallocate(_M_start, _M_end_of_storage._M_data - _M_start);
+ }
+
+protected:
+ void _STLP_FUNCTION_THROWS _M_throw_length_error() const;
+ void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const;
+
+ pointer _M_start;
+ pointer _M_finish;
+ _AllocProxy _M_end_of_storage;
+};
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define vector _STLP_PTR_IMPL_NAME(vector)
+#elif defined (_STLP_DEBUG)
+# define vector _STLP_NON_DBG_NAME(vector)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class vector : protected _STLP_PRIV _Vector_base<_Tp, _Alloc>
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (vector)
+ , public __stlport_class<vector<_Tp, _Alloc> >
+#endif
+{
+private:
+ typedef _STLP_PRIV _Vector_base<_Tp, _Alloc> _Base;
+ typedef vector<_Tp, _Alloc> _Self;
+public:
+ _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
+ typedef typename _Base::allocator_type allocator_type;
+
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type* iterator;
+ typedef const value_type* const_iterator;
+
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag _Iterator_category;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR((const allocator_type&)this->_M_end_of_storage, _Tp); }
+
+private:
+#if defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef __false_type _Movable;
+#endif
+
+ // handles insertions on overflow
+ void _M_insert_overflow_aux(pointer __pos, const _Tp& __x, const __false_type& /*_Movable*/,
+ size_type __fill_len, bool __atend);
+ void _M_insert_overflow_aux(pointer __pos, const _Tp& __x, const __true_type& /*_Movable*/,
+ size_type __fill_len, bool __atend) {
+ //We need to take care of self referencing here:
+ if (_M_is_inside(__x)) {
+ value_type __x_copy = __x;
+ _M_insert_overflow_aux(__pos, __x_copy, __false_type(), __fill_len, __atend);
+ return;
+ }
+ _M_insert_overflow_aux(__pos, __x, __false_type(), __fill_len, __atend);
+ }
+
+ void _M_insert_overflow(pointer __pos, const _Tp& __x, const __false_type& /*_TrivialCopy*/,
+ size_type __fill_len, bool __atend = false) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ _M_insert_overflow_aux(__pos, __x, _Movable(), __fill_len, __atend);
+ }
+ void _M_insert_overflow(pointer __pos, const _Tp& __x, const __true_type& /*_TrivialCopy*/,
+ size_type __fill_len, bool __atend = false);
+ void _M_range_check(size_type __n) const {
+ if (__n >= size_type(this->_M_finish - this->_M_start))
+ this->_M_throw_out_of_range();
+ }
+
+ size_type _M_compute_next_size(size_type __n) {
+ const size_type __size = size();
+ if (__n > max_size() - __size)
+ this->_M_throw_length_error();
+ size_type __len = __size + (max)(__n, __size);
+ if (__len > max_size() || __len < __size)
+ __len = max_size(); // overflow
+ return __len;
+ }
+
+public:
+ iterator begin() { return this->_M_start; }
+ const_iterator begin() const { return this->_M_start; }
+ iterator end() { return this->_M_finish; }
+ const_iterator end() const { return this->_M_finish; }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ size_type size() const { return size_type(this->_M_finish - this->_M_start); }
+ size_type max_size() const {
+ size_type __vector_max_size = size_type(-1) / sizeof(_Tp);
+ typename allocator_type::size_type __alloc_max_size = this->_M_end_of_storage.max_size();
+ return (__alloc_max_size < __vector_max_size)?__alloc_max_size:__vector_max_size;
+ }
+
+ size_type capacity() const { return size_type(this->_M_end_of_storage._M_data - this->_M_start); }
+ bool empty() const { return this->_M_start == this->_M_finish; }
+
+ reference operator[](size_type __n) { return *(begin() + __n); }
+ const_reference operator[](size_type __n) const { return *(begin() + __n); }
+
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ reference back() { return *(end() - 1); }
+ const_reference back() const { return *(end() - 1); }
+
+ reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; }
+ const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit vector(const allocator_type& __a = allocator_type())
+#else
+ vector()
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(allocator_type()) {}
+ vector(const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__a) {}
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+private:
+ //We always call _M_initialize with only 1 parameter. Default parameter
+ //is used to allow explicit instanciation of vector with types with no
+ //default constructor.
+ void _M_initialize(size_type __n, const _Tp& __val = _STLP_DEFAULT_CONSTRUCTED(_Tp))
+ { this->_M_finish = _STLP_PRIV __uninitialized_init(this->_M_start, __n, __val); }
+public:
+ explicit vector(size_type __n)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__n, allocator_type())
+ { _M_initialize(__n); }
+ vector(size_type __n, const _Tp& __val, const allocator_type& __a = allocator_type())
+#else
+ explicit vector(size_type __n)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__n, allocator_type())
+ { this->_M_finish = _STLP_PRIV __uninitialized_init(this->_M_start, __n, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+ vector(size_type __n, const _Tp& __val)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__n, allocator_type())
+ { this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_start, __n, __val); }
+ vector(size_type __n, const _Tp& __val, const allocator_type& __a)
+#endif
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__n, __a)
+ { this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_start, __n, __val); }
+
+ vector(const _Self& __x)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__x.size(), __x.get_allocator()) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+ this->_M_finish = _STLP_PRIV __ucopy_ptrs(__x.begin(), __x.end(), this->_M_start, _TrivialUCopy());
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ vector(__move_source<_Self> src)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__move_source<_Base>(src.get()))
+ {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+private:
+ template <class _Integer>
+ void _M_initialize_aux(_Integer __n, _Integer __val,
+ const __true_type& /*_IsIntegral*/) {
+ size_type __real_n = __n;
+ this->_M_start = this->_M_end_of_storage.allocate(__n, __real_n);
+ this->_M_end_of_storage._M_data = this->_M_start + __real_n;
+ this->_M_finish = _STLP_PRIV __uninitialized_fill_n(this->_M_start, __n, __val);
+ }
+
+ template <class _InputIterator>
+ void _M_initialize_aux(_InputIterator __first, _InputIterator __last,
+ const __false_type& /*_IsIntegral*/)
+ { _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); }
+
+public:
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL )
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__a) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_aux(__first, __last, _Integral());
+ }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last)
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(allocator_type()) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_initialize_aux(__first, __last, _Integral());
+ }
+# endif /* _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS */
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ vector(const _Tp* __first, const _Tp* __last,
+ const allocator_type& __a = allocator_type())
+ : _STLP_PRIV _Vector_base<_Tp, _Alloc>(__last - __first, __a) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+ this->_M_finish = _STLP_PRIV __ucopy_ptrs(__first, __last, this->_M_start, _TrivialUCopy());
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ //As the vector container is a back insert oriented container it
+ //seems rather logical to destroy elements in reverse order.
+ ~vector() { _STLP_STD::_Destroy_Range(rbegin(), rend()); }
+
+ _Self& operator=(const _Self& __x);
+
+ void reserve(size_type __n);
+
+ // assign(), a generalized assignment member function. Two
+ // versions: one that takes a count, and one that takes a range.
+ // The range version is a member template, so we dispatch on whether
+ // or not the type is an integer.
+
+ void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
+ void _M_fill_assign(size_type __n, const _Tp& __val);
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _ForwardIter>
+ void _M_assign_aux(_ForwardIter __first, _ForwardIter __last, const forward_iterator_tag &) {
+#else
+ void assign(const_iterator __first, const_iterator __last) {
+ typedef const_iterator _ForwardIter;
+#endif
+ const size_type __len = _STLP_STD::distance(__first, __last);
+ if (__len > capacity()) {
+ size_type __n = __len;
+ iterator __tmp = _M_allocate_and_copy(__n, __first, __last);
+ _M_clear();
+ _M_set(__tmp, __tmp + __len, __tmp + __n);
+ }
+ else if (size() >= __len) {
+ iterator __new_finish = copy(__first, __last, this->_M_start);
+ _STLP_STD::_Destroy_Range(__new_finish, this->_M_finish);
+ this->_M_finish = __new_finish;
+ }
+ else {
+ _ForwardIter __mid = __first;
+ _STLP_STD::advance(__mid, size());
+ _STLP_STD::copy(__first, __mid, this->_M_start);
+ this->_M_finish = _STLP_STD::uninitialized_copy(__mid, __last, this->_M_finish);
+ }
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ void _M_assign_aux(_InputIter __first, _InputIter __last,
+ const input_iterator_tag &) {
+ iterator __cur = begin();
+ for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+ *__cur = *__first;
+ if (__first == __last)
+ erase(__cur, end());
+ else
+ insert(end(), __first, __last);
+ }
+
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type& /*_IsIntegral*/)
+ { _M_fill_assign(__n, __val); }
+
+ template <class _InputIter>
+ void _M_assign_dispatch(_InputIter __first, _InputIter __last,
+ const __false_type& /*_IsIntegral*/)
+ { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
+
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+ }
+#endif
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back(const _Tp& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void push_back(const _Tp& __x) {
+#endif
+ if (this->_M_finish != this->_M_end_of_storage._M_data) {
+ _Copy_Construct(this->_M_finish, __x);
+ ++this->_M_finish;
+ }
+ else {
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ _M_insert_overflow(this->_M_finish, __x, _TrivialCopy(), 1, true);
+ }
+ }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const _Tp& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp));
+#else
+ iterator insert(iterator __pos, const _Tp& __x);
+#endif
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ void push_back() { push_back(_STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+ iterator insert(iterator __pos) { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif
+
+ void swap(_Self& __x) {
+ _STLP_STD::swap(this->_M_start, __x._M_start);
+ _STLP_STD::swap(this->_M_finish, __x._M_finish);
+ this->_M_end_of_storage.swap(__x._M_end_of_storage);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+private:
+ void _M_fill_insert_aux (iterator __pos, size_type __n, const _Tp& __x, const __true_type& /*_Movable*/);
+ void _M_fill_insert_aux (iterator __pos, size_type __n, const _Tp& __x, const __false_type& /*_Movable*/);
+ void _M_fill_insert (iterator __pos, size_type __n, const _Tp& __x);
+
+ bool _M_is_inside(const value_type& __x) const {
+ return (&__x >= this->_M_start && &__x < this->_M_finish);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _ForwardIterator>
+ void _M_range_insert_realloc(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+#else
+ void _M_range_insert_realloc(iterator __pos,
+ const_iterator __first, const_iterator __last,
+#endif
+ size_type __n) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ size_type __len = _M_compute_next_size(__n);
+ pointer __new_start = this->_M_end_of_storage.allocate(__len, __len);
+ pointer __new_finish = __new_start;
+ _STLP_TRY {
+ __new_finish = _STLP_PRIV __uninitialized_move(this->_M_start, __pos, __new_start, _TrivialUCopy(), _Movable());
+ __new_finish = uninitialized_copy(__first, __last, __new_finish);
+ __new_finish = _STLP_PRIV __uninitialized_move(__pos, this->_M_finish, __new_finish, _TrivialUCopy(), _Movable());
+ }
+ _STLP_UNWIND((_STLP_STD::_Destroy_Range(__new_start,__new_finish),
+ this->_M_end_of_storage.deallocate(__new_start,__len)))
+ _M_clear_after_move();
+ _M_set(__new_start, __new_finish, __new_start + __len);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _ForwardIterator>
+ void _M_range_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+#else
+ void _M_range_insert_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+#endif
+ size_type __n, const __true_type& /*_Movable*/) {
+ iterator __src = this->_M_finish - 1;
+ iterator __dst = __src + __n;
+ for (; __src >= __pos; --__dst, --__src) {
+ _STLP_STD::_Move_Construct(__dst, *__src);
+ _STLP_STD::_Destroy_Moved(__src);
+ }
+ uninitialized_copy(__first, __last, __pos);
+ this->_M_finish += __n;
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _ForwardIterator>
+ void _M_range_insert_aux(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+#else
+ void _M_range_insert_aux(iterator __pos,
+ const_iterator __first, const_iterator __last,
+#endif
+ size_type __n, const __false_type& /*_Movable*/) {
+ typedef typename __type_traits<_Tp>::has_trivial_copy_constructor _TrivialUCopy;
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ const size_type __elems_after = this->_M_finish - __pos;
+ pointer __old_finish = this->_M_finish;
+ if (__elems_after > __n) {
+ _STLP_PRIV __ucopy_ptrs(this->_M_finish - __n, this->_M_finish, this->_M_finish, _TrivialUCopy());
+ this->_M_finish += __n;
+ _STLP_PRIV __copy_backward_ptrs(__pos, __old_finish - __n, __old_finish, _TrivialCopy());
+ copy(__first, __last, __pos);
+ }
+ else {
+#if defined ( _STLP_MEMBER_TEMPLATES )
+ _ForwardIterator __mid = __first;
+ _STLP_STD::advance(__mid, __elems_after);
+#else
+ const_pointer __mid = __first + __elems_after;
+#endif
+ uninitialized_copy(__mid, __last, this->_M_finish);
+ this->_M_finish += __n - __elems_after;
+ _STLP_PRIV __ucopy_ptrs(__pos, __old_finish, this->_M_finish, _TrivialUCopy());
+ this->_M_finish += __elems_after;
+ copy(__first, __mid, __pos);
+ } /* elems_after */
+ }
+
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ const __true_type&)
+ { _M_fill_insert(__pos, (size_type) __n, (_Tp) __val); }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&)
+ { _M_range_insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); }
+
+public:
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+ }
+
+private:
+ template <class _InputIterator>
+ void _M_range_insert(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last; ++__first) {
+ __pos = insert(__pos, *__first);
+ ++__pos;
+ }
+ }
+
+ template <class _ForwardIterator>
+ void _M_range_insert(iterator __pos,
+ _ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+#else
+public:
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+#endif
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ /* This method do not check self referencing.
+ * Standard forbids it, checked by the debug mode.
+ */
+ if (__first != __last) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+
+ if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) {
+ _M_range_insert_aux(__pos, __first, __last, __n, _Movable());
+ }
+ else {
+ _M_range_insert_realloc(__pos, __first, __last, __n);
+ }
+ }
+ }
+
+public:
+ void insert (iterator __pos, size_type __n, const _Tp& __x)
+ { _M_fill_insert(__pos, __n, __x); }
+
+ void pop_back() {
+ --this->_M_finish;
+ _STLP_STD::_Destroy(this->_M_finish);
+ }
+
+private:
+ iterator _M_erase(iterator __pos, const __true_type& /*_Movable*/) {
+ _STLP_STD::_Destroy(__pos);
+ iterator __dst = __pos, __src = __dst + 1;
+ iterator __end = end();
+ for (; __src != __end; ++__dst, ++__src) {
+ _STLP_STD::_Move_Construct(__dst, *__src);
+ _STLP_STD::_Destroy_Moved(__src);
+ }
+ this->_M_finish = __dst;
+ return __pos;
+ }
+ iterator _M_erase(iterator __pos, const __false_type& /*_Movable*/) {
+ if (__pos + 1 != end()) {
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ _STLP_PRIV __copy_ptrs(__pos + 1, this->_M_finish, __pos, _TrivialCopy());
+ }
+ --this->_M_finish;
+ _STLP_STD::_Destroy(this->_M_finish);
+ return __pos;
+ }
+ iterator _M_erase(iterator __first, iterator __last, const __true_type& /*_Movable*/) {
+ iterator __dst = __first, __src = __last;
+ iterator __end = end();
+ for (; __dst != __last && __src != __end; ++__dst, ++__src) {
+ _STLP_STD::_Destroy(__dst);
+ _STLP_STD::_Move_Construct(__dst, *__src);
+ }
+ if (__dst != __last) {
+ //There is more elements to erase than element to move:
+ _STLP_STD::_Destroy_Range(__dst, __last);
+ _STLP_STD::_Destroy_Moved_Range(__last, __end);
+ }
+ else {
+ //There is more element to move than element to erase:
+ for (; __src != __end; ++__dst, ++__src) {
+ _STLP_STD::_Destroy_Moved(__dst);
+ _STLP_STD::_Move_Construct(__dst, *__src);
+ }
+ _STLP_STD::_Destroy_Moved_Range(__dst, __end);
+ }
+ this->_M_finish = __dst;
+ return __first;
+ }
+ iterator _M_erase(iterator __first, iterator __last, const __false_type& /*_Movable*/) {
+ typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _TrivialCopy;
+ pointer __i = _STLP_PRIV __copy_ptrs(__last, this->_M_finish, __first, _TrivialCopy());
+ _STLP_STD::_Destroy_Range(__i, this->_M_finish);
+ this->_M_finish = __i;
+ return __first;
+ }
+
+public:
+ iterator erase(iterator __pos) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ return _M_erase(__pos, _Movable());
+ }
+ iterator erase(iterator __first, iterator __last) {
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ typedef typename __move_traits<_Tp>::implemented _Movable;
+#endif
+ if (__first == __last)
+ return __first;
+ return _M_erase(__first, __last, _Movable());
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const _Tp& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void resize(size_type __new_size, const _Tp& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ if (__new_size < size())
+ erase(begin() + __new_size, end());
+ else
+ insert(end(), __new_size - size(), __x);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void clear() {
+ erase(begin(), end());
+ }
+
+private:
+ void _M_clear() {
+ _STLP_STD::_Destroy_Range(rbegin(), rend());
+ this->_M_end_of_storage.deallocate(this->_M_start, this->_M_end_of_storage._M_data - this->_M_start);
+ }
+
+ void _M_clear_after_move() {
+ _STLP_STD::_Destroy_Moved_Range(rbegin(), rend());
+ this->_M_end_of_storage.deallocate(this->_M_start, this->_M_end_of_storage._M_data - this->_M_start);
+ }
+
+ void _M_set(pointer __s, pointer __f, pointer __e) {
+ this->_M_start = __s;
+ this->_M_finish = __f;
+ this->_M_end_of_storage._M_data = __e;
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _ForwardIterator>
+ pointer _M_allocate_and_copy(size_type& __n,
+ _ForwardIterator __first, _ForwardIterator __last)
+#else /* _STLP_MEMBER_TEMPLATES */
+ pointer _M_allocate_and_copy(size_type& __n,
+ const_pointer __first, const_pointer __last)
+#endif /* _STLP_MEMBER_TEMPLATES */
+ {
+ pointer __result = this->_M_end_of_storage.allocate(__n, __n);
+ _STLP_TRY {
+ uninitialized_copy(__first, __last, __result);
+ return __result;
+ }
+ _STLP_UNWIND(this->_M_end_of_storage.deallocate(__result, __n))
+ _STLP_RET_AFTER_THROW(__result)
+ }
+
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void _M_range_initialize(_InputIterator __first, _InputIterator __last,
+ const input_iterator_tag &) {
+ for ( ; __first != __last; ++__first)
+ push_back(*__first);
+ }
+ // This function is only called by the constructor.
+ template <class _ForwardIterator>
+ void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+ const forward_iterator_tag &) {
+ size_type __n = _STLP_STD::distance(__first, __last);
+ this->_M_start = this->_M_end_of_storage.allocate(__n, __n);
+ this->_M_end_of_storage._M_data = this->_M_start + __n;
+ this->_M_finish = uninitialized_copy(__first, __last, this->_M_start);
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+};
+
+#if defined (vector)
+# undef vector
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+_STLP_END_NAMESPACE
+
+#if !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/_vector.c>
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# include <stl/pointers/_vector.h>
+#endif
+
+//We define the bool specialization before the debug interfave
+//to benefit of the debug version of vector even for the bool
+//specialization.
+#if !defined (_STLP_NO_BOOL) || !defined (_STLP_NO_EXTENSIONS)
+# if !defined (_STLP_INTERNAL_BVECTOR_H)
+# include <stl/_bvector.h>
+# endif
+#endif
+
+#if defined (_STLP_DEBUG)
+# include <stl/debug/_vector.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined (_STLP_NO_BOOL) && !defined (_STLP_NO_EXTENSIONS)
+// This typedef is non-standard. It is provided for backward compatibility.
+typedef vector<bool, allocator<bool> > bit_vector;
+#endif
+
+#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
+#define _STLP_TEMPLATE_CONTAINER vector<_Tp, _Alloc>
+#include <stl/_relops_cont.h>
+#undef _STLP_TEMPLATE_CONTAINER
+#undef _STLP_TEMPLATE_HEADER
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !defined (_STLP_NO_MOVE_SEMANTIC)
+template <class _Tp, class _Alloc>
+struct __move_traits<vector<_Tp, _Alloc> > {
+ typedef __true_type implemented;
+ typedef typename __move_traits<_Alloc>::complete complete;
+};
+# endif
+
+# if !defined (_STLP_DEBUG)
+template <class _Tp, class _Alloc>
+struct _DefaultZeroValue<vector<_Tp, _Alloc> >
+{ typedef typename __type_traits<_Alloc>::has_trivial_default_constructor _Ret; };
+# endif
+
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_VECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/boost_type_traits.h b/6/sources/cxx-stl/stlport/stlport/stl/boost_type_traits.h
new file mode 100644
index 0000000..ae3a3f6
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/boost_type_traits.h
@@ -0,0 +1,150 @@
+/*
+ *
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_BOOST_TYPE_TRAITS_H
+#define _STLP_BOOST_TYPE_TRAITS_H
+
+#ifndef BOOST_CONFIG_SUFFIX_HPP
+# ifdef BOOST_CONFIG_HPP
+# undef BOOST_CONFIG_HPP
+# endif
+# include <boost/config.hpp>
+#endif
+
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+/*
+ * This file mostly wraps boost type_traits in the STLport type_traits.
+ * When checking a type traits like trivial assign operator for instance
+ * both the boost value and STLport values has to be taken into account
+ * as we don't know what the user might have prefer, specializing the boost
+ * type traits or the STLport one.
+ */
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp> struct _IsRef {
+ enum { _Is = ::boost::is_reference<_Tp>::value };
+ typedef typename __bool2type<_Is>::_Ret _Ret;
+};
+
+template <class _Tp> struct _IsPtr {
+ enum { is_pointer = ::boost::is_pointer<_Tp>::value };
+ typedef typename __bool2type<is_pointer>::_Ret _Ret;
+};
+
+template <class _Tp> struct _IsIntegral {
+ enum { is_integral = ::boost::is_integral<_Tp>::value };
+ typedef typename __bool2type<is_integral>::_Ret _Ret;
+};
+
+template <class _Tp> struct _IsRational {
+ enum { is_float = ::boost::is_float<_Tp>::value };
+ typedef typename __bool2type<is_float>::_Ret _Ret;
+};
+
+template <class _Tp>
+struct __type_traits {
+ enum { trivial_constructor = ::boost::has_trivial_constructor<_Tp>::value };
+ typedef typename __bool2type<trivial_constructor>::_Ret has_trivial_default_constructor;
+
+ enum { trivial_copy = ::boost::has_trivial_copy<_Tp>::value };
+ typedef typename __bool2type<trivial_copy>::_Ret has_trivial_copy_constructor;
+
+ enum { trivial_assign = ::boost::has_trivial_assign<_Tp>::value };
+ typedef typename __bool2type<trivial_assign>::_Ret has_trivial_assignment_operator;
+
+ enum { trivial_destructor = ::boost::has_trivial_destructor<_Tp>::value };
+ typedef typename __bool2type<trivial_destructor>::_Ret has_trivial_destructor;
+
+ enum { pod = ::boost::is_pod<_Tp>::value };
+ typedef typename __bool2type<pod>::_Ret is_POD_type;
+};
+
+template <class _Tp1, class _Tp2>
+struct _TrivialCopy {
+ typedef typename ::boost::remove_cv<_Tp1>::type uncv1;
+ typedef typename ::boost::remove_cv<_Tp2>::type uncv2;
+
+ enum { same = ::boost::is_same<uncv1, uncv2>::value };
+ typedef typename __bool2type<same>::_Ret _Same;
+
+ enum { boost_trivial_assign = ::boost::has_trivial_assign<uncv1>::value };
+ typedef typename __bool2type<boost_trivial_assign>::_Ret _BoostTrivialAssign;
+ typedef typename __type_traits<uncv1>::has_trivial_assignment_operator _STLPTrivialAssign;
+ typedef typename _Lor2<_BoostTrivialAssign, _STLPTrivialAssign>::_Ret _TrivialAssign;
+
+ typedef typename _Land2<_Same, _TrivialAssign>::_Ret _Type;
+ static _Type _Answer() { return _Type(); }
+};
+
+template <class _Tp1, class _Tp2>
+struct _TrivialUCopy {
+ typedef typename ::boost::remove_cv<_Tp1>::type uncv1;
+ typedef typename ::boost::remove_cv<_Tp2>::type uncv2;
+
+ enum { same = ::boost::is_same<uncv1, uncv2>::value };
+ typedef typename __bool2type<same>::_Ret _Same;
+
+ enum { boost_trivial_copy = ::boost::has_trivial_copy<uncv1>::value };
+ typedef typename __bool2type<boost_trivial_copy>::_Ret _BoostTrivialCopy;
+ typedef typename __type_traits<uncv1>::has_trivial_copy_constructor _STLPTrivialCopy;
+ typedef typename _Lor2<_BoostTrivialCopy, _STLPTrivialCopy>::_Ret _TrivialCopy;
+
+ typedef typename _Land2<_Same, _TrivialCopy>::_Ret _Type;
+ static _Type _Answer() { return _Type(); }
+};
+
+template <class _Tp>
+struct _DefaultZeroValue {
+ enum { is_integral = ::boost::is_integral<_Tp>::value };
+ typedef typename __bool2type<is_integral>::_Ret _IsIntegral;
+ enum { is_float = ::boost::is_float<_Tp>::value };
+ typedef typename __bool2type<is_float>::_Ret _IsFloat;
+ enum { is_pointer = ::boost::is_pointer<_Tp>::value };
+ typedef typename __bool2type<is_pointer>::_Ret _IsPointer;
+
+ typedef typename _Lor3<_IsIntegral, _IsFloat, _IsPointer>::_Ret _Ret;
+};
+
+template <class _Tp>
+struct _TrivialInit {
+ typedef typename ::boost::remove_cv<_Tp>::type uncv;
+
+ enum { boost_trivial_constructor = ::boost::has_trivial_constructor<uncv>::value };
+ typedef typename __bool2type<boost_trivial_constructor>::_Ret _BoostTrivialInit;
+ typedef typename __type_traits<uncv>::has_trivial_default_constructor _STLPTrivialInit;
+ typedef typename _Lor2<_BoostTrivialInit, _STLPTrivialInit>::_Ret _Tr1;
+
+ typedef typename _DefaultZeroValue<_Tp>::_Ret _Tr2;
+ typedef typename _Not<_Tr2>::_Ret _Tr3;
+
+ typedef typename _Land2<_Tr1, _Tr3>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_BOOST_TYPE_TRAITS_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/c_locale.h b/6/sources/cxx-stl/stlport/stlport/stl/c_locale.h
new file mode 100644
index 0000000..cadd2bc
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/c_locale.h
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_C_LOCALE_H
+#define _STLP_C_LOCALE_H
+
+/*
+ * Implementation dependent definitions.
+ * Beware: This header is not a purely internal header, it is also included
+ * from the outside world when building the STLport library. So this header
+ * should not reference internal headers (stlport/stl/_*.h) directly.
+ */
+#if defined (__sgi)
+# if defined (ROOT_65) /* IRIX 6.5.x */
+# include <sgidefs.h>
+# include <standards.h>
+# include <wchar.h>
+# include <ctype.h>
+# else /* IRIX pre-6.5 */
+# include <sgidefs.h>
+# include <standards.h>
+# if !defined(_SIZE_T) && !defined(_SIZE_T_)
+# define _SIZE_T
+# if (_MIPS_SZLONG == 32)
+typedef unsigned int size_t;
+# endif
+# if (_MIPS_SZLONG == 64)
+typedef unsigned long size_t;
+# endif
+# endif
+# if !defined (_WCHAR_T)
+# define _WCHAR_T
+# if (_MIPS_SZLONG == 32)
+typedef long wchar_t;
+# endif
+# if (_MIPS_SZLONG == 64)
+typedef __int32_t wchar_t;
+# endif
+# endif /* _WCHAR_T */
+# if !defined (_WINT_T)
+# define _WINT_T
+# if (_MIPS_SZLONG == 32)
+typedef long wint_t;
+# endif
+# if (_MIPS_SZLONG == 64)
+typedef __int32_t wint_t;
+# endif
+# endif /* _WINT_T */
+# if !defined (_MBSTATE_T)
+# define _MBSTATE_T
+/* _MSC_VER check is here for historical reason and seems wrong as it is the macro defined
+ * by Microsoft compilers to give their version. But we are in a SGI platform section so it
+ * is weird. However _MSC_VER might also be a SGI compiler macro so we keep it this way.*/
+# if defined (_MSC_VER)
+typedef int mbstate_t;
+# else
+typedef char mbstate_t;
+# endif
+# endif /* _MBSTATE_T */
+# endif /* ROOT65 */
+#elif defined (_STLP_USE_GLIBC)
+# include <ctype.h>
+#endif
+
+/*
+ * GENERAL FRAMEWORK
+ */
+
+/*
+ * Opaque types, implementation (if there is one) depends
+ * on platform localisation API.
+ */
+struct _Locale_ctype;
+struct _Locale_codecvt;
+struct _Locale_numeric;
+struct _Locale_time;
+struct _Locale_collate;
+struct _Locale_monetary;
+struct _Locale_messages;
+
+/*
+ Bitmask macros.
+*/
+
+/*
+ * For narrow characters, we expose the lookup table interface.
+ */
+
+#if defined (_STLP_USE_GLIBC)
+/* This section uses macros defined in the gnu libc ctype.h header */
+# define _Locale_CNTRL _IScntrl
+# define _Locale_UPPER _ISupper
+# define _Locale_LOWER _ISlower
+# define _Locale_DIGIT _ISdigit
+# define _Locale_XDIGIT _ISxdigit
+# define _Locale_PUNCT _ISpunct
+# define _Locale_SPACE _ISspace
+# define _Locale_PRINT _ISprint
+# define _Locale_ALPHA _ISalpha
+#else
+/* Default values based on C++ Standard 22.2.1.
+ * Under Windows the localisation implementation take care of mapping its
+ * mask values to those internal values. For other platforms without real
+ * localization support we are free to use the most suitable values.*/
+# define _Locale_SPACE 0x0001
+# define _Locale_PRINT 0x0002
+# define _Locale_CNTRL 0x0004
+# define _Locale_UPPER 0x0008
+# define _Locale_LOWER 0x0010
+# define _Locale_ALPHA 0x0020
+# define _Locale_DIGIT 0x0040
+# define _Locale_PUNCT 0x0080
+# define _Locale_XDIGIT 0x0100
+#endif
+
+#endif /* _STLP_C_LOCALE_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/char_traits.h b/6/sources/cxx-stl/stlport/stlport/stl/char_traits.h
new file mode 100644
index 0000000..f004a70
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/char_traits.h
@@ -0,0 +1,278 @@
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_CHAR_TRAITS_H
+#define _STLP_CHAR_TRAITS_H
+
+// Define char_traits
+
+#ifndef _STLP_INTERNAL_CSTDDEF
+# include <stl/_cstddef.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CSTRING
+# include <stl/_cstring.h>
+#endif
+
+#if defined (__unix)
+# include <sys/types.h> // For off_t
+#endif /* __unix */
+
+#if defined (__BORLANDC__)
+# include <mem.h>
+# include <string.h>
+# include <_stddef.h>
+# include <sys/types.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CONSTRUCT_H
+# include <stl/_construct.h>
+#endif
+
+#ifndef _STLP_INTERNAL_CWCHAR
+# include <stl/_cwchar.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+template <class _Tp> class allocator;
+
+#define _STLP_NULL_CHAR_INIT(_ChT) _STLP_DEFAULT_CONSTRUCTED(_ChT)
+
+#if defined(_STLP_WCE)
+typedef long streamoff;
+#elif defined (_STLP_WIN32)
+# if defined (_STLP_LONG_LONG) && !defined (__CYGWIN__)
+//The Win32 file io API support 64 bits access so streamoff and streamsize
+//has to reflect that. Do not change the stringbuf behavior.
+typedef _STLP_LONG_LONG streamoff;
+# else
+typedef ptrdiff_t streamoff;
+# endif
+#else // __unix
+# ifdef _STLP_USE_DEFAULT_FILE_OFFSET
+typedef off_t streamoff;
+# elif defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) /* || defined(__USE_FILE_OFFSET64) */ \
+ /* || (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */ /* || defined (__sgi) && defined (_STLP_HAS_NO_NEW_C_HEADERS) */
+typedef off64_t streamoff;
+# else
+typedef off_t streamoff;
+# endif
+#endif /* __unix */
+
+#if defined (_STLP_WIN32)
+typedef streamoff streamsize;
+#else
+typedef ptrdiff_t streamsize;
+#endif
+
+// Class fpos, which represents a position within a file. (The C++
+// standard calls for it to be defined in <ios>. This implementation
+// moves it to <iosfwd>, which is included by <ios>.)
+template <class _StateT> class fpos {
+public: // From table 88 of the C++ standard.
+ fpos(streamoff __pos) : _M_pos(__pos), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {}
+ fpos() : _M_pos(0), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {}
+
+ operator streamoff() const { return _M_pos; }
+
+ bool operator==(const fpos& __y) const
+ { return _M_pos == __y._M_pos; }
+ bool operator!=(const fpos& __y) const
+ { return _M_pos != __y._M_pos; }
+
+ fpos& operator+=(streamoff __off) {
+ _M_pos += __off;
+ return *this;
+ }
+ fpos& operator-=(streamoff __off) {
+ _M_pos -= __off;
+ return *this;
+ }
+
+ fpos operator+(streamoff __off) {
+ fpos __tmp(*this);
+ __tmp += __off;
+ return __tmp;
+ }
+ fpos operator-(streamoff __off) {
+ fpos __tmp(*this);
+ __tmp -= __off;
+ return __tmp;
+ }
+
+public: // Manipulation of the state member.
+ _StateT state() const { return _M_st; }
+ void state(_StateT __st) { _M_st = __st; }
+private:
+ streamoff _M_pos;
+ _StateT _M_st;
+};
+
+typedef fpos<mbstate_t> streampos;
+typedef fpos<mbstate_t> wstreampos;
+
+// Class __char_traits_base.
+template <class _CharT, class _IntT>
+class __char_traits_base {
+public:
+ typedef _CharT char_type;
+ typedef _IntT int_type;
+ typedef streamoff off_type;
+ typedef streampos pos_type;
+ typedef mbstate_t state_type;
+
+ static void _STLP_CALL assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; }
+ static bool _STLP_CALL eq(const char_type& __c1, const char_type& __c2)
+ { return __c1 == __c2; }
+ static bool _STLP_CALL lt(const char_type& __c1, const char_type& __c2)
+ { return __c1 < __c2; }
+
+ static int _STLP_CALL compare(const char_type* __s1, const char_type* __s2, size_t __n) {
+ for (size_t __i = 0; __i < __n; ++__i)
+ if (!eq(__s1[__i], __s2[__i]))
+ return __s1[__i] < __s2[__i] ? -1 : 1;
+ return 0;
+ }
+
+ static size_t _STLP_CALL length(const char_type* __s) {
+ const char_type _NullChar = _STLP_DEFAULT_CONSTRUCTED(char_type);
+ size_t __i(0);
+ for (; !eq(__s[__i], _NullChar); ++__i) {}
+ return __i;
+ }
+
+ static const char_type* _STLP_CALL find(const char_type* __s, size_t __n, const char_type& __c) {
+ for ( ; __n > 0 ; ++__s, --__n)
+ if (eq(*__s, __c))
+ return __s;
+ return 0;
+ }
+
+ static char_type* _STLP_CALL move(char_type* __s1, const char_type* __s2, size_t _Sz)
+ { return (_Sz == 0 ? __s1 : (char_type*)memmove(__s1, __s2, _Sz * sizeof(char_type))); }
+
+ static char_type* _STLP_CALL copy(char_type* __s1, const char_type* __s2, size_t __n) {
+ return (__n == 0 ? __s1 :
+ (char_type*)memcpy(__s1, __s2, __n * sizeof(char_type)));
+ }
+
+ static char_type* _STLP_CALL assign(char_type* __s, size_t __n, char_type __c) {
+ for (size_t __i = 0; __i < __n; ++__i)
+ __s[__i] = __c;
+ return __s;
+ }
+
+ static int_type _STLP_CALL not_eof(const int_type& __c)
+ { return !eq_int_type(__c, eof()) ? __c : __STATIC_CAST(int_type, 0); }
+
+ static char_type _STLP_CALL to_char_type(const int_type& __c)
+ { return (char_type)__c; }
+
+ static int_type _STLP_CALL to_int_type(const char_type& __c)
+ { return (int_type)__c; }
+
+ static bool _STLP_CALL eq_int_type(const int_type& __c1, const int_type& __c2)
+ { return __c1 == __c2; }
+
+ static int_type _STLP_CALL eof()
+ { return (int_type)-1; }
+};
+
+// Generic char_traits class. Note that this class is provided only
+// as a base for explicit specialization; it is unlikely to be useful
+// as is for any particular user-defined type. In particular, it
+// *will not work* for a non-POD type.
+
+template <class _CharT>
+class char_traits
+ : public __char_traits_base<_CharT, _CharT> {};
+
+// Specialization for char.
+
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC char_traits<char>
+ : public __char_traits_base<char, int>,
+ public __stlport_class<char_traits<char> > {
+public:
+ typedef char char_type;
+ typedef int int_type;
+ typedef streamoff off_type;
+ typedef streampos pos_type;
+ typedef mbstate_t state_type;
+
+ static char _STLP_CALL to_char_type(const int& __c)
+ { return (char)(unsigned char)__c; }
+
+ static int _STLP_CALL to_int_type(const char& __c)
+ { return (unsigned char)__c; }
+
+ static int _STLP_CALL compare(const char* __s1, const char* __s2, size_t __n)
+ { return memcmp(__s1, __s2, __n); }
+
+ static size_t _STLP_CALL length(const char* __s)
+ { return strlen(__s); }
+
+ static void _STLP_CALL assign(char& __c1, const char& __c2)
+ { __c1 = __c2; }
+
+ static char* _STLP_CALL assign(char* __s, size_t __n, char __c) {
+ memset(__s, __c, __n);
+ return __s;
+ }
+};
+
+#if defined (_STLP_HAS_WCHAR_T)
+// Specialization for wchar_t.
+_STLP_TEMPLATE_NULL
+class _STLP_CLASS_DECLSPEC char_traits<wchar_t>
+ : public __char_traits_base<wchar_t, wint_t> {
+# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined (_STLP_WCHAR_HPACC_EXCLUDE)
+public:
+# if !defined (__BORLANDC__)
+ static wchar_t* _STLP_CALL move(wchar_t* __dest, const wchar_t* __src, size_t __n)
+ { return wmemmove(__dest, __src, __n); }
+# endif
+
+ static wchar_t* _STLP_CALL copy(wchar_t* __dest, const wchar_t* __src, size_t __n)
+ { return wmemcpy(__dest, __src, __n); }
+
+# if !defined (__DMC__) && !defined (__BORLANDC__)
+ static int _STLP_CALL compare(const wchar_t* __s1, const wchar_t* __s2, size_t __n)
+ { return wmemcmp(__s1, __s2, __n); }
+# endif
+
+ static wchar_t* _STLP_CALL assign(wchar_t* __s, size_t __n, wchar_t __c)
+ { return wmemset(__s, __c, __n); }
+
+ static size_t _STLP_CALL length(const wchar_t* __s)
+ { return wcslen(__s); }
+
+ static void _STLP_CALL assign(wchar_t& __c1, const wchar_t& __c2)
+ { __c1 = __c2; }
+# endif
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_CHAR_TRAITS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/concept_checks.h b/6/sources/cxx-stl/stlport/stlport/stl/concept_checks.h
new file mode 100644
index 0000000..5fe02c2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/concept_checks.h
@@ -0,0 +1,810 @@
+/*
+ * Copyright (c) 1999
+ * 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.
+ */
+
+#ifndef __CONCEPT_CHECKS_H
+#define __CONCEPT_CHECKS_H
+
+/*
+ Use these macro like assertions, but they assert properties
+ on types (usually template arguments). In technical terms they
+ verify whether a type "models" a "concept".
+
+ This set of requirements and the terminology used here is derived
+ from the book "Generic Programming and the STL" by Matt Austern
+ (Addison Wesley). For further information please consult that
+ book. The requirements also are intended to match the ANSI/ISO C++
+ standard.
+
+ This file covers the basic concepts and the iterator concepts.
+ There are several other files that provide the requirements
+ for the STL containers:
+ container_concepts.h
+ sequence_concepts.h
+ assoc_container_concepts.h
+
+ Jeremy Siek, 1999
+
+ TO DO:
+ - some issues with regards to concept classification and mutability
+ including AssociativeContianer -> ForwardContainer
+ and SortedAssociativeContainer -> ReversibleContainer
+ - HashedAssociativeContainer
+ - Allocator
+ - Function Object Concepts
+
+ */
+
+#ifndef _STLP_USE_CONCEPT_CHECKS
+
+// Some compilers lack the features that are necessary for concept checks.
+// On those compilers we define the concept check macros to do nothing.
+#define _STLP_REQUIRES(__type_var, __concept) do {} while(0)
+#define _STLP_CLASS_REQUIRES(__type_var, __concept) \
+ static int __##__type_var##_##__concept
+#define _STLP_CONVERTIBLE(__type_x, __type_y) do {} while(0)
+#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) do {} while(0)
+#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \
+ static int __##__type_x##__type_y##_require_same_type
+#define _STLP_GENERATOR_CHECK(__func, __ret) do {} while(0)
+#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \
+ static int __##__func##__ret##_generator_check
+#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) do {} while(0)
+#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
+ static int __##__func##__ret##__arg##_unary_function_check
+#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
+ do {} while(0)
+#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
+ static int __##__func##__ret##__first##__second##_binary_function_check
+#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
+ do {} while(0)
+#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
+ static int __##__opname##__ret##__first##__second##_require_binary_op
+
+#else /* _STLP_USE_CONCEPT_CHECKS */
+
+// This macro tests whether the template argument "__type_var"
+// satisfies the requirements of "__concept". Here is a list of concepts
+// that we know how to check:
+// _Allocator
+// _Assignable
+// _DefaultConstructible
+// _EqualityComparable
+// _LessThanComparable
+// _TrivialIterator
+// _InputIterator
+// _OutputIterator
+// _ForwardIterator
+// _BidirectionalIterator
+// _RandomAccessIterator
+// _Mutable_TrivialIterator
+// _Mutable_ForwardIterator
+// _Mutable_BidirectionalIterator
+// _Mutable_RandomAccessIterator
+
+#define _STLP_REQUIRES(__type_var, __concept) \
+do { \
+ void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\
+ ::##__concept##_requirement_violation; __x = __x; } while (0)
+
+// Use this to check whether type X is convertible to type Y
+#define _STLP_CONVERTIBLE(__type_x, __type_y) \
+do { \
+ void (*__x)( __type_x , __type_y ) = _STL_CONVERT_ERROR< __type_x , \
+ __type_y >::__type_X_is_not_convertible_to_type_Y; \
+ __x = __x; } while (0)
+
+// Use this to test whether two template arguments are the same type
+#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) \
+do { \
+ void (*__x)( __type_x , __type_y ) = _STL_SAME_TYPE_ERROR< __type_x, \
+ __type_y >::__type_X_not_same_as_type_Y; \
+ __x = __x; } while (0)
+
+
+// function object checks
+#define _STLP_GENERATOR_CHECK(__func, __ret) \
+do { \
+ __ret (*__x)( __func&) = \
+ _STL_GENERATOR_ERROR< \
+ __func, __ret>::__generator_requirement_violation; \
+ __x = __x; } while (0)
+
+
+#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
+do { \
+ __ret (*__x)( __func&, const __arg& ) = \
+ _STL_UNARY_FUNCTION_ERROR< \
+ __func, __ret, __arg>::__unary_function_requirement_violation; \
+ __x = __x; } while (0)
+
+
+#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
+do { \
+ __ret (*__x)( __func&, const __first&, const __second& ) = \
+ _STL_BINARY_FUNCTION_ERROR< \
+ __func, __ret, __first, __second>::__binary_function_requirement_violation; \
+ __x = __x; } while (0)
+
+
+#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
+ do { \
+ __ret (*__x)( __first&, __second& ) = _STL_BINARY##__opname##_ERROR< \
+ __ret, __first, __second>::__binary_operator_requirement_violation; \
+ __ret (*__y)( const __first&, const __second& ) = \
+ _STL_BINARY##__opname##_ERROR< __ret, __first, __second>:: \
+ __const_binary_operator_requirement_violation; \
+ __y = __y; __x = __x; } while (0)
+
+
+#ifdef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
+
+#define _STLP_CLASS_REQUIRES(__type_var, __concept)
+#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y)
+#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret)
+#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg)
+#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second)
+#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second)
+
+#else
+
+// Use this macro inside of template classes, where you would
+// like to place requirements on the template arguments to the class
+// Warning: do not pass pointers and such (e.g. T*) in as the __type_var,
+// since the type_var is used to construct identifiers. Instead typedef
+// the pointer type, then use the typedef name for the __type_var.
+#define _STLP_CLASS_REQUIRES(__type_var, __concept) \
+ typedef void (* __func##__type_var##__concept)( __type_var ); \
+ template <__func##__type_var##__concept _Tp1> \
+ struct __dummy_struct_##__type_var##__concept { }; \
+ static __dummy_struct_##__type_var##__concept< \
+ __concept##_concept_specification< \
+ __type_var>::__concept##_requirement_violation> \
+ __dummy_ptr_##__type_var##__concept
+
+
+#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \
+ typedef void (* __func_##__type_x##__type_y##same_type)( __type_x, \
+ __type_y ); \
+ template < __func_##__type_x##__type_y##same_type _Tp1> \
+ struct __dummy_struct_##__type_x##__type_y##_same_type { }; \
+ static __dummy_struct_##__type_x##__type_y##_same_type< \
+ _STL_SAME_TYPE_ERROR<__type_x, __type_y>::__type_X_not_same_as_type_Y> \
+ __dummy_ptr_##__type_x##__type_y##_same_type
+
+
+#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \
+ typedef __ret (* __f_##__func##__ret##_generator)( __func& ); \
+ template <__f_##__func##__ret##_generator _Tp1> \
+ struct __dummy_struct_##__func##__ret##_generator { }; \
+ static __dummy_struct_##__func##__ret##_generator< \
+ _STL_GENERATOR_ERROR< \
+ __func, __ret>::__generator_requirement_violation> \
+ __dummy_ptr_##__func##__ret##_generator
+
+
+#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
+ typedef __ret (* __f_##__func##__ret##__arg##_unary_check)( __func&, \
+ const __arg& ); \
+ template <__f_##__func##__ret##__arg##_unary_check _Tp1> \
+ struct __dummy_struct_##__func##__ret##__arg##_unary_check { }; \
+ static __dummy_struct_##__func##__ret##__arg##_unary_check< \
+ _STL_UNARY_FUNCTION_ERROR< \
+ __func, __ret, __arg>::__unary_function_requirement_violation> \
+ __dummy_ptr_##__func##__ret##__arg##_unary_check
+
+
+#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
+ typedef __ret (* __f_##__func##__ret##__first##__second##_binary_check)( __func&, const __first&,\
+ const __second& ); \
+ template <__f_##__func##__ret##__first##__second##_binary_check _Tp1> \
+ struct __dummy_struct_##__func##__ret##__first##__second##_binary_check { }; \
+ static __dummy_struct_##__func##__ret##__first##__second##_binary_check< \
+ _STL_BINARY_FUNCTION_ERROR<__func, __ret, __first, __second>:: \
+ __binary_function_requirement_violation> \
+ __dummy_ptr_##__func##__ret##__first##__second##_binary_check
+
+
+#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
+ typedef __ret (* __f_##__func##__ret##__first##__second##_binary_op)(const __first&, \
+ const __second& ); \
+ template <__f_##__func##__ret##__first##__second##_binary_op _Tp1> \
+ struct __dummy_struct_##__func##__ret##__first##__second##_binary_op { }; \
+ static __dummy_struct_##__func##__ret##__first##__second##_binary_op< \
+ _STL_BINARY##__opname##_ERROR<__ret, __first, __second>:: \
+ __binary_operator_requirement_violation> \
+ __dummy_ptr_##__func##__ret##__first##__second##_binary_op
+
+#endif
+
+/* helper class for finding non-const version of a type. Need to have
+ something to assign to etc. when testing constant iterators. */
+
+template <class _Tp>
+struct _Mutable_trait {
+ typedef _Tp _Type;
+};
+template <class _Tp>
+struct _Mutable_trait<const _Tp> {
+ typedef _Tp _Type;
+};
+
+
+/* helper function for avoiding compiler warnings about unused variables */
+template <class _Type>
+void __sink_unused_warning(_Type) { }
+
+template <class _TypeX, class _TypeY>
+struct _STL_CONVERT_ERROR {
+ static void
+ __type_X_is_not_convertible_to_type_Y(_TypeX __x, _TypeY) {
+ _TypeY __y = __x;
+ __sink_unused_warning(__y);
+ }
+};
+
+
+template <class _Type> struct __check_equal { };
+
+template <class _TypeX, class _TypeY>
+struct _STL_SAME_TYPE_ERROR {
+ static void
+ __type_X_not_same_as_type_Y(_TypeX , _TypeY ) {
+ __check_equal<_TypeX> t1 = __check_equal<_TypeY>();
+ }
+};
+
+
+// Some Functon Object Checks
+
+template <class _Func, class _Ret>
+struct _STL_GENERATOR_ERROR {
+ static _Ret __generator_requirement_violation(_Func& __f) {
+ return __f();
+ }
+};
+
+template <class _Func>
+struct _STL_GENERATOR_ERROR<_Func, void> {
+ static void __generator_requirement_violation(_Func& __f) {
+ __f();
+ }
+};
+
+
+template <class _Func, class _Ret, class _Arg>
+struct _STL_UNARY_FUNCTION_ERROR {
+ static _Ret
+ __unary_function_requirement_violation(_Func& __f,
+ const _Arg& __arg) {
+ return __f(__arg);
+ }
+};
+
+template <class _Func, class _Arg>
+struct _STL_UNARY_FUNCTION_ERROR<_Func, void, _Arg> {
+ static void
+ __unary_function_requirement_violation(_Func& __f,
+ const _Arg& __arg) {
+ __f(__arg);
+ }
+};
+
+template <class _Func, class _Ret, class _First, class _Second>
+struct _STL_BINARY_FUNCTION_ERROR {
+ static _Ret
+ __binary_function_requirement_violation(_Func& __f,
+ const _First& __first,
+ const _Second& __second) {
+ return __f(__first, __second);
+ }
+};
+
+template <class _Func, class _First, class _Second>
+struct _STL_BINARY_FUNCTION_ERROR<_Func, void, _First, _Second> {
+ static void
+ __binary_function_requirement_violation(_Func& __f,
+ const _First& __first,
+ const _Second& __second) {
+ __f(__first, __second);
+ }
+};
+
+
+#define _STLP_DEFINE_BINARY_OP_CHECK(_OP, _NAME) \
+template <class _Ret, class _First, class _Second> \
+struct _STL_BINARY##_NAME##_ERROR { \
+ static _Ret \
+ __const_binary_operator_requirement_violation(const _First& __first, \
+ const _Second& __second) { \
+ return __first _OP __second; \
+ } \
+ static _Ret \
+ __binary_operator_requirement_violation(_First& __first, \
+ _Second& __second) { \
+ return __first _OP __second; \
+ } \
+}
+
+_STLP_DEFINE_BINARY_OP_CHECK(==, _OP_EQUAL);
+_STLP_DEFINE_BINARY_OP_CHECK(!=, _OP_NOT_EQUAL);
+_STLP_DEFINE_BINARY_OP_CHECK(<, _OP_LESS_THAN);
+_STLP_DEFINE_BINARY_OP_CHECK(<=, _OP_LESS_EQUAL);
+_STLP_DEFINE_BINARY_OP_CHECK(>, _OP_GREATER_THAN);
+_STLP_DEFINE_BINARY_OP_CHECK(>=, _OP_GREATER_EQUAL);
+_STLP_DEFINE_BINARY_OP_CHECK(+, _OP_PLUS);
+_STLP_DEFINE_BINARY_OP_CHECK(*, _OP_TIMES);
+_STLP_DEFINE_BINARY_OP_CHECK(/, _OP_DIVIDE);
+_STLP_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT);
+_STLP_DEFINE_BINARY_OP_CHECK(%, _OP_MOD);
+// ...
+
+// TODO, add unary operators (prefix and postfix)
+
+/*
+ The presence of this class is just to trick EDG into displaying
+ these error messages before any other errors. Without the
+ classes, the errors in the functions get reported after
+ other class errors deep inside the library. The name
+ choice just makes for an eye catching error message :)
+ */
+struct _STL_ERROR {
+
+ template <class _Type>
+ static _Type
+ __default_constructor_requirement_violation(_Type) {
+ return _Type();
+ }
+ template <class _Type>
+ static _Type
+ __assignment_operator_requirement_violation(_Type __a) {
+ __a = __a;
+ return __a;
+ }
+ template <class _Type>
+ static _Type
+ __copy_constructor_requirement_violation(_Type __a) {
+ _Type __c(__a);
+ return __c;
+ }
+ template <class _Type>
+ static _Type
+ __const_parameter_required_for_copy_constructor(_Type /* __a */,
+ const _Type& __b) {
+ _Type __c(__b);
+ return __c;
+ }
+ template <class _Type>
+ static _Type
+ __const_parameter_required_for_assignment_operator(_Type __a,
+ const _Type& __b) {
+ __a = __b;
+ return __a;
+ }
+ template <class _Type>
+ static _Type
+ __less_than_comparable_requirement_violation(_Type __a, _Type __b) {
+ if (__a < __b || __a > __b || __a <= __b || __a >= __b) return __a;
+ return __b;
+ }
+ template <class _Type>
+ static _Type
+ __equality_comparable_requirement_violation(_Type __a, _Type __b) {
+ if (__a == __b || __a != __b) return __a;
+ return __b;
+ }
+ template <class _Iterator>
+ static void
+ __dereference_operator_requirement_violation(_Iterator __i) {
+ __sink_unused_warning(*__i);
+ }
+ template <class _Iterator>
+ static void
+ __dereference_operator_and_assignment_requirement_violation(_Iterator __i) {
+ *__i = *__i;
+ }
+ template <class _Iterator>
+ static void
+ __preincrement_operator_requirement_violation(_Iterator __i) {
+ ++__i;
+ }
+ template <class _Iterator>
+ static void
+ __postincrement_operator_requirement_violation(_Iterator __i) {
+ __i++;
+ }
+ template <class _Iterator>
+ static void
+ __predecrement_operator_requirement_violation(_Iterator __i) {
+ --__i;
+ }
+ template <class _Iterator>
+ static void
+ __postdecrement_operator_requirement_violation(_Iterator __i) {
+ __i--;
+ }
+ template <class _Iterator, class _Type>
+ static void
+ __postincrement_operator_and_assignment_requirement_violation(_Iterator __i,
+ _Type __t) {
+ *__i++ = __t;
+ }
+ template <class _Iterator, class _Distance>
+ static _Iterator
+ __iterator_addition_assignment_requirement_violation(_Iterator __i,
+ _Distance __n) {
+ __i += __n;
+ return __i;
+ }
+ template <class _Iterator, class _Distance>
+ static _Iterator
+ __iterator_addition_requirement_violation(_Iterator __i, _Distance __n) {
+ __i = __i + __n;
+ __i = __n + __i;
+ return __i;
+ }
+ template <class _Iterator, class _Distance>
+ static _Iterator
+ __iterator_subtraction_assignment_requirement_violation(_Iterator __i,
+ _Distance __n) {
+ __i -= __n;
+ return __i;
+ }
+ template <class _Iterator, class _Distance>
+ static _Iterator
+ __iterator_subtraction_requirement_violation(_Iterator __i, _Distance __n) {
+ __i = __i - __n;
+ return __i;
+ }
+ template <class _Iterator, class _Distance>
+ static _Distance
+ __difference_operator_requirement_violation(_Iterator __i, _Iterator __j,
+ _Distance __n) {
+ __n = __i - __j;
+ return __n;
+ }
+ template <class _Exp, class _Type, class _Distance>
+ static _Type
+ __element_access_operator_requirement_violation(_Exp __x, _Type*,
+ _Distance __n) {
+ return __x[__n];
+ }
+ template <class _Exp, class _Type, class _Distance>
+ static void
+ __element_assignment_operator_requirement_violation(_Exp __x,
+ _Type* __t,
+ _Distance __n) {
+ __x[__n] = *__t;
+ }
+
+}; /* _STL_ERROR */
+
+/* Associated Type Requirements */
+
+_STLP_BEGIN_NAMESPACE
+template <class _Iterator> struct iterator_traits;
+_STLP_END_NAMESPACE
+
+template <class _Iter>
+struct __value_type_type_definition_requirement_violation {
+ typedef typename __STD::iterator_traits<_Iter>::value_type value_type;
+};
+
+template <class _Iter>
+struct __difference_type_type_definition_requirement_violation {
+ typedef typename __STD::iterator_traits<_Iter>::difference_type
+ difference_type;
+};
+
+template <class _Iter>
+struct __reference_type_definition_requirement_violation {
+ typedef typename __STD::iterator_traits<_Iter>::reference reference;
+};
+
+template <class _Iter>
+struct __pointer_type_definition_requirement_violation {
+ typedef typename __STD::iterator_traits<_Iter>::pointer pointer;
+};
+
+template <class _Iter>
+struct __iterator_category_type_definition_requirement_violation {
+ typedef typename __STD::iterator_traits<_Iter>::iterator_category
+ iterator_category;
+};
+
+/* Assignable Requirements */
+
+
+template <class _Type>
+struct _Assignable_concept_specification {
+ static void _Assignable_requirement_violation(_Type __a) {
+ _STL_ERROR::__assignment_operator_requirement_violation(__a);
+ _STL_ERROR::__copy_constructor_requirement_violation(__a);
+ _STL_ERROR::__const_parameter_required_for_copy_constructor(__a,__a);
+ _STL_ERROR::__const_parameter_required_for_assignment_operator(__a,__a);
+ }
+};
+
+/* DefaultConstructible Requirements */
+
+
+template <class _Type>
+struct _DefaultConstructible_concept_specification {
+ static void _DefaultConstructible_requirement_violation(_Type __a) {
+ _STL_ERROR::__default_constructor_requirement_violation(__a);
+ }
+};
+
+/* EqualityComparable Requirements */
+
+template <class _Type>
+struct _EqualityComparable_concept_specification {
+ static void _EqualityComparable_requirement_violation(_Type __a) {
+ _STL_ERROR::__equality_comparable_requirement_violation(__a, __a);
+ }
+};
+
+/* LessThanComparable Requirements */
+template <class _Type>
+struct _LessThanComparable_concept_specification {
+ static void _LessThanComparable_requirement_violation(_Type __a) {
+ _STL_ERROR::__less_than_comparable_requirement_violation(__a, __a);
+ }
+};
+
+/* TrivialIterator Requirements */
+
+template <class _TrivialIterator>
+struct _TrivialIterator_concept_specification {
+static void
+_TrivialIterator_requirement_violation(_TrivialIterator __i) {
+ typedef typename
+ __value_type_type_definition_requirement_violation<_TrivialIterator>::
+ value_type __T;
+ // Refinement of Assignable
+ _Assignable_concept_specification<_TrivialIterator>::
+ _Assignable_requirement_violation(__i);
+ // Refinement of DefaultConstructible
+ _DefaultConstructible_concept_specification<_TrivialIterator>::
+ _DefaultConstructible_requirement_violation(__i);
+ // Refinement of EqualityComparable
+ _EqualityComparable_concept_specification<_TrivialIterator>::
+ _EqualityComparable_requirement_violation(__i);
+ // Valid Expressions
+ _STL_ERROR::__dereference_operator_requirement_violation(__i);
+}
+};
+
+template <class _TrivialIterator>
+struct _Mutable_TrivialIterator_concept_specification {
+static void
+_Mutable_TrivialIterator_requirement_violation(_TrivialIterator __i) {
+ _TrivialIterator_concept_specification<_TrivialIterator>::
+ _TrivialIterator_requirement_violation(__i);
+ // Valid Expressions
+ _STL_ERROR::__dereference_operator_and_assignment_requirement_violation(__i);
+}
+};
+
+/* InputIterator Requirements */
+
+template <class _InputIterator>
+struct _InputIterator_concept_specification {
+static void
+_InputIterator_requirement_violation(_InputIterator __i) {
+ // Refinement of TrivialIterator
+ _TrivialIterator_concept_specification<_InputIterator>::
+ _TrivialIterator_requirement_violation(__i);
+ // Associated Types
+ __difference_type_type_definition_requirement_violation<_InputIterator>();
+ __reference_type_definition_requirement_violation<_InputIterator>();
+ __pointer_type_definition_requirement_violation<_InputIterator>();
+ __iterator_category_type_definition_requirement_violation<_InputIterator>();
+ // Valid Expressions
+ _STL_ERROR::__preincrement_operator_requirement_violation(__i);
+ _STL_ERROR::__postincrement_operator_requirement_violation(__i);
+}
+};
+
+/* OutputIterator Requirements */
+
+template <class _OutputIterator>
+struct _OutputIterator_concept_specification {
+static void
+_OutputIterator_requirement_violation(_OutputIterator __i) {
+ // Refinement of Assignable
+ _Assignable_concept_specification<_OutputIterator>::
+ _Assignable_requirement_violation(__i);
+ // Associated Types
+ __iterator_category_type_definition_requirement_violation<_OutputIterator>();
+ // Valid Expressions
+ _STL_ERROR::__dereference_operator_requirement_violation(__i);
+ _STL_ERROR::__preincrement_operator_requirement_violation(__i);
+ _STL_ERROR::__postincrement_operator_requirement_violation(__i);
+ _STL_ERROR::
+ __postincrement_operator_and_assignment_requirement_violation(__i, *__i);
+}
+};
+
+/* ForwardIterator Requirements */
+
+template <class _ForwardIterator>
+struct _ForwardIterator_concept_specification {
+static void
+_ForwardIterator_requirement_violation(_ForwardIterator __i) {
+ // Refinement of InputIterator
+ _InputIterator_concept_specification<_ForwardIterator>::
+ _InputIterator_requirement_violation(__i);
+}
+};
+
+template <class _ForwardIterator>
+struct _Mutable_ForwardIterator_concept_specification {
+static void
+_Mutable_ForwardIterator_requirement_violation(_ForwardIterator __i) {
+ _ForwardIterator_concept_specification<_ForwardIterator>::
+ _ForwardIterator_requirement_violation(__i);
+ // Refinement of OutputIterator
+ _OutputIterator_concept_specification<_ForwardIterator>::
+ _OutputIterator_requirement_violation(__i);
+}
+};
+
+/* BidirectionalIterator Requirements */
+
+template <class _BidirectionalIterator>
+struct _BidirectionalIterator_concept_specification {
+static void
+_BidirectionalIterator_requirement_violation(_BidirectionalIterator __i) {
+ // Refinement of ForwardIterator
+ _ForwardIterator_concept_specification<_BidirectionalIterator>::
+ _ForwardIterator_requirement_violation(__i);
+ // Valid Expressions
+ _STL_ERROR::__predecrement_operator_requirement_violation(__i);
+ _STL_ERROR::__postdecrement_operator_requirement_violation(__i);
+}
+};
+
+template <class _BidirectionalIterator>
+struct _Mutable_BidirectionalIterator_concept_specification {
+static void
+_Mutable_BidirectionalIterator_requirement_violation(
+ _BidirectionalIterator __i)
+{
+ _BidirectionalIterator_concept_specification<_BidirectionalIterator>::
+ _BidirectionalIterator_requirement_violation(__i);
+ // Refinement of mutable_ForwardIterator
+ _Mutable_ForwardIterator_concept_specification<_BidirectionalIterator>::
+ _Mutable_ForwardIterator_requirement_violation(__i);
+ typedef typename
+ __value_type_type_definition_requirement_violation<
+ _BidirectionalIterator>::value_type __T;
+ typename _Mutable_trait<__T>::_Type* __tmp_ptr = 0;
+ // Valid Expressions
+ _STL_ERROR::
+ __postincrement_operator_and_assignment_requirement_violation(__i,
+ *__tmp_ptr);
+}
+};
+
+/* RandomAccessIterator Requirements */
+
+template <class _RandAccIter>
+struct _RandomAccessIterator_concept_specification {
+static void
+_RandomAccessIterator_requirement_violation(_RandAccIter __i) {
+ // Refinement of BidirectionalIterator
+ _BidirectionalIterator_concept_specification<_RandAccIter>::
+ _BidirectionalIterator_requirement_violation(__i);
+ // Refinement of LessThanComparable
+ _LessThanComparable_concept_specification<_RandAccIter>::
+ _LessThanComparable_requirement_violation(__i);
+ typedef typename
+ __value_type_type_definition_requirement_violation<_RandAccIter>
+ ::value_type
+ value_type;
+ typedef typename
+ __difference_type_type_definition_requirement_violation<_RandAccIter>
+ ::difference_type
+ _Dist;
+ typedef typename _Mutable_trait<_Dist>::_Type _MutDist;
+
+ // Valid Expressions
+ _STL_ERROR::__iterator_addition_assignment_requirement_violation(__i,
+ _MutDist());
+ _STL_ERROR::__iterator_addition_requirement_violation(__i,
+ _MutDist());
+ _STL_ERROR::
+ __iterator_subtraction_assignment_requirement_violation(__i,
+ _MutDist());
+ _STL_ERROR::__iterator_subtraction_requirement_violation(__i,
+ _MutDist());
+ _STL_ERROR::__difference_operator_requirement_violation(__i, __i,
+ _MutDist());
+ typename _Mutable_trait<value_type>::_Type* __dummy_ptr = 0;
+ _STL_ERROR::__element_access_operator_requirement_violation(__i,
+ __dummy_ptr,
+ _MutDist());
+}
+};
+
+template <class _RandAccIter>
+struct _Mutable_RandomAccessIterator_concept_specification {
+static void
+_Mutable_RandomAccessIterator_requirement_violation(_RandAccIter __i)
+{
+ _RandomAccessIterator_concept_specification<_RandAccIter>::
+ _RandomAccessIterator_requirement_violation(__i);
+ // Refinement of mutable_BidirectionalIterator
+ _Mutable_BidirectionalIterator_concept_specification<_RandAccIter>::
+ _Mutable_BidirectionalIterator_requirement_violation(__i);
+ typedef typename
+ __value_type_type_definition_requirement_violation<_RandAccIter>
+ ::value_type
+ value_type;
+ typedef typename
+ __difference_type_type_definition_requirement_violation<_RandAccIter>
+ ::difference_type
+ _Dist;
+
+ typename _Mutable_trait<value_type>::_Type* __tmp_ptr = 0;
+ // Valid Expressions
+ _STL_ERROR::__element_assignment_operator_requirement_violation(__i,
+ __tmp_ptr, _Dist());
+}
+};
+
+#define _STLP_TYPEDEF_REQUIREMENT(__REQUIREMENT) \
+template <class Type> \
+struct __##__REQUIREMENT##__typedef_requirement_violation { \
+ typedef typename Type::__REQUIREMENT __REQUIREMENT; \
+};
+
+_STLP_TYPEDEF_REQUIREMENT(value_type);
+_STLP_TYPEDEF_REQUIREMENT(difference_type);
+_STLP_TYPEDEF_REQUIREMENT(size_type);
+_STLP_TYPEDEF_REQUIREMENT(reference);
+_STLP_TYPEDEF_REQUIREMENT(const_reference);
+_STLP_TYPEDEF_REQUIREMENT(pointer);
+_STLP_TYPEDEF_REQUIREMENT(const_pointer);
+
+
+template <class _Alloc>
+struct _Allocator_concept_specification {
+static void
+_Allocator_requirement_violation(_Alloc __a) {
+ // Refinement of DefaultConstructible
+ _DefaultConstructible_concept_specification<_Alloc>::
+ _DefaultConstructible_requirement_violation(__a);
+ // Refinement of EqualityComparable
+ _EqualityComparable_concept_specification<_Alloc>::
+ _EqualityComparable_requirement_violation(__a);
+ // Associated Types
+ __value_type__typedef_requirement_violation<_Alloc>();
+ __difference_type__typedef_requirement_violation<_Alloc>();
+ __size_type__typedef_requirement_violation<_Alloc>();
+ __reference__typedef_requirement_violation<_Alloc>();
+ __const_reference__typedef_requirement_violation<_Alloc>();
+ __pointer__typedef_requirement_violation<_Alloc>();
+ __const_pointer__typedef_requirement_violation<_Alloc>();
+ typedef typename _Alloc::value_type _Type;
+ _STLP_REQUIRES_SAME_TYPE(typename _Alloc::rebind<_Type>::other, _Alloc);
+}
+};
+
+#endif /* _STLP_USE_CONCEPT_CHECKS */
+
+#endif /* __CONCEPT_CHECKS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_aix.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_aix.h
new file mode 100644
index 0000000..45ea8b6
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_aix.h
@@ -0,0 +1,3 @@
+#define _STLP_PLATFORM "AIX"
+
+#define _STLP_USE_UNIX_IO
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_android.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_android.h
new file mode 100644
index 0000000..a9f1cd8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_android.h
@@ -0,0 +1,76 @@
+#ifndef __stl_config__android_h
+#define __stl_config__android_h
+
+#define _STLP_PLATFORM "Android"
+
+// Mostly Unix-like.
+#define _STLP_UNIX 1
+
+// Have pthreads support.
+#define _PTHREADS
+
+// Don't have native <cplusplus> headers
+#define _STLP_HAS_NO_NEW_C_HEADERS 1
+
+// Use unix for streams
+#define _STLP_USE_UNIX_IO 1
+
+// No rtti support
+#define _STLP_NO_RTTI 1
+
+// C library is in the global namespace.
+#define _STLP_VENDOR_GLOBAL_CSTD 1
+
+// Don't have underlying local support.
+#undef _STLP_REAL_LOCALE_IMPLEMENTED
+
+// No pthread_spinlock_t in Android
+#define _STLP_DONT_USE_PTHREAD_SPINLOCK 1
+
+// Enable thread support
+#undef _NOTHREADS
+
+// Little endian platform.
+#define _STLP_LITTLE_ENDIAN 1
+
+// No <exception> headers
+#define _STLP_NO_EXCEPTION_HEADER 1
+
+// No throwing exceptions
+#define _STLP_NO_EXCEPTIONS 1
+
+// No need to define our own namespace
+#define _STLP_NO_OWN_NAMESPACE 1
+
+// Use __new_alloc instead of __node_alloc, so we don't need static functions.
+#define _STLP_USE_SIMPLE_NODE_ALLOC 1
+
+// Don't use extern versions of range errors, so we don't need to
+// compile as a library.
+#define _STLP_USE_NO_EXTERN_RANGE_ERRORS 1
+
+// The system math library doesn't have long double variants, e.g
+// sinl, cosl, etc
+#define _STLP_NO_VENDOR_MATH_L 1
+
+// Define how to include our native headers.
+#define _STLP_NATIVE_HEADER(header) <usr/include/header>
+#define _STLP_NATIVE_C_HEADER(header) <../include/header>
+#define _STLP_NATIVE_CPP_C_HEADER(header) <../../system/include/header>
+#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../../system/include/header>
+#define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <usr/include/header>
+
+// Include most of the gcc settings.
+#include <stl/config/_gcc.h>
+
+// Do not use glibc, Android is missing some things.
+#undef _STLP_USE_GLIBC
+
+// No exceptions.
+#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT 1
+#define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT 1
+
+// Android does have include_next but it doesn't work well in our build system.
+#undef _STLP_HAS_INCLUDE_NEXT
+
+#endif /* __stl_config__android_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_apcc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_apcc.h
new file mode 100644
index 0000000..7b4e139
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_apcc.h
@@ -0,0 +1,30 @@
+// STLport config file for Apogee 4.x
+
+#define _STLP_COMPILER "Apogee"
+
+#define _STLP_NO_NEW_NEW_HEADER 1
+#define _STLP_HAS_NO_NEW_C_HEADERS 1
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+// # define _STLP_RAND48 1
+#define _STLP_LONG_LONG long long
+#define _STLP_NO_BAD_ALLOC 1
+#define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+#define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+// # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+#define _STLP_NO_EXCEPTION_HEADER 1
+
+#undef _STLP_LINK_TIME_INSTANTIATION
+#define _STLP_LINK_TIME_INSTANTIATION 1
+
+#ifdef __STDLIB
+# undef _STLP_NO_NEW_C_HEADERS
+# undef _STLP_NO_NEW_NEW_HEADER
+# undef _STLP_NO_BAD_ALLOC
+# undef _STLP_LONG_LONG
+#else
+# undef _STLP_NO_EXCEPTION_SPEC
+# define _STLP_NO_EXCEPTION_SPEC 1
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_apple.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_apple.h
new file mode 100644
index 0000000..899ed14
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_apple.h
@@ -0,0 +1,118 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ */
+
+/* common configuration settings for Apple MPW MrCpp / SCpp */
+
+#define _STLP_COMPILER "spec me!"
+
+#if defined(__MRC__) && __MRC__ < 0x500
+# error Apple's MPW MrCpp v.5.0.0 or better compiler required
+#endif
+#if defined(__SC__) && __SC__ < 0x890
+# error Apple's MPW SCpp v.8.9.0 or better compiler required
+#endif
+
+/* TODO: Check that this config is necessary for all compiler versions.
+ * It is here for historical reasons for the moment.
+ */
+#define _STLP_NO_CONTAINERS_EXTENSION
+
+#ifdef qMacApp
+# ifndef __CONDITIONALMACROS__ /* skip including ConditionalMacros_AC.h if ConditionalMacros.h is already included */
+# include <CoreSwitches_AC.h>
+# include <ConditionalMacros_AC.h>
+# include <Types_AC.h>
+# define _STLP_FILE__ _FILE_AC
+# define _STLP_DEBUG_MESSAGE
+# define __stl_debug_message ProgramBreak_AC
+# include <ConditionalMacros.h>
+# endif
+# include <Types.h>
+#else
+# include <ConditionalMacros.h>
+# include <Types.h>
+#endif
+
+#define _STLP_UINT32_T UInt32
+typedef int wint_t;
+
+#ifndef TYPE_BOOL
+# error <ConditionalMacros.h> must be included. (TYPE_BOOL)
+#endif
+#if !TYPE_BOOL
+# define _STLP_NO_BOOL
+# define _STLP_DONT_USE_BOOL_TYPEDEF
+#endif
+
+#ifndef TYPE_LONGLONG
+# error <ConditionalMacros.h> must be included. (TYPE_LONGLONG)
+#endif
+#if TYPE_LONGLONG
+# define _STLP_LONG_LONG long long
+#endif
+
+#if !__option(exceptions)
+# define _STLP_HAS_NO_EXCEPTIONS
+#endif
+
+#define _STLP_DEBUG_MESSAGE_POST DebugStr("\pSTL diagnosis issued. See 'stderr' for detail.");
+#define _STLP_ASSERT_MSG_TRAILER " "
+
+#ifdef _STLP_DEBUG
+# define _STLP_THROW(x) (DebugStr("\pSTL is about to throw exception: "#x),throw x)
+#endif
+
+#if defined(__MRC__)
+# ifndef __spillargs
+# define __spillargs 1 // MrCpp requires this symbol to be defined as 1 to properly handle va_start; ref.[ file stdarg.h; line 26 ]
+# endif
+#endif
+
+#if defined(__SC__)
+#define _STLP_VENDOR_LONG_DOUBLE_MATH //*TY 12/03/2000 - SCpp's native math type is long double
+#endif
+
+#ifndef _STLP_NATIVE_INCLUDE_PATH
+# if __option(unix_includes)
+# define _STLP_NATIVE_INCLUDE_PATH ../CIncludes // expects the alias to {CIncludes} under the same folder as {STL}
+# else
+# define _STLP_NATIVE_INCLUDE_PATH ::CIncludes // expects the alias to {CIncludes} under the same folder as {STL}
+# endif
+#endif
+#if !defined(_STLP_MAKE_HEADER)
+# if !__option(unix_includes)
+# define _STLP_MAKE_HEADER(path, header) <path:header> // Mac uses ":" for directory delimiter
+# endif
+#endif
+
+# define _STLD _DBG // to keep the length of generated symbols within the compiler limitation
+
+#define _STLP_USE_STDIO_IO 1 //*TY 02/24/2000 - see also ; ref.[ file _fstream.h; line 36 ]
+#define _STLP_NO_THREADS //*TY 12/17/2000 - multi-thread capability not explored, yet.
+#undef _REENTRANT //*ty 11/24/2001 - to make sure no thread facility is activated
+#define _NOTHREADS //*ty 12/07/2001 -
+
+// native library limitations
+#define _STLP_VENDOR_GLOBAL_STD // mpw's c++ libs do not utilize namespace std yet
+#define _STLP_NO_BAD_ALLOC // known limitation
+#define _STLP_HAS_NO_NEW_C_HEADERS // known limitation
+#define _STLP_NO_NEW_NEW_HEADER // known limitation
+#define _STLP_NO_NATIVE_MBSTATE_T // known limitation
+#define _STLP_NO_NATIVE_WIDE_FUNCTIONS // known limitation
+#define _STLP_NO_NATIVE_WIDE_STREAMS // known limitation
+#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT // known limitation
+#define _STLP_BROKEN_EXCEPTION_CLASS // known limitation
+
+// compiler limitations
+# define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
+
+# define _STLP_MPWFIX_TRY try{ //*TY 06/01/2000 - exception handling bug workaround
+# define _STLP_MPWFIX_CATCH }catch(...){throw;} //*TY 06/01/2000 - exception handling bug workaround
+# define _STLP_MPWFIX_CATCH_ACTION(action) }catch(...){action;throw;} //*TY 06/01/2000 - exception handling bug workaround
+# define _STLP_THROW_RETURN_BUG // known limitation
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION // known limitation
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX // known limitation
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER // known limitation
+# define _STLP_NO_RELOPS_NAMESPACE // known limitation
+// end of stl_apple.h
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_as400.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_as400.h
new file mode 100644
index 0000000..28d960b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_as400.h
@@ -0,0 +1,55 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+// AS/400 C++ config
+
+# ifdef _REENTRANT
+# define _PTHREADS
+# endif
+
+# define _STLP_NO_NEW_NEW_HEADER 1
+
+# define _STLP_NO_BOOL
+# define _STLP_LIMITED_DEFAULT_TEMPLATES
+
+# define _STLP_HAS_NO_NAMESPACES
+# define _STLP_NEED_TYPENAME
+# define _STLP_NEED_EXPLICIT
+# define _STLP_HAS_NO_EXCEPTIONS
+# define _STLP_NO_EXCEPTION_SPEC
+# define _STLP_NO_ARROW_OPERATOR
+# define _STLP_NO_NEW_STYLE_CASTS
+
+# define _STLP_NEED_MUTABLE
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
+# define _STLP_NO_BAD_ALLOC
+# define _STLP_NO_MEMBER_TEMPLATES
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
+# define _STLP_NO_QUALIFIED_FRIENDS
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
+
+# define _STLP_NO_METHOD_SPECIALIZATION
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+
+// # define _STLP_NO_EXCEPTION_HEADER
+
+# define _STLP_HAS_NO_NEW_C_HEADERS
+
+# define _STLP_STATIC_CONST_INIT_BUG
+# define _STLP_THROW_RETURN_BUG
+# define _STLP_LINK_TIME_INSTANTIATION
+# define _STLP_NO_TEMPLATE_CONVERSIONS
+
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+# define _STLP_TRIVIAL_DESTRUCTOR_BUG 1
+
+# if defined(_LONG_LONG)
+# define _STLP_LONG_LONG long long
+# endif
+# if defined(_PTHREADS)
+# define _MULTI_THREADED
+# endif
+// fbp : to fix __partition() problem
+# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_auto_link.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_auto_link.h
new file mode 100644
index 0000000..8898c55
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_auto_link.h
@@ -0,0 +1,61 @@
+/* We do not use auto link feature when:
+ * - user asked not to use it (_STLP_DONT_USE_AUTO_LINK)
+ * - STLport is used only as a STL library (_STLP_NO_IOSTREAMS || _STLP_USE_NO_IOSTREAMS)
+ * - we are building a C translation unit, STLport is a C++ Standard library implementation
+ */
+#if !defined (__BUILDING_STLPORT) && !defined (_STLP_DONT_USE_AUTO_LINK) && \
+ !defined (_STLP_NO_IOSTREAMS) && !defined (_STLP_USE_NO_IOSTREAMS) && \
+ defined (__cplusplus)
+
+# define _STLP_STRINGIZE(X) _STLP_STRINGIZE_AUX(X)
+# define _STLP_STRINGIZE_AUX(X) #X
+
+# if defined (_STLP_DEBUG)
+# define _STLP_LIB_OPTIM_MODE "stld"
+# elif defined (_DEBUG)
+# define _STLP_LIB_OPTIM_MODE "d"
+# else
+# define _STLP_LIB_OPTIM_MODE ""
+# endif
+
+# if defined (_STLP_LIB_NAME_MOTIF)
+# define _STLP_LIB_MOTIF "_"_STLP_LIB_NAME_MOTIF
+# else
+# define _STLP_LIB_MOTIF ""
+# endif
+
+# if defined (_STLP_USE_DYNAMIC_LIB)
+# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# define _STLP_LIB_TYPE "_x"
+# else
+# define _STLP_LIB_TYPE ""
+# endif
+# else
+# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# define _STLP_LIB_TYPE "_statix"
+# else
+# define _STLP_LIB_TYPE "_static"
+# endif
+# endif
+
+# if defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_VERSION_STR "."_STLP_STRINGIZE(_STLPORT_MAJOR)"."_STLP_STRINGIZE(_STLPORT_MINOR)
+# else
+# define _STLP_VERSION_STR ""
+# endif
+
+# define _STLP_STLPORT_LIB "stlport"_STLP_LIB_OPTIM_MODE""_STLP_LIB_TYPE""_STLP_LIB_MOTIF""_STLP_VERSION_STR".lib"
+
+# if defined (_STLP_VERBOSE)
+# pragma message ("STLport: Auto linking to "_STLP_STLPORT_LIB)
+# endif
+# pragma comment (lib, _STLP_STLPORT_LIB)
+
+# undef _STLP_STLPORT_LIB
+# undef _STLP_LIB_OPTIM_MODE
+# undef _STLP_LIB_TYPE
+# undef _STLP_STRINGIZE_AUX
+# undef _STLP_STRINGIZE
+
+#endif /* _STLP_DONT_USE_AUTO_LINK */
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_bc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_bc.h
new file mode 100644
index 0000000..e3802dc
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_bc.h
@@ -0,0 +1,138 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly */
+
+#define _STLP_COMPILER "Borland"
+
+#if (__BORLANDC__ < 0x551)
+# error - Borland compilers below version 5.5.1 not supported.
+#endif
+
+#pragma defineonoption _STLP_NO_RTTI -RT-
+
+#define _STLP_DONT_SUP_DFLT_PARAM
+
+#if (__BORLANDC__ >= 0x580)
+# define _STLP_HAS_INCLUDE_NEXT
+# define _STLP_NATIVE_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/dinkumware/##header>
+# define _STLP_NO_NEW_C_HEADERS
+# define _STLP_NO_FORCE_INSTANTIATE
+#endif
+
+#if (__BORLANDC__ >= 0x570) && (__BORLANDC__ < 0x580)
+# define _STLP_NO_NEW_C_HEADERS
+# define _STLP_NO_FORCE_INSTANTIATE
+# define _STLP_DEF_CONST_DEF_PARAM_BUG
+# define _STLP_USE_DEFAULT_FILE_OFFSET
+
+# if defined (__cplusplus)
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include/c++/ ## GCC_VERSION
+# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include/c++/ ## GCC_VERSION
+# endif
+
+# undef _SYS_CDEFS_H
+# include </usr/include/sys/cdefs.h>
+
+# ifdef __MT__
+# define _PTHREADS
+# if !defined (_RTLDLL)
+# define _STLP_DONT_USE_PTHREAD_SPINLOCK
+# endif
+# else
+# define _NOTHREADS
+# endif
+
+# pragma defineonoption _CPPUNWIND -xd
+# define _STLP_NO_EXCEPTION_HEADER
+# define _STLP_DONT_USE_EXCEPTIONS
+#endif
+
+#if (__BORLANDC__ >= 0x560) && (__BORLANDC__ < 0x570)
+# define _USE_OLD_RW_STL
+#endif
+
+#if (__BORLANDC__ >= 0x560)
+# if !defined (__BUILDING_STLPORT)
+# define NOWINBASEINTERLOCK
+# endif
+# define _STLP_LANG_INVARIANT_DEFINED
+#endif
+
+#if (__BORLANDC__ < 0x590)
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
+# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION
+ // <bitset> problems
+# define _STLP_MEMBER_SPECIALIZATION_BUG 1
+# ifdef __cplusplus
+# define _STLP_TR1 _STLP_STD_NAME::tr1::
+# endif
+#endif
+
+#if (__BORLANDC__ < 0x564)
+# define _STLP_QUALIFIED_SPECIALIZATION_BUG
+# define _STLP_NO_MOVE_SEMANTIC
+#endif
+
+#define _STLP_DONT_USE_PRIV_NAMESPACE
+#define _STLP_NO_TYPENAME_BEFORE_NAMESPACE
+#define _STLP_NO_VENDOR_STDLIB_L
+#define _STLP_NO_VENDOR_MATH_F
+#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1
+
+#if (__BORLANDC__ < 0x570) || (__BORLANDC__ >= 0x580)
+#define _STLP_NO_NATIVE_MBSTATE_T
+#undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
+#endif
+
+#if (__BORLANDC__ < 0x580) && !defined (_RTLDLL)
+# define _UNCAUGHT_EXCEPTION 1
+#endif
+
+// <limits> problem
+#define _STLP_STATIC_CONST_INIT_BUG
+
+#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
+
+#define _STLP_LONG_LONG __int64
+
+// auto enable thread safety and exceptions:
+#ifndef _CPPUNWIND
+# define _STLP_HAS_NO_EXCEPTIONS
+#endif
+
+#if defined (__MT__) && !defined (_NOTHREADS)
+# define _STLP_THREADS
+#endif
+
+#define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
+
+#define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
+
+#if defined (_DLL)
+# define _STLP_DLL
+#endif
+#if defined (_RTLDLL)
+# define _STLP_RUNTIME_DLL
+#endif
+#include <stl/config/_detect_dll_or_lib.h>
+#undef _STLP_RUNTIME_DLL
+#undef _STLP_DLL
+
+#if defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_USE_DECLSPEC 1
+# if defined (__BUILDING_STLPORT)
+# define _STLP_CALL __cdecl __export
+# else
+# define _STLP_CALL __cdecl
+# endif
+#else
+# define _STLP_CALL __cdecl
+#endif
+
+#if !defined (__linux__)
+# include <stl/config/_auto_link.h>
+#endif
+
+#include <stl/config/_feedback.h>
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_como.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_como.h
new file mode 100644
index 0000000..6076f88
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_como.h
@@ -0,0 +1,207 @@
+
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "Comeau"
+
+#include <stl/config/_native_headers.h>
+
+#define _STLP_UINT32_T unsigned int
+
+#define _STLP_HAS_NO_NEW_C_HEADERS
+// #define _STLP_VENDOR_GLOBAL_EXCEPT_STD
+#define _STLP_LONG_LONG long long
+
+
+//
+// ADDITIONS FOR COMEAU C++, made by Comeau Computing.
+// We can be reached through comeau@comeaucomputing.com
+// You shouldn't need to change anything below here for Comeau C++.
+// If you do, please tell us at comeau@comeaucomputing.com
+//
+// Changes made here, AND THROUGH ALL FILES, based upon the __COMO__ macro
+// (and SIMILAR NAMES INVOLVING COMO).... no doubt some of this will
+// change as SGI integrates the changes into their code base since
+// some changes are not really Comeau C++ specific, but required to
+// make the SGI code compliant with Standard C++).
+//
+// Testing was done with Comeau C++ 4.2.44 and 4.2.45.2. Changes were made for
+// both Comeau relaxed mode and Comeau strict mode, especially for end user code
+// (that is, some of the .cxx files cannot compile in strict mode, because they
+// contain extensions to Standard C++, however their object code forms can
+// be used once compiled in relaxed mode, even if the end user code uses
+// strict mode).
+//
+// These changes may also work for some earlier versions of Comeau C++,
+// though we have not tested them.
+//
+// Actual mods made under RedHat 6.1 LINUX, should be ok with SuSE too and
+// other LINUX's, and older Caldera LINUX, Solaris/SPARC, SunOS, SCO UNIX,
+// and NetBSD. Other platforms may be added. Comeau will also perform
+// custom ports for you.
+//
+// Check libcomo details at http://www.comeaucomputing.com/libcomo and
+// http://www.comeaucomputing.com
+//
+// History of Comeau changes (this is rough, as work was often going on in parallel):
+// BETA1 July 14, 2000, Initial port for RedHat 6.1 INTEL/ELF
+// BETA2 Aug 4, 2000, Stronger RedHat support
+// Support for Comeau strict mode for end user code
+// BETA3 Aug 22, 2000, Support for other LINUX/INTEL/ELF's, including older ones
+// BETA4 Sept 2, 2000, Initial support for SCO UNIX + other UNIX x86 SVR3's
+// Stronger support for end user Comeau strict mode
+// BETA5 Oct 5, 2000, Initial support for Solaris/SPARC
+// More SCO support (though still incomplete)
+// BETA6 Feb 5, 2001, Minor mods to accomodate Comeau C++ 4.2.45.1
+// BETA7 Mar 13, 2001, Verified with Comeau C++ 4.2.45.2
+// Minor NetBSD support
+// BETA8 Apr 1. 2001, Initial support for SunOS/SPARC
+// BETA9 Apr 7, 2001, Stronger SCO support + other UNIX x86 SVR3's
+// Mods for an fpos_t problem for some LINUXes
+// Mods since Destroy did not work in strict mode
+// BETA10 Apr 12. 2001, Stronger NetBSD support
+//
+// PLANNED:
+// BETAx TBA TBA, 2001, NetBSD, UNIXWARE, and Windows support expected
+//
+
+
+#ifdef __linux__
+
+# define _STLP_NO_NATIVE_MBSTATE_T 1
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+# define _STLP_NO_NATIVE_WIDE_STREAMS 1
+# define _STLP_NO_LONG_DOUBLE 1
+
+// Comeau C++ under LINUX/INTEL/ELF
+// Preprocess away "long long" routines for now, even in relaxed mode
+# define __wcstoull_internal_defined 1
+# define __wcstoll_internal_defined 1
+
+#endif /* __COMO__ under __linux__ */
+
+#ifdef __USING_x86SVR3x_WITH_COMO /* SCO et al */
+/* UNIX 386+ SVR3 mods made with __USING_x86SVR3x_WITH_COMO
+ in other sources, not here */
+# define atan2l atan2
+# define cosl cos
+# define sinl sin
+# define sqrtl sqrt
+# include <math.h>
+ inline long double expl(long double arg) { return exp(arg); }
+ inline long double logl(long double arg) { return log(arg); }
+# define log10l log10
+
+# define sinhl sinh
+# define coshl cosh
+# define fabsl fabs
+namespace std {
+ inline int min(int a, int b) { return a>b ? b : a; }
+}
+#endif
+
+#ifdef sun
+// Comeau C++ under Solaris/SPARC or SunOS
+
+#ifdef solarissparc
+#define __USING_SOLARIS_SPARC_WITH_COMO /* show this in the source when grep'ing for COMO */
+// Note comowchar.h for Solaris/SPARC wchar stuff
+
+#include <math.h>
+# define sinf sin
+# define sinl sin
+# define sinhf sinh
+# define sinhl sinh
+# define cosf cos
+# define cosl cos
+# define coshf cosh
+# define coshl cosh
+# define atan2l atan2
+# define atan2f atan2
+ inline float logf(float arg) { return log(arg); }
+ inline long double logl(long double arg) { return log(arg); }
+# define log10f log10
+# define log10l log10
+# define expf exp
+ inline long double expl(long double arg) { return exp(arg); }
+# define sqrtf sqrt
+# define sqrtl sqrt
+# define fabsf fabs
+# define fabsl fabs
+#else
+#define __USING_SUNOS_WITH_COMO
+
+#define __unix 1
+#define __EXTENSIONS__ /* This might create undue noise somewhere */
+#endif
+#endif /* sun */
+
+#if defined(__NetBSD__)
+// From non-como #ifdef __GNUC__ above
+#undef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
+#define __unix 1
+
+#include <sys/cdefs.h>
+// Some joker #define'd __END_DECLS as };
+#undef __END_DECLS
+#define __END_DECLS }
+
+// <sys/stat.h> prob
+#include <sys/cdefs.h>
+#undef __RENAME
+#define __RENAME(x)
+
+#define wchar_t __COMO_WCHAR_T
+#include <stddef.h>
+#undef wchar_t
+
+#include <math.h>
+# ifdef BORIS_DISABLED
+# define atan2l atan2
+# define cosl cos
+# define sinl sin
+# define sqrtl sqrt
+ inline long double expl(long double arg) { return exp(arg); }
+ inline long double logl(long double arg) { return log(arg); }
+# define log10l log10
+# define sinhl sinh
+# define coshl cosh
+# define fabsl fabs
+# endif
+#endif /* __NetBSD__ under __COMO__ */
+
+// Shouldn't need to change anything below here for Comeau C++
+// If so, tell us at comeau@comeaucomputing.com
+
+#define _STLP_NO_DRAND48
+
+#define _STLP_PARTIAL_SPECIALIZATION_SYNTAX
+#define _STLP_NO_USING_CLAUSE_IN_CLASS
+
+#if __COMO_VERSION__ < 4300
+#if __COMO_VERSION__ >= 4245
+#define _STLP_NO_EXCEPTION_HEADER /**/
+ // Is this needed?
+# include <stdexcept.stdh>
+#endif
+#define _STLP_NO_BAD_ALLOC /**/
+#define _STLP_USE_AUTO_PTR_CONVERSIONS /**/
+#endif
+
+// this one is true only with MS
+# if defined (_MSC_VER)
+# define _STLP_WCHAR_T_IS_USHORT 1
+# if _MSC_VER <= 1200
+# define _STLP_VENDOR_GLOBAL_CSTD
+# endif
+# if _MSC_VER < 1100
+# define _STLP_NO_BAD_ALLOC 1
+# define _STLP_NO_EXCEPTION_HEADER 1
+# define _STLP_NO_NEW_NEW_HEADER 1
+# define _STLP_USE_NO_IOSTREAMS 1
+# endif
+# endif
+
+// # define __EDG_SWITCHES
+
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_cray.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_cray.h
new file mode 100644
index 0000000..55327c1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_cray.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#define _STLP_COMPILER "CC"
+
+// Mostly correct guess, change it for Alpha (and other environments
+// that has 64-bit "long")
+# define _STLP_UINT32_T unsigned long
+
+// Uncomment if long long is available
+# define _STLP_LONG_LONG long long
+
+// Uncomment this if your compiler can't inline while(), for()
+# define _STLP_LOOP_INLINE_PROBLEMS 1
+
+// Uncomment this if your compiler does not support exceptions
+// Cray C++ supports exceptions when '-h exceptions' option is user;
+// therefore '-D_STLP_HAS_NO_EXCEPTIONS' must be used when '-h exceptions'
+// is NOT used.
+//# define _STLP_HAS_NO_EXCEPTIONS 1
+
+// Delete?
+// Define this if compiler lacks <exception> header
+//# define _STLP_NO_EXCEPTION_HEADER 1
+
+// Uncomment this if your C library has lrand48() function
+# define _STLP_RAND48 1
+
+// Uncomment if native new-style C library headers lile <cstddef>, etc are not available.
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+
+// uncomment if new-style headers <new> is available
+# define _STLP_NO_NEW_NEW_HEADER 1
+
+// uncomment this if <iostream> and other STD headers put their stuff in ::namespace,
+// not std::
+# define _STLP_VENDOR_GLOBAL_STD
+
+// uncomment this if <cstdio> and the like put stuff in ::namespace,
+// not std::
+# define _STLP_VENDOR_GLOBAL_CSTD
+
+# define _STLP_NATIVE_C_HEADER(__x) </usr/include/##__x>
+// WARNING: Following is hardcoded to the system default C++ include files
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(__x) </opt/ctl/CC/CC/include/##__x>
+
+
+# define _STLP_NO_NATIVE_MBSTATE_T
+# define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS
+//# define _STLP_VENDOR_GLOBAL_EXCEPT_STD
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_cygwin.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_cygwin.h
new file mode 100644
index 0000000..8610743
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_cygwin.h
@@ -0,0 +1,9 @@
+#define _STLP_PLATFORM "Cygwin"
+
+#define _STLP_UNIX
+
+#ifndef _STLP_USE_STDIO_IO
+# define _STLP_USE_UNIX_IO
+#endif
+
+#define _STLP_LDOUBLE_96
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_dec.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_dec.h
new file mode 100644
index 0000000..fc8ace7
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_dec.h
@@ -0,0 +1,113 @@
+#define _STLP_COMPILER "Dec"
+
+# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
+
+# define _STLP_NATIVE_HEADER(header) <../cxx/##header>
+# define _STLP_NATIVE_C_HEADER(x) <../include/##x>
+
+#if (__DECCXX_VER < 60300000)
+# define _STLP_NATIVE_CPP_C_HEADER(header) <../cxx/##header>
+#else
+# define _STLP_NATIVE_CPP_C_HEADER(header) </usr/include/cxx_cname/##header>
+#endif
+
+# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../cxx/##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../cxx/##header>
+
+/* Alpha is little-endian */
+# define _STLP_LITTLE_ENDIAN
+
+// collisions
+# define _STLP_DONT_PUT_STLPORT_IN_STD
+
+#if (__DECCXX_VER < 60000000)
+
+/*
+ automatic template instantiation does not
+ work with namespaces ;(
+*/
+# define _STLP_HAS_NO_NAMESPACES 1
+
+# define _STLP_NO_NEW_NEW_HEADER 1
+
+# define _STLP_NO_WCHAR_T 1
+# define _STLP_NEED_EXPLICIT 1
+
+# define _STLP_NO_BOOL 1
+# define _STLP_NEED_TYPENAME 1
+# define _STLP_NO_NEW_STYLE_CASTS 1
+# define _STLP_NEED_MUTABLE 1
+# define _STLP_NO_BAD_ALLOC 1
+
+
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
+
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+# define _STLP_BROKEN_USING_DIRECTIVE 1
+# define _STLP_NO_EXCEPTION_HEADER 1
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+
+#endif
+
+
+#ifndef __NO_USE_STD_IOSTREAM
+/* default is to use new iostreams, anyway */
+# ifndef __USE_STD_IOSTREAM
+# define __USE_STD_IOSTREAM
+# endif
+#endif
+
+/*
+# ifndef __STD_STRICT_ANSI_ERRORS
+# endif
+*/
+
+#ifndef __EXCEPTIONS
+# define _STLP_HAS_NO_EXCEPTIONS 1
+#endif
+
+# ifdef __IMPLICIT_INCLUDE_ENABLED
+
+/* but, works with ours ;). */
+# define _STLP_LINK_TIME_INSTANTIATION 1
+# else
+# undef _STLP_LINK_TIME_INSTANTIATION
+# endif
+
+# if defined (__IMPLICIT_USING_STD) && !defined (__NO_USE_STD_IOSTREAM)
+/*
+ we should ban that !
+ # error "STLport won't work with new iostreams and std:: being implicitly included. Please use -std strict_ansi[_errors] or specify __NO_USE_STD_IOSTREAM"
+*/
+# endif
+
+# if (defined (__STD_STRICT_ANSI) || defined (__STD_STRICT_ANSI_ERRORS))
+# define _STLP_STRICT_ANSI 1
+# else
+/* we want to enforce it */
+# define _STLP_LONG_LONG long long
+# endif
+
+/* unsigned 32-bit integer type */
+# define _STLP_UINT32_T unsigned int
+#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+/* # define _STLP_RAND48 1 */
+
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+
+# if (__DECCXX_VER <= 60600000)
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+# endif
+
+#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
+# define _STLP_DEC_THREADS
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_dec_vms.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_dec_vms.h
new file mode 100644
index 0000000..44a0fb8
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_dec_vms.h
@@ -0,0 +1,89 @@
+// OpenVMS version
+
+#define _STLP_COMPILER "Dec Vms"
+
+# define _STLP_NATIVE_HEADER(header) <sys$library:##header>
+# define _STLP_NATIVE_C_HEADER(x) <sys$library:##x>
+# define _STLP_NATIVE_CPP_C_HEADER(header) <sys$library:##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <sys$library:##header>
+
+#if (__DECCXX_VER < 60000000)
+
+// automatic template instantiation does not
+// work with namespaces ;(
+# define _STLP_HAS_NO_NAMESPACES 1
+
+# define _STLP_NO_WCHAR_T 1
+# define _STLP_NEED_EXPLICIT 1
+
+# define _STLP_NO_BOOL 1
+# define _STLP_NEED_TYPENAME 1
+# define _STLP_NO_NEW_STYLE_CASTS 1
+# define _STLP_NEED_MUTABLE 1
+# define _STLP_NO_BAD_ALLOC 1
+
+# define _STLP_NO_NEW_NEW_HEADER 1
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
+
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+# define _STLP_BROKEN_USING_DIRECTIVE 1
+# define _STLP_NO_EXCEPTION_HEADER 1
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+
+#endif
+
+
+#ifdef __NO_USE_STD_IOSTREAM
+# define _STLP_USE_NO_IOSTREAMS 1
+# else
+// default is to use new iostreams, anyway
+# ifndef __USE_STD_IOSTREAM
+# define __USE_STD_IOSTREAM
+# endif
+#endif
+
+#ifndef __EXCEPTIONS
+# define _STLP_HAS_NO_EXCEPTIONS 1
+#endif
+
+# ifdef __IMPLICIT_INCLUDE_ENABLED
+
+#ifdef _STLP_USE_NO_IOSTREAMS
+// implicit include introduces conflicts
+// between stlport and native lib.
+# undef __IMPLICIT_INCLUDE_ENABLED
+#endif
+
+// but, works with ours ;).
+# define _STLP_LINK_TIME_INSTANTIATION 1
+
+# endif
+
+# if defined (__IMPLICIT_USING_STD) && !defined (__NO_USE_STD_IOSTREAM)
+// we should ban that !
+# error "STLport won't work with new iostreams and std:: being implicitly included. Please use -std strict_ansi[_errors] or specify __NO_USE_STD_IOSTREAM"
+# endif
+
+# if !(defined (__STD_STRICT_ANSI) || defined (__STD_STRICT_ANSI_ERRORS))
+// we want to enforce it
+# define _STLP_LONG_LONG long long
+# endif
+
+// unsigned 32-bit integer type
+# define _STLP_UINT32_T unsigned int
+#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+// # define _STLP_RAND48 1
+
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+
+#define _STLP_HAS_NO_NEW_C_HEADERS 1
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_detect_dll_or_lib.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_detect_dll_or_lib.h
new file mode 100644
index 0000000..a062e69
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_detect_dll_or_lib.h
@@ -0,0 +1,74 @@
+/* File used to define macros:
+ * _STLP_USE_DYNAMIC_LIB: To signal use STLport as a dll or build of the
+ * STLport dlls.
+ * _STLP_USE_STATIC_LIB: To signal use of STLport as a static lib or build of
+ * the STLport static libs.
+ * _STLP_USING_CROSS_NATIVE_RUNTIME_LIB: Signal that we are using a native runtime
+ * in a version different from the STLport one.
+ * If _STLP_USE_DYNAMIC_LIB or _STLP_USE_STATIC_LIB is alreday defined it means that
+ * user forces use of a specific version. In this case _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+ * will surely be defined otherwise there is no need to force macro defines.
+ *
+ * Before including this file the compiler must define:
+ * _STLP_DLL: If we are building a dll
+ * _STLP_RUNTIME_DLL: If we are using native runtime as a dll
+ */
+#if defined (__BUILDING_STLPORT)
+# undef _STLP_USE_DYNAMIC_LIB
+# undef _STLP_USE_STATIC_LIB
+# if defined (_STLP_DLL)
+/* We are building the STLport dll */
+# define _STLP_USE_DYNAMIC_LIB
+# if !defined (_STLP_RUNTIME_DLL)
+# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+# endif
+# else
+# define _STLP_USE_STATIC_LIB
+# if defined (_STLP_RUNTIME_DLL)
+# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+# endif
+# endif
+#else
+# if !defined (_STLP_NO_IOSTREAMS)
+/* STLport use only depend on _STLP_RUNTIME_DLL as we are replacing
+ * the native runtime.
+ */
+# if defined (_STLP_RUNTIME_DLL)
+# if !defined (_STLP_USE_STATIC_LIB)
+# if !defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_USE_DYNAMIC_LIB
+# endif
+# else
+/* The user is forcing use of STLport as a dynamic library. We signal it so
+ * that the STLport namespace will be modify to report such a combination
+ * and force the user to link with the rebuilt STLport library.
+ */
+# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+# endif
+# else
+# if !defined(_STLP_USE_DYNAMIC_LIB)
+# if !defined (_STLP_USE_STATIC_LIB)
+# define _STLP_USE_STATIC_LIB
+# endif
+# else
+/* Idem previous remark but the user forces use of the static native runtime.
+ */
+# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+# endif
+# endif
+# else
+/* If we do not build and use STLport libs we consider that we are in a static lib
+ * mode as only dynamic lib needs additional export/import specifier.
+ */
+# define _STLP_USE_STATIC_LIB
+# endif
+#endif
+
+/* we don't have a static native runtime library on evc3/evc4 */
+#ifdef _STLP_WCE
+# undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+#endif
+
+#if !defined (_STLP_USE_DYNAMIC_LIB) && !defined (_STLP_USE_STATIC_LIB)
+# error Unknown STLport usage config (dll/lib?)
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_dm.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_dm.h
new file mode 100644
index 0000000..4f70732
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_dm.h
@@ -0,0 +1,121 @@
+// STLport configuration file for Digital Mars C++
+
+#define _STLP_COMPILER __DMC_VERSION_STRING__
+
+#if (__DMC__ < 0x849)
+# error "Digital Mars C++ compilers before version 8.49 are not supported!"
+#endif
+
+/* DMC goes too far in template instanciation and tries to fully instanciate
+ * slist<pair<const int, string> > for instance. The generation of assignment
+ * operator fails of course so we are force to use mutable key for this compiler.
+ */
+#define _STLP_NO_CONST_IN_PAIR
+#define _STLP_DONT_SUP_DFLT_PARAM
+
+#ifndef _CPPUNWIND
+# define _STLP_NO_EXCEPTIONS
+#endif
+
+#ifndef _CPPRTTI
+# define _STLP_NO_RTTI
+#endif
+
+#define _STLP_VENDOR_GLOBAL_CSTD
+
+//DMC prefer enum to real static const variable because it do not consider
+//static const as const enough to be used in switch declaration...
+#define _STLP_STATIC_CONST_INIT_BUG
+
+#if !defined (_WIN32)
+// it's not fully supported on non-Win32 platforms
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS
+#endif
+
+/* _STLP_NO_OWN_NAMESPACE is defined because Digital Mars' linker and libarian
+ appear to have problems with STLport namespaces. Summary of the issues:
+
+ STATIC: Digital Mars' librarian (lib.exe) may fail with "len <= IDMAX" error
+ if _STLP_DEBUG is defined. This is because Digital Mars' librarian uses
+ Microsoft OMF format, which limits identifier length to about 512 bytes.
+ With STLport namespaces, some identifiers such as Category_Map in
+ src/locale_catalog.cpp may exceed the maximum OMF identifier length.
+
+ DYNAMIC: Export issues with cin, cout, cerr, clog in src/iostream.cpp.
+ Exports in Digital Mars 'def' file must match mangled names in iostream.cpp.
+ With STLport namespaces, the mangled names in the intermediate files no
+ longer match these pre-defined exports. To use STLport dynamic libraries
+ and STLport namespaces with Digital Mars, the pre-defined exports in
+ src/iostream.cpp and the related Digital Mars 'def' files would need to be
+ revised. */
+#define _STLP_NO_OWN_NAMESPACE 1
+
+// select threads strategy
+#if defined (_MT) && !defined (_STLP_NO_THREADS)
+# define _STLP_THREADS
+#endif
+
+#ifndef _BOOL_DEFINED
+# define _STLP_NO_BOOL
+#else
+# define _STLP_DONT_USE_BOOL_TYPEDEF
+#endif
+
+#if _INTEGRAL_MAX_BITS >= 64
+# define _STLP_LONG_LONG long long
+#endif
+
+#define _STLP_MARK_PARAMETER_AS_UNUSED(X)
+#define _STLP_DONT_USE_PRIV_NAMESPACE
+#define _STLP_PRIV
+#define _STLP_THROW_RETURN_BUG
+
+#if !defined (_DLL)
+# undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
+#endif
+
+#if (__DMC__ < 0x849)
+# define _STLP_NO_BAD_ALLOC
+#endif
+
+#define _STLP_USE_ABBREVS
+#define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
+
+#define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND
+#define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
+
+#define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
+
+#define _STLP_NEED_ADDITIONAL_STATIC_DECLSPEC
+
+//#define _STLP_IMPORT_TEMPLATE_KEYWORD __declspec(dllimport)
+//#define _STLP_EXPORT_TEMPLATE_KEYWORD __declspec(dllexport)
+
+#if defined (_WINDLL)
+# define _STLP_DLL
+#endif
+#if defined (_DLL)
+# define _STLP_RUNTIME_DLL
+#endif
+#include <stl/config/_detect_dll_or_lib.h>
+#undef _STLP_RUNTIME_DLL
+#undef _STLP_DLL
+
+#if defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_USE_DECLSPEC 1
+# if defined (__BUILDING_STLPORT)
+# define _STLP_CALL __export
+# else
+# define _STLP_CALL
+# endif
+#else
+# define _STLP_CALL
+#endif
+
+#include <stl/config/_auto_link.h>
+
+#undef __SC__
+
+#include <stl/config/_feedback.h>
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_epilog.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_epilog.h
new file mode 100644
index 0000000..30d1e24
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_epilog.h
@@ -0,0 +1,29 @@
+#if defined (_STLP_MSVC) || defined (__ICL)
+
+# pragma warning (pop)
+# pragma pack (pop)
+
+#elif defined (__BORLANDC__)
+
+# pragma option pop
+# pragma option -w-pow // -w-8062 Previous options and warnings not restored
+
+#elif defined (__sgi) && !defined (__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
+
+# pragma reset woff 1174
+# pragma reset woff 1375
+# pragma reset woff 1209
+/* from iterator_base.h */
+# pragma reset woff 1183
+
+#elif defined (__DECCXX)
+
+# ifdef __PRAGMA_ENVIRONMENT
+# pragma __environment __restore
+# endif
+
+#elif defined (__IBMCPP__)
+
+# pragma info(restore)
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_evc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_evc.h
new file mode 100644
index 0000000..c460450
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_evc.h
@@ -0,0 +1,333 @@
+/*
+ * File to have Microsoft eMbedded Visual C++ 3.0 and .NET working with STLport
+ * May 2004
+ * Origin : Zdenek Nemec - zero@mapfactor.com
+ * Michael Fink - vividos@users.sourceforge.net
+ */
+
+#ifndef _STLP_EVC_H
+#define _STLP_EVC_H
+
+#define _STLP_COMPILER "eMbedded Visual C++"
+
+// This flag is being used by STLport to support
+// old-fashioned Windows CE SDK (see stl_wince.h)
+// do not use with eMebedded Visual C++ 3 or 4!
+#ifdef _STLP_WINCE
+# undef _STLP_WINCE
+#endif
+
+/* Compiler dependent define. The following defines may be available:
+ * _STLP_WCE_EVC3 when compiling under eMbedded Visual C++ 3
+ * _STLP_WCE_NET when compiling under eMbedded Visual C++ .NET
+ * _STLP_WCE always defined when compiling with one of the above
+ */
+#undef _STLP_WCE_EVC3
+#undef _STLP_WCE_NET
+
+#if (_WIN32_WCE > 300)
+# define _STLP_WCE_NET UNDER_CE
+#elif (_WIN32_WCE == 300)
+# define _STLP_WCE_EVC3 UNDER_CE
+#else
+# error No support for Windows CE below 3.0!
+#endif
+
+// This is defined for all platforms using Windows CE
+#define _STLP_WCE
+
+/* All Windows CE versions up to at least version 5 are little-endian, even
+ * if the hardware (like e.g. MIPS) can be configured for big-endian, too. */
+#define _STLP_LITTLE_ENDIAN
+
+// Ensure _DEBUG is defined.
+#if defined (DEBUG) && !defined (_DEBUG)
+# define _DEBUG
+#endif
+
+// inherit all msvc6 options
+#include <stl/config/_msvc.h>
+
+// CE up to at least version 5 has no C locale support
+#define _STLP_NO_LOCALE_SUPPORT
+
+#if _WIN32_WCE >= 420
+ // SDKs built with PB5 have terminate&co in namespace std...
+# define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_STD
+# define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_STD
+ // ...and new_handler/set_new_handler in the global namespace.
+# define _STLP_GLOBAL_NEW_HANDLER 1
+#endif
+
+// Always threaded in eMbedded Visual C++ 3.0 and .NET
+#ifndef _MT
+# define _MT
+#endif
+
+// we don't have a static native runtime library
+#undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB
+
+#if _WIN32_WCE < 400
+// no long double under CE3 and older
+# define _STLP_NO_LONG_DOUBLE
+#endif
+
+// no *f and *l math functions available
+#define _STLP_NO_VENDOR_MATH_F
+#define _STLP_NO_VENDOR_MATH_L
+
+/*
+ * Redirect cout, cerr and clog:
+ * If defined redirect cout, cerr and clog to
+ * files stdout.txt, stderr.txt and stdlog.txt
+ */
+//# define _STLP_REDIRECT_STDSTREAMS
+
+/*
+ * Static class members may generate LNK1179:
+ * Wrong COMDAT packing may cause LNK1179 error.
+ * For details see http://groups.google.com/groups?th=8a05c82c4ffee280
+ * example P78. This define is not used/needed at this moment
+ * but may came handy in future...
+ */
+//# define _STLP_STATIC_MEMBERS_BUG
+
+// Use wide-string interface of windows native functions (CreateFile...).
+// Note that this should be defined all the time while under CE.
+#if defined (UNICODE)
+# define _STLP_USE_WIDE_INTERFACE
+#endif
+
+// Force exception std to std instead of __std_alias.
+#if defined (__cplusplus) && !defined (_STLP_HAS_NO_NAMESPACES)
+# ifdef _STLP_VENDOR_EXCEPT_STD
+# undef _STLP_VENDOR_EXCEPT_STD
+# endif
+# define _STLP_VENDOR_EXCEPT_STD std
+#endif
+
+// short string optimization bug under evc3, evc4 using ARM compiler
+#if _MSC_VER < 1400 && (defined (ARM) || defined (_ARM_))
+# define _STLP_DONT_USE_SHORT_STRING_OPTIM
+#endif
+
+// when using MFC, disable another placement new declaration, since there is one in wcealt.h
+#if !defined (__BUILDING_STLPORT) && defined (_MFC_VER)
+# define __PLACEMENT_NEW_INLINE
+#endif
+
+// threads
+#undef _REENTRANT
+#define _REENTRANT
+#undef _NOTHREADS
+
+// Use old fashioned headers (ctime vs. time.h).
+#undef _STLP_NO_NEW_C_HEADERS
+#define _STLP_NO_NEW_C_HEADERS
+
+// exception handling support: only on evc4 and user added /GX to project settings
+#if defined (_STLP_WCE_EVC3) || !defined (_CPPUNWIND)
+# define _STLP_NO_EXCEPTION_HEADER
+# define _STLP_NO_EXCEPTIONS
+# undef _STLP_USE_EXCEPTIONS
+# ifndef _STLP_THROW_BAD_ALLOC
+# define _STLP_THROW_BAD_ALLOC { _STLP_WINCE_TRACE(L"out of memory"); ExitThread(1); }
+# endif
+#endif
+
+#define _STLP_WINCE_TRACE(msg) OutputDebugString(msg)
+
+/*
+ * eMbedded Visual C++ .NET specific settings
+ */
+#if defined (_STLP_WCE_NET)
+
+// evc4 has no locale and time support
+# define _STLP_NO_LOCALE_SUPPORT
+# define _STLP_NO_TIME_SUPPORT
+
+// ptrdiff_t is not defined in evc4 headers
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+
+/*
+ * Helper macros for including the native headers in cases where a file with
+ * the same name also exists in the STLport include folder. The idea behind
+ * this is that we first go up one directory and then down into a dir that
+ * is only present in the native install but not in STLport.
+ *
+ */
+# if !defined (_STLP_NATIVE_INCLUDE_PATH)
+# if defined (_X86_)
+# if defined (_STLP_WCE_TARGET_PROC_SUBTYPE_EMULATOR)
+# define _STLP_NATIVE_INCLUDE_PATH ../Emulator
+# else
+# define _STLP_NATIVE_INCLUDE_PATH ../X86
+# endif
+# elif defined (_ARM_)
+# if _MSC_VER < 1400
+ // eVC3/4
+# if defined (ARMV4)
+# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
+# elif defined (ARMV4I)
+# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
+# elif defined (ARMV4T)
+# define _STLP_NATIVE_INCLUDE_PATH ../Armv4t
+# else
+# error Unknown ARM SDK.
+# endif
+# else
+ // VC8 crosscompiling for CE
+# if defined (ARMV4)
+ // VC8 bundled Pocket PC 2003 SDK don't have a target CPU subfolder.
+# if defined(WIN32_PLATFORM_PSPC)
+# define _STLP_NATIVE_INCLUDE_PATH ../Include
+# else
+# define _STLP_NATIVE_INCLUDE_PATH ../Armv4
+# endif
+# elif defined(ARMV4I) || defined(ARMV4T)
+# define _STLP_NATIVE_INCLUDE_PATH ../Armv4i
+# else
+# error Unknown ARM SDK.
+# endif
+# endif
+# elif defined (_MIPS_)
+# if defined (MIPS16)
+# define _STLP_NATIVE_INCLUDE_PATH ../mips16
+# elif defined (MIPSII)
+# define _STLP_NATIVE_INCLUDE_PATH ../mipsII
+# elif defined (MIPSII_FP)
+# define _STLP_NATIVE_INCLUDE_PATH ../mipsII_fp
+# elif defined (MIPSIV)
+# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV
+# elif defined (MIPSIV_FP)
+# define _STLP_NATIVE_INCLUDE_PATH ../mipsIV_fp
+# else
+# error Unknown MIPS SDK.
+# endif
+# elif defined (SHx)
+# if defined (SH3)
+# define _STLP_NATIVE_INCLUDE_PATH ../sh3
+# elif defined (SH4)
+# define _STLP_NATIVE_INCLUDE_PATH ../sh4
+# else
+# error Unknown SHx SDK.
+# endif
+# else
+# error Unknown SDK.
+# endif
+# endif /* !_STLP_NATIVE_INCLUDE_PATH */
+
+/* Workaround when using MFCCE and using <new> together: MFCCE's wcealt.h doesn't
+ * check for __PLACEMENT_NEW_INLINE before defining operator new, so when <new>
+ * defines the operatore before, there will be an error C2084:
+ * "function 'void *__cdecl operator new(unsigned int,void *)' already has a body".
+ */
+# ifdef _STLP_USE_MFC
+# define __PLACEMENT_NEW_INLINE
+# endif
+
+#endif /* _STLP_WCE_NET */
+
+/*
+ * eMbedded Visual C++ 3.0 specific settings
+ */
+#if defined (_STLP_WCE_EVC3)
+
+# define _STLP_NO_NATIVE_MBSTATE_T
+
+// evc3 has no locale and time support
+# define _STLP_NO_LOCALE_SUPPORT
+# define _STLP_NO_TIME_SUPPORT
+
+// evc3 has new, but no explicit header
+# define _STLP_NO_NEW_HEADER
+# define _STLP_NO_NEW_NEW_HEADER
+
+// evc3 has no bad_alloc and no typeinfo
+# undef _STLP_NO_BAD_ALLOC
+# define _STLP_NO_BAD_ALLOC
+
+# undef _STLP_NO_TYPEINFO
+# define _STLP_NO_TYPEINFO
+
+// missing things in eMbedded Visual C++ 3.0 headers
+# ifndef _SIZE_T_DEFINED
+ typedef unsigned int size_t;
+# define _SIZE_T_DEFINED
+# endif
+
+# ifndef _WCHAR_T_DEFINED
+ typedef unsigned short wchar_t;
+# define _WCHAR_T_DEFINED
+# endif
+
+// ptrdiff_t is not defined in evc3 headers
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+
+// clock_t is not defined in evc3 headers
+# ifndef _CLOCK_T_DEFINED
+ typedef long clock_t;
+# define _CLOCK_T_DEFINED
+# endif
+
+// Struct tm is not defined in evc3 headers
+# ifndef _TM_DEFINED
+struct tm {
+ int tm_sec; /* seconds after the minute - [0,59] */
+ int tm_min; /* minutes after the hour - [0,59] */
+ int tm_hour; /* hours since midnight - [0,23] */
+ int tm_mday; /* day of the month - [1,31] */
+ int tm_mon; /* months since January - [0,11] */
+ int tm_year; /* years since 1900 */
+ int tm_wday; /* days since Sunday - [0,6] */
+ int tm_yday; /* days since January 1 - [0,365] */
+ int tm_isdst; /* daylight savings time flag */
+};
+# define _TM_DEFINED
+# endif
+
+// define placement new and delete operator
+// note: when MFCCE headers are included first, don't define the new operator,
+// since it was already defined in wcealt.h
+# ifdef __cplusplus
+# ifndef __PLACEMENT_NEW_INLINE
+# ifndef _MFC_VER
+inline void *__cdecl operator new(size_t, void *_P) { return (_P); }
+# endif /* _MFC_VER */
+inline void __cdecl operator delete(void *, void *) { return; }
+# define __PLACEMENT_NEW_INLINE
+# endif
+# endif /* __cplusplus */
+
+// evc3 doesn't have native wide functions, e.g. fgetwc, wmemmove
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS
+
+// evc3 doesn't have assert.h
+# ifndef _ASSERT_DEFINED
+# define assert(expr) _STLP_ASSERT(expr)
+# define _ASSERT_DEFINED
+# endif
+
+#endif /* _STLP_WCE_EVC3 */
+
+/*
+ * original call: TerminateProcess(GetCurrentProcess(), 0);
+ * we substitute the GetCurrentProcess() with the result of the inline function
+ * defined in kfuncs.h, since we then can avoid including <windows.h> at all.
+ * all needed Win32 API functions are defined in <stl/_windows.h>
+ */
+#ifndef _ABORT_DEFINED
+# define _STLP_ABORT() TerminateProcess(reinterpret_cast<HANDLE>(66), 0)
+# define _ABORT_DEFINED
+#endif
+
+// Notice: windows.h isn't included here anymore; all needed defines are in
+// stl/_windows.h now
+
+#endif /* _STLP_EVC_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_feedback.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_feedback.h
new file mode 100644
index 0000000..0171ca5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_feedback.h
@@ -0,0 +1,43 @@
+/* Helper header to give feedback about build environment configuration
+ * thanks to #pragma message directives.
+ */
+
+#if defined (_STLP_VERBOSE)
+# define _STLP_VERBOSE_MODE_SUPPORTED
+
+# if defined (_STLP_COMPILER)
+# pragma message (_STLP_COMPILER)
+# endif
+
+# if defined (_STLP_NO_RTTI)
+# pragma message ("STLport: RTTI support -> Disabled")
+# else
+# pragma message ("STLport: RTTI support -> Enabled")
+# endif
+
+# if defined (_STLP_HAS_NO_EXCEPTIONS)
+# pragma message ("STLport: Exception support -> Disabled")
+# else
+# pragma message ("STLport: Exception support -> Enabled")
+# endif
+
+# if defined (_STLP_THREADS)
+# pragma message ("STLport: Threading model -> Multi")
+# else
+# pragma message ("STLport: Threading model -> Mono")
+# endif
+
+# if defined (_STLP_USE_DYNAMIC_LIB)
+# pragma message ("STLport: Library model -> Dynamic")
+# else
+# pragma message ("STLport: Library model -> Static")
+# endif
+
+# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# if defined (_STLP_USE_DYNAMIC_LIB)
+# pragma message ("STLport: Native library model -> Static")
+# else
+# pragma message ("STLport: Native library model -> Dynamic")
+# endif
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_freebsd.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_freebsd.h
new file mode 100644
index 0000000..ab9339b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_freebsd.h
@@ -0,0 +1,3 @@
+#define _STLP_PLATFORM "Free BSD"
+
+#define _STLP_USE_UNIX_IO
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_fujitsu.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_fujitsu.h
new file mode 100644
index 0000000..cf91e05
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_fujitsu.h
@@ -0,0 +1,7 @@
+/* STLport configuration for Fujitsu compiler : looks like a perfect one ! */
+#define _STLP_COMPILER "Fujitsu"
+
+#define _STLP_NATIVE_INCLUDE_PATH ../std
+#define _STLP_UINT32_T unsigned int
+#define _STLP_LONG_LONG long long
+#define _STLP_WCHAR_SUNPRO_EXCLUDE 1
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_gcc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_gcc.h
new file mode 100644
index 0000000..0d41863
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_gcc.h
@@ -0,0 +1,198 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ */
+
+#define _STLP_COMPILER "gcc"
+
+#define _STLP_HAS_INCLUDE_NEXT 1
+
+#if (__GNUC__ < 2) || ((__GNUC__ < 3) && ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)))
+/* We do not support neither the unofficial 2.96 gcc version. */
+# error GNU compilers before 2.95 are not supported anymore.
+#endif
+
+/* Systems having GLIBC installed have different traits */
+#if defined (__linux__)
+# ifndef _STLP_USE_GLIBC
+# define _STLP_USE_GLIBC 1
+# endif
+# if defined (__UCLIBC__) && !defined (_STLP_USE_UCLIBC)
+# define _STLP_USE_UCLIBC 1
+# endif
+#endif
+
+#if defined (__CYGWIN__) && \
+ (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3) && !defined (_GLIBCPP_USE_C99)
+# define _STLP_NO_VENDOR_MATH_L
+# define _STLP_NO_VENDOR_STDLIB_L
+#endif
+
+#if (__GNUC__ < 3)
+# define _STLP_NO_VENDOR_STDLIB_L
+#endif
+
+#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4))
+/* define for gcc versions before 3.4.0. */
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
+#endif
+
+#if !defined (_REENTRANT) && (defined (_THREAD_SAFE) || \
+ (defined (__OpenBSD__) && defined (_POSIX_THREADS)) || \
+ (defined (__MINGW32__) && defined (_MT)))
+# define _REENTRANT
+#endif
+
+#if defined (__DJGPP)
+# define _STLP_RAND48 1
+# define _NOTHREADS 1
+# undef _PTHREADS
+# define _STLP_LITTLE_ENDIAN
+#endif
+
+#if defined (__MINGW32__)
+/* Mingw32, egcs compiler using the Microsoft C runtime */
+# if (__GNUC__ >= 3)
+/* For gcc before version 3 this macro is defined below */
+# define _STLP_VENDOR_GLOBAL_CSTD
+# endif
+# undef _STLP_NO_DRAND48
+# define _STLP_NO_DRAND48
+# define _STLP_CALL
+#endif /* __MINGW32__ */
+
+#if defined (__CYGWIN__) || defined (__MINGW32__)
+# if !defined (_STLP_USE_STATIC_LIB)
+# define _STLP_USE_DECLSPEC 1
+# if !defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_USE_DYNAMIC_LIB
+# endif
+# define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
+# define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
+# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
+# endif
+/* The following is defined independently of _STLP_USE_STATIC_LIB because it is also
+ * used to import symbols from PSDK under MinGW
+ */
+# define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
+#else
+# if (__GNUC__ >= 4)
+# if !defined (_STLP_USE_STATIC_LIB)
+# if !defined (_STLP_USE_DYNAMIC_LIB)
+# define _STLP_USE_DYNAMIC_LIB
+# endif
+# define _STLP_USE_DECLSPEC 1
+# define _STLP_EXPORT_DECLSPEC __attribute__((visibility("default")))
+# define _STLP_IMPORT_DECLSPEC __attribute__((visibility("default")))
+# define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((visibility("default")))
+# define _STLP_CLASS_IMPORT_DECLSPEC __attribute__((visibility("default")))
+# endif
+# endif
+#endif
+
+#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun) || defined(__APPLE__))
+# if !defined (__MINGW32__) && !defined (__CYGWIN__)
+# define _STLP_NO_NATIVE_MBSTATE_T 1
+# endif
+# if !defined (__MINGW32__) || (__GNUC__ < 3) || (__GNUC__ == 3) && (__GNUC_MINOR__ < 4)
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+# endif
+# define _STLP_NO_NATIVE_WIDE_STREAMS 1
+#endif
+
+#define _STLP_NORETURN_FUNCTION __attribute__((noreturn))
+
+/* Mac OS X is a little different with namespaces and cannot instantiate
+ * static data members in template classes */
+#if defined (__APPLE__)
+# if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)))
+/* Mac OS X is missing a required typedef and standard macro */
+typedef unsigned int wint_t;
+# endif
+
+# define __unix
+
+# define _STLP_NO_LONG_DOUBLE
+
+/* Mac OS X needs all "::" scope references to be "std::" */
+# define _STLP_USE_NEW_C_HEADERS
+
+# define _STLP_NO_VENDOR_STDLIB_L
+
+#endif /* __APPLE__ */
+
+/* g++ 2.7.x and above */
+#define _STLP_LONG_LONG long long
+
+#ifdef _STLP_USE_UCLIBC
+ /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
+# define _STLP_NO_VENDOR_MATH_F
+ /* No *l math fuctions variants (i.e. sqrtl, fabsl, etc.) */
+# define _STLP_NO_VENDOR_MATH_L
+# define _STLP_NO_LONG_DOUBLE
+#endif
+
+#if defined (__OpenBSD__) || defined (__FreeBSD__)
+# define _STLP_NO_VENDOR_MATH_L
+# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
+# ifndef __unix
+# define __unix
+# endif
+#endif
+
+#if defined (__alpha__)
+# define _STLP_NO_VENDOR_MATH_L
+#endif
+
+#if defined (__hpux)
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */
+ /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */
+# define _STLP_NO_VENDOR_MATH_F
+#endif
+
+#if (__GNUC__ >= 3)
+# ifndef _STLP_HAS_NO_NEW_C_HEADERS
+/*
+# ifndef _STLP_USE_UCLIBC
+*/
+# define _STLP_HAS_NATIVE_FLOAT_ABS
+/*
+# endif
+*/
+# else
+# ifdef _STLP_USE_GLIBC
+# define _STLP_VENDOR_LONG_DOUBLE_MATH 1
+# endif
+# endif
+#endif
+
+#if (__GNUC__ < 3)
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_DONT_USE_PTHREAD_SPINLOCK 1
+# ifndef __HONOR_STD
+# define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
+# endif
+/* egcs fails to initialize builtin types in expr. like this : new(p) char(); */
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+#endif
+
+#undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+#undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
+
+/* strict ANSI prohibits "long long" ( gcc) */
+#if defined ( __STRICT_ANSI__ )
+# undef _STLP_LONG_LONG
+#endif
+
+#ifndef __EXCEPTIONS
+# undef _STLP_DONT_USE_EXCEPTIONS
+# define _STLP_DONT_USE_EXCEPTIONS 1
+#endif
+
+#if (__GNUC__ >= 3)
+/* Instantiation scheme that used (default) in gcc 3 made void of sense explicit
+ instantiation within library: nothing except increased library size. - ptr
+ */
+# define _STLP_NO_FORCE_INSTANTIATE
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_hpacc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_hpacc.h
new file mode 100644
index 0000000..920b8b4
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_hpacc.h
@@ -0,0 +1,129 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ */
+
+#define _STLP_COMPILER "aCC"
+
+/* system C-library dependent */
+#if defined (_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+/* # define _STLP_RAND48 1 */
+/* #define _STLP_NO_NATIVE_MBSTATE_T 1 */
+#define _STLP_HPACC_BROKEN_BUFEND 1
+#define _STLP_WCHAR_HPACC_EXCLUDE 1
+
+/* this was reported to help, just as with SUN CC 4.2 */
+#define _STLP_INLINE_STRING_LITERAL_BUG
+
+/* specific prolog is needed to select correct threads impl */
+#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
+
+/* HP aCC with +noeh */
+#ifdef __HPACC_NOEH
+# define _STLP_HAS_NO_EXCEPTIONS 1
+#endif
+
+#define _STLP_NO_FORCE_INSTANTIATE
+#define _STLP_LONG_LONG long long
+#define _STLP_NO_VENDOR_STDLIB_L
+
+/* The aCC6 compiler is using the EDG Front End. Unfortunately, prior to
+ * version A.06.12, defining the __EDG__ and __EDG_VERSION__ macros was
+ * disabled. It was corrected in A.06.12.
+ */
+#if ((__HP_aCC > 60000) && (__HP_aCC < 61200))
+# define __EDG__
+# define __EDG_VERSION__ 306
+#endif
+
+#if (__HP_aCC >= 32500 )
+# define _STLP_USE_NEW_C_HEADERS
+
+# define _STLP_FORCE_ALLOCATORS(t,a) \
+ typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
+ typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
+
+# if defined (_HP_NAMESPACE_STD) // option -AA
+/* from now, we have a full standard lib in namespace std
+ *
+ * -AA indicates that we are compiling against Rogue Wave 2.2.1
+ * STL shipped with the HP aCC compiler. -AA tells the compiler
+ * to use the STL defined in the include_std directory.
+ */
+# define _STLP_NATIVE_INCLUDE_PATH ../include_std
+# else // option -Aa
+# define _STLP_VENDOR_GLOBAL_STD 1
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_DONT_THROW_RANGE_ERRORS 1
+# endif
+#endif
+
+#if (__HP_aCC >= 31400 && __HP_aCC < 32500)
+# define _STLP_FORCE_ALLOCATORS(t,a) \
+typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
+typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
+# define _STLP_NO_CWCHAR
+# if defined (_NAMESPACE_STD) // option -AA
+/* from now, we have a full standard lib in namespace std */
+# define _STLP_NATIVE_INCLUDE_PATH ../include_std
+# else /* kind of compatibility mode */
+# define _STLP_VENDOR_GLOBAL_STD 1
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_DONT_THROW_RANGE_ERRORS 1
+# define _STLP_NO_ROPE 1
+# endif
+#endif /* 314 */
+
+#if ((__HP_aCC >= 30000 && __HP_aCC < 31400) || (__HP_aCC == 1)) // A.03.13: __HP_aCC == 1
+
+# if (__HP_aCC != 1)
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+# endif
+
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+/* aCC bug ? need explicit args on constructors of partial specialized
+ * classes
+ */
+# define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
+/* ?? fbp : maybe present in some versions ? */
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+/* <exception> and stuff is in global namespace */
+# define _STLP_VENDOR_GLOBAL_EXCEPT_STD
+/* fbp : moved here */
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+/* # define _INCLUDE_HPUX_SOURCE */
+# define _XPG4
+# define _INCLUDE_XOPEN_SOURCE
+# define _INCLUDE_AES_SOURCE
+#endif
+
+#if (__HP_aCC <= 30000 && __HP_aCC >= 12100)
+/* Special kludge to workaround bug in aCC A.01.23, CR JAGac40634 */
+# ifdef _STLP_DEBUG
+static void _STLP_dummy_literal() { const char *p = "x";}
+static void _STLP_dummy_literal_2() { const char *p = "123456789"; }
+static void _STLP_dummy_literal_3() { const char *p = "123456700000000000000089";}
+# endif
+
+# define _STLP_VENDOR_GLOBAL_STD 1
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_DONT_THROW_RANGE_ERRORS 1
+# define _STLP_STATIC_CONST_INIT_BUG 1
+# if (__HP_aCC < 12700)
+/* new flag: on most HP compilers cwchar is missing */
+# define _STLP_NO_CWCHAR
+# endif
+
+# define _STLP_FORCE_ALLOCATORS(t,a) \
+ typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
+ typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
+#endif
+
+#if __HP_aCC == 1
+# define _STLP_BROKEN_USING_IN_CLASS
+# define _STLP_USING_BASE_MEMBER
+# define _STLP_NO_CWCHAR
+/* # define _STLP_NO_WCHAR_T 1 */
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_hpux.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_hpux.h
new file mode 100644
index 0000000..385c514
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_hpux.h
@@ -0,0 +1,17 @@
+#ifndef __stl_config__hpux_h
+#define __stl_config__hpux_h
+
+#define _STLP_PLATFORM "HP Unix"
+
+#define _STLP_USE_UNIX_IO
+
+#ifdef __GNUC__
+# define _STLP_NO_WCHAR_T
+# define _STLP_NO_CWCHAR
+# define _STLP_NO_LONG_DOUBLE
+# ifndef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 199506
+# endif
+#endif
+
+#endif /* __stl_config__hpux_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_ibm.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_ibm.h
new file mode 100644
index 0000000..f74f6d9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_ibm.h
@@ -0,0 +1,144 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ */
+
+#if defined (__IBMCPP__) || defined (__IBMC__)
+# define _STLP_COMPILER "Visual Age C++"
+#elif defined (__xlC__)
+# define _STLP_COMPILER "xlc"
+#else
+# error "Unknown compiler"
+#endif
+
+#if !defined(__IBMCPP__) || (__IBMCPP__ < 500)
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+#endif
+
+/* string literal problem, same as with SUN and aCC */
+# define _STLP_INLINE_STRING_LITERAL_BUG 1
+# define _STLP_HAS_NATIVE_FLOAT_ABS
+
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+
+
+# ifdef __IBMCPP__
+# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
+# endif
+
+/* # if ( defined (__MULTI__) && defined (__WINDOWS__))
+ * # define _STLP_WIN32THREADS 1 Only Visual Age 3.5 for Windows
+ * # endif
+ */
+
+# if ( defined (__MULTI__) && defined (__OS2__))
+# define _STLP_OS2THREADS 1
+# endif
+
+/* __TEMPINC__ is set when /Ft+ option is used */
+# ifdef __TEMPINC__
+# define _STLP_LINK_TIME_INSTANTIATION 1
+# endif
+
+# if defined (__MVS__)
+/* long long support is buggy - reported by Tinny Ng
+ * # if __EXTENDED__ && __COMPILER_VER__ >= 0x22060000
+ * # define _STLP_LONG_LONG long long
+ * # endif
+ */
+/* boris : hstash reported it can be treated like UNIX */
+# define _STLP_NO_TYPEINFO 1
+# undef _STLP_NATIVE_INCLUDE_PATH
+# define _STLP_NATIVE_INCLUDE_PATH /usr/lpp/ioclib/include
+/* same for C headers like <string.h> */
+# undef _STLP_NATIVE_C_INCLUDE_PATH
+# define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
+# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH /usr/include
+
+# elif (defined (__WINDOWS__) || defined (_AIX) || defined (__OS2__) ) && (__IBMCPP__ >= 350)
+
+# define _STLP_LONG_LONG long long
+
+#endif
+
+#if !( defined( __xlC__ ) && __xlC__ >= 0x500 )
+
+/* AIX xlC 3.1 , 3.0.1 ==0x301
+ * Visual Age C++ 3.x
+ * OS-390 C++
+ * fbp : should be more version-specific!
+ */
+
+# define _STLP_NO_BOOL 1
+# define _STLP_DONT_USE_BOOL_TYPEDEF 1
+# define _STLP_LIMITED_DEFAULT_TEMPLATES 1
+# define _STLP_HAS_NO_NAMESPACES 1
+# define _STLP_NEED_TYPENAME 1
+# define _STLP_NEED_EXPLICIT 1
+# define _STLP_NO_ARROW_OPERATOR 1
+# define _STLP_NO_NEW_STYLE_CASTS 1
+# define _STLP_NO_WCHAR_T 1
+# define _STLP_NEED_MUTABLE 1
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
+# define _STLP_NO_BAD_ALLOC 1
+
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+
+# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
+# define _STLP_NO_METHOD_SPECIALIZATION 1
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+# define _STLP_NO_EXCEPTION_HEADER 1
+
+# define _STLP_NO_NEW_NEW_HEADER 1
+
+# if defined (__OS2__) && (__IBMCPP__ <= 350)
+# define _STLP_NO_TYPEINFO 1
+# endif
+# define _STLP_NO_NEW_NEW_HEADER 1
+
+# define _STLP_STATIC_CONST_INIT_BUG 1
+/* # define _STLP_THROW_RETURN_BUG 1 */
+
+
+# define _STLP_NO_TEMPLATE_CONVERSIONS 1
+# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
+
+/* AIX xlC, Visual Age 3.0 for OS/2 and MS */
+# define _STLP_TRIVIAL_DESTRUCTOR_BUG
+
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
+
+#if __IBMCPP__ <= 350
+# define _STLP_NEED_UNREACHABLE_RETURN 1
+#endif
+
+#if __IBMCPP__ < 350
+# define _STLP_NO_LONG_DOUBLE 1
+#endif
+
+#if __IBMCPP__ >= 365
+/* does not have new C headers, but has div() */
+# define _STLP_LDIV
+#endif
+
+#endif /* xlC 5 */
+
+/* detect xlC5 by: */
+#if defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 700)
+# define _STLP_USE_EXCEPTIONS 1
+# define _STLP_STATIC_CONST_INIT_BUG 1
+/* #pragma report(disable,CPPC1500029)
+ * unsigned 32-bit integer type
+ */
+# define _STLP_UINT32_T unsigned int
+# if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+# endif
+/* # define _STLP_RAND48 1 */
+#endif /* __IBMCPP__ == 500 */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_icc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_icc.h
new file mode 100644
index 0000000..1fc1bce
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_icc.h
@@ -0,0 +1,44 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+// A list of Intel compiler for Linux portion of STLport settings.
+
+#define _STLP_COMPILER "Intel ICC"
+
+#define _STLP_LONG_LONG long long
+
+// Edit relative path below (or put full path) to get native
+// compiler headers included. Default is "../include".
+// C headers may reside in different directory, so separate macro is provided.
+#if (__INTEL_COMPILER < 800)
+# define _STLP_NATIVE_INCLUDE_PATH ../include
+# define _STLP_NATIVE_C_INCLUDE_PATH ../include
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
+#endif
+
+#if (__INTEL_COMPILER >= 800)
+# define _STLP_NATIVE_INCLUDE_PATH ../include/c++
+# define _STLP_NATIVE_C_INCLUDE_PATH ../include
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
+
+#endif /* __INTEL_COMPILER >= 800 */
+
+#define _STLP_HAS_NO_NEW_C_HEADERS 1
+#define _STLP_VENDOR_GLOBAL_CSTD 1
+
+/* Systems having GLIBC installed have different traits */
+#if !defined (_STLP_USE_GLIBC) && defined (__linux__)
+# define _STLP_USE_GLIBC
+# define _XOPEN_SOURCE 600
+#endif
+
+#undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+
+
+#ifndef __GNUC__
+# define __GNUC__ 3
+#endif
+
+//#define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+
+#define _STLP_NO_FORCE_INSTANTIATE
+//#define _REENTRANT
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_intel.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_intel.h
new file mode 100644
index 0000000..01e09d6
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_intel.h
@@ -0,0 +1,72 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "Intel ICL"
+
+#define _STLP_IMPORT_TEMPLATE_KEYWORD extern
+
+/* You need to undef following macro if your icl install is binded to MSVC 6
+ * native lib and you are building with /Qvc7 or /Qvc7.1 or /Qvc8 option.
+ */
+/* #define _STLP_MSVC_LIB 1200 */
+/* You need to undef following macro if your icl install is binded to MSVC .Net 2002
+ * native lib and you are building without any /Qvc* option or with /Qvc6 or /Qvc7.1
+ * or /Qvc8 option.
+ */
+/* #define _STLP_MSVC_LIB 1300 */
+/* You need to undef following macro if your icl install is binded to MSVC .Net 2003
+ * native lib and you are building without any /Qvc* option or with /Qvc6 or /Qvc7
+ * or /Qvc8 option.
+ */
+/* #define _STLP_MSVC_LIB 1310 */
+/* You need to undef following macro if your icl install is binded to MSVC 2005
+ * native lib and you are building without any /Qvc* option or with /Qvc6 or /Qvc7
+ * or /Qvc7.1 option.
+ */
+/* #define _STLP_MSVC_LIB 1400 */
+
+#include <stl/config/_msvc.h>
+
+#if defined (_STLP_DONT_RETURN_VOID)
+# undef _STLP_DONT_RETURN_VOID
+#endif
+
+#if (__ICL < 900)
+# define _STLP_NOTHROW
+#endif
+
+#if (__ICL <= 810)
+/* If method specialization is activated, compiler do not export some
+ * symbols anymore.
+ */
+# define _STLP_NO_METHOD_SPECIALIZATION 1
+#endif
+
+#if (__ICL >= 800 && __ICL < 900)
+# define _STLP_STATIC_CONST_INIT_BUG 1
+#endif
+
+#if (__ICL >= 450)
+# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
+#endif
+
+#if (__ICL < 450)
+/* only static STLport lib works for ICL */
+# undef _STLP_USE_STATIC_LIB
+# undef _STLP_USE_DYNAMIC_LIB
+# define _STLP_USE_STATIC_LIB
+/* disable hook which makes template symbols to be searched for in the library */
+# undef _STLP_NO_CUSTOM_IO
+#endif
+
+#undef _STLP_LONG_LONG
+#define _STLP_LONG_LONG long long
+
+#if defined (__cplusplus) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300)
+namespace std
+{
+ void _STLP_CALL unexpected();
+}
+#endif
+
+#include <stl/config/_feedback.h>
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_kai.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_kai.h
new file mode 100644
index 0000000..267158f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_kai.h
@@ -0,0 +1,43 @@
+// STLport config file for KAI C++ compiler
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+
+# ifndef __KAI_STRICT /* _NO_LONGLONG */
+# define _STLP_LONG_LONG long long
+# endif
+
+# if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS)
+# define _STLP_HAS_NO_EXCEPTIONS
+# endif
+
+# ifndef __BUILDING_STLPORT
+# define _STLP_LINK_TIME_INSTANTIATION 1
+# endif
+
+// two levels of macros do not work good with kcc.
+# define _STLP_NATIVE_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_C_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_CPP_C_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
+
+// KAI C++ uses EDG front-end, but apparently different switches
+// # define __EDG_SWITCHES 1
+
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+# define _STLP_VENDOR_MB_NAMESPACE std
+
+// boris : some of those may also apply to KCC 3.4
+# if __KCC_VERSION < 4000
+# define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
+
+# endif
+
+# if defined (__sgi)
+// this requires some discrimination on whether we are actually on
+// a system officially supported by KAI.
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+# include <standards.h>
+# endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_linux.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_linux.h
new file mode 100644
index 0000000..b36a766
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_linux.h
@@ -0,0 +1,125 @@
+#ifndef __stl_config__linux_h
+#define __stl_config__linux_h
+
+#define _STLP_PLATFORM "Linux"
+
+#include <features.h>
+
+/* This is defined wether library in use is glibc or not.
+ This may be treated as presence of GNU libc compatible
+ header files (these define is not really intended to check
+ for the presence of a particular library, but rather is used
+ to define an INTERFACE.) */
+#ifndef _STLP_USE_GLIBC
+# define _STLP_USE_GLIBC 1
+#endif
+
+#ifndef _STLP_USE_STDIO_IO
+# define _STLP_USE_UNIX_IO
+#endif
+
+/* #define _STLP_USE_STDIO_IO */
+
+/* If not explicitly specified otherwise, work with threads
+ */
+#if !defined(_STLP_NO_THREADS) && !defined(_REENTRANT)
+# define _REENTRANT
+#endif
+
+#if defined(_REENTRANT) && !defined(_PTHREADS)
+# define _PTHREADS
+#endif
+
+#ifdef __UCLIBC__ /* uClibc 0.9.27 */
+# define _STLP_USE_UCLIBC 1
+# if !defined(__UCLIBC_HAS_WCHAR__)
+# ifndef _STLP_NO_WCHAR_T
+# define _STLP_NO_WCHAR_T
+# endif
+# ifndef _STLP_NO_NATIVE_MBSTATE_T
+# define _STLP_NO_NATIVE_MBSTATE_T
+# endif
+# ifndef _STLP_NO_NATIVE_WIDE_STREAMS
+# define _STLP_NO_NATIVE_WIDE_STREAMS
+# endif
+# endif /* __UCLIBC_HAS_WCHAR__ */
+ /* Hmm, bogus _GLIBCPP_USE_NAMESPACES seems undefined... */
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+#endif
+
+
+#if defined(_PTHREADS)
+# define _STLP_THREADS
+# define _STLP_PTHREADS
+/*
+# ifndef __USE_UNIX98
+# define __USE_UNIX98
+# endif
+*/
+/* This feature exist at least since glibc 2.2.4 */
+/* # define __FIT_XSI_THR */ /* Unix 98 or X/Open System Interfaces Extention */
+# ifdef __USE_XOPEN2K
+/* The IEEE Std. 1003.1j-2000 introduces functions to implement spinlocks. */
+# ifndef __UCLIBC__ /* There are no spinlocks in uClibc 0.9.27 */
+# define _STLP_USE_PTHREAD_SPINLOCK
+# else
+# ifndef _STLP_DONT_USE_PTHREAD_SPINLOCK
+ /* in uClibc (0.9.26) pthread_spinlock* declared in headers
+ * but absent in library */
+# define _STLP_DONT_USE_PTHREAD_SPINLOCK
+# endif
+# endif
+# ifndef _STLP_DONT_USE_PTHREAD_SPINLOCK
+# define _STLP_USE_PTHREAD_SPINLOCK
+# define _STLP_STATIC_MUTEX _STLP_mutex
+# endif
+/* # define __FIT_PSHARED_MUTEX */
+# endif
+#endif
+
+/* Endiannes */
+#include <endian.h>
+#if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
+# error "One of __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN undefined; Fix me!"
+#endif
+
+#if ( __BYTE_ORDER == __LITTLE_ENDIAN )
+# define _STLP_LITTLE_ENDIAN 1
+#elif ( __BYTE_ORDER == __BIG_ENDIAN )
+# define _STLP_BIG_ENDIAN 1
+#else
+# error "__BYTE_ORDER neither __BIG_ENDIAN nor __LITTLE_ENDIAN; Fix me!"
+#endif
+
+#if defined(__GNUC__) && (__GNUC__ < 3)
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+#endif
+
+#ifdef __GLIBC__
+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || (__GLIBC__ > 2)
+/* From glibc 2.3.x default allocator is malloc_alloc, if was not defined other */
+# if !defined(_STLP_USE_MALLOC) && !defined(_STLP_USE_NEWALLOC) && !defined(_STLP_USE_PERTHREAD_ALLOC) && !defined(_STLP_USE_NODE_ALLOC)
+# define _STLP_USE_MALLOC 1
+# endif
+# endif
+/* Following platforms has no long double:
+ * - Alpha
+ * - PowerPC
+ * - SPARC, 32-bits (64-bits platform has long double)
+ * - MIPS, 32-bits
+ * - ARM
+ * - SH4
+ */
+# if defined(__alpha__) || \
+ defined(__ppc__) || defined(PPC) || defined(__powerpc__) || \
+ ((defined(__sparc) || defined(__sparcv9) || defined(__sparcv8plus)) && !defined ( __WORD64 ) && !defined(__arch64__)) /* ? */ || \
+ (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32)) || \
+ defined(__arm__) || \
+ defined(__sh__)
+ /* # if defined(__NO_LONG_DOUBLE_MATH) */
+# define _STLP_NO_LONG_DOUBLE
+# endif
+#endif
+
+
+#endif /* __stl_config__linux_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_mac.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_mac.h
new file mode 100644
index 0000000..575c183
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_mac.h
@@ -0,0 +1,6 @@
+#define _STLP_PLATFORM "Mac"
+
+#define _STLP_MAC 1
+
+#error Looks like unsupported platform
+#define _STLP_USE_UNIX_EMULATION_IO
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_macosx.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_macosx.h
new file mode 100644
index 0000000..54a9222
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_macosx.h
@@ -0,0 +1,9 @@
+#define _STLP_PLATFORM "Mac OS X"
+
+#if defined (__BIG_ENDIAN__)
+# define _STLP_BIG_ENDIAN 1
+#elif defined (__LITTLE_ENDIAN__)
+# define _STLP_LITTLE_ENDIAN 1
+#endif
+
+#define _STLP_USE_UNIX_IO
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_mlc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_mlc.h
new file mode 100644
index 0000000..8687d0b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_mlc.h
@@ -0,0 +1,7 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_NO_MEMBER_TEMPLATES // Compiler does not support member templates
+#define _STLP_NO_MEMBER_TEMPLATE_CLASSES // Compiler does not support member template classes
+
+#define _STLP_HAS_NEW_NEW_HEADER
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_msvc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_msvc.h
new file mode 100644
index 0000000..418d018
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_msvc.h
@@ -0,0 +1,265 @@
+/* STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ * Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0, ICL
+ */
+
+#if !defined (_STLP_COMPILER)
+# define _STLP_COMPILER "Microsoft Visual Studio C++"
+#endif
+
+#if !defined (__ICL) && !defined (_STLP_MSVC)
+# define _STLP_MSVC _MSC_VER
+#endif
+
+#if !defined (_STLP_MSVC_LIB)
+# define _STLP_MSVC_LIB _MSC_VER
+#endif
+
+#if defined (__BUILDING_STLPORT) && defined (_MANAGED)
+/* Building a managed version of STLport is not supported because we haven't
+ * found a good reason to support it. However, building a managed translation
+ * unit using STLport _is_ supported.
+ */
+# error Sorry but building a managed version of STLport is not supported.
+#endif
+
+#if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
+/* This is a specific section for compilers coming with platform SDKs. Native
+ * library coming with it is different from the one coming with commercial
+ * MSVC compilers so there is some specific settings.
+ */
+# define _STLP_NATIVE_INCLUDE_PATH ../crt
+# define _STLP_VENDOR_GLOBAL_CSTD
+# define _STLP_VENDOR_TERMINATE_STD
+# define _STLP_GLOBAL_NEW_HANDLER
+# if (_STLP_MSVC_LIB <= 1400)
+/* We hope this bug will be fixed in future versions. */
+# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
+# endif
+#endif
+
+#define _STLP_CALL __cdecl
+
+#ifndef _STLP_LONG_LONG
+# define _STLP_LONG_LONG __int64
+#endif
+
+#define _STLP_PRAGMA_ONCE
+
+/* These switches depend on compiler flags. We are hoping here that compilers
+ * simulating MSVC behavior use identical macros to report compilation context.
+ * Otherwise those macros will have to be undef in specific compiler configuration
+ * files.
+ */
+#ifndef _CPPUNWIND
+# define _STLP_DONT_USE_EXCEPTIONS 1
+#endif
+
+#ifndef _CPPRTTI
+# define _STLP_NO_RTTI 1
+#endif
+
+#if defined (_MT) && !defined (_STLP_NO_THREADS)
+# define _STLP_THREADS 1
+#endif
+
+#if !defined (_NATIVE_WCHAR_T_DEFINED)
+# define _STLP_WCHAR_T_IS_USHORT 1
+#endif
+
+#define _STLP_NO_VENDOR_STDLIB_L 1
+
+#if defined (_STLP_MSVC)
+
+# if (_STLP_MSVC < 1200)
+# error Microsoft Visual C++ compilers before version 6 (SP5) are not supported.
+# endif
+
+# define _STLP_NORETURN_FUNCTION __declspec(noreturn)
+
+/* Full compiler version comes from boost library intrinsics.hpp header. */
+# if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215)
+# define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+# define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
+# define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
+# define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+# define _STLP_IS_POD(T) __is_pod(T)
+# define _STLP_HAS_TYPE_TRAITS_INTRINSICS
+# endif
+
+# ifndef _STLP_MSVC50_COMPATIBILITY
+# define _STLP_MSVC50_COMPATIBILITY 1
+# endif
+
+# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
+# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
+# define _STLP_NO_STATIC_CONST_DEFINITION 1
+
+/* # ifndef __BUILDING_STLPORT
+ * # define _STLP_USE_TEMPLATE_EXPORT 1
+ * # endif
+ */
+
+/** Note: the macro _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT is defined
+unconditionally and undef'ed here when applicable. */
+# if defined (UNDER_CE)
+/* eVCx:
+uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is
+unknown) and they all reside in namespace 'std' there. However, they are not
+part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on
+an ARMV4I, the uncaught_exception test fails, the function returns the wrong
+value. */
+/* All eVCs up to at least VC8/CE5 have a broken new operator that
+ returns null instead of throwing bad_alloc. */
+# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
+# else
+/* VCx:
+These are present at least since VC6, but the uncaught_exception() of VC6 is
+broken, it returns the wrong value in the unittests. 7.1 and later seem to
+work, 7.0 is still unknown (we assume it works until negative report). */
+# if (_STLP_MSVC >= 1300)// VC7 and later
+# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+# endif
+# if (_STLP_MSVC < 1300)
+# define _STLP_NOTHROW
+# endif
+# endif
+
+# if (_STLP_MSVC <= 1300)
+# define _STLP_STATIC_CONST_INIT_BUG 1
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+/* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */
+# define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+# define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
+# define _STLP_NO_METHOD_SPECIALIZATION 1
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
+/* VC++ cannot handle default allocator argument in template constructors */
+# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+# endif
+
+# if (_STLP_MSVC < 1300) /* including MSVC 6.0 */
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
+# endif
+
+# define _STLP_HAS_NATIVE_FLOAT_ABS 1
+
+// TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to?
+# if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310)
+# define _STLP_NO_MOVE_SEMANTIC
+# endif
+
+# if (_STLP_MSVC < 1300)
+/* TODO: remove this if it is handled and documented elsewhere
+ * dums: VC6 do not handle correctly member templates of class that are explicitely
+ * instanciated to be exported. There is a workaround, seperate the non template methods
+ * from the template ones within 2 different classes and only export the non template one.
+ * It is implemented for basic_string and locale at the writing of this note.
+ * However this problem hos not been considered as important enough to remove template member
+ * methods for other classes. Moreover Boost (www.boost.org) required it to be granted.
+ * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined
+ * later in this config file.
+ */
+/*
+# if defined (_DLL)
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# endif
+*/
+
+/* Boris : not defining this macro for SP5 causes other problems */
+/*# if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */
+# define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
+/*# endif */
+# define _STLP_DONT_USE_BOOL_TYPEDEF 1
+# define _STLP_DONT_RETURN_VOID 1
+# endif
+
+# if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+/* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */
+# define _STLP_USE_ABBREVS
+# endif
+
+#endif /* _STLP_MSVC */
+
+/* The desktop variants starting with VC8 have a set of more secure replacements
+ * for the error-prone string handling functions of the C standard lib. */
+/* When user do not consider 'unsafe' string functions as deprecated using _CRT_SECURE_NO_DEPRECATE
+ * macro we use 'unsafe' functions for performance reasons. */
+#if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined (UNDER_CE) && \
+ !defined (_CRT_SECURE_NO_DEPRECATE)
+# define _STLP_USE_SAFE_STRING_FUNCTIONS 1
+#endif
+
+#if (_STLP_MSVC_LIB <= 1310)
+# define _STLP_VENDOR_GLOBAL_CSTD
+#endif
+
+#if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE)
+/* Starting with MSVC 7.0 and compilers simulating it,
+ * we assume that the new SDK is granted:
+ */
+# define _STLP_NEW_PLATFORM_SDK 1
+#endif
+
+#if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */
+# define _STLP_GLOBAL_NEW_HANDLER 1
+# define _STLP_VENDOR_UNEXPECTED_STD
+# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
+#endif
+
+#define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
+#define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
+#define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
+
+#if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL)
+# define _STLP_RUNTIME_DLL
+#endif
+#if defined (__BUILDING_STLPORT) && \
+ (defined (_STLP_USE_DYNAMIC_LIB) || \
+ defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB))
+# define _STLP_DLL
+#endif
+#include <stl/config/_detect_dll_or_lib.h>
+#undef _STLP_RUNTIME_DLL
+#undef _STLP_DLL
+
+#if defined (_STLP_USE_DYNAMIC_LIB)
+# undef _STLP_USE_DECLSPEC
+# define _STLP_USE_DECLSPEC 1
+# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300)
+# define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1
+# endif
+#endif
+
+#if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD)
+# if !defined (_MSC_EXTENSIONS) || defined (_STLP_MSVC) && (_STLP_MSVC >= 1300)
+# define _STLP_IMPORT_TEMPLATE_KEYWORD
+# else
+# define _STLP_IMPORT_TEMPLATE_KEYWORD extern
+# endif
+#endif
+#define _STLP_EXPORT_TEMPLATE_KEYWORD
+
+#include <stl/config/_auto_link.h>
+
+#if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
+/* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for
+ * additional buffer overrun checks. Rather than require the STLport build system and
+ * users to explicitely link with it we use the MSVC auto link feature.
+ */
+# if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT)
+# pragma comment (lib, "bufferoverflowU.lib")
+# if defined (_STLP_VERBOSE)
+# pragma message ("STLport: Auto linking to bufferoverflowU.lib")
+# endif
+# endif
+#endif
+
+#if defined (_STLP_MSVC)
+# include <stl/config/_feedback.h>
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_mwerks.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_mwerks.h
new file mode 100644
index 0000000..f91f3b1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_mwerks.h
@@ -0,0 +1,159 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "Metrowerk Codewarrior"
+
+// Bring in definition of __MSL__ and related items
+#include <mslGlobals.h>
+#include <ansi_parms.h>
+
+//
+// Compiler features
+//
+
+
+// *** CodeWarrior Compiler Common Features ***
+# if __option(longlong)
+# define _STLP_LONG_LONG long long
+# endif
+
+# define _STLP_USE_UNIX_EMULATION_IO 1
+
+# define _STLP_USE_AUTO_PTR_CONVERSIONS 1
+
+# ifdef __INTEL__
+# define _STLP_LITTLE_ENDIAN
+# else
+# define _STLP_BIG_ENDIAN
+# endif
+
+#if defined(_MSL_NO_LOCALE)
+#define _STLP_NO_IMPORT_LOCALE
+#endif
+#if !__option( wchar_type )
+# define _STLP_WCHAR_T_IS_USHORT
+#endif
+
+# if __MWERKS__ < 0x3000
+// *** CodeWarrior Compiler Common Bugs ***
+# define __MSL_FIX_ITERATORS__(myType) // Some MSL headers rely on this
+# define _STLP_THROW_RETURN_BUG 1
+# endif
+
+// *** Version-specific settings ***
+
+# if __MWERKS__ >= 0x2405
+# define _STLP_HAS_NATIVE_FLOAT_ABS
+# endif
+
+# if __MWERKS__ < 0x2405
+# define _STLP_STATIC_CONST_INIT_BUG
+# endif
+
+# if __MWERKS__ <= 0x2303
+# define _STLP_NO_TEMPLATE_CONVERSIONS 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# endif
+
+# if __MWERKS__ < 0x2301
+# define _STLP_MEMBER_SPECIALIZATION_BUG 1
+# endif
+
+# if __MWERKS__ < 0x2300 // CW Pro5 features
+# define _STLP_INLINE_MEMBER_TEMPLATES 1
+# define _STLP_RELOPS_IN_STD_BUG 1
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+# define _STLP_NO_TYPENAME_ON_RETURN_TYPE
+# endif
+
+# if __MWERKS__ < 0x2200 // CW Pro4 features
+# define _STLP_BROKEN_USING_DIRECTIVE 1
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+# endif
+
+# if __MWERKS__ < 0x2100 // CW Pro3 features
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_HAS_NO_NAMESPACES 1
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+
+# define _STLP_NEED_TYPENAME 1
+# define _STLP_NO_ARROW_OPERATOR 1
+# define _STLP_TEMPLATE_PARAM_SUBTYPE_BUG 1
+# define _STLP_FORCED_INLINE_INSTANTIATION_BUG 1
+# define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG 1
+# define _STLP_INLINE_NAME_RESOLUTION_BUG 1
+// *** Metrowerks Standard Library Bug ***
+# define _STLP_MSVC50_COMPATIBILITY 1
+# endif
+
+# if __MWERKS__ < 0x2000 // v. 2.0 features
+# define _STLP_NO_WCHAR_T 1
+# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 // dwa 8/21/97 - this bug fixed for CWPro2
+# endif
+
+# if __MWERKS__ < 0x1900 // dwa 8/19/97 - 1.9 Compiler feature defines
+# define _STLP_LIMITED_DEFAULT_TEMPLATES 1
+# define _STLP_BASE_TYPEDEF_BUG 1
+# define _STLP_BASE_MATCH_BUG 1
+# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
+# define _STLP_DEFAULT_TYPE_PARAM 1 // More limited template parameters
+
+# if __MWERKS__ < 0x1800
+ __GIVE_UP_WITH_STL(CW_18)
+# endif
+
+# endif
+
+
+// fixes to native inclusion wrappers.
+# if __MWERKS__ >= 0x2300 // CWPro5 changes paths - dwa 2/28/99
+# define _STLP_NATIVE_INCLUDE_PATH ../include
+# define _STLP_NATIVE_C_INCLUDE_PATH ../include
+# define _STLP_NATIVE_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_CPP_C_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_C_HEADER(header) <../include/##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
+# else
+
+# define _STLP_NATIVE_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include
+# define _STLP_NATIVE_C_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes
+# define _STLP_NATIVE_HEADER(header) <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include:##header>
+# define _STLP_NATIVE_CPP_C_HEADER(header) <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include:##header>
+# define _STLP_NATIVE_C_HEADER(header) <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes:##header>
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes:##header>
+
+# endif
+
+//Following block come from boost intrinsics.hpp file:
+#if defined (__MSL_CPP__) && (__MSL_CPP__ >= 0x8000)
+ // Metrowerks compiler is acquiring intrinsic type traits support
+ // post version 8. We hook into the published interface to pick up
+ // user defined specializations as well as compiler intrinsics as
+ // and when they become available:
+# include <msl_utility>
+# define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) Metrowerks::has_trivial_default_ctor<T>::value
+# define _STLP_HAS_TRIVIAL_COPY(T) Metrowerks::has_trivial_copy_ctor<T>::value
+# define _STLP_HAS_TRIVIAL_ASSIGN(T) Metrowerks::has_trivial_assignment<T>::value
+# define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) Metrowerks::has_trivial_dtor<T>::value
+# define _STLP_IS_POD(T) Metrowerks::is_POD<T>::value
+# define _STLP_HAS_TYPE_TRAITS_INTRINSICS
+#endif
+
+// fbp
+# if !defined( __MSL_CPP__ ) || __MSL_CPP__ <= 0x4105
+# define _STLP_NO_NATIVE_WIDE_STREAMS 1
+# endif
+
+# if defined(__MACH__)
+# define _STLP_MAC
+# define O_BINARY 0
+# elif defined(macintosh)
+# define _NOTHREADS
+# endif
+# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_native_headers.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_native_headers.h
new file mode 100644
index 0000000..f1f4bc9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_native_headers.h
@@ -0,0 +1,50 @@
+ /*
+ *
+ * Copyright (c) 2006
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_MAKE_HEADER)
+# define _STLP_MAKE_HEADER(path, header) <path/header>
+#endif
+
+#if !defined (_STLP_NATIVE_HEADER)
+# if !defined (_STLP_NATIVE_INCLUDE_PATH)
+# define _STLP_NATIVE_INCLUDE_PATH ../include
+# endif
+# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
+#endif
+
+/* For some compilers, C headers like <stdio.h> are located in separate directory */
+#if !defined (_STLP_NATIVE_C_HEADER)
+# if !defined (_STLP_NATIVE_C_INCLUDE_PATH)
+# define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+# endif
+# define _STLP_NATIVE_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header)
+#endif
+
+/* For some compilers, C-library headers like <cstdio> are located in separate directory */
+#if !defined (_STLP_NATIVE_CPP_C_HEADER)
+# if !defined (_STLP_NATIVE_CPP_C_INCLUDE_PATH)
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+# endif
+# define _STLP_NATIVE_CPP_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_C_INCLUDE_PATH,header)
+#endif
+
+/* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */
+#if !defined ( _STLP_NATIVE_CPP_RUNTIME_HEADER )
+# if !defined (_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH)
+# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+# endif
+# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH,header)
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_openbsd.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_openbsd.h
new file mode 100644
index 0000000..86a19d1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_openbsd.h
@@ -0,0 +1,12 @@
+#define _STLP_PLATFORM "Open BSD"
+
+#define _STLP_USE_UNIX_IO
+
+#if defined (_POSIX_THREADS) && !defined (_STLP_THREADS)
+# define _STLP_THREADS
+#endif
+
+#if defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK)
+# define _STLP_USE_PTHREAD_SPINLOCK
+# define _STLP_STATIC_MUTEX _STLP_mutex
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_prolog.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_prolog.h
new file mode 100644
index 0000000..a16a794
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_prolog.h
@@ -0,0 +1,43 @@
+
+#if defined (_STLP_MSVC) || defined (__ICL)
+
+# pragma warning (push)
+# include <stl/config/_warnings_off.h>
+/* We are forcing the alignment to guaranty that libraries are use
+ * with the same alignment as the one use to build them.
+ */
+# if !defined (_WIN64)
+# pragma pack(push, 8)
+# else
+# pragma pack(push, 16)
+# endif
+
+#elif defined (__BORLANDC__)
+
+# pragma option push
+# pragma option -Vx- -Ve- -a8 -b -pc
+# include <stl/config/_warnings_off.h>
+
+#elif defined (__sgi) && !defined (__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
+
+# pragma set woff 1209
+# pragma set woff 1174
+# pragma set woff 1375
+/* from iterator_base.h */
+# pragma set woff 1183
+
+#elif defined (__DECCXX)
+
+# ifdef __PRAGMA_ENVIRONMENT
+# pragma __environment __save
+# pragma __environment __header_defaults
+# endif
+
+#elif defined (__IBMCPP__)
+/* supress EDC3130: A constant is being used as a conditional expression */
+# pragma info(nocnd)
+#elif defined (__WATCOMCPLUSPLUS__)
+# pragma warning 604 10 /* must lookahead to determine... */
+# pragma warning 594 10 /* resolved as declaration/type */
+# pragma warning 595 10 /* resolved as an expression */
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_sgi.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_sgi.h
new file mode 100644
index 0000000..7500f3d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_sgi.h
@@ -0,0 +1,94 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "CC"
+
+#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
+
+// define native include path before trying to include anything
+
+#define _STLP_NATIVE_HEADER(__x) </usr/include/CC/##__x>
+#define _STLP_NATIVE_C_HEADER(__x) </usr/include/##__x>
+#define _STLP_NATIVE_OLD_STREAMS_HEADER(__x) </usr/include/CC/##__x>
+#define _STLP_NATIVE_CPP_C_HEADER(__x) </usr/include/CC/##__x>
+#define _STLP_NATIVE_CPP_RUNTIME_HEADER(__x) </usr/include/CC/##__x>
+
+#define _STLP_NO_NATIVE_MBSTATE_T
+
+#define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS
+#define _STLP_NO_NATIVE_WIDE_FUNCTIONS
+#define _STLP_NO_MEMBER_TEMPLATE_CLASSES
+
+// #define _STLP_NO_BAD_ALLOC
+
+#define _STL_HAS_NAMESPACES
+
+#if ! defined (__EXCEPTIONS) && ! defined (_STLP_NO_EXCEPTIONS)
+# define _STLP_NO_EXCEPTIONS
+#endif
+
+#define __EDG_SWITCHES
+
+#define _STLP_USE_SGI_STRING 1
+
+#define _STLP_HAS_NO_NEW_C_HEADERS 1
+// # define _STLP_VENDOR_GLOBAL_EXCEPT_STD
+
+#define _STLP_NO_POST_COMPATIBLE_SECTION
+
+#include <standards.h>
+
+#if !(_COMPILER_VERSION >= 730)
+# define _STLP_NO_NEW_NEW_HEADER 1
+#endif
+
+#if (_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
+# define _STLP_EXTERN_RANGE_ERRORS
+#endif
+
+#if !defined(_BOOL)
+# define _STLP_NO_BOOL
+#endif
+#if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
+# define _STLP_STATIC_CONST_INIT_BUG
+#endif
+
+#if (_COMPILER_VERSION < 720) || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32)
+# define _STLP_DEF_CONST_PLCT_NEW_BUG
+# define _STLP_DEF_CONST_DEF_PARAM_BUG
+#endif
+#if !((_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32)
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
+#endif
+#if !defined(_STANDARD_C_PLUS_PLUS)
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+#endif
+#if !((_COMPILER_VERSION >= 721) && defined(_NAMESPACES))
+# define _STLP_HAS_NO_NAMESPACES
+#endif
+#if (_COMPILER_VERSION < 721) || !defined(_STL_HAS_NAMESPACES) || defined(_STLP_NO_NAMESPACES)
+# define _STLP_NO_EXCEPTION_HEADER
+#endif
+#if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || !defined(_NAMESPACES)
+# define _STLP_NO_BAD_ALLOC
+#endif
+#if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
+# define _STLP_LONG_LONG long long
+#endif
+#if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
+# define _STLP_USE_NO_IOSTREAMS
+#endif
+#if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
+# define _STLP_NO_AT_MEMBER_FUNCTION
+#endif
+// # if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
+#if !(_COMPILER_VERSION >= 721 && defined(_STANDARD_C_PLUS_PLUS))
+# define _STLP_NO_TEMPLATE_CONVERSIONS
+#endif
+#if !((_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32)
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
+#endif
+
+#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED) && !defined (__GNUC__)
+# define _STLP_SGI_THREADS
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_solaris.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_solaris.h
new file mode 100644
index 0000000..8756a06
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_solaris.h
@@ -0,0 +1,77 @@
+#ifndef __stl_config__solaris_h
+#define __stl_config__solaris_h
+
+#define _STLP_PLATFORM "Sun Solaris"
+
+/* include system features file */
+#include <sys/feature_tests.h>
+
+/* system-dependent defines */
+#define _STLP_USE_UNIX_IO
+
+#ifdef __GNUC__
+/*
+ * See comments (and configuration defines) in the host.h
+ */
+# if !(defined(__SunOS_5_5_1) || defined(__SunOS_5_6) || defined(__SunOS_5_7) || \
+ defined(__SunOS_5_8) || defined(__SunOS_5_9) || defined(__SunOS_5_10))
+# error Uncomment one of the defines (__SunOS_5_x) in the file stlport/stl/config/host.h
+# endif
+#endif
+
+#if defined (__SunOS_5_8) && ! defined (_STLP_HAS_NO_NEW_C_HEADERS) && ( __cplusplus >= 199711L)
+# define _STLP_HAS_NATIVE_FLOAT_ABS
+#endif
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
+# define _STLP_RAND48 1
+#endif
+
+#if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) || defined (__SunOS_5_6)
+# define _STLP_WCHAR_SUNPRO_EXCLUDE 1
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+#endif
+
+/* boris : this should always be defined for Solaris 5 & 6. Any ideas how to do it? */
+#if !(defined ( __KCC ) && __KCC_VERSION > 3400 ) && \
+ ((defined(__SunOS_5_5_1) || defined(__SunOS_5_6) ))
+# ifndef _STLP_NO_NATIVE_MBSTATE_T
+# define _STLP_NO_NATIVE_MBSTATE_T 1
+# endif
+#endif /* KCC */
+
+/* For SPARC we use lightweight synchronization */
+#if defined (__sparc) /* && (defined (_REENTRANT) || defined (_PTHREADS)) */
+# if ( (defined (__GNUC__) && defined (__sparc_v9__)) || \
+ defined (__sparcv9) ) \
+ && !defined(_NOTHREADS) && !defined (_STLP_NO_SPARC_SOLARIS_THREADS)
+# define _STLP_SPARC_SOLARIS_THREADS
+# define _STLP_THREADS_DEFINED
+# endif
+#endif
+
+/* gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus.
+ * limits.h contains invalid values for this combination
+ */
+#ifdef __GNUC__
+# if (defined (__sparc_v9__) || defined (__sparcv9)) && !defined ( __WORD64 ) && !defined(__arch64__)
+# define __LONG_MAX__ 2147483647L
+# endif
+#endif
+
+/*
+ * Attention! See comments (and configuration defines) in the host.h
+ * (you host may has MATH_F and MATH_L functions)
+ *
+ */
+#if !defined(__SunOS_5_10) && !defined(_STLP_SOLARIS_MATH_PATCH)
+# define _STLP_NO_VENDOR_MATH_F
+# define _STLP_NO_VENDOR_MATH_L
+#endif
+
+#ifdef __GNUC__
+# define _STLP_WCHAR_BORLAND_EXCLUDE
+# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
+#endif
+
+#endif /* __stl_config__solaris_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_sunprocc.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_sunprocc.h
new file mode 100644
index 0000000..15fe5cd
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_sunprocc.h
@@ -0,0 +1,166 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "Sunpro CC"
+
+#define _STLP_LONG_LONG long long
+
+// GAB: 11/09/05
+// Starting with 5.0 the STLport code expects to be
+// instantiated during compile time. This is due to undefing
+// a number of defines that are also used in the c versions
+// of the file. When they are undefed the c version fails to
+// compile.
+// # define _STLP_LINK_TIME_INSTANTIATION 1
+
+#if ! defined(_BOOL)
+# define _STLP_NO_BOOL 1
+#endif
+
+// compatibility mode stuff
+#if (__SUNPRO_CC >= 0x510) && (!defined (__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT == 5 ))
+# define _STLP_NATIVE_INCLUDE_PATH ../CC/Cstd
+# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../CC
+#elif (__SUNPRO_CC >= 0x500) && (!defined (__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT == 5 ))
+# define _STLP_NATIVE_INCLUDE_PATH ../CC
+#elif (defined (__SUNPRO_CC_COMPAT) && __SUNPRO_CC_COMPAT == 4)
+# define _STLP_NATIVE_INCLUDE_PATH ../CC4
+#else
+# define _STLP_NATIVE_INCLUDE_PATH ../CC
+#endif
+
+#define _STLP_STATIC_CONST_INIT_BUG 1
+
+#if (__SUNPRO_CC < 0x530)
+// those are tested and proved not to work...
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+#endif
+
+#ifdef _STLP_USE_NO_IOSTREAMS
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+#endif
+
+// those do not depend on compatibility
+#if (__SUNPRO_CC < 0x510)
+# define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
+# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
+#endif
+
+#if (__SUNPRO_CC < 0x510) || (defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT < 5))
+
+# define _STLP_NO_QUALIFIED_FRIENDS 1
+
+// no partial , just for explicit one
+# define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
+# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+
+# define _STLP_NO_MEMBER_TEMPLATES 1
+
+# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+#endif
+
+// Features that depend on compatibility switch
+#if ( __SUNPRO_CC < 0x500 ) || (defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT < 5))
+
+# ifndef _STLP_USE_NO_IOSTREAMS
+# define _STLP_USE_NO_IOSTREAMS 1
+# endif
+# define _STLP_NO_NEW_NEW_HEADER 1
+// # define _STLP_NO_RELOPS_NAMESPACE
+# define _STLP_HAS_NO_NAMESPACES 1
+# define _STLP_NEED_MUTABLE 1
+# define _STLP_NO_BAD_ALLOC 1
+# define _STLP_NO_EXCEPTION_HEADER 1
+# define _STLP_NATIVE_C_INCLUDE_PATH ../include
+#elif (__SUNPRO_CC < 0x510)
+// # define _STLP_NATIVE_C_HEADER(header) <../CC/##header##.SUNWCCh>
+# define _STLP_NATIVE_CPP_C_HEADER(header) <../CC/##header##.SUNWCCh>
+# define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
+#elif defined( __SunOS_5_5_1 ) || defined( __SunOS_5_6 ) || defined( __SunOS_5_7 )
+# define _STLP_NATIVE_C_INCLUDE_PATH ../CC/std
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../CC/std
+#else
+# define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
+# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../CC/std
+#endif
+
+#if ( __SUNPRO_CC < 0x500 )
+
+# undef _STLP_NATIVE_C_HEADER
+# undef _STLP_NATIVE_CPP_C_HEADER
+
+# define wint_t __wint_t
+// famous CC 4.2 bug
+# define _STLP_INLINE_STRING_LITERAL_BUG 1
+// /usr/include
+# define _STLP_NATIVE_C_INCLUDE_PATH ../include
+
+// 4.2 cannot handle iterator_traits<_Tp>::iterator_category as a return type ;(
+# define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+
+// 4.2 does not like it
+# undef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
+
+# define _STLP_LIMITED_DEFAULT_TEMPLATES 1
+
+# define _STLP_NEED_TYPENAME 1
+# define _STLP_NEED_EXPLICIT 1
+# define _STLP_NO_BAD_ALLOC 1
+# define _STLP_NO_ARROW_OPERATOR 1
+
+# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+# define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG 1
+# undef _STLP_HAS_NO_NEW_C_HEADERS
+# define _STLP_HAS_NO_NEW_C_HEADERS 1
+// # define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
+
+# if ( __SUNPRO_CC < 0x420 )
+# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
+# define _STLP_NO_NEW_STYLE_CASTS 1
+# define _STLP_NO_METHOD_SPECIALIZATION 1
+# if ( __SUNPRO_CC > 0x401 )
+# if (__SUNPRO_CC==0x410)
+# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
+# endif
+# else
+ // SUNPro C++ 4.0.1
+# define _STLP_BASE_MATCH_BUG 1
+# define _STLP_BASE_TYPEDEF_BUG 1
+# if (( __SUNPRO_CC < 0x401 ) && !defined(__SUNPRO_C))
+ __GIVE_UP_WITH_STL(SUNPRO_401)
+# endif
+# endif /* 4.0.1 */
+# endif /* 4.2 */
+#endif /* < 5.0 */
+
+#ifndef _MBSTATET_H
+# define _MBSTATET_H
+# undef _MBSTATE_T
+# define _MBSTATE_T
+typedef struct __mbstate_t {
+# if defined(_LP64)
+ long __filler[4];
+# else
+ int __filler[6];
+# endif
+} __mbstate_t;
+# ifndef _STLP_HAS_NO_NAMESPACES
+namespace std {
+ typedef __mbstate_t mbstate_t;
+}
+using std::mbstate_t;
+# else
+typedef __mbstate_t mbstate_t;
+# endif
+#endif /* __MBSTATET_H */
+
+#if !defined(_STLP_HAS_NO_NEW_C_HEADERS) && !defined(_STLP_NO_NEW_C_HEADERS)
+/* Since Sun Studio uses <iso/stdlib_iso.h>, we are at its
+ * mercy. GCC is built on top of <stdlib.h>. */
+#define _STLP_NO_VENDOR_STDLIB_L
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_system.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_system.h
new file mode 100644
index 0000000..c0b4add
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_system.h
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/*
+ * Purpose of this file :
+ *
+ * To hold COMPILER-SPECIFIC portion of STLport settings.
+ * In general, user should not edit this file unless
+ * using the compiler not recognized below.
+ *
+ * If your compiler is not being recognized yet,
+ * please look for definitions of macros in stl_mycomp.h,
+ * copy stl_mycomp.h to stl_YOUR_COMPILER_NAME,
+ * adjust flags for your compiler, and add <include config/stl_YOUR_COMPILER_NAME>
+ * to the secton controlled by unique macro defined internaly by your compiler.
+ *
+ * To change user-definable settings, please edit <user_config.h>
+ *
+ */
+
+#ifndef __stl_config__system_h
+#define __stl_config__system_h
+
+#if defined (__sun)
+# include <stl/config/_solaris.h>
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# elif defined (__SUNPRO_CC) || defined (__SUNPRO_C)
+# include <stl/config/_sunprocc.h>
+/*
+# ifdef __KCC
+# include <stl/config/_kai.h>
+# endif
+*/
+# elif defined (__APOGEE__) /* Apogee 4.x */
+# include <stl/config/_apcc.h>
+# elif defined (__FCC_VERSION) /* Fujitsu Compiler, v4.0 assumed */
+# include <stl/config/_fujitsu.h>
+# endif
+#elif defined (__hpux)
+# include <stl/config/_hpux.h>
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# elif defined (__HP_aCC)
+# include <stl/config/_hpacc.h>
+# endif
+#elif defined (ANDROID)
+/* Android mobile phone platform. Somewhat but not entirely GNU/Linux-like */
+# include <stl/config/_android.h>
+#elif defined (linux) || defined (__linux__)
+# include <stl/config/_linux.h>
+# if defined (__BORLANDC__)
+# include <stl/config/_bc.h> /* Borland C++ 0x570 */
+/* Intel's icc define __GNUC__! */
+# elif defined (__INTEL_COMPILER)
+# include <stl/config/_icc.h>
+# elif defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# endif
+/*
+# ifdef __KCC
+# include <stl/config/_kai.h>
+# endif
+*/
+#elif defined (__FreeBSD__)
+# include <stl/config/_freebsd.h>
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# endif
+#elif defined (__OpenBSD__)
+# include <stl/config/_openbsd.h>
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# endif
+#elif defined (__sgi) /* IRIX? */
+# define _STLP_PLATFORM "SGI Irix"
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# else
+# include <stl/config/_sgi.h>
+# endif
+#elif defined (__OS400__) /* AS/400 C++ */
+# define _STLP_PLATFORM "OS 400"
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# else
+# include <stl/config/_as400.h>
+# endif
+#elif defined (_AIX)
+# include <stl/config/_aix.h>
+# if defined (__xlC__) || defined (__IBMC__) || defined ( __IBMCPP__ )
+ /* AIX xlC, Visual Age C++ , OS-390 C++ */
+# include <stl/config/_ibm.h>
+# endif
+#elif defined (_CRAY) /* Cray C++ 3.4 or 3.5 */
+# define _STLP_PLATFORM "Cray"
+# include <config/_cray.h>
+#elif defined (__DECCXX) || defined (__DECC)
+# define _STLP_PLATFORM "DECC"
+# ifdef __vms
+# include <stl/config/_dec_vms.h>
+# else
+# include <stl/config/_dec.h>
+# endif
+#elif defined (macintosh) || defined (_MAC)
+# include <stl/config/_mac.h>
+# if defined (__MWERKS__)
+# include <stl/config/_mwerks.h>
+# endif
+#elif defined (__APPLE__)
+# include <stl/config/_macosx.h>
+# ifdef __GNUC__
+# include <stl/config/_gcc.h>
+# endif
+#elif defined (__CYGWIN__)
+# include <stl/config/_cygwin.h>
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# endif
+#elif defined (__MINGW32__)
+# define _STLP_PLATFORM "MinGW"
+# if defined (__GNUC__)
+# include <stl/config/_gcc.h>
+# endif
+# include <stl/config/_windows.h>
+#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) || \
+ defined (__WIN16) || defined (WIN16) || defined (_WIN16)
+# if defined ( __BORLANDC__ ) /* Borland C++ / CodeGear C++ */
+# include <stl/config/_bc.h>
+# elif defined (__WATCOM_CPLUSPLUS__) || defined (__WATCOMC__) /* Watcom C++ */
+# include <stl/config/_watcom.h>
+# elif defined (__COMO__) || defined (__COMO_VERSION_)
+# include <stl/config/_como.h>
+# elif defined (__DMC__) /* Digital Mars C++ */
+# include <stl/config/_dm.h>
+# elif defined (__ICL) /* Intel reference compiler for Win */
+# include <stl/config/_intel.h>
+# elif defined (__MWERKS__)
+# include <stl/config/_mwerks.h>
+# elif defined (_MSC_VER) && (_MSC_VER >= 1200) && defined (UNDER_CE)
+ /* Microsoft eMbedded Visual C++ 3.0, 4.0 (.NET) */
+# include <stl/config/_evc.h>
+# elif defined (_MSC_VER)
+ /* Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0 */
+# include <stl/config/_msvc.h>
+# endif
+
+# include <stl/config/_windows.h>
+#else
+# error Unknown platform !!
+#endif
+
+#if !defined (_STLP_COMPILER)
+/* Unable to identify the compiler, issue error diagnostic.
+ * Edit <config/stl_mycomp.h> to set STLport up for your compiler. */
+# include <stl/config/stl_mycomp.h>
+#endif
+
+#endif /* __stl_config__system_h */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_warnings_off.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_warnings_off.h
new file mode 100644
index 0000000..77e9815
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_warnings_off.h
@@ -0,0 +1,51 @@
+/* This header turns off warnings that STLport headers generate for compiled
+ * user code.
+ */
+
+#if defined (_STLP_MSVC)
+# if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
+ defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+/*
+ * 31/07/2004: dums - now that we do not export the basic_string class anymore but only a base class
+ * we have to disable this warning as the string are used as data members type of many iostream classes.
+ */
+# pragma warning ( disable : 4251 ) // ignore template classes being exported in .dll's
+# endif
+
+# if (_STLP_MSVC < 1300) // VC6, eVC3, eVC4
+# pragma warning( disable : 4097 ) // typedef-name used as based class of (...)
+# pragma warning( disable : 4231 ) // non standard extension : 'extern' before template instanciation
+# pragma warning( disable : 4244 ) // implicit conversion: possible loss of data
+# pragma warning( disable : 4284 ) // for -> operator
+//This warning is necessary because of the native platform headers:
+# pragma warning( disable : 4290 ) // c++ exception specification ignored
+# pragma warning( disable : 4514 ) // unreferenced inline function has been removed
+# pragma warning( disable : 4660 ) // template-class specialization '...' is already instantiated
+# pragma warning( disable : 4701 ) // local variable '...' may be used without having been initialized
+# pragma warning( disable : 4710 ) // function (...) not inlined
+# pragma warning( disable : 4786 ) // identifier truncated to 255 characters
+# endif
+
+# if (_STLP_MSVC < 1400)
+# pragma warning( disable : 4511 ) // copy constructor cannot be generated
+# endif
+
+//Pool of common warnings for all MSVC supported versions:
+//Many are only useful if warning level is set to 4.
+# pragma warning( disable : 4100 ) // unreferenced formal parameter
+# pragma warning( disable : 4127 ) // conditional expression is constant
+# pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned
+# pragma warning( disable : 4245 ) // conversion from 'enum ' to 'unsigned int', signed/unsigned mismatch
+# pragma warning( disable : 4355 ) // this used in base member initializer list (used in rope implementation)
+# pragma warning( disable : 4510 ) // default constructor cannot be generated
+# pragma warning( disable : 4512 ) // assignment operator could not be generated
+# pragma warning( disable : 4571 ) // catch(...) blocks compiled with /EHs do not catch or re-throw Structured Exceptions
+# pragma warning( disable : 4610 ) // struct '...' can never be instantiated - user defined construtor required
+#elif defined (__BORLANDC__)
+# pragma option -w-ccc // -w-8008 Condition is always true OR Condition is always false
+# pragma option -w-inl // -w-8027 Functions containing reserved words are not expanded inline
+# pragma option -w-ngu // -w-8041 Negating unsigned value
+# pragma option -w-pow // -w-8062 Previous options and warnings not restored
+# pragma option -w-rch // -w-8066 Unreachable code
+# pragma option -w-par // -w-8057 Parameter 'parameter' is never used
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_watcom.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_watcom.h
new file mode 100644
index 0000000..b0d2def
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_watcom.h
@@ -0,0 +1,151 @@
+// STLport configuration file
+// It is internal STLport header - DO NOT include it directly
+
+#define _STLP_COMPILER "Watcom"
+
+#if (__WATCOMC__ < 1250)
+# error Not supported!
+#endif
+
+#ifndef _CPPRTTI
+# define _STLP_NO_RTTI 1
+#endif
+
+// for switches (-xs, -xss, -xst)
+#if !(defined (__SW_XS) || defined (__SW_XSS) || defined(__SW_XST))
+# define _STLP_HAS_NO_EXCEPTIONS 1
+#endif
+
+#if defined (_MT) && !defined (_NOTHREADS)
+# define _STLP_THREADS 1
+#endif
+
+#define _STLP_NO_VENDOR_STDLIB_L
+#define _STLP_NO_VENDOR_MATH_F
+#define _STLP_NO_VENDOR_MATH_L
+
+#define _STLP_LONG_LONG long long
+
+#define _STLP_CALL __cdecl
+#define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
+
+#define _STLP_NO_CONST_IN_PAIR
+
+//#define _STLP_DONT_USE_PRIV_NAMESPACE
+//#define _STLP_NO_MOVE_SEMANTIC
+//#define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
+#define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE
+
+#define _STLP_NO_RELOPS_NAMESPACE
+
+#define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+#define _STLP_NO_STATIC_CONST_DEFINITION
+
+//#define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
+#define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
+//#define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+
+#define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+#define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+//#define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+//#define _STLP_NO_MEMBER_TEMPLATES 1
+//#define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+
+//#define _STLP_LIMITED_DEFAULT_TEMPLATES 1
+//#define _STLP_HAS_NO_NAMESPACES 1
+//#define _STLP_NEED_TYPENAME 1
+
+#define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
+
+//#define _STLP_STATIC_CONST_INIT_BUG 1
+// #define _STLP_THROW_RETURN_BUG 1
+//#define _STLP_NO_TEMPLATE_CONVERSIONS 1
+
+#define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
+
+#define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
+#define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+
+//#define _STLP_NONTEMPL_BASE_MATCH_BUG
+//#define _STLP_NO_EXCEPTION_HEADER 1
+#define _STLP_NO_BAD_ALLOC 1
+
+//#define _STLP_NO_TYPENAME_ON_RETURN_TYPE
+//#define _STLP_NESTED_TYPE_PARAM_BUG 1
+
+//#define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
+
+#define _STLP_NO_ARROW_OPERATOR 1
+// This one is present in 11, but apparently has bugs (with auto_ptr).
+//#define _STLP_NO_NEW_STYLE_CASTS 1
+
+// Get rid of Watcom's min and max macros
+#undef min
+#undef max
+
+// On QNX, headers are supposed to be found in /usr/include,
+// so default "../include" should work.
+#ifndef __QNX__
+# define _STLP_NATIVE_INCLUDE_PATH ../h
+#else
+// boris : is this true or just the header is not in /usr/include ?
+# define _STLP_NO_TYPEINFO 1
+#endif
+
+// Inline replacements for locking calls under Watcom
+// Define _STLP_NO_WATCOM_INLINE_INTERLOCK to keep using
+// standard WIN32 calls
+// Define _STL_MULTIPROCESSOR to enable lock
+#define _STLP_NO_WATCOM_INLINE_INTERLOCK
+#if !defined(_STLP_NO_WATCOM_INLINE_INTERLOCK)
+
+long __stl_InterlockedIncrement( long *var );
+long __stl_InterlockedDecrement( long *var );
+
+#ifdef _STL_MULTIPROCESSOR
+// Multiple Processors, add lock prefix
+#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
+ ".586" \
+ "mov eax, 1" \
+ "lock xadd [ecx], eax" \
+ "inc eax" \
+ value [eax];
+
+
+#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
+ ".586" \
+ "mov eax, 0FFFFFFFFh" \
+ "lock xadd [ecx], eax" \
+ "dec eax" \
+ value [eax];
+#else
+// Single Processor, lock prefix not needed
+#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
+ ".586" \
+ "mov eax, 1" \
+ "xadd [ecx], eax" \
+ "inc eax" \
+ value [eax];
+
+#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
+ ".586" \
+ "mov eax, 0FFFFFFFFh" \
+ "xadd [ecx], eax" \
+ "dec eax" \
+ value [eax];
+#endif // _STL_MULTIPROCESSOR
+
+long __stl_InterlockedExchange( long *Destination, long Value );
+
+// xchg has auto-lock
+#pragma aux __stl_InterlockedExchange parm [ecx] [eax] = \
+ ".586" \
+ "xchg eax, [ecx]" \
+ value [eax];
+
+# define _STLP_ATOMIC_INCREMENT(__x) __stl_InterlockedIncrement((long*)__x)
+# define _STLP_ATOMIC_DECREMENT(__x) __stl_InterlockedDecrement((long*)__x)
+# define _STLP_ATOMIC_EXCHANGE(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y)
+# define _STLP_ATOMIC_EXCHANGE_PTR(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y)
+#endif /* INLINE INTERLOCK */
+
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/_windows.h b/6/sources/cxx-stl/stlport/stlport/stl/config/_windows.h
new file mode 100644
index 0000000..6b42e11
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/_windows.h
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_INTERNAL_WINDOWS_H
+#define _STLP_INTERNAL_WINDOWS_H
+
+#if !defined (_STLP_PLATFORM)
+# define _STLP_PLATFORM "Windows"
+#endif
+
+#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
+# if defined (_MIPSEB)
+# define _STLP_BIG_ENDIAN 1
+# endif
+# if defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
+ defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
+ defined (__alpha__)
+# define _STLP_LITTLE_ENDIAN 1
+# endif
+# if defined (__ia64__)
+ /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */
+# if defined (__BIG_ENDIAN__)
+# define _STLP_BIG_ENDIAN 1
+# else
+# define _STLP_LITTLE_ENDIAN 1
+# endif
+# endif
+#endif /* _STLP_BIG_ENDIAN */
+
+#if !defined (_STLP_WINDOWS_H_INCLUDED)
+# define _STLP_WINDOWS_H_INCLUDED
+# if defined (__BUILDING_STLPORT)
+# include <stl/config/_native_headers.h>
+/* Here we define _STLP_OUTERMOST_HEADER_ID to avoid indirect inclusion
+ * of STLport stuffs from C/C++ Standard headers exposed by STLport
+ * as configuration is not yet completed. */
+# if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x100
+# endif
+# if !defined (WIN32_LEAN_AND_MEAN)
+# define WIN32_LEAN_AND_MEAN
+# endif
+# if !defined (VC_EXTRALEAN)
+# define VC_EXTRALEAN
+# endif
+/* Don't let windows.h define its min and max macros. */
+# if !defined (NOMINMAX)
+# define NOMINMAX
+# endif
+# if !defined (STRICT)
+# define STRICT
+# endif
+# if defined (_STLP_USE_MFC)
+# include <afx.h>
+# else
+# include <windows.h>
+# endif
+# if (_STLP_OUTERMOST_HEADER_ID == 0x100)
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+# else
+/* This section serves as a replacement for windows.h header. */
+# if defined (__cplusplus)
+extern "C" {
+# endif
+# if (defined (_M_AMD64) || defined (_M_IA64) || (!defined (_STLP_WCE) && defined (_M_MRX000)) || defined (_M_ALPHA) || \
+ (defined (_M_PPC) && (_STLP_MSVC_LIB >= 1000))) && !defined (RC_INVOKED)
+# define InterlockedIncrement _InterlockedIncrement
+# define InterlockedDecrement _InterlockedDecrement
+# define InterlockedExchange _InterlockedExchange
+# define _STLP_STDCALL
+# else
+# if defined (_MAC)
+# define _STLP_STDCALL _cdecl
+# else
+# define _STLP_STDCALL __stdcall
+# endif
+# endif
+
+# if defined (_STLP_NEW_PLATFORM_SDK)
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *);
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *);
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long);
+# if defined (_WIN64)
+_STLP_IMPORT_DECLSPEC void* _STLP_STDCALL _InterlockedExchangePointer(void* volatile *, void*);
+# endif
+# elif !defined (_STLP_WCE)
+/* boris : for the latest SDK, you may actually need the other version of the declaration (above)
+ * even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ...
+ */
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*);
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*);
+_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long);
+# else
+/* start of eMbedded Visual C++ specific section */
+# include <stl/config/_native_headers.h>
+
+/* Don't let windef.h define its min and max macros. */
+# if !defined (NOMINMAX)
+# define NOMINMAX
+# endif
+# include <windef.h> /* needed for basic windows types */
+
+ /** in SDKs generated with PB5, windef.h somehow includes headers which then
+ define setjmp. */
+# if (_WIN32_WCE >= 0x500)
+# define _STLP_NATIVE_SETJMP_H_INCLUDED
+# endif
+
+# ifndef _WINBASE_ /* winbase.h already included? */
+long WINAPI InterlockedIncrement(long*);
+long WINAPI InterlockedDecrement(long*);
+long WINAPI InterlockedExchange(long*, long);
+# endif
+
+# ifndef __WINDOWS__ /* windows.h already included? */
+
+# if defined (x86)
+# include <winbase.h> /* needed for inline versions of Interlocked* functions */
+# endif
+
+# ifndef _MFC_VER
+
+# define MessageBox MessageBoxW
+int WINAPI MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
+
+# define wvsprintf wvsprintfW
+int WINAPI wvsprintfW(LPWSTR, LPCWSTR, va_list ArgList);
+
+void WINAPI ExitThread(DWORD dwExitCode);
+
+# if !defined (COREDLL)
+# define _STLP_WCE_WINBASEAPI DECLSPEC_IMPORT
+# else
+# define _STLP_WCE_WINBASEAPI
+# endif
+
+_STLP_WCE_WINBASEAPI int WINAPI
+MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
+ int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
+
+_STLP_WCE_WINBASEAPI UINT WINAPI GetACP();
+
+_STLP_WCE_WINBASEAPI BOOL WINAPI TerminateProcess(HANDLE hProcess, DWORD uExitCode);
+
+# define OutputDebugString OutputDebugStringW
+void WINAPI OutputDebugStringW(LPCWSTR);
+
+_STLP_WCE_WINBASEAPI void WINAPI Sleep(DWORD);
+
+# undef _STLP_WCE_WINBASEAPI
+
+# endif /* !_MFC_VER */
+
+# endif /* !__WINDOWS__ */
+
+/* end of eMbedded Visual C++ specific section */
+# endif
+
+# if !defined (_STLP_WCE)
+_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long);
+_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char* lpOutputString);
+# endif
+
+# if defined (InterlockedIncrement)
+# pragma intrinsic(_InterlockedIncrement)
+# pragma intrinsic(_InterlockedDecrement)
+# pragma intrinsic(_InterlockedExchange)
+# if defined (_WIN64)
+# pragma intrinsic(_InterlockedExchangePointer)
+# endif
+# endif
+# if defined (__cplusplus)
+} /* extern "C" */
+# endif
+
+# endif
+
+/* Here we use a macro different than the InterlockedExchangePointer SDK one
+ * to avoid macro definition conflict. */
+# if !defined (_WIN64)
+/* Under 32 bits platform we rely on a simple InterlockedExchange call. */
+# if defined (__cplusplus)
+/* We do not define this function if we are not in a C++ translation unit just
+ * because of the 'inline' keyword portability issue it would introduce. We will
+ * have to fix it the day we need this function for a C translation unit.
+ */
+inline
+void* _STLP_CALL STLPInterlockedExchangePointer(void* volatile* __a, void* __b) {
+# if defined (_STLP_MSVC)
+/* Here MSVC produces warning if 64 bits portability issue is activated.
+ * MSVC do not see that _STLP_ATOMIC_EXCHANGE_PTR is a macro which content
+ * is based on the platform, Win32 or Win64
+ */
+# pragma warning (push)
+# pragma warning (disable : 4311) // pointer truncation from void* to long
+# pragma warning (disable : 4312) // conversion from long to void* of greater size
+# endif
+# if !defined (_STLP_NO_NEW_STYLE_CASTS)
+ return reinterpret_cast<void*>(InterlockedExchange(reinterpret_cast<long*>(const_cast<void**>(__a)),
+ reinterpret_cast<long>(__b)));
+# else
+ return (void*)InterlockedExchange((long*)__a, (long)__b);
+# endif
+# if defined (_STLP_MSVC)
+# pragma warning (pop)
+# endif
+}
+# endif
+# else
+# define STLPInterlockedExchangePointer _InterlockedExchangePointer
+# endif
+
+#endif /* _STLP_WINDOWS_H_INCLUDED */
+
+/* _STLP_WIN95_LIKE signal the Windows 95 OS or assimilated Windows OS version that
+ * has Interlockeded[Increment, Decrement] Win32 API functions not returning modified
+ * value.
+ */
+#if (defined (WINVER) && (WINVER < 0x0410) && (!defined (_WIN32_WINNT) || (_WIN32_WINNT < 0x400))) || \
+ (!defined (WINVER) && (defined (_WIN32_WINDOWS) && (_WIN32_WINDOWS < 0x0410) || \
+ (defined (_WIN32_WINNT) && (_WIN32_WINNT < 0x400))))
+# define _STLP_WIN95_LIKE
+#endif
+
+/* Between Windows 95 (0x400) and later Windows OSes an API enhancement forces us
+ * to change _Refcount_Base internal struct. As _Refcount_base member methods might
+ * be partially inlined we need to check that STLport build/use are coherent. To do
+ * so we try to generate a link time error thanks to the following macro.
+ * This additional check is limited to old compilers that might still be used with
+ * Windows 95. */
+#if (defined (_DEBUG) || defined (_STLP_DEBUG)) && \
+ (defined (_STLP_MSVC) && (_STLP_MSVC < 1310) || \
+ defined (__GNUC__) && (__GNUC__ < 3))
+/* We invert symbol names based on macro detection, when building for Windows
+ * 95 we expose a
+ * building_for_windows95_or_previous_but_library_built_for_windows98_or_later
+ * function in order to have a more obvious link error message signaling how
+ * the lib has been built and how it is used. */
+# if defined (__BUILDING_STLPORT)
+# if defined (_STLP_WIN95_LIKE)
+# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98
+# else
+# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95
+# endif
+# else
+# if defined (_STLP_WIN95_LIKE)
+# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98
+# else
+# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95
+# endif
+# endif
+#endif
+
+#if defined (__WIN16) || defined (WIN16) || defined (_WIN16)
+# define _STLP_WIN16
+#else
+# define _STLP_WIN32
+#endif
+
+#if defined(_STLP_WIN32)
+# define _STLP_USE_WIN32_IO /* CreateFile/ReadFile/WriteFile */
+#endif
+
+#if defined(__MINGW32__) && !defined(_STLP_USE_STDIO_IO)
+# define _STLP_USE_WIN32_IO /* CreateFile/ReadFile/WriteFile */
+#endif /* __MINGW32__ */
+
+#ifdef _STLP_WIN16
+# define _STLP_USE_UNIX_EMULATION_IO /* _open/_read/_write */
+# define _STLP_LDOUBLE_80
+#endif
+
+#endif /* _STLP_INTERNAL_WINDOWS_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/compat.h b/6/sources/cxx-stl/stlport/stlport/stl/config/compat.h
new file mode 100644
index 0000000..434f314
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/compat.h
@@ -0,0 +1,80 @@
+
+/*
+ * Compatibility section
+ * This section sets new-style macros based on old-style ones, for compatibility
+ */
+
+#if defined (__STL_DEBUG) && !defined (_STLP_DEBUG)
+# define _STLP_DEBUG __STL_DEBUG
+#endif
+#if defined (__STL_NO_ANACHRONISMS) && !defined (_STLP_NO_ANACHRONISMS)
+# define _STLP_NO_ANACHRONISMS __STL_NO_ANACHRONISMS
+#endif
+#if defined (__STL_NO_EXTENSIONS) && !defined (_STLP_NO_EXTENSIONS)
+# define _STLP_NO_EXTENSIONS __STL_NO_EXTENSIONS
+#endif
+#if defined (__STL_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS)
+# define _STLP_NO_EXCEPTIONS __STL_NO_EXCEPTIONS
+#endif
+#if defined (__STL_NO_NAMESPACES) && !defined (_STLP_NO_NAMESPACES)
+# define _STLP_NO_NAMESPACES __STL_NO_NAMESPACES
+#endif
+#if defined (__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
+# define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS __STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS
+#endif
+#if defined (__STL_NO_OWN_NAMESPACE) && !defined (_STLP_NO_OWN_NAMESPACE)
+# define _STLP_NO_OWN_NAMESPACE __STL_NO_OWN_NAMESPACE
+#endif
+
+#if defined (__STL_NO_RELOPS_NAMESPACE) && !defined (_STLP_NO_RELOPS_NAMESPACE)
+# define _STLP_NO_RELOPS_NAMESPACE __STL_NO_RELOPS_NAMESPACE
+#endif
+
+#if defined (__STL_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_UNINITIALIZED)
+# define _STLP_DEBUG_UNINITIALIZED __STL_DEBUG_UNINITIALIZED
+#endif
+#if defined (__STL_SHRED_BYTE) && !defined (_STLP_SHRED_BYTE)
+# define _STLP_SHRED_BYTE __STL_SHRED_BYTE
+#endif
+#if defined (__STL_USE_MFC) && !defined (_STLP_USE_MFC)
+# define _STLP_USE_MFC __STL_USE_MFC
+#endif
+
+#if defined (__STL_USE_NEWALLOC) && !defined (_STLP_USE_NEWALLOC)
+# define _STLP_USE_NEWALLOC __STL_USE_NEWALLOC
+#endif
+#if defined (__STL_USE_MALLOC) && !defined (_STLP_USE_MALLOC)
+# define _STLP_USE_MALLOC __STL_USE_MALLOC
+#endif
+
+#if defined (__STL_DEBUG_ALLOC) && !defined (_STLP_DEBUG_ALLOC)
+# define _STLP_DEBUG_ALLOC __STL_DEBUG_ALLOC
+#endif
+
+#if defined (__STL_DEBUG_MESSAGE) && !defined (_STLP_DEBUG_MESSAGE)
+# define _STLP_DEBUG_MESSAGE __STL_DEBUG_MESSAGE
+#endif
+
+#if defined (__STL_DEBUG_TERMINATE) && !defined (_STLP_DEBUG_TERMINATE)
+# define _STLP_DEBUG_TERMINATE __STL_DEBUG_TERMINATE
+#endif
+
+#if defined (__STL_USE_ABBREVS) && !defined (_STLP_USE_ABBREVS)
+# define _STLP_USE_ABBREVS __STL_USE_ABBREVS
+#endif
+
+#if defined (__STL_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_NO_MSVC50_COMPATIBILITY)
+# define _STLP_NO_MSVC50_COMPATIBILITY __STL_NO_MSVC50_COMPATIBILITY
+#endif
+
+/* STLport do not support anymore the iostream wrapper mode so this macro should
+ * always been define for other libraries that was using it:
+ */
+#if !defined (_STLP_OWN_IOSTREAMS)
+# define _STLP_OWN_IOSTREAMS
+#endif
+
+#if defined (_STLP_NO_OWN_IOSTREAMS)
+# error STLport do not support anymore the wrapper mode. If you want to use STLport \
+use its iostreams implementation or no iostreams at all.
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/features.h b/6/sources/cxx-stl/stlport/stlport/stl/config/features.h
new file mode 100644
index 0000000..b5b4e3a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/features.h
@@ -0,0 +1,1079 @@
+ /*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_FEATURES_H
+#define _STLP_FEATURES_H
+
+/*
+ * Purpose of this file:
+ *
+ * Defines all STLport settings.
+ * This file is actually a wrapper : it includes compiler-specific
+ * settings from <config/stlcomp.h>
+ * and user-defined settings from <config/user_config.h>.
+ * See <config/stl_mycomp.h> and <config/user_config.h> for the description
+ * of those macros
+ *
+ */
+
+/* Definition of the STLport version informations */
+#include <stl/_stlport_version.h>
+
+/* Other macros defined by this file:
+
+ * bool, true, and false, if _STLP_NO_BOOL is defined.
+ * typename, as a null macro if it's not already a keyword.
+ * explicit, as a null macro if it's not already a keyword.
+ * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
+ * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
+ * _STLP_ASSERT, either as a test or as a null macro, depending on
+ whether or not _STLP_ASSERTIONS is defined.
+*/
+
+/* Definition of the 2 STLport debug levels */
+#define _STLP_STLPORT_DBG_LEVEL 1
+#define _STLP_STANDARD_DBG_LEVEL 2
+
+/* Placeholder for user to override settings.
+ * It could be also used to mask settings from
+ * different directories.
+ */
+#include <stl/config/user_config.h>
+
+#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
+# define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
+#endif
+
+#if defined (__BUILDING_STLPORT)
+/* For the STLport implementation we can use everything:
+ */
+# if defined (_STLP_NO_ANACHRONISMS)
+# undef _STLP_NO_ANACHRONISMS
+# endif
+# if defined (_STLP_NO_EXTENSIONS)
+# undef _STLP_NO_EXTENSIONS
+# endif
+/* Moreover there are things that have no sens:
+ */
+# if defined (_STLP_NO_IOSTREAMS)
+# error If you do not use iostreams you do not need to build the STLport library.
+# endif
+#endif
+
+/* ========================================================= */
+/* This file is used for compatibility; it accepts old-style config
+ switches */
+#include <stl/config/compat.h>
+
+/* Common configuration file for this particular installation. */
+#include <stl/config/host.h>
+
+/* Operational Environment specific */
+#include <stl/config/_system.h>
+
+/* ========================================================= */
+
+/* some fixes to configuration. This also includes modifications
+ * of STLport switches depending on compiler flags,
+ * or settings applicable to a group of compilers, such as
+ * to all who use EDG front-end.
+ */
+#include <stl/config/stl_confix.h>
+
+#if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
+# define _STLP_MEMBER_TEMPLATES 1
+#endif
+
+#if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+# define _STLP_MEMBER_TEMPLATE_CLASSES 1
+#endif
+
+#if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
+# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
+#endif
+
+#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
+#endif
+
+#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
+# define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
+#endif
+
+#if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM)
+# define _STLP_USE_SHORT_STRING_OPTIM 1
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \
+ !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION)
+# define _STLP_USE_CONTAINERS_EXTENSION
+#endif
+
+#if defined (_STLP_USE_CONTAINERS_EXTENSION)
+# define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
+#else
+# define _STLP_TEMPLATE_FOR_CONT_EXT
+#endif
+
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \
+ (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
+# error Sorry but according the STLport settings your compiler can not support the pointer specialization feature.
+#endif
+
+#if defined (_STLP_WHOLE_NATIVE_STD) && defined (_STLP_NO_OWN_NAMESPACE)
+# error Sorry but asking for both STLport to be in the real std namespace and also having STLport import all native std stuff \
+ is invalid, chose one or none.
+#endif
+
+#if defined (_STLP_VERBOSE) && !defined (_STLP_VERBOSE_MODE_SUPPORTED)
+# error Sorry but the verbose mode is not implemented for your compiler.
+#endif
+
+#if defined (_STLP_NO_IOSTREAMS) && \
+ !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC)
+# define _STLP_USE_NEWALLOC
+#endif
+
+#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
+# if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \
+ defined (__hpux) || defined (macintosh) || defined (_MAC)
+# define _STLP_BIG_ENDIAN 1
+# elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
+ defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
+ defined (__alpha__)
+# define _STLP_LITTLE_ENDIAN 1
+# elif defined (__ia64__)
+ /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */
+# if defined (__BIG_ENDIAN__)
+# define _STLP_BIG_ENDIAN 1
+# else
+# define _STLP_LITTLE_ENDIAN 1
+# endif
+# else
+# error "can't determine endianess"
+# endif
+#endif /* _STLP_BIG_ENDIAN */
+
+/* ==========================================================
+ * final workaround tuning based on given flags
+ * ========================================================== */
+
+#ifndef _STLP_UINT32_T
+# define _STLP_UINT32_T unsigned long
+#endif
+#ifndef _STLP_ABORT
+# define _STLP_ABORT() abort()
+#endif
+
+#if !defined (_STLP_HAS_NO_NAMESPACES)
+# if defined _STLP_NO_NAMESPACES
+# undef _STLP_USE_NAMESPACES
+# else
+/* assume it as the default, turn it off later if NO_NAMESPACES selected */
+# undef _STLP_USE_NAMESPACES
+# define _STLP_USE_NAMESPACES 1
+# endif
+#endif
+
+#if defined (_STLP_NO_IOSTREAMS)
+# define _STLP_USE_NO_IOSTREAMS
+#endif
+
+/* Operating system recognition (basic) */
+#if (defined(__unix) || defined(__linux__) || defined(__QNX__) || defined(_AIX) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__Lynx__) || defined(__hpux) || defined(__sgi)) && \
+ !defined (_STLP_UNIX)
+# define _STLP_UNIX 1
+#endif /* __unix */
+
+#if !defined (_STLP_NO_LONG_DOUBLE)
+# define _STLP_LONGEST_FLOAT_TYPE long double
+#else
+# define _STLP_LONGEST_FLOAT_TYPE double
+#endif
+
+/* Native headers access macros */
+#if !defined (_STLP_HAS_INCLUDE_NEXT)
+# include <stl/config/_native_headers.h>
+#endif
+
+/* shared library tune-up */
+
+#if defined (__BUILDING_STLPORT)
+/* if we are rebuilding right now, place everything here */
+# undef _STLP_DESIGNATED_DLL
+# define _STLP_DESIGNATED_DLL 1
+#endif
+
+/* Use own namespace always if possible and not explicitly instructed otherwise */
+#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
+ !defined (_STLP_NO_OWN_NAMESPACE)
+# undef _STLP_USE_OWN_NAMESPACE
+# define _STLP_USE_OWN_NAMESPACE 1
+#else
+# undef _STLP_WHOLE_NATIVE_STD
+#endif
+
+#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
+
+# if defined (_PTHREADS)
+# define _STLP_PTHREADS
+# define _STLP_THREADS
+# endif
+# if defined (_UITHREADS)
+# define _STLP_UITHREADS
+# define _STLP_THREADS
+# endif
+
+# if defined (_STLP_WIN32) && !defined (_STLP_PTHREADS)
+# define _STLP_WIN32THREADS 1
+# elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \
+ !defined(_STLP_PTHREADS)
+# define _STLP_UITHREADS
+# else
+# define _STLP_PTHREADS
+# endif /* __sgi */
+# define _STLP_THREADS_DEFINED
+#endif
+
+#if (defined (_REENTRANT) || defined (_THREAD_SAFE)) && !defined (_STLP_THREADS)
+# define _STLP_THREADS
+#endif
+
+#ifndef _STLP_STATIC_MUTEX
+# define _STLP_STATIC_MUTEX _STLP_mutex_base
+#endif
+
+#if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC)
+# define _STLP_USE_MFC 1
+#endif
+
+#if defined (_STLP_THREADS)
+# define _STLP_VOLATILE volatile
+#else
+# define _STLP_VOLATILE
+#endif
+
+#if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
+# define _STLP_USE_NEW_C_HEADERS
+#endif
+/* disable new-style headers if requested */
+#if defined (_STLP_NO_NEW_C_HEADERS)
+# undef _STLP_USE_NEW_C_HEADERS
+#endif
+
+#if defined (_STLP_BASE_TYPEDEF_BUG)
+# undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG
+# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
+#endif
+
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+# define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
+#endif
+
+/* SUNpro 4.2 inline string literal bug */
+#ifdef _STLP_INLINE_STRING_LITERAL_BUG
+# define _STLP_FIX_LITERAL_BUG(__x) __x = __x;
+#else
+# define _STLP_FIX_LITERAL_BUG(__x)
+#endif
+
+#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
+# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
+# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
+#endif
+
+#if !defined (_STLP_STATIC_ASSERT)
+/* Some compiler support 0 size array so we use negative size array to generate
+ * a compilation time error.
+ */
+# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
+#endif
+
+/* apple mpw exception handling bug */
+#ifndef _STLP_MPWFIX_TRY
+# define _STLP_MPWFIX_TRY
+#endif
+#ifndef _STLP_MPWFIX_CATCH
+# define _STLP_MPWFIX_CATCH
+#endif
+#ifndef _STLP_MPWFIX_CATCH_ACTION
+# define _STLP_MPWFIX_CATCH_ACTION(action)
+#endif
+
+#if !defined (_STLP_WEAK)
+# define _STLP_WEAK
+#endif
+
+/* default parameters as template types derived from arguments ( not always supported ) */
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname
+#else
+# if !defined (_STLP_DEFAULT_TYPE_PARAM)
+# define _STLP_DEFAULT_TYPE_PARAM 1
+# endif
+# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval
+#endif
+
+#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
+# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc
+#else
+# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \
+ class _Alloc = allocator< pair < _Key, _Tp > >
+#endif
+
+/* default parameters as complete types */
+#if defined (_STLP_DEFAULT_TYPE_PARAM)
+# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval
+# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val
+#else
+# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname
+# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name
+#endif
+
+/* SGI compatibility */
+
+#ifdef _STLP_NO_WCHAR_T
+# ifndef _STLP_NO_NATIVE_WIDE_STREAMS
+# define _STLP_NO_NATIVE_WIDE_STREAMS 1
+# endif
+#else
+# define _STLP_HAS_WCHAR_T 1
+#endif
+
+#if !defined (_STLP_NO_AT_MEMBER_FUNCTION)
+# define _STLP_CAN_THROW_RANGE_ERRORS 1
+#endif
+
+/* debug mode tool */
+#if defined (_STLP_DEBUG)
+# define _STLP_NON_DBG_NAME(X) _NonDbg_##X
+#endif
+
+/* pointer specialization tool */
+#if defined (_STLP_USE_PTR_SPECIALIZATIONS)
+# define _STLP_PTR_IMPL_NAME(X) _Impl_##X
+#endif
+
+#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \
+ defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+# define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X
+#endif
+
+/* this always mean the C library is in global namespace */
+#if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD)
+# define _STLP_VENDOR_GLOBAL_CSTD 1
+#endif
+
+/* Depending of whether compiler supports namespaces,
+ * tune the parameters for vendor-supplied libraries.
+ * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES,
+ * since it depends only on the native features, not on user's preference whether
+ * to use namespace for STLport or not.
+ */
+#if !defined (_STLP_HAS_NO_NAMESPACES)
+/* Import some vendor's headers into corresponding STLport ones if they might be needed
+ * (if we wrap native iostreams and use namepace other than std::) */
+# if defined (_STLP_WHOLE_NATIVE_STD)
+# define _STLP_IMPORT_VENDOR_STD 1
+# endif
+
+/* if using stlport:: namespace or if C library stuff is not in vendor's std::,
+ * try importing 'em.
+ * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */
+# if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))
+# define _STLP_IMPORT_VENDOR_CSTD 1
+# endif
+
+# if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)
+# define _STLP_NO_CSTD_FUNCTION_IMPORTS
+# endif
+
+# define _STLP_USING_NAMESPACE(x) using namespace x ;
+
+namespace std { }
+namespace __std_alias = std;
+
+/* assume std:: namespace for C++ std library if not being told otherwise */
+# if defined (_STLP_VENDOR_GLOBAL_STD)
+# define _STLP_VENDOR_STD
+# else
+# define _STLP_VENDOR_STD std
+# endif
+
+/* tune things that come from C library */
+# if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)
+/* in old-style headers, C functions go to global scope. */
+# define _STLP_VENDOR_CSTD
+# define _STLP_USING_VENDOR_CSTD
+# else
+# define _STLP_VENDOR_CSTD _STLP_VENDOR_STD
+# define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)
+# endif /* _STLP_VENDOR_CSTD */
+/* exception, typeinfo, new - always come from the vendor */
+# if !defined (_STLP_VENDOR_EXCEPT_STD)
+# if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD)
+# define _STLP_VENDOR_EXCEPT_STD
+# else
+# define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD
+# endif
+# endif
+# define _STLP_OLD_IO_NAMESPACE
+# if !defined (_STLP_VENDOR_MB_NAMESPACE)
+# define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD
+# endif
+#else
+/* compiler has no namespace support */
+# define _STLP_VENDOR_STD
+# define _STLP_VENDOR_CSTD
+# define _STLP_USING_NAMESPACE(x)
+# define _STLP_USING_VENDOR_CSTD
+# define _STLP_VENDOR_EXCEPT_STD
+#endif
+
+#if defined (_STLP_USE_NAMESPACES)
+
+# if defined (_STLP_USE_OWN_NAMESPACE)
+# if !defined (_STLP_STD_NAME)
+# if !defined (_STLP_DEBUG)
+# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# ifndef _STLP_THREADS
+# define _STLP_STD_NAME stlpmtx_std
+# else
+# define _STLP_STD_NAME stlp_std
+# endif
+# else
+# ifndef _STLP_THREADS
+# define _STLP_STD_NAME stlpxmtx_std
+# else
+# define _STLP_STD_NAME stlpx_std
+# endif
+# endif
+# else
+/*
+ * The STLport debug mode is binary incompatible with the other modes,
+ * lets make it clear on the STLport namespace to generate link errors rather
+ * than runtime ones.
+ */
+# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB)
+# ifndef _STLP_THREADS
+# define _STLP_STD_NAME stlpdmtx_std
+# else
+# define _STLP_STD_NAME stlpd_std
+# endif
+# else
+# ifndef _STLP_THREADS
+# define _STLP_STD_NAME stlpdxmtx_std
+# else
+# define _STLP_STD_NAME stlpdx_std
+# endif
+# endif
+# endif
+# endif
+namespace _STLP_STD_NAME { }
+# else
+# define _STLP_STD_NAME std
+# endif /* _STLP_USE_OWN_NAMESPACE */
+
+# define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME {
+# define _STLP_BEGIN_TR1_NAMESPACE namespace tr1 {
+# define _STLP_END_NAMESPACE }
+
+/* decide whether or not we use separate namespace for rel ops */
+# if defined (_STLP_NO_RELOPS_NAMESPACE)
+# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}
+# define _STLP_END_RELOPS_NAMESPACE }
+# else
+/* Use std::rel_ops namespace */
+# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {
+# define _STLP_END_RELOPS_NAMESPACE } }
+# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+# endif /* Use std::rel_ops namespace */
+
+# define _STLP_STD ::_STLP_STD_NAME
+# if !defined (_STLP_TR1)
+# define _STLP_TR1 _STLP_STD::tr1::
+# endif
+
+# if !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
+# define _STLP_PRIV_NAME priv
+# define _STLP_PRIV _STLP_STD::_STLP_PRIV_NAME::
+# define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME {
+# define _STLP_MOVE_TO_STD_NAMESPACE }
+# else
+# if !defined (_STLP_PRIV)
+# define _STLP_PRIV _STLP_STD::
+# endif
+# define _STLP_MOVE_TO_PRIV_NAMESPACE
+# define _STLP_MOVE_TO_STD_NAMESPACE
+# endif
+
+/* Official STLport namespace when std is not redefined.
+ * Here we don't use a macro because we do not need it and because
+ * stlport is used as file name by boost and folder name under beos:
+ */
+namespace stlport = _STLP_STD_NAME;
+
+/* Backward compatibility:
+ */
+namespace _STL = _STLP_STD_NAME;
+#undef __STLPORT_NAMESPACE
+#define __STLPORT_NAMESPACE _STLP_STD_NAME
+
+#else /* _STLP_USE_NAMESPACES */
+/* STLport is being put into global namespace */
+# define _STLP_STD
+# define _STLP_PRIV
+# define _STLP_TR1
+# define _STLP_BEGIN_NAMESPACE
+# define _STLP_BEGIN_TR1_NAMESPACE
+# define _STLP_END_NAMESPACE
+# define _STLP_MOVE_TO_PRIV_NAMESPACE
+# define _STLP_MOVE_TO_STD_NAMESPACE
+
+/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+ causes less problems than having relational operator templates in global namespace
+ Please define _STLP_NO_RELOPS_NAMESPACE in config/user_config.h if your code rely on them. */
+# if !defined (_STLP_NO_RELOPS_NAMESPACE)
+# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+# endif
+# define _STLP_BEGIN_RELOPS_NAMESPACE
+# define _STLP_END_RELOPS_NAMESPACE
+# undef _STLP_USE_OWN_NAMESPACE
+#endif /* _STLP_USE_NAMESPACES */
+
+#define STLPORT_CSTD _STLP_VENDOR_CSTD
+#define STLPORT _STLP_STD_NAME
+
+#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)
+# define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>
+#else
+# define _STLP_SIMPLE_TYPE(T) T
+#endif
+
+#ifndef _STLP_RAND48
+# define _STLP_NO_DRAND48
+#endif
+
+/* advanced keywords usage */
+#define __C_CAST(__x, __y) ((__x)(__y))
+#ifndef _STLP_NO_NEW_STYLE_CASTS
+# define __CONST_CAST(__x,__y) const_cast<__x>(__y)
+# define __STATIC_CAST(__x,__y) static_cast<__x>(__y)
+# define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)
+#else
+# define __STATIC_CAST(__x,__y) __C_CAST(__x, __y)
+# define __CONST_CAST(__x,__y) __C_CAST(__x, __y)
+# define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y)
+#endif
+
+#if defined (_STLP_NEED_TYPENAME) && ! defined (typename)
+# define typename
+#endif
+
+#if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )
+# define _STLP_TYPENAME_ON_RETURN_TYPE
+#else
+# define _STLP_TYPENAME_ON_RETURN_TYPE typename
+#endif
+
+#ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
+# define _STLP_HEADER_TYPENAME
+#else
+# define _STLP_HEADER_TYPENAME typename
+#endif
+
+#ifdef _STLP_NO_TYPENAME_BEFORE_NAMESPACE
+# define _STLP_TYPENAME
+#else
+# define _STLP_TYPENAME typename
+#endif
+
+#ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
+# define _STLP_TEMPLATE template
+#else
+# define _STLP_TEMPLATE
+#endif
+
+#if defined (_STLP_USE_CONTAINERS_EXTENSION)
+# define _STLP_KEY_TYPE_FOR_CONT_EXT(type)
+# define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
+#else
+# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT;
+# define _STLP_TEMPLATE_FOR_CONT_EXT
+#endif
+
+#if defined (_STLP_NEED_EXPLICIT) && !defined (explicit)
+# define explicit
+#endif
+
+#if !defined (_STLP_NEED_MUTABLE)
+# define _STLP_MUTABLE(type, x) x
+#else
+# define _STLP_MUTABLE(type, x) __CONST_CAST(type*, this)->x
+# define mutable
+#endif
+
+#if defined (_STLP_NO_SIGNED_BUILTINS)
+/* old HP-UX doesn't understand "signed" keyword */
+# define signed
+#endif
+
+#if defined (_STLP_LOOP_INLINE_PROBLEMS)
+# define _STLP_INLINE_LOOP
+#else
+# define _STLP_INLINE_LOOP inline
+#endif
+
+#ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
+# define _STLP_TEMPLATE_NULL template<>
+#else
+# define _STLP_TEMPLATE_NULL
+#endif
+
+#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
+# define _STLP_OPERATOR_TEMPLATE
+#else
+# define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL
+#endif
+
+#ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
+/* unless we have other compiler problem, try simulating partial spec here */
+# if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
+# define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
+# endif
+/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */
+# if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
+# if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )
+# define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+# endif
+# elif defined ( _STLP_NO_ANACHRONISMS )
+# undef _STLP_USE_OLD_HP_ITERATOR_QUERIES
+# endif
+#endif
+
+#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+# define _STLP_NULL_TMPL_ARGS <>
+# else
+# define _STLP_NULL_TMPL_ARGS
+#endif
+
+#if !defined (_STLP_ALLOCATOR_TYPE_DFL)
+# if defined (_STLP_DONT_SUP_DFLT_PARAM)
+# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
+# endif
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+# define _STLP_ALLOCATOR_TYPE_DFL
+# else
+# define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()
+# endif
+#endif
+
+/* When the compiler do not correctly initialized the basic types value in default parameters we prefer
+ * to avoid them to be able to correct this bug.
+ */
+#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
+# define _STLP_DONT_SUP_DFLT_PARAM 1
+#endif
+
+#if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)
+# define _STLP_NO_ARROW_OPERATOR
+#endif
+
+#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if !(defined (_STLP_NO_ARROW_OPERATOR)) && \
+ !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)
+/* this one is needed for proper reverse_iterator<> operator ->() handling */
+# define _STLP_MSVC50_COMPATIBILITY 1
+# endif
+#endif
+
+#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
+# if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
+# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
+ typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \
+ typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator
+# elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)
+# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
+ typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \
+ typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator
+# else
+# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
+ typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \
+ typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator
+# endif
+#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+# if defined (_STLP_MSVC50_COMPATIBILITY)
+# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
+ typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
+ const_pointer, difference_type> const_reverse_iterator; \
+ typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \
+ reverse_iterator
+# else
+# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
+ typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
+ difference_type> const_reverse_iterator; \
+ typedef _STLP_STD::__reverse_iterator<iterator, value_type, \
+ reference, difference_type> \
+ reverse_iterator
+# endif
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \
+ _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)
+#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \
+ _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)
+
+#define __IMPORT_CONTAINER_TYPEDEFS(_Super) \
+ typedef typename _Super::value_type value_type; \
+ typedef typename _Super::size_type size_type; \
+ typedef typename _Super::difference_type difference_type; \
+ typedef typename _Super::reference reference; \
+ typedef typename _Super::const_reference const_reference; \
+ typedef typename _Super::pointer pointer; \
+ typedef typename _Super::const_pointer const_pointer; \
+ typedef typename _Super::allocator_type allocator_type;
+
+
+#define __IMPORT_ITERATORS(_Super) \
+ typedef typename _Super::iterator iterator; \
+ typedef typename _Super::const_iterator const_iterator;
+
+#define __IMPORT_REVERSE_ITERATORS(_Super) \
+ typedef typename _Super::const_reverse_iterator const_reverse_iterator; \
+ typedef typename _Super::reverse_iterator reverse_iterator;
+
+#define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \
+ __derived_name(const _Super& __x) : _SUPER(__x) {} \
+ _Self& operator=(const _Super& __x) { \
+ *(_Super*)this = __x; \
+ return *this; \
+ } \
+ __derived_name(const _Self& __x) : _SUPER(__x) {} \
+ _Self& operator=(const _Self& __x) { \
+ *(_Super*)this = __x; \
+ return *this; \
+ }
+
+#define __IMPORT_WITH_ITERATORS(_Super) \
+ __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)
+
+#define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \
+ __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)
+
+#if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG)
+# define __TRIVIAL_CONSTRUCTOR(__type) __type() {}
+#else
+# define __TRIVIAL_CONSTRUCTOR(__type)
+#endif
+
+#if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)
+# define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}
+#else
+# define __TRIVIAL_DESTRUCTOR(__type)
+#endif
+
+#define __TRIVIAL_STUFF(__type) \
+ __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)
+
+#if defined (_STLP_STATIC_CONST_INIT_BUG)
+# define _STLP_STATIC_CONSTANT(__type, __assignment) enum { __assignment }
+#else
+# define _STLP_STATIC_CONSTANT(__type, __assignment) static const __type __assignment
+#endif
+
+#if defined (_STLP_HAS_NO_EXCEPTIONS)
+# define _STLP_NO_EXCEPTIONS
+#endif
+
+#if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS)
+# define _STLP_USE_EXCEPTIONS
+#endif
+
+#if defined (_STLP_USE_EXCEPTIONS)
+# define _STLP_TRY try
+# define _STLP_CATCH_ALL catch(...)
+# ifndef _STLP_THROW
+# define _STLP_THROW(x) throw x
+# endif
+# define _STLP_RETHROW throw
+
+# define _STLP_UNWIND(action) catch(...) { action; throw; }
+
+# ifdef _STLP_THROW_RETURN_BUG
+# define _STLP_RET_AFTER_THROW(data) return data;
+# else
+# define _STLP_RET_AFTER_THROW(data)
+# endif
+
+# if !defined (_STLP_THROWS)
+# define _STLP_THROWS(x) throw(x)
+# endif
+# if !defined (_STLP_NOTHROW)
+# define _STLP_NOTHROW throw()
+# endif
+#else
+# define _STLP_TRY
+# define _STLP_CATCH_ALL if (false)
+# ifndef _STLP_THROW
+# define _STLP_THROW(x)
+# endif
+# define _STLP_RETHROW {}
+# define _STLP_UNWIND(action)
+# define _STLP_THROWS(x)
+# define _STLP_NOTHROW
+# define _STLP_RET_AFTER_THROW(data)
+#endif
+
+/*
+ * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no
+ * exception support but not the _STLP_USE_EXCEPTIONS which simply means
+ * that the user do not want to use them.
+ */
+#if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC)
+# define _STLP_THROWS_INHERENTLY(x) throw x
+# define _STLP_NOTHROW_INHERENTLY throw()
+#else
+# define _STLP_THROWS_INHERENTLY(x)
+# define _STLP_NOTHROW_INHERENTLY
+#endif
+
+/* STLport function not returning are functions that throw so we translate
+ * the noreturn functions in throwing functions taking also into account
+ * exception support activation.
+ */
+#if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \
+ !defined (_STLP_FUNCTION_THROWS)
+# define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION
+#else
+# define _STLP_FUNCTION_THROWS
+#endif
+
+#if defined(_STLP_NO_BOOL)
+# if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)
+# include <isynonym.hpp>
+# if defined (__OS400__)
+typedef int bool;
+# elif !( defined (__xlC__) || defined (_AIX))
+typedef Boolean bool;
+# endif
+# else
+# if defined(_STLP_YVALS_H)
+# include <yvals.h>
+# else
+# if defined (_STLP_DONT_USE_BOOL_TYPEDEF)
+# define bool int
+# else
+typedef int bool;
+# endif
+# define true 1
+# define false 0
+# endif
+# endif /* __IBMCPP__ */
+#else
+# define _STLP_BOOL_KEYWORD 1
+#endif /* _STLP_NO_BOOL */
+
+/* uninitialized value filler */
+#ifndef _STLP_SHRED_BYTE
+/* This value is designed to cause problems if an error occurs */
+# define _STLP_SHRED_BYTE 0xA3
+#endif /* _STLP_SHRED_BYTE */
+
+/* shared library tune-up */
+#ifndef _STLP_IMPORT_DECLSPEC
+# define _STLP_IMPORT_DECLSPEC
+#endif
+
+/* a keyword used to instantiate export template */
+#ifndef _STLP_EXPORT_TEMPLATE_KEYWORD
+# define _STLP_EXPORT_TEMPLATE_KEYWORD
+#endif
+#ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
+# define _STLP_IMPORT_TEMPLATE_KEYWORD
+#endif
+
+#if !defined (_STLP_NO_CONST_IN_PAIR)
+# define _STLP_CONST const
+#else
+# define _STLP_CONST
+#endif
+
+#ifdef _STLP_USE_NO_IOSTREAMS
+/*
+ * If we do not use iostreams we do not use the export/import
+ * techniques to avoid build of the STLport library.
+ */
+# undef _STLP_USE_DECLSPEC
+/* We also undef USE_DYNAMIC_LIB macro as this macro add some code
+ * to use the dynamic (shared) STLport library for some platform/compiler
+ * configuration leading to problem when not linking to the STLport lib.
+ */
+# undef _STLP_USE_DYNAMIC_LIB
+#endif
+
+#if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)
+# if ! defined (_STLP_USE_TEMPLATE_EXPORT)
+/* this setting turns on "extern template" extension use */
+# define _STLP_USE_TEMPLATE_EXPORT
+# endif
+# if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)
+# define _STLP_NO_FORCE_INSTANTIATE
+# endif
+#endif
+
+#if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
+# define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD
+#else
+# define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD
+#endif
+
+#ifndef _STLP_EXPORT_TEMPLATE
+# define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template
+#endif
+
+#if defined (_STLP_USE_DECLSPEC) /* using export/import technique */
+
+# ifndef _STLP_EXPORT_DECLSPEC
+# define _STLP_EXPORT_DECLSPEC
+# endif
+# ifndef _STLP_IMPORT_DECLSPEC
+# define _STLP_IMPORT_DECLSPEC
+# endif
+# ifndef _STLP_CLASS_EXPORT_DECLSPEC
+# define _STLP_CLASS_EXPORT_DECLSPEC
+# endif
+# ifndef _STLP_CLASS_IMPORT_DECLSPEC
+# define _STLP_CLASS_IMPORT_DECLSPEC
+# endif
+# if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
+# define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC
+# define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC
+# else
+# define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */
+# define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC
+# endif
+
+#else /* Not using DLL export/import specifications */
+
+# define _STLP_DECLSPEC
+# define _STLP_CLASS_DECLSPEC
+
+#endif
+
+#define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
+
+#if defined (_STLP_NEED_ADDITIONAL_STATIC_DECLSPEC)
+# define _STLP_STATIC_DECLSPEC _STLP_DECLSPEC
+#else
+# define _STLP_STATIC_DECLSPEC
+#endif
+
+#if !defined (_STLP_CALL)
+# define _STLP_CALL
+#endif
+
+#ifndef _STLP_USE_NO_IOSTREAMS
+
+# if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)
+# define __USE_STD_IOSTREAM
+# endif
+
+/* We only need to expose details of streams implementation
+ if we use non-standard i/o or are building STLport*/
+# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)
+# define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1
+# endif
+
+/* We only need to expose details of global implementation if we are building STLport
+ or have not instantiated everything in the lib */
+# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)
+# undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
+# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1
+# endif
+
+#else /* _STLP_USE_NO_IOSTREAMS */
+/* when we are not using SGI iostreams, we must expose globals, but not streams implementation */
+# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
+#endif /* _STLP_USE_NO_IOSTREAMS */
+
+#ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
+# define _STLP_PSPEC2(t1,t2) < t1,t2 >
+# define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >
+#else
+# define _STLP_PSPEC2(t1,t2) /* nothing */
+# define _STLP_PSPEC3(t1,t2,t3) /* nothing */
+#endif
+
+/* Activation of the partial template workaround:
+ */
+#if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\
+ (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))
+# define _STLP_USE_PARTIAL_SPEC_WORKAROUND
+#endif
+
+#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
+# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \
+_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\
+_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\
+_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\
+_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}
+#else
+# define _STLP_RELOPS_OPERATORS(_TMPL, _TP)
+#endif
+
+#if defined ( _STLP_USE_ABBREVS )
+# include <stl/_abbrevs.h>
+#endif
+
+/* Some really useful macro */
+#define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0])
+#define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0])
+
+#if !defined (_STLP_MARK_PARAMETER_AS_UNUSED)
+# define _STLP_MARK_PARAMETER_AS_UNUSED(X) (void*)X;
+#endif
+
+#if defined (_STLP_CHECK_RUNTIME_COMPATIBILITY)
+# if defined (_STLP_USE_NO_IOSTREAMS)
+# undef _STLP_CHECK_RUNTIME_COMPATIBILITY
+# else
+/* The extern "C" simply makes the symbol simpler. */
+#if defined (__cplusplus)
+extern "C"
+#endif
+void _STLP_DECLSPEC _STLP_CALL _STLP_CHECK_RUNTIME_COMPATIBILITY();
+# endif
+#endif
+
+/* some cleanup */
+#undef _STLP_DONT_USE_BOOL_TYPEDEF
+#undef _STLP_YVALS_H
+#undef _STLP_LOOP_INLINE_PROBLEMS
+#undef _STLP_NEED_EXPLICIT
+#undef _STLP_NEED_TYPENAME
+#undef _STLP_NO_NEW_STYLE_CASTS
+#undef __AUTO_CONFIGURED
+
+#endif /* _STLP_FEATURES_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/host.h b/6/sources/cxx-stl/stlport/stlport/stl/config/host.h
new file mode 100644
index 0000000..b4b6089
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/host.h
@@ -0,0 +1,342 @@
+/*
+ * This file defines site configuration.
+ */
+
+/*
+ * _STLP_NO_THREADS: if defined, STLport don't use any
+ * multithreading support. Synonym is _NOTHREADS
+ */
+/*
+#define _NOTHREADS
+#define _STLP_NO_THREADS
+*/
+
+/* _PTHREADS: if defined, use POSIX threads for multithreading support. */
+/*
+#define _PTHREADS
+*/
+
+/* compatibility section
+ */
+
+#if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS))
+# if !defined (_NOTHREADS)
+# define _NOTHREADS
+# endif
+# if !defined (_STLP_NO_THREADS)
+# define _STLP_NO_THREADS
+# endif
+#endif
+
+#if !defined(_STLP_USE_DYNAMIC_LIB) && !defined(_STLP_USE_STATIC_LIB)
+/*
+ * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library.
+ * NOTE: please do that only if you know what you are doing!
+ * Changing default will require you to change makefiles in "build" accordingly
+ * and to rebuild STLPort library!
+ * On UNIX, this has no effect, see build/lib/README for make tags.
+ * See STLport configuration file (build/lib/configure.bat) for help in building
+ * the require library versions.
+ */
+/*
+#define _STLP_USE_DYNAMIC_LIB
+*/
+
+/*
+ * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library.
+ * NOTE: please do that only if you know what you are doing!
+ * Changing default will require you to change makefile in "build" accordingly
+ * and to rebuild STLPort library!
+ * On UNIX, this has no effect, see build/lib/README for make tags.
+ * See STLport configuration file (build/lib/configure.bat) for help in building
+ * the require library versions.
+ */
+/*
+#define _STLP_USE_STATIC_LIB
+*/
+#endif
+
+/*
+ * Edit relative path below (or put full path) to get native
+ * compiler vendor's headers included. Default is "../include"
+ * for _STLP_NATIVE_INCLUDE_PATH, default for other macros is
+ * _STLP_NATIVE_INCLUDE_PATH.
+ * Hint: never install STLport in the directory that ends with "include"
+ */
+/*
+#undef _STLP_NATIVE_INCLUDE_PATH
+#define _STLP_NATIVE_INCLUDE_PATH ../include
+*/
+/* same for C library headers like <cstring> */
+/*
+#undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
+#define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+*/
+/* same for C headers like <string.h> */
+/*
+#undef _STLP_NATIVE_C_INCLUDE_PATH
+#define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+*/
+/* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */
+/*
+#undef _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH
+#define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
+*/
+
+/*
+ * If namespases available, STLport use own namespace (and masquerade
+ * it as std). Disable own namespace may cause undefined behaviour.
+ */
+/*
+#define _STLP_NO_OWN_NAMESPACE 1
+*/
+
+/*
+ * Uncomment _STLP_LEAKS_PEDANTIC to force deallocation of ALL allocated
+ * memory chunks. Normally not required. But if you worry about quazi-leaks
+ * (may be reported by some leaks detection tools), use
+ * _STLP_LEAKS_PEDANTIC. It should be used with _STLP_USE_NEWALLOC or
+ * _STLP_USE_MALLOC (see below), the default node_alloc allocator also clean
+ * its internal memory pool but only if STLport is used as a dynamic library
+ * under Win32 (using MSVC like compilers).
+ */
+/*
+#define _STLP_LEAKS_PEDANTIC 1
+*/
+
+/*
+ * Uncomment _STLP_USE_NEWALLOC to force allocator<T> to use plain "new"
+ * instead of STLport optimized node allocator engine.
+ */
+/*
+#define _STLP_USE_NEWALLOC 1
+*/
+
+/*
+ * Uncomment _STLP_USE_MALLOC to force allocator<T> to use plain "malloc"
+ * instead of STLport optimized node allocator engine.
+ *
+ * This is default allocator for glibc 2.3.x and later, if not mentioned other
+ */
+/*
+#define _STLP_USE_MALLOC 1
+*/
+
+/*
+ * Uncomment _STLP_USE_PERTHREAD_ALLOC to force allocator<T> to use
+ * a specific implementation targetting the massively multi-threaded
+ * environment. The implementation is based on the POSIX pthread
+ * interface.
+ */
+/*
+#define _STLP_USE_PERTHREAD_ALLOC 1
+*/
+
+/*
+ * Uncomment _STLP_USE_NODE_ALLOC if you want to force allocator<T> to use
+ * "node_alloc" allocator (this is default allocator for STLport, if not
+ * used other above, except glibc 2.3.x and later, where default is
+ * "malloc", due to better results)
+ */
+/*
+#define _STLP_USE_NODE_ALLOC 1
+*/
+
+/*
+ * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging,
+ * such as padding/checking for memory consistency
+ */
+/*
+#define _STLP_DEBUG_ALLOC 1
+*/
+
+/*
+ * For compiler not supporting partial template specialization or ordering of
+ * template functions STLport implement a workaround based on inheritance
+ * detection. This inheritance can introduce trouble in client code when
+ * a user class derived a STL container (which is not advised as STL containers
+ * do not have virtual destructors). To disable this workaround turn this macro on:
+ */
+/*
+#define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1
+*/
+
+/*
+ * Uncomment this to force all debug diagnostic to be directed through a
+ * user-defined global function:
+ * void __stl_debug_message(const char * format_str, ...)
+ * instead of predefined STLport routine.
+ * This allows you to take control of debug message output.
+ * Default routine calls fprintf(stderr,...)
+ * Note : If you set this macro, you must supply __stl_debug_message
+ * function definition somewhere.
+ */
+/*
+#define _STLP_DEBUG_MESSAGE 1
+*/
+
+/*
+ * Uncomment this to force all failed assertions to be executed through
+ * user-defined global function:
+ * void __stl_debug_terminate(void). This allows
+ * you to take control of assertion behaviour for debugging purposes.
+ * Default routine calls _STLP_ABORT().
+ * Note : If you set this macro, you must supply __stl_debug_terminate
+ * function definition somewhere.
+ */
+/*
+#define _STLP_DEBUG_TERMINATE 1
+*/
+
+/*
+ * Uncomment that to disable exception handling code
+ */
+/*
+#define _STLP_DONT_USE_EXCEPTIONS 1
+*/
+
+/*
+ * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace
+ * stlport:: or std::, even if the compiler supports namespaces
+ */
+/*
+#define _STLP_NO_NAMESPACES 1
+*/
+
+/*==========================================================
+ * Compatibility section
+ *==========================================================*/
+
+/*
+ * Use abbreviated class names for linker benefit (don't affect interface).
+ * This option is obsolete, but should work in this release.
+ *
+ */
+/*
+#define _STLP_USE_ABBREVS
+*/
+
+/*
+ * This definition precludes STLport reverse_iterator to be compatible with
+ * other parts of MSVC library. (With partial specialization, it just
+ * has no effect).
+ * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly
+ */
+/*
+#define _STLP_NO_MSVC50_COMPATIBILITY 1
+*/
+
+/*
+ * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type()
+ * for querying iterator properties. Please note those names are non-standard and are not guaranteed
+ * to be used by every implementation. However, this setting is on by default when partial specialization
+ * is not implemented in the compiler and cannot be simulated (only if _STLP_NO_ANACHRONISMS is not set).
+ * Use of those interfaces for user-defined iterators is strongly discouraged:
+ * please use public inheritance from iterator<> template to achieve desired effect.
+ * Second form is to disable old-style queries in any case.
+ */
+/*
+#define _STLP_USE_OLD_HP_ITERATOR_QUERIES
+#define _STLP_NO_OLD_HP_ITERATOR_QUERIES
+*/
+
+
+/*
+ * On systems with support of large files (_LARGEFILE_SOURCE,
+ * _LARGEFILE64_SOURCE defined) we will use 64-bit file offset, even if
+ * __USE_FILE_OFFSET64 or _FILE_OFFSET_BITS not defined or _FILE_OFFSET_BITS
+ * less than 64. In the last case sizeof(std::streamoff) may not be equal to
+ * sizeof(off_t); if you want to force equal size of off_t and streamoff,
+ * uncomment macro below. But pay attention, this has influence on libstlport
+ * and in future usage it may cause conflict with defined _FILE_OFFSET_BITS macro.
+ */
+
+/*
+#define _STLP_USE_DEFAULT_FILE_OFFSET
+*/
+
+/*
+ * _STLP_USE_STDIO_IO, _STLP_USE_UNIX_IO: force selection of stdio calls
+ * (fopen/flose/fread/fwrite) under fstream buffers or unistd calls
+ * (open/close/read/write + mmap). On systems that have both (i.e. most Unixes)
+ * _STLP_USE_UNIX_IO is used.
+ *
+ * There is a third variant for Windows: _STLP_USE_WIN32_IO, that based
+ * on Windows calls (CreateFile/CloseHandle/ReadFile/WriteFile + CreateFileMapping,
+ * MapViewOfFile)
+ *
+ * Uncomment only one define here!
+ */
+/*
+#define _STLP_USE_UNIX_IO
+*/
+/*
+#define _STLP_USE_STDIO_IO
+*/
+/*
+#define _STLP_USE_WIN32_IO
+ */
+
+/*==========================================================================*/
+
+/* This section contains swithes which should be off by default,
+ * but so few compilers would have it undefined, so that we set them here,
+ * with the option to be turned off later in compiler-specific file
+ */
+
+#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
+#define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT
+
+/*==========================================================================*/
+
+#if defined(__sun) && defined(__GNUC__)
+/* __SunOS_5_x is not defined in headers, and there is no way to derive it from headers only;
+ * nevertheless this macro defined automagically by SunPro compilers family;
+ *
+ * gcc know nothing about it, but defining it with -D on compiler command line
+ * is a bad idea from one side, and this info still useful when we want to use
+ * (or don't use) some Solaris version-specific features from other side.
+ * Of course, the best way is to define it in spec file, but this is beyond our scope.
+ *
+ * Uncomment ONE of the following, depends on what Solaris version you use.
+ */
+
+/*
+#define __SunOS_5_5_1
+ */
+/*
+#define __SunOS_5_6
+ */
+/*
+#define __SunOS_5_7
+ */
+/*
+#define __SunOS_5_8
+ */
+/*
+#define __SunOS_5_9
+ */
+/*
+#define __SunOS_5_10
+ */
+#endif
+
+#if defined(__sun)
+/* With following patches Solaris 8 and 9 will have *l and *f (long double and float)
+ * variants of math functions:
+ * SunOS 5.8 patch 111721-04 (May/08/2003)
+ * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111721-04-1>
+ * SunOS 5.9 patch 111722-04 (May/08/2003)
+ * <http://sunsolve.sun.com/search/document.do?assetkey=1-21-111722-04-1>
+ * Solaris 10 has this functions from box.
+ */
+/*
+#define _STLP_SOLARIS_MATH_PATCH
+ */
+#endif
+
+/*
+ Local Variables:
+ mode:C++
+ End:
+*/
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/stl_confix.h b/6/sources/cxx-stl/stlport/stlport/stl/config/stl_confix.h
new file mode 100644
index 0000000..ddcdf1d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/stl_confix.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/*
+ * STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ * Purpose of this file : to define STLport settings that depend on
+ * compiler flags or can be otherwise missed
+ *
+ */
+
+#ifndef _STLP_CONFIX_H
+#define _STLP_CONFIX_H
+
+/* If, by any chance, C compiler gets there, try to help it to pass smoothly */
+#if ! defined (__cplusplus) && ! defined (_STLP_HAS_NO_NAMESPACES)
+# define _STLP_HAS_NO_NAMESPACES
+#endif
+
+#if defined (__MINGW32__)
+# define _STLP_NO_DRAND48
+#endif
+
+/* Modena C++ library */
+#if defined (__MWERKS__) && __MWERKS__ <= 0x2303 || (defined (__KCC) && __KCC_VERSION < 3400)
+# include <mcompile.h>
+# define _STLP_USE_MSIPL 1
+# if defined (__KCC) || (defined(__MSL_CPP__) && \
+ ( (__MSL_CPP__ >= 0x5000 && defined( _MSL_NO_MESSAGE_FACET )) || \
+ (__MSL_CPP__ < 0x5000 && defined( MSIPL_NL_TYPES ))))
+# define _STLP_NO_NATIVE_MESSAGE_FACET 1
+# endif
+#endif
+
+/* common switches for EDG front-end */
+/* __EDG_SWITCHES do not seem to be an official EDG macro.
+ * We keep it for historical reason. */
+#if defined (__EDG_SWITCHES)
+# if !(defined(_TYPENAME) || defined (_TYPENAME_IS_KEYWORD))
+# undef _STLP_NEED_TYPENAME
+# define _STLP_NEED_TYPENAME 1
+# endif
+# ifndef _WCHAR_T_IS_KEYWORD
+# undef _STLP_NO_WCHAR_T
+# define _STLP_NO_WCHAR_T 1
+# endif
+# ifndef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
+# undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
+# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+# endif
+# ifndef _MEMBER_TEMPLATES
+# undef _STLP_NO_MEMBER_TEMPLATES
+# define _STLP_NO_MEMBER_TEMPLATES 1
+# undef _STLP_NO_MEMBER_TEMPLATE_CLASSES
+# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+# endif
+# ifndef _MEMBER_TEMPLATE_KEYWORD
+# undef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
+# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+# endif
+# if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS)
+# undef _STLP_HAS_NO_EXCEPTIONS
+# define _STLP_HAS_NO_EXCEPTIONS
+# endif
+# undef __EDG_SWITCHES
+#endif /* EDG */
+
+/* __EDG_VERSION__ is an official EDG macro, compilers based
+ * on EDG have to define it. */
+#if defined (__EDG_VERSION__)
+# if (__EDG_VERSION__ >= 244) && !defined (_STLP_HAS_INCLUDE_NEXT)
+# define _STLP_HAS_INCLUDE_NEXT
+# endif
+# if (__EDG_VERSION__ <= 240) && !defined (_STLP_DONT_RETURN_VOID)
+# define _STLP_DONT_RETURN_VOID
+# endif
+# if !defined (__EXCEPTIONS) && !defined (_STLP_HAS_NO_EXCEPTIONS)
+# define _STLP_HAS_NO_EXCEPTIONS
+# endif
+# if !defined (__NO_LONG_LONG) && !defined (_STLP_LONG_LONG)
+# define _STLP_LONG_LONG long long
+# endif
+#endif
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/stl_mycomp.h b/6/sources/cxx-stl/stlport/stlport/stl/config/stl_mycomp.h
new file mode 100644
index 0000000..f92902f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/stl_mycomp.h
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/*
+ * Purpose of this file :
+ *
+ * A list of COMPILER-SPECIFIC portion of STLport settings.
+ * This file is provided to help in manual configuration
+ * of STLport. This file is being included by stlcomp.h
+ * when STLport is unable to identify your compiler.
+ * Please remove the error diagnostic below before adjusting
+ * macros.
+ *
+ */
+#ifndef _STLP_MYCOMP_H
+#define _STLP_MYCOMP_H
+
+#error "Your compiler version is not recognized by STLport. Please edit <stlport/stl/config/stl_mycomp.h>"
+
+//==========================================================
+
+// the values choosen here as defaults try to give
+// maximum functionality on the most conservative settings
+
+// Mostly correct guess, change it for Alpha (and other environments
+// that has 64-bit "long")
+// # define _STLP_UINT32_T unsigned long
+
+// Disables wchar_t functionality
+// # define _STLP_NO_WCHAR_T 1
+
+// Define if wchar_t is not an intrinsic type, and is actually a typedef to unsigned short.
+// # define _STLP_WCHAR_T_IS_USHORT 1
+
+// Uncomment if long long is available
+// # define _STLP_LONG_LONG long long
+
+// Uncomment if long double is not available
+// # define _STLP_NO_LONG_DOUBLE 1
+
+// Uncomment this if your compiler does not support "typename" keyword
+// # define _STLP_NEED_TYPENAME 1
+
+// Uncomment this if your compiler does not support "mutable" keyword
+// # define _STLP_NEED_MUTABLE 1
+
+// Uncomment this if your compiler does not support "explicit" keyword
+// # define _STLP_NEED_EXPLICIT 1
+
+// Uncomment if new-style-casts like const_cast<> are not available
+// # define _STLP_NO_NEW_STYLE_CASTS 1
+
+// Uncomment this if your compiler does not have "bool" type
+// # define _STLP_NO_BOOL 1
+
+// Uncomment this if your compiler does not have "bool" type, but has "bool" keyword reserved
+// # define _STLP_DONT_USE_BOOL_TYPEDEF 1
+
+// Uncomment this if your compiler does not have "bool" type, but defines "bool" in <yvals.h>
+// # define _STLP_YVALS_H 1
+
+// Uncomment this if your compiler has limited or no default template arguments for classes
+// # define _STLP_LIMITED_DEFAULT_TEMPLATES 1
+
+// Uncomment this if your compiler support only complete (not dependent on other parameters)
+// types as default parameters for class templates
+// # define _STLP_DEFAULT_TYPE_PARAM 1
+
+// Uncomment this if your compiler do not support default parameters in template class methods
+// # define _STLP_DONT_SUP_DFLT_PARAM 1
+
+// Uncomment this if your compiler has problem with not-type
+// default template parameters
+// # define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
+
+// Define if compiler has
+// trouble with functions getting non-type-parameterized classes as parameters
+// # define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
+
+// Uncomment this if your compiler does not support namespaces
+// # define _STLP_HAS_NO_NAMESPACES 1
+
+// Uncomment if "using" keyword does not work with template types
+// # define _STLP_BROKEN_USING_DIRECTIVE 1
+
+// Uncomment this if your compiler does not support exceptions
+// # define _STLP_HAS_NO_EXCEPTIONS 1
+
+// Uncomment this when you are able to detect that the user do not
+// want to use the exceptions feature.
+// # define _STLP_DONT_USE_EXCEPTIONS 1
+
+// Uncomment this if your compiler does not support exception specifications
+// # define _STLP_NO_EXCEPTION_SPEC
+
+// Define this if your compiler requires return statement after throw()
+// # define _STLP_THROW_RETURN_BUG 1
+
+// Define this if your compiler do not support return of void
+// # define _STLP_DONT_RETURN_VOID 1
+
+// Header <new> that comes with the compiler
+// does not define bad_alloc exception
+// # define _STLP_NO_BAD_ALLOC 1
+
+// Define this if your compiler do not throw bad_alloc from the new operator
+// # define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
+
+// Define this if your compiler has no rtti support or if it has been disabled
+// # define _STLP_NO_RTTI 1
+
+// Define this if there is no native type_info definition
+// # define _STLP_NO_TYPEINFO 1
+
+// Uncomment if member template methods are not available
+// # define _STLP_NO_MEMBER_TEMPLATES 1
+
+// Uncomment if member template classes are not available
+// # define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
+
+// Uncomment if your compiler do not support the std::allocator rebind technique
+// This is a special case of bad member template classes support, it is automatically
+// defined if _STLP_NO_MEMBER_TEMPLATE_CLASSES is defined.
+// # define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
+
+// Uncomment if no "template" keyword should be used with member template classes
+// # define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
+
+// Compiler does not accept friend declaration qualified with namespace name.
+// # define _STLP_NO_QUALIFIED_FRIENDS 1
+
+// Uncomment if partial specialization is not available
+// # define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
+
+// Define if class being partially specialized require full name (template parameters)
+// of itself for method declarations
+// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
+
+// Compiler has problem with qualified specializations (cont int, volatile int...)
+// # define _STLP_QUALIFIED_SPECIALIZATION_BUG
+
+// Compiler has problems specializing members of partially
+// specialized class
+// # define _STLP_MEMBER_SPECIALIZATION_BUG
+
+// Uncomment if partial order of template functions is not available
+// # define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
+
+// Uncomment if specialization of methods is not allowed
+// # define _STLP_NO_METHOD_SPECIALIZATION 1
+
+// Uncomment if full specialization does not use partial spec. syntax : template <> struct ....
+// # define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
+
+// Uncomment if compiler does not support explicit template arguments for functions
+// # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
+
+// Uncomment this if your compiler can't inline while(), for()
+// # define _STLP_LOOP_INLINE_PROBLEMS 1
+
+// Define if the compiler fails to match a template function argument of base
+// # define _STLP_BASE_MATCH_BUG 1
+
+// Define if the compiler fails to match a template function argument of base
+// (non-template)
+//# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
+
+// Define if the compiler rejects outline method definition
+// explicitly taking nested types/typedefs
+// # define _STLP_NESTED_TYPE_PARAM_BUG 1
+
+// Compiler requires typename keyword on outline method definition
+// explicitly taking nested types/typedefs
+// #define _STLP_TYPENAME_ON_RETURN_TYPE
+
+// Define if the baseclass typedefs not visible from outside
+// # define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
+
+// if your compiler have serious problems with typedefs, try this one
+// # define _STLP_BASE_TYPEDEF_BUG 1
+
+// Uncomment if getting errors compiling mem_fun* adaptors
+// # define _STLP_MEMBER_POINTER_PARAM_BUG 1
+
+// Uncomment if the compiler can't handle a constant-initializer in the
+// declaration of a static const data member of integer type.
+// (See section 9.4.2, paragraph 4, of the C++ standard.)
+// # define _STLP_STATIC_CONST_INIT_BUG
+
+// Uncomment to indicate that the compiler do not like static constant
+// definition.
+// Meaningfull only if _STLP_STATIC_CONST_INIT_BUG is not defined.
+// # define _STLP_NO_STATIC_CONST_DEFINITION
+
+// Define if default constructor for builtin integer type fails to initialize it to 0
+// In expression like new(&char) char():
+//# define _STLP_DEF_CONST_PLCT_NEW_BUG 1
+// In default function parameter like _M_method(_Tp __x = _Tp())
+//# define _STLP_DEF_CONST_DEF_PARAM_BUG 1
+
+// Defined if constructor
+// required to explicitly call member's default constructors for const objects
+// # define _STLP_CONST_CONSTRUCTOR_BUG 1
+
+// Defined if the compiler has trouble calling POD-types constructors/destructors
+// # define _STLP_TRIVIAL_CONSTRUCTOR_BUG 1
+// # define _STLP_TRIVIAL_DESTRUCTOR_BUG 1
+
+// Define if having problems specializing maps/sets with
+// key type being const
+// # define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
+
+// Uncomment this to disable -> operators on all iterators
+// # define _STLP_NO_ARROW_OPERATOR 1
+
+// Uncomment this to disble at() member functions for containers
+// # define _STLP_NO_AT_MEMBER_FUNCTION 1
+
+// Define this if compiler lacks <exception> header
+// # define _STLP_NO_EXCEPTION_HEADER 1
+
+// Uncomment this if your C library has lrand48() function
+// # define _STLP_RAND48 1
+
+// Uncomment if native new-style C library headers lile <cstddef>, etc are not available.
+// # define _STLP_HAS_NO_NEW_C_HEADERS 1
+
+// uncomment if new-style headers <new> is available
+// # define _STLP_HAS_NEW_NEW_HEADER 1
+
+// uncomment this if <iostream> and other STD headers put their stuff in ::namespace,
+// not std::
+// # define _STLP_VENDOR_GLOBAL_STD
+
+// uncomment this if <cstdio> and the like put stuff in ::namespace,
+// not std::
+// # define _STLP_VENDOR_GLOBAL_CSTD
+
+// uncomment this if your compiler consider as ambiguous a function imported within
+// the stlport namespace and called without scope (:: or std::)
+// # define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
+
+// uncomment this if your compiler define all the C math functions C++ additional
+// overloads in ::namespace and not only in std::.
+// # define _STLP_HAS_GLOBAL_C_MATH_FUNCTIONS 1
+
+// Edit relative path below (or put full path) to get native
+// compiler headers included. Default is "../include".
+// C headers may reside in different directory, so separate macro is provided.
+// Hint : never install STLport in the directory that ends with "include"
+// # define _STLP_NATIVE_INCLUDE_PATH ../include
+// # define _STLP_NATIVE_C_INCLUDE_PATH ../include
+// # define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
+
+// This macro constructs header path from directory and name.
+// You may change it if your compiler does not understand "/".
+// # define _STLP_MAKE_HEADER(path, header) <path/header>
+
+// This macro constructs native include header path from include path and name.
+// You may have do define it if experimenting problems with preprocessor
+// # define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
+
+// Same for C headers
+// #define _STLP_NATIVE_C_HEADER(header)
+
+//==========================================================
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/config/user_config.h b/6/sources/cxx-stl/stlport/stlport/stl/config/user_config.h
new file mode 100644
index 0000000..4efd727
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/config/user_config.h
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+/*
+ * Purpose of this file :
+ *
+ * To hold user-definable portion of STLport settings which may be overridden
+ * on per-project basis.
+ * Please note that if you use STLport iostreams (compiled library) then you have
+ * to use consistent settings when you compile STLport library and your project.
+ * Those settings are defined in host.h and have to be the same for a given
+ * STLport installation.
+ */
+
+
+/*==========================================================
+ * User-settable macros that control compilation:
+ * Features selection
+ *==========================================================*/
+
+/*
+ * Use this switch for embedded systems where no iostreams are available
+ * at all. STLport own iostreams will also get disabled automatically then.
+ * You can either use STLport iostreams, or no iostreams.
+ * If you want iostreams, you have to compile library in ../build/lib
+ * and supply resulting library at link time.
+ */
+/*
+#define _STLP_NO_IOSTREAMS 1
+*/
+
+/*
+ * Set _STLP_DEBUG to turn the "Debug Mode" on.
+ * That gets you checked iterators/ranges in the manner
+ * of "Safe STL". Very useful for debugging. Thread-safe.
+ * Please do not forget to link proper STLport library flavor
+ * (e.g libstlportstlg.so or libstlportstlg.a) when you set this flag
+ * in STLport iostreams mode, namespace customization guaranty that you
+ * link to the right library.
+ */
+/*
+#define _STLP_DEBUG 1
+*/
+/*
+ * You can also choose the debug level:
+ * STLport debug level: Default value
+ * Check only what the STLport implementation consider as invalid.
+ * It also change the iterator invalidation schema.
+ * Standard debug level: Check for all operations the standard consider as "undefined behavior"
+ * even if STlport implement it correctly. It also invalidates iterators
+ * more often.
+ */
+/*
+#define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
+#define _STLP_DEBUG_LEVEL _STLP_STANDARD_DBG_LEVEL
+*/
+/* When an inconsistency is detected by the 'safe STL' the program will abort.
+ * If you prefer an exception define the following macro. The thrown exception
+ * will be the Standard runtime_error exception.
+ */
+/*
+#define _STLP_DEBUG_MODE_THROWS
+ */
+
+/*
+ * _STLP_NO_CUSTOM_IO : define this if you do not instantiate basic_xxx iostream
+ * classes with custom types (which is most likely the case). Custom means types
+ * other than char, wchar_t, char_traits<> and allocator<> like
+ * basic_ostream<my_char_type, my_traits<my_char_type> > or
+ * basic_string<char, char_traits<char>, my_allocator >
+ * When this option is on, most non-inline template functions definitions for iostreams
+ * are not seen by the client which saves a lot of compile time for most compilers,
+ * also object and executable size for some.
+ * Default is off, just not to break compilation for those who do use those types.
+ * That also guarantees that you still use optimized standard i/o when you compile
+ * your program without optimization. Option does not affect STLport library build; you
+ * may use the same binary library with and without this option, on per-project basis.
+ */
+/*
+#define _STLP_NO_CUSTOM_IO
+*/
+
+/*
+ * _STLP_NO_RELOPS_NAMESPACE: if defined, don't put the relational
+ * operator templates (>, <=, >=, !=) in namespace std::rel_ops, even
+ * if the compiler supports namespaces.
+ * Note : if the compiler do not support namespaces, those operators are not be provided by default,
+ * to simulate hiding them into rel_ops. This was proved to resolve many compiler bugs with ambiguity.
+ */
+/*
+#define _STLP_NO_RELOPS_NAMESPACE 1
+*/
+
+/*
+ * If STLport use its own namespace, see _STLP_NO_OWN_NAMESPACE in host.h, it will try
+ * by default to rename std:: for the user to stlport::. If you do not want this feature,
+ * please define the following switch and then use stlport::
+ */
+/*
+#define _STLP_DONT_REDEFINE_STD 1
+*/
+
+/*
+ * _STLP_WHOLE_NATIVE_STD : only meaningful if STLport uses its own namespace.
+ * Normally, STLport only imports necessary components from native std:: namespace.
+ * You might want everything from std:: being available in std:: namespace when you
+ * include corresponding STLport header (like STLport <map> provides std::map as well, etc.),
+ * if you are going to use both stlport:: and std:: components in your code.
+ * Otherwise this option is not recommended as it increases the size of your object files
+ * and slows down compilation.
+ * Beware, if you do not use STLport iostream (_STLP_NO_IOSTREAMS above), ask STLport to
+ * not rename std:: in stlport:: and try to have access to whole native Standard stuff then
+ * STLport will only throw exceptions from the std namespace and not from stlport.
+ * For instance a problem in stlport::vector::at will throw a std::out_of_range exception
+ * and not a stlport::out_of_range.
+ * Notice that STLport exceptions inherits from std::exception.
+ */
+/*
+#define _STLP_WHOLE_NATIVE_STD
+*/
+
+/*
+ * Use this option to catch uninitialized members in your classes.
+ * When it is set, construct() and destroy() fill the class storage
+ * with _STLP_SHRED_BYTE (see below).
+ * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically.
+ */
+/*
+#define _STLP_DEBUG_UNINITIALIZED 1
+#define _STLP_DEBUG_ALLOC 1
+*/
+
+/*
+ * Uncomment and provide a definition for the byte with which raw memory
+ * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined.
+ * Choose a value which is likely to cause a noticeable problem if dereferenced
+ * or otherwise abused. A good value may already be defined for your platform.
+ */
+/*
+#define _STLP_SHRED_BYTE 0xA3
+*/
+
+/*
+ * This option is for gcc users only and only affects systems where native linker
+ * does not let gcc to implement automatic instantiation of static template data members/
+ * It is being put in this file as there is no way to check if we are using GNU ld automatically,
+ * so it becomes user's responsibility.
+ */
+/*
+#define _STLP_GCC_USES_GNU_LD
+*/
+
+/*==========================================================
+ * Compatibility section
+ *==========================================================*/
+
+/*
+ * Define this macro to disable anachronistic constructs (like the ones used in HP STL and
+ * not included in final standard, etc.
+ */
+/*
+#define _STLP_NO_ANACHRONISMS 1
+*/
+
+/*
+ * Define this macro to disable STLport extensions (for example, to make sure your code will
+ * compile with some other implementation )
+ */
+/*
+#define _STLP_NO_EXTENSIONS 1
+*/
+
+/*
+ * You should define this macro if compiling with MFC - STLport <stl/config/_windows.h>
+ * then include <afx.h> instead of <windows.h> to get synchronisation primitives
+ */
+/*
+#define _STLP_USE_MFC 1
+*/
+
+/*
+ * boris : this setting is here as we cannot detect precense of new Platform SDK automatically
+ * If you are using new PSDK with VC++ 6.0 or lower,
+ * please define this to get correct prototypes for InterlockedXXX functions
+ */
+/*
+#define _STLP_NEW_PLATFORM_SDK 1
+*/
+
+/*
+ * For the same reason as the one above we are not able to detect easily use
+ * of the compiler coming with the Platform SDK instead of the one coming with
+ * a Microsoft Visual Studio release. This change native C/C++ library location
+ * and implementation, please define this to get correct STLport configuration.
+ */
+/*
+#define _STLP_USING_PLATFORM_SDK_COMPILER 1
+*/
+
+/*
+ * Some compilers support the automatic linking feature.
+ * Uncomment the following if you prefer to specify the STLport library
+ * to link with yourself.
+ * For the moment, this feature is only supported and implemented within STLport
+ * by the Microsoft compilers.
+ */
+/*
+#define _STLP_DONT_USE_AUTO_LINK 1
+*/
+
+/*
+ * If you customize the STLport generated library names don't forget to give
+ * the motif you used during configuration here if you still want the auto link
+ * to work. (Do not remove double quotes in the macro value)
+ */
+/*
+#define _STLP_LIB_NAME_MOTIF "???"
+ */
+
+/*
+ * Uncomment to get feedback at compilation time about result of build environment
+ * introspection.
+ */
+/*
+#define _STLP_VERBOSE 1
+*/
+
+/*
+ * Use minimum set of default arguments on template classes that have more
+ * than one - for example map<>, set<>.
+ * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on.
+ * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile
+ * set<T> with those compilers, but you'll have to use __set__<T, less<T>>
+ *
+ * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>,
+ * queue<>, priority_queue<>, stack<>, istream_iterator<>
+ */
+/*
+#define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1
+*/
+
+/*
+ * The agregation of strings using the + operator is an expensive operation
+ * as it requires construction of temporary objects that need memory allocation
+ * and deallocation. The problem can be even more important if you are adding
+ * several strings together in a single expression. To avoid this problem STLport
+ * implement expression template. With this technique addition of 2 strings is not
+ * a string anymore but a temporary object having a reference to each of the
+ * original strings involved in the expression. This object carry information
+ * directly to the destination string to set its size correctly and only make
+ * a single call to the allocator. This technique also works for the addition of
+ * N elements where elements are basic_string, C string or a single character.
+ * The drawback can be longer compilation time and bigger executable size.
+ * Another problem is that some compilers (gcc) fail to use string proxy object
+ * if do with class derived from string (see unit tests for details).
+ * STLport rebuild: Yes
+ */
+/*
+#define _STLP_USE_TEMPLATE_EXPRESSION 1
+*/
+
+
+/*
+ * By default the STLport basic_string implementation use a little static buffer
+ * (of 16 chars when writing this doc) to avoid systematically memory allocation
+ * in case of little basic_string. The drawback of such a method is bigger
+ * basic_string size and some performance penalty for method like swap. If you
+ * prefer systematical dynamic allocation turn on this macro.
+ * STLport rebuild: Yes
+ */
+/*
+#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1
+*/
+
+/*
+ * To reduce the famous code bloat trouble due to the use of templates STLport grant
+ * a specialization of some containers for pointer types. So all instanciations
+ * of those containers with a pointer type will use the same implementation based on
+ * a container of void*. This feature has shown very good result on object files size
+ * but after link phase and optimization you will only experiment benefit if you use
+ * many container with pointer types.
+ * There are however a number of limitation to use this option:
+ * - with compilers not supporting partial template specialization feature, you won't
+ * be able to access some nested container types like iterator as long as the
+ * definition of the type used to instanciate the container will be incomplete
+ * (see IncompleteClass definition in test/unit/vector_test.cpp).
+ * - you won't be able to use complex Standard allocator implementations which are
+ * allocators having pointer nested type not being a real C pointer.
+ */
+/*
+#define _STLP_USE_PTR_SPECIALIZATIONS 1
+*/
+
+/*
+ * To achieve many different optimizations within the template implementations STLport
+ * uses some type traits technique. With this macro you can ask STLport to use the famous
+ * boost type traits rather than the internal one. The advantages are more compiler
+ * integration and a better support. If you only define this macro once the STLport has been
+ * built you just have to add the boost install path within your include path. If you want
+ * to use this feature at STLport built time you will have to define the
+ * STLP_BUILD_BOOST_PATH enrironment variable with the value of the boost library path.
+ */
+
+/*
+#define _STLP_USE_BOOST_SUPPORT 1
+*/
+
+
+/*==========================================================*/
+
+/*
+ Local Variables:
+ mode: C++
+ End:
+*/
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.c b/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.c
new file mode 100644
index 0000000..99d5c6b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.c
@@ -0,0 +1,628 @@
+/*
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_DEBUG_C
+#define _STLP_DEBUG_C
+
+#if defined (_STLP_DEBUG)
+#if defined (_STLP_THREADS)
+# if !defined (_STLP_NEED_MUTABLE)
+# define _STLP_ACQUIRE_LOCK(_Lock) _Lock._M_acquire_lock();
+# define _STLP_RELEASE_LOCK(_Lock) _Lock._M_release_lock();
+# else
+# define _STLP_ACQUIRE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_acquire_lock();
+# define _STLP_RELEASE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_release_lock();
+# endif /* _STLP_NEED_MUTABLE */
+#else
+# define _STLP_ACQUIRE_LOCK(_Lock)
+# define _STLP_RELEASE_LOCK(_Lock)
+#endif /* _STLP_THREADS */
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+//==========================================================
+// global non-inline functions
+//==========================================================
+// [ i1, i2)
+#if !defined (__DMC__)
+template <class _Iterator>
+inline bool _STLP_CALL
+stlp_in_range_aux(const _Iterator& __it, const _Iterator& __first,
+ const _Iterator& __last, const random_access_iterator_tag &) {
+ return ( __it >= __first &&
+ __it < __last);
+}
+#endif
+
+template <class _Iterator1, class _Iterator>
+#if defined (_STLP_MSVC)
+inline bool _STLP_CALL stlp_in_range_aux(_Iterator1 __it, const _Iterator& __first,
+#else
+inline bool _STLP_CALL stlp_in_range_aux(const _Iterator1& __it, const _Iterator& __first,
+#endif
+ const _Iterator& __last, const forward_iterator_tag &) {
+ _Iterator1 __i(__first);
+ for (; __i != __last && __i != __it; ++__i);
+ return (__i != __last);
+}
+
+#if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
+template <class _Iterator1, class _Iterator>
+inline bool _STLP_CALL
+stlp_in_range_aux(const _Iterator1& __it, const _Iterator& __first,
+ const _Iterator& __last, const bidirectional_iterator_tag &) {
+ _Iterator1 __i(__first);
+ for (; __i != __last && __i != __it; ++__i);
+ return (__i != __last);
+}
+#endif
+
+template <class _Iterator>
+bool _STLP_CALL __check_range_aux(const _Iterator& __first, const _Iterator& __last,
+ const __false_type& /*_IsIntegral*/) {
+ _STLP_VERBOSE_RETURN(__valid_range(__first,__last), _StlMsg_INVALID_RANGE )
+ return true;
+}
+
+template <class _Integral>
+bool _STLP_CALL __check_range_aux(_Integral /*__first*/, _Integral /*__last*/,
+ const __true_type& /*_IsIntegral*/)
+{ return true; }
+
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last) {
+ typedef typename _IsIntegral<_Iterator>::_Ret _Integral;
+ return __check_range_aux(__first, __last, _Integral());
+}
+
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator& __it,
+ const _Iterator& __start, const _Iterator& __finish) {
+ _STLP_VERBOSE_RETURN(stlp_in_range(__it, __start, __finish),
+ _StlMsg_NOT_IN_RANGE_1)
+ return true;
+}
+
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last,
+ const _Iterator& __start, const _Iterator& __finish) {
+ _STLP_VERBOSE_RETURN(stlp_in_range(__first, __last, __start, __finish),
+ _StlMsg_NOT_IN_RANGE_2)
+ return true;
+}
+
+template <class _Tp>
+bool _STLP_CALL __check_ptr_range(const _Tp* __first, const _Tp* __last) {
+ _STLP_VERBOSE_RETURN((__first != 0 || __last == 0), _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_RETURN(__valid_range(__first, __last, random_access_iterator_tag()),
+ _StlMsg_INVALID_RANGE)
+ return true;
+}
+
+//===============================================================
+template <class _Iterator>
+void _STLP_CALL __invalidate_range(const __owned_list* __base,
+ const _Iterator& __first,
+ const _Iterator& __last) {
+ typedef __owned_link _L_type;
+ _STLP_ACQUIRE_LOCK(__base->_M_lock)
+ _L_type* __prev = __CONST_CAST(_L_type*, &__base->_M_node);
+ _L_type* __pos = __prev->_M_next;
+
+ while (__pos != 0) {
+ if (!(&__first == __STATIC_CAST(_Iterator*, __pos) || &__last == __STATIC_CAST(_Iterator*, __pos)) &&
+ stlp_in_range_aux(__STATIC_CAST(_Iterator*, __pos)->_M_iterator,
+ __first._M_iterator, __last._M_iterator,
+ _STLP_ITERATOR_CATEGORY(__first, _Iterator))) {
+ __pos->_M_owner = 0;
+ __prev->_M_next = __pos->_M_next;
+ }
+ else {
+ __prev = __pos;
+ }
+ __pos = __prev->_M_next;
+ }
+ _STLP_RELEASE_LOCK(__base->_M_lock)
+}
+
+template <class _Iterator>
+void _STLP_CALL __invalidate_iterator(const __owned_list* __base,
+ const _Iterator& __it) {
+ typedef __owned_link _L_type;
+ _STLP_ACQUIRE_LOCK(__base->_M_lock)
+ _L_type* __prev = __CONST_CAST(_L_type*, &__base->_M_node);
+ _L_type* __pos = __prev->_M_next;
+ while (__pos != 0) {
+ // this requires safe iterators to be derived from __owned_link
+ if ((__pos != __STATIC_CAST(const _L_type*, &__it)) &&
+ (__STATIC_CAST(_Iterator*, __pos)->_M_iterator == __it._M_iterator)) {
+ __pos->_M_owner = 0;
+ __prev->_M_next = __pos->_M_next;
+ }
+ else {
+ __prev = __pos;
+ }
+ __pos = __prev->_M_next;
+ }
+ _STLP_RELEASE_LOCK(__base->_M_lock)
+}
+
+template <class _Iterator>
+void _STLP_CALL __change_range_owner(const _Iterator& __first,
+ const _Iterator& __last,
+ const __owned_list* __dst) {
+ if (__first._Owner() == __dst)
+ return;
+
+ typedef __owned_link _L_type;
+ // Check __stl_debug_engine<_Dummy>::_Swap_owners comments to see why there is no lock here
+ //_STLP_ACQUIRE_LOCK(__base->_M_lock)
+ __owned_list *__base = __CONST_CAST(__owned_list*, __first._Owner());
+ _L_type* __src_prev = &__base->_M_node;
+ _L_type* __pos = __src_prev->_M_next;
+ _L_type* __dst_prev = __CONST_CAST(_L_type*, &__dst->_M_node);
+
+ while (__pos != 0) {
+ if (!(&__first == __STATIC_CAST(_Iterator*, __pos) || &__last == __STATIC_CAST(_Iterator*, __pos)) &&
+ stlp_in_range_aux(__STATIC_CAST(_Iterator*, __pos)->_M_iterator,
+ __first._M_iterator, __last._M_iterator,
+ _STLP_ITERATOR_CATEGORY(__first, _Iterator))) {
+ __pos->_M_owner = __CONST_CAST(__owned_list*, __dst);
+ //remove __pos from __base:
+ __src_prev->_M_next = __pos->_M_next;
+ //add __pos to __dst:
+ __pos->_M_next = __dst_prev->_M_next;
+ __dst_prev->_M_next = __pos;
+ }
+ else {
+ __src_prev = __pos;
+ }
+ __pos = __src_prev->_M_next;
+ }
+
+#if defined(_STLP_WCE) && defined(_ARM_)
+ // Note: This part is needed for compiling under Windows CE under ARM and correctly using
+ // _STLP_DEBUG mode. This comes from a bug in the ARM compiler where checked iterators that
+ // are passed by value are not copied over correctly. When __change_range_owner is called,
+ // e.g. in std::list::splice() the wrong _M_owner field gets modified and the __first
+ // iterator has the old _M_owner field, but was moved to the new __owned_list. Setting
+ // the first iterator's _M_owner field fixes this. Ugly but works.
+ __pos = __CONST_CAST(_Iterator*, &__first);
+ __pos->_M_owner = __CONST_CAST(__owned_list*, __dst);
+#endif
+ //_STLP_RELEASE_LOCK(__base->_M_lock)
+}
+
+template <class _Iterator>
+void _STLP_CALL __change_ite_owner(const _Iterator& __it,
+ const __owned_list* __dst) {
+ if (__it._Owner() == __dst)
+ return;
+
+ typedef __owned_link _L_type;
+ // Check __stl_debug_engine<_Dummy>::_Swap_owners comments to see why there is no lock here
+ //_STLP_ACQUIRE_LOCK(__base->_M_lock)
+ __owned_list *__base = __CONST_CAST(__owned_list*, __it._Owner());
+ _L_type* __prev = &__base->_M_node;
+ _L_type* __pos = __prev->_M_next;
+ _L_type* __dst_prev = __CONST_CAST(_L_type*, &__dst->_M_node);
+
+ while (__pos != 0) {
+ // this requires safe iterators to be derived from __owned_link
+ if ((__pos != __STATIC_CAST(const _L_type*, &__it)) &&
+ (__STATIC_CAST(_Iterator*, __pos)->_M_iterator == __it._M_iterator)) {
+ __pos->_M_owner = __CONST_CAST(__owned_list*, __dst);
+ //remove __pos from __base:
+ __prev->_M_next = __pos->_M_next;
+ //add __pos to __dst:
+ __pos->_M_next = __dst_prev->_M_next;
+ __dst_prev->_M_next = __pos;
+ }
+ else {
+ __prev = __pos;
+ }
+ __pos = __prev->_M_next;
+ }
+ //_STLP_RELEASE_LOCK(__base->_M_lock)
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_DEBUG */
+
+#if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
+
+# ifndef _STLP_INTERNAL_CSTDLIB
+# include <stl/_cstdlib.h>
+# endif
+
+//==========================================================
+// .c section
+// owned_list non-inline methods and global functions
+//==========================================================
+
+# if defined (_STLP_ASSERTIONS)
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+# if !defined (_STLP_STRING_LITERAL)
+# define _STLP_STRING_LITERAL(__x) __x
+# endif
+
+# if defined (_STLP_USE_WIDE_INTERFACE)
+// note: WinCE needs this to format single-byte strings in __stl_debug_engine::_Message
+# define _STLP_PERCENT_S "%hs"
+# else
+# define _STLP_PERCENT_S "%s"
+# endif /* _STLP_USE_WIDE_INTERFACE */
+
+# define _STLP_MESSAGE_TABLE_BODY = { \
+_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error: " _STLP_PERCENT_S "\n"), \
+_STLP_STRING_LITERAL(_STLP_PERCENT_S "(%d): STL assertion failure : " _STLP_PERCENT_S "\n" _STLP_ASSERT_MSG_TRAILER), \
+_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error : " _STLP_PERCENT_S "\n" _STLP_PERCENT_S "(%d): STL assertion failure: " _STLP_PERCENT_S " \n" _STLP_ASSERT_MSG_TRAILER), \
+_STLP_STRING_LITERAL("Invalid argument to operation (see operation documentation)"), \
+_STLP_STRING_LITERAL("Taking an iterator out of destroyed (or otherwise corrupted) container"), \
+_STLP_STRING_LITERAL("Trying to extract an object out from empty container"),\
+_STLP_STRING_LITERAL("Past-the-end iterator could not be erased"), \
+_STLP_STRING_LITERAL("Index out of bounds"), \
+_STLP_STRING_LITERAL("Container doesn't own the iterator"), \
+_STLP_STRING_LITERAL("Container is owner of the iterator, but should not"), \
+_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) iterator used"), \
+_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) lefthand iterator in expression"), \
+_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) righthand iterator in expression"), \
+_STLP_STRING_LITERAL("Iterators used in expression are from different owners"), \
+_STLP_STRING_LITERAL("Iterator could not be dereferenced (past-the-end ?)"), \
+_STLP_STRING_LITERAL("Range [first,last) is invalid"), \
+_STLP_STRING_LITERAL("Iterator is not in range [first,last)"), \
+_STLP_STRING_LITERAL("Range [first,last) is not in range [start,finish)"), \
+_STLP_STRING_LITERAL("The advance would produce invalid iterator"), \
+_STLP_STRING_LITERAL("Iterator is singular (advanced beyond the bounds ?)"), \
+_STLP_STRING_LITERAL("Invalid strict weak ordering predicate, if pred(a, b) then we should have !pred(b, a)"), \
+_STLP_STRING_LITERAL("Invalid equivalent predicate, if pred(a, b) then we should have pred(b, a)"), \
+_STLP_STRING_LITERAL("Memory block deallocated twice"), \
+_STLP_STRING_LITERAL("Deallocating a block that was never allocated"), \
+_STLP_STRING_LITERAL("Deallocating a memory block allocated for another type"), \
+_STLP_STRING_LITERAL("Size of block passed to deallocate() doesn't match block size"), \
+_STLP_STRING_LITERAL("Pointer underrun - safety margin at front of memory block overwritten"), \
+_STLP_STRING_LITERAL("Pointer overrrun - safety margin at back of memory block overwritten"), \
+_STLP_STRING_LITERAL("Attempt to dereference null pointer returned by auto_ptr::get()"), \
+_STLP_STRING_LITERAL("Memory allocation function returned a wrongly align memory block"), \
+_STLP_STRING_LITERAL("Unknown problem") \
+ }
+
+template <class _Dummy>
+const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX] _STLP_MESSAGE_TABLE_BODY;
+
+# undef _STLP_STRING_LITERAL
+# undef _STLP_PERCENT_S
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+# if !defined (_STLP_DEBUG_MESSAGE)
+# ifndef _STLP_INTERNAL_CSTDARG
+# include <stl/_cstdarg.h>
+# endif
+# ifndef _STLP_INTERNAL_CSTDIO
+# include <stl/_cstdio.h>
+# endif
+# if defined (_STLP_DEBUG_MODE_THROWS) && !defined (_STLP_RANGE_ERRORS_H)
+# include <stl/_range_errors.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...) {
+ STLPORT_CSTD::va_list __args;
+ va_start( __args, __format_str );
+
+# if !defined (_STLP_DEBUG_MODE_THROWS)
+# if defined (_STLP_USE_WIDE_INTERFACE)
+ TCHAR __buffer[512];
+ int _convert = strlen(__format_str) + 1;
+ LPWSTR _lpw = (LPWSTR)alloca(_convert * sizeof(wchar_t));
+ _lpw[0] = '\0';
+ MultiByteToWideChar(GetACP(), 0, __format_str, -1, _lpw, _convert);
+ wvsprintf(__buffer, _lpw, __args);
+ _STLP_WINCE_TRACE(__buffer);
+# elif defined (_STLP_WIN32) && (defined(_STLP_MSVC) || defined (__ICL))
+ char __buffer [4096];
+
+# if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS)
+ vsnprintf(__buffer, _STLP_ARRAY_SIZE(__buffer), __format_str, __args);
+# else
+ vsnprintf_s(__buffer, _STLP_ARRAY_SIZE(__buffer), _TRUNCATE, __format_str, __args);
+# endif
+
+ OutputDebugStringA(__buffer);
+
+# elif defined (__amigaos__)
+ STLPORT_CSTD::vfprintf(stderr, __format_str, (char *)__args);
+# else
+ STLPORT_CSTD::vfprintf(stderr, __format_str, __args);
+# endif
+# else
+ char __buffer[4096];
+
+# if defined (_STLP_USE_SAFE_STRING_FUNCTIONS)
+ vsnprintf_s(__buffer, _STLP_ARRAY_SIZE(__buffer), _TRUNCATE, __format_str, __args);
+# elif defined (_STLP_WIN32) && (defined(_STLP_MSVC) || defined (__ICL))
+ vsnprintf(__buffer, _STLP_ARRAY_SIZE(__buffer), __format_str, __args);
+# else
+ vsprintf(__buffer, __format_str, __args);
+# endif
+# endif
+
+# ifdef _STLP_DEBUG_MESSAGE_POST
+ _STLP_DEBUG_MESSAGE_POST
+# endif
+
+ va_end(__args);
+
+# if defined (_STLP_DEBUG_MODE_THROWS)
+ __stl_throw_runtime_error(__buffer);
+# endif
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+# else
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...)
+{}
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+# endif /* _STLP_DEBUG_MESSAGE */
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_IndexedError(int __error_ind, const char* __f, int __l) {
+ __stl_debug_message(_Message_table[_StlFormat_ERROR_RETURN],
+ __f, __l, _Message_table[__error_ind]);
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l) {
+ __stl_debug_message(_Message_table[_StlFormat_VERBOSE_ASSERTION_FAILURE],
+ __f, __l, _Message_table[__error_ind], __f, __l, __expr);
+ __stl_debug_terminate();
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Assert(const char* __expr, const char* __f, int __l) {
+ __stl_debug_message(_Message_table[_StlFormat_ASSERTION_FAILURE],__f, __l, __expr);
+ __stl_debug_terminate();
+}
+
+// if exceptions are present, sends unique exception
+// if not, calls abort() to terminate
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Terminate()
+{ _STLP_ABORT(); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+# endif /* _STLP_ASSERTIONS */
+
+# if defined (_STLP_DEBUG)
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+//==========================================================
+// owned_list non-inline methods
+//==========================================================
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Invalidate_all(__owned_list* __l) {
+ _STLP_ACQUIRE_LOCK(__l->_M_lock);
+ _Stamp_all(__l, 0);
+ __l->_M_node._M_next =0;
+ _STLP_RELEASE_LOCK(__l->_M_lock);
+}
+
+// boris : this is unasafe routine; should be used from within critical section only !
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Stamp_all(__owned_list* __l, __owned_list* __o) {
+ // crucial
+ if (__l->_M_node._M_owner) {
+ for (__owned_link* __pos = (__owned_link*)__l->_M_node._M_next;
+ __pos != 0; __pos = (__owned_link*)__pos->_M_next) {
+ _STLP_ASSERT(__pos->_Owner()== __l)
+ __pos->_M_owner=__o;
+ }
+ }
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Verify(const __owned_list* __l) {
+ _STLP_ACQUIRE_LOCK(__l->_M_lock);
+ if (__l) {
+ _STLP_ASSERT(__l->_M_node._Owner() != 0)
+ for (__owned_link* __pos = (__owned_link*)__l->_M_node._M_next;
+ __pos != 0; __pos = (__owned_link*)__pos->_M_next) {
+ _STLP_ASSERT(__pos->_Owner()== __l)
+ }
+ }
+ _STLP_RELEASE_LOCK(__l->_M_lock);
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Swap_owners(__owned_list& __x, __owned_list& __y) {
+ /*
+ * according to the standard : --no swap() function invalidates any references,
+ * pointers, or iterators referring to the elements of the containers being swapped.
+ */
+
+ __owned_link* __tmp;
+
+ /*
+ * boris : there is a deadlock potential situation here if we lock two containers sequentially.
+ * As user is supposed to provide its own synchronization around swap() ( it is unsafe to do any container/iterator access
+ * in parallel with swap()), we just do not use any locking at all -- that behaviour is closer to non-debug version
+ */
+
+ __tmp = __x._M_node._M_next;
+
+ _Stamp_all(&__x, &__y);
+ _Stamp_all(&__y, &__x);
+
+ __x._M_node._M_next = __y._M_node._M_next;
+ __y._M_node._M_next = __tmp;
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_Set_owner(__owned_list& __src, __owned_list& __dst) {
+ if (&__src == &__dst)
+ return;
+
+ // Check __stl_debug_engine<_Dummy>::_Swap_owners comments to see why there is no lock here
+ typedef __owned_link _L_type;
+ _L_type* __prev = &__src._M_node;
+ _L_type* __pos = __prev->_M_next;
+
+ while (__pos != 0) {
+ __pos->_M_owner = &__dst;
+ __prev = __pos;
+ __pos = __prev->_M_next;
+ }
+ __prev->_M_next = __dst._M_node._M_next;
+ __dst._M_node._M_next = __src._M_node._M_next;
+ __src._M_node._M_next = 0;
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_M_detach(__owned_list* __l, __owned_link* __c_node) {
+ if (__l != 0) {
+
+ _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
+
+ _STLP_ACQUIRE_LOCK(__l->_M_lock)
+ // boris : re-test the condition in case someone else already deleted us
+ if(__c_node->_M_owner != 0) {
+ __owned_link* __prev, *__next;
+
+ for (__prev = &__l->_M_node; (__next = __prev->_M_next) != __c_node;
+ __prev = __next) {
+ _STLP_ASSERT(__next && __next->_Owner() == __l)
+ }
+
+ __prev->_M_next = __c_node->_M_next;
+ __c_node->_M_owner=0;
+ }
+ _STLP_RELEASE_LOCK(__l->_M_lock)
+ }
+}
+
+template <class _Dummy>
+void _STLP_CALL
+__stl_debug_engine<_Dummy>::_M_attach(__owned_list* __l, __owned_link* __c_node) {
+ if (__l ==0) {
+ (__c_node)->_M_owner = 0;
+ } else {
+ _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
+ _STLP_ACQUIRE_LOCK(__l->_M_lock)
+ __c_node->_M_owner = __l;
+ __c_node->_M_next = __l->_M_node._M_next;
+ __l->_M_node._M_next = __c_node;
+ _STLP_RELEASE_LOCK(__l->_M_lock)
+ }
+}
+
+template <class _Dummy>
+void* _STLP_CALL
+__stl_debug_engine<_Dummy>::_Get_container_ptr(const __owned_link* __l) {
+ const __owned_list* __owner = __l->_Owner();
+ _STLP_VERBOSE_RETURN_0(__owner != 0, _StlMsg_INVALID_ITERATOR)
+ void* __ret = __CONST_CAST(void*,__owner->_Owner());
+ _STLP_VERBOSE_RETURN_0(__ret !=0, _StlMsg_INVALID_CONTAINER)
+ return __ret;
+}
+
+template <class _Dummy>
+bool _STLP_CALL
+__stl_debug_engine<_Dummy>::_Check_same_owner(const __owned_link& __i1,
+ const __owned_link& __i2) {
+ _STLP_VERBOSE_RETURN(__i1._Valid(), _StlMsg_INVALID_LEFTHAND_ITERATOR)
+ _STLP_VERBOSE_RETURN(__i2._Valid(), _StlMsg_INVALID_RIGHTHAND_ITERATOR)
+ _STLP_VERBOSE_RETURN((__i1._Owner() == __i2._Owner()), _StlMsg_DIFFERENT_OWNERS)
+ return true;
+}
+
+template <class _Dummy>
+bool _STLP_CALL
+__stl_debug_engine<_Dummy>::_Check_same_or_null_owner(const __owned_link& __i1,
+ const __owned_link& __i2) {
+ _STLP_VERBOSE_RETURN(__i1._Owner() == __i2._Owner(), _StlMsg_DIFFERENT_OWNERS)
+ return true;
+}
+
+template <class _Dummy>
+bool _STLP_CALL
+__stl_debug_engine<_Dummy>::_Check_if_owner( const __owned_list * __l, const __owned_link& __it) {
+ const __owned_list* __owner_ptr = __it._Owner();
+ _STLP_VERBOSE_RETURN(__owner_ptr != 0, _StlMsg_INVALID_ITERATOR)
+ _STLP_VERBOSE_RETURN(__l == __owner_ptr, _StlMsg_NOT_OWNER)
+ return true;
+}
+
+template <class _Dummy>
+bool _STLP_CALL
+__stl_debug_engine<_Dummy>::_Check_if_not_owner( const __owned_list * __l, const __owned_link& __it) {
+ const __owned_list* __owner_ptr = __it._Owner();
+ _STLP_VERBOSE_RETURN(__owner_ptr != 0, _StlMsg_INVALID_ITERATOR)
+ _STLP_VERBOSE_RETURN(__l != __owner_ptr, _StlMsg_SHOULD_NOT_OWNER)
+ return true;
+}
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+# endif /* _STLP_DEBUG */
+
+#endif /* if defined (EXPOSE_GLOBALS_IMPLEMENTATION) */
+
+#endif /* header guard */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.h
new file mode 100644
index 0000000..6a2a8ce
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_debug.h
@@ -0,0 +1,473 @@
+/*
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_DEBUG_H
+#define _STLP_DEBUG_H
+
+#if (defined (_STLP_DEBUG) || defined (_STLP_DEBUG_ALLOC)) && \
+ !defined (_STLP_ASSERTIONS)
+# define _STLP_ASSERTIONS 1
+#endif
+
+#if defined (_STLP_ASSERTIONS)
+
+# if !defined (_STLP_FILE__)
+# define _STLP_FILE__ __FILE__
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+enum {
+ //General errors
+ _StlFormat_ERROR_RETURN,
+ _StlFormat_ASSERTION_FAILURE,
+ _StlFormat_VERBOSE_ASSERTION_FAILURE,
+ _StlMsg_INVALID_ARGUMENT,
+ //Container/Iterator related errors
+ _StlMsg_INVALID_CONTAINER,
+ _StlMsg_EMPTY_CONTAINER,
+ _StlMsg_ERASE_PAST_THE_END,
+ _StlMsg_OUT_OF_BOUNDS,
+ _StlMsg_NOT_OWNER,
+ _StlMsg_SHOULD_NOT_OWNER,
+ _StlMsg_INVALID_ITERATOR,
+ _StlMsg_INVALID_LEFTHAND_ITERATOR,
+ _StlMsg_INVALID_RIGHTHAND_ITERATOR,
+ _StlMsg_DIFFERENT_OWNERS ,
+ _StlMsg_NOT_DEREFERENCEABLE ,
+ _StlMsg_INVALID_RANGE ,
+ _StlMsg_NOT_IN_RANGE_1 ,
+ _StlMsg_NOT_IN_RANGE_2 ,
+ _StlMsg_INVALID_ADVANCE ,
+ _StlMsg_SINGULAR_ITERATOR ,
+ //Bad predicate for sorting
+ _StlMsg_INVALID_STRICT_WEAK_PREDICATE,
+ _StlMsg_INVALID_EQUIVALENT_PREDICATE,
+ // debug alloc messages
+ _StlMsg_DBA_DELETED_TWICE ,
+ _StlMsg_DBA_NEVER_ALLOCATED ,
+ _StlMsg_DBA_TYPE_MISMATCH ,
+ _StlMsg_DBA_SIZE_MISMATCH ,
+ _StlMsg_DBA_UNDERRUN ,
+ _StlMsg_DBA_OVERRUN ,
+ // auto_ptr messages
+ _StlMsg_AUTO_PTR_NULL ,
+ //Memory alignent message
+ _StlMsg_WRONG_MEMORY_ALIGNMENT,
+ _StlMsg_UNKNOWN
+ /* _StlMsg_MAX */
+};
+
+/* have to hardcode that ;() */
+# define _StlMsg_MAX 31
+
+class __owned_link;
+class __owned_list;
+
+# if defined (_STLP_DEBUG_MODE_THROWS)
+# define _STLP_MESSAGE_NORETURN _STLP_FUNCTION_THROWS
+# else
+# define _STLP_MESSAGE_NORETURN
+# endif
+
+template <class _Dummy>
+class __stl_debug_engine {
+public:
+ // Basic routine to report any debug message
+ // Use _STLP_DEBUG_MESSAGE to override
+ static void _STLP_MESSAGE_NORETURN _STLP_CALL _Message(const char * format_str, ...);
+
+ // Micsellanous function to report indexed error message
+ static void _STLP_CALL _IndexedError(int __ind, const char* __f, int __l);
+
+ // Basic assertion report mechanism.
+ // Reports failed assertion via __stl_debug_message and calls _Terminate
+ // if _STLP_DEBUG_TERMINATE is specified, calls __stl_debug_terminate instead
+ static void _STLP_CALL _Assert(const char* __expr, const char* __f, int __l);
+
+ // The same, with additional diagnostics
+ static void _STLP_CALL _VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l);
+
+ // If exceptions are present, sends unique exception
+ // If not, calls _STLP_ABORT() to terminate
+ // Use _STLP_DEBUG_TERMINATE to override
+ static void _STLP_CALL _Terminate();
+
+# if defined (_STLP_DEBUG)
+ // owned_list/link delegate non-inline functions here
+
+ static bool _STLP_CALL _Check_same_owner( const __owned_link& __i1,
+ const __owned_link& __i2);
+ static bool _STLP_CALL _Check_same_or_null_owner( const __owned_link& __i1,
+ const __owned_link& __i2);
+ static bool _STLP_CALL _Check_if_owner( const __owned_list*, const __owned_link&);
+
+ static bool _STLP_CALL _Check_if_not_owner( const __owned_list*, const __owned_link&);
+
+ static void _STLP_CALL _Verify(const __owned_list*);
+
+ static void _STLP_CALL _Swap_owners(__owned_list&, __owned_list&);
+
+ static void _STLP_CALL _Invalidate_all(__owned_list*);
+
+ static void _STLP_CALL _Set_owner(__owned_list& /*src*/, __owned_list& /*dst*/);
+
+ static void _STLP_CALL _Stamp_all(__owned_list*, __owned_list*);
+
+ static void _STLP_CALL _M_detach(__owned_list*, __owned_link*);
+
+ static void _STLP_CALL _M_attach(__owned_list*, __owned_link*);
+
+ // accessor : check and get pointer to the container
+ static void* _STLP_CALL _Get_container_ptr(const __owned_link*);
+# endif
+
+ // debug messages and formats
+ static const char* _Message_table[_StlMsg_MAX];
+};
+
+# undef _STLP_MESSAGE_NORETURN
+
+# if defined (_STLP_USE_TEMPLATE_EXPORT)
+_STLP_EXPORT_TEMPLATE_CLASS __stl_debug_engine<bool>;
+# endif
+
+typedef __stl_debug_engine<bool> __stl_debugger;
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+# if !defined (_STLP_ASSERT)
+# define _STLP_ASSERT(expr) \
+ if (!(expr)) { _STLP_PRIV __stl_debugger::_Assert( # expr, _STLP_FILE__, __LINE__); }
+# endif
+
+#else
+# define _STLP_ASSERT(expr)
+#endif
+
+// this section is for _STLP_DEBUG only
+#if defined (_STLP_DEBUG)
+
+# if !defined (_STLP_VERBOSE_ASSERT)
+// fbp : new form not requiring ";"
+# define _STLP_VERBOSE_ASSERT(expr, __diag_num) \
+ if (!(expr)) { _STLP_PRIV __stl_debugger::_VerboseAssert\
+ ( # expr, _STLP_PRIV __diag_num, _STLP_FILE__, __LINE__ ); \
+ }
+# endif
+
+# define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr)
+
+# if (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+# define _STLP_STD_DEBUG_CHECK(expr) _STLP_DEBUG_CHECK(expr)
+# else
+# define _STLP_STD_DEBUG_CHECK(expr)
+# endif
+
+# if !defined (_STLP_VERBOSE_RETURN)
+# define _STLP_VERBOSE_RETURN(__expr,__diag_num) if (!(__expr)) { \
+ _STLP_PRIV __stl_debugger::_IndexedError(__diag_num, _STLP_FILE__ , __LINE__); \
+ return false; }
+# endif
+
+# if !defined (_STLP_VERBOSE_RETURN_0)
+# define _STLP_VERBOSE_RETURN_0(__expr,__diag_num) if (!(__expr)) { \
+ _STLP_PRIV __stl_debugger::_IndexedError(__diag_num, _STLP_FILE__, __LINE__); \
+ return 0; }
+# endif
+
+# ifndef _STLP_INTERNAL_THREADS_H
+# include <stl/_threads.h>
+# endif
+
+# ifndef _STLP_INTERNAL_ITERATOR_BASE_H
+# include <stl/_iterator_base.h>
+# endif
+
+# ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+# endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/*
+ * Special debug iterator traits having an additionnal static member
+ * method _Check. It is used by the slist debug implementation to check
+ * the special before_begin iterator.
+ */
+template <class _Traits>
+struct _DbgTraits : _Traits {
+ typedef _DbgTraits<typename _Traits::_ConstTraits> _ConstTraits;
+ typedef _DbgTraits<typename _Traits::_NonConstTraits> _NonConstTraits;
+
+ template <class _Iterator>
+ static bool _Check(const _Iterator&) {return true;}
+};
+
+//=============================================================
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2,
+ const random_access_iterator_tag&)
+{ return (__i1 < __i2) || (__i1 == __i2); }
+
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2,
+ const bidirectional_iterator_tag&) {
+ // check if comparable
+ bool __dummy(__i1==__i2);
+ return (__dummy==__dummy);
+}
+
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2,
+ const forward_iterator_tag&) {
+ // check if comparable
+ bool __dummy(__i1==__i2);
+ return (__dummy==__dummy);
+}
+
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&,
+ const input_iterator_tag&)
+{ return true; }
+
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&,
+ const output_iterator_tag&)
+{ return true; }
+
+template <class _Iterator>
+inline bool _STLP_CALL __valid_range(const _Iterator& __i1, const _Iterator& __i2)
+{ return __valid_range(__i1,__i2,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)); }
+
+// Note : that means in range [i1, i2].
+template <class _Iterator>
+inline bool _STLP_CALL stlp_in_range(const _Iterator& _It,
+ const _Iterator& __i1, const _Iterator& __i2)
+{ return __valid_range(__i1,_It) && __valid_range(_It,__i2); }
+
+template <class _Iterator>
+inline bool _STLP_CALL stlp_in_range(const _Iterator& __first, const _Iterator& __last,
+ const _Iterator& __start, const _Iterator& __finish)
+{ return __valid_range(__first,__last) && __valid_range(__start,__first) && __valid_range(__last,__finish); }
+
+//==========================================================
+class _STLP_CLASS_DECLSPEC __owned_link {
+public:
+ // Note: This and the following special defines for compiling under Windows CE under ARM
+ // is needed for correctly using _STLP_DEBUG mode. This comes from a bug in the ARM
+ // compiler where checked iterators that are passed by value call _M_attach with the wrong
+ // this pointer and calling _M_detach can't find the correct pointer to the __owned_link.
+ // This is circumvented by managing a _M_self pointer that points to the correct value.
+ // Ugly but works.
+#if defined(_STLP_WCE) && defined(_ARM_)
+ __owned_link() : _M_self(this), _M_owner(0) {}
+ __owned_link(const __owned_list* __c) : _M_self(this), _M_owner(0), _M_next(0)
+ { __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__c), this); }
+ __owned_link(const __owned_link& __rhs): _M_self(this), _M_owner(0)
+ { __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__rhs._M_owner), this); }
+#else
+ __owned_link() : _M_owner(0) {}
+ __owned_link(const __owned_list* __c) : _M_owner(0), _M_next(0)
+ { __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__c), this); }
+ __owned_link(const __owned_link& __rhs): _M_owner(0)
+ { __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__rhs._M_owner), this); }
+#endif
+ __owned_link& operator=(const __owned_link& __rhs) {
+ __owned_list* __new_owner = __CONST_CAST(__owned_list*,__rhs._M_owner);
+ __owned_list* __old_owner = _M_owner;
+ if ( __old_owner != __new_owner ) {
+ __stl_debugger::_M_detach(__old_owner, this);
+ __stl_debugger::_M_attach(__new_owner, this);
+ }
+ return *this;
+ }
+#if defined(_STLP_WCE) && defined(_ARM_)
+ ~__owned_link() {
+ __stl_debugger::_M_detach(_M_owner, _M_self);
+ _Invalidate();
+ }
+#else
+ ~__owned_link() {
+ __stl_debugger::_M_detach(_M_owner, this);
+ _Invalidate();
+ }
+#endif
+
+ const __owned_list* _Owner() const { return _M_owner; }
+ __owned_list* _Owner() { return _M_owner; }
+ void _Set_owner(const __owned_list* __o) { _M_owner= __CONST_CAST(__owned_list*,__o); }
+ bool _Valid() const { return _M_owner != 0; }
+ void _Invalidate() { _M_owner = 0; _M_next = 0; }
+ void _Link_to_self() { _M_next = 0; }
+
+ __owned_link* _Next() { return _M_next; }
+ const __owned_link* _Next() const { return _M_next; }
+
+public:
+#if defined(_STLP_WCE) && defined(_ARM_)
+ __owned_link* _M_self;
+#endif
+
+ __owned_list* _M_owner;
+ __owned_link* _M_next;
+};
+
+
+class _STLP_CLASS_DECLSPEC __owned_list {
+public:
+ __owned_list(void* __o) {
+ // fprintf(stderr, "__owned_list(): %p\n",(void*)this);
+ _M_node._M_owner = __REINTERPRET_CAST(__owned_list*,__o);
+ _M_node._M_next = 0;
+ }
+ ~__owned_list() {
+ // fprintf(stderr, "~__owned_list(): %p\n",(void*)this);
+ _Invalidate_all();
+ // that prevents detach
+ _M_node._Invalidate();
+ }
+ const void* _Owner() const { return (const void*)_M_node._M_owner; }
+ void* _Owner() { return (void*)_M_node._M_owner; }
+ bool _Valid() const { return _M_node._M_owner != 0; }
+ void _Invalidate() { _M_node._M_owner = 0; }
+
+ __owned_link* _First() { return _M_node._Next(); }
+ __owned_link* _Last() { return 0 ; }
+
+ const __owned_link* _First() const { return (__owned_link*)_M_node._M_next; }
+ const __owned_link* _Last() const { return 0 ;}
+
+ void _Verify() const { __stl_debugger::_Verify(this); }
+ void _Swap_owners(__owned_list& __y) { __stl_debugger::_Swap_owners(*this, __y); }
+ void _Invalidate_all() { __stl_debugger::_Invalidate_all(this); }
+ void _Set_owner(__owned_list& __y) { __stl_debugger::_Set_owner(*this, __y); }
+
+ mutable __owned_link _M_node;
+ mutable _STLP_mutex _M_lock;
+
+private:
+ // should never be called, should be left not implemented,
+ // but some compilers complain about it ;(
+ __owned_list(const __owned_list&){}
+ __owned_list& operator = (const __owned_list&) { return *this; }
+
+ friend class __owned_link;
+ friend class __stl_debug_engine<bool>;
+};
+
+
+//==========================================================
+
+// forward declaratioins
+
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator&, const _Iterator&);
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator&,
+ const _Iterator&, const _Iterator&);
+template <class _Iterator>
+bool _STLP_CALL __check_range(const _Iterator&, const _Iterator& ,
+ const _Iterator&, const _Iterator& );
+template <class _Tp>
+bool _STLP_CALL __check_ptr_range(const _Tp*, const _Tp*);
+
+template <class _Iterator>
+void _STLP_CALL __invalidate_range(const __owned_list* __base,
+ const _Iterator& __first,
+ const _Iterator& __last);
+
+template <class _Iterator>
+void _STLP_CALL __invalidate_iterator(const __owned_list* __base,
+ const _Iterator& __it);
+
+template <class _Iterator>
+void _STLP_CALL __change_range_owner(const _Iterator& __first,
+ const _Iterator& __last,
+ const __owned_list* __dst);
+
+template <class _Iterator>
+void _STLP_CALL __change_ite_owner(const _Iterator& __it,
+ const __owned_list* __dst);
+
+//============================================================
+inline bool _STLP_CALL
+__check_same_owner(const __owned_link& __i1, const __owned_link& __i2)
+{ return __stl_debugger::_Check_same_owner(__i1,__i2); }
+
+inline bool _STLP_CALL
+__check_same_or_null_owner(const __owned_link& __i1, const __owned_link& __i2)
+{ return __stl_debugger::_Check_same_or_null_owner(__i1,__i2); }
+
+template <class _Iterator>
+inline bool _STLP_CALL __check_if_owner( const __owned_list* __owner,
+ const _Iterator& __it)
+{ return __stl_debugger::_Check_if_owner(__owner, (const __owned_link&)__it); }
+
+template <class _Iterator>
+inline bool _STLP_CALL __check_if_not_owner( const __owned_list* __owner,
+ const _Iterator& __it)
+{ return __stl_debugger::_Check_if_not_owner(__owner, (const __owned_link&)__it); }
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#else
+# define _STLP_VERBOSE_ASSERT(expr, diagnostic)
+# define _STLP_DEBUG_CHECK(expr)
+#endif /* _STLP_DEBUG */
+
+#if defined (_STLP_ASSERTIONS)
+
+# if !defined (_STLP_ASSERT_MSG_TRAILER)
+# define _STLP_ASSERT_MSG_TRAILER
+# endif
+
+// dwa 12/30/98 - if _STLP_DEBUG_MESSAGE is defined, the user can supply own definition.
+# if !defined (_STLP_DEBUG_MESSAGE)
+# define __stl_debug_message __stl_debugger::_Message
+# else
+extern void __stl_debug_message(const char * format_str, ...);
+# endif
+
+// fbp: if _STLP_DEBUG_TERMINATE is defined, the user can supply own definition.
+# if !defined (_STLP_DEBUG_TERMINATE)
+# define __stl_debug_terminate __stl_debugger::_Terminate
+# else
+extern void __stl_debug_terminate();
+# endif
+
+#endif
+
+#if defined (_STLP_ASSERTIONS) && !defined (_STLP_LINK_TIME_INSTANTIATION)
+# include <stl/debug/_debug.c>
+#endif
+
+#endif /* DEBUG_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_deque.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_deque.h
new file mode 100644
index 0000000..f5c5ff5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_deque.h
@@ -0,0 +1,414 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_DEQUE_H
+#define _STLP_INTERNAL_DBG_DEQUE_H
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+#define _STLP_NON_DBG_DEQUE _STLP_PRIV _STLP_NON_DBG_NAME(deque) <_Tp,_Alloc>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Tp, class _Alloc>
+inline _Tp* value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_DEQUE >&)
+{ return (_Tp*)0; }
+template <class _Tp, class _Alloc>
+inline random_access_iterator_tag iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_DEQUE >&)
+{ return random_access_iterator_tag(); }
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class deque :
+#if !defined (__DMC__)
+ private
+#endif
+ _STLP_PRIV __construct_checker<_STLP_NON_DBG_DEQUE >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ , public __stlport_class<deque<_Tp, _Alloc> >
+#endif
+{
+ typedef deque<_Tp,_Alloc> _Self;
+ typedef _STLP_NON_DBG_DEQUE _Base;
+ typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_DEQUE > _ConstructCheck;
+
+public:
+ // Basic types
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+
+ // Iterators
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Nonconst_traits<value_type> > > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Const_traits<value_type> > > const_iterator;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+protected:
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+ void _Invalidate_all()
+ { _M_iter_list._Invalidate_all(); }
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list,__it); }
+ void _Invalidate_iterators(const iterator& __first, const iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+public:
+ // Basic accessors
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ reference operator[](size_type __n) {
+ _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
+ return _M_non_dbg_impl[__n];
+ }
+ const_reference operator[](size_type __n) const {
+ _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
+ return _M_non_dbg_impl[__n];
+ }
+
+ reference at(size_type __n) { return _M_non_dbg_impl.at(__n); }
+ const_reference at(size_type __n) const { return _M_non_dbg_impl.at(__n); }
+
+ reference front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ const_reference front() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ reference back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+ const_reference back() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+
+ // Constructor, destructor.
+ explicit deque(const allocator_type& __a = allocator_type()) :
+ _M_non_dbg_impl(__a), _M_iter_list(&_M_non_dbg_impl) {}
+ deque(const _Self& __x) :
+ _ConstructCheck(__x), _M_non_dbg_impl(__x._M_non_dbg_impl),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit deque(size_type __n, const value_type& __x = _Tp(),
+#else
+ deque(size_type __n, const value_type& __x,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type()) :
+ _M_non_dbg_impl(__n, __x, __a), _M_iter_list(&_M_non_dbg_impl) {}
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit deque(size_type __n) :
+ _M_non_dbg_impl(__n), _M_iter_list(&_M_non_dbg_impl) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ deque(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last), __a),
+ _M_iter_list(&_M_non_dbg_impl) {
+ }
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last)),
+ _M_iter_list(&_M_non_dbg_impl) {
+ }
+# endif
+#else
+ deque(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first, __last, __a),
+ _M_iter_list(&_M_non_dbg_impl) {
+ }
+
+ deque(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first._M_iterator, __last._M_iterator, __a),
+ _M_iter_list(&_M_non_dbg_impl) {
+ }
+#endif
+
+ _Self& operator=(const _Self& __x) {
+ if (this != &__x) {
+ _Invalidate_all();
+ _M_non_dbg_impl = __x._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+
+ void swap(_Self& __x) {
+ _M_iter_list._Swap_owners(__x._M_iter_list);
+ _M_non_dbg_impl.swap(__x._M_non_dbg_impl);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public:
+ void assign(size_type __n, const _Tp& __val) {
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__n, __val);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#else
+ void assign(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__first._M_iterator, __last._M_iterator);
+ }
+ void assign(const value_type *__first, const value_type *__last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__first, __last);
+ }
+#endif
+
+public: // push_* and pop_*
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back(const value_type& __t = _Tp()) {
+#else
+ void push_back(const value_type& __t) {
+#endif
+ _Invalidate_all();
+ _M_non_dbg_impl.push_back(__t);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back() {
+ _Invalidate_all();
+ _M_non_dbg_impl.push_back();
+ }
+#endif
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front(const value_type& __t = _Tp()) {
+#else
+ void push_front(const value_type& __t) {
+#endif
+ _Invalidate_all();
+ _M_non_dbg_impl.push_front(__t);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front() {
+ _Invalidate_all();
+ _M_non_dbg_impl.push_front();
+ }
+#endif
+
+ void pop_back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _Invalidate_iterator(end());
+ _M_non_dbg_impl.pop_back();
+ }
+
+ void pop_front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _Invalidate_iterator(begin());
+ _M_non_dbg_impl.pop_front();
+ }
+
+public: // Insert
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const value_type& __x = _Tp()) {
+#else
+ iterator insert(iterator __pos, const value_type& __x) {
+#endif
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Invalidate_all();
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert(__pos._M_iterator, __x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Invalidate_all();
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert(__pos._M_iterator));
+ }
+#endif
+
+ void insert(iterator __pos, size_type __n, const value_type& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ if (__n != 0) _Invalidate_all();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __n, __x);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ // We perform invalidate first to detect self referencing in __check_range as __first and __last
+ // will have been invalidated.
+ if (__first != __last) _Invalidate_all();
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ void insert(iterator __pos,
+ const value_type* __first, const value_type* __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ if (__first != __last) _Invalidate_all();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first, __last);
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ //Sequence requirements 23.1.1 Table 67:
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
+ if (__first != __last) _Invalidate_all();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+
+ void insert(iterator __pos,
+ iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ //Sequence requirements 23.1.1 Table 67:
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
+ if (__first != __last) _Invalidate_all();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+#endif
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _Tp()) {
+#else
+ void resize(size_type __new_size, const value_type& __x) {
+#endif
+ if (__new_size != size()) {
+ if ((__new_size > size()) || (__new_size < size() - 1))
+ _Invalidate_all();
+ else
+ _Invalidate_iterator(end());
+ }
+ _M_non_dbg_impl.resize(__new_size, __x);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type new_size) { resize(new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif
+
+ // Erase
+ iterator erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ if (__pos._M_iterator == _M_non_dbg_impl.begin()) {
+ _Invalidate_iterator(__pos);
+ } else {
+ typename _Base::iterator tmp = --(_M_non_dbg_impl.end());
+ if (__pos._M_iterator == tmp)
+ _Invalidate_iterator(__pos);
+ else
+ _Invalidate_all();
+ }
+ return iterator (&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
+ }
+
+ iterator erase(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ if (!empty()) {
+ if (__first._M_iterator == _M_non_dbg_impl.begin() ||
+ __last._M_iterator == _M_non_dbg_impl.end())
+ _Invalidate_iterators(__first, __last);
+ else
+ _Invalidate_all();
+ }
+ return iterator (&_M_iter_list, _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator));
+ }
+
+ void clear() {
+ _Invalidate_all();
+ _M_non_dbg_impl.clear();
+ }
+};
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_DEQUE
+
+#endif /* _STLP_INTERNAL_DEQUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_hashtable.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_hashtable.h
new file mode 100644
index 0000000..523f7e3
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_hashtable.h
@@ -0,0 +1,340 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_HASHTABLE_H
+#define _STLP_INTERNAL_DBG_HASHTABLE_H
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap,
+// unordered_set, unordered_map, unordered_multiset, unordered_multimap
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Key, class _Equal>
+class _DbgEqual {
+public:
+ _DbgEqual() {}
+ _DbgEqual(const _Equal& __eq) : _M_non_dbg_eq(__eq) {}
+ _DbgEqual(const _DbgEqual& __eq) : _M_non_dbg_eq(__eq._M_non_dbg_eq) {}
+
+#if !defined (_STLP_USE_CONTAINERS_EXTENSION)
+ bool operator () (const _Key& __lhs, const _Key& __rhs) const
+#else
+ template <class _Kp1, class _Kp2>
+ bool operator () (const _Kp1& __lhs, const _Kp2& __rhs) const
+#endif
+ {
+#if !defined (_STLP_USE_CONTAINERS_EXTENSION)
+ _STLP_VERBOSE_ASSERT(_M_non_dbg_eq(__rhs, __lhs) == _M_non_dbg_eq(__lhs, __rhs), _StlMsg_INVALID_EQUIVALENT_PREDICATE)
+#endif
+ return _M_non_dbg_eq(__lhs, __rhs) ? true : false;
+ }
+
+ _Equal non_dbg_key_eq() const { return _M_non_dbg_eq; }
+private:
+ _Equal _M_non_dbg_eq;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+#define _STLP_NON_DBG_HT \
+_STLP_PRIV _STLP_NON_DBG_NAME(hashtable) <_Val, _Key, _HF, _Traits, _ExK, _STLP_PRIV _DbgEqual<_Key, _EqK>, _All>
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Val, class _Key, class _HF,
+ class _ExK, class _EqK, class _All>
+inline _Val*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_HT >&)
+{ return (_Val*)0; }
+
+template <class _Val, class _Key, class _HF,
+ class _ExK, class _EqK, class _All>
+inline forward_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_HT >&)
+{ return forward_iterator_tag(); }
+#endif
+
+template <class _Val, class _Key, class _HF,
+ class _Traits, class _ExK, class _EqK, class _All>
+class hashtable {
+ typedef hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All> _Self;
+ typedef _STLP_NON_DBG_HT _Base;
+
+ typedef typename _Traits::_NonConstTraits _NonConstTraits;
+ typedef typename _Traits::_ConstTraits _ConstTraits;
+ typedef typename _Traits::_NonConstLocalTraits _NonConstLocalTraits;
+ typedef typename _Traits::_ConstLocalTraits _ConstLocalTraits;
+
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+public:
+ typedef _Key key_type;
+ typedef _HF hasher;
+ typedef _EqK key_equal;
+
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_NonConstTraits> > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_ConstTraits> > const_iterator;
+ //typedef _STLP_PRIV _DBG_iter<_Base, _DbgTraits<_NonConstLocalTraits> > local_iterator;
+ typedef iterator local_iterator;
+ //typedef _STLP_PRIV _DBG_iter<_Base, _DbgTraits<_ConstLocalTraits> > const_local_iterator;
+ typedef const_iterator const_local_iterator;
+
+ typedef typename _Base::iterator _Base_iterator;
+ typedef typename _Base::const_iterator _Base_const_iterator;
+
+ hasher hash_funct() const { return _M_non_dbg_impl.hash_funct(); }
+ key_equal key_eq() const { return _M_non_dbg_impl.key_eq().non_dbg_key_eq(); }
+
+private:
+ void _Invalidate_iterator(const const_iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
+ void _Invalidate_iterators(const const_iterator& __first, const const_iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+public:
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+
+ hashtable(size_type __n,
+ const _HF& __hf,
+ const _EqK& __eql,
+ const _ExK& __ext,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __hf, __eql, __ext, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ hashtable(size_type __n,
+ const _HF& __hf,
+ const _EqK& __eql,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __hf, __eql, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ hashtable(const _Self& __ht)
+ : _M_non_dbg_impl(__ht._M_non_dbg_impl),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ hashtable(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+
+ _Self& operator=(const _Self& __ht) {
+ if (this != &__ht) {
+ //Should not invalidate end iterator
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl = __ht._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ void swap(_Self& __ht) {
+ _M_iter_list._Swap_owners(__ht._M_iter_list);
+ _M_non_dbg_impl.swap(__ht._M_non_dbg_impl);
+ }
+
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ local_iterator begin(size_type __n) {
+ //TODO: Add checks for iterator locality -> avoids comparison between different bucket iterators
+ _STLP_VERBOSE_ASSERT((__n < bucket_count()), _StlMsg_INVALID_ARGUMENT)
+ return local_iterator(&_M_iter_list, _M_non_dbg_impl.begin(__n));
+ }
+ local_iterator end(size_type __n) {
+ //TODO: Add checks for iterator locality -> avoids comparison between different bucket iterators
+ _STLP_VERBOSE_ASSERT((__n < bucket_count()), _StlMsg_INVALID_ARGUMENT)
+ return local_iterator(&_M_iter_list, _M_non_dbg_impl.end(__n));
+ }
+
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_local_iterator begin(size_type __n) const {
+ //TODO: Add checks for iterator locality -> avoids comparison between different bucket iterators
+ _STLP_VERBOSE_ASSERT((__n < bucket_count()), _StlMsg_INVALID_ARGUMENT)
+ return const_local_iterator(&_M_iter_list, _M_non_dbg_impl.begin(__n));
+ }
+ const_local_iterator end(size_type __n) const {
+ //TODO: Add checks for iterator locality -> avoids comparison between different bucket iterators
+ _STLP_VERBOSE_ASSERT((__n < bucket_count()), _StlMsg_INVALID_ARGUMENT)
+ return const_local_iterator(&_M_iter_list, _M_non_dbg_impl.end(__n));
+ }
+
+ pair<iterator, bool> insert_unique(const value_type& __obj) {
+ pair<_Base_iterator, bool> __res = _M_non_dbg_impl.insert_unique(__obj);
+ return pair<iterator, bool>(iterator(&_M_iter_list, __res.first), __res.second);
+ }
+
+ iterator insert_equal(const value_type& __obj)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.insert_equal(__obj)); }
+
+ pair<iterator, bool> insert_unique_noresize(const value_type& __obj) {
+ pair<_Base_iterator, bool> __res = _M_non_dbg_impl.insert_unique_noresize(__obj);
+ return pair<iterator, bool>(iterator(&_M_iter_list, __res.first), __res.second);
+ }
+
+ iterator insert_equal_noresize(const value_type& __obj)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.insert_equal_noresize(__obj)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert_unique(_InputIterator __f, _InputIterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ _M_non_dbg_impl.insert_unique(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l));
+ }
+
+ template <class _InputIterator>
+ void insert_equal(_InputIterator __f, _InputIterator __l){
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ _M_non_dbg_impl.insert_equal(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l));
+ }
+
+#else
+ void insert_unique(const value_type* __f, const value_type* __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
+ _M_non_dbg_impl.insert_unique(__f, __l);
+ }
+
+ void insert_equal(const value_type* __f, const value_type* __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
+ _M_non_dbg_impl.insert_equal(__f, __l);
+ }
+
+ void insert_unique(const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ _M_non_dbg_impl.insert_unique(__f._M_iterator, __l._M_iterator);
+ }
+
+ void insert_equal(const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ _M_non_dbg_impl.insert_equal(__f._M_iterator, __l._M_iterator);
+ }
+#endif
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __key)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.find(__key)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __key) const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.find(__key)); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __key) const { return _M_non_dbg_impl.count(__key); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __key) {
+ pair<_Base_iterator, _Base_iterator> __res = _M_non_dbg_impl.equal_range(__key);
+ return pair<iterator,iterator> (iterator(&_M_iter_list,__res.first),
+ iterator(&_M_iter_list,__res.second));
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __key) const {
+ pair <_Base_const_iterator, _Base_const_iterator> __res = _M_non_dbg_impl.equal_range(__key);
+ return pair<const_iterator,const_iterator> (const_iterator(&_M_iter_list,__res.first),
+ const_iterator(&_M_iter_list,__res.second));
+ }
+
+ size_type erase(const key_type& __key) {
+ pair<iterator, iterator> __p = equal_range(__key);
+ size_type __n = _STLP_STD::distance(__p.first, __p.second);
+ _Invalidate_iterators(__p.first, __p.second);
+ _M_non_dbg_impl.erase(__p.first._M_iterator, __p.second._M_iterator);
+ return __n;
+ }
+
+ void erase(const const_iterator& __it) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__it))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __it))
+ _Invalidate_iterator(__it);
+ _M_non_dbg_impl.erase(__it._M_iterator);
+ }
+ void erase(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last,
+ const_iterator(begin()), const_iterator(end())))
+ _Invalidate_iterators(__first, __last);
+ _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator);
+ }
+
+ void rehash(size_type __num_buckets_hint) { _M_non_dbg_impl.rehash(__num_buckets_hint); }
+ void resize(size_type __num_elements_hint) { _M_non_dbg_impl.resize(__num_elements_hint); }
+
+ void clear() {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.clear();
+ }
+
+ reference _M_insert(const value_type& __obj) { return _M_non_dbg_impl._M_insert(__obj); }
+
+ size_type bucket_count() const { return _M_non_dbg_impl.bucket_count(); }
+ size_type max_bucket_count() const { return _M_non_dbg_impl.max_bucket_count(); }
+ size_type elems_in_bucket(size_type __n) const {
+ _STLP_VERBOSE_ASSERT((__n < bucket_count()), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.elems_in_bucket(__n);
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type bucket(const _KT& __k) const { return _M_non_dbg_impl.bucket(__k); }
+
+ float load_factor() const { return _M_non_dbg_impl.load_factor(); }
+ float max_load_factor() const { return _M_non_dbg_impl.max_load_factor(); }
+ void max_load_factor(float __z) {
+ _STLP_VERBOSE_ASSERT((__z > 0.0f), _StlMsg_INVALID_ARGUMENT)
+ _M_non_dbg_impl.max_load_factor(__z);
+ }
+};
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_HT
+
+#endif /* _STLP_INTERNAL_HASHTABLE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_iterator.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_iterator.h
new file mode 100644
index 0000000..b2c8956
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_iterator.h
@@ -0,0 +1,457 @@
+/*
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_DBG_ITERATOR_H
+#define _STLP_DBG_ITERATOR_H
+
+#ifndef _STLP_INTERNAL_PAIR_H
+# include <stl/_pair.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+//============================================================
+
+template <class _Iterator>
+void _Decrement(_Iterator& __it, const bidirectional_iterator_tag &)
+{ --__it; }
+
+template <class _Iterator>
+void _Decrement(_Iterator& __it, const random_access_iterator_tag &)
+{ --__it; }
+
+template <class _Iterator>
+void _Decrement(_Iterator& __it, const forward_iterator_tag &)
+{ _STLP_ASSERT(0) }
+
+template <class _Iterator>
+void _Advance(_Iterator&, ptrdiff_t, const forward_iterator_tag &)
+{ _STLP_ASSERT(0) }
+
+template <class _Iterator>
+void _Advance(_Iterator& __it, ptrdiff_t, const bidirectional_iterator_tag &)
+{ _STLP_ASSERT(0) }
+
+template <class _Iterator>
+void _Advance(_Iterator& __it, ptrdiff_t __n, const random_access_iterator_tag &)
+{ __it += __n; }
+
+template <class _Iterator>
+ptrdiff_t _DBG_distance(const _Iterator& __x, const _Iterator& __y, const random_access_iterator_tag &)
+{ return __x - __y; }
+
+template <class _Iterator>
+ptrdiff_t _DBG_distance(const _Iterator&, const _Iterator&, const forward_iterator_tag &) {
+ _STLP_ASSERT(0)
+ return 0;
+}
+
+template <class _Iterator>
+ptrdiff_t _DBG_distance(const _Iterator&, const _Iterator&, const bidirectional_iterator_tag &) {
+ _STLP_ASSERT(0)
+ return 0;
+}
+
+template <class _Iterator>
+bool _CompareIt(const _Iterator&, const _Iterator&, const forward_iterator_tag &) {
+ _STLP_ASSERT(0)
+ return false;
+}
+
+template <class _Iterator>
+bool _CompareIt(const _Iterator&, const _Iterator&, const bidirectional_iterator_tag &) {
+ _STLP_ASSERT(0)
+ return false;
+}
+
+template <class _Iterator>
+bool _CompareIt(const _Iterator& __x, const _Iterator& __y, const random_access_iterator_tag &)
+{ return __x < __y; }
+
+template <class _Iterator>
+bool _Dereferenceable(const _Iterator& __it)
+{ return (__it._Get_container_ptr() != 0) && !(__it._M_iterator == (__it._Get_container_ptr())->end()); }
+
+template <class _Iterator>
+bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const forward_iterator_tag &)
+{ return (__n == 1) && _Dereferenceable(__it); }
+
+template <class _Iterator>
+bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const bidirectional_iterator_tag &) {
+ typedef typename _Iterator::_Container_type __container_type;
+ __container_type* __c = __it._Get_container_ptr();
+ return (__c != 0) && ((__n == 1 && __it._M_iterator != __c->end() ) ||
+ (__n == -1 && __it._M_iterator != __c->begin()));
+}
+
+template <class _Iterator>
+bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const random_access_iterator_tag &) {
+ typedef typename _Iterator::_Container_type __container_type;
+ __container_type* __c = __it._Get_container_ptr();
+ if (__c == 0) return false;
+ ptrdiff_t __new_pos = (__it._M_iterator - __c->begin()) + __n;
+ return (__new_pos >= 0) && (__STATIC_CAST(typename __container_type::size_type, __new_pos) <= __c->size());
+}
+
+
+template <class _Container>
+struct _DBG_iter_base : public __owned_link {
+public:
+ typedef typename _Container::value_type value_type;
+ typedef typename _Container::reference reference;
+ typedef typename _Container::pointer pointer;
+ typedef ptrdiff_t difference_type;
+ //private:
+ typedef typename _Container::iterator _Nonconst_iterator;
+ typedef typename _Container::const_iterator _Const_iterator;
+ typedef _Container _Container_type;
+
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+ typedef typename iterator_traits<_Const_iterator>::iterator_category _Iterator_category;
+#else
+ typedef typename _Container::_Iterator_category _Iterator_category;
+#endif
+ typedef _Iterator_category iterator_category;
+
+ _DBG_iter_base() : __owned_link(0) {}
+ _DBG_iter_base(const __owned_list* __c, const _Const_iterator& __it) :
+#if defined(__HP_aCC) && (__HP_aCC < 60000)
+ __owned_link(__c), _M_iterator(*__REINTERPRET_CAST(const _Nonconst_iterator *, &__it)) {}
+#else
+ __owned_link(__c), _M_iterator(*(const _Nonconst_iterator*)&__it) {}
+#endif
+ _Container* _Get_container_ptr() const {
+ return (_Container*)__stl_debugger::_Get_container_ptr(this);
+ }
+
+ void __increment();
+ void __decrement();
+ void __advance(ptrdiff_t __n);
+
+// protected:
+ _Nonconst_iterator _M_iterator;
+};
+
+template <class _Container>
+inline void _DBG_iter_base<_Container>::__increment() {
+ _STLP_DEBUG_CHECK(_Incrementable(*this, 1, _Iterator_category()))
+ ++_M_iterator;
+}
+
+template <class _Container>
+inline void _DBG_iter_base<_Container>::__decrement() {
+ _STLP_DEBUG_CHECK(_Incrementable(*this, -1, _Iterator_category()))
+ _Decrement(_M_iterator, _Iterator_category());
+}
+
+template <class _Container>
+inline void _DBG_iter_base<_Container>::__advance(ptrdiff_t __n) {
+ _STLP_DEBUG_CHECK(_Incrementable(*this, __n, _Iterator_category()))
+ _Advance(_M_iterator, __n, _Iterator_category());
+}
+
+template <class _Container>
+ptrdiff_t operator-(const _DBG_iter_base<_Container>& __x,
+ const _DBG_iter_base<_Container>& __y ) {
+ typedef typename _DBG_iter_base<_Container>::_Iterator_category _Iterator_category;
+ _STLP_DEBUG_CHECK(__check_same_owner(__x, __y))
+ return _DBG_distance(__x._M_iterator,__y._M_iterator, _Iterator_category());
+}
+
+template <class _Container, class _Traits>
+struct _DBG_iter_mid : public _DBG_iter_base<_Container> {
+ typedef _DBG_iter_mid<_Container, typename _Traits::_NonConstTraits> _Nonconst_self;
+ typedef typename _Container::iterator _Nonconst_iterator;
+ typedef typename _Container::const_iterator _Const_iterator;
+
+ _DBG_iter_mid() {}
+
+ explicit _DBG_iter_mid(const _Nonconst_self& __it) :
+ _DBG_iter_base<_Container>(__it) {}
+
+ _DBG_iter_mid(const __owned_list* __c, const _Const_iterator& __it) :
+ _DBG_iter_base<_Container>(__c, __it) {}
+};
+
+template <class _Container, class _Traits>
+struct _DBG_iter : public _DBG_iter_mid<_Container, _Traits> {
+ typedef _DBG_iter_base<_Container> _Base;
+public:
+ typedef typename _Base::value_type value_type;
+ typedef typename _Base::difference_type difference_type;
+ typedef typename _Traits::reference reference;
+ typedef typename _Traits::pointer pointer;
+
+ typedef typename _Base::_Nonconst_iterator _Nonconst_iterator;
+ typedef typename _Base::_Const_iterator _Const_iterator;
+
+private:
+ typedef _DBG_iter<_Container, _Traits> _Self;
+ typedef _DBG_iter_mid<_Container, typename _Traits::_NonConstTraits> _Nonconst_mid;
+
+public:
+
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+ typedef typename _Base::iterator_category iterator_category;
+#endif
+ typedef typename _Base::_Iterator_category _Iterator_category;
+
+public:
+ _DBG_iter() {}
+ // boris : real type of iter would be nice
+ _DBG_iter(const __owned_list* __c, const _Const_iterator& __it) :
+ _DBG_iter_mid<_Container, _Traits>(__c, __it) {}
+
+ // This allows conversions from iterator to const_iterator without being
+ // redundant with the copy constructor below.
+ _DBG_iter(const _Nonconst_mid& __rhs) :
+ _DBG_iter_mid<_Container, _Traits>(__rhs) {}
+
+ _DBG_iter(const _Self& __rhs) :
+ _DBG_iter_mid<_Container, _Traits>(__rhs) {}
+
+ // This allows conversions from iterator to const_iterator without being
+ // redundant with the copy assignment operator below.
+ _Self& operator=(const _Nonconst_mid& __rhs) {
+ (_Base&)*this = __rhs;
+ return *this;
+ }
+
+ _Self& operator=(const _Self& __rhs) {
+ (_Base&)*this = __rhs;
+ return *this;
+ }
+
+ reference operator*() const;
+
+ _STLP_DEFINE_ARROW_OPERATOR
+
+ _Self& operator++() {
+ this->__increment();
+ return *this;
+ }
+ _Self operator++(int) {
+ _Self __tmp = *this;
+ this->__increment();
+ return __tmp;
+ }
+ _Self& operator--() {
+ this->__decrement();
+ return *this;
+ }
+ _Self operator--(int) {
+ _Self __tmp = *this;
+ this->__decrement();
+ return __tmp;
+ }
+
+ _Self& operator+=(difference_type __n) {
+ this->__advance(__n);
+ return *this;
+ }
+
+ _Self& operator-=(difference_type __n) {
+ this->__advance(-__n);
+ return *this;
+ }
+ _Self operator+(difference_type __n) const {
+ _Self __tmp(*this);
+ __tmp.__advance(__n);
+ return __tmp;
+ }
+ _Self operator-(difference_type __n) const {
+ _Self __tmp(*this);
+ __tmp.__advance(-__n);
+ return __tmp;
+ }
+ reference operator[](difference_type __n) const { return *(*this + __n); }
+};
+
+template <class _Container, class _Traits>
+inline
+#if defined (_STLP_NESTED_TYPE_PARAM_BUG)
+_STLP_TYPENAME_ON_RETURN_TYPE _Traits::reference
+#else
+_STLP_TYPENAME_ON_RETURN_TYPE _DBG_iter<_Container, _Traits>::reference
+#endif
+_DBG_iter<_Container, _Traits>::operator*() const {
+ _STLP_DEBUG_CHECK(_Dereferenceable(*this))
+ _STLP_DEBUG_CHECK(_Traits::_Check(*this))
+ return *this->_M_iterator;
+}
+
+template <class _Container>
+inline bool
+operator==(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
+ _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
+ return __x._M_iterator == __y._M_iterator;
+}
+
+template <class _Container>
+inline bool
+operator<(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
+ _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
+ typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
+ return _CompareIt(__x._M_iterator , __y._M_iterator, _Category());
+}
+
+template <class _Container>
+inline bool
+operator>(const _DBG_iter_base<_Container>& __x,
+ const _DBG_iter_base<_Container>& __y) {
+ typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
+ return _CompareIt(__y._M_iterator , __x._M_iterator, _Category());
+}
+
+template <class _Container>
+inline bool
+operator>=(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
+ _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
+ typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
+ return !_CompareIt(__x._M_iterator , __y._M_iterator, _Category());
+}
+
+template <class _Container>
+inline bool
+operator<=(const _DBG_iter_base<_Container>& __x,
+ const _DBG_iter_base<_Container>& __y) {
+ typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
+ return !_CompareIt(__y._M_iterator , __x._M_iterator, _Category());
+}
+
+template <class _Container>
+inline bool
+operator!=(const _DBG_iter_base<_Container>& __x,
+ const _DBG_iter_base<_Container>& __y) {
+ _STLP_DEBUG_CHECK(__check_same_or_null_owner(__x, __y))
+ return __x._M_iterator != __y._M_iterator;
+}
+
+//------------------------------------------
+
+template <class _Container, class _Traits>
+inline _DBG_iter<_Container, _Traits>
+operator+(ptrdiff_t __n, const _DBG_iter<_Container, _Traits>& __it) {
+ _DBG_iter<_Container, _Traits> __tmp(__it);
+ return __tmp += __n;
+}
+
+
+template <class _Iterator>
+inline _Iterator _Non_Dbg_iter(_Iterator __it)
+{ return __it; }
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _Container, class _Traits>
+inline typename _DBG_iter<_Container, _Traits>::_Nonconst_iterator
+_Non_Dbg_iter(const _DBG_iter<_Container, _Traits>& __it)
+{ return __it._M_iterator; }
+#endif
+
+/*
+ * Helper classes to check iterator range or pointer validity
+ * at construction time.
+ */
+template <class _Container>
+class __construct_checker {
+ typedef typename _Container::value_type value_type;
+protected:
+ __construct_checker() {}
+
+ __construct_checker(const value_type* __p) {
+ _STLP_VERBOSE_ASSERT((__p != 0), _StlMsg_INVALID_ARGUMENT)
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ __construct_checker(const _InputIter& __f, const _InputIter& __l) {
+ typedef typename _IsIntegral<_InputIter>::_Ret _Integral;
+ _M_check_dispatch(__f, __l, _Integral());
+ }
+
+ template <class _Integer>
+ void _M_check_dispatch(_Integer , _Integer, const __true_type& /*IsIntegral*/) {}
+
+ template <class _InputIter>
+ void _M_check_dispatch(const _InputIter& __f, const _InputIter& __l, const __false_type& /*IsIntegral*/) {
+ _STLP_DEBUG_CHECK(__check_range(__f,__l))
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ __construct_checker(const value_type* __f, const value_type* __l) {
+ _STLP_DEBUG_CHECK(__check_ptr_range(__f,__l))
+ }
+
+ typedef _DBG_iter_base<_Container> _IteType;
+ __construct_checker(const _IteType& __f, const _IteType& __l) {
+ _STLP_DEBUG_CHECK(__check_range(__f,__l))
+ }
+#endif
+#if defined (__BORLANDC__)
+ ~__construct_checker(){}
+#endif
+};
+
+#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
+# if defined (_STLP_NESTED_TYPE_PARAM_BUG) ||\
+ (defined (__SUNPRO_CC) && __SUNPRO_CC < 0x600)
+# define _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS 1
+# endif
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Container>
+inline ptrdiff_t*
+distance_type(const _STLP_PRIV _DBG_iter_base<_Container>&) { return (ptrdiff_t*) 0; }
+
+# if !defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Container>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _STLP_PRIV _DBG_iter_base<_Container>::value_type*
+value_type(const _STLP_PRIV _DBG_iter_base<_Container>&) {
+ typedef _STLP_TYPENAME _STLP_PRIV _DBG_iter_base<_Container>::value_type _Val;
+ return (_Val*)0;
+}
+
+template <class _Container>
+inline _STLP_TYPENAME_ON_RETURN_TYPE _STLP_PRIV _DBG_iter_base<_Container>::_Iterator_category
+iterator_category(const _STLP_PRIV _DBG_iter_base<_Container>&) {
+ typedef _STLP_TYPENAME _STLP_PRIV _DBG_iter_base<_Container>::_Iterator_category _Category;
+ return _Category();
+}
+# endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* INTERNAL_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_list.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_list.h
new file mode 100644
index 0000000..c45e1e7
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_list.h
@@ -0,0 +1,495 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_LIST_H
+#define _STLP_INTERNAL_DBG_LIST_H
+
+#ifndef _STLP_INTERNAL_ALGO_H
+# include <stl/_algo.h>
+#endif
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+#define _STLP_NON_DBG_LIST _STLP_PRIV _STLP_NON_DBG_NAME(list) <_Tp, _Alloc>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Tp, class _Alloc>
+inline _Tp*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_LIST >&)
+{ return (_Tp*)0; }
+template <class _Tp, class _Alloc>
+inline bidirectional_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_LIST >&)
+{ return bidirectional_iterator_tag(); }
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class list :
+#if !defined (__DMC__)
+ private
+#endif
+ _STLP_PRIV __construct_checker<_STLP_NON_DBG_LIST >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ , public __stlport_class<list<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_NON_DBG_LIST _Base;
+ typedef list<_Tp, _Alloc> _Self;
+ typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_LIST > _ConstructCheck;
+
+public:
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+
+public:
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Nonconst_traits<value_type> > > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Const_traits<value_type> > > const_iterator;
+
+ _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
+
+private:
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
+ void _Invalidate_iterators(const iterator& __first, const iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+ typedef typename _Base::iterator _Base_iterator;
+
+public:
+ explicit list(const allocator_type& __a = allocator_type()) :
+ _M_non_dbg_impl(__a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(size_type __n, const _Tp& __x = _Tp(),
+#else
+ list(size_type __n, const _Tp& __x,
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __x, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(size_type __n)
+ : _M_non_dbg_impl(__n), _M_iter_list(&_M_non_dbg_impl) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ list(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last), __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last)),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# endif
+#else
+
+ list(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first, __last, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+ list(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first._M_iterator, __last._M_iterator, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+#endif
+
+ list(const _Self& __x) :
+ _ConstructCheck(__x),
+ _M_non_dbg_impl(__x._M_non_dbg_impl) , _M_iter_list(&_M_non_dbg_impl) {}
+
+ _Self& operator=(const _Self& __x) {
+ if (this != &__x) {
+ //Should not invalidate end iterator
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl = __x._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+
+ // those are here to enforce checking
+ reference front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ const_reference front() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ reference back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+ const_reference back() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+
+ void swap(_Self& __x) {
+ _M_iter_list._Swap_owners(__x._M_iter_list);
+ _M_non_dbg_impl.swap(__x._M_non_dbg_impl);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const _Tp& __x = _Tp()) {
+#else
+ iterator insert(iterator __pos, const _Tp& __x) {
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ return iterator(&_M_iter_list,_M_non_dbg_impl.insert(__pos._M_iterator, __x) );
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos) { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ void insert(iterator __pos, const _Tp* __first, const _Tp* __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first, __last);
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+# if (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ _STLP_STD_DEBUG_CHECK(__check_if_not_owner(&_M_iter_list, __first))
+# endif
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+ void insert(iterator __pos,
+ iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+# if (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ _STLP_STD_DEBUG_CHECK(__check_if_not_owner(&_M_iter_list, __first))
+# endif
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+#endif
+
+ void insert(iterator __pos, size_type __n, const _Tp& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _M_non_dbg_impl.insert(__pos._M_iterator, __n, __x);
+ }
+
+ void push_back(const_reference __x) { _M_non_dbg_impl.push_back(__x); }
+ void pop_back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _Invalidate_iterator(end());
+ _M_non_dbg_impl.pop_back();
+ }
+
+ void push_front(const_reference __x) { _M_non_dbg_impl.push_front(__x); }
+ void pop_front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _Invalidate_iterator(begin());
+ _M_non_dbg_impl.pop_front();
+ }
+
+ iterator erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _Invalidate_iterator(__pos);
+ return iterator(&_M_iter_list,_M_non_dbg_impl.erase(__pos._M_iterator));
+ }
+ iterator erase(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _Invalidate_iterators(__first, __last);
+ return iterator (&_M_iter_list, _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator));
+ }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const _Tp& __x = _Tp()) {
+#else
+ void resize(size_type __new_size, const _Tp& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _Base_iterator __i = _M_non_dbg_impl.begin();
+ size_type __len = 0;
+ for ( ; __i != _M_non_dbg_impl.end() && __len < __new_size; ++__i, ++__len);
+
+ if (__len == __new_size)
+ erase(iterator(&_M_iter_list, __i), end());
+ else // __i == end()
+ _M_non_dbg_impl.insert(_M_non_dbg_impl.end(), __new_size - __len, __x);
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ _Invalidate_iterators(begin(), end());
+ }
+#else
+ void assign(const _Tp* __first, const _Tp* __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _M_non_dbg_impl.assign(__first, __last);
+ _Invalidate_iterators(begin(), end());
+ }
+
+ void assign(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.assign(__first._M_iterator, __last._M_iterator);
+ _Invalidate_iterators(begin(), end());
+ }
+
+ void assign(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.assign(__first._M_iterator, __last._M_iterator);
+ _Invalidate_iterators(begin(), end());
+ }
+#endif
+
+ void assign(size_type __n, const _Tp& __val) {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.assign(__n, __val);
+ }
+
+ void remove(const _Tp& __x) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ while (__first != __last) {
+ _Base_iterator __next = __first;
+ ++__next;
+ if (__x == *__first) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __first));
+ _M_non_dbg_impl.erase(__first);
+ }
+ __first = __next;
+ }
+ }
+
+ void clear() {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.clear();
+ }
+
+public:
+ void splice(iterator __pos, _Self& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl);
+#if (_STLP_DEBUG_LEVEL != _STLP_STANDARD_DBG_LEVEL)
+ if (get_allocator() == __x.get_allocator())
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ else
+#endif
+ // Std: 23.2.2.4:4
+ // end iterator is not invalidated:
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+
+ void splice(iterator __pos, _Self& __x, iterator __i) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__i))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&(__x._M_iter_list),__i))
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl, __i._M_iterator);
+#if (_STLP_DEBUG_LEVEL != _STLP_STANDARD_DBG_LEVEL)
+ if (get_allocator() == __x.get_allocator())
+ _STLP_PRIV __change_ite_owner(__i, &_M_iter_list);
+ else
+#endif
+ // Std: 23.2.2.4:7
+ __x._Invalidate_iterator(__i);
+ }
+
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, __x.begin(), __x.end()))
+ _STLP_DEBUG_CHECK(this == &__x ? !_STLP_PRIV __check_range(__pos, __first, __last) : true)
+#if (_STLP_DEBUG_LEVEL != _STLP_STANDARD_DBG_LEVEL)
+ if (this->get_allocator() == __x.get_allocator())
+ _STLP_PRIV __change_range_owner(__first, __last, &_M_iter_list);
+ else
+#endif
+ // Std: 23.2.2.4:12
+ __x._Invalidate_iterators(__first, __last);
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl, __first._M_iterator, __last._M_iterator);
+ }
+
+ void merge(_Self& __x) {
+#if !defined (_STLP_NO_EXTENSIONS)
+ _STLP_DEBUG_CHECK(_STLP_STD::is_sorted(begin()._M_iterator, end()._M_iterator))
+ _STLP_DEBUG_CHECK(_STLP_STD::is_sorted(__x.begin()._M_iterator, __x.end()._M_iterator))
+#endif
+ _M_non_dbg_impl.merge(__x._M_non_dbg_impl);
+ if (this->get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+ void reverse() {
+ _M_non_dbg_impl.reverse();
+ }
+ void unique() {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ if (__first == __last) return;
+ _Base_iterator __next = __first;
+ while (++__next != __last) {
+ if (*__first == *__next) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __next));
+ _M_non_dbg_impl.erase(__next);
+ }
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+ void sort() {
+ _M_non_dbg_impl.sort();
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Predicate>
+ void remove_if(_Predicate __pred) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ while (__first != __last) {
+ _Base_iterator __next = __first;
+ ++__next;
+ if (__pred(*__first)) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __first));
+ _M_non_dbg_impl.erase(__first);
+ }
+ __first = __next;
+ }
+ }
+
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __binary_pred) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ if (__first == __last) return;
+ _Base_iterator __next = __first;
+ while (++__next != __last) {
+ if (__binary_pred(*__first, *__next)) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __next));
+ _M_non_dbg_impl.erase(__next);
+ }
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self& __x, _StrictWeakOrdering __comp) {
+#if !defined (_STLP_NO_EXTENSIONS)
+ _STLP_DEBUG_CHECK(_STLP_STD::is_sorted(_M_non_dbg_impl.begin(), _M_non_dbg_impl.end(), __comp))
+ _STLP_DEBUG_CHECK(_STLP_STD::is_sorted(__x.begin()._M_iterator, __x.end()._M_iterator, __comp))
+#endif
+ _M_non_dbg_impl.merge(__x._M_non_dbg_impl, __comp);
+ if (this->get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp) {
+ _M_non_dbg_impl.sort(__comp);
+ }
+#endif
+};
+
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_LIST
+
+#endif /* _STLP_INTERNAL_LIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_slist.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_slist.h
new file mode 100644
index 0000000..2eeaf36
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_slist.h
@@ -0,0 +1,613 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_SLIST_H
+#define _STLP_INTERNAL_DBG_SLIST_H
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+#define _STLP_NON_DBG_SLIST _STLP_PRIV _STLP_NON_DBG_NAME(slist) <_Tp, _Alloc>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Tp, class _Alloc>
+inline _Tp*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_SLIST >&)
+{ return (_Tp*)0; }
+
+template <class _Tp, class _Alloc>
+inline forward_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_SLIST >&)
+{ return forward_iterator_tag(); }
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/*
+ * slist special debug traits version.
+ */
+template <class _Traits>
+struct _SlistDbgTraits : _Traits {
+ typedef _SlistDbgTraits<typename _Traits::_ConstTraits> _ConstTraits;
+ typedef _SlistDbgTraits<typename _Traits::_NonConstTraits> _NonConstTraits;
+
+ /*
+ * We don't want the before_begin iterator to return false at _Dereferenceable
+ * call to do not break the current debug framework but calling * operator should
+ * fail.
+ */
+ template <class _Iterator>
+ static bool _Check(const _Iterator& __it)
+ { return !(__it._M_iterator == (__it._Get_container_ptr())->before_begin()); }
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class slist :
+#if !defined (__DMC__)
+ private
+#endif
+ _STLP_PRIV __construct_checker<_STLP_NON_DBG_SLIST >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ , public __stlport_class<slist<_Tp, _Alloc> >
+#endif
+{
+private:
+ typedef _STLP_NON_DBG_SLIST _Base;
+ typedef slist<_Tp,_Alloc> _Self;
+ typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_SLIST > _ConstructCheck;
+
+public:
+
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _SlistDbgTraits<_Nonconst_traits<value_type> > > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _SlistDbgTraits<_Const_traits<value_type> > > const_iterator;
+
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+private:
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
+ void _Invalidate_iterators(const iterator& __first, const iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+ typedef typename _Base::iterator _Base_iterator;
+
+public:
+ explicit slist(const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__a) , _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(size_type __n, const value_type& __x = _Tp(),
+#else
+ slist(size_type __n, const value_type& __x,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __x, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(size_type __n) : _M_non_dbg_impl(__n) , _M_iter_list(&_M_non_dbg_impl) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ slist(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because _M_insert_after_range
+ // already does them.
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last), __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last)),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# endif
+#else
+
+ slist(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first, __last, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ slist(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type() )
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first._M_iterator, __last._M_iterator, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+#endif
+
+ slist(const _Self& __x) :
+ _ConstructCheck(__x),
+ _M_non_dbg_impl(__x._M_non_dbg_impl), _M_iter_list(&_M_non_dbg_impl) {}
+
+ _Self& operator= (const _Self& __x) {
+ if (this != &__x) {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl = __x._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ ~slist() {}
+
+ void assign(size_type __n, const value_type& __val) {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.assign(__n, __val);
+ }
+
+ iterator before_begin()
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.before_begin()); }
+ const_iterator before_begin() const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.before_begin()); }
+
+ iterator begin()
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator begin() const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin());}
+
+ iterator end()
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator end() const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+
+ void swap(_Self& __x) {
+ _M_iter_list._Swap_owners(__x._M_iter_list);
+ _M_non_dbg_impl.swap(__x._M_non_dbg_impl);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ reference front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return _M_non_dbg_impl.front();
+ }
+ const_reference front() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return _M_non_dbg_impl.front();
+ }
+ void push_front(const_reference __x) { _M_non_dbg_impl.push_front(__x); }
+ void pop_front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _M_non_dbg_impl.pop_front();
+ }
+ iterator previous(const_iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ return iterator(&_M_iter_list, _M_non_dbg_impl.previous(__pos._M_iterator));
+ }
+ const_iterator previous(const_iterator __pos) const {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ return const_iterator(&_M_iter_list, _M_non_dbg_impl.previous(__pos._M_iterator));
+ }
+
+public:
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos, const value_type& __x = _Tp()) {
+#else
+ iterator insert_after(iterator __pos, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ return iterator(&_M_iter_list,_M_non_dbg_impl.insert_after(__pos._M_iterator, __x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos) {
+ return insert_after(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp));
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert_after(iterator __pos, size_type __n, const value_type& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _M_non_dbg_impl.insert_after(__pos._M_iterator, __n, __x);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#else
+ void assign(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.assign(__first._M_iterator, __last._M_iterator);
+ }
+ void assign(const value_type *__first, const value_type *__last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.assign(__first, __last);
+ }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InIter>
+ void insert_after(iterator __pos, _InIter __first, _InIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert_after(__pos._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+
+ template <class _InIter>
+ void insert(iterator __pos, _InIter __first, _InIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#else
+ void insert_after(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert_after(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+ void insert_after(iterator __pos,
+ const value_type* __first, const value_type* __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _M_non_dbg_impl.insert_after(__pos._M_iterator, __first, __last);
+ }
+
+ void insert(iterator __pos, const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ }
+ void insert(iterator __pos, const value_type* __first,
+ const value_type* __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first, __last))
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first, __last);
+ }
+#endif
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos, const value_type& __x = _Tp()) {
+#else
+ iterator insert(iterator __pos, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert(__pos._M_iterator, __x));
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos) {
+ return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp));
+ }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert(iterator __pos, size_type __n, const value_type& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ _M_non_dbg_impl.insert(__pos._M_iterator, __n, __x);
+ }
+
+public:
+ iterator erase_after(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ iterator __tmp = __pos; ++__tmp;
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__tmp))
+ _Invalidate_iterator(__tmp);
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase_after(__pos._M_iterator));
+ }
+ iterator erase_after(iterator __before_first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__before_first))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__before_first, __last, begin(), end()))
+ iterator __tmp = __before_first; ++__tmp;
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__tmp))
+ _Invalidate_iterators(__tmp, __last);
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase_after(__before_first._M_iterator, __last._M_iterator));
+ }
+
+ iterator erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_VERBOSE_ASSERT(__pos._M_iterator != _M_non_dbg_impl.before_begin(), _StlMsg_INVALID_ARGUMENT)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Invalidate_iterator(__pos);
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
+ }
+ iterator erase(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _Invalidate_iterators(__first, __last);
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator));
+ }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _Tp()) {
+#else
+ void resize(size_type __new_size, const value_type& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _M_non_dbg_impl.resize(__new_size, __x);
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void clear() {
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.clear();
+ }
+
+public:
+ // Removes all of the elements from the list __x to *this, inserting
+ // them immediately after __pos. __x must not be *this. Complexity:
+ // linear in __x.size().
+ void splice_after(iterator __pos, _Self& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_VERBOSE_ASSERT(!(&__x == this), _StlMsg_INVALID_ARGUMENT)
+ _M_non_dbg_impl.splice_after(__pos._M_iterator, __x._M_non_dbg_impl);
+ if (get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+
+ // Moves the element that follows __prev to *this, inserting it immediately
+ // after __pos. This is constant time.
+ void splice_after(iterator __pos, _Self& __x, iterator __prev) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__prev))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&__x._M_iter_list, __prev))
+ iterator __elem = __prev; ++__elem;
+ _M_non_dbg_impl.splice_after(__pos._M_iterator, __x._M_non_dbg_impl, __prev._M_iterator);
+ if (get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV __change_ite_owner(__elem, &_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterator(__elem);
+ }
+ }
+
+ // Moves the range [__before_first + 1, __before_last + 1) to *this,
+ // inserting it immediately after __pos. This is constant time.
+ void splice_after(iterator __pos, _Self& __x,
+ iterator __before_first, iterator __before_last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__before_first, __before_last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&__x._M_iter_list, __before_first))
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__before_first))
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__before_last))
+ iterator __first = __before_first; ++__first;
+ iterator __last = __before_last; ++__last;
+ if (get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV __change_range_owner(__first, __last, &_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__first, __last);
+ }
+ _M_non_dbg_impl.splice_after(__pos._M_iterator, __x._M_non_dbg_impl,
+ __before_first._M_iterator, __before_last._M_iterator);
+ }
+
+ void splice(iterator __pos, _Self& __x) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ _STLP_VERBOSE_ASSERT(!(&__x == this), _StlMsg_INVALID_ARGUMENT)
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl);
+ if (get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+
+ void splice(iterator __pos, _Self& __x, iterator __i) {
+ //__pos should be owned by *this and not be the before_begin iterator
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ //__i should be dereferenceable, not before_begin and be owned by __x
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__i))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&__x._M_iter_list ,__i))
+ _STLP_VERBOSE_ASSERT(!(__i == __x.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ if (get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV __change_ite_owner(__i, &_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterator(__i);
+ }
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl, __i._M_iterator);
+ }
+
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _STLP_VERBOSE_ASSERT(!(__pos._M_iterator == _M_non_dbg_impl.before_begin()), _StlMsg_INVALID_ARGUMENT)
+ //_STLP_VERBOSE_ASSERT(&__x != this, _StlMsg_INVALID_ARGUMENT)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, __x.begin(), __x.end()))
+ if (get_allocator() == __x.get_allocator()) {
+ _STLP_PRIV __change_range_owner(__first, __last, &_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__first, __last);
+ }
+ _M_non_dbg_impl.splice(__pos._M_iterator, __x._M_non_dbg_impl,
+ __first._M_iterator, __last._M_iterator);
+ }
+
+ void reverse()
+ { _M_non_dbg_impl.reverse(); }
+
+ void remove(const value_type& __val) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ while (__first != __last) {
+ _Base_iterator __next = __first;
+ ++__next;
+ if (__val == *__first) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __first));
+ _M_non_dbg_impl.erase(__first);
+ }
+ __first = __next;
+ }
+ }
+ void unique() {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ if (__first == __last) return;
+ _Base_iterator __next = __first;
+ while (++__next != __last) {
+ if (*__first == *__next) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __next));
+ _M_non_dbg_impl.erase(__next);
+ }
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+ void merge(_Self& __x) {
+ _STLP_VERBOSE_ASSERT(&__x != this, _StlMsg_INVALID_ARGUMENT)
+#if !defined (_STLP_NO_EXTENSIONS)
+ /* comments below due to bug in GCC compilers: ones eat all memory and die if see
+ * something like namespace_name::func_name() - ptr
+ */
+ _STLP_DEBUG_CHECK( /* _STLP_STD:: */ is_sorted(_M_non_dbg_impl.begin(), _M_non_dbg_impl.end()))
+ _STLP_DEBUG_CHECK( /* _STLP_STD:: */ is_sorted(__x.begin()._M_iterator, __x.end()._M_iterator))
+#endif
+ _M_non_dbg_impl.merge(__x._M_non_dbg_impl);
+ if (get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+ void sort() {
+ _M_non_dbg_impl.sort();
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Predicate>
+ void remove_if(_Predicate __pred) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ while (__first != __last) {
+ _Base_iterator __next = __first;
+ ++__next;
+ if (__pred(*__first)) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __first));
+ _M_non_dbg_impl.erase(__first);
+ }
+ __first = __next;
+ }
+ }
+
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __pred) {
+ _Base_iterator __first = _M_non_dbg_impl.begin(), __last = _M_non_dbg_impl.end();
+ if (__first == __last) return;
+ _Base_iterator __next = __first;
+ while (++__next != __last) {
+ if (__binary_pred(*__first, *__next)) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __next));
+ _M_non_dbg_impl.erase(__next);
+ }
+ else
+ __first = __next;
+ __next = __first;
+ }
+ }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self& __x, _StrictWeakOrdering __ord) {
+ _STLP_VERBOSE_ASSERT(&__x != this, _StlMsg_INVALID_ARGUMENT)
+#if !defined (_STLP_NO_EXTENSIONS)
+ /* comments below due to bug in GCC compilers: ones eat all memory and die if see
+ * something like namespace_name::func_name() - ptr
+ */
+ _STLP_DEBUG_CHECK( /* _STLP_STD:: */ is_sorted(_M_non_dbg_impl.begin(), _M_non_dbg_impl.end(), __ord))
+ _STLP_DEBUG_CHECK( /* _STLP_STD:: */ is_sorted(__x.begin()._M_iterator, __x.end()._M_iterator, __ord))
+#endif
+ _M_non_dbg_impl.merge(__x._M_non_dbg_impl, __ord);
+ if (get_allocator() == __x.get_allocator()) {
+ __x._M_iter_list._Set_owner(_M_iter_list);
+ }
+ else {
+ __x._Invalidate_iterators(__x.begin(), __x.end());
+ }
+ }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp)
+ { _M_non_dbg_impl.sort(__comp); }
+#endif
+};
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_SLIST
+
+#endif /* _STLP_INTERNAL_DBG_SLIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_string.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_string.h
new file mode 100644
index 0000000..49f7ab2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_string.h
@@ -0,0 +1,828 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+#ifndef _STLP_DBG_STRING_H
+#define _STLP_DBG_STRING_H
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define _STLP_NON_DBG_STRING_NAME _STLP_NON_DBG_NAME(str)
+#define _STLP_NON_DBG_STRING _STLP_PRIV _STLP_NON_DBG_STRING_NAME <_CharT, _Traits, _Alloc>
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _CharT,class _Traits, class _Alloc>
+inline _CharT*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_STRING >&)
+{ return (_CharT*)0; }
+template <class _CharT, class _Traits, class _Alloc>
+inline random_access_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_STRING >&)
+{ return random_access_iterator_tag(); }
+#endif
+
+template <class _CharT, class _Traits, class _Alloc>
+class basic_string :
+#if !defined (__DMC__)
+ private
+#else
+ public
+#endif
+ _STLP_PRIV __construct_checker<_STLP_NON_DBG_STRING >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (basic_string)
+ , public __stlport_class<basic_string<_CharT, _Traits, _Alloc> >
+#endif
+{
+protected:
+ typedef _STLP_NON_DBG_STRING _Base;
+ typedef basic_string<_CharT, _Traits, _Alloc> _Self;
+ typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_STRING > _ConstructCheck;
+ typedef typename _IsPOD<_CharT>::_Type _Char_Is_POD;
+
+public:
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+ typedef typename _Base::traits_type traits_type;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Nonconst_traits<value_type> > > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_Const_traits<value_type> > > const_iterator;
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+public: // Constructor, destructor, assignment.
+ typedef typename _Base::_Reserve_t _Reserve_t;
+
+private:
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+ void _Invalidate_all()
+ { _M_iter_list._Invalidate_all(); }
+ void _Compare_Capacity (size_type __old_capacity) {
+ if (this->capacity() > __old_capacity) {
+ _Invalidate_all();
+ }
+ }
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
+ void _Invalidate_iterators(const iterator& __f, const iterator& __l)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __f, __l); }
+
+public:
+#include <stl/_string_npos.h>
+
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+
+ explicit basic_string(const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__a), _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(_Reserve_t __r, size_t __n,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__r, __n, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(const _Self& __s)
+ : _ConstructCheck(__s),
+ _M_non_dbg_impl(__s._M_non_dbg_impl), _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(const _Self& __s, size_type __pos, size_type __n = npos,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__s._M_non_dbg_impl, __pos, __n, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(const _CharT* __s, size_type __n,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__s), _M_non_dbg_impl(__s, __n, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(const _CharT* __s,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__s),
+ _M_non_dbg_impl(__s, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+ basic_string(size_type __n, _CharT __c,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __c, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ basic_string(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base >(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ basic_string(const _CharT* __f, const _CharT* __l,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__f, __l),
+ _M_non_dbg_impl(__f, __l, __a), _M_iter_list(&_M_non_dbg_impl) {
+ }
+ basic_string(const_iterator __f, const_iterator __l,
+ const allocator_type & __a = allocator_type())
+ : _ConstructCheck(__f, __l),
+ _M_non_dbg_impl(__f._M_iterator, __l._M_iterator, __a), _M_iter_list(&_M_non_dbg_impl) {
+ }
+#else
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l,
+ const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _ConstructCheck(__f, __l),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l), __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ basic_string(_InputIterator __f, _InputIterator __l)
+ : _ConstructCheck(__f, __l),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l)),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# endif
+#endif
+
+private:
+ // constructor from non-debug version for substr
+ basic_string (const _Base& __x)
+ : _M_non_dbg_impl(__x), _M_iter_list(&_M_non_dbg_impl) {}
+
+public:
+ _Self& operator=(const _Self& __s) {
+ if (this != &__s) {
+ assign(__s);
+ }
+ return *this;
+ }
+
+ _Self& operator=(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return assign(__s);
+ }
+
+ _Self& operator=(_CharT __c) {
+ return assign(1, __c);
+ }
+
+ // Iterators.
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ // Size, capacity, etc.
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type length() const { return _M_non_dbg_impl.length(); }
+ size_t max_size() const { return _M_non_dbg_impl.max_size(); }
+
+ void resize(size_type __n, _CharT __c) {
+ if (__n > capacity())
+ _Invalidate_all();
+ else if (__n < size())
+ _Invalidate_iterators(begin() + __n, end());
+ _M_non_dbg_impl.resize(__n, __c);
+ }
+ void resize(size_type __n) { resize(__n, _STLP_DEFAULT_CONSTRUCTED(_CharT)); }
+ size_type capacity() const { return _M_non_dbg_impl.capacity(); }
+
+ void reserve(size_type __s = 0) {
+ if (__s > capacity()) _Invalidate_all();
+ _M_non_dbg_impl.reserve(__s);
+ }
+
+ void clear() {
+ _Invalidate_all();
+ _M_non_dbg_impl.clear();
+ }
+
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+
+ const_reference operator[](size_type __n) const {
+ _STLP_VERBOSE_ASSERT(__n <= this->size(), _StlMsg_OUT_OF_BOUNDS);
+ return _M_non_dbg_impl[__n];
+ }
+
+ reference operator[](size_type __n) {
+ _STLP_VERBOSE_ASSERT(__n < this->size(), _StlMsg_OUT_OF_BOUNDS)
+ return _M_non_dbg_impl[__n];
+ }
+
+ const_reference at(size_type __n) const { return _M_non_dbg_impl.at(__n); }
+ reference at(size_type __n) { return _M_non_dbg_impl.at(__n); }
+
+ // Append, operator+=, push_back.
+ _Self& operator+=(const _Self& __s) { return append(__s); }
+ _Self& operator+=(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return append(__s);
+ }
+ _Self& operator+=(_CharT __c) { return append(1, __c); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ _Self& append(_InputIter __first, _InputIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || \
+ !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
+ _Self& append(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__f, __l);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& append(const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__f._M_iterator, __l._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+#endif
+
+ _Self& append(const _Self& __s) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__s._M_non_dbg_impl);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& append(const _Self& __s, size_type __pos, size_type __n) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__s._M_non_dbg_impl, __pos, __n);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& append(const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__s, __n);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& append(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.append(__s);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& append(size_type __n, _CharT __c) {
+ size_type __old_capacity = this->capacity();
+ _M_non_dbg_impl.append(__n, __c);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ void push_back(_CharT __c) {
+ size_type __old_capacity = this->capacity();
+ _M_non_dbg_impl.push_back(__c);
+ _Compare_Capacity(__old_capacity);
+ }
+
+ void pop_back() {
+ _Invalidate_iterator(this->end());
+ _M_non_dbg_impl.pop_back();
+ }
+
+ // Assign
+ _Self& assign(const _Self& __s) {
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__s._M_non_dbg_impl);
+ return *this;
+ }
+
+ _Self& assign(const _Self& __s, size_type __pos, size_type __n) {
+ if (__pos < __s.size()) {
+ _Invalidate_all();
+ }
+ _M_non_dbg_impl.assign(__s._M_non_dbg_impl, __pos, __n);
+ return *this;
+ }
+
+ _Self& assign(const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__s, __s + __n);
+ return *this;
+ }
+
+ _Self& assign(const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__s);
+ return *this;
+ }
+
+ _Self& assign(size_type __n, _CharT __c) {
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__n, __c);
+ return *this;
+ }
+
+#if defined(_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ inline _Self& assign(_InputIter __first, _InputIter __last) {
+ _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ return *this;
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || \
+ !defined (_STLP_NO_METHOD_SPECIALIZATION) && !defined (_STLP_NO_EXTENSIONS)
+ _Self& assign(const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__f, __l);
+ return *this;
+ }
+ _Self& assign(const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__f._M_iterator, __l._M_iterator);
+ return *this;
+ }
+#endif
+
+ // Insert
+ _Self& insert(size_type __pos, const _Self& __s) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos, __s._M_non_dbg_impl);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _Self& __s,
+ size_type __beg, size_type __n) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos, __s._M_non_dbg_impl, __beg, __n);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos, __s, __n);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& insert(size_type __pos, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return insert(__pos, __s, _Traits::length(__s));
+ }
+
+ _Self& insert(size_type __pos, size_type __n, _CharT __c) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos, __n, __c);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ iterator insert(iterator __p, _CharT __c) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ size_type __old_capacity = capacity();
+ typename _Base::iterator __ret = _M_non_dbg_impl.insert(__p._M_iterator, __c);
+ _Compare_Capacity(__old_capacity);
+ return iterator(&_M_iter_list, __ret);
+ }
+
+ void insert(iterator __p, size_t __n, _CharT __c) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__p._M_iterator, __n, __c);
+ _Compare_Capacity(__old_capacity);
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ void insert(iterator __p, _InputIter __first, _InputIter __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
+
+ size_type __old_capacity = this->capacity();
+ _M_non_dbg_impl.insert(__p._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ void insert(iterator __p, const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f,__l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__p._M_iterator, __f, __l);
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ // Those overloads are necessary to check self referencing correctly in non debug
+ // basic_string implementation
+ void insert(iterator __p, const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f,__l))
+# if (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ _STLP_STD_DEBUG_CHECK(__check_if_not_owner(&_M_iter_list, __f))
+# endif
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__p._M_iterator, __f._M_iterator, __l._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ }
+ void insert(iterator __p, iterator __f, iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__p))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f,__l))
+# if (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ _STLP_STD_DEBUG_CHECK(__check_if_not_owner(&_M_iter_list, __f))
+# endif
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__p._M_iterator, __f._M_iterator, __l._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+
+ // Erase.
+ _Self& erase(size_type __pos = 0, size_type __n = npos) {
+ if (__pos < size()) {
+ _Invalidate_iterators(begin() + __pos, end());
+ }
+ _M_non_dbg_impl.erase(__pos, __n);
+ return *this;
+ }
+ iterator erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list,__pos))
+ _Invalidate_iterators(__pos, end());
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
+ }
+ iterator erase(iterator __f, iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
+ _Invalidate_iterators(__f, end());
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__f._M_iterator, __l._M_iterator));
+ }
+
+ // Substring.
+ _Self substr(size_type __pos = 0, size_type __n = npos) const
+ { return _M_non_dbg_impl.substr(__pos, __n); }
+
+ // Replace. (Conceptually equivalent to erase followed by insert.)
+ _Self& replace(size_type __pos, size_type __n, const _Self& __s) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__pos, __n, __s._M_non_dbg_impl);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos1, size_type __n1, const _Self& __s,
+ size_type __pos2, size_type __n2) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__pos1, __n1, __s._M_non_dbg_impl, __pos2, __n2);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__pos, __n1, __s, __n2);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__pos, __n1, __s);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) {
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__pos, __n1, __n2, __c);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(iterator __f, iterator __l, const _Self& __s) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s._M_non_dbg_impl);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(iterator __f, iterator __l, const _CharT* __s, size_type __n) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s, __n);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(iterator __f, iterator __l, const _CharT* __s) {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __s);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+ _Self& replace(iterator __f, iterator __l, size_type __n, _CharT __c) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l, begin(), end()))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__f._M_iterator, __l._M_iterator, __n, __c);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIter>
+ _Self& replace(iterator __first, iterator __last,
+ _InputIter __f, _InputIter __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__f), _STLP_PRIV _Non_Dbg_iter(__l));
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ _Self& replace(iterator __first, iterator __last,
+ const _CharT* __f, const _CharT* __l) {
+ _STLP_FIX_LITERAL_BUG(__f)_STLP_FIX_LITERAL_BUG(__l)
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__f, __l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator, __f, __l);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ _Self& replace(iterator __first, iterator __last,
+ const_iterator __f, const_iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator,
+ __f._M_iterator, __l._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+ _Self& replace(iterator __first, iterator __last,
+ iterator __f, iterator __l) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__f, __l))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.replace(__first._M_iterator, __last._M_iterator,
+ __f._M_iterator, __l._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ return *this;
+ }
+#endif
+
+ // Other modifier member functions.
+ void swap(_Self& __s) {
+ _M_iter_list._Swap_owners(__s._M_iter_list);
+ _M_non_dbg_impl.swap(__s._M_non_dbg_impl);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ int compare(const _Self& __s) const
+ { return _M_non_dbg_impl.compare(__s._M_non_dbg_impl); }
+ int compare(size_type __pos, size_type __n, const _Self& __s) const
+ { return _M_non_dbg_impl.compare(__pos, __n, __s._M_non_dbg_impl); }
+ int compare(size_type __pos1, size_type __n1, const _Self& __s,
+ size_type __pos2, size_type __n2) const
+ { return _M_non_dbg_impl.compare(__pos1, __n1, __s._M_non_dbg_impl, __pos2, __n2); }
+ int compare(const _CharT* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_non_dbg_impl.compare(__s);
+ }
+ int compare(size_type __pos, size_type __n, const _CharT* __s) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_non_dbg_impl.compare(__pos, __n, __s);
+ }
+ int compare(size_type __pos1, size_type __n1, const _CharT* __s,
+ size_type __n2) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ return _M_non_dbg_impl.compare(__pos1, __n1, __s, __n2);
+ }
+
+ // Helper functions for compare.
+ static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
+ const _CharT* __f2, const _CharT* __l2)
+ { return _Base::_M_compare(__f1, __l1, __f2, __l2); }
+ static int _STLP_CALL _M_compare(const_iterator __f1, const_iterator __l1,
+ const _CharT* __f2, const _CharT* __l2)
+ { return _Base::_M_compare(__f1._M_iterator, __l1._M_iterator, __f2, __l2); }
+ static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
+ const_iterator __f2, const_iterator __l2)
+ { return _Base::_M_compare(__f1, __l1, __f2._M_iterator, __l2._M_iterator); }
+ static int _STLP_CALL _M_compare(const_iterator __f1, const_iterator __l1,
+ const_iterator __f2, const_iterator __l2)
+ { return _Base::_M_compare(__f1._M_iterator, __l1._M_iterator, __f2._M_iterator, __l2._M_iterator); }
+
+ const _CharT* c_str() const { return _M_non_dbg_impl.c_str(); }
+ const _CharT* data() const { return _M_non_dbg_impl.data(); }
+
+ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
+ { return _M_non_dbg_impl.copy(__s, __n, __pos); }
+
+ // find.
+ size_type find(const _Self& __s, size_type __pos = 0) const
+ { return _M_non_dbg_impl.find(__s._M_non_dbg_impl, __pos); }
+ size_type find(const _CharT* __s, size_type __pos = 0) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find(__s, __pos);
+ }
+ size_type find(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find(__s, __pos, __n);
+ }
+ // WIE: Versant schema compiler 5.2.2 ICE workaround
+ size_type find(_CharT __c) const { return find(__c, 0); }
+ size_type find(_CharT __c, size_type __pos /* = 0 */) const
+ { return _M_non_dbg_impl.find(__c, __pos); }
+
+ // rfind.
+ size_type rfind(const _Self& __s, size_type __pos = npos) const
+ { return _M_non_dbg_impl.rfind(__s._M_non_dbg_impl, __pos); }
+ size_type rfind(const _CharT* __s, size_type __pos = npos) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.rfind(__s, __pos);
+ }
+ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.rfind(__s, __pos, __n);
+ }
+ size_type rfind(_CharT __c, size_type __pos = npos) const
+ { return _M_non_dbg_impl.rfind(__c, __pos); }
+
+ // find_first_of
+ size_type find_first_of(const _Self& __s, size_type __pos = 0) const
+ { return _M_non_dbg_impl.find_first_of(__s._M_non_dbg_impl, __pos); }
+ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_first_of(__s, __pos);
+ }
+ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_first_of(__s, __pos, __n);
+ }
+ size_type find_first_of(_CharT __c, size_type __pos = 0) const
+ { return _M_non_dbg_impl.find_first_of(__c, __pos); }
+
+ // find_last_of
+ size_type find_last_of(const _Self& __s, size_type __pos = npos) const
+ { return _M_non_dbg_impl.find_last_of(__s._M_non_dbg_impl, __pos); }
+ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_last_of(__s, __pos);
+ }
+ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_last_of(__s, __pos, __n);
+ }
+ size_type find_last_of(_CharT __c, size_type __pos = npos) const
+ { return _M_non_dbg_impl.rfind(__c, __pos); }
+
+ // find_first_not_of
+ size_type find_first_not_of(const _Self& __s, size_type __pos = 0) const
+ { return _M_non_dbg_impl.find_first_not_of(__s._M_non_dbg_impl, __pos); }
+ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_first_not_of(__s, __pos);
+ }
+ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_first_not_of(__s, __pos, __n);
+ }
+ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const
+ { return _M_non_dbg_impl.find_first_not_of(__c, __pos); }
+
+ // find_last_not_of
+ size_type find_last_not_of(const _Self& __s, size_type __pos = npos) const
+ { return _M_non_dbg_impl.find_last_not_of(__s._M_non_dbg_impl, __pos); }
+ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_last_not_of(__s, __pos);
+ }
+ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const {
+ _STLP_FIX_LITERAL_BUG(__s)
+ _STLP_VERBOSE_ASSERT((__s != 0), _StlMsg_INVALID_ARGUMENT)
+ return _M_non_dbg_impl.find_last_not_of(__s, __pos, __n);
+ }
+ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const
+ { return _M_non_dbg_impl.find_last_not_of(__c, __pos); }
+
+#if defined (_STLP_USE_TEMPLATE_EXPRESSION)
+# include <stl/debug/_string_sum_methods.h>
+#endif
+};
+
+// This is a hook to instantiate STLport exports in a designated DLL
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+_STLP_EXPORT_TEMPLATE_CLASS __construct_checker<_STLP_NON_DBG_STRING_NAME <char, char_traits<char>, allocator<char> > >;
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_EXPORT_TEMPLATE_CLASS basic_string<char, char_traits<char>, allocator<char> >;
+# if defined (_STLP_HAS_WCHAR_T)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+_STLP_EXPORT_TEMPLATE_CLASS __construct_checker<_STLP_NON_DBG_STRING_NAME <wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >;
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_EXPORT_TEMPLATE_CLASS basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
+# endif
+#endif
+
+#undef _STLP_NON_DBG_STRING
+#undef _STLP_NON_DBG_STRING_NAME
+
+#if defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
+template <class _CharT, class _Traits, class _Alloc>
+const size_t basic_string<_CharT, _Traits, _Alloc>::npos = ~(size_t) 0;
+#endif
+
+#if defined (basic_string)
+_STLP_MOVE_TO_STD_NAMESPACE
+#undef basic_string
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_DBG_STRING */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_string_sum_methods.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_string_sum_methods.h
new file mode 100644
index 0000000..3fca194
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_string_sum_methods.h
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/*
+ * All the necessary methods used for template expressions with basic_string
+ * This file do not have to be macro guarded as it is only used in the _string.h
+ * file and it is a part of the basic_string definition.
+ */
+
+ template <class _Left, class _Right, class _StorageDir>
+ basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s)
+ : _M_non_dbg_impl(_Reserve_t(), __s.size(), __s.get_allocator()),
+ _M_iter_list(&_M_non_dbg_impl)
+ { _M_append_sum(__s, _M_non_dbg_impl); }
+
+ template <class _Left, class _Right, class _StorageDir>
+ basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ size_type __pos, size_type __n = npos,
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(_Reserve_t(), (__pos <= __s.size()) ? ((min) (__n, __s.size() - __pos)) : 0, __a),
+ _M_iter_list(&_M_non_dbg_impl) {
+ size_type __size = __s.size();
+ if (__pos > __size)
+ //This call will generate the necessary out of range exception:
+ _M_non_dbg_impl.at(0);
+ else
+ _M_append_sum_pos(__s, __pos, (min) (__n, __size - __pos), _M_non_dbg_impl);
+ }
+
+private:
+ _Base& _M_append_fast(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str)
+ { return __str += __c.getValue(); }
+ _Base& _M_append_fast(_CharT const* __s, size_type __s_size, _Base &__str)
+ { return __str.append(__s, __s_size); }
+ _Base& _M_append_fast(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str)
+ { return _M_append_fast(__s.c_str(), __s.size(), __str); }
+ _Base& _M_append_fast(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str)
+ { return _M_append_fast(__s.b_str(), __str); }
+ _Base& _M_append_fast(_Self const& __s, _Base &__str)
+ { return _M_append_fast(__s.data(), __s.size(), __str); }
+ _Base& _M_append_fast(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str)
+ { return __str; }
+ template <class _Left, class _Right, class _StorageDir>
+ _Base& _M_append_fast(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, _Base &__str)
+ { return _M_append_fast(__s.getRhs(), _M_append_fast(__s.getLhs(), __str)); }
+
+ _Base& _M_append_fast_pos(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str, size_type /*__pos*/, size_type __n) {
+ if (__n == 0)
+ return __str;
+ return __str += __c.getValue();
+ }
+ _Base& _M_append_fast_pos(_CharT const* __s, size_type __s_size, _Base &__str,
+ size_type __pos, size_type __n)
+ { return __str.append(__s + __pos, __s + __pos + (min)(__n, __s_size - __pos)); }
+ _Base& _M_append_fast_pos(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str,
+ size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.c_str(), __s.size(), __str, __pos, __n); }
+ _Base& _M_append_fast_pos(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str,
+ size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.b_str(), __str, __pos, __n); }
+ _Base& _M_append_fast_pos(_Self const& __s, _Base &__str, size_type __pos, size_type __n)
+ { return _M_append_fast_pos(__s.data(), __s.size(), __str, __pos, __n); }
+ _Base& _M_append_fast_pos(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str,
+ size_type /*__pos*/, size_type /*__n*/)
+ { return __str; }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _Base& _M_append_fast_pos(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ _Base &__str, size_type __pos, size_type __n) {
+ if (__n == 0) {
+ return __str;
+ }
+ size_type __lhs_size = __s.getLhs().size();
+ if (__pos < __lhs_size) {
+ if (__n < (__lhs_size - __pos)) {
+ return _M_append_fast_pos(__s.getLhs(), __str, __pos, __n);
+ } else {
+ return _M_append_fast_pos(__s.getRhs(), _M_append_fast_pos(__s.getLhs(), __str, __pos, __n),
+ 0, __n - (__lhs_size - __pos));
+ }
+ } else {
+ return _M_append_fast_pos(__s.getRhs(), __str, __pos - __lhs_size, __n);
+ }
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _Self& _M_append_sum (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ _Base &__impl) {
+ _M_append_fast(__s, __impl);
+ return *this;
+ }
+
+ template <class _Left, class _Right, class _StorageDir>
+ _Self& _M_append_sum_pos (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s,
+ size_type __pos, size_type __n, _Base &__impl) {
+ _M_non_dbg_impl.reserve(_M_non_dbg_impl.size() + (min) (__s.size() - __pos, __n));
+ _M_append_fast_pos(__s, __impl, __pos, __n);
+ return *this;
+ }
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_tree.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_tree.h
new file mode 100644
index 0000000..a32eda2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_tree.h
@@ -0,0 +1,317 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_TREE_H
+#define _STLP_INTERNAL_DBG_TREE_H
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
+# include <stl/_function_base.h>
+#endif
+
+#ifndef _STLP_INTERNAL_ALLOC_H
+# include <stl/_alloc.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Key, class _Compare>
+class _DbgCompare {
+public:
+ _DbgCompare() {}
+ _DbgCompare(const _Compare& __cmp) : _M_non_dbg_cmp(__cmp) {}
+ _DbgCompare(const _DbgCompare& __cmp) : _M_non_dbg_cmp(__cmp._M_non_dbg_cmp) {}
+
+#if !defined (_STLP_USE_CONTAINERS_EXTENSION)
+ bool operator () (const _Key& __lhs, const _Key& __rhs) const {
+#else
+ template <class _Kp1, class _Kp2>
+ bool operator () (const _Kp1& __lhs, const _Kp2& __rhs) const {
+#endif
+ if (_M_non_dbg_cmp(__lhs, __rhs)) {
+ return true;
+ }
+ return false;
+ }
+
+ _Compare non_dbg_key_comp() const { return _M_non_dbg_cmp; }
+private:
+ _Compare _M_non_dbg_cmp;
+};
+
+#define _STLP_NON_DBG_TREE _STLP_PRIV _STLP_NON_DBG_NAME(Rb_tree) <_Key, _STLP_PRIV _DbgCompare<_Key, _Compare>, _Value, _KeyOfValue, _Traits, _Alloc>
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+_STLP_MOVE_TO_STD_NAMESPACE
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc >
+inline _Value*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_TREE >&)
+{ return (_Value*)0; }
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits, class _Alloc >
+inline bidirectional_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_TREE >&)
+{ return bidirectional_iterator_tag(); }
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Key, class _Compare,
+ class _Value, class _KeyOfValue, class _Traits,
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Value>) >
+class _Rb_tree {
+ typedef _STLP_NON_DBG_TREE _Base;
+ typedef _Rb_tree<_Key, _Compare, _Value, _KeyOfValue, _Traits, _Alloc> _Self;
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+public:
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+ typedef typename _Base::key_type key_type;
+
+ typedef typename _Traits::_NonConstTraits _NonConstIteTraits;
+ typedef typename _Traits::_ConstTraits _ConstIteTraits;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_NonConstIteTraits> > iterator;
+ typedef _STLP_PRIV _DBG_iter<_Base, _STLP_PRIV _DbgTraits<_ConstIteTraits> > const_iterator;
+
+ _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
+
+private:
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list,__it); }
+ void _Invalidate_iterators(const iterator& __first, const iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+ typedef typename _Base::iterator _Base_iterator;
+ typedef typename _Base::const_iterator _Base_const_iterator;
+
+public:
+ _Rb_tree()
+ : _M_non_dbg_impl(), _M_iter_list(&_M_non_dbg_impl) {}
+ _Rb_tree(const _Compare& __comp)
+ : _M_non_dbg_impl(__comp), _M_iter_list(&_M_non_dbg_impl) {}
+ _Rb_tree(const _Compare& __comp, const allocator_type& __a)
+ : _M_non_dbg_impl(__comp, __a), _M_iter_list(&_M_non_dbg_impl) {}
+ _Rb_tree(const _Self& __x)
+ : _M_non_dbg_impl(__x._M_non_dbg_impl), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ _Rb_tree(__move_source<_Self> src):
+ _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+ ~_Rb_tree() {}
+
+ _Self& operator=(const _Self& __x) {
+ if (this != &__x) {
+ //Should not invalidate end iterator:
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl = __x._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+ _Compare key_comp() const { return _M_non_dbg_impl.key_comp().non_dbg_key_comp(); }
+
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const { return _M_non_dbg_impl.count(__x); }
+
+ void swap(_Self& __t) {
+ _M_non_dbg_impl.swap(__t._M_non_dbg_impl);
+ _M_iter_list._Swap_owners(__t._M_iter_list);
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __k)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.find(__k)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __k) const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.find(__k)); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.lower_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.lower_bound(__x)); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.upper_bound(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const
+ { return const_iterator(&_M_iter_list, _M_non_dbg_impl.upper_bound(__x)); }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range(const _KT& __x) {
+ return pair<iterator, iterator>(iterator(&_M_iter_list, _M_non_dbg_impl.lower_bound(__x)),
+ iterator(&_M_iter_list, _M_non_dbg_impl.upper_bound(__x)));
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const {
+ return pair<const_iterator,const_iterator>(const_iterator(&_M_iter_list, _M_non_dbg_impl.lower_bound(__x)),
+ const_iterator(&_M_iter_list, _M_non_dbg_impl.upper_bound(__x)));
+ }
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator,iterator> equal_range_unique(const _KT& __x) {
+ _STLP_STD::pair<_Base_iterator, _Base_iterator> __p;
+ __p = _M_non_dbg_impl.equal_range_unique(__x);
+ return pair<iterator, iterator>(iterator(&_M_iter_list, __p.first), iterator(&_M_iter_list, __p.second));
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range_unique(const _KT& __x) const {
+ _STLP_STD::pair<_Base_const_iterator, _Base_const_iterator> __p;
+ __p = _M_non_dbg_impl.equal_range_unique(__x);
+ return pair<const_iterator, const_iterator>(const_iterator(&_M_iter_list, __p.first),
+ const_iterator(&_M_iter_list, __p.second));
+ }
+
+ pair<iterator,bool> insert_unique(const value_type& __x) {
+ _STLP_STD::pair<_Base_iterator, bool> __res = _M_non_dbg_impl.insert_unique(__x);
+ return pair<iterator, bool>(iterator(&_M_iter_list, __res.first), __res.second);
+ }
+ iterator insert_equal(const value_type& __x)
+ { return iterator(&_M_iter_list, _M_non_dbg_impl.insert_equal(__x)); }
+
+ iterator insert_unique(iterator __pos, const value_type& __x) {
+ _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert_unique(__pos._M_iterator, __x));
+ }
+ iterator insert_equal(iterator __pos, const value_type& __x) {
+ _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __pos))
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert_equal(__pos._M_iterator, __x));
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template<class _InputIterator>
+ void insert_equal(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first,__last))
+ _M_non_dbg_impl.insert_equal(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+ template<class _InputIterator>
+ void insert_unique(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first,__last))
+ _M_non_dbg_impl.insert_unique(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#else
+ void insert_unique(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first,__last))
+ _M_non_dbg_impl.insert_unique(__first._M_iterator, __last._M_iterator);
+ }
+ void insert_unique(const value_type* __first, const value_type* __last) {
+ _STLP_DEBUG_CHECK(__check_ptr_range(__first,__last))
+ _M_non_dbg_impl.insert_unique(__first, __last);
+ }
+ void insert_equal(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first,__last))
+ _M_non_dbg_impl.insert_equal(__first._M_iterator, __last._M_iterator);
+ }
+ void insert_equal(const value_type* __first, const value_type* __last) {
+ _STLP_DEBUG_CHECK(__check_ptr_range(__first,__last))
+ _M_non_dbg_impl.insert_equal(__first, __last);
+ }
+#endif
+
+ void erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
+ _STLP_DEBUG_CHECK(_Dereferenceable(__pos))
+ _Invalidate_iterator(__pos);
+ _M_non_dbg_impl.erase(__pos._M_iterator);
+ }
+ size_type erase(const key_type& __x) {
+ pair<iterator, iterator> __p = equal_range(__x);
+ size_type __n = _STLP_STD::distance(__p.first._M_iterator, __p.second._M_iterator);
+ _Invalidate_iterators(__p.first, __p.second);
+ _M_non_dbg_impl.erase(__p.first._M_iterator, __p.second._M_iterator);
+ return __n;
+ }
+ size_type erase_unique(const key_type& __x) {
+ _Base_iterator __i = _M_non_dbg_impl.find(__x);
+ if (__i != _M_non_dbg_impl.end()) {
+ _Invalidate_iterator(iterator(&_M_iter_list, __i));
+ _M_non_dbg_impl.erase(__i);
+ return 1;
+ }
+ return 0;
+ }
+
+ void erase(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(__check_range(__first, __last, begin(), end()))
+ _Invalidate_iterators(__first, __last);
+ _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator);
+ }
+ void erase(const key_type* __first, const key_type* __last) {
+ while (__first != __last) erase(*__first++);
+ }
+
+ void clear() {
+ //should not invalidate end:
+ _Invalidate_iterators(begin(), end());
+ _M_non_dbg_impl.clear();
+ }
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_TREE
+
+#endif /* _STLP_INTERNAL_DBG_TREE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/debug/_vector.h b/6/sources/cxx-stl/stlport/stlport/stl/debug/_vector.h
new file mode 100644
index 0000000..c5800e9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/debug/_vector.h
@@ -0,0 +1,425 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_INTERNAL_DBG_VECTOR_H
+#define _STLP_INTERNAL_DBG_VECTOR_H
+
+#ifndef _STLP_DBG_ITERATOR_H
+# include <stl/debug/_iterator.h>
+#endif
+
+#define _STLP_NON_DBG_VECTOR _STLP_PRIV _STLP_NON_DBG_NAME(vector) <_Tp, _Alloc>
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
+template <class _Tp, class _Alloc>
+inline _Tp*
+value_type(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_VECTOR >&)
+{ return (_Tp*)0; }
+template <class _Tp, class _Alloc>
+inline random_access_iterator_tag
+iterator_category(const _STLP_PRIV _DBG_iter_base< _STLP_NON_DBG_VECTOR >&)
+{ return random_access_iterator_tag(); }
+#endif
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _Tp, class _NcIt>
+struct _Vector_const_traits;
+
+template <class _Tp, class _NcIt>
+struct _Vector_nonconst_traits {
+ typedef _Nonconst_traits<_Tp> _BaseT;
+ typedef _Tp value_type;
+ typedef _Tp& reference;
+ typedef _Tp* pointer;
+ typedef _Vector_const_traits<_Tp, _NcIt> _ConstTraits;
+ typedef _Vector_nonconst_traits<_Tp, _NcIt> _NonConstTraits;
+};
+
+template <class _Tp, class _NcIt>
+struct _Vector_const_traits {
+ typedef _Const_traits<_Tp> _BaseT;
+ typedef _Tp value_type;
+ typedef const _Tp& reference;
+ typedef const _Tp* pointer;
+ typedef _Vector_const_traits<_Tp, _NcIt> _ConstTraits;
+ typedef _Vector_nonconst_traits<_Tp, _NcIt> _NonConstTraits;
+};
+
+_STLP_TEMPLATE_NULL
+struct _Vector_nonconst_traits<bool, _Bit_iterator> {
+ typedef _Bit_iterator::value_type value_type;
+ typedef _Bit_iterator::reference reference;
+ typedef _Bit_iterator::pointer pointer;
+ typedef _Vector_const_traits<bool, _Bit_iterator> _ConstTraits;
+ typedef _Vector_nonconst_traits<bool, _Bit_iterator> _NonConstTraits;
+};
+
+_STLP_TEMPLATE_NULL
+struct _Vector_const_traits<bool, _Bit_iterator> {
+ typedef _Bit_const_iterator::value_type value_type;
+ typedef _Bit_const_iterator::reference reference;
+ typedef _Bit_const_iterator::pointer pointer;
+ typedef _Vector_const_traits<bool, _Bit_iterator> _ConstTraits;
+ typedef _Vector_nonconst_traits<bool, _Bit_iterator> _NonConstTraits;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class vector :
+#if !defined (__DMC__)
+ private
+#endif
+ _STLP_PRIV __construct_checker< _STLP_NON_DBG_VECTOR >
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ , public __stlport_class<vector<_Tp, _Alloc> >
+#endif
+{
+private:
+ typedef _STLP_NON_DBG_VECTOR _Base;
+ typedef vector<_Tp, _Alloc> _Self;
+ typedef _STLP_PRIV __construct_checker<_STLP_NON_DBG_VECTOR > _ConstructCheck;
+ _Base _M_non_dbg_impl;
+ _STLP_PRIV __owned_list _M_iter_list;
+
+public:
+ __IMPORT_CONTAINER_TYPEDEFS(_Base)
+
+ typedef _STLP_PRIV _DBG_iter<_Base,
+ _STLP_PRIV _DbgTraits<_STLP_PRIV _Vector_nonconst_traits<value_type, typename _Base::iterator> > > iterator;
+
+ typedef _STLP_PRIV _DBG_iter<_Base,
+ _STLP_PRIV _DbgTraits<_STLP_PRIV _Vector_const_traits<value_type, typename _Base::iterator> > > const_iterator;
+
+private:
+ void _Invalidate_all()
+ { _M_iter_list._Invalidate_all(); }
+ void _Invalidate_iterator(const iterator& __it)
+ { _STLP_PRIV __invalidate_iterator(&_M_iter_list, __it); }
+ void _Invalidate_iterators(const iterator& __first, const iterator& __last)
+ { _STLP_PRIV __invalidate_range(&_M_iter_list, __first, __last); }
+
+ void _Check_Overflow(size_type __nb) {
+ if (size() + __nb > capacity())
+ _Invalidate_all();
+ }
+ void _Compare_Capacity (size_type __old_capacity) {
+ if (capacity() > __old_capacity) {
+ _Invalidate_all();
+ }
+ }
+
+public:
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+ allocator_type get_allocator() const { return _M_non_dbg_impl.get_allocator(); }
+
+ iterator begin() { return iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ const_iterator begin() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.begin()); }
+ iterator end() { return iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+ const_iterator end() const { return const_iterator(&_M_iter_list, _M_non_dbg_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ size_type size() const { return _M_non_dbg_impl.size(); }
+ size_type max_size() const { return _M_non_dbg_impl.max_size(); }
+ size_type capacity() const { return _M_non_dbg_impl.capacity(); }
+ bool empty() const { return _M_non_dbg_impl.empty(); }
+
+ reference operator[](size_type __n) {
+ _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
+ return _M_non_dbg_impl[__n];
+ }
+
+ const_reference operator[](size_type __n) const {
+ _STLP_VERBOSE_ASSERT(__n < size(), _StlMsg_OUT_OF_BOUNDS)
+ return _M_non_dbg_impl[__n];
+ }
+
+ reference at(size_type __n) { return _M_non_dbg_impl.at(__n); }
+ const_reference at(size_type __n) const { return _M_non_dbg_impl.at(__n); }
+
+ explicit vector(const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit vector(size_type __n, const _Tp& __x = _Tp(),
+#else
+ vector(size_type __n, const _Tp& __x,
+#endif
+ const allocator_type& __a = allocator_type())
+ : _M_non_dbg_impl(__n, __x, __a), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit vector(size_type __n)
+ : _M_non_dbg_impl(__n), _M_iter_list(&_M_non_dbg_impl) {}
+#endif
+
+ vector(const _Self& __x)
+ : _ConstructCheck(__x), _M_non_dbg_impl(__x._M_non_dbg_impl), _M_iter_list(&_M_non_dbg_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ vector(__move_source<_Self> src)
+ : _M_non_dbg_impl(__move_source<_Base>(src.get()._M_non_dbg_impl)),
+ _M_iter_list(&_M_non_dbg_impl) {
+# if defined (_STLP_NO_EXTENSIONS) || (_STLP_DEBUG_LEVEL == _STLP_STANDARD_DBG_LEVEL)
+ src.get()._M_iter_list._Invalidate_all();
+# else
+ src.get()._M_iter_list._Set_owner(_M_iter_list);
+# endif
+ }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last), __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last)
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last)),
+ _M_iter_list(&_M_non_dbg_impl) {}
+# endif
+#else
+ vector(const _Tp* __first, const _Tp* __last,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last), _M_non_dbg_impl(__first, __last, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+
+ // mysterious VC++ bug ?
+ vector(const_iterator __first, const_iterator __last ,
+ const allocator_type& __a = allocator_type())
+ : _ConstructCheck(__first, __last),
+ _M_non_dbg_impl(__first._M_iterator, __last._M_iterator, __a),
+ _M_iter_list(&_M_non_dbg_impl) {}
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator=(const _Self& __x) {
+ if (this != &__x) {
+ _Invalidate_all();
+ _M_non_dbg_impl = __x._M_non_dbg_impl;
+ }
+ return *this;
+ }
+
+ void reserve(size_type __n) {
+ if (capacity() < __n)
+ _Invalidate_all();
+ _M_non_dbg_impl.reserve(__n);
+ }
+
+ reference front() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ const_reference front() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *begin();
+ }
+ reference back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+ const_reference back() const {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ return *(--end());
+ }
+
+ void swap(_Self& __x) {
+ _M_iter_list._Swap_owners(__x._M_iter_list);
+ _M_non_dbg_impl.swap(__x._M_non_dbg_impl);
+ }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos, const _Tp& __x = _Tp()) {
+#else
+ iterator insert(iterator __pos, const _Tp& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Check_Overflow(1);
+ return iterator(&_M_iter_list, _M_non_dbg_impl.insert(__pos._M_iterator, __x));
+ }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos)
+ { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ template <class _InputIterator>
+ void insert(iterator __pos,
+ _InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos._M_iterator,
+ _STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+#if !defined (_STLP_MEMBER_TEMPLATES)
+ void insert (iterator __pos,
+ const value_type *__first, const value_type *__last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first,__last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first, __last);
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+
+#if !defined (_STLP_MEMBER_TEMPLATES) || !defined (_STLP_NO_METHOD_SPECIALIZATION)
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ //Sequence requirements 23.1.1 Table 67:
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ }
+ void insert(iterator __pos,
+ iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ //Sequence requirements 23.1.1 Table 67:
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_not_owner(&_M_iter_list, __first));
+ size_type __old_capacity = capacity();
+ _M_non_dbg_impl.insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
+ _Compare_Capacity(__old_capacity);
+ }
+#endif
+
+ void insert (iterator __pos, size_type __n, const _Tp& __x){
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Check_Overflow(__n);
+ _M_non_dbg_impl.insert(__pos._M_iterator, __n, __x);
+ }
+
+ void pop_back() {
+ _STLP_VERBOSE_ASSERT(!empty(), _StlMsg_EMPTY_CONTAINER)
+ _Invalidate_iterator(end());
+ _M_non_dbg_impl.pop_back();
+ }
+ iterator erase(iterator __pos) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV _Dereferenceable(__pos))
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_if_owner(&_M_iter_list, __pos))
+ _Invalidate_iterators(__pos, end());
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__pos._M_iterator));
+ }
+ iterator erase(iterator __first, iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last, begin(), end()))
+ _Invalidate_iterators(__first, end());
+ return iterator(&_M_iter_list, _M_non_dbg_impl.erase(__first._M_iterator, __last._M_iterator));
+ }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const _Tp& __x = _STLP_DEFAULT_CONSTRUCTED(_Tp)) {
+#else
+ void resize(size_type __new_size, const _Tp& __x) {
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ if (__new_size > capacity()) {
+ _Invalidate_all();
+ }
+ else if (__new_size < size()) {
+ _Invalidate_iterators(begin() + __new_size, end());
+ }
+ _M_non_dbg_impl.resize(__new_size, __x);
+ }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { resize(__new_size, _STLP_DEFAULT_CONSTRUCTED(_Tp)); }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(_STLP_PRIV _Non_Dbg_iter(__first), _STLP_PRIV _Non_Dbg_iter(__last));
+ }
+#else
+private:
+ void _M_assign(const value_type *__first, const value_type *__last) {
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__first, __last);
+ }
+public:
+ void assign(const value_type *__first, const value_type *__last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_ptr_range(__first,__last))
+ _M_assign(__first, __last);
+ }
+
+ void assign(const_iterator __first, const_iterator __last) {
+ _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first,__last))
+ _M_assign(__first._M_iterator, __last._M_iterator);
+ }
+#endif
+
+public:
+ void assign(size_type __n, const _Tp& __val) {
+ _Invalidate_all();
+ _M_non_dbg_impl.assign(__n, __val);
+ }
+
+ void clear() {
+ _Invalidate_all();
+ _M_non_dbg_impl.clear();
+ }
+ void push_back(const _Tp& __x) {
+ _Check_Overflow(1);
+ _M_non_dbg_impl.push_back(__x);
+ }
+};
+
+_STLP_END_NAMESPACE
+
+#undef _STLP_NON_DBG_VECTOR
+
+#endif /* _STLP_DBG_VECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/msl_string.h b/6/sources/cxx-stl/stlport/stlport/stl/msl_string.h
new file mode 100644
index 0000000..1fa4931
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/msl_string.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1998
+ * Mark of the Unicorn, 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. Mark of the Unicorn, Inc. makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+#if defined( _STLP_USE_MSIPL ) && !defined( _STLP_MSL_STRING_H_ )
+#define _STLP_MSL_STRING_H_
+
+//# define char_traits __msl_char_traits
+# define basic_string __msl_basic_string
+# define b_str_ref __msl_b_str_ref
+# define basic_istream __msl_basic_istream
+# define basic_ostream __msl_basic_ostream
+# define string __msl_string
+# define wstring __msl_wstring
+# define iterator_traits __msl_iterator_traits
+
+namespace std
+{
+ template<class charT, class traits> class basic_istream;
+ template<class charT, class traits> class basic_ostream;
+}
+
+#if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <string>
+#else
+# include _STLP_NATIVE_HEADER(string)
+#endif
+
+// # undef char_traits
+# undef basic_string
+# undef b_str_ref
+# undef basic_istream
+# undef basic_ostream
+# undef string
+# undef wstring
+# undef iterator_traits
+
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_deque.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_deque.h
new file mode 100644
index 0000000..f82a559
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_deque.h
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2004
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_SPECIALIZED_DEQUE_H
+#define _STLP_SPECIALIZED_DEQUE_H
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+# include <stl/pointers/_tools.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+/*
+ * struct helper to cast deque iterators:
+ */
+template <class _StorageT, class _ValueT>
+struct _DequeIteCast {
+ typedef _Deque_iterator<_ValueT, _Nonconst_traits<_ValueT> > iterator;
+ typedef _Deque_iterator<_ValueT, _Const_traits<_ValueT> > const_iterator;
+ typedef _Deque_iterator<_StorageT, _Nonconst_traits<_StorageT> > storage_iterator;
+ typedef _Deque_iterator<_StorageT, _Const_traits<_StorageT> > const_storage_iterator;
+ typedef _CastTraits<_StorageT, _ValueT> cast_traits;
+
+ static iterator to_value_type_ite (storage_iterator const& __ite) {
+ iterator tmp;
+ tmp._M_cur = cast_traits::to_value_type_ptr(__ite._M_cur);
+ tmp._M_first = cast_traits::to_value_type_ptr(__ite._M_first);
+ tmp._M_last = cast_traits::to_value_type_ptr(__ite._M_last);
+ tmp._M_node = cast_traits::to_value_type_pptr(__ite._M_node);
+ return tmp;
+ }
+ static storage_iterator to_storage_type_ite (iterator const& __ite) {
+ storage_iterator tmp;
+ tmp._M_cur = cast_traits::to_storage_type_ptr(__ite._M_cur);
+ tmp._M_first = cast_traits::to_storage_type_ptr(__ite._M_first);
+ tmp._M_last = cast_traits::to_storage_type_ptr(__ite._M_last);
+ tmp._M_node = cast_traits::to_storage_type_pptr(__ite._M_node);
+ return tmp;
+ }
+
+ static const_iterator to_value_type_cite (const_storage_iterator const& __ite) {
+ const_iterator tmp;
+ tmp._M_cur = cast_traits::to_value_type_ptr(__ite._M_cur);
+ tmp._M_first = cast_traits::to_value_type_ptr(__ite._M_first);
+ tmp._M_last = cast_traits::to_value_type_ptr(__ite._M_last);
+ tmp._M_node = cast_traits::to_value_type_pptr(__ite._M_node);
+ return tmp;
+ }
+
+ static const_storage_iterator to_storage_type_cite (const_iterator const& __ite) {
+ const_storage_iterator tmp;
+ tmp._M_cur = cast_traits::to_storage_type_ptr(__ite._M_cur);
+ tmp._M_first = cast_traits::to_storage_type_ptr(__ite._M_first);
+ tmp._M_last = cast_traits::to_storage_type_ptr(__ite._M_last);
+ tmp._M_node = cast_traits::to_storage_type_pptr(__ite._M_node);
+ return tmp;
+ }
+};
+
+#define DEQUE_IMPL _STLP_PTR_IMPL_NAME(deque)
+#if defined (__BORLANDC__) || defined (__DMC__)
+# define typename
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<size_t, void*, allocator<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<void***, void**, allocator<void**> >;
+_STLP_EXPORT template struct _STLP_CLASS_DECLSPEC _Deque_iterator<void*, _Nonconst_traits<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Deque_base<void*,allocator<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS DEQUE_IMPL<void*,allocator<void*> >;
+#endif
+
+#if defined (_STLP_DEBUG)
+# define deque _STLP_NON_DBG_NAME(deque)
+#else
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class deque
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (deque)
+ : public __stlport_class<deque<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type _StorageType;
+ typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV DEQUE_IMPL<_StorageType, _StorageTypeAlloc> _Base;
+ typedef deque<_Tp, _Alloc> _Self;
+
+ typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
+ typedef _STLP_PRIV _DequeIteCast<_StorageType, _Tp> ite_cast_traits;
+
+public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag _Iterator_category;
+ _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
+ typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
+ typedef _STLP_PRIV _Deque_iterator<value_type, _Nonconst_traits<value_type> > iterator;
+ typedef _STLP_PRIV _Deque_iterator<value_type, _Const_traits<value_type> > const_iterator;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+
+public: // Basic accessors
+ iterator begin() { return ite_cast_traits::to_value_type_ite(_M_impl.begin()); }
+ iterator end() { return ite_cast_traits::to_value_type_ite(_M_impl.end()); }
+ const_iterator begin() const { return ite_cast_traits::to_value_type_cite(_M_impl.begin()); }
+ const_iterator end() const { return ite_cast_traits::to_value_type_cite(_M_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(begin()); }
+
+ reference operator[](size_type __n)
+ { return cast_traits::to_value_type_ref(_M_impl[__n]); }
+ const_reference operator[](size_type __n) const
+ { return cast_traits::to_value_type_cref(_M_impl[__n]); }
+
+ reference at(size_type __n)
+ { return cast_traits::to_value_type_ref(_M_impl.at(__n)); }
+ const_reference at(size_type __n) const
+ { return cast_traits::to_value_type_cref(_M_impl.at(__n)); }
+
+ reference front() { return cast_traits::to_value_type_ref(_M_impl.front()); }
+ reference back() { return cast_traits::to_value_type_ref(_M_impl.back()); }
+ const_reference front() const { return cast_traits::to_value_type_cref(_M_impl.front()); }
+ const_reference back() const { return cast_traits::to_value_type_cref(_M_impl.back()); }
+
+ size_type size() const { return _M_impl.size(); }
+ size_type max_size() const { return _M_impl.max_size(); }
+ bool empty() const { return _M_impl.empty(); }
+ allocator_type get_allocator() const { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
+
+ explicit deque(const allocator_type& __a = allocator_type())
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+ deque(const _Self& __x) : _M_impl(__x._M_impl) {}
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit deque(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
+#else
+ deque(size_type __n, const value_type& __val,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__n, cast_traits::to_storage_type_cref(__val), _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+ // int,long variants may be needed
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ explicit deque(size_type __n) : _M_impl(__n) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+#if !defined (_STLP_USE_ITERATOR_WRAPPER)
+ : _M_impl(__first, __last,
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
+#else
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
+#endif
+#if defined (_STLP_USE_ITERATOR_WRAPPER)
+ insert(end(), __first, __last);
+#endif
+ }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ deque(_InputIterator __first, _InputIterator __last)
+# if !defined (_STLP_USE_ITERATOR_WRAPPER)
+ : _M_impl(__first, __last) {}
+# else
+ { insert(end(), __first, __last); }
+# endif
+# endif
+
+#else
+ deque(const_pointer __first, const_pointer __last,
+ const allocator_type& __a = allocator_type() )
+ : _M_impl(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+ deque(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type() )
+ : _M_impl(ite_cast_traits::to_storage_type_cite(__first),
+ ite_cast_traits::to_storage_type_cite(__last),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ deque(__move_source<_Self> src)
+ : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
+#endif
+
+ _Self& operator= (const _Self& __x) { _M_impl = __x._M_impl; return *this; }
+
+ void swap(_Self& __x) { _M_impl.swap(__x._M_impl); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ void assign(size_type __n, const value_type& __val) {
+ _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val));
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type&)
+ { _M_impl.assign(__n, __val); }
+
+ template <class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.assign(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+# else
+ _M_impl.assign(__first, __last);
+# endif
+ }
+#else
+ void assign(const_pointer __first, const_pointer __last)
+ { _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last)); }
+ void assign(const_iterator __first, const_iterator __last)
+ { _M_impl.assign(ite_cast_traits::to_storage_type_cite(__first),
+ ite_cast_traits::to_storage_type_cite(__last)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void push_back(const value_type& __t)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { _M_impl.push_back(cast_traits::to_storage_type_cref(__t)); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_front(const value_type& __t = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void push_front(const value_type& __t)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { _M_impl.push_front(cast_traits::to_storage_type_cref(__t)); }
+
+# if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ void push_back() { _M_impl.push_back(); }
+ void push_front() { _M_impl.push_front(); }
+# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void pop_back() { _M_impl.pop_back(); }
+ void pop_front() { _M_impl.pop_front(); }
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ iterator insert(iterator __pos, const value_type& __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { return ite_cast_traits::to_value_type_ite(_M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
+ cast_traits::to_storage_type_cref(__x))); }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos) { return insert(__pos, _STLP_DEFAULT_CONSTRUCTED(value_type)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void insert(iterator __pos, size_type __n, const value_type& __x)
+ { _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __n, cast_traits::to_storage_type_cref(__x)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ const __true_type&) {
+ _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __n, __val);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+# else
+ _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos), __first, __last);
+# endif
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __pos,
+ const_pointer __first, const_pointer __last) {
+ _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
+ cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+ void insert(iterator __pos,
+ const_iterator __first, const_iterator __last) {
+ _M_impl.insert(ite_cast_traits::to_storage_type_ite(__pos),
+ ite_cast_traits::to_storage_type_cite(__first),
+ ite_cast_traits::to_storage_type_cite(__last));
+ }
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void resize(size_type __new_size, const value_type& __x)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x)); }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { _M_impl.resize(__new_size); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ iterator erase(iterator __pos)
+ { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__pos))); }
+
+ iterator erase(iterator __first, iterator __last)
+ { return ite_cast_traits::to_value_type_ite(_M_impl.erase(ite_cast_traits::to_storage_type_ite(__first),
+ ite_cast_traits::to_storage_type_ite(__last))); }
+ void clear() { _M_impl.clear(); }
+
+private:
+ _Base _M_impl;
+};
+
+#if defined (deque)
+# undef deque
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#undef DEQUE_IMPL
+#if defined (__BORLANDC__) || defined (__DMC__)
+# undef typename
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_SPECIALIZED_DEQUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_list.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_list.h
new file mode 100644
index 0000000..52a9262
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_list.h
@@ -0,0 +1,345 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_PTR_SPECIALIZED_LIST_H
+#define _STLP_PTR_SPECIALIZED_LIST_H
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+# include <stl/pointers/_tools.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define LIST_IMPL _STLP_PTR_IMPL_NAME(list)
+#if defined (__BORLANDC__) || defined (__DMC__)
+# define typename
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_EXPORT_TEMPLATE_CLASS _List_node<void*>;
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_EXPORT_TEMPLATE_CLASS allocator<_STLP_PRIV _List_node<void*> >;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<_List_node_base, _List_node<void*>, allocator<_List_node<void*> > >;
+_STLP_EXPORT_TEMPLATE_CLASS _List_base<void*, allocator<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS LIST_IMPL<void*, allocator<void*> >;
+
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#if defined (_STLP_DEBUG)
+# define list _STLP_NON_DBG_NAME(list)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class list
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (list)
+ : public __stlport_class<list<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type _StorageType;
+ typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV LIST_IMPL<_StorageType, _StorageTypeAlloc> _Base;
+ typedef typename _Base::iterator _BaseIte;
+ typedef typename _Base::const_iterator _BaseConstIte;
+ typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
+ typedef list<_Tp, _Alloc> _Self;
+
+public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
+ typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
+ typedef bidirectional_iterator_tag _Iterator_category;
+
+ typedef _STLP_PRIV _List_iterator<value_type, _Nonconst_traits<value_type> > iterator;
+ typedef _STLP_PRIV _List_iterator<value_type, _Const_traits<value_type> > const_iterator;
+
+ _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
+
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
+
+ explicit list(const allocator_type& __a = allocator_type())
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
+#else
+ list(size_type __n, const value_type& __val,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__n, cast_traits::to_storage_type_cref(__val),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit list(size_type __n)
+ : _M_impl(__n) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+# if !defined (_STLP_USE_ITERATOR_WRAPPER)
+ : _M_impl(__first, __last, _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+# else
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
+ insert(begin(), __first, __last);
+ }
+# endif
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ list(_InputIterator __first, _InputIterator __last)
+# if !defined (_STLP_USE_WRAPPER_ITERATOR)
+ : _M_impl(__first, __last) {}
+# else
+ { insert(begin(), __first, __last); }
+# endif
+# endif
+
+#else /* _STLP_MEMBER_TEMPLATES */
+
+ list(const value_type *__first, const value_type *__last,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+ list(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(_BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ list(const _Self& __x) : _M_impl(__x._M_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ list(__move_source<_Self> src)
+ : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
+#endif
+
+ iterator begin() { return iterator(_M_impl.begin()._M_node); }
+ const_iterator begin() const { return const_iterator(_M_impl.begin()._M_node); }
+
+ iterator end() { return iterator(_M_impl.end()._M_node); }
+ const_iterator end() const { return const_iterator(_M_impl.end()._M_node); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ bool empty() const { return _M_impl.empty(); }
+ size_type size() const { return _M_impl.size(); }
+ size_type max_size() const { return _M_impl.max_size(); }
+
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ reference back() { return *(--end()); }
+ const_reference back() const { return *(--end()); }
+
+ void swap(_Self &__x) { _M_impl.swap(__x._M_impl); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+ void clear() { _M_impl.clear(); }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const_reference __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ iterator insert(iterator __pos, const_reference __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { return iterator(_M_impl.insert(_BaseIte(__pos._M_node),
+ cast_traits::to_storage_type_cref(__x))._M_node); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ const __true_type&)
+ { _M_impl.insert(_BaseIte(__pos._M_node), __n, __val); }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.insert(_BaseIte(__pos._M_node),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+# else
+ _M_impl.insert(_BaseIte(__pos._M_node), __first, __last);
+# endif
+ }
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __pos, const value_type *__first, const value_type *__last)
+ { _M_impl.insert(_BaseIte(__pos._M_node), cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last)); }
+ void insert(iterator __pos, const_iterator __first, const_iterator __last)
+ { _M_impl.insert(_BaseIte(__pos._M_node), _BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ void insert(iterator __pos, size_type __n, const value_type& __x)
+ { _M_impl.insert(_BaseIte(__pos._M_node), __n, cast_traits::to_storage_type_cref(__x)); }
+
+ void push_front(const value_type& __x) { _M_impl.push_front(cast_traits::to_storage_type_cref(__x)); }
+ void push_back(const value_type& __x) { _M_impl.push_back(cast_traits::to_storage_type_cref(__x)); }
+
+#if defined (_STLP_DONT_SUP_DFLT_PARAM) && !defined (_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos) { return iterator(_M_impl.insert(__pos._M_node)._M_node); }
+ void push_front() { _M_impl.push_front();}
+ void push_back() { _M_impl.push_back();}
+# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ iterator erase(iterator __pos)
+ { return iterator(_M_impl.erase(_BaseIte(__pos._M_node))._M_node); }
+ iterator erase(iterator __first, iterator __last)
+ { return iterator(_M_impl.erase(_BaseIte(__first._M_node), _BaseIte(__last._M_node))._M_node); }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void resize(size_type __new_size) { _M_impl.resize(__new_size); }
+ void resize(size_type __new_size, const value_type& __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM*/
+ {_M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x));}
+
+ void pop_front() { _M_impl.pop_front(); }
+ void pop_back() { _M_impl.pop_back(); }
+
+ _Self& operator=(const _Self& __x)
+ { _M_impl = __x._M_impl; return *this; }
+ void assign(size_type __n, const value_type& __val)
+ { _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
+ { _M_impl.assign(__n, __val); }
+
+ template <class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.assign(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+# else
+ _M_impl.assign(__first, __last);
+# endif
+ }
+#else
+ void assign(const value_type *__first, const value_type *__last) {
+ _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+ void assign(const_iterator __first, const_iterator __last)
+ { _M_impl.assign(_BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
+#endif
+
+ void splice(iterator __pos, _Self& __x)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl); }
+ void splice(iterator __pos, _Self& __x, iterator __i)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl, _BaseIte(__i._M_node)); }
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl,
+ _BaseIte(__first._M_node), _BaseIte(__last._M_node)); }
+
+ void remove(const_reference __val)
+ { _M_impl.remove(cast_traits::to_storage_type_cref(__val)); }
+ void unique() { _M_impl.unique(); }
+ void merge(_Self& __x) { _M_impl.merge(__x._M_impl); }
+ void reverse() { _M_impl.reverse(); }
+ void sort() { _M_impl.sort(); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _Predicate>
+ void remove_if(_Predicate __pred)
+ { _M_impl.remove_if(_STLP_PRIV _UnaryPredWrapper<_StorageType, _Tp, _Predicate>(__pred)); }
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __bin_pred)
+ { _M_impl.unique(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _BinaryPredicate>(__bin_pred)); }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self &__x, _StrictWeakOrdering __comp)
+ { _M_impl.merge(__x._M_impl, _STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp)
+ { _M_impl.sort(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+private:
+ _Base _M_impl;
+};
+
+#if defined (list)
+# undef list
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#undef LIST_IMPL
+#if defined (__BORLANDC__) || defined (__DMC__)
+# undef typename
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_PTR_SPECIALIZED_LIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_set.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_set.h
new file mode 100644
index 0000000..f997a5a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_set.h
@@ -0,0 +1,564 @@
+/*
+ * Copyright (c) 2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_PTR_SPECIALIZED_SET_H
+#define _STLP_PTR_SPECIALIZED_SET_H
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+# include <stl/pointers/_tools.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#if defined (__BORLANDC__) || defined (__DMC__)
+# define typename
+#endif
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(SetTraitsT, Const_traits)
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+_STLP_EXPORT template struct _STLP_CLASS_DECLSPEC less<void*>;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+typedef _Rb_tree_node<void*> _Node;
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<_Rb_tree_node_base, _Node, allocator<_Node> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Rb_tree_base<void*, allocator<void*> >;
+# if defined (_STLP_DEBUG)
+_STLP_EXPORT_TEMPLATE_CLASS _DbgCompare<void*, less<void*> >;
+# define _Rb_tree _STLP_NON_DBG_NAME(Rb_tree)
+_STLP_EXPORT_TEMPLATE_CLASS _Rb_tree<void*, _DbgCompare<void*, less<void*> >, void*, _Identity<void*>,
+ _SetTraitsT<void*>, allocator<void*> >;
+# undef _Rb_tree
+# endif
+_STLP_EXPORT_TEMPLATE_CLASS _Rb_tree<void*, less<void*>, void*, _Identity<void*>,
+ _SetTraitsT<void*>, allocator<void*> >;
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
+class set
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<set<_Key, _Compare, _Alloc> >
+#endif
+{
+#if !defined (__BORLANDC__)
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare> _AssocStorageTypes;
+ typedef typename _AssocStorageTypes::_KeyStorageType _KeyStorageType;
+ typedef typename _AssocStorageTypes::_CompareStorageType _CompareStorageType;
+#else
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare>::_KeyStorageType _KeyStorageType;
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare>::_CompareStorageType _CompareStorageType;
+#endif
+ typedef typename _Alloc_traits<_KeyStorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV _CastTraits<_KeyStorageType, _Key> cast_traits;
+
+ typedef set<_Key, _Compare, _Alloc> _Self;
+public:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+
+protected:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _SetTraitsT<value_type> _SetTraits;
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_PRIV _Identity<value_type>,
+ _SetTraits, _Alloc> _Priv_Rep_type;
+
+ typedef _STLP_PRIV _SetTraitsT<_KeyStorageType> _SetStorageTraits;
+
+public:
+ //dums: need the following public for the __move_traits framework
+ typedef _STLP_PRIV _Rb_tree<_KeyStorageType, _CompareStorageType,
+ _KeyStorageType, _STLP_PRIV _Identity<_KeyStorageType>,
+ _SetStorageTraits, _StorageTypeAlloc> _Rep_type;
+
+private:
+ typedef typename _Rep_type::iterator base_iterator;
+ typedef typename _Rep_type::const_iterator const_base_iterator;
+
+public:
+ typedef typename _Priv_Rep_type::pointer pointer;
+ typedef typename _Priv_Rep_type::const_pointer const_pointer;
+ typedef typename _Priv_Rep_type::reference reference;
+ typedef typename _Priv_Rep_type::const_reference const_reference;
+ typedef typename _Priv_Rep_type::iterator iterator;
+ typedef typename _Priv_Rep_type::const_iterator const_iterator;
+ typedef typename _Priv_Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Priv_Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Priv_Rep_type::size_type size_type;
+ typedef typename _Priv_Rep_type::difference_type difference_type;
+ typedef typename _Priv_Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing set
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+#if defined (_STLP_DEBUG)
+ static iterator _S_to_value_ite(const_base_iterator __ite)
+ { return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
+ static base_iterator _S_to_storage_ite(const_iterator __ite)
+ { return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
+#else
+ static iterator _S_to_value_ite(const_base_iterator __ite)
+ { return iterator(__ite._M_node); }
+ static base_iterator _S_to_storage_ite(const_iterator __ite)
+ { return base_iterator(__ite._M_node); }
+#endif
+
+public:
+ set() : _M_t(_CompareStorageType(), _StorageTypeAlloc()) {}
+ explicit set(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), _StorageTypeAlloc()) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_unique(__first, __last);
+# endif
+ }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
+ : _M_t(__comp, _StorageTypeAlloc()) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_unique(__first, __last);
+# endif
+ }
+# endif
+ template <class _InputIterator>
+ set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_unique(__first, __last);
+# endif
+ }
+#else
+ set(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), _StorageTypeAlloc()) {
+ _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+
+ set(const value_type* __first, const value_type* __last,
+ const _Compare& __comp, const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
+ _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+
+ set(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), _StorageTypeAlloc())
+ { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+
+ set(const_iterator __first, const_iterator __last,
+ const _Compare& __comp, const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType))
+ { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ set(const _Self& __x) : _M_t(__x._M_t) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ set(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+ // accessors:
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return _M_t.key_comp(); }
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(_M_t.get_allocator(), value_type); }
+
+ iterator begin() { return _S_to_value_ite(_M_t.begin()); }
+ iterator end() { return _S_to_value_ite(_M_t.end()); }
+ const_iterator begin() const { return _S_to_value_ite(_M_t.begin()); }
+ const_iterator end() const { return _S_to_value_ite(_M_t.end()); }
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ pair<iterator,bool> insert(const value_type& __x) {
+ pair<base_iterator, bool> ret = _M_t.insert_unique(cast_traits::to_storage_type_cref(__x));
+ return pair<iterator, bool>(_S_to_value_ite(ret.first), ret.second);
+ }
+ iterator insert(iterator __pos, const value_type& __x)
+ { return _S_to_value_ite(_M_t.insert_unique(_S_to_storage_ite(__pos), cast_traits::to_storage_type_cref(__x))); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_unique(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_unique(__first, __last);
+# endif
+ }
+#else
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_unique(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+ void insert(const value_type* __first, const value_type* __last) {
+ _M_t.insert_unique(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+#endif
+ void erase(iterator __pos)
+ { _M_t.erase(_S_to_storage_ite(__pos)); }
+ size_type erase(const key_type& __x)
+ { return _M_t.erase_unique(cast_traits::to_storage_type_cref(__x)); }
+ void erase(iterator __first, iterator __last)
+ { _M_t.erase(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+ void clear() { _M_t.clear(); }
+
+ // set operations:
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x)
+ { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const
+ { return _M_t.find(cast_traits::to_storage_type_crefT(__x)) == _M_t.end() ? 0 : 1; }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x)
+ { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x)
+ { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __x) {
+ pair<base_iterator, base_iterator> __ret;
+ __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
+ return pair<iterator, iterator>(_S_to_value_ite(__ret.first),
+ _S_to_value_ite(__ret.second));
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const {
+ pair<const_base_iterator, const_base_iterator> __ret;
+ __ret = _M_t.equal_range_unique(cast_traits::to_storage_type_crefT(__x));
+ return pair<const_iterator, const_iterator>(_S_to_value_ite(__ret.first),
+ _S_to_value_ite(__ret.second));
+ }
+};
+
+//Specific iterator traits creation
+_STLP_CREATE_ITERATOR_TRAITS(MultisetTraitsT, Const_traits)
+
+template <class _Key, _STLP_DFL_TMPL_PARAM(_Compare, less<_Key>),
+ _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Key>) >
+class multiset
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND)
+ : public __stlport_class<multiset<_Key, _Compare, _Alloc> >
+#endif
+{
+#if !defined (__BORLANDC__)
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare> _AssocStorageTypes;
+ typedef typename _AssocStorageTypes::_KeyStorageType _KeyStorageType;
+ typedef typename _AssocStorageTypes::_CompareStorageType _CompareStorageType;
+#else
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare>::_KeyStorageType _KeyStorageType;
+ typedef _STLP_PRIV _AssocStorageTypes<_Key, _Compare>::_CompareStorageType _CompareStorageType;
+#endif
+ typedef typename _Alloc_traits<_KeyStorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV _CastTraits<_KeyStorageType, _Key> cast_traits;
+
+ typedef multiset<_Key, _Compare, _Alloc> _Self;
+public:
+ // typedefs:
+ typedef _Key key_type;
+ typedef _Key value_type;
+ typedef _Compare key_compare;
+ typedef _Compare value_compare;
+
+protected:
+ //Specific iterator traits creation
+ typedef _STLP_PRIV _MultisetTraitsT<value_type> _MultisetTraits;
+ typedef _STLP_PRIV _Rb_tree<key_type, key_compare,
+ value_type, _STLP_PRIV _Identity<value_type>,
+ _MultisetTraits, _Alloc> _Priv_Rep_type;
+
+ typedef _STLP_PRIV _MultisetTraitsT<_KeyStorageType> _MultisetStorageTraits;
+public:
+ //dums: need the following public for the __move_traits framework
+ typedef _STLP_PRIV _Rb_tree<_KeyStorageType, _CompareStorageType,
+ _KeyStorageType, _STLP_PRIV _Identity<_KeyStorageType>,
+ _MultisetStorageTraits, _StorageTypeAlloc> _Rep_type;
+
+private:
+ typedef typename _Rep_type::iterator base_iterator;
+ typedef typename _Rep_type::const_iterator const_base_iterator;
+
+public:
+ typedef typename _Priv_Rep_type::pointer pointer;
+ typedef typename _Priv_Rep_type::const_pointer const_pointer;
+ typedef typename _Priv_Rep_type::reference reference;
+ typedef typename _Priv_Rep_type::const_reference const_reference;
+ typedef typename _Priv_Rep_type::iterator iterator;
+ typedef typename _Priv_Rep_type::const_iterator const_iterator;
+ typedef typename _Priv_Rep_type::reverse_iterator reverse_iterator;
+ typedef typename _Priv_Rep_type::const_reverse_iterator const_reverse_iterator;
+ typedef typename _Priv_Rep_type::size_type size_type;
+ typedef typename _Priv_Rep_type::difference_type difference_type;
+ typedef typename _Priv_Rep_type::allocator_type allocator_type;
+
+private:
+ _Rep_type _M_t; // red-black tree representing multiset
+ _STLP_KEY_TYPE_FOR_CONT_EXT(key_type)
+
+#if defined (_STLP_DEBUG)
+ static iterator _S_to_value_ite(const_base_iterator __ite)
+ { return iterator(__ite._Owner(), __ite._M_iterator._M_node); }
+ static base_iterator _S_to_storage_ite(const_iterator __ite)
+ { return base_iterator(__ite._Owner(), __ite._M_iterator._M_node); }
+#else
+ static iterator _S_to_value_ite(const_base_iterator __ite)
+ { return iterator(__ite._M_node); }
+ static base_iterator _S_to_storage_ite(const_iterator __ite)
+ { return base_iterator(__ite._M_node); }
+#endif
+
+public:
+ multiset() : _M_t(_Compare(), _StorageTypeAlloc()) {}
+ explicit multiset(const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {}
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last)
+ : _M_t(_Compare(), _StorageTypeAlloc()) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_equal(__first, __last);
+# endif
+ }
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp)
+ : _M_t(__comp, _StorageTypeAlloc()) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_equal(__first, __last);
+# endif
+ }
+# endif
+ template <class _InputIterator>
+ multiset(_InputIterator __first, _InputIterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_equal(__first, __last);
+# endif
+ }
+
+#else
+ multiset(const value_type* __first, const value_type* __last)
+ : _M_t(_Compare(), _StorageTypeAlloc()) {
+ _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+
+ multiset(const value_type* __first, const value_type* __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType)) {
+ _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+
+ multiset(const_iterator __first, const_iterator __last)
+ : _M_t(_Compare(), _StorageTypeAlloc())
+ { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+
+ multiset(const_iterator __first, const_iterator __last,
+ const _Compare& __comp,
+ const allocator_type& __a = allocator_type())
+ : _M_t(__comp, _STLP_CONVERT_ALLOCATOR(__a, _KeyStorageType))
+ { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ multiset(const _Self& __x)
+ : _M_t(__x._M_t) {}
+
+ _Self& operator=(const _Self& __x) {
+ _M_t = __x._M_t;
+ return *this;
+ }
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ multiset(__move_source<_Self> src)
+ : _M_t(__move_source<_Rep_type>(src.get()._M_t)) {}
+#endif
+
+ // accessors:
+ key_compare key_comp() const { return _M_t.key_comp(); }
+ value_compare value_comp() const { return _M_t.key_comp(); }
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(_M_t.get_allocator(), value_type); }
+
+ iterator begin() { return _S_to_value_ite(_M_t.begin()); }
+ iterator end() { return _S_to_value_ite(_M_t.end()); }
+ const_iterator begin() const { return _S_to_value_ite(_M_t.begin()); }
+ const_iterator end() const { return _S_to_value_ite(_M_t.end()); }
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+ bool empty() const { return _M_t.empty(); }
+ size_type size() const { return _M_t.size(); }
+ size_type max_size() const { return _M_t.max_size(); }
+ void swap(_Self& __x) { _M_t.swap(__x._M_t); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+ // insert/erase
+ iterator insert(const value_type& __x)
+ { return _S_to_value_ite(_M_t.insert_equal(cast_traits::to_storage_type_cref(__x))); }
+ iterator insert(iterator __pos, const value_type& __x) {
+ return _S_to_value_ite(_M_t.insert_equal(_S_to_storage_ite(__pos),
+ cast_traits::to_storage_type_cref(__x)));
+ }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(_InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ _M_t.insert_equal(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_KeyStorageType, _Key, _InputIterator>::_Ite(__last));
+# else
+ _M_t.insert_equal(__first, __last);
+# endif
+ }
+#else
+ void insert(const value_type* __first, const value_type* __last) {
+ _M_t.insert_equal(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+ void insert(const_iterator __first, const_iterator __last)
+ { _M_t.insert_equal(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ void erase(iterator __pos)
+ { _M_t.erase(_S_to_storage_ite(__pos)); }
+ size_type erase(const key_type& __x)
+ { return _M_t.erase(cast_traits::to_storage_type_cref(__x)); }
+ void erase(iterator __first, iterator __last)
+ { _M_t.erase(_S_to_storage_ite(__first), _S_to_storage_ite(__last)); }
+ void clear() { _M_t.clear(); }
+
+ // multiset operations:
+
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator find(const _KT& __x)
+ { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator find(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.find(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ size_type count(const _KT& __x) const
+ { return _M_t.count(cast_traits::to_storage_type_crefT(__x)); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator lower_bound(const _KT& __x)
+ { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator lower_bound(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.lower_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ iterator upper_bound(const _KT& __x)
+ { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ const_iterator upper_bound(const _KT& __x) const
+ { return _S_to_value_ite(_M_t.upper_bound(cast_traits::to_storage_type_crefT(__x))); }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<iterator, iterator> equal_range(const _KT& __x) {
+ pair<base_iterator, base_iterator> __ret;
+ __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
+ return pair<iterator, iterator>(_S_to_value_ite(__ret.first),
+ _S_to_value_ite(__ret.second));
+ }
+ _STLP_TEMPLATE_FOR_CONT_EXT
+ pair<const_iterator, const_iterator> equal_range(const _KT& __x) const {
+ pair<const_base_iterator, const_base_iterator> __ret;
+ __ret = _M_t.equal_range(cast_traits::to_storage_type_crefT(__x));
+ return pair<const_iterator, const_iterator>(_S_to_value_ite(__ret.first),
+ _S_to_value_ite(__ret.second));
+ }
+};
+
+#if defined (__BORLANDC__) || defined (__DMC__)
+# undef typename
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_PTR_SPECIALIZED_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_slist.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_slist.h
new file mode 100644
index 0000000..76189fe
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_slist.h
@@ -0,0 +1,427 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_SPECIALIZED_SLIST_H
+#define _STLP_SPECIALIZED_SLIST_H
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+# include <stl/pointers/_tools.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define SLIST_IMPL _STLP_PTR_IMPL_NAME(slist)
+
+#if defined (__BORLANDC__) || defined (__DMC__)
+# define typename
+#endif
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+_STLP_EXPORT_TEMPLATE_CLASS _Slist_node<void*>;
+typedef _Slist_node<void*> _VoidPtrSNode;
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<_Slist_node_base, _VoidPtrSNode, allocator<_VoidPtrSNode> >;
+_STLP_EXPORT_TEMPLATE_CLASS _Slist_base<void*, allocator<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS SLIST_IMPL<void*, allocator<void*> >;
+
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#if defined (_STLP_DEBUG)
+# define slist _STLP_NON_DBG_NAME(slist)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class slist
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (slist)
+ : public __stlport_class<slist<_Tp, _Alloc> >
+#endif
+{
+ typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_Type _StorageType;
+ typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV SLIST_IMPL<_StorageType, _StorageTypeAlloc> _Base;
+ typedef typename _Base::iterator _BaseIte;
+ typedef typename _Base::const_iterator _BaseConstIte;
+ typedef slist<_Tp, _Alloc> _Self;
+ typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
+ typedef _STLP_PRIV _Slist_node_base _Node_base;
+
+public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef forward_iterator_tag _Iterator_category;
+
+ typedef _STLP_PRIV _Slist_iterator<value_type, _Nonconst_traits<value_type> > iterator;
+ typedef _STLP_PRIV _Slist_iterator<value_type, _Const_traits<value_type> > const_iterator;
+
+ _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
+ typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
+
+public:
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
+
+ explicit slist(const allocator_type& __a = allocator_type())
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(size_type __n, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type),
+#else
+ slist(size_type __n, const value_type& __x,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__n, cast_traits::to_storage_type_cref(__x), _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit slist(size_type __n) : _M_impl(__n) {}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ // We don't need any dispatching tricks here, because _M_insert_after_range
+ // already does them.
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
+# if !defined (_STLP_USE_ITERATOR_WRAPPER)
+ : _M_impl(__first, __last, _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+# else
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {
+ insert_after(before_begin(), __first, __last);
+ }
+# endif
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ // VC++ needs this crazyness
+ template <class _InputIterator>
+ slist(_InputIterator __first, _InputIterator __last)
+# if !defined (_STLP_USE_WRAPPER_ITERATOR)
+ : _M_impl(__first, __last) {}
+# else
+ { insert_after(before_begin(), __first, __last); }
+# endif
+# endif
+#else /* _STLP_MEMBER_TEMPLATES */
+ slist(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type() )
+ : _M_impl(_BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+ slist(const value_type* __first, const value_type* __last,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(cast_traits::to_storage_type_cptr(__first), cast_traits::to_storage_type_cptr(__last),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ slist(const _Self& __x) : _M_impl(__x._M_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ slist(__move_source<_Self> src)
+ : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
+#endif
+
+ _Self& operator= (const _Self& __x) { _M_impl = __x._M_impl; return *this; }
+
+ void assign(size_type __n, const value_type& __val)
+ { _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_assign_dispatch(_Integer __n, _Integer __val,
+ const __true_type&)
+ { _M_impl.assign(__n, __val); }
+
+ template <class _InputIterator>
+ void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.assign(_STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_assign_dispatch(__first, __last, _Integral());
+# else
+ _M_impl.assign(__first, __last);
+# endif
+ }
+#else
+ void assign(const value_type *__first, const value_type *__last) {
+ _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+ void assign(const_iterator __first, const_iterator __last) {
+ _M_impl.assign(_BaseConstIte(__first._M_node),
+ _BaseConstIte(__last._M_node));
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ iterator before_begin() { return iterator(_M_impl.before_begin()._M_node); }
+ const_iterator before_begin() const { return const_iterator(const_cast<_Node_base*>(_M_impl.before_begin()._M_node)); }
+
+ iterator begin() { return iterator(_M_impl.begin()._M_node); }
+ const_iterator begin() const { return const_iterator(const_cast<_Node_base*>(_M_impl.begin()._M_node));}
+
+ iterator end() { return iterator(_M_impl.end()._M_node); }
+ const_iterator end() const { return iterator(_M_impl.end()._M_node); }
+
+ size_type size() const { return _M_impl.size(); }
+ size_type max_size() const { return _M_impl.max_size(); }
+ bool empty() const { return _M_impl.empty(); }
+
+ void swap(_Self& __x) { _M_impl.swap(__x._M_impl); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+public:
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ void push_front(const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void push_front(const value_type& __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { _M_impl.push_front(cast_traits::to_storage_type_cref(__x)); }
+
+# if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ void push_front() { _M_impl.push_front();}
+# endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void pop_front() { _M_impl.pop_front(); }
+
+ iterator previous(const_iterator __pos)
+ { return iterator(_M_impl.previous(_BaseConstIte(__pos._M_node))._M_node); }
+ const_iterator previous(const_iterator __pos) const
+ { return const_iterator(const_cast<_Node_base*>(_M_impl.previous(_BaseConstIte(__pos._M_node))._M_node)); }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ iterator insert_after(iterator __pos, const value_type& __x)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ { return iterator(_M_impl.insert_after(_BaseIte(__pos._M_node),
+ cast_traits::to_storage_type_cref(__x))._M_node); }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert_after(iterator __pos)
+ { return iterator(_M_impl.insert_after(_BaseIte(__pos._M_node))._M_node);}
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert_after(iterator __pos, size_type __n, const value_type& __x)
+ { _M_impl.insert_after(_BaseIte(__pos._M_node), __n, cast_traits::to_storage_type_cref(__x)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_insert_after_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ const __true_type&) {
+ _M_impl.insert_after(_BaseIte(__pos._M_node), __n, __val);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_after_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.insert_after(_BaseIte(__pos._M_node),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void insert_after(iterator __pos, _InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_after_dispatch(__pos, __first, __last, _Integral());
+# else
+ _M_impl.insert_after(_BaseIte(__pos._M_node), __first, __last);
+# endif
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert_after(iterator __pos,
+ const_iterator __first, const_iterator __last)
+ { _M_impl.insert_after(_BaseIte(__pos._M_node),
+ _BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
+ void insert_after(iterator __pos,
+ const value_type* __first, const value_type* __last) {
+ _M_impl.insert_after(_BaseIte(__pos._M_node),
+ cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ iterator insert(iterator __pos, const value_type& __x)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ { return iterator(_M_impl.insert(_BaseIte(__pos._M_node),
+ cast_traits::to_storage_type_cref(__x))._M_node); }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ iterator insert(iterator __pos)
+ { return iterator(_M_impl.insert(_BaseIte(__pos._M_node))._M_node); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void insert(iterator __pos, size_type __n, const value_type& __x)
+ { _M_impl.insert(_BaseIte(__pos._M_node), __n, cast_traits::to_storage_type_cref(__x)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+private:
+ template <class _Integer>
+ void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
+ const __true_type&) {
+ _M_impl.insert(_BaseIte(__pos._M_node), __n, __val);
+ }
+
+ template <class _InputIterator>
+ void _M_insert_dispatch(iterator __pos,
+ _InputIterator __first, _InputIterator __last,
+ const __false_type&) {
+ _M_impl.insert(_BaseIte(__pos._M_node), _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__first),
+ _STLP_TYPENAME _STLP_PRIV _IteWrapper<_StorageType, _Tp, _InputIterator>::_Ite(__last));
+ }
+
+public:
+# endif
+
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
+# if defined (_STLP_USE_ITERATOR_WRAPPER)
+ // Check whether it's an integral type. If so, it's not an iterator.
+ typedef typename _IsIntegral<_InputIterator>::_Ret _Integral;
+ _M_insert_dispatch(__pos, __first, __last, _Integral());
+# else
+ _M_impl.insert(_BaseIte(__pos._M_node), __first, __last);
+# endif
+ }
+
+#else /* _STLP_MEMBER_TEMPLATES */
+ void insert(iterator __pos, const_iterator __first, const_iterator __last)
+ { _M_impl.insert(_BaseIte(__pos._M_node), _BaseConstIte(__first._M_node), _BaseConstIte(__last._M_node)); }
+ void insert(iterator __pos, const value_type* __first, const value_type* __last)
+ { _M_impl.insert(_BaseIte(__pos._M_node), cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ iterator erase_after(iterator __pos)
+ { return iterator(_M_impl.erase_after(_BaseIte(__pos._M_node))._M_node); }
+ iterator erase_after(iterator __before_first, iterator __last)
+ { return iterator(_M_impl.erase_after(_BaseIte(__before_first._M_node),
+ _BaseIte(__last._M_node))._M_node); }
+
+ iterator erase(iterator __pos)
+ { return iterator(_M_impl.erase(_BaseIte(__pos._M_node))._M_node); }
+ iterator erase(iterator __first, iterator __last)
+ { return iterator(_M_impl.erase(_BaseIte(__first._M_node), _BaseIte(__last._M_node))._M_node); }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void resize(size_type __new_size, const value_type& __x)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x));}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { _M_impl.resize(__new_size); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void clear() { _M_impl.clear(); }
+
+ void splice_after(iterator __pos, _Self& __x,
+ iterator __before_first, iterator __before_last)
+ { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl,
+ _BaseIte(__before_first._M_node), _BaseIte(__before_last._M_node)); }
+ void splice_after(iterator __pos, _Self& __x, iterator __prev)
+ { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl, _BaseIte(__prev._M_node)); }
+ void splice_after(iterator __pos, _Self& __x)
+ { _M_impl.splice_after(_BaseIte(__pos._M_node), __x._M_impl); }
+ void splice(iterator __pos, _Self& __x)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl); }
+ void splice(iterator __pos, _Self& __x, iterator __i)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl, _BaseIte(__i._M_node)); }
+ void splice(iterator __pos, _Self& __x, iterator __first, iterator __last)
+ { _M_impl.splice(_BaseIte(__pos._M_node), __x._M_impl,
+ _BaseIte(__first._M_node), _BaseIte(__last._M_node)); }
+
+ void reverse() { _M_impl.reverse(); }
+
+ void remove(const value_type& __val) { _M_impl.remove(cast_traits::to_storage_type_cref(__val)); }
+ void unique() { _M_impl.unique(); }
+ void merge(_Self& __x) { _M_impl.merge(__x._M_impl); }
+ void sort() {_M_impl.sort(); }
+
+#ifdef _STLP_MEMBER_TEMPLATES
+ template <class _Predicate>
+ void remove_if(_Predicate __pred)
+ { _M_impl.remove_if(_STLP_PRIV _UnaryPredWrapper<_StorageType, _Tp, _Predicate>(__pred)); }
+
+ template <class _BinaryPredicate>
+ void unique(_BinaryPredicate __pred)
+ { _M_impl.unique(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _BinaryPredicate>(__pred)); }
+
+ template <class _StrictWeakOrdering>
+ void merge(_Self& __x, _StrictWeakOrdering __comp)
+ { _M_impl.merge(__x._M_impl, _STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
+
+ template <class _StrictWeakOrdering>
+ void sort(_StrictWeakOrdering __comp)
+ { _M_impl.sort(_STLP_PRIV _BinaryPredWrapper<_StorageType, _Tp, _StrictWeakOrdering>(__comp)); }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+private:
+ _Base _M_impl;
+};
+
+#if defined (slist)
+# undef slist
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#undef SLIST_IMPL
+
+#if defined (__BORLANDC__) || defined (__DMC__)
+# undef typename
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_SPECIALIZED_SLIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_tools.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_tools.h
new file mode 100644
index 0000000..ec94806
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_tools.h
@@ -0,0 +1,471 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+#define _STLP_POINTERS_SPEC_TOOLS_H
+
+#ifndef _STLP_TYPE_TRAITS_H
+# include <stl/type_traits.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+//Some usefull declarations:
+template <class _Tp> struct less;
+
+_STLP_MOVE_TO_PRIV_NAMESPACE
+
+template <class _StorageT, class _ValueT, class _BinaryPredicate>
+struct _BinaryPredWrapper;
+
+/*
+ * Since the compiler only allows at most one non-trivial
+ * implicit conversion we can make use of a shim class to
+ * be sure that functions below doesn't accept classes with
+ * implicit pointer conversion operators
+ */
+struct _VoidPointerShim
+{ _VoidPointerShim(void*); };
+struct _ConstVoidPointerShim
+{ _ConstVoidPointerShim(const void*); };
+struct _VolatileVoidPointerShim
+{ _VolatileVoidPointerShim(volatile void*); };
+struct _ConstVolatileVoidPointerShim
+{ _ConstVolatileVoidPointerShim(const volatile void*); };
+
+//The dispatch functions:
+template <class _Tp>
+char _UseVoidPtrStorageType(const __false_type& /*POD*/, const _Tp&);
+char _UseVoidPtrStorageType(const __true_type& /*POD*/, ...);
+char* _UseVoidPtrStorageType(const __true_type& /*POD*/, _VoidPointerShim);
+
+template <class _Tp>
+char _UseConstVoidPtrStorageType(const __false_type& /*POD*/, const _Tp&);
+char _UseConstVoidPtrStorageType(const __true_type& /*POD*/, ...);
+char* _UseConstVoidPtrStorageType(const __true_type& /*POD*/, _ConstVoidPointerShim);
+
+template <class _Tp>
+char _UseVolatileVoidPtrStorageType(const __false_type& /*POD*/, const _Tp&);
+char _UseVolatileVoidPtrStorageType(const __true_type& /*POD*/, ...);
+char* _UseVolatileVoidPtrStorageType(const __true_type& /*POD*/, _VolatileVoidPointerShim);
+
+template <class _Tp>
+char _UseConstVolatileVoidPtrStorageType(const __false_type& /*POD*/, const _Tp&);
+char _UseConstVolatileVoidPtrStorageType(const __true_type& /*POD*/, ...);
+char* _UseConstVolatileVoidPtrStorageType(const __true_type& /*POD*/, _ConstVolatileVoidPointerShim);
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+/* Thanks to class partial specialization the pointer specialization feature can even be used in
+ * presence of incomplete type:
+ * struct MyStruct {
+ * typedef vector<MyStruct> MyStructContainer;
+ * typedef MyStructContainer::iterator MyStructIterator;
+ * };
+ */
+
+template <class _Tp>
+struct _StorageType {
+ typedef _Tp _QualifiedType;
+ typedef _Tp _Type;
+ enum { use_const_volatile_void_ptr = 0 };
+};
+
+template <class _Tp>
+struct _StorageType<_Tp*> {
+ // Even if we detect a pointer type we use dispatch function to consider if it can be stored as a void*.
+ // For instance function pointer might not necessarily be convertible to void*.
+ enum { use_void_ptr = (sizeof(_UseVoidPtrStorageType(__true_type(),
+ __STATIC_CAST(_Tp*, 0))) == sizeof(char*)) };
+ enum { use_const_volatile_void_ptr = use_void_ptr };
+ typedef typename __select<use_void_ptr,
+ void*,
+ _Tp*>::_Ret _QualifiedType;
+ typedef _QualifiedType _Type;
+};
+
+template <class _Tp>
+struct _StorageType<_Tp const*> {
+ enum { use_void_ptr = (sizeof(_UseConstVoidPtrStorageType(__true_type(),
+ __STATIC_CAST(const _Tp*, 0))) == sizeof(char*)) };
+ enum { use_const_volatile_void_ptr = use_void_ptr };
+ typedef typename __select<use_void_ptr,
+ const void*,
+ const _Tp*>::_Ret _QualifiedType;
+ typedef typename __select<use_void_ptr,
+ void*,
+ const _Tp*>::_Ret _Type;
+};
+
+template <class _Tp>
+struct _StorageType<_Tp volatile*> {
+ enum { use_void_ptr = (sizeof(_UseVolatileVoidPtrStorageType(__true_type(),
+ __STATIC_CAST(_Tp volatile*, 0))) == sizeof(char*)) };
+ enum { use_const_volatile_void_ptr = use_void_ptr };
+ typedef typename __select<use_void_ptr,
+ volatile void*,
+ volatile _Tp*>::_Ret _QualifiedType;
+ typedef typename __select<use_void_ptr,
+ void*,
+ volatile _Tp*>::_Ret _Type;
+};
+
+template <class _Tp>
+struct _StorageType<_Tp const volatile*> {
+ enum { use_void_ptr = (sizeof(_UseConstVolatileVoidPtrStorageType(__true_type(),
+ __STATIC_CAST(_Tp const volatile*, 0))) == sizeof(char*)) };
+ enum { use_const_volatile_void_ptr = use_void_ptr };
+ typedef typename __select<use_void_ptr,
+ const volatile void*,
+ const volatile _Tp*>::_Ret _QualifiedType;
+ typedef typename __select<use_void_ptr,
+ void*,
+ const volatile _Tp*>::_Ret _Type;
+};
+#else
+template <class _Tp>
+struct _StorageType {
+ typedef typename __type_traits<_Tp>::is_POD_type _PODType;
+
+#if !defined (__BORLANDC__) || (__BORLANDC__ != 0x560)
+ static _Tp __null_rep();
+#else
+ static _Tp __null_rep;
+#endif
+ enum { use_void_ptr = (sizeof(_UseVoidPtrStorageType(_PODType(), __null_rep())) == sizeof(char*)) };
+ enum { use_const_void_ptr = (sizeof(_UseConstVoidPtrStorageType(_PODType(), __null_rep())) == sizeof(char*)) };
+ enum { use_volatile_void_ptr = (sizeof(_UseVolatileVoidPtrStorageType(_PODType(), __null_rep())) == sizeof(char*)) };
+ enum { use_const_volatile_void_ptr = (sizeof(_UseConstVolatileVoidPtrStorageType(_PODType(), __null_rep())) == sizeof(char*)) };
+
+ typedef typename __select<!use_const_volatile_void_ptr,
+ _Tp,
+ typename __select<use_void_ptr,
+ void*,
+ typename __select<use_const_void_ptr,
+ const void*,
+ typename __select<use_volatile_void_ptr,
+ volatile void*,
+ const volatile void*>::_Ret >::_Ret >::_Ret >::_Ret _QualifiedType;
+
+#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+ /* If the compiler do not support the iterator_traits structure we cannot wrap
+ * iterators pass to container template methods. The iterator dereferenced value
+ * has to be storable without any cast in the chosen storage type. To guaranty
+ * that the void pointer has to be correctly qualified.
+ */
+ typedef _QualifiedType _Type;
+#else
+ /* With iterator_traits we can wrap passed iterators and make the necessary casts.
+ * We can always use a simple void* storage type:
+ */
+ typedef typename __select<use_const_volatile_void_ptr,
+ void*,
+ _Tp>::_Ret _Type;
+#endif
+};
+#endif
+
+template <class _Tp, class _Compare>
+struct _AssocStorageTypes {
+ typedef _StorageType<_Tp> _StorageTypeInfo;
+ typedef typename _StorageTypeInfo::_Type _SType;
+
+ //We need to also check that the comparison functor used to instanciate the assoc container
+ //is the default Standard less implementation:
+ enum { ptr_type = _StorageTypeInfo::use_const_volatile_void_ptr };
+ typedef typename _IsSTLportClass<_Compare>::_Ret _STLportLess;
+ enum { is_default_less = __type2bool<_STLportLess>::_Ret };
+ typedef typename __select<is_default_less, _SType, _Tp>::_Ret _KeyStorageType;
+ typedef typename __select<is_default_less && ptr_type,
+ _BinaryPredWrapper<_KeyStorageType, _Tp, _Compare>,
+ _Compare>::_Ret _CompareStorageType;
+};
+
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+/*
+ * Base struct to deal with qualifiers
+ */
+template <class _StorageT, class _QualifiedStorageT>
+struct _VoidCastTraitsAux {
+ typedef _QualifiedStorageT void_cv_type;
+ typedef _StorageT void_type;
+
+ static void_type * uncv_ptr(void_cv_type *__ptr)
+ { return __ptr; }
+ static void_type const* uncv_cptr(void_cv_type const*__ptr)
+ { return __ptr; }
+ static void_type ** uncv_pptr(void_cv_type **__ptr)
+ { return __ptr; }
+ static void_type & uncv_ref(void_cv_type & __ref)
+ { return __ref; }
+ static void_type const& uncv_cref(void_cv_type const& __ref)
+ { return __ref; }
+ static void_cv_type* cv_ptr(void_type *__ptr)
+ { return __ptr; }
+ static void_cv_type const* cv_cptr(void_type const*__ptr)
+ { return __ptr; }
+ static void_cv_type ** cv_pptr(void_type **__ptr)
+ { return __ptr; }
+ static void_cv_type & cv_ref(void_type & __ref)
+ { return __ref; }
+ static void_cv_type const& cv_cref(void_type const& __ref)
+ { return __ref; }
+};
+
+template <class _VoidCVType>
+struct _VoidCastTraitsAuxBase {
+ typedef _VoidCVType* void_cv_type;
+ typedef void* void_type;
+
+ static void_type* uncv_ptr(void_cv_type *__ptr)
+ { return __CONST_CAST(void_type*, __ptr); }
+ static void_type const* uncv_cptr(void_cv_type const*__ptr)
+ { return __CONST_CAST(void_type const*, __ptr); }
+ static void_type** uncv_pptr(void_cv_type **__ptr)
+ { return __CONST_CAST(void_type**, __ptr); }
+ static void_type& uncv_ref(void_cv_type &__ref)
+ { return __CONST_CAST(void_type&, __ref); }
+ static void_type const& uncv_cref(void_cv_type const& __ptr)
+ { return __CONST_CAST(void_type const&, __ptr); }
+ // The reverse versions
+ static void_cv_type * cv_ptr(void_type *__ptr)
+ { return __CONST_CAST(void_cv_type *, __ptr); }
+ static void_cv_type const* cv_cptr(void_type const*__ptr)
+ { return __CONST_CAST(void_cv_type const*, __ptr); }
+ static void_cv_type ** cv_pptr(void_type **__ptr)
+ { return __CONST_CAST(void_cv_type**, __ptr); }
+ static void_cv_type & cv_ref(void_type &__ref)
+ { return __CONST_CAST(void_cv_type &, __ref); }
+ static void_cv_type const& cv_cref(void_type const& __ref)
+ { return __CONST_CAST(void_cv_type const&, __ref); }
+};
+
+_STLP_TEMPLATE_NULL
+struct _VoidCastTraitsAux<void*, const void*> : _VoidCastTraitsAuxBase<void const>
+{};
+_STLP_TEMPLATE_NULL
+struct _VoidCastTraitsAux<void*, volatile void*> : _VoidCastTraitsAuxBase<void volatile>
+{};
+_STLP_TEMPLATE_NULL
+struct _VoidCastTraitsAux<void*, const volatile void*> : _VoidCastTraitsAuxBase<void const volatile>
+{};
+
+template <class _StorageT, class _ValueT>
+struct _CastTraits {
+ typedef _ValueT value_type;
+ typedef typename _StorageType<_ValueT>::_QualifiedType _QualifiedStorageT;
+ typedef _VoidCastTraitsAux<_StorageT, _QualifiedStorageT> cv_traits;
+ typedef typename cv_traits::void_type void_type;
+ typedef typename cv_traits::void_cv_type void_cv_type;
+
+ static value_type * to_value_type_ptr(void_type *__ptr)
+ { return __REINTERPRET_CAST(value_type *, cv_traits::cv_ptr(__ptr)); }
+ static value_type const* to_value_type_cptr(void_type const*__ptr)
+ { return __REINTERPRET_CAST(value_type const*, cv_traits::cv_cptr(__ptr)); }
+ static value_type ** to_value_type_pptr(void_type **__ptr)
+ { return __REINTERPRET_CAST(value_type **, cv_traits::cv_pptr(__ptr)); }
+ static value_type & to_value_type_ref(void_type &__ref)
+ { return __REINTERPRET_CAST(value_type &, cv_traits::cv_ref(__ref)); }
+ static value_type const& to_value_type_cref(void_type const& __ptr)
+ { return __REINTERPRET_CAST(value_type const&, cv_traits::cv_cref(__ptr)); }
+ // Reverse versions
+ static void_type * to_storage_type_ptr(value_type *__ptr)
+ { return cv_traits::uncv_ptr(__REINTERPRET_CAST(void_cv_type *, __ptr)); }
+ static void_type const* to_storage_type_cptr(value_type const*__ptr)
+ { return cv_traits::uncv_cptr(__REINTERPRET_CAST(void_cv_type const*, __ptr)); }
+ static void_type ** to_storage_type_pptr(value_type **__ptr)
+ { return cv_traits::uncv_pptr(__REINTERPRET_CAST(void_cv_type **, __ptr)); }
+ static void_type const& to_storage_type_cref(value_type const& __ref)
+ { return cv_traits::uncv_cref(__REINTERPRET_CAST(void_cv_type const&, __ref)); }
+
+ //Method used to treat set container template method extension
+ static void_type const& to_storage_type_crefT(value_type const& __ref)
+ { return to_storage_type_cref(__ref); }
+};
+
+template <class _Tp>
+struct _CastTraits<_Tp, _Tp> {
+ typedef _Tp storage_type;
+ typedef _Tp value_type;
+
+ static value_type * to_value_type_ptr(storage_type *__ptr)
+ { return __ptr; }
+ static value_type const* to_value_type_cptr(storage_type const*__ptr)
+ { return __ptr; }
+ static value_type ** to_value_type_pptr(storage_type **__ptr)
+ { return __ptr; }
+ static value_type & to_value_type_ref(storage_type &__ref)
+ { return __ref; }
+ static value_type const& to_value_type_cref(storage_type const&__ref)
+ { return __ref; }
+ // Reverse versions
+ static storage_type * to_storage_type_ptr(value_type *__ptr)
+ { return __ptr; }
+ static storage_type const* to_storage_type_cptr(value_type const*__ptr)
+ { return __ptr; }
+ static storage_type ** to_storage_type_pptr(value_type **__ptr)
+ { return __ptr; }
+ static storage_type const& to_storage_type_cref(value_type const& __ref)
+ { return __ref; }
+
+ //Method used to treat set container template method extension
+ template <class _Tp1>
+ static _Tp1 const& to_storage_type_crefT(_Tp1 const& __ref)
+ { return __ref; }
+};
+
+#define _STLP_USE_ITERATOR_WRAPPER
+
+template <class _StorageT, class _ValueT, class _Iterator>
+struct _IteWrapper {
+ typedef _CastTraits<_StorageT, _ValueT> cast_traits;
+ typedef iterator_traits<_Iterator> _IteTraits;
+
+ typedef typename _IteTraits::iterator_category iterator_category;
+ typedef _StorageT value_type;
+ typedef typename _IteTraits::difference_type difference_type;
+ typedef value_type* pointer;
+ typedef value_type const& const_reference;
+ //This wrapper won't be used for input so to avoid surprise
+ //the reference type will be a const reference:
+ typedef const_reference reference;
+
+ typedef _IteWrapper<_StorageT, _ValueT, _Iterator> _Self;
+ typedef _Self _Ite;
+
+ _IteWrapper(_Iterator &__ite) : _M_ite(__ite) {}
+
+ const_reference operator*() const { return cast_traits::to_storage_type_cref(*_M_ite); }
+
+ _Self& operator= (_Self const& __rhs) {
+ _M_ite = __rhs._M_ite;
+ return *this;
+ }
+
+ _Self& operator++() {
+ ++_M_ite;
+ return *this;
+ }
+
+ _Self& operator--() {
+ --_M_ite;
+ return *this;
+ }
+
+ _Self& operator += (difference_type __offset) {
+ _M_ite += __offset;
+ return *this;
+ }
+ difference_type operator -(_Self const& __other) const
+ { return _M_ite - __other._M_ite; }
+
+ bool operator == (_Self const& __other) const
+ { return _M_ite == __other._M_ite; }
+
+ bool operator != (_Self const& __other) const
+ { return _M_ite != __other._M_ite; }
+
+ bool operator < (_Self const& __rhs) const
+ { return _M_ite < __rhs._M_ite; }
+
+private:
+ _Iterator _M_ite;
+};
+
+template <class _Tp, class _Iterator>
+struct _IteWrapper<_Tp, _Tp, _Iterator>
+{ typedef _Iterator _Ite; };
+
+#else
+
+/*
+ * In this config the storage type is qualified in respect of the
+ * value_type qualification. Simple reinterpret_cast is enough.
+ */
+template <class _StorageT, class _ValueT>
+struct _CastTraits {
+ typedef _StorageT storage_type;
+ typedef _ValueT value_type;
+
+ static value_type * to_value_type_ptr(storage_type *__ptr)
+ { return __REINTERPRET_CAST(value_type*, __ptr); }
+ static value_type const* to_value_type_cptr(storage_type const*__ptr)
+ { return __REINTERPRET_CAST(value_type const*, __ptr); }
+ static value_type ** to_value_type_pptr(storage_type **__ptr)
+ { return __REINTERPRET_CAST(value_type **, __ptr); }
+ static value_type & to_value_type_ref(storage_type &__ref)
+ { return __REINTERPRET_CAST(value_type&, __ref); }
+ static value_type const& to_value_type_cref(storage_type const&__ref)
+ { return __REINTERPRET_CAST(value_type const&, __ref); }
+ // Reverse versions
+ static storage_type * to_storage_type_ptr(value_type *__ptr)
+ { return __REINTERPRET_CAST(storage_type*, __ptr); }
+ static storage_type const* to_storage_type_cptr(value_type const*__ptr)
+ { return __REINTERPRET_CAST(storage_type const*, __ptr); }
+ static storage_type ** to_storage_type_pptr(value_type **__ptr)
+ { return __REINTERPRET_CAST(storage_type **, __ptr); }
+ static storage_type const& to_storage_type_cref(value_type const&__ref)
+ { return __REINTERPRET_CAST(storage_type const&, __ref); }
+ template <class _Tp1>
+ static _Tp1 const& to_storage_type_crefT(_Tp1 const& __ref)
+ { return __ref; }
+};
+
+#endif
+
+//Wrapper functors:
+template <class _StorageT, class _ValueT, class _UnaryPredicate>
+struct _UnaryPredWrapper {
+ typedef _CastTraits<_StorageT, _ValueT> cast_traits;
+
+ _UnaryPredWrapper (_UnaryPredicate const& __pred) : _M_pred(__pred) {}
+
+ bool operator () (_StorageT const& __ref) const
+ { return _M_pred(cast_traits::to_value_type_cref(__ref)); }
+
+private:
+ _UnaryPredicate _M_pred;
+};
+
+template <class _StorageT, class _ValueT, class _BinaryPredicate>
+struct _BinaryPredWrapper {
+ typedef _CastTraits<_StorageT, _ValueT> cast_traits;
+
+ _BinaryPredWrapper () {}
+ _BinaryPredWrapper (_BinaryPredicate const& __pred) : _M_pred(__pred) {}
+
+ _BinaryPredicate get_pred() const { return _M_pred; }
+
+ bool operator () (_StorageT const& __fst, _StorageT const& __snd) const
+ { return _M_pred(cast_traits::to_value_type_cref(__fst), cast_traits::to_value_type_cref(__snd)); }
+
+ //Cast operator used to transparently access underlying predicate
+ //in set::key_comp() method
+ operator _BinaryPredicate() const
+ { return _M_pred; }
+
+private:
+ _BinaryPredicate _M_pred;
+};
+
+_STLP_MOVE_TO_STD_NAMESPACE
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_POINTERS_SPEC_TOOLS_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/pointers/_vector.h b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_vector.h
new file mode 100644
index 0000000..64705bf
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/pointers/_vector.h
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef _STLP_SPECIALIZED_VECTOR_H
+#define _STLP_SPECIALIZED_VECTOR_H
+
+#ifndef _STLP_POINTERS_SPEC_TOOLS_H
+# include <stl/pointers/_tools.h>
+#endif
+
+_STLP_BEGIN_NAMESPACE
+
+#define VECTOR_IMPL _STLP_PTR_IMPL_NAME(vector)
+
+#if defined (_STLP_USE_TEMPLATE_EXPORT) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_PRIV _Vector_base<void*,allocator<void*> >;
+_STLP_EXPORT_TEMPLATE_CLASS _STLP_PRIV VECTOR_IMPL<void*, allocator<void*> >;
+#endif
+
+#if defined (_STLP_DEBUG)
+# define vector _STLP_NON_DBG_NAME(vector)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+#endif
+
+template <class _Tp, _STLP_DFL_TMPL_PARAM(_Alloc, allocator<_Tp>) >
+class vector
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (vector)
+ : public __stlport_class<vector<_Tp, _Alloc> >
+#endif
+{
+ /* In the vector implementation iterators are pointer which give a number
+ * of opportunities for optimization. To not break those optimizations
+ * iterators passed to template should not be wrapped for casting purpose.
+ * So vector implementation will always use a qualified void pointer type and
+ * won't use iterator wrapping.
+ */
+ typedef _STLP_TYPENAME _STLP_PRIV _StorageType<_Tp>::_QualifiedType _StorageType;
+ typedef typename _Alloc_traits<_StorageType, _Alloc>::allocator_type _StorageTypeAlloc;
+ typedef _STLP_PRIV VECTOR_IMPL<_StorageType, _StorageTypeAlloc> _Base;
+ typedef vector<_Tp, _Alloc> _Self;
+
+ typedef _STLP_PRIV _CastTraits<_StorageType, _Tp> cast_traits;
+
+public:
+ typedef _Tp value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef value_type* iterator;
+ typedef const value_type* const_iterator;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef random_access_iterator_tag _Iterator_category;
+
+ _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
+ _STLP_FORCE_ALLOCATORS(value_type, _Alloc)
+ typedef typename _Alloc_traits<value_type, _Alloc>::allocator_type allocator_type;
+
+ allocator_type get_allocator() const
+ { return _STLP_CONVERT_ALLOCATOR(_M_impl.get_allocator(), value_type); }
+
+ iterator begin() { return cast_traits::to_value_type_ptr(_M_impl.begin()); }
+ const_iterator begin() const { return cast_traits::to_value_type_cptr(_M_impl.begin()); }
+ iterator end() { return cast_traits::to_value_type_ptr(_M_impl.end()); }
+ const_iterator end() const { return cast_traits::to_value_type_cptr(_M_impl.end()); }
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ size_type size() const { return _M_impl.size(); }
+ size_type max_size() const { return _M_impl.max_size(); }
+
+ size_type capacity() const { return _M_impl.capacity(); }
+ bool empty() const { return _M_impl.empty(); }
+
+ reference operator[](size_type __n) { return cast_traits::to_value_type_ref(_M_impl[__n]); }
+ const_reference operator[](size_type __n) const { return cast_traits::to_value_type_cref(_M_impl[__n]); }
+
+ reference front() { return cast_traits::to_value_type_ref(_M_impl.front()); }
+ const_reference front() const { return cast_traits::to_value_type_cref(_M_impl.front()); }
+ reference back() { return cast_traits::to_value_type_ref(_M_impl.back()); }
+ const_reference back() const { return cast_traits::to_value_type_cref(_M_impl.back()); }
+
+ reference at(size_type __n) { return cast_traits::to_value_type_ref(_M_impl.at(__n)); }
+ const_reference at(size_type __n) const { return cast_traits::to_value_type_cref(_M_impl.at(__n)); }
+
+ explicit vector(const allocator_type& __a = allocator_type())
+ : _M_impl(_STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit vector(size_type __n, const value_type& __val = _STLP_DEFAULT_CONSTRUCTED(value_type),
+#else
+ vector(size_type __n, const value_type& __val,
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ const allocator_type& __a = allocator_type())
+ : _M_impl(__n, cast_traits::to_storage_type_cref(__val),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ explicit vector(size_type __n)
+ : _M_impl(__n, allocator_type() ) {}
+#endif
+
+ vector(const _Self& __x)
+ : _M_impl(__x._M_impl) {}
+
+#if !defined (_STLP_NO_MOVE_SEMANTIC)
+ explicit vector(__move_source<_Self> src)
+ : _M_impl(__move_source<_Base>(src.get()._M_impl)) {}
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last,
+ const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL )
+ : _M_impl(__first, __last,
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+
+# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS)
+ template <class _InputIterator>
+ vector(_InputIterator __first, _InputIterator __last)
+ : _M_impl(__first, __last) {}
+# endif
+
+#else
+ vector(const_iterator __first, const_iterator __last,
+ const allocator_type& __a = allocator_type())
+ : _M_impl(cast_traits::to_storage_type_cptr(__first), cast_traits::to_storage_type_cptr(__last),
+ _STLP_CONVERT_ALLOCATOR(__a, _StorageType)) {}
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+ _Self& operator=(const _Self& __x) { _M_impl = __x._M_impl; return *this; }
+
+ void reserve(size_type __n) {_M_impl.reserve(__n);}
+ void assign(size_type __n, const value_type& __val)
+ { _M_impl.assign(__n, cast_traits::to_storage_type_cref(__val)); }
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void assign(_InputIterator __first, _InputIterator __last)
+ { _M_impl.assign(__first, __last); }
+#else
+ void assign(const_iterator __first, const_iterator __last) {
+ _M_impl.assign(cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+#endif /* _STLP_MEMBER_TEMPLATES */
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ void push_back(const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void push_back(const value_type& __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { _M_impl.push_back(cast_traits::to_storage_type_cref(__x)); }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ iterator insert(iterator __pos, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ iterator insert(iterator __pos, const value_type& __x)
+#endif /*!_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+ { return cast_traits::to_value_type_ptr(_M_impl.insert(cast_traits::to_storage_type_ptr(__pos),
+ cast_traits::to_storage_type_cref(__x))); }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM) && !defined(_STLP_NO_ANACHRONISMS)
+ void push_back() { _M_impl.push_back(); }
+ iterator insert(iterator __pos)
+ { return _M_impl.insert(cast_traits::to_storage_type_ptr(__pos)); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM && !_STLP_NO_ANACHRONISMS*/
+
+ void swap(_Self& __x) { _M_impl.swap(__x._M_impl); }
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+ void _M_swap_workaround(_Self& __x) { swap(__x); }
+#endif
+
+#if defined (_STLP_MEMBER_TEMPLATES)
+ template <class _InputIterator>
+ void insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+ { _M_impl.insert(cast_traits::to_storage_type_ptr(__pos), __first, __last); }
+#else
+ void insert(iterator __pos, const_iterator __first, const_iterator __last) {
+ _M_impl.insert(cast_traits::to_storage_type_ptr(__pos), cast_traits::to_storage_type_cptr(__first),
+ cast_traits::to_storage_type_cptr(__last));
+ }
+#endif
+
+ void insert (iterator __pos, size_type __n, const value_type& __x) {
+ _M_impl.insert(cast_traits::to_storage_type_ptr(__pos), __n, cast_traits::to_storage_type_cref(__x));
+ }
+
+ void pop_back() {_M_impl.pop_back();}
+ iterator erase(iterator __pos)
+ {return cast_traits::to_value_type_ptr(_M_impl.erase(cast_traits::to_storage_type_ptr(__pos)));}
+ iterator erase(iterator __first, iterator __last) {
+ return cast_traits::to_value_type_ptr(_M_impl.erase(cast_traits::to_storage_type_ptr(__first),
+ cast_traits::to_storage_type_ptr(__last)));
+ }
+
+#if !defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size, const value_type& __x = _STLP_DEFAULT_CONSTRUCTED(value_type))
+#else
+ void resize(size_type __new_size, const value_type& __x)
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+ { _M_impl.resize(__new_size, cast_traits::to_storage_type_cref(__x)); }
+
+#if defined(_STLP_DONT_SUP_DFLT_PARAM)
+ void resize(size_type __new_size) { _M_impl.resize(__new_size); }
+#endif /*_STLP_DONT_SUP_DFLT_PARAM*/
+
+ void clear() { _M_impl.clear(); }
+
+private:
+ _Base _M_impl;
+};
+
+#if defined (vector)
+# undef vector
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+#undef VECTOR_IMPL
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_SPECIALIZED_VECTOR_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/type_manips.h b/6/sources/cxx-stl/stlport/stlport/stl/type_manips.h
new file mode 100644
index 0000000..410b59d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/type_manips.h
@@ -0,0 +1,321 @@
+/*
+ *
+ * Copyright (c) 2003
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+
+#ifndef _STLP_TYPE_MANIPS_H
+#define _STLP_TYPE_MANIPS_H
+
+_STLP_BEGIN_NAMESPACE
+
+struct __true_type {};
+struct __false_type {};
+
+#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_DONT_USE_PRIV_NAMESPACE)
+_STLP_MOVE_TO_PRIV_NAMESPACE
+using _STLP_STD::__true_type;
+using _STLP_STD::__false_type;
+_STLP_MOVE_TO_STD_NAMESPACE
+#endif
+
+//bool to type
+template <int _Is>
+struct __bool2type
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct __bool2type<1> { typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct __bool2type<0> { typedef __false_type _Ret; };
+
+//type to bool
+template <class __bool_type>
+struct __type2bool { enum {_Ret = 1}; };
+
+_STLP_TEMPLATE_NULL
+struct __type2bool<__true_type> { enum {_Ret = 1}; };
+
+_STLP_TEMPLATE_NULL
+struct __type2bool<__false_type> { enum {_Ret = 0}; };
+
+//Negation
+template <class _BoolType>
+struct _Not { typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _Not<__false_type> { typedef __true_type _Ret; };
+
+// logical and of 2 predicated
+template <class _P1, class _P2>
+struct _Land2 { typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _Land2<__true_type, __true_type> { typedef __true_type _Ret; };
+
+// logical and of 3 predicated
+template <class _P1, class _P2, class _P3>
+struct _Land3 { typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _Land3<__true_type, __true_type, __true_type> { typedef __true_type _Ret; };
+
+//logical or of 2 predicated
+template <class _P1, class _P2>
+struct _Lor2 { typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _Lor2<__false_type, __false_type> { typedef __false_type _Ret; };
+
+// logical or of 3 predicated
+template <class _P1, class _P2, class _P3>
+struct _Lor3 { typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL
+struct _Lor3<__false_type, __false_type, __false_type> { typedef __false_type _Ret; };
+
+////////////////////////////////////////////////////////////////////////////////
+// class template __select
+// Selects one of two types based upon a boolean constant
+// Invocation: __select<_Cond, T, U>::Result
+// where:
+// flag is a compile-time boolean constant
+// T and U are types
+// Result evaluates to T if flag is true, and to U otherwise.
+////////////////////////////////////////////////////////////////////////////////
+// BEWARE: If the compiler do not support partial template specialization or nested template
+//classes the default behavior of the __select is to consider the condition as false and so return
+//the second template type!!
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+# if defined (__BORLANDC__)
+template <class _CondT, class _Tp1, class _Tp2>
+struct __selectT { typedef _Tp1 _Ret; };
+
+template <class _Tp1, class _Tp2>
+struct __selectT<__false_type, _Tp1, _Tp2> { typedef _Tp2 _Ret; };
+# endif
+
+# if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x590)
+template <bool _Cond, class _Tp1, class _Tp2>
+struct __select { typedef _Tp1 _Ret; };
+
+template <class _Tp1, class _Tp2>
+struct __select<false, _Tp1, _Tp2> { typedef _Tp2 _Ret; };
+# else
+template <bool _Cond, class _Tp1, class _Tp2>
+struct __select
+{ typedef __selectT<typename __bool2type<_Cond>::_Ret, _Tp1, _Tp2>::_Ret _Ret; };
+# endif
+
+#else
+
+# if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+template <int _Cond>
+struct __select_aux {
+ template <class _Tp1, class _Tp2>
+ struct _In {
+ typedef _Tp1 _Ret;
+ };
+};
+
+_STLP_TEMPLATE_NULL
+struct __select_aux<0> {
+ template <class _Tp1, class _Tp2>
+ struct _In {
+ typedef _Tp2 _Ret;
+ };
+};
+
+template <int _Cond, class _Tp1, class _Tp2>
+struct __select {
+ typedef typename __select_aux<_Cond>::_STLP_TEMPLATE _In<_Tp1, _Tp2>::_Ret _Ret;
+};
+# else /* _STLP_MEMBER_TEMPLATE_CLASSES */
+//default behavior
+template <int _Cond, class _Tp1, class _Tp2>
+struct __select {
+ typedef _Tp2 _Ret;
+};
+# endif /* _STLP_MEMBER_TEMPLATE_CLASSES */
+
+#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+/* Rather than introducing a new macro for the following constrution we use
+ * an existing one (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) that
+ * is used for a similar feature.
+ */
+#if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) && \
+ (!defined (__GNUC__) || (__GNUC__ > 2))
+// Helper struct that will forbid volatile qualified types:
+# if !defined (__BORLANDC__)
+struct _NoVolatilePointerShim { _NoVolatilePointerShim(const void*); };
+template <class _Tp>
+char _STLP_CALL _IsCopyableFun(bool, _NoVolatilePointerShim, _Tp const*, _Tp*); // no implementation is required
+char* _STLP_CALL _IsCopyableFun(bool, ...); // no implementation is required
+
+template <class _Src, class _Dst>
+struct _Copyable {
+ static _Src* __null_src();
+ static _Dst* __null_dst();
+ enum { _Ret = (sizeof(_IsCopyableFun(false, __null_src(), __null_src(), __null_dst())) == sizeof(char)) };
+ typedef typename __bool2type<_Ret>::_Ret _RetT;
+};
+# else
+template <class _Tp1, class _Tp2> struct _AreSameTypes;
+template <class _Tp> struct _IsUnQual;
+template <class _Src, class _Dst>
+struct _Copyable {
+ typedef typename _AreSameTypes<_Src, _Dst>::_Ret _Tr1;
+ typedef typename _IsUnQual<_Dst>::_Ret _Tr2;
+ typedef typename _Land2<_Tr1, _Tr2>::_Ret _RetT;
+ enum { _Ret = __type2bool<_RetT>::_Ret };
+};
+# endif
+#else
+template <class _Src, class _Dst>
+struct _Copyable {
+ enum { _Ret = 0 };
+ typedef __false_type _RetT;
+};
+#endif
+
+/*
+ * The following struct will tell you if 2 types are the same and if copying memory
+ * from the _Src type to the _Dst type is right considering qualifiers. If _Src and
+ * _Dst types are the same unqualified types _Ret will be false if:
+ * - any of the type has the volatile qualifier
+ * - _Dst is const qualified
+ */
+template <class _Src, class _Dst>
+struct _AreCopyable {
+ enum { _Same = _Copyable<_Src, _Dst>::_Ret };
+ typedef typename _Copyable<_Src, _Dst>::_RetT _Ret;
+};
+
+template <class _Tp1, class _Tp2>
+struct _AreSameTypes {
+ enum { _Same = 0 };
+ typedef __false_type _Ret;
+};
+
+#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct _AreSameTypes<_Tp, _Tp> {
+ enum { _Same = 1 };
+ typedef __true_type _Ret;
+};
+#endif
+
+#if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
+template <class _Src, class _Dst>
+struct _ConversionHelper {
+ static char _Test(bool, _Dst);
+ static char* _Test(bool, ...);
+ static _Src _MakeSource();
+};
+
+template <class _Src, class _Dst>
+struct _IsConvertible {
+ typedef _ConversionHelper<_Src*, const volatile _Dst*> _H;
+ enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) };
+ typedef typename __bool2type<value>::_Ret _Ret;
+};
+
+# if defined (__BORLANDC__)
+# if (__BORLANDC__ < 0x590)
+template<class _Tp>
+struct _UnConstPtr { typedef _Tp _Type; };
+
+template<class _Tp>
+struct _UnConstPtr<_Tp*> { typedef _Tp _Type; };
+
+template<class _Tp>
+struct _UnConstPtr<const _Tp*> { typedef _Tp _Type; };
+# endif
+
+# if !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG)
+template <class _Tp>
+struct _IsConst { typedef __false_type _Ret; };
+# else
+template <class _Tp>
+struct _IsConst { typedef _AreSameTypes<_Tp, const _Tp>::_Ret _Ret; };
+# endif
+
+# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG)
+template <class _Tp>
+struct _IsConst <const _Tp> { typedef __true_type _Ret; };
+# endif
+
+# if (__BORLANDC__ < 0x590)
+template<class _Tp>
+struct _IsConst<_Tp*> { typedef _AreSameTypes<_Tp*, const _Tp*>::_Ret _Ret; };
+# endif
+template <class _Tp>
+struct _IsVolatile { typedef _AreSameTypes<_Tp, volatile _Tp>::_Ret _Ret; };
+
+template<class _Tp>
+struct _IsUnQual {
+ typedef _IsConst<_Tp>::_Ret _Tr1;
+ typedef _IsVolatile<_Tp>::_Ret _Tr2;
+ typedef _Not<_Tr1>::_Ret _NotCon;
+ typedef _Not<_Tr2>::_Ret _NotVol;
+ typedef _Land2<_NotCon, _NotVol>::_Ret _Ret;
+};
+
+# if !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG)
+template <class _Tp> struct _UnQual { typedef _Tp _Type; };
+template <class _Tp> struct _UnQual<const _Tp> { typedef _Tp _Type; };
+template <class _Tp> struct _UnQual<volatile _Tp> { typedef _Tp _Type; };
+template <class _Tp> struct _UnQual<const volatile _Tp> { typedef _Tp _Type; };
+# endif
+# endif
+
+/* This struct is intended to say if a pointer can be convertible to an other
+ * taking into account cv qualifications. It shouldn't be instanciated with
+ * something else than pointer type as it uses pass by value parameter that
+ * results in compilation error when parameter type has a special memory
+ * alignment
+ */
+template <class _Src, class _Dst>
+struct _IsCVConvertible {
+# if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x590)
+ typedef _ConversionHelper<_Src, _Dst> _H;
+ enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) };
+# else
+ enum { _Is1 = __type2bool<_IsConst<_Src>::_Ret>::_Ret };
+ enum { _Is2 = _IsConvertible<_UnConstPtr<_Src>::_Type, _UnConstPtr<_Dst>::_Type>::value };
+ enum { value = _Is1 ? 0 : _Is2 };
+# endif
+ typedef typename __bool2type<value>::_Ret _Ret;
+};
+
+#else
+template <class _Src, class _Dst>
+struct _IsConvertible {
+ enum { value = 0 };
+ typedef __false_type _Ret;
+};
+
+template <class _Src, class _Dst>
+struct _IsCVConvertible {
+ enum { value = 0 };
+ typedef __false_type _Ret;
+};
+#endif
+
+_STLP_END_NAMESPACE
+
+#endif /* _STLP_TYPE_MANIPS_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/stl/type_traits.h b/6/sources/cxx-stl/stlport/stlport/stl/type_traits.h
new file mode 100644
index 0000000..af0923d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/stl/type_traits.h
@@ -0,0 +1,626 @@
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_TYPE_TRAITS_H
+#define _STLP_TYPE_TRAITS_H
+
+/*
+This header file provides a framework for allowing compile time dispatch
+based on type attributes. This is useful when writing template code.
+For example, when making a copy of an array of an unknown type, it helps
+to know if the type has a trivial copy constructor or not, to help decide
+if a memcpy can be used.
+
+The class template __type_traits provides a series of typedefs each of
+which is either __true_type or __false_type. The argument to
+__type_traits can be any type. The typedefs within this template will
+attain their correct values by one of these means:
+ 1. The general instantiation contain conservative values which work
+ for all types.
+ 2. Specializations may be declared to make distinctions between types.
+ 3. Some compilers (such as the Silicon Graphics N32 and N64 compilers)
+ will automatically provide the appropriate specializations for all
+ types.
+
+EXAMPLE:
+
+//Copy an array of elements which have non-trivial copy constructors
+template <class T> void copy(T* source, T* destination, int n, __false_type);
+//Copy an array of elements which have trivial copy constructors. Use memcpy.
+template <class T> void copy(T* source, T* destination, int n, __true_type);
+
+//Copy an array of any type by using the most efficient copy mechanism
+template <class T> inline void copy(T* source,T* destination,int n) {
+ copy(source, destination, n,
+ typename __type_traits<T>::has_trivial_copy_constructor());
+}
+*/
+
+#ifdef __WATCOMC__
+# include <stl/_cwchar.h>
+#endif
+
+#ifndef _STLP_TYPE_MANIPS_H
+# include <stl/type_manips.h>
+#endif
+
+#ifdef _STLP_USE_BOOST_SUPPORT
+# include <stl/boost_type_traits.h>
+# include <boost/type_traits/add_reference.hpp>
+# include <boost/type_traits/add_const.hpp>
+#endif /* _STLP_USE_BOOST_SUPPORT */
+
+_STLP_BEGIN_NAMESPACE
+
+#if !defined (_STLP_USE_BOOST_SUPPORT)
+
+// The following could be written in terms of numeric_limits.
+// We're doing it separately to reduce the number of dependencies.
+
+template <class _Tp> struct _IsIntegral
+{ typedef __false_type _Ret; };
+
+# ifndef _STLP_NO_BOOL
+_STLP_TEMPLATE_NULL struct _IsIntegral<bool>
+{ typedef __true_type _Ret; };
+# endif /* _STLP_NO_BOOL */
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<char>
+{ typedef __true_type _Ret; };
+
+# ifndef _STLP_NO_SIGNED_BUILTINS
+_STLP_TEMPLATE_NULL struct _IsIntegral<signed char>
+{ typedef __true_type _Ret; };
+# endif
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<unsigned char>
+{ typedef __true_type _Ret; };
+
+# if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
+_STLP_TEMPLATE_NULL struct _IsIntegral<wchar_t>
+{ typedef __true_type _Ret; };
+# endif /* _STLP_HAS_WCHAR_T */
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<short>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<unsigned short>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<int>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<unsigned int>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<long>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<unsigned long>
+{ typedef __true_type _Ret; };
+
+# ifdef _STLP_LONG_LONG
+_STLP_TEMPLATE_NULL struct _IsIntegral<_STLP_LONG_LONG>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsIntegral<unsigned _STLP_LONG_LONG>
+{ typedef __true_type _Ret; };
+# endif /* _STLP_LONG_LONG */
+
+template <class _Tp> struct _IsRational
+{ typedef __false_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsRational<float>
+{ typedef __true_type _Ret; };
+
+_STLP_TEMPLATE_NULL struct _IsRational<double>
+{ typedef __true_type _Ret; };
+
+# if !defined ( _STLP_NO_LONG_DOUBLE )
+_STLP_TEMPLATE_NULL struct _IsRational<long double>
+{ typedef __true_type _Ret; };
+# endif
+
+// Forward declarations.
+template <class _Tp> struct __type_traits;
+template <class _IsPOD> struct __type_traits_aux {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __false_type has_trivial_copy_constructor;
+ typedef __false_type has_trivial_assignment_operator;
+ typedef __false_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+
+_STLP_TEMPLATE_NULL
+struct __type_traits_aux<__false_type> {
+ typedef __false_type has_trivial_default_constructor;
+ typedef __false_type has_trivial_copy_constructor;
+ typedef __false_type has_trivial_assignment_operator;
+ typedef __false_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+};
+
+_STLP_TEMPLATE_NULL
+struct __type_traits_aux<__true_type> {
+ typedef __true_type has_trivial_default_constructor;
+ typedef __true_type has_trivial_copy_constructor;
+ typedef __true_type has_trivial_assignment_operator;
+ typedef __true_type has_trivial_destructor;
+ typedef __true_type is_POD_type;
+};
+
+template <class _Tp>
+struct _IsRef {
+ typedef __false_type _Ret;
+};
+
+# if defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
+/*
+ * Boris : simulation technique is used here according to Adobe Open Source License Version 1.0.
+ * Copyright 2000 Adobe Systems Incorporated and others. All rights reserved.
+ * Authors: Mat Marcus and Jesse Jones
+ * The original version of this source code may be found at
+ * http://opensource.adobe.com.
+ */
+
+struct _PointerShim {
+ /*
+ * Since the compiler only allows at most one non-trivial
+ * implicit conversion we can make use of a shim class to
+ * be sure that IsPtr below doesn't accept classes with
+ * implicit pointer conversion operators
+ */
+ _PointerShim(const volatile void*); // no implementation
+};
+
+// These are the discriminating functions
+char _STLP_CALL _IsP(bool, _PointerShim); // no implementation is required
+char* _STLP_CALL _IsP(bool, ...); // no implementation is required
+
+template <class _Tp>
+struct _IsPtr {
+ /*
+ * This template meta function takes a type T
+ * and returns true exactly when T is a pointer.
+ * One can imagine meta-functions discriminating on
+ * other criteria.
+ */
+ static _Tp& __null_rep();
+ enum { _Ptr = (sizeof(_IsP(false,__null_rep())) == sizeof(char)) };
+ typedef typename __bool2type<_Ptr>::_Ret _Ret;
+
+};
+
+// we make general case dependant on the fact the type is actually a pointer.
+template <class _Tp>
+struct __type_traits : __type_traits_aux<typename _IsPtr<_Tp>::_Ret> {};
+
+# else /* _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS */
+
+template <class _Tp> struct _IsPtr {
+ typedef __false_type _Ret;
+};
+
+template <class _Tp>
+struct __type_traits {
+ typedef __true_type this_dummy_member_must_be_first;
+ /* Do not remove this member. It informs a compiler which
+ automatically specializes __type_traits that this
+ __type_traits template is special. It just makes sure that
+ things work if an implementation is using a template
+ called __type_traits for something unrelated. */
+
+ /* The following restrictions should be observed for the sake of
+ compilers which automatically produce type specific specializations
+ of this class:
+ - You may reorder the members below if you wish
+ - You may remove any of the members below if you wish
+ - You must not rename members without making the corresponding
+ name change in the compiler
+ - Members you add will be treated like regular members unless
+
+ you add the appropriate support in the compiler. */
+# if !defined (_STLP_HAS_TYPE_TRAITS_INTRINSICS)
+ typedef __false_type has_trivial_default_constructor;
+ typedef __false_type has_trivial_copy_constructor;
+ typedef __false_type has_trivial_assignment_operator;
+ typedef __false_type has_trivial_destructor;
+ typedef __false_type is_POD_type;
+# else
+ typedef typename __bool2type<_STLP_HAS_TRIVIAL_CONSTRUCTOR(_Tp)>::_Ret has_trivial_default_constructor;
+ typedef typename __bool2type<_STLP_HAS_TRIVIAL_COPY(_Tp)>::_Ret has_trivial_copy_constructor;
+ typedef typename __bool2type<_STLP_HAS_TRIVIAL_ASSIGN(_Tp)>::_Ret has_trivial_assignment_operator;
+ typedef typename __bool2type<_STLP_HAS_TRIVIAL_DESTRUCTOR(_Tp)>::_Ret has_trivial_destructor;
+ typedef typename __bool2type<_STLP_IS_POD(_Tp)>::_Ret is_POD_type;
+# endif
+};
+
+# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp> struct _IsPtr<_Tp*>
+{ typedef __true_type _Ret; };
+template <class _Tp> struct _IsRef<_Tp&>
+{ typedef __true_type _Ret; };
+
+template <class _Tp> struct __type_traits<_Tp*> : __type_traits_aux<__true_type>
+{};
+# endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
+
+# endif /* _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS */
+
+// Provide some specializations. This is harmless for compilers that
+// have built-in __types_traits support, and essential for compilers
+// that don't.
+# if !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG)
+# define _STLP_DEFINE_TYPE_TRAITS_FOR(Type) \
+_STLP_TEMPLATE_NULL struct __type_traits< Type > : __type_traits_aux<__true_type> {}; \
+_STLP_TEMPLATE_NULL struct __type_traits< const Type > : __type_traits_aux<__true_type> {}; \
+_STLP_TEMPLATE_NULL struct __type_traits< volatile Type > : __type_traits_aux<__true_type> {}; \
+_STLP_TEMPLATE_NULL struct __type_traits< const volatile Type > : __type_traits_aux<__true_type> {}
+# else
+# define _STLP_DEFINE_TYPE_TRAITS_FOR(Type) \
+_STLP_TEMPLATE_NULL struct __type_traits< Type > : __type_traits_aux<__true_type> {};
+# endif
+
+# ifndef _STLP_NO_BOOL
+_STLP_DEFINE_TYPE_TRAITS_FOR(bool);
+# endif /* _STLP_NO_BOOL */
+_STLP_DEFINE_TYPE_TRAITS_FOR(char);
+# ifndef _STLP_NO_SIGNED_BUILTINS
+_STLP_DEFINE_TYPE_TRAITS_FOR(signed char);
+# endif
+_STLP_DEFINE_TYPE_TRAITS_FOR(unsigned char);
+# if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
+_STLP_DEFINE_TYPE_TRAITS_FOR(wchar_t);
+# endif /* _STLP_HAS_WCHAR_T */
+
+_STLP_DEFINE_TYPE_TRAITS_FOR(short);
+_STLP_DEFINE_TYPE_TRAITS_FOR(unsigned short);
+_STLP_DEFINE_TYPE_TRAITS_FOR(int);
+_STLP_DEFINE_TYPE_TRAITS_FOR(unsigned int);
+_STLP_DEFINE_TYPE_TRAITS_FOR(long);
+_STLP_DEFINE_TYPE_TRAITS_FOR(unsigned long);
+
+# ifdef _STLP_LONG_LONG
+_STLP_DEFINE_TYPE_TRAITS_FOR(_STLP_LONG_LONG);
+_STLP_DEFINE_TYPE_TRAITS_FOR(unsigned _STLP_LONG_LONG);
+# endif /* _STLP_LONG_LONG */
+
+_STLP_DEFINE_TYPE_TRAITS_FOR(float);
+_STLP_DEFINE_TYPE_TRAITS_FOR(double);
+
+# if !defined ( _STLP_NO_LONG_DOUBLE )
+_STLP_DEFINE_TYPE_TRAITS_FOR(long double);
+# endif
+
+# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _ArePtrs, class _Src, class _Dst>
+struct _IsCVConvertibleIf
+{ typedef typename _IsCVConvertible<_Src, _Dst>::_Ret _Ret; };
+
+template <class _Src, class _Dst>
+struct _IsCVConvertibleIf<__false_type, _Src, _Dst>
+{ typedef __false_type _Ret; };
+# else
+# if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
+template <class _ArePtrs>
+struct _IsCVConvertibleIfAux {
+ template <class _Src, class _Dst>
+ struct _In
+ { typedef typename _IsCVConvertible<_Src, _Dst>::_Ret _Ret; };
+};
+
+_STLP_TEMPLATE_NULL
+struct _IsCVConvertibleIfAux<__false_type> {
+ template <class _Src, class _Dst>
+ struct _In
+ { typedef __false_type _Ret; };
+};
+
+template <class _ArePtrs, class _Src, class _Dst>
+struct _IsCVConvertibleIf {
+ typedef typename _IsCVConvertibleIfAux<_ArePtrs>::_STLP_TEMPLATE _In<_Src, _Dst>::_Ret _Ret;
+};
+# else
+/* default behavior: we prefer to miss an optimization rather than taking the risk of
+ * a compilation error if playing with types with exotic memory alignment.
+ */
+template <class _ArePtrs, class _Src, class _Dst>
+struct _IsCVConvertibleIf
+{ typedef __false_type _Ret; };
+# endif
+# endif
+
+template <class _Src, class _Dst>
+struct _TrivialNativeTypeCopy {
+ typedef typename _IsPtr<_Src>::_Ret _Ptr1;
+ typedef typename _IsPtr<_Dst>::_Ret _Ptr2;
+ typedef typename _Land2<_Ptr1, _Ptr2>::_Ret _BothPtrs;
+ typedef typename _IsCVConvertibleIf<_BothPtrs, _Src, _Dst>::_Ret _Convertible;
+ typedef typename _Land2<_BothPtrs, _Convertible>::_Ret _Trivial1;
+
+ typedef typename __bool2type<(sizeof(_Src) == sizeof(_Dst))>::_Ret _SameSize;
+
+#if !defined (__BORLANDC__) || (__BORLANDC__ < 0x564)
+ typedef typename _IsIntegral<_Src>::_Ret _Int1;
+#else
+ typedef typename _UnQual<_Src>::_Type _UnQuSrc;
+ typedef typename _IsIntegral<_UnQuSrc>::_Ret _Int1;
+#endif
+ typedef typename _IsIntegral<_Dst>::_Ret _Int2;
+ typedef typename _Land2<_Int1, _Int2>::_Ret _BothInts;
+
+ typedef typename _IsRational<_Src>::_Ret _Rat1;
+ typedef typename _IsRational<_Dst>::_Ret _Rat2;
+ typedef typename _Land2<_Rat1, _Rat2>::_Ret _BothRats;
+
+ typedef typename _Lor2<_BothInts, _BothRats>::_Ret _BothNatives;
+#if !defined (__BORLANDC__) || (__BORLANDC__ >= 0x564)
+ typedef typename _Land2<_BothNatives, _SameSize>::_Ret _Trivial2;
+#else
+ typedef typename _IsUnQual<_Dst>::_Ret _UnQualDst;
+ typedef typename _Land3<_BothNatives, _SameSize, _UnQualDst>::_Ret _Trivial2;
+#endif
+ typedef typename _Lor2<_Trivial1, _Trivial2>::_Ret _Ret;
+};
+
+template <class _Src, class _Dst>
+struct _TrivialCopy {
+ typedef typename _TrivialNativeTypeCopy<_Src, _Dst>::_Ret _NativeRet;
+# if !defined (__BORLANDC__) || (__BORLANDC__ != 0x560)
+ typedef typename __type_traits<_Src>::has_trivial_assignment_operator _Tr1;
+# else
+ typedef typename _UnConstPtr<_Src*>::_Type _UnConstSrc;
+ typedef typename __type_traits<_UnConstSrc>::has_trivial_assignment_operator _Tr1;
+# endif
+ typedef typename _AreCopyable<_Src, _Dst>::_Ret _Tr2;
+ typedef typename _Land2<_Tr1, _Tr2>::_Ret _UserRet;
+ typedef typename _Lor2<_NativeRet, _UserRet>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+template <class _Src, class _Dst>
+struct _TrivialUCopy {
+ typedef typename _TrivialNativeTypeCopy<_Src, _Dst>::_Ret _NativeRet;
+# if !defined (__BORLANDC__) || (__BORLANDC__ != 0x560)
+ typedef typename __type_traits<_Src>::has_trivial_copy_constructor _Tr1;
+# else
+ typedef typename _UnConstPtr<_Src*>::_Type _UnConstSrc;
+ typedef typename __type_traits<_UnConstSrc>::has_trivial_copy_constructor _Tr1;
+# endif
+ typedef typename _AreCopyable<_Src, _Dst>::_Ret _Tr2;
+ typedef typename _Land2<_Tr1, _Tr2>::_Ret _UserRet;
+ typedef typename _Lor2<_NativeRet, _UserRet>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+template <class _Tp>
+struct _DefaultZeroValue {
+ typedef typename _IsIntegral<_Tp>::_Ret _Tr1;
+ typedef typename _IsRational<_Tp>::_Ret _Tr2;
+ typedef typename _IsPtr<_Tp>::_Ret _Tr3;
+ typedef typename _Lor3<_Tr1, _Tr2, _Tr3>::_Ret _Ret;
+};
+
+template <class _Tp>
+struct _TrivialInit {
+# if !defined (__BORLANDC__) || (__BORLANDC__ != 0x560)
+ typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Tr1;
+# else
+ typedef typename _UnConstPtr<_Tp*>::_Type _Tp1;
+ typedef typename __type_traits<_Tp1>::has_trivial_copy_constructor _Tr1;
+# endif
+ typedef typename _DefaultZeroValue<_Tp>::_Ret _Tr2;
+ typedef typename _Not<_Tr2>::_Ret _Tr3;
+ typedef typename _Land2<_Tr1, _Tr3>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+#endif /* !_STLP_USE_BOOST_SUPPORT */
+
+template <class _Tp>
+struct _IsPtrType {
+ typedef typename _IsPtr<_Tp>::_Ret _Type;
+ static _Type _Ret() { return _Type(); }
+};
+
+template <class _Tp>
+struct _IsRefType {
+ typedef typename _IsRef<_Tp>::_Ret _Type;
+ static _Type _Ret() { return _Type();}
+};
+
+template <class _Tp>
+struct __call_traits {
+#if defined (_STLP_USE_BOOST_SUPPORT) && !defined (_STLP_NO_EXTENSIONS)
+ typedef typename __select< ::boost::is_reference<_Tp>::value,
+ typename ::boost::add_const<_Tp>::type,
+ typename ::boost::add_reference< typename ::boost::add_const<_Tp>::type >::type>::_Ret const_param_type;
+ typedef typename __select< ::boost::is_reference<_Tp>::value,
+ typename ::boost::remove_const<_Tp>::type,
+ typename ::boost::add_reference<_Tp>::type>::_Ret param_type;
+#else
+ typedef const _Tp& const_param_type;
+ typedef _Tp& param_type;
+#endif
+};
+
+#if !defined (_STLP_USE_BOOST_SUPPORT) && !defined (_STLP_NO_EXTENSIONS) && defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
+template <class _Tp>
+struct __call_traits<_Tp&> {
+ typedef _Tp& param_type;
+ typedef const _Tp& const_param_type;
+};
+template <class _Tp>
+struct __call_traits<const _Tp&> {
+ typedef _Tp& param_type;
+ typedef const _Tp& const_param_type;
+};
+#endif
+
+template <class _Tp1, class _Tp2>
+struct _BothPtrType {
+ typedef typename _IsPtr<_Tp1>::_Ret _IsPtr1;
+ typedef typename _IsPtr<_Tp2>::_Ret _IsPtr2;
+
+ typedef typename _Land2<_IsPtr1, _IsPtr2>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+template <class _Tp1, class _Tp2, class _IsRef1, class _IsRef2>
+struct _OKToSwap {
+ typedef typename _AreSameTypes<_Tp1, _Tp2>::_Ret _Same;
+ typedef typename _Land3<_Same, _IsRef1, _IsRef2>::_Ret _Type;
+ static _Type _Answer() { return _Type(); }
+};
+
+template <class _Tp1, class _Tp2, class _IsRef1, class _IsRef2>
+inline _OKToSwap<_Tp1, _Tp2, _IsRef1, _IsRef2>
+_IsOKToSwap(_Tp1*, _Tp2*, const _IsRef1&, const _IsRef2&)
+{ return _OKToSwap<_Tp1, _Tp2, _IsRef1, _IsRef2>(); }
+
+template <class _Src, class _Dst>
+inline _TrivialCopy<_Src, _Dst> _UseTrivialCopy(_Src*, _Dst*)
+{ return _TrivialCopy<_Src, _Dst>(); }
+
+template <class _Src, class _Dst>
+inline _TrivialUCopy<_Src, _Dst> _UseTrivialUCopy(_Src*, _Dst*)
+{ return _TrivialUCopy<_Src, _Dst>(); }
+
+#if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) || defined (__BORLANDC__) || \
+ defined (__DMC__)
+struct _NegativeAnswer {
+ typedef __false_type _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialCopy(_Src*, const _Dst*)
+{ return _NegativeAnswer(); }
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialCopy(_Src*, volatile _Dst*)
+{ return _NegativeAnswer(); }
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialCopy(_Src*, const volatile _Dst*)
+{ return _NegativeAnswer(); }
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialUCopy(_Src*, const _Dst*)
+{ return _NegativeAnswer(); }
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialUCopy(_Src*, volatile _Dst*)
+{ return _NegativeAnswer(); }
+
+template <class _Src, class _Dst>
+inline _NegativeAnswer _UseTrivialUCopy(_Src*, const volatile _Dst*)
+{ return _NegativeAnswer(); }
+#endif
+
+template <class _Tp>
+inline _TrivialInit<_Tp> _UseTrivialInit(_Tp*)
+{ return _TrivialInit<_Tp>(); }
+
+template <class _Tp>
+struct _IsPOD {
+ typedef typename __type_traits<_Tp>::is_POD_type _Type;
+ static _Type _Answer() { return _Type(); }
+};
+
+template <class _Tp>
+inline _IsPOD<_Tp> _Is_POD(_Tp*)
+{ return _IsPOD<_Tp>(); }
+
+template <class _Tp>
+struct _DefaultZeroValueQuestion {
+ typedef typename _DefaultZeroValue<_Tp>::_Ret _Ret;
+ static _Ret _Answer() { return _Ret(); }
+};
+
+template <class _Tp>
+inline _DefaultZeroValueQuestion<_Tp> _HasDefaultZeroValue(_Tp*)
+{ return _DefaultZeroValueQuestion<_Tp>(); }
+
+/*
+ * Base class used:
+ * - to simulate partial template specialization
+ * - to simulate partial function ordering
+ * - to recognize STLport class from user specialized one
+ */
+template <class _Tp>
+struct __stlport_class
+{ typedef _Tp _Type; };
+
+template <class _Tp>
+struct _IsSTLportClass {
+ typedef typename _IsConvertible<_Tp, __stlport_class<_Tp> >::_Ret _Ret;
+#if defined (__BORLANDC__)
+ enum { _Is = _IsConvertible<_Tp, __stlport_class<_Tp> >::value };
+#endif
+};
+
+#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
+template <class _Tp>
+struct _SwapImplemented {
+ typedef typename _IsSTLportClass<_Tp>::_Ret _Ret;
+# if defined (__BORLANDC__)
+ enum { _Is = _IsSTLportClass<_Tp>::_Is };
+# endif
+};
+#endif
+
+template <class _Tp>
+class _TpWithState : private _Tp {
+ _TpWithState();
+ int _state;
+};
+
+/* This is an internal helper struct used to guess if we are working
+ * on a stateless class. It can only be instanciated with a class type. */
+template <class _Tp>
+struct _IsStateless {
+ enum { _Is = sizeof(_TpWithState<_Tp>) == sizeof(int) };
+ typedef typename __bool2type<_Is>::_Ret _Ret;
+};
+
+_STLP_END_NAMESPACE
+
+#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
+# if defined (__BORLANDC__) || \
+ defined (__SUNPRO_CC) || \
+ (defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || \
+ (defined (__sgi) && defined (_COMPILER_VERSION)) || \
+ defined (__DMC__)
+# define _STLP_IS_POD_ITER(_It, _Tp) __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type()
+# else
+# define _STLP_IS_POD_ITER(_It, _Tp) typename __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type()
+# endif
+#else
+# define _STLP_IS_POD_ITER(_It, _Tp) _Is_POD( _STLP_VALUE_TYPE( _It, _Tp ) )._Answer()
+#endif
+
+#endif /* _STLP_TYPE_TRAITS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/streambuf b/6/sources/cxx-stl/stlport/stlport/streambuf
new file mode 100644
index 0000000..f4dc253
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/streambuf
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_STREAMBUF
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1066
+# include <stl/_prolog.h>
+# define _STLP_STREAMBUF
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1066) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_STREAMBUF
+# include <stl/_streambuf.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1066) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <streambuf>
+# else
+# include _STLP_NATIVE_HEADER(streambuf)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1066)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STREAMBUF */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/streambuf.h b/6/sources/cxx-stl/stlport/stlport/streambuf.h
new file mode 100644
index 0000000..ff2bff5
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/streambuf.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+#ifndef _STLP_STREAMBUF_H
+#define _STLP_STREAMBUF_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2067
+# include <stl/_prolog.h>
+#endif
+
+#include <stl/_ioserr.h>
+
+#include <streambuf>
+
+#include <ios.h>
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+_STLP_USING_NAMESPACE(stlport)
+# else
+using _STLP_STD::basic_streambuf;
+using _STLP_STD::streambuf;
+# ifndef _STLP_NO_WCHAR_T
+using _STLP_STD::wstreambuf;
+# endif
+# endif
+#endif /* _STLP_HAS_NO_NAMESPACES */
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2067)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STREAMBUF_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/string b/6/sources/cxx-stl/stlport/stlport/string
new file mode 100644
index 0000000..74d4589
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/string
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRING
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x68
+# include <stl/_prolog.h>
+# define _STLP_STRING
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x68)
+# ifndef _STLP_INTERNAL_STRING_H
+# include <stl/_string.h>
+# endif
+
+# ifndef _STLP_STRING_HASH_H
+# include <stl/_string_hash.h>
+# endif
+
+# if !defined (_STLP_USE_NO_IOSTREAMS) && !defined (_STLP_STRING_IO_H)
+# include <stl/_string_io.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x68) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <string>
+# else
+# include _STLP_NATIVE_HEADER(string)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x68)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STRING */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/string.h b/6/sources/cxx-stl/stlport/stlport/string.h
new file mode 100644
index 0000000..52013cf
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/string.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+/* Workaround for a "misbehaviour" when compiling resource scripts using
+ * eMbedded Visual C++. The standard .rc file includes windows header files,
+ * which in turn include string.h, which results in warnings and errors
+ */
+#ifndef _STLP_STRING_H
+
+#if !defined (RC_INVOKED)
+
+# ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x269
+# include <stl/_cprolog.h>
+# elif (_STLP_OUTERMOST_HEADER_ID == 0x269) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_STRING_H
+# endif
+
+# if defined(_STLP_WCE_EVC3)
+struct _exception;
+# endif
+# if (_STLP_OUTERMOST_HEADER_ID != 0x269) || defined (_STLP_DONT_POP_HEADER_ID)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <string.h>
+# else
+# include _STLP_NATIVE_C_HEADER(string.h)
+# endif
+# else
+# if defined (__BORLANDC__) && !defined (__linux__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <_str.h>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(_str.h)
+# endif
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <string.h>
+# else
+# include _STLP_NATIVE_C_HEADER(string.h)
+# endif
+# endif
+# endif
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x269)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+# endif
+#endif /* RC_INVOKED */
+#endif /* _STLP_STRING_H */
diff --git a/6/sources/cxx-stl/stlport/stlport/strstream b/6/sources/cxx-stl/stlport/stlport/strstream
new file mode 100644
index 0000000..247574f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/strstream
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+// WARNING: The classes defined in this header are DEPRECATED. This
+// header is defined in section D.7.1 of the C++ standard, and it
+// MAY BE REMOVED in a future standard revision. You should use the
+// header <sstream> instead.
+
+
+#ifndef _STLP_STRSTREAM
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x1070
+# include <stl/_prolog.h>
+# define _STLP_STRSTREAM
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1070) && \
+ !(defined (_STLP_NO_IOSTREAMS) && defined (_STLP_IMPORT_VENDOR_STD))
+# include <stl/_ioserr.h>
+
+# ifndef _STLP_INTERNAL_STRSTREAM
+# include <stl/_strstream.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x1070) || defined (_STLP_IMPORT_VENDOR_STD)
+/* Even if deprecated strstream header is still part of the Standard. Remove
+ * _STLP_IMPORT_VENDOR_STD check if the native compiler library do not grant
+ * it anymore. */
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <strstream>
+# else
+# include _STLP_NATIVE_HEADER(strstream)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x1070)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STRSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/strstream.h b/6/sources/cxx-stl/stlport/stlport/strstream.h
new file mode 100644
index 0000000..e302a16
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/strstream.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_STRSTREAM_H
+# define _STLP_STRSTREAM_H
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x2071
+# include <stl/_prolog.h>
+#endif
+
+#include <strstream>
+
+#include <iostream.h>
+
+
+#ifndef _STLP_HAS_NO_NAMESPACES
+
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+
+using namespace _STLP_STD;
+
+# else
+
+using _STLP_STD::strstreambuf;
+using _STLP_STD::istrstream;
+using _STLP_STD::ostrstream;
+using _STLP_STD::strstream;
+
+# endif /* _STLP_BROKEN_USING_DIRECTIVE */
+
+#endif /* _STLP_HAS_NO_NAMESPACES */
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x2071)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_STRSTREAM_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/time.h b/6/sources/cxx-stl/stlport/stlport/time.h
new file mode 100644
index 0000000..e73aa85
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/time.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x272
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x272) && ! defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#ifdef _STLP_WCE_EVC3
+/* only show message when directly including this file in a non-library build */
+# if !defined(__BUILDING_STLPORT) && (_STLP_OUTERMOST_HEADER_ID == 0x272)
+# pragma message("eMbedded Visual C++ 3 doesn't have a time.h header; STLport won't include native time.h here")
+# endif
+#else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <time.h>
+# else
+# include _STLP_NATIVE_C_HEADER(time.h)
+# endif
+#endif
+
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x272)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/type_traits b/6/sources/cxx-stl/stlport/stlport/type_traits
new file mode 100644
index 0000000..e6fe234
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/type_traits
@@ -0,0 +1,798 @@
+// -*- C++ -*- Time-stamp: <08/07/20 19:10:15 ptr>
+
+/*
+ * Copyright (c) 2007, 2008
+ * Petr Ovtchenkov
+ *
+ * Licensed under the Academic Free License version 3.0
+ *
+ * Derived from original <misc/type_traits.h> of 'complement' project
+ * [http://complement.sourceforge.net]
+ * to make it close to JTC1/SC22/WG21 C++ 0x working draft
+ * [http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2008/n2521.pdf]
+ */
+
+#ifndef __STLP_TYPE_TRAITS
+#define __STLP_TYPE_TRAITS
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x3
+# include <stl/_prolog.h>
+#endif
+
+// libstdc++ v3, timestamp 20050519 (3.4.4) has __type_traits,
+// libstdc++ v3, timestamp 20060306 (3.4.6) has __type_traits,
+// while libstdc++ v3, 20050921 (4.0.2) not; use libstdc++ instead
+// # if defined(STLPORT) || (defined(__GNUC__) && (__GNUC__ < 4)) /* !defined(__GLIBCXX__) || (defined(__GNUC__) && (__GNUC__ < 4)) */
+
+_STLP_BEGIN_NAMESPACE
+
+_STLP_BEGIN_TR1_NAMESPACE
+
+namespace detail {
+
+struct __select_types
+{
+ typedef char __t1;
+ struct __t2
+ {
+ char __two[2];
+ };
+};
+
+template <class _Tp>
+struct __instance :
+ public __select_types
+{
+ private:
+ template <class _Up>
+ static __t1 __test(_Up(*)[1]);
+
+ template <class>
+ static __t2 __test(...);
+
+ public:
+#ifdef _STLP_STATIC_CONST_INIT_BUG
+ static const bool __value;
+#else
+ static const bool __value = sizeof(__test<_Tp>(0)) == sizeof(__select_types::__t1);
+#endif
+
+};
+
+#ifdef _STLP_STATIC_CONST_INIT_BUG
+template <class _Tp>
+const bool __instance<_Tp>::__value = sizeof(__instance<_Tp>::__test<_Tp>(0)) == sizeof(__select_types::__t1);
+#endif
+
+template <class T>
+struct __uoc_aux : // union or class
+ public __select_types
+{
+ private:
+ template <class _Up>
+ static __t1 __test( int _Up::* );
+
+ template <class>
+ static __t2 __test(...);
+
+ public:
+#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION
+ static const bool __value;
+#else
+ static const bool __value = sizeof(__test<T>(0)) == sizeof(__select_types::__t1);
+#endif
+};
+
+#ifdef __FIT_NO_INLINE_TEMPLATE_STATIC_INITIALISATION
+template <class T>
+const bool __uoc_aux<T>::__value = sizeof(__uoc_aux<T>::__test<T>(0)) == sizeof(__select_types::__t1);
+#endif
+
+template <class T>
+class __empty
+{ };
+
+template <class T, bool B>
+class __inheritance_aux
+{};
+
+template <class T>
+class __inheritance_aux<T,true> :
+ public T
+{
+ public:
+ virtual ~__inheritance_aux()
+ { }
+};
+
+#if 0
+template <class T, bool B>
+struct __virtual_aux
+{
+ public:
+#ifdef _STLP_STATIC_CONST_INIT_BUG
+ static const bool __value;
+#else
+ static const bool __value = B ? (sizeof(__inheritance_aux<T,B>) == sizeof(T)) : false;
+#endif
+};
+
+#ifdef _STLP_STATIC_CONST_INIT_BUG
+template <class T, bool B>
+const bool __virtual_aux<T,B>::__value = B ? (sizeof(__inheritance_aux<T,B>) == sizeof(T)) : false;
+#endif
+#endif
+
+} // namespace detail
+
+template <class _Tp, _Tp __v>
+struct integral_constant
+{
+ static const _Tp value = __v;
+ // enum { value = __v }; ?
+
+ typedef _Tp value_type;
+ typedef integral_constant<_Tp, __v> type;
+};
+
+typedef integral_constant<bool, true> true_type;
+typedef integral_constant<bool, false> false_type;
+
+namespace detail {
+
+template <typename _Tp>
+struct __is_union_or_class :
+ public integral_constant<bool, __uoc_aux<_Tp>::__value>
+{ };
+
+#if 0
+template<typename _Tp>
+struct __is_vtbl : // has virtual table?
+ public integral_constant<bool, __virtual_aux<_Tp,__is_union_or_class<_Tp>::value >::__value>
+{ };
+#endif
+
+template <typename _Tp>
+struct __is_vtbl : // has virtual table?
+ public integral_constant<bool, __is_union_or_class<_Tp>::value ? (sizeof(__inheritance_aux<_Tp,__is_union_or_class<_Tp>::value>) == sizeof(_Tp)) : false >
+{ };
+
+} // namespace detail
+
+#define __SPEC_(C,T,B) \
+template <> \
+struct C<T> : \
+ public integral_constant<bool, B> \
+{ }
+
+#define __CV_SPEC(C,T,B) \
+__SPEC_(C,T,B); \
+__SPEC_(C,const T,B); \
+__SPEC_(C,volatile T,B); \
+__SPEC_(C,const volatile T,B)
+
+#define __SPEC_1(C,T,B) \
+template <class _Tp> \
+struct C<T> : \
+ public integral_constant<bool, B> \
+{ }
+
+#define __CV_SPEC_1(C,T,B) \
+__SPEC_1(C,T,B); \
+__SPEC_1(C,T const,B); \
+__SPEC_1(C,T volatile,B); \
+__SPEC_1(C,T const volatile,B)
+
+#define __SPEC_2(C,T,B) \
+template <class _Tp1, class _Tp2> \
+struct C<T> : \
+ public integral_constant<bool, B> \
+{ }
+
+#define __CV_SPEC_2(C,T,B) \
+__SPEC_2(C,T,B); \
+__SPEC_2(C,T const,B); \
+__SPEC_2(C,T volatile,B); \
+__SPEC_2(C,T const volatile,B)
+
+// [4.5.1] primary type categories:
+
+template <class _Tp>
+struct is_void :
+ public false_type
+{ };
+
+template <>
+struct is_void<void> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_integral :
+ public false_type
+{ };
+
+__CV_SPEC(is_integral,bool,true);
+__CV_SPEC(is_integral,char,true);
+__CV_SPEC(is_integral,signed char,true);
+__CV_SPEC(is_integral,unsigned char,true);
+__CV_SPEC(is_integral,wchar_t,true);
+__CV_SPEC(is_integral,short,true);
+__CV_SPEC(is_integral,unsigned short,true);
+__CV_SPEC(is_integral,int,true);
+__CV_SPEC(is_integral,unsigned int,true);
+__CV_SPEC(is_integral,long,true);
+__CV_SPEC(is_integral,unsigned long,true);
+__CV_SPEC(is_integral,long long,true);
+__CV_SPEC(is_integral,unsigned long long,true);
+
+template <class _Tp>
+struct is_floating_point :
+ public false_type
+{ };
+
+__CV_SPEC(is_floating_point,float,true);
+__CV_SPEC(is_floating_point,double,true);
+__CV_SPEC(is_floating_point,long double,true);
+
+template <class _Tp>
+struct is_array :
+ public false_type
+{ };
+
+template <class _Tp, std::size_t _Sz>
+struct is_array<_Tp[_Sz]> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_array<_Tp[]> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_pointer :
+ public false_type
+{ };
+
+__CV_SPEC_1(is_pointer,_Tp *,true);
+
+template <class _Tp>
+struct is_lvalue_reference :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_lvalue_reference<_Tp&> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_rvalue_reference :
+ public false_type
+{ };
+
+// template <class _Tp>
+// struct is_rvalue_reference<_Tp&&> :
+// public true_type
+// { };
+
+template <class _Tp>
+struct is_reference :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_reference<_Tp&> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_function :
+ public integral_constant<bool, !(detail::__instance<_Tp>::__value
+ || detail::__is_union_or_class<_Tp>::value
+ || is_reference<_Tp>::value
+ || is_void<_Tp>::value)>
+{ };
+
+template <class _Tp>
+struct is_member_object_pointer :
+ public false_type
+{ };
+
+// _SPEC_FULL2(is_member_object_pointer, _Tp1 _Tp2::*,!is_function<_Tp1>::value);
+
+template <class _Tp1, class _Tp2>
+struct is_member_object_pointer<_Tp1 _Tp2::*> :
+ public integral_constant<bool, !is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_object_pointer<_Tp1 _Tp2::* const> :
+ public integral_constant<bool, !is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_object_pointer<_Tp1 _Tp2::* volatile> :
+ public integral_constant<bool, !is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_object_pointer<_Tp1 _Tp2::* const volatile> :
+ public integral_constant<bool, !is_function<_Tp1>::value>
+{ };
+
+template <class _Tp>
+struct is_member_function_pointer :
+ public false_type
+{ };
+
+// _SPEC_FULL2(is_member_function_pointer,_Tp1 _Tp2::*,is_function<_Tp1>::value);
+
+template <class _Tp1, class _Tp2>
+struct is_member_function_pointer<_Tp1 _Tp2::*> :
+ public integral_constant<bool, is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_function_pointer<_Tp1 _Tp2::* const> :
+ public integral_constant<bool, is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_function_pointer<_Tp1 _Tp2::* volatile> :
+ public integral_constant<bool, is_function<_Tp1>::value>
+{ };
+
+template <class _Tp1, class _Tp2>
+struct is_member_function_pointer<_Tp1 _Tp2::* const volatile> :
+ public integral_constant<bool, is_function<_Tp1>::value>
+{ };
+
+template <class _Tp>
+struct is_member_pointer :
+ public integral_constant<bool, (is_member_object_pointer<_Tp>::value || is_member_function_pointer<_Tp>::value)>
+{ };
+
+// 4.5.2 composite type categories
+
+template <class _Tp>
+struct is_arithmetic :
+ public integral_constant<bool, (is_integral<_Tp>::value || is_floating_point<_Tp>::value)>
+{ };
+
+template <class _Tp>
+struct is_fundamental :
+ public integral_constant<bool, (is_arithmetic<_Tp>::value || is_void<_Tp>::value)>
+{ };
+
+// [4.5.1] primary type categories (continued):
+
+template <class _Tp>
+struct is_enum :
+ public integral_constant<bool, !(is_fundamental<_Tp>::value
+ || is_array<_Tp>::value
+ || is_pointer<_Tp>::value
+ || is_reference<_Tp>::value
+ || is_member_pointer<_Tp>::value
+ || is_function<_Tp>::value
+ || detail::__is_union_or_class<_Tp>::value) >
+{ };
+
+template <class T>
+struct is_union
+{ };
+
+template <class T>
+struct is_class
+{ };
+
+// is_function (above)
+
+// 4.5.2 composite type categories (continued)
+
+// is_arithmetic (above)
+// is_fundamental (above)
+
+template <class _Tp>
+struct is_object :
+ public integral_constant<bool, (is_arithmetic<_Tp>::value ||
+ is_array<_Tp>::value ||
+ is_pointer<_Tp>::value ||
+ is_member_pointer<_Tp>::value ||
+ detail::__is_union_or_class<_Tp>::value)>
+{ };
+
+template <class _Tp>
+struct is_scalar :
+ public integral_constant<bool, (is_arithmetic<_Tp>::value
+ || is_enum<_Tp>::value
+ || is_pointer<_Tp>::value
+ || is_member_pointer<_Tp>::value)>
+{ };
+
+template <class _Tp>
+struct is_compound :
+ public integral_constant<bool, !is_fundamental<_Tp>::value>
+{ };
+
+// is_member_pointer
+
+// 4.5.3 type properties:
+
+template <class _Tp>
+struct is_const :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_const<_Tp const> :
+ public true_type
+{ };
+
+template <class _Tp>
+struct is_volatile :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_volatile<_Tp volatile> :
+ public true_type
+{ };
+
+
+// 4.7.3 array modifications:
+
+template <class _Tp>
+struct remove_extent
+{
+ typedef _Tp type;
+};
+
+template <class _Tp, std::size_t _Sz>
+struct remove_extent<_Tp[_Sz]>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_extent<_Tp[]>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_all_extents
+{
+ typedef _Tp type;
+};
+
+template <class _Tp, std::size_t _Size>
+struct remove_all_extents<_Tp[_Size]>
+{
+ typedef typename remove_all_extents<_Tp>::type type;
+};
+
+template<typename _Tp>
+struct remove_all_extents<_Tp[]>
+{
+ typedef typename remove_all_extents<_Tp>::type type;
+};
+
+// 4.5.3 type properties (continued):
+
+template <class _Tp>
+struct is_trivial :
+ public integral_constant<bool, (is_void<_Tp>::value
+ || is_scalar<typename remove_all_extents<_Tp>::type>::value)>
+{ };
+
+template <class _Tp>
+struct is_standard_layout :
+ public integral_constant<bool, (is_void<_Tp>::value
+ || is_scalar<typename remove_all_extents<_Tp>::type>::value)>
+{ };
+
+template <class _Tp>
+struct is_pod :
+ public integral_constant<bool, (is_void<_Tp>::value
+ || is_scalar<typename remove_all_extents<_Tp>::type>::value)>
+{ };
+
+template<typename _Tp>
+struct is_empty
+ : public integral_constant<bool, (detail::__is_union_or_class<_Tp>::value
+ && (sizeof(detail::__empty<_Tp>) == sizeof(_Tp)))>
+{ };
+
+// is_polimorphic
+// is_abstract
+
+template <class _Tp>
+struct has_trivial_constructor :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_trivial_copy :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_trivial_assign :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_trivial_destructor :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_nothrow_constructor :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_nothrow_copy :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_nothrow_assign :
+ public integral_constant<bool, is_pod<_Tp>::value>
+{ };
+
+template <class _Tp>
+struct has_virtual_destructor :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_signed :
+ public false_type
+{ };
+
+__CV_SPEC(is_signed,signed char,true);
+__CV_SPEC(is_signed,short,true);
+__CV_SPEC(is_signed,int,true);
+__CV_SPEC(is_signed,long,true);
+__CV_SPEC(is_signed,long long,true);
+
+template <class _Tp>
+struct is_unsigned :
+ public false_type
+{ };
+
+__CV_SPEC(is_unsigned,unsigned char,true);
+__CV_SPEC(is_unsigned,unsigned short,true);
+__CV_SPEC(is_unsigned,unsigned int,true);
+__CV_SPEC(is_unsigned,unsigned long,true);
+__CV_SPEC(is_unsigned,unsigned long long,true);
+
+// alignment_of
+// rank
+// extent
+
+// 4.6 type relations:
+
+template <class _Tp1, class _Tp2>
+struct is_same :
+ public false_type
+{ };
+
+template <class _Tp>
+struct is_same<_Tp, _Tp> :
+ public true_type
+{ };
+
+// is_base_of
+// is_convertible
+
+// 4.7.1 const-volatile modifications
+
+template <class _Tp>
+struct remove_const
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_const<_Tp const>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_volatile
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_volatile<_Tp volatile>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_cv
+{
+ typedef typename remove_const<typename remove_volatile<_Tp>::type>::type type;
+};
+
+template <class _Tp>
+struct add_const
+{
+ typedef _Tp const type;
+};
+
+template <class _Tp>
+struct add_volatile
+{
+ typedef _Tp volatile type;
+};
+
+template <class _Tp>
+struct add_cv
+{
+ typedef typename add_const<typename add_volatile<_Tp>::type>::type type;
+};
+
+// 4.7.2 reference modifications:
+
+template <class _Tp>
+struct remove_reference
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_reference<_Tp&>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct add_reference
+{
+ typedef _Tp& type;
+};
+
+template <class _Tp>
+struct add_reference<_Tp&>
+{
+ typedef _Tp& type;
+};
+
+// 4.7.3 array modifications (see above)
+
+// 4.7.4 pointer modifications:
+
+template <class _Tp>
+struct remove_pointer
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_pointer<_Tp *>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_pointer<_Tp * const>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_pointer<_Tp * volatile>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct remove_pointer<_Tp * const volatile>
+{
+ typedef _Tp type;
+};
+
+template <class _Tp>
+struct add_pointer
+{
+ typedef typename remove_reference<_Tp>::type * type;
+};
+
+// 20.5.7 other transformations:
+
+// template <std::size_t Len, std::size_t Align> struct aligned_storage;
+// template <std::size_t Len, class... Types> struct aligned_union;
+
+namespace detail {
+
+template <bool,class _U>
+struct _decay_aux2
+{
+ typedef typename remove_cv<_U>::type type;
+};
+
+template <class _U>
+struct _decay_aux2<true,_U>
+{
+ typedef typename add_pointer<_U>::type type;
+};
+
+template <bool, class _U>
+struct _decay_aux1
+{
+ typedef typename _decay_aux2<is_function<_U>::value,_U>::type type;
+};
+
+template <class _U>
+struct _decay_aux1<true,_U>
+{
+ typedef typename remove_extent<_U>::type* type;
+};
+
+} // namespace detail
+
+template <class _Tp>
+class decay
+{
+ private:
+ typedef typename remove_reference<_Tp>::type _U;
+
+ public:
+ typedef typename detail::_decay_aux1<is_array<_U>::value,_U>::type type;
+};
+
+template <bool, class _Tp = void>
+struct enable_if
+{
+};
+
+template <class _Tp>
+struct enable_if<true,_Tp>
+{
+ typedef _Tp type;
+};
+
+template <bool, class _Tp1, class _Tp2>
+struct conditional
+{
+ typedef _Tp2 type;
+};
+
+template <class _Tp1, class _Tp2>
+struct conditional<true,_Tp1,_Tp2>
+{
+ typedef _Tp1 type;
+};
+
+// template <class... _Tp> struct common_type;
+
+#undef __CV_SPEC
+#undef __SPEC_
+#undef __CV_SPEC_1
+#undef __SPEC_1
+#undef __CV_SPEC_2
+#undef __SPEC_2
+
+_STLP_END_NAMESPACE // tr1
+
+_STLP_END_NAMESPACE
+
+// # else // __GLIBCXX__ && (__GNUC__ >= 4) && !STLPORT
+// # include <tr1/type_traits>
+// # endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x3)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif // __STLP_TYPE_TRAITS
+
diff --git a/6/sources/cxx-stl/stlport/stlport/typeinfo b/6/sources/cxx-stl/stlport/stlport/typeinfo
new file mode 100644
index 0000000..269123f
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/typeinfo
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_TYPEINFO
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x473
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x473) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_TYPEINFO
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x473) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_TYPEINFO
+# include <stl/_typeinfo.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x473) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <typeinfo>
+# else
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x473)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/typeinfo.h b/6/sources/cxx-stl/stlport/stlport/typeinfo.h
new file mode 100644
index 0000000..0cea71a
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/typeinfo.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+// DMC has hardcoded inclusion of typeinfo.h at the begining of any translation unit.
+// So inclusion of this header will directly reference the native header. This is not
+// a problem as typeinfo.h is neither a C nor C++ Standard header, this header should
+// never be used in user code.
+#if defined (__DMC__)
+// We define _STLP_OUTERMOST_HEADER_ID to signal to other STLport headers that inclusion
+// is done from native typeinfo.h (see exception header).
+# define _STLP_OUTERMOST_HEADER_ID 0x874
+# include <../include/typeinfo.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#else
+# ifndef _STLP_OLDSTD_typeinfo
+# define _STLP_OLDSTD_typeinfo
+
+# ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x874
+# include <stl/_prolog.h>
+# endif
+
+# ifndef _STLP_NO_TYPEINFO
+
+# if defined (__GNUC__)
+# undef _STLP_OLDSTD_typeinfo
+# include <typeinfo>
+# define _STLP_OLDSTD_typeinfo
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <typeinfo.h>
+# elif !defined (__BORLANDC__) || (__BORLANDC__ < 0x580)
+# include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo.h)
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(typeinfo.h)
+# endif
+# if defined (__BORLANDC__) && (__BORLANDC__ >= 0x580) || \
+ defined (__DMC__)
+using std::type_info;
+using std::bad_typeid;
+using std::bad_cast;
+# endif
+# endif
+
+// if <typeinfo> already included, do not import anything
+
+# if defined (_STLP_USE_OWN_NAMESPACE) && !(defined (_STLP_TYPEINFO) && !defined (_STLP_NO_NEW_NEW_HEADER))
+
+_STLP_BEGIN_NAMESPACE
+
+using /*_STLP_VENDOR_EXCEPT_STD */ :: type_info;
+# if !(defined(__MRC__) || (defined(__SC__) && !defined(__DMC__)))
+using /* _STLP_VENDOR_EXCEPT_STD */ :: bad_typeid;
+# endif
+
+using /* _STLP_VENDOR_EXCEPT_STD */ :: bad_cast;
+
+_STLP_END_NAMESPACE
+
+# endif /* _STLP_OWN_NAMESPACE */
+
+# endif /* _STLP_NO_TYPEINFO */
+
+# if (_STLP_OUTERMOST_HEADER_ID == 0x874)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# endif
+
+# endif /* _STLP_OLDSTD_typeinfo */
+
+#endif /* __DMC__ */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/unordered_map b/6/sources/cxx-stl/stlport/stlport/unordered_map
new file mode 100644
index 0000000..09fa0d2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/unordered_map
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2004,2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_UNORDERED_MAP
+#define _STLP_UNORDERED_MAP
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x4030
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <stl/_unordered_map.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x4030)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_UNORDERED_MAP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/unordered_set b/6/sources/cxx-stl/stlport/stlport/unordered_set
new file mode 100644
index 0000000..14de437
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/unordered_set
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2004,2005
+ * Francois Dumont
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_UNORDERED_SET
+#define _STLP_UNORDERED_SET
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x4031
+# include <stl/_prolog.h>
+#endif
+
+#ifdef _STLP_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <stl/_unordered_set.h>
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x4031)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_UNORDERED_SET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/using/cstring b/6/sources/cxx-stl/stlport/stlport/using/cstring
new file mode 100644
index 0000000..42c5660
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/cstring
@@ -0,0 +1,60 @@
+using _STLP_VENDOR_CSTD::size_t;
+
+#if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
+# if defined (__MSL__) && __MC68K__ && !_No_BlockMove && __dest_os == __mac_os
+# undef memcpy
+# undef memmove
+inline void* memcpy(void* dst, const void* src, size_t len)
+{ return _STLP_VENDOR_CSTD::__memcpy(dst, src, len); }
+inline void* memmove(void* dst, const void* src, size_t len)
+{ return _STLP_VENDOR_CSTD::__memmove(dst, src, len); }
+# else
+using _STLP_VENDOR_CSTD::memmove;
+using _STLP_VENDOR_CSTD::memcpy;
+# endif
+
+# if !defined (_STLP_WCE)
+// these functions just don't exist on Windows CE
+using _STLP_VENDOR_CSTD::strcoll;
+using _STLP_VENDOR_CSTD::strerror;
+using _STLP_VENDOR_CSTD::strxfrm;
+# endif
+
+# if defined (__BORLANDC__)
+extern "C++" {
+# endif
+using _STLP_VENDOR_CSTD::memchr;
+using _STLP_VENDOR_CSTD::strchr;
+using _STLP_VENDOR_CSTD::strpbrk;
+using _STLP_VENDOR_CSTD::strrchr;
+using _STLP_VENDOR_CSTD::strstr;
+# if defined (__BORLANDC__)
+}
+# endif
+
+using _STLP_VENDOR_CSTD::memcmp;
+using _STLP_VENDOR_CSTD::memset;
+
+using _STLP_VENDOR_CSTD::strcat;
+
+# if !defined (strcmp) || !defined (__BORLANDC__)
+using _STLP_VENDOR_CSTD::strcmp;
+# else
+using ::strcmp;
+# endif
+
+# if !defined (strcpy) || !defined (__BORLANDC__)
+using _STLP_VENDOR_CSTD::strcpy;
+# else
+using ::strcpy;
+# endif
+using _STLP_VENDOR_CSTD::strcspn;
+using _STLP_VENDOR_CSTD::strlen;
+using _STLP_VENDOR_CSTD::strncat;
+using _STLP_VENDOR_CSTD::strncmp;
+
+using _STLP_VENDOR_CSTD::strncpy;
+using _STLP_VENDOR_CSTD::strspn;
+
+using _STLP_VENDOR_CSTD::strtok;
+#endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
diff --git a/6/sources/cxx-stl/stlport/stlport/using/export b/6/sources/cxx-stl/stlport/stlport/using/export
new file mode 100644
index 0000000..2d3afcd
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/export
@@ -0,0 +1,12 @@
+cstring
+fstream
+iomanip
+ios
+iosfwd
+iostream
+istream
+locale
+ostream
+sstream
+streambuf
+strstream
diff --git a/6/sources/cxx-stl/stlport/stlport/using/fstream b/6/sources/cxx-stl/stlport/stlport/using/fstream
new file mode 100644
index 0000000..e79e048
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/fstream
@@ -0,0 +1,19 @@
+#ifdef _STLP_BROKEN_USING_DIRECTIVE
+using namespace _STLP_STD;
+#else
+using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
+using _STLP_NEW_IO_NAMESPACE::filebuf;
+using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
+using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
+using _STLP_NEW_IO_NAMESPACE::ifstream;
+using _STLP_NEW_IO_NAMESPACE::ofstream;
+using _STLP_NEW_IO_NAMESPACE::basic_fstream;
+using _STLP_NEW_IO_NAMESPACE::fstream;
+
+# ifndef _STLP_NO_WIDE_STREAMS
+using _STLP_NEW_IO_NAMESPACE::wofstream;
+using _STLP_NEW_IO_NAMESPACE::wfilebuf;
+using _STLP_NEW_IO_NAMESPACE::wifstream;
+using _STLP_NEW_IO_NAMESPACE::wfstream;
+# endif
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/fstream.h b/6/sources/cxx-stl/stlport/stlport/using/h/fstream.h
new file mode 100644
index 0000000..6600568
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/fstream.h
@@ -0,0 +1,4 @@
+using ::streambuf;
+using ::ifstream;
+using ::ofstream;
+using ::fstream;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/iomanip.h b/6/sources/cxx-stl/stlport/stlport/using/h/iomanip.h
new file mode 100644
index 0000000..99e48d9
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/iomanip.h
@@ -0,0 +1,6 @@
+using ::setiosflags;
+using ::resetiosflags;
+// using ::setbase;
+using ::setfill;
+using ::setprecision;
+using ::setw;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/iostream.h b/6/sources/cxx-stl/stlport/stlport/using/h/iostream.h
new file mode 100644
index 0000000..e85f4e2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/iostream.h
@@ -0,0 +1,24 @@
+using _STLP_OLD_IO_NAMESPACE::istream;
+using _STLP_OLD_IO_NAMESPACE::ostream;
+
+/* HP aCC include files re-define these when THREAD_SAFE */
+#if !defined(cin)
+using _STLP_OLD_IO_NAMESPACE::cin;
+#endif
+#if !defined(cout)
+using _STLP_OLD_IO_NAMESPACE::cout;
+#endif
+#if !defined(cerr)
+using _STLP_OLD_IO_NAMESPACE::cerr;
+#endif
+#if !defined(clog)
+using _STLP_OLD_IO_NAMESPACE::clog;
+#endif
+
+using _STLP_OLD_IO_NAMESPACE::endl;
+using _STLP_OLD_IO_NAMESPACE::ends;
+
+using _STLP_OLD_IO_NAMESPACE::ios;
+using _STLP_OLD_IO_NAMESPACE::flush;
+
+// using _STLP_OLD_IO_NAMESPACE::ws;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/ostream.h b/6/sources/cxx-stl/stlport/stlport/using/h/ostream.h
new file mode 100644
index 0000000..6ba3f88
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/ostream.h
@@ -0,0 +1,6 @@
+using _STLP_OLD_IO_NAMESPACE::ostream;
+using _STLP_OLD_IO_NAMESPACE::endl;
+using _STLP_OLD_IO_NAMESPACE::ends;
+using _STLP_OLD_IO_NAMESPACE::flush;
+
+// using _STLP_OLD_IO_NAMESPACE::ws;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/streambuf.h b/6/sources/cxx-stl/stlport/stlport/using/h/streambuf.h
new file mode 100644
index 0000000..459de3d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/streambuf.h
@@ -0,0 +1 @@
+using ::streambuf;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/h/strstream.h b/6/sources/cxx-stl/stlport/stlport/using/h/strstream.h
new file mode 100644
index 0000000..a7d9f11
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/h/strstream.h
@@ -0,0 +1,4 @@
+using _STLP_OLD_IO_NAMESPACE::strstreambuf;
+using _STLP_OLD_IO_NAMESPACE::istrstream;
+using _STLP_OLD_IO_NAMESPACE::ostrstream;
+using _STLP_OLD_IO_NAMESPACE::strstream;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/iomanip b/6/sources/cxx-stl/stlport/stlport/using/iomanip
new file mode 100644
index 0000000..8a7c792
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/iomanip
@@ -0,0 +1,6 @@
+using _STLP_NEW_IO_NAMESPACE::setiosflags;
+using _STLP_NEW_IO_NAMESPACE::resetiosflags;
+using _STLP_NEW_IO_NAMESPACE::setbase;
+using _STLP_NEW_IO_NAMESPACE::setfill;
+using _STLP_NEW_IO_NAMESPACE::setprecision;
+using _STLP_NEW_IO_NAMESPACE::setw;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/ios b/6/sources/cxx-stl/stlport/stlport/using/ios
new file mode 100644
index 0000000..d89b495
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/ios
@@ -0,0 +1,41 @@
+# ifdef _STLP_BROKEN_USING_DIRECTIVE
+using namespace _STLP_NEW_IO_NAMESPACE;
+# else
+
+using _STLP_NEW_IO_NAMESPACE::ios;
+using _STLP_NEW_IO_NAMESPACE::streamoff;
+using _STLP_NEW_IO_NAMESPACE::streamsize;
+
+using _STLP_NEW_IO_NAMESPACE::ios_base;
+using _STLP_NEW_IO_NAMESPACE::basic_ios;
+
+// _lib.std.ios.manip_, manipulators:
+using _STLP_NEW_IO_NAMESPACE::boolalpha;
+using _STLP_NEW_IO_NAMESPACE::noboolalpha;
+using _STLP_NEW_IO_NAMESPACE::showbase;
+using _STLP_NEW_IO_NAMESPACE::noshowbase;
+using _STLP_NEW_IO_NAMESPACE::showpoint;
+using _STLP_NEW_IO_NAMESPACE::noshowpoint;
+using _STLP_NEW_IO_NAMESPACE::showpos;
+using _STLP_NEW_IO_NAMESPACE::noshowpos;
+using _STLP_NEW_IO_NAMESPACE::skipws;
+using _STLP_NEW_IO_NAMESPACE::noskipws;
+using _STLP_NEW_IO_NAMESPACE::uppercase;
+using _STLP_NEW_IO_NAMESPACE::nouppercase;
+
+// _lib.adjustfield.manip_ adjustfield:
+using _STLP_NEW_IO_NAMESPACE::internal;
+using _STLP_NEW_IO_NAMESPACE::left;
+using _STLP_NEW_IO_NAMESPACE::right;
+
+// _lib.basefield.manip_ basefield:
+using _STLP_NEW_IO_NAMESPACE::dec;
+using _STLP_NEW_IO_NAMESPACE::hex;
+using _STLP_NEW_IO_NAMESPACE::oct;
+
+// _lib.floatfield.manip_ floatfield:
+using _STLP_NEW_IO_NAMESPACE::fixed;
+using _STLP_NEW_IO_NAMESPACE::scientific;
+
+# endif /* _STLP_BROKEN_USING_DIRECTIVE */
+
diff --git a/6/sources/cxx-stl/stlport/stlport/using/iosfwd b/6/sources/cxx-stl/stlport/stlport/using/iosfwd
new file mode 100644
index 0000000..b564e81
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/iosfwd
@@ -0,0 +1,54 @@
+# if defined (_STLP_USE_NEW_IOSTREAMS)
+using _STLP_NEW_IO_NAMESPACE::char_traits;
+using _STLP_NEW_IO_NAMESPACE::basic_ios;
+using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
+using _STLP_NEW_IO_NAMESPACE::basic_istream;
+using _STLP_NEW_IO_NAMESPACE::basic_ostream;
+using _STLP_NEW_IO_NAMESPACE::basic_iostream;
+using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
+using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
+using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
+using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
+using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
+using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
+using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
+using _STLP_NEW_IO_NAMESPACE::basic_fstream;
+using _STLP_NEW_IO_NAMESPACE::fpos;
+using _STLP_NEW_IO_NAMESPACE::istreambuf_iterator;
+using _STLP_NEW_IO_NAMESPACE::ostreambuf_iterator;
+using _STLP_NEW_IO_NAMESPACE::stringbuf;
+using _STLP_NEW_IO_NAMESPACE::istringstream;
+using _STLP_NEW_IO_NAMESPACE::ostringstream;
+using _STLP_NEW_IO_NAMESPACE::stringstream;
+# endif
+
+using _STLP_NEW_IO_NAMESPACE::ios;
+using _STLP_NEW_IO_NAMESPACE::streambuf;
+using _STLP_NEW_IO_NAMESPACE::istream;
+using _STLP_NEW_IO_NAMESPACE::ostream;
+using _STLP_NEW_IO_NAMESPACE::iostream;
+
+using _STLP_NEW_IO_NAMESPACE::filebuf;
+using _STLP_NEW_IO_NAMESPACE::ifstream;
+using _STLP_NEW_IO_NAMESPACE::ofstream;
+using _STLP_NEW_IO_NAMESPACE::fstream;
+
+using _STLP_NEW_IO_NAMESPACE::streampos;
+using _STLP_NEW_IO_NAMESPACE::streamoff;
+
+# if !defined (_STLP_NO_WIDE_STREAMS)
+using _STLP_NEW_IO_NAMESPACE::wios;
+using _STLP_NEW_IO_NAMESPACE::wstreambuf;
+using _STLP_NEW_IO_NAMESPACE::wistream;
+using _STLP_NEW_IO_NAMESPACE::wostream;
+using _STLP_NEW_IO_NAMESPACE::wiostream;
+using _STLP_NEW_IO_NAMESPACE::wstringbuf;
+using _STLP_NEW_IO_NAMESPACE::wistringstream;
+using _STLP_NEW_IO_NAMESPACE::wostringstream;
+using _STLP_NEW_IO_NAMESPACE::wstringstream;
+using _STLP_NEW_IO_NAMESPACE::wfilebuf;
+using _STLP_NEW_IO_NAMESPACE::wifstream;
+using _STLP_NEW_IO_NAMESPACE::wofstream;
+using _STLP_NEW_IO_NAMESPACE::wfstream;
+using _STLP_NEW_IO_NAMESPACE::wstreampos;
+# endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/iostream b/6/sources/cxx-stl/stlport/stlport/using/iostream
new file mode 100644
index 0000000..6169afb
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/iostream
@@ -0,0 +1,14 @@
+
+# include <using/istream>
+
+using _STLP_VENDOR_STD::cin;
+using _STLP_VENDOR_STD::cout;
+using _STLP_VENDOR_STD::cerr;
+using _STLP_VENDOR_STD::clog;
+
+# if ! defined (_STLP_NO_WIDE_STREAMS)
+using _STLP_VENDOR_STD::wcin;
+using _STLP_VENDOR_STD::wcout;
+using _STLP_VENDOR_STD::wcerr;
+using _STLP_VENDOR_STD::wclog;
+# endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/istream b/6/sources/cxx-stl/stlport/stlport/using/istream
new file mode 100644
index 0000000..baf10d2
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/istream
@@ -0,0 +1,16 @@
+# include <using/ostream>
+
+using _STLP_NEW_IO_NAMESPACE::basic_istream;
+using _STLP_NEW_IO_NAMESPACE::basic_iostream;
+
+using _STLP_NEW_IO_NAMESPACE::istream;
+using _STLP_NEW_IO_NAMESPACE::iostream;
+
+# if !defined (_STLP_NO_NATIVE_WIDE_STREAMS)
+using _STLP_NEW_IO_NAMESPACE::wistream;
+using _STLP_NEW_IO_NAMESPACE::wiostream;
+# endif
+
+#if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
+using _STLP_NEW_IO_NAMESPACE::ws;
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/locale b/6/sources/cxx-stl/stlport/stlport/using/locale
new file mode 100644
index 0000000..aa99b5b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/locale
@@ -0,0 +1,65 @@
+#if !defined(_STLP_NO_IMPORT_LOCALE)
+
+// from <cwchar>
+#if !defined (_STLP_NO_MBSTATE_T)
+using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
+#endif
+
+// _lib.locale_, locale:
+using _STLP_NEW_IO_NAMESPACE::locale;
+using _STLP_NEW_IO_NAMESPACE::use_facet;
+using _STLP_NEW_IO_NAMESPACE::has_facet;
+
+// _lib.locale.convenience_, convenience interfaces:
+using _STLP_NEW_IO_NAMESPACE::isspace;
+using _STLP_NEW_IO_NAMESPACE::isprint;
+using _STLP_NEW_IO_NAMESPACE::iscntrl;
+using _STLP_NEW_IO_NAMESPACE::isupper;
+using _STLP_NEW_IO_NAMESPACE::islower;
+using _STLP_NEW_IO_NAMESPACE::isalpha;
+using _STLP_NEW_IO_NAMESPACE::isdigit;
+using _STLP_NEW_IO_NAMESPACE::ispunct;
+using _STLP_NEW_IO_NAMESPACE::isxdigit;
+using _STLP_NEW_IO_NAMESPACE::isalnum;
+using _STLP_NEW_IO_NAMESPACE::isgraph;
+using _STLP_NEW_IO_NAMESPACE::toupper;
+using _STLP_NEW_IO_NAMESPACE::tolower;
+
+// _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
+using _STLP_NEW_IO_NAMESPACE::ctype_base;
+using _STLP_NEW_IO_NAMESPACE::ctype;
+using _STLP_NEW_IO_NAMESPACE::ctype_byname;
+using _STLP_NEW_IO_NAMESPACE::codecvt_base;
+using _STLP_NEW_IO_NAMESPACE::codecvt;
+using _STLP_NEW_IO_NAMESPACE::codecvt_byname;
+
+// _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
+using _STLP_NEW_IO_NAMESPACE::num_get;
+using _STLP_NEW_IO_NAMESPACE::num_put;
+using _STLP_NEW_IO_NAMESPACE::numpunct;
+using _STLP_NEW_IO_NAMESPACE::numpunct_byname;
+
+// _lib.category.collate_, collation:
+using _STLP_NEW_IO_NAMESPACE::collate;
+using _STLP_NEW_IO_NAMESPACE::collate_byname;
+
+// _lib.category.time_, date and time:
+using _STLP_NEW_IO_NAMESPACE::time_base;
+using _STLP_NEW_IO_NAMESPACE::time_get;
+using _STLP_NEW_IO_NAMESPACE::time_get_byname;
+using _STLP_NEW_IO_NAMESPACE::time_put;
+using _STLP_NEW_IO_NAMESPACE::time_put_byname;
+
+// _lib.category.monetary_, money:
+using _STLP_NEW_IO_NAMESPACE::money_base;
+using _STLP_NEW_IO_NAMESPACE::money_get;
+using _STLP_NEW_IO_NAMESPACE::money_put;
+using _STLP_NEW_IO_NAMESPACE::moneypunct;
+using _STLP_NEW_IO_NAMESPACE::moneypunct_byname;
+
+#if !defined (_STLP_OWN_IOSTREAMS) && !defined (_STLP_NO_NATIVE_MESSAGE_FACET)
+using _STLP_NEW_IO_NAMESPACE::messages_base;
+using _STLP_NEW_IO_NAMESPACE::messages;
+using _STLP_NEW_IO_NAMESPACE::messages_byname;
+#endif // _MSL_NO_MESSAGE_FACET
+#endif /* !defined(_STLP_NO_IMPORT_LOCALE) */
diff --git a/6/sources/cxx-stl/stlport/stlport/using/ostream b/6/sources/cxx-stl/stlport/stlport/using/ostream
new file mode 100644
index 0000000..162b32d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/ostream
@@ -0,0 +1,10 @@
+using _STLP_NEW_IO_NAMESPACE::basic_ostream;
+using _STLP_NEW_IO_NAMESPACE::ostream;
+
+# ifndef _STLP_NO_WIDE_STREAMS
+using _STLP_NEW_IO_NAMESPACE::wostream;
+# endif
+
+using _STLP_NEW_IO_NAMESPACE::endl;
+using _STLP_NEW_IO_NAMESPACE::ends;
+using _STLP_NEW_IO_NAMESPACE::flush;
diff --git a/6/sources/cxx-stl/stlport/stlport/using/sstream b/6/sources/cxx-stl/stlport/stlport/using/sstream
new file mode 100644
index 0000000..925c37e
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/sstream
@@ -0,0 +1,16 @@
+using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
+using _STLP_NEW_IO_NAMESPACE::stringbuf;
+
+using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
+using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
+using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
+using _STLP_NEW_IO_NAMESPACE::istringstream;
+using _STLP_NEW_IO_NAMESPACE::ostringstream;
+using _STLP_NEW_IO_NAMESPACE::stringstream;
+
+#ifndef _STLP_NO_WIDE_STREAMS
+using _STLP_NEW_IO_NAMESPACE::wstringbuf;
+using _STLP_NEW_IO_NAMESPACE::wistringstream;
+using _STLP_NEW_IO_NAMESPACE::wostringstream;
+using _STLP_NEW_IO_NAMESPACE::wstringstream;
+#endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/streambuf b/6/sources/cxx-stl/stlport/stlport/using/streambuf
new file mode 100644
index 0000000..308241d
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/streambuf
@@ -0,0 +1,5 @@
+using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
+using _STLP_NEW_IO_NAMESPACE::streambuf;
+#ifndef _STLP_NO_WIDE_STREAMS
+using _STLP_NEW_IO_NAMESPACE::wstreambuf;
+# endif
diff --git a/6/sources/cxx-stl/stlport/stlport/using/strstream b/6/sources/cxx-stl/stlport/stlport/using/strstream
new file mode 100644
index 0000000..eb26ac1
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/using/strstream
@@ -0,0 +1,4 @@
+using _STLP_NEW_IO_NAMESPACE::strstreambuf;
+using _STLP_NEW_IO_NAMESPACE::istrstream;
+using _STLP_NEW_IO_NAMESPACE::ostrstream;
+using _STLP_NEW_IO_NAMESPACE::strstream;
diff --git a/6/sources/cxx-stl/stlport/stlport/utility b/6/sources/cxx-stl/stlport/stlport/utility
new file mode 100644
index 0000000..4aaaa59
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/utility
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_UTILITY
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x75
+# include <stl/_prolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x75) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+# define _STLP_UTILITY
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x75) && !defined (_STLP_DONT_POP_HEADER_ID)
+# ifndef _STLP_INTERNAL_PAIR_H
+# include <stl/_pair.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x75) || defined (_STLP_DONT_POP_HEADER_ID) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <utility>
+# else
+# include _STLP_NATIVE_HEADER(utility)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x75)
+# if !defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
+#endif /* _STLP_UTILITY */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/valarray b/6/sources/cxx-stl/stlport/stlport/valarray
new file mode 100644
index 0000000..0cb0776
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/valarray
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_VALARRAY
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x76
+# include <stl/_prolog.h>
+# define _STLP_VALARRAY
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x76)
+# ifndef _STLP_VALARRAY_H
+# include <stl/_valarray.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x76) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <valarray>
+# else
+# include _STLP_NATIVE_HEADER(valarray)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x76)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_VALARRAY */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/stlport/stlport/vector b/6/sources/cxx-stl/stlport/stlport/vector
new file mode 100644
index 0000000..92c41b7
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/vector
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#ifndef _STLP_VECTOR
+
+#ifndef _STLP_OUTERMOST_HEADER_ID
+# define _STLP_OUTERMOST_HEADER_ID 0x77
+# include <stl/_prolog.h>
+# define _STLP_VECTOR
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x77)
+# ifndef _STLP_INTERNAL_ALGOBASE_H
+# include <stl/_algobase.h>
+# endif
+
+# ifndef _STLP_INTERNAL_VECTOR_H
+# include <stl/_vector.h>
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID != 0x77) || defined (_STLP_IMPORT_VENDOR_STD)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <vector>
+# else
+# include _STLP_NATIVE_HEADER(vector)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x77)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+#endif
+
+#endif /* _STLP_VECTOR */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/6/sources/cxx-stl/stlport/stlport/wchar.h b/6/sources/cxx-stl/stlport/stlport/wchar.h
new file mode 100644
index 0000000..6d66799
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/wchar.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x278
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x278) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+#if !defined (_STLP_WCE_EVC3) && !defined (_STLP_NO_WCHAR_T)
+
+# if defined (__BORLANDC__) && !defined (__linux__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <_str.h>
+# else
+# include _STLP_NATIVE_CPP_C_HEADER(_str.h)
+# endif
+# ifdef __cplusplus
+using _STLP_VENDOR_CSTD::strlen;
+using _STLP_VENDOR_CSTD::strspn;
+# endif
+# endif
+
+# if (((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))) && defined (__APPLE__)) || defined (__OpenBSD__)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <stddef.h>
+# else
+# include _STLP_NATIVE_C_HEADER(stddef.h)
+# endif
+# else
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# include_next <wchar.h>
+# else
+# include _STLP_NATIVE_C_HEADER(wchar.h)
+# endif
+# endif
+#endif /* !defined (_STLP_WCE_EVC3) && !defined (_STLP_NO_WCHAR_T) */
+
+#ifndef _STLP_INTERNAL_MBSTATE_T
+# include <stl/_mbstate_t.h>
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x278)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
+
diff --git a/6/sources/cxx-stl/stlport/stlport/wctype.h b/6/sources/cxx-stl/stlport/stlport/wctype.h
new file mode 100644
index 0000000..c64ab9b
--- /dev/null
+++ b/6/sources/cxx-stl/stlport/stlport/wctype.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, 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.
+ *
+ */
+
+#if !defined (_STLP_OUTERMOST_HEADER_ID)
+# define _STLP_OUTERMOST_HEADER_ID 0x279
+# include <stl/_cprolog.h>
+#elif (_STLP_OUTERMOST_HEADER_ID == 0x279) && !defined (_STLP_DONT_POP_HEADER_ID)
+# define _STLP_DONT_POP_HEADER_ID
+#endif
+
+/* evc3 doesn't have wctype.h */
+#if !defined(_STLP_WCE_EVC3)
+# if defined (_STLP_HAS_INCLUDE_NEXT)
+# if defined (__hpux)
+# include_next <stdarg.h>
+# include_next <wchar.h>
+# endif
+# include_next <wctype.h>
+# else
+# if defined (__hpux)
+# include _STLP_NATIVE_C_HEADER(stdarg.h)
+# include _STLP_NATIVE_C_HEADER(wchar.h)
+# endif
+# include _STLP_NATIVE_C_HEADER(wctype.h)
+# endif
+#endif
+
+#if (_STLP_OUTERMOST_HEADER_ID == 0x279)
+# if ! defined (_STLP_DONT_POP_HEADER_ID)
+# include <stl/_epilog.h>
+# undef _STLP_OUTERMOST_HEADER_ID
+# else
+# undef _STLP_DONT_POP_HEADER_ID
+# endif
+#endif
diff --git a/6/sources/cxx-stl/system/MODULE_LICENSE_BSD b/6/sources/cxx-stl/system/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/6/sources/cxx-stl/system/MODULE_LICENSE_BSD
diff --git a/6/sources/cxx-stl/system/NOTICE b/6/sources/cxx-stl/system/NOTICE
new file mode 100644
index 0000000..c6e5253
--- /dev/null
+++ b/6/sources/cxx-stl/system/NOTICE
@@ -0,0 +1,79 @@
+Copyright (C) 2009 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ *
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+
+Copyright (c) 1994
+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.
+
+
+
+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.
diff --git a/6/sources/cxx-stl/system/include/cassert b/6/sources/cxx-stl/system/include/cassert
new file mode 100644
index 0000000..5753e34
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cassert
@@ -0,0 +1,39 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Standard C++ Library wrapper around the C assert.h header file. This file
+ * can be included multiple times with different definition of NDEBUG, hence the
+ * absence of include guards.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CASSERT__
+#define BIONIC_LIBSTDCPP_INCLUDE_CASSERT__
+#endif
+#include <assert.h>
diff --git a/6/sources/cxx-stl/system/include/cctype b/6/sources/cxx-stl/system/include/cctype
new file mode 100644
index 0000000..e0eb981
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cctype
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
+#define BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
+
+/*
+ * Standard C++ Library wrapper around the C ctype.h header file.
+ */
+
+#include <ctype.h>
+
+extern "C++" {
+
+namespace std
+{
+using ::isalnum;
+using ::isalpha;
+using ::iscntrl;
+using ::isdigit;
+using ::isgraph;
+using ::islower;
+using ::isprint;
+using ::ispunct;
+using ::isspace;
+using ::isupper;
+using ::isxdigit;
+using ::tolower;
+using ::toupper;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CCTYPE__
diff --git a/6/sources/cxx-stl/system/include/cerrno b/6/sources/cxx-stl/system/include/cerrno
new file mode 100644
index 0000000..e53ca25
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cerrno
@@ -0,0 +1,40 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CERRNO__
+#define BIONIC_LIBSTDCPP_INCLUDE_CERRNO__
+
+/*
+ * Standard C++ Library wrapper around the C errno.h header file.
+ */
+#include <errno.h>
+
+// errno is a macro, so we can't define std::errno
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CERRNO__
diff --git a/6/sources/cxx-stl/system/include/cfloat b/6/sources/cxx-stl/system/include/cfloat
new file mode 100644
index 0000000..21c01d9
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cfloat
@@ -0,0 +1,39 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CFLOAT__
+#define BIONIC_LIBSTDCPP_INCLUDE_CFLOAT__
+
+/*
+ * Standard C++ Library wrapper around the C float.h header file.
+ */
+#include <sys/limits.h>
+#include <float.h>
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CFLOAT__
diff --git a/6/sources/cxx-stl/system/include/climits b/6/sources/cxx-stl/system/include/climits
new file mode 100644
index 0000000..df85cb9
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/climits
@@ -0,0 +1,39 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CLIMITS__
+#define BIONIC_LIBSTDCPP_INCLUDE_CLIMITS__
+
+/*
+ * Standard C++ Library wrapper around the C limits.h header file.
+ */
+
+#include <limits.h>
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CLIMITS__
diff --git a/6/sources/cxx-stl/system/include/cmath b/6/sources/cxx-stl/system/include/cmath
new file mode 100644
index 0000000..be70343
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cmath
@@ -0,0 +1,75 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CMATH__
+#define BIONIC_LIBSTDCPP_INCLUDE_CMATH__
+
+/*
+ * Standard C++ Library wrapper around the C time.h header file.
+ */
+
+#include <cstddef>
+#include <math.h>
+
+extern "C++" {
+
+namespace std
+{
+// Functions.
+using ::cos;
+using ::sin;
+using ::tan;
+using ::acos;
+using ::asin;
+using ::atan;
+using ::atan2;
+
+using ::cosh;
+using ::sinh;
+using ::tanh;
+
+using ::exp;
+using ::frexp;
+using ::ldexp;
+using ::log;
+using ::log10;
+using ::modf;
+
+using ::pow;
+using ::sqrt;
+
+using ::ceil;
+using ::fabs;
+using ::floor;
+using ::fmod;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CMATH__
diff --git a/6/sources/cxx-stl/system/include/csetjmp b/6/sources/cxx-stl/system/include/csetjmp
new file mode 100644
index 0000000..ba82144
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/csetjmp
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSETJMP__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSETJMP__
+
+/*
+ * Standard C++ Library wrapper around the C setjmp.h header file.
+ */
+
+#include <setjmp.h>
+
+extern "C++" {
+
+#ifndef setjmp
+#define setjmp(env) setjmp (env)
+#endif
+
+namespace std
+{
+using ::jmp_buf;
+using ::longjmp;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSETJMP__
diff --git a/6/sources/cxx-stl/system/include/csignal b/6/sources/cxx-stl/system/include/csignal
new file mode 100644
index 0000000..84f0e1d
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/csignal
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSIGNAL__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSIGNAL__
+
+/*
+ * Standard C++ Library wrapper around the C signal.h header file.
+ */
+
+#include <signal.h>
+
+extern "C++" {
+
+namespace std
+{
+using ::sig_atomic_t;
+using ::signal;
+using ::raise;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSIGNAL__
diff --git a/6/sources/cxx-stl/system/include/cstddef b/6/sources/cxx-stl/system/include/cstddef
new file mode 100644
index 0000000..cb06b49
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cstddef
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__
+
+/*
+ * Standard C++ Library wrapper around the C stddef.h header file.
+ * The following 2 types are also declared in the 'std' namespace:
+ * . ptrdiff_t
+ * . size_t
+ */
+#include <stddef.h>
+
+extern "C++" {
+
+namespace std {
+using ::ptrdiff_t;
+using ::size_t;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDDEF__
diff --git a/6/sources/cxx-stl/system/include/cstdint b/6/sources/cxx-stl/system/include/cstdint
new file mode 100644
index 0000000..3df56df
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cstdint
@@ -0,0 +1,40 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDINT__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSTDINT__
+
+/*
+ * Standard C++ Library wrapper around the C stdint.h header file.
+ */
+
+#include <stdint.h>
+
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDINT__
diff --git a/6/sources/cxx-stl/system/include/cstdio b/6/sources/cxx-stl/system/include/cstdio
new file mode 100644
index 0000000..3c8b5c6
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cstdio
@@ -0,0 +1,96 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDIO__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSTDIO__
+
+/*
+ * Standard C++ Library wrapper around the C stdio.h header file.
+ */
+#include <cstddef>
+#include <stdio.h>
+
+extern "C++" {
+
+namespace std {
+using ::FILE;
+using ::fpos_t;
+
+using ::clearerr;
+using ::fclose;
+using ::feof;
+using ::ferror;
+using ::fflush;
+using ::fgetc;
+using ::fgetpos;
+using ::fgets;
+using ::fopen;
+using ::fprintf;
+using ::fputc;
+using ::fputs;
+using ::fread;
+using ::freopen;
+using ::fscanf;
+using ::fseek;
+using ::fsetpos;
+using ::ftell;
+using ::fwrite;
+using ::getc;
+using ::getchar;
+using ::gets;
+using ::perror;
+using ::printf;
+using ::putc;
+using ::putchar;
+using ::puts;
+using ::remove;
+using ::rename;
+using ::rewind;
+using ::scanf;
+using ::setbuf;
+using ::setvbuf;
+using ::sprintf;
+using ::sscanf;
+using ::tmpfile;
+using ::tmpnam;
+using ::ungetc;
+using ::vfprintf;
+using ::vprintf;
+using ::vsprintf;
+
+using ::snprintf;
+using ::vfscanf;
+using ::vscanf;
+using ::vsnprintf;
+using ::vsscanf;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDIO__
diff --git a/6/sources/cxx-stl/system/include/cstdlib b/6/sources/cxx-stl/system/include/cstdlib
new file mode 100644
index 0000000..bb6f5a5
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cstdlib
@@ -0,0 +1,119 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
+
+/*
+ * Standard C++ Library wrapper around the C stdlib.h header file.
+ */
+#include <stdlib.h>
+
+extern "C++" {
+
+namespace std {
+
+using ::exit;
+using ::abort;
+using ::atexit;
+#if 0 /* MISSING FROM BIONIC */
+using ::on_exit;
+#endif
+
+using ::getenv;
+using ::putenv;
+using ::setenv;
+using ::unsetenv;
+using ::clearenv;
+
+using ::mktemp;
+using ::mkstemp;
+
+using ::strtol;
+using ::strtoll;
+using ::strtoul;
+using ::strtoull;
+using ::strtod;
+using ::strtof;
+
+using ::atoi;
+using ::atol;
+using ::atoll;
+using ::atof;
+
+using ::abs;
+using ::labs;
+using ::llabs;
+
+using ::realpath;
+using ::system;
+
+using ::bsearch;
+using ::qsort;
+
+using ::jrand48;
+using ::mrand48;
+using ::nrand48;
+using ::lrand48;
+using ::seed48;
+using ::srand48;
+
+using ::rand;
+using ::srand;
+using ::random;
+using ::srandom;
+
+using ::malloc;
+using ::free;
+using ::calloc;
+using ::realloc;
+
+using ::unlockpt;
+using ::ptsname;
+using ::ptsname_r;
+using ::getpt;
+using ::grantpt;
+
+using ::div_t;
+using ::div;
+using ::ldiv_t;
+using ::ldiv;
+using ::lldiv_t;
+using ::lldiv;
+
+using ::mblen;
+using ::mbstowcs;
+using ::mbtowc;
+using ::wctomb;
+using ::wcstombs;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
diff --git a/6/sources/cxx-stl/system/include/cstring b/6/sources/cxx-stl/system/include/cstring
new file mode 100644
index 0000000..d3d9387
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cstring
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTRING__
+#define BIONIC_LIBSTDCPP_INCLUDE_CSTRING__
+
+/*
+ * Standard C++ Library wrapper around the C string.h header file.
+ */
+
+#include <cstddef>
+#include <string.h>
+
+extern "C++" {
+
+namespace std
+{
+using ::memchr;
+using ::memcmp;
+using ::memcpy;
+using ::memmove;
+using ::memset;
+using ::strcat;
+using ::strchr;
+using ::strcmp;
+using ::strcoll;
+using ::strcpy;
+using ::strcspn;
+using ::strerror;
+using ::strlen;
+using ::strncat;
+using ::strncmp;
+using ::strncpy;
+using ::strpbrk;
+using ::strrchr;
+using ::strspn;
+using ::strstr;
+using ::strtok;
+using ::strxfrm;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CSTRING__
diff --git a/6/sources/cxx-stl/system/include/ctime b/6/sources/cxx-stl/system/include/ctime
new file mode 100644
index 0000000..9e6744f
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/ctime
@@ -0,0 +1,63 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef BIONIC_LIBSTDCPP_INCLUDE_CTIME__
+#define BIONIC_LIBSTDCPP_INCLUDE_CTIME__
+
+/*
+ * Standard C++ Library wrapper around the C time.h header file.
+ */
+
+#include <cstddef>
+#include <time.h>
+
+extern "C++" {
+
+namespace std
+{
+// Types.
+using ::clock_t;
+using ::time_t;
+using ::tm;
+
+// Functions.
+using ::clock;
+using ::difftime;
+using ::mktime;
+using ::time;
+using ::asctime;
+using ::ctime;
+using ::gmtime;
+using ::localtime;
+using ::strftime;
+} // namespace std
+
+} // extern C++
+
+#endif // BIONIC_LIBSTDCPP_INCLUDE_CTIME__
diff --git a/6/sources/cxx-stl/system/include/cwchar b/6/sources/cxx-stl/system/include/cwchar
new file mode 100644
index 0000000..a4f9f42
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cwchar
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* IMPORTANT: cwchar and cwctype are not supported. See comment in
+ * bionic/libc/include/wchar.h */
diff --git a/6/sources/cxx-stl/system/include/cwctype_is_not_supported b/6/sources/cxx-stl/system/include/cwctype_is_not_supported
new file mode 100644
index 0000000..a4f9f42
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/cwctype_is_not_supported
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* IMPORTANT: cwchar and cwctype are not supported. See comment in
+ * bionic/libc/include/wchar.h */
diff --git a/6/sources/cxx-stl/system/include/new b/6/sources/cxx-stl/system/include/new
new file mode 100644
index 0000000..0253e8b
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/new
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+#ifndef __NEW__
+#define __NEW__
+
+#include <cstddef>
+
+extern "C++" {
+
+namespace std {
+ struct nothrow_t {};
+ extern const nothrow_t nothrow;
+}
+
+void* operator new(std::size_t);
+void* operator new[](std::size_t);
+void operator delete(void*);
+void operator delete[](void*);
+void* operator new(std::size_t, const std::nothrow_t&);
+void* operator new[](std::size_t, const std::nothrow_t&);
+void operator delete(void*, const std::nothrow_t&);
+void operator delete[](void*, const std::nothrow_t&);
+
+inline void* operator new(std::size_t, void* p) { return p; }
+inline void* operator new[](std::size_t, void* p) { return p; }
+
+// these next two are not really required, since exceptions are off
+inline void operator delete(void*, void*) { }
+inline void operator delete[](void*, void*) { }
+
+} // extern C++
+
+#endif // __NEW__
diff --git a/6/sources/cxx-stl/system/include/stl_pair.h b/6/sources/cxx-stl/system/include/stl_pair.h
new file mode 100644
index 0000000..37f757b
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/stl_pair.h
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ *
+ * Copyright (c) 1994
+ * 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.
+ *
+ *
+ * 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.
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ * You should not attempt to use it directly.
+ */
+
+#ifndef __SGI_STL_INTERNAL_PAIR_H
+#define __SGI_STL_INTERNAL_PAIR_H
+
+__STL_BEGIN_NAMESPACE
+
+template <class _T1, class _T2>
+struct pair {
+ typedef _T1 first_type;
+ typedef _T2 second_type;
+
+ _T1 first;
+ _T2 second;
+ pair() : first(), second() {}
+ pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
+
+ template <class _U1, class _U2>
+ pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
+};
+
+template <class _T1, class _T2>
+inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{
+ return __x.first == __y.first && __x.second == __y.second;
+}
+
+template <class _T1, class _T2>
+inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{
+ return __x.first < __y.first ||
+ (!(__y.first < __x.first) && __x.second < __y.second);
+}
+
+template <class _T1, class _T2>
+inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+ return !(__x == __y);
+}
+
+template <class _T1, class _T2>
+inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+ return __y < __x;
+}
+
+template <class _T1, class _T2>
+inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+ return !(__y < __x);
+}
+
+template <class _T1, class _T2>
+inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+ return !(__x < __y);
+}
+
+template <class _T1, class _T2>
+inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y)
+{
+ return pair<_T1, _T2>(__x, __y);
+}
+
+__STL_END_NAMESPACE
+
+#endif /* __SGI_STL_INTERNAL_PAIR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/6/sources/cxx-stl/system/include/typeinfo b/6/sources/cxx-stl/system/include/typeinfo
new file mode 100644
index 0000000..4b48a79
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/typeinfo
@@ -0,0 +1,31 @@
+#ifndef _TYPEINFO_HEADER_GAURD
+#define _TYPEINFO_HEADER_GAURD
+
+extern "C++" {
+
+namespace std {
+ class type_info;
+ class bad_cast;
+ class bad_typeid;
+};
+
+
+class type_info {
+public:
+ type_info();
+ virtual ~type_info();
+
+ char const * name() const;
+
+ bool operator==(type_info const & right) const;
+ bool operator!=(type_info const & right) const;
+ bool before(type_info const & right) const;
+
+private:
+ type_info(type_info const & right);
+ type_info & operator=(type_info const & right);
+};
+
+} // C++
+
+#endif
diff --git a/6/sources/cxx-stl/system/include/utility b/6/sources/cxx-stl/system/include/utility
new file mode 100644
index 0000000..12044a7
--- /dev/null
+++ b/6/sources/cxx-stl/system/include/utility
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#ifndef _CPP_UTILITY
+#define _CPP_UTILITY
+
+#pragma GCC system_header
+
+#define __STL_BEGIN_NAMESPACE namespace std {
+#define __STL_END_NAMESPACE }
+
+#include <stl_pair.h>
+
+#endif /* _CPP_UTILITY */